diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-17 14:50:36 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-17 14:50:36 +0200 |
commit | c8b850133a9acf63f421da4643da07d7cfaa7f98 (patch) | |
tree | 3e180fd8d70d8110f509057d58050910ddfefa80 /web-build | |
parent | 7b128c660a798759c6f9e1d6751b811ce1d2874f (diff) |
added web-build
Diffstat (limited to 'web-build')
33 files changed, 2240 insertions, 0 deletions
diff --git a/web-build/asset-manifest.json b/web-build/asset-manifest.json new file mode 100644 index 0000000..1024d76 --- /dev/null +++ b/web-build/asset-manifest.json @@ -0,0 +1,27 @@ +{ + "files": { + "app.js": "/static/js/app.767fd55b.chunk.js", + "app.js.map": "/static/js/app.767fd55b.chunk.js.map", + "runtime~app.js": "/static/js/runtime~app.2e9f1821.js", + "runtime~app.js.map": "/static/js/runtime~app.2e9f1821.js.map", + "static/js/2.76477044.chunk.js": "/static/js/2.76477044.chunk.js", + "static/js/2.76477044.chunk.js.map": "/static/js/2.76477044.chunk.js.map", + "fonts/MaterialCommunityIcons.ttf": "/./fonts/MaterialCommunityIcons.ttf", + "favicon-16.png": "/favicon-16.png", + "favicon-32.png": "/favicon-32.png", + "favicon.ico": "/favicon.ico", + "index.html": "/index.html", + "manifest.json": "/manifest.json", + "serve.json": "/serve.json", + "static/js/2.76477044.chunk.js.LICENSE.txt": "/static/js/2.76477044.chunk.js.LICENSE.txt", + "static/media/bezier.cjs": "/static/media/bezier.799a5c8c.cjs", + "static/media/bg.png": "/static/media/bg.27c56310.png", + "static/media/bowser.png": "/static/media/bowser.4ba9aedf.png", + "static/media/logo-ignite.png": "/static/media/logo-ignite.5c0bc1b0.png" + }, + "entrypoints": [ + "static/js/runtime~app.2e9f1821.js", + "static/js/2.76477044.chunk.js", + "static/js/app.767fd55b.chunk.js" + ] +}
\ No newline at end of file diff --git a/web-build/favicon-16.png b/web-build/favicon-16.png Binary files differnew file mode 100644 index 0000000..cab176c --- /dev/null +++ b/web-build/favicon-16.png diff --git a/web-build/favicon-32.png b/web-build/favicon-32.png Binary files differnew file mode 100644 index 0000000..f3cd62a --- /dev/null +++ b/web-build/favicon-32.png diff --git a/web-build/favicon.ico b/web-build/favicon.ico Binary files differnew file mode 100644 index 0000000..af16604 --- /dev/null +++ b/web-build/favicon.ico diff --git a/web-build/fonts/MaterialCommunityIcons.ttf b/web-build/fonts/MaterialCommunityIcons.ttf Binary files differnew file mode 100644 index 0000000..522dc31 --- /dev/null +++ b/web-build/fonts/MaterialCommunityIcons.ttf diff --git a/web-build/index.html b/web-build/index.html new file mode 100644 index 0000000..5e55a71 --- /dev/null +++ b/web-build/index.html @@ -0,0 +1 @@ +<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta httpequiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"/><title>OrgRoamForceGraphReact</title><style>#root,body,html{width:100%;-webkit-overflow-scrolling:touch;margin:0;padding:0;min-height:100%}#root{flex-shrink:0;flex-basis:auto;flex-grow:1;display:flex;flex:1}html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;height:calc(100% + env(safe-area-inset-top))}body{display:flex;overflow-y:auto;overscroll-behavior-y:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-ms-overflow-style:scrollbar}</style><link rel="manifest" href="/manifest.json"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png"><link rel="shortcut icon" href="/favicon.ico"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-touch-fullscreen" content="yes"><meta name="apple-mobile-web-app-title" content="OrgRoamForceGraphReact"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"><link rel="apple-touch-icon" sizes="180x180" href="/pwa/apple-touch-icon/apple-touch-icon-180.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png"><link rel="apple-touch-startup-image" media="screen and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)" href="/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png"></head><body><noscript><form action="" style="background-color:#fff;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999"><div style="font-size:18px;font-family:Helvetica,sans-serif;line-height:24px;margin:10%;width:80%"><p>Oh no! It looks like JavaScript is not enabled in your browser.</p><p style="margin:20px 0"><button type="submit" style="background-color:#4630eb;border-radius:100px;border:none;box-shadow:none;color:#fff;cursor:pointer;font-weight:700;line-height:20px;padding:6px 16px">Reload</button></p></div></form></noscript><div id="root"></div><script src="/static/js/runtime~app.2e9f1821.js"></script><script src="/static/js/2.76477044.chunk.js"></script><script src="/static/js/app.767fd55b.chunk.js"></script></body></html>
\ No newline at end of file diff --git a/web-build/manifest.json b/web-build/manifest.json new file mode 100644 index 0000000..4ea3a0c --- /dev/null +++ b/web-build/manifest.json @@ -0,0 +1,26 @@ +{ + "background_color": "#ffffff", + "display": "standalone", + "lang": "en", + "name": "OrgRoamForceGraphReact", + "short_name": "OrgRoamForceGraphReact", + "start_url": "/?utm_source=web_app_manifest", + "orientation": "portrait", + "icons": [ + { + "src": "/pwa/chrome-icon/chrome-icon-144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "/pwa/chrome-icon/chrome-icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/pwa/chrome-icon/chrome-icon-512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +}
\ No newline at end of file diff --git a/web-build/pwa/apple-touch-icon/apple-touch-icon-180.png b/web-build/pwa/apple-touch-icon/apple-touch-icon-180.png Binary files differnew file mode 100644 index 0000000..7d2b928 --- /dev/null +++ b/web-build/pwa/apple-touch-icon/apple-touch-icon-180.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png Binary files differnew file mode 100644 index 0000000..be28c75 --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1125x2436.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png Binary files differnew file mode 100644 index 0000000..1891ad1 --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2208.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png Binary files differnew file mode 100644 index 0000000..0ebcd41 --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1242x2688.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png Binary files differnew file mode 100644 index 0000000..0fd2a27 --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1536x2048.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png Binary files differnew file mode 100644 index 0000000..239f7c1 --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2224.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png Binary files differnew file mode 100644 index 0000000..89030ac --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-1668x2388.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png Binary files differnew file mode 100644 index 0000000..c2eb9f3 --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-2048x2732.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png Binary files differnew file mode 100644 index 0000000..34873ce --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-640x1136.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png Binary files differnew file mode 100644 index 0000000..b136824 --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-750x1334.png diff --git a/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png Binary files differnew file mode 100644 index 0000000..7602417 --- /dev/null +++ b/web-build/pwa/apple-touch-startup-image/apple-touch-startup-image-828x1792.png diff --git a/web-build/pwa/chrome-icon/chrome-icon-144.png b/web-build/pwa/chrome-icon/chrome-icon-144.png Binary files differnew file mode 100644 index 0000000..38173a6 --- /dev/null +++ b/web-build/pwa/chrome-icon/chrome-icon-144.png diff --git a/web-build/pwa/chrome-icon/chrome-icon-192.png b/web-build/pwa/chrome-icon/chrome-icon-192.png Binary files differnew file mode 100644 index 0000000..14bb87b --- /dev/null +++ b/web-build/pwa/chrome-icon/chrome-icon-192.png diff --git a/web-build/pwa/chrome-icon/chrome-icon-512.png b/web-build/pwa/chrome-icon/chrome-icon-512.png Binary files differnew file mode 100644 index 0000000..c26a9d5 --- /dev/null +++ b/web-build/pwa/chrome-icon/chrome-icon-512.png diff --git a/web-build/serve.json b/web-build/serve.json new file mode 100644 index 0000000..f625859 --- /dev/null +++ b/web-build/serve.json @@ -0,0 +1,13 @@ +{ + "headers": [ + { + "source": "static/**/*.js", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=31536000, immutable" + } + ] + } + ] +} diff --git a/web-build/static/js/2.76477044.chunk.js b/web-build/static/js/2.76477044.chunk.js new file mode 100644 index 0000000..6619dcf --- /dev/null +++ b/web-build/static/js/2.76477044.chunk.js @@ -0,0 +1,3 @@ +/*! For license information please see 2.76477044.chunk.js.LICENSE.txt */ +(this.webpackJsonp=this.webpackJsonp||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(292)},function(e,t,n){e.exports=n(306)()},function(e,t,n){"use strict";var r=n(0),i=n(31),o=n(63),a=n(27),s=n(72),l=n(88),c=n(36),u=n(73),h=n(95),d=n(5),f=n(80);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=m(m(m(m(m(m(m(m(m({},a.c),a.a),a.b),a.d),a.e),a.f),a.h),a.g),{},{href:!0,lang:!0,onScroll:!0,onWheel:!0,pointerEvents:!0}),y=r.forwardRef((function(e,t){var n=e.hrefAttrs,o=e.onLayout,a=e.onMoveShouldSetResponder,p=e.onMoveShouldSetResponderCapture,m=e.onResponderEnd,g=e.onResponderGrant,y=e.onResponderMove,x=e.onResponderReject,_=e.onResponderRelease,E=e.onResponderStart,A=e.onResponderTerminate,S=e.onResponderTerminationRequest,M=e.onScrollShouldSetResponder,T=e.onScrollShouldSetResponderCapture,C=e.onSelectionChangeShouldSetResponder,O=e.onSelectionChangeShouldSetResponderCapture,R=e.onStartShouldSetResponder,k=e.onStartShouldSetResponderCapture;var P=r.useContext(f.a),L=r.useRef(null);Object(l.a)(L,o),Object(h.a)(L,{onMoveShouldSetResponder:a,onMoveShouldSetResponderCapture:p,onResponderEnd:m,onResponderGrant:g,onResponderMove:y,onResponderReject:x,onResponderRelease:_,onResponderStart:E,onResponderTerminate:A,onResponderTerminationRequest:S,onScrollShouldSetResponder:M,onScrollShouldSetResponderCapture:T,onSelectionChangeShouldSetResponder:C,onSelectionChangeShouldSetResponderCapture:O,onStartShouldSetResponder:R,onStartShouldSetResponderCapture:k});var D=d.a.compose(P&&w.inline,e.style),I=function(e){return Object(s.a)(e,v)}(e);if(I.classList=b,I.style=D,null!=e.href&&null!=n){var N=n.download,j=n.rel,B=n.target;null!=N&&(I.download=N),null!=j&&(I.rel=j),"string"===typeof B&&(I.target="_"!==B.charAt(0)?"_"+B:B)}var F=Object(u.a)(I),z=Object(c.a)(L,F,t);return I.ref=z,Object(i.a)("div",I)}));y.displayName="View";var b=[o.a.create({view:{alignItems:"stretch",border:"0 solid black",boxSizing:"border-box",display:"flex",flexBasis:"auto",flexDirection:"column",flexShrink:0,margin:0,minHeight:0,minWidth:0,padding:0,position:"relative",zIndex:0}}).view],w=d.a.create({inline:{display:"inline-flex"}});t.a=y},function(t,n,r){"use strict";r.d(n,"a",(function(){return fs})),r.d(n,"b",(function(){return a})),r.d(n,"c",(function(){return L})),r.d(n,"d",(function(){return nt})),r.d(n,"e",(function(){return pt})),r.d(n,"f",(function(){return Ms})),r.d(n,"g",(function(){return Je})),r.d(n,"h",(function(){return mo})),r.d(n,"i",(function(){return Oo})),r.d(n,"j",(function(){return po})),r.d(n,"k",(function(){return ds})),r.d(n,"l",(function(){return c})),r.d(n,"m",(function(){return ot})),r.d(n,"n",(function(){return si})),r.d(n,"o",(function(){return eo})),r.d(n,"p",(function(){return Yi})),r.d(n,"q",(function(){return s})),r.d(n,"r",(function(){return i})),r.d(n,"s",(function(){return se})),r.d(n,"t",(function(){return Pt})),r.d(n,"u",(function(){return $e})),r.d(n,"v",(function(){return xa})),r.d(n,"w",(function(){return us})),r.d(n,"x",(function(){return zt})),r.d(n,"y",(function(){return Xt})),r.d(n,"z",(function(){return Po})),r.d(n,"A",(function(){return O})),r.d(n,"B",(function(){return l})),r.d(n,"C",(function(){return Hs})),r.d(n,"D",(function(){return mi})),r.d(n,"E",(function(){return Bt})),r.d(n,"F",(function(){return da})),r.d(n,"G",(function(){return da})),r.d(n,"H",(function(){return Gs})),r.d(n,"I",(function(){return o})),r.d(n,"J",(function(){return Xa})),r.d(n,"K",(function(){return fa})),r.d(n,"L",(function(){return jt})),r.d(n,"M",(function(){return b})),r.d(n,"N",(function(){return R})),r.d(n,"O",(function(){return T})),r.d(n,"P",(function(){return di}));const i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},o={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},a=1,s=1006,l=1023;class c{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const u=[];for(let e=0;e<256;e++)u[e]=(e<16?"0":"")+e.toString(16);const h=Math.PI/180,d=180/Math.PI;function f(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(u[255&e]+u[e>>8&255]+u[e>>16&255]+u[e>>24&255]+"-"+u[255&t]+u[t>>8&255]+"-"+u[t>>16&15|64]+u[t>>24&255]+"-"+u[63&n|128]+u[n>>8&255]+"-"+u[n>>16&255]+u[n>>24&255]+u[255&r]+u[r>>8&255]+u[r>>16&255]+u[r>>24&255]).toUpperCase()}function p(e,t,n){return Math.max(t,Math.min(n,e))}function m(e,t){return(e%t+t)%t}function g(e,t,n){return(1-n)*e+n*t}function v(e){return 0===(e&e-1)&&0!==e}function y(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}class b{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(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(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(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(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(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(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const 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(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(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(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(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(e,t){const 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}random(){return this.x=Math.random(),this.y=Math.random(),this}}b.prototype.isVector2=!0;class w{constructor(){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.")}set(e,t,n,r,i,o,a,s,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const 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}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const 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}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],l=n[1],c=n[4],u=n[7],h=n[2],d=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],w=r[2],x=r[5],_=r[8];return i[0]=o*p+a*v+s*w,i[3]=o*m+a*y+s*x,i[6]=o*g+a*b+s*_,i[1]=l*p+c*v+u*w,i[4]=l*m+c*y+u*x,i[7]=l*g+c*b+u*_,i[2]=h*p+d*v+f*w,i[5]=h*m+d*y+f*x,i[8]=h*g+d*b+f*_,this}multiplyScalar(e){const 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(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8];return t*o*c-t*a*l-n*i*c+n*a*s+r*i*l-r*o*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=c*o-a*l,h=a*s-c*i,d=l*i-o*s,f=t*u+n*h+r*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);const p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(a*n-r*o)*p,e[3]=h*p,e[4]=(c*t-r*s)*p,e[5]=(r*i-a*t)*p,e[6]=d*p,e[7]=(n*s-l*t)*p,e[8]=(o*t-n*i)*p,this}transpose(){let e;const 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(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const 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(e,t,n,r,i,o,a){const s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*o+l*a)+o+e,-r*l,r*s,-r*(-l*o+s*a)+a+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],a=r[6],s=r[1],l=r[4],c=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*l,r[6]=t*a+n*c,r[1]=-n*i+t*s,r[4]=-n*o+t*l,r[7]=-n*a+t*c,this}translate(e,t){const 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(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const 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}clone(){return(new this.constructor).fromArray(this.elements)}}let x;w.prototype.isMatrix3=!0;class _{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===x&&(x=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),x.width=e.width,x.height=e.height;const n=x.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=x}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}}let E=0;class A extends c{constructor(e=A.DEFAULT_IMAGE,t=A.DEFAULT_MAPPING,n=1001,r=1001,i=s,o=1008,a=l,c=1009,u=1,h=3e3){super(),Object.defineProperty(this,"id",{value:E++}),this.uuid=f(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=u,this.format=a,this.internalFormat=null,this.type=c,this.offset=new b(0,0),this.repeat=new b(1,1),this.center=new b(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new w,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=h,this.version=0,this.onUpdate=null}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(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.internalFormat=e.internalFormat,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(e){const t=void 0===e||"string"===typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const 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],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){const r=this.image;if(void 0===r.uuid&&(r.uuid=f()),!t&&void 0===e.images[r.uuid]){let t;if(Array.isArray(r)){t=[];for(let e=0,n=r.length;e<n;e++)r[e].isDataTexture?t.push(S(r[e].image)):t.push(S(r[e]))}else t=S(r);e.images[r.uuid]={uuid:r.uuid,url:t}}n.image=r.uuid}return t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;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)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&this.version++}}function S(e){return"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?_.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}A.DEFAULT_IMAGE=void 0,A.DEFAULT_MAPPING=300,A.prototype.isTexture=!0;class M{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(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(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(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(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(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(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(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(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}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const 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(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const 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(e){let t,n,r,i;const o=e.elements,a=o[0],s=o[4],l=o[8],c=o[1],u=o[5],h=o[9],d=o[2],f=o[6],p=o[10];if(Math.abs(s-c)<.01&&Math.abs(l-d)<.01&&Math.abs(h-f)<.01){if(Math.abs(s+c)<.1&&Math.abs(l+d)<.1&&Math.abs(h+f)<.1&&Math.abs(a+u+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const e=(a+1)/2,o=(u+1)/2,m=(p+1)/2,g=(s+c)/4,v=(l+d)/4,y=(h+f)/4;return e>o&&e>m?e<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=g/n,i=v/n):o>m?o<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=g/r,i=y/r):m<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(m),n=v/i,r=y/i),this.set(n,r,i,t),this}let m=Math.sqrt((f-h)*(f-h)+(l-d)*(l-d)+(c-s)*(c-s));return Math.abs(m)<.001&&(m=1),this.x=(f-h)/m,this.y=(l-d)/m,this.z=(c-s)/m,this.w=Math.acos((a+u+p-1)/2),this}min(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(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(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(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){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(){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(){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(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(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(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(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}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}}M.prototype.isVector4=!0;class T extends c{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new M(0,0,e,t),this.scissorTest=!1,this.viewport=new M(0,0,e,t),this.texture=new A(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:s,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}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image={...this.texture.image},this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}}T.prototype.isWebGLRenderTarget=!0;(class extends T{constructor(e,t,n){super(e,t);const r=this.texture;this.texture=[];for(let i=0;i<n;i++)this.texture[i]=r.clone()}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone();return this}}).prototype.isWebGLMultipleRenderTargets=!0;class C extends T{constructor(e,t,n){super(e,t,n),this.samples=4}copy(e){return super.copy.call(this,e),this.samples=e.samples,this}}C.prototype.isWebGLMultisampleRenderTarget=!0;class O{constructor(e=0,t=0,n=0,r=1){this._x=e,this._y=t,this._z=n,this._w=r}static slerp(e,t,n,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(e,t,r)}static slerpFlat(e,t,n,r,i,o,a){let s=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3];const h=i[o+0],d=i[o+1],f=i[o+2],p=i[o+3];if(0===a)return e[t+0]=s,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===a)return e[t+0]=h,e[t+1]=d,e[t+2]=f,void(e[t+3]=p);if(u!==p||s!==h||l!==d||c!==f){let e=1-a;const t=s*h+l*d+c*f+u*p,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,a=Math.sin(a*o)/i}const i=a*n;if(s=s*e+h*i,l=l*e+d*i,c=c*e+f*i,u=u*e+p*i,e===1-a){const e=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=e,l*=e,c*=e,u*=e}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,o){const a=n[r],s=n[r+1],l=n[r+2],c=n[r+3],u=i[o],h=i[o+1],d=i[o+2],f=i[o+3];return e[t]=a*f+c*u+s*d-l*h,e[t+1]=s*f+c*h+l*u-a*d,e[t+2]=l*f+c*d+a*h-s*u,e[t+3]=c*f-a*u-s*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,a=Math.cos,s=Math.sin,l=a(n/2),c=a(r/2),u=a(i/2),h=s(n/2),d=s(r/2),f=s(i/2);switch(o){case"XYZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"YXZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"ZXY":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"ZYX":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"YZX":this._x=h*c*u+l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u-h*d*f;break;case"XZY":this._x=h*c*u-l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const 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(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],l=t[2],c=t[6],u=t[10],h=n+a+u;if(h>0){const e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(c-s)*e,this._y=(i-l)*e,this._z=(o-r)*e}else if(n>a&&n>u){const e=2*Math.sqrt(1+n-a-u);this._w=(c-s)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+l)/e}else if(a>u){const e=2*Math.sqrt(1+a-n-u);this._w=(i-l)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(s+c)/e}else{const e=2*Math.sqrt(1+u-n-a);this._w=(o-r)/e,this._x=(i+l)/e,this._y=(s+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(p(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let 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(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(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,l=t._z,c=t._w;return this._x=n*c+o*a+r*l-i*s,this._y=r*c+o*s+i*a-n*l,this._z=i*c+o*l+n*s-r*a,this._w=o*c-n*a-r*s-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let 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;const s=1-a*a;if(s<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(s),c=Math.atan2(l,a),u=Math.sin((1-t)*c)/l,h=Math.sin(t*c)/l;return this._w=o*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=i*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}O.prototype.isQuaternion=!0;class R{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(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(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(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(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(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(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(P.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(P.setFromAxisAngle(e,t))}applyMatrix3(e){const 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}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const 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(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,a=e.z,s=e.w,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const 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(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(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(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(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(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){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(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(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(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(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(e,t){const 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(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return k.copy(this).projectOnVector(e),this.sub(k)}reflect(e){return this.sub(k.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(p(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const 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(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(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}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}}R.prototype.isVector3=!0;const k=new R,P=new O;class L{constructor(e=new R(1/0,1/0,1/0),t=new R(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,l=e.length;s<l;s+=3){const l=e[s],c=e[s+1],u=e[s+2];l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>a&&(a=u)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,a=-1/0;for(let s=0,l=e.count;s<l;s++){const l=e.getX(s),c=e.getY(s),u=e.getZ(s);l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>o&&(o=c),u>a&&(a=u)}return this.min.set(t,n,r),this.max.set(i,o,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=I.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e){return this.makeEmpty(),this.expandByObject(e)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){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(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e){e.updateWorldMatrix(!1,!1);const t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),N.copy(t.boundingBox),N.applyMatrix4(e.matrixWorld),this.union(N));const n=e.children;for(let r=0,i=n.length;r<i;r++)this.expandByObject(n[r]);return this}containsPoint(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(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(e,t){return t.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(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(e){return this.clampPoint(e.center,I),I.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let 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(e){if(this.isEmpty())return!1;this.getCenter(V),G.subVectors(this.max,V),j.subVectors(e.a,V),B.subVectors(e.b,V),F.subVectors(e.c,V),z.subVectors(B,j),H.subVectors(F,B),U.subVectors(j,F);let t=[0,-z.z,z.y,0,-H.z,H.y,0,-U.z,U.y,z.z,0,-z.x,H.z,0,-H.x,U.z,0,-U.x,-z.y,z.x,0,-H.y,H.x,0,-U.y,U.x,0];return!!X(t,j,B,F,G)&&(t=[1,0,0,0,1,0,0,0,1],!!X(t,j,B,F,G)&&(W.crossVectors(z,H),t=[W.x,W.y,W.z],X(t,j,B,F,G)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return I.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(I).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(D[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),D[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),D[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),D[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),D[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),D[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),D[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),D[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(D)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}L.prototype.isBox3=!0;const D=[new R,new R,new R,new R,new R,new R,new R,new R],I=new R,N=new L,j=new R,B=new R,F=new R,z=new R,H=new R,U=new R,V=new R,G=new R,W=new R,q=new R;function X(e,t,n,r,i){for(let o=0,a=e.length-3;o<=a;o+=3){q.fromArray(e,o);const a=i.x*Math.abs(q.x)+i.y*Math.abs(q.y)+i.z*Math.abs(q.z),s=t.dot(q),l=n.dot(q),c=r.dot(q);if(Math.max(-Math.max(s,l,c),Math.min(s,l,c))>a)return!1}return!0}const Y=new L,K=new R,Q=new R,Z=new R;class J{constructor(e=new R,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Y.setFromPoints(e).getCenter(n);let r=0;for(let i=0,o=e.length;i<o;i++)r=Math.max(r,n.distanceToSquared(e[i]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){Z.subVectors(e,this.center);const t=Z.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(Z.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return Q.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(K.copy(e.center).add(Q)),this.expandByPoint(K.copy(e.center).sub(Q)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const $=new R,ee=new R,te=new R,ne=new R,re=new R,ie=new R,oe=new R;class ae{constructor(e=new R,t=new R(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,$)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=$.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):($.copy(this.direction).multiplyScalar(t).add(this.origin),$.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){ee.copy(e).add(t).multiplyScalar(.5),te.copy(t).sub(e).normalize(),ne.copy(this.origin).sub(ee);const i=.5*e.distanceTo(t),o=-this.direction.dot(te),a=ne.dot(this.direction),s=-ne.dot(te),l=ne.lengthSq(),c=Math.abs(1-o*o);let u,h,d,f;if(c>0)if(u=o*s-a,h=o*a-s,f=i*c,u>=0)if(h>=-f)if(h<=f){const e=1/c;u*=e,h*=e,d=u*(u+o*h+2*a)+h*(o*u+h+2*s)+l}else h=i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;else h=-i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;else h<=-f?(u=Math.max(0,-(-o*i+a)),h=u>0?-i:Math.min(Math.max(-i,-s),i),d=-u*u+h*(h+2*s)+l):h<=f?(u=0,h=Math.min(Math.max(-i,-s),i),d=h*(h+2*s)+l):(u=Math.max(0,-(o*i+a)),h=u>0?i:Math.min(Math.max(-i,-s),i),d=-u*u+h*(h+2*s)+l);else h=o>0?-i:i,u=Math.max(0,-(o*h+a)),d=-u*u+h*(h+2*s)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(te).multiplyScalar(h).add(ee),d}intersectSphere(e,t){$.subVectors(e.center,this.origin);const n=$.dot(this.direction),r=$.dot($)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,a,s;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),c>=0?(i=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(i=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),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(e){return null!==this.intersectBox(e,$)}intersectTriangle(e,t,n,r,i){re.subVectors(t,e),ie.subVectors(n,e),oe.crossVectors(re,ie);let o,a=this.direction.dot(oe);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}ne.subVectors(this.origin,e);const s=o*this.direction.dot(ie.crossVectors(ne,ie));if(s<0)return null;const l=o*this.direction.dot(re.cross(ne));if(l<0)return null;if(s+l>a)return null;const c=-o*ne.dot(oe);return c<0?null:this.at(c/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class se{constructor(){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.")}set(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,m){const 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]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new se).fromArray(this.elements)}copy(e){const 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(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(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(e){const t=this.elements,n=e.elements,r=1/le.setFromMatrixColumn(e,0).length(),i=1/le.setFromMatrixColumn(e,1).length(),o=1/le.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),a=Math.sin(n),s=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=o*c,n=o*u,r=a*c,i=a*u;t[0]=s*c,t[4]=-s*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-a*s,t[2]=i-e*l,t[6]=r+n*l,t[10]=o*s}else if("YXZ"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e+i*a,t[4]=r*a-n,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=o*s}else if("ZXY"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e-i*a,t[4]=-o*u,t[8]=r+n*a,t[1]=n+r*a,t[5]=o*c,t[9]=i-e*a,t[2]=-o*l,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){const e=o*c,n=o*u,r=a*c,i=a*u;t[0]=s*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=s*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){const e=o*s,n=o*l,r=a*s,i=a*l;t[0]=s*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=o*c,t[9]=-a*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=o*s,n=o*l,r=a*s,i=a*l;t[0]=s*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=o*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=a*c,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(ue,e,he)}lookAt(e,t,n){const r=this.elements;return pe.subVectors(e,t),0===pe.lengthSq()&&(pe.z=1),pe.normalize(),de.crossVectors(n,pe),0===de.lengthSq()&&(1===Math.abs(n.z)?pe.x+=1e-4:pe.z+=1e-4,pe.normalize(),de.crossVectors(n,pe)),de.normalize(),fe.crossVectors(pe,de),r[0]=de.x,r[4]=fe.x,r[8]=pe.x,r[1]=de.y,r[5]=fe.y,r[9]=pe.y,r[2]=de.z,r[6]=fe.z,r[10]=pe.z,this}multiply(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(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],l=n[12],c=n[1],u=n[5],h=n[9],d=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],w=n[15],x=r[0],_=r[4],E=r[8],A=r[12],S=r[1],M=r[5],T=r[9],C=r[13],O=r[2],R=r[6],k=r[10],P=r[14],L=r[3],D=r[7],I=r[11],N=r[15];return i[0]=o*x+a*S+s*O+l*L,i[4]=o*_+a*M+s*R+l*D,i[8]=o*E+a*T+s*k+l*I,i[12]=o*A+a*C+s*P+l*N,i[1]=c*x+u*S+h*O+d*L,i[5]=c*_+u*M+h*R+d*D,i[9]=c*E+u*T+h*k+d*I,i[13]=c*A+u*C+h*P+d*N,i[2]=f*x+p*S+m*O+g*L,i[6]=f*_+p*M+m*R+g*D,i[10]=f*E+p*T+m*k+g*I,i[14]=f*A+p*C+m*P+g*N,i[3]=v*x+y*S+b*O+w*L,i[7]=v*_+y*M+b*R+w*D,i[11]=v*E+y*T+b*k+w*I,i[15]=v*A+y*C+b*P+w*N,this}multiplyScalar(e){const 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}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],a=e[5],s=e[9],l=e[13],c=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*s*u-r*l*u-i*a*h+n*l*h+r*a*d-n*s*d)+e[7]*(+t*s*d-t*l*h+i*o*h-r*o*d+r*l*c-i*s*c)+e[11]*(+t*l*u-t*a*d-i*o*u+n*o*d+i*a*c-n*l*c)+e[15]*(-r*a*c-t*s*u+t*a*h+r*o*u-n*o*h+n*s*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=u*m*l-p*h*l+p*s*d-a*m*d-u*s*g+a*h*g,y=f*h*l-c*m*l-f*s*d+o*m*d+c*s*g-o*h*g,b=c*p*l-f*u*l+f*a*d-o*p*d-c*a*g+o*u*g,w=f*u*s-c*p*s-f*a*h+o*p*h+c*a*m-o*u*m,x=t*v+n*y+r*b+i*w;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const _=1/x;return e[0]=v*_,e[1]=(p*h*i-u*m*i-p*r*d+n*m*d+u*r*g-n*h*g)*_,e[2]=(a*m*i-p*s*i+p*r*l-n*m*l-a*r*g+n*s*g)*_,e[3]=(u*s*i-a*h*i-u*r*l+n*h*l+a*r*d-n*s*d)*_,e[4]=y*_,e[5]=(c*m*i-f*h*i+f*r*d-t*m*d-c*r*g+t*h*g)*_,e[6]=(f*s*i-o*m*i-f*r*l+t*m*l+o*r*g-t*s*g)*_,e[7]=(o*h*i-c*s*i+c*r*l-t*h*l-o*r*d+t*s*d)*_,e[8]=b*_,e[9]=(f*u*i-c*p*i-f*n*d+t*p*d+c*n*g-t*u*g)*_,e[10]=(o*p*i-f*a*i+f*n*l-t*p*l-o*n*g+t*a*g)*_,e[11]=(c*a*i-o*u*i-c*n*l+t*u*l+o*n*d-t*a*d)*_,e[12]=w*_,e[13]=(c*p*r-f*u*r+f*n*h-t*p*h-c*n*m+t*u*m)*_,e[14]=(f*a*r-o*p*r-f*n*s+t*p*s+o*n*m-t*a*m)*_,e[15]=(o*u*r-c*a*r+c*n*s-t*u*s-o*n*h+t*a*h)*_,this}scale(e){const 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(){const 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(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const 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(e){const 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(e){const 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(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,a=e.y,s=e.z,l=i*o,c=i*a;return this.set(l*o+n,l*a-r*s,l*s+r*a,0,l*a+r*s,c*a+n,c*s-r*o,0,l*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,l=i+i,c=o+o,u=a+a,h=i*l,d=i*c,f=i*u,p=o*c,m=o*u,g=a*u,v=s*l,y=s*c,b=s*u,w=n.x,x=n.y,_=n.z;return r[0]=(1-(p+g))*w,r[1]=(d+b)*w,r[2]=(f-y)*w,r[3]=0,r[4]=(d-b)*x,r[5]=(1-(h+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*_,r[9]=(m-v)*_,r[10]=(1-(h+p))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=le.set(r[0],r[1],r[2]).length();const o=le.set(r[4],r[5],r[6]).length(),a=le.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],ce.copy(this);const s=1/i,l=1/o,c=1/a;return ce.elements[0]*=s,ce.elements[1]*=s,ce.elements[2]*=s,ce.elements[4]*=l,ce.elements[5]*=l,ce.elements[6]*=l,ce.elements[8]*=c,ce.elements[9]*=c,ce.elements[10]*=c,t.setFromRotationMatrix(ce),n.x=i,n.y=o,n.z=a,this}makePerspective(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.");const a=this.elements,s=2*i/(t-e),l=2*i/(n-r),c=(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]=c,a[12]=0,a[1]=0,a[5]=l,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(e,t,n,r,i,o){const a=this.elements,s=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*s,h=(n+r)*l,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const 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}}se.prototype.isMatrix4=!0;const le=new R,ce=new se,ue=new R(0,0,0),he=new R(1,1,1),de=new R,fe=new R,pe=new R,me=new se,ge=new O;class ve{constructor(e=0,t=0,n=0,r=ve.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],o=r[4],a=r[8],s=r[1],l=r[5],c=r[9],u=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(p(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-p(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(p(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-p(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(p(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-p(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return me.makeRotationFromQuaternion(e),this.setFromRotationMatrix(me,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ge.setFromEuler(this),this.setFromQuaternion(ge,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(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(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new R(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}}ve.prototype.isEuler=!0,ve.DefaultOrder="XYZ",ve.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class ye{constructor(){this.mask=1}set(e){this.mask=1<<e|0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!==(this.mask&e.mask)}}let be=0;const we=new R,xe=new O,_e=new se,Ee=new R,Ae=new R,Se=new R,Me=new O,Te=new R(1,0,0),Ce=new R(0,1,0),Oe=new R(0,0,1),Re={type:"added"},ke={type:"removed"};class Pe extends c{constructor(){super(),Object.defineProperty(this,"id",{value:be++}),this.uuid=f(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Pe.DefaultUp.clone();const e=new R,t=new ve,n=new O,r=new R(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new se},normalMatrix:{value:new w}}),this.matrix=new se,this.matrixWorld=new se,this.matrixAutoUpdate=Pe.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new ye,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return xe.setFromAxisAngle(e,t),this.quaternion.multiply(xe),this}rotateOnWorldAxis(e,t){return xe.setFromAxisAngle(e,t),this.quaternion.premultiply(xe),this}rotateX(e){return this.rotateOnAxis(Te,e)}rotateY(e){return this.rotateOnAxis(Ce,e)}rotateZ(e){return this.rotateOnAxis(Oe,e)}translateOnAxis(e,t){return we.copy(e).applyQuaternion(this.quaternion),this.position.add(we.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(Te,e)}translateY(e){return this.translateOnAxis(Ce,e)}translateZ(e){return this.translateOnAxis(Oe,e)}localToWorld(e){return e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return e.applyMatrix4(_e.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Ee.copy(e):Ee.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),Ae.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?_e.lookAt(Ae,Ee,this.up):_e.lookAt(Ee,Ae,this.up),this.quaternion.setFromRotationMatrix(_e),r&&(_e.extractRotation(r.matrixWorld),xe.setFromRotationMatrix(_e),this.quaternion.premultiply(xe.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);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,this.children.push(e),e.dispatchEvent(Re)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(ke)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(ke)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),_e.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),_e.multiply(e.parent.matrixWorld)),e.applyMatrix4(_e),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ae,e,Se),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ae,Me,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(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);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].updateWorldMatrix(!1,!0)}}toJSON(e){const t=void 0===e||"string"===typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const 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),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=o(e.geometries),r=o(e.materials),i=o(e.textures),a=o(e.images),s=o(e.shapes),l=o(e.skeletons),c=o(e.animations);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),s.length>0&&(n.shapes=s),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,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(let n=0;n<e.children.length;n++){const t=e.children[n];this.add(t.clone())}return this}}Pe.DefaultUp=new R(0,1,0),Pe.DefaultMatrixAutoUpdate=!0,Pe.prototype.isObject3D=!0;const Le=new R,De=new R,Ie=new R,Ne=new R,je=new R,Be=new R,Fe=new R,ze=new R,He=new R,Ue=new R;class Ve{constructor(e=new R,t=new R,n=new R){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Le.subVectors(e,t),r.cross(Le);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){Le.subVectors(r,t),De.subVectors(n,t),Ie.subVectors(e,t);const o=Le.dot(Le),a=Le.dot(De),s=Le.dot(Ie),l=De.dot(De),c=De.dot(Ie),u=o*l-a*a;if(0===u)return i.set(-2,-1,-1);const h=1/u,d=(l*s-a*c)*h,f=(o*c-a*s)*h;return i.set(1-d-f,f,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Ne),Ne.x>=0&&Ne.y>=0&&Ne.x+Ne.y<=1}static getUV(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,Ne),s.set(0,0),s.addScaledVector(i,Ne.x),s.addScaledVector(o,Ne.y),s.addScaledVector(a,Ne.z),s}static isFrontFacing(e,t,n,r){return Le.subVectors(n,t),De.subVectors(e,t),Le.cross(De).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Le.subVectors(this.c,this.b),De.subVectors(this.a,this.b),.5*Le.cross(De).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ve.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Ve.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return Ve.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return Ve.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ve.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let o,a;je.subVectors(r,n),Be.subVectors(i,n),ze.subVectors(e,n);const s=je.dot(ze),l=Be.dot(ze);if(s<=0&&l<=0)return t.copy(n);He.subVectors(e,r);const c=je.dot(He),u=Be.dot(He);if(c>=0&&u<=c)return t.copy(r);const h=s*u-c*l;if(h<=0&&s>=0&&c<=0)return o=s/(s-c),t.copy(n).addScaledVector(je,o);Ue.subVectors(e,i);const d=je.dot(Ue),f=Be.dot(Ue);if(f>=0&&d<=f)return t.copy(i);const p=d*l-s*f;if(p<=0&&l>=0&&f<=0)return a=l/(l-f),t.copy(n).addScaledVector(Be,a);const m=c*f-d*u;if(m<=0&&u-c>=0&&d-f>=0)return Fe.subVectors(i,r),a=(u-c)/(u-c+(d-f)),t.copy(r).addScaledVector(Fe,a);const g=1/(m+p+h);return o=p*g,a=h*g,t.copy(n).addScaledVector(je,o).addScaledVector(Be,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Ge=0;class We extends c{constructor(){super(),Object.defineProperty(this,"id",{value:Ge++}),this.uuid=f(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.vertexColors=!1,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.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,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.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}onBuild(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n;continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"===typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const 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.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&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.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.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,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),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.normalMapType=this.normalMapType,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,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),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,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&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.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!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.morphNormals&&(n.morphNormals=!0),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,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.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,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.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}We.prototype.isMaterial=!0;const qe={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},Xe={h:0,s:0,l:0},Ye={h:0,s:0,l:0};function Ke(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}function Qe(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Ze(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}class Je{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(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(e,t,n){return this.r=e,this.g=t,this.b=n,this}setHSL(e,t,n){if(e=m(e,1),t=p(t,0,1),n=p(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Ke(i,r,e+1/3),this.g=Ke(i,r,e),this.b=Ke(i,r,e-1/3)}return this}setStyle(e){function t(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const r=n[1],i=n[2];switch(r){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,t(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,t(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(i)){const n=parseFloat(e[1])/360,r=parseInt(e[2],10)/100,i=parseInt(e[3],10)/100;return t(e[4]),this.setHSL(n,r,i)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=n[1],t=e.length;if(3===t)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,this;if(6===t)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){const t=qe[e.toLowerCase()];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copyGammaToLinear(e,t=2){return this.r=Math.pow(e.r,t),this.g=Math.pow(e.g,t),this.b=Math.pow(e.b,t),this}copyLinearToGamma(e,t=2){const 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(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=Qe(e.r),this.g=Qe(e.g),this.b=Qe(e.b),this}copyLinearToSRGB(e){return this.r=Ze(e.r),this.g=Ze(e.g),this.b=Ze(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){const t=this.r,n=this.g,r=this.b,i=Math.max(t,n,r),o=Math.min(t,n,r);let a,s;const l=(o+i)/2;if(o===i)a=0,s=0;else{const e=i-o;switch(s=l<=.5?e/(i+o):e/(2-i-o),i){case t:a=(n-r)/e+(n<r?6:0);break;case n:a=(r-t)/e+2;break;case r:a=(t-n)/e+4}a/=6}return e.h=a,e.s=s,e.l=l,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,t,n){return this.getHSL(Xe),Xe.h+=e,Xe.s+=t,Xe.l+=n,this.setHSL(Xe.h,Xe.s,Xe.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(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(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(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}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Xe),e.getHSL(Ye);const n=g(Xe.h,Ye.h,t),r=g(Xe.s,Ye.s,t),i=g(Xe.l,Ye.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}Je.NAMES=qe,Je.prototype.isColor=!0,Je.prototype.r=1,Je.prototype.g=1,Je.prototype.b=1;class $e extends We{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Je(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.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(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.morphTargets=e.morphTargets,this}}$e.prototype.isMeshBasicMaterial=!0;const et=new R,tt=new b;class nt{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}copyColorsArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),i=new Je),t[n++]=i.r,t[n++]=i.g,t[n++]=i.b}return this}copyVector2sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),i=new b),t[n++]=i.x,t[n++]=i.y}return this}copyVector3sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),i=new R),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z}return this}copyVector4sArray(e){const t=this.array;let n=0;for(let r=0,i=e.length;r<i;r++){let i=e[r];void 0===i&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),i=new M),t[n++]=i.x,t[n++]=i.y,t[n++]=i.z,t[n++]=i.w}return this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)tt.fromBufferAttribute(this,t),tt.applyMatrix3(e),this.setXY(t,tt.x,tt.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)et.fromBufferAttribute(this,t),et.applyMatrix3(e),this.setXYZ(t,et.x,et.y,et.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.applyMatrix4(e),this.setXYZ(t,et.x,et.y,et.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.applyNormalMatrix(e),this.setXYZ(t,et.x,et.y,et.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)et.x=this.getX(t),et.y=this.getY(t),et.z=this.getZ(t),et.transformDirection(e),this.setXYZ(t,et.x,et.y,et.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){return this.array[e*this.itemSize]}setX(e,t){return this.array[e*this.itemSize]=t,this}getY(e){return this.array[e*this.itemSize+1]}setY(e,t){return this.array[e*this.itemSize+1]=t,this}getZ(e){return this.array[e*this.itemSize+2]}setZ(e,t){return this.array[e*this.itemSize+2]=t,this}getW(e){return this.array[e*this.itemSize+3]}setW(e,t){return this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(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(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(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),35044!==this.usage&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}nt.prototype.isBufferAttribute=!0;class rt extends nt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class it extends nt{constructor(e,t,n){super(new Uint32Array(e),t,n)}}(class extends nt{constructor(e,t,n){super(new Uint16Array(e),t,n)}}).prototype.isFloat16BufferAttribute=!0;class ot extends nt{constructor(e,t,n){super(new Float32Array(e),t,n)}}function at(e){if(0===e.length)return-1/0;let t=e[0];for(let n=1,r=e.length;n<r;++n)e[n]>t&&(t=e[n]);return t}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;let st=0;const lt=new se,ct=new Pe,ut=new R,ht=new L,dt=new L,ft=new R;class pt extends c{constructor(){super(),Object.defineProperty(this,"id",{value:st++}),this.uuid=f(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(at(e)>65535?it:rt)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new w).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return lt.makeRotationFromQuaternion(e),this.applyMatrix4(lt),this}rotateX(e){return lt.makeRotationX(e),this.applyMatrix4(lt),this}rotateY(e){return lt.makeRotationY(e),this.applyMatrix4(lt),this}rotateZ(e){return lt.makeRotationZ(e),this.applyMatrix4(lt),this}translate(e,t,n){return lt.makeTranslation(e,t,n),this.applyMatrix4(lt),this}scale(e,t,n){return lt.makeScale(e,t,n),this.applyMatrix4(lt),this}lookAt(e){return ct.lookAt(e),ct.updateMatrix(),this.applyMatrix4(ct.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ut).negate(),this.translate(ut.x,ut.y,ut.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new ot(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new L);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new R(-1/0,-1/0,-1/0),new R(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){const e=t[n];ht.setFromBufferAttribute(e),this.morphTargetsRelative?(ft.addVectors(this.boundingBox.min,ht.min),this.boundingBox.expandByPoint(ft),ft.addVectors(this.boundingBox.max,ht.max),this.boundingBox.expandByPoint(ft)):(this.boundingBox.expandByPoint(ht.min),this.boundingBox.expandByPoint(ht.max))}}else 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(){null===this.boundingSphere&&(this.boundingSphere=new J);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new R,1/0);if(e){const n=this.boundingSphere.center;if(ht.setFromBufferAttribute(e),t)for(let e=0,i=t.length;e<i;e++){const n=t[e];dt.setFromBufferAttribute(n),this.morphTargetsRelative?(ft.addVectors(ht.min,dt.min),ht.expandByPoint(ft),ft.addVectors(ht.max,dt.max),ht.expandByPoint(ft)):(ht.expandByPoint(dt.min),ht.expandByPoint(dt.max))}ht.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)ft.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(ft));if(t)for(let i=0,o=t.length;i<o;i++){const o=t[i],a=this.morphTargetsRelative;for(let t=0,i=o.count;t<i;t++)ft.fromBufferAttribute(o,t),a&&(ut.fromBufferAttribute(e,t),ft.add(ut)),r=Math.max(r,n.distanceToSquared(ft))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeFaceNormals(){}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new nt(new Float32Array(4*a),4));const s=t.tangent.array,l=[],c=[];for(let b=0;b<a;b++)l[b]=new R,c[b]=new R;const u=new R,h=new R,d=new R,f=new b,p=new b,m=new b,g=new R,v=new R;function y(e,t,n){u.fromArray(r,3*e),h.fromArray(r,3*t),d.fromArray(r,3*n),f.fromArray(o,2*e),p.fromArray(o,2*t),m.fromArray(o,2*n),h.sub(u),d.sub(u),p.sub(f),m.sub(f);const i=1/(p.x*m.y-m.x*p.y);isFinite(i)&&(g.copy(h).multiplyScalar(m.y).addScaledVector(d,-p.y).multiplyScalar(i),v.copy(d).multiplyScalar(p.x).addScaledVector(h,-m.x).multiplyScalar(i),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(v),c[t].add(v),c[n].add(v))}let w=this.groups;0===w.length&&(w=[{start:0,count:n.length}]);for(let b=0,M=w.length;b<M;++b){const e=w[b],t=e.start;for(let r=t,i=t+e.count;r<i;r+=3)y(n[r+0],n[r+1],n[r+2])}const x=new R,_=new R,E=new R,A=new R;function S(e){E.fromArray(i,3*e),A.copy(E);const t=l[e];x.copy(t),x.sub(E.multiplyScalar(E.dot(t))).normalize(),_.crossVectors(A,t);const n=_.dot(c[e])<0?-1:1;s[4*e]=x.x,s[4*e+1]=x.y,s[4*e+2]=x.z,s[4*e+3]=n}for(let b=0,M=w.length;b<M;++b){const e=w[b],t=e.start;for(let r=t,i=t+e.count;r<i;r+=3)S(n[r+0]),S(n[r+1]),S(n[r+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new nt(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new R,i=new R,o=new R,a=new R,s=new R,l=new R,c=new R,u=new R;if(e)for(let h=0,d=e.count;h<d;h+=3){const d=e.getX(h+0),f=e.getX(h+1),p=e.getX(h+2);r.fromBufferAttribute(t,d),i.fromBufferAttribute(t,f),o.fromBufferAttribute(t,p),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),a.fromBufferAttribute(n,d),s.fromBufferAttribute(n,f),l.fromBufferAttribute(n,p),a.add(c),s.add(c),l.add(c),n.setXYZ(d,a.x,a.y,a.z),n.setXYZ(f,s.x,s.y,s.z),n.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,h=t.count;e<h;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),o.fromBufferAttribute(t,e+2),c.subVectors(o,i),u.subVectors(r,i),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(e,t){if(!e||!e.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e);void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));const n=this.attributes;for(const r in n){if(void 0===e.attributes[r])continue;const i=n[r].array,o=e.attributes[r],a=o.array,s=o.itemSize*t,l=Math.min(a.length,i.length-s);for(let e=0,t=s;e<l;e++,t++)i[t]=a[e]}return this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ft.fromBufferAttribute(e,t),ft.normalize(),e.setXYZ(t,ft.x,ft.y,ft.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r);let a=0,s=0;for(let l=0,c=t.length;l<c;l++){a=e.isInterleavedBufferAttribute?t[l]*e.data.stride+e.offset:t[l]*r;for(let e=0;e<r;e++)o[s++]=n[a++]}return new nt(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new pt,n=this.index.array,r=this.attributes;for(const a in r){const i=e(r[a],n);t.setAttribute(a,i)}const i=this.morphAttributes;for(const a in i){const r=[],o=i[a];for(let t=0,i=o.length;t<i;t++){const i=e(o[t],n);r.push(i)}t.morphAttributes[a]=r}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let a=0,s=o.length;a<s;a++){const e=o[a];t.addGroup(e.start,e.count,e.materialIndex)}return t}toJSON(){const 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),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const s in n){const t=n[s];e.data.attributes[s]=t.toJSON(e.data)}const r={};let i=!1;for(const s in this.morphAttributes){const t=this.morphAttributes[s],n=[];for(let r=0,i=t.length;r<i;r++){const i=t[r];n.push(i.toJSON(e.data))}n.length>0&&(r[s]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new pt).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r<i;r++)e.push(n[r].clone(t));this.morphAttributes[l]=e}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let l=0,c=o.length;l<c;l++){const e=o[l];this.addGroup(e.start,e.count,e.materialIndex)}const a=e.boundingBox;null!==a&&(this.boundingBox=a.clone());const s=e.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}pt.prototype.isBufferGeometry=!0;const mt=new se,gt=new ae,vt=new J,yt=new R,bt=new R,wt=new R,xt=new R,_t=new R,Et=new R,At=new R,St=new R,Mt=new R,Tt=new b,Ct=new b,Ot=new b,Rt=new R,kt=new R;class Pt extends Pe{constructor(e=new pt,t=new $e){super(),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),vt.copy(n.boundingSphere),vt.applyMatrix4(i),!1===e.ray.intersectsSphere(vt))return;if(mt.copy(i).invert(),gt.copy(e.ray).applyMatrix4(mt),null!==n.boundingBox&&!1===gt.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position,s=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,u=n.attributes.uv2,h=n.groups,d=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,f=h.length;n<f;n++){const f=h[n],p=r[f.materialIndex];for(let n=Math.max(f.start,d.start),r=Math.min(f.start+f.count,d.start+d.count);n<r;n+=3){const r=i.getX(n),h=i.getX(n+1),d=i.getX(n+2);o=Lt(this,p,e,gt,a,s,l,c,u,r,h,d),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=f.materialIndex,t.push(o))}}else{for(let n=Math.max(0,d.start),h=Math.min(i.count,d.start+d.count);n<h;n+=3){const h=i.getX(n),d=i.getX(n+1),f=i.getX(n+2);o=Lt(this,r,e,gt,a,s,l,c,u,h,d,f),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}else if(void 0!==a)if(Array.isArray(r))for(let n=0,f=h.length;n<f;n++){const i=h[n],f=r[i.materialIndex];for(let n=Math.max(i.start,d.start),r=Math.min(i.start+i.count,d.start+d.count);n<r;n+=3){o=Lt(this,f,e,gt,a,s,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),o.face.materialIndex=i.materialIndex,t.push(o))}}else{for(let n=Math.max(0,d.start),i=Math.min(a.count,d.start+d.count);n<i;n+=3){o=Lt(this,r,e,gt,a,s,l,c,u,n,n+1,n+2),o&&(o.faceIndex=Math.floor(n/3),t.push(o))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}function Lt(e,t,n,r,i,o,s,l,c,u,h,d){yt.fromBufferAttribute(i,u),bt.fromBufferAttribute(i,h),wt.fromBufferAttribute(i,d);const f=e.morphTargetInfluences;if(t.morphTargets&&o&&f){At.set(0,0,0),St.set(0,0,0),Mt.set(0,0,0);for(let e=0,t=o.length;e<t;e++){const t=f[e],n=o[e];0!==t&&(xt.fromBufferAttribute(n,u),_t.fromBufferAttribute(n,h),Et.fromBufferAttribute(n,d),s?(At.addScaledVector(xt,t),St.addScaledVector(_t,t),Mt.addScaledVector(Et,t)):(At.addScaledVector(xt.sub(yt),t),St.addScaledVector(_t.sub(bt),t),Mt.addScaledVector(Et.sub(wt),t)))}yt.add(At),bt.add(St),wt.add(Mt)}e.isSkinnedMesh&&(e.boneTransform(u,yt),e.boneTransform(h,bt),e.boneTransform(d,wt));const p=function(e,t,n,r,i,o,s,l){let c;if(c=t.side===a?r.intersectTriangle(s,o,i,!0,l):r.intersectTriangle(i,o,s,2!==t.side,l),null===c)return null;kt.copy(l),kt.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(kt);return u<n.near||u>n.far?null:{distance:u,point:kt.clone(),object:e}}(e,t,n,r,yt,bt,wt,Rt);if(p){l&&(Tt.fromBufferAttribute(l,u),Ct.fromBufferAttribute(l,h),Ot.fromBufferAttribute(l,d),p.uv=Ve.getUV(Rt,yt,bt,wt,Tt,Ct,Ot,new b)),c&&(Tt.fromBufferAttribute(c,u),Ct.fromBufferAttribute(c,h),Ot.fromBufferAttribute(c,d),p.uv2=Ve.getUV(Rt,yt,bt,wt,Tt,Ct,Ot,new b));const e={a:u,b:h,c:d,normal:new R,materialIndex:0};Ve.getNormal(yt,bt,wt,e.normal),p.face=e}return p}Pt.prototype.isMesh=!0;class Dt extends pt{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const a=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const s=[],l=[],c=[],u=[];let h=0,d=0;function f(e,t,n,r,i,o,f,p,m,g,v){const y=o/m,b=f/g,w=o/2,x=f/2,_=p/2,E=m+1,A=g+1;let S=0,M=0;const T=new R;for(let a=0;a<A;a++){const o=a*b-x;for(let s=0;s<E;s++){const h=s*y-w;T[e]=h*r,T[t]=o*i,T[n]=_,l.push(T.x,T.y,T.z),T[e]=0,T[t]=0,T[n]=p>0?1:-1,c.push(T.x,T.y,T.z),u.push(s/m),u.push(1-a/g),S+=1}}for(let a=0;a<g;a++)for(let e=0;e<m;e++){const t=h+e+E*a,n=h+e+E*(a+1),r=h+(e+1)+E*(a+1),i=h+(e+1)+E*a;s.push(t,n,i),s.push(n,r,i),M+=6}a.addGroup(d,M,v),d+=M,h+=S}f("z","y","x",-1,-1,n,t,e,o,i,0),f("z","y","x",1,-1,n,t,-e,o,i,1),f("x","z","y",1,1,e,n,t,r,o,2),f("x","z","y",1,-1,e,n,-t,r,o,3),f("x","y","z",1,-1,e,t,n,r,i,4),f("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new ot(l,3)),this.setAttribute("normal",new ot(c,3)),this.setAttribute("uv",new ot(u,2))}static fromJSON(e){return new Dt(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function It(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function Nt(e){const t={};for(let n=0;n<e.length;n++){const r=It(e[n]);for(const e in r)t[e]=r[e]}return t}const jt={clone:It,merge:Nt};class Bt extends We{constructor(e){super(),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.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,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=It(e.uniforms),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.lights=e.lights,this.clipping=e.clipping,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const n=this.uniforms[r].value;n&&n.isTexture?t.uniforms[r]={type:"t",value:n.toJSON(e).uuid}:n&&n.isColor?t.uniforms[r]={type:"c",value:n.getHex()}:n&&n.isVector2?t.uniforms[r]={type:"v2",value:n.toArray()}:n&&n.isVector3?t.uniforms[r]={type:"v3",value:n.toArray()}:n&&n.isVector4?t.uniforms[r]={type:"v4",value:n.toArray()}:n&&n.isMatrix3?t.uniforms[r]={type:"m3",value:n.toArray()}:n&&n.isMatrix4?t.uniforms[r]={type:"m4",value:n.toArray()}:t.uniforms[r]={value:n}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}Bt.prototype.isShaderMaterial=!0;class Ft extends Pe{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new se,this.projectionMatrix=new se,this.projectionMatrixInverse=new se}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}Ft.prototype.isCamera=!0;class zt extends Ft{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(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(e){const t=.5*this.getFilmHeight()/e;this.fov=2*d*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*h*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*d*Math.atan(Math.tan(.5*h*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(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(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*h*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,a=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/a,r*=o.width/e,n*=o.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(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}}zt.prototype.isPerspectiveCamera=!0;class Ht extends Pe{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new zt(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new R(1,0,0)),this.add(r);const i=new zt(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new R(-1,0,0)),this.add(i);const o=new zt(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new R(0,1,0)),this.add(o);const a=new zt(90,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new R(0,-1,0)),this.add(a);const s=new zt(90,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new R(0,0,1)),this.add(s);const l=new zt(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new R(0,0,-1)),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,a,s,l]=this.children,c=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=c}}class Ut extends A{constructor(e,t,n,r,i,o,a,s,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:301,n,r,i,o,a=void 0!==a?a:1022,s,l,c),this._needsFlipEnvMap=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}Ut.prototype.isCubeTexture=!0;class Vt extends T{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new Ut(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:s,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=l,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new Dt(5,5,5),i=new Bt({name:"CubemapFromEquirect",uniforms:It(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:a,blending:0});i.uniforms.tEquirect.value=t;const o=new Pt(r,i),c=t.minFilter;1008===t.minFilter&&(t.minFilter=s);return new Ht(1,10,this).update(e,o),t.minFilter=c,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(i)}}Vt.prototype.isWebGLCubeRenderTarget=!0;const Gt=new R,Wt=new R,qt=new w;class Xt{constructor(e=new R(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=Gt.subVectors(n,t).cross(Wt.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(Gt),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||qt.getNormalMatrix(e),r=this.coplanarPoint(Gt).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}Xt.prototype.isPlane=!0;const Yt=new J,Kt=new R;class Qt{constructor(e=new Xt,t=new Xt,n=new Xt,r=new Xt,i=new Xt,o=new Xt){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const 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}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(a-r,u-s,p-h,y-m).normalize(),t[1].setComponents(a+r,u+s,p+h,y+m).normalize(),t[2].setComponents(a+i,u+l,p+d,y+g).normalize(),t[3].setComponents(a-i,u-l,p-d,y-g).normalize(),t[4].setComponents(a-o,u-c,p-f,y-v).normalize(),t[5].setComponents(a+o,u+c,p+f,y+v).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),Yt.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Yt)}intersectsSprite(e){return Yt.center.set(0,0,0),Yt.radius=.7071067811865476,Yt.applyMatrix4(e.matrixWorld),this.intersectsSphere(Yt)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n)<r)return!1}return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Kt.x=r.normal.x>0?e.max.x:e.min.x,Kt.y=r.normal.y>0?e.max.y:e.min.y,Kt.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Kt)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Zt(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Jt(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const o=r.get(t);void 0===o?r.set(t,function(t,r){const i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();let s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:(i instanceof Uint8Array||i instanceof Uint8ClampedArray)&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):o.version<t.version&&(!function(t,r,i){const o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(o.buffer,t,i),o.version=t.version)}}}class $t extends pt{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,o=t/2,a=Math.floor(n),s=Math.floor(r),l=a+1,c=s+1,u=e/a,h=t/s,d=[],f=[],p=[],m=[];for(let g=0;g<c;g++){const e=g*h-o;for(let t=0;t<l;t++){const n=t*u-i;f.push(n,-e,0),p.push(0,0,1),m.push(t/a),m.push(1-g/s)}}for(let g=0;g<s;g++)for(let e=0;e<a;e++){const t=e+l*g,n=e+l*(g+1),r=e+1+l*(g+1),i=e+1+l*g;d.push(t,n,i),d.push(n,r,i)}this.setIndex(d),this.setAttribute("position",new ot(f,3)),this.setAttribute("normal",new ot(p,3)),this.setAttribute("uv",new ot(m,2))}static fromJSON(e){return new $t(e.width,e.height,e.widthSegments,e.heightSegments)}}const en={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\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.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\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.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSNMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n\tvec3 v = normalize( cameraPosition - pos );\n\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n\tvec3 transmission = transmissionFactor * getIBLVolumeRefraction(\n\t\tnormal, v, roughnessFactor, material.diffuseColor, totalSpecular,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec4 vWorldPosition;\n\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n\t\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\n\t\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\n\t\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\n\t\treturn normalize(refractionVector) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness(float roughness, float ior) {\n\t\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n\t}\n\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n\t\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n\t\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n\t}\n\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n\t\tif (attenuationDistance == 0.0) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n\t\t\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\n\t\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n\t\tvec3 attenuationColor, float attenuationDistance) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n\t\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n\t\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform vec3 attenuationColor;\n\tuniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <transmission_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#ifdef USE_TRANSMISSION\n\tvarying vec4 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition;\n#endif\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},tn={common:{diffuse:{value:new Je(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new w},uv2Transform:{value:new w},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},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 b(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 Je(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Je(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new w}},sprite:{diffuse:{value:new Je(16777215)},opacity:{value:1},center:{value:new b(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new w}}},nn={basic:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.fog]),vertexShader:en.meshbasic_vert,fragmentShader:en.meshbasic_frag},lambert:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.fog,tn.lights,{emissive:{value:new Je(0)}}]),vertexShader:en.meshlambert_vert,fragmentShader:en.meshlambert_frag},phong:{uniforms:Nt([tn.common,tn.specularmap,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.fog,tn.lights,{emissive:{value:new Je(0)},specular:{value:new Je(1118481)},shininess:{value:30}}]),vertexShader:en.meshphong_vert,fragmentShader:en.meshphong_frag},standard:{uniforms:Nt([tn.common,tn.envmap,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.roughnessmap,tn.metalnessmap,tn.fog,tn.lights,{emissive:{value:new Je(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:en.meshphysical_vert,fragmentShader:en.meshphysical_frag},toon:{uniforms:Nt([tn.common,tn.aomap,tn.lightmap,tn.emissivemap,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.gradientmap,tn.fog,tn.lights,{emissive:{value:new Je(0)}}]),vertexShader:en.meshtoon_vert,fragmentShader:en.meshtoon_frag},matcap:{uniforms:Nt([tn.common,tn.bumpmap,tn.normalmap,tn.displacementmap,tn.fog,{matcap:{value:null}}]),vertexShader:en.meshmatcap_vert,fragmentShader:en.meshmatcap_frag},points:{uniforms:Nt([tn.points,tn.fog]),vertexShader:en.points_vert,fragmentShader:en.points_frag},dashed:{uniforms:Nt([tn.common,tn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:en.linedashed_vert,fragmentShader:en.linedashed_frag},depth:{uniforms:Nt([tn.common,tn.displacementmap]),vertexShader:en.depth_vert,fragmentShader:en.depth_frag},normal:{uniforms:Nt([tn.common,tn.bumpmap,tn.normalmap,tn.displacementmap,{opacity:{value:1}}]),vertexShader:en.normal_vert,fragmentShader:en.normal_frag},sprite:{uniforms:Nt([tn.sprite,tn.fog]),vertexShader:en.sprite_vert,fragmentShader:en.sprite_frag},background:{uniforms:{uvTransform:{value:new w},t2D:{value:null}},vertexShader:en.background_vert,fragmentShader:en.background_frag},cube:{uniforms:Nt([tn.envmap,{opacity:{value:1}}]),vertexShader:en.cube_vert,fragmentShader:en.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:en.equirect_vert,fragmentShader:en.equirect_frag},distanceRGBA:{uniforms:Nt([tn.common,tn.displacementmap,{referencePosition:{value:new R},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:en.distanceRGBA_vert,fragmentShader:en.distanceRGBA_frag},shadow:{uniforms:Nt([tn.lights,tn.fog,{color:{value:new Je(0)},opacity:{value:1}}]),vertexShader:en.shadow_vert,fragmentShader:en.shadow_frag}};function rn(e,t,n,r,i){const o=new Je(0);let s,l,c=0,u=null,h=0,d=null;function f(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),c=t,f(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,f(o,c)},render:function(n,i){let p=!1,m=!0===i.isScene?i.background:null;m&&m.isTexture&&(m=t.get(m));const g=e.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?f(o,c):m&&m.isColor&&(f(m,1),p=!0),(e.autoClear||p)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||306===m.mapping)?(void 0===l&&(l=new Pt(new Dt(1,1,1),new Bt({name:"BackgroundCubeMaterial",uniforms:It(nn.cube.uniforms),vertexShader:nn.cube.vertexShader,fragmentShader:nn.cube.fragmentShader,side:a,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),l.material.uniforms.envMap.value=m,l.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m._needsFlipEnvMap?-1:1,u===m&&h===m.version&&d===e.toneMapping||(l.material.needsUpdate=!0,u=m,h=m.version,d=e.toneMapping),n.unshift(l,l.geometry,l.material,0,0,null)):m&&m.isTexture&&(void 0===s&&(s=new Pt(new $t(2,2),new Bt({name:"BackgroundMaterial",uniforms:It(nn.background.uniforms),vertexShader:nn.background.vertexShader,fragmentShader:nn.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),s.geometry.deleteAttribute("normal"),Object.defineProperty(s.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(s)),s.material.uniforms.t2D.value=m,!0===m.matrixAutoUpdate&&m.updateMatrix(),s.material.uniforms.uvTransform.value.copy(m.matrix),u===m&&h===m.version&&d===e.toneMapping||(s.material.needsUpdate=!0,u=m,h=m.version,d=e.toneMapping),n.unshift(s,s.geometry,s.material,0,0,null))}}}function on(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},l=d(null);let c=l;function u(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function d(e){const t=[],n=[],r=[];for(let o=0;o<i;o++)t[o]=0,n[o]=0,r[o]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function p(e){m(e,0)}function m(n,i){const o=c.newAttributes,a=c.enabledAttributes,s=c.attributeDivisors;if(o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i){(r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i}}function g(){const t=c.newAttributes,n=c.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function y(){b(),c!==l&&(c=l,u(c.object))}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,y,b){let w=!1;if(a){const t=function(t,n,i){const a=!0===i.wireframe;let l=s[t.id];void 0===l&&(l={},s[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[a];void 0===u&&(u=d(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[a]=u);return u}(y,h,l);c!==t&&(c=t,u(c.object)),w=function(e,t){const n=c.attributes,r=e.attributes;let i=0;for(const o in r){const e=n[o],t=r[o];if(void 0===e)return!0;if(e.attribute!==t)return!0;if(e.data!==t.data)return!0;i++}return c.attributesNum!==i||c.index!==t}(y,b),w&&function(e,t){const n={},r=e.attributes;let i=0;for(const o in r){const e=r[o],t={};t.attribute=e,e.data&&(t.data=e.data),n[o]=t,i++}c.attributes=n,c.attributesNum=i,c.index=t}(y,b)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===e||(c.geometry=y.id,c.program=h.id,c.wireframe=e,w=!0)}!0===i.isInstancedMesh&&(w=!0),null!==b&&n.update(b,34963),w&&(!function(i,o,a,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=s.attributes,c=a.getAttributes(),u=o.defaultAttributeValues;for(const t in c){const r=c[t];if(r>=0){const o=l[t];if(void 0!==o){const t=o.normalized,i=o.itemSize,a=n.get(o);if(void 0===a)continue;const l=a.buffer,c=a.type,u=a.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,a=n.stride,h=o.offset;n&&n.isInstancedInterleavedBuffer?(m(r,n.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)):p(r),e.bindBuffer(34962,l),v(r,i,c,t,a*u,h*u)}else o.isInstancedBufferAttribute?(m(r,o.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=o.meshPerAttribute*o.count)):p(r),e.bindBuffer(34962,l),v(r,i,c,t,0,0)}else if("instanceMatrix"===t){const t=n.get(i.instanceMatrix);if(void 0===t)continue;const o=t.buffer,a=t.type;m(r+0,1),m(r+1,1),m(r+2,1),m(r+3,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r+0,4,a,!1,64,0),e.vertexAttribPointer(r+1,4,a,!1,64,16),e.vertexAttribPointer(r+2,4,a,!1,64,32),e.vertexAttribPointer(r+3,4,a,!1,64,48)}else if("instanceColor"===t){const t=n.get(i.instanceColor);if(void 0===t)continue;const o=t.buffer,a=t.type;m(r,1),e.bindBuffer(34962,o),e.vertexAttribPointer(r,3,a,!1,12,0)}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r,n);break;case 3:e.vertexAttrib3fv(r,n);break;case 4:e.vertexAttrib4fv(r,n);break;default:e.vertexAttrib1fv(r,n)}}}}g()}(i,l,h,y),null!==b&&e.bindBuffer(34963,n.get(b).buffer))},reset:y,resetDefaultState:b,dispose:function(){y();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0===s[e.id])return;const t=s[e.id];for(const n in t){const e=t[n];for(const t in e)h(e[t].object),delete e[t];delete t[n]}delete s[e.id]},releaseStatesOfProgram:function(e){for(const t in s){const n=s[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)h(r[e].object),delete r[e];delete n[e.id]}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:g}}function an(e,t,n,r){const i=r.isWebGL2;let o;this.setMode=function(e){o=e},this.render=function(t,r){e.drawArrays(o,t,r),n.update(r,o,1)},this.renderInstances=function(r,a,s){if(0===s)return;let l,c;if(i)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](o,r,a,s),n.update(a,o,s)}}function sn(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let a=void 0!==n.precision?n.precision:"highp";const s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);const l=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),h=e.getParameter(35660),d=e.getParameter(3379),f=e.getParameter(34076),p=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),v=e.getParameter(36349),y=h>0,b=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:y&&b,maxSamples:o?e.getParameter(36183):0}}function ln(e){const t=this;let n=null,r=0,i=!1,o=!1;const a=new Xt,s=new w,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=l.value,!0!==i||null===c){const t=r+4*o,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let n=0,l=r;n!==o;++n,l+=4)a.copy(e[n]).applyMatrix4(i,s),a.normal.toArray(c,l),c[l+3]=a.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){const a=0!==e.length||t||0!==r||i;return i=t,n=u(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,a,s){const h=t.clippingPlanes,d=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===h||0===h.length||o&&!f)o?u(null):c();else{const e=o?0:r,t=4*e;let i=p.clippingState||null;l.value=i,i=u(h,a,t,s);for(let r=0;r!==t;++r)i[r]=n[r];p.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function cn(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping;if(303===o||304===o){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const a=e.getRenderTarget(),s=new Vt(o.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),e.setRenderTarget(a),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}function un(e){const t={};function n(n){if(void 0!==t[n])return t[n];let 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;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function hn(e,t,n,r){const i={},o=new WeakMap;function a(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const n in s.attributes)t.remove(s.attributes[n]);s.removeEventListener("dispose",a),delete i[s.id];const l=o.get(s);l&&(t.remove(l),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){const n=[],r=e.index,i=e.attributes.position;let a=0;if(null!==r){const e=r.array;a=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],o=e[t+2];n.push(r,i,i,o,o,r)}}else{const e=i.array;a=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const s=new(at(n)>65535?it:rt)(n,1);s.version=a;const l=o.get(e);l&&t.remove(l),o.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const i in n)t.update(n[i],34962);const r=e.morphAttributes;for(const i in r){const e=r[i];for(let n=0,r=e.length;n<r;n++)t.update(e[n],34962)}},getWireframeAttribute:function(e){const t=o.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function dn(e,t,n,r){const i=r.isWebGL2;let o,a,s;this.setMode=function(e){o=e},this.setIndex=function(e){a=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(o,r,a,t*s),n.update(r,o,1)},this.renderInstances=function(r,l,c){if(0===c)return;let u,h;if(i)u=e,h="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),h="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[h](o,l,a,r*s,c),n.update(l,o,c)}}function fn(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function pn(e,t){return e[0]-t[0]}function mn(e,t){return Math.abs(t[1])-Math.abs(e[1])}function gn(e){const t={},n=new Float32Array(8),r=[];for(let i=0;i<8;i++)r[i]=[i,0];return{update:function(i,o,a,s){const l=i.morphTargetInfluences,c=void 0===l?0:l.length;let u=t[o.id];if(void 0===u||u.length!==c){u=[];for(let e=0;e<c;e++)u[e]=[e,0];t[o.id]=u}for(let e=0;e<c;e++){const t=u[e];t[0]=e,t[1]=l[e]}u.sort(mn);for(let e=0;e<8;e++)e<c&&u[e][1]?(r[e][0]=u[e][0],r[e][1]=u[e][1]):(r[e][0]=Number.MAX_SAFE_INTEGER,r[e][1]=0);r.sort(pn);const h=a.morphTargets&&o.morphAttributes.position,d=a.morphNormals&&o.morphAttributes.normal;let f=0;for(let e=0;e<8;e++){const t=r[e],i=t[0],a=t[1];i!==Number.MAX_SAFE_INTEGER&&a?(h&&o.getAttribute("morphTarget"+e)!==h[i]&&o.setAttribute("morphTarget"+e,h[i]),d&&o.getAttribute("morphNormal"+e)!==d[i]&&o.setAttribute("morphNormal"+e,d[i]),n[e]=a,f+=a):(h&&!0===o.hasAttribute("morphTarget"+e)&&o.deleteAttribute("morphTarget"+e),d&&!0===o.hasAttribute("morphNormal"+e)&&o.deleteAttribute("morphNormal"+e),n[e]=0)}const p=o.morphTargetsRelative?1:1-f;s.getUniforms().setValue(e,"morphTargetBaseInfluence",p),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function vn(e,t,n,r){let i=new WeakMap;function o(e){const t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const a=r.render.frame,s=e.geometry,l=t.get(e,s);return i.get(l)!==a&&(t.update(l),i.set(l,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}nn.physical={uniforms:Nt([nn.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new b(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Je(0)},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new b},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Je(0)}}]),vertexShader:en.meshphysical_vert,fragmentShader:en.meshphysical_frag};class yn extends A{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}yn.prototype.isDataTexture2DArray=!0;class bn extends A{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}bn.prototype.isDataTexture3D=!0;const wn=new A,xn=new yn,_n=new bn,En=new Ut,An=[],Sn=[],Mn=new Float32Array(16),Tn=new Float32Array(9),Cn=new Float32Array(4);function On(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let o=An[i];if(void 0===o&&(o=new Float32Array(i),An[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function Rn(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function kn(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function Pn(e,t){let n=Sn[t];void 0===n&&(n=new Int32Array(t),Sn[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function Ln(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Dn(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(Rn(n,t))return;e.uniform2fv(this.addr,t),kn(n,t)}}function In(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(Rn(n,t))return;e.uniform3fv(this.addr,t),kn(n,t)}}function Nn(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(Rn(n,t))return;e.uniform4fv(this.addr,t),kn(n,t)}}function jn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Cn.set(r),e.uniformMatrix2fv(this.addr,!1,Cn),kn(n,r)}}function Bn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Tn.set(r),e.uniformMatrix3fv(this.addr,!1,Tn),kn(n,r)}}function Fn(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(Rn(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),kn(n,t)}else{if(Rn(n,r))return;Mn.set(r),e.uniformMatrix4fv(this.addr,!1,Mn),kn(n,r)}}function zn(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Hn(e,t){const n=this.cache;Rn(n,t)||(e.uniform2iv(this.addr,t),kn(n,t))}function Un(e,t){const n=this.cache;Rn(n,t)||(e.uniform3iv(this.addr,t),kn(n,t))}function Vn(e,t){const n=this.cache;Rn(n,t)||(e.uniform4iv(this.addr,t),kn(n,t))}function Gn(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function Wn(e,t){const n=this.cache;Rn(n,t)||(e.uniform2uiv(this.addr,t),kn(n,t))}function qn(e,t){const n=this.cache;Rn(n,t)||(e.uniform3uiv(this.addr,t),kn(n,t))}function Xn(e,t){const n=this.cache;Rn(n,t)||(e.uniform4uiv(this.addr,t),kn(n,t))}function Yn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||wn,i)}function Kn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||_n,i)}function Qn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||En,i)}function Zn(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||xn,i)}function Jn(e,t){e.uniform1fv(this.addr,t)}function $n(e,t){const n=On(t,this.size,2);e.uniform2fv(this.addr,n)}function er(e,t){const n=On(t,this.size,3);e.uniform3fv(this.addr,n)}function tr(e,t){const n=On(t,this.size,4);e.uniform4fv(this.addr,n)}function nr(e,t){const n=On(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function rr(e,t){const n=On(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function ir(e,t){const n=On(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function or(e,t){e.uniform1iv(this.addr,t)}function ar(e,t){e.uniform2iv(this.addr,t)}function sr(e,t){e.uniform3iv(this.addr,t)}function lr(e,t){e.uniform4iv(this.addr,t)}function cr(e,t){e.uniform1uiv(this.addr,t)}function ur(e,t){e.uniform2uiv(this.addr,t)}function hr(e,t){e.uniform3uiv(this.addr,t)}function dr(e,t){e.uniform4uiv(this.addr,t)}function fr(e,t,n){const r=t.length,i=Pn(n,r);e.uniform1iv(this.addr,i);for(let o=0;o!==r;++o)n.safeSetTexture2D(t[o]||wn,i[o])}function pr(e,t,n){const r=t.length,i=Pn(n,r);e.uniform1iv(this.addr,i);for(let o=0;o!==r;++o)n.safeSetTextureCube(t[o]||En,i[o])}function mr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Ln;case 35664:return Dn;case 35665:return In;case 35666:return Nn;case 35674:return jn;case 35675:return Bn;case 35676:return Fn;case 5124:case 35670:return zn;case 35667:case 35671:return Hn;case 35668:case 35672:return Un;case 35669:case 35673:return Vn;case 5125:return Gn;case 36294:return Wn;case 36295:return qn;case 36296:return Xn;case 35678:case 36198:case 36298:case 36306:case 35682:return Yn;case 35679:case 36299:case 36307:return Kn;case 35680:case 36300:case 36308:case 36293:return Qn;case 36289:case 36303:case 36311:case 36292:return Zn}}(t.type)}function gr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Jn;case 35664:return $n;case 35665:return er;case 35666:return tr;case 35674:return nr;case 35675:return rr;case 35676:return ir;case 5124:case 35670:return or;case 35667:case 35671:return ar;case 35668:case 35672:return sr;case 35669:case 35673:return lr;case 5125:return cr;case 36294:return ur;case 36295:return hr;case 36296:return dr;case 35678:case 36198:case 36298:case 36306:case 35682:return fr;case 35680:case 36300:case 36308:case 36293:return pr}}(t.type)}function vr(e){this.id=e,this.seq=[],this.map={}}gr.prototype.updateCache=function(e){const t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),kn(t,e)},vr.prototype.setValue=function(e,t,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(e,t[o.id],n)}};const yr=/(\w+)(\])?(\[|\.)?/g;function br(e,t){e.seq.push(t),e.map[t.id]=t}function wr(e,t,n){const r=e.name,i=r.length;for(yr.lastIndex=0;;){const o=yr.exec(r),a=yr.lastIndex;let s=o[1];const l="]"===o[2],c=o[3];if(l&&(s|=0),void 0===c||"["===c&&a+2===i){br(n,void 0===c?new mr(s,e,t):new gr(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new vr(s),br(n,e)),n=e}}}function xr(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);wr(n,e.getUniformLocation(t,n.name),this)}}function _r(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}xr.prototype.setValue=function(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)},xr.prototype.setOptional=function(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)},xr.upload=function(e,t,n,r){for(let i=0,o=t.length;i!==o;++i){const o=t[i],a=n[o.id];!1!==a.needsUpdate&&o.setValue(e,a.value,r)}},xr.seqWithValue=function(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n};let Er=0;function Ar(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 ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Sr(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";return"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(e){const t=e.split("\n");for(let n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(e.getShaderSource(t))}function Mr(e,t){const n=Ar(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Tr(e,t){const n=Ar(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Cr(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Or(e){return""!==e}function Rr(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).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function kr(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Pr=/^[ \t]*#include +<([\w\d./]+)>/gm;function Lr(e){return e.replace(Pr,Dr)}function Dr(e,t){const n=en[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Lr(n)}const Ir=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Nr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function jr(e){return e.replace(Nr,Fr).replace(Ir,Br)}function Br(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Fr(e,t,n,r)}function Fr(e,t,n,r){let i="";for(let o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function zr(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Hr(e,t,n,r){const i=e.getContext(),o=n.defines;let a=n.vertexShader,s=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),u=function(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case 302:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),h=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),d=e.gammaFactor>0?e.gammaFactor:1,f=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission>0)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Or).join("\n")}(n),p=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(o),m=i.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=[p].filter(Or).join("\n"),g.length>0&&(g+="\n"),v=[f,p].filter(Or).join("\n"),v.length>0&&(v+="\n")):(g=[zr(n),"#define SHADER_NAME "+n.shaderName,p,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+d,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( 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(Or).join("\n"),v=[f,zr(n),"#define SHADER_NAME "+n.shaderName,p,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+d,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?en.tonemapping_pars_fragment:"",0!==n.toneMapping?Cr("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",en.encodings_pars_fragment,n.map?Mr("mapTexelToLinear",n.mapEncoding):"",n.matcap?Mr("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Mr("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Mr("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?Mr("lightMapTexelToLinear",n.lightMapEncoding):"",Tr("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Or).join("\n")),a=Lr(a),a=Rr(a,n),a=kr(a,n),s=Lr(s),s=Rr(s,n),s=kr(s,n),a=jr(a),s=jr(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in","300 es"===n.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+v);const b=y+v+s,w=_r(i,35633,y+g+a),x=_r(i,35632,b);if(i.attachShader(m,w),i.attachShader(m,x),void 0!==n.index0AttributeName?i.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(m).trim(),t=i.getShaderInfoLog(w).trim(),n=i.getShaderInfoLog(x).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(m,35714)){r=!1;const t=Sr(i,w,"vertex"),n=Sr(i,x,"fragment");console.error("THREE.WebGLProgram: shader error: ",i.getError(),"35715",i.getProgramParameter(m,35715),"gl.getProgramInfoLog",e,t,n)}else""!==e?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:g},fragmentShader:{log:n,prefix:v}})}let _,E;return i.deleteShader(w),i.deleteShader(x),this.getUniforms=function(){return void 0===_&&(_=new xr(i,m)),_},this.getAttributes=function(){return void 0===E&&(E=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i).name;n[r]=e.getAttribLocation(t,r)}return n}(i,m)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.name=n.shaderName,this.id=Er++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=w,this.fragmentShader=x,this}function Ur(e,t,n,r,i,o){const s=[],l=r.isWebGL2,c=r.logarithmicDepthBuffer,u=r.floatVertexTextures,h=r.maxVertexUniforms,d=r.vertexTextures;let f=r.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmission","transmissionMap","thicknessMap"];function g(e){let t;return e&&e.isTexture?t=e.encoding:e&&e.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=3e3,t}return{getParameters:function(i,s,m,v,y){const b=v.fog,w=i.isMeshStandardMaterial?v.environment:null,x=t.get(i.envMap||w),_=p[i.type],E=y.isSkinnedMesh?function(e){const t=e.skeleton.bones;if(u)return 1024;{const e=h,n=Math.floor((e-20)/4),r=Math.min(n,t.length);return r<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+r+"."),0):r}}(y):0;let A,S;if(null!==i.precision&&(f=r.getMaxPrecision(i.precision),f!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",f,"instead.")),_){const e=nn[_];A=e.vertexShader,S=e.fragmentShader}else A=i.vertexShader,S=i.fragmentShader;const M=e.getRenderTarget();return{isWebGL2:l,shaderID:_,shaderName:i.type,vertexShader:A,fragmentShader:S,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:f,instancing:!0===y.isInstancedMesh,instancingColor:!0===y.isInstancedMesh&&null!==y.instanceColor,supportsVertexTextures:d,outputEncoding:null!==M?g(M.texture):e.outputEncoding,map:!!i.map,mapEncoding:g(i.map),matcap:!!i.matcap,matcapEncoding:g(i.matcap),envMap:!!x,envMapMode:x&&x.mapping,envMapEncoding:g(x),envMapCubeUV:!!x&&(306===x.mapping||307===x.mapping),lightMap:!!i.lightMap,lightMapEncoding:g(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:g(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:1===i.normalMapType,tangentSpaceNormalMap:0===i.normalMapType,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmission:!!i.transmission,transmissionMap:!!i.transmissionMap,thicknessMap:!!i.thicknessMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexAlphas:!0===i.vertexColors&&y.geometry&&y.geometry.attributes.color&&4===y.geometry.attributes.color.itemSize,vertexUvs:!!i.map||!!i.bumpMap||!!i.normalMap||!!i.specularMap||!!i.alphaMap||!!i.emissiveMap||!!i.roughnessMap||!!i.metalnessMap||!!i.clearcoatMap||!!i.clearcoatRoughnessMap||!!i.clearcoatNormalMap||!!i.displacementMap||!!i.transmissionMap||!!i.thicknessMap,uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmission||i.transmissionMap||i.thicknessMap)&&!!i.displacementMap,fog:!!b,useFog:i.fog,fogExp2:b&&b.isFogExp2,flatShading:!!i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:c,skinning:!0===y.isSkinnedMesh&&E>0,maxBones:E,useVertexTexture:u,morphTargets:i.morphTargets,morphNormals:i.morphNormals,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&m.length>0,shadowMapType:e.shadowMap.type,toneMapping:i.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:2===i.side,flipSided:i.side===a,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);if(!1===t.isRawShaderMaterial){for(let e=0;e<m.length;e++)n.push(t[m[e]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=p[e.type];let n;if(t){const e=nn[t];n=jt.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,i=s.length;e<i;e++){const t=s[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Hr(e,n,t,i),s.push(r)),r},releaseProgram:function(e){if(0===--e.usedTimes){const t=s.indexOf(e);s[t]=s[s.length-1],s.pop(),e.destroy()}},programs:s}}function Vr(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Gr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder: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 Wr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function qr(e){const t=[];let n=0;const r=[],i=[],o=[],a={id:-1};function s(r,i,o,s,l,c){let u=t[n];const h=e.get(o);return void 0===u?(u={id:r.id,object:r,geometry:i,material:o,program:h.program||a,groupOrder:s,renderOrder:r.renderOrder,z:l,group:c},t[n]=u):(u.id=r.id,u.object=r,u.geometry=i,u.material=o,u.program=h.program||a,u.groupOrder=s,u.renderOrder=r.renderOrder,u.z=l,u.group=c),n++,u}return{opaque:r,transmissive:i,transparent:o,init:function(){n=0,r.length=0,i.length=0,o.length=0},push:function(e,t,n,a,l,c){const u=s(e,t,n,a,l,c);n.transmission>0?i.push(u):!0===n.transparent?o.push(u):r.push(u)},unshift:function(e,t,n,a,l,c){const u=s(e,t,n,a,l,c);n.transmission>0?i.unshift(u):!0===n.transparent?o.unshift(u):r.unshift(u)},finish:function(){for(let e=n,r=t.length;e<r;e++){const n=t[e];if(null===n.id)break;n.id=null,n.object=null,n.geometry=null,n.material=null,n.program=null,n.group=null}},sort:function(e,t){r.length>1&&r.sort(e||Gr),i.length>1&&i.sort(t||Wr),o.length>1&&o.sort(t||Wr)}}}function Xr(e){let t=new WeakMap;return{get:function(n,r){let i;return!1===t.has(n)?(i=new qr(e),t.set(n,[i])):r>=t.get(n).length?(i=new qr(e),t.get(n).push(i)):i=t.get(n)[r],i},dispose:function(){t=new WeakMap}}}function Yr(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new R,color:new Je};break;case"SpotLight":n={position:new R,direction:new R,color:new Je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new R,color:new Je,distance:0,decay:0};break;case"HemisphereLight":n={direction:new R,skyColor:new Je,groundColor:new Je};break;case"RectAreaLight":n={color:new Je,position:new R,halfWidth:new R,halfHeight:new R}}return e[t.id]=n,n}}}let Kr=0;function Qr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Zr(e,t){const n=new Yr,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new b};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new b,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let l=0;l<9;l++)i.probe.push(new R);const o=new R,a=new se,s=new se;return{setup:function(o){let a=0,s=0,l=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let c=0,u=0,h=0,d=0,f=0,p=0,m=0,g=0;o.sort(Qr);for(let e=0,t=o.length;e<t;e++){const t=o[e],v=t.color,y=t.intensity,b=t.distance,w=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)a+=v.r*y,s+=v.g*y,l+=v.b*y;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],y);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[c]=n,i.directionalShadowMap[c]=w,i.directionalShadowMatrix[c]=t.shadow.matrix,p++}i.directional[c]=e,c++}else if(t.isSpotLight){const e=n.get(t);if(e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(v).multiplyScalar(y),e.distance=b,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.spotShadow[h]=n,i.spotShadowMap[h]=w,i.spotShadowMatrix[h]=t.shadow.matrix,g++}i.spot[h]=e,h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(v).multiplyScalar(y),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[d]=e,d++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[u]=n,i.pointShadowMap[u]=w,i.pointShadowMatrix[u]=t.shadow.matrix,m++}i.point[u]=e,u++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(y),e.groundColor.copy(t.groundColor).multiplyScalar(y),i.hemi[f]=e,f++}}d>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=tn.LTC_FLOAT_1,i.rectAreaLTC2=tn.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=tn.LTC_HALF_1,i.rectAreaLTC2=tn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=l;const v=i.hash;v.directionalLength===c&&v.pointLength===u&&v.spotLength===h&&v.rectAreaLength===d&&v.hemiLength===f&&v.numDirectionalShadows===p&&v.numPointShadows===m&&v.numSpotShadows===g||(i.directional.length=c,i.spot.length=h,i.rectArea.length=d,i.point.length=u,i.hemi.length=f,i.directionalShadow.length=p,i.directionalShadowMap.length=p,i.pointShadow.length=m,i.pointShadowMap.length=m,i.spotShadow.length=g,i.spotShadowMap.length=g,i.directionalShadowMatrix.length=p,i.pointShadowMatrix.length=m,i.spotShadowMatrix.length=g,v.directionalLength=c,v.pointLength=u,v.spotLength=h,v.rectAreaLength=d,v.hemiLength=f,v.numDirectionalShadows=p,v.numPointShadows=m,v.numSpotShadows=g,i.version=Kr++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=0;const h=t.matrixWorldInverse;for(let d=0,f=e.length;d<f;d++){const t=e[d];if(t.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(t.matrixWorld),o.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(h),n++}else if(t.isSpotLight){const e=i.spot[l];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),e.direction.setFromMatrixPosition(t.matrixWorld),o.setFromMatrixPosition(t.target.matrixWorld),e.direction.sub(o),e.direction.transformDirection(h),l++}else if(t.isRectAreaLight){const e=i.rectArea[c];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),s.identity(),a.copy(t.matrixWorld),a.premultiply(h),s.extractRotation(a),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),c++}else if(t.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(t.matrixWorld),e.position.applyMatrix4(h),r++}else if(t.isHemisphereLight){const e=i.hemi[u];e.direction.setFromMatrixPosition(t.matrixWorld),e.direction.transformDirection(h),e.direction.normalize(),u++}}},state:i}}function Jr(e,t){const n=new Zr(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function $r(e,t){let n=new WeakMap;return{get:function(r,i=0){let o;return!1===n.has(r)?(o=new Jr(e,t),n.set(r,[o])):i>=n.get(r).length?(o=new Jr(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class ei extends We{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,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.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,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}}ei.prototype.isMeshDepthMaterial=!0;class ti extends We{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new R,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,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}}ti.prototype.isMeshDistanceMaterial=!0;function ni(e,t,n){let r=new Qt;const i=new b,o=new b,c=new M,u=[],h=[],d={},f=n.maxTextureSize,p={0:a,1:0,2:2},m=new Bt({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new b},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),g=m.clone();g.defines.HORIZONTAL_PASS=1;const v=new pt;v.setAttribute("position",new nt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Pt(v,m),w=this;function x(n,r){const i=t.update(y);m.uniforms.shadow_pass.value=n.map.texture,m.uniforms.resolution.value=n.mapSize,m.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,m,y,null),g.uniforms.shadow_pass.value=n.mapPass.texture,g.uniforms.resolution.value=n.mapSize,g.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,g,y,null)}function _(e){const t=e<<0;let n=u[t];return void 0===n&&(n=new ei({depthPacking:3201,morphTargets:e}),u[t]=n),n}function E(e){const t=e<<0;let n=h[t];return void 0===n&&(n=new ti({morphTargets:e}),h[t]=n),n}function A(t,n,r,i,o,a,s){let l=null,c=_,u=t.customDepthMaterial;if(!0===i.isPointLight&&(c=E,u=t.customDistanceMaterial),void 0===u){let e=!1;!0===r.morphTargets&&(e=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0),l=c(e)}else l=u;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){const e=l.uuid,t=r.uuid;let n=d[e];void 0===n&&(n={},d[e]=n);let i=n[t];void 0===i&&(i=l.clone(),n[t]=i),l=i}return l.visible=r.visible,l.wireframe=r.wireframe,l.side=3===s?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:p[r.side],l.clipShadows=r.clipShadows,l.clippingPlanes=r.clippingPlanes,l.clipIntersection=r.clipIntersection,l.wireframeLinewidth=r.wireframeLinewidth,l.linewidth=r.linewidth,!0===i.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(i.matrixWorld),l.nearDistance=o,l.farDistance=a),l}function S(n,i,o,a,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,c=t.length;l<c;l++){const c=t[l],u=i[c.materialIndex];if(u&&u.visible){const t=A(n,r,u,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,c)}}}else if(i.visible){const t=A(n,r,i,a,o.near,o.far,s);e.renderBufferDirect(o,null,r,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)S(l[e],i,o,a,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,n,a){if(!1===w.enabled)return;if(!1===w.autoUpdate&&!1===w.needsUpdate)return;if(0===t.length)return;const u=e.getRenderTarget(),h=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.state;p.setBlending(0),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(let m=0,g=t.length;m<g;m++){const u=t[m],h=u.shadow;if(void 0===h){console.warn("THREE.WebGLShadowMap:",u,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;i.copy(h.mapSize);const d=h.getFrameExtents();if(i.multiply(d),o.copy(h.mapSize),(i.x>f||i.y>f)&&(i.x>f&&(o.x=Math.floor(f/d.x),i.x=o.x*d.x,h.mapSize.x=o.x),i.y>f&&(o.y=Math.floor(f/d.y),i.y=o.y*d.y,h.mapSize.y=o.y)),null===h.map&&!h.isPointLightShadow&&3===this.type){const e={minFilter:s,magFilter:s,format:l};h.map=new T(i.x,i.y,e),h.map.texture.name=u.name+".shadowMap",h.mapPass=new T(i.x,i.y,e),h.camera.updateProjectionMatrix()}if(null===h.map){const e={minFilter:1003,magFilter:1003,format:l};h.map=new T(i.x,i.y,e),h.map.texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()}e.setRenderTarget(h.map),e.clear();const g=h.getViewportCount();for(let e=0;e<g;e++){const t=h.getViewport(e);c.set(o.x*t.x,o.y*t.y,o.x*t.z,o.y*t.w),p.viewport(c),h.updateMatrices(u,e),r=h.getFrustum(),S(n,a,h.camera,u,this.type)}h.isPointLightShadow||3!==this.type||x(h,a),h.needsUpdate=!1}w.needsUpdate=!1,e.setRenderTarget(u,h,d)}}function ri(e,t,n){const r=n.isWebGL2;const i=new function(){let t=!1;const n=new M;let r=null;const i=new M(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)}}},o=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?F(2929):z(2929)},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(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);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}}},s=new function(){let t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?F(2960):z(2960))},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&&l===r||(e.stencilOp(t,n,r),a=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null}}};let l={},c=null,u={},h=null,d=!1,f=null,p=null,m=null,g=null,v=null,y=null,b=null,w=!1,x=null,_=null,E=null,A=null,S=null;const T=e.getParameter(35661);let C=!1,O=0;const R=e.getParameter(7938);-1!==R.indexOf("WebGL")?(O=parseFloat(/^WebGL (\d)/.exec(R)[1]),C=O>=1):-1!==R.indexOf("OpenGL ES")&&(O=parseFloat(/^OpenGL ES (\d)/.exec(R)[1]),C=O>=2);let k=null,P={};const L=e.getParameter(3088),D=e.getParameter(2978),I=(new M).fromArray(L),N=(new M).fromArray(D);function j(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let a=0;a<r;a++)e.texImage2D(n+a,0,6408,1,1,0,6408,5121,i);return o}const B={};function F(t){!0!==l[t]&&(e.enable(t),l[t]=!0)}function z(t){!1!==l[t]&&(e.disable(t),l[t]=!1)}B[3553]=j(3553,3553,1),B[34067]=j(34067,34069,6),i.setClear(0,0,0,1),o.setClear(1),s.setClear(0),F(2929),o.setFunc(3),G(!1),W(1),F(2884),V(0);const H={100:32774,101:32778,102:32779};if(r)H[103]=32775,H[104]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(H[103]=e.MIN_EXT,H[104]=e.MAX_EXT)}const U={200:0,201:1,202:768,204:770,210:776,208:774,206:772,203:769,205:771,209:775,207:773};function V(t,n,r,i,o,a,s,l){if(0!==t){if(!1===d&&(F(3042),d=!0),5===t)o=o||n,a=a||r,s=s||i,n===p&&o===v||(e.blendEquationSeparate(H[n],H[o]),p=n,v=o),r===m&&i===g&&a===y&&s===b||(e.blendFuncSeparate(U[r],U[i],U[a],U[s]),m=r,g=i,y=a,b=s),f=t,w=null;else if(t!==f||l!==w){if(100===p&&100===v||(e.blendEquation(32774),p=100,v=100),l)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,0,769,771);break;case 4:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFunc(0,769);break;case 4:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}m=null,g=null,y=null,b=null,f=t,w=l}}else!0===d&&(z(3042),d=!1)}function G(t){x!==t&&(t?e.frontFace(2304):e.frontFace(2305),x=t)}function W(t){0!==t?(F(2884),t!==_&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):z(2884),_=t}function q(t,n,r){t?(F(32823),A===n&&S===r||(e.polygonOffset(n,r),A=n,S=r)):z(32823)}function X(t){void 0===t&&(t=33984+T-1),k!==t&&(e.activeTexture(t),k=t)}return{buffers:{color:i,depth:o,stencil:s},enable:F,disable:z,bindFramebuffer:function(t,n){return null===n&&null!==c&&(n=c),u[t]!==n&&(e.bindFramebuffer(t,n),u[t]=n,r&&(36009===t&&(u[36160]=n),36160===t&&(u[36009]=n)),!0)},bindXRFramebuffer:function(t){t!==c&&(e.bindFramebuffer(36160,t),c=t)},useProgram:function(t){return h!==t&&(e.useProgram(t),h=t,!0)},setBlending:V,setMaterial:function(e,t){2===e.side?z(2884):F(2884);let n=e.side===a;t&&(n=!n),G(n),1===e.blending&&!1===e.transparent?V(0):V(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),o.setFunc(e.depthFunc),o.setTest(e.depthTest),o.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;s.setTest(r),r&&(s.setMask(e.stencilWriteMask),s.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),s.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),q(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?F(32926):z(32926)},setFlipSided:G,setCullFace:W,setLineWidth:function(t){t!==E&&(C&&e.lineWidth(t),E=t)},setPolygonOffset:q,setScissorTest:function(e){e?F(3089):z(3089)},activeTexture:X,bindTexture:function(t,n){null===k&&X();let r=P[k];void 0===r&&(r={type:void 0,texture:void 0},P[k]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||B[t]),r.type=t,r.texture=n)},unbindTexture:function(){const t=P[k];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===I.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),I.copy(t))},viewport:function(t){!1===N.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),N.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),l={},k=null,P={},c=null,u={},h=null,d=!1,f=null,p=null,m=null,g=null,v=null,y=null,b=null,w=!1,x=null,_=null,E=null,A=null,S=null,I.set(0,0,e.canvas.width,e.canvas.height),N.set(0,0,e.canvas.width,e.canvas.height),i.reset(),o.reset(),s.reset()}}}function ii(e,t,n,r,i,o,a){const c=i.isWebGL2,u=i.maxTextures,h=i.maxCubemapSize,d=i.maxTextureSize,f=i.maxSamples,p=new WeakMap;let m,g=!1;try{g="undefined"!==typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(U){}function b(e,t){return g?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function w(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?y:Math.floor,o=r(i*e.width),a=r(i*e.height);void 0===m&&(m=b(o,a));const s=n?b(o,a):m;s.width=o,s.height=a;return s.getContext("2d").drawImage(e,0,0,o,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+a+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function x(e){return v(e.width)&&v(e.height)}function _(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&e.minFilter!==s}function E(t,n,i,o,a=1){e.generateMipmap(t);r.get(n).__maxMipLevel=Math.log2(Math.max(i,o,a))}function A(n,r,i){if(!1===c)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function S(e){return 1003===e||1004===e||1005===e?9728:9729}function M(t){const n=t.target;n.removeEventListener("dispose",M),function(t){const n=r.get(t);if(void 0===n.__webglInit)return;e.deleteTexture(n.__webglTexture),r.remove(t)}(n),n.isVideoTexture&&p.delete(n),a.memory.textures--}function T(t){const n=t.target;n.removeEventListener("dispose",T),function(t){const n=t.texture,i=r.get(t),o=r.get(n);if(!t)return;void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),a.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let r=0;r<6;r++)e.deleteFramebuffer(i.__webglFramebuffer[r]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[r]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let s=0,l=n.length;s<l;s++){const t=r.get(n[s]);t.__webglTexture&&(e.deleteTexture(t.__webglTexture),a.memory.textures--),r.remove(n[s])}r.remove(n),r.remove(t)}(n)}let C=0;function O(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=a.render.frame;p.get(e)!==t&&(p.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){const n=e.image;if(void 0===n)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==n.complete)return void I(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function R(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;D(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),s=r.image[0]&&r.image[0].isDataTexture,u=[];for(let e=0;e<6;e++)u[e]=a||s?s?r.image[e].image:r.image[e]:w(r.image[e],!1,!0,h);const d=u[0],f=x(d)||c,p=o.convert(r.format),m=o.convert(r.type),g=A(r.internalFormat,p,m);let v;if(L(34067,r,f),a){for(let e=0;e<6;e++){v=u[e].mipmaps;for(let t=0;t<v.length;t++){const i=v[t];r.format!==l&&1022!==r.format?null!==p?n.compressedTexImage2D(34069+e,t,g,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+e,t,g,i.width,i.height,0,p,m,i.data)}}t.__maxMipLevel=v.length-1}else{v=r.mipmaps;for(let e=0;e<6;e++)if(s){n.texImage2D(34069+e,0,g,u[e].width,u[e].height,0,p,m,u[e].data);for(let t=0;t<v.length;t++){const r=v[t].image[e].image;n.texImage2D(34069+e,t+1,g,r.width,r.height,0,p,m,r.data)}}else{n.texImage2D(34069+e,0,g,p,m,u[e]);for(let t=0;t<v.length;t++){const r=v[t];n.texImage2D(34069+e,t+1,g,p,m,r.image[e])}}t.__maxMipLevel=v.length}_(r,f)&&E(34067,r,d.width,d.height);t.__version=r.version,r.onUpdate&&r.onUpdate(r)}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}const k={1e3:10497,1001:33071,1002:33648},P={1003:9728,1004:9984,1005:9986,[s]:9729,1007:9985,1008:9987};function L(n,o,a){if(a?(e.texParameteri(n,10242,k[o.wrapS]),e.texParameteri(n,10243,k[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,k[o.wrapR]),e.texParameteri(n,10240,P[o.magFilter]),e.texParameteri(n,10241,P[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,S(o.magFilter)),e.texParameteri(n,10241,S(o.minFilter)),1003!==o.minFilter&&o.minFilter!==s&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(1015===o.type&&!1===t.has("OES_texture_float_linear"))return;if(!1===c&&1016===o.type&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function D(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",M),t.__webglTexture=e.createTexture(),a.memory.textures++)}function I(t,r,i){let a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),D(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const u=function(e){return!c&&(1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&e.minFilter!==s)}(r)&&!1===x(r.image),h=w(r.image,u,!1,d),f=x(h)||c,p=o.convert(r.format);let m,g=o.convert(r.type),v=A(r.internalFormat,p,g);L(a,r,f);const y=r.mipmaps;if(r.isDepthTexture)v=6402,c?v=1015===r.type?36012:1014===r.type?33190:1020===r.type?35056:33189:1015===r.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===r.format&&6402===v&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,g=o.convert(r.type)),1027===r.format&&6402===v&&(v=34041,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,g=o.convert(r.type))),n.texImage2D(3553,0,v,h.width,h.height,0,p,g,null);else if(r.isDataTexture)if(y.length>0&&f){for(let e=0,t=y.length;e<t;e++)m=y[e],n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data);r.generateMipmaps=!1,t.__maxMipLevel=y.length-1}else n.texImage2D(3553,0,v,h.width,h.height,0,p,g,h.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(let e=0,t=y.length;e<t;e++)m=y[e],r.format!==l&&1022!==r.format?null!==p?n.compressedTexImage2D(3553,e,v,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data);t.__maxMipLevel=y.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,v,h.width,h.height,h.depth,0,p,g,h.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,v,h.width,h.height,h.depth,0,p,g,h.data),t.__maxMipLevel=0;else if(y.length>0&&f){for(let e=0,t=y.length;e<t;e++)m=y[e],n.texImage2D(3553,e,v,p,g,m);r.generateMipmaps=!1,t.__maxMipLevel=y.length-1}else n.texImage2D(3553,0,v,p,g,h),t.__maxMipLevel=0;_(r,f)&&E(a,r,h.width,h.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function N(t,i,a,s,l){const c=o.convert(a.format),u=o.convert(a.type),h=A(a.internalFormat,c,u);32879===l||35866===l?n.texImage3D(l,0,h,i.width,i.height,i.depth,0,c,u,null):n.texImage2D(l,0,h,i.width,i.height,0,c,u,null),n.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,s,l,r.get(a).__webglTexture,0),n.bindFramebuffer(36160,null)}function j(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r){const t=n.depthTexture;t&&t.isDepthTexture&&(1015===t.type?i=36012:1014===t.type&&(i=33190));const r=F(n);e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(r){const t=F(n);e.renderbufferStorageMultisample(36161,t,35056,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture[0]:n.texture,i=o.convert(t.format),a=o.convert(t.type),s=A(t.internalFormat,i,a);if(r){const t=F(n);e.renderbufferStorageMultisample(36161,t,s,n.width,n.height)}else e.renderbufferStorage(36161,s,n.width,n.height)}e.bindRenderbuffer(36161,null)}function B(t){const i=r.get(t),o=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),O(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture;if(1026===i.depthTexture.format)e.framebufferTexture2D(36160,36096,3553,o,0);else{if(1027!==i.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,o,0)}}(i.__webglFramebuffer,t)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),j(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),j(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function F(e){return c&&e.isWebGLMultisampleRenderTarget?Math.min(f,e.samples):0}let z=!1,H=!1;this.allocateTextureUnit=function(){const e=C;return e>=u&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+u),C+=1,e},this.resetTextureUnits=function(){C=0},this.setTexture2D=O,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?I(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=R,this.setupRenderTarget=function(t){const s=t.texture,u=r.get(t),h=r.get(s);t.addEventListener("dispose",T),!0!==t.isWebGLMultipleRenderTargets&&(h.__webglTexture=e.createTexture(),h.__version=s.version,a.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,f=!0===t.isWebGLMultipleRenderTargets,p=!0===t.isWebGLMultisampleRenderTarget,m=s.isDataTexture3D||s.isDataTexture2DArray,g=x(t)||c;if(!c||1022!==s.format||1015!==s.type&&1016!==s.type||(s.format=l,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),d){u.__webglFramebuffer=[];for(let t=0;t<6;t++)u.__webglFramebuffer[t]=e.createFramebuffer()}else if(u.__webglFramebuffer=e.createFramebuffer(),f)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(p)if(c){u.__webglMultisampledFramebuffer=e.createFramebuffer(),u.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,u.__webglColorRenderbuffer);const r=o.convert(s.format),i=o.convert(s.type),a=A(s.internalFormat,r,i),l=F(t);e.renderbufferStorageMultisample(36161,l,a,t.width,t.height),n.bindFramebuffer(36160,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,u.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(u.__webglDepthRenderbuffer=e.createRenderbuffer(),j(u.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(d){n.bindTexture(34067,h.__webglTexture),L(34067,s,g);for(let e=0;e<6;e++)N(u.__webglFramebuffer[e],t,s,36064,34069+e);_(s,g)&&E(34067,s,t.width,t.height),n.bindTexture(34067,null)}else if(f){const e=t.texture;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=r.get(o);n.bindTexture(3553,a.__webglTexture),L(3553,o,g),N(u.__webglFramebuffer,t,o,36064+i,3553),_(o,g)&&E(3553,o,t.width,t.height)}n.bindTexture(3553,null)}else{let e=3553;if(m)if(c){e=s.isDataTexture3D?32879:35866}else console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.");n.bindTexture(e,h.__webglTexture),L(e,s,g),N(u.__webglFramebuffer,t,s,36064,e),_(s,g)&&E(e,s,t.width,t.height,t.depth),n.bindTexture(e,null)}t.depthBuffer&&B(t)},this.updateRenderTargetMipmap=function(e){const t=x(e)||c,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let o=0,a=i.length;o<a;o++){const a=i[o];if(_(a,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(a).__webglTexture;n.bindTexture(t,i),E(t,a,e.width,e.height),n.bindTexture(t,null)}}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(c){const i=t.width,o=t.height;let a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024);const s=r.get(t);n.bindFramebuffer(36008,s.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,s.__webglFramebuffer),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,s.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===z&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),z=!0),e=e.texture),O(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===H&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),H=!0),e=e.texture),R(e,t)}}function oi(e,t,n){const r=n.isWebGL2;return{convert:function(e){let n;if(1009===e)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1019===e)return 33635;if(1010===e)return 5120;if(1011===e)return 5122;if(1012===e)return 5123;if(1013===e)return 5124;if(1014===e)return 5125;if(1015===e)return 5126;if(1016===e)return r?5131:(n=t.get("OES_texture_half_float"),null!==n?n.HALF_FLOAT_OES:null);if(1021===e)return 6406;if(1022===e)return 6407;if(e===l)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(1026===e)return 6402;if(1027===e)return 34041;if(1028===e)return 6403;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1032===e)return 36248;if(1033===e)return 36249;if(33776===e||33777===e||33778===e||33779===e){if(n=t.get("WEBGL_compressed_texture_s3tc"),null===n)return null;if(33776===e)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===e)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===e)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===e)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(n=t.get("WEBGL_compressed_texture_pvrtc"),null===n)return null;if(35840===e)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return n=t.get("WEBGL_compressed_texture_etc1"),null!==n?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((37492===e||37496===e)&&(n=t.get("WEBGL_compressed_texture_etc"),null!==n)){if(37492===e)return n.COMPRESSED_RGB8_ETC2;if(37496===e)return n.COMPRESSED_RGBA8_ETC2_EAC}return 37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e||37840===e||37841===e||37842===e||37843===e||37844===e||37845===e||37846===e||37847===e||37848===e||37849===e||37850===e||37851===e||37852===e||37853===e?(n=t.get("WEBGL_compressed_texture_astc"),null!==n?e:null):36492===e?(n=t.get("EXT_texture_compression_bptc"),null!==n?e:null):1020===e?r?34042:(n=t.get("WEBGL_depth_texture"),null!==n?n.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}class ai extends zt{constructor(e=[]){super(),this.cameras=e}}ai.prototype.isArrayCamera=!0;class si extends Pe{constructor(){super(),this.type="Group"}}si.prototype.isGroup=!0;const li={type:"move"};class ci{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new si,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new si,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new R,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new R),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new si,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new R,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new R),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const a=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==a&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(li))),l&&e.hand){o=!0;for(const o of e.hand.values()){const e=t.getJointPose(o,n);if(void 0===l.joints[o.jointName]){const e=new si;e.matrixAutoUpdate=!1,e.visible=!1,l.joints[o.jointName]=e,l.add(e)}const r=l.joints[o.jointName];null!==e&&(r.matrix.fromArray(e.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.jointRadius=e.radius),r.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],a=r.position.distanceTo(i.position),s=.02,c=.005;l.inputState.pinching&&a>s+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&a<=s-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==o),this}}class ui extends c{constructor(e,t){super();const n=this,r=e.state;let i=null,o=1,a=null,s="local-floor",l=null,c=null,u=null,h=null;const d=[],f=new Map,p=new zt;p.layers.enable(1),p.viewport=new M;const m=new zt;m.layers.enable(2),m.viewport=new M;const g=[p,m],v=new ai;v.layers.enable(1),v.layers.enable(2);let y=null,b=null;function w(e){const t=f.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function x(){f.forEach((function(e,t){e.disconnect(t)})),f.clear(),y=null,b=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),C.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function _(e){const t=i.inputSources;for(let n=0;n<d.length;n++)f.set(t[n],d[n]);for(let n=0;n<e.removed.length;n++){const t=e.removed[n],r=f.get(t);r&&(r.dispatchEvent({type:"disconnected",data:t}),f.delete(t))}for(let n=0;n<e.added.length;n++){const t=e.added[n],r=f.get(t);r&&r.dispatchEvent({type:"connected",data:t})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getGripSpace()},this.getHand=function(e){let t=d[e];return void 0===t&&(t=new ci,d[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getSession=function(){return i},this.setSession=async function(e){if(i=e,null!==i){i.addEventListener("select",w),i.addEventListener("selectstart",w),i.addEventListener("selectend",w),i.addEventListener("squeeze",w),i.addEventListener("squeezestart",w),i.addEventListener("squeezeend",w),i.addEventListener("end",x),i.addEventListener("inputsourceschange",_);const e=t.getContextAttributes();if(!0!==e.xrCompatible&&await t.makeXRCompatible(),void 0===i.renderState.layers){const n={antialias:e.antialias,alpha:e.alpha,depth:e.depth,stencil:e.stencil,framebufferScaleFactor:o},r=new XRWebGLLayer(i,t,n);i.updateRenderState({baseLayer:r})}else{let n=0;e.depth&&(n=e.stencil?34041:6402);const r={colorFormat:e.alpha?6408:6407,depthFormat:n,scaleFactor:o};c=new XRWebGLBinding(i,t),h=c.createProjectionLayer(r),u=t.createFramebuffer(),i.updateRenderState({layers:[h]})}a=await i.requestReferenceSpace(s),C.setContext(i),C.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const E=new R,A=new R;function S(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===i)return;v.near=m.near=p.near=e.near,v.far=m.far=p.far=e.far,y===v.near&&b===v.far||(i.updateRenderState({depthNear:v.near,depthFar:v.far}),y=v.near,b=v.far);const t=e.parent,n=v.cameras;S(v,t);for(let i=0;i<n.length;i++)S(n[i],t);v.matrixWorld.decompose(v.position,v.quaternion,v.scale),e.position.copy(v.position),e.quaternion.copy(v.quaternion),e.scale.copy(v.scale),e.matrix.copy(v.matrix),e.matrixWorld.copy(v.matrixWorld);const r=e.children;for(let i=0,o=r.length;i<o;i++)r[i].updateMatrixWorld(!0);2===n.length?function(e,t,n){E.setFromMatrixPosition(t.matrixWorld),A.setFromMatrixPosition(n.matrixWorld);const r=E.distanceTo(A),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(v,p,m):v.projectionMatrix.copy(p.projectionMatrix)},this.getCamera=function(){return v};let T=null;const C=new Zt;C.setAnimationLoop((function(e,n){if(l=n.getViewerPose(a),null!==l){const e=l.views,n=i.renderState.baseLayer;void 0===i.renderState.layers&&r.bindXRFramebuffer(n.framebuffer);let o=!1;e.length!==v.cameras.length&&(v.cameras.length=0,o=!0);for(let a=0;a<e.length;a++){const s=e[a];let l=null;if(void 0===i.renderState.layers)l=n.getViewport(s);else{const e=c.getViewSubImage(h,s);r.bindXRFramebuffer(u),t.framebufferTexture2D(36160,36064,3553,e.colorTexture,0),void 0!==e.depthStencilTexture&&t.framebufferTexture2D(36160,36096,3553,e.depthStencilTexture,0),l=e.viewport}const d=g[a];d.matrix.fromArray(s.transform.matrix),d.projectionMatrix.fromArray(s.projectionMatrix),d.viewport.set(l.x,l.y,l.width,l.height),0===a&&v.matrix.copy(d.matrix),!0===o&&v.cameras.push(d)}}const o=i.inputSources;for(let t=0;t<d.length;t++){const e=d[t],r=o[t];e.update(r,n,a)}T&&T(e,n)})),this.setAnimationLoop=function(e){T=e},this.dispose=function(){}}}function hi(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap);const r=e.get(n).envMap;if(r){t.envMap.value=r,t.flipEnvMap.value=r.isCubeTexture&&r._needsFlipEnvMap?-1:1,t.reflectivity.value=n.reflectivity,t.refractionRatio.value=n.refractionRatio;const i=e.get(r).__maxMipLevel;void 0!==i&&(t.maxMipLevel.value=i)}let i,o;n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?i=n.map:n.specularMap?i=n.specularMap:n.displacementMap?i=n.displacementMap:n.normalMap?i=n.normalMap:n.bumpMap?i=n.bumpMap:n.roughnessMap?i=n.roughnessMap:n.metalnessMap?i=n.metalnessMap:n.alphaMap?i=n.alphaMap:n.emissiveMap?i=n.emissiveMap:n.clearcoatMap?i=n.clearcoatMap:n.clearcoatNormalMap?i=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(i=n.clearcoatRoughnessMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix)),n.aoMap?o=n.aoMap:n.lightMap&&(o=n.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),t.uv2Transform.value.copy(o.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,n.side===a&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),n.side===a&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias);e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o,s){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap);t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(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.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t,r){n(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen);t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap);t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap);t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===a&&e.clearcoatNormalScale.value.negate());e.transmission.value=t.transmission,t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap);t.transmission>0&&(e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height));e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap);e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)}(e,r,s):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap);t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),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}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,t.side===a&&(e.bumpScale.value*=-1));t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),t.side===a&&e.normalScale.value.negate());t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);let i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);let n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function di(e={}){const t=void 0!==e.canvas?e.canvas:function(){const e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}(),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,s=void 0!==e.antialias&&e.antialias,c=void 0===e.premultipliedAlpha||e.premultipliedAlpha,u=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,h=void 0!==e.powerPreference?e.powerPreference:"default",d=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let f=null,p=null;const m=[],g=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1;const v=this;let y=!1,b=0,w=0,x=null,_=-1,E=null;const A=new M,S=new M;let O=null,k=t.width,P=t.height,L=1,D=null,I=null;const N=new M(0,0,k,P),j=new M(0,0,k,P);let B=!1;const F=[],z=new Qt;let H=!1,U=!1,V=null;const G=new se,W=new R,q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function X(){return null===x?L:1}let Y,K,Q,Z,J,$,ee,te,ne,re,ie,oe,ae,le,ce,ue,he,de,fe,pe,me,ge,ve=n;function ye(e,n){for(let r=0;r<e.length;r++){const i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{const e={alpha:r,depth:i,stencil:o,antialias:s,premultipliedAlpha:c,preserveDrawingBuffer:u,powerPreference:h,failIfMajorPerformanceCaveat:d};if(t.addEventListener("webglcontextlost",xe,!1),t.addEventListener("webglcontextrestored",_e,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===v.isWebGL1Renderer&&t.shift(),ve=ye(t,e),null===ve)throw ye(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(Le){throw console.error("THREE.WebGLRenderer: "+Le.message),Le}function be(){Y=new un(ve),K=new sn(ve,Y,e),Y.init(K),me=new oi(ve,Y,K),Q=new ri(ve,Y,K),F[0]=1029,Z=new fn(ve),J=new Vr,$=new ii(ve,Y,Q,J,K,me,Z),ee=new cn(v),te=new Jt(ve,K),ge=new on(ve,Y,te,K),ne=new hn(ve,te,Z,ge),re=new vn(ve,ne,te,Z),de=new gn(ve),ce=new ln(J),ie=new Ur(v,ee,Y,K,ge,ce),oe=new hi(J),ae=new Xr(J),le=new $r(Y,K),he=new rn(v,ee,Q,re,c),ue=new ni(v,re,K),fe=new an(ve,Y,Z,K),pe=new dn(ve,Y,Z,K),Z.programs=ie.programs,v.capabilities=K,v.extensions=Y,v.properties=J,v.renderLists=ae,v.shadowMap=ue,v.state=Q,v.info=Z}be();const we=new ui(v,ve);function xe(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),y=!0}function _e(){console.log("THREE.WebGLRenderer: Context Restored."),y=!1;const e=Z.autoReset,t=ue.enabled,n=ue.autoUpdate,r=ue.needsUpdate,i=ue.type;be(),Z.autoReset=e,ue.enabled=t,ue.autoUpdate=n,ue.needsUpdate=r,ue.type=i}function Ee(e){const t=e.target;t.removeEventListener("dispose",Ee),function(e){(function(e){const t=J.get(e).programs;void 0!==t&&t.forEach((function(e){ie.releaseProgram(e)}))})(e),J.remove(e)}(t)}this.xr=we,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=Y.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=Y.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return L},this.setPixelRatio=function(e){void 0!==e&&(L=e,this.setSize(k,P,!1))},this.getSize=function(e){return e.set(k,P)},this.setSize=function(e,n,r){we.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(k=e,P=n,t.width=Math.floor(e*L),t.height=Math.floor(n*L),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(k*L,P*L).floor()},this.setDrawingBufferSize=function(e,n,r){k=e,P=n,L=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(A)},this.getViewport=function(e){return e.copy(N)},this.setViewport=function(e,t,n,r){e.isVector4?N.set(e.x,e.y,e.z,e.w):N.set(e,t,n,r),Q.viewport(A.copy(N).multiplyScalar(L).floor())},this.getScissor=function(e){return e.copy(j)},this.setScissor=function(e,t,n,r){e.isVector4?j.set(e.x,e.y,e.z,e.w):j.set(e,t,n,r),Q.scissor(S.copy(j).multiplyScalar(L).floor())},this.getScissorTest=function(){return B},this.setScissorTest=function(e){Q.setScissorTest(B=e)},this.setOpaqueSort=function(e){D=e},this.setTransparentSort=function(e){I=e},this.getClearColor=function(e){return e.copy(he.getClearColor())},this.setClearColor=function(){he.setClearColor.apply(he,arguments)},this.getClearAlpha=function(){return he.getClearAlpha()},this.setClearAlpha=function(){he.setClearAlpha.apply(he,arguments)},this.clear=function(e,t,n){let r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),ve.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.dispose=function(){t.removeEventListener("webglcontextlost",xe,!1),t.removeEventListener("webglcontextrestored",_e,!1),ae.dispose(),le.dispose(),J.dispose(),ee.dispose(),re.dispose(),ge.dispose(),we.dispose(),we.removeEventListener("sessionstart",Se),we.removeEventListener("sessionend",Me),V&&(V.dispose(),V=null),Te.stop()},this.renderBufferImmediate=function(e,t){ge.initAttributes();const n=J.get(e);e.hasPositions&&!n.position&&(n.position=ve.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=ve.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=ve.createBuffer()),e.hasColors&&!n.color&&(n.color=ve.createBuffer());const r=t.getAttributes();e.hasPositions&&(ve.bindBuffer(34962,n.position),ve.bufferData(34962,e.positionArray,35048),ge.enableAttribute(r.position),ve.vertexAttribPointer(r.position,3,5126,!1,0,0)),e.hasNormals&&(ve.bindBuffer(34962,n.normal),ve.bufferData(34962,e.normalArray,35048),ge.enableAttribute(r.normal),ve.vertexAttribPointer(r.normal,3,5126,!1,0,0)),e.hasUvs&&(ve.bindBuffer(34962,n.uv),ve.bufferData(34962,e.uvArray,35048),ge.enableAttribute(r.uv),ve.vertexAttribPointer(r.uv,2,5126,!1,0,0)),e.hasColors&&(ve.bindBuffer(34962,n.color),ve.bufferData(34962,e.colorArray,35048),ge.enableAttribute(r.color),ve.vertexAttribPointer(r.color,3,5126,!1,0,0)),ge.disableUnusedAttributes(),ve.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=q);const a=i.isMesh&&i.matrixWorld.determinant()<0,s=Pe(e,t,r,i);Q.setMaterial(r,a);let l=n.index;const c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;let u,h=1;!0===r.wireframe&&(l=ne.getWireframeAttribute(n),h=2),(r.morphTargets||r.morphNormals)&&de.update(i,n,r,s),ge.setup(i,r,s,n,l);let d=fe;null!==l&&(u=te.get(l),d=pe,d.setIndex(u));const f=null!==l?l.count:c.count,p=n.drawRange.start*h,m=n.drawRange.count*h,g=null!==o?o.start*h:0,v=null!==o?o.count*h:1/0,y=Math.max(p,g),b=Math.min(f,p+m,g+v)-1,w=Math.max(0,b-y+1);if(0!==w){if(i.isMesh)!0===r.wireframe?(Q.setLineWidth(r.wireframeLinewidth*X()),d.setMode(1)):d.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),Q.setLineWidth(e*X()),i.isLineSegments?d.setMode(1):i.isLineLoop?d.setMode(2):d.setMode(3)}else i.isPoints?d.setMode(0):i.isSprite&&d.setMode(4);if(i.isInstancedMesh)d.renderInstances(y,w,i.count);else if(n.isInstancedBufferGeometry){const e=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(y,w,e)}else d.render(y,w)}},this.compile=function(e,t){p=le.get(e),p.init(),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(p.pushLight(e),e.castShadow&&p.pushShadow(e))})),p.setupLights(),e.traverse((function(t){const n=t.material;if(n)if(Array.isArray(n))for(let r=0;r<n.length;r++){Re(n[r],e,t)}else Re(n,e,t)}))};let Ae=null;function Se(){Te.stop()}function Me(){Te.start()}const Te=new Zt;function Ce(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i<o;i++){const o=e[i],a=o.object,s=o.geometry,l=null===r?o.material:r,c=o.group;if(n.isArrayCamera){const e=n.cameras;for(let n=0,r=e.length;n<r;n++){const r=e[n];a.layers.test(r.layers)&&(Q.viewport(A.copy(r.viewport)),p.setupLightsView(r),Oe(a,t,r,s,l,c))}}else Oe(a,t,n,s,l,c)}}function Oe(e,t,n,r,i,o){if(e.onBeforeRender(v,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){const r=Pe(n,t,i,e);Q.setMaterial(i),ge.reset(),function(e,t){e.render((function(e){v.renderBufferImmediate(e,t)}))}(e,r)}else!0===i.transparent&&2===i.side?(i.side=a,i.needsUpdate=!0,v.renderBufferDirect(n,t,r,i,e,o),i.side=0,i.needsUpdate=!0,v.renderBufferDirect(n,t,r,i,e,o),i.side=2):v.renderBufferDirect(n,t,r,i,e,o);e.onAfterRender(v,t,n,r,i,o)}function Re(e,t,n){!0!==t.isScene&&(t=q);const r=J.get(e),i=p.state.lights,o=p.state.shadowsArray,a=i.state.version,s=ie.getParameters(e,i.state,o,t,n),l=ie.getProgramCacheKey(s);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=ee.get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",Ee),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===a)return ke(e,s),u}else s.uniforms=ie.getUniforms(e),e.onBuild(s,v),e.onBeforeCompile(s,v),u=ie.acquireProgram(s,l),c.set(l,u),r.uniforms=s.uniforms;const h=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(h.clippingPlanes=ce.uniform),ke(e,s),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotShadowMatrix.value=i.state.spotShadowMatrix,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix);const d=u.getUniforms(),f=xr.seqWithValue(d.seq,h);return r.currentProgram=u,r.uniformsList=f,u}function ke(e,t){const n=J.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas}function Pe(e,t,n,r){!0!==t.isScene&&(t=q),$.resetTextureUnits();const i=t.fog,o=n.isMeshStandardMaterial?t.environment:null,a=null===x?v.outputEncoding:x.texture.encoding,s=ee.get(n.envMap||o),l=!0===n.vertexColors&&r.geometry&&r.geometry.attributes.color&&4===r.geometry.attributes.color.itemSize,c=J.get(n),u=p.state.lights;if(!0===H&&(!0===U||e!==E)){const t=e===E&&n.id===_;ce.setState(n,e,t)}let h=!1;n.version===c.__version?c.needsLights&&c.lightsStateVersion!==u.state.version||c.outputEncoding!==a||r.isInstancedMesh&&!1===c.instancing?h=!0:r.isInstancedMesh||!0!==c.instancing?r.isSkinnedMesh&&!1===c.skinning?h=!0:r.isSkinnedMesh||!0!==c.skinning?c.envMap!==s||n.fog&&c.fog!==i?h=!0:void 0===c.numClippingPlanes||c.numClippingPlanes===ce.numPlanes&&c.numIntersection===ce.numIntersection?c.vertexAlphas!==l&&(h=!0):h=!0:h=!0:h=!0:(h=!0,c.__version=n.version);let d=c.currentProgram;!0===h&&(d=Re(n,t,r));let f=!1,m=!1,g=!1;const y=d.getUniforms(),b=c.uniforms;if(Q.useProgram(d.program)&&(f=!0,m=!0,g=!0),n.id!==_&&(_=n.id,m=!0),f||E!==e){if(y.setValue(ve,"projectionMatrix",e.projectionMatrix),K.logarithmicDepthBuffer&&y.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),E!==e&&(E=e,m=!0,g=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){const t=y.map.cameraPosition;void 0!==t&&t.setValue(ve,W.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||r.isSkinnedMesh)&&y.setValue(ve,"viewMatrix",e.matrixWorldInverse)}if(r.isSkinnedMesh){y.setOptional(ve,r,"bindMatrix"),y.setOptional(ve,r,"bindMatrixInverse");const e=r.skeleton;e&&(K.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),y.setValue(ve,"boneTexture",e.boneTexture,$),y.setValue(ve,"boneTextureSize",e.boneTextureSize)):y.setOptional(ve,e,"boneMatrices"))}return(m||c.receiveShadow!==r.receiveShadow)&&(c.receiveShadow=r.receiveShadow,y.setValue(ve,"receiveShadow",r.receiveShadow)),m&&(y.setValue(ve,"toneMappingExposure",v.toneMappingExposure),c.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(b,g),i&&n.fog&&oe.refreshFogUniforms(b,i),oe.refreshMaterialUniforms(b,n,L,P,V),xr.upload(ve,c.uniformsList,b,$)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(xr.upload(ve,c.uniformsList,b,$),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(ve,"center",r.center),y.setValue(ve,"modelViewMatrix",r.modelViewMatrix),y.setValue(ve,"normalMatrix",r.normalMatrix),y.setValue(ve,"modelMatrix",r.matrixWorld),d}Te.setAnimationLoop((function(e){Ae&&Ae(e)})),"undefined"!==typeof window&&Te.setContext(window),this.setAnimationLoop=function(e){Ae=e,we.setAnimationLoop(e),null===e?Te.stop():Te.start()},we.addEventListener("sessionstart",Se),we.addEventListener("sessionend",Me),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===y)return;!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===we.enabled&&!0===we.isPresenting&&(!0===we.cameraAutoUpdate&&we.updateCamera(t),t=we.getCamera()),!0===e.isScene&&e.onBeforeRender(v,e,t,x),p=le.get(e,g.length),p.init(),g.push(p),G.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),z.setFromProjectionMatrix(G),U=this.localClippingEnabled,H=ce.init(this.clippingPlanes,U,t),f=ae.get(e,m.length),f.init(),m.push(f),function e(t,n,r,i){if(!1===t.visible)return;if(t.layers.test(n.layers))if(t.isGroup)r=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(n);else if(t.isLight)p.pushLight(t),t.castShadow&&p.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||z.intersectsSprite(t)){i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G);const e=re.update(t),n=t.material;n.visible&&f.push(t,e,n,r,W.z,null)}}else if(t.isImmediateRenderObject)i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G),f.push(t,null,t.material,r,W.z,null);else if((t.isMesh||t.isLine||t.isPoints)&&(t.isSkinnedMesh&&t.skeleton.frame!==Z.render.frame&&(t.skeleton.update(),t.skeleton.frame=Z.render.frame),!t.frustumCulled||z.intersectsObject(t))){i&&W.setFromMatrixPosition(t.matrixWorld).applyMatrix4(G);const e=re.update(t),n=t.material;if(Array.isArray(n)){const i=e.groups;for(let o=0,a=i.length;o<a;o++){const a=i[o],s=n[a.materialIndex];s&&s.visible&&f.push(t,e,s,r,W.z,a)}}else n.visible&&f.push(t,e,n,r,W.z,null)}const o=t.children;for(let a=0,s=o.length;a<s;a++)e(o[a],n,r,i)}(e,t,0,v.sortObjects),f.finish(),!0===v.sortObjects&&f.sort(D,I),!0===H&&ce.beginShadows();const n=p.state.shadowsArray;ue.render(n,e,t),p.setupLights(),p.setupLightsView(t),!0===H&&ce.endShadows(),!0===this.info.autoReset&&this.info.reset(),he.render(f,e);const r=f.opaque,i=f.transmissive,o=f.transparent;r.length>0&&Ce(r,e,t),i.length>0&&function(e,t,n,r){if(null===V){const e=!0===s&&!0===K.isWebGL2;V=new(e?C:T)(1024,1024,{generateMipmaps:!0,type:null!==me.convert(1016)?1016:1009,minFilter:1008,magFilter:1003,wrapS:1001,wrapT:1001})}const i=v.getRenderTarget();v.setRenderTarget(V),v.clear();const o=v.toneMapping;v.toneMapping=0,Ce(e,n,r),v.toneMapping=o,$.updateMultisampleRenderTarget(V),$.updateRenderTargetMipmap(V),v.setRenderTarget(i),Ce(t,n,r)}(r,i,e,t),o.length>0&&Ce(o,e,t),null!==x&&($.updateMultisampleRenderTarget(x),$.updateRenderTargetMipmap(x)),!0===e.isScene&&e.onAfterRender(v,e,t),Q.buffers.depth.setTest(!0),Q.buffers.depth.setMask(!0),Q.buffers.color.setMask(!0),Q.setPolygonOffset(!1),ge.resetDefaultState(),_=-1,E=null,g.pop(),p=g.length>0?g[g.length-1]:null,m.pop(),f=m.length>0?m[m.length-1]:null},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return w},this.getRenderTarget=function(){return x},this.setRenderTarget=function(e,t=0,n=0){x=e,b=t,w=n,e&&void 0===J.get(e).__webglFramebuffer&&$.setupRenderTarget(e);let r=null,i=!1,o=!1;if(e){const n=e.texture;(n.isDataTexture3D||n.isDataTexture2DArray)&&(o=!0);const a=J.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=a[t],i=!0):r=e.isWebGLMultisampleRenderTarget?J.get(e).__webglMultisampledFramebuffer:a,A.copy(e.viewport),S.copy(e.scissor),O=e.scissorTest}else A.copy(N).multiplyScalar(L).floor(),S.copy(j).multiplyScalar(L).floor(),O=B;if(Q.bindFramebuffer(36160,r)&&K.drawBuffers){let t=!1;if(e)if(e.isWebGLMultipleRenderTargets){const n=e.texture;if(F.length!==n.length||36064!==F[0]){for(let e=0,t=n.length;e<t;e++)F[e]=36064+e;F.length=n.length,t=!0}}else 1===F.length&&36064===F[0]||(F[0]=36064,F.length=1,t=!0);else 1===F.length&&1029===F[0]||(F[0]=1029,F.length=1,t=!0);t&&(K.isWebGL2?ve.drawBuffers(F):Y.get("WEBGL_draw_buffers").drawBuffersWEBGL(F))}if(Q.viewport(A),Q.scissor(S),Q.setScissorTest(O),i){const r=J.get(e.texture);ve.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(o){const r=J.get(e.texture),i=t||0;ve.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=J.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){Q.bindFramebuffer(36160,s);try{const a=e.texture,s=a.format,c=a.type;if(s!==l&&me.convert(s)!==ve.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const u=1016===c&&(Y.has("EXT_color_buffer_half_float")||K.isWebGL2&&Y.has("EXT_color_buffer_float"));if(1009!==c&&me.convert(c)!==ve.getParameter(35738)&&(1015!==c||!(K.isWebGL2||Y.has("OES_texture_float")||Y.has("WEBGL_color_buffer_float")))&&!u)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===ve.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ve.readPixels(t,n,r,i,me.convert(s),me.convert(c),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{const e=null!==x?J.get(x).__webglFramebuffer:null;Q.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);let a=me.convert(t.format);K.isWebGL2&&(6407===a&&(a=32849),6408===a&&(a=32856)),$.setTexture2D(t,0),ve.copyTexImage2D(3553,n,a,e.x,e.y,i,o,0),Q.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,a=me.convert(n.format),s=me.convert(n.type);$.setTexture2D(n,0),ve.pixelStorei(37440,n.flipY),ve.pixelStorei(37441,n.premultiplyAlpha),ve.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):ve.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&ve.generateMipmap(3553),Q.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(v.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const o=e.max.x-e.min.x+1,a=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,l=me.convert(r.format),c=me.convert(r.type);let u;if(r.isDataTexture3D)$.setTexture3D(r,0),u=32879;else{if(!r.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");$.setTexture2DArray(r,0),u=35866}ve.pixelStorei(37440,r.flipY),ve.pixelStorei(37441,r.premultiplyAlpha),ve.pixelStorei(3317,r.unpackAlignment);const h=ve.getParameter(3314),d=ve.getParameter(32878),f=ve.getParameter(3316),p=ve.getParameter(3315),m=ve.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ve.pixelStorei(3314,g.width),ve.pixelStorei(32878,g.height),ve.pixelStorei(3316,e.min.x),ve.pixelStorei(3315,e.min.y),ve.pixelStorei(32877,e.min.z),n.isDataTexture||n.isDataTexture3D?ve.texSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,c,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,g.data)):ve.texSubImage3D(u,i,t.x,t.y,t.z,o,a,s,l,c,g),ve.pixelStorei(3314,h),ve.pixelStorei(32878,d),ve.pixelStorei(3316,f),ve.pixelStorei(3315,p),ve.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ve.generateMipmap(u),Q.unbindTexture()},this.initTexture=function(e){$.setTexture2D(e,0),Q.unbindTexture()},this.resetState=function(){b=0,w=0,x=null,Q.reset(),ge.reset()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}(class extends di{}).prototype.isWebGL1Renderer=!0;class fi{constructor(e,t=25e-5){this.name="",this.color=new Je(e),this.density=t}clone(){return new fi(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}fi.prototype.isFogExp2=!0;class pi{constructor(e,t=1,n=1e3){this.name="",this.color=new Je(e),this.near=t,this.far=n}clone(){return new pi(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}pi.prototype.isFog=!0;class mi extends Pe{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.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(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}mi.prototype.isScene=!0;class gi{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=f()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=f()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=f()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}gi.prototype.isInterleavedBuffer=!0;const vi=new R;class yi{constructor(e,t,n,r=!1){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.applyMatrix4(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.applyNormalMatrix(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)vi.x=this.getX(t),vi.y=this.getY(t),vi.z=this.getZ(t),vi.transformDirection(e),this.setXYZ(t,vi.x,vi.y,vi.z);return this}setX(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){return this.data.array[e*this.data.stride+this.offset]}getY(e){return this.data.array[e*this.data.stride+this.offset+1]}getZ(e){return this.data.array[e*this.data.stride+this.offset+2]}getW(e){return this.data.array[e*this.data.stride+this.offset+3]}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new nt(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new yi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}yi.prototype.isInterleavedBufferAttribute=!0;class bi extends We{constructor(e){super(),this.type="SpriteMaterial",this.color=new Je(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this}}let wi;bi.prototype.isSpriteMaterial=!0;const xi=new R,_i=new R,Ei=new R,Ai=new b,Si=new b,Mi=new se,Ti=new R,Ci=new R,Oi=new R,Ri=new b,ki=new b,Pi=new b;class Li extends Pe{constructor(e){if(super(),this.type="Sprite",void 0===wi){wi=new pt;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new gi(e,5);wi.setIndex([0,1,2,0,2,3]),wi.setAttribute("position",new yi(t,3,0,!1)),wi.setAttribute("uv",new yi(t,2,3,!1))}this.geometry=wi,this.material=void 0!==e?e:new bi,this.center=new b(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),_i.setFromMatrixScale(this.matrixWorld),Mi.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ei.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&_i.multiplyScalar(-Ei.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const o=this.center;Di(Ti.set(-.5,-.5,0),Ei,o,_i,r,i),Di(Ci.set(.5,-.5,0),Ei,o,_i,r,i),Di(Oi.set(.5,.5,0),Ei,o,_i,r,i),Ri.set(0,0),ki.set(1,0),Pi.set(1,1);let a=e.ray.intersectTriangle(Ti,Ci,Oi,!1,xi);if(null===a&&(Di(Ci.set(-.5,.5,0),Ei,o,_i,r,i),ki.set(0,1),a=e.ray.intersectTriangle(Ti,Oi,Ci,!1,xi),null===a))return;const s=e.ray.origin.distanceTo(xi);s<e.near||s>e.far||t.push({distance:s,point:xi.clone(),uv:Ve.getUV(xi,Ti,Ci,Oi,Ri,ki,Pi,new b),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Di(e,t,n,r,i,o){Ai.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Si.x=o*Ai.x-i*Ai.y,Si.y=i*Ai.x+o*Ai.y):Si.copy(Ai),e.copy(t),e.x+=Si.x,e.y+=Si.y,e.applyMatrix4(Mi)}Li.prototype.isSprite=!0;const Ii=new R,Ni=new M,ji=new M,Bi=new R,Fi=new se;class zi extends Pt{constructor(e,t){super(e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new se,this.bindMatrixInverse=new se}copy(e){return super.copy(e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new M,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;Ni.fromBufferAttribute(r.attributes.skinIndex,e),ji.fromBufferAttribute(r.attributes.skinWeight,e),Ii.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let i=0;i<4;i++){const e=ji.getComponent(i);if(0!==e){const r=Ni.getComponent(i);Fi.multiplyMatrices(n.bones[r].matrixWorld,n.boneInverses[r]),t.addScaledVector(Bi.copy(Ii).applyMatrix4(Fi),e)}}return t.applyMatrix4(this.bindMatrixInverse)}}zi.prototype.isSkinnedMesh=!0;class Hi extends Pe{constructor(){super(),this.type="Bone"}}Hi.prototype.isBone=!0;class Ui extends A{constructor(e=null,t=1,n=1,r,i,o,a,s,l=1003,c=1003,u,h){super(null,o,a,s,l,c,r,i,u,h),this.image={data:e,width:t,height:n},this.magFilter=l,this.minFilter=c,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}}Ui.prototype.isDataTexture=!0;const Vi=new se,Gi=new se,Wi=[],qi=new Pt;class Xi extends Pt{constructor(e,t,n){super(e,t),this.instanceMatrix=new nt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(e){return super.copy(e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(qi.geometry=this.geometry,qi.material=this.material,void 0!==qi.material)for(let i=0;i<r;i++){this.getMatrixAt(i,Vi),Gi.multiplyMatrices(n,Vi),qi.matrixWorld=Gi,qi.raycast(e,Wi);for(let e=0,n=Wi.length;e<n;e++){const n=Wi[e];n.instanceId=i,n.object=this,t.push(n)}Wi.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new nt(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}Xi.prototype.isInstancedMesh=!0;class Yi extends We{constructor(e){super(),this.type="LineBasicMaterial",this.color=new Je(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this}}Yi.prototype.isLineBasicMaterial=!0;const Ki=new R,Qi=new R,Zi=new se,Ji=new ae,$i=new J;class eo extends Pe{constructor(e=new pt,t=new Yi){super(),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Ki.fromBufferAttribute(t,e-1),Qi.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Ki.distanceTo(Qi);e.setAttribute("lineDistance",new ot(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),$i.copy(n.boundingSphere),$i.applyMatrix4(r),$i.radius+=i,!1===e.ray.intersectsSphere($i))return;Zi.copy(r).invert(),Ji.copy(e.ray).applyMatrix4(Zi);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a,l=new R,c=new R,u=new R,h=new R,d=this.isLineSegments?2:1;if(n.isBufferGeometry){const r=n.index,i=n.attributes.position;if(null!==r){for(let n=Math.max(0,o.start),a=Math.min(r.count,o.start+o.count)-1;n<a;n+=d){const o=r.getX(n),a=r.getX(n+1);l.fromBufferAttribute(i,o),c.fromBufferAttribute(i,a);if(Ji.distanceSqToSegment(l,c,h,u)>s)continue;h.applyMatrix4(this.matrixWorld);const d=e.ray.origin.distanceTo(h);d<e.near||d>e.far||t.push({distance:d,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;n<r;n+=d){l.fromBufferAttribute(i,n),c.fromBufferAttribute(i,n+1);if(Ji.distanceSqToSegment(l,c,h,u)>s)continue;h.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(h);r<e.near||r>e.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}eo.prototype.isLine=!0;const to=new R,no=new R;class ro extends eo{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)to.fromBufferAttribute(t,e),no.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+to.distanceTo(no);e.setAttribute("lineDistance",new ot(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}ro.prototype.isLineSegments=!0;class io extends eo{constructor(e,t){super(e,t),this.type="LineLoop"}}io.prototype.isLineLoop=!0;class oo extends We{constructor(e){super(),this.type="PointsMaterial",this.color=new Je(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this}}oo.prototype.isPointsMaterial=!0;const ao=new se,so=new ae,lo=new J,co=new R;class uo extends Pe{constructor(e=new pt,t=new oo){super(),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e){return super.copy(e),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),lo.copy(n.boundingSphere),lo.applyMatrix4(r),lo.radius+=i,!1===e.ray.intersectsSphere(lo))return;ao.copy(r).invert(),so.copy(e.ray).applyMatrix4(ao);const a=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=a*a;if(n.isBufferGeometry){const i=n.index,a=n.attributes.position;if(null!==i){for(let n=Math.max(0,o.start),l=Math.min(i.count,o.start+o.count);n<l;n++){const o=i.getX(n);co.fromBufferAttribute(a,o),ho(co,o,s,r,e,t,this)}}else{for(let n=Math.max(0,o.start),i=Math.min(a.count,o.start+o.count);n<i;n++)co.fromBufferAttribute(a,n),ho(co,n,s,r,e,t,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t<n;t++){const n=e[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}}else{const t=e.morphTargets;void 0!==t&&t.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function ho(e,t,n,r,i,o,a){const s=so.distanceSqToPoint(e);if(s<n){const n=new R;so.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;o.push({distance:l,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:a})}}uo.prototype.isPoints=!0;(class extends A{constructor(e,t,n,r,i,o,a,l,c){super(e,t,n,r,i,o,a,l,c),this.format=void 0!==a?a:1022,this.minFilter=void 0!==o?o:s,this.magFilter=void 0!==i?i:s,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){u.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}).prototype.isVideoTexture=!0;class fo extends A{constructor(e,t,n,r,i,o,a,s,l,c,u,h){super(null,o,a,s,l,c,r,i,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}fo.prototype.isCompressedTexture=!0;(class extends A{constructor(e,t,n,r,i,o,a,s,l){super(e,t,n,r,i,o,a,s,l),this.needsUpdate=!0}}).prototype.isCanvasTexture=!0;(class extends A{constructor(e,t,n,r,i,o,a,s,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===c&&(n=1012),void 0===n&&1027===c&&(n=1020),super(null,r,i,o,a,s,c,n,l),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}}).prototype.isDepthTexture=!0;class po extends pt{constructor(e=1,t=1,n=1,r=8,i=1,o=!1,a=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s};const l=this;r=Math.floor(r),i=Math.floor(i);const c=[],u=[],h=[],d=[];let f=0;const p=[],m=n/2;let g=0;function v(n){const i=f,o=new b,p=new R;let v=0;const y=!0===n?e:t,w=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*w,0),h.push(0,w,0),d.push(.5,.5),f++;const x=f;for(let e=0;e<=r;e++){const t=e/r*s+a,n=Math.cos(t),i=Math.sin(t);p.x=y*i,p.y=m*w,p.z=y*n,u.push(p.x,p.y,p.z),h.push(0,w,0),o.x=.5*n+.5,o.y=.5*i*w+.5,d.push(o.x,o.y),f++}for(let e=0;e<r;e++){const t=i+e,r=x+e;!0===n?c.push(r,r+1,t):c.push(r+1,r,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const o=new R,v=new R;let y=0;const b=(t-e)/n;for(let l=0;l<=i;l++){const c=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*s+a,l=Math.sin(i),p=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*p,u.push(v.x,v.y,v.z),o.set(l,b,p).normalize(),h.push(o.x,o.y,o.z),d.push(t,1-g),c.push(f++)}p.push(c)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=p[t][e],r=p[t+1][e],i=p[t+1][e+1],o=p[t][e+1];c.push(n,r,o),c.push(r,i,o),y+=6}l.addGroup(g,y,0),g+=y}(),!1===o&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new ot(u,3)),this.setAttribute("normal",new ot(h,3)),this.setAttribute("uv",new ot(d,2))}static fromJSON(e){return new po(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class mo extends po{constructor(e=1,t=1,n=8,r=1,i=!1,o=0,a=2*Math.PI){super(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}}static fromJSON(e){return new mo(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}new R,new R,new R,new Ve;class go{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let a,s=0,l=i-1;for(;s<=l;)if(r=Math.floor(s+(l-s)/2),a=n[r]-o,a<0)s=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(r=l,n[r]===o)return r/(i-1);const c=n[r];return(r+(o-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){let n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);const i=this.getPoint(n),o=this.getPoint(r),a=t||(i.isVector2?new b:new R);return a.copy(o).sub(i).normalize(),a}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new R,r=[],i=[],o=[],a=new R,s=new se;for(let d=0;d<=e;d++){const t=d/e;r[d]=this.getTangentAt(t,new R),r[d].normalize()}i[0]=new R,o[0]=new R;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),h=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),h<=l&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(let d=1;d<=e;d++){if(i[d]=i[d-1].clone(),o[d]=o[d-1].clone(),a.crossVectors(r[d-1],r[d]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(p(r[d-1].dot(r[d]),-1,1));i[d].applyMatrix4(s.makeRotationAxis(a,e))}o[d].crossVectors(r[d],i[d])}if(!0===t){let t=Math.acos(p(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vo extends go{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,a=!1,s=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=a,this.aRotation=s}getPoint(e,t){const n=t||new b,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)<Number.EPSILON;for(;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);const a=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(a),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=l-this.aY;s=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(s,l)}copy(e){return super.copy(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}toJSON(){const e=super.toJSON();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}fromJSON(e){return super.fromJSON(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}}vo.prototype.isEllipseCurve=!0;class yo extends vo{constructor(e,t,n,r,i,o){super(e,t,n,n,r,i,o),this.type="ArcCurve"}}function bo(){let 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){let l=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(r-t)/(a+s)+(r-n)/s;l*=a,c*=a,i(t,n,l,c)},calc:function(i){const o=i*i;return e+t*i+n*o+r*(o*i)}}}yo.prototype.isArcCurve=!0;const wo=new R,xo=new bo,_o=new bo,Eo=new bo;class Ao extends go{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new R){const n=t,r=this.points,i=r.length,o=(i-(this.closed?0:1))*e;let a,s,l=Math.floor(o),c=o-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?a=r[(l-1)%i]:(wo.subVectors(r[0],r[1]).add(r[0]),a=wo);const u=r[l%i],h=r[(l+1)%i];if(this.closed||l+2<i?s=r[(l+2)%i]:(wo.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=wo),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(a.distanceToSquared(u),e),n=Math.pow(u.distanceToSquared(h),e),r=Math.pow(h.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),xo.initNonuniformCatmullRom(a.x,u.x,h.x,s.x,t,n,r),_o.initNonuniformCatmullRom(a.y,u.y,h.y,s.y,t,n,r),Eo.initNonuniformCatmullRom(a.z,u.z,h.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(xo.initCatmullRom(a.x,u.x,h.x,s.x,this.tension),_o.initCatmullRom(a.y,u.y,h.y,s.y,this.tension),Eo.initCatmullRom(a.z,u.z,h.z,s.z,this.tension));return n.set(xo.calc(c),_o.calc(c),Eo.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new R).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function So(e,t,n,r,i){const 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 Mo(e,t,n,r){return function(e,t){const 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 To(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const 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)}Ao.prototype.isCatmullRomCurve3=!0;class Co extends go{constructor(e=new b,t=new b,n=new b,r=new b){super(),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new b){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(To(e,r.x,i.x,o.x,a.x),To(e,r.y,i.y,o.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Co.prototype.isCubicBezierCurve=!0;class Oo extends go{constructor(e=new R,t=new R,n=new R,r=new R){super(),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new R){const n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(To(e,r.x,i.x,o.x,a.x),To(e,r.y,i.y,o.y,a.y),To(e,r.z,i.z,o.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}Oo.prototype.isCubicBezierCurve3=!0;class Ro extends go{constructor(e=new b,t=new b){super(),this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new b){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new b;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Ro.prototype.isLineCurve=!0;class ko extends go{constructor(e=new b,t=new b,n=new b){super(),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new b){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(Mo(e,r.x,i.x,o.x),Mo(e,r.y,i.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}ko.prototype.isQuadraticBezierCurve=!0;class Po extends go{constructor(e=new R,t=new R,n=new R){super(),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new R){const n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(Mo(e,r.x,i.x,o.x),Mo(e,r.y,i.y,o.y),Mo(e,r.z,i.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}Po.prototype.isQuadraticBezierCurve3=!0;class Lo extends go{constructor(e=[]){super(),this.type="SplineCurve",this.points=e}getPoint(e,t=new b){const n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],l=r[o],c=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(So(a,s.x,l.x,c.x,u.x),So(a,s.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new b).fromArray(n))}return this}}Lo.prototype.isSplineCurve=!0;var Do=Object.freeze({__proto__:null,ArcCurve:yo,CatmullRomCurve3:Ao,CubicBezierCurve:Co,CubicBezierCurve3:Oo,EllipseCurve:vo,LineCurve:Ro,LineCurve3:class extends go{constructor(e=new R,t=new R){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=e,this.v2=t}getPoint(e,t=new R){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}},QuadraticBezierCurve:ko,QuadraticBezierCurve3:Po,SplineCurve:Lo});const Io=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let o=No(e,0,i,n,!0);const a=[];if(!o||o.next===o.prev)return a;let s,l,c,u,h,d,f;if(r&&(o=function(e,t,n,r){const i=[];let o,a,s,l,c;for(o=0,a=t.length;o<a;o++)s=t[o]*r,l=o<a-1?t[o+1]*r:e.length,c=No(e,s,l,r,!1),c===c.next&&(c.steiner=!0),i.push(Xo(c));for(i.sort(Vo),o=0;o<i.length;o++)Go(i[o],n),n=jo(n,n.next);return n}(e,t,o,n)),e.length>80*n){s=c=e[0],l=u=e[1];for(let t=n;t<i;t+=n)h=e[t],d=e[t+1],h<s&&(s=h),d<l&&(l=d),h>c&&(c=h),d>u&&(u=d);f=Math.max(c-s,u-l),f=0!==f?1/f:0}return Bo(o,a,n,s,l,f),a};function No(e,t,n,r,i){let o,a;if(i===function(e,t,n,r){let i=0;for(let 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=ra(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=ra(o,e[o],e[o+1],a);return a&&Zo(a,a.next)&&(ia(a),a=a.next),a}function jo(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!Zo(r,r.next)&&0!==Qo(r.prev,r,r.next))r=r.next;else{if(ia(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function Bo(e,t,n,r,i,o,a){if(!e)return;!a&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=qo(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){let t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ,r);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);let s,l,c=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,o?zo(e,r,i,o):Fo(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),ia(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?Bo(e=Ho(jo(e),t,n),t,n,r,i,o,2):2===a&&Uo(e,t,n,r,i,o):Bo(jo(e),t,n,r,i,o,1);break}}function Fo(e){const t=e.prev,n=e,r=e.next;if(Qo(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(Yo(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function zo(e,t,n,r){const i=e.prev,o=e,a=e.next;if(Qo(i,o,a)>=0)return!1;const s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=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=qo(s,l,t,n,r),d=qo(c,u,t,n,r);let f=e.prevZ,p=e.nextZ;for(;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&Yo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Ho(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!Zo(i,o)&&Jo(i,r,r.next,o)&&ta(i,o)&&ta(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),ia(r),ia(r.next),r=e=o),r=r.next}while(r!==e);return jo(r)}function Uo(e,t,n,r,i,o){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Ko(a,e)){let s=na(a,e);return a=jo(a,a.next),s=jo(s,s.next),Bo(a,t,n,r,i,o),void Bo(s,t,n,r,i,o)}e=e.next}a=a.next}while(a!==e)}function Vo(e,t){return e.x-t.x}function Go(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a){if(a=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!o)return null;if(r===a)return o;const s=o,l=o.x,c=o.y;let u,h=1/0;n=o;do{r>=n.x&&n.x>=l&&r!==n.x&&Yo(i<c?r:a,i,l,c,i<c?a:r,i,n.x,n.y)&&(u=Math.abs(i-n.y)/(r-n.x),ta(n,e)&&(u<h||u===h&&(n.x>o.x||n.x===o.x&&Wo(o,n)))&&(o=n,h=u)),n=n.next}while(n!==s);return o}(e,t)){const n=na(t,e);jo(t,t.next),jo(n,n.next)}}function Wo(e,t){return Qo(e.prev,e,t.prev)<0&&Qo(t.next,e,e.next)<0}function qo(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 Xo(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function Yo(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 Ko(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Jo(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(ta(e,t)&&ta(t,e)&&function(e,t){let n=e,r=!1;const 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)&&(Qo(e.prev,e,t.prev)||Qo(e,t.prev,t))||Zo(e,t)&&Qo(e.prev,e,e.next)>0&&Qo(t.prev,t,t.next)>0)}function Qo(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Zo(e,t){return e.x===t.x&&e.y===t.y}function Jo(e,t,n,r){const i=ea(Qo(e,t,n)),o=ea(Qo(e,t,r)),a=ea(Qo(n,r,e)),s=ea(Qo(n,r,t));return i!==o&&a!==s||(!(0!==i||!$o(e,n,t))||(!(0!==o||!$o(e,r,t))||(!(0!==a||!$o(n,e,r))||!(0!==s||!$o(n,t,r)))))}function $o(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function ea(e){return e>0?1:e<0?-1:0}function ta(e,t){return Qo(e.prev,e,e.next)<0?Qo(e,t,e.next)>=0&&Qo(e,e.prev,t)>=0:Qo(e,t,e.prev)<0||Qo(e,e.next,t)<0}function na(e,t){const n=new oa(e.i,e.x,e.y),r=new oa(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 ra(e,t,n,r){const i=new oa(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 ia(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 oa(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}class aa{static area(e){const t=e.length;let n=0;for(let 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}static isClockWise(e){return aa.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];sa(e),la(n,e);let o=e.length;t.forEach(sa);for(let s=0;s<t.length;s++)r.push(o),o+=t[s].length,la(n,t[s]);const a=Io(n,r);for(let s=0;s<a.length;s+=3)i.push(a.slice(s,s+3));return i}}function sa(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function la(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class ca extends pt{constructor(e,t){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let a=0,s=e.length;a<s;a++){o(e[a])}function o(e){const o=[],a=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1;let l=void 0!==t.depth?t.depth:100,c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:6,h=void 0!==t.bevelSize?t.bevelSize:u-2,d=void 0!==t.bevelOffset?t.bevelOffset:0,f=void 0!==t.bevelSegments?t.bevelSegments:3;const p=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:ua;void 0!==t.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=t.amount);let g,v,y,w,x,_=!1;p&&(g=p.getSpacedPoints(s),_=!0,c=!1,v=p.computeFrenetFrames(s,!1),y=new R,w=new R,x=new R),c||(f=0,u=0,h=0,d=0);const E=e.extractPoints(a);let A=E.shape;const S=E.holes;if(!aa.isClockWise(A)){A=A.reverse();for(let e=0,t=S.length;e<t;e++){const t=S[e];aa.isClockWise(t)&&(S[e]=t.reverse())}}const M=aa.triangulateShape(A,S),T=A;for(let t=0,n=S.length;t<n;t++){const e=S[t];A=A.concat(e)}function C(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const O=A.length,k=M.length;function P(e,t,n){let r,i,o;const a=e.x-t.x,s=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=a*a+s*s,h=a*c-s*l;if(Math.abs(h)>Number.EPSILON){const h=Math.sqrt(u),d=Math.sqrt(l*l+c*c),f=t.x-s/h,p=t.y+a/h,m=((n.x-c/d-f)*c-(n.y+l/d-p)*l)/(a*c-s*l);r=f+a*m-e.x,i=p+s*m-e.y;const g=r*r+i*i;if(g<=2)return new b(r,i);o=Math.sqrt(g/2)}else{let e=!1;a>Number.EPSILON?l>Number.EPSILON&&(e=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(c)&&(e=!0),e?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new b(r/o,i/o)}const L=[];for(let t=0,n=T.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),L[t]=P(T[t],T[r],T[i]);const D=[];let I,N=L.concat();for(let t=0,n=S.length;t<n;t++){const e=S[t];I=[];for(let t=0,n=e.length,r=n-1,i=t+1;t<n;t++,r++,i++)r===n&&(r=0),i===n&&(i=0),I[t]=P(e[t],e[r],e[i]);D.push(I),N=N.concat(I)}for(let t=0;t<f;t++){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+d;for(let t=0,i=T.length;t<i;t++){const e=C(T[t],L[t],r);F(e.x,e.y,-n)}for(let t=0,i=S.length;t<i;t++){const e=S[t];I=D[t];for(let t=0,i=e.length;t<i;t++){const i=C(e[t],I[t],r);F(i.x,i.y,-n)}}}const j=h+d;for(let t=0;t<O;t++){const e=c?C(A[t],N[t],j):A[t];_?(w.copy(v.normals[0]).multiplyScalar(e.x),y.copy(v.binormals[0]).multiplyScalar(e.y),x.copy(g[0]).add(w).add(y),F(x.x,x.y,x.z)):F(e.x,e.y,0)}for(let t=1;t<=s;t++)for(let e=0;e<O;e++){const n=c?C(A[e],N[e],j):A[e];_?(w.copy(v.normals[t]).multiplyScalar(n.x),y.copy(v.binormals[t]).multiplyScalar(n.y),x.copy(g[t]).add(w).add(y),F(x.x,x.y,x.z)):F(n.x,n.y,l/s*t)}for(let t=f-1;t>=0;t--){const e=t/f,n=u*Math.cos(e*Math.PI/2),r=h*Math.sin(e*Math.PI/2)+d;for(let t=0,i=T.length;t<i;t++){const e=C(T[t],L[t],r);F(e.x,e.y,l+n)}for(let t=0,i=S.length;t<i;t++){const e=S[t];I=D[t];for(let t=0,i=e.length;t<i;t++){const i=C(e[t],I[t],r);_?F(i.x,i.y+g[s-1].y,g[s-1].x+n):F(i.x,i.y,l+n)}}}function B(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+2*f;e<n;e++){const n=O*e,o=O*(e+1);H(t+r+n,t+i+n,t+i+o,t+r+o)}}}function F(e,t,n){o.push(e),o.push(t),o.push(n)}function z(e,t,i){U(e),U(t),U(i);const o=r.length/3,a=m.generateTopUV(n,r,o-3,o-2,o-1);V(a[0]),V(a[1]),V(a[2])}function H(e,t,i,o){U(e),U(t),U(o),U(t),U(i),U(o);const a=r.length/3,s=m.generateSideWallUV(n,r,a-6,a-3,a-2,a-1);V(s[0]),V(s[1]),V(s[3]),V(s[1]),V(s[2]),V(s[3])}function U(e){r.push(o[3*e+0]),r.push(o[3*e+1]),r.push(o[3*e+2])}function V(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=O*e;for(let n=0;n<k;n++){const e=M[n];z(e[2]+t,e[1]+t,e[0]+t)}e=s+2*f,t=O*e;for(let n=0;n<k;n++){const e=M[n];z(e[0]+t,e[1]+t,e[2]+t)}}else{for(let e=0;e<k;e++){const t=M[e];z(t[2],t[1],t[0])}for(let e=0;e<k;e++){const t=M[e];z(t[0]+O*s,t[1]+O*s,t[2]+O*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;B(T,t),t+=T.length;for(let n=0,r=S.length;n<r;n++){const e=S[n];B(e,t),t+=e.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new ot(r,3)),this.setAttribute("uv",new ot(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let r=0,i=e.length;r<i;r++){const t=e[r];n.shapes.push(t.uuid)}else n.shapes.push(e.uuid);void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON());return n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let i=0,o=e.shapes.length;i<o;i++){const r=t[e.shapes[i]];n.push(r)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new Do[r.type]).fromJSON(r)),new ca(n,e.options)}}const ua={generateTopUV:function(e,t,n,r,i){const o=t[3*n],a=t[3*n+1],s=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new b(o,a),new b(s,l),new b(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){const a=t[3*n],s=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*o],g=t[3*o+1],v=t[3*o+2];return Math.abs(s-u)<Math.abs(a-c)?[new b(a,1-l),new b(c,1-h),new b(d,1-p),new b(m,1-v)]:[new b(s,1-l),new b(u,1-h),new b(f,1-p),new b(g,1-v)]}};class ha extends pt{constructor(e,t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],o=[];let a=0,s=0;if(!1===Array.isArray(e))l(e);else for(let c=0;c<e.length;c++)l(e[c]),this.addGroup(a,s,c),a+=s,s=0;function l(e){const a=r.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===aa.isClockWise(c)&&(c=c.reverse());for(let t=0,n=u.length;t<n;t++){const e=u[t];!0===aa.isClockWise(e)&&(u[t]=e.reverse())}const h=aa.triangulateShape(c,u);for(let t=0,n=u.length;t<n;t++){const e=u[t];c=c.concat(e)}for(let t=0,n=c.length;t<n;t++){const e=c[t];r.push(e.x,e.y,0),i.push(0,0,1),o.push(e.x,e.y)}for(let t=0,r=h.length;t<r;t++){const e=h[t],r=e[0]+a,i=e[1]+a,o=e[2]+a;n.push(r,i,o),s+=3}}this.setIndex(n),this.setAttribute("position",new ot(r,3)),this.setAttribute("normal",new ot(i,3)),this.setAttribute("uv",new ot(o,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new ha(n,e.curveSegments)}}class da extends pt{constructor(e=1,t=8,n=6,r=0,i=2*Math.PI,o=0,a=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:o,thetaLength:a},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(o+a,Math.PI);let l=0;const c=[],u=new R,h=new R,d=[],f=[],p=[],m=[];for(let g=0;g<=n;g++){const d=[],v=g/n;let y=0;0==g&&0==o?y=.5/t:g==n&&s==Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const s=n/t;u.x=-e*Math.cos(r+s*i)*Math.sin(o+v*a),u.y=e*Math.cos(o+v*a),u.z=e*Math.sin(r+s*i)*Math.sin(o+v*a),f.push(u.x,u.y,u.z),h.copy(u).normalize(),p.push(h.x,h.y,h.z),m.push(s+y,1-v),d.push(l++)}c.push(d)}for(let g=0;g<n;g++)for(let e=0;e<t;e++){const t=c[g][e+1],r=c[g][e],i=c[g+1][e],a=c[g+1][e+1];(0!==g||o>0)&&d.push(t,r,a),(g!==n-1||s<Math.PI)&&d.push(r,i,a)}this.setIndex(d),this.setAttribute("position",new ot(f,3)),this.setAttribute("normal",new ot(p,3)),this.setAttribute("uv",new ot(m,2))}static fromJSON(e){return new da(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class fa extends pt{constructor(e,t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const o=e.computeFrenetFrames(t,i);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const a=new R,s=new R,l=new b;let c=new R;const u=[],h=[],d=[],f=[];function p(i){c=e.getPointAt(i/t,c);const l=o.normals[i],d=o.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),o=-Math.cos(t);s.x=o*l.x+i*d.x,s.y=o*l.y+i*d.y,s.z=o*l.z+i*d.z,s.normalize(),h.push(s.x,s.y,s.z),a.x=c.x+n*s.x,a.y=c.y+n*s.y,a.z=c.z+n*s.z,u.push(a.x,a.y,a.z)}}!function(){for(let e=0;e<t;e++)p(e);p(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,d.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),o=(r+1)*e+t,a=(r+1)*(e-1)+t;f.push(n,i,a),f.push(i,o,a)}}()}(),this.setIndex(f),this.setAttribute("position",new ot(u,3)),this.setAttribute("normal",new ot(h,3)),this.setAttribute("uv",new ot(d,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new fa((new Do[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class pa extends We{constructor(e){super(),this.type="ShadowMaterial",this.color=new Je(0),this.transparent=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this}}pa.prototype.isShadowMaterial=!0;class ma extends Bt{constructor(e){super(e),this.type="RawShaderMaterial"}}ma.prototype.isRawShaderMaterial=!0;class ga extends We{constructor(e){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Je(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(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.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.vertexTangents=!1,this.setValues(e)}copy(e){return super.copy(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.normalMapType=e.normalMapType,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.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this.vertexTangents=e.vertexTangents,this}}ga.prototype.isMeshStandardMaterial=!0;class va extends ga{constructor(e){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new b(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(e){this.reflectivity=p(2.5*(e-1)/(e+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.thickness=.01,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new Je(1,1,1),this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new Je).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this}}va.prototype.isMeshPhysicalMaterial=!0;class ya extends We{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Je(16777215),this.specular=new Je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(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.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(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.normalMapType=e.normalMapType,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.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}ya.prototype.isMeshPhongMaterial=!0;class ba extends We{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,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.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}ba.prototype.isMeshToonMaterial=!0;class wa extends We{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,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.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}wa.prototype.isMeshNormalMaterial=!0;class xa extends We{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Je(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.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}copy(e){return super.copy(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.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this}}xa.prototype.isMeshLambertMaterial=!0;class _a extends We{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new b(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.morphTargets=!1,this.morphNormals=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this.flatShading=e.flatShading,this}}_a.prototype.isMeshMatcapMaterial=!0;class Ea extends Yi{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}Ea.prototype.isLineDashedMaterial=!0;const Aa={arraySlice:function(e,t,n){return Aa.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){const t=e.length,n=new Array(t);for(let 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){const r=e.length,i=new e.constructor(r);for(let o=0,a=0;a!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let a=o[r];if(void 0!==a)if(Array.isArray(a))do{a=o[r],void 0!==a&&(t.push(o.time),n.push.apply(n,a)),o=e[i++]}while(void 0!==o);else if(void 0!==a.toArray)do{a=o[r],void 0!==a&&(t.push(o.time),a.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{a=o[r],void 0!==a&&(t.push(o.time),n.push(a)),o=e[i++]}while(void 0!==o)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const a=[];for(let l=0;l<o.tracks.length;++l){const e=o.tracks[l],t=e.getValueSize(),s=[],c=[];for(let o=0;o<e.times.length;++o){const a=e.times[o]*i;if(!(a<n||a>=r)){s.push(e.times[o]);for(let n=0;n<t;++n)c.push(e.values[o*t+n])}}0!==s.length&&(e.times=Aa.convertArray(s,e.times.constructor),e.values=Aa.convertArray(c,e.values.constructor),a.push(e))}o.tracks=a;let s=1/0;for(let l=0;l<o.tracks.length;++l)s>o.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,o=t/r;for(let a=0;a<i;++a){const t=n.tracks[a],r=t.ValueTypeName;if("bool"===r||"string"===r)continue;const i=e.tracks.find((function(e){return e.name===t.name&&e.ValueTypeName===r}));if(void 0===i)continue;let s=0;const l=t.getValueSize();t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);let c=0;const u=i.getValueSize();i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const h=t.times.length-1;let d;if(o<=t.times[0]){const e=s,n=l-s;d=Aa.arraySlice(t.values,e,n)}else if(o>=t.times[h]){const e=h*l+s,n=e+l-s;d=Aa.arraySlice(t.values,e,n)}else{const e=t.createInterpolant(),n=s,r=l-s;e.evaluate(o),d=Aa.arraySlice(e.resultBuffer,n,r)}if("quaternion"===r){(new O).fromArray(d).normalize().conjugate().toArray(d)}const f=i.times.length;for(let e=0;e<f;++e){const t=e*u+c;if("quaternion"===r)O.multiplyQuaternionsFlat(i.values,t,d,0,i.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)i.values[t+n]-=d[n]}}}return e.blendMode=2501,e}};class Sa{constructor(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,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let o;n:{r:if(!(e<r)){for(let o=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===o)break;if(i=r,r=t[++n],e<r)break t}o=t.length;break n}if(e>=i)break e;{const a=t[1];e<a&&(n=2,i=a);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===o)break;if(r=i,i=t[--n-1],e>=i)break t}o=n,n=0}}for(;n<o;){const r=n+o>>>1;e<t[r]?o=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)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)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let o=0;o!==r;++o)t[o]=n[i+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}Sa.prototype.beforeStart_=Sa.prototype.copySampleValue_,Sa.prototype.afterEnd_=Sa.prototype.copySampleValue_;class Ma extends Sa{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(e,t,n){const r=this.parameterPositions;let 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:i=r.length-2,a=t+r[i]-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}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-a),this._weightNext=l/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-h*m+2*h*p-h*f,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*f+1,y=(-1-d)*m+(1.5+d)*p+.5*f,b=d*m-d*p;for(let w=0;w!==a;++w)i[w]=g*o[c+w]+v*o[l+w]+y*o[s+w]+b*o[u+w];return i}}class Ta extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=(n-t)/(r-t),u=1-c;for(let h=0;h!==a;++h)i[h]=o[l+h]*u+o[s+h]*c;return i}}class Ca extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Oa{constructor(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=Aa.convertArray(t,this.TimeBufferType),this.values=Aa.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Aa.convertArray(e.times,Array),values:Aa.convertArray(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new Ca(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Ta(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Ma(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case 2300:t=this.InterpolantFactoryMethodDiscrete;break;case 2301:t=this.InterpolantFactoryMethodLinear;break;case 2302:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==o&&n[o]>t;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=Aa.arraySlice(n,i,o),this.values=Aa.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==i;a++){const t=n[a];if("number"===typeof t&&isNaN(t)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,t),e=!1;break}if(null!==o&&o>t){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,t,o),e=!1;break}o=t}if(void 0!==r&&Aa.isTypedArray(r))for(let a=0,s=r.length;a!==s;++a){const t=r[a];if(isNaN(t)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,t),e=!1;break}}return e}optimize(){const e=Aa.arraySlice(this.times),t=Aa.arraySlice(this.values),n=this.getValueSize(),r=2302===this.getInterpolation(),i=e.length-1;let o=1;for(let a=1;a<i;++a){let i=!1;const s=e[a];if(s!==e[a+1]&&(1!==a||s!==e[0]))if(r)i=!0;else{const e=a*n,r=e-n,o=e+n;for(let a=0;a!==n;++a){const n=t[e+a];if(n!==t[r+a]||n!==t[o+a]){i=!0;break}}}if(i){if(a!==o){e[o]=e[a];const r=a*n,i=o*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++o}}if(i>0){e[o]=e[i];for(let e=i*n,r=o*n,a=0;a!==n;++a)t[r+a]=t[e+a];++o}return o!==e.length?(this.times=Aa.arraySlice(e,0,o),this.values=Aa.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=Aa.arraySlice(this.times,0),t=Aa.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Oa.prototype.TimeBufferType=Float32Array,Oa.prototype.ValueBufferType=Float32Array,Oa.prototype.DefaultInterpolation=2301;class Ra extends Oa{}Ra.prototype.ValueTypeName="bool",Ra.prototype.ValueBufferType=Array,Ra.prototype.DefaultInterpolation=2300,Ra.prototype.InterpolantFactoryMethodLinear=void 0,Ra.prototype.InterpolantFactoryMethodSmooth=void 0;class ka extends Oa{}ka.prototype.ValueTypeName="color";class Pa extends Oa{}Pa.prototype.ValueTypeName="number";class La extends Sa{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t);let l=e*a;for(let c=l+a;l!==c;l+=4)O.slerpFlat(i,0,o,l-a,o,l,s);return i}}class Da extends Oa{InterpolantFactoryMethodLinear(e){return new La(this.times,this.values,this.getValueSize(),e)}}Da.prototype.ValueTypeName="quaternion",Da.prototype.DefaultInterpolation=2301,Da.prototype.InterpolantFactoryMethodSmooth=void 0;class Ia extends Oa{}Ia.prototype.ValueTypeName="string",Ia.prototype.ValueBufferType=Array,Ia.prototype.DefaultInterpolation=2300,Ia.prototype.InterpolantFactoryMethodLinear=void 0,Ia.prototype.InterpolantFactoryMethodSmooth=void 0;class Na extends Oa{}Na.prototype.ValueTypeName="vector";class ja{constructor(e,t=-1,n,r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=f(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let o=0,a=n.length;o!==a;++o)t.push(Ba(n[o]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let i=0,o=n.length;i!==o;++i)t.push(Oa.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let a=0;a<i;a++){let e=[],s=[];e.push((a+i-1)%i,a,(a+1)%i),s.push(0,1,0);const l=Aa.getKeyframeOrder(e);e=Aa.sortedArray(e,1,l),s=Aa.sortedArray(s,1,l),r||0!==e[0]||(e.push(i),s.push(s[0])),o.push(new Pa(".morphTargetInfluences["+t[a].name+"]",e,s).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let r=0;r<n.length;r++)if(n[r].name===t)return n[r];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let a=0,s=e.length;a<s;a++){const t=e[a],n=t.name.match(i);if(n&&n.length>1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],a=[];Aa.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode;let s=e.length||-1;const l=e.hierarchy||[];for(let c=0;c<l.length;c++){const e=l[c].keys;if(e&&0!==e.length)if(e[0].morphTargets){const t={};let n;for(n=0;n<e.length;n++)if(e[n].morphTargets)for(let r=0;r<e[n].morphTargets.length;r++)t[e[n].morphTargets[r]]=-1;for(const i in t){const t=[],o=[];for(let r=0;r!==e[n].morphTargets.length;++r){const r=e[n];t.push(r.time),o.push(r.morphTarget===i?1:0)}r.push(new Pa(".morphTargetInfluence["+i+"]",t,o))}s=t.length*(o||1)}else{const i=".bones["+t[c].name+"]";n(Na,i+".position",e,"pos",r),n(Da,i+".quaternion",e,"rot",r),n(Na,i+".scale",e,"scl",r)}}if(0===r.length)return null;return new this(i,s,r,a)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Ba(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Pa;case"vector":case"vector2":case"vector3":case"vector4":return Na;case"color":return ka;case"quaternion":return Da;case"bool":case"boolean":return Ra;case"string":return Ia}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];Aa.flattenJSON(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const Fa={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={}}};class za{constructor(e,t,n){const r=this;let i=!1,o=0,a=0,s=void 0;const l=[];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},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const Ha=new za;class Ua{constructor(e){this.manager=void 0!==e?e:Ha,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const Va={};class Ga extends Ua{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.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!==Va[e])return void Va[e].push({onLoad:t,onProgress:n,onError:r});const a=e.match(/^data:(.*?)(;base64)?,(.*)$/);let s;if(a){const n=a[1],o=!!a[2];let s=a[3];s=decodeURIComponent(s),o&&(s=atob(s));try{let r;const o=(this.responseType||"").toLowerCase();switch(o){case"arraybuffer":case"blob":const e=new Uint8Array(s.length);for(let n=0;n<s.length;n++)e[n]=s.charCodeAt(n);r="blob"===o?new Blob([e.buffer],{type:n}):e.buffer;break;case"document":const t=new DOMParser;r=t.parseFromString(s,n);break;case"json":r=JSON.parse(s);break;default:r=s}setTimeout((function(){t&&t(r),i.manager.itemEnd(e)}),0)}catch(l){setTimeout((function(){r&&r(l),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{Va[e]=[],Va[e].push({onLoad:t,onProgress:n,onError:r}),s=new XMLHttpRequest,s.open("GET",e,!0),s.addEventListener("load",(function(t){const n=this.response,r=Va[e];if(delete Va[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),Fa.add(e,n);for(let e=0,t=r.length;e<t;e++){const t=r[e];t.onLoad&&t.onLoad(n)}i.manager.itemEnd(e)}else{for(let e=0,n=r.length;e<n;e++){const n=r[e];n.onError&&n.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),s.addEventListener("progress",(function(t){const n=Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onProgress&&r.onProgress(t)}}),!1),s.addEventListener("error",(function(t){const n=Va[e];delete Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),s.addEventListener("abort",(function(t){const n=Va[e];delete Va[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(s.responseType=this.responseType),void 0!==this.withCredentials&&(s.withCredentials=this.withCredentials),s.overrideMimeType&&s.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain");for(const e in this.requestHeader)s.setRequestHeader(e,this.requestHeader[e]);s.send(null)}return i.manager.itemStart(e),s}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Wa extends Ua{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),Fa.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return a.addEventListener("load",s,!1),a.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}class qa extends Ua{constructor(e){super(e)}load(e,t,n,r){const i=new Ut,o=new Wa(this.manager);o.setCrossOrigin(this.crossOrigin),o.setPath(this.path);let a=0;function s(n){o.load(e[n],(function(e){i.images[n]=e,a++,6===a&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let l=0;l<e.length;++l)s(l);return i}}class Xa extends Ua{constructor(e){super(e)}load(e,t,n,r){const i=new A,o=new Wa(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;const r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:l,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class Ya extends go{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Ro(t,e))}getPoint(e){const t=e*this.getLength(),n=this.getCurveLengths();let r=0;for(;r<n.length;){if(n[r]>=t){const e=n[r]-t,i=this.curves[r],o=i.getLength(),a=0===o?0:1-e/o;return i.getPointAt(a)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const o=i[r],a=o&&o.isEllipseCurve?2*e:o&&(o.isLineCurve||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a);for(let e=0;e<s.length;e++){const r=s[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new Do[n.type]).fromJSON(n))}return this}}class Ka extends Ya{constructor(e){super(),this.type="Path",this.currentPoint=new b,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Ro(this.currentPoint.clone(),new b(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new ko(this.currentPoint.clone(),new b(e,t),new b(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,o){const a=new Co(this.currentPoint.clone(),new b(e,t),new b(n,r),new b(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Lo(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,o){const a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this}absarc(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this}ellipse(e,t,n,r,i,o,a,s){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,a,s),this}absellipse(e,t,n,r,i,o,a,s){const l=new vo(e,t,n,r,i,o,a,s);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Qa extends Ka{constructor(e){super(e),this.uuid=f(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new Ka).fromJSON(n))}return this}}class Za extends Pe{constructor(e,t=1){super(),this.type="Light",this.color=new Je(e),this.intensity=t}dispose(){}copy(e){return super.copy(e),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(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}}Za.prototype.isLight=!0;class Ja extends Za{constructor(e,t,n){super(e,n),this.type="HemisphereLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.groundColor=new Je(t)}copy(e){return Za.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}Ja.prototype.isHemisphereLight=!0;const $a=new se,es=new R,ts=new R;class ns{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new b(512,512),this.map=null,this.mapPass=null,this.matrix=new se,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Qt,this._frameExtents=new b(1,1),this._viewportCount=1,this._viewports=[new M(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;es.setFromMatrixPosition(e.matrixWorld),t.position.copy(es),ts.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(ts),t.updateMatrixWorld(),$a.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix($a),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),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}}class rs extends ns{constructor(){super(new zt(50,1,.5,500)),this.focus=1}updateMatrices(e){const t=this.camera,n=2*d*e.angle*this.focus,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()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}rs.prototype.isSpotLightShadow=!0;class is extends Za{constructor(e,t,n=0,r=Math.PI/3,i=0,o=1){super(e,t),this.type="SpotLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.target=new Pe,this.distance=n,this.angle=r,this.penumbra=i,this.decay=o,this.shadow=new rs}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e){return super.copy(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}}is.prototype.isSpotLight=!0;const os=new se,as=new R,ss=new R;class ls extends ns{constructor(){super(new zt(90,1,.5,500)),this._frameExtents=new b(4,2),this._viewportCount=6,this._viewports=[new M(2,1,1,1),new M(0,1,1,1),new M(3,1,1,1),new M(1,1,1,1),new M(3,0,1,1),new M(1,0,1,1)],this._cubeDirections=[new R(1,0,0),new R(-1,0,0),new R(0,0,1),new R(0,0,-1),new R(0,1,0),new R(0,-1,0)],this._cubeUps=[new R(0,1,0),new R(0,1,0),new R(0,1,0),new R(0,1,0),new R(0,0,1),new R(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),as.setFromMatrixPosition(e.matrixWorld),n.position.copy(as),ss.copy(n.position),ss.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(ss),n.updateMatrixWorld(),r.makeTranslation(-as.x,-as.y,-as.z),os.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(os)}}ls.prototype.isPointLightShadow=!0;class cs extends Za{constructor(e,t,n=0,r=1){super(e,t),this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new ls}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}cs.prototype.isPointLight=!0;class us extends Ft{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(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(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(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const 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;let i=n-e,o=n+e,a=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,a-=t*this.view.offsetY,s=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(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}}us.prototype.isOrthographicCamera=!0;class hs extends ns{constructor(){super(new us(-5,5,5,-5,.5,500))}}hs.prototype.isDirectionalLightShadow=!0;class ds extends Za{constructor(e,t){super(e,t),this.type="DirectionalLight",this.position.copy(Pe.DefaultUp),this.updateMatrix(),this.target=new Pe,this.shadow=new hs}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}ds.prototype.isDirectionalLight=!0;class fs extends Za{constructor(e,t){super(e,t),this.type="AmbientLight"}}fs.prototype.isAmbientLight=!0;class ps extends Za{constructor(e,t,n=10,r=10){super(e,t),this.type="RectAreaLight",this.width=n,this.height=r}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}ps.prototype.isRectAreaLight=!0;class ms{constructor(){this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new R)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}ms.prototype.isSphericalHarmonics3=!0;class gs extends Za{constructor(e=new ms,t=1){super(void 0,t),this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}gs.prototype.isLightProbe=!0;class vs{static decodeText(t){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(t);let n="";for(let e=0,r=t.length;e<r;e++)n+=String.fromCharCode(t[e]);try{return decodeURIComponent(escape(n))}catch(e){return n}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}}class ys extends pt{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e=super.toJSON(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}ys.prototype.isInstancedBufferGeometry=!0;class bs extends nt{constructor(e,t,n,r=1){"number"===typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(e,t,n),this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}bs.prototype.isInstancedBufferAttribute=!0;(class extends Ua{constructor(e){super(e),"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,o=Fa.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;const a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){Fa.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}).prototype.isImageBitmapLoader=!0;class ws{constructor(){this.type="ShapePath",this.color=new Je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ka,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new Qa;i.curves=r.curves,t.push(i)}return t}function r(e,t){const n=t.length;let r=!1;for(let i=n-1,o=0;o<n;i=o++){let n=t[i],a=t[o],s=a.x-n.x,l=a.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[o],s=-s,a=t[i],l=-l),e.y<n.y||e.y>a.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-s*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(a.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=a.x)return!0}}return r}const i=aa.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let a,s,l;const c=[];if(1===o.length)return s=o[0],l=new Qa,l.curves=s.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const h=[],d=[];let f,p,m=[],g=0;d[g]=void 0,m[g]=[];for(let v=0,y=o.length;v<y;v++)s=o[v],f=s.getPoints(),a=i(f),a=e?!a:a,a?(!u&&d[g]&&g++,d[g]={s:new Qa,p:f},d[g].s.curves=s.curves,u&&g++,m[g]=[]):m[g].push({h:s,p:f[0]});if(!d[0])return n(o);if(d.length>1){let e=!1;const t=[];for(let n=0,r=d.length;n<r;n++)h[n]=[];for(let n=0,i=d.length;n<i;n++){const i=m[n];for(let o=0;o<i.length;o++){const a=i[o];let s=!0;for(let i=0;i<d.length;i++)r(a.p,d[i].p)&&(n!==i&&t.push({froms:n,tos:i,hole:o}),s?(s=!1,h[i].push(a)):e=!0);s&&h[n].push(a)}}t.length>0&&(e||(m=h))}for(let v=0,y=d.length;v<y;v++){l=d[v].s,c.push(l),p=m[v];for(let e=0,t=p.length;e<t;e++)l.holes.push(p[e].h)}return c}}class xs{constructor(e){this.type="Font",this.data=e}generateShapes(e,t=100){const n=[],r=function(e,t,n){const r=Array.from(e),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[];let s=0,l=0;for(let c=0;c<r.length;c++){const e=r[c];if("\n"===e)s=0,l-=o;else{const t=_s(e,i,s,l,n);s+=t.offsetX,a.push(t.path)}}return a}(e,t,this.data);for(let i=0,o=r.length;i<o;i++)Array.prototype.push.apply(n,r[i].toShapes());return n}}function _s(e,t,n,r,i){const o=i.glyphs[e]||i.glyphs["?"];if(!o)return void console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".");const a=new ws;let s,l,c,u,h,d,f,p;if(o.o){const e=o._cachedOutline||(o._cachedOutline=o.o.split(" "));for(let i=0,o=e.length;i<o;){switch(e[i++]){case"m":s=e[i++]*t+n,l=e[i++]*t+r,a.moveTo(s,l);break;case"l":s=e[i++]*t+n,l=e[i++]*t+r,a.lineTo(s,l);break;case"q":c=e[i++]*t+n,u=e[i++]*t+r,h=e[i++]*t+n,d=e[i++]*t+r,a.quadraticCurveTo(h,d,c,u);break;case"b":c=e[i++]*t+n,u=e[i++]*t+r,h=e[i++]*t+n,d=e[i++]*t+r,f=e[i++]*t+n,p=e[i++]*t+r,a.bezierCurveTo(h,d,f,p,c,u)}}}return{offsetX:o.ha*t,path:a}}xs.prototype.isFont=!0;let Es;const As=function(){return void 0===Es&&(Es=new(window.AudioContext||window.webkitAudioContext)),Es};class Ss extends Ua{constructor(e){super(e)}load(t,n,r,i){const o=this,a=new Ga(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(r){try{const e=r.slice(0);As().decodeAudioData(e,(function(e){n(e)}))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)}}(class extends gs{constructor(e,t,n=1){super(void 0,n);const r=(new Je).set(e),i=(new Je).set(t),o=new R(r.r,r.g,r.b),a=new R(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(l)}}).prototype.isHemisphereLightProbe=!0;(class extends gs{constructor(e,t=1){super(void 0,t);const n=(new Je).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}).prototype.isAmbientLightProbe=!0;class Ms{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Ts(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=Ts();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function Ts(){return("undefined"===typeof performance?Date:performance).now()}class Cs extends Pe{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let 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._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let 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._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(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.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}class Os{constructor(e,t,n){let r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let o=this.cumulativeWeight;if(0===o){for(let e=0;e!==r;++e)n[i+e]=n[e];o=t}else{o+=t;const e=t/o;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=o}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let s=t,l=t+t;s!==l;++s)if(n[s]!==n[s+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let o=0;o!==i;++o)e[t+o]=e[n+o]}_slerp(e,t,n,r){O.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;O.multiplyQuaternionsFlat(e,o,e,t,e,n),O.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*o+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const Rs=new RegExp("[\\[\\]\\.:\\/]","g"),ks="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Ps=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ls=/(WCOD+)?/.source.replace("WCOD",ks),Ds=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Is=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ns=new RegExp("^"+Ps+Ls+Ds+Is+"$"),js=["material","materials","bones"];class Bs{constructor(e,t,n){this.path=t,this.parsedPath=n||Bs.parseTrackName(t),this.node=Bs.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Bs.Composite(e,t,n):new Bs(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Rs,"")}static parseTrackName(e){const t=Ns.exec(e);if(!t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const 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){const e=n.nodeName.substring(r+1);-1!==js.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(!t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const o=n(i.children);if(o)return o}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.node[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Bs.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=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(let t=0;t<e.length;t++)if(e[t].name===r){r=t;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!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const o=e[r];if(void 0===o){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let a=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?a=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(a=this.Versioning.MatrixWorldNeedsUpdate);let s=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)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(s=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][a]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Bs.Composite=class{constructor(e,t,n){const r=n||Bs.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Bs.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Bs.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Bs.prototype.GetterByBindingType=[Bs.prototype._getValue_direct,Bs.prototype._getValue_array,Bs.prototype._getValue_arrayElement,Bs.prototype._getValue_toArray],Bs.prototype.SetterByBindingTypeAndVersioning=[[Bs.prototype._setValue_direct,Bs.prototype._setValue_direct_setNeedsUpdate,Bs.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_array,Bs.prototype._setValue_array_setNeedsUpdate,Bs.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_arrayElement,Bs.prototype._setValue_arrayElement_setNeedsUpdate,Bs.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Bs.prototype._setValue_fromArray,Bs.prototype._setValue_fromArray_setNeedsUpdate,Bs.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];(class{constructor(){this.uuid=f(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,r=arguments.length;n!==r;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length;let a=void 0,s=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],h=u.uuid;let d=t[h];if(void 0===d){d=s++,t[h]=d,e.push(u);for(let e=0,t=o;e!==t;++e)i[e].push(new Bs(u,n[e],r[e]))}else if(d<l){a=e[d];const s=--l,c=e[s];t[c.uuid]=d,e[d]=c,t[h]=s,e[s]=u;for(let e=0,t=o;e!==t;++e){const t=i[e],o=t[s];let a=t[d];t[d]=o,void 0===a&&(a=new Bs(u,n[e],r[e])),t[s]=a}}else e[d]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let o=0,a=arguments.length;o!==a;++o){const a=arguments[o],s=a.uuid,l=t[s];if(void 0!==l&&l>=i){const o=i++,c=e[o];t[c.uuid]=l,e[l]=c,t[s]=o,e[o]=a;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[l];t[l]=r,t[o]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=e.length;for(let a=0,s=arguments.length;a!==s;++a){const s=arguments[a].uuid,l=t[s];if(void 0!==l)if(delete t[s],l<i){const a=--i,s=e[a],c=--o,u=e[c];t[s.uuid]=l,e[l]=s,t[u.uuid]=a,e[a]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[a],i=t[c];t[l]=r,t[a]=i,t.pop()}}else{const i=--o,a=e[i];i>0&&(t[a.uuid]=l),e[l]=a,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,a=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(u);for(let h=c,d=s.length;h!==d;++h){const n=s[h];u[h]=new Bs(n,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}).prototype.isAnimationObjectGroup=!0;class Fs{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,a=new Array(o),s={endingStart:2400,endingEnd:2400};for(let l=0;l!==o;++l){const e=i[l].createInterpolant(null);a[l]=e,e.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),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}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const s=a.parameterPositions,l=a.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case 2501:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(a);break;case 2500:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=2202===n;if(0===e)return-1===i?r:o&&1===(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1===(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this}}(class extends c{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName;let c=l[s];void 0===c&&(c={},l[s]=c);for(let u=0;u!==i;++u){const e=r[u],i=e.name;let l=c[i];if(void 0!==l)o[u]=l;else{if(l=o[u],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,s,i));continue}const r=t&&t._propertyBindings[u].binding.parsedPath;l=new Os(Bs.create(n,i,r),e.ValueTypeName,e.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,s,i),o[u]=l}a[u].resultBuffer=l.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0===--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{const t=o.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null;delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){const e=t[n];0===--e.referenceCount&&this._removeInactiveBinding(e)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new Ta(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let o="string"===typeof e?ja.findByName(r,e):e;const a=null!==o?o.uuid:e,s=this._actionsByClip[a];let l=null;if(void 0===n&&(n=null!==o?o.blendMode:2500),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=s.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;const c=new Fs(this,o,t,n);return this._bindAction(c,l),this._addInactiveAction(c,a,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"===typeof e?ja.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let l=0;l!==n;++l){t[l]._update(r,e,i,o)}const a=this._bindings,s=this._nActiveBindings;for(let l=0;l!==s;++l)a[l].apply(o);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,o=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,o._cacheIndex=i,t[i]=o,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const i in n){const e=n[i].actionByRoot[t];void 0!==e&&(this._deactivateAction(e),this._removeInactiveAction(e))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const i in r){const e=r[i];e.restoreOriginalState(),this._removeInactiveBinding(e)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}).prototype._controlInterpolantsResultBuffer=new Float32Array(1);class zs{constructor(e){"string"===typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}clone(){return new zs(void 0===this.value.clone?this.value:this.value.clone())}}(class extends gi{constructor(e,t,n=1){super(e,t),this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}).prototype.isInstancedInterleavedBuffer=!0;(class{constructor(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}).prototype.isGLBufferAttribute=!0;class Hs{constructor(e,t,n=0,r=1/0){this.ray=new ae(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new ye,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!1,n=[]){return Vs(e,this,n,t),n.sort(Us),n}intersectObjects(e,t=!1,n=[]){for(let r=0,i=e.length;r<i;r++)Vs(e[r],this,n,t);return n.sort(Us),n}}function Us(e,t){return e.distance-t.distance}function Vs(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)Vs(r[e],t,n,!0)}}class Gs{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(p(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}const Ws=new b;class qs{constructor(e=new b(1/0,1/0),t=new b(-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Ws.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(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}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(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)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Ws.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}qs.prototype.isBox2=!0;const Xs=new R,Ys=new R;(class extends Pe{constructor(e){super(),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}).prototype.isImmediateRenderObject=!0;const Ks=new R,Qs=new se,Zs=new se;const Js=new Float32Array(1);new Int32Array(Js.buffer);Math.pow(2,8);const $s=[.125,.215,.35,.446,.526,.582],el=5+$s.length,tl=new $e({side:a,depthWrite:!1,depthTest:!1}),{_lodPlanes:nl,_sizeLods:rl,_sigmas:il}=(new Pt(new Dt,tl),ol());Math.sqrt(5);function ol(){const e=[],t=[],n=[];let r=8;for(let i=0;i<el;i++){const o=Math.pow(2,r);t.push(o);let a=1/o;i>4?a=$s[i-8+4-1]:0==i&&(a=0),n.push(a);const s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=6,d=6,f=3,p=2,m=1,g=new Float32Array(f*d*h),v=new Float32Array(p*d*h),y=new Float32Array(m*d*h);for(let e=0;e<h;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];g.set(r,f*d*e),v.set(u,p*d*e);const i=[e,e,e,e,e,e];y.set(i,m*d*e)}const b=new pt;b.setAttribute("position",new nt(g,f)),b.setAttribute("uv",new nt(v,p)),b.setAttribute("faceIndex",new nt(y,m)),e.push(b),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}go.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(go.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Ka.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)},class extends ro{constructor(e=10,t=10,n=4473924,r=8947848){n=new Je(n),r=new Je(r);const i=t/2,o=e/t,a=e/2,s=[],l=[];for(let u=0,h=0,d=-a;u<=t;u++,d+=o){s.push(-a,0,d,a,0,d),s.push(d,0,-a,d,0,a);const e=u===i?n:r;e.toArray(l,h),h+=3,e.toArray(l,h),h+=3,e.toArray(l,h),h+=3,e.toArray(l,h),h+=3}const c=new pt;c.setAttribute("position",new ot(s,3)),c.setAttribute("color",new ot(l,3));super(c,new Yi({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},class extends ro{constructor(e){const t=function e(t){const n=[];t&&t.isBone&&n.push(t);for(let r=0;r<t.children.length;r++)n.push.apply(n,e(t.children[r]));return n}(e),n=new pt,r=[],i=[],o=new Je(0,0,1),a=new Je(0,1,0);for(let s=0;s<t.length;s++){const e=t[s];e.parent&&e.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.setAttribute("position",new ot(r,3)),n.setAttribute("color",new ot(i,3));super(n,new Yi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");Zs.copy(this.root.matrixWorld).invert();for(let i=0,o=0;i<t.length;i++){const e=t[i];e.parent&&e.parent.isBone&&(Qs.multiplyMatrices(Zs,e.matrixWorld),Ks.setFromMatrixPosition(Qs),r.setXYZ(o,Ks.x,Ks.y,Ks.z),Qs.multiplyMatrices(Zs,e.parent.matrixWorld),Ks.setFromMatrixPosition(Qs),r.setXYZ(o+1,Ks.x,Ks.y,Ks.z),o+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Ua.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),vs.extractUrlBase(e)},Ua.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},qs.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},qs.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},qs.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},qs.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},L.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},L.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},L.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},L.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},L.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},J.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Qt.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},class{constructor(e=new R,t=new R){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Xs.subVectors(e,this.start),Ys.subVectors(this.end,this.start);const n=Ys.dot(Ys);let r=Ys.dot(Xs)/n;return t&&(r=p(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},w.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},w.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},w.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},w.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},w.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},w.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},se.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},se.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},se.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new R).setFromMatrixColumn(this,3)},se.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},se.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},se.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},se.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},se.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},se.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},se.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},se.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},se.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},se.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},se.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},se.prototype.makeFrustum=function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},se.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},Xt.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},O.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},O.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},ae.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},ae.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},ae.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},Ve.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Ve.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},Ve.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},Ve.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},Ve.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},Ve.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Ve.getBarycoord(e,t,n,r,i)},Ve.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Ve.getNormal(e,t,n,r)},Qa.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},Qa.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new ca(this,e)},Qa.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new ha(this,e)},b.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},b.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},b.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},R.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},R.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},R.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},R.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},R.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},R.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},R.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},R.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},R.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},M.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},M.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Pe.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},Pe.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Pe.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},Pe.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Pe.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Pe.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Pt.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(Pt.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),zi.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},zt.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Za.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(nt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),35048===this.usage},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),nt.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},nt.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},nt.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},pt.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},pt.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new nt(arguments[1],arguments[2])))},pt.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},pt.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},pt.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},pt.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},pt.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(pt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),gi.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},gi.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},ca.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},ca.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},ca.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},mi.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},zs.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(We.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Je}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Bt.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),di.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},di.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},di.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},di.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},di.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},di.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},di.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},di.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},di.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},di.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},di.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},di.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},di.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},di.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},di.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},di.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},di.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},di.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},di.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},di.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},di.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},di.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},di.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},di.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},di.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(di.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(ni.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(T.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Cs.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new Ss).load(e,(function(e){t.setBuffer(e)})),this},class{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ht.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Ht.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},_.crossOrigin=void 0,_.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new Xa;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},_.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new qa;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},_.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},_.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"130"}})),"undefined"!==typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="130")},function(e,t,n){"use strict";var r=function(e){};e.exports=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(r(t),!e){var a;if(void 0===t)a=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;(a=new Error(t.replace(/%s/g,(function(){return String(i[s++])})))).name="Invariant Violation"}throw a.framesToPop=1,a}}},function(e,t,n){"use strict";var r=n(13),i=n(105),o=n(81),a={position:"absolute",left:0,right:0,top:0,bottom:0},s={absoluteFill:i.a.register(a),absoluteFillObject:a,compose:function(e,t){return e&&t?[e,t]:e||t},create:function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n]&&i.a.register(e[n]);t[n]=r})),t},flatten:o.a,hairlineWidth:1};r.canUseDOM&&window.__REACT_DEVTOOLS_GLOBAL_HOOK__&&(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=s.flatten);t.a=s},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(289)},function(e,t,n){"use strict";var r={OS:"web",select:function(e){return"web"in e?e.web:e.default},get isTesting(){return!1}};t.a=r},function(e,t,n){var r=n(286),i=n(287),o=n(177),a=n(288);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(t,n,r){"use strict";(function(t){r.d(n,"a",(function(){return kn})),r.d(n,"b",(function(){return pt})),r.d(n,"c",(function(){return Mt})),r.d(n,"d",(function(){return er})),r.d(n,"e",(function(){return at})),r.d(n,"f",(function(){return Gt})),r.d(n,"g",(function(){return At})),r.d(n,"h",(function(){return Me})),r.d(n,"i",(function(){return Dt})),r.d(n,"j",(function(){return q})),r.d(n,"k",(function(){return $t})),r.d(n,"l",(function(){return $n})),r.d(n,"m",(function(){return Nt})),r.d(n,"n",(function(){return Wt})),r.d(n,"o",(function(){return Xt})),r.d(n,"p",(function(){return Mn})),r.d(n,"q",(function(){return Qt})),r.d(n,"r",(function(){return fn})),r.d(n,"s",(function(){return Ee})),r.d(n,"t",(function(){return tn})),r.d(n,"u",(function(){return kt})),r.d(n,"v",(function(){return Mt})),r.d(n,"w",(function(){return en})),r.d(n,"x",(function(){return Jt}));function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"===typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var o={};function a(){return"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:o}var s=Object.assign,l=Object.getOwnPropertyDescriptor,c=Object.defineProperty,u=Object.prototype,h=[];Object.freeze(h);var d={};Object.freeze(d);var f="undefined"!==typeof Proxy,p=Object.toString();function m(){f||i("Proxy not available")}function g(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function y(e){return"function"===typeof e}function b(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function w(e){return null!==e&&"object"===typeof e}function x(e){var t;if(!w(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===p}function _(e,t,n){c(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function E(e,t,n){c(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function A(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return w(e)&&!0===e[n]}}function S(e){return e instanceof Map}function M(e){return e instanceof Set}var T="undefined"!==typeof Object.getOwnPropertySymbols;function C(e){var t=Object.keys(e);if(!T)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter((function(t){return u.propertyIsEnumerable.call(e,t)}))):t}var O="undefined"!==typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:T?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function R(e){return null===e?null:"object"===typeof e?""+e:e}function k(e,t){return u.hasOwnProperty.call(e,t)}var P=Object.getOwnPropertyDescriptors||function(e){var t={};return O(e).forEach((function(n){t[n]=l(e,n)})),t};function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t,n){return t&&L(e.prototype,t),n&&L(e,n),e}function I(){return(I=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function N(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function F(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var z=Symbol("mobx-stored-annotations");function H(e){return Object.assign((function(t,n){U(t,n,e)}),e)}function U(e,t,n){k(e,z)||_(e,z,I({},e[z])),function(e){return"override"===e.annotationType_}(n)||(e[z][t]=n)}var V=Symbol("mobx administration"),G=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ze.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},t.reportObserved=function(){return dt(this)},t.reportChanged=function(){ut(),ft(this),ht()},t.toString=function(){return this.name_},e}(),W=A("Atom",G);function q(e,t,n){void 0===t&&(t=v),void 0===n&&(n=v);var r,i=new G(e);return t!==v&&Lt("onBO",i,t,r),n!==v&&Pt(i,n),i}var X={identity:function(e,t){return e===t},structural:function(e,t){return rr(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return rr(e,t,1)}};function Y(e,t,n){return Kt(e)?e:Array.isArray(e)?Ee.array(e,{name:n}):x(e)?Ee.object(e,void 0,{name:n}):S(e)?Ee.map(e,{name:n}):M(e)?Ee.set(e,{name:n}):e}function K(e){return e}function Q(e,t){return{annotationType_:e,options_:t,make_:Z,extend_:J}}function Z(e,t){for(var n,r,o,a=!1,s=e.target_,h=null!=(n=null==(r=this.options_)?void 0:r.bound)&&n;s&&s!==u;){var d=l(s,t);if(d){if(s===e.target_||h){var f=$(e,this,t,d);if(!e.defineProperty_(t,f))return;if(a=!0,h)break}if(s!==e.target_){if(Tt(d.value)){a=!0;break}var p=$(e,this,t,d,!1);c(s,t,p),a=!0}}s=Object.getPrototypeOf(s)}a?Vn(e,this,t):(null==(o=e.target_[z])?void 0:o[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function J(e,t,n,r){var i=$(e,this,t,n);return e.defineProperty_(t,i,r)}function $(e,t,n,r,i){var o,a,s,l,c,u;void 0===i&&(i=ot.safeDescriptors),u=r,t.annotationType_,u.value;var h,d=r.value;(null==(o=t.options_)?void 0:o.bound)&&(d=d.bind(null!=(h=e.proxy_)?h:e.target_));return{value:Pe(null!=(a=null==(s=t.options_)?void 0:s.name)?a:n.toString(),d,null!=(l=null==(c=t.options_)?void 0:c.autoAction)&&l),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ee(e,t){return{annotationType_:e,options_:t,make_:te,extend_:ne}}function te(e,t){for(var n,r=!1,o=e.target_;o&&o!==u;){var a=l(o,t);if(a){if(o!==e.target_){if(Vt(a.value)){r=!0;break}var s=re(e,this,t,a,!1);c(o,t,s)}else{var h=re(e,this,t,a);if(!e.defineProperty_(t,h))return}r=!0}o=Object.getPrototypeOf(o)}r?Vn(e,this,t):(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ne(e,t,n,r){var i=re(e,this,t,n);return e.defineProperty_(t,i,r)}function re(e,t,n,r,i){var o;return void 0===i&&(i=ot.safeDescriptors),o=r,t.annotationType_,o.value,{value:Ht(r.value),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ie(e,t){return{annotationType_:e,options_:t,make_:oe,extend_:ae}}function oe(e,t){for(var n,r=e.target_;r&&r!==u;){var o=l(r,t);if(o){if(se(e,this,t,o),!e.defineComputedProperty_(t,I({},this.options_,{get:o.get,set:o.set})))return;return void Vn(e,this,t)}r=Object.getPrototypeOf(r)}(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ae(e,t,n,r){return se(e,this,t,n),e.defineComputedProperty_(t,I({},this.options_,{get:n.get,set:n.set}),r)}function se(e,t,n,r){t.annotationType_,r.get}function le(e,t){return{annotationType_:e,options_:t,make_:ce,extend_:ue}}function ce(e,t){for(var n,r=e.target_;r&&r!==u;){var o=l(r,t);if(o){var a,s;if(he(e,this,t,o),!e.defineObservableProperty_(t,o.value,null!=(a=null==(s=this.options_)?void 0:s.enhancer)?a:Y))return;return void Vn(e,this,t)}r=Object.getPrototypeOf(r)}(null==(n=e.target_[z])?void 0:n[t])||i(1,this.annotationType_,e.name_+"."+t.toString())}function ue(e,t,n,r){var i,o;return he(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:Y,r)}function he(e,t,n,r){t.annotationType_}var de={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function fe(e){return e||de}Object.freeze(de);var pe=le("observable"),me=le("observable.ref",{enhancer:K}),ge=le("observable.shallow",{enhancer:function(e,t,n){return void 0===e||null===e||Un(e)||Mn(e)||Pn(e)||In(e)?e:Array.isArray(e)?Ee.array(e,{name:n,deep:!1}):x(e)?Ee.object(e,void 0,{name:n,deep:!1}):S(e)?Ee.map(e,{name:n,deep:!1}):M(e)?Ee.set(e,{name:n,deep:!1}):void 0}}),ve=le("observable.struct",{enhancer:function(e,t){return rr(e,t)?t:e}}),ye=H(pe);function be(e){return!0===e.deep?Y:!1===e.deep?K:function(e){var t,n;return e&&null!=(t=null==(n=e.options_)?void 0:n.enhancer)?t:Y}(e.defaultDecorator)}function we(e,t,n){if(!b(t))return Kt(e)?e:x(e)?Ee.object(e,t,n):Array.isArray(e)?Ee.array(e,t):S(e)?Ee.map(e,t):M(e)?Ee.set(e,t):"object"===typeof e&&null!==e?e:Ee.box(e,t);U(e,t,pe)}Object.assign(we,ye);var xe,_e,Ee=s(we,{box:function(e,t){var n=fe(t);return new Be(e,be(n),n.name,!0,n.equals)},array:function(e,t){var n=fe(t);return(!1===ot.useProxies||!1===n.proxy?Jn:vn)(e,be(n),n.name)},map:function(e,t){var n=fe(t);return new kn(e,be(n),n.name)},set:function(e,t){var n=fe(t);return new Dn(e,be(n),n.name)},object:function(e,t,n){return It(!1===ot.useProxies||!1===(null==n?void 0:n.proxy)?Fn({},n):function(e,t){var n,r;return m(),e=Fn(e,t),null!=(r=(n=e[V]).proxy_)?r:n.proxy_=new Proxy(e,an)}({},n),e,t)},ref:H(me),shallow:H(ge),deep:ye,struct:H(ve)}),Ae=ie("computed"),Se=ie("computed.struct",{equals:X.structural}),Me=function(e,t){if(b(t))return U(e,t,Ae);if(x(e))return H(ie("computed",e));var n=x(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Ue(n)};Object.assign(Me,Ae),Me.struct=H(Se);var Te,Ce=0,Oe=1,Re=null!=(xe=null==(_e=l((function(){}),"name"))?void 0:_e.configurable)&&xe,ke={value:"action",configurable:!0,writable:!1,enumerable:!1};function Pe(e,t,n,r){function i(){return Le(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),i.isMobxAction=!0,Re&&(ke.value=e,Object.defineProperty(i,"name",ke)),i}function Le(e,t,n,r,o){var a=function(e,t,n,r){0;var i=ot.trackingDerivation,o=!t||!i;ut();var a=ot.allowStateChanges;o&&(Ze(),a=Ie(!0));var s=$e(!0),l={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:a,prevAllowStateReads_:s,notifySpy_:!1,startTime_:0,actionId_:Oe++,parentActionId_:Ce};return Ce=l.actionId_,l}(0,t);try{return n.apply(r,o)}catch(s){throw a.error_=s,s}finally{!function(e){Ce!==e.actionId_&&i(30);Ce=e.parentActionId_,void 0!==e.error_&&(ot.suppressReactionErrors=!0);Ne(e.prevAllowStateChanges_),et(e.prevAllowStateReads_),ht(),e.runAsAction_&&Je(e.prevDerivation_);0;ot.suppressReactionErrors=!1}(a)}}function De(e,t){var n=Ie(e);try{return t()}finally{Ne(n)}}function Ie(e){var t=ot.allowStateChanges;return ot.allowStateChanges=e,t}function Ne(e){ot.allowStateChanges=e}Te=Symbol.toPrimitive;var je,Be=function(e){function t(t,n,r,i,o){var a;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=X.default),(a=e.call(this,r)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=n,a.name_=r,a.equals=o,a.value_=n(t,void 0,r),a}N(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){this.value_;if((e=this.prepareNewValue_(e))!==ot.UNCHANGED){0,this.setNewValue_(e)}},n.prepareNewValue_=function(e){if(Xe(this),sn(this)){var t=cn(this,{object:this,type:pn,newValue:e});if(!t)return ot.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?ot.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),un(this)&&dn(this,{type:pn,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return ln(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:pn,newValue:this.value_,oldValue:void 0}),hn(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return R(this.get())},n[Te]=function(){return this.valueOf()},t}(G),Fe=A("ObservableValue",Be);je=Symbol.toPrimitive;var ze,He,Ue=function(){function t(e){this.dependenciesState_=ze.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=ze.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Ge(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=He.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||i(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=Pe("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?X.structural:X.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var n=t.prototype;return n.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==ze.UP_TO_DATE_)return;e.lowestObserverState_=ze.POSSIBLY_STALE_,e.observers_.forEach((function(e){e.dependenciesState_===ze.UP_TO_DATE_&&(e.dependenciesState_=ze.POSSIBLY_STALE_,e.onBecomeStale_())}))}(this)},n.onBO=function(){this.onBOL&&this.onBOL.forEach((function(e){return e()}))},n.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(e){return e()}))},n.get=function(){if(this.isComputing_&&i(32,this.name_,this.derivation),0!==ot.inBatch||0!==this.observers_.size||this.keepAlive_){if(dt(this),qe(this)){var e=ot.trackingContext;this.keepAlive_&&!e&&(ot.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===ze.STALE_)return;e.lowestObserverState_=ze.STALE_,e.observers_.forEach((function(t){t.dependenciesState_===ze.POSSIBLY_STALE_?t.dependenciesState_=ze.STALE_:t.dependenciesState_===ze.UP_TO_DATE_&&(e.lowestObserverState_=ze.UP_TO_DATE_)}))}(this),ot.trackingContext=e}}else qe(this)&&(this.warnAboutUntrackedRead_(),ut(),this.value_=this.computeValue_(!1),ht());var t=this.value_;if(We(t))throw t.cause;return t},n.set=function(e){if(this.setter_){this.isRunningSetter_&&i(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else i(34,this.name_)},n.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===ze.NOT_TRACKING_,n=this.computeValue_(!0);var r=t||We(e)||We(n)||!this.equals_(e,n);return r&&(this.value_=n),r},n.computeValue_=function(t){this.isComputing_=!0;var n,r=Ie(!1);if(t)n=Ye(this,this.derivation,this.scope_);else if(!0===ot.disableErrorBoundaries)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(e){n=new Ge(e)}return Ne(r),this.isComputing_=!1,n},n.suspend_=function(){this.keepAlive_||(Ke(this),this.value_=void 0)},n.observe_=function(e,t){var n=this,r=!0,i=void 0;return Ct((function(){var o=n.get();if(!r||t){var a=Ze();e({observableKind:"computed",debugObjectName:n.name_,type:pn,object:n,newValue:o,oldValue:i}),Je(a)}r=!1,i=o}))},n.warnAboutUntrackedRead_=function(){},n.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},n.valueOf=function(){return R(this.get())},n[je]=function(){return this.valueOf()},t}(),Ve=A("ComputedValue",Ue);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(ze||(ze={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(He||(He={}));var Ge=function(e){this.cause=void 0,this.cause=e};function We(e){return e instanceof Ge}function qe(t){switch(t.dependenciesState_){case ze.UP_TO_DATE_:return!1;case ze.NOT_TRACKING_:case ze.STALE_:return!0;case ze.POSSIBLY_STALE_:for(var n=$e(!0),r=Ze(),i=t.observing_,o=i.length,a=0;a<o;a++){var s=i[a];if(Ve(s)){if(ot.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return Je(r),et(n),!0}if(t.dependenciesState_===ze.STALE_)return Je(r),et(n),!0}}return tt(t),Je(r),et(n),!1}}function Xe(e){}function Ye(t,n,r){var i=$e(!0);tt(t),t.newObserving_=new Array(t.observing_.length+100),t.unboundDepsCount_=0,t.runId_=++ot.runId;var o,a=ot.trackingDerivation;if(ot.trackingDerivation=t,ot.inBatch++,!0===ot.disableErrorBoundaries)o=n.call(r);else try{o=n.call(r)}catch(e){o=new Ge(e)}return ot.inBatch--,ot.trackingDerivation=a,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=ze.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=n[a];0===s.diffValue_&&(s.diffValue_=1,i!==a&&(n[i]=s),i++),s.dependenciesState_>r&&(r=s.dependenciesState_)}n.length=i,e.newObserving_=null,o=t.length;for(;o--;){var l=t[o];0===l.diffValue_&<(l,e),l.diffValue_=0}for(;i--;){var c=n[i];1===c.diffValue_&&(c.diffValue_=0,st(c,e))}r!==ze.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(t),et(i),o}function Ke(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)lt(t[n],e);e.dependenciesState_=ze.NOT_TRACKING_}function Qe(e){var t=Ze();try{return e()}finally{Je(t)}}function Ze(){var e=ot.trackingDerivation;return ot.trackingDerivation=null,e}function Je(e){ot.trackingDerivation=e}function $e(e){var t=ot.allowStateReads;return ot.allowStateReads=e,t}function et(e){ot.allowStateReads=e}function tt(e){if(e.dependenciesState_!==ze.UP_TO_DATE_){e.dependenciesState_=ze.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=ze.UP_TO_DATE_}}var nt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},rt=!0,it=!1,ot=function(){var e=a();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(rt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new nt).version&&(rt=!1),rt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new nt):(setTimeout((function(){it||i(35)}),1),new nt)}();function at(){return ot}function st(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function lt(e,t){e.observers_.delete(t),0===e.observers_.size&&ct(e)}function ct(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,ot.pendingUnobservations.push(e))}function ut(){ot.inBatch++}function ht(){if(0===--ot.inBatch){gt();for(var e=ot.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Ue&&n.suspend_())}ot.pendingUnobservations=[]}}function dt(e){var t=ot.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&ot.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&ot.inBatch>0&&ct(e),!1)}function ft(e){e.lowestObserverState_!==ze.STALE_&&(e.lowestObserverState_=ze.STALE_,e.observers_.forEach((function(e){e.dependenciesState_===ze.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=ze.STALE_})))}var pt=function(){function t(e,t,n,r){void 0===e&&(e="Reaction"),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=ze.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=He.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var n=t.prototype;return n.onBecomeStale_=function(){this.schedule_()},n.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ot.pendingReactions.push(this),gt())},n.isScheduled=function(){return this.isScheduled_},n.runReaction_=function(){if(!this.isDisposed_){ut(),this.isScheduled_=!1;var t=ot.trackingContext;if(ot.trackingContext=this,qe(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}ot.trackingContext=t,ht()}},n.track=function(e){if(!this.isDisposed_){ut();0,this.isRunning_=!0;var t=ot.trackingContext;ot.trackingContext=this;var n=Ye(this,e,void 0);ot.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Ke(this),We(n)&&this.reportExceptionInDerivation_(n.cause),ht()}},n.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(ot.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";ot.suppressReactionErrors||console.error(n,e),ot.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},n.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(ut(),Ke(this),ht()))},n.getDisposer_=function(){var e=this.dispose.bind(this);return e[V]=this,e},n.toString=function(){return"Reaction["+this.name_+"]"},n.trace=function(e){void 0===e&&(e=!1),function(){i("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"boolean"===typeof n[n.length-1]&&(e=n.pop());var o=nn(n);if(!o)return i("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===He.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled");o.isTracing_=e?He.BREAK:He.LOG}(this,e)},t}();var mt=function(e){return e()};function gt(){ot.inBatch>0||ot.isRunningReactions||mt(vt)}function vt(){ot.isRunningReactions=!0;for(var e=ot.pendingReactions,t=0;e.length>0;){100===++t&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}ot.isRunningReactions=!1}var yt=A("Reaction",pt);var bt=Q("action"),wt=Q("action.bound",{bound:!0}),xt=Q("autoAction",{autoAction:!0}),_t=Q("autoAction.bound",{autoAction:!0,bound:!0});function Et(e){return function(t,n){return y(t)?Pe(t.name||"<unnamed action>",t,e):y(n)?Pe(t,n,e):b(n)?U(t,n,e?xt:bt):b(t)?H(Q(e?"autoAction":"action",{name:t,autoAction:e})):void 0}}var At=Et(!1);Object.assign(At,bt);var St=Et(!0);function Mt(e){return Le(e.name,!1,e,this,void 0)}function Tt(e){return y(e)&&!0===e.isMobxAction}function Ct(e,t){var n,r;void 0===t&&(t=d);var i,o=null!=(n=null==(r=t)?void 0:r.name)?n:"Autorun";if(!t.scheduler&&!t.delay)i=new pt(o,(function(){this.track(l)}),t.onError,t.requiresObservable);else{var a=Rt(t),s=!1;i=new pt(o,(function(){s||(s=!0,a((function(){s=!1,i.isDisposed_||i.track(l)})))}),t.onError,t.requiresObservable)}function l(){e(i)}return i.schedule_(),i.getDisposer_()}Object.assign(St,xt),At.bound=H(wt),St.bound=H(_t);var Ot=function(e){return e()};function Rt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Ot}function kt(t,n,r){var i;void 0===r&&(r=d);var o,a,s,l=null!=(i=r.name)?i:"Reaction",c=At(l,r.onError?(o=r.onError,a=n,function(){try{return a.apply(this,arguments)}catch(e){o.call(this,e)}}):n),u=!r.scheduler&&!r.delay,h=Rt(r),f=!0,p=!1,m=void 0,g=r.compareStructural?X.structural:r.equals||X.default,v=new pt(l,(function(){f||u?y():p||(p=!0,h(y))}),r.onError,r.requiresObservable);function y(){if(p=!1,!v.isDisposed_){var e=!1;v.track((function(){var n=De(!1,(function(){return t(v)}));e=f||!g(s,n),m=s,s=n})),(f&&r.fireImmediately||!f&&e)&&c(s,m,v),f=!1}}return v.schedule_(),v.getDisposer_()}function Pt(e,t,n){return Lt("onBUO",e,t,n)}function Lt(e,t,n,r){var i="function"===typeof r?$n(t,n):$n(t),o=y(r)?r:n,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function Dt(e){!0===e.isolateGlobalState&&function(){if((ot.pendingReactions.length||ot.inBatch||ot.isRunningReactions)&&i(36),it=!0,rt){var e=a();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),ot=new nt}}();var t=e.useProxies,n=e.enforceActions;if(void 0!==t&&(ot.useProxies="always"===t||"never"!==t&&"undefined"!==typeof Proxy),"ifavailable"===t&&(ot.verifyProxies=!0),void 0!==n){var r="always"===n?"always":"observed"===n;ot.enforceActions=r,ot.allowStateChanges=!0!==r&&"always"!==r}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach((function(t){t in e&&(ot[t]=!!e[t])})),ot.allowStateReads=!ot.observableRequiresReaction,e.reactionScheduler&&function(e){var t=mt;mt=function(n){return e((function(){return t(n)}))}}(e.reactionScheduler)}function It(e,t,n,r){var i=P(t),o=Fn(e,r)[V];ut();try{O(i).forEach((function(e){o.extend_(e,i[e],!n||(!(e in n)||n[e]))}))}finally{ht()}return e}function Nt(e,t){return jt($n(e,t))}function jt(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(jt)),n}var Bt=0;function Ft(){this.message="FLOW_CANCELLED"}Ft.prototype=Object.create(Error.prototype);var zt=ee("flow"),Ht=Object.assign((function(t,n){if(b(n))return U(t,n,zt);var r=t,i=r.name||"<unnamed flow>",o=function(){var t,n=this,o=arguments,a=++Bt,s=At(i+" - runid: "+a+" - init",r).apply(n,o),l=void 0,c=new Promise((function(n,r){var o=0;function c(t){var n;l=void 0;try{n=At(i+" - runid: "+a+" - yield "+o++,s.next).call(s,t)}catch(e){return r(e)}h(n)}function u(t){var n;l=void 0;try{n=At(i+" - runid: "+a+" - yield "+o++,s.throw).call(s,t)}catch(e){return r(e)}h(n)}function h(e){if(!y(null==e?void 0:e.then))return e.done?n(e.value):(l=Promise.resolve(e.value)).then(c,u);e.then(h,r)}t=r,c(void 0)}));return c.cancel=At(i+" - runid: "+a+" - cancel",(function(){try{l&&Ut(l);var n=s.return(void 0),r=Promise.resolve(n.value);r.then(v,v),Ut(r),t(new Ft)}catch(e){t(e)}})),c};return o.isMobXFlow=!0,o}),zt);function Ut(e){y(e.cancel)&&e.cancel()}function Vt(e){return!0===(null==e?void 0:e.isMobXFlow)}function Gt(e,t,n){var r;return Pn(e)||Mn(e)||Fe(e)?r=er(e):Un(e)&&(r=er(e,t)),r.dehancer="function"===typeof t?t:n,function(){r.dehancer=void 0}}function Wt(e,t,n){return y(n)?function(e,t,n){return er(e,t).intercept_(n)}(e,t,n):function(e,t){return er(e).intercept_(t)}(e,t)}function qt(e,t){if(void 0!==t){if(!1===Un(e))return!1;if(!e[V].values_.has(t))return!1;var n=$n(e,t);return Ve(n)}return Ve(e)}function Xt(e,t){return qt(e,t)}function Yt(e,t){return!!e&&(void 0!==t?!!Un(e)&&e[V].values_.has(t):Un(e)||!!e[V]||W(e)||yt(e)||Ve(e))}function Kt(e){return Yt(e)}function Qt(e,t){return Yt(e,t)}function Zt(e){return Un(e)?e[V].keys_():Pn(e)||In(e)?Array.from(e.keys()):Mn(e)?e.map((function(e,t){return t})):void i(5)}function Jt(e){return Un(e)?Zt(e).map((function(t){return e[t]})):Pn(e)?Zt(e).map((function(t){return e.get(t)})):In(e)?Array.from(e.values()):Mn(e)?e.slice():void i(6)}function $t(e){return Un(e)?Zt(e).map((function(t){return[t,e[t]]})):Pn(e)?Zt(e).map((function(t){return[t,e.get(t)]})):In(e)?Array.from(e.entries()):Mn(e)?e.map((function(e,t){return[t,e]})):void i(7)}function en(e,t,n){if(2!==arguments.length||In(e))Un(e)?e[V].set_(t,n):Pn(e)?e.set(t,n):In(e)?e.add(t):Mn(e)?("number"!==typeof t&&(t=parseInt(t,10)),t<0&&i("Invalid index: '"+t+"'"),ut(),t>=e.length&&(e.length=t+1),e[t]=n,ht()):i(8);else{ut();var r=t;try{for(var o in r)en(e,o,r[o])}finally{ht()}}}function tn(e,t,n,r){return y(n)?function(e,t,n,r){return er(e,t).observe_(n,r)}(e,t,n,r):function(e,t,n){return er(e).observe_(t,n)}(e,t,n)}function nn(e){switch(e.length){case 0:return ot.trackingDerivation;case 1:return $n(e[0]);case 2:return $n(e[0],e[1])}}function rn(e,t){void 0===t&&(t=void 0),ut();try{return e.apply(t)}finally{ht()}}function on(e){return e[V]}var an={has:function(e,t){return on(e).has_(t)},get:function(e,t){return on(e).get_(t)},set:function(e,t,n){var r;return!!b(t)&&(null==(r=on(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return!!b(t)&&(null==(n=on(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return null==(r=on(e).defineProperty_(t,n))||r},ownKeys:function(e){return on(e).ownKeys_()},preventExtensions:function(e){i(13)}};function sn(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function ln(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function cn(e,t){var n=Ze();try{for(var r=[].concat(e.interceptors_||[]),o=0,a=r.length;o<a&&((t=r[o](t))&&!t.type&&i(14),t);o++);return t}finally{Je(n)}}function un(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function hn(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function dn(e,t){var n=Ze(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);Je(n)}}function fn(e,t,n){var r=Fn(e,n)[V];ut();try{null!=t||(t=function(e){return k(e,z)||_(e,z,I({},e[z])),e[z]}(e)),O(t).forEach((function(e){return r.make_(e,t[e])}))}finally{ht()}return e}var pn="update",mn={get:function(e,t){var n=e[V];return t===V?n:"length"===t?n.getArrayLength_():"string"!==typeof t||isNaN(t)?k(yn,t)?yn[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[V];return"length"===t&&r.setArrayLength_(n),"symbol"===typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){i(15)}},gn=function(){function e(e,t,n,r){void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new G(e),this.enhancer_=function(e,n){return t(e,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return ln(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),hn(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!==typeof e||e<0)&&i("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&i(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Zn(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:void 0===t||null===t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=h),sn(this)){var o=cn(this,{object:this.proxy_,type:"splice",index:e,removedCount:t,added:n});if(!o)return h;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map((function(e){return r.enhancer_(e,void 0)})),this.legacyMode_){var a=n.length-t;this.updateArrayLength_(i,a)}var s=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length=e+n.length-t;for(var a=0;a<n.length;a++)this.values_[e+a]=n[a];for(var s=0;s<o.length;s++)this.values_[e+n.length+s]=o[s];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&!1,i=un(this),o=i||r?{observableKind:"array",object:this.proxy_,type:pn,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&dn(this,o)},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&!1,i=un(this),o=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&dn(this,o)},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){this.atom_;var r=n[e];if(sn(this)){var o=cn(this,{type:pn,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,r))!==r&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,r))}else e===n.length?this.spliceWithArray_(e,0,[t]):i(17,e,n.length)},e}();function vn(e,t,n,r){void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),m();var i=new gn(n,t,r,!1);E(i.values_,V,i);var o=new Proxy(i.values_,mn);if(i.proxy_=o,e&&e.length){var a=Ie(!0);i.spliceWithArray_(0,0,e),Ne(a)}return o}var yn={clear:function(){return this.splice(0)},replace:function(e){var t=this[V];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=this[V];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[V].spliceWithArray_(e,t,n)},push:function(){for(var e=this[V],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[V].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[V],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return ot.trackingDerivation&&i(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ot.trackingDerivation&&i(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[V],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function bn(e,t){"function"===typeof Array.prototype[e]&&(yn[e]=t(e))}function wn(e){return function(){var t=this[V];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function xn(e){return function(t,n){var r=this,i=this[V];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e]((function(e,i){return t.call(n,e,i,r)}))}}function _n(e){return function(){var t=this,n=this[V];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}bn("concat",wn),bn("flat",wn),bn("includes",wn),bn("indexOf",wn),bn("join",wn),bn("lastIndexOf",wn),bn("slice",wn),bn("toString",wn),bn("toLocaleString",wn),bn("every",xn),bn("filter",xn),bn("find",xn),bn("findIndex",xn),bn("flatMap",xn),bn("forEach",xn),bn("map",xn),bn("some",xn),bn("reduce",_n),bn("reduceRight",_n);var En,An,Sn=A("ObservableArrayAdministration",gn);function Mn(e){return w(e)&&Sn(e[V])}var Tn={},Cn="add";En=Symbol.iterator,An=Symbol.toStringTag;var On,Rn,kn=function(){function e(e,t,n){void 0===t&&(t=Y),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[V]=Tn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,y(Map)||i(18),this.keysAtom_=q("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,this.merge(e)}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!ot.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Be(this.has_(e),K,"ObservableMap.key?",!1);this.hasMap_.set(e,r),Pt(r,(function(){return t.hasMap_.delete(e)}))}return n.get()},t.set=function(e,t){var n=this.has_(e);if(sn(this)){var r=cn(this,{type:n?pn:Cn,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((this.keysAtom_,sn(this))&&!cn(this,{type:"delete",object:this,name:e}))return!1;if(this.has_(e)){var n=un(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(e).value_,name:e}:null;return rn((function(){t.keysAtom_.reportChanged(),t.updateHasMapEntry_(e,!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)})),n&&dn(this,r),!0}return!1},t.updateHasMapEntry_=function(e,t){var n=this.hasMap_.get(e);n&&n.setNewValue_(t)},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==ot.UNCHANGED){var r=un(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:pn,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),r&&dn(this,i)}},t.addValue_=function(e,t){var n=this;this.keysAtom_,rn((function(){var r=new Be(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,r),t=r.value_,n.updateHasMapEntry_(e,!0),n.keysAtom_.reportChanged()}));var r=un(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:Cn,object:this,name:e,newValue:t}:null;r&&dn(this,i)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return or({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return or({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[En]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=F(this);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];e.call(t,a,o,this)}},t.merge=function(e){var t=this;return Pn(e)&&(e=new Map(e)),rn((function(){x(e)?C(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=e[0],r=e[1];return t.set(n,r)})):S(e)?(e.constructor!==Map&&i(19,e),e.forEach((function(e,n){return t.set(n,e)}))):null!==e&&void 0!==e&&i(20,e)})),this},t.clear=function(){var e=this;rn((function(){Qe((function(){for(var t,n=F(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.replace=function(e){var t=this;return rn((function(){for(var n,r=function(e){if(S(e)||Pn(e))return e;if(Array.isArray(e))return new Map(e);if(x(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return i(21,e)}(e),o=new Map,a=!1,s=F(t.data_.keys());!(n=s()).done;){var l=n.value;if(!r.has(l))if(t.delete(l))a=!0;else{var c=t.data_.get(l);o.set(l,c)}}for(var u,h=F(r.entries());!(u=h()).done;){var d=u.value,f=d[0],p=d[1],m=t.data_.has(f);if(t.set(f,p),t.data_.has(f)){var g=t.data_.get(f);o.set(f,g),m||(a=!0)}}if(!a)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var v=t.data_.keys(),y=o.keys(),b=v.next(),w=y.next();!b.done;){if(b.value!==w.value){t.keysAtom_.reportChanged();break}b=v.next(),w=y.next()}t.data_=o})),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},D(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:An,get:function(){return"Map"}}]),e}(),Pn=A("ObservableMap",kn);var Ln={};On=Symbol.iterator,Rn=Symbol.toStringTag;var Dn=function(){function e(e,t,n){void 0===t&&(t=Y),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[V]=Ln,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,y(Set)||i(22),this.atom_=q(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;rn((function(){Qe((function(){for(var t,n=F(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}}))}))},t.forEach=function(e,t){for(var n,r=F(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if((this.atom_,sn(this))&&!cn(this,{type:Cn,object:this,newValue:e}))return this;if(!this.has(e)){rn((function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()}));var n=un(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:Cn,object:this,newValue:e}:null;0,n&&dn(this,r)}return this},t.delete=function(e){var t=this;if(sn(this)&&!cn(this,{type:"delete",object:this,oldValue:e}))return!1;if(this.has(e)){var n=un(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:e}:null;return rn((function(){t.atom_.reportChanged(),t.data_.delete(e)})),n&&dn(this,r),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return or({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return or({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return In(e)&&(e=new Set(e)),rn((function(){Array.isArray(e)||M(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!==e&&void 0!==e&&i("Cannot initialize set from "+e)})),this},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[On]=function(){return this.values()},D(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Rn,get:function(){return"Set"}}]),e}(),In=A("ObservableSet",Dn),Nn=Symbol("mobx-inferred-annotations"),jn=Object.create(null),Bn=function(){function e(e,t,n,r,i){void 0===t&&(t=new Map),void 0===r&&(r=Ee),void 0===i&&(i=!1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.autoBind_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.autoBind_=i,this.keysAtom_=new G("ObservableObject.keys"),this.isPlainObject_=x(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Ue)return n.set(t),!0;if(sn(this)){var r=cn(this,{type:pn,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==ot.UNCHANGED){var i=un(this),o=i?{type:pn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&dn(this,o)}return!0},t.get_=function(e){return ot.trackingDerivation&&!k(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),k(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!ot.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Be(e in this.target_,K,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){!0===t&&(t=this.inferAnnotation_(e)),!1!==t&&(Gn(this,t,e),t.make_(this,e))},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=sr(t,this.defaultAnnotation_,this.autoBind_)),!1===n)return this.defineProperty_(e,t,r);Gn(this,n,e);var i=n.extend_(this,e,t,r);return i&&Vn(this,n,e),i},t.inferAnnotation_=function(e){var t,n=null==(t=this.target_[Nn])?void 0:t.get(e);if(n)return n;for(var r=this.target_;r&&r!==u;){var o=l(r,e);if(o){n=sr(o,this.defaultAnnotation_,this.autoBind_);break}r=Object.getPrototypeOf(r)}if(void 0===n&&i(1,"true",e),!this.isPlainObject_){var a=Object.getPrototypeOf(this.target_);k(a,Nn)||_(a,Nn,new Map),a[Nn].set(e,n)}return n},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{ut();var r=this.delete_(e);if(!r)return r;if(sn(this)){var i=cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=I({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else c(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{ht()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{ut();var i=this.delete_(e);if(!i)return i;if(sn(this)){var o=cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:t});if(!o)return null;t=o.newValue}var a=Hn(e),s={configurable:!ot.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else c(this.target_,e,s);var l=new Be(t,n,"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{ht()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{ut();var r=this.delete_(e);if(!r)return r;if(sn(this))if(!cn(this,{object:this.proxy_||this.target_,name:e,type:Cn,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Hn(e),o={configurable:!ot.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else c(this.target_,e,o);this.values_.set(e,new Ue(t)),this.notifyPropertyAddition_(e,void 0)}finally{ht()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!k(this.target_,e))return!0;if(sn(this)&&!cn(this,{object:this.proxy_||this.target_,name:e,type:"remove"}))return null;try{var n,r;ut();var i,o=un(this),a=this.values_.get(e),s=void 0;if(!a&&o)s=null==(i=l(this.target_,e))?void 0:i.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(a&&(this.values_.delete(e),a instanceof Be&&(s=a.value_),ft(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),o){var c={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:s,name:e};0,o&&dn(this,c)}}finally{ht()}return!0},t.observe_=function(e,t){return hn(this,e)},t.intercept_=function(e){return ln(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,i=un(this);if(i){var o=i?{type:Cn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,i&&dn(this,o)}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),O(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Fn(e,t){var n;if(k(e,V))return e;var r=null!=(n=null==t?void 0:t.name)?n:"ObservableObject",i=new Bn(e,new Map,String(r),function(e){return e?!0===e.deep?pe:!1===e.deep?me:e.defaultDecorator:void 0}(t),null==t?void 0:t.autoBind);return _(e,V,i),e}var zn=A("ObservableObjectAdministration",Bn);function Hn(e){return jn[e]||(jn[e]={get:function(){return this[V].getObservablePropValue_(e)},set:function(t){return this[V].setObservablePropValue_(e,t)}})}function Un(e){return!!w(e)&&zn(e[V])}function Vn(e,t,n){var r;null==(r=e.target_[z])||delete r[n]}function Gn(e,t,n){}var Wn,qn,Xn=0,Yn=function(){};Wn=Yn,qn=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Wn.prototype,qn):void 0!==Wn.prototype.__proto__?Wn.prototype.__proto__=qn:Wn.prototype=qn;var Kn=function(e){function t(t,n,r,i){var o;void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this;var a=new gn(r,n,i,!0);if(a.proxy_=j(o),E(j(o),V,a),t&&t.length){var s=Ie(!0);o.spliceWithArray(0,0,t),Ne(s)}return o}N(t,e);var n=t.prototype;return n.concat=function(){this[V].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map((function(e){return Mn(e)?e.slice():e})))},n[Symbol.iterator]=function(){var e=this,t=0;return or({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},D(t,[{key:"length",get:function(){return this[V].getArrayLength_()},set:function(e){this[V].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}]),t}(Yn);function Qn(e){c(Kn.prototype,""+e,function(e){return{enumerable:!1,configurable:!0,get:function(){return this[V].get_(e)},set:function(t){this[V].set_(e,t)}}}(e))}function Zn(e){if(e>Xn){for(var t=Xn;t<e+100;t++)Qn(t);Xn=e}}function Jn(e,t,n){return new Kn(e,t,n)}function $n(e,t){if("object"===typeof e&&null!==e){if(Mn(e))return void 0!==t&&i(23),e[V].atom_;if(In(e))return e[V];if(Pn(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||i(25,t,tr(e)),n}if(Un(e)){if(!t)return i(26);var r=e[V].values_.get(t);return r||i(27,t,tr(e)),r}if(W(e)||Ve(e)||yt(e))return e}else if(y(e)&&yt(e[V]))return e[V];i(28)}function er(e,t){return e||i(29),void 0!==t?er($n(e,t)):W(e)||Ve(e)||yt(e)||Pn(e)||In(e)?e:e[V]?e[V]:void i(24,e)}function tr(e,t){var n;if(void 0!==t)n=$n(e,t);else{if(Tt(e))return e.name;n=Un(e)||Pn(e)||In(e)?er(e):$n(e)}return n.name_}Object.entries(yn).forEach((function(e){var t=e[0],n=e[1];"concat"!==t&&_(Kn.prototype,t,n)})),Zn(1e3);var nr=u.toString;function rr(e,t,n){return void 0===n&&(n=-1),function e(t,n,r,i,o){if(t===n)return 0!==t||1/t===1/n;if(null==t||null==n)return!1;if(t!==t)return n!==n;var a=typeof t;if(!y(a)&&"object"!==a&&"object"!=typeof n)return!1;var s=nr.call(t);if(s!==nr.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t===""+n;case"[object Number]":return+t!==+t?+n!==+n:0===+t?1/+t===1/n:+t===+n;case"[object Date]":case"[object Boolean]":return+t===+n;case"[object Symbol]":return"undefined"!==typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":r>=0&&r++}t=ir(t),n=ir(n);var l="[object Array]"===s;if(!l){if("object"!=typeof t||"object"!=typeof n)return!1;var c=t.constructor,u=n.constructor;if(c!==u&&!(y(c)&&c instanceof c&&y(u)&&u instanceof u)&&"constructor"in t&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);o=o||[];var h=(i=i||[]).length;for(;h--;)if(i[h]===t)return o[h]===n;if(i.push(t),o.push(n),l){if((h=t.length)!==n.length)return!1;for(;h--;)if(!e(t[h],n[h],r-1,i,o))return!1}else{var d,f=Object.keys(t);if(h=f.length,Object.keys(n).length!==h)return!1;for(;h--;)if(d=f[h],!k(n,d)||!e(t[d],n[d],r-1,i,o))return!1}return i.pop(),o.pop(),!0}(e,t,n)}function ir(e){return Mn(e)?e.slice():S(e)||Pn(e)||M(e)||In(e)?Array.from(e.entries()):e}function or(e){return e[Symbol.iterator]=ar,e}function ar(){return this}function sr(e,t,n){return e.get?Me:!e.set&&(y(e.value)?function(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}(e.value)?!Vt(e.value)&&Ht:!Tt(e.value)&&(n?St.bound:St):t)}["Symbol","Map","Set","Symbol"].forEach((function(e){"undefined"===typeof a()[e]&&i("MobX requires global '"+e+"' to be available or polyfilled")})),"object"===typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:tr},$mobx:V})}).call(this,r(43))},function(e,t,n){"use strict";n.r(t);t.default=function(e){return e instanceof Function?e:"string"===typeof e?function(t){return t[e]}:function(t){return e}}},function(e,t,n){"use strict";var r=n(8),i=n(0),o=n(71),a=n(26),s=n(15),l=n(46),c=n(4),u=n.n(c);function h(e,t,n){var r=[];u()(n[0]&&n[0].nativeEvent,"Native driven events only support animated values contained inside `nativeEvent`."),function e(t,n){if(t instanceof a.a)t.__makeNative(),r.push({nativeEventPath:n,animatedValueTag:t.__getNativeTag()});else if("object"===typeof t)for(var i in t)e(t[i],n.concat(i))}(n[0].nativeEvent,[]);var i=Object(l.a)(e);return null!=i&&r.forEach((function(e){s.a.API.addAnimatedEventToView(i,t,e)})),{detach:function(){null!=i&&r.forEach((function(e){s.a.API.removeAnimatedEventFromView(i,t,e.animatedValueTag)}))}}}var d=function(){function e(e,t){this._listeners=[],this._argMapping=e,null==t&&(console.warn("Animated.event now requires a second argument for options"),t={useNativeDriver:!1}),t.listener&&this.__addListener(t.listener),this._callListeners=this._callListeners.bind(this),this._attachedEvent=null,this.__isNative=Object(s.c)(t)}var t=e.prototype;return t.__addListener=function(e){this._listeners.push(e)},t.__removeListener=function(e){this._listeners=this._listeners.filter((function(t){return t!==e}))},t.__attach=function(e,t){u()(this.__isNative,"Only native driven events need to be attached."),this._attachedEvent=h(e,t,this._argMapping)},t.__detach=function(e,t){u()(this.__isNative,"Only native driven events need to be detached."),this._attachedEvent&&this._attachedEvent.detach()},t.__getHandler=function(){var e=this;if(this.__isNative)return this._callListeners;return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=function e(t,n,r){if(t instanceof a.a)"number"===typeof n&&t.setValue(n);else if("object"===typeof t)for(var i in t)e(t[i],n[i],i)};e._argMapping.forEach((function(e,t){i(e,n[t],"arg"+t)})),e._callListeners.apply(e,n)}},t._callListeners=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._listeners.forEach((function(e){return e.apply(void 0,t)}))},e}(),f=n(21),p=n(32);function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this)._transforms=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var i=r.prototype;return i.__makeNative=function(){this._transforms.forEach((function(e){for(var t in e){var n=e[t];n instanceof f.a&&n.__makeNative()}})),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._transforms.map((function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getValue():t[n]=r}return t}))},i.__getAnimatedValue=function(){return this._transforms.map((function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getAnimatedValue():t[n]=r}return t}))},i.__attach=function(){var e=this;this._transforms.forEach((function(t){for(var n in t){var r=t[n];r instanceof f.a&&r.__addChild(e)}}))},i.__detach=function(){var t=this;this._transforms.forEach((function(e){for(var n in e){var r=e[n];r instanceof f.a&&r.__removeChild(t)}})),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){var e=[];return this._transforms.forEach((function(t){for(var n in t){var r=t[n];r instanceof f.a?e.push({type:"animated",property:n,nodeTag:r.__getNativeTag()}):e.push({type:"static",property:n,value:s.a.transformDataType(r)})}})),s.a.validateTransform(e),{type:"transform",transforms:e}},r}(p.a),v=n(81);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function r(t){var n;return n=e.call(this)||this,(t=Object(v.a)(t)||{}).transform&&(t=b(b({},t),{},{transform:new g(t.transform)})),n._style=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,x(t,n);var i=r.prototype;return i._walkStyleAndGetValues=function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?r.__isNative||(t[n]=r.__getValue()):r&&!Array.isArray(r)&&"object"===typeof r?t[n]=this._walkStyleAndGetValues(r):t[n]=r}return t},i.__getValue=function(){return this._walkStyleAndGetValues(this._style)},i._walkStyleAndGetAnimatedValues=function(e){var t={};for(var n in e){var r=e[n];r instanceof f.a?t[n]=r.__getAnimatedValue():r&&!Array.isArray(r)&&"object"===typeof r&&(t[n]=this._walkStyleAndGetAnimatedValues(r))}return t},i.__getAnimatedValue=function(){return this._walkStyleAndGetAnimatedValues(this._style)},i.__attach=function(){for(var e in this._style){var t=this._style[e];t instanceof f.a&&t.__addChild(this)}},i.__detach=function(){for(var t in this._style){var n=this._style[t];n instanceof f.a&&n.__removeChild(this)}e.prototype.__detach.call(this)},i.__makeNative=function(){for(var t in this._style){var n=this._style[t];n instanceof f.a&&n.__makeNative()}e.prototype.__makeNative.call(this)},i.__getNativeConfig=function(){var e={};for(var t in this._style)if(this._style[t]instanceof f.a){var n=this._style[t];n.__makeNative(),e[t]=n.__getNativeTag()}return s.a.validateStyles(e),{type:"style",style:e}},r}(p.a);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var T=function(e){var t,n;function r(t,n){var r;return r=e.call(this)||this,t.style&&(t=A(A({},t),{},{style:new _(t.style)})),r._props=t,r._callback=n,r.__attach(),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,M(t,n);var i=r.prototype;return i.__getValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a?(!n.__isNative||n instanceof _)&&(e[t]=n.__getValue()):e[t]=n instanceof d?n.__getHandler():n}return e},i.__getAnimatedValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a&&(e[t]=n.__getAnimatedValue())}return e},i.__attach=function(){for(var e in this._props){var t=this._props[e];t instanceof f.a&&t.__addChild(this)}},i.__detach=function(){for(var t in this.__isNative&&this._animatedView&&this.__disconnectAnimatedView(),this._props){var n=this._props[t];n instanceof f.a&&n.__removeChild(this)}e.prototype.__detach.call(this)},i.update=function(){this._callback()},i.__makeNative=function(){if(!this.__isNative){for(var e in this.__isNative=!0,this._props){var t=this._props[e];t instanceof f.a&&t.__makeNative()}this._animatedView&&this.__connectAnimatedView()}},i.setNativeView=function(e){this._animatedView!==e&&(this._animatedView=e,this.__isNative&&this.__connectAnimatedView())},i.__connectAnimatedView=function(){u()(this.__isNative,'Expected node to be marked as "native"');var e=Object(l.a)(this._animatedView);u()(null!=e,"Unable to locate attached view in the native tree"),s.a.API.connectAnimatedNodeToView(this.__getNativeTag(),e)},i.__disconnectAnimatedView=function(){u()(this.__isNative,'Expected node to be marked as "native"');var e=Object(l.a)(this._animatedView);u()(null!=e,"Unable to locate attached view in the native tree"),s.a.API.disconnectAnimatedNodeFromView(this.__getNativeTag(),e)},i.__restoreDefaultValues=function(){this.__isNative&&s.a.API.restoreDefaultValues(this.__getNativeTag())},i.__getNativeConfig=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof f.a&&(n.__makeNative(),e[t]=n.__getNativeTag())}return{type:"props",props:e}},r}(f.a);var C=function(e){var t=e.getForwardedRef,n=e.setLocalRef;return function(e){var r=t();n(e),"function"===typeof r?r(e):"object"===typeof r&&null!=r&&(r.current=e)}};function O(){return(O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=1;var N=function(e,t){u()("function"!==typeof e||e.prototype&&e.prototype.isReactComponent,"`createAnimatedComponent` does not support stateless functional components; use a class component instead.");var n=function(n){var r,o;function a(){for(var e,t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))||this)._invokeAnimatedPropsCallbackOnMount=!1,e._eventDetachers=[],e._animatedComponentId=I+++":animatedComponent",e._isFabric=function(){var t,n,r,i,o,a;return null!=e._component&&(null!=(null==(t=e._component._internalInstanceHandle)||null==(n=t.stateNode)?void 0:n.canonical)||null!=e._component.getNativeScrollRef&&null!=e._component.getNativeScrollRef()&&null!=(null==(r=e._component.getNativeScrollRef()._internalInstanceHandle)||null==(i=r.stateNode)?void 0:i.canonical)||null!=e._component.getScrollResponder&&null!=e._component.getScrollResponder()&&null!=e._component.getScrollResponder().getNativeScrollRef&&null!=e._component.getScrollResponder().getNativeScrollRef()&&null!=(null==(o=e._component.getScrollResponder().getNativeScrollRef()._internalInstanceHandle)||null==(a=o.stateNode)?void 0:a.canonical))},e._waitForUpdate=function(){e._isFabric()&&s.a.API.setWaitingForIdentifier(e._animatedComponentId)},e._markUpdateComplete=function(){e._isFabric()&&s.a.API.unsetWaitingForIdentifier(e._animatedComponentId)},e._animatedPropsCallback=function(){if(null==e._component)e._invokeAnimatedPropsCallbackOnMount=!0;else if("function"!==typeof e._component.setNativeProps||e._isFabric())e.forceUpdate();else{if(e._propsAnimated.__isNative)throw new Error('Attempting to run JS driven animation on animated node that has been moved to "native" earlier by starting an animation with `useNativeDriver: true`');e._component.setNativeProps(e._propsAnimated.__getAnimatedValue())}},e._setComponentRef=C({getForwardedRef:function(){return e.props.forwardedRef},setLocalRef:function(t){e._prevComponent=e._component,e._component=t,null!=t&&null==t.getNode&&(t.getNode=function(){var e;return console.warn("%s: Calling `getNode()` on the ref of an Animated component is no longer necessary. You can now directly use the ref instead. This method will be removed in a future release.",null!==(e=t.constructor.name)&&void 0!==e?e:"<<anonymous>>"),t})}}),e}o=n,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,D(r,o);var l=a.prototype;return l._attachNativeEvents=function(){var e,t=this,n=null!=(e=this._component)&&e.getScrollableNode?this._component.getScrollableNode():this._component,r=function(e){var r=t.props[e];r instanceof d&&r.__isNative&&(r.__attach(n,e),t._eventDetachers.push((function(){return r.__detach(n,e)})))};for(var i in this.props)r(i)},l._detachNativeEvents=function(){this._eventDetachers.forEach((function(e){return e()})),this._eventDetachers=[]},l._attachProps=function(e){var t=this._propsAnimated;e!==t&&(this._propsAnimated=new T(e,this._animatedPropsCallback),t&&(t.__restoreDefaultValues(),t.__detach()))},l.render=function(){var n,r,o=this._propsAnimated.__getValue()||{},a=o.style,s=void 0===a?{}:a,l=L(o,["style"]),c=this.props.passthroughAnimatedPropExplicitValues||{},u=c.style,h=void 0===u?{}:u,d=L(c,["style"]),f=k(k({},s),h),p=null==this._component&&(!1===(null==t?void 0:t.collapsable)||!0!==l.collapsable)||this._isFabric(),m=(null!==(n=l.collapsable)&&void 0!==n?n:this._propsAnimated.__isNative||p||!1===(null==t?void 0:t.collapsable))?{nativeID:null!==(r=l.nativeID)&&void 0!==r?r:"animatedComponent",collapsable:!1}:{};return i.createElement(e,O({},l,d,m,{style:f,ref:this._setComponentRef}))},l.UNSAFE_componentWillMount=function(){this._waitForUpdate(),this._attachProps(this.props)},l.componentDidMount=function(){this._invokeAnimatedPropsCallbackOnMount&&(this._invokeAnimatedPropsCallbackOnMount=!1,this._animatedPropsCallback()),this._propsAnimated.setNativeView(this._component),this._attachNativeEvents(),this._markUpdateComplete()},l.UNSAFE_componentWillReceiveProps=function(e){this._waitForUpdate(),this._attachProps(e)},l.componentDidUpdate=function(e){this._component!==this._prevComponent&&this._propsAnimated.setNativeView(this._component),this._component===this._prevComponent&&e===this.props||(this._detachNativeEvents(),this._attachNativeEvents()),this._markUpdateComplete()},l.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach(),this._detachNativeEvents(),this._markUpdateComplete(),this._component=null,this._prevComponent=null},a}(i.Component);return i.forwardRef((function(e,t){return i.createElement(n,O({},e,null==t?null:{forwardedRef:t}))}))};function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var B=N(i.forwardRef((function(e,t){return i.createElement(o.a,j({scrollEventThrottle:1e-4},e,{ref:t}))}))),F=N(n(37).a,{collapsable:!1}),z=n(49);function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var U=N(i.forwardRef((function(e,t){return i.createElement(z.a,H({scrollEventThrottle:1e-4},e,{ref:t}))})),{collapsable:!1}),V=n(127);function G(){return(G=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var W=N(i.forwardRef((function(e,t){return i.createElement(V.a,G({scrollEventThrottle:1e-4},e,{ref:t}))}))),q=N(n(54).a,{collapsable:!1}),X=N(n(2).a,{collapsable:!0}),Y=n(34);function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Q=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,K(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()+this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"addition",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var J=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this)||this)._a=t,i._min=n,i._max=r,i._value=i._lastValue=i._a.__getValue(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Z(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),e.prototype.__makeNative.call(this)},i.interpolate=function(e){return new Y.a(this,e)},i.__getValue=function(){var e=this._a.__getValue(),t=e-this._lastValue;return this._lastValue=e,this._value=Math.min(Math.max(this._value+t,this._min),this._max),this._value},i.__attach=function(){this._a.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"diffclamp",input:this._a.__getNativeTag(),min:this._min,max:this._max}},r}(p.a);function $(e,t){return($=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ee=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._warnedAboutDivideByZero=!1,(0===n||n instanceof f.a&&0===n.__getValue())&&console.error("Detected potential division by zero in AnimatedDivision"),r._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,$(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){var e=this._a.__getValue(),t=this._b.__getValue();return 0===t?(this._warnedAboutDivideByZero||(console.error("Detected division by zero in AnimatedDivision"),this._warnedAboutDivideByZero=!0),0):(this._warnedAboutDivideByZero=!1,e/t)},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"division",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ne=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a=t,r._modulus=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,te(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return(this._a.__getValue()%this._modulus+this._modulus)%this._modulus},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"modulus",input:this._a.__getNativeTag(),modulus:this._modulus}},r}(p.a);function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ie=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,re(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()*this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"multiplication",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function oe(e,t){return(oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ae=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._a="number"===typeof t?new a.a(t):t,r._b="number"===typeof n?new a.a(n):n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,oe(t,n);var i=r.prototype;return i.__makeNative=function(){this._a.__makeNative(),this._b.__makeNative(),e.prototype.__makeNative.call(this)},i.__getValue=function(){return this._a.__getValue()-this._b.__getValue()},i.interpolate=function(e){return new Y.a(this,e)},i.__attach=function(){this._a.__addChild(this),this._b.__addChild(this)},i.__detach=function(){this._a.__removeChild(this),this._b.__removeChild(this),e.prototype.__detach.call(this)},i.__getNativeConfig=function(){return{type:"subtraction",input:[this._a.__getNativeTag(),this._b.__getNativeTag()]}},r}(p.a);function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(e,t){return(ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var he=function(e){var t,n;function r(t,n,r,i,o){var a;return(a=e.call(this)||this)._value=t,a._parent=n,a._animationClass=r,a._animationConfig=i,a._useNativeDriver=Object(s.c)(i),a._callback=o,a.__attach(),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ue(t,n);var i=r.prototype;return i.__makeNative=function(){this.__isNative=!0,this._parent.__makeNative(),e.prototype.__makeNative.call(this),this._value.__makeNative()},i.__getValue=function(){return this._parent.__getValue()},i.__attach=function(){this._parent.__addChild(this),this._useNativeDriver&&this.__makeNative()},i.__detach=function(){this._parent.__removeChild(this),e.prototype.__detach.call(this)},i.update=function(){this._value.animate(new this._animationClass(le(le({},this._animationConfig),{},{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},i.__getNativeConfig=function(){var e=new this._animationClass(le(le({},this._animationConfig),{},{toValue:void 0})).__getNativeAnimationConfig();return{type:"tracking",animationId:Object(s.b)(),animationConfig:e,toValue:this._parent.__getNativeTag(),value:this._value.__getNativeTag()}},r}(f.a),de=n(78),fe=n(242),pe=n(164),me=n(166);function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be=function(e,t){return e&&t.onComplete?function(){t.onComplete&&t.onComplete.apply(t,arguments),e&&e.apply(void 0,arguments)}:e||t.onComplete},we=function(e,t,n){if(e instanceof de.a){var r=ve({},t),i=ve({},t);for(var o in t){var a=t[o],s=a.x,l=a.y;void 0!==s&&void 0!==l&&(r[o]=s,i[o]=l)}var c=n(e.x,r),u=n(e.y,i);return Ee([c,u],{stopTogether:!1})}return null},xe=function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),t.toValue instanceof f.a?r.track(new he(r,t.toValue,me.a,i,n)):r.animate(new me.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},_e=function(e){var t=0;return{start:function(n){0===e.length?n&&n({finished:!0}):e[t].start((function r(i){i.finished&&++t!==e.length?e[t].start(r):n&&n(i)}))},stop:function(){t<e.length&&e[t].stop()},reset:function(){e.forEach((function(e,n){n<=t&&e.reset()})),t=0},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.sequence animations")},_isUsingNativeDriver:function(){return!1}}},Ee=function(e,t){var n=0,r={},i=!(t&&!1===t.stopTogether),o={start:function(t){n!==e.length?e.forEach((function(a,s){var l=function(a){if(r[s]=!0,++n===e.length)return n=0,void(t&&t(a));!a.finished&&i&&o.stop()};a?a.start(l):l({finished:!0})})):t&&t({finished:!0})},stop:function(){e.forEach((function(e,t){!r[t]&&e.stop(),r[t]=!0}))},reset:function(){e.forEach((function(e,t){e.reset(),r[t]=!1,n=0}))},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.parallel animations")},_isUsingNativeDriver:function(){return!1}};return o},Ae=function(e){return xe(new a.a(0),{toValue:0,delay:e,duration:0,useNativeDriver:!1})};var Se={Value:a.a,ValueXY:de.a,Interpolation:Y.a,Node:f.a,decay:function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),r.animate(new fe.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},timing:xe,spring:function e(t,n){var r=function(e,t,n){n=be(n,t);var r=e,i=t;r.stopTracking(),t.toValue instanceof f.a?r.track(new he(r,t.toValue,pe.a,i,n)):r.animate(new pe.a(i),n)};return we(t,n,e)||{start:function(e){r(t,n,e)},stop:function(){t.stopAnimation()},reset:function(){t.resetAnimation()},_startNativeLoop:function(e){var i=ve(ve({},n),{},{iterations:e});r(t,i)},_isUsingNativeDriver:function(){return n.useNativeDriver||!1}}},add:function(e,t){return new Q(e,t)},subtract:function(e,t){return new ae(e,t)},divide:function(e,t){return new ee(e,t)},multiply:function(e,t){return new ie(e,t)},modulo:function(e,t){return new ne(e,t)},diffClamp:function(e,t,n){return new J(e,t,n)},delay:Ae,sequence:_e,parallel:Ee,stagger:function(e,t){return Ee(t.map((function(t,n){return _e([Ae(e*n),t])})))},loop:function(e,t){var n=void 0===t?{}:t,r=n.iterations,i=void 0===r?-1:r,o=n.resetBeforeIteration,a=void 0===o||o,s=!1,l=0;return{start:function(t){e&&0!==i?e._isUsingNativeDriver()?e._startNativeLoop(i):function n(r){void 0===r&&(r={finished:!0}),s||l===i||!1===r.finished?t&&t(r):(l++,a&&e.reset(),e.start(n))}():t&&t({finished:!0})},stop:function(){s=!0,e.stop()},reset:function(){l=0,s=!1,e.reset()},_startNativeLoop:function(){throw new Error("Loops run using the native driver cannot contain Animated.loop animations")},_isUsingNativeDriver:function(){return e._isUsingNativeDriver()}}},event:function(e,t){var n=new d(e,t);return n.__isNative?n:n.__getHandler()},createAnimatedComponent:N,attachNativeEvent:h,forkEvent:function(e,t){return e?e instanceof d?(e.__addListener(t),e):function(){"function"===typeof e&&e.apply(void 0,arguments),t.apply(void 0,arguments)}:t},unforkEvent:function(e,t){e&&e instanceof d&&e.__removeListener(t)},Event:d,__PropsOnlyForTests:T};function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){Ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oe={start:function(){},stop:function(){},reset:function(){},_startNativeLoop:function(){},_isUsingNativeDriver:function(){return!1}},Re={Value:a.a,ValueXY:de.a,Interpolation:Y.a,Node:f.a,decay:function(e,t){return Oe},timing:function(e,t){var n=e;return Te(Te({},Oe),{},{start:function(e){n.setValue(t.toValue),e&&e({finished:!0})}})},spring:function(e,t){var n=e;return Te(Te({},Oe),{},{start:function(e){n.setValue(t.toValue),e&&e({finished:!0})}})},add:Se.add,subtract:Se.subtract,divide:Se.divide,multiply:Se.multiply,modulo:Se.modulo,diffClamp:Se.diffClamp,delay:function(e){return Oe},sequence:function(e){return Oe},parallel:function(e,t){return Oe},stagger:function(e,t){return Oe},loop:function(e,t){(void 0===t?{}:t).iterations;return Oe},event:function(e,t){return null},createAnimatedComponent:N,attachNativeEvent:h,forkEvent:Se.forkEvent,unforkEvent:Se.unforkEvent,Event:d,__PropsOnlyForTests:T};function ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Le=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({FlatList:B,Image:F,ScrollView:U,SectionList:W,Text:q,View:X},r.a.isTesting?Re:Se);t.a=Le},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";var r,i="function"===typeof Float32Array;function o(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,n){return((o(t,n)*e+a(t,n))*e+s(t))*e}function c(e,t,n){return 3*o(t,n)*e*e+2*a(t,n)*e+s(t)}function u(e,t,n,r){if(!(e>=0&&e<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");var o=i?new Float32Array(11):new Array(11);if(e!==t||n!==r)for(var a=0;a<11;++a)o[a]=l(.1*a,e,n);function s(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=.1;--i;var a=r+.1*((t-o[i])/(o[i+1]-o[i])),s=c(a,e,n);return s>=.001?function(e,t,n,r){for(var i=t,o=0;o<4;++o){var a=c(i,n,r);if(0===a)return i;i-=(l(i,n,r)-e)/a}return i}(t,a,e,n):0===s?a:function(e,t,n,r,i){var o,a,s=0,c=t,u=n;do{(o=l(a=c+(u-c)/2,r,i)-e)>0?u=a:c=a}while(Math.abs(o)>1e-7&&++s<10);return a}(t,r,r+.1,e,n)}return function(i){return e===t&&n===r?i:0===i?0:1===i?1:l(s(i),t,r)}}var h=function(){function e(){}return e.step0=function(e){return e>0?1:0},e.step1=function(e){return e>=1?1:0},e.linear=function(e){return e},e.ease=function(t){return r||(r=e.bezier(.42,0,1,1)),r(t)},e.quad=function(e){return e*e},e.cubic=function(e){return e*e*e},e.poly=function(e){return function(t){return Math.pow(t,e)}},e.sin=function(e){return 1-Math.cos(e*Math.PI/2)},e.circle=function(e){return 1-Math.sqrt(1-e*e)},e.exp=function(e){return Math.pow(2,10*(e-1))},e.elastic=function(e){void 0===e&&(e=1);var t=e*Math.PI;return function(e){return 1-Math.pow(Math.cos(e*Math.PI/2),3)*Math.cos(e*t)}},e.back=function(e){return void 0===e&&(e=1.70158),function(t){return t*t*((e+1)*t-e)}},e.bounce=function(e){if(e<1/2.75)return 7.5625*e*e;if(e<2/2.75){var t=e-1.5/2.75;return 7.5625*t*t+.75}if(e<2.5/2.75){var n=e-2.25/2.75;return 7.5625*n*n+.9375}var r=e-2.625/2.75;return 7.5625*r*r+.984375},e.bezier=function(e,t,n,r){return u(e,t,n,r)},e.in=function(e){return e},e.out=function(e){return function(t){return 1-e(1-t)}},e.inOut=function(e){return function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2}},e}();t.a=h},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return _}));var r,i=n(241),o=n(240),a=n(134),s=n(8),l=n(4),c=n.n(l),u="ios"===s.a.OS&&e.RN$Bridgeless?o.a:i.a,h=1,d=1,f=new Set,p=!1,m=[],g={getValue:function(e,t){c()(u,"Native animated module is not available"),u.getValue&&u.getValue(e,t)},setWaitingForIdentifier:function(e){f.add(e),p=!0},unsetWaitingForIdentifier:function(e){f.delete(e),0===f.size&&(p=!1,g.disableQueue())},disableQueue:function(){c()(u,"Native animated module is not available"),"android"===s.a.OS&&u.startOperationBatch();for(var e=0,t=m.length;e<t;e++)m[e]();m.length=0,"android"===s.a.OS&&u.finishOperationBatch()},queueOperation:function(e){p?m.push(e):e()},createAnimatedNode:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.createAnimatedNode(e,t)}))},startListeningToAnimatedNodeValue:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.startListeningToAnimatedNodeValue(e)}))},stopListeningToAnimatedNodeValue:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.stopListeningToAnimatedNodeValue(e)}))},connectAnimatedNodes:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.connectAnimatedNodes(e,t)}))},disconnectAnimatedNodes:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.disconnectAnimatedNodes(e,t)}))},startAnimatingNode:function(e,t,n,r){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.startAnimatingNode(e,t,n,r)}))},stopAnimation:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.stopAnimation(e)}))},setAnimatedNodeValue:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.setAnimatedNodeValue(e,t)}))},setAnimatedNodeOffset:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.setAnimatedNodeOffset(e,t)}))},flattenAnimatedNodeOffset:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.flattenAnimatedNodeOffset(e)}))},extractAnimatedNodeOffset:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.extractAnimatedNodeOffset(e)}))},connectAnimatedNodeToView:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.connectAnimatedNodeToView(e,t)}))},disconnectAnimatedNodeFromView:function(e,t){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.disconnectAnimatedNodeFromView(e,t)}))},restoreDefaultValues:function(e){c()(u,"Native animated module is not available"),null!=u.restoreDefaultValues&&g.queueOperation((function(){return u.restoreDefaultValues(e)}))},dropAnimatedNode:function(e){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.dropAnimatedNode(e)}))},addAnimatedEventToView:function(e,t,n){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.addAnimatedEventToView(e,t,n)}))},removeAnimatedEventFromView:function(e,t,n){c()(u,"Native animated module is not available"),g.queueOperation((function(){return u.removeAnimatedEventFromView(e,t,n)}))}},v={opacity:!0,transform:!0,borderRadius:!0,borderBottomEndRadius:!0,borderBottomLeftRadius:!0,borderBottomRightRadius:!0,borderBottomStartRadius:!0,borderTopEndRadius:!0,borderTopLeftRadius:!0,borderTopRightRadius:!0,borderTopStartRadius:!0,elevation:!0,zIndex:!0,shadowOpacity:!0,shadowRadius:!0,scaleX:!0,scaleY:!0,translateX:!0,translateY:!0},y={translateX:!0,translateY:!0,scale:!0,scaleX:!0,scaleY:!0,rotate:!0,rotateX:!0,rotateY:!0,rotateZ:!0,perspective:!0},b={inputRange:!0,outputRange:!0,extrapolate:!0,extrapolateRight:!0,extrapolateLeft:!0};function w(){return d++}var x=!1;function _(e){return null==e.useNativeDriver&&console.warn("Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`"),!0!==e.useNativeDriver||u?e.useNativeDriver||!1:(x||(console.warn("Animated: `useNativeDriver` is not supported because the native animated module is missing. Falling back to JS-based animation. To resolve this, add `RCTAnimation` module to this app, or remove `useNativeDriver`. Make sure to run `pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md"),x=!0),!1)}t.a={API:g,addWhitelistedStyleProp:function(e){v[e]=!0},addWhitelistedTransformProp:function(e){y[e]=!0},addWhitelistedInterpolationParam:function(e){b[e]=!0},validateStyles:function(e){for(var t in e)if(!v.hasOwnProperty(t))throw new Error("Style property '"+t+"' is not supported by native animated module")},validateTransform:function(e){e.forEach((function(e){if(!y.hasOwnProperty(e.property))throw new Error("Property '"+e.property+"' is not supported by native animated module")}))},validateInterpolation:function(e){for(var t in e)if(!b.hasOwnProperty(t))throw new Error("Interpolation property '"+t+"' is not supported by native animated module")},generateNewNodeTag:function(){return h++},generateNewAnimationId:w,assertNativeAnimatedModule:function(){c()(u,"Native animated module is not available")},shouldUseNativeDriver:_,transformDataType:function(e){return"string"!==typeof e?e:/deg$/.test(e)?(parseFloat(e)||0)*Math.PI/180:e},get nativeEventEmitter(){return r||(r=new a.a(u)),r}}}).call(this,n(43))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(290);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(15),i=n(4),o=n.n(i),a=r.a.API,s=1,l=function(){var e=t.prototype;function t(){this._listeners={}}return e.__attach=function(){},e.__detach=function(){this.__isNative&&null!=this.__nativeTag&&(r.a.API.dropAnimatedNode(this.__nativeTag),this.__nativeTag=void 0)},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(e){},e.__removeChild=function(e){},e.__getChildren=function(){return[]},e.__makeNative=function(){if(!this.__isNative)throw new Error('This node cannot be made a "native" animated node');this.hasListeners()&&this._startListeningToNativeValueUpdates()},e.addListener=function(e){var t=String(s++);return this._listeners[t]=e,this.__isNative&&this._startListeningToNativeValueUpdates(),t},e.removeListener=function(e){delete this._listeners[e],this.__isNative&&!this.hasListeners()&&this._stopListeningForNativeValueUpdates()},e.removeAllListeners=function(){this._listeners={},this.__isNative&&this._stopListeningForNativeValueUpdates()},e.hasListeners=function(){return!!Object.keys(this._listeners).length},e._startListeningToNativeValueUpdates=function(){var e=this;this.__nativeAnimatedValueListener&&!this.__shouldUpdateListenersForNewNativeTag||(this.__shouldUpdateListenersForNewNativeTag&&(this.__shouldUpdateListenersForNewNativeTag=!1,this._stopListeningForNativeValueUpdates()),a.startListeningToAnimatedNodeValue(this.__getNativeTag()),this.__nativeAnimatedValueListener=r.a.nativeEventEmitter.addListener("onAnimatedValueUpdate",(function(t){t.tag===e.__getNativeTag()&&e._onAnimatedValueUpdateReceived(t.value)})))},e._onAnimatedValueUpdateReceived=function(e){this.__callListeners(e)},e.__callListeners=function(e){for(var t in this._listeners)this._listeners[t]({value:e})},e._stopListeningForNativeValueUpdates=function(){this.__nativeAnimatedValueListener&&(this.__nativeAnimatedValueListener.remove(),this.__nativeAnimatedValueListener=null,a.stopListeningToAnimatedNodeValue(this.__getNativeTag()))},e.__getNativeTag=function(){var e;r.a.assertNativeAnimatedModule(),o()(this.__isNative,'Attempt to get native tag from node not marked as "native"');var t=null!==(e=this.__nativeTag)&&void 0!==e?e:r.a.generateNewNodeTag();return null==this.__nativeTag&&(this.__nativeTag=t,r.a.API.createAnimatedNode(t,this.__getNativeConfig()),this.__shouldUpdateListenersForNewNativeTag=!0),t},e.__getNativeConfig=function(){throw new Error("This JS animated node type cannot be used as native animated node")},e.toJSON=function(){return this.__getValue()},t}();t.a=l},function(e,t,n){var r=n(362),i=n(363),o=n(177),a=n(364);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(153);e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(186).default,i=n(16);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(34),i=n(32),o=n(51);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=n(15).a.API;var l=function(e){var t,n;function i(t){var n;if(n=e.call(this)||this,"number"!==typeof t)throw new Error("AnimatedValue: Attempting to set value to undefined");return n._startingValue=n._value=t,n._offset=0,n._animation=null,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l=i.prototype;return l.__detach=function(){var t=this;this.__isNative&&s.getValue(this.__getNativeTag(),(function(e){t._value=e})),this.stopAnimation(),e.prototype.__detach.call(this)},l.__getValue=function(){return this._value+this._offset},l.setValue=function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e,!this.__isNative),this.__isNative&&s.setAnimatedNodeValue(this.__getNativeTag(),e)},l.setOffset=function(e){this._offset=e,this.__isNative&&s.setAnimatedNodeOffset(this.__getNativeTag(),e)},l.flattenOffset=function(){this._value+=this._offset,this._offset=0,this.__isNative&&s.flattenAnimatedNodeOffset(this.__getNativeTag())},l.extractOffset=function(){this._offset+=this._value,this._value=0,this.__isNative&&s.extractAnimatedNodeOffset(this.__getNativeTag())},l.stopAnimation=function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())},l.resetAnimation=function(e){this.stopAnimation(e),this._value=this._startingValue},l._onAnimatedValueUpdateReceived=function(e){this._updateValue(e,!1)},l.interpolate=function(e){return new r.a(this,e)},l.animate=function(e,t){var n=this,r=null;e.__isInteraction&&(r=o.a.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,(function(e){n._updateValue(e,!0)}),(function(e){n._animation=null,null!==r&&o.a.clearInteractionHandle(r),t&&t(e)}),i,this)},l.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},l.track=function(e){this.stopTracking(),this._tracking=e},l._updateValue=function(t,n){if(void 0===t)throw new Error("AnimatedValue: Attempting to set value to undefined");this._value=t,n&&function(e){var t=new Set;!function e(n){"function"===typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach((function(e){return e.update()}))}(this),e.prototype.__callListeners.call(this,this.__getValue())},l.__getNativeConfig=function(){return{type:"value",value:this._value,offset:this._offset}},i}(i.a);t.a=l},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"g",(function(){return u}));var r={children:!0,dataSet:!0,nativeID:!0,ref:!0,suppressHydrationWarning:!0,testID:!0},i={accessibilityActiveDescendant:!0,accessibilityAtomic:!0,accessibilityAutoComplete:!0,accessibilityBusy:!0,accessibilityChecked:!0,accessibilityColumnCount:!0,accessibilityColumnIndex:!0,accessibilityColumnSpan:!0,accessibilityControls:!0,accessibilityCurrent:!0,accessibilityDescribedBy:!0,accessibilityDetails:!0,accessibilityDisabled:!0,accessibilityErrorMessage:!0,accessibilityExpanded:!0,accessibilityFlowTo:!0,accessibilityHasPopup:!0,accessibilityHidden:!0,accessibilityInvalid:!0,accessibilityKeyShortcuts:!0,accessibilityLabel:!0,accessibilityLabelledBy:!0,accessibilityLevel:!0,accessibilityLiveRegion:!0,accessibilityModal:!0,accessibilityMultiline:!0,accessibilityMultiSelectable:!0,accessibilityOrientation:!0,accessibilityOwns:!0,accessibilityPlaceholder:!0,accessibilityPosInSet:!0,accessibilityPressed:!0,accessibilityReadOnly:!0,accessibilityRequired:!0,accessibilityRole:!0,accessibilityRoleDescription:!0,accessibilityRowCount:!0,accessibilityRowIndex:!0,accessibilityRowSpan:!0,accessibilitySelected:!0,accessibilitySetSize:!0,accessibilitySort:!0,accessibilityValueMax:!0,accessibilityValueMin:!0,accessibilityValueNow:!0,accessibilityValueText:!0,dir:!0,focusable:!0,accessible:!0,accessibilityState:!0,accessibilityValue:!0},o={onClick:!0,onClickCapture:!0,onContextMenu:!0},a={onBlur:!0,onFocus:!0},s={onKeyDown:!0,onKeyDownCapture:!0,onKeyUp:!0,onKeyUpCapture:!0},l={onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOver:!0,onMouseOut:!0,onMouseUp:!0},c={onTouchCancel:!0,onTouchCancelCapture:!0,onTouchEnd:!0,onTouchEndCapture:!0,onTouchMove:!0,onTouchMoveCapture:!0,onTouchStart:!0,onTouchStartCapture:!0},u={classList:!0,style:!0}},function(e,t,n){"use strict";var r=n(98),i=n(104);var o=function(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||i.a.hasOwnProperty(e)&&i.a[e]?(""+t).trim():t+"px"};var a=function(e,t){var n=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=0===r.indexOf("--"),a=o(r,t[r],i);"float"===r&&(r="cssFloat"),i?n.setProperty(r,a):n[r]=a}},s=function(e){var t=Object(r.a)(e),n=t.x,i=t.y,o=t.top,a=t.left;return{x:n,y:i,width:e.offsetWidth,height:e.offsetHeight,top:o,left:a}},l=function(e,t,n){var i=t||e&&e.parentNode;e&&i&&setTimeout((function(){var t=Object(r.a)(i),o=s(e),a=o.height,l=o.left,c=o.top,u=o.width,h=l-t.left,d=c-t.top;n(h,d,u,a,l,c)}),0)},c={A:!0,INPUT:!0,SELECT:!0,TEXTAREA:!0},u={blur:function(e){try{e.blur()}catch(t){}},focus:function(e){try{var t=e.nodeName;null==e.getAttribute("tabIndex")&&null==c[t]&&e.setAttribute("tabIndex","-1"),e.focus()}catch(n){}},measure:function(e,t){l(e,null,t)},measureInWindow:function(e,t){e&&setTimeout((function(){var n=s(e),r=n.height,i=n.left,o=n.top,a=n.width;t(i,o,a,r)}),0)},measureLayout:function(e,t,n,r){l(e,t,r)},updateView:function(e,t){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=t[n];switch(n){case"style":a(e,r);break;case"class":case"className":e.setAttribute("class",r);break;case"text":case"value":e.value=r;break;default:e.setAttribute(n,r)}}},configureNextLayoutAnimation:function(e,t){t()},setLayoutAnimationEnabledExperimental:function(){}};t.a=u},function(e,t,n){"use strict";var r=n(74);n.o(r,"NavigationContext")&&n.d(t,"NavigationContext",(function(){return r.NavigationContext})),n.o(r,"NavigationHelpersContext")&&n.d(t,"NavigationHelpersContext",(function(){return r.NavigationHelpersContext})),n.o(r,"NavigationRouteContext")&&n.d(t,"NavigationRouteContext",(function(){return r.NavigationRouteContext})),n.o(r,"StackActions")&&n.d(t,"StackActions",(function(){return r.StackActions})),n.o(r,"StackRouter")&&n.d(t,"StackRouter",(function(){return r.StackRouter})),n.o(r,"createNavigatorFactory")&&n.d(t,"createNavigatorFactory",(function(){return r.createNavigatorFactory})),n.o(r,"useNavigation")&&n.d(t,"useNavigation",(function(){return r.useNavigation})),n.o(r,"useNavigationBuilder")&&n.d(t,"useNavigationBuilder",(function(){return r.useNavigationBuilder}));var i=n(203);n.o(i,"NavigationContext")&&n.d(t,"NavigationContext",(function(){return i.NavigationContext})),n.o(i,"NavigationHelpersContext")&&n.d(t,"NavigationHelpersContext",(function(){return i.NavigationHelpersContext})),n.o(i,"NavigationRouteContext")&&n.d(t,"NavigationRouteContext",(function(){return i.NavigationRouteContext})),n.o(i,"StackActions")&&n.d(t,"StackActions",(function(){return i.StackActions})),n.o(i,"StackRouter")&&n.d(t,"StackRouter",(function(){return i.StackRouter})),n.o(i,"createNavigatorFactory")&&n.d(t,"createNavigatorFactory",(function(){return i.createNavigatorFactory})),n.o(i,"useNavigation")&&n.d(t,"useNavigation",(function(){return i.useNavigation})),n.o(i,"useNavigationBuilder")&&n.d(t,"useNavigationBuilder",(function(){return i.useNavigationBuilder}))},function(t,n,r){"use strict";(function(t,i){r.d(n,"a",(function(){return w})),r.d(n,"b",(function(){return b})),r.d(n,"c",(function(){return g})),r.d(n,"d",(function(){return Dt}));var o,a=r(10),s="warn";function l(){return s}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(o||(o={}));var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function u(e,t){function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function d(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(f(arguments[t]));return e}function m(e){return ne(e,1),re(e).type}function g(e,t){return ne(e,1),Oe(t,2),re(e).onSnapshot(t)}function v(e,t){ne(e,1),Ce(t,(function(e){return"object"===typeof e}),"object or array",2),re(e).applyPatches(ge(t))}function y(e,t){void 0===t&&(t=!0),ne(e,1);var n=re(e);return t?n.snapshot:we(n.type.getSnapshot(n,!1))}function b(e){return ne(e,1),re(e).root.storedValue}function w(e){ne(e,1);var t=re(e).root.environment;return t||ue}var x=function(){function e(e,t,n,r){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:K.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=r,this.baseSetParent(t,n)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){var t=this.isAlive;this._state=e;var n=this.isAlive;this.aliveAtom&&t!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._hookSubscribers&&this._hookSubscribers.emit(e,this,e)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._hookSubscribers||(this._hookSubscribers=new Ee),this._hookSubscribers.register(e,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._parent=e,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&(this.pathAtom||(this.pathAtom=Object(a.j)("path")),this.pathAtom.reportObserved()),this.parent?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?Le(this._subpath):""),this.parent.getEscapedPath(e)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==K.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===K.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=Object(a.j)("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.state===K.CREATED){if(this.parent){if(this.parent.state!==K.FINALIZED)return;this.fireHook(o.afterAttach)}this.state=K.FINALIZED,e&&e()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=K.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(o.beforeDestroy)}}),e}(),_=function(t){function n(n,r,i,o,a){var s=t.call(this,n,r,i,o)||this;try{s.storedValue=n.createNewInstance(a)}catch(e){throw s.state=K.DEAD,e}return s.state=K.CREATED,s.finalizeCreation(),s}return u(n,t),Object.defineProperty(n.prototype,"root",{get:function(){if(!this.parent)throw de("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.parent!==e,r=this.subpath!==t;(n||r)&&(this.environment=void 0,this.baseSetParent(this.parent,t))}}),Object.defineProperty(n.prototype,"snapshot",{get:function(){return we(this.getSnapshot())},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(n.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")}}),Object.defineProperty(n.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==K.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(n.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(n.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(n.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(n.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.fireInternalHook(e)}}),n}(x);_.prototype.die=Object(a.g)(_.prototype.die);var E,A,S=1,M={onError:function(e){throw e}},T=function(t){function n(e,n,r,i,o){var s=t.call(this,e,n,r,i)||this;if(Object.defineProperty(s,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++S}),Object.defineProperty(s,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(s,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(s,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(s,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(s,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),s._snapshotComputed=Object(a.h)((function(){return we(s.getSnapshot())})),s.unbox=s.unbox.bind(s),s._initialSnapshot=we(o),s.identifierAttribute=e.identifierAttribute,n||(s.identifierCache=new Z),s._childNodes=e.initializeChildNodes(s,s._initialSnapshot),s.identifier=null,s.unnormalizedIdentifier=null,s.identifierAttribute&&s._initialSnapshot){var l=s._initialSnapshot[s.identifierAttribute];if(void 0===l){var c=s._childNodes[s.identifierAttribute];c&&(l=c.value)}if("string"!==typeof l&&"number"!==typeof l)throw de("Instance identifier '"+s.identifierAttribute+"' for type '"+s.type.name+"' must be a string or a number");s.identifier=kt(l),s.unnormalizedIdentifier=l}return n?n.root.identifierCache.addNodeToCache(s):s.identifierCache.addNodeToCache(s),s}return u(n,t),Object.defineProperty(n.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)}}),Object.defineProperty(n.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)}}),Object.defineProperty(n.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(){0===this._observableInstanceState&&this.createObservableInstance()}}),Object.defineProperty(n.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t,n;this._observableInstanceState=1;for(var r=[],i=this.parent;i&&0===i._observableInstanceState;)r.unshift(i),i=i.parent;try{for(var a=d(r),s=a.next();!s.done;s=a.next()){s.value.createObservableInstanceIfNeeded()}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}var l=this.type;try{this.storedValue=l.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,l.finalizeNewInstance(this,this.storedValue)}catch(e){throw this.state=K.DEAD,e}finally{this._isRunningAction=!1}this._observableInstanceState=2,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=ue,this.state=K.CREATED,this.fireHook(o.afterCreate),this.finalizeCreation()}}),Object.defineProperty(n.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(o.beforeDetach);var e=this.state;this.state=K.DETACHING;var t=this.root,n=t.environment,r=t.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=r}finally{this.state=e}}}}),Object.defineProperty(n.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=e!==this.parent,r=t!==this.subpath;(n||r)&&(n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,t),this.fireHook(o.afterAttach)):r&&this.baseSetParent(this.parent,t))}}),Object.defineProperty(n.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"===typeof this.storedValue&&this.storedValue[e];"function"===typeof n&&(a.c?Object(a.c)((function(){n.apply(t.storedValue)})):n.apply(this.storedValue))}}),Object.defineProperty(n.prototype,"snapshot",{get:function(){return this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(n.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(n.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,n=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,n),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(n.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()}}),Object.defineProperty(n.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=l();if(!this.isAlive&&"ignore"!==t){var n=this._getAssertAliveError(e);switch(t){case"error":throw de(n);case"warn":Te(n)}}}}),Object.defineProperty(n.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",n=e.subpath&&Le(e.subpath)||"",r=e.actionContext||N();r&&"action"!==r.type&&r.parentActionEvent&&(r=r.parentActionEvent);var i,o="";r&&null!=r.name&&(o=(r&&r.context&&(ne(i=r.context,1),re(i).path)||t)+"."+r.name+"()");return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+n+"', Action: '"+o+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."}}),Object.defineProperty(n.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(ue),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):se(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type.getChildType(e)}}),Object.defineProperty(n.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw de("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")}}),Object.defineProperty(n.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.type.removeChild(this,e)}}),Object.defineProperty(n.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e}}),Object.defineProperty(n.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")}}),Object.defineProperty(n.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.baseFinalizeCreation((function(){var t,n;try{for(var r=d(e.getChildren()),i=r.next();!i.done;i=r.next()){i.value.finalizeCreation()}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}e.fireInternalHook(o.afterCreationFinalization)}))}}),Object.defineProperty(n.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw de("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(n.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this._applyPatches=z(this.storedValue,"@APPLY_PATCHES",(function(t){t.forEach((function(t){if(t.path){var n=Ne(t.path);ae(e,n.slice(0,-1)).applyPatchLocally(n[n.length-1],t)}else e.type.applySnapshot(e,t.value)}))})),this._applySnapshot=z(this.storedValue,"@APPLY_SNAPSHOT",(function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)})),xe(this.storedValue,"$treenode",this),xe(this.storedValue,"toJSON",oe)}}),Object.defineProperty(n.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==K.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(n.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){0!==this._observableInstanceState&&(this.getChildren().forEach((function(e){e.aboutToDie()})),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))}}),Object.defineProperty(n.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach((function(e){e.finalizeDeath()})),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(n.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)}}),Object.defineProperty(n.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEventsEmit("snapshot",e)}}),Object.defineProperty(n.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsRegister("patch",e)}}),Object.defineProperty(n.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._internalEventsHasSubscribers("patch")){var n=f(function(e){if(!("oldValue"in e))throw de("Patches without `oldValue` field cannot be inversed");return[ke(e),Pe(e)]}(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var i=t[r];for(var o in i)e[o]=i[o]}return e}({},e,{path:t.path.substr(this.path.length)+"/"+e.path})),2),r=n[0],i=n[1];this._internalEventsEmit("patch",r,i)}this.parent&&this.parent.emitPatch(e,t)}}),Object.defineProperty(n.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsHas("dispose",e)}}),Object.defineProperty(n.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.hasDisposer(e))throw de("cannot add a disposer when it is already registered for execution");this._internalEventsRegister("dispose",e,!0)}}),Object.defineProperty(n.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._internalEventsHas("dispose",e))throw de("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",e)}}),Object.defineProperty(n.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.middlewares){var t=this.middlewares.indexOf(e);t>=0&&this.middlewares.splice(t,1)}}}),Object.defineProperty(n.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=!0);var r={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(r):this.middlewares=[r],function(){n.removeMiddleware(r)}}}),Object.defineProperty(n.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)}}),Object.defineProperty(n.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(!this._hasSnapshotReaction){var t=Object(a.u)((function(){return e.snapshot}),(function(t){return e.emitSnapshot(t)}),M);this.addDisposer(t),this._hasSnapshotReaction=!0}}}),Object.defineProperty(n.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)}}),Object.defineProperty(n.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){return void 0===n&&(n=!1),this._internalEvents||(this._internalEvents=new Ee),this._internalEvents.register(e,t,n)}}),Object.defineProperty(n.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this._internalEvents&&(t=this._internalEvents).emit.apply(t,p([e],n))}}),Object.defineProperty(n.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEvents&&this._internalEvents.clear(e)}}),Object.defineProperty(n.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),n}(x);T.prototype.createObservableInstance=Object(a.g)(T.prototype.createObservableInstance),T.prototype.detach=Object(a.g)(T.prototype.detach),T.prototype.die=Object(a.g)(T.prototype.die),function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor"}(A||(A={}));var C=Symbol("$type"),O=function(){function e(e){Object.defineProperty(this,E,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Y(this,e),this.instantiate(null,"",t,e).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw de("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(ie(e)){var n=m(e);return this.isAssignableFrom(n)?W():q(t,e)}return this.isValidSnapshot(e,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return 0===this.validate(e,[{path:"",type:this}]).length}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw de("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw de("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw de("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw de("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();E=C,O.prototype.create=Object(a.g)(O.prototype.create);var R=function(e){function t(t){var n=e.call(this,t)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return u(t,e),Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return void 0===t&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,n)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.createObservableInstanceIfNeeded(),e.storedValue}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!e.isDetaching&&(e.snapshot===t||(!(!te(t)||re(t)!==e)||!(e.type!==this||!ye(t)||te(t)||e.identifierAttribute&&e.identifier!==kt(t[e.identifierAttribute]))&&(e.applySnapshot(t),!0)))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(this.tryToReconcileNode(e,t))return e.setParent(n,r),e;if(e.die(),te(t)&&this.isAssignableFrom(m(t))){var i=re(t);return i.setParent(n,r),i}return this.instantiate(n,r,void 0,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(O);R.prototype.create=Object(a.g)(R.prototype.create);var k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e.isDetaching&&e.type===this&&e.storedValue===t)return e;var i=this.instantiate(n,r,void 0,t);return e.die(),i}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(O);function P(e){return"object"===typeof e&&e&&!0===e.isType}function L(e,t){Ce(e,P,"mobx-state-tree type",t)}new Map;!function(){function e(e,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),e&&e.onStart(t)}Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,e))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0})}();var D,I=1;function N(){return D}function j(){return I++}function B(e,t){var n=re(e.context);"action"===e.type&&n.assertAlive({actionContext:e});var r=n._isRunningAction;n._isRunningAction=!0;var i=D;D=e;try{return function(e,t,n){var r=new H(e,n);if(r.isEmpty)return Object(a.g)(n).apply(null,t.args);var i=null;return function e(t){var s=r.getNextMiddleware(),l=s&&s.handler;return l?!s.includeHooks&&o[t.name]?e(t):(l(t,(function(t,n){!0,i=e(t),n&&(i=n(i))}),(function(e){!0,i=e})),i):Object(a.g)(n).apply(null,t.args)}(t)}(n,e,t)}finally{D=i,n._isRunningAction=r}}function F(e){if(e)return"action"===e.type?e:e.parentActionEvent}function z(e,t,n){var r=function(){var r=j(),i=D,o=F(i);return B({type:"action",name:t,id:r,args:Ae(arguments),context:e,tree:b(e),rootId:i?i.rootId:r,parentId:i?i.id:0,allParentIds:i?p(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},n)};return r._isMSTAction=!0,r}var H=function(){function e(e,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=e;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.middlewares[this.arrayIndex];if(e){var t=e[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function U(t){return"function"===typeof t?"<function"+(t.name?" "+t.name:"")+">":te(t)?"<"+t+">":"`"+function(t){try{return JSON.stringify(t)}catch(e){return"<Unserializable: "+e+">"}}(t)+"`"}function V(e){var t=e.value,n=e.context[e.context.length-1].type,r=e.context.map((function(e){return e.path})).filter((function(e){return e.length>0})).join("/"),i=r.length>0?'at path "/'+r+'" ':"",o=te(t)?"value of type "+re(t).type.name+":":be(t)?"value":"snapshot",a=n&&te(t)&&n.is(re(t).snapshot);return""+i+o+" "+U(t)+" is not assignable "+(n?"to type: `"+n.name+"`":"")+(e.message?" ("+e.message+")":"")+(n?function(e){return P(e)&&(e.flags&(A.String|A.Number|A.Integer|A.Boolean|A.Date))>0}(n)||be(t)?".":", expected an instance of `"+n.name+"` or a snapshot like `"+n.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function G(e,t,n){return e.concat([{path:t,type:n}])}function W(){return ce}function q(e,t,n){return[{context:e,value:t,message:n}]}function X(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function Y(e,n){"undefined"!==typeof t&&Object({NODE_ENV:"production",PUBLIC_URL:"",APP_MANIFEST:{name:"OrgRoamForceGraphReact",slug:"OrgRoamForceGraphReact",version:"1.0.0",orientation:"portrait",icon:"./assets/images/icon.png",splash:{image:"./assets/images/splash.png",resizeMode:"contain",backgroundColor:"#ffffff"},updates:{fallbackToCacheTimeout:0},assetBundlePatterns:["**/*"],web:{},_internal:{isDebug:!1,projectRoot:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact",dynamicConfigPath:null,staticConfigPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/app.json",packageJsonPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/package.json"},sdkVersion:"40.0.0",platforms:["ios","android","web"]}})&&"true"===Object({NODE_ENV:"production",PUBLIC_URL:"",APP_MANIFEST:{name:"OrgRoamForceGraphReact",slug:"OrgRoamForceGraphReact",version:"1.0.0",orientation:"portrait",icon:"./assets/images/icon.png",splash:{image:"./assets/images/splash.png",resizeMode:"contain",backgroundColor:"#ffffff"},updates:{fallbackToCacheTimeout:0},assetBundlePatterns:["**/*"],web:{},_internal:{isDebug:!1,projectRoot:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact",dynamicConfigPath:null,staticConfigPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/app.json",packageJsonPath:"/home/thomas/Projects/emacs/OrgRoamForceGraphReact/package.json"},sdkVersion:"40.0.0",platforms:["ios","android","web"]}}).ENABLE_TYPE_CHECK&&function(e,t){var n=e.validate(t,[{path:"",type:e}]);if(n.length>0)throw de(function(e,t,n){if(0===n.length)return;return"Error while converting "+(r=U(t),(r.length<280?r:r.substring(0,272)+"......"+r.substring(r.length-8))+" to `")+e.name+"`:\n\n "+n.map(V).join("\n ");var r}(e,t,n))}(e,n)}var K,Q=0,Z=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:Q++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:a.s.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:a.s.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,a.s.array([],he));var r=this.cache.get(n);if(-1!==r.indexOf(e))throw de("Already registered");r.push(e),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;Object(a.x)(e.identifierCache.cache).forEach((function(e){return e.forEach((function(e){t.addNodeToCache(e)}))}))}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.identifierAttribute){var t=e.identifier,n=this.cache.get(t);n&&(n.remove(e),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,r=new e,i=t.path;return Object(a.k)(this.cache).forEach((function(e){for(var t=f(e,2),o=t[0],a=t[1],s=!1,l=a.length-1;l>=0;l--)0===a[l].path.indexOf(i)&&(r.addNodeToCache(a[l],!1),a.splice(l,1),s=!0);s&&n.updateLastCacheModificationPerId(o)})),r}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.cache.get(t);return!!n&&n.some((function(t){return e.isAssignableFrom(t.type)}))}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.cache.get(t);if(!n)return null;var r=n.filter((function(t){return e.isAssignableFrom(t.type)}));switch(r.length){case 0:return null;case 1:return r[0];default:throw de("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+r.map((function(e){return e.path})).join(", "))}}}),e}();function J(e,t,n,r,i){var o=ie(i);if(o){if(o.parent)throw de("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+n+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,n),o}return new T(e,t,n,r,i)}function $(e,t,n,r,i){return new _(e,t,n,r,i)}function ee(e){return e instanceof _||e instanceof T}function te(e){return!(!e||!e.$treenode)}function ne(e,t){Ce(e,te,"mobx-state-tree node",t)}function re(e){if(!te(e))throw de("Value "+e+" is no MST Node");return e.$treenode}function ie(e){return e&&e.$treenode||null}function oe(){return re(this).snapshot}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(K||(K={}));function ae(t,n,r){void 0===r&&(r=!0);for(var i=t,o=0;o<n.length;o++){var a=n[o];if(".."===a){if(i=i.parent)continue}else{if("."===a)continue;if(i){if(i instanceof _)try{var s=i.value;te(s)&&(i=re(s))}catch(e){if(!r)return;throw e}if(i instanceof T)if(i.getChildType(a)&&(i=i.getChildNode(a)))continue}}if(r)throw de("Could not resolve '"+a+"' in path '"+(Ie(n.slice(0,o))||"/")+"' while resolving '"+Ie(n)+"'");return}return i}function se(e){if(!e)return ce;var t=Object.keys(e);if(!t.length)return ce;var n=new Array(t.length);return t.forEach((function(t,r){n[r]=e[t]})),n}var le=Object.toString(),ce=Object.freeze([]),ue=Object.freeze({}),he=Object(a.e)().useProxies?{deep:!1}:{deep:!1,proxy:!1};function de(e){return void 0===e&&(e="Illegal state"),new Error("[mobx-state-tree] "+e)}function fe(e){return e}Object.freeze(he);var pe=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e};function me(e){return Array.isArray(e)||Object(a.p)(e)}function ge(e){return e?me(e)?e:[e]:ce}function ve(e){var t;if(null===e||"object"!==typeof e)return!1;var n=Object.getPrototypeOf(e);return null==n||(null===(t=n.constructor)||void 0===t?void 0:t.toString())===le}function ye(e){return null!==e&&"object"===typeof e&&!(e instanceof Date)&&!(e instanceof RegExp)}function be(e,t){return void 0===t&&(t=!0),null===e||void 0===e||!!("string"===typeof e||"number"===typeof e||"boolean"===typeof e||t&&e instanceof Date)}function we(e){return e}function xe(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}var _e=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){n.unregister(e)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.handlers.indexOf(e)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.handlers.slice();n.forEach((function(t){return t.apply(void 0,p(e))}))}}),e}(),Ee=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.eventHandlers&&this.eventHandlers[e];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){void 0===n&&(n=!1),this.eventHandlers||(this.eventHandlers={});var r=this.eventHandlers[e];return r||(r=this.eventHandlers[e]=new _e),r.register(t,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.eventHandlers&&this.eventHandlers[e];return!!n&&n.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.eventHandlers&&this.eventHandlers[e];n&&n.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.eventHandlers&&delete this.eventHandlers[e]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.eventHandlers&&this.eventHandlers[e];i&&(t=i).emit.apply(t,p(n))}}),e}();function Ae(e){for(var t=new Array(e.length),n=0;n<e.length;n++)t[n]=e[n];return t}function Se(e,t){return 0===e.indexOf(t)}var Me=function(e,t){};function Te(e){console.warn(new Error("[mobx-state-tree] "+e))}function Ce(e,t,n,r){0}function Oe(e,t){Ce()}function Re(e,t,n){void 0===n&&(n=!0),Ce(),n||Ce()}function ke(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function Pe(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function Le(e){return!0===("number"===typeof e)?""+e:-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function De(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ie(e){if(0===e.length)return"";var t=function(e){return e.map(Le).join("/")};return"."===e[0]||".."===e[0]?t(e):"/"+t(e)}function Ne(e){var t=e.split("/").map(De);if(!(""===e||"."===e||".."===e||Se(e,"/")||Se(e,"./")||Se(e,"../")))throw de("a json path must be either rooted, empty or relative, but got '"+e+"'");return""===t[0]&&t.shift(),t}Me.ids={};var je=function(e){function t(t,n,r){var i=e.call(this,r||t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor("+this._subtype.describe()+")"}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.preProcessor?this._processors.preProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.postProcessor?this._processors.postProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;!function(e,t){for(var n,r,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=d(i),s=a.next();!s.done;s=a.next()){var l=s.value;e[l]=t[l].bind(t)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}(e.type,this,"create");var n=e.getSnapshot;e.getSnapshot=function(){return t.postProcessSnapshot(n.call(e))}}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(r)?r:this.preProcessSnapshot(r),o=this._subtype.instantiate(e,t,n,i);return this._fixNode(o),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this._subtype.reconcile(e,te(t)?t:this.preProcessSnapshot(t),n,r);return i!==e&&this._fixNode(i),i}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=!0);var n=this._subtype.getSnapshot(e);return t?this.postProcessSnapshot(n):n}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.preProcessSnapshot(e);return this._subtype.validate(n,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=P(e)?this._subtype:te(e)?y(e,!1):this.preProcessSnapshot(e);return 0===this._subtype.validate(t,[{path:"",type:this._subtype}]).length}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),t}(O);var Be,Fe="Map.put can only be used to store complex values that have an identifier type attribute";!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"}(Be||(Be={}));var ze=function(e){function t(t){return e.call(this,t,a.s.ref.enhancer)||this}return u(t,e),Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return e.prototype.set.call(this,""+t,n)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!e)throw de("Map.put cannot be used to set empty values");if(te(e)){var t=re(e);if(null===t.identifier)throw de(Fe);return this.set(t.identifier,e),e}if(ye(e)){var n=re(this),r=n.type;if(r.identifierMode!==Be.YES)throw de(Fe);var i=e[r.mapIdentifierAttribute];if(!Pt(i)){var o=this.put(r.getChildType().create(e,n.environment));return this.put(y(o))}var a=kt(i);return this.set(a,e),this.get(a)}throw de("Map.put can only be used to store complex values")}}),t}(a.a),He=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Be.UNKNOWN}),Object.defineProperty(i,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Map}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i._determineIdentifierMode(),i.hookInitializers=r,i}return u(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._determineIdentifierMode(),J(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Be.UNKNOWN){var e=[];if(function e(t,n){var r,i,o=t.getSubTypes();if("cannotDetermine"===o)return!1;if(o){var a=ge(o);try{for(var s=d(a),l=s.next();!l.done;l=s.next()){if(!e(l.value,n))return!1}}catch(c){r={error:c}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}return t instanceof Ke&&n.push(t),!0}(this._subType,e)){var t=void 0;e.forEach((function(e){if(e.identifierAttribute){if(t&&t!==e.identifierAttribute)throw de("The objects in a map should all have the same identifier attribute, expected '"+t+"', but child of type '"+e.name+"' declared attribute '"+e.identifierAttribute+"' as identifier");t=e.identifierAttribute}})),t?(this.identifierMode=Be.YES,this.mapIdentifierAttribute=t):this.identifierMode=Be.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var n=e.type._subType,r={};return Object.keys(t).forEach((function(i){r[i]=n.instantiate(e,i,void 0,t[i])})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new ze(e)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Object(a.f)(t,e.unbox),e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],i=z(t,e,r);xe(t,e,i)}))})),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"Map<string, "+this._subType.describe()+">"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Object(a.x)(e.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=e.storedValue.get(""+t);if(!n)throw de("Not a child "+t);return n}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object),n=e.name;t.assertWritable({subpath:n});var r=t.type,i=r._subType;switch(e.type){case"update":var o=e.newValue;if(o===e.object.get(n))return null;Y(i,o),e.newValue=i.reconcile(t.getChildNode(n),e.newValue,t,n),r.processIdentifier(n,e.newValue);break;case"add":Y(i,e.newValue),e.newValue=i.instantiate(t,n,void 0,e.newValue),r.processIdentifier(n,e.newValue)}return e}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.identifierMode===Be.YES&&t instanceof T){var n=t.identifier;if(n!==e)throw de("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+n+"', but expected: '"+e+"'")}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return e.getChildren().forEach((function(e){t[e.subpath]=e.snapshot})),t}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].getSnapshot()})),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:Le(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:Le(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var n=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:Le(e.name),oldValue:n},t)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=e.storedValue;switch(n.op){case"add":case"replace":r.set(t,n.value);break;case"remove":r.delete(t)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Y(this,t);var n=e.storedValue,r={};if(Array.from(n.keys()).forEach((function(e){r[e]=!1})),t)for(var i in t)n.set(i,t[i]),r[""+i]=!0;Object.keys(r).forEach((function(e){!1===r[e]&&n.delete(e)}))}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return ve(e)?X(Object.keys(e).map((function(r){return n._subType.validate(e[r],G(t,r,n._subType))}))):q(t,e,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ue}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.delete(t)}}),t}(R);He.prototype.applySnapshot=Object(a.g)(He.prototype.applySnapshot);var Ue=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Array}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i.hookInitializers=r,i}return u(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var n=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return J(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=[]);var n=e.type._subType,r={};return t.forEach((function(t,i){var o=""+i;r[o]=n.instantiate(e,o,void 0,t)})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return a.s.array(se(e),he)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Object(a.d)(t).dehancer=e.unbox,e.type.hookInitializers.forEach((function(e){var n=e(t);Object.keys(n).forEach((function(e){var r=n[e],i=z(t,e,r);xe(t,e,i)}))})),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType.describe()+"[]"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=Number(t);if(n<e.storedValue.length)return e.storedValue[n];throw de("Not a child: "+t)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);t.assertWritable({subpath:""+e.index});var n=t.type._subType,r=t.getChildren();switch(e.type){case"update":if(e.newValue===e.object[e.index])return null;var i=Ve(t,n,[r[e.index]],[e.newValue],[e.index]);if(!i)return null;e.newValue=i[0];break;case"splice":var o=e.index,a=e.removedCount,s=e.added,l=Ve(t,n,r.slice(o,o+a),s,s.map((function(e,t){return o+t})));if(!l)return null;e.added=l;for(var c=o+a;c<r.length;c++)r[c].setParent(t,""+(c+s.length-a))}return e}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.getChildren().map((function(e){return e.snapshot}))}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=[];return Object.keys(e).forEach((function(n){t.push(e[n].getSnapshot())})),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=re(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:""+e.index,value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"splice":for(var n=e.removedCount-1;n>=0;n--)t.emitPatch({op:"remove",path:""+(e.index+n),oldValue:e.removed[n].snapshot},t);for(n=0;n<e.addedCount;n++)t.emitPatch({op:"add",path:""+(e.index+n),value:t.getChildNode(""+(e.index+n)).snapshot,oldValue:void 0},t);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=e.storedValue,i="-"===t?r.length:Number(t);switch(n.op){case"replace":r[i]=n.value;break;case"add":r.splice(i,0,n.value);break;case"remove":r.splice(i,1)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Y(this,t),e.storedValue.replace(t)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;return me(e)?X(e.map((function(e,r){return n._subType.validate(e,G(t,""+r,n._subType))}))):q(t,e,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ce}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.splice(Number(t),1)}}),t}(R);function Ve(e,t,n,r,i){for(var o=!0,a=0;;a++){var s=a<=r.length-1,l=n[a],c=s?r[a]:void 0,u=""+i[a];if(ee(c)&&(c=c.storedValue),!l&&!s)break;if(s)if(l)if(We(l,c))n[a]=Ge(t,e,u,c,l);else{for(var h=void 0,d=a;d<n.length;d++)if(We(n[d],c)){h=n.splice(d,1)[0];break}o=!1;f=Ge(t,e,u,c,h);n.splice(a,0,f)}else{if(te(c)&&re(c).parent===e)throw de("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+u+"', but it lives already at '"+re(c).path+"'");o=!1;var f=Ge(t,e,u,c);n.splice(a,0,f)}else o=!1,n.splice(a,1),l instanceof T&&l.createObservableInstanceIfNeeded(),l.die(),a--}return o?null:n}function Ge(e,t,n,r,i){Y(e,r);var o=function(){if(te(r)){var o=re(r);if(o.assertAlive(ue),null!==o.parent&&o.parent===t)return o.setParent(t,n),o}return i?e.reconcile(i,r,t,n):e.instantiate(t,n,void 0,r)}();return i&&i!==o&&(i instanceof T&&i.createObservableInstanceIfNeeded(),i.die()),o}function We(e,t){if(!e.isAlive)return!1;if(te(t)){var n=re(t);return n.isAlive&&n===e}return e.snapshot===t||e instanceof T&&null!==e.identifier&&e.identifierAttribute&&ve(t)&&e.identifier===kt(t[e.identifierAttribute])&&e.type.is(t)}Ue.prototype.applySnapshot=Object(a.g)(Ue.prototype.applySnapshot);function qe(){return re(this).toString()}var Xe={name:"AnonymousModel",properties:{},initializers:ce};function Ye(e){return Object.keys(e).reduce((function(e,t){var n,r,i;if(t in o)throw de("Hook '"+t+"' was defined as property. Hooks should be defined as part of the actions");var a=Object.getOwnPropertyDescriptor(e,t);if("get"in a)throw de("Getters are not supported as properties. Please use views instead");var s=a.value;if(null===s||void 0===s)throw de("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(be(s))return Object.assign({},e,((n={})[t]=dt(function(e){switch(typeof e){case"string":return Je;case"number":return $e;case"boolean":return tt;case"object":if(e instanceof Date)return ot}throw de("Cannot determine primitive type from value "+e)}(s),s),n));if(s instanceof He)return Object.assign({},e,((r={})[t]=dt(s,{}),r));if(s instanceof Ue)return Object.assign({},e,((i={})[t]=dt(s,[]),i));if(P(s))return e;throw de("Invalid type definition for property '"+t+"', cannot infer a type from a value like '"+s+"' ("+typeof s+")")}),e)}var Ke=function(e){function t(t){var n=e.call(this,t.name||Xe.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.cloneAndEnhance({name:e})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return n.cloneAndEnhance({properties:e})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=n.preProcessor;return t?n.cloneAndEnhance({preProcessor:function(n){return t(e(n))}}):n.cloneAndEnhance({preProcessor:e})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=n.postProcessor;return t?n.cloneAndEnhance({postProcessor:function(n){return e(t(n))}}):n.cloneAndEnhance({postProcessor:e})}}),Object.assign(n,Xe,t),n.properties=Ye(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return u(t,e),Object.defineProperty(t.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=void 0;return this.forAllProps((function(t,n){if(n.flags&A.Identifier){if(e)throw de("Cannot define property '"+t+"' as object identifier, property '"+e+"' is already defined as identifier property");e=t}})),e}}),Object.defineProperty(t.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new t({name:e.name||this.name,properties:Object.assign({},this.properties,e.properties),initializers:this.initializers.concat(e.initializers||[]),preProcessor:e.preProcessor||this.preProcessor,postProcessor:e.postProcessor||this.postProcessor})}}),Object.defineProperty(t.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateActions(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("actions initializer should return a plain object containing actions");Object.keys(t).forEach((function(n){if("preProcessSnapshot"===n)throw de("Cannot define action 'preProcessSnapshot', it should be defined using 'type.preProcessSnapshot(fn)' instead");if("postProcessSnapshot"===n)throw de("Cannot define action 'postProcessSnapshot', it should be defined using 'type.postProcessSnapshot(fn)' instead");var r=t[n],i=e[n];if(n in o&&i){var a=r;r=function(){i.apply(null,arguments),a.apply(null,arguments)}}var s=r.$mst_middleware,l=r.bind(t);l.$mst_middleware=s;var c=z(e,n,l);t[n]=c,xe(e,n,c)}))}}),Object.defineProperty(t.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if("function"!==typeof e)throw de("You passed an "+typeof e+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(n){return t.instantiateVolatileState(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("volatile state initializer should return a plain object containing state");Object(a.w)(e,t)}}),Object.defineProperty(t.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){var r=e(n),i=r.actions,o=r.views,a=r.state,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(r,["actions","views","state"]);for(var l in s)throw de("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+l+"'");return a&&t.instantiateVolatileState(n,a),o&&t.instantiateViews(n,o),i&&t.instantiateActions(n,i),n}]})}}),Object.defineProperty(t.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(n){return t.instantiateViews(n,e(n)),n}]})}}),Object.defineProperty(t.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!ve(t))throw de("views initializer should return a plain object containing views");Object.keys(t).forEach((function(n){var r,i=Object.getOwnPropertyDescriptor(t,n);if("get"in i)if(Object(a.o)(e,n)){var o=Object(a.d)(e,n);o.derivation=i.get,o.scope=e,i.set&&(o.setter=Object(a.g)(o.name+"-setter",i.set))}else Object.defineProperty(e,n,i),Object(a.r)(e,((r={})[n]=a.h,r));else{if("function"!==typeof i.value)throw de("A view member should either be a function or getter based property");xe(e,n,i.value)}}))}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return J(this,e,t,n,te(r)?r:this.applySnapshotPreProcessor(r))}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var n=e.type,r={};return n.forAllProps((function(n,i){r[n]=i.instantiate(e,n,void 0,t[n])})),r}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return a.s.object(e,ue,he)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){xe(t,"toString",qe),this.forAllProps((function(n){Object(a.f)(t,n,e.unbox)})),this.initializers.reduce((function(e,t){return t(e)}),t),Object(a.n)(t,this.willChange),Object(a.t)(t,this.didChange)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,n=re(t.object),r=t.name;n.assertWritable({subpath:r});var i=n.type.properties[r];return i&&(Y(i,t.newValue),t.newValue=i.reconcile(n.getChildNode(r),t.newValue,n,r)),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,n=re(t.object);if(n.type.properties[t.name]){var r=t.oldValue?t.oldValue.snapshot:void 0;n.emitPatch({op:"replace",path:Le(t.name),value:t.newValue.snapshot,oldValue:r},n)}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,n=[];return this.forAllProps((function(r){n.push(t.getChildNode(e,r))})),n}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!(t in this.properties))throw de("Not a value property: "+t);var n=Object(a.d)(e.storedValue,t).raw();if(!n)throw de("Node not available for property "+t);return n}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=!0);var r={};return this.forAllProps((function(t,i){Object(a.l)(e.storedValue,t).reportObserved(),r[t]=n.getChildNode(e,t).snapshot})),t?this.applySnapshotPostProcessor(r):r}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n].getSnapshot()})),this.applySnapshotPostProcessor(t)}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){if("replace"!==n.op&&"add"!==n.op)throw de("object does not support operation "+n.op);e.storedValue[t]=n.value}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.applySnapshotPreProcessor(t);Y(this,n),this.forAllProps((function(t){e.storedValue[t]=n[t]}))}}),Object.defineProperty(t.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.preProcessor;return t?t.call(null,e):e}}),Object.defineProperty(t.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.postProcessor;return t?t.call(null,e):e}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Re(),this.properties[e]}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this,r=this.applySnapshotPreProcessor(e);return ve(r)?X(this.propertyNames.map((function(e){return n.properties[e].validate(r[e],G(t,e,n.properties[e]))}))):q(t,r,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.propertyNames.forEach((function(n){return e(n,t.properties[n])}))}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return"{ "+this.propertyNames.map((function(t){return t+": "+e.properties[t].describe()})).join("; ")+" }"}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return ue}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue[t]=void 0}}),t}(R);function Qe(e){return P(e)&&(e.flags&A.Object)>0}Ke.prototype.applySnapshot=Object(a.g)(Ke.prototype.applySnapshot);var Ze=function(e){function t(t,n,r,i){void 0===i&&(i=fe);var o=e.call(this,t)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:i}),o.flags=n,o}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.initializer(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return be(e)&&this.checker(e)?W():q(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))}}),t}(k),Je=new Ze("string",A.String,(function(e){return"string"===typeof e})),$e=new Ze("number",A.Number,(function(e){return"number"===typeof e})),et=new Ze("integer",A.Integer,(function(e){return pe(e)})),tt=new Ze("boolean",A.Boolean,(function(e){return"boolean"===typeof e})),nt=new Ze("null",A.Null,(function(e){return null===e})),rt=new Ze("undefined",A.Undefined,(function(e){return void 0===e})),it=new Ze("Date",A.Date,(function(e){return"number"===typeof e||e instanceof Date}),(function(e){return e instanceof Date?e:new Date(e)}));it.getSnapshot=function(e){return e.storedValue.getTime()};var ot=it;var at=function(e){function t(t){var n=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Literal}),n.value=t,n}return u(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return be(e)&&e===this.value?W():q(t,e,"Value is not a literal "+JSON.stringify(this.value))}}),t}(k);function st(e){return Ce(),new at(e)}var lt=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this._subtype.validate(e,t);if(n.length>0)return n;var r=te(e)?re(e).snapshot:e;return this._predicate(r)?W():q(t,e,this._message(e))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.reconcile(e,t,n,r)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(O);var ct=function(e){function t(t,n,r){var i=e.call(this,t)||this;return Object.defineProperty(i,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),r=h({eager:!0,dispatcher:void 0},r),i._dispatcher=r.dispatcher,r.eager||(i._eager=!1),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=A.Union;return this._types.forEach((function(t){e|=t.flags})),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._types.some((function(t){return t.isAssignableFrom(e)}))}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map((function(e){return e.describe()})).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this.determineType(r,void 0);if(!i)throw de("No matching type for union "+this.describe());return i.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=this.determineType(t,e.type);if(!i)throw de("No matching type for union "+this.describe());return i.reconcile(e,t,n,r)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter((function(e){return e!==t})).find((function(t){return t.is(e)})):this._types.find((function(t){return t.is(e)}))}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var n=[],r=0,i=0;i<this._types.length;i++){var o=this._types[i].validate(e,t);if(0===o.length){if(this._eager)return W();r++}else n.push(o)}return 1===r?W():q(t,e,"No type is applicable for the union").concat(X(n))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(O);function ut(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=P(e)?void 0:e,i=P(e)?p([e],t):t,o="("+i.map((function(e){return e.name})).join(" | ")+")";return new ct(o,i,r)}var ht=function(e){function t(t,n,r){var i=e.call(this,t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return u(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|A.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(this.optionalValues.indexOf(r)>=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,n,i)}return this._subtype.instantiate(e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),n,r)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e="function"===typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"===typeof this._defaultValue&&Y(this,e),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this.optionalValues.indexOf(e)>=0?W():this._subtype.validate(e,t)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(O);function dt(e,t,n){return function(e,t){if("function"!==typeof t&&te(t))throw de("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");L(e,1)}(e,t),new ht(e,t,n||ft)}var ft=[void 0];var pt=dt(rt,void 0),mt=dt(nt,null);function gt(e){return L(e,1),ut(e,pt)}var vt=function(t){function n(e,n){var r=t.call(this,e)||this;return Object.defineProperty(r,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),r}return u(n,t),Object.defineProperty(n.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|A.Late},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._subType){var n=void 0;try{n=this._definition()}catch(e){if(!(e instanceof ReferenceError))throw e;n=void 0}if(t&&void 0===n)throw de("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(n.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this.getSubType(!0).instantiate(e,t,n,r)}}),Object.defineProperty(n.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return this.getSubType(!0).reconcile(e,t,n,r)}}),Object.defineProperty(n.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e?e.name:"<uknown late type>"}}),Object.defineProperty(n.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this.getSubType(!1);return n?n.validate(e,t):W()}}),Object.defineProperty(n.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)}}),Object.defineProperty(n.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e||"cannotDetermine"}}),n}(O);var yt=function(e){function t(t){var n=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Frozen}),n}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return function(e){return"function"!==typeof e}(e)?this.subType?this.subType.validate(e,t):W():q(t,e,"Value is not serializable and cannot be frozen")}}),t}(k),bt=new yt;var wt=function(){function e(e,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Pt(e))this.identifier=e;else{if(!te(e))throw de("Can only store references to tree nodes or identifiers, got: '"+e+"'");var n=re(e);if(!n.identifierAttribute)throw de("Can only store references with a defined identifier attribute.");var r=n.unnormalizedIdentifier;if(null===r||void 0===r)throw de("Can only store references to tree nodes with a defined identifier.");this.identifier=r}}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=kt(this.identifier),n=e.root,r=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==r){var i=this.targetType,o=n.identifierCache.resolve(i,t);if(!o)throw new xt("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:o,lastCacheModification:r}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),xt=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return u(t,e),t}(Error),_t=function(e){function t(t,n){var r=e.call(this,"reference("+t.name+")")||this;return Object.defineProperty(r,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Reference}),r}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.targetType.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Pt(e)?W():q(t,e,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(t.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=t.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:e,parent:o,invalidTarget:r?r.storedValue:void 0,invalidId:n,replaceRef:function(e){v(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){Qe(i.type)?this.replaceRef(void 0):v(t.root.storedValue,{op:"remove",path:t.path})}})}}}),Object.defineProperty(t.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this,r=this.getValue(e);if(r){var i=re(r),a=function(r,a){var s=function(e){switch(e){case o.beforeDestroy:return"destroy";case o.beforeDetach:return"detach";default:return}}(a);s&&n.fireInvalidated(s,e,t,i)},s=i.registerHook(o.beforeDetach,a),l=i.registerHook(o.beforeDestroy,a);return function(){s(),l()}}}}),Object.defineProperty(t.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){var r=this;if(this.onInvalidated){var i;e.registerHook(o.beforeDestroy,(function(){i&&i()}));var a=function(o){i&&i();var a=e.parent,s=a&&a.storedValue;if(a&&a.isAlive&&s){(n?!!n.get(t,s):e.root.identifierCache.has(r.targetType,kt(t)))?i=r.addTargetNodeWatcher(e,t):o||r.fireInvalidated("invalidSnapshotReference",e,t,null)}};e.state===K.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(o.afterCreationFinalization,(function(){e.parent&&e.parent.createObservableInstanceIfNeeded()})),e.registerHook(o.afterAttach,(function(){a(!1)})))}}}),t}(k),Et=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return e.storedValue.resolvedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i,o=te(r)?(ne(i=r,1),re(i).identifier):r,a=new wt(r,this.targetType),s=$(this,e,t,n,a);return a.node=s,this.watchTargetNodeForInvalidations(s,o,void 0),s}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e.isDetaching&&e.type===this){var i=te(t),o=e.storedValue;if(!i&&o.identifier===t||i&&o.resolvedValue===t)return e.setParent(n,r),e}var a=this.instantiate(n,r,void 0,t);return e.die(),a}}),t}(_t),At=function(e){function t(t,n,r){var i=e.call(this,t,r)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return u(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(r)?this.options.set(r,e?e.storedValue:null):r,o=$(this,e,t,n,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=te(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===i)return e.setParent(n,r),e;var o=this.instantiate(n,r,void 0,i);return e.die(),o}}),t}(_t);function St(e,t){L(e,1);var n=t||void 0,r=t?t.onInvalidated:void 0;return n&&(n.get||n.set)?new At(e,{get:n.get,set:n.set},r):new Et(e,r)}var Mt=function(e){function t(t,n){var r=e.call(this,t)||this;return Object.defineProperty(r,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Identifier}),r}return u(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(!e||!(e.type instanceof Ke))throw de("Identifier types can only be instantiated as direct child of a model type");return $(this,e,t,n,r)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){if(e.storedValue!==t)throw de("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(n,r),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return typeof e!==this.validType?q(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):W()}}),t}(k),Tt=function(e){function t(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Identifier}),t}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(Mt),Ct=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return u(t,e),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(Mt),Ot=new Tt,Rt=new Ct;function kt(e){return""+e}function Pt(e){return"string"===typeof e||"number"===typeof e}var Lt=function(e){function t(t){var n=e.call(this,t.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:A.Custom}),n}return u(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.options.isTargetType(e))return W();var n=this.options.getValidationMessage(e);return n?q(t,e,"Invalid value for type '"+this.name+"': "+n):W()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.options.toSnapshot(e.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){return $(this,e,t,n,this.options.isTargetType(r)?r:this.options.fromSnapshot(r,e&&e.root.environment))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n,r){var i=!this.options.isTargetType(t);if(!e.isDetaching&&(e.type===this&&(i?t===e.snapshot:t===e.storedValue)))return e.setParent(n,r),e;var o=i?this.options.fromSnapshot(t,n.root.environment):t,a=this.instantiate(n,r,void 0,o);return e.die(),a}}),t}(k),Dt={enumeration:function(e,t){var n="string"===typeof e?t:e,r=ut.apply(void 0,p(n.map((function(e){return st(""+e)}))));return"string"===typeof e&&(r.name=e),r},model:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0]?e.shift():"AnonymousModel",r=e.shift()||{};return new Ke({name:n,properties:r})},compose:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0],r=n?e[0]:"AnonymousModel";return n&&e.shift(),e.reduce((function(e,t){return e.cloneAndEnhance({name:e.name+"_"+t.name,properties:t.properties,initializers:t.initializers,preProcessor:function(n){return t.applySnapshotPreProcessor(e.applySnapshotPreProcessor(n))},postProcessor:function(n){return t.applySnapshotPostProcessor(e.applySnapshotPostProcessor(n))}})})).named(r)},custom:function(e){return new Lt(e)},reference:St,safeReference:function(e,t){var n=St(e,h(h({},t),{onInvalidated:function(e){t&&t.onInvalidated&&t.onInvalidated(e),e.removeRef()}}));return t&&!1===t.acceptsUndefined?n:gt(n)},union:ut,optional:dt,literal:st,maybe:gt,maybeNull:function(e){return L(e,1),ut(e,mt)},refinement:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n="string"===typeof e[0]?e.shift():P(e[0])?e[0].name:null,r=e[0],i=e[1],o=e[2]?e[2]:function(e){return"Value does not respect the refinement predicate"};return L(r,[1,2]),Re(),Oe(),Oe(),new lt(n,r,i,o)},string:Je,boolean:tt,number:$e,integer:et,Date:ot,map:function(e){return new He("map<string, "+e.name+">",e)},array:function(e){return L(e,1),new Ue(e.name+"[]",e)},frozen:function(e){return 0===arguments.length?bt:P(e)?new yt(e):dt(bt,e)},identifier:Ot,identifierNumber:Rt,late:function(e,t){var n="string"===typeof e?e:"late("+e.toString()+")",r="string"===typeof e?t:e;return new vt(n,r)},undefined:rt,null:nt,snapshotProcessor:function(e,t,n){return L(e,1),new je(e,t,n)}}}).call(this,r(111),r(437).setImmediate)},function(e,t,n){"use strict";var r=n(96),i=n(129),o=n(0),a=n.n(o);t.a=function(e,t){var n;e&&e.constructor===String&&(n=r.a.propsToAccessibilityComponent(t));for(var o=n||e,s=Object(i.a)(o,t),l=arguments.length,c=new Array(l>2?l-2:0),u=2;u<l;u++)c[u-2]=arguments[u];return a.a.createElement.apply(a.a,[o,s].concat(c))}},function(e,t,n){"use strict";var r=n(21),i=n(15);function o(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(e){var t,n;function r(){var t;return(t=e.call(this)||this)._children=[],t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var a=r.prototype;return a.__makeNative=function(){if(!this.__isNative){this.__isNative=!0;for(var t,n=o(this._children);!(t=n()).done;){var r=t.value;r.__makeNative(),i.a.API.connectAnimatedNodes(this.__getNativeTag(),r.__getNativeTag())}}e.prototype.__makeNative.call(this)},a.__addChild=function(e){0===this._children.length&&this.__attach(),this._children.push(e),this.__isNative&&(e.__makeNative(),i.a.API.connectAnimatedNodes(this.__getNativeTag(),e.__getNativeTag()))},a.__removeChild=function(e){var t=this._children.indexOf(e);-1!==t?(this.__isNative&&e.__isNative&&i.a.API.disconnectAnimatedNodes(this.__getNativeTag(),e.__getNativeTag()),this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},a.__getChildren=function(){return this._children},a.__callListeners=function(t){if(e.prototype.__callListeners.call(this,t),!this.__isNative)for(var n,r=o(this._children);!(n=r()).done;){var i=n.value;i.__getValue&&i.__callListeners(i.__getValue())}},r}(r.a);t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(13),i=n(4),o=n.n(i),a={window:{fontScale:1,height:0,scale:1,width:0},screen:{fontScale:1,height:0,scale:1,width:0}},s={},l=function(){function e(){}return e.get=function(e){return o()(a[e],"No dimension set for key "+e),a[e]},e.set=function(e){e&&(r.canUseDOM?o()(!1,"Dimensions cannot be set in the browser"):(null!=e.screen&&(a.screen=e.screen),null!=e.window&&(a.window=e.window)))},e._update=function(){if(r.canUseDOM){var e=window,t=e.document.documentElement;a.window={fontScale:1,height:t.clientHeight,scale:e.devicePixelRatio||1,width:t.clientWidth},a.screen={fontScale:1,height:e.screen.height,scale:e.devicePixelRatio||1,width:e.screen.width},Array.isArray(s.change)&&s.change.forEach((function(e){return e(a)}))}},e.addEventListener=function(e,t){s[e]=s[e]||[],s[e].push(t)},e.removeEventListener=function(e,t){Array.isArray(s[e])&&(s[e]=s[e].filter((function(e){return e!==t})))},e}();r.canUseDOM&&(l._update(),window.addEventListener("resize",l._update,!1))},function(e,t,n){"use strict";var r=n(32),i=n(15),o=n(4),a=n.n(o),s=n(89),l=n.n(s);function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(e){return e};function p(e){if(e.outputRange&&"string"===typeof e.outputRange[0])return function(e){var t=e.outputRange;a()(t.length>=2,"Bad output range"),function(e){for(var t=e[0].replace(g,""),n=1;n<e.length;++n)a()(t===e[n].replace(g,""),"invalid pattern "+e[0]+" and "+e[n])}(t=t.map(m));var n=t[0].match(g).map((function(){return[]}));t.forEach((function(e){e.match(g).forEach((function(e,t){n[t].push(+e)}))}));var r=t[0].match(g).map((function(t,r){return p(h(h({},e),{},{outputRange:n[r]}))})),i=(o=t[0],"string"===typeof o&&o.startsWith("rgb"));var o;return function(e){var n=0;return t[0].replace(g,(function(){var t=+r[n++](e);return i&&(t=n<4?Math.round(t):Math.round(1e3*t)/1e3),String(t)}))}}(e);var t=e.outputRange;v("outputRange",t);var n=e.inputRange;v("inputRange",n),function(e){a()(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)a()(e[t]>=e[t-1],"inputRange must be monotonically non-decreasing "+e)}(n),a()(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||f,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var o="extend";return void 0!==e.extrapolateRight?o=e.extrapolateRight:void 0!==e.extrapolate&&(o=e.extrapolate),function(e){a()("number"===typeof e,"Cannot interpolation an input which is not a number");var s=function(e,t){var n;for(n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,n);return function(e,t,n,r,i,o,a,s){var l=e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t);l=o(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r;return l}(e,n[s],n[s+1],t[s],t[s+1],r,i,o)}}function m(e){var t=l()(e);return null===t||"number"!==typeof t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var g=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g;function v(e,t){a()(t.length>=2,e+" must have at least 2 elements"),a()(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var y=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._parent=t,r._config=n,r._interpolation=p(n),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var o=r.prototype;return o.__makeNative=function(){this._parent.__makeNative(),e.prototype.__makeNative.call(this)},o.__getValue=function(){var e=this._parent.__getValue();return a()("number"===typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)},o.interpolate=function(e){return new r(this,e)},o.__attach=function(){this._parent.__addChild(this)},o.__detach=function(){this._parent.__removeChild(this),e.prototype.__detach.call(this)},o.__transformDataType=function(e){return e.map(i.a.transformDataType)},o.__getNativeConfig=function(){return{inputRange:this._config.inputRange,outputRange:this.__transformDataType(this._config.outputRange),extrapolateLeft:this._config.extrapolateLeft||this._config.extrapolate||"extend",extrapolateRight:this._config.extrapolateRight||this._config.extrapolate||"extend",type:"interpolation"}},r}(r.a);y.__createInterpolation=p,t.a=y},function(e,t,n){"use strict";var r=n(13),i=n.n(r),o=!0,a=!1,s=!0,l=!1,c=function(){return!!l||s&&a},u=function(){i.a.canUseDOM&&document.documentElement&&document.documentElement.setAttribute&&document.documentElement.setAttribute("dir",c()?"rtl":"ltr")},h={allowRTL:function(e){s=e,u()},forceRTL:function(e){l=e,u()},getConstants:function(){return{doLeftAndRightSwapInRTL:o,isRTL:c()}},setPreferredLanguageRTL:function(e){a=e,u()},swapLeftAndRightInRTL:function(e){o=e}};t.a=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(131);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo((function(){return i.a.apply(void 0,t)}),[].concat(t))}},function(e,t,n){"use strict";var r=n(0),i=n(31),o=n(63),a=[];function s(e){return a[e-1]}var l=n(130),c=/^data:/,u=function(){function e(){}return e.has=function(t){var n=e._entries;return c.test(t)||Boolean(n[t])},e.add=function(t){var n=e._entries,r=Date.now();n[t]?(n[t].lastUsedTimestamp=r,n[t].refCount+=1):n[t]={lastUsedTimestamp:r,refCount:1}},e.remove=function(t){var n=e._entries;n[t]&&(n[t].refCount-=1),e._cleanUpIfNeeded()},e._cleanUpIfNeeded=function(){var t,n,r=e._entries,i=Object.keys(r);i.length+1>e._maximumEntries&&(i.forEach((function(e){var i=r[e];(!n||i.lastUsedTimestamp<n.lastUsedTimestamp)&&0===i.refCount&&(t=e,n=i)})),t&&delete r[t])},e}();u._maximumEntries=256,u._entries={};var h=0,d={},f={abort:function(e){var t=d[""+e];t&&(t.onerror=null,t.onload=null,t=null,delete d[""+e])},getSize:function(e,t,n){var r=!1,i=setInterval(a,16),o=f.load(e,a,(function(){"function"===typeof n&&n();f.abort(o),clearInterval(i)}));function a(){var e=d[""+o];if(e){var n=e.naturalHeight,a=e.naturalWidth;n&&a&&(t(a,n),r=!0)}r&&(f.abort(o),clearInterval(i))}},has:function(e){return u.has(e)},load:function(e,t,n){h+=1;var r=new window.Image;return r.onerror=n,r.onload=function(e){var n=function(){return t({nativeEvent:e})};"function"===typeof r.decode?r.decode().then(n,n):setTimeout(n,0)},r.src=e,d[""+h]=r,h},prefetch:function(e){return new Promise((function(t,n){f.load(e,(function(){u.add(e),u.remove(e),t()}),n)}))},queryCache:function(e){var t={};return e.forEach((function(e){u.has(e)&&(t[e]="disk/memory")})),Promise.resolve(t)}},p=f,m=n(116),g=n(5),v=n(80),y=n(2);function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,A=/^(data:image\/svg\+xml;utf8,)(.*)/;function S(e){var t=null;if("number"===typeof e){var n=s(e),r=n.scales[0];if(n.scales.length>1){var i=m.a.get();r=n.scales.reduce((function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e}))}var o=1!==r?"@"+r+"x":"";t=n?n.httpServerLocation+"/"+n.name+o+"."+n.type:""}else"string"===typeof e?t=e:e&&"string"===typeof e.uri&&(t=e.uri);if(t){var a=t.match(A);if(a){var l=a[1],c=a[2];return""+l+encodeURIComponent(c)}}return t}var M=r.forwardRef((function(e,t){var n=e.accessibilityLabel,o=e.blurRadius,a=e.defaultSource,c=e.draggable,u=e.onError,h=e.onLayout,d=e.onLoad,f=e.onLoadEnd,m=e.onLoadStart,w=e.pointerEvents,_=e.source,A=e.style,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["accessibilityLabel","blurRadius","defaultSource","draggable","onError","onLayout","onLoad","onLoadEnd","onLoadStart","pointerEvents","source","style"]);var T=r.useState((function(){var e=S(_);if(null!=e&&p.has(e))return"LOADED";return"IDLE"})),k=T[0],P=T[1],L=r.useState({}),D=L[0],I=L[1],N=r.useContext(v.a),j=r.useRef(null),B=r.useRef(E++),F=r.useRef(null),z="LOADED"===k||"LOADING"===k&&null==a,H=function(e,t,n){var r=x({},g.a.flatten(e)),i=r.filter,o=r.resizeMode,a=r.shadowOffset,s=r.tintColor,c=[],u=null;if(i&&c.push(i),t&&c.push("blur("+t+"px)"),a){var h=Object(l.a)(r);h&&c.push("drop-shadow("+h+")")}return s&&null!=n&&c.push("url(#tint-"+n+")"),c.length>0&&(u=c.join(" ")),delete r.blurRadius,delete r.shadowColor,delete r.shadowOpacity,delete r.shadowOffset,delete r.shadowRadius,delete r.tintColor,delete r.overlayColor,delete r.resizeMode,[r,o,u,s]}(A,o,B.current),U=H[0],V=H[1],G=H[2],W=H[3],q=e.resizeMode||V||"cover",X=z?_:a,Y=S(X),K=function(e){if("number"===typeof e){var t=s(e);return{height:t.height,width:t.width}}if(null!=e&&!Array.isArray(e)&&"object"===typeof e)return{height:e.height,width:e.width}}(X),Q=Y?'url("'+Y+'")':null,Z=function(){if(null!=j.current&&("center"===q||"repeat"===q)){var e=j.current,t=e.naturalHeight,n=e.naturalWidth,r=D.height,i=D.width;if(t&&n&&r&&i){var o=Math.min(1,i/n,r/t),a=Math.ceil(o*n),s=Math.ceil(o*t);return a+"px "+s+"px"}}}(),J=Y?Object(i.a)("img",{alt:n||"",classList:[C.accessibilityImage],draggable:c||!1,ref:j,src:Y}):null;var $=S(_);return r.useEffect((function(){function e(){null!=F.current&&(p.abort(F.current),F.current=null)}return e(),null!=$&&(P("LOADING"),m&&m(),F.current=p.load($,(function(e){P("LOADED"),d&&d(e),f&&f()}),(function(){P("ERRORED"),u&&u({nativeEvent:{error:"Failed to load resource "+$+" (404)"}}),f&&f()}))),e}),[$,F,P,u,d,f,m]),r.createElement(y.a,b({},M,{accessibilityLabel:n,onLayout:function(e){if("center"===q||"repeat"===q||h){var t=e.nativeEvent.layout;h&&h(e),I(t)}},pointerEvents:w,ref:t,style:[O.root,N&&O.inline,K,U]}),r.createElement(y.a,{style:[O.image,R[q],{backgroundImage:Q,filter:G},null!=Z&&{backgroundSize:Z}],suppressHydrationWarning:!0}),J,function(e,t){return e&&null!=t?r.createElement("svg",{style:{position:"absolute",height:0,visibility:"hidden",width:0}},r.createElement("defs",null,r.createElement("filter",{id:"tint-"+t,suppressHydrationWarning:!0},r.createElement("feFlood",{floodColor:""+e,key:e}),r.createElement("feComposite",{in2:"SourceAlpha",operator:"atop"})))):null}(W,B.current))}));M.displayName="Image";var T=M;T.getSize=function(e,t,n){p.getSize(e,t,n)},T.prefetch=function(e){return p.prefetch(e)},T.queryCache=function(e){return p.queryCache(e)};var C=o.a.create({accessibilityImage:x(x({},g.a.absoluteFillObject),{},{height:"100%",opacity:0,width:"100%",zIndex:-1})}),O=g.a.create({root:{flexBasis:"auto",overflow:"hidden",zIndex:0},inline:{display:"inline-flex"},image:x(x({},g.a.absoluteFillObject),{},{backgroundColor:"transparent",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"cover",height:"100%",width:"100%",zIndex:-1})}),R=g.a.create({center:{backgroundSize:"auto"},contain:{backgroundSize:"contain"},cover:{backgroundSize:"cover"},none:{backgroundPosition:"0 0",backgroundSize:"auto"},repeat:{backgroundPosition:"0 0",backgroundRepeat:"repeat",backgroundSize:"auto"},stretch:{backgroundSize:"100% 100%"}});t.a=T},function(e,t,n){var r=n(53),i=n(112);e.exports=function(e){return function t(n,o){switch(arguments.length){case 0:return t;case 1:return i(n)?t:r((function(t){return e(n,t)}));default:return i(n)&&i(o)?t:i(n)?r((function(t){return e(t,o)})):i(o)?r((function(t){return e(n,t)})):e(n,o)}}}},function(e,t,n){"use strict";var r=n(0),i=r.createContext({onDispatchAction:function(){},onOptionsChange:function(){}});t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let r=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"e",(function(){return s}));var r="react-native-stylesheet",i={reset:0,modality:.1,classicReset:.5,classic:1,atomic:2.2,custom:{borderColor:2,borderRadius:2,borderStyle:2,borderWidth:2,display:2,flex:2,margin:2,overflow:2,overscrollBehavior:2,padding:2,marginHorizontal:2.1,marginVertical:2.1,paddingHorizontal:2.1,paddingVertical:2.1}},o={borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderStyle:["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],margin:["marginTop","marginRight","marginBottom","marginLeft"],marginHorizontal:["marginRight","marginLeft"],marginVertical:["marginTop","marginBottom"],overflow:["overflowX","overflowY"],overscrollBehavior:["overscrollBehaviorX","overscrollBehaviorY"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"],paddingHorizontal:["paddingRight","paddingLeft"],paddingVertical:["paddingTop","paddingBottom"]},a="monospace,monospace",s='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif'},function(e,t,n){"use strict";var r=n(187);n.d(t,"CommonActions",(function(){return r}));var i=n(154);n.d(t,"StackRouter",(function(){return i.b})),n.d(t,"StackActions",(function(){return i.a}))},function(t,n){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"===typeof window&&(r=window)}t.exports=r},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(36),o=n(75),a=n(5),s=n(2);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var c=a.a.create({root:{transitionProperty:"opacity",transitionDuration:"0.15s",userSelect:"none"},actionable:{cursor:"pointer",touchAction:"manipulation"}}),u=r.memo(r.forwardRef((function(e,t){var n=e.activeOpacity,a=e.delayPressIn,u=e.delayPressOut,h=e.delayLongPress,d=e.disabled,f=e.focusable,p=e.onLongPress,m=e.onPress,g=e.onPressIn,v=e.onPressOut,y=e.rejectResponderTermination,b=e.style,w=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["activeOpacity","delayPressIn","delayPressOut","delayLongPress","disabled","focusable","onLongPress","onPress","onPressIn","onPressOut","rejectResponderTermination","style"]),x=Object(r.useRef)(null),_=Object(i.a)(t,x),E=Object(r.useState)("0s"),A=E[0],S=E[1],M=Object(r.useState)(null),T=M[0],C=M[1],O=Object(r.useCallback)((function(e,t){C(e),S(t?t/1e3+"s":"0s")}),[C,S]),R=Object(r.useCallback)((function(e){O(null!==n&&void 0!==n?n:.2,e)}),[n,O]),k=Object(r.useCallback)((function(e){O(null,e)}),[O]),P=Object(r.useMemo)((function(){return{cancelable:!y,disabled:d,delayLongPress:h,delayPressStart:a,delayPressEnd:u,onLongPress:p,onPress:m,onPressStart:function(e){var t=null!=e.dispatchConfig?"onResponderGrant"===e.dispatchConfig.registrationName:"keydown"===e.type;R(t?0:150),null!=g&&g(e)},onPressEnd:function(e){k(250),null!=v&&v(e)}}}),[h,a,u,d,p,m,g,v,y,R,k]),L=Object(o.a)(x,P);return r.createElement(s.a,l({},w,L,{accessibilityDisabled:d,focusable:!d&&!1!==f,ref:_,style:[c.root,!d&&c.actionable,b,null!=T&&{opacity:T},{transitionDuration:A}]}))})));u.displayName="TouchableOpacity",t.a=u},function(t,n,r){"use strict";var i=r(61);n.a=function(t){var n;try{n=Object(i.findDOMNode)(t)}catch(e){}return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(104),i=n(145),o={backgroundColor:!0,borderColor:!0,borderTopColor:!0,borderRightColor:!0,borderBottomColor:!0,borderLeftColor:!0,color:!0,shadowColor:!0,textDecorationColor:!0,textShadowColor:!0};function a(e,t){var n=e;return null!=t&&r.a[t]||"number"!==typeof e?null!=t&&o[t]&&(n=Object(i.a)(e)):n=e+"px",n}},function(e,t,n){"use strict";var r=n(207),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function a(e){return"undefined"===typeof e}function s(e){return null!==e&&"object"===typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!==typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"===typeof e},isNumber:function(e){return"number"===typeof e},isObject:s,isPlainObject:l,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:u,merge:function e(){var t={};function n(n,r){l(t[r])&&l(n)?t[r]=e(t[r],n):l(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)u(arguments[r],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"===typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){"use strict";var r=n(239),i=n.n(r),o=n(132),a=n(4),s=n.n(a),l=n(131),c=n(33),u=n(46),h=n(8),d=n(58),f=n(28),p=n(161),m=n.n(p),g={},v={Mixin:{scrollResponderMixinGetInitialState:function(){return{isTouching:!1,lastMomentumScrollBeginTime:0,lastMomentumScrollEndTime:0,observedScrollSinceBecomingResponder:!1,becameResponderWhileAnimating:!1}},scrollResponderHandleScrollShouldSetResponder:function(){return this.state.isTouching},scrollResponderHandleStartShouldSetResponder:function(){return!1},scrollResponderHandleStartShouldSetResponderCapture:function(e){return this.scrollResponderIsAnimating()},scrollResponderHandleResponderReject:function(){m()(!1,"ScrollView doesn't take rejection well - scrolls anyway")},scrollResponderHandleTerminationRequest:function(){return!this.state.observedScrollSinceBecomingResponder},scrollResponderHandleTouchEnd:function(e){var t=e.nativeEvent;this.state.isTouching=0!==t.touches.length,this.props.onTouchEnd&&this.props.onTouchEnd(e)},scrollResponderHandleResponderRelease:function(e){this.props.onResponderRelease&&this.props.onResponderRelease(e);var t=d.a.currentlyFocusedField();this.props.keyboardShouldPersistTaps||null==t||e.target===t||this.state.observedScrollSinceBecomingResponder||this.state.becameResponderWhileAnimating||(this.props.onScrollResponderKeyboardDismissed&&this.props.onScrollResponderKeyboardDismissed(e),d.a.blurTextInput(t))},scrollResponderHandleScroll:function(e){this.state.observedScrollSinceBecomingResponder=!0,this.props.onScroll&&this.props.onScroll(e)},scrollResponderHandleResponderGrant:function(e){this.state.observedScrollSinceBecomingResponder=!1,this.props.onResponderGrant&&this.props.onResponderGrant(e),this.state.becameResponderWhileAnimating=this.scrollResponderIsAnimating()},scrollResponderHandleScrollBeginDrag:function(e){this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e)},scrollResponderHandleScrollEndDrag:function(e){this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e)},scrollResponderHandleMomentumScrollBegin:function(e){this.state.lastMomentumScrollBeginTime=Date.now(),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e)},scrollResponderHandleMomentumScrollEnd:function(e){this.state.lastMomentumScrollEndTime=Date.now(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e)},scrollResponderHandleTouchStart:function(e){this.state.isTouching=!0,this.props.onTouchStart&&this.props.onTouchStart(e)},scrollResponderHandleTouchMove:function(e){this.props.onTouchMove&&this.props.onTouchMove(e)},scrollResponderIsAnimating:function(){return Date.now()-this.state.lastMomentumScrollEndTime<16||this.state.lastMomentumScrollEndTime<this.state.lastMomentumScrollBeginTime},scrollResponderGetScrollableNode:function(){return this.getScrollableNode?this.getScrollableNode():Object(u.a)(this)},scrollResponderScrollTo:function(e,t,n){if("number"===typeof e)console.warn("`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.");else{var r=e||g;e=r.x,t=r.y,n=r.animated}var i=this.scrollResponderGetScrollableNode(),o=e||0,a=t||0;"function"===typeof i.scroll?i.scroll({top:a,left:o,behavior:n?"smooth":"auto"}):(i.scrollLeft=o,i.scrollTop=a)},scrollResponderZoomTo:function(e,t){"ios"!==h.a.OS&&s()("zoomToRect is not implemented")},scrollResponderFlashScrollIndicators:function(){},scrollResponderScrollNativeHandleToKeyboard:function(e,t,n){this.additionalScrollOffset=t||0,this.preventNegativeScrollOffset=!!n,f.a.measureLayout(e,Object(u.a)(this.getInnerViewNode()),this.scrollResponderTextInputFocusError,this.scrollResponderInputMeasureAndScrollToKeyboard)},scrollResponderInputMeasureAndScrollToKeyboard:function(e,t,n,r){var i=c.a.get("window").height;this.keyboardWillOpenTo&&(i=this.keyboardWillOpenTo.endCoordinates.screenY);var o=t-i+r+this.additionalScrollOffset;this.preventNegativeScrollOffset&&(o=Math.max(0,o)),this.scrollResponderScrollTo({x:0,y:o,animated:!0}),this.additionalOffset=0,this.preventNegativeScrollOffset=!1},scrollResponderTextInputFocusError:function(e){console.error("Error measuring text field: ",e)},UNSAFE_componentWillMount:function(){this.keyboardWillOpenTo=null,this.additionalScrollOffset=0},scrollResponderKeyboardWillShow:function(e){this.keyboardWillOpenTo=e,this.props.onKeyboardWillShow&&this.props.onKeyboardWillShow(e)},scrollResponderKeyboardWillHide:function(e){this.keyboardWillOpenTo=null,this.props.onKeyboardWillHide&&this.props.onKeyboardWillHide(e)},scrollResponderKeyboardDidShow:function(e){e&&(this.keyboardWillOpenTo=e),this.props.onKeyboardDidShow&&this.props.onKeyboardDidShow(e)},scrollResponderKeyboardDidHide:function(e){this.keyboardWillOpenTo=null,this.props.onKeyboardDidHide&&this.props.onKeyboardDidHide(e)}}},y=n(0),b=n.n(y),w=n(5),x=n(2),_=n(36);function E(){return(E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function A(e){return{nativeEvent:{contentOffset:{get x(){return e.target.scrollLeft},get y(){return e.target.scrollTop}},contentSize:{get height(){return e.target.scrollHeight},get width(){return e.target.scrollWidth}},layoutMeasurement:{get height(){return e.target.offsetHeight},get width(){return e.target.offsetWidth}}},timeStamp:Date.now()}}var S=y.forwardRef((function(e,t){var n=e.onScroll,r=e.onTouchMove,i=e.onWheel,o=e.scrollEnabled,a=void 0===o||o,s=e.scrollEventThrottle,l=void 0===s?0:s,c=e.showsHorizontalScrollIndicator,u=e.showsVerticalScrollIndicator,h=e.style,d=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["onScroll","onTouchMove","onWheel","scrollEnabled","scrollEventThrottle","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","style"]),f=y.useRef({isScrolling:!1,scrollLastTick:0}),p=y.useRef(null),m=y.useRef(null);function g(e){return function(t){a&&e&&e(t)}}function v(e){f.current.scrollLastTick=Date.now(),n&&n(A(e))}var b=!1===c||!1===u;return y.createElement(x.a,E({},d,{onScroll:function(e){e.stopPropagation(),e.target===m.current&&(e.persist(),null!=p.current&&clearTimeout(p.current),p.current=setTimeout((function(){!function(e){f.current.isScrolling=!1,n&&n(A(e))}(e)}),100),f.current.isScrolling?function(e,t){var n=Date.now()-e;return t>0&&n>=t}(f.current.scrollLastTick,l)&&v(e):function(e){f.current.isScrolling=!0,v(e)}(e))},onTouchMove:g(r),onWheel:g(i),ref:Object(_.a)(m,t),style:[h,!a&&M.scrollDisabled,b&&M.hideScrollbar]}))})),M=w.a.create({scrollDisabled:{overflowX:"hidden",overflowY:"hidden",touchAction:"none"},hideScrollbar:{scrollbarWidth:"none"}}),T=S;function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(){return(k=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var P={},L=i()({displayName:"ScrollView",mixins:[v.Mixin],getInitialState:function(){return this.scrollResponderMixinGetInitialState()},flashScrollIndicators:function(){this.scrollResponderFlashScrollIndicators()},getScrollResponder:function(){return this},getScrollableNode:function(){return this._scrollNodeRef},getInnerViewRef:function(){return this._innerViewRef},getInnerViewNode:function(){return this._innerViewRef},getNativeScrollRef:function(){return this._scrollNodeRef},scrollTo:function(e,t,n){if("number"===typeof e)console.warn("`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.");else{var r=e||P;t=r.x,e=r.y,n=r.animated}this.getScrollResponder().scrollResponderScrollTo({x:t||0,y:e||0,animated:!1!==n})},scrollToEnd:function(e){var t=!1!==(e&&e.animated),n=this.props.horizontal,r=this.getScrollResponder(),i=r.scrollResponderGetScrollableNode(),o=n?i.scrollWidth:0,a=n?0:i.scrollHeight;r.scrollResponderScrollTo({x:o,y:a,animated:t})},render:function(){var e=this.props,t=e.contentContainerStyle,n=e.horizontal,r=e.onContentSizeChange,i=e.refreshControl,o=e.stickyHeaderIndices,a=e.pagingEnabled,l=(e.forwardedRef,e.keyboardDismissMode,e.onScroll,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["contentContainerStyle","horizontal","onContentSizeChange","refreshControl","stickyHeaderIndices","pagingEnabled","forwardedRef","keyboardDismissMode","onScroll"])),c={};r&&(c={onLayout:this._handleContentOnLayout});var u=!n&&Array.isArray(o),h=u||a?b.a.Children.map(this.props.children,(function(e,t){var n=u&&o.indexOf(t)>-1;return null!=e&&(n||a)?b.a.createElement(x.a,{style:w.a.compose(n&&I.stickyHeader,a&&I.pagingEnabledChild)},e):e})):this.props.children,d=b.a.createElement(x.a,k({},c,{children:h,collapsable:!1,ref:this._setInnerViewRef,style:w.a.compose(n&&I.contentContainerHorizontal,t)})),f=n?I.baseHorizontal:I.baseVertical,p=n?I.pagingEnabledHorizontal:I.pagingEnabledVertical,m=O(O({},l),{},{style:[f,a&&p,this.props.style],onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this._handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject}),g=T;s()(void 0!==g,"ScrollViewClass must not be undefined");var v=b.a.createElement(g,k({},m,{ref:this._setScrollNodeRef}),d);return i?b.a.cloneElement(i,{style:m.style},v):v},_handleContentOnLayout:function(e){var t=e.nativeEvent.layout,n=t.width,r=t.height;this.props.onContentSizeChange(n,r)},_handleScroll:function(e){"on-drag"===this.props.keyboardDismissMode&&Object(o.a)(),this.scrollResponderHandleScroll(e)},_setInnerViewRef:function(e){this._innerViewRef=e},_setScrollNodeRef:function(e){this._scrollNodeRef=e,null!=e&&(e.getScrollResponder=this.getScrollResponder,e.getInnerViewNode=this.getInnerViewNode,e.getInnerViewRef=this.getInnerViewRef,e.getNativeScrollRef=this.getNativeScrollRef,e.getScrollableNode=this.getScrollableNode,e.scrollTo=this.scrollTo,e.scrollToEnd=this.scrollToEnd,e.flashScrollIndicators=this.flashScrollIndicators,e.scrollResponderZoomTo=this.scrollResponderZoomTo,e.scrollResponderScrollNativeHandleToKeyboard=this.scrollResponderScrollNativeHandleToKeyboard),Object(l.a)(this.props.forwardedRef)(e)}}),D={flexGrow:1,flexShrink:1,transform:[{translateZ:0}],WebkitOverflowScrolling:"touch"},I=w.a.create({baseVertical:O(O({},D),{},{flexDirection:"column",overflowX:"hidden",overflowY:"auto"}),baseHorizontal:O(O({},D),{},{flexDirection:"row",overflowX:"auto",overflowY:"hidden"}),contentContainerHorizontal:{flexDirection:"row"},stickyHeader:{position:"sticky",top:0,zIndex:10},pagingEnabledHorizontal:{scrollSnapType:"x mandatory"},pagingEnabledVertical:{scrollSnapType:"y mandatory"},pagingEnabledChild:{scrollSnapAlign:"start"}}),N=b.a.forwardRef((function(e,t){return b.a.createElement(L,k({},e,{forwardedRef:t}))}));N.displayName="ScrollView";t.a=N},function(e,t,n){"use strict";var r=n(246),i=n.n(r);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function e(t,n){var r=n.default,i=void 0===r?null:r,o=n.triggerUpdate,a=void 0===o||o,s=n.onChange,l=void 0===s?function(e,t){}:s;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=i,this.triggerUpdate=a,this.onChange=l};t.a=function(e){var t=e.stateInit,n=void 0===t?function(){return{}}:t,r=e.props,a=void 0===r?{}:r,l=e.methods,c=void 0===l?{}:l,u=e.aliases,h=void 0===u?{}:u,d=e.init,f=void 0===d?function(){}:d,p=e.update,m=void 0===p?function(){}:p,g=Object.keys(a).map((function(e){return new s(e,a[e])}));return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1}),r={};function a(t){return s(t,e),l(),a}var s=function(e,n){f.call(a,e,t,n),t.initialised=!0},l=i()((function(){t.initialised&&(m.call(a,t,r),r={})}),1);return g.forEach((function(e){a[e.name]=function(e){var n=e.name,i=e.triggerUpdate,o=void 0!==i&&i,s=e.onChange,c=void 0===s?function(e,t){}:s,u=e.defaultVal,h=void 0===u?null:u;return function(e){var i=t[n];if(!arguments.length)return i;var s=void 0===e?h:e;return t[n]=s,c.call(a,s,t,i),!r.hasOwnProperty(n)&&(r[n]=i),o&&l(),a}}(e)})),Object.keys(c).forEach((function(e){a[e]=function(){for(var n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(n=c[e]).call.apply(n,[a,t].concat(i))}})),Object.entries(h).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];return a[n]=a[r]})),a.resetProps=function(){return g.forEach((function(e){a[e.name](e.defaultVal)})),a},a.resetProps(),t._rerender=l,a}}},function(e,t,n){"use strict";var r=n(4),i=n.n(r),o=n(13).canUseDOM&&"undefined"!==typeof window.requestIdleCallback,a=o?window.requestIdleCallback:function(e,t){return setTimeout((function(){var t=Date.now();e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},s=o?window.cancelIdleCallback:function(e){clearTimeout(e)},l=a,c={Events:{interactionStart:"interactionStart",interactionComplete:"interactionComplete"},runAfterInteractions:function(e){var t,n=new Promise((function(n){t=l((function(){e?n(e()):n()}))}));return{then:n.then.bind(n),done:n.then.bind(n),cancel:function(){s(t)}}},createInteractionHandle:function(){return 1},clearInteractionHandle:function(e){i()(!!e,"Must provide a handle to clear.")},addListener:function(){}};t.a=c},,function(e,t,n){var r=n(112);e.exports=function(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}},function(e,t,n){"use strict";var r=n(0),i=n(31),o=n(63),a=n(27),s=n(72),l=n(88),c=n(36),u=n(73),h=n(95),d=n(5),f=n(80);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=m(m(m(m(m(m(m(m(m({},a.c),a.a),a.b),a.d),a.e),a.f),a.h),a.g),{},{href:!0,lang:!0,pointerEvents:!0}),y=r.forwardRef((function(e,t){var n=e.dir,o=e.hrefAttrs,a=e.numberOfLines,d=e.onClick,p=e.onLayout,m=e.onPress,g=e.onMoveShouldSetResponder,y=e.onMoveShouldSetResponderCapture,x=e.onResponderEnd,_=e.onResponderGrant,E=e.onResponderMove,A=e.onResponderReject,S=e.onResponderRelease,M=e.onResponderStart,T=e.onResponderTerminate,C=e.onResponderTerminationRequest,O=e.onScrollShouldSetResponder,R=e.onScrollShouldSetResponderCapture,k=e.onSelectionChangeShouldSetResponder,P=e.onSelectionChangeShouldSetResponderCapture,L=e.onStartShouldSetResponder,D=e.onStartShouldSetResponderCapture,I=e.selectable,N=r.useContext(f.a),j=r.useRef(null),B=[b.text,!0===N&&b.textHasAncestor,1===a&&b.textOneLine,null!=a&&a>1&&b.textMultiLine],F=[e.style,null!=a&&a>1&&{WebkitLineClamp:a},!0===I&&w.selectable,!1===I&&w.notSelectable,m&&w.pressable];Object(l.a)(j,p),Object(h.a)(j,{onMoveShouldSetResponder:g,onMoveShouldSetResponderCapture:y,onResponderEnd:x,onResponderGrant:_,onResponderMove:E,onResponderReject:A,onResponderRelease:S,onResponderStart:M,onResponderTerminate:T,onResponderTerminationRequest:C,onScrollShouldSetResponder:O,onScrollShouldSetResponderCapture:R,onSelectionChangeShouldSetResponder:k,onSelectionChangeShouldSetResponderCapture:P,onStartShouldSetResponder:L,onStartShouldSetResponderCapture:D});var z=N?"span":"div",H=function(e){return Object(s.a)(e,v)}(e);if(H.classList=B,H.dir=n,N||(H.dir=null!=n?n:"auto"),H.onClick=function(e){null!=d&&d(e),null==d&&null!=m&&(e.stopPropagation(),m(e))},H.style=F,null!=e.href&&null!=o){var U=o.download,V=o.rel,G=o.target;null!=U&&(H.download=U),null!=V&&(H.rel=V),"string"===typeof G&&(H.target="_"!==G.charAt(0)?"_"+G:G)}var W=Object(u.a)(H),q=Object(c.a)(j,W,t);H.ref=q;var X=Object(i.a)(z,H);return N?X:r.createElement(f.a.Provider,{value:!0},X)}));y.displayName="Text";var b=o.a.create({text:{border:"0 solid black",boxSizing:"border-box",color:"black",display:"inline",font:"14px System",margin:0,padding:0,whiteSpace:"pre-wrap",wordWrap:"break-word"},textHasAncestor:{color:"inherit",font:"inherit",whiteSpace:"inherit"},textOneLine:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},textMultiLine:{display:"-webkit-box",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",WebkitBoxOrient:"vertical"}}),w=d.a.create({notSelectable:{userSelect:"none"},selectable:{userSelect:"text"},pressable:{cursor:"pointer"}});t.a=y},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(t,n,r){"use strict";r.d(n,"a",(function(){return M}));var i=r(10),o=r(0),a=r.n(o);if(!o.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!i.r)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var s=r(61);function l(e){e()}var c=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},u=[];function h(e){return Object(i.m)(e)}var d="undefined"===typeof FinalizationRegistry?void 0:FinalizationRegistry;function f(e){return{reaction:e,mounted:!1,changedBeforeMount:!1,cleanAt:Date.now()+p}}var p=1e4;var m=function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};var g=d?function(e){var t=new Map,n=1,r=new e((function(e){var n=t.get(e);n&&(n.reaction.dispose(),t.delete(e))}));return{addReactionToTrack:function(e,i,o){var a=n++;return r.register(o,a,e),e.current=f(i),e.current.finalizationRegistryCleanupToken=a,t.set(a,e.current),e.current},recordReactionAsCommitted:function(e){r.unregister(e),e.current&&e.current.finalizationRegistryCleanupToken&&t.delete(e.current.finalizationRegistryCleanupToken)},forceCleanupTimerToRunNowForTests:function(){},resetCleanupScheduleForTests:function(){}}}(d):function(){var e,t=new Set;function n(){void 0===e&&(e=setTimeout(r,1e4))}function r(){e=void 0;var r=Date.now();t.forEach((function(e){var n=e.current;n&&r>=n.cleanAt&&(n.reaction.dispose(),e.current=null,t.delete(e))})),t.size>0&&n()}return{addReactionToTrack:function(e,r,i){var o;return e.current=f(r),o=e,t.add(o),n(),e.current},recordReactionAsCommitted:function(e){t.delete(e)},forceCleanupTimerToRunNowForTests:function(){e&&(clearTimeout(e),r())},resetCleanupScheduleForTests:function(){var n,r;if(t.size>0){try{for(var i=m(t),o=i.next();!o.done;o=i.next()){var a=o.value,s=a.current;s&&(s.reaction.dispose(),a.current=null)}}catch(l){n={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.clear()}e&&(clearTimeout(e),e=void 0)}}}(),v=g.addReactionToTrack,y=g.recordReactionAsCommitted,b=(g.resetCleanupScheduleForTests,g.forceCleanupTimerToRunNowForTests,!1);function w(){return b}var x=function(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(s){i={error:s}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};function _(e){return"observer"+e}var E=function(){};function A(t,n){if(void 0===n&&(n="observed"),w())return t();var r=x(a.a.useState(new E),1)[0],s=function(){var e=c(Object(o.useState)(0),2)[1];return Object(o.useCallback)((function(){e((function(e){return e+1}))}),u)}(),l=a.a.useRef(null);if(!l.current)var d=new i.b(_(n),(function(){f.mounted?s():f.changedBeforeMount=!0})),f=v(l,d,r);var p,m,g=l.current.reaction;if(a.a.useDebugValue(g,h),a.a.useEffect((function(){return y(l),l.current?(l.current.mounted=!0,l.current.changedBeforeMount&&(l.current.changedBeforeMount=!1,s())):(l.current={reaction:new i.b(_(n),(function(){s()})),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},s()),function(){l.current.reaction.dispose(),l.current=null}}),[]),g.track((function(){try{p=t()}catch(e){m=e}})),m)throw m;return p}var S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function M(e,t){if(w())return e;var n,r,i,a=S({forwardRef:!1},t),s=e.displayName||e.name,l=function(t,n){return A((function(){return e(t,n)}),s)};return l.displayName=s,n=a.forwardRef?Object(o.memo)(Object(o.forwardRef)(l)):Object(o.memo)(l),r=e,i=n,Object.keys(r).forEach((function(e){T[e]||Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(r,e))})),n.displayName=s,n}var T={$$typeof:!0,render:!0,compare:!0,type:!0};var C;(C=s.unstable_batchedUpdates)||(C=l),Object(i.i)({reactionScheduler:C})},function(t,n,r){"use strict";var i=r(0),o=r(31),a=r(63),s=r(27),l=r(72),c=r(88),u=r(66),h=r(36),d=r(73),f=r(95),p=r(5),m=r(58);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=v(v(v(v(v(v(v(v(v({},s.c),s.a),s.b),s.d),s.e),s.f),s.h),s.g),{},{autoCapitalize:!0,autoComplete:!0,autoCorrect:!0,autoFocus:!0,defaultValue:!0,disabled:!0,lang:!0,maxLength:!0,onChange:!0,onScroll:!0,placeholder:!0,pointerEvents:!0,readOnly:!0,rows:!0,spellCheck:!0,value:!0,type:!0});var w=i.forwardRef((function(t,n){var r,a,s=t.autoCapitalize,g=void 0===s?"sentences":s,v=t.autoComplete,y=t.autoCompleteType,w=t.autoCorrect,_=void 0===w||w,E=t.blurOnSubmit,A=t.clearTextOnFocus,S=t.dir,M=t.editable,T=void 0===M||M,C=t.keyboardType,O=void 0===C?"default":C,R=t.multiline,k=void 0!==R&&R,P=t.numberOfLines,L=void 0===P?1:P,D=t.onBlur,I=t.onChange,N=t.onChangeText,j=t.onContentSizeChange,B=t.onFocus,F=t.onKeyPress,z=t.onLayout,H=t.onMoveShouldSetResponder,U=t.onMoveShouldSetResponderCapture,V=t.onResponderEnd,G=t.onResponderGrant,W=t.onResponderMove,q=t.onResponderReject,X=t.onResponderRelease,Y=t.onResponderStart,K=t.onResponderTerminate,Q=t.onResponderTerminationRequest,Z=t.onScrollShouldSetResponder,J=t.onScrollShouldSetResponderCapture,$=t.onSelectionChange,ee=t.onSelectionChangeShouldSetResponder,te=t.onSelectionChangeShouldSetResponderCapture,ne=t.onStartShouldSetResponder,re=t.onStartShouldSetResponderCapture,ie=t.onSubmitEditing,oe=t.placeholderTextColor,ae=t.returnKeyType,se=t.secureTextEntry,le=void 0!==se&&se,ce=t.selection,ue=t.selectTextOnFocus,he=t.spellCheck;switch(O){case"email-address":r="email";break;case"number-pad":case"numeric":a="numeric";break;case"decimal-pad":a="decimal";break;case"phone-pad":r="tel";break;case"search":case"web-search":r="search";break;case"url":r="url";break;default:r="text"}le&&(r="password");var de=i.useRef({height:null,width:null}),fe=i.useRef(null),pe=i.useCallback((function(e){if(k&&j&&null!=e){var t=e.scrollHeight,n=e.scrollWidth;t===de.current.height&&n===de.current.width||(de.current.height=t,de.current.width=n,j({nativeEvent:{contentSize:{height:de.current.height,width:de.current.width}}}))}}),[k,j]),me=i.useMemo((function(){return function(e){null!=e&&(e.clear=function(){null!=e&&(e.value="")},e.isFocused=function(){return null!=e&&m.a.currentlyFocusedField()===e},pe(e))}}),[pe]);Object(u.a)((function(){var t=fe.current;null!=t&&null!=ce&&function(t,n){if(function(e,t){var n=e.selectionEnd,r=e.selectionStart,i=t.start,o=t.end;return i!==r||o!==n}(t,n)){var r=n.start,i=n.end;try{t.setSelectionRange(r,i||r)}catch(e){}}}(t,ce),document.activeElement===t&&(m.a._currentlyFocusedNode=t)}),[fe,ce]);var ge=k?"textarea":"input",ve=[x.textinput],ye=p.a.compose(t.style,oe&&{placeholderTextColor:oe});Object(c.a)(fe,z),Object(f.a)(fe,{onMoveShouldSetResponder:H,onMoveShouldSetResponderCapture:U,onResponderEnd:V,onResponderGrant:G,onResponderMove:W,onResponderReject:q,onResponderRelease:X,onResponderStart:Y,onResponderTerminate:K,onResponderTerminationRequest:Q,onScrollShouldSetResponder:Z,onScrollShouldSetResponderCapture:J,onSelectionChangeShouldSetResponder:ee,onSelectionChangeShouldSetResponderCapture:te,onStartShouldSetResponder:ne,onStartShouldSetResponderCapture:re});var be=function(e){return Object(l.a)(e,b)}(t);be.autoCapitalize=g,be.autoComplete=v||y||"on",be.autoCorrect=_?"on":"off",be.classList=ve,be.dir=void 0!==S?S:"auto",be.enterKeyHint=ae,be.onBlur=function(e){m.a._currentlyFocusedNode=null,D&&(e.nativeEvent.text=e.target.value,D(e))},be.onChange=function(e){var t=e.target,n=t.value;e.nativeEvent.text=n,pe(t),I&&I(e),N&&N(n)},be.onFocus=function(e){var t=e.target;B&&(e.nativeEvent.text=t.value,B(e)),null!=t&&(m.a._currentlyFocusedNode=t,A&&(t.value=""),ue&&setTimeout((function(){t.select()}),0))},be.onKeyDown=function(e){var t=e.target;e.stopPropagation();var n=null==E?!k:E,r=e.nativeEvent,i=function(e){return e.isComposing||229===e.keyCode}(r);F&&F(e),"Enter"!==e.key||e.shiftKey||i||e.isDefaultPrevented()||(!E&&k||!ie||(e.preventDefault(),r.text=e.target.value,ie(e)),n&&null!=t&&t.blur())},be.onSelect=function(e){if($)try{var t=e.target,n=t.selectionStart,r=t.selectionEnd;e.nativeEvent.selection={start:n,end:r},e.nativeEvent.text=e.target.value,$(e)}catch(e){}},be.readOnly=!T,be.rows=k?L:void 0,be.spellCheck=null!=he?he:_,be.style=ye,be.type=k?void 0:r,be.inputMode=a;var we=Object(d.a)(be),xe=Object(h.a)(fe,we,me,n);return be.ref=xe,Object(o.a)(ge,be)}));w.displayName="TextInput",w.State=m.a;var x=a.a.create({textinput:{MozAppearance:"textfield",WebkitAppearance:"none",backgroundColor:"transparent",border:"0 solid black",borderRadius:0,boxSizing:"border-box",font:"14px System",margin:0,padding:0,resize:"none"}});n.a=w},function(e,t,n){"use strict";var r=n(28),i={_currentlyFocusedNode:null,currentlyFocusedField:function(){return document.activeElement!==this._currentlyFocusedNode&&(this._currentlyFocusedNode=null),this._currentlyFocusedNode},focusTextInput:function(e){null!==e&&(this._currentlyFocusedNode=e,document.activeElement!==e&&r.a.focus(e))},blurTextInput:function(e){null!==e&&(this._currentlyFocusedNode=null,document.activeElement===e&&r.a.blur(e))}};t.a=i},function(e,t,n){"use strict";t.a=function(e){return function(){return e}}},function(e,t,n){"use strict";(function(e){var n={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-n.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*n.Bounce.In(2*e):.5*n.Bounce.Out(2*e-1)+.5}}},r="undefined"===typeof self&&"undefined"!==typeof e&&e.hrtime?function(){var t=e.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!==typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},i=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=r()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<n.length;i++){var o=this._tweens[n[i]],a=!t;o&&!1===o.update(e,a)&&!t&&delete this._tweens[n[i]]}n=Object.keys(this._tweensAddedDuringUpdate)}return!0},e}(),o={Linear:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=o.Utils.Linear;return t<0?a(e[0],e[1],r):t>1?a(e[n],e[n-1],n-r):a(e[i],e[i+1>n?n:i+1],r-i)},Bezier:function(e,t){for(var n=0,r=e.length-1,i=Math.pow,a=o.Utils.Bernstein,s=0;s<=r;s++)n+=i(1-t,r-s)*i(t,s)*e[s]*a(r,s);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=o.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(i=Math.floor(r=n*(1+t))),a(e[(i-1+n)%n],e[i],e[(i+1)%n],e[(i+2)%n],r-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(a(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):a(e[i?i-1:0],e[i],e[n<i+1?n:i+1],e[n<i+2?n:i+2],r-i)},Utils:{Linear:function(e,t,n){return(t-e)*n+e},Bernstein:function(e,t){var n=o.Utils.Factorial;return n(e)/n(t)/n(e-t)},Factorial:function(){var e=[1];return function(t){var n=1;if(e[t])return e[t];for(var r=t;r>1;r--)n*=r;return e[t]=n,n}}(),CatmullRom:function(e,t,n,r,i){var o=.5*(n-e),a=.5*(r-t),s=i*i;return(2*t-2*n+o+a)*(i*s)+(-3*t+3*n-2*o-a)*s+o*i+t}}},a=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),s=new i,l=function(){function e(e,t){void 0===t&&(t=s),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=n.Linear.None,this._interpolationFunction=o.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=a.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"===typeof e?r()+parseFloat(e):e:r(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,r){for(var i in n){var o=e[i],a=Array.isArray(o),s=a?"array":typeof o,l=!a&&Array.isArray(n[i]);if("undefined"!==s&&"function"!==s){if(l){var c=n[i];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,o)),n[i]=[o].concat(c)}if("object"!==s&&!a||!o||l)"undefined"===typeof t[i]&&(t[i]=o),a||(t[i]*=1),r[i]=l?n[i].slice().reverse():t[i]||0;else{for(var u in t[i]=a?[]:{},o)t[i][u]=o[u];r[i]=a?[]:{},this._setupProperties(o,t[i],n[i],r[i])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=r()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=r()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return this._group=e,this},e.prototype.delay=function(e){return this._delayTime=e,this},e.prototype.repeat=function(e){return this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return this._yoyo=e,this},e.prototype.easing=function(e){return this._easingFunction=e,this},e.prototype.interpolation=function(e){return this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(e,t){if(void 0===e&&(e=r()),void 0===t&&(t=!0),this._isPaused)return!0;var n,i,o=this._startTime+this._duration;if(!this._goToEnd&&!this._isPlaying){if(e>o)return!1;t&&this.start(e)}if(this._goToEnd=!1,e<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),i=(e-this._startTime)/this._duration,i=0===this._duration||i>1?1:i;var a=this._easingFunction(i);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,i),1===i){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!==typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var s=0,l=this._chainedTweens.length;s<l;s++)this._chainedTweens[s].start(this._startTime+this._duration);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,n,r){for(var i in n)if(void 0!==t[i]){var o=t[i]||0,a=n[i],s=Array.isArray(e[i]),l=Array.isArray(a);!s&&l?e[i]=this._interpolationFunction(a,r):"object"===typeof a&&a?this._updateProperties(e[i],o,a,r):"number"===typeof(a=this._handleRelativeValue(o,a))&&(e[i]=o+(a-o)*r)}},e.prototype._handleRelativeValue=function(e,t){return"string"!==typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],n=this._valuesEnd[e];this._valuesStartRepeat[e]="string"===typeof n?this._valuesStartRepeat[e]+parseFloat(n):this._valuesEnd[e],this._valuesEnd[e]=t},e}(),c=a.nextId,u=s,h=u.getAll.bind(u),d=u.removeAll.bind(u),f=u.add.bind(u),p=u.remove.bind(u),m=u.update.bind(u),g={Easing:n,Group:i,Interpolation:o,now:r,Sequence:a,nextId:c,Tween:l,VERSION:"18.6.4",getAll:h,removeAll:d,add:f,remove:p,update:m};t.a=g}).call(this,n(111))},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(294)},function(e,t,n){"use strict";t.a=function(e){return 1e-6*(e()-.5)}},function(e,t,n){"use strict";var r=n(94),i={create:function(e,t){return r.a.createCSS(e,t)}};t.a=i},function(e,t,n){"use strict";var r=n(2),i=n(0),o=n.n(i);function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var s=i.prototype;return s.setNativeProps=function(){},s.render=function(){return o.a.createElement(r.a,{style:[l,this.props.style]},this.props.children)},i}(o.a.Component),l={};t.a=s},function(e,t,n){"use strict";var r=n(20),i=n.n(r),o=n(23),a=n.n(o),s=n(223),l=n.n(s),c=function(e,t){return new Promise((function(n,r){try{var i=e();t&&t(null,i),n(i)}catch(o){t&&t(o),r(o)}}))},u=function(e,t,n){return Promise.all(e).then((function(e){var r=n?n(e):null;return t&&t(null,r),Promise.resolve(r)}),(function(e){return t&&t(e),Promise.reject(e)}))},h=function(){function e(){i()(this,e)}return a()(e,null,[{key:"getItem",value:function(e,t){return c((function(){return window.localStorage.getItem(e)}),t)}},{key:"setItem",value:function(e,t,n){return c((function(){window.localStorage.setItem(e,t)}),n)}},{key:"removeItem",value:function(e,t){return c((function(){return window.localStorage.removeItem(e)}),t)}},{key:"mergeItem",value:function(e,t,n){return c((function(){!function(e,t){var n=window.localStorage.getItem(e),r=JSON.parse(n),i=JSON.parse(t),o=JSON.stringify(l()({},r,i));window.localStorage.setItem(e,o)}(e,t)}),n)}},{key:"clear",value:function(e){return c((function(){window.localStorage.clear()}),e)}},{key:"getAllKeys",value:function(e){return c((function(){for(var e=window.localStorage.length,t=[],n=0;n<e;n+=1){var r=window.localStorage.key(n);t.push(r)}return t}),e)}},{key:"flushGetRequests",value:function(){}},{key:"multiGet",value:function(t,n){var r=t.map((function(t){return e.getItem(t)}));return u(r,n,(function(e){return e.map((function(e,n){return[t[n],e]}))}))}},{key:"multiSet",value:function(t,n){var r=t.map((function(t){return e.setItem(t[0],t[1])}));return u(r,n)}},{key:"multiRemove",value:function(t,n){var r=t.map((function(t){return e.removeItem(t)}));return u(r,n)}},{key:"multiMerge",value:function(t,n){var r=t.map((function(t){return e.mergeItem(t[0],t[1])}));return u(r,n)}}]),e}();t.a=h},function(e,t,n){"use strict";var r=n(13),i=n(0),o=r.canUseDOM?i.useLayoutEffect:i.useEffect;t.a=o},function(e,t,n){"use strict";var r=n(0),i="Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.";t.a=r.createContext({isDefault:!0,get getKey(){throw new Error(i)},get setKey(){throw new Error(i)},get getState(){throw new Error(i)},get setState(){throw new Error(i)},get getIsInitial(){throw new Error(i)}})},function(e,t,n){"use strict";var r=n(4),i=n.n(r);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(e){var t,n;function r(t,n,r,i){var o;return(o=e.call(this,n)||this).emitter=t,o.listener=r,o.context=i,o}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n),r.prototype.remove=function(){this.emitter.removeSubscription(this)},r}(function(){function e(e){this.subscriber=e}return e.prototype.remove=function(){this.subscriber.removeSubscription(this)},e}()),s=function(){function e(){this._subscriptionsForType={}}var t=e.prototype;return t.addSubscription=function(e,t){i()(t.subscriber===this,"The subscriber of the subscription is incorrectly set."),this._subscriptionsForType[e]||(this._subscriptionsForType[e]=[]);var n=this._subscriptionsForType[e].length;return this._subscriptionsForType[e].push(t),t.eventType=e,t.key=n,t},t.removeAllSubscriptions=function(e){null==e?this._subscriptionsForType={}:delete this._subscriptionsForType[e]},t.removeSubscription=function(e){var t=e.eventType,n=e.key,r=this._subscriptionsForType[t];r&&delete r[n]},t.getSubscriptionsForType=function(e){return this._subscriptionsForType[e]},e}(),l=function(){return!0},c=function(){function e(e){this._subscriber=e||new s}var t=e.prototype;return t.addListener=function(e,t,n){return this._subscriber.addSubscription(e,new a(this,this._subscriber,t,n))},t.removeAllListeners=function(e){this._subscriber.removeAllSubscriptions(e)},t.removeSubscription=function(e){i()(e.emitter===this,"Subscription does not belong to this emitter."),this._subscriber.removeSubscription(e)},t.listenerCount=function(e){var t=this._subscriber.getSubscriptionsForType(e);return t?t.filter(l).length:0},t.emit=function(e){var t=this._subscriber.getSubscriptionsForType(e);if(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=0,a=t.length;o<a;o++){var s=t[o];s&&s.listener&&s.listener.apply(s.context,r)}}},t.removeListener=function(e,t){console.error("EventEmitter.removeListener('"+e+"', ...): Method has been deprecated. Please instead use `remove()` on the subscription returned by `EventEmitter.addListener`.");var n=this._subscriber.getSubscriptionsForType(e);if(n)for(var r=0,i=n.length;r<i;r++){var o=n[r];o&&o.listener===t&&o.remove()}},e}();t.a=new c},function(e,t,n){"use strict";var r=n(184);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i,o=r(n(19)),a=r(n(17)),s=r(n(0)),l=n(159),c=r(n(360)),u=s.default.forwardRef((function(e,t){var n=l.StyleSheet.compose(i.slider,e.style),r=e.onValueChange,u=e.onSlidingStart,h=e.onSlidingComplete,d=(0,a.default)(e,["onValueChange","onSlidingStart","onSlidingComplete"]),f=r?function(e){var t=!0;"android"===l.Platform.OS&&(t=null!=e.nativeEvent.fromUser&&e.nativeEvent.fromUser),t&&r(e.nativeEvent.value)}:null,p=f,m=u?function(e){u(e.nativeEvent.value)}:null,g=h?function(e){h(e.nativeEvent.value)}:null;return s.default.createElement(c.default,(0,o.default)({},d,{thumbImage:"web"===l.Platform.OS?e.thumbImage:l.Image.resolveAssetSource(e.thumbImage),ref:t,style:n,onChange:p,onRNCSliderSlidingStart:m,onRNCSliderSlidingComplete:g,onRNCSliderValueChange:f,enabled:!e.disabled,onStartShouldSetResponder:function(){return!0},onResponderTerminationRequest:function(){return!1},__source:{fileName:"/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/Slider.js",lineNumber:270}}))}));u.defaultProps={disabled:!1,value:0,minimumValue:0,maximumValue:1,step:0,inverted:!1},i="ios"===l.Platform.OS?l.StyleSheet.create({slider:{height:40}}):l.StyleSheet.create({slider:{}});var h=u;t.default=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(55);function o(){var e=r.useContext(i.a);if(void 0===e)throw new Error("Couldn't find a navigation object. Is your component inside a screen in a navigator?");return e}},function(e,t,n){"use strict";var r=function e(t,n,r){if(void 0===r&&(r=-1),0===r)return!0;if(t===n)return!1;if("function"===typeof t&&"function"===typeof n)return!1;if("object"!==typeof t||null===t)return t!==n;if("object"!==typeof n||null===n)return!0;if(t.constructor!==n.constructor)return!0;if(Array.isArray(t)){var i=t.length;if(n.length!==i)return!0;for(var o=0;o<i;o++)if(e(t[o],n[o],r-1))return!0}else{for(var a in t)if(e(t[a],n[a],r-1))return!0;for(var s in n)if(void 0===t[s]&&void 0!==n[s])return!0}return!1},i=n(0),o=n(5),a=n(2),s=n(76),l=n(4),c=n.n(l);function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=f(f({},s.a.defaultProps),{},{numColumns:1}),g=function(e){var t,n;n=e,(t=d).prototype=Object.create(n.prototype),t.prototype.constructor=t,h(t,n);var l=d.prototype;function d(t){var n;return(n=e.call(this,t)||this)._virtualizedListPairs=[],n._captureRef=function(e){n._listRef=e},n._getItem=function(e,t){var r=n.props.numColumns;if(r>1){for(var i=[],o=0;o<r;o++){var a=e[t*r+o];null!=a&&i.push(a)}return i}return e[t]},n._getItemCount=function(e){if(e){var t=n.props.numColumns;return t>1?Math.ceil(e.length/t):e.length}return 0},n._keyExtractor=function(e,t){var r=n.props,i=r.keyExtractor,o=r.numColumns;return o>1?(c()(Array.isArray(e),"FlatList: Encountered internal consistency error, expected each item to consist of an array with 1-%s columns; instead, received a single item.",o),e.map((function(e,n){return i(e,t*o+n)})).join(":")):i(e,t)},n._renderer=function(){var e,t=n.props,r=t.ListItemComponent,s=t.renderItem,l=t.numColumns,u=t.columnWrapperStyle,h=function(e){return r?i.createElement(r,e):s?s(e):null};return(e={})[r?"ListItemComponent":"renderItem"]=function(e){if(l>1){var t=e.item,n=e.index;return c()(Array.isArray(t),"Expected array of items with numColumns > 1"),i.createElement(a.a,{style:o.a.compose(v.row,u)},t.map((function(t,r){var o=h({item:t,index:n*l+r,separators:e.separators});return null!=o?i.createElement(i.Fragment,{key:r},o):null})))}return h(e)},e},n._checkProps(n.props),n.props.viewabilityConfigCallbackPairs?n._virtualizedListPairs=n.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityConfig:e.viewabilityConfig,onViewableItemsChanged:n._createOnViewableItemsChanged(e.onViewableItemsChanged)}})):n.props.onViewableItemsChanged&&n._virtualizedListPairs.push({viewabilityConfig:n.props.viewabilityConfig,onViewableItemsChanged:n._createOnViewableItemsChanged(n.props.onViewableItemsChanged)}),n}return l.scrollToEnd=function(e){this._listRef&&this._listRef.scrollToEnd(e)},l.scrollToIndex=function(e){this._listRef&&this._listRef.scrollToIndex(e)},l.scrollToItem=function(e){this._listRef&&this._listRef.scrollToItem(e)},l.scrollToOffset=function(e){this._listRef&&this._listRef.scrollToOffset(e)},l.recordInteraction=function(){this._listRef&&this._listRef.recordInteraction()},l.flashScrollIndicators=function(){this._listRef&&this._listRef.flashScrollIndicators()},l.getScrollResponder=function(){if(this._listRef)return this._listRef.getScrollResponder()},l.getNativeScrollRef=function(){if(this._listRef)return this._listRef.getScrollRef()},l.getScrollableNode=function(){if(this._listRef)return this._listRef.getScrollableNode()},l.setNativeProps=function(e){this._listRef&&this._listRef.setNativeProps(e)},l.componentDidUpdate=function(e){c()(e.numColumns===this.props.numColumns,"Changing numColumns on the fly is not supported. Change the key prop on FlatList when changing the number of columns to force a fresh render of the component."),c()(e.onViewableItemsChanged===this.props.onViewableItemsChanged,"Changing onViewableItemsChanged on the fly is not supported"),c()(!r(e.viewabilityConfig,this.props.viewabilityConfig),"Changing viewabilityConfig on the fly is not supported"),c()(e.viewabilityConfigCallbackPairs===this.props.viewabilityConfigCallbackPairs,"Changing viewabilityConfigCallbackPairs on the fly is not supported"),this._checkProps(this.props)},l._checkProps=function(e){var t=e.getItem,n=e.getItemCount,r=e.horizontal,i=e.numColumns,o=e.columnWrapperStyle,a=e.onViewableItemsChanged,s=e.viewabilityConfigCallbackPairs;c()(!t&&!n,"FlatList does not support custom data formats."),i>1?c()(!r,"numColumns does not support horizontal."):c()(!o,"columnWrapperStyle not supported for single column lists"),c()(!(a&&s),"FlatList does not support setting both onViewableItemsChanged and viewabilityConfigCallbackPairs.")},l._pushMultiColumnViewable=function(e,t){var n=this.props,r=n.numColumns,i=n.keyExtractor;t.item.forEach((function(n,o){c()(null!=t.index,"Missing index!");var a=t.index*r+o;e.push(f(f({},t),{},{item:n,key:i(n,a),index:a}))}))},l._createOnViewableItemsChanged=function(e){var t=this;return function(n){var r=t.props.numColumns;if(e)if(r>1){var i=[],o=[];n.viewableItems.forEach((function(e){return t._pushMultiColumnViewable(o,e)})),n.changed.forEach((function(e){return t._pushMultiColumnViewable(i,e)})),e({viewableItems:o,changed:i})}else e(n)}},l.render=function(){var e=this.props,t=(e.numColumns,e.columnWrapperStyle,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["numColumns","columnWrapperStyle"]));return i.createElement(s.a,u({},t,{getItem:this._getItem,getItemCount:this._getItemCount,keyExtractor:this._keyExtractor,ref:this._captureRef,viewabilityConfigCallbackPairs:this._virtualizedListPairs},this._renderer()))},d}(i.PureComponent);g.defaultProps=m;var v=o.a.create({row:{flexDirection:"row"}}),y=g;t.a=y},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(!0!==t[r]&&0!==r.indexOf("aria-")||(n[r]=e[r]));return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(28),i=n(129),o=n(106),a=n(0);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u={};function h(e){var t=e.classList,n=e.pointerEvents,s=e.style,c=Object(a.useRef)(null),h=Object(a.useRef)(null);return h.current={classList:t,pointerEvents:n,style:s},Object(o.a)((function(){return function(e){null!=e&&(e.measure=function(t){return r.a.measure(e,t)},e.measureLayout=function(t,n,i){return r.a.measureLayout(e,t,i,n)},e.measureInWindow=function(t){return r.a.measureInWindow(e,t)},e.setNativeProps=function(t){var n=h.current||u,o=n.classList,a=n.style,s=n.pointerEvents;!function(e,t,n,o,a,s){if(null!=e&&t){var c=Object(i.a)(null,l(l({pointerEvents:o},t),{},{classList:[n,t.className],style:[a,t.style]})),u=c.style;if(null!=s.current)for(var h in null==c.style&&(c.style={}),s.current)null==c.style[h]&&(c.style[h]="");s.current=u,r.a.updateView(e,c)}}(e,t,o,s,a,c)})}}))}},function(e,t,n){"use strict";var r=n(42);n.o(r,"StackActions")&&n.d(t,"StackActions",(function(){return r.StackActions})),n.o(r,"StackRouter")&&n.d(t,"StackRouter",(function(){return r.StackRouter}));var i=n(188);n.d(t,"BaseNavigationContainer",(function(){return i.a}));var o=n(189);n.d(t,"createNavigatorFactory",(function(){return o.a}));var a=n(190);n.d(t,"NavigationHelpersContext",(function(){return a.a}));var s=n(55);n.d(t,"NavigationContext",(function(){return s.a}));var l=n(44);n.d(t,"NavigationRouteContext",(function(){return l.a}));n(124);var c=n(218);n.d(t,"useNavigationBuilder",(function(){return c.a}));var u=n(70);n.d(t,"useNavigation",(function(){return u.a}));n(191),n(192),n(193),n(194);var h=n(195);n.d(t,"getStateFromPath",(function(){return h.a}));var d=n(200);n.d(t,"getPathFromState",(function(){return d.a}));var f=n(201);n.d(t,"getActionFromState",(function(){return f.a}));n(202),n(86)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r="ERROR",i=Object.freeze({NOT_RESPONDER:{DELAY:r,RESPONDER_GRANT:"RESPONDER_INACTIVE_PRESS_START",RESPONDER_RELEASE:r,RESPONDER_TERMINATED:r,LONG_PRESS_DETECTED:r},RESPONDER_INACTIVE_PRESS_START:{DELAY:"RESPONDER_ACTIVE_PRESS_START",RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:r},RESPONDER_ACTIVE_PRESS_START:{DELAY:r,RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"RESPONDER_ACTIVE_LONG_PRESS_START"},RESPONDER_ACTIVE_LONG_PRESS_START:{DELAY:r,RESPONDER_GRANT:r,RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"RESPONDER_ACTIVE_LONG_PRESS_START"},ERROR:{DELAY:"NOT_RESPONDER",RESPONDER_GRANT:"RESPONDER_INACTIVE_PRESS_START",RESPONDER_RELEASE:"NOT_RESPONDER",RESPONDER_TERMINATED:"NOT_RESPONDER",LONG_PRESS_DETECTED:"NOT_RESPONDER"}}),o=function(e){return"RESPONDER_ACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_LONG_PRESS_START"===e},a=function(e){return"button"===e.getAttribute("role")},s=function(e){return"RESPONDER_INACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_PRESS_START"===e||"RESPONDER_ACTIVE_LONG_PRESS_START"===e},l=function(){function e(e){this._eventHandlers=null,this._isPointerTouch=!1,this._longPressDelayTimeout=null,this._longPressDispatched=!1,this._pressDelayTimeout=null,this._pressOutDelayTimeout=null,this._touchState="NOT_RESPONDER",this.configure(e)}var t=e.prototype;return t.configure=function(e){this._config=e},t.reset=function(){this._cancelLongPressDelayTimeout(),this._cancelPressDelayTimeout(),this._cancelPressOutDelayTimeout()},t.getEventHandlers=function(){return null==this._eventHandlers&&(this._eventHandlers=this._createEventHandlers()),this._eventHandlers},t._createEventHandlers=function(){var e=this,t=function(t,n){t.persist(),e._cancelPressOutDelayTimeout(),e._longPressDispatched=!1,e._selectionTerminated=!1,e._touchState="NOT_RESPONDER",e._isPointerTouch="touchstart"===t.nativeEvent.type,e._receiveSignal("RESPONDER_GRANT",t);var r=c(e._config.delayPressStart,0,50);!1!==n&&r>0?e._pressDelayTimeout=setTimeout((function(){e._receiveSignal("DELAY",t)}),r):e._receiveSignal("DELAY",t);var i=c(e._config.delayLongPress,10,450);e._longPressDelayTimeout=setTimeout((function(){e._handleLongPress(t)}),i+r)},n=function(t){e._receiveSignal("RESPONDER_RELEASE",t)},r=function t(r){"NOT_RESPONDER"!==e._touchState&&(n(r),document.removeEventListener("keyup",t))};return{onStartShouldSetResponder:function(t){var n=e._config.disabled;return n&&a(t.currentTarget)&&t.stopPropagation(),null==n||!n},onKeyDown:function(n){(function(e){var t=e.key,n=e.currentTarget.getAttribute("role"),r=" "===t||"Spacebar"===t;return!e.repeat&&("Enter"===t||r&&("button"===n||"menuitem"===n))})(n)&&("NOT_RESPONDER"===e._touchState&&(t(n,!1),document.addEventListener("keyup",r)),n.stopPropagation())},onResponderGrant:function(e){return t(e)},onResponderMove:function(t){null!=e._config.onPressMove&&e._config.onPressMove(t);var n=u(t);if(null!=e._touchActivatePosition){var r=e._touchActivatePosition.pageX-n.pageX,i=e._touchActivatePosition.pageY-n.pageY;Math.hypot(r,i)>10&&e._cancelLongPressDelayTimeout()}},onResponderRelease:function(e){return n(e)},onResponderTerminate:function(t){"selectionchange"===t.nativeEvent.type&&(e._selectionTerminated=!0),e._receiveSignal("RESPONDER_TERMINATED",t)},onResponderTerminationRequest:function(t){var n=e._config,r=n.cancelable,i=n.disabled,o=n.onLongPress;return!(!i&&null!=o&&e._isPointerTouch&&"contextmenu"===t.nativeEvent.type)&&(null==r||r)},onClick:function(t){var n=e._config,r=n.disabled,i=n.onPress;r?a(t.currentTarget)&&t.stopPropagation():(t.stopPropagation(),e._longPressDispatched||e._selectionTerminated?t.preventDefault():null!=i&&!1===t.altKey&&i(t))},onContextMenu:function(t){var n=e._config,r=n.disabled,i=n.onLongPress;r?a(t.currentTarget)&&t.stopPropagation():null!=i&&e._isPointerTouch&&!t.defaultPrevented&&(t.preventDefault(),t.stopPropagation())}}},t._receiveSignal=function(e,t){var n=this._touchState,o=null;null!=i[n]&&(o=i[n][e]),"NOT_RESPONDER"===this._touchState&&"RESPONDER_RELEASE"===e||(null==o||o===r?console.error("PressResponder: Invalid signal "+e+" for state "+n+" on responder"):n!==o&&(this._performTransitionSideEffects(n,o,e,t),this._touchState=o))},t._performTransitionSideEffects=function(e,t,n,r){if(function(e){return"RESPONDER_TERMINATED"===e||"RESPONDER_RELEASE"===e}(n)&&(this._isPointerTouch=!1,this._touchActivatePosition=null,this._cancelLongPressDelayTimeout()),s(e)&&"LONG_PRESS_DETECTED"===n){var i=this._config.onLongPress;null!=i&&null==r.nativeEvent.key&&(i(r),this._longPressDispatched=!0)}var a=o(e),l=o(t);if(!a&&l?this._activate(r):a&&!l&&this._deactivate(r),s(e)&&"RESPONDER_RELEASE"===n){var c=this._config,u=c.onLongPress;if(null!=c.onPress)null!=u&&"RESPONDER_ACTIVE_LONG_PRESS_START"===e||l||a||(this._activate(r),this._deactivate(r))}this._cancelPressDelayTimeout()},t._activate=function(e){var t=this._config,n=t.onPressChange,r=t.onPressStart,i=u(e);this._touchActivatePosition={pageX:i.pageX,pageY:i.pageY},null!=r&&r(e),null!=n&&n(!0)},t._deactivate=function(e){var t=this._config,n=t.onPressChange,r=t.onPressEnd;function i(){null!=r&&r(e),null!=n&&n(!1)}var o=c(this._config.delayPressEnd);o>0?this._pressOutDelayTimeout=setTimeout((function(){i()}),o):i()},t._handleLongPress=function(e){"RESPONDER_ACTIVE_PRESS_START"!==this._touchState&&"RESPONDER_ACTIVE_LONG_PRESS_START"!==this._touchState||this._receiveSignal("LONG_PRESS_DETECTED",e)},t._cancelLongPressDelayTimeout=function(){null!=this._longPressDelayTimeout&&(clearTimeout(this._longPressDelayTimeout),this._longPressDelayTimeout=null)},t._cancelPressDelayTimeout=function(){null!=this._pressDelayTimeout&&(clearTimeout(this._pressDelayTimeout),this._pressDelayTimeout=null)},t._cancelPressOutDelayTimeout=function(){null!=this._pressOutDelayTimeout&&(clearTimeout(this._pressOutDelayTimeout),this._pressOutDelayTimeout=null)},e}();function c(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),Math.max(t,null!==e&&void 0!==e?e:n)}function u(e){var t=e.nativeEvent,n=t.changedTouches,r=t.touches;return null!=r&&r.length>0?r[0]:null!=n&&n.length>0?n[0]:e.nativeEvent}var h=n(0);function d(e,t){var n=Object(h.useRef)(null);null==n.current&&(n.current=new l(t));var r=n.current;return Object(h.useEffect)((function(){r.configure(t)}),[t,r]),Object(h.useEffect)((function(){return function(){r.reset()}}),[r]),Object(h.useDebugValue)(t),r.getEventHandlers()}},function(e,t,n){"use strict";var r=n(51),i=function(){function e(e,t){this._delay=t,this._callback=e}var t=e.prototype;return t.dispose=function(e){void 0===e&&(e={abort:!1}),this._taskHandle&&(this._taskHandle.cancel(),e.abort||this._callback(),this._taskHandle=null)},t.schedule=function(){var e=this;if(!this._taskHandle){var t=setTimeout((function(){e._taskHandle=r.a.runAfterInteractions((function(){e._taskHandle=null,e._callback()}))}),this._delay);this._taskHandle={cancel:function(){return clearTimeout(t)}}}},e}(),o=n(243),a=(n(1),n(0)),s=n(117),l=n(49),c=n(5),u=n(2),h=n(4),d=n.n(h);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n,r,i,o){if(function(e,t,n){return e>=0&&t<=n&&t>e}(n,r,i))return!0;var a=function(e,t,n){var r=Math.min(t,n)-Math.max(e,0);return Math.max(0,r)}(n,r,i);return 100*(e?a/i:a/o)>=t}var b=function(){function e(e){void 0===e&&(e={viewAreaCoveragePercentThreshold:0}),this._hasInteracted=!1,this._timers=new Set,this._viewableIndices=[],this._viewableItems=new Map,this._config=e}var t=e.prototype;return t.dispose=function(){this._timers.forEach(clearTimeout)},t.computeViewableItems=function(e,t,n,r,i){var o=this._config,a=o.itemVisiblePercentThreshold,s=o.viewAreaCoveragePercentThreshold,l=null!=s,c=l?s:a;d()(null!=c&&null!=a!==(null!=s),"Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold");var u=[];if(0===e)return u;var h=-1,f=i||{first:0,last:e-1},p=f.first,m=f.last;if(m>=e)return console.warn("Invalid render range computing viewability "+JSON.stringify({renderRange:i,itemCount:e})),[];for(var g=p;g<=m;g++){var v=r(g);if(v){var b=v.offset-t,w=b+v.length;if(b<n&&w>0)h=g,y(l,c,b,w,n,v.length)&&u.push(g);else if(h>=0)break}}return u},t.onUpdate=function(e,t,n,r,i,o,a){var s=this;if((!this._config.waitForInteraction||this._hasInteracted)&&0!==e&&r(0)){var l=[];if(e&&(l=this.computeViewableItems(e,t,n,r,a)),this._viewableIndices.length!==l.length||!this._viewableIndices.every((function(e,t){return e===l[t]})))if(this._viewableIndices=l,this._config.minimumViewTime){var c=setTimeout((function(){s._timers.delete(c),s._onUpdateSync(l,o,i)}),this._config.minimumViewTime);this._timers.add(c)}else this._onUpdateSync(l,o,i)}},t.resetViewableIndices=function(){this._viewableIndices=[]},t.recordInteraction=function(){this._hasInteracted=!0},t._onUpdateSync=function(e,t,n){var r=this;e=e.filter((function(e){return r._viewableIndices.includes(e)}));for(var i,o=this._viewableItems,a=new Map(e.map((function(e){var t=n(e,!0);return[t.key,t]}))),s=[],l=g(a);!(i=l()).done;){var c=i.value,u=c[0],h=c[1];o.has(u)||s.push(h)}for(var d,f=g(o);!(d=f()).done;){var m=d.value,v=m[0],y=m[1];a.has(v)||s.push(p(p({},y),{},{isViewable:!1}))}s.length>0&&(this._viewableItems=a,t({viewableItems:Array.from(a.values()),changed:s,viewabilityConfig:this._config}))},e}(),w=n(46);var x=function(){var e;return(e=console).log.apply(e,arguments)};n(161);function _(e,t,n){for(var r=[],i=0,o=0;o<t;o++)for(var a=n(o),s=a.offset+a.length,l=0;l<e.length;l++)if(null==r[l]&&s>=e[l]&&(r[l]=o,i++,l===e.length-1))return d()(i===e.length,"bad offsets input, should be in increasing order: %s",JSON.stringify(e)),r;return r}function E(e,t){return t.last-t.first+1-Math.max(0,1+Math.min(t.last,e.last)-Math.max(t.first,e.first))}function A(e,t,n,r){var i=e.data,o=e.getItemCount,a=e.maxToRenderPerBatch,s=e.windowSize,l=o(i);if(0===l)return t;var c=r.offset,u=r.velocity,h=r.visibleLength,d=Math.max(0,c),f=d+h,p=(s-1)*h,m=u>1?"after":u<-1?"before":"none",g=Math.max(0,d-.5*p),v=Math.max(0,f+.5*p);if(n(l-1).offset<g)return{first:Math.max(0,l-1-a),last:l-1};var y=_([g,d,f,v],e.getItemCount(e.data),n),b=y[0],w=y[1],x=y[2],A=y[3];b=null==b?0:b,A=null==A?l-1:A;for(var S={first:w=null==w?Math.max(0,b):w,last:x=null==x?Math.min(A,w+a-1):x},M=E(t,S);!(w<=b&&x>=A);){var T=M>=a,C=w<=t.first||w>t.last,O=w>b&&(!T||!C),R=x>=t.last||x<t.first,k=x<A&&(!T||!R);if(T&&!O&&!k)break;!O||"after"===m&&k&&R||(C&&M++,w--),!k||"before"===m&&O&&C||(R&&M++,x++)}if(!(x>=w&&w>=0&&x<l&&w>=b&&x<=A&&w<=S.first&&x>=S.last))throw new Error("Bad window calculation "+JSON.stringify({first:w,last:x,itemCount:l,overscanFirst:b,overscanLast:A,visible:S}));return{first:w,last:x}}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){T(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=a.createContext(null);function O(e){var t=e.children,n=e.value,r=Object(a.useMemo)((function(){return{cellKey:null,getScrollMetrics:n.getScrollMetrics,horizontal:n.horizontal,getOutermostParentListRef:n.getOutermostParentListRef,getNestedChildState:n.getNestedChildState,registerAsNestedChild:n.registerAsNestedChild,unregisterAsNestedChild:n.unregisterAsNestedChild,debugInfo:{cellKey:n.debugInfo.cellKey,horizontal:n.debugInfo.horizontal,listKey:n.debugInfo.listKey,parent:n.debugInfo.parent}}}),[n.getScrollMetrics,n.horizontal,n.getOutermostParentListRef,n.getNestedChildState,n.registerAsNestedChild,n.unregisterAsNestedChild,n.debugInfo.cellKey,n.debugInfo.horizontal,n.debugInfo.listKey,n.debugInfo.parent]);return a.createElement(C.Provider,{value:r},t)}function R(e){var t=e.cellKey,n=e.children,r=Object(a.useContext)(C);return a.createElement(C.Provider,{value:null==r?null:M(M({},r),{},{cellKey:t})},n)}function k(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L(){return(L=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,B(e,t)}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}c.a.flatten;var F=!1,z="",H=function(e){j(n,e);var t=n.prototype;function n(t){var n;if((n=e.call(this,t)||this)._getScrollMetrics=function(){return n._scrollMetrics},n._getOutermostParentListRef=function(){return n._isNestedWithSameOrientation()?n.context.getOutermostParentListRef():function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)},n._getNestedChildState=function(e){var t=n._nestedChildLists.get(e);return t&&t.state},n._registerAsNestedChild=function(e){var t=n._cellKeysToChildListKeys.get(e.cellKey)||new Set;t.add(e.key),n._cellKeysToChildListKeys.set(e.cellKey,t);var r=n._nestedChildLists.get(e.key);r&&null!==r.ref&&console.error("A VirtualizedList contains a cell which itself contains more than one VirtualizedList of the same orientation as the parent list. You must pass a unique listKey prop to each sibling list.\n\n"+function(e){var t="VirtualizedList trace:\n Child ("+(e.horizontal?"horizontal":"vertical")+"):\n listKey: "+e.key+"\n cellKey: "+e.cellKey,n=e.parentDebugInfo;for(;n;)t+="\n Parent ("+(n.horizontal?"horizontal":"vertical")+"):\n listKey: "+n.listKey+"\n cellKey: "+n.cellKey,n=n.parent;return t}(I(I({},e),{},{horizontal:!!e.ref.props.horizontal}))),n._nestedChildLists.set(e.key,{ref:e.ref,state:null}),n._hasInteracted&&e.ref.recordInteraction()},n._unregisterAsNestedChild=function(e){n._nestedChildLists.set(e.key,{ref:null,state:e.state})},n._onUpdateSeparators=function(e,t){e.forEach((function(e){var r=null!=e&&n._cellRefs[e];r&&r.updateSeparatorProps(t)}))},n._averageCellLength=0,n._cellKeysToChildListKeys=new Map,n._cellRefs={},n._frames={},n._footerLength=0,n._hasDoneInitialScroll=!1,n._hasInteracted=!1,n._hasMore=!1,n._hasWarned={},n._headerLength=0,n._hiPriInProgress=!1,n._highestMeasuredFrameIndex=0,n._indicesToKeys=new Map,n._nestedChildLists=new Map,n._offsetFromParentVirtualizedList=0,n._prevParentOffset=0,n._scrollMetrics={contentLength:0,dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0},n._scrollRef=null,n._sentEndForContentLength=0,n._totalCellLength=0,n._totalCellsMeasured=0,n._viewabilityTuples=[],n._captureScrollRef=function(e){n._scrollRef=e},n._defaultRenderScrollComponent=function(e){var t=e.onRefresh;return n._isNestedWithSameOrientation()?a.createElement(u.a,e):t?(d()("boolean"===typeof e.refreshing,"`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `"+JSON.stringify(e.refreshing)+"`"),a.createElement(l.a,L({},e,{refreshControl:null==e.refreshControl?a.createElement(s.a,{refreshing:e.refreshing,onRefresh:t,progressViewOffset:e.progressViewOffset}):e.refreshControl}))):a.createElement(l.a,e)},n._onCellUnmount=function(e){var t=n._frames[e];t&&(n._frames[e]=I(I({},t),{},{inLayout:!1}))},n._onLayout=function(e){n._isNestedWithSameOrientation()?n.measureLayoutRelativeToContainingList():n._scrollMetrics.visibleLength=n._selectLength(e.nativeEvent.layout),n.props.onLayout&&n.props.onLayout(e),n._scheduleCellsToRenderUpdate(),n._maybeCallOnEndReached()},n._onLayoutEmpty=function(e){n.props.onLayout&&n.props.onLayout(e)},n._onLayoutFooter=function(e){n._triggerRemeasureForChildListsInCell(n._getFooterCellKey()),n._footerLength=n._selectLength(e.nativeEvent.layout)},n._onLayoutHeader=function(e){n._headerLength=n._selectLength(e.nativeEvent.layout)},n._onContentSizeChange=function(e,t){e>0&&t>0&&null!=n.props.initialScrollIndex&&n.props.initialScrollIndex>0&&!n._hasDoneInitialScroll&&(n._hasDoneInitialScroll=!0),n.props.onContentSizeChange&&n.props.onContentSizeChange(e,t),n._scrollMetrics.contentLength=n._selectLength({height:t,width:e}),n._scheduleCellsToRenderUpdate(),n._maybeCallOnEndReached()},n._convertParentScrollMetrics=function(e){var t=e.offset-n._offsetFromParentVirtualizedList,r=e.visibleLength,i=t-n._scrollMetrics.offset;return{visibleLength:r,contentLength:n._scrollMetrics.contentLength,offset:t,dOffset:i}},n._onScroll=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScroll(e)})),n.props.onScroll&&n.props.onScroll(e);var t=e.timeStamp,r=n._selectLength(e.nativeEvent.layoutMeasurement),i=n._selectLength(e.nativeEvent.contentSize),o=n._selectOffset(e.nativeEvent.contentOffset),a=o-n._scrollMetrics.offset;if(n._isNestedWithSameOrientation()){if(0===n._scrollMetrics.contentLength)return;var s=n._convertParentScrollMetrics({visibleLength:r,offset:o});r=s.visibleLength,i=s.contentLength,o=s.offset,a=s.dOffset}var l=n._scrollMetrics.timestamp?Math.max(1,t-n._scrollMetrics.timestamp):1,c=a/l;l>500&&n._scrollMetrics.dt>500&&i>5*r&&!n._hasWarned.perf&&(x("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:l,prevDt:n._scrollMetrics.dt,contentLength:i}),n._hasWarned.perf=!0),n._scrollMetrics={contentLength:i,dt:l,dOffset:a,offset:o,timestamp:t,velocity:c,visibleLength:r},n._updateViewableItems(n.props.data),n.props&&(n._maybeCallOnEndReached(),0!==c&&n._fillRateHelper.activate(),n._computeBlankness(),n._scheduleCellsToRenderUpdate())},n._onScrollBeginDrag=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScrollBeginDrag(e)})),n._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),n._hasInteracted=!0,n.props.onScrollBeginDrag&&n.props.onScrollBeginDrag(e)},n._onScrollEndDrag=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onScrollEndDrag(e)}));var t=e.nativeEvent.velocity;t&&(n._scrollMetrics.velocity=n._selectOffset(t)),n._computeBlankness(),n.props.onScrollEndDrag&&n.props.onScrollEndDrag(e)},n._onMomentumScrollBegin=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onMomentumScrollBegin(e)})),n.props.onMomentumScrollBegin&&n.props.onMomentumScrollBegin(e)},n._onMomentumScrollEnd=function(e){n._nestedChildLists.forEach((function(t){t.ref&&t.ref._onMomentumScrollEnd(e)})),n._scrollMetrics.velocity=0,n._computeBlankness(),n.props.onMomentumScrollEnd&&n.props.onMomentumScrollEnd(e)},n._updateCellsToRender=function(){var e=n.props,t=e.data,r=e.getItemCount,i=e.onEndReachedThreshold,o=n._isVirtualizationDisabled();n._updateViewableItems(t),t&&n.setState((function(e){var a,s=n._scrollMetrics,l=s.contentLength,c=s.offset,u=s.visibleLength;if(o){var h=l-u-c<i*u?n.props.maxToRenderPerBatch:0;a={first:0,last:Math.min(e.last+h,r(t)-1)}}else u>0&&l>0&&(n.props.initialScrollIndex&&!n._scrollMetrics.offset||(a=A(n.props,e,n._getFrameMetricsApprox,n._scrollMetrics)));if(a&&n._nestedChildLists.size>0)for(var d=a.first,f=a.last,p=d;p<=f;p++){var m=n._indicesToKeys.get(p),g=m&&n._cellKeysToChildListKeys.get(m);if(g){for(var v,y=!1,b=k(g);!(v=b()).done;){var w=v.value,x=n._nestedChildLists.get(w);if(x&&x.ref&&x.ref.hasMore()){y=!0;break}}if(y&&a){a.last=p;break}}}return null!=a&&a.first===e.first&&a.last===e.last&&(a=null),a}))},n._createViewToken=function(e,t){var r=n.props,i=r.data,o=r.getItem,a=r.keyExtractor,s=o(i,e);return{index:e,item:s,key:a(s,e),isViewable:t}},n._getFrameMetricsApprox=function(e){var t=n._getFrameMetrics(e);if(t&&t.index===e)return t;var r=n.props.getItemLayout;return d()(!r,"Should not have to estimate frames when a measurement metrics function is provided"),{length:n._averageCellLength,offset:n._averageCellLength*e}},n._getFrameMetrics=function(e){var t=n.props,r=t.data,i=t.getItem,o=t.getItemCount,a=t.getItemLayout,s=t.keyExtractor;d()(o(r)>e,"Tried to get frame for out of range index "+e);var l=i(r,e),c=l&&n._frames[s(l,e)];return c&&c.index===e||a&&(c=a(r,e)),c},d()(!t.onScroll||!t.onScroll.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),d()(t.windowSize>0,"VirtualizedList: The windowSize prop must be present and set to a value greater than 0."),n._fillRateHelper=new o.a(n._getFrameMetrics),n._updateCellsToRenderBatcher=new i(n._updateCellsToRender,n.props.updateCellsBatchingPeriod),n.props.viewabilityConfigCallbackPairs)n._viewabilityTuples=n.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityHelper:new b(e.viewabilityConfig),onViewableItemsChanged:e.onViewableItemsChanged}}));else if(n.props.onViewableItemsChanged){var r=n.props.onViewableItemsChanged;n._viewabilityTuples.push({viewabilityHelper:new b(n.props.viewabilityConfig),onViewableItemsChanged:r})}var c={first:n.props.initialScrollIndex||0,last:Math.min(n.props.getItemCount(n.props.data),(n.props.initialScrollIndex||0)+n.props.initialNumToRender)-1};if(n._isNestedWithSameOrientation()){var h=n.context.getNestedChildState(n._getListKey());h&&(c=h,n.state=h,n._frames=h.frames)}return n.state=c,n}return t.scrollToEnd=function(e){var t=!e||e.animated,n=this.props.getItemCount(this.props.data)-1,r=this._getFrameMetricsApprox(n),i=Math.max(0,r.offset+r.length+this._footerLength-this._scrollMetrics.visibleLength);null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(this.props.horizontal?{x:i,animated:t}:{y:i,animated:t}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.scrollToIndex=function(e){var t=this.props,n=t.data,r=t.horizontal,i=t.getItemCount,o=t.getItemLayout,a=t.onScrollToIndexFailed,s=e.animated,l=e.index,c=e.viewOffset,u=e.viewPosition;if(d()(l>=0,"scrollToIndex out of range: requested index "+l+" but minimum is 0"),d()(i(n)>=1,"scrollToIndex out of range: item length "+i(n)+" but minimum is 1"),d()(l<i(n),"scrollToIndex out of range: requested index "+l+" is out of 0 to "+(i(n)-1)),!o&&l>this._highestMeasuredFrameIndex)return d()(!!a,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void a({averageItemLength:this._averageCellLength,highestMeasuredFrameIndex:this._highestMeasuredFrameIndex,index:l});var h=this._getFrameMetricsApprox(l),f=Math.max(0,h.offset-(u||0)*(this._scrollMetrics.visibleLength-h.length))-(c||0);null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(r?{x:f,animated:s}:{y:f,animated:s}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.scrollToItem=function(e){for(var t=e.item,n=this.props,r=n.data,i=n.getItem,o=(0,n.getItemCount)(r),a=0;a<o;a++)if(i(r,a)===t){this.scrollToIndex(I(I({},e),{},{index:a}));break}},t.scrollToOffset=function(e){var t=e.animated,n=e.offset;null!=this._scrollRef&&(null!=this._scrollRef.scrollTo?this._scrollRef.scrollTo(this.props.horizontal?{x:n,animated:t}:{y:n,animated:t}):console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo."))},t.recordInteraction=function(){this._nestedChildLists.forEach((function(e){e.ref&&e.ref.recordInteraction()})),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),this._updateViewableItems(this.props.data)},t.flashScrollIndicators=function(){null!=this._scrollRef&&this._scrollRef.flashScrollIndicators()},t.getScrollResponder=function(){if(this._scrollRef&&this._scrollRef.getScrollResponder)return this._scrollRef.getScrollResponder()},t.getScrollableNode=function(){return this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode():Object(w.a)(this._scrollRef)},t.getScrollRef=function(){return this._scrollRef&&this._scrollRef.getScrollRef?this._scrollRef.getScrollRef():this._scrollRef},t.setNativeProps=function(e){this._scrollRef&&this._scrollRef.setNativeProps(e)},t._getCellKey=function(){var e;return(null==(e=this.context)?void 0:e.cellKey)||"rootList"},t._getListKey=function(){return this.props.listKey||this._getCellKey()},t._getDebugInfo=function(){var e;return{listKey:this._getListKey(),cellKey:this._getCellKey(),horizontal:!!this.props.horizontal,parent:null==(e=this.context)?void 0:e.debugInfo}},t.hasMore=function(){return this._hasMore},t.componentDidMount=function(){this._isNestedWithSameOrientation()&&this.context.registerAsNestedChild({cellKey:this._getCellKey(),key:this._getListKey(),ref:this,parentDebugInfo:this.context.debugInfo})},t.componentWillUnmount=function(){this._isNestedWithSameOrientation()&&this.context.unregisterAsNestedChild({key:this._getListKey(),state:{first:this.state.first,last:this.state.last,frames:this._frames}}),this._updateViewableItems(null),this._updateCellsToRenderBatcher.dispose({abort:!0}),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.dispose()})),this._fillRateHelper.deactivateAndFlush()},n.getDerivedStateFromProps=function(e,t){var n=e.data,r=e.getItemCount,i=e.maxToRenderPerBatch;return{first:Math.max(0,Math.min(t.first,r(n)-1-i)),last:Math.max(0,Math.min(t.last,r(n)-1))}},t._pushCells=function(e,t,n,r,i,o){var s,l=this,c=this.props,u=c.CellRendererComponent,h=c.ItemSeparatorComponent,d=c.data,f=c.getItem,p=c.getItemCount,m=c.horizontal,g=c.keyExtractor,v=this.props.ListHeaderComponent?1:0,y=p(d)-1;i=Math.min(y,i);for(var b=function(r){var i=f(d,r),c=g(i,r);l._indicesToKeys.set(r,c),n.has(r+v)&&t.push(e.length),e.push(a.createElement(U,{CellRendererComponent:u,ItemSeparatorComponent:r<y?h:void 0,cellKey:c,fillRateHelper:l._fillRateHelper,horizontal:m,index:r,inversionStyle:o,item:i,key:c,prevCellKey:s,onUpdateSeparators:l._onUpdateSeparators,onLayout:function(e){return l._onCellLayout(e,c,r)},onUnmount:l._onCellUnmount,parentProps:l.props,ref:function(e){l._cellRefs[c]=e}})),s=c},w=r;w<=i;w++)b(w)},t._isVirtualizationDisabled=function(){return this.props.disableVirtualization||!1},t._isNestedWithSameOrientation=function(){var e=this.context;return!(!e||!!e.horizontal!==!!this.props.horizontal)},t.render=function(){var e=this,t=this.props,n=t.ListEmptyComponent,r=t.ListFooterComponent,i=t.ListHeaderComponent,o=this.props,s=o.data,l=o.horizontal,h=this._isVirtualizationDisabled(),d=this.props.inverted?this.props.horizontal?V.horizontallyInverted:V.verticallyInverted:null,f=[],p=new Set(this.props.stickyHeaderIndices),m=[];if(i){p.has(0)&&m.push(0);var g=a.isValidElement(i)?i:a.createElement(i,null);f.push(a.createElement(R,{cellKey:this._getCellKey()+"-header",key:"$header"},a.createElement(u.a,{onLayout:this._onLayoutHeader,style:c.a.compose(d,this.props.ListHeaderComponentStyle)},g)))}var v=this.props.getItemCount(s);if(v>0){F=!1,z="";var y=l?"width":"height",b=this.props.initialScrollIndex?-1:this.props.initialNumToRender-1,w=this.state,x=w.first,_=w.last;this._pushCells(f,m,p,0,b,d);var E=Math.max(b+1,x);if(!h&&x>b+1){var A=!1;if(p.size>0)for(var S=i?1:0,M=E-1;M>b;M--)if(p.has(M+S)){var T,C,k=this._getFrameMetricsApprox(b),P=this._getFrameMetricsApprox(M),L=P.offset-k.offset-(this.props.initialScrollIndex?0:k.length);f.push(a.createElement(u.a,{key:"$sticky_lead",style:(T={},T[y]=L,T)})),this._pushCells(f,m,p,M,M,d);var D=this._getFrameMetricsApprox(x).offset-(P.offset+P.length);f.push(a.createElement(u.a,{key:"$sticky_trail",style:(C={},C[y]=D,C)})),A=!0;break}if(!A){var N,j=this._getFrameMetricsApprox(b),B=this._getFrameMetricsApprox(x).offset-(j.offset+j.length);f.push(a.createElement(u.a,{key:"$lead_spacer",style:(N={},N[y]=B,N)}))}}if(this._pushCells(f,m,p,E,_,d),!this._hasWarned.keys&&F&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",z),this._hasWarned.keys=!0),!h&&_<v-1){var H,U=this._getFrameMetricsApprox(_),G=this.props.getItemLayout?v-1:Math.min(v-1,this._highestMeasuredFrameIndex),W=this._getFrameMetricsApprox(G),q=W.offset+W.length-(U.offset+U.length);f.push(a.createElement(u.a,{key:"$tail_spacer",style:(H={},H[y]=q,H)}))}}else if(n){var X=a.isValidElement(n)?n:a.createElement(n,null);f.push(a.cloneElement(X,{key:"$empty",onLayout:function(t){e._onLayoutEmpty(t),X.props.onLayout&&X.props.onLayout(t)},style:c.a.compose(d,X.props.style)}))}if(r){var Y=a.isValidElement(r)?r:a.createElement(r,null);f.push(a.createElement(R,{cellKey:this._getFooterCellKey(),key:"$footer"},a.createElement(u.a,{onLayout:this._onLayoutFooter,style:c.a.compose(d,this.props.ListFooterComponentStyle)},Y)))}var K=I(I({},this.props),{},{onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout,onScroll:this._onScroll,onScrollBeginDrag:this._onScrollBeginDrag,onScrollEndDrag:this._onScrollEndDrag,onMomentumScrollBegin:this._onMomentumScrollBegin,onMomentumScrollEnd:this._onMomentumScrollEnd,scrollEventThrottle:this.props.scrollEventThrottle,stickyHeaderIndices:m,style:d?[d,this.props.style]:this.props.style});this._hasMore=this.state.last<this.props.getItemCount(this.props.data)-1;var Q=a.createElement(O,{value:{cellKey:null,getScrollMetrics:this._getScrollMetrics,horizontal:this.props.horizontal,getOutermostParentListRef:this._getOutermostParentListRef,getNestedChildState:this._getNestedChildState,registerAsNestedChild:this._registerAsNestedChild,unregisterAsNestedChild:this._unregisterAsNestedChild,debugInfo:this._getDebugInfo()}},a.cloneElement((this.props.renderScrollComponent||this._defaultRenderScrollComponent)(K),{ref:this._captureScrollRef},f));return this.props.debug?a.createElement(u.a,{style:V.debug},Q,this._renderDebugOverlay()):Q},t.componentDidUpdate=function(e){var t=this.props,n=t.data,r=t.extraData;n===e.data&&r===e.extraData||this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.resetViewableIndices()}));var i=this._hiPriInProgress;this._scheduleCellsToRenderUpdate(),i&&(this._hiPriInProgress=!1)},t._computeBlankness=function(){this._fillRateHelper.computeBlankness(this.props,this.state,this._scrollMetrics)},t._onCellLayout=function(e,t,n){var r=e.nativeEvent.layout,i={offset:this._selectOffset(r),length:this._selectLength(r),index:n,inLayout:!0},o=this._frames[t];o&&i.offset===o.offset&&i.length===o.length&&n===o.index?this._frames[t].inLayout=!0:(this._totalCellLength+=i.length-(o?o.length:0),this._totalCellsMeasured+=o?0:1,this._averageCellLength=this._totalCellLength/this._totalCellsMeasured,this._frames[t]=i,this._highestMeasuredFrameIndex=Math.max(this._highestMeasuredFrameIndex,n),this._scheduleCellsToRenderUpdate()),this._triggerRemeasureForChildListsInCell(t),this._computeBlankness(),this._updateViewableItems(this.props.data)},t._triggerRemeasureForChildListsInCell=function(e){var t=this._cellKeysToChildListKeys.get(e);if(t)for(var n,r=k(t);!(n=r()).done;){var i=n.value,o=this._nestedChildLists.get(i);o&&o.ref&&o.ref.measureLayoutRelativeToContainingList()}},t.measureLayoutRelativeToContainingList=function(){var e=this;try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(),(function(t,n,r,i){e._offsetFromParentVirtualizedList=e._selectOffset({x:t,y:n}),e._scrollMetrics.contentLength=e._selectLength({width:r,height:i});var o=e._convertParentScrollMetrics(e.context.getScrollMetrics());e._scrollMetrics.visibleLength=o.visibleLength,e._scrollMetrics.offset=o.offset}),(function(e){console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")}))}catch(t){console.warn("measureLayoutRelativeToContainingList threw an error",t.stack)}},t._getFooterCellKey=function(){return this._getCellKey()+"-footer"},t._renderDebugOverlay=function(){for(var e=this._scrollMetrics.visibleLength/(this._scrollMetrics.contentLength||1),t=[],n=this.props.getItemCount(this.props.data),r=0;r<n;r++){var i=this._getFrameMetricsApprox(r);i.inLayout&&t.push(i)}var o=this._getFrameMetricsApprox(this.state.first).offset,s=this._getFrameMetricsApprox(this.state.last),l=s.offset+s.length-o,c=this._scrollMetrics.offset,h=this._scrollMetrics.visibleLength;return a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlay]},t.map((function(t,n){return a.createElement(u.a,{key:"f"+n,style:[V.debugOverlayBase,V.debugOverlayFrame,{top:t.offset*e,height:t.length*e}]})})),a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlayFrameLast,{top:o*e,height:l*e}]}),a.createElement(u.a,{style:[V.debugOverlayBase,V.debugOverlayFrameVis,{top:c*e,height:h*e}]}))},t._selectLength=function(e){return this.props.horizontal?e.width:e.height},t._selectOffset=function(e){return this.props.horizontal?e.x:e.y},t._maybeCallOnEndReached=function(){var e=this.props,t=e.data,n=e.getItemCount,r=e.onEndReached,i=e.onEndReachedThreshold,o=this._scrollMetrics,a=o.contentLength,s=o.visibleLength,l=a-s-o.offset,c=i?i*s:2;r&&this.state.last===n(t)-1&&l<c&&this._scrollMetrics.contentLength!==this._sentEndForContentLength?(this._sentEndForContentLength=this._scrollMetrics.contentLength,r({distanceFromEnd:l})):l>c&&(this._sentEndForContentLength=0)},t._scheduleCellsToRenderUpdate=function(){var e=this.state,t=e.first,n=e.last,r=this._scrollMetrics,i=r.offset,o=r.visibleLength,a=r.velocity,s=this.props.getItemCount(this.props.data),l=!1,c=this.props.onEndReachedThreshold*o/2;if(t>0){var u=i-this._getFrameMetricsApprox(t).offset;l=l||u<0||a<-2&&u<c}if(n<s-1){var h=this._getFrameMetricsApprox(n).offset-(i+o);l=l||h<0||a>2&&h<c}if(l&&(this._averageCellLength||this.props.getItemLayout)&&!this._hiPriInProgress)return this._hiPriInProgress=!0,this._updateCellsToRenderBatcher.dispose({abort:!0}),void this._updateCellsToRender();this._updateCellsToRenderBatcher.schedule()},t._updateViewableItems=function(e){var t=this,n=this.props.getItemCount;this._viewabilityTuples.forEach((function(r){r.viewabilityHelper.onUpdate(n(e),t._scrollMetrics.offset,t._scrollMetrics.visibleLength,t._getFrameMetrics,t._createViewToken,r.onViewableItemsChanged,t.state)}))},n}(a.PureComponent);H.contextType=C,H.defaultProps={disableVirtualization:!1,horizontal:!1,initialNumToRender:10,keyExtractor:function(e,t){return null!=e.key?e.key:null!=e.id?e.id:(F=!0,e.type&&e.type.displayName&&(z=e.type.displayName),String(t))},maxToRenderPerBatch:10,onEndReachedThreshold:2,scrollEventThrottle:50,updateCellsBatchingPeriod:50,windowSize:21};var U=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={separatorProps:{highlighted:!1,leadingItem:t.props.item}},t._separators={highlight:function(){var e=t.props,n=e.cellKey,r=e.prevCellKey;t.props.onUpdateSeparators([n,r],{highlighted:!0})},unhighlight:function(){var e=t.props,n=e.cellKey,r=e.prevCellKey;t.props.onUpdateSeparators([n,r],{highlighted:!1})},updateProps:function(e,n){var r=t.props,i=r.cellKey,o=r.prevCellKey;t.props.onUpdateSeparators(["leading"===e?o:i],n)}},t}j(t,e),t.getDerivedStateFromProps=function(e,t){return{separatorProps:I(I({},t.separatorProps),{},{leadingItem:e.item})}};var n=t.prototype;return n.updateSeparatorProps=function(e){this.setState((function(t){return{separatorProps:I(I({},t.separatorProps),e)}}))},n.componentWillUnmount=function(){this.props.onUnmount(this.props.cellKey)},n._renderElement=function(e,t,n,r){return e&&t&&console.warn("VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take precedence over renderItem."),t?a.createElement(t,{item:n,index:r,separators:this._separators}):e?e({item:n,index:r,separators:this._separators}):void d()(!1,"VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.")},n.render=function(){var e=this.props,t=e.CellRendererComponent,n=e.ItemSeparatorComponent,r=e.fillRateHelper,i=e.horizontal,o=e.item,s=e.index,l=e.inversionStyle,c=e.parentProps,h=c.renderItem,d=c.getItemLayout,f=c.ListItemComponent,p=this._renderElement(h,f,o,s),m=!d||c.debug||r.enabled()?this.props.onLayout:void 0,g=n&&a.createElement(n,this.state.separatorProps),v=l?i?[V.rowReverse,l]:[V.columnReverse,l]:i?[V.row,l]:l,y=t?a.createElement(t,L({},this.props,{style:v,onLayout:m}),p,g):a.createElement(u.a,{style:v,onLayout:m},p,g);return a.createElement(R,{cellKey:this.props.cellKey},y)},t}(a.Component);var V=c.a.create({verticallyInverted:{transform:[{scaleY:-1}]},horizontallyInverted:{transform:[{scaleX:-1}]},row:{flexDirection:"row"},rowReverse:{flexDirection:"row-reverse"},columnReverse:{flexDirection:"column-reverse"},debug:{flex:1},debugOverlayBase:{position:"absolute",top:0,right:0},debugOverlay:{bottom:0,width:20,borderColor:"blue",borderWidth:1},debugOverlayFrame:{left:0,backgroundColor:"orange"},debugOverlayFrameLast:{left:0,borderColor:"green",borderWidth:2},debugOverlayFrameVis:{left:0,borderColor:"red",borderWidth:2}});t.a=H},function(e,t,n){"use strict";var r=function(){};function i(){return null}i.setBackgroundColor=r,i.setBarStyle=r,i.setHidden=r,i.setNetworkActivityIndicatorVisible=r,i.setTranslucent=r,t.a=i},function(e,t,n){"use strict";var r=n(26),i=n(32),o=n(4),a=n.n(o);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=1,c=function(e){var t,n;function i(t){var n;n=e.call(this)||this;var i=t||{x:0,y:0};return"number"===typeof i.x&&"number"===typeof i.y?(n.x=new r.a(i.x),n.y=new r.a(i.y)):(a()(i.x instanceof r.a&&i.y instanceof r.a,"AnimatedValueXY must be initialized with an object of numbers or AnimatedValues."),n.x=i.x,n.y=i.y),n._listeners={},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,s(t,n);var o=i.prototype;return o.setValue=function(e){this.x.setValue(e.x),this.y.setValue(e.y)},o.setOffset=function(e){this.x.setOffset(e.x),this.y.setOffset(e.y)},o.flattenOffset=function(){this.x.flattenOffset(),this.y.flattenOffset()},o.extractOffset=function(){this.x.extractOffset(),this.y.extractOffset()},o.__getValue=function(){return{x:this.x.__getValue(),y:this.y.__getValue()}},o.resetAnimation=function(e){this.x.resetAnimation(),this.y.resetAnimation(),e&&e(this.__getValue())},o.stopAnimation=function(e){this.x.stopAnimation(),this.y.stopAnimation(),e&&e(this.__getValue())},o.addListener=function(e){var t=this,n=String(l++),r=function(n){n.value;e(t.__getValue())};return this._listeners[n]={x:this.x.addListener(r),y:this.y.addListener(r)},n},o.removeListener=function(e){this.x.removeListener(this._listeners[e].x),this.y.removeListener(this._listeners[e].y),delete this._listeners[e]},o.removeAllListeners=function(){this.x.removeAllListeners(),this.y.removeAllListeners(),this._listeners={}},o.getLayout=function(){return{left:this.x,top:this.y}},o.getTranslateTransform=function(){return[{translateX:this.x},{translateY:this.y}]},i}(i.a);t.a=c},function(e,t,n){"use strict";function r(){}var i={exitApp:r,addEventListener:function(){return{remove:r}},removeEventListener:r};t.a=i},function(e,t,n){"use strict";var r=n(0),i=Object(r.createContext)(!1);t.a=i},function(e,t,n){"use strict";var r=n(105);n(4);t.a=function e(t){if(t){if(!Array.isArray(t))return function(e){return"number"===typeof e?r.a.getByID(e):e}(t);for(var n={},i=0,o=t.length;i<o;++i){var a=e(t[i]);if(a)for(var s in a){var l=a[s];n[s]=l}}return n}}},function(e,t,n){"use strict";var r=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l}));var r=n(460),i=n(247);const o=4294967296;function a(e){return e.x}function s(e){return e.y}function l(e){return e.z}var c=Math.PI*(3-Math.sqrt(5)),u=20*Math.PI/(9+Math.sqrt(221));t.a=function(e,t){t=t||2;var n,a=Math.min(3,Math.max(1,Math.round(t))),s=1,l=.001,h=1-Math.pow(l,1/300),d=0,f=.6,p=new Map,m=Object(i.c)(y),g=Object(r.a)("tick","end"),v=function(){let e=1;return()=>(e=(1664525*e+1013904223)%o)/o}();function y(){b(),g.call("tick",n),s<l&&(m.stop(),g.call("end",n))}function b(t){var r,i,o=e.length;void 0===t&&(t=1);for(var l=0;l<t;++l)for(s+=(d-s)*h,p.forEach((function(e){e(s)})),r=0;r<o;++r)null==(i=e[r]).fx?i.x+=i.vx*=f:(i.x=i.fx,i.vx=0),a>1&&(null==i.fy?i.y+=i.vy*=f:(i.y=i.fy,i.vy=0)),a>2&&(null==i.fz?i.z+=i.vz*=f:(i.z=i.fz,i.vz=0));return n}function w(){for(var t,n=0,r=e.length;n<r;++n){if((t=e[n]).index=n,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),null!=t.fz&&(t.z=t.fz),isNaN(t.x)||a>1&&isNaN(t.y)||a>2&&isNaN(t.z)){var i=10*(a>2?Math.cbrt(.5+n):a>1?Math.sqrt(.5+n):n),o=n*c,s=n*u;1===a?t.x=i:2===a?(t.x=i*Math.cos(o),t.y=i*Math.sin(o)):(t.x=i*Math.sin(o)*Math.cos(s),t.y=i*Math.cos(o),t.z=i*Math.sin(o)*Math.sin(s))}(isNaN(t.vx)||a>1&&isNaN(t.vy)||a>2&&isNaN(t.vz))&&(t.vx=0,a>1&&(t.vy=0),a>2&&(t.vz=0))}}function x(t){return t.initialize&&t.initialize(e,v,a),t}return null==e&&(e=[]),w(),n={tick:b,restart:function(){return m.restart(y),n},stop:function(){return m.stop(),n},numDimensions:function(e){return arguments.length?(a=Math.min(3,Math.max(1,Math.round(e))),p.forEach(x),n):a},nodes:function(t){return arguments.length?(e=t,w(),p.forEach(x),n):e},alpha:function(e){return arguments.length?(s=+e,n):s},alphaMin:function(e){return arguments.length?(l=+e,n):l},alphaDecay:function(e){return arguments.length?(h=+e,n):+h},alphaTarget:function(e){return arguments.length?(d=+e,n):d},velocityDecay:function(e){return arguments.length?(f=1-e,n):1-f},randomSource:function(e){return arguments.length?(v=e,p.forEach(x),n):v},force:function(e,t){return arguments.length>1?(null==t?p.delete(e):p.set(e,x(t)),n):p.get(e)},find:function(){var t,n,r,i,o,s,l=Array.prototype.slice.call(arguments),c=l.shift()||0,u=(a>1?l.shift():null)||0,h=(a>2?l.shift():null)||0,d=l.shift()||1/0,f=0,p=e.length;for(d*=d,f=0;f<p;++f)(i=(t=c-(o=e[f]).x)*t+(n=u-(o.y||0))*n+(r=h-(o.z||0))*r)<d&&(s=o,d=i);return s},on:function(e,t){return arguments.length>1?(g.on(e,t),n):g.on(e)}}}},function(e,t,n){const r=n(183);e.exports=function(e){return function(t,n){let i=n&&n.indent||0,o=n&&void 0!==n.join?n.join:"\n",a=Array(i+1).join(" "),s=[];for(let l=0;l<e;++l){let e=r(l),n=0===l?"":a;s.push(n+t.replace(/{var}/g,e))}return s.join(o)}}},function(e,t){e.exports=function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,i){return t.apply(this,arguments)};case 5:return function(e,n,r,i,o){return t.apply(this,arguments)};case 6:return function(e,n,r,i,o,a){return t.apply(this,arguments)};case 7:return function(e,n,r,i,o,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,i,o,a,s,l){return t.apply(this,arguments)};case 9:return function(e,n,r,i,o,a,s,l,c){return t.apply(this,arguments)};case 10:return function(e,n,r,i,o,a,s,l,c,u){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(20),i=n.n(r);var o=function e(){i()(this,e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"",void 0)}},function(e,t,n){"use strict";t.a={dark:!1,colors:{primary:"rgb(0, 122, 255)",background:"rgb(242, 242, 242)",card:"rgb(255, 255, 255)",text:"rgb(28, 28, 30)",border:"rgb(216, 216, 216)",notification:"rgb(255, 59, 48)"}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(13),i=n(66),o=n(28),a=(r.canUseDOM,null);function s(e,t){var n=(r.canUseDOM&&"undefined"!==typeof window.ResizeObserver&&null==a&&(a=new window.ResizeObserver((function(e){e.forEach((function(e){var t=e.target,n=t.__reactLayoutHandler;"function"===typeof n&&o.a.measure(t,(function(t,r,i,o,a,s){var l={nativeEvent:{layout:{x:t,y:r,width:i,height:o,left:a,top:s}},timeStamp:Date.now()};Object.defineProperty(l.nativeEvent,"target",{enumerable:!0,get:function(){return e.target}}),n(l)}))}))}))),a);Object(i.a)((function(){var n=e.current;null!=n&&(n.__reactLayoutHandler=t)}),[e,t]),Object(i.a)((function(){var t=e.current;return null!=t&&null!=n&&("function"===typeof t.__reactLayoutHandler?n.observe(t):n.unobserve(t)),function(){null!=t&&null!=n&&n.unobserve(t)}}),[e,n])}},function(e,t){function n(e){var t;return"number"===typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=l.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:f.hasOwnProperty(e)?f[e]:(t=l.rgb.exec(e))?(c(t[1])<<24|c(t[2])<<16|c(t[3])<<8|255)>>>0:(t=l.rgba.exec(e))?(c(t[1])<<24|c(t[2])<<16|c(t[3])<<8|h(t[4]))>>>0:(t=l.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=l.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=l.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=l.hsl.exec(e))?(255|i(u(t[1]),d(t[2]),d(t[3])))>>>0:(t=l.hsla.exec(e))?(i(u(t[1]),d(t[2]),d(t[3]))|h(t[4]))>>>0:null}function r(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+(t-e)*(2/3-n)*6:e}function i(e,t,n){var i=n<.5?n*(1+t):n+t-n*t,o=2*n-i,a=r(o,i,e+1/3),s=r(o,i,e),l=r(o,i,e-1/3);return Math.round(255*a)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}var o="[-+]?\\d*\\.?\\d+";function a(e){return Array.prototype.slice.call(e,0)}function s(){return"\\(\\s*("+a(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var l={rgb:new RegExp("rgb"+s(o,o,o)),rgba:new RegExp("rgba"+s(o,o,o,o)),hsl:new RegExp("hsl"+s(o,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),hsla:new RegExp("hsla"+s(o,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",o)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function c(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function u(e){return(parseFloat(e)%360+360)%360/360}function h(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function d(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var f={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};n.rgba=function(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}},e.exports=n},function(t,n,r){"use strict";var i=r(15),o=1,a=function(){function t(){}var n=t.prototype;return n.start=function(e,t,n,r,i){},n.stop=function(){this.__nativeId&&i.a.API.stopAnimation(this.__nativeId)},n.__getNativeAnimationConfig=function(){throw new Error("This animation type cannot be offloaded to native")},n.__debouncedOnEnd=function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)},n.__startNativeAnimation=function(t){var n=o+":startAnimation";o+=1,i.a.API.setWaitingForIdentifier(n);try{t.__makeNative(),this.__nativeId=i.a.generateNewAnimationId(),i.a.API.startAnimatingNode(this.__nativeId,t.__getNativeTag(),this.__getNativeAnimationConfig(),this.__debouncedOnEnd.bind(this))}catch(e){throw e}finally{i.a.API.unsetWaitingForIdentifier(n)}},t}();n.a=a},function(e,t,n){"use strict";var r=n(0),i=n(31),o=n(99),a=n(5),s=n(2);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var d={},f=r.forwardRef((function(e,t){var n=e.accessibilityLabel,l=e.activeThumbColor,c=void 0===l?"#009688":l,u=e.activeTrackColor,f=void 0===u?"#A3D3CF":u,m=e.disabled,g=void 0!==m&&m,v=e.onValueChange,y=e.style,b=void 0===y?d:y,w=e.thumbColor,x=void 0===w?"#FAFAFA":w,_=e.trackColor,E=void 0===_?"#939393":_,A=e.value,S=void 0!==A&&A,M=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["accessibilityLabel","activeThumbColor","activeTrackColor","disabled","onValueChange","style","thumbColor","trackColor","value"]),T=r.useRef(null);function C(e){var t="focus"===e.nativeEvent.type?"0px 1px 3px rgba(0,0,0,0.5), 0 0 0 10px rgba(0,0,0,0.1)":"0px 1px 3px rgba(0,0,0,0.5)";null!=T.current&&(T.current.style.boxShadow=t)}var O=a.a.flatten(b),R=O.height,k=O.width,P=R||"20px",L=Object(o.a)(P,2),D=k>L?k:L,I=Object(o.a)(P,.5),N=!0===S?null!=E&&"object"===typeof E?E.true:f:null!=E&&"object"===typeof E?E.false:E,j=S?c:x,B=P,F=B,z=[p.root,b,g&&p.cursorDefault,{height:P,width:D}],H=[p.track,{backgroundColor:g?"#D5D5D5":N,borderRadius:I}],U=[p.thumb,S&&p.thumbActive,{backgroundColor:g?"#BDBDBD":j,height:B,marginStart:S?Object(o.a)(F,-1):0,width:F}],V=Object(i.a)("input",{accessibilityLabel:n,checked:S,disabled:g,onBlur:C,onChange:function(e){null!=v&&v(e.nativeEvent.target.checked)},onFocus:C,ref:t,style:[p.nativeControl,p.cursorInherit],type:"checkbox",role:"switch"});return r.createElement(s.a,h({},M,{style:z}),r.createElement(s.a,{style:H}),r.createElement(s.a,{ref:T,style:U}),V)}));f.displayName="Switch";var p=a.a.create({root:{cursor:"pointer",userSelect:"none"},cursorDefault:{cursor:"default"},cursorInherit:{cursor:"inherit"},track:c(c({},a.a.absoluteFillObject),{},{height:"70%",margin:"auto",transitionDuration:"0.1s",width:"100%"}),thumb:{alignSelf:"flex-start",borderRadius:"100%",boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",start:"0%",transform:[{translateZ:0}],transitionDuration:"0.1s"},thumbActive:{start:"100%"},nativeControl:c(c({},a.a.absoluteFillObject),{},{height:"100%",margin:0,opacity:0,padding:0,width:"100%"})});t.a=f},function(e,t,n){"use strict";var r=n(64);t.a=r.a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(0),i=r.createContext(void 0);function o(e){var t=e.children,n=r.useRef(),o=r.useMemo((function(){return{register:function(e){var t=n.current;if(void 0!==t&&e!==t)throw new Error('Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.');n.current=e},unregister:function(e){e===n.current&&(n.current=void 0)}}}),[]);return r.createElement(i.Provider,{value:o},t)}},function(t,n,r){"use strict";var i=r(13);var o=r(47),a=r(130);var s={height:0,width:0};var l=function(e){var t=e.shadowColor,n=e.shadowOffset,r=e.shadowOpacity,i=e.shadowRadius,l=e.textShadowColor,c=e.textShadowOffset,u=e.textShadowRadius,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["shadowColor","shadowOffset","shadowOpacity","shadowRadius","textShadowColor","textShadowOffset","textShadowRadius"]);return null==t&&null==n&&null==r&&null==i||function(e,t){var n=t.boxShadow,r=Object(a.a)(t);null!=r&&(e.boxShadow=n?n+", "+r:r)}(h,e),null==l&&null==c&&null==u||function(e,t){var n=t.textShadowColor,r=t.textShadowOffset,i=t.textShadowRadius,a=r||s,l=a.height,c=a.width,u=i||0,h=Object(o.a)(c),d=Object(o.a)(l),f=Object(o.a)(u),p=Object(o.a)(n,"textShadowColor");!p||0===l&&0===c&&0===u||null==h||null==d||null==f||(e.textShadow=h+" "+d+" "+f+" "+p)}(h,e),h},c=Array.prototype.slice;function u(t){var n,r={},i={};null!=t&&c.call(t.cssRules).forEach((function(e,t){var o=e.cssText;if(o.indexOf("stylesheet-group")>-1)n=function(e){return Number(e.selectorText.split(/["']/)[1])}(e),r[n]={start:t,rules:[o]};else{var a=f(o);null!=a&&(i[a]=!0,r[n].rules.push(o))}}));function o(t,n,i){var o=h(r),a=o.indexOf(n)+1,s=o[a],l=null!=s&&null!=r[s].start?r[s].start:t.cssRules.length,c=function(t,n,r){try{return t.insertRule(n,r),!0}catch(e){return!1}}(t,i,l);if(c){null==r[n].start&&(r[n].start=l);for(var u=a;u<o.length;u+=1){var d=o[u],f=r[d].start||0;r[d].start=f+1}}return c}return{getTextContent:function(){return h(r).map((function(e){return r[e].rules.join("\n")})).join("\n")},insert:function(e,n){var a=Number(n);if(null==r[a]){var s=function(e){return'[stylesheet-group="'+e+'"]{}'}(a);r[a]={start:null,rules:[s]},null!=t&&o(t,a,s)}var l=f(e);null!=l&&null==i[l]&&(i[l]=!0,r[a].rules.push(e),null!=t&&(o(t,a,e)||r[a].rules.pop()))}}}function h(e){return Object.keys(e).map(Number).sort((function(e,t){return e>t?1:-1}))}var d=/\s*([,])\s*/g;function f(e){var t=e.split("{")[0].trim();return""!==t?t.replace(d,"$1"):null}var p=function(e){return function e(t,n){for(var r=0;r<t.length;r++){var i=t[r];Array.isArray(i)?e(i,n):null!=i&&!1!==i&&n.push(i)}return n}(e,[])},m=r(81),g=r(35),v=r(99),y={},b={borderTopLeftRadius:"borderTopRightRadius",borderTopRightRadius:"borderTopLeftRadius",borderBottomLeftRadius:"borderBottomRightRadius",borderBottomRightRadius:"borderBottomLeftRadius",borderLeftColor:"borderRightColor",borderLeftStyle:"borderRightStyle",borderLeftWidth:"borderRightWidth",borderRightColor:"borderLeftColor",borderRightStyle:"borderLeftStyle",borderRightWidth:"borderLeftWidth",left:"right",marginLeft:"marginRight",marginRight:"marginLeft",paddingLeft:"paddingRight",paddingRight:"paddingLeft",right:"left"},w={borderTopStartRadius:"borderTopLeftRadius",borderTopEndRadius:"borderTopRightRadius",borderBottomStartRadius:"borderBottomLeftRadius",borderBottomEndRadius:"borderBottomRightRadius",borderStartColor:"borderLeftColor",borderStartStyle:"borderLeftStyle",borderStartWidth:"borderLeftWidth",borderEndColor:"borderRightColor",borderEndStyle:"borderRightStyle",borderEndWidth:"borderRightWidth",end:"right",marginStart:"marginLeft",marginEnd:"marginRight",paddingStart:"paddingLeft",paddingEnd:"paddingRight",start:"left"},x={clear:!0,float:!0,textAlign:!0},_=function(e){return Object(v.a)(e,-1)},E=function(e){var t=g.a.getConstants(),n=t.doLeftAndRightSwapInRTL,r=t.isRTL,i=e||y,o={},a={};for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var l=i[s],c=s,u=l;if(w.hasOwnProperty(s)){var h=w[s];c=r?b[h]:h}else r&&n&&b[s]&&(c=b[s]);if(x.hasOwnProperty(s)&&("start"===l?u=r?"right":"left":"end"===l?u=r?"left":"right":r&&n&&("left"===l?u="right":"right"===l&&(u="left"))),"transitionProperty"===c)if(w.hasOwnProperty(u)){var d=w[l];u=r?b[d]:d}else if(r&&n){var f=b[l];null!=f&&(u=f)}if(r&&"textShadowOffset"===c){var p=_(u.width);u.width=p,a[c]=u}else o[c]||(a[c]=u);w[s]&&(o[c]=!0)}return a},A=r(41),S={},M=!i.canUseDOM||null!=window.CSS&&null!=window.CSS.supports&&(window.CSS.supports("text-decoration-line","none")||window.CSS.supports("-webkit-text-decoration-line","none")),T=function(e){var t=Object.keys(e)[0],n=e[t];return"matrix"===t||"matrix3d"===t?t+"("+n.join(",")+")":t+"("+Object(o.a)(n,t)+")"},C=function(e){if(!e)return S;var t={};return Object.keys(e).sort().forEach((function(n){var r=Object(o.a)(e[n],n);if(null!=r)switch(n){case"elevation":case"overlayColor":case"resizeMode":case"tintColor":break;case"aspectRatio":t[n]=r.toString();break;case"backgroundClip":"text"===r&&(t.backgroundClip=r,t.WebkitBackgroundClip=r);break;case"flex":-1===r?(t.flexGrow=0,t.flexShrink=1,t.flexBasis="auto"):t.flex=r;break;case"font":t[n]=r.replace("System",A.e);break;case"fontFamily":if(r.indexOf("System")>-1){var i=r.split(/,\s*/);i[i.indexOf("System")]=A.e,t[n]=i.join(",")}else t[n]="monospace"===r?A.a:r;break;case"fontVariant":Array.isArray(r)&&r.length>0&&(t.fontVariant=r.join(" "));break;case"textAlignVertical":t.verticalAlign="center"===r?"middle":r;break;case"textDecorationLine":M?t.textDecorationLine=r:t.textDecoration=r;break;case"transform":case"transformMatrix":!function(e,t){var n=t.transform;Array.isArray(t.transform)&&(n=t.transform.map(T).join(" ")),e.transform=n}(t,e);break;case"writingDirection":t.direction=r;break;default:var a=A.d[n];a?a.forEach((function(n,i){"undefined"===typeof e[n]&&(t[n]=r)})):t[n]=Array.isArray(r)?r.join(","):r}})),t};var O=function(e){return function(e,t){for(var n,r=e.length,i=t^r,o=0;r>=4;)n=1540483477*(65535&(n=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(n>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(n=1540483477*(65535&(n^=n>>>24))+((1540483477*(n>>>16)&65535)<<16)),r-=4,++o;switch(r){case 3:i^=(255&e.charCodeAt(o+2))<<16;case 2:i^=(255&e.charCodeAt(o+1))<<8;case 1:i=1540483477*(65535&(i^=255&e.charCodeAt(o)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}(e,1).toString(36)},R=r(160),k=r(224),P=r.n(k),L=r(225),D=r.n(L),I=r(226),N=r.n(I),j=r(227),B=r.n(j),F=r(228),z=r.n(F),H=r(229),U=r.n(H),V=r(230),G=r.n(V),W=r(231),q=r.n(W),X=r(232),Y=r.n(X),K=r(233),Q=r.n(K),Z=r(234),J=r.n(Z),$=r(235),ee=r.n($),te=r(236),ne=r.n(te),re=r(237),ie=r.n(re),oe=r(238),ae=r.n(oe),se=["Webkit"],le=["Moz"],ce=["ms"],ue=["Webkit","Moz"],he=["Webkit","ms"],de=["Webkit","Moz","ms"],fe={plugins:[D.a,N.a,B.a,z.a,U.a,G.a,q.a,Y.a,Q.a,J.a,ee.a,ne.a,ie.a,ae.a],prefixMap:{animation:se,animationDelay:se,animationDirection:se,animationFillMode:se,animationDuration:se,animationIterationCount:se,animationName:se,animationPlayState:se,animationTimingFunction:se,appearance:ue,userSelect:de,textEmphasisPosition:se,textEmphasis:se,textEmphasisStyle:se,textEmphasisColor:se,boxDecorationBreak:se,clipPath:se,maskImage:se,maskMode:se,maskRepeat:se,maskPosition:se,maskClip:se,maskOrigin:se,maskSize:se,maskComposite:se,mask:se,maskBorderSource:se,maskBorderMode:se,maskBorderSlice:se,maskBorderWidth:se,maskBorderOutset:se,maskBorderRepeat:se,maskBorder:se,maskType:se,textDecorationStyle:se,textDecorationSkip:se,textDecorationLine:se,textDecorationColor:se,filter:se,fontFeatureSettings:se,breakAfter:de,breakBefore:de,breakInside:de,columnCount:ue,columnFill:ue,columnGap:ue,columnRule:ue,columnRuleColor:ue,columnRuleStyle:ue,columnRuleWidth:ue,columns:ue,columnSpan:ue,columnWidth:ue,writingMode:he,flex:he,flexBasis:se,flexDirection:he,flexGrow:se,flexFlow:he,flexShrink:se,flexWrap:he,alignContent:se,alignItems:se,alignSelf:se,justifyContent:se,order:se,transform:se,transformOrigin:se,transformOriginX:se,transformOriginY:se,backfaceVisibility:se,perspective:se,perspectiveOrigin:se,transformStyle:se,transformOriginZ:se,backdropFilter:se,fontKerning:se,scrollSnapType:he,scrollSnapPointsX:he,scrollSnapPointsY:he,scrollSnapDestination:he,scrollSnapCoordinate:he,shapeImageThreshold:se,shapeImageMargin:se,shapeImageOutside:se,hyphens:de,flowInto:he,flowFrom:he,regionFragment:he,textOrientation:se,textAlignLast:le,tabSize:le,wrapFlow:ce,wrapThrough:ce,wrapMargin:ce,touchAction:ce,textSizeAdjust:["ms","Webkit"],borderImage:se,borderImageOutset:se,borderImageRepeat:se,borderImageSlice:se,borderImageSource:se,borderImageWidth:se,transitionDelay:se,transitionDuration:se,transitionProperty:se,transitionTimingFunction:se}},pe=P()(fe),me=pe;function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(n),!0).forEach((function(t){ye(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be={get:function(e,t){if(null!=be[e]&&be[e].hasOwnProperty(t)&&null!=be[e][t])return be[e][t]},set:function(e,t,n){return null==be[e]&&(be[e]={}),be[e][t]=n}};function we(e){return Object.keys(e).sort().reduce((function(t,n){var r=e[n];if(null!=r){var i=Ee(r,n),o=be.get(n,i);if(null!=o){t[o.identifier]=o}else{var a=Se("r",n,r),s=function(e,t,n){var r=[],i="."+e;switch(t){case"animationKeyframes":var o=Me(n),a=o.animationNames,s=o.rules,l=Ae({animationName:a.join(",")});r.push.apply(r,[""+i+l].concat(s));break;case"placeholderTextColor":var c=Ae({color:n,opacity:1});r.push(i+"::-webkit-input-placeholder"+c,i+"::-moz-placeholder"+c,i+":-ms-input-placeholder"+c,i+"::placeholder"+c);break;case"pointerEvents":var u=n;if("auto"===n||"box-only"===n){if(u="auto!important","box-only"===n){var h=Ae({pointerEvents:"none"});r.push(i+">*"+h)}}else if(("none"===n||"box-none"===n)&&(u="none!important","box-none"===n)){var d=Ae({pointerEvents:"auto"});r.push(i+">*"+d)}var f=Ae({pointerEvents:u});r.push(""+i+f);break;case"scrollbarWidth":"none"===n&&r.push(i+"::-webkit-scrollbar{display:none}");var p=Ae({scrollbarWidth:n});r.push(""+i+p);break;default:var m,g=Ae(((m={})[t]=n,m));r.push(""+i+g)}return r}(a,n,r),l=be.set(n,i,{property:n,value:Ee(r,n),identifier:a,rules:s});t[a]=l}}return t}),{})}function xe(e,t){var n,r,i=Se("css",t,e),o=e.animationKeyframes,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["animationKeyframes"]),s=[],l="."+i;if(null!=o){var c=Me(o),u=c.animationNames,h=c.rules;r=u.join(","),s.push.apply(s,h)}var d=Ae(ve(ve({},a),{},{animationName:r}));return s.push(""+l+d),(n={})[i]={identifier:i,rules:s},n}function _e(e){return function(e){var t=pe(e);return Object.keys(t).forEach((function(e){var n=t[e];Array.isArray(n)&&(t[e]=n[n.length-1])})),t}(C(e))}function Ee(e,t){var n=Object(o.a)(e,t);return"string"!==typeof n?JSON.stringify(n||""):n}function Ae(e){var t=me(C(e));return"{"+Object.keys(t).map((function(e){var n=t[e],r=Object(R.default)(e);return Array.isArray(n)?n.map((function(e){return r+":"+e})).join(";"):r+":"+n})).sort().join(";")+";}"}function Se(e,t,n){return e+"-"+O(t+Ee(n,t))}function Me(e){if("number"===typeof e)throw new Error("Invalid CSS keyframes type: "+typeof e);var t=[],n=[];return(Array.isArray(e)?e:[e]).forEach((function(e){if("string"===typeof e)t.push(e);else{var r=function(e){var t=Se("r","animation",e),n="{"+Object.keys(e).map((function(t){return""+t+Ae(e[t])})).join("")+"}",r=["-webkit-",""].map((function(e){return"@"+e+"keyframes "+t+n}));return{identifier:t,rules:r}}(e),i=r.identifier,o=r.rules;t.push(i),n.push.apply(n,o)}})),{animationNames:t,rules:n}}var Te=["html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}","body{margin:0;}","button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}","input::-webkit-inner-spin-button,input::-webkit-outer-spin-button,input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}"],Ce=function(e){if(e(":focus:not([data-focusvisible-polyfill]){outline: none;}"),i.canUseDOM){var t=!0,n=!1,r=null,o={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};document.addEventListener("keydown",(function(e){"Tab"!==e.key&&(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)||(a(document.activeElement)&&s(document.activeElement),t=!0)}),!0),document.addEventListener("mousedown",c,!0),document.addEventListener("pointerdown",c,!0),document.addEventListener("touchstart",c,!0),document.addEventListener("focus",(function(e){a(e.target)&&(t||function(e){var t=e.type,n=e.tagName,r=e.readOnly;return!("INPUT"!==n||!o[t]||r)||("TEXTAREA"===n&&!r||!!e.isContentEditable)}(e.target))&&s(e.target)}),!0),document.addEventListener("blur",(function(e){a(e.target)&&e.target.hasAttribute("data-focusvisible-polyfill")&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1,window.clearTimeout(r)}),100),l(e.target))}),!0),document.addEventListener("visibilitychange",(function(e){"hidden"===document.visibilityState&&(n&&(t=!0),u())}),!0),u()}function a(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.hasAttribute("data-focusvisible-polyfill")||e.setAttribute("data-focusvisible-polyfill",!0)}function l(e){e.removeAttribute("data-focusvisible-polyfill")}function c(e){!0===t&&function(){for(var e=document.querySelectorAll("[data-focusvisible-polyfill]"),t=0;t<e.length;t+=1)l(e[t])}(),t=!1}function u(){document.addEventListener("mousemove",h),document.addEventListener("mousedown",h),document.addEventListener("mouseup",h),document.addEventListener("pointermove",h),document.addEventListener("pointerdown",h),document.addEventListener("pointerup",h),document.addEventListener("touchmove",h),document.addEventListener("touchstart",h),document.addEventListener("touchend",h)}function h(e){"HTML"!==e.target.nodeName&&(t=!1,document.removeEventListener("mousemove",h),document.removeEventListener("mousedown",h),document.removeEventListener("mouseup",h),document.removeEventListener("pointermove",h),document.removeEventListener("pointerdown",h),document.removeEventListener("pointerup",h),document.removeEventListener("touchmove",h),document.removeEventListener("touchstart",h),document.removeEventListener("touchend",h))}};var Oe=function(e){return"rn-"+e},Re=function(e){return e.join(" ").trim()},ke=function(){var e,t,n,r={css:{},ltr:{},rtl:{},rtlNoSwap:{}},o=function(){e={css:{},ltr:{},rtl:{},rtlNoSwap:{}},t=u(function(e){if(i.canUseDOM){var t=document.getElementById(e);if(null!=t)return t.sheet;var n=document.createElement("style");n.setAttribute("id",e);var r=document.head;return r&&r.insertBefore(n,r.firstChild),n.sheet}return null}(A.b)),n={},Ce((function(e){return t.insert(e,A.c.modality)})),Te.forEach((function(e){t.insert(e,A.c.reset)}))};function a(r){var i=g.a.getConstants(),o=i.doLeftAndRightSwapInRTL,a=i.isRTL?o?"rtl":"rtlNoSwap":"ltr";if(!e[a][r]){var s=we(l(E(Object(m.a)(r))));Object.keys(s).forEach((function(e){var r=s[e],i=r.identifier,o=r.property,a=r.rules,l=r.value;!function(e,t,r){n[t]||(n[t]={}),n[t][r]=e}(i,o,l),a.forEach((function(e){var n=A.c.custom[o]||A.c.atomic;t.insert(e,n)}))})),e[a][r]=!0}}function s(e,i){var o=g.a.getConstants(),a=o.doLeftAndRightSwapInRTL,s=o.isRTL?a?"rtl":"rtlNoSwap":"ltr";if(null!=i&&null!=r[s][i])return r[s][i];var c=Object(m.a)(e),u=l(E(c)),h=Object.keys(u).sort().reduce((function(e,r){var i=u[r];if(null!=i){var o=function(e,t){var r=Ee(t,e);return n[e]&&n[e].hasOwnProperty(r)&&n[e][r]}(r,i);if(o)e.classList.push(o);else if("animationKeyframes"===r||"placeholderTextColor"===r||"pointerEvents"===r||"scrollbarWidth"===r){var a,s=we(((a={})[r]=i,a));Object.keys(s).forEach((function(n){var r=s[n],i=r.identifier,o=r.rules;e.classList.push(i),o.forEach((function(e){t.insert(e,A.c.atomic)}))}))}else e.style||(e.style={}),e.style[r]=i}return e}),{classList:[]});return h.style&&(h.style=_e(h.style)),null!=i&&(r[s][i]=h),h}return o(),{getStyleSheet:function(){var e=t.getTextContent();return i.canUseDOM||o(),{id:A.b,textContent:e}},createCSS:function(e,t){var n={};return Object.keys(e).forEach((function(i){var o=xe(e[i],i);Object.keys(o).forEach((function(e){var a=o[e],s=a.identifier,l=a.rules;r.css[s]={group:t||A.c.classic,rules:l},n[i]=s}))})),n},resolve:function(n,i){var o=[],l={};if(!n&&!i)return l;if(Array.isArray(i)&&p(i).forEach((function(n){if(n){if(null==e.css[n]&&null!=r.css[n]){var i=r.css[n];i.rules.forEach((function(e){t.insert(e,i.group)})),e.css[n]=!0}o.push(n)}})),"number"===typeof n)a(n),l=s(n,Oe(n));else if(Array.isArray(n)){for(var c=p(n),u=!0,h="",d=0;d<c.length;d++){var f=c[d];"number"!==typeof f?u=!1:(u&&(h+=f+"-"),a(f))}l=s(c,u?Oe(h):null)}else l=s(n);o.push.apply(o,l.classList);var m={className:Re(o),classList:o};return l.style&&(m.style=l.style),m},get sheet(){return t}}}();n.a=ke},function(e,t,n){"use strict";n.d(t,"a",(function(){return q}));var r=n(0),i=n(13),o=n(98);function a(e){return"touchstart"===e||"mousedown"===e}function s(e){return"touchmove"===e||"mousemove"===e}function l(e){return"touchend"===e||"mouseup"===e||c(e)}function c(e){return"touchcancel"===e||"dragstart"===e}var u=[],h={touchBank:u,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function d(e){return e.timeStamp||e.timestamp}function f(e){var t=e.identifier;return null==t&&console.error("Touch object is missing identifier."),t}function p(e){var t=f(e),n=u[t];n?function(e,t){e.touchActive=!0,e.startPageX=t.pageX,e.startPageY=t.pageY,e.startTimeStamp=d(t),e.currentPageX=t.pageX,e.currentPageY=t.pageY,e.currentTimeStamp=d(t),e.previousPageX=t.pageX,e.previousPageY=t.pageY,e.previousTimeStamp=d(t)}(n,e):u[t]=function(e){return{touchActive:!0,startPageX:e.pageX,startPageY:e.pageY,startTimeStamp:d(e),currentPageX:e.pageX,currentPageY:e.pageY,currentTimeStamp:d(e),previousPageX:e.pageX,previousPageY:e.pageY,previousTimeStamp:d(e)}}(e),h.mostRecentTimeStamp=d(e)}function m(e){var t=u[f(e)];t?(t.touchActive=!0,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=d(e),h.mostRecentTimeStamp=d(e)):console.warn("Cannot record touch move without a touch start.\n","Touch Move: "+v(e)+"\n","Touch Bank: "+y())}function g(e){var t=u[f(e)];t?(t.touchActive=!1,t.previousPageX=t.currentPageX,t.previousPageY=t.currentPageY,t.previousTimeStamp=t.currentTimeStamp,t.currentPageX=e.pageX,t.currentPageY=e.pageY,t.currentTimeStamp=d(e),h.mostRecentTimeStamp=d(e)):console.warn("Cannot record touch end without a touch start.\n","Touch End: "+v(e)+"\n","Touch Bank: "+y())}function v(e){return JSON.stringify({identifier:e.identifier,pageX:e.pageX,pageY:e.pageY,timestamp:d(e)})}function y(){var e=JSON.stringify(u.slice(0,20));return u.length>20&&(e+=" (original size: "+u.length+")"),e}var b={recordTouchTrack:function(e,t){if(s(e))t.changedTouches.forEach(m);else if(a(e))t.changedTouches.forEach(p),h.numberActiveTouches=t.touches.length,1===h.numberActiveTouches&&(h.indexOfSingleActiveTouch=t.touches[0].identifier);else if(l(e)){if(t.changedTouches.forEach(g),h.numberActiveTouches=t.touches.length,1===h.numberActiveTouches)for(var n=0;n<u.length;n++){var r=u[n];if(null!=r&&r.touchActive){h.indexOfSingleActiveTouch=n;break}}}},touchHistory:h},w=function(){},x={},_=[];function E(e){return e>20?e%20:e}function A(e){var t,n,r,i=!1,a=e.changedTouches,s=e.type,l=!0===e.metaKey,c=!0===e.shiftKey,u=a&&a[0].force||0,h=E(a&&a[0].identifier||0),d=a&&a[0].clientX||e.clientX,f=a&&a[0].clientY||e.clientY,p=a&&a[0].pageX||e.pageX,m=a&&a[0].pageY||e.pageY,g="function"===typeof e.preventDefault?e.preventDefault.bind(e):w,v=e.timeStamp;function y(e){return Array.prototype.slice.call(e).map((function(e){return{force:e.force,identifier:E(e.identifier),get locationX(){return M(e.clientX)},get locationY(){return T(e.clientY)},pageX:e.pageX,pageY:e.pageY,target:e.target,timestamp:v}}))}if(null!=a)n=y(a),r=y(e.touches);else{var A=[{force:u,identifier:h,get locationX(){return M(d)},get locationY(){return T(f)},pageX:p,pageY:m,target:e.target,timestamp:v}];n=A,r="mouseup"===s||"dragstart"===s?_:A}var S={bubbles:!0,cancelable:!0,currentTarget:null,defaultPrevented:e.defaultPrevented,dispatchConfig:x,eventPhase:e.eventPhase,isDefaultPrevented:function(){return e.defaultPrevented},isPropagationStopped:function(){return i},isTrusted:e.isTrusted,nativeEvent:{altKey:!1,ctrlKey:!1,metaKey:l,shiftKey:c,changedTouches:n,force:u,identifier:h,get locationX(){return M(d)},get locationY(){return T(f)},pageX:p,pageY:m,target:e.target,timestamp:v,touches:r,type:s},persist:w,preventDefault:g,stopPropagation:function(){i=!0},target:e.target,timeStamp:v,touchHistory:b.touchHistory};function M(e){if(t=t||Object(o.a)(S.currentTarget))return e-t.left}function T(e){if(t=t||Object(o.a)(S.currentTarget))return e-t.top}return S}function S(e){for(var t=[];null!=e&&e!==document.body;)t.push(e),e=e.parentNode;return t}function M(e){return null!=e?e.__reactResponderId:null}function T(e){for(var t=[],n=[],r=function(e){return"selectionchange"===e.type?S(window.getSelection().anchorNode):null!=e.composedPath?e.composedPath():S(e.target)}(e),i=0;i<r.length;i++){var o=r[i],a=M(o);null!=a&&(t.push(a),n.push(o))}return{idPath:t,nodePath:n}}function C(e){return"selectionchange"===e.type?function(){var e=window.getSelection(),t=e.toString(),n=e.anchorNode,r=e.focusNode,i=n&&n.nodeType===window.Node.TEXT_NODE||r&&r.nodeType===window.Node.TEXT_NODE;return t.length>=1&&"\n"!==t&&i}():"select"===e.type}var O={},R=["onStartShouldSetResponderCapture","onStartShouldSetResponder",{bubbles:!0}],k=["onMoveShouldSetResponderCapture","onMoveShouldSetResponder",{bubbles:!0}],P={touchstart:R,mousedown:R,touchmove:k,mousemove:k,scroll:["onScrollShouldSetResponderCapture","onScrollShouldSetResponder",{bubbles:!1}]},L={id:null,idPath:null,node:null},D=new Map,I=!1,N=0,j={id:null,node:null,idPath:null};function B(e){j=e}function F(e){var t=D.get(e);return null!=t?t:O}function z(e){var t=e.type,n=e.target;if("touchstart"===t&&(I=!0),("touchmove"===t||N>1)&&(I=!1),!("mousedown"===t&&I||"mousemove"===t&&I||"mousemove"===t&&N<1))if(I&&"mouseup"===t)0===N&&(I=!1);else{var r=a(t)&&function(e){var t=e.altKey,n=e.button,r=e.buttons,i=e.ctrlKey,o=e.type,a=!1===t&&!1===i;return!!("touchstart"===o||"touchmove"===o||"mousedown"===o&&(0===n||1===r)&&a||"mousemove"===o&&1===r&&a)}(e),i=s(t),o=l(t),u=function(e){return"scroll"===e}(t),h=function(e){return"select"===e||"selectionchange"===e}(t),d=A(e);(r||i||o)&&(e.touches?N=e.touches.length:r?N=1:o&&(N=0),b.recordTouchTrack(t,d.nativeEvent));var f,p=T(e),m=!1;if(r||i||u&&N>0){var g=j.idPath,v=p.idPath;if(null!=g&&null!=v){var y=function(e,t){var n=e.length,r=t.length;if(0===n||0===r||e[n-1]!==t[r-1])return null;var i=e[0],o=0,a=t[0],s=0;n-r>0&&(i=e[o=n-r],n=r),r-n>0&&(a=t[s=r-n],r=n);for(var l=n;l--;){if(i===a)return i;i=e[o++],a=t[s++]}return null}(g,v);if(null!=y){var w=v.indexOf(y)+(y===j.id?1:0);p={idPath:v.slice(w),nodePath:p.nodePath.slice(w)}}else p=null}null!=p&&null!=(f=function(e,t,n){var r=P[t.type];if(null!=r){for(var i=e.idPath,o=e.nodePath,a=r[0],s=r[1],l=r[2].bubbles,c=function(e,t,r){var o=F(e)[r];if(null!=o&&(n.currentTarget=t,!0===o(n)))return{id:e,node:t,idPath:i.slice(i.indexOf(e))}},u=i.length-1;u>=0;u--){var h=i[u],d=o[u],f=c(h,d,a);if(null!=f)return f;if(!0===n.isPropagationStopped())return}if(l)for(var p=0;p<i.length;p++){var m=i[p],g=o[p],v=c(m,g,s);if(null!=v)return v;if(!0===n.isPropagationStopped())return}else{var y=i[0],b=o[0];if(t.target===b)return c(y,b,s)}}}(p,e,d))&&(!function(e,t){var n=j,r=n.id,i=n.node,o=t.id,a=t.node,s=F(o),l=s.onResponderGrant,c=s.onResponderReject;if(e.bubbles=!1,e.cancelable=!1,e.currentTarget=a,null==r)null!=l&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderGrant",l(e)),B(t);else{var u=F(r),h=u.onResponderTerminate,d=u.onResponderTerminationRequest,f=!0;null!=d&&(e.currentTarget=i,e.dispatchConfig.registrationName="onResponderTerminationRequest",!1===d(e)&&(f=!1)),f?(null!=h&&(e.currentTarget=i,e.dispatchConfig.registrationName="onResponderTerminate",h(e)),null!=l&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderGrant",l(e)),B(t)):null!=c&&(e.currentTarget=a,e.dispatchConfig.registrationName="onResponderReject",c(e))}}(d,f),m=!0)}if(null!=j.id&&null!=j.node){var x=j,_=x.id,E=x.node,S=F(_),M=S.onResponderStart,O=S.onResponderMove,R=S.onResponderEnd,k=S.onResponderRelease,D=S.onResponderTerminate,z=S.onResponderTerminationRequest;if(d.bubbles=!1,d.cancelable=!1,d.currentTarget=E,r)null!=M&&(d.dispatchConfig.registrationName="onResponderStart",M(d));else if(i)null!=O&&(d.dispatchConfig.registrationName="onResponderMove",O(d));else{var H=c(t)||"contextmenu"===t||"blur"===t&&n===window||"blur"===t&&n.contains(E)&&e.relatedTarget!==E||u&&0===N||u&&n.contains(E)&&n!==E||h&&C(e),U=o&&!H&&!function(e,t){if(!t||0===t.length)return!1;for(var n=0;n<t.length;n++){var r=t[n].target;if(null!=r&&e.contains(r))return!0}return!1}(E,e.touches);if(o&&null!=R&&(d.dispatchConfig.registrationName="onResponderEnd",R(d)),U&&(null!=k&&(d.dispatchConfig.registrationName="onResponderRelease",k(d)),B(L)),H){var V=!0;"contextmenu"!==t&&"scroll"!==t&&"selectionchange"!==t||(m?V=!1:null!=z&&(d.dispatchConfig.registrationName="onResponderTerminationRequest",!1===z(d)&&(V=!1))),V&&(null!=D&&(d.dispatchConfig.registrationName="onResponderTerminate",D(d)),B(L),I=!1,N=0)}}}}}var H=["blur","scroll"],U=["mousedown","mousemove","mouseup","dragstart","touchstart","touchmove","touchend","touchcancel","contextmenu","select","selectionchange"];function V(e){j.id===e&&function(){var e=j,t=e.id,n=e.node;if(null!=t&&null!=n){var r=F(t).onResponderTerminate;if(null!=r){var i=A({});i.currentTarget=n,r(i)}B(L)}I=!1,N=0}(),D.has(e)&&D.delete(e)}var G={},W=0;function q(e,t){void 0===t&&(t=G);var n=function(e){var t=r.useRef(null);return null==t.current&&(t.current=e()),t.current}((function(){return W++})),o=r.useRef(!1);r.useEffect((function(){return i.canUseDOM&&null==window.__reactResponderSystemActive&&(window.addEventListener("blur",z),U.forEach((function(e){document.addEventListener(e,z)})),H.forEach((function(e){document.addEventListener(e,z,!0)})),window.__reactResponderSystemActive=!0),function(){V(n)}}),[n]),r.useEffect((function(){var r=t,i=r.onMoveShouldSetResponder,a=r.onMoveShouldSetResponderCapture,s=r.onScrollShouldSetResponder,l=r.onScrollShouldSetResponderCapture,c=r.onSelectionChangeShouldSetResponder,u=r.onSelectionChangeShouldSetResponderCapture,h=r.onStartShouldSetResponder,d=r.onStartShouldSetResponderCapture,f=null!=i||null!=a||null!=s||null!=l||null!=c||null!=u||null!=h||null!=d,p=e.current;f?(!function(e,t,n){!function(e,t){null!=e&&(e.__reactResponderId=t)}(t,e),D.set(e,n)}(n,p,t),o.current=!0):o.current&&(V(n),o.current=!1)}),[t,e,n]),r.useDebugValue({isResponder:e.current===j.node}),r.useDebugValue(t)}},function(e,t,n){"use strict";var r={adjustable:"slider",button:"button",header:"heading",image:"img",imagebutton:null,keyboardkey:null,label:null,link:"link",none:"presentation",search:"search",summary:"region",text:null},i=function(e){var t=e.accessibilityRole;if(t){var n=r[t];if(null!==n)return n||t}},o={article:"article",banner:"header",blockquote:"blockquote",code:"code",complementary:"aside",contentinfo:"footer",deletion:"del",emphasis:"em",figure:"figure",insertion:"ins",form:"form",link:"a",list:"ul",listitem:"li",main:"main",navigation:"nav",region:"section",strong:"strong"},a={},s={buttonLikeRoles:{button:!0,menuitem:!0},isDisabled:function(e){return e.disabled||Array.isArray(e.accessibilityStates)&&e.accessibilityStates.indexOf("disabled")>-1},propsToAccessibilityComponent:function(e){if(void 0===e&&(e=a),"label"===e.accessibilityRole)return"label";if(null!=e.href)return"a";var t=i(e);if(t){if("heading"===t){var n=e.accessibilityLevel||e["aria-level"];return null!=n?"h"+n:"h1"}return o[t]}},propsToAriaRole:i};t.a=s},function(e,t,n){var r,i;i=this,void 0===(r=function(){return function(e){"use strict";var t=e&&e.I18n||{},n=Array.prototype.slice,r=function(e){return("0"+e.toString()).substr(-2)},i=function(e){var t=typeof e;return"function"===t||"object"===t},o=function(e){return"function"===typeof e},a=function(e){return"undefined"!==typeof e&&null!==e},s=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},l=function(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)},c=function(e){return!0===e||!1===e},u=function(e){return null===e},h=function(e,t,n){return"undefined"===typeof n||0===+n?Math[e](t):(t=+t,n=+n,isNaN(t)||"number"!==typeof n||n%1!==0?NaN:(t=t.toString().split("e"),+((t=(t=Math[e](+(t[0]+"e"+(t[1]?+t[1]-n:-n)))).toString().split("e"))[0]+"e"+(t[1]?+t[1]+n:n))))},d=function(e,t){return o(e)?e(t):e},f=function(e,t){var n,r,i;for(n in t)t.hasOwnProperty(n)&&(r=t[n],"string"===typeof(i=r)||"[object String]"===Object.prototype.toString.call(i)||l(r)||c(r)||s(r)||u(r)?e[n]=r:(null==e[n]&&(e[n]={}),f(e[n],r)));return e},p={day_names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbr_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],month_names:[null,"January","February","March","April","May","June","July","August","September","October","November","December"],abbr_month_names:[null,"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridian:["AM","PM"]},m={precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1},g={unit:"$",precision:2,format:"%u%n",sign_first:!0,delimiter:",",separator:"."},v={unit:"%",precision:3,format:"%n%u",separator:".",delimiter:""},y=[null,"kb","mb","gb","tb"],b={defaultLocale:"en",locale:"en",defaultSeparator:".",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,fallbacks:!1,translations:{},missingBehaviour:"message",missingTranslationPrefix:""};return t.reset=function(){var e;for(e in b)this[e]=b[e]},t.initializeOptions=function(){var e;for(e in b)a(this[e])||(this[e]=b[e])},t.initializeOptions(),t.locales={},t.locales.get=function(e){var n=this[e]||this[t.locale]||this.default;return o(n)&&(n=n(e)),!1===s(n)&&(n=[n]),n},t.locales.default=function(e){var n=[],r=[];return e&&n.push(e),!e&&t.locale&&n.push(t.locale),t.fallbacks&&t.defaultLocale&&n.push(t.defaultLocale),n.forEach((function(e){var n=e.split("-"),i=null,o=null;3===n.length?(i=[n[0],n[1]].join("-"),o=n[0]):2===n.length&&(i=n[0]),-1===r.indexOf(e)&&r.push(e),t.fallbacks&&[i,o].forEach((function(t){"undefined"!==typeof t&&null!==t&&t!==e&&-1===r.indexOf(t)&&r.push(t)}))})),n.length||n.push("en"),r},t.pluralization={},t.pluralization.get=function(e){return this[e]||this[t.locale]||this.default},t.pluralization.default=function(e){switch(e){case 0:return["zero","other"];case 1:return["one"];default:return["other"]}},t.currentLocale=function(){return this.locale||this.defaultLocale},t.isSet=a,t.lookup=function(e,t){t=t||{};var n,r,i,o,s=this.locales.get(t.locale).slice();for(i=this.getFullScope(e,t);s.length;)if(n=s.shift(),r=i.split(t.separator||this.defaultSeparator),o=this.translations[n]){for(;r.length&&void 0!==(o=o[r.shift()])&&null!==o;);if(void 0!==o&&null!==o)return o}if(a(t.defaultValue))return d(t.defaultValue,e)},t.pluralizationLookupWithoutFallback=function(e,t,n){var r,o,s=this.pluralization.get(t)(e);if(i(n))for(;s.length;)if(r=s.shift(),a(n[r])){o=n[r];break}return o},t.pluralizationLookup=function(e,t,n){n=n||{};var r,o,s,l,c=this.locales.get(n.locale).slice();for(t=this.getFullScope(t,n);c.length;)if(r=c.shift(),o=t.split(n.separator||this.defaultSeparator),s=this.translations[r]){for(;o.length&&(s=s[o.shift()],i(s));)0===o.length&&(l=this.pluralizationLookupWithoutFallback(e,r,s));if("undefined"!==typeof l&&null!==l)break}return"undefined"!==typeof l&&null!==l||a(n.defaultValue)&&(l=i(n.defaultValue)?this.pluralizationLookupWithoutFallback(e,n.locale,n.defaultValue):n.defaultValue,s=n.defaultValue),{message:l,translations:s}},t.meridian=function(){var e=this.lookup("time"),t=this.lookup("date");return e&&e.am&&e.pm?[e.am,e.pm]:t&&t.meridian?t.meridian:p.meridian},t.prepareOptions=function(){for(var e,t=n.call(arguments),r={};t.length;)if("object"==typeof(e=t.shift()))for(var i in e)e.hasOwnProperty(i)&&(a(r[i])||(r[i]=e[i]));return r},t.createTranslationOptions=function(e,t){var n=[{scope:e}];return a(t.defaults)&&(n=n.concat(t.defaults)),a(t.defaultValue)&&n.push({message:t.defaultValue}),n},t.translate=function(e,t){t=t||{};var n,r=this.createTranslationOptions(e,t),o=e,l=this.prepareOptions(t);return delete l.defaultValue,r.some((function(t){if(a(t.scope)?(o=t.scope,n=this.lookup(o,l)):a(t.message)&&(n=d(t.message,e)),void 0!==n&&null!==n)return!0}),this)?("string"===typeof n?n=this.interpolate(n,t):s(n)?n=n.map((function(e){return"string"===typeof e?this.interpolate(e,t):e}),this):i(n)&&a(t.count)&&(n=this.pluralize(t.count,o,t)),n):this.missingTranslation(e,t)},t.interpolate=function(e,t){if(null==e)return e;t=t||{};var n,r,i,o,s=e.match(this.placeholder);if(!s)return e;for(;s.length;)i=(n=s.shift()).replace(this.placeholder,"$1"),r=a(t[i])?t[i].toString().replace(/\$/gm,"_#$#_"):i in t?this.nullPlaceholder(n,e,t):this.missingPlaceholder(n,e,t),o=new RegExp(n.replace(/{/gm,"\\{").replace(/}/gm,"\\}")),e=e.replace(o,r);return e.replace(/_#\$#_/g,"$")},t.pluralize=function(e,t,n){var r,i;return n=this.prepareOptions({count:String(e)},n),"undefined"===typeof(i=this.pluralizationLookup(e,t,n)).translations||null==i.translations?this.missingTranslation(t,n):"undefined"!==typeof i.message&&null!=i.message?this.interpolate(i.message,n):(r=this.pluralization.get(n.locale),this.missingTranslation(t+"."+r(e)[0],n))},t.missingTranslation=function(e,t){if("guess"===this.missingBehaviour){var n=e.split(".").slice(-1)[0];return(this.missingTranslationPrefix.length>0?this.missingTranslationPrefix:"")+n.replace(/_/g," ").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+" "+n.toLowerCase()}))}return'[missing "'+[null!=t&&null!=t.locale?t.locale:this.currentLocale(),this.getFullScope(e,t)].join(t.separator||this.defaultSeparator)+'" translation]'},t.missingPlaceholder=function(e,t,n){return"[missing "+e+" value]"},t.nullPlaceholder=function(){return t.missingPlaceholder.apply(t,arguments)},t.toNumber=function(e,t){t=this.prepareOptions(t,this.lookup("number.format"),m);var n,r,i=e<0,o=function(e,t){return h("round",e,-t).toFixed(t)}(Math.abs(e),t.precision).toString().split("."),a=[],s=t.format||"%n",l=i?"-":"";for(e=o[0],n=o[1];e.length>0;)a.unshift(e.substr(Math.max(0,e.length-3),3)),e=e.substr(0,e.length-3);return r=a.join(t.delimiter),t.strip_insignificant_zeros&&n&&(n=n.replace(/0+$/,"")),t.precision>0&&n&&(r+=t.separator+n),r=(s=t.sign_first?"%s"+s:s.replace("%n","%s%n")).replace("%u",t.unit).replace("%n",r).replace("%s",l)},t.toCurrency=function(e,t){return t=this.prepareOptions(t,this.lookup("number.currency.format",t),this.lookup("number.format",t),g),this.toNumber(e,t)},t.localize=function(e,t,n){switch(n||(n={}),e){case"currency":return this.toCurrency(t,n);case"number":return e=this.lookup("number.format",n),this.toNumber(t,e);case"percentage":return this.toPercentage(t,n);default:var r;return r=e.match(/^(date|time)/)?this.toTime(e,t,n):t.toString(),this.interpolate(r,n)}},t.parseDate=function(e){var t,n,r;if(null==e)return e;if("object"===typeof e)return e;if(t=e.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2})([\.,]\d{1,3})?)?(Z|\+00:?00)?/)){for(var i=1;i<=6;i++)t[i]=parseInt(t[i],10)||0;t[2]-=1,r=t[7]?1e3*("0"+t[7]):null,n=t[8]?new Date(Date.UTC(t[1],t[2],t[3],t[4],t[5],t[6],r)):new Date(t[1],t[2],t[3],t[4],t[5],t[6],r)}else"number"==typeof e?(n=new Date).setTime(e):e.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\d+) (\d+:\d+:\d+) ([+-]\d+) (\d+)/)?(n=new Date).setTime(Date.parse([RegExp.$1,RegExp.$2,RegExp.$3,RegExp.$6,RegExp.$4,RegExp.$5].join(" "))):(e.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),(n=new Date).setTime(Date.parse(e)));return n},t.strftime=function(e,n,i){i=this.lookup("date",i);var o=t.meridian();if(i||(i={}),i=this.prepareOptions(i,p),isNaN(e.getTime()))throw new Error("I18n.strftime() requires a valid date object, but received an invalid date.");var a=e.getDay(),s=e.getDate(),l=e.getFullYear(),c=e.getMonth()+1,u=e.getHours(),h=u,d=u>11?1:0,f=e.getSeconds(),m=e.getMinutes(),g=e.getTimezoneOffset(),v=Math.floor(Math.abs(g/60)),y=Math.abs(g)-60*v,b=(g>0?"-":"+")+(v.toString().length<2?"0"+v:v)+(y.toString().length<2?"0"+y:y);return h>12?h-=12:0===h&&(h=12),n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n.replace("%a",i.abbr_day_names[a])).replace("%A",i.day_names[a])).replace("%b",i.abbr_month_names[c])).replace("%B",i.month_names[c])).replace("%d",r(s))).replace("%e",s)).replace("%-d",s)).replace("%H",r(u))).replace("%-H",u)).replace("%k",u)).replace("%I",r(h))).replace("%-I",h)).replace("%l",h)).replace("%m",r(c))).replace("%-m",c)).replace("%M",r(m))).replace("%-M",m)).replace("%p",o[d])).replace("%P",o[d].toLowerCase())).replace("%S",r(f))).replace("%-S",f)).replace("%w",a)).replace("%y",r(l))).replace("%-y",r(l).replace(/^0+/,""))).replace("%Y",l)).replace("%z",b)).replace("%Z",b)},t.toTime=function(e,t,n){var r=this.parseDate(t),i=this.lookup(e,n);if(null==r)return r;var o=r.toString();return o.match(/invalid/i)?o:i?this.strftime(r,i,n):o},t.toPercentage=function(e,t){return t=this.prepareOptions(t,this.lookup("number.percentage.format",t),this.lookup("number.format",t),v),this.toNumber(e,t)},t.toHumanSize=function(e,t){for(var n,r,i,o=e,a=0;o>=1024&&a<4;)o/=1024,a+=1;return 0===a?(i=this.getFullScope("number.human.storage_units.units.byte",t),n=this.t(i,{count:o}),r=0):(i=this.getFullScope("number.human.storage_units.units."+y[a],t),n=this.t(i),r=o-Math.floor(o)===0?0:1),t=this.prepareOptions(t,{unit:n,precision:r,format:"%n%u",delimiter:""}),this.toNumber(o,t)},t.getFullScope=function(e,t){return t=t||{},s(e)&&(e=e.join(t.separator||this.defaultSeparator)),t.scope&&(e=[t.scope,e].join(t.separator||this.defaultSeparator)),e},t.extend=function(e,t){return"undefined"===typeof e&&"undefined"===typeof t?{}:f(e,t)},t.t=t.translate.bind(t),t.l=t.localize.bind(t),t.p=t.pluralize.bind(t),t}(i)}.call(t,n,t,e))||(e.exports=r)},function(e,t,n){"use strict";t.a=function(e){if(null!=e&&(1===e.nodeType&&"function"===typeof e.getBoundingClientRect))return e.getBoundingClientRect()}},function(e,t,n){"use strict";var r=/^[+-]?\d*(?:\.\d+)?(?:[Ee][+-]?\d+)?(%|\w*)/;t.a=function(e,t){var n;return"string"===typeof e?""+parseFloat(e)*t+e.match(r)[1]:(n=e,!isNaN(parseFloat(n))&&isFinite(n)?e*t:void 0)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"===typeof e&&r.test(e)};var r=/-webkit-|-moz-|-ms-/;e.exports=t.default},function(e,t,n){"use strict";var r=n(0),i=n(2);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=function(e){var t,n;function s(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).frame=null,t.onLayout=function(e){t.frame=e.nativeEvent.layout},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var l=s.prototype;return l.relativeKeyboardHeight=function(e){var t=this.frame;if(!t||!e)return 0;var n=e.screenY-(this.props.keyboardVerticalOffset||0);return Math.max(t.y+t.height-n,0)},l.onKeyboardChange=function(e){},l.render=function(){var e=this.props,t=(e.behavior,e.contentContainerStyle,e.keyboardVerticalOffset,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["behavior","contentContainerStyle","keyboardVerticalOffset"]));return r.createElement(i.a,o({onLayout:this.onLayout},t))},s}(r.Component);t.a=s},function(e,t,n){"use strict";var r=n(6),i=n.n(r),o=n(40);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={getStateForAction:function(e,t){switch(t.type){case"SET_PARAMS":var n=t.source?e.routes.findIndex((function(e){return e.key===t.source})):e.index;return-1===n?null:s(s({},e),{},{routes:e.routes.map((function(e,r){return r===n?s(s({},e),{},{params:s(s({},e.params),t.payload.params)}):e}))});case"RESET":var r=t.payload;return 0===r.routes.length||r.routes.some((function(t){return!e.routeNames.includes(t.name)}))?null:!1===r.stale?e.routeNames.length!==r.routeNames.length||r.routeNames.some((function(t){return!e.routeNames.includes(t)}))?null:s(s({},r),{},{routes:r.routes.map((function(e){return e.key?e:s(s({},e),{},{key:"".concat(e.name,"-").concat(Object(o.a)())})}))}):r;default:return null}},shouldActionChangeFocus:function(e){return"NAVIGATE"===e.type}};t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return x}));var r=n(4),i=n.n(r),o=n(120),a=n(0),s=n.n(a),l=n(5),c=n(2),u=a.createContext(null);function h(e){var t=e.children,n=e.WrapperComponent,r=a.createElement(c.a,{children:t,key:1,pointerEvents:"box-none",style:d.appContainer});return n&&(r=a.createElement(n,null,r)),a.createElement(u.Provider,{value:e.rootTag},a.createElement(c.a,{pointerEvents:"box-none",style:d.appContainer},r))}var d=l.a.create({appContainer:{flex:1}}),f=n(61),p=n(119),m=n(94);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var v,y={},b={},w=function(e){return e()},x=function(){function e(){}return e.getAppKeys=function(){return Object.keys(b)},e.getApplication=function(e,t){return i()(b[e]&&b[e].getApplication,"Application "+e+" has not been registered. This is either due to an import error during initialization or failure to call AppRegistry.registerComponent."),b[e].getApplication(t)},e.registerComponent=function(e,t){return b[e]={getApplication:function(e){return n=w(t),r=e?e.initialProps:y,i=v&&v(e),{element:s.a.createElement(h,{WrapperComponent:i,rootTag:{}},s.a.createElement(n,r)),getStyleElement:function(e){var t=m.a.getStyleSheet();return s.a.createElement("style",g({},e,{dangerouslySetInnerHTML:{__html:t.textContent},id:t.id}))}};var n,r,i},run:function(e){return function(e,t,n,r){var o=r.hydrate,a=r.initialProps,l=r.rootTag,c=o?f.hydrate:p.a;i()(l,"Expect to have a valid rootTag, instead got ",l),c(s.a.createElement(h,{WrapperComponent:t,rootTag:l},s.a.createElement(e,a)),l,n)}(w(t),v&&v(e),e.callback,{hydrate:e.hydrate||!1,initialProps:e.initialProps||y,rootTag:e.rootTag})}},e},e.registerConfig=function(t){t.forEach((function(t){var n=t.appKey,r=t.component,o=t.run;o?e.registerRunnable(n,o):(i()(r,"No component provider passed in"),e.registerComponent(n,r))}))},e.registerRunnable=function(e,t){return b[e]={run:t},e},e.runApplication=function(e,t){i()(b[e]&&b[e].run,'Application "'+e+'" has not been registered. This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.'),b[e].run(t)},e.setComponentProviderInstrumentationHook=function(e){w=e},e.setWrapperComponentProvider=function(e){v=e},e.unmountApplicationComponentAtRootTag=function(e){Object(o.a)(e)},e}()},function(e,t,n){"use strict";var r={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexOrder:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,gridRow:!0,gridRowEnd:!0,gridRowGap:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridColumnStart:!0,lineClamp:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0,scale:!0,scaleX:!0,scaleY:!0,scaleZ:!0,shadowOpacity:!0},i=["ms","Moz","O","Webkit"];Object.keys(r).forEach((function(e){i.forEach((function(t){r[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(t,e)]=r[e]}))})),t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r={},i={},o=1,a=function(e){return"r-"+e},s=function(){function e(){}return e.register=function(e){var t=o++;var n=a(t);return i[n]=e,t},e.getByID=function(e){if(!e)return r;var t=a(e),n=i[t];return n||(console.warn("Invalid style with id `"+e+"`. Skipping ..."),r)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i="function"===typeof Symbol&&"symbol"===typeof Symbol()?Symbol():Object.freeze({});function o(e){var t=r.useRef(i);return t.current===i&&(t.current=e()),t.current}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t=function(e,t){if("object"!==typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===typeof t?t:String(t)}t.a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=(t instanceof Array?t.length?t:[void 0]:[t]).map((function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}})),c=e.reduce((function(e,t){var i=e,o=t;return s.forEach((function(e,t){var a,c=e.keyAccessor;if(e.isProp){var u=o,h=u[c],d=r(u,[c].map(l));a=h,o=d}else a=c(o,t);t+1<s.length?(i.hasOwnProperty(a)||(i[a]={}),i=i[a]):n?(i.hasOwnProperty(a)||(i[a]=[]),i[a].push(o)):i[a]=o})),e}),{});n instanceof Function&&function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;r===s.length?Object.keys(t).forEach((function(e){return t[e]=n(t[e])})):Object.values(t).forEach((function(t){return e(t,r+1)}))}(c);var u=c;return a&&(u=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===s.length?u.push({keys:n,vals:t}):Object.entries(t).forEach((function(t){var r=i(t,2),a=r[0],s=r[1];return e(s,[].concat(o(n),[a]))}))}(c),t instanceof Array&&0===t.length&&1===u.length&&(u[0].keys=[])),u}},function(e,t,n){var r;!function(i){var o=/^\s+/,a=/\s+$/,s=0,l=i.round,c=i.min,u=i.max,h=i.random;function d(e,t){if(t=t||{},(e=e||"")instanceof d)return e;if(!(this instanceof d))return new d(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,s=null,l=null,h=!1,d=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(a,"").toLowerCase();var t,n=!1;if(R[e])e=R[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=z.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=z.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=z.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=z.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=z.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=z.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=z.hex8.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),a:F(t[4]),format:n?"name":"hex8"};if(t=z.hex6.exec(e))return{r:I(t[1]),g:I(t[2]),b:I(t[3]),format:n?"name":"hex"};if(t=z.hex4.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),a:F(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=z.hex3.exec(e))return{r:I(t[1]+""+t[1]),g:I(t[2]+""+t[2]),b:I(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(H(e.r)&&H(e.g)&&H(e.b)?(f=e.r,p=e.g,m=e.b,t={r:255*L(f,255),g:255*L(p,255),b:255*L(m,255)},h=!0,d="%"===String(e.r).substr(-1)?"prgb":"rgb"):H(e.h)&&H(e.s)&&H(e.v)?(r=j(e.s),s=j(e.v),t=function(e,t,n){e=6*L(e,360),t=L(t,100),n=L(n,100);var r=i.floor(e),o=e-r,a=n*(1-t),s=n*(1-o*t),l=n*(1-(1-o)*t),c=r%6;return{r:255*[n,s,a,a,l,n][c],g:255*[l,n,n,s,a,a][c],b:255*[a,a,l,n,n,s][c]}}(e.h,r,s),h=!0,d="hsv"):H(e.h)&&H(e.s)&&H(e.l)&&(r=j(e.s),l=j(e.l),t=function(e,t,n){var r,i,o;function a(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+(t-e)*(2/3-n)*6:e}if(e=L(e,360),t=L(t,100),n=L(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,l),h=!0,d="hsl"),e.hasOwnProperty("a")&&(n=e.a));var f,p,m;return n=P(n),{ok:h,format:e.format||d,r:c(255,u(t.r,0)),g:c(255,u(t.g,0)),b:c(255,u(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=l(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=n.ok,this._tc_id=s++}function f(e,t,n){e=L(e,255),t=L(t,255),n=L(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:s}}function p(e,t,n){e=L(e,255),t=L(t,255),n=L(n,255);var r,i,o=u(e,t,n),a=c(e,t,n),s=o,l=o-a;if(i=0===o?0:l/o,o==a)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:s}}function m(e,t,n,r){var i=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(e,t,n,r){return[N(B(r)),N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16))].join("")}function v(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s-=t/100,n.s=D(n.s),d(n)}function y(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.s+=t/100,n.s=D(n.s),d(n)}function b(e){return d(e).desaturate(100)}function w(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l+=t/100,n.l=D(n.l),d(n)}function x(e,t){t=0===t?0:t||10;var n=d(e).toRgb();return n.r=u(0,c(255,n.r-l(-t/100*255))),n.g=u(0,c(255,n.g-l(-t/100*255))),n.b=u(0,c(255,n.b-l(-t/100*255))),d(n)}function _(e,t){t=0===t?0:t||10;var n=d(e).toHsl();return n.l-=t/100,n.l=D(n.l),d(n)}function E(e,t){var n=d(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,d(n)}function A(e){var t=d(e).toHsl();return t.h=(t.h+180)%360,d(t)}function S(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+120)%360,s:t.s,l:t.l}),d({h:(n+240)%360,s:t.s,l:t.l})]}function M(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+90)%360,s:t.s,l:t.l}),d({h:(n+180)%360,s:t.s,l:t.l}),d({h:(n+270)%360,s:t.s,l:t.l})]}function T(e){var t=d(e).toHsl(),n=t.h;return[d(e),d({h:(n+72)%360,s:t.s,l:t.l}),d({h:(n+216)%360,s:t.s,l:t.l})]}function C(e,t,n){t=t||6,n=n||30;var r=d(e).toHsl(),i=360/n,o=[d(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(d(r));return o}function O(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(d({h:r,s:i,v:o})),o=(o+s)%1;return a}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:i.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=l(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=f(this._r,this._g,this._b),t=l(360*e.h),n=l(100*e.s),r=l(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[N(l(e).toString(16)),N(l(t).toString(16)),N(l(n).toString(16)),N(B(r))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*L(this._r,255))+"%",g:l(100*L(this._g,255))+"%",b:l(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*L(this._r,255))+"%, "+l(100*L(this._g,255))+"%, "+l(100*L(this._b,255))+"%)":"rgba("+l(100*L(this._r,255))+"%, "+l(100*L(this._g,255))+"%, "+l(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=d(e);n="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(x,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(E,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(A,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(T,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:j(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:h(),g:h(),b:h()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),i=d(t).toRgb(),o=n/100;return d({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(i.max(n.getLuminance(),r.getLuminance())+.05)/(i.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,i,o=d.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},d.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var c=0;c<t.length;c++)(r=d.readability(e,t[c]))>l&&(l=r,s=d(t[c]));return d.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var R=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(R);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function L(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"===typeof e&&-1!=e.indexOf("%")}(e);return e=c(t,u(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),i.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function D(e){return c(1,u(0,e))}function I(e){return parseInt(e,16)}function N(e){return 1==e.length?"0"+e:""+e}function j(e){return e<=1&&(e=100*e+"%"),e}function B(e){return i.round(255*parseFloat(e)).toString(16)}function F(e){return I(e)/255}var z=function(){var e="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",t="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?",n="[\\s|\\(]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")[,|\\s]+("+e+")\\s*\\)?";return{CSS_UNIT:new RegExp(e),rgb:new RegExp("rgb"+t),rgba:new RegExp("rgba"+n),hsl:new RegExp("hsl"+t),hsla:new RegExp("hsla"+n),hsv:new RegExp("hsv"+t),hsva:new RegExp("hsva"+n),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function H(e){return!!z.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));n(6);var r=n(0);var i={value:!1};function o(e){r.useMemo((function(){return{current:new Map}}),[]);return e}},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,i=n||r||Function("return this")();function o(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function a(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var s=Object.prototype,l=s.hasOwnProperty,c=s.toString,u=i.Symbol,h=s.propertyIsEnumerable,d=u?u.isConcatSpreadable:void 0,f=Math.max;function p(e){return g(e)||function(e){return function(e){return v(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}(e)}(e)&&l.call(e,"callee")&&(!h.call(e,"callee")||"[object Arguments]"==c.call(e))}(e)||!!(d&&e&&e[d])}function m(e){if("string"==typeof e||function(e){return"symbol"==typeof e||v(e)&&"[object Symbol]"==c.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}var g=Array.isArray;function v(e){return!!e&&"object"==typeof e}var y,b,w=(y=function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=e[a];n(s,a)&&(o[a]=s)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}(function e(t,n,r,i,o){var s=-1,l=t.length;for(r||(r=p),o||(o=[]);++s<l;){var c=t[s];n>0&&r(c)?n>1?e(c,n-1,r,i,o):a(o,c):i||(o[o.length]=c)}return o}(t,1),m))},b=f(void 0===b?y.length-1:b,0),function(){for(var e=arguments,t=-1,n=f(e.length-b,0),r=Array(n);++t<n;)r[t]=e[b+t];t=-1;for(var i=Array(b+1);++t<b;)i[t]=e[t];return i[b]=r,o(y,this,i)});e.exports=w}).call(this,n(43))},function(t,n){var r,i,o=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:a}catch(e){r=a}try{i="function"===typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,u=[],h=!1,d=-1;function f(){h&&c&&(h=!1,c.length?u=c.concat(u):d=-1,u.length&&p())}function p(){if(!h){var t=l(f);h=!0;for(var n=u.length;n;){for(c=u,u=[];++d<n;)c&&c[d].run();d=-1,n=u.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function m(e,t){this.fun=e,this.array=t}function g(){}o.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 m(e,t)),1!==u.length||h||l(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return null!=e&&"object"===typeof e&&!0===e["@@functional/placeholder"]}},function(e,t,n){var r=n(85),i=n(53),o=n(38),a=n(376),s=o((function(e,t){return 1===e?i(t):r(e,a(e,[],t))}));e.exports=s},function(e,t){e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},function(e,t,n){"use strict";var r=n(89),i=n.n(r);t.a=function(e){if(void 0===e||null===e)return e;var t=i()(e);return void 0!==t&&null!==t?t=(t<<24|t>>>8)>>>0:void 0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(33),i=function(){function e(){}return e.get=function(){return r.a.get("window").scale},e.getFontScale=function(){return r.a.get("window").fontScale||e.get()},e.getPixelSizeForLayoutSize=function(t){return Math.round(t*e.get())},e.roundToNearestPixel=function(t){var n=e.get();return Math.round(t*n)/n},e}()},function(e,t,n){"use strict";var r=n(2),i=n(0),o=n.n(i);t.a=function(e){e.colors,e.enabled,e.onRefresh,e.progressBackgroundColor,e.progressViewOffset,e.refreshing,e.size,e.tintColor,e.title,e.titleColor;var t=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["colors","enabled","onRefresh","progressBackgroundColor","progressViewOffset","refreshing","size","tintColor","title","titleColor"]);return o.a.createElement(r.a,t)}},function(e,t,n){"use strict";var r=n(19),i=n.n(r),o=n(0),a=n(72),s=n(36),l=n(75),c={accessibilityDisabled:!0,accessibilityLabel:!0,accessibilityLiveRegion:!0,accessibilityRole:!0,accessibilityState:!0,accessibilityValue:!0,children:!0,disabled:!0,focusable:!0,nativeID:!0,onBlur:!0,onFocus:!0,onLayout:!0,testID:!0};var u=o.memo(o.forwardRef((function(e,t){var n=e.delayPressIn,r=e.delayPressOut,u=e.delayLongPress,h=e.disabled,d=e.focusable,f=e.onLongPress,p=e.onPress,m=e.onPressIn,g=e.onPressOut,v=e.rejectResponderTermination,y=Object(o.useRef)(null),b=Object(o.useMemo)((function(){return{cancelable:!v,disabled:h,delayLongPress:u,delayPressStart:n,delayPressEnd:r,onLongPress:f,onPress:p,onPressStart:m,onPressEnd:g}}),[h,n,r,u,f,p,m,g,v]),w=Object(l.a)(y,b),x=o.Children.only(e.children),_=[x.props.children],E=function(e){return Object(a.a)(e,c)}(e);E.accessibilityDisabled=h,E.focusable=!h&&!1!==d,E.ref=Object(s.a)(t,y,x.ref);var A=i()(E,w);return o.cloneElement.apply(o,[x,A].concat(_))})));u.displayName="TouchableWithoutFeedback",t.a=u},function(e,t,n){"use strict";var r=n(61);t.a=r.render},function(e,t,n){"use strict";var r=n(61);t.a=r.unmountComponentAtNode},function(e,t,n){"use strict";var r=n(132),i={addListener:function(){return{remove:function(){}}},dismiss:function(){Object(r.a)()},removeAllListeners:function(){},removeListener:function(){}};t.a=i},function(e,t,n){"use strict";var r=n(0),i=n(13),o=n(5),a=n(2);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=i.canUseDOM&&window.CSS&&window.CSS.supports&&window.CSS.supports("top: constant(safe-area-inset-top)")?"constant":"env",c=r.forwardRef((function(e,t){var n=e.style,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["style"]);return r.createElement(a.a,s({},i,{ref:t,style:o.a.compose(u.root,n)}))}));c.displayName="SafeAreaView";var u=o.a.create({root:{paddingTop:l+"(safe-area-inset-top)",paddingRight:l+"(safe-area-inset-right)",paddingBottom:l+"(safe-area-inset-bottom)",paddingLeft:l+"(safe-area-inset-left)"}});t.a=c},function(e,t,n){"use strict";var r=n(0),i=n(36),o=n(75),a=n(5),s=n(2);function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){return{child:{opacity:null!==e&&void 0!==e?e:.85},underlay:{backgroundColor:void 0===t?"black":t}}}function u(e){return null!=e.onPress||null!=e.onPressIn||null!=e.onPressOut||null!=e.onLongPress}var h=a.a.create({root:{userSelect:"none"},actionable:{cursor:"pointer",touchAction:"manipulation"}}),d=r.memo(r.forwardRef((function(e,t){var n=e.activeOpacity,d=e.children,f=e.delayPressIn,p=e.delayPressOut,m=e.delayLongPress,g=e.disabled,v=e.focusable,y=e.onHideUnderlay,b=e.onLongPress,w=e.onPress,x=e.onPressIn,_=e.onPressOut,E=e.onShowUnderlay,A=e.rejectResponderTermination,S=e.style,M=e.testOnly_pressed,T=e.underlayColor,C=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["activeOpacity","children","delayPressIn","delayPressOut","delayLongPress","disabled","focusable","onHideUnderlay","onLongPress","onPress","onPressIn","onPressOut","onShowUnderlay","rejectResponderTermination","style","testOnly_pressed","underlayColor"]),O=Object(r.useRef)(null),R=Object(i.a)(t,O),k=Object(r.useState)(!0===M?c(n,T):null),P=k[0],L=k[1],D=Object(r.useCallback)((function(){u(e)&&(L(c(n,T)),null!=E&&E())}),[n,E,e,T]),I=Object(r.useCallback)((function(){!0!==M&&u(e)&&(L(null),null!=y&&y())}),[y,e,M]),N=Object(r.useMemo)((function(){return{cancelable:!A,disabled:g,delayLongPress:m,delayPressStart:f,delayPressEnd:p,onLongPress:b,onPress:w,onPressStart:function(e){D(),null!=x&&x(e)},onPressEnd:function(e){I(),null!=_&&_(e)}}}),[m,f,p,g,b,w,x,_,A,D,I]),j=Object(o.a)(O,N),B=r.Children.only(d);return r.createElement(s.a,l({},C,j,{accessibilityDisabled:g,focusable:!g&&!1!==v,ref:R,style:[h.root,S,!g&&h.actionable,P&&P.underlay]}),r.cloneElement(B,{style:a.a.compose(B.props.style,P&&P.child)}))})));d.displayName="TouchableHighlight",t.a=d},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(79);function o(e){r.useEffect((function(){var t=i.a.addEventListener("hardwareBackPress",(function(){var t=e.current;return null!=t&&(!!t.canGoBack()&&(t.goBack(),!0))}));return function(){return t.remove()}}),[e])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(144);function o(e){var t=e.value,n=e.children;return r.createElement(i.a.Provider,{value:t},n)}},function(e,t,n){"use strict";var r=n(8),i=n(0),o=n(2),a=n(76),s=n(4),l=n.n(s);function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this)._getItem=function(e,t,n){if(!t)return null;for(var r=n-1,i=0;i<t.length;i++){var o=t[i],a=o.data,s=e.getItemCount(a);if(-1===r||r===s)return o;if(r<s)return e.getItem(a,r);r-=s+2}return null},t._keyExtractor=function(e,n){var r=t._subExtractor(n);return r&&r.key||String(n)},t._convertViewable=function(e){l()(null!=e.index,"Received a broken ViewToken");var n=t._subExtractor(e.index);if(!n)return null;var r=n.section.keyExtractor||t.props.keyExtractor;return f(f({},e),{},{index:n.index,key:r(e.item,n.index),section:n.section})},t._onViewableItemsChanged=function(e){var n=e.viewableItems,r=e.changed,i=t.props.onViewableItemsChanged;null!=i&&i({viewableItems:n.map(t._convertViewable,m(t)).filter(Boolean),changed:r.map(t._convertViewable,m(t)).filter(Boolean)})},t._renderItem=function(e){return function(n){var r=n.item,o=n.index,a=t._subExtractor(o);if(!a)return null;var s=a.index;if(null==s){var c=a.section;if(!0===a.header){var u=t.props.renderSectionHeader;return u?u({section:c}):null}var h=t.props.renderSectionFooter;return h?h({section:c}):null}var d=a.section.renderItem||t.props.renderItem,f=t._getSeparatorComponent(o,a,e);return l()(d,"no renderItem!"),i.createElement(b,{SeparatorComponent:f,LeadingSeparatorComponent:0===s?t.props.SectionSeparatorComponent:void 0,cellKey:a.key,index:s,item:r,leadingItem:a.leadingItem,leadingSection:a.leadingSection,onUpdateSeparator:t._onUpdateSeparator,prevCellKey:(t._subExtractor(o-1)||{}).key,ref:function(e){t._cellRefs[a.key]=e},renderItem:d,section:a.section,trailingItem:a.trailingItem,trailingSection:a.trailingSection,inverted:!!t.props.inverted})}},t._onUpdateSeparator=function(e,n){var r=t._cellRefs[e];r&&r.updateSeparatorProps(n)},t._cellRefs={},t._captureRef=function(e){t._listRef=e},t}g(t,e);var n=t.prototype;return n.scrollToLocation=function(e){for(var t=e.itemIndex,n=0;n<e.sectionIndex;n++)t+=this.props.getItemCount(this.props.sections[n].data)+2;var r=e.viewOffset||0;if(null!=this._listRef){if(e.itemIndex>0&&this.props.stickySectionHeadersEnabled)r+=this._listRef._getFrameMetricsApprox(t-e.itemIndex).length;var i=f(f({},e),{},{viewOffset:r,index:t});this._listRef.scrollToIndex(i)}},n.getListRef=function(){return this._listRef},n.render=function(){for(var e,t=this,n=this.props,r=(n.ItemSeparatorComponent,n.SectionSeparatorComponent,n.renderItem,n.renderSectionFooter,n.renderSectionHeader,n.sections,n.stickySectionHeadersEnabled,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["ItemSeparatorComponent","SectionSeparatorComponent","renderItem","renderSectionFooter","renderSectionHeader","sections","stickySectionHeadersEnabled"])),o=this.props.ListHeaderComponent?1:0,s=this.props.stickySectionHeadersEnabled?[]:void 0,l=0,h=u(this.props.sections);!(e=h()).done;){var d=e.value;null!=s&&s.push(l+o),l+=2,l+=this.props.getItemCount(d.data)}var f=this._renderItem(l);return i.createElement(a.a,c({},r,{keyExtractor:this._keyExtractor,stickyHeaderIndices:s,renderItem:f,data:this.props.sections,getItem:function(e,n){return t._getItem(t.props,e,n)},getItemCount:function(){return l},onViewableItemsChanged:this.props.onViewableItemsChanged?this._onViewableItemsChanged:void 0,ref:this._captureRef}))},n._subExtractor=function(e){for(var t=e,n=this.props,r=n.getItem,i=n.getItemCount,o=n.keyExtractor,a=n.sections,s=0;s<a.length;s++){var l=a[s],c=l.data,u=l.key||String(s);if(!((t-=1)>=i(c)+1))return-1===t?{section:l,key:u+":header",index:null,header:!0,trailingSection:a[s+1]}:t===i(c)?{section:l,key:u+":footer",index:null,header:!1,trailingSection:a[s+1]}:{section:l,key:u+":"+(l.keyExtractor||o)(r(c,t),t),index:t,leadingItem:r(c,t-1),leadingSection:a[s-1],trailingItem:r(c,t+1),trailingSection:a[s+1]};t-=i(c)+1}},n._getSeparatorComponent=function(e,t,n){if(!(t=t||this._subExtractor(e)))return null;var r=t.section.ItemSeparatorComponent||this.props.ItemSeparatorComponent,i=this.props.SectionSeparatorComponent,o=e===n-1,a=t.index===this.props.getItemCount(t.section.data)-1;return i&&a?i:!r||a||o?null:r},t}(i.PureComponent);y.defaultProps=f(f({},a.a.defaultProps),{},{data:[]});var b=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={separatorProps:{highlighted:!1,leadingItem:t.props.item,leadingSection:t.props.leadingSection,section:t.props.section,trailingItem:t.props.trailingItem,trailingSection:t.props.trailingSection},leadingSeparatorProps:{highlighted:!1,leadingItem:t.props.leadingItem,leadingSection:t.props.leadingSection,section:t.props.section,trailingItem:t.props.item,trailingSection:t.props.trailingSection}},t._separators={highlight:function(){["leading","trailing"].forEach((function(e){return t._separators.updateProps(e,{highlighted:!0})}))},unhighlight:function(){["leading","trailing"].forEach((function(e){return t._separators.updateProps(e,{highlighted:!1})}))},updateProps:function(e,n){var r=t.props,i=r.LeadingSeparatorComponent,o=r.cellKey,a=r.prevCellKey;"leading"===e&&null!=i?t.setState((function(e){return{leadingSeparatorProps:f(f({},e.leadingSeparatorProps),n)}})):t.props.onUpdateSeparator("leading"===e&&a||o,n)}},t}g(t,e),t.getDerivedStateFromProps=function(e,t){return{separatorProps:f(f({},t.separatorProps),{},{leadingItem:e.item,leadingSection:e.leadingSection,section:e.section,trailingItem:e.trailingItem,trailingSection:e.trailingSection}),leadingSeparatorProps:f(f({},t.leadingSeparatorProps),{},{leadingItem:e.leadingItem,leadingSection:e.leadingSection,section:e.section,trailingItem:e.item,trailingSection:e.trailingSection})}};var n=t.prototype;return n.updateSeparatorProps=function(e){this.setState((function(t){return{separatorProps:f(f({},t.separatorProps),e)}}))},n.render=function(){var e=this.props,t=e.LeadingSeparatorComponent,n=e.SeparatorComponent,r=e.item,a=e.index,s=e.section,l=e.inverted,c=this.props.renderItem({item:r,index:a,section:s,separators:this._separators}),u=null!=t&&i.createElement(t,this.state.leadingSeparatorProps),h=null!=n&&i.createElement(n,this.state.separatorProps);return u||h?i.createElement(o.a,null,!1===l?u:h,c,!1===l?h:u):c},t}(i.Component),w=y;function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=A(A({},w.defaultProps),{},{stickySectionHeadersEnabled:"ios"===r.a.OS}),T=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this)._captureRef=function(e){t._wrapperListRef=e},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,_(t,n);var o=r.prototype;return o.scrollToLocation=function(e){null!=this._wrapperListRef&&this._wrapperListRef.scrollToLocation(e)},o.recordInteraction=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();e&&e.recordInteraction()},o.flashScrollIndicators=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();e&&e.flashScrollIndicators()},o.getScrollResponder=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();if(e)return e.getScrollResponder()},o.getScrollableNode=function(){var e=this._wrapperListRef&&this._wrapperListRef.getListRef();if(e)return e.getScrollableNode()},o.setNativeProps=function(e){var t=this._wrapperListRef&&this._wrapperListRef.getListRef();t&&t.setNativeProps(e)},o.render=function(){return i.createElement(w,x({},this.props,{ref:this._captureRef,getItemCount:function(e){return e.length},getItem:function(e,t){return e[t]}}))},r}(i.PureComponent);T.defaultProps=M;var C=T;t.a=C},function(t,n,r){"use strict";r.d(n,"a",(function(){return m}));var i=r(9),o=r.n(i),a=r(7),s=r.n(a),l=r(0),c=r(74),u=r(40),h=l.createContext(void 0),d=function(){var e=0,t=[],n=[],r=function(){n.forEach((function(e){var t=e.cb;e.cb=function(){return t(!0)}}))};return{get index(){var e,n=null===(e=window.history.state)||void 0===e?void 0:e.id;if(n){var r=t.findIndex((function(e){return e.id===n}));return r>-1?r:0}return 0},get:function(e){return t[e]},backIndex:function(n){for(var r=n.path,i=e-1;i>=0;i--){if(t[i].path===r)return i}return-1},push:function(n){var i=n.path,o=n.state;r();var a=Object(u.a)();(t=t.slice(0,e+1)).push({path:i,state:o,id:a}),e=t.length-1,window.history.pushState({id:a},"",i)},replace:function(n){var i,o,a=n.path,s=n.state;r();var l=null!==(i=null===(o=window.history.state)||void 0===o?void 0:o.id)&&void 0!==i?i:Object(u.a)();t.length?t[e]={path:a,state:s,id:l}:t.push({path:a,state:s,id:l}),window.history.replaceState({id:l},"",a)},go:function(i){if(r(),i>0?i=Math.min(i,t.length-1):i<0&&(i=e+i<0?-e:i),0!==i)return e+=i,new Promise((function(e,t){var r=function(n){if(clearTimeout(o),n)t(new Error("History was changed during navigation."));else{var r=window.document.title;window.document.title="",window.document.title=r,e()}};n.push({ref:r,cb:r});var o=setTimeout((function(){var e=n.findIndex((function(e){return e.ref===r}));e>-1&&(n[e].cb(),n.splice(e,1))}),100);window.addEventListener("popstate",(function e(){var t=n.pop();window.removeEventListener("popstate",e),null===t||void 0===t||t.cb()})),window.history.go(i)}))},listen:function(e){var t=function(){n.length||e()};return window.addEventListener("popstate",t),function(){return window.removeEventListener("popstate",t)}}}},f=function e(t,n){if(void 0===t||void 0===n||t.key!==n.key)return[void 0,void 0];var r=t.history?t.history.length:t.routes.length,i=n.history?n.history.length:n.routes.length,o=t.routes[t.index],a=n.routes[n.index],s=o.state,l=a.state;return r!==i||o.key!==a.key||void 0===s||void 0===l||s.key!==l.key?[t,n]:e(s,l)},p=!1;function m(t,n){var r=n.enabled,i=void 0===r||r,a=n.config,u=n.getStateFromPath,m=void 0===u?c.getStateFromPath:u,g=n.getPathFromState,v=void 0===g?c.getPathFromState:g,y=n.getActionFromState,b=void 0===y?c.getActionFromState:y;l.useEffect((function(){if(!1!==i&&p)throw new Error(["Looks like you have configured linking in multiple places. This is likely an error since URL integration should only be handled in one place to avoid conflicts. Make sure that:","- You are not using both 'linking' prop and 'useLinking'","- You don't have 'useLinking' in multiple components"].join("\n").trim());return p=!1!==i,function(){p=!1}}));var w=l.useState(d),x=o()(w,1)[0],_=l.useRef(i),E=l.useRef(a),A=l.useRef(m),S=l.useRef(b),M=l.useRef(v);l.useEffect((function(){_.current=i,E.current=a,A.current=m,S.current=b,M.current=v}));var T=l.useContext(h),C=l.useCallback((function(){var e;if(_.current){var t,n=null!==(t=null===T||void 0===T?void 0:T.location)&&void 0!==t?t:"undefined"!==typeof window?window.location:void 0,r=n?n.pathname+n.search:void 0;r&&(e=A.current(r,E.current))}var i={then:function(t){return Promise.resolve(t?t(e):e)},catch:function(){return i}};return i}),[]),O=l.useRef(void 0),R=l.useRef(void 0),k=l.useRef(void 0);return l.useEffect((function(){return O.current=x.index,x.listen((function(){var n,r=t.current;if(r&&i){var o=location.pathname+location.search,a=x.index,s=null!==(n=O.current)&&void 0!==n?n:0;O.current=a,k.current=o;var l=x.get(a);if((null===l||void 0===l?void 0:l.path)===o&&null!==l&&void 0!==l&&l.state)r.resetRoot(l.state);else{var c=A.current(o,E.current);if(c){var u=r.getRootState();if(c.routes.some((function(e){return!(null!==u&&void 0!==u&&u.routeNames.includes(e.name))})))return void console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.");if(a>s){var h=S.current(c,E.current);if(void 0!==h)try{r.dispatch(h)}catch(e){console.warn("An error occurred when trying to handle the link '".concat(o,"': ").concat(e.message))}else r.resetRoot(c)}else r.resetRoot(c)}else r.resetRoot(c)}}}))}),[i,x,t]),l.useEffect((function(){var e;if(i){if(t.current){var n=t.current.getRootState();if(n){var r=M.current(n,E.current);void 0===R.current&&(R.current=n),x.replace({path:r,state:n})}}return null===(e=t.current)||void 0===e?void 0:e.addListener("state",function(e){var t=!1,n=[];return function r(){var i;return s.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,!t){o.next=4;break}return n.unshift(r),o.abrupt("return");case 4:return t=!0,o.next=7,s.a.awrap(e());case 7:return o.prev=7,t=!1,n.length&&(null===(i=n.pop())||void 0===i||i()),o.finish(7);case 11:case"end":return o.stop()}}),null,null,[[0,,7,11]],Promise)}}((function(){var e,n,r,a,l,c,u,h,d,p,m,g;return s.a.async((function(v){for(;;)switch(v.prev=v.next){case 0:if((e=t.current)&&i){v.next=3;break}return v.abrupt("return");case 3:if(n=R.current,r=e.getRootState(),a=k.current,l=M.current(r,E.current),R.current=r,k.current=void 0,c=f(n,r),u=o()(c,2),h=u[0],d=u[1],!h||!d||l===a){v.next=37;break}if(!((p=(d.history?d.history.length:d.routes.length)-(h.history?h.history.length:h.routes.length))>0)){v.next=16;break}x.push({path:l,state:r}),v.next=35;break;case 16:if(!(p<0)){v.next=34;break}if(m=x.backIndex({path:l}),g=x.index,v.prev=19,!(-1!==m&&m<g)){v.next=25;break}return v.next=23,s.a.awrap(x.go(m-g));case 23:v.next=27;break;case 25:return v.next=27,s.a.awrap(x.go(p));case 27:x.replace({path:l,state:r}),v.next=32;break;case 30:v.prev=30,v.t0=v.catch(19);case 32:v.next=35;break;case 34:x.replace({path:l,state:r});case 35:v.next=38;break;case 37:x.replace({path:l,state:r});case 38:case"end":return v.stop()}}),null,null,[[19,30]],Promise)})))}})),{getInitialState:C}}},function(e,t,n){"use strict";var r=n(96),i=n(63),o=n(5),a=n(94),s=n(41);var l={},c=Object.prototype.hasOwnProperty,u=Array.isArray,h=/[A-Z]/g;function d(e){return"-"+e.toLowerCase()}function f(e){return u(e)?e.join(" "):e}var p=i.a.create({reset:{backgroundColor:"transparent",color:"inherit",font:"inherit",listStyle:"none",margin:0,textAlign:"inherit",textDecoration:"none"},cursor:{cursor:"pointer"}},s.c.classicReset),m=o.a.create({auto:{pointerEvents:"auto"},"box-none":{pointerEvents:"box-none"},"box-only":{pointerEvents:"box-only"},none:{pointerEvents:"none"}});t.a=function(e,t){t||(t=l);var n=t,i=n.accessibilityActiveDescendant,s=n.accessibilityAtomic,u=n.accessibilityAutoComplete,g=n.accessibilityBusy,v=n.accessibilityChecked,y=n.accessibilityColumnCount,b=n.accessibilityColumnIndex,w=n.accessibilityColumnSpan,x=n.accessibilityControls,_=n.accessibilityCurrent,E=n.accessibilityDescribedBy,A=n.accessibilityDetails,S=n.accessibilityDisabled,M=n.accessibilityErrorMessage,T=n.accessibilityExpanded,C=n.accessibilityFlowTo,O=n.accessibilityHasPopup,R=n.accessibilityHidden,k=n.accessibilityInvalid,P=n.accessibilityKeyShortcuts,L=n.accessibilityLabel,D=n.accessibilityLabelledBy,I=n.accessibilityLevel,N=n.accessibilityLiveRegion,j=n.accessibilityModal,B=n.accessibilityMultiline,F=n.accessibilityMultiSelectable,z=n.accessibilityOrientation,H=n.accessibilityOwns,U=n.accessibilityPlaceholder,V=n.accessibilityPosInSet,G=n.accessibilityPressed,W=n.accessibilityReadOnly,q=n.accessibilityRequired,X=(n.accessibilityRole,n.accessibilityRoleDescription),Y=n.accessibilityRowCount,K=n.accessibilityRowIndex,Q=n.accessibilityRowSpan,Z=n.accessibilitySelected,J=n.accessibilitySetSize,$=n.accessibilitySort,ee=n.accessibilityValueMax,te=n.accessibilityValueMin,ne=n.accessibilityValueNow,re=n.accessibilityValueText,ie=n.classList,oe=n.dataSet,ae=n.focusable,se=n.nativeID,le=n.pointerEvents,ce=n.style,ue=n.testID,he=n.accessible,de=n.accessibilityState,fe=n.accessibilityValue,pe=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(n,["accessibilityActiveDescendant","accessibilityAtomic","accessibilityAutoComplete","accessibilityBusy","accessibilityChecked","accessibilityColumnCount","accessibilityColumnIndex","accessibilityColumnSpan","accessibilityControls","accessibilityCurrent","accessibilityDescribedBy","accessibilityDetails","accessibilityDisabled","accessibilityErrorMessage","accessibilityExpanded","accessibilityFlowTo","accessibilityHasPopup","accessibilityHidden","accessibilityInvalid","accessibilityKeyShortcuts","accessibilityLabel","accessibilityLabelledBy","accessibilityLevel","accessibilityLiveRegion","accessibilityModal","accessibilityMultiline","accessibilityMultiSelectable","accessibilityOrientation","accessibilityOwns","accessibilityPlaceholder","accessibilityPosInSet","accessibilityPressed","accessibilityReadOnly","accessibilityRequired","accessibilityRole","accessibilityRoleDescription","accessibilityRowCount","accessibilityRowIndex","accessibilityRowSpan","accessibilitySelected","accessibilitySetSize","accessibilitySort","accessibilityValueMax","accessibilityValueMin","accessibilityValueNow","accessibilityValueText","classList","dataSet","focusable","nativeID","pointerEvents","style","testID","accessible","accessibilityState","accessibilityValue"]),me=null!=de&&!0===de.disabled||S,ge=r.a.propsToAriaRole(t),ve="link"===ge||"a"===e||"button"===e||"input"===e||"select"===e||"textarea"===e||null!=pe.contentEditable;if(null!=de)for(var ye in de){var be=de[ye];null!=be&&("disabled"===ye||"hidden"===ye?!0===be&&(pe["aria-"+ye]=be,pe[ye]=be):pe["aria-"+ye]=be)}if(null!=fe)for(var we in fe){var xe=fe[we];null!=xe&&(pe["aria-value"+we]=xe)}if(null!=i&&(pe["aria-activedescendant"]=i),null!=s&&(pe["aria-atomic"]=s),null!=u&&(pe["aria-autocomplete"]=u),null!=g&&(pe["aria-busy"]=g),null!=v&&(pe["aria-checked"]=v),null!=y&&(pe["aria-colcount"]=y),null!=b&&(pe["aria-colindex"]=b),null!=w&&(pe["aria-colspan"]=w),null!=x&&(pe["aria-controls"]=f(x)),null!=_&&(pe["aria-current"]=_),null!=E&&(pe["aria-describedby"]=f(E)),null!=A&&(pe["aria-details"]=A),!0===me&&(pe["aria-disabled"]=!0,"button"!==e&&"form"!==e&&"input"!==e&&"select"!==e&&"textarea"!==e||(pe.disabled=!0)),null!=M&&(pe["aria-errormessage"]=M),null!=T&&(pe["aria-expanded"]=T),null!=C&&(pe["aria-flowto"]=f(C)),null!=O&&(pe["aria-haspopup"]=O),!0===R&&(pe["aria-hidden"]=R),null!=k&&(pe["aria-invalid"]=k),null!=P&&Array.isArray(P)&&(pe["aria-keyshortcuts"]=P.join(" ")),null!=L&&(pe["aria-label"]=L),null!=D&&(pe["aria-labelledby"]=f(D)),null!=I&&(pe["aria-level"]=I),null!=N&&(pe["aria-live"]="none"===N?"off":N),null!=j&&(pe["aria-modal"]=j),null!=B&&(pe["aria-multiline"]=B),null!=F&&(pe["aria-multiselectable"]=F),null!=z&&(pe["aria-orientation"]=z),null!=H&&(pe["aria-owns"]=f(H)),null!=U&&(pe["aria-placeholder"]=U),null!=V&&(pe["aria-posinset"]=V),null!=G&&(pe["aria-pressed"]=G),null!=W&&(pe["aria-readonly"]=W,"input"!==e&&"select"!==e&&"textarea"!==e||(pe.readOnly=!0)),null!=q&&(pe["aria-required"]=q,"input"!==e&&"select"!==e&&"textarea"!==e||(pe.required=!0)),null!=ge&&(pe.role="none"===ge?"presentation":ge),null!=X&&(pe["aria-roledescription"]=X),null!=Y&&(pe["aria-rowcount"]=Y),null!=K&&(pe["aria-rowindex"]=K),null!=Q&&(pe["aria-rowspan"]=Q),null!=Z&&(pe["aria-selected"]=Z),null!=J&&(pe["aria-setsize"]=J),null!=$&&(pe["aria-sort"]=$),null!=ee&&(pe["aria-valuemax"]=ee),null!=te&&(pe["aria-valuemin"]=te),null!=ne&&(pe["aria-valuenow"]=ne),null!=re&&(pe["aria-valuetext"]=re),null!=oe)for(var _e in oe)if(c.call(oe,_e)){var Ee=_e.replace(h,d),Ae=oe[_e];null!=Ae&&(pe["data-"+Ee]=Ae)}var Se=null!=ae?ae:he;!1===Se&&(pe.tabIndex="-1"),"a"===e||"button"===e||"input"===e||"select"===e||"textarea"===e?!1!==Se&&!0!==S||(pe.tabIndex="-1"):"button"===ge||"checkbox"===ge||"link"===ge||"menuitem"===ge||"radio"===ge||"textbox"===ge||"switch"===ge?!1!==Se&&(pe.tabIndex="0"):!0===Se&&(pe.tabIndex="0");var Me=o.a.compose(le&&m[le],ce),Te=("button"===ge||"link"===ge)&&!me,Ce=[("a"===e||"button"===e||"li"===e||"ul"===e||"heading"===ge)&&p.reset,Te&&p.cursor,ie],Oe=a.a.resolve(Me,Ce),Re=Oe.className,ke=Oe.style;if(null!=Re&&""!==Re&&(pe.className=Re),ke&&(pe.style=ke),null!=se&&(pe.id=se),null!=ue&&(pe["data-testid"]=ue),ve||"button"===ge||"menuitem"===ge||!0===Se&&!me){var Pe=pe.onClick;if(null!=Pe)if(me)pe.onClick=function(e){e.stopPropagation()};else if(!ve){var Le=pe.onKeyDown;pe.onKeyDown=function(e){var t=e.key,n=e.repeat,r=" "===t||"Spacebar"===t,i="button"===ge||"menuitem"===ge;null!=Le&&Le(e),n||"Enter"!==t?r&&i&&(n||Pe(e),e.preventDefault()):Pe(e)}}}return pe}},function(e,t,n){"use strict";var r=n(145),i=n(47),o={height:0,width:0};t.a=function(e){var t=e.shadowColor,n=e.shadowOffset,a=e.shadowOpacity,s=e.shadowRadius,l=n||o,c=l.height,u=l.width,h=Object(i.a)(u),d=Object(i.a)(c),f=Object(i.a)(s||0),p=Object(r.a)(t||"black",a);if(null!=p&&null!=h&&null!=d&&null!=f)return h+" "+d+" "+f+" "+p}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(0);function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){null!=t&&("function"!==typeof t?"object"!==typeof t?console.error("mergeRefs cannot handle Refs of type boolean, number or string, received ref "+String(t)):t.current=e:t(e))}))}}},function(e,t,n){"use strict";var r=n(58);t.a=function(){r.a.blurTextInput(r.a.currentlyFocusedField())}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(4);function r(e){return null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(8),i=n(68),o=n(4),a=n.n(o),s=function(){function e(e){"ios"===r.a.OS&&(a()(null!=e,"`new NativeEventEmitter()` requires a non-null argument."),this._nativeModule=e)}var t=e.prototype;return t.addListener=function(e,t,n){var r,o=this;null==(r=this._nativeModule)||r.addListener(e);var a=i.a.addListener(e,t,n);return{remove:function(){var e;null!=a&&(null==(e=o._nativeModule)||e.removeListeners(1),a.remove(),a=null)}}},t.removeListener=function(e,t){var n;null==(n=this._nativeModule)||n.removeListeners(1),i.a.removeListener(e,t)},t.emit=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.a.emit.apply(i.a,[e].concat(n))},t.removeAllListeners=function(e){var t;a()(null!=e,"`NativeEventEmitter.removeAllListener()` requires a non-null argument."),null==(t=this._nativeModule)||t.removeListeners(this.listenerCount(e)),i.a.removeAllListeners(e)},t.listenerCount=function(e){return i.a.listenerCount(e)},e}()},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(0),i=r.createContext({scheduleUpdate:function(){throw new Error("Couldn't find a schedule context.")},flushUpdates:function(){throw new Error("Couldn't find a schedule context.")}});function o(e){var t=r.useContext(i),n=t.scheduleUpdate,o=t.flushUpdates;n(e),r.useEffect(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(){var e=r.useRef({action:[],focus:[]}).current,t=r.useCallback((function(t,n){return e[t].push(n),function(){var r=e[t].indexOf(n);e[t].splice(r,1)}}),[e]);return{listeners:e,addListener:t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);function i(){var e=r.useRef({getState:{},beforeRemove:{}}).current,t=r.useCallback((function(t,n,r){return e[t][n]=r,function(){e[t][n]=void 0}}),[e]);return{keyedListeners:e,addKeyedListener:t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),i=n(67),o=n(39);function a(e){var t=e.key,n=e.options,a=e.navigation,s=r.useRef(n),l=r.useRef({}),c=r.useContext(o.a).onOptionsChange,u=r.useContext(i.a).addOptionsGetter,h=r.useCallback((function(){var e,t,n=null===(e=null===a||void 0===a?void 0:a.isFocused())||void 0===e||e,r=Object.keys(l.current).length;n&&!r&&c(null!==(t=s.current)&&void 0!==t?t:{})}),[a,c]);r.useEffect((function(){return s.current=n,h(),null===a||void 0===a?void 0:a.addListener("focus",h)}),[a,n,h]);var d=r.useCallback((function(){for(var e in l.current)if(l.current.hasOwnProperty(e)){var t,n,r=null===(t=(n=l.current)[e])||void 0===t?void 0:t.call(n);if(null!==r)return r}return null}),[]),f=r.useCallback((function(){var e;if(!(null===(e=null===a||void 0===a?void 0:a.isFocused())||void 0===e||e))return null;var t=d();return null!==t?t:s.current}),[a,d]);return r.useEffect((function(){return null===u||void 0===u?void 0:u(t,f)}),[f,u,t]),{addOptionsGetter:r.useCallback((function(e,t){return l.current[e]=t,h(),function(){delete l.current[e],h()}}),[h]),getCurrentOptions:f}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(22),i=n.n(r),o=n(0);function a(e){var t=o.useRef(e);o.useEffect((function(){t.current=e}));var n=o.useRef({}),r=o.useCallback((function(e){var t=function(t,r){var i=n.current[t]?n.current[t][e]:void 0;if(i){var o=i.indexOf(r);i.splice(o,1)}};return{addListener:function(r,i){return n.current[r]=n.current[r]||{},n.current[r][e]=n.current[r][e]||[],n.current[r][e].push(i),function(){return t(r,i)}},removeListener:t}}),[]),a=o.useCallback((function(e){var r,o,a,s=e.type,l=e.data,c=e.target,u=e.canPreventDefault,h=n.current[s]||{},d=void 0!==c?null===(o=h[c])||void 0===o?void 0:o.slice():(r=[]).concat.apply(r,i()(Object.keys(h).map((function(e){return h[e]})))).filter((function(e,t,n){return n.lastIndexOf(e)===t})),f={get type(){return s}};if(void 0!==c&&Object.defineProperty(f,"target",{enumerable:!0,get:function(){return c}}),void 0!==l&&Object.defineProperty(f,"data",{enumerable:!0,get:function(){return l}}),u){var p=!1;Object.defineProperties(f,{defaultPrevented:{enumerable:!0,get:function(){return p}},preventDefault:{enumerable:!0,value:function(){p=!0}}})}return null===(a=t.current)||void 0===a||a.call(t,f),null===d||void 0===d||d.forEach((function(e){return e(f)})),f}),[]);return o.useMemo((function(){return{create:r,emit:a}}),[r,a])}},function(e,t,n){"use strict";function r(e){return null}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(9),i=n(19),o=n(22);function a(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=n(196),c=n(197),u=n(198),h=n(199);function d(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function f(e,t){return t.encode?t.strict?l(e):encodeURIComponent(e):e}function p(e,t){return t.decode?c(e):e}function m(e){var t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function g(e){var t=(e=m(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function v(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function y(e,t){d((t=i({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);var n=function(e){var t;switch(e.arrayFormat){case"index":return function(e,n,r){t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return function(e,n,r){t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return function(t,n,r){var i="string"===typeof n&&n.includes(e.arrayFormatSeparator),o="string"===typeof n&&!i&&p(n,e).includes(e.arrayFormatSeparator);n=o?p(n,e):n;var a=i||o?n.split(e.arrayFormatSeparator).map((function(t){return p(t,e)})):null===n?n:p(n,e);r[t]=a};default:return function(e,t,n){void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),o=Object.create(null);if("string"!==typeof e)return o;if(!(e=e.trim().replace(/^[?#&]/,"")))return o;for(var s,l=a(e.split("&"));!(s=l()).done;){var c=s.value;if(""!==c){var h=u(t.decode?c.replace(/\+/g," "):c,"="),f=r(h,2),m=f[0],g=f[1];g=void 0===g?null:["comma","separator"].includes(t.arrayFormat)?g:p(g,t),n(p(m,t),g,o)}}for(var y=0,b=Object.keys(o);y<b.length;y++){var w=b[y],x=o[w];if("object"===typeof x&&null!==x)for(var _=0,E=Object.keys(x);_<E.length;_++){var A=E[_];x[A]=v(x[A],t)}else o[w]=v(x,t)}return!1===t.sort?o:(!0===t.sort?Object.keys(o).sort():Object.keys(o).sort(t.sort)).reduce((function(e,t){var n=o[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===typeof t?e(Object.keys(t)).sort((function(e,t){return Number(e)-Number(t)})).map((function(e){return t[e]})):t}(n):e[t]=n,e}),Object.create(null))}t.extract=g,t.parse=y,t.stringify=function(e,t){if(!e)return"";d((t=i({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);for(var n=function(n){return t.skipNull&&function(e){return null===e||void 0===e}(e[n])||t.skipEmptyString&&""===e[n]},r=function(e){switch(e.arrayFormat){case"index":return function(t){return function(n,r){var i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[[f(t,e),"[",i,"]"].join("")]:[[f(t,e),"[",f(i,e),"]=",f(r,e)].join("")])}};case"bracket":return function(t){return function(n,r){return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[[f(t,e),"[]"].join("")]:[[f(t,e),"[]=",f(r,e)].join("")])}};case"comma":case"separator":return function(t){return function(n,r){return null===r||void 0===r||0===r.length?n:0===n.length?[[f(t,e),"=",f(r,e)].join("")]:[[n,f(r,e)].join(e.arrayFormatSeparator)]}};default:return function(t){return function(n,r){return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:[].concat(o(n),null===r?[f(t,e)]:[[f(t,e),"=",f(r,e)].join("")])}}}}(t),a={},s=0,l=Object.keys(e);s<l.length;s++){var c=l[s];n(c)||(a[c]=e[c])}var u=Object.keys(a);return!1!==t.sort&&u.sort(t.sort),u.map((function(n){var i=e[n];return void 0===i?"":null===i?f(n,t):Array.isArray(i)?i.reduce(r(n),[]).join("&"):f(n,t)+"="+f(i,t)})).filter((function(e){return e.length>0})).join("&")},t.parseUrl=function(e,t){t=i({decode:!0},t);var n=u(e,"#"),o=r(n,2),a=o[0],s=o[1];return i({url:a.split("?")[0]||"",query:y(g(e),t)},t&&t.parseFragmentIdentifier&&s?{fragmentIdentifier:p(s,t)}:{})},t.stringifyUrl=function(e,n){n=i({encode:!0,strict:!0},n);var r=m(e.url).split("?")[0]||"",o=t.extract(e.url),a=t.parse(o,{sort:!1}),s=i(a,e.query),l=t.stringify(s,n);l&&(l="?"+l);var c=function(e){var t="",n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(c="#"+f(e.fragmentIdentifier,n)),""+r+l+c},t.pick=function(e,n,r){r=i({parseFragmentIdentifier:!0},r);var o=t.parseUrl(e,r),a=o.url,s=o.query,l=o.fragmentIdentifier;return t.stringifyUrl({url:a,query:h(s,n),fragmentIdentifier:l},r)},t.exclude=function(e,n,r){var i=Array.isArray(n)?function(e){return!n.includes(e)}:function(e,t){return!n(e,t)};return t.pick(e,i,r)}},function(e,t,n){"use strict";function r(e){var t=!1;if(e&&(t=Object.keys(e).some((function(e){return"screens"!==e&&"initialRouteName"!==e})))&&(e.hasOwnProperty("screens")||e.hasOwnProperty("initialRouteName")))throw new Error("Found invalid keys in the configuration object. See https://reactnavigation.org/docs/configuring-links/ for more details on the shape of the configuration object.");return t?[t,{screens:e}]:[t,e]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(87),o=r.createContext(i.a);o.displayName="ThemeContext",t.a=o},function(e,t,n){"use strict";var r=function(e){return"currentcolor"===e||"currentColor"===e||"inherit"===e||0===e.indexOf("var(")},i=n(115);t.a=function(e,t){if(void 0===t&&(t=1),null!=e){if("string"===typeof e&&r(e))return e;var n=Object(i.a)(e);if(null!=n)return"rgba("+(n>>16&255)+","+(n>>8&255)+","+(255&n)+","+((n>>24&255)/255*t).toFixed(2)+")"}}},function(t,n,r){"use strict";r.r(n);var i=r(3),o=r(83),a=r(461),s=r(467),l=r(462),c=r(463),u=r(244),h=r.n(u),d=r(245),f=r.n(d),p=r(50),m=r(11),g=r(458),v=r(459),y=r(107);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){if(e){if("string"===typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t,n){var r=n.objBindAttr,i=void 0===r?"__obj":r,o=n.dataBindAttr,a=void 0===o?"__data":o,s=n.idAccessor,l=n.purge,c=void 0!==l&&l,u=function(e){return e.hasOwnProperty(a)},h=t.filter((function(e){return!u(e)})),d=t.filter(u).map((function(e){return e[a]})),f=c?{enter:e,exit:d,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var i=Object(y.a)(e,n,!1),o=Object(y.a)(t,n,!1),a=Object.assign({},i,o);Object.entries(a).forEach((function(e){var t=_(e,2),n=t[0],a=t[1],s=i.hasOwnProperty(n)?o.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[i[n],o[n]]:a)}))}else{var s=new Set(e),l=new Set(t);new Set([].concat(E(s),E(l))).forEach((function(e){var t=s.has(e)?l.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)}))}return r}(d,e,s);return f.update=f.update.map((function(e){var t=_(e,2),n=t[0],r=t[1];return n!==r&&(r[i]=n[i],r[i][a]=r),r})),f.exit=f.exit.concat(h.map((function(e){return w({},i,e)}))),f}var T=function(e,t,n,r,i){var o=i.createObj,a=void 0===o?function(e){return{}}:o,s=i.updateObj,l=void 0===s?function(e,t){}:s,c=i.exitObj,u=void 0===c?function(e){}:c,h=i.objBindAttr,d=void 0===h?"__obj":h,f=i.dataBindAttr,p=void 0===f?"__data":f,m=x(i,["createObj","updateObj","exitObj","objBindAttr","dataBindAttr"]),g=M(e,t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({objBindAttr:d,dataBindAttr:p},m)),v=g.enter,y=g.update;g.exit.forEach((function(e){var t=e[d];delete e[d],u(t),r(t)}));var _=function(e){var t=[];return e.forEach((function(e){var n=a(e);n&&(n[p]=e,e[d]=n,t.push(n))})),t}(v);!function(e){e.forEach((function(e){var t=e[d];t&&(t[p]=e,l(t,e))}))}([].concat(E(v),E(y))),_.forEach(n)},C=r(470),O=r(472),R=r(108),k=r.n(R);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){N(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){return(D="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})(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}function B(e){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function H(e,t,n){return(H=z()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&F(i,n.prototype),i}).apply(null,arguments)}function U(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?V(e):t}function W(e){var t=z();return function(){var n,r=B(e);if(t){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return G(this,n)}}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(e,t){if(e){if("string"===typeof e)return K(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Q=function e(t){t.geometry&&t.geometry.dispose(),t.material&&function e(t){t instanceof Array?t.forEach(e):(t.map&&t.map.dispose(),t.dispose())}(t.material),t.texture&&t.texture.dispose(),t.children&&t.children.forEach(e)},Z=function(e){for(;e.children.length;){var t=e.children[0];e.remove(t),Q(t)}},J=["objFilter"];function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.objFilter,i=void 0===r?function(){return!0}:r,o=U(n,J);return T(e,t.children.filter(i),(function(e){return t.add(e)}),(function(e){t.remove(e),Z(e)}),L({objBindAttr:"__threeObj"},o))}var ee=function(e){return isNaN(e)?parseInt(k()(e).toHex(),16):e},te=function(e){return isNaN(e)?k()(e).getAlpha():1},ne=Object(C.a)(O.a);function re(e,t,n){t&&"string"===typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=ne(t(e))}))}var ie=window.THREE?window.THREE:{Group:i.n,Mesh:i.t,MeshLambertMaterial:i.v,Color:i.g,BufferGeometry:i.e,BufferAttribute:i.d,Matrix4:i.s,Vector3:i.N,SphereBufferGeometry:i.F,CylinderBufferGeometry:i.j,TubeBufferGeometry:i.K,ConeBufferGeometry:i.h,Line:i.o,LineBasicMaterial:i.p,QuadraticBezierCurve3:i.z,CubicBezierCurve3:i.i,Box3:i.c},oe={graph:h.a,forcelayout:f.a},ae=(new ie.BufferGeometry).setAttribute?"setAttribute":"addAttribute",se=(new ie.BufferGeometry).applyMatrix4?"applyMatrix4":"applyMatrix";var le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=function(t){j(i,t);var r=W(i);function i(){var t;I(this,i);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return(t=r.call.apply(r,[this].concat(a))).__kapsuleInstance=e().apply(void 0,[].concat(X(n?[V(t)]:[]),a)),t}return i}(t);return Object.keys(e()).forEach((function(e){return r.prototype[e]=function(){var t,n=(t=this.__kapsuleInstance)[e].apply(t,arguments);return n===this.__kapsuleInstance?this:n}})),r}(Object(p.a)({props:{jsonUrl:{onChange:function(e,t){var n=this;e&&!t.fetchingJson&&(t.fetchingJson=!0,t.onLoading(),fetch(e).then((function(e){return e.json()})).then((function(e){t.fetchingJson=!1,t.onFinishLoading(e),n.graphData(e)})))},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},numDimensions:{default:3,onChange:function(e,t){var n=t.d3ForceLayout.force("charge");function r(e,t){e.forEach((function(e){delete e[t],delete e["v".concat(t)]}))}n&&n.strength(e>2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y")}},dagMode:{onChange:function(e,t){!e&&"d3"===t.forceEngine&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=e.fz=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,n){return void 0===n?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t="ngraph"!==e.forceEngine;return e.engineRunning&&function(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||t&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.layout[t?"tick":"step"](),e.onEngineTick());e.graphData.nodes.forEach((function(n){var r=n.__threeObj;if(r){var i=t?n:e.layout.getNodePosition(n[e.nodeId]);r.position.x=i.x,r.position.y=i.y||0,r.position.z=i.z||0}}));var n=Object(m.default)(e.linkWidth),r=Object(m.default)(e.linkCurvature),i=Object(m.default)(e.linkCurveRotation),o=Object(m.default)(e.linkThreeObjectExtend);e.graphData.links.forEach((function(a){var s=a.__lineObj;if(s){var l=t?a:e.layout.getLinkPosition(e.layout.graph.getLink(a.source,a.target).id),c=l[t?"source":"from"],u=l[t?"target":"to"];if(c&&u&&c.hasOwnProperty("x")&&u.hasOwnProperty("x")){!function(n){var o=t?n:e.layout.getLinkPosition(e.layout.graph.getLink(n.source,n.target).id),a=o[t?"source":"from"],s=o[t?"target":"to"];if(a&&s&&a.hasOwnProperty("x")&&s.hasOwnProperty("x")){var l=r(n);if(l){var c,u=new ie.Vector3(a.x,a.y||0,a.z||0),h=new ie.Vector3(s.x,s.y||0,s.z||0),d=u.distanceTo(h),f=i(n);if(d>0){var p=s.x-a.x,m=s.y-a.y||0,g=(new ie.Vector3).subVectors(h,u),v=g.clone().multiplyScalar(l).cross(0!==p||0!==m?new ie.Vector3(0,0,1):new ie.Vector3(0,1,0)).applyAxisAngle(g.normalize(),f).add((new ie.Vector3).addVectors(u,h).divideScalar(2));c=new ie.QuadraticBezierCurve3(u,v,h)}else{var y=70*l,b=-f,w=b+Math.PI/2;c=new ie.CubicBezierCurve3(u,new ie.Vector3(y*Math.cos(w),y*Math.sin(w),0).add(u),new ie.Vector3(y*Math.cos(b),y*Math.sin(b),0).add(u),h)}n.__curve=c}else n.__curve=null}}(a);var h=o(a);if(!e.linkPositionUpdate||!e.linkPositionUpdate(h?s.children[1]:s,{start:{x:c.x,y:c.y,z:c.z},end:{x:u.x,y:u.y,z:u.z}},a)||h){var d=a.__curve,f=s.children.length?s.children[0]:s;if("Line"===f.type){if(d)f.geometry.setFromPoints(d.getPoints(30));else{var p=f.geometry.getAttribute("position");p&&p.array&&6===p.array.length||f.geometry[ae]("position",p=new ie.BufferAttribute(new Float32Array(6),3)),p.array[0]=c.x,p.array[1]=c.y||0,p.array[2]=c.z||0,p.array[3]=u.x,p.array[4]=u.y||0,p.array[5]=u.z||0,p.needsUpdate=!0}f.geometry.computeBoundingSphere()}else if("Mesh"===f.type)if(d){f.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(f.position.set(0,0,0),f.rotation.set(0,0,0),f.scale.set(1,1,1));var m=Math.ceil(10*n(a))/10/2,g=new ie.TubeBufferGeometry(d,30,m,e.linkResolution,!1);f.geometry.dispose(),f.geometry=g}else{if(!f.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var v=Math.ceil(10*n(a))/10/2,y=new ie.CylinderBufferGeometry(v,v,1,e.linkResolution,1,!1);y[se]((new ie.Matrix4).makeTranslation(0,.5,0)),y[se]((new ie.Matrix4).makeRotationX(Math.PI/2)),f.geometry.dispose(),f.geometry=y}var b=new ie.Vector3(c.x,c.y||0,c.z||0),w=new ie.Vector3(u.x,u.y||0,u.z||0),x=b.distanceTo(w);f.position.x=b.x,f.position.y=b.y,f.position.z=b.z,f.scale.z=x,f.parent.localToWorld(w),f.lookAt(w)}}}}}))}(),function(){var n=Object(m.default)(e.linkDirectionalArrowRelPos),r=Object(m.default)(e.linkDirectionalArrowLength),i=Object(m.default)(e.nodeVal);e.graphData.links.forEach((function(o){var a=o.__arrowObj;if(a){var s=t?o:e.layout.getLinkPosition(e.layout.graph.getLink(o.source,o.target).id),l=s[t?"source":"from"],c=s[t?"target":"to"];if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=Math.sqrt(Math.max(0,i(l)||1))*e.nodeRelSize,h=Math.sqrt(Math.max(0,i(c)||1))*e.nodeRelSize,d=r(o),f=n(o),p=o.__curve?function(e){return o.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",l,c,e),y:t("y",l,c,e),z:t("z",l,c,e)}},m=o.__curve?o.__curve.getLength():Math.sqrt(["x","y","z"].map((function(e){return Math.pow((c[e]||0)-(l[e]||0),2)})).reduce((function(e,t){return e+t}),0)),g=u+d+(m-u-h-d)*f,v=p(g/m),y=p((g-d)/m);["x","y","z"].forEach((function(e){return a.position[e]=y[e]}));var b=H(ie.Vector3,X(["x","y","z"].map((function(e){return v[e]}))));a.parent.localToWorld(b),a.lookAt(b)}}}))}(),function(){var n=Object(m.default)(e.linkDirectionalParticleSpeed);e.graphData.links.forEach((function(r){var i=r.__photonsObj&&r.__photonsObj.children,o=r.__singleHopPhotonsObj&&r.__singleHopPhotonsObj.children;if(o&&o.length||i&&i.length){var a=t?r:e.layout.getLinkPosition(e.layout.graph.getLink(r.source,r.target).id),s=a[t?"source":"from"],l=a[t?"target":"to"];if(s&&l&&s.hasOwnProperty("x")&&l.hasOwnProperty("x")){var c=n(r),u=r.__curve?function(e){return r.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",s,l,e),y:t("y",s,l,e),z:t("z",s,l,e)}};[].concat(X(i||[]),X(o||[])).forEach((function(e,t){var n="singleHopPhotons"===e.parent.__linkThreeObjType;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=n?0:t/i.length),e.__progressRatio+=c,e.__progressRatio>=1){if(n)return e.parent.remove(e),void Z(e);e.__progressRatio=e.__progressRatio%1}var r=e.__progressRatio,o=u(r);["x","y","z"].forEach((function(t){return e.position[t]=o[t]}))}))}}}))}(),this},emitParticle:function(e,t){if(t){if(!t.__singleHopPhotonsObj){var n=new ie.Group;n.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=n,e.graphScene.add(n)}var r=Object(m.default)(e.linkDirectionalParticleWidth),i=Math.ceil(10*r(t))/10/2,o=e.linkDirectionalParticleResolution,a=new ie.SphereBufferGeometry(i,o,o),s=Object(m.default)(e.linkColor),l=Object(m.default)(e.linkDirectionalParticleColor)(t)||s(t)||"#f0f0f0",c=new ie.Color(ee(l)),u=3*e.linkOpacity,h=new ie.MeshLambertMaterial({color:c,transparent:!0,opacity:u});t.__singleHopPhotonsObj.add(new ie.Mesh(a,h))}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(!e.initialised)return null;var n=function e(n){var r=[];if(n.geometry){n.geometry.computeBoundingBox();var i=new ie.Box3;i.copy(n.geometry.boundingBox).applyMatrix4(n.matrixWorld),r.push(i)}return r.concat.apply(r,X((n.children||[]).filter((function(e){return!e.hasOwnProperty("__graphObjType")||"node"===e.__graphObjType&&t(e.__data)})).map(e)))}(e.graphScene);return n.length?Object.assign.apply(Object,X(["x","y","z"].map((function(e){return N({},e,[Object(g.a)(n,(function(t){return t.min[e]})),Object(v.a)(n,(function(t){return t.max[e]}))])})))):null}},stateInit:function(){return{d3ForceLayout:Object(o.a)().force("link",Object(a.a)()).force("charge",Object(s.a)()).force("center",Object(l.a)()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e},update:function(e,t){var n=function(e){return e.some((function(e){return t.hasOwnProperty(e)}))};if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&n(["nodeAutoColorBy","graphData","nodeColor"])&&re(e.graphData.nodes,Object(m.default)(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&n(["linkAutoColorBy","graphData","linkColor"])&&re(e.graphData.links,Object(m.default)(e.linkAutoColorBy),e.linkColor),e._flushObjects||n(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=Object(m.default)(e.nodeThreeObject),i=Object(m.default)(e.nodeThreeObjectExtend),o=Object(m.default)(e.nodeVal),a=Object(m.default)(e.nodeColor),s=Object(m.default)(e.nodeVisibility),l={},u={};$(e.graphData.nodes.filter(s),e.graphScene,{purge:e._flushObjects||n(["nodeThreeObject","nodeThreeObjectExtend"]),objFilter:function(e){return"node"===e.__graphObjType},createObj:function(t){var n,o=r(t),a=i(t);return o&&e.nodeThreeObject===o&&(o=o.clone()),o&&!a?n=o:((n=new ie.Mesh).__graphDefaultObj=!0,o&&a&&n.add(o)),n.__graphObjType="node",n},updateObj:function(t,n){if(t.__graphDefaultObj){var r=o(n)||1,i=Math.cbrt(r)*e.nodeRelSize,s=e.nodeResolution;t.geometry.type.match(/^Sphere(Buffer)?Geometry$/)&&t.geometry.parameters.radius===i&&t.geometry.parameters.widthSegments===s||(l.hasOwnProperty(r)||(l[r]=new ie.SphereBufferGeometry(i,s,s)),t.geometry.dispose(),t.geometry=l[r]);var c=a(n),h=new ie.Color(ee(c||"#ffffaa")),d=e.nodeOpacity*te(c);"MeshLambertMaterial"===t.material.type&&t.material.color.equals(h)&&t.material.opacity===d||(u.hasOwnProperty(c)||(u[c]=new ie.MeshLambertMaterial({color:h,transparent:!0,opacity:d})),t.material.dispose(),t.material=u[c])}}})}if(e._flushObjects||n(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution"])){var h=Object(m.default)(e.linkThreeObject),d=Object(m.default)(e.linkThreeObjectExtend),f=Object(m.default)(e.linkMaterial),p=Object(m.default)(e.linkVisibility),g=Object(m.default)(e.linkColor),v=Object(m.default)(e.linkWidth),y={},b={},w={},x=e.graphData.links.filter(p);if($(x,e.graphScene,{objBindAttr:"__lineObj",purge:e._flushObjects||n(["linkThreeObject","linkThreeObjectExtend","linkWidth"]),objFilter:function(e){return"link"===e.__graphObjType},createObj:function(t){var n,r,i=h(t),o=d(t);if(i&&e.linkThreeObject===i&&(i=i.clone()),!i||o)if(!!v(t))n=new ie.Mesh;else{var a=new ie.BufferGeometry;a[ae]("position",new ie.BufferAttribute(new Float32Array(6),3)),n=new ie.Line(a)}return i?o?((r=new ie.Group).__graphDefaultObj=!0,r.add(n),r.add(i)):r=i:(r=n).__graphDefaultObj=!0,r.renderOrder=10,r.__graphObjType="link",r},updateObj:function(t,n){if(t.__graphDefaultObj){var r=t.children.length?t.children[0]:t,i=Math.ceil(10*v(n))/10,o=!!i;if(o){var a=i/2,s=e.linkResolution;if(!r.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||r.geometry.parameters.radiusTop!==a||r.geometry.parameters.radialSegments!==s){if(!y.hasOwnProperty(i)){var l=new ie.CylinderBufferGeometry(a,a,1,s,1,!1);l[se]((new ie.Matrix4).makeTranslation(0,.5,0)),l[se]((new ie.Matrix4).makeRotationX(Math.PI/2)),y[i]=l}r.geometry.dispose(),r.geometry=y[i]}}var c=f(n);if(c)r.material=c;else{var u=g(n),h=new ie.Color(ee(u||"#f0f0f0")),d=e.linkOpacity*te(u),p=o?"MeshLambertMaterial":"LineBasicMaterial";if(r.material.type!==p||!r.material.color.equals(h)||r.material.opacity!==d){var m=o?b:w;m.hasOwnProperty(u)||(m[u]=new ie[p]({color:h,transparent:d<1,opacity:d,depthWrite:d>=1})),r.material.dispose(),r.material=m[u]}}}}}),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var _=Object(m.default)(e.linkDirectionalArrowLength),E=Object(m.default)(e.linkDirectionalArrowColor);$(x.filter(_),e.graphScene,{objBindAttr:"__arrowObj",objFilter:function(e){return"arrow"===e.__linkThreeObjType},createObj:function(){var e=new ie.Mesh(void 0,new ie.MeshLambertMaterial({transparent:!0}));return e.__linkThreeObjType="arrow",e},updateObj:function(t,n){var r=_(n),i=e.linkDirectionalArrowResolution;if(!t.geometry.type.match(/^Cone(Buffer)?Geometry$/)||t.geometry.parameters.height!==r||t.geometry.parameters.radialSegments!==i){var o=new ie.ConeBufferGeometry(.25*r,r,i);o.translate(0,r/2,0),o.rotateX(Math.PI/2),t.geometry.dispose(),t.geometry=o}t.material.color=new ie.Color(E(n)||g(n)||"#f0f0f0"),t.material.opacity=3*e.linkOpacity}})}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var A=Object(m.default)(e.linkDirectionalParticles),S=Object(m.default)(e.linkDirectionalParticleWidth),M=Object(m.default)(e.linkDirectionalParticleColor),T={},C={};$(x.filter(A),e.graphScene,{objBindAttr:"__photonsObj",objFilter:function(e){return"photons"===e.__linkThreeObjType},createObj:function(){var e=new ie.Group;return e.__linkThreeObjType="photons",e},updateObj:function(t,n){var r,i=Math.round(Math.abs(A(n))),o=!!t.children.length&&t.children[0],a=Math.ceil(10*S(n))/10/2,s=e.linkDirectionalParticleResolution;o&&o.geometry.parameters.radius===a&&o.geometry.parameters.widthSegments===s?r=o.geometry:(C.hasOwnProperty(a)||(C[a]=new ie.SphereBufferGeometry(a,s,s)),r=C[a],o&&o.geometry.dispose());var l,c=M(n)||g(n)||"#f0f0f0",u=new ie.Color(ee(c)),h=3*e.linkOpacity;o&&o.material.color.equals(u)&&o.material.opacity===h?l=o.material:(T.hasOwnProperty(c)||(T[c]=new ie.MeshLambertMaterial({color:u,transparent:!0,opacity:h})),l=T[c],o&&o.material.dispose()),$(X(new Array(i)).map((function(e,t){return{idx:t}})),t,{idAccessor:function(e){return e.idx},createObj:function(){return new ie.Mesh(r,l)},updateObj:function(e){e.geometry=r,e.material=l}})}})}}if(e._flushObjects=!1,n(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]}));var O,R="ngraph"!==e.forceEngine;if(R){(O=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var k=e.d3ForceLayout.force("link");k&&k.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var P=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.nodeFilter,a=void 0===o?function(){return!0}:o,s=i.onLoopError,l=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};n.forEach((function(e){return c[t(e)]={data:e,out:[],depth:-1,skip:!a(e)}})),r.forEach((function(e){var n=e.source,r=e.target,i=l(n),o=l(r);if(!c.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!c.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var a=c[i],s=c[o];function l(e){return"object"===D(e)?t(e):e}a.out.push(s)}));var u=[];d(Object.values(c));var h=Object.assign.apply(Object,[{}].concat(X(Object.entries(c).filter((function(e){return!q(e,2)[1].skip})).map((function(e){var t=q(e,2);return N({},t[0],t[1].depth)})))));return h;function d(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,o=e.length;i<o;i++){var a=e[i];if(-1!==n.indexOf(a)){var s=function(){var e=[].concat(X(n.slice(n.indexOf(a))),[a]).map((function(e){return t(e.data)}));return u.some((function(t){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}))||(u.push(e),l(e)),"continue"}();if("continue"===s)continue}r>a.depth&&(a.depth=r,d(a.out,[].concat(X(n),[a]),r+(a.skip?0:1)))}}}(e.graphData,(function(t){return t[e.nodeId]}),{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),I=Math.max.apply(Math,X(Object.values(P||[]))),j=e.dagLevelDistance||e.graphData.nodes.length/(I||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(e.dagMode){var B=function(t,n){return function(r){return t?(P[r[e.nodeId]]-I/2)*j*(n?-1:1):void 0}},F=B(-1!==["lr","rl"].indexOf(e.dagMode),"rl"===e.dagMode),z=B(-1!==["td","bu"].indexOf(e.dagMode),"td"===e.dagMode),H=B(-1!==["zin","zout"].indexOf(e.dagMode),"zout"===e.dagMode);e.graphData.nodes.filter(e.dagNodeFilter).forEach((function(e){e.fx=F(e),e.fy=z(e),e.fz=H(e)}))}e.d3ForceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?Object(c.a)((function(t){var n=P[t[e.nodeId]]||-1;return("radialin"===e.dagMode?I-n:n)*j})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null)}else{var U=oe.graph();e.graphData.nodes.forEach((function(t){U.addNode(t[e.nodeId])})),e.graphData.links.forEach((function(e){U.addLink(e.source,e.target)})),(O=oe.forcelayout(U,L({dimensions:e.numDimensions},e.ngraphPhysics))).graph=U}for(var V=0;V<e.warmupTicks&&!(R&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()<e.d3AlphaMin);V++)O[R?"tick":"step"]();e.layout=O,this.resetCountdown()}e.engineRunning=!0,e.onFinishUpdate()}}),(window.THREE?window.THREE:{Group:i.n}).Group,!0);n.default=le},,,,,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(l[s[h]]=n[s[h]])}}return l}},function(e,t){e.exports=function(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");for(var t=["on","fire","off"],n=0;n<t.length;++n)if(e.hasOwnProperty(t[n]))throw new Error("Subject cannot be eventified, since it already has property '"+t[n]+"'")}(e);var t=function(e){var t=Object.create(null);return{on:function(n,r,i){if("function"!==typeof r)throw new Error("callback is expected to be a function");var o=t[n];return o||(o=t[n]=[]),o.push({callback:r,ctx:i}),e},off:function(n,r){if("undefined"===typeof n)return t=Object.create(null),e;if(t[n])if("function"!==typeof r)delete t[n];else for(var i=t[n],o=0;o<i.length;++o)i[o].callback===r&&i.splice(o,1);return e},fire:function(n){var r,i=t[n];if(!i)return e;arguments.length>1&&(r=Array.prototype.splice.call(arguments,1));for(var o=0;o<i.length;++o){var a=i[o];a.callback.apply(a.ctx,r)}return e}}}(e);return e.on=t.on,e.off=t.off,e.fire=t.fire,e}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return d}));var r=n(22),i=n.n(r),o=n(6),a=n.n(o),s=n(40),l=n(102);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={replace:function(e,t){return{type:"REPLACE",payload:{name:e,params:t}}},push:function(e,t){return{type:"PUSH",payload:{name:e,params:t}}},pop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{type:"POP",payload:{count:e}}},popToTop:function(){return{type:"POP_TO_TOP"}}};function d(e){var t=u(u({},l.a),{},{type:"stack",getInitialState:function(t){var n=t.routeNames,r=t.routeParamList,i=void 0!==e.initialRouteName&&n.includes(e.initialRouteName)?e.initialRouteName:n[0];return{stale:!1,type:"stack",key:"stack-".concat(Object(s.a)()),index:0,routeNames:n,routes:[{key:"".concat(i,"-").concat(Object(s.a)()),name:i,params:r[i]}]}},getRehydratedState:function(t,n){var r=n.routeNames,i=n.routeParamList,o=t;if(!1===o.stale)return o;var a=o.routes.filter((function(e){return r.includes(e.name)})).map((function(e){return u(u({},e),{},{key:e.key||"".concat(e.name,"-").concat(Object(s.a)()),params:void 0!==i[e.name]?u(u({},i[e.name]),e.params):e.params})}));if(0===a.length){var l=void 0!==e.initialRouteName?e.initialRouteName:r[0];a.push({key:"".concat(l,"-").concat(Object(s.a)()),name:l,params:i[l]})}return{stale:!1,type:"stack",key:"stack-".concat(Object(s.a)()),index:a.length-1,routeNames:r,routes:a}},getStateForRouteNamesChange:function(t,n){var r=n.routeNames,i=n.routeParamList,o=t.routes.filter((function(e){return r.includes(e.name)}));if(0===o.length){var a=void 0!==e.initialRouteName&&r.includes(e.initialRouteName)?e.initialRouteName:r[0];o.push({key:"".concat(a,"-").concat(Object(s.a)()),name:a,params:i[a]})}return u(u({},t),{},{routeNames:r,routes:o,index:Math.min(t.index,o.length-1)})},getStateForRouteFocus:function(e,t){var n=e.routes.findIndex((function(e){return e.key===t}));return-1===n||n===e.index?e:u(u({},e),{},{index:n,routes:e.routes.slice(0,n+1)})},getStateForAction:function(e,n,r){var o=r.routeParamList;switch(n.type){case"REPLACE":var a=n.target===e.key&&n.source?e.routes.findIndex((function(e){return e.key===n.source})):e.index;if(-1===a)return null;var c=n.payload,h=c.name,d=c.key,f=c.params;return e.routeNames.includes(h)?u(u({},e),{},{routes:e.routes.map((function(e,t){return t===a?{key:void 0!==d?d:"".concat(h,"-").concat(Object(s.a)()),name:h,params:void 0!==o[h]?u(u({},o[h]),f):f}:e}))}):null;case"PUSH":if(e.routeNames.includes(n.payload.name)){var p,m,g=r.routeGetIdList[n.payload.name],v=null===g||void 0===g?void 0:g({params:n.payload.params}),y=n.payload.name&&n.payload.key?e.routes.find((function(e){return e.name===n.payload.name&&e.key===n.payload.key})):v?e.routes.find((function(e){return e.name===n.payload.name&&v===(null===g||void 0===g?void 0:g({params:e.params}))})):void 0;if(y)(p=e.routes.filter((function(e){return e.key!==y.key}))).push(u(u({},y),{},{params:void 0!==n.payload.params?u(u({},y.params),n.payload.params):y.params}));else p=[].concat(i()(e.routes),[{key:null!==(m=n.payload.key)&&void 0!==m?m:"".concat(n.payload.name,"-").concat(Object(s.a)()),name:n.payload.name,params:void 0!==o[n.payload.name]?u(u({},o[n.payload.name]),n.payload.params):n.payload.params}]);return u(u({},e),{},{index:p.length-1,routes:p})}return null;case"POP":var b=n.target===e.key&&n.source?e.routes.findIndex((function(e){return e.key===n.source})):e.index;if(b>0){var w=Math.max(b-n.payload.count+1,1),x=e.routes.slice(0,w).concat(e.routes.slice(b+1));return u(u({},e),{},{index:x.length-1,routes:x})}return null;case"POP_TO_TOP":return t.getStateForAction(e,{type:"POP",payload:{count:e.routes.length-1}},r);case"NAVIGATE":if(void 0!==n.payload.name&&!e.routeNames.includes(n.payload.name))return null;if(n.payload.key||n.payload.name){var _=-1,E=void 0===n.payload.key&&void 0!==n.payload.name?r.routeGetIdList[n.payload.name]:void 0,A=null===E||void 0===E?void 0:E({params:n.payload.params});if(A)_=e.routes.findIndex((function(e){return e.name===n.payload.name&&A===(null===E||void 0===E?void 0:E({params:e.params}))}));else if(e.routes[e.index].name===n.payload.name&&void 0===n.payload.key||e.routes[e.index].key===n.payload.key)_=e.index;else for(var S=e.routes.length-1;S>=0;S--)if(e.routes[S].name===n.payload.name&&void 0===n.payload.key||e.routes[S].key===n.payload.key){_=S;break}if(-1===_&&n.payload.key&&void 0===n.payload.name)return null;if(-1===_&&void 0!==n.payload.name){var M,T=[].concat(i()(e.routes),[{key:null!==(M=n.payload.key)&&void 0!==M?M:"".concat(n.payload.name,"-").concat(Object(s.a)()),name:n.payload.name,params:void 0!==o[n.payload.name]?u(u({},o[n.payload.name]),n.payload.params):n.payload.params}]);return u(u({},e),{},{routes:T,index:T.length-1})}var C,O=e.routes[_];return C=!1===n.payload.merge?void 0!==o[O.name]?u(u({},o[O.name]),n.payload.params):n.payload.params:n.payload.params?u(u({},O.params),n.payload.params):O.params,u(u({},e),{},{index:_,routes:[].concat(i()(e.routes.slice(0,_)),[C!==O.params?u(u({},O),{},{params:C}):e.routes[_]])})}return null;case"GO_BACK":return e.index>0?t.getStateForAction(e,{type:"POP",payload:{count:1},target:n.target,source:n.source},r):null;default:return l.a.getStateForAction(e,n)}},actionCreators:h});return t}},function(e,t,n){var r=n(53),i=n(38),o=n(112);e.exports=function(e){return function t(n,a,s){switch(arguments.length){case 0:return t;case 1:return o(n)?t:i((function(t,r){return e(n,t,r)}));case 2:return o(n)&&o(a)?t:o(n)?i((function(t,n){return e(t,a,n)})):o(a)?i((function(t,r){return e(n,t,r)})):r((function(t){return e(n,a,t)}));default:return o(n)&&o(a)&&o(s)?t:o(n)&&o(a)?i((function(t,n){return e(t,n,s)})):o(n)&&o(s)?i((function(t,n){return e(t,a,n)})):o(a)&&o(s)?i((function(t,r){return e(n,t,r)})):o(n)?r((function(t){return e(t,a,s)})):o(a)?r((function(t){return e(n,t,s)})):o(s)?r((function(t){return e(n,a,t)})):e(n,a,s)}}}},function(e,t){e.exports=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){var r=n(156);e.exports=function(e,t){return function(){var n=arguments.length;if(0===n)return t();var i=arguments[n-1];return r(i)||"function"!==typeof i[e]?t.apply(this,arguments):i[e].apply(i,Array.prototype.slice.call(arguments,0,n-1))}}},function(e,t,n){var r=n(53),i=n(114),o=n(385),a=!{toString:null}.propertyIsEnumerable("toString"),s=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],l=function(){"use strict";return arguments.propertyIsEnumerable("length")}(),c=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},u=r("function"!==typeof Object.keys||l?function(e){if(Object(e)!==e)return[];var t,n,r=[],u=l&&o(e);for(t in e)!i(t,e)||u&&"length"===t||(r[r.length]=t);if(a)for(n=s.length-1;n>=0;)i(t=s[n],e)&&!c(r,t)&&(r[r.length]=t),n-=1;return r}:function(e){return Object(e)!==e?[]:Object.keys(e)});e.exports=u},function(t,n,r){"use strict";r.r(n),r.d(n,"unstable_createElement",(function(){return i.a})),r.d(n,"findNodeHandle",(function(){return o.a})),r.d(n,"processColor",(function(){return a.a})),r.d(n,"render",(function(){return s.a})),r.d(n,"unmountComponentAtNode",(function(){return l.a})),r.d(n,"NativeModules",(function(){return c.a})),r.d(n,"AccessibilityInfo",(function(){return m})),r.d(n,"Alert",(function(){return g})),r.d(n,"Animated",(function(){return v.a})),r.d(n,"Appearance",(function(){return w})),r.d(n,"AppRegistry",(function(){return x.a})),r.d(n,"AppState",(function(){return D})),r.d(n,"BackHandler",(function(){return N.a})),r.d(n,"Clipboard",(function(){return j})),r.d(n,"DeviceInfo",(function(){return F})),r.d(n,"Dimensions",(function(){return B.a})),r.d(n,"Easing",(function(){return z.a})),r.d(n,"I18nManager",(function(){return H.a})),r.d(n,"Keyboard",(function(){return U.a})),r.d(n,"InteractionManager",(function(){return V.a})),r.d(n,"LayoutAnimation",(function(){return K})),r.d(n,"Linking",(function(){return $})),r.d(n,"NativeEventEmitter",(function(){return ee})),r.d(n,"PanResponder",(function(){return de})),r.d(n,"PixelRatio",(function(){return fe.a})),r.d(n,"Platform",(function(){return G.a})),r.d(n,"Share",(function(){return me})),r.d(n,"StyleSheet",(function(){return ge.a})),r.d(n,"UIManager",(function(){return W.a})),r.d(n,"Vibration",(function(){return ye})),r.d(n,"ActivityIndicator",(function(){return Ce})),r.d(n,"Button",(function(){return Le})),r.d(n,"CheckBox",(function(){return ze})),r.d(n,"FlatList",(function(){return He.a})),r.d(n,"Image",(function(){return Ue.a})),r.d(n,"ImageBackground",(function(){return qe})),r.d(n,"KeyboardAvoidingView",(function(){return Xe.a})),r.d(n,"Modal",(function(){return gt})),r.d(n,"Picker",(function(){return Et})),r.d(n,"Pressable",(function(){return mn})),r.d(n,"ProgressBar",(function(){return bn})),r.d(n,"RefreshControl",(function(){return wn.a})),r.d(n,"SafeAreaView",(function(){return xn.a})),r.d(n,"ScrollView",(function(){return _n.a})),r.d(n,"SectionList",(function(){return En.a})),r.d(n,"StatusBar",(function(){return An.a})),r.d(n,"Switch",(function(){return Sn.a})),r.d(n,"Text",(function(){return Re.a})),r.d(n,"TextInput",(function(){return Mn.a})),r.d(n,"Touchable",(function(){return fr})),r.d(n,"TouchableHighlight",(function(){return pr.a})),r.d(n,"TouchableNativeFeedback",(function(){return mr.a})),r.d(n,"TouchableOpacity",(function(){return Oe.a})),r.d(n,"TouchableWithoutFeedback",(function(){return gr.a})),r.d(n,"View",(function(){return xe.a})),r.d(n,"VirtualizedList",(function(){return vr})),r.d(n,"YellowBox",(function(){return wr})),r.d(n,"LogBox",(function(){return xr.a})),r.d(n,"DrawerLayoutAndroid",(function(){return _r})),r.d(n,"InputAccessoryView",(function(){return Er})),r.d(n,"ToastAndroid",(function(){return Ar})),r.d(n,"PermissionsAndroid",(function(){return Mr})),r.d(n,"Settings",(function(){return Tr})),r.d(n,"Systrace",(function(){return Cr})),r.d(n,"TVEventHandler",(function(){return Or})),r.d(n,"DeviceEventEmitter",(function(){return Rr})),r.d(n,"useColorScheme",(function(){return kr})),r.d(n,"useWindowDimensions",(function(){return Pr}));var i=r(31),o=r(46),a=r(115),s=r(119),l=r(120),c=r(185),u=r(13);function h(){return new Promise((function(e,t){e(!0)}))}var d=u.canUseDOM&&"function"===typeof window.matchMedia?window.matchMedia("(prefers-reduced-motion: reduce)"):null;var f={},p={isScreenReaderEnabled:h,isReduceMotionEnabled:function(){return new Promise((function(e,t){e(!d||d.matches)}))},fetch:h,addEventListener:function(e,t){if("reduceMotionChanged"===e){if(!d)return;var n=function(e){t(e.matches)};r=n,null!=d&&(null!=d.addEventListener?d.addEventListener("change",r):d.addListener(r)),f[t]=n}var r;return{remove:function(){return p.removeEventListener(e,t)}}},setAccessibilityFocus:function(e){},announceForAccessibility:function(e){},removeEventListener:function(e,t){if("reduceMotionChanged"===e){var n=f[t];if(!n||!d)return;r=n,null!=d&&(null!=d.removeEventListener?d.removeEventListener("change",r):d.removeListener(r))}var r}},m=p,g=function(){function e(){}return e.alert=function(){},e}(),v=r(12);var y=u.canUseDOM&&null!=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null,b=new WeakMap,w={getColorScheme:function(){return y&&y.matches?"dark":"light"},addChangeListener:function(e){var t=b.get(e);t||(t=function(t){var n=t.matches;e({colorScheme:n?"dark":"light"})},b.set(e,t)),y&&y.addListener(t)},removeChangeListener:function(e){var t=b.get(e);t&&(y&&y.removeListener(t),b.delete(e))}},x=r(103),_=r(249),E=r.n(_),A=r(4),S=r.n(A);function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var T=u.canUseDOM&&!document.hasOwnProperty("hidden")&&document.hasOwnProperty("webkitHidden"),C=["change","memoryWarning"],O=T?"webkitvisibilitychange":"visibilitychange",R=T?"webkitVisibilityState":"visibilityState",k="background",P="active",L=[],D=function(){function e(){}var t,n,r;return e.addEventListener=function(t,n){if(e.isAvailable&&(S()(-1!==C.indexOf(t),'Trying to subscribe to unknown event: "%s"',t),"change"===t)){var r=function(){return n(e.currentState)};L.push([n,r]),document.addEventListener(O,r,!1)}},e.removeEventListener=function(t,n){if(e.isAvailable&&(S()(-1!==C.indexOf(t),'Trying to remove listener for unknown event: "%s"',t),"change"===t)){var r=E()(L,(function(e){return e[0]===n}));S()(-1!==r,"Trying to remove AppState listener for unregistered handler");var i=L[r][1];document.removeEventListener(O,i,!1),L.splice(r,1)}},t=e,r=[{key:"currentState",get:function(){if(!e.isAvailable)return P;switch(document[R]){case"hidden":case"prerender":case"unloaded":return k;default:return P}}}],(n=null)&&M(t.prototype,n),r&&M(t,r),e}();D.isAvailable=u.canUseDOM&&document[R];var I,N=r(79),j=function(){function t(){}return t.isAvailable=function(){return void 0===I&&(I="function"===typeof document.queryCommandSupported&&document.queryCommandSupported("copy")),I},t.getString=function(){return Promise.resolve("")},t.setString=function(t){var n=!1,r=document.body;if(r){var i=document.createElement("span");i.textContent=t,i.style.opacity="0",i.style.position="absolute",i.style.whiteSpace="pre-wrap",i.style.userSelect="auto",r.appendChild(i);var o=window.getSelection();o.removeAllRanges();var a=document.createRange();a.selectNodeContents(i),o.addRange(a);try{document.execCommand("copy"),n=!0}catch(e){}o.removeAllRanges(),r.removeChild(i)}return n},t}(),B=r(33),F={Dimensions:{get windowPhysicalPixels(){var e=B.a.get("window"),t=e.width,n=e.height,r=e.fontScale,i=e.scale;return{width:t*i,height:n*i,scale:i,fontScale:r}},get screenPhysicalPixels(){var e=B.a.get("screen"),t=e.width,n=e.height,r=e.fontScale,i=e.scale;return{width:t*i,height:n*i,scale:i,fontScale:r}}},get locale(){if(u.canUseDOM)return navigator.languages?navigator.languages[0]:navigator.language},get totalMemory(){return u.canUseDOM?navigator.deviceMemory:void 0},get userAgent(){return u.canUseDOM?navigator.userAgent:""}},z=r(14),H=r(35),U=r(121),V=r(51),G=r(8),W=r(28);function q(e,t){G.a.isTesting||W.a.configureNextLayoutAnimation(e,null!==t&&void 0!==t?t:function(){},(function(){}))}function X(e,t,n){return{duration:e,create:{type:t,property:n},update:{type:t},delete:{type:t,property:n}}}var Y={easeInEaseOut:X(300,"easeInEaseOut","opacity"),linear:X(500,"linear","opacity"),spring:{duration:700,create:{type:"linear",property:"opacity"},update:{type:"spring",springDamping:.4},delete:{type:"linear",property:"opacity"}}},K={configureNext:q,create:X,Types:Object.freeze({spring:"spring",linear:"linear",easeInEaseOut:"easeInEaseOut",easeIn:"easeIn",easeOut:"easeOut",keyboard:"keyboard"}),Properties:Object.freeze({opacity:"opacity",scaleX:"scaleX",scaleY:"scaleY",scaleXY:"scaleXY"}),checkConfig:function(){console.error("LayoutAnimation.checkConfig(...) has been disabled.")},Presets:Y,easeInEaseOut:q.bind(null,Y.easeInEaseOut),linear:q.bind(null,Y.linear),spring:q.bind(null,Y.spring)},Q=u.canUseDOM?window.location.href:"",Z=function(){function t(){var e=this;this._eventCallbacks={},this.addEventListener=function(t,n){e._eventCallbacks[t]?e._eventCallbacks[t].push(n):e._eventCallbacks[t]=[n]},this.removeEventListener=function(t,n){var r=e._eventCallbacks[t].filter((function(e){return e.toString()!==n.toString()}));e._eventCallbacks[t]=r}}var n=t.prototype;return n._dispatchEvent=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=this._eventCallbacks[e];null!=i&&Array.isArray(i)&&i.map((function(e){e.apply(void 0,n)}))},n.canOpenURL=function(){return Promise.resolve(!0)},n.getInitialURL=function(){return Promise.resolve(Q)},n.openURL=function(t){try{return J(t),this._dispatchEvent("onOpen",t),Promise.resolve()}catch(e){return Promise.reject(e)}},n._validateURL=function(e){S()("string"===typeof e,"Invalid URL: should be a string. Was: "+e),S()(e,"Invalid URL: cannot be empty")},t}(),J=function(e){if(u.canUseDOM){var t=new URL(e,window.location).toString();window.open(t,"_blank","noopener")}},$=new Z,ee=r(134).a,te={centroidDimension:function(e,t,n,r){var i=e.touchBank,o=0,a=0,s=1===e.numberActiveTouches?e.touchBank[e.indexOfSingleActiveTouch]:null;if(null!==s)s.touchActive&&s.currentTimeStamp>t&&(o+=r&&n?s.currentPageX:r&&!n?s.currentPageY:!r&&n?s.previousPageX:s.previousPageY,a=1);else for(var l=0;l<i.length;l++){var c=i[l];if(null!==c&&void 0!==c&&c.touchActive&&c.currentTimeStamp>=t){o+=r&&n?c.currentPageX:r&&!n?c.currentPageY:!r&&n?c.previousPageX:c.previousPageY,a++}}return a>0?o/a:te.noCentroid},currentCentroidXOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!0,!0)},currentCentroidYOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!1,!0)},previousCentroidXOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!0,!1)},previousCentroidYOfTouchesChangedAfter:function(e,t){return te.centroidDimension(e,t,!1,!1)},currentCentroidX:function(e){return te.centroidDimension(e,0,!0,!0)},currentCentroidY:function(e){return te.centroidDimension(e,0,!1,!0)},noCentroid:-1},ne=te,re=ne.currentCentroidXOfTouchesChangedAfter,ie=ne.currentCentroidYOfTouchesChangedAfter,oe=ne.previousCentroidXOfTouchesChangedAfter,ae=ne.previousCentroidYOfTouchesChangedAfter,se=ne.currentCentroidX,le=ne.currentCentroidY,ce={_initializeGestureState:function(e){e.moveX=0,e.moveY=0,e.x0=0,e.y0=0,e.dx=0,e.dy=0,e.vx=0,e.vy=0,e.numberActiveTouches=0,e._accountsForMovesUpTo=0},_updateGestureStateOnMove:function(e,t){e.numberActiveTouches=t.numberActiveTouches,e.moveX=re(t,e._accountsForMovesUpTo),e.moveY=ie(t,e._accountsForMovesUpTo);var n=e._accountsForMovesUpTo,r=oe(t,n),i=re(t,n),o=ae(t,n),a=ie(t,n),s=e.dx+(i-r),l=e.dy+(a-o),c=t.mostRecentTimeStamp-e._accountsForMovesUpTo;e.vx=(s-e.dx)/c,e.vy=(l-e.dy)/c,e.dx=s,e.dy=l,e._accountsForMovesUpTo=t.mostRecentTimeStamp},create:function(e){var t={handle:null,shouldCancelClick:!1,timeout:null},n={stateID:Math.random(),moveX:0,moveY:0,x0:0,y0:0,dx:0,dy:0,vx:0,vy:0,numberActiveTouches:0,_accountsForMovesUpTo:0};return{panHandlers:{onStartShouldSetResponder:function(t){return null!=e.onStartShouldSetPanResponder&&e.onStartShouldSetPanResponder(t,n)},onMoveShouldSetResponder:function(t){return null!=e.onMoveShouldSetPanResponder&&e.onMoveShouldSetPanResponder(t,n)},onStartShouldSetResponderCapture:function(t){return 1===t.nativeEvent.touches.length&&ce._initializeGestureState(n),n.numberActiveTouches=t.touchHistory.numberActiveTouches,null!=e.onStartShouldSetPanResponderCapture&&e.onStartShouldSetPanResponderCapture(t,n)},onMoveShouldSetResponderCapture:function(t){var r=t.touchHistory;return n._accountsForMovesUpTo!==r.mostRecentTimeStamp&&(ce._updateGestureStateOnMove(n,r),!!e.onMoveShouldSetPanResponderCapture&&e.onMoveShouldSetPanResponderCapture(t,n))},onResponderGrant:function(r){return t.handle||(t.handle=V.a.createInteractionHandle()),t.timeout&&function(e){clearTimeout(e.timeout)}(t),t.shouldCancelClick=!0,n.x0=se(r.touchHistory),n.y0=le(r.touchHistory),n.dx=0,n.dy=0,e.onPanResponderGrant&&e.onPanResponderGrant(r,n),null==e.onShouldBlockNativeResponder||e.onShouldBlockNativeResponder(r,n)},onResponderReject:function(r){ue(t,e.onPanResponderReject,r,n)},onResponderRelease:function(r){ue(t,e.onPanResponderRelease,r,n),he(t),ce._initializeGestureState(n)},onResponderStart:function(t){var r=t.touchHistory;n.numberActiveTouches=r.numberActiveTouches,e.onPanResponderStart&&e.onPanResponderStart(t,n)},onResponderMove:function(t){var r=t.touchHistory;n._accountsForMovesUpTo!==r.mostRecentTimeStamp&&(ce._updateGestureStateOnMove(n,r),e.onPanResponderMove&&e.onPanResponderMove(t,n))},onResponderEnd:function(r){var i=r.touchHistory;n.numberActiveTouches=i.numberActiveTouches,ue(t,e.onPanResponderEnd,r,n)},onResponderTerminate:function(r){ue(t,e.onPanResponderTerminate,r,n),he(t),ce._initializeGestureState(n)},onResponderTerminationRequest:function(t){return null==e.onPanResponderTerminationRequest||e.onPanResponderTerminationRequest(t,n)},onClickCapture:function(e){!0===t.shouldCancelClick&&(e.stopPropagation(),e.preventDefault())}},getInteractionHandle:function(){return t.handle}}}};function ue(e,t,n,r){e.handle&&(V.a.clearInteractionHandle(e.handle),e.handle=null),t&&t(n,r)}function he(e){e.timeout=setTimeout((function(){e.shouldCancelClick=!1}),250)}var de=ce,fe=r(116);function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var me=function(){function e(){}var t,n,r;return e.share=function(e,t){return void 0===t&&(t={}),S()("object"===typeof e&&null!==e,"Content to share must be a valid object"),S()("string"===typeof e.url||"string"===typeof e.message,"At least one of URL and message is required"),S()("object"===typeof t&&null!==t,"Options must be a valid object"),S()(!e.title||"string"===typeof e.title,"Invalid title: title should be a string."),void 0!==window.navigator.share?window.navigator.share({title:e.title,text:e.message,url:e.url}):Promise.reject(new Error("Share is not supported in this browser"))},t=e,r=[{key:"sharedAction",get:function(){return"sharedAction"}},{key:"dismissedAction",get:function(){return"dismissedAction"}}],(n=null)&&pe(t.prototype,n),r&&pe(t,r),e}(),ge=r(5),ve=function(e){"vibrate"in window.navigator&&window.navigator.vibrate(e)},ye={cancel:function(){ve(0)},vibrate:function(e){void 0===e&&(e=400),ve(e)}},be=r(0),we=r.n(be),xe=r(2);function _e(){return(_e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ee={max:1,min:0},Ae=function(e){return be.createElement("circle",{cx:"16",cy:"16",fill:"none",r:"14",strokeWidth:"4",style:e})},Se=be.forwardRef((function(e,t){var n=e.animating,r=void 0===n||n,i=e.color,o=void 0===i?"#1976D2":i,a=e.hidesWhenStopped,s=void 0===a||a,l=e.size,c=void 0===l?"small":l,u=e.style,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["animating","color","hidesWhenStopped","size","style"]),d=be.createElement("svg",{height:"100%",viewBox:"0 0 32 32",width:"100%"},Ae({stroke:o,opacity:.2}),Ae({stroke:o,strokeDasharray:80,strokeDashoffset:60}));return be.createElement(xe.a,_e({},h,{accessibilityRole:"progressbar",accessibilityValue:Ee,ref:t,style:[Me.container,u]}),be.createElement(xe.a,{children:d,style:["number"===typeof c?{height:c,width:c}:Te[c],Me.animation,!r&&Me.animationPause,!r&&s&&Me.hidesWhenStopped]}))}));Se.displayName="ActivityIndicator";var Me=ge.a.create({container:{alignItems:"center",justifyContent:"center"},hidesWhenStopped:{visibility:"hidden"},animation:{animationDuration:"0.75s",animationKeyframes:[{"0%":{transform:[{rotate:"0deg"}]},"100%":{transform:[{rotate:"360deg"}]}}],animationTimingFunction:"linear",animationIterationCount:"infinite"},animationPause:{animationPlayState:"paused"}}),Te=ge.a.create({small:{width:20,height:20},large:{width:36,height:36}}),Ce=Se,Oe=r(45),Re=r(54),ke=be.forwardRef((function(e,t){var n=e.accessibilityLabel,r=e.color,i=e.disabled,o=e.onPress,a=e.testID,s=e.title;return be.createElement(Oe.a,{accessibilityLabel:n,accessibilityRole:"button",disabled:i,focusable:!i,onPress:o,ref:t,style:[Pe.button,r&&{backgroundColor:r},i&&Pe.buttonDisabled],testID:a},be.createElement(Re.a,{style:[Pe.text,i&&Pe.textDisabled]},s))}));ke.displayName="Button";var Pe=ge.a.create({button:{backgroundColor:"#2196F3",borderRadius:2},text:{color:"#fff",fontWeight:"500",padding:8,textAlign:"center",textTransform:"uppercase"},buttonDisabled:{backgroundColor:"#dfdfdf"},textDisabled:{color:"#a1a1a1"}}),Le=ke;function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){Ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function je(){return(je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Be=be.forwardRef((function(e,t){var n=e.color,r=e.disabled,o=e.onChange,a=e.onValueChange,s=e.style,l=e.value,c=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["color","disabled","onChange","onValueChange","style","value"]);var u=be.createElement(xe.a,{style:[Fe.fakeControl,l&&Fe.fakeControlChecked,l&&n&&{backgroundColor:n,borderColor:n},r&&Fe.fakeControlDisabled,l&&r&&Fe.fakeControlCheckedAndDisabled]}),h=Object(i.a)("input",{checked:l,disabled:r,onChange:function(e){var t=e.nativeEvent.target.checked;e.nativeEvent.value=t,o&&o(e),a&&a(t)},ref:t,style:[Fe.nativeControl,Fe.cursorInherit],type:"checkbox"});return be.createElement(xe.a,je({},c,{accessibilityDisabled:r,style:[Fe.root,s,r&&Fe.cursorDefault]}),u,h)}));Be.displayName="CheckBox";var Fe=ge.a.create({root:{cursor:"pointer",height:16,userSelect:"none",width:16},cursorDefault:{cursor:"default"},cursorInherit:{cursor:"inherit"},fakeControl:{alignItems:"center",backgroundColor:"#fff",borderColor:"#657786",borderRadius:2,borderStyle:"solid",borderWidth:2,height:"100%",justifyContent:"center",width:"100%"},fakeControlChecked:{backgroundColor:"#009688",backgroundImage:'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")',backgroundRepeat:"no-repeat",borderColor:"#009688"},fakeControlDisabled:{borderColor:"#CCD6DD"},fakeControlCheckedAndDisabled:{backgroundColor:"#AAB8C2",borderColor:"#AAB8C2"},nativeControl:Ie(Ie({},ge.a.absoluteFillObject),{},{height:"100%",margin:0,opacity:0,padding:0,width:"100%"})}),ze=Be,He=r(71),Ue=r(37);function Ve(){return(Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ge={},We=Object(be.forwardRef)((function(e,t){var n=e.children,r=e.style,i=void 0===r?Ge:r,o=e.imageStyle,a=e.imageRef,s=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","style","imageStyle","imageRef"]),l=ge.a.flatten(i),c=l.height,u=l.width;return be.createElement(xe.a,{ref:t,style:i},be.createElement(Ue.a,Ve({},s,{ref:a,style:[ge.a.absoluteFill,{width:u,height:c,zIndex:-1},o]})),n)}));We.displayName="ImageBackground";var qe=We,Xe=r(101),Ye=r(61),Ke=r.n(Ye);var Qe=function(e){var t=e.children,n=be.useRef(null);if(u.canUseDOM&&!n.current){var r=document.createElement("div");r&&document.body&&(document.body.appendChild(r),n.current=r)}return be.useEffect((function(){if(u.canUseDOM)return function(){document.body&&n.current&&(document.body.removeChild(n.current),n.current=null)}}),[]),n.current&&u.canUseDOM?Ke.a.createPortal(t,n.current):null};function Ze(e,t){return"slide"===e?t?$e:et:"fade"===e?t?tt:nt:t?Je.container:Je.hidden}var Je=ge.a.create({container:{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999},animatedIn:{animationDuration:"300ms",animationTimingFunction:"ease-in"},animatedOut:{pointerEvents:"none",animationDuration:"300ms",animationTimingFunction:"ease-out"},fadeIn:{opacity:1,animationKeyframes:{"0%":{opacity:0},"100%":{opacity:1}}},fadeOut:{opacity:0,animationKeyframes:{"0%":{opacity:1},"100%":{opacity:0}}},slideIn:{transform:[{translateY:"0%"}],animationKeyframes:{"0%":{transform:[{translateY:"100%"}]},"100%":{transform:[{translateY:"0%"}]}}},slideOut:{transform:[{translateY:"100%"}],animationKeyframes:{"0%":{transform:[{translateY:"0%"}]},"100%":{transform:[{translateY:"100%"}]}}},hidden:{opacity:0}}),$e=[Je.container,Je.animatedIn,Je.slideIn],et=[Je.container,Je.animatedOut,Je.slideOut],tt=[Je.container,Je.animatedIn,Je.fadeIn],nt=[Je.container,Je.animatedOut,Je.fadeOut],rt=function(e){var t=e.animationType,n=e.children,r=e.onDismiss,o=e.onShow,a=e.visible,s=be.useState(!1),l=s[0],c=s[1],u=be.useRef(!1),h=t&&"none"!==t,d=be.useCallback((function(e){e&&e.currentTarget!==e.target||(a?o&&o():(c(!1),r&&r()))}),[r,o,a]);return be.useEffect((function(){a&&c(!0),a===u.current||h||d(),u.current=a}),[h,a,d]),l||a?Object(i.a)("div",{style:l?Ze(t,a):Je.hidden,onAnimationEnd:d,children:n}):null},it=be.forwardRef((function(e,t){var n=e.active,r=e.children,i=e.onRequestClose,o=e.transparent;be.useEffect((function(){if(u.canUseDOM){var e=function(e){n&&"Escape"===e.key&&(e.stopPropagation(),i&&i())};return document.addEventListener("keyup",e,!1),function(){return document.removeEventListener("keyup",e,!1)}}}),[n,i]);var a=be.useMemo((function(){return[ot.modal,o?ot.modalTransparent:ot.modalOpaque]}),[o]);return be.createElement(xe.a,{accessibilityRole:n?"dialog":null,"aria-modal":!0,ref:t,style:a},be.createElement(xe.a,{style:ot.container},r))})),ot=ge.a.create({modal:{position:"fixed",top:0,right:0,bottom:0,left:0},modalTransparent:{backgroundColor:"transparent"},modalOpaque:{backgroundColor:"white"},container:{top:0,flex:1}}),at=it,st=function(){return Object(i.a)("div",{accessibilityRole:"none",tabIndex:0,style:ut.focusBracket})};function lt(t){if(!u.canUseDOM)return!1;try{t.focus()}catch(e){}return document.activeElement===t}var ct=function(e){var t=e.active,n=e.children,r=be.useRef(),i=be.useRef({trapFocusInProgress:!1,lastFocusedElement:null});return be.useEffect((function(){if(u.canUseDOM){var e=function(){if(null!=r.current&&!i.current.trapFocusInProgress&&t){try{if(i.current.trapFocusInProgress=!0,document.activeElement instanceof Node&&!r.current.contains(document.activeElement)){var e=function e(t){for(var n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(lt(r)||e(r))return!0}return!1}(r.current);i.current.lastFocusedElement===document.activeElement&&(e=function e(t){for(var n=t.childNodes.length-1;n>=0;n--){var r=t.childNodes[n];if(lt(r)||e(r))return!0}return!1}(r.current)),!e&&null!=r.current&&document.activeElement&&W.a.focus(r.current)}}finally{i.current.trapFocusInProgress=!1}i.current.lastFocusedElement=document.activeElement}};return e(),document.addEventListener("focus",e,!0),function(){return document.removeEventListener("focus",e,!0)}}}),[t]),be.useEffect((function(){if(u.canUseDOM){var e=document.activeElement;return function(){e&&document.contains(e)&&W.a.focus(e)}}}),[]),be.createElement(be.Fragment,null,be.createElement(st,null),be.createElement(xe.a,{ref:r},n),be.createElement(st,null))},ut=ge.a.create({focusBracket:{outlineStyle:"none"}}),ht=0,dt=[],ft={};function pt(){if(0!==dt.length){var e=dt[dt.length-1];dt.forEach((function(t){t in ft&&ft[t](t===e)}))}}function mt(e){e in ft&&(ft[e](!1),delete ft[e]);var t=dt.indexOf(e);-1!==t&&(dt.splice(t,1),pt())}var gt=be.forwardRef((function(e,t){var n=e.animationType,r=e.children,i=e.onDismiss,o=e.onRequestClose,a=e.onShow,s=e.transparent,l=e.visible,c=void 0===l||l,u=be.useMemo((function(){return ht++}),[]),h=be.useState(!1),d=h[0],f=h[1],p=be.useCallback((function(){mt(u),i&&i()}),[u,i]),m=be.useCallback((function(){!function(e,t){mt(e),dt.push(e),ft[e]=t,pt()}(u,f),a&&a()}),[u,a]);return be.useEffect((function(){return function(){return mt(u)}}),[u]),be.createElement(Qe,null,be.createElement(rt,{animationType:n,onDismiss:p,onShow:m,visible:c},be.createElement(ct,{active:d},be.createElement(at,{active:d,onRequestClose:o,ref:t,transparent:s},r))))})),vt=r(36),yt=r(73);function bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xt=be.forwardRef((function(e,t){var n=e.children,r=e.enabled,o=e.onValueChange,a=e.selectedValue,s=e.style,l=e.testID,c=(e.itemStyle,e.mode,e.prompt,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","enabled","onValueChange","selectedValue","style","testID","itemStyle","mode","prompt"])),u=be.useRef(null);var h=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(n),!0).forEach((function(t){wt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({children:n,disabled:!1===r||void 0,onChange:function(e){var t=e.target,n=t.selectedIndex,r=t.value;o&&o(r,n)},style:[_t.initial,s],testID:l,value:a},c),d=Object(yt.a)(h),f=Object(vt.a)(u,d,t);return h.ref=f,Object(i.a)("select",h)}));xt.Item=function(e){var t=e.color,n=e.label,r=e.testID,o=e.value,a={color:t};return Object(i.a)("option",{style:a,testID:r,value:o},n)};var _t=ge.a.create({initial:{fontFamily:"System",fontSize:"inherit",margin:0}}),Et=xt,At=function(){};var St=function(){var t=!1;if(u.canUseDOM)try{var n={};Object.defineProperty(n,"passive",{get:function(){return t=!0,!1}}),window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch(e){}return t}();function Mt(){return this.cancelBubble}function Tt(){return this.defaultPrevented}function Ct(e,t){var n=function(e){return null!=e&&(St?e:Boolean(e.capture))}(t);return function(t,r){if(null==t||"function"!==typeof t.addEventListener)throw new Error("createEventHandle: called on an invalid target.");var i=t;if(null!=r){var o=function(e){return r(((t=e).nativeEvent=t,t.persist=At,t.isDefaultPrevented=Tt,t.isPropagationStopped=Mt,t));var t};return i.addEventListener(e,o,n),function(){null!=i&&i.removeEventListener(e,o,n)}}return At}}var Ot,Rt,kt="keyboard",Pt="keyboard",Lt=!1,Dt=new Set,It={passive:!0},Nt={capture:!0,passive:!0},jt=Ct("blur",It),Bt=Ct("focus",It),Ft=Ct("visibilitychange",Nt),zt=Ct("keydown",Nt),Ht=Ct("pointerdown",Nt),Ut=Ct("pointermove",Nt),Vt=Ct("contextmenu",Nt),Gt=Ct("mousedown",Nt),Wt=Ct("mousemove",Nt),qt=Ct("mouseup",Nt),Xt=Ct("scroll",Nt),Yt=Ct("selectionchange",Nt),Kt=Ct("touchcancel",Nt),Qt=Ct("touchmove",Nt),Zt=Ct("touchstart",Nt);function Jt(){null==Ot&&null==Rt||(null!=Ot&&(Pt=Ot,Ot=null),null!=Rt&&(kt=Rt,Rt=null),en())}function $t(e){var t=e.type;if("undefined"!==typeof window&&null!=window.PointerEvent){if("pointerdown"===t)return void(kt!==e.pointerType&&(Pt=e.pointerType,kt=e.pointerType,en()));if("pointermove"===t)return void(Pt!==e.pointerType&&(Pt=e.pointerType,en()))}else{if(Lt||("mousedown"===t&&"mouse"!==kt&&(Pt="mouse",kt="mouse",en()),"mousemove"===t&&"mouse"!==Pt&&(Pt="mouse",en())),"touchstart"===t)return Lt=!0,e.touches&&e.touches.length>1&&(Lt=!1),void("touch"!==kt&&(Pt="touch",kt="touch",en()));"contextmenu"!==t&&"mouseup"!==t&&"selectionchange"!==t&&"scroll"!==t&&"touchcancel"!==t&&"touchmove"!==t||(Lt=!1)}}function en(){var e={activeModality:kt,modality:Pt};Dt.forEach((function(t){t(e)}))}u.canUseDOM&&(jt(window,(function(){Ot=Pt,Rt=kt,kt="keyboard",Pt="keyboard",en(),Lt=!1})),Bt(window,(function(){Jt()})),zt(document,(function(e){e.metaKey||e.altKey||e.ctrlKey||"keyboard"!==Pt&&(Pt="keyboard",kt="keyboard",en())})),Ht(document,$t),Ut(document,$t),Ft(document,(function(){"hidden"!==document.visibilityState&&Jt()})),Vt(document,$t),Gt(document,$t),Wt(document,$t),qt(document,$t),Kt(document,$t),Qt(document,$t),Zt(document,$t),Yt(document,$t),Xt(document,$t));var tn=r(66),nn=r(106);function rn(e,t){var n=Object(nn.a)((function(){return new Map})),r=Object(nn.a)((function(){var r=Ct(e,t);return function(e,t){var i=n.get(e);null!=i&&i(),null==t&&n.delete(e);var o=r(e,t);return n.set(e,o),o}}));return Object(tn.a)((function(){return function(){n.forEach((function(e){e()})),n.clear()}}),[]),r}var on={},an={passive:!0};function sn(e,t,n){var r=document.createEvent("CustomEvent"),i=n||on,o=i.bubbles,a=void 0===o||o,s=i.cancelable,l=void 0===s||s,c=i.detail;r.initCustomEvent(t,a,l,c),e.dispatchEvent(r)}function ln(e){var t=e.pointerType;return null!=t?t:Pt}function cn(e,t){var n=t.contain,r=t.disabled,i=t.onHoverStart,o=t.onHoverChange,a=t.onHoverUpdate,s=t.onHoverEnd,l=!("undefined"===typeof window||null==window.PointerEvent),c=rn(l?"pointermove":"mousemove",an),u=rn(l?"pointerenter":"mouseenter",an),h=rn(l?"pointerleave":"mouseleave",an),d=rn("react-gui:hover:lock",an),f=rn("react-gui:hover:unlock",an);Object(tn.a)((function(){var t=e.current;if(null!==t){var l=function(e){null!=s&&s(e),null!=o&&o(!1),c(t,null),h(t,null)},p=function(t){var r=e.current;null!=r&&"touch"!==ln(t)&&(n&&sn(r,"react-gui:hover:unlock"),l(t))},m=function(e){"touch"!==ln(e)&&null!=a&&(null==e.x&&(e.x=e.clientX),null==e.y&&(e.y=e.clientY),a(e))},g=function(e){null!=i&&i(e),null!=o&&o(!0),null!=a&&c(t,r?null:m),h(t,r?null:p)};u(t,r?null:function(t){var i=e.current;if(null!=i&&"touch"!==ln(t)){n&&sn(i,"react-gui:hover:lock"),g(t);d(i,r?null:function(e){e.target!==i&&l(t)}),f(i,r?null:function(e){e.target!==i&&g(t)})}})}}),[u,c,h,d,f,n,r,i,o,a,s,e])}var un=r(75);function hn(){return(hn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dn(e){var t=Object(be.useState)(!1);return[t[0]||e,t[1]]}var fn=ge.a.create({root:{cursor:"pointer",touchAction:"manipulation"}}),pn=Object(be.memo)(Object(be.forwardRef)((function(e,t){var n=e.children,r=e.delayLongPress,i=e.delayPressIn,o=e.delayPressOut,a=e.disabled,s=e.focusable,l=e.onBlur,c=e.onContextMenu,u=e.onFocus,h=e.onHoverIn,d=e.onHoverOut,f=e.onKeyDown,p=e.onLongPress,m=e.onPress,g=e.onPressMove,v=e.onPressIn,y=e.onPressOut,b=e.style,w=e.testOnly_hovered,x=e.testOnly_pressed,_=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","delayLongPress","delayPressIn","delayPressOut","disabled","focusable","onBlur","onContextMenu","onFocus","onHoverIn","onHoverOut","onKeyDown","onLongPress","onPress","onPressMove","onPressIn","onPressOut","style","testOnly_hovered","testOnly_pressed"]),E=dn(!0===w),A=E[0],S=E[1],M=dn(!1),T=M[0],C=M[1],O=dn(!0===x),R=O[0],k=O[1],P=Object(be.useRef)(null),L=Object(vt.a)(t,P),D=Object(be.useMemo)((function(){return{delayLongPress:r,delayPressStart:i,delayPressEnd:o,disabled:a,onLongPress:p,onPress:m,onPressChange:k,onPressStart:v,onPressMove:g,onPressEnd:y}}),[r,i,o,a,p,m,v,g,y,k]),I=Object(un.a)(P,D),N=I.onContextMenu,j=I.onKeyDown;cn(P,{contain:!0,disabled:a,onHoverChange:S,onHoverStart:h,onHoverEnd:d});var B={hovered:A,focused:T,pressed:R},F=be.useCallback((function(e){e.nativeEvent.target===P.current&&(C(!1),null!=l&&l(e))}),[P,C,l]),z=be.useCallback((function(e){e.nativeEvent.target===P.current&&(C(!0),null!=u&&u(e))}),[P,C,u]),H=be.useCallback((function(e){null!=N&&N(e),null!=c&&c(e)}),[c,N]),U=be.useCallback((function(e){null!=j&&j(e),null!=f&&f(e)}),[f,j]);return be.createElement(xe.a,hn({},_,I,{accessibilityDisabled:a,focusable:!a&&!1!==s,onBlur:F,onContextMenu:H,onFocus:z,onKeyDown:U,ref:L,style:[!a&&fn.root,"function"===typeof b?b(B):b]}),"function"===typeof n?n(B):n)})));pn.displayName="Pressable";var mn=pn;function gn(){return(gn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var vn=be.forwardRef((function(e,t){var n=e.color,r=void 0===n?"#1976D2":n,i=e.indeterminate,o=void 0!==i&&i,a=e.progress,s=void 0===a?0:a,l=e.trackColor,c=void 0===l?"transparent":l,u=e.style,h=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["color","indeterminate","progress","trackColor","style"]),d=100*s,f=be.useRef(null);return be.useEffect((function(){var e=o?"25%":d+"%";null!=f.current&&f.current.setNativeProps({style:{width:e}})}),[o,d,f]),be.createElement(xe.a,gn({},h,{accessibilityRole:"progressbar",accessibilityValue:{max:100,min:0,now:o?null:d},ref:t,style:[yn.track,u,{backgroundColor:c}]}),be.createElement(xe.a,{ref:f,style:[yn.progress,o&&yn.animation,{backgroundColor:r}]}))}));vn.displayName="ProgressBar";var yn=ge.a.create({track:{height:5,overflow:"hidden",userSelect:"none",zIndex:0},progress:{height:"100%",zIndex:-1},animation:{animationDuration:"1s",animationKeyframes:[{"0%":{transform:[{translateX:"-100%"}]},"100%":{transform:[{translateX:"400%"}]}}],animationTimingFunction:"linear",animationIterationCount:"infinite"}}),bn=vn,wn=r(117),xn=r(122),_n=r(49),En=r(127),An=r(77),Sn=r(91),Mn=r(57),Tn=r(96),Cn=function(e,t){if(this.instancePool.length){var n=this.instancePool.pop();return this.call(n,e,t),n}return new this(e,t)},On=function(e){e.destructor(),this.instancePool.length<this.poolSize&&this.instancePool.push(e)},Rn=Cn,kn={addPoolingTo:function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||Rn,n.poolSize||(n.poolSize=10),n.release=On,n},twoArgumentPooler:Cn},Pn=kn.twoArgumentPooler;function Ln(e,t){this.width=e,this.height=t}Ln.prototype.destructor=function(){this.width=null,this.height=null},Ln.getPooledFromElement=function(e){return Ln.getPooled(e.offsetWidth,e.offsetHeight)},kn.addPoolingTo(Ln,Pn);var Dn=Ln,In=r(89),Nn=r.n(In),jn=kn.twoArgumentPooler;function Bn(e,t){this.left=e,this.top=t}Bn.prototype.destructor=function(){this.left=null,this.top=null},kn.addPoolingTo(Bn,jn);var Fn=Bn;function zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){Un(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Un(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vn=function(e){var t=e.touches,n=e.changedTouches,r=t&&t.length>0,i=n&&n.length>0;return!r&&i?n[0]:r?t[0]:e},Gn="NOT_RESPONDER",Wn="RESPONDER_INACTIVE_PRESS_IN",qn="RESPONDER_INACTIVE_PRESS_OUT",Xn="RESPONDER_ACTIVE_PRESS_IN",Yn="RESPONDER_ACTIVE_PRESS_OUT",Kn="RESPONDER_ACTIVE_LONG_PRESS_IN",Qn="RESPONDER_ACTIVE_LONG_PRESS_OUT",Zn="ERROR",Jn={NOT_RESPONDER:!1,RESPONDER_INACTIVE_PRESS_IN:!1,RESPONDER_INACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_PRESS_IN:!1,RESPONDER_ACTIVE_PRESS_OUT:!1,RESPONDER_ACTIVE_LONG_PRESS_IN:!1,RESPONDER_ACTIVE_LONG_PRESS_OUT:!1,ERROR:!1},$n=Hn(Hn({},Jn),{},{RESPONDER_ACTIVE_PRESS_OUT:!0,RESPONDER_ACTIVE_PRESS_IN:!0}),er=Hn(Hn({},Jn),{},{RESPONDER_INACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_PRESS_IN:!0,RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),tr=Hn(Hn({},Jn),{},{RESPONDER_ACTIVE_LONG_PRESS_IN:!0}),nr="DELAY",rr="RESPONDER_GRANT",ir="RESPONDER_RELEASE",or="RESPONDER_TERMINATED",ar="ENTER_PRESS_RECT",sr="LEAVE_PRESS_RECT",lr="LONG_PRESS_DETECTED",cr={NOT_RESPONDER:{DELAY:Zn,RESPONDER_GRANT:Wn,RESPONDER_RELEASE:Zn,RESPONDER_TERMINATED:Zn,ENTER_PRESS_RECT:Zn,LEAVE_PRESS_RECT:Zn,LONG_PRESS_DETECTED:Zn},RESPONDER_INACTIVE_PRESS_IN:{DELAY:Xn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Wn,LEAVE_PRESS_RECT:qn,LONG_PRESS_DETECTED:Zn},RESPONDER_INACTIVE_PRESS_OUT:{DELAY:Yn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Wn,LEAVE_PRESS_RECT:qn,LONG_PRESS_DETECTED:Zn},RESPONDER_ACTIVE_PRESS_IN:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Xn,LEAVE_PRESS_RECT:Yn,LONG_PRESS_DETECTED:Kn},RESPONDER_ACTIVE_PRESS_OUT:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Xn,LEAVE_PRESS_RECT:Yn,LONG_PRESS_DETECTED:Zn},RESPONDER_ACTIVE_LONG_PRESS_IN:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Kn,LEAVE_PRESS_RECT:Qn,LONG_PRESS_DETECTED:Kn},RESPONDER_ACTIVE_LONG_PRESS_OUT:{DELAY:Zn,RESPONDER_GRANT:Zn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Kn,LEAVE_PRESS_RECT:Qn,LONG_PRESS_DETECTED:Zn},error:{DELAY:Gn,RESPONDER_GRANT:Wn,RESPONDER_RELEASE:Gn,RESPONDER_TERMINATED:Gn,ENTER_PRESS_RECT:Gn,LEAVE_PRESS_RECT:Gn,LONG_PRESS_DETECTED:Gn}},ur={componentDidMount:function(){var e=this;this._touchableNode=Object(o.a)(this),this._touchableNode&&this._touchableNode.addEventListener&&(this._touchableBlurListener=function(t){e._isTouchableKeyboardActive&&(e.state.touchable.touchState&&e.state.touchable.touchState!==Gn&&e.touchableHandleResponderTerminate({nativeEvent:t}),e._isTouchableKeyboardActive=!1)},this._touchableNode.addEventListener("blur",this._touchableBlurListener))},componentWillUnmount:function(){this._touchableNode&&this._touchableNode.addEventListener&&this._touchableNode.removeEventListener("blur",this._touchableBlurListener),this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressInLocation=null,this.state.touchable.responderID=null,this._touchableNode=null},touchableGetInitialState:function(){return{touchable:{touchState:void 0,responderID:null}}},touchableHandleResponderTerminationRequest:function(){return!this.props.rejectResponderTermination},touchableHandleStartShouldSetResponder:function(){return!this.props.disabled},touchableLongPressCancelsPress:function(){return!0},touchableHandleResponderGrant:function(e){var t=e.currentTarget;e.persist(),this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout),this.pressOutDelayTimeout=null,this.state.touchable.touchState=Gn,this.state.touchable.responderID=t,this._receiveSignal(rr,e);var n=void 0!==this.touchableGetHighlightDelayMS?Math.max(this.touchableGetHighlightDelayMS(),0):130;0!==(n=isNaN(n)?130:n)?this.touchableDelayTimeout=setTimeout(this._handleDelay.bind(this,e),n):this._handleDelay(e);var r=void 0!==this.touchableGetLongPressDelayMS?Math.max(this.touchableGetLongPressDelayMS(),10):370;r=isNaN(r)?370:r,this.longPressDelayTimeout=setTimeout(this._handleLongDelay.bind(this,e),r+n)},touchableHandleResponderRelease:function(e){this.pressInLocation=null,this._receiveSignal(ir,e)},touchableHandleResponderTerminate:function(e){this.pressInLocation=null,this._receiveSignal(or,e)},touchableHandleResponderMove:function(e){if(this.state.touchable.positionOnActivate){var t=this.state.touchable.positionOnActivate,n=this.state.touchable.dimensionsOnActivate,r=this.touchableGetPressRectOffset?this.touchableGetPressRectOffset():{left:20,right:20,top:20,bottom:20},i=r.left,o=r.top,a=r.right,s=r.bottom,l=this.touchableGetHitSlop?this.touchableGetHitSlop():null;l&&(i+=l.left||0,o+=l.top||0,a+=l.right||0,s+=l.bottom||0);var c=Vn(e.nativeEvent),u=c&&c.pageX,h=c&&c.pageY;if(this.pressInLocation)this._getDistanceBetweenPoints(u,h,this.pressInLocation.pageX,this.pressInLocation.pageY)>10&&this._cancelLongPressDelayTimeout();if(u>t.left-i&&h>t.top-o&&u<t.left+n.width+a&&h<t.top+n.height+s){var d=this.state.touchable.touchState;this._receiveSignal(ar,e),this.state.touchable.touchState===Wn&&d!==Wn&&this._cancelLongPressDelayTimeout()}else this._cancelLongPressDelayTimeout(),this._receiveSignal(sr,e)}},touchableHandleFocus:function(e){this.props.onFocus&&this.props.onFocus(e)},touchableHandleBlur:function(e){this.props.onBlur&&this.props.onBlur(e)},_remeasureMetricsOnActivation:function(){var e=this.state.touchable.responderID;null!=e&&W.a.measure(e,this._handleQueryLayout)},_handleQueryLayout:function(e,t,n,r,i,o){(e||t||n||r||i||o)&&(this.state.touchable.positionOnActivate&&Fn.release(this.state.touchable.positionOnActivate),this.state.touchable.dimensionsOnActivate&&Dn.release(this.state.touchable.dimensionsOnActivate),this.state.touchable.positionOnActivate=Fn.getPooled(i,o),this.state.touchable.dimensionsOnActivate=Dn.getPooled(n,r))},_handleDelay:function(e){this.touchableDelayTimeout=null,this._receiveSignal(nr,e)},_handleLongDelay:function(e){this.longPressDelayTimeout=null;var t=this.state.touchable.touchState;t!==Xn&&t!==Kn?console.error("Attempted to transition from state `"+t+"` to `"+Kn+"`, which is not supported. This is most likely due to `Touchable.longPressDelayTimeout` not being cancelled."):this._receiveSignal(lr,e)},_receiveSignal:function(e,t){var n=this.state.touchable.responderID,r=this.state.touchable.touchState,i=cr[r]&&cr[r][e];if(n||e!==ir){if(!i)throw new Error("Unrecognized signal `"+e+"` or state `"+r+"` for Touchable responder `"+n+"`");if(i===Zn)throw new Error("Touchable cannot transition from `"+r+"` to `"+e+"` for responder `"+n+"`");r!==i&&(this._performSideEffectsForTransition(r,i,e,t),this.state.touchable.touchState=i)}},_cancelLongPressDelayTimeout:function(){this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout),this.longPressDelayTimeout=null},_isHighlight:function(e){return e===Xn||e===Kn},_savePressInLocation:function(e){var t=Vn(e.nativeEvent),n=t&&t.pageX,r=t&&t.pageY,i=t&&t.locationX,o=t&&t.locationY;this.pressInLocation={pageX:n,pageY:r,locationX:i,locationY:o}},_getDistanceBetweenPoints:function(e,t,n,r){var i=e-n,o=t-r;return Math.sqrt(i*i+o*o)},_performSideEffectsForTransition:function(e,t,n,r){var i=this._isHighlight(e),o=this._isHighlight(t);(n===or||n===ir)&&this._cancelLongPressDelayTimeout();var a=e===Gn&&t===Wn,s=!$n[e]&&$n[t];if((a||s)&&this._remeasureMetricsOnActivation(),er[e]&&n===lr&&this.touchableHandleLongPress&&this.touchableHandleLongPress(r),o&&!i?this._startHighlight(r):!o&&i&&this._endHighlight(r),er[e]&&n===ir){var l=!!this.props.onLongPress,c=tr[e]&&(!l||!this.touchableLongPressCancelsPress());(!tr[e]||c)&&this.touchableHandlePress&&(o||i||(this._startHighlight(r),this._endHighlight(r)),this.touchableHandlePress(r))}this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout),this.touchableDelayTimeout=null},_playTouchSound:function(){W.a.playTouchSound()},_startHighlight:function(e){this._savePressInLocation(e),this.touchableHandleActivePressIn&&this.touchableHandleActivePressIn(e)},_endHighlight:function(e){var t=this;this.touchableHandleActivePressOut&&(this.touchableGetPressOutDelayMS&&this.touchableGetPressOutDelayMS()?this.pressOutDelayTimeout=setTimeout((function(){t.touchableHandleActivePressOut(e)}),this.touchableGetPressOutDelayMS()):this.touchableHandleActivePressOut(e))},touchableHandleKeyEvent:function(e){var t=e.type,n=e.key;"Enter"!==n&&" "!==n||("keydown"===t?this._isTouchableKeyboardActive||this.state.touchable.touchState&&this.state.touchable.touchState!==Gn||(this.touchableHandleResponderGrant(e),this._isTouchableKeyboardActive=!0):"keyup"===t&&this._isTouchableKeyboardActive&&this.state.touchable.touchState&&this.state.touchable.touchState!==Gn&&(this.touchableHandleResponderRelease(e),this._isTouchableKeyboardActive=!1),e.stopPropagation(),"Enter"===n&&"link"===Tn.a.propsToAriaRole(this.props)||e.preventDefault())},withoutDefaultFocusAndBlur:{}},hr=(ur.touchableHandleFocus,ur.touchableHandleBlur,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(ur,["touchableHandleFocus","touchableHandleBlur"]));ur.withoutDefaultFocusAndBlur=hr;var dr={Mixin:ur,TOUCH_TARGET_DEBUG:!1,renderDebugView:function(e){var t=e.color,n=e.hitSlop;if(!dr.TOUCH_TARGET_DEBUG)return null;var r={};for(var i in n=n||{top:0,bottom:0,left:0,right:0})r[i]=-n[i];var o=Nn()(t);if("number"!==typeof o)return null;var a="#"+("00000000"+o.toString(16)).substr(-8);return we.a.createElement(xe.a,{pointerEvents:"none",style:Hn({position:"absolute",borderColor:a.slice(0,-2)+"55",borderWidth:1,borderStyle:"dashed",backgroundColor:a.slice(0,-2)+"0F"},r)})}},fr=dr,pr=r(123),mr=r(92),gr=r(118),vr=r(76).a,yr=r(64);function br(e){return we.a.createElement(yr.a,e)}br.ignoreWarnings=function(){};var wr=br,xr=r(179),_r=yr.a,Er=yr.a,Ar=yr.a,Sr=function(){return Promise.resolve(!1)},Mr={PERMISSIONS:{},RESULTS:{},checkPermission:Sr,check:Sr,requestPermission:Sr,request:Sr,requestMultiple:Sr},Tr={},Cr={},Or={},Rr=r(68).a;function kr(){var e=be.useState(w.getColorScheme()),t=e[0],n=e[1];return be.useEffect((function(){function e(e){n(e.colorScheme)}return w.addChangeListener(e),function(){return w.removeChangeListener(e)}})),t}function Pr(){var e=Object(be.useState)((function(){return B.a.get("window")})),t=e[0],n=e[1];return Object(be.useEffect)((function(){function e(e){var t=e.window;null!=t&&n(t)}return B.a.addEventListener("change",e),n(B.a.get("window")),function(){B.a.removeEventListener("change",e)}}),[]),t}},function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,i=/^ms-/,o={};function a(e){return"-"+e.toLowerCase()}t.default=function(e){if(o.hasOwnProperty(e))return o[e];var t=e.replace(r,a);return o[e]=i.test(t)?"-"+t:t}},function(e,t,n){"use strict";var r=n(305);e.exports=r},function(e,t,n){e.exports=n(418)},function(t,n,r){"use strict";r.r(n),r.d(n,"enableScreens",(function(){return T})),r.d(n,"screensEnabled",(function(){return C})),r.d(n,"NativeScreen",(function(){return O})),r.d(n,"Screen",(function(){return R})),r.d(n,"ScreenContainer",(function(){return k})),r.d(n,"NativeScreenContainer",(function(){return P})),r.d(n,"ScreenStack",(function(){return L})),r.d(n,"ScreenStackHeaderBackButtonImage",(function(){return D})),r.d(n,"ScreenStackHeaderRightView",(function(){return I})),r.d(n,"ScreenStackHeaderLeftView",(function(){return N})),r.d(n,"ScreenStackHeaderCenterView",(function(){return j})),r.d(n,"ScreenStackHeaderConfig",(function(){return B})),r.d(n,"ScreenStackHeaderSubview",(function(){return F})),r.d(n,"shouldUseActivityState",(function(){return z}));var i=r(17),o=r.n(i),a=r(20),s=r.n(a),l=r(23),c=r.n(l),u=r(24),h=r.n(u),d=r(25),f=r.n(d),p=r(18),m=r.n(p),g=r(0),v=r.n(g),y=r(12),b=r(2),w=r(37),x=r(216);for(var _ in x)["enableScreens","screensEnabled","NativeScreen","Screen","ScreenContainer","NativeScreenContainer","ScreenStack","ScreenStackHeaderBackButtonImage","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderConfig","ScreenStackHeaderSubview","shouldUseActivityState","default"].indexOf(_)<0&&function(e){r.d(n,e,(function(){return x[e]}))}(_);var E=["active","activityState","style","enabled"];function A(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=m()(t);if(n){var i=m()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return f()(this,e)}}function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var M=!0;function T(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];M=e}function C(){return M}var O=function(e){h()(n,e);var t=A(n);function n(){return s()(this,n),t.apply(this,arguments)}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.active,n=e.activityState,r=e.style,i=e.enabled,a=void 0===i||i,s=o()(e,E);return void 0!==t&&void 0===n&&(n=0!==t?2:0),v.a.createElement(b.a,S({style:[r,M&&a&&2!==n?{display:"none"}:null]},s))}}]),n}(v.a.Component),R=y.a.createAnimatedComponent(O),k=b.a,P=b.a,L=b.a,D=function(e){return v.a.createElement(b.a,null,v.a.createElement(w.a,S({resizeMode:"center",fadeDuration:0},e)))},I=function(e){return v.a.createElement(b.a,e)},N=function(e){return v.a.createElement(b.a,e)},j=function(e){return v.a.createElement(b.a,e)},B=b.a,F=b.a,z=!0},function(e,t,n){"use strict";(function(e){var r=n(90),i=n(165),o=n(4),a=n.n(o),s=n(15);function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var c=function(t){var n,r;function o(e){var n,r,o,l,c,u,h,d,f,p,m,g;if((f=t.call(this)||this)._overshootClamping=null!==(n=e.overshootClamping)&&void 0!==n&&n,f._restDisplacementThreshold=null!==(r=e.restDisplacementThreshold)&&void 0!==r?r:.001,f._restSpeedThreshold=null!==(o=e.restSpeedThreshold)&&void 0!==o?o:.001,f._initialVelocity=null!==(l=e.velocity)&&void 0!==l?l:0,f._lastVelocity=null!==(c=e.velocity)&&void 0!==c?c:0,f._toValue=e.toValue,f._delay=null!==(u=e.delay)&&void 0!==u?u:0,f._useNativeDriver=Object(s.c)(e),f.__isInteraction=null!==(h=e.isInteraction)&&void 0!==h?h:!f._useNativeDriver,f.__iterations=null!==(d=e.iterations)&&void 0!==d?d:1,void 0!==e.stiffness||void 0!==e.damping||void 0!==e.mass)a()(void 0===e.bounciness&&void 0===e.speed&&void 0===e.tension&&void 0===e.friction,"You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one"),f._stiffness=null!==(p=e.stiffness)&&void 0!==p?p:100,f._damping=null!==(m=e.damping)&&void 0!==m?m:10,f._mass=null!==(g=e.mass)&&void 0!==g?g:1;else if(void 0!==e.bounciness||void 0!==e.speed){var v,y;a()(void 0===e.tension&&void 0===e.friction&&void 0===e.stiffness&&void 0===e.damping&&void 0===e.mass,"You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one");var b=i.a.fromBouncinessAndSpeed(null!==(v=e.bounciness)&&void 0!==v?v:8,null!==(y=e.speed)&&void 0!==y?y:12);f._stiffness=b.stiffness,f._damping=b.damping,f._mass=1}else{var w,x,_=i.a.fromOrigamiTensionAndFriction(null!==(w=e.tension)&&void 0!==w?w:40,null!==(x=e.friction)&&void 0!==x?x:7);f._stiffness=_.stiffness,f._damping=_.damping,f._mass=1}return a()(f._stiffness>0,"Stiffness value must be greater than 0"),a()(f._damping>0,"Damping value must be greater than 0"),a()(f._mass>0,"Mass value must be greater than 0"),f}r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,l(n,r);var c=o.prototype;return c.__getNativeAnimationConfig=function(){var e;return{type:"spring",overshootClamping:this._overshootClamping,restDisplacementThreshold:this._restDisplacementThreshold,restSpeedThreshold:this._restSpeedThreshold,stiffness:this._stiffness,damping:this._damping,mass:this._mass,initialVelocity:null!==(e=this._initialVelocity)&&void 0!==e?e:this._lastVelocity,toValue:this._toValue,iterations:this.__iterations}},c.start=function(e,t,n,r,i){var a=this;if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=t,this.__onEnd=n,this._lastTime=Date.now(),this._frameTime=0,r instanceof o){var s=r.getInternalState();this._lastPosition=s.lastPosition,this._lastVelocity=s.lastVelocity,this._initialVelocity=this._lastVelocity,this._lastTime=s.lastTime}var l=function(){a._useNativeDriver?a.__startNativeAnimation(i):a.onUpdate()};this._delay?this._timeout=setTimeout(l,this._delay):l()},c.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},c.onUpdate=function(){var e=Date.now();e>this._lastTime+64&&(e=this._lastTime+64);var t=(e-this._lastTime)/1e3;this._frameTime+=t;var n=this._damping,r=this._mass,i=this._stiffness,o=-this._initialVelocity,a=n/(2*Math.sqrt(i*r)),s=Math.sqrt(i/r),l=s*Math.sqrt(1-a*a),c=this._toValue-this._startPosition,u=0,h=0,d=this._frameTime;if(a<1){var f=Math.exp(-a*s*d);u=this._toValue-f*((o+a*s*c)/l*Math.sin(l*d)+c*Math.cos(l*d)),h=a*s*f*(Math.sin(l*d)*(o+a*s*c)/l+c*Math.cos(l*d))-f*(Math.cos(l*d)*(o+a*s*c)-l*c*Math.sin(l*d))}else{var p=Math.exp(-s*d);u=this._toValue-p*(c+(o+s*c)*d),h=p*(o*(d*s-1)+d*c*(s*s))}if(this._lastTime=e,this._lastPosition=u,this._lastVelocity=h,this._onUpdate(u),this.__active){var m=!1;this._overshootClamping&&0!==this._stiffness&&(m=this._startPosition<this._toValue?u>this._toValue:u<this._toValue);var g=Math.abs(h)<=this._restSpeedThreshold,v=!0;if(0!==this._stiffness&&(v=Math.abs(this._toValue-u)<=this._restDisplacementThreshold),m||g&&v)return 0!==this._stiffness&&(this._lastPosition=this._toValue,this._lastVelocity=0,this._onUpdate(this._toValue)),void this.__debouncedOnEnd({finished:!0});this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))}},c.stop=function(){t.prototype.stop.call(this),this.__active=!1,clearTimeout(this._timeout),e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},o}(r.a);t.a=c}).call(this,n(43))},function(e,t,n){"use strict";function r(e){return 3.62*(e-30)+194}function i(e){return 3*(e-8)+25}t.a={fromOrigamiTensionAndFriction:function(e,t){return{stiffness:r(e),damping:i(t)}},fromBouncinessAndSpeed:function(e,t){function n(e,t,n){return(e-t)/(n-t)}function o(e,t,n){return t+e*(n-t)}var a=n(e/1.7,0,20);a=o(a,0,.8);var s,l,c=o(n(t/1.7,0,20),.5,200),u=(s=a,l=function(e){return e<=18?(t=e,7e-4*Math.pow(t,3)-.031*Math.pow(t,2)+.64*t+1.28):e>18&&e<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(e):function(e){return 45e-8*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(e);var t}(c),function(e,t,n){return e*n+(1-e)*t}(2*s-s*s,l,.01));return{stiffness:r(c),damping:i(u)}}}},function(e,t,n){"use strict";(function(e){var r,i=n(90),o=n(15),a=n(14);function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=function(t){var n,i;function l(e){var n,i,s,l,c,u;return(u=t.call(this)||this)._toValue=e.toValue,u._easing=null!==(n=e.easing)&&void 0!==n?n:(r||(r=a.a.inOut(a.a.ease)),r),u._duration=null!==(i=e.duration)&&void 0!==i?i:500,u._delay=null!==(s=e.delay)&&void 0!==s?s:0,u.__iterations=null!==(l=e.iterations)&&void 0!==l?l:1,u._useNativeDriver=Object(o.c)(e),u.__isInteraction=null!==(c=e.isInteraction)&&void 0!==c?c:!u._useNativeDriver,u}i=t,(n=l).prototype=Object.create(i.prototype),n.prototype.constructor=n,s(n,i);var c=l.prototype;return c.__getNativeAnimationConfig=function(){for(var e=[],t=Math.round(this._duration/(1e3/60)),n=0;n<t;n++)e.push(this._easing(n/t));return e.push(this._easing(1)),{type:"frames",frames:e,toValue:this._toValue,iterations:this.__iterations}},c.start=function(e,t,n,r,i){var o=this;this.__active=!0,this._fromValue=e,this._onUpdate=t,this.__onEnd=n;var a=function(){0!==o._duration||o._useNativeDriver?(o._startTime=Date.now(),o._useNativeDriver?o.__startNativeAnimation(i):o._animationFrame=requestAnimationFrame(o.onUpdate.bind(o))):(o._onUpdate(o._toValue),o.__debouncedOnEnd({finished:!0}))};this._delay?this._timeout=setTimeout(a,this._delay):a()},c.onUpdate=function(){var e=Date.now();if(e>=this._startTime+this._duration)return 0===this._duration?this._onUpdate(this._toValue):this._onUpdate(this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0});this._onUpdate(this._fromValue+this._easing((e-this._startTime)/this._duration)*(this._toValue-this._fromValue)),this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this)))},c.stop=function(){t.prototype.stop.call(this),this.__active=!1,clearTimeout(this._timeout),e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},l}(i.a);t.a=l}).call(this,n(43))},function(e,t){e.exports=function(e){return[...e].reduce((e,[t,n])=>(e[t]=n,e),{})}},function(e,t,n){e.exports=n.p+"static/media/bezier.799a5c8c.cjs"},function(t,n,r){"use strict";r.d(n,"a",(function(){return Wo})),r.d(n,"b",(function(){return Go}));var i=r(0),o=r.n(i);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"===typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){var n=new Set(t);return Object.assign.apply(Object,[{}].concat(l(Object.entries(e).filter((function(e){var t=s(e,1)[0];return!n.has(t)})).map((function(e){var t=s(e,2);return a({},t[0],t[1])})))))},d=r(167),f=r.n(d);function p(e){return(p="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})(e)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"===typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=function(e,t){var n="object"===p(t)?t:{wrapperElementType:t,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},r=n.wrapperElementType,a=void 0===r?"div":r,s=n.nodeMapper,l=void 0===s?function(e){return e}:s,c=n.methodNames,u=void 0===c?[]:c,d=n.initPropNames,v=void 0===d?[]:d;return Object(i.forwardRef)((function(t,n){var r=Object(i.useRef)(),s=m(Object(i.useState)({}),2),c=s[0],d=s[1];Object(i.useEffect)((function(){return d(t)}));var p=Object(i.useMemo)((function(){var n=f()(v.filter((function(e){return t.hasOwnProperty(e)})).map((function(e){return[e,t[e]]})));return e(n)}),[]);Object(i.useLayoutEffect)((function(){p(l(r.current))}),[]),Object(i.useEffect)((function(){return p._destructor instanceof Function?p._destructor:void 0}),[]);var y=Object(i.useCallback)((function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return p[e]instanceof Function?p[e].apply(p,n):void 0}),[p]),b=h(t,[].concat(g(u),g(v)));return Object.keys(b).filter((function(e){return c[e]!==t[e]})).forEach((function(e){return y(e,t[e])})),Object(i.useImperativeHandle)(n,(function(){return f()(u.map((function(e){return[e,function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return y.apply(void 0,[e].concat(n))}]})))})),o.a.createElement(a,{ref:r})}))},w=(r(309),r(310),r(181),r(50)),x=r(11);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){if(e){if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".graph-nav-info {\n position: absolute;\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n font-family: Sans-serif;\n z-index: 1000;\n}");var O=Object(w.a)({props:{width:{default:window.innerWidth,triggerUpdate:!1,onChange:function(e,t){t.container&&(t.container.style.width=e)}},height:{default:window.innerHeight,triggerUpdate:!1,onChange:function(e,t){t.container&&(t.container.style.height=e)}},jsonUrl:{},graphData:{default:{nodes:[],links:[]}},numDimensions:{default:3},dagMode:{},dagLevelDistance:{},dagNodeFilter:{default:function(){return!0}},onDagError:{default:void 0},backgroundColor:{default:"#002"},showNavInfo:{default:!0},nodeRelSize:{default:4},nodeId:{default:"id"},nodeLabel:{default:"name"},nodeDesc:{default:"desc"},onNodeHover:{},onNodeClick:{},nodeVal:{default:"val"},nodeResolution:{default:8},nodeVisibility:{default:!0},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkLabel:{default:"name"},linkDesc:{default:"desc"},onLinkHover:{},onLinkClick:{},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{default:0},linkResolution:{default:6},linkCurvature:{default:0},linkCurveRotation:{default:0},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228},d3VelocityDecay:{default:.4},ngraphPhysics:{},warmupTicks:{default:0},cooldownTicks:{},cooldownTime:{default:15e3},onEngineTick:{},onEngineStop:{}},methods:E(E({},Object.assign.apply(Object,[{}].concat(M(["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"].map((function(e){return A({},e,(function(t){for(var n=t.forcegraph.components.forcegraph,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=n[e].apply(n,i);return a===n?this:a}))})))))),{},{_destructor:function(){this.graphData({nodes:[],links:[]})}}),init:function(e,t){e.innerHTML="",t.container=document.createElement("div"),e.appendChild(t.container),t.container.style.position="relative",t.container.style.width=t.width,t.container.style.height=t.height,t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="graph-nav-info",t.navInfo.textContent="Mouse drag: look, gamepad/arrow/wasd keys: move";var n,r,i,o,a,s=document.createElement("a-scene");s.setAttribute("embedded",""),s.appendChild(t.sky=document.createElement("a-sky")),t.sky.setAttribute("radius",3e3),s.appendChild(n=document.createElement("a-entity")),n.setAttribute("position","0 0 300"),n.setAttribute("movement-controls","fly: true; speed: 7"),n.appendChild(r=document.createElement("a-entity")),r.setAttribute("camera",""),r.setAttribute("position","0 0 0"),r.setAttribute("look-controls","reverseMouseDrag: false; pointerLockEnabled: false"),r.appendChild(i=document.createElement("a-text")),i.setAttribute("position","0 -0.3 -1"),i.setAttribute("width",2),i.setAttribute("align","center"),i.setAttribute("color","lavender"),i.setAttribute("value",""),r.appendChild(o=document.createElement("a-text")),o.setAttribute("position","0 -0.4 -1"),o.setAttribute("width",1.3),o.setAttribute("align","center"),o.setAttribute("color","lavender"),o.setAttribute("value",""),s.appendChild(a=document.createElement("a-entity")),a.setAttribute("cursor","rayOrigin: mouse; mouseCursorStylesEnabled: true"),a.setAttribute("raycaster","objects: [forcegraph]; interval: 100"),["left","right"].forEach((function(e){var t;n.appendChild(t=document.createElement("a-entity")),t.setAttribute("laser-controls","hand: ".concat(e)),t.setAttribute("raycaster","objects: [forcegraph]; interval: 100; lineColor: steelblue; lineOpacity: 0.85")})),s.appendChild(t.forcegraph=document.createElement("a-entity")),t.forcegraph.setAttribute("forcegraph",null),t.container.appendChild(s),t.forcegraph.setAttribute("forcegraph",Object.assign.apply(Object,M(["node","link"].map((function(e){var n={node:"Node",link:"Link"}[e];return A({},"on".concat(n,"Hover"),(function(r,a){var s=r&&Object(x.default)(t["".concat(e,"Label")])(r)||"",l=r&&Object(x.default)(t["".concat(e,"Desc")])(r)||"";i.setAttribute("value",s),o.setAttribute("value",l),t["on".concat(n,"Hover")]&&t["on".concat(n,"Hover")](r,a)}))})))))},update:function(e,t){t.hasOwnProperty("backgroundColor")&&e.sky.setAttribute("color",e.backgroundColor),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none");var n=["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","onNodeClick","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","onLinkClick","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"],r=Object.assign.apply(Object,[{}].concat(M(Object.entries(e).filter((function(e){var r=S(e,2),i=r[0],o=r[1];return t.hasOwnProperty(i)&&-1!==n.indexOf(i)&&void 0!==o&&null!==o})).map((function(e){var t=S(e,2);return A({},t[0],t[1])}))),M(Object.entries(e.graphData).map((function(e){var t=S(e,2);return A({},t[0],t[1])})))));e.forcegraph.setAttribute("forcegraph",r)}}),R=r(1),k=r.n(R);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||j(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e){return function(e){if(Array.isArray(e))return B(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){if(e){if("string"===typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=Object(w.a)({props:{width:{},height:{},yOffset:{default:1.5},glScale:{default:200},jsonUrl:{},graphData:{default:{nodes:[],links:[]}},numDimensions:{default:3},dagMode:{},dagLevelDistance:{},dagNodeFilter:{default:function(){return!0}},onDagError:{default:void 0},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeVisibility:{default:!0},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{default:0},linkResolution:{default:6},linkCurvature:{default:0},linkCurveRotation:{default:0},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},onNodeHover:{},onNodeClick:{},onLinkHover:{},onLinkClick:{},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228},d3VelocityDecay:{default:.4},ngraphPhysics:{},warmupTicks:{default:0},cooldownTicks:{},cooldownTime:{default:15e3},onEngineTick:{},onEngineStop:{}},methods:L(L({},Object.assign.apply(Object,[{}].concat(N(["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"].map((function(e){return D({},e,(function(t){for(var n=t.forcegraph.components.forcegraph,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=n[e].apply(n,i);return a===n?this:a}))})))))),{},{_destructor:function(){this.graphData({nodes:[],links:[]})}}),init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.markerAttrs,i=void 0===r?{preset:"hiro"}:r;e.innerHTML="",t.container=document.createElement("div"),e.appendChild(t.container);var o=document.createElement("a-scene");o.setAttribute("embedded",""),o.setAttribute("arjs","debugUIEnabled: false;");var a,s=document.createElement("a-marker");Object.entries(i).forEach((function(e){var t=I(e,2),n=t[0],r=t[1];return s.setAttribute(n,r)})),o.appendChild(s),o.appendChild(a=document.createElement("a-entity")),a.setAttribute("cursor"),a.setAttribute("raycaster","objects: [forcegraph]"),t.forcegraph=document.createElement("a-entity"),t.forcegraph.setAttribute("forcegraph",null),s.appendChild(t.forcegraph);var l=document.createElement("a-entity");l.setAttribute("camera",""),o.appendChild(l),t.container.appendChild(o)},update:function(e,t){t.hasOwnProperty("width")&&e.width&&(e.container.style.width=e.width),t.hasOwnProperty("height")&&e.height&&(e.container.style.height=e.height),t.hasOwnProperty("glScale")&&e.forcegraph.setAttribute("scale",N(new Array(3)).map((function(){return 1/e.glScale})).join(" ")),t.hasOwnProperty("yOffset")&&e.forcegraph.setAttribute("position","0 ".concat(e.yOffset," 0"));var n=["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","onNodeHover","onNodeClick","onLinkHover","onLinkClick","forceEngine","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"],r=Object.assign.apply(Object,[{}].concat(N(Object.entries(e).filter((function(e){var r=I(e,2),i=r[0],o=r[1];return t.hasOwnProperty(i)&&-1!==n.indexOf(i)&&void 0!==o&&null!==o})).map((function(e){var t=I(e,2);return D({},t[0],t[1])}))),N(Object.entries(e.graphData).map((function(e){var t=I(e,2);return D({},t[0],t[1])})))));e.forcegraph.setAttribute("forcegraph",r)}}),z=r(3);const H=new z.y,U=new z.C,V=new z.M,G=new z.N,W=new z.N,q=new z.N,X=new z.s;class Y extends z.l{constructor(e,t,n){super(),n.style.touchAction="none";let r=null,i=null;const o=[],a=this;function s(){n.addEventListener("pointermove",c),n.addEventListener("pointerdown",u),n.addEventListener("pointerup",h),n.addEventListener("pointerleave",h)}function l(){n.removeEventListener("pointermove",c),n.removeEventListener("pointerdown",u),n.removeEventListener("pointerup",h),n.removeEventListener("pointerleave",h),n.style.cursor=""}function c(s){if(!1!==a.enabled){if(d(s),U.setFromCamera(V,t),r)return U.ray.intersectPlane(H,W)&&r.position.copy(W.sub(G).applyMatrix4(X)),void a.dispatchEvent({type:"drag",object:r});if("mouse"===s.pointerType||"pen"===s.pointerType)if(o.length=0,U.setFromCamera(V,t),U.intersectObjects(e,!0,o),o.length>0){const e=o[0].object;H.setFromNormalAndCoplanarPoint(t.getWorldDirection(H.normal),q.setFromMatrixPosition(e.matrixWorld)),i!==e&&null!==i&&(a.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null),i!==e&&(a.dispatchEvent({type:"hoveron",object:e}),n.style.cursor="pointer",i=e)}else null!==i&&(a.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null)}}function u(i){!1!==a.enabled&&(d(i),o.length=0,U.setFromCamera(V,t),U.intersectObjects(e,!0,o),o.length>0&&(r=!0===a.transformGroup?e[0]:o[0].object,H.setFromNormalAndCoplanarPoint(t.getWorldDirection(H.normal),q.setFromMatrixPosition(r.matrixWorld)),U.ray.intersectPlane(H,W)&&(X.copy(r.parent.matrixWorld).invert(),G.copy(W).sub(q.setFromMatrixPosition(r.matrixWorld))),n.style.cursor="move",a.dispatchEvent({type:"dragstart",object:r})))}function h(){!1!==a.enabled&&(r&&(a.dispatchEvent({type:"dragend",object:r}),r=null),n.style.cursor=i?"pointer":"auto")}function d(e){const t=n.getBoundingClientRect();V.x=(e.clientX-t.left)/t.width*2-1,V.y=-(e.clientY-t.top)/t.height*2+1}s(),this.enabled=!0,this.transformGroup=!1,this.activate=s,this.deactivate=l,this.dispose=function(){l()},this.getObjects=function(){return e}}}var K=r(146);const Q={type:"change"},Z={type:"start"},J={type:"end"};class $ extends z.l{constructor(e,t){super(),void 0===t&&console.warn('THREE.TrackballControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.TrackballControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.');const n=this,r=-1,i=0,o=1,a=2,s=3,l=4;this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:z.r.ROTATE,MIDDLE:z.r.DOLLY,RIGHT:z.r.PAN},this.target=new z.N;const c=new z.N;let u=1,h=r,d=r,f=0,p=0,m=0;const g=new z.N,v=new z.M,y=new z.M,b=new z.N,w=new z.M,x=new z.M,_=new z.M,E=new z.M,A=[],S={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=n.domElement.getBoundingClientRect(),t=n.domElement.ownerDocument.documentElement;n.screen.left=e.left+window.pageXOffset-t.clientLeft,n.screen.top=e.top+window.pageYOffset-t.clientTop,n.screen.width=e.width,n.screen.height=e.height};const M=function(){const e=new z.M;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),T=function(){const e=new z.M;return function(t,r){return e.set((t-.5*n.screen.width-n.screen.left)/(.5*n.screen.width),(n.screen.height+2*(n.screen.top-r))/n.screen.width),e}}();function C(e){!1!==n.enabled&&(0===A.length&&(n.domElement.ownerDocument.addEventListener("pointermove",O),n.domElement.ownerDocument.addEventListener("pointerup",R)),function(e){A.push(e)}(e),"touch"===e.pointerType?function(e){switch(j(e),A.length){case 1:h=s,y.copy(T(A[0].pageX,A[0].pageY)),v.copy(y);break;default:h=l;const e=A[0].pageX-A[1].pageX,t=A[0].pageY-A[1].pageY;p=f=Math.sqrt(e*e+t*t);const n=(A[0].pageX+A[1].pageX)/2,r=(A[0].pageY+A[1].pageY)/2;_.copy(M(n,r)),E.copy(_)}n.dispatchEvent(Z)}(e):function(e){if(h===r)switch(e.button){case n.mouseButtons.LEFT:h=i;break;case n.mouseButtons.MIDDLE:h=o;break;case n.mouseButtons.RIGHT:h=a;break;default:h=r}const t=d!==r?d:h;t!==i||n.noRotate?t!==o||n.noZoom?t!==a||n.noPan||(_.copy(M(e.pageX,e.pageY)),E.copy(_)):(w.copy(M(e.pageX,e.pageY)),x.copy(w)):(y.copy(T(e.pageX,e.pageY)),v.copy(y));n.domElement.ownerDocument.addEventListener("pointermove",O),n.domElement.ownerDocument.addEventListener("pointerup",R),n.dispatchEvent(Z)}(e))}function O(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(j(e),A.length){case 1:v.copy(y),y.copy(T(e.pageX,e.pageY));break;default:const t=function(e){const t=e.pointerId===A[0].pointerId?A[1]:A[0];return S[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;p=Math.sqrt(n*n+r*r);const i=(e.pageX+t.x)/2,o=(e.pageY+t.y)/2;E.copy(M(i,o))}}(e):function(e){const t=d!==r?d:h;t!==i||n.noRotate?t!==o||n.noZoom?t!==a||n.noPan||E.copy(M(e.pageX,e.pageY)):x.copy(M(e.pageX,e.pageY)):(v.copy(y),y.copy(T(e.pageX,e.pageY)))}(e))}function R(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(A.length){case 0:h=r;break;case 1:h=s,y.copy(T(e.pageX,e.pageY)),v.copy(y)}n.dispatchEvent(J)}(e):(h=r,n.domElement.ownerDocument.removeEventListener("pointermove",O),n.domElement.ownerDocument.removeEventListener("pointerup",R),n.dispatchEvent(J)),N(e),0===A.length&&(n.domElement.ownerDocument.removeEventListener("pointermove",O),n.domElement.ownerDocument.removeEventListener("pointerup",R)))}function k(e){N(e)}function P(e){!1!==n.enabled&&(window.removeEventListener("keydown",P),d===r&&(e.code!==n.keys[i]||n.noRotate?e.code!==n.keys[o]||n.noZoom?e.code!==n.keys[a]||n.noPan||(d=a):d=o:d=i))}function L(){!1!==n.enabled&&(d=r,window.addEventListener("keydown",P))}function D(e){if(!1!==n.enabled&&!0!==n.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:w.y-=.025*e.deltaY;break;case 1:w.y-=.01*e.deltaY;break;default:w.y-=25e-5*e.deltaY}n.dispatchEvent(Z),n.dispatchEvent(J)}}function I(e){!1!==n.enabled&&e.preventDefault()}function N(e){delete S[e.pointerId];for(let t=0;t<A.length;t++)if(A[t].pointerId==e.pointerId)return void A.splice(t,1)}function j(e){let t=S[e.pointerId];void 0===t&&(t=new z.M,S[e.pointerId]=t),t.set(e.pageX,e.pageY)}this.rotateCamera=function(){const e=new z.N,t=new z.A,r=new z.N,i=new z.N,o=new z.N,a=new z.N;return function(){a.set(y.x-v.x,y.y-v.y,0);let s=a.length();s?(g.copy(n.object.position).sub(n.target),r.copy(g).normalize(),i.copy(n.object.up).normalize(),o.crossVectors(i,r).normalize(),i.setLength(y.y-v.y),o.setLength(y.x-v.x),a.copy(i.add(o)),e.crossVectors(a,g).normalize(),s*=n.rotateSpeed,t.setFromAxisAngle(e,s),g.applyQuaternion(t),n.object.up.applyQuaternion(t),b.copy(e),m=s):!n.staticMoving&&m&&(m*=Math.sqrt(1-n.dynamicDampingFactor),g.copy(n.object.position).sub(n.target),t.setFromAxisAngle(b,m),g.applyQuaternion(t),n.object.up.applyQuaternion(t)),v.copy(y)}}(),this.zoomCamera=function(){let e;h===l?(e=f/p,f=p,n.object.isPerspectiveCamera?g.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom*=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")):(e=1+(x.y-w.y)*n.zoomSpeed,1!==e&&e>0&&(n.object.isPerspectiveCamera?g.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom/=e,n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?w.copy(x):w.y+=(x.y-w.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new z.M,t=new z.N,r=new z.N;return function(){if(e.copy(E).sub(_),e.lengthSq()){if(n.object.isOrthographicCamera){const t=(n.object.right-n.object.left)/n.object.zoom/n.domElement.clientWidth,r=(n.object.top-n.object.bottom)/n.object.zoom/n.domElement.clientWidth;e.x*=t,e.y*=r}e.multiplyScalar(g.length()*n.panSpeed),r.copy(g).cross(n.object.up).setLength(e.x),r.add(t.copy(n.object.up).setLength(e.y)),n.object.position.add(r),n.target.add(r),n.staticMoving?_.copy(E):_.add(e.subVectors(E,_).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(g.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,g.setLength(n.maxDistance)),w.copy(x)),g.lengthSq()<n.minDistance*n.minDistance&&(n.object.position.addVectors(n.target,g.setLength(n.minDistance)),w.copy(x)))},this.update=function(){g.subVectors(n.object.position,n.target),n.noRotate||n.rotateCamera(),n.noZoom||n.zoomCamera(),n.noPan||n.panCamera(),n.object.position.addVectors(n.target,g),n.object.isPerspectiveCamera?(n.checkDistances(),n.object.lookAt(n.target),c.distanceToSquared(n.object.position)>1e-6&&(n.dispatchEvent(Q),c.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(c.distanceToSquared(n.object.position)>1e-6||u!==n.object.zoom)&&(n.dispatchEvent(Q),c.copy(n.object.position),u=n.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){h=r,d=r,n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.up.copy(n.up0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),g.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent(Q),c.copy(n.object.position),u=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",I),n.domElement.removeEventListener("pointerdown",C),n.domElement.removeEventListener("pointercancel",k),n.domElement.removeEventListener("wheel",D),window.removeEventListener("keydown",P),window.removeEventListener("keyup",L)},this.domElement.addEventListener("contextmenu",I),this.domElement.addEventListener("pointerdown",C),this.domElement.addEventListener("pointercancel",k),this.domElement.addEventListener("wheel",D,{passive:!1}),window.addEventListener("keydown",P),window.addEventListener("keyup",L),this.handleResize(),this.update()}}const ee={type:"change"},te={type:"start"},ne={type:"end"};class re extends z.l{constructor(e,t){super(),void 0===t&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),t===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new z.N,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=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:z.r.ROTATE,MIDDLE:z.r.DOLLY,RIGHT:z.r.PAN},this.touches={ONE:z.I.ROTATE,TWO:z.I.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return a.phi},this.getAzimuthalAngle=function(){return a.theta},this.listenToKeyEvents=function(e){e.addEventListener("keydown",G),this._domElementKeyEvents=e},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(ee),n.update(),i=r.NONE},this.update=function(){const t=new z.N,h=(new z.A).setFromUnitVectors(e.up,new z.N(0,1,0)),d=h.clone().invert(),f=new z.N,p=new z.A,m=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(h),a.setFromVector3(t),n.autoRotate&&i===r.NONE&&E(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(a.theta+=s.theta*n.dampingFactor,a.phi+=s.phi*n.dampingFactor):(a.theta+=s.theta,a.phi+=s.phi);let g=n.minAzimuthAngle,v=n.maxAzimuthAngle;return isFinite(g)&&isFinite(v)&&(g<-Math.PI?g+=m:g>Math.PI&&(g-=m),v<-Math.PI?v+=m:v>Math.PI&&(v-=m),a.theta=g<=v?Math.max(g,Math.min(v,a.theta)):a.theta>(g+v)/2?Math.max(g,a.theta):Math.min(v,a.theta)),a.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,a.phi)),a.makeSafe(),a.radius*=l,a.radius=Math.max(n.minDistance,Math.min(n.maxDistance,a.radius)),!0===n.enableDamping?n.target.addScaledVector(c,n.dampingFactor):n.target.add(c),t.setFromSpherical(a),t.applyQuaternion(d),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,c.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),c.set(0,0,0)),l=1,!!(u||f.distanceToSquared(n.object.position)>o||8*(1-p.dot(n.object.quaternion))>o)&&(n.dispatchEvent(ee),f.copy(n.object.position),p.copy(n.object.quaternion),u=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",W),n.domElement.removeEventListener("pointerdown",B),n.domElement.removeEventListener("pointercancel",U),n.domElement.removeEventListener("wheel",V),n.domElement.ownerDocument.removeEventListener("pointermove",F),n.domElement.ownerDocument.removeEventListener("pointerup",H),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",G)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const o=1e-6,a=new z.H,s=new z.H;let l=1;const c=new z.N;let u=!1;const h=new z.M,d=new z.M,f=new z.M,p=new z.M,m=new z.M,g=new z.M,v=new z.M,y=new z.M,b=new z.M,w=[],x={};function _(){return Math.pow(.95,n.zoomSpeed)}function E(e){s.theta-=e}function A(e){s.phi-=e}const S=function(){const e=new z.N;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),c.add(e)}}(),M=function(){const e=new z.N;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),c.add(e)}}(),T=function(){const e=new z.N;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const o=n.object.position;e.copy(o).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),S(2*t*a/i.clientHeight,n.object.matrix),M(2*r*a/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(S(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),M(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function C(e){n.object.isPerspectiveCamera?l/=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),u=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function O(e){n.object.isPerspectiveCamera?l*=e:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),u=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function R(e){h.set(e.clientX,e.clientY)}function k(e){p.set(e.clientX,e.clientY)}function P(){if(1===w.length)h.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);h.set(e,t)}}function L(){if(1===w.length)p.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);p.set(e,t)}}function D(){const e=w[0].pageX-w[1].pageX,t=w[0].pageY-w[1].pageY,n=Math.sqrt(e*e+t*t);v.set(0,n)}function I(e){if(1==w.length)d.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);d.set(n,r)}f.subVectors(d,h).multiplyScalar(n.rotateSpeed);const t=n.domElement;E(2*Math.PI*f.x/t.clientHeight),A(2*Math.PI*f.y/t.clientHeight),h.copy(d)}function N(e){if(1===w.length)m.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}g.subVectors(m,p).multiplyScalar(n.panSpeed),T(g.x,g.y),p.copy(m)}function j(e){const t=Y(e),r=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(r*r+i*i);y.set(0,o),b.set(0,Math.pow(y.y/v.y,n.zoomSpeed)),C(b.y),v.copy(y)}function B(e){!1!==n.enabled&&(0===w.length&&(n.domElement.ownerDocument.addEventListener("pointermove",F),n.domElement.ownerDocument.addEventListener("pointerup",H)),function(e){w.push(e)}(e),"touch"===e.pointerType?function(e){switch(X(e),w.length){case 1:switch(n.touches.ONE){case z.I.ROTATE:if(!1===n.enableRotate)return;P(),i=r.TOUCH_ROTATE;break;case z.I.PAN:if(!1===n.enablePan)return;L(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(n.touches.TWO){case z.I.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&D(),n.enablePan&&L(),i=r.TOUCH_DOLLY_PAN;break;case z.I.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&D(),n.enableRotate&&P(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(te)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case z.r.DOLLY:if(!1===n.enableZoom)return;!function(e){v.set(e.clientX,e.clientY)}(e),i=r.DOLLY;break;case z.r.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;k(e),i=r.PAN}else{if(!1===n.enableRotate)return;R(e),i=r.ROTATE}break;case z.r.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;R(e),i=r.ROTATE}else{if(!1===n.enablePan)return;k(e),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(te)}(e))}function F(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(X(e),i){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;I(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;N(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&j(e),n.enablePan&&N(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&j(e),n.enableRotate&&I(e)}(e),n.update();break;default:i=r.NONE}}(e):function(e){if(!1===n.enabled)return;switch(i){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){d.set(e.clientX,e.clientY),f.subVectors(d,h).multiplyScalar(n.rotateSpeed);const t=n.domElement;E(2*Math.PI*f.x/t.clientHeight),A(2*Math.PI*f.y/t.clientHeight),h.copy(d),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){y.set(e.clientX,e.clientY),b.subVectors(y,v),b.y>0?C(_()):b.y<0&&O(_()),v.copy(y),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){m.set(e.clientX,e.clientY),g.subVectors(m,p).multiplyScalar(n.panSpeed),T(g.x,g.y),p.copy(m),n.update()}(e)}}(e))}function H(e){!1!==n.enabled&&(e.pointerType,n.dispatchEvent(ne),i=r.NONE,q(e),0===w.length&&(n.domElement.ownerDocument.removeEventListener("pointermove",F),n.domElement.ownerDocument.removeEventListener("pointerup",H)))}function U(e){q(e)}function V(e){!1===n.enabled||!1===n.enableZoom||i!==r.NONE&&i!==r.ROTATE||(e.preventDefault(),n.dispatchEvent(te),function(e){e.deltaY<0?O(_()):e.deltaY>0&&C(_()),n.update()}(e),n.dispatchEvent(ne))}function G(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:T(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:T(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:T(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:T(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function W(e){!1!==n.enabled&&e.preventDefault()}function q(e){delete x[e.pointerId];for(let t=0;t<w.length;t++)if(w[t].pointerId==e.pointerId)return void w.splice(t,1)}function X(e){let t=x[e.pointerId];void 0===t&&(t=new z.M,x[e.pointerId]=t),t.set(e.pageX,e.pageY)}function Y(e){const t=e.pointerId===w[0].pointerId?w[1]:w[0];return x[t.pointerId]}n.domElement.addEventListener("contextmenu",W),n.domElement.addEventListener("pointerdown",B),n.domElement.addEventListener("pointercancel",U),n.domElement.addEventListener("wheel",V,{passive:!1}),this.update()}}const ie={type:"change"};class oe extends z.l{constructor(e,t){super(),void 0===t&&(console.warn('THREE.FlyControls: The second parameter "domElement" is now mandatory.'),t=document),this.object=e,this.domElement=t,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const n=this,r=new z.A,i=new z.N;this.tmpQuaternion=new z.A,this.mouseStatus=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new z.N(0,0,0),this.rotationVector=new z.N(0,0,0),this.keydown=function(e){if(!e.altKey){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()},this.mousedown=function(e){if(this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.mousemove=function(e){if(!this.dragToLook||this.mouseStatus>0){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}},this.mouseup=function(e){if(this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()},this.update=function(e){const t=e*n.movementSpeed,o=e*n.rollSpeed;n.object.translateX(n.moveVector.x*t),n.object.translateY(n.moveVector.y*t),n.object.translateZ(n.moveVector.z*t),n.tmpQuaternion.set(n.rotationVector.x*o,n.rotationVector.y*o,n.rotationVector.z*o,1).normalize(),n.object.quaternion.multiply(n.tmpQuaternion),(i.distanceToSquared(n.object.position)>1e-6||8*(1-r.dot(n.object.quaternion))>1e-6)&&(n.dispatchEvent(ie),r.copy(n.object.quaternion),i.copy(n.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",ae),this.domElement.removeEventListener("mousedown",a),this.domElement.removeEventListener("mousemove",o),this.domElement.removeEventListener("mouseup",s),window.removeEventListener("keydown",l),window.removeEventListener("keyup",c)};const o=this.mousemove.bind(this),a=this.mousedown.bind(this),s=this.mouseup.bind(this),l=this.keydown.bind(this),c=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",ae),this.domElement.addEventListener("mousemove",o),this.domElement.addEventListener("mousedown",a),this.domElement.addEventListener("mouseup",s),window.addEventListener("keydown",l),window.addEventListener("keyup",c),this.updateMovementVector(),this.updateRotationVector()}}function ae(e){e.preventDefault()}var se={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\t\t}"};class le{constructor(){this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}const ce=new z.w(-1,1,1,-1,0,1),ue=new z.e;ue.setAttribute("position",new z.m([-1,3,0,-1,-1,0,3,-1,0],3)),ue.setAttribute("uv",new z.m([0,2,0,0,2,0],2));class he{constructor(e){this._mesh=new z.t(ue,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,ce)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class de extends le{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof z.E?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=z.L.clone(e.uniforms),this.material=new z.E({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new he(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}}class fe extends le{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),i=e.state;let o,a;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(o=0,a=1):(o=1,a=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,o,4294967295),i.buffers.stencil.setClear(a),i.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(r.EQUAL,1,4294967295),i.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),i.buffers.stencil.setLocked(!0)}}class pe extends le{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class me{constructor(e,t){if(this.renderer=e,void 0===t){const n={minFilter:z.q,magFilter:z.q,format:z.B},r=e.getSize(new z.M);this._pixelRatio=e.getPixelRatio(),this._width=r.width,this._height=r.height,(t=new z.O(this._width*this._pixelRatio,this._height*this._pixelRatio,n)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],void 0===se&&console.error("THREE.EffectComposer relies on CopyShader"),void 0===de&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new de(se),this.clock=new z.f}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t<this.passes.length;t++)if(this.passes[t].enabled)return!1;return!0}render(e){void 0===e&&(e=this.clock.getDelta());const t=this.renderer.getRenderTarget();let n=!1;for(let r=0,i=this.passes.length;r<i;r++){const t=this.passes[r];if(!1!==t.enabled){if(t.renderToScreen=this.renderToScreen&&this.isLastEnabledPass(r),t.render(this.renderer,this.writeBuffer,this.readBuffer,e,n),t.needsSwap){if(n){const t=this.renderer.getContext(),n=this.renderer.state.buffers.stencil;n.setFunc(t.NOTEQUAL,1,4294967295),this.copyPass.render(this.renderer,this.writeBuffer,this.readBuffer,e),n.setFunc(t.EQUAL,1,4294967295)}this.swapBuffers()}void 0!==fe&&(t instanceof fe?n=!0:t instanceof pe&&(n=!1))}}this.renderer.setRenderTarget(t)}reset(e){if(void 0===e){const t=this.renderer.getSize(new z.M);this._pixelRatio=this.renderer.getPixelRatio(),this._width=t.width,this._height=t.height,(e=this.renderTarget1.clone()).setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}this.renderTarget1.dispose(),this.renderTarget2.dispose(),this.renderTarget1=e,this.renderTarget2=e.clone(),this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2}setSize(e,t){this._width=e,this._height=t;const n=this._width*this._pixelRatio,r=this._height*this._pixelRatio;this.renderTarget1.setSize(n,r),this.renderTarget2.setSize(n,r);for(let i=0;i<this.passes.length;i++)this.passes[i].setSize(n,r)}setPixelRatio(e){this._pixelRatio=e,this.setSize(this._width,this._height)}}new z.w(-1,1,1,-1,0,1);const ge=new z.e;ge.setAttribute("position",new z.m([-1,3,0,-1,-1,0,3,-1,0],3)),ge.setAttribute("uv",new z.m([0,2,0,0,2,0],2));class ve extends le{constructor(e,t,n,r,i){super(),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=void 0!==i?i:0,this.clear=!0,this.clearDepth=!1,this.needsSwap=!1,this._oldClearColor=new z.g}render(e,t,n){const r=e.autoClear;let i,o;e.autoClear=!1,void 0!==this.overrideMaterial&&(o=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),i=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,i),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=o),e.autoClear=r}}function ye(){return(ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function be(e,t){return(be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function we(e){return(we=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xe(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function _e(e,t,n){return(_e=xe()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&be(i,n.prototype),i}).apply(null,arguments)}function Ee(e){var t="function"===typeof Map?new Map:void 0;return(Ee=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _e(e,arguments,we(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),be(r,e)})(e)}var Ae=function(e){var t,n;function r(t){return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+t+" for more information.")||this)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,be(t,n),r}(Ee(Error));function Se(e){return Math.round(255*e)}function Me(e,t,n){return Se(e)+","+Se(t)+","+Se(n)}function Te(e,t,n,r){if(void 0===r&&(r=Me),0===t)return r(n,n,n);var i=(e%360+360)%360/60,o=(1-Math.abs(2*n-1))*t,a=o*(1-Math.abs(i%2-1)),s=0,l=0,c=0;i>=0&&i<1?(s=o,l=a):i>=1&&i<2?(s=a,l=o):i>=2&&i<3?(l=o,c=a):i>=3&&i<4?(l=a,c=o):i>=4&&i<5?(s=a,c=o):i>=5&&i<6&&(s=o,c=a);var u=n-o/2;return r(s+u,l+u,c+u)}var Ce={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var Oe=/^#[a-fA-F0-9]{6}$/,Re=/^#[a-fA-F0-9]{8}$/,ke=/^#[a-fA-F0-9]{3}$/,Pe=/^#[a-fA-F0-9]{4}$/,Le=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,De=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,Ie=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,Ne=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function je(e){if("string"!==typeof e)throw new Ae(3);var t=function(e){if("string"!==typeof e)return e;var t=e.toLowerCase();return Ce[t]?"#"+Ce[t]:e}(e);if(t.match(Oe))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(Re)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(ke))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(Pe)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=Le.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var o=De.exec(t.substring(0,50));if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10),alpha:parseFloat(""+o[4])};var a=Ie.exec(t);if(a){var s="rgb("+Te(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",l=Le.exec(s);if(!l)throw new Ae(4,t,s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var c=Ne.exec(t.substring(0,50));if(c){var u="rgb("+Te(parseInt(""+c[1],10),parseInt(""+c[2],10)/100,parseInt(""+c[3],10)/100)+")",h=Le.exec(u);if(!h)throw new Ae(4,t,u);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+c[4])}}throw new Ae(5)}var Be=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function Fe(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function ze(e,t,n){if("number"===typeof e&&"number"===typeof t&&"number"===typeof n)return Be("#"+Fe(e)+Fe(t)+Fe(n));if("object"===typeof e&&void 0===t&&void 0===n)return Be("#"+Fe(e.red)+Fe(e.green)+Fe(e.blue));throw new Ae(6)}function He(e,t,n,r){if("string"===typeof e&&"number"===typeof t){var i=je(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"===typeof e&&"number"===typeof t&&"number"===typeof n&&"number"===typeof r)return r>=1?ze(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"===typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?ze(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Ae(7)}function Ue(e){return function e(t,n,r){return function(){var i=r.concat(Array.prototype.slice.call(arguments));return i.length>=n?t.apply(this,i):e(t,n,i)}}(e,e.length,[])}function Ve(e,t,n){return Math.max(e,Math.min(t,n))}function Ge(e,t){if("transparent"===t)return t;var n=je(t);return He(ye({},n,{alpha:Ve(0,1,(100*("number"===typeof n.alpha?n.alpha:1)+100*parseFloat(e))/100)}))}var We=Ue(Ge);var qe=r(60);function Xe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||Qe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(e){return function(e){if(Array.isArray(e))return Ze(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Qe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qe(e,t){if(e){if("string"===typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".scene-nav-info {\n bottom: 5px;\n width: 100%;\n text-align: center;\n color: slategrey;\n opacity: 0.7;\n font-size: 10px;\n}\n\n.scene-tooltip {\n color: lavender;\n font-size: 15px;\n}\n\n.scene-nav-info, .scene-tooltip {\n position: absolute;\n font-family: sans-serif;\n pointer-events: none;\n}\n\n.scene-container canvas:focus {\n outline: none;\n}");var Je=window.THREE?window.THREE:{WebGLRenderer:z.P,Scene:z.D,PerspectiveCamera:z.x,Raycaster:z.C,TextureLoader:z.J,Vector2:z.M,Vector3:z.N,Box3:z.c,Color:z.g,Mesh:z.t,SphereGeometry:z.G,MeshBasicMaterial:z.u,BackSide:z.b,EventDispatcher:z.l,MOUSE:z.r,Quaternion:z.A,Spherical:z.H,Clock:z.f},$e=Object(w.a)({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),r=n.length?n[0]:null;t=r?r.object:null,e.intersectionPoint=r?r.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&Object(x.default)(e.tooltipContent)(t)||"",e.hoverObj=t)}qe.a.update()}return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,r){var i=e.camera;if(t&&e.initialised){var o=t,a=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},i.position),l=h();new qe.a.Tween(s).to(o,r).easing(qe.a.Easing.Quadratic.Out).onUpdate(c).start(),new qe.a.Tween(l).to(a,r/3).easing(qe.a.Easing.Quadratic.Out).onUpdate(u).start()}else c(o),u(a);return this}return Object.assign({},i.position,{lookAt:h()});function c(e){var t=e.x,n=e.y,r=e.z;void 0!==t&&(i.position.x=t),void 0!==n&&(i.position.y=n),void 0!==r&&(i.position.z=r)}function u(t){e.controls.target=new Je.Vector3(t.x,t.y,t.z)}function h(){return Object.assign(new Je.Vector3(0,0,-1e3).applyQuaternion(i.quaternion).add(i.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];return this.fitToBbox(this.getBbox.apply(this,i),t,n)},fitToBbox:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,i=e.camera;if(t){var o=new Je.Vector3(0,0,0),a=2*Math.max.apply(Math,Ke(Object.entries(t).map((function(e){var t=Ye(e,2),n=t[0],r=t[1];return Math.max.apply(Math,Ke(r.map((function(e){return Math.abs(o[n]-e)}))))})))),s=(1-2*r/e.height)*i.fov,l=a/Math.atan(s*Math.PI/180),c=l/i.aspect,u=Math.max(l,c);if(u>0){var h=o.clone().sub(i.position).normalize().multiplyScalar(-u);this.cameraPosition(h,o,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new Je.Box3(new Je.Vector3(0,0,0),new Je.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach((function(e){return n.expandByObject(e)})),Object.assign.apply(Object,Ke(["x","y","z"].map((function(e){return Xe({},e,[n.min[e],n.max[e]])}))))):null},getScreenCoords:function(e,t,n,r){var i=new Je.Vector3(t,n,r);return i.project(this.camera()),{x:(i.x+1)*e.width/2,y:-(i.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=new Je.Vector2(t/e.width*2-1,-n/e.height*2+1),o=new Je.Raycaster;return o.setFromCamera(i,e.camera),Object.assign({},o.ray.at(r,new Je.Vector3))},intersectingObjects:function(e,t,n){var r=new Je.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new Je.Raycaster;return i.params.Line.threshold=e.lineHoverPrecision,i.setFromCamera(r,e.camera),i.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new Je.Scene,camera:new Je.PerspectiveCamera,clock:new Je.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,i=void 0===r?"trackball":r,o=n.rendererConfig,a=void 0===o?{}:o,s=n.extraRenderers,l=void 0===s?[]:s,c=n.waitForLoadComplete,u=void 0===c||c;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[i]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new Je.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var r=function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(t.container);t.pointerPos.x=n.pageX-r.left,t.pointerPos.y=n.pageY-r.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, 21px)")}}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new Je.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},a)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=l,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new me(t.renderer),t.postProcessingComposer.addPass(new ve(t.scene,t.camera)),t.controls=new{trackball:$,orbit:re,fly:oe}[i](t.camera,t.renderer.domElement),"fly"===i&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==i&&"orbit"!==i||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(Ke(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new Je.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!u,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width=e.width,e.container.style.height=e.height,[e.renderer,e.postProcessingComposer].concat(Ke(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=e.skyRadius),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new Je.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=je(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new Je.Color(We(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new Je.TextureLoader).load(e.backgroundImageUrl,(function(t){e.skysphere.material=new Je.MeshBasicMaterial({map:t,side:Je.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}});function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){nt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rt(e){return function(e){if(Array.isArray(e))return it(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return it(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return it(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ot(e,t){var n=new t;return{linkProp:function(t){return{default:n[t](),onChange:function(n,r){r[e][t](n)},triggerUpdate:!1}},linkMethod:function(t){return function(n){for(var r=n[e],i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];var s=r[t].apply(r,o);return s===r?this:s}}}}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".graph-info-msg {\n top: 50%;\n width: 100%;\n text-align: center;\n color: lavender;\n opacity: 0.7;\n font-size: 22px;\n position: absolute;\n font-family: Sans-serif;\n}\n\n.scene-container .clickable {\n cursor: pointer;\n}\n\n.scene-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.scene-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}");var at=window.THREE?window.THREE:{AmbientLight:z.a,DirectionalLight:z.k,Vector3:z.N},st=ot("forceGraph",K.default),lt=Object.assign.apply(Object,rt(["jsonUrl","graphData","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeColor","nodeAutoColorBy","nodeOpacity","nodeVisibility","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaDecay","d3VelocityDecay","d3AlphaMin","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(e){return nt({},e,st.linkProp(e))})))),ct=Object.assign.apply(Object,rt(["refresh","getGraphBbox","d3Force","d3ReheatSimulation","emitParticle"].map((function(e){return nt({},e,st.linkMethod(e))})))),ut=ot("renderObjs",$e),ht=Object.assign.apply(Object,rt(["width","height","backgroundColor","showNavInfo","enablePointerInteraction"].map((function(e){return nt({},e,ut.linkProp(e))})))),dt=Object.assign.apply(Object,rt(["cameraPosition","postProcessingComposer"].map((function(e){return nt({},e,ut.linkMethod(e))}))).concat([{graph2ScreenCoords:ut.linkMethod("getScreenCoords"),screen2GraphCoords:ut.linkMethod("getSceneCoords")}]));function ft(e){for(var t=e;t&&!t.hasOwnProperty("__graphObjType");)t=t.parent;return t}var pt=Object(w.a)({props:tt(tt({nodeLabel:{default:"name",triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:1,onChange:function(e,t){return t.renderObjs.lineHoverPrecision(e)},triggerUpdate:!1},enableNavigationControls:{default:!0,onChange:function(e,t){var n=t.renderObjs.controls();n&&(n.enabled=e)},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1}},lt),ht),methods:tt(tt({zoomToFit:function(e,t,n){for(var r,i=arguments.length,o=new Array(i>3?i-3:0),a=3;a<i;a++)o[a-3]=arguments[a];return e.renderObjs.fitToBbox((r=e.forceGraph).getGraphBbox.apply(r,o),t,n),this},pauseAnimation:function(e){return null!==e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return null===e.animationFrameRequestId&&this._animationCycle(),this},_animationCycle:function(e){e.enablePointerInteraction&&(this.renderer().domElement.style.cursor=null),e.forceGraph.tickFrame(),e.renderObjs.tick(),e.animationFrameRequestId=requestAnimationFrame(this._animationCycle)},scene:function(e){return e.renderObjs.scene()},camera:function(e){return e.renderObjs.camera()},renderer:function(e){return e.renderObjs.renderer()},controls:function(e){return e.renderObjs.controls()},tbControls:function(e){return e.renderObjs.tbControls()},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},ct),dt),stateInit:function(e){var t=e.controlType,n=e.rendererConfig,r=e.extraRenderers;return{forceGraph:new K.default,renderObjs:$e({controlType:t,rendererConfig:n,extraRenderers:r})}},init:function(e,t){e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.style.position="relative";var n=document.createElement("div");t.container.appendChild(n),t.renderObjs(n);var r,i=t.renderObjs.camera(),o=t.renderObjs.renderer(),a=t.renderObjs.controls();a.enabled=!!t.enableNavigationControls,t.lastSetCameraZ=i.position.z,t.container.appendChild(r=document.createElement("div")),r.className="graph-info-msg",r.textContent="",t.forceGraph.onLoading((function(){r.textContent="Loading..."})).onFinishLoading((function(){r.textContent=""})).onUpdate((function(){t.graphData=t.forceGraph.graphData(),0===i.position.x&&0===i.position.y&&i.position.z===t.lastSetCameraZ&&t.graphData.nodes.length&&(i.lookAt(t.forceGraph.position),t.lastSetCameraZ=i.position.z=170*Math.cbrt(t.graphData.nodes.length))})).onFinishUpdate((function(){if(t._dragControls){var e=t.graphData.nodes.find((function(e){return e.__initialFixedPos&&!e.__disposeControlsAfterDrag}));e?e.__disposeControlsAfterDrag=!0:t._dragControls.dispose(),t._dragControls=void 0}if(t.enableNodeDrag&&t.enablePointerInteraction&&"d3"===t.forceEngine){var n=t._dragControls=new Y(t.graphData.nodes.map((function(e){return e.__threeObj})).filter((function(e){return e})),i,o.domElement);n.addEventListener("dragstart",(function(e){a.enabled=!1,e.object.__initialPos=e.object.position.clone(),e.object.__prevPos=e.object.position.clone();var t=ft(e.object).__data;!t.__initialFixedPos&&(t.__initialFixedPos={fx:t.fx,fy:t.fy,fz:t.fz}),!t.__initialPos&&(t.__initialPos={x:t.x,y:t.y,z:t.z}),["x","y","z"].forEach((function(e){return t["f".concat(e)]=t[e]})),o.domElement.classList.add("grabbable")})),n.addEventListener("drag",(function(e){var n=ft(e.object);if(!e.object.hasOwnProperty("__graphObjType")){var r=e.object.__initialPos,i=e.object.__prevPos,o=e.object.position;n.position.add(o.clone().sub(i)),i.copy(o),o.copy(r)}var a=n.__data,s=n.position,l={x:s.x-a.x,y:s.y-a.y,z:s.z-a.z};["x","y","z"].forEach((function(e){return a["f".concat(e)]=a[e]=s[e]})),t.forceGraph.d3AlphaTarget(.3).resetCountdown(),a.__dragged=!0,t.onNodeDrag(a,l)})),n.addEventListener("dragend",(function(e){delete e.object.__initialPos,delete e.object.__prevPos;var r=ft(e.object).__data;r.__disposeControlsAfterDrag&&(n.dispose(),delete r.__disposeControlsAfterDrag);var i=r.__initialFixedPos,s=r.__initialPos,l={x:s.x-r.x,y:s.y-r.y,z:s.z-r.z};i&&(["x","y","z"].forEach((function(e){var t="f".concat(e);void 0===i[t]&&delete r[t]})),delete r.__initialFixedPos,delete r.__initialPos,r.__dragged&&(delete r.__dragged,t.onNodeDragEnd(r,l))),t.forceGraph.d3AlphaTarget(0).resetCountdown(),t.enableNavigationControls&&(a.enabled=!0,a.domElement&&a.domElement.ownerDocument&&a.domElement.ownerDocument.dispatchEvent(new PointerEvent("pointerup",{pointerType:"touch"}))),o.domElement.classList.remove("grabbable")}))}})),t.renderObjs.objects([new at.AmbientLight(12303291),new at.DirectionalLight(16777215,.6),t.forceGraph]).hoverOrderComparator((function(e,t){var n=ft(e);if(!n)return 1;var r=ft(t);if(!r)return-1;var i=function(e){return"node"===e.__graphObjType};return i(r)-i(n)})).tooltipContent((function(e){var n=ft(e);return n&&Object(x.default)(t["".concat(n.__graphObjType,"Label")])(n.__data)||""})).hoverDuringDrag(!1).onHover((function(e){var n=ft(e);if(n!==t.hoverObj){var r=t.hoverObj?t.hoverObj.__graphObjType:null,i=t.hoverObj?t.hoverObj.__data:null,a=n?n.__graphObjType:null,s=n?n.__data:null;if(r&&r!==a){var l=t["on".concat("node"===r?"Node":"Link","Hover")];l&&l(null,i)}if(a){var c=t["on".concat("node"===a?"Node":"Link","Hover")];c&&c(s,r===a?i:null)}o.domElement.classList[n&&t["on".concat("node"===a?"Node":"Link","Click")]||!n&&t.onBackgroundClick?"add":"remove"]("clickable"),t.hoverObj=n}})).clickAfterDrag(!1).onClick((function(e,n){var r=ft(e);if(r){var i=t["on".concat("node"===r.__graphObjType?"Node":"Link","Click")];i&&i(r.__data,n)}else t.onBackgroundClick&&t.onBackgroundClick(n)})).onRightClick((function(e,n){var r=ft(e);if(r){var i=t["on".concat("node"===r.__graphObjType?"Node":"Link","RightClick")];i&&i(r.__data,n)}else t.onBackgroundRightClick&&t.onBackgroundRightClick(n)})),this._animationCycle()}});function mt(){}var gt=function(e){return null==e?mt:function(){return this.querySelector(e)}};function vt(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}function yt(){return[]}var bt=function(e){return null==e?yt:function(){return this.querySelectorAll(e)}};var wt=function(e){return function(){return this.matches(e)}};function xt(e){return function(t){return t.matches(e)}}var _t=Array.prototype.find;function Et(){return this.firstElementChild}var At=Array.prototype.filter;function St(){return Array.from(this.children)}var Mt=function(e){return new Array(e.length)};function Tt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Tt.prototype={constructor:Tt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var Ct=function(e){return function(){return e}};function Ot(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new Tt(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Rt(e,t,n,r,i,o,a){var s,l,c,u=new Map,h=t.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(l=t[s])&&(f[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?i[s]=l:u.set(c,l));for(s=0;s<d;++s)c=a.call(e,o[s],s,o)+"",(l=u.get(c))?(r[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new Tt(e,o[s]);for(s=0;s<h;++s)(l=t[s])&&u.get(f[s])===l&&(i[s]=l)}function kt(e){return e.__data__}function Pt(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function Lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Dt="http://www.w3.org/1999/xhtml",It={svg:"http://www.w3.org/2000/svg",xhtml:Dt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Nt=function(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),It.hasOwnProperty(t)?{space:It[t],local:e}:e};function jt(e){return function(){this.removeAttribute(e)}}function Bt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ft(e,t){return function(){this.setAttribute(e,t)}}function zt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ht(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Ut(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}var Vt=function(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView};function Gt(e){return function(){this.style.removeProperty(e)}}function Wt(e,t,n){return function(){this.style.setProperty(e,t,n)}}function qt(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Xt(e,t){return e.style.getPropertyValue(t)||Vt(e).getComputedStyle(e,null).getPropertyValue(t)}function Yt(e){return function(){delete this[e]}}function Kt(e,t){return function(){this[e]=t}}function Qt(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Zt(e){return e.trim().split(/^|\s+/)}function Jt(e){return e.classList||new $t(e)}function $t(e){this._node=e,this._names=Zt(e.getAttribute("class")||"")}function en(e,t){for(var n=Jt(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function tn(e,t){for(var n=Jt(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function nn(e){return function(){en(this,e)}}function rn(e){return function(){tn(this,e)}}function on(e,t){return function(){(t.apply(this,arguments)?en:tn)(this,e)}}$t.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function an(){this.textContent=""}function sn(e){return function(){this.textContent=e}}function ln(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function cn(){this.innerHTML=""}function un(e){return function(){this.innerHTML=e}}function hn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function dn(){this.nextSibling&&this.parentNode.appendChild(this)}function fn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pn(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Dt&&t.documentElement.namespaceURI===Dt?t.createElement(e):t.createElementNS(n,e)}}function mn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}var gn=function(e){var t=Nt(e);return(t.local?mn:pn)(t)};function vn(){return null}function yn(){var e=this.parentNode;e&&e.removeChild(this)}function bn(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xn(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}function _n(e){return function(){var t=this.__on;if(t){for(var n,r=0,i=-1,o=t.length;r<o;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function En(e,t,n){return function(){var r,i=this.__on,o=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=t);this.addEventListener(e.type,o,n),r={type:e.type,name:e.name,value:t,listener:o,options:n},i?i.push(r):this.__on=[r]}}function An(e,t,n){var r=Vt(e),i=r.CustomEvent;"function"===typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Sn(e,t){return function(){return An(this,e,t)}}function Mn(e,t){return function(){return An(this,e,t.apply(this,arguments))}}var Tn=[null];function Cn(e,t){this._groups=e,this._parents=t}function On(){return new Cn([[document.documentElement]],Tn)}Cn.prototype=On.prototype={constructor:Cn,select:function(e){"function"!==typeof e&&(e=gt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=t[i],l=s.length,c=r[i]=new Array(l),u=0;u<l;++u)(o=s[u])&&(a=e.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new Cn(r,this._parents)},selectAll:function(e){e="function"===typeof e?function(e){return function(){return vt(e.apply(this,arguments))}}(e):bt(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a,s=t[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),i.push(a));return new Cn(r,i)},selectChild:function(e){return this.select(null==e?Et:function(e){return function(){return _t.call(this.children,e)}}("function"===typeof e?e:xt(e)))},selectChildren:function(e){return this.selectAll(null==e?St:function(e){return function(){return At.call(this.children,e)}}("function"===typeof e?e:xt(e)))},filter:function(e){"function"!==typeof e&&(e=wt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new Cn(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,kt);var n=t?Rt:Ot,r=this._parents,i=this._groups;"function"!==typeof e&&(e=Ct(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=r[c],h=i[c],d=h.length,f=Pt(e.call(u,u&&u.__data__,c,r)),p=f.length,m=s[c]=new Array(p),g=a[c]=new Array(p),v=l[c]=new Array(d);n(u,h,m,g,v,f,t);for(var y,b,w=0,x=0;w<p;++w)if(y=m[w]){for(w>=x&&(x=w+1);!(b=g[x])&&++x<p;);y._next=b||null}}return(a=new Cn(a,r))._enter=s,a._exit=l,a},enter:function(){return new Cn(this._enter||this._groups.map(Mt),this._parents)},exit:function(){return new Cn(this._exit||this._groups.map(Mt),this._parents)},join:function(e,t,n){var r=this.enter(),i=this,o=this.exit();return"function"===typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var c,u=n[l],h=r[l],d=u.length,f=s[l]=new Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<i;++l)s[l]=n[l];return new Cn(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,i=e[t],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Lt);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],l=s.length,c=i[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new Cn(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i,o=t[n],a=0,s=o.length;a<s;++a)(i=o[a])&&e.call(i,i.__data__,a,o);return this},attr:function(e,t){var n=Nt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Bt:jt:"function"===typeof t?n.local?Ut:Ht:n.local?zt:Ft)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Gt:"function"===typeof t?qt:Wt)(e,t,null==n?"":n)):Xt(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Yt:"function"===typeof t?Qt:Kt)(e,t)):this.node()[e]},classed:function(e,t){var n=Zt(e+"");if(arguments.length<2){for(var r=Jt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"===typeof t?on:t?nn:rn)(n,t))},text:function(e){return arguments.length?this.each(null==e?an:("function"===typeof e?ln:sn)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?cn:("function"===typeof e?hn:un)(e)):this.node().innerHTML},raise:function(){return this.each(dn)},lower:function(){return this.each(fn)},append:function(e){var t="function"===typeof e?e:gn(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"===typeof e?e:gn(e),r=null==t?vn:"function"===typeof t?t:gt(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(yn)},clone:function(e){return this.select(e?wn:bn)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,i,o=xn(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?En:_n,r=0;r<a;++r)this.each(s(o[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"===typeof t?Mn:Sn)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,i=e[t],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Rn=On,kn=function(e){return"string"===typeof e?new Cn([[document.querySelector(e)]],[document.documentElement]):new Cn([[e]],Tn)},Pn=r(460);const Ln={passive:!1},Dn={capture:!0,passive:!1};function In(e){e.stopImmediatePropagation()}var Nn=function(e){e.preventDefault(),e.stopImmediatePropagation()},jn=function(e){var t=e.document.documentElement,n=kn(e).on("dragstart.drag",Nn,Dn);"onselectstart"in t?n.on("selectstart.drag",Nn,Dn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")};function Bn(e,t){var n=e.document.documentElement,r=kn(e).on("dragstart.drag",null);t&&(r.on("click.drag",Nn,Dn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Fn(e){return((e=Math.exp(e))+1/e)/2}var zn=function e(t,n,r){function i(e,i){var o,a,s=e[0],l=e[1],c=e[2],u=i[0],h=i[1],d=i[2],f=u-s,p=h-l,m=f*f+p*p;if(m<1e-12)a=Math.log(d/c)/t,o=function(e){return[s+e*f,l+e*p,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(m),v=(d*d-c*c+r*m)/(2*c*n*g),y=(d*d-c*c-r*m)/(2*d*n*g),b=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(y*y+1)-y);a=(w-b)/t,o=function(e){var r,i=e*a,o=Fn(b),u=c/(n*g)*(o*(r=t*i+b,((r=Math.exp(2*r))-1)/(r+1))-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[s+u*f,l+u*p,c*o/Fn(t*i+b)]}}return o.duration=1e3*a*t/Math.SQRT2,o}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i}(Math.SQRT2,2,4),Hn=function(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]},Un=r(247),Vn=function(e,t,n){var r=new Un.a;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r},Gn=Object(Pn.a)("start","end","cancel","interrupt"),Wn=[],qn=function(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(l){var c,u,h,d;if(1!==n.state)return s();for(c in i)if((d=i[c]).name===n.name){if(3===d.state)return Vn(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(Vn((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function a(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(e,i);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=Object(Un.c)((function(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}),0,n.time)}(e,n,{name:t,index:r,group:i,on:Gn,tween:Wn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function Xn(e,t){var n=Kn(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function Yn(e,t){var n=Kn(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Kn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}var Qn,Zn=function(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete e.__transition}},Jn=function(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}},$n=180/Math.PI,er={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},tr=function(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*$n,skewX:Math.atan(l)*$n,scaleX:a,scaleY:s}};function nr(e,t,n,r){function i(e){return e.length?e.pop()+" ":""}return function(o,a){var s=[],l=[];return o=e(o),a=e(a),function(e,r,i,o,a,s){if(e!==i||r!==o){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Jn(e,i)},{i:l-2,x:Jn(r,o)})}else(i||o)&&a.push("translate("+i+t+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(e,t,n,o){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Jn(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Jn(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Jn(e,n)},{i:s-2,x:Jn(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var rr=nr((function(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?er:tr(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),ir=nr((function(e){return null==e?er:(Qn||(Qn=document.createElementNS("http://www.w3.org/2000/svg","g")),Qn.setAttribute("transform",e),(e=Qn.transform.baseVal.consolidate())?(e=e.matrix,tr(e.a,e.b,e.c,e.d,e.e,e.f)):er)}),", ",")",")");function or(e,t){var n,r;return function(){var i=Yn(this,e),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}i.tween=r}}function ar(e,t,n){var r,i;if("function"!==typeof n)throw new Error;return function(){var o=Yn(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function sr(e,t,n){var r=e._id;return e.each((function(){var e=Yn(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Kn(e,r).value[t]}}var lr=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function cr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ur(){}var hr="\\s*([+-]?\\d+)\\s*",dr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",fr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pr=/^#([0-9a-f]{3,8})$/,mr=new RegExp("^rgb\\("+[hr,hr,hr]+"\\)$"),gr=new RegExp("^rgb\\("+[fr,fr,fr]+"\\)$"),vr=new RegExp("^rgba\\("+[hr,hr,hr,dr]+"\\)$"),yr=new RegExp("^rgba\\("+[fr,fr,fr,dr]+"\\)$"),br=new RegExp("^hsl\\("+[dr,fr,fr]+"\\)$"),wr=new RegExp("^hsla\\("+[dr,fr,fr,dr]+"\\)$"),xr={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 _r(){return this.rgb().formatHex()}function Er(){return this.rgb().formatRgb()}function Ar(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=pr.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Sr(t):3===n?new Or(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Mr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Mr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=mr.exec(e))?new Or(t[1],t[2],t[3],1):(t=gr.exec(e))?new Or(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vr.exec(e))?Mr(t[1],t[2],t[3],t[4]):(t=yr.exec(e))?Mr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=br.exec(e))?Lr(t[1],t[2]/100,t[3]/100,1):(t=wr.exec(e))?Lr(t[1],t[2]/100,t[3]/100,t[4]):xr.hasOwnProperty(e)?Sr(xr[e]):"transparent"===e?new Or(NaN,NaN,NaN,0):null}function Sr(e){return new Or(e>>16&255,e>>8&255,255&e,1)}function Mr(e,t,n,r){return r<=0&&(e=t=n=NaN),new Or(e,t,n,r)}function Tr(e){return e instanceof ur||(e=Ar(e)),e?new Or((e=e.rgb()).r,e.g,e.b,e.opacity):new Or}function Cr(e,t,n,r){return 1===arguments.length?Tr(e):new Or(e,t,n,null==r?1:r)}function Or(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Rr(){return"#"+Pr(this.r)+Pr(this.g)+Pr(this.b)}function kr(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Pr(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Lr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ir(e,t,n,r)}function Dr(e){if(e instanceof Ir)return new Ir(e.h,e.s,e.l,e.opacity);if(e instanceof ur||(e=Ar(e)),!e)return new Ir;if(e instanceof Ir)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ir(a,s,l,e.opacity)}function Ir(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Nr(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function jr(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}lr(ur,Ar,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:_r,formatHex:_r,formatHsl:function(){return Dr(this).formatHsl()},formatRgb:Er,toString:Er}),lr(Or,Cr,cr(ur,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Or(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Rr,formatHex:Rr,formatRgb:kr,toString:kr})),lr(Ir,(function(e,t,n,r){return 1===arguments.length?Dr(e):new Ir(e,t,n,null==r?1:r)}),cr(ur,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Ir(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ir(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Or(Nr(e>=240?e-240:e+120,i,r),Nr(e,i,r),Nr(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Br=e=>()=>e;function Fr(e,t){return function(n){return e+n*t}}function zr(e){return 1===(e=+e)?Hr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Br(isNaN(t)?n:t)}}function Hr(e,t){var n=t-e;return n?Fr(e,n):Br(isNaN(e)?t:e)}var Ur=function e(t){var n=zr(t);function r(e,t){var r=n((e=Cr(e)).r,(t=Cr(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Hr(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Vr(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Cr(t[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=e(o),a=e(a),s=e(s),r.opacity=1,function(e){return r.r=o(e),r.g=a(e),r.b=s(e),r+""}}}Vr((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=r<t-1?e[r+2]:2*o-i;return jr((n-r/t)*t,a,i,o,s)}})),Vr((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],o=e[r%t],a=e[(r+1)%t],s=e[(r+2)%t];return jr((n-r/t)*t,i,o,a,s)}}));var Gr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wr=new RegExp(Gr.source,"g");var qr=function(e,t){var n,r,i,o=Gr.lastIndex=Wr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Gr.exec(e))&&(r=Wr.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Jn(n,r)})),o=Wr.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})},Xr=function(e,t){var n;return("number"===typeof t?Jn:t instanceof Ar?Ur:(n=Ar(t))?(t=n,Ur):qr)(e,t)};function Yr(e){return function(){this.removeAttribute(e)}}function Kr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttribute(e);return a===o?null:a===r?i:i=t(r=a,n)}}function Zr(e,t,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===r?i:i=t(r=a,n)}}function Jr(e,t,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l));this.removeAttribute(e)}}function $r(e,t,n){var r,i,o;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===i?o:(i=s,o=t(r=a,l));this.removeAttributeNS(e.space,e.local)}}function ei(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ti(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ni(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ti(e,i)),n}return i._value=t,i}function ri(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ei(e,i)),n}return i._value=t,i}function ii(e,t){return function(){Xn(this,e).delay=+t.apply(this,arguments)}}function oi(e,t){return t=+t,function(){Xn(this,e).delay=t}}function ai(e,t){return function(){Yn(this,e).duration=+t.apply(this,arguments)}}function si(e,t){return t=+t,function(){Yn(this,e).duration=t}}function li(e,t){if("function"!==typeof t)throw new Error;return function(){Yn(this,e).ease=t}}function ci(e,t,n){var r,i,o=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?Xn:Yn;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}var ui=Rn.prototype.constructor;function hi(e){return function(){this.style.removeProperty(e)}}function di(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function fi(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&di(e,o,n)),r}return o._value=t,o}function pi(e){return function(t){this.textContent=e.call(this,t)}}function mi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&pi(r)),t}return r._value=e,r}var gi=0;function vi(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function yi(){return++gi}var bi=Rn.prototype;vi.prototype=function(e){return Rn().transition(e)}.prototype={constructor:vi,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=gt(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,l,c=r[a],u=c.length,h=o[a]=new Array(u),d=0;d<u;++d)(s=c[d])&&(l=e.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,qn(h[d],t,n,d,h,Kn(s,n)));return new vi(o,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=bt(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=e.call(l,l.__data__,h,c),p=Kn(l,n),m=0,g=f.length;m<g;++m)(d=f[m])&&qn(d,t,n,m,f,p);o.push(f),a.push(l)}return new vi(o,a,t,n)},selectChild:bi.selectChild,selectChildren:bi.selectChildren,filter:function(e){"function"!==typeof e&&(e=wt(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o,a=t[i],s=a.length,l=r[i]=[],c=0;c<s;++c)(o=a[c])&&e.call(o,o.__data__,c,a)&&l.push(o);return new vi(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l,c=t[s],u=n[s],h=c.length,d=a[s]=new Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;s<r;++s)a[s]=t[s];return new vi(a,this._parents,this._name,this._id)},selection:function(){return new ui(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=yi(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=Kn(a,t);qn(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new vi(r,this._parents,e,n)},call:bi.call,nodes:bi.nodes,node:bi.node,size:bi.size,empty:bi.empty,each:bi.each,on:function(e,t){var n=this._id;return arguments.length<2?Kn(this.node(),n).on.on(e):this.each(ci(n,e,t))},attr:function(e,t){var n=Nt(e),r="transform"===n?ir:Xr;return this.attrTween(e,"function"===typeof t?(n.local?$r:Jr)(n,r,sr(this,"attr."+e,t)):null==t?(n.local?Kr:Yr)(n):(n.local?Zr:Qr)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var r=Nt(e);return this.tween(n,(r.local?ni:ri)(r,t))},style:function(e,t,n){var r="transform"===(e+="")?rr:Xr;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=Xt(this,e),a=(this.style.removeProperty(e),Xt(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,hi(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=Xt(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Xt(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,sr(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=Yn(this,e),c=l.on,u=null==l.value[a]?o||(o=hi(t)):void 0;c===n&&i===u||(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var a=Xt(this,e);return a===o?null:a===r?i:i=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!==typeof t)throw new Error;return this.tween(r,fi(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(sr(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,mi(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=Kn(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===e)return r.value;return null}return this.each((null==t?or:ar)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?ii:oi)(t,e)):Kn(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?ai:si)(t,e)):Kn(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(li(t,e)):Kn(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;Yn(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},l={value:function(){0===--i&&o()}};n.each((function(){var n=Yn(this,r),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===i&&o()}))},[Symbol.iterator]:bi[Symbol.iterator]};var wi={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function xi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Rn.prototype.interrupt=function(e){return this.each((function(){Zn(this,e)}))},Rn.prototype.transition=function(e){var t,n;e instanceof vi?(t=e._id,e=e._name):(t=yi(),(n=wi).time=Object(Un.b)(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],l=s.length,c=0;c<l;++c)(a=s[c])&&qn(a,e,t,c,s,n||xi(a,t));return new vi(r,this._parents,e,t)};var _i=e=>()=>e;function Ei(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ai(e,t,n){this.k=e,this.x=t,this.y=n}Ai.prototype={constructor:Ai,scale:function(e){return 1===e?this:new Ai(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Ai(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Si=new Ai(1,0,0);function Mi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Si;return e.__zoom}function Ti(e){e.stopImmediatePropagation()}Mi.prototype=Ai.prototype;var Ci=function(e){e.preventDefault(),e.stopImmediatePropagation()};function Oi(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function Ri(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function ki(){return this.__zoom||Si}function Pi(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Li(){return navigator.maxTouchPoints||"ontouchstart"in this}function Di(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var Ii=function(){var e,t,n,r=Oi,i=Ri,o=Di,a=Pi,s=Li,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,h=zn,d=Object(Pn.a)("start","zoom","end"),f=0,p=10;function m(e){e.property("__zoom",ki).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",A).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Ai(t,e.x,e.y)}function v(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new Ai(e.k,r,i)}function y(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(e,t,n,r){e.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,o=arguments,a=w(e,o).event(r),s=i.apply(e,o),l=null==n?y(s):"function"===typeof n?n.apply(e,o):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,d="function"===typeof t?t.apply(e,o):t,f=h(u.invert(l).concat(c/u.k),d.invert(l).concat(c/d.k));return function(e){if(1===e)e=d;else{var t=f(e),n=c/t[2];e=new Ai(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function _(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,a.apply(this,arguments)))),u=Hn(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=i.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[u,i.invert(u)],Zn(this),n.start()}Ci(e),n.wheel=setTimeout(h,150),n.zoom("mouse",o(v(g(i,s),n.mouse[0],n.mouse[1]),n.extent,c))}function h(){n.wheel=null,n.end()}}function E(e,...t){if(!n&&r.apply(this,arguments)){var i=e.currentTarget,a=w(this,t,!0).event(e),s=kn(e.view).on("mousemove.zoom",d,!0).on("mouseup.zoom",p,!0),l=Hn(e,i),u=e.clientX,h=e.clientY;jn(e.view),Ti(e),a.mouse=[l,this.__zoom.invert(l)],Zn(this),a.start()}function d(e){if(Ci(e),!a.moved){var t=e.clientX-u,n=e.clientY-h;a.moved=t*t+n*n>f}a.event(e).zoom("mouse",o(v(a.that.__zoom,a.mouse[0]=Hn(e,i),a.mouse[1]),a.extent,c))}function p(e){s.on("mousemove.zoom mouseup.zoom",null),Bn(e.view,a.moved),Ci(e),a.event(e).end()}}function A(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=Hn(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(a),l=n.k*(e.shiftKey?.5:2),h=o(v(g(n,l),a,s),i.apply(this,t),c);Ci(e),u>0?kn(this).transition().duration(u).call(b,h,a,e):kn(this).call(m.transform,h,a,e)}}function S(n,...i){if(r.apply(this,arguments)){var o,a,s,l,c=n.touches,u=c.length,h=w(this,i,n.changedTouches.length===u).event(n);for(Ti(n),a=0;a<u;++a)s=c[a],l=[l=Hn(s,this),this.__zoom.invert(l),s.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,o=!0,h.taps=1+!!e);e&&(e=clearTimeout(e)),o&&(h.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),500)),Zn(this),h.start())}}function M(e,...t){if(this.__zooming){var n,r,i,a,s=w(this,t).event(e),l=e.changedTouches,u=l.length;for(Ci(e),n=0;n<u;++n)r=l[n],i=Hn(r,this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=i:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=i);if(r=s.that.__zoom,s.touch1){var h=s.touch0[0],d=s.touch0[1],f=s.touch1[0],p=s.touch1[1],m=(m=f[0]-h[0])*m+(m=f[1]-h[1])*m,y=(y=p[0]-d[0])*y+(y=p[1]-d[1])*y;r=g(r,Math.sqrt(m/y)),i=[(h[0]+f[0])/2,(h[1]+f[1])/2],a=[(d[0]+p[0])/2,(d[1]+p[1])/2]}else{if(!s.touch0)return;i=s.touch0[0],a=s.touch0[1]}s.zoom("touch",o(v(r,i,a),s.extent,c))}}function T(e,...r){if(this.__zooming){var i,o,a=w(this,r).event(e),s=e.changedTouches,l=s.length;for(Ti(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),i=0;i<l;++i)o=s[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=Hn(o,this),Math.hypot(t[0]-o[0],t[1]-o[1])<p)){var c=kn(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return m.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property("__zoom",ki),e!==i?b(e,t,n,r):i.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"===typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,n,r){m.scaleTo(e,(function(){var e=this.__zoom.k,n="function"===typeof t?t.apply(this,arguments):t;return e*n}),n,r)},m.scaleTo=function(e,t,n,r){m.transform(e,(function(){var e=i.apply(this,arguments),r=this.__zoom,a=null==n?y(e):"function"===typeof n?n.apply(this,arguments):n,s=r.invert(a),l="function"===typeof t?t.apply(this,arguments):t;return o(v(g(r,l),a,s),e,c)}),n,r)},m.translateBy=function(e,t,n,r){m.transform(e,(function(){return o(this.__zoom.translate("function"===typeof t?t.apply(this,arguments):t,"function"===typeof n?n.apply(this,arguments):n),i.apply(this,arguments),c)}),null,r)},m.translateTo=function(e,t,n,r,a){m.transform(e,(function(){var e=i.apply(this,arguments),a=this.__zoom,s=null==r?y(e):"function"===typeof r?r.apply(this,arguments):r;return o(Si.translate(s[0],s[1]).scale(a.k).translate("function"===typeof t?-t.apply(this,arguments):-t,"function"===typeof n?-n.apply(this,arguments):-n),e,c)}),r,a)},x.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=kn(this.that).datum();d.call(e,this.that,new Ei(e,{sourceEvent:this.sourceEvent,target:m,type:e,transform:this.that.__zoom,dispatch:d}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"===typeof e?e:_i(+e),m):a},m.filter=function(e){return arguments.length?(r="function"===typeof e?e:_i(!!e),m):r},m.touchable=function(e){return arguments.length?(s="function"===typeof e?e:_i(!!e),m):s},m.extent=function(e){return arguments.length?(i="function"===typeof e?e:_i([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):i},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(o=e,m):o},m.duration=function(e){return arguments.length?(u=+e,m):u},m.interpolate=function(e){return arguments.length?(h=e,m):h},m.on=function(){var e=d.on.apply(d,arguments);return e===d?m:e},m.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,m):Math.sqrt(f)},m.tapDistance=function(e){return arguments.length?(p=+e,m):p},m},Ni=e=>()=>e;function ji(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function Bi(e){return!e.ctrlKey&&!e.button}function Fi(){return this.parentNode}function zi(e,t){return null==t?{x:e.x,y:e.y}:t}function Hi(){return navigator.maxTouchPoints||"ontouchstart"in this}ji.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Ui=r(458),Vi=r(459),Gi=r(248),Wi=r.n(Gi),qi=r(108),Xi=r.n(qi);function Yi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ki(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qi(e){return function(e){if(Array.isArray(e))return Zi(e)}(e)||function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return Zi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zi(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ji=function(e,t,n){return(e<<16)+(t<<8)+n},$i=function(e,t){return 123*e%Math.pow(2,t)},eo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;Yi(this,e),this.csBits=t,this.registry=["__reserved for background__"]}var t,n,r;return t=e,(n=[{key:"register",value:function(e){if(this.registry.length>=Math.pow(2,24-this.csBits))return null;var t,n=this.registry.length,r=$i(n,this.csBits),i=(t=n+(r<<24-this.csBits),"#".concat(Math.min(t,Math.pow(2,24)).toString(16).padStart(6,"0")));return this.registry.push(e),i}},{key:"lookup",value:function(e){var t="string"===typeof e?function(e){var t=Xi()(e).toRgb(),n=t.r,r=t.g,i=t.b;return Ji(n,r,i)}(e):Ji.apply(void 0,Qi(e));if(!t)return null;var n=t&Math.pow(2,24-this.csBits)-1,r=t>>24-this.csBits&Math.pow(2,this.csBits)-1;return $i(n,this.csBits)!==r||n>=this.registry.length?null:this.registry[n]}}])&&Ki(t.prototype,n),r&&Ki(t,r),e}(),to=r(83),no=r(461),ro=r(467),io=r(462),oo=r(463),ao=r(168),so=r(107),lo=r(470),co=r(472);function uo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uo(Object(n),!0).forEach((function(t){po(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fo(e){return(fo="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})(e)}function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mo(e,t){return(mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function go(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function vo(e,t,n){return(vo=go()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&mo(i,n.prototype),i}).apply(null,arguments)}function yo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||wo(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bo(e){return function(e){if(Array.isArray(e))return xo(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||wo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wo(e,t){if(e){if("string"===typeof e)return xo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xo(e,t):void 0}}function xo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!==typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(".force-graph-container canvas {\n display: block;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.force-graph-container .graph-tooltip {\n position: absolute;\n transform: translate(-50%, 25px);\n font-family: sans-serif;\n font-size: 16px;\n padding: 4px;\n border-radius: 3px;\n color: #eee;\n background: rgba(0,0,0,0.65);\n visibility: hidden; /* by default */\n}\n\n.force-graph-container .clickable {\n cursor: pointer;\n}\n\n.force-graph-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.force-graph-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n");var _o=Object(lo.a)(co.a);function Eo(e,t,n){t&&"string"===typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=_o(t(e))}))}var Ao=function(e,t){return t.onNeedsRedraw&&t.onNeedsRedraw()},So=Object(w.a)({props:{graphData:{default:{nodes:[],links:[]},onChange:function(e,t){t.engineRunning=!1}},dagMode:{onChange:function(e,t){!e&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4,triggerUpdate:!1,onChange:Ao},nodeId:{default:"id"},nodeVal:{default:"val",triggerUpdate:!1,onChange:Ao},nodeColor:{default:"color",triggerUpdate:!1,onChange:Ao},nodeAutoColorBy:{},nodeCanvasObject:{triggerUpdate:!1,onChange:Ao},nodeCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Ao},nodeVisibility:{default:!0,triggerUpdate:!1,onChange:Ao},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0,triggerUpdate:!1,onChange:Ao},linkColor:{default:"color",triggerUpdate:!1,onChange:Ao},linkAutoColorBy:{},linkLineDash:{triggerUpdate:!1,onChange:Ao},linkWidth:{default:1,triggerUpdate:!1,onChange:Ao},linkCurvature:{default:0,triggerUpdate:!1,onChange:Ao},linkCanvasObject:{triggerUpdate:!1,onChange:Ao},linkCanvasObjectMode:{default:function(){return"replace"},triggerUpdate:!1,onChange:Ao},linkDirectionalArrowLength:{default:0,triggerUpdate:!1,onChange:Ao},linkDirectionalArrowColor:{triggerUpdate:!1,onChange:Ao},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1,onChange:Ao},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:4,triggerUpdate:!1},linkDirectionalParticleColor:{triggerUpdate:!1},globalScale:{default:1,triggerUpdate:!1},d3AlphaMin:{default:0,triggerUpdate:!1},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.forceLayout.velocityDecay(e)}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1},onNeedsRedraw:{triggerUpdate:!1},isShadow:{default:!1,triggerUpdate:!1}},methods:{d3Force:function(e,t,n){return void 0===n?e.forceLayout.force(t):(e.forceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.forceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},isEngineRunning:function(e){return!!e.engineRunning},tickFrame:function(e){return!e.isShadow&&e.engineRunning&&(++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin?(e.engineRunning=!1,e.onEngineStop()):(e.forceLayout.tick(),e.onEngineTick())),function(){var t=Object(x.default)(e.linkVisibility),n=Object(x.default)(e.linkColor),r=Object(x.default)(e.linkWidth),i=Object(x.default)(e.linkLineDash),o=Object(x.default)(e.linkCurvature),a=Object(x.default)(e.linkCanvasObjectMode),s=e.ctx,l=2*e.isShadow,c=e.graphData.links.filter(t);c.forEach((function(e){var t=o(e);if(!t)return void(e.__controlPoints=null);var n=e.source,r=e.target;if(!n||!r||!n.hasOwnProperty("x")||!r.hasOwnProperty("x"))return;var i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2));if(i>0){var a=Math.atan2(r.y-n.y,r.x-n.x),s=i*t,l={x:(n.x+r.x)/2+s*Math.cos(a-Math.PI/2),y:(n.y+r.y)/2+s*Math.sin(a-Math.PI/2)};e.__controlPoints=[l.x,l.y]}else{var c=70*t;e.__controlPoints=[r.x,r.y-c,r.x+c,r.y]}}));var u=[],h=[],d=c;if(e.linkCanvasObject){var f=[],p=[];c.forEach((function(e){return({before:u,after:h,replace:f}[a(e)]||p).push(e)})),d=[].concat(bo(u),h,p),u=u.concat(f)}s.save(),u.forEach((function(t){return e.linkCanvasObject(t,s,e.globalScale)})),s.restore();var m=Object(so.a)(d,[n,r,i]);s.save(),Object.entries(m).forEach((function(t){var n=yo(t,2),r=n[0],o=n[1],a=r&&"undefined"!==r?r:"rgba(0,0,0,0.15)";Object.entries(o).forEach((function(t){var n=yo(t,2),r=n[0],o=n[1],c=(r||1)/e.globalScale+l;Object.entries(o).forEach((function(e){var t=yo(e,2);t[0];var n=t[1],r=i(n[0]);s.beginPath(),n.forEach((function(e){var t=e.source,n=e.target;if(t&&n&&t.hasOwnProperty("x")&&n.hasOwnProperty("x")){s.moveTo(t.x,t.y);var r=e.__controlPoints;r?s[2===r.length?"quadraticCurveTo":"bezierCurveTo"].apply(s,bo(r).concat([n.x,n.y])):s.lineTo(n.x,n.y)}})),s.strokeStyle=a,s.lineWidth=c,s.setLineDash(r||[]),s.stroke()}))}))})),s.restore(),s.save(),h.forEach((function(t){return e.linkCanvasObject(t,s,e.globalScale)})),s.restore()}(),!e.isShadow&&function(){var t=Object(x.default)(e.linkDirectionalArrowLength),n=Object(x.default)(e.linkDirectionalArrowRelPos),r=Object(x.default)(e.linkVisibility),i=Object(x.default)(e.linkDirectionalArrowColor||e.linkColor),o=Object(x.default)(e.nodeVal),a=e.ctx;a.save(),e.graphData.links.filter(r).forEach((function(r){var s=t(r);if(s&&!(s<0)){var l=r.source,c=r.target;if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=Math.sqrt(Math.max(0,o(l)||1))*e.nodeRelSize,h=Math.sqrt(Math.max(0,o(c)||1))*e.nodeRelSize,d=Math.min(1,Math.max(0,n(r))),f=i(r)||"rgba(0,0,0,0.28)",p=s/1.6/2,m=r.__controlPoints&&vo(ao.Bezier,[l.x,l.y].concat(bo(r.__controlPoints),[c.x,c.y])),g=m?function(e){return m.get(e)}:function(e){return{x:l.x+(c.x-l.x)*e||0,y:l.y+(c.y-l.y)*e||0}},v=m?m.length():Math.sqrt(Math.pow(c.x-l.x,2)+Math.pow(c.y-l.y,2)),y=u+s+(v-u-h-s)*d,b=g(y/v),w=g((y-s)/v),x=g((y-.8*s)/v),_=Math.atan2(b.y-w.y,b.x-w.x)-Math.PI/2;a.beginPath(),a.moveTo(b.x,b.y),a.lineTo(w.x+p*Math.cos(_),w.y+p*Math.sin(_)),a.lineTo(x.x,x.y),a.lineTo(w.x-p*Math.cos(_),w.y-p*Math.sin(_)),a.fillStyle=f,a.fill()}}})),a.restore()}(),!e.isShadow&&function(){var t=Object(x.default)(e.linkDirectionalParticles),n=Object(x.default)(e.linkDirectionalParticleSpeed),r=Object(x.default)(e.linkDirectionalParticleWidth),i=Object(x.default)(e.linkVisibility),o=Object(x.default)(e.linkDirectionalParticleColor||e.linkColor),a=e.ctx;a.save(),e.graphData.links.filter(i).forEach((function(i){var s=t(i);if(i.hasOwnProperty("__photons")&&i.__photons.length){var l=i.source,c=i.target;if(l&&c&&l.hasOwnProperty("x")&&c.hasOwnProperty("x")){var u=n(i),h=i.__photons||[],d=Math.max(0,r(i)/2)/Math.sqrt(e.globalScale),f=o(i)||"rgba(0,0,0,0.28)";a.fillStyle=f;var p=i.__controlPoints?vo(ao.Bezier,[l.x,l.y].concat(bo(i.__controlPoints),[c.x,c.y])):null,m=0,g=!1;h.forEach((function(e){var t=!!e.__singleHop;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=t?0:m/s),!t&&m++,e.__progressRatio+=u,e.__progressRatio>=1){if(t)return void(g=!0);e.__progressRatio=e.__progressRatio%1}var n=e.__progressRatio,r=p?p.get(n):{x:l.x+(c.x-l.x)*n||0,y:l.y+(c.y-l.y)*n||0};a.beginPath(),a.arc(r.x,r.y,d,0,2*Math.PI,!1),a.fill()})),g&&(i.__photons=i.__photons.filter((function(e){return!e.__singleHop||e.__progressRatio<=1})))}}})),a.restore()}(),function(){var t=Object(x.default)(e.nodeVisibility),n=Object(x.default)(e.nodeVal),r=Object(x.default)(e.nodeColor),i=Object(x.default)(e.nodeCanvasObjectMode),o=e.ctx,a=e.isShadow/e.globalScale,s=e.graphData.nodes.filter(t);o.save(),s.forEach((function(t){var s=i(t);if(!e.nodeCanvasObject||"before"!==s&&"replace"!==s||(e.nodeCanvasObject(t,o,e.globalScale),"replace"!==s)){var l=Math.sqrt(Math.max(0,n(t)||1))*e.nodeRelSize+a;o.beginPath(),o.arc(t.x,t.y,l,0,2*Math.PI,!1),o.fillStyle=r(t)||"rgba(31, 120, 180, 0.92)",o.fill(),e.nodeCanvasObject&&"after"===s&&e.nodeCanvasObject(t,e.ctx,e.globalScale)}else o.restore()})),o.restore()}(),this},emitParticle:function(e,t){return t&&(!t.__photons&&(t.__photons=[]),t.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Object(to.a)().force("link",Object(no.a)()).force("charge",Object(ro.a)()).force("center",Object(io.a)()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.ctx=e},update:function(e){if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&Eo(e.graphData.nodes,Object(x.default)(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&Eo(e.graphData.links,Object(x.default)(e.linkAutoColorBy),e.linkColor),e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]})),!e.isShadow){var t=Object(x.default)(e.linkDirectionalParticles);e.graphData.links.forEach((function(e){var n=Math.round(Math.abs(t(e)));n?e.__photons=bo(Array(n)).map((function(){return{}})):delete e.__photons}))}e.forceLayout.stop().alpha(1).nodes(e.graphData.nodes);var n=e.forceLayout.force("link");n&&n.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var r=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.nodeFilter,a=void 0===o?function(){return!0}:o,s=i.onLoopError,l=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,c={};n.forEach((function(e){return c[t(e)]={data:e,out:[],depth:-1,skip:!a(e)}})),r.forEach((function(e){var n=e.source,r=e.target,i=l(n),o=l(r);if(!c.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!c.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var a=c[i],s=c[o];function l(e){return"object"===fo(e)?t(e):e}a.out.push(s)}));var u=[];d(Object.values(c));var h=Object.assign.apply(Object,[{}].concat(bo(Object.entries(c).filter((function(e){return!yo(e,2)[1].skip})).map((function(e){var t=yo(e,2);return po({},t[0],t[1].depth)})))));return h;function d(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,o=e.length;i<o;i++){var a=e[i];if(-1!==n.indexOf(a)){var s=function(){var e=[].concat(bo(n.slice(n.indexOf(a))),[a]).map((function(e){return t(e.data)}));return u.some((function(t){return t.length===e.length&&t.every((function(t,n){return t===e[n]}))}))||(u.push(e),l(e)),"continue"}();if("continue"===s)continue}r>a.depth&&(a.depth=r,d(a.out,[].concat(bo(n),[a]),r+(a.skip?0:1)))}}}(e.graphData,(function(t){return t[e.nodeId]}),{nodeFilter:e.dagNodeFilter,onLoopError:e.onDagError||void 0}),i=Math.max.apply(Math,bo(Object.values(r||[]))),o=e.dagLevelDistance||e.graphData.nodes.length/(i||1)*2*(-1!==["radialin","radialout"].indexOf(e.dagMode)?.7:1);if(e.dagMode){var a=function(t,n){return function(a){return t?(r[a[e.nodeId]]-i/2)*o*(n?-1:1):void 0}},s=a(-1!==["lr","rl"].indexOf(e.dagMode),"rl"===e.dagMode),l=a(-1!==["td","bu"].indexOf(e.dagMode),"bu"===e.dagMode);e.graphData.nodes.filter(e.dagNodeFilter).forEach((function(e){e.fx=s(e),e.fy=l(e)}))}e.forceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(e.dagMode)?Object(oo.a)((function(t){var n=r[t[e.nodeId]]||-1;return("radialin"===e.dagMode?i-n:n)*o})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null);for(var c=0;c<e.warmupTicks&&!(e.d3AlphaMin>0&&e.forceLayout.alpha()<e.d3AlphaMin);c++)e.forceLayout.tick();this.resetCountdown(),e.onFinishUpdate()}});function Mo(e,t){var n=e instanceof Array?e:[e],r=new t;return{linkProp:function(e){return{default:r[e](),onChange:function(t,r){n.forEach((function(n){return r[n][e](t)}))},triggerUpdate:!1}},linkMethod:function(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=[];return n.forEach((function(n){var r=t[n],o=r[e].apply(r,i);o!==r&&a.push(o)})),a.length?a[0]:this}}}}var To=Mo("forceGraph",So),Co=Mo(["forceGraph","shadowGraph"],So),Oo=Object.assign.apply(Object,bo(["nodeColor","nodeAutoColorBy","nodeCanvasObject","nodeCanvasObjectMode","linkColor","linkAutoColorBy","linkLineDash","linkWidth","linkCanvasObject","linkCanvasObjectMode","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","dagMode","dagLevelDistance","dagNodeFilter","onDagError","d3AlphaMin","d3AlphaDecay","d3VelocityDecay","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].map((function(e){return po({},e,To.linkProp(e))}))).concat(bo(["nodeRelSize","nodeId","nodeVal","nodeVisibility","linkSource","linkTarget","linkVisibility","linkCurvature"].map((function(e){return po({},e,Co.linkProp(e))}))))),Ro=Object.assign.apply(Object,bo(["d3Force","d3ReheatSimulation","emitParticle"].map((function(e){return po({},e,To.linkMethod(e))}))));function ko(e){if(e.canvas){var t=e.canvas.width,n=e.canvas.height;300===t&&150===n&&(t=n=0);var r=window.devicePixelRatio;t/=r,n/=r,[e.canvas,e.shadowCanvas].forEach((function(i){i.style.width="".concat(e.width,"px"),i.style.height="".concat(e.height,"px"),i.width=e.width*r,i.height=e.height*r,t||n||i.getContext("2d").scale(r,r)}));var i=Mi(e.canvas).k;e.zoom.translateBy(e.zoom.__baseElem,(e.width-t)/2/i,(e.height-n)/2/i),e.needsRedraw=!0}}function Po(e){var t=window.devicePixelRatio;e.setTransform(t,0,0,t,0,0)}function Lo(e,t,n){e.save(),Po(e),e.clearRect(0,0,t,n),e.restore()}var Do=Object(w.a)({props:ho({width:{default:window.innerWidth,onChange:function(e,t){return ko(t)},triggerUpdate:!1},height:{default:window.innerHeight,onChange:function(e,t){return ko(t)},triggerUpdate:!1},graphData:{default:{nodes:[],links:[]},onChange:function(e,t){[{type:"Node",objs:e.nodes},{type:"Link",objs:e.links}].forEach((function(e){var n=e.type;e.objs.filter((function(e){if(!e.hasOwnProperty("__indexColor"))return!0;var n=t.colorTracker.lookup(e.__indexColor);return!n||!n.hasOwnProperty("d")||n.d!==e})).forEach((function(e){e.__indexColor=t.colorTracker.register({type:n,d:e})}))})),t.forceGraph.graphData(e),t.shadowGraph.graphData(e)},triggerUpdate:!1},backgroundColor:{onChange:function(e,t){t.canvas&&e&&(t.canvas.style.background=e)},triggerUpdate:!1},nodeLabel:{default:"name",triggerUpdate:!1},nodePointerAreaPaint:{onChange:function(e,t){t.shadowGraph.nodeCanvasObject(e?function(t,n,r){return e(t,t.__indexColor,n,r)}:null)},triggerUpdate:!1},linkPointerAreaPaint:{onChange:function(e,t){t.shadowGraph.linkCanvasObject(e?function(t,n,r){return e(t,t.__indexColor,n,r)}:null)},triggerUpdate:!1},linkLabel:{default:"name",triggerUpdate:!1},linkHoverPrecision:{default:4,triggerUpdate:!1},minZoom:{default:.01,onChange:function(e,t){t.zoom.scaleExtent([e,t.zoom.scaleExtent()[1]])},triggerUpdate:!1},maxZoom:{default:1e3,onChange:function(e,t){t.zoom.scaleExtent([t.zoom.scaleExtent()[0],e])},triggerUpdate:!1},enableNodeDrag:{default:!0,triggerUpdate:!1},enableZoomInteraction:{default:!0,triggerUpdate:!1},enablePanInteraction:{default:!0,triggerUpdate:!1},enableZoomPanInteraction:{default:!0,triggerUpdate:!1},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null},triggerUpdate:!1},autoPauseRedraw:{default:!0,triggerUpdate:!1},onNodeDrag:{default:function(){},triggerUpdate:!1},onNodeDragEnd:{default:function(){},triggerUpdate:!1},onNodeClick:{triggerUpdate:!1},onNodeRightClick:{triggerUpdate:!1},onNodeHover:{triggerUpdate:!1},onLinkClick:{triggerUpdate:!1},onLinkRightClick:{triggerUpdate:!1},onLinkHover:{triggerUpdate:!1},onBackgroundClick:{triggerUpdate:!1},onBackgroundRightClick:{triggerUpdate:!1},onZoom:{default:function(){},triggerUpdate:!1},onZoomEnd:{default:function(){},triggerUpdate:!1},onRenderFramePre:{triggerUpdate:!1},onRenderFramePost:{triggerUpdate:!1}},Oo),aliases:{stopAnimation:"pauseAnimation"},methods:ho({graph2ScreenCoords:function(e,t,n){var r=Mi(e.canvas);return{x:t*r.k+r.x,y:n*r.k+r.y}},screen2GraphCoords:function(e,t,n){var r=Mi(e.canvas);return{x:(t-r.x)/r.k,y:(n-r.y)/r.k}},centerAt:function(e,t,n,r){if(!e.canvas)return null;if(void 0!==t||void 0!==n){var i=Object.assign({},void 0!==t?{x:t}:{},void 0!==n?{y:n}:{});return r?new qe.a.Tween(o()).to(i,r).easing(qe.a.Easing.Quadratic.Out).onUpdate(a).start():a(i),this}return o();function o(){var t=Mi(e.canvas);return{x:(e.width/2-t.x)/t.k,y:(e.height/2-t.y)/t.k}}function a(t){var n=t.x,r=t.y;e.zoom.translateTo(e.zoom.__baseElem,void 0===n?o().x:n,void 0===r?o().y:r),e.needsRedraw=!0}},zoom:function(e,t,n){return e.canvas?void 0!==t?(n?new qe.a.Tween({k:r()}).to({k:t},n).easing(qe.a.Easing.Quadratic.Out).onUpdate((function(e){return i(e.k)})).start():i(t),this):r():null;function r(){return Mi(e.canvas).k}function i(t){e.zoom.scaleTo(e.zoom.__baseElem,t),e.needsRedraw=!0}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];var a=this.getGraphBbox.apply(this,i);if(a){var s={x:(a.x[0]+a.x[1])/2,y:(a.y[0]+a.y[1])/2},l=Math.max(1e-12,Math.min(1e12,(e.width-2*n)/(a.x[1]-a.x[0]),(e.height-2*n)/(a.y[1]-a.y[0])));this.centerAt(s.x,s.y,t),this.zoom(l,t)}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=Object(x.default)(e.nodeVal),r=function(t){return Math.sqrt(Math.max(0,n(t)||1))*e.nodeRelSize},i=e.graphData.nodes.filter(t).map((function(e){return{x:e.x,y:e.y,r:r(e)}}));return i.length?{x:[Object(Ui.a)(i,(function(e){return e.x-e.r})),Object(Vi.a)(i,(function(e){return e.x+e.r}))],y:[Object(Ui.a)(i,(function(e){return e.y-e.r})),Object(Vi.a)(i,(function(e){return e.y+e.r}))]}:null},pauseAnimation:function(e){return e.animationFrameRequestId&&(cancelAnimationFrame(e.animationFrameRequestId),e.animationFrameRequestId=null),this},resumeAnimation:function(e){return e.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},Ro),stateInit:function(){return{lastSetZoom:1,zoom:Ii(),forceGraph:new So,shadowGraph:(new So).cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new eo}},init:function(e,t){e.innerHTML="";var n=document.createElement("div");n.classList.add("force-graph-container"),n.style.position="relative",e.appendChild(n),t.canvas=document.createElement("canvas"),t.backgroundColor&&(t.canvas.style.background=t.backgroundColor),n.appendChild(t.canvas),t.shadowCanvas=document.createElement("canvas");var r=t.canvas.getContext("2d"),i=t.shadowCanvas.getContext("2d"),o={x:-1e12,y:-1e12},a=function(){var e=null,n=window.devicePixelRatio,r=o.x>0&&o.y>0?i.getImageData(o.x*n,o.y*n,1,1):null;return r&&(e=t.colorTracker.lookup(r.data)),e};kn(t.canvas).call(function(){var e,t,n,r,i=Bi,o=Fi,a=zi,s=Hi,l={},c=Object(Pn.a)("start","drag","end"),u=0,h=0;function d(e){e.on("mousedown.drag",f).filter(s).on("touchstart.drag",g).on("touchmove.drag",v,Ln).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,s){if(!r&&i.call(this,a,s)){var l=b(this,o.call(this,a,s),a,s,"mouse");l&&(kn(a.view).on("mousemove.drag",p,Dn).on("mouseup.drag",m,Dn),jn(a.view),In(a),n=!1,e=a.clientX,t=a.clientY,l("start",a))}}function p(r){if(Nn(r),!n){var i=r.clientX-e,o=r.clientY-t;n=i*i+o*o>h}l.mouse("drag",r)}function m(e){kn(e.view).on("mousemove.drag mouseup.drag",null),Bn(e.view,n),Nn(e),l.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,r,a=e.changedTouches,s=o.call(this,e,t),l=a.length;for(n=0;n<l;++n)(r=b(this,s,e,t,a[n].identifier,a[n]))&&(In(e),r("start",e,a[n]))}}function v(e){var t,n,r=e.changedTouches,i=r.length;for(t=0;t<i;++t)(n=l[r[t].identifier])&&(Nn(e),n("drag",e,r[t]))}function y(e){var t,n,i=e.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<o;++t)(n=l[i[t].identifier])&&(In(e),n("end",e,i[t]))}function b(e,t,n,r,i,o){var s,h,f,p=c.copy(),m=Hn(o||n,t);if(null!=(f=a.call(e,new ji("beforestart",{sourceEvent:n,target:d,identifier:i,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:p}),r)))return s=f.x-m[0]||0,h=f.y-m[1]||0,function n(o,a,c){var g,v=m;switch(o){case"start":l[i]=n,g=u++;break;case"end":delete l[i],--u;case"drag":m=Hn(c||a,t),g=u}p.call(o,e,new ji(o,{sourceEvent:a,subject:f,target:d,identifier:i,active:g,x:m[0]+s,y:m[1]+h,dx:m[0]-v[0],dy:m[1]-v[1],dispatch:p}),r)}}return d.filter=function(e){return arguments.length?(i="function"===typeof e?e:Ni(!!e),d):i},d.container=function(e){return arguments.length?(o="function"===typeof e?e:Ni(e),d):o},d.subject=function(e){return arguments.length?(a="function"===typeof e?e:Ni(e),d):a},d.touchable=function(e){return arguments.length?(s="function"===typeof e?e:Ni(!!e),d):s},d.on=function(){var e=c.on.apply(c,arguments);return e===c?d:e},d.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,d):Math.sqrt(h)},d}().subject((function(){if(!t.enableNodeDrag)return null;var e=a();return e&&"Node"===e.type?e.d:null})).on("start",(function(e){var n=e.subject;n.__initialDragPos={x:n.x,y:n.y,fx:n.fx,fy:n.fy},e.active||(n.fx=n.x,n.fy=n.y),t.canvas.classList.add("grabbable")})).on("drag",(function(e){var n=e.subject,r=n.__initialDragPos,i=e,o=Mi(t.canvas).k,a={x:r.x+(i.x-r.x)/o-n.x,y:r.y+(i.y-r.y)/o-n.y};["x","y"].forEach((function(e){return n["f".concat(e)]=n[e]=r[e]+(i[e]-r[e])/o})),t.forceGraph.d3AlphaTarget(.3).resetCountdown(),t.isPointerDragging=!0,n.__dragged=!0,t.onNodeDrag(n,a)})).on("end",(function(e){var n=e.subject,r=n.__initialDragPos,i={x:n.x-r.x,y:n.y-r.y};void 0===r.fx&&(n.fx=void 0),void 0===r.fy&&(n.fy=void 0),delete n.__initialDragPos,t.forceGraph.d3AlphaTarget(0).resetCountdown(),t.canvas.classList.remove("grabbable"),t.isPointerDragging=!1,n.__dragged&&(delete n.__dragged,t.onNodeDragEnd(n,i))}))),t.zoom(t.zoom.__baseElem=kn(t.canvas)),t.zoom.__baseElem.on("dblclick.zoom",null),t.zoom.filter((function(e){return!e.button&&t.enableZoomPanInteraction&&(t.enableZoomInteraction||"wheel"!==e.type)&&(t.enablePanInteraction||"wheel"===e.type)})).on("zoom",(function(e){var n=e.transform;[r,i].forEach((function(e){Po(e),e.translate(n.x,n.y),e.scale(n.k,n.k)})),t.onZoom(ho({},n)),t.needsRedraw=!0})).on("end",(function(e){return t.onZoomEnd(ho({},e.transform))})),ko(t),t.forceGraph.onNeedsRedraw((function(){return t.needsRedraw=!0})).onFinishUpdate((function(){Mi(t.canvas).k===t.lastSetZoom&&t.graphData.nodes.length&&(t.zoom.scaleTo(t.zoom.__baseElem,t.lastSetZoom=4/Math.cbrt(t.graphData.nodes.length)),t.needsRedraw=!0)}));var s=document.createElement("div");s.classList.add("graph-tooltip"),n.appendChild(s),["pointermove","pointerdown"].forEach((function(e){return n.addEventListener(e,(function(r){"pointerdown"===e&&(t.isPointerPressed=!0,t.pointerDownEvent=r),!t.isPointerDragging&&"pointermove"===r.type&&t.onBackgroundClick&&(r.pressure>0||t.isPointerPressed)&&("touch"!==r.pointerType||void 0===r.movementX||[r.movementX,r.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0);var i=function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}(n);o.x=r.pageX-i.left,o.y=r.pageY-i.top,s.style.top="".concat(o.y,"px"),s.style.left="".concat(o.x,"px")}),{passive:!0})})),n.addEventListener("pointerup",(function(e){if(t.isPointerPressed=!1,t.isPointerDragging)t.isPointerDragging=!1;else{var n=[e,t.pointerDownEvent];requestAnimationFrame((function(){if(0===e.button)if(t.hoverObj){var r=t["on".concat(t.hoverObj.type,"Click")];r&&r.apply(void 0,[t.hoverObj.d].concat(n))}else t.onBackgroundClick&&t.onBackgroundClick.apply(t,n);if(2===e.button)if(t.hoverObj){var i=t["on".concat(t.hoverObj.type,"RightClick")];i&&i.apply(void 0,[t.hoverObj.d].concat(n))}else t.onBackgroundRightClick&&t.onBackgroundRightClick.apply(t,n)}))}}),{passive:!0}),n.addEventListener("contextmenu",(function(e){return!(t.onBackgroundRightClick||t.onNodeRightClick||t.onLinkRightClick)||(e.preventDefault(),!1)})),t.forceGraph(r),t.shadowGraph(i);var l=Wi()((function(){Lo(i,t.width,t.height),t.shadowGraph.linkWidth((function(e){return Object(x.default)(t.linkWidth)(e)+t.linkHoverPrecision}));var e=Mi(t.canvas);t.shadowGraph.globalScale(e.k).tickFrame()}),800);(this._animationCycle=function e(){var n=!t.autoPauseRedraw||!!t.needsRedraw||t.forceGraph.isEngineRunning()||t.graphData.links.some((function(e){return e.__photons&&e.__photons.length}));if(t.needsRedraw=!1,t.enablePointerInteraction){var i=t.isPointerDragging?null:a();if(i!==t.hoverObj){var o=t.hoverObj,c=o?o.type:null,u=i?i.type:null;if(c&&c!==u){var h=t["on".concat(c,"Hover")];h&&h(null,o.d)}if(u){var d=t["on".concat(u,"Hover")];d&&d(i.d,c===u?o.d:null)}var f=i&&Object(x.default)(t["".concat(i.type.toLowerCase(),"Label")])(i.d)||"";s.style.visibility=f?"visible":"hidden",s.innerHTML=f,t.canvas.classList[i&&t["on".concat(u,"Click")]||!i&&t.onBackgroundClick?"add":"remove"]("clickable"),t.hoverObj=i}n&&l()}if(n){Lo(r,t.width,t.height);var p=Mi(t.canvas).k;t.onRenderFramePre&&t.onRenderFramePre(r,p),t.forceGraph.globalScale(p).tickFrame(),t.onRenderFramePost&&t.onRenderFramePost(r,p)}qe.a.update(),t.animationFrameRequestId=requestAnimationFrame(e)})()},update:function(e){}}),Io={width:k.a.number,height:k.a.number,graphData:k.a.shape({nodes:k.a.arrayOf(k.a.object).isRequired,links:k.a.arrayOf(k.a.object).isRequired}),backgroundColor:k.a.string,nodeRelSize:k.a.number,nodeId:k.a.string,nodeLabel:k.a.oneOfType([k.a.string,k.a.func]),nodeVal:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),nodeVisibility:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),nodeColor:k.a.oneOfType([k.a.string,k.a.func]),nodeAutoColorBy:k.a.oneOfType([k.a.string,k.a.func]),onNodeHover:k.a.func,onNodeClick:k.a.func,linkSource:k.a.string,linkTarget:k.a.string,linkLabel:k.a.oneOfType([k.a.string,k.a.func]),linkVisibility:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkColor:k.a.oneOfType([k.a.string,k.a.func]),linkAutoColorBy:k.a.oneOfType([k.a.string,k.a.func]),linkWidth:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkCurvature:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalArrowLength:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalArrowColor:k.a.oneOfType([k.a.string,k.a.func]),linkDirectionalArrowRelPos:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticles:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleSpeed:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleWidth:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkDirectionalParticleColor:k.a.oneOfType([k.a.string,k.a.func]),onLinkHover:k.a.func,onLinkClick:k.a.func,dagMode:k.a.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:k.a.number,dagNodeFilter:k.a.func,onDagError:k.a.func,d3AlphaMin:k.a.number,d3AlphaDecay:k.a.number,d3VelocityDecay:k.a.number,warmupTicks:k.a.number,cooldownTicks:k.a.number,cooldownTime:k.a.number,onEngineTick:k.a.func,onEngineStop:k.a.func,getGraphBbox:k.a.func},No={zoomToFit:k.a.func,onNodeRightClick:k.a.func,onNodeDrag:k.a.func,onNodeDragEnd:k.a.func,onLinkRightClick:k.a.func,linkHoverPrecision:k.a.number,onBackgroundClick:k.a.func,onBackgroundRightClick:k.a.func,enablePointerInteraction:k.a.bool,enableNodeDrag:k.a.bool},jo={showNavInfo:k.a.bool,nodeOpacity:k.a.number,nodeResolution:k.a.number,nodeThreeObject:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),nodeThreeObjectExtend:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkOpacity:k.a.number,linkResolution:k.a.number,linkCurveRotation:k.a.oneOfType([k.a.number,k.a.string,k.a.func]),linkMaterial:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),linkThreeObject:k.a.oneOfType([k.a.object,k.a.string,k.a.func]),linkThreeObjectExtend:k.a.oneOfType([k.a.bool,k.a.string,k.a.func]),linkPositionUpdate:k.a.func,linkDirectionalArrowResolution:k.a.number,linkDirectionalParticleResolution:k.a.number,forceEngine:k.a.oneOf(["d3","ngraph"]),ngraphPhysics:k.a.object,numDimensions:k.a.oneOf([1,2,3])},Bo=Object.assign({},Io,No,{linkLineDash:k.a.oneOfType([k.a.arrayOf(k.a.number),k.a.string,k.a.func]),nodeCanvasObjectMode:k.a.oneOfType([k.a.string,k.a.func]),nodeCanvasObject:k.a.func,nodePointerAreaPaint:k.a.func,linkCanvasObjectMode:k.a.oneOfType([k.a.string,k.a.func]),linkCanvasObject:k.a.func,linkPointerAreaPaint:k.a.func,autoPauseRedraw:k.a.bool,minZoom:k.a.number,maxZoom:k.a.number,enableZoomInteraction:k.a.bool,enablePanInteraction:k.a.bool,onZoom:k.a.func,onZoomEnd:k.a.func,onRenderFramePre:k.a.func,onRenderFramePost:k.a.func}),Fo=Object.assign({},Io,No,jo,{enableNavigationControls:k.a.bool,controlType:k.a.oneOf(["trackball","orbit","fly"]),rendererConfig:k.a.object,extraRenderers:k.a.arrayOf(k.a.shape({render:k.a.func.isRequired}))}),zo=Object.assign({},Io,jo,{nodeDesc:k.a.oneOfType([k.a.string,k.a.func]),linkDesc:k.a.oneOfType([k.a.string,k.a.func])}),Ho=Object.assign({},Io,jo,{markerAttrs:k.a.object,yOffset:k.a.number,glScale:k.a.number});const Uo=b(O,{methodNames:["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"]});Uo.displayName="ForceGraphVR",Uo.propTypes=zo;const Vo=b(F,{methodNames:["getGraphBbox","emitParticle","d3Force","d3ReheatSimulation","refresh"],initPropNames:["markerAttrs"]});Vo.displayName="ForceGraphAR",Vo.propTypes=Ho;const Go=b(pt,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","cameraPosition","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords","postProcessingComposer","scene","camera","renderer","controls","refresh"],initPropNames:["controlType","rendererConfig","extraRenderers"]});Go.displayName="ForceGraph3D",Go.propTypes=Fo;const Wo=b(Do,{methodNames:["emitParticle","d3Force","d3ReheatSimulation","stopAnimation","pauseAnimation","resumeAnimation","centerAt","zoom","zoomToFit","getGraphBbox","screen2GraphCoords","graph2ScreenCoords"]});Wo.displayName="ForceGraph2D",Wo.propTypes=Bo},function(t,n,r){"use strict";r.d(n,"a",(function(){return gt}));var i={};r.r(i),r.d(i,"bounce",(function(){return te})),r.d(i,"flash",(function(){return ne})),r.d(i,"jello",(function(){return re})),r.d(i,"pulse",(function(){return ie})),r.d(i,"rotate",(function(){return oe})),r.d(i,"shake",(function(){return ae})),r.d(i,"swing",(function(){return se})),r.d(i,"rubberBand",(function(){return le})),r.d(i,"tada",(function(){return ce})),r.d(i,"wobble",(function(){return ue})),r.d(i,"bounceIn",(function(){return he})),r.d(i,"bounceInUp",(function(){return de})),r.d(i,"bounceInDown",(function(){return fe})),r.d(i,"bounceInRight",(function(){return pe})),r.d(i,"bounceInLeft",(function(){return me})),r.d(i,"bounceOut",(function(){return ge})),r.d(i,"bounceOutUp",(function(){return ve})),r.d(i,"bounceOutDown",(function(){return ye})),r.d(i,"bounceOutRight",(function(){return be})),r.d(i,"bounceOutLeft",(function(){return we})),r.d(i,"fadeIn",(function(){return _e})),r.d(i,"fadeInDown",(function(){return Ee})),r.d(i,"fadeInUp",(function(){return Ae})),r.d(i,"fadeInLeft",(function(){return Se})),r.d(i,"fadeInRight",(function(){return Me})),r.d(i,"fadeInDownBig",(function(){return Te})),r.d(i,"fadeInUpBig",(function(){return Ce})),r.d(i,"fadeInLeftBig",(function(){return Oe})),r.d(i,"fadeInRightBig",(function(){return Re})),r.d(i,"fadeOut",(function(){return Pe})),r.d(i,"fadeOutDown",(function(){return Le})),r.d(i,"fadeOutUp",(function(){return De})),r.d(i,"fadeOutLeft",(function(){return Ie})),r.d(i,"fadeOutRight",(function(){return Ne})),r.d(i,"fadeOutDownBig",(function(){return je})),r.d(i,"fadeOutUpBig",(function(){return Be})),r.d(i,"fadeOutLeftBig",(function(){return Fe})),r.d(i,"fadeOutRightBig",(function(){return ze})),r.d(i,"flipInX",(function(){return He})),r.d(i,"flipInY",(function(){return Ue})),r.d(i,"flipOutX",(function(){return Ve})),r.d(i,"flipOutY",(function(){return Ge})),r.d(i,"lightSpeedIn",(function(){return We})),r.d(i,"lightSpeedOut",(function(){return qe})),r.d(i,"slideInDown",(function(){return Ye})),r.d(i,"slideInUp",(function(){return Ke})),r.d(i,"slideInLeft",(function(){return Qe})),r.d(i,"slideInRight",(function(){return Ze})),r.d(i,"slideOutDown",(function(){return $e})),r.d(i,"slideOutUp",(function(){return et})),r.d(i,"slideOutLeft",(function(){return tt})),r.d(i,"slideOutRight",(function(){return nt})),r.d(i,"zoomIn",(function(){return it})),r.d(i,"zoomInDown",(function(){return ot})),r.d(i,"zoomInUp",(function(){return at})),r.d(i,"zoomInLeft",(function(){return st})),r.d(i,"zoomInRight",(function(){return lt})),r.d(i,"zoomOut",(function(){return ht})),r.d(i,"zoomOutDown",(function(){return dt})),r.d(i,"zoomOutUp",(function(){return ft})),r.d(i,"zoomOutLeft",(function(){return pt})),r.d(i,"zoomOutRight",(function(){return mt}));var o=r(2),a=r(54),s=r(37),l=r(6),c=r.n(l),u=r(20),h=r.n(u),d=r(23),f=r.n(d),p=r(16),m=r.n(p),g=r(24),v=r.n(g),y=r(25),b=r.n(y),w=r(18),x=r.n(w),_=r(19),E=r.n(_),A=r(0),S=r.n(A),M=r(1),T=r.n(M),C=r(12),O=r(14),R=["perspective","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","skewX","skewY","translateX","translateY"];function k(e){var t={};return Object.keys(e).forEach((function(n){-1!==R.indexOf(n)?(t.transform||(t.transform=[]),t.transform.push(c()({},n,e[n]))):t[n]=e[n]})),t}var P=r(5);function L(e){var t=E()({},P.a.flatten(e));return t.transform&&(t.transform.forEach((function(e){var n=Object.keys(e)[0];t[n]=e[n]})),delete t.transform),t}var D={Top:["Vertical",""],Bottom:["Vertical",""],Vertical:[""],Left:["Horizontal",""],Right:["Horizontal",""],Horizontal:[""]},I=Object.keys(D);function N(e,t){var n={},r=L(t);return("string"===typeof e?[e]:e).forEach((function(e){n[e]=e in r?r[e]:function(e,t){if("backgroundColor"===e)return"rgba(0,0,0,0)";if("color"===e||-1!==e.indexOf("Color"))return"rgba(0,0,0,1)";if(0===e.indexOf("rotate")||0===e.indexOf("skew"))return"0deg";if("opacity"===e||0===e.indexOf("scale"))return 1;if("fontSize"===e)return 14;if(0===e.indexOf("margin")||0===e.indexOf("padding"))for(var n,r=0;r<I.length;r++)if(n=I[r],e.substr(-n.length)===n){for(var i,o=e.substr(0,e.length-n.length),a=D[n],s=0;s<a.length;s++)if((i=o+a[s])in t)return t[i];break}return 0}(e,r)})),n}function j(e,t){return e-t}function B(e){return null!==e}function F(e){if("from"===e)return 0;if("to"===e)return 1;var t=parseFloat(e,10);return Number.isNaN(t)||t<0||t>1?null:t}var z={};function H(e){var t=JSON.stringify(e);if(z[t])return z[t];var n=Object.keys(e).map(F).filter(B);if(n.sort(j),n.length<2)throw new Error("Animation definitions must have at least two values.");var r={};e.easing&&(r.easing=e.easing),e.style&&(r.style=e.style);for(var i=function(t){var i=n[t],o=e[i];if(o||(0===i?o=e.from:1===i&&(o=e.to)),!o)throw new Error("Missing animation keyframe, this should not happen");o=L(o),Object.keys(o).forEach((function(e){e in r||(r[e]={inputRange:[],outputRange:[]}),r[e].inputRange.push(i),r[e].outputRange.push(o[e])}))},o=0;o<n.length;o+=1)i(o);return z[t]=r,r}var U={};var V={linear:O.a.linear,ease:O.a.bezier(.25,.1,.25,1),"ease-in":O.a.bezier(.42,0,1,1),"ease-out":O.a.bezier(0,0,.58,1),"ease-in-out":O.a.bezier(.42,0,.58,1),"ease-in-cubic":O.a.bezier(.55,.055,.675,.19),"ease-out-cubic":O.a.bezier(.215,.61,.355,1),"ease-in-out-cubic":O.a.bezier(.645,.045,.355,1),"ease-in-circ":O.a.bezier(.6,.04,.98,.335),"ease-out-circ":O.a.bezier(.075,.82,.165,1),"ease-in-out-circ":O.a.bezier(.785,.135,.15,.86),"ease-in-expo":O.a.bezier(.95,.05,.795,.035),"ease-out-expo":O.a.bezier(.19,1,.22,1),"ease-in-out-expo":O.a.bezier(1,0,0,1),"ease-in-quad":O.a.bezier(.55,.085,.68,.53),"ease-out-quad":O.a.bezier(.25,.46,.45,.94),"ease-in-out-quad":O.a.bezier(.455,.03,.515,.955),"ease-in-quart":O.a.bezier(.895,.03,.685,.22),"ease-out-quart":O.a.bezier(.165,.84,.44,1),"ease-in-out-quart":O.a.bezier(.77,0,.175,1),"ease-in-quint":O.a.bezier(.755,.05,.855,.06),"ease-out-quint":O.a.bezier(.23,1,.32,1),"ease-in-out-quint":O.a.bezier(.86,0,.07,1),"ease-in-sine":O.a.bezier(.47,0,.745,.715),"ease-out-sine":O.a.bezier(.39,.575,.565,1),"ease-in-out-sine":O.a.bezier(.445,.05,.55,.95),"ease-in-back":O.a.bezier(.6,-.28,.735,.045),"ease-out-back":O.a.bezier(.175,.885,.32,1.275),"ease-in-out-back":O.a.bezier(.68,-.55,.265,1.55)};function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=x()(t);if(n){var i=x()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return b()(this,e)}}var X=["rotate","rotateX","rotateY","rotateZ","skewX","skewY","transformMatrix","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","shadowColor","color","textDecorationColor","tintColor"],Y=["width","height"];function K(e,t){switch(t){case"reverse":return 0;case"alternate":return e%2?0:1;case"alternate-reverse":return e%2?1:0;case"normal":default:return 1}}function Q(e,t){return K(e,t)?0:1}function Z(e){if("string"===typeof e){var t=U[e];if(!t)throw new Error("No animation registred by the name of "+e);return t}return H(e)}function J(e,t){var n={};return Object.keys(e).forEach((function(r){"style"===r?E()(n,e.style):"easing"!==r&&(n[r]=t.interpolate(e[r]))})),k(n)}function $(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,c=r||i||a?C.a.timing(t,{toValue:n,delay:a,duration:r||1e3,easing:"function"===typeof i?i:V[i||"ease"],useNativeDriver:o}):C.a.spring(t,{toValue:n,useNativeDriver:o});setTimeout((function(){return s(e)}),a),c.start((function(){return l(e)}))}function ee(e){var t,n,r=e.displayName||e.name||"Component",i=C.a.createAnimatedComponent(e);return n=t=function(e){v()(n,e);var t=q(n);function n(e){var r;h()(this,n),(r=t.call(this,e)).ref=null,r.handleRef=function(e){r.ref=e};var i=new C.a.Value(Q(0,r.props.direction)),o={},a={};return e.animation&&(o=J(a=Z(e.animation),i)),r.state={animationValue:i,animationStyle:o,compiledAnimation:a,transitionStyle:{},transitionValues:{},currentTransitionValues:{}},e.transition&&(r.state=W(W({},r.state),r.initializeTransitionState(e.transition))),r.delayTimer=null,Object.keys(U).forEach((function(e){e in m()(r)||(r[e]=r.animate.bind(m()(r),e))})),r}return f()(n,[{key:"initializeTransitionState",value:function(e){var t={},n={},r=N(e,this.props.style);return Object.keys(r).forEach((function(e){var i=r[e];if(-1!==X.indexOf(e)||"number"!==typeof i)t[e]=new C.a.Value(0),n[e]=i;else{var o=new C.a.Value(i);t[e]=o,n[e]=o}})),{currentTransitionValues:r,transitionStyle:n,transitionValues:t}}},{key:"getTransitionState",value:function(e){var t=this,n="string"===typeof e?[e]:e,r=this.state,i=r.transitionValues,o=r.currentTransitionValues,a=r.transitionStyle,s=n.filter((function(e){return!t.state.transitionValues[e]}));if(s.length){var l=this.initializeTransitionState(s);i=W(W({},i),l.transitionValues),o=W(W({},o),l.currentTransitionValues),a=W(W({},a),l.transitionStyle)}return{transitionValues:i,currentTransitionValues:o,transitionStyle:a}}},{key:"setNativeProps",value:function(e){this.ref&&this.ref.setNativeProps(e)}},{key:"componentDidMount",value:function(){var e=this,t=this.props,n=t.animation,r=t.duration,i=t.delay,o=t.onAnimationBegin,a=t.iterationDelay;if(n){var s=function(){o(),e.startAnimation(r,0,a,(function(t){return e.props.onAnimationEnd(t)})),e.delayTimer=null};i?this.delayTimer=setTimeout(s,i):s()}}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t,n,r=this,i=e.animation,o=e.delay,a=e.duration,s=e.easing,l=e.iterationDelay,c=e.transition,u=e.onAnimationBegin;if(c){var h=N(c,e.style);this.transitionTo(h,a,s,o)}else t=i,n=this.props.animation,t!==n&&JSON.stringify(t)!==JSON.stringify(n)&&(i?this.delayTimer?this.setAnimation(i):(u(),this.animate(i,a,l).then((function(e){return r.props.onAnimationEnd(e)}))):this.stopAnimation())}},{key:"componentWillUnmount",value:function(){this.delayTimer&&clearTimeout(this.delayTimer)}},{key:"setAnimation",value:function(e,t){var n=Z(e);this.setState((function(e){return{animationStyle:J(n,e.animationValue),compiledAnimation:n}}),t)}},{key:"animate",value:function(e,t,n){var r=this;return new Promise((function(i){r.setAnimation(e,(function(){r.startAnimation(t,0,n,i)}))}))}},{key:"stopAnimation",value:function(){this.setState({scheduledAnimation:!1,animationStyle:{}}),this.state.animationValue.stopAnimation(),this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"startAnimation",value:function(e,t,n,r){var i=this,o=this.state,a=o.animationValue,s=o.compiledAnimation,l=this.props,c=l.direction,u=l.iterationCount,h=l.useNativeDriver,d=this.props.easing||s.easing||"ease",f=t||0,p=Q(f,c),m=K(f,c);a.setValue(p),"string"===typeof d&&(d=V[d]),("reverse"===c||"alternate"===c&&!m||"alternate-reverse"===c&&!m)&&(d=O.a.out(d));var g={toValue:m,easing:d,isInteraction:u<=1,duration:e||this.props.duration||1e3,useNativeDriver:h,delay:n||0};C.a.timing(a,g).start((function(t){f+=1,t.finished&&i.props.animation&&("infinite"===u||f<u)?i.startAnimation(e,f,n,r):r&&r(t)}))}},{key:"transition",value:function(e,t,n,r){var i=this,o=L(e),a=L(t),s=Object.keys(a),l=this.getTransitionState(s),c=l.transitionValues,u=l.currentTransitionValues,h=l.transitionStyle;s.forEach((function(e){var t=o[e],n=a[e],r=c[e];r||(r=new C.a.Value(0));var i=-1!==X.indexOf(e)||"number"!==typeof value,s=-1!==Y.indexOf(e);i?(r.setValue(0),h[e]=r.interpolate({inputRange:[0,1],outputRange:[t,n]}),u[e]=n,a[e]=1):(s?(h[e]=r.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolateLeft:"clamp"}),u[e]=n):h[e]=r,r.setValue(t))})),this.setState({transitionValues:c,transitionStyle:h,currentTransitionValues:u},(function(){i.transitionToValues(a,n||i.props.duration,r,i.props.delay)}))}},{key:"transitionTo",value:function(e,t,n,r){var i=this,o=this.state.currentTransitionValues,a=L(e),s={from:{},to:{}};Object.keys(a).forEach((function(e){var l=a[e],c=-1!==X.indexOf(e)||"number"!==typeof value,u=-1!==Y.indexOf(e),h=i.state.transitionStyle[e],d=i.state.transitionValues[e];if(c||u||!h||h!==d){var f=o[e];if("undefined"===typeof f&&i.props.style)f=N(e,i.props.style)[e];s.from[e]=f,s.to[e]=l}else $(e,d,l,t,n,i.props.useNativeDriver,r,(function(e){return i.props.onTransitionBegin(e)}),(function(e){return i.props.onTransitionEnd(e)}))})),Object.keys(s.from).length&&this.transition(s.from,s.to,t,n)}},{key:"transitionToValues",value:function(e,t,n,r){var i=this;Object.keys(e).forEach((function(o){$(o,i.state.transitionValues[o],e[o],t,n,i.props.useNativeDriver,r,(function(e){return i.props.onTransitionBegin(e)}),(function(e){return i.props.onTransitionEnd(e)}))}))}},{key:"render",value:function(){var e=this.props,t=e.style,n=e.animation,r=e.transition;if(n&&r)throw new Error("You cannot combine animation and transition props");var o=function(e,t){var n={};return Object.keys(t).forEach((function(r){-1===e.indexOf(r)&&(n[r]=t[r])})),n}(["animation","duration","direction","delay","easing","iterationCount","iterationDelay","onAnimationBegin","onAnimationEnd","onTransitionBegin","onTransitionEnd","style","transition","useNativeDriver"],this.props);return S.a.createElement(i,E()({ref:this.handleRef,style:[t,this.state.animationStyle,k(this.state.transitionStyle)]},o))}}]),n}(A.Component),t.displayName="withAnimatable("+r+")",t.propTypes={animation:T.a.oneOfType([T.a.string,T.a.object]),duration:T.a.number,direction:T.a.oneOf(["normal","reverse","alternate","alternate-reverse"]),delay:T.a.number,easing:T.a.oneOfType([T.a.oneOf(Object.keys(V)),T.a.func]),iterationCount:function(e,t){var n=e[t];return"infinite"===n||"number"===typeof n&&n>=1?null:new Error('iterationCount must be a positive number or "infinite"')},iterationDelay:T.a.number,onAnimationBegin:T.a.func,onAnimationEnd:T.a.func,onTransitionBegin:T.a.func,onTransitionEnd:T.a.func,style:T.a.oneOfType([T.a.number,T.a.array,T.a.object]),transition:T.a.oneOfType([T.a.string,T.a.arrayOf(T.a.string)]),useNativeDriver:T.a.bool},t.defaultProps={animation:void 0,delay:0,direction:"normal",duration:void 0,easing:void 0,iterationCount:1,iterationDelay:0,onAnimationBegin:function(){},onAnimationEnd:function(){},onTransitionBegin:function(){},onTransitionEnd:function(){},style:void 0,transition:void 0,useNativeDriver:!1},n}var te={0:{translateY:0},.2:{translateY:0},.4:{translateY:-30},.43:{translateY:-30},.53:{translateY:0},.7:{translateY:-15},.8:{translateY:0},.9:{translateY:-4},1:{translateY:0}},ne={0:{opacity:1},.25:{opacity:0},.5:{opacity:1},.75:{opacity:0},1:{opacity:1}},re={0:{skewX:"0deg",skewY:"0deg"},.111:{skewX:"0deg",skewY:"0deg"},.222:{skewX:"-12.5deg",skewY:"-12.5deg"},.333:{skewX:"6.25deg",skewY:"6.25deg"},.444:{skewX:"-3.125deg",skewY:"-3.125deg"},.555:{skewX:"1.5625deg",skewY:"1.5625deg"},.666:{skewX:"-0.78125deg",skewY:"-0.78125deg"},.777:{skewX:"0.390625deg",skewY:"0.390625deg"},.888:{skewX:"-0.1953125deg",skewY:"-0.1953125deg"},1:{skewX:"0deg",skewY:"0deg"}},ie={0:{scale:1},.5:{scale:1.05},1:{scale:1}},oe={0:{rotate:"0deg"},.25:{rotate:"90deg"},.5:{rotate:"180deg"},.75:{rotate:"270deg"},1:{rotate:"360deg"}},ae={0:{translateX:0},.1:{translateX:-10},.2:{translateX:10},.3:{translateX:-10},.4:{translateX:10},.5:{translateX:-10},.6:{translateX:10},.7:{translateX:-10},.8:{translateX:10},.9:{translateX:-10},1:{translateX:0}},se={0:{rotate:"0deg"},.2:{rotate:"15deg"},.4:{rotate:"-10deg"},.6:{rotate:"5deg"},.8:{rotate:"-5deg"},1:{rotate:"0deg"}},le={0:{scaleX:1,scaleY:1},.3:{scaleX:1.25,scaleY:.75},.4:{scaleX:.75,scaleY:1.25},.5:{scaleX:1.15,scaleY:.85},.65:{scaleX:.95,scaleY:1.05},.75:{scaleX:1.05,scaleY:.95},1:{scaleX:1,scaleY:1}},ce={0:{scale:1,rotate:"0deg"},.1:{scale:.9,rotate:"-3deg"},.2:{scale:.9,rotate:"-3deg"},.3:{scale:1.1,rotate:"-3deg"},.4:{rotate:"3deg"},.5:{rotate:"-3deg"},.6:{rotate:"3deg"},.7:{rotate:"-3deg"},.8:{rotate:"3deg"},.9:{scale:1.1,rotate:"3deg"},1:{scale:1,rotate:"0deg"}},ue={0:{translateX:0,rotate:"0deg"},.15:{translateX:-25,rotate:"-5deg"},.3:{translateX:20,rotate:"3deg"},.45:{translateX:-15,rotate:"-3deg"},.6:{translateX:10,rotate:"2deg"},.75:{translateX:-5,rotate:"-1deg"},1:{translateX:0,rotate:"0deg"}},he={0:{opacity:0,scale:.3},.2:{scale:1.1},.4:{scale:.9},.6:{opacity:1,scale:1.03},.8:{scale:.97},1:{opacity:1,scale:1}},de={0:{opacity:0,translateY:800},.6:{opacity:1,translateY:-25},.75:{translateY:10},.9:{translateY:-5},1:{translateY:0}},fe={0:{opacity:0,translateY:-800},.6:{opacity:1,translateY:25},.75:{translateY:-10},.9:{translateY:5},1:{translateY:0}},pe={0:{opacity:0,translateX:600},.6:{opacity:1,translateX:-20},.75:{translateX:8},.9:{translateX:-4},1:{translateX:0}},me={0:{opacity:0,translateX:-600},.6:{opacity:1,translateX:20},.75:{translateX:-8},.9:{translateX:4},1:{translateX:0}},ge={0:{opacity:1,scale:1},.2:{scale:.9},.5:{opacity:1,scale:1.11},.55:{scale:1.11},1:{opacity:0,scale:.3}},ve={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:-10},.4:{translateY:20},.45:{translateY:20},.55:{opacity:1},1:{opacity:0,translateY:-800}},ye={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:10},.4:{translateY:-20},.45:{translateY:-20},.55:{opacity:1},1:{opacity:0,translateY:800}},be={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:10},.4:{translateX:-20},.45:{translateX:-20},.55:{opacity:1},1:{opacity:0,translateX:600}},we={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:-10},.4:{translateX:20},.45:{translateX:20},.55:{opacity:1},1:{opacity:0,translateX:-600}};function xe(e,t){return{from:c()({opacity:0},e,t),to:c()({opacity:1},e,0)}}var _e={from:{opacity:0},to:{opacity:1}},Ee=xe("translateY",-100),Ae=xe("translateY",100),Se=xe("translateX",-100),Me=xe("translateX",100),Te=xe("translateY",-500),Ce=xe("translateY",500),Oe=xe("translateX",-500),Re=xe("translateX",500);function ke(e,t){return{from:c()({opacity:1},e,0),to:c()({opacity:0},e,t)}}var Pe={from:{opacity:1},to:{opacity:0}},Le=ke("translateY",100),De=ke("translateY",-100),Ie=ke("translateX",-100),Ne=ke("translateX",100),je=ke("translateY",500),Be=ke("translateY",-500),Fe=ke("translateX",-500),ze=ke("translateX",500),He={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateX:"90deg"},.4:{rotateX:"-20deg"},.6:{opacity:1,rotateX:"10deg"},.8:{rotateX:"-5deg"},1:{opacity:1,rotateX:"0deg"}},Ue={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateY:"90deg"},.4:{rotateY:"-20deg"},.6:{opacity:1,rotateY:"10deg"},.8:{rotateY:"-5deg"},1:{opacity:1,rotateY:"0deg"}},Ve={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateX:"0deg"},.3:{opacity:1,rotateX:"-20deg"},1:{opacity:0,rotateX:"90deg"}},Ge={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateY:"0deg"},.3:{opacity:1,rotateY:"-20deg"},1:{opacity:0,rotateY:"90deg"}},We={easing:"ease-out",0:{opacity:0,translateX:200,skewX:"-30deg"},.6:{opacity:1,translateX:0,skewX:"20deg"},.8:{skewX:"-5deg"},1:{opacity:1,translateX:0,skewX:"0deg"}},qe={easing:"ease-in",0:{opacity:1,translateX:0,skewX:"0deg"},1:{opacity:0,translateX:200,skewX:"30deg"}};function Xe(e,t){return{from:c()({},e,t),to:c()({},e,0)}}var Ye=Xe("translateY",-100),Ke=Xe("translateY",100),Qe=Xe("translateX",-100),Ze=Xe("translateX",100);function Je(e,t){return{from:c()({},e,0),to:c()({},e,t)}}var $e=Je("translateY",100),et=Je("translateY",-100),tt=Je("translateX",-100),nt=Je("translateX",100);function rt(e,t){var n=Math.min(1,Math.max(-1,t));return{easing:O.a.bezier(.175,.885,.32,1),0:c()({opacity:0,scale:.1},e,-1e3*n),.6:c()({opacity:1,scale:.457},e,t),1:c()({scale:1},e,0)}}var it={from:{opacity:0,scale:.3},.5:{opacity:1},to:{opacity:1,scale:1}},ot=rt("translateY",60),at=rt("translateY",-60),st=rt("translateX",10),lt=rt("translateX",-10);function ct(e,t){var n=Math.min(1,Math.max(-1,t));return{easing:O.a.bezier(.175,.885,.32,1),0:c()({opacity:1,scale:1},e,0),.4:c()({opacity:1,scale:.457},e,t),1:c()({opacity:0,scale:.1},e,-1e3*n)}}var ut,ht={from:{opacity:1,scale:1},.5:{opacity:1,scale:.3},to:{opacity:0,scale:0}},dt=ct("translateY",60),ft=ct("translateY",-60),pt=ct("translateX",10),mt=ct("translateX",-10);ut=i,Object.keys(ut).forEach((function(e){!function(e,t){U[e]=t}(e,H(ut[e]))}));var gt=ee(o.a);ee(a.a),ee(s.a)},function(t,n,r){"use strict";var i,o=r(19),a=r.n(o),s=r(20),l=r.n(s),c=r(23),u=r.n(c),h=r(24),d=r.n(h),f=r(25),p=r.n(f),m=r(18),g=r.n(m),v=r(6),y=r.n(v),b=r(7),w=r.n(b),x=r(252),_=(r(464),r(22)),E=r.n(_),A=r(82),S=r(254),M=r.n(S);function T(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(){if(!A.canUseDOM)return null;var e=L();return e.sheet?e.sheet:null}function R(e,t){return function(){var e=O();if(e){for(var t=E()(e.cssRules),n=[],r=0;r<t.length;r++){var i=t[r];i instanceof CSSFontFaceRule&&n.push({rule:i,index:r})}return n}return[]}().filter((function(n){var r=n.rule;return r.style.fontFamily===e&&(!t||!t.display||t.display===r.style.fontDisplay)}))}!function(e){e.AUTO="auto",e.SWAP="swap",e.BLOCK="block",e.FALLBACK="fallback",e.OPTIONAL="optional"}(i||(i={}));var k={get name(){return"ExpoFontLoader"},unloadAllAsync:function(){var e;return w.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:if(A.canUseDOM){t.next=2;break}return t.abrupt("return");case 2:(e=document.getElementById(P))&&e instanceof HTMLStyleElement&&document.removeChild(e);case 4:case"end":return t.stop()}}),null,null,null,Promise)},unloadAsync:function(e,t){var n,r,i,o,a;return w.a.async((function(s){for(;;)switch(s.prev=s.next){case 0:if(n=O()){s.next=3;break}return s.abrupt("return");case 3:for(r=R(e,t),i=T(r);!(o=i()).done;)a=o.value,n.deleteRule(a.index);case 5:case"end":return s.stop()}}),null,null,null,Promise)},loadAsync:function(e,t){var n;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(A.canUseDOM){r.next=2;break}return r.abrupt("return");case 2:if(document.head&&"function"===typeof document.head.appendChild){r.next=5;break}throw new x.a("ERR_WEB_ENVIRONMENT","The browser's `document.head` element doesn't support injecting fonts.");case 5:if(n=D(e,t),document.head.appendChild(n),I()){r.next=9;break}return r.abrupt("return");case 9:return r.abrupt("return",new M.a(e,{display:t.display}).load());case 10:case"end":return r.stop()}}),null,null,null,Promise)}},P="expo-generated-fonts";function L(){var e=document.getElementById(P);if(e&&e instanceof HTMLStyleElement)return e;var t=document.createElement("style");return t.id=P,t.type="text/css",t}function D(e,t){var n="@font-face {\n font-family: "+e+";\n src: url("+t.uri+");\n font-display: "+(t.display||i.AUTO)+";\n }",r=L();if(r.styleSheet){var o=r;o.styleSheet.cssText=o.styleSheet.cssText?o.styleSheet.cssText+n:n}else{var a=document.createTextNode(n);r.appendChild(a)}return r}function I(){var e=window.navigator.userAgent,t=!!e.match(/iPad|iPhone/i),n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=e.includes("Edge"),i=e.includes("Trident"),o=e.includes("Firefox");return!n&&!t&&!r&&!i&&!o}function N(e){var t,n="string"===typeof(t=e)?t||null:"object"===typeof t&&(t.uri||t.localUri)||null,r=function(e){return e.display||i.AUTO}(e);return n&&"string"===typeof n||j(n),{uri:n,display:r}}function j(e){var t=typeof e;throw"object"===t&&(t=JSON.stringify(e,null,2)),new x.a("ERR_FONT_SOURCE","Expected font asset of type `string | FontResource | Asset` (number is not supported on web) instead got: "+t)}function B(e,t){return w.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return("object"!==typeof t||"string"!==typeof t.uri||t.downloadAsync)&&j(t),n.next=3,w.a.awrap(k.loadAsync(e,t));case 3:case"end":return n.stop()}}),null,null,null,Promise)}var F={},z={};function H(e){return e in F}function U(e,t){var n,r;return w.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:if("object"!==typeof e){i.next=8;break}if(!t){i.next=3;break}throw new x.a("ERR_FONT_API","No fontFamily can be used for the provided source: "+t+". The second argument of `loadAsync()` can only be used with a `string` value as the first argument.");case 3:return n=e,r=Object.keys(n),i.next=7,w.a.awrap(Promise.all(r.map((function(e){return V(e,n[e])}))));case 7:return i.abrupt("return");case 8:return i.next=10,w.a.awrap(V(e,t));case 10:return i.abrupt("return",i.sent);case 11:case"end":return i.stop()}}),null,null,null,Promise)}function V(e,t){var n;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(t){r.next=2;break}throw new x.a("ERR_FONT_SOURCE",'Cannot load null or undefined font source: { "'+e+'": '+t+' }. Expected asset of type `FontSource` for fontFamily of name: "'+e+'"');case 2:if(!F[e]){r.next=4;break}return r.abrupt("return");case 4:if(!z[e]){r.next=6;break}return r.abrupt("return",z[e]);case 6:return n=N(t),z[e]=w.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,w.a.awrap(B(e,n));case 3:F[e]=!0;case 4:return t.prev=4,delete z[e],t.finish(4);case 7:case"end":return t.stop()}}),null,null,[[0,,4,7]],Promise),r.next=10,w.a.awrap(z[e]);case 10:case"end":return r.stop()}}),null,null,null,Promise)}var G=r(0),W=r.n(G),q=r(54),X=r(17),Y=r.n(X),K=(r(1),r(185)),Q=r(8),Z=r(115),J=r(116),$=K.a.RNVectorIconsManager||K.a.RNVectorIconsModule;function ee(){if(!$){if("android"===Q.a.OS)throw new Error("RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.");throw new Error("RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.")}}var te=r(250),ne=r.n(te),re=r(251),ie=r.n(re),oe=r(110),ae=r.n(oe),se=r(5),le=r(123),ce=r(2),ue=["style","iconStyle","children"];function he(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var de=se.a.create({container:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",padding:8},touchable:{overflow:"hidden"},icon:{marginRight:10},text:{fontWeight:"600",backgroundColor:"transparent"}}),fe=["ellipsizeMode","numberOfLines","textBreakStrategy","selectable","suppressHighlighting","allowFontScaling","adjustsFontSizeToFit","minimumFontScale"],pe=["accessible","accessibilityLabel","accessibilityHint","accessibilityComponentType","accessibilityRole","accessibilityStates","accessibilityTraits","onFocus","onBlur","disabled","onPress","onPressIn","onPressOut","onLayout","onLongPress","nativeID","testID","delayPressIn","delayPressOut","delayLongPress","activeOpacity","underlayColor","selectionColor","onShowUnderlay","onHideUnderlay","hasTVPreferredFocus","tvParallaxProperties"];function me(e){var t,n;return n=t=function(t){d()(r,t);var n=he(r);function r(){return l()(this,r),n.apply(this,arguments)}return u()(r,[{key:"render",value:function(){var t=this.props,n=t.style,r=t.iconStyle,i=t.children,o=Y()(t,ue),s=ae()(o,fe,"style","name","size","color"),l=ae()(o,pe),c=ie()(o,Object.keys(s),Object.keys(l),"iconStyle","borderRadius","backgroundColor");s.style=r?[de.icon,r]:de.icon;var u=ae()(this.props,"color"),h=ae()(this.props,"backgroundColor","borderRadius");return W.a.createElement(le.a,a()({style:[de.touchable,h]},l),W.a.createElement(ce.a,a()({style:[de.container,h,n]},c),W.a.createElement(e,s),ne()(i)?W.a.createElement(q.a,{style:[de.text,u]},i):i))}}]),r}(G.PureComponent),t.defaultProps={backgroundColor:"#007AFF",borderRadius:5,color:"white",size:20},n}var ge=["name","size","color","style","children"];function ve(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var ye=K.a.RNVectorIconsManager||K.a.RNVectorIconsModule;function be(e,t,n,r){var i=n?n.replace(/\.(otf|ttf)$/,""):t,o=Q.a.select({windows:"/Assets/"+n+"#"+t,android:i,web:i,default:t}),a=function(t){d()(i,t);var n=ve(i);function i(){var e;l()(this,i);for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return(e=n.call.apply(n,[this].concat(r))).root=null,e.handleRef=function(t){e.root=t},e}return u()(i,[{key:"setNativeProps",value:function(e){this.root&&this.root.setNativeProps(e)}},{key:"render",value:function(){var t=this.props,n=t.name,i=t.size,a=t.color,s=t.style,l=t.children,c=Y()(t,ge),u=n?e[n]||"?":"";"number"===typeof u&&(u=String.fromCodePoint(u));var h={fontSize:i,color:a},d={fontFamily:o,fontWeight:"normal",fontStyle:"normal"};return c.style=[h,s,d,r||{}],c.ref=this.handleRef,W.a.createElement(q.a,c,u,l)}}]),i}(G.PureComponent);a.defaultProps={size:12,allowFontScaling:!1};var s=function(){var e=new Map;return{setValue:function(t,n){return e.set(t,{type:"value",data:n})},setError:function(t,n){return e.set(t,{type:"error",data:n})},has:function(t){return e.has(t)},get:function(t){if(e.has(t)){var n=e.get(t),r=n.type,i=n.data;if("error"===r)throw i;return i}}}}();function c(t){var n=e[t]||"?";return"number"===typeof n?String.fromCodePoint(n):n}return a.Button=me(a),a.TabBarItemIOS=a.TabBarItem,a.getImageSource=function(e){var t,n,r,i,a,l,u,h=arguments;return w.a.async((function(d){for(;;)switch(d.prev=d.next){case 0:if(t=h.length>1&&void 0!==h[1]?h[1]:12,n=h.length>2&&void 0!==h[2]?h[2]:"black",ee(),r=c(e),i=Object(Z.a)(n),a=r+":"+t+":"+i,!s.has(a)){d.next=8;break}return d.abrupt("return",s.get(a));case 8:return d.prev=8,d.next=11,w.a.awrap(ye.getImageForFont(o,r,t,i));case 11:return l=d.sent,u={uri:l,scale:J.a.get()},s.setValue(a,u),d.abrupt("return",u);case 17:throw d.prev=17,d.t0=d.catch(8),s.setError(a,d.t0),d.t0;case 21:case"end":return d.stop()}}),null,null,[[8,17]],Promise)},a.getImageSourceSync=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"black";ee();var r=c(e),i=Object(Z.a)(n),a=r+":"+t+":"+i;if(s.has(a))return s.get(a);try{var l=ye.getImageForFontSync(o,r,t,i),u={uri:l,scale:J.a.get()};return s.setValue(a,u),u}catch(h){throw s.setError(a,h),h}},a.loadFont=function(){var e,t=arguments;return w.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=t.length>0&&void 0!==t[0]?t[0]:n,"ios"!==Q.a.OS){r.next=7;break}if(ee(),e){r.next=5;break}throw new Error("Unable to load font, because no file was specified. ");case 5:return r.next=7,w.a.awrap(ye.loadFontWithFileName.apply(ye,E()(e.split("."))));case 7:case"end":return r.stop()}}),null,null,null,Promise)},a.hasIcon=function(t){return Object.prototype.hasOwnProperty.call(e,t)},a.getRawGlyphMap=function(){return e},a.getFontFamily=function(){return o},a}function we(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=g()(t);if(n){var i=g()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return p()(this,e)}}var xe=r(256),_e=r.n(xe),Ee=function(e,t,n,r){var i,o=y()({},t,n),s=be(e,t,null,r);return(i=function(e){d()(r,e);var n=we(r);function r(){var e;return l()(this,r),(e=n.apply(this,arguments))._mounted=!1,e.state={fontIsLoaded:H(t)},e}return u()(r,[{key:"componentDidMount",value:function(){return w.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._mounted=!0,this.state.fontIsLoaded){e.next=5;break}return e.next=4,w.a.awrap(U(o));case 4:this._mounted&&this.setState({fontIsLoaded:!0});case 5:case"end":return e.stop()}}),null,this,null,Promise)}},{key:"componentWillUnmount",value:function(){this._mounted=!1}},{key:"setNativeProps",value:function(e){this._icon&&this._icon.setNativeProps(e)}},{key:"render",value:function(){var e=this;return this.state.fontIsLoaded?W.a.createElement(s,a()({ref:function(t){e._icon=t}},this.props)):W.a.createElement(q.a,null)}}]),r}(W.a.Component)).defaultProps=s.defaultProps,i.Button=me(i),i.glyphMap=e,i.getRawGlyphMap=function(){return e},i.getFontFamily=function(){return t},i.loadFont=function(){return U(o)},i.font=o,i}(r(255),"material-community",_e.a);n.a=Ee},,,,,,function(e,t,n){var r=n(178);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";t.a={ignoreLogs:function(){},ignoreAllLogs:function(){},uninstall:function(){},install:function(){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},function(t,n,r){if("undefined"===typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");let i=r(11);"default"in i&&(i=i.default);let o=r(146);"default"in o&&(o=o.default);const a=function(e){return"string"===typeof e?JSON.parse(e):e},s=function(t){if("function"===typeof t)return t;const n=eval;try{return n("("+t+")")}catch(e){}return null},l=function(e){return isNaN(parseFloat(e))?s(e)?s(e):e:parseFloat(e)};AFRAME.registerComponent("forcegraph",{schema:{jsonUrl:{type:"string",default:""},nodes:{parse:a,default:[]},links:{parse:a,default:[]},numDimensions:{type:"number",default:3},dagMode:{type:"string",default:""},dagLevelDistance:{type:"number",default:0},dagNodeFilter:{parse:s,function:()=>!0},onDagError:{parse:s,default:void 0},nodeRelSize:{type:"number",default:4},nodeId:{type:"string",default:"id"},nodeVal:{parse:l,default:"val"},nodeResolution:{type:"number",default:8},nodeVisibility:{parse:l,default:!0},nodeColor:{parse:l,default:"color"},nodeAutoColorBy:{parse:l,default:""},nodeOpacity:{type:"number",default:.75},nodeThreeObject:{parse:l,default:null},nodeThreeObjectExtend:{parse:l,default:!1},linkSource:{type:"string",default:"source"},linkTarget:{type:"string",default:"target"},linkVisibility:{parse:l,default:!0},linkColor:{parse:l,default:"color"},linkAutoColorBy:{parse:l,default:""},linkOpacity:{type:"number",default:.2},linkWidth:{parse:l,default:0},linkResolution:{type:"number",default:6},linkCurvature:{parse:l,default:0},linkCurveRotation:{parse:l,default:0},linkMaterial:{parse:l,default:null},linkThreeObject:{parse:l,default:null},linkThreeObjectExtend:{parse:l,default:!1},linkPositionUpdate:{parse:s,default:null},linkDirectionalArrowLength:{parse:l,default:0},linkDirectionalArrowColor:{parse:l,default:null},linkDirectionalArrowRelPos:{parse:l,default:.5},linkDirectionalArrowResolution:{type:"number",default:8},linkDirectionalParticles:{parse:l,default:0},linkDirectionalParticleSpeed:{parse:l,default:.01},linkDirectionalParticleWidth:{parse:l,default:.5},linkDirectionalParticleColor:{parse:l,default:null},linkDirectionalParticleResolution:{type:"number",default:4},onNodeHover:{parse:s,default:()=>{}},onLinkHover:{parse:s,default:()=>{}},onNodeClick:{parse:s,default:()=>{}},onLinkClick:{parse:s,default:()=>{}},forceEngine:{type:"string",default:"d3"},d3AlphaMin:{type:"number",default:0},d3AlphaDecay:{type:"number",default:.0228},d3VelocityDecay:{type:"number",default:.4},ngraphPhysics:{parse:a,default:null},warmupTicks:{type:"int",default:0},cooldownTicks:{type:"int",default:1e18},cooldownTime:{type:"int",default:15e3},onEngineTick:{parse:s,default:function(){}},onEngineStop:{parse:s,default:function(){}}},getGraphBbox:function(){return this.forceGraph||(this.forceGraph=new o),this.forceGraph.getGraphBbox()},emitParticle:function(){this.forceGraph||(this.forceGraph=new o);const e=this.forceGraph,t=e.emitParticle.apply(e,arguments);return t===e?this:t},d3Force:function(){this.forceGraph||(this.forceGraph=new o);const e=this.forceGraph,t=e.d3Force.apply(e,arguments);return t===e?this:t},d3ReheatSimulation:function(){return this.forceGraph&&this.forceGraph.d3ReheatSimulation(),this},refresh:function(){return this.forceGraph&&this.forceGraph.refresh(),this},init:function(){const e=this.state={};e.infoEl=document.createElement("a-text"),e.infoEl.setAttribute("position","0 -0.1 -1"),e.infoEl.setAttribute("width",1),e.infoEl.setAttribute("align","center"),e.infoEl.setAttribute("color","lavender");const t=document.querySelector("a-entity[camera], a-camera");t.appendChild(e.infoEl),e.cameraObj=t.object3D.children.filter((function(e){return"PerspectiveCamera"===e.type}))[0],this.el.sceneEl.addEventListener("camera-set-active",(function(t){e.cameraObj=t.detail.cameraEl.components.camera.camera})),this.forceGraph||(this.forceGraph=new o),this.forceGraph.onFinishUpdate(()=>this.el.setObject3D("forcegraphGroup",this.forceGraph)).onLoading(()=>e.infoEl.setAttribute("value","Loading...")).onFinishLoading(()=>e.infoEl.setAttribute("value","")),this.el.addEventListener("raycaster-intersected",t=>e.hoverDetail=t.detail),this.el.addEventListener("raycaster-intersected-cleared",t=>e.hoverDetail=t.detail),this.el.addEventListener("click",()=>e.hoverObj&&this.data["on"+("node"===e.hoverObj.__graphObjType?"Node":"Link")+"Click"](e.hoverObj.__data))},remove:function(){this.state.infoEl.remove(),this.el.removeObject3D("forcegraphGroup")},update:function(e){const t=this,n=this.data,r=AFRAME.utils.diff(n,e);["jsonUrl","numDimensions","dagMode","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeVisibility","nodeColor","nodeAutoColorBy","nodeOpacity","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","forceEngine","d3AlphaMin","d3AphaDecay","d3VelocityDecay","ngraphPhysics","warmupTicks","cooldownTicks","cooldownTime","onEngineTick","onEngineStop"].filter((function(e){return e in r})).forEach((function(e){t.forceGraph[e](""!==n[e]?n[e]:null)})),("nodes"in r||"links"in r)&&t.forceGraph.graphData({nodes:n.nodes,links:n.links})},tick:function(e,t){const n=this.state,r=this.data,i=n.hoverDetail?n.hoverDetail.getIntersection?n.hoverDetail.getIntersection(this.el):n.hoverDetail.intersection||void 0:void 0;let o=i?i.object:void 0;for(;o&&!o.hasOwnProperty("__graphObjType");)o=o.parent;if(o!==n.hoverObj){const e=n.hoverObj?n.hoverObj.__graphObjType:null,t=n.hoverObj?n.hoverObj.__data:null,i=o?o.__graphObjType:null,a=o?o.__data:null;e&&e!==i&&r["on"+("node"===e?"Node":"Link")+"Hover"](null,t),i&&r["on"+("node"===i?"Node":"Link")+"Hover"](a,e===i?t:null),n.hoverObj=o}this.forceGraph.tickFrame()}})},function(e,t,n){e.exports=function(e){var t=n(357),h=n(358),d=n(152);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=h(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var f=c[e.dimensions];if(!f){var p=e.dimensions;f={Body:r(p,e.debug),createQuadTree:i(p),createBounds:o(p),createDragForce:a(p),createSpringForce:s(p),integrate:l(p)},c[p]=f}var m=f.Body,g=f.createQuadTree,v=f.createBounds,y=f.createDragForce,b=f.createSpringForce,w=f.integrate,x=n(359).random(42),_=[],E=[],A=g(e,x),S=v(_,e,x),M=b(e,x),T=y(e),C=[],O=new Map,R=0;L("nbody",(function(){if(0===_.length)return;A.insertBodies(_);var e=_.length;for(;e--;){var t=_[e];t.isPinned||(t.reset(),A.updateBodyForce(t),T.update(t))}})),L("spring",(function(){var e=E.length;for(;e--;)M.update(E[e])}));var k={bodies:_,quadTree:A,springs:E,settings:e,addForce:L,removeForce:function(e){var t=C.indexOf(O.get(e));if(t<0)return;C.splice(t,1),O.delete(e)},getForces:function(){return O},step:function(){for(var t=0;t<C.length;++t)C[t](R);var n=w(_,e.timeStep,e.adaptiveTimeStepWeight);return R+=1,n},addBody:function(e){if(!e)throw new Error("Body is required");return _.push(e),e},addBodyAt:function(e){if(!e)throw new Error("Body position is required");var t=(e=>new m(e))(e);return _.push(t),t},removeBody:function(e){if(e){var t=_.indexOf(e);if(!(t<0))return _.splice(t,1),0===_.length&&S.reset(),!0}},addSpring:function(e,n,r,i){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!==typeof r&&(r=-1);var o=new t(e,n,r,i>=0?i:-1);return E.push(o),o},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=E.indexOf(e);return t>-1?(E.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return S.getBestNewPosition(e)},getBBox:P,getBoundingBox:P,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,A.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,A.options({theta:t}),this):e.theta},random:x};return function(e,t){for(var n in e)u(e,t,n)}(e,k),d(k),k;function P(){return S.update(),S.box}function L(e,t){if(O.has(e))throw new Error("Force "+e+" is already added");O.set(e,t),C.push(t)}};var r=n(351),i=n(352),o=n(353),a=n(354),s=n(355),l=n(356),c={};function u(e,t,n){if(e.hasOwnProperty(n)&&"function"!==typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},function(e,t){e.exports=function(e){return 0===e?"x":1===e?"y":2===e?"z":"c"+(e+1)}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r={UIManager:n(28).a};t.a=r},function(e,t){function n(t){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(){return{type:"GO_BACK"}}function i(){if("string"===typeof(arguments.length<=0?void 0:arguments[0]))return{type:"NAVIGATE",payload:{name:arguments.length<=0?void 0:arguments[0],params:arguments.length<=1?void 0:arguments[1]}};var e=(arguments.length<=0?void 0:arguments[0])||{};if(!e.hasOwnProperty("key")&&!e.hasOwnProperty("name"))throw new Error("You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.");return{type:"NAVIGATE",payload:e}}function o(e){return{type:"RESET",payload:e}}function a(e){return{type:"SET_PARAMS",payload:{params:e}}}n.r(t),n.d(t,"goBack",(function(){return r})),n.d(t,"navigate",(function(){return i})),n.d(t,"reset",(function(){return o})),n.d(t,"setParams",(function(){return a}))},function(t,n,r){"use strict";(function(t){var i=r(9),o=r.n(i),a=r(6),s=r.n(a),l=r(17),c=r.n(l),u=r(0),h=r(42),d=r(93),f=r(135),p=r(39),m=r(67),g=r(44),v=r(55),y=r(136),b=r(137),w=r(138),x=r(139),_=r(140),E=r(257),A=(r(369),["key","routeNames"]);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T="The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.";try{Object.defineProperty(t,"REACT_NAVIGATION_REDUX_DEVTOOLS_EXTENSION_INTEGRATION_ENABLED",{set:function(e){console.warn("Redux devtools extension integration can be enabled with the '@react-navigation/devtools' package. For more details, see https://reactnavigation.org/docs/devtools")}})}catch(e){}var C=u.forwardRef((function(e,t){var n=e.initialState,r=e.onStateChange,i=e.onUnhandledAction,a=e.independent,s=e.children;if(!u.useContext(m.a).isDefault&&!a)throw new Error("Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitely. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.");var l=Object(E.a)((function(){return function e(t){if(void 0!==t){t.key,t.routeNames;return M(M({},c()(t,A)),{},{stale:!0,routes:t.routes.map((function(t){return void 0===t.state?t:M(M({},t),{},{state:e(t.state)})}))})}}(null==n?void 0:n)})),S=o()(l,5),C=S[0],O=S[1],R=S[2],k=S[3],P=S[4],L=u.useRef(!0),D=u.useRef(),I=u.useCallback((function(){return D.current}),[]),N=u.useCallback((function(e){D.current=e}),[]),j=Object(b.a)(),B=j.listeners,F=j.addListener,z=Object(w.a)(),H=z.keyedListeners,U=z.addKeyedListener,V=function(e){if(null==B.focus[0])throw new Error(T);B.focus[0]((function(t){return t.dispatch(e)}))},G=function(){if(null==B.focus[0])return!1;var e=B.focus[0]((function(e){return e.canGoBack()})),t=e.result;return!!e.handled&&t},W=u.useCallback((function(e){var t,n,r,i=null!==(t=null===e||void 0===e?void 0:e.key)&&void 0!==t?t:null===(n=(r=H.getState).root)||void 0===n?void 0:n.call(r).key;if(null==i)throw new Error(T);B.focus[0]((function(t){return t.dispatch(M(M({},h.CommonActions.reset(e)),{},{target:i}))}))}),[H.getState,B.focus]),q=u.useCallback((function(){var e,t;return null===(e=(t=H.getState).root)||void 0===e?void 0:e.call(t)}),[H.getState]),X=u.useCallback((function(){var e=q();if(void 0!==e){for(;void 0!==e.routes[e.index].state;)e=e.routes[e.index].state;return e.routes[e.index]}}),[q]),Y=Object(_.a)(),K=Object(x.a)({}),Q=K.addOptionsGetter,Z=K.getCurrentOptions;u.useImperativeHandle(t,(function(){return M(M(M({},Object.keys(h.CommonActions).reduce((function(e,t){return e[t]=function(){return V(h.CommonActions[t].apply(h.CommonActions,arguments))},e}),{})),Y.create("root")),{},{resetRoot:W,dispatch:V,canGoBack:G,getRootState:q,dangerouslyGetState:function(){return C},dangerouslyGetParent:function(){},getCurrentRoute:X,getCurrentOptions:Z})}));var J=u.useCallback((function(e,t){Y.emit({type:"__unsafe_action__",data:{action:e,noop:t}})}),[Y]),$=u.useRef(),ee=u.useCallback((function(e){$.current!==e&&($.current=e,Y.emit({type:"options",data:{options:e}}))}),[Y]),te=u.useMemo((function(){return{addListener:F,addKeyedListener:U,onDispatchAction:J,onOptionsChange:ee}}),[F,U,J,ee]),ne=u.useMemo((function(){return{scheduleUpdate:k,flushUpdates:P}}),[k,P]),re=u.useRef(!0),ie=u.useCallback((function(){return re.current}),[]),oe=u.useMemo((function(){return{state:C,getState:O,setState:R,getKey:I,setKey:N,getIsInitial:ie,addOptionsGetter:Q}}),[C,O,R,I,N,ie,Q]),ae=u.useRef(r);u.useEffect((function(){re.current=!1,ae.current=r})),u.useEffect((function(){Y.emit({type:"state",data:{state:C}}),!L.current&&ae.current&&ae.current(q()),L.current=!1}),[q,Y,C]);var se=u.useCallback((function(e){}),[]),le=u.createElement(y.a.Provider,{value:ne},u.createElement(p.a.Provider,{value:te},u.createElement(m.a.Provider,{value:oe},u.createElement(f.a.Provider,{value:null!==i&&void 0!==i?i:se},u.createElement(d.b,null,s)))));return a&&(le=u.createElement(g.a.Provider,{value:void 0},u.createElement(v.a.Provider,{value:void 0},le))),le}));n.a=C}).call(this,r(43))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(141);function i(e){return function(){if(void 0!==arguments[0])throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API with React Navigation 5? See https://reactnavigation.org/docs/upgrading-from-4.x for migration guide.");return{Navigator:e,Screen:r.a}}}},function(e,t,n){"use strict";var r=n(0),i=r.createContext(void 0);t.a=i},function(e,t,n){"use strict";n(0),n(44)},function(e,t,n){"use strict";n(0),n(70)},function(e,t,n){"use strict";n(9),n(0),n(70)},function(e,t,n){"use strict";n(9),n(0),n(70)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(6),i=n.n(r),o=n(19),a=n.n(o),s=n(22),l=n.n(s),c=n(9),u=n.n(c),h=n(258),d=n.n(h),f=n(142),p=n(143);function m(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b(e,t){var n,r=Object(p.a)(t),o=u()(r,2),s=o[0],c=o[1],h=[];null!==c&&void 0!==c&&c.initialRouteName&&h.push({initialRouteName:c.initialRouteName,parentScreens:[]});var d=null===c||void 0===c?void 0:c.screens,f=e.replace(/\/+/g,"/").replace(/^\//,"").replace(/\?.*$/,"");if(f=f.endsWith("/")?f:"".concat(f,"/"),void 0===d){var m=f.split("/").filter(Boolean).map((function(t,n,r){var i=decodeURIComponent(t);return n===r.length-1?{name:i,params:O(e)}:{name:i}}));return m.length?T(m,h):void 0}var g,v,b=(n=[]).concat.apply(n,l()(Object.keys(d).map((function(e){return _(s,e,d,[],h,[])})))).sort((function(e,t){if(e.pattern===t.pattern)return t.routeNames.join(">").localeCompare(e.routeNames.join(">"));if(e.pattern.startsWith(t.pattern))return-1;if(t.pattern.startsWith(e.pattern))return 1;var n=e.pattern.split("/"),r=t.pattern.split("/"),i=n.indexOf("*"),o=r.indexOf("*");return-1===i&&-1!==o?-1:-1!==i&&-1===o?1:i===o?r.length-n.length:o-i}));if(b.reduce((function(e,t){if(e[t.pattern]){var n=e[t.pattern].routeNames,r=t.routeNames;if(!(n.length>r.length?r.every((function(e,t){return n[t]===e})):n.every((function(e,t){return r[t]===e}))))throw new Error("Found conflicting screens with the same pattern. The pattern '".concat(t.pattern,"' resolves to both '").concat(n.join(" > "),"' and '").concat(r.join(" > "),"'. Patterns must be unique and cannot resolve to more than one screen."))}return a()(e,i()({},t.pattern,t))}),{}),"/"===f){var w=b.find((function(e){return""===e.path&&e.routeNames.every((function(e){var t;return!(null!==(t=b.find((function(t){return t.screen===e})))&&void 0!==t&&t.path)}))}));return w?T(w.routeNames.map((function(t,n,r){return n===r.length-1?{name:t,params:O(e,w.parse)}:{name:t}})),h):void 0}if(!1===s){var E=x(f,b.map((function(e){return y(y({},e),{},{regex:e.regex?new RegExp(e.regex.source+"$"):void 0})}))),S=E.routes,M=E.remainingPath;void 0!==S&&(f=M,g=v=T(S,h))}else for(;f;){var R=x(f,b),k=R.routes;if(f=R.remainingPath,void 0===k){var P=f.split("/");k=[{name:decodeURIComponent(P[0])}],P.shift(),f=P.join("/")}var L=T(k,h);if(v){for(var D;null!==(I=v)&&void 0!==I&&I.routes[v.index||0].state;){var I;v=v.routes[v.index||0].state}v.routes[(null===(D=v)||void 0===D?void 0:D.index)||0].state=L}else g=L;v=L}if(null!=v&&null!=g){var N=C(v),j=O(e,A(N.name,b));return j&&(N.params=y(y({},N.params),j)),g}}var w=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=[]).concat.apply(e,l()(n.map((function(e){return e.split("/")})))).filter(Boolean).join("/")},x=function(e,t){for(var n,r,o=e,s=function(e){if(!e.regex)return"continue";var r=o.match(e.regex);if(r){var s=null===(c=e.pattern)||void 0===c?void 0:c.split("/").filter((function(e){return e.startsWith(":")})).reduce((function(e,t,n){return a()(e,i()({},t,r[2*(n+1)].replace(/\//,"")))}),{});return n=e.routeNames.map((function(e){var n,r=t.find((function(t){return t.screen===e})),i=null===r||void 0===r||null===(n=r.path)||void 0===n?void 0:n.split("/").filter((function(e){return e.startsWith(":")})).reduce((function(e,t){var n=s[t];if(n){var i,o=t.replace(/^:/,"").replace(/\?$/,"");e[o]=null!==(i=r.parse)&&void 0!==i&&i[o]?r.parse[o](n):n}return e}),{});return i&&Object.keys(i).length?{name:e,params:i}:{name:e}})),o=o.replace(r[1],""),"break"}},l=m(t);!(r=l()).done;){var c,u=s(r.value);if("continue"!==u&&"break"===u)break}return{routes:n,remainingPath:o}},_=function e(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0,c=[];i.push(n),a.push(n);var u=r[n];if("string"===typeof u){var h=s?w(s,u):u;c.push(E(t,n,i,h,u))}else if("object"===typeof u){var d;if("string"===typeof u.path){if(t)d=!0!==u.exact&&s?w(s,u.path):u.path;else{if(u.exact&&void 0===u.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");d=!0!==u.exact?w(s||"",u.path||""):u.path||""}c.push(E(t,n,i,d,u.path,u.parse))}u.screens&&(u.initialRouteName&&o.push({initialRouteName:u.initialRouteName,parentScreens:a}),Object.keys(u.screens).forEach((function(n){var r,h=e(t,n,u.screens,i,o,l()(a),null!==(r=d)&&void 0!==r?r:s);c.push.apply(c,l()(h))})))}return i.pop(),c},E=function(e,t,n,r,i,o){return{screen:t,regex:(r=r.split("/").filter(Boolean).join("/"))?new RegExp("^(".concat(r.split("/").map((function(t){if(e&&"*"===t)throw new Error("Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config");return t.startsWith(":")?"(([^/]+\\/)".concat(t.endsWith("?")?"?":"",")"):"".concat("*"===t?".*":d()(t),"\\/")})).join(""),")")):void 0,pattern:r,path:i,routeNames:l()(n),parse:o}},A=function(e,t){for(var n,r=m(t);!(n=r()).done;){var i=n.value;if(e===i.routeNames[i.routeNames.length-1])return i.parse}},S=function(e,t,n){for(var r,i=m(n);!(r=i()).done;){var o=r.value;if(t.length===o.parentScreens.length){for(var a=!0,s=0;s<t.length;s++)if(0!==t[s].localeCompare(o.parentScreens[s])){a=!1;break}if(a)return e!==o.initialRouteName?o.initialRouteName:void 0}}},M=function(e,t,n){return n?e?{index:1,routes:[{name:e},t]}:{routes:[t]}:e?{index:1,routes:[{name:e},y(y({},t),{},{state:{routes:[]}})]}:{routes:[y(y({},t),{},{state:{routes:[]}})]}},T=function(e,t){var n,r=e.shift(),i=[],o=S(r.name,i,t);if(i.push(r.name),n=M(o,r,0===e.length),e.length>0)for(var a=n;r=e.shift();){o=S(r.name,i,t);var s=a.index||a.routes.length-1;a.routes[s].state=M(o,r,0===e.length),e.length>0&&(a=a.routes[s].state),i.push(r.name)}return n},C=function(e){for(var t,n=e;null!==(r=n)&&void 0!==r&&r.routes[n.index||0].state;){var r;n=n.routes[n.index||0].state}return n.routes[(null===(t=n)||void 0===t?void 0:t.index)||0]},O=function(e,t){var n=e.split("?")[1],r=f.parse(n);return t&&Object.keys(r).forEach((function(e){t[e]&&"string"===typeof r[e]&&(r[e]=t[e](r[e]))})),Object.keys(r).length?r:void 0}},function(e,t,n){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(e,t){try{return decodeURIComponent(e.join(""))}catch(i){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],o(n),o(r))}function a(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var n={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},r=i.exec(e);r;){try{n[r[0]]=decodeURIComponent(r[0])}catch(t){var o=a(r[0]);o!==r[0]&&(n[r[0]]=o)}r=i.exec(e)}n["%C2"]="\ufffd";for(var s=Object.keys(n),l=0;l<s.length;l++){var c=s[l];e=e.replace(new RegExp(c,"g"),n[c])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!==typeof e||"string"!==typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),o=0;o<r.length;o++){var a=r[o],s=e[a];(i?-1!==t.indexOf(a):t(a,s,e))&&(n[a]=s)}return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(22),i=n.n(r),o=n(6),a=n.n(o),s=n(19),l=n.n(s),c=n(9),u=n.n(c),h=n(142),d=n(143);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){if(null==e)throw Error("Got 'undefined' for the navigation state. You must pass a valid state object.");for(var n=Object(d.a)(t),r=u()(n,2),i=r[0],o=r[1],a=o?w(i,o.screens):{},s="/",c=e,f={},m=function(){for(var t="number"===typeof c.index?c.index:0,n=c.routes[t],r=void 0,o=void 0,d=function e(t){var n="number"===typeof t.index?t.routes[t.index]:t.routes[t.routes.length-1];return n.state?e(n.state):n}(e),m=a,w=[],x=!0;n.name in m&&x;)if(r=m[n.name].pattern,w.push(n.name),n.params&&function(){var e=null===(y=m[n.name])||void 0===y?void 0:y.stringify,t=g(Object.entries(n.params).map((function(t){var n=u()(t,2),r=n[0],i=n[1];return[r,null!==e&&void 0!==e&&e[r]?e[r](i):String(i)]})));r&&l()(f,t),d===n&&(o=p({},t),null===(b=r)||void 0===b||b.split("/").filter((function(e){return e.startsWith(":")})).forEach((function(e){var t=v(e);o&&delete o[t]})))}(),m[n.name].screens&&void 0!==n.state){t="number"===typeof n.state.index?n.state.index:n.state.routes.length-1;var _=n.state.routes[t],E=m[n.name].screens;E&&_.name in E?(n=_,m=E):x=!1}else x=!1;if(void 0===r&&(r=w.join("/")),void 0!==m[n.name]?s+=r.split("/").map((function(e){var t=v(e);if("*"===e){if(i)throw new Error("Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config");return n.name}if(e.startsWith(":")){var r=f[t];return void 0===r&&e.endsWith("?")?"":encodeURIComponent(r)}return encodeURIComponent(e)})).join("/"):s+=encodeURIComponent(n.name),o||(o=d.params),n.state)s+="/";else if(o){for(var A in o)"undefined"===o[A]&&delete o[A];var S=h.stringify(o);S&&(s+="?".concat(S))}c=n.state};c;){var y,b;m()}return s=(s=s.replace(/\/+/g,"/")).length>1?s.replace(/\/$/,""):s}var g=function(e){return e.reduce((function(e,t){var n=u()(t,2),r=n[0],i=n[1];if(e.hasOwnProperty(r))throw new Error("A value for key '".concat(r,"' already exists in the object."));return e[r]=i,e}),{})},v=function(e){return e.replace(/^:/,"").replace(/\?$/,"")},y=function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=[]).concat.apply(e,i()(n.map((function(e){return e.split("/")})))).filter(Boolean).join("/")},b=function(e,t,n){var r,i;if("string"===typeof t)return{pattern:n?y(n,t):t};if(e)i=!0!==t.exact&&n&&t.path?y(n,t.path):t.path;else{if(t.exact&&void 0===t.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");i=!0!==t.exact?y(n||"",t.path||""):t.path||""}var o=t.screens?w(e,t.screens,i):void 0;return{pattern:null===(r=i)||void 0===r?void 0:r.split("/").filter(Boolean).join("/"),stringify:t.stringify,screens:o}},w=function(e,t,n){return g(Object.entries(t).map((function(t){var r=u()(t,2),i=r[0],o=r[1];return[i,b(e,o,n)]})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(9),i=n.n(r),o=n(19),a=n.n(o),s=n(6),l=n.n(s);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t){var n,r,i=t?d(t):{},o=null!=e.index?e.routes.slice(0,e.index+1):e.routes;if(0!==o.length){if(!(1===o.length&&void 0===o[0].key||2===o.length&&void 0===o[0].key&&o[0].name===(null===i||void 0===i?void 0:i.initialRouteName)&&void 0===o[1].key))return{type:"RESET",payload:e};for(var s=e.routes[null!==(n=e.index)&&void 0!==n?n:e.routes.length-1],l=null===s||void 0===s?void 0:s.state,c=null===i||void 0===i||null===(r=i.screens)||void 0===r?void 0:r[null===s||void 0===s?void 0:s.name],h=u({},s.params),f=s?{name:s.name,params:h}:void 0;l;){var p,m,g;if(0===l.routes.length)return;var v=null!=l.index?l.routes.slice(0,l.index+1):l.routes,y=v[v.length-1];if(a()(h,{initial:void 0,screen:void 0,params:void 0,state:void 0}),1===v.length&&void 0===v[0].key)h.initial=!0,h.screen=y.name;else{if(2!==v.length||void 0!==v[0].key||v[0].name!==(null===(p=c)||void 0===p?void 0:p.initialRouteName)||void 0!==v[1].key){h.state=l;break}h.initial=!1,h.screen=y.name}y.state?(h.params=u({},y.params),h=h.params):h.params=y.params,l=y.state,c=null===(m=c)||void 0===m||null===(g=m.screens)||void 0===g?void 0:g[y.name]}if(f)return{type:"NAVIGATE",payload:f}}}var d=function(e){return"object"===typeof e&&null!=e?{initialRouteName:e.initialRouteName,screens:null!=e.screens?f(e.screens):void 0}:{}},f=function(e){return Object.entries(e).reduce((function(e,t){var n=i()(t,2),r=n[0],o=n[1];return e[r]=d(o),e}),{})}},function(e,t,n){"use strict";n(109)},function(e,t){},function(e,t,n){var r=n(155)(n(205));e.exports=r},function(e,t,n){var r=n(379),i=n(381),o=n(382);function a(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function s(e,t,n,r){return e["@@transducer/result"](n[r](o(e["@@transducer/step"],e),t))}var l="undefined"!==typeof Symbol?Symbol.iterator:"@@iterator";e.exports=function(e,t,n){if("function"===typeof e&&(e=i(e)),r(n))return function(e,t,n){for(var r=0,i=n.length;r<i;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"===typeof n["fantasy-land/reduce"])return s(e,t,n,"fantasy-land/reduce");if(null!=n[l])return a(e,t,n[l]());if("function"===typeof n.next)return a(e,t,n);if("function"===typeof n.reduce)return s(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},function(e,t,n){var r=n(53)((function(e){return function(){return e}}));e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(48);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),o=a.join("&")}if(o){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(t,n,r){"use strict";(function(n){var i=r(48),o=r(423),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l={adapter:function(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof n&&"[object process]"===Object.prototype.toString.call(n))&&(e=r(211)),e}(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(t){if("string"===typeof t)try{t=JSON.parse(t)}catch(e){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(a)})),t.exports=l}).call(this,r(111))},function(t,n,r){"use strict";var i=r(48),o=r(424),a=r(426),s=r(208),l=r(427),c=r(430),u=r(431),h=r(212);t.exports=function(t){return new Promise((function(n,r){var d=t.data,f=t.headers;i.isFormData(d)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var m=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";f.Authorization="Basic "+btoa(m+":"+g)}var v=l(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),s(v,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,i={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:e,config:t,request:p};o(n,r,i),p=null}},p.onabort=function(){p&&(r(h("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){r(h("Network Error",t,null,p)),p=null},p.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(h(e,t,"ECONNABORTED",p)),p=null},i.isStandardBrowserEnv()){var y=(t.withCredentials||u(v))&&t.xsrfCookieName?a.read(t.xsrfCookieName):void 0;y&&(f[t.xsrfHeaderName]=y)}if("setRequestHeader"in p&&i.forEach(f,(function(e,t){"undefined"===typeof d&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)})),i.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"===typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"===typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(e){p&&(p.abort(),r(e),p=null)})),d||(d=null),p.send(d)}))}},function(e,t,n){"use strict";var r=n(425);e.exports=function(e,t,n,i,o){var a=new Error(e);return r(a,t,n,i,o)}},function(e,t,n){"use strict";var r=n(48);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),r.forEach(o,c),r.forEach(a,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=l(e[r],t[r]):r in e&&(n[r]=l(void 0,e[r]))}));var u=i.concat(o).concat(a).concat(s),h=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(h,c),n}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),i=n(144);function o(){return r.useContext(i.a)}},function(e,t){},function(e,t,n){var r=n(446),i={};for(var o in r)r.hasOwnProperty(o)&&(i[r[o]]=o);var a=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in a)if(a.hasOwnProperty(s)){if(!("channels"in a[s]))throw new Error("missing channels property: "+s);if(!("labels"in a[s]))throw new Error("missing channel labels property: "+s);if(a[s].labels.length!==a[s].channels)throw new Error("channel and label counts mismatch: "+s);var l=a[s].channels,c=a[s].labels;delete a[s].channels,delete a[s].labels,Object.defineProperty(a[s],"channels",{value:l}),Object.defineProperty(a[s],"labels",{value:c})}a.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,o=e[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a;return s===a?t=0:r===s?t=(i-o)/l:i===s?t=2+(o-r)/l:o===s&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+s)/2,[t,100*(s===a?0:n<=.5?l/(s+a):l/(2-s-a)),100*n]},a.rgb.hsv=function(e){var t,n,r,i,o,a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),h=function(e){return(c-e)/6/u+.5};return 0===u?i=o=0:(o=u/c,t=h(a),n=h(s),r=h(l),a===c?i=r-n:s===c?i=1/3+t-r:l===c&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*c]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},a.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},a.rgb.keyword=function(e){var t=i[e];if(t)return t;var n,o,a,s=1/0;for(var l in r)if(r.hasOwnProperty(l)){var c=r[l],u=(o=e,a=c,Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2));u<s&&(s=u,n=l)}return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){var t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.hsl.rgb=function(e){var t,n,r,i,o,a=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[o=255*l,o,o];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(r=a+1/3*-(c-1))<0&&r++,r>1&&r--,o=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[c]=255*o;return i},a.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,o=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=o<=1?o:2-o,[t,100*(0===r?2*i/(o+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},a.hsv.hsl=function(e){var t,n,r,i=e[0],o=e[1]/100,a=e[2]/100,s=Math.max(a,.01);return r=(2-o)*a,n=o*s,[i,100*(n=(n/=(t=(2-o)*s)<=1?t:2-t)||0),100*(r/=2)]},a.hwb.rgb=function(e){var t,n,r,i,o,a,s,l=e[0]/360,c=e[1]/100,u=e[2]/100,h=c+u;switch(h>1&&(c/=h,u/=h),r=6*l-(t=Math.floor(6*l)),0!==(1&t)&&(r=1-r),i=c+r*((n=1-u)-c),t){default:case 6:case 0:o=n,a=i,s=c;break;case 1:o=i,a=n,s=c;break;case 2:o=c,a=n,s=i;break;case 3:o=c,a=i,s=n;break;case 4:o=i,a=c,s=n;break;case 5:o=n,a=c,s=i}return[255*o,255*a,255*s]},a.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){var t,n,r,i=e[0]/100,o=e[1]/100,a=e[2]/100;return n=-.9689*i+1.8758*o+.0415*a,r=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},a.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var o=Math.pow(n,3),a=Math.pow(t,3),s=Math.pow(r,3);return n=o>.008856?o:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},a.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},a.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},a.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:a.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var o=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(o+=60),o},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,o=Math.max(Math.max(n,r),i),a=Math.min(Math.min(n,r),i),s=o-a;return t=s<=0?0:o===n?(r-i)/s%6:o===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},a.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,o=[0,0,0],a=t%1*6,s=a%1,l=1-s;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[255*(n*o[0]+i),255*(n*o[1]+i),255*(n*o[2]+i)]},a.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=a.gray.hsv=function(e){return[0,0,e[0]]},a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ie}));var r=n(9),i=n.n(r),o=n(19),a=n.n(o),s=n(6),l=n.n(s),c=n(17),u=n.n(c),h=n(22),d=n.n(h),f=n(0),p=(n(370),n(42)),m=n(67),g=n(44),v=n(141),y=n(140),b=n(40),w=n(93);var x=f.memo((function(e){return e.children}),(function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0,o=n;i<o.length;i++){var a=o[i];if("children"!==a&&e[a]!==t[a])return!1}return!0})),_=n(139);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){var t=e.screen,n=e.route,r=e.navigation,i=e.routeState,o=e.getState,a=e.setState,s=e.options,l=f.useRef(),c=f.useCallback((function(){return l.current}),[]),u=Object(_.a)({key:n.key,options:s,navigation:r}).addOptionsGetter,h=f.useCallback((function(e){l.current=e}),[]),d=f.useCallback((function(){var e=o().routes.find((function(e){return e.key===n.key}));return e?e.state:void 0}),[o,n.key]),p=f.useCallback((function(e){var t=o();a(A(A({},t),{},{routes:t.routes.map((function(t){return t.key===n.key?A(A({},t),{},{state:e}):t}))}))}),[o,n.key,a]),g=f.useRef(!0);f.useEffect((function(){g.current=!1}));var v=f.useCallback((function(){return g.current}),[]),y=f.useMemo((function(){return{state:i,getState:d,setState:p,getKey:c,setKey:h,getIsInitial:v,addOptionsGetter:u}}),[i,d,p,c,h,v,u]),b=t.getComponent?t.getComponent():t.component;return f.createElement(m.a.Provider,{value:y},f.createElement(w.b,null,f.createElement(x,{name:t.name,render:b||t.children,navigation:r,route:n},void 0!==b?f.createElement(b,{navigation:r,route:n}):void 0!==t.children?t.children({navigation:r,route:n}):null)))}var M=n(39),T=["emit"];function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var R=n(109),k=n(55);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){var t=e.state,n=e.screens,r=e.navigation,o=e.screenOptions,a=e.onAction,s=e.getState,c=e.setState,h=e.addListener,d=e.addKeyedListener,m=e.onRouteFocus,v=e.router,y=e.emitter,b=f.useState({}),w=i()(b,2),x=w[0],_=w[1],E=f.useContext(M.a),A=E.onDispatchAction,C=E.onOptionsChange,P=f.useMemo((function(){return{navigation:r,onAction:a,addListener:h,addKeyedListener:d,onRouteFocus:m,onDispatchAction:A,onOptionsChange:C}}),[r,a,h,d,m,A,C]),D=function(e){var t=e.state,n=e.getState,r=e.navigation,i=e.setOptions,o=e.router,a=e.emitter,s=f.useMemo((function(){return{current:{}}}),[n,r,i,o,a]),c=O(O({},o.actionCreators),p.CommonActions);return s.current=t.routes.reduce((function(e,t){var o=s.current[t.key];if(o)e[t.key]=o;else{r.emit;var h=u()(r,T),d=function(e){var i="function"===typeof e?e(n()):e;r.dispatch("object"===typeof i&&null!=i?O({source:t.key},i):i)},f=Object.keys(c).reduce((function(e,t){return e[t]=function(){return d(c[t].apply(c,arguments))},e}),{});e[t.key]=O(O(O(O({},h),f),a.create(t.key)),{},{dispatch:d,setOptions:function(e){return i((function(n){return O(O({},n),{},l()({},t.key,O(O({},n[t.key]),e)))}))},isFocused:function(){var e=n();return e.routes[e.index].key===t.key&&(!r||r.isFocused())}})}return e}),{}),s.current}({state:t,getState:s,navigation:r,setOptions:_,router:v,emitter:y});return Object(R.b)(t.routes).reduce((function(e,r,i){var a=n[r.name],l=D[r.key],u=L(L(L({},"object"===typeof o||null==o?o:o({route:r,navigation:l})),"object"===typeof a.options||null==a.options?a.options:a.options({route:r,navigation:l})),x[r.key]);return e[r.key]={navigation:l,render:function(){return f.createElement(M.a.Provider,{key:r.key,value:P},f.createElement(k.a.Provider,{value:l},f.createElement(g.a.Provider,{value:r},f.createElement(S,{navigation:l,route:r,screen:a,routeState:t.routes[i].state,getState:s,setState:c,options:u}))))},options:u},e}),{})}var I=n(135),N=n(86);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}N.a;var V=Symbol("VISITED_ROUTE_KEYS"),G=function(e,t,n,r,i){for(var o,a,s=r.map((function(e){return e.key})),c=n.filter((function(e){return!s.includes(e.key)})).reverse(),u=null!==(o=i[V])&&void 0!==o?o:new Set,h=U(U({},i),{},l()({},V,u)),d=F(c);!(a=d()).done;){var f,p=a.value;if(!u.has(p.key)){if(null===(f=t[p.key])||void 0===f?void 0:f.call(t,h))return!0;if(u.add(p.key),e.emit({type:"beforeRemove",target:p.key,data:{action:h},canPreventDefault:!0}).defaultPrevented)return!0}}return!1};function W(e){var t=e.router,n=e.getState,r=e.setState,i=e.key,o=e.actionListeners,a=e.beforeRemoveListeners,s=e.routerConfigOptions,l=e.emitter,c=f.useContext(M.a),u=c.onAction,h=c.onRouteFocus,d=c.addListener,p=c.onDispatchAction,m=f.useRef(s);f.useEffect((function(){m.current=s}));var v=f.useCallback((function(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,c=n();if(s.has(c.key))return!1;if(s.add(c.key),"string"!==typeof e.target||e.target===c.key){var d=t.getStateForAction(c,e,m.current);if(null!==(d=null===d&&e.target===c.key?c:d)){if(p(e,c===d),c!==d){var f=G(l,a,c.routes,d.routes,e);if(f)return!0;r(d)}if(void 0!==h){var g=t.shouldActionChangeFocus(e);g&&void 0!==i&&h(i)}return!0}}if(void 0!==u&&u(e,s))return!0;for(var v=o.length-1;v>=0;v--){var y=o[v];if(y(e,s))return!0}return!1}),[o,a,l,n,i,u,p,h,t,r]);return function(e){var t=e.getState,n=e.emitter,r=e.beforeRemoveListeners,i=f.useContext(M.a).addKeyedListener,o=f.useContext(g.a),a=null===o||void 0===o?void 0:o.key;f.useEffect((function(){if(a)return null===i||void 0===i?void 0:i("beforeRemove",a,(function(e){var i=t();return G(n,r,i.routes,[],e)}))}),[i,r,n,t,a])}({getState:n,emitter:l,beforeRemoveListeners:a}),f.useEffect((function(){return null===d||void 0===d?void 0:d("action",v)}),[d,v]),v}var q=n(137);function X(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var K=n(138);function Q(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))}function Z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $=n(136),ee=n(124);var te=["children"];function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}N.a;function ie(e,t){var n=function(){var e=f.useState((function(){return Object(b.a)()})),t=i()(e,1)[0],n=f.useContext(w.a);if(void 0===n)throw new Error("Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?");return f.useEffect((function(){var e=n.register,r=n.unregister;return e(t),function(){return r(t)}}),[n,t]),t}(),r=f.useContext(g.a),o=t.children,s=u()(t,te),c=f.useRef(e(re(re({},s),null!==r&&void 0!==r&&r.params&&null==r.params.state&&!1!==r.params.initial&&"string"===typeof r.params.screen?{initialRouteName:r.params.screen}:null))).current,h=function e(t){return f.Children.toArray(t).reduce((function(t,n){var r,i;if(f.isValidElement(n)){if(n.type===v.a)return t.push(n.props),t;if(n.type===f.Fragment)return t.push.apply(t,d()(e(n.props.children))),t}throw new Error("A navigator can only contain 'Screen' components as its direct children (found ".concat(f.isValidElement(n)?"'".concat("string"===typeof n.type?n.type:null===(r=n.type)||void 0===r?void 0:r.name,"'").concat(null!==(i=n.props)&&void 0!==i&&i.name?" for the screen '".concat(n.props.name,"'"):""):"object"===typeof n?JSON.stringify(n):"'".concat(String(n),"'"),"). To render this component in the navigator, pass it in the 'component' prop to 'Screen'."))}),[])}(o),x=h.reduce((function(e,t){if(t.name in e)throw new Error("A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '".concat(t.name,"')"));return e[t.name]=t,e}),{}),_=h.map((function(e){return e.name})),E=_.reduce((function(e,t){var n,i,o,a=x[t].initialParams,s=null==(null===r||void 0===r||null===(n=r.params)||void 0===n?void 0:n.state)&&!1!==(null===r||void 0===r||null===(i=r.params)||void 0===i?void 0:i.initial)&&(null===r||void 0===r||null===(o=r.params)||void 0===o?void 0:o.screen)===t?r.params.params:void 0;return e[t]=void 0!==a||void 0!==s?re(re({},a),s):void 0,e}),{}),A=_.reduce((function(e,t){return a()(e,l()({},t,x[t].getId))}),{});if(!_.length)throw new Error("Couldn't find any screens for the navigator. Have you defined any screens as its children?");var S=f.useCallback((function(e){return void 0===e.type||e.type===c.type}),[c.type]),T=f.useCallback((function(e){return void 0!==e&&!1===e.stale&&S(e)}),[S]),C=f.useContext(m.a),O=C.state,R=C.getState,P=C.setState,L=C.setKey,N=C.getKey,j=C.getIsInitial,F=f.useMemo((function(){var e,t,n;return void 0!==O&&S(O)||null!=(null===r||void 0===r||null===(e=r.params)||void 0===e?void 0:e.state)?[c.getRehydratedState(null!==(t=null===r||void 0===r||null===(n=r.params)||void 0===n?void 0:n.state)&&void 0!==t?t:O,{routeNames:_,routeParamList:E,routeGetIdList:A}),!1]:[c.getInitialState({routeNames:_,routeParamList:E,routeGetIdList:A}),!0]}),[O,c,S]),z=i()(F,2),H=z[0],U=z[1],V=T(O)?O:H,G=V;Q(V.routeNames,_)||(G=c.getStateForRouteNamesChange(V,{routeNames:_,routeParamList:E,routeGetIdList:A}));var Y=f.useRef(null===r||void 0===r?void 0:r.params);if(f.useEffect((function(){Y.current=null===r||void 0===r?void 0:r.params}),[null===r||void 0===r?void 0:r.params]),null!==r&&void 0!==r&&r.params){var Z,ne=Y.current;"object"===typeof r.params.state&&null!=r.params.state&&r.params.state!==(null===ne||void 0===ne?void 0:ne.state)?Z=p.CommonActions.reset(r.params.state):"string"===typeof r.params.screen&&(!1===r.params.initial&&U||r.params!==ne)&&(Z=p.CommonActions.navigate(r.params.screen,r.params.params));var ie=Z?c.getStateForAction(G,Z,{routeNames:_,routeParamList:E,routeGetIdList:A}):null;G=null!==ie?c.getRehydratedState(ie,{routeNames:_,routeParamList:E,routeGetIdList:A}):G}var oe=V!==G;Object($.b)((function(){oe&&P(G)})),V=G,f.useEffect((function(){return L(n),j()||P(G),function(){setTimeout((function(){void 0!==R()&&N()===n&&P(void 0)}),0)}}),[]);var ae=f.useRef();ae.current=H;var se=f.useCallback((function(){var e=R();return T(e)?e:ae.current}),[R,T]),le=Object(y.a)((function(e){var t,n,r,i=[];e.target?null!==(r=n=V.routes.find((function(t){return t.key===e.target})))&&void 0!==r&&r.name&&i.push(n.name):(n=V.routes[V.index],i.push.apply(i,d()(Object.keys(x).filter((function(e){var t;return(null===(t=n)||void 0===t?void 0:t.name)===e})))));if(null!=n){var o=ye[n.key].navigation;(t=[]).concat.apply(t,d()(i.map((function(t){var r=x[t].listeners,i="function"===typeof r?r({route:n,navigation:o}):r;return i?Object.keys(i).filter((function(t){return t===e.type})).map((function(e){return null===i||void 0===i?void 0:i[e]})):void 0})))).filter((function(e,t,n){return e&&n.lastIndexOf(e)===t})).forEach((function(t){return null===t||void 0===t?void 0:t(e)}))}}));!function(e){var t=e.state,n=e.emitter,r=f.useContext(k.a),i=f.useRef(),o=t.routes[t.index].key;f.useEffect((function(){return null===r||void 0===r?void 0:r.addListener("focus",(function(){i.current=o,n.emit({type:"focus",target:o})}))}),[o,n,r]),f.useEffect((function(){return null===r||void 0===r?void 0:r.addListener("blur",(function(){i.current=void 0,n.emit({type:"blur",target:o})}))}),[o,n,r]),f.useEffect((function(){var e=i.current;i.current=o,void 0!==e||r||n.emit({type:"focus",target:o}),e===o||r&&!r.isFocused()||void 0!==e&&(n.emit({type:"blur",target:e}),n.emit({type:"focus",target:o}))}),[o,n,r])}({state:V,emitter:le}),f.useEffect((function(){le.emit({type:"state",data:{state:V}})}),[le,V]);var ce=Object(q.a)(),ue=ce.listeners,he=ce.addListener,de=Object(K.a)(),fe=de.keyedListeners,pe=de.addKeyedListener,me=W({router:c,getState:se,setState:P,key:null===r||void 0===r?void 0:r.key,actionListeners:ue.action,beforeRemoveListeners:fe.beforeRemove,routerConfigOptions:{routeNames:_,routeParamList:E,routeGetIdList:A},emitter:le}),ge=function(e){var t=e.router,n=e.getState,r=e.key,i=e.setState,o=f.useContext(M.a).onRouteFocus;return f.useCallback((function(e){var a=n(),s=t.getStateForRouteFocus(a,e);s!==a&&i(s),void 0!==o&&void 0!==r&&o(r)}),[n,o,t,i,r])}({router:c,key:null===r||void 0===r?void 0:r.key,getState:se,setState:P}),ve=function(e){var t=e.onAction,n=e.getState,r=e.emitter,i=e.router,o=f.useContext(I.a),a=f.useContext(k.a);return f.useMemo((function(){var e=function(e){var r="function"===typeof e?e(n()):e;t(r)||null===o||void 0===o||o(r)},s=B(B({},i.actionCreators),p.CommonActions),l=Object.keys(s).reduce((function(t,n){return t[n]=function(){return e(s[n].apply(s,arguments))},t}),{});return B(B(B({},a),l),{},{dispatch:e,emit:r.emit,isFocused:a?a.isFocused:function(){return!0},canGoBack:function(){var e=n();return null!==i.getStateForAction(e,p.CommonActions.goBack(),{routeNames:e.routeNames,routeParamList:{},routeGetIdList:{}})||(null===a||void 0===a?void 0:a.canGoBack())||!1},dangerouslyGetParent:function(){return a},dangerouslyGetState:n})}),[r.emit,n,t,o,a,i])}({onAction:me,getState:se,emitter:le,router:c});!function(e){var t=e.navigation,n=e.focusedListeners,r=f.useContext(M.a).addListener,i=f.useCallback((function(e){if(t.isFocused()){for(var r,i=X(n);!(r=i()).done;){var o=(0,r.value)(e),a=o.handled,s=o.result;if(a)return{handled:a,result:s}}return{handled:!0,result:e(t)}}return{handled:!1,result:null}}),[n,t]);f.useEffect((function(){return null===r||void 0===r?void 0:r("focus",i)}),[r,i])}({navigation:ve,focusedListeners:ue.focus}),function(e){var t=e.getState,n=e.getStateListeners,r=f.useContext(M.a).addKeyedListener,i=f.useContext(g.a),o=i?i.key:"root",a=f.useCallback((function(){var e=t(),r=e.routes.map((function(e){var t,r=null===(t=n[e.key])||void 0===t?void 0:t.call(n);return e.state===r?e:J(J({},e),{},{state:r})}));return Q(e.routes,r)?e:J(J({},e),{},{routes:r})}),[t,n]);f.useEffect((function(){return null===r||void 0===r?void 0:r("getState",o,a)}),[r,a,o])}({getState:se,getStateListeners:fe.getState});var ye=D({state:V,screens:x,navigation:ve,screenOptions:t.screenOptions,onAction:me,getState:se,setState:P,onRouteFocus:ge,addListener:he,addKeyedListener:pe,router:c,emitter:le});return function(e){var t=e.state,n=e.navigation,r=e.descriptors,i=f.useContext(ee.a);i&&n.isFocused()&&(i.options=r[t.routes[t.index].key].options)}({state:V,navigation:ve,descriptors:ye}),{state:V,navigation:ve,descriptors:ye}}},function(e,t,n){"use strict";var r=n(9),i=n.n(r),o=n(6),a=n.n(o),s=n(17),l=n.n(s),c=n(0),u=n(74),h=n(126),d=n(87),f=c.createContext({options:void 0});f.displayName="LinkingContext";var p=f,m=n(7),g=n.n(m);var v=n(128);var y=n(125),b=["theme","linking","fallback","documentTitle","onReady"];function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(){return(x=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _=c.forwardRef((function(e,t){var n=e.theme,r=void 0===n?d.a:n,o=e.linking,s=e.fallback,f=void 0===s?null:s,m=e.documentTitle,_=e.onReady,E=l()(e,b),A=!!o&&!1!==o.enabled,S=c.useRef(null);Object(y.a)(S),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.enabled,r=void 0===n||n,i=t.formatter,o=void 0===i?function(e,t){var n;return null!==(n=null===e||void 0===e?void 0:e.title)&&void 0!==n?n:null===t||void 0===t?void 0:t.name}:i;c.useEffect((function(){if(r){var t=e.current;if(t){var n=o(t.getCurrentOptions(),t.getCurrentRoute());document.title=n}return null===t||void 0===t?void 0:t.addListener("options",(function(e){var n=o(e.data.options,null===t||void 0===t?void 0:t.getCurrentRoute());document.title=n}))}}))}(S,m);var M=function(e){var t=c.useState(e),n=i()(t,1)[0],r=[!1,void 0];n.then((function(e){r=[!0,e]}));var o=c.useState(r),a=i()(o,2),s=a[0],l=a[1],u=i()(s,1)[0];return c.useEffect((function(){var e=!1;return u||function(){var t;g.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,g.a.awrap(n);case 3:t=r.sent;case 4:return r.prev=4,e||l([!0,t]),r.finish(4);case 7:case"end":return r.stop()}}),null,null,[[0,,4,7]],Promise)}(),function(){e=!0}}),[n,u]),s}(Object(v.a)(S,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({enabled:A,prefixes:[]},o)).getInitialState),T=i()(M,2),C=T[0],O=T[1];c.useImperativeHandle(t,(function(){return S.current}));var R=c.useMemo((function(){return{options:o}}),[o]),k=null!=E.initialState||!A||C,P=c.useRef(_);return c.useEffect((function(){P.current=_})),c.useEffect((function(){var e;k&&(null===(e=P.current)||void 0===e||e.call(P))}),[k]),k?c.createElement(p.Provider,{value:R},c.createElement(h.a,{value:r},c.createElement(u.BaseNavigationContainer,x({},E,{initialState:null==E.initialState?O:E.initialState,ref:S})))):f}));t.a=_},,,function(e,t,n){"use strict";var r=n(291);e.exports={isRtlLang:r.isRtlLang,getLangDir:r.getLangDir}},function(e,t,n){"use strict";var r=n(293),i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Sources cannot be null or undefined");return Object(e)}function s(e,t,n){var o=t[n];if(void 0!==o&&null!==o){if(i.call(e,n)&&(void 0===e[n]||null===e[n]))throw new TypeError("Cannot convert undefined or null to object ("+n+")");i.call(e,n)&&r(o)?e[n]=l(Object(e[n]),t[n]):e[n]=o}}function l(e,t){if(e===t)return e;for(var n in t=Object(t))i.call(t,n)&&s(e,t,n);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),a=0;a<r.length;a++)o.call(t,r[a])&&s(e,t,r[a]);return e}e.exports=function(e){e=a(e);for(var t=1;t<arguments.length;t++)l(e,arguments[t]);return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prefixMap,n=e.plugins;return function e(s){for(var l in s){var c=s[l];if((0,a.default)(c))s[l]=e(c);else if(Array.isArray(c)){for(var u=[],h=0,d=c.length;h<d;++h){var f=(0,i.default)(n,l,c[h],s,t);(0,o.default)(u,f||c[h])}u.length>0&&(s[l]=u)}else{var p=(0,i.default)(n,l,c,s,t);p&&(s[l]=p),s=(0,r.default)(t,l,s)}}return s}};var r=s(n(297)),i=s(n(298)),o=s(n(299)),a=s(n(300));function s(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&"text"===t)return["-webkit-text","text"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("cross-fade(")>-1)return a.map((function(e){return t.replace(/cross-fade\(/g,e+"cross-fade(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("cursor"===e&&i.hasOwnProperty(t))return r.map((function(e){return e+t}))};var r=["-webkit-","-moz-",""],i={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("filter(")>-1)return a.map((function(e){return t.replace(/filter\(/g,e+"filter(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("display"===e&&r.hasOwnProperty(t))return r[t]};var r={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){Object.prototype.hasOwnProperty.call(i,e)&&(n[i[e]]=r[t]||t);if("flex"===e){if(Object.prototype.hasOwnProperty.call(o,t))return void(n.msFlex=o[t]);if(a.test(t))return void(n.msFlex=t+" 1 0%");var s=t.split(/\s/);switch(s.length){case 1:return void(n.msFlex="1 1 "+t);case 2:return void(a.test(s[1])?n.msFlex=s[0]+" "+s[1]+" 0%":n.msFlex=s[0]+" 1 "+s[1]);default:n.msFlex=t}}};var r={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},i={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msFlexPreferredSize"},o={auto:"1 1 auto",inherit:"inherit",initial:"0 1 auto",none:"0 0 auto",unset:"unset"},a=/^\d+(\.\d+)?$/},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){"flexDirection"===e&&"string"===typeof t&&(t.indexOf("column")>-1?n.WebkitBoxOrient="vertical":n.WebkitBoxOrient="horizontal",t.indexOf("reverse")>-1?n.WebkitBoxDirection="reverse":n.WebkitBoxDirection="normal");i.hasOwnProperty(e)&&(n[i[e]]=r[t]||t)};var r={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},i={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&s.test(t))return a.map((function(e){return t.replace(s,(function(t){return e+t}))}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-","-moz-",""],s=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function i(e){return"number"===typeof e&&!isNaN(e)}function o(e){return"string"===typeof e&&e.includes("/")}t.default=function(e,t,n){if("display"===e&&t in s)return s[t];if(e in l){(0,l[e])(t,n)}};var a=["center","end","start","stretch"],s={"inline-grid":["-ms-inline-grid","inline-grid"],grid:["-ms-grid","grid"]},l={alignSelf:function(e,t){a.indexOf(e)>-1&&(t.msGridRowAlign=e)},gridColumn:function(e,t){if(i(e))t.msGridColumn=e;else if(o(e)){var n=e.split("/"),a=r(n,2),s=a[0],c=a[1];l.gridColumnStart(+s,t);var u=c.split(/ ?span /),h=r(u,2),d=h[0],f=h[1];""===d?l.gridColumnEnd(+s+ +f,t):l.gridColumnEnd(+c,t)}else l.gridColumnStart(e,t)},gridColumnEnd:function(e,t){var n=t.msGridColumn;i(e)&&i(n)&&(t.msGridColumnSpan=e-n)},gridColumnStart:function(e,t){i(e)&&(t.msGridColumn=e)},gridRow:function(e,t){if(i(e))t.msGridRow=e;else if(o(e)){var n=e.split("/"),a=r(n,2),s=a[0],c=a[1];l.gridRowStart(+s,t);var u=c.split(/ ?span /),h=r(u,2),d=h[0],f=h[1];""===d?l.gridRowEnd(+s+ +f,t):l.gridRowEnd(+c,t)}else l.gridRowStart(e,t)},gridRowEnd:function(e,t){var n=t.msGridRow;i(e)&&i(n)&&(t.msGridRowSpan=e-n)},gridRowStart:function(e,t){i(e)&&(t.msGridRow=e)},gridTemplateColumns:function(e,t){t.msGridColumns=e},gridTemplateRows:function(e,t){t.msGridRows=e},justifySelf:function(e,t){a.indexOf(e)>-1&&(t.msGridColumnAlign=e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("string"===typeof t&&!(0,o.default)(t)&&t.indexOf("image-set(")>-1)return a.map((function(e){return t.replace(/image-set\(/g,e+"image-set(")}))};var r,i=n(100),o=(r=i)&&r.__esModule?r:{default:r};var a=["-webkit-",""]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(Object.prototype.hasOwnProperty.call(r,e))for(var i=r[e],o=0,a=i.length;o<a;++o)n[i[o]]=t};var r={marginBlockStart:["WebkitMarginBefore"],marginBlockEnd:["WebkitMarginAfter"],marginInlineStart:["WebkitMarginStart","MozMarginStart"],marginInlineEnd:["WebkitMarginEnd","MozMarginEnd"],paddingBlockStart:["WebkitPaddingBefore"],paddingBlockEnd:["WebkitPaddingAfter"],paddingInlineStart:["WebkitPaddingStart","MozPaddingStart"],paddingInlineEnd:["WebkitPaddingEnd","MozPaddingEnd"],borderBlockStart:["WebkitBorderBefore"],borderBlockStartColor:["WebkitBorderBeforeColor"],borderBlockStartStyle:["WebkitBorderBeforeStyle"],borderBlockStartWidth:["WebkitBorderBeforeWidth"],borderBlockEnd:["WebkitBorderAfter"],borderBlockEndColor:["WebkitBorderAfterColor"],borderBlockEndStyle:["WebkitBorderAfterStyle"],borderBlockEndWidth:["WebkitBorderAfterWidth"],borderInlineStart:["WebkitBorderStart","MozBorderStart"],borderInlineStartColor:["WebkitBorderStartColor","MozBorderStartColor"],borderInlineStartStyle:["WebkitBorderStartStyle","MozBorderStartStyle"],borderInlineStartWidth:["WebkitBorderStartWidth","MozBorderStartWidth"],borderInlineEnd:["WebkitBorderEnd","MozBorderEnd"],borderInlineEndColor:["WebkitBorderEndColor","MozBorderEndColor"],borderInlineEndStyle:["WebkitBorderEndStyle","MozBorderEndStyle"],borderInlineEndWidth:["WebkitBorderEndWidth","MozBorderEndWidth"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if("position"===e&&"sticky"===t)return["-webkit-sticky","sticky"]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(i.hasOwnProperty(e)&&o.hasOwnProperty(t))return r.map((function(e){return e+t}))};var r=["-webkit-","-moz-",""],i={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},o={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,a){if("string"===typeof t&&s.hasOwnProperty(e)){var c=function(e,t){if((0,i.default)(e))return e;for(var n=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,a=n.length;o<a;++o){var s=n[o],c=[s];for(var u in t){var h=(0,r.default)(u);if(s.indexOf(h)>-1&&"order"!==h)for(var d=t[u],f=0,p=d.length;f<p;++f)c.unshift(s.replace(h,l[d[f]]+h))}n[o]=c.join(",")}return n.join(",")}(t,a),u=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-moz-|-ms-/.test(e)})).join(",");if(e.indexOf("Webkit")>-1)return u;var h=c.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter((function(e){return!/-webkit-|-ms-/.test(e)})).join(",");return e.indexOf("Moz")>-1?h:(n["Webkit"+(0,o.default)(e)]=u,n["Moz"+(0,o.default)(e)]=h,c)}};var r=a(n(301)),i=a(n(100)),o=a(n(180));function a(e){return e&&e.__esModule?e:{default:e}}var s={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},l={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"}},function(e,t,n){"use strict";var r=n(0),i=n(304);if("undefined"===typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;e.exports=i(r.Component,r.isValidElement,o)},function(e,t,n){"use strict";var r=n(133);t.a=r.a("NativeAnimatedTurboModule")},function(e,t,n){"use strict";var r=n(133);t.a=r.a("NativeAnimatedModule")},function(e,t,n){"use strict";(function(e){var r=n(90),i=n(15);function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var a=function(t){var n,r;function a(e){var n,r,o,a;return(a=t.call(this)||this)._deceleration=null!==(n=e.deceleration)&&void 0!==n?n:.998,a._velocity=e.velocity,a._useNativeDriver=Object(i.c)(e),a.__isInteraction=null!==(r=e.isInteraction)&&void 0!==r?r:!a._useNativeDriver,a.__iterations=null!==(o=e.iterations)&&void 0!==o?o:1,a}r=t,(n=a).prototype=Object.create(r.prototype),n.prototype.constructor=n,o(n,r);var s=a.prototype;return s.__getNativeAnimationConfig=function(){return{type:"decay",deceleration:this._deceleration,velocity:this._velocity,iterations:this.__iterations}},s.start=function(e,t,n,r,i){this.__active=!0,this._lastValue=e,this._fromValue=e,this._onUpdate=t,this.__onEnd=n,this._startTime=Date.now(),this._useNativeDriver?this.__startNativeAnimation(i):this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))},s.onUpdate=function(){var e=Date.now(),t=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(e-this._startTime)));this._onUpdate(t),Math.abs(this._lastValue-t)<.1?this.__debouncedOnEnd({finished:!0}):(this._lastValue=t,this.__active&&(this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this))))},s.stop=function(){t.prototype.stop.call(this),this.__active=!1,e.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})},a}(r.a);t.a=a}).call(this,n(43))},function(e,t,n){"use strict";(function(e){function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=function(){this.any_blank_count=0,this.any_blank_ms=0,this.any_blank_speed_sum=0,this.mostly_blank_count=0,this.mostly_blank_ms=0,this.pixels_blank=0,this.pixels_sampled=0,this.pixels_scrolled=0,this.total_time_spent=0,this.sample_count=0},a=[],s=10,l=null,c=function(){function t(e){this._anyBlankStartTime=null,this._enabled=!1,this._info=new o,this._mostlyBlankStartTime=null,this._samplesStartTime=null,this._getFrameMetrics=e,this._enabled=(l||0)>Math.random(),this._resetData()}t.addListener=function(e){return null===l&&console.warn("Call `FillRateHelper.setSampleRate` before `addListener`."),a.push(e),{remove:function(){a=a.filter((function(t){return e!==t}))}}},t.setSampleRate=function(e){l=e},t.setMinSampleCount=function(e){s=e};var n=t.prototype;return n.activate=function(){this._enabled&&null==this._samplesStartTime&&(this._samplesStartTime=e.performance.now())},n.deactivateAndFlush=function(){if(this._enabled){var t=this._samplesStartTime;if(null!=t)if(this._info.sample_count<s)this._resetData();else{var n=e.performance.now()-t,i=r(r({},this._info),{},{total_time_spent:n});a.forEach((function(e){return e(i)})),this._resetData()}}},n.computeBlankness=function(t,n,r){if(!this._enabled||0===t.getItemCount(t.data)||null==this._samplesStartTime)return 0;var i=r.dOffset,o=r.offset,a=r.velocity,s=r.visibleLength;this._info.sample_count++,this._info.pixels_sampled+=Math.round(s),this._info.pixels_scrolled+=Math.round(Math.abs(i));var l=Math.round(1e3*Math.abs(a)),c=e.performance.now();null!=this._anyBlankStartTime&&(this._info.any_blank_ms+=c-this._anyBlankStartTime),this._anyBlankStartTime=null,null!=this._mostlyBlankStartTime&&(this._info.mostly_blank_ms+=c-this._mostlyBlankStartTime),this._mostlyBlankStartTime=null;for(var u=0,h=n.first,d=this._getFrameMetrics(h);h<=n.last&&(!d||!d.inLayout);)d=this._getFrameMetrics(h),h++;d&&h>0&&(u=Math.min(s,Math.max(0,d.offset-o)));for(var f=0,p=n.last,m=this._getFrameMetrics(p);p>=n.first&&(!m||!m.inLayout);)m=this._getFrameMetrics(p),p--;if(m&&p<t.getItemCount(t.data)-1){var g=m.offset+m.length;f=Math.min(s,Math.max(0,o+s-g))}var v=Math.round(u+f),y=v/s;return y>0?(this._anyBlankStartTime=c,this._info.any_blank_speed_sum+=l,this._info.any_blank_count++,this._info.pixels_blank+=v,y>.5&&(this._mostlyBlankStartTime=c,this._info.mostly_blank_count++)):(l<.01||Math.abs(i)<1)&&this.deactivateAndFlush(),y},n.enabled=function(){return this._enabled},n._resetData=function(){this._anyBlankStartTime=null,this._info=new o,this._mostlyBlankStartTime=null,this._samplesStartTime=null},t}();t.a=c}).call(this,n(43))},function(e,t,n){e.exports=function(e){"uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId);void 0===e.multigraph&&(e.multigraph=!1);if("function"!==typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t=new Map,n=[],c={},u=0,h=e.multigraph?function(e,t,n){var r=l(e,t),i=c.hasOwnProperty(r);if(i||M(e,t)){i||(c[r]=0);var o="@"+ ++c[r];r=l(e+o,t+o)}return new s(e,t,n,r)}:function(e,t,n){var r=l(e,t);return new s(e,t,n,r)},d=[],f=T,p=T,m=T,g=T,v={addNode:w,addLink:function(e,t,r){m();var i=x(e)||w(e),o=x(t)||w(t),s=h(e,t,r);n.push(s),a(i,s),e!==t&&a(o,s);return f(s,"add"),g(),s},removeLink:S,removeNode:_,getNode:x,getNodeCount:E,getLinkCount:A,getLinksCount:A,getNodesCount:E,getLinks:function(e){var t=x(e);return t?t.links:null},forEachNode:R,forEachLinkedNode:function(e,n,r){var i=x(e);if(i&&i.links&&"function"===typeof n)return r?function(e,n,r){for(var i=0;i<e.length;++i){var o=e[i];if(o.fromId===n&&r(t.get(o.toId),o))return!0}}(i.links,e,n):function(e,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=o.fromId===n?o.toId:o.fromId;if(r(t.get(a),o))return!0}}(i.links,e,n)},forEachLink:function(e){var t,r;if("function"===typeof e)for(t=0,r=n.length;t<r;++t)e(n[t])},beginUpdate:m,endUpdate:g,clear:function(){m(),R((function(e){_(e.id)})),g()},hasLink:M,hasNode:x,getLink:M};return r(v),function(){var e=v.on;v.on=function(){return v.beginUpdate=m=C,v.endUpdate=g=O,f=y,p=b,v.on=e,e.apply(v,arguments)}}(),v;function y(e,t){d.push({link:e,changeType:t})}function b(e,t){d.push({node:e,changeType:t})}function w(e,n){if(void 0===e)throw new Error("Invalid node identifier");m();var r=x(e);return r?(r.data=n,p(r,"update")):(r=new o(e,n),p(r,"add")),t.set(e,r),g(),r}function x(e){return t.get(e)}function _(e){var n=x(e);if(!n)return!1;m();var r=n.links;if(r){n.links=null;for(var i=0;i<r.length;++i)S(r[i])}return t.delete(e),p(n,"remove"),g(),!0}function E(){return t.size}function A(){return n.length}function S(e){if(!e)return!1;var t=i(e,n);if(t<0)return!1;m(),n.splice(t,1);var r=x(e.fromId),o=x(e.toId);return r&&(t=i(e,r.links))>=0&&r.links.splice(t,1),o&&(t=i(e,o.links))>=0&&o.links.splice(t,1),f(e,"remove"),g(),!0}function M(e,t){var n,r=x(e);if(!r||!r.links)return null;for(n=0;n<r.links.length;++n){var i=r.links[n];if(i.fromId===e&&i.toId===t)return i}return null}function T(){}function C(){u+=1}function O(){0===(u-=1)&&d.length>0&&(v.fire("changed",d),d.length=0)}function R(e){if("function"!==typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var n=t.values(),r=n.next();!r.done;){if(e(r.value))return!0;r=n.next()}}};var r=n(152);function i(e,t){if(!t)return-1;if(t.indexOf)return t.indexOf(e);var n,r=t.length;for(n=0;n<r;n+=1)if(t[n]===e)return n;return-1}function o(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.push(t):e.links=[t]}function s(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function l(e,t){return e.toString()+"\ud83d\udc49 "+t.toString()}},function(e,t,n){e.exports=function(e,t){if(!e)throw new Error("Graph structure cannot be undefined");var o=(t&&t.createSimulator||n(182))(t);if(Array.isArray(t))throw new Error("Physics settings is expected to be an object");var a=function(t){var n=e.getLinks(t);return n?1+n.length/3:1};t&&"function"===typeof t.nodeMass&&(a=t.nodeMass);var s=new Map,l={},c=0,u=o.settings.springTransform||i;c=0,e.forEachNode((function(e){g(e.id),c+=1})),e.forEachLink(y),e.on("changed",m);var h=!1,d={step:function(){if(0===c)return f(!0),!0;var e=o.step();d.lastMove=e,d.fire("step");var t=e/c<=.01;return f(t),t},getNodePosition:function(e){return x(e).pos},setNodePosition:function(e){var t=x(e);t.setPosition.apply(t,Array.prototype.slice.call(arguments,1))},getLinkPosition:function(e){var t=l[e];if(t)return{from:t.from.pos,to:t.to.pos}},getGraphRect:function(){return o.getBBox()},forEachBody:p,pinNode:function(e,t){x(e.id).isPinned=!!t},isNodePinned:function(e){return x(e.id).isPinned},dispose:function(){e.off("changed",m),d.fire("disposed")},getBody:function(e){return s.get(e)},getSpring:function(t,n){var r;if(void 0===n)r="object"!==typeof t?t:t.id;else{var i=e.hasLink(t,n);if(!i)return;r=i.id}return l[r]},getForceVectorLength:function(){var e=0,t=0;return p((function(n){e+=Math.abs(n.force.x),t+=Math.abs(n.force.y)})),Math.sqrt(e*e+t*t)},simulator:o,graph:e,lastMove:0};return r(d),d;function f(e){var t;h!==e&&(h=e,t=e,d.fire("stable",t))}function p(e){s.forEach(e)}function m(t){for(var n=0;n<t.length;++n){var r=t[n];"add"===r.changeType?(r.node&&g(r.node.id),r.link&&y(r.link)):"remove"===r.changeType&&(r.node&&v(r.node),r.link&&b(r.link))}c=e.getNodesCount()}function g(t){var n=s.get(t);if(!n){var r=e.getNode(t);if(!r)throw new Error("initBody() was called with unknown node id");var i=r.position;if(!i){var a=function(e){var t=[];if(!e.links)return t;for(var n=Math.min(e.links.length,2),r=0;r<n;++r){var i=e.links[r],o=i.fromId!==e.id?s.get(i.fromId):s.get(i.toId);o&&o.pos&&t.push(o)}return t}(r);i=o.getBestNewBodyPosition(a)}(n=o.addBodyAt(i)).id=t,s.set(t,n),w(t),function(e){return e&&(e.isPinned||e.data&&e.data.isPinned)}(r)&&(n.isPinned=!0)}}function v(e){var t=e.id,n=s.get(t);n&&(s.delete(t),o.removeBody(n))}function y(e){w(e.fromId),w(e.toId);var t=s.get(e.fromId),n=s.get(e.toId),r=o.addSpring(t,n,e.length);u(e,r),l[e.id]=r}function b(t){var n=l[t.id];if(n){var r=e.getNode(t.fromId),i=e.getNode(t.toId);r&&w(r.id),i&&w(i.id),delete l[t.id],o.removeSpring(n)}}function w(e){var t=s.get(e);if(t.mass=a(e),Number.isNaN(t.mass))throw new Error("Node mass should be a number")}function x(e){var t=s.get(e);return t||(g(e),t=s.get(e)),t}},e.exports.simulator=n(182);var r=n(152);function i(){}},function(e,t){function n(e,t,n){var r,i,o,a,s;function l(){var c=Date.now()-a;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(o,i),o=i=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}n.debounce=n,e.exports=n},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return g}));var r,i,o=0,a=0,s=0,l=0,c=0,u=0,h="object"===typeof performance&&performance.now?performance:Date,d="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function f(){return c||(d(p),c=h.now()+u)}function p(){c=0}function m(){this._call=this._time=this._next=null}function g(e,t,n){var r=new m;return r.restart(e,t,n),r}function v(){c=(l=h.now())+u,o=a=0;try{!function(){f(),++o;for(var e,t=r;t;)(e=c-t._time)>=0&&t._call.call(void 0,e),t=t._next;--o}()}finally{o=0,function(){var e,t,n=r,o=1/0;for(;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:r=t);i=e,b(o)}(),c=0}}function y(){var e=h.now(),t=e-l;t>1e3&&(u-=t,l=e)}function b(e){o||(a&&(a=clearTimeout(a)),e-c>24?(e<1/0&&(a=setTimeout(v,e-h.now()-u)),s&&(s=clearInterval(s))):(s||(l=h.now(),s=setInterval(y,1e3)),o=1,d(v)))}m.prototype=g.prototype={constructor:m,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?f():+n)+(null==t?0:+t),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=e,this._time=n,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}}},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,l="object"==typeof self&&self&&self.Object===Object&&self,c=s||l||Function("return this")(),u=Object.prototype.toString,h=Math.max,d=Math.min,f=function(){return c.Date.now()};function p(e,t,n){var r,i,o,a,s,l,c=0,u=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,o=i;return r=i=void 0,c=t,a=e.apply(o,n)}function b(e){return c=e,s=setTimeout(x,t),u?y(e):a}function w(e){var n=e-l;return void 0===l||n>=t||n<0||p&&e-c>=o}function x(){var e=f();if(w(e))return _(e);s=setTimeout(x,function(e){var n=t-(e-l);return p?d(n,o-(e-c)):n}(e))}function _(e){return s=void 0,v&&r?y(e):(r=i=void 0,a)}function E(){var e=f(),n=w(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return b(l);if(p)return s=setTimeout(x,t),y(l)}return void 0===s&&(s=setTimeout(x,t)),a}return t=g(t)||0,m(n)&&(u=!!n.leading,o=(p="maxWait"in n)?h(g(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},E.flush=function(){return void 0===s?a:_(f())},E}function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(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(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(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=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return m(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),p(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(43))},function(e,t,n){"use strict";e.exports=function(e,t,n){if("function"===typeof Array.prototype.findIndex)return e.findIndex(t,n);if("function"!==typeof t)throw new TypeError("predicate must be a function");var r=Object(e),i=r.length;if(0===i)return-1;for(var o=0;o<i;o++)if(t.call(n,r[o],o,r))return o;return-1}},function(e,t){var n=Object.prototype.toString,r=Array.isArray;e.exports=function(e){return"string"==typeof e||!r(e)&&function(e){return!!e&&"object"==typeof e}(e)&&"[object String]"==n.call(e)}},function(t,n,r){(function(n){var r=/^\[object .+?Constructor\]$/,i=/^(?:0|[1-9]\d*)$/,o="object"==typeof n&&n&&n.Object===Object&&n,a="object"==typeof self&&self&&self.Object===Object&&self,s=o||a||Function("return this")();function l(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function c(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!==t)return function(e,t,n,r){var i=e.length,o=n+(r?1:-1);for(;r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}(e,f,n);var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,0)>-1}function u(e,t,n){for(var r=-1,i=e?e.length:0;++r<i;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function d(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function f(e){return e!==e}function p(e,t){return e.has(t)}function m(e,t){return function(n){return e(t(n))}}var g=Array.prototype,v=Function.prototype,y=Object.prototype,b=s["__core-js_shared__"],w=function(){var e=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),x=v.toString,_=y.hasOwnProperty,E=y.toString,A=RegExp("^"+x.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=s.Symbol,M=m(Object.getPrototypeOf,Object),T=y.propertyIsEnumerable,C=g.splice,O=S?S.isConcatSpreadable:void 0,R=Object.getOwnPropertySymbols,k=Math.max,P=G(s,"Map"),L=G(Object,"create");function D(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function I(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function N(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function j(e){var t=-1,n=e?e.length:0;for(this.__data__=new N;++t<n;)this.add(e[t])}function B(e,t){var n=J(e)||Z(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var o in e)!t&&!_.call(e,o)||i&&("length"==o||Y(o,r))||n.push(o);return n}function F(e,t){for(var n=e.length;n--;)if(Q(e[n][0],t))return n;return-1}function z(t){return!(!te(t)||(n=t,w&&w in n))&&(ee(t)||function(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(e){}return n}(t)?A:r).test(function(t){if(null!=t){try{return x.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var n}function H(e){if(!te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||y;return e===n}(e),n=[];for(var r in e)("constructor"!=r||!t&&_.call(e,r))&&n.push(r);return n}function U(e){return function(e,t,n){var r=t(e);return J(e)?r:d(r,n(e))}(e,re,q)}function V(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function G(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return z(n)?n:void 0}D.prototype.clear=function(){this.__data__=L?L(null):{}},D.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},D.prototype.get=function(e){var t=this.__data__;if(L){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return _.call(t,e)?t[e]:void 0},D.prototype.has=function(e){var t=this.__data__;return L?void 0!==t[e]:_.call(t,e)},D.prototype.set=function(e,t){return this.__data__[e]=L&&void 0===t?"__lodash_hash_undefined__":t,this},I.prototype.clear=function(){this.__data__=[]},I.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0)&&(n==t.length-1?t.pop():C.call(t,n,1),!0)},I.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},I.prototype.has=function(e){return F(this.__data__,e)>-1},I.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},N.prototype.clear=function(){this.__data__={hash:new D,map:new(P||I),string:new D}},N.prototype.delete=function(e){return V(this,e).delete(e)},N.prototype.get=function(e){return V(this,e).get(e)},N.prototype.has=function(e){return V(this,e).has(e)},N.prototype.set=function(e,t){return V(this,e).set(e,t),this},j.prototype.add=j.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},j.prototype.has=function(e){return this.__data__.has(e)};var W=R?m(R,Object):se,q=R?function(e){for(var t=[];e;)d(t,W(e)),e=M(e);return t}:se;function X(e){return J(e)||Z(e)||!!(O&&e&&e[O])}function Y(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}function K(e){if("string"==typeof e||function(e){return"symbol"==typeof e||ne(e)&&"[object Symbol]"==E.call(e)}(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Q(e,t){return e===t||e!==e&&t!==t}function Z(e){return function(e){return ne(e)&&$(e)}(e)&&_.call(e,"callee")&&(!T.call(e,"callee")||"[object Arguments]"==E.call(e))}var J=Array.isArray;function $(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!ee(e)}function ee(e){var t=te(e)?E.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function te(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ne(e){return!!e&&"object"==typeof e}function re(e){return $(e)?B(e,!0):H(e)}var ie,oe,ae=(ie=function(e,t){return null==e?{}:(t=h(function e(t,n,r,i,o){var a=-1,s=t.length;for(r||(r=X),o||(o=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,i,o):d(o,l):i||(o[o.length]=l)}return o}(t,1),K),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=e[a];n(s,a)&&(o[a]=s)}return o}(e=Object(e),t,(function(t,n){return n in e}))}(e,function(e,t,n,r){var i,o=-1,a=c,s=!0,l=e.length,d=[],f=t.length;if(!l)return d;n&&(t=h(t,(i=n,function(e){return i(e)}))),r?(a=u,s=!1):t.length>=200&&(a=p,s=!1,t=new j(t));e:for(;++o<l;){var m=e[o],g=n?n(m):m;if(m=r||0!==m?m:0,s&&g===g){for(var v=f;v--;)if(t[v]===g)continue e;d.push(m)}else a(t,g,r)||d.push(m)}return d}(U(e),t)))},oe=k(void 0===oe?ie.length-1:oe,0),function(){for(var e=arguments,t=-1,n=k(e.length-oe,0),r=Array(n);++t<n;)r[t]=e[oe+t];t=-1;for(var i=Array(oe+1);++t<oe;)i[t]=e[t];return i[oe]=r,l(ie,this,i)});function se(){return[]}t.exports=ae}).call(this,r(43))},function(t,n,r){"use strict";r.d(n,"a",(function(){return p}));var i=r(20),o=r.n(i),a=r(24),s=r.n(a),l=r(25),c=r.n(l),u=r(18),h=r.n(u),d=r(253);function f(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=h()(t);if(n){var i=h()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c()(this,e)}}var p=function(e){s()(n,e);var t=f(n);function n(e,r){var i;return o()(this,n),(i=t.call(this,r)).code=e,i}return n}(r.n(d)()(Error))},function(e,t,n){var r=n(18),i=n(153),o=n(365),a=n(366);function s(t){var n="function"===typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){!function(){function t(e,t){document.addEventListener?e.addEventListener("scroll",t,!1):e.attachEvent("scroll",t)}function n(e){this.a=document.createElement("div"),this.a.setAttribute("aria-hidden","true"),this.a.appendChild(document.createTextNode(e)),this.b=document.createElement("span"),this.c=document.createElement("span"),this.h=document.createElement("span"),this.f=document.createElement("span"),this.g=-1,this.b.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.c.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.f.style.cssText="max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;",this.h.style.cssText="display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;",this.b.appendChild(this.h),this.c.appendChild(this.f),this.a.appendChild(this.b),this.a.appendChild(this.c)}function r(e,t){e.a.style.cssText="max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:"+t+";"}function i(e){var t=e.a.offsetWidth,n=t+100;return e.f.style.width=n+"px",e.c.scrollLeft=n,e.b.scrollLeft=e.b.scrollWidth+100,e.g!==t&&(e.g=t,!0)}function o(e,n){function r(){var e=o;i(e)&&e.a.parentNode&&n(e.g)}var o=e;t(e.b,r),t(e.c,r),i(e)}function a(e,t){var n=t||{};this.family=e,this.style=n.style||"normal",this.weight=n.weight||"normal",this.stretch=n.stretch||"normal"}var s=null,l=null,c=null,u=null;function h(){return null===u&&(u=!!document.fonts),u}function d(){if(null===c){var e=document.createElement("div");try{e.style.font="condensed 100px sans-serif"}catch(t){}c=""!==e.style.font}return c}function f(e,t){return[e.style,e.weight,d()?e.stretch:"","100px",t].join(" ")}a.prototype.load=function(e,t){var i=this,a=e||"BESbswy",c=0,u=t||3e3,d=(new Date).getTime();return new Promise((function(e,t){if(h()&&!function(){if(null===l)if(h()&&/Apple/.test(window.navigator.vendor)){var e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))(?:\.([0-9]+))/.exec(window.navigator.userAgent);l=!!e&&603>parseInt(e[1],10)}else l=!1;return l}()){var p=new Promise((function(e,t){!function n(){(new Date).getTime()-d>=u?t(Error(u+"ms timeout exceeded")):document.fonts.load(f(i,'"'+i.family+'"'),a).then((function(t){1<=t.length?e():setTimeout(n,25)}),t)}()})),m=new Promise((function(e,t){c=setTimeout((function(){t(Error(u+"ms timeout exceeded"))}),u)}));Promise.race([m,p]).then((function(){clearTimeout(c),e(i)}),t)}else!function(e){document.body?e():document.addEventListener?document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t),e()})):document.attachEvent("onreadystatechange",(function t(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",t),e())}))}((function(){function l(){var t;(t=-1!=g&&-1!=v||-1!=g&&-1!=y||-1!=v&&-1!=y)&&((t=g!=v&&g!=y&&v!=y)||(null===s&&(t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),s=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))),t=s&&(g==b&&v==b&&y==b||g==w&&v==w&&y==w||g==x&&v==x&&y==x)),t=!t),t&&(_.parentNode&&_.parentNode.removeChild(_),clearTimeout(c),e(i))}var h=new n(a),p=new n(a),m=new n(a),g=-1,v=-1,y=-1,b=-1,w=-1,x=-1,_=document.createElement("div");_.dir="ltr",r(h,f(i,"sans-serif")),r(p,f(i,"serif")),r(m,f(i,"monospace")),_.appendChild(h.a),_.appendChild(p.a),_.appendChild(m.a),document.body.appendChild(_),b=h.a.offsetWidth,w=p.a.offsetWidth,x=m.a.offsetWidth,function e(){if((new Date).getTime()-d>=u)_.parentNode&&_.parentNode.removeChild(_),t(Error(u+"ms timeout exceeded"));else{var n=document.hidden;!0!==n&&void 0!==n||(g=h.a.offsetWidth,v=p.a.offsetWidth,y=m.a.offsetWidth,l()),c=setTimeout(e,50)}}(),o(h,(function(e){g=e,l()})),r(h,f(i,'"'+i.family+'",sans-serif')),o(p,(function(e){v=e,l()})),r(p,f(i,'"'+i.family+'",serif')),o(m,(function(e){y=e,l()})),r(m,f(i,'"'+i.family+'",monospace'))}))}))},e.exports=a}()},function(e){e.exports=JSON.parse('{"ab-testing":983497,"abjad-arabic":987944,"abjad-hebrew":987945,"abugida-devanagari":987946,"abugida-thai":987947,"access-point":983043,"access-point-network":983042,"access-point-network-off":986081,"account":983044,"account-alert":983045,"account-alert-outline":985936,"account-arrow-left":985937,"account-arrow-left-outline":985938,"account-arrow-right":985939,"account-arrow-right-outline":985940,"account-box":983046,"account-box-multiple":985396,"account-box-multiple-outline":987146,"account-box-outline":983047,"account-cancel":987871,"account-cancel-outline":987872,"account-cash":987287,"account-cash-outline":987288,"account-check":983048,"account-check-outline":986082,"account-child":985737,"account-child-circle":985738,"account-child-outline":987336,"account-circle":983049,"account-circle-outline":985941,"account-clock":985942,"account-clock-outline":985943,"account-cog":988016,"account-cog-outline":988017,"account-convert":983050,"account-convert-outline":987905,"account-cowboy-hat":986779,"account-details":984625,"account-details-outline":988018,"account-edit":984764,"account-edit-outline":987131,"account-group":985161,"account-group-outline":985944,"account-hard-hat":984501,"account-heart":985241,"account-heart-outline":986083,"account-key":983051,"account-key-outline":986084,"account-lock":987486,"account-lock-outline":987487,"account-minus":983053,"account-minus-outline":985836,"account-multiple":983054,"account-multiple-check":985285,"account-multiple-check-outline":987646,"account-multiple-minus":984531,"account-multiple-minus-outline":986085,"account-multiple-outline":983055,"account-multiple-plus":983056,"account-multiple-plus-outline":985088,"account-multiple-remove":987658,"account-multiple-remove-outline":987659,"account-music":985091,"account-music-outline":986345,"account-network":983057,"account-network-outline":986086,"account-off":983058,"account-off-outline":986087,"account-outline":983059,"account-plus":983060,"account-plus-outline":985089,"account-question":985945,"account-question-outline":985946,"account-remove":983061,"account-remove-outline":985837,"account-search":983062,"account-search-outline":985397,"account-settings":984624,"account-settings-outline":987337,"account-star":983063,"account-star-outline":986088,"account-supervisor":985739,"account-supervisor-circle":985740,"account-supervisor-outline":987437,"account-switch":983065,"account-switch-outline":984267,"account-tie":986339,"account-tie-outline":987338,"account-tie-voice":987912,"account-tie-voice-off":987914,"account-tie-voice-off-outline":987915,"account-tie-voice-outline":987913,"account-voice":984523,"adjust":983066,"adobe":985398,"adobe-acrobat":987037,"air-conditioner":983067,"air-filter":986435,"air-horn":986540,"air-humidifier":987289,"air-humidifier-off":988262,"air-purifier":986436,"airbag":986089,"airballoon":983068,"airballoon-outline":987147,"airplane":983069,"airplane-landing":984532,"airplane-off":983070,"airplane-takeoff":984533,"airport":985163,"alarm":983072,"alarm-bell":984974,"alarm-check":983073,"alarm-light":984975,"alarm-light-outline":986090,"alarm-multiple":983074,"alarm-note":986737,"alarm-note-off":986738,"alarm-off":983075,"alarm-plus":983076,"alarm-snooze":984718,"album":983077,"alert":983078,"alert-box":983079,"alert-box-outline":986340,"alert-circle":983080,"alert-circle-check":987629,"alert-circle-check-outline":987630,"alert-circle-outline":984534,"alert-decagram":984765,"alert-decagram-outline":986341,"alert-minus":988347,"alert-minus-outline":988350,"alert-octagon":983081,"alert-octagon-outline":986342,"alert-octagram":984935,"alert-octagram-outline":986343,"alert-outline":983082,"alert-plus":988346,"alert-plus-outline":988349,"alert-remove":988348,"alert-remove-outline":988351,"alert-rhombus":987598,"alert-rhombus-outline":987599,"alien":985242,"alien-outline":987339,"align-horizontal-center":987587,"align-horizontal-left":987586,"align-horizontal-right":987588,"align-vertical-bottom":987589,"align-vertical-center":987590,"align-vertical-top":987591,"all-inclusive":984766,"allergy":987736,"alpha":983083,"alpha-a":985838,"alpha-a-box":985864,"alpha-a-box-outline":986091,"alpha-a-circle":986092,"alpha-a-circle-outline":986093,"alpha-b":985839,"alpha-b-box":985865,"alpha-b-box-outline":986094,"alpha-b-circle":986095,"alpha-b-circle-outline":986096,"alpha-c":985840,"alpha-c-box":985866,"alpha-c-box-outline":986097,"alpha-c-circle":986098,"alpha-c-circle-outline":986099,"alpha-d":985841,"alpha-d-box":985867,"alpha-d-box-outline":986100,"alpha-d-circle":986101,"alpha-d-circle-outline":986102,"alpha-e":985842,"alpha-e-box":985868,"alpha-e-box-outline":986103,"alpha-e-circle":986104,"alpha-e-circle-outline":986105,"alpha-f":985843,"alpha-f-box":985869,"alpha-f-box-outline":986106,"alpha-f-circle":986107,"alpha-f-circle-outline":986108,"alpha-g":985844,"alpha-g-box":985870,"alpha-g-box-outline":986109,"alpha-g-circle":986110,"alpha-g-circle-outline":986111,"alpha-h":985845,"alpha-h-box":985871,"alpha-h-box-outline":986112,"alpha-h-circle":986113,"alpha-h-circle-outline":986114,"alpha-i":985846,"alpha-i-box":985872,"alpha-i-box-outline":986115,"alpha-i-circle":986116,"alpha-i-circle-outline":986117,"alpha-j":985847,"alpha-j-box":985873,"alpha-j-box-outline":986118,"alpha-j-circle":986119,"alpha-j-circle-outline":986120,"alpha-k":985848,"alpha-k-box":985874,"alpha-k-box-outline":986121,"alpha-k-circle":986122,"alpha-k-circle-outline":986123,"alpha-l":985849,"alpha-l-box":985875,"alpha-l-box-outline":986124,"alpha-l-circle":986125,"alpha-l-circle-outline":986126,"alpha-m":985850,"alpha-m-box":985876,"alpha-m-box-outline":986127,"alpha-m-circle":986128,"alpha-m-circle-outline":986129,"alpha-n":985851,"alpha-n-box":985877,"alpha-n-box-outline":986130,"alpha-n-circle":986131,"alpha-n-circle-outline":986132,"alpha-o":985852,"alpha-o-box":985878,"alpha-o-box-outline":986133,"alpha-o-circle":986134,"alpha-o-circle-outline":986135,"alpha-p":985853,"alpha-p-box":985879,"alpha-p-box-outline":986136,"alpha-p-circle":986137,"alpha-p-circle-outline":986138,"alpha-q":985854,"alpha-q-box":985880,"alpha-q-box-outline":986139,"alpha-q-circle":986140,"alpha-q-circle-outline":986141,"alpha-r":985855,"alpha-r-box":985881,"alpha-r-box-outline":986142,"alpha-r-circle":986143,"alpha-r-circle-outline":986144,"alpha-s":985856,"alpha-s-box":985882,"alpha-s-box-outline":986145,"alpha-s-circle":986146,"alpha-s-circle-outline":986147,"alpha-t":985857,"alpha-t-box":985883,"alpha-t-box-outline":986148,"alpha-t-circle":986149,"alpha-t-circle-outline":986150,"alpha-u":985858,"alpha-u-box":985884,"alpha-u-box-outline":986151,"alpha-u-circle":986152,"alpha-u-circle-outline":986153,"alpha-v":985859,"alpha-v-box":985885,"alpha-v-box-outline":986154,"alpha-v-circle":986155,"alpha-v-circle-outline":986156,"alpha-w":985860,"alpha-w-box":985886,"alpha-w-box-outline":986157,"alpha-w-circle":986158,"alpha-w-circle-outline":986159,"alpha-x":985861,"alpha-x-box":985887,"alpha-x-box-outline":986160,"alpha-x-circle":986161,"alpha-x-circle-outline":986162,"alpha-y":985862,"alpha-y-box":985888,"alpha-y-box-outline":986163,"alpha-y-circle":986164,"alpha-y-circle-outline":986165,"alpha-z":985863,"alpha-z-box":985889,"alpha-z-box-outline":986166,"alpha-z-circle":986167,"alpha-z-circle-outline":986168,"alphabet-aurebesh":987948,"alphabet-cyrillic":987949,"alphabet-greek":987950,"alphabet-latin":987951,"alphabet-piqad":987952,"alphabet-tengwar":987959,"alphabetical":983084,"alphabetical-off":987148,"alphabetical-variant":987149,"alphabetical-variant-off":987150,"altimeter":984535,"amazon":983085,"amazon-alexa":985286,"ambulance":983087,"ammunition":986344,"ampersand":985741,"amplifier":983088,"amplifier-off":987573,"anchor":983089,"android":983090,"android-auto":985742,"android-debug-bridge":983091,"android-messages":986437,"android-studio":983092,"angle-acute":985399,"angle-obtuse":985400,"angle-right":985401,"angular":984754,"angularjs":984767,"animation":984536,"animation-outline":985743,"animation-play":985402,"animation-play-outline":985744,"ansible":987290,"antenna":987417,"anvil":985243,"apache-kafka":987151,"api":987291,"api-off":987735,"apple":983093,"apple-airplay":983071,"apple-finder":983094,"apple-icloud":983096,"apple-ios":983095,"apple-keyboard-caps":984626,"apple-keyboard-command":984627,"apple-keyboard-control":984628,"apple-keyboard-option":984629,"apple-keyboard-shift":984630,"apple-safari":983097,"application":984596,"application-export":986541,"application-import":986542,"approximately-equal":987038,"approximately-equal-box":987039,"apps":983099,"apps-box":986438,"arch":985287,"archive":983100,"archive-arrow-down":987737,"archive-arrow-down-outline":987738,"archive-arrow-up":987739,"archive-arrow-up-outline":987740,"archive-outline":987662,"arm-flex":987095,"arm-flex-outline":987094,"arrange-bring-forward":983101,"arrange-bring-to-front":983102,"arrange-send-backward":983103,"arrange-send-to-back":983104,"arrow-all":983105,"arrow-bottom-left":983106,"arrow-bottom-left-bold-outline":985527,"arrow-bottom-left-thick":985528,"arrow-bottom-right":983107,"arrow-bottom-right-bold-outline":985529,"arrow-bottom-right-thick":985530,"arrow-collapse":984597,"arrow-collapse-all":983108,"arrow-collapse-down":984978,"arrow-collapse-horizontal":985164,"arrow-collapse-left":984979,"arrow-collapse-right":984980,"arrow-collapse-up":984981,"arrow-collapse-vertical":985165,"arrow-decision":985531,"arrow-decision-auto":985532,"arrow-decision-auto-outline":985533,"arrow-decision-outline":985534,"arrow-down":983109,"arrow-down-bold":984878,"arrow-down-bold-box":984879,"arrow-down-bold-box-outline":984880,"arrow-down-bold-circle":983111,"arrow-down-bold-circle-outline":983112,"arrow-down-bold-hexagon-outline":983113,"arrow-down-bold-outline":985535,"arrow-down-box":984768,"arrow-down-circle":986331,"arrow-down-circle-outline":986332,"arrow-down-drop-circle":983114,"arrow-down-drop-circle-outline":983115,"arrow-down-thick":983110,"arrow-expand":984598,"arrow-expand-all":983116,"arrow-expand-down":984982,"arrow-expand-horizontal":985166,"arrow-expand-left":984983,"arrow-expand-right":984984,"arrow-expand-up":984985,"arrow-expand-vertical":985167,"arrow-horizontal-lock":987483,"arrow-left":983117,"arrow-left-bold":984881,"arrow-left-bold-box":984882,"arrow-left-bold-box-outline":984883,"arrow-left-bold-circle":983119,"arrow-left-bold-circle-outline":983120,"arrow-left-bold-hexagon-outline":983121,"arrow-left-bold-outline":985536,"arrow-left-box":984769,"arrow-left-circle":986333,"arrow-left-circle-outline":986334,"arrow-left-drop-circle":983122,"arrow-left-drop-circle-outline":983123,"arrow-left-right":986739,"arrow-left-right-bold":986740,"arrow-left-right-bold-outline":985537,"arrow-left-thick":983118,"arrow-right":983124,"arrow-right-bold":984884,"arrow-right-bold-box":984885,"arrow-right-bold-box-outline":984886,"arrow-right-bold-circle":983126,"arrow-right-bold-circle-outline":983127,"arrow-right-bold-hexagon-outline":983128,"arrow-right-bold-outline":985538,"arrow-right-box":984770,"arrow-right-circle":986335,"arrow-right-circle-outline":986336,"arrow-right-drop-circle":983129,"arrow-right-drop-circle-outline":983130,"arrow-right-thick":983125,"arrow-split-horizontal":985403,"arrow-split-vertical":985404,"arrow-top-left":983131,"arrow-top-left-bold-outline":985539,"arrow-top-left-bottom-right":986741,"arrow-top-left-bottom-right-bold":986742,"arrow-top-left-thick":985540,"arrow-top-right":983132,"arrow-top-right-bold-outline":985541,"arrow-top-right-bottom-left":986743,"arrow-top-right-bottom-left-bold":986744,"arrow-top-right-thick":985542,"arrow-up":983133,"arrow-up-bold":984887,"arrow-up-bold-box":984888,"arrow-up-bold-box-outline":984889,"arrow-up-bold-circle":983135,"arrow-up-bold-circle-outline":983136,"arrow-up-bold-hexagon-outline":983137,"arrow-up-bold-outline":985543,"arrow-up-box":984771,"arrow-up-circle":986337,"arrow-up-circle-outline":986338,"arrow-up-down":986745,"arrow-up-down-bold":986746,"arrow-up-down-bold-outline":985544,"arrow-up-drop-circle":983138,"arrow-up-drop-circle-outline":983139,"arrow-up-thick":983134,"arrow-vertical-lock":987484,"artstation":985947,"aspect-ratio":985636,"assistant":983140,"asterisk":984772,"at":983141,"atlassian":985092,"atm":986439,"atom":984936,"atom-variant":986747,"attachment":983142,"audio-video":985405,"audio-video-off":987574,"augmented-reality":985168,"auto-download":988030,"auto-fix":983144,"auto-upload":983145,"autorenew":983146,"av-timer":983147,"aws":986639,"axe":985288,"axis":986440,"axis-arrow":986441,"axis-arrow-info":988174,"axis-arrow-lock":986442,"axis-lock":986443,"axis-x-arrow":986444,"axis-x-arrow-lock":986445,"axis-x-rotate-clockwise":986446,"axis-x-rotate-counterclockwise":986447,"axis-x-y-arrow-lock":986448,"axis-y-arrow":986449,"axis-y-arrow-lock":986450,"axis-y-rotate-clockwise":986451,"axis-y-rotate-counterclockwise":986452,"axis-z-arrow":986453,"axis-z-arrow-lock":986454,"axis-z-rotate-clockwise":986455,"axis-z-rotate-counterclockwise":986456,"babel":985637,"baby":983148,"baby-bottle":986937,"baby-bottle-outline":986938,"baby-buggy":988128,"baby-carriage":984719,"baby-carriage-off":987040,"baby-face":986748,"baby-face-outline":986749,"backburger":983149,"backspace":983150,"backspace-outline":985948,"backspace-reverse":986750,"backspace-reverse-outline":986751,"backup-restore":983151,"bacteria":986837,"bacteria-outline":986838,"badge-account":986535,"badge-account-alert":986536,"badge-account-alert-outline":986537,"badge-account-horizontal":986637,"badge-account-horizontal-outline":986638,"badge-account-outline":986538,"badminton":985169,"bag-carry-on":986939,"bag-carry-on-check":986469,"bag-carry-on-off":986940,"bag-checked":986941,"bag-personal":986640,"bag-personal-off":986641,"bag-personal-off-outline":986642,"bag-personal-outline":986643,"baguette":986942,"balloon":985638,"ballot":985545,"ballot-outline":985546,"ballot-recount":986169,"ballot-recount-outline":986170,"bandage":986543,"bandcamp":984693,"bank":983152,"bank-minus":986544,"bank-outline":986752,"bank-plus":986545,"bank-remove":986546,"bank-transfer":985639,"bank-transfer-in":985640,"bank-transfer-out":985641,"barcode":983153,"barcode-off":987702,"barcode-scan":983154,"barley":983155,"barley-off":985949,"barn":985950,"barrel":983156,"baseball":985170,"baseball-bat":985171,"bash":987523,"basket":983158,"basket-fill":983159,"basket-outline":987521,"basket-unfill":983160,"basketball":985094,"basketball-hoop":986171,"basketball-hoop-outline":986172,"bat":985951,"battery":983161,"battery-10":983162,"battery-10-bluetooth":985406,"battery-20":983163,"battery-20-bluetooth":985407,"battery-30":983164,"battery-30-bluetooth":985408,"battery-40":983165,"battery-40-bluetooth":985409,"battery-50":983166,"battery-50-bluetooth":985410,"battery-60":983167,"battery-60-bluetooth":985411,"battery-70":983168,"battery-70-bluetooth":985412,"battery-80":983169,"battery-80-bluetooth":985413,"battery-90":983170,"battery-90-bluetooth":985414,"battery-alert":983171,"battery-alert-bluetooth":985415,"battery-alert-variant":987340,"battery-alert-variant-outline":987341,"battery-bluetooth":985416,"battery-bluetooth-variant":985417,"battery-charging":983172,"battery-charging-10":985244,"battery-charging-100":983173,"battery-charging-20":983174,"battery-charging-30":983175,"battery-charging-40":983176,"battery-charging-50":985245,"battery-charging-60":983177,"battery-charging-70":985246,"battery-charging-80":983178,"battery-charging-90":983179,"battery-charging-high":987814,"battery-charging-low":987812,"battery-charging-medium":987813,"battery-charging-outline":985247,"battery-charging-wireless":985095,"battery-charging-wireless-10":985096,"battery-charging-wireless-20":985097,"battery-charging-wireless-30":985098,"battery-charging-wireless-40":985099,"battery-charging-wireless-50":985100,"battery-charging-wireless-60":985101,"battery-charging-wireless-70":985102,"battery-charging-wireless-80":985103,"battery-charging-wireless-90":985104,"battery-charging-wireless-alert":985105,"battery-charging-wireless-outline":985106,"battery-heart":987663,"battery-heart-outline":987664,"battery-heart-variant":987665,"battery-high":987811,"battery-low":987809,"battery-medium":987810,"battery-minus":983180,"battery-negative":983181,"battery-off":987741,"battery-off-outline":987742,"battery-outline":983182,"battery-plus":983183,"battery-positive":983184,"battery-unknown":983185,"battery-unknown-bluetooth":985418,"battlenet":985952,"beach":983186,"beaker":986346,"beaker-alert":987689,"beaker-alert-outline":987690,"beaker-check":987691,"beaker-check-outline":987692,"beaker-minus":987693,"beaker-minus-outline":987694,"beaker-outline":984720,"beaker-plus":987695,"beaker-plus-outline":987696,"beaker-question":987697,"beaker-question-outline":987698,"beaker-remove":987699,"beaker-remove-outline":987700,"bed":983779,"bed-double":987092,"bed-double-outline":987091,"bed-empty":985248,"bed-king":987090,"bed-king-outline":987089,"bed-outline":983193,"bed-queen":987088,"bed-queen-outline":987099,"bed-single":987245,"bed-single-outline":987246,"bee":987041,"bee-flower":987042,"beehive-off-outline":988141,"beehive-outline":987342,"beer":983192,"beer-outline":987916,"bell":983194,"bell-alert":986457,"bell-alert-outline":986753,"bell-cancel":988135,"bell-cancel-outline":988136,"bell-check":987621,"bell-check-outline":987622,"bell-circle":986458,"bell-circle-outline":986459,"bell-minus":988137,"bell-minus-outline":988138,"bell-off":983195,"bell-off-outline":985745,"bell-outline":983196,"bell-plus":983197,"bell-plus-outline":985746,"bell-remove":988139,"bell-remove-outline":988140,"bell-ring":983198,"bell-ring-outline":983199,"bell-sleep":983200,"bell-sleep-outline":985747,"beta":983201,"betamax":985547,"biathlon":986644,"bicycle":987292,"bicycle-basket":987701,"bike":983203,"bike-fast":987423,"billboard":987152,"billiards":985953,"billiards-rack":985954,"binoculars":983205,"bio":983206,"biohazard":983207,"bitbucket":983208,"bitcoin":985107,"black-mesa":983209,"blender":986347,"blender-software":983211,"blinds":983212,"blinds-open":987153,"block-helper":983213,"blogger":983214,"blood-bag":986348,"bluetooth":983215,"bluetooth-audio":983216,"bluetooth-connect":983217,"bluetooth-off":983218,"bluetooth-settings":983219,"bluetooth-transfer":983220,"blur":983221,"blur-linear":983222,"blur-off":983223,"blur-radial":983224,"bolnisi-cross":986349,"bolt":986547,"bomb":984721,"bomb-off":984773,"bone":983225,"book":983226,"book-account":988077,"book-account-outline":988078,"book-alphabet":984605,"book-cross":983202,"book-information-variant":987247,"book-lock":984986,"book-lock-open":984987,"book-minus":984537,"book-minus-multiple":985748,"book-minus-multiple-outline":985355,"book-multiple":983227,"book-multiple-outline":984118,"book-music":983143,"book-open":983229,"book-open-outline":985955,"book-open-page-variant":984538,"book-open-variant":983230,"book-outline":985956,"book-play":986754,"book-play-outline":986755,"book-plus":984539,"book-plus-multiple":985749,"book-plus-multiple-outline":985822,"book-remove":985751,"book-remove-multiple":985750,"book-remove-multiple-outline":984266,"book-search":986756,"book-search-outline":986757,"book-variant":983231,"book-variant-multiple":983228,"bookmark":983232,"bookmark-check":983233,"bookmark-check-outline":988027,"bookmark-minus":985548,"bookmark-minus-outline":985549,"bookmark-multiple":986645,"bookmark-multiple-outline":986646,"bookmark-music":983234,"bookmark-music-outline":988025,"bookmark-off":985550,"bookmark-off-outline":985551,"bookmark-outline":983235,"bookmark-plus":983237,"bookmark-plus-outline":983236,"bookmark-remove":983238,"bookmark-remove-outline":988026,"bookshelf":987743,"boom-gate":986758,"boom-gate-alert":986759,"boom-gate-alert-outline":986760,"boom-gate-down":986761,"boom-gate-down-outline":986762,"boom-gate-outline":986763,"boom-gate-up":986764,"boom-gate-up-outline":986765,"boombox":984540,"boomerang":987343,"bootstrap":984774,"border-all":983239,"border-all-variant":985249,"border-bottom":983240,"border-bottom-variant":985250,"border-color":983241,"border-horizontal":983242,"border-inside":983243,"border-left":983244,"border-left-variant":985251,"border-none":983245,"border-none-variant":985252,"border-outside":983246,"border-right":983247,"border-right-variant":985253,"border-style":983248,"border-top":983249,"border-top-variant":985254,"border-vertical":983250,"bottle-soda":987248,"bottle-soda-classic":987249,"bottle-soda-classic-outline":988003,"bottle-soda-outline":987250,"bottle-tonic":987438,"bottle-tonic-outline":987439,"bottle-tonic-plus":987440,"bottle-tonic-plus-outline":987441,"bottle-tonic-skull":987442,"bottle-tonic-skull-outline":987443,"bottle-wine":985172,"bottle-wine-outline":987920,"bow-tie":984696,"bowl":983694,"bowl-mix":984599,"bowl-mix-outline":983780,"bowl-outline":983721,"bowling":983251,"box":983252,"box-cutter":983253,"box-cutter-off":985930,"box-shadow":984631,"boxing-glove":985957,"braille":985552,"brain":985553,"bread-slice":986350,"bread-slice-outline":986351,"bridge":984600,"briefcase":983254,"briefcase-account":986352,"briefcase-account-outline":986353,"briefcase-check":983255,"briefcase-check-outline":987934,"briefcase-clock":987344,"briefcase-clock-outline":987345,"briefcase-download":983256,"briefcase-download-outline":986173,"briefcase-edit":985752,"briefcase-edit-outline":986174,"briefcase-minus":985642,"briefcase-minus-outline":986175,"briefcase-outline":985108,"briefcase-plus":985643,"briefcase-plus-outline":986176,"briefcase-remove":985644,"briefcase-remove-outline":986177,"briefcase-search":985645,"briefcase-search-outline":986178,"briefcase-upload":983257,"briefcase-upload-outline":986179,"briefcase-variant":988308,"briefcase-variant-outline":988309,"brightness-1":983258,"brightness-2":983259,"brightness-3":983260,"brightness-4":983261,"brightness-5":983262,"brightness-6":983263,"brightness-7":983264,"brightness-auto":983265,"brightness-percent":986354,"broom":983266,"brush":983267,"bucket":988181,"bucket-outline":988182,"buddhism":985419,"buffer":984601,"buffet":984440,"bug":983268,"bug-check":985646,"bug-check-outline":985647,"bug-outline":985648,"bugle":986548,"bulldozer":985890,"bullet":986355,"bulletin-board":983269,"bullhorn":983270,"bullhorn-outline":985891,"bullseye":984541,"bullseye-arrow":985289,"bulma":987879,"bunk-bed":987906,"bunk-bed-outline":983191,"bus":983271,"bus-alert":985753,"bus-articulated-end":984988,"bus-articulated-front":984989,"bus-clock":985290,"bus-double-decker":984990,"bus-marker":987666,"bus-multiple":986943,"bus-school":984991,"bus-side":984992,"bus-stop":987154,"bus-stop-covered":987155,"bus-stop-uncovered":987156,"cable-data":988052,"cached":983272,"cactus":986549,"cake":983273,"cake-layered":983274,"cake-variant":983275,"calculator":983276,"calculator-variant":985754,"calendar":983277,"calendar-account":986839,"calendar-account-outline":986840,"calendar-alert":985649,"calendar-arrow-left":987444,"calendar-arrow-right":987445,"calendar-blank":983278,"calendar-blank-multiple":987251,"calendar-blank-outline":985958,"calendar-check":983279,"calendar-check-outline":986180,"calendar-clock":983280,"calendar-edit":985255,"calendar-export":985892,"calendar-heart":985554,"calendar-import":985893,"calendar-minus":986460,"calendar-month":986647,"calendar-month-outline":986648,"calendar-multiple":983281,"calendar-multiple-check":983282,"calendar-multiselect":985650,"calendar-outline":985959,"calendar-plus":983283,"calendar-question":984722,"calendar-range":984697,"calendar-range-outline":985960,"calendar-refresh":983521,"calendar-refresh-outline":983555,"calendar-remove":983284,"calendar-remove-outline":986181,"calendar-search":985420,"calendar-star":985555,"calendar-sync":986766,"calendar-sync-outline":986767,"calendar-text":983285,"calendar-text-outline":986182,"calendar-today":983286,"calendar-week":985651,"calendar-week-begin":985652,"calendar-weekend":986841,"calendar-weekend-outline":986842,"call-made":983287,"call-merge":983288,"call-missed":983289,"call-received":983290,"call-split":983291,"camcorder":983292,"camcorder-off":983295,"camera":983296,"camera-account":985291,"camera-burst":984723,"camera-control":985961,"camera-enhance":983297,"camera-enhance-outline":985962,"camera-front":983298,"camera-front-variant":983299,"camera-gopro":984993,"camera-image":985292,"camera-iris":983300,"camera-metering-center":984994,"camera-metering-matrix":984995,"camera-metering-partial":984996,"camera-metering-spot":984997,"camera-off":984543,"camera-outline":986461,"camera-party-mode":983301,"camera-plus":986843,"camera-plus-outline":986844,"camera-rear":983302,"camera-rear-variant":983303,"camera-retake":986649,"camera-retake-outline":986650,"camera-switch":983304,"camera-switch-outline":985162,"camera-timer":983305,"camera-wireless":986550,"camera-wireless-outline":986551,"campfire":986845,"cancel":984890,"candle":984546,"candycane":983306,"cannabis":984998,"caps-lock":985755,"car":983307,"car-2-plus":987157,"car-3-plus":987158,"car-arrow-left":988082,"car-arrow-right":988083,"car-back":986651,"car-battery":983308,"car-brake-abs":986183,"car-brake-alert":986184,"car-brake-hold":986462,"car-brake-parking":986463,"car-brake-retarder":987159,"car-child-seat":987043,"car-clutch":987160,"car-cog":988108,"car-connected":983309,"car-convertible":984999,"car-coolant-level":987161,"car-cruise-control":986464,"car-defrost-front":986465,"car-defrost-rear":986466,"car-door":985963,"car-door-lock":987293,"car-electric":985964,"car-esp":986185,"car-estate":985000,"car-hatchback":985001,"car-info":987582,"car-key":985965,"car-light-dimmed":986186,"car-light-fog":986187,"car-light-high":986188,"car-limousine":985293,"car-multiple":985966,"car-off":986652,"car-parking-lights":986467,"car-pickup":985002,"car-seat":987044,"car-seat-cooler":987045,"car-seat-heater":987046,"car-settings":988109,"car-shift-pattern":986944,"car-side":985003,"car-sports":985004,"car-tire-alert":986189,"car-traction-control":986468,"car-turbocharger":987162,"car-wash":983310,"car-windshield":987163,"car-windshield-outline":987164,"carabiner":988352,"caravan":985005,"card":985967,"card-account-details":984530,"card-account-details-outline":986539,"card-account-details-star":983715,"card-account-details-star-outline":984795,"card-account-mail":983438,"card-account-mail-outline":986776,"card-account-phone":986777,"card-account-phone-outline":986778,"card-bulleted":985968,"card-bulleted-off":985969,"card-bulleted-off-outline":985970,"card-bulleted-outline":985971,"card-bulleted-settings":985972,"card-bulleted-settings-outline":985973,"card-outline":985974,"card-plus":987647,"card-plus-outline":987648,"card-search":987252,"card-search-outline":987253,"card-text":985975,"card-text-outline":985976,"cards":984632,"cards-club":985294,"cards-diamond":985295,"cards-diamond-outline":987165,"cards-heart":985296,"cards-outline":984633,"cards-playing-outline":984634,"cards-spade":985297,"cards-variant":984775,"carrot":983311,"cart":983312,"cart-arrow-down":986470,"cart-arrow-right":986190,"cart-arrow-up":986471,"cart-minus":986472,"cart-off":984683,"cart-outline":983313,"cart-plus":983314,"cart-remove":986473,"case-sensitive-alt":983315,"cash":983316,"cash-100":983317,"cash-marker":986552,"cash-minus":987744,"cash-multiple":983318,"cash-plus":987745,"cash-refund":985756,"cash-register":986356,"cash-remove":987746,"cash-usd":987510,"cash-usd-outline":983319,"cassette":985556,"cast":983320,"cast-audio":987166,"cast-connected":983321,"cast-education":986653,"cast-off":984970,"castle":983322,"cat":983323,"cctv":985006,"ceiling-light":984937,"cellphone":983324,"cellphone-android":983325,"cellphone-arrow-down":985557,"cellphone-basic":983326,"cellphone-charging":988055,"cellphone-cog":985425,"cellphone-dock":983327,"cellphone-erase":985421,"cellphone-information":986945,"cellphone-iphone":983328,"cellphone-key":985422,"cellphone-link":983329,"cellphone-link-off":983330,"cellphone-lock":985423,"cellphone-message":985299,"cellphone-message-off":987346,"cellphone-nfc":986768,"cellphone-nfc-off":987864,"cellphone-off":985424,"cellphone-play":987167,"cellphone-screenshot":985653,"cellphone-settings":983331,"cellphone-sound":985426,"cellphone-text":985298,"cellphone-wireless":985109,"celtic-cross":986357,"centos":987418,"certificate":983332,"certificate-outline":987528,"chair-rolling":986952,"chair-school":983333,"charity":986191,"chart-arc":983334,"chart-areaspline":983335,"chart-areaspline-variant":986769,"chart-bar":983336,"chart-bar-stacked":984938,"chart-bell-curve":986192,"chart-bell-curve-cumulative":987047,"chart-bubble":984547,"chart-donut":985007,"chart-donut-variant":985008,"chart-gantt":984684,"chart-histogram":983337,"chart-line":983338,"chart-line-stacked":984939,"chart-line-variant":985009,"chart-multiline":985300,"chart-multiple":987667,"chart-pie":983339,"chart-ppf":988032,"chart-sankey":987615,"chart-sankey-variant":987616,"chart-scatter-plot":986770,"chart-scatter-plot-hexbin":984685,"chart-timeline":984686,"chart-timeline-variant":986771,"chart-tree":986772,"chat":985977,"chat-alert":985978,"chat-alert-outline":987849,"chat-minus":988176,"chat-minus-outline":988179,"chat-outline":986846,"chat-plus":988175,"chat-plus-outline":988178,"chat-processing":985979,"chat-processing-outline":987850,"chat-remove":988177,"chat-remove-outline":988180,"chat-sleep":987857,"chat-sleep-outline":987858,"check":983340,"check-all":983341,"check-bold":986654,"check-box-multiple-outline":986193,"check-box-outline":986194,"check-circle":984544,"check-circle-outline":984545,"check-decagram":984977,"check-network":986195,"check-network-outline":986196,"check-outline":985173,"check-underline":986655,"check-underline-circle":986656,"check-underline-circle-outline":986657,"checkbook":985757,"checkbox-blank":983342,"checkbox-blank-circle":983343,"checkbox-blank-circle-outline":983344,"checkbox-blank-off":987884,"checkbox-blank-off-outline":987885,"checkbox-blank-outline":983345,"checkbox-intermediate":985174,"checkbox-marked":983346,"checkbox-marked-circle":983347,"checkbox-marked-circle-outline":983348,"checkbox-marked-outline":983349,"checkbox-multiple-blank":983350,"checkbox-multiple-blank-circle":984635,"checkbox-multiple-blank-circle-outline":984636,"checkbox-multiple-blank-outline":983351,"checkbox-multiple-marked":983352,"checkbox-multiple-marked-circle":984637,"checkbox-multiple-marked-circle-outline":984638,"checkbox-multiple-marked-outline":983353,"checkerboard":983354,"checkerboard-minus":987650,"checkerboard-plus":987649,"checkerboard-remove":987651,"cheese":987833,"cheese-off":988142,"chef-hat":985980,"chemical-weapon":983355,"chess-bishop":985180,"chess-king":985175,"chess-knight":985176,"chess-pawn":985177,"chess-queen":985178,"chess-rook":985179,"chevron-double-down":983356,"chevron-double-left":983357,"chevron-double-right":983358,"chevron-double-up":983359,"chevron-down":983360,"chevron-down-box":985558,"chevron-down-box-outline":985559,"chevron-down-circle":985894,"chevron-down-circle-outline":985895,"chevron-left":983361,"chevron-left-box":985560,"chevron-left-box-outline":985561,"chevron-left-circle":985896,"chevron-left-circle-outline":985897,"chevron-right":983362,"chevron-right-box":985562,"chevron-right-box-outline":985563,"chevron-right-circle":985898,"chevron-right-circle-outline":985899,"chevron-triple-down":986553,"chevron-triple-left":986554,"chevron-triple-right":986555,"chevron-triple-up":986556,"chevron-up":983363,"chevron-up-box":985564,"chevron-up-box-outline":985565,"chevron-up-circle":985900,"chevron-up-circle-outline":985901,"chili-hot":985010,"chili-medium":985011,"chili-mild":985012,"chili-off":988263,"chip":984602,"christianity":985427,"christianity-outline":986358,"church":983364,"cigar":987529,"cigar-off":988187,"circle":984933,"circle-double":986773,"circle-edit-outline":985301,"circle-expand":986774,"circle-half":988053,"circle-half-full":988054,"circle-medium":985566,"circle-multiple":985912,"circle-multiple-outline":984725,"circle-off-outline":987347,"circle-outline":984934,"circle-slice-1":985758,"circle-slice-2":985759,"circle-slice-3":985760,"circle-slice-4":985761,"circle-slice-5":985762,"circle-slice-6":985763,"circle-slice-7":985764,"circle-slice-8":985765,"circle-small":985567,"circular-saw":986658,"city":983366,"city-variant":985654,"city-variant-outline":985655,"clipboard":983367,"clipboard-account":983368,"clipboard-account-outline":986197,"clipboard-alert":983369,"clipboard-alert-outline":986359,"clipboard-arrow-down":983370,"clipboard-arrow-down-outline":986198,"clipboard-arrow-left":983371,"clipboard-arrow-left-outline":986360,"clipboard-arrow-right":986361,"clipboard-arrow-right-outline":986362,"clipboard-arrow-up":986199,"clipboard-arrow-up-outline":986200,"clipboard-check":983374,"clipboard-check-multiple":987747,"clipboard-check-multiple-outline":987748,"clipboard-check-outline":985256,"clipboard-file":987749,"clipboard-file-outline":987750,"clipboard-flow":984776,"clipboard-flow-outline":987415,"clipboard-list":987348,"clipboard-list-outline":987349,"clipboard-multiple":987751,"clipboard-multiple-outline":987752,"clipboard-outline":983372,"clipboard-play":986201,"clipboard-play-multiple":987753,"clipboard-play-multiple-outline":987754,"clipboard-play-outline":986202,"clipboard-plus":984913,"clipboard-plus-outline":987935,"clipboard-pulse":985181,"clipboard-pulse-outline":985182,"clipboard-text":983373,"clipboard-text-multiple":987755,"clipboard-text-multiple-outline":987756,"clipboard-text-outline":985656,"clipboard-text-play":986203,"clipboard-text-play-outline":986204,"clippy":983375,"clock":985428,"clock-alert":985429,"clock-alert-outline":984526,"clock-check":987048,"clock-check-outline":987049,"clock-digital":986775,"clock-end":983377,"clock-fast":983378,"clock-in":983379,"clock-out":983380,"clock-outline":983376,"clock-start":983381,"clock-time-eight":988230,"clock-time-eight-outline":988242,"clock-time-eleven":988233,"clock-time-eleven-outline":988245,"clock-time-five":988227,"clock-time-five-outline":988239,"clock-time-four":988226,"clock-time-four-outline":988238,"clock-time-nine":988231,"clock-time-nine-outline":988243,"clock-time-one":988223,"clock-time-one-outline":988235,"clock-time-seven":988229,"clock-time-seven-outline":988241,"clock-time-six":988228,"clock-time-six-outline":988240,"clock-time-ten":988232,"clock-time-ten-outline":988244,"clock-time-three":988225,"clock-time-three-outline":988237,"clock-time-twelve":988234,"clock-time-twelve-outline":988246,"clock-time-two":988224,"clock-time-two-outline":988236,"close":983382,"close-box":983383,"close-box-multiple":986205,"close-box-multiple-outline":986206,"close-box-outline":983384,"close-circle":983385,"close-circle-multiple":984618,"close-circle-multiple-outline":985219,"close-circle-outline":983386,"close-network":983387,"close-network-outline":986207,"close-octagon":983388,"close-octagon-outline":983389,"close-outline":984777,"close-thick":988056,"closed-caption":983390,"closed-caption-outline":986557,"cloud":983391,"cloud-alert":985568,"cloud-braces":985013,"cloud-check":983392,"cloud-check-outline":987852,"cloud-circle":983393,"cloud-download":983394,"cloud-download-outline":985981,"cloud-lock":987633,"cloud-lock-outline":987634,"cloud-off-outline":983396,"cloud-outline":983395,"cloud-print":983397,"cloud-print-outline":983398,"cloud-question":985657,"cloud-refresh":984362,"cloud-search":985430,"cloud-search-outline":985431,"cloud-sync":984639,"cloud-sync-outline":987862,"cloud-tags":985014,"cloud-upload":983399,"cloud-upload-outline":985982,"clover":985110,"coach-lamp":987168,"coat-rack":987294,"code-array":983400,"code-braces":983401,"code-braces-box":987350,"code-brackets":983402,"code-equal":983403,"code-greater-than":983404,"code-greater-than-or-equal":983405,"code-json":984614,"code-less-than":983406,"code-less-than-or-equal":983407,"code-not-equal":983408,"code-not-equal-variant":983409,"code-parentheses":983410,"code-parentheses-box":987351,"code-string":983411,"code-tags":983412,"code-tags-check":984724,"codepen":983413,"coffee":983414,"coffee-maker":987295,"coffee-off":987050,"coffee-off-outline":987051,"coffee-outline":984778,"coffee-to-go":983415,"coffee-to-go-outline":987918,"coffin":985983,"cog":984211,"cog-box":984212,"cog-clockwise":987613,"cog-counterclockwise":987614,"cog-off":988110,"cog-off-outline":988111,"cog-outline":985275,"cog-refresh":988254,"cog-refresh-outline":988255,"cog-sync":988256,"cog-sync-outline":988257,"cog-transfer":987227,"cog-transfer-outline":987228,"cogs":985302,"collage":984640,"collapse-all":985766,"collapse-all-outline":985767,"color-helper":983417,"comma":986659,"comma-box":986667,"comma-box-outline":986660,"comma-circle":986661,"comma-circle-outline":986662,"comment":983418,"comment-account":983419,"comment-account-outline":983420,"comment-alert":983421,"comment-alert-outline":983422,"comment-arrow-left":985569,"comment-arrow-left-outline":985570,"comment-arrow-right":985571,"comment-arrow-right-outline":985572,"comment-check":983423,"comment-check-outline":983424,"comment-edit":987583,"comment-edit-outline":987844,"comment-eye":985658,"comment-eye-outline":985659,"comment-multiple":985183,"comment-multiple-outline":983425,"comment-outline":983426,"comment-plus":985573,"comment-plus-outline":983427,"comment-processing":983428,"comment-processing-outline":983429,"comment-question":985111,"comment-question-outline":983430,"comment-quote":987169,"comment-quote-outline":987170,"comment-remove":984542,"comment-remove-outline":983431,"comment-search":985660,"comment-search-outline":985661,"comment-text":983432,"comment-text-multiple":985184,"comment-text-multiple-outline":985185,"comment-text-outline":983433,"compare":983434,"compare-horizontal":988306,"compare-vertical":988307,"compass":983435,"compass-off":985984,"compass-off-outline":985985,"compass-outline":983436,"compass-rose":988034,"concourse-ci":987296,"console":983437,"console-line":985015,"console-network":985257,"console-network-outline":986208,"consolidate":987352,"contactless-payment":986474,"contactless-payment-circle":983841,"contactless-payment-circle-outline":984072,"contacts":984779,"contacts-outline":984504,"contain":985662,"contain-end":985663,"contain-start":985664,"content-copy":983439,"content-cut":983440,"content-duplicate":983441,"content-paste":983442,"content-save":983443,"content-save-alert":986946,"content-save-alert-outline":986947,"content-save-all":983444,"content-save-all-outline":986948,"content-save-cog":988251,"content-save-cog-outline":988252,"content-save-edit":986363,"content-save-edit-outline":986364,"content-save-move":986663,"content-save-move-outline":986664,"content-save-outline":985112,"content-save-settings":984603,"content-save-settings-outline":985902,"contrast":983445,"contrast-box":983446,"contrast-circle":983447,"controller-classic":985986,"controller-classic-outline":985987,"cookie":983448,"coolant-temperature":984008,"copyright":984550,"cordova":985432,"corn":985016,"corn-off":988143,"cosine-wave":988281,"counter":983449,"cow":983450,"cpu-32-bit":986847,"cpu-64-bit":986848,"crane":985186,"creation":984692,"creative-commons":986475,"credit-card":987119,"credit-card-check":988112,"credit-card-check-outline":988113,"credit-card-clock":986849,"credit-card-clock-outline":986850,"credit-card-marker":984744,"credit-card-marker-outline":986558,"credit-card-minus":987052,"credit-card-minus-outline":987053,"credit-card-multiple":987120,"credit-card-multiple-outline":983452,"credit-card-off":987121,"credit-card-off-outline":984548,"credit-card-outline":983451,"credit-card-plus":987122,"credit-card-plus-outline":984694,"credit-card-refund":987123,"credit-card-refund-outline":985768,"credit-card-remove":987054,"credit-card-remove-outline":987055,"credit-card-scan":987124,"credit-card-scan-outline":983453,"credit-card-settings":987125,"credit-card-settings-outline":985303,"credit-card-wireless":985090,"credit-card-wireless-off":984442,"credit-card-wireless-off-outline":984443,"credit-card-wireless-outline":986476,"cricket":986477,"crop":983454,"crop-free":983455,"crop-landscape":983456,"crop-portrait":983457,"crop-rotate":984726,"crop-square":983458,"crosshairs":983459,"crosshairs-gps":983460,"crosshairs-off":986949,"crosshairs-question":987446,"crown":983461,"crown-outline":987600,"cryengine":985433,"crystal-ball":985903,"cube":983462,"cube-off":988188,"cube-off-outline":988189,"cube-outline":983463,"cube-scan":985988,"cube-send":983464,"cube-unfolded":983465,"cup":983466,"cup-off":984549,"cup-off-outline":988029,"cup-outline":987919,"cup-water":983467,"cupboard":986950,"cupboard-outline":986951,"cupcake":985434,"curling":985187,"currency-bdt":985188,"currency-brl":985989,"currency-btc":983468,"currency-cny":985018,"currency-eth":985019,"currency-eur":983469,"currency-eur-off":987925,"currency-gbp":983470,"currency-ils":986209,"currency-inr":983471,"currency-jpy":985020,"currency-krw":985021,"currency-kzt":985189,"currency-ngn":983472,"currency-php":985574,"currency-rial":986780,"currency-rub":983473,"currency-sign":985022,"currency-try":983474,"currency-twd":985023,"currency-usd":983489,"currency-usd-circle":987499,"currency-usd-circle-outline":983416,"currency-usd-off":984698,"current-ac":988288,"current-dc":985436,"cursor-default":983488,"cursor-default-click":986365,"cursor-default-click-outline":986366,"cursor-default-gesture":987431,"cursor-default-gesture-outline":987432,"cursor-default-outline":983487,"cursor-move":983486,"cursor-pointer":983485,"cursor-text":984551,"database":983484,"database-check":985769,"database-edit":985990,"database-export":985438,"database-import":985437,"database-lock":985770,"database-marker":987894,"database-minus":983483,"database-plus":983482,"database-refresh":984514,"database-remove":986368,"database-search":985190,"database-settings":986369,"database-sync":986367,"death-star":985304,"death-star-variant":985305,"deathly-hallows":985991,"debian":985306,"debug-step-into":983481,"debug-step-out":983480,"debug-step-over":983479,"decagram":984940,"decagram-outline":984941,"decimal":987297,"decimal-comma":987298,"decimal-comma-decrease":987299,"decimal-comma-increase":987300,"decimal-decrease":983478,"decimal-increase":983477,"delete":983476,"delete-alert":987301,"delete-alert-outline":987302,"delete-circle":984707,"delete-circle-outline":985992,"delete-empty":984780,"delete-empty-outline":986781,"delete-forever":984552,"delete-forever-outline":985993,"delete-off":987303,"delete-off-outline":987304,"delete-outline":985575,"delete-restore":985113,"delete-sweep":984553,"delete-sweep-outline":986210,"delete-variant":983475,"delta":983490,"desk":987705,"desk-lamp":985439,"deskphone":983491,"desktop-classic":985024,"desktop-mac":983492,"desktop-mac-dashboard":985576,"desktop-tower":983493,"desktop-tower-monitor":985771,"details":983494,"dev-to":986478,"developer-board":984727,"deviantart":983495,"devices":987056,"diabetes":987430,"dialpad":984604,"diameter":986211,"diameter-outline":986212,"diameter-variant":986213,"diamond":985994,"diamond-outline":985995,"diamond-stone":983496,"dice-1":983498,"dice-1-outline":987466,"dice-2":983499,"dice-2-outline":987467,"dice-3":983500,"dice-3-outline":987468,"dice-4":983501,"dice-4-outline":987469,"dice-5":983502,"dice-5-outline":987470,"dice-6":983503,"dice-6-outline":987471,"dice-d10":987475,"dice-d10-outline":984943,"dice-d12":987476,"dice-d12-outline":985191,"dice-d20":987477,"dice-d20-outline":984554,"dice-d4":987472,"dice-d4-outline":984555,"dice-d6":987473,"dice-d6-outline":984557,"dice-d8":987474,"dice-d8-outline":984556,"dice-multiple":984942,"dice-multiple-outline":987478,"digital-ocean":987703,"dip-switch":985025,"directions":983504,"directions-fork":984641,"disc":984558,"disc-alert":983505,"disc-player":985440,"discord":984687,"dishwasher":985772,"dishwasher-alert":987576,"dishwasher-off":987577,"disqus":983506,"distribute-horizontal-center":987593,"distribute-horizontal-left":987592,"distribute-horizontal-right":987594,"distribute-vertical-bottom":987595,"distribute-vertical-center":987596,"distribute-vertical-top":987597,"diving-flippers":986559,"diving-helmet":986560,"diving-scuba":986561,"diving-scuba-flag":986562,"diving-scuba-tank":986563,"diving-scuba-tank-multiple":986564,"diving-snorkel":986565,"division":983508,"division-box":983509,"dlna":985665,"dna":984708,"dns":983510,"dns-outline":985996,"do-not-disturb":984728,"do-not-disturb-off":984729,"dock-bottom":987305,"dock-left":987306,"dock-right":987307,"dock-window":987308,"docker":985192,"doctor":985666,"dog":985667,"dog-service":985773,"dog-side":985668,"dolby":984755,"dolly":986782,"domain":983511,"domain-off":986479,"domain-plus":987309,"domain-remove":987310,"dome-light":988190,"domino-mask":987171,"donkey":985026,"door":985114,"door-closed":985115,"door-closed-lock":987311,"door-open":985116,"doorbell":987878,"doorbell-video":985193,"dot-net":985774,"dots-horizontal":983512,"dots-horizontal-circle":985027,"dots-horizontal-circle-outline":985997,"dots-vertical":983513,"dots-vertical-circle":985028,"dots-vertical-circle-outline":985998,"douban":984730,"download":983514,"download-box":988258,"download-box-outline":988259,"download-circle":988260,"download-circle-outline":988261,"download-lock":987936,"download-lock-outline":987937,"download-multiple":985577,"download-network":984820,"download-network-outline":986214,"download-off":987312,"download-off-outline":987313,"download-outline":985999,"drag":983515,"drag-horizontal":983516,"drag-horizontal-variant":987888,"drag-variant":986000,"drag-vertical":983517,"drag-vertical-variant":987889,"drama-masks":986370,"draw":986953,"drawing":983518,"drawing-box":983519,"dresser":986954,"dresser-outline":986955,"drone":983522,"dropbox":983523,"drupal":983524,"duck":983525,"dumbbell":983526,"dump-truck":986215,"ear-hearing":985029,"ear-hearing-off":985669,"earth":983527,"earth-arrow-right":987921,"earth-box":984781,"earth-box-minus":988167,"earth-box-off":984782,"earth-box-plus":988166,"earth-box-remove":988168,"earth-minus":988164,"earth-off":983528,"earth-plus":988163,"earth-remove":988165,"egg":985775,"egg-easter":985776,"egg-off":988144,"egg-off-outline":988145,"egg-outline":988146,"eight-track":985578,"eject":983530,"eject-outline":986001,"electric-switch":986783,"electric-switch-closed":987353,"electron-framework":987172,"elephant":985030,"elevation-decline":983531,"elevation-rise":983532,"elevator":983533,"elevator-down":987842,"elevator-passenger":988033,"elevator-up":987841,"ellipse":986784,"ellipse-outline":986785,"email":983534,"email-alert":984783,"email-alert-outline":986434,"email-box":986371,"email-check":985777,"email-check-outline":985778,"email-edit":986851,"email-edit-outline":986852,"email-lock":983537,"email-mark-as-unread":986002,"email-minus":986853,"email-minus-outline":986854,"email-multiple":986855,"email-multiple-outline":986856,"email-newsletter":987057,"email-off":988131,"email-off-outline":988132,"email-open":983535,"email-open-multiple":986857,"email-open-multiple-outline":986858,"email-open-outline":984559,"email-outline":983536,"email-plus":985579,"email-plus-outline":985580,"email-receive":987354,"email-receive-outline":987355,"email-search":985441,"email-search-outline":985442,"email-send":987356,"email-send-outline":987357,"email-sync":987847,"email-sync-outline":987848,"email-variant":984560,"ember":985904,"emby":984756,"emoticon":986216,"emoticon-angry":986217,"emoticon-angry-outline":986218,"emoticon-confused":987358,"emoticon-confused-outline":987359,"emoticon-cool":986219,"emoticon-cool-outline":983539,"emoticon-cry":986220,"emoticon-cry-outline":986221,"emoticon-dead":986222,"emoticon-dead-outline":984731,"emoticon-devil":986223,"emoticon-devil-outline":983540,"emoticon-excited":986224,"emoticon-excited-outline":984732,"emoticon-frown":986956,"emoticon-frown-outline":986957,"emoticon-happy":986225,"emoticon-happy-outline":983541,"emoticon-kiss":986226,"emoticon-kiss-outline":986227,"emoticon-lol":987668,"emoticon-lol-outline":987669,"emoticon-neutral":986228,"emoticon-neutral-outline":983542,"emoticon-outline":983538,"emoticon-poop":983543,"emoticon-poop-outline":986229,"emoticon-sad":986230,"emoticon-sad-outline":983544,"emoticon-tongue":983545,"emoticon-tongue-outline":986231,"emoticon-wink":986232,"emoticon-wink-outline":986233,"engine":983546,"engine-off":985670,"engine-off-outline":985671,"engine-outline":983547,"epsilon":987360,"equal":983548,"equal-box":983549,"equalizer":986786,"equalizer-outline":986787,"eraser":983550,"eraser-variant":984642,"escalator":983551,"escalator-box":988057,"escalator-down":987840,"escalator-up":987839,"eslint":986234,"et":985779,"ethereum":985194,"ethernet":983552,"ethernet-cable":983553,"ethernet-cable-off":983554,"ev-station":984561,"evernote":983556,"excavator":987173,"exclamation":983557,"exclamation-thick":987704,"exit-run":985672,"exit-to-app":983558,"expand-all":985780,"expand-all-outline":985781,"expansion-card":985262,"expansion-card-variant":987058,"exponent":985443,"exponent-box":985444,"export":983559,"export-variant":986003,"eye":983560,"eye-check":986372,"eye-check-outline":986373,"eye-circle":986004,"eye-circle-outline":986005,"eye-minus":987174,"eye-minus-outline":987175,"eye-off":983561,"eye-off-outline":984785,"eye-outline":984784,"eye-plus":985195,"eye-plus-outline":985196,"eye-settings":985197,"eye-settings-outline":985198,"eyedropper":983562,"eyedropper-minus":988125,"eyedropper-off":988127,"eyedropper-plus":988124,"eyedropper-remove":988126,"eyedropper-variant":983563,"face":984643,"face-agent":986480,"face-outline":986006,"face-profile":984644,"face-profile-woman":987254,"face-recognition":986235,"face-woman":987255,"face-woman-outline":987256,"facebook":983564,"facebook-messenger":983566,"facebook-workplace":985905,"factory":983567,"fan":983568,"fan-alert":988268,"fan-chevron-down":988269,"fan-chevron-up":988270,"fan-minus":988272,"fan-off":985117,"fan-plus":988271,"fan-remove":988273,"fan-speed-1":988274,"fan-speed-2":988275,"fan-speed-3":988276,"fast-forward":983569,"fast-forward-10":986481,"fast-forward-30":986374,"fast-forward-5":987640,"fast-forward-outline":984786,"fax":983570,"feather":984787,"feature-search":985673,"feature-search-outline":985674,"fedora":985307,"fencing":988353,"ferris-wheel":986788,"ferry":983571,"file":983572,"file-account":984891,"file-account-outline":987176,"file-alert":985675,"file-alert-outline":985676,"file-cabinet":985782,"file-cad":986859,"file-cad-box":986860,"file-cancel":986566,"file-cancel-outline":986567,"file-certificate":987526,"file-certificate-outline":987527,"file-chart":983573,"file-chart-outline":987177,"file-check":983574,"file-check-outline":986665,"file-clock":987873,"file-clock-outline":987874,"file-cloud":983575,"file-cloud-outline":987178,"file-code":983598,"file-code-outline":987179,"file-cog":987259,"file-cog-outline":987260,"file-compare":985258,"file-delimited":983576,"file-delimited-outline":986789,"file-document":983577,"file-document-edit":986568,"file-document-edit-outline":986569,"file-document-outline":985582,"file-download":985445,"file-download-outline":985446,"file-edit":987623,"file-edit-outline":987624,"file-excel":983579,"file-excel-box":983580,"file-excel-box-outline":987180,"file-excel-outline":987181,"file-export":983581,"file-export-outline":987182,"file-eye":986570,"file-eye-outline":986571,"file-find":983582,"file-find-outline":986007,"file-hidden":984595,"file-image":983583,"file-image-outline":986800,"file-import":983584,"file-import-outline":987183,"file-key":987524,"file-key-outline":987525,"file-link":987511,"file-link-outline":987512,"file-lock":983585,"file-lock-outline":987184,"file-move":985785,"file-move-outline":987185,"file-multiple":983586,"file-multiple-outline":987186,"file-music":983587,"file-music-outline":986666,"file-outline":983588,"file-pdf":983589,"file-pdf-box":983590,"file-pdf-box-outline":987059,"file-pdf-outline":986669,"file-percent":985118,"file-percent-outline":987187,"file-phone":987513,"file-phone-outline":987514,"file-plus":984914,"file-plus-outline":986861,"file-powerpoint":983591,"file-powerpoint-box":983592,"file-powerpoint-box-outline":987188,"file-powerpoint-outline":987189,"file-presentation-box":983593,"file-question":985199,"file-question-outline":987190,"file-refresh":985368,"file-refresh-outline":984385,"file-remove":986008,"file-remove-outline":987191,"file-replace":985906,"file-replace-outline":985907,"file-restore":984688,"file-restore-outline":987192,"file-search":986236,"file-search-outline":986237,"file-send":983594,"file-send-outline":987193,"file-settings":987257,"file-settings-outline":987258,"file-star":987194,"file-star-outline":987195,"file-swap":987060,"file-swap-outline":987061,"file-sync":987670,"file-sync-outline":987671,"file-table":986238,"file-table-box":987361,"file-table-box-multiple":987362,"file-table-box-multiple-outline":987363,"file-table-box-outline":987364,"file-table-outline":986239,"file-tree":984645,"file-tree-outline":988114,"file-undo":985308,"file-undo-outline":987196,"file-upload":985677,"file-upload-outline":985678,"file-video":983595,"file-video-outline":986668,"file-word":983596,"file-word-box":983597,"file-word-box-outline":987197,"file-word-outline":987198,"film":983599,"filmstrip":983600,"filmstrip-box":983858,"filmstrip-box-multiple":986392,"filmstrip-off":983601,"filter":983602,"filter-menu":987365,"filter-menu-outline":987366,"filter-minus":986862,"filter-minus-outline":986863,"filter-outline":983603,"filter-plus":986864,"filter-plus-outline":986865,"filter-remove":983604,"filter-remove-outline":983605,"filter-variant":983606,"filter-variant-minus":987410,"filter-variant-plus":987411,"filter-variant-remove":987199,"finance":985119,"find-replace":984788,"fingerprint":983607,"fingerprint-off":986801,"fire":983608,"fire-extinguisher":986866,"fire-hydrant":987447,"fire-hydrant-alert":987448,"fire-hydrant-off":987449,"fire-truck":985259,"firebase":985447,"firefox":983609,"fireplace":986670,"fireplace-off":986671,"firework":986672,"fish":983610,"fish-off":988147,"fishbowl":986867,"fishbowl-outline":986868,"fit-to-page":986869,"fit-to-page-outline":986870,"flag":983611,"flag-checkered":983612,"flag-minus":986009,"flag-minus-outline":987314,"flag-outline":983613,"flag-plus":986010,"flag-plus-outline":987315,"flag-remove":986011,"flag-remove-outline":987316,"flag-triangle":983615,"flag-variant":983616,"flag-variant-outline":983614,"flare":986482,"flash":983617,"flash-alert":986871,"flash-alert-outline":986872,"flash-auto":983618,"flash-circle":985120,"flash-off":983619,"flash-outline":984789,"flash-red-eye":984699,"flashlight":983620,"flashlight-off":983621,"flask":983187,"flask-empty":983188,"flask-empty-minus":987706,"flask-empty-minus-outline":987707,"flask-empty-off":988148,"flask-empty-off-outline":988149,"flask-empty-outline":983189,"flask-empty-plus":987708,"flask-empty-plus-outline":987709,"flask-empty-remove":987710,"flask-empty-remove-outline":987711,"flask-minus":987712,"flask-minus-outline":987713,"flask-off":988150,"flask-off-outline":988151,"flask-outline":983190,"flask-plus":987714,"flask-plus-outline":987715,"flask-remove":987716,"flask-remove-outline":987717,"flask-round-bottom":987723,"flask-round-bottom-empty":987724,"flask-round-bottom-empty-outline":987725,"flask-round-bottom-outline":987726,"fleur-de-lis":987907,"flip-horizontal":987367,"flip-to-back":983623,"flip-to-front":983624,"flip-vertical":987368,"floor-lamp":985309,"floor-lamp-dual":987200,"floor-lamp-variant":987201,"floor-plan":985121,"floppy":983625,"floppy-variant":985583,"flower":983626,"flower-outline":985584,"flower-poppy":986376,"flower-tulip":985585,"flower-tulip-outline":985586,"focus-auto":986958,"focus-field":986959,"focus-field-horizontal":986960,"focus-field-vertical":986961,"folder":983627,"folder-account":983628,"folder-account-outline":986012,"folder-alert":986572,"folder-alert-outline":986573,"folder-clock":985786,"folder-clock-outline":985787,"folder-cog":987263,"folder-cog-outline":987264,"folder-download":983629,"folder-download-outline":987369,"folder-edit":985310,"folder-edit-outline":986574,"folder-google-drive":983630,"folder-heart":987370,"folder-heart-outline":987371,"folder-home":987317,"folder-home-outline":987318,"folder-image":983631,"folder-information":987319,"folder-information-outline":987320,"folder-key":985260,"folder-key-network":985261,"folder-key-network-outline":986240,"folder-key-outline":987372,"folder-lock":983632,"folder-lock-open":983633,"folder-marker":987757,"folder-marker-outline":987758,"folder-move":983634,"folder-move-outline":987718,"folder-multiple":983635,"folder-multiple-image":983636,"folder-multiple-outline":983637,"folder-multiple-plus":988286,"folder-multiple-plus-outline":988287,"folder-music":987993,"folder-music-outline":987994,"folder-network":985200,"folder-network-outline":986241,"folder-open":984944,"folder-open-outline":986575,"folder-outline":983638,"folder-plus":983639,"folder-plus-outline":986013,"folder-pound":986377,"folder-pound-outline":986378,"folder-refresh":984905,"folder-refresh-outline":984386,"folder-remove":983640,"folder-remove-outline":986014,"folder-search":985448,"folder-search-outline":985449,"folder-settings":987261,"folder-settings-outline":987262,"folder-star":984733,"folder-star-multiple":988115,"folder-star-multiple-outline":988116,"folder-star-outline":986015,"folder-swap":987062,"folder-swap-outline":987063,"folder-sync":986379,"folder-sync-outline":986380,"folder-table":987875,"folder-table-outline":987876,"folder-text":986242,"folder-text-outline":986243,"folder-upload":983641,"folder-upload-outline":987373,"folder-zip":984811,"folder-zip-outline":985017,"font-awesome":983098,"food":983642,"food-apple":983643,"food-apple-outline":986244,"food-croissant":985032,"food-drumstick":988191,"food-drumstick-off":988264,"food-drumstick-off-outline":988265,"food-drumstick-outline":988192,"food-fork-drink":984562,"food-off":984563,"food-steak":988266,"food-steak-off":988267,"food-variant":983644,"food-variant-off":988133,"foot-print":986962,"football":983645,"football-australian":983646,"football-helmet":983647,"forklift":985033,"form-dropdown":988160,"form-select":988161,"form-textarea":987285,"form-textbox":984590,"form-textbox-lock":987997,"form-textbox-password":985077,"format-align-bottom":984915,"format-align-center":983648,"format-align-justify":983649,"format-align-left":983650,"format-align-middle":984916,"format-align-right":983651,"format-align-top":984917,"format-annotation-minus":985788,"format-annotation-plus":984646,"format-bold":983652,"format-clear":983653,"format-color-fill":983654,"format-color-highlight":986673,"format-color-marker-cancel":987923,"format-color-text":984734,"format-columns":985311,"format-float-center":983655,"format-float-left":983656,"format-float-none":983657,"format-float-right":983658,"format-font":984790,"format-font-size-decrease":985587,"format-font-size-increase":985588,"format-header-1":983659,"format-header-2":983660,"format-header-3":983661,"format-header-4":983662,"format-header-5":983663,"format-header-6":983664,"format-header-decrease":983665,"format-header-equal":983666,"format-header-increase":983667,"format-header-pound":983668,"format-horizontal-align-center":984606,"format-horizontal-align-left":984607,"format-horizontal-align-right":984608,"format-indent-decrease":983669,"format-indent-increase":983670,"format-italic":983671,"format-letter-case":985908,"format-letter-case-lower":985909,"format-letter-case-upper":985910,"format-letter-ends-with":987064,"format-letter-matches":987065,"format-letter-starts-with":987066,"format-line-spacing":983672,"format-line-style":984520,"format-line-weight":984521,"format-list-bulleted":983673,"format-list-bulleted-square":986576,"format-list-bulleted-triangle":986802,"format-list-bulleted-type":983674,"format-list-checkbox":985450,"format-list-checks":984918,"format-list-numbered":983675,"format-list-numbered-rtl":986381,"format-list-text":987759,"format-overline":986803,"format-page-break":984791,"format-paint":983676,"format-paragraph":983677,"format-pilcrow":984792,"format-quote-close":983678,"format-quote-close-outline":987560,"format-quote-open":984919,"format-quote-open-outline":987559,"format-rotate-90":984746,"format-section":984735,"format-size":983679,"format-strikethrough":983680,"format-strikethrough-variant":983681,"format-subscript":983682,"format-superscript":983683,"format-text":983684,"format-text-rotation-angle-down":987067,"format-text-rotation-angle-up":987068,"format-text-rotation-down":986483,"format-text-rotation-down-vertical":987069,"format-text-rotation-none":986484,"format-text-rotation-up":987070,"format-text-rotation-vertical":987071,"format-text-variant":986674,"format-text-wrapping-clip":986382,"format-text-wrapping-overflow":986383,"format-text-wrapping-wrap":986384,"format-textbox":986385,"format-textdirection-l-to-r":983685,"format-textdirection-r-to-l":983686,"format-title":984564,"format-underline":983687,"format-vertical-align-bottom":984609,"format-vertical-align-center":984610,"format-vertical-align-top":984611,"format-wrap-inline":983688,"format-wrap-square":983689,"format-wrap-tight":983690,"format-wrap-top-bottom":983691,"forum":983692,"forum-outline":985122,"forward":983693,"forwardburger":986485,"fountain":985451,"fountain-pen":986386,"fountain-pen-tip":986387,"freebsd":985312,"frequently-asked-questions":986804,"fridge":983696,"fridge-alert":987569,"fridge-alert-outline":987570,"fridge-bottom":983698,"fridge-off":987567,"fridge-off-outline":987568,"fridge-outline":983695,"fridge-top":983697,"fruit-cherries":987202,"fruit-cherries-off":988152,"fruit-citrus":987203,"fruit-citrus-off":988153,"fruit-grapes":987204,"fruit-grapes-outline":987205,"fruit-pineapple":987206,"fruit-watermelon":987207,"fuel":985034,"fullscreen":983699,"fullscreen-exit":983700,"function":983701,"function-variant":985201,"furigana-horizontal":987265,"furigana-vertical":987266,"fuse":986245,"fuse-alert":988205,"fuse-blade":986246,"fuse-off":988204,"gamepad":983702,"gamepad-circle":986675,"gamepad-circle-down":986676,"gamepad-circle-left":986677,"gamepad-circle-outline":986678,"gamepad-circle-right":986679,"gamepad-circle-up":986680,"gamepad-down":986681,"gamepad-left":986682,"gamepad-right":986683,"gamepad-round":986684,"gamepad-round-down":986685,"gamepad-round-left":986686,"gamepad-round-outline":986687,"gamepad-round-right":986688,"gamepad-round-up":986689,"gamepad-square":986805,"gamepad-square-outline":986806,"gamepad-up":986690,"gamepad-variant":983703,"gamepad-variant-outline":986807,"gamma":987374,"gantry-crane":986577,"garage":984793,"garage-alert":985202,"garage-alert-variant":987861,"garage-open":984794,"garage-open-variant":987860,"garage-variant":987859,"gas-cylinder":984647,"gas-station":983704,"gas-station-off":988169,"gas-station-off-outline":988170,"gas-station-outline":986808,"gate":983705,"gate-and":985313,"gate-arrow-right":987497,"gate-nand":985314,"gate-nor":985315,"gate-not":985316,"gate-open":987498,"gate-or":985317,"gate-xnor":985318,"gate-xor":985319,"gatsby":986691,"gauge":983706,"gauge-empty":985203,"gauge-full":985204,"gauge-low":985205,"gavel":983707,"gender-female":983708,"gender-male":983709,"gender-male-female":983710,"gender-male-female-variant":987455,"gender-non-binary":987456,"gender-transgender":983711,"gentoo":985320,"gesture":985035,"gesture-double-tap":984892,"gesture-pinch":985789,"gesture-spread":985790,"gesture-swipe":986486,"gesture-swipe-down":984893,"gesture-swipe-horizontal":985791,"gesture-swipe-left":984894,"gesture-swipe-right":984895,"gesture-swipe-up":984896,"gesture-swipe-vertical":985792,"gesture-tap":984897,"gesture-tap-box":987817,"gesture-tap-button":987816,"gesture-tap-hold":986487,"gesture-two-double-tap":984898,"gesture-two-tap":984899,"ghost":983712,"ghost-off":985589,"gif":986488,"gift":986692,"gift-outline":983713,"git":983714,"github":983716,"gitlab":986016,"glass-cocktail":983894,"glass-flute":983717,"glass-mug":983718,"glass-mug-variant":987414,"glass-pint-outline":987917,"glass-stange":983719,"glass-tulip":983720,"glass-wine":985206,"glasses":983722,"globe-light":987863,"globe-model":985321,"gmail":983723,"gnome":983724,"go-kart":986489,"go-kart-track":986490,"gog":986017,"gold":987727,"golf":985123,"golf-cart":987556,"golf-tee":987267,"gondola":984710,"goodreads":986491,"google":983725,"google-ads":986247,"google-analytics":985036,"google-assistant":985037,"google-cardboard":983726,"google-chrome":983727,"google-circles":983728,"google-circles-communities":983729,"google-circles-extended":983730,"google-circles-group":983731,"google-classroom":983744,"google-cloud":987638,"google-controller":983732,"google-controller-off":983733,"google-downasaur":988002,"google-drive":983734,"google-earth":983735,"google-fit":985452,"google-glass":983736,"google-hangouts":983753,"google-home":985124,"google-keep":984796,"google-lens":985590,"google-maps":984565,"google-my-business":987208,"google-nearby":983737,"google-photos":984797,"google-play":983740,"google-plus":983741,"google-podcast":986809,"google-spreadsheet":985591,"google-street-view":986248,"google-translate":983743,"gradient":984736,"grain":986492,"graph":987209,"graph-outline":987210,"graphql":985207,"grave-stone":986018,"grease-pencil":984648,"greater-than":985453,"greater-than-or-equal":985454,"grid":983745,"grid-large":984920,"grid-off":983746,"grill":986693,"grill-outline":987530,"group":983747,"guitar-acoustic":984945,"guitar-electric":983748,"guitar-pick":983749,"guitar-pick-outline":983750,"guy-fawkes-mask":985125,"hail":985793,"hair-dryer":987375,"hair-dryer-outline":987376,"halloween":986019,"hamburger":984709,"hammer":985322,"hammer-screwdriver":987938,"hammer-wrench":987939,"hand":985679,"hand-heart":987377,"hand-left":986694,"hand-okay":985680,"hand-peace":985681,"hand-peace-variant":985682,"hand-pointing-down":985683,"hand-pointing-left":985684,"hand-pointing-right":983751,"hand-pointing-up":985685,"hand-right":986695,"hand-saw":986696,"hand-water":988063,"handball":986963,"handcuffs":987454,"handshake":987672,"hanger":983752,"hard-hat":985455,"harddisk":983754,"harddisk-plus":987211,"harddisk-remove":987212,"hat-fedora":986020,"hazard-lights":986249,"hdr":986493,"hdr-off":986494,"head":987998,"head-alert":987960,"head-alert-outline":987961,"head-check":987962,"head-check-outline":987963,"head-cog":987964,"head-cog-outline":987965,"head-dots-horizontal":987966,"head-dots-horizontal-outline":987967,"head-flash":987968,"head-flash-outline":987969,"head-heart":987970,"head-heart-outline":987971,"head-lightbulb":987972,"head-lightbulb-outline":987973,"head-minus":987974,"head-minus-outline":987975,"head-outline":987999,"head-plus":987976,"head-plus-outline":987977,"head-question":987978,"head-question-outline":987979,"head-remove":987980,"head-remove-outline":987981,"head-snowflake":987982,"head-snowflake-outline":987983,"head-sync":987984,"head-sync-outline":987985,"headphones":983755,"headphones-bluetooth":985456,"headphones-box":983756,"headphones-off":985038,"headphones-settings":983757,"headset":983758,"headset-dock":983759,"headset-off":983760,"heart":983761,"heart-box":983762,"heart-box-outline":983763,"heart-broken":983764,"heart-broken-outline":986388,"heart-circle":985457,"heart-circle-outline":985458,"heart-flash":986873,"heart-half":984799,"heart-half-full":984798,"heart-half-outline":984800,"heart-minus":988207,"heart-minus-outline":988210,"heart-multiple":985686,"heart-multiple-outline":985687,"heart-off":984921,"heart-off-outline":988212,"heart-outline":983765,"heart-plus":988206,"heart-plus-outline":988209,"heart-pulse":984566,"heart-remove":988208,"heart-remove-outline":988211,"helicopter":985794,"help":983766,"help-box":984971,"help-circle":983767,"help-circle-outline":984613,"help-network":984821,"help-network-outline":986250,"help-rhombus":986021,"help-rhombus-outline":986022,"hexadecimal":987815,"hexagon":983768,"hexagon-multiple":984801,"hexagon-multiple-outline":987378,"hexagon-outline":983769,"hexagon-slice-1":985795,"hexagon-slice-2":985796,"hexagon-slice-3":985797,"hexagon-slice-4":985798,"hexagon-slice-5":985799,"hexagon-slice-6":985800,"hexagram":985801,"hexagram-outline":985802,"high-definition":985039,"high-definition-box":985208,"highway":984567,"hiking":986495,"hinduism":985459,"history":983770,"hockey-puck":985209,"hockey-sticks":985210,"hololens":983771,"home":983772,"home-account":985126,"home-alert":985211,"home-analytics":986810,"home-assistant":985040,"home-automation":985041,"home-circle":985042,"home-circle-outline":987213,"home-city":986389,"home-city-outline":986390,"home-currency-usd":985263,"home-edit":987481,"home-edit-outline":987482,"home-export-outline":987035,"home-flood":986874,"home-floor-0":986578,"home-floor-1":986496,"home-floor-2":986497,"home-floor-3":986498,"home-floor-a":986499,"home-floor-b":986500,"home-floor-g":986501,"home-floor-l":986502,"home-floor-negative-1":986579,"home-group":986580,"home-heart":985127,"home-import-outline":987036,"home-lightbulb":987729,"home-lightbulb-outline":987730,"home-lock":985323,"home-lock-open":985324,"home-map-marker":984568,"home-minus":985460,"home-minus-outline":988117,"home-modern":983773,"home-outline":984737,"home-plus":985461,"home-plus-outline":988118,"home-remove":987719,"home-remove-outline":988119,"home-roof":987435,"home-search":988080,"home-search-outline":988081,"home-thermometer":986964,"home-thermometer-outline":986965,"home-variant":983774,"home-variant-outline":986023,"hook":984802,"hook-off":984803,"hops":983775,"horizontal-rotate-clockwise":987379,"horizontal-rotate-counterclockwise":987380,"horseshoe":985688,"hospital":987126,"hospital-box":983776,"hospital-box-outline":987127,"hospital-building":983777,"hospital-marker":983778,"hot-tub":985128,"hours-24":988280,"hubspot":986391,"hulu":985129,"human":983782,"human-baby-changing-table":988043,"human-child":983783,"human-female":984649,"human-female-boy":985689,"human-female-female":985690,"human-female-girl":985691,"human-greeting":984650,"human-handsdown":984651,"human-handsup":984652,"human-male":984653,"human-male-boy":985692,"human-male-child":988044,"human-male-female":983784,"human-male-girl":985693,"human-male-height":986875,"human-male-height-variant":986876,"human-male-male":985694,"human-pregnant":984527,"human-wheelchair":988045,"humble-bundle":984900,"hvac":987986,"hydraulic-oil-level":987940,"hydraulic-oil-temperature":987941,"hydro-power":987877,"ice-cream":985130,"ice-cream-off":986706,"ice-pop":986877,"id-card":987072,"identifier":986878,"ideogram-cjk":987953,"ideogram-cjk-variant":987954,"iframe":986251,"iframe-array":987381,"iframe-array-outline":987382,"iframe-braces":987383,"iframe-braces-outline":987384,"iframe-outline":986252,"iframe-parentheses":987385,"iframe-parentheses-outline":987386,"iframe-variable":987387,"iframe-variable-outline":987388,"image":983785,"image-album":983786,"image-area":983787,"image-area-close":983788,"image-auto-adjust":987073,"image-broken":983789,"image-broken-variant":983790,"image-edit":987619,"image-edit-outline":987620,"image-filter-black-white":983792,"image-filter-center-focus":983793,"image-filter-center-focus-strong":986879,"image-filter-center-focus-strong-outline":986880,"image-filter-center-focus-weak":983794,"image-filter-drama":983795,"image-filter-frames":983796,"image-filter-hdr":983797,"image-filter-none":983798,"image-filter-tilt-shift":983799,"image-filter-vintage":983800,"image-frame":986697,"image-minus":988185,"image-move":985592,"image-multiple":983801,"image-multiple-outline":983791,"image-off":985131,"image-off-outline":987601,"image-outline":985462,"image-plus":985212,"image-remove":988184,"image-search":985463,"image-search-outline":985464,"image-size-select-actual":986253,"image-size-select-large":986254,"image-size-select-small":986255,"import":983802,"inbox":984711,"inbox-arrow-down":983803,"inbox-arrow-down-outline":987760,"inbox-arrow-up":984017,"inbox-arrow-up-outline":987761,"inbox-full":987762,"inbox-full-outline":987763,"inbox-multiple":985264,"inbox-multiple-outline":986024,"inbox-outline":987764,"incognito":984569,"incognito-circle":988193,"incognito-circle-off":988194,"incognito-off":983157,"infinity":984804,"information":983804,"information-outline":983805,"information-variant":984654,"instagram":983806,"instrument-triangle":987214,"invert-colors":983809,"invert-colors-off":986698,"iobroker":987880,"ip":985695,"ip-network":985696,"ip-network-outline":986256,"ipod":986257,"islam":985465,"island":987215,"iv-bag":987321,"jabber":986581,"jeepney":983810,"jellyfish":986881,"jellyfish-outline":986882,"jira":983811,"jquery":985213,"jsfiddle":983812,"judaism":985466,"jump-rope":987903,"kabaddi":986503,"karate":985132,"keg":983813,"kettle":984570,"kettle-alert":987927,"kettle-alert-outline":987928,"kettle-off":987931,"kettle-off-outline":987932,"kettle-outline":986966,"kettle-steam":987929,"kettle-steam-outline":987930,"kettlebell":987904,"key":983814,"key-arrow-right":987922,"key-change":983815,"key-link":987551,"key-minus":983816,"key-outline":986582,"key-plus":983817,"key-remove":983818,"key-star":987550,"key-variant":983819,"key-wireless":987074,"keyboard":983820,"keyboard-backspace":983821,"keyboard-caps":983822,"keyboard-close":983823,"keyboard-esc":987831,"keyboard-f1":987819,"keyboard-f10":987828,"keyboard-f11":987829,"keyboard-f12":987830,"keyboard-f2":987820,"keyboard-f3":987821,"keyboard-f4":987822,"keyboard-f5":987823,"keyboard-f6":987824,"keyboard-f7":987825,"keyboard-f8":987826,"keyboard-f9":987827,"keyboard-off":983824,"keyboard-off-outline":986699,"keyboard-outline":985467,"keyboard-return":983825,"keyboard-settings":985593,"keyboard-settings-outline":985594,"keyboard-space":987216,"keyboard-tab":983826,"keyboard-variant":983827,"khanda":987389,"kickstarter":984901,"klingon":987995,"knife":985595,"knife-military":985596,"kodi":983828,"kubernetes":987390,"label":983829,"label-multiple":988021,"label-multiple-outline":988022,"label-off":985803,"label-off-outline":985804,"label-outline":983830,"label-percent":987882,"label-percent-outline":987883,"label-variant":985805,"label-variant-outline":985806,"ladybug":985133,"lambda":984615,"lamp":984757,"lan":983831,"lan-check":987818,"lan-connect":983832,"lan-disconnect":983833,"lan-pending":983834,"language-c":984689,"language-cpp":984690,"language-csharp":983835,"language-css3":983836,"language-fortran":987674,"language-go":985043,"language-haskell":986258,"language-html5":983837,"language-java":985911,"language-javascript":983838,"language-kotlin":987673,"language-lua":985265,"language-markdown":983892,"language-markdown-outline":986971,"language-php":983839,"language-python":983840,"language-r":985044,"language-ruby":986413,"language-ruby-on-rails":985807,"language-swift":984805,"language-typescript":984806,"language-xaml":984691,"laptop":983842,"laptop-chromebook":983843,"laptop-mac":983844,"laptop-off":984807,"laptop-windows":983845,"laravel":985808,"laser-pointer":988292,"lasso":986883,"lastpass":984134,"latitude":986967,"launch":983847,"lava-lamp":985045,"layers":983848,"layers-minus":986700,"layers-off":983849,"layers-off-outline":985597,"layers-outline":985598,"layers-plus":986701,"layers-remove":986702,"layers-search":987654,"layers-search-outline":987655,"layers-triple":986968,"layers-triple-outline":986969,"lead-pencil":984655,"leaf":983850,"leaf-maple":986259,"leaf-maple-off":987866,"leaf-off":987865,"leak":986583,"leak-off":986584,"led-off":983851,"led-on":983852,"led-outline":983853,"led-strip":985046,"led-strip-variant":987217,"led-variant-off":983854,"led-variant-on":983855,"led-variant-outline":983856,"leek":987517,"less-than":985468,"less-than-or-equal":985469,"library":983857,"library-shelves":986025,"license":987075,"lifebuoy":985214,"light-switch":985470,"lightbulb":983861,"lightbulb-cfl":987656,"lightbulb-cfl-off":987657,"lightbulb-cfl-spiral":987765,"lightbulb-cfl-spiral-off":987843,"lightbulb-group":987731,"lightbulb-group-off":987853,"lightbulb-group-off-outline":987854,"lightbulb-group-outline":987732,"lightbulb-multiple":987733,"lightbulb-multiple-off":987855,"lightbulb-multiple-off-outline":987856,"lightbulb-multiple-outline":987734,"lightbulb-off":986703,"lightbulb-off-outline":986704,"lightbulb-on":984808,"lightbulb-on-outline":984809,"lightbulb-outline":983862,"lighthouse":985599,"lighthouse-on":985600,"lightning-bolt":988171,"lightning-bolt-outline":988172,"lingerie":988278,"link":983863,"link-box":986394,"link-box-outline":986395,"link-box-variant":986396,"link-box-variant-outline":986397,"link-lock":987322,"link-off":983864,"link-plus":986260,"link-variant":983865,"link-variant-minus":987391,"link-variant-off":983866,"link-variant-plus":987392,"link-variant-remove":987393,"linkedin":983867,"linux":983869,"linux-mint":985325,"lipstick":988085,"litecoin":985697,"loading":984946,"location-enter":987076,"location-exit":987077,"lock":983870,"lock-alert":985326,"lock-check":988058,"lock-clock":985471,"lock-open":983871,"lock-open-alert":988059,"lock-open-check":988060,"lock-open-outline":983872,"lock-open-variant":987078,"lock-open-variant-outline":987079,"lock-outline":983873,"lock-pattern":984810,"lock-plus":984571,"lock-question":985327,"lock-reset":984947,"lock-smart":985266,"locker":985047,"locker-multiple":985048,"login":983874,"login-variant":984572,"logout":983875,"logout-variant":984573,"longitude":986970,"looks":983876,"loupe":983877,"lumx":983878,"lungs":987268,"magnet":983879,"magnet-on":983880,"magnify":983881,"magnify-close":985472,"magnify-minus":983882,"magnify-minus-cursor":985698,"magnify-minus-outline":984812,"magnify-plus":983883,"magnify-plus-cursor":985699,"magnify-plus-outline":984813,"magnify-remove-cursor":987660,"magnify-remove-outline":987661,"magnify-scan":987766,"mail":986811,"mailbox":984814,"mailbox-open":986504,"mailbox-open-outline":986505,"mailbox-open-up":986506,"mailbox-open-up-outline":986507,"mailbox-outline":986508,"mailbox-up":986509,"mailbox-up-outline":986510,"map":983885,"map-check":986812,"map-check-outline":986813,"map-clock":986398,"map-clock-outline":986399,"map-legend":985601,"map-marker":983886,"map-marker-alert":986885,"map-marker-alert-outline":986886,"map-marker-check":986261,"map-marker-check-outline":987899,"map-marker-circle":983887,"map-marker-distance":985328,"map-marker-down":987394,"map-marker-left":987867,"map-marker-left-outline":987869,"map-marker-minus":984656,"map-marker-minus-outline":987897,"map-marker-multiple":983888,"map-marker-multiple-outline":987767,"map-marker-off":983889,"map-marker-off-outline":987901,"map-marker-outline":985049,"map-marker-path":986400,"map-marker-plus":984657,"map-marker-plus-outline":987896,"map-marker-question":986887,"map-marker-question-outline":986888,"map-marker-radius":983890,"map-marker-radius-outline":987900,"map-marker-remove":986889,"map-marker-remove-outline":987898,"map-marker-remove-variant":986890,"map-marker-right":987868,"map-marker-right-outline":987870,"map-marker-up":987395,"map-minus":985473,"map-outline":985474,"map-plus":985475,"map-search":985476,"map-search-outline":985477,"mapbox":986026,"margin":983891,"marker":984658,"marker-cancel":986585,"marker-check":983893,"mastodon":985809,"material-design":985478,"material-ui":983895,"math-compass":983896,"math-cos":986262,"math-integral":987080,"math-integral-box":987081,"math-log":987269,"math-norm":987082,"math-norm-box":987083,"math-sin":986263,"math-tan":986264,"matrix":984616,"medal":985479,"medal-outline":987942,"medical-bag":984815,"meditation":987515,"memory":983899,"menu":983900,"menu-down":983901,"menu-down-outline":984758,"menu-left":983902,"menu-left-outline":985602,"menu-open":986027,"menu-right":983903,"menu-right-outline":985603,"menu-swap":985700,"menu-swap-outline":985701,"menu-up":983904,"menu-up-outline":984759,"merge":986972,"message":983905,"message-alert":983906,"message-alert-outline":985604,"message-arrow-left":987890,"message-arrow-left-outline":987891,"message-arrow-right":987892,"message-arrow-right-outline":987893,"message-bulleted":984738,"message-bulleted-off":984739,"message-cog":984817,"message-cog-outline":987506,"message-draw":983907,"message-image":983908,"message-image-outline":987500,"message-lock":987084,"message-lock-outline":987501,"message-minus":987502,"message-minus-outline":987503,"message-outline":983909,"message-plus":984659,"message-plus-outline":987323,"message-processing":983910,"message-processing-outline":987504,"message-reply":983911,"message-reply-text":983912,"message-settings":984816,"message-settings-outline":987505,"message-text":983913,"message-text-clock":987507,"message-text-clock-outline":987508,"message-text-lock":987085,"message-text-lock-outline":987509,"message-text-outline":983914,"message-video":983915,"meteor":984617,"metronome":985050,"metronome-tick":985051,"micro-sd":985052,"microphone":983916,"microphone-minus":985267,"microphone-off":983917,"microphone-outline":983918,"microphone-plus":985268,"microphone-settings":983919,"microphone-variant":983920,"microphone-variant-off":983921,"microscope":984660,"microsoft":983922,"microsoft-access":988046,"microsoft-azure":985093,"microsoft-azure-devops":987093,"microsoft-bing":983204,"microsoft-dynamics-365":985480,"microsoft-edge":983529,"microsoft-edge-legacy":987728,"microsoft-excel":988047,"microsoft-internet-explorer":983808,"microsoft-office":984006,"microsoft-onedrive":984010,"microsoft-onenote":984903,"microsoft-outlook":986402,"microsoft-powerpoint":988048,"microsoft-sharepoint":988049,"microsoft-teams":983739,"microsoft-visual-studio":984592,"microsoft-visual-studio-code":985630,"microsoft-windows":984499,"microsoft-windows-classic":985633,"microsoft-word":988050,"microsoft-xbox":984505,"microsoft-xbox-controller":984506,"microsoft-xbox-controller-battery-alert":984907,"microsoft-xbox-controller-battery-charging":985634,"microsoft-xbox-controller-battery-empty":984908,"microsoft-xbox-controller-battery-full":984909,"microsoft-xbox-controller-battery-low":984910,"microsoft-xbox-controller-battery-medium":984911,"microsoft-xbox-controller-battery-unknown":984912,"microsoft-xbox-controller-menu":986735,"microsoft-xbox-controller-off":984507,"microsoft-xbox-controller-view":986736,"microsoft-yammer":984969,"microwave":986265,"microwave-off":988195,"middleware":986973,"middleware-outline":986974,"midi":985329,"midi-port":985330,"mine":986586,"minecraft":983923,"mini-sd":985605,"minidisc":985606,"minus":983924,"minus-box":983925,"minus-box-multiple":987457,"minus-box-multiple-outline":987458,"minus-box-outline":984818,"minus-circle":983926,"minus-circle-multiple":983898,"minus-circle-multiple-outline":985811,"minus-circle-off":988249,"minus-circle-off-outline":988250,"minus-circle-outline":983927,"minus-network":983928,"minus-network-outline":986266,"mirror":987645,"mixed-martial-arts":986511,"mixed-reality":985215,"mixer":985053,"molecule":986028,"molecule-co":987902,"molecule-co2":985060,"monitor":983929,"monitor-cellphone":985481,"monitor-cellphone-star":985482,"monitor-clean":987396,"monitor-dashboard":985607,"monitor-edit":987846,"monitor-eye":988084,"monitor-lock":986587,"monitor-multiple":983930,"monitor-off":986512,"monitor-screenshot":986705,"monitor-share":988291,"monitor-speaker":986975,"monitor-speaker-off":986976,"monitor-star":986588,"moon-first-quarter":986977,"moon-full":986978,"moon-last-quarter":986979,"moon-new":986980,"moon-waning-crescent":986981,"moon-waning-gibbous":986982,"moon-waxing-crescent":986983,"moon-waxing-gibbous":986984,"moped":987270,"more":983931,"mother-heart":987924,"mother-nurse":986401,"motion-sensor":986513,"motion-sensor-off":988213,"motorbike":983932,"mouse":983933,"mouse-bluetooth":985483,"mouse-off":983934,"mouse-variant":983935,"mouse-variant-off":983936,"move-resize":984661,"move-resize-variant":984662,"movie":983937,"movie-edit":987426,"movie-edit-outline":987427,"movie-filter":987428,"movie-filter-outline":987429,"movie-open":987086,"movie-open-outline":987087,"movie-outline":986589,"movie-roll":985054,"movie-search":987602,"movie-search-outline":987603,"muffin":985484,"multiplication":983938,"multiplication-box":983939,"mushroom":985055,"mushroom-off":988154,"mushroom-off-outline":988155,"mushroom-outline":985056,"music":984922,"music-accidental-double-flat":986985,"music-accidental-double-sharp":986986,"music-accidental-flat":986987,"music-accidental-natural":986988,"music-accidental-sharp":986989,"music-box":983940,"music-box-multiple":983859,"music-box-multiple-outline":986884,"music-box-outline":983941,"music-circle":983942,"music-circle-outline":985812,"music-clef-alto":986990,"music-clef-bass":986991,"music-clef-treble":986992,"music-note":983943,"music-note-bluetooth":984574,"music-note-bluetooth-off":984575,"music-note-eighth":983944,"music-note-eighth-dotted":986993,"music-note-half":983945,"music-note-half-dotted":986994,"music-note-off":983946,"music-note-off-outline":986995,"music-note-outline":986996,"music-note-plus":986590,"music-note-quarter":983947,"music-note-quarter-dotted":986997,"music-note-sixteenth":983948,"music-note-sixteenth-dotted":986998,"music-note-whole":983949,"music-note-whole-dotted":986999,"music-off":984923,"music-rest-eighth":987000,"music-rest-half":987001,"music-rest-quarter":987002,"music-rest-sixteenth":987003,"music-rest-whole":987004,"nail":986591,"nas":985331,"nativescript":985216,"nature":983950,"nature-people":983951,"navigation":983952,"near-me":984525,"necklace":986891,"needle":983953,"netflix":984902,"network":984819,"network-off":986267,"network-off-outline":986268,"network-outline":986269,"network-strength-1":985332,"network-strength-1-alert":985333,"network-strength-2":985334,"network-strength-2-alert":985335,"network-strength-3":985336,"network-strength-3-alert":985337,"network-strength-4":985338,"network-strength-4-alert":985339,"network-strength-off":985340,"network-strength-off-outline":985341,"network-strength-outline":985342,"new-box":983956,"newspaper":983957,"newspaper-minus":986892,"newspaper-plus":986893,"newspaper-variant":987137,"newspaper-variant-multiple":987138,"newspaper-variant-multiple-outline":987139,"newspaper-variant-outline":987140,"nfc":983958,"nfc-search-variant":986707,"nfc-tap":983959,"nfc-variant":983960,"nfc-variant-off":986708,"ninja":984948,"nintendo-game-boy":988051,"nintendo-switch":985057,"nintendo-wii":984491,"nintendo-wiiu":984877,"nix":987397,"nodejs":983961,"noodles":987518,"not-equal":985485,"not-equal-variant":985486,"note":983962,"note-multiple":984760,"note-multiple-outline":984761,"note-outline":983963,"note-plus":983964,"note-plus-outline":983965,"note-text":983966,"note-text-outline":987607,"notebook":985134,"notebook-multiple":986709,"notebook-outline":986815,"notification-clear-all":983967,"npm":984823,"nuke":984740,"null":985058,"numeric":983968,"numeric-0":985913,"numeric-0-box":983969,"numeric-0-box-multiple":986894,"numeric-0-box-multiple-outline":983970,"numeric-0-box-outline":983971,"numeric-0-circle":986270,"numeric-0-circle-outline":986271,"numeric-1":985914,"numeric-1-box":983972,"numeric-1-box-multiple":986895,"numeric-1-box-multiple-outline":983973,"numeric-1-box-outline":983974,"numeric-1-circle":986272,"numeric-1-circle-outline":986273,"numeric-10":987113,"numeric-10-box":987005,"numeric-10-box-multiple":987114,"numeric-10-box-multiple-outline":987115,"numeric-10-box-outline":987006,"numeric-10-circle":987116,"numeric-10-circle-outline":987117,"numeric-2":985915,"numeric-2-box":983975,"numeric-2-box-multiple":986896,"numeric-2-box-multiple-outline":983976,"numeric-2-box-outline":983977,"numeric-2-circle":986274,"numeric-2-circle-outline":986275,"numeric-3":985916,"numeric-3-box":983978,"numeric-3-box-multiple":986897,"numeric-3-box-multiple-outline":983979,"numeric-3-box-outline":983980,"numeric-3-circle":986276,"numeric-3-circle-outline":986277,"numeric-4":985917,"numeric-4-box":983981,"numeric-4-box-multiple":986898,"numeric-4-box-multiple-outline":983986,"numeric-4-box-outline":983982,"numeric-4-circle":986278,"numeric-4-circle-outline":986279,"numeric-5":985918,"numeric-5-box":983985,"numeric-5-box-multiple":986899,"numeric-5-box-multiple-outline":983983,"numeric-5-box-outline":983984,"numeric-5-circle":986280,"numeric-5-circle-outline":986281,"numeric-6":985919,"numeric-6-box":983987,"numeric-6-box-multiple":986900,"numeric-6-box-multiple-outline":983988,"numeric-6-box-outline":983989,"numeric-6-circle":986282,"numeric-6-circle-outline":986283,"numeric-7":985920,"numeric-7-box":983990,"numeric-7-box-multiple":986901,"numeric-7-box-multiple-outline":983991,"numeric-7-box-outline":983992,"numeric-7-circle":986284,"numeric-7-circle-outline":986285,"numeric-8":985921,"numeric-8-box":983993,"numeric-8-box-multiple":986902,"numeric-8-box-multiple-outline":983994,"numeric-8-box-outline":983995,"numeric-8-circle":986286,"numeric-8-circle-outline":986287,"numeric-9":985922,"numeric-9-box":983996,"numeric-9-box-multiple":986903,"numeric-9-box-multiple-outline":983997,"numeric-9-box-outline":983998,"numeric-9-circle":986288,"numeric-9-circle-outline":986289,"numeric-9-plus":987118,"numeric-9-plus-box":983999,"numeric-9-plus-box-multiple":986904,"numeric-9-plus-box-multiple-outline":984000,"numeric-9-plus-box-outline":984001,"numeric-9-plus-circle":986290,"numeric-9-plus-circle-outline":986291,"numeric-negative-1":987218,"nut":984824,"nutrition":984002,"nuxt":987398,"oar":984700,"ocarina":986592,"oci":987881,"ocr":987450,"octagon":984003,"octagon-outline":984004,"octagram":984825,"octagram-outline":984949,"odnoklassniki":984005,"offer":987675,"office-building":985489,"oil":984007,"oil-lamp":986905,"oil-level":987219,"oil-temperature":987128,"omega":984009,"one-up":986029,"onepassword":985217,"opacity":984524,"open-in-app":984011,"open-in-new":984012,"open-source-initiative":986030,"openid":984013,"opera":984014,"orbit":983064,"order-alphabetical-ascending":983565,"order-alphabetical-descending":986375,"order-bool-ascending":983742,"order-bool-ascending-variant":985487,"order-bool-descending":988036,"order-bool-descending-variant":985488,"order-numeric-ascending":984389,"order-numeric-descending":984390,"origin":985923,"ornament":984015,"ornament-variant":984016,"outdoor-lamp":987220,"overscan":987141,"owl":984018,"pac-man":986031,"package":984019,"package-down":984020,"package-up":984021,"package-variant":984022,"package-variant-closed":984023,"page-first":984576,"page-last":984577,"page-layout-body":984826,"page-layout-footer":984827,"page-layout-header":984828,"page-layout-header-footer":987007,"page-layout-sidebar-left":984829,"page-layout-sidebar-right":984830,"page-next":986032,"page-next-outline":986033,"page-previous":986034,"page-previous-outline":986035,"pail":988183,"pail-minus":988215,"pail-minus-outline":988220,"pail-off":988217,"pail-off-outline":988222,"pail-outline":988218,"pail-plus":988214,"pail-plus-outline":988219,"pail-remove":988216,"pail-remove-outline":988221,"palette":984024,"palette-advanced":984025,"palette-outline":986636,"palette-swatch":985269,"palette-swatch-outline":987996,"palm-tree":987221,"pan":986036,"pan-bottom-left":986037,"pan-bottom-right":986038,"pan-down":986039,"pan-horizontal":986040,"pan-left":986041,"pan-right":986042,"pan-top-left":986043,"pan-top-right":986044,"pan-up":986045,"pan-vertical":986046,"panda":984026,"pandora":984027,"panorama":984028,"panorama-fisheye":984029,"panorama-horizontal":984030,"panorama-vertical":984031,"panorama-wide-angle":984032,"paper-cut-vertical":984033,"paper-roll":987479,"paper-roll-outline":987480,"paperclip":984034,"parachute":986292,"parachute-outline":986293,"parking":984035,"party-popper":987222,"passport":985059,"passport-biometric":986593,"pasta":987488,"patio-heater":987008,"patreon":985218,"pause":984036,"pause-circle":984037,"pause-circle-outline":984038,"pause-octagon":984039,"pause-octagon-outline":984040,"paw":984041,"paw-off":984663,"pdf-box":986710,"peace":985220,"peanut":987132,"peanut-off":987133,"peanut-off-outline":987135,"peanut-outline":987134,"pen":984042,"pen-lock":986594,"pen-minus":986595,"pen-off":986596,"pen-plus":986597,"pen-remove":986598,"pencil":984043,"pencil-box":984044,"pencil-box-multiple":987460,"pencil-box-multiple-outline":987461,"pencil-box-outline":984045,"pencil-circle":984831,"pencil-circle-outline":984950,"pencil-lock":984046,"pencil-lock-outline":986599,"pencil-minus":986600,"pencil-minus-outline":986601,"pencil-off":984047,"pencil-off-outline":986602,"pencil-outline":986294,"pencil-plus":986603,"pencil-plus-outline":986604,"pencil-remove":986605,"pencil-remove-outline":986606,"pencil-ruler":987987,"penguin":986816,"pentagon":984833,"pentagon-outline":984832,"percent":984048,"percent-outline":987768,"periodic-table":985270,"perspective-less":986403,"perspective-more":986404,"pharmacy":984049,"phone":984050,"phone-alert":986906,"phone-alert-outline":987534,"phone-bluetooth":984051,"phone-bluetooth-outline":987535,"phone-cancel":987324,"phone-cancel-outline":987536,"phone-check":987561,"phone-check-outline":987562,"phone-classic":984578,"phone-classic-off":987769,"phone-forward":984052,"phone-forward-outline":987537,"phone-hangup":984053,"phone-hangup-outline":987538,"phone-in-talk":984054,"phone-in-talk-outline":987522,"phone-incoming":984055,"phone-incoming-outline":987539,"phone-lock":984056,"phone-lock-outline":987540,"phone-log":984057,"phone-log-outline":987541,"phone-message":987542,"phone-message-outline":987543,"phone-minus":984664,"phone-minus-outline":987544,"phone-missed":984058,"phone-missed-outline":987557,"phone-off":986607,"phone-off-outline":987558,"phone-outgoing":984059,"phone-outgoing-outline":987545,"phone-outline":986608,"phone-paused":984060,"phone-paused-outline":987546,"phone-plus":984665,"phone-plus-outline":987547,"phone-return":985135,"phone-return-outline":987548,"phone-ring":987563,"phone-ring-outline":987564,"phone-rotate-landscape":985221,"phone-rotate-portrait":985222,"phone-settings":984061,"phone-settings-outline":987549,"phone-voip":984062,"pi":984063,"pi-box":984064,"pi-hole":986609,"piano":984701,"pickaxe":985271,"picture-in-picture-bottom-right":986711,"picture-in-picture-bottom-right-outline":986712,"picture-in-picture-top-right":986713,"picture-in-picture-top-right-outline":986714,"pier":985223,"pier-crane":985224,"pig":984065,"pig-variant":987142,"piggy-bank":987143,"pill":984066,"pillar":984834,"pin":984067,"pin-off":984068,"pin-off-outline":985392,"pin-outline":985393,"pine-tree":984069,"pine-tree-box":984070,"pine-tree-fire":988186,"pinterest":984071,"pinwheel":985813,"pinwheel-outline":985814,"pipe":985061,"pipe-disconnected":985062,"pipe-leak":985225,"pipe-wrench":987988,"pirate":985608,"pistol":984835,"piston":985226,"pizza":984073,"play":984074,"play-box":987770,"play-box-multiple":986393,"play-box-multiple-outline":988134,"play-box-outline":984075,"play-circle":984076,"play-circle-outline":984077,"play-network":985227,"play-network-outline":986295,"play-outline":986907,"play-pause":984078,"play-protected-content":984079,"play-speed":985343,"playlist-check":984519,"playlist-edit":985344,"playlist-minus":984080,"playlist-music":986296,"playlist-music-outline":986297,"playlist-play":984081,"playlist-plus":984082,"playlist-remove":984083,"playlist-star":986610,"plex":984762,"plus":984085,"plus-box":984086,"plus-box-multiple":983860,"plus-box-multiple-outline":987459,"plus-box-outline":984836,"plus-circle":984087,"plus-circle-multiple":983884,"plus-circle-multiple-outline":984088,"plus-circle-outline":984089,"plus-minus":985490,"plus-minus-box":985491,"plus-minus-variant":988361,"plus-network":984090,"plus-network-outline":986298,"plus-one":984091,"plus-outline":984837,"plus-thick":987628,"podcast":985492,"podium":986405,"podium-bronze":986406,"podium-gold":986407,"podium-silver":986408,"point-of-sale":986514,"pokeball":984093,"pokemon-go":985609,"poker-chip":985136,"polaroid":984094,"police-badge":987495,"police-badge-outline":987496,"poll":984095,"poll-box":984096,"poll-box-outline":987771,"polo":988355,"polymer":984097,"pool":984582,"popcorn":984098,"post":987144,"post-outline":987145,"postage-stamp":986299,"pot":983781,"pot-mix":984667,"pot-mix-outline":984695,"pot-outline":983807,"pot-steam":984666,"pot-steam-outline":983846,"pound":984099,"pound-box":984100,"pound-box-outline":987519,"power":984101,"power-cycle":985345,"power-off":985346,"power-on":985347,"power-plug":984741,"power-plug-off":984742,"power-plug-off-outline":988196,"power-plug-outline":988197,"power-settings":984102,"power-sleep":985348,"power-socket":984103,"power-socket-au":985349,"power-socket-de":987399,"power-socket-eu":985063,"power-socket-fr":987400,"power-socket-jp":987401,"power-socket-uk":985064,"power-socket-us":985065,"power-standby":985350,"powershell":985610,"prescription":984838,"presentation":984104,"presentation-play":984105,"printer":984106,"printer-3d":984107,"printer-3d-nozzle":986715,"printer-3d-nozzle-alert":987584,"printer-3d-nozzle-alert-outline":987585,"printer-3d-nozzle-outline":986716,"printer-alert":984108,"printer-check":987462,"printer-eye":988248,"printer-off":986717,"printer-pos":987223,"printer-search":988247,"printer-settings":984839,"printer-wireless":985611,"priority-high":984579,"priority-low":984580,"professional-hexagon":984109,"progress-alert":986300,"progress-check":985493,"progress-clock":985494,"progress-close":987402,"progress-download":985495,"progress-upload":985496,"progress-wrench":986301,"projector":984110,"projector-screen":984111,"propane-tank":987991,"propane-tank-outline":987992,"protocol":987096,"publish":984743,"pulse":984112,"pump":988162,"pumpkin":986047,"purse":986908,"purse-outline":986909,"puzzle":984113,"puzzle-check":988198,"puzzle-check-outline":988199,"puzzle-edit":988371,"puzzle-edit-outline":988377,"puzzle-heart":988372,"puzzle-heart-outline":988378,"puzzle-minus":988369,"puzzle-minus-outline":988375,"puzzle-outline":985702,"puzzle-plus":988368,"puzzle-plus-outline":988374,"puzzle-remove":988370,"puzzle-remove-outline":988376,"puzzle-star":988373,"puzzle-star-outline":988379,"qi":985497,"qqchat":984581,"qrcode":984114,"qrcode-edit":985272,"qrcode-minus":987532,"qrcode-plus":987531,"qrcode-remove":987533,"qrcode-scan":984115,"quadcopter":984116,"quality-high":984117,"quality-low":985612,"quality-medium":985613,"quora":986409,"rabbit":985351,"racing-helmet":986515,"racquetball":986516,"radar":984119,"radiator":984120,"radiator-disabled":985815,"radiator-off":985816,"radio":984121,"radio-am":986302,"radio-fm":986303,"radio-handheld":984122,"radio-off":987676,"radio-tower":984123,"radioactive":984124,"radioactive-off":986817,"radiobox-blank":984125,"radiobox-marked":984126,"radiology-box":988357,"radiology-box-outline":988358,"radius":986304,"radius-outline":986305,"railroad-light":986910,"raspberry-pi":984127,"ray-end":984128,"ray-end-arrow":984129,"ray-start":984130,"ray-start-arrow":984131,"ray-start-end":984132,"ray-vertex":984133,"react":984840,"read":984135,"receipt":984137,"record":984138,"record-circle":986818,"record-circle-outline":986819,"record-player":985498,"record-rec":984139,"rectangle":986718,"rectangle-outline":986719,"recycle":984140,"recycle-variant":988061,"reddit":984141,"redhat":987419,"redo":984142,"redo-variant":984143,"reflect-horizontal":985614,"reflect-vertical":985615,"refresh":984144,"refresh-circle":988023,"regex":984145,"registered-trademark":985703,"relation-many-to-many":988310,"relation-many-to-one":988311,"relation-many-to-one-or-many":988312,"relation-many-to-only-one":988313,"relation-many-to-zero-or-many":988314,"relation-many-to-zero-or-one":988315,"relation-one-or-many-to-many":988316,"relation-one-or-many-to-one":988317,"relation-one-or-many-to-one-or-many":988318,"relation-one-or-many-to-only-one":988319,"relation-one-or-many-to-zero-or-many":988320,"relation-one-or-many-to-zero-or-one":988321,"relation-one-to-many":988322,"relation-one-to-one":988323,"relation-one-to-one-or-many":988324,"relation-one-to-only-one":988325,"relation-one-to-zero-or-many":988326,"relation-one-to-zero-or-one":988327,"relation-only-one-to-many":988328,"relation-only-one-to-one":988329,"relation-only-one-to-one-or-many":988330,"relation-only-one-to-only-one":988331,"relation-only-one-to-zero-or-many":988332,"relation-only-one-to-zero-or-one":988333,"relation-zero-or-many-to-many":988334,"relation-zero-or-many-to-one":988335,"relation-zero-or-many-to-one-or-many":988336,"relation-zero-or-many-to-only-one":988337,"relation-zero-or-many-to-zero-or-many":988338,"relation-zero-or-many-to-zero-or-one":988339,"relation-zero-or-one-to-many":988340,"relation-zero-or-one-to-one":988341,"relation-zero-or-one-to-one-or-many":988342,"relation-zero-or-one-to-only-one":988343,"relation-zero-or-one-to-zero-or-many":988344,"relation-zero-or-one-to-zero-or-one":988345,"relative-scale":984146,"reload":984147,"reload-alert":987403,"reminder":985228,"remote":984148,"remote-desktop":985273,"remote-off":986820,"remote-tv":986821,"remote-tv-off":986822,"rename-box":984149,"reorder-horizontal":984712,"reorder-vertical":984713,"repeat":984150,"repeat-off":984151,"repeat-once":984152,"replay":984153,"reply":984154,"reply-all":984155,"reply-all-outline":986911,"reply-circle":987566,"reply-outline":986912,"reproduction":984156,"resistor":985924,"resistor-nodes":985925,"resize":985704,"resize-bottom-right":984157,"responsive":984158,"restart":984841,"restart-alert":987404,"restart-off":986517,"restore":985499,"restore-alert":987405,"rewind":984159,"rewind-10":986410,"rewind-30":986518,"rewind-5":987641,"rewind-outline":984842,"rhombus":984843,"rhombus-medium":985616,"rhombus-medium-outline":988380,"rhombus-outline":984844,"rhombus-split":985617,"rhombus-split-outline":988381,"ribbon":984160,"rice":985066,"ring":985067,"rivet":986720,"road":984161,"road-variant":984162,"robber":987224,"robot":984745,"robot-industrial":985926,"robot-mower":987639,"robot-mower-outline":987635,"robot-vacuum":984845,"robot-vacuum-variant":985352,"rocket":984163,"rocket-launch":988382,"rocket-launch-outline":988383,"rocket-outline":988079,"rodent":987943,"roller-skate":986411,"roller-skate-off":983365,"rollerblade":986412,"rollerblade-off":983086,"rollupjs":986048,"roman-numeral-1":987272,"roman-numeral-10":987281,"roman-numeral-2":987273,"roman-numeral-3":987274,"roman-numeral-4":987275,"roman-numeral-5":987276,"roman-numeral-6":987277,"roman-numeral-7":987278,"roman-numeral-8":987279,"roman-numeral-9":987280,"room-service":985229,"room-service-outline":986519,"rotate-3d":986823,"rotate-3d-variant":984164,"rotate-left":984165,"rotate-left-variant":984166,"rotate-orbit":986520,"rotate-right":984167,"rotate-right-variant":984168,"rounded-corner":984583,"router":987618,"router-network":987271,"router-wireless":984169,"router-wireless-settings":985705,"routes":984170,"routes-clock":987225,"rowing":984584,"rss":984171,"rss-box":984172,"rss-off":986913,"rug":988277,"rugby":986521,"ruler":984173,"ruler-square":986306,"ruler-square-compass":986814,"run":984846,"run-fast":984174,"rv-truck":987604,"sack":986414,"sack-percent":986415,"safe":985706,"safe-square":987772,"safe-square-outline":987773,"safety-goggles":986416,"sail-boat":986824,"sale":984175,"salesforce":985230,"sass":985068,"satellite":984176,"satellite-uplink":985353,"satellite-variant":984177,"sausage":985274,"saw-blade":986721,"sawtooth-wave":988282,"saxophone":984585,"scale":984178,"scale-balance":984529,"scale-bathroom":984179,"scale-off":987226,"scan-helper":988120,"scanner":984747,"scanner-off":985354,"scatter-plot":986825,"scatter-plot-outline":986826,"school":984180,"school-outline":987520,"scissors-cutting":985707,"scooter":987625,"scoreboard":987774,"scoreboard-outline":987775,"screen-rotation":984181,"screen-rotation-lock":984184,"screw-flat-top":986611,"screw-lag":986612,"screw-machine-flat-top":986613,"screw-machine-round-top":986614,"screw-round-top":986615,"screwdriver":984182,"script":986049,"script-outline":984183,"script-text":986050,"script-text-outline":986051,"sd":984185,"seal":984186,"seal-variant":987097,"search-web":984847,"seat":986307,"seat-flat":984187,"seat-flat-angled":984188,"seat-individual-suite":984189,"seat-legroom-extra":984190,"seat-legroom-normal":984191,"seat-legroom-reduced":984192,"seat-outline":986308,"seat-passenger":987721,"seat-recline-extra":984193,"seat-recline-normal":984194,"seatbelt":986309,"security":984195,"security-network":984196,"seed":986722,"seed-off":988157,"seed-off-outline":988158,"seed-outline":986723,"segment":986827,"select":984197,"select-all":984198,"select-color":986417,"select-compare":985817,"select-drag":985708,"select-group":987010,"select-inverse":984199,"select-marker":987776,"select-multiple":987777,"select-multiple-marker":987778,"select-off":984200,"select-place":987098,"select-search":987652,"selection":984201,"selection-drag":985709,"selection-ellipse":986418,"selection-ellipse-arrow-inside":986914,"selection-marker":987779,"selection-multiple":987781,"selection-multiple-marker":987780,"selection-off":984951,"selection-search":987653,"semantic-web":987926,"send":984202,"send-check":987489,"send-check-outline":987490,"send-circle":986616,"send-circle-outline":986617,"send-clock":987491,"send-clock-outline":987492,"send-lock":985069,"send-lock-outline":987494,"send-outline":987493,"serial-port":984668,"server":984203,"server-minus":984204,"server-network":984205,"server-network-off":984206,"server-off":984207,"server-plus":984208,"server-remove":984209,"server-security":984210,"set-all":984952,"set-center":984953,"set-center-right":984954,"set-left":984955,"set-left-center":984956,"set-left-right":984957,"set-merge":988384,"set-none":984958,"set-right":984959,"set-split":988385,"set-square":988253,"set-top-box":985503,"settings-helper":985710,"shaker":987406,"shaker-outline":987407,"shape":985137,"shape-circle-plus":984669,"shape-outline":985138,"shape-oval-plus":987642,"shape-plus":984213,"shape-polygon-plus":984670,"shape-rectangle-plus":984671,"shape-square-plus":984672,"share":984214,"share-all":987636,"share-all-outline":987637,"share-circle":987565,"share-off":986915,"share-off-outline":986916,"share-outline":985394,"share-variant":984215,"sheep":986310,"shield":984216,"shield-account":985231,"shield-account-outline":985618,"shield-airplane":984763,"shield-airplane-outline":986311,"shield-alert":986828,"shield-alert-outline":986829,"shield-bug":988122,"shield-bug-outline":988123,"shield-car":987011,"shield-check":984421,"shield-check-outline":986312,"shield-cross":986313,"shield-cross-outline":986314,"shield-edit":987552,"shield-edit-outline":987553,"shield-half":988000,"shield-half-full":984960,"shield-home":984714,"shield-home-outline":986315,"shield-key":986052,"shield-key-outline":986053,"shield-link-variant":986419,"shield-link-variant-outline":986420,"shield-lock":985501,"shield-lock-outline":986316,"shield-off":985502,"shield-off-outline":985500,"shield-outline":984217,"shield-plus":985818,"shield-plus-outline":985819,"shield-refresh":983210,"shield-refresh-outline":983520,"shield-remove":985820,"shield-remove-outline":985821,"shield-search":986522,"shield-star":987451,"shield-star-outline":987452,"shield-sun":987229,"shield-sun-outline":987230,"shield-sync":987554,"shield-sync-outline":987555,"ship-wheel":985139,"shoe-formal":985927,"shoe-heel":985928,"shoe-print":986618,"shopping":984218,"shopping-music":984219,"shopping-outline":987605,"shopping-search":987012,"shovel":984848,"shovel-off":984849,"shower":985504,"shower-head":985505,"shredder":984220,"shuffle":984221,"shuffle-disabled":984222,"shuffle-variant":984223,"shuriken":988031,"sigma":984224,"sigma-lower":984619,"sign-caution":984225,"sign-direction":984961,"sign-direction-minus":987136,"sign-direction-plus":987100,"sign-direction-remove":987101,"sign-real-estate":987416,"sign-text":984962,"signal":984226,"signal-2g":984850,"signal-3g":984851,"signal-4g":984852,"signal-5g":985711,"signal-cellular-1":985276,"signal-cellular-2":985277,"signal-cellular-3":985278,"signal-cellular-outline":985279,"signal-distance-variant":986724,"signal-hspa":984853,"signal-hspa-plus":984854,"signal-off":984963,"signal-variant":984586,"signature":986619,"signature-freehand":986620,"signature-image":986621,"signature-text":986622,"silo":985929,"silverware":984227,"silverware-clean":987102,"silverware-fork":984228,"silverware-fork-knife":985712,"silverware-spoon":984229,"silverware-variant":984230,"sim":984231,"sim-alert":984232,"sim-off":984233,"simple-icons":987933,"sina-weibo":985823,"sine-wave":985435,"sitemap":984234,"size-l":988070,"size-m":988069,"size-s":988068,"size-xl":988071,"size-xs":988067,"size-xxl":988072,"size-xxs":988066,"size-xxxl":988073,"skate":986421,"skateboard":988354,"skew-less":986422,"skew-more":986423,"ski":987908,"ski-cross-country":987909,"ski-water":987910,"skip-backward":984235,"skip-backward-outline":986917,"skip-forward":984236,"skip-forward-outline":986918,"skip-next":984237,"skip-next-circle":984673,"skip-next-circle-outline":984674,"skip-next-outline":986919,"skip-previous":984238,"skip-previous-circle":984675,"skip-previous-circle-outline":984676,"skip-previous-outline":986920,"skull":984716,"skull-crossbones":986054,"skull-crossbones-outline":986055,"skull-outline":986056,"skull-scan":988359,"skull-scan-outline":988360,"skype":984239,"skype-business":984240,"slack":984241,"slash-forward":987103,"slash-forward-box":987104,"sleep":984242,"sleep-off":984243,"slope-downhill":986623,"slope-uphill":986624,"slot-machine":987412,"slot-machine-outline":987413,"smart-card":987325,"smart-card-outline":987326,"smart-card-reader":987327,"smart-card-reader-outline":987328,"smog":985713,"smoke-detector":983954,"smoking":984244,"smoking-off":984245,"smoking-pipe":988173,"smoking-pipe-off":988200,"snapchat":984246,"snowboard":987911,"snowflake":984855,"snowflake-alert":986921,"snowflake-melt":987851,"snowflake-variant":986922,"snowman":984247,"soccer":984248,"soccer-field":985140,"sofa":984249,"solar-panel":986523,"solar-panel-large":986524,"solar-power":985714,"soldering-iron":987282,"solid":984717,"sony-playstation":984084,"sort":984250,"sort-alphabetical-ascending":984509,"sort-alphabetical-ascending-variant":987464,"sort-alphabetical-descending":984511,"sort-alphabetical-descending-variant":987465,"sort-alphabetical-variant":984251,"sort-ascending":984252,"sort-bool-ascending":988037,"sort-bool-ascending-variant":988038,"sort-bool-descending":988039,"sort-bool-descending-variant":988040,"sort-descending":984253,"sort-numeric-ascending":988041,"sort-numeric-ascending-variant":985357,"sort-numeric-descending":988042,"sort-numeric-descending-variant":985810,"sort-numeric-variant":984254,"sort-reverse-variant":983868,"sort-variant":984255,"sort-variant-lock":986317,"sort-variant-lock-open":986318,"sort-variant-remove":987463,"soundcloud":984256,"source-branch":984620,"source-branch-check":988367,"source-branch-minus":988363,"source-branch-plus":988362,"source-branch-refresh":988365,"source-branch-remove":988364,"source-branch-sync":988366,"source-commit":984856,"source-commit-end":984857,"source-commit-end-local":984858,"source-commit-local":984859,"source-commit-next-local":984860,"source-commit-start":984861,"source-commit-start-next-local":984862,"source-fork":984257,"source-merge":984621,"source-pull":984258,"source-repository":986319,"source-repository-multiple":986320,"soy-sauce":985070,"soy-sauce-off":988156,"spa":986321,"spa-outline":986322,"space-invaders":986057,"space-station":988035,"spade":986725,"speaker":984259,"speaker-bluetooth":985506,"speaker-multiple":986424,"speaker-off":984260,"speaker-wireless":984863,"speedometer":984261,"speedometer-medium":987013,"speedometer-slow":987014,"spellcheck":984262,"spider":987626,"spider-thread":987627,"spider-web":986058,"spoon-sugar":988201,"spotify":984263,"spotlight":984264,"spotlight-beam":984265,"spray":984677,"spray-bottle":985824,"sprinkler":987231,"sprinkler-variant":987232,"sprout":986726,"sprout-outline":986727,"square":984932,"square-edit-outline":985356,"square-medium":985619,"square-medium-outline":985620,"square-off":987886,"square-off-outline":987887,"square-outline":984931,"square-root":984964,"square-root-box":985507,"square-small":985621,"square-wave":988283,"squeegee":985825,"ssh":985280,"stack-exchange":984587,"stack-overflow":984268,"stackpath":983897,"stadium":987129,"stadium-variant":984864,"stairs":984269,"stairs-box":988062,"stairs-down":987838,"stairs-up":987837,"stamper":986425,"standard-definition":985071,"star":984270,"star-box":985715,"star-box-multiple":987782,"star-box-multiple-outline":987783,"star-box-outline":985716,"star-circle":984271,"star-circle-outline":985508,"star-face":985509,"star-four-points":985826,"star-four-points-outline":985827,"star-half":983622,"star-half-full":984272,"star-off":984273,"star-outline":984274,"star-three-points":985828,"star-three-points-outline":985829,"state-machine":987631,"steam":984275,"steering":984276,"steering-off":985358,"step-backward":984277,"step-backward-2":984278,"step-forward":984279,"step-forward-2":984280,"stethoscope":984281,"sticker":988004,"sticker-alert":988005,"sticker-alert-outline":988006,"sticker-check":988007,"sticker-check-outline":988008,"sticker-circle-outline":984528,"sticker-emoji":984965,"sticker-minus":988009,"sticker-minus-outline":988010,"sticker-outline":988011,"sticker-plus":988012,"sticker-plus-outline":988013,"sticker-remove":988014,"sticker-remove-outline":988015,"stocking":984282,"stomach":987283,"stop":984283,"stop-circle":984678,"stop-circle-outline":984679,"store":984284,"store-24-hour":984285,"store-outline":988001,"storefront":985031,"storefront-outline":987329,"stove":984286,"strategy":987606,"stretch-to-page":986923,"stretch-to-page-outline":986924,"string-lights":987834,"string-lights-off":987835,"subdirectory-arrow-left":984588,"subdirectory-arrow-right":984589,"subtitles":985622,"subtitles-outline":985623,"subway":984748,"subway-alert-variant":986525,"subway-variant":984287,"summit":984966,"sunglasses":984288,"surround-sound":984517,"surround-sound-2-0":985072,"surround-sound-3-1":985073,"surround-sound-5-1":985074,"surround-sound-7-1":985075,"svg":984865,"swap-horizontal":984289,"swap-horizontal-bold":986061,"swap-horizontal-circle":987105,"swap-horizontal-circle-outline":987106,"swap-horizontal-variant":985281,"swap-vertical":984290,"swap-vertical-bold":986062,"swap-vertical-circle":987107,"swap-vertical-circle-outline":987108,"swap-vertical-variant":985282,"swim":984291,"switch":984292,"sword":984293,"sword-cross":984967,"syllabary-hangul":987955,"syllabary-hiragana":987956,"syllabary-katakana":987957,"syllabary-katakana-halfwidth":987958,"symfony":985830,"sync":984294,"sync-alert":984295,"sync-circle":988024,"sync-off":984296,"tab":984297,"tab-minus":985931,"tab-plus":984924,"tab-remove":985932,"tab-unselected":984298,"table":984299,"table-account":988089,"table-alert":988090,"table-arrow-down":988091,"table-arrow-left":988092,"table-arrow-right":988093,"table-arrow-up":988094,"table-border":985624,"table-cancel":988095,"table-chair":987233,"table-check":988096,"table-clock":988097,"table-cog":988098,"table-column":985141,"table-column-plus-after":984300,"table-column-plus-before":984301,"table-column-remove":984302,"table-column-width":984303,"table-edit":984304,"table-eye":987284,"table-eye-off":988099,"table-furniture":984508,"table-headers-eye":987677,"table-headers-eye-off":987678,"table-heart":988100,"table-key":988101,"table-large":984305,"table-large-plus":987015,"table-large-remove":987016,"table-lock":988102,"table-merge-cells":985510,"table-minus":988103,"table-multiple":988104,"table-network":988105,"table-of-contents":985142,"table-off":988106,"table-plus":985717,"table-refresh":988064,"table-remove":985718,"table-row":985143,"table-row-height":984306,"table-row-plus-after":984307,"table-row-plus-before":984308,"table-row-remove":984309,"table-search":985359,"table-settings":985144,"table-split-cell":988202,"table-star":988107,"table-sync":988065,"table-tennis":986728,"tablet":984310,"tablet-android":984311,"tablet-cellphone":985511,"tablet-dashboard":986830,"tablet-ipad":984312,"taco":984930,"tag":984313,"tag-faces":984314,"tag-heart":984715,"tag-heart-outline":986063,"tag-minus":985360,"tag-minus-outline":987679,"tag-multiple":984315,"tag-multiple-outline":987895,"tag-off":987680,"tag-off-outline":987681,"tag-outline":984316,"tag-plus":984866,"tag-plus-outline":987682,"tag-remove":984867,"tag-remove-outline":987683,"tag-text":987684,"tag-text-outline":984317,"tailwind":988159,"tank":986426,"tanker-truck":987109,"tape-measure":985933,"target":984318,"target-account":986064,"target-variant":985719,"taxi":984319,"tea":986526,"tea-outline":986527,"teach":985232,"teamviewer":984320,"telegram":984321,"telescope":985934,"television":984322,"television-ambient-light":987990,"television-box":985145,"television-classic":985076,"television-classic-off":985146,"television-clean":987408,"television-guide":984323,"television-off":985147,"television-pause":987017,"television-play":986831,"television-stop":987018,"temperature-celsius":984324,"temperature-fahrenheit":984325,"temperature-kelvin":984326,"tennis":986528,"tennis-ball":984327,"tent":984328,"terraform":987234,"terrain":984329,"test-tube":984680,"test-tube-empty":985361,"test-tube-off":985362,"text":985512,"text-box":983578,"text-box-check":986790,"text-box-check-outline":986791,"text-box-minus":986792,"text-box-minus-outline":986793,"text-box-multiple":985783,"text-box-multiple-outline":985784,"text-box-outline":985581,"text-box-plus":986794,"text-box-plus-outline":986795,"text-box-remove":986796,"text-box-remove-outline":986797,"text-box-search":986798,"text-box-search-outline":986799,"text-recognition":987453,"text-search":988088,"text-shadow":984681,"text-short":985513,"text-subject":985514,"text-to-speech":984330,"text-to-speech-off":984331,"texture":984332,"texture-box":987110,"theater":984333,"theme-light-dark":984334,"thermometer":984335,"thermometer-alert":986625,"thermometer-chevron-down":986626,"thermometer-chevron-up":986627,"thermometer-high":987330,"thermometer-lines":984336,"thermometer-low":987331,"thermometer-minus":986628,"thermometer-plus":986629,"thermostat":983955,"thermostat-box":985233,"thought-bubble":985078,"thought-bubble-outline":985079,"thumb-down":984337,"thumb-down-outline":984338,"thumb-up":984339,"thumb-up-outline":984340,"thumbs-up-down":984341,"ticket":984342,"ticket-account":984343,"ticket-confirmation":984344,"ticket-confirmation-outline":988074,"ticket-outline":985363,"ticket-percent":984868,"ticket-percent-outline":988203,"tie":984345,"tilde":984869,"timelapse":984346,"timeline":986065,"timeline-alert":987029,"timeline-alert-outline":987032,"timeline-clock":987643,"timeline-clock-outline":987644,"timeline-help":987033,"timeline-help-outline":987034,"timeline-outline":986066,"timeline-plus":987030,"timeline-plus-outline":987031,"timeline-text":986067,"timeline-text-outline":986068,"timer":988075,"timer-10":984348,"timer-3":984349,"timer-off":988076,"timer-off-outline":984350,"timer-outline":984347,"timer-sand":984351,"timer-sand-empty":984749,"timer-sand-full":984972,"timetable":984352,"toaster":987235,"toaster-off":987575,"toaster-oven":986323,"toggle-switch":984353,"toggle-switch-off":984354,"toggle-switch-off-outline":985625,"toggle-switch-outline":985626,"toilet":985515,"toolbox":985516,"toolbox-outline":985517,"tools":987236,"tooltip":984355,"tooltip-account":983052,"tooltip-edit":984356,"tooltip-edit-outline":987845,"tooltip-image":984357,"tooltip-image-outline":986069,"tooltip-outline":984358,"tooltip-plus":986070,"tooltip-plus-outline":984359,"tooltip-text":984360,"tooltip-text-outline":986071,"tooth":985283,"tooth-outline":984361,"toothbrush":987433,"toothbrush-electric":987436,"toothbrush-paste":987434,"tortoise":986427,"toslink":987832,"tournament":985518,"tow-truck":985148,"tower-beach":984705,"tower-fire":984706,"toy-brick":987784,"toy-brick-marker":987785,"toy-brick-marker-outline":987786,"toy-brick-minus":987787,"toy-brick-minus-outline":987788,"toy-brick-outline":987789,"toy-brick-plus":987790,"toy-brick-plus-outline":987791,"toy-brick-remove":987792,"toy-brick-remove-outline":987793,"toy-brick-search":987794,"toy-brick-search-outline":987795,"track-light":985364,"trackpad":985080,"trackpad-lock":985395,"tractor":985234,"tractor-variant":988356,"trademark":985720,"traffic-cone":988028,"traffic-light":984363,"train":984364,"train-car":986072,"train-variant":985284,"tram":984365,"tram-side":987111,"transcribe":984366,"transcribe-close":984367,"transfer":987237,"transfer-down":986529,"transfer-left":986530,"transfer-right":984368,"transfer-up":986531,"transit-connection":986428,"transit-connection-variant":986429,"transit-detour":987019,"transit-transfer":984750,"transition":985365,"transition-masked":985366,"translate":984522,"translate-off":986630,"transmission-tower":986430,"trash-can":985721,"trash-can-outline":985722,"tray":987796,"tray-alert":987797,"tray-full":987798,"tray-minus":987799,"tray-plus":987800,"tray-remove":987801,"treasure-chest":984870,"tree":984369,"tree-outline":986729,"trello":984370,"trending-down":984371,"trending-neutral":984372,"trending-up":984373,"triangle":984374,"triangle-outline":984375,"triangle-wave":988284,"triforce":986073,"trophy":984376,"trophy-award":984377,"trophy-broken":986532,"trophy-outline":984378,"trophy-variant":984379,"trophy-variant-outline":984380,"truck":984381,"truck-check":986324,"truck-check-outline":987802,"truck-delivery":984382,"truck-delivery-outline":987803,"truck-fast":984968,"truck-fast-outline":987804,"truck-outline":987805,"truck-trailer":984871,"trumpet":987286,"tshirt-crew":985723,"tshirt-crew-outline":984383,"tshirt-v":985724,"tshirt-v-outline":984384,"tumble-dryer":985367,"tumble-dryer-alert":987578,"tumble-dryer-off":987579,"tune":984622,"tune-vertical":984682,"turnstile":986325,"turnstile-outline":986326,"turtle":986327,"twitch":984387,"twitter":984388,"twitter-retweet":984391,"two-factor-authentication":985519,"typewriter":986925,"ubisoft":986074,"ubuntu":984392,"ufo":987332,"ufo-outline":987333,"ultra-high-definition":985081,"umbraco":984393,"umbrella":984394,"umbrella-closed":985520,"umbrella-closed-outline":988130,"umbrella-closed-variant":988129,"umbrella-outline":984395,"undo":984396,"undo-variant":984397,"unfold-less-horizontal":984398,"unfold-less-vertical":984928,"unfold-more-horizontal":984399,"unfold-more-vertical":984929,"ungroup":984400,"unicode":986832,"unity":984751,"unreal":985521,"untappd":984401,"update":984752,"upload":984402,"upload-lock":988019,"upload-lock-outline":988020,"upload-multiple":985149,"upload-network":984822,"upload-network-outline":986328,"upload-off":987334,"upload-off-outline":987335,"upload-outline":986631,"usb":984403,"usb-flash-drive":987806,"usb-flash-drive-outline":987807,"usb-port":987632,"valve":987238,"valve-closed":987239,"valve-open":987240,"van-passenger":985082,"van-utility":985083,"vanish":985084,"vanity-light":987617,"variable":985831,"variable-box":987409,"vector-arrange-above":984404,"vector-arrange-below":984405,"vector-bezier":985832,"vector-circle":984406,"vector-circle-variant":984407,"vector-combine":984408,"vector-curve":984409,"vector-difference":984410,"vector-difference-ab":984411,"vector-difference-ba":984412,"vector-ellipse":985235,"vector-intersection":984413,"vector-line":984414,"vector-link":987112,"vector-point":984415,"vector-polygon":984416,"vector-polyline":984417,"vector-polyline-edit":987685,"vector-polyline-minus":987686,"vector-polyline-plus":987687,"vector-polyline-remove":987688,"vector-radius":984906,"vector-rectangle":984518,"vector-selection":984418,"vector-square":983041,"vector-triangle":984419,"vector-union":984420,"vhs":985627,"vibrate":984422,"vibrate-off":986329,"video":984423,"video-3d":985085,"video-3d-off":988121,"video-3d-variant":986833,"video-4k-box":985150,"video-account":985369,"video-box":983293,"video-box-off":983294,"video-check":987241,"video-check-outline":987242,"video-image":985370,"video-input-antenna":985151,"video-input-component":985152,"video-input-hdmi":985153,"video-input-scart":987020,"video-input-svideo":985154,"video-minus":985522,"video-minus-outline":983738,"video-off":984424,"video-off-outline":986075,"video-outline":986076,"video-plus":985523,"video-plus-outline":983507,"video-stabilization":985371,"video-switch":984425,"video-switch-outline":984976,"video-vintage":985628,"video-wireless":986834,"video-wireless-outline":986835,"view-agenda":984426,"view-agenda-outline":987608,"view-array":984427,"view-array-outline":988293,"view-carousel":984428,"view-carousel-outline":988294,"view-column":984429,"view-column-outline":988295,"view-comfy":986730,"view-comfy-outline":988296,"view-compact":986731,"view-compact-outline":986732,"view-dashboard":984430,"view-dashboard-outline":985629,"view-dashboard-variant":985155,"view-dashboard-variant-outline":988297,"view-day":984431,"view-day-outline":988298,"view-grid":984432,"view-grid-outline":987609,"view-grid-plus":987021,"view-grid-plus-outline":987610,"view-headline":984433,"view-list":984434,"view-list-outline":988299,"view-module":984435,"view-module-outline":988300,"view-parallel":984872,"view-parallel-outline":988301,"view-quilt":984436,"view-quilt-outline":988302,"view-sequential":984873,"view-sequential-outline":988303,"view-split-horizontal":986059,"view-split-vertical":986060,"view-stream":984437,"view-stream-outline":988304,"view-week":984438,"view-week-outline":988305,"vimeo":984439,"violin":984591,"virtual-reality":985236,"virus":988086,"virus-outline":988087,"vk":984441,"vlc":984444,"voice-off":986836,"voicemail":984445,"volleyball":985524,"volume-high":984446,"volume-low":984447,"volume-medium":984448,"volume-minus":984926,"volume-mute":984927,"volume-off":984449,"volume-plus":984925,"volume-source":987424,"volume-variant-off":986632,"volume-vibrate":987425,"vote":985631,"vote-outline":985632,"vpn":984450,"vuejs":985156,"vuetify":986733,"walk":984451,"wall":985086,"wall-sconce":985372,"wall-sconce-flat":985373,"wall-sconce-flat-variant":984092,"wall-sconce-round":984904,"wall-sconce-round-variant":985374,"wallet":984452,"wallet-giftcard":984453,"wallet-membership":984454,"wallet-outline":986077,"wallet-plus":987022,"wallet-plus-outline":987023,"wallet-travel":984455,"wallpaper":986633,"wan":984456,"wardrobe":987024,"wardrobe-outline":987025,"warehouse":987009,"washing-machine":984874,"washing-machine-alert":987580,"washing-machine-off":987581,"watch":984457,"watch-export":984458,"watch-export-variant":985237,"watch-import":984459,"watch-import-variant":985238,"watch-variant":985239,"watch-vibrate":984753,"watch-vibrate-off":986330,"water":984460,"water-boiler":987026,"water-boiler-alert":987571,"water-boiler-off":987572,"water-off":984461,"water-outline":986634,"water-percent":984462,"water-polo":987808,"water-pump":984463,"water-pump-off":987027,"water-well":987243,"water-well-outline":987244,"watering-can":988289,"watering-can-outline":988290,"watermark":984594,"wave":986926,"waveform":988285,"waves":984973,"waze":986078,"weather-cloudy":984464,"weather-cloudy-alert":986927,"weather-cloudy-arrow-right":986734,"weather-fog":984465,"weather-hail":984466,"weather-hazy":986928,"weather-hurricane":985240,"weather-lightning":984467,"weather-lightning-rainy":984702,"weather-night":984468,"weather-night-partly-cloudy":986929,"weather-partly-cloudy":984469,"weather-partly-lightning":986930,"weather-partly-rainy":986931,"weather-partly-snowy":986932,"weather-partly-snowy-rainy":986933,"weather-pouring":984470,"weather-rainy":984471,"weather-snowy":984472,"weather-snowy-heavy":986934,"weather-snowy-rainy":984703,"weather-sunny":984473,"weather-sunny-alert":986935,"weather-sunset":984474,"weather-sunset-down":984475,"weather-sunset-up":984476,"weather-tornado":986936,"weather-windy":984477,"weather-windy-variant":984478,"web":984479,"web-box":987028,"web-clock":987722,"webcam":984480,"webhook":984623,"webpack":984875,"webrtc":987720,"wechat":984593,"weight":984481,"weight-gram":986431,"weight-kilogram":984482,"weight-lifter":987485,"weight-pound":985525,"whatsapp":984483,"wheelchair-accessibility":984484,"whistle":985526,"whistle-outline":987836,"white-balance-auto":984485,"white-balance-incandescent":984486,"white-balance-iridescent":984487,"white-balance-sunny":984488,"widgets":984876,"widgets-outline":987989,"wifi":984489,"wifi-off":984490,"wifi-star":986635,"wifi-strength-1":985375,"wifi-strength-1-alert":985376,"wifi-strength-1-lock":985377,"wifi-strength-2":985378,"wifi-strength-2-alert":985379,"wifi-strength-2-lock":985380,"wifi-strength-3":985381,"wifi-strength-3-alert":985382,"wifi-strength-3-lock":985383,"wifi-strength-4":985384,"wifi-strength-4-alert":985385,"wifi-strength-4-lock":985386,"wifi-strength-alert-outline":985387,"wifi-strength-lock-outline":985388,"wifi-strength-off":985389,"wifi-strength-off-outline":985390,"wifi-strength-outline":985391,"wikipedia":984492,"wind-turbine":986533,"window-close":984493,"window-closed":984494,"window-closed-variant":987611,"window-maximize":984495,"window-minimize":984496,"window-open":984497,"window-open-variant":987612,"window-restore":984498,"window-shutter":987420,"window-shutter-alert":987421,"window-shutter-open":987422,"wiper":985833,"wiper-wash":986534,"wizard-hat":988279,"wordpress":984500,"wrap":984502,"wrap-disabled":986079,"wrench":984503,"wrench-outline":986080,"xamarin":985157,"xamarin-outline":985158,"xing":984510,"xml":984512,"xmpp":985087,"y-combinator":984612,"yahoo":985935,"yeast":984513,"yin-yang":984704,"yoga":987516,"youtube":984515,"youtube-gaming":985160,"youtube-studio":985159,"youtube-subscription":986432,"youtube-tv":984136,"z-wave":985834,"zend":985835,"zigbee":986433,"zip-box":984516,"zip-box-outline":987130,"zip-disk":985635,"zodiac-aquarius":985725,"zodiac-aries":985726,"zodiac-cancer":985727,"zodiac-capricorn":985728,"zodiac-gemini":985729,"zodiac-leo":985730,"zodiac-libra":985731,"zodiac-pisces":985732,"zodiac-sagittarius":985733,"zodiac-scorpio":985734,"zodiac-taurus":985735,"zodiac-virgo":985736,"blank":63116}')},function(e,t,n){e.exports=n.p+"./fonts/MaterialCommunityIcons.ttf"},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(9),i=n.n(r),o=n(0),a={};function s(e){var t=o.useRef(a),n=o.useRef(!1),r=o.useRef(!0);o.useEffect((function(){return r.current=!0,function(){r.current=!1}}),[]),t.current===a&&(t.current="function"===typeof e?e():e);var s=o.useState(t.current),l=i()(s,2),c=l[0],u=l[1],h=o.useCallback((function(){return t.current}),[]),d=o.useCallback((function(e){e!==t.current&&r.current&&(t.current=e,n.current||u(e))}),[]),f=o.useCallback((function(e){n.current=!0;try{e()}finally{n.current=!1}}),[]),p=o.useCallback((function(){r.current&&u(t.current)}),[]);c!==t.current&&u(t.current);var m=t.current;return o.useDebugValue(m),[m,h,d,f,p]}},function(e,t,n){"use strict";e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(372)),o=r(n(375)),a=r(n(377)),s=r(n(158)),l=r(n(386)),c=r(n(387)),u=r(n(388)),h=r(n(391)),d=r(n(206)),f=r(n(393)),p=r(n(394)),m=r(n(404)),g=r(n(113)),v=r(n(405)),y=r(n(406)),b=r(n(407)),w=r(n(409)),x=r(n(410)),_=r(n(162)),E=function(){return(E=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},A=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(a,s)}l((r=r.apply(e,t||[])).next())}))},S=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},M=x([[w,b],[y(Number),b],[v,function(e){return Number(e)}]]),T=g(3,(function(e,t,n){var r=y(Number);return r(e)&&r(t)&&r(n)&&m(n,e)&&m(t,n)})),C=g(2,(function(e,t){return p(t,e)})),O=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},R={Accept:"application/json","Content-Type":"application/json"},k={timeout:0},P=["ECONNABORTED"],L=["ENOTFOUND","ECONNREFUSED","ECONNRESET"],D=T(200,299),I=T(400,499),N=T(500,599),j=f(w,d(void 0),h("status")),B=function(e){return"Network Error"===e.message?"NETWORK_ERROR":_.isCancel(e)?"CANCEL_ERROR":x([[w,function(){return F(j(e.response))}],[C(P),d("TIMEOUT_ERROR")],[C(L),d("CONNECTION_ERROR")],[v,d("UNKNOWN_ERROR")]])(e.code)},F=function(e){return x([[w,d("UNKNOWN_ERROR")],[D,d(null)],[I,d("CLIENT_ERROR")],[N,d("SERVER_ERROR")],[v,d("UNKNOWN_ERROR")]])(e)},z=function(e){var t,n=u(R,e.headers||{});if(e.axiosInstance)t=e.axiosInstance;else{var r=u(k,c("headers",e));t=_.create(r)}var h=[],d=[],f=[],p=[],m=[],g=function(e,r){return n[e]=r,t},v=function(e,t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),b(u({url:t,params:n,method:e},r))},y=function(e,t,n,r){return void 0===n&&(n=null),void 0===r&&(r={}),b(u({url:t,method:e,data:n},r))},b=function(e){return A(void 0,void 0,void 0,(function(){var r,i,o;return S(this,(function(s){switch(s.label){case 0:if(e.headers=E({},n,e.headers),d.length>0&&l((function(t){return t(e)}),d),!(f.length>0))return[3,6];r=0,s.label=1;case 1:return r<f.length?(i=f[r](e),O(i)?[4,i]:[3,3]):[3,6];case 2:return s.sent(),[3,5];case 3:return[4,i(e)];case 4:s.sent(),s.label=5;case 5:return r++,[3,1];case 6:return o=a(x(M(new Date)),w),[2,t.request(e).then(o).catch(o)]}}))}))},w=function(e){return h.forEach((function(t){try{t(e)}catch(e){}})),e},x=o((function(e,t){return A(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,c,u,h,d,f,g,v,y,b,w;return S(this,(function(x){switch(x.label){case 0:if(n=M(new Date),r=n-e,i=t instanceof Error||_.isCancel(t),o=t,a=t,s=i?a.response:o,c=s&&s.status||null,u=i?B(t):F(c),h=i?a:null,d=D(c),f=t.config||null,g=s&&s.headers||null,v=s&&s.data||null,y={duration:r,problem:u,originalError:h,ok:d,status:c,headers:g,config:f,data:v},p.length>0&&l((function(e){return e(y)}),p),!(m.length>0))return[3,6];b=0,x.label=1;case 1:return b<m.length?(w=m[b](y),O(w)?[4,w]:[3,3]):[3,6];case 2:return x.sent(),[3,5];case 3:return[4,w(y)];case 4:x.sent(),x.label=5;case 5:return b++,[3,1];case 6:return[2,y]}}))}))}));return{axiosInstance:t,monitors:h,addMonitor:function(e){h.push(e)},requestTransforms:d,asyncRequestTransforms:f,responseTransforms:p,asyncResponseTransforms:m,addRequestTransform:function(e){return d.push(e)},addAsyncRequestTransform:function(e){return f.push(e)},addResponseTransform:function(e){return p.push(e)},addAsyncResponseTransform:function(e){return m.push(e)},setHeader:g,setHeaders:function(e){return l((function(t){return g(t,e[t])}),s(e)),t},deleteHeader:function(e){return delete n[e],t},headers:n,setBaseURL:function(e){return t.defaults.baseURL=e,t},getBaseURL:function(){return t.defaults.baseURL},any:b,get:i(v,["get"]),delete:i(v,["delete"]),head:i(v,["head"]),post:i(y,["post"]),put:i(y,["put"]),patch:i(y,["patch"]),link:i(v,["link"]),unlink:i(v,["unlink"])}},H=_.isCancel,U=_.CancelToken,V={DEFAULT_HEADERS:R,NONE:null,CLIENT_ERROR:"CLIENT_ERROR",SERVER_ERROR:"SERVER_ERROR",TIMEOUT_ERROR:"TIMEOUT_ERROR",CONNECTION_ERROR:"CONNECTION_ERROR",NETWORK_ERROR:"NETWORK_ERROR",UNKNOWN_ERROR:"UNKNOWN_ERROR",create:z,isCancel:H,CancelToken:U};t.DEFAULT_HEADERS=R,t.NONE=null,t.CLIENT_ERROR="CLIENT_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.CONNECTION_ERROR="CONNECTION_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.CANCEL_ERROR="CANCEL_ERROR",t.getProblemFromError=B,t.getProblemFromStatus=F,t.create=z,t.isCancel=H,t.CancelToken=U,t.default=V},function(e,t,n){"use strict";var r=n(441),i=n(445),o=[].slice,a=["keyword","gray","hex"],s={};Object.keys(i).forEach((function(e){s[o.call(i[e].labels).sort().join("")]=e}));var l={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw new Error("Unknown model: "+t);var n,u;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"===typeof e){var h=r.get(e);if(null===h)throw new Error("Unable to parse color from string: "+e);this.model=h.model,u=i[this.model].channels,this.color=h.value.slice(0,u),this.valpha="number"===typeof h.value[u]?h.value[u]:1}else if(e.length){this.model=t||"rgb",u=i[this.model].channels;var d=o.call(e,0,u);this.color=f(d,u),this.valpha="number"===typeof e[u]?e[u]:1}else if("number"===typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var p=Object.keys(e);"alpha"in e&&(p.splice(p.indexOf("alpha"),1),this.valpha="number"===typeof e.alpha?e.alpha:0);var m=p.sort().join("");if(!(m in s))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=s[m];var g=i[this.model].labels,v=[];for(n=0;n<g.length;n++)v.push(e[g[n]]);this.color=f(v)}if(l[this.model])for(u=i[this.model].channels,n=0;n<u;n++){var y=l[this.model][n];y&&(this.color[n]=y(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}function u(e,t,n){return(e=Array.isArray(e)?e:[e]).forEach((function(e){(l[e]||(l[e]=[]))[t]=n})),e=e[0],function(r){var i;return arguments.length?(n&&(r=n(r)),(i=this[e]()).color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function h(e){return function(t){return Math.max(0,Math.min(e,t))}}function d(e){return Array.isArray(e)?e:[e]}function f(e,t){for(var n=0;n<t;n++)"number"!==typeof e[n]&&(e[n]=0);return e}c.prototype={toString:function(){return this.string()},toJSON:function(){return this[this.model]()},string:function(e){var t=this.model in r.to?this:this.rgb(),n=1===(t=t.round("number"===typeof e?e:1)).valpha?t.color:t.color.concat(this.valpha);return r.to[t.model](n)},percentString:function(e){var t=this.rgb().round("number"===typeof e?e:1),n=1===t.valpha?t.color:t.color.concat(this.valpha);return r.to.rgb.percent(n)},array:function(){return 1===this.valpha?this.color.slice():this.color.concat(this.valpha)},object:function(){for(var e={},t=i[this.model].channels,n=i[this.model].labels,r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray:function(){var e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject:function(){var e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round:function(e){return e=Math.max(e||0,0),new c(this.color.map(function(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}(e)).concat(this.valpha),this.model)},alpha:function(e){return arguments.length?new c(this.color.concat(Math.max(0,Math.min(1,e))),this.model):this.valpha},red:u("rgb",0,h(255)),green:u("rgb",1,h(255)),blue:u("rgb",2,h(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,(function(e){return(e%360+360)%360})),saturationl:u("hsl",1,h(100)),lightness:u("hsl",2,h(100)),saturationv:u("hsv",1,h(100)),value:u("hsv",2,h(100)),chroma:u("hcg",1,h(100)),gray:u("hcg",2,h(100)),white:u("hwb",1,h(100)),wblack:u("hwb",2,h(100)),cyan:u("cmyk",0,h(100)),magenta:u("cmyk",1,h(100)),yellow:u("cmyk",2,h(100)),black:u("cmyk",3,h(100)),x:u("xyz",0,h(100)),y:u("xyz",1,h(100)),z:u("xyz",2,h(100)),l:u("lab",0,h(100)),a:u("lab",1),b:u("lab",2),keyword:function(e){return arguments.length?new c(e):i[this.model].keyword(this.color)},hex:function(e){return arguments.length?new c(e):r.to.hex(this.rgb().round().color)},rgbNumber:function(){var e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity:function(){for(var e=this.rgb().color,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),i=void 0===t?.5:t,o=2*i-1,a=n.alpha()-r.alpha(),s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}},Object.keys(i).forEach((function(e){if(-1===a.indexOf(e)){var t=i[e].channels;c.prototype[e]=function(){if(this.model===e)return new c(this);if(arguments.length)return new c(arguments,e);var n="number"===typeof arguments[t]?t:this.valpha;return new c(d(i[this.model][e].raw(this.color)).concat(n),e)},c[e]=function(n){return"number"===typeof n&&(n=f(o.call(arguments),t)),new c(n,e)}}})),e.exports=c},function(e,t,n){"use strict";function r(e){return null!=e&&"object"===typeof e&&!0===e["@@functional/placeholder"]}function i(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}n.d(t,"a",(function(){return v}));var o=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function a(e){return"[object String]"===Object.prototype.toString.call(e)}var s=i((function(e){return!!o(e)||!!e&&("object"===typeof e&&(!a(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}));"undefined"!==typeof Symbol&&Symbol.iterator;function l(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var c=Object.prototype.toString,u=function(){return"[object Arguments]"===c.call(arguments)?function(e){return"[object Arguments]"===c.call(e)}:function(e){return l("callee",e)}},h=!{toString:null}.propertyIsEnumerable("toString"),d=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],f=function(){return arguments.propertyIsEnumerable("length")}(),p=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};Object.keys;Number.isInteger;function m(e){return function t(n){for(var r,i,o,a=[],l=0,c=n.length;l<c;){if(s(n[l]))for(o=0,i=(r=e?t(n[l]):n[l]).length;o<i;)a[a.length]=r[o],o+=1;else a[a.length]=n[l];l+=1}return a}}var g=function(e){return(e<10?"0":"")+e};Date.prototype.toISOString;var v=i(m(!0));"function"===typeof Object.assign&&Object.assign;var y="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";String.prototype.trim},,function(t,n,r){"use strict";r.d(n,"a",(function(){return M}));var i=r(19),o=r.n(i),a=r(0),s=r(103),l=r(6),c=r.n(l),u=r(20),h=r.n(u),d=r(23),f=r.n(d),p=r(24),m=r.n(p),g=r(25),v=r.n(g),y=r(18),b=r.n(y);var w=r(82);var x={get name(){return"ExpoErrorRecovery"},saveRecoveryProps:function(t){if(w.canUseDOM)try{localStorage.setItem("EXPO_ERROR_RECOVERY_STORAGE",t)}catch(e){}},recoveredProps:function(){if(!w.canUseDOM)return null;try{var t=localStorage.getItem("EXPO_ERROR_RECOVERY_STORAGE");return localStorage.removeItem("EXPO_ERROR_RECOVERY_STORAGE"),t}catch(e){}return null}()},_=function(){if(x.recoveredProps)return JSON.parse(x.recoveredProps);return null}();function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}function M(e){var t,n,r=(n=e,function(e){m()(r,e);var t=S(r);function r(){return h()(this,r),t.apply(this,arguments)}return f()(r,[{key:"render",value:function(){var e=A(A({},this.props),{},{exp:A(A({},this.props.exp),{},{errorRecovery:_})});return a.createElement(n,o()({},e))}}]),r}(a.Component)),i=function(e){return a.createElement(r,o()({},e))};s.a.registerComponent("main",(function(){return i}));var l=null!=(t=document.getElementById("root"))?t:document.getElementById("main");s.a.runApplication("main",{rootTag:l})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n(6),n(17);var r=n(7),i=n.n(r),o=n(9),a=n.n(o),s=n(265),l=n(222),c={get isRTL(){var e;return null!=(e=l.isRtlLang(this.locale))&&e},get locale(){return s.a.isDOMAvailable?navigator.language||navigator.systemLanguage||navigator.browserLanguage||navigator.userLanguage||this.locales[0]:""},get locales(){if(!s.a.isDOMAvailable)return[];var e=navigator.languages,t=void 0===e?[]:e;return Array.from(t)},get timezone(){return"undefined"===typeof Intl?"Etc/UTC":Intl.DateTimeFormat().resolvedOptions().timeZone||"Etc/UTC"},get isoCurrencyCodes(){return[]},get region(){var e=this.locale;if("string"===typeof e){var t=e.split("-"),n=a()(t,2)[1];return n?n.toUpperCase():null}return null},getLocalizationAsync:function(){var e,t,n,r,o,a;return i.a.async((function(i){for(;;)switch(i.prev=i.next){case 0:return e=this.region,t=this.isoCurrencyCodes,n=this.timezone,r=this.locales,o=this.locale,a=this.isRTL,i.abrupt("return",{region:e,isoCurrencyCodes:t,timezone:n,locales:r,locale:o,isRTL:a});case 2:case"end":return i.stop()}}),null,this,null,Promise)}};var u=function(e){return e.replace("_","-")},h=u(c.locale);c.locales.map(u),c.timezone,c.isoCurrencyCodes,c.region,c.isRTL},function(e,t,n){"use strict";var r,i=n(8),o="undefined"!==typeof window&&!(null==(r=window.document)||!r.createElement),a={OS:i.a.OS,select:i.a.select,isDOMAvailable:o};t.a=a},function(t,n,r){"use strict";r.d(n,"a",(function(){return L}));var i=r(17),o=r.n(i),a=r(22),s=r.n(a),l=r(19),c=r.n(l),u=r(20),h=r.n(u),d=r(23),f=r.n(d),p=r(24),m=r.n(p),g=r(25),v=r.n(g),y=r(18),b=r.n(y),w=r(0),x=r.n(w),_=r(2),E=r(123),A=r(71),S=r(12),M=r(14);function T(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}var C=["easeInOut","easeOut","easeIn"],O=function(e){m()(n,e);var t=T(n);function n(e){var r;return h()(this,n),(r=t.call(this,e)).contentHandle=null,r._handleRef=function(e){r.contentHandle=e},r._handleLayoutChange=function(e){var t=e.nativeEvent.layout.height;r.state.animating||r.props.collapsed||r.state.measuring||r.state.contentHeight===t||(r.state.height.setValue(t),r.setState({contentHeight:t}))},r.state={measuring:!1,measured:!1,height:new S.a.Value(e.collapsedHeight),contentHeight:0,animating:!1},r}return f()(n,[{key:"componentDidUpdate",value:function(e){var t=this;e.collapsed!==this.props.collapsed?this.setState({measured:!1},(function(){return t._componentDidUpdate(e)})):this._componentDidUpdate(e)}},{key:"componentWillUnmount",value:function(){this.unmounted=!0}},{key:"_componentDidUpdate",value:function(e){e.collapsed!==this.props.collapsed?this._toggleCollapsed(this.props.collapsed):this.props.collapsed&&e.collapsedHeight!==this.props.collapsedHeight&&this.state.height.setValue(this.props.collapsedHeight)}},{key:"_measureContent",value:function(e){var t=this;this.setState({measuring:!0},(function(){requestAnimationFrame((function(){t.contentHandle?("function"===typeof t.contentHandle.measure?t.contentHandle:t.contentHandle.getNode()).measure((function(n,r,i,o){t.setState({measuring:!1,measured:!0,contentHeight:o},(function(){return e(o)}))})):t.setState({measuring:!1},(function(){return e(t.props.collapsedHeight)}))}))}))}},{key:"_toggleCollapsed",value:function(e){var t=this;if(e)this._transitionToHeight(this.props.collapsedHeight);else{if(!this.contentHandle)return void(this.state.measured&&this._transitionToHeight(this.state.contentHeight));this._measureContent((function(e){t._transitionToHeight(e)}))}}},{key:"_transitionToHeight",value:function(e){var t=this,n=this.props.duration,r=this.props.easing;if("string"===typeof r){for(var i,o=!1,a=0;a<C.length;a++)if(i=C[a],r.substr(0,i.length)===i){r=r.substr(i.length,1).toLowerCase()+r.substr(i.length+1),i=i.substr(4,1).toLowerCase()+i.substr(5),r=M.a[i](M.a[r||"ease"]),o=!0;break}if(o||(r=M.a[r]),!r)throw new Error('Invalid easing type "'+this.props.easing+'"')}this._animation&&this._animation.stop(),this.setState({animating:!0}),this._animation=S.a.timing(this.state.height,{useNativeDriver:!1,toValue:e||0,duration:n,easing:r}).start((function(){t.unmounted||t.setState({animating:!1},(function(){t.unmounted||t.props.onAnimationEnd()}))}))}},{key:"render",value:function(){var e=this.props,t=e.collapsed,n=e.enablePointerEvents,r=e.renderChildrenCollapsed,i=this.state,o=i.height,a=i.contentHeight,s=i.measuring,l=i.measured,c=i.animating,u=!s&&(l||t)&&{overflow:"hidden",height:o},h={};s?(h.position="absolute",h.opacity=0):"center"===this.props.align?h.transform=[{translateY:o.interpolate({inputRange:[0,a],outputRange:[a/-2,0]})}]:"bottom"===this.props.align&&(h.transform=[{translateY:o.interpolate({inputRange:[0,a],outputRange:[-a,0]})}]),c&&(h.height=a);var d=r||(!t||t&&c)&&(c||s||l);return x.a.createElement(S.a.View,{style:u,pointerEvents:!n&&t?"none":"auto"},x.a.createElement(S.a.View,{ref:this._handleRef,style:[this.props.style,h],onLayout:this.state.animating?void 0:this._handleLayoutChange},d&&this.props.children))}}]),n}(w.Component);O.defaultProps={align:"top",collapsed:!0,collapsedHeight:0,enablePointerEvents:!1,duration:300,easing:"easeOutCubic",onAnimationEnd:function(){return null},renderChildrenCollapsed:!0};var R=["activeSections","expandMultiple","onChange","containerStyle","sectionContainerStyle","expandFromBottom","sections","underlayColor","touchableProps","touchableComponent","onAnimationEnd","renderContent","renderHeader","renderFooter","renderSectionTitle","disabled","renderAsFlatList","keyExtractor"];function k(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=b()(t);if(n){var i=b()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return v()(this,e)}}var P=["align","collapsed","collapsedHeight","renderChildrenCollapsed","enablePointerEvents","duration","easing","style","onAnimationEnd"],L=function(e){m()(n,e);var t=k(n);function n(){var e;h()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i)))._renderContainer=function(t,n,r){var i=e.props,o=i.activeSections,a=i.sectionContainerStyle,s=i.expandFromBottom,l=i.sections,u=i.underlayColor,h=i.touchableProps,d=i.touchableComponent,f=i.renderHeader,p=i.renderFooter,m=i.renderSectionTitle;return x.a.createElement(_.a,{key:n,style:a},m(t,n,o.includes(n)),s&&r(t,n),x.a.createElement(d,c()({onPress:function(){return e._toggleSection(n)},underlayColor:u},h,{accessibilityState:{expanded:o.includes(n)}}),f(t,n,o.includes(n),l)),!s&&r(t,n),p&&p(t,n,o.includes(n),l))},e}return f()(n,[{key:"_toggleSection",value:function(e){if(!this.props.disabled){var t=this.props,n=t.activeSections,r=t.expandMultiple,i=t.onChange,o=[];o=n.includes(e)?n.filter((function(t){return t!==e})):r?[].concat(s()(n),[e]):[e],i&&i(o)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.activeSections,r=(t.expandMultiple,t.onChange,t.containerStyle),i=(t.sectionContainerStyle,t.expandFromBottom,t.sections),a=(t.underlayColor,t.touchableProps,t.touchableComponent,t.onAnimationEnd),s=t.renderContent,l=(t.renderHeader,t.renderFooter,t.renderSectionTitle,t.disabled,t.renderAsFlatList),u=t.keyExtractor,h=o()(t,R),d={},f={};Object.keys(h).forEach((function(e){P.includes(e)?f[e]=h[e]:d[e]=h[e]}));var p=function(e,t){return x.a.createElement(O,c()({collapsed:!n.includes(t)},f,{onAnimationEnd:function(){return a(e,t)}}),s(e,t,n.includes(t),i))};return l?x.a.createElement(A.a,c()({style:r,data:i,extraData:n,nestedScrollEnabled:!0,keyExtractor:u,renderItem:function(t){var n=t.item,r=t.index,i=n,o=u(n,r);return e._renderContainer(i,o,p)}},d)):x.a.createElement(_.a,c()({style:r},d),i.map((function(t,n){var r=u(t,n);return e._renderContainer(t,r,p)})))}}]),n}(w.Component);L.defaultProps={underlayColor:"black",disabled:!1,expandFromBottom:!1,expandMultiple:!1,touchableComponent:E.a,keyExtractor:function(e,t){return t},renderSectionTitle:function(){return null},onAnimationEnd:function(){return null},sectionContainerStyle:{},renderAsFlatList:!1}},,,,,,,,,,,,,,,,,,function(e,t,n){(function(t){var n;n=function(){"use strict";var e=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),n="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,r="undefined"!==typeof t&&t.Math===Math?t:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),i="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},o=["top","right","bottom","left","width","height","size","weight"],a="undefined"!==typeof MutationObserver,s=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function a(){n&&(n=!1,e()),r&&l()}function s(){i(a)}function l(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);o=e}return l}(this.refresh.bind(this),20)};s.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},s.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},s.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},s.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},s.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},s.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},s.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),o.some((function(e){return!!~t.indexOf(e)}))&&this.refresh()},s.getInstance=function(){return this.instance_||(this.instance_=new s),this.instance_},s.instance_=null;var l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||r},u=g(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function f(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return u;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),l=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(l+a)!==n&&(l-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var f=Math.round(s+o)-t,p=Math.round(l+a)-n;1!==Math.abs(f)&&(s-=f),1!==Math.abs(p)&&(l-=p)}return g(i.left,i.top,s,l)}var p="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"===typeof e.getBBox};function m(e){return n?p(e)?function(e){var t=e.getBBox();return g(0,0,t.width,t.height)}(e):f(e):u}function g(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e};v.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},v.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var y=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(o.prototype);return l(a,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),a}(t);l(this,{target:e,contentRect:n})},b=function(t,n,r){if(this.activeObservations_=[],this.observations_=new e,"function"!==typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r};b.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},b.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},b.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},b.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},b.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new y(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},b.prototype.clearActive=function(){this.activeObservations_.splice(0)},b.prototype.hasActive=function(){return this.activeObservations_.length>0};var w="undefined"!==typeof WeakMap?new WeakMap:new e,x=function(e){if(!(this instanceof x))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=s.getInstance(),n=new b(e,t,this);w.set(this,n)};return["observe","unobserve","disconnect"].forEach((function(e){x.prototype[e]=function(){return(t=w.get(this))[e].apply(t,arguments);var t}})),"undefined"!==typeof r.ResizeObserver?r.ResizeObserver:(r.ResizeObserver=x,x)},e.exports=n()}).call(this,n(43))},function(e,t,n){"use strict";n.r(t);var r=n(263),i=n(262);Object(r.a)(i.a)},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(l){s=!0,i=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(M){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return S()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=l;var u={};function h(){}function d(){}function f(){}var p={};p[i]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(A([])));g&&g!==t&&n.call(g,i)&&(p=g);var v=f.prototype=h.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"===typeof h&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function A(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=v.constructor=f,f.constructor=d,d.displayName=s(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=A,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=r}catch(i){Function("r","regeneratorRuntime = r")(r)}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r,i=r={_regexEscape:/([\.\*\+\^\$\[\]\\\(\)\|\{\}\,\-\:\?])/g,_regexParseLocale:/^([a-zA-Z]*)([_\-a-zA-Z]*)$/,_escapeRegExpPattern:function(e){return"string"!==typeof e?e:e.replace(r._regexEscape,"\\$1")},_toLowerCase:function(e,t){return"string"!==typeof e?t&&e:e.toLowerCase()},_toUpperCase:function(e,t){return"string"!==typeof e?t&&e:e.toUpperCase()},_trim:function(e,t,n){var i,o=[],a=function(e){o.push("^"+e+"+|"+e+"+$")};if("boolean"===typeof t&&(n=t,t=null),"string"!==typeof e)return n&&e;if(Array.isArray(t)&&t.map((function(e){var t=r._escapeRegExpPattern(e);a(t)})),"string"===typeof t){var s=r._escapeRegExpPattern(t);a(s)}t||a("\\s");var l="("+o.join("|")+")";for(i=new RegExp(l,"g");e.match(i);)e=e.replace(i,"");return e},_parseLocale:function(e){var t,n=r._regexParseLocale.exec(e);if(e&&n)return n[2]=r._trim(n[2],["-","_"]),{lang:r._toLowerCase(n[1]),countryCode:t=r._toUpperCase(n[2])||t}},isRtlLang:function(e){var t=r._parseLocale(e);if(t)return r._BIDI_RTL_LANGS.indexOf(t.lang)>=0},getLangDir:function(e){return r.isRtlLang(e)?"rtl":"ltr"}};Object.defineProperty(r,"_BIDI_RTL_LANGS",{value:["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","ku","mzn","nqo","pnb","ps","sd","ug","ur"],writable:!1,enumerable:!0,configurable:!1}),e.exports=i},function(e,t,n){"use strict";var r=n(151),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,h=i?Symbol.for("react.context"):60110,d=i?Symbol.for("react.forward_ref"):60112,f=i?Symbol.for("react.suspense"):60113,p=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,g="function"===typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function x(){}function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=w.prototype;var E=_.prototype=new x;E.constructor=_,r(E,w.prototype),E.isPureReactComponent=!0;var A={current:null},S=Object.prototype.hasOwnProperty,M={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,r)&&!M.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:A.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===o}var O=/\/+/g,R=[];function k(e,t,n,r){if(R.length){var i=R.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=r,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function P(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>R.length&&R.push(e)}function L(e,t,n){return null==e?0:function e(t,n,r,i){var s=typeof t;"undefined"!==s&&"boolean"!==s||(t=null);var l=!1;if(null===t)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(t.$$typeof){case o:case a:l=!0}}if(l)return r(i,t,""===n?"."+D(t,0):n),1;if(l=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c<t.length;c++){var u=n+D(s=t[c],c);l+=e(s,u,r,i)}else if(null===t||"object"!==typeof t?u=null:u="function"===typeof(u=g&&t[g]||t["@@iterator"])?u:null,"function"===typeof u)for(t=u.call(t),c=0;!(s=t.next()).done;)l+=e(s=s.value,u=n+D(s,c++),r,i);else if("object"===s)throw r=""+t,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return l}(e,"",t,n)}function D(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function I(e,t){e.func.call(e.context,t,e.count++)}function N(e,t,n){var r=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?j(e,r,n,(function(e){return e})):null!=e&&(C(e)&&(e=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(O,"$&/")+"/")+n)),r.push(e))}function j(e,t,n,r,i){var o="";null!=n&&(o=(""+n).replace(O,"$&/")+"/"),L(e,N,t=k(t,o,r,i)),P(t)}var B={current:null};function F(){var e=B.current;if(null===e)throw Error(v(321));return e}var z={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:A,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return j(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;L(e,I,t=k(null,null,t,n)),P(t)},count:function(e){return L(e,(function(){return null}),null)},toArray:function(e){var t=[];return j(e,t,null,(function(e){return e})),t},only:function(e){if(!C(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=s,t.Profiler=c,t.PureComponent=_,t.StrictMode=l,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error(v(267,e));var i=r({},e.props),a=e.key,s=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,l=A.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)S.call(t,u)&&!M.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var h=0;h<u;h++)c[h]=arguments[h+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:h,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=T,t.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:m,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:p,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return F().useCallback(e,t)},t.useContext=function(e,t){return F().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return F().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return F().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return F().useLayoutEffect(e,t)},t.useMemo=function(e,t){return F().useMemo(e,t)},t.useReducer=function(e,t,n){return F().useReducer(e,t,n)},t.useRef=function(e){return F().useRef(e)},t.useState=function(e){return F().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},function(t,n,r){"use strict";var i=r(0),o=r(151),a=r(295);function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!i)throw Error(s(227));var l=new Set,c={};function u(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(c[e]=t,e=0;e<t.length;e++)l.add(t[e])}var d=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,m={},g={};function v(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){y[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){y[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){y[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){y[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){y[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var b=/[\-:]([a-z])/g;function w(e){return e[1].toUpperCase()}function x(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(null!==i?0===i.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!p.call(g,e)||!p.call(m,e)&&(f.test(e)?g[e]=!0:(m[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(b,w);y[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),y.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=60103,A=60106,S=60107,M=60108,T=60114,C=60109,O=60110,R=60112,k=60113,P=60120,L=60115,D=60116,I=60121,N=60128,j=60129,B=60130,F=60131;if("function"===typeof Symbol&&Symbol.for){var z=Symbol.for;E=z("react.element"),A=z("react.portal"),S=z("react.fragment"),M=z("react.strict_mode"),T=z("react.profiler"),C=z("react.provider"),O=z("react.context"),R=z("react.forward_ref"),k=z("react.suspense"),P=z("react.suspense_list"),L=z("react.memo"),D=z("react.lazy"),I=z("react.block"),z("react.scope"),N=z("react.opaque.id"),j=z("react.debug_trace_mode"),B=z("react.offscreen"),F=z("react.legacy_hidden")}var H,U="function"===typeof Symbol&&Symbol.iterator;function V(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=U&&e[U]||e["@@iterator"])?e:null}function G(e){if(void 0===H)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||""}return"\n"+H+e}var W=!1;function q(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&"string"===typeof l.stack){for(var i=l.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?G(e):""}function X(e){switch(e.tag){case 5:return G(e.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return e=q(e.type,!1);case 11:return e=q(e.type.render,!1);case 22:return e=q(e.type._render,!1);case 1:return e=q(e.type,!0);default:return""}}function Y(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case A:return"Portal";case T:return"Profiler";case M:return"StrictMode";case k:return"Suspense";case P:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case R:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case L:return Y(e.type);case I:return Y(e._render);case D:t=e._payload,e=e._init;try{return Y(e(t))}catch(n){}}return null}function K(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Q(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=Q(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function J(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Q(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function $(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function te(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=K(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function ne(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function re(e,t){ne(e,t);var n=K(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,K(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ie(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&$(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ae(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return i.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function se(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+K(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function le(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(s(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ce(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(s(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(s(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:K(n)}}function ue(e,t){var n=K(t.value),r=K(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function he(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",fe="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function me(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ge,ve=function(e){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==fe||"innerHTML"in e)e.innerHTML=t;else{for((ge=ge||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ge.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ye(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var be={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},we=["Webkit","ms","Moz","O"];function xe(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||be.hasOwnProperty(e)&&be[e]?(""+t).trim():t+"px"}function _e(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=xe(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(be).forEach((function(e){we.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),be[t]=be[e]}))}));var Ee=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ae(e,t){if(t){if(Ee[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(s(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(s(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(s(62))}}function Se(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Me(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Te=null,Ce=null,Oe=null;function Re(e){if(e=$r(e)){if("function"!==typeof Te)throw Error(s(280));var t=e.stateNode;t&&(t=ti(t),Te(e.stateNode,e.type,t))}}function ke(e){Ce?Oe?Oe.push(e):Oe=[e]:Ce=e}function Pe(){if(Ce){var e=Ce,t=Oe;if(Oe=Ce=null,Re(e),t)for(e=0;e<t.length;e++)Re(t[e])}}function Le(e,t){return e(t)}function De(e,t,n,r,i){return e(t,n,r,i)}function Ie(){}var Ne=Le,je=!1,Be=!1;function Fe(){null===Ce&&null===Oe||(Ie(),Pe())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=ti(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var He=!1;if(d)try{var Ue={};Object.defineProperty(Ue,"passive",{get:function(){He=!0}}),window.addEventListener("test",Ue,Ue),window.removeEventListener("test",Ue,Ue)}catch(ac){He=!1}function Ve(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Ge=!1,We=null,qe=!1,Xe=null,Ye={onError:function(e){Ge=!0,We=e}};function Ke(e,t,n,r,i,o,a,s,l){Ge=!1,We=null,Ve.apply(Ye,arguments)}function Qe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if(Qe(e)!==e)throw Error(s(188))}function $e(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Qe(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Je(i),e;if(o===r)return Je(i),t;o=o.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,it,ot=!1,at=[],st=null,lt=null,ct=null,ut=new Map,ht=new Map,dt=[],ft="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function pt(e,t,n,r,i){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:i,targetContainers:[r]}}function mt(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":lt=null;break;case"mouseover":case"mouseout":ct=null;break;case"pointerover":case"pointerout":ut.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ht.delete(t.pointerId)}}function gt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e=pt(t,n,r,i,o),null!==t&&(null!==(t=$r(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function vt(e){var t=Jr(e.target);if(null!==t){var n=Qe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ze(n)))return e.blockedOn=t,void it(e.lanePriority,(function(){a.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function yt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=$r(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function bt(e,t,n){yt(e)&&n.delete(t)}function wt(){for(ot=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=$r(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&yt(st)&&(st=null),null!==lt&&yt(lt)&&(lt=null),null!==ct&&yt(ct)&&(ct=null),ut.forEach(bt),ht.forEach(bt)}function xt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,wt)))}function _t(e){function t(t){return xt(t,e)}if(0<at.length){xt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&xt(st,e),null!==lt&&xt(lt,e),null!==ct&&xt(ct,e),ut.forEach(t),ht.forEach(t),n=0;n<dt.length;n++)(r=dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<dt.length&&null===(n=dt[0]).blockedOn;)vt(n),null===n.blockedOn&&dt.shift()}function Et(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var At={animationend:Et("Animation","AnimationEnd"),animationiteration:Et("Animation","AnimationIteration"),animationstart:Et("Animation","AnimationStart"),transitionend:Et("Transition","TransitionEnd")},St={},Mt={};function Tt(e){if(St[e])return St[e];if(!At[e])return e;var t,n=At[e];for(t in n)if(n.hasOwnProperty(t)&&t in Mt)return St[e]=n[t];return e}d&&(Mt=document.createElement("div").style,"AnimationEvent"in window||(delete At.animationend.animation,delete At.animationiteration.animation,delete At.animationstart.animation),"TransitionEvent"in window||delete At.transitionend.transition);var Ct=Tt("animationend"),Ot=Tt("animationiteration"),Rt=Tt("animationstart"),kt=Tt("transitionend"),Pt=new Map,Lt=new Map,Dt=["abort","abort",Ct,"animationEnd",Ot,"animationIteration",Rt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",kt,"transitionEnd","waiting","waiting"];function It(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];i="on"+(i[0].toUpperCase()+i.slice(1)),Lt.set(r,t),Pt.set(r,i),u(i,[r])}}(0,a.unstable_now)();var Nt=8;function jt(e){if(0!==(1&e))return Nt=15,1;if(0!==(2&e))return Nt=14,2;if(0!==(4&e))return Nt=13,4;var t=24&e;return 0!==t?(Nt=12,t):0!==(32&e)?(Nt=11,32):0!==(t=192&e)?(Nt=10,t):0!==(256&e)?(Nt=9,256):0!==(t=3584&e)?(Nt=8,t):0!==(4096&e)?(Nt=7,4096):0!==(t=4186112&e)?(Nt=6,t):0!==(t=62914560&e)?(Nt=5,t):67108864&e?(Nt=4,67108864):0!==(134217728&e)?(Nt=3,134217728):0!==(t=805306368&e)?(Nt=2,t):0!==(1073741824&e)?(Nt=1,1073741824):(Nt=8,e)}function Bt(e,t){var n=e.pendingLanes;if(0===n)return Nt=0;var r=0,i=0,o=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==o)r=o,i=Nt=15;else if(0!==(o=134217727&n)){var l=o&~a;0!==l?(r=jt(l),i=Nt):0!==(s&=o)&&(r=jt(s),i=Nt)}else 0!==(o=n&~a)?(r=jt(o),i=Nt):0!==s&&(r=jt(s),i=Nt);if(0===r)return 0;if(r=n&((0>(r=31-Gt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0===(t&a)){if(jt(t),i<=Nt)return t;Nt=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-Gt(t)),r|=e[n],t&=~i;return r}function Ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Ht(24&~t))?zt(10,t):e;case 10:return 0===(e=Ht(192&~t))?zt(8,t):e;case 8:return 0===(e=Ht(3584&~t))&&(0===(e=Ht(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Ht(805306368&~t))&&(t=268435456),t}throw Error(s(358,e))}function Ht(e){return e&-e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Gt(t)]=n}var Gt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/qt|0)|0},Wt=Math.log,qt=Math.LN2;var Xt=a.unstable_UserBlockingPriority,Yt=a.unstable_runWithPriority,Kt=!0;function Qt(e,t,n,r){je||Ie();var i=Jt,o=je;je=!0;try{De(i,e,t,n,r)}finally{(je=o)||Fe()}}function Zt(e,t,n,r){Yt(Xt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var i;if(Kt)if((i=0===(4&t))&&0<at.length&&-1<ft.indexOf(e))e=pt(null,e,t,n,r),at.push(e);else{var o=$t(e,t,n,r);if(null===o)i&&mt(e,r);else{if(i){if(-1<ft.indexOf(e))return e=pt(o,e,t,n,r),void at.push(e);if(function(e,t,n,r,i){switch(t){case"focusin":return st=gt(st,e,t,n,r,i),!0;case"dragenter":return lt=gt(lt,e,t,n,r,i),!0;case"mouseover":return ct=gt(ct,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ut.set(o,gt(ut.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ht.set(o,gt(ht.get(o)||null,e,t,n,r,i)),!0}return!1}(o,e,t,n,r))return;mt(e,r)}kr(e,t,r,null,n)}}}function $t(e,t,n,r){var i=Me(r);if(null!==(i=Jr(i))){var o=Qe(i);if(null===o)i=null;else{var a=o.tag;if(13===a){if(null!==(i=Ze(o)))return i;i=null}else if(3===a){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return kr(e,t,r,i,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,i="value"in en?en.value:en.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return nn=i.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function ln(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var cn,un,hn,dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fn=ln(dn),pn=o({},dn,{view:0,detail:0}),mn=ln(pn),gn=o({},pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==hn&&(hn&&"mousemove"===e.type?(cn=e.screenX-hn.screenX,un=e.screenY-hn.screenY):un=cn=0,hn=e),cn)},movementY:function(e){return"movementY"in e?e.movementY:un}}),vn=ln(gn),yn=ln(o({},gn,{dataTransfer:0})),bn=ln(o({},pn,{relatedTarget:0})),wn=ln(o({},dn,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=ln(o({},dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),_n=ln(o({},dn,{data:0})),En={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},An={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function Tn(){return Mn}var Cn=ln(o({},pn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?An[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),On=ln(o({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=ln(o({},pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tn})),kn=ln(o({},dn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Pn=ln(o({},gn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Ln=[9,13,27,32],Dn=d&&"CompositionEvent"in window,In=null;d&&"documentMode"in document&&(In=document.documentMode);var Nn=d&&"TextEvent"in window&&!In,jn=d&&(!Dn||In&&8<In&&11>=In),Bn=String.fromCharCode(32),Fn=!1;function zn(e,t){switch(e){case"keyup":return-1!==Ln.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Gn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Wn(e,t,n,r){ke(r),0<(t=Lr(t,"onChange")).length&&(n=new fn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Xn=null;function Yn(e){Sr(e,0)}function Kn(e){if(J(ei(e)))return e}function Qn(e,t){if("change"===e)return t}var Zn=!1;if(d){var Jn;if(d){var $n="oninput"in document;if(!$n){var er=document.createElement("div");er.setAttribute("oninput","return;"),$n="function"===typeof er.oninput}Jn=$n}else Jn=!1;Zn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Xn=qn=null)}function nr(e){if("value"===e.propertyName&&Kn(Xn)){var t=[];if(Wn(t,Xn,e,Me(e)),e=Yn,je)e(t);else{je=!0;try{Le(e,t)}finally{je=!1,Fe()}}}}function rr(e,t,n){"focusin"===e?(tr(),Xn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Xn)}function or(e,t){if("click"===e)return Kn(t)}function ar(e,t){if("input"===e||"change"===e)return Kn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},lr=Object.prototype.hasOwnProperty;function cr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!lr.call(t,n[r])||!sr(e[n[r]],t[n[r]]))return!1;return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(){for(var e=window,t=$();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=$((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var pr=d&&"documentMode"in document&&11>=document.documentMode,mr=null,gr=null,vr=null,yr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;yr||null==mr||mr!==$(r)||("selectionStart"in(r=mr)&&fr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},vr&&cr(vr,r)||(vr=r,0<(r=Lr(gr,"onSelect")).length&&(t=new fn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mr)))}It("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),It("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),It(Dt,2);for(var wr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),xr=0;xr<wr.length;xr++)Lt.set(wr[xr],0);h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _r="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Er=new Set("cancel close invalid load scroll toggle".split(" ").concat(_r));function Ar(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,l,c){if(Ke.apply(this,arguments),Ge){if(!Ge)throw Error(s(198));var u=We;Ge=!1,We=null,qe||(qe=!0,Xe=u)}}(r,t,void 0,e),e.currentTarget=null}function Sr(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Ar(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Ar(i,s,c),o=l}}}if(qe)throw e=Xe,qe=!1,Xe=null,e}function Mr(e,t){var n=ni(t),r=e+"__bubble";n.has(r)||(Rr(t,e,2,!1),n.add(r))}var Tr="_reactListening"+Math.random().toString(36).slice(2);function Cr(e){e[Tr]||(e[Tr]=!0,l.forEach((function(t){Er.has(t)||Or(t,!1,e,null),Or(t,!0,e,null)})))}function Or(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=n;if("selectionchange"===e&&9!==n.nodeType&&(o=n.ownerDocument),null!==r&&!t&&Er.has(e)){if("scroll"!==e)return;i|=2,o=r}var a=ni(o),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(i|=4),Rr(o,e,i,t),a.add(s))}function Rr(e,t,n,r){var i=Lt.get(t);switch(void 0===i?2:i){case 0:i=Qt;break;case 1:i=Zt;break;default:i=Jt}n=i.bind(null,t,n,e),i=void 0,!He||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function kr(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=Jr(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Be)return e(t,n);Be=!0;try{Ne(e,t,n)}finally{Be=!1,Fe()}}((function(){var r=o,i=Me(n),a=[];e:{var s=Pt.get(e);if(void 0!==s){var l=fn,c=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":l=Cn;break;case"focusin":c="focus",l=bn;break;case"focusout":c="blur",l=bn;break;case"beforeblur":case"afterblur":l=bn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=vn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Rn;break;case Ct:case Ot:case Rt:l=wn;break;case kt:l=kn;break;case"scroll":l=mn;break;case"wheel":l=Pn;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=On}var u=0!==(4&t),h=!u&&"scroll"===e,d=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==d&&(null!=(m=ze(p,d))&&u.push(Pr(p,m,f)))),h)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!==(16&t)||!(c=n.relatedTarget||n.fromElement)||!Jr(c)&&!c[Qr])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?Jr(c):null)&&(c!==(h=Qe(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=vn,m="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=On,m="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?s:ei(l),f=null==c?s:ei(c),(s=new u(m,p+"leave",l,n,i)).target=h,s.relatedTarget=f,m=null,Jr(i)===r&&((u=new u(d,p+"enter",c,n,i)).target=f,u.relatedTarget=h,m=u),h=m,l&&c)e:{for(d=c,p=0,f=u=l;f;f=Dr(f))p++;for(f=0,m=d;m;m=Dr(m))f++;for(;0<p-f;)u=Dr(u),p--;for(;0<f-p;)d=Dr(d),f--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break e;u=Dr(u),d=Dr(d)}u=null}else u=null;null!==l&&Ir(a,s,l,u,!1),null!==c&&null!==h&&Ir(a,h,c,u,!0)}if("select"===(l=(s=r?ei(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Qn;else if(Gn(s))if(Zn)g=ar;else{g=ir;var v=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=or);switch(g&&(g=g(e,r))?Wn(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&oe(s,"number",s.value)),v=r?ei(r):window,e){case"focusin":(Gn(v)||"true"===v.contentEditable)&&(mr=v,gr=r,vr=null);break;case"focusout":vr=gr=mr=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,br(a,n,i);break;case"selectionchange":if(pr)break;case"keydown":case"keyup":br(a,n,i)}var y;if(Dn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?zn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(jn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=rn()):(tn="value"in(en=i)?en.value:en.textContent,Un=!0)),0<(v=Lr(r,b)).length&&(b=new _n(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=Hn(n))&&(b.data=y))),(y=Nn?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Bn);case"textInput":return(e=t.data)===Bn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Dn&&zn(e,t)?(e=rn(),nn=tn=en=null,Un=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return jn&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=Lr(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Sr(a,t)}))}function Pr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Lr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=ze(e,n))&&r.unshift(Pr(e,o,i)),null!=(o=ze(e,t))&&r.push(Pr(e,o,i))),e=e.return}return r}function Dr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ir(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=ze(n,o))&&a.unshift(Pr(n,l,s)):i||null!=(l=ze(n,o))&&a.push(Pr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Nr(){}var jr=null,Br=null;function Fr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function zr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Hr="function"===typeof setTimeout?setTimeout:void 0,Ur="function"===typeof clearTimeout?clearTimeout:void 0;function Vr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Gr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Wr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var qr=0;var Xr=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Xr,Kr="__reactProps$"+Xr,Qr="__reactContainer$"+Xr,Zr="__reactEvents$"+Xr;function Jr(e){var t=e[Yr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qr]||n[Yr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Wr(e);null!==e;){if(n=e[Yr])return n;e=Wr(e)}return t}n=(e=n).parentNode}return null}function $r(e){return!(e=e[Yr]||e[Qr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ei(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(s(33))}function ti(e){return e[Kr]||null}function ni(e){var t=e[Zr];return void 0===t&&(t=e[Zr]=new Set),t}var ri=[],ii=-1;function oi(e){return{current:e}}function ai(e){0>ii||(e.current=ri[ii],ri[ii]=null,ii--)}function si(e,t){ii++,ri[ii]=e.current,e.current=t}var li={},ci=oi(li),ui=oi(!1),hi=li;function di(e,t){var n=e.type.contextTypes;if(!n)return li;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function fi(e){return null!==(e=e.childContextTypes)&&void 0!==e}function pi(){ai(ui),ai(ci)}function mi(e,t,n){if(ci.current!==li)throw Error(s(168));si(ci,t),si(ui,n)}function gi(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(s(108,Y(t)||"Unknown",i));return o({},n,r)}function vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||li,hi=ci.current,si(ci,e),si(ui,ui.current),!0}function yi(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=gi(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,ai(ui),ai(ci),si(ci,e)):ai(ui),si(ui,n)}var bi=null,wi=null,xi=a.unstable_runWithPriority,_i=a.unstable_scheduleCallback,Ei=a.unstable_cancelCallback,Ai=a.unstable_shouldYield,Si=a.unstable_requestPaint,Mi=a.unstable_now,Ti=a.unstable_getCurrentPriorityLevel,Ci=a.unstable_ImmediatePriority,Oi=a.unstable_UserBlockingPriority,Ri=a.unstable_NormalPriority,ki=a.unstable_LowPriority,Pi=a.unstable_IdlePriority,Li={},Di=void 0!==Si?Si:function(){},Ii=null,Ni=null,ji=!1,Bi=Mi(),Fi=1e4>Bi?Mi:function(){return Mi()-Bi};function zi(){switch(Ti()){case Ci:return 99;case Oi:return 98;case Ri:return 97;case ki:return 96;case Pi:return 95;default:throw Error(s(332))}}function Hi(e){switch(e){case 99:return Ci;case 98:return Oi;case 97:return Ri;case 96:return ki;case 95:return Pi;default:throw Error(s(332))}}function Ui(e,t){return e=Hi(e),xi(e,t)}function Vi(e,t,n){return e=Hi(e),_i(e,t,n)}function Gi(){if(null!==Ni){var e=Ni;Ni=null,Ei(e)}Wi()}function Wi(){if(!ji&&null!==Ii){ji=!0;var e=0;try{var t=Ii;Ui(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ii=null}catch(n){throw null!==Ii&&(Ii=Ii.slice(e+1)),_i(Ci,Gi),n}finally{ji=!1}}}var qi=_.ReactCurrentBatchConfig;function Xi(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Yi=oi(null),Ki=null,Qi=null,Zi=null;function Ji(){Zi=Qi=Ki=null}function $i(e){var t=Yi.current;ai(Yi),e.type._context._currentValue=t}function eo(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function to(e,t){Ki=e,Zi=Qi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(La=!0),e.firstContext=null)}function no(e,t){if(Zi!==e&&!1!==t&&0!==t)if("number"===typeof t&&1073741823!==t||(Zi=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qi){if(null===Ki)throw Error(s(308));Qi=t,Ki.dependencies={lanes:0,firstContext:t,responders:null}}else Qi=Qi.next=t;return e._currentValue}var ro=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function oo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ao(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function so(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function lo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function co(e,t,n,r){var i=e.updateQueue;ro=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?a=u:s.next=u,s=c;var h=e.alternate;if(null!==h){var d=(h=h.updateQueue).lastBaseUpdate;d!==s&&(null===d?h.firstBaseUpdate=u:d.next=u,h.lastBaseUpdate=c)}}if(null!==a){for(d=i.baseState,s=0,h=u=c=null;;){l=a.lane;var f=a.eventTime;if((r&l)===l){null!==h&&(h=h.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(l=t,f=n,m.tag){case 1:if("function"===typeof(p=m.payload)){d=p.call(f,d,l);break e}d=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null===(l="function"===typeof(p=m.payload)?p.call(f,d,l):p)||void 0===l)break e;d=o({},d,l);break e;case 2:ro=!0}}null!==a.callback&&(e.flags|=32,null===(l=i.effects)?i.effects=[a]:l.push(a))}else f={eventTime:f,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===h?(u=h=f,c=d):h=h.next=f,s|=l;if(null===(a=a.next)){if(null===(l=i.shared.pending))break;a=l.next,l.next=null,i.lastBaseUpdate=l,i.shared.pending=null}}null===h&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=h,Is|=s,e.lanes=s,e.memoizedState=d}}function uo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!==typeof i)throw Error(s(191,i));i.call(r)}}}var ho=(new i.Component).refs;function fo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var po={isMounted:function(e){return!!(e=e._reactInternals)&&Qe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=al(),i=sl(e),o=ao(r,i);o.payload=t,void 0!==n&&null!==n&&(o.callback=n),so(e,o),ll(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=al(),i=sl(e),o=ao(r,i);o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),so(e,o),ll(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=al(),r=sl(e),i=ao(n,r);i.tag=2,void 0!==t&&null!==t&&(i.callback=t),so(e,i),ll(e,r,n)}};function mo(e,t,n,r,i,o,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!cr(n,r)||!cr(i,o))}function go(e,t,n){var r=!1,i=li,o=t.contextType;return"object"===typeof o&&null!==o?o=no(o):(i=fi(t)?hi:ci.current,o=(r=null!==(r=t.contextTypes)&&void 0!==r)?di(e,i):li),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=po,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function vo(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&po.enqueueReplaceState(t,t.state,null)}function yo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ho,io(e);var o=t.contextType;"object"===typeof o&&null!==o?i.context=no(o):(o=fi(t)?hi:ci.current,i.context=di(e,o)),co(e,n,i,r),i.state=e.memoizedState,"function"===typeof(o=t.getDerivedStateFromProps)&&(fo(e,t,o,n),i.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(t=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&po.enqueueReplaceState(i,i.state,null),co(e,n,i,r),i.state=e.memoizedState),"function"===typeof i.componentDidMount&&(e.flags|=4)}var bo=Array.isArray;function wo(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:((t=function(e){var t=r.refs;t===ho&&(t=r.refs={}),null===e?delete t[i]:t[i]=e})._stringRef=i,t)}if("string"!==typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function xo(e,t){if("textarea"!==e.type)throw Error(s(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function _o(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=zl(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function a(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Gl(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=wo(e,t,n),r.return=e,r):((r=Hl(n.type,n.key,n.props,null,e.mode,r)).ref=wo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Wl(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,o){return null===t||7!==t.tag?((t=Ul(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"===typeof t||"number"===typeof t)return(t=Gl(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case E:return(n=Hl(t.type,t.key,t.props,null,e.mode,n)).ref=wo(e,null,t),n.return=e,n;case A:return(t=Wl(t,e.mode,n)).return=e,t}if(bo(t)||V(t))return(t=Ul(t,e.mode,n,null)).return=e,t;xo(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n||"number"===typeof n)return null!==i?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case E:return n.key===i?n.type===S?h(e,t,n.props.children,r,i):c(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null}if(bo(n)||V(n))return null!==i?null:h(e,t,n,r,null);xo(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case E:return e=e.get(null===r.key?n:r.key)||null,r.type===S?h(t,e,r.props.children,i,r.key):c(t,e,r,i);case A:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(bo(r)||V(r))return h(t,e=e.get(n)||null,r,i,null);xo(t,r)}return null}function m(i,a,s,l){for(var c=null,u=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(i,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(i,h),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,h=g}if(m===s.length)return n(i,h),c;if(null===h){for(;m<s.length;m++)null!==(h=d(i,s[m],l))&&(a=o(h,a,m),null===u?c=h:u.sibling=h,u=h);return c}for(h=r(i,h);m<s.length;m++)null!==(g=p(h,i,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(i,e)})),c}function g(i,a,l,c){var u=V(l);if("function"!==typeof u)throw Error(s(150));if(null==(l=u.call(l)))throw Error(s(151));for(var h=u=null,m=a,g=a=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),a=o(b,a,g),null===h?u=b:h.sibling=b,h=b,m=v}if(y.done)return n(i,m),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=d(i,y.value,c))&&(a=o(y,a,g),null===h?u=y:h.sibling=y,h=y);return u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),a=o(y,a,g),null===h?u=y:h.sibling=y,h=y);return e&&m.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var c="object"===typeof o&&null!==o&&o.type===S&&null===o.key;c&&(o=o.props.children);var u="object"===typeof o&&null!==o;if(u)switch(o.$$typeof){case E:e:{for(u=o.key,c=r;null!==c;){if(c.key===u){switch(c.tag){case 7:if(o.type===S){n(e,c.sibling),(r=i(c,o.props.children)).return=e,e=r;break e}break;default:if(c.elementType===o.type){n(e,c.sibling),(r=i(c,o.props)).ref=wo(e,c,o),r.return=e,e=r;break e}}n(e,c);break}t(e,c),c=c.sibling}o.type===S?((r=Ul(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=Hl(o.type,o.key,o.props,null,e.mode,l)).ref=wo(e,r,o),l.return=e,e=l)}return a(e);case A:e:{for(c=o.key;null!==r;){if(r.key===c){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Wl(o,e.mode,l)).return=e,e=r}return a(e)}if("string"===typeof o||"number"===typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Gl(o,e.mode,l)).return=e,e=r),a(e);if(bo(o))return m(e,r,o,l);if(V(o))return g(e,r,o,l);if(u&&xo(e,o),"undefined"===typeof o&&!c)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(s(152,Y(e.type)||"Component"))}return n(e,r)}}var Eo=_o(!0),Ao=_o(!1),So={},Mo=oi(So),To=oi(So),Co=oi(So);function Oo(e){if(e===So)throw Error(s(174));return e}function Ro(e,t){switch(si(Co,t),si(To,e),si(Mo,So),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:me(null,"");break;default:t=me(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ai(Mo),si(Mo,t)}function ko(){ai(Mo),ai(To),ai(Co)}function Po(e){Oo(Co.current);var t=Oo(Mo.current),n=me(t,e.type);t!==n&&(si(To,e),si(Mo,n))}function Lo(e){To.current===e&&(ai(Mo),ai(To))}var Do=oi(0);function Io(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var No=null,jo=null,Bo=!1;function Fo(e,t){var n=Bl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function zo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ho(e){if(Bo){var t=jo;if(t){var n=t;if(!zo(e,t)){if(!(t=Gr(n.nextSibling))||!zo(e,t))return e.flags=-1025&e.flags|2,Bo=!1,void(No=e);Fo(No,n)}No=e,jo=Gr(t.firstChild)}else e.flags=-1025&e.flags|2,Bo=!1,No=e}}function Uo(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;No=e}function Vo(e){if(e!==No)return!1;if(!Bo)return Uo(e),Bo=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!zr(t,e.memoizedProps))for(t=jo;t;)Fo(e,t),t=Gr(t.nextSibling);if(Uo(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){jo=Gr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}jo=null}}else jo=No?Gr(e.stateNode.nextSibling):null;return!0}function Go(){jo=No=null,Bo=!1}var Wo=[];function qo(){for(var e=0;e<Wo.length;e++)Wo[e]._workInProgressVersionPrimary=null;Wo.length=0}var Xo=_.ReactCurrentDispatcher,Yo=_.ReactCurrentBatchConfig,Ko=0,Qo=null,Zo=null,Jo=null,$o=!1,ea=!1;function ta(){throw Error(s(321))}function na(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function ra(e,t,n,r,i,o){if(Ko=o,Qo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xo.current=null===e||null===e.memoizedState?Oa:Ra,e=n(r,i),ea){o=0;do{if(ea=!1,!(25>o))throw Error(s(301));o+=1,Jo=Zo=null,t.updateQueue=null,Xo.current=ka,e=n(r,i)}while(ea)}if(Xo.current=Ca,t=null!==Zo&&null!==Zo.next,Ko=0,Jo=Zo=Qo=null,$o=!1,t)throw Error(s(300));return e}function ia(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Jo?Qo.memoizedState=Jo=e:Jo=Jo.next=e,Jo}function oa(){if(null===Zo){var e=Qo.alternate;e=null!==e?e.memoizedState:null}else e=Zo.next;var t=null===Jo?Qo.memoizedState:Jo.next;if(null!==t)Jo=t,Zo=e;else{if(null===e)throw Error(s(310));e={memoizedState:(Zo=e).memoizedState,baseState:Zo.baseState,baseQueue:Zo.baseQueue,queue:Zo.queue,next:null},null===Jo?Qo.memoizedState=Jo=e:Jo=Jo.next=e}return Jo}function aa(e,t){return"function"===typeof t?t(e):t}function sa(e){var t=oa(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=Zo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=a=o=null,c=i;do{var u=c.lane;if((Ko&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var h={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(a=l=h,o=r):l=l.next=h,Qo.lanes|=u,Is|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=a,sr(r,t.memoizedState)||(La=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function la(e){var t=oa(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);sr(o,t.memoizedState)||(La=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ca(e,t,n){var r=t._getVersion;r=r(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(Ko&e)===e)&&(t._workInProgressVersionPrimary=r,Wo.push(t))),e)return n(t._source);throw Wo.push(t),Error(s(350))}function ua(e,t,n,r){var i=Ts;if(null===i)throw Error(s(349));var o=t._getVersion,a=o(t._source),l=Xo.current,c=l.useState((function(){return ca(i,t,n)})),u=c[1],h=c[0];c=Jo;var d=e.memoizedState,f=d.refs,p=f.getSnapshot,m=d.source;d=d.subscribe;var g=Qo;return e.memoizedState={refs:f,source:t,subscribe:r},l.useEffect((function(){f.getSnapshot=n,f.setSnapshot=u;var e=o(t._source);if(!sr(a,e)){e=n(t._source),sr(h,e)||(u(e),e=sl(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,s=e;0<s;){var l=31-Gt(s),c=1<<l;r[l]|=e,s&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=f.getSnapshot,n=f.setSnapshot;try{n(e(t._source));var r=sl(g);i.mutableReadLanes|=r&i.pendingLanes}catch(o){n((function(){throw o}))}}))}),[t,r]),sr(p,n)&&sr(m,t)&&sr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:aa,lastRenderedState:h}).dispatch=u=Ta.bind(null,Qo,e),c.queue=e,c.baseQueue=null,h=ca(i,t,n),c.memoizedState=c.baseState=h),h}function ha(e,t,n){return ua(oa(),e,t,n)}function da(e){var t=ia();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:aa,lastRenderedState:e}).dispatch=Ta.bind(null,Qo,e),[t.memoizedState,e]}function fa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Qo.updateQueue)?(t={lastEffect:null},Qo.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function pa(e){return e={current:e},ia().memoizedState=e}function ma(){return oa().memoizedState}function ga(e,t,n,r){var i=ia();Qo.flags|=e,i.memoizedState=fa(1|t,n,void 0,void 0===r?null:r)}function va(e,t,n,r){var i=oa();r=void 0===r?null:r;var o=void 0;if(null!==Zo){var a=Zo.memoizedState;if(o=a.destroy,null!==r&&na(r,a.deps))return void fa(t,n,o,r)}Qo.flags|=e,i.memoizedState=fa(1|t,n,o,r)}function ya(e,t){return ga(516,4,e,t)}function ba(e,t){return va(516,4,e,t)}function wa(e,t){return va(4,2,e,t)}function xa(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function _a(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,va(4,2,xa.bind(null,t,e),n)}function Ea(){}function Aa(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&na(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Sa(e,t){var n=oa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&na(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ma(e,t){var n=zi();Ui(98>n?98:n,(function(){e(!0)})),Ui(97<n?97:n,(function(){var n=Yo.transition;Yo.transition=1;try{e(!1),t()}finally{Yo.transition=n}}))}function Ta(e,t,n){var r=al(),i=sl(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?o.next=o:(o.next=a.next,a.next=o),t.pending=o,a=e.alternate,e===Qo||null!==a&&a===Qo)ea=$o=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,l=a(s,n);if(o.eagerReducer=a,o.eagerState=l,sr(l,s))return}catch(c){}ll(e,i,r)}}var Ca={readContext:no,useCallback:ta,useContext:ta,useEffect:ta,useImperativeHandle:ta,useLayoutEffect:ta,useMemo:ta,useReducer:ta,useRef:ta,useState:ta,useDebugValue:ta,useDeferredValue:ta,useTransition:ta,useMutableSource:ta,useOpaqueIdentifier:ta,unstable_isNewReconciler:!1},Oa={readContext:no,useCallback:function(e,t){return ia().memoizedState=[e,void 0===t?null:t],e},useContext:no,useEffect:ya,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,ga(4,2,xa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ga(4,2,e,t)},useMemo:function(e,t){var n=ia();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ia();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ta.bind(null,Qo,e),[r.memoizedState,e]},useRef:pa,useState:da,useDebugValue:Ea,useDeferredValue:function(e){var t=da(e),n=t[0],r=t[1];return ya((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=da(!1),t=e[0];return pa(e=Ma.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ia();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ua(r,e,t,n)},useOpaqueIdentifier:function(){if(Bo){var e=!1,t=function(e){return{$$typeof:N,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(qr++).toString(36))),Error(s(355))})),n=da(t)[1];return 0===(2&Qo.mode)&&(Qo.flags|=516,fa(5,(function(){n("r:"+(qr++).toString(36))}),void 0,null)),t}return da(t="r:"+(qr++).toString(36)),t},unstable_isNewReconciler:!1},Ra={readContext:no,useCallback:Aa,useContext:no,useEffect:ba,useImperativeHandle:_a,useLayoutEffect:wa,useMemo:Sa,useReducer:sa,useRef:ma,useState:function(){return sa(aa)},useDebugValue:Ea,useDeferredValue:function(e){var t=sa(aa),n=t[0],r=t[1];return ba((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=sa(aa)[0];return[ma().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return sa(aa)[0]},unstable_isNewReconciler:!1},ka={readContext:no,useCallback:Aa,useContext:no,useEffect:ba,useImperativeHandle:_a,useLayoutEffect:wa,useMemo:Sa,useReducer:la,useRef:ma,useState:function(){return la(aa)},useDebugValue:Ea,useDeferredValue:function(e){var t=la(aa),n=t[0],r=t[1];return ba((function(){var t=Yo.transition;Yo.transition=1;try{r(e)}finally{Yo.transition=t}}),[e]),n},useTransition:function(){var e=la(aa)[0];return[ma().current,e]},useMutableSource:ha,useOpaqueIdentifier:function(){return la(aa)[0]},unstable_isNewReconciler:!1},Pa=_.ReactCurrentOwner,La=!1;function Da(e,t,n,r){t.child=null===e?Ao(t,null,n,r):Eo(t,e.child,n,r)}function Ia(e,t,n,r,i){n=n.render;var o=t.ref;return to(t,i),r=ra(e,t,n,r,o,i),null===e||La?(t.flags|=1,Da(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ts(e,t,i))}function Na(e,t,n,r,i,o){if(null===e){var a=n.type;return"function"!==typeof a||Fl(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Hl(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ja(e,t,a,r,i,o))}return a=e.child,0===(i&o)&&(i=a.memoizedProps,(n=null!==(n=n.compare)?n:cr)(i,r)&&e.ref===t.ref)?ts(e,t,o):(t.flags|=1,(e=zl(a,r)).ref=t.ref,e.return=t,t.child=e)}function ja(e,t,n,r,i,o){if(null!==e&&cr(e.memoizedProps,r)&&e.ref===t.ref){if(La=!1,0===(o&i))return t.lanes=e.lanes,ts(e,t,o);0!==(16384&e.flags)&&(La=!0)}return za(e,t,n,r,o)}function Ba(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0===(4&t.mode))t.memoizedState={baseLanes:0},gl(t,n);else{if(0===(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},gl(t,e),null;t.memoizedState={baseLanes:0},gl(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,gl(t,r);return Da(e,t,i,n),t.child}function Fa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function za(e,t,n,r,i){var o=fi(n)?hi:ci.current;return o=di(t,o),to(t,i),n=ra(e,t,n,r,o,i),null===e||La?(t.flags|=1,Da(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,ts(e,t,i))}function Ha(e,t,n,r,i){if(fi(n)){var o=!0;vi(t)}else o=!1;if(to(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),go(t,n,r),yo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"===typeof c&&null!==c?c=no(c):c=di(t,c=fi(n)?hi:ci.current);var u=n.getDerivedStateFromProps,h="function"===typeof u||"function"===typeof a.getSnapshotBeforeUpdate;h||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==c)&&vo(t,a,r,c),ro=!1;var d=t.memoizedState;a.state=d,co(t,r,a,i),l=t.memoizedState,s!==r||d!==l||ui.current||ro?("function"===typeof u&&(fo(t,n,u,r),l=t.memoizedState),(s=ro||mo(t,n,s,r,d,l,c))?(h||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4)):("function"===typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,oo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xi(t.type,s),a.props=c,h=t.pendingProps,d=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=no(l):l=di(t,l=fi(n)?hi:ci.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==h||d!==l)&&vo(t,a,r,l),ro=!1,d=t.memoizedState,a.state=d,co(t,r,a,i);var p=t.memoizedState;s!==h||d!==p||ui.current||ro?("function"===typeof f&&(fo(t,n,f,r),p=t.memoizedState),(c=ro||mo(t,n,c,r,d,p,l))?(u||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Ua(e,t,n,r,o,i)}function Ua(e,t,n,r,i,o){Fa(e,t);var a=0!==(64&t.flags);if(!r&&!a)return i&&yi(t,n,!1),ts(e,t,o);r=t.stateNode,Pa.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Eo(t,e.child,null,o),t.child=Eo(t,null,s,o)):Da(e,t,s,o),t.memoizedState=r.state,i&&yi(t,n,!0),t.child}function Va(e){var t=e.stateNode;t.pendingContext?mi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&mi(0,t.context,!1),Ro(e,t.containerInfo)}var Ga,Wa,qa,Xa={dehydrated:null,retryLane:0};function Ya(e,t,n){var r,i=t.pendingProps,o=Do.current,a=!1;return(r=0!==(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!==(2&o)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),si(Do,1&o),null===e?(void 0!==i.fallback&&Ho(t),e=i.children,o=i.fallback,a?(e=Ka(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,e):"number"===typeof i.unstable_expectedLoadTime?(e=Ka(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Xa,t.lanes=33554432,e):((n=Vl({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(i=Za(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Xa,i):(n=Qa(e,t,i.children,n),t.memoizedState=null,n))}function Ka(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0===(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Vl(t,i,0,null),n=Ul(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function Qa(e,t,n,r){var i=e.child;return e=i.sibling,n=zl(i,{mode:"visible",children:n}),0===(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function Za(e,t,n,r,i){var o=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0===(2&o)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=zl(a,s),null!==e?r=zl(e,r):(r=Ul(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Ja(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),eo(e.return,t)}function $a(e,t,n,r,i,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.lastEffect=o)}function es(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Da(e,t,r.children,n),0!==(2&(r=Do.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!==(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ja(e,n);else if(19===e.tag)Ja(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(si(Do,r),0===(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Io(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),$a(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Io(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}$a(t,!0,n,null,o,t.lastEffect);break;case"together":$a(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function ts(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Is|=t.lanes,0!==(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=zl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=zl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ns(e,t){if(!Bo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rs(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return fi(t.type)&&pi(),null;case 3:return ko(),ai(ui),ai(ci),qo(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Vo(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Lo(t);var i=Oo(Co.current);if(n=t.type,null!==e&&null!=t.stateNode)Wa(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(s(166));return null}if(e=Oo(Mo.current),Vo(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Yr]=t,r[Kr]=a,n){case"dialog":Mr("cancel",r),Mr("close",r);break;case"iframe":case"object":case"embed":Mr("load",r);break;case"video":case"audio":for(e=0;e<_r.length;e++)Mr(_r[e],r);break;case"source":Mr("error",r);break;case"img":case"image":case"link":Mr("error",r),Mr("load",r);break;case"details":Mr("toggle",r);break;case"input":te(r,a),Mr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Mr("invalid",r);break;case"textarea":ce(r,a),Mr("invalid",r)}for(var l in Ae(n,a),e=null,a)a.hasOwnProperty(l)&&(i=a[l],"children"===l?"string"===typeof i?r.textContent!==i&&(e=["children",i]):"number"===typeof i&&r.textContent!==""+i&&(e=["children",""+i]):c.hasOwnProperty(l)&&null!=i&&"onScroll"===l&&Mr("scroll",r));switch(n){case"input":Z(r),ie(r,a,!0);break;case"textarea":Z(r),he(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Nr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(l=9===i.nodeType?i:i.ownerDocument,e===de&&(e=pe(n)),e===de?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Yr]=t,e[Kr]=r,Ga(e,t),t.stateNode=e,l=Se(n,r),n){case"dialog":Mr("cancel",e),Mr("close",e),i=r;break;case"iframe":case"object":case"embed":Mr("load",e),i=r;break;case"video":case"audio":for(i=0;i<_r.length;i++)Mr(_r[i],e);i=r;break;case"source":Mr("error",e),i=r;break;case"img":case"image":case"link":Mr("error",e),Mr("load",e),i=r;break;case"details":Mr("toggle",e),i=r;break;case"input":te(e,r),i=ee(e,r),Mr("invalid",e);break;case"option":i=ae(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Mr("invalid",e);break;case"textarea":ce(e,r),i=le(e,r),Mr("invalid",e);break;default:i=r}Ae(n,i);var u=i;for(a in u)if(u.hasOwnProperty(a)){var h=u[a];"style"===a?_e(e,h):"dangerouslySetInnerHTML"===a?null!=(h=h?h.__html:void 0)&&ve(e,h):"children"===a?"string"===typeof h?("textarea"!==n||""!==h)&&ye(e,h):"number"===typeof h&&ye(e,""+h):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(c.hasOwnProperty(a)?null!=h&&"onScroll"===a&&Mr("scroll",e):null!=h&&x(e,a,h,l))}switch(n){case"input":Z(e),ie(e,r,!1);break;case"textarea":Z(e),he(e);break;case"option":null!=r.value&&e.setAttribute("value",""+K(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?se(e,!!r.multiple,a,!1):null!=r.defaultValue&&se(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=Nr)}Fr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)qa(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));n=Oo(Co.current),Oo(Mo.current),Vo(t)?(r=t.stateNode,n=t.memoizedProps,r[Yr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Yr]=t,t.stateNode=r)}return null;case 13:return ai(Do),r=t.memoizedState,0!==(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&Vo(t):n=null!==e.memoizedState,r&&!n&&0!==(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!==(1&Do.current)?0===Ps&&(Ps=3):(0!==Ps&&3!==Ps||(Ps=4),null===Ts||0===(134217727&Is)&&0===(134217727&Ns)||dl(Ts,Os))),(r||n)&&(t.flags|=4),null);case 4:return ko(),null===e&&Cr(t.stateNode.containerInfo),null;case 10:return $i(t),null;case 17:return fi(t.type)&&pi(),null;case 19:if(ai(Do),null===(r=t.memoizedState))return null;if(a=0!==(64&t.flags),null===(l=r.rendering))if(a)ns(r,!1);else{if(0!==Ps||null!==e&&0!==(64&e.flags))for(e=t.child;null!==e;){if(null!==(l=Io(e))){for(t.flags|=64,ns(r,!1),null!==(a=l.updateQueue)&&(t.updateQueue=a,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return si(Do,1&Do.current|2),t.child}e=e.sibling}null!==r.tail&&Fi()>zs&&(t.flags|=64,a=!0,ns(r,!1),t.lanes=33554432)}else{if(!a)if(null!==(e=Io(l))){if(t.flags|=64,a=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ns(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate&&!Bo)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Fi()-r.renderingStartTime>zs&&1073741824!==n&&(t.flags|=64,a=!0,ns(r,!1),t.lanes=33554432);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Fi(),n.sibling=null,t=Do.current,si(Do,a?1&t|2:1&t),n):null;case 23:case 24:return vl(),null!==e&&null!==e.memoizedState!==(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(s(156,t.tag))}function is(e){switch(e.tag){case 1:fi(e.type)&&pi();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(ko(),ai(ui),ai(ci),qo(),0!==(64&(t=e.flags)))throw Error(s(285));return e.flags=-4097&t|64,e;case 5:return Lo(e),null;case 13:return ai(Do),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return ai(Do),null;case 4:return ko(),null;case 10:return $i(e),null;case 23:case 24:return vl(),null;default:return null}}function os(e,t){try{var n="",r=t;do{n+=X(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i}}function as(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}Ga=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Wa=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Oo(Mo.current);var a,s=null;switch(n){case"input":i=ee(e,i),r=ee(e,r),s=[];break;case"option":i=ae(e,i),r=ae(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=le(e,i),r=le(e,r),s=[];break;default:"function"!==typeof i.onClick&&"function"===typeof r.onClick&&(e.onclick=Nr)}for(h in Ae(n,r),n=null,i)if(!r.hasOwnProperty(h)&&i.hasOwnProperty(h)&&null!=i[h])if("style"===h){var l=i[h];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(c.hasOwnProperty(h)?s||(s=[]):(s=s||[]).push(h,null));for(h in r){var u=r[h];if(l=null!=i?i[h]:void 0,r.hasOwnProperty(h)&&u!==l&&(null!=u||null!=l))if("style"===h)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(h,n)),n=u;else"dangerouslySetInnerHTML"===h?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(h,u)):"children"===h?"string"!==typeof u&&"number"!==typeof u||(s=s||[]).push(h,""+u):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(c.hasOwnProperty(h)?(null!=u&&"onScroll"===h&&Mr("scroll",e),s||l===u||(s=[])):"object"===typeof u&&null!==u&&u.$$typeof===N?u.toString():(s=s||[]).push(h,u))}n&&(s=s||[]).push("style",n);var h=s;(t.updateQueue=h)&&(t.flags|=4)}},qa=function(e,t,n,r){n!==r&&(t.flags|=4)};var ss="function"===typeof WeakMap?WeakMap:Map;function ls(e,t,n){(n=ao(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Gs||(Gs=!0,Ws=r),as(0,t)},n}function cs(e,t,n){(n=ao(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var i=t.value;n.payload=function(){return as(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(n.callback=function(){"function"!==typeof r&&(null===qs?qs=new Set([this]):qs.add(this),as(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var us="function"===typeof WeakSet?WeakSet:Set;function hs(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(n){Dl(e,n)}else t.current=null}function ds(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xi(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Vr(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(s(163))}function fs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3===(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!==(4&(i=i.tag))&&0!==(1&i)&&(kl(n,e),Rl(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Xi(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&uo(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}uo(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Fr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&_t(n)))));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(s(163))}function ps(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"===typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var i=n.memoizedProps.style;i=void 0!==i&&null!==i&&i.hasOwnProperty("display")?i.display:null,r.style.display=xe("display",i)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ms(e,t){if(wi&&"function"===typeof wi.onCommitFiberUnmount)try{wi.onCommitFiberUnmount(bi,t)}catch(o){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!==(4&r))kl(t,n);else{r=t;try{i()}catch(o){Dl(r,o)}}n=n.next}while(n!==e)}break;case 1:if(hs(t),"function"===typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Dl(t,o)}break;case 5:hs(t);break;case 4:bs(e,t)}}function gs(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function vs(e){return 5===e.tag||3===e.tag||4===e.tag}function ys(e){e:{for(var t=e.return;null!==t;){if(vs(t))break e;t=t.return}throw Error(s(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(s(161))}16&n.flags&&(ye(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||vs(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=Nr));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var i=t.tag,o=5===i||6===i;if(o)t=o?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function bs(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(s(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag){e:for(var a=e,l=i,c=l;;)if(ms(a,c),null!==c.child&&4!==c.tag)c.child.return=c,c=c.child;else{if(c===l)break e;for(;null===c.sibling;){if(null===c.return||c.return===l)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}r?(a=n,l=i.stateNode,8===a.nodeType?a.parentNode.removeChild(l):a.removeChild(l)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(ms(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function ws(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3===(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var i=null!==e?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,null!==o){for(n[Kr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&ne(n,r),Se(e,i),t=Se(e,r),i=0;i<o.length;i+=2){var a=o[i],l=o[i+1];"style"===a?_e(n,l):"dangerouslySetInnerHTML"===a?ve(n,l):"children"===a?ye(n,l):x(n,a,l,t)}switch(e){case"input":re(n,r);break;case"textarea":ue(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(o=r.value)?se(n,!!r.multiple,o,!1):e!==!!r.multiple&&(null!=r.defaultValue?se(n,!!r.multiple,r.defaultValue,!0):se(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(s(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,_t(n.containerInfo)));case 12:return;case 13:return null!==t.memoizedState&&(Fs=Fi(),ps(t.child,!0)),void xs(t);case 19:return void xs(t);case 17:return;case 23:case 24:return void ps(t,null!==t.memoizedState)}throw Error(s(163))}function xs(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new us),t.forEach((function(t){var r=Nl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function _s(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Es=Math.ceil,As=_.ReactCurrentDispatcher,Ss=_.ReactCurrentOwner,Ms=0,Ts=null,Cs=null,Os=0,Rs=0,ks=oi(0),Ps=0,Ls=null,Ds=0,Is=0,Ns=0,js=0,Bs=null,Fs=0,zs=1/0;function Hs(){zs=Fi()+500}var Us,Vs=null,Gs=!1,Ws=null,qs=null,Xs=!1,Ys=null,Ks=90,Qs=[],Zs=[],Js=null,$s=0,el=null,tl=-1,nl=0,rl=0,il=null,ol=!1;function al(){return 0!==(48&Ms)?Fi():-1!==tl?tl:tl=Fi()}function sl(e){if(0===(2&(e=e.mode)))return 1;if(0===(4&e))return 99===zi()?1:2;if(0===nl&&(nl=Ds),0!==qi.transition){0!==rl&&(rl=null!==Bs?Bs.pendingLanes:0),e=nl;var t=4186112&~rl;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=zi(),0!==(4&Ms)&&98===e?e=zt(12,nl):e=zt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),nl),e}function ll(e,t,n){if(50<$s)throw $s=0,el=null,Error(s(185));if(null===(e=cl(e,t)))return null;Vt(e,t,n),e===Ts&&(Ns|=t,4===Ps&&dl(e,Os));var r=zi();1===t?0!==(8&Ms)&&0===(48&Ms)?fl(e):(ul(e,n),0===Ms&&(Hs(),Gi())):(0===(4&Ms)||98!==r&&99!==r||(null===Js?Js=new Set([e]):Js.add(e)),ul(e,n)),Bs=e}function cl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function ul(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var l=31-Gt(a),c=1<<l,u=o[l];if(-1===u){if(0===(c&r)||0!==(c&i)){u=t,jt(c);var h=Nt;o[l]=10<=h?u+250:6<=h?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);a&=~c}if(r=Bt(e,e===Ts?Os:0),t=Nt,0===r)null!==n&&(n!==Li&&Ei(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Li&&Ei(n)}15===t?(n=fl.bind(null,e),null===Ii?(Ii=[n],Ni=_i(Ci,Wi)):Ii.push(n),n=Li):14===t?n=Vi(99,fl.bind(null,e)):n=Vi(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(s(358,e))}}(t),hl.bind(null,e)),e.callbackPriority=t,e.callbackNode=n}}function hl(e){if(tl=-1,rl=nl=0,0!==(48&Ms))throw Error(s(327));var t=e.callbackNode;if(Ol()&&e.callbackNode!==t)return null;var n=Bt(e,e===Ts?Os:0);if(0===n)return null;var r=n,i=Ms;Ms|=16;var o=wl();for(Ts===e&&Os===r||(Hs(),yl(e,r));;)try{El();break}catch(l){bl(e,l)}if(Ji(),As.current=o,Ms=i,null!==Cs?r=0:(Ts=null,Os=0,r=Ps),0!==(Ds&Ns))yl(e,0);else if(0!==r){if(2===r&&(Ms|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(n=Ft(e))&&(r=xl(e,n))),1===r)throw t=Ls,yl(e,0),dl(e,n),ul(e,Fi()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(s(345));case 2:Ml(e);break;case 3:if(dl(e,n),(62914560&n)===n&&10<(r=Fs+500-Fi())){if(0!==Bt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){al(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Hr(Ml.bind(null,e),r);break}Ml(e);break;case 4:if(dl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var a=31-Gt(n);o=1<<a,(a=r[a])>i&&(i=a),n&=~o}if(n=i,10<(n=(120>(n=Fi()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Es(n/1960))-n)){e.timeoutHandle=Hr(Ml.bind(null,e),n);break}Ml(e);break;case 5:Ml(e);break;default:throw Error(s(329))}}return ul(e,Fi()),e.callbackNode===t?hl.bind(null,e):null}function dl(e,t){for(t&=~js,t&=~Ns,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gt(t),r=1<<n;e[n]=-1,t&=~r}}function fl(e){if(0!==(48&Ms))throw Error(s(327));if(Ol(),e===Ts&&0!==(e.expiredLanes&Os)){var t=Os,n=xl(e,t);0!==(Ds&Ns)&&(n=xl(e,t=Bt(e,t)))}else n=xl(e,t=Bt(e,0));if(0!==e.tag&&2===n&&(Ms|=64,e.hydrate&&(e.hydrate=!1,Vr(e.containerInfo)),0!==(t=Ft(e))&&(n=xl(e,t))),1===n)throw n=Ls,yl(e,0),dl(e,t),ul(e,Fi()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ml(e),ul(e,Fi()),null}function pl(e,t){var n=Ms;Ms|=1;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}}function ml(e,t){var n=Ms;Ms&=-2,Ms|=8;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}}function gl(e,t){si(ks,Rs),Rs|=t,Ds|=t}function vl(){Rs=ks.current,ai(ks)}function yl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Ur(n)),null!==Cs)for(n=Cs.return;null!==n;){var r=n;switch(r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&pi();break;case 3:ko(),ai(ui),ai(ci),qo();break;case 5:Lo(r);break;case 4:ko();break;case 13:case 19:ai(Do);break;case 10:$i(r);break;case 23:case 24:vl()}n=n.return}Ts=e,Cs=zl(e.current,null),Os=Rs=Ds=t,Ps=0,Ls=null,js=Ns=Is=0}function bl(e,t){for(;;){var n=Cs;try{if(Ji(),Xo.current=Ca,$o){for(var r=Qo.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}$o=!1}if(Ko=0,Jo=Zo=Qo=null,ea=!1,Ss.current=null,null===n||null===n.return){Ps=1,Ls=t,Cs=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Os,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==l&&"object"===typeof l&&"function"===typeof l.then){var c=l;if(0===(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var h=0!==(1&Do.current),d=a;do{var f;if(f=13===d.tag){var p=d.memoizedState;if(null!==p)f=null!==p.dehydrated;else{var m=d.memoizedProps;f=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!h)}}if(f){var g=d.updateQueue;if(null===g){var v=new Set;v.add(c),d.updateQueue=v}else g.add(c);if(0===(2&d.mode)){if(d.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var y=ao(-1,1);y.tag=2,so(s,y)}s.lanes|=1;break e}l=void 0,s=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new ss,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(s)){l.add(s);var w=Il.bind(null,o,c,s);c.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);l=Error((Y(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Ps&&(Ps=2),l=os(l,s),d=a;do{switch(d.tag){case 3:o=l,d.flags|=4096,t&=-t,d.lanes|=t,lo(d,ls(0,o,t));break e;case 1:o=l;var x=d.type,_=d.stateNode;if(0===(64&d.flags)&&("function"===typeof x.getDerivedStateFromError||null!==_&&"function"===typeof _.componentDidCatch&&(null===qs||!qs.has(_)))){d.flags|=4096,t&=-t,d.lanes|=t,lo(d,cs(d,o,t));break e}}d=d.return}while(null!==d)}Sl(n)}catch(E){t=E,Cs===n&&null!==n&&(Cs=n=n.return);continue}break}}function wl(){var e=As.current;return As.current=Ca,null===e?Ca:e}function xl(t,n){var r=Ms;Ms|=16;var i=wl();for(Ts===t&&Os===n||yl(t,n);;)try{_l();break}catch(e){bl(t,e)}if(Ji(),Ms=r,As.current=i,null!==Cs)throw Error(s(261));return Ts=null,Os=0,Ps}function _l(){for(;null!==Cs;)Al(Cs)}function El(){for(;null!==Cs&&!Ai();)Al(Cs)}function Al(e){var t=Us(e.alternate,e,Rs);e.memoizedProps=e.pendingProps,null===t?Sl(e):Cs=t,Ss.current=null}function Sl(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(2048&t.flags)){if(null!==(n=rs(n,t,Rs)))return void(Cs=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!==(1073741824&Rs)||0===(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0===(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=is(t)))return n.flags&=2047,void(Cs=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Cs=t);Cs=t=e}while(null!==t);0===Ps&&(Ps=5)}function Ml(e){var t=zi();return Ui(99,Tl.bind(null,e,t)),null}function Tl(e,t){do{Ol()}while(null!==Ys);if(0!==(48&Ms))throw Error(s(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var a=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-Gt(o),u=1<<c;i[c]=0,a[c]=-1,l[c]=-1,o&=~u}if(null!==Js&&0===(24&r)&&Js.has(e)&&Js.delete(e),e===Ts&&(Cs=Ts=null,Os=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(i=Ms,Ms|=32,Ss.current=null,jr=Kt,fr(a=dr())){if("selectionStart"in a)l={start:a.selectionStart,end:a.selectionEnd};else e:if(l=(l=a.ownerDocument)&&l.defaultView||window,(u=l.getSelection&&l.getSelection())&&0!==u.rangeCount){l=u.anchorNode,o=u.anchorOffset,c=u.focusNode,u=u.focusOffset;try{l.nodeType,c.nodeType}catch(M){l=null;break e}var h=0,d=-1,f=-1,p=0,m=0,g=a,v=null;t:for(;;){for(var y;g!==l||0!==o&&3!==g.nodeType||(d=h+o),g!==c||0!==u&&3!==g.nodeType||(f=h+u),3===g.nodeType&&(h+=g.nodeValue.length),null!==(y=g.firstChild);)v=g,g=y;for(;;){if(g===a)break t;if(v===l&&++p===o&&(d=h),v===c&&++m===u&&(f=h),null!==(y=g.nextSibling))break;v=(g=v).parentNode}g=y}l=-1===d||-1===f?null:{start:d,end:f}}else l=null;l=l||{start:0,end:0}}else l=null;Br={focusedElem:a,selectionRange:l},Kt=!1,il=null,ol=!1,Vs=r;do{try{Cl()}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);il=null,Vs=r;do{try{for(a=e;null!==Vs;){var b=Vs.flags;if(16&b&&ye(Vs.stateNode,""),128&b){var w=Vs.alternate;if(null!==w){var x=w.ref;null!==x&&("function"===typeof x?x(null):x.current=null)}}switch(1038&b){case 2:ys(Vs),Vs.flags&=-3;break;case 6:ys(Vs),Vs.flags&=-3,ws(Vs.alternate,Vs);break;case 1024:Vs.flags&=-1025;break;case 1028:Vs.flags&=-1025,ws(Vs.alternate,Vs);break;case 4:ws(Vs.alternate,Vs);break;case 8:bs(a,l=Vs);var _=l.alternate;gs(l),null!==_&&gs(_)}Vs=Vs.nextEffect}}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);if(x=Br,w=dr(),b=x.focusedElem,a=x.selectionRange,w!==b&&b&&b.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(b.ownerDocument.documentElement,b)){null!==a&&fr(b)&&(w=a.start,void 0===(x=a.end)&&(x=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(x,b.value.length)):(x=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(x=x.getSelection(),l=b.textContent.length,_=Math.min(a.start,l),a=void 0===a.end?_:Math.min(a.end,l),!x.extend&&_>a&&(l=a,a=_,_=l),l=hr(b,_),o=hr(b,a),l&&o&&(1!==x.rangeCount||x.anchorNode!==l.node||x.anchorOffset!==l.offset||x.focusNode!==o.node||x.focusOffset!==o.offset)&&((w=w.createRange()).setStart(l.node,l.offset),x.removeAllRanges(),_>a?(x.addRange(w),x.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),x.addRange(w))))),w=[];for(x=b;x=x.parentNode;)1===x.nodeType&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for("function"===typeof b.focus&&b.focus(),b=0;b<w.length;b++)(x=w[b]).element.scrollLeft=x.left,x.element.scrollTop=x.top}Kt=!!jr,Br=jr=null,e.current=n,Vs=r;do{try{for(b=e;null!==Vs;){var E=Vs.flags;if(36&E&&fs(b,Vs.alternate,Vs),128&E){w=void 0;var A=Vs.ref;if(null!==A){var S=Vs.stateNode;switch(Vs.tag){case 5:w=S;break;default:w=S}"function"===typeof A?A(w):A.current=w}}Vs=Vs.nextEffect}}catch(M){if(null===Vs)throw Error(s(330));Dl(Vs,M),Vs=Vs.nextEffect}}while(null!==Vs);Vs=null,Di(),Ms=i}else e.current=n;if(Xs)Xs=!1,Ys=e,Ks=t;else for(Vs=r;null!==Vs;)t=Vs.nextEffect,Vs.nextEffect=null,8&Vs.flags&&((E=Vs).sibling=null,E.stateNode=null),Vs=t;if(0===(r=e.pendingLanes)&&(qs=null),1===r?e===el?$s++:($s=0,el=e):$s=0,n=n.stateNode,wi&&"function"===typeof wi.onCommitFiberRoot)try{wi.onCommitFiberRoot(bi,n,void 0,64===(64&n.current.flags))}catch(M){}if(ul(e,Fi()),Gs)throw Gs=!1,e=Ws,Ws=null,e;return 0!==(8&Ms)||Gi(),null}function Cl(){for(;null!==Vs;){var e=Vs.alternate;ol||null===il||(0!==(8&Vs.flags)?et(Vs,il)&&(ol=!0):13===Vs.tag&&_s(e,Vs)&&et(Vs,il)&&(ol=!0));var t=Vs.flags;0!==(256&t)&&ds(e,Vs),0===(512&t)||Xs||(Xs=!0,Vi(97,(function(){return Ol(),null}))),Vs=Vs.nextEffect}}function Ol(){if(90!==Ks){var e=97<Ks?97:Ks;return Ks=90,Ui(e,Pl)}return!1}function Rl(e,t){Qs.push(t,e),Xs||(Xs=!0,Vi(97,(function(){return Ol(),null})))}function kl(e,t){Zs.push(t,e),Xs||(Xs=!0,Vi(97,(function(){return Ol(),null})))}function Pl(){if(null===Ys)return!1;var e=Ys;if(Ys=null,0!==(48&Ms))throw Error(s(331));var t=Ms;Ms|=32;var n=Zs;Zs=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],a=i.destroy;if(i.destroy=void 0,"function"===typeof a)try{a()}catch(c){if(null===o)throw Error(s(330));Dl(o,c)}}for(n=Qs,Qs=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(c){if(null===o)throw Error(s(330));Dl(o,c)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Ms=t,Gi(),!0}function Ll(e,t,n){so(e,t=ls(0,t=os(n,t),1)),t=al(),null!==(e=cl(e,1))&&(Vt(e,1,t),ul(e,t))}function Dl(e,t){if(3===e.tag)Ll(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Ll(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"===typeof n.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===qs||!qs.has(r))){var i=cs(n,e=os(t,e),1);if(so(n,i),i=al(),null!==(n=cl(n,1)))Vt(n,1,i),ul(n,i);else if("function"===typeof r.componentDidCatch&&(null===qs||!qs.has(r)))try{r.componentDidCatch(t,e)}catch(o){}break}}n=n.return}}function Il(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=al(),e.pingedLanes|=e.suspendedLanes&n,Ts===e&&(Os&n)===n&&(4===Ps||3===Ps&&(62914560&Os)===Os&&500>Fi()-Fs?yl(e,0):js|=n),ul(e,t)}function Nl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0===(2&(t=e.mode))?t=1:0===(4&t)?t=99===zi()?1:2:(0===nl&&(nl=Ds),0===(t=Ht(62914560&~nl))&&(t=4194304))),n=al(),null!==(e=cl(e,t))&&(Vt(e,t,n),ul(e,n))}function jl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Bl(e,t,n,r){return new jl(e,t,n,r)}function Fl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zl(e,t){var n=e.alternate;return null===n?((n=Bl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hl(e,t,n,r,i,o){var a=2;if(r=e,"function"===typeof e)Fl(e)&&(a=1);else if("string"===typeof e)a=5;else e:switch(e){case S:return Ul(n.children,i,o,t);case j:a=8,i|=16;break;case M:a=8,i|=1;break;case T:return(e=Bl(12,n,t,8|i)).elementType=T,e.type=T,e.lanes=o,e;case k:return(e=Bl(13,n,t,i)).type=k,e.elementType=k,e.lanes=o,e;case P:return(e=Bl(19,n,t,i)).elementType=P,e.lanes=o,e;case B:return Vl(n,i,o,t);case F:return(e=Bl(24,n,t,i)).elementType=F,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:a=10;break e;case O:a=9;break e;case R:a=11;break e;case L:a=14;break e;case D:a=16,r=null;break e;case I:a=22;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Bl(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Ul(e,t,n,r){return(e=Bl(7,e,r,t)).lanes=n,e}function Vl(e,t,n,r){return(e=Bl(23,e,r,t)).elementType=B,e.lanes=n,e}function Gl(e,t,n){return(e=Bl(6,e,null,t)).lanes=n,e}function Wl(e,t,n){return(t=Bl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ql(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.mutableSourceEagerHydrationData=null}function Xl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Yl(e,t,n,r){var i=t.current,o=al(),a=sl(i);e:if(n){t:{if(Qe(n=n._reactInternals)!==n||1!==n.tag)throw Error(s(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(fi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(s(171))}if(1===n.tag){var c=n.type;if(fi(c)){n=gi(n,c,l);break e}}n=l}else n=li;return null===t.context?t.context=n:t.pendingContext=n,(t=ao(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),so(i,t),ll(i,a,o),a}function Kl(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Ql(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Zl(e,t){Ql(e,t),(e=e.alternate)&&Ql(e,t)}function Jl(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new ql(e,t,null!=n&&!0===n.hydrate),t=Bl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,io(t),e[Qr]=n.current,Cr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var i=(t=r[e])._getVersion;i=i(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,i]:n.mutableSourceEagerHydrationData.push(t,i)}this._internalRoot=n}function $l(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function ec(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o._internalRoot;if("function"===typeof i){var s=i;i=function(){var e=Kl(a);s.call(e)}}Yl(t,a,e,i)}else{if(o=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new Jl(e,0,t?{hydrate:!0}:void 0)}(n,r),a=o._internalRoot,"function"===typeof i){var l=i;i=function(){var e=Kl(a);l.call(e)}}ml((function(){Yl(t,a,e,i)}))}return Kl(a)}function tc(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!$l(t))throw Error(s(200));return Xl(e,t,null,n)}Us=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||ui.current)La=!0;else{if(0===(n&r)){switch(La=!1,t.tag){case 3:Va(t),Go();break;case 5:Po(t);break;case 1:fi(t.type)&&vi(t);break;case 4:Ro(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var i=t.type._context;si(Yi,i._currentValue),i._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(n&t.child.childLanes)?Ya(e,t,n):(si(Do,1&Do.current),null!==(t=ts(e,t,n))?t.sibling:null);si(Do,1&Do.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(64&e.flags)){if(r)return es(e,t,n);t.flags|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),si(Do,Do.current),r)break;return null;case 23:case 24:return t.lanes=0,Ba(e,t,n)}return ts(e,t,n)}La=0!==(16384&e.flags)}else La=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=di(t,ci.current),to(t,n),i=ra(null,t,r,e,i,n),t.flags|=1,"object"===typeof i&&null!==i&&"function"===typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,fi(r)){var o=!0;vi(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,io(t);var a=r.getDerivedStateFromProps;"function"===typeof a&&fo(t,r,a,e),i.updater=po,t.stateNode=i,i._reactInternals=t,yo(t,r,e,n),t=Ua(null,t,r,!0,o,n)}else t.tag=0,Da(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"===typeof e)return Fl(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===R)return 11;if(e===L)return 14}return 2}(i),e=Xi(i,e),o){case 0:t=za(null,t,i,e,n);break e;case 1:t=Ha(null,t,i,e,n);break e;case 11:t=Ia(null,t,i,e,n);break e;case 14:t=Na(null,t,i,Xi(i.type,e),r,n);break e}throw Error(s(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,za(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 1:return r=t.type,i=t.pendingProps,Ha(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 3:if(Va(t),r=t.updateQueue,null===e||null===r)throw Error(s(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,oo(e,t),co(t,r,null,n),(r=t.memoizedState.element)===i)Go(),t=ts(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(jo=Gr(t.stateNode.containerInfo.firstChild),No=t,o=Bo=!0),o){if(null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)(o=e[i])._workInProgressVersionPrimary=e[i+1],Wo.push(o);for(n=Ao(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Da(e,t,r,n),Go();t=t.child}return t;case 5:return Po(t),null===e&&Ho(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,zr(r,i)?a=null:null!==o&&zr(r,o)&&(t.flags|=16),Fa(e,t),Da(e,t,a,n),t.child;case 6:return null===e&&Ho(t),null;case 13:return Ya(e,t,n);case 4:return Ro(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Eo(t,null,r,n):Da(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ia(e,t,r,i=t.elementType===r?i:Xi(r,i),n);case 7:return Da(e,t,t.pendingProps,n),t.child;case 8:case 12:return Da(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value;var l=t.type._context;if(si(Yi,l._currentValue),l._currentValue=o,null!==a)if(l=a.value,0===(o=sr(l,o)?0:0|("function"===typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(a.children===i.children&&!ui.current){t=ts(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){a=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!==(u.observedBits&o)){1===l.tag&&((u=ao(-1,n&-n)).tag=2,so(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),eo(l.return,n),c.lanes|=n;break}u=u.next}}else a=10===l.tag&&l.type===t.type?null:l.child;if(null!==a)a.return=l;else for(a=l;null!==a;){if(a===t){a=null;break}if(null!==(l=a.sibling)){l.return=a.return,a=l;break}a=a.return}l=a}Da(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,to(t,n),r=r(i=no(i,o.unstable_observedBits)),t.flags|=1,Da(e,t,r,n),t.child;case 14:return o=Xi(i=t.type,t.pendingProps),Na(e,t,i,o=Xi(i.type,o),r,n);case 15:return ja(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Xi(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,fi(r)?(e=!0,vi(t)):e=!1,to(t,n),go(t,r,i),yo(t,r,i,n),Ua(null,t,r,!0,e,n);case 19:return es(e,t,n);case 23:case 24:return Ba(e,t,n)}throw Error(s(156,t.tag))},Jl.prototype.render=function(e){Yl(e,this._internalRoot,null,null)},Jl.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Yl(null,e,null,(function(){t[Qr]=null}))},tt=function(e){13===e.tag&&(ll(e,4,al()),Zl(e,4))},nt=function(e){13===e.tag&&(ll(e,67108864,al()),Zl(e,67108864))},rt=function(e){if(13===e.tag){var t=al(),n=sl(e);ll(e,n,t),Zl(e,n)}},it=function(e,t){return t()},Te=function(e,t,n){switch(t){case"input":if(re(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=ti(r);if(!i)throw Error(s(90));J(r),re(r,i)}}}break;case"textarea":ue(e,n);break;case"select":null!=(t=n.value)&&se(e,!!n.multiple,t,!1)}},Le=pl,De=function(e,t,n,r,i){var o=Ms;Ms|=4;try{return Ui(98,e.bind(null,t,n,r,i))}finally{0===(Ms=o)&&(Hs(),Gi())}},Ie=function(){0===(49&Ms)&&(function(){if(null!==Js){var e=Js;Js=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,ul(e,Fi())}))}Gi()}(),Ol())},Ne=function(e,t){var n=Ms;Ms|=2;try{return e(t)}finally{0===(Ms=n)&&(Hs(),Gi())}};var nc={Events:[$r,ei,ti,ke,Pe,Ol,{current:!1}]},rc={findFiberByHostInstance:Jr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},ic={bundleType:rc.bundleType,version:rc.version,rendererPackageName:rc.rendererPackageName,rendererConfig:rc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=$e(e))?null:e.stateNode},findFiberByHostInstance:rc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{bi=oc.inject(ic),wi=oc}catch(ac){}}n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=nc,n.createPortal=tc,n.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw Error(s(268,Object.keys(e)))}return e=null===(e=$e(t))?null:e.stateNode},n.flushSync=function(e,t){var n=Ms;if(0!==(48&n))return e(t);Ms|=1;try{if(e)return Ui(99,e.bind(null,t))}finally{Ms=n,Gi()}},n.hydrate=function(e,t,n){if(!$l(t))throw Error(s(200));return ec(null,e,t,!0,n)},n.render=function(e,t,n){if(!$l(t))throw Error(s(200));return ec(null,e,t,!1,n)},n.unmountComponentAtNode=function(e){if(!$l(e))throw Error(s(40));return!!e._reactRootContainer&&(ml((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[Qr]=null}))})),!0)},n.unstable_batchedUpdates=pl,n.unstable_createPortal=function(e,t){return tc(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},n.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$l(n))throw Error(s(200));if(null==e||void 0===e._reactInternals)throw Error(s(38));return ec(e,t,n,!1,r)},n.version="17.0.2"},function(e,t,n){"use strict";e.exports=n(296)},function(e,t,n){"use strict";var r,i,o,a;if("object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();t.unstable_now=function(){return l.now()-c}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var u=null,h=null,d=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(n){throw setTimeout(d,0),n}};r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(d,0))},i=function(e,t){h=setTimeout(e,t)},o=function(){clearTimeout(h)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var f=window.setTimeout,p=window.clearTimeout;if("undefined"!==typeof console){var m=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof m&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,v=null,y=-1,b=5,w=0;t.unstable_shouldYield=function(){return t.unstable_now()>=w},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,_=x.port2;x.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();w=e+b;try{v(!0,e)?_.postMessage(null):(g=!1,v=null)}catch(n){throw _.postMessage(null),n}}else g=!1},r=function(e){v=e,g||(g=!0,_.postMessage(null))},i=function(e,n){y=f((function(){e(t.unstable_now())}),n)},o=function(){p(y),y=-1}}function E(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,i=e[r];if(!(void 0!==i&&0<M(i,t)))break e;e[r]=t,e[n]=i,n=r}}function A(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length;r<i;){var o=2*(r+1)-1,a=e[o],s=o+1,l=e[s];if(void 0!==a&&0>M(a,n))void 0!==l&&0>M(l,a)?(e[r]=l,e[s]=n,r=s):(e[r]=a,e[o]=n,r=o);else{if(!(void 0!==l&&0>M(l,n)))break e;e[r]=l,e[s]=n,r=s}}}return t}return null}function M(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var T=[],C=[],O=1,R=null,k=3,P=!1,L=!1,D=!1;function I(e){for(var t=A(C);null!==t;){if(null===t.callback)S(C);else{if(!(t.startTime<=e))break;S(C),t.sortIndex=t.expirationTime,E(T,t)}t=A(C)}}function N(e){if(D=!1,I(e),!L)if(null!==A(T))L=!0,r(j);else{var t=A(C);null!==t&&i(N,t.startTime-e)}}function j(e,n){L=!1,D&&(D=!1,o()),P=!0;var r=k;try{for(I(n),R=A(T);null!==R&&(!(R.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=R.callback;if("function"===typeof a){R.callback=null,k=R.priorityLevel;var s=a(R.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?R.callback=s:R===A(T)&&S(T),I(n)}else S(T);R=A(T)}if(null!==R)var l=!0;else{var c=A(C);null!==c&&i(N,c.startTime-n),l=!1}return l}finally{R=null,k=r,P=!1}}var B=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){L||P||(L=!0,r(j))},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_getFirstCallbackNode=function(){return A(T)},t.unstable_next=function(e){switch(k){case 1:case 2:case 3:var t=3;break;default:t=k}var n=k;k=t;try{return e()}finally{k=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=k;k=e;try{return t()}finally{k=n}},t.unstable_scheduleCallback=function(e,n,a){var s=t.unstable_now();switch("object"===typeof a&&null!==a?a="number"===typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:O++,callback:n,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>s?(e.sortIndex=a,E(C,e),null===A(T)&&e===A(C)&&(D?o():D=!0,i(N,a-s))):(e.sortIndex=l,E(T,e),L||P||(L=!0,r(j))),e},t.unstable_wrapCallback=function(e){var t=k;return function(){var n=k;k=t;try{return e.apply(this,arguments)}finally{k=n}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(e.hasOwnProperty(t)){for(var r={},i=e[t],a=(0,o.default)(t),s=Object.keys(n),l=0;l<s.length;l++){var c=s[l];if(c===t)for(var u=0;u<i.length;u++)r[i[u]+a]=n[t];r[c]=n[c]}return r}return n};var r,i=n(180),o=(r=i)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r,i){for(var o=0,a=e.length;o<a;++o){var s=e[o](t,n,r,i);if(s)return s}}},function(e,t,n){"use strict";function r(e,t){-1===e.indexOf(t)&&e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(Array.isArray(t))for(var n=0,i=t.length;n<i;++n)r(e,t[n]);else r(e,t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e instanceof Object&&!Array.isArray(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e)};var r,i=n(160),o=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},,,function(e,t,n){"use strict";var r=n(151),i={};function o(e,t,n,r,i,o,a,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,i,o,a,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}e.exports=function(e,t,n){var a=[],s={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",UNSAFE_componentWillMount:"DEFINE_MANY",UNSAFE_componentWillReceiveProps:"DEFINE_MANY",UNSAFE_componentWillUpdate:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},l={getDerivedStateFromProps:"DEFINE_MANY_MERGED"},c={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)h(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=r({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=r({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=f(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=r({},e.propTypes,t)},statics:function(e,t){!function(e,t){if(!t)return;for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){if(o(!(n in c),'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n),n in e)return o("DEFINE_MANY_MERGED"===(l.hasOwnProperty(n)?l[n]:null),"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=f(e[n],r));e[n]=r}}}(e,t)},autobind:function(){}};function u(e,t){var n=s.hasOwnProperty(t)?s[t]:null;y.hasOwnProperty(t)&&o("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&o("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function h(e,n){if(n){o("function"!==typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),o(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;for(var a in n.hasOwnProperty("mixins")&&c.mixins(e,n.mixins),n)if(n.hasOwnProperty(a)&&"mixins"!==a){var l=n[a],h=r.hasOwnProperty(a);if(u(h,a),c.hasOwnProperty(a))c[a](e,l);else{var d=s.hasOwnProperty(a);if("function"===typeof l&&!d&&!h&&!1!==n.autobind)i.push(a,l),r[a]=l;else if(h){var m=s[a];o(d&&("DEFINE_MANY_MERGED"===m||"DEFINE_MANY"===m),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",m,a),"DEFINE_MANY_MERGED"===m?r[a]=f(r[a],l):"DEFINE_MANY"===m&&(r[a]=p(r[a],l))}else r[a]=l}}}else;}function d(e,t){for(var n in o(e&&t&&"object"===typeof e&&"object"===typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."),t)t.hasOwnProperty(n)&&(o(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function f(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return d(i,n),d(i,r),i}}function p(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function m(e,t){return t.bind(e)}var g={componentDidMount:function(){this.__isMounted=!0}},v={componentWillUnmount:function(){this.__isMounted=!1}},y={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t)},isMounted:function(){return!!this.__isMounted}},b=function(){};return r(b.prototype,e.prototype,y),function(e){var t=function(e,r,a){this.__reactAutoBindPairs.length&&function(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],i=t[n+1];e[r]=m(e,i)}}(this),this.props=e,this.context=r,this.refs=i,this.updater=a||n,this.state=null;var s=this.getInitialState?this.getInitialState():null;o("object"===typeof s&&!Array.isArray(s),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"),this.state=s};for(var r in t.prototype=new b,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],a.forEach(h.bind(null,t)),h(t,g),h(t,e),h(t,v),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),o(t.prototype.render,"createClass(...): Class specification must implement a `render` method."),s)t.prototype[r]||(t.prototype[r]=null);return t}}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";var r=n(307);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(t,n,r){(function(n){t.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return i(t[a][1][e]||e)}),c,c.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){var r=Object.prototype.toString;t.exports=function(e){return e.BYTES_PER_ELEMENT&&"[object ArrayBuffer]"===r.call(e.buffer)||Array.isArray(e)}},{}],2:[function(e,t,n){t.exports=function(e,t){return"number"===typeof e?e:"number"===typeof t?t:0}},{}],3:[function(e,t,n){"use strict";n.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},n.toByteArray=function(e){for(var t,n=c(e),r=n[0],a=n[1],s=new o(function(e,t,n){return 3*(t+n)/4-n}(0,r,a)),l=0,u=a>0?r-4:r,h=0;h<u;h+=4)t=i[e.charCodeAt(h)]<<18|i[e.charCodeAt(h+1)]<<12|i[e.charCodeAt(h+2)]<<6|i[e.charCodeAt(h+3)],s[l++]=t>>16&255,s[l++]=t>>8&255,s[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(h)]<<2|i[e.charCodeAt(h+1)]>>4,s[l++]=255&t),1===a&&(t=i[e.charCodeAt(h)]<<10|i[e.charCodeAt(h+1)]<<4|i[e.charCodeAt(h+2)]>>2,s[l++]=t>>8&255,s[l++]=255&t),s},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(u(e,a,a+16383>s?s:a+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],4:[function(e,t,n){"use strict";t.exports={createLink:function(e,t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("link");for(var i in r.href=e,r.rel="stylesheet",t)if(t.hasOwnProperty(i)){var o=t[i];r.setAttribute("data-"+i,o)}n.appendChild(r)},createStyle:function(e,t){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");for(var i in r.type="text/css",t)if(t.hasOwnProperty(i)){var o=t[i];r.setAttribute("data-"+i,o)}r.sheet?(r.innerHTML=e,r.sheet.cssText=e,n.appendChild(r)):r.styleSheet?(n.appendChild(r),r.styleSheet.cssText=e):(r.appendChild(document.createTextNode(e)),n.appendChild(r))}}},{}],5:[function(e,t,n){var r=e("buffer").Buffer;t.exports=function(e,t){if(r.isBuffer(e)&&r.isBuffer(t)){if("function"===typeof e.equals)return e.equals(t);if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}}},{buffer:6}],6:[function(t,r,i){(function(n,r){"use strict";var o=t("base64-js"),a=t("ieee754"),s=t("isarray");function l(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e,t){if(l()<t)throw new RangeError("Invalid typed array length");return r.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=r.prototype:(null===e&&(e=new r(t)),e.length=t),e}function r(e,t,n){if(!r.TYPED_ARRAY_SUPPORT&&!(this instanceof r))return new r(e,t,n);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return u(this,e,t,n)}function u(e,t,n,i){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,i){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===i?new Uint8Array(t):void 0===i?new Uint8Array(t,n):new Uint8Array(t,n,i),r.TYPED_ARRAY_SUPPORT?(e=t).__proto__=r.prototype:e=f(e,t),e}(e,t,n,i):"string"===typeof t?function(e,t,n){if("string"===typeof n&&""!==n||(n="utf8"),!r.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|m(t,n),o=(e=c(e,i)).write(t,n);return o!==i&&(e=e.slice(0,o)),e}(e,t,n):function(e,t){if(r.isBuffer(t)){var n=0|p(t.length);return 0===(e=c(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||(i=t.length)!==i?c(e,0):f(e,t);if("Buffer"===t.type&&s(t.data))return f(e,t.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(h(t),e=c(e,t<0?0:0|p(t)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=c(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return 0|e}function m(e,t){if(r.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(i)return z(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return M(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,i,o){if(0===e.length)return-1;if("string"===typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof t&&(t=r.from(t,i)),r.isBuffer(t))return 0===t.length?-1:b(e,t,n,i,o);if("number"===typeof t)return t&=255,r.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,i,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var h=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){h=!1;break}if(h)return o}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function x(e,t,n,r){return U(z(t,e.length-n),e,n,r)}function _(e,t,n,r){return U(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function E(e,t,n,r){return _(e,t,n,r)}function A(e,t,n,r){return U(H(t),e,n,r)}function S(e,t,n,r){return U(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function M(e,t,n){return 0===t&&n===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,n))}function T(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128===(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=h}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function R(e,t,n){var r,i=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>i)&&(n=i);for(var o="",a=t;a<n;++a)o+=(r=e[a])<16?"0"+r.toString(16):r.toString(16);return o}function k(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function P(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,i,o,a){if(!r.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,i){return i||N(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,i){return i||N(e,0,n,8),a.write(e,t,n,r,52,8),n+8}i.Buffer=r,i.SlowBuffer=function(e){return+e!=e&&(e=0),r.alloc(+e)},i.INSPECT_MAX_BYTES=50,r.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}(),i.kMaxLength=l(),r.poolSize=8192,r._augment=function(e){return e.__proto__=r.prototype,e},r.from=function(e,t,n){return u(null,e,t,n)},r.TYPED_ARRAY_SUPPORT&&(r.prototype.__proto__=Uint8Array.prototype,r.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&r[Symbol.species]===r&&Object.defineProperty(r,Symbol.species,{value:null,configurable:!0})),r.alloc=function(e,t,n){return function(e,t,n,r){return h(t),t<=0?c(e,t):void 0!==n?"string"===typeof r?c(e,t).fill(n,r):c(e,t).fill(n):c(e,t)}(null,e,t,n)},r.allocUnsafe=function(e){return d(null,e)},r.allocUnsafeSlow=function(e){return d(null,e)},r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==t[o]){n=e[o],i=t[o];break}return n<i?-1:i<n?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!s(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return r.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=r.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!r.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i},r.byteLength=m,r.prototype._isBuffer=!0,r.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)v(this,t,t+1);return this},r.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},r.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},r.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):g.apply(this,arguments)},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=i.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},r.prototype.compare=function(e,t,n,i,o){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),t<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&t>=n)return 0;if(i>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(t>>>=0),l=Math.min(a,s),c=this.slice(i,o),u=e.slice(t,n),h=0;h<l;++h)if(c[h]!==u[h]){a=c[h],s=u[h];break}return a<s?-1:s<a?1:0},r.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},r.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},r.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},r.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return _(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n,i=this.length;if((e=~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),(t=void 0===t?i:~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e),r.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=r.prototype;else{var o=t-e;n=new r(o,void 0);for(var a=0;a<o;++a)n[a]=this[a+e]}return n},r.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},r.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},r.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},r.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},r.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),a.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),a.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),a.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),a.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},r.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var o,a=i-n;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!r.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},r.prototype.fill=function(e,t,n,i){if("string"===typeof e){if("string"===typeof t?(i=t,t=0,n=this.length):"string"===typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!==typeof i)throw new TypeError("encoding must be a string");if("string"===typeof i&&!r.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(a=t;a<n;++a)this[a]=e;else{var s=r.isBuffer(e)?e:z(new r(e,i).toString()),l=s.length;for(a=0;a<n-t;++a)this[a+t]=s[a%l]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function z(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){return o.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(F,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},t("buffer").Buffer)},{"base64-js":3,buffer:6,ieee754:29,isarray:35}],7:[function(t,n,r){!function(){if("undefined"!==typeof window)try{var t=new window.CustomEvent("test",{cancelable:!0});if(t.preventDefault(),!0!==t.defaultPrevented)throw new Error("Could not prevent default")}catch(e){var n=function(e,n){var r,i;return(n=n||{}).bubbles=!!n.bubbles,n.cancelable=!!n.cancelable,(r=document.createEvent("CustomEvent")).initCustomEvent(e,n.bubbles,n.cancelable,n.detail),i=r.preventDefault,r.preventDefault=function(){i.call(this);try{Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})}catch(t){this.defaultPrevented=!0}},r};n.prototype=window.Event.prototype,window.CustomEvent=n}}()},{}],8:[function(t,n,r){function i(){var t;try{t=r.storage.debug}catch(e){}return t}(r=n.exports=t("./debug")).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" "),!t)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var r=0,i=0;return e[0].replace(/%[a-z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))})),e.splice(i,0,n),e},r.save=function(t){try{null==t?r.storage.removeItem("debug"):r.storage.debug=t}catch(e){}},r.load=i,r.useColors=function(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31},r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){return JSON.stringify(e)},r.enable(i())},{"./debug":9}],9:[function(e,t,n){(n=t.exports=function(e){function t(){}function r(){var e=r;null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=i());var t=Array.prototype.slice.call(arguments);t[0]=n.coerce(t[0]),"string"!==typeof t[0]&&(t=["%o"].concat(t));var o=0;t[0]=t[0].replace(/%([a-z%])/g,(function(r,i){if("%%"===r)return r;o++;var a=n.formatters[i];if("function"===typeof a){var s=t[o];r=a.call(e,s),t.splice(o,1),o--}return r})),"function"===typeof n.formatArgs&&(t=n.formatArgs.apply(e,t));var a=r.log||n.log||console.log.bind(console);a.apply(e,t)}t.enabled=!1,r.enabled=!0;var o=n.enabled(e)?r:t;return o.namespace=e,o}).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.names=[],n.skips=[],n.formatters={};var r=0;function i(){return n.colors[r++%n.colors.length]}},{}],10:[function(e,t,n){"use strict";var r=e("is-obj"),i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Sources cannot be null or undefined");return Object(e)}function s(e,t,n){var o=t[n];if(void 0!==o&&null!==o){if(i.call(e,n)&&(void 0===e[n]||null===e[n]))throw new TypeError("Cannot convert undefined or null to object ("+n+")");i.call(e,n)&&r(o)?e[n]=l(Object(e[n]),t[n]):e[n]=o}}function l(e,t){if(e===t)return e;for(var n in t=Object(t))i.call(t,n)&&s(e,t,n);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),a=0;a<r.length;a++)o.call(t,r[a])&&s(e,t,r[a]);return e}t.exports=function(e){e=a(e);for(var t=1;t<arguments.length;t++)l(e,arguments[t]);return e}},{"is-obj":34}],11:[function(t,n,r){"use strict";var i=t("object-keys"),o="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),a=Object.prototype.toString,s=Array.prototype.concat,l=Object.defineProperty,c=l&&function(){var t={};try{for(var n in l(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(e){return!1}}(),u=function(e,t,n,r){var i;(!(t in e)||"function"===typeof(i=r)&&"[object Function]"===a.call(i)&&r())&&(c?l(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},h=function(e,t){var n=arguments.length>2?arguments[2]:{},r=i(t);o&&(r=s.call(r,Object.getOwnPropertySymbols(t)));for(var a=0;a<r.length;a+=1)u(e,r[a],t[r[a]],n[r[a]])};h.supportsDescriptors=!!c,n.exports=h},{"object-keys":41}],12:[function(t,n,r){!function(t,n,r,i){"use strict";function o(e,t){for(var n=0,r=e.length;n<r;n++)m(e[n],t)}function a(e){return function(t){ne(t)&&(m(t,e),o(t.querySelectorAll(F),e))}}function s(e){var t=oe.call(e,"is"),n=e.nodeName.toUpperCase(),r=H.call(j,t?D+t.toUpperCase():L+n);return t&&-1<r&&!l(n,t)?-1:r}function l(e,t){return-1<F.indexOf(e+'[is="'+t+'"]')}function c(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;me&&(!i||i===t)&&t.attributeChangedCallback&&"style"!==r&&e.prevValue!==e.newValue&&t.attributeChangedCallback(r,n===e[T]?null:e.prevValue,n===e[O]?null:e.newValue)}function u(e){var t=a(e);return function(e){g.push(t,e.target)}}function h(e){pe&&(pe=!1,e.currentTarget.removeEventListener(k,h)),o((e.target||n).querySelectorAll(F),e.detail===S?S:A),te&&function(){for(var e,t=0,n=re.length;t<n;t++)e=re[t],z.contains(e)||(n--,re.splice(t--,1),m(e,S))}()}function d(e,t){var n=this;ae.call(n,e,t),v.call(n,{target:n})}function f(e,t){J(e,t),w?w.observe(e,ce):(fe&&(e.setAttribute=d,e[E]=b(e),e.addEventListener(P,v)),e.addEventListener(R,c)),e.createdCallback&&me&&(e.created=!0,e.createdCallback(),e.created=!1)}function p(e){throw new Error("A "+e+" type is already registered")}function m(e,t){var n,r=s(e);-1<r&&(x(e,B[r]),r=0,t!==A||e[A]?t===S&&!e[S]&&(e[A]=!1,e[S]=!0,r=1):(e[S]=!1,e[A]=!0,r=1,te&&H.call(re,e)<0&&re.push(e)),r&&(n=e[t+"Callback"])&&n.call(e))}if(!(i in n)){var g,v,y,b,w,x,_,E="__"+i+(1e5*Math.random()>>0),A="attached",S="detached",M="extends",T="ADDITION",C="MODIFICATION",O="REMOVAL",R="DOMAttrModified",k="DOMContentLoaded",P="DOMSubtreeModified",L="<",D="=",I=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,N=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],j=[],B=[],F="",z=n.documentElement,H=j.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},U=r.prototype,V=U.hasOwnProperty,G=U.isPrototypeOf,W=r.defineProperty,q=r.getOwnPropertyDescriptor,X=r.getOwnPropertyNames,Y=r.getPrototypeOf,K=r.setPrototypeOf,Q=!!r.__proto__,Z=r.create||function e(t){return t?(e.prototype=t,new e):this},J=K||(Q?function(e,t){return e.__proto__=t,e}:X&&q?function(){function e(e,t){for(var n,r=X(t),i=0,o=r.length;i<o;i++)n=r[i],V.call(e,n)||W(e,n,q(t,n))}return function(t,n){do{e(t,n)}while((n=Y(n))&&!G.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),$=t.MutationObserver||t.WebKitMutationObserver,ee=(t.HTMLElement||t.Element||t.Node).prototype,te=!G.call(ee,z),ne=te?function(e){return 1===e.nodeType}:function(e){return G.call(ee,e)},re=te&&[],ie=ee.cloneNode,oe=ee.getAttribute,ae=ee.setAttribute,se=ee.removeAttribute,le=n.createElement,ce=$&&{attributes:!0,characterData:!0,attributeOldValue:!0},ue=$||function(e){fe=!1,z.removeEventListener(R,ue)},he=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,10)},de=!1,fe=!0,pe=!0,me=!0;K||Q?(x=function(e,t){G.call(t,e)||f(e,t)},_=f):_=x=function(e,t){e[E]||(e[E]=r(!0),f(e,t))},te?(fe=!1,function(){var t=q(ee,"addEventListener"),n=t.value,r=function(e){var t=new CustomEvent(R,{bubbles:!0});t.attrName=e,t.prevValue=oe.call(this,e),t.newValue=null,t[O]=t.attrChange=2,se.call(this,e),this.dispatchEvent(t)},i=function(t,n){var r=this.hasAttribute(t),i=r&&oe.call(this,t);e=new CustomEvent(R,{bubbles:!0}),ae.call(this,t,n),e.attrName=t,e.prevValue=r?i:null,e.newValue=n,r?e[C]=e.attrChange=1:e[T]=e.attrChange=0,this.dispatchEvent(e)},o=function(e){var t,n=e.currentTarget,r=n[E],i=e.propertyName;r.hasOwnProperty(i)&&(r=r[i],(t=new CustomEvent(R,{bubbles:!0})).attrName=r.name,t.prevValue=r.value||null,t.newValue=r.value=n[i]||null,null==t.prevValue?t[T]=t.attrChange=0:t[C]=t.attrChange=1,n.dispatchEvent(t))};t.value=function(e,t,a){e===R&&this.attributeChangedCallback&&this.setAttribute!==i&&(this[E]={className:{name:"class",value:this.className}},this.setAttribute=i,this.removeAttribute=r,n.call(this,"propertychange",o)),n.call(this,e,t,a)},W(ee,"addEventListener",t)}()):$||(z.addEventListener(R,ue),z.setAttribute(E,1),z.removeAttribute(E),fe&&(v=function(e){var t,n,r,i=this;if(i===e.target){for(r in t=i[E],i[E]=n=b(i),n){if(!(r in t))return y(0,i,r,t[r],n[r],T);if(n[r]!==t[r])return y(1,i,r,t[r],n[r],C)}for(r in t)if(!(r in n))return y(2,i,r,t[r],n[r],O)}},y=function(e,t,n,r,i,o){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};a[o]=e,c(a)},b=function(e){for(var t,n,r={},i=e.attributes,o=0,a=i.length;o<a;o++)"setAttribute"!==(n=(t=i[o]).name)&&(r[n]=t.value);return r})),n[i]=function(e,t){if(r=e.toUpperCase(),de||(de=!0,$?(w=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new $((function(r){for(var i,o,a,s=0,l=r.length;s<l;s++)"childList"===(i=r[s]).type?(n(i.addedNodes,e),n(i.removedNodes,t)):(o=i.target,me&&o.attributeChangedCallback&&"style"!==i.attributeName&&(a=oe.call(o,i.attributeName))!==i.oldValue&&o.attributeChangedCallback(i.attributeName,i.oldValue,a))}))}(a(A),a(S))).observe(n,{childList:!0,subtree:!0}):(g=[],he((function e(){for(;g.length;)g.shift().call(null,g.shift());he(e)})),n.addEventListener("DOMNodeInserted",u(A)),n.addEventListener("DOMNodeRemoved",u(S))),n.addEventListener(k,h),n.addEventListener("readystatechange",h),n.createElement=function(e,t){var r=le.apply(n,arguments),i=""+e,o=H.call(j,(t?D:L)+(t||i).toUpperCase()),a=-1<o;return t&&(r.setAttribute("is",t=t.toLowerCase()),a&&(a=l(i.toUpperCase(),t))),me=!n.createElement.innerHTMLHelper,a&&_(r,B[o]),r},ee.cloneNode=function(e){var t=ie.call(this,!!e),n=s(t);return-1<n&&_(t,B[n]),e&&function(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],_(t,B[s(t)])}(t.querySelectorAll(F)),t}),-2<H.call(j,D+r)+H.call(j,L+r)&&p(e),!I.test(r)||-1<H.call(N,r))throw new Error("The type "+e+" is invalid");var r,i,c=function(){return f?n.createElement(m,r):n.createElement(m)},d=t||U,f=V.call(d,M),m=f?t[M].toUpperCase():r;return f&&-1<H.call(j,L+m)&&p(m),i=j.push((f?D:L)+r)-1,F=F.concat(F.length?",":"",f?m+'[is="'+e.toLowerCase()+'"]':m),c.prototype=B[i]=V.call(d,"prototype")?d.prototype:Z(ee),o(n.querySelectorAll(F),A),c}}}(window,document,Object,"registerElement")},{}],13:[function(e,t,n){t.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],14:[function(e,t,n){"use strict";var r=Object.getOwnPropertyDescriptor?function(){return Object.getOwnPropertyDescriptor(arguments,"callee").get}():function(){throw new TypeError},i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator,o=Object.getPrototypeOf||function(e){return e.__proto__},a=void 0,s="undefined"===typeof Uint8Array?void 0:o(Uint8Array),l={"$ %Array%":Array,"$ %ArrayBuffer%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer,"$ %ArrayBufferPrototype%":"undefined"===typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"$ %ArrayIteratorPrototype%":i?o([][Symbol.iterator]()):void 0,"$ %ArrayPrototype%":Array.prototype,"$ %ArrayProto_entries%":Array.prototype.entries,"$ %ArrayProto_forEach%":Array.prototype.forEach,"$ %ArrayProto_keys%":Array.prototype.keys,"$ %ArrayProto_values%":Array.prototype.values,"$ %AsyncFromSyncIteratorPrototype%":void 0,"$ %AsyncFunction%":void 0,"$ %AsyncFunctionPrototype%":void 0,"$ %AsyncGenerator%":void 0,"$ %AsyncGeneratorFunction%":void 0,"$ %AsyncGeneratorPrototype%":void 0,"$ %AsyncIteratorPrototype%":a&&i&&Symbol.asyncIterator?a[Symbol.asyncIterator]():void 0,"$ %Atomics%":"undefined"===typeof Atomics?void 0:Atomics,"$ %Boolean%":Boolean,"$ %BooleanPrototype%":Boolean.prototype,"$ %DataView%":"undefined"===typeof DataView?void 0:DataView,"$ %DataViewPrototype%":"undefined"===typeof DataView?void 0:DataView.prototype,"$ %Date%":Date,"$ %DatePrototype%":Date.prototype,"$ %decodeURI%":decodeURI,"$ %decodeURIComponent%":decodeURIComponent,"$ %encodeURI%":encodeURI,"$ %encodeURIComponent%":encodeURIComponent,"$ %Error%":Error,"$ %ErrorPrototype%":Error.prototype,"$ %eval%":eval,"$ %EvalError%":EvalError,"$ %EvalErrorPrototype%":EvalError.prototype,"$ %Float32Array%":"undefined"===typeof Float32Array?void 0:Float32Array,"$ %Float32ArrayPrototype%":"undefined"===typeof Float32Array?void 0:Float32Array.prototype,"$ %Float64Array%":"undefined"===typeof Float64Array?void 0:Float64Array,"$ %Float64ArrayPrototype%":"undefined"===typeof Float64Array?void 0:Float64Array.prototype,"$ %Function%":Function,"$ %FunctionPrototype%":Function.prototype,"$ %Generator%":void 0,"$ %GeneratorFunction%":void 0,"$ %GeneratorPrototype%":void 0,"$ %Int8Array%":"undefined"===typeof Int8Array?void 0:Int8Array,"$ %Int8ArrayPrototype%":"undefined"===typeof Int8Array?void 0:Int8Array.prototype,"$ %Int16Array%":"undefined"===typeof Int16Array?void 0:Int16Array,"$ %Int16ArrayPrototype%":"undefined"===typeof Int16Array?void 0:Int8Array.prototype,"$ %Int32Array%":"undefined"===typeof Int32Array?void 0:Int32Array,"$ %Int32ArrayPrototype%":"undefined"===typeof Int32Array?void 0:Int32Array.prototype,"$ %isFinite%":isFinite,"$ %isNaN%":isNaN,"$ %IteratorPrototype%":i?o(o([][Symbol.iterator]())):void 0,"$ %JSON%":JSON,"$ %JSONParse%":JSON.parse,"$ %Map%":"undefined"===typeof Map?void 0:Map,"$ %MapIteratorPrototype%":"undefined"!==typeof Map&&i?o((new Map)[Symbol.iterator]()):void 0,"$ %MapPrototype%":"undefined"===typeof Map?void 0:Map.prototype,"$ %Math%":Math,"$ %Number%":Number,"$ %NumberPrototype%":Number.prototype,"$ %Object%":Object,"$ %ObjectPrototype%":Object.prototype,"$ %ObjProto_toString%":Object.prototype.toString,"$ %ObjProto_valueOf%":Object.prototype.valueOf,"$ %parseFloat%":parseFloat,"$ %parseInt%":parseInt,"$ %Promise%":"undefined"===typeof Promise?void 0:Promise,"$ %PromisePrototype%":"undefined"===typeof Promise?void 0:Promise.prototype,"$ %PromiseProto_then%":"undefined"===typeof Promise?void 0:Promise.prototype.then,"$ %Promise_all%":"undefined"===typeof Promise?void 0:Promise.all,"$ %Promise_reject%":"undefined"===typeof Promise?void 0:Promise.reject,"$ %Promise_resolve%":"undefined"===typeof Promise?void 0:Promise.resolve,"$ %Proxy%":"undefined"===typeof Proxy?void 0:Proxy,"$ %RangeError%":RangeError,"$ %RangeErrorPrototype%":RangeError.prototype,"$ %ReferenceError%":ReferenceError,"$ %ReferenceErrorPrototype%":ReferenceError.prototype,"$ %Reflect%":"undefined"===typeof Reflect?void 0:Reflect,"$ %RegExp%":RegExp,"$ %RegExpPrototype%":RegExp.prototype,"$ %Set%":"undefined"===typeof Set?void 0:Set,"$ %SetIteratorPrototype%":"undefined"!==typeof Set&&i?o((new Set)[Symbol.iterator]()):void 0,"$ %SetPrototype%":"undefined"===typeof Set?void 0:Set.prototype,"$ %SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"$ %SharedArrayBufferPrototype%":"undefined"===typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"$ %String%":String,"$ %StringIteratorPrototype%":i?o(""[Symbol.iterator]()):void 0,"$ %StringPrototype%":String.prototype,"$ %Symbol%":i?Symbol:void 0,"$ %SymbolPrototype%":i?Symbol.prototype:void 0,"$ %SyntaxError%":SyntaxError,"$ %SyntaxErrorPrototype%":SyntaxError.prototype,"$ %ThrowTypeError%":r,"$ %TypedArray%":s,"$ %TypedArrayPrototype%":s?s.prototype:void 0,"$ %TypeError%":TypeError,"$ %TypeErrorPrototype%":TypeError.prototype,"$ %Uint8Array%":"undefined"===typeof Uint8Array?void 0:Uint8Array,"$ %Uint8ArrayPrototype%":"undefined"===typeof Uint8Array?void 0:Uint8Array.prototype,"$ %Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"$ %Uint8ClampedArrayPrototype%":"undefined"===typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"$ %Uint16Array%":"undefined"===typeof Uint16Array?void 0:Uint16Array,"$ %Uint16ArrayPrototype%":"undefined"===typeof Uint16Array?void 0:Uint16Array.prototype,"$ %Uint32Array%":"undefined"===typeof Uint32Array?void 0:Uint32Array,"$ %Uint32ArrayPrototype%":"undefined"===typeof Uint32Array?void 0:Uint32Array.prototype,"$ %URIError%":URIError,"$ %URIErrorPrototype%":URIError.prototype,"$ %WeakMap%":"undefined"===typeof WeakMap?void 0:WeakMap,"$ %WeakMapPrototype%":"undefined"===typeof WeakMap?void 0:WeakMap.prototype,"$ %WeakSet%":"undefined"===typeof WeakSet?void 0:WeakSet,"$ %WeakSetPrototype%":"undefined"===typeof WeakSet?void 0:WeakSet.prototype};t.exports=function(e,t){if(arguments.length>1&&"boolean"!==typeof t)throw new TypeError('"allowMissing" argument must be a boolean');var n="$ "+e;if(!(n in l))throw new SyntaxError("intrinsic "+e+" does not exist!");if("undefined"===typeof l[n]&&!t)throw new TypeError("intrinsic "+e+" exists, but is not available. Please file an issue!");return l[n]}},{}],15:[function(e,t,n){"use strict";var r=e("./GetIntrinsic"),i=r("%Object%"),o=r("%TypeError%"),a=r("%String%"),s=e("./helpers/assertRecord"),l=e("./helpers/isNaN"),c=e("./helpers/isFinite"),u=e("./helpers/sign"),h=e("./helpers/mod"),d=e("is-callable"),f=e("es-to-primitive/es5"),p=e("has"),m={ToPrimitive:f,ToBoolean:function(e){return!!e},ToNumber:function(e){return+e},ToInteger:function(e){var t=this.ToNumber(e);return l(t)?0:0!==t&&c(t)?u(t)*Math.floor(Math.abs(t)):t},ToInt32:function(e){return this.ToNumber(e)>>0},ToUint32:function(e){return this.ToNumber(e)>>>0},ToUint16:function(e){var t=this.ToNumber(e);if(l(t)||0===t||!c(t))return 0;var n=u(t)*Math.floor(Math.abs(t));return h(n,65536)},ToString:function(e){return a(e)},ToObject:function(e){return this.CheckObjectCoercible(e),i(e)},CheckObjectCoercible:function(e,t){if(null==e)throw new o(t||"Cannot call method on "+e);return e},IsCallable:d,SameValue:function(e,t){return e===t?0!==e||1/e===1/t:l(e)&&l(t)},Type:function(e){return null===e?"Null":"undefined"===typeof e?"Undefined":"function"===typeof e||"object"===typeof e?"Object":"number"===typeof e?"Number":"boolean"===typeof e?"Boolean":"string"===typeof e?"String":void 0},IsPropertyDescriptor:function(e){if("Object"!==this.Type(e))return!1;var t={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(p(e,n)&&!t[n])return!1;var r=p(e,"[[Value]]"),i=p(e,"[[Get]]")||p(e,"[[Set]]");if(r&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!(!p(e,"[[Get]]")&&!p(e,"[[Set]]")))},IsDataDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!(!p(e,"[[Value]]")&&!p(e,"[[Writable]]")))},IsGenericDescriptor:function(e){return"undefined"!==typeof e&&(s(this,"Property Descriptor","Desc",e),!this.IsAccessorDescriptor(e)&&!this.IsDataDescriptor(e))},FromPropertyDescriptor:function(e){if("undefined"===typeof e)return e;if(s(this,"Property Descriptor","Desc",e),this.IsDataDescriptor(e))return{value:e["[[Value]]"],writable:!!e["[[Writable]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};if(this.IsAccessorDescriptor(e))return{get:e["[[Get]]"],set:e["[[Set]]"],enumerable:!!e["[[Enumerable]]"],configurable:!!e["[[Configurable]]"]};throw new o("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(e){if("Object"!==this.Type(e))throw new o("ToPropertyDescriptor requires an object");var t={};if(p(e,"enumerable")&&(t["[[Enumerable]]"]=this.ToBoolean(e.enumerable)),p(e,"configurable")&&(t["[[Configurable]]"]=this.ToBoolean(e.configurable)),p(e,"value")&&(t["[[Value]]"]=e.value),p(e,"writable")&&(t["[[Writable]]"]=this.ToBoolean(e.writable)),p(e,"get")){var n=e.get;if("undefined"!==typeof n&&!this.IsCallable(n))throw new TypeError("getter must be a function");t["[[Get]]"]=n}if(p(e,"set")){var r=e.set;if("undefined"!==typeof r&&!this.IsCallable(r))throw new o("setter must be a function");t["[[Set]]"]=r}if((p(t,"[[Get]]")||p(t,"[[Set]]"))&&(p(t,"[[Value]]")||p(t,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}};t.exports=m},{"./GetIntrinsic":14,"./helpers/assertRecord":16,"./helpers/isFinite":17,"./helpers/isNaN":18,"./helpers/mod":19,"./helpers/sign":20,"es-to-primitive/es5":21,has:28,"is-callable":32}],16:[function(e,t,n){"use strict";var r=e("../GetIntrinsic"),i=r("%TypeError%"),o=r("%SyntaxError%"),a=e("has"),s={"Property Descriptor":function(e,t){if("Object"!==e.Type(t))return!1;var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(a(t,r)&&!n[r])return!1;var o=a(t,"[[Value]]"),s=a(t,"[[Get]]")||a(t,"[[Set]]");if(o&&s)throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}};t.exports=function(e,t,n,r){var a=s[t];if("function"!==typeof a)throw new o("unknown record type: "+t);if(!a(e,r))throw new i(n+" must be a "+t);console.log(a(e,r),r)}},{"../GetIntrinsic":14,has:28}],17:[function(e,t,n){var r=Number.isNaN||function(e){return e!==e};t.exports=Number.isFinite||function(e){return"number"===typeof e&&!r(e)&&e!==1/0&&e!==-1/0}},{}],18:[function(e,t,n){t.exports=Number.isNaN||function(e){return e!==e}},{}],19:[function(e,t,n){t.exports=function(e,t){var n=e%t;return Math.floor(n>=0?n:n+t)}},{}],20:[function(e,t,n){t.exports=function(e){return e>=0?1:-1}},{}],21:[function(e,t,n){"use strict";var r=Object.prototype.toString,i=e("./helpers/isPrimitive"),o=e("is-callable"),a=function(e){var t;if((t=arguments.length>1?arguments[1]:"[object Date]"===r.call(e)?String:Number)===String||t===Number){var n,a,s=t===String?["toString","valueOf"]:["valueOf","toString"];for(a=0;a<s.length;++a)if(o(e[s[a]])&&(n=e[s[a]](),i(n)))return n;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")};t.exports=function(e){return i(e)?e:arguments.length>1?a(e,arguments[1]):a(e)}},{"./helpers/isPrimitive":22,"is-callable":32}],22:[function(e,t,n){t.exports=function(e){return null===e||"function"!==typeof e&&"object"!==typeof e}},{}],23:[function(e,t,n){var r=e("dtype");t.exports=function(e,t,n){if(!e)throw new TypeError("must specify data as first parameter");if(n=0|+(n||0),Array.isArray(e)&&e[0]&&"number"===typeof e[0][0]){var i,o,a,s,l=e[0].length,c=e.length*l;t&&"string"!==typeof t||(t=new(r(t||"float32"))(c+n));var u=t.length-n;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(i=0,a=n;i<e.length;i++)for(o=0;o<l;o++)t[a++]=null===e[i][o]?NaN:e[i][o]}else if(t&&"string"!==typeof t)t.set(e,n);else{var h=r(t||"float32");if(Array.isArray(e)||"array"===t)for(t=new h(e.length+n),i=0,a=n,s=t.length;a<s;a++,i++)t[a]=null===e[i]?NaN:e[i];else 0===n?t=new h(e):(t=new h(e.length+n)).set(e,n)}return t}},{dtype:13}],24:[function(e,t,n){"use strict";var r=e("is-callable"),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,i=e.length;r<i;r++)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},s=function(e,t,n){for(var r=0,i=e.length;r<i;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},l=function(e,t,n){for(var r in e)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};t.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=n),"[object Array]"===i.call(e)?a(e,t,o):"string"===typeof e?s(e,t,o):l(e,t,o)}},{"is-callable":32}],25:[function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Array.prototype.slice,o=Object.prototype.toString;t.exports=function(e){var t=this;if("function"!==typeof t||"[object Function]"!==o.call(t))throw new TypeError(r+t);for(var n,a=i.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,a.concat(i.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(i.call(arguments)))},l=Math.max(0,t.length-a.length),c=[],u=0;u<l;u++)c.push("$"+u);if(n=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var h=function(){};h.prototype=t.prototype,n.prototype=new h,h.prototype=null}return n}},{}],26:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=Function.prototype.bind||r},{"./implementation":25}],27:[function(e,t,r){(function(e){var n;n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},t.exports=n}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],28:[function(e,t,n){"use strict";var r=e("function-bind");t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":26}],29:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,h=n?i-1:0,d=n?-1:1,f=e[t+h];for(h+=d,o=f&(1<<-u)-1,f>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=c}return(f?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,h=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+f]=255&a,f+=p,a/=256,c-=8);e[n+f-p]|=128*m}},{}],30:[function(e,t,n){"function"===typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},{}],31:[function(e,t,n){function r(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],32:[function(t,n,r){"use strict";var i=Function.prototype.toString,o=/^\s*class\b/,a=function(t){try{var n=i.call(t);return o.test(n)}catch(e){return!1}},s=Object.prototype.toString,l="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag;n.exports=function(t){if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;if("function"===typeof t&&!t.prototype)return!0;if(l)return function(t){try{return!a(t)&&(i.call(t),!0)}catch(e){return!1}}(t);if(a(t))return!1;var n=s.call(t);return"[object Function]"===n||"[object GeneratorFunction]"===n}},{}],33:[function(e,t,n){t.exports=function(e){var t=r.call(e);return"[object Function]"===t||"function"===typeof e&&"[object RegExp]"!==t||"undefined"!==typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)};var r=Object.prototype.toString},{}],34:[function(e,t,n){"use strict";t.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}},{}],35:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],36:[function(e,t,n){var r=e("word-wrapper"),i=e("xtend"),o=e("as-number"),a=["x","e","a","o","n","s","r","c","u","m","v","w","z"],s=["m","w"],l=["H","I","N","E","F","K","L","T","U","V","W","X","Y","Z"],c="\t".charCodeAt(0),u=" ".charCodeAt(0);function h(e){this.glyphs=[],this._measure=this.computeMetrics.bind(this),this.update(e)}function d(e){return new Function(["return function "+e+"() {"," return this._"+e,"}"].join("\n"))()}function f(e,t){if(!e.chars||0===e.chars.length)return null;var n=m(e.chars,t);return n>=0?e.chars[n]:null}function p(e,t,n){if(!e.kernings||0===e.kernings.length)return 0;for(var r=e.kernings,i=0;i<r.length;i++){var o=r[i];if(o.first===t&&o.second===n)return o.amount}return 0}function m(e,t,n){for(var r=n=n||0;r<e.length;r++)if(e[r].id===t)return r;return-1}t.exports=function(e){return new h(e)},h.prototype.update=function(e){if(e=i({measure:this._measure},e),this._opt=e,this._opt.tabSize=o(this._opt.tabSize,4),!e.font)throw new Error("must provide a valid bitmap font");var t=this.glyphs,n=e.text||"",s=e.font;this._setupSpaceGlyphs(s);var c=r.lines(n,e),u=e.width||0;t.length=0;var h=c.reduce((function(e,t){return Math.max(e,t.width,u)}),0),d=0,f=0,g=o(e.lineHeight,s.common.lineHeight),v=s.common.base,y=g-v,b=e.letterSpacing||0,w=g*c.length-y,x=function(e){return"center"===e?1:"right"===e?2:0}(this._opt.align);f-=w,this._width=h,this._height=w,this._descender=g-v,this._baseline=v,this._xHeight=function(e){for(var t=0;t<a.length;t++){var n=a[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r].height}return 0}(s),this._capHeight=function(e){for(var t=0;t<l.length;t++){var n=l[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r].height}return 0}(s),this._lineHeight=g,this._ascender=g-y-this._xHeight;var _=this;c.forEach((function(e,r){for(var i,o=e.start,a=e.end,l=e.width,c=o;c<a;c++){var u=n.charCodeAt(c),m=_.getGlyph(s,u);if(m){i&&(d+=p(s,i.id,m.id));var v=d;1===x?v+=(h-l)/2:2===x&&(v+=h-l),t.push({position:[v,f],data:m,index:c,line:r}),d+=m.xadvance+b,i=m}}f+=g,d=0})),this._linesTotal=c.length},h.prototype._setupSpaceGlyphs=function(e){if(this._fallbackSpaceGlyph=null,this._fallbackTabGlyph=null,e.chars&&0!==e.chars.length){var t=f(e,u)||function(e){for(var t=0;t<s.length;t++){var n=s[t].charCodeAt(0),r=m(e.chars,n);if(r>=0)return e.chars[r]}return 0}(e)||e.chars[0],n=this._opt.tabSize*t.xadvance;this._fallbackSpaceGlyph=t,this._fallbackTabGlyph=i(t,{x:0,y:0,xadvance:n,id:c,xoffset:0,yoffset:0,width:0,height:0})}},h.prototype.getGlyph=function(e,t){var n=f(e,t);return n||(t===c?this._fallbackTabGlyph:t===u?this._fallbackSpaceGlyph:null)},h.prototype.computeMetrics=function(e,t,n,r){var i,o=this._opt.letterSpacing||0,a=this._opt.font,s=0,l=0,c=0;if(!a.chars||0===a.chars.length)return{start:t,end:t,width:0};n=Math.min(e.length,n);for(var u=t;u<n;u++){var h,d=e.charCodeAt(u);if(h=this.getGlyph(a,d)){h.xoffset;var f=(s+=i?p(a,i.id,h.id):0)+h.xadvance+o,m=s+h.width;if(m>=r||f>=r)break;s=f,l=m,i=h}c++}return i&&(l+=i.xoffset),{start:t,end:t+c,width:l}},["width","height","descender","ascender","xHeight","baseline","capHeight","lineHeight"].forEach((function(e){Object.defineProperty(h.prototype,e,{get:d(e),configurable:!0})}))},{"as-number":2,"word-wrapper":69,xtend:72}],37:[function(t,n,r){(function(r){var i=t("xhr"),o=function(){},a=t("parse-bmfont-ascii"),s=t("parse-bmfont-xml"),l=t("parse-bmfont-binary"),c=t("./lib/is-binary"),u=t("xtend"),h=self.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest;n.exports=function(t,n){n="function"===typeof n?n:o,"string"===typeof t?t={uri:t}:t||(t={}),t.binary&&(t=function(e){if(h)return u(e,{responseType:"arraybuffer"});if("undefined"===typeof self.XMLHttpRequest)throw new Error("your browser does not support XHR loading");var t=new self.XMLHttpRequest;return t.overrideMimeType("text/plain; charset=x-user-defined"),u({xhr:t},e)}(t)),i(t,(function(i,u,h){if(i)return n(i);if(!/^2/.test(u.statusCode))return n(new Error("http status code: "+u.statusCode));if(!h)return n(new Error("no body result"));var d,f,p=!1;if(d=h,"[object ArrayBuffer]"===Object.prototype.toString.call(d)){var m=new Uint8Array(h);h=new r(m,"binary")}c(h)&&(p=!0,"string"===typeof h&&(h=new r(h,"binary"))),p||(r.isBuffer(h)&&(h=h.toString(t.encoding)),h=h.trim());try{var g=u.headers["content-type"];f=p?l(h):/json/.test(g)||"{"===h.charAt(0)?JSON.parse(h):/xml/.test(g)||"<"===h.charAt(0)?s(h):a(h)}catch(e){n(new Error("error parsing font "+e.message)),n=o}n(null,f)}))}}).call(this,t("buffer").Buffer)},{"./lib/is-binary":38,buffer:6,"parse-bmfont-ascii":43,"parse-bmfont-binary":44,"parse-bmfont-xml":45,xhr:70,xtend:72}],38:[function(e,t,n){(function(n){var r=e("buffer-equal"),i=new n([66,77,70,3]);t.exports=function(e){return"string"===typeof e?"BMF"===e.substring(0,3):e.length>4&&r(e.slice(0,4),i)}}).call(this,e("buffer").Buffer)},{buffer:6,"buffer-equal":5}],39:[function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),c=1;c<arguments.length;c++){for(var u in n=Object(arguments[c]))i.call(n,u)&&(l[u]=n[u]);if(r){s=r(n);for(var h=0;h<s.length;h++)o.call(n,s[h])&&(l[s[h]]=n[s[h]])}}return l}},{}],40:[function(t,n,r){"use strict";var i;if(!Object.keys){var o=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=t("./isArguments"),l=Object.prototype.propertyIsEnumerable,c=!l.call({toString:null},"toString"),u=l.call((function(){}),"prototype"),h=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"===typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"===typeof window[t])try{d(window[t])}catch(e){return!0}}catch(e){return!0}return!1}();i=function(t){var n=null!==t&&"object"===typeof t,r="[object Function]"===a.call(t),i=s(t),l=n&&"[object String]"===a.call(t),f=[];if(!n&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var m=u&&r;if(l&&t.length>0&&!o.call(t,0))for(var g=0;g<t.length;++g)f.push(String(g));if(i&&t.length>0)for(var v=0;v<t.length;++v)f.push(String(v));else for(var y in t)m&&"prototype"===y||!o.call(t,y)||f.push(String(y));if(c)for(var b=function(t){if("undefined"===typeof window||!p)return d(t);try{return d(t)}catch(e){return!1}}(t),w=0;w<h.length;++w)b&&"constructor"===h[w]||!o.call(t,h[w])||f.push(h[w]);return f}}n.exports=i},{"./isArguments":42}],41:[function(e,t,n){"use strict";var r=Array.prototype.slice,i=e("./isArguments"),o=Object.keys,a=o?function(e){return o(e)}:e("./implementation"),s=Object.keys;a.shim=function(){return Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(r.call(e)):s(e)}):Object.keys=a,Object.keys||a},t.exports=a},{"./implementation":40,"./isArguments":42}],42:[function(e,t,n){"use strict";var r=Object.prototype.toString;t.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},{}],43:[function(e,t,n){function r(e,t){if(!(e=e.replace(/\t+/g," ").trim()))return null;var n=e.indexOf(" ");if(-1===n)throw new Error("no named row at line "+t);var r=e.substring(0,n);e=(e=(e=(e=e.substring(n+1)).replace(/letter=[\'\"]\S+[\'\"]/gi,"")).split("=")).map((function(e){return e.trim().match(/(".*?"|[^"\s]+)+(?=\s*|\s*$)/g)}));for(var o=[],a=0;a<e.length;a++){var s=e[a];0===a?o.push({key:s[0],data:""}):a===e.length-1?o[o.length-1].data=i(s[0]):(o[o.length-1].data=i(s[0]),o.push({key:s[1],data:""}))}var l={key:r,data:{}};return o.forEach((function(e){l.data[e.key]=e.data})),l}function i(e){return e&&0!==e.length?0===e.indexOf('"')||0===e.indexOf("'")?e.substring(1,e.length-1):-1!==e.indexOf(",")?function(e){return e.split(",").map((function(e){return parseInt(e,10)}))}(e):parseInt(e,10):""}t.exports=function(e){if(!e)throw new Error("no data provided");var t={pages:[],chars:[],kernings:[]},n=(e=e.toString().trim()).split(/\r\n?|\n/g);if(0===n.length)throw new Error("no data in BMFont file");for(var i=0;i<n.length;i++){var o=r(n[i],i);if(o)if("page"===o.key){if("number"!==typeof o.data.id)throw new Error("malformed file at line "+i+" -- needs page id=N");if("string"!==typeof o.data.file)throw new Error("malformed file at line "+i+' -- needs page file="path"');t.pages[o.data.id]=o.data.file}else"chars"===o.key||"kernings"===o.key||("char"===o.key?t.chars.push(o.data):"kerning"===o.key?t.kernings.push(o.data):t[o.key]=o.data)}return t}},{}],44:[function(e,t,n){var r=[66,77,70];function i(e,t,n){if(n>t.length-1)return 0;var r=t.readUInt8(n++),i=t.readInt32LE(n);switch(n+=4,r){case 1:e.info=function(e,t){var n={};n.size=e.readInt16LE(t);var r=e.readUInt8(t+2);return n.smooth=r>>7&1,n.unicode=r>>6&1,n.italic=r>>5&1,n.bold=r>>4&1,r>>3&1&&(n.fixedHeight=1),n.charset=e.readUInt8(t+3)||"",n.stretchH=e.readUInt16LE(t+4),n.aa=e.readUInt8(t+6),n.padding=[e.readInt8(t+7),e.readInt8(t+8),e.readInt8(t+9),e.readInt8(t+10)],n.spacing=[e.readInt8(t+11),e.readInt8(t+12)],n.outline=e.readUInt8(t+13),n.face=function(e,t){return o(e,t).toString("utf8")}(e,t+14),n}(t,n);break;case 2:e.common=function(e,t){var n={};return n.lineHeight=e.readUInt16LE(t),n.base=e.readUInt16LE(t+2),n.scaleW=e.readUInt16LE(t+4),n.scaleH=e.readUInt16LE(t+6),n.pages=e.readUInt16LE(t+8),e.readUInt8(t+10),n.packed=0,n.alphaChnl=e.readUInt8(t+11),n.redChnl=e.readUInt8(t+12),n.greenChnl=e.readUInt8(t+13),n.blueChnl=e.readUInt8(t+14),n}(t,n);break;case 3:e.pages=function(e,t,n){for(var r=[],i=o(e,t),a=i.length+1,s=n/a,l=0;l<s;l++)r[l]=e.slice(t,t+i.length).toString("utf8"),t+=a;return r}(t,n,i);break;case 4:e.chars=function(e,t,n){for(var r=[],i=n/20,o=0;o<i;o++){var a={},s=20*o;a.id=e.readUInt32LE(t+0+s),a.x=e.readUInt16LE(t+4+s),a.y=e.readUInt16LE(t+6+s),a.width=e.readUInt16LE(t+8+s),a.height=e.readUInt16LE(t+10+s),a.xoffset=e.readInt16LE(t+12+s),a.yoffset=e.readInt16LE(t+14+s),a.xadvance=e.readInt16LE(t+16+s),a.page=e.readUInt8(t+18+s),a.chnl=e.readUInt8(t+19+s),r[o]=a}return r}(t,n,i);break;case 5:e.kernings=function(e,t,n){for(var r=[],i=n/10,o=0;o<i;o++){var a={},s=10*o;a.first=e.readUInt32LE(t+0+s),a.second=e.readUInt32LE(t+4+s),a.amount=e.readInt16LE(t+8+s),r[o]=a}return r}(t,n,i)}return 5+i}function o(e,t){for(var n=t;n<e.length&&0!==e[n];n++);return e.slice(t,n)}t.exports=function(e){if(e.length<6)throw new Error("invalid buffer length for BMFont");if(!r.every((function(t,n){return e.readUInt8(n)===t})))throw new Error("BMFont missing BMF byte header");var t=3;if(e.readUInt8(t++)>3)throw new Error("Only supports BMFont Binary v3 (BMFont App v1.10)");for(var n={kernings:[],chars:[]},o=0;o<5;o++)t+=i(n,e,t);return n}},{}],45:[function(e,t,n){var r=e("./parse-attribs"),i=e("xml-parse-from-string"),o={scaleh:"scaleH",scalew:"scaleW",stretchh:"stretchH",lineheight:"lineHeight",alphachnl:"alphaChnl",redchnl:"redChnl",greenchnl:"greenChnl",bluechnl:"blueChnl"};function a(e){return function(e){for(var t=[],n=0;n<e.attributes.length;n++)t.push(e.attributes[n]);return t}(e).reduce((function(e,t){var n;return e[(n=t.nodeName,o[n.toLowerCase()]||n)]=t.nodeValue,e}),{})}t.exports=function(e){e=e.toString();var t=i(e),n={pages:[],chars:[],kernings:[]};["info","common"].forEach((function(e){var i=t.getElementsByTagName(e)[0];i&&(n[e]=r(a(i)))}));var o=t.getElementsByTagName("pages")[0];if(!o)throw new Error("malformed file -- no <pages> element");for(var s=o.getElementsByTagName("page"),l=0;l<s.length;l++){var c=s[l],u=parseInt(c.getAttribute("id"),10),h=c.getAttribute("file");if(isNaN(u))throw new Error('malformed file -- page "id" attribute is NaN');if(!h)throw new Error('malformed file -- needs page "file" attribute');n.pages[parseInt(u,10)]=h}return["chars","kernings"].forEach((function(e){var i=t.getElementsByTagName(e)[0];if(i)for(var o=e.substring(0,e.length-1),s=i.getElementsByTagName(o),l=0;l<s.length;l++){var c=s[l];n[e].push(r(a(c)))}})),n}},{"./parse-attribs":46,"xml-parse-from-string":71}],46:[function(e,t,n){t.exports=function(e){for(var t in"chasrset"in e&&(e.charset=e.chasrset,delete e.chasrset),e)"face"!==t&&"charset"!==t&&(e[t]="padding"===t||"spacing"===t?e[t].split(",").map((function(e){return parseInt(e,10)})):parseInt(e[t],10));return e}},{}],47:[function(e,t,n){var r=e("string.prototype.trim"),i=e("for-each");t.exports=function(e){if(!e)return{};var t={};return i(r(e).split("\n"),(function(e){var n,i=e.indexOf(":"),o=r(e.slice(0,i)).toLowerCase(),a=r(e.slice(i+1));"undefined"===typeof t[o]?t[o]=a:(n=t[o],"[object Array]"===Object.prototype.toString.call(n)?t[o].push(a):t[o]=[t[o],a])})),t}},{"for-each":24,"string.prototype.trim":53}],48:[function(e,t,r){(function(e){var n=e.performance||{},r=function(){for(var e=["now","webkitNow","msNow","mozNow","oNow"];e.length;){var t=e.shift();if(t in n)return n[t].bind(n)}var r=Date.now||function(){return(new Date).getTime()},i=(n.timing||{}).navigationStart||r();return function(){return r()-i}}();r.performanceNow=n.now,r.noConflict=function(){n.now=r.performanceNow},r.conflict=function(){n.now=r},r.conflict(),t.exports=r}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],49:[function(t,n,r){var i,o,a=n.exports={};function s(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function c(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"===typeof setTimeout?setTimeout:s}catch(e){i=s}try{o="function"===typeof clearTimeout?clearTimeout:l}catch(e){o=l}}();var u,h=[],d=!1,f=-1;function p(){d&&u&&(d=!1,u.length?h=u.concat(h):f=-1,h.length&&m())}function m(){if(!d){var t=c(p);d=!0;for(var n=h.length;n;){for(u=h,h=[];++f<n;)u&&u[f].run();f=-1,n=h.length}u=null,d=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===l||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function g(e,t){this.fun=e,this.array=t}function v(){}a.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];h.push(new g(e,t)),1!==h.length||d||c(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],50:[function(t,n,r){(function(t){!function(r){var i=setTimeout,o="function"===typeof t&&t||function(e){i(e,1)};function a(e,t){return function(){e.apply(t,arguments)}}var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function l(e){if("object"!==typeof this)throw new TypeError("Promises must be constructed via new");if("function"!==typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],p(e,a(u,this),a(h,this))}function c(t){var n=this;null!==this._state?o((function(){var r=n._state?t.onFulfilled:t.onRejected;if(null!==r){var i;try{i=r(n._value)}catch(e){return void t.reject(e)}t.resolve(i)}else(n._state?t.resolve:t.reject)(n._value)})):this._deferreds.push(t)}function u(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"===typeof t||"function"===typeof t)){var n=t.then;if("function"===typeof n)return void p(a(n,t),a(u,this),a(h,this))}this._state=!0,this._value=t,d.call(this)}catch(e){h.call(this,e)}}function h(e){this._state=!1,this._value=e,d.call(this)}function d(){for(var e=0,t=this._deferreds.length;e<t;e++)c.call(this,this._deferreds[e]);this._deferreds=null}function f(e,t,n,r){this.onFulfilled="function"===typeof e?e:null,this.onRejected="function"===typeof t?t:null,this.resolve=n,this.reject=r}function p(e,t,n){var r=!1;try{e((function(e){r||(r=!0,t(e))}),(function(e){r||(r=!0,n(e))}))}catch(i){if(r)return;r=!0,n(i)}}l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){var n=this;return new l((function(r,i){c.call(n,new f(e,t,r,i))}))},l.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&s(arguments[0])?arguments[0]:arguments);return new l((function(t,n){if(0===e.length)return t([]);var r=e.length;function i(o,a){try{if(a&&("object"===typeof a||"function"===typeof a)){var s=a.then;if("function"===typeof s)return void s.call(a,(function(e){i(o,e)}),n)}e[o]=a,0===--r&&t(e)}catch(l){n(l)}}for(var o=0;o<e.length;o++)i(o,e[o])}))},l.resolve=function(e){return e&&"object"===typeof e&&e.constructor===l?e:new l((function(t){t(e)}))},l.reject=function(e){return new l((function(t,n){n(e)}))},l.race=function(e){return new l((function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)}))},l._setImmediateFn=function(e){o=e},"undefined"!==typeof n&&n.exports?n.exports=l:r.Promise||(r.Promise=l)}(this)}).call(this,t("timers").setImmediate)},{timers:67}],51:[function(e,t,n){var r=e("dtype"),i=e("an-array"),o=e("is-buffer"),a=[0,2,3],s=[2,1,3];t.exports=function(e,t){e&&(i(e)||o(e))||(t=e||{},e=null);for(var n="string"===typeof(t="number"===typeof t?{count:t}:t||{}).type?t.type:"uint16",l="number"===typeof t.count?t.count:1,c=t.start||0,u=!1!==t.clockwise?a:s,h=u[0],d=u[1],f=u[2],p=6*l,m=e||new(r(n))(p),g=0,v=0;g<p;g+=6,v+=4){var y=g+c;m[y+0]=v+0,m[y+1]=v+1,m[y+2]=v+2,m[y+3]=v+h,m[y+4]=v+d,m[y+5]=v+f}return m}},{"an-array":1,dtype:13,"is-buffer":31}],52:[function(e,t,n){"use strict";var r=e("function-bind"),i=e("es-abstract/es5"),o=r.call(Function.call,String.prototype.replace),a=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,s=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var e=i.ToString(i.CheckObjectCoercible(this));return o(o(e,a,""),s,"")}},{"es-abstract/es5":15,"function-bind":26}],53:[function(e,t,n){"use strict";var r=e("function-bind"),i=e("define-properties"),o=e("./implementation"),a=e("./polyfill"),s=e("./shim"),l=r.call(Function.call,a());i(l,{getPolyfill:a,implementation:o,shim:s}),t.exports=l},{"./implementation":52,"./polyfill":54,"./shim":55,"define-properties":11,"function-bind":26}],54:[function(e,t,n){"use strict";var r=e("./implementation");t.exports=function(){return String.prototype.trim&&"\u200b"==="\u200b".trim()?String.prototype.trim:r}},{"./implementation":52}],55:[function(e,t,n){"use strict";var r=e("define-properties"),i=e("./polyfill");t.exports=function(){var e=i();return r(String.prototype,{trim:e},{trim:function(){return String.prototype.trim!==e}}),e}},{"./polyfill":54,"define-properties":11}],56:[function(t,n,r){"use strict";var i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},o={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},a=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],s={CSS:{},springs:{}};function l(e,t,n){return Math.min(Math.max(e,t),n)}function c(e,t){return e.indexOf(t)>-1}function u(e,t){return e.apply(null,t)}var h=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,d=/^rgb/,f=/^hsl/,p={arr:function(e){return Array.isArray(e)},obj:function(e){return c(Object.prototype.toString.call(e),"Object")},pth:function(e){return p.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||p.svg(e)},str:function(e){return"string"===typeof e},fnc:function(e){return"function"===typeof e},und:function(e){return"undefined"===typeof e},hex:function(e){return h.test(e)},rgb:function(e){return d.test(e)},hsl:function(e){return f.test(e)},col:function(e){return p.hex(e)||p.rgb(e)||p.hsl(e)},key:function(e){return!i.hasOwnProperty(e)&&!o.hasOwnProperty(e)&&"targets"!==e&&"keyframes"!==e}},m=/\(([^)]+)\)/;function g(e){var t=m.exec(e);return t?t[1].split(",").map((function(e){return parseFloat(e)})):[]}function v(e,t){var n=g(e),r=l(p.und(n[0])?1:n[0],.1,100),i=l(p.und(n[1])?100:n[1],.1,100),o=l(p.und(n[2])?10:n[2],.1,100),a=l(p.und(n[3])?0:n[3],.1,100),c=Math.sqrt(i/r),u=o/(2*Math.sqrt(i*r)),h=u<1?c*Math.sqrt(1-u*u):0,d=u<1?(u*c-a)/h:-a+c;function f(e){var n=t?t*e/1e3:e;return n=u<1?Math.exp(-n*u*c)*(1*Math.cos(h*n)+d*Math.sin(h*n)):(1+d*n)*Math.exp(-n*c),0===e||1===e?e:1-n}return t?f:function(){var t=s.springs[e];if(t)return t;for(var n=0,r=0;;)if(1===f(n+=1/6)){if(++r>=16)break}else r=0;var i=n*(1/6)*1e3;return s.springs[e]=i,i}}function y(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var n=l(e,1,10),r=l(t,.1,2);return function(e){return 0===e||1===e?e:-n*Math.pow(2,10*(e-1))*Math.sin((e-1-r/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/r)}}function b(e){return void 0===e&&(e=10),function(t){return Math.round(t*e)*(1/e)}}var w=function(){function e(e,t){return 1-3*t+3*e}function t(e,t){return 3*t-6*e}function n(e){return 3*e}function r(r,i,o){return((e(i,o)*r+t(i,o))*r+n(i))*r}function i(r,i,o){return 3*e(i,o)*r*r+2*t(i,o)*r+n(i)}return function(e,t,n,o){if(0<=e&&e<=1&&0<=n&&n<=1){var a=new Float32Array(11);if(e!==t||n!==o)for(var s=0;s<11;++s)a[s]=r(.1*s,e,n);return function(i){return e===t&&n===o||0===i||1===i?i:r(l(i),t,o)}}function l(t){for(var o=0,s=1;10!==s&&a[s]<=t;++s)o+=.1;--s;var l=o+(t-a[s])/(a[s+1]-a[s])*.1,c=i(l,e,n);return c>=.001?function(e,t,n,o){for(var a=0;a<4;++a){var s=i(t,n,o);if(0===s)return t;t-=(r(t,n,o)-e)/s}return t}(t,l,e,n):0===c?l:function(e,t,n,i,o){var a,s,l=0;do{(a=r(s=t+(n-t)/2,i,o)-e)>0?n=s:t=s}while(Math.abs(a)>1e-7&&++l<10);return s}(t,o,o+.1,e,n)}}}(),x=function(){var e=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"],t={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],y],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,t){return function(n){return 1-y(e,t)(1-n)}}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,t){return function(n){return n<.5?y(e,t)(2*n)/2:1-y(e,t)(-2*n+2)/2}}]},n={linear:[.25,.25,.75,.75]};for(var r in t)for(var i=0,o=t[r].length;i<o;i++)n["ease"+r+e[i]]=t[r][i];return n}();function _(e,t){if(p.fnc(e))return e;var n=e.split("(")[0],r=x[n],i=g(e);switch(n){case"spring":return v(e,t);case"cubicBezier":return u(w,i);case"steps":return u(b,i);default:return p.fnc(r)?u(r,i):u(w,r)}}function E(t){try{return document.querySelectorAll(t)}catch(e){return}}var A=[];function S(e,t){for(var n=A,r=e.length,i=arguments.length>=2?arguments[1]:void 0,o=0;o<r;o++)if(o in e){var a=e[o];t.call(i,a,o,e)&&n.push(a)}return(A=e).length=0,n}function M(e,t){t||(t=[]);for(var n=0,r=e.length;n<r;n++){var i=e[n];Array.isArray(i)?M(i,t):t.push(i)}return t}function T(e){return p.arr(e)?e:(p.str(e)&&(e=E(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function C(e,t){return e.some((function(e){return e===t}))}function O(e){var t={};for(var n in e)t[n]=e[n];return t}function R(e,t){var n=O(e);for(var r in e)n[r]=t.hasOwnProperty(r)?t[r]:e[r];return n}function k(e,t){var n=O(e);for(var r in t)n[r]=p.und(e[r])?t[r]:e[r];return n}var P=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g,L=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,D=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,I=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g,N=/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g;function j(e){return p.rgb(e)?function(e){var t=P.exec(e);return t?"rgba("+t[1]+",1)":e}(e):p.hex(e)?function(e){var t=e.replace(L,(function(e,t,n,r){return t+t+n+n+r+r})),n=D.exec(t);return"rgba("+parseInt(n[1],16)+","+parseInt(n[2],16)+","+parseInt(n[3],16)+",1)"}(e):p.hsl(e)?function(e){var t,n,r,i=I.exec(e)||N.exec(e),o=parseInt(i[1],10)/360,a=parseInt(i[2],10)/100,s=parseInt(i[3],10)/100,l=i[4]||1;function c(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+(t-e)*(2/3-n)*6:e}if(0==a)t=n=r=s;else{var u=s<.5?s*(1+a):s+a-s*a,h=2*s-u;t=c(h,u,o+1/3),n=c(h,u,o),r=c(h,u,o-1/3)}return"rgba("+255*t+","+255*n+","+255*r+","+l+")"}(e):void 0}var B=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/;function F(e){var t=B.exec(e);if(t)return t[2]}function z(e,t){return p.fnc(e)?e(t.target,t.id,t.total):e}function H(e,t){return e.getAttribute(t)}function U(e,t,n){if(C([n,"deg","rad","turn"],F(t)))return t;var r=s.CSS[t+n];if(!p.und(r))return r;var i=document.createElement(e.tagName),o=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;o.appendChild(i),i.style.position="absolute",i.style.width=100+n;var a=100/i.offsetWidth;o.removeChild(i);var l=a*parseFloat(t);return s.CSS[t+n]=l,l}function V(e,t,n){if(t in e.style){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=e.style[t]||getComputedStyle(e).getPropertyValue(r)||"0";return n?U(e,i,n):i}}function G(e,t){return p.dom(e)&&!p.inp(e)&&(H(e,t)||p.svg(e)&&e[t])?"attribute":p.dom(e)&&C(a,t)?"transform":p.dom(e)&&"transform"!==t&&V(e,t)?"css":null!=e[t]?"object":void 0}var W=/(\w+)\(([^)]*)\)/g;function q(e){if(p.dom(e)){for(var t,n=e.style.transform||"",r=new Map;t=W.exec(n);)r.set(t[1],t[2]);return r}}function X(e,t,n,r){var i=c(t,"scale")?1:0+function(e){return c(e,"translate")||"perspective"===e?"px":c(e,"rotate")||c(e,"skew")?"deg":void 0}(t),o=q(e).get(t)||i;return n&&(n.transforms.list.set(t,o),n.transforms.last=t),r?U(e,o,r):o}function Y(e,t,n,r){switch(G(e,t)){case"transform":return X(e,t,r,n);case"css":return V(e,t,n);case"attribute":return H(e,t);default:return e[t]||0}}var K=/^(\*=|\+=|-=)/;function Q(e,t){var n=K.exec(e);if(!n)return e;var r=F(e)||0,i=parseFloat(t),o=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return i+o+r;case"-":return i-o+r;case"*":return i*o+r}}var Z=/\s/g;function J(e,t){if(p.col(e))return j(e);var n=F(e),r=n?e.substr(0,e.length-n.length):e;return t&&!Z.test(e)?r+t:r}function $(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function ee(e){for(var t,n=e.points,r=0,i=0;i<n.numberOfItems;i++){var o=n.getItem(i);i>0&&(r+=$(t,o)),t=o}return r}function te(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return function(e){return 2*Math.PI*H(e,"r")}(e);case"rect":return function(e){return 2*H(e,"width")+2*H(e,"height")}(e);case"line":return function(e){return $({x:H(e,"x1"),y:H(e,"y1")},{x:H(e,"x2"),y:H(e,"y2")})}(e);case"polyline":return ee(e);case"polygon":return function(e){var t=e.points;return ee(e)+$(t.getItem(t.numberOfItems-1),t.getItem(0))}(e)}}function ne(e,t){var n=t||{},r=n.el||function(e){for(var t=e.parentNode;p.svg(t)&&(t=t.parentNode,p.svg(t.parentNode)););return t}(e),i=r.getBoundingClientRect(),o=H(r,"viewBox"),a=i.width,s=i.height,l=n.viewBox||(o?o.split(" "):[0,0,a,s]);return{el:r,viewBox:l,x:l[0]/1,y:l[1]/1,w:a/l[2],h:s/l[3]}}function re(e,t){function n(n){void 0===n&&(n=0);var r=t+n>=1?t+n:0;return e.el.getPointAtLength(r)}var r=ne(e.el,e.svg),i=n(),o=n(-1),a=n(1);switch(e.property){case"x":return(i.x-r.x)*r.w;case"y":return(i.y-r.y)*r.h;case"angle":return 180*Math.atan2(a.y-o.y,a.x-o.x)/Math.PI}}var ie=/-?\d*\.?\d+/g;function oe(e,t){var n=J(p.pth(e)?e.totalLength:e,t)+"";return{original:n,numbers:n.match(ie)?n.match(ie).map(Number):[0],strings:p.str(e)||t?n.split(ie):[]}}function ae(e){return S(e?M(p.arr(e)?e.map(T):T(e)):[],(function(e,t,n){return n.indexOf(e)===t}))}function se(e){var t=ae(e);return t.map((function(e,n){return{target:e,id:n,total:t.length,transforms:{list:q(e)}}}))}var le=/^spring/;function ce(e,t){var n=O(t);if(le.test(n.easing)&&(n.duration=v(n.easing)),p.arr(e)){var r=e.length;2!==r||p.obj(e[0])?p.fnc(t.duration)||(n.duration=t.duration/r):e={value:e}}var i=p.arr(e)?e:[e];return i.map((function(e,n){var r=p.obj(e)&&!p.pth(e)?e:{value:e};return p.und(r.delay)&&(r.delay=n?0:t.delay),p.und(r.endDelay)&&(r.endDelay=n===i.length-1?t.endDelay:0),r})).map((function(e){return k(e,n)}))}function ue(e,t){var n=[],r=t.keyframes;for(var i in r&&(t=k(function(e){for(var t=S(M(e.map((function(e){return Object.keys(e)}))),(function(e){return p.key(e)})).reduce((function(e,t){return e.indexOf(t)<0&&e.push(t),e}),[]),n={},r=function(r){var i=t[r];n[i]=e.map((function(e){var t={};for(var n in e)p.key(n)?n==i&&(t.value=e[n]):t[n]=e[n];return t}))},i=0;i<t.length;i++)r(i);return n}(r),t)),t)p.key(i)&&n.push({name:i,tweens:ce(t[i],e)});return n}function he(e,t){var n;return e.tweens.map((function(r){var i=function(e,t){var n={};for(var r in e){var i=z(e[r],t);p.arr(i)&&1===(i=i.map((function(e){return z(e,t)}))).length&&(i=i[0]),n[r]=i}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}(r,t),o=i.value,a=p.arr(o)?o[1]:o,s=F(a),l=Y(t.target,e.name,s,t),c=n?n.to.original:l,u=p.arr(o)?o[0]:c,h=F(u)||F(l),d=s||h;return p.und(a)&&(a=c),i.from=oe(u,d),i.to=oe(Q(a,u),d),i.start=n?n.end:0,i.end=i.start+i.delay+i.duration+i.endDelay,i.easing=_(i.easing,i.duration),i.isPath=p.pth(o),i.isColor=p.col(i.from.original),i.isColor&&(i.round=1),n=i,i}))}var de={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,r,i){if(r.list.set(t,n),t===r.last||i){var o="";r.list.forEach((function(e,t){o+=t+"("+e+") "})),e.style.transform=o}}};function fe(e,t){for(var n=se(e),r=0,i=n.length;r<i;r++){var o=n[r];for(var a in t){var s=z(t[a],o),l=o.target,c=F(s),u=Y(l,a,c,o),h=Q(J(s,c||F(u)),u),d=G(l,a);de[d](l,a,h,o.transforms,!0)}}}function pe(e,t){return S(M(e.map((function(e){return t.map((function(t){return function(e,t){var n=G(e.target,t.name);if(n){var r=he(t,e),i=r[r.length-1];return{type:n,property:t.name,animatable:e,tweens:r,duration:i.end,delay:r[0].delay,endDelay:i.endDelay}}}(e,t)}))}))),(function(e){return!p.und(e)}))}function me(e,t){var n=e.length,r=function(e){return e.timelineOffset?e.timelineOffset:0},i={};return i.duration=n?Math.max.apply(Math,e.map((function(e){return r(e)+e.duration}))):t.duration,i.delay=n?Math.min.apply(Math,e.map((function(e){return r(e)+e.delay}))):t.delay,i.endDelay=n?i.duration-Math.max.apply(Math,e.map((function(e){return r(e)+e.duration-e.endDelay}))):t.endDelay,i}var ge,ve=0,ye=[],be=[],we=function(){function e(){ge=requestAnimationFrame(t)}function t(t){var n=ye.length;if(n){for(var r=0;r<n;){var i=ye[r];if(i.paused){var o=ye.indexOf(i);o>-1&&(ye.splice(o,1),n=ye.length)}else i.tick(t);r++}e()}else ge=cancelAnimationFrame(ge)}return e}();function xe(e){void 0===e&&(e={});var t,n=0,r=0,a=0,s=0,c=null;function u(){return window.Promise&&new Promise((function(e){return c=e}))}var h=u(),d=function(e){var t=R(i,e),n=R(o,e),r=ue(n,e),a=se(e.targets),s=pe(a,r),l=me(s,n),c=ve;return ve++,k(t,{id:c,children:[],animatables:a,animations:s,duration:l.duration,delay:l.delay,endDelay:l.endDelay})}(e);function f(){d.reversed=!d.reversed;for(var e=0,n=t.length;e<n;e++)t[e].reversed=d.reversed}function p(e){return d.reversed?d.duration-e:e}function m(){n=0,r=p(d.currentTime)*(1/xe.speed)}function g(e,t){t&&t.seek(e-t.timelineOffset)}function v(e){for(var t=0,n=d.animations,r=n.length;t<r;){var i=n[t],o=i.animatable,a=i.tweens,s=a.length-1,c=a[s];s&&(c=S(a,(function(t){return e<t.end}))[0]||c);for(var u=l(e-c.start-c.delay,0,c.duration)/c.duration,h=isNaN(u)?1:c.easing(u),f=c.to.strings,p=c.round,m=[],g=c.to.numbers.length,v=void 0,y=0;y<g;y++){var b=void 0,w=c.to.numbers[y],x=c.from.numbers[y]||0;b=c.isPath?re(c.value,h*w):x+h*(w-x),p&&(c.isColor&&y>2||(b=Math.round(b*p)/p)),m.push(b)}var _=f.length;if(_){v=f[0];for(var E=0;E<_;E++){f[E];var A=f[E+1],M=m[E];isNaN(M)||(v+=A?M+A:M+" ")}}else v=m[0];de[i.type](o.target,i.property,v,o.transforms),i.currentValue=v,t++}}function y(e){d[e]&&!d.passThrough&&d[e](d)}function b(e){var i=d.duration,o=d.delay,m=i-d.endDelay,b=p(e);d.progress=l(b/i*100,0,100),d.reversePlayback=b<d.currentTime,t&&function(e){if(d.reversePlayback)for(var n=s;n--;)g(e,t[n]);else for(var r=0;r<s;r++)g(e,t[r])}(b),!d.began&&d.currentTime>0&&(d.began=!0,y("begin"),y("loopBegin")),b<=o&&0!==d.currentTime&&v(0),(b>=m&&d.currentTime!==i||!i)&&v(i),b>o&&b<m?(d.changeBegan||(d.changeBegan=!0,d.changeCompleted=!1,y("changeBegin")),y("change"),v(b)):d.changeBegan&&(d.changeCompleted=!0,d.changeBegan=!1,y("changeComplete")),d.currentTime=l(b,0,i),d.began&&y("update"),e>=i&&(r=0,d.remaining&&!0!==d.remaining&&d.remaining--,d.remaining?(n=a,y("loopComplete"),y("loopBegin"),"alternate"===d.direction&&f()):(d.paused=!0,d.completed||(d.completed=!0,y("loopComplete"),y("complete"),"Promise"in window&&(c(),h=u()))))}return d.reset=function(){var e=d.direction;d.passThrough=!1,d.currentTime=0,d.progress=0,d.paused=!0,d.began=!1,d.changeBegan=!1,d.completed=!1,d.changeCompleted=!1,d.reversePlayback=!1,d.reversed="reverse"===e,d.remaining=d.loop,t=d.children;for(var n=s=t.length;n--;)d.children[n].reset();(d.reversed&&!0!==d.loop||"alternate"===e&&1===d.loop)&&d.remaining++,v(0)},d.set=function(e,t){return fe(e,t),d},d.tick=function(e){a=e,n||(n=a),b((a+(r-n))*xe.speed)},d.seek=function(e){b(p(e))},d.pause=function(){d.paused=!0,m()},d.play=function(){d.paused&&(d.paused=!1,ye.push(d),m(),ge||we())},d.reverse=function(){f(),m()},d.restart=function(){d.reset(),d.play()},d.finished=h,d.reset(),d.autoplay&&d.play(),d}function _e(e,t){for(var n=t.length;n--;)C(e,t[n].animatable.target)&&t.splice(n,1)}document.addEventListener("visibilitychange",(function(){if(document.hidden){for(var e=0,t=ye.length;e<t;e++)activeInstance[e].pause();be=ye.slice(0),ye=[]}else for(var n=0,r=be.length;n<r;n++)be[n].play()})),xe.version="3.0.0",xe.speed=1,xe.running=ye,xe.remove=function(e){for(var t=ae(e),n=ye.length;n--;){var r=ye[n],i=r.animations,o=r.children;_e(t,i);for(var a=o.length;a--;){var s=o[a],l=s.animations;_e(t,l),l.length||s.children.length||o.splice(a,1)}i.length||o.length||r.pause()}},xe.get=Y,xe.set=fe,xe.convertPx=U,xe.path=function(e,t){var n=p.str(e)?E(e)[0]:e,r=t||100;return function(e){return{property:e,el:n,svg:ne(n),totalLength:te(n)*(r/100)}}},xe.setDashoffset=function(e){var t=te(e);return e.setAttribute("stroke-dasharray",t),t},xe.stagger=function(e,t){void 0===t&&(t={});var n=t.direction||"normal",r=t.easing?_(t.easing):null,i=t.grid,o=t.axis,a=t.from||0,s="first"===a,l="center"===a,c="last"===a,u=p.arr(e),h=u?parseFloat(e[0]):parseFloat(e),d=u?parseFloat(e[1]):0,f=F(u?e[1]:e)||0,m=t.start||0+(u?h:0),g=[],v=0;return function(e,t,p){if(s&&(a=0),l&&(a=(p-1)/2),c&&(a=p-1),!g.length){for(var y=0;y<p;y++){if(i){var b=l?(i[0]-1)/2:a%i[0],w=l?(i[1]-1)/2:Math.floor(a/i[0]),x=b-y%i[0],_=w-Math.floor(y/i[0]),E=Math.sqrt(x*x+_*_);"x"===o&&(E=-x),"y"===o&&(E=-_),g.push(E)}else g.push(Math.abs(a-y));v=Math.max.apply(Math,g)}r&&(g=g.map((function(e){return r(e/v)*v}))),"reverse"===n&&(g=g.map((function(e){return o?e<0?-1*e:-e:Math.abs(v-e)})))}return m+(u?(d-h)/v:h)*(Math.round(100*g[t])/100)+f}},xe.timeline=function(e){void 0===e&&(e={});var t=xe(e);return t.duration=0,t.add=function(n,r){var i=ye.indexOf(t),a=t.children;function s(e){e.passThrough=!0}i>-1&&ye.splice(i,1);for(var l=0;l<a.length;l++)s(a[l]);var c=k(n,R(o,e));c.targets=c.targets||e.targets;var u=t.duration;c.autoplay=!1,c.direction=t.direction,c.timelineOffset=p.und(r)?u:Q(r,u),s(t),t.seek(c.timelineOffset);var h=xe(c);s(h),a.push(h);var d=me(a,e);return t.delay=d.delay,t.endDelay=d.endDelay,t.duration=d.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},xe.easing=_,xe.penner=x,xe.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e},n.exports=xe},{}],57:[function(t,n,r){!function(e,t){t("object"===typeof r&&"undefined"!==typeof n?r:(e="undefined"!==typeof globalThis?globalThis:e||self).THREE={})}(this,(function(t){"use strict";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(void 0===e||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(void 0!==r&&null!==r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t});var r=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"===typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(M){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(M){return{type:"throw",arg:M}}}e.wrap=l;var u={};function h(){}function d(){}function f(){}var p={};p[i]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(A([])));g&&g!==t&&n.call(g,i)&&(p=g);var v=f.prototype=h.prototype=Object.create(p);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"===typeof h&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(h).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function A(e){if(e){var t=e[i];if(t)return t.call(e);if("function"===typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=v.constructor=f,f.constructor=d,d.displayName=s(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"===typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,a,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},y(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(v),s(v,a,"Generator"),v[i]=function(){return this},v.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=A,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}("object"===typeof n?n.exports:{});try{regeneratorRuntime=r}catch(cu){Function("r","regeneratorRuntime = r")(r)}function i(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,i)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"===typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function h(){}Object.assign(h.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)}}}});for(var d=[],f=0;f<256;f++)d[f]=(f<16?"0":"")+f.toString(16);var p,m=1234567,g={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(d[255&e]+d[e>>8&255]+d[e>>16&255]+d[e>>24&255]+"-"+d[255&t]+d[t>>8&255]+"-"+d[t>>16&15|64]+d[t>>24&255]+"-"+d[63&n|128]+d[n>>8&255]+"-"+d[n>>16&255]+d[n>>24&255]+d[255&r]+d[r>>8&255]+d[r>>16&255]+d[r>>24&255]).toUpperCase()},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},damp:function(e,t,n,r){return g.lerp(e,t,1-Math.exp(-n*r))},pingpong:function(e,t){return void 0===t&&(t=1),t-Math.abs(g.euclideanModulo(e,2*t)-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())},seededRandom:function(e){return void 0!==e&&(m=e%2147483647),((m=16807*m%2147483647)-1)/2147483646},degToRad:function(e){return e*g.DEG2RAD},radToDeg:function(e){return e*g.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))},setQuaternionFromProperEuler:function(e,t,n,r,i){var o=Math.cos,a=Math.sin,s=o(n/2),l=a(n/2),c=o((t+r)/2),u=a((t+r)/2),h=o((t-r)/2),d=a((t-r)/2),f=o((r-t)/2),p=a((r-t)/2);switch(i){case"XYX":e.set(s*u,l*h,l*d,s*c);break;case"YZY":e.set(l*d,s*u,l*h,s*c);break;case"ZXZ":e.set(l*h,l*d,s*u,s*c);break;case"XZX":e.set(s*u,l*p,l*f,s*c);break;case"YXY":e.set(l*f,s*u,l*p,s*c);break;case"ZYZ":e.set(l*p,l*f,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}},v=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),Object.defineProperty(this,"isVector2",{value:!0}),this.x=e,this.y=t}var t=e.prototype;return t.set=function(e,t){return this.x=e,this.y=t,this},t.setScalar=function(e){return this.x=e,this.y=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.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},t.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)}},t.clone=function(){return new this.constructor(this.x,this.y)},t.copy=function(e){return this.x=e.x,this.y=e.y,this},t.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)},t.addScalar=function(e){return this.x+=e,this.y+=e,this},t.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this},t.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this},t.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)},t.subScalar=function(e){return this.x-=e,this.y-=e,this},t.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this},t.multiply=function(e){return this.x*=e.x,this.y*=e.y,this},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this},t.divide=function(e){return this.x/=e.x,this.y/=e.y,this},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.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},t.min=function(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this},t.max=function(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this},t.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},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},t.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},t.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},t.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},t.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.dot=function(e){return this.x*e.x+this.y*e.y},t.cross=function(e){return this.x*e.y-this.y*e.x},t.lengthSq=function(){return this.x*this.x+this.y*this.y},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.angle=function(){var e=Math.atan2(-this.y,-this.x)+Math.PI;return e},t.distanceTo=function(e){return Math.sqrt(this.distanceToSquared(e))},t.distanceToSquared=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},t.manhattanDistanceTo=function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.lerp=function(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this},t.equals=function(e){return e.x===this.x&&e.y===this.y},t.fromArray=function(e,t){return void 0===t&&(t=0),this.x=e[t],this.y=e[t+1],this},t.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.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},t.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},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this},a(e,[{key:"width",get:function(){return this.x},set:function(e){this.x=e}},{key:"height",get:function(){return this.y},set:function(e){this.y=e}}]),e}(),y=function(){function e(){Object.defineProperty(this,"isMatrix3",{value:!0}),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.")}var t=e.prototype;return t.set=function(e,t,n,r,i,o,a,s,l){var c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=o,c[8]=l,this},t.identity=function(){return this.set(1,0,0,0,1,0,0,0,1),this},t.clone=function(){return(new this.constructor).fromArray(this.elements)},t.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},t.extractBasis=function(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this},t.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},t.multiply=function(e){return this.multiplyMatrices(this,e)},t.premultiply=function(e){return this.multiplyMatrices(e,this)},t.multiplyMatrices=function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[3],s=n[6],l=n[1],c=n[4],u=n[7],h=n[2],d=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],w=r[2],x=r[5],_=r[8];return i[0]=o*p+a*v+s*w,i[3]=o*m+a*y+s*x,i[6]=o*g+a*b+s*_,i[1]=l*p+c*v+u*w,i[4]=l*m+c*y+u*x,i[7]=l*g+c*b+u*_,i[2]=h*p+d*v+f*w,i[5]=h*m+d*y+f*x,i[8]=h*g+d*b+f*_,this},t.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},t.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],l=e[7],c=e[8];return t*o*c-t*a*l-n*i*c+n*a*s+r*i*l-r*o*s},t.invert=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],l=e[7],c=e[8],u=c*o-a*l,h=a*s-c*i,d=l*i-o*s,f=t*u+n*h+r*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);var p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(a*n-r*o)*p,e[3]=h*p,e[4]=(c*t-r*s)*p,e[5]=(r*i-a*t)*p,e[6]=d*p,e[7]=(n*s-l*t)*p,e[8]=(o*t-n*i)*p,this},t.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},t.getNormalMatrix=function(e){return this.setFromMatrix4(e).copy(this).invert().transpose()},t.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},t.setUvTransform=function(e,t,n,r,i,o,a){var s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*o+l*a)+o+e,-r*l,r*s,-r*(-l*o+s*a)+a+t,0,0,1),this},t.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},t.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],l=r[4],c=r[7];return r[0]=t*i+n*s,r[3]=t*o+n*l,r[6]=t*a+n*c,r[1]=-n*i+t*s,r[4]=-n*o+t*l,r[7]=-n*a+t*c,this},t.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},t.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},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=0;n<9;n++)this.elements[n]=e[n+t];return this},t.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},e}(),b={getDataURL:function(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;var t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===p&&(p=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),p.width=e.width,p.height=e.height;var n=p.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=p}return t.width>2048||t.height>2048?t.toDataURL("image/jpeg",.6):t.toDataURL("image/png")}},w=0;function x(e,t,n,r,i,o,a,s,l,c){void 0===e&&(e=x.DEFAULT_IMAGE),void 0===t&&(t=x.DEFAULT_MAPPING),void 0===n&&(n=1001),void 0===r&&(r=1001),void 0===i&&(i=1006),void 0===o&&(o=1008),void 0===a&&(a=1023),void 0===s&&(s=1009),void 0===l&&(l=1),void 0===c&&(c=3e3),Object.defineProperty(this,"id",{value:w++}),this.uuid=g.generateUUID(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=s,this.offset=new v(0,0),this.repeat=new v(1,1),this.center=new v(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new y,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.version=0,this.onUpdate=null}function _(e){return"undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap?b.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}x.DEFAULT_IMAGE=void 0,x.DEFAULT_MAPPING=300,x.prototype=Object.assign(Object.create(h.prototype),{constructor:x,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},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.internalFormat=e.internalFormat,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],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(void 0!==this.image){var r=this.image;if(void 0===r.uuid&&(r.uuid=g.generateUUID()),!t&&void 0===e.images[r.uuid]){var i;if(Array.isArray(r)){i=[];for(var o=0,a=r.length;o<a;o++)r[o].isDataTexture?i.push(_(r[o].image)):i.push(_(r[o]))}else i=_(r);e.images[r.uuid]={uuid:r.uuid,url:i}}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)return e;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)}return this.flipY&&(e.y=1-e.y),e}}),Object.defineProperty(x.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}});var E=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),Object.defineProperty(this,"isVector4",{value:!0}),this.x=e,this.y=t,this.z=n,this.w=r}var t=e.prototype;return t.set=function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},t.setScalar=function(e){return this.x=e,this.y=e,this.z=e,this.w=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.setZ=function(e){return this.z=e,this},t.setW=function(e){return this.w=e,this},t.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},t.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)}},t.clone=function(){return new this.constructor(this.x,this.y,this.z,this.w)},t.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},t.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)},t.addScalar=function(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this},t.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},t.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},t.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)},t.subScalar=function(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this},t.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},t.multiply=function(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this},t.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},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.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},t.setAxisAngleFromRotationMatrix=function(e){var t,n,r,i,o=e.elements,a=o[0],s=o[4],l=o[8],c=o[1],u=o[5],h=o[9],d=o[2],f=o[6],p=o[10];if(Math.abs(s-c)<.01&&Math.abs(l-d)<.01&&Math.abs(h-f)<.01){if(Math.abs(s+c)<.1&&Math.abs(l+d)<.1&&Math.abs(h+f)<.1&&Math.abs(a+u+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;var m=(a+1)/2,g=(u+1)/2,v=(p+1)/2,y=(s+c)/4,b=(l+d)/4,w=(h+f)/4;return m>g&&m>v?m<.01?(n=0,r=.707106781,i=.707106781):(r=y/(n=Math.sqrt(m)),i=b/n):g>v?g<.01?(n=.707106781,r=0,i=.707106781):(n=y/(r=Math.sqrt(g)),i=w/r):v<.01?(n=.707106781,r=.707106781,i=0):(n=b/(i=Math.sqrt(v)),r=w/i),this.set(n,r,i,t),this}var x=Math.sqrt((f-h)*(f-h)+(l-d)*(l-d)+(c-s)*(c-s));return Math.abs(x)<.001&&(x=1),this.x=(f-h)/x,this.y=(l-d)/x,this.z=(c-s)/x,this.w=Math.acos((a+u+p-1)/2),this},t.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},t.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},t.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},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.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},t.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},t.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},t.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},t.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},t.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w},t.lengthSq=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.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},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this},t.equals=function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w},t.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},t.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},t.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},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this},a(e,[{key:"width",get:function(){return this.z},set:function(e){this.z=e}},{key:"height",get:function(){return this.w},set:function(e){this.w=e}}]),e}(),A=function(e){function t(t,n,r){var i;return i=e.call(this)||this,Object.defineProperty(l(i),"isWebGLRenderTarget",{value:!0}),i.width=t,i.height=n,i.scissor=new E(0,0,t,n),i.scissorTest=!1,i.viewport=new E(0,0,t,n),r=r||{},i.texture=new x(void 0,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),i.texture.image={},i.texture.image.width=t,i.texture.image.height=n,i.texture.generateMipmaps=void 0!==r.generateMipmaps&&r.generateMipmaps,i.texture.minFilter=void 0!==r.minFilter?r.minFilter:1006,i.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,i.stencilBuffer=void 0!==r.stencilBuffer&&r.stencilBuffer,i.depthTexture=void 0!==r.depthTexture?r.depthTexture:null,i}s(t,e);var n=t.prototype;return n.setSize=function(e,t){this.width===e&&this.height===t||(this.width=e,this.height=t,this.texture.image.width=e,this.texture.image.height=t,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)},n.clone=function(){return(new this.constructor).copy(this)},n.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},n.dispose=function(){this.dispatchEvent({type:"dispose"})},t}(h),S=function(e){function t(t,n,r){var i;return i=e.call(this,t,n,r)||this,Object.defineProperty(l(i),"isWebGLMultisampleRenderTarget",{value:!0}),i.samples=4,i}return s(t,e),t.prototype.copy=function(t){return e.prototype.copy.call(this,t),this.samples=t.samples,this},t}(A),M=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),Object.defineProperty(this,"isQuaternion",{value:!0}),this._x=e,this._y=t,this._z=n,this._w=r}e.slerp=function(e,t,n,r){return n.copy(e).slerp(t,r)},e.slerpFlat=function(e,t,n,r,i,o,a){var s=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3],h=i[o+0],d=i[o+1],f=i[o+2],p=i[o+3];if(u!==p||s!==h||l!==d||c!==f){var m=1-a,g=s*h+l*d+c*f+u*p,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var b=Math.sqrt(y),w=Math.atan2(b,g*v);m=Math.sin(m*w)/b,a=Math.sin(a*w)/b}var x=a*v;if(s=s*m+h*x,l=l*m+d*x,c=c*m+f*x,u=u*m+p*x,m===1-a){var _=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=_,l*=_,c*=_,u*=_}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=u},e.multiplyQuaternionsFlat=function(e,t,n,r,i,o){var a=n[r],s=n[r+1],l=n[r+2],c=n[r+3],u=i[o],h=i[o+1],d=i[o+2],f=i[o+3];return e[t]=a*f+c*u+s*d-l*h,e[t+1]=s*f+c*h+l*u-a*d,e[t+2]=l*f+c*d+a*h-s*u,e[t+3]=c*f-a*u-s*h-l*d,e};var t=e.prototype;return t.set=function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this},t.clone=function(){return new this.constructor(this._x,this._y,this._z,this._w)},t.copy=function(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this},t.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,l=a(n/2),c=a(r/2),u=a(i/2),h=s(n/2),d=s(r/2),f=s(i/2);switch(o){case"XYZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"YXZ":this._x=h*c*u+l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"ZXY":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u-h*d*f;break;case"ZYX":this._x=h*c*u-l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u+h*d*f;break;case"YZX":this._x=h*c*u+l*d*f,this._y=l*d*u+h*c*f,this._z=l*c*f-h*d*u,this._w=l*c*u-h*d*f;break;case"XZY":this._x=h*c*u-l*d*f,this._y=l*d*u-h*c*f,this._z=l*c*f+h*d*u,this._w=l*c*u+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this},t.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},t.setFromRotationMatrix=function(e){var t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],a=t[5],s=t[9],l=t[2],c=t[6],u=t[10],h=n+a+u;if(h>0){var d=.5/Math.sqrt(h+1);this._w=.25/d,this._x=(c-s)*d,this._y=(i-l)*d,this._z=(o-r)*d}else if(n>a&&n>u){var f=2*Math.sqrt(1+n-a-u);this._w=(c-s)/f,this._x=.25*f,this._y=(r+o)/f,this._z=(i+l)/f}else if(a>u){var p=2*Math.sqrt(1+a-n-u);this._w=(i-l)/p,this._x=(r+o)/p,this._y=.25*p,this._z=(s+c)/p}else{var m=2*Math.sqrt(1+u-n-a);this._w=(o-r)/m,this._x=(i+l)/m,this._y=(s+c)/m,this._z=.25*m}return this._onChangeCallback(),this},t.setFromUnitVectors=function(e,t){var n=e.dot(t)+1;return n<1e-6?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()},t.angleTo=function(e){return 2*Math.acos(Math.abs(g.clamp(this.dot(e),-1,1)))},t.rotateTowards=function(e,t){var n=this.angleTo(e);if(0===n)return this;var r=Math.min(1,t/n);return this.slerp(e,r),this},t.identity=function(){return this.set(0,0,0,1)},t.invert=function(){return this.conjugate()},t.conjugate=function(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this},t.dot=function(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w},t.lengthSq=function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},t.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},t.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},t.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)},t.premultiply=function(e){return this.multiplyQuaternions(e,this)},t.multiplyQuaternions=function(e,t){var n=e._x,r=e._y,i=e._z,o=e._w,a=t._x,s=t._y,l=t._z,c=t._w;return this._x=n*c+o*a+r*l-i*s,this._y=r*c+o*s+i*a-n*l,this._z=i*c+o*l+n*s-r*a,this._w=o*c-n*a-r*s-i*l,this._onChangeCallback(),this},t.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=1-a*a;if(s<=Number.EPSILON){var l=1-t;return this._w=l*o+t*this._w,this._x=l*n+t*this._x,this._y=l*r+t*this._y,this._z=l*i+t*this._z,this.normalize(),this._onChangeCallback(),this}var c=Math.sqrt(s),u=Math.atan2(c,a),h=Math.sin((1-t)*u)/c,d=Math.sin(t*u)/c;return this._w=o*h+this._w*d,this._x=n*h+this._x*d,this._y=r*h+this._y*d,this._z=i*h+this._z*d,this._onChangeCallback(),this},t.equals=function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w},t.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},t.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},t.fromBufferAttribute=function(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this},t._onChange=function(e){return this._onChangeCallback=e,this},t._onChangeCallback=function(){},a(e,[{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"w",get:function(){return this._w},set:function(e){this._w=e,this._onChangeCallback()}}]),e}(),T=function(){function e(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),Object.defineProperty(this,"isVector3",{value:!0}),this.x=e,this.y=t,this.z=n}var t=e.prototype;return t.set=function(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this},t.setScalar=function(e){return this.x=e,this.y=e,this.z=e,this},t.setX=function(e){return this.x=e,this},t.setY=function(e){return this.y=e,this},t.setZ=function(e){return this.z=e,this},t.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},t.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)}},t.clone=function(){return new this.constructor(this.x,this.y,this.z)},t.copy=function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},t.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)},t.addScalar=function(e){return this.x+=e,this.y+=e,this.z+=e,this},t.addVectors=function(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this},t.addScaledVector=function(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this},t.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)},t.subScalar=function(e){return this.x-=e,this.y-=e,this.z-=e,this},t.subVectors=function(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this},t.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)},t.multiplyScalar=function(e){return this.x*=e,this.y*=e,this.z*=e,this},t.multiplyVectors=function(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this},t.applyEuler=function(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(O.setFromEuler(e))},t.applyAxisAngle=function(e,t){return this.applyQuaternion(O.setFromAxisAngle(e,t))},t.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},t.applyNormalMatrix=function(e){return this.applyMatrix3(e).normalize()},t.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},t.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,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this},t.project=function(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)},t.unproject=function(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)},t.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()},t.divide=function(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this},t.divideScalar=function(e){return this.multiplyScalar(1/e)},t.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},t.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},t.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},t.clampScalar=function(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this},t.clampLength=function(e,t){var n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))},t.floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},t.ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},t.round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},t.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},t.negate=function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},t.dot=function(e){return this.x*e.x+this.y*e.y+this.z*e.z},t.lengthSq=function(){return this.x*this.x+this.y*this.y+this.z*this.z},t.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.manhattanLength=function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},t.normalize=function(){return this.divideScalar(this.length()||1)},t.setLength=function(e){return this.normalize().multiplyScalar(e)},t.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},t.lerpVectors=function(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this},t.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)},t.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},t.projectOnVector=function(e){var t=e.lengthSq();if(0===t)return this.set(0,0,0);var n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)},t.projectOnPlane=function(e){return C.copy(this).projectOnVector(e),this.sub(C)},t.reflect=function(e){return this.sub(C.copy(e).multiplyScalar(2*this.dot(e)))},t.angleTo=function(e){var t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;var n=this.dot(e)/t;return Math.acos(g.clamp(n,-1,1))},t.distanceTo=function(e){return Math.sqrt(this.distanceToSquared(e))},t.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},t.manhattanDistanceTo=function(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)},t.setFromSpherical=function(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)},t.setFromSphericalCoords=function(e,t,n){var r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this},t.setFromCylindrical=function(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)},t.setFromCylindricalCoords=function(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this},t.setFromMatrixPosition=function(e){var t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this},t.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},t.setFromMatrixColumn=function(e,t){return this.fromArray(e.elements,4*t)},t.setFromMatrix3Column=function(e,t){return this.fromArray(e.elements,3*t)},t.equals=function(e){return e.x===this.x&&e.y===this.y&&e.z===this.z},t.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},t.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.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},t.random=function(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this},e}(),C=new T,O=new M,R=function(){function e(e,t){Object.defineProperty(this,"isBox3",{value:!0}),this.min=void 0!==e?e:new T(1/0,1/0,1/0),this.max=void 0!==t?t:new T(-1/0,-1/0,-1/0)}var t=e.prototype;return t.set=function(e,t){return this.min.copy(e),this.max.copy(t),this},t.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,l=e.length;s<l;s+=3){var c=e[s],u=e[s+1],h=e[s+2];c<t&&(t=c),u<n&&(n=u),h<r&&(r=h),c>i&&(i=c),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},t.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,l=e.count;s<l;s++){var c=e.getX(s),u=e.getY(s),h=e.getZ(s);c<t&&(t=c),u<n&&(n=u),h<r&&(r=h),c>i&&(i=c),u>o&&(o=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(i,o,a),this},t.setFromPoints=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},t.setFromCenterAndSize=function(e,t){var n=L.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this},t.setFromObject=function(e){return this.makeEmpty(),this.expandByObject(e)},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.min.copy(e.min),this.max.copy(e.max),this},t.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},t.isEmpty=function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Box3: .getCenter() target is now required"),e=new T),this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},t.getSize=function(e){return void 0===e&&(console.warn("THREE.Box3: .getSize() target is now required"),e=new T),this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)},t.expandByPoint=function(e){return this.min.min(e),this.max.max(e),this},t.expandByVector=function(e){return this.min.sub(e),this.max.add(e),this},t.expandByScalar=function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},t.expandByObject=function(e){e.updateWorldMatrix(!1,!1);var t=e.geometry;void 0!==t&&(null===t.boundingBox&&t.computeBoundingBox(),D.copy(t.boundingBox),D.applyMatrix4(e.matrixWorld),this.union(D));for(var n=e.children,r=0,i=n.length;r<i;r++)this.expandByObject(n[r]);return this},t.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)},t.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},t.getParameter=function(e,t){return void 0===t&&(console.warn("THREE.Box3: .getParameter() target is now required"),t=new T),t.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))},t.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)},t.intersectsSphere=function(e){return this.clampPoint(e.center,L),L.distanceToSquared(e.center)<=e.radius*e.radius},t.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},t.intersectsTriangle=function(e){if(this.isEmpty())return!1;this.getCenter(H),U.subVectors(this.max,H),I.subVectors(e.a,H),N.subVectors(e.b,H),j.subVectors(e.c,H),B.subVectors(N,I),F.subVectors(j,N),z.subVectors(I,j);var t=[0,-B.z,B.y,0,-F.z,F.y,0,-z.z,z.y,B.z,0,-B.x,F.z,0,-F.x,z.z,0,-z.x,-B.y,B.x,0,-F.y,F.x,0,-z.y,z.x,0];return!!k(t,I,N,j,U)&&!!k(t=[1,0,0,0,1,0,0,0,1],I,N,j,U)&&(V.crossVectors(B,F),k(t=[V.x,V.y,V.z],I,N,j,U))},t.clampPoint=function(e,t){return void 0===t&&(console.warn("THREE.Box3: .clampPoint() target is now required"),t=new T),t.copy(e).clamp(this.min,this.max)},t.distanceToPoint=function(e){return L.copy(e).clamp(this.min,this.max).sub(e).length()},t.getBoundingSphere=function(e){return void 0===e&&console.error("THREE.Box3: .getBoundingSphere() target is now required"),this.getCenter(e.center),e.radius=.5*this.getSize(L).length(),e},t.intersect=function(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this},t.union=function(e){return this.min.min(e.min),this.max.max(e.max),this},t.applyMatrix4=function(e){return this.isEmpty()||(P[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),P[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),P[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),P[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),P[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),P[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),P[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),P[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(P)),this},t.translate=function(e){return this.min.add(e),this.max.add(e),this},t.equals=function(e){return e.min.equals(this.min)&&e.max.equals(this.max)},e}();function k(e,t,n,r,i){for(var o=0,a=e.length-3;o<=a;o+=3){G.fromArray(e,o);var s=i.x*Math.abs(G.x)+i.y*Math.abs(G.y)+i.z*Math.abs(G.z),l=t.dot(G),c=n.dot(G),u=r.dot(G);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>s)return!1}return!0}var P=[new T,new T,new T,new T,new T,new T,new T,new T],L=new T,D=new R,I=new T,N=new T,j=new T,B=new T,F=new T,z=new T,H=new T,U=new T,V=new T,G=new T,W=new R,q=function(){function e(e,t){this.center=void 0!==e?e:new T,this.radius=void 0!==t?t:-1}var t=e.prototype;return t.set=function(e,t){return this.center.copy(e),this.radius=t,this},t.setFromPoints=function(e,t){var n=this.center;void 0!==t?n.copy(t):W.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},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.center.copy(e.center),this.radius=e.radius,this},t.isEmpty=function(){return this.radius<0},t.makeEmpty=function(){return this.center.set(0,0,0),this.radius=-1,this},t.containsPoint=function(e){return e.distanceToSquared(this.center)<=this.radius*this.radius},t.distanceToPoint=function(e){return e.distanceTo(this.center)-this.radius},t.intersectsSphere=function(e){var t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t},t.intersectsBox=function(e){return e.intersectsSphere(this)},t.intersectsPlane=function(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius},t.clampPoint=function(e,t){var n=this.center.distanceToSquared(e);return void 0===t&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),t=new T),t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t},t.getBoundingBox=function(e){return void 0===e&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),e=new R),this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)},t.applyMatrix4=function(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this},t.translate=function(e){return this.center.add(e),this},t.equals=function(e){return e.center.equals(this.center)&&e.radius===this.radius},e}(),X=new T,Y=new T,K=new T,Q=new T,Z=new T,J=new T,$=new T,ee=function(){function e(e,t){this.origin=void 0!==e?e:new T,this.direction=void 0!==t?t:new T(0,0,-1)}var t=e.prototype;return t.set=function(e,t){return this.origin.copy(e),this.direction.copy(t),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this},t.at=function(e,t){return void 0===t&&(console.warn("THREE.Ray: .at() target is now required"),t=new T),t.copy(this.direction).multiplyScalar(e).add(this.origin)},t.lookAt=function(e){return this.direction.copy(e).sub(this.origin).normalize(),this},t.recast=function(e){return this.origin.copy(this.at(e,X)),this},t.closestPointToPoint=function(e,t){void 0===t&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),t=new T),t.subVectors(e,this.origin);var n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)},t.distanceToPoint=function(e){return Math.sqrt(this.distanceSqToPoint(e))},t.distanceSqToPoint=function(e){var t=X.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(X.copy(this.direction).multiplyScalar(t).add(this.origin),X.distanceToSquared(e))},t.distanceSqToSegment=function(e,t,n,r){Y.copy(e).add(t).multiplyScalar(.5),K.copy(t).sub(e).normalize(),Q.copy(this.origin).sub(Y);var i,o,a,s,l=.5*e.distanceTo(t),c=-this.direction.dot(K),u=Q.dot(this.direction),h=-Q.dot(K),d=Q.lengthSq(),f=Math.abs(1-c*c);if(f>0)if(o=c*u-h,s=l*f,(i=c*h-u)>=0)if(o>=-s)if(o<=s){var p=1/f;a=(i*=p)*(i+c*(o*=p)+2*u)+o*(c*i+o+2*h)+d}else o=l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;else o=-l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;else o<=-s?a=-(i=Math.max(0,-(-c*l+u)))*i+(o=i>0?-l:Math.min(Math.max(-l,-h),l))*(o+2*h)+d:o<=s?(i=0,a=(o=Math.min(Math.max(-l,-h),l))*(o+2*h)+d):a=-(i=Math.max(0,-(c*l+u)))*i+(o=i>0?l:Math.min(Math.max(-l,-h),l))*(o+2*h)+d;else o=c>0?-l:l,a=-(i=Math.max(0,-(c*o+u)))*i+o*(o+2*h)+d;return n&&n.copy(this.direction).multiplyScalar(i).add(this.origin),r&&r.copy(K).multiplyScalar(o).add(Y),a},t.intersectSphere=function(e,t){X.subVectors(e.center,this.origin);var n=X.dot(this.direction),r=X.dot(X)-n*n,i=e.radius*e.radius;if(r>i)return null;var o=Math.sqrt(i-r),a=n-o,s=n+o;return a<0&&s<0?null:a<0?this.at(s,t):this.at(a,t)},t.intersectsSphere=function(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius},t.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},t.intersectPlane=function(e,t){var n=this.distanceToPlane(e);return null===n?null:this.at(n,t)},t.intersectsPlane=function(e){var t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0},t.intersectBox=function(e,t){var n,r,i,o,a,s,l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),c>=0?(i=(e.min.y-h.y)*c,o=(e.max.y-h.y)*c):(i=(e.max.y-h.y)*c,o=(e.min.y-h.y)*c),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)))},t.intersectsBox=function(e){return null!==this.intersectBox(e,X)},t.intersectTriangle=function(e,t,n,r,i){Z.subVectors(t,e),J.subVectors(n,e),$.crossVectors(Z,J);var o,a=this.direction.dot($);if(a>0){if(r)return null;o=1}else{if(!(a<0))return null;o=-1,a=-a}Q.subVectors(this.origin,e);var s=o*this.direction.dot(J.crossVectors(Q,J));if(s<0)return null;var l=o*this.direction.dot(Z.cross(Q));if(l<0)return null;if(s+l>a)return null;var c=-o*Q.dot($);return c<0?null:this.at(c/a,i)},t.applyMatrix4=function(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this},t.equals=function(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)},e}(),te=function(){function e(){Object.defineProperty(this,"isMatrix4",{value:!0}),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.")}var t=e.prototype;return t.set=function(e,t,n,r,i,o,a,s,l,c,u,h,d,f,p,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]=l,g[6]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=f,g[11]=p,g[15]=m,this},t.identity=function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},t.clone=function(){return(new e).fromArray(this.elements)},t.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},t.copyPosition=function(e){var t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this},t.setFromMatrix3=function(e){var t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this},t.extractBasis=function(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this},t.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},t.extractRotation=function(e){var t=this.elements,n=e.elements,r=1/ne.setFromMatrixColumn(e,0).length(),i=1/ne.setFromMatrixColumn(e,1).length(),o=1/ne.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},t.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),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){var h=o*c,d=o*u,f=a*c,p=a*u;t[0]=s*c,t[4]=-s*u,t[8]=l,t[1]=d+f*l,t[5]=h-p*l,t[9]=-a*s,t[2]=p-h*l,t[6]=f+d*l,t[10]=o*s}else if("YXZ"===e.order){var m=s*c,g=s*u,v=l*c,y=l*u;t[0]=m+y*a,t[4]=v*a-g,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-a,t[2]=g*a-v,t[6]=y+m*a,t[10]=o*s}else if("ZXY"===e.order){var b=s*c,w=s*u,x=l*c,_=l*u;t[0]=b-_*a,t[4]=-o*u,t[8]=x+w*a,t[1]=w+x*a,t[5]=o*c,t[9]=_-b*a,t[2]=-o*l,t[6]=a,t[10]=o*s}else if("ZYX"===e.order){var E=o*c,A=o*u,S=a*c,M=a*u;t[0]=s*c,t[4]=S*l-A,t[8]=E*l+M,t[1]=s*u,t[5]=M*l+E,t[9]=A*l-S,t[2]=-l,t[6]=a*s,t[10]=o*s}else if("YZX"===e.order){var T=o*s,C=o*l,O=a*s,R=a*l;t[0]=s*c,t[4]=R-T*u,t[8]=O*u+C,t[1]=u,t[5]=o*c,t[9]=-a*c,t[2]=-l*c,t[6]=C*u+O,t[10]=T-R*u}else if("XZY"===e.order){var k=o*s,P=o*l,L=a*s,D=a*l;t[0]=s*c,t[4]=-u,t[8]=l*c,t[1]=k*u+D,t[5]=o*c,t[9]=P*u-L,t[2]=L*u-P,t[6]=a*c,t[10]=D*u+k}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},t.makeRotationFromQuaternion=function(e){return this.compose(ie,e,oe)},t.lookAt=function(e,t,n){var r=this.elements;return le.subVectors(e,t),0===le.lengthSq()&&(le.z=1),le.normalize(),ae.crossVectors(n,le),0===ae.lengthSq()&&(1===Math.abs(n.z)?le.x+=1e-4:le.z+=1e-4,le.normalize(),ae.crossVectors(n,le)),ae.normalize(),se.crossVectors(le,ae),r[0]=ae.x,r[4]=se.x,r[8]=le.x,r[1]=ae.y,r[5]=se.y,r[9]=le.y,r[2]=ae.z,r[6]=se.z,r[10]=le.z,this},t.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)},t.premultiply=function(e){return this.multiplyMatrices(e,this)},t.multiplyMatrices=function(e,t){var n=e.elements,r=t.elements,i=this.elements,o=n[0],a=n[4],s=n[8],l=n[12],c=n[1],u=n[5],h=n[9],d=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],w=n[15],x=r[0],_=r[4],E=r[8],A=r[12],S=r[1],M=r[5],T=r[9],C=r[13],O=r[2],R=r[6],k=r[10],P=r[14],L=r[3],D=r[7],I=r[11],N=r[15];return i[0]=o*x+a*S+s*O+l*L,i[4]=o*_+a*M+s*R+l*D,i[8]=o*E+a*T+s*k+l*I,i[12]=o*A+a*C+s*P+l*N,i[1]=c*x+u*S+h*O+d*L,i[5]=c*_+u*M+h*R+d*D,i[9]=c*E+u*T+h*k+d*I,i[13]=c*A+u*C+h*P+d*N,i[2]=f*x+p*S+m*O+g*L,i[6]=f*_+p*M+m*R+g*D,i[10]=f*E+p*T+m*k+g*I,i[14]=f*A+p*C+m*P+g*N,i[3]=v*x+y*S+b*O+w*L,i[7]=v*_+y*M+b*R+w*D,i[11]=v*E+y*T+b*k+w*I,i[15]=v*A+y*C+b*P+w*N,this},t.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},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],l=e[13],c=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*s*u-r*l*u-i*a*h+n*l*h+r*a*d-n*s*d)+e[7]*(+t*s*d-t*l*h+i*o*h-r*o*d+r*l*c-i*s*c)+e[11]*(+t*l*u-t*a*d-i*o*u+n*o*d+i*a*c-n*l*c)+e[15]*(-r*a*c-t*s*u+t*a*h+r*o*u-n*o*h+n*s*c)},t.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},t.setPosition=function(e,t,n){var r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this},t.invert=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],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=u*m*l-p*h*l+p*s*d-a*m*d-u*s*g+a*h*g,y=f*h*l-c*m*l-f*s*d+o*m*d+c*s*g-o*h*g,b=c*p*l-f*u*l+f*a*d-o*p*d-c*a*g+o*u*g,w=f*u*s-c*p*s-f*a*h+o*p*h+c*a*m-o*u*m,x=t*v+n*y+r*b+i*w;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);var _=1/x;return e[0]=v*_,e[1]=(p*h*i-u*m*i-p*r*d+n*m*d+u*r*g-n*h*g)*_,e[2]=(a*m*i-p*s*i+p*r*l-n*m*l-a*r*g+n*s*g)*_,e[3]=(u*s*i-a*h*i-u*r*l+n*h*l+a*r*d-n*s*d)*_,e[4]=y*_,e[5]=(c*m*i-f*h*i+f*r*d-t*m*d-c*r*g+t*h*g)*_,e[6]=(f*s*i-o*m*i-f*r*l+t*m*l+o*r*g-t*s*g)*_,e[7]=(o*h*i-c*s*i+c*r*l-t*h*l-o*r*d+t*s*d)*_,e[8]=b*_,e[9]=(f*u*i-c*p*i-f*n*d+t*p*d+c*n*g-t*u*g)*_,e[10]=(o*p*i-f*a*i+f*n*l-t*p*l-o*n*g+t*a*g)*_,e[11]=(c*a*i-o*u*i-c*n*l+t*u*l+o*n*d-t*a*d)*_,e[12]=w*_,e[13]=(c*p*r-f*u*r+f*n*h-t*p*h-c*n*m+t*u*m)*_,e[14]=(f*a*r-o*p*r-f*n*s+t*p*s+o*n*m-t*a*m)*_,e[15]=(o*u*r-c*a*r+c*n*s-t*u*s-o*n*h+t*a*h)*_,this},t.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},t.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))},t.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},t.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},t.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},t.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},t.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,l=i*o,c=i*a;return this.set(l*o+n,l*a-r*s,l*s+r*a,0,l*a+r*s,c*a+n,c*s-r*o,0,l*s-r*a,c*s+r*o,i*s*s+n,0,0,0,0,1),this},t.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},t.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},t.compose=function(e,t,n){var r=this.elements,i=t._x,o=t._y,a=t._z,s=t._w,l=i+i,c=o+o,u=a+a,h=i*l,d=i*c,f=i*u,p=o*c,m=o*u,g=a*u,v=s*l,y=s*c,b=s*u,w=n.x,x=n.y,_=n.z;return r[0]=(1-(p+g))*w,r[1]=(d+b)*w,r[2]=(f-y)*w,r[3]=0,r[4]=(d-b)*x,r[5]=(1-(h+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*_,r[9]=(m-v)*_,r[10]=(1-(h+p))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this},t.decompose=function(e,t,n){var r=this.elements,i=ne.set(r[0],r[1],r[2]).length(),o=ne.set(r[4],r[5],r[6]).length(),a=ne.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],re.copy(this);var s=1/i,l=1/o,c=1/a;return re.elements[0]*=s,re.elements[1]*=s,re.elements[2]*=s,re.elements[4]*=l,re.elements[5]*=l,re.elements[6]*=l,re.elements[8]*=c,re.elements[9]*=c,re.elements[10]*=c,t.setFromRotationMatrix(re),n.x=i,n.y=o,n.z=a,this},t.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),l=2*i/(n-r),c=(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]=c,a[12]=0,a[1]=0,a[5]=l,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},t.makeOrthographic=function(e,t,n,r,i,o){var a=this.elements,s=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*s,h=(n+r)*l,d=(o+i)*c;return a[0]=2*s,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this},t.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},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=0;n<16;n++)this.elements[n]=e[n+t];return this},t.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},e}(),ne=new T,re=new te,ie=new T(0,0,0),oe=new T(1,1,1),ae=new T,se=new T,le=new T,ce=function(){function e(t,n,r,i){void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=e.DefaultOrder),Object.defineProperty(this,"isEuler",{value:!0}),this._x=t,this._y=n,this._z=r,this._order=i}var t=e.prototype;return t.set=function(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._order=r||this._order,this._onChangeCallback(),this},t.clone=function(){return new this.constructor(this._x,this._y,this._z,this._order)},t.copy=function(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this},t.setFromRotationMatrix=function(e,t,n){var r=g.clamp,i=e.elements,o=i[0],a=i[4],s=i[8],l=i[1],c=i[5],u=i[9],h=i[2],d=i[6],f=i[10];switch(t=t||this._order){case"XYZ":this._y=Math.asin(r(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(d,c),this._z=0);break;case"YXZ":this._x=Math.asin(-r(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(r(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-h,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-r(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(d,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(r(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,f));break;case"XZY":this._z=Math.asin(-r(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!1!==n&&this._onChangeCallback(),this},t.setFromQuaternion=function(e,t,n){return ue.makeRotationFromQuaternion(e),this.setFromRotationMatrix(ue,t,n)},t.setFromVector3=function(e,t){return this.set(e.x,e.y,e.z,t||this._order)},t.reorder=function(e){return he.setFromEuler(this),this.setFromQuaternion(he,e)},t.equals=function(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order},t.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},t.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},t.toVector3=function(e){return e?e.set(this._x,this._y,this._z):new T(this._x,this._y,this._z)},t._onChange=function(e){return this._onChangeCallback=e,this},t._onChangeCallback=function(){},a(e,[{key:"x",get:function(){return this._x},set:function(e){this._x=e,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(e){this._y=e,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(e){this._z=e,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(e){this._order=e,this._onChangeCallback()}}]),e}();ce.DefaultOrder="XYZ",ce.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var ue=new te,he=new M,de=function(){function e(){this.mask=1}var t=e.prototype;return t.set=function(e){this.mask=1<<e|0},t.enable=function(e){this.mask|=1<<e|0},t.enableAll=function(){this.mask=-1},t.toggle=function(e){this.mask^=1<<e|0},t.disable=function(e){this.mask&=~(1<<e|0)},t.disableAll=function(){this.mask=0},t.test=function(e){return 0!==(this.mask&e.mask)},e}(),fe=0,pe=new T,me=new M,ge=new te,ve=new T,ye=new T,be=new T,we=new M,xe=new T(1,0,0),_e=new T(0,1,0),Ee=new T(0,0,1),Ae={type:"added"},Se={type:"removed"};function Me(){Object.defineProperty(this,"id",{value:fe++}),this.uuid=g.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Me.DefaultUp.clone();var e=new T,t=new ce,n=new M,r=new T(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new te},normalMatrix:{value:new y}}),this.matrix=new te,this.matrixWorld=new te,this.matrixAutoUpdate=Me.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new de,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}Me.DefaultUp=new T(0,1,0),Me.DefaultMatrixAutoUpdate=!0,Me.prototype=Object.assign(Object.create(h.prototype),{constructor:Me,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix4:function(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),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:function(e,t){return me.setFromAxisAngle(e,t),this.quaternion.multiply(me),this},rotateOnWorldAxis:function(e,t){return me.setFromAxisAngle(e,t),this.quaternion.premultiply(me),this},rotateX:function(e){return this.rotateOnAxis(xe,e)},rotateY:function(e){return this.rotateOnAxis(_e,e)},rotateZ:function(e){return this.rotateOnAxis(Ee,e)},translateOnAxis:function(e,t){return pe.copy(e).applyQuaternion(this.quaternion),this.position.add(pe.multiplyScalar(t)),this},translateX:function(e){return this.translateOnAxis(xe,e)},translateY:function(e){return this.translateOnAxis(_e,e)},translateZ:function(e){return this.translateOnAxis(Ee,e)},localToWorld:function(e){return e.applyMatrix4(this.matrixWorld)},worldToLocal:function(e){return e.applyMatrix4(ge.copy(this.matrixWorld).invert())},lookAt:function(e,t,n){e.isVector3?ve.copy(e):ve.set(e,t,n);var r=this.parent;this.updateWorldMatrix(!0,!1),ye.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ge.lookAt(ye,ve,this.up):ge.lookAt(ve,ye,this.up),this.quaternion.setFromRotationMatrix(ge),r&&(ge.extractRotation(r.matrixWorld),me.setFromRotationMatrix(ge),this.quaternion.premultiply(me.invert()))},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,this.children.push(e),e.dispatchEvent(Ae)):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,this.children.splice(n,1),e.dispatchEvent(Se)),this},clear:function(){for(var e=0;e<this.children.length;e++){var t=this.children[e];t.parent=null,t.dispatchEvent(Se)}return this.children.length=0,this},attach:function(e){return this.updateWorldMatrix(!0,!1),ge.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),ge.multiply(e.parent.matrixWorld)),e.applyMatrix4(ge),e.updateWorldMatrix(!1,!1),this.add(e),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){return void 0===e&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),e=new T),this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),e=new M),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ye,e,be),e},getWorldScale:function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),e=new T),this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ye,we,e),e},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new T),this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()},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)},updateWorldMatrix:function(e,t){var n=this.parent;if(!0===e&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t)for(var r=this.children,i=0,o=r.length;i<o;i++)r[i].updateWorldMatrix(!1,!0)},toJSON:function(e){var t=void 0===e||"string"===typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},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),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON()),this.isMesh||this.isLine||this.isPoints){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,l=a.length;s<l;s++){var c=a[s];i(e.shapes,c)}else i(e.shapes,a)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){for(var u=[],h=0,d=this.material.length;h<d;h++)u.push(i(e.materials,this.material[h]));r.material=u}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(var f=0;f<this.children.length;f++)r.children.push(this.children[f].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(var p=0;p<this.animations.length;p++){var m=this.animations[p];r.animations.push(i(e.animations,m))}}if(t){var g=E(e.geometries),v=E(e.materials),y=E(e.textures),b=E(e.images),w=E(e.shapes),x=E(e.skeletons),_=E(e.animations);g.length>0&&(n.geometries=g),v.length>0&&(n.materials=v),y.length>0&&(n.textures=y),b.length>0&&(n.images=b),w.length>0&&(n.shapes=w),x.length>0&&(n.skeletons=x),_.length>0&&(n.animations=_)}return n.object=r,n;function E(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.rotation.order=e.rotation.order,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}});var Te=new T,Ce=new T,Oe=new y,Re=function(){function e(e,t){Object.defineProperty(this,"isPlane",{value:!0}),this.normal=void 0!==e?e:new T(1,0,0),this.constant=void 0!==t?t:0}var t=e.prototype;return t.set=function(e,t){return this.normal.copy(e),this.constant=t,this},t.setComponents=function(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this},t.setFromNormalAndCoplanarPoint=function(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this},t.setFromCoplanarPoints=function(e,t,n){var r=Te.subVectors(n,t).cross(Ce.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.normal.copy(e.normal),this.constant=e.constant,this},t.normalize=function(){var e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this},t.negate=function(){return this.constant*=-1,this.normal.negate(),this},t.distanceToPoint=function(e){return this.normal.dot(e)+this.constant},t.distanceToSphere=function(e){return this.distanceToPoint(e.center)-e.radius},t.projectPoint=function(e,t){return void 0===t&&(console.warn("THREE.Plane: .projectPoint() target is now required"),t=new T),t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)},t.intersectLine=function(e,t){void 0===t&&(console.warn("THREE.Plane: .intersectLine() target is now required"),t=new T);var n=e.delta(Te),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):void 0;var i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?void 0:t.copy(n).multiplyScalar(i).add(e.start)},t.intersectsLine=function(e){var t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0},t.intersectsBox=function(e){return e.intersectsPlane(this)},t.intersectsSphere=function(e){return e.intersectsPlane(this)},t.coplanarPoint=function(e){return void 0===e&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),e=new T),e.copy(this.normal).multiplyScalar(-this.constant)},t.applyMatrix4=function(e,t){var n=t||Oe.getNormalMatrix(e),r=this.coplanarPoint(Te).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this},t.translate=function(e){return this.constant-=e.dot(this.normal),this},t.equals=function(e){return e.normal.equals(this.normal)&&e.constant===this.constant},e}(),ke=new T,Pe=new T,Le=new T,De=new T,Ie=new T,Ne=new T,je=new T,Be=new T,Fe=new T,ze=new T,He=function(){function e(e,t,n){this.a=void 0!==e?e:new T,this.b=void 0!==t?t:new T,this.c=void 0!==n?n:new T}e.getNormal=function(e,t,n,r){void 0===r&&(console.warn("THREE.Triangle: .getNormal() target is now required"),r=new T),r.subVectors(n,t),ke.subVectors(e,t),r.cross(ke);var i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)},e.getBarycoord=function(e,t,n,r,i){ke.subVectors(r,t),Pe.subVectors(n,t),Le.subVectors(e,t);var o=ke.dot(ke),a=ke.dot(Pe),s=ke.dot(Le),l=Pe.dot(Pe),c=Pe.dot(Le),u=o*l-a*a;if(void 0===i&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),i=new T),0===u)return i.set(-2,-1,-1);var h=1/u,d=(l*s-a*c)*h,f=(o*c-a*s)*h;return i.set(1-d-f,f,d)},e.containsPoint=function(e,t,n,r){return this.getBarycoord(e,t,n,r,De),De.x>=0&&De.y>=0&&De.x+De.y<=1},e.getUV=function(e,t,n,r,i,o,a,s){return this.getBarycoord(e,t,n,r,De),s.set(0,0),s.addScaledVector(i,De.x),s.addScaledVector(o,De.y),s.addScaledVector(a,De.z),s},e.isFrontFacing=function(e,t,n,r){return ke.subVectors(n,t),Pe.subVectors(e,t),ke.cross(Pe).dot(r)<0};var t=e.prototype;return t.set=function(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this},t.setFromPointsAndIndices=function(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this},t.getArea=function(){return ke.subVectors(this.c,this.b),Pe.subVectors(this.a,this.b),.5*ke.cross(Pe).length()},t.getMidpoint=function(e){return void 0===e&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),e=new T),e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},t.getNormal=function(t){return e.getNormal(this.a,this.b,this.c,t)},t.getPlane=function(e){return void 0===e&&(console.warn("THREE.Triangle: .getPlane() target is now required"),e=new Re),e.setFromCoplanarPoints(this.a,this.b,this.c)},t.getBarycoord=function(t,n){return e.getBarycoord(t,this.a,this.b,this.c,n)},t.getUV=function(t,n,r,i,o){return e.getUV(t,this.a,this.b,this.c,n,r,i,o)},t.containsPoint=function(t){return e.containsPoint(t,this.a,this.b,this.c)},t.isFrontFacing=function(t){return e.isFrontFacing(this.a,this.b,this.c,t)},t.intersectsBox=function(e){return e.intersectsTriangle(this)},t.closestPointToPoint=function(e,t){void 0===t&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),t=new T);var n,r,i=this.a,o=this.b,a=this.c;Ie.subVectors(o,i),Ne.subVectors(a,i),Be.subVectors(e,i);var s=Ie.dot(Be),l=Ne.dot(Be);if(s<=0&&l<=0)return t.copy(i);Fe.subVectors(e,o);var c=Ie.dot(Fe),u=Ne.dot(Fe);if(c>=0&&u<=c)return t.copy(o);var h=s*u-c*l;if(h<=0&&s>=0&&c<=0)return n=s/(s-c),t.copy(i).addScaledVector(Ie,n);ze.subVectors(e,a);var d=Ie.dot(ze),f=Ne.dot(ze);if(f>=0&&d<=f)return t.copy(a);var p=d*l-s*f;if(p<=0&&l>=0&&f<=0)return r=l/(l-f),t.copy(i).addScaledVector(Ne,r);var m=c*f-d*u;if(m<=0&&u-c>=0&&d-f>=0)return je.subVectors(a,o),r=(u-c)/(u-c+(d-f)),t.copy(o).addScaledVector(je,r);var g=1/(m+p+h);return n=p*g,r=h*g,t.copy(i).addScaledVector(Ie,n).addScaledVector(Ne,r)},t.equals=function(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)},e}(),Ue={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},Ve={h:0,s:0,l:0},Ge={h:0,s:0,l:0};function We(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}function qe(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Xe(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}var Ye=function(){function e(e,t,n){return Object.defineProperty(this,"isColor",{value:!0}),void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}var t=e.prototype;return t.set=function(e){return e&&e.isColor?this.copy(e):"number"===typeof e?this.setHex(e):"string"===typeof e&&this.setStyle(e),this},t.setScalar=function(e){return this.r=e,this.g=e,this.b=e,this},t.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},t.setRGB=function(e,t,n){return this.r=e,this.g=t,this.b=n,this},t.setHSL=function(e,t,n){if(e=g.euclideanModulo(e,1),t=g.clamp(t,0,1),n=g.clamp(n,0,1),0===t)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=We(i,r,e+1/3),this.g=We(i,r,e),this.b=We(i,r,e-1/3)}return this},t.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?)\(([^\)]*)\)/.exec(e)){var r,i=n[1],o=n[2];switch(i){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\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[4]),this;if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\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[4]),this;break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){var a=parseFloat(r[1])/360,s=parseInt(r[2],10)/100,l=parseInt(r[3],10)/100;return t(r[4]),this.setHSL(a,s,l)}}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){var c=n[1],u=c.length;if(3===u)return this.r=parseInt(c.charAt(0)+c.charAt(0),16)/255,this.g=parseInt(c.charAt(1)+c.charAt(1),16)/255,this.b=parseInt(c.charAt(2)+c.charAt(2),16)/255,this;if(6===u)return this.r=parseInt(c.charAt(0)+c.charAt(1),16)/255,this.g=parseInt(c.charAt(2)+c.charAt(3),16)/255,this.b=parseInt(c.charAt(4)+c.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this},t.setColorName=function(e){var t=Ue[e];return void 0!==t?this.setHex(t):console.warn("THREE.Color: Unknown color "+e),this},t.clone=function(){return new this.constructor(this.r,this.g,this.b)},t.copy=function(e){return this.r=e.r,this.g=e.g,this.b=e.b,this},t.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},t.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},t.convertGammaToLinear=function(e){return this.copyGammaToLinear(this,e),this},t.convertLinearToGamma=function(e){return this.copyLinearToGamma(this,e),this},t.copySRGBToLinear=function(e){return this.r=qe(e.r),this.g=qe(e.g),this.b=qe(e.b),this},t.copyLinearToSRGB=function(e){return this.r=Xe(e.r),this.g=Xe(e.g),this.b=Xe(e.b),this},t.convertSRGBToLinear=function(){return this.copySRGBToLinear(this),this},t.convertLinearToSRGB=function(){return this.copyLinearToSRGB(this),this},t.getHex=function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},t.getHexString=function(){return("000000"+this.getHex().toString(16)).slice(-6)},t.getHSL=function(e){void 0===e&&(console.warn("THREE.Color: .getHSL() target is now required"),e={h:0,s:0,l:0});var t,n,r=this.r,i=this.g,o=this.b,a=Math.max(r,i,o),s=Math.min(r,i,o),l=(s+a)/2;if(s===a)t=0,n=0;else{var c=a-s;switch(n=l<=.5?c/(a+s):c/(2-a-s),a){case r:t=(i-o)/c+(i<o?6:0);break;case i:t=(o-r)/c+2;break;case o:t=(r-i)/c+4}t/=6}return e.h=t,e.s=n,e.l=l,e},t.getStyle=function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},t.offsetHSL=function(e,t,n){return this.getHSL(Ve),Ve.h+=e,Ve.s+=t,Ve.l+=n,this.setHSL(Ve.h,Ve.s,Ve.l),this},t.add=function(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this},t.addColors=function(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this},t.addScalar=function(e){return this.r+=e,this.g+=e,this.b+=e,this},t.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},t.multiply=function(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this},t.multiplyScalar=function(e){return this.r*=e,this.g*=e,this.b*=e,this},t.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},t.lerpColors=function(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this},t.lerpHSL=function(e,t){this.getHSL(Ve),e.getHSL(Ge);var n=g.lerp(Ve.h,Ge.h,t),r=g.lerp(Ve.s,Ge.s,t),i=g.lerp(Ve.l,Ge.l,t);return this.setHSL(n,r,i),this},t.equals=function(e){return e.r===this.r&&e.g===this.g&&e.b===this.b},t.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},t.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},t.fromBufferAttribute=function(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this},t.toJSON=function(){return this.getHex()},e}();Ye.NAMES=Ue,Ye.prototype.r=1,Ye.prototype.g=1,Ye.prototype.b=1;var Ke=function(){function e(e,t,n,r,i,o){void 0===o&&(o=0),this.a=e,this.b=t,this.c=n,this.normal=r&&r.isVector3?r:new T,this.vertexNormals=Array.isArray(r)?r:[],this.color=i&&i.isColor?i:new Ye,this.vertexColors=Array.isArray(i)?i:[],this.materialIndex=o}var t=e.prototype;return t.clone=function(){return(new this.constructor).copy(this)},t.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(var r=0,i=e.vertexColors.length;r<i;r++)this.vertexColors[r]=e.vertexColors[r].clone();return this},e}(),Qe=0;function Ze(){Object.defineProperty(this,"id",{value:Qe++}),this.uuid=g.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=!1,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.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,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.visible=!0,this.toneMapped=!0,this.userData={},this.version=0}function Je(e){Ze.call(this),this.type="MeshBasicMaterial",this.color=new Ye(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.setValues(e)}Ze.prototype=Object.assign(Object.create(h.prototype),{constructor:Ze,isMaterial:!0,onBeforeCompile:function(){},customProgramCacheKey:function(){return this.onBeforeCompile.toString()},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]=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.sheen&&this.sheen.isColor&&(n.sheen=this.sheen.getHex()),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&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.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.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.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),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.normalMapType=this.normalMapType,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,n.refractionRatio=this.refractionRatio,void 0!==this.combine&&(n.combine=this.combine),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity)),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),this.vertexColors&&(n.vertexColors=!0),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,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&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.morphNormals&&(n.morphNormals=!0),!0===this.skinning&&(n.skinning=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!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.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.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;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.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,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.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(Ze.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Je.prototype=Object.create(Ze.prototype),Je.prototype.constructor=Je,Je.prototype.isMeshBasicMaterial=!0,Je.prototype.copy=function(e){return Ze.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};var $e=new T,et=new v;function tt(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0}function nt(e,t,n){tt.call(this,new Int8Array(e),t,n)}function rt(e,t,n){tt.call(this,new Uint8Array(e),t,n)}function it(e,t,n){tt.call(this,new Uint8ClampedArray(e),t,n)}function ot(e,t,n){tt.call(this,new Int16Array(e),t,n)}function at(e,t,n){tt.call(this,new Uint16Array(e),t,n)}function st(e,t,n){tt.call(this,new Int32Array(e),t,n)}function lt(e,t,n){tt.call(this,new Uint32Array(e),t,n)}function ct(e,t,n){tt.call(this,new Uint16Array(e),t,n)}function ut(e,t,n){tt.call(this,new Float32Array(e),t,n)}function ht(e,t,n){tt.call(this,new Float64Array(e),t,n)}function dt(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}Object.defineProperty(tt.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(tt.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,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 Ye),t[n++]=o.r,t[n++]=o.g,t[n++]=o.b}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 v),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 T),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 E),t[n++]=o.x,t[n++]=o.y,t[n++]=o.z,t[n++]=o.w}return this},applyMatrix3:function(e){if(2===this.itemSize)for(var t=0,n=this.count;t<n;t++)et.fromBufferAttribute(this,t),et.applyMatrix3(e),this.setXY(t,et.x,et.y);else if(3===this.itemSize)for(var r=0,i=this.count;r<i;r++)$e.fromBufferAttribute(this,r),$e.applyMatrix3(e),this.setXYZ(r,$e.x,$e.y,$e.z);return this},applyMatrix4:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.applyMatrix4(e),this.setXYZ(t,$e.x,$e.y,$e.z);return this},applyNormalMatrix:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.applyNormalMatrix(e),this.setXYZ(t,$e.x,$e.y,$e.z);return this},transformDirection:function(e){for(var t=0,n=this.count;t<n;t++)$e.x=this.getX(t),$e.y=this.getY(t),$e.z=this.getZ(t),$e.transformDirection(e),this.setXYZ(t,$e.x,$e.y,$e.z);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)},toJSON:function(){return{itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized}}}),nt.prototype=Object.create(tt.prototype),nt.prototype.constructor=nt,rt.prototype=Object.create(tt.prototype),rt.prototype.constructor=rt,it.prototype=Object.create(tt.prototype),it.prototype.constructor=it,ot.prototype=Object.create(tt.prototype),ot.prototype.constructor=ot,at.prototype=Object.create(tt.prototype),at.prototype.constructor=at,st.prototype=Object.create(tt.prototype),st.prototype.constructor=st,lt.prototype=Object.create(tt.prototype),lt.prototype.constructor=lt,ct.prototype=Object.create(tt.prototype),ct.prototype.constructor=ct,ct.prototype.isFloat16BufferAttribute=!0,ut.prototype=Object.create(tt.prototype),ut.prototype.constructor=ut,ht.prototype=Object.create(tt.prototype),ht.prototype.constructor=ht;var ft={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!==typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function pt(e,t){return new ft[e](t)}var mt=0,gt=new te,vt=new Me,yt=new T,bt=new R,wt=new R,xt=new T;function _t(){Object.defineProperty(this,"id",{value:mt++}),this.uuid=g.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}_t.prototype=Object.assign(Object.create(h.prototype),{constructor:_t,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(e){return Array.isArray(e)?this.index=new(dt(e)>65535?lt:at)(e,1):this.index=e,this},getAttribute:function(e){return this.attributes[e]},setAttribute:function(e,t){return this.attributes[e]=t,this},deleteAttribute:function(e){return delete this.attributes[e],this},hasAttribute:function(e){return void 0!==this.attributes[e]},addGroup:function(e,t,n){void 0===n&&(n=0),this.groups.push({start:e,count:t,materialIndex:n})},clearGroups:function(){this.groups=[]},setDrawRange:function(e,t){this.drawRange.start=e,this.drawRange.count=t},applyMatrix4:function(e){var t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);var n=this.attributes.normal;if(void 0!==n){var r=(new y).getNormalMatrix(e);n.applyNormalMatrix(r),n.needsUpdate=!0}var i=this.attributes.tangent;return void 0!==i&&(i.transformDirection(e),i.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(e){return gt.makeRotationX(e),this.applyMatrix4(gt),this},rotateY:function(e){return gt.makeRotationY(e),this.applyMatrix4(gt),this},rotateZ:function(e){return gt.makeRotationZ(e),this.applyMatrix4(gt),this},translate:function(e,t,n){return gt.makeTranslation(e,t,n),this.applyMatrix4(gt),this},scale:function(e,t,n){return gt.makeScale(e,t,n),this.applyMatrix4(gt),this},lookAt:function(e){return vt.lookAt(e),vt.updateMatrix(),this.applyMatrix4(vt.matrix),this},center:function(){return this.computeBoundingBox(),this.boundingBox.getCenter(yt).negate(),this.translate(yt.x,yt.y,yt.z),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.setAttribute("position",new ut(t,3)),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new R);var e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new T(-1/0,-1/0,-1/0),new T(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(var n=0,r=t.length;n<r;n++){var i=t[n];bt.setFromBufferAttribute(i),this.morphTargetsRelative?(xt.addVectors(this.boundingBox.min,bt.min),this.boundingBox.expandByPoint(xt),xt.addVectors(this.boundingBox.max,bt.max),this.boundingBox.expandByPoint(xt)):(this.boundingBox.expandByPoint(bt.min),this.boundingBox.expandByPoint(bt.max))}}else 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(){null===this.boundingSphere&&(this.boundingSphere=new q);var e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new T,1/0);if(e){var n=this.boundingSphere.center;if(bt.setFromBufferAttribute(e),t)for(var r=0,i=t.length;r<i;r++){var o=t[r];wt.setFromBufferAttribute(o),this.morphTargetsRelative?(xt.addVectors(bt.min,wt.min),bt.expandByPoint(xt),xt.addVectors(bt.max,wt.max),bt.expandByPoint(xt)):(bt.expandByPoint(wt.min),bt.expandByPoint(wt.max))}bt.getCenter(n);for(var a=0,s=0,l=e.count;s<l;s++)xt.fromBufferAttribute(e,s),a=Math.max(a,n.distanceToSquared(xt));if(t)for(var c=0,u=t.length;c<u;c++)for(var h=t[c],d=this.morphTargetsRelative,f=0,p=h.count;f<p;f++)xt.fromBufferAttribute(h,f),d&&(yt.fromBufferAttribute(e,f),xt.add(yt)),a=Math.max(a,n.distanceToSquared(xt));this.boundingSphere.radius=Math.sqrt(a),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(){},computeTangents:function(){var e=this.index,t=this.attributes;if(null!==e&&void 0!==t.position&&void 0!==t.normal&&void 0!==t.uv){var n=e.array,r=t.position.array,i=t.normal.array,o=t.uv.array,a=r.length/3;void 0===t.tangent&&this.setAttribute("tangent",new tt(new Float32Array(4*a),4));for(var s=t.tangent.array,l=[],c=[],u=0;u<a;u++)l[u]=new T,c[u]=new T;var h=new T,d=new T,f=new T,p=new v,m=new v,g=new v,y=new T,b=new T,w=this.groups;0===w.length&&(w=[{start:0,count:n.length}]);for(var x=0,_=w.length;x<_;++x)for(var E=w[x],A=E.start,S=A,M=A+E.count;S<M;S+=3)B(n[S+0],n[S+1],n[S+2]);for(var C=new T,O=new T,R=new T,k=new T,P=0,L=w.length;P<L;++P)for(var D=w[P],I=D.start,N=I,j=I+D.count;N<j;N+=3)F(n[N+0]),F(n[N+1]),F(n[N+2])}else console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");function B(e,t,n){h.fromArray(r,3*e),d.fromArray(r,3*t),f.fromArray(r,3*n),p.fromArray(o,2*e),m.fromArray(o,2*t),g.fromArray(o,2*n),d.sub(h),f.sub(h),m.sub(p),g.sub(p);var i=1/(m.x*g.y-g.x*m.y);isFinite(i)&&(y.copy(d).multiplyScalar(g.y).addScaledVector(f,-m.y).multiplyScalar(i),b.copy(f).multiplyScalar(m.x).addScaledVector(d,-g.x).multiplyScalar(i),l[e].add(y),l[t].add(y),l[n].add(y),c[e].add(b),c[t].add(b),c[n].add(b))}function F(e){R.fromArray(i,3*e),k.copy(R);var t=l[e];C.copy(t),C.sub(R.multiplyScalar(R.dot(t))).normalize(),O.crossVectors(k,t);var n=O.dot(c[e])<0?-1:1;s[4*e]=C.x,s[4*e+1]=C.y,s[4*e+2]=C.z,s[4*e+3]=n}},computeVertexNormals:function(){var e=this.index,t=this.getAttribute("position");if(void 0!==t){var n=this.getAttribute("normal");if(void 0===n)n=new tt(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(var r=0,i=n.count;r<i;r++)n.setXYZ(r,0,0,0);var o=new T,a=new T,s=new T,l=new T,c=new T,u=new T,h=new T,d=new T;if(e)for(var f=0,p=e.count;f<p;f+=3){var m=e.getX(f+0),g=e.getX(f+1),v=e.getX(f+2);o.fromBufferAttribute(t,m),a.fromBufferAttribute(t,g),s.fromBufferAttribute(t,v),h.subVectors(s,a),d.subVectors(o,a),h.cross(d),l.fromBufferAttribute(n,m),c.fromBufferAttribute(n,g),u.fromBufferAttribute(n,v),l.add(h),c.add(h),u.add(h),n.setXYZ(m,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z),n.setXYZ(v,u.x,u.y,u.z)}else for(var y=0,b=t.count;y<b;y+=3)o.fromBufferAttribute(t,y+0),a.fromBufferAttribute(t,y+1),s.fromBufferAttribute(t,y+2),h.subVectors(s,a),d.subVectors(o,a),h.cross(d),n.setXYZ(y+0,h.x,h.y,h.z),n.setXYZ(y+1,h.x,h.y,h.z),n.setXYZ(y+2,h.x,h.y,h.z);this.normalizeNormals(),n.needsUpdate=!0}},merge:function(e,t){if(e&&e.isBufferGeometry){void 0===t&&(t=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));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=o.itemSize*t,l=Math.min(a.length,i.length-s),c=0,u=s;c<l;c++,u++)i[u]=a[c];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",e)},normalizeNormals:function(){for(var e=this.attributes.normal,t=0,n=e.count;t<n;t++)xt.fromBufferAttribute(e,t),xt.normalize(),e.setXYZ(t,xt.x,xt.y,xt.z)},toNonIndexed:function(){function e(e,t){for(var n=e.array,r=e.itemSize,i=e.normalized,o=new n.constructor(t.length*r),a=0,s=0,l=0,c=t.length;l<c;l++){a=t[l]*r;for(var u=0;u<r;u++)o[s++]=n[a++]}return new tt(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;var t=new _t,n=this.index.array,r=this.attributes;for(var i in r){var o=e(r[i],n);t.setAttribute(i,o)}var a=this.morphAttributes;for(var s in a){for(var l=[],c=a[s],u=0,h=c.length;u<h;u++){var d=e(c[u],n);l.push(d)}t.morphAttributes[s]=l}t.morphTargetsRelative=this.morphTargetsRelative;for(var f=this.groups,p=0,m=f.length;p<m;p++){var g=f[p];t.addGroup(g.start,g.count,g.materialIndex)}return t},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),Object.keys(this.userData).length>0&&(e.userData=this.userData),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;null!==r&&(e.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});var i=this.attributes;for(var o in i){var a=i[o],s=a.toJSON(e.data);""!==a.name&&(s.name=a.name),e.data.attributes[o]=s}var l={},c=!1;for(var u in this.morphAttributes){for(var h=this.morphAttributes[u],d=[],f=0,p=h.length;f<p;f++){var m=h[f],g=m.toJSON(e.data);""!==m.name&&(g.name=m.name),d.push(g)}d.length>0&&(l[u]=d,c=!0)}c&&(e.data.morphAttributes=l,e.data.morphTargetsRelative=this.morphTargetsRelative);var v=this.groups;v.length>0&&(e.data.groups=JSON.parse(JSON.stringify(v)));var y=this.boundingSphere;return null!==y&&(e.data.boundingSphere={center:y.center.toArray(),radius:y.radius}),e},clone:function(){return(new _t).copy(this)},copy:function(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;var t={};this.name=e.name;var n=e.index;null!==n&&this.setIndex(n.clone(t));var r=e.attributes;for(var i in r){var o=r[i];this.setAttribute(i,o.clone(t))}var a=e.morphAttributes;for(var s in a){for(var l=[],c=a[s],u=0,h=c.length;u<h;u++)l.push(c[u].clone(t));this.morphAttributes[s]=l}this.morphTargetsRelative=e.morphTargetsRelative;for(var d=e.groups,f=0,p=d.length;f<p;f++){var m=d[f];this.addGroup(m.start,m.count,m.materialIndex)}var g=e.boundingBox;null!==g&&(this.boundingBox=g.clone());var v=e.boundingSphere;return null!==v&&(this.boundingSphere=v.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}});var Et=new te,At=new ee,St=new q,Mt=new T,Tt=new T,Ct=new T,Ot=new T,Rt=new T,kt=new T,Pt=new T,Lt=new T,Dt=new T,It=new v,Nt=new v,jt=new v,Bt=new T,Ft=new T;function zt(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new Je),Me.call(this),this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}function Ht(e,t,n,r,i,o,a,s,l,c,u,h){Mt.fromBufferAttribute(i,c),Tt.fromBufferAttribute(i,u),Ct.fromBufferAttribute(i,h);var d=e.morphTargetInfluences;if(t.morphTargets&&o&&d){Pt.set(0,0,0),Lt.set(0,0,0),Dt.set(0,0,0);for(var f=0,p=o.length;f<p;f++){var m=d[f],g=o[f];0!==m&&(Ot.fromBufferAttribute(g,c),Rt.fromBufferAttribute(g,u),kt.fromBufferAttribute(g,h),a?(Pt.addScaledVector(Ot,m),Lt.addScaledVector(Rt,m),Dt.addScaledVector(kt,m)):(Pt.addScaledVector(Ot.sub(Mt),m),Lt.addScaledVector(Rt.sub(Tt),m),Dt.addScaledVector(kt.sub(Ct),m)))}Mt.add(Pt),Tt.add(Lt),Ct.add(Dt)}e.isSkinnedMesh&&(e.boneTransform(c,Mt),e.boneTransform(u,Tt),e.boneTransform(h,Ct));var y=function(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;Ft.copy(s),Ft.applyMatrix4(e.matrixWorld);var l=n.ray.origin.distanceTo(Ft);return l<n.near||l>n.far?null:{distance:l,point:Ft.clone(),object:e}}(e,t,n,r,Mt,Tt,Ct,Bt);if(y){s&&(It.fromBufferAttribute(s,c),Nt.fromBufferAttribute(s,u),jt.fromBufferAttribute(s,h),y.uv=He.getUV(Bt,Mt,Tt,Ct,It,Nt,jt,new v)),l&&(It.fromBufferAttribute(l,c),Nt.fromBufferAttribute(l,u),jt.fromBufferAttribute(l,h),y.uv2=He.getUV(Bt,Mt,Tt,Ct,It,Nt,jt,new v));var b=new Ke(c,u,h);He.getNormal(Mt,Tt,Ct,b.normal),y.face=b}return y}zt.prototype=Object.assign(Object.create(Me.prototype),{constructor:zt,isMesh:!0,copy:function(e){return Me.prototype.copy.call(this,e),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},raycast:function(e,t){var n,r=this.geometry,i=this.material,o=this.matrixWorld;if(void 0!==i&&(null===r.boundingSphere&&r.computeBoundingSphere(),St.copy(r.boundingSphere),St.applyMatrix4(o),!1!==e.ray.intersectsSphere(St)&&(Et.copy(o).invert(),At.copy(e.ray).applyMatrix4(Et),null===r.boundingBox||!1!==At.intersectsBox(r.boundingBox))))if(r.isBufferGeometry){var a=r.index,s=r.attributes.position,l=r.morphAttributes.position,c=r.morphTargetsRelative,u=r.attributes.uv,h=r.attributes.uv2,d=r.groups,f=r.drawRange;if(null!==a)if(Array.isArray(i))for(var p=0,m=d.length;p<m;p++)for(var g=d[p],v=i[g.materialIndex],y=Math.max(g.start,f.start),b=Math.min(g.start+g.count,f.start+f.count);y<b;y+=3){var w=a.getX(y),x=a.getX(y+1),_=a.getX(y+2);(n=Ht(this,v,e,At,s,l,c,u,h,w,x,_))&&(n.faceIndex=Math.floor(y/3),n.face.materialIndex=g.materialIndex,t.push(n))}else for(var E=Math.max(0,f.start),A=Math.min(a.count,f.start+f.count);E<A;E+=3){var S=a.getX(E),M=a.getX(E+1),T=a.getX(E+2);(n=Ht(this,i,e,At,s,l,c,u,h,S,M,T))&&(n.faceIndex=Math.floor(E/3),t.push(n))}else if(void 0!==s)if(Array.isArray(i))for(var C=0,O=d.length;C<O;C++)for(var R=d[C],k=i[R.materialIndex],P=Math.max(R.start,f.start),L=Math.min(R.start+R.count,f.start+f.count);P<L;P+=3)(n=Ht(this,k,e,At,s,l,c,u,h,P,P+1,P+2))&&(n.faceIndex=Math.floor(P/3),n.face.materialIndex=R.materialIndex,t.push(n));else for(var D=Math.max(0,f.start),I=Math.min(s.count,f.start+f.count);D<I;D+=3)(n=Ht(this,i,e,At,s,l,c,u,h,D,D+1,D+2))&&(n.faceIndex=Math.floor(D/3),t.push(n))}else r.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}});var Ut=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1),void 0===o&&(o=1),void 0===a&&(a=1),(s=e.call(this)||this).type="BoxGeometry",s.parameters={width:t,height:n,depth:r,widthSegments:i,heightSegments:o,depthSegments:a};var c=l(s);i=Math.floor(i),o=Math.floor(o),a=Math.floor(a);var u=[],h=[],d=[],f=[],p=0,m=0;function g(e,t,n,r,i,o,a,s,l,g,v){for(var y=o/l,b=a/g,w=o/2,x=a/2,_=s/2,E=l+1,A=g+1,S=0,M=0,C=new T,O=0;O<A;O++)for(var R=O*b-x,k=0;k<E;k++){var P=k*y-w;C[e]=P*r,C[t]=R*i,C[n]=_,h.push(C.x,C.y,C.z),C[e]=0,C[t]=0,C[n]=s>0?1:-1,d.push(C.x,C.y,C.z),f.push(k/l),f.push(1-O/g),S+=1}for(var L=0;L<g;L++)for(var D=0;D<l;D++){var I=p+D+E*L,N=p+D+E*(L+1),j=p+(D+1)+E*(L+1),B=p+(D+1)+E*L;u.push(I,N,B),u.push(N,j,B),M+=6}c.addGroup(m,M,v),m+=M,p+=S}return g("z","y","x",-1,-1,r,n,t,a,o,0),g("z","y","x",1,-1,r,n,-t,a,o,1),g("x","z","y",1,1,t,r,n,i,a,2),g("x","z","y",1,-1,t,r,-n,i,a,3),g("x","y","z",1,-1,t,n,r,i,o,4),g("x","y","z",-1,-1,t,n,-r,i,o,5),s.setIndex(u),s.setAttribute("position",new ut(h,3)),s.setAttribute("normal",new ut(d,3)),s.setAttribute("uv",new ut(f,2)),s}return s(t,e),t}(_t);function Vt(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}function Gt(e){for(var t={},n=0;n<e.length;n++){var r=Vt(e[n]);for(var i in r)t[i]=r[i]}return t}var Wt={clone:Vt,merge:Gt};function qt(e){Ze.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,this.glslVersion=null,void 0!==e&&(void 0!==e.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(e))}function Xt(){Me.call(this),this.type="Camera",this.matrixWorldInverse=new te,this.projectionMatrix=new te,this.projectionMatrixInverse=new te}function Yt(e,t,n,r){void 0===e&&(e=50),void 0===t&&(t=1),void 0===n&&(n=.1),void 0===r&&(r=2e3),Xt.call(this),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Kt(e,t,n){if(Me.call(this),this.type="CubeCamera",!0===n.isWebGLCubeRenderTarget){this.renderTarget=n;var r=new Yt(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new T(1,0,0)),this.add(r);var i=new Yt(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new T(-1,0,0)),this.add(i);var o=new Yt(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new T(0,1,0)),this.add(o);var a=new Yt(90,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new T(0,-1,0)),this.add(a);var s=new Yt(90,1,e,t);s.layers=this.layers,s.up.set(0,-1,0),s.lookAt(new T(0,0,1)),this.add(s);var l=new Yt(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new T(0,0,-1)),this.add(l),this.update=function(e,t){null===this.parent&&this.updateMatrixWorld();var c=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;var h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=c}}else console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.")}function Qt(e,t,n,r,i,o,a,s,l,c){e=void 0!==e?e:[],t=void 0!==t?t:301,a=void 0!==a?a:1022,x.call(this,e,t,n,r,i,o,a,s,l,c),this.flipY=!1,this._needsFlipEnvMap=!0}qt.prototype=Object.create(Ze.prototype),qt.prototype.constructor=qt,qt.prototype.isShaderMaterial=!0,qt.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Vt(e.uniforms),this.defines=Object.assign({},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=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this},qt.prototype.toJSON=function(e){var t=Ze.prototype.toJSON.call(this,e);for(var n in t.glslVersion=this.glslVersion,t.uniforms={},this.uniforms){var r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;var i={};for(var o in this.extensions)!0===this.extensions[o]&&(i[o]=!0);return Object.keys(i).length>0&&(t.extensions=i),t},Xt.prototype=Object.assign(Object.create(Me.prototype),{constructor:Xt,isCamera:!0,copy:function(e,t){return Me.prototype.copy.call(this,e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this},getWorldDirection:function(e){void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new T),this.updateWorldMatrix(!0,!1);var t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()},updateMatrixWorld:function(e){Me.prototype.updateMatrixWorld.call(this,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()},updateWorldMatrix:function(e,t){Me.prototype.updateWorldMatrix.call(this,e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()},clone:function(){return(new this.constructor).copy(this)}}),Yt.prototype=Object.assign(Object.create(Xt.prototype),{constructor:Yt,isPerspectiveCamera:!0,copy:function(e,t){return Xt.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*g.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var e=Math.tan(.5*g.DEG2RAD*this.fov);return.5*this.getFilmHeight()/e},getEffectiveFOV:function(){return 2*g.RAD2DEG*Math.atan(Math.tan(.5*g.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*g.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 l=this.filmOffset;0!==l&&(i+=e*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()},toJSON:function(e){var t=Me.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}}),Kt.prototype=Object.create(Me.prototype),Kt.prototype.constructor=Kt,Qt.prototype=Object.create(x.prototype),Qt.prototype.constructor=Qt,Qt.prototype.isCubeTexture=!0,Object.defineProperty(Qt.prototype,"images",{get:function(){return this.image},set:function(e){this.image=e}});var Zt=function(e){function t(t,n,r){var i;return Number.isInteger(n)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),n=r),i=e.call(this,t,t,n)||this,Object.defineProperty(l(i),"isWebGLCubeRenderTarget",{value:!0}),n=n||{},i.texture=new Qt(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),i.texture._needsFlipEnvMap=!1,i}s(t,e);var n=t.prototype;return n.fromEquirectangularTexture=function(e,t){this.texture.type=t.type,this.texture.format=1023,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;var n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",o=new Ut(5,5,5),a=new qt({name:"CubemapFromEquirect",uniforms:Vt(n),vertexShader:r,fragmentShader:i,side:1,blending:0});a.uniforms.tEquirect.value=t;var s=new zt(o,a),l=t.minFilter;return 1008===t.minFilter&&(t.minFilter=1006),new Kt(1,10,this).update(e,s),t.minFilter=l,s.geometry.dispose(),s.material.dispose(),this},n.clear=function(e,t,n,r){for(var i=e.getRenderTarget(),o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,r);e.setRenderTarget(i)},t}(A);function Jt(e,t,n,r,i,o,a,s,l,c,u,h){x.call(this,null,o,a,s,l,c,r,i,u,h),this.image={data:e||null,width:t||1,height:n||1},this.magFilter=void 0!==l?l:1003,this.minFilter=void 0!==c?c:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.needsUpdate=!0}Jt.prototype=Object.create(x.prototype),Jt.prototype.constructor=Jt,Jt.prototype.isDataTexture=!0;var $t=new q,en=new T,tn=function(){function e(e,t,n,r,i,o){this.planes=[void 0!==e?e:new Re,void 0!==t?t:new Re,void 0!==n?n:new Re,void 0!==r?r:new Re,void 0!==i?i:new Re,void 0!==o?o:new Re]}var t=e.prototype;return t.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},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){for(var t=this.planes,n=0;n<6;n++)t[n].copy(e.planes[n]);return this},t.setFromProjectionMatrix=function(e){var t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(a-r,u-s,p-h,y-m).normalize(),t[1].setComponents(a+r,u+s,p+h,y+m).normalize(),t[2].setComponents(a+i,u+l,p+d,y+g).normalize(),t[3].setComponents(a-i,u-l,p-d,y-g).normalize(),t[4].setComponents(a-o,u-c,p-f,y-v).normalize(),t[5].setComponents(a+o,u+c,p+f,y+v).normalize(),this},t.intersectsObject=function(e){var t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),$t.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere($t)},t.intersectsSprite=function(e){return $t.center.set(0,0,0),$t.radius=.7071067811865476,$t.applyMatrix4(e.matrixWorld),this.intersectsSphere($t)},t.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},t.intersectsBox=function(e){for(var t=this.planes,n=0;n<6;n++){var r=t[n];if(en.x=r.normal.x>0?e.max.x:e.min.x,en.y=r.normal.y>0?e.max.y:e.min.y,en.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(en)<0)return!1}return!0},t.containsPoint=function(e){for(var t=this.planes,n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0},e}();function nn(){var e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function rn(e,t){var n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);var n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){var o=r.get(t);(!o||o.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version})}else{t.isInterleavedBufferAttribute&&(t=t.data);var a=r.get(t);void 0===a?r.set(t,function(t,r){var i=t.array,o=t.usage,a=e.createBuffer();e.bindBuffer(r,a),e.bufferData(r,i,o),t.onUploadCallback();var s=5126;return i instanceof Float32Array?s=5126:i instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):i instanceof Uint16Array?t.isFloat16BufferAttribute?n?s=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):s=5123:i instanceof Int16Array?s=5122:i instanceof Uint32Array?s=5125:i instanceof Int32Array?s=5124:i instanceof Int8Array?s=5120:i instanceof Uint8Array&&(s=5121),{buffer:a,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):a.version<t.version&&(function(t,r,i){var o=r.array,a=r.updateRange;e.bindBuffer(i,t),-1===a.count?e.bufferSubData(i,0,o):(n?e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o,a.offset,a.count):e.bufferSubData(i,a.offset*o.BYTES_PER_ELEMENT,o.subarray(a.offset,a.offset+a.count)),a.count=-1)}(a.buffer,t,i),a.version=t.version)}}}}var on=function(e){function t(t,n,r,i){var o;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=1),(o=e.call(this)||this).type="PlaneGeometry",o.parameters={width:t,height:n,widthSegments:r,heightSegments:i};for(var a=t/2,s=n/2,l=Math.floor(r),c=Math.floor(i),u=l+1,h=c+1,d=t/l,f=n/c,p=[],m=[],g=[],v=[],y=0;y<h;y++)for(var b=y*f-s,w=0;w<u;w++){var x=w*d-a;m.push(x,-b,0),g.push(0,0,1),v.push(w/l),v.push(1-y/c)}for(var _=0;_<c;_++)for(var E=0;E<l;E++){var A=E+u*_,S=E+u*(_+1),M=E+1+u*(_+1),T=E+1+u*_;p.push(A,S,T),p.push(S,M,T)}return o.setIndex(p),o.setAttribute("position",new ut(m,3)),o.setAttribute("normal",new ut(g,3)),o.setAttribute("uv",new ut(v,2)),o}return s(t,e),t}(_t),an={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor.xyz *= color.xyz;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n\t\tvec2 f = fract( uv );\n\t\tuv += 0.5 - f;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x += texelSize;\n\t\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.y += texelSize;\n\t\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tuv.x -= texelSize;\n\t\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n\t\tvec3 tm = mix( tl, tr, f.x );\n\t\tvec3 bm = mix( bl, br, f.x );\n\t\treturn mix( tm, bm, f.y );\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\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.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\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.a );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tfogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat specularRoughness;\n\tvec3 specularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(\t\t0, 1,\t\t0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\t\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\t\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t\tf.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(\t1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,\t1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,\t1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmissionmap_fragment:"#ifdef USE_TRANSMISSIONMAP\n\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\n#endif",transmissionmap_pars_fragment:"#ifdef USE_TRANSMISSIONMAP\n\tuniform sampler2D transmissionMap;\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSMISSION\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSMISSION\n\tuniform float transmission;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <transmissionmap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#ifdef TRANSMISSION\n\t\tfloat totalTransmission = transmission;\n\t#endif\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <transmissionmap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSMISSION\n\t\tdiffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}"},sn={common:{diffuse:{value:new Ye(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new y},uv2Transform:{value:new y},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},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 v(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 Ye(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ye(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},uvTransform:{value:new y}},sprite:{diffuse:{value:new Ye(15658734)},opacity:{value:1},center:{value:new v(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},uvTransform:{value:new y}}},ln={basic:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.fog]),vertexShader:an.meshbasic_vert,fragmentShader:an.meshbasic_frag},lambert:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.fog,sn.lights,{emissive:{value:new Ye(0)}}]),vertexShader:an.meshlambert_vert,fragmentShader:an.meshlambert_frag},phong:{uniforms:Gt([sn.common,sn.specularmap,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)},specular:{value:new Ye(1118481)},shininess:{value:30}}]),vertexShader:an.meshphong_vert,fragmentShader:an.meshphong_frag},standard:{uniforms:Gt([sn.common,sn.envmap,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.roughnessmap,sn.metalnessmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:an.meshphysical_vert,fragmentShader:an.meshphysical_frag},toon:{uniforms:Gt([sn.common,sn.aomap,sn.lightmap,sn.emissivemap,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.gradientmap,sn.fog,sn.lights,{emissive:{value:new Ye(0)}}]),vertexShader:an.meshtoon_vert,fragmentShader:an.meshtoon_frag},matcap:{uniforms:Gt([sn.common,sn.bumpmap,sn.normalmap,sn.displacementmap,sn.fog,{matcap:{value:null}}]),vertexShader:an.meshmatcap_vert,fragmentShader:an.meshmatcap_frag},points:{uniforms:Gt([sn.points,sn.fog]),vertexShader:an.points_vert,fragmentShader:an.points_frag},dashed:{uniforms:Gt([sn.common,sn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:an.linedashed_vert,fragmentShader:an.linedashed_frag},depth:{uniforms:Gt([sn.common,sn.displacementmap]),vertexShader:an.depth_vert,fragmentShader:an.depth_frag},normal:{uniforms:Gt([sn.common,sn.bumpmap,sn.normalmap,sn.displacementmap,{opacity:{value:1}}]),vertexShader:an.normal_vert,fragmentShader:an.normal_frag},sprite:{uniforms:Gt([sn.sprite,sn.fog]),vertexShader:an.sprite_vert,fragmentShader:an.sprite_frag},background:{uniforms:{uvTransform:{value:new y},t2D:{value:null}},vertexShader:an.background_vert,fragmentShader:an.background_frag},cube:{uniforms:Gt([sn.envmap,{opacity:{value:1}}]),vertexShader:an.cube_vert,fragmentShader:an.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:an.equirect_vert,fragmentShader:an.equirect_frag},distanceRGBA:{uniforms:Gt([sn.common,sn.displacementmap,{referencePosition:{value:new T},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:an.distanceRGBA_vert,fragmentShader:an.distanceRGBA_frag},shadow:{uniforms:Gt([sn.lights,sn.fog,{color:{value:new Ye(0)},opacity:{value:1}}]),vertexShader:an.shadow_vert,fragmentShader:an.shadow_frag}};function cn(e,t,n,r,i){var o,a,s=new Ye(0),l=0,c=null,u=0,h=null;function d(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,i)}return{getClearColor:function(){return s},setClearColor:function(e,t){void 0===t&&(t=1),s.set(e),d(s,l=t)},getClearAlpha:function(){return l},setClearAlpha:function(e){d(s,l=e)},render:function(n,i,f,p){var m=!0===i.isScene?i.background:null;m&&m.isTexture&&(m=t.get(m));var g=e.xr,v=g.getSession&&g.getSession();v&&"additive"===v.environmentBlendMode&&(m=null),null===m?d(s,l):m&&m.isColor&&(d(m,1),p=!0),(e.autoClear||p)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||m.isWebGLCubeRenderTarget||306===m.mapping)?(void 0===a&&((a=new zt(new Ut(1,1,1),new qt({name:"BackgroundCubeMaterial",uniforms:Vt(ln.cube.uniforms),vertexShader:ln.cube.vertexShader,fragmentShader:ln.cube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),a.geometry.deleteAttribute("uv"),a.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(a.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(a)),m.isWebGLCubeRenderTarget&&(m=m.texture),a.material.uniforms.envMap.value=m,a.material.uniforms.flipEnvMap.value=m.isCubeTexture&&m._needsFlipEnvMap?-1:1,c===m&&u===m.version&&h===e.toneMapping||(a.material.needsUpdate=!0,c=m,u=m.version,h=e.toneMapping),n.unshift(a,a.geometry,a.material,0,0,null)):m&&m.isTexture&&(void 0===o&&((o=new zt(new on(2,2),new qt({name:"BackgroundMaterial",uniforms:Vt(ln.background.uniforms),vertexShader:ln.background.vertexShader,fragmentShader:ln.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(o.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(o)),o.material.uniforms.t2D.value=m,!0===m.matrixAutoUpdate&&m.updateMatrix(),o.material.uniforms.uvTransform.value.copy(m.matrix),c===m&&u===m.version&&h===e.toneMapping||(o.material.needsUpdate=!0,c=m,u=m.version,h=e.toneMapping),n.unshift(o,o.geometry,o.material,0,0,null))}}}function un(e,t,n,r){var i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==o,s={},l=d(null),c=l;function u(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function d(e){for(var t=[],n=[],r=[],o=0;o<i;o++)t[o]=0,n[o]=0,r[o]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function f(){for(var e=c.newAttributes,t=0,n=e.length;t<n;t++)e[t]=0}function p(e){m(e,0)}function m(n,i){var o=c.newAttributes,a=c.enabledAttributes,s=c.attributeDivisors;o[n]=1,0===a[n]&&(e.enableVertexAttribArray(n),a[n]=1),s[n]!==i&&((r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i)}function g(){for(var t=c.newAttributes,n=c.enabledAttributes,r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function v(t,n,i,o,a,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,o,a,s):e.vertexAttribIPointer(t,n,i,a,s)}function y(){b(),c!==l&&u((c=l).object)}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,y,b){var w=!1;if(a){var x=function(t,n,i){var a=!0===i.wireframe,l=s[t.id];void 0===l&&(l={},s[t.id]=l);var c=l[n.id];void 0===c&&(c={},l[n.id]=c);var u=c[a];return void 0===u&&(u=d(r.isWebGL2?e.createVertexArray():o.createVertexArrayOES()),c[a]=u),u}(y,h,l);c!==x&&u((c=x).object),(w=function(e,t){var n=c.attributes,r=e.attributes,i=0;for(var o in r){var a=n[o],s=r[o];if(void 0===a)return!0;if(a.attribute!==s)return!0;if(a.data!==s.data)return!0;i++}return c.attributesNum!==i||c.index!==t}(y,b))&&function(e,t){var n={},r=e.attributes,i=0;for(var o in r){var a=r[o],s={};s.attribute=a,a.data&&(s.data=a.data),n[o]=s,i++}c.attributes=n,c.attributesNum=i,c.index=t}(y,b)}else{var _=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===_||(c.geometry=y.id,c.program=h.id,c.wireframe=_,w=!0)}!0===i.isInstancedMesh&&(w=!0),null!==b&&n.update(b,34963),w&&(function(i,o,a,s){if(!1!==r.isWebGL2||!i.isInstancedMesh&&!s.isInstancedBufferGeometry||null!==t.get("ANGLE_instanced_arrays")){f();var l=s.attributes,c=a.getAttributes(),u=o.defaultAttributeValues;for(var h in c){var d=c[h];if(d>=0){var y=l[h];if(void 0!==y){var b=y.normalized,w=y.itemSize,x=n.get(y);if(void 0===x)continue;var _=x.buffer,E=x.type,A=x.bytesPerElement;if(y.isInterleavedBufferAttribute){var S=y.data,M=S.stride,T=y.offset;S&&S.isInstancedInterleavedBuffer?(m(d,S.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=S.meshPerAttribute*S.count)):p(d),e.bindBuffer(34962,_),v(d,w,E,b,M*A,T*A)}else y.isInstancedBufferAttribute?(m(d,y.meshPerAttribute),void 0===s._maxInstanceCount&&(s._maxInstanceCount=y.meshPerAttribute*y.count)):p(d),e.bindBuffer(34962,_),v(d,w,E,b,0,0)}else if("instanceMatrix"===h){var C=n.get(i.instanceMatrix);if(void 0===C)continue;var O=C.buffer,R=C.type;m(d+0,1),m(d+1,1),m(d+2,1),m(d+3,1),e.bindBuffer(34962,O),e.vertexAttribPointer(d+0,4,R,!1,64,0),e.vertexAttribPointer(d+1,4,R,!1,64,16),e.vertexAttribPointer(d+2,4,R,!1,64,32),e.vertexAttribPointer(d+3,4,R,!1,64,48)}else if("instanceColor"===h){var k=n.get(i.instanceColor);if(void 0===k)continue;var P=k.buffer,L=k.type;m(d,1),e.bindBuffer(34962,P),e.vertexAttribPointer(d,3,L,!1,12,0)}else if(void 0!==u){var D=u[h];if(void 0!==D)switch(D.length){case 2:e.vertexAttrib2fv(d,D);break;case 3:e.vertexAttrib3fv(d,D);break;case 4:e.vertexAttrib4fv(d,D);break;default:e.vertexAttrib1fv(d,D)}}}}g()}}(i,l,h,y),null!==b&&e.bindBuffer(34963,n.get(b).buffer))},reset:y,resetDefaultState:b,dispose:function(){for(var e in y(),s){var t=s[e];for(var n in t){var r=t[n];for(var i in r)h(r[i].object),delete r[i];delete t[n]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0!==s[e.id]){var t=s[e.id];for(var n in t){var r=t[n];for(var i in r)h(r[i].object),delete r[i];delete t[n]}delete s[e.id]}},releaseStatesOfProgram:function(e){for(var t in s){var n=s[t];if(void 0!==n[e.id]){var r=n[e.id];for(var i in r)h(r[i].object),delete r[i];delete n[e.id]}}},initAttributes:f,enableAttribute:p,disableUnusedAttributes:g}}function hn(e,t,n,r){var i,o=r.isWebGL2;this.setMode=function(e){i=e},this.render=function(t,r){e.drawArrays(i,t,r),n.update(r,i,1)},this.renderInstances=function(r,a,s){if(0!==s){var l,c;if(o)l=e,c="drawArraysInstanced";else if(c="drawArraysInstancedANGLE",null===(l=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](i,r,a,s),n.update(a,i,s)}}}function dn(e,t,n){var r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}var o="undefined"!==typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!==typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext,a=void 0!==n.precision?n.precision:"highp",s=i(a);s!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",s,"instead."),a=s);var l=!0===n.logarithmicDepthBuffer,c=e.getParameter(34930),u=e.getParameter(35660),h=e.getParameter(3379),d=e.getParameter(34076),f=e.getParameter(34921),p=e.getParameter(36347),m=e.getParameter(36348),g=e.getParameter(36349),v=u>0,y=o||!!t.get("OES_texture_float");return{isWebGL2:o,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:a,logarithmicDepthBuffer:l,maxTextures:c,maxVertexTextures:u,maxTextureSize:h,maxCubemapSize:d,maxAttributes:f,maxVertexUniforms:p,maxVaryings:m,maxFragmentUniforms:g,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?e.getParameter(36183):0}}function fn(e){var t=this,n=null,r=0,i=!1,o=!1,a=new Re,s=new y,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){var o=null!==e?e.length:0,c=null;if(0!==o){if(c=l.value,!0!==i||null===c){var u=r+4*o,h=n.matrixWorldInverse;s.getNormalMatrix(h),(null===c||c.length<u)&&(c=new Float32Array(u));for(var d=0,f=r;d!==o;++d,f+=4)a.copy(e[d]).applyMatrix4(h,s),a.normal.toArray(c,f),c[f+3]=a.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=o,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,o){var a=0!==e.length||t||0!==r||i;return i=t,n=u(e,o,0),r=e.length,a},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(t,a,s){var h=t.clippingPlanes,d=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===h||0===h.length||o&&!f)o?u(null):c();else{var m=o?0:r,g=4*m,v=p.clippingState||null;l.value=v,v=u(h,a,g,s);for(var y=0;y!==g;++y)v[y]=n[y];p.clippingState=v,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=m}}}function pn(e){var t=new WeakMap;function n(e,t){return 303===t?e.mapping=301:304===t&&(e.mapping=302),e}function r(e){var n=e.target;n.removeEventListener("dispose",r);var i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){var o=i.mapping;if(303===o||304===o){if(t.has(i))return n(t.get(i).texture,i.mapping);var a=i.image;if(a&&a.height>0){var s=e.getRenderList(),l=e.getRenderTarget(),c=new Zt(a.height/2);return c.fromEquirectangularTexture(e,i),t.set(i,c),e.setRenderTarget(l),e.setRenderList(s),i.addEventListener("dispose",r),n(c.texture,i.mapping)}return null}}return i},dispose:function(){t=new WeakMap}}}function mn(e){var t={};function n(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;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float")},get:function(e){var t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function gn(e,t,n,r){var i={},o=new WeakMap;function a(e){var s=e.target;for(var l in null!==s.index&&t.remove(s.index),s.attributes)t.remove(s.attributes[l]);s.removeEventListener("dispose",a),delete i[s.id];var c=o.get(s);c&&(t.remove(c),o.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){var n=[],r=e.index,i=e.attributes.position,a=0;if(null!==r){var s=r.array;a=r.version;for(var l=0,c=s.length;l<c;l+=3){var u=s[l+0],h=s[l+1],d=s[l+2];n.push(u,h,h,d,d,u)}}else{var f=i.array;a=i.version;for(var p=0,m=f.length/3-1;p<m;p+=3){var g=p+0,v=p+1,y=p+2;n.push(g,v,v,y,y,g)}}var b=new(dt(n)>65535?lt:at)(n,1);b.version=a;var w=o.get(e);w&&t.remove(w),o.set(e,b)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",a),i[t.id]=!0,n.memory.geometries++),t},update:function(e){var n=e.attributes;for(var r in n)t.update(n[r],34962);var i=e.morphAttributes;for(var o in i)for(var a=i[o],s=0,l=a.length;s<l;s++)t.update(a[s],34962)},getWireframeAttribute:function(e){var t=o.get(e);if(t){var n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return o.get(e)}}}function vn(e,t,n,r){var i,o,a,s=r.isWebGL2;this.setMode=function(e){i=e},this.setIndex=function(e){o=e.type,a=e.bytesPerElement},this.render=function(t,r){e.drawElements(i,r,o,t*a),n.update(r,i,1)},this.renderInstances=function(r,l,c){if(0!==c){var u,h;if(s)u=e,h="drawElementsInstanced";else if(h="drawElementsInstancedANGLE",null===(u=t.get("ANGLE_instanced_arrays")))return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[h](i,l,o,r*a,c),n.update(l,i,c)}}}function yn(e){var t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function bn(e,t){return e[0]-t[0]}function wn(e,t){return Math.abs(t[1])-Math.abs(e[1])}function xn(e){for(var t={},n=new Float32Array(8),r=[],i=0;i<8;i++)r[i]=[i,0];return{update:function(i,o,a,s){var l=i.morphTargetInfluences,c=void 0===l?0:l.length,u=t[o.id];if(void 0===u){u=[];for(var h=0;h<c;h++)u[h]=[h,0];t[o.id]=u}for(var d=0;d<c;d++){var f=u[d];f[0]=d,f[1]=l[d]}u.sort(wn);for(var p=0;p<8;p++)p<c&&u[p][1]?(r[p][0]=u[p][0],r[p][1]=u[p][1]):(r[p][0]=Number.MAX_SAFE_INTEGER,r[p][1]=0);r.sort(bn);for(var m=a.morphTargets&&o.morphAttributes.position,g=a.morphNormals&&o.morphAttributes.normal,v=0,y=0;y<8;y++){var b=r[y],w=b[0],x=b[1];w!==Number.MAX_SAFE_INTEGER&&x?(m&&o.getAttribute("morphTarget"+y)!==m[w]&&o.setAttribute("morphTarget"+y,m[w]),g&&o.getAttribute("morphNormal"+y)!==g[w]&&o.setAttribute("morphNormal"+y,g[w]),n[y]=x,v+=x):(m&&!0===o.hasAttribute("morphTarget"+y)&&o.deleteAttribute("morphTarget"+y),g&&!0===o.hasAttribute("morphNormal"+y)&&o.deleteAttribute("morphNormal"+y),n[y]=0)}var _=o.morphTargetsRelative?1:1-v;s.getUniforms().setValue(e,"morphTargetBaseInfluence",_),s.getUniforms().setValue(e,"morphTargetInfluences",n)}}}function _n(e,t,n,r){var i=new WeakMap;function o(e){var t=e.target;t.removeEventListener("dispose",o),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){var a=r.render.frame,s=e.geometry,l=t.get(e,s);return i.get(l)!==a&&(t.update(l),i.set(l,a)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",o)&&e.addEventListener("dispose",o),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}function En(e,t,n,r){void 0===e&&(e=null),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),x.call(this,null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}function An(e,t,n,r){void 0===e&&(e=null),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),x.call(this,null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.needsUpdate=!0}ln.physical={uniforms:Gt([ln.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new v(1,1)},clearcoatNormalMap:{value:null},sheen:{value:new Ye(0)},transmission:{value:0},transmissionMap:{value:null}}]),vertexShader:an.meshphysical_vert,fragmentShader:an.meshphysical_frag},En.prototype=Object.create(x.prototype),En.prototype.constructor=En,En.prototype.isDataTexture2DArray=!0,An.prototype=Object.create(x.prototype),An.prototype.constructor=An,An.prototype.isDataTexture3D=!0;var Sn=new x,Mn=new En,Tn=new An,Cn=new Qt,On=[],Rn=[],kn=new Float32Array(16),Pn=new Float32Array(9),Ln=new Float32Array(4);function Dn(e,t,n){var r=e[0];if(r<=0||r>0)return e;var i=t*n,o=On[i];if(void 0===o&&(o=new Float32Array(i),On[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 In(e,t){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function Nn(e,t){for(var n=0,r=t.length;n<r;n++)e[n]=t[n]}function jn(e,t){var n=Rn[t];void 0===n&&(n=new Int32Array(t),Rn[t]=n);for(var r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function Bn(e,t){var n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Fn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(In(n,t))return;e.uniform2fv(this.addr,t),Nn(n,t)}}function zn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(In(n,t))return;e.uniform3fv(this.addr,t),Nn(n,t)}}function Hn(e,t){var n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(In(n,t))return;e.uniform4fv(this.addr,t),Nn(n,t)}}function Un(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;Ln.set(r),e.uniformMatrix2fv(this.addr,!1,Ln),Nn(n,r)}}function Vn(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;Pn.set(r),e.uniformMatrix3fv(this.addr,!1,Pn),Nn(n,r)}}function Gn(e,t){var n=this.cache,r=t.elements;if(void 0===r){if(In(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Nn(n,t)}else{if(In(n,r))return;kn.set(r),e.uniformMatrix4fv(this.addr,!1,kn),Nn(n,r)}}function Wn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTexture2D(t||Sn,i)}function qn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||Mn,i)}function Xn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||Tn,i)}function Yn(e,t,n){var r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.safeSetTextureCube(t||Cn,i)}function Kn(e,t){var n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Qn(e,t){var n=this.cache;In(n,t)||(e.uniform2iv(this.addr,t),Nn(n,t))}function Zn(e,t){var n=this.cache;In(n,t)||(e.uniform3iv(this.addr,t),Nn(n,t))}function Jn(e,t){var n=this.cache;In(n,t)||(e.uniform4iv(this.addr,t),Nn(n,t))}function $n(e,t){var n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function er(e,t){e.uniform1fv(this.addr,t)}function tr(e,t){e.uniform1iv(this.addr,t)}function nr(e,t){e.uniform2iv(this.addr,t)}function rr(e,t){e.uniform3iv(this.addr,t)}function ir(e,t){e.uniform4iv(this.addr,t)}function or(e,t){var n=Dn(t,this.size,2);e.uniform2fv(this.addr,n)}function ar(e,t){var n=Dn(t,this.size,3);e.uniform3fv(this.addr,n)}function sr(e,t){var n=Dn(t,this.size,4);e.uniform4fv(this.addr,n)}function lr(e,t){var n=Dn(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function cr(e,t){var n=Dn(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function ur(e,t){var n=Dn(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function hr(e,t,n){var r=t.length,i=jn(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.safeSetTexture2D(t[o]||Sn,i[o])}function dr(e,t,n){var r=t.length,i=jn(n,r);e.uniform1iv(this.addr,i);for(var o=0;o!==r;++o)n.safeSetTextureCube(t[o]||Cn,i[o])}function fr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Bn;case 35664:return Fn;case 35665:return zn;case 35666:return Hn;case 35674:return Un;case 35675:return Vn;case 35676:return Gn;case 5124:case 35670:return Kn;case 35667:case 35671:return Qn;case 35668:case 35672:return Zn;case 35669:case 35673:return Jn;case 5125:return $n;case 35678:case 36198:case 36298:case 36306:case 35682:return Wn;case 35679:case 36299:case 36307:return Xn;case 35680:case 36300:case 36308:case 36293:return Yn;case 36289:case 36303:case 36311:case 36292:return qn}}(t.type)}function pr(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return er;case 35664:return or;case 35665:return ar;case 35666:return sr;case 35674:return lr;case 35675:return cr;case 35676:return ur;case 5124:case 35670:return tr;case 35667:case 35671:return nr;case 35668:case 35672:return rr;case 35669:case 35673:return ir;case 35678:case 36198:case 36298:case 36306:case 35682:return hr;case 35680:case 36300:case 36308:case 36293:return dr}}(t.type)}function mr(e){this.id=e,this.seq=[],this.map={}}pr.prototype.updateCache=function(e){var t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Nn(t,e)},mr.prototype.setValue=function(e,t,n){for(var r=this.seq,i=0,o=r.length;i!==o;++i){var a=r[i];a.setValue(e,t[a.id],n)}};var gr=/(\w+)(\])?(\[|\.)?/g;function vr(e,t){e.seq.push(t),e.map[t.id]=t}function yr(e,t,n){var r=e.name,i=r.length;for(gr.lastIndex=0;;){var o=gr.exec(r),a=gr.lastIndex,s=o[1],l="]"===o[2],c=o[3];if(l&&(s|=0),void 0===c||"["===c&&a+2===i){vr(n,void 0===c?new fr(s,e,t):new pr(s,e,t));break}var u=n.map[s];void 0===u&&vr(n,u=new mr(s)),n=u}}function br(e,t){this.seq=[],this.map={};for(var n=e.getProgramParameter(t,35718),r=0;r<n;++r){var i=e.getActiveUniform(t,r);yr(i,e.getUniformLocation(t,i.name),this)}}function wr(e,t,n){var r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}br.prototype.setValue=function(e,t,n,r){var i=this.map[t];void 0!==i&&i.setValue(e,n,r)},br.prototype.setOptional=function(e,t,n){var r=t[n];void 0!==r&&this.setValue(e,n,r)},br.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)}},br.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 xr=0;function _r(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 ) )"];case 3003:return["LogLuv","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function Er(e,t,n){var r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return r&&""===i?"":"THREE.WebGLShader: gl.getShaderInfoLog() "+n+"\n"+i+function(e){for(var t=e.split("\n"),n=0;n<t.length;n++)t[n]=n+1+": "+t[n];return t.join("\n")}(e.getShaderSource(t))}function Ar(e,t){var n=_r(t);return"vec4 "+e+"( vec4 value ) { return "+n[0]+"ToLinear"+n[1]+"; }"}function Sr(e,t){var n=_r(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Mr(e,t){var n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Tr(e){return""!==e}function Cr(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).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Or(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var Rr=/^[ \t]*#include +<([\w\d./]+)>/gm;function kr(e){return e.replace(Rr,Pr)}function Pr(e,t){var n=an[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return kr(n)}var Lr=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Dr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ir(e){return e.replace(Dr,jr).replace(Lr,Nr)}function Nr(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),jr(0,t,n,r)}function jr(e,t,n,r){for(var i="",o=parseInt(t);o<parseInt(n);o++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function Br(e){var t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Fr(e,t,n,r){var i,o,a=e.getContext(),s=n.defines,l=n.vertexShader,c=n.fragmentShader,u=function(e){var t="SHADOWMAP_TYPE_BASIC";return 1===e.shadowMapType?t="SHADOWMAP_TYPE_PCF":2===e.shadowMapType?t="SHADOWMAP_TYPE_PCF_SOFT":3===e.shadowMapType&&(t="SHADOWMAP_TYPE_VSM"),t}(n),h=function(e){var t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case 301:case 302:t="ENVMAP_TYPE_CUBE";break;case 306:case 307:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),d=function(e){var t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case 302:case 307:t="ENVMAP_MODE_REFRACTION"}return t}(n),f=function(e){var t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case 0:t="ENVMAP_BLENDING_MULTIPLY";break;case 1:t="ENVMAP_BLENDING_MIX";break;case 2:t="ENVMAP_BLENDING_ADD"}return t}(n),p=e.gammaFactor>0?e.gammaFactor:1,m=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Tr).join("\n")}(n),g=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),v=a.createProgram(),y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?((i=[g].filter(Tr).join("\n")).length>0&&(i+="\n"),(o=[m,g].filter(Tr).join("\n")).length>0&&(o+="\n")):(i=[Br(n),"#define SHADER_NAME "+n.shaderName,g,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+p,"#define MAX_BONES "+n.maxBones,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+d:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.useVertexTexture?"#define BONE_TEXTURE":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#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(Tr).join("\n"),o=[m,Br(n),"#define SHADER_NAME "+n.shaderName,g,n.alphaTest?"#define ALPHATEST "+n.alphaTest+(n.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+p,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",n.envMap?"#define "+d:"",n.envMap?"#define "+f:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.sheen?"#define USE_SHEEN":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+u:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(n.extensionShaderTextureLOD||n.envMap)&&n.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?an.tonemapping_pars_fragment:"",0!==n.toneMapping?Mr("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",an.encodings_pars_fragment,n.map?Ar("mapTexelToLinear",n.mapEncoding):"",n.matcap?Ar("matcapTexelToLinear",n.matcapEncoding):"",n.envMap?Ar("envMapTexelToLinear",n.envMapEncoding):"",n.emissiveMap?Ar("emissiveMapTexelToLinear",n.emissiveMapEncoding):"",n.lightMap?Ar("lightMapTexelToLinear",n.lightMapEncoding):"",Sr("linearToOutputTexel",n.outputEncoding),n.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Tr).join("\n")),l=Or(l=Cr(l=kr(l),n),n),c=Or(c=Cr(c=kr(c),n),n),l=Ir(l),c=Ir(c),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",i=["#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+i,o=["#define varying in","300 es"===n.glslVersion?"":"out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+o);var b,w,x=y+o+c,_=wr(a,35633,y+i+l),E=wr(a,35632,x);if(a.attachShader(v,_),a.attachShader(v,E),void 0!==n.index0AttributeName?a.bindAttribLocation(v,0,n.index0AttributeName):!0===n.morphTargets&&a.bindAttribLocation(v,0,"position"),a.linkProgram(v),e.debug.checkShaderErrors){var A=a.getProgramInfoLog(v).trim(),S=a.getShaderInfoLog(_).trim(),M=a.getShaderInfoLog(E).trim(),T=!0,C=!0;if(!1===a.getProgramParameter(v,35714)){T=!1;var O=Er(a,_,"vertex"),R=Er(a,E,"fragment");console.error("THREE.WebGLProgram: shader error: ",a.getError(),"35715",a.getProgramParameter(v,35715),"gl.getProgramInfoLog",A,O,R)}else""!==A?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",A):""!==S&&""!==M||(C=!1);C&&(this.diagnostics={runnable:T,programLog:A,vertexShader:{log:S,prefix:i},fragmentShader:{log:M,prefix:o}})}return a.deleteShader(_),a.deleteShader(E),this.getUniforms=function(){return void 0===b&&(b=new br(a,v)),b},this.getAttributes=function(){return void 0===w&&(w=function(e,t){for(var n={},r=e.getProgramParameter(t,35721),i=0;i<r;i++){var o=e.getActiveAttrib(t,i).name;n[o]=e.getAttribLocation(t,o)}return n}(a,v)),w},this.destroy=function(){r.releaseStatesOfProgram(this),a.deleteProgram(v),this.program=void 0},this.name=n.shaderName,this.id=xr++,this.cacheKey=t,this.usedTimes=1,this.program=v,this.vertexShader=_,this.fragmentShader=E,this}function zr(e,t,n,r,i,o){var a=[],s=r.isWebGL2,l=r.logarithmicDepthBuffer,c=r.floatVertexTextures,u=r.maxVertexUniforms,h=r.vertexTextures,d=r.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},p=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","sheen","transmissionMap"];function m(e){var t;return e&&e.isTexture?t=e.encoding:e&&e.isWebGLRenderTarget?(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),t=e.texture.encoding):t=3e3,t}return{getParameters:function(i,a,p,g,v){var y,b,w=g.fog,x=i.isMeshStandardMaterial?g.environment:null,_=t.get(i.envMap||x),E=f[i.type],A=v.isSkinnedMesh?function(e){var t=e.skeleton.bones;if(c)return 1024;var n=u,r=Math.floor((n-20)/4),i=Math.min(r,t.length);return i<t.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+t.length+" bones. This GPU supports "+i+"."),0):i}(v):0;if(null!==i.precision&&(d=r.getMaxPrecision(i.precision))!==i.precision&&console.warn("THREE.WebGLProgram.getParameters:",i.precision,"not supported, using",d,"instead."),E){var S=ln[E];y=S.vertexShader,b=S.fragmentShader}else y=i.vertexShader,b=i.fragmentShader;var M=e.getRenderTarget();return{isWebGL2:s,shaderID:E,shaderName:i.type,vertexShader:y,fragmentShader:b,defines:i.defines,isRawShaderMaterial:!0===i.isRawShaderMaterial,glslVersion:i.glslVersion,precision:d,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:h,outputEncoding:null!==M?m(M.texture):e.outputEncoding,map:!!i.map,mapEncoding:m(i.map),matcap:!!i.matcap,matcapEncoding:m(i.matcap),envMap:!!_,envMapMode:_&&_.mapping,envMapEncoding:m(_),envMapCubeUV:!!_&&(306===_.mapping||307===_.mapping),lightMap:!!i.lightMap,lightMapEncoding:m(i.lightMap),aoMap:!!i.aoMap,emissiveMap:!!i.emissiveMap,emissiveMapEncoding:m(i.emissiveMap),bumpMap:!!i.bumpMap,normalMap:!!i.normalMap,objectSpaceNormalMap:1===i.normalMapType,tangentSpaceNormalMap:0===i.normalMapType,clearcoatMap:!!i.clearcoatMap,clearcoatRoughnessMap:!!i.clearcoatRoughnessMap,clearcoatNormalMap:!!i.clearcoatNormalMap,displacementMap:!!i.displacementMap,roughnessMap:!!i.roughnessMap,metalnessMap:!!i.metalnessMap,specularMap:!!i.specularMap,alphaMap:!!i.alphaMap,gradientMap:!!i.gradientMap,sheen:!!i.sheen,transmissionMap:!!i.transmissionMap,combine:i.combine,vertexTangents:i.normalMap&&i.vertexTangents,vertexColors:i.vertexColors,vertexUvs:!!i.map||!!i.bumpMap||!!i.normalMap||!!i.specularMap||!!i.alphaMap||!!i.emissiveMap||!!i.roughnessMap||!!i.metalnessMap||!!i.clearcoatMap||!!i.clearcoatRoughnessMap||!!i.clearcoatNormalMap||!!i.displacementMap||!!i.transmissionMap,uvsVertexOnly:!(i.map||i.bumpMap||i.normalMap||i.specularMap||i.alphaMap||i.emissiveMap||i.roughnessMap||i.metalnessMap||i.clearcoatNormalMap||i.transmissionMap)&&!!i.displacementMap,fog:!!w,useFog:i.fog,fogExp2:w&&w.isFogExp2,flatShading:i.flatShading,sizeAttenuation:i.sizeAttenuation,logarithmicDepthBuffer:l,skinning:i.skinning&&A>0,maxBones:A,useVertexTexture:c,morphTargets:i.morphTargets,morphNormals:i.morphNormals,maxMorphTargets:e.maxMorphTargets,maxMorphNormals:e.maxMorphNormals,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:i.dithering,shadowMapEnabled:e.shadowMap.enabled&&p.length>0,shadowMapType:e.shadowMap.type,toneMapping:i.toneMapped?e.toneMapping:0,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:i.premultipliedAlpha,alphaTest:i.alphaTest,doubleSided:2===i.side,flipSided:1===i.side,depthPacking:void 0!==i.depthPacking&&i.depthPacking,index0AttributeName:i.index0AttributeName,extensionDerivatives:i.extensions&&i.extensions.derivatives,extensionFragDepth:i.extensions&&i.extensions.fragDepth,extensionDrawBuffers:i.extensions&&i.extensions.drawBuffers,extensionShaderTextureLOD:i.extensions&&i.extensions.shaderTextureLOD,rendererExtensionFragDepth:s||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:s||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:s||n.has("EXT_shader_texture_lod"),customProgramCacheKey:i.customProgramCacheKey()}},getProgramCacheKey:function(t){var n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.fragmentShader),n.push(t.vertexShader)),void 0!==t.defines)for(var r in t.defines)n.push(r),n.push(t.defines[r]);if(!1===t.isRawShaderMaterial){for(var i=0;i<p.length;i++)n.push(t[p[i]]);n.push(e.outputEncoding),n.push(e.gammaFactor)}return n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){var t,n=f[e.type];if(n){var r=ln[n];t=Wt.clone(r.uniforms)}else t=e.uniforms;return t},acquireProgram:function(t,n){for(var r,o=0,s=a.length;o<s;o++){var l=a[o];if(l.cacheKey===n){++(r=l).usedTimes;break}}return void 0===r&&(r=new Fr(e,n,t,i),a.push(r)),r},releaseProgram:function(e){if(0===--e.usedTimes){var t=a.indexOf(e);a[t]=a[a.length-1],a.pop(),e.destroy()}},programs:a}}function Hr(){var e=new WeakMap;return{get:function(t){var n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Ur(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder: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 Vr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Gr(e){var t=[],n=0,r=[],i=[],o={id:-1};function a(r,i,a,s,l,c){var u=t[n],h=e.get(a);return void 0===u?(u={id:r.id,object:r,geometry:i,material:a,program:h.program||o,groupOrder:s,renderOrder:r.renderOrder,z:l,group:c},t[n]=u):(u.id=r.id,u.object=r,u.geometry=i,u.material=a,u.program=h.program||o,u.groupOrder=s,u.renderOrder=r.renderOrder,u.z=l,u.group=c),n++,u}return{opaque:r,transparent:i,init:function(){n=0,r.length=0,i.length=0},push:function(e,t,n,o,s,l){var c=a(e,t,n,o,s,l);(!0===n.transparent?i:r).push(c)},unshift:function(e,t,n,o,s,l){var c=a(e,t,n,o,s,l);(!0===n.transparent?i:r).unshift(c)},finish:function(){for(var e=n,r=t.length;e<r;e++){var i=t[e];if(null===i.id)break;i.id=null,i.object=null,i.geometry=null,i.material=null,i.program=null,i.group=null}},sort:function(e,t){r.length>1&&r.sort(e||Ur),i.length>1&&i.sort(t||Vr)}}}function Wr(e){var t=new WeakMap;return{get:function(n,r){var i,o=t.get(n);return void 0===o?(i=new Gr(e),t.set(n,new WeakMap),t.get(n).set(r,i)):void 0===(i=o.get(r))&&(i=new Gr(e),o.set(r,i)),i},dispose:function(){t=new WeakMap}}}function qr(){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 T,color:new Ye};break;case"SpotLight":n={position:new T,direction:new T,color:new Ye,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new T,color:new Ye,distance:0,decay:0};break;case"HemisphereLight":n={direction:new T,skyColor:new Ye,groundColor:new Ye};break;case"RectAreaLight":n={color:new Ye,position:new T,halfWidth:new T,halfHeight:new T}}return e[t.id]=n,n}}}var Xr=0;function Yr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Kr(e,t){for(var n=new qr,r=function(){var e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];var n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new v};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new v,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},o=0;o<9;o++)i.probe.push(new T);var a=new T,s=new te,l=new te;return{setup:function(o){for(var a=0,s=0,l=0,c=0;c<9;c++)i.probe[c].set(0,0,0);var u=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0;o.sort(Yr);for(var y=0,b=o.length;y<b;y++){var w=o[y],x=w.color,_=w.intensity,E=w.distance,A=w.shadow&&w.shadow.map?w.shadow.map.texture:null;if(w.isAmbientLight)a+=x.r*_,s+=x.g*_,l+=x.b*_;else if(w.isLightProbe)for(var S=0;S<9;S++)i.probe[S].addScaledVector(w.sh.coefficients[S],_);else if(w.isDirectionalLight){var M=n.get(w);if(M.color.copy(w.color).multiplyScalar(w.intensity),w.castShadow){var T=w.shadow,C=r.get(w);C.shadowBias=T.bias,C.shadowNormalBias=T.normalBias,C.shadowRadius=T.radius,C.shadowMapSize=T.mapSize,i.directionalShadow[u]=C,i.directionalShadowMap[u]=A,i.directionalShadowMatrix[u]=w.shadow.matrix,m++}i.directional[u]=M,u++}else if(w.isSpotLight){var O=n.get(w);if(O.position.setFromMatrixPosition(w.matrixWorld),O.color.copy(x).multiplyScalar(_),O.distance=E,O.coneCos=Math.cos(w.angle),O.penumbraCos=Math.cos(w.angle*(1-w.penumbra)),O.decay=w.decay,w.castShadow){var R=w.shadow,k=r.get(w);k.shadowBias=R.bias,k.shadowNormalBias=R.normalBias,k.shadowRadius=R.radius,k.shadowMapSize=R.mapSize,i.spotShadow[d]=k,i.spotShadowMap[d]=A,i.spotShadowMatrix[d]=w.shadow.matrix,v++}i.spot[d]=O,d++}else if(w.isRectAreaLight){var P=n.get(w);P.color.copy(x).multiplyScalar(_),P.halfWidth.set(.5*w.width,0,0),P.halfHeight.set(0,.5*w.height,0),i.rectArea[f]=P,f++}else if(w.isPointLight){var L=n.get(w);if(L.color.copy(w.color).multiplyScalar(w.intensity),L.distance=w.distance,L.decay=w.decay,w.castShadow){var D=w.shadow,I=r.get(w);I.shadowBias=D.bias,I.shadowNormalBias=D.normalBias,I.shadowRadius=D.radius,I.shadowMapSize=D.mapSize,I.shadowCameraNear=D.camera.near,I.shadowCameraFar=D.camera.far,i.pointShadow[h]=I,i.pointShadowMap[h]=A,i.pointShadowMatrix[h]=w.shadow.matrix,g++}i.point[h]=L,h++}else if(w.isHemisphereLight){var N=n.get(w);N.skyColor.copy(w.color).multiplyScalar(_),N.groundColor.copy(w.groundColor).multiplyScalar(_),i.hemi[p]=N,p++}}f>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=sn.LTC_FLOAT_1,i.rectAreaLTC2=sn.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=sn.LTC_HALF_1,i.rectAreaLTC2=sn.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=s,i.ambient[2]=l;var j=i.hash;j.directionalLength===u&&j.pointLength===h&&j.spotLength===d&&j.rectAreaLength===f&&j.hemiLength===p&&j.numDirectionalShadows===m&&j.numPointShadows===g&&j.numSpotShadows===v||(i.directional.length=u,i.spot.length=d,i.rectArea.length=f,i.point.length=h,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotShadowMatrix.length=v,j.directionalLength=u,j.pointLength=h,j.spotLength=d,j.rectAreaLength=f,j.hemiLength=p,j.numDirectionalShadows=m,j.numPointShadows=g,j.numSpotShadows=v,i.version=Xr++)},setupView:function(e,t){for(var n=0,r=0,o=0,c=0,u=0,h=t.matrixWorldInverse,d=0,f=e.length;d<f;d++){var p=e[d];if(p.isDirectionalLight){var m=i.directional[n];m.direction.setFromMatrixPosition(p.matrixWorld),a.setFromMatrixPosition(p.target.matrixWorld),m.direction.sub(a),m.direction.transformDirection(h),n++}else if(p.isSpotLight){var g=i.spot[o];g.position.setFromMatrixPosition(p.matrixWorld),g.position.applyMatrix4(h),g.direction.setFromMatrixPosition(p.matrixWorld),a.setFromMatrixPosition(p.target.matrixWorld),g.direction.sub(a),g.direction.transformDirection(h),o++}else if(p.isRectAreaLight){var v=i.rectArea[c];v.position.setFromMatrixPosition(p.matrixWorld),v.position.applyMatrix4(h),l.identity(),s.copy(p.matrixWorld),s.premultiply(h),l.extractRotation(s),v.halfWidth.set(.5*p.width,0,0),v.halfHeight.set(0,.5*p.height,0),v.halfWidth.applyMatrix4(l),v.halfHeight.applyMatrix4(l),c++}else if(p.isPointLight){var y=i.point[r];y.position.setFromMatrixPosition(p.matrixWorld),y.position.applyMatrix4(h),r++}else if(p.isHemisphereLight){var b=i.hemi[u];b.direction.setFromMatrixPosition(p.matrixWorld),b.direction.transformDirection(h),b.direction.normalize(),u++}}},state:i}}function Qr(e,t){var n=new Kr(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(){n.setup(r)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Zr(e,t){var n=new WeakMap;return{get:function(r,i){var o;return void 0===i&&(i=0),!1===n.has(r)?(o=new Qr(e,t),n.set(r,[]),n.get(r).push(o)):i>=n.get(r).length?(o=new Qr(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}function Jr(e){Ze.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.setValues(e)}function $r(e){Ze.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new T,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.setValues(e)}function ei(e,t,n){var r=new tn,i=new v,o=new v,a=new E,s=[],l=[],c={},u={0:1,1:0,2:2},h=new qt({defines:{SAMPLE_RATE:2/8,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new v},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean * HALF_SAMPLE_RATE;\n\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),d=h.clone();d.defines.HORIZONTAL_PASS=1;var f=new _t;f.setAttribute("position",new tt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));var p=new zt(f,h),m=this;function g(n,r){var i=t.update(p);h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,h,p,null),d.uniforms.shadow_pass.value=n.mapPass.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,d,p,null)}function y(e,t,n){var r=e<<0|t<<1|n<<2,i=s[r];return void 0===i&&(i=new Jr({depthPacking:3201,morphTargets:e,skinning:t}),s[r]=i),i}function b(e,t,n){var r=e<<0|t<<1|n<<2,i=l[r];return void 0===i&&(i=new $r({morphTargets:e,skinning:t}),l[r]=i),i}function w(t,n,r,i,o,a,s){var l=null,h=y,d=t.customDepthMaterial;if(!0===i.isPointLight&&(h=b,d=t.customDistanceMaterial),void 0===d){var f=!1;!0===r.morphTargets&&(f=n.morphAttributes&&n.morphAttributes.position&&n.morphAttributes.position.length>0);var p=!1;!0===t.isSkinnedMesh&&(!0===r.skinning?p=!0:console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",t)),l=h(f,p,!0===t.isInstancedMesh)}else l=d;if(e.localClippingEnabled&&!0===r.clipShadows&&0!==r.clippingPlanes.length){var m=l.uuid,g=r.uuid,v=c[m];void 0===v&&(v={},c[m]=v);var w=v[g];void 0===w&&(w=l.clone(),v[g]=w),l=w}return l.visible=r.visible,l.wireframe=r.wireframe,l.side=3===s?null!==r.shadowSide?r.shadowSide:r.side:null!==r.shadowSide?r.shadowSide:u[r.side],l.clipShadows=r.clipShadows,l.clippingPlanes=r.clippingPlanes,l.clipIntersection=r.clipIntersection,l.wireframeLinewidth=r.wireframeLinewidth,l.linewidth=r.linewidth,!0===i.isPointLight&&!0===l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(i.matrixWorld),l.nearDistance=o,l.farDistance=a),l}function x(n,i,o,a,s){if(!1!==n.visible){if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);var l=t.update(n),c=n.material;if(Array.isArray(c))for(var u=l.groups,h=0,d=u.length;h<d;h++){var f=u[h],p=c[f.materialIndex];if(p&&p.visible){var m=w(n,l,p,a,o.near,o.far,s);e.renderBufferDirect(o,null,l,m,n,f)}}else if(c.visible){var g=w(n,l,c,a,o.near,o.far,s);e.renderBufferDirect(o,null,l,g,n,null)}}for(var v=n.children,y=0,b=v.length;y<b;y++)x(v[y],i,o,a,s)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(t,s,l){if(!1!==m.enabled&&(!1!==m.autoUpdate||!1!==m.needsUpdate)&&0!==t.length){var c=e.getRenderTarget(),u=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),d=e.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(var f=0,p=t.length;f<p;f++){var v=t[f],y=v.shadow;if(void 0!==y){if(!1!==y.autoUpdate||!1!==y.needsUpdate){i.copy(y.mapSize);var b=y.getFrameExtents();if(i.multiply(b),o.copy(y.mapSize),(i.x>n||i.y>n)&&(i.x>n&&(o.x=Math.floor(n/b.x),i.x=o.x*b.x,y.mapSize.x=o.x),i.y>n&&(o.y=Math.floor(n/b.y),i.y=o.y*b.y,y.mapSize.y=o.y)),null===y.map&&!y.isPointLightShadow&&3===this.type){var w={minFilter:1006,magFilter:1006,format:1023};y.map=new A(i.x,i.y,w),y.map.texture.name=v.name+".shadowMap",y.mapPass=new A(i.x,i.y,w),y.camera.updateProjectionMatrix()}if(null===y.map){var _={minFilter:1003,magFilter:1003,format:1023};y.map=new A(i.x,i.y,_),y.map.texture.name=v.name+".shadowMap",y.camera.updateProjectionMatrix()}e.setRenderTarget(y.map),e.clear();for(var E=y.getViewportCount(),S=0;S<E;S++){var M=y.getViewport(S);a.set(o.x*M.x,o.y*M.y,o.x*M.z,o.y*M.w),d.viewport(a),y.updateMatrices(v,S),r=y.getFrustum(),x(s,l,y.camera,v,this.type)}y.isPointLightShadow||3!==this.type||g(y,l),y.needsUpdate=!1}}else console.warn("THREE.WebGLShadowMap:",v,"has no shadow.")}m.needsUpdate=!1,e.setRenderTarget(c,u,h)}}}function ti(e,t,n){var r,i,o=n.isWebGL2,a=new function(){var t=!1,n=new E,r=null,i=new E(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)}}},s=new function(){var t=!1,n=null,r=null,i=null;return{setTest:function(e){e?N(2929):j(2929)},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(512);break;case 1:e.depthFunc(519);break;case 2:e.depthFunc(513);break;case 3:e.depthFunc(515);break;case 4:e.depthFunc(514);break;case 5:e.depthFunc(518);break;case 6:e.depthFunc(516);break;case 7:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);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}}},l=new function(){var t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?N(2960):j(2960))},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&&l===r||(e.stencilOp(t,n,r),a=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,o=null,a=null,s=null,l=null,c=null}}},c={},u=null,h=null,d=null,f=null,p=null,m=null,g=null,v=null,y=null,b=!1,w=null,x=null,_=null,A=null,S=null,M=e.getParameter(35661),T=!1,C=0,O=e.getParameter(7938);-1!==O.indexOf("WebGL")?(C=parseFloat(/^WebGL (\d)/.exec(O)[1]),T=C>=1):-1!==O.indexOf("OpenGL ES")&&(C=parseFloat(/^OpenGL ES (\d)/.exec(O)[1]),T=C>=2);var R=null,k={},P=new E,L=new E;function D(t,n,r){var i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(var a=0;a<r;a++)e.texImage2D(n+a,0,6408,1,1,0,6408,5121,i);return o}var I={};function N(t){!0!==c[t]&&(e.enable(t),c[t]=!0)}function j(t){!1!==c[t]&&(e.disable(t),c[t]=!1)}I[3553]=D(3553,3553,1),I[34067]=D(34067,34069,6),a.setClear(0,0,0,1),s.setClear(1),l.setClear(0),N(2929),s.setFunc(3),U(!1),V(1),N(2884),H(0);var B=((r={})[100]=32774,r[101]=32778,r[102]=32779,r);if(o)B[103]=32775,B[104]=32776;else{var F=t.get("EXT_blend_minmax");null!==F&&(B[103]=F.MIN_EXT,B[104]=F.MAX_EXT)}var z=((i={})[200]=0,i[201]=1,i[202]=768,i[204]=770,i[210]=776,i[208]=774,i[206]=772,i[203]=769,i[205]=771,i[209]=775,i[207]=773,i);function H(t,n,r,i,o,a,s,l){if(0!==t){if(h||(N(3042),h=!0),5===t)o=o||n,a=a||r,s=s||i,n===f&&o===g||(e.blendEquationSeparate(B[n],B[o]),f=n,g=o),r===p&&i===m&&a===v&&s===y||(e.blendFuncSeparate(z[r],z[i],z[a],z[s]),p=r,m=i,v=a,y=s),d=t,b=null;else if(t!==d||l!==b){if(100===f&&100===g||(e.blendEquation(32774),f=100,g=100),l)switch(t){case 1:e.blendFuncSeparate(1,771,1,771);break;case 2:e.blendFunc(1,1);break;case 3:e.blendFuncSeparate(0,0,769,771);break;case 4:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case 1:e.blendFuncSeparate(770,771,1,771);break;case 2:e.blendFunc(770,1);break;case 3:e.blendFunc(0,769);break;case 4:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}p=null,m=null,v=null,y=null,d=t,b=l}}else h&&(j(3042),h=!1)}function U(t){w!==t&&(t?e.frontFace(2304):e.frontFace(2305),w=t)}function V(t){0!==t?(N(2884),t!==x&&(1===t?e.cullFace(1029):2===t?e.cullFace(1028):e.cullFace(1032))):j(2884),x=t}function G(t,n,r){t?(N(32823),A===n&&S===r||(e.polygonOffset(n,r),A=n,S=r)):j(32823)}function W(t){void 0===t&&(t=33984+M-1),R!==t&&(e.activeTexture(t),R=t)}return{buffers:{color:a,depth:s,stencil:l},enable:N,disable:j,useProgram:function(t){return u!==t&&(e.useProgram(t),u=t,!0)},setBlending:H,setMaterial:function(e,t){2===e.side?j(2884):N(2884);var n=1===e.side;t&&(n=!n),U(n),1===e.blending&&!1===e.transparent?H(0):H(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),s.setFunc(e.depthFunc),s.setTest(e.depthTest),s.setMask(e.depthWrite),a.setMask(e.colorWrite);var r=e.stencilWrite;l.setTest(r),r&&(l.setMask(e.stencilWriteMask),l.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),l.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),G(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:U,setCullFace:V,setLineWidth:function(t){t!==_&&(T&&e.lineWidth(t),_=t)},setPolygonOffset:G,setScissorTest:function(e){e?N(3089):j(3089)},activeTexture:W,bindTexture:function(t,n){null===R&&W();var r=k[R];void 0===r&&(r={type:void 0,texture:void 0},k[R]=r),r.type===t&&r.texture===n||(e.bindTexture(t,n||I[t]),r.type=t,r.texture=n)},unbindTexture:function(){var t=k[R];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(t){!1===P.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),P.copy(t))},viewport:function(t){!1===L.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),L.copy(t))},reset:function(){c={},R=null,k={},u=null,h=null,d=null,f=null,p=null,m=null,g=null,v=null,y=null,b=!1,w=null,x=null,_=null,A=null,S=null,a.reset(),s.reset(),l.reset()}}}function ni(e,t,n,r,i,o,a){var s,l,c,u=i.isWebGL2,h=i.maxTextures,d=i.maxCubemapSize,f=i.maxTextureSize,p=i.maxSamples,m=new WeakMap,v=!1;try{v="undefined"!==typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(H){}function y(e,t){return v?new OffscreenCanvas(e,t):document.createElementNS("http://www.w3.org/1999/xhtml","canvas")}function b(e,t,n,r){var i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap){var o=t?g.floorPowerOfTwo:Math.floor,a=o(i*e.width),s=o(i*e.height);void 0===c&&(c=y(a,s));var l=n?y(a,s):c;return l.width=a,l.height=s,l.getContext("2d").drawImage(e,0,0,a,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+s+")."),l}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function w(e){return g.isPowerOfTwo(e.width)&&g.isPowerOfTwo(e.height)}function x(e,t){return e.generateMipmaps&&t&&1003!==e.minFilter&&1006!==e.minFilter}function _(t,n,i,o){e.generateMipmap(t),r.get(n).__maxMipLevel=Math.log(Math.max(i,o))*Math.LOG2E}function E(n,r,i){if(!1===u)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}var o=r;return 6403===r&&(5126===i&&(o=33326),5131===i&&(o=33325),5121===i&&(o=33321)),6407===r&&(5126===i&&(o=34837),5131===i&&(o=34843),5121===i&&(o=32849)),6408===r&&(5126===i&&(o=34836),5131===i&&(o=34842),5121===i&&(o=32856)),33325!==o&&33326!==o&&34842!==o&&34836!==o||t.get("EXT_color_buffer_float"),o}function A(e){return 1003===e||1004===e||1005===e?9728:9729}function S(t){var n=t.target;n.removeEventListener("dispose",S),function(t){var n=r.get(t);void 0!==n.__webglInit&&(e.deleteTexture(n.__webglTexture),r.remove(t))}(n),n.isVideoTexture&&m.delete(n),a.memory.textures--}function M(t){var n=t.target;n.removeEventListener("dispose",M),function(t){var n=r.get(t),i=r.get(t.texture);if(t){if(void 0!==i.__webglTexture&&e.deleteTexture(i.__webglTexture),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)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),n.__webglMultisampledFramebuffer&&e.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer&&e.deleteRenderbuffer(n.__webglColorRenderbuffer),n.__webglDepthRenderbuffer&&e.deleteRenderbuffer(n.__webglDepthRenderbuffer);r.remove(t.texture),r.remove(t)}}(n),a.memory.textures--}var T=0;function C(e,t){var i=r.get(e);if(e.isVideoTexture&&function(e){var t=a.render.frame;m.get(e)!==t&&(m.set(e,t),e.update())}(e),e.version>0&&i.__version!==e.version){var o=e.image;if(void 0===o)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==o.complete)return void D(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}function O(t,i){var a=r.get(t);t.version>0&&a.__version!==t.version?function(t,r,i){if(6===r.image.length){L(t,r),n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment);for(var a=r&&(r.isCompressedTexture||r.image[0].isCompressedTexture),s=r.image[0]&&r.image[0].isDataTexture,l=[],c=0;c<6;c++)l[c]=a||s?s?r.image[c].image:r.image[c]:b(r.image[c],!1,!0,d);var h,f=l[0],p=w(f)||u,m=o.convert(r.format),g=o.convert(r.type),v=E(r.internalFormat,m,g);if(P(34067,r,p),a){for(var y=0;y<6;y++){h=l[y].mipmaps;for(var A=0;A<h.length;A++){var S=h[A];1023!==r.format&&1022!==r.format?null!==m?n.compressedTexImage2D(34069+y,A,v,S.width,S.height,0,S.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):n.texImage2D(34069+y,A,v,S.width,S.height,0,m,g,S.data)}}t.__maxMipLevel=h.length-1}else{h=r.mipmaps;for(var M=0;M<6;M++)if(s){n.texImage2D(34069+M,0,v,l[M].width,l[M].height,0,m,g,l[M].data);for(var T=0;T<h.length;T++){var C=h[T].image[M].image;n.texImage2D(34069+M,T+1,v,C.width,C.height,0,m,g,C.data)}}else{n.texImage2D(34069+M,0,v,m,g,l[M]);for(var O=0;O<h.length;O++){var R=h[O];n.texImage2D(34069+M,O+1,v,m,g,R.image[M])}}t.__maxMipLevel=h.length}x(r,p)&&_(34067,r,f.width,f.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}}(a,t,i):(n.activeTexture(33984+i),n.bindTexture(34067,a.__webglTexture))}var R=((s={})[1e3]=10497,s[1001]=33071,s[1002]=33648,s),k=((l={})[1003]=9728,l[1004]=9984,l[1005]=9986,l[1006]=9729,l[1007]=9985,l[1008]=9987,l);function P(n,o,a){a?(e.texParameteri(n,10242,R[o.wrapS]),e.texParameteri(n,10243,R[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,R[o.wrapR]),e.texParameteri(n,10240,k[o.magFilter]),e.texParameteri(n,10241,k[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,A(o.magFilter)),e.texParameteri(n,10241,A(o.minFilter)),1003!==o.minFilter&&1006!==o.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter."));var s=t.get("EXT_texture_filter_anisotropic");if(s){if(1015===o.type&&null===t.get("OES_texture_float_linear"))return;if(1016===o.type&&null===(u||t.get("OES_texture_half_float_linear")))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function L(t,n){void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",S),t.__webglTexture=e.createTexture(),a.memory.textures++)}function D(t,r,i){var a=3553;r.isDataTexture2DArray&&(a=35866),r.isDataTexture3D&&(a=32879),L(t,r),n.activeTexture(33984+i),n.bindTexture(a,t.__webglTexture),e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment);var s,l=function(e){return!u&&(1001!==e.wrapS||1001!==e.wrapT||1003!==e.minFilter&&1006!==e.minFilter)}(r)&&!1===w(r.image),c=b(r.image,l,!1,f),h=w(c)||u,d=o.convert(r.format),p=o.convert(r.type),m=E(r.internalFormat,d,p);P(a,r,h);var g=r.mipmaps;if(r.isDepthTexture)m=6402,u?m=1015===r.type?36012:1014===r.type?33190:1020===r.type?35056:33189:1015===r.type&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),1026===r.format&&6402===m&&1012!==r.type&&1014!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=1012,p=o.convert(r.type)),1027===r.format&&6402===m&&(m=34041,1020!==r.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=1020,p=o.convert(r.type))),n.texImage2D(3553,0,m,c.width,c.height,0,d,p,null);else if(r.isDataTexture)if(g.length>0&&h){for(var v=0,y=g.length;v<y;v++)s=g[v],n.texImage2D(3553,v,m,s.width,s.height,0,d,p,s.data);r.generateMipmaps=!1,t.__maxMipLevel=g.length-1}else n.texImage2D(3553,0,m,c.width,c.height,0,d,p,c.data),t.__maxMipLevel=0;else if(r.isCompressedTexture){for(var A=0,S=g.length;A<S;A++)s=g[A],1023!==r.format&&1022!==r.format?null!==d?n.compressedTexImage2D(3553,A,m,s.width,s.height,0,s.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):n.texImage2D(3553,A,m,s.width,s.height,0,d,p,s.data);t.__maxMipLevel=g.length-1}else if(r.isDataTexture2DArray)n.texImage3D(35866,0,m,c.width,c.height,c.depth,0,d,p,c.data),t.__maxMipLevel=0;else if(r.isDataTexture3D)n.texImage3D(32879,0,m,c.width,c.height,c.depth,0,d,p,c.data),t.__maxMipLevel=0;else if(g.length>0&&h){for(var M=0,T=g.length;M<T;M++)s=g[M],n.texImage2D(3553,M,m,d,p,s);r.generateMipmaps=!1,t.__maxMipLevel=g.length-1}else n.texImage2D(3553,0,m,d,p,c),t.__maxMipLevel=0;x(r,h)&&_(a,r,c.width,c.height),t.__version=r.version,r.onUpdate&&r.onUpdate(r)}function I(t,i,a,s){var l=o.convert(i.texture.format),c=o.convert(i.texture.type),u=E(i.texture.internalFormat,l,c);n.texImage2D(s,0,u,i.width,i.height,0,l,c,null),e.bindFramebuffer(36160,t),e.framebufferTexture2D(36160,a,s,r.get(i.texture).__webglTexture,0),e.bindFramebuffer(36160,null)}function N(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){var i=33189;if(r){var a=n.depthTexture;a&&a.isDepthTexture&&(1015===a.type?i=36012:1014===a.type&&(i=33190));var s=B(n);e.renderbufferStorageMultisample(36161,s,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){if(r){var l=B(n);e.renderbufferStorageMultisample(36161,l,35056,n.width,n.height)}else e.renderbufferStorage(36161,34041,n.width,n.height);e.framebufferRenderbuffer(36160,33306,36161,t)}else{var c=o.convert(n.texture.format),u=o.convert(n.texture.type),h=E(n.texture.internalFormat,c,u);if(r){var d=B(n);e.renderbufferStorageMultisample(36161,d,h,n.width,n.height)}else e.renderbufferStorage(36161,h,n.width,n.height)}e.bindRenderbuffer(36161,null)}function j(t){var n=r.get(t),i=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture){if(i)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,n){if(n&&n.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,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),C(n.depthTexture,0);var i=r.get(n.depthTexture).__webglTexture;if(1026===n.depthTexture.format)e.framebufferTexture2D(36160,36096,3553,i,0);else{if(1027!==n.depthTexture.format)throw new Error("Unknown depthTexture format");e.framebufferTexture2D(36160,33306,3553,i,0)}}(n.__webglFramebuffer,t)}else if(i){n.__webglDepthbuffer=[];for(var o=0;o<6;o++)e.bindFramebuffer(36160,n.__webglFramebuffer[o]),n.__webglDepthbuffer[o]=e.createRenderbuffer(),N(n.__webglDepthbuffer[o],t,!1)}else e.bindFramebuffer(36160,n.__webglFramebuffer),n.__webglDepthbuffer=e.createRenderbuffer(),N(n.__webglDepthbuffer,t,!1);e.bindFramebuffer(36160,null)}function B(e){return u&&e.isWebGLMultisampleRenderTarget?Math.min(p,e.samples):0}var F=!1,z=!1;this.allocateTextureUnit=function(){var e=T;return e>=h&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+h),T+=1,e},this.resetTextureUnits=function(){T=0},this.setTexture2D=C,this.setTexture2DArray=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){var i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=O,this.setupRenderTarget=function(t){var i=r.get(t),s=r.get(t.texture);t.addEventListener("dispose",M),s.__webglTexture=e.createTexture(),a.memory.textures++;var l=!0===t.isWebGLCubeRenderTarget,c=!0===t.isWebGLMultisampleRenderTarget,h=w(t)||u;if(!u||1022!==t.texture.format||1015!==t.texture.type&&1016!==t.texture.type||(t.texture.format=1023,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),l){i.__webglFramebuffer=[];for(var d=0;d<6;d++)i.__webglFramebuffer[d]=e.createFramebuffer()}else if(i.__webglFramebuffer=e.createFramebuffer(),c)if(u){i.__webglMultisampledFramebuffer=e.createFramebuffer(),i.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,i.__webglColorRenderbuffer);var f=o.convert(t.texture.format),p=o.convert(t.texture.type),m=E(t.texture.internalFormat,f,p),g=B(t);e.renderbufferStorageMultisample(36161,g,m,t.width,t.height),e.bindFramebuffer(36160,i.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,i.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(i.__webglDepthRenderbuffer=e.createRenderbuffer(),N(i.__webglDepthRenderbuffer,t,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(l){n.bindTexture(34067,s.__webglTexture),P(34067,t.texture,h);for(var v=0;v<6;v++)I(i.__webglFramebuffer[v],t,36064,34069+v);x(t.texture,h)&&_(34067,t.texture,t.width,t.height),n.bindTexture(34067,null)}else n.bindTexture(3553,s.__webglTexture),P(3553,t.texture,h),I(i.__webglFramebuffer,t,36064,3553),x(t.texture,h)&&_(3553,t.texture,t.width,t.height),n.bindTexture(3553,null);t.depthBuffer&&j(t)},this.updateRenderTargetMipmap=function(e){var t=e.texture;if(x(t,w(e)||u)){var i=e.isWebGLCubeRenderTarget?34067:3553,o=r.get(t).__webglTexture;n.bindTexture(i,o),_(i,t,e.width,e.height),n.bindTexture(i,null)}},this.updateMultisampleRenderTarget=function(t){if(t.isWebGLMultisampleRenderTarget)if(u){var n=r.get(t);e.bindFramebuffer(36008,n.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,n.__webglFramebuffer);var i=t.width,o=t.height,a=16384;t.depthBuffer&&(a|=256),t.stencilBuffer&&(a|=1024),e.blitFramebuffer(0,0,i,o,0,0,i,o,a,9728),e.bindFramebuffer(36160,n.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.safeSetTexture2D=function(e,t){e&&e.isWebGLRenderTarget&&(!1===F&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),F=!0),e=e.texture),C(e,t)},this.safeSetTextureCube=function(e,t){e&&e.isWebGLCubeRenderTarget&&(!1===z&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),z=!0),e=e.texture),O(e,t)}}function ri(e,t,n){var r=n.isWebGL2;return{convert:function(e){var n;if(1009===e)return 5121;if(1017===e)return 32819;if(1018===e)return 32820;if(1019===e)return 33635;if(1010===e)return 5120;if(1011===e)return 5122;if(1012===e)return 5123;if(1013===e)return 5124;if(1014===e)return 5125;if(1015===e)return 5126;if(1016===e)return r?5131:null!==(n=t.get("OES_texture_half_float"))?n.HALF_FLOAT_OES:null;if(1021===e)return 6406;if(1022===e)return 6407;if(1023===e)return 6408;if(1024===e)return 6409;if(1025===e)return 6410;if(1026===e)return 6402;if(1027===e)return 34041;if(1028===e)return 6403;if(1029===e)return 36244;if(1030===e)return 33319;if(1031===e)return 33320;if(1032===e)return 36248;if(1033===e)return 36249;if(33776===e||33777===e||33778===e||33779===e){if(null===(n=t.get("WEBGL_compressed_texture_s3tc")))return null;if(33776===e)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===e)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===e)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===e)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===e||35841===e||35842===e||35843===e){if(null===(n=t.get("WEBGL_compressed_texture_pvrtc")))return null;if(35840===e)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===e)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===e)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===e)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===e)return null!==(n=t.get("WEBGL_compressed_texture_etc1"))?n.COMPRESSED_RGB_ETC1_WEBGL:null;if((37492===e||37496===e)&&null!==(n=t.get("WEBGL_compressed_texture_etc"))){if(37492===e)return n.COMPRESSED_RGB8_ETC2;if(37496===e)return n.COMPRESSED_RGBA8_ETC2_EAC}return 37808===e||37809===e||37810===e||37811===e||37812===e||37813===e||37814===e||37815===e||37816===e||37817===e||37818===e||37819===e||37820===e||37821===e||37840===e||37841===e||37842===e||37843===e||37844===e||37845===e||37846===e||37847===e||37848===e||37849===e||37850===e||37851===e||37852===e||37853===e?null!==(n=t.get("WEBGL_compressed_texture_astc"))?e:null:36492===e?null!==(n=t.get("EXT_texture_compression_bptc"))?e:null:1020===e?r?34042:null!==(n=t.get("WEBGL_depth_texture"))?n.UNSIGNED_INT_24_8_WEBGL:null:void 0}}}function ii(){Me.call(this),this.type="Group"}function oi(e){void 0===e&&(e=[]),Yt.call(this),this.cameras=e}Jr.prototype=Object.create(Ze.prototype),Jr.prototype.constructor=Jr,Jr.prototype.isMeshDepthMaterial=!0,Jr.prototype.copy=function(e){return Ze.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},$r.prototype=Object.create(Ze.prototype),$r.prototype.constructor=$r,$r.prototype.isMeshDistanceMaterial=!0,$r.prototype.copy=function(e){return Ze.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},ii.prototype=Object.assign(Object.create(Me.prototype),{constructor:ii,isGroup:!0}),oi.prototype=Object.assign(Object.create(Yt.prototype),{constructor:oi,isArrayCamera:!0});var ai=new T,si=new T;function li(e){var t,n,r=this,i=null,o=null,a=null,s=[],l=new te,c=new te,u=1,h="local-floor";"undefined"!==typeof window&&"VRFrameData"in window&&(o=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",x,!1));var d=new te,f=new M,p=new T,m=new Yt;m.viewport=new E,m.layers.enable(1);var g=new Yt;g.viewport=new E,g.layers.enable(2);var y=new oi([m,g]);y.layers.enable(1),y.layers.enable(2);var b,w=new v;function x(){if(r.isPresenting=null!==i&&!0===i.isPresenting){var o=i.getEyeParameters("left");t=2*o.renderWidth*u,n=o.renderHeight*u,b=e.getPixelRatio(),e.getSize(w),e.setDrawingBufferSize(t,n,1),m.viewport.set(0,0,t/2,n),g.viewport.set(t/2,0,t/2,n),O.start(),r.dispatchEvent({type:"sessionstart"})}else r.enabled&&e.setDrawingBufferSize(w.width,w.height,b),O.stop(),r.dispatchEvent({type:"sessionend"})}var _=[],A=[];function S(e){for(var t=navigator.getGamepads&&navigator.getGamepads(),n=0,r=t.length;n<r;n++){var i=t[n];if(i&&("Daydream Controller"===i.id||"Gear VR Controller"===i.id||"Oculus Go Controller"===i.id||"OpenVR Gamepad"===i.id||i.id.startsWith("Oculus Touch")||i.id.startsWith("HTC Vive Focus")||i.id.startsWith("Spatial Controller"))){var o=i.hand;if(0===e&&(""===o||"right"===o))return i;if(1===e&&"left"===o)return i}}}function C(e,r){null!==r&&4===r.length&&e.set(r[0]*t,r[1]*n,r[2]*t,r[3]*n)}this.enabled=!1,this.getController=function(e){var t=s[e];return void 0===t&&((t=new ii).matrixAutoUpdate=!1,t.visible=!1,s[e]=t),t},this.getDevice=function(){return i},this.setDevice=function(e){void 0!==e&&(i=e),O.setContext(e)},this.setFramebufferScaleFactor=function(e){u=e},this.setReferenceSpaceType=function(e){h=e},this.setPoseTarget=function(e){void 0!==e&&(a=e)},this.getCamera=function(e){var t="local-floor"===h?1.6:0;if(i.depthNear=e.near,i.depthFar=e.far,i.getFrameData(o),"local-floor"===h){var n=i.stageParameters;n?l.fromArray(n.sittingToStandingTransform):l.makeTranslation(0,t,0)}var r=o.pose,u=null!==a?a:e;u.matrix.copy(l),u.matrix.decompose(u.position,u.quaternion,u.scale),null!==r.orientation&&(f.fromArray(r.orientation),u.quaternion.multiply(f)),null!==r.position&&(f.setFromRotationMatrix(l),p.fromArray(r.position),p.applyQuaternion(f),u.position.add(p)),u.updateMatrixWorld();for(var v=u.children,b=0,w=v.length;b<w;b++)v[b].updateMatrixWorld(!0);m.near=e.near,g.near=e.near,m.far=e.far,g.far=e.far,m.matrixWorldInverse.fromArray(o.leftViewMatrix),g.matrixWorldInverse.fromArray(o.rightViewMatrix),c.getInverse(l),"local-floor"===h&&(m.matrixWorldInverse.multiply(c),g.matrixWorldInverse.multiply(c));var x=u.parent;null!==x&&(d.getInverse(x.matrixWorld),m.matrixWorldInverse.multiply(d),g.matrixWorldInverse.multiply(d)),m.matrixWorld.getInverse(m.matrixWorldInverse),g.matrixWorld.getInverse(g.matrixWorldInverse),m.projectionMatrix.fromArray(o.leftProjectionMatrix),g.projectionMatrix.fromArray(o.rightProjectionMatrix),function(e,t,n){ai.setFromMatrixPosition(t.matrixWorld),si.setFromMatrixPosition(n.matrixWorld);var r=ai.distanceTo(si),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.getInverse(e.matrixWorld);var g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(y,m,g);var E=i.getLayers();if(E.length){var M=E[0];C(m.viewport,M.leftBounds),C(g.viewport,M.rightBounds)}return function(){for(var e=0;e<s.length;e++){var t=s[e],n=S(e);if(void 0!==n&&void 0!==n.pose){if(null===n.pose)return;var r=n.pose;!1===r.hasPosition&&t.position.set(.2,-.6,-.05),null!==r.position&&t.position.fromArray(r.position),null!==r.orientation&&t.quaternion.fromArray(r.orientation),t.matrix.compose(t.position,t.quaternion,t.scale),t.matrix.premultiply(l),t.matrix.decompose(t.position,t.quaternion,t.scale),t.matrixWorldNeedsUpdate=!0,t.visible=!0;var i="Daydream Controller"===n.id?0:1;void 0===_[e]&&(_[e]=!1),_[e]!==n.buttons[i].pressed&&(_[e]=n.buttons[i].pressed,!0===_[e]?t.dispatchEvent({type:"selectstart"}):(t.dispatchEvent({type:"selectend"}),t.dispatchEvent({type:"select"}))),i=2,void 0===A[e]&&(A[e]=!1),void 0!==n.buttons[i]&&A[e]!==n.buttons[i].pressed&&(A[e]=n.buttons[i].pressed,!0===A[e]?t.dispatchEvent({type:"squeezestart"}):(t.dispatchEvent({type:"squeezeend"}),t.dispatchEvent({type:"squeeze"})))}else t.visible=!1}}(),y},this.getStandingMatrix=function(){return l},this.isPresenting=!1;var O=new nn;this.setAnimationLoop=function(e){O.setAnimationLoop(e),this.isPresenting&&O.start()},this.submitFrame=function(){this.isPresenting&&i.submitFrame()},this.dispose=function(){"undefined"!==typeof window&&window.removeEventListener("vrdisplaypresentchange",x)},this.setFrameOfReferenceType=function(){console.warn("THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.")}}function ci(){this._targetRay=null,this._grip=null,this._hand=null}function ui(e,t){var n,r=this,o=null,a=1,s=null,l="local-floor",c=null,u=null,h=[],d=new Map,f=[],p=new Yt;p.layers.enable(1),p.viewport=new E;var m=new Yt;m.layers.enable(2),m.viewport=new E;var g=[p,m],v=new oi;v.layers.enable(1),v.layers.enable(2);var y=null,b=null;function w(e){var t=d.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function x(){d.forEach((function(e,t){e.disconnect(t)})),d.clear(),y=null,b=null,e.setFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),O.stop(),r.isPresenting=!1,r.dispatchEvent({type:"sessionend"})}function _(e){for(var t=o.inputSources,n=0;n<h.length;n++)d.set(t[n],h[n]);for(var r=0;r<e.removed.length;r++){var i=e.removed[r],a=d.get(i);a&&(a.dispatchEvent({type:"disconnected",data:i}),d.delete(i))}for(var s=0;s<e.added.length;s++){var l=e.added[s],c=d.get(l);c&&c.dispatchEvent({type:"connected",data:l})}}this.layersEnabled=!1,this.enabled=!1,this.isPresenting=!1,this.getCameraPose=function(){return c},this.getController=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getGripSpace()},this.getHand=function(e){var t=h[e];return void 0===t&&(t=new ci,h[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){a=e,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){l=e,!0===r.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getSession=function(){return o},this.setSession=function(){var e,c=(e=regeneratorRuntime.mark((function e(i){var c,u;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(o=i)){e.next=24;break}if(o.addEventListener("select",w),o.addEventListener("selectstart",w),o.addEventListener("selectend",w),o.addEventListener("squeeze",w),o.addEventListener("squeezestart",w),o.addEventListener("squeezeend",w),o.addEventListener("end",x),o.addEventListener("inputsourceschange",_),!0===(c=t.getContextAttributes()).xrCompatible){e.next=14;break}return e.next=14,t.makeXRCompatible();case 14:return u={antialias:c.antialias,alpha:c.alpha,depth:c.depth,stencil:c.stencil,framebufferScaleFactor:a},n=new XRWebGLLayer(o,t,u),window.XRWebGLBinding&&this.layersEnabled?this.addLayer(n):o.updateRenderState({baseLayer:n}),e.next=19,o.requestReferenceSpace(l);case 19:s=e.sent,O.setContext(o),O.start(),r.isPresenting=!0,r.dispatchEvent({type:"sessionstart"});case 24:case"end":return e.stop()}}),e,this)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,l,"next",e)}function l(e){i(a,r,o,s,l,"throw",e)}s(void 0)}))});return function(e){return c.apply(this,arguments)}}(),this.addLayer=function(e){window.XRWebGLBinding&&this.layersEnabled&&o&&(f.push(e),o.updateRenderState({layers:f}))},this.removeLayer=function(e){window.XRWebGLBinding&&this.layersEnabled&&o&&(f.splice(f.indexOf(e),1),o.updateRenderState({layers:f}))};var A=new T,S=new T;function M(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.setPoseTarget=function(e){void 0!==e&&(u=e)},this.getCamera=function(e){v.near=m.near=p.near=e.near,v.far=m.far=p.far=e.far,y===v.near&&b===v.far||(o.updateRenderState({depthNear:v.near,depthFar:v.far}),y=v.near,b=v.far);var t=e.parent,n=v.cameras,r=u||e;M(v,t);for(var i=0;i<n.length;i++)M(n[i],t);r.matrixWorld.copy(v.matrixWorld);for(var a=r.children,s=0,l=a.length;s<l;s++)a[s].updateMatrixWorld(!0);return 2===n.length?function(e,t,n){A.setFromMatrixPosition(t.matrixWorld),S.setFromMatrixPosition(n.matrixWorld);var r=A.distanceTo(S),i=t.projectionMatrix.elements,o=n.projectionMatrix.elements,a=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=a*u,f=a*h,p=r/(-u+h),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();var g=a+p,v=s+p,y=d-m,b=f+(r-m),w=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,w,x,g,v)}(v,p,m):v.projectionMatrix.copy(p.projectionMatrix),v};var C=null,O=new nn;O.setAnimationLoop((function(t,r){if(null!==(c=r.getViewerPose(s))){var i=c.views;e.setFramebuffer(n.framebuffer);var a=!1;i.length!==v.cameras.length&&(v.cameras.length=0,a=!0);for(var l=0;l<i.length;l++){var u=i[l],d=n.getViewport(u),f=g[l];f.matrix.fromArray(u.transform.matrix),f.projectionMatrix.fromArray(u.projectionMatrix),f.viewport.set(d.x,d.y,d.width,d.height),0===l&&v.matrix.copy(f.matrix),!0===a&&v.cameras.push(f)}}for(var p=o.inputSources,m=0;m<h.length;m++){var y=h[m],b=p[m];y.update(b,r,s)}C&&C(t,r)})),this.setAnimationLoop=function(e){C=e},this.dispose=function(){}}function hi(e){function t(t,n){t.opacity.value=n.opacity,n.color&&t.diffuse.value.copy(n.color),n.emissive&&t.emissive.value.copy(n.emissive).multiplyScalar(n.emissiveIntensity),n.map&&(t.map.value=n.map),n.alphaMap&&(t.alphaMap.value=n.alphaMap),n.specularMap&&(t.specularMap.value=n.specularMap);var r,i,o=e.get(n).envMap;if(o){t.envMap.value=o,t.flipEnvMap.value=o.isCubeTexture&&o._needsFlipEnvMap?-1:1,t.reflectivity.value=n.reflectivity,t.refractionRatio.value=n.refractionRatio;var a=e.get(o).__maxMipLevel;void 0!==a&&(t.maxMipLevel.value=a)}n.lightMap&&(t.lightMap.value=n.lightMap,t.lightMapIntensity.value=n.lightMapIntensity),n.aoMap&&(t.aoMap.value=n.aoMap,t.aoMapIntensity.value=n.aoMapIntensity),n.map?r=n.map:n.specularMap?r=n.specularMap:n.displacementMap?r=n.displacementMap:n.normalMap?r=n.normalMap:n.bumpMap?r=n.bumpMap:n.roughnessMap?r=n.roughnessMap:n.metalnessMap?r=n.metalnessMap:n.alphaMap?r=n.alphaMap:n.emissiveMap?r=n.emissiveMap:n.clearcoatMap?r=n.clearcoatMap:n.clearcoatNormalMap?r=n.clearcoatNormalMap:n.clearcoatRoughnessMap&&(r=n.clearcoatRoughnessMap),void 0!==r&&(r.isWebGLRenderTarget&&(r=r.texture),!0===r.matrixAutoUpdate&&r.updateMatrix(),t.uvTransform.value.copy(r.matrix)),n.aoMap?i=n.aoMap:n.lightMap&&(i=n.lightMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uv2Transform.value.copy(i.matrix))}function n(t,n){t.roughness.value=n.roughness,t.metalness.value=n.metalness,n.roughnessMap&&(t.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(t.metalnessMap.value=n.metalnessMap),n.emissiveMap&&(t.emissiveMap.value=n.emissiveMap),n.bumpMap&&(t.bumpMap.value=n.bumpMap,t.bumpScale.value=n.bumpScale,1===n.side&&(t.bumpScale.value*=-1)),n.normalMap&&(t.normalMap.value=n.normalMap,t.normalScale.value.copy(n.normalScale),1===n.side&&t.normalScale.value.negate()),n.displacementMap&&(t.displacementMap.value=n.displacementMap,t.displacementScale.value=n.displacementScale,t.displacementBias.value=n.displacementBias),e.get(n).envMap&&(t.envMapIntensity.value=n.envMapIntensity)}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o){r.isMeshBasicMaterial?t(e,r):r.isMeshLambertMaterial?(t(e,r),function(e,t){t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap)}(e,r)):r.isMeshToonMaterial?(t(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap),t.emissiveMap&&(e.emissiveMap.value=t.emissiveMap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshPhongMaterial?(t(e,r),function(e,t){e.specular.value.copy(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,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshStandardMaterial?(t(e,r),r.isMeshPhysicalMaterial?function(e,t){n(e,t),e.reflectivity.value=t.reflectivity,e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.sheen&&e.sheen.value.copy(t.sheen),t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,1===t.side&&e.clearcoatNormalScale.value.negate()),e.transmission.value=t.transmission,t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap)}(e,r):n(e,r)):r.isMeshMatcapMaterial?(t(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap),t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDepthMaterial?(t(e,r),function(e,t){t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isMeshDistanceMaterial?(t(e,r),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}(e,r)):r.isMeshNormalMaterial?(t(e,r),function(e,t){t.bumpMap&&(e.bumpMap.value=t.bumpMap,e.bumpScale.value=t.bumpScale,1===t.side&&(e.bumpScale.value*=-1)),t.normalMap&&(e.normalMap.value=t.normalMap,e.normalScale.value.copy(t.normalScale),1===t.side&&e.normalScale.value.negate()),t.displacementMap&&(e.displacementMap.value=t.displacementMap,e.displacementScale.value=t.displacementScale,e.displacementBias.value=t.displacementBias)}(e,r)):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){var i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){var n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function di(e){var t=void 0!==(e=e||{}).canvas?e.canvas:function(){var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return e.style.display="block",e}(),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,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat,h=null,d=null,f=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=3e3,this.physicallyCorrectLights=!1,this.toneMapping=0,this.toneMappingExposure=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p=this,m=!1,y=null,b=0,w=0,x=null,_=null,A=-1,S=null,M=new E,C=new E,O=null,R=t.width,k=t.height,P=1,L=null,D=null,I=new E(0,0,R,k),N=new E(0,0,R,k),j=!1,B=new tn,F=!1,z=!1,H=new te,U=new T,V={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function G(){return null===x?P:1}var W,q,X,Y,K,Q,Z,J,$,ee,ne,re,ie,oe,ae,se,le,ce,ue,he,de,fe=n;function pe(e,n){for(var r=0;r<e.length;r++){var i=e[r],o=t.getContext(i,n);if(null!==o)return o}return null}try{var me={alpha:r,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if(t.addEventListener("webglcontextlost",we,!1),t.addEventListener("webglcontextrestored",xe,!1),null===fe){var ge=["webgl2","webgl","experimental-webgl"];if(!0===p.isWebGL1Renderer&&ge.shift(),null===(fe=pe(ge,me)))throw pe(ge)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===fe.getShaderPrecisionFormat&&(fe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(ke){throw console.error("THREE.WebGLRenderer: "+ke.message),ke}function ve(){W=new mn(fe),q=new dn(fe,W,e),W.init(q),he=new ri(fe,W,q),(X=new ti(fe,W,q)).scissor(C.copy(N).multiplyScalar(P).floor()),X.viewport(M.copy(I).multiplyScalar(P).floor()),Y=new yn(fe),K=new Hr,Q=new ni(fe,W,X,K,q,he,Y),Z=new pn(p),J=new rn(fe,q),de=new un(fe,W,J,q),$=new gn(fe,J,Y,de),ee=new _n(fe,$,J,Y),le=new xn(fe),ae=new fn(K),ne=new zr(p,Z,W,q,de,ae),re=new hi(K),ie=new Wr(K),oe=new Zr(W,q),se=new cn(p,Z,X,ee,s),ce=new hn(fe,W,Y,q),ue=new vn(fe,W,Y,q),Y.programs=ne.programs,p.capabilities=q,p.extensions=W,p.properties=K,p.renderLists=ie,p.state=X,p.info=Y}ve();var ye="undefined"!==typeof navigator&&"xr"in navigator?new ui(p,fe):new li(p);this.xr=ye;var be=new ei(p,ee,q.maxTextureSize);function we(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),m=!0}function xe(){console.log("THREE.WebGLRenderer: Context Restored."),m=!1,ve()}function _e(e){var t=e.target;t.removeEventListener("dispose",_e),function(e){Ee(e),K.remove(e)}(t)}function Ee(e){var t=K.get(e).program;void 0!==t&&ne.releaseProgram(t)}this.shadowMap=be,this.getContext=function(){return fe},this.getContextAttributes=function(){return fe.getContextAttributes()},this.forceContextLoss=function(){var e=W.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){var e=W.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return P},this.setPixelRatio=function(e){void 0!==e&&(P=e,this.setSize(R,k,!1))},this.getSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"),e=new v),e.set(R,k)},this.setSize=function(e,n,r){ye.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=e,k=n,t.width=Math.floor(e*P),t.height=Math.floor(n*P),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"),e=new v),e.set(R*P,k*P).floor()},this.setDrawingBufferSize=function(e,n,r){R=e,k=n,P=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"),e=new E),e.copy(M)},this.getViewport=function(e){return e.copy(I)},this.setViewport=function(e,t,n,r){e.isVector4?I.set(e.x,e.y,e.z,e.w):I.set(e,t,n,r),X.viewport(M.copy(I).multiplyScalar(P).floor())},this.getScissor=function(e){return e.copy(N)},this.setScissor=function(e,t,n,r){e.isVector4?N.set(e.x,e.y,e.z,e.w):N.set(e,t,n,r),X.scissor(C.copy(N).multiplyScalar(P).floor())},this.getScissorTest=function(){return j},this.setScissorTest=function(e){X.setScissorTest(j=e)},this.setOpaqueSort=function(e){L=e},this.setTransparentSort=function(e){D=e},this.getClearColor=function(e){return void 0===e&&(console.warn("WebGLRenderer: .getClearColor() now requires a Color as an argument"),e=new Ye),e.copy(se.getClearColor())},this.setClearColor=function(){se.setClearColor.apply(se,arguments)},this.getClearAlpha=function(){return se.getClearAlpha()},this.setClearAlpha=function(){se.setClearAlpha.apply(se,arguments)},this.clear=function(e,t,n){var r=0;(void 0===e||e)&&(r|=16384),(void 0===t||t)&&(r|=256),(void 0===n||n)&&(r|=1024),fe.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.dispose=function(){t.removeEventListener("webglcontextlost",we,!1),t.removeEventListener("webglcontextrestored",xe,!1),ie.dispose(),oe.dispose(),K.dispose(),Z.dispose(),ee.dispose(),de.dispose(),ye.dispose(),Se.stop()},this.renderBufferImmediate=function(e,t){de.initAttributes();var n=K.get(e);e.hasPositions&&!n.position&&(n.position=fe.createBuffer()),e.hasNormals&&!n.normal&&(n.normal=fe.createBuffer()),e.hasUvs&&!n.uv&&(n.uv=fe.createBuffer()),e.hasColors&&!n.color&&(n.color=fe.createBuffer());var r=t.getAttributes();e.hasPositions&&(fe.bindBuffer(34962,n.position),fe.bufferData(34962,e.positionArray,35048),de.enableAttribute(r.position),fe.vertexAttribPointer(r.position,3,5126,!1,0,0)),e.hasNormals&&(fe.bindBuffer(34962,n.normal),fe.bufferData(34962,e.normalArray,35048),de.enableAttribute(r.normal),fe.vertexAttribPointer(r.normal,3,5126,!1,0,0)),e.hasUvs&&(fe.bindBuffer(34962,n.uv),fe.bufferData(34962,e.uvArray,35048),de.enableAttribute(r.uv),fe.vertexAttribPointer(r.uv,2,5126,!1,0,0)),e.hasColors&&(fe.bindBuffer(34962,n.color),fe.bufferData(34962,e.colorArray,35048),de.enableAttribute(r.color),fe.vertexAttribPointer(r.color,3,5126,!1,0,0)),de.disableUnusedAttributes(),fe.drawArrays(4,0,e.count),e.count=0},this.renderBufferDirect=function(e,t,n,r,i,o){null===t&&(t=V);var a=i.isMesh&&i.matrixWorld.determinant()<0,s=Re(e,t,r,i);X.setMaterial(r,a);var l=n.index,c=n.attributes.position;if(null===l){if(void 0===c||0===c.count)return}else if(0===l.count)return;var u,h=1;!0===r.wireframe&&(l=$.getWireframeAttribute(n),h=2),(r.morphTargets||r.morphNormals)&&le.update(i,n,r,s),de.setup(i,r,s,n,l);var d=ce;null!==l&&(u=J.get(l),(d=ue).setIndex(u));var f=null!==l?l.count:c.count,p=n.drawRange.start*h,m=n.drawRange.count*h,g=null!==o?o.start*h:0,v=null!==o?o.count*h:1/0,y=Math.max(p,g),b=Math.min(f,p+m,g+v)-1,w=Math.max(0,b-y+1);if(0!==w){if(i.isMesh)!0===r.wireframe?(X.setLineWidth(r.wireframeLinewidth*G()),d.setMode(1)):d.setMode(4);else if(i.isLine){var x=r.linewidth;void 0===x&&(x=1),X.setLineWidth(x*G()),i.isLineSegments?d.setMode(1):i.isLineLoop?d.setMode(2):d.setMode(3)}else i.isPoints?d.setMode(0):i.isSprite&&d.setMode(4);if(i.isInstancedMesh)d.renderInstances(y,w,i.count);else if(n.isInstancedBufferGeometry){var _=Math.min(n.instanceCount,n._maxInstanceCount);d.renderInstances(y,w,_)}else d.render(y,w)}},this.compile=function(e,t){(d=oe.get(e)).init(),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(d.pushLight(e),e.castShadow&&d.pushShadow(e))})),d.setupLights();var n=new WeakMap;e.traverse((function(t){var r=t.material;if(r)if(Array.isArray(r))for(var i=0;i<r.length;i++){var o=r[i];!1===n.has(o)&&(Oe(o,e,t),n.set(o))}else!1===n.has(r)&&(Oe(r,e,t),n.set(r))}))};var Ae=null,Se=new nn;function Me(e,t,n,r){if(!1!==e.visible){if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)d.pushLight(e),e.castShadow&&d.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||B.intersectsSprite(e)){r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);var i=ee.update(e),o=e.material;o.visible&&h.push(e,i,o,n,U.z,null)}}else if(e.isImmediateRenderObject)r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H),h.push(e,null,e.material,n,U.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==Y.render.frame&&(e.skeleton.update(),e.skeleton.frame=Y.render.frame),!e.frustumCulled||B.intersectsObject(e))){r&&U.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);var a=ee.update(e),s=e.material;if(Array.isArray(s))for(var l=a.groups,c=0,u=l.length;c<u;c++){var f=l[c],p=s[f.materialIndex];p&&p.visible&&h.push(e,a,p,n,U.z,f)}else s.visible&&h.push(e,a,s,n,U.z,null)}for(var m=e.children,g=0,v=m.length;g<v;g++)Me(m[g],t,n,r)}}function Te(e,t,n){for(var r=!0===t.isScene?t.overrideMaterial:null,i=0,o=e.length;i<o;i++){var a=e[i],s=a.object,l=a.geometry,c=null===r?a.material:r,u=a.group;if(n.isArrayCamera)for(var h=n.cameras,f=0,p=h.length;f<p;f++){var m=h[f];s.layers.test(m.layers)&&(X.viewport(M.copy(m.viewport)),d.setupLightsView(m),Ce(s,t,m,l,c,u))}else Ce(s,t,n,l,c,u)}}function Ce(e,t,n,r,i,o){if(e.onBeforeRender(p,t,n,r,i,o),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),e.isImmediateRenderObject){var a=Re(n,t,i,e);X.setMaterial(i),de.reset(),function(e,t){e.render((function(e){p.renderBufferImmediate(e,t)}))}(e,a)}else p.renderBufferDirect(n,t,r,i,e,o);e.onAfterRender(p,t,n,r,i,o)}function Oe(e,t,n){!0!==t.isScene&&(t=V);var r=K.get(e),i=d.state.lights,o=d.state.shadowsArray,a=i.state.version,s=ne.getParameters(e,i.state,o,t,n),l=ne.getProgramCacheKey(s),c=r.program,u=!0;if(r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=Z.get(e.envMap||r.environment),void 0===c)e.addEventListener("dispose",_e);else if(c.cacheKey!==l)Ee(e);else if(r.lightsStateVersion!==a)u=!1;else{if(void 0!==s.shaderID)return;u=!1}u&&(s.uniforms=ne.getUniforms(e),e.onBeforeCompile(s,p),c=ne.acquireProgram(s,l),r.program=c,r.uniforms=s.uniforms,r.outputEncoding=s.outputEncoding);var h=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(r.numClippingPlanes=ae.numPlanes,r.numIntersection=ae.numIntersection,h.clippingPlanes=ae.uniform),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=a,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotShadowMatrix.value=i.state.spotShadowMatrix,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix);var f=r.program.getUniforms(),m=br.seqWithValue(f.seq,h);r.uniformsList=m}function Re(e,t,n,r){!0!==t.isScene&&(t=V),Q.resetTextureUnits();var i=t.fog,o=n.isMeshStandardMaterial?t.environment:null,a=null===x?p.outputEncoding:x.texture.encoding,s=Z.get(n.envMap||o),l=K.get(n),c=d.state.lights;if(!0===F&&(!0===z||e!==S)){var u=e===S&&n.id===A;ae.setState(n,e,u)}n.version===l.__version?n.fog&&l.fog!==i||l.environment!==o||l.needsLights&&l.lightsStateVersion!==c.state.version?Oe(n,t,r):void 0===l.numClippingPlanes||l.numClippingPlanes===ae.numPlanes&&l.numIntersection===ae.numIntersection?(l.outputEncoding!==a||l.envMap!==s)&&Oe(n,t,r):Oe(n,t,r):(Oe(n,t,r),l.__version=n.version);var h=!1,f=!1,m=!1,v=l.program,y=v.getUniforms(),b=l.uniforms;if(X.useProgram(v.program)&&(h=!0,f=!0,m=!0),n.id!==A&&(A=n.id,f=!0),h||S!==e){if(y.setValue(fe,"projectionMatrix",e.projectionMatrix),q.logarithmicDepthBuffer&&y.setValue(fe,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),S!==e&&(S=e,f=!0,m=!0),n.isShaderMaterial||n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshStandardMaterial||n.envMap){var w=y.map.cameraPosition;void 0!==w&&w.setValue(fe,U.setFromMatrixPosition(e.matrixWorld))}(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&y.setValue(fe,"isOrthographic",!0===e.isOrthographicCamera),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial||n.isShadowMaterial||n.skinning)&&y.setValue(fe,"viewMatrix",e.matrixWorldInverse)}if(n.skinning){y.setOptional(fe,r,"bindMatrix"),y.setOptional(fe,r,"bindMatrixInverse");var _=r.skeleton;if(_){var E=_.bones;if(q.floatVertexTextures){if(null===_.boneTexture){var M=Math.sqrt(4*E.length);M=g.ceilPowerOfTwo(M),M=Math.max(M,4);var T=new Float32Array(M*M*4);T.set(_.boneMatrices);var C=new Jt(T,M,M,1023,1015);_.boneMatrices=T,_.boneTexture=C,_.boneTextureSize=M}y.setValue(fe,"boneTexture",_.boneTexture,Q),y.setValue(fe,"boneTextureSize",_.boneTextureSize)}else y.setOptional(fe,_,"boneMatrices")}}return(f||l.receiveShadow!==r.receiveShadow)&&(l.receiveShadow=r.receiveShadow,y.setValue(fe,"receiveShadow",r.receiveShadow)),f&&(y.setValue(fe,"toneMappingExposure",p.toneMappingExposure),l.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(b,m),i&&n.fog&&re.refreshFogUniforms(b,i),re.refreshMaterialUniforms(b,n,P,k),br.upload(fe,l.uniformsList,b,Q)),n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(br.upload(fe,l.uniformsList,b,Q),n.uniformsNeedUpdate=!1),n.isSpriteMaterial&&y.setValue(fe,"center",r.center),y.setValue(fe,"modelViewMatrix",r.modelViewMatrix),y.setValue(fe,"normalMatrix",r.normalMatrix),y.setValue(fe,"modelMatrix",r.matrixWorld),v}Se.setAnimationLoop((function(e){ye.isPresenting||Ae&&Ae(e)})),"undefined"!==typeof window&&Se.setContext(window),this.setAnimationLoop=function(e){Ae=e,ye.setAnimationLoop(e),null===e?Se.stop():Se.start()},this.render=function(e,t){var n,r;if(void 0!==arguments[2]&&(console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."),n=arguments[2]),void 0!==arguments[3]&&(console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."),r=arguments[3]),void 0===t||!0===t.isCamera){if(!0!==m){de.resetDefaultState(),A=-1,S=null,!0===e.autoUpdate&&e.updateMatrixWorld(),null===t.parent&&t.updateMatrixWorld(),!0===ye.enabled&&!0===ye.isPresenting&&(t=ye.getCamera(t)),!0===e.isScene&&e.onBeforeRender(p,e,t,n||x),(d=oe.get(e,f.length)).init(),f.push(d),H.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),B.setFromProjectionMatrix(H),z=this.localClippingEnabled,F=ae.init(this.clippingPlanes,z,t),(h=ie.get(e,t)).init(),Me(e,t,0,p.sortObjects),h.finish(),!0===p.sortObjects&&h.sort(L,D),!0===F&&ae.beginShadows();var i=d.state.shadowsArray;be.render(i,e,t),d.setupLights(),d.setupLightsView(t),!0===F&&ae.endShadows(),!0===this.info.autoReset&&this.info.reset(),void 0!==n&&this.setRenderTarget(n),se.render(h,e,t,r);var o=h.opaque,a=h.transparent;o.length>0&&Te(o,e,t),a.length>0&&Te(a,e,t),!0===e.isScene&&e.onAfterRender(p,e,t),null!==x&&(Q.updateRenderTargetMipmap(x),Q.updateMultisampleRenderTarget(x)),X.buffers.depth.setTest(!0),X.buffers.depth.setMask(!0),X.buffers.color.setMask(!0),X.setPolygonOffset(!1),ye.enabled&&ye.submitFrame&&ye.submitFrame(),f.pop(),d=f.length>0?f[f.length-1]:null,h=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.setTexture2D=function(){var e=!1;return function(t,n){t&&t.isWebGLRenderTarget&&(e||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),e=!0),t=t.texture),Q.setTexture2D(t,n)}}(),this.setFramebuffer=function(e){y!==e&&null===x&&fe.bindFramebuffer(36160,e),y=e},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return w},this.getRenderList=function(){return h},this.setRenderList=function(e){h=e},this.getRenderTarget=function(){return x},this.setRenderTarget=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),x=e,b=t,w=n,e&&void 0===K.get(e).__webglFramebuffer&&Q.setupRenderTarget(e);var r=y,i=!1;if(e){var o=K.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(r=o[t],i=!0):r=e.isWebGLMultisampleRenderTarget?K.get(e).__webglMultisampledFramebuffer:o,M.copy(e.viewport),C.copy(e.scissor),O=e.scissorTest}else M.copy(I).multiplyScalar(P).floor(),C.copy(N).multiplyScalar(P).floor(),O=j;if(_!==r&&(fe.bindFramebuffer(36160,r),_=r),X.viewport(M),X.scissor(C),X.setScissorTest(O),i){var a=K.get(e.texture);fe.framebufferTexture2D(36160,36064,34069+t,a.__webglTexture,n)}},this.readRenderTargetPixels=function(e,t,n,r,i,o,a){if(e&&e.isWebGLRenderTarget){var s=K.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(s=s[a]),s){var l=!1;s!==_&&(fe.bindFramebuffer(36160,s),l=!0);try{var c=e.texture,u=c.format,h=c.type;if(1023!==u&&he.convert(u)!==fe.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");var d=1016===h&&(W.has("EXT_color_buffer_half_float")||q.isWebGL2&&W.has("EXT_color_buffer_float"));if(1009!==h&&he.convert(h)!==fe.getParameter(35738)&&(1015!==h||!(q.isWebGL2||W.has("OES_texture_float")||W.has("WEBGL_color_buffer_float")))&&!d)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===fe.checkFramebufferStatus(36160)?t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&fe.readPixels(t,n,r,i,he.convert(u),he.convert(h),o):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{l&&fe.bindFramebuffer(36160,_)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(e,t,n){void 0===n&&(n=0);var r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r),a=he.convert(t.format);Q.setTexture2D(t,0),fe.copyTexImage2D(3553,n,a,e.x,e.y,i,o,0),X.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r){void 0===r&&(r=0);var i=t.image.width,o=t.image.height,a=he.convert(n.format),s=he.convert(n.type);Q.setTexture2D(n,0),fe.pixelStorei(37440,n.flipY),fe.pixelStorei(37441,n.premultiplyAlpha),fe.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?fe.texSubImage2D(3553,r,e.x,e.y,i,o,a,s,t.image.data):t.isCompressedTexture?fe.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):fe.texSubImage2D(3553,r,e.x,e.y,a,s,t.image),0===r&&n.generateMipmaps&&fe.generateMipmap(3553),X.unbindTexture()},this.initTexture=function(e){Q.setTexture2D(e,0),X.unbindTexture()},this.resetState=function(){X.reset(),de.reset()},"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}function fi(e){di.call(this,e)}Object.assign(li.prototype,h.prototype),Object.assign(ci.prototype,{constructor:ci,getHandSpace:function(){return null===this._hand&&(this._hand=new ii,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand},getTargetRaySpace:function(){return null===this._targetRay&&(this._targetRay=new ii,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1),this._targetRay},getGripSpace:function(){return null===this._grip&&(this._grip=new ii,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1),this._grip},dispatchEvent:function(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this},disconnect:function(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this},update:function(e,t,n){var r=null,i=null,o=null,a=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(l&&e.hand){o=!0;for(var c,h=u(e.hand.values());!(c=h()).done;){var d=c.value,f=t.getJointPose(d,n);if(void 0===l.joints[d.jointName]){var p=new ii;p.matrixAutoUpdate=!1,p.visible=!1,l.joints[d.jointName]=p,l.add(p)}var m=l.joints[d.jointName];null!==f&&(m.matrix.fromArray(f.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.jointRadius=f.radius),m.visible=null!==f}var g=l.joints["index-finger-tip"],v=l.joints["thumb-tip"],y=g.position.distanceTo(v.position);l.inputState.pinching&&y>.025?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&y<=.015&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==a&&null!==(r=t.getPose(e.targetRaySpace,n))&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale)),null!==s&&e.gripSpace&&null!==(i=t.getPose(e.gripSpace,n))&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale));return null!==a&&(a.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==o),this}}),Object.assign(ui.prototype,h.prototype),fi.prototype=Object.assign(Object.create(di.prototype),{constructor:fi,isWebGL1Renderer:!0});var pi=function(){function e(e,t){Object.defineProperty(this,"isFogExp2",{value:!0}),this.name="",this.color=new Ye(e),this.density=void 0!==t?t:25e-5}var t=e.prototype;return t.clone=function(){return new e(this.color,this.density)},t.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},e}(),mi=function(){function e(e,t,n){Object.defineProperty(this,"isFog",{value:!0}),this.name="",this.color=new Ye(e),this.near=void 0!==t?t:1,this.far=void 0!==n?n:1e3}var t=e.prototype;return t.clone=function(){return new e(this.color,this.near,this.far)},t.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},e}(),gi=function(e){function t(){var t;return t=e.call(this)||this,Object.defineProperty(l(t),"isScene",{value:!0}),t.type="Scene",t.background=null,t.environment=null,t.fog=null,t.overrideMaterial=null,t.autoUpdate=!0,"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:l(t)})),t}s(t,e);var n=t.prototype;return n.copy=function(t,n){return e.prototype.copy.call(this,t,n),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},n.toJSON=function(t){var n=e.prototype.toJSON.call(this,t);return null!==this.background&&(n.object.background=this.background.toJSON(t)),null!==this.environment&&(n.object.environment=this.environment.toJSON(t)),null!==this.fog&&(n.object.fog=this.fog.toJSON()),n},t}(Me);function vi(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=35044,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=g.generateUUID()}Object.defineProperty(vi.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(vi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setUsage:function(e){return this.usage=e,this},copy:function(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this},copyAt:function(e,t,n){e*=this.stride,n*=t.stride;for(var r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this},set:function(e,t){return void 0===t&&(t=0),this.array.set(e,t),this},clone:function(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=g.generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);var t=new vi(new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),this.stride);return t.setUsage(this.usage),t},onUpload:function(e){return this.onUploadCallback=e,this},toJSON:function(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=g.generateUUID()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}});var yi,bi=new T;function wi(e,t,n,r){this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=!0===r}function xi(e){Ze.call(this),this.type="SpriteMaterial",this.color=new Ye(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(e)}Object.defineProperties(wi.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}},needsUpdate:{set:function(e){this.data.needsUpdate=e}}}),Object.assign(wi.prototype,{isInterleavedBufferAttribute:!0,applyMatrix4:function(e){for(var t=0,n=this.data.count;t<n;t++)bi.x=this.getX(t),bi.y=this.getY(t),bi.z=this.getZ(t),bi.applyMatrix4(e),this.setXYZ(t,bi.x,bi.y,bi.z);return this},setX:function(e,t){return this.data.array[e*this.data.stride+this.offset]=t,this},setY:function(e,t){return this.data.array[e*this.data.stride+this.offset+1]=t,this},setZ:function(e,t){return this.data.array[e*this.data.stride+this.offset+2]=t,this},setW:function(e,t){return this.data.array[e*this.data.stride+this.offset+3]=t,this},getX:function(e){return this.data.array[e*this.data.stride+this.offset]},getY:function(e){return this.data.array[e*this.data.stride+this.offset+1]},getZ:function(e){return this.data.array[e*this.data.stride+this.offset+2]},getW:function(e){return this.data.array[e*this.data.stride+this.offset+3]},setXY:function(e,t,n){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this},setXYZ:function(e,t,n,r){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this},setXYZW:function(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this},clone:function(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");for(var t=[],n=0;n<this.count;n++)for(var r=n*this.data.stride+this.offset,i=0;i<this.itemSize;i++)t.push(this.data.array[r+i]);return new tt(new this.array.constructor(t),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new wi(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)},toJSON:function(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");for(var t=[],n=0;n<this.count;n++)for(var r=n*this.data.stride+this.offset,i=0;i<this.itemSize;i++)t.push(this.data.array[r+i]);return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}),xi.prototype=Object.create(Ze.prototype),xi.prototype.constructor=xi,xi.prototype.isSpriteMaterial=!0,xi.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this};var _i=new T,Ei=new T,Ai=new T,Si=new v,Mi=new v,Ti=new te,Ci=new T,Oi=new T,Ri=new T,ki=new v,Pi=new v,Li=new v;function Di(e){if(Me.call(this),this.type="Sprite",void 0===yi){yi=new _t;var t=new vi(new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),5);yi.setIndex([0,1,2,0,2,3]),yi.setAttribute("position",new wi(t,3,0,!1)),yi.setAttribute("uv",new wi(t,2,3,!1))}this.geometry=yi,this.material=void 0!==e?e:new xi,this.center=new v(.5,.5)}function Ii(e,t,n,r,i,o){Si.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Mi.x=o*Si.x-i*Si.y,Mi.y=i*Si.x+o*Si.y):Mi.copy(Si),e.copy(t),e.x+=Mi.x,e.y+=Mi.y,e.applyMatrix4(Ti)}Di.prototype=Object.assign(Object.create(Me.prototype),{constructor:Di,isSprite:!0,raycast:function(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Ei.setFromMatrixScale(this.matrixWorld),Ti.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Ai.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Ei.multiplyScalar(-Ai.z);var n,r,i=this.material.rotation;0!==i&&(r=Math.cos(i),n=Math.sin(i));var o=this.center;Ii(Ci.set(-.5,-.5,0),Ai,o,Ei,n,r),Ii(Oi.set(.5,-.5,0),Ai,o,Ei,n,r),Ii(Ri.set(.5,.5,0),Ai,o,Ei,n,r),ki.set(0,0),Pi.set(1,0),Li.set(1,1);var a=e.ray.intersectTriangle(Ci,Oi,Ri,!1,_i);if(null!==a||(Ii(Oi.set(-.5,.5,0),Ai,o,Ei,n,r),Pi.set(0,1),null!==(a=e.ray.intersectTriangle(Ci,Ri,Oi,!1,_i)))){var s=e.ray.origin.distanceTo(_i);s<e.near||s>e.far||t.push({distance:s,point:_i.clone(),uv:He.getUV(_i,Ci,Oi,Ri,ki,Pi,Li,new v),face:null,object:this})}},copy:function(e){return Me.prototype.copy.call(this,e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}});var Ni=new T,ji=new T;function Bi(){Me.call(this),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}Bi.prototype=Object.assign(Object.create(Me.prototype),{constructor:Bi,isLOD:!0,copy:function(e){Me.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.autoUpdate=e.autoUpdate,this},addLevel:function(e,t){void 0===t&&(t=0),t=Math.abs(t);var n,r=this.levels;for(n=0;n<r.length&&!(t<r[n].distance);n++);return r.splice(n,0,{distance:t,object:e}),this.add(e),this},getCurrentLevel:function(){return this._currentLevel},getObjectForDistance:function(e){var t=this.levels;if(t.length>0){var n,r;for(n=1,r=t.length;n<r&&!(e<t[n].distance);n++);return t[n-1].object}return null},raycast:function(e,t){if(this.levels.length>0){Ni.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(Ni);this.getObjectForDistance(n).raycast(e,t)}},update:function(e){var t=this.levels;if(t.length>1){Ni.setFromMatrixPosition(e.matrixWorld),ji.setFromMatrixPosition(this.matrixWorld);var n,r,i=Ni.distanceTo(ji)/e.zoom;for(t[0].object.visible=!0,n=1,r=t.length;n<r&&i>=t[n].distance;n++)t[n-1].object.visible=!1,t[n].object.visible=!0;for(this._currentLevel=n-1;n<r;n++)t[n].object.visible=!1}},toJSON:function(e){var t=Me.prototype.toJSON.call(this,e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),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}});var Fi=new T,zi=new E,Hi=new E,Ui=new T,Vi=new te;function Gi(e,t){e&&e.isGeometry&&console.error("THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),zt.call(this,e,t),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new te,this.bindMatrixInverse=new te}function Wi(){Me.call(this),this.type="Bone"}Gi.prototype=Object.assign(Object.create(zt.prototype),{constructor:Gi,isSkinnedMesh:!0,copy:function(e){return zt.prototype.copy.call(this,e),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this},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.copy(t).invert()},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){for(var e=new E,t=this.geometry.attributes.skinWeight,n=0,r=t.count;n<r;n++){e.x=t.getX(n),e.y=t.getY(n),e.z=t.getZ(n),e.w=t.getW(n);var i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(e){zt.prototype.updateMatrixWorld.call(this,e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},boneTransform:function(e,t){var n=this.skeleton,r=this.geometry;zi.fromBufferAttribute(r.attributes.skinIndex,e),Hi.fromBufferAttribute(r.attributes.skinWeight,e),Fi.fromBufferAttribute(r.attributes.position,e).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(var i=0;i<4;i++){var o=Hi.getComponent(i);if(0!==o){var a=zi.getComponent(i);Vi.multiplyMatrices(n.bones[a].matrixWorld,n.boneInverses[a]),t.addScaledVector(Ui.copy(Fi).applyMatrix4(Vi),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}),Wi.prototype=Object.assign(Object.create(Me.prototype),{constructor:Wi,isBone:!0});var qi=new te,Xi=new te;function Yi(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.uuid=g.generateUUID(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}Object.assign(Yi.prototype,{init:function(){var e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(var n=0,r=this.bones.length;n<r;n++)this.boneInverses.push(new te)}},calculateInverses:function(){this.boneInverses.length=0;for(var e=0,t=this.bones.length;e<t;e++){var n=new te;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}},pose:function(){for(var e=0,t=this.bones.length;e<t;e++){var n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(var r=0,i=this.bones.length;r<i;r++){var o=this.bones[r];o&&(o.parent&&o.parent.isBone?(o.matrix.copy(o.parent.matrixWorld).invert(),o.matrix.multiply(o.matrixWorld)):o.matrix.copy(o.matrixWorld),o.matrix.decompose(o.position,o.quaternion,o.scale))}},update: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:Xi;qi.multiplyMatrices(a,t[i]),qi.toArray(n,16*i)}null!==r&&(r.needsUpdate=!0)},clone:function(){return new Yi(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}},dispose:function(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)},fromJSON:function(e,t){this.uuid=e.uuid;for(var n=0,r=e.bones.length;n<r;n++){var i=e.bones[n],o=t[i];void 0===o&&(console.warn("THREE.Skeleton: No bone found with UUID:",i),o=new Wi),this.bones.push(o),this.boneInverses.push((new te).fromArray(e.boneInverses[n]))}return this.init(),this},toJSON:function(){var e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;for(var t=this.bones,n=this.boneInverses,r=0,i=t.length;r<i;r++){var o=t[r];e.bones.push(o.uuid);var a=n[r];e.boneInverses.push(a.toArray())}return e}});var Ki=new te,Qi=new te,Zi=[],Ji=new zt;function $i(e,t,n){zt.call(this,e,t),this.instanceMatrix=new tt(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}function eo(e){Ze.call(this),this.type="LineBasicMaterial",this.color=new Ye(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.morphTargets=!1,this.setValues(e)}$i.prototype=Object.assign(Object.create(zt.prototype),{constructor:$i,isInstancedMesh:!0,copy:function(e){return zt.prototype.copy.call(this,e),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this},getColorAt:function(e,t){t.fromArray(this.instanceColor.array,3*e)},getMatrixAt:function(e,t){t.fromArray(this.instanceMatrix.array,16*e)},raycast:function(e,t){var n=this.matrixWorld,r=this.count;if(Ji.geometry=this.geometry,Ji.material=this.material,void 0!==Ji.material)for(var i=0;i<r;i++){this.getMatrixAt(i,Ki),Qi.multiplyMatrices(n,Ki),Ji.matrixWorld=Qi,Ji.raycast(e,Zi);for(var o=0,a=Zi.length;o<a;o++){var s=Zi[o];s.instanceId=i,s.object=this,t.push(s)}Zi.length=0}},setColorAt:function(e,t){null===this.instanceColor&&(this.instanceColor=new tt(new Float32Array(3*this.count),3)),t.toArray(this.instanceColor.array,3*e)},setMatrixAt:function(e,t){t.toArray(this.instanceMatrix.array,16*e)},updateMorphTargets:function(){},dispose:function(){this.dispatchEvent({type:"dispose"})}}),eo.prototype=Object.create(Ze.prototype),eo.prototype.constructor=eo,eo.prototype.isLineBasicMaterial=!0,eo.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.morphTargets=e.morphTargets,this};var to=new T,no=new T,ro=new te,io=new ee,oo=new q;function ao(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new eo),Me.call(this),this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}ao.prototype=Object.assign(Object.create(Me.prototype),{constructor:ao,isLine:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.material=e.material,this.geometry=e.geometry,this},computeLineDistances: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++)to.fromBufferAttribute(t,r-1),no.fromBufferAttribute(t,r),n[r]=n[r-1],n[r]+=to.distanceTo(no);e.setAttribute("lineDistance",new ut(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this},raycast:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),oo.copy(n.boundingSphere),oo.applyMatrix4(r),oo.radius+=i,!1!==e.ray.intersectsSphere(oo)){ro.copy(r).invert(),io.copy(e.ray).applyMatrix4(ro);var o=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,s=new T,l=new T,c=new T,u=new T,h=this.isLineSegments?2:1;if(n.isBufferGeometry){var d=n.index,f=n.attributes.position;if(null!==d)for(var p=d.array,m=0,g=p.length-1;m<g;m+=h){var v=p[m],y=p[m+1];if(s.fromBufferAttribute(f,v),l.fromBufferAttribute(f,y),!(io.distanceSqToSegment(s,l,u,c)>a)){u.applyMatrix4(this.matrixWorld);var b=e.ray.origin.distanceTo(u);b<e.near||b>e.far||t.push({distance:b,point:c.clone().applyMatrix4(this.matrixWorld),index:m,face:null,faceIndex:null,object:this})}}else for(var w=0,x=f.count-1;w<x;w+=h)if(s.fromBufferAttribute(f,w),l.fromBufferAttribute(f,w+1),!(io.distanceSqToSegment(s,l,u,c)>a)){u.applyMatrix4(this.matrixWorld);var _=e.ray.origin.distanceTo(u);_<e.near||_>e.far||t.push({distance:_,point:c.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}});var so=new T,lo=new T;function co(e,t){ao.call(this,e,t),this.type="LineSegments"}function uo(e,t){ao.call(this,e,t),this.type="LineLoop"}function ho(e){Ze.call(this),this.type="PointsMaterial",this.color=new Ye(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.setValues(e)}co.prototype=Object.assign(Object.create(ao.prototype),{constructor:co,isLineSegments:!0,computeLineDistances:function(){var e=this.geometry;if(e.isBufferGeometry)if(null===e.index){for(var t=e.attributes.position,n=[],r=0,i=t.count;r<i;r+=2)so.fromBufferAttribute(t,r),lo.fromBufferAttribute(t,r+1),n[r]=0===r?0:n[r-1],n[r+1]=n[r]+so.distanceTo(lo);e.setAttribute("lineDistance",new ut(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else e.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}}),uo.prototype=Object.assign(Object.create(ao.prototype),{constructor:uo,isLineLoop:!0}),ho.prototype=Object.create(Ze.prototype),ho.prototype.constructor=ho,ho.prototype.isPointsMaterial=!0,ho.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.morphTargets=e.morphTargets,this};var fo=new te,po=new ee,mo=new q,go=new T;function vo(e,t){void 0===e&&(e=new _t),void 0===t&&(t=new ho),Me.call(this),this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}function yo(e,t,n,r,i,o,a){var s=po.distanceSqToPoint(e);if(s<n){var l=new T;po.closestPointToPoint(e,l),l.applyMatrix4(r);var c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:a})}}function bo(e,t,n,r,i,o,a,s,l){x.call(this,e,t,n,r,i,o,a,s,l),this.format=void 0!==a?a:1022,this.minFilter=void 0!==o?o:1006,this.magFilter=void 0!==i?i:1006,this.generateMipmaps=!1;var c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}function wo(e,t,n,r,i,o,a,s,l,c,u,h){x.call(this,null,o,a,s,l,c,r,i,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}function xo(e,t,n,r,i,o,a,s,l){x.call(this,e,t,n,r,i,o,a,s,l),this.needsUpdate=!0}function _o(e,t,n,r,i,o,a,s,l,c){if(1026!==(c=void 0!==c?c:1026)&&1027!==c)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===c&&(n=1012),void 0===n&&1027===c&&(n=1020),x.call(this,null,r,i,o,a,s,c,n,l),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}vo.prototype=Object.assign(Object.create(Me.prototype),{constructor:vo,isPoints:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.material=e.material,this.geometry=e.geometry,this},raycast:function(e,t){var n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold;if(null===n.boundingSphere&&n.computeBoundingSphere(),mo.copy(n.boundingSphere),mo.applyMatrix4(r),mo.radius+=i,!1!==e.ray.intersectsSphere(mo)){fo.copy(r).invert(),po.copy(e.ray).applyMatrix4(fo);var o=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o;if(n.isBufferGeometry){var s=n.index,l=n.attributes.position;if(null!==s)for(var c=s.array,u=0,h=c.length;u<h;u++){var d=c[u];go.fromBufferAttribute(l,d),yo(go,d,a,r,e,t,this)}else for(var f=0,p=l.count;f<p;f++)go.fromBufferAttribute(l,f),yo(go,f,a,r,e,t,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}},updateMorphTargets:function(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(n.length>0){var r=t[n[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var i=0,o=r.length;i<o;i++){var a=r[i].name||String(i);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=i}}}}else{var s=e.morphTargets;void 0!==s&&s.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}),bo.prototype=Object.assign(Object.create(x.prototype),{constructor:bo,clone:function(){return new this.constructor(this.image).copy(this)},isVideoTexture:!0,update:function(){var e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),wo.prototype=Object.create(x.prototype),wo.prototype.constructor=wo,wo.prototype.isCompressedTexture=!0,xo.prototype=Object.create(x.prototype),xo.prototype.constructor=xo,xo.prototype.isCanvasTexture=!0,_o.prototype=Object.create(x.prototype),_o.prototype.constructor=_o,_o.prototype.isDepthTexture=!0;var Eo=function(e){function t(t,n,r,i){var o;void 0===t&&(t=1),void 0===n&&(n=8),void 0===r&&(r=0),void 0===i&&(i=2*Math.PI),(o=e.call(this)||this).type="CircleGeometry",o.parameters={radius:t,segments:n,thetaStart:r,thetaLength:i},n=Math.max(3,n);var a=[],s=[],l=[],c=[],u=new T,h=new v;s.push(0,0,0),l.push(0,0,1),c.push(.5,.5);for(var d=0,f=3;d<=n;d++,f+=3){var p=r+d/n*i;u.x=t*Math.cos(p),u.y=t*Math.sin(p),s.push(u.x,u.y,u.z),l.push(0,0,1),h.x=(s[f]/t+1)/2,h.y=(s[f+1]/t+1)/2,c.push(h.x,h.y)}for(var m=1;m<=n;m++)a.push(m,m+1,0);return o.setIndex(a),o.setAttribute("position",new ut(s,3)),o.setAttribute("normal",new ut(l,3)),o.setAttribute("uv",new ut(c,2)),o}return s(t,e),t}(_t),Ao=function(e){function t(t,n,r,i,o,a,s,c){var u;void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=8),void 0===o&&(o=1),void 0===a&&(a=!1),void 0===s&&(s=0),void 0===c&&(c=2*Math.PI),(u=e.call(this)||this).type="CylinderGeometry",u.parameters={radiusTop:t,radiusBottom:n,height:r,radialSegments:i,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:c};var h=l(u);i=Math.floor(i),o=Math.floor(o);var d=[],f=[],p=[],m=[],g=0,y=[],b=r/2,w=0;function x(e){for(var r=g,o=new v,a=new T,l=0,u=!0===e?t:n,y=!0===e?1:-1,x=1;x<=i;x++)f.push(0,b*y,0),p.push(0,y,0),m.push(.5,.5),g++;for(var _=g,E=0;E<=i;E++){var A=E/i*c+s,S=Math.cos(A),M=Math.sin(A);a.x=u*M,a.y=b*y,a.z=u*S,f.push(a.x,a.y,a.z),p.push(0,y,0),o.x=.5*S+.5,o.y=.5*M*y+.5,m.push(o.x,o.y),g++}for(var C=0;C<i;C++){var O=r+C,R=_+C;!0===e?d.push(R,R+1,O):d.push(R+1,R,O),l+=3}h.addGroup(w,l,!0===e?1:2),w+=l}return function(){for(var e=new T,a=new T,l=0,u=(n-t)/r,v=0;v<=o;v++){for(var x=[],_=v/o,E=_*(n-t)+t,A=0;A<=i;A++){var S=A/i,M=S*c+s,C=Math.sin(M),O=Math.cos(M);a.x=E*C,a.y=-_*r+b,a.z=E*O,f.push(a.x,a.y,a.z),e.set(C,u,O).normalize(),p.push(e.x,e.y,e.z),m.push(S,1-_),x.push(g++)}y.push(x)}for(var R=0;R<i;R++)for(var k=0;k<o;k++){var P=y[k][R],L=y[k+1][R],D=y[k+1][R+1],I=y[k][R+1];d.push(P,L,I),d.push(L,D,I),l+=6}h.addGroup(w,l,0),w+=l}(),!1===a&&(t>0&&x(!0),n>0&&x(!1)),u.setIndex(d),u.setAttribute("position",new ut(f,3)),u.setAttribute("normal",new ut(p,3)),u.setAttribute("uv",new ut(m,2)),u}return s(t,e),t}(_t),So=function(e){function t(t,n,r,i,o,a,s){var l;return void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=8),void 0===i&&(i=1),void 0===o&&(o=!1),void 0===a&&(a=0),void 0===s&&(s=2*Math.PI),(l=e.call(this,0,t,n,r,i,o,a,s)||this).type="ConeGeometry",l.parameters={radius:t,height:n,radialSegments:r,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s},l}return s(t,e),t}(Ao),Mo=function(e){function t(t,n,r,i){var o;void 0===r&&(r=1),void 0===i&&(i=0),(o=e.call(this)||this).type="PolyhedronGeometry",o.parameters={vertices:t,indices:n,radius:r,detail:i};var a=[],s=[];function l(e,t,n,r){for(var i=r+1,o=[],a=0;a<=i;a++){o[a]=[];for(var s=e.clone().lerp(n,a/i),l=t.clone().lerp(n,a/i),u=i-a,h=0;h<=u;h++)o[a][h]=0===h&&a===i?s:s.clone().lerp(l,h/u)}for(var d=0;d<i;d++)for(var f=0;f<2*(i-d)-1;f++){var p=Math.floor(f/2);f%2===0?(c(o[d][p+1]),c(o[d+1][p]),c(o[d][p])):(c(o[d][p+1]),c(o[d+1][p+1]),c(o[d+1][p]))}}function c(e){a.push(e.x,e.y,e.z)}function u(e,n){var r=3*e;n.x=t[r+0],n.y=t[r+1],n.z=t[r+2]}function h(e,t,n,r){r<0&&1===e.x&&(s[t]=e.x-1),0===n.x&&0===n.z&&(s[t]=r/2/Math.PI+.5)}function d(e){return Math.atan2(e.z,-e.x)}return function(e){for(var t=new T,r=new T,i=new T,o=0;o<n.length;o+=3)u(n[o+0],t),u(n[o+1],r),u(n[o+2],i),l(t,r,i,e)}(i),function(e){for(var t=new T,n=0;n<a.length;n+=3)t.x=a[n+0],t.y=a[n+1],t.z=a[n+2],t.normalize().multiplyScalar(e),a[n+0]=t.x,a[n+1]=t.y,a[n+2]=t.z}(r),function(){for(var e=new T,t=0;t<a.length;t+=3){e.x=a[t+0],e.y=a[t+1],e.z=a[t+2];var n=d(e)/2/Math.PI+.5,r=(i=e,Math.atan2(-i.y,Math.sqrt(i.x*i.x+i.z*i.z))/Math.PI+.5);s.push(n,1-r)}var i;(function(){for(var e=new T,t=new T,n=new T,r=new T,i=new v,o=new v,l=new v,c=0,u=0;c<a.length;c+=9,u+=6){e.set(a[c+0],a[c+1],a[c+2]),t.set(a[c+3],a[c+4],a[c+5]),n.set(a[c+6],a[c+7],a[c+8]),i.set(s[u+0],s[u+1]),o.set(s[u+2],s[u+3]),l.set(s[u+4],s[u+5]),r.copy(e).add(t).add(n).divideScalar(3);var f=d(r);h(i,u+0,e,f),h(o,u+2,t,f),h(l,u+4,n,f)}})(),function(){for(var e=0;e<s.length;e+=6){var t=s[e+0],n=s[e+2],r=s[e+4],i=Math.max(t,n,r),o=Math.min(t,n,r);i>.9&&o<.1&&(t<.2&&(s[e+0]+=1),n<.2&&(s[e+2]+=1),r<.2&&(s[e+4]+=1))}}()}(),o.setAttribute("position",new ut(a,3)),o.setAttribute("normal",new ut(a.slice(),3)),o.setAttribute("uv",new ut(s,2)),0===i?o.computeVertexNormals():o.normalizeNormals(),o}return s(t,e),t}(_t),To=function(e){function t(t,n){var r;void 0===t&&(t=1),void 0===n&&(n=0);var i=(1+Math.sqrt(5))/2,o=1/i,a=[-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,-o,-i,0,-o,i,0,o,-i,0,o,i,-o,-i,0,-o,i,0,o,-i,0,o,i,0,-i,0,-o,i,0,-o,-i,0,o,i,0,o];return(r=e.call(this,a,[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],t,n)||this).type="DodecahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),Co=new T,Oo=new T,Ro=new T,ko=new He,Po=function(e){function t(t,n){var r;if((r=e.call(this)||this).type="EdgesGeometry",r.parameters={thresholdAngle:n},n=void 0!==n?n:1,!0===t.isGeometry)return console.error("THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),l(r);for(var i=Math.pow(10,4),o=Math.cos(g.DEG2RAD*n),a=t.getIndex(),s=t.getAttribute("position"),c=a?a.count:s.count,u=[0,0,0],h=["a","b","c"],d=new Array(3),f={},p=[],m=0;m<c;m+=3){a?(u[0]=a.getX(m),u[1]=a.getX(m+1),u[2]=a.getX(m+2)):(u[0]=m,u[1]=m+1,u[2]=m+2);var v=ko.a,y=ko.b,b=ko.c;if(v.fromBufferAttribute(s,u[0]),y.fromBufferAttribute(s,u[1]),b.fromBufferAttribute(s,u[2]),ko.getNormal(Ro),d[0]=Math.round(v.x*i)+","+Math.round(v.y*i)+","+Math.round(v.z*i),d[1]=Math.round(y.x*i)+","+Math.round(y.y*i)+","+Math.round(y.z*i),d[2]=Math.round(b.x*i)+","+Math.round(b.y*i)+","+Math.round(b.z*i),d[0]!==d[1]&&d[1]!==d[2]&&d[2]!==d[0])for(var w=0;w<3;w++){var x=(w+1)%3,_=d[w],E=d[x],A=ko[h[w]],S=ko[h[x]],M=_+"_"+E,T=E+"_"+_;T in f&&f[T]?(Ro.dot(f[T].normal)<=o&&(p.push(A.x,A.y,A.z),p.push(S.x,S.y,S.z)),f[T]=null):M in f||(f[M]={index0:u[w],index1:u[x],normal:Ro.clone()})}}for(var C in f)if(f[C]){var O=f[C],R=O.index0,k=O.index1;Co.fromBufferAttribute(s,R),Oo.fromBufferAttribute(s,k),p.push(Co.x,Co.y,Co.z),p.push(Oo.x,Oo.y,Oo.z)}return r.setAttribute("position",new ut(p,3)),r}return s(t,e),t}(_t),Lo=function(e,t,n){n=n||2;var r,i,o,a,s,l,c,u=t&&t.length,h=u?t[0]*n:e.length,d=Do(e,0,h,n,!0),f=[];if(!d||d.next===d.prev)return f;if(u&&(d=function(e,t,n,r){var i,o,a,s,l,c=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,s=i<o-1?t[i+1]*r:e.length,(l=Do(e,a,s,r,!1))===l.next&&(l.steiner=!0),c.push(Wo(l));for(c.sort(Ho),i=0;i<c.length;i++)Uo(c[i],n),n=Io(n,n.next);return n}(e,t,d,n)),e.length>80*n){r=o=e[0],i=a=e[1];for(var p=n;p<h;p+=n)(s=e[p])<r&&(r=s),(l=e[p+1])<i&&(i=l),s>o&&(o=s),l>a&&(a=l);c=0!==(c=Math.max(o-r,a-i))?1/c:0}return No(d,f,n,r,i,c),f};function Do(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=ta(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=ta(o,e[o],e[o+1],a);return a&&Ko(a,a.next)&&(na(a),a=a.next),a}function Io(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!Ko(r,r.next)&&0!==Yo(r.prev,r,r.next))r=r.next;else{if(na(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function No(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=Go(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,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,o);for(var s,l,c=e;e.prev!==e.next;)if(s=e.prev,l=e.next,o?Bo(e,r,i,o):jo(e))t.push(s.i/n),t.push(e.i/n),t.push(l.i/n),na(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?No(e=Fo(Io(e),t,n),t,n,r,i,o,2):2===a&&zo(e,t,n,r,i,o):No(Io(e),t,n,r,i,o,1);break}}}function jo(e){var t=e.prev,n=e,r=e.next;if(Yo(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(qo(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Yo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Bo(e,t,n,r){var i=e.prev,o=e,a=e.next;if(Yo(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,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=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=Go(s,l,t,n,r),d=Go(c,u,t,n,r),f=e.prevZ,p=e.nextZ;f&&f.z>=h&&p&&p.z<=d;){if(f!==e.prev&&f!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Yo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==e.prev&&p!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Yo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=h;){if(f!==e.prev&&f!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Yo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==e.prev&&p!==e.next&&qo(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Yo(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function Fo(e,t,n){var r=e;do{var i=r.prev,o=r.next.next;!Ko(i,o)&&Qo(i,r,r.next,o)&&$o(i,o)&&$o(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),na(r),na(r.next),r=e=o),r=r.next}while(r!==e);return Io(r)}function zo(e,t,n,r,i,o){var a=e;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Xo(a,s)){var l=ea(a,s);return a=Io(a,a.next),l=Io(l,l.next),No(a,t,n,r,i,o),void No(l,t,n,r,i,o)}s=s.next}a=a.next}while(a!==e)}function Ho(e,t){return e.x-t.x}function Uo(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;var l,c=n,u=n.x,h=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&qo(o<h?i:a,o,u,h,o<h?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),$o(r,e)&&(l<d||l===d&&(r.x>n.x||r.x===n.x&&Vo(n,r)))&&(n=r,d=l)),r=r.next}while(r!==c);return n}(e,t)){var n=ea(t,e);Io(t,t.next),Io(n,n.next)}}function Vo(e,t){return Yo(e.prev,e,t.prev)<0&&Yo(t.next,e,e.next)<0}function Go(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 Wo(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function qo(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 Xo(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&&Qo(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&($o(e,t)&&$o(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)&&(Yo(e.prev,e,t.prev)||Yo(e,t.prev,t))||Ko(e,t)&&Yo(e.prev,e,e.next)>0&&Yo(t.prev,t,t.next)>0)}function Yo(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Ko(e,t){return e.x===t.x&&e.y===t.y}function Qo(e,t,n,r){var i=Jo(Yo(e,t,n)),o=Jo(Yo(e,t,r)),a=Jo(Yo(n,r,e)),s=Jo(Yo(n,r,t));return i!==o&&a!==s||!(0!==i||!Zo(e,n,t))||!(0!==o||!Zo(e,r,t))||!(0!==a||!Zo(n,e,r))||!(0!==s||!Zo(n,t,r))}function Zo(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Jo(e){return e>0?1:e<0?-1:0}function $o(e,t){return Yo(e.prev,e,e.next)<0?Yo(e,t,e.next)>=0&&Yo(e,e.prev,t)>=0:Yo(e,t,e.prev)<0||Yo(e,e.next,t)<0}function ea(e,t){var n=new ra(e.i,e.x,e.y),r=new ra(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 ta(e,t,n,r){var i=new ra(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 na(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 ra(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 ia={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 ia.area(e)<0},triangulateShape:function(e,t){var n=[],r=[],i=[];oa(e),aa(n,e);var o=e.length;t.forEach(oa);for(var a=0;a<t.length;a++)r.push(o),o+=t[a].length,aa(n,t[a]);for(var s=Lo(n,r),l=0;l<s.length;l+=3)i.push(s.slice(l,l+3));return i}};function oa(e){var t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function aa(e,t){for(var n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}var sa=function(e){function t(t,n){var r;(r=e.call(this)||this).type="ExtrudeGeometry",r.parameters={shapes:t,options:n},t=Array.isArray(t)?t:[t];for(var i=l(r),o=[],a=[],s=0,c=t.length;s<c;s++)u(t[s]);function u(e){var t=[],r=void 0!==n.curveSegments?n.curveSegments:12,s=void 0!==n.steps?n.steps:1,l=void 0!==n.depth?n.depth:100,c=void 0===n.bevelEnabled||n.bevelEnabled,u=void 0!==n.bevelThickness?n.bevelThickness:6,h=void 0!==n.bevelSize?n.bevelSize:u-2,d=void 0!==n.bevelOffset?n.bevelOffset:0,f=void 0!==n.bevelSegments?n.bevelSegments:3,p=n.extrudePath,m=void 0!==n.UVGenerator?n.UVGenerator:la;void 0!==n.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),l=n.amount);var g,y,b,w,x,_=!1;p&&(g=p.getSpacedPoints(s),_=!0,c=!1,y=p.computeFrenetFrames(s,!1),b=new T,w=new T,x=new T),c||(f=0,u=0,h=0,d=0);var E=e.extractPoints(r),A=E.shape,S=E.holes;if(!ia.isClockWise(A)){A=A.reverse();for(var M=0,C=S.length;M<C;M++){var O=S[M];ia.isClockWise(O)&&(S[M]=O.reverse())}}for(var R=ia.triangulateShape(A,S),k=A,P=0,L=S.length;P<L;P++){var D=S[P];A=A.concat(D)}function I(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}var N=A.length,j=R.length;function B(e,t,n){var r,i,o,a=e.x-t.x,s=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=a*a+s*s,h=a*c-s*l;if(Math.abs(h)>Number.EPSILON){var d=Math.sqrt(u),f=Math.sqrt(l*l+c*c),p=t.x-s/d,m=t.y+a/d,g=((n.x-c/f-p)*c-(n.y+l/f-m)*l)/(a*c-s*l),y=(r=p+a*g-e.x)*r+(i=m+s*g-e.y)*i;if(y<=2)return new v(r,i);o=Math.sqrt(y/2)}else{var b=!1;a>Number.EPSILON?l>Number.EPSILON&&(b=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(b=!0):Math.sign(s)===Math.sign(c)&&(b=!0),b?(r=-s,i=a,o=Math.sqrt(u)):(r=a,i=s,o=Math.sqrt(u/2))}return new v(r/o,i/o)}for(var F=[],z=0,H=k.length,U=H-1,V=z+1;z<H;z++,U++,V++)U===H&&(U=0),V===H&&(V=0),F[z]=B(k[z],k[U],k[V]);for(var G,W=[],q=F.concat(),X=0,Y=S.length;X<Y;X++){var K=S[X];G=[];for(var Q=0,Z=K.length,J=Z-1,$=Q+1;Q<Z;Q++,J++,$++)J===Z&&(J=0),$===Z&&($=0),G[Q]=B(K[Q],K[J],K[$]);W.push(G),q=q.concat(G)}for(var ee=0;ee<f;ee++){for(var te=ee/f,ne=u*Math.cos(te*Math.PI/2),re=h*Math.sin(te*Math.PI/2)+d,ie=0,oe=k.length;ie<oe;ie++){var ae=I(k[ie],F[ie],re);Le(ae.x,ae.y,-ne)}for(var se=0,le=S.length;se<le;se++){var ce=S[se];G=W[se];for(var ue=0,he=ce.length;ue<he;ue++){var de=I(ce[ue],G[ue],re);Le(de.x,de.y,-ne)}}}for(var fe=h+d,pe=0;pe<N;pe++){var me=c?I(A[pe],q[pe],fe):A[pe];_?(w.copy(y.normals[0]).multiplyScalar(me.x),b.copy(y.binormals[0]).multiplyScalar(me.y),x.copy(g[0]).add(w).add(b),Le(x.x,x.y,x.z)):Le(me.x,me.y,0)}for(var ge=1;ge<=s;ge++)for(var ve=0;ve<N;ve++){var ye=c?I(A[ve],q[ve],fe):A[ve];_?(w.copy(y.normals[ge]).multiplyScalar(ye.x),b.copy(y.binormals[ge]).multiplyScalar(ye.y),x.copy(g[ge]).add(w).add(b),Le(x.x,x.y,x.z)):Le(ye.x,ye.y,l/s*ge)}for(var be=f-1;be>=0;be--){for(var we=be/f,xe=u*Math.cos(we*Math.PI/2),_e=h*Math.sin(we*Math.PI/2)+d,Ee=0,Ae=k.length;Ee<Ae;Ee++){var Se=I(k[Ee],F[Ee],_e);Le(Se.x,Se.y,l+xe)}for(var Me=0,Te=S.length;Me<Te;Me++){var Ce=S[Me];G=W[Me];for(var Oe=0,Re=Ce.length;Oe<Re;Oe++){var ke=I(Ce[Oe],G[Oe],_e);_?Le(ke.x,ke.y+g[s-1].y,g[s-1].x+xe):Le(ke.x,ke.y,l+xe)}}}function Pe(e,t){for(var n=e.length;--n>=0;){var r=n,i=n-1;i<0&&(i=e.length-1);for(var o=0,a=s+2*f;o<a;o++){var l=N*o,c=N*(o+1);Ie(t+r+l,t+i+l,t+i+c,t+r+c)}}}function Le(e,n,r){t.push(e),t.push(n),t.push(r)}function De(e,t,n){Ne(e),Ne(t),Ne(n);var r=o.length/3,a=m.generateTopUV(i,o,r-3,r-2,r-1);je(a[0]),je(a[1]),je(a[2])}function Ie(e,t,n,r){Ne(e),Ne(t),Ne(r),Ne(t),Ne(n),Ne(r);var a=o.length/3,s=m.generateSideWallUV(i,o,a-6,a-3,a-2,a-1);je(s[0]),je(s[1]),je(s[3]),je(s[1]),je(s[2]),je(s[3])}function Ne(e){o.push(t[3*e+0]),o.push(t[3*e+1]),o.push(t[3*e+2])}function je(e){a.push(e.x),a.push(e.y)}!function(){var e=o.length/3;if(c){for(var t=0,n=N*t,r=0;r<j;r++){var a=R[r];De(a[2]+n,a[1]+n,a[0]+n)}n=N*(t=s+2*f);for(var l=0;l<j;l++){var u=R[l];De(u[0]+n,u[1]+n,u[2]+n)}}else{for(var h=0;h<j;h++){var d=R[h];De(d[2],d[1],d[0])}for(var p=0;p<j;p++){var m=R[p];De(m[0]+N*s,m[1]+N*s,m[2]+N*s)}}i.addGroup(e,o.length/3-e,0)}(),function(){var e=o.length/3,t=0;Pe(k,t),t+=k.length;for(var n=0,r=S.length;n<r;n++){var a=S[n];Pe(a,t),t+=a.length}i.addGroup(e,o.length/3-e,1)}()}return r.setAttribute("position",new ut(o,3)),r.setAttribute("uv",new ut(a,2)),r.computeVertexNormals(),r}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(var r=0,i=e.length;r<i;r++){var o=e[r];n.shapes.push(o.uuid)}else n.shapes.push(e.uuid);return void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)},t}(_t),la={generateTopUV:function(e,t,n,r,i){var o=t[3*n],a=t[3*n+1],s=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new v(o,a),new v(s,l),new v(c,u)]},generateSideWallUV:function(e,t,n,r,i,o){var a=t[3*n],s=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*o],g=t[3*o+1],y=t[3*o+2];return Math.abs(s-u)<.01?[new v(a,1-l),new v(c,1-h),new v(d,1-p),new v(m,1-y)]:[new v(s,1-l),new v(u,1-h),new v(f,1-p),new v(g,1-y)]}},ca=function(e){function t(t,n){var r;void 0===t&&(t=1),void 0===n&&(n=0);var i=(1+Math.sqrt(5))/2,o=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1];return(r=e.call(this,o,[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],t,n)||this).type="IcosahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),ua=function(e){function t(t,n,r,i){var o;void 0===n&&(n=12),void 0===r&&(r=0),void 0===i&&(i=2*Math.PI),(o=e.call(this)||this).type="LatheGeometry",o.parameters={points:t,segments:n,phiStart:r,phiLength:i},n=Math.floor(n),i=g.clamp(i,0,2*Math.PI);for(var a=[],s=[],l=[],c=1/n,u=new T,h=new v,d=0;d<=n;d++)for(var f=r+d*c*i,p=Math.sin(f),m=Math.cos(f),y=0;y<=t.length-1;y++)u.x=t[y].x*p,u.y=t[y].y,u.z=t[y].x*m,s.push(u.x,u.y,u.z),h.x=d/n,h.y=y/(t.length-1),l.push(h.x,h.y);for(var b=0;b<n;b++)for(var w=0;w<t.length-1;w++){var x=w+b*t.length,_=x,E=x+t.length,A=x+t.length+1,S=x+1;a.push(_,E,S),a.push(E,A,S)}if(o.setIndex(a),o.setAttribute("position",new ut(s,3)),o.setAttribute("uv",new ut(l,2)),o.computeVertexNormals(),i===2*Math.PI)for(var M=o.attributes.normal.array,C=new T,O=new T,R=new T,k=n*t.length*3,P=0,L=0;P<t.length;P++,L+=3)C.x=M[L+0],C.y=M[L+1],C.z=M[L+2],O.x=M[k+L+0],O.y=M[k+L+1],O.z=M[k+L+2],R.addVectors(C,O).normalize(),M[L+0]=M[k+L+0]=R.x,M[L+1]=M[k+L+1]=R.y,M[L+2]=M[k+L+2]=R.z;return o}return s(t,e),t}(_t),ha=function(e){function t(t,n){var r;return void 0===t&&(t=1),void 0===n&&(n=0),(r=e.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],t,n)||this).type="OctahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo);function da(e,t,n){_t.call(this),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n};var r=[],i=[],o=[],a=[],s=1e-5,l=new T,c=new T,u=new T,h=new T,d=new T;e.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");for(var f=t+1,p=0;p<=n;p++)for(var m=p/n,g=0;g<=t;g++){var v=g/t;e(v,m,c),i.push(c.x,c.y,c.z),v-s>=0?(e(v-s,m,u),h.subVectors(c,u)):(e(v+s,m,u),h.subVectors(u,c)),m-s>=0?(e(v,m-s,u),d.subVectors(c,u)):(e(v,m+s,u),d.subVectors(u,c)),l.crossVectors(h,d).normalize(),o.push(l.x,l.y,l.z),a.push(v,m)}for(var y=0;y<n;y++)for(var b=0;b<t;b++){var w=y*f+b,x=y*f+b+1,_=(y+1)*f+b+1,E=(y+1)*f+b;r.push(w,x,E),r.push(x,_,E)}this.setIndex(r),this.setAttribute("position",new ut(i,3)),this.setAttribute("normal",new ut(o,3)),this.setAttribute("uv",new ut(a,2))}da.prototype=Object.create(_t.prototype),da.prototype.constructor=da;var fa=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=.5),void 0===n&&(n=1),void 0===r&&(r=8),void 0===i&&(i=1),void 0===o&&(o=0),void 0===a&&(a=2*Math.PI),(s=e.call(this)||this).type="RingGeometry",s.parameters={innerRadius:t,outerRadius:n,thetaSegments:r,phiSegments:i,thetaStart:o,thetaLength:a},r=Math.max(3,r);for(var l=[],c=[],u=[],h=[],d=t,f=(n-t)/(i=Math.max(1,i)),p=new T,m=new v,g=0;g<=i;g++){for(var y=0;y<=r;y++){var b=o+y/r*a;p.x=d*Math.cos(b),p.y=d*Math.sin(b),c.push(p.x,p.y,p.z),u.push(0,0,1),m.x=(p.x/n+1)/2,m.y=(p.y/n+1)/2,h.push(m.x,m.y)}d+=f}for(var w=0;w<i;w++)for(var x=w*(r+1),_=0;_<r;_++){var E=_+x,A=E,S=E+r+1,M=E+r+2,C=E+1;l.push(A,S,C),l.push(S,M,C)}return s.setIndex(l),s.setAttribute("position",new ut(c,3)),s.setAttribute("normal",new ut(u,3)),s.setAttribute("uv",new ut(h,2)),s}return s(t,e),t}(_t),pa=function(e){function t(t,n){var r;void 0===n&&(n=12),(r=e.call(this)||this).type="ShapeGeometry",r.parameters={shapes:t,curveSegments:n};var i=[],o=[],a=[],s=[],l=0,c=0;if(!1===Array.isArray(t))h(t);else for(var u=0;u<t.length;u++)h(t[u]),r.addGroup(l,c,u),l+=c,c=0;function h(e){var t=o.length/3,r=e.extractPoints(n),l=r.shape,u=r.holes;!1===ia.isClockWise(l)&&(l=l.reverse());for(var h=0,d=u.length;h<d;h++){var f=u[h];!0===ia.isClockWise(f)&&(u[h]=f.reverse())}for(var p=ia.triangulateShape(l,u),m=0,g=u.length;m<g;m++){var v=u[m];l=l.concat(v)}for(var y=0,b=l.length;y<b;y++){var w=l[y];o.push(w.x,w.y,0),a.push(0,0,1),s.push(w.x,w.y)}for(var x=0,_=p.length;x<_;x++){var E=p[x],A=E[0]+t,S=E[1]+t,M=E[2]+t;i.push(A,S,M),c+=3}}return r.setIndex(i),r.setAttribute("position",new ut(o,3)),r.setAttribute("normal",new ut(a,3)),r.setAttribute("uv",new ut(s,2)),r}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return function(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}(this.parameters.shapes,e)},t}(_t),ma=function(e){function t(t,n,r,i,o,a,s){var l;void 0===t&&(t=1),void 0===n&&(n=8),void 0===r&&(r=6),void 0===i&&(i=0),void 0===o&&(o=2*Math.PI),void 0===a&&(a=0),void 0===s&&(s=Math.PI),(l=e.call(this)||this).type="SphereGeometry",l.parameters={radius:t,widthSegments:n,heightSegments:r,phiStart:i,phiLength:o,thetaStart:a,thetaLength:s},n=Math.max(3,Math.floor(n)),r=Math.max(2,Math.floor(r));for(var c=Math.min(a+s,Math.PI),u=0,h=[],d=new T,f=new T,p=[],m=[],g=[],v=[],y=0;y<=r;y++){var b=[],w=y/r,x=0;0==y&&0==a?x=.5/n:y==r&&c==Math.PI&&(x=-.5/n);for(var _=0;_<=n;_++){var E=_/n;d.x=-t*Math.cos(i+E*o)*Math.sin(a+w*s),d.y=t*Math.cos(a+w*s),d.z=t*Math.sin(i+E*o)*Math.sin(a+w*s),m.push(d.x,d.y,d.z),f.copy(d).normalize(),g.push(f.x,f.y,f.z),v.push(E+x,1-w),b.push(u++)}h.push(b)}for(var A=0;A<r;A++)for(var S=0;S<n;S++){var M=h[A][S+1],C=h[A][S],O=h[A+1][S],R=h[A+1][S+1];(0!==A||a>0)&&p.push(M,C,R),(A!==r-1||c<Math.PI)&&p.push(C,O,R)}return l.setIndex(p),l.setAttribute("position",new ut(m,3)),l.setAttribute("normal",new ut(g,3)),l.setAttribute("uv",new ut(v,2)),l}return s(t,e),t}(_t),ga=function(e){function t(t,n){var r;return void 0===t&&(t=1),void 0===n&&(n=0),(r=e.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],t,n)||this).type="TetrahedronGeometry",r.parameters={radius:t,detail:n},r}return s(t,e),t}(Mo),va=function(e){function t(t,n){var r;void 0===n&&(n={});var i=n.font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new _t||l(r);var o=i.generateShapes(t,n.size);return n.depth=void 0!==n.height?n.height:50,void 0===n.bevelThickness&&(n.bevelThickness=10),void 0===n.bevelSize&&(n.bevelSize=8),void 0===n.bevelEnabled&&(n.bevelEnabled=!1),(r=e.call(this,o,n)||this).type="TextGeometry",r}return s(t,e),t}(sa),ya=function(e){function t(t,n,r,i,o){var a;void 0===t&&(t=1),void 0===n&&(n=.4),void 0===r&&(r=8),void 0===i&&(i=6),void 0===o&&(o=2*Math.PI),(a=e.call(this)||this).type="TorusGeometry",a.parameters={radius:t,tube:n,radialSegments:r,tubularSegments:i,arc:o},r=Math.floor(r),i=Math.floor(i);for(var s=[],l=[],c=[],u=[],h=new T,d=new T,f=new T,p=0;p<=r;p++)for(var m=0;m<=i;m++){var g=m/i*o,v=p/r*Math.PI*2;d.x=(t+n*Math.cos(v))*Math.cos(g),d.y=(t+n*Math.cos(v))*Math.sin(g),d.z=n*Math.sin(v),l.push(d.x,d.y,d.z),h.x=t*Math.cos(g),h.y=t*Math.sin(g),f.subVectors(d,h).normalize(),c.push(f.x,f.y,f.z),u.push(m/i),u.push(p/r)}for(var y=1;y<=r;y++)for(var b=1;b<=i;b++){var w=(i+1)*y+b-1,x=(i+1)*(y-1)+b-1,_=(i+1)*(y-1)+b,E=(i+1)*y+b;s.push(w,x,E),s.push(x,_,E)}return a.setIndex(s),a.setAttribute("position",new ut(l,3)),a.setAttribute("normal",new ut(c,3)),a.setAttribute("uv",new ut(u,2)),a}return s(t,e),t}(_t),ba=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=1),void 0===n&&(n=.4),void 0===r&&(r=64),void 0===i&&(i=8),void 0===o&&(o=2),void 0===a&&(a=3),(s=e.call(this)||this).type="TorusKnotGeometry",s.parameters={radius:t,tube:n,tubularSegments:r,radialSegments:i,p:o,q:a},r=Math.floor(r),i=Math.floor(i);for(var l=[],c=[],u=[],h=[],d=new T,f=new T,p=new T,m=new T,g=new T,v=new T,y=new T,b=0;b<=r;++b){var w=b/r*o*Math.PI*2;P(w,o,a,t,p),P(w+.01,o,a,t,m),v.subVectors(m,p),y.addVectors(m,p),g.crossVectors(v,y),y.crossVectors(g,v),g.normalize(),y.normalize();for(var x=0;x<=i;++x){var _=x/i*Math.PI*2,E=-n*Math.cos(_),A=n*Math.sin(_);d.x=p.x+(E*y.x+A*g.x),d.y=p.y+(E*y.y+A*g.y),d.z=p.z+(E*y.z+A*g.z),c.push(d.x,d.y,d.z),f.subVectors(d,p).normalize(),u.push(f.x,f.y,f.z),h.push(b/r),h.push(x/i)}}for(var S=1;S<=r;S++)for(var M=1;M<=i;M++){var C=(i+1)*(S-1)+(M-1),O=(i+1)*S+(M-1),R=(i+1)*S+M,k=(i+1)*(S-1)+M;l.push(C,O,k),l.push(O,R,k)}function P(e,t,n,r,i){var o=Math.cos(e),a=Math.sin(e),s=n/t*e,l=Math.cos(s);i.x=r*(2+l)*.5*o,i.y=r*(2+l)*a*.5,i.z=r*Math.sin(s)*.5}return s.setIndex(l),s.setAttribute("position",new ut(c,3)),s.setAttribute("normal",new ut(u,3)),s.setAttribute("uv",new ut(h,2)),s}return s(t,e),t}(_t),wa=function(e){function t(t,n,r,i,o){var a;void 0===n&&(n=64),void 0===r&&(r=1),void 0===i&&(i=8),void 0===o&&(o=!1),(a=e.call(this)||this).type="TubeGeometry",a.parameters={path:t,tubularSegments:n,radius:r,radialSegments:i,closed:o};var s=t.computeFrenetFrames(n,o);a.tangents=s.tangents,a.normals=s.normals,a.binormals=s.binormals;var l=new T,c=new T,u=new v,h=new T,d=[],f=[],p=[],m=[];function g(e){h=t.getPointAt(e/n,h);for(var o=s.normals[e],a=s.binormals[e],u=0;u<=i;u++){var p=u/i*Math.PI*2,m=Math.sin(p),g=-Math.cos(p);c.x=g*o.x+m*a.x,c.y=g*o.y+m*a.y,c.z=g*o.z+m*a.z,c.normalize(),f.push(c.x,c.y,c.z),l.x=h.x+r*c.x,l.y=h.y+r*c.y,l.z=h.z+r*c.z,d.push(l.x,l.y,l.z)}}return function(){for(var e=0;e<n;e++)g(e);g(!1===o?n:0),function(){for(var e=0;e<=n;e++)for(var t=0;t<=i;t++)u.x=e/n,u.y=t/i,p.push(u.x,u.y)}(),function(){for(var e=1;e<=n;e++)for(var t=1;t<=i;t++){var r=(i+1)*(e-1)+(t-1),o=(i+1)*e+(t-1),a=(i+1)*e+t,s=(i+1)*(e-1)+t;m.push(r,o,s),m.push(o,a,s)}}()}(),a.setIndex(m),a.setAttribute("position",new ut(d,3)),a.setAttribute("normal",new ut(f,3)),a.setAttribute("uv",new ut(p,2)),a}return s(t,e),t.prototype.toJSON=function(){var e=_t.prototype.toJSON.call(this);return e.path=this.parameters.path.toJSON(),e},t}(_t),xa=function(e){function t(t){var n;if((n=e.call(this)||this).type="WireframeGeometry",!0===t.isGeometry)return console.error("THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead."),l(n);var r=[],i=[0,0],o={},a=new T;if(null!==t.index){var s=t.attributes.position,c=t.index,u=t.groups;0===u.length&&(u=[{start:0,count:c.count,materialIndex:0}]);for(var h=0,d=u.length;h<d;++h)for(var f=u[h],p=f.start,m=p,g=p+f.count;m<g;m+=3)for(var v=0;v<3;v++){var y=c.getX(m+v),b=c.getX(m+(v+1)%3);i[0]=Math.min(y,b),i[1]=Math.max(y,b);var w=i[0]+","+i[1];void 0===o[w]&&(o[w]={index1:i[0],index2:i[1]})}for(var x in o){var _=o[x];a.fromBufferAttribute(s,_.index1),r.push(a.x,a.y,a.z),a.fromBufferAttribute(s,_.index2),r.push(a.x,a.y,a.z)}}else for(var E=t.attributes.position,A=0,S=E.count/3;A<S;A++)for(var M=0;M<3;M++){var C=3*A+M;a.fromBufferAttribute(E,C),r.push(a.x,a.y,a.z);var O=3*A+(M+1)%3;a.fromBufferAttribute(E,O),r.push(a.x,a.y,a.z)}return n.setAttribute("position",new ut(r,3)),n}return s(t,e),t}(_t),_a=Object.freeze({__proto__:null,BoxGeometry:Ut,BoxBufferGeometry:Ut,CircleGeometry:Eo,CircleBufferGeometry:Eo,ConeGeometry:So,ConeBufferGeometry:So,CylinderGeometry:Ao,CylinderBufferGeometry:Ao,DodecahedronGeometry:To,DodecahedronBufferGeometry:To,EdgesGeometry:Po,ExtrudeGeometry:sa,ExtrudeBufferGeometry:sa,IcosahedronGeometry:ca,IcosahedronBufferGeometry:ca,LatheGeometry:ua,LatheBufferGeometry:ua,OctahedronGeometry:ha,OctahedronBufferGeometry:ha,ParametricGeometry:da,ParametricBufferGeometry:da,PlaneGeometry:on,PlaneBufferGeometry:on,PolyhedronGeometry:Mo,PolyhedronBufferGeometry:Mo,RingGeometry:fa,RingBufferGeometry:fa,ShapeGeometry:pa,ShapeBufferGeometry:pa,SphereGeometry:ma,SphereBufferGeometry:ma,TetrahedronGeometry:ga,TetrahedronBufferGeometry:ga,TextGeometry:va,TextBufferGeometry:va,TorusGeometry:ya,TorusBufferGeometry:ya,TorusKnotGeometry:ba,TorusKnotBufferGeometry:ba,TubeGeometry:wa,TubeBufferGeometry:wa,WireframeGeometry:xa});function Ea(e){Ze.call(this),this.type="ShadowMaterial",this.color=new Ye(0),this.transparent=!0,this.setValues(e)}function Aa(e){qt.call(this,e),this.type="RawShaderMaterial"}function Sa(e){Ze.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ye(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(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.vertexTangents=!1,this.setValues(e)}function Ma(e){Sa.call(this),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoat=0,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new v(1,1),this.clearcoatNormalMap=null,this.reflectivity=.5,Object.defineProperty(this,"ior",{get:function(){return(1+.4*this.reflectivity)/(1-.4*this.reflectivity)},set:function(e){this.reflectivity=g.clamp(2.5*(e-1)/(e+1),0,1)}}),this.sheen=null,this.transmission=0,this.transmissionMap=null,this.setValues(e)}function Ta(e){Ze.call(this),this.type="MeshPhongMaterial",this.color=new Ye(16777215),this.specular=new Ye(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(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 Ca(e){Ze.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ye(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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 Oa(e){Ze.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Ra(e){Ze.call(this),this.type="MeshLambertMaterial",this.color=new Ye(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ye(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 ka(e){Ze.call(this),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ye(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(e)}function Pa(e){eo.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}Ea.prototype=Object.create(Ze.prototype),Ea.prototype.constructor=Ea,Ea.prototype.isShadowMaterial=!0,Ea.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this},Aa.prototype=Object.create(qt.prototype),Aa.prototype.constructor=Aa,Aa.prototype.isRawShaderMaterial=!0,Sa.prototype=Object.create(Ze.prototype),Sa.prototype.constructor=Sa,Sa.prototype.isMeshStandardMaterial=!0,Sa.prototype.copy=function(e){return Ze.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.normalMapType=e.normalMapType,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.vertexTangents=e.vertexTangents,this},Ma.prototype=Object.create(Sa.prototype),Ma.prototype.constructor=Ma,Ma.prototype.isMeshPhysicalMaterial=!0,Ma.prototype.copy=function(e){return Sa.prototype.copy.call(this,e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.reflectivity=e.reflectivity,e.sheen?this.sheen=(this.sheen||new Ye).copy(e.sheen):this.sheen=null,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this},Ta.prototype=Object.create(Ze.prototype),Ta.prototype.constructor=Ta,Ta.prototype.isMeshPhongMaterial=!0,Ta.prototype.copy=function(e){return Ze.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.normalMapType=e.normalMapType,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},Ca.prototype=Object.create(Ze.prototype),Ca.prototype.constructor=Ca,Ca.prototype.isMeshToonMaterial=!0,Ca.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,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.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,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},Oa.prototype=Object.create(Ze.prototype),Oa.prototype.constructor=Oa,Oa.prototype.isMeshNormalMaterial=!0,Oa.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,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},Ra.prototype=Object.create(Ze.prototype),Ra.prototype.constructor=Ra,Ra.prototype.isMeshLambertMaterial=!0,Ra.prototype.copy=function(e){return Ze.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},ka.prototype=Object.create(Ze.prototype),ka.prototype.constructor=ka,ka.prototype.isMeshMatcapMaterial=!0,ka.prototype.copy=function(e){return Ze.prototype.copy.call(this,e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.skinning=e.skinning,this.morphTargets=e.morphTargets,this.morphNormals=e.morphNormals,this},Pa.prototype=Object.create(eo.prototype),Pa.prototype.constructor=Pa,Pa.prototype.isLineDashedMaterial=!0,Pa.prototype.copy=function(e){return eo.prototype.copy.call(this,e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this};var La=Object.freeze({__proto__:null,ShadowMaterial:Ea,SpriteMaterial:xi,RawShaderMaterial:Aa,ShaderMaterial:qt,PointsMaterial:ho,MeshPhysicalMaterial:Ma,MeshStandardMaterial:Sa,MeshPhongMaterial:Ta,MeshToonMaterial:Ca,MeshNormalMaterial:Oa,MeshLambertMaterial:Ra,MeshDepthMaterial:Jr,MeshDistanceMaterial:$r,MeshBasicMaterial:Je,MeshMatcapMaterial:ka,LineDashedMaterial:Pa,LineBasicMaterial:eo,Material:Ze}),Da={arraySlice:function(e,t,n){return Da.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,l=0;l!==t;++l)i[a++]=e[s+l];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)}},subclip:function(e,t,n,r,i){void 0===i&&(i=30);var o=e.clone();o.name=t;for(var a=[],s=0;s<o.tracks.length;++s){for(var l=o.tracks[s],c=l.getValueSize(),u=[],h=[],d=0;d<l.times.length;++d){var f=l.times[d]*i;if(!(f<n||f>=r)){u.push(l.times[d]);for(var p=0;p<c;++p)h.push(l.values[d*c+p])}}0!==u.length&&(l.times=Da.convertArray(u,l.times.constructor),l.values=Da.convertArray(h,l.values.constructor),a.push(l))}o.tracks=a;for(var m=1/0,g=0;g<o.tracks.length;++g)m>o.tracks[g].times[0]&&(m=o.tracks[g].times[0]);for(var v=0;v<o.tracks.length;++v)o.tracks[v].shift(-1*m);return o.resetDuration(),o},makeClipAdditive:function(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=e),void 0===r&&(r=30),r<=0&&(r=30);for(var i=n.tracks.length,o=t/r,a=function(t){var r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)return"continue";var a=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===a)return"continue";var s=0,l=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);var c=0,u=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);var h=r.times.length-1,d=void 0;if(o<=r.times[0]){var f=s,p=l-s;d=Da.arraySlice(r.values,f,p)}else if(o>=r.times[h]){var m=h*l+s,g=m+l-s;d=Da.arraySlice(r.values,m,g)}else{var v=r.createInterpolant(),y=s,b=l-s;v.evaluate(o),d=Da.arraySlice(v.resultBuffer,y,b)}"quaternion"===i&&(new M).fromArray(d).normalize().conjugate().toArray(d);for(var w=a.times.length,x=0;x<w;++x){var _=x*u+c;if("quaternion"===i)M.multiplyQuaternionsFlat(a.values,_,d,0,a.values,_);else for(var E=u-2*c,A=0;A<E;++A)a.values[_+A]-=d[A]}},s=0;s<i;++s)a(s);return e.blendMode=2501,e}};function Ia(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 Na(e,t,n,r){Ia.call(this,e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function ja(e,t,n,r){Ia.call(this,e,t,n,r)}function Ba(e,t,n,r){Ia.call(this,e,t,n,r)}function Fa(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=Da.convertArray(t,this.TimeBufferType),this.values=Da.convertArray(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}function za(e,t,n){Fa.call(this,e,t,n)}function Ha(e,t,n,r){Fa.call(this,e,t,n,r)}function Ua(e,t,n,r){Fa.call(this,e,t,n,r)}function Va(e,t,n,r){Ia.call(this,e,t,n,r)}function Ga(e,t,n,r){Fa.call(this,e,t,n,r)}function Wa(e,t,n,r){Fa.call(this,e,t,n,r)}function qa(e,t,n,r){Fa.call(this,e,t,n,r)}function Xa(e,t,n,r){void 0===t&&(t=-1),void 0===r&&(r=2500),this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=g.generateUUID(),this.duration<0&&this.resetDuration()}function Ya(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Ua;case"vector":case"vector2":case"vector3":case"vector4":return qa;case"color":return Ha;case"quaternion":return Ga;case"bool":case"boolean":return za;case"string":return Wa}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){var n=[],r=[];Da.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)}Object.assign(Ia.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(var l=n-2;;){if(void 0===i)return this._cachedIndex=0,this.beforeStart_(0,e,r);if(n===l)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(){}}),Object.assign(Ia.prototype,{beforeStart_:Ia.prototype.copySampleValue_,afterEnd_:Ia.prototype.copySampleValue_}),Na.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Na,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 l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-a),this._weightNext=l/(s-n),this._offsetPrev=i*c,this._offsetNext=o*c},interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-h*m+2*h*p-h*f,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*f+1,y=(-1-d)*m+(1.5+d)*p+.5*f,b=d*m-d*p,w=0;w!==a;++w)i[w]=g*o[c+w]+v*o[l+w]+y*o[s+w]+b*o[u+w];return i}}),ja.prototype=Object.assign(Object.create(Ia.prototype),{constructor:ja,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=e*a,l=s-a,c=(n-t)/(r-t),u=1-c,h=0;h!==a;++h)i[h]=o[l+h]*u+o[s+h]*c;return i}}),Ba.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Ba,interpolate_:function(e){return this.copySampleValue_(e-1)}}),Object.assign(Fa,{toJSON:function(e){var t,n=e.constructor;if(void 0!==n.toJSON)t=n.toJSON(e);else{t={name:e.name,times:Da.convertArray(e.times,Array),values:Da.convertArray(e.values,Array)};var r=e.getInterpolation();r!==e.DefaultInterpolation&&(t.interpolation=r)}return t.type=e.ValueTypeName,t}}),Object.assign(Fa.prototype,{constructor:Fa,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(e){return new Ba(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodLinear:function(e){return new ja(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:function(e){return new Na(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){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)}return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this},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=Da.arraySlice(n,i,o),this.values=Da.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&&Da.isTypedArray(r))for(var l=0,c=r.length;l!==c;++l){var u=r[l];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,u),e=!1;break}}return e},optimize:function(){for(var e=Da.arraySlice(this.times),t=Da.arraySlice(this.values),n=this.getValueSize(),r=2302===this.getInterpolation(),i=e.length-1,o=1,a=1;a<i;++a){var s=!1,l=e[a];if(l!==e[a+1]&&(1!==a||l!==e[0]))if(r)s=!0;else for(var c=a*n,u=c-n,h=c+n,d=0;d!==n;++d){var f=t[c+d];if(f!==t[u+d]||f!==t[h+d]){s=!0;break}}if(s){if(a!==o){e[o]=e[a];for(var p=a*n,m=o*n,g=0;g!==n;++g)t[m+g]=t[p+g]}++o}}if(i>0){e[o]=e[i];for(var v=i*n,y=o*n,b=0;b!==n;++b)t[y+b]=t[v+b];++o}return o!==e.length?(this.times=Da.arraySlice(e,0,o),this.values=Da.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this},clone:function(){var e=Da.arraySlice(this.times,0),t=Da.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}),za.prototype=Object.assign(Object.create(Fa.prototype),{constructor:za,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Ha.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ha,ValueTypeName:"color"}),Ua.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ua,ValueTypeName:"number"}),Va.prototype=Object.assign(Object.create(Ia.prototype),{constructor:Va,interpolate_:function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=(n-t)/(r-t),l=e*a,c=l+a;l!==c;l+=4)M.slerpFlat(i,0,o,l-a,o,l,s);return i}}),Ga.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Ga,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(e){return new Va(this.times,this.values,this.getValueSize(),e)},InterpolantFactoryMethodSmooth:void 0}),Wa.prototype=Object.assign(Object.create(Fa.prototype),{constructor:Wa,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),qa.prototype=Object.assign(Object.create(Fa.prototype),{constructor:qa,ValueTypeName:"vector"}),Object.assign(Xa,{parse:function(e){for(var t=[],n=e.tracks,r=1/(e.fps||1),i=0,o=n.length;i!==o;++i)t.push(Ya(n[i]).scale(r));var a=new Xa(e.name,e.duration,t,e.blendMode);return a.uuid=e.uuid,a},toJSON:function(e){for(var t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode},i=0,o=n.length;i!==o;++i)t.push(Fa.toJSON(n[i]));return r},CreateFromMorphTargetSequence:function(e,t,n,r){for(var i=t.length,o=[],a=0;a<i;a++){var s=[],l=[];s.push((a+i-1)%i,a,(a+1)%i),l.push(0,1,0);var c=Da.getKeyframeOrder(s);s=Da.sortedArray(s,1,c),l=Da.sortedArray(l,1,c),r||0!==s[0]||(s.push(i),l.push(l[0])),o.push(new Ua(".morphTargetInfluences["+t[a].name+"]",s,l).scale(1/n))}return new Xa(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],l=s.name.match(i);if(l&&l.length>1){var c=l[1],u=r[c];u||(r[c]=u=[]),u.push(s)}}var h=[];for(var d in r)h.push(Xa.CreateFromMorphTargetSequence(d,r[d],t,n));return h},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=[];Da.flattenJSON(n,o,a,r),0!==o.length&&i.push(new e(t,o,a))}},r=[],i=e.name||"default",o=e.fps||30,a=e.blendMode,s=e.length||-1,l=e.hierarchy||[],c=0;c<l.length;c++){var u=l[c].keys;if(u&&0!==u.length)if(u[0].morphTargets){var h={},d=void 0;for(d=0;d<u.length;d++)if(u[d].morphTargets)for(var f=0;f<u[d].morphTargets.length;f++)h[u[d].morphTargets[f]]=-1;for(var p in h){for(var m=[],g=[],v=0;v!==u[d].morphTargets.length;++v){var y=u[d];m.push(y.time),g.push(y.morphTarget===p?1:0)}r.push(new Ua(".morphTargetInfluence["+p+"]",m,g))}s=h.length*(o||1)}else{var b=".bones["+t[c].name+"]";n(qa,b+".position",u,"pos",r),n(Ga,b+".quaternion",u,"rot",r),n(qa,b+".scale",u,"scl",r)}}return 0===r.length?null:new Xa(i,s,r,a)}}),Object.assign(Xa.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])}return this.duration=e,this},trim:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this},validate:function(){for(var e=!0,t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e},optimize:function(){for(var e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this},clone:function(){for(var e=[],t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new Xa(this.name,this.duration,e,this.blendMode)},toJSON:function(){return Xa.toJSON(this)}});var Ka={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 Qa(e,t,n){var r=this,i=!1,o=0,a=0,s=void 0,l=[];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},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){var t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(var t=0,n=l.length;t<n;t+=2){var r=l[t],i=l[t+1];if(r.global&&(r.lastIndex=0),r.test(e))return i}return null}}var Za=new Qa;function Ja(e){this.manager=void 0!==e?e:Za,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}Object.assign(Ja.prototype,{load:function(){},loadAsync:function(e,t){var n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))},parse:function(){},setCrossOrigin:function(e){return this.crossOrigin=e,this},setWithCredentials:function(e){return this.withCredentials=e,this},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},setRequestHeader:function(e){return this.requestHeader=e,this}});var $a={};function es(e){Ja.call(this,e)}function ts(e){Ja.call(this,e)}function ns(e){Ja.call(this,e)}function rs(e){Ja.call(this,e)}function is(e){Ja.call(this,e)}function os(e){Ja.call(this,e)}function as(e){Ja.call(this,e)}function ss(){this.type="Curve",this.arcLengthDivisions=200}function ls(e,t,n,r,i,o,a,s){ss.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 cs(e,t,n,r,i,o){ls.call(this,e,t,n,n,r,i,o),this.type="ArcCurve"}function us(){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 l=(t-e)/o-(n-e)/(o+a)+(n-t)/a,c=(n-t)/a-(r-t)/(a+s)+(r-n)/s;i(t,n,l*=a,c*=a)},calc:function(i){var o=i*i;return e+t*i+n*o+r*(o*i)}}}es.prototype=Object.assign(Object.create(Ja.prototype),{constructor:es,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=Ka.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===$a[e]){var a,s=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(s){var l=s[1],c=!!s[2],u=s[3];u=decodeURIComponent(u),c&&(u=atob(u));try{var h,d=(this.responseType||"").toLowerCase();switch(d){case"arraybuffer":case"blob":for(var f=new Uint8Array(u.length),p=0;p<u.length;p++)f[p]=u.charCodeAt(p);h="blob"===d?new Blob([f.buffer],{type:l}):f.buffer;break;case"document":var m=new DOMParser;h=m.parseFromString(u,l);break;case"json":h=JSON.parse(u);break;default:h=u}setTimeout((function(){t&&t(h),i.manager.itemEnd(e)}),0)}catch(v){setTimeout((function(){r&&r(v),i.manager.itemError(e),i.manager.itemEnd(e)}),0)}}else{for(var g in $a[e]=[],$a[e].push({onLoad:t,onProgress:n,onError:r}),(a=new XMLHttpRequest).open("GET",e,!0),a.addEventListener("load",(function(t){var n=this.response,r=$a[e];if(delete $a[e],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),Ka.add(e,n);for(var o=0,a=r.length;o<a;o++){var s=r[o];s.onLoad&&s.onLoad(n)}i.manager.itemEnd(e)}else{for(var l=0,c=r.length;l<c;l++){var u=r[l];u.onError&&u.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}}),!1),a.addEventListener("progress",(function(t){for(var n=$a[e],r=0,i=n.length;r<i;r++){var o=n[r];o.onProgress&&o.onProgress(t)}}),!1),a.addEventListener("error",(function(t){var n=$a[e];delete $a[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),a.addEventListener("abort",(function(t){var n=$a[e];delete $a[e];for(var r=0,o=n.length;r<o;r++){var a=n[r];a.onError&&a.onError(t)}i.manager.itemError(e),i.manager.itemEnd(e)}),!1),void 0!==this.responseType&&(a.responseType=this.responseType),void 0!==this.withCredentials&&(a.withCredentials=this.withCredentials),a.overrideMimeType&&a.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)a.setRequestHeader(g,this.requestHeader[g]);a.send(null)}return i.manager.itemStart(e),a}$a[e].push({onLoad:t,onProgress:n,onError:r})},setResponseType:function(e){return this.responseType=e,this},setMimeType:function(e){return this.mimeType=e,this}}),ts.prototype=Object.assign(Object.create(Ja.prototype),{constructor:ts,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},parse:function(e){for(var t=[],n=0;n<e.length;n++){var r=Xa.parse(e[n]);t.push(r)}return t}}),ns.prototype=Object.assign(Object.create(Ja.prototype),{constructor:ns,load:function(e,t,n,r){var i=this,o=[],a=new wo,s=new es(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(i.withCredentials);var l=0;function c(c){s.load(e[c],(function(e){var n=i.parse(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.image=o,a.format=n.format,a.needsUpdate=!0,t&&t(a))}),n,r)}if(Array.isArray(e))for(var u=0,h=e.length;u<h;++u)c(u);else s.load(e,(function(e){var n=i.parse(e,!0);if(n.isCubemap){for(var r=n.mipmaps.length/n.mipmapCount,s=0;s<r;s++){o[s]={mipmaps:[]};for(var l=0;l<n.mipmapCount;l++)o[s].mipmaps.push(n.mipmaps[s*n.mipmapCount+l]),o[s].format=n.format,o[s].width=n.width,o[s].height=n.height}a.image=o}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}}),rs.prototype=Object.assign(Object.create(Ja.prototype),{constructor:rs,load:function(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);var i=this,o=Ka.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");function s(){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),Ka.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){a.removeEventListener("load",s,!1),a.removeEventListener("error",l,!1),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}return a.addEventListener("load",s,!1),a.addEventListener("error",l,!1),"data:"!==e.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}),is.prototype=Object.assign(Object.create(Ja.prototype),{constructor:is,load:function(e,t,n,r){var i=new Qt,o=new rs(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 l=0;l<e.length;++l)s(l);return i}}),os.prototype=Object.assign(Object.create(Ja.prototype),{constructor:os,load:function(e,t,n,r){var i=this,o=new Jt,a=new es(this.manager);return a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setPath(this.path),a.setWithCredentials(i.withCredentials),a.load(e,(function(e){var n=i.parse(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:1006,o.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(o.encoding=n.encoding),void 0!==n.flipY&&(o.flipY=n.flipY),void 0!==n.format&&(o.format=n.format),void 0!==n.type&&(o.type=n.type),void 0!==n.mipmaps&&(o.mipmaps=n.mipmaps,o.minFilter=1008),1===n.mipmapCount&&(o.minFilter=1006),o.needsUpdate=!0,t&&t(o,n))}),n,r),o}}),as.prototype=Object.assign(Object.create(Ja.prototype),{constructor:as,load:function(e,t,n,r){var i=new x,o=new rs(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,(function(n){i.image=n;var r=e.search(/\.jpe?g($|\?)/i)>0||0===e.search(/^data\:image\/jpeg/);i.format=r?1022:1023,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}),Object.assign(ss.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=this.getPoint(0),i=0;n.push(0);for(var o=1;o<=e;o++)i+=(t=this.getPoint(o/e)).distanceTo(r),n.push(i),r=t;return this.cacheArcLengths=n,n},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,l=o-1;s<=l;)if((a=r[i=Math.floor(s+(l-s)/2)]-n)<0)s=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(r[i=l]===n)return i/(o-1);var c=r[i];return(i+(n-c)/(r[i+1]-c))/(o-1)},getTangent:function(e,t){var n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);var i=this.getPoint(n),o=this.getPoint(r),a=t||(i.isVector2?new v:new T);return a.copy(o).sub(i).normalize(),a},getTangentAt:function(e,t){var n=this.getUtoTmapping(e);return this.getTangent(n,t)},computeFrenetFrames:function(e,t){for(var n=new T,r=[],i=[],o=[],a=new T,s=new te,l=0;l<=e;l++){var c=l/e;r[l]=this.getTangentAt(c,new T),r[l].normalize()}i[0]=new T,o[0]=new T;var u=Number.MAX_VALUE,h=Math.abs(r[0].x),d=Math.abs(r[0].y),f=Math.abs(r[0].z);h<=u&&(u=h,n.set(1,0,0)),d<=u&&(u=d,n.set(0,1,0)),f<=u&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),o[0].crossVectors(r[0],i[0]);for(var p=1;p<=e;p++){if(i[p]=i[p-1].clone(),o[p]=o[p-1].clone(),a.crossVectors(r[p-1],r[p]),a.length()>Number.EPSILON){a.normalize();var m=Math.acos(g.clamp(r[p-1].dot(r[p]),-1,1));i[p].applyMatrix4(s.makeRotationAxis(a,m))}o[p].crossVectors(r[p],i[p])}if(!0===t){var v=Math.acos(g.clamp(i[0].dot(i[e]),-1,1));v/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(v=-v);for(var y=1;y<=e;y++)i[y].applyMatrix4(s.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],i[y])}return{tangents:r,normals:i,binormals:o}},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}}),ls.prototype=Object.create(ss.prototype),ls.prototype.constructor=ls,ls.prototype.isEllipseCurve=!0,ls.prototype.getPoint=function(e,t){for(var n=t||new v,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),l=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){var c=Math.cos(this.aRotation),u=Math.sin(this.aRotation),h=s-this.aX,d=l-this.aY;s=h*c-d*u+this.aX,l=h*u+d*c+this.aY}return n.set(s,l)},ls.prototype.copy=function(e){return ss.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},ls.prototype.toJSON=function(){var e=ss.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},ls.prototype.fromJSON=function(e){return ss.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},cs.prototype=Object.create(ls.prototype),cs.prototype.constructor=cs,cs.prototype.isArcCurve=!0;var hs=new T,ds=new us,fs=new us,ps=new us;function ms(e,t,n,r){void 0===e&&(e=[]),void 0===t&&(t=!1),void 0===n&&(n="centripetal"),void 0===r&&(r=.5),ss.call(this),this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}function gs(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 vs(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 ys(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 bs(e,t,n,r){void 0===e&&(e=new v),void 0===t&&(t=new v),void 0===n&&(n=new v),void 0===r&&(r=new v),ss.call(this),this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}function ws(e,t,n,r){void 0===e&&(e=new T),void 0===t&&(t=new T),void 0===n&&(n=new T),void 0===r&&(r=new T),ss.call(this),this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}function xs(e,t){void 0===e&&(e=new v),void 0===t&&(t=new v),ss.call(this),this.type="LineCurve",this.v1=e,this.v2=t}function _s(e,t){void 0===e&&(e=new T),void 0===t&&(t=new T),ss.call(this),this.type="LineCurve3",this.v1=e,this.v2=t}function Es(e,t,n){void 0===e&&(e=new v),void 0===t&&(t=new v),void 0===n&&(n=new v),ss.call(this),this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}function As(e,t,n){void 0===e&&(e=new T),void 0===t&&(t=new T),void 0===n&&(n=new T),ss.call(this),this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}function Ss(e){void 0===e&&(e=[]),ss.call(this),this.type="SplineCurve",this.points=e}ms.prototype=Object.create(ss.prototype),ms.prototype.constructor=ms,ms.prototype.isCatmullRomCurve3=!0,ms.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n,r,i=t,o=this.points,a=o.length,s=(a-(this.closed?0:1))*e,l=Math.floor(s),c=s-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/a)+1)*a:0===c&&l===a-1&&(l=a-2,c=1),this.closed||l>0?n=o[(l-1)%a]:(hs.subVectors(o[0],o[1]).add(o[0]),n=hs);var u=o[l%a],h=o[(l+1)%a];if(this.closed||l+2<a?r=o[(l+2)%a]:(hs.subVectors(o[a-1],o[a-2]).add(o[a-1]),r=hs),"centripetal"===this.curveType||"chordal"===this.curveType){var d="chordal"===this.curveType?.5:.25,f=Math.pow(n.distanceToSquared(u),d),p=Math.pow(u.distanceToSquared(h),d),m=Math.pow(h.distanceToSquared(r),d);p<1e-4&&(p=1),f<1e-4&&(f=p),m<1e-4&&(m=p),ds.initNonuniformCatmullRom(n.x,u.x,h.x,r.x,f,p,m),fs.initNonuniformCatmullRom(n.y,u.y,h.y,r.y,f,p,m),ps.initNonuniformCatmullRom(n.z,u.z,h.z,r.z,f,p,m)}else"catmullrom"===this.curveType&&(ds.initCatmullRom(n.x,u.x,h.x,r.x,this.tension),fs.initCatmullRom(n.y,u.y,h.y,r.y,this.tension),ps.initCatmullRom(n.z,u.z,h.z,r.z,this.tension));return i.set(ds.calc(c),fs.calc(c),ps.calc(c)),i},ms.prototype.copy=function(e){ss.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},ms.prototype.toJSON=function(){var e=ss.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},ms.prototype.fromJSON=function(e){ss.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 T).fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this},bs.prototype=Object.create(ss.prototype),bs.prototype.constructor=bs,bs.prototype.isCubicBezierCurve=!0,bs.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(ys(e,r.x,i.x,o.x,a.x),ys(e,r.y,i.y,o.y,a.y)),n},bs.prototype.copy=function(e){return ss.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},bs.prototype.toJSON=function(){var e=ss.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},bs.prototype.fromJSON=function(e){return ss.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},ws.prototype=Object.create(ss.prototype),ws.prototype.constructor=ws,ws.prototype.isCubicBezierCurve3=!0,ws.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t,r=this.v0,i=this.v1,o=this.v2,a=this.v3;return n.set(ys(e,r.x,i.x,o.x,a.x),ys(e,r.y,i.y,o.y,a.y),ys(e,r.z,i.z,o.z,a.z)),n},ws.prototype.copy=function(e){return ss.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},ws.prototype.toJSON=function(){var e=ss.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},ws.prototype.fromJSON=function(e){return ss.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},xs.prototype=Object.create(ss.prototype),xs.prototype.constructor=xs,xs.prototype.isLineCurve=!0,xs.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},xs.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},xs.prototype.getTangent=function(e,t){var n=t||new v;return n.copy(this.v2).sub(this.v1).normalize(),n},xs.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},xs.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},xs.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},_s.prototype=Object.create(ss.prototype),_s.prototype.constructor=_s,_s.prototype.isLineCurve3=!0,_s.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n},_s.prototype.getPointAt=function(e,t){return this.getPoint(e,t)},_s.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v1.copy(e.v1),this.v2.copy(e.v2),this},_s.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},_s.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Es.prototype=Object.create(ss.prototype),Es.prototype.constructor=Es,Es.prototype.isQuadraticBezierCurve=!0,Es.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(vs(e,r.x,i.x,o.x),vs(e,r.y,i.y,o.y)),n},Es.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},Es.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},Es.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},As.prototype=Object.create(ss.prototype),As.prototype.constructor=As,As.prototype.isQuadraticBezierCurve3=!0,As.prototype.getPoint=function(e,t){void 0===t&&(t=new T);var n=t,r=this.v0,i=this.v1,o=this.v2;return n.set(vs(e,r.x,i.x,o.x),vs(e,r.y,i.y,o.y),vs(e,r.z,i.z,o.z)),n},As.prototype.copy=function(e){return ss.prototype.copy.call(this,e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this},As.prototype.toJSON=function(){var e=ss.prototype.toJSON.call(this);return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e},As.prototype.fromJSON=function(e){return ss.prototype.fromJSON.call(this,e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this},Ss.prototype=Object.create(ss.prototype),Ss.prototype.constructor=Ss,Ss.prototype.isSplineCurve=!0,Ss.prototype.getPoint=function(e,t){void 0===t&&(t=new v);var n=t,r=this.points,i=(r.length-1)*e,o=Math.floor(i),a=i-o,s=r[0===o?o:o-1],l=r[o],c=r[o>r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(gs(a,s.x,l.x,c.x,u.x),gs(a,s.y,l.y,c.y,u.y)),n},Ss.prototype.copy=function(e){ss.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},Ss.prototype.toJSON=function(){var e=ss.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},Ss.prototype.fromJSON=function(e){ss.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 v).fromArray(r))}return this};var Ms=Object.freeze({__proto__:null,ArcCurve:cs,CatmullRomCurve3:ms,CubicBezierCurve:bs,CubicBezierCurve3:ws,EllipseCurve:ls,LineCurve:xs,LineCurve3:_s,QuadraticBezierCurve:Es,QuadraticBezierCurve3:As,SplineCurve:Ss});function Ts(){ss.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Cs(e){Ts.call(this),this.type="Path",this.currentPoint=new v,e&&this.setFromPoints(e)}function Os(e){Cs.call(this,e),this.uuid=g.generateUUID(),this.type="Shape",this.holes=[]}function Rs(e,t){void 0===t&&(t=1),Me.call(this),this.type="Light",this.color=new Ye(e),this.intensity=t}function ks(e,t,n){Rs.call(this,e,n),this.type="HemisphereLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.groundColor=new Ye(t)}function Ps(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new v(512,512),this.map=null,this.mapPass=null,this.matrix=new te,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new tn,this._frameExtents=new v(1,1),this._viewportCount=1,this._viewports=[new E(0,0,1,1)]}function Ls(){Ps.call(this,new Yt(50,1,.5,500)),this.focus=1}function Ds(e,t,n,r,i,o){Rs.call(this,e,t),this.type="SpotLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.target=new Me,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 Ls}function Is(){Ps.call(this,new Yt(90,1,.5,500)),this._frameExtents=new v(4,2),this._viewportCount=6,this._viewports=[new E(2,1,1,1),new E(0,1,1,1),new E(3,1,1,1),new E(1,1,1,1),new E(3,0,1,1),new E(1,0,1,1)],this._cubeDirections=[new T(1,0,0),new T(-1,0,0),new T(0,0,1),new T(0,0,-1),new T(0,1,0),new T(0,-1,0)],this._cubeUps=[new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,1,0),new T(0,0,1),new T(0,0,-1)]}function Ns(e,t,n,r){Rs.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 Is}function js(e,t,n,r,i,o){void 0===e&&(e=-1),void 0===t&&(t=1),void 0===n&&(n=1),void 0===r&&(r=-1),void 0===i&&(i=.1),void 0===o&&(o=2e3),Xt.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=i,this.far=o,this.updateProjectionMatrix()}function Bs(){Ps.call(this,new js(-5,5,5,-5,.5,500))}function Fs(e,t){Rs.call(this,e,t),this.type="DirectionalLight",this.position.copy(Me.DefaultUp),this.updateMatrix(),this.target=new Me,this.shadow=new Bs}function zs(e,t){Rs.call(this,e,t),this.type="AmbientLight"}function Hs(e,t,n,r){Rs.call(this,e,t),this.type="RectAreaLight",this.width=void 0!==n?n:10,this.height=void 0!==r?r:10}Ts.prototype=Object.assign(Object.create(ss.prototype),{constructor:Ts,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 xs(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){void 0===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||o.isLineCurve3)?1:o&&o.isSplineCurve?e*o.points.length:e,s=o.getPoints(a),l=0;l<s.length;l++){var c=s[l];t&&t.equals(c)||(n.push(c),t=c)}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n},copy:function(e){ss.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=ss.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){ss.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 Ms[r.type]).fromJSON(r))}return this}}),Cs.prototype=Object.assign(Object.create(Ts.prototype),{constructor:Cs,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);return this},moveTo:function(e,t){return this.currentPoint.set(e,t),this},lineTo:function(e,t){var n=new xs(this.currentPoint.clone(),new v(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this},quadraticCurveTo:function(e,t,n,r){var i=new Es(this.currentPoint.clone(),new v(e,t),new v(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this},bezierCurveTo:function(e,t,n,r,i,o){var a=new bs(this.currentPoint.clone(),new v(e,t),new v(n,r),new v(i,o));return this.curves.push(a),this.currentPoint.set(i,o),this},splineThru:function(e){var t=new Ss([this.currentPoint.clone()].concat(e));return this.curves.push(t),this.currentPoint.copy(e[e.length-1]),this},arc:function(e,t,n,r,i,o){var a=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+a,t+s,n,r,i,o),this},absarc:function(e,t,n,r,i,o){return this.absellipse(e,t,n,n,r,i,o),this},ellipse:function(e,t,n,r,i,o,a,s){var l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,o,a,s),this},absellipse:function(e,t,n,r,i,o,a,s){var l=new ls(e,t,n,r,i,o,a,s);if(this.curves.length>0){var c=l.getPoint(0);c.equals(this.currentPoint)||this.lineTo(c.x,c.y)}this.curves.push(l);var u=l.getPoint(1);return this.currentPoint.copy(u),this},copy:function(e){return Ts.prototype.copy.call(this,e),this.currentPoint.copy(e.currentPoint),this},toJSON:function(){var e=Ts.prototype.toJSON.call(this);return e.currentPoint=this.currentPoint.toArray(),e},fromJSON:function(e){return Ts.prototype.fromJSON.call(this,e),this.currentPoint.fromArray(e.currentPoint),this}}),Os.prototype=Object.assign(Object.create(Cs.prototype),{constructor:Os,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){Cs.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=Cs.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){Cs.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 Cs).fromJSON(r))}return this}}),Rs.prototype=Object.assign(Object.create(Me.prototype),{constructor:Rs,isLight:!0,copy:function(e){return Me.prototype.copy.call(this,e),this.color.copy(e.color),this.intensity=e.intensity,this},toJSON:function(e){var t=Me.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}}),ks.prototype=Object.assign(Object.create(Rs.prototype),{constructor:ks,isHemisphereLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.groundColor.copy(e.groundColor),this}}),Object.assign(Ps.prototype,{_projScreenMatrix:new te,_lightPositionWorld:new T,_lookTarget:new T,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(e){var t=this.camera,n=this.matrix,r=this._projScreenMatrix,i=this._lookTarget,o=this._lightPositionWorld;o.setFromMatrixPosition(e.matrixWorld),t.position.copy(o),i.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(i),t.updateMatrixWorld(),r.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(r),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)},getViewport:function(e){return this._viewports[e]},getFrameExtents:function(){return this._frameExtents},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),0!==this.normalBias&&(e.normalBias=this.normalBias),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}}),Ls.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Ls,isSpotLightShadow:!0,updateMatrices:function(e){var t=this.camera,n=2*g.RAD2DEG*e.angle*this.focus,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()),Ps.prototype.updateMatrices.call(this,e)}}),Ds.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Ds,isSpotLight:!0,copy:function(e){return Rs.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}}),Is.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Is,isPointLightShadow:!0,updateMatrices:function(e,t){void 0===t&&(t=0);var n=this.camera,r=this.matrix,i=this._lightPositionWorld,o=this._lookTarget,a=this._projScreenMatrix;i.setFromMatrixPosition(e.matrixWorld),n.position.copy(i),o.copy(n.position),o.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(o),n.updateMatrixWorld(),r.makeTranslation(-i.x,-i.y,-i.z),a.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(a)}}),Ns.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Ns,isPointLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}),js.prototype=Object.assign(Object.create(Xt.prototype),{constructor:js,isOrthographicCamera:!0,copy:function(e,t){return Xt.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 l=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o=(i+=l*this.view.offsetX)+l*this.view.width,s=(a-=c*this.view.offsetY)-c*this.view.height}this.projectionMatrix.makeOrthographic(i,o,a,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()},toJSON:function(e){var t=Me.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}}),Bs.prototype=Object.assign(Object.create(Ps.prototype),{constructor:Bs,isDirectionalLightShadow:!0,updateMatrices:function(e){Ps.prototype.updateMatrices.call(this,e)}}),Fs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Fs,isDirectionalLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}),zs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:zs,isAmbientLight:!0}),Hs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Hs,isRectAreaLight:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.width=e.width,this.height=e.height,this},toJSON:function(e){var t=Rs.prototype.toJSON.call(this,e);return t.object.width=this.width,t.object.height=this.height,t}});var Us=function(){function e(){Object.defineProperty(this,"isSphericalHarmonics3",{value:!0}),this.coefficients=[];for(var e=0;e<9;e++)this.coefficients.push(new T)}var t=e.prototype;return t.set=function(e){for(var t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this},t.zero=function(){for(var e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this},t.getAt=function(e,t){var n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.282095),t.addScaledVector(o[1],.488603*r),t.addScaledVector(o[2],.488603*i),t.addScaledVector(o[3],.488603*n),t.addScaledVector(o[4],n*r*1.092548),t.addScaledVector(o[5],r*i*1.092548),t.addScaledVector(o[6],.315392*(3*i*i-1)),t.addScaledVector(o[7],n*i*1.092548),t.addScaledVector(o[8],.546274*(n*n-r*r)),t},t.getIrradianceAt=function(e,t){var n=e.x,r=e.y,i=e.z,o=this.coefficients;return t.copy(o[0]).multiplyScalar(.886227),t.addScaledVector(o[1],1.023328*r),t.addScaledVector(o[2],1.023328*i),t.addScaledVector(o[3],1.023328*n),t.addScaledVector(o[4],.858086*n*r),t.addScaledVector(o[5],.858086*r*i),t.addScaledVector(o[6],.743125*i*i-.247708),t.addScaledVector(o[7],.858086*n*i),t.addScaledVector(o[8],.429043*(n*n-r*r)),t},t.add=function(e){for(var t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this},t.addScaledSH=function(e,t){for(var n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this},t.scale=function(e){for(var t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this},t.lerp=function(e,t){for(var n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this},t.equals=function(e){for(var t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0},t.copy=function(e){return this.set(e.coefficients)},t.clone=function(){return(new this.constructor).copy(this)},t.fromArray=function(e,t){void 0===t&&(t=0);for(var n=this.coefficients,r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this},t.toArray=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=0);for(var n=this.coefficients,r=0;r<9;r++)n[r].toArray(e,t+3*r);return e},e.getBasisAt=function(e,t){var n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)},e}();function Vs(e,t){Rs.call(this,void 0,t),this.type="LightProbe",this.sh=void 0!==e?e:new Us}function Gs(e){Ja.call(this,e),this.textures={}}Vs.prototype=Object.assign(Object.create(Rs.prototype),{constructor:Vs,isLightProbe:!0,copy:function(e){return Rs.prototype.copy.call(this,e),this.sh.copy(e.sh),this},fromJSON:function(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this},toJSON:function(e){var t=Rs.prototype.toJSON.call(this,e);return t.object.sh=this.sh.toArray(),t}}),Gs.prototype=Object.assign(Object.create(Ja.prototype),{constructor:Gs,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},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 La[e.type];if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.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.sheen&&(r.sheen=(new Ye).setHex(e.sheen)),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.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.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),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.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),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.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.skinning&&(r.skinning=e.skinning),void 0!==e.morphTargets&&(r.morphTargets=e.morphTargets),void 0!==e.morphNormals&&(r.morphNormals=e.morphNormals),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.vertexTangents&&(r.vertexTangents=e.vertexTangents),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"===typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(var i in e.uniforms){var o=e.uniforms[i];switch(r.uniforms[i]={},o.type){case"t":r.uniforms[i].value=n(o.value);break;case"c":r.uniforms[i].value=(new Ye).setHex(o.value);break;case"v2":r.uniforms[i].value=(new v).fromArray(o.value);break;case"v3":r.uniforms[i].value=(new T).fromArray(o.value);break;case"v4":r.uniforms[i].value=(new E).fromArray(o.value);break;case"m3":r.uniforms[i].value=(new y).fromArray(o.value);break;case"m4":r.uniforms[i].value=(new te).fromArray(o.value);break;default:r.uniforms[i].value=o.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(var a in e.extensions)r.extensions[a]=e.extensions[a];if(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.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),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.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){var s=e.normalScale;!1===Array.isArray(s)&&(s=[s,s]),r.normalScale=(new v).fromArray(s)}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.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),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)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new v).fromArray(e.clearcoatNormalScale)),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),r},setTextures:function(e){return this.textures=e,this}});var Ws={decodeText:function(t){if("undefined"!==typeof TextDecoder)return(new TextDecoder).decode(t);for(var n="",r=0,i=t.length;r<i;r++)n+=String.fromCharCode(t[r]);try{return decodeURIComponent(escape(n))}catch(e){return n}},extractUrlBase:function(e){var t=e.lastIndexOf("/");return-1===t?"./":e.substr(0,t+1)}};function qs(){_t.call(this),this.type="InstancedBufferGeometry",this.instanceCount=1/0}function Xs(e,t,n,r){"number"===typeof n&&(r=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),tt.call(this,e,t,n),this.meshPerAttribute=r||1}function Ys(e){Ja.call(this,e)}qs.prototype=Object.assign(Object.create(_t.prototype),{constructor:qs,isInstancedBufferGeometry:!0,copy:function(e){return _t.prototype.copy.call(this,e),this.instanceCount=e.instanceCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var e=_t.prototype.toJSON.call(this);return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}),Xs.prototype=Object.assign(Object.create(tt.prototype),{constructor:Xs,isInstancedBufferAttribute:!0,copy:function(e){return tt.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},toJSON:function(){var e=tt.prototype.toJSON.call(this);return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}),Ys.prototype=Object.assign(Object.create(Ja.prototype),{constructor:Ys,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{n(o.parse(JSON.parse(r)))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},parse:function(e){var t={},n={};function r(e,r){if(void 0!==t[r])return t[r];var i=e.interleavedBuffers[r],o=function(e,t){if(void 0!==n[t])return n[t];var r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),a=new vi(pt(i.type,o),i.stride);return a.uuid=i.uuid,t[r]=a,a}var i=e.isInstancedBufferGeometry?new qs:new _t,o=e.data.index;if(void 0!==o){var a=pt(o.type,o.array);i.setIndex(new tt(a,1))}var s=e.data.attributes;for(var l in s){var c=s[l],u=void 0;if(c.isInterleavedBufferAttribute)u=new wi(r(e.data,c.data),c.itemSize,c.offset,c.normalized);else{var h=pt(c.type,c.array);u=new(c.isInstancedBufferAttribute?Xs:tt)(h,c.itemSize,c.normalized)}void 0!==c.name&&(u.name=c.name),i.setAttribute(l,u)}var d=e.data.morphAttributes;if(d)for(var f in d){for(var p=d[f],m=[],g=0,v=p.length;g<v;g++){var y=p[g],b=void 0;b=y.isInterleavedBufferAttribute?new wi(r(e.data,y.data),y.itemSize,y.offset,y.normalized):new tt(pt(y.type,y.array),y.itemSize,y.normalized),void 0!==y.name&&(b.name=y.name),m.push(b)}i.morphAttributes[f]=m}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);var w=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==w)for(var x=0,_=w.length;x!==_;++x){var E=w[x];i.addGroup(E.start,E.count,E.materialIndex)}var A=e.data.boundingSphere;if(void 0!==A){var S=new T;void 0!==A.center&&S.fromArray(A.center),i.boundingSphere=new q(S,A.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}});var Ks=function(e){function t(t){return e.call(this,t)||this}s(t,e);var n=t.prototype;return n.load=function(e,t,n,r){var i=this,o=""===this.path?Ws.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||o;var a=new es(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){var o=null;try{o=JSON.parse(n)}catch(s){return void 0!==r&&r(s),void console.error("THREE:ObjectLoader: Can't parse "+e+".",s.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)}),n,r)},n.parse=function(e,t){var n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),o=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),a=this.parseTextures(e.textures,o),s=this.parseMaterials(e.materials,a),l=this.parseObject(e.object,i,s,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){var u=!1;for(var h in o)if(o[h]instanceof HTMLImageElement){u=!0;break}!1===u&&t(l)}return l},n.parseShapes=function(e){var t={};if(void 0!==e)for(var n=0,r=e.length;n<r;n++){var i=(new Os).fromJSON(e[n]);t[i.uuid]=i}return t},n.parseSkeletons=function(e,t){var n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(var i=0,o=e.length;i<o;i++){var a=(new Yi).fromJSON(e[i],r);n[a.uuid]=a}return n},n.parseGeometries=function(e,t){var n,r={};if(void 0!==e)for(var i=new Ys,o=0,a=e.length;o<a;o++){var s=void 0,l=e[o];switch(l.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new _a[l.type](l.width,l.height,l.widthSegments,l.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":s=new _a[l.type](l.width,l.height,l.depth,l.widthSegments,l.heightSegments,l.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new _a[l.type](l.radius,l.segments,l.thetaStart,l.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new _a[l.type](l.radiusTop,l.radiusBottom,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new _a[l.type](l.radius,l.height,l.radialSegments,l.heightSegments,l.openEnded,l.thetaStart,l.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new _a[l.type](l.radius,l.widthSegments,l.heightSegments,l.phiStart,l.phiLength,l.thetaStart,l.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new _a[l.type](l.radius,l.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new _a[l.type](l.innerRadius,l.outerRadius,l.thetaSegments,l.phiSegments,l.thetaStart,l.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new _a[l.type](l.radius,l.tube,l.radialSegments,l.tubularSegments,l.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new _a[l.type](l.radius,l.tube,l.tubularSegments,l.radialSegments,l.p,l.q);break;case"TubeGeometry":case"TubeBufferGeometry":s=new _a[l.type]((new Ms[l.path.type]).fromJSON(l.path),l.tubularSegments,l.radius,l.radialSegments,l.closed);break;case"LatheGeometry":case"LatheBufferGeometry":s=new _a[l.type](l.points,l.segments,l.phiStart,l.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new _a[l.type](l.vertices,l.indices,l.radius,l.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":n=[];for(var c=0,u=l.shapes.length;c<u;c++){var h=t[l.shapes[c]];n.push(h)}s=new _a[l.type](n,l.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":n=[];for(var d=0,f=l.shapes.length;d<f;d++){var p=t[l.shapes[d]];n.push(p)}var m=l.options.extrudePath;void 0!==m&&(l.options.extrudePath=(new Ms[m.type]).fromJSON(m)),s=new _a[l.type](n,l.options);break;case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(l);break;case"Geometry":"THREE"in window&&"LegacyJSONLoader"in THREE?s=(new THREE.LegacyJSONLoader).parse(l,this.resourcePath).geometry:console.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".');break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+l.type+'"');continue}s.uuid=l.uuid,void 0!==l.name&&(s.name=l.name),!0===s.isBufferGeometry&&void 0!==l.userData&&(s.userData=l.userData),r[l.uuid]=s}return r},n.parseMaterials=function(e,t){var n={},r={};if(void 0!==e){var i=new Gs;i.setTextures(t);for(var o=0,a=e.length;o<a;o++){var s=e[o];if("MultiMaterial"===s.type){for(var l=[],c=0;c<s.materials.length;c++){var u=s.materials[c];void 0===n[u.uuid]&&(n[u.uuid]=i.parse(u)),l.push(n[u.uuid])}r[s.uuid]=l}else void 0===n[s.uuid]&&(n[s.uuid]=i.parse(s)),r[s.uuid]=n[s.uuid]}}return r},n.parseAnimations=function(e){var t={};if(void 0!==e)for(var n=0;n<e.length;n++){var r=e[n],i=Xa.parse(r);t[i.uuid]=i}return t},n.parseImages=function(e,t){var n,r=this,i={};function o(e){if("string"===typeof e){var t=e;return function(e){return r.manager.itemStart(e),n.load(e,(function(){r.manager.itemEnd(e)}),void 0,(function(){r.manager.itemError(e),r.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:r.resourcePath+t)}return e.data?{data:pt(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){var a=new Qa(t);(n=new rs(a)).setCrossOrigin(this.crossOrigin);for(var s=0,l=e.length;s<l;s++){var c=e[s],u=c.url;if(Array.isArray(u)){i[c.uuid]=[];for(var h=0,d=u.length;h<d;h++){var f=o(u[h]);null!==f&&(f instanceof HTMLImageElement?i[c.uuid].push(f):i[c.uuid].push(new Jt(f.data,f.width,f.height)))}}else{var p=o(c.url);null!==p&&(i[c.uuid]=p)}}}return i},n.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=void 0,l=t[a.image];Array.isArray(l)?(s=new Qt(l),6===l.length&&(s.needsUpdate=!0)):(s=l&&l.data?new Jt(l.data,l.width,l.height):new x(l),l&&(s.needsUpdate=!0)),s.uuid=a.uuid,void 0!==a.name&&(s.name=a.name),void 0!==a.mapping&&(s.mapping=n(a.mapping,Qs)),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],Zs),s.wrapT=n(a.wrap[1],Zs)),void 0!==a.format&&(s.format=a.format),void 0!==a.type&&(s.type=a.type),void 0!==a.encoding&&(s.encoding=a.encoding),void 0!==a.minFilter&&(s.minFilter=n(a.minFilter,Js)),void 0!==a.magFilter&&(s.magFilter=n(a.magFilter,Js)),void 0!==a.anisotropy&&(s.anisotropy=a.anisotropy),void 0!==a.flipY&&(s.flipY=a.flipY),void 0!==a.premultiplyAlpha&&(s.premultiplyAlpha=a.premultiplyAlpha),void 0!==a.unpackAlignment&&(s.unpackAlignment=a.unpackAlignment),r[a.uuid]=s}return r},n.parseObject=function(e,t,n,r){var i,o,a;function s(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function l(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":i=new gi,void 0!==e.background&&Number.isInteger(e.background)&&(i.background=new Ye(e.background)),void 0!==e.fog&&("Fog"===e.fog.type?i.fog=new mi(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(i.fog=new pi(e.fog.color,e.fog.density)));break;case"PerspectiveCamera":i=new Yt(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(i.focus=e.focus),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.filmGauge&&(i.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(i.filmOffset=e.filmOffset),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"OrthographicCamera":i=new js(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(i.zoom=e.zoom),void 0!==e.view&&(i.view=Object.assign({},e.view));break;case"AmbientLight":i=new zs(e.color,e.intensity);break;case"DirectionalLight":i=new Fs(e.color,e.intensity);break;case"PointLight":i=new Ns(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":i=new Hs(e.color,e.intensity,e.width,e.height);break;case"SpotLight":i=new Ds(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":i=new ks(e.color,e.groundColor,e.intensity);break;case"LightProbe":i=(new Vs).fromJSON(e);break;case"SkinnedMesh":i=new Gi(o=s(e.geometry),a=l(e.material)),void 0!==e.bindMode&&(i.bindMode=e.bindMode),void 0!==e.bindMatrix&&i.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(i.skeleton=e.skeleton);break;case"Mesh":i=new zt(o=s(e.geometry),a=l(e.material));break;case"InstancedMesh":o=s(e.geometry),a=l(e.material);var c=e.count,u=e.instanceMatrix;(i=new $i(o,a,c)).instanceMatrix=new tt(new Float32Array(u.array),16);break;case"LOD":i=new Bi;break;case"Line":i=new ao(s(e.geometry),l(e.material));break;case"LineLoop":i=new uo(s(e.geometry),l(e.material));break;case"LineSegments":i=new co(s(e.geometry),l(e.material));break;case"PointCloud":case"Points":i=new vo(s(e.geometry),l(e.material));break;case"Sprite":i=new Di(l(e.material));break;case"Group":i=new ii;break;case"Bone":i=new Wi;break;default:i=new Me}if(i.uuid=e.uuid,void 0!==e.name&&(i.name=e.name),void 0!==e.matrix?(i.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(i.matrixAutoUpdate=e.matrixAutoUpdate),i.matrixAutoUpdate&&i.matrix.decompose(i.position,i.quaternion,i.scale)):(void 0!==e.position&&i.position.fromArray(e.position),void 0!==e.rotation&&i.rotation.fromArray(e.rotation),void 0!==e.quaternion&&i.quaternion.fromArray(e.quaternion),void 0!==e.scale&&i.scale.fromArray(e.scale)),void 0!==e.castShadow&&(i.castShadow=e.castShadow),void 0!==e.receiveShadow&&(i.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(i.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(i.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(i.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&i.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(i.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(i.visible=e.visible),void 0!==e.frustumCulled&&(i.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(i.renderOrder=e.renderOrder),void 0!==e.userData&&(i.userData=e.userData),void 0!==e.layers&&(i.layers.mask=e.layers),void 0!==e.children)for(var h=e.children,d=0;d<h.length;d++)i.add(this.parseObject(h[d],t,n,r));if(void 0!==e.animations)for(var f=e.animations,p=0;p<f.length;p++){var m=f[p];i.animations.push(r[m])}if("LOD"===e.type){void 0!==e.autoUpdate&&(i.autoUpdate=e.autoUpdate);for(var g=e.levels,v=0;v<g.length;v++){var y=g[v],b=i.getObjectByProperty("uuid",y.object);void 0!==b&&i.addLevel(b,y.distance)}}return i},n.bindSkeletons=function(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){var n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))},n.setTexturePath=function(e){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(e)},t}(Ja),Qs={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Zs={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Js={NearestFilter:1003,NearestMipmapNearestFilter:1004,NearestMipmapLinearFilter:1005,LinearFilter:1006,LinearMipmapNearestFilter:1007,LinearMipmapLinearFilter:1008};function $s(e){"undefined"===typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"===typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),Ja.call(this,e),this.options={premultiplyAlpha:"none"}}function el(){this.type="ShapePath",this.color=new Ye,this.subPaths=[],this.currentPath=null}$s.prototype=Object.assign(Object.create(Ja.prototype),{constructor:$s,isImageBitmapLoader:!0,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),e=this.manager.resolveURL(e);var i=this,o=Ka.get(e);if(void 0!==o)return i.manager.itemStart(e),setTimeout((function(){t&&t(o),i.manager.itemEnd(e)}),0),o;var a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",fetch(e,a).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,i.options)})).then((function(n){Ka.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}),Object.assign(el.prototype,{moveTo:function(e,t){return this.currentPath=new Cs,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this},lineTo:function(e,t){return this.currentPath.lineTo(e,t),this},quadraticCurveTo:function(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this},bezierCurveTo:function(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this},splineThru:function(e){return this.currentPath.splineThru(e),this},toShapes:function(e,t){function n(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n],o=new Os;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],l=s.x-a.x,c=s.y-a.y;if(Math.abs(c)>Number.EPSILON){if(c<0&&(a=t[o],l=-l,s=t[i],c=-c),e.y<a.y||e.y>s.y)continue;if(e.y===a.y){if(e.x===a.x)return!0}else{var u=c*(e.x-a.x)-l*(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,o,a,s=ia.isClockWise,l=this.subPaths;if(0===l.length)return[];if(!0===t)return n(l);var c=[];if(1===l.length)return o=l[0],(a=new Os).curves=o.curves,c.push(a),c;var u=!s(l[0].getPoints());u=e?!u:u;var h,d,f=[],p=[],m=[],g=0;p[g]=void 0,m[g]=[];for(var v=0,y=l.length;v<y;v++)i=s(h=(o=l[v]).getPoints()),(i=e?!i:i)?(!u&&p[g]&&g++,p[g]={s:new Os,p:h},p[g].s.curves=o.curves,u&&g++,m[g]=[]):m[g].push({h:o,p:h[0]});if(!p[0])return n(l);if(p.length>1){for(var b=!1,w=[],x=0,_=p.length;x<_;x++)f[x]=[];for(var E=0,A=p.length;E<A;E++)for(var S=m[E],M=0;M<S.length;M++){for(var T=S[M],C=!0,O=0;O<p.length;O++)r(T.p,p[O].p)&&(E!==O&&w.push({froms:E,tos:O,hole:M}),C?(C=!1,f[O].push(T)):b=!0);C&&f[E].push(T)}w.length>0&&(b||(m=f))}for(var R=0,k=p.length;R<k;R++){a=p[R].s,c.push(a);for(var P=0,L=(d=m[R]).length;P<L;P++)a.holes.push(d[P].h)}return c}});var tl,nl=function(){function e(e){Object.defineProperty(this,"isFont",{value:!0}),this.type="Font",this.data=e}return e.prototype.generateShapes=function(e,t){void 0===t&&(t=100);for(var n=[],r=function(e,t,n){for(var r=Array.from?Array.from(e):String(e).split(""),i=t/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*i,a=[],s=0,l=0,c=0;c<r.length;c++){var u=r[c];if("\n"===u)s=0,l-=o;else{var h=rl(u,i,s,l,n);s+=h.offsetX,a.push(h.path)}}return a}(e,t,this.data),i=0,o=r.length;i<o;i++)Array.prototype.push.apply(n,r[i].toShapes());return n},e}();function rl(e,t,n,r,i){var o=i.glyphs[e]||i.glyphs["?"];if(o){var a,s,l,c,u,h,d,f,p=new el;if(o.o)for(var m=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),g=0,v=m.length;g<v;)switch(m[g++]){case"m":a=m[g++]*t+n,s=m[g++]*t+r,p.moveTo(a,s);break;case"l":a=m[g++]*t+n,s=m[g++]*t+r,p.lineTo(a,s);break;case"q":l=m[g++]*t+n,c=m[g++]*t+r,u=m[g++]*t+n,h=m[g++]*t+r,p.quadraticCurveTo(u,h,l,c);break;case"b":l=m[g++]*t+n,c=m[g++]*t+r,u=m[g++]*t+n,h=m[g++]*t+r,d=m[g++]*t+n,f=m[g++]*t+r,p.bezierCurveTo(u,h,d,f,l,c)}return{offsetX:o.ha*t,path:p}}console.error('THREE.Font: character "'+e+'" does not exists in font family '+i.familyName+".")}function il(e){Ja.call(this,e)}il.prototype=Object.assign(Object.create(Ja.prototype),{constructor:il,load:function(t,n,r,i){var o=this,a=new es(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(t){var r;try{r=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),r=JSON.parse(t.substring(65,t.length-2))}var i=o.parse(r);n&&n(i)}),r,i)},parse:function(e){return new nl(e)}});var ol={getContext:function(){return void 0===tl&&(tl=new(window.AudioContext||window.webkitAudioContext)),tl},setContext:function(e){tl=e}};function al(e){Ja.call(this,e)}function sl(e,t,n){Vs.call(this,void 0,n);var r=(new Ye).set(e),i=(new Ye).set(t),o=new T(r.r,r.g,r.b),a=new T(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(s),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(l)}function ll(e,t){Vs.call(this,void 0,t);var n=(new Ye).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}al.prototype=Object.assign(Object.create(Ja.prototype),{constructor:al,load:function(t,n,r,i){var o=this,a=new es(o.manager);a.setResponseType("arraybuffer"),a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,(function(r){try{var a=r.slice(0);ol.getContext().decodeAudioData(a,(function(e){n(e)}))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)}}),sl.prototype=Object.assign(Object.create(Vs.prototype),{constructor:sl,isHemisphereLightProbe:!0,copy:function(e){return Vs.prototype.copy.call(this,e),this},toJSON:function(e){return Vs.prototype.toJSON.call(this,e)}}),ll.prototype=Object.assign(Object.create(Vs.prototype),{constructor:ll,isAmbientLightProbe:!0,copy:function(e){return Vs.prototype.copy.call(this,e),this},toJSON:function(e){return Vs.prototype.toJSON.call(this,e)}});var cl=new te,ul=new te;function hl(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Yt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Yt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}Object.assign(hl.prototype,{update:function(e){var t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;var n,r,i=e.projectionMatrix.clone(),o=t.eyeSep/2,a=o*t.near/t.focus,s=t.near*Math.tan(g.DEG2RAD*t.fov*.5)/t.zoom;ul.elements[12]=-o,cl.elements[12]=o,n=-s*t.aspect+a,r=s*t.aspect+a,i.elements[0]=2*t.near/(r-n),i.elements[8]=(r+n)/(r-n),this.cameraL.projectionMatrix.copy(i),n=-s*t.aspect-a,r=s*t.aspect-a,i.elements[0]=2*t.near/(r-n),i.elements[8]=(r+n)/(r-n),this.cameraR.projectionMatrix.copy(i)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ul),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(cl)}});var dl=function(){function e(e){this.autoStart=void 0===e||e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}var t=e.prototype;return t.start=function(){this.startTime=fl(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},t.stop=function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},t.getElapsedTime=function(){return this.getDelta(),this.elapsedTime},t.getDelta=function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=fl();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e},e}();function fl(){return("undefined"===typeof performance?Date:performance).now()}var pl=new T,ml=new M,gl=new T,vl=new T,yl=function(e){function t(){var t;return(t=e.call(this)||this).type="AudioListener",t.context=ol.getContext(),t.gain=t.context.createGain(),t.gain.connect(t.context.destination),t.filter=null,t.timeDelta=0,t._clock=new dl,t}s(t,e);var n=t.prototype;return n.getInput=function(){return this.gain},n.removeFilter=function(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},n.getFilter=function(){return this.filter},n.setFilter=function(e){return 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),this},n.getMasterVolume=function(){return this.gain.gain.value},n.setMasterVolume=function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},n.updateMatrixWorld=function(t){e.prototype.updateMatrixWorld.call(this,t);var n=this.context.listener,r=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(pl,ml,gl),vl.set(0,0,-1).applyQuaternion(ml),n.positionX){var i=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(pl.x,i),n.positionY.linearRampToValueAtTime(pl.y,i),n.positionZ.linearRampToValueAtTime(pl.z,i),n.forwardX.linearRampToValueAtTime(vl.x,i),n.forwardY.linearRampToValueAtTime(vl.y,i),n.forwardZ.linearRampToValueAtTime(vl.z,i),n.upX.linearRampToValueAtTime(r.x,i),n.upY.linearRampToValueAtTime(r.y,i),n.upZ.linearRampToValueAtTime(r.z,i)}else n.setPosition(pl.x,pl.y,pl.z),n.setOrientation(vl.x,vl.y,vl.z,r.x,r.y,r.z)},t}(Me),bl=function(e){function t(t){var n;return(n=e.call(this)||this).type="Audio",n.listener=t,n.context=t.context,n.gain=n.context.createGain(),n.gain.connect(t.getInput()),n.autoplay=!1,n.buffer=null,n.detune=0,n.loop=!1,n.loopStart=0,n.loopEnd=0,n.offset=0,n.duration=void 0,n.playbackRate=1,n.isPlaying=!1,n.hasPlaybackControl=!0,n.source=null,n.sourceType="empty",n._startedAt=0,n._progress=0,n._connected=!1,n.filters=[],n}s(t,e);var n=t.prototype;return n.getOutput=function(){return this.gain},n.setNodeSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this},n.setMediaElementSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this},n.setMediaStreamSource=function(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this},n.setBuffer=function(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this},n.play=function(e){if(void 0===e&&(e=0),!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){this._startedAt=this.context.currentTime+e;var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},n.pause=function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},n.stop=function(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},n.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._connected=!0,this},n.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._connected=!1,this},n.getFilters=function(){return this.filters},n.setFilters=function(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this},n.setDetune=function(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this},n.getDetune=function(){return this.detune},n.getFilter=function(){return this.getFilters()[0]},n.setFilter=function(e){return this.setFilters(e?[e]:[])},n.setPlaybackRate=function(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")},n.getPlaybackRate=function(){return this.playbackRate},n.onEnded=function(){this.isPlaying=!1},n.getLoop=function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},n.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.")},n.setLoopStart=function(e){return this.loopStart=e,this},n.setLoopEnd=function(e){return this.loopEnd=e,this},n.getVolume=function(){return this.gain.gain.value},n.setVolume=function(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this},t}(Me),wl=new T,xl=new M,_l=new T,El=new T,Al=function(e){function t(t){var n;return(n=e.call(this,t)||this).panner=n.context.createPanner(),n.panner.panningModel="HRTF",n.panner.connect(n.gain),n}s(t,e);var n=t.prototype;return n.getOutput=function(){return this.panner},n.getRefDistance=function(){return this.panner.refDistance},n.setRefDistance=function(e){return this.panner.refDistance=e,this},n.getRolloffFactor=function(){return this.panner.rolloffFactor},n.setRolloffFactor=function(e){return this.panner.rolloffFactor=e,this},n.getDistanceModel=function(){return this.panner.distanceModel},n.setDistanceModel=function(e){return this.panner.distanceModel=e,this},n.getMaxDistance=function(){return this.panner.maxDistance},n.setMaxDistance=function(e){return this.panner.maxDistance=e,this},n.setDirectionalCone=function(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this},n.updateMatrixWorld=function(t){if(e.prototype.updateMatrixWorld.call(this,t),!0!==this.hasPlaybackControl||!1!==this.isPlaying){this.matrixWorld.decompose(wl,xl,_l),El.set(0,0,1).applyQuaternion(xl);var n=this.panner;if(n.positionX){var r=this.context.currentTime+this.listener.timeDelta;n.positionX.linearRampToValueAtTime(wl.x,r),n.positionY.linearRampToValueAtTime(wl.y,r),n.positionZ.linearRampToValueAtTime(wl.z,r),n.orientationX.linearRampToValueAtTime(El.x,r),n.orientationY.linearRampToValueAtTime(El.y,r),n.orientationZ.linearRampToValueAtTime(El.z,r)}else n.setPosition(wl.x,wl.y,wl.z),n.setOrientation(El.x,El.y,El.z)}},t}(bl),Sl=function(){function e(e,t){void 0===t&&(t=2048),this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}var t=e.prototype;return t.getFrequencyData=function(){return this.analyser.getByteFrequencyData(this.data),this.data},t.getAverageFrequency=function(){for(var e=0,t=this.getFrequencyData(),n=0;n<t.length;n++)e+=t[n];return e/t.length},e}();function Ml(e,t,n){var r,i,o;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,o=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,o=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,o=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=o,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}Object.assign(Ml.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},accumulateAdditive:function(e){var t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e},apply:function(e){var t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,o=this.cumulativeWeightAdditive,a=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){var s=t*this._origIndex;this._mixBufferRegion(n,r,s,1-i,t)}o>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(var l=t,c=t+t;l!==c;++l)if(n[l]!==n[l+t]){a.setValue(n,r);break}},saveOriginalState:function(){var e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(var i=n,o=r;i!==o;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0},restoreOriginalState:function(){var e=3*this.valueSize;this.binding.setValue(this.buffer,e)},_setAdditiveIdentityNumeric:function(){for(var e=this._addIndex*this.valueSize,t=e+this.valueSize,n=e;n<t;n++)this.buffer[n]=0},_setAdditiveIdentityQuaternion:function(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1},_setAdditiveIdentityOther:function(){for(var e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize,n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]},_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){M.slerpFlat(e,t,e,t,e,n,r)},_slerpAdditive:function(e,t,n,r,i){var o=this._workIndex*i;M.multiplyQuaternionsFlat(e,o,e,t,e,n),M.slerpFlat(e,t,e,t,e,o,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}},_lerpAdditive:function(e,t,n,r,i){for(var o=0;o!==i;++o){var a=t+o;e[a]=e[a]+e[n+o]*r}}});var Tl=new RegExp("[\\[\\]\\.:\\/]","g"),Cl="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Ol=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Rl=/(WCOD+)?/.source.replace("WCOD",Cl),kl=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Pl=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ll=new RegExp("^"+Ol+Rl+kl+Pl+"$"),Dl=["material","materials","bones"];function Il(e,t,n){var r=n||Nl.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}function Nl(e,t,n){this.path=t,this.parsedPath=n||Nl.parseTrackName(t),this.node=Nl.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e}function jl(){this.uuid=g.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var e={};this._indicesByUUID=e;for(var t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}Object.assign(Il.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(Nl,{Composite:Il,create:function(e,t,n){return e&&e.isAnimationObjectGroup?new Nl.Composite(e,t,n):new Nl(e,t,n)},sanitizeNodeName:function(e){return e.replace(/\s/g,"_").replace(Tl,"")},parseTrackName:function(e){var t=Ll.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!==Dl.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||"."===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(n){for(var r=0;r<n.length;r++){var i=n[r];if(i.name===t||i.uuid===t)return i;var o=e(i.children);if(o)return o}return null}(e.children);if(r)return r}return null}}),Object.assign(Nl.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=Nl.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 l=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);var c=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)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}c=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=i}else void 0!==s.fromArray&&void 0!==s.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(c=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=r;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][l]}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}}),Object.assign(Nl.prototype,{_getValue_unbound:Nl.prototype.getValue,_setValue_unbound:Nl.prototype.setValue}),Object.assign(jl.prototype,{isAnimationObjectGroup:!0,add:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,o=i.length,a=void 0,s=e.length,l=this.nCachedObjects_,c=0,u=arguments.length;c!==u;++c){var h=arguments[c],d=h.uuid,f=t[d];if(void 0===f){f=s++,t[d]=f,e.push(h);for(var p=0,m=o;p!==m;++p)i[p].push(new Nl(h,n[p],r[p]))}else if(f<l){a=e[f];var g=--l,v=e[g];t[v.uuid]=f,e[f]=v,t[d]=g,e[g]=h;for(var y=0,b=o;y!==b;++y){var w=i[y],x=w[g],_=w[f];w[f]=x,void 0===_&&(_=new Nl(h,n[y],r[y])),w[g]=_}}else e[f]!==a&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l},remove:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,o=0,a=arguments.length;o!==a;++o){var s=arguments[o],l=s.uuid,c=t[l];if(void 0!==c&&c>=i){var u=i++,h=e[u];t[h.uuid]=c,e[c]=h,t[l]=u,e[u]=s;for(var d=0,f=r;d!==f;++d){var p=n[d],m=p[u],g=p[c];p[c]=m,p[u]=g}}}this.nCachedObjects_=i},uncache:function(){for(var e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,i=this.nCachedObjects_,o=e.length,a=0,s=arguments.length;a!==s;++a){var l=arguments[a],c=l.uuid,u=t[c];if(void 0!==u)if(delete t[c],u<i){var h=--i,d=e[h],f=--o,p=e[f];t[d.uuid]=u,e[u]=d,t[p.uuid]=h,e[h]=p,e.pop();for(var m=0,g=r;m!==g;++m){var v=n[m],y=v[h],b=v[f];v[u]=y,v[h]=b,v.pop()}}else{var w=--o,x=e[w];w>0&&(t[x.uuid]=u),e[u]=x,e.pop();for(var _=0,E=r;_!==E;++_){var A=n[_];A[u]=A[w],A.pop()}}}this.nCachedObjects_=i},subscribe_:function(e,t){var n=this._bindingsIndicesByPath,r=n[e],i=this._bindings;if(void 0!==r)return i[r];var o=this._paths,a=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),a.push(t),i.push(u);for(var h=c,d=s.length;h!==d;++h){var f=s[h];u[h]=new Nl(f,e,t)}return u},unsubscribe_:function(e){var t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){var r=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length-1,s=o[a];t[e[a]]=n,o[n]=s,o.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}});var Bl=function(){function e(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=t.blendMode),this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;for(var i=t.tracks,o=i.length,a=new Array(o),s={endingStart:2400,endingEnd:2400},l=0;l!==o;++l){var c=i[l].createInterpolant(null);a[l]=c,c.settings=s}this._interpolantSettings=s,this._interpolants=a,this._propertyBindings=new Array(o),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}var t=e.prototype;return t.play=function(){return this._mixer._activateAction(this),this},t.stop=function(){return this._mixer._deactivateAction(this),this.reset()},t.reset=function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},t.isRunning=function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},t.isScheduled=function(){return this._mixer._isActiveAction(this)},t.startAt=function(e){return this._startTime=e,this},t.setLoop=function(e,t){return this.loop=e,this.repetitions=t,this},t.setEffectiveWeight=function(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()},t.getEffectiveWeight=function(){return this._effectiveWeight},t.fadeIn=function(e){return this._scheduleFading(e,0,1)},t.fadeOut=function(e){return this._scheduleFading(e,1,0)},t.crossFadeFrom=function(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){var r=this._clip.duration,i=e._clip.duration,o=i/r,a=r/i;e.warp(1,o,t),this.warp(a,1,t)}return this},t.crossFadeTo=function(e,t,n){return e.crossFadeFrom(this,t,n)},t.stopFading=function(){var e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},t.setEffectiveTimeScale=function(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()},t.getEffectiveTimeScale=function(){return this._effectiveTimeScale},t.setDuration=function(e){return this.timeScale=this._clip.duration/e,this.stopWarping()},t.syncWith=function(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()},t.halt=function(e){return this.warp(this._effectiveTimeScale,0,e)},t.warp=function(e,t,n){var r=this._mixer,i=r.time,o=this.timeScale,a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);var s=a.parameterPositions,l=a.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/o,l[1]=t/o,this},t.stopWarping=function(){var e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this},t.getMixer=function(){return this._mixer},t.getClip=function(){return this._clip},t.getRoot=function(){return this._localRoot||this._mixer._root},t._update=function(e,t,n,r){if(this.enabled){var i=this._startTime;if(null!==i){var o=(e-i)*n;if(o<0||0===n)return;this._startTime=null,t=n*o}t*=this._updateTimeScale(e);var a=this._updateTime(t),s=this._updateWeight(e);if(s>0){var l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case 2501:for(var u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulateAdditive(s);break;case 2500:default:for(var d=0,f=l.length;d!==f;++d)l[d].evaluate(a),c[d].accumulate(r,s)}}}else this._updateWeight(e)},t._updateWeight=function(e){var t=0;if(this.enabled){t=this.weight;var n=this._weightInterpolant;if(null!==n){var r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t},t._updateTimeScale=function(e){var t=0;if(!this.paused){t=this.timeScale;var n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t},t._updateTime=function(e){var t=this._clip.duration,n=this.loop,r=this.time+e,i=this._loopCount,o=2202===n;if(0===e)return-1===i?r:o&&1===(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){var a=Math.floor(r/t);r-=t*a,i+=Math.abs(a);var s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){var l=e<0;this._setEndings(l,!l,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&1===(1&i))return t-r}return r},t._setEndings=function(e,t,n){var r=this._interpolantSettings;n?(r.endingStart=2401,r.endingEnd=2401):(r.endingStart=e?this.zeroSlopeAtStart?2401:2400:2402,r.endingEnd=t?this.zeroSlopeAtEnd?2401:2400:2402)},t._scheduleFading=function(e,t,n){var r=this._mixer,i=r.time,o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);var a=o.parameterPositions,s=o.sampleValues;return a[0]=i,s[0]=t,a[1]=i+e,s[1]=n,this},e}();function Fl(e){this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}Fl.prototype=Object.assign(Object.create(h.prototype),{constructor:Fl,_bindAction:function(e,t){var n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,a=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName,c=l[s];void 0===c&&(c={},l[s]=c);for(var u=0;u!==i;++u){var h=r[u],d=h.name,f=c[d];if(void 0!==f)o[u]=f;else{if(void 0!==(f=o[u])){null===f._cacheIndex&&(++f.referenceCount,this._addInactiveBinding(f,s,d));continue}var p=t&&t._propertyBindings[u].binding.parsedPath;++(f=new Ml(Nl.create(n,d,p),h.ValueTypeName,h.getValueSize())).referenceCount,this._addInactiveBinding(f,s,d),o[u]=f}a[u].resultBuffer=f.buffer}},_activateAction:function(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){var t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}for(var i=e._propertyBindings,o=0,a=i.length;o!==a;++o){var s=i[o];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}},_deactivateAction:function(e){if(this._isActiveAction(e)){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0===--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}},_isActiveAction:function(e){var t=e._cacheIndex;return null!==t&&t<this._nActiveActions},_addInactiveAction:function(e,t,n){var r=this._actions,i=this._actionsByClip,o=i[t];if(void 0===o)o={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=o;else{var a=o.knownActions;e._byClipCacheIndex=a.length,a.push(e)}e._cacheIndex=r.length,r.push(e),o.actionByRoot[n]=e},_removeInactiveAction:function(e){var t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;var i=e._clip.uuid,o=this._actionsByClip,a=o[i],s=a.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null,delete a.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete o[i],this._removeInactiveBindingsForAction(e)},_removeInactiveBindingsForAction:function(e){for(var t=e._propertyBindings,n=0,r=t.length;n!==r;++n){var i=t[n];0===--i.referenceCount&&this._removeInactiveBinding(i)}},_lendAction:function(e){var t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackAction:function(e){var t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_addInactiveBinding:function(e,t,n){var r=this._bindingsByRootAndName,i=this._bindings,o=r[t];void 0===o&&(o={},r[t]=o),o[n]=e,e._cacheIndex=i.length,i.push(e)},_removeInactiveBinding:function(e){var t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,o=this._bindingsByRootAndName,a=o[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete a[i],0===Object.keys(a).length&&delete o[r]},_lendBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_takeBackBinding:function(e){var t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i},_lendControlInterpolant:function(){var e=this._controlInterpolants,t=this._nActiveControlInterpolants++,n=e[t];return void 0===n&&((n=new ja(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=t,e[t]=n),n},_takeBackControlInterpolant:function(e){var t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(e,t,n){var r=t||this._root,i=r.uuid,o="string"===typeof e?Xa.findByName(r,e):e,a=null!==o?o.uuid:e,s=this._actionsByClip[a],l=null;if(void 0===n&&(n=null!==o?o.blendMode:2500),void 0!==s){var c=s.actionByRoot[i];if(void 0!==c&&c.blendMode===n)return c;l=s.knownActions[0],null===o&&(o=l._clip)}if(null===o)return null;var u=new Bl(this,o,t,n);return this._bindAction(u,l),this._addInactiveAction(u,a,i),u},existingAction:function(e,t){var n=t||this._root,r=n.uuid,i="string"===typeof e?Xa.findByName(n,e):e,o=i?i.uuid:e,a=this._actionsByClip[o];return void 0!==a&&a.actionByRoot[r]||null},stopAllAction:function(){for(var e=this._actions,t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this},update:function(e){e*=this.timeScale;for(var t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1,a=0;a!==n;++a)t[a]._update(r,e,i,o);for(var s=this._bindings,l=this._nActiveBindings,c=0;c!==l;++c)s[c].apply(o);return this},setTime:function(e){this.time=0;for(var t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)},getRoot:function(){return this._root},uncacheClip:function(e){var t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){for(var o=i.knownActions,a=0,s=o.length;a!==s;++a){var l=o[a];this._deactivateAction(l);var c=l._cacheIndex,u=t[t.length-1];l._cacheIndex=null,l._byClipCacheIndex=null,u._cacheIndex=c,t[c]=u,t.pop(),this._removeInactiveBindingsForAction(l)}delete r[n]}},uncacheRoot:function(e){var t=e.uuid,n=this._actionsByClip;for(var r in n){var i=n[r].actionByRoot[t];void 0!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}var o=this._bindingsByRootAndName[t];if(void 0!==o)for(var a in o){var s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(e,t){var n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}});var zl=function(){function e(e){"string"===typeof e&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),e=arguments[1]),this.value=e}return e.prototype.clone=function(){return new e(void 0===this.value.clone?this.value:this.value.clone())},e}();function Hl(e,t,n){vi.call(this,e,t),this.meshPerAttribute=n||1}function Ul(e,t,n,r,i){this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}function Vl(e,t,n,r){this.ray=new ee(e,t),this.near=n||0,this.far=r||1/0,this.camera=null,this.layers=new de,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}function Gl(e,t){return e.distance-t.distance}function Wl(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r)for(var i=e.children,o=0,a=i.length;o<a;o++)Wl(i[o],t,n,!0)}Hl.prototype=Object.assign(Object.create(vi.prototype),{constructor:Hl,isInstancedInterleavedBuffer:!0,copy:function(e){return vi.prototype.copy.call(this,e),this.meshPerAttribute=e.meshPerAttribute,this},clone:function(e){var t=vi.prototype.clone.call(this,e);return t.meshPerAttribute=this.meshPerAttribute,t},toJSON:function(e){var t=vi.prototype.toJSON.call(this,e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}),Object.defineProperty(Ul.prototype,"needsUpdate",{set:function(e){!0===e&&this.version++}}),Object.assign(Ul.prototype,{isGLBufferAttribute:!0,setBuffer:function(e){return this.buffer=e,this},setType:function(e,t){return this.type=e,this.elementSize=t,this},setItemSize:function(e){return this.itemSize=e,this},setCount:function(e){return this.count=e,this}}),Object.assign(Vl.prototype,{set:function(e,t){this.ray.set(e,t)},setFromCamera:function(e,t){t&&t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t&&t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)},intersectObject:function(e,t,n){var r=n||[];return Wl(e,this,r,t),r.sort(Gl),r},intersectObjects:function(e,t,n){var r=n||[];if(!1===Array.isArray(e))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),r;for(var i=0,o=e.length;i<o;i++)Wl(e[i],this,r,t);return r.sort(Gl),r}});var ql=function(){function e(e,t,n){return void 0===e&&(e=1),void 0===t&&(t=0),void 0===n&&(n=0),this.radius=e,this.phi=t,this.theta=n,this}var t=e.prototype;return t.set=function(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this},t.makeSafe=function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},t.setFromVector3=function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},t.setFromCartesianCoords=function(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(g.clamp(t/this.radius,-1,1))),this},e}(),Xl=function(){function e(e,t,n){return this.radius=void 0!==e?e:1,this.theta=void 0!==t?t:0,this.y=void 0!==n?n:0,this}var t=e.prototype;return t.set=function(e,t,n){return this.radius=e,this.theta=t,this.y=n,this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this},t.setFromVector3=function(e){return this.setFromCartesianCoords(e.x,e.y,e.z)},t.setFromCartesianCoords=function(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this},e}(),Yl=new v,Kl=function(){function e(e,t){Object.defineProperty(this,"isBox2",{value:!0}),this.min=void 0!==e?e:new v(1/0,1/0),this.max=void 0!==t?t:new v(-1/0,-1/0)}var t=e.prototype;return t.set=function(e,t){return this.min.copy(e),this.max.copy(t),this},t.setFromPoints=function(e){this.makeEmpty();for(var t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this},t.setFromCenterAndSize=function(e,t){var n=Yl.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.min.copy(e.min),this.max.copy(e.max),this},t.makeEmpty=function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},t.isEmpty=function(){return this.max.x<this.min.x||this.max.y<this.min.y},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Box2: .getCenter() target is now required"),e=new v),this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)},t.getSize=function(e){return void 0===e&&(console.warn("THREE.Box2: .getSize() target is now required"),e=new v),this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)},t.expandByPoint=function(e){return this.min.min(e),this.max.max(e),this},t.expandByVector=function(e){return this.min.sub(e),this.max.add(e),this},t.expandByScalar=function(e){return this.min.addScalar(-e),this.max.addScalar(e),this},t.containsPoint=function(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)},t.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},t.getParameter=function(e,t){return void 0===t&&(console.warn("THREE.Box2: .getParameter() target is now required"),t=new v),t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))},t.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)},t.clampPoint=function(e,t){return void 0===t&&(console.warn("THREE.Box2: .clampPoint() target is now required"),t=new v),t.copy(e).clamp(this.min,this.max)},t.distanceToPoint=function(e){return Yl.copy(e).clamp(this.min,this.max).sub(e).length()},t.intersect=function(e){return this.min.max(e.min),this.max.min(e.max),this},t.union=function(e){return this.min.min(e.min),this.max.max(e.max),this},t.translate=function(e){return this.min.add(e),this.max.add(e),this},t.equals=function(e){return e.min.equals(this.min)&&e.max.equals(this.max)},e}(),Ql=new T,Zl=new T,Jl=function(){function e(e,t){this.start=void 0!==e?e:new T,this.end=void 0!==t?t:new T}var t=e.prototype;return t.set=function(e,t){return this.start.copy(e),this.end.copy(t),this},t.clone=function(){return(new this.constructor).copy(this)},t.copy=function(e){return this.start.copy(e.start),this.end.copy(e.end),this},t.getCenter=function(e){return void 0===e&&(console.warn("THREE.Line3: .getCenter() target is now required"),e=new T),e.addVectors(this.start,this.end).multiplyScalar(.5)},t.delta=function(e){return void 0===e&&(console.warn("THREE.Line3: .delta() target is now required"),e=new T),e.subVectors(this.end,this.start)},t.distanceSq=function(){return this.start.distanceToSquared(this.end)},t.distance=function(){return this.start.distanceTo(this.end)},t.at=function(e,t){return void 0===t&&(console.warn("THREE.Line3: .at() target is now required"),t=new T),this.delta(t).multiplyScalar(e).add(this.start)},t.closestPointToPointParameter=function(e,t){Ql.subVectors(e,this.start),Zl.subVectors(this.end,this.start);var n=Zl.dot(Zl),r=Zl.dot(Ql)/n;return t&&(r=g.clamp(r,0,1)),r},t.closestPointToPoint=function(e,t,n){var r=this.closestPointToPointParameter(e,t);return void 0===n&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),n=new T),this.delta(n).multiplyScalar(r).add(this.start)},t.applyMatrix4=function(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this},t.equals=function(e){return e.start.equals(this.start)&&e.end.equals(this.end)},e}();function $l(e){Me.call(this),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}$l.prototype=Object.create(Me.prototype),$l.prototype.constructor=$l,$l.prototype.isImmediateRenderObject=!0;var ec=new T,tc=function(e){function t(t,n){var r;(r=e.call(this)||this).light=t,r.light.updateMatrixWorld(),r.matrix=t.matrixWorld,r.matrixAutoUpdate=!1,r.color=n;for(var i=new _t,o=[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],a=0,s=1;a<32;a++,s++){var l=a/32*Math.PI*2,c=s/32*Math.PI*2;o.push(Math.cos(l),Math.sin(l),1,Math.cos(c),Math.sin(c),1)}i.setAttribute("position",new ut(o,3));var u=new eo({fog:!1,toneMapped:!1});return r.cone=new co(i,u),r.add(r.cone),r.update(),r}s(t,e);var n=t.prototype;return n.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},n.update=function(){this.light.updateMatrixWorld();var e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),ec.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(ec),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)},t}(Me),nc=new T,rc=new te,ic=new te,oc=function(e){function t(t){for(var n,r=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}(t),i=new _t,o=[],a=[],s=new Ye(0,0,1),l=new Ye(0,1,0),c=0;c<r.length;c++){var u=r[c];u.parent&&u.parent.isBone&&(o.push(0,0,0),o.push(0,0,0),a.push(s.r,s.g,s.b),a.push(l.r,l.g,l.b))}i.setAttribute("position",new ut(o,3)),i.setAttribute("color",new ut(a,3));var h=new eo({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});return(n=e.call(this,i,h)||this).type="SkeletonHelper",n.isSkeletonHelper=!0,n.root=t,n.bones=r,n.matrix=t.matrixWorld,n.matrixAutoUpdate=!1,n}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=this.bones,r=this.geometry,i=r.getAttribute("position");ic.copy(this.root.matrixWorld).invert();for(var o=0,a=0;o<n.length;o++){var s=n[o];s.parent&&s.parent.isBone&&(rc.multiplyMatrices(ic,s.matrixWorld),nc.setFromMatrixPosition(rc),i.setXYZ(a,nc.x,nc.y,nc.z),rc.multiplyMatrices(ic,s.parent.matrixWorld),nc.setFromMatrixPosition(rc),i.setXYZ(a+1,nc.x,nc.y,nc.z),a+=2)}r.getAttribute("position").needsUpdate=!0,e.prototype.updateMatrixWorld.call(this,t)},t}(co),ac=function(e){function t(t,n,r){var i,o=new ma(n,4,2),a=new Je({wireframe:!0,fog:!1,toneMapped:!1});return(i=e.call(this,o,a)||this).light=t,i.light.updateMatrixWorld(),i.color=r,i.type="PointLightHelper",i.matrix=i.light.matrixWorld,i.matrixAutoUpdate=!1,i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.geometry.dispose(),this.material.dispose()},n.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},t}(zt),sc=new T,lc=new Ye,cc=new Ye,uc=function(e){function t(t,n,r){var i;(i=e.call(this)||this).light=t,i.light.updateMatrixWorld(),i.matrix=t.matrixWorld,i.matrixAutoUpdate=!1,i.color=r;var o=new ha(n);o.rotateY(.5*Math.PI),i.material=new Je({wireframe:!0,fog:!1,toneMapped:!1}),void 0===i.color&&(i.material.vertexColors=!0);var a=o.getAttribute("position"),s=new Float32Array(3*a.count);return o.setAttribute("color",new tt(s,3)),i.add(new zt(o,i.material)),i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},n.update=function(){var e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var t=e.geometry.getAttribute("color");lc.copy(this.light.color),cc.copy(this.light.groundColor);for(var n=0,r=t.count;n<r;n++){var i=n<r/2?lc:cc;t.setXYZ(n,i.r,i.g,i.b)}t.needsUpdate=!0}e.lookAt(sc.setFromMatrixPosition(this.light.matrixWorld).negate())},t}(Me),hc=function(e){function t(t,n,r,i){var o;void 0===t&&(t=10),void 0===n&&(n=10),void 0===r&&(r=4473924),void 0===i&&(i=8947848),r=new Ye(r),i=new Ye(i);for(var a=n/2,s=t/n,l=t/2,c=[],u=[],h=0,d=0,f=-l;h<=n;h++,f+=s){c.push(-l,0,f,l,0,f),c.push(f,0,-l,f,0,l);var p=h===a?r:i;p.toArray(u,d),d+=3,p.toArray(u,d),d+=3,p.toArray(u,d),d+=3,p.toArray(u,d),d+=3}var m=new _t;m.setAttribute("position",new ut(c,3)),m.setAttribute("color",new ut(u,3));var g=new eo({vertexColors:!0,toneMapped:!1});return(o=e.call(this,m,g)||this).type="GridHelper",o}return s(t,e),t}(co),dc=function(e){function t(t,n,r,i,o,a){var s;void 0===t&&(t=10),void 0===n&&(n=16),void 0===r&&(r=8),void 0===i&&(i=64),void 0===o&&(o=4473924),void 0===a&&(a=8947848),o=new Ye(o),a=new Ye(a);for(var l=[],c=[],u=0;u<=n;u++){var h=u/n*(2*Math.PI),d=Math.sin(h)*t,f=Math.cos(h)*t;l.push(0,0,0),l.push(d,0,f);var p=1&u?o:a;c.push(p.r,p.g,p.b),c.push(p.r,p.g,p.b)}for(var m=0;m<=r;m++)for(var g=1&m?o:a,v=t-t/r*m,y=0;y<i;y++){var b=y/i*(2*Math.PI),w=Math.sin(b)*v,x=Math.cos(b)*v;l.push(w,0,x),c.push(g.r,g.g,g.b),b=(y+1)/i*(2*Math.PI),w=Math.sin(b)*v,x=Math.cos(b)*v,l.push(w,0,x),c.push(g.r,g.g,g.b)}var _=new _t;_.setAttribute("position",new ut(l,3)),_.setAttribute("color",new ut(c,3));var E=new eo({vertexColors:!0,toneMapped:!1});return(s=e.call(this,_,E)||this).type="PolarGridHelper",s}return s(t,e),t}(co),fc=new T,pc=new T,mc=new T,gc=function(e){function t(t,n,r){var i;(i=e.call(this)||this).light=t,i.light.updateMatrixWorld(),i.matrix=t.matrixWorld,i.matrixAutoUpdate=!1,i.color=r,void 0===n&&(n=1);var o=new _t;o.setAttribute("position",new ut([-n,n,0,n,n,0,n,-n,0,-n,-n,0,-n,n,0],3));var a=new eo({fog:!1,toneMapped:!1});return i.lightPlane=new ao(o,a),i.add(i.lightPlane),(o=new _t).setAttribute("position",new ut([0,0,0,0,0,1],3)),i.targetLine=new ao(o,a),i.add(i.targetLine),i.update(),i}s(t,e);var n=t.prototype;return n.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},n.update=function(){fc.setFromMatrixPosition(this.light.matrixWorld),pc.setFromMatrixPosition(this.light.target.matrixWorld),mc.subVectors(pc,fc),this.lightPlane.lookAt(pc),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(pc),this.targetLine.scale.z=mc.length()},t}(Me),vc=new T,yc=new Xt,bc=function(e){function t(t){var n,r=new _t,i=new eo({color:16777215,vertexColors:!0,toneMapped:!1}),o=[],a=[],s={},l=new Ye(16755200),c=new Ye(16711680),u=new Ye(43775),h=new Ye(16777215),d=new Ye(3355443);function f(e,t,n){p(e,n),p(t,n)}function p(e,t){o.push(0,0,0),a.push(t.r,t.g,t.b),void 0===s[e]&&(s[e]=[]),s[e].push(o.length/3-1)}return f("n1","n2",l),f("n2","n4",l),f("n4","n3",l),f("n3","n1",l),f("f1","f2",l),f("f2","f4",l),f("f4","f3",l),f("f3","f1",l),f("n1","f1",l),f("n2","f2",l),f("n3","f3",l),f("n4","f4",l),f("p","n1",c),f("p","n2",c),f("p","n3",c),f("p","n4",c),f("u1","u2",u),f("u2","u3",u),f("u3","u1",u),f("c","t",h),f("p","c",d),f("cn1","cn2",d),f("cn3","cn4",d),f("cf1","cf2",d),f("cf3","cf4",d),r.setAttribute("position",new ut(o,3)),r.setAttribute("color",new ut(a,3)),(n=e.call(this,r,i)||this).type="CameraHelper",n.camera=t,n.camera.updateProjectionMatrix&&n.camera.updateProjectionMatrix(),n.matrix=t.matrixWorld,n.matrixAutoUpdate=!1,n.pointMap=s,n.update(),n}return s(t,e),t.prototype.update=function(){var e=this.geometry,t=this.pointMap;yc.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),wc("c",t,e,yc,0,0,-1),wc("t",t,e,yc,0,0,1),wc("n1",t,e,yc,-1,-1,-1),wc("n2",t,e,yc,1,-1,-1),wc("n3",t,e,yc,-1,1,-1),wc("n4",t,e,yc,1,1,-1),wc("f1",t,e,yc,-1,-1,1),wc("f2",t,e,yc,1,-1,1),wc("f3",t,e,yc,-1,1,1),wc("f4",t,e,yc,1,1,1),wc("u1",t,e,yc,.7,1.1,-1),wc("u2",t,e,yc,-.7,1.1,-1),wc("u3",t,e,yc,0,2,-1),wc("cf1",t,e,yc,-1,0,1),wc("cf2",t,e,yc,1,0,1),wc("cf3",t,e,yc,0,-1,1),wc("cf4",t,e,yc,0,1,1),wc("cn1",t,e,yc,-1,0,-1),wc("cn2",t,e,yc,1,0,-1),wc("cn3",t,e,yc,0,-1,-1),wc("cn4",t,e,yc,0,1,-1),e.getAttribute("position").needsUpdate=!0},t}(co);function wc(e,t,n,r,i,o,a){vc.set(i,o,a).unproject(r);var s=t[e];if(void 0!==s)for(var l=n.getAttribute("position"),c=0,u=s.length;c<u;c++)l.setXYZ(s[c],vc.x,vc.y,vc.z)}var xc,_c,Ec,Ac=new R,Sc=function(e){function t(t,n){var r;void 0===n&&(n=16776960);var i=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]),o=new Float32Array(24),a=new _t;return a.setIndex(new tt(i,1)),a.setAttribute("position",new tt(o,3)),(r=e.call(this,a,new eo({color:n,toneMapped:!1}))||this).object=t,r.type="BoxHelper",r.matrixAutoUpdate=!1,r.update(),r}s(t,e);var n=t.prototype;return n.update=function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&Ac.setFromObject(this.object),!Ac.isEmpty()){var t=Ac.min,n=Ac.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}},n.setFromObject=function(e){return this.object=e,this.update(),this},n.copy=function(e){return co.prototype.copy.call(this,e),this.object=e.object,this},t}(co),Mc=function(e){function t(t,n){var r;void 0===n&&(n=16776960);var i=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]),o=new _t;return o.setIndex(new tt(i,1)),o.setAttribute("position",new ut([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)),(r=e.call(this,o,new eo({color:n,toneMapped:!1}))||this).box=t,r.type="Box3Helper",r.geometry.computeBoundingSphere(),r}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=this.box;n.isEmpty()||(n.getCenter(this.position),n.getSize(this.scale),this.scale.multiplyScalar(.5),e.prototype.updateMatrixWorld.call(this,t))},t}(co),Tc=function(e){function t(t,n,r){var i;void 0===n&&(n=1),void 0===r&&(r=16776960);var o=r,a=new _t;a.setAttribute("position",new ut([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)),a.computeBoundingSphere(),(i=e.call(this,a,new eo({color:o,toneMapped:!1}))||this).type="PlaneHelper",i.plane=t,i.size=n;var s=new _t;return s.setAttribute("position",new ut([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),s.computeBoundingSphere(),i.add(new zt(s,new Je({color:o,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1}))),i}return s(t,e),t.prototype.updateMatrixWorld=function(t){var n=-this.plane.constant;Math.abs(n)<1e-8&&(n=1e-8),this.scale.set(.5*this.size,.5*this.size,n),this.children[0].material.side=n<0?1:0,this.lookAt(this.plane.normal),e.prototype.updateMatrixWorld.call(this,t)},t}(ao),Cc=new T,Oc=function(e){function t(t,n,r,i,o,a){var s;return(s=e.call(this)||this).type="ArrowHelper",void 0===t&&(t=new T(0,0,1)),void 0===n&&(n=new T(0,0,0)),void 0===r&&(r=1),void 0===i&&(i=16776960),void 0===o&&(o=.2*r),void 0===a&&(a=.2*o),void 0===xc&&((xc=new _t).setAttribute("position",new ut([0,0,0,0,1,0],3)),(_c=new Ao(0,.5,1,5,1)).translate(0,-.5,0)),s.position.copy(n),s.line=new ao(xc,new eo({color:i,toneMapped:!1})),s.line.matrixAutoUpdate=!1,s.add(s.line),s.cone=new zt(_c,new Je({color:i,toneMapped:!1})),s.cone.matrixAutoUpdate=!1,s.add(s.cone),s.setDirection(t),s.setLength(r,o,a),s}s(t,e);var n=t.prototype;return n.setDirection=function(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Cc.set(e.z,0,-e.x).normalize();var t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Cc,t)}},n.setLength=function(e,t,n){void 0===t&&(t=.2*e),void 0===n&&(n=.2*t),this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()},n.setColor=function(e){this.line.material.color.set(e),this.cone.material.color.set(e)},n.copy=function(t){return e.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},t}(Me),Rc=function(e){function t(t){var n;void 0===t&&(t=1);var r=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],i=new _t;i.setAttribute("position",new ut(r,3)),i.setAttribute("color",new ut([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var o=new eo({vertexColors:!0,toneMapped:!1});return(n=e.call(this,i,o)||this).type="AxesHelper",n}return s(t,e),t}(co),kc=new Float32Array(1),Pc=new Int32Array(kc.buffer),Lc={toHalfFloat:function(e){kc[0]=e;var t=Pc[0],n=t>>16&32768,r=t>>12&2047,i=t>>23&255;return i<103?n:i>142?(n|=31744,n|=(255==i?0:1)&&8388607&t):i<113?n|=((r|=2048)>>114-i)+(r>>113-i&1):(n|=i-112<<10|r>>1,n+=1&r)}},Dc=Math.pow(2,8),Ic=[.125,.215,.35,.446,.526,.582],Nc=5+Ic.length,jc=((Ec={})[3e3]=0,Ec[3001]=1,Ec[3002]=2,Ec[3004]=3,Ec[3005]=4,Ec[3006]=5,Ec[3007]=6,Ec),Bc=new Je({side:1,depthWrite:!1,depthTest:!1}),Fc=new zt(new Ut,Bc),zc=new js,Hc=$c(),Uc=Hc._lodPlanes,Vc=Hc._sizeLods,Gc=Hc._sigmas,Wc=new Ye,qc=null,Xc=(1+Math.sqrt(5))/2,Yc=1/Xc,Kc=[new T(1,1,1),new T(-1,1,1),new T(1,1,-1),new T(-1,1,-1),new T(0,Xc,Yc),new T(0,Xc,-Yc),new T(Yc,0,Xc),new T(-Yc,0,Xc),new T(Xc,Yc,0),new T(-Xc,Yc,0)];function Qc(e){var t=Math.max(e.r,e.g,e.b),n=Math.min(Math.max(Math.ceil(Math.log2(t)),-128),127);return e.multiplyScalar(Math.pow(2,-n)),(n+128)/255}var Zc=function(){function e(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=function(e){var t=new Float32Array(e),n=new T(0,1,0);return new Aa({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:n},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(20),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}var t=e.prototype;return t.fromScene=function(e,t,n,r){void 0===t&&(t=0),void 0===n&&(n=.1),void 0===r&&(r=100),qc=this._renderer.getRenderTarget();var i=this._allocateTargets();return this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i},t.fromEquirectangular=function(e){return this._fromTexture(e)},t.fromCubemap=function(e){return this._fromTexture(e)},t.compileCubemapShader=function(){null===this._cubemapShader&&(this._cubemapShader=ru(),this._compileMaterial(this._cubemapShader))},t.compileEquirectangularShader=function(){null===this._equirectShader&&(this._equirectShader=nu(),this._compileMaterial(this._equirectShader))},t.dispose=function(){this._blurMaterial.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(var e=0;e<Uc.length;e++)Uc[e].dispose()},t._cleanup=function(e){this._pingPongRenderTarget.dispose(),this._renderer.setRenderTarget(qc),e.scissorTest=!1,tu(e,0,0,e.width,e.height)},t._fromTexture=function(e){qc=this._renderer.getRenderTarget();var t=this._allocateTargets(e);return this._textureToCubeUV(e,t),this._applyPMREM(t),this._cleanup(t),t},t._allocateTargets=function(e){var t={magFilter:1003,minFilter:1003,generateMipmaps:!1,type:1009,format:1023,encoding:Jc(e)?e.encoding:3002,depthBuffer:!1},n=eu(t);return n.depthBuffer=!e,this._pingPongRenderTarget=eu(t),n},t._compileMaterial=function(e){var t=new zt(Uc[0],e);this._renderer.compile(t,zc)},t._sceneToCubeUV=function(e,t,n,r){var i=new Yt(90,1,t,n),o=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],s=this._renderer,l=s.autoClear,c=s.outputEncoding,u=s.toneMapping;s.getClearColor(Wc),s.toneMapping=0,s.outputEncoding=3e3,s.autoClear=!1;var h=!1,d=e.background;if(d){if(d.isColor){Bc.color.copy(d).convertSRGBToLinear(),e.background=null;var f=Qc(Bc.color);Bc.opacity=f,h=!0}}else{Bc.color.copy(Wc).convertSRGBToLinear();var p=Qc(Bc.color);Bc.opacity=p,h=!0}for(var m=0;m<6;m++){var g=m%3;0==g?(i.up.set(0,o[m],0),i.lookAt(a[m],0,0)):1==g?(i.up.set(0,0,o[m]),i.lookAt(0,a[m],0)):(i.up.set(0,o[m],0),i.lookAt(0,0,a[m])),tu(r,g*Dc,m>2?Dc:0,Dc,Dc),s.setRenderTarget(r),h&&s.render(Fc,i),s.render(e,i)}s.toneMapping=u,s.outputEncoding=c,s.autoClear=l},t._textureToCubeUV=function(e,t){var n=this._renderer;e.isCubeTexture?null==this._cubemapShader&&(this._cubemapShader=ru()):null==this._equirectShader&&(this._equirectShader=nu());var r=e.isCubeTexture?this._cubemapShader:this._equirectShader,i=new zt(Uc[0],r),o=r.uniforms;o.envMap.value=e,e.isCubeTexture||o.texelSize.value.set(1/e.image.width,1/e.image.height),o.inputEncoding.value=jc[e.encoding],o.outputEncoding.value=jc[t.texture.encoding],tu(t,0,0,3*Dc,2*Dc),n.setRenderTarget(t),n.render(i,zc)},t._applyPMREM=function(e){var t=this._renderer,n=t.autoClear;t.autoClear=!1;for(var r=1;r<Nc;r++){var i=Math.sqrt(Gc[r]*Gc[r]-Gc[r-1]*Gc[r-1]),o=Kc[(r-1)%Kc.length];this._blur(e,r-1,r,i,o)}t.autoClear=n},t._blur=function(e,t,n,r,i){var o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,r,"latitudinal",i),this._halfBlur(o,e,n,n,r,"longitudinal",i)},t._halfBlur=function(e,t,n,r,i,o,a){var s=this._renderer,l=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");var c=new zt(Uc[r],l),u=l.uniforms,h=Vc[n]-1,d=isFinite(i)?Math.PI/(2*h):2*Math.PI/39,f=i/d,p=isFinite(i)?1+Math.floor(3*f):20;p>20&&console.warn("sigmaRadians, "+i+", is too large and will clip, as it requested "+p+" samples when the maximum is set to 20");for(var m=[],g=0,v=0;v<20;++v){var y=v/f,b=Math.exp(-y*y/2);m.push(b),0==v?g+=b:v<p&&(g+=2*b)}for(var w=0;w<m.length;w++)m[w]=m[w]/g;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=m,u.latitudinal.value="latitudinal"===o,a&&(u.poleAxis.value=a),u.dTheta.value=d,u.mipInt.value=8-n,u.inputEncoding.value=jc[e.texture.encoding],u.outputEncoding.value=jc[e.texture.encoding];var x=Vc[r];tu(t,3*Math.max(0,Dc-2*x),(0===r?0:2*Dc)+2*x*(r>4?r-8+4:0),3*x,2*x),s.setRenderTarget(t),s.render(c,zc)},e}();function Jc(e){return void 0!==e&&1009===e.type&&(3e3===e.encoding||3001===e.encoding||3007===e.encoding)}function $c(){for(var e=[],t=[],n=[],r=8,i=0;i<Nc;i++){var o=Math.pow(2,r);t.push(o);var a=1/o;i>4?a=Ic[i-8+4-1]:0==i&&(a=0),n.push(a);for(var s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=new Float32Array(108),d=new Float32Array(72),f=new Float32Array(36),p=0;p<6;p++){var m=p%3*2/3-1,g=p>2?0:-1,v=[m,g,0,m+2/3,g,0,m+2/3,g+1,0,m,g,0,m+2/3,g+1,0,m,g+1,0];h.set(v,18*p),d.set(u,12*p);var y=[p,p,p,p,p,p];f.set(y,6*p)}var b=new _t;b.setAttribute("position",new tt(h,3)),b.setAttribute("uv",new tt(d,2)),b.setAttribute("faceIndex",new tt(f,1)),e.push(b),r>4&&r--}return{_lodPlanes:e,_sizeLods:t,_sigmas:n}}function eu(e){var t=new A(3*Dc,3*Dc,e);return t.texture.mapping=306,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function tu(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function nu(){return new Aa({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:new v(1,1)},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function ru(){return new Aa({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:jc[3e3]},outputEncoding:{value:jc[3e3]}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function iu(e){console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom",this.closed=!0}function ou(e){console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom"}function au(e){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),ms.call(this,e),this.type="catmullrom"}ss.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(ss.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Object.assign(Cs.prototype,{fromPoints:function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)}}),iu.prototype=Object.create(ms.prototype),ou.prototype=Object.create(ms.prototype),au.prototype=Object.create(ms.prototype),Object.assign(au.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),hc.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},oc.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Ja.prototype,{extractUrlBase:function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Ws.extractUrlBase(e)}}),Ja.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},Object.assign(Kl.prototype,{center:function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},size:function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(R.prototype,{center:function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionSphere:function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},size:function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)}}),Object.assign(q.prototype,{empty:function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()}}),tn.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Jl.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Object.assign(g,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(e){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),g.floorPowerOfTwo(e)},nextPowerOfTwo:function(e){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),g.ceilPowerOfTwo(e)}}),Object.assign(y.prototype,{flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},multiplyVector3:function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},getInverse:function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()}}),Object.assign(te.prototype,{extractPosition:function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},flattenToArrayOffset:function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},getPosition:function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new T).setFromMatrixColumn(this,3)},setRotationFromQuaternion:function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector4:function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},crossVector:function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBufferAttribute:function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},getInverse:function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()}}),Re.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},Object.assign(M.prototype,{multiplyVector3:function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},inverse:function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()}}),Object.assign(ee.prototype,{isIntersectionBox:function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},isIntersectionPlane:function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},isIntersectionSphere:function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)}}),Object.assign(He.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},midpoint:function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},normal:function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},plane:function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)}}),Object.assign(He,{barycoordFromPoint:function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),He.getBarycoord(e,t,n,r,i)},normal:function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),He.getNormal(e,t,n,r)}}),Object.assign(Os.prototype,{extractAllPoints:function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},extrude:function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new sa(this,e)},makeGeometry:function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new pa(this,e)}}),Object.assign(v.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(T.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},getScaleFromMatrix:function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},getColumnFromMatrix:function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},applyProjection:function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},fromAttribute:function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},distanceToManhattan:function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(E.prototype,{fromAttribute:function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(Me.prototype,{getChildByName:function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},applyMatrix:function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(Me.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.assign(zt.prototype,{setDrawMode:function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}),Object.defineProperties(zt.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),Object.defineProperties(Bi.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Yi.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Gi.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},Object.defineProperty(ss.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(e){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=e}}),Yt.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(Rs.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(tt.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),35048===this.usage},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(35048)}}}),Object.assign(tt.prototype,{setDynamic:function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},setArray:function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(_t.prototype,{addIndex:function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},addAttribute:function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new tt(arguments[1],arguments[2])))},addDrawCall:function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},removeAttribute:function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},applyMatrix:function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}}),Object.defineProperties(_t.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.defineProperties(qs.prototype,{maxInstancedCount:{get:function(){return console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount},set:function(e){console.warn("THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount."),this.instanceCount=e}}}),Object.defineProperties(Vl.prototype,{linePrecision:{get:function(){return console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold},set:function(e){console.warn("THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead."),this.params.Line.threshold=e}}}),Object.defineProperties(vi.prototype,{dynamic:{get:function(){return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),35048===this.usage},set:function(e){console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."),this.setUsage(e)}}}),Object.assign(vi.prototype,{setDynamic:function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?35048:35044),this},setArray:function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")}}),Object.assign(sa.prototype,{getArrays:function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")}}),Object.assign(gi.prototype,{dispose:function(){console.error("THREE.Scene: .dispose() has been removed.")}}),Object.defineProperties(zl.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Ze.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Ye}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===e}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}}}),Object.defineProperties(Ta.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Ma.prototype,{transparency:{get:function(){return console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission},set:function(e){console.warn("THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission."),this.transmission=e}}}),Object.defineProperties(qt.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),Object.assign(di.prototype,{clearTarget:function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},animate:function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},allocTextureUnit:function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},setTexture:function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},setTextureCube:function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},getActiveMipMapLevel:function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()}}),Object.defineProperties(di.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?3001:3e3}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}}),Object.defineProperties(ei.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(A.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),Object.defineProperties(bl.prototype,{load:{value:function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var t=this;return(new al).load(e,(function(e){t.setBuffer(e)})),this}},startTime:{set:function(){console.warn("THREE.Audio: .startTime is now .play( delay ).")}}}),Sl.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Kt.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},Kt.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)};var su={merge:function(e,t,n){var r;console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),t.isMesh&&(t.matrixAutoUpdate&&t.updateMatrix(),r=t.matrix,t=t.geometry),e.merge(t,r,n)},center:function(e){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),e.center()}};b.crossOrigin=void 0,b.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var i=new as;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},b.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var i=new is;i.setCrossOrigin(this.crossOrigin);var o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},b.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},b.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};var lu={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};"undefined"!==typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"125"}})),"undefined"!==typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="125"),t.ACESFilmicToneMapping=4,t.AddEquation=100,t.AddOperation=2,t.AdditiveAnimationBlendMode=2501,t.AdditiveBlending=2,t.AlphaFormat=1021,t.AlwaysDepth=1,t.AlwaysStencilFunc=519,t.AmbientLight=zs,t.AmbientLightProbe=ll,t.AnimationClip=Xa,t.AnimationLoader=ts,t.AnimationMixer=Fl,t.AnimationObjectGroup=jl,t.AnimationUtils=Da,t.ArcCurve=cs,t.ArrayCamera=oi,t.ArrowHelper=Oc,t.Audio=bl,t.AudioAnalyser=Sl,t.AudioContext=ol,t.AudioListener=yl,t.AudioLoader=al,t.AxesHelper=Rc,t.AxisHelper=function(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Rc(e)},t.BackSide=1,t.BasicDepthPacking=3200,t.BasicShadowMap=0,t.BinaryTextureLoader=function(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new os(e)},t.Bone=Wi,t.BooleanKeyframeTrack=za,t.BoundingBoxHelper=function(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Sc(e,t)},t.Box2=Kl,t.Box3=R,t.Box3Helper=Mc,t.BoxBufferGeometry=Ut,t.BoxGeometry=Ut,t.BoxHelper=Sc,t.BufferAttribute=tt,t.BufferGeometry=_t,t.BufferGeometryLoader=Ys,t.ByteType=1010,t.Cache=Ka,t.Camera=Xt,t.CameraHelper=bc,t.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},t.CanvasTexture=xo,t.CatmullRomCurve3=ms,t.CineonToneMapping=3,t.CircleBufferGeometry=Eo,t.CircleGeometry=Eo,t.ClampToEdgeWrapping=1001,t.Clock=dl,t.ClosedSplineCurve3=iu,t.Color=Ye,t.ColorKeyframeTrack=Ha,t.CompressedTexture=wo,t.CompressedTextureLoader=ns,t.ConeBufferGeometry=So,t.ConeGeometry=So,t.CubeCamera=Kt,t.CubeReflectionMapping=301,t.CubeRefractionMapping=302,t.CubeTexture=Qt,t.CubeTextureLoader=is,t.CubeUVReflectionMapping=306,t.CubeUVRefractionMapping=307,t.CubicBezierCurve=bs,t.CubicBezierCurve3=ws,t.CubicInterpolant=Na,t.CullFaceBack=1,t.CullFaceFront=2,t.CullFaceFrontBack=3,t.CullFaceNone=0,t.Curve=ss,t.CurvePath=Ts,t.CustomBlending=5,t.CustomToneMapping=5,t.CylinderBufferGeometry=Ao,t.CylinderGeometry=Ao,t.Cylindrical=Xl,t.DataTexture=Jt,t.DataTexture2DArray=En,t.DataTexture3D=An,t.DataTextureLoader=os,t.DataUtils=Lc,t.DecrementStencilOp=7683,t.DecrementWrapStencilOp=34056,t.DefaultLoadingManager=Za,t.DepthFormat=1026,t.DepthStencilFormat=1027,t.DepthTexture=_o,t.DirectionalLight=Fs,t.DirectionalLightHelper=gc,t.DiscreteInterpolant=Ba,t.DodecahedronBufferGeometry=To,t.DodecahedronGeometry=To,t.DoubleSide=2,t.DstAlphaFactor=206,t.DstColorFactor=208,t.DynamicBufferAttribute=function(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new tt(e,t).setUsage(35048)},t.DynamicCopyUsage=35050,t.DynamicDrawUsage=35048,t.DynamicReadUsage=35049,t.EdgesGeometry=Po,t.EdgesHelper=function(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new co(new Po(e.geometry),new eo({color:void 0!==t?t:16777215}))},t.EllipseCurve=ls,t.EqualDepth=4,t.EqualStencilFunc=514,t.EquirectangularReflectionMapping=303,t.EquirectangularRefractionMapping=304,t.Euler=ce,t.EventDispatcher=h,t.ExtrudeBufferGeometry=sa,t.ExtrudeGeometry=sa,t.Face3=Ke,t.Face4=function(e,t,n,r,i,o,a){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new Ke(e,t,n,i,o,a)},t.FaceColors=1,t.FileLoader=es,t.FlatShading=1,t.Float16BufferAttribute=ct,t.Float32Attribute=function(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ut(e,t)},t.Float32BufferAttribute=ut,t.Float64Attribute=function(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new ht(e,t)},t.Float64BufferAttribute=ht,t.FloatType=1015,t.Fog=mi,t.FogExp2=pi,t.Font=nl,t.FontLoader=il,t.FrontSide=0,t.Frustum=tn,t.GLBufferAttribute=Ul,t.GLSL1="100",t.GLSL3="300 es",t.GammaEncoding=3007,t.GeometryUtils=su,t.GreaterDepth=6,t.GreaterEqualDepth=5,t.GreaterEqualStencilFunc=518,t.GreaterStencilFunc=516,t.GridHelper=hc,t.Group=ii,t.HalfFloatType=1016,t.HemisphereLight=ks,t.HemisphereLightHelper=uc,t.HemisphereLightProbe=sl,t.IcosahedronBufferGeometry=ca,t.IcosahedronGeometry=ca,t.ImageBitmapLoader=$s,t.ImageLoader=rs,t.ImageUtils=b,t.ImmediateRenderObject=$l,t.IncrementStencilOp=7682,t.IncrementWrapStencilOp=34055,t.InstancedBufferAttribute=Xs,t.InstancedBufferGeometry=qs,t.InstancedInterleavedBuffer=Hl,t.InstancedMesh=$i,t.Int16Attribute=function(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new ot(e,t)},t.Int16BufferAttribute=ot,t.Int32Attribute=function(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new st(e,t)},t.Int32BufferAttribute=st,t.Int8Attribute=function(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new nt(e,t)},t.Int8BufferAttribute=nt,t.IntType=1013,t.InterleavedBuffer=vi,t.InterleavedBufferAttribute=wi,t.Interpolant=Ia,t.InterpolateDiscrete=2300,t.InterpolateLinear=2301,t.InterpolateSmooth=2302,t.InvertStencilOp=5386,t.JSONLoader=function(){console.error("THREE.JSONLoader has been removed.")},t.KeepStencilOp=7680,t.KeyframeTrack=Fa,t.LOD=Bi,t.LatheBufferGeometry=ua,t.LatheGeometry=ua,t.Layers=de,t.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")},t.LessDepth=2,t.LessEqualDepth=3,t.LessEqualStencilFunc=515,t.LessStencilFunc=513,t.Light=Rs,t.LightProbe=Vs,t.Line=ao,t.Line3=Jl,t.LineBasicMaterial=eo,t.LineCurve=xs,t.LineCurve3=_s,t.LineDashedMaterial=Pa,t.LineLoop=uo,t.LinePieces=1,t.LineSegments=co,t.LineStrip=0,t.LinearEncoding=3e3,t.LinearFilter=1006,t.LinearInterpolant=ja,t.LinearMipMapLinearFilter=1008,t.LinearMipMapNearestFilter=1007,t.LinearMipmapLinearFilter=1008,t.LinearMipmapNearestFilter=1007,t.LinearToneMapping=1,t.Loader=Ja,t.LoaderUtils=Ws,t.LoadingManager=Qa,t.LogLuvEncoding=3003,t.LoopOnce=2200,t.LoopPingPong=2202,t.LoopRepeat=2201,t.LuminanceAlphaFormat=1025,t.LuminanceFormat=1024,t.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},t.Material=Ze,t.MaterialLoader=Gs,t.Math=g,t.MathUtils=g,t.Matrix3=y,t.Matrix4=te,t.MaxEquation=104,t.Mesh=zt,t.MeshBasicMaterial=Je,t.MeshDepthMaterial=Jr,t.MeshDistanceMaterial=$r,t.MeshFaceMaterial=function(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e},t.MeshLambertMaterial=Ra,t.MeshMatcapMaterial=ka,t.MeshNormalMaterial=Oa,t.MeshPhongMaterial=Ta,t.MeshPhysicalMaterial=Ma,t.MeshStandardMaterial=Sa,t.MeshToonMaterial=Ca,t.MinEquation=103,t.MirroredRepeatWrapping=1002,t.MixOperation=1,t.MultiMaterial=function(e){return void 0===e&&(e=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e},t.MultiplyBlending=4,t.MultiplyOperation=0,t.NearestFilter=1003,t.NearestMipMapLinearFilter=1005,t.NearestMipMapNearestFilter=1004,t.NearestMipmapLinearFilter=1005,t.NearestMipmapNearestFilter=1004,t.NeverDepth=0,t.NeverStencilFunc=512,t.NoBlending=0,t.NoColors=0,t.NoToneMapping=0,t.NormalAnimationBlendMode=2500,t.NormalBlending=1,t.NotEqualDepth=7,t.NotEqualStencilFunc=517,t.NumberKeyframeTrack=Ua,t.Object3D=Me,t.ObjectLoader=Ks,t.ObjectSpaceNormalMap=1,t.OctahedronBufferGeometry=ha,t.OctahedronGeometry=ha,t.OneFactor=201,t.OneMinusDstAlphaFactor=207,t.OneMinusDstColorFactor=209,t.OneMinusSrcAlphaFactor=205,t.OneMinusSrcColorFactor=203,t.OrthographicCamera=js,t.PCFShadowMap=1,t.PCFSoftShadowMap=2,t.PMREMGenerator=Zc,t.ParametricBufferGeometry=da,t.ParametricGeometry=da,t.Particle=function(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Di(e)},t.ParticleBasicMaterial=function(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.ParticleSystem=function(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new vo(e,t)},t.ParticleSystemMaterial=function(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.Path=Cs,t.PerspectiveCamera=Yt,t.Plane=Re,t.PlaneBufferGeometry=on,t.PlaneGeometry=on,t.PlaneHelper=Tc,t.PointCloud=function(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new vo(e,t)},t.PointCloudMaterial=function(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new ho(e)},t.PointLight=Ns,t.PointLightHelper=ac,t.Points=vo,t.PointsMaterial=ho,t.PolarGridHelper=dc,t.PolyhedronBufferGeometry=Mo,t.PolyhedronGeometry=Mo,t.PositionalAudio=Al,t.PropertyBinding=Nl,t.PropertyMixer=Ml,t.QuadraticBezierCurve=Es,t.QuadraticBezierCurve3=As,t.Quaternion=M,t.QuaternionKeyframeTrack=Ga,t.QuaternionLinearInterpolant=Va,t.REVISION="125",t.RGBADepthPacking=3201,t.RGBAFormat=1023,t.RGBAIntegerFormat=1033,t.RGBA_ASTC_10x10_Format=37819,t.RGBA_ASTC_10x5_Format=37816,t.RGBA_ASTC_10x6_Format=37817,t.RGBA_ASTC_10x8_Format=37818,t.RGBA_ASTC_12x10_Format=37820,t.RGBA_ASTC_12x12_Format=37821,t.RGBA_ASTC_4x4_Format=37808,t.RGBA_ASTC_5x4_Format=37809,t.RGBA_ASTC_5x5_Format=37810,t.RGBA_ASTC_6x5_Format=37811,t.RGBA_ASTC_6x6_Format=37812,t.RGBA_ASTC_8x5_Format=37813,t.RGBA_ASTC_8x6_Format=37814,t.RGBA_ASTC_8x8_Format=37815,t.RGBA_BPTC_Format=36492,t.RGBA_ETC2_EAC_Format=37496,t.RGBA_PVRTC_2BPPV1_Format=35843,t.RGBA_PVRTC_4BPPV1_Format=35842,t.RGBA_S3TC_DXT1_Format=33777,t.RGBA_S3TC_DXT3_Format=33778,t.RGBA_S3TC_DXT5_Format=33779,t.RGBDEncoding=3006,t.RGBEEncoding=3002,t.RGBEFormat=1023,t.RGBFormat=1022,t.RGBIntegerFormat=1032,t.RGBM16Encoding=3005,t.RGBM7Encoding=3004,t.RGB_ETC1_Format=36196,t.RGB_ETC2_Format=37492,t.RGB_PVRTC_2BPPV1_Format=35841,t.RGB_PVRTC_4BPPV1_Format=35840,t.RGB_S3TC_DXT1_Format=33776,t.RGFormat=1030,t.RGIntegerFormat=1031,t.RawShaderMaterial=Aa,t.Ray=ee,t.Raycaster=Vl,t.RectAreaLight=Hs,t.RedFormat=1028,t.RedIntegerFormat=1029,t.ReinhardToneMapping=2,t.RepeatWrapping=1e3,t.ReplaceStencilOp=7681,t.ReverseSubtractEquation=102,t.RingBufferGeometry=fa,t.RingGeometry=fa,t.SRGB8_ALPHA8_ASTC_10x10_Format=37851,t.SRGB8_ALPHA8_ASTC_10x5_Format=37848,t.SRGB8_ALPHA8_ASTC_10x6_Format=37849,t.SRGB8_ALPHA8_ASTC_10x8_Format=37850,t.SRGB8_ALPHA8_ASTC_12x10_Format=37852,t.SRGB8_ALPHA8_ASTC_12x12_Format=37853,t.SRGB8_ALPHA8_ASTC_4x4_Format=37840,t.SRGB8_ALPHA8_ASTC_5x4_Format=37841,t.SRGB8_ALPHA8_ASTC_5x5_Format=37842,t.SRGB8_ALPHA8_ASTC_6x5_Format=37843,t.SRGB8_ALPHA8_ASTC_6x6_Format=37844,t.SRGB8_ALPHA8_ASTC_8x5_Format=37845,t.SRGB8_ALPHA8_ASTC_8x6_Format=37846,t.SRGB8_ALPHA8_ASTC_8x8_Format=37847,t.Scene=gi,t.SceneUtils=lu,t.ShaderChunk=an,t.ShaderLib=ln,t.ShaderMaterial=qt,t.ShadowMaterial=Ea,t.Shape=Os,t.ShapeBufferGeometry=pa,t.ShapeGeometry=pa,t.ShapePath=el,t.ShapeUtils=ia,t.ShortType=1011,t.Skeleton=Yi,t.SkeletonHelper=oc,t.SkinnedMesh=Gi,t.SmoothShading=2,t.Sphere=q,t.SphereBufferGeometry=ma,t.SphereGeometry=ma,t.Spherical=ql,t.SphericalHarmonics3=Us,t.Spline=au,t.SplineCurve=Ss,t.SplineCurve3=ou,t.SpotLight=Ds,t.SpotLightHelper=tc,t.Sprite=Di,t.SpriteMaterial=xi,t.SrcAlphaFactor=204,t.SrcAlphaSaturateFactor=210,t.SrcColorFactor=202,t.StaticCopyUsage=35046,t.StaticDrawUsage=35044,t.StaticReadUsage=35045,t.StereoCamera=hl,t.StreamCopyUsage=35042,t.StreamDrawUsage=35040,t.StreamReadUsage=35041,t.StringKeyframeTrack=Wa,t.SubtractEquation=101,t.SubtractiveBlending=3,t.TOUCH={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},t.TangentSpaceNormalMap=0,t.TetrahedronBufferGeometry=ga,t.TetrahedronGeometry=ga,t.TextBufferGeometry=va,t.TextGeometry=va,t.Texture=x,t.TextureLoader=as,t.TorusBufferGeometry=ya,t.TorusGeometry=ya,t.TorusKnotBufferGeometry=ba,t.TorusKnotGeometry=ba,t.Triangle=He,t.TriangleFanDrawMode=2,t.TriangleStripDrawMode=1,t.TrianglesDrawMode=0,t.TubeBufferGeometry=wa,t.TubeGeometry=wa,t.UVMapping=300,t.Uint16Attribute=function(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new at(e,t)},t.Uint16BufferAttribute=at,t.Uint32Attribute=function(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new lt(e,t)},t.Uint32BufferAttribute=lt,t.Uint8Attribute=function(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new rt(e,t)},t.Uint8BufferAttribute=rt,t.Uint8ClampedAttribute=function(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new it(e,t)},t.Uint8ClampedBufferAttribute=it,t.Uniform=zl,t.UniformsLib=sn,t.UniformsUtils=Wt,t.UnsignedByteType=1009,t.UnsignedInt248Type=1020,t.UnsignedIntType=1014,t.UnsignedShort4444Type=1017,t.UnsignedShort5551Type=1018,t.UnsignedShort565Type=1019,t.UnsignedShortType=1012,t.VSMShadowMap=3,t.Vector2=v,t.Vector3=T,t.Vector4=E,t.VectorKeyframeTrack=qa,t.Vertex=function(e,t,n){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new T(e,t,n)},t.VertexColors=2,t.VideoTexture=bo,t.WebGL1Renderer=fi,t.WebGLCubeRenderTarget=Zt,t.WebGLMultisampleRenderTarget=S,t.WebGLRenderTarget=A,t.WebGLRenderTargetCube=function(e,t,n){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Zt(e,n)},t.WebGLRenderer=di,t.WebGLUtils=ri,t.WireframeGeometry=xa,t.WireframeHelper=function(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new co(new xa(e.geometry),new eo({color:void 0!==t?t:16777215}))},t.WrapAroundEnding=2402,t.XHRLoader=function(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new es(e)},t.ZeroCurvatureEnding=2400,t.ZeroFactor=200,t.ZeroSlopeEnding=2401,t.ZeroStencilOp=0,t.sRGBEncoding=3001,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],58:[function(e,t,n){THREE.DRACOLoader=function(e){THREE.Loader.call(this,e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}},THREE.DRACOLoader.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:THREE.DRACOLoader,setDecoderPath:function(e){return this.decoderPath=e,this},setDecoderConfig:function(e){return this.decoderConfig=e,this},setWorkerLimit:function(e){return this.workerLimit=e,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(e,t,n,r){var i=new THREE.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>{var n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)},n,r)},decodeDracoFile:function(e,t,n,r){var i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)},decodeGeometry:function(e,t){for(var n in t.attributeTypes){var r=t.attributeTypes[n];void 0!==r.BYTES_PER_ELEMENT&&(t.attributeTypes[n]=r.name)}var i,o=JSON.stringify(t);if(THREE.DRACOLoader.taskCache.has(e)){var a=THREE.DRACOLoader.taskCache.get(e);if(a.key===o)return a.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var s=this.workerNextTaskID++,l=e.byteLength,c=this._getWorker(s,l).then(n=>(i=n,new Promise((n,r)=>{i._callbacks[s]={resolve:n,reject:r},i.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return c.catch(()=>!0).then(()=>{i&&s&&this._releaseTask(i,s)}),THREE.DRACOLoader.taskCache.set(e,{key:o,promise:c}),c},_createGeometry:function(e){var t=new THREE.BufferGeometry;e.index&&t.setIndex(new THREE.BufferAttribute(e.index.array,1));for(var n=0;n<e.attributes.length;n++){var r=e.attributes[n],i=r.name,o=r.array,a=r.itemSize;t.setAttribute(i,new THREE.BufferAttribute(o,a))}return t},_loadLibrary:function(e,t){var n=new THREE.FileLoader(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((t,r)=>{n.load(e,t,void 0,r)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var e="object"!==typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(t=>{var n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);var r=THREE.DRACOLoader.DRACOWorker.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending},_getWorker:function(e,t){return this._initDecoder().then(()=>{var n;return this.workerPool.length<this.workerLimit?((n=new Worker(this.workerSourceURL))._callbacks={},n._taskCosts={},n._taskLoad=0,n.postMessage({type:"init",decoderConfig:this.decoderConfig}),n.onmessage=function(e){var t=e.data;switch(t.type){case"decode":n._callbacks[t.id].resolve(t);break;case"error":n._callbacks[t.id].reject(t);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+t.type+'"')}},this.workerPool.push(n)):this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1})),(n=this.workerPool[this.workerPool.length-1])._taskCosts[e]=t,n._taskLoad+=t,n})},_releaseTask:function(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]},debug:function(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))},dispose:function(){for(var e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}),THREE.DRACOLoader.DRACOWorker=function(){var e,t;function n(e,t,n,r,i,o){var a=o.num_components(),s=n.num_points()*a,l=s*i.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,o,c,l,u);var h=new i(e.HEAPF32.buffer,u,s).slice();return e._free(u),{name:r,array:h,itemSize:a}}onmessage=function(r){var i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":var o=i.buffer,a=i.taskConfig;t.then(e=>{var t=e.draco,r=new t.Decoder,s=new t.DecoderBuffer;s.Init(new Int8Array(o),o.byteLength);try{var l=function(e,t,r,i){var o,a,s=i.attributeIDs,l=i.attributeTypes,c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)o=new e.Mesh,a=t.DecodeBufferToMesh(r,o);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new e.PointCloud,a=t.DecodeBufferToPointCloud(r,o)}if(!a.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+a.error_msg());var u={index:null,attributes:[]};for(var h in s){var d,f,p=self[l[h]];if(i.useUniqueIDs)f=s[h],d=t.GetAttributeByUniqueId(o,f);else{if(-1===(f=t.GetAttributeId(o,e[s[h]])))continue;d=t.GetAttribute(o,f)}u.attributes.push(n(e,t,o,h,p,d))}return c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){var r=3*n.num_faces(),i=4*r,o=e._malloc(i);t.GetTrianglesUInt32Array(n,i,o);var a=new Uint32Array(e.HEAPF32.buffer,o,r).slice();return e._free(o),{array:a,itemSize:1}}(e,t,o)),e.destroy(o),u}(t,r,s,a),c=l.attributes.map(e=>e.array.buffer);l.index&&c.push(l.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:l},c)}catch(u){console.error(u),self.postMessage({type:"error",id:i.id,error:u.message})}finally{t.destroy(s),t.destroy(r)}})}}},THREE.DRACOLoader.taskCache=new WeakMap,THREE.DRACOLoader.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},THREE.DRACOLoader.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},THREE.DRACOLoader.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},THREE.DRACOLoader.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")}},{}],59:[function(t,n,r){THREE.GLTFLoader=function(){function t(e){THREE.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new s(e)})),this.register((function(e){return new c(e)})),this.register((function(e){return new u(e)})),this.register((function(e){return new l(e)})),this.register((function(e){return new o(e)})),this.register((function(e){return new h(e)}))}function n(){var e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}t.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:t,load:function(t,n,r,i){var o,a=this;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:THREE.LoaderUtils.extractUrlBase(t),this.manager.itemStart(t);var s=function(e){i?i(e):console.error(e),a.manager.itemError(t),a.manager.itemEnd(t)},l=new THREE.FileLoader(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,(function(r){try{a.parse(r,o,(function(e){n(e),a.manager.itemEnd(t)}),s)}catch(e){s(e)}}),r,s)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},setKTX2Loader:function(e){return this.ktx2Loader=e,this},setMeshoptDecoder:function(e){return this.meshoptDecoder=e,this},register:function(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this},unregister:function(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this},parse:function(e,t,n,o){var s,l={},c={};if("string"===typeof e)s=e;else if(THREE.LoaderUtils.decodeText(new Uint8Array(e,0,4))===d){try{l[r.KHR_BINARY_GLTF]=new m(e)}catch(_){return void(o&&o(_))}s=l[r.KHR_BINARY_GLTF].content}else s=THREE.LoaderUtils.decodeText(new Uint8Array(e));var u=JSON.parse(s);if(void 0===u.asset||u.asset.version[0]<2)o&&o(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));else{var h=new W(u,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});h.fileLoader.setRequestHeader(this.requestHeader);for(var f=0;f<this.pluginCallbacks.length;f++){var p=this.pluginCallbacks[f](h);c[p.name]=p,l[p.name]=!0}if(u.extensionsUsed)for(f=0;f<u.extensionsUsed.length;++f){var y=u.extensionsUsed[f],x=u.extensionsRequired||[];switch(y){case r.KHR_MATERIALS_UNLIT:l[y]=new a;break;case r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:l[y]=new b;break;case r.KHR_DRACO_MESH_COMPRESSION:l[y]=new g(u,this.dracoLoader);break;case r.MSFT_TEXTURE_DDS:l[y]=new i(this.ddsLoader);break;case r.KHR_TEXTURE_TRANSFORM:l[y]=new v;break;case r.KHR_MESH_QUANTIZATION:l[y]=new w;break;default:x.indexOf(y)>=0&&void 0===c[y]&&console.warn('THREE.GLTFLoader: Unknown extension "'+y+'".')}}h.setExtensions(l),h.setPlugins(c),h.parse(n,o)}}});var r={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",MSFT_TEXTURE_DDS:"MSFT_texture_dds"};function i(e){if(!e)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader");this.name=r.MSFT_TEXTURE_DDS,this.ddsLoader=e}function o(e){this.parser=e,this.name=r.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}function a(){this.name=r.KHR_MATERIALS_UNLIT}function s(e){this.parser=e,this.name=r.KHR_MATERIALS_CLEARCOAT}function l(e){this.parser=e,this.name=r.KHR_MATERIALS_TRANSMISSION}function c(e){this.parser=e,this.name=r.KHR_TEXTURE_BASISU}function u(e){this.parser=e,this.name=r.EXT_TEXTURE_WEBP,this.isSupported=null}function h(e){this.name=r.EXT_MESHOPT_COMPRESSION,this.parser=e}o.prototype._markDefs=function(){for(var e=this.parser,t=this.parser.json.nodes||[],n=0,r=t.length;n<r;n++){var i=t[n];i.extensions&&i.extensions[this.name]&&void 0!==i.extensions[this.name].light&&e._addNodeRef(this.cache,i.extensions[this.name].light)}},o.prototype._loadLight=function(e){var t=this.parser,n="light:"+e,r=t.cache.get(n);if(r)return r;var i,o=t.json,a=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e],s=new THREE.Color(16777215);void 0!==a.color&&s.fromArray(a.color);var l=void 0!==a.range?a.range:0;switch(a.type){case"directional":(i=new THREE.DirectionalLight(s)).target.position.set(0,0,-1),i.add(i.target);break;case"point":(i=new THREE.PointLight(s)).distance=l;break;case"spot":(i=new THREE.SpotLight(s)).distance=l,a.spot=a.spot||{},a.spot.innerConeAngle=void 0!==a.spot.innerConeAngle?a.spot.innerConeAngle:0,a.spot.outerConeAngle=void 0!==a.spot.outerConeAngle?a.spot.outerConeAngle:Math.PI/4,i.angle=a.spot.outerConeAngle,i.penumbra=1-a.spot.innerConeAngle/a.spot.outerConeAngle,i.target.position.set(0,0,-1),i.add(i.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+a.type)}return i.position.set(0,0,0),i.decay=2,void 0!==a.intensity&&(i.intensity=a.intensity),i.name=t.createUniqueName(a.name||"light_"+e),r=Promise.resolve(i),t.cache.add(n,r),r},o.prototype.createNodeAttachment=function(e){var t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))},a.prototype.getMaterialType=function(){return THREE.MeshBasicMaterial},a.prototype.extendParams=function(e,t,n){var r=[];e.color=new THREE.Color(1,1,1),e.opacity=1;var i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){var o=i.baseColorFactor;e.color.fromArray(o),e.opacity=o[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture))}return Promise.all(r)},s.prototype.getMaterialType=function(e){var t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?THREE.MeshPhysicalMaterial:null},s.prototype.extendMaterialParams=function(e,t){var n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var i=[],o=r.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){var a=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new THREE.Vector2(a,-a)}return Promise.all(i)},l.prototype.getMaterialType=function(e){var t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?THREE.MeshPhysicalMaterial:null},l.prototype.extendMaterialParams=function(e,t){var n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var i=[],o=r.extensions[this.name];return void 0!==o.transmissionFactor&&(t.transmission=o.transmissionFactor),void 0!==o.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(i)},c.prototype.loadTexture=function(e){var t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;var i=r.extensions[this.name],o=n.images[i.source],a=t.options.ktx2Loader;if(!a){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,o,a)},u.prototype.loadTexture=function(e){var t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;var o=i.extensions[t],a=r.images[o.source],s=a.uri?n.options.manager.getHandler(a.uri):n.textureLoader;return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,a,s);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))},u.prototype.detectSupport=function(){return this.isSupported||(this.isSupported=new Promise((function(e){var t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported},h.prototype.loadBufferView=function(e){var t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){var r=n.extensions[this.name],i=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return Promise.all([i,o.ready]).then((function(e){var t=r.byteOffset||0,n=r.byteLength||0,i=r.count,a=r.byteStride,s=new ArrayBuffer(i*a),l=new Uint8Array(e[0],t,n);return o.decodeGltfBuffer(new Uint8Array(s),i,a,l,r.mode,r.filter),s}))}return null};var d="glTF",f=1313821514,p=5130562;function m(e){this.name=r.KHR_BINARY_GLTF,this.content=null,this.body=null;var t=new DataView(e,0,12);if(this.header={magic:THREE.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==d)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");for(var n=this.header.length-12,i=new DataView(e,12),o=0;o<n;){var a=i.getUint32(o,!0);o+=4;var s=i.getUint32(o,!0);if(o+=4,s===f){var l=new Uint8Array(e,12+o,a);this.content=THREE.LoaderUtils.decodeText(l)}else if(s===p){var c=12+o;this.body=e.slice(c,c+a)}o+=a}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}function g(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=r.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}function v(){this.name=r.KHR_TEXTURE_TRANSFORM}function y(e){THREE.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var t=["#ifdef USE_SPECULARMAP","\tuniform sampler2D specularMap;","#endif"].join("\n"),n=["#ifdef USE_GLOSSINESSMAP","\tuniform sampler2D glossinessMap;","#endif"].join("\n"),r=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP","\tvec4 texelSpecular = texture2D( specularMap, vUv );","\ttexelSpecular = sRGBToLinear( texelSpecular );","\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture","\tspecularFactor *= texelSpecular.rgb;","#endif"].join("\n"),i=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP","\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );","\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture","\tglossinessFactor *= texelGlossiness.a;","#endif"].join("\n"),o=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor;"].join("\n"),a={specular:{value:(new THREE.Color).setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=a,this.onBeforeCompile=function(e){for(var s in a)e.uniforms[s]=a[s];e.fragmentShader=e.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;").replace("uniform float metalness;","uniform float glossiness;").replace("#include <roughnessmap_pars_fragment>",t).replace("#include <metalnessmap_pars_fragment>",n).replace("#include <roughnessmap_fragment>",r).replace("#include <metalnessmap_fragment>",i).replace("#include <lights_physical_fragment>",o)},Object.defineProperties(this,{specular:{get:function(){return a.specular.value},set:function(e){a.specular.value=e}},specularMap:{get:function(){return a.specularMap.value},set:function(e){a.specularMap.value=e,e?this.defines.USE_SPECULARMAP="":delete this.defines.USE_SPECULARMAP}},glossiness:{get:function(){return a.glossiness.value},set:function(e){a.glossiness.value=e}},glossinessMap:{get:function(){return a.glossinessMap.value},set:function(e){a.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_UV=""):(delete this.defines.USE_GLOSSINESSMAP,delete this.defines.USE_UV)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}function b(){return{name:r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return y},extendParams:function(e,t,n){var r=t.extensions[this.name];e.color=new THREE.Color(1,1,1),e.opacity=1;var i=[];if(Array.isArray(r.diffuseFactor)){var o=r.diffuseFactor;e.color.fromArray(o),e.opacity=o[3]}if(void 0!==r.diffuseTexture&&i.push(n.assignTexture(e,"map",r.diffuseTexture)),e.emissive=new THREE.Color(0,0,0),e.glossiness=void 0!==r.glossinessFactor?r.glossinessFactor:1,e.specular=new THREE.Color(1,1,1),Array.isArray(r.specularFactor)&&e.specular.fromArray(r.specularFactor),void 0!==r.specularGlossinessTexture){var a=r.specularGlossinessTexture;i.push(n.assignTexture(e,"glossinessMap",a)),i.push(n.assignTexture(e,"specularMap",a))}return Promise.all(i)},createMaterial:function(e){var t=new y(e);return t.fog=!0,t.color=e.color,t.map=void 0===e.map?null:e.map,t.lightMap=null,t.lightMapIntensity=1,t.aoMap=void 0===e.aoMap?null:e.aoMap,t.aoMapIntensity=1,t.emissive=e.emissive,t.emissiveIntensity=1,t.emissiveMap=void 0===e.emissiveMap?null:e.emissiveMap,t.bumpMap=void 0===e.bumpMap?null:e.bumpMap,t.bumpScale=1,t.normalMap=void 0===e.normalMap?null:e.normalMap,t.normalMapType=THREE.TangentSpaceNormalMap,e.normalScale&&(t.normalScale=e.normalScale),t.displacementMap=null,t.displacementScale=1,t.displacementBias=0,t.specularMap=void 0===e.specularMap?null:e.specularMap,t.specular=e.specular,t.glossinessMap=void 0===e.glossinessMap?null:e.glossinessMap,t.glossiness=e.glossiness,t.alphaMap=null,t.envMap=void 0===e.envMap?null:e.envMap,t.envMapIntensity=1,t.refractionRatio=.98,t}}}function w(){this.name=r.KHR_MESH_QUANTIZATION}function x(e,t,n,r){THREE.Interpolant.call(this,e,t,n,r)}g.prototype.decodePrimitive=function(e,t){var n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,a={},s={},l={};for(var c in o){var u=L[c]||c.toLowerCase();a[u]=o[c]}for(c in e.attributes)if(u=L[c]||c.toLowerCase(),void 0!==o[c]){var h=n.accessors[e.attributes[c]],d=O[h.componentType];l[u]=d,s[u]=!0===h.normalized}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(var n in e.attributes){var r=e.attributes[n],i=s[n];void 0!==i&&(r.normalized=i)}t(e)}),a,l)}))}))},v.prototype.extendTexture=function(e,t){return e=e.clone(),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),void 0!==t.texCoord&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),e.needsUpdate=!0,e},y.prototype=Object.create(THREE.MeshStandardMaterial.prototype),y.prototype.constructor=y,y.prototype.copy=function(e){return THREE.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this},x.prototype=Object.create(THREE.Interpolant.prototype),x.prototype.constructor=x,x.prototype.copySampleValue_=function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r,o=0;o!==r;o++)t[o]=n[i+o];return t},x.prototype.beforeStart_=x.prototype.copySampleValue_,x.prototype.afterEnd_=x.prototype.copySampleValue_,x.prototype.interpolate_=function(e,t,n,r){for(var i=this.resultBuffer,o=this.sampleValues,a=this.valueSize,s=2*a,l=3*a,c=r-t,u=(n-t)/c,h=u*u,d=h*u,f=e*l,p=f-l,m=-2*d+3*h,g=d-h,v=1-m,y=g-h+u,b=0;b!==a;b++){var w=o[p+b+a],x=o[p+b+s]*c,_=o[f+b+a],E=o[f+b]*c;i[b]=v*w+y*x+m*_+g*E}return i};var _=0,E=1,A=2,S=3,M=4,T=5,C=6,O={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},R={9728:THREE.NearestFilter,9729:THREE.LinearFilter,9984:THREE.NearestMipmapNearestFilter,9985:THREE.LinearMipmapNearestFilter,9986:THREE.NearestMipmapLinearFilter,9987:THREE.LinearMipmapLinearFilter},k={33071:THREE.ClampToEdgeWrapping,33648:THREE.MirroredRepeatWrapping,10497:THREE.RepeatWrapping},P={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},L={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},D={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},I={CUBICSPLINE:void 0,LINEAR:THREE.InterpolateLinear,STEP:THREE.InterpolateDiscrete},N="OPAQUE",j="MASK",B="BLEND";function F(e,t){return"string"!==typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}function z(e,t,n){for(var r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function H(e,t){void 0!==t.extras&&("object"===typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function U(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(var n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){var i=t.extras.targetNames;if(e.morphTargetInfluences.length===i.length)for(e.morphTargetDictionary={},n=0,r=i.length;n<r;n++)e.morphTargetDictionary[i[n]]=n;else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function V(e){var t=e.extensions&&e.extensions[r.KHR_DRACO_MESH_COMPRESSION];return t?"draco:"+t.bufferView+":"+t.indices+":"+G(t.attributes):e.indices+":"+G(e.attributes)+":"+e.mode}function G(e){for(var t="",n=Object.keys(e).sort(),r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function W(e,t){this.json=e||{},this.extensions={},this.plugins={},this.options=t||{},this.cache=new n,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.nodeNamesUsed={},"undefined"!==typeof createImageBitmap&&!1===/Firefox/.test(navigator.userAgent)?this.textureLoader=new THREE.ImageBitmapLoader(this.options.manager):this.textureLoader=new THREE.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new THREE.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}function q(e,t,n){var r=t.attributes,i=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(var a in r){var s=L[a]||a.toLowerCase();s in e.attributes||i.push(o(r[a],s))}if(void 0!==t.indices&&!e.index){var l=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(l)}return H(e,t),function(e,t,n){var r=t.attributes,i=new THREE.Box3;if(void 0!==r.POSITION){var o=(d=n.json.accessors[r.POSITION]).min,a=d.max;if(void 0!==o&&void 0!==a){i.set(new THREE.Vector3(o[0],o[1],o[2]),new THREE.Vector3(a[0],a[1],a[2]));var s=t.targets;if(void 0!==s){for(var l=new THREE.Vector3,c=new THREE.Vector3,u=0,h=s.length;u<h;u++){var d,f=s[u];void 0!==f.POSITION&&(o=(d=n.json.accessors[f.POSITION]).min,a=d.max,void 0!==o&&void 0!==a?(c.setX(Math.max(Math.abs(o[0]),Math.abs(a[0]))),c.setY(Math.max(Math.abs(o[1]),Math.abs(a[1]))),c.setZ(Math.max(Math.abs(o[2]),Math.abs(a[2]))),l.max(c)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION."))}i.expandByVector(l)}e.boundingBox=i;var p=new THREE.Sphere;i.getCenter(p.center),p.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=p}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}(e,t,n),Promise.all(i).then((function(){return void 0!==t.targets?function(e,t,n){for(var r=!1,i=!1,o=0,a=t.length;o<a&&(void 0!==(c=t[o]).POSITION&&(r=!0),void 0!==c.NORMAL&&(i=!0),!r||!i);o++);if(!r&&!i)return Promise.resolve(e);var s=[],l=[];for(o=0,a=t.length;o<a;o++){var c=t[o];if(r){var u=void 0!==c.POSITION?n.getDependency("accessor",c.POSITION):e.attributes.position;s.push(u)}i&&(u=void 0!==c.NORMAL?n.getDependency("accessor",c.NORMAL):e.attributes.normal,l.push(u))}return Promise.all([Promise.all(s),Promise.all(l)]).then((function(t){var n=t[0],o=t[1];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=o),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}function X(e,t){var n=e.getIndex();if(null===n){var r=[],i=e.getAttribute("position");if(void 0===i)return console.error("THREE.GLTFLoader.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.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var l=e.clone();return l.setIndex(s),l}return W.prototype.setExtensions=function(e){this.extensions=e},W.prototype.setPlugins=function(e){this.plugins=e},W.prototype.parse=function(e,t){var n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then((function(t){var o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};z(i,o,r),H(o,r),e(o)})).catch(t)},W.prototype._markDefs=function(){for(var e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[],r=0,i=t.length;r<i;r++)for(var o=t[r].joints,a=0,s=o.length;a<s;a++)e[o[a]].isBone=!0;for(var l=0,c=e.length;l<c;l++){var u=e[l];void 0!==u.mesh&&(this._addNodeRef(this.meshCache,u.mesh),void 0!==u.skin&&(n[u.mesh].isSkinnedMesh=!0)),void 0!==u.camera&&this._addNodeRef(this.cameraCache,u.camera)}},W.prototype._addNodeRef=function(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)},W.prototype._getNodeRef=function(e,t,n){if(e.refs[t]<=1)return n;var r=n.clone();return r.name+="_instance_"+e.uses[t]++,r},W.prototype._invokeOne=function(e){var t=Object.values(this.plugins);t.push(this);for(var n=0;n<t.length;n++){var r=e(t[n]);if(r)return r}},W.prototype._invokeAll=function(e){var t=Object.values(this.plugins);t.unshift(this);for(var n=[],r=0;r<t.length;r++){var i=e(t[r]);i&&n.push(i)}return n},W.prototype.getDependency=function(e,t){var n=e+":"+t,r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this.loadNode(t);break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this.loadAnimation(t);break;case"camera":r=this.loadCamera(t);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r},W.prototype.getDependencies=function(e){var t=this.cache.get(e);if(!t){var n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t},W.prototype.loadBuffer=function(e){var t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[r.KHR_BINARY_GLTF].body);var i=this.options;return new Promise((function(e,r){n.load(F(t.uri,i.path),e,void 0,(function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))},W.prototype.loadBufferView=function(e){var t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){var n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))},W.prototype.loadAccessor=function(e){var t=this,n=this.json,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse)return Promise.resolve(null);var i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){var i,o,a=e[0],s=P[r.type],l=O[r.componentType],c=l.BYTES_PER_ELEMENT,u=c*s,h=r.byteOffset||0,d=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,f=!0===r.normalized;if(d&&d!==u){var p=Math.floor(h/d),m="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+p+":"+r.count,g=t.cache.get(m);g||(i=new l(a,p*d,r.count*d/c),g=new THREE.InterleavedBuffer(i,d/c),t.cache.add(m,g)),o=new THREE.InterleavedBufferAttribute(g,s,h%d/c,f)}else i=null===a?new l(r.count*s):new l(a,h,r.count*s),o=new THREE.BufferAttribute(i,s,f);if(void 0!==r.sparse){var v=P.SCALAR,y=O[r.sparse.indices.componentType],b=r.sparse.indices.byteOffset||0,w=r.sparse.values.byteOffset||0,x=new y(e[1],b,r.sparse.count*v),_=new l(e[2],w,r.sparse.count*s);null!==a&&(o=new THREE.BufferAttribute(o.array.slice(),o.itemSize,o.normalized));for(var E=0,A=x.length;E<A;E++){var S=x[E];if(o.setX(S,_[E*s]),s>=2&&o.setY(S,_[E*s+1]),s>=3&&o.setZ(S,_[E*s+2]),s>=4&&o.setW(S,_[E*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return o}))},W.prototype.loadTexture=function(e){var t,n,i=this.json,o=this.options,a=i.textures[e],s=a.extensions||{};return(t=s[r.MSFT_TEXTURE_DDS]?i.images[s[r.MSFT_TEXTURE_DDS].source]:i.images[a.source]).uri&&(n=o.manager.getHandler(t.uri)),n||(n=s[r.MSFT_TEXTURE_DDS]?this.extensions[r.MSFT_TEXTURE_DDS].ddsLoader:this.textureLoader),this.loadTextureImage(e,t,n)},W.prototype.loadTextureImage=function(e,t,n){var r=this,i=this.json,o=this.options,a=i.textures[e],s=self.URL||self.webkitURL,l=t.uri,c=!1,u=!0;return"image/jpeg"===t.mimeType&&(u=!1),void 0!==t.bufferView&&(l=r.getDependency("bufferView",t.bufferView).then((function(e){if("image/png"===t.mimeType){var n=new DataView(e,25,1).getUint8(0,!1);u=6===n||4===n||3===n}c=!0;var r=new Blob([e],{type:t.mimeType});return l=s.createObjectURL(r)}))),Promise.resolve(l).then((function(e){return new Promise((function(t,r){var i=t;!0===n.isImageBitmapLoader&&(i=function(e){t(new THREE.CanvasTexture(e))}),n.load(F(e,o.path),i,void 0,r)}))})).then((function(t){!0===c&&s.revokeObjectURL(l),t.flipY=!1,a.name&&(t.name=a.name),u||(t.format=THREE.RGBFormat);var n=(i.samplers||{})[a.sampler]||{};return t.magFilter=R[n.magFilter]||THREE.LinearFilter,t.minFilter=R[n.minFilter]||THREE.LinearMipmapLinearFilter,t.wrapS=k[n.wrapS]||THREE.RepeatWrapping,t.wrapT=k[n.wrapT]||THREE.RepeatWrapping,r.associations.set(t,{type:"textures",index:e}),t}))},W.prototype.assignTexture=function(e,t,n){var i=this;return this.getDependency("texture",n.index).then((function(o){if(void 0===n.texCoord||0==n.texCoord||"aoMap"===t&&1==n.texCoord||console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+t+" not yet supported."),i.extensions[r.KHR_TEXTURE_TRANSFORM]){var a=void 0!==n.extensions?n.extensions[r.KHR_TEXTURE_TRANSFORM]:void 0;if(a){var s=i.associations.get(o);o=i.extensions[r.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),i.associations.set(o,s)}}e[t]=o}))},W.prototype.assignFinalMaterial=function(e){var t=e.geometry,n=e.material,r=void 0!==t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal,a=!0===e.isSkinnedMesh,s=Object.keys(t.morphAttributes).length>0,l=s&&void 0!==t.morphAttributes.normal;if(e.isPoints){var c="PointsMaterial:"+n.uuid,u=this.cache.get(c);u||(u=new THREE.PointsMaterial,THREE.Material.prototype.copy.call(u,n),u.color.copy(n.color),u.map=n.map,u.sizeAttenuation=!1,this.cache.add(c,u)),n=u}else if(e.isLine){c="LineBasicMaterial:"+n.uuid;var h=this.cache.get(c);h||(h=new THREE.LineBasicMaterial,THREE.Material.prototype.copy.call(h,n),h.color.copy(n.color),this.cache.add(c,h)),n=h}if(r||i||o||a||s){c="ClonedMaterial:"+n.uuid+":",n.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),a&&(c+="skinning:"),r&&(c+="vertex-tangents:"),i&&(c+="vertex-colors:"),o&&(c+="flat-shading:"),s&&(c+="morph-targets:"),l&&(c+="morph-normals:");var d=this.cache.get(c);d||(d=n.clone(),a&&(d.skinning=!0),i&&(d.vertexColors=!0),o&&(d.flatShading=!0),s&&(d.morphTargets=!0),l&&(d.morphNormals=!0),r&&(d.vertexTangents=!0,n.normalScale&&(n.normalScale.y*=-1),n.clearcoatNormalScale&&(n.clearcoatNormalScale.y*=-1)),this.cache.add(c,d),this.associations.set(d,this.associations.get(n))),n=d}n.aoMap&&void 0===t.attributes.uv2&&void 0!==t.attributes.uv&&t.setAttribute("uv2",t.attributes.uv),e.material=n},W.prototype.getMaterialType=function(){return THREE.MeshStandardMaterial},W.prototype.loadMaterial=function(e){var t,n=this,i=this.json,o=this.extensions,a=i.materials[e],s={},l=a.extensions||{},c=[];if(l[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var u=o[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];t=u.getMaterialType(),c.push(u.extendParams(s,a,n))}else if(l[r.KHR_MATERIALS_UNLIT]){var h=o[r.KHR_MATERIALS_UNLIT];t=h.getMaterialType(),c.push(h.extendParams(s,a,n))}else{var d=a.pbrMetallicRoughness||{};if(s.color=new THREE.Color(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){var f=d.baseColorFactor;s.color.fromArray(f),s.opacity=f[3]}void 0!==d.baseColorTexture&&c.push(n.assignTexture(s,"map",d.baseColorTexture)),s.metalness=void 0!==d.metallicFactor?d.metallicFactor:1,s.roughness=void 0!==d.roughnessFactor?d.roughnessFactor:1,void 0!==d.metallicRoughnessTexture&&(c.push(n.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),c.push(n.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture))),t=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),c.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)}))))}!0===a.doubleSided&&(s.side=THREE.DoubleSide);var p=a.alphaMode||N;return p===B?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,p===j&&(s.alphaTest=void 0!==a.alphaCutoff?a.alphaCutoff:.5)),void 0!==a.normalTexture&&t!==THREE.MeshBasicMaterial&&(c.push(n.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new THREE.Vector2(1,-1),void 0!==a.normalTexture.scale&&s.normalScale.set(a.normalTexture.scale,-a.normalTexture.scale)),void 0!==a.occlusionTexture&&t!==THREE.MeshBasicMaterial&&(c.push(n.assignTexture(s,"aoMap",a.occlusionTexture)),void 0!==a.occlusionTexture.strength&&(s.aoMapIntensity=a.occlusionTexture.strength)),void 0!==a.emissiveFactor&&t!==THREE.MeshBasicMaterial&&(s.emissive=(new THREE.Color).fromArray(a.emissiveFactor)),void 0!==a.emissiveTexture&&t!==THREE.MeshBasicMaterial&&c.push(n.assignTexture(s,"emissiveMap",a.emissiveTexture)),Promise.all(c).then((function(){var i;return i=t===y?o[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):new t(s),a.name&&(i.name=a.name),i.map&&(i.map.encoding=THREE.sRGBEncoding),i.emissiveMap&&(i.emissiveMap.encoding=THREE.sRGBEncoding),H(i,a),n.associations.set(i,{type:"materials",index:e}),a.extensions&&z(o,i,a),i}))},W.prototype.createUniqueName=function(e){for(var t=THREE.PropertyBinding.sanitizeNodeName(e||""),n=t,r=1;this.nodeNamesUsed[n];++r)n=t+"_"+r;return this.nodeNamesUsed[n]=!0,n},W.prototype.loadGeometries=function(e){var t=this,n=this.extensions,i=this.primitiveCache;function o(e){return n[r.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return q(n,e,t)}))}for(var a=[],s=0,l=e.length;s<l;s++){var c,u=e[s],h=V(u),d=i[h];d?a.push(d.promise):(c=u.extensions&&u.extensions[r.KHR_DRACO_MESH_COMPRESSION]?o(u):q(new THREE.BufferGeometry,u,t),i[h]={primitive:u,promise:c},a.push(c))}return Promise.all(a)},W.prototype.loadMesh=function(e){for(var t,n=this,r=this.json,i=this.extensions,o=r.meshes[e],a=o.primitives,s=[],l=0,c=a.length;l<c;l++){var u=void 0===a[l].material?(void 0===(t=this.cache).DefaultMaterial&&(t.DefaultMaterial=new THREE.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:THREE.FrontSide})),t.DefaultMaterial):this.getDependency("material",a[l].material);s.push(u)}return s.push(n.loadGeometries(a)),Promise.all(s).then((function(t){for(var r=t.slice(0,t.length-1),s=t[t.length-1],l=[],c=0,u=s.length;c<u;c++){var h,d=s[c],f=a[c],p=r[c];if(f.mode===M||f.mode===T||f.mode===C||void 0===f.mode)h=!0===o.isSkinnedMesh?new THREE.SkinnedMesh(d,p):new THREE.Mesh(d,p),!0===p.isMeshStandardMaterial&&p.side===THREE.DoubleSide&&null!==d.getIndex()&&!0===d.hasAttribute("position")&&!0===d.hasAttribute("normal")&&!0===d.hasAttribute("uv")&&!1===d.hasAttribute("tangent")&&(d.computeTangents(),p.vertexTangents=!0),!0!==h.isSkinnedMesh||h.geometry.attributes.skinWeight.normalized||h.normalizeSkinWeights(),f.mode===T?h.geometry=X(h.geometry,THREE.TriangleStripDrawMode):f.mode===C&&(h.geometry=X(h.geometry,THREE.TriangleFanDrawMode));else if(f.mode===E)h=new THREE.LineSegments(d,p);else if(f.mode===S)h=new THREE.Line(d,p);else if(f.mode===A)h=new THREE.LineLoop(d,p);else{if(f.mode!==_)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+f.mode);h=new THREE.Points(d,p)}Object.keys(h.geometry.morphAttributes).length>0&&U(h,o),h.name=n.createUniqueName(o.name||"mesh_"+e),H(h,o),f.extensions&&z(i,h,f),n.assignFinalMaterial(h),l.push(h)}if(1===l.length)return l[0];var m=new THREE.Group;for(c=0,u=l.length;c<u;c++)m.add(l[c]);return m}))},W.prototype.loadCamera=function(e){var t,n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new THREE.PerspectiveCamera(THREE.MathUtils.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new THREE.OrthographicCamera(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),H(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")},W.prototype.loadSkin=function(e){var t=this.json.skins[e],n={joints:t.joints};return void 0===t.inverseBindMatrices?Promise.resolve(n):this.getDependency("accessor",t.inverseBindMatrices).then((function(e){return n.inverseBindMatrices=e,n}))},W.prototype.loadAnimation=function(e){for(var t=this.json.animations[e],n=[],r=[],i=[],o=[],a=[],s=0,l=t.channels.length;s<l;s++){var c=t.channels[s],u=t.samplers[c.sampler],h=c.target,d=void 0!==h.node?h.node:h.id,f=void 0!==t.parameters?t.parameters[u.input]:u.input,p=void 0!==t.parameters?t.parameters[u.output]:u.output;n.push(this.getDependency("node",d)),r.push(this.getDependency("accessor",f)),i.push(this.getDependency("accessor",p)),o.push(u),a.push(h)}return Promise.all([Promise.all(n),Promise.all(r),Promise.all(i),Promise.all(o),Promise.all(a)]).then((function(n){for(var r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=[],c=0,u=r.length;c<u;c++){var h=r[c],d=i[c],f=o[c],p=a[c],m=s[c];if(void 0!==h){var g;switch(h.updateMatrix(),h.matrixAutoUpdate=!0,D[m.path]){case D.weights:g=THREE.NumberKeyframeTrack;break;case D.rotation:g=THREE.QuaternionKeyframeTrack;break;case D.position:case D.scale:default:g=THREE.VectorKeyframeTrack}var v=h.name?h.name:h.uuid,y=void 0!==p.interpolation?I[p.interpolation]:THREE.InterpolateLinear,b=[];D[m.path]===D.weights?h.traverse((function(e){!0===e.isMesh&&e.morphTargetInfluences&&b.push(e.name?e.name:e.uuid)})):b.push(v);var w=f.array;if(f.normalized){var _;if(w.constructor===Int8Array)_=1/127;else if(w.constructor===Uint8Array)_=1/255;else if(w.constructor==Int16Array)_=1/32767;else{if(w.constructor!==Uint16Array)throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");_=1/65535}for(var E=new Float32Array(w.length),A=0,S=w.length;A<S;A++)E[A]=w[A]*_;w=E}for(A=0,S=b.length;A<S;A++){var M=new g(b[A]+"."+D[m.path],d.array,w,y);"CUBICSPLINE"===p.interpolation&&(M.createInterpolant=function(e){return new x(this.times,this.values,this.getValueSize()/3,e)},M.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(M)}}}var T=t.name?t.name:"animation_"+e;return new THREE.AnimationClip(T,void 0,l)}))},W.prototype.loadNode=function(e){var t=this.json,n=this.extensions,r=this,i=t.nodes[e],o=i.name?r.createUniqueName(i.name):"";return function(){var t=[];return void 0!==i.mesh&&t.push(r.getDependency("mesh",i.mesh).then((function(e){var t=r._getNodeRef(r.meshCache,i.mesh,e);return void 0!==i.weights&&t.traverse((function(e){if(e.isMesh)for(var t=0,n=i.weights.length;t<n;t++)e.morphTargetInfluences[t]=i.weights[t]})),t}))),void 0!==i.camera&&t.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){t.push(e)})),Promise.all(t)}().then((function(t){var a;if((a=!0===i.isBone?new THREE.Bone:t.length>1?new THREE.Group:1===t.length?t[0]:new THREE.Object3D)!==t[0])for(var s=0,l=t.length;s<l;s++)a.add(t[s]);if(i.name&&(a.userData.name=i.name,a.name=o),H(a,i),i.extensions&&z(n,a,i),void 0!==i.matrix){var c=new THREE.Matrix4;c.fromArray(i.matrix),a.applyMatrix4(c)}else void 0!==i.translation&&a.position.fromArray(i.translation),void 0!==i.rotation&&a.quaternion.fromArray(i.rotation),void 0!==i.scale&&a.scale.fromArray(i.scale);return r.associations.set(a,{type:"nodes",index:e}),a}))},W.prototype.loadScene=function(){function e(t,n,r,i){var o=r.nodes[t];return i.getDependency("node",t).then((function(e){return void 0===o.skin?e:i.getDependency("skin",o.skin).then((function(e){for(var n=[],r=0,o=(t=e).joints.length;r<o;r++)n.push(i.getDependency("node",t.joints[r]));return Promise.all(n)})).then((function(n){return e.traverse((function(e){if(e.isMesh){for(var r=[],i=[],o=0,a=n.length;o<a;o++){var s=n[o];if(s){r.push(s);var l=new THREE.Matrix4;void 0!==t.inverseBindMatrices&&l.fromArray(t.inverseBindMatrices.array,16*o),i.push(l)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[o])}e.bind(new THREE.Skeleton(r,i),e.matrixWorld)}})),e}));var t})).then((function(t){n.add(t);var a=[];if(o.children)for(var s=o.children,l=0,c=s.length;l<c;l++){var u=s[l];a.push(e(u,t,r,i))}return Promise.all(a)}))}return function(t){var n=this.json,r=this.extensions,i=this.json.scenes[t],o=new THREE.Group;i.name&&(o.name=this.createUniqueName(i.name)),H(o,i),i.extensions&&z(r,o,i);for(var a=i.nodes||[],s=[],l=0,c=a.length;l<c;l++)s.push(e(a[l],o,n,this));return Promise.all(s).then((function(){return o}))}}(),t}()},{}],60:[function(t,n,r){THREE.MTLLoader=function(e){THREE.Loader.call(this,e)},THREE.MTLLoader.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:THREE.MTLLoader,load:function(t,n,r,i){var o=this,a=""===this.path?THREE.LoaderUtils.extractUrlBase(t):this.path,s=new THREE.FileLoader(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,(function(r){try{n(o.parse(r,a))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},setMaterialOptions:function(e){return this.materialOptions=e,this},parse:function(e,t){for(var n=e.split("\n"),r={},i=/\s+/,o={},a=0;a<n.length;a++){var s=n[a];if(0!==(s=s.trim()).length&&"#"!==s.charAt(0)){var l=s.indexOf(" "),c=l>=0?s.substring(0,l):s;c=c.toLowerCase();var u=l>=0?s.substring(l+1):"";if(u=u.trim(),"newmtl"===c)r={name:u},o[u]=r;else if("ka"===c||"kd"===c||"ks"===c||"ke"===c){var h=u.split(i,3);r[c]=[parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])]}else r[c]=u}}var d=new THREE.MTLLoader.MaterialCreator(this.resourcePath||t,this.materialOptions);return d.setCrossOrigin(this.crossOrigin),d.setManager(this.manager),d.setMaterials(o),d}}),THREE.MTLLoader.MaterialCreator=function(e,t){this.baseUrl=e||"",this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,crossOrigin:"anonymous",setCrossOrigin:function(e){return this.crossOrigin=e,this},setManager:function(e){this.manager=e},setMaterials:function(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(e){if(!this.options)return e;var t={};for(var n in e){var r=e[n],i={};for(var o in t[n]=i,r){var a=!0,s=r[o],l=o.toLowerCase();switch(l){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(a=!1)}a&&(i[l]=s)}}return t},preload:function(){for(var e in this.materialsInfo)this.create(e)},getIndex:function(e){return this.nameLookup[e]},getAsArray:function(){var e=0;for(var t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray},create:function(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]},createMaterial_:function(e){var t=this,n=this.materialsInfo[e],r={name:e,side:this.side};function i(e,n){if(!r[e]){var i,o,a=t.getTextureParams(n,r),s=t.loadTexture((i=t.baseUrl,"string"!==typeof(o=a.url)||""===o?"":/^https?:\/\//i.test(o)?o:i+o));s.repeat.copy(a.scale),s.offset.copy(a.offset),s.wrapS=t.wrap,s.wrapT=t.wrap,r[e]=s}}for(var o in n){var a,s=n[o];if(""!==s)switch(o.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(s);break;case"ks":r.specular=(new THREE.Color).fromArray(s);break;case"ke":r.emissive=(new THREE.Color).fromArray(s);break;case"map_kd":i("map",s);break;case"map_ks":i("specularMap",s);break;case"map_ke":i("emissiveMap",s);break;case"norm":i("normalMap",s);break;case"map_bump":case"bump":i("bumpMap",s);break;case"map_d":i("alphaMap",s),r.transparent=!0;break;case"ns":r.shininess=parseFloat(s);break;case"d":(a=parseFloat(s))<1&&(r.opacity=a,r.transparent=!0);break;case"tr":a=parseFloat(s),this.options&&this.options.invertTrProperty&&(a=1-a),a>0&&(r.opacity=1-a,r.transparent=!0)}}return this.materials[e]=new THREE.MeshPhongMaterial(r),this.materials[e]},getTextureParams:function(e,t){var n,r={scale:new THREE.Vector2(1,1),offset:new THREE.Vector2(0,0)},i=e.split(/\s+/);return(n=i.indexOf("-bm"))>=0&&(t.bumpScale=parseFloat(i[n+1]),i.splice(n,2)),(n=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),(n=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[n+1]),parseFloat(i[n+2])),i.splice(n,4)),r.url=i.join(" ").trim(),r},loadTexture:function(e,t,n,r,i){var o,a=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager,s=a.getHandler(e);return null===s&&(s=new THREE.TextureLoader(a)),s.setCrossOrigin&&s.setCrossOrigin(this.crossOrigin),o=s.load(e,n,r,i),void 0!==t&&(o.mapping=t),o}}},{}],61:[function(t,n,r){THREE.OBJLoader=function(){var t=/^[og]\s*(.+)?/,n=/^mtllib /,r=/^usemtl /,i=/^usemap /,o=new THREE.Vector3,a=new THREE.Vector3,s=new THREE.Vector3,l=new THREE.Vector3,c=new THREE.Vector3;function u(){var e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);var n=this.object&&"function"===typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){var n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);var r={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){var t={index:"number"===typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){var t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(var n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"===typeof n.clone){var r=n.clone(0);r.inherited=!0,this.object.materials.push(r)}this.objects.push(this.object)},finalize:function(){this.object&&"function"===typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){var n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){var n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){var n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){var r=this.vertices,i=this.object.geometry.vertices;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){var t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){var r=this.normals,i=this.object.geometry.normals;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(e,t,n){var r=this.vertices,i=this.object.geometry.normals;o.fromArray(r,e),a.fromArray(r,t),s.fromArray(r,n),c.subVectors(s,a),l.subVectors(o,a),c.cross(l),c.normalize(),i.push(c.x,c.y,c.z),i.push(c.x,c.y,c.z),i.push(c.x,c.y,c.z)},addColor:function(e,t,n){var r=this.colors,i=this.object.geometry.colors;void 0!==r[e]&&i.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&i.push(r[t+0],r[t+1],r[t+2]),void 0!==r[n]&&i.push(r[n+0],r[n+1],r[n+2])},addUV:function(e,t,n){var r=this.uvs,i=this.object.geometry.uvs;i.push(r[e+0],r[e+1]),i.push(r[t+0],r[t+1]),i.push(r[n+0],r[n+1])},addDefaultUV:function(){var e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){var t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,r,i,o,a,s,l){var c=this.vertices.length,u=this.parseVertexIndex(e,c),h=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(u,h,d),this.addColor(u,h,d),void 0!==a&&""!==a){var f=this.normals.length;u=this.parseNormalIndex(a,f),h=this.parseNormalIndex(s,f),d=this.parseNormalIndex(l,f),this.addNormal(u,h,d)}else this.addFaceNormal(u,h,d);if(void 0!==r&&""!==r){var p=this.uvs.length;u=this.parseUVIndex(r,p),h=this.parseUVIndex(i,p),d=this.parseUVIndex(o,p),this.addUV(u,h,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";for(var t=this.vertices.length,n=0,r=e.length;n<r;n++){var i=this.parseVertexIndex(e[n],t);this.addVertexPoint(i),this.addColor(i)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";for(var n=this.vertices.length,r=this.uvs.length,i=0,o=e.length;i<o;i++)this.addVertexLine(this.parseVertexIndex(e[i],n));var a=0;for(o=t.length;a<o;a++)this.addUVLine(this.parseUVIndex(t[a],r))}};return e.startObject("",!1),e}function h(e){THREE.Loader.call(this,e),this.materials=null}return h.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:h,load:function(t,n,r,i){var o=this,a=new THREE.FileLoader(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,(function(r){try{n(o.parse(r))}catch(e){i?i(e):console.error(e),o.manager.itemError(t)}}),r,i)},setMaterials:function(e){return this.materials=e,this},parse:function(e){var o=new u;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));for(var a=e.split("\n"),s="",l="",c=[],h="function"===typeof"".trimLeft,d=0,f=a.length;d<f;d++)if(s=a[d],0!==(s=h?s.trimLeft():s.trim()).length&&"#"!==(l=s.charAt(0)))if("v"===l){var p=s.split(/\s+/);switch(p[0]){case"v":o.vertices.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])),p.length>=7?o.colors.push(parseFloat(p[4]),parseFloat(p[5]),parseFloat(p[6])):o.colors.push(void 0,void 0,void 0);break;case"vn":o.normals.push(parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3]));break;case"vt":o.uvs.push(parseFloat(p[1]),parseFloat(p[2]))}}else if("f"===l){for(var m=s.substr(1).trim().split(/\s+/),g=[],v=0,y=m.length;v<y;v++){var b=m[v];if(b.length>0){var w=b.split("/");g.push(w)}}var x=g[0];for(v=1,y=g.length-1;v<y;v++){var _=g[v],E=g[v+1];o.addFace(x[0],_[0],E[0],x[1],_[1],E[1],x[2],_[2],E[2])}}else if("l"===l){var A=s.substring(1).trim().split(" "),S=[],M=[];if(-1===s.indexOf("/"))S=A;else for(var T=0,C=A.length;T<C;T++){var O=A[T].split("/");""!==O[0]&&S.push(O[0]),""!==O[1]&&M.push(O[1])}o.addLineGeometry(S,M)}else if("p"===l){var R=s.substr(1).trim().split(" ");o.addPointGeometry(R)}else if(null!==(c=t.exec(s))){var k=(" "+c[0].substr(1).trim()).substr(1);o.startObject(k)}else if(r.test(s))o.object.startMaterial(s.substring(7).trim(),o.materialLibraries);else if(n.test(s))o.materialLibraries.push(s.substring(7).trim());else if(i.test(s))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===l){if((c=s.split(" ")).length>1){var P=c[1].trim().toLowerCase();o.object.smooth="0"!==P&&"off"!==P}else o.object.smooth=!0;(W=o.object.currentMaterial())&&(W.smooth=o.object.smooth)}else{if("\0"===s)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+s+'"')}o.finalize();var L=new THREE.Group;if(L.materialLibraries=[].concat(o.materialLibraries),!0===!(1===o.objects.length&&0===o.objects[0].geometry.vertices.length))for(d=0,f=o.objects.length;d<f;d++){var D=o.objects[d],I=D.geometry,N=D.materials,j="Line"===I.type,B="Points"===I.type,F=!1;if(0!==I.vertices.length){(K=new THREE.BufferGeometry).setAttribute("position",new THREE.Float32BufferAttribute(I.vertices,3)),I.normals.length>0&&K.setAttribute("normal",new THREE.Float32BufferAttribute(I.normals,3)),I.colors.length>0&&(F=!0,K.setAttribute("color",new THREE.Float32BufferAttribute(I.colors,3))),!0===I.hasUVIndices&&K.setAttribute("uv",new THREE.Float32BufferAttribute(I.uvs,2));for(var z,H=[],U=0,V=N.length;U<V;U++){var G=(Y=N[U]).name+"_"+Y.smooth+"_"+F,W=o.materials[G];if(null!==this.materials)if(W=this.materials.create(Y.name),!j||!W||W instanceof THREE.LineBasicMaterial){if(B&&W&&!(W instanceof THREE.PointsMaterial)){var q=new THREE.PointsMaterial({size:10,sizeAttenuation:!1});THREE.Material.prototype.copy.call(q,W),q.color.copy(W.color),q.map=W.map,W=q}}else{var X=new THREE.LineBasicMaterial;THREE.Material.prototype.copy.call(X,W),X.color.copy(W.color),W=X}void 0===W&&((W=j?new THREE.LineBasicMaterial:B?new THREE.PointsMaterial({size:1,sizeAttenuation:!1}):new THREE.MeshPhongMaterial).name=Y.name,W.flatShading=!Y.smooth,W.vertexColors=F,o.materials[G]=W),H.push(W)}if(H.length>1){for(U=0,V=N.length;U<V;U++){var Y=N[U];K.addGroup(Y.groupStart,Y.groupCount,U)}z=j?new THREE.LineSegments(K,H):B?new THREE.Points(K,H):new THREE.Mesh(K,H)}else z=j?new THREE.LineSegments(K,H[0]):B?new THREE.Points(K,H[0]):new THREE.Mesh(K,H[0]);z.name=D.name,L.add(z)}}else if(o.vertices.length>0){var K;W=new THREE.PointsMaterial({size:1,sizeAttenuation:!1}),(K=new THREE.BufferGeometry).setAttribute("position",new THREE.Float32BufferAttribute(o.vertices,3)),o.colors.length>0&&void 0!==o.colors[0]&&(K.setAttribute("color",new THREE.Float32BufferAttribute(o.colors,3)),W.vertexColors=!0);var Q=new THREE.Points(K,W);L.add(Q)}return L}}),h}()},{}],62:[function(e,t,n){THREE.BufferGeometryUtils={computeTangents:function(e){e.computeTangents(),console.warn("THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.")},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=e[0].morphTargetsRelative,l=new THREE.BufferGeometry,c=0,u=0;u<e.length;++u){var h=e[u],d=0;if(n!==(null!==h.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(var f in h.attributes){if(!r.has(f))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+'. All geometries must have compatible attributes; make sure "'+f+'" attribute exists among all geometries, or in none of them.'),null;void 0===o[f]&&(o[f]=[]),o[f].push(h.attributes[f]),d++}if(d!==r.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". Make sure all geometries have the same number of attributes."),null;if(s!==h.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(var f in h.morphAttributes){if(!i.has(f))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". .morphAttributes must be consistent throughout all geometries."),null;void 0===a[f]&&(a[f]=[]),a[f].push(h.morphAttributes[f])}if(l.userData.mergedUserData=l.userData.mergedUserData||[],l.userData.mergedUserData.push(h.userData),t){var p;if(n)p=h.index.count;else{if(void 0===h.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+u+". The geometry must have either an index or a position attribute"),null;p=h.attributes.position.count}l.addGroup(c,p,u),c+=p}}if(n){var m=0,g=[];for(u=0;u<e.length;++u){for(var v=e[u].index,y=0;y<v.count;++y)g.push(v.getX(y)+m);m+=e[u].attributes.position.count}l.setIndex(g)}for(var f in o){var b=this.mergeBufferAttributes(o[f]);if(!b)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+f+" attribute."),null;l.setAttribute(f,b)}for(var f in a){var w=a[f][0].length;if(0===w)break;for(l.morphAttributes=l.morphAttributes||{},l.morphAttributes[f]=[],u=0;u<w;++u){var x=[];for(y=0;y<a[f].length;++y)x.push(a[f][y][u]);var _=this.mergeBufferAttributes(x);if(!_)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the "+f+" morphAttribute."),null;l.morphAttributes[f].push(_)}}return l},mergeBufferAttributes:function(e){for(var t,n,r,i=0,o=0;o<e.length;++o){var a=e[o];if(a.isInterleavedBufferAttribute)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported."),null;if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(void 0===n&&(n=a.itemSize),n!==a.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(void 0===r&&(r=a.normalized),r!==a.normalized)return console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;i+=a.array.length}var s=new t(i),l=0;for(o=0;o<e.length;++o)s.set(e[o].array,l),l+=e[o].array.length;return new THREE.BufferAttribute(s,n,r)},interleaveAttributes:function(e){for(var t,n=0,r=0,i=0,o=e.length;i<o;++i){var a=e[i];if(void 0===t&&(t=a.array.constructor),t!==a.array.constructor)return console.error("AttributeBuffers of different types cannot be interleaved"),null;n+=a.array.length,r+=a.itemSize}var s=new THREE.InterleavedBuffer(new t(n),r),l=0,c=[],u=["getX","getY","getZ","getW"],h=["setX","setY","setZ","setW"],d=0;for(o=e.length;d<o;d++){var f=(a=e[d]).itemSize,p=a.count,m=new THREE.InterleavedBufferAttribute(s,f,l,a.normalized);c.push(m),l+=f;for(var g=0;g<p;g++)for(var v=0;v<f;v++)m[h[v]](g,a[u[v]](g))}return c},estimateBytesUsed:function(e){var t=0;for(var n in e.attributes){var r=e.getAttribute(n);t+=r.count*r.itemSize*r.array.BYTES_PER_ELEMENT}var i=e.getIndex();return t+=i?i.count*i.itemSize*i.array.BYTES_PER_ELEMENT:0},mergeVertices:function(e,t=1e-4){t=Math.max(t,Number.EPSILON);for(var n={},r=e.getIndex(),i=e.getAttribute("position"),o=r?r.count:i.count,a=0,s=Object.keys(e.attributes),l={},c={},u=[],h=["getX","getY","getZ","getW"],d=0,f=s.length;d<f;d++)l[b=s[d]]=[],(E=e.morphAttributes[b])&&(c[b]=new Array(E.length).fill().map(()=>[]));var p=Math.log10(1/t),m=Math.pow(10,p);for(d=0;d<o;d++){var g=r?r.getX(d):d,v="",y=0;for(f=s.length;y<f;y++)for(var b=s[y],w=(_=e.getAttribute(b)).itemSize,x=0;x<w;x++)v+=~~(_[h[x]](g)*m)+",";if(v in n)u.push(n[v]);else{for(y=0,f=s.length;y<f;y++){b=s[y];var _=e.getAttribute(b),E=e.morphAttributes[b],A=(w=_.itemSize,l[b]),S=c[b];for(x=0;x<w;x++){var M=h[x];if(A.push(_[M](g)),E)for(var T=0,C=E.length;T<C;T++)S[T].push(E[T][M](g))}}n[v]=a,u.push(a),a++}}const O=e.clone();for(d=0,f=s.length;d<f;d++){b=s[d];var R=e.getAttribute(b),k=new R.array.constructor(l[b]);if(_=new THREE.BufferAttribute(k,R.itemSize,R.normalized),O.setAttribute(b,_),b in c)for(y=0;y<c[b].length;y++){var P=e.morphAttributes[b][y],L=(k=new P.array.constructor(c[b][y]),new THREE.BufferAttribute(k,P.itemSize,P.normalized));O.morphAttributes[b][y]=L}}return O.setIndex(u),O},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 l=e.clone();return l.setIndex(s),l.clearGroups(),l}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e},computeMorphedAttributes:function(e){if(!0!==e.geometry.isBufferGeometry)return console.error("THREE.BufferGeometryUtils: Geometry is not of type THREE.BufferGeometry."),null;var t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3,i=new THREE.Vector3,o=new THREE.Vector3,a=new THREE.Vector3,s=new THREE.Vector3,l=new THREE.Vector3,c=new THREE.Vector3;function u(e,u,h,d,f,p,m,g,v){t.fromBufferAttribute(h,p),n.fromBufferAttribute(h,m),r.fromBufferAttribute(h,g);var y=e.morphTargetInfluences;if(u.morphTargets&&d&&y){s.set(0,0,0),l.set(0,0,0),c.set(0,0,0);for(var b=0,w=d.length;b<w;b++){var x=y[b];d=d[b],0!==x&&(i.fromBufferAttribute(d,p),o.fromBufferAttribute(d,m),a.fromBufferAttribute(d,g),f?(s.addScaledVector(i,x),l.addScaledVector(o,x),c.addScaledVector(a,x)):(s.addScaledVector(i.sub(t),x),l.addScaledVector(o.sub(n),x),c.addScaledVector(a.sub(r),x)))}t.add(s),n.add(l),r.add(c)}e.isSkinnedMesh&&(e.boneTransform(p,t),e.boneTransform(m,n),e.boneTransform(g,r)),v[3*p+0]=t.x,v[3*p+1]=t.y,v[3*p+2]=t.z,v[3*m+0]=n.x,v[3*m+1]=n.y,v[3*m+2]=n.z,v[3*g+0]=r.x,v[3*g+1]=r.y,v[3*g+2]=r.z}var h,d,f,p,m,g,v,y,b,w=e.geometry,x=e.material,_=w.index,E=w.attributes.position,A=w.morphAttributes.position,S=w.morphTargetsRelative,M=w.attributes.normal,T=w.morphAttributes.position,C=w.groups,O=w.drawRange,R=new Float32Array(E.count*E.itemSize),k=new Float32Array(M.count*M.itemSize);if(null!==_)if(Array.isArray(x))for(p=0,g=C.length;p<g;p++)for(b=x[(y=C[p]).materialIndex],m=Math.max(y.start,O.start),v=Math.min(y.start+y.count,O.start+O.count);m<v;m+=3)u(e,b,E,A,S,h=_.getX(m),d=_.getX(m+1),f=_.getX(m+2),R),u(e,b,M,T,S,h,d,f,k);else for(p=Math.max(0,O.start),g=Math.min(_.count,O.start+O.count);p<g;p+=3)u(e,x,E,A,S,h=_.getX(p),d=_.getX(p+1),f=_.getX(p+2),R),u(e,x,M,T,S,h,d,f,k);else if(void 0!==E)if(Array.isArray(x))for(p=0,g=C.length;p<g;p++)for(b=x[(y=C[p]).materialIndex],m=Math.max(y.start,O.start),v=Math.min(y.start+y.count,O.start+O.count);m<v;m+=3)u(e,b,E,A,S,h=m,d=m+1,f=m+2,R),u(e,b,M,T,S,h,d,f,k);else for(p=Math.max(0,O.start),g=Math.min(E.count,O.start+O.count);p<g;p+=3)u(e,x,E,A,S,h=p,d=p+1,f=p+2,R),u(e,x,M,T,S,h,d,f,k);return{positionAttribute:E,normalAttribute:M,morphedPositionAttribute:new THREE.Float32BufferAttribute(R,3),morphedNormalAttribute:new THREE.Float32BufferAttribute(k,3)}}}},{}],63:[function(e,t,n){var r=e("layout-bmfont-text"),i=e("inherits"),o=e("quad-indices"),a=e("three-buffer-vertex-data"),s=e("object-assign"),l=e("./lib/vertices"),c=e("./lib/utils"),u=THREE.BufferGeometry;function h(e){u.call(this),"string"===typeof e&&(e={text:e}),this._opt=s({},e),e&&this.update(e)}t.exports=function(e){return new h(e)},i(h,u),h.prototype.update=function(e){if("string"===typeof e&&(e={text:e}),!(e=s({},this._opt,e)).font)throw new TypeError("must specify a { font } in options");this.layout=r(e);var t=!1!==e.flipY,n=e.font,i=n.common.scaleW,c=n.common.scaleH,u=this.layout.glyphs.filter((function(e){var t=e.data;return t.width*t.height>0}));this.visibleGlyphs=u;var h=l.positions(u),d=l.uvs(u,i,c,t),f=o({clockwise:!0,type:"uint16",count:u.length});if(a.index(this,f,1,"uint16"),a.attr(this,"position",h,2),a.attr(this,"uv",d,2),!e.multipage&&"page"in this.attributes)this.removeAttribute("page");else if(e.multipage){var p=l.pages(u);a.attr(this,"page",p,1)}},h.prototype.computeBoundingSphere=function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var e=this.attributes.position.array,t=this.attributes.position.itemSize;if(!e||!t||e.length<2)return this.boundingSphere.radius=0,void this.boundingSphere.center.set(0,0,0);c.computeSphere(e,this.boundingSphere),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.')},h.prototype.computeBoundingBox=function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var e=this.boundingBox,t=this.attributes.position.array,n=this.attributes.position.itemSize;!t||!n||t.length<2?e.makeEmpty():c.computeBox(t,e)}},{"./lib/utils":64,"./lib/vertices":65,inherits:30,"layout-bmfont-text":36,"object-assign":39,"quad-indices":51,"three-buffer-vertex-data":66}],64:[function(e,t,n){var r={min:[0,0],max:[0,0]};function i(e){var t=e.length/2;r.min[0]=e[0],r.min[1]=e[1],r.max[0]=e[0],r.max[1]=e[1];for(var n=0;n<t;n++){var i=e[2*n+0],o=e[2*n+1];r.min[0]=Math.min(i,r.min[0]),r.min[1]=Math.min(o,r.min[1]),r.max[0]=Math.max(i,r.max[0]),r.max[1]=Math.max(o,r.max[1])}}t.exports.computeBox=function(e,t){i(e),t.min.set(r.min[0],r.min[1],0),t.max.set(r.max[0],r.max[1],0)},t.exports.computeSphere=function(e,t){i(e);var n=r.min[0],o=r.min[1],a=r.max[0]-n,s=r.max[1]-o,l=Math.sqrt(a*a+s*s);t.center.set(n+a/2,o+s/2,0),t.radius=l/2}},{}],65:[function(e,t,n){t.exports.pages=function(e){var t=new Float32Array(4*e.length*1),n=0;return e.forEach((function(e){var r=e.data.page||0;t[n++]=r,t[n++]=r,t[n++]=r,t[n++]=r})),t},t.exports.uvs=function(e,t,n,r){var i=new Float32Array(4*e.length*2),o=0;return e.forEach((function(e){var a=e.data,s=a.x+a.width,l=a.y+a.height,c=a.x/t,u=a.y/n,h=s/t,d=l/n;r&&(u=(n-a.y)/n,d=(n-l)/n),i[o++]=c,i[o++]=u,i[o++]=c,i[o++]=d,i[o++]=h,i[o++]=d,i[o++]=h,i[o++]=u})),i},t.exports.positions=function(e){var t=new Float32Array(4*e.length*2),n=0;return e.forEach((function(e){var r=e.data,i=e.position[0]+r.xoffset,o=e.position[1]+r.yoffset,a=r.width,s=r.height;t[n++]=i,t[n++]=o,t[n++]=i,t[n++]=o+s,t[n++]=i+a,t[n++]=o+s,t[n++]=i+a,t[n++]=o})),t}},{}],66:[function(e,t,n){var r=e("flatten-vertex-data");function i(e,t,n,i){return t=r(t=t||[],i),(e=new THREE.BufferAttribute(t,n)).itemSize=n,e.needsUpdate=!0,e}t.exports.attr=function(e,t,n,r,o){if("number"!==typeof r&&(r=3),"string"!==typeof o&&(o="float32"),Array.isArray(n)&&Array.isArray(n[0])&&n[0].length!==r)throw new Error("Nested vertex array has unexpected size; expected "+r+" but found "+n[0].length);var a=i(e.getAttribute(t),n,r,o);e.setAttribute(t,a)},t.exports.index=function(e,t,n,r){"number"!==typeof n&&(n=1),"string"!==typeof r&&(r="uint16");var o=!e.index&&"function"!==typeof e.setIndex,a=i(o?e.getAttribute("index"):e.index,t,n,r);a&&(o?e.addAttribute("index",a):e.index=a)}},{"flatten-vertex-data":23}],67:[function(e,t,n){(function(t,r){var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},l=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"===typeof t?t:function(e){var t=l++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"===typeof r?r:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":49,timers:67}],68:[function(e,t,r){(function(e){!function(e,n){"object"===typeof r&&"undefined"!==typeof t?t.exports=n():e.WebVRPolyfill=n()}(this,(function(){"use strict";var t,n="undefined"!==typeof window?window:"undefined"!==typeof e?e:"undefined"!==typeof self?self:{},r=function(){return/Android/i.test(navigator.userAgent)||/iPhone|iPad|iPod/i.test(navigator.userAgent)},i=function(e,t){for(var n=0,r=e.length;n<r;n++)t[n]=e[n]},o=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},a=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){e.exports=function(){var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(e,t,n){return e+(t-e)*n},i=function(){var e=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return e}}(),o=function(){var e=-1!==navigator.userAgent.indexOf("Version")&&-1!==navigator.userAgent.indexOf("Android")&&-1!==navigator.userAgent.indexOf("Chrome");return function(){return e}}(),a=function(){var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return e}}(),s=function(){var e=-1!==navigator.userAgent.indexOf("Firefox")&&-1!==navigator.userAgent.indexOf("Android");return function(){return e}}(),l=function(){var e=navigator.userAgent.match(/.*Chrome\/([0-9]+)/),t=e?parseInt(e[1],10):null;return function(){return t}}(),c=function(){var e;return e=i()&&a()&&-1!==navigator.userAgent.indexOf("13_4"),function(){return e}}(),u=function(){var e=!1;if(65===l()){var n=navigator.userAgent.match(/.*Chrome\/([0-9\.]*)/);if(n){var r=n[1].split("."),i=t(r,4),o=(i[0],i[1],i[2]),a=i[3];e=3325===parseInt(o,10)&&parseInt(a,10)<148}}return function(){return e}}(),h=function(){var e=-1!==navigator.userAgent.indexOf("R7 Build");return function(){return e}}(),d=function(){var e=90==window.orientation||-90==window.orientation;return h()?!e:e},f=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},p=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},m=function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},g=function(e,t,n,r){var i=e.createShader(e.VERTEX_SHADER);e.shaderSource(i,t),e.compileShader(i);var o=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(o,n),e.compileShader(o);var a=e.createProgram();for(var s in e.attachShader(a,i),e.attachShader(a,o),r)e.bindAttribLocation(a,r[s],s);return e.linkProgram(a),e.deleteShader(i),e.deleteShader(o),a},v=function(e,t){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i="",o=0;o<r;o++)n[i=e.getActiveUniform(t,o).name.replace("[0]","")]=e.getUniformLocation(t,i);return n},y=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t},b=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},w=function(e){if(i()){var t=e.style.width,n=e.style.height;e.style.width=parseInt(t)+1+"px",e.style.height=parseInt(n)+"px",setTimeout((function(){e.style.width=t,e.style.height=n}),100)}window.canvas=e},x=function(){var e=Math.PI/180,t=.25*Math.PI,n=new Float32Array([0,0,0,1]),r=new Float32Array([0,0,0]);function i(i,o,a,s,l,c){!function(n,r,i,o){var a=Math.tan(r?r.upDegrees*e:t),s=Math.tan(r?r.downDegrees*e:t),l=Math.tan(r?r.leftDegrees*e:t),c=Math.tan(r?r.rightDegrees*e:t),u=2/(l+c),h=2/(a+s);n[0]=u,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=h,n[6]=0,n[7]=0,n[8]=-(l-c)*u*.5,n[9]=(a-s)*h*.5,n[10]=o/(i-o),n[11]=-1,n[12]=0,n[13]=0,n[14]=o*i/(i-o),n[15]=0}(i,s||null,c.depthNear,c.depthFar),function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=r+r,l=i+i,c=o+o,u=r*s,h=r*l,d=r*c,f=i*l,p=i*c,m=o*c,g=a*s,v=a*l,y=a*c;e[0]=1-(f+m),e[1]=h+y,e[2]=d-v,e[3]=0,e[4]=h-y,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=d+v,e[9]=p-g,e[10]=1-(u+f),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1}(o,a.orientation||n,a.position||r),l&&function(e,t,n){var r,i,o,a,s,l,c,u,h,d,f,p,m=n[0],g=n[1],v=n[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=r*m+s*g+h*v+t[12],e[13]=i*m+l*g+d*v+t[13],e[14]=o*m+c*g+f*v+t[14],e[15]=a*m+u*g+p*v+t[15])}(o,o,l),function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],p=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,w=n*c-o*a,x=r*l-i*s,_=r*c-o*s,E=i*c-o*l,A=u*m-h*p,S=u*g-d*p,M=u*v-f*p,T=h*g-d*m,C=h*v-f*m,O=d*v-f*g,R=y*O-b*C+w*T+x*M-_*S+E*A;R&&(R=1/R,e[0]=(s*O-l*C+c*T)*R,e[1]=(i*C-r*O-o*T)*R,e[2]=(m*E-g*_+v*x)*R,e[3]=(d*_-h*E-f*x)*R,e[4]=(l*M-a*O-c*S)*R,e[5]=(n*O-i*M+o*S)*R,e[6]=(g*w-p*E-v*b)*R,e[7]=(u*E-d*w+f*b)*R,e[8]=(a*C-s*M+c*A)*R,e[9]=(r*M-n*C-o*A)*R,e[10]=(p*_-m*w+v*y)*R,e[11]=(h*w-u*_-f*y)*R,e[12]=(s*S-a*T-l*A)*R,e[13]=(n*T-r*S+i*A)*R,e[14]=(m*b-p*x-g*y)*R,e[15]=(u*x-h*b+d*y)*R)}(o,o)}return function(e,t,n){return!(!e||!t)&&(e.pose=t,e.timestamp=t.timestamp,i(e.leftProjectionMatrix,e.leftViewMatrix,t,n._getFieldOfView("left"),n._getEyeOffset("left"),n),i(e.rightProjectionMatrix,e.rightViewMatrix,t,n._getFieldOfView("right"),n._getEyeOffset("right"),n),!0)}}(),_=function(e){var t,n=e.indexOf("://");t=-1!==n?n+3:0;var r=e.indexOf("/",t);return-1===r&&(r=e.length),e.substring(0,r)},E=function(){var e={};return function(t,n){void 0===e[t]&&(console.warn("webvr-polyfill: "+n),e[t]=!0)}}(),A=function(e,t){E(e,e+" has been deprecated. This may not work on native WebVR displays. "+(t?"Please use "+t+" instead.":""))},S=function(e,t,n){if(t){for(var r=[],i=null,o=0;o<t.length;++o)switch(a=t[o]){case e.TEXTURE_BINDING_2D:case e.TEXTURE_BINDING_CUBE_MAP:if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31){console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit"),r.push(null,null);break}i||(i=e.getParameter(e.ACTIVE_TEXTURE)),e.activeTexture(l),r.push(e.getParameter(a),null);break;case e.ACTIVE_TEXTURE:i=e.getParameter(e.ACTIVE_TEXTURE),r.push(null);break;default:r.push(e.getParameter(a))}for(n(e),o=0;o<t.length;++o){var a=t[o],s=r[o];switch(a){case e.ACTIVE_TEXTURE:break;case e.ARRAY_BUFFER_BINDING:e.bindBuffer(e.ARRAY_BUFFER,s);break;case e.COLOR_CLEAR_VALUE:e.clearColor(s[0],s[1],s[2],s[3]);break;case e.COLOR_WRITEMASK:e.colorMask(s[0],s[1],s[2],s[3]);break;case e.CURRENT_PROGRAM:e.useProgram(s);break;case e.ELEMENT_ARRAY_BUFFER_BINDING:e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,s);break;case e.FRAMEBUFFER_BINDING:e.bindFramebuffer(e.FRAMEBUFFER,s);break;case e.RENDERBUFFER_BINDING:e.bindRenderbuffer(e.RENDERBUFFER,s);break;case e.TEXTURE_BINDING_2D:if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31)break;e.activeTexture(l),e.bindTexture(e.TEXTURE_2D,s);break;case e.TEXTURE_BINDING_CUBE_MAP:var l;if((l=t[++o])<e.TEXTURE0||l>e.TEXTURE31)break;e.activeTexture(l),e.bindTexture(e.TEXTURE_CUBE_MAP,s);break;case e.VIEWPORT:e.viewport(s[0],s[1],s[2],s[3]);break;case e.BLEND:case e.CULL_FACE:case e.DEPTH_TEST:case e.SCISSOR_TEST:case e.STENCIL_TEST:s?e.enable(a):e.disable(a);break;default:console.log("No GL restore behavior for 0x"+a.toString(16))}i&&e.activeTexture(i)}}else n(e)},M=["attribute vec2 position;","attribute vec3 texCoord;","varying vec2 vTexCoord;","uniform vec4 viewportOffsetScale[2];","void main() {"," vec4 viewport = viewportOffsetScale[int(texCoord.z)];"," vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;"," gl_Position = vec4( position, 1.0, 1.0 );","}"].join("\n"),T=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {"," gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");function C(e,t,n,r){this.gl=e,this.cardboardUI=t,this.bufferScale=n,this.dirtySubmitFrameBindings=r,this.ctxAttribs=e.getContextAttributes(),this.instanceExt=e.getExtension("ANGLE_instanced_arrays"),this.meshWidth=20,this.meshHeight=20,this.bufferWidth=e.drawingBufferWidth,this.bufferHeight=e.drawingBufferHeight,this.realBindFramebuffer=e.bindFramebuffer,this.realEnable=e.enable,this.realDisable=e.disable,this.realColorMask=e.colorMask,this.realClearColor=e.clearColor,this.realViewport=e.viewport,i()||(this.realCanvasWidth=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"width"),this.realCanvasHeight=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"height")),this.isPatched=!1,this.lastBoundFramebuffer=null,this.cullFace=!1,this.depthTest=!1,this.blend=!1,this.scissorTest=!1,this.stencilTest=!1,this.viewport=[0,0,0,0],this.colorMask=[!0,!0,!0,!0],this.clearColor=[0,0,0,0],this.attribs={position:0,texCoord:1},this.program=g(e,M,T,this.attribs),this.uniforms=v(e,this.program),this.viewportOffsetScale=new Float32Array(8),this.setTextureBounds(),this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.indexCount=0,this.renderTarget=e.createTexture(),this.framebuffer=e.createFramebuffer(),this.depthStencilBuffer=null,this.depthBuffer=null,this.stencilBuffer=null,this.ctxAttribs.depth&&this.ctxAttribs.stencil?this.depthStencilBuffer=e.createRenderbuffer():this.ctxAttribs.depth?this.depthBuffer=e.createRenderbuffer():this.ctxAttribs.stencil&&(this.stencilBuffer=e.createRenderbuffer()),this.patch(),this.onResize()}C.prototype.destroy=function(){var e=this.gl;this.unpatch(),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.indexBuffer),e.deleteTexture(this.renderTarget),e.deleteFramebuffer(this.framebuffer),this.depthStencilBuffer&&e.deleteRenderbuffer(this.depthStencilBuffer),this.depthBuffer&&e.deleteRenderbuffer(this.depthBuffer),this.stencilBuffer&&e.deleteRenderbuffer(this.stencilBuffer),this.cardboardUI&&this.cardboardUI.destroy()},C.prototype.onResize=function(){var e=this.gl,t=this,n=[e.RENDERBUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0];S(e,n,(function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.framebuffer),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.texImage2D(e.TEXTURE_2D,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,t.bufferWidth,t.bufferHeight,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.renderTarget,0),t.ctxAttribs.depth&&t.ctxAttribs.stencil?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t.depthStencilBuffer)):t.ctxAttribs.depth?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.depthBuffer)):t.ctxAttribs.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,t.stencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.STENCIL_INDEX8,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,t.stencilBuffer)),!e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer incomplete!"),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),t.realClearColor.apply(e,t.clearColor)})),this.cardboardUI&&this.cardboardUI.onResize()},C.prototype.patch=function(){if(!this.isPatched){var e=this,t=this.gl.canvas,n=this.gl;i()||(t.width=f()*this.bufferScale,t.height=p()*this.bufferScale,Object.defineProperty(t,"width",{configurable:!0,enumerable:!0,get:function(){return e.bufferWidth},set:function(n){e.bufferWidth=n,e.realCanvasWidth.set.call(t,n),e.onResize()}}),Object.defineProperty(t,"height",{configurable:!0,enumerable:!0,get:function(){return e.bufferHeight},set:function(n){e.bufferHeight=n,e.realCanvasHeight.set.call(t,n),e.onResize()}})),this.lastBoundFramebuffer=n.getParameter(n.FRAMEBUFFER_BINDING),null==this.lastBoundFramebuffer&&(this.lastBoundFramebuffer=this.framebuffer,this.gl.bindFramebuffer(n.FRAMEBUFFER,this.framebuffer)),this.gl.bindFramebuffer=function(t,r){e.lastBoundFramebuffer=r||e.framebuffer,e.realBindFramebuffer.call(n,t,e.lastBoundFramebuffer)},this.cullFace=n.getParameter(n.CULL_FACE),this.depthTest=n.getParameter(n.DEPTH_TEST),this.blend=n.getParameter(n.BLEND),this.scissorTest=n.getParameter(n.SCISSOR_TEST),this.stencilTest=n.getParameter(n.STENCIL_TEST),n.enable=function(t){switch(t){case n.CULL_FACE:e.cullFace=!0;break;case n.DEPTH_TEST:e.depthTest=!0;break;case n.BLEND:e.blend=!0;break;case n.SCISSOR_TEST:e.scissorTest=!0;break;case n.STENCIL_TEST:e.stencilTest=!0}e.realEnable.call(n,t)},n.disable=function(t){switch(t){case n.CULL_FACE:e.cullFace=!1;break;case n.DEPTH_TEST:e.depthTest=!1;break;case n.BLEND:e.blend=!1;break;case n.SCISSOR_TEST:e.scissorTest=!1;break;case n.STENCIL_TEST:e.stencilTest=!1}e.realDisable.call(n,t)},this.colorMask=n.getParameter(n.COLOR_WRITEMASK),n.colorMask=function(t,r,i,o){e.colorMask[0]=t,e.colorMask[1]=r,e.colorMask[2]=i,e.colorMask[3]=o,e.realColorMask.call(n,t,r,i,o)},this.clearColor=n.getParameter(n.COLOR_CLEAR_VALUE),n.clearColor=function(t,r,i,o){e.clearColor[0]=t,e.clearColor[1]=r,e.clearColor[2]=i,e.clearColor[3]=o,e.realClearColor.call(n,t,r,i,o)},this.viewport=n.getParameter(n.VIEWPORT),n.viewport=function(t,r,i,o){e.viewport[0]=t,e.viewport[1]=r,e.viewport[2]=i,e.viewport[3]=o,e.realViewport.call(n,t,r,i,o)},this.isPatched=!0,w(t)}},C.prototype.unpatch=function(){if(this.isPatched){var e=this.gl,t=this.gl.canvas;i()||(Object.defineProperty(t,"width",this.realCanvasWidth),Object.defineProperty(t,"height",this.realCanvasHeight)),t.width=this.bufferWidth,t.height=this.bufferHeight,e.bindFramebuffer=this.realBindFramebuffer,e.enable=this.realEnable,e.disable=this.realDisable,e.colorMask=this.realColorMask,e.clearColor=this.realClearColor,e.viewport=this.realViewport,this.lastBoundFramebuffer==this.framebuffer&&e.bindFramebuffer(e.FRAMEBUFFER,null),this.isPatched=!1,setTimeout((function(){w(t)}),1)}},C.prototype.setTextureBounds=function(e,t){e||(e=[0,0,.5,1]),t||(t=[.5,0,.5,1]),this.viewportOffsetScale[0]=e[0],this.viewportOffsetScale[1]=e[1],this.viewportOffsetScale[2]=e[2],this.viewportOffsetScale[3]=e[3],this.viewportOffsetScale[4]=t[0],this.viewportOffsetScale[5]=t[1],this.viewportOffsetScale[6]=t[2],this.viewportOffsetScale[7]=t[3]},C.prototype.submitFrame=function(){var e=this.gl,t=this,n=[];if(this.dirtySubmitFrameBindings||n.push(e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0),S(e,n,(function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null);var n=0,r=0;t.instanceExt&&(n=e.getVertexAttrib(t.attribs.position,t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),r=e.getVertexAttrib(t.attribs.texCoord,t.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE)),t.cullFace&&t.realDisable.call(e,e.CULL_FACE),t.depthTest&&t.realDisable.call(e,e.DEPTH_TEST),t.blend&&t.realDisable.call(e,e.BLEND),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realDisable.call(e,e.STENCIL_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),(t.ctxAttribs.alpha||i())&&(t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)),e.useProgram(t.program),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexBuffer),e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.enableVertexAttribArray(t.attribs.position),e.enableVertexAttribArray(t.attribs.texCoord),e.vertexAttribPointer(t.attribs.position,2,e.FLOAT,!1,20,0),e.vertexAttribPointer(t.attribs.texCoord,3,e.FLOAT,!1,20,8),t.instanceExt&&(0!=n&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.position,0),0!=r&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.texCoord,0)),e.activeTexture(e.TEXTURE0),e.uniform1i(t.uniforms.diffuse,0),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.uniform4fv(t.uniforms.viewportOffsetScale,t.viewportOffsetScale),e.drawElements(e.TRIANGLES,t.indexCount,e.UNSIGNED_SHORT,0),t.cardboardUI&&t.cardboardUI.renderNoState(),t.realBindFramebuffer.call(t.gl,e.FRAMEBUFFER,t.framebuffer),t.ctxAttribs.preserveDrawingBuffer||(t.realClearColor.call(e,0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),t.dirtySubmitFrameBindings||t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.cullFace&&t.realEnable.call(e,e.CULL_FACE),t.depthTest&&t.realEnable.call(e,e.DEPTH_TEST),t.blend&&t.realEnable.call(e,e.BLEND),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realEnable.call(e,e.STENCIL_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),!t.ctxAttribs.alpha&&t.ctxAttribs.preserveDrawingBuffer||t.realClearColor.apply(e,t.clearColor),t.instanceExt&&(0!=n&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.position,n),0!=r&&t.instanceExt.vertexAttribDivisorANGLE(t.attribs.texCoord,r))})),i()){var r=e.canvas;r.width==t.bufferWidth&&r.height==t.bufferHeight||(t.bufferWidth=r.width,t.bufferHeight=r.height,t.onResize())}},C.prototype.updateDeviceInfo=function(e){var t=this.gl,n=this,r=[t.ARRAY_BUFFER_BINDING,t.ELEMENT_ARRAY_BUFFER_BINDING];S(t,r,(function(t){var r=n.computeMeshVertices_(n.meshWidth,n.meshHeight,e);if(t.bindBuffer(t.ARRAY_BUFFER,n.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,r,t.STATIC_DRAW),!n.indexCount){var i=n.computeMeshIndices_(n.meshWidth,n.meshHeight);t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,i,t.STATIC_DRAW),n.indexCount=i.length}}))},C.prototype.computeMeshVertices_=function(e,t,n){for(var i=new Float32Array(2*e*t*5),o=n.getLeftEyeVisibleTanAngles(),a=n.getLeftEyeNoLensTanAngles(),s=n.getLeftEyeVisibleScreenRect(a),l=0,c=0;c<2;c++){for(var u=0;u<t;u++)for(var h=0;h<e;h++,l++){var d=h/(e-1),f=u/(t-1),p=d,m=f,g=r(o[0],o[2],d),v=r(o[3],o[1],f),y=Math.sqrt(g*g+v*v),b=n.distortion.distortInverse(y),w=v*b/y;d=(g*b/y-a[0])/(a[2]-a[0]),f=(w-a[3])/(a[1]-a[3]),d=2*(s.x+d*s.width-.5),f=2*(s.y+f*s.height-.5),i[5*l+0]=d,i[5*l+1]=f,i[5*l+2]=p,i[5*l+3]=m,i[5*l+4]=c}var x=o[2]-o[0];o[0]=-(x+o[0]),o[2]=x-o[2],x=a[2]-a[0],a[0]=-(x+a[0]),a[2]=x-a[2],s.x=1-(s.x+s.width)}return i},C.prototype.computeMeshIndices_=function(e,t){for(var n=new Uint16Array(2*(e-1)*(t-1)*6),r=e/2,i=t/2,o=0,a=0,s=0;s<2;s++)for(var l=0;l<t;l++)for(var c=0;c<e;c++,o++)0!=c&&0!=l&&(c<=r==l<=i?(n[a++]=o,n[a++]=o-e-1,n[a++]=o-e,n[a++]=o-e-1,n[a++]=o,n[a++]=o-1):(n[a++]=o-1,n[a++]=o-e,n[a++]=o,n[a++]=o-e,n[a++]=o-1,n[a++]=o-e-1));return n},C.prototype.getOwnPropertyDescriptor_=function(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return void 0!==n.get&&void 0!==n.set||(n.configurable=!0,n.enumerable=!0,n.get=function(){return this.getAttribute(t)},n.set=function(e){this.setAttribute(t,e)}),n};var O=["attribute vec2 position;","uniform mat4 projectionMat;","void main() {"," gl_Position = projectionMat * vec4( position, -1.0, 1.0 );","}"].join("\n"),R=["precision mediump float;","uniform vec4 color;","void main() {"," gl_FragColor = color;","}"].join("\n"),k=Math.PI/180;function P(e){this.gl=e,this.attribs={position:0},this.program=g(e,O,R,this.attribs),this.uniforms=v(e,this.program),this.vertexBuffer=e.createBuffer(),this.gearOffset=0,this.gearVertexCount=0,this.arrowOffset=0,this.arrowVertexCount=0,this.projMat=new Float32Array(16),this.listener=null,this.onResize()}function L(e){this.coefficients=e}P.prototype.destroy=function(){var e=this.gl;this.listener&&e.canvas.removeEventListener("click",this.listener,!1),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer)},P.prototype.listen=function(e,t){var n=this.gl.canvas;this.listener=function(r){var i=n.clientWidth/2;r.clientX>i-42&&r.clientX<i+42&&r.clientY>n.clientHeight-42?e(r):r.clientX<42&&r.clientY<42&&t(r)},n.addEventListener("click",this.listener,!1)},P.prototype.onResize=function(){var e=this.gl,t=this,n=[e.ARRAY_BUFFER_BINDING];S(e,n,(function(e){var n=[],r=e.drawingBufferWidth/2,i=Math.max(screen.width,screen.height)*window.devicePixelRatio,o=e.drawingBufferWidth/i*window.devicePixelRatio,a=4*o/2,s=42*o,l=28*o/2,c=14*o;function u(e,t){var i=(90-e)*k,o=Math.cos(i),a=Math.sin(i);n.push(.3125*o*l+r,.3125*a*l+l),n.push(t*o*l+r,t*a*l+l)}n.push(r-a,s),n.push(r-a,e.drawingBufferHeight),n.push(r+a,s),n.push(r+a,e.drawingBufferHeight),t.gearOffset=n.length/2;for(var h=0;h<=6;h++){var d=60*h;u(d,1),u(d+12,1),u(d+20,.75),u(d+40,.75),u(d+48,1)}function f(t,r){n.push(c+t,e.drawingBufferHeight-c-r)}t.gearVertexCount=n.length/2-t.gearOffset,t.arrowOffset=n.length/2;var p=a/Math.sin(45*k);f(0,l),f(l,0),f(l+p,p),f(p,l+p),f(p,l-p),f(0,l),f(l,2*l),f(l+p,2*l-p),f(p,l-p),f(0,l),f(p,l-a),f(28*o,l-a),f(p,l+a),f(28*o,l+a),t.arrowVertexCount=n.length/2-t.arrowOffset,e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.bufferData(e.ARRAY_BUFFER,new Float32Array(n),e.STATIC_DRAW)}))},P.prototype.render=function(){var e=this.gl,t=this,n=[e.CULL_FACE,e.DEPTH_TEST,e.BLEND,e.SCISSOR_TEST,e.STENCIL_TEST,e.COLOR_WRITEMASK,e.VIEWPORT,e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING];S(e,n,(function(e){e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.BLEND),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.colorMask(!0,!0,!0,!0),e.viewport(0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.renderNoState()}))},P.prototype.renderNoState=function(){var e=this.gl;e.useProgram(this.program),e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer),e.enableVertexAttribArray(this.attribs.position),e.vertexAttribPointer(this.attribs.position,2,e.FLOAT,!1,8,0),e.uniform4f(this.uniforms.color,1,1,1,1),function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),c=1/(o-a);e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*c,e[15]=1}(this.projMat,0,e.drawingBufferWidth,0,e.drawingBufferHeight,.1,1024),e.uniformMatrix4fv(this.uniforms.projectionMat,!1,this.projMat),e.drawArrays(e.TRIANGLE_STRIP,0,4),e.drawArrays(e.TRIANGLE_STRIP,this.gearOffset,this.gearVertexCount),e.drawArrays(e.TRIANGLE_STRIP,this.arrowOffset,this.arrowVertexCount)},L.prototype.distortInverse=function(e){for(var t=0,n=1,r=e-this.distort(t);Math.abs(n-t)>1e-4;){var i=e-this.distort(n),o=n-i*((n-t)/(i-r));t=n,n=o,r=i}return n},L.prototype.distort=function(e){for(var t=e*e,n=0,r=0;r<this.coefficients.length;r++)n=t*(n+this.coefficients[r]);return(n+1)*e};var D=Math.PI/180,I=180/Math.PI,N=function(e,t,n){this.x=e||0,this.y=t||0,this.z=n||0};N.prototype={constructor:N,set:function(e,t,n){return this.x=e,this.y=t,this.z=n,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var e=this.length();if(0!==e){var t=1/e;this.multiplyScalar(t)}else this.x=0,this.y=0,this.z=0;return this},multiplyScalar:function(e){this.x*=e,this.y*=e,this.z*=e},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,l=s*t+o*r-a*n,c=s*n+a*t-i*r,u=s*r+i*n-o*t,h=-i*t-o*n-a*r;return this.x=l*s+h*-i+c*-a-u*-o,this.y=c*s+h*-o+u*-i-l*-a,this.z=u*s+h*-a+l*-o-c*-i,this},dot:function(e){return this.x*e.x+this.y*e.y+this.z*e.z},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}};var j=function(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){this.width=e.width||f(),this.height=e.height||p(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}j.prototype={constructor:j,set:function(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this},copy:function(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w,this},setFromEulerXYZ:function(e,t,n){var r=Math.cos(e/2),i=Math.cos(t/2),o=Math.cos(n/2),a=Math.sin(e/2),s=Math.sin(t/2),l=Math.sin(n/2);return this.x=a*i*o+r*s*l,this.y=r*s*o-a*i*l,this.z=r*i*l+a*s*o,this.w=r*i*o-a*s*l,this},setFromEulerYXZ:function(e,t,n){var r=Math.cos(e/2),i=Math.cos(t/2),o=Math.cos(n/2),a=Math.sin(e/2),s=Math.sin(t/2),l=Math.sin(n/2);return this.x=a*i*o+r*s*l,this.y=r*s*o-a*i*l,this.z=r*i*l-a*s*o,this.w=r*i*o+a*s*l,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},multiply:function(e){return this.multiplyQuaternions(this,e)},multiplyQuaternions:function(e,t){var n=e.x,r=e.y,i=e.z,o=e.w,a=t.x,s=t.y,l=t.z,c=t.w;return this.x=n*c+o*a+r*l-i*s,this.y=r*c+o*s+i*a-n*l,this.z=i*c+o*l+n*s-r*a,this.w=o*c-n*a-r*s-i*l,this},inverse:function(){return this.x*=-1,this.y*=-1,this.z*=-1,this.normalize(),this},normalize:function(){var e=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w);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},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.acos(a),l=Math.sqrt(1-a*a);if(Math.abs(l)<.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.sin((1-t)*s)/l,u=Math.sin(t*s)/l;return this.w=o*c+this.w*u,this.x=n*c+this.x*u,this.y=r*c+this.y*u,this.z=i*c+this.z*u,this},setFromUnitVectors:function(){var e,t;return function(n,r){return void 0===e&&(e=new N),(t=n.dot(r)+1)<1e-6?(t=0,Math.abs(n.x)>Math.abs(n.z)?e.set(-n.y,n.x,0):e.set(0,-n.z,n.y)):e.crossVectors(n,r),this.x=e.x,this.y=e.y,this.z=e.z,this.w=t,this.normalize(),this}}()};var F=new B({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),z=new B({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004}),H={CardboardV1:new V({id:"CardboardV1",label:"Cardboard I/O 2014",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new V({id:"CardboardV2",label:"Cardboard I/O 2015",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};function U(e,t){this.viewer=H.CardboardV2,this.updateDeviceParams(e),this.distortion=new L(this.viewer.distortionCoefficients);for(var n=0;n<t.length;n++){var r=t[n];H[r.id]=new V(r)}}function V(e){this.id=e.id,this.label=e.label,this.fov=e.fov,this.interLensDistance=e.interLensDistance,this.baselineLensDistance=e.baselineLensDistance,this.screenLensDistance=e.screenLensDistance,this.distortionCoefficients=e.distortionCoefficients,this.inverseCoefficients=e.inverseCoefficients}U.prototype.updateDeviceParams=function(e){this.device=this.determineDevice_(e)||this.device},U.prototype.getDevice=function(){return this.device},U.prototype.setViewer=function(e){this.viewer=e,this.distortion=new L(this.viewer.distortionCoefficients)},U.prototype.determineDevice_=function(e){if(!e)return i()?(console.warn("Using fallback iOS device measurements."),z):(console.warn("Using fallback Android device measurements."),F);var t=.0254/e.xdpi,n=.0254/e.ydpi;return new B({widthMeters:t*f(),heightMeters:n*p(),bevelMeters:.001*e.bevelMm})},U.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.viewer,t=this.device,n=this.distortion,r=e.screenLensDistance,i=(t.widthMeters-e.interLensDistance)/2,o=e.interLensDistance/2,a=e.baselineLensDistance-t.bevelMeters,s=t.heightMeters-a,l=I*Math.atan(n.distort(i/r)),c=I*Math.atan(n.distort(o/r)),u=I*Math.atan(n.distort(a/r)),h=I*Math.atan(n.distort(s/r));return{leftDegrees:Math.min(l,e.fov),rightDegrees:Math.min(c,e.fov),downDegrees:Math.min(u,e.fov),upDegrees:Math.min(h,e.fov)}},U.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.viewer,t=this.device,n=this.distortion,r=Math.tan(-D*e.fov),i=Math.tan(D*e.fov),o=Math.tan(D*e.fov),a=Math.tan(-D*e.fov),s=t.widthMeters/4,l=t.heightMeters/2,c=e.baselineLensDistance-t.bevelMeters-l,u=e.interLensDistance/2-s,h=-c,d=e.screenLensDistance,f=n.distort((u-s)/d),p=n.distort((h+l)/d),m=n.distort((u+s)/d),g=n.distort((h-l)/d),v=new Float32Array(4);return v[0]=Math.max(r,f),v[1]=Math.min(i,p),v[2]=Math.min(o,m),v[3]=Math.max(a,g),v},U.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.viewer,t=this.device,n=this.distortion,r=new Float32Array(4),i=n.distortInverse(Math.tan(-D*e.fov)),o=n.distortInverse(Math.tan(D*e.fov)),a=n.distortInverse(Math.tan(D*e.fov)),s=n.distortInverse(Math.tan(-D*e.fov)),l=t.widthMeters/4,c=t.heightMeters/2,u=e.baselineLensDistance-t.bevelMeters-c,h=e.interLensDistance/2-l,d=-u,f=e.screenLensDistance,p=(h-l)/f,m=(d+c)/f,g=(h+l)/f,v=(d-c)/f;return r[0]=Math.max(i,p),r[1]=Math.min(o,m),r[2]=Math.min(a,g),r[3]=Math.max(s,v),r},U.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.viewer,n=this.device,r=t.screenLensDistance,i=(n.widthMeters-t.interLensDistance)/2,o=t.baselineLensDistance-n.bevelMeters,a=(e[0]*r+i)/n.widthMeters,s=(e[1]*r+o)/n.heightMeters,l=(e[2]*r+i)/n.widthMeters,c=(e[3]*r+o)/n.heightMeters;return{x:a,y:c,width:l-a,height:s-c}},U.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},U.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.rightDegrees,rightDegrees:t.leftDegrees,upDegrees:t.upDegrees,downDegrees:t.downDegrees}},U.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:I*Math.atan(e.outerDist),rightDegrees:I*Math.atan(e.innerDist),downDegrees:I*Math.atan(e.bottomDist),upDegrees:I*Math.atan(e.topDist)}},U.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.viewer,n=this.device,r=t.screenLensDistance,i=n.widthMeters/r,o=n.heightMeters/r,a=n.width/i,s=n.height/o,l=Math.round((e.eyePosX-e.outerDist)*a),c=Math.round((e.eyePosY-e.bottomDist)*s);return{x:l,y:c,width:Math.round((e.eyePosX+e.innerDist)*a)-l,height:Math.round((e.eyePosY+e.topDist)*s)-c}},U.prototype.getUndistortedParams_=function(){var e=this.viewer,t=this.device,n=this.distortion,r=e.screenLensDistance,i=e.interLensDistance/2/r,o=t.widthMeters/r,a=t.heightMeters/r,s=o/2-i,l=(e.baselineLensDistance-t.bevelMeters)/r,c=e.fov,u=n.distortInverse(Math.tan(D*c)),h=Math.min(s,u),d=Math.min(i,u),f=Math.min(l,u);return{outerDist:h,innerDist:d,topDist:Math.min(a-l,u),bottomDist:f,eyePosX:s,eyePosY:l}},U.Viewers=H;var G={format:1,last_updated:"2019-11-09T17:36:14Z",devices:[{type:"android",rules:[{mdmh:"asus/*/Nexus 7/*"},{ua:"Nexus 7"}],dpi:[320.8,323],bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_X00PD/*"},{ua:"ASUS_X00PD"}],dpi:245,bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_X008D/*"},{ua:"ASUS_X008D"}],dpi:282,bw:3,ac:500},{type:"android",rules:[{mdmh:"asus/*/ASUS_Z00AD/*"},{ua:"ASUS_Z00AD"}],dpi:[403,404.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 2 XL/*"},{ua:"Pixel 2 XL"}],dpi:537.9,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 3 XL/*"},{ua:"Pixel 3 XL"}],dpi:[558.5,553.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel XL/*"},{ua:"Pixel XL"}],dpi:[537.9,533],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 3/*"},{ua:"Pixel 3"}],dpi:442.4,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Google/*/Pixel 2/*"},{ua:"Pixel 2"}],dpi:441,bw:3,ac:500},{type:"android",rules:[{mdmh:"Google/*/Pixel/*"},{ua:"Pixel"}],dpi:[432.6,436.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC6435LVW/*"},{ua:"HTC6435LVW"}],dpi:[449.7,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"HTC/*/HTC One XL/*"},{ua:"HTC One XL"}],dpi:[315.3,314.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"htc/*/Nexus 9/*"},{ua:"Nexus 9"}],dpi:289,bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One M9/*"},{ua:"HTC One M9"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One_M8/*"},{ua:"HTC One_M8"}],dpi:[449.7,447.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"HTC/*/HTC One/*"},{ua:"HTC One"}],dpi:472.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/Nexus 6P/*"},{ua:"Nexus 6P"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/BLN-L24/*"},{ua:"HONORBLN-L24"}],dpi:480,bw:4,ac:500},{type:"android",rules:[{mdmh:"Huawei/*/BKL-L09/*"},{ua:"BKL-L09"}],dpi:403,bw:3.47,ac:500},{type:"android",rules:[{mdmh:"LENOVO/*/Lenovo PB2-690Y/*"},{ua:"Lenovo PB2-690Y"}],dpi:[457.2,454.713],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5X/*"},{ua:"Nexus 5X"}],dpi:[422,419.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS345/*"},{ua:"LGMS345"}],dpi:[221.7,219.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D800/*"},{ua:"LG-D800"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/LG-D850/*"},{ua:"LG-D850"}],dpi:[537.9,541.9],bw:3,ac:500},{type:"android",rules:[{mdmh:"LGE/*/VS985 4G/*"},{ua:"VS985 4G"}],dpi:[537.9,535.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 5/*"},{ua:"Nexus 5 B"}],dpi:[442.4,444.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/Nexus 4/*"},{ua:"Nexus 4"}],dpi:[319.8,318.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LG-P769/*"},{ua:"LG-P769"}],dpi:[240.6,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGMS323/*"},{ua:"LGMS323"}],dpi:[206.6,204.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"LGE/*/LGLS996/*"},{ua:"LGLS996"}],dpi:[403.4,401.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/4560MMX/*"},{ua:"4560MMX"}],dpi:[240,219.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/A250/*"},{ua:"Micromax A250"}],dpi:[480,446.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Micromax/*/Micromax AQ4501/*"},{ua:"Micromax AQ4501"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/G5/*"},{ua:"Moto G (5) Plus"}],dpi:[403.4,403],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/DROID RAZR/*"},{ua:"DROID RAZR"}],dpi:[368.1,256.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT830C/*"},{ua:"XT830C"}],dpi:[254,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1021/*"},{ua:"XT1021"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1023/*"},{ua:"XT1023"}],dpi:[254,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1028/*"},{ua:"XT1028"}],dpi:[326.6,327.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1034/*"},{ua:"XT1034"}],dpi:[326.6,328.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1053/*"},{ua:"XT1053"}],dpi:[315.3,316.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1562/*"},{ua:"XT1562"}],dpi:[403.4,402.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/Nexus 6/*"},{ua:"Nexus 6 B"}],dpi:[494.3,489.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1063/*"},{ua:"XT1063"}],dpi:[295,296.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/XT1064/*"},{ua:"XT1064"}],dpi:[295,295.6],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1092/*"},{ua:"XT1092"}],dpi:[422,424.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"motorola/*/XT1095/*"},{ua:"XT1095"}],dpi:[422,423.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"motorola/*/G4/*"},{ua:"Moto G (4)"}],dpi:401,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/A0001/*"},{ua:"A0001"}],dpi:[403.4,401],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1001/*"},{ua:"ONE E1001"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1003/*"},{ua:"ONE E1003"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE E1005/*"},{ua:"ONE E1005"}],dpi:[442.4,441.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2001/*"},{ua:"ONE A2001"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2003/*"},{ua:"ONE A2003"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A2005/*"},{ua:"ONE A2005"}],dpi:[391.9,405.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3000/*"},{ua:"ONEPLUS A3000"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3003/*"},{ua:"ONEPLUS A3003"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A3010/*"},{ua:"ONEPLUS A3010"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A5000/*"},{ua:"ONEPLUS A5000 "}],dpi:[403.411,399.737],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONE A5010/*"},{ua:"ONEPLUS A5010"}],dpi:[403,400],bw:2,ac:1e3},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6000/*"},{ua:"ONEPLUS A6000"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6003/*"},{ua:"ONEPLUS A6003"}],dpi:401,bw:3,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6010/*"},{ua:"ONEPLUS A6010"}],dpi:401,bw:2,ac:500},{type:"android",rules:[{mdmh:"OnePlus/*/ONEPLUS A6013/*"},{ua:"ONEPLUS A6013"}],dpi:401,bw:2,ac:500},{type:"android",rules:[{mdmh:"OPPO/*/X909/*"},{ua:"X909"}],dpi:[442.4,444.1],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9082/*"},{ua:"GT-I9082"}],dpi:[184.7,185.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G360P/*"},{ua:"SM-G360P"}],dpi:[196.7,205.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Nexus S/*"},{ua:"Nexus S"}],dpi:[234.5,229.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[304.8,303.9],bw:5,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-T230NU/*"},{ua:"SM-T230NU"}],dpi:216,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SGH-T399/*"},{ua:"SGH-T399"}],dpi:[217.7,231.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SGH-M919/*"},{ua:"SGH-M919"}],dpi:[440.8,437.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N9005/*"},{ua:"SM-N9005"}],dpi:[386.4,387],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SM-N900A/*"},{ua:"SAMSUNG-SM-N900A"}],dpi:[386.4,387.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9500/*"},{ua:"GT-I9500"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/GT-I9505/*"},{ua:"GT-I9505"}],dpi:439.4,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900F/*"},{ua:"SM-G900F"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G900M/*"},{ua:"SM-G900M"}],dpi:[415.6,431.6],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G800F/*"},{ua:"SM-G800F"}],dpi:326.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G906S/*"},{ua:"SM-G906S"}],dpi:[562.7,572.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300/*"},{ua:"GT-I9300"}],dpi:[306.7,304.8],bw:5,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-T535/*"},{ua:"SM-T535"}],dpi:[142.6,136.4],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-N920C/*"},{ua:"SM-N920C"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920P/*"},{ua:"SM-N920P"}],dpi:[386.3655,390.144],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N920W8/*"},{ua:"SM-N920W8"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9300I/*"},{ua:"GT-I9300I"}],dpi:[304.8,305.8],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-I9195/*"},{ua:"GT-I9195"}],dpi:[249.4,256.7],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SPH-L520/*"},{ua:"SPH-L520"}],dpi:[249.4,255.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SAMSUNG-SGH-I717/*"},{ua:"SAMSUNG-SGH-I717"}],dpi:285.8,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SPH-D710/*"},{ua:"SPH-D710"}],dpi:[217.7,204.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/GT-N7100/*"},{ua:"GT-N7100"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SCH-I605/*"},{ua:"SCH-I605"}],dpi:265.1,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/Galaxy Nexus/*"},{ua:"Galaxy Nexus"}],dpi:[315.3,314.2],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910H/*"},{ua:"SM-N910H"}],dpi:[515.1,518],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-N910C/*"},{ua:"SM-N910C"}],dpi:[515.2,520.2],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G130M/*"},{ua:"SM-G130M"}],dpi:[165.9,164.8],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G928I/*"},{ua:"SM-G928I"}],dpi:[515.1,518.4],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G920F/*"},{ua:"SM-G920F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G920P/*"},{ua:"SM-G920P"}],dpi:[522.5,577],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G925F/*"},{ua:"SM-G925F"}],dpi:580.6,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G925V/*"},{ua:"SM-G925V"}],dpi:[522.5,576.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G930F/*"},{ua:"SM-G930F"}],dpi:576.6,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G935F/*"},{ua:"SM-G935F"}],dpi:533,bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G950F/*"},{ua:"SM-G950F"}],dpi:[562.707,565.293],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G955U/*"},{ua:"SM-G955U"}],dpi:[522.514,525.762],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G955F/*"},{ua:"SM-G955F"}],dpi:[522.514,525.762],bw:3,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G960F/*"},{ua:"SM-G960F"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G9600/*"},{ua:"SM-G9600"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960T/*"},{ua:"SM-G960T"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960N/*"},{ua:"SM-G960N"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960U/*"},{ua:"SM-G960U"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G9608/*"},{ua:"SM-G9608"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960FD/*"},{ua:"SM-G960FD"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G960W/*"},{ua:"SM-G960W"}],dpi:[569.575,571.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G965F/*"},{ua:"SM-G965F"}],dpi:529,bw:2,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/C6903/*"},{ua:"C6903"}],dpi:[442.5,443.3],bw:3,ac:500},{type:"android",rules:[{mdmh:"Sony/*/D6653/*"},{ua:"D6653"}],dpi:[428.6,427.6],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6653/*"},{ua:"E6653"}],dpi:[428.6,425.7],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/E6853/*"},{ua:"E6853"}],dpi:[403.4,401.9],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Sony/*/SGP321/*"},{ua:"SGP321"}],dpi:[224.7,224.1],bw:3,ac:500},{type:"android",rules:[{mdmh:"TCT/*/ALCATEL ONE TOUCH Fierce/*"},{ua:"ALCATEL ONE TOUCH Fierce"}],dpi:[240,247.5],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"THL/*/thl 5000/*"},{ua:"thl 5000"}],dpi:[480,443.3],bw:3,ac:1e3},{type:"android",rules:[{mdmh:"Fly/*/IQ4412/*"},{ua:"IQ4412"}],dpi:307.9,bw:3,ac:1e3},{type:"android",rules:[{mdmh:"ZTE/*/ZTE Blade L2/*"},{ua:"ZTE Blade L2"}],dpi:240,bw:3,ac:500},{type:"android",rules:[{mdmh:"BENEVE/*/VR518/*"},{ua:"VR518"}],dpi:480,bw:3,ac:500},{type:"ios",rules:[{res:[640,960]}],dpi:[325.1,328.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[640,1136]}],dpi:[317.1,320.2],bw:3,ac:1e3},{type:"ios",rules:[{res:[750,1334]}],dpi:326.4,bw:4,ac:1e3},{type:"ios",rules:[{res:[1242,2208]}],dpi:[453.6,458.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2001]}],dpi:[410.9,415.4],bw:4,ac:1e3},{type:"ios",rules:[{res:[1125,2436]}],dpi:458,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"Huawei/*/EML-L29/*"},{ua:"EML-L29"}],dpi:428,bw:3.45,ac:500},{type:"android",rules:[{mdmh:"Nokia/*/Nokia 7.1/*"},{ua:"Nokia 7.1"}],dpi:[432,431.9],bw:3,ac:500},{type:"ios",rules:[{res:[1242,2688]}],dpi:458,bw:4,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G570M/*"},{ua:"SM-G570M"}],dpi:320,bw:3.684,ac:1e3},{type:"android",rules:[{mdmh:"samsung/*/SM-G970F/*"},{ua:"SM-G970F"}],dpi:438,bw:2.281,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G973F/*"},{ua:"SM-G973F"}],dpi:550,bw:2.002,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G975F/*"},{ua:"SM-G975F"}],dpi:522,bw:2.054,ac:500},{type:"android",rules:[{mdmh:"samsung/*/SM-G977F/*"},{ua:"SM-G977F"}],dpi:505,bw:2.334,ac:500},{type:"ios",rules:[{res:[828,1792]}],dpi:326,bw:5,ac:500}]};function W(e,t){if(this.dpdb=G,this.recalculateDeviceParams_(),e){this.onDeviceParamsUpdated=t;var n=new XMLHttpRequest,r=this;n.open("GET",e,!0),n.addEventListener("load",(function(){r.loading=!1,n.status>=200&&n.status<=299?(r.dpdb=JSON.parse(n.response),r.recalculateDeviceParams_()):console.error("Error loading online DPDB!")})),n.send()}}function q(e){this.xdpi=e.xdpi,this.ydpi=e.ydpi,this.bevelMm=e.bevelMm}function X(e,t){this.set(e,t)}function Y(e,t){this.kFilter=e,this.isDebug=t,this.currentAccelMeasurement=new X,this.currentGyroMeasurement=new X,this.previousGyroMeasurement=new X,i()?this.filterQ=new j(-1,0,0,1):this.filterQ=new j(1,0,0,1),this.previousFilterQ=new j,this.previousFilterQ.copy(this.filterQ),this.accelQ=new j,this.isOrientationInitialized=!1,this.estimatedGravity=new N,this.measuredGravity=new N,this.gyroIntegralQ=new j}function K(e,t){this.predictionTimeS=e,this.isDebug=t,this.previousQ=new j,this.previousTimestampS=null,this.deltaQ=new j,this.outQ=new j}function Q(e,t,n,r){this.yawOnly=n,this.accelerometer=new N,this.gyroscope=new N,this.filter=new Y(e,r),this.posePredictor=new K(t,r),this.isFirefoxAndroid=s(),this.isIOS=i();var o=l();this.isDeviceMotionInRadians=!this.isIOS&&o&&o<66,this.isWithoutDeviceMotion=u()||c(),this.filterToWorldQ=new j,i()?this.filterToWorldQ.setFromAxisAngle(new N(1,0,0),Math.PI/2):this.filterToWorldQ.setFromAxisAngle(new N(1,0,0),-Math.PI/2),this.inverseWorldToScreenQ=new j,this.worldToScreenQ=new j,this.originalPoseAdjustQ=new j,this.originalPoseAdjustQ.setFromAxisAngle(new N(0,0,1),-window.orientation*Math.PI/180),this.setScreenTransform_(),d()&&this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),this.resetQ=new j,this.orientationOut_=new Float32Array(4),this.start()}W.prototype.getDeviceParams=function(){return this.deviceParams},W.prototype.recalculateDeviceParams_=function(){var e=this.calcDeviceParams_();e?(this.deviceParams=e,this.onDeviceParamsUpdated&&this.onDeviceParamsUpdated(this.deviceParams)):console.error("Failed to recalculate device parameters.")},W.prototype.calcDeviceParams_=function(){var e=this.dpdb;if(!e)return console.error("DPDB not available."),null;if(1!=e.format)return console.error("DPDB has unexpected format version."),null;if(!e.devices||!e.devices.length)return console.error("DPDB does not have a devices section."),null;var t=navigator.userAgent||navigator.vendor||window.opera,n=f(),r=p();if(!e.devices)return console.error("DPDB has no devices section."),null;for(var o=0;o<e.devices.length;o++){var a=e.devices[o];if(a.rules)if("ios"==a.type||"android"==a.type){if(i()==("ios"==a.type)){for(var s=!1,l=0;l<a.rules.length;l++){var c=a.rules[l];if(this.ruleMatches_(c,t,n,r)){s=!0;break}}if(s)return new q({xdpi:a.dpi[0]||a.dpi,ydpi:a.dpi[1]||a.dpi,bevelMm:a.bw})}}else console.warn("Device["+o+"] has invalid type.");else console.warn("Device["+o+"] has no rules section.")}return console.warn("No DPDB device match."),null},W.prototype.ruleMatches_=function(e,t,n,r){if(!e.ua&&!e.res)return!1;if(e.ua&&"SM"===e.ua.substring(0,2)&&(e.ua=e.ua.substring(0,7)),e.ua&&t.indexOf(e.ua)<0)return!1;if(e.res){if(!e.res[0]||!e.res[1])return!1;var i=e.res[0],o=e.res[1];if(Math.min(n,r)!=Math.min(i,o)||Math.max(n,r)!=Math.max(i,o))return!1}return!0},X.prototype.set=function(e,t){this.sample=e,this.timestampS=t},X.prototype.copy=function(e){this.set(e.sample,e.timestampS)},Y.prototype.addAccelMeasurement=function(e,t){this.currentAccelMeasurement.set(e,t)},Y.prototype.addGyroMeasurement=function(e,t){this.currentGyroMeasurement.set(e,t);var n,r=t-this.previousGyroMeasurement.timestampS;n=r,isNaN(n)||n<=.001||n>1||this.run_(),this.previousGyroMeasurement.copy(this.currentGyroMeasurement)},Y.prototype.run_=function(){if(!this.isOrientationInitialized)return this.accelQ=this.accelToQuaternion_(this.currentAccelMeasurement.sample),this.previousFilterQ.copy(this.accelQ),void(this.isOrientationInitialized=!0);var e=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS,t=this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample,e);this.gyroIntegralQ.multiply(t),this.filterQ.copy(this.previousFilterQ),this.filterQ.multiply(t);var n=new j;n.copy(this.filterQ),n.inverse(),this.estimatedGravity.set(0,0,-1),this.estimatedGravity.applyQuaternion(n),this.estimatedGravity.normalize(),this.measuredGravity.copy(this.currentAccelMeasurement.sample),this.measuredGravity.normalize();var r,i=new j;i.setFromUnitVectors(this.estimatedGravity,this.measuredGravity),i.inverse(),this.isDebug&&console.log("Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",I*((r=i).w>1?(console.warn("getQuaternionAngle: w > 1"),0):2*Math.acos(r.w)),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1));var o=new j;o.copy(this.filterQ),o.multiply(i),this.filterQ.slerp(o,1-this.kFilter),this.previousFilterQ.copy(this.filterQ)},Y.prototype.getOrientation=function(){return this.filterQ},Y.prototype.accelToQuaternion_=function(e){var t=new N;t.copy(e),t.normalize();var n=new j;return n.setFromUnitVectors(new N(0,0,-1),t),n.inverse(),n},Y.prototype.gyroToQuaternionDelta_=function(e,t){var n=new j,r=new N;return r.copy(e),r.normalize(),n.setFromAxisAngle(r,e.length()*t),n},K.prototype.getPrediction=function(e,t,n){if(!this.previousTimestampS)return this.previousQ.copy(e),this.previousTimestampS=n,e;var r=new N;r.copy(t),r.normalize();var i=t.length();if(i<20*D)return this.isDebug&&console.log("Moving slowly, at %s deg/s: no prediction",(I*i).toFixed(1)),this.outQ.copy(e),this.previousQ.copy(e),this.outQ;var o=i*this.predictionTimeS;return this.deltaQ.setFromAxisAngle(r,o),this.outQ.copy(this.previousQ),this.outQ.multiply(this.deltaQ),this.previousQ.copy(e),this.previousTimestampS=n,this.outQ},Q.prototype.getPosition=function(){return null},Q.prototype.getOrientation=function(){var e=void 0;if(this.isWithoutDeviceMotion&&this._deviceOrientationQ)return this.deviceOrientationFixQ=this.deviceOrientationFixQ||function(){var e=(new j).setFromAxisAngle(new N(0,0,-1),0),t=new j;return-90===window.orientation?t.setFromAxisAngle(new N(0,1,0),Math.PI/-2):t.setFromAxisAngle(new N(0,1,0),Math.PI/2),e.multiply(t)}(),this.deviceOrientationFilterToWorldQ=this.deviceOrientationFilterToWorldQ||function(){var e=new j;return e.setFromAxisAngle(new N(1,0,0),-Math.PI/2),e}(),e=this._deviceOrientationQ,(t=new j).copy(e),t.multiply(this.deviceOrientationFilterToWorldQ),t.multiply(this.resetQ),t.multiply(this.worldToScreenQ),t.multiplyQuaternions(this.deviceOrientationFixQ,t),this.yawOnly&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_;var t,n=this.filter.getOrientation();return e=this.posePredictor.getPrediction(n,this.gyroscope,this.previousTimestampS),(t=new j).copy(this.filterToWorldQ),t.multiply(this.resetQ),t.multiply(e),t.multiply(this.worldToScreenQ),this.yawOnly&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_},Q.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation()),this.resetQ.x=0,this.resetQ.y=0,this.resetQ.z*=-1,this.resetQ.normalize(),d()&&this.resetQ.multiply(this.inverseWorldToScreenQ),this.resetQ.multiply(this.originalPoseAdjustQ)},Q.prototype.onDeviceOrientation_=function(e){this._deviceOrientationQ=this._deviceOrientationQ||new j;var t=e.alpha,n=e.beta,r=e.gamma;t=(t||0)*Math.PI/180,n=(n||0)*Math.PI/180,r=(r||0)*Math.PI/180,this._deviceOrientationQ.setFromEulerYXZ(n,t,-r)},Q.prototype.onDeviceMotion_=function(e){this.updateDeviceMotion_(e)},Q.prototype.updateDeviceMotion_=function(e){var t=e.accelerationIncludingGravity,n=e.rotationRate,r=e.timeStamp/1e3,i=r-this.previousTimestampS;return i<0?(E("fusion-pose-sensor:invalid:non-monotonic","Invalid timestamps detected: non-monotonic timestamp from devicemotion"),void(this.previousTimestampS=r)):i<=.001||i>1?(E("fusion-pose-sensor:invalid:outside-threshold","Invalid timestamps detected: Timestamp from devicemotion outside expected range."),void(this.previousTimestampS=r)):(this.accelerometer.set(-t.x,-t.y,-t.z),n&&(h()?this.gyroscope.set(-n.beta,n.alpha,n.gamma):this.gyroscope.set(n.alpha,n.beta,n.gamma),this.isDeviceMotionInRadians||this.gyroscope.multiplyScalar(Math.PI/180),this.filter.addGyroMeasurement(this.gyroscope,r)),this.filter.addAccelMeasurement(this.accelerometer,r),void(this.previousTimestampS=r))},Q.prototype.onOrientationChange_=function(e){this.setScreenTransform_()},Q.prototype.onMessage_=function(e){var t=e.data;t&&t.type&&"devicemotion"===t.type.toLowerCase()&&this.updateDeviceMotion_(t.deviceMotionEvent)},Q.prototype.setScreenTransform_=function(){switch(this.worldToScreenQ.set(0,0,0,1),window.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new N(0,0,1),-Math.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new N(0,0,1),Math.PI/2)}this.inverseWorldToScreenQ.copy(this.worldToScreenQ),this.inverseWorldToScreenQ.inverse()},Q.prototype.start=function(){this.onDeviceMotionCallback_=this.onDeviceMotion_.bind(this),this.onOrientationChangeCallback_=this.onOrientationChange_.bind(this),this.onMessageCallback_=this.onMessage_.bind(this),this.onDeviceOrientationCallback_=this.onDeviceOrientation_.bind(this),i()&&function(){var e=window.self!==window.top,t=_(document.referrer),n=_(window.location.href);return e&&t!==n}()&&window.addEventListener("message",this.onMessageCallback_),window.addEventListener("orientationchange",this.onOrientationChangeCallback_),this.isWithoutDeviceMotion?window.addEventListener("deviceorientation",this.onDeviceOrientationCallback_):window.addEventListener("devicemotion",this.onDeviceMotionCallback_)},Q.prototype.stop=function(){window.removeEventListener("devicemotion",this.onDeviceMotionCallback_),window.removeEventListener("deviceorientation",this.onDeviceOrientationCallback_),window.removeEventListener("orientationchange",this.onOrientationChangeCallback_),window.removeEventListener("message",this.onMessageCallback_)};var Z=new N(1,0,0),J=new N(0,0,1),$=new j;$.setFromAxisAngle(Z,-Math.PI/2),$.multiply((new j).setFromAxisAngle(J,Math.PI/2));var ee=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.config=e,this.sensor=null,this.fusionSensor=null,this._out=new Float32Array(4),this.api=null,this.errors=[],this._sensorQ=new j,this._outQ=new j,this._onSensorRead=this._onSensorRead.bind(this),this._onSensorError=this._onSensorError.bind(this),this.init()}return e(t,[{key:"init",value:function(){var e=null;try{(e=new RelativeOrientationSensor({frequency:60,referenceFrame:"screen"})).addEventListener("error",this._onSensorError)}catch(t){this.errors.push(t),"SecurityError"===t.name?(console.error("Cannot construct sensors due to the Feature Policy"),console.warn('Attempting to fall back using "devicemotion"; however this will fail in the future without correct permissions.'),this.useDeviceMotion()):"ReferenceError"===t.name?this.useDeviceMotion():console.error(t)}e&&(this.api="sensor",this.sensor=e,this.sensor.addEventListener("reading",this._onSensorRead),this.sensor.start())}},{key:"useDeviceMotion",value:function(){this.api="devicemotion",this.fusionSensor=new Q(this.config.K_FILTER,this.config.PREDICTION_TIME_S,this.config.YAW_ONLY,this.config.DEBUG),this.sensor&&(this.sensor.removeEventListener("reading",this._onSensorRead),this.sensor.removeEventListener("error",this._onSensorError),this.sensor=null)}},{key:"getOrientation",value:function(){if(this.fusionSensor)return this.fusionSensor.getOrientation();if(!this.sensor||!this.sensor.quaternion)return this._out[0]=this._out[1]=this._out[2]=0,this._out[3]=1,this._out;var e=this.sensor.quaternion;this._sensorQ.set(e[0],e[1],e[2],e[3]);var t=this._outQ;return t.copy($),t.multiply(this._sensorQ),this.config.YAW_ONLY&&(t.x=t.z=0,t.normalize()),this._out[0]=t.x,this._out[1]=t.y,this._out[2]=t.z,this._out[3]=t.w,this._out}},{key:"_onSensorError",value:function(e){this.errors.push(e.error),"NotAllowedError"===e.error.name?console.error("Permission to access sensor was denied"):"NotReadableError"===e.error.name?console.error("Sensor could not be read"):console.error(e.error),this.useDeviceMotion()}},{key:"_onSensorRead",value:function(){}}]),t}();function te(){this.loadIcon_();var e=document.createElement("div");(o=e.style).position="fixed",o.top=0,o.right=0,o.bottom=0,o.left=0,o.backgroundColor="gray",o.fontFamily="sans-serif",o.zIndex=1e6;var t=document.createElement("img");t.src=this.icon,(o=t.style).marginLeft="25%",o.marginTop="25%",o.width="50%",e.appendChild(t);var n=document.createElement("div");(o=n.style).textAlign="center",o.fontSize="16px",o.lineHeight="24px",o.margin="24px 25%",o.width="50%",n.innerHTML="Place your phone into your Cardboard viewer.",e.appendChild(n);var r=document.createElement("div");(o=r.style).backgroundColor="#CFD8DC",o.position="fixed",o.bottom=0,o.width="100%",o.height="48px",o.padding="14px 24px",o.boxSizing="border-box",o.color="#656A6B",e.appendChild(r);var i=document.createElement("div");i.style.float="left",i.innerHTML="No Cardboard viewer?";var o,a=document.createElement("a");a.href="https://www.google.com/get/cardboard/get-cardboard/",a.innerHTML="get one",a.target="_blank",(o=a.style).float="right",o.fontWeight=600,o.textTransform="uppercase",o.borderLeft="1px solid gray",o.paddingLeft="24px",o.textDecoration="none",o.color="#656A6B",r.appendChild(i),r.appendChild(a),this.overlay=e,this.text=n,this.hide()}function ne(e){try{this.selectedKey=localStorage.getItem("WEBVR_CARDBOARD_VIEWER")}catch(t){console.error("Failed to load viewer profile: %s",t)}this.selectedKey||(this.selectedKey=e||"CardboardV1"),this.dialog=this.createDialog_(U.Viewers),this.root=null,this.onChangeCallbacks_=[]}te.prototype.show=function(e){e||this.overlay.parentElement?e&&(this.overlay.parentElement&&this.overlay.parentElement!=e&&this.overlay.parentElement.removeChild(this.overlay),e.appendChild(this.overlay)):document.body.appendChild(this.overlay),this.overlay.style.display="block";var t=this.overlay.querySelector("img").style;d()?(t.width="20%",t.marginLeft="40%",t.marginTop="3%"):(t.width="50%",t.marginLeft="25%",t.marginTop="25%")},te.prototype.hide=function(){this.overlay.style.display="none"},te.prototype.showTemporarily=function(e,t){this.show(t),this.timer=setTimeout(this.hide.bind(this),e)},te.prototype.disableShowTemporarily=function(){clearTimeout(this.timer)},te.prototype.update=function(){this.disableShowTemporarily(),!d()&&y()?this.show():this.hide()},te.prototype.loadIcon_=function(){this.icon="data:image/svg+xml,"+encodeURIComponent("<svg width='198' height='240' viewBox='0 0 198 240' xmlns='http://www.w3.org/2000/svg'><g fill='none' fill-rule='evenodd'><path d='M149.625 109.527l6.737 3.891v.886c0 .177.013.36.038.549.01.081.02.162.027.242.14 1.415.974 2.998 2.105 3.999l5.72 5.062.081-.09s4.382-2.53 5.235-3.024l25.97 14.993v54.001c0 .771-.386 1.217-.948 1.217-.233 0-.495-.076-.772-.236l-23.967-13.838-.014.024-27.322 15.775-.85-1.323c-4.731-1.529-9.748-2.74-14.951-3.61a.27.27 0 0 0-.007.024l-5.067 16.961-7.891 4.556-.037-.063v27.59c0 .772-.386 1.217-.948 1.217-.232 0-.495-.076-.772-.236l-42.473-24.522c-.95-.549-1.72-1.877-1.72-2.967v-1.035l-.021.047a5.111 5.111 0 0 0-1.816-.399 5.682 5.682 0 0 0-.546.001 13.724 13.724 0 0 1-1.918-.041c-1.655-.153-3.2-.6-4.404-1.296l-46.576-26.89.005.012-10.278-18.75c-1.001-1.827-.241-4.216 1.698-5.336l56.011-32.345a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.659 3.227 1.853l.005-.003.227.413-.006.004a9.63 9.63 0 0 0 1.477 2.018l.277.27c1.914 1.85 4.468 2.801 7.113 2.801 1.949 0 3.948-.517 5.775-1.572.013 0 7.319-4.219 7.319-4.219a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.658 3.226 1.853l3.25 5.928.022-.018 6.785 3.917-.105-.182 46.881-26.965m0-1.635c-.282 0-.563.073-.815.218l-46.169 26.556-5.41-3.124-3.005-5.481c-.913-1.667-2.699-2.702-4.66-2.703-1.011 0-2.02.274-2.917.792a3825 3825 0 0 1-7.275 4.195l-.044.024a9.937 9.937 0 0 1-4.957 1.353c-2.292 0-4.414-.832-5.976-2.342l-.252-.245a7.992 7.992 0 0 1-1.139-1.534 1.379 1.379 0 0 0-.06-.122l-.227-.414a1.718 1.718 0 0 0-.095-.154c-.938-1.574-2.673-2.545-4.571-2.545-1.011 0-2.02.274-2.917.792L3.125 155.502c-2.699 1.559-3.738 4.94-2.314 7.538l10.278 18.75c.177.323.448.563.761.704l46.426 26.804c1.403.81 3.157 1.332 5.072 1.508a15.661 15.661 0 0 0 2.146.046 4.766 4.766 0 0 1 .396 0c.096.004.19.011.283.022.109 1.593 1.159 3.323 2.529 4.114l42.472 24.522c.524.302 1.058.455 1.59.455 1.497 0 2.583-1.2 2.583-2.852v-26.562l7.111-4.105a1.64 1.64 0 0 0 .749-.948l4.658-15.593c4.414.797 8.692 1.848 12.742 3.128l.533.829a1.634 1.634 0 0 0 2.193.531l26.532-15.317L193 192.433c.523.302 1.058.455 1.59.455 1.497 0 2.583-1.199 2.583-2.852v-54.001c0-.584-.312-1.124-.818-1.416l-25.97-14.993a1.633 1.633 0 0 0-1.636.001c-.606.351-2.993 1.73-4.325 2.498l-4.809-4.255c-.819-.725-1.461-1.933-1.561-2.936a7.776 7.776 0 0 0-.033-.294 2.487 2.487 0 0 1-.023-.336v-.886c0-.584-.312-1.123-.817-1.416l-6.739-3.891a1.633 1.633 0 0 0-.817-.219' fill='#455A64'/><path d='M96.027 132.636l46.576 26.891c1.204.695 1.979 1.587 2.242 2.541l-.01.007-81.374 46.982h-.001c-1.654-.152-3.199-.6-4.403-1.295l-46.576-26.891 83.546-48.235' fill='#FAFAFA'/><path d='M63.461 209.174c-.008 0-.015 0-.022-.002-1.693-.156-3.228-.609-4.441-1.309l-46.576-26.89a.118.118 0 0 1 0-.203l83.546-48.235a.117.117 0 0 1 .117 0l46.576 26.891c1.227.708 2.021 1.612 2.296 2.611a.116.116 0 0 1-.042.124l-.021.016-81.375 46.981a.11.11 0 0 1-.058.016zm-50.747-28.303l46.401 26.79c1.178.68 2.671 1.121 4.32 1.276l81.272-46.922c-.279-.907-1.025-1.73-2.163-2.387l-46.517-26.857-83.313 48.1z' fill='#607D8B'/><path d='M148.327 165.471a5.85 5.85 0 0 1-.546.001c-1.894-.083-3.302-1.038-3.145-2.132a2.693 2.693 0 0 0-.072-1.105l-81.103 46.822c.628.058 1.272.073 1.918.042.182-.009.364-.009.546-.001 1.894.083 3.302 1.038 3.145 2.132l79.257-45.759' fill='#FFF'/><path d='M69.07 211.347a.118.118 0 0 1-.115-.134c.045-.317-.057-.637-.297-.925-.505-.61-1.555-1.022-2.738-1.074a5.966 5.966 0 0 0-.535.001 14.03 14.03 0 0 1-1.935-.041.117.117 0 0 1-.103-.092.116.116 0 0 1 .055-.126l81.104-46.822a.117.117 0 0 1 .171.07c.104.381.129.768.074 1.153-.045.316.057.637.296.925.506.61 1.555 1.021 2.739 1.073.178.008.357.008.535-.001a.117.117 0 0 1 .064.218l-79.256 45.759a.114.114 0 0 1-.059.016zm-3.405-2.372c.089 0 .177.002.265.006 1.266.056 2.353.488 2.908 1.158.227.274.35.575.36.882l78.685-45.429c-.036 0-.072-.001-.107-.003-1.267-.056-2.354-.489-2.909-1.158-.282-.34-.402-.724-.347-1.107a2.604 2.604 0 0 0-.032-.91L63.846 208.97a13.91 13.91 0 0 0 1.528.012c.097-.005.194-.007.291-.007z' fill='#607D8B'/><path d='M2.208 162.134c-1.001-1.827-.241-4.217 1.698-5.337l56.011-32.344c1.939-1.12 4.324-.546 5.326 1.281l.232.41a9.344 9.344 0 0 0 1.47 2.021l.278.27c3.325 3.214 8.583 3.716 12.888 1.23l7.319-4.22c1.94-1.119 4.324-.546 5.325 1.282l3.25 5.928-83.519 48.229-10.278-18.75z' fill='#FAFAFA'/><path d='M12.486 181.001a.112.112 0 0 1-.031-.005.114.114 0 0 1-.071-.056L2.106 162.19c-1.031-1.88-.249-4.345 1.742-5.494l56.01-32.344a4.328 4.328 0 0 1 2.158-.588c1.415 0 2.65.702 3.311 1.882.01.008.018.017.024.028l.227.414a.122.122 0 0 1 .013.038 9.508 9.508 0 0 0 1.439 1.959l.275.266c1.846 1.786 4.344 2.769 7.031 2.769 1.977 0 3.954-.538 5.717-1.557a.148.148 0 0 1 .035-.013l7.284-4.206a4.321 4.321 0 0 1 2.157-.588c1.427 0 2.672.716 3.329 1.914l3.249 5.929a.116.116 0 0 1-.044.157l-83.518 48.229a.116.116 0 0 1-.059.016zm49.53-57.004c-.704 0-1.41.193-2.041.557l-56.01 32.345c-1.882 1.086-2.624 3.409-1.655 5.179l10.221 18.645 83.317-48.112-3.195-5.829c-.615-1.122-1.783-1.792-3.124-1.792a4.08 4.08 0 0 0-2.04.557l-7.317 4.225a.148.148 0 0 1-.035.013 11.7 11.7 0 0 1-5.801 1.569c-2.748 0-5.303-1.007-7.194-2.835l-.278-.27a9.716 9.716 0 0 1-1.497-2.046.096.096 0 0 1-.013-.037l-.191-.347a.11.11 0 0 1-.023-.029c-.615-1.123-1.783-1.793-3.124-1.793z' fill='#607D8B'/><path d='M42.434 155.808c-2.51-.001-4.697-1.258-5.852-3.365-1.811-3.304-.438-7.634 3.059-9.654l12.291-7.098a7.599 7.599 0 0 1 3.789-1.033c2.51 0 4.697 1.258 5.852 3.365 1.811 3.304.439 7.634-3.059 9.654l-12.291 7.098a7.606 7.606 0 0 1-3.789 1.033zm13.287-20.683a7.128 7.128 0 0 0-3.555.971l-12.291 7.098c-3.279 1.893-4.573 5.942-2.883 9.024 1.071 1.955 3.106 3.122 5.442 3.122a7.13 7.13 0 0 0 3.556-.97l12.291-7.098c3.279-1.893 4.572-5.942 2.883-9.024-1.072-1.955-3.106-3.123-5.443-3.123z' fill='#607D8B'/><path d='M149.588 109.407l6.737 3.89v.887c0 .176.013.36.037.549.011.081.02.161.028.242.14 1.415.973 2.998 2.105 3.999l7.396 6.545c.177.156.358.295.541.415 1.579 1.04 2.95.466 3.062-1.282.049-.784.057-1.595.023-2.429l-.003-.16v-1.151l25.987 15.003v54c0 1.09-.77 1.53-1.72.982l-42.473-24.523c-.95-.548-1.72-1.877-1.72-2.966v-34.033' fill='#FAFAFA'/><path d='M194.553 191.25c-.257 0-.54-.085-.831-.253l-42.472-24.521c-.981-.567-1.779-1.943-1.779-3.068v-34.033h.234v34.033c0 1.051.745 2.336 1.661 2.866l42.473 24.521c.424.245.816.288 1.103.122.285-.164.442-.52.442-1.002v-53.933l-25.753-14.868.003 1.106c.034.832.026 1.654-.024 2.439-.054.844-.396 1.464-.963 1.746-.619.309-1.45.173-2.28-.373a5.023 5.023 0 0 1-.553-.426l-7.397-6.544c-1.158-1.026-1.999-2.625-2.143-4.076a9.624 9.624 0 0 0-.027-.238 4.241 4.241 0 0 1-.038-.564v-.82l-6.68-3.856.117-.202 6.738 3.89.058.034v.954c0 .171.012.351.036.533.011.083.021.165.029.246.138 1.395.948 2.935 2.065 3.923l7.397 6.545c.173.153.35.289.527.406.758.499 1.504.63 2.047.359.49-.243.786-.795.834-1.551.05-.778.057-1.591.024-2.417l-.004-.163v-1.355l.175.1 25.987 15.004.059.033v54.068c0 .569-.198.996-.559 1.204a1.002 1.002 0 0 1-.506.131' fill='#607D8B'/><path d='M145.685 163.161l24.115 13.922-25.978 14.998-1.462-.307c-6.534-2.17-13.628-3.728-21.019-4.616-4.365-.524-8.663 1.096-9.598 3.62a2.746 2.746 0 0 0-.011 1.928c1.538 4.267 4.236 8.363 7.995 12.135l.532.845-25.977 14.997-24.115-13.922 75.518-43.6' fill='#FFF'/><path d='M94.282 220.818l-.059-.033-24.29-14.024.175-.101 75.577-43.634.058.033 24.29 14.024-26.191 15.122-.045-.01-1.461-.307c-6.549-2.174-13.613-3.725-21.009-4.614a13.744 13.744 0 0 0-1.638-.097c-3.758 0-7.054 1.531-7.837 3.642a2.62 2.62 0 0 0-.01 1.848c1.535 4.258 4.216 8.326 7.968 12.091l.016.021.526.835.006.01.064.102-.105.061-25.977 14.998-.058.033zm-23.881-14.057l23.881 13.788 24.802-14.32c.546-.315.846-.489 1.017-.575l-.466-.74c-3.771-3.787-6.467-7.881-8.013-12.168a2.851 2.851 0 0 1 .011-2.008c.815-2.199 4.203-3.795 8.056-3.795.557 0 1.117.033 1.666.099 7.412.891 14.491 2.445 21.041 4.621.836.175 1.215.254 1.39.304l25.78-14.884-23.881-13.788-75.284 43.466z' fill='#607D8B'/><path d='M167.23 125.979v50.871l-27.321 15.773-6.461-14.167c-.91-1.996-3.428-1.738-5.624.574a10.238 10.238 0 0 0-2.33 4.018l-6.46 21.628-27.322 15.774v-50.871l75.518-43.6' fill='#FFF'/><path d='M91.712 220.567a.127.127 0 0 1-.059-.016.118.118 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.519-43.6a.117.117 0 0 1 .175.101v50.871c0 .041-.023.08-.059.1l-27.321 15.775a.118.118 0 0 1-.094.01.12.12 0 0 1-.071-.063l-6.46-14.168c-.375-.822-1.062-1.275-1.934-1.275-1.089 0-2.364.686-3.5 1.881a10.206 10.206 0 0 0-2.302 3.972l-6.46 21.627a.118.118 0 0 1-.054.068L91.77 220.551a.12.12 0 0 1-.058.016zm.117-50.92v50.601l27.106-15.65 6.447-21.583a10.286 10.286 0 0 1 2.357-4.065c1.18-1.242 2.517-1.954 3.669-1.954.969 0 1.731.501 2.146 1.411l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M168.543 126.213v50.87l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.624.574a10.248 10.248 0 0 0-2.33 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6' fill='#FFF'/><path d='M93.025 220.8a.123.123 0 0 1-.059-.015.12.12 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.518-43.6a.112.112 0 0 1 .117 0c.036.02.059.059.059.1v50.871a.116.116 0 0 1-.059.101l-27.321 15.774a.111.111 0 0 1-.094.01.115.115 0 0 1-.071-.062l-6.46-14.168c-.375-.823-1.062-1.275-1.935-1.275-1.088 0-2.363.685-3.499 1.881a10.19 10.19 0 0 0-2.302 3.971l-6.461 21.628a.108.108 0 0 1-.053.067l-27.322 15.775a.12.12 0 0 1-.058.015zm.117-50.919v50.6l27.106-15.649 6.447-21.584a10.293 10.293 0 0 1 2.357-4.065c1.179-1.241 2.516-1.954 3.668-1.954.969 0 1.732.502 2.147 1.412l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M169.8 177.083l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.625.574a10.246 10.246 0 0 0-2.329 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6v50.87z' fill='#FAFAFA'/><path d='M94.282 220.917a.234.234 0 0 1-.234-.233v-50.871c0-.083.045-.161.117-.202l75.518-43.601a.234.234 0 1 1 .35.202v50.871a.233.233 0 0 1-.116.202l-27.322 15.775a.232.232 0 0 1-.329-.106l-6.461-14.168c-.36-.789-.992-1.206-1.828-1.206-1.056 0-2.301.672-3.415 1.844a10.099 10.099 0 0 0-2.275 3.924l-6.46 21.628a.235.235 0 0 1-.107.136l-27.322 15.774a.23.23 0 0 1-.116.031zm.233-50.969v50.331l26.891-15.525 6.434-21.539a10.41 10.41 0 0 1 2.384-4.112c1.201-1.265 2.569-1.991 3.753-1.991 1.018 0 1.818.526 2.253 1.48l6.354 13.934 26.982-15.578v-50.331l-75.051 43.331z' fill='#607D8B'/><path d='M109.894 199.943c-1.774 0-3.241-.725-4.244-2.12a.224.224 0 0 1 .023-.294.233.233 0 0 1 .301-.023c.78.547 1.705.827 2.75.827 1.323 0 2.754-.439 4.256-1.306 5.311-3.067 9.631-10.518 9.631-16.611 0-1.927-.442-3.56-1.278-4.724a.232.232 0 0 1 .323-.327c1.671 1.172 2.591 3.381 2.591 6.219 0 6.242-4.426 13.863-9.865 17.003-1.574.908-3.084 1.356-4.488 1.356zm-2.969-1.542c.813.651 1.82.877 2.968.877h.001c1.321 0 2.753-.327 4.254-1.194 5.311-3.067 9.632-10.463 9.632-16.556 0-1.979-.463-3.599-1.326-4.761.411 1.035.625 2.275.625 3.635 0 6.243-4.426 13.883-9.865 17.023-1.574.909-3.084 1.317-4.49 1.317-.641 0-1.243-.149-1.799-.341z' fill='#607D8B'/><path d='M113.097 197.23c5.384-3.108 9.748-10.636 9.748-16.814 0-2.051-.483-3.692-1.323-4.86-1.784-1.252-4.374-1.194-7.257.47-5.384 3.108-9.748 10.636-9.748 16.814 0 2.051.483 3.692 1.323 4.86 1.784 1.252 4.374 1.194 7.257-.47' fill='#FAFAFA'/><path d='M108.724 198.614c-1.142 0-2.158-.213-3.019-.817-.021-.014-.04.014-.055-.007-.894-1.244-1.367-2.948-1.367-4.973 0-6.242 4.426-13.864 9.865-17.005 1.574-.908 3.084-1.363 4.49-1.363 1.142 0 2.158.309 3.018.913a.23.23 0 0 1 .056.056c.894 1.244 1.367 2.972 1.367 4.997 0 6.243-4.426 13.783-9.865 16.923-1.574.909-3.084 1.276-4.49 1.276zm-2.718-1.109c.774.532 1.688.776 2.718.776 1.323 0 2.754-.413 4.256-1.28 5.311-3.066 9.631-10.505 9.631-16.598 0-1.909-.434-3.523-1.255-4.685-.774-.533-1.688-.799-2.718-.799-1.323 0-2.755.441-4.256 1.308-5.311 3.066-9.631 10.506-9.631 16.599 0 1.909.434 3.517 1.255 4.679z' fill='#607D8B'/><path d='M149.318 114.262l-9.984 8.878 15.893 11.031 5.589-6.112-11.498-13.797' fill='#FAFAFA'/><path d='M169.676 120.84l-9.748 5.627c-3.642 2.103-9.528 2.113-13.147.024-3.62-2.089-3.601-5.488.041-7.591l9.495-5.608-6.729-3.885-81.836 47.071 45.923 26.514 3.081-1.779c.631-.365.869-.898.618-1.39-2.357-4.632-2.593-9.546-.683-14.262 5.638-13.92 24.509-24.815 48.618-28.07 8.169-1.103 16.68-.967 24.704.394.852.145 1.776.008 2.407-.357l3.081-1.778-25.825-14.91' fill='#FAFAFA'/><path d='M113.675 183.459a.47.47 0 0 1-.233-.062l-45.924-26.515a.468.468 0 0 1 .001-.809l81.836-47.071a.467.467 0 0 1 .466 0l6.729 3.885a.467.467 0 0 1-.467.809l-6.496-3.75-80.9 46.533 44.988 25.973 2.848-1.644c.192-.111.62-.409.435-.773-2.416-4.748-2.658-9.814-.7-14.65 2.806-6.927 8.885-13.242 17.582-18.263 8.657-4.998 19.518-8.489 31.407-10.094 8.198-1.107 16.79-.97 24.844.397.739.125 1.561.007 2.095-.301l2.381-1.374-25.125-14.506a.467.467 0 0 1 .467-.809l25.825 14.91a.467.467 0 0 1 0 .809l-3.081 1.779c-.721.417-1.763.575-2.718.413-7.963-1.351-16.457-1.486-24.563-.392-11.77 1.589-22.512 5.039-31.065 9.977-8.514 4.916-14.456 11.073-17.183 17.805-1.854 4.578-1.623 9.376.666 13.875.37.725.055 1.513-.8 2.006l-3.081 1.78a.476.476 0 0 1-.234.062' fill='#455A64'/><path d='M153.316 128.279c-2.413 0-4.821-.528-6.652-1.586-1.818-1.049-2.82-2.461-2.82-3.975 0-1.527 1.016-2.955 2.861-4.02l9.493-5.607a.233.233 0 1 1 .238.402l-9.496 5.609c-1.696.979-2.628 2.263-2.628 3.616 0 1.34.918 2.608 2.585 3.571 3.549 2.049 9.343 2.038 12.914-.024l9.748-5.628a.234.234 0 0 1 .234.405l-9.748 5.628c-1.858 1.072-4.296 1.609-6.729 1.609' fill='#607D8B'/><path d='M113.675 182.992l-45.913-26.508M113.675 183.342a.346.346 0 0 1-.175-.047l-45.913-26.508a.35.35 0 1 1 .35-.607l45.913 26.508a.35.35 0 0 1-.175.654' fill='#455A64'/><path d='M67.762 156.484v54.001c0 1.09.77 2.418 1.72 2.967l42.473 24.521c.95.549 1.72.11 1.72-.98v-54.001' fill='#FAFAFA'/><path d='M112.727 238.561c-.297 0-.62-.095-.947-.285l-42.473-24.521c-1.063-.613-1.895-2.05-1.895-3.27v-54.001a.35.35 0 1 1 .701 0v54.001c0 .96.707 2.18 1.544 2.663l42.473 24.522c.344.198.661.243.87.122.206-.119.325-.411.325-.799v-54.001a.35.35 0 1 1 .7 0v54.001c0 .655-.239 1.154-.675 1.406a1.235 1.235 0 0 1-.623.162' fill='#455A64'/><path d='M112.86 147.512h-.001c-2.318 0-4.499-.522-6.142-1.471-1.705-.984-2.643-2.315-2.643-3.749 0-1.445.952-2.791 2.68-3.788l12.041-6.953c1.668-.962 3.874-1.493 6.212-1.493 2.318 0 4.499.523 6.143 1.472 1.704.984 2.643 2.315 2.643 3.748 0 1.446-.952 2.791-2.68 3.789l-12.042 6.952c-1.668.963-3.874 1.493-6.211 1.493zm12.147-16.753c-2.217 0-4.298.497-5.861 1.399l-12.042 6.952c-1.502.868-2.33 1.998-2.33 3.182 0 1.173.815 2.289 2.293 3.142 1.538.889 3.596 1.378 5.792 1.378h.001c2.216 0 4.298-.497 5.861-1.399l12.041-6.953c1.502-.867 2.33-1.997 2.33-3.182 0-1.172-.814-2.288-2.292-3.142-1.539-.888-3.596-1.377-5.793-1.377z' fill='#607D8B'/><path d='M165.63 123.219l-5.734 3.311c-3.167 1.828-8.286 1.837-11.433.02-3.147-1.817-3.131-4.772.036-6.601l5.734-3.31 11.397 6.58' fill='#FAFAFA'/><path d='M154.233 117.448l9.995 5.771-4.682 2.704c-1.434.827-3.352 1.283-5.399 1.283-2.029 0-3.923-.449-5.333-1.263-1.29-.744-2-1.694-2-2.674 0-.991.723-1.955 2.036-2.713l5.383-3.108m0-.809l-5.734 3.31c-3.167 1.829-3.183 4.784-.036 6.601 1.568.905 3.623 1.357 5.684 1.357 2.077 0 4.159-.46 5.749-1.377l5.734-3.311-11.397-6.58M145.445 179.667c-1.773 0-3.241-.85-4.243-2.245-.067-.092-.057-.275.023-.356.08-.081.207-.12.3-.055.781.548 1.706.812 2.751.811 1.322 0 2.754-.446 4.256-1.313 5.31-3.066 9.631-10.522 9.631-16.615 0-1.927-.442-3.562-1.279-4.726a.235.235 0 0 1 .024-.301.232.232 0 0 1 .3-.027c1.67 1.172 2.59 3.38 2.59 6.219 0 6.242-4.425 13.987-9.865 17.127-1.573.908-3.083 1.481-4.488 1.481zM142.476 178c.814.651 1.82 1.002 2.969 1.002 1.322 0 2.753-.452 4.255-1.32 5.31-3.065 9.631-10.523 9.631-16.617 0-1.98-.463-3.63-1.325-4.793.411 1.035.624 2.26.624 3.62 0 6.242-4.425 13.875-9.865 17.015-1.573.909-3.084 1.376-4.489 1.376a5.49 5.49 0 0 1-1.8-.283z' fill='#607D8B'/><path d='M148.648 176.704c5.384-3.108 9.748-10.636 9.748-16.813 0-2.052-.483-3.693-1.322-4.861-1.785-1.252-4.375-1.194-7.258.471-5.383 3.108-9.748 10.636-9.748 16.813 0 2.051.484 3.692 1.323 4.86 1.785 1.253 4.374 1.195 7.257-.47' fill='#FAFAFA'/><path d='M144.276 178.276c-1.143 0-2.158-.307-3.019-.911a.217.217 0 0 1-.055-.054c-.895-1.244-1.367-2.972-1.367-4.997 0-6.241 4.425-13.875 9.865-17.016 1.573-.908 3.084-1.369 4.489-1.369 1.143 0 2.158.307 3.019.91a.24.24 0 0 1 .055.055c.894 1.244 1.367 2.971 1.367 4.997 0 6.241-4.425 13.875-9.865 17.016-1.573.908-3.084 1.369-4.489 1.369zm-2.718-1.172c.773.533 1.687.901 2.718.901 1.322 0 2.754-.538 4.256-1.405 5.31-3.066 9.631-10.567 9.631-16.661 0-1.908-.434-3.554-1.256-4.716-.774-.532-1.688-.814-2.718-.814-1.322 0-2.754.433-4.256 1.3-5.31 3.066-9.631 10.564-9.631 16.657 0 1.91.434 3.576 1.256 4.738z' fill='#607D8B'/><path d='M150.72 172.361l-.363-.295a24.105 24.105 0 0 0 2.148-3.128 24.05 24.05 0 0 0 1.977-4.375l.443.149a24.54 24.54 0 0 1-2.015 4.46 24.61 24.61 0 0 1-2.19 3.189M115.917 191.514l-.363-.294a24.174 24.174 0 0 0 2.148-3.128 24.038 24.038 0 0 0 1.976-4.375l.443.148a24.48 24.48 0 0 1-2.015 4.461 24.662 24.662 0 0 1-2.189 3.188M114 237.476V182.584 237.476' fill='#607D8B'/><g><path d='M81.822 37.474c.017-.135-.075-.28-.267-.392-.327-.188-.826-.21-1.109-.045l-6.012 3.471c-.131.076-.194.178-.191.285.002.132.002.461.002.578v.043l-.007.128-6.591 3.779c-.001 0-2.077 1.046-2.787 5.192 0 0-.912 6.961-.898 19.745.015 12.57.606 17.07 1.167 21.351.22 1.684 3.001 2.125 3.001 2.125.331.04.698-.027 1.08-.248l75.273-43.551c1.808-1.069 2.667-3.719 3.056-6.284 1.213-7.99 1.675-32.978-.275-39.878-.196-.693-.51-1.083-.868-1.282l-2.086-.79c-.727.028-1.416.467-1.534.535L82.032 37.072l-.21.402' fill='#FFF'/><path d='M144.311 1.701l2.085.79c.358.199.672.589.868 1.282 1.949 6.9 1.487 31.887.275 39.878-.39 2.565-1.249 5.215-3.056 6.284L69.21 93.486a1.78 1.78 0 0 1-.896.258l-.183-.011c0 .001-2.782-.44-3.003-2.124-.56-4.282-1.151-8.781-1.165-21.351-.015-12.784.897-19.745.897-19.745.71-4.146 2.787-5.192 2.787-5.192l6.591-3.779.007-.128v-.043c0-.117 0-.446-.002-.578-.003-.107.059-.21.191-.285l6.012-3.472a.98.98 0 0 1 .481-.11c.218 0 .449.053.627.156.193.112.285.258.268.392l.211-.402 60.744-34.836c.117-.068.806-.507 1.534-.535m0-.997l-.039.001c-.618.023-1.283.244-1.974.656l-.021.012-60.519 34.706a2.358 2.358 0 0 0-.831-.15c-.365 0-.704.084-.98.244l-6.012 3.471c-.442.255-.699.69-.689 1.166l.001.15-6.08 3.487c-.373.199-2.542 1.531-3.29 5.898l-.006.039c-.009.07-.92 7.173-.906 19.875.014 12.62.603 17.116 1.172 21.465l.002.015c.308 2.355 3.475 2.923 3.836 2.98l.034.004c.101.013.204.019.305.019a2.77 2.77 0 0 0 1.396-.392l75.273-43.552c1.811-1.071 2.999-3.423 3.542-6.997 1.186-7.814 1.734-33.096-.301-40.299-.253-.893-.704-1.527-1.343-1.882l-.132-.062-2.085-.789a.973.973 0 0 0-.353-.065' fill='#455A64'/><path d='M128.267 11.565l1.495.434-56.339 32.326' fill='#FFF'/><path d='M74.202 90.545a.5.5 0 0 1-.25-.931l18.437-10.645a.499.499 0 1 1 .499.864L74.451 90.478l-.249.067M75.764 42.654l-.108-.062.046-.171 5.135-2.964.17.045-.045.171-5.135 2.964-.063.017M70.52 90.375V46.421l.063-.036L137.84 7.554v43.954l-.062.036L70.52 90.375zm.25-43.811v43.38l66.821-38.579V7.985L70.77 46.564z' fill='#607D8B'/><path d='M86.986 83.182c-.23.149-.612.384-.849.523l-11.505 6.701c-.237.139-.206.252.068.252h.565c.275 0 .693-.113.93-.252L87.7 83.705c.237-.139.428-.253.425-.256a11.29 11.29 0 0 1-.006-.503c0-.274-.188-.377-.418-.227l-.715.463' fill='#607D8B'/><path d='M75.266 90.782H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.236-.138.615-.371.844-.519l.715-.464a.488.488 0 0 1 .266-.089c.172 0 .345.13.345.421 0 .214.001.363.003.437l.006.004-.004.069c-.003.075-.003.075-.486.356l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.108.866-.234l11.505-6.702c.168-.098.294-.173.361-.214-.004-.084-.004-.218-.004-.437l-.095-.171-.131.049-.714.463c-.232.15-.616.386-.854.525l-11.505 6.702-.029.018z' fill='#607D8B'/><path d='M75.266 89.871H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.258-.151.694-.268.993-.268h.565c.2 0 .316.056.346.166.03.11-.043.217-.215.317l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.107.866-.234l11.505-6.702.03-.018-.035-.001h-.565c-.252 0-.649.108-.867.234l-11.505 6.702-.029.018zM74.37 90.801v-1.247 1.247' fill='#607D8B'/><path d='M68.13 93.901c-.751-.093-1.314-.737-1.439-1.376-.831-4.238-1.151-8.782-1.165-21.352-.015-12.784.897-19.745.897-19.745.711-4.146 2.787-5.192 2.787-5.192l74.859-43.219c.223-.129 2.487-1.584 3.195.923 1.95 6.9 1.488 31.887.275 39.878-.389 2.565-1.248 5.215-3.056 6.283L69.21 93.653c-.382.221-.749.288-1.08.248 0 0-2.781-.441-3.001-2.125-.561-4.281-1.152-8.781-1.167-21.351-.014-12.784.898-19.745.898-19.745.71-4.146 2.787-5.191 2.787-5.191l6.598-3.81.871-.119 6.599-3.83.046-.461L68.13 93.901' fill='#FAFAFA'/><path d='M68.317 94.161l-.215-.013h-.001l-.244-.047c-.719-.156-2.772-.736-2.976-2.292-.568-4.34-1.154-8.813-1.168-21.384-.014-12.654.891-19.707.9-19.777.725-4.231 2.832-5.338 2.922-5.382l6.628-3.827.87-.119 6.446-3.742.034-.334a.248.248 0 0 1 .273-.223.248.248 0 0 1 .223.272l-.059.589-6.752 3.919-.87.118-6.556 3.785c-.031.016-1.99 1.068-2.666 5.018-.007.06-.908 7.086-.894 19.702.014 12.539.597 16.996 1.161 21.305.091.691.689 1.154 1.309 1.452a1.95 1.95 0 0 1-.236-.609c-.781-3.984-1.155-8.202-1.17-21.399-.014-12.653.891-19.707.9-19.777.725-4.231 2.832-5.337 2.922-5.382-.004.001 74.444-42.98 74.846-43.212l.028-.017c.904-.538 1.72-.688 2.36-.433.555.221.949.733 1.172 1.52 2.014 7.128 1.46 32.219.281 39.983-.507 3.341-1.575 5.515-3.175 6.462L69.335 93.869a2.023 2.023 0 0 1-1.018.292zm-.147-.507c.293.036.604-.037.915-.217l75.273-43.551c1.823-1.078 2.602-3.915 2.934-6.106 1.174-7.731 1.731-32.695-.268-39.772-.178-.631-.473-1.032-.876-1.192-.484-.193-1.166-.052-1.921.397l-.034.021-74.858 43.218c-.031.017-1.989 1.069-2.666 5.019-.007.059-.908 7.085-.894 19.702.015 13.155.386 17.351 1.161 21.303.09.461.476.983 1.037 1.139.114.025.185.037.196.039h.001z' fill='#455A64'/><path d='M69.317 68.982c.489-.281.885-.056.885.505 0 .56-.396 1.243-.885 1.525-.488.282-.884.057-.884-.504 0-.56.396-1.243.884-1.526' fill='#FFF'/><path d='M68.92 71.133c-.289 0-.487-.228-.487-.625 0-.56.396-1.243.884-1.526a.812.812 0 0 1 .397-.121c.289 0 .488.229.488.626 0 .56-.396 1.243-.885 1.525a.812.812 0 0 1-.397.121m.794-2.459a.976.976 0 0 0-.49.147c-.548.317-.978 1.058-.978 1.687 0 .486.271.812.674.812a.985.985 0 0 0 .491-.146c.548-.317.978-1.057.978-1.687 0-.486-.272-.813-.675-.813' fill='#8097A2'/><path d='M68.92 70.947c-.271 0-.299-.307-.299-.439 0-.491.361-1.116.79-1.363a.632.632 0 0 1 .303-.096c.272 0 .301.306.301.438 0 .491-.363 1.116-.791 1.364a.629.629 0 0 1-.304.096m.794-2.086a.812.812 0 0 0-.397.121c-.488.283-.884.966-.884 1.526 0 .397.198.625.487.625a.812.812 0 0 0 .397-.121c.489-.282.885-.965.885-1.525 0-.397-.199-.626-.488-.626' fill='#8097A2'/><path d='M69.444 85.35c.264-.152.477-.031.477.272 0 .303-.213.67-.477.822-.263.153-.477.031-.477-.271 0-.302.214-.671.477-.823' fill='#FFF'/><path d='M69.23 86.51c-.156 0-.263-.123-.263-.337 0-.302.214-.671.477-.823a.431.431 0 0 1 .214-.066c.156 0 .263.124.263.338 0 .303-.213.67-.477.822a.431.431 0 0 1-.214.066m.428-1.412c-.1 0-.203.029-.307.09-.32.185-.57.618-.57.985 0 .309.185.524.449.524a.63.63 0 0 0 .308-.09c.32-.185.57-.618.57-.985 0-.309-.185-.524-.45-.524' fill='#8097A2'/><path d='M69.23 86.322l-.076-.149c0-.235.179-.544.384-.661l.12-.041.076.151c0 .234-.179.542-.383.66l-.121.04m.428-1.038a.431.431 0 0 0-.214.066c-.263.152-.477.521-.477.823 0 .214.107.337.263.337a.431.431 0 0 0 .214-.066c.264-.152.477-.519.477-.822 0-.214-.107-.338-.263-.338' fill='#8097A2'/><path d='M139.278 7.769v43.667L72.208 90.16V46.493l67.07-38.724' fill='#455A64'/><path d='M72.083 90.375V46.421l.063-.036 67.257-38.831v43.954l-.062.036-67.258 38.831zm.25-43.811v43.38l66.821-38.579V7.985L72.333 46.564z' fill='#607D8B'/></g><path d='M125.737 88.647l-7.639 3.334V84l-11.459 4.713v8.269L99 100.315l13.369 3.646 13.368-15.314' fill='#455A64'/></g></svg>")},ne.prototype.show=function(e){this.root=e,e.appendChild(this.dialog),this.dialog.querySelector("#"+this.selectedKey).checked=!0,this.dialog.style.display="block"},ne.prototype.hide=function(){this.root&&this.root.contains(this.dialog)&&this.root.removeChild(this.dialog),this.dialog.style.display="none"},ne.prototype.getCurrentViewer=function(){return U.Viewers[this.selectedKey]},ne.prototype.getSelectedKey_=function(){var e=this.dialog.querySelector("input[name=field]:checked");return e?e.id:null},ne.prototype.onChange=function(e){this.onChangeCallbacks_.push(e)},ne.prototype.fireOnChange_=function(e){for(var t=0;t<this.onChangeCallbacks_.length;t++)this.onChangeCallbacks_[t](e)},ne.prototype.onSave_=function(){if(this.selectedKey=this.getSelectedKey_(),this.selectedKey&&U.Viewers[this.selectedKey]){this.fireOnChange_(U.Viewers[this.selectedKey]);try{localStorage.setItem("WEBVR_CARDBOARD_VIEWER",this.selectedKey)}catch(e){console.error("Failed to save viewer profile: %s",e)}this.hide()}else console.error("ViewerSelector.onSave_: this should never happen!")},ne.prototype.createDialog_=function(e){var t=document.createElement("div");t.classList.add("webvr-polyfill-viewer-selector"),t.style.display="none";var n=document.createElement("div");(i=n.style).position="fixed",i.left=0,i.top=0,i.width="100%",i.height="100%",i.background="rgba(0, 0, 0, 0.3)",n.addEventListener("click",this.hide.bind(this));var r=document.createElement("div"),i=r.style;for(var o in i.boxSizing="border-box",i.position="fixed",i.top="24px",i.left="50%",i.marginLeft="-140px",i.width="280px",i.padding="24px",i.overflow="hidden",i.background="#fafafa",i.fontFamily="'Roboto', sans-serif",i.boxShadow="0px 5px 20px #666",r.appendChild(this.createH1_("Select your viewer")),e)r.appendChild(this.createChoice_(o,e[o].label));return r.appendChild(this.createButton_("Save",this.onSave_.bind(this))),t.appendChild(n),t.appendChild(r),t},ne.prototype.createH1_=function(e){var t=document.createElement("h1"),n=t.style;return n.color="black",n.fontSize="20px",n.fontWeight="bold",n.marginTop=0,n.marginBottom="24px",t.innerHTML=e,t},ne.prototype.createChoice_=function(e,t){var n=document.createElement("div");n.style.marginTop="8px",n.style.color="black";var r=document.createElement("input");r.style.fontSize="30px",r.setAttribute("id",e),r.setAttribute("type","radio"),r.setAttribute("value",e),r.setAttribute("name","field");var i=document.createElement("label");return i.style.marginLeft="4px",i.setAttribute("for",e),i.innerHTML=t,n.appendChild(r),n.appendChild(i),n},ne.prototype.createButton_=function(e,t){var n=document.createElement("button");n.innerHTML=e;var r=n.style;return r.float="right",r.textTransform="uppercase",r.color="#1094f7",r.fontSize="14px",r.letterSpacing=0,r.border=0,r.background="none",r.marginTop="16px",n.addEventListener("click",t),n},"undefined"!==typeof window?window:"undefined"!==typeof n||"undefined"!==typeof self&&self;var re,ie=(re=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){!function(t,n){e.exports=n()}(0,(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=0)}([function(e,t,n){var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),o="undefined"!==typeof navigator&&parseFloat((""+(/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))<10&&!window.MSStream,a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o?this.noSleepTimer=null:(this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("playsinline",""),this.noSleepVideo.setAttribute("src",i),this.noSleepVideo.addEventListener("timeupdate",function(e){this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())}.bind(this)))}return r(e,[{key:"enable",value:function(){o?(this.disable(),this.noSleepTimer=window.setInterval((function(){window.location.href="/",window.setTimeout(window.stop,0)}),15e3)):this.noSleepVideo.play()}},{key:"disable",value:function(){o?this.noSleepTimer&&(window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}}]),e}();e.exports=a},function(e,t,n){e.exports="data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0x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AABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="}])}))})))&&re.__esModule&&Object.prototype.hasOwnProperty.call(re,"default")?re.default:re,oe=1e3,ae=[0,0,.5,1],se=[.5,0,.5,1],le=window.requestAnimationFrame,ce=window.cancelAnimationFrame;function ue(e){Object.defineProperties(this,{hasPosition:{writable:!1,enumerable:!0,value:e.hasPosition},hasExternalDisplay:{writable:!1,enumerable:!0,value:e.hasExternalDisplay},canPresent:{writable:!1,enumerable:!0,value:e.canPresent},maxLayers:{writable:!1,enumerable:!0,value:e.maxLayers},hasOrientation:{enumerable:!0,get:function(){return A("VRDisplayCapabilities.prototype.hasOrientation","VRDisplay.prototype.getFrameData"),e.hasOrientation}}})}function he(e){var t=!("wakelock"in(e=e||{}))||e.wakelock;this.isPolyfilled=!0,this.displayId=oe++,this.displayName="",this.depthNear=.01,this.depthFar=1e4,this.isPresenting=!1,Object.defineProperty(this,"isConnected",{get:function(){return A("VRDisplay.prototype.isConnected","VRDisplayCapabilities.prototype.hasExternalDisplay"),!1}}),this.capabilities=new ue({hasPosition:!1,hasOrientation:!1,hasExternalDisplay:!1,canPresent:!1,maxLayers:1}),this.stageParameters=null,this.waitingForPresent_=!1,this.layer_=null,this.originalParent_=null,this.fullscreenElement_=null,this.fullscreenWrapper_=null,this.fullscreenElementCachedStyle_=null,this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null,t&&y()&&(this.wakelock_=new ie)}he.prototype.getFrameData=function(e){return x(e,this._getPose(),this)},he.prototype.getPose=function(){return A("VRDisplay.prototype.getPose","VRDisplay.prototype.getFrameData"),this._getPose()},he.prototype.resetPose=function(){return A("VRDisplay.prototype.resetPose"),this._resetPose()},he.prototype.getImmediatePose=function(){return A("VRDisplay.prototype.getImmediatePose","VRDisplay.prototype.getFrameData"),this._getPose()},he.prototype.requestAnimationFrame=function(e){return le(e)},he.prototype.cancelAnimationFrame=function(e){return ce(e)},he.prototype.wrapForFullscreen=function(e){if(i())return e;if(!this.fullscreenWrapper_){this.fullscreenWrapper_=document.createElement("div");var t=["height: "+Math.min(screen.height,screen.width)+"px !important","top: 0 !important","left: 0 !important","right: 0 !important","border: 0","margin: 0","padding: 0","z-index: 999999 !important","position: fixed"];this.fullscreenWrapper_.setAttribute("style",t.join("; ")+";"),this.fullscreenWrapper_.classList.add("webvr-polyfill-fullscreen-wrapper")}if(this.fullscreenElement_==e)return this.fullscreenWrapper_;if(this.fullscreenElement_&&(this.originalParent_?this.originalParent_.appendChild(this.fullscreenElement_):this.fullscreenElement_.parentElement.removeChild(this.fullscreenElement_)),this.fullscreenElement_=e,this.originalParent_=e.parentElement,this.originalParent_||document.body.appendChild(e),!this.fullscreenWrapper_.parentElement){var n=this.fullscreenElement_.parentElement;n.insertBefore(this.fullscreenWrapper_,this.fullscreenElement_),n.removeChild(this.fullscreenElement_)}this.fullscreenWrapper_.insertBefore(this.fullscreenElement_,this.fullscreenWrapper_.firstChild),this.fullscreenElementCachedStyle_=this.fullscreenElement_.getAttribute("style");var r=this;return function(){if(r.fullscreenElement_){var e=["position: absolute","top: 0","left: 0","width: "+Math.max(screen.width,screen.height)+"px","height: "+Math.min(screen.height,screen.width)+"px","border: 0","margin: 0","padding: 0"];r.fullscreenElement_.setAttribute("style",e.join("; ")+";")}}(),this.fullscreenWrapper_},he.prototype.removeFullscreenWrapper=function(){if(this.fullscreenElement_){var e=this.fullscreenElement_;this.fullscreenElementCachedStyle_?e.setAttribute("style",this.fullscreenElementCachedStyle_):e.removeAttribute("style"),this.fullscreenElement_=null,this.fullscreenElementCachedStyle_=null;var t=this.fullscreenWrapper_.parentElement;return this.fullscreenWrapper_.removeChild(e),this.originalParent_===t?t.insertBefore(e,this.fullscreenWrapper_):this.originalParent_&&this.originalParent_.appendChild(e),t.removeChild(this.fullscreenWrapper_),e}},he.prototype.requestPresent=function(e){var t=this.isPresenting,n=this;return e instanceof Array||(A("VRDisplay.prototype.requestPresent with non-array argument","an array of VRLayers as the first argument"),e=[e]),new Promise((function(r,a){if(n.capabilities.canPresent)if(0==e.length||e.length>n.capabilities.maxLayers)a(new Error("Invalid number of layers."));else{var s=e[0];if(s.source){var l=s.leftBounds||ae,c=s.rightBounds||se;if(t){var u=n.layer_;u.source!==s.source&&(u.source=s.source);for(var h=0;h<4;h++)u.leftBounds[h]=l[h],u.rightBounds[h]=c[h];return n.wrapForFullscreen(n.layer_.source),n.updatePresent_(),void r()}if(n.layer_={predistorted:s.predistorted,source:s.source,leftBounds:l.slice(0),rightBounds:c.slice(0)},n.waitingForPresent_=!1,n.layer_&&n.layer_.source){var d=n.wrapForFullscreen(n.layer_.source);n.addFullscreenListeners_(d,(function(){var e=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement;n.isPresenting=d===e,n.isPresenting?(screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape-primary").catch((function(e){console.error("screen.orientation.lock() failed due to",e.message)})),n.waitingForPresent_=!1,n.beginPresent_(),r()):(screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),n.removeFullscreenWrapper(),n.disableWakeLock(),n.endPresent_(),n.removeFullscreenListeners_()),n.fireVRDisplayPresentChange_()}),(function(){n.waitingForPresent_&&(n.removeFullscreenWrapper(),n.removeFullscreenListeners_(),n.disableWakeLock(),n.waitingForPresent_=!1,n.isPresenting=!1,a(new Error("Unable to present.")))})),function(e){if(o())return!1;if(e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else{if(!e.msRequestFullscreen)return!1;e.msRequestFullscreen()}return!0}(d)?(n.enableWakeLock(),n.waitingForPresent_=!0):(i()||o())&&(n.enableWakeLock(),n.isPresenting=!0,n.beginPresent_(),n.fireVRDisplayPresentChange_(),r())}n.waitingForPresent_||i()||(m(),a(new Error("Unable to present.")))}else r()}else a(new Error("VRDisplay is not capable of presenting."))}))},he.prototype.exitPresent=function(){var e=this.isPresenting,t=this;return this.isPresenting=!1,this.layer_=null,this.disableWakeLock(),new Promise((function(n,r){e?(!m()&&i()&&(t.endPresent_(),t.fireVRDisplayPresentChange_()),o()&&(t.removeFullscreenWrapper(),t.removeFullscreenListeners_(),t.endPresent_(),t.fireVRDisplayPresentChange_()),n()):r(new Error("Was not presenting to VRDisplay."))}))},he.prototype.getLayers=function(){return this.layer_?[this.layer_]:[]},he.prototype.fireVRDisplayPresentChange_=function(){var e=new CustomEvent("vrdisplaypresentchange",{detail:{display:this}});window.dispatchEvent(e)},he.prototype.fireVRDisplayConnect_=function(){var e=new CustomEvent("vrdisplayconnect",{detail:{display:this}});window.dispatchEvent(e)},he.prototype.addFullscreenListeners_=function(e,t,n){this.removeFullscreenListeners_(),this.fullscreenEventTarget_=e,this.fullscreenChangeHandler_=t,this.fullscreenErrorHandler_=n,t&&(document.fullscreenEnabled?e.addEventListener("fullscreenchange",t,!1):document.webkitFullscreenEnabled?e.addEventListener("webkitfullscreenchange",t,!1):document.mozFullScreenEnabled?document.addEventListener("mozfullscreenchange",t,!1):document.msFullscreenEnabled&&e.addEventListener("msfullscreenchange",t,!1)),n&&(document.fullscreenEnabled?e.addEventListener("fullscreenerror",n,!1):document.webkitFullscreenEnabled?e.addEventListener("webkitfullscreenerror",n,!1):document.mozFullScreenEnabled?document.addEventListener("mozfullscreenerror",n,!1):document.msFullscreenEnabled&&e.addEventListener("msfullscreenerror",n,!1))},he.prototype.removeFullscreenListeners_=function(){if(this.fullscreenEventTarget_){var e=this.fullscreenEventTarget_;if(this.fullscreenChangeHandler_){var t=this.fullscreenChangeHandler_;e.removeEventListener("fullscreenchange",t,!1),e.removeEventListener("webkitfullscreenchange",t,!1),document.removeEventListener("mozfullscreenchange",t,!1),e.removeEventListener("msfullscreenchange",t,!1)}if(this.fullscreenErrorHandler_){var n=this.fullscreenErrorHandler_;e.removeEventListener("fullscreenerror",n,!1),e.removeEventListener("webkitfullscreenerror",n,!1),document.removeEventListener("mozfullscreenerror",n,!1),e.removeEventListener("msfullscreenerror",n,!1)}this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null}},he.prototype.enableWakeLock=function(){this.wakelock_&&this.wakelock_.enable()},he.prototype.disableWakeLock=function(){this.wakelock_&&this.wakelock_.disable()},he.prototype.beginPresent_=function(){},he.prototype.endPresent_=function(){},he.prototype.submitFrame=function(e){},he.prototype.getEyeParameters=function(e){return null};var de={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:"",MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1},fe="left",pe="right";function me(e){var t=b({},de);e=b(t,e||{}),he.call(this,{wakelock:e.MOBILE_WAKE_LOCK}),this.config=e,this.displayName="Cardboard VRDisplay",this.capabilities=new ue({hasPosition:!1,hasOrientation:!0,hasExternalDisplay:!1,canPresent:!0,maxLayers:1}),this.stageParameters=null,this.bufferScale_=this.config.BUFFER_SCALE,this.poseSensor_=new ee(this.config),this.distorter_=null,this.cardboardUI_=null,this.dpdb_=new W(this.config.DPDB_URL,this.onDeviceParamsUpdated_.bind(this)),this.deviceInfo_=new U(this.dpdb_.getDeviceParams(),e.ADDITIONAL_VIEWERS),this.viewerSelector_=new ne(e.DEFAULT_VIEWER),this.viewerSelector_.onChange(this.onViewerChanged_.bind(this)),this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer()),this.config.ROTATE_INSTRUCTIONS_DISABLED||(this.rotateInstructions_=new te),i()&&window.addEventListener("resize",this.onResize_.bind(this))}return me.prototype=Object.create(he.prototype),me.prototype._getPose=function(){return{position:null,orientation:this.poseSensor_.getOrientation(),linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},me.prototype._resetPose=function(){this.poseSensor_.resetPose&&this.poseSensor_.resetPose()},me.prototype._getFieldOfView=function(e){var t;if(e==fe)t=this.deviceInfo_.getFieldOfViewLeftEye();else{if(e!=pe)return console.error("Invalid eye provided: %s",e),null;t=this.deviceInfo_.getFieldOfViewRightEye()}return t},me.prototype._getEyeOffset=function(e){var t;if(e==fe)t=[.5*-this.deviceInfo_.viewer.interLensDistance,0,0];else{if(e!=pe)return console.error("Invalid eye provided: %s",e),null;t=[.5*this.deviceInfo_.viewer.interLensDistance,0,0]}return t},me.prototype.getEyeParameters=function(e){var t=this._getEyeOffset(e),n=this._getFieldOfView(e),r={offset:t,renderWidth:.5*this.deviceInfo_.device.width*this.bufferScale_,renderHeight:this.deviceInfo_.device.height*this.bufferScale_};return Object.defineProperty(r,"fieldOfView",{enumerable:!0,get:function(){return A("VRFieldOfView","VRFrameData's projection matrices"),n}}),r},me.prototype.onDeviceParamsUpdated_=function(e){this.config.DEBUG&&console.log("DPDB reported that device params were updated."),this.deviceInfo_.updateDeviceParams(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_)},me.prototype.updateBounds_=function(){this.layer_&&this.distorter_&&(this.layer_.leftBounds||this.layer_.rightBounds)&&this.distorter_.setTextureBounds(this.layer_.leftBounds,this.layer_.rightBounds)},me.prototype.beginPresent_=function(){var e=this.layer_.source.getContext("webgl");e||(e=this.layer_.source.getContext("experimental-webgl")),e||(e=this.layer_.source.getContext("webgl2")),e&&(this.layer_.predistorted?this.config.CARDBOARD_UI_DISABLED||(e.canvas.width=f()*this.bufferScale_,e.canvas.height=p()*this.bufferScale_,this.cardboardUI_=new P(e)):(this.config.CARDBOARD_UI_DISABLED||(this.cardboardUI_=new P(e)),this.distorter_=new C(e,this.cardboardUI_,this.config.BUFFER_SCALE,this.config.DIRTY_SUBMIT_FRAME_BINDINGS),this.distorter_.updateDeviceInfo(this.deviceInfo_)),this.cardboardUI_&&this.cardboardUI_.listen(function(e){this.viewerSelector_.show(this.layer_.source.parentElement),e.stopPropagation(),e.preventDefault()}.bind(this),function(e){this.exitPresent(),e.stopPropagation(),e.preventDefault()}.bind(this)),this.rotateInstructions_&&(d()&&y()?this.rotateInstructions_.showTemporarily(3e3,this.layer_.source.parentElement):this.rotateInstructions_.update()),this.orientationHandler=this.onOrientationChange_.bind(this),window.addEventListener("orientationchange",this.orientationHandler),this.vrdisplaypresentchangeHandler=this.updateBounds_.bind(this),window.addEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler),this.fireVRDisplayDeviceParamsChange_())},me.prototype.endPresent_=function(){this.distorter_&&(this.distorter_.destroy(),this.distorter_=null),this.cardboardUI_&&(this.cardboardUI_.destroy(),this.cardboardUI_=null),this.rotateInstructions_&&this.rotateInstructions_.hide(),this.viewerSelector_.hide(),window.removeEventListener("orientationchange",this.orientationHandler),window.removeEventListener("vrdisplaypresentchange",this.vrdisplaypresentchangeHandler)},me.prototype.updatePresent_=function(){this.endPresent_(),this.beginPresent_()},me.prototype.submitFrame=function(e){if(this.distorter_)this.updateBounds_(),this.distorter_.submitFrame();else if(this.cardboardUI_&&this.layer_){var t=this.layer_.source.getContext("webgl");t||(t=this.layer_.source.getContext("experimental-webgl")),t||(t=this.layer_.source.getContext("webgl2"));var n=t.canvas;n.width==this.lastWidth&&n.height==this.lastHeight||this.cardboardUI_.onResize(),this.lastWidth=n.width,this.lastHeight=n.height,this.cardboardUI_.render()}},me.prototype.onOrientationChange_=function(e){this.viewerSelector_.hide(),this.rotateInstructions_&&this.rotateInstructions_.update(),this.onResize_()},me.prototype.onResize_=function(e){if(this.layer_){var t=this.layer_.source.getContext("webgl");t||(t=this.layer_.source.getContext("experimental-webgl")),t||(t=this.layer_.source.getContext("webgl2")),t.canvas.setAttribute("style",["position: absolute","top: 0","left: 0","width: 100vw","height: 100vh","border: 0","margin: 0","padding: 0px","box-sizing: content-box"].join("; ")+";"),w(t.canvas)}},me.prototype.onViewerChanged_=function(e){this.deviceInfo_.setViewer(e),this.distorter_&&this.distorter_.updateDeviceInfo(this.deviceInfo_),this.fireVRDisplayDeviceParamsChange_()},me.prototype.fireVRDisplayDeviceParamsChange_=function(){var e=new CustomEvent("vrdisplaydeviceparamschange",{detail:{vrdisplay:this,deviceInfo:this.deviceInfo_}});window.dispatchEvent(e)},me.VRFrameData=function(){this.leftProjectionMatrix=new Float32Array(16),this.leftViewMatrix=new Float32Array(16),this.rightProjectionMatrix=new Float32Array(16),this.rightViewMatrix=new Float32Array(16),this.pose=null},me.VRDisplay=he,me}()})),s=(t=a)&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,l={ADDITIONAL_VIEWERS:[],DEFAULT_VIEWER:"",PROVIDE_MOBILE_VRDISPLAY:!0,MOBILE_WAKE_LOCK:!0,DEBUG:!1,DPDB_URL:"https://dpdb.webvr.rocks/dpdb.json",K_FILTER:.98,PREDICTION_TIME_S:.04,CARDBOARD_UI_DISABLED:!1,ROTATE_INSTRUCTIONS_DISABLED:!1,YAW_ONLY:!1,BUFFER_SCALE:.5,DIRTY_SUBMIT_FRAME_BINDINGS:!1};function c(e){this.config=o(o({},l),e),this.polyfillDisplays=[],this.enabled=!1,this.hasNative="getVRDisplays"in navigator,this.native={},this.native.getVRDisplays=navigator.getVRDisplays,this.native.VRFrameData=window.VRFrameData,this.native.VRDisplay=window.VRDisplay,(!this.hasNative||this.config.PROVIDE_MOBILE_VRDISPLAY&&r())&&(this.enable(),this.getVRDisplays().then((function(e){e&&e[0]&&e[0].fireVRDisplayConnect_&&e[0].fireVRDisplayConnect_()})))}c.prototype.getPolyfillDisplays=function(){if(this._polyfillDisplaysPopulated)return this.polyfillDisplays;if(r()){var e=new s({ADDITIONAL_VIEWERS:this.config.ADDITIONAL_VIEWERS,DEFAULT_VIEWER:this.config.DEFAULT_VIEWER,MOBILE_WAKE_LOCK:this.config.MOBILE_WAKE_LOCK,DEBUG:this.config.DEBUG,DPDB_URL:this.config.DPDB_URL,CARDBOARD_UI_DISABLED:this.config.CARDBOARD_UI_DISABLED,K_FILTER:this.config.K_FILTER,PREDICTION_TIME_S:this.config.PREDICTION_TIME_S,ROTATE_INSTRUCTIONS_DISABLED:this.config.ROTATE_INSTRUCTIONS_DISABLED,YAW_ONLY:this.config.YAW_ONLY,BUFFER_SCALE:this.config.BUFFER_SCALE,DIRTY_SUBMIT_FRAME_BINDINGS:this.config.DIRTY_SUBMIT_FRAME_BINDINGS});this.polyfillDisplays.push(e)}return this._polyfillDisplaysPopulated=!0,this.polyfillDisplays},c.prototype.enable=function(){if(this.enabled=!0,this.hasNative&&this.native.VRFrameData){var e=this.native.VRFrameData,t=new this.native.VRFrameData,n=this.native.VRDisplay.prototype.getFrameData;window.VRDisplay.prototype.getFrameData=function(r){r instanceof e?n.call(this,r):(n.call(this,t),r.pose=t.pose,i(t.leftProjectionMatrix,r.leftProjectionMatrix),i(t.rightProjectionMatrix,r.rightProjectionMatrix),i(t.leftViewMatrix,r.leftViewMatrix),i(t.rightViewMatrix,r.rightViewMatrix))}}navigator.getVRDisplays=this.getVRDisplays.bind(this),window.VRDisplay=s.VRDisplay,window.VRFrameData=s.VRFrameData},c.prototype.getVRDisplays=function(){var e=this;return this.config,this.hasNative?this.native.getVRDisplays.call(navigator).then((function(t){return t.length>0?t:e.getPolyfillDisplays()})):Promise.resolve(this.getPolyfillDisplays())},c.version="0.10.12",c.VRFrameData=s.VRFrameData,c.VRDisplay=s.VRDisplay;var u=Object.freeze({default:c}),h=u&&c||u;return"undefined"!==typeof n&&n.window&&(n.document||(n.document=n.window.document),n.navigator||(n.navigator=n.window.navigator)),h}))}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],69:[function(e,t,n){var r=/\n/,i=/\s/;function o(e,t,n,r){var i=e.indexOf(t,n);return-1===i||i>r?r:i}function a(e){return i.test(e)}function s(e,t,n,r){return{start:t,end:t+Math.min(r,n-t)}}t.exports=function(e,n){return t.exports.lines(e,n).map((function(t){return e.substring(t.start,t.end)})).join("\n")},t.exports.lines=function(e,t){if(0===(t=t||{}).width&&"nowrap"!==t.mode)return[];e=e||"";var n="number"===typeof t.width?t.width:Number.MAX_VALUE,i=Math.max(0,t.start||0),l="number"===typeof t.end?t.end:e.length,c=t.mode,u=t.measure||s;return"pre"===c?function(e,t,n,i,o){for(var a=[],s=n,l=n;l<i&&l<t.length;l++){var c=t.charAt(l),u=r.test(c);if(u||l===i-1){var h=e(t,s,u?l:l+1,o);a.push(h),s=l+1}}return a}(u,e,i,l,n):function(e,t,n,r,i,s){var l=[],c=i;for("nowrap"===s&&(c=Number.MAX_VALUE);n<r&&n<t.length;){for(var u=o(t,"\n",n,r);n<u&&a(t.charAt(n));)n++;var h=e(t,n,u,c),d=n+(h.end-h.start),f=d+"\n".length;if(d<u){for(;d>n&&!a(t.charAt(d));)d--;if(d===n)f>n+"\n".length&&f--,d=f;else for(f=d;d>n&&a(t.charAt(d-"\n".length));)d--}if(d>=n){var p=e(t,n,d,c);l.push(p)}n=f}return l}(u,e,i,l,n,c)}},{}],70:[function(t,n,r){"use strict";var i=t("global/window"),o=t("is-function"),a=t("parse-headers"),s=t("xtend");function l(e,t,n){var r=e;return o(t)?(n=t,"string"===typeof e&&(r={uri:e})):r=s(t,{uri:e}),r.callback=n,r}function c(e,t,n){return u(t=l(e,t,n))}function u(t){if("undefined"===typeof t.callback)throw new Error("callback argument missing");var n=!1,r=function(e,r,i){n||(n=!0,t.callback(e,r,i))};function i(){var t=void 0;if(t=h.response?h.response:h.responseText||function(t){try{if("document"===t.responseType)return t.responseXML;var n=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;if(""===t.responseType&&!n)return t.responseXML}catch(e){}return null}(h),y)try{t=JSON.parse(t)}catch(e){}return t}function o(e){return clearTimeout(d),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,r(e,b)}function s(){if(!u){var e;clearTimeout(d),e=t.useXDR&&void 0===h.status?200:1223===h.status?204:h.status;var n=b,o=null;return 0!==e?(n={body:i(),statusCode:e,method:p,headers:{},url:f,rawRequest:h},h.getAllResponseHeaders&&(n.headers=a(h.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),r(o,n,n.body)}}var l,u,h=t.xhr||null;h||(h=t.cors||t.useXDR?new c.XDomainRequest:new c.XMLHttpRequest);var d,f=h.url=t.uri||t.url,p=h.method=t.method||"GET",m=t.body||t.data,g=h.headers=t.headers||{},v=!!t.sync,y=!1,b={body:void 0,headers:{},statusCode:0,method:p,url:f,rawRequest:h};if("json"in t&&!1!==t.json&&(y=!0,g.accept||g.Accept||(g.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(g["content-type"]||g["Content-Type"]||(g["Content-Type"]="application/json"),m=JSON.stringify(!0===t.json?m:t.json))),h.onreadystatechange=function(){4===h.readyState&&setTimeout(s,0)},h.onload=s,h.onerror=o,h.onprogress=function(){},h.onabort=function(){u=!0},h.ontimeout=o,h.open(p,f,!v,t.username,t.password),v||(h.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(d=setTimeout((function(){if(!u){u=!0,h.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",o(e)}}),t.timeout)),h.setRequestHeader)for(l in g)g.hasOwnProperty(l)&&h.setRequestHeader(l,g[l]);else if(t.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(h.responseType=t.responseType),"beforeSend"in t&&"function"===typeof t.beforeSend&&t.beforeSend(h),h.send(m||null),h}n.exports=c,n.exports.default=c,c.XMLHttpRequest=i.XMLHttpRequest||function(){},c.XDomainRequest="withCredentials"in new c.XMLHttpRequest?c.XMLHttpRequest:i.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){c["delete"===e?"del":e]=function(t,n,r){return(n=l(t,n,r)).method=e.toUpperCase(),u(n)}}))},{"global/window":27,"is-function":33,"parse-headers":47,xtend:72}],71:[function(e,t,n){t.exports="undefined"!==typeof self.DOMParser?function(e){return(new self.DOMParser).parseFromString(e,"application/xml")}:"undefined"!==typeof self.ActiveXObject&&new self.ActiveXObject("Microsoft.XMLDOM")?function(e){var t=new self.ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t}:function(e){var t=document.createElement("div");return t.innerHTML=e,t}},{}],72:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty},{}],73:[function(e,t,n){t.exports={name:"aframe",version:"1.2.0",description:"A web framework for building virtual reality experiences.",homepage:"https://aframe.io/",main:"dist/aframe-master.js",scripts:{browserify:"browserify src/index.js -s 'AFRAME' -p browserify-derequire",build:"shx mkdir -p build/ && npm run browserify -- --debug -t [ envify --INSPECTOR_VERSION dev ] -o build/aframe.js",codecov:"codecov",dev:"npm run build && cross-env INSPECTOR_VERSION=dev node ./scripts/budo -t envify",dist:"node scripts/updateVersionLog.js && npm run dist:min && npm run dist:max","dist:max":"npm run browserify -s -- --debug | exorcist dist/aframe-master.js.map > dist/aframe-master.js","dist:min":"npm run browserify -s -- --debug -p [ minifyify --map aframe-master.min.js.map --output dist/aframe-master.min.js.map ] -o dist/aframe-master.min.js",docs:"markserv --dir docs --port 9001",preghpages:"node ./scripts/preghpages.js",ghpages:"ghpages -p gh-pages/",lint:"semistandard -v | snazzy","lint:fix":"semistandard --fix",precommit:"npm run lint",prepush:"node scripts/testOnlyCheck.js",prerelease:"node scripts/release.js 1.0.4 1.1.0",start:"npm run dev","start:https":"cross-env SSL=true npm run dev",test:"karma start ./tests/karma.conf.js","test:docs":"node scripts/docsLint.js","test:firefox":"npm test -- --browsers Firefox","test:chrome":"npm test -- --browsers Chrome","test:nobrowser":"NO_BROWSER=true npm test","test:node":"mocha --ui tdd tests/node"},repository:"aframevr/aframe",license:"MIT",files:["dist/*","docs/**/*","src/**/*","vendor/**/*"],dependencies:{"custom-event-polyfill":"^1.0.6",debug:"ngokevin/debug#noTimestamp","deep-assign":"^2.0.0","document-register-element":"dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90","load-bmfont":"^1.2.3","object-assign":"^4.0.1",present:"0.0.6","promise-polyfill":"^3.1.0","super-animejs":"^3.1.0","super-three":"^0.125.1","three-bmfont-text":"dmarcos/three-bmfont-text#1babdf8507c731a18f8af3b807292e2b9740955e","webvr-polyfill":"^0.10.12"},devDependencies:{browserify:"^13.1.0","browserify-css":"^0.8.4","browserify-derequire":"^0.9.4","browserify-istanbul":"^2.0.0",budo:"^9.2.0",chai:"^3.5.0","chai-shallow-deep-equal":"^1.4.0",chalk:"^1.1.3",codecov:"^1.0.1","cross-env":"^5.0.1",envify:"^3.4.1",exorcist:"^0.4.0",ghpages:"0.0.8","git-rev":"^0.2.1",glob:"^7.1.1",husky:"^0.11.7",istanbul:"^0.4.5",jsdom:"^9.11.0",karma:"1.4.1","karma-browserify":"^5.1.0","karma-chai-shallow-deep-equal":"0.0.4","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.1.1","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.2.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.1.0","karma-sinon-chai":"1.2.4",lolex:"^1.5.1",markserv:"github:sukima/markserv#feature/fix-broken-websoketio-link",minifyify:"^7.3.3",mocha:"^3.0.2","mozilla-download":"^1.1.1","replace-in-file":"^2.5.3",semistandard:"^9.0.0",shelljs:"^0.7.7",shx:"^0.2.2",sinon:"^1.17.5","sinon-chai":"2.8.0",snazzy:"^5.0.0","too-wordy":"ngokevin/too-wordy",uglifyjs:"^2.4.10","write-good":"^0.9.1"},link:!0,browserify:{transform:["browserify-css","envify"]},semistandard:{ignore:["build/**","dist/**","examples/**/shaders/*.js","**/vendor/**"]},keywords:["3d","aframe","cardboard","components","oculus","three","three.js","rift","vive","vr","web-components","webvr"],"browserify-css":{minify:!0},engines:{node:">= 4.6.0",npm:"^2.15.9"}}},{}],74:[function(e,t,n){var r=e("super-animejs"),i=e("../core/component").components,o=e("../core/component").registerComponent,a=e("../lib/three"),s=e("../utils"),l=new a.Color,c=new a.Color,u=s.entity.getComponentProperty,h=s.entity.setComponentProperty,d={};function f(e){e.x=a.Math.degToRad(e.x),e.y=a.Math.degToRad(e.y),e.z=a.Math.degToRad(e.z)}function p(e,t,n){var r;for(r=0;r<t.length;r++)e.addEventListener(t[r],n)}function m(e,t,n){var r;for(r=0;r<t.length;r++)e.removeEventListener(t[r],n)}function g(e,t){var n,r,i;for(r=y(t),i=e,n=0;n<r.length;n++)i=i[r[n]];if(void 0===i)throw console.log(e),new Error("[animation] property ("+t+") could not be found");return i}function v(e,t,n,r){var i,o,s,l;for(t.startsWith("object3D.rotation")&&(n=a.Math.degToRad(n)),o=y(t),l=e,i=0;i<o.length-1;i++)l=l[o[i]];s=o[o.length-1],"color"!==r?l[s]=n:"r"in l[s]?(l[s].r=n.r,l[s].g=n.g,l[s].b=n.b):(l[s].x=n.r,l[s].y=n.g,l[s].z=n.b)}function y(e){return e in d||(d[e]=e.split(".")),d[e]}function b(e){return e.isRawProperty||e.property.startsWith("components")||e.property.startsWith("object3D")}t.exports.Component=o("animation",{schema:{autoplay:{default:!0},delay:{default:0},dir:{default:""},dur:{default:1e3},easing:{default:"easeInQuad"},elasticity:{default:400},enabled:{default:!0},from:{default:""},loop:{default:0,parse:function(e){return!0===e||"true"===e||!1!==e&&"false"!==e&&parseInt(e,10)}},property:{default:""},startEvents:{type:"array"},pauseEvents:{type:"array"},resumeEvents:{type:"array"},round:{default:!1},to:{default:""},type:{default:""},isRawProperty:{default:!1}},multiple:!0,init:function(){var e=this;this.eventDetail={name:this.attrName},this.time=0,this.animation=null,this.animationIsPlaying=!1,this.onStartEvent=this.onStartEvent.bind(this),this.beginAnimation=this.beginAnimation.bind(this),this.pauseAnimation=this.pauseAnimation.bind(this),this.resumeAnimation=this.resumeAnimation.bind(this),this.fromColor={},this.toColor={},this.targets={},this.targetsArray=[],this.updateConfigForDefault=this.updateConfigForDefault.bind(this),this.updateConfigForRawColor=this.updateConfigForRawColor.bind(this),this.config={complete:function(){e.animationIsPlaying=!1,e.el.emit("animationcomplete",e.eventDetail,!1),e.id&&e.el.emit("animationcomplete__"+e.id,e.eventDetail,!1)}}},update:function(e){var t=this.config,n=this.data;this.animationIsPlaying=!1,this.data.enabled&&n.property&&(t.autoplay=!1,t.direction=n.dir,t.duration=n.dur,t.easing=n.easing,t.elasticity=n.elasticity,t.loop=n.loop,t.round=n.round,this.createAndStartAnimation())},tick:function(e,t){this.animationIsPlaying&&(this.time+=t,this.animation.tick(this.time))},remove:function(){this.pauseAnimation(),this.removeEventListeners()},pause:function(){this.paused=!0,this.pausedWasPlaying=this.animationIsPlaying,this.pauseAnimation(),this.removeEventListeners()},play:function(){this.paused&&(this.paused=!1,this.addEventListeners(),this.pausedWasPlaying&&(this.resumeAnimation(),this.pausedWasPlaying=!1))},createAndStartAnimation:function(){var e=this.data;this.updateConfig(),this.animationIsPlaying=!1,this.animation=r(this.config),this.animation.began=!0,this.removeEventListeners(),this.addEventListeners(),!e.autoplay||e.startEvents&&e.startEvents.length||(e.delay?setTimeout(this.beginAnimation,e.delay):this.beginAnimation())},beginAnimation:function(){this.updateConfig(),this.animation.began=!0,this.time=0,this.animationIsPlaying=!0,this.stopRelatedAnimations(),this.el.emit("animationbegin",this.eventDetail,!1)},pauseAnimation:function(){this.animationIsPlaying=!1},resumeAnimation:function(){this.animationIsPlaying=!0},onStartEvent:function(){this.data.enabled&&(this.updateConfig(),this.animation&&this.animation.pause(),this.animation=r(this.config),this.data.delay?setTimeout(this.beginAnimation,this.data.delay):this.beginAnimation())},updateConfigForRawColor:function(){var e,t,n,r=this.config,i=this.data,o=this.el;if(!this.waitComponentInitRawProperty(this.updateConfigForRawColor)){for(t in e=""===i.from?g(o,i.property):i.from,n=i.to,this.setColorConfig(e,n),e=this.fromColor,n=this.toColor,this.targetsArray.length=0,this.targetsArray.push(e),r.targets=this.targetsArray,n)r[t]=n[t];r.update=function(){var e={};return function(t){var n;(n=t.animatables[0].target).r===e.r&&n.g===e.g&&n.b===e.b||v(o,i.property,n,i.type)}}()}},updateConfigForDefault:function(){var e,t,n,r=this.config,i=this.data,o=this.el;this.waitComponentInitRawProperty(this.updateConfigForDefault)||(e=""===i.from?b(i)?g(o,i.property):u(o,i.property):i.from,n=i.to,isNaN(e||n)?(e=e?e.toString():e,n=n?n.toString():n):(e=parseFloat(e),n=parseFloat(n)),(t="true"===i.to||"false"===i.to||!0===i.to||!1===i.to)&&(e="true"===i.from||!0===i.from?1:0,n="true"===i.to||!0===i.to?1:0),this.targets.aframeProperty=e,r.targets=this.targets,r.aframeProperty=n,r.update=function(){var e;return function(n){var r;(r=n.animatables[0].target.aframeProperty)!==e&&(e=r,t&&(r=r>=1),b(i)?v(o,i.property,r,i.type):h(o,i.property,r))}}())},updateConfigForVector:function(){var e,t,n,r=this.config,i=this.data,o=this.el;for(e in t=""!==i.from?s.coordinates.parse(i.from):u(o,i.property),n=s.coordinates.parse(i.to),"rotation"===i.property&&(f(t),f(n)),this.targetsArray.length=0,this.targetsArray.push(t),r.targets=this.targetsArray,n)r[e]=n[e];"position"!==i.property&&"rotation"!==i.property&&"scale"!==i.property?r.update=function(){var e={};return function(t){var n=t.animatables[0].target;n.x===e.x&&n.y===e.y&&n.z===e.z||(e.x=n.x,e.y=n.y,e.z=n.z,h(o,i.property,n))}}():r.update=function(){var e={};return function(t){var n=t.animatables[0].target;"scale"===i.property&&(n.x=Math.max(1e-4,n.x),n.y=Math.max(1e-4,n.y),n.z=Math.max(1e-4,n.z)),n.x===e.x&&n.y===e.y&&n.z===e.z||(e.x=n.x,e.y=n.y,e.z=n.z,o.object3D[i.property].set(n.x,n.y,n.z))}}()},updateConfig:function(){var e;e=function(e,t){var n,r,o,a;return o=t.split("."),r=o[0],a=o[1],(n=e.components[r]||i[r])?a&&!n.schema[a]?null:a?n.schema[a].type:n.schema.type:null}(this.el,this.data.property),b(this.data)&&"color"===this.data.type?this.updateConfigForRawColor():"vec2"===e||"vec3"===e||"vec4"===e?this.updateConfigForVector():this.updateConfigForDefault()},waitComponentInitRawProperty:function(e){var t,n=this.data,i=this.el,o=this;return""===n.from&&!!n.property.startsWith("components")&&(t=y(n.property)[1],!i.components[t]&&(i.addEventListener("componentinitialized",(function n(a){a.detail.name===t&&(e(),o.animation=r(o.config),i.removeEventListener("componentinitialized",n))})),!0))},stopRelatedAnimations:function(){var e,t;for(t in this.el.components)e=this.el.components[t],t!==this.attrName&&"animation"===e.name&&e.animationIsPlaying&&e.data.property===this.data.property&&(e.animationIsPlaying=!1)},addEventListeners:function(){var e=this.data,t=this.el;p(t,e.startEvents,this.onStartEvent),p(t,e.pauseEvents,this.pauseAnimation),p(t,e.resumeEvents,this.resumeAnimation)},removeEventListeners:function(){var e=this.data,t=this.el;m(t,e.startEvents,this.onStartEvent),m(t,e.pauseEvents,this.pauseAnimation),m(t,e.resumeEvents,this.resumeAnimation)},setColorConfig:function(e,t){l.set(e),c.set(t),e=this.fromColor,t=this.toColor,e.r=l.r,e.g=l.g,e.b=l.b,t.r=c.r,t.g=c.g,t.b=c.b}})},{"../core/component":131,"../lib/three":179,"../utils":205,"super-animejs":56}],75:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three");t.exports.Component=r("camera",{schema:{active:{default:!0},far:{default:1e4},fov:{default:80,min:0},near:{default:.005,min:0},spectator:{default:!1},zoom:{default:1,min:0}},init:function(){var e,t=this.el;e=this.camera=new i.PerspectiveCamera,t.setObject3D("camera",e)},update:function(e){var t=this.data,n=this.camera;n.aspect=t.aspect||window.innerWidth/window.innerHeight,n.far=t.far,n.fov=t.fov,n.near=t.near,n.zoom=t.zoom,n.updateProjectionMatrix(),this.updateActiveCamera(e),this.updateSpectatorCamera(e)},updateActiveCamera:function(e){var t=this.data,n=this.el,r=this.system;e&&e.active===t.active||t.spectator||(t.active&&r.activeCameraEl!==n?r.setActiveCamera(n):t.active||r.activeCameraEl!==n||r.disableActiveCamera())},updateSpectatorCamera:function(e){var t=this.data,n=this.el,r=this.system;e&&e.spectator===t.spectator||(t.spectator&&r.spectatorCameraEl!==n?r.setSpectatorCamera(n):t.spectator||r.spectatorCameraEl!==n||r.disableSpectatorCamera())},remove:function(){this.el.removeObject3D("camera")}})},{"../core/component":131,"../lib/three":179}],76:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/"),o=i.bind,a="click",s="fusing",l="mouseenter",c="mousedown",u="mouseleave",h="mouseup",d="cursor-fusing",f="cursor-hovering",p="cursor-hovered",m={DOWN:["mousedown","touchstart"],UP:["mouseup","touchend"]},g={DOWN:["selectstart"],UP:["selectend"]};t.exports.Component=r("cursor",{dependencies:["raycaster"],schema:{downEvents:{default:[]},fuse:{default:i.device.isMobile()},fuseTimeout:{default:1500,min:0},mouseCursorStylesEnabled:{default:!0},upEvents:{default:[]},rayOrigin:{default:"entity",oneOf:["mouse","entity"]}},init:function(){var e=this;this.fuseTimeout=void 0,this.cursorDownEl=null,this.intersectedEl=null,this.canvasBounds=document.body.getBoundingClientRect(),this.isCursorDown=!1,this.updateCanvasBounds=i.debounce((function(){e.canvasBounds=e.el.sceneEl.canvas.getBoundingClientRect()}),500),this.eventDetail={},this.intersectedEventDetail={cursorEl:this.el},this.onCursorDown=o(this.onCursorDown,this),this.onCursorUp=o(this.onCursorUp,this),this.onIntersection=o(this.onIntersection,this),this.onIntersectionCleared=o(this.onIntersectionCleared,this),this.onMouseMove=o(this.onMouseMove,this),this.onEnterVR=o(this.onEnterVR,this)},update:function(e){this.data.rayOrigin!==e.rayOrigin&&this.updateMouseEventListeners()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){var e=this.el;e.removeState(f),e.removeState(d),clearTimeout(this.fuseTimeout),this.intersectedEl&&this.intersectedEl.removeState(p),this.removeEventListeners()},addEventListeners:function(){var e,t=this.data,n=this.el,r=this;function i(){e=n.sceneEl.canvas,t.downEvents.length||t.upEvents.length||(m.DOWN.forEach((function(t){e.addEventListener(t,r.onCursorDown)})),m.UP.forEach((function(t){e.addEventListener(t,r.onCursorUp)})))}(e=n.sceneEl.canvas)?i():n.sceneEl.addEventListener("render-target-loaded",i),t.downEvents.forEach((function(e){n.addEventListener(e,r.onCursorDown)})),t.upEvents.forEach((function(e){n.addEventListener(e,r.onCursorUp)})),n.addEventListener("raycaster-intersection",this.onIntersection),n.addEventListener("raycaster-intersection-cleared",this.onIntersectionCleared),n.sceneEl.addEventListener("rendererresize",this.updateCanvasBounds),n.sceneEl.addEventListener("enter-vr",this.onEnterVR),window.addEventListener("resize",this.updateCanvasBounds),window.addEventListener("scroll",this.updateCanvasBounds),this.updateMouseEventListeners()},removeEventListeners:function(){var e,t=this.data,n=this.el,r=this;!(e=n.sceneEl.canvas)||t.downEvents.length||t.upEvents.length||(m.DOWN.forEach((function(t){e.removeEventListener(t,r.onCursorDown)})),m.UP.forEach((function(t){e.removeEventListener(t,r.onCursorUp)}))),t.downEvents.forEach((function(e){n.removeEventListener(e,r.onCursorDown)})),t.upEvents.forEach((function(e){n.removeEventListener(e,r.onCursorUp)})),n.removeEventListener("raycaster-intersection",this.onIntersection),n.removeEventListener("raycaster-intersection-cleared",this.onIntersectionCleared),e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("touchstart",this.onMouseMove),e.removeEventListener("touchmove",this.onMouseMove),n.sceneEl.removeEventListener("rendererresize",this.updateCanvasBounds),n.sceneEl.removeEventListener("enter-vr",this.onEnterVR),window.removeEventListener("resize",this.updateCanvasBounds),window.removeEventListener("scroll",this.updateCanvasBounds)},updateMouseEventListeners:function(){var e,t=this.el;(e=t.sceneEl.canvas).removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("touchmove",this.onMouseMove),t.setAttribute("raycaster","useWorldCoordinates",!1),"mouse"===this.data.rayOrigin&&(e.addEventListener("mousemove",this.onMouseMove,!1),e.addEventListener("touchmove",this.onMouseMove,!1),t.setAttribute("raycaster","useWorldCoordinates",!0),this.updateCanvasBounds())},onMouseMove:function(){var e=new THREE.Vector3,t=new THREE.Vector2,n=new THREE.Vector3,r={origin:n,direction:e};return function(i){var o,a,s,l=this.canvasBounds,c=this.el.sceneEl.camera;c.parent.updateMatrixWorld(),o=(a="touchmove"===i.type||"touchstart"===i.type?i.touches.item(0):i).clientX-l.left,s=a.clientY-l.top,t.x=o/l.width*2-1,t.y=-s/l.height*2+1,n.setFromMatrixPosition(c.matrixWorld),e.set(t.x,t.y,.5).unproject(c).sub(n).normalize(),this.el.setAttribute("raycaster",r),"touchmove"===i.type&&i.preventDefault()}}(),onCursorDown:function(e){this.isCursorDown=!0,"mouse"===this.data.rayOrigin&&"touchstart"===e.type&&(this.onMouseMove(e),this.el.components.raycaster.checkIntersections(),e.preventDefault()),this.twoWayEmit(c),this.cursorDownEl=this.intersectedEl},onCursorUp:function(e){if(this.isCursorDown){this.isCursorDown=!1;var t=this.data;this.twoWayEmit(h),this.cursorDownEl&&this.cursorDownEl!==this.intersectedEl&&(this.intersectedEventDetail.intersection=null,this.cursorDownEl.emit(h,this.intersectedEventDetail)),t.fuse&&"mouse"!==t.rayOrigin||!this.intersectedEl||this.cursorDownEl!==this.intersectedEl||this.twoWayEmit(a),this.cursorDownEl=null,"touchend"===e.type&&e.preventDefault()}},onIntersection:function(e){var t,n,r,i,o=this.el;n=e.detail.els[0]===o?1:0,i=e.detail.intersections[n],(r=e.detail.els[n])&&this.intersectedEl!==r&&(this.intersectedEl&&(t=this.el.components.raycaster.getIntersection(this.intersectedEl))&&t.distance<=i.distance||(this.clearCurrentIntersection(!0),this.setIntersection(r,i)))},onIntersectionCleared:function(e){-1!==e.detail.clearedEls.indexOf(this.intersectedEl)&&this.clearCurrentIntersection()},onEnterVR:function(){this.clearCurrentIntersection(!0);var e=this.el.sceneEl.xrSession,t=this;e&&"mouse"!==this.data.rayOrigin&&(g.DOWN.forEach((function(n){e.addEventListener(n,t.onCursorDown)})),g.UP.forEach((function(n){e.addEventListener(n,t.onCursorUp)})))},setIntersection:function(e,t){var n=this.el,r=this.data,i=this;this.intersectedEl!==e&&(this.intersectedEl=e,n.addState(f),e.addState(p),this.twoWayEmit(l),this.data.mouseCursorStylesEnabled&&"mouse"===this.data.rayOrigin&&this.el.sceneEl.canvas.classList.add("a-mouse-cursor-hover"),0!==r.fuseTimeout&&r.fuse&&(n.addState(d),this.twoWayEmit(s),this.fuseTimeout=setTimeout((function(){n.removeState(d),i.twoWayEmit(a)}),r.fuseTimeout)))},clearCurrentIntersection:function(e){var t,n,r=this.el;this.intersectedEl&&(this.intersectedEl.removeState(p),r.removeState(f),r.removeState(d),this.twoWayEmit(u),this.data.mouseCursorStylesEnabled&&"mouse"===this.data.rayOrigin&&this.el.sceneEl.canvas.classList.remove("a-mouse-cursor-hover"),this.intersectedEl=null,clearTimeout(this.fuseTimeout),!0!==e&&0!==(n=this.el.components.raycaster.intersections).length&&(t=n[n[0].object.el===r?1:0])&&this.setIntersection(t.object.el,t))},twoWayEmit:function(e){var t,n=this.el,r=this.intersectedEl;t=this.el.components.raycaster.getIntersection(r),this.eventDetail.intersectedEl=r,this.eventDetail.intersection=t,n.emit(e,this.eventDetail),r&&(this.intersectedEventDetail.intersection=t,r.emit(e,this.intersectedEventDetail))}})},{"../core/component":131,"../utils/":205}],77:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"google-daydream":"Daydream Controller",h=c?{axes:{touchpad:[0,1]},buttons:["none","none","touchpad","menu","system"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","menu","system"]};t.exports.Component=r("daydream-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#000000"},buttonTouchedColor:{type:"color",default:"#777777"},buttonHighlightColor:{type:"color",default:"#FFFFFF"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,id:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/google/vr_controller_daydream.obj",mtl:"https://cdn.aframe.io/controllers/google/vr_controller_daydream.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).menu=n.getObjectByName("AppButton_AppButton_Cylinder.004"),t.system=n.getObjectByName("HomeButton_HomeButton_Cylinder.005"),t.trackpad=n.getObjectByName("TouchPad_TouchPad_Cylinder.003"),t.touchpad=n.getObjectByName("TouchPad_TouchPad_Cylinder.003"),n.position.set(0,0,-.04))},onAxisMoved:function(e){s(this,this.mapping.axes,e)},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}n[e].material.color.set(r)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],78:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"samsung-gearvr":"Gear VR",h=c?{axes:{touchpad:[0,1]},buttons:["trigger","none","touchpad","none","menu"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]};t.exports.Component=r("gearvr-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#000000"},buttonTouchedColor:{type:"color",default:"#777777"},buttonHighlightColor:{type:"color",default:"#FFFFFF"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,id:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/samsung/gear_vr_controller.obj",mtl:"https://cdn.aframe.io/controllers/samsung/gear_vr_controller.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.children[2],t.trackpad=n.children[1],t.touchpad=n.children[1])},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}n[e].material.color.set(r)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],79:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=r("generic-tracked-controller-controls",{schema:{hand:{default:""},defaultModel:{default:!0},defaultModelColor:{default:"gray"},orientationOffset:{type:"vec3"},disabled:{default:!1}},mapping:{axes:{touchpad:[0,1],thumbstick:[2,3]},buttons:["trigger","squeeze","touchpad","thumbstick"]},bindMethods:function(){this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.wasControllerConnected=!1,this.lastControllerCheck=0,this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods(),this.el.addEventListener("controllerconnected",(function(t){t.detail.name!==e.name&&(e.wasControllerConnected=!0,e.removeEventListeners(),e.removeControllersUpdateListener())}))},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data,t=e.hand?e.hand:void 0;a(this,"generic",{hand:t,iterateControllerProfiles:!0})},play:function(){this.wasControllerConnected||(this.checkIfControllerPresent(),this.addControllersUpdateListener())},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;this.el.components["tracked-controls"]?this.removeEventListeners():(e.setAttribute("tracked-controls",{hand:t.hand,idPrefix:"generic",orientationOffset:t.orientationOffset,iterateControllerProfiles:!0}),this.data.defaultModel&&this.initDefaultModel())},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},initDefaultModel:function(){var e=this.modelEl=document.createElement("a-entity");e.setAttribute("geometry",{primitive:"sphere",radius:.03}),e.setAttribute("material",{color:this.data.color}),this.el.appendChild(e)}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],80:[function(e,t,n){var r=e("../core/geometry").geometries,i=e("../core/geometry").geometryNames,o=e("../core/component").registerComponent,a=e("../lib/three"),s=new a.BufferGeometry;t.exports.Component=o("geometry",{schema:{buffer:{default:!0},primitive:{default:"box",oneOf:i,schemaChange:!0},skipCache:{default:!1}},init:function(){this.geometry=null},update:function(e){var t,n=this.data,r=this.el,i=this.system;this.geometry&&(i.unuseGeometry(e),this.geometry=null),this.geometry=i.getOrCreateGeometry(n),(t=r.getObject3D("mesh"))?t.geometry=this.geometry:((t=new a.Mesh).geometry=this.geometry,this.el.getAttribute("material")||(t.material=new a.MeshStandardMaterial({color:16777215*Math.random(),metalness:0,roughness:.5})),r.setObject3D("mesh",t))},remove:function(){this.system.unuseGeometry(this.data),this.el.getObject3D("mesh").geometry=s,this.geometry=null},updateSchema:function(e){var t=this.oldData&&this.oldData.primitive,n=e.primitive,i=r[n]&&r[n].schema;if(!i)throw new Error("Unknown geometry schema `"+n+"`");t&&t===n||this.extendSchema(i)}})},{"../core/component":131,"../core/geometry":132,"../lib/three":179}],81:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/").debug("components:gltf-model:warn");t.exports.Component=r("gltf-model",{schema:{type:"model"},init:function(){var e=this.system.getDRACOLoader();this.model=null,this.loader=new i.GLTFLoader,e&&this.loader.setDRACOLoader(e)},update:function(){var e=this,t=this.el,n=this.data;n&&(this.remove(),this.loader.load(n,(function(n){e.model=n.scene||n.scenes[0],e.model.animations=n.animations,t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"gltf",model:e.model})}),void 0,(function(e){var r=e&&e.message?e.message:"Failed to load glTF model";o(r),t.emit("model-error",{format:"gltf",src:n})})))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],82:[function(e,t,n){var r=e("../core/component").registerComponent,i={toonLeft:"https://cdn.aframe.io/controllers/hands/leftHand.glb",toonRight:"https://cdn.aframe.io/controllers/hands/rightHand.glb",lowPolyLeft:"https://cdn.aframe.io/controllers/hands/leftHandLow.glb",lowPolyRight:"https://cdn.aframe.io/controllers/hands/rightHandLow.glb",highPolyLeft:"https://cdn.aframe.io/controllers/hands/leftHandHigh.glb",highPolyRight:"https://cdn.aframe.io/controllers/hands/rightHandHigh.glb"},o="Open",a="Point",s="Point + Thumb",l="Fist",c="Hold",u="Thumb Up",h={};function d(e,t){var n;if(e)return"grip"===(n=h[e])?n+(t?"close":"open"):"point"===n?n+(t?"up":"down"):"pointing"===n||"pistol"===n?n+(t?"start":"end"):void 0}h[l]="grip",h[u]="pistol",h[a]="pointing",t.exports.Component=r("hand-controls",{schema:{color:{default:"white",type:"color"},hand:{default:"left"},handModelStyle:{default:"lowPoly",oneOf:["lowPoly","highPoly","toon"]}},init:function(){var e=this,t=this.el;this.gesture=o,this.pressedButtons={},this.touchedButtons={},this.loader=new THREE.GLTFLoader,this.loader.setCrossOrigin("anonymous"),this.onGripDown=function(){e.handleButton("grip","down")},this.onGripUp=function(){e.handleButton("grip","up")},this.onTrackpadDown=function(){e.handleButton("trackpad","down")},this.onTrackpadUp=function(){e.handleButton("trackpad","up")},this.onTrackpadTouchStart=function(){e.handleButton("trackpad","touchstart")},this.onTrackpadTouchEnd=function(){e.handleButton("trackpad","touchend")},this.onTriggerDown=function(){e.handleButton("trigger","down")},this.onTriggerUp=function(){e.handleButton("trigger","up")},this.onTriggerTouchStart=function(){e.handleButton("trigger","touchstart")},this.onTriggerTouchEnd=function(){e.handleButton("trigger","touchend")},this.onGripTouchStart=function(){e.handleButton("grip","touchstart")},this.onGripTouchEnd=function(){e.handleButton("grip","touchend")},this.onThumbstickDown=function(){e.handleButton("thumbstick","down")},this.onThumbstickUp=function(){e.handleButton("thumbstick","up")},this.onAorXTouchStart=function(){e.handleButton("AorX","touchstart")},this.onAorXTouchEnd=function(){e.handleButton("AorX","touchend")},this.onBorYTouchStart=function(){e.handleButton("BorY","touchstart")},this.onBorYTouchEnd=function(){e.handleButton("BorY","touchend")},this.onSurfaceTouchStart=function(){e.handleButton("surface","touchstart")},this.onSurfaceTouchEnd=function(){e.handleButton("surface","touchend")},this.onControllerConnected=this.onControllerConnected.bind(this),this.onControllerDisconnected=this.onControllerDisconnected.bind(this),t.addEventListener("controllerconnected",this.onControllerConnected),t.addEventListener("controllerdisconnected",this.onControllerDisconnected),t.object3D.visible=!1},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},tick:function(e,t){var n=this.el.getObject3D("mesh");n&&n.mixer&&n.mixer.update(t/1e3)},onControllerConnected:function(){this.el.object3D.visible=!0},onControllerDisconnected:function(){this.el.object3D.visible=!1},addEventListeners:function(){var e=this.el;e.addEventListener("gripdown",this.onGripDown),e.addEventListener("gripup",this.onGripUp),e.addEventListener("trackpaddown",this.onTrackpadDown),e.addEventListener("trackpadup",this.onTrackpadUp),e.addEventListener("trackpadtouchstart",this.onTrackpadTouchStart),e.addEventListener("trackpadtouchend",this.onTrackpadTouchEnd),e.addEventListener("triggerdown",this.onTriggerDown),e.addEventListener("triggerup",this.onTriggerUp),e.addEventListener("triggertouchstart",this.onTriggerTouchStart),e.addEventListener("triggertouchend",this.onTriggerTouchEnd),e.addEventListener("griptouchstart",this.onGripTouchStart),e.addEventListener("griptouchend",this.onGripTouchEnd),e.addEventListener("thumbstickdown",this.onThumbstickDown),e.addEventListener("thumbstickup",this.onThumbstickUp),e.addEventListener("abuttontouchstart",this.onAorXTouchStart),e.addEventListener("abuttontouchend",this.onAorXTouchEnd),e.addEventListener("bbuttontouchstart",this.onBorYTouchStart),e.addEventListener("bbuttontouchend",this.onBorYTouchEnd),e.addEventListener("xbuttontouchstart",this.onAorXTouchStart),e.addEventListener("xbuttontouchend",this.onAorXTouchEnd),e.addEventListener("ybuttontouchstart",this.onBorYTouchStart),e.addEventListener("ybuttontouchend",this.onBorYTouchEnd),e.addEventListener("surfacetouchstart",this.onSurfaceTouchStart),e.addEventListener("surfacetouchend",this.onSurfaceTouchEnd)},removeEventListeners:function(){var e=this.el;e.removeEventListener("gripdown",this.onGripDown),e.removeEventListener("gripup",this.onGripUp),e.removeEventListener("trackpaddown",this.onTrackpadDown),e.removeEventListener("trackpadup",this.onTrackpadUp),e.removeEventListener("trackpadtouchstart",this.onTrackpadTouchStart),e.removeEventListener("trackpadtouchend",this.onTrackpadTouchEnd),e.removeEventListener("triggerdown",this.onTriggerDown),e.removeEventListener("triggerup",this.onTriggerUp),e.removeEventListener("triggertouchstart",this.onTriggerTouchStart),e.removeEventListener("triggertouchend",this.onTriggerTouchEnd),e.removeEventListener("griptouchstart",this.onGripTouchStart),e.removeEventListener("griptouchend",this.onGripTouchEnd),e.removeEventListener("thumbstickdown",this.onThumbstickDown),e.removeEventListener("thumbstickup",this.onThumbstickUp),e.removeEventListener("abuttontouchstart",this.onAorXTouchStart),e.removeEventListener("abuttontouchend",this.onAorXTouchEnd),e.removeEventListener("bbuttontouchstart",this.onBorYTouchStart),e.removeEventListener("bbuttontouchend",this.onBorYTouchEnd),e.removeEventListener("xbuttontouchstart",this.onAorXTouchStart),e.removeEventListener("xbuttontouchend",this.onAorXTouchEnd),e.removeEventListener("ybuttontouchstart",this.onBorYTouchStart),e.removeEventListener("ybuttontouchend",this.onBorYTouchEnd),e.removeEventListener("surfacetouchstart",this.onSurfaceTouchStart),e.removeEventListener("surfacetouchend",this.onSurfaceTouchEnd)},update:function(e){var t,n=this.el,r=this.data.hand,o=this.data.handModelStyle,a=this.data.color,s=this;if(t={hand:r,model:!1},r!==e){var l=i[o+r.charAt(0).toUpperCase()+r.slice(1)];this.loader.load(l,(function(e){var i=e.scene.children[0],o="left"===r?Math.PI/2:-Math.PI/2;i.mixer=new THREE.AnimationMixer(i),s.clips=e.animations,n.setObject3D("mesh",i),i.children[1].material.color=new THREE.Color(a),i.position.set(0,0,0),i.rotation.set(0,0,o),n.setAttribute("magicleap-controls",t),n.setAttribute("vive-controls",t),n.setAttribute("oculus-touch-controls",t),n.setAttribute("windows-motion-controls",t)}))}},remove:function(){this.el.removeObject3D("mesh")},handleButton:function(e,t){var n,r="down"===t,i="touchstart"===t;if(0===t.indexOf("touch")){if(i===this.touchedButtons[e])return;this.touchedButtons[e]=i}else{if(r===this.pressedButtons[e])return;this.pressedButtons[e]=r}n=this.gesture,this.gesture=this.determineGesture(),this.gesture!==n&&(this.animateGesture(this.gesture,n),this.emitGestureEvents(this.gesture,n))},determineGesture:function(){var e,t=this.pressedButtons.grip,n=this.pressedButtons.surface||this.touchedButtons.surface,r=this.pressedButtons.trackpad||this.touchedButtons.trackpad,i=this.pressedButtons.trigger||this.touchedButtons.trigger,o=this.touchedButtons.AorX||this.touchedButtons.BorY;return function(e){var t=e&&e.controller;return t&&(t.id&&0===t.id.indexOf("OpenVR ")||t.profiles&&t.profiles[0]&&"htc-vive-controller-mv"===t.profiles[0])}(this.el.components["tracked-controls"])?t||i?e=l:r&&(e=a):t?e=n||o||r?i?l:a:i?u:s:i&&(e=c),e},getClip:function(e){var t,n;for(n=0;n<this.clips.length;n++)if((t=this.clips[n]).name===e)return t},animateGesture:function(e,t){e?this.playAnimation(e||o,t,!1):this.playAnimation(t,t,!0)},emitGestureEvents:function(e,t){var n,r=this.el;t!==e&&((n=d(t,!1))&&r.emit(n),(n=d(e,!0))&&r.emit(n))},playAnimation:function(e,t,n){var r,i,o,a=this.el.getObject3D("mesh");if(a){if(a.mixer.stopAllAction(),r=this.getClip(e),(o=a.mixer.clipAction(r)).clampWhenFinished=!0,o.loop=THREE.LoopRepeat,o.repetitions=0,o.timeScale=n?-1:1,o.time=n?r.duration:0,o.weight=1,!t||e===t)return a.mixer.stopAllAction(),void o.play();r=this.getClip(t),(i=a.mixer.clipAction(r)).weight=.15,i.play(),o.play(),i.crossFadeTo(o,.15,!0)}}})},{"../core/component":131}],83:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls").checkControllerPresentAndSetup,a={left:"b_l_",right:"b_r_"},s=["wrist","thumb-metacarpal","thumb-phalanx-proximal","thumb-phalanx-distal","thumb-tip","index-finger-metacarpal","index-finger-phalanx-proximal","index-finger-phalanx-intermediate","index-finger-phalanx-distal","index-finger-tip","middle-finger-metacarpal","middle-finger-phalanx-proximal","middle-finger-phalanx-intermediate","middle-finger-phalanx-distal","middle-finger-tip","ring-finger-metacarpal","ring-finger-phalanx-proximal","ring-finger-phalanx-intermediate","ring-finger-phalanx-distal","ring-finger-tip","pinky-finger-metacarpal","pinky-finger-phalanx-proximal","pinky-finger-phalanx-intermediate","pinky-finger-phalanx-distal","pinky-finger-tip"],l={wrist:"wrist","thumb-metacarpal":"thumb1","thumb-phalanx-proximal":"thumb2","thumb-phalanx-distal":"thumb3","thumb-tip":"thumb_null","index-finger-phalanx-proximal":"index1","index-finger-phalanx-intermediate":"index2","index-finger-phalanx-distal":"index3","index-finger-tip":"index_null","middle-finger-phalanx-proximal":"middle1","middle-finger-phalanx-intermediate":"middle2","middle-finger-phalanx-distal":"middle3","middle-finger-tip":"middle_null","ring-finger-phalanx-proximal":"ring1","ring-finger-phalanx-intermediate":"ring2","ring-finger-phalanx-distal":"ring3","ring-finger-tip":"ring_null","pinky-finger-metacarpal":"pinky0","pinky-finger-phalanx-proximal":"pinky1","pinky-finger-phalanx-intermediate":"pinky2","pinky-finger-phalanx-distal":"pinky3","pinky-finger-tip":"pinky_null"};t.exports.Component=r("hand-tracking-controls",{schema:{hand:{default:"right",oneOf:["left","right"]},modelStyle:{default:"mesh",oneOf:["dots","mesh"]},modelColor:{default:"white"}},bindMethods:function(){this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this)},addEventListeners:function(){this.el.addEventListener("model-loaded",this.onModelLoaded);for(var e=0;e<this.jointEls.length;++e)this.jointEls[e].object3D.visible=!0},removeEventListeners:function(){this.el.removeEventListener("model-loaded",this.onModelLoaded);for(var e=0;e<this.jointEls.length;++e)this.jointEls[e].object3D.visible=!1},init:function(){var e=this.el.sceneEl,t=e.getAttribute("webxr").optionalFeatures;t.push("hand-tracking"),e.setAttribute("webxr",{optionalFeatures:t}),this.onModelLoaded=this.onModelLoaded.bind(this),this.jointEls=[],this.controllerPresent=!1,this.isPinched=!1,this.pinchEventDetail={position:new THREE.Vector3},this.indexTipPosition=new THREE.Vector3,this.bindMethods(),this.updateReferenceSpace=this.updateReferenceSpace.bind(this),this.el.sceneEl.addEventListener("enter-vr",this.updateReferenceSpace),this.el.sceneEl.addEventListener("exit-vr",this.updateReferenceSpace)},updateReferenceSpace:function(){var e=this,t=this.el.sceneEl.xrSession;if(this.referenceSpace=void 0,t){var n=e.el.sceneEl.systems.webxr.sessionReferenceSpaceType;t.requestReferenceSpace(n).then((function(t){e.referenceSpace=t.getOffsetReferenceSpace(new XRRigidTransform({x:0,y:1.5,z:0}))})).catch((function(t){throw e.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(n,"tracked-controls-webxr uses reference space "+n),t}))}},checkIfControllerPresent:function(){var e=this.data,t=e.hand?e.hand:void 0;o(this,"",{hand:t,iterateControllerProfiles:!0,handTracking:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},tick:function(){var e=this.el.sceneEl,t=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,n=e.frame,r=this.el.components["tracked-controls-webxr"];t&&n&&r&&t.hand&&(this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0),n.getJointPose&&this.updateHandModel(),this.detectGesture())},updateHandModel:function(){"dots"===this.data.modelStyle&&this.updateHandDotsModel(),"mesh"===this.data.modelStyle&&this.updateHandMeshModel()},getBone:function(e){for(var t=this.bones,n=0;n<t.length;n++)if(t[n].name===e)return t[n];return null},updateHandMeshModel:function(){var e=this.el.sceneEl.frame,t=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,n=this.referenceSpace;if(t&&this.mesh&&n)for(var r of(this.mesh.visible=!1,t.hand.values())){var i,o,s;o=e.getJointPose(r,n),l[r.jointName]&&null!=(i=this.getBone(a[this.data.hand]+l[r.jointName]))&&o&&(s=o.transform,this.mesh.visible=!0,i.position.copy(s.position).multiplyScalar(100),i.quaternion.set(s.orientation.x,s.orientation.y,s.orientation.z,s.orientation.w))}},updateHandDotsModel:function(){var e,t,n,r=this.el.sceneEl.frame,i=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,o=this.el.components["tracked-controls-webxr"].system.referenceSpace,a=0;for(var s of i.hand.values())t=(e=this.jointEls[a++]).object3D,n=r.getJointPose(s,o),e.object3D.visible=!!n,n&&(t.matrix.elements=n.transform.matrix,t.matrix.decompose(t.position,t.rotation,t.scale),e.setAttribute("scale",{x:n.radius,y:n.radius,z:n.radius}))},detectGesture:function(){this.detectPinch()},detectPinch:function(){var e=new THREE.Vector3;return function(){var t=this.el.sceneEl.frame,n=this.indexTipPosition,r=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,i=this.el.components["tracked-controls-webxr"],o=this.referenceSpace||i.system.referenceSpace,a=r.hand.get("index-finger-tip"),s=r.hand.get("thumb-tip");if(a&&s){var l=t.getJointPose(a,o),c=t.getJointPose(s,o);if(l&&c){e.copy(c.transform.position),n.copy(l.transform.position);var u=n.distanceTo(e);u<.015&&!1===this.isPinched&&(this.isPinched=!0,this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchstarted",this.pinchEventDetail)),u>.03&&!0===this.isPinched&&(this.isPinched=!1,this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchended",this.pinchEventDetail)),this.isPinched&&(this.pinchEventDetail.position.copy(n).lerp(e,.5),this.pinchEventDetail.position.y+=1.5,this.el.emit("pinchmoved",this.pinchEventDetail)),n.y+=1.5}}}}(),pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{hand:t.hand,iterateControllerProfiles:!0,handTrackingEnabled:!0}),this.initDefaultModel()},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){var e;this.checkIfControllerPresent(),e=this.el.components["tracked-controls"]&&this.el.components["tracked-controls"].controller,this.el.getObject3D("mesh")&&(e&&e.hand&&e.hand[0]||(this.el.getObject3D("mesh").visible=!1))},initDefaultModel:function(){this.el.getObject3D("mesh")||("dots"===this.data.modelStyle&&this.initDotsModel(),"mesh"===this.data.modelStyle&&this.initMeshHandModel())},initDotsModel:function(){if(0===this.jointEls.length)for(var e=0;e<s.length;++e){var t=this.jointEl=document.createElement("a-entity");t.setAttribute("geometry",{primitive:"sphere",radius:1}),t.setAttribute("material",{color:this.data.modelColor}),t.object3D.visible=!1,this.el.appendChild(t),this.jointEls.push(t)}},initMeshHandModel:function(){var e="left"===this.data.hand?"https://cdn.aframe.io/controllers/oculus-hands/unity/left.glb":"https://cdn.aframe.io/controllers/oculus-hands/unity/right.glb";this.el.setAttribute("gltf-model",e)},onModelLoaded:function(){var e=this.mesh=this.el.getObject3D("mesh").children[0],t=this.skinnedMesh=e.children[24];this.skinnedMesh&&(this.bones=t.skeleton.bones,this.el.removeObject3D("mesh"),e.position.set(0,1.5,0),e.rotation.set(0,0,0),t.frustumCulled=!1,t.material=new THREE.MeshStandardMaterial({skinning:!0,color:this.data.modelColor}),this.el.setObject3D("mesh",e))}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],84:[function(e,t,n){e("./animation"),e("./camera"),e("./cursor"),e("./daydream-controls"),e("./gearvr-controls"),e("./geometry"),e("./generic-tracked-controller-controls"),e("./gltf-model"),e("./hand-tracking-controls"),e("./hand-controls"),e("./layer"),e("./laser-controls"),e("./light"),e("./line"),e("./link"),e("./look-controls"),e("./magicleap-controls"),e("./material"),e("./obj-model"),e("./oculus-go-controls"),e("./oculus-touch-controls"),e("./position"),e("./raycaster"),e("./rotation"),e("./scale"),e("./shadow"),e("./sound"),e("./text"),e("./tracked-controls"),e("./tracked-controls-webvr"),e("./tracked-controls-webxr"),e("./visible"),e("./valve-index-controls"),e("./vive-controls"),e("./vive-focus-controls"),e("./wasd-controls"),e("./windows-motion-controls"),e("./scene/background"),e("./scene/debug"),e("./scene/device-orientation-permission-ui"),e("./scene/embedded"),e("./scene/inspector"),e("./scene/fog"),e("./scene/keyboard-shortcuts"),e("./scene/pool"),e("./scene/screenshot"),e("./scene/stats"),e("./scene/vr-mode-ui")},{"./animation":74,"./camera":75,"./cursor":76,"./daydream-controls":77,"./gearvr-controls":78,"./generic-tracked-controller-controls":79,"./geometry":80,"./gltf-model":81,"./hand-controls":82,"./hand-tracking-controls":83,"./laser-controls":85,"./layer":86,"./light":87,"./line":88,"./link":89,"./look-controls":90,"./magicleap-controls":91,"./material":92,"./obj-model":93,"./oculus-go-controls":94,"./oculus-touch-controls":95,"./position":96,"./raycaster":97,"./rotation":98,"./scale":99,"./scene/background":100,"./scene/debug":101,"./scene/device-orientation-permission-ui":102,"./scene/embedded":103,"./scene/fog":104,"./scene/inspector":105,"./scene/keyboard-shortcuts":106,"./scene/pool":107,"./scene/screenshot":108,"./scene/stats":109,"./scene/vr-mode-ui":110,"./shadow":111,"./sound":112,"./text":113,"./tracked-controls":116,"./tracked-controls-webvr":114,"./tracked-controls-webxr":115,"./valve-index-controls":117,"./visible":118,"./vive-controls":119,"./vive-focus-controls":120,"./wasd-controls":121,"./windows-motion-controls":122}],85:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/");r("laser-controls",{schema:{hand:{default:"right"},model:{default:!0},defaultModelColor:{type:"color",default:"grey"}},init:function(){var e=this.config,t=this.data,n=this.el,r=this,o={hand:t.hand,model:t.model};function a(t){var o=e[t.detail.name];if(o){var a=i.extend({showLine:!0},o.raycaster||{});t.detail.rayOrigin&&(a.origin=t.detail.rayOrigin.origin,a.direction=t.detail.rayOrigin.direction,a.showLine=!0),t.detail.rayOrigin||!r.modelReady?n.setAttribute("raycaster",a):n.setAttribute("raycaster","showLine",!0),n.setAttribute("cursor",i.extend({fuse:!1},o.cursor))}}n.setAttribute("daydream-controls",o),n.setAttribute("gearvr-controls",o),n.setAttribute("magicleap-controls",o),n.setAttribute("oculus-go-controls",o),n.setAttribute("oculus-touch-controls",o),n.setAttribute("valve-index-controls",o),n.setAttribute("vive-controls",o),n.setAttribute("vive-focus-controls",o),n.setAttribute("windows-motion-controls",o),n.setAttribute("generic-tracked-controller-controls",o),n.addEventListener("controllerconnected",a),n.addEventListener("controllerdisconnected",(function(){n.setAttribute("raycaster","showLine",!1)})),n.addEventListener("controllermodelready",(function(e){a(e),r.modelReady=!0}))},config:{"daydream-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"gearvr-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:.001,z:0}}},"generic-tracked-controller-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"magicleap-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"oculus-go-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:5e-4,z:0}}},"oculus-touch-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{origin:{x:0,y:0,z:0}}},"valve-index-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"vive-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]}},"vive-focus-controls":{cursor:{downEvents:["trackpaddown","triggerdown"],upEvents:["trackpadup","triggerup"]}},"windows-motion-controls":{cursor:{downEvents:["triggerdown"],upEvents:["triggerup"]},raycaster:{showLine:!1}}}})},{"../core/component":131,"../utils/":205}],86:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/").debug("components:layer:warn");t.exports.Component=r("layer",{schema:{type:{default:"quad",oneOf:["quad","monocubemap","stereocubemap"]},src:{type:"map"},rotateCubemap:{default:!1},width:{default:0},height:{default:0}},init:function(){var e=this.el.sceneEl.renderer.getContext();this.quaternion=new THREE.Quaternion,this.position=new THREE.Vector3,this.bindMethods(),this.needsRedraw=!1,this.frameBuffer=e.createFramebuffer();var t=this.el.sceneEl.getAttribute("webxr").requiredFeatures;t.push("layers"),this.el.sceneEl.getAttribute("webxr","requiredFeatures",t),this.el.sceneEl.addEventListener("enter-vr",this.onEnterVR),this.el.sceneEl.addEventListener("exit-vr",this.onExitVR)},bindMethods:function(){this.onRequestedReferenceSpace=this.onRequestedReferenceSpace.bind(this),this.onEnterVR=this.onEnterVR.bind(this),this.onExitVR=this.onExitVR.bind(this)},update:function(e){this.data.src!==e.src&&this.updateSrc()},updateSrc:function(){var e=this.data.type;this.texture=void 0,"quad"!==e?"monocubemap"!==e&&"stereocubemap"!==e||this.loadCubeMapImages():this.loadQuadImage()},loadCubeMapImages:function(){var e,t=this.data.type,n=this.xrGLFactory,r=this.el.sceneEl.frame,i=this.data.src;this.visibilityChanged=!1,this.layer&&(i.complete?this.pendingCubeMapUpdate=!1:this.pendingCubeMapUpdate=!0,this.loadingScreen?this.loadingScreen=!1:this.loadingScreen=!0,"monocubemap"===t?(e=n.getSubImage(this.layer,r),this.loadCubeMapImage(e.colorTexture,i,0)):(e=n.getSubImage(this.layer,r,"left"),this.loadCubeMapImage(e.colorTexture,i,0),e=n.getSubImage(this.layer,r,"right"),this.loadCubeMapImage(e.colorTexture,i,6)))},loadQuadImage:function(){var e=this.data.src,t=this;this.el.sceneEl.systems.material.loadTexture(e,{src:e},(function(n){t.el.sceneEl.renderer.initTexture(n),t.texture=n,"VIDEO"===e.tagName&&setTimeout((function(){t.textureIsVideo=!0}),1e3),t.layer&&(t.layer.height=t.data.height/2||t.texture.image.height/1e3,t.layer.width=t.data.width/2||t.texture.image.width/1e3,t.needsRedraw=!0),t.updateQuadPanel()}))},preGenerateCubeMapTextures:function(e,t){"monocubemap"===this.data.type?this.generateCubeMapTextures(e,0,t):(this.generateCubeMapTextures(e,0,t),this.generateCubeMapTextures(e,6,t))},generateCubeMapTextures:function(e,t,n){for(var r,i,o=this.data,a=this.cubeFaceSize,s=Math.min(e.width,e.height),l=[],c=0;c<6;c++){var u=document.createElement("CANVAS");u.width=u.height=a;var h=u.getContext("2d");o.rotateCubemap&&(2!==c&&3!==c||(h.save(),h.translate(a,a),h.rotate(Math.PI))),h.drawImage(e,(c+t)*s,0,s,s,0,0,a,a),h.restore(),n&&n(),l.push(u)}return o.rotateCubemap&&(r=l[0],i=l[1],l[0]=i,l[1]=r,r=l[4],i=l[5],l[4]=i,l[5]=r),n&&n(),l},loadCubeMapImage:function(e,t,n){var r,i=this.el.sceneEl.renderer.getContext();i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.bindTexture(i.TEXTURE_CUBE_MAP,e),r=!t.complete||this.loadingScreen?this.loadingScreenImages:this.generateCubeMapTextures(t,n);var o=0;r.forEach((function(e,t){i.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,i.RGBA,i.UNSIGNED_BYTE,e),o=i.getError()})),0!==o&&console.log("renderingError, WebGL Error Code: "+o),i.bindTexture(i.TEXTURE_CUBE_MAP,null)},tick:function(){this.el.sceneEl.xrSession&&(!this.layer&&this.el.sceneEl.is("vr-mode")&&this.initLayer(),this.updateTransform(),this.data.src.complete&&(this.pendingCubeMapUpdate||this.loadingScreen||this.visibilityChanged)&&this.loadCubeMapImages(),(this.needsRedraw||this.layer.needsRedraw||this.textureIsVideo)&&("quad"===this.data.type&&this.draw(),this.needsRedraw=!1))},initLayer:function(){var e=this,t=this.data.type;this.el.sceneEl.xrSession.onvisibilitychange=function(t){e.visibilityChanged="hidden"!==t.session.visibilityState},"quad"!==t?"monocubemap"!==t&&"stereocubemap"!==t||this.initCubeMapLayer():this.initQuadLayer()},initQuadLayer:function(){var e=this.el.sceneEl,t=e.renderer.getContext(),n=this.xrGLFactory=new XRWebGLBinding(e.xrSession,t);this.texture&&(this.layer=n.createQuadLayer({space:this.referenceSpace,viewPixelHeight:2048,viewPixelWidth:2048,height:this.data.height/2||this.texture.image.height/1e3,width:this.data.width/2||this.texture.image.width/1e3}),e.renderer.xr.addLayer(this.layer))},initCubeMapLayer:function(){var e=this.data.src,t=this.el.sceneEl,n=t.renderer.getContext(),r=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),i=this.cubeFaceSize=Math.min(r,Math.min(e.width,e.height)),o=this.xrGLFactory=new XRWebGLBinding(t.xrSession,n);this.layer=o.createCubeLayer({space:this.referenceSpace,viewPixelWidth:i,viewPixelHeight:i,layout:"monocubemap"===this.data.type?"mono":"stereo",isStatic:!1}),this.initLoadingScreenImages(),this.loadCubeMapImages(),t.renderer.xr.addLayer(this.layer)},initLoadingScreenImages:function(){for(var e=this.cubeFaceSize,t=this.loadingScreenImages=[],n=0;n<6;n++){var r=document.createElement("CANVAS");r.width=r.height=e;var i=r.getContext("2d");r.width=r.height=e,i.fillStyle="black",i.fillRect(0,0,e,e),2!==n&&3!==n&&(i.translate(e,0),i.scale(-1,1),i.fillStyle="white",i.font="30px Arial",i.fillText("Loading",e/2,e/2)),t.push(r)}},destroyLayer:function(){this.layer&&(this.el.sceneEl.renderer.xr.removeLayer(this.layer),this.layer.destroy(),this.layer=void 0)},toggleCompositorLayer:function(){this.enableCompositorLayer(!this.layerEnabled)},enableCompositorLayer:function(e){this.layerEnabled=e,this.quadPanelEl.object3D.visible=!this.layerEnabled},updateQuadPanel:function(){var e=this.quadPanelEl;this.quadPanelEl||(e=this.quadPanelEl=document.createElement("a-entity"),this.el.appendChild(e)),e.setAttribute("material",{shader:"flat",src:this.data.src,transparent:!0}),e.setAttribute("geometry",{primitive:"plane",height:this.data.height||this.texture.image.height/1e3,width:this.data.width||this.texture.image.height/1e3})},draw:function(){var e=this.el.sceneEl,t=this.el.sceneEl.renderer.getContext(),n=this.xrGLFactory.getSubImage(this.layer,e.frame),r=e.renderer.properties.get(this.texture).__webglTexture,i=t.getParameter(t.FRAMEBUFFER_BINDING);t.viewport(n.viewport.x,n.viewport.y,n.viewport.width,n.viewport.height),t.bindFramebuffer(t.FRAMEBUFFER,this.frameBuffer),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,n.colorTexture,0),function(e,t,n,r){var i=e.createFramebuffer();let o=n.viewport.x,a=n.viewport.y,s=n.viewport.x+n.viewport.width,l=n.viewport.y+n.viewport.height;"VIDEO"===r.tagName&&(e.bindTexture(e.TEXTURE_2D,t),e.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,e.RGB,e.UNSIGNED_BYTE,r)),e.bindFramebuffer(e.READ_FRAMEBUFFER,i),e.framebufferTexture2D(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),e.readBuffer(e.COLOR_ATTACHMENT0),e.blitFramebuffer(0,0,r.width,r.height,o,a,s,l,e.COLOR_BUFFER_BIT,e.NEAREST),e.bindFramebuffer(e.READ_FRAMEBUFFER,null),e.deleteFramebuffer(i)}(t,r,n,this.data.src),t.bindFramebuffer(t.FRAMEBUFFER,i)},updateTransform:function(){var e=this.el,t=this.position,n=this.quaternion;e.object3D.updateMatrixWorld(),t.setFromMatrixPosition(e.object3D.matrixWorld),n.setFromRotationMatrix(e.object3D.matrixWorld),this.layerEnabled||t.set(0,0,1e8),this.layer.transform=new XRRigidTransform(t,n)},onEnterVR:function(){var e=this.el.sceneEl,t=e.xrSession;e.hasWebXR&&XRWebGLBinding&&t?(t.requestReferenceSpace("local").then(this.onRequestedReferenceSpace),this.needsRedraw=!0,this.layerEnabled=!0,this.quadPanelEl&&(this.quadPanelEl.object3D.visible=!1),this.data.src.play&&this.data.src.play()):i("The layer component requires WebXR and the layers API enabled")},onExitVR:function(){this.quadPanelEl&&(this.quadPanelEl.object3D.visible=!0),this.destroyLayer()},onRequestedReferenceSpace:function(e){this.referenceSpace=e}})},{"../core/component":131,"../utils/":205}],87:[function(e,t,n){var r=e("../utils/bind"),i=e("../utils").diff,o=e("../utils/debug"),a=e("../core/component").registerComponent,s=e("../lib/three"),l=s.Math.degToRad,c=o("components:light:warn");t.exports.Component=a("light",{schema:{angle:{default:60,if:{type:["spot"]}},color:{type:"color"},groundColor:{type:"color",if:{type:["hemisphere"]}},decay:{default:1,if:{type:["point","spot"]}},distance:{default:0,min:0,if:{type:["point","spot"]}},intensity:{default:1,min:0,if:{type:["ambient","directional","hemisphere","point","spot"]}},penumbra:{default:0,min:0,max:1,if:{type:["spot"]}},type:{default:"directional",oneOf:["ambient","directional","hemisphere","point","spot"],schemaChange:!0},target:{type:"selector",if:{type:["spot","directional"]}},castShadow:{default:!1,if:{type:["point","spot","directional"]}},shadowBias:{default:0,if:{castShadow:!0}},shadowCameraFar:{default:500,if:{castShadow:!0}},shadowCameraFov:{default:90,if:{castShadow:!0}},shadowCameraNear:{default:.5,if:{castShadow:!0}},shadowCameraTop:{default:5,if:{castShadow:!0}},shadowCameraRight:{default:5,if:{castShadow:!0}},shadowCameraBottom:{default:-5,if:{castShadow:!0}},shadowCameraLeft:{default:-5,if:{castShadow:!0}},shadowCameraVisible:{default:!1,if:{castShadow:!0}},shadowMapHeight:{default:512,if:{castShadow:!0}},shadowMapWidth:{default:512,if:{castShadow:!0}},shadowRadius:{default:1,if:{castShadow:!0}}},init:function(){var e=this.el;this.light=null,this.defaultTarget=null,this.rendererSystem=this.el.sceneEl.systems.renderer,this.system.registerLight(e)},update:function(e){var t=this.data,n=i(t,e),o=this.light,a=this.rendererSystem,s=this;if(!o||"type"in n)this.setLight(this.data),this.updateShadow();else{var c=!1;Object.keys(n).forEach((function(e){var n=t[e];switch(e){case"color":o.color.set(n),a.applyColorCorrection(o.color);break;case"groundColor":o.groundColor.set(n),a.applyColorCorrection(o.groundColor);break;case"angle":o.angle=l(n);break;case"target":null===n?"spot"!==t.type&&"directional"!==t.type||(o.target=s.defaultTarget):n.hasLoaded?s.onSetTarget(n,o):n.addEventListener("loaded",r(s.onSetTarget,s,n,o));break;case"castShadow":case"shadowBias":case"shadowCameraFar":case"shadowCameraFov":case"shadowCameraNear":case"shadowCameraTop":case"shadowCameraRight":case"shadowCameraBottom":case"shadowCameraLeft":case"shadowCameraVisible":case"shadowMapHeight":case"shadowMapWidth":case"shadowRadius":c||(s.updateShadow(),c=!0);break;default:o[e]=n}}))}},setLight:function(e){var t=this.el,n=this.getLight(e);n&&(this.light&&t.removeObject3D("light"),this.light=n,this.light.el=t,t.setObject3D("light",this.light),"spot"!==e.type&&"directional"!==e.type&&"hemisphere"!==e.type||t.getObject3D("light").translateY(-1),"spot"===e.type&&(t.setObject3D("light-target",this.defaultTarget),t.getObject3D("light-target").position.set(0,0,-1)))},updateShadow:function(){var e=this.el,t=this.data,n=this.light;n.castShadow=t.castShadow;var r=e.getObject3D("cameraHelper");if(t.shadowCameraVisible&&!r?e.setObject3D("cameraHelper",new s.CameraHelper(n.shadow.camera)):!t.shadowCameraVisible&&r&&e.removeObject3D("cameraHelper"),!t.castShadow)return n;n.shadow.bias=t.shadowBias,n.shadow.radius=t.shadowRadius,n.shadow.mapSize.height=t.shadowMapHeight,n.shadow.mapSize.width=t.shadowMapWidth,n.shadow.camera.near=t.shadowCameraNear,n.shadow.camera.far=t.shadowCameraFar,n.shadow.camera instanceof s.OrthographicCamera?(n.shadow.camera.top=t.shadowCameraTop,n.shadow.camera.right=t.shadowCameraRight,n.shadow.camera.bottom=t.shadowCameraBottom,n.shadow.camera.left=t.shadowCameraLeft):n.shadow.camera.fov=t.shadowCameraFov,n.shadow.camera.updateProjectionMatrix(),r&&r.update()},getLight:function(e){var t=e.angle,n=new s.Color(e.color);this.rendererSystem.applyColorCorrection(n),n=n.getHex();var i=e.decay,o=e.distance,a=new s.Color(e.groundColor);this.rendererSystem.applyColorCorrection(a),a=a.getHex();var u=e.intensity,h=e.type,d=e.target,f=null;switch(h.toLowerCase()){case"ambient":return new s.AmbientLight(n,u);case"directional":return f=new s.DirectionalLight(n,u),this.defaultTarget=f.target,d&&(d.hasLoaded?this.onSetTarget(d,f):d.addEventListener("loaded",r(this.onSetTarget,this,d,f))),f;case"hemisphere":return new s.HemisphereLight(n,a,u);case"point":return new s.PointLight(n,u,o,i);case"spot":return f=new s.SpotLight(n,u,o,l(t),e.penumbra,i),this.defaultTarget=f.target,d&&(d.hasLoaded?this.onSetTarget(d,f):d.addEventListener("loaded",r(this.onSetTarget,this,d,f))),f;default:c("%s is not a valid light type. Choose from ambient, directional, hemisphere, point, spot.",h)}},onSetTarget:function(e,t){t.target=e.object3D},remove:function(){var e=this.el;e.removeObject3D("light"),e.getObject3D("cameraHelper")&&e.removeObject3D("cameraHelper")}})},{"../core/component":131,"../lib/three":179,"../utils":205,"../utils/bind":199,"../utils/debug":201}],88:[function(e,t,n){var r=e("../core/component").registerComponent;function i(e,t){return!(!e||!t)&&e.x===t.x&&e.y===t.y&&e.z===t.z}t.exports.Component=r("line",{schema:{start:{type:"vec3",default:{x:0,y:0,z:0}},end:{type:"vec3",default:{x:0,y:0,z:0}},color:{type:"color",default:"#74BEC1"},opacity:{type:"number",default:1},visible:{default:!0}},multiple:!0,init:function(){var e,t,n=this.data;this.rendererSystem=this.el.sceneEl.systems.renderer,t=this.material=new THREE.LineBasicMaterial({color:n.color,opacity:n.opacity,transparent:n.opacity<1,visible:n.visible}),(e=this.geometry=new THREE.BufferGeometry).setAttribute("position",new THREE.BufferAttribute(new Float32Array(6),3)),this.rendererSystem.applyColorCorrection(t.color),this.line=new THREE.Line(e,t),this.el.setObject3D(this.attrName,this.line)},update:function(e){var t=this.data,n=this.geometry,r=!1,o=this.material,a=n.attributes.position.array;i(t.start,e.start)||(a[0]=t.start.x,a[1]=t.start.y,a[2]=t.start.z,r=!0),i(t.end,e.end)||(a[3]=t.end.x,a[4]=t.end.y,a[5]=t.end.z,r=!0),r&&(n.attributes.position.needsUpdate=!0,n.computeBoundingSphere()),o.color.setStyle(t.color),this.rendererSystem.applyColorCorrection(o.color),o.opacity=t.opacity,o.transparent=t.opacity<1,o.visible=t.visible},remove:function(){this.el.removeObject3D("line",this.line)}})},{"../core/component":131}],89:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../core/shader").registerShader,o=e("../lib/three");t.exports.Component=r("link",{schema:{backgroundColor:{default:"red",type:"color"},borderColor:{default:"white",type:"color"},highlighted:{default:!1},highlightedColor:{default:"#24CAFF",type:"color"},href:{default:""},image:{type:"asset"},on:{default:"click"},peekMode:{default:!1},title:{default:""},titleColor:{default:"white",type:"color"},visualAspectEnabled:{default:!1}},init:function(){this.navigate=this.navigate.bind(this),this.previousQuaternion=void 0,this.quaternionClone=new o.Quaternion,this.hiddenEls=[]},update:function(e){var t,n,r=this.data,i=this.el;r.visualAspectEnabled&&(this.initVisualAspect(),t=r.highlighted?r.highlightedColor:r.backgroundColor,n=r.highlighted?r.highlightedColor:r.borderColor,i.setAttribute("material","backgroundColor",t),i.setAttribute("material","strokeColor",n),r.on!==e.on&&this.updateEventListener(),void 0!==e.peekMode&&r.peekMode!==e.peekMode&&this.updatePeekMode(),r.image&&e.image!==r.image&&i.setAttribute("material","pano","string"===typeof r.image?r.image:r.image.src))},updatePeekMode:function(){var e=this.el,t=this.sphereEl;this.data.peekMode?(this.hideAll(),e.getObject3D("mesh").visible=!1,t.setAttribute("visible",!0)):(this.showAll(),e.getObject3D("mesh").visible=!0,t.setAttribute("visible",!1))},play:function(){this.updateEventListener()},pause:function(){this.removeEventListener()},updateEventListener:function(){var e=this.el;e.isPlaying&&(this.removeEventListener(),e.addEventListener(this.data.on,this.navigate))},removeEventListener:function(){var e=this.data.on;e&&this.el.removeEventListener(e,this.navigate)},initVisualAspect:function(){var e,t,n,r=this.el;this.data.visualAspectEnabled&&!this.visualAspectInitialized&&(n=this.textEl=this.textEl||document.createElement("a-entity"),t=this.sphereEl=this.sphereEl||document.createElement("a-entity"),e=this.semiSphereEl=this.semiSphereEl||document.createElement("a-entity"),r.setAttribute("geometry",{primitive:"circle",radius:1,segments:64}),r.setAttribute("material",{shader:"portal",pano:this.data.image,side:"double"}),n.setAttribute("text",{color:this.data.titleColor,align:"center",font:"kelsonsans",value:this.data.title||this.data.href,width:4}),n.setAttribute("position","0 1.5 0"),r.appendChild(n),e.setAttribute("geometry",{primitive:"sphere",radius:1,phiStart:0,segmentsWidth:64,segmentsHeight:64,phiLength:180,thetaStart:0,thetaLength:360}),e.setAttribute("material",{shader:"portal",borderEnabled:0,pano:this.data.image,side:"back"}),e.setAttribute("rotation","0 180 0"),e.setAttribute("position","0 0 0"),e.setAttribute("visible",!1),r.appendChild(e),t.setAttribute("geometry",{primitive:"sphere",radius:10,segmentsWidth:64,segmentsHeight:64}),t.setAttribute("material",{shader:"portal",borderEnabled:0,pano:this.data.image,side:"back"}),t.setAttribute("visible",!1),r.appendChild(t),this.visualAspectInitialized=!0)},navigate:function(){window.location=this.data.href},tick:function(){var e=new o.Vector3,t=new o.Vector3,n=new o.Quaternion,r=new o.Vector3;return function(){var i,o,a=this.el,s=a.object3D,l=a.sceneEl.camera,c=this.textEl;if(this.data.visualAspectEnabled)if(s.updateMatrixWorld(),l.parent.updateMatrixWorld(),l.updateMatrixWorld(),s.matrix.decompose(t,n,r),t.setFromMatrixPosition(s.matrixWorld),e.setFromMatrixPosition(l.matrixWorld),(o=t.distanceTo(e))>20)this.previousQuaternion||(this.quaternionClone.copy(n),this.previousQuaternion=this.quaternionClone),s.lookAt(e);else{if(i=this.calculateCameraPortalOrientation(),o<.5){if(!0===this.semiSphereEl.getAttribute("visible"))return;c.setAttribute("text","width",1.5),i<=0?(c.setAttribute("position","0 0 0.75"),c.setAttribute("rotation","0 180 0"),this.semiSphereEl.setAttribute("rotation","0 0 0")):(c.setAttribute("position","0 0 -0.75"),c.setAttribute("rotation","0 0 0"),this.semiSphereEl.setAttribute("rotation","0 180 0")),a.getObject3D("mesh").visible=!1,this.semiSphereEl.setAttribute("visible",!0),this.peekCameraPortalOrientation=i}else i<=0?c.setAttribute("rotation","0 180 0"):c.setAttribute("rotation","0 0 0"),c.setAttribute("text","width",5),c.setAttribute("position","0 1.5 0"),a.getObject3D("mesh").visible=!0,this.semiSphereEl.setAttribute("visible",!1),this.peekCameraPortalOrientation=void 0;this.previousQuaternion&&(s.quaternion.copy(this.previousQuaternion),this.previousQuaternion=void 0)}}}(),hideAll:function(){var e=this.el,t=this.hiddenEls,n=this;t.length>0||e.sceneEl.object3D.traverse((function(r){r&&r.el&&r.el.hasAttribute("link-controls")||r.el&&r!==e.sceneEl.object3D&&r.el!==e&&r.el!==n.sphereEl&&r.el!==e.sceneEl.cameraEl&&!1!==r.el.getAttribute("visible")&&r.el!==n.textEl&&r.el!==n.semiSphereEl&&(r.el.setAttribute("visible",!1),t.push(r.el))}))},showAll:function(){this.hiddenEls.forEach((function(e){e.setAttribute("visible",!0)})),this.hiddenEls=[]},calculateCameraPortalOrientation:function(){var e=new o.Matrix4,t=new o.Vector3,n=new o.Vector3(0,0,1),r=new o.Vector3(0,0,0);return function(){var i=this.el,o=i.sceneEl.camera;return t.set(0,0,0),n.set(0,0,1),r.set(0,0,0),i.object3D.matrixWorld.extractRotation(e),n.applyMatrix4(e),i.object3D.updateMatrixWorld(),i.object3D.localToWorld(r),o.parent.parent.updateMatrixWorld(),o.parent.updateMatrixWorld(),o.updateMatrixWorld(),o.localToWorld(t),t.sub(r).normalize(),n.normalize(),Math.sign(n.dot(t))}}(),remove:function(){this.removeEventListener()}}),i("portal",{schema:{borderEnabled:{default:1,type:"int",is:"uniform"},backgroundColor:{default:"red",type:"color",is:"uniform"},pano:{type:"map",is:"uniform"},strokeColor:{default:"white",type:"color",is:"uniform"}},vertexShader:["vec3 portalPosition;","varying vec3 vWorldPosition;","varying float vDistanceToCenter;","varying float vDistance;","void main() {","vDistanceToCenter = clamp(length(position - vec3(0.0, 0.0, 0.0)), 0.0, 1.0);","portalPosition = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;","vDistance = length(portalPosition - cameraPosition);","vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;","gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI2 0.15915494","uniform sampler2D pano;","uniform vec3 strokeColor;","uniform vec3 backgroundColor;","uniform float borderEnabled;","varying float vDistanceToCenter;","varying float vDistance;","varying vec3 vWorldPosition;","void main() {","vec3 direction = normalize(vWorldPosition - cameraPosition);","vec2 sampleUV;","float borderThickness = clamp(exp(-vDistance / 50.0), 0.6, 0.95);","sampleUV.y = clamp(direction.y * 0.5 + 0.5, 0.0, 1.0);","sampleUV.x = atan(direction.z, -direction.x) * -RECIPROCAL_PI2 + 0.5;","if (vDistanceToCenter > borderThickness && borderEnabled == 1.0) {","gl_FragColor = vec4(strokeColor, 1.0);","} else {","gl_FragColor = mix(texture2D(pano, sampleUV), vec4(backgroundColor, 1.0), clamp(pow((vDistance / 15.0), 2.0), 0.0, 1.0));","}","}"].join("\n")})},{"../core/component":131,"../core/shader":141,"../lib/three":179}],90:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/"),a=o.bind,s=Math.PI/2;t.exports.Component=r("look-controls",{dependencies:["position","rotation"],schema:{enabled:{default:!0},magicWindowTrackingEnabled:{default:!0},pointerLockEnabled:{default:!1},reverseMouseDrag:{default:!1},reverseTouchDrag:{default:!1},touchEnabled:{default:!0},mouseEnabled:{default:!0}},init:function(){this.deltaYaw=0,this.previousHMDPosition=new i.Vector3,this.hmdQuaternion=new i.Quaternion,this.magicWindowAbsoluteEuler=new i.Euler,this.magicWindowDeltaEuler=new i.Euler,this.position=new i.Vector3,this.magicWindowObject=new i.Object3D,this.rotation={},this.deltaRotation={},this.savedPose=null,this.pointerLocked=!1,this.setupMouseControls(),this.bindMethods(),this.previousMouseEvent={},this.setupMagicWindowControls(),this.savedPose={position:new i.Vector3,rotation:new i.Euler},this.el.sceneEl.is("vr-mode")&&this.onEnterVR()},setupMagicWindowControls:function(){var e,t=this.data;o.device.isMobile()&&(e=this.magicWindowControls=new i.DeviceOrientationControls(this.magicWindowObject),"undefined"!==typeof DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission&&(e.enabled=!1,this.el.sceneEl.components["device-orientation-permission-ui"].permissionGranted?e.enabled=t.magicWindowTrackingEnabled:this.el.sceneEl.addEventListener("deviceorientationpermissiongranted",(function(){e.enabled=t.magicWindowTrackingEnabled}))))},update:function(e){var t=this.data;t.enabled!==e.enabled&&this.updateGrabCursor(t.enabled),e&&!t.magicWindowTrackingEnabled&&e.magicWindowTrackingEnabled&&(this.magicWindowAbsoluteEuler.set(0,0,0),this.magicWindowDeltaEuler.set(0,0,0)),this.magicWindowControls&&(this.magicWindowControls.enabled=t.magicWindowTrackingEnabled),e&&!t.pointerLockEnabled!==e.pointerLockEnabled&&(this.removeEventListeners(),this.addEventListeners(),this.pointerLocked&&this.exitPointerLock())},tick:function(e){this.data.enabled&&this.updateOrientation()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.pointerLocked&&this.exitPointerLock()},remove:function(){this.removeEventListeners(),this.pointerLocked&&this.exitPointerLock()},bindMethods:function(){this.onMouseDown=a(this.onMouseDown,this),this.onMouseMove=a(this.onMouseMove,this),this.onMouseUp=a(this.onMouseUp,this),this.onTouchStart=a(this.onTouchStart,this),this.onTouchMove=a(this.onTouchMove,this),this.onTouchEnd=a(this.onTouchEnd,this),this.onEnterVR=a(this.onEnterVR,this),this.onExitVR=a(this.onExitVR,this),this.onPointerLockChange=a(this.onPointerLockChange,this),this.onPointerLockError=a(this.onPointerLockError,this)},setupMouseControls:function(){this.mouseDown=!1,this.pitchObject=new i.Object3D,this.yawObject=new i.Object3D,this.yawObject.position.y=10,this.yawObject.add(this.pitchObject)},addEventListeners:function(){var e=this.el.sceneEl,t=e.canvas;t?(t.addEventListener("mousedown",this.onMouseDown,!1),window.addEventListener("mousemove",this.onMouseMove,!1),window.addEventListener("mouseup",this.onMouseUp,!1),t.addEventListener("touchstart",this.onTouchStart),window.addEventListener("touchmove",this.onTouchMove),window.addEventListener("touchend",this.onTouchEnd),e.addEventListener("enter-vr",this.onEnterVR),e.addEventListener("exit-vr",this.onExitVR),this.data.pointerLockEnabled&&(document.addEventListener("pointerlockchange",this.onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",this.onPointerLockChange,!1),document.addEventListener("pointerlockerror",this.onPointerLockError,!1))):e.addEventListener("render-target-loaded",a(this.addEventListeners,this))},removeEventListeners:function(){var e=this.el.sceneEl,t=e&&e.canvas;t&&(t.removeEventListener("mousedown",this.onMouseDown),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("touchstart",this.onTouchStart),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd),e.removeEventListener("enter-vr",this.onEnterVR),e.removeEventListener("exit-vr",this.onExitVR),document.removeEventListener("pointerlockchange",this.onPointerLockChange,!1),document.removeEventListener("mozpointerlockchange",this.onPointerLockChange,!1),document.removeEventListener("pointerlockerror",this.onPointerLockError,!1))},updateOrientation:function(){var e=new i.Matrix4;return function(){var t,n=this.el.object3D,r=this.pitchObject,i=this.yawObject,o=this.el.sceneEl;o.is("vr-mode")&&o.checkHeadsetConnected()?o.hasWebXR&&(t=o.renderer.xr.getCameraPose())&&(e.elements=t.transform.matrix,e.decompose(n.position,n.rotation,n.scale)):(this.updateMagicWindowOrientation(),n.rotation.x=this.magicWindowDeltaEuler.x+r.rotation.x,n.rotation.y=this.magicWindowDeltaEuler.y+i.rotation.y,n.rotation.z=this.magicWindowDeltaEuler.z)}}(),updateMagicWindowOrientation:function(){var e=this.magicWindowAbsoluteEuler,t=this.magicWindowDeltaEuler;this.magicWindowControls&&this.magicWindowControls.enabled&&(this.magicWindowControls.update(),e.setFromQuaternion(this.magicWindowObject.quaternion,"YXZ"),this.previousMagicWindowYaw||0===e.y||(this.previousMagicWindowYaw=e.y),this.previousMagicWindowYaw&&(t.x=e.x,t.y+=e.y-this.previousMagicWindowYaw,t.z=e.z,this.previousMagicWindowYaw=e.y))},onMouseMove:function(e){var t,n,r,i=this.pitchObject,o=this.previousMouseEvent,a=this.yawObject;this.data.enabled&&(this.mouseDown||this.pointerLocked)&&(this.pointerLocked?(n=e.movementX||e.mozMovementX||0,r=e.movementY||e.mozMovementY||0):(n=e.screenX-o.screenX,r=e.screenY-o.screenY),this.previousMouseEvent.screenX=e.screenX,this.previousMouseEvent.screenY=e.screenY,t=this.data.reverseMouseDrag?1:-1,a.rotation.y+=.002*n*t,i.rotation.x+=.002*r*t,i.rotation.x=Math.max(-s,Math.min(s,i.rotation.x)))},onMouseDown:function(e){var t=this.el.sceneEl;if(this.data.enabled&&this.data.mouseEnabled&&(!t.is("vr-mode")||!t.checkHeadsetConnected())&&0===e.button){var n=t&&t.canvas;this.mouseDown=!0,this.previousMouseEvent.screenX=e.screenX,this.previousMouseEvent.screenY=e.screenY,this.showGrabbingCursor(),this.data.pointerLockEnabled&&!this.pointerLocked&&(n.requestPointerLock?n.requestPointerLock():n.mozRequestPointerLock&&n.mozRequestPointerLock())}},showGrabbingCursor:function(){this.el.sceneEl.canvas.style.cursor="grabbing"},hideGrabbingCursor:function(){this.el.sceneEl.canvas.style.cursor=""},onMouseUp:function(){this.mouseDown=!1,this.hideGrabbingCursor()},onTouchStart:function(e){1===e.touches.length&&this.data.touchEnabled&&!this.el.sceneEl.is("vr-mode")&&(this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY},this.touchStarted=!0)},onTouchMove:function(e){var t,n,r=this.el.sceneEl.canvas,i=this.yawObject;this.touchStarted&&this.data.touchEnabled&&(n=2*Math.PI*(e.touches[0].pageX-this.touchStart.x)/r.clientWidth,t=this.data.reverseTouchDrag?1:-1,i.rotation.y-=.5*n*t,this.touchStart={x:e.touches[0].pageX,y:e.touches[0].pageY})},onTouchEnd:function(){this.touchStarted=!1},onEnterVR:function(){var e=this.el.sceneEl;e.checkHeadsetConnected()&&(this.saveCameraPose(),this.el.object3D.position.set(0,0,0),this.el.object3D.rotation.set(0,0,0),e.hasWebXR&&(this.el.object3D.matrixAutoUpdate=!1,this.el.object3D.updateMatrix()))},onExitVR:function(){this.el.sceneEl.checkHeadsetConnected()&&(this.restoreCameraPose(),this.previousHMDPosition.set(0,0,0),this.el.object3D.matrixAutoUpdate=!0)},onPointerLockChange:function(){this.pointerLocked=!(!document.pointerLockElement&&!document.mozPointerLockElement)},onPointerLockError:function(){this.pointerLocked=!1},exitPointerLock:function(){document.exitPointerLock(),this.pointerLocked=!1},updateGrabCursor:function(e){var t=this.el.sceneEl;function n(){t.canvas.classList.add("a-grab-cursor")}function r(){t.canvas.classList.remove("a-grab-cursor")}t.canvas?e?n():r():e?t.addEventListener("render-target-loaded",n):t.addEventListener("render-target-loaded",r)},saveCameraPose:function(){var e=this.el;this.savedPose.position.copy(e.object3D.position),this.savedPose.rotation.copy(e.object3D.rotation),this.hasSavedPose=!0},restoreCameraPose:function(){var e=this.el,t=this.savedPose;this.hasSavedPose&&(e.object3D.position.copy(t.position),e.object3D.rotation.copy(t.rotation),this.hasSavedPose=!1)}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],91:[function(e,t,n){var r=e("../utils/bind"),i=e("../core/component").registerComponent,o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=i("magicleap-controls",{schema:{hand:{default:"none"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:{axes:{touchpad:[0,1]},buttons:["trigger","grip","touchpad","menu"]},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex="right"===e.hand?0:"left"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=r(this.removeControllersUpdateListener,this),this.onAxisMoved=r(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;a(this,"magicleap-one",{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:"magicleap-one",hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/magicleap/magicleap-one-controller.glb")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id];n&&("trigger"===n&&(t=e.detail.state.value,console.log("analog value of trigger press: "+t)),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){e.detail.model.scale.set(.01,.01,.01)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){},setButtonColor:function(e,t){}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],92:[function(e,t,n){var r=e("../utils/"),i=e("../core/component"),o=e("../lib/three"),a=e("../core/shader"),s=r.debug("components:material:error"),l=i.registerComponent,c=a.shaders,u=a.shaderNames;function h(e,t){e.dispose(),t.unregisterMaterial(e)}t.exports.Component=l("material",{schema:{alphaTest:{default:0,min:0,max:1},depthTest:{default:!0},depthWrite:{default:!0},flatShading:{default:!1},npot:{default:!1},offset:{type:"vec2",default:{x:0,y:0}},opacity:{default:1,min:0,max:1},repeat:{type:"vec2",default:{x:1,y:1}},shader:{default:"standard",oneOf:u,schemaChange:!0},side:{default:"front",oneOf:["front","back","double"]},transparent:{default:!1},vertexColors:{type:"string",default:"none",oneOf:["face","vertex"]},visible:{default:!0},blending:{default:"normal",oneOf:["none","normal","additive","subtractive","multiply"]},dithering:{default:!0}},init:function(){this.material=null},update:function(e){var t=this.data;this.shader&&t.shader===e.shader||this.updateShader(t.shader),this.shader.update(this.data),this.updateMaterial(e)},updateSchema:function(e){var t,n,r,i;n=e&&e.shader,t=this.oldData&&this.oldData.shader,(r=c[i=n||t]&&c[i].schema)||s("Unknown shader schema "+i),t&&n===t||(this.extendSchema(r),this.updateBehavior())},updateBehavior:function(){var e,t,n=this.el.sceneEl,r=this.schema,i=this;function o(e,n){var r;for(r in t)t[r]=e;i.shader.update(t)}for(e in this.tick=void 0,t={},r)"time"===r[e].type&&(this.tick=o,t[e]=!0);n&&(this.tick?n.addBehavior(this):n.removeBehavior(this))},updateShader:function(e){var t,n=this.data,r=c[e]&&c[e].Shader;if(!r)throw new Error("Unknown shader "+e);(t=this.shader=new r).el=this.el,t.init(n),this.setMaterial(t.material),this.updateSchema(n)},updateMaterial:function(e){var t,n=this.data,r=this.material;for(t in r.alphaTest=n.alphaTest,r.depthTest=!1!==n.depthTest,r.depthWrite=!1!==n.depthWrite,r.opacity=n.opacity,r.flatShading=n.flatShading,r.side=function(e){switch(e){case"back":return o.BackSide;case"double":return o.DoubleSide;default:return o.FrontSide}}(n.side),r.transparent=!1!==n.transparent||n.opacity<1,r.vertexColors=function(e){switch(e){case"face":return o.FaceColors;case"vertex":return o.VertexColors;default:return o.NoColors}}(n.vertexColors),r.visible=n.visible,r.blending=function(e){switch(e){case"none":return o.NoBlending;case"additive":return o.AdditiveBlending;case"subtractive":return o.SubtractiveBlending;case"multiply":return o.MultiplyBlending;default:return o.NormalBlending}}(n.blending),r.dithering=n.dithering,e)break;!t||e.alphaTest===n.alphaTest&&e.side===n.side&&e.vertexColors===n.vertexColors||(r.needsUpdate=!0)},remove:function(){var e=new o.MeshBasicMaterial,t=this.material,n=this.el.getObject3D("mesh");n&&(n.material=e),h(t,this.system)},setMaterial:function(e){var t,n=this.el,r=this.system;this.material&&h(this.material,r),this.material=e,r.registerMaterial(e),(t=n.getObject3D("mesh"))?t.material=e:n.addEventListener("object3dset",(function t(r){"mesh"===r.detail.type&&r.target===n&&(n.getObject3D("mesh").material=e,n.removeEventListener("object3dset",t))}))}})},{"../core/component":131,"../core/shader":141,"../lib/three":179,"../utils/":205}],93:[function(e,t,n){var r=e("../utils/debug"),i=e("../core/component").registerComponent,o=e("../lib/three"),a=r("components:obj-model:warn");t.exports.Component=i("obj-model",{schema:{mtl:{type:"model"},obj:{type:"model"}},init:function(){var e=this;this.model=null,this.objLoader=new o.OBJLoader,this.mtlLoader=new o.MTLLoader(this.objLoader.manager),this.mtlLoader.crossOrigin="",this.el.addEventListener("componentinitialized",(function(t){e.model&&"material"===t.detail.name&&e.applyMaterial()}))},update:function(){var e=this.data;e.obj&&(this.resetMesh(),this.loadObj(e.obj,e.mtl))},remove:function(){this.model&&this.resetMesh()},resetMesh:function(){this.el.removeObject3D("mesh")},loadObj:function(e,t){var n=this,r=this.el,i=this.mtlLoader,o=this.objLoader,s=this.el.sceneEl.systems.renderer,l=t.substr(0,t.lastIndexOf("/")+1);if(t)return r.hasAttribute("material")&&a("Material component properties are ignored when a .MTL is provided"),i.setResourcePath(l),void i.load(t,(function(t){t.preload(),o.setMaterials(t),o.load(e,(function(e){n.model=e,n.model.traverse((function(e){if(e.isMesh){var t=e.material;t.color&&s.applyColorCorrection(t.color),t.map&&s.applyColorCorrection(t.map),t.emissive&&s.applyColorCorrection(t.emissive),t.emissiveMap&&s.applyColorCorrection(t.emissiveMap)}})),r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})}))}));o.load(e,(function(e){n.model=e,n.applyMaterial(),r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})}))},applyMaterial:function(){var e=this.el.components.material;e&&this.model.traverse((function(t){t instanceof o.Mesh&&(t.material=e.material)}))}})},{"../core/component":131,"../lib/three":179,"../utils/debug":201}],94:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"oculus-go":"Oculus Go",h=c?{axes:{touchpad:[0,1]},buttons:["trigger","none","touchpad"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]};t.exports.Component=r("oculus-go-controls",{schema:{hand:{default:""},buttonColor:{type:"color",default:"#FFFFFF"},buttonTouchedColor:{type:"color",default:"#BBBBBB"},buttonHighlightColor:{type:"color",default:"#7A7A7A"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:h,bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,u,this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,hand:t.hand,idPrefix:u,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/oculus/go/oculus-go-controller.gltf")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.getObjectByName("oculus_go_button_trigger"),t.trackpad=n.getObjectByName("oculus_go_touchpad"),t.touchpad=n.getObjectByName("oculus_go_touchpad"))},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes;if(n&&n[e]){var r,i;switch(t){case"down":r=this.data.buttonHighlightColor;break;case"touchstart":r=this.data.buttonTouchedColor;break;default:r=this.data.buttonColor}(i=n[e]).material.color.set(r),this.rendererSystem.applyColorCorrection(i.material.color)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],95:[function(e,t,n){var r=e("../utils/bind"),i=e("../core/component").registerComponent,o=e("../lib/three"),a=e("../utils/tracked-controls"),s=a.checkControllerPresentAndSetup,l=a.emitIfAxesChanged,c=a.onButtonEvent,u=e("../utils/").device.isWebXRAvailable,h=u?"oculus-touch":"Oculus Touch",d="https://cdn.aframe.io/controllers/oculus/oculus-touch-controller-",f={left:{modelUrl:d+"left.gltf",rayOrigin:{origin:{x:.008,y:-.01,z:0},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(-.005,.003,-.055),modelPivotRotation:new o.Euler(0,0,0)},right:{modelUrl:d+"right.gltf",rayOrigin:{origin:{x:-.008,y:-.01,z:0},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(.005,.003,-.055),modelPivotRotation:new o.Euler(0,0,0)}},p={left:{modelUrl:d+"left.gltf",rayOrigin:{origin:{x:.002,y:-.005,z:-.03},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(-.005,.036,-.037),modelPivotRotation:new o.Euler(Math.PI/4.5,0,0)},right:{modelUrl:d+"right.gltf",rayOrigin:{origin:{x:-.002,y:-.005,z:-.03},direction:{x:0,y:-.8,z:-1}},modelPivotOffset:new o.Vector3(.005,.036,-.037),modelPivotRotation:new o.Euler(Math.PI/4.5,0,0)}},m={"oculus-touch":u?p:f,"oculus-touch-v2":{left:{modelUrl:d+"gen2-left.gltf",rayOrigin:{origin:{x:-.01,y:0,z:-.02},direction:{x:0,y:-.5,z:-1}},modelPivotOffset:new o.Vector3(0,0,0),modelPivotRotation:new o.Euler(0,0,0)},right:{modelUrl:d+"gen2-right.gltf",rayOrigin:{origin:{x:.01,y:0,z:-.02},direction:{x:0,y:-.5,z:-1}},modelPivotOffset:new o.Vector3(0,0,0),modelPivotRotation:new o.Euler(0,0,0)}},"oculus-touch-v3":{left:{modelUrl:d+"v3-left.glb",rayOrigin:{origin:{x:.015,y:.005,z:0},direction:{x:0,y:0,z:-1}},modelPivotOffset:new o.Vector3(.01,-.01,.05),modelPivotRotation:new o.Euler(Math.PI/4,0,0)},right:{modelUrl:d+"v3-right.glb",rayOrigin:{origin:{x:-.015,y:.005,z:0},direction:{x:0,y:0,z:-1}},modelPivotOffset:new o.Vector3(-.01,-.01,.05),modelPivotRotation:new o.Euler(Math.PI/4,0,0)}}},g=u?{left:{axes:{thumbstick:[2,3]},buttons:["trigger","grip","none","thumbstick","xbutton","ybutton","surface"]},right:{axes:{thumbstick:[2,3]},buttons:["trigger","grip","none","thumbstick","abutton","bbutton","surface"]}}:{left:{axes:{thumbstick:[0,1]},buttons:["thumbstick","trigger","grip","xbutton","ybutton","surface"]},right:{axes:{thumbstick:[0,1]},buttons:["thumbstick","trigger","grip","abutton","bbutton","surface"]}};t.exports.Component=i("oculus-touch-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#999"},buttonTouchColor:{type:"color",default:"#8AB"},buttonHighlightColor:{type:"color",default:"#2DF"},model:{default:!0},controllerType:{default:"auto",oneOf:["auto","oculus-touch","oculus-touch-v2","oculus-touch-v3"]},orientationOffset:{type:"vec3",default:{x:43,y:0,z:0}}},mapping:g,bindMethods:function(){this.onModelLoaded=r(this.onModelLoaded,this),this.onControllersUpdate=r(this.onControllersUpdate,this),this.checkIfControllerPresent=r(this.checkIfControllerPresent,this),this.onAxisMoved=r(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=r(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,"down",e,e.data.hand)},this.onButtonUp=function(t){c(t.detail.id,"up",e,e.data.hand)},this.onButtonTouchStart=function(t){c(t.detail.id,"touchstart",e,e.data.hand)},this.onButtonTouchEnd=function(t){c(t.detail.id,"touchend",e,e.data.hand)},this.controllerPresent=!1,this.lastControllerCheck=0,this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){s(this,h,{hand:this.data.hand})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},loadModel:function(e){var t,n=this.data;if(n.model){if(this.displayModel=m[n.controllerType]||m["oculus-touch"],"auto"===n.controllerType){var r=this.el.sceneEl.systems["tracked-controls-webvr"];if(r&&r.vrDisplay){var i=r.vrDisplay.displayName;/^Oculus Quest$/.test(i)&&(this.displayModel=m["oculus-touch-v2"])}else t="oculus-touch",t=-1!==e.profiles.indexOf("oculus-touch-v2")?"oculus-touch-v2":t,t=-1!==e.profiles.indexOf("oculus-touch-v3")?"oculus-touch-v3":t,this.displayModel=m[t]}var o=this.displayModel[n.hand].modelUrl;this.el.setAttribute("gltf-model",o)}},injectTrackedControls:function(e){var t=this.data,n="right"===t.hand?"Oculus Touch (Right)":"Oculus Touch (Left)",r=u?"oculus-touch":n;this.el.setAttribute("tracked-controls",{id:r,hand:t.hand,orientationOffset:t.orientationOffset,handTrackingEnabled:!1}),this.loadModel(e)},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping[this.data.hand].buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"!==n&&"grip"!==n||(t=e.detail.state.value),r&&("trigger"===n&&r.trigger&&(r.trigger.rotation.x=this.originalXRotationTrigger-t*(Math.PI/26)),"grip"===n&&r.grip&&(r.grip.position.x=this.originalXPositionGrip+("left"===this.data.hand?-1:1)*t*.004)),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=this.controllerObject3D=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).grip=n.getObjectByName("buttonHand"),this.originalXPositionGrip=t.grip&&t.grip.position.x,t.thumbstick=n.getObjectByName("stick"),t.trigger=n.getObjectByName("buttonTrigger"),this.originalXRotationTrigger=t.trigger&&t.trigger.rotation.x,t.xbutton=n.getObjectByName("buttonX"),t.abutton=n.getObjectByName("buttonA"),t.ybutton=n.getObjectByName("buttonY"),t.bbutton=n.getObjectByName("buttonB"),n.position.copy(this.displayModel[this.data.hand].modelPivotOffset),n.rotation.copy(this.displayModel[this.data.hand].modelPivotRotation),this.el.emit("controllermodelready",{name:"oculus-touch-controls",model:this.data.model,rayOrigin:this.displayModel[this.data.hand].rayOrigin}))},onAxisMoved:function(e){l(this,this.mapping[this.data.hand].axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n,r="up"===t||"touchend"===t?this.data.buttonColor:"touchstart"===t?this.data.buttonTouchColor:this.data.buttonHighlightColor,i=this.buttonMeshes;this.data.model&&i&&i[e]&&((n=i[e]).material.color.set(r),this.rendererSystem.applyColorCorrection(n.material.color))}})},{"../core/component":131,"../lib/three":179,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],96:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("position",{schema:{type:"vec3"},update:function(){var e=this.el.object3D,t=this.data;e.position.set(t.x,t.y,t.z)},remove:function(){this.el.object3D.position.set(0,0,0)}})},{"../core/component":131}],97:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../lib/three"),o=e("../utils/").debug("components:raycaster:warn"),a=/^[\w\s-.,[\]#]*$/,s={childList:!0,attributes:!0,subtree:!0},l="raycaster-intersected",c="raycaster-intersection",u="raycaster-intersected-cleared",h="raycaster-intersection-cleared";function d(e,t){var n;for(e.length=t.length,n=0;n<t.length;n++)e[n]=t[n]}t.exports.Component=r("raycaster",{schema:{autoRefresh:{default:!0},direction:{type:"vec3",default:{x:0,y:0,z:-1}},enabled:{default:!0},far:{default:1e3},interval:{default:0},near:{default:0},objects:{default:""},origin:{type:"vec3"},showLine:{default:!1},lineColor:{default:"white"},lineOpacity:{default:1},useWorldCoordinates:{default:!1}},multiple:!0,init:function(){this.clearedIntersectedEls=[],this.unitLineEndVec3=new i.Vector3,this.intersectedEls=[],this.intersections=[],this.newIntersectedEls=[],this.newIntersections=[],this.objects=[],this.prevCheckTime=void 0,this.prevIntersectedEls=[],this.rawIntersections=[],this.raycaster=new i.Raycaster,this.updateOriginDirection(),this.setDirty=this.setDirty.bind(this),this.updateLine=this.updateLine.bind(this),this.observer=new MutationObserver(this.setDirty),this.dirty=!0,this.lineEndVec3=new i.Vector3,this.otherLineEndVec3=new i.Vector3,this.lineData={end:this.lineEndVec3},this.getIntersection=this.getIntersection.bind(this),this.intersectedDetail={el:this.el,getIntersection:this.getIntersection},this.intersectedClearedDetail={el:this.el},this.intersectionClearedDetail={clearedEls:this.clearedIntersectedEls},this.intersectionDetail={}},update:function(e){var t=this.data,n=this.el,r=this.raycaster;r.far=t.far,r.near=t.near,!t.showLine||t.far===e.far&&t.origin===e.origin&&t.direction===e.direction&&e.showLine||(this.unitLineEndVec3.copy(t.origin).add(t.direction).normalize(),this.drawLine()),!t.showLine&&e.showLine&&n.removeAttribute("line"),t.objects===e.objects||a.test(t.objects)||o('[raycaster] Selector "'+t.objects+'" may not update automatically with DOM changes.'),t.objects||o('[raycaster] For performance, please define raycaster.objects when using raycaster or cursor components to whitelist which entities to intersect with. e.g., raycaster="objects: [data-raycastable]".'),t.autoRefresh!==e.autoRefresh&&n.isPlaying&&(t.autoRefresh?this.addEventListeners():this.removeEventListeners()),e.enabled&&!t.enabled&&this.clearAllIntersections(),this.setDirty()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){this.data.showLine&&this.el.removeAttribute("line"),this.clearAllIntersections()},addEventListeners:function(){this.data.autoRefresh&&(this.observer.observe(this.el.sceneEl,s),this.el.sceneEl.addEventListener("object3dset",this.setDirty),this.el.sceneEl.addEventListener("object3dremove",this.setDirty))},removeEventListeners:function(){this.observer.disconnect(),this.el.sceneEl.removeEventListener("object3dset",this.setDirty),this.el.sceneEl.removeEventListener("object3dremove",this.setDirty)},setDirty:function(){this.dirty=!0},refreshObjects:function(){var e,t=this.data;e=t.objects?this.el.sceneEl.querySelectorAll(t.objects):this.el.sceneEl.querySelectorAll("*"),this.objects=this.flattenObject3DMaps(e),this.dirty=!1},tock:function(e){var t=this.data,n=this.prevCheckTime;t.enabled&&(n&&e-n<t.interval||(this.prevCheckTime=e,this.checkIntersections()))},checkIntersections:function(){var e,t,n=this.clearedIntersectedEls,r=this.el,i=this.data,o=this.intersectedEls,a=this.intersections,s=this.newIntersectedEls,f=this.newIntersections,p=this.prevIntersectedEls,m=this.rawIntersections;for(this.dirty&&this.refreshObjects(),d(this.prevIntersectedEls,this.intersectedEls),this.updateOriginDirection(),m.length=0,this.raycaster.intersectObjects(this.objects,!0,m),a.length=0,o.length=0,e=0;e<m.length;e++)t=m[e],i.showLine&&t.object===r.getObject3D("line")||t.object.el&&(a.push(t),o.push(t.object.el));for(f.length=0,s.length=0,e=0;e<a.length;e++)-1===p.indexOf(a[e].object.el)&&(f.push(a[e]),s.push(a[e].object.el));for(n.length=0,e=0;e<p.length;e++)-1===o.indexOf(p[e])&&(p[e].emit(u,this.intersectedClearedDetail),n.push(p[e]));for(n.length&&r.emit(h,this.intersectionClearedDetail),e=0;e<s.length;e++)s[e].emit(l,this.intersectedDetail);f.length&&(this.intersectionDetail.els=s,this.intersectionDetail.intersections=f,r.emit(c,this.intersectionDetail)),i.showLine&&setTimeout(this.updateLine)},updateLine:function(){var e,t=this.el,n=this.intersections;n.length&&(e=n[0].object.el===t&&n[1]?n[1].distance:n[0].distance),this.drawLine(e)},getIntersection:function(e){var t,n;for(t=0;t<this.intersections.length;t++)if((n=this.intersections[t]).object.el===e)return n;return null},updateOriginDirection:function(){var e=new i.Vector3,t=new i.Vector3;return function(){var n=this.el,r=this.data;r.useWorldCoordinates?this.raycaster.set(r.origin,r.direction):(n.object3D.updateMatrixWorld(),t.setFromMatrixPosition(n.object3D.matrixWorld),0===r.origin.x&&0===r.origin.y&&0===r.origin.z||(t=n.object3D.localToWorld(t.copy(r.origin))),e.copy(r.direction).transformDirection(n.object3D.matrixWorld).normalize(),this.raycaster.set(t,e))}}(),drawLine:function(e){var t,n=this.data,r=this.el;t=this.lineData.end===this.lineEndVec3?this.otherLineEndVec3:this.lineEndVec3,void 0===e&&(e=n.far===1/0?1e3:n.far),this.lineData.start=n.origin,this.lineData.end=t.copy(this.unitLineEndVec3).multiplyScalar(e),this.lineData.color=n.lineColor,this.lineData.opacity=n.lineOpacity,r.setAttribute("line",this.lineData)},flattenObject3DMaps:function(e){var t,n,r=this.objects;for(r.length=0,n=0;n<e.length;n++)if(e[n].isEntity&&e[n].object3D)for(t in e[n].object3DMap)r.push(e[n].getObject3D(t));return r},clearAllIntersections:function(){var e;for(e=0;e<this.intersectedEls.length;e++)this.intersectedEls[e].emit(u,this.intersectedClearedDetail);d(this.clearedIntersectedEls,this.intersectedEls),this.intersectedEls.length=0,this.intersections.length=0,this.el.emit(h,this.intersectionClearedDetail)}})},{"../core/component":131,"../lib/three":179,"../utils/":205}],98:[function(e,t,n){var r=e("../lib/three").Math.degToRad,i=e("../core/component").registerComponent;t.exports.Component=i("rotation",{schema:{type:"vec3"},update:function(){var e=this.data,t=this.el.object3D;t.rotation.set(r(e.x),r(e.y),r(e.z)),t.rotation.order="YXZ"},remove:function(){this.el.object3D.rotation.set(0,0,0)}})},{"../core/component":131,"../lib/three":179}],99:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("scale",{schema:{type:"vec3",default:{x:1,y:1,z:1}},update:function(){var e=this.data,t=this.el.object3D,n=0===e.x?1e-5:e.x,r=0===e.y?1e-5:e.y,i=0===e.z?1e-5:e.z;t.scale.set(n,r,i)},remove:function(){this.el.object3D.scale.set(1,1,1)}})},{"../core/component":131}],100:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../core/component").components;t.exports.Component=r("background",{schema:{color:{type:"color",default:"black"},transparent:{default:!1}},update:function(){var e=this.data,t=this.el.object3D;e.transparent?t.background=null:t.background=new THREE.Color(e.color)},remove:function(){var e=this.data,t=this.el.object3D;e.transparent?t.background=null:t.background=i[this.name].schema.color.default}})},{"../../core/component":131}],101:[function(e,t,n){var r=e("../../core/component").registerComponent;t.exports.Component=r("debug",{schema:{default:!0}})},{"../../core/component":131}],102:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../utils/"),o=i.bind,a=e("../../constants/");function s(e,t,n){var r,i;return(r=document.createElement("div")).classList.add("a-dialog-buttons-container"),(i=document.createElement("button")).classList.add("a-dialog-button","a-dialog-ok-button"),i.setAttribute(a.AFRAME_INJECTED,""),i.innerHTML=e,r.appendChild(i),i.addEventListener("click",(function(e){e.stopPropagation(),n()})),l(t,r)}function l(e,t){var n,r,i,o;return(n=document.createElement("div")).classList.add("a-modal"),n.setAttribute(a.AFRAME_INJECTED,""),(r=document.createElement("div")).className="a-dialog",r.setAttribute(a.AFRAME_INJECTED,""),n.appendChild(r),(i=document.createElement("div")).classList.add("a-dialog-text-container"),r.appendChild(i),(o=document.createElement("div")).classList.add("a-dialog-text"),o.innerHTML=e,i.appendChild(o),r.appendChild(t),n}t.exports.Component=r("device-orientation-permission-ui",{schema:{enabled:{default:!0},deviceMotionMessage:{default:"This immersive website requires access to your device motion sensors."},mobileDesktopMessage:{default:"Set your browser to request the mobile version of the site and reload the page to enjoy immersive mode."},httpsMessage:{default:"Access this site over HTTPS to enter VR mode and grant access to the device sensors."},denyButtonText:{default:"Deny"},allowButtonText:{default:"Allow"},cancelButtonText:{default:"Cancel"}},init:function(){var e=this;this.data.enabled&&("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&"http:"===location.protocol&&this.showHTTPAlert(),i.device.isMobileDeviceRequestingDesktopSite()?this.showMobileDesktopModeAlert():"undefined"!==typeof DeviceOrientationEvent&&DeviceOrientationEvent.requestPermission?(this.onDeviceMotionDialogAllowClicked=o(this.onDeviceMotionDialogAllowClicked,this),this.onDeviceMotionDialogDenyClicked=o(this.onDeviceMotionDialogDenyClicked,this),DeviceOrientationEvent.requestPermission().catch((function(){e.devicePermissionDialogEl=function(e,t,n,r,i){var o,s,c;return(o=document.createElement("div")).classList.add("a-dialog-buttons-container"),(s=document.createElement("button")).classList.add("a-dialog-button","a-dialog-deny-button"),s.setAttribute(a.AFRAME_INJECTED,""),s.innerHTML=e,o.appendChild(s),(c=document.createElement("button")).classList.add("a-dialog-button","a-dialog-allow-button"),c.setAttribute(a.AFRAME_INJECTED,""),c.innerHTML=t,o.appendChild(c),c.addEventListener("click",(function(e){e.stopPropagation(),r()})),s.addEventListener("click",(function(e){e.stopPropagation(),i()})),l(n,o)}(e.data.denyButtonText,e.data.allowButtonText,e.data.deviceMotionMessage,e.onDeviceMotionDialogAllowClicked,e.onDeviceMotionDialogDenyClicked),e.el.appendChild(e.devicePermissionDialogEl)})).then((function(){e.el.emit("deviceorientationpermissiongranted"),e.permissionGranted=!0}))):this.permissionGranted=!0)},remove:function(){this.devicePermissionDialogEl&&this.el.removeChild(this.devicePermissionDialogEl)},onDeviceMotionDialogDenyClicked:function(){this.remove()},showMobileDesktopModeAlert:function(){var e=this,t=s(e.data.cancelButtonText,e.data.mobileDesktopMessage,(function(){e.el.removeChild(t)}));this.el.appendChild(t)},showHTTPAlert:function(){var e=this,t=s(e.data.cancelButtonText,e.data.httpsMessage,(function(){e.el.removeChild(t)}));this.el.appendChild(t)},onDeviceMotionDialogAllowClicked:function(){var e=this;this.el.emit("deviceorientationpermissionrequested"),DeviceOrientationEvent.requestPermission().then((function(t){"granted"===t?(e.el.emit("deviceorientationpermissiongranted"),e.permissionGranted=!0):e.el.emit("deviceorientationpermissionrejected"),e.remove()})).catch(console.error)}})},{"../../constants/":123,"../../core/component":131,"../../utils/":205}],103:[function(e,t,n){var r=e("../../core/component").registerComponent;t.exports.Component=r("embedded",{dependencies:["vr-mode-ui"],schema:{default:!0},update:function(){var e=this.el,t=e.querySelector(".a-enter-vr");!0===this.data?(t&&t.classList.add("embedded"),e.removeFullScreenStyles()):(t&&t.classList.remove("embedded"),e.addFullScreenStyles())}})},{"../../core/component":131}],104:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=e("../../utils/debug")("components:fog:warn");t.exports.Component=r("fog",{schema:{color:{type:"color",default:"#000"},density:{default:25e-5},far:{default:1e3,min:0},near:{default:1,min:0},type:{default:"linear",oneOf:["linear","exponential"]}},update:function(){var e=this.data,t=this.el,n=this.el.object3D.fog;if(t.isScene)return n&&e.type===n.name?void Object.keys(this.schema).forEach((function(t){var r=e[t];"color"===t&&(r=new i.Color(r)),n[t]=r})):(t.object3D.fog=function(e){var t;return(t="exponential"===e.type?new i.FogExp2(e.color,e.density):new i.Fog(e.color,e.near,e.far)).name=e.type,t}(e),void t.systems.material.updateMaterials());o("Fog component can only be applied to <a-scene>")},remove:function(){var e=this.el.object3D.fog;e&&(e.far=0,e.near=.1)}})},{"../../core/component":131,"../../lib/three":179,"../../utils/debug":201}],105:[function(e,t,n){(function(n){var r=e("../../constants").AFRAME_INJECTED,i=e("../../../package"),o=e("../../core/component").registerComponent,a=e("../../utils/"),s="https://unpkg.com/aframe-inspector@"+function(e){var t=e.split(".");return t[2]="x",t.join(".")}(i.version)+"/dist/aframe-inspector.min.js",l="dev"===n.env.INSPECTOR_VERSION?"https://aframe.io/aframe-inspector/dist/aframe-inspector.js":s;t.exports.Component=o("inspector",{schema:{url:{default:l}},init:function(){this.firstPlay=!0,this.onKeydown=this.onKeydown.bind(this),this.onMessage=this.onMessage.bind(this),this.initOverlay(),window.addEventListener("keydown",this.onKeydown),window.addEventListener("message",this.onMessage)},play:function(){var e;this.firstPlay&&"false"!==(e=a.getUrlParameter("inspector"))&&e&&(this.openInspector(),this.firstPlay=!1)},initOverlay:function(){this.loadingMessageEl=document.createElement("div"),this.loadingMessageEl.classList.add("a-inspector-loader"),this.loadingMessageEl.innerHTML='Loading Inspector<span class="dots"><span>.</span><span>.</span><span>.</span></span>'},remove:function(){this.removeEventListeners()},onKeydown:function(e){73===e.keyCode&&(e.ctrlKey&&e.altKey||e.getModifierState("AltGraph"))&&this.openInspector()},showLoader:function(){document.body.appendChild(this.loadingMessageEl)},hideLoader:function(){document.body.removeChild(this.loadingMessageEl)},onMessage:function(e){"INJECT_AFRAME_INSPECTOR"===e.data&&this.openInspector()},openInspector:function(e){var t,n=this;AFRAME.INSPECTOR||AFRAME.inspectorInjected?AFRAME.INSPECTOR.open(e):(this.showLoader(),(t=document.createElement("script")).src=this.data.url,t.setAttribute("data-name","aframe-inspector"),t.setAttribute(r,""),t.onload=function(){AFRAME.INSPECTOR.open(e),n.hideLoader(),n.removeEventListeners()},t.onerror=function(){n.loadingMessageEl.innerHTML="Error loading Inspector"},document.head.appendChild(t),AFRAME.inspectorInjected=!0)},removeEventListeners:function(){window.removeEventListener("keydown",this.onKeydown),window.removeEventListener("message",this.onMessage)}})}).call(this,e("_process"))},{"../../../package":73,"../../constants":123,"../../core/component":131,"../../utils/":205,_process:49}],106:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../utils/").shouldCaptureKeyEvent;t.exports.Component=r("keyboard-shortcuts",{schema:{enterVR:{default:!0},exitVR:{default:!0}},init:function(){this.onKeyup=this.onKeyup.bind(this)},update:function(e){var t=this.data;this.enterVREnabled=t.enterVR},play:function(){window.addEventListener("keyup",this.onKeyup,!1)},pause:function(){window.removeEventListener("keyup",this.onKeyup)},onKeyup:function(e){var t=this.el;i(e)&&(this.enterVREnabled&&70===e.keyCode&&t.enterVR(),this.enterVREnabled&&27===e.keyCode&&t.exitVR())}})},{"../../core/component":131,"../../utils/":205}],107:[function(e,t,n){var r=e("../../utils/debug"),i=e("../../core/component").registerComponent,o=r("components:pool:warn");t.exports.Component=i("pool",{schema:{container:{default:""},mixin:{default:""},size:{default:0},dynamic:{default:!1}},multiple:!0,initPool:function(){var e;for(this.availableEls=[],this.usedEls=[],this.data.mixin||o("No mixin provided for pool component."),this.data.container&&(this.container=document.querySelector(this.data.container),this.container||o("Container "+this.data.container+" not found.")),this.container=this.container||this.el,e=0;e<this.data.size;++e)this.createEntity()},update:function(e){var t=this.data;e.mixin===t.mixin&&e.size===t.size||this.initPool()},createEntity:function(){var e;(e=document.createElement("a-entity")).play=this.wrapPlay(e.play),e.setAttribute("mixin",this.data.mixin),e.object3D.visible=!1,e.pause(),this.container.appendChild(e),this.availableEls.push(e)},wrapPlay:function(e){var t=this.usedEls;return function(){-1!==t.indexOf(this)&&e.call(this)}},requestEntity:function(){var e;if(0===this.availableEls.length){if(!1===this.data.dynamic)return void o("Requested entity from empty pool: "+this.attrName);o("Requested entity from empty pool. This pool is dynamic and will resize automatically. You might want to increase its initial size: "+this.attrName),this.createEntity()}return e=this.availableEls.shift(),this.usedEls.push(e),e.object3D.visible=!0,e},returnEntity:function(e){var t=this.usedEls.indexOf(e);if(-1!==t)return this.usedEls.splice(t,1),this.availableEls.push(e),e.object3D.visible=!1,e.pause(),e;o("The returned entity was not previously pooled from "+this.attrName)}})},{"../../core/component":131,"../../utils/debug":201}],108:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=["attribute vec3 position;","attribute vec2 uv;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","varying vec2 vUv;","void main() {"," vUv = vec2( 1.- uv.x, uv.y );"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),a=["precision mediump float;","uniform samplerCube map;","varying vec2 vUv;","#define M_PI 3.141592653589793238462643383279","void main() {"," vec2 uv = vUv;"," float longitude = uv.x * 2. * M_PI - M_PI + M_PI / 2.;"," float latitude = uv.y * M_PI;"," vec3 dir = vec3("," - sin( longitude ) * sin( latitude ),"," cos( latitude ),"," - cos( longitude ) * sin( latitude )"," );"," normalize( dir );"," gl_FragColor = vec4( textureCube( map, dir ).rgb, 1.0 );","}"].join("\n");t.exports.Component=r("screenshot",{schema:{width:{default:4096},height:{default:2048},camera:{type:"selector"}},init:function(){var e=this.el,t=this;function n(){var n=e.renderer.getContext();n&&(t.cubeMapSize=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),t.material=new i.RawShaderMaterial({uniforms:{map:{type:"t",value:null}},vertexShader:o,fragmentShader:a,side:i.DoubleSide}),t.quad=new i.Mesh(new i.PlaneBufferGeometry(1,1),t.material),t.quad.visible=!1,t.camera=new i.OrthographicCamera(-.5,.5,.5,-.5,-1e4,1e4),t.canvas=document.createElement("canvas"),t.ctx=t.canvas.getContext("2d"),e.object3D.add(t.quad),t.onKeyDown=t.onKeyDown.bind(t))}e.renderer?n():e.addEventListener("render-target-loaded",n)},getRenderTarget:function(e,t){return new i.WebGLRenderTarget(e,t,{minFilter:i.LinearFilter,magFilter:i.LinearFilter,wrapS:i.ClampToEdgeWrapping,wrapT:i.ClampToEdgeWrapping,format:i.RGBAFormat,type:i.UnsignedByteType})},resize:function(e,t){this.quad.scale.set(e,t,1),this.camera.left=-1*e/2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=-1*t/2,this.camera.updateProjectionMatrix(),this.canvas.width=e,this.canvas.height=t},play:function(){window.addEventListener("keydown",this.onKeyDown)},onKeyDown:function(e){var t=83===e.keyCode&&e.ctrlKey&&e.altKey;if(this.data&&t){var n=e.shiftKey?"equirectangular":"perspective";this.capture(n)}},setCapture:function(e){var t,n,r,o,a=this.el;return"perspective"===e?(this.quad.visible=!1,n=this.data.camera&&this.data.camera.components.camera.camera||a.camera,t={width:this.data.width,height:this.data.height}):(n=this.camera,o=new i.WebGLCubeRenderTarget(Math.min(this.cubeMapSize,2048),{format:i.RGBFormat,generateMipmaps:!0,minFilter:i.LinearMipmapLinearFilter,encoding:i.sRGBEncoding}),r=new i.CubeCamera(a.camera.near,a.camera.far,o),a.camera.getWorldPosition(r.position),a.camera.getWorldQuaternion(r.quaternion),r.update(a.renderer,a.object3D),this.quad.material.uniforms.map.value=r.renderTarget.texture,t={width:this.data.width,height:this.data.height},this.quad.visible=!0),{camera:n,size:t,projection:e}},capture:function(e){var t,n=this.el.renderer.xr.enabled,r=this.el.renderer;r.xr.enabled=!1,t=this.setCapture(e),this.renderCapture(t.camera,t.size,t.projection),this.saveCapture(),r.xr.enabled=n},getCanvas:function(e){var t=this.el.renderer.xr.enabled,n=this.el.renderer,r=this.setCapture(e);return n.xr.enabled=!1,this.renderCapture(r.camera,r.size,r.projection),n.xr.enabled=t,this.canvas},renderCapture:function(e,t,n){var r,i,o,a=this.el.renderer.autoClear,s=this.el,l=s.renderer;i=this.getRenderTarget(t.width,t.height),o=new Uint8Array(4*t.width*t.height),this.resize(t.width,t.height),l.autoClear=!0,l.clear(),l.setRenderTarget(i),l.render(s.object3D,e),l.autoClear=a,l.readRenderTargetPixels(i,0,0,t.width,t.height,o),l.setRenderTarget(null),"perspective"===n&&(o=this.flipPixelsVertically(o,t.width,t.height)),r=new ImageData(new Uint8ClampedArray(o),t.width,t.height),this.quad.visible=!1,this.ctx.putImageData(r,0,0)},flipPixelsVertically:function(e,t,n){for(var r=e.slice(0),i=0;i<t;++i)for(var o=0;o<n;++o)r[4*i+o*t*4]=e[4*i+(n-o)*t*4],r[4*i+1+o*t*4]=e[4*i+1+(n-o)*t*4],r[4*i+2+o*t*4]=e[4*i+2+(n-o)*t*4],r[4*i+3+o*t*4]=e[4*i+3+(n-o)*t*4];return r},saveCapture:function(){this.canvas.toBlob((function(e){var t="screenshot-"+document.title.toLowerCase()+"-"+Date.now()+".png",n=document.createElement("a"),r=URL.createObjectURL(e);n.href=r,n.setAttribute("download",t),n.innerHTML="downloading...",n.style.display="none",document.body.appendChild(n),setTimeout((function(){n.click(),document.body.removeChild(n)}),1)}),"image/png")}})},{"../../core/component":131,"../../lib/three":179}],109:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../../vendor/rStats"),o=e("../../utils");e("../../../vendor/rStats.extras"),e("../../lib/rStatsAframe");var a=window.aframeStats,s=o.bind,l=window.threeStats;t.exports.Component=r("stats",{schema:{default:!0},init:function(){var e=this.el;"false"!==o.getUrlParameter("stats")&&(this.stats=function(e){var t=new l(e.renderer),n=new a(e),r=e.isMobile?[]:[t,n];return new i({css:[],values:{fps:{caption:"fps",below:30}},groups:[{caption:"Framerate",values:["fps","raf"]}],plugins:r})}(e),this.statsEl=document.querySelector(".rs-base"),this.hideBound=s(this.hide,this),this.showBound=s(this.show,this),e.addEventListener("enter-vr",this.hideBound),e.addEventListener("exit-vr",this.showBound))},update:function(){if(this.stats)return this.data?this.show():this.hide()},remove:function(){this.el.removeEventListener("enter-vr",this.hideBound),this.el.removeEventListener("exit-vr",this.showBound),this.statsEl&&this.statsEl.parentNode.removeChild(this.statsEl)},tick:function(){var e=this.stats;e&&(e("rAF").tick(),e("FPS").frame(),e().update())},hide:function(){this.statsEl.classList.add("a-hidden")},show:function(){this.statsEl.classList.remove("a-hidden")}})},{"../../../vendor/rStats":217,"../../../vendor/rStats.extras":216,"../../core/component":131,"../../lib/rStatsAframe":178,"../../utils":205}],110:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../constants/"),o=e("../../utils/"),a=o.bind;function s(e){e.addEventListener("touchstart",(function(){e.classList.remove("resethover")})),e.addEventListener("touchend",(function(){e.classList.add("resethover")}))}t.exports.Component=r("vr-mode-ui",{dependencies:["canvas"],schema:{enabled:{default:!0},enterVRButton:{default:""},enterARButton:{default:""}},init:function(){var e=this,t=this.el;"false"!==o.getUrlParameter("ui")&&(this.insideLoader=!1,this.enterVREl=null,this.enterAREl=null,this.orientationModalEl=null,this.bindMethods(),t.addEventListener("enter-vr",this.updateEnterInterfaces),t.addEventListener("exit-vr",this.updateEnterInterfaces),t.addEventListener("update-vr-devices",this.updateEnterInterfaces),window.addEventListener("message",(function(t){"loaderReady"===t.data.type&&(e.insideLoader=!0,e.remove())})),window.addEventListener("orientationchange",this.toggleOrientationModalIfNeeded))},bindMethods:function(){this.onEnterVRButtonClick=a(this.onEnterVRButtonClick,this),this.onEnterARButtonClick=a(this.onEnterARButtonClick,this),this.onModalClick=a(this.onModalClick,this),this.toggleOrientationModalIfNeeded=a(this.toggleOrientationModalIfNeeded,this),this.updateEnterInterfaces=a(this.updateEnterInterfaces,this)},onModalClick:function(){this.el.exitVR()},onEnterVRButtonClick:function(){this.el.enterVR()},onEnterARButtonClick:function(){this.el.enterAR()},update:function(){var e=this.data,t=this.el;if(!e.enabled||this.insideLoader||"false"===o.getUrlParameter("ui"))return this.remove();this.enterVREl||this.enterAREl||this.orientationModalEl||(e.enterVRButton?(this.enterVREl=document.querySelector(e.enterVRButton),this.enterVREl.addEventListener("click",this.onEnterVRButtonClick)):(this.enterVREl=function(e){var t,n;return(n=document.createElement("div")).classList.add("a-enter-vr"),n.setAttribute(i.AFRAME_INJECTED,""),(t=document.createElement("button")).className="a-enter-vr-button",t.setAttribute("title","Enter VR mode with a headset or fullscreen mode on a desktop. Visit https://webvr.rocks or https://webvr.info for more information."),t.setAttribute(i.AFRAME_INJECTED,""),o.device.isMobile()&&s(t),n.appendChild(t),t.addEventListener("click",(function(t){e(),t.stopPropagation()})),n}(this.onEnterVRButtonClick),t.appendChild(this.enterVREl)),e.enterARButton?(this.enterAREl=document.querySelector(e.enterARButton),this.enterAREl.addEventListener("click",this.onEnterARButtonClick)):(this.enterAREl=function(e){var t,n;return(n=document.createElement("div")).classList.add("a-enter-ar"),n.setAttribute(i.AFRAME_INJECTED,""),(t=document.createElement("button")).className="a-enter-ar-button",t.setAttribute("title","Enter AR mode with a headset or handheld device. Visit https://webvr.rocks or https://webvr.info for more information."),t.setAttribute(i.AFRAME_INJECTED,""),o.device.isMobile()&&s(t),n.appendChild(t),t.addEventListener("click",(function(t){e(),t.stopPropagation()})),n}(this.onEnterARButtonClick),t.appendChild(this.enterAREl)),this.orientationModalEl=function(e){var t=document.createElement("div");t.className="a-orientation-modal",t.classList.add("a-hidden"),t.setAttribute(i.AFRAME_INJECTED,"");var n=document.createElement("button");return n.setAttribute(i.AFRAME_INJECTED,""),n.innerHTML="Exit VR",n.addEventListener("click",e),t.appendChild(n),t}(this.onModalClick),t.appendChild(this.orientationModalEl),this.updateEnterInterfaces())},remove:function(){[this.enterVREl,this.enterAREl,this.orientationModalEl].forEach((function(e){e&&e.parentNode&&e.parentNode.removeChild(e)})),this.enterVREl=void 0,this.enterAREl=void 0,this.orientationModalEl=void 0},updateEnterInterfaces:function(){this.toggleEnterVRButtonIfNeeded(),this.toggleEnterARButtonIfNeeded(),this.toggleOrientationModalIfNeeded()},toggleEnterVRButtonIfNeeded:function(){var e=this.el;this.enterVREl&&(e.is("vr-mode")?this.enterVREl.classList.add("a-hidden"):this.enterVREl.classList.remove("a-hidden"))},toggleEnterARButtonIfNeeded:function(){var e=this.el;this.enterAREl&&(e.is("vr-mode")||!o.device.checkARSupport()?this.enterAREl.classList.add("a-hidden"):this.enterAREl.classList.remove("a-hidden"))},toggleOrientationModalIfNeeded:function(){var e=this.el,t=this.orientationModalEl;t&&e.isMobile&&(!o.device.isLandscape()&&e.is("vr-mode")?t.classList.remove("a-hidden"):t.classList.add("a-hidden"))}})},{"../../constants/":123,"../../core/component":131,"../../utils/":205}],111:[function(e,t,n){var r=e("../core/component"),i=e("../lib/three"),o=e("../utils/bind"),a=r.registerComponent;t.exports.Component=a("shadow",{schema:{cast:{default:!0},receive:{default:!0}},init:function(){this.onMeshChanged=o(this.update,this),this.el.addEventListener("object3dset",this.onMeshChanged),this.system.setShadowMapEnabled(!0)},update:function(){var e=this.data;this.updateDescendants(e.cast,e.receive)},remove:function(){this.el.removeEventListener("object3dset",this.onMeshChanged),this.updateDescendants(!1,!1)},updateDescendants:function(e,t){var n=this.el.sceneEl;this.el.object3D.traverse((function(r){if(r instanceof i.Mesh&&(r.castShadow=e,r.receiveShadow=t,n.hasLoaded&&r.material))for(var o=Array.isArray(r.material)?r.material:[r.material],a=0;a<o.length;a++)o[a].needsUpdate=!0}))}})},{"../core/component":131,"../lib/three":179,"../utils/bind":199}],112:[function(t,n,r){var i=t("../core/component").registerComponent,o=t("../utils/debug"),a=t("../lib/three"),s=o("components:sound:warn");n.exports.Component=i("sound",{schema:{autoplay:{default:!1},distanceModel:{default:"inverse",oneOf:["linear","inverse","exponential"]},loop:{default:!1},maxDistance:{default:1e4},on:{default:""},poolSize:{default:1},positional:{default:!0},refDistance:{default:1},rolloffFactor:{default:1},src:{type:"audio"},volume:{default:1}},multiple:!0,init:function(){var e=this;this.listener=null,this.audioLoader=new a.AudioLoader,this.pool=new a.Group,this.loaded=!1,this.mustPlay=!1,this.playSoundBound=function(){e.playSound()}},update:function(e){var t,n,r=this.data,i=r.src!==e.src;if(i){if(!r.src)return;this.setupSound()}for(t=0;t<this.pool.children.length;t++)n=this.pool.children[t],r.positional&&(n.setDistanceModel(r.distanceModel),n.setMaxDistance(r.maxDistance),n.setRefDistance(r.refDistance),n.setRolloffFactor(r.rolloffFactor)),n.setLoop(r.loop),n.setVolume(r.volume),n.isPaused=!1;if(r.on!==e.on&&this.updateEventListener(e.on),i){var o=this;this.loaded=!1,this.audioLoader.load(r.src,(function(e){for(t=0;t<o.pool.children.length;t++)(n=o.pool.children[t]).setBuffer(e);o.loaded=!0,a.Cache.remove(r.src),(o.data.autoplay||o.mustPlay)&&o.playSound(),o.el.emit("sound-loaded",o.evtDetail,!1)}))}},pause:function(){this.stopSound(),this.removeEventListener()},play:function(){this.data.autoplay&&this.playSound(),this.updateEventListener()},remove:function(){var t;this.removeEventListener(),this.el.getObject3D(this.attrName)&&this.el.removeObject3D(this.attrName);try{for(t=0;t<this.pool.children.length;t++)this.pool.children[t].disconnect()}catch(e){s("Audio source not properly disconnected")}},updateEventListener:function(e){var t=this.el;e&&t.removeEventListener(e,this.playSoundBound),t.addEventListener(this.data.on,this.playSoundBound)},removeEventListener:function(){this.el.removeEventListener(this.data.on,this.playSoundBound)},setupSound:function(){var e,t,n=this.el,r=n.sceneEl,i=this;this.pool.children.length>0&&(this.stopSound(),n.removeObject3D("sound"));var o=this.listener=r.audioListener||new a.AudioListener;for(r.audioListener=o,r.camera&&r.camera.add(o),r.addEventListener("camera-set-active",(function(e){e.detail.cameraEl.getObject3D("camera").add(o)})),this.pool=new a.Group,e=0;e<this.data.poolSize;e++)t=this.data.positional?new a.PositionalAudio(o):new a.Audio(o),this.pool.add(t);for(n.setObject3D(this.attrName,this.pool),e=0;e<this.pool.children.length;e++)(t=this.pool.children[e]).onEnded=function(){this.isPlaying=!1,i.el.emit("sound-ended",i.evtDetail,!1)}},pauseSound:function(){var e,t;for(this.isPlaying=!1,e=0;e<this.pool.children.length;e++)(t=this.pool.children[e]).source&&t.source.buffer&&t.isPlaying&&!t.isPaused&&(t.isPaused=!0,t.pause())},playSound:function(e){var t,n,r;if(!this.loaded)return s("Sound not loaded yet. It will be played once it finished loading"),void(this.mustPlay=!0);for(t=!1,this.isPlaying=!0,n=0;n<this.pool.children.length;n++)(r=this.pool.children[n]).isPlaying||!r.buffer||t||(e&&e(r),r.play(),r.isPaused=!1,t=!0);t?this.mustPlay=!1:s("All the sounds are playing. If you need to play more sounds simultaneously consider increasing the size of pool with the `poolSize` attribute.",this.el)},stopSound:function(){var e,t;for(this.isPlaying=!1,e=0;e<this.pool.children.length;e++){if(!(t=this.pool.children[e]).source||!t.source.buffer)return;t.stop()}}})},{"../core/component":131,"../lib/three":179,"../utils/debug":201}],113:[function(e,t,n){var r=e("three-bmfont-text"),i=e("load-bmfont"),o=e("../core/component").registerComponent,a=e("../core/shader"),s=e("../lib/three"),l=e("../utils/"),c=l.debug("components:text:error"),u=a.shaders,h=l.debug("components:text:warn"),d="https://cdn.aframe.io/fonts/",f={aileronsemibold:d+"Aileron-Semibold.fnt",dejavu:d+"DejaVu-sdf.fnt",exo2bold:d+"Exo2Bold.fnt",exo2semibold:d+"Exo2SemiBold.fnt",kelsonsans:d+"KelsonSans.fnt",monoid:d+"Monoid.fnt",mozillavr:d+"mozillavr.fnt",roboto:d+"Roboto-msdf.json",sourcecodepro:d+"SourceCodePro.fnt"},p=["roboto"];t.exports.FONTS=f;var m=new function(){var e=this.cache={};this.get=function(t,n){return t in e||(e[t]=n()),e[t]}},g={},v={},y=/^\w+:/;function b(e,t,n){return e||(.5+t)*n}t.exports.Component=o("text",{multiple:!0,schema:{align:{type:"string",default:"left",oneOf:["left","right","center"]},alphaTest:{default:.5},anchor:{default:"center",oneOf:["left","right","center","align"]},baseline:{default:"center",oneOf:["top","center","bottom"]},color:{type:"color",default:"#FFF"},font:{type:"string",default:"roboto"},fontImage:{type:"string"},height:{type:"number"},letterSpacing:{type:"number",default:0},lineHeight:{type:"number"},negate:{type:"boolean",default:!0},opacity:{type:"number",default:1},shader:{default:"sdf",oneOf:u},side:{default:"front",oneOf:["front","back","double"]},tabSize:{default:4},transparent:{default:!0},value:{type:"string"},whiteSpace:{default:"normal",oneOf:["normal","pre","nowrap"]},width:{type:"number"},wrapCount:{type:"number",default:40},wrapPixels:{type:"number"},xOffset:{type:"number",default:0},yOffset:{type:"number",default:0},zOffset:{type:"number",default:.001}},init:function(){this.shaderData={},this.geometry=r(),this.createOrUpdateMaterial()},update:function(e){var t=this.data,n=this.currentFont;v[t.font]?this.texture=v[t.font]:(this.texture=v[t.font]=new s.Texture,this.texture.anisotropy=16),this.createOrUpdateMaterial(),e.font===t.font?n&&(this.updateGeometry(this.geometry,n),this.updateLayout()):this.updateFont()},remove:function(){this.geometry.dispose(),this.geometry=null,this.el.removeObject3D(this.attrName),this.material.dispose(),this.material=null,this.texture.dispose(),this.texture=null,this.shaderObject&&delete this.shaderObject},createOrUpdateMaterial:function(){var e,t,n,r=this.data,i=this.material,o=this.shaderData;if(n=r.shader,-1!==p.indexOf(r.font)||r.font.indexOf("-msdf.")>=0?n="msdf":r.font in f&&-1===p.indexOf(r.font)&&(n="sdf"),e=(this.shaderObject&&this.shaderObject.name)!==n,o.alphaTest=r.alphaTest,o.color=r.color,o.map=this.texture,o.opacity=r.opacity,o.side=function(e){switch(e){case"back":return s.FrontSide;case"double":return s.DoubleSide;default:return s.BackSide}}(r.side),o.transparent=r.transparent,o.negate=r.negate,!e)return this.shaderObject.update(o),i.transparent=o.transparent,void(i.side=o.side);t=function(e,t,n){var r,i;return(i=new u[t].Shader).el=e,i.init(n),i.update(n),(r=i.material).transparent=n.transparent,{material:r,shader:i}}(this.el,n,o),this.material=t.material,this.shaderObject=t.shader,this.material.side=o.side,this.mesh&&(this.mesh.material=this.material)},updateFont:function(){var e,t=this.data,n=this.el,r=this.geometry,o=this;t.font||h("No font specified. Using the default font."),this.mesh&&(this.mesh.visible=!1),e=this.lookupFont(t.font||"roboto")||t.font,m.get(e,(function(){return n=e,r=t.yOffset,new Promise((function(e,t){i(n,(function(i,o){if(i)return c("Error loading font",n),void t(i);n.indexOf("/Roboto-msdf.json")>=0&&(r=30),r&&o.chars.map((function(e){e.yoffset+=r})),e(o)}))}));var n,r})).then((function(i){var a;if(1!==i.pages.length)throw new Error("Currently only single-page bitmap fonts are supported.");g[e]||(i.widthFactor=g[i]=function(e){var t=0,n=0,r=0;return e.chars.map((function(e){t+=e.xadvance,e.id>=48&&e.id<=57&&(r++,n+=e.xadvance)})),r?n/r:t/e.chars.length}(i)),o.currentFont=i,a=o.getFontImageSrc(),m.get(a,(function(){return e=a,new Promise((function(t,n){(new s.ImageLoader).load(e,(function(e){t(e)}),void 0,(function(){c("Error loading font image",e),n(null)}))}));var e})).then((function(e){var a=o.texture;a.image=e,a.needsUpdate=!0,v[t.font]=a,o.texture=a,o.initMesh(),o.currentFont=i,o.updateGeometry(r,i),o.updateLayout(),o.mesh.visible=!0,n.emit("textfontset",{font:t.font,fontObj:i})})).catch((function(e){c(e.message),c(e.stack)}))})).catch((function(e){c(e.message),c(e.stack)}))},initMesh:function(){this.mesh||(this.mesh=new s.Mesh(this.geometry,this.material),this.el.setObject3D(this.attrName,this.mesh))},getFontImageSrc:function(){if(this.data.fontImage)return this.data.fontImage;var e=this.lookupFont(this.data.font||"roboto")||this.data.font,t=this.currentFont.pages[0];return t.match(y)&&0!==t.indexOf("http")?e.replace(/(\.fnt)|(\.json)/,".png"):s.LoaderUtils.extractUrlBase(e)+t},updateLayout:function(){var e,t,n,r,i,o,a,s,l,c=this.el,u=this.data,h=this.geometry,d=this.mesh;if(d&&h.layout){if(n=c.getAttribute("geometry"),r=(o=(a=u.width||n&&n.width||1)/b(u.wrapPixels,u.wrapCount,this.currentFont.widthFactor))*((i=h.layout).height+i.descender),n&&"plane"===n.primitive&&(n.width||c.setAttribute("geometry","width",a),n.height||c.setAttribute("geometry","height",r)),"left"===(e="align"===u.anchor?u.align:u.anchor))s=0;else if("right"===e)s=-1*i.width;else{if("center"!==e)throw new TypeError("Invalid text.anchor property value",e);s=-1*i.width/2}if("bottom"===(t=u.baseline))l=0;else if("top"===t)l=-1*i.height+i.ascender;else{if("center"!==t)throw new TypeError("Invalid text.baseline property value",t);l=-1*i.height/2}d.position.x=s*o+u.xOffset,d.position.y=l*o,d.position.z=u.zOffset,d.scale.set(o,-1*o,o)}},lookupFont:function(e){return f[e]},updateGeometry:function(){var e={},t={},n=/\\n/g,r=/\\t/g;return function(i,o){var a=this.data;t.font=o,t.lineHeight=a.lineHeight&&isFinite(a.lineHeight)?a.lineHeight:o.common.lineHeight,t.text=a.value.toString().replace(n,"\n").replace(r,"\t"),t.width=b(a.wrapPixels,a.wrapCount,o.widthFactor),i.update(l.extend(e,a,t))}}()})},{"../core/component":131,"../core/shader":141,"../lib/three":179,"../utils/":205,"load-bmfont":37,"three-bmfont-text":63}],114:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/tracked-controls"),o=e("../constants").DEFAULT_CAMERA_HEIGHT,a=e("../lib/three"),s=e("../constants").DEFAULT_HANDEDNESS,l=.175,c=-.3,u=-.03,h=0,d=0,f=-.175,p={touches:[]},m="axismove",g="buttonchanged",v="buttondown",y="buttonup",b="touchstart",w="touchend";t.exports.Component=r("tracked-controls-webvr",{schema:{autoHide:{default:!0},controller:{default:0},id:{type:"string",default:""},hand:{type:"string",default:""},idPrefix:{type:"string",default:""},orientationOffset:{type:"vec3"},armModel:{default:!1},headElement:{type:"selector"}},init:function(){this.axis=this.el.components["tracked-controls"].axis=[0,0,0],this.buttonStates=this.el.components["tracked-controls"].buttonStates={},this.changedAxes=[],this.targetControllerNumber=this.data.controller,this.axisMoveEventDetail={axis:this.axis,changed:this.changedAxes},this.deltaControllerPosition=new a.Vector3,this.controllerQuaternion=new a.Quaternion,this.controllerEuler=new a.Euler,this.updateGamepad(),this.buttonEventDetails={}},tick:function(e,t){var n=this.el.getObject3D("mesh");n&&n.update&&n.update(t/1e3),this.updateGamepad(),this.updatePose(),this.updateButtons()},defaultUserHeight:function(){return o},getHeadElement:function(){return this.data.headElement||this.el.sceneEl.camera.el},updateGamepad:function(){var e=this.data,t=i.findMatchingControllerWebVR(this.system.controllers,e.id,e.idPrefix,e.hand,e.controller);this.controller=t,this.el.components["tracked-controls"].controller=t,this.data.autoHide&&(this.el.object3D.visible=!!this.controller)},applyArmModel:function(e){var t,n,r,i,o=this.controller,a=this.controllerEuler,p=this.controllerQuaternion,m=this.deltaControllerPosition;n=this.getHeadElement().object3D,i=this.defaultUserHeight(),r=o.pose,t=(o?o.hand:void 0)||s,e.copy(n.position),m.set(l*("left"===t?-1:"right"===t?1:0),c,u),m.multiplyScalar(i),m.applyAxisAngle(n.up,n.rotation.y),e.add(m),m.set(h,d,f),m.multiplyScalar(i),r.orientation?p.fromArray(r.orientation):p.copy(n.quaternion),a.setFromQuaternion(p),a.set(a.x,a.y,0),m.applyEuler(a),e.add(m)},updatePose:function(){var e,t,n=this.controller,r=this.data,i=this.el.object3D,o=this.system.vrDisplay;n&&((e=n.pose).position?i.position.fromArray(e.position):r.armModel&&this.applyArmModel(i.position),e.orientation&&i.quaternion.fromArray(e.orientation),o&&e.position&&(t=this.el.sceneEl.renderer.xr.getStandingMatrix(),i.matrix.compose(i.position,i.quaternion,i.scale),i.matrix.multiplyMatrices(t,i.matrix),i.matrix.decompose(i.position,i.quaternion,i.scale)),i.rotateX(this.data.orientationOffset.x*a.Math.DEG2RAD),i.rotateY(this.data.orientationOffset.y*a.Math.DEG2RAD),i.rotateZ(this.data.orientationOffset.z*a.Math.DEG2RAD))},updateButtons:function(){var e,t,n=this.controller;if(n){for(t=0;t<n.buttons.length;++t)this.buttonStates[t]||(this.buttonStates[t]={pressed:!1,touched:!1,value:0}),this.buttonEventDetails[t]||(this.buttonEventDetails[t]={id:t,state:this.buttonStates[t]}),e=n.buttons[t],this.handleButton(t,e);this.handleAxes()}},handleButton:function(e,t){return!!(this.handlePress(e,t)|this.handleTouch(e,t)|this.handleValue(e,t))&&(this.el.emit(g,this.buttonEventDetails[e],!1),!0)},handleAxes:function(){var e,t=!1,n=this.controller.axes,r=this.axis,i=this.changedAxes;for(this.changedAxes.splice(0,this.changedAxes.length),e=0;e<n.length;++e)i.push(r[e]!==n[e]),i[e]&&(t=!0);if(!t)return!1;for(this.axis.splice(0,this.axis.length),e=0;e<n.length;e++)this.axis.push(n[e]);return this.el.emit(m,this.axisMoveEventDetail,!1),!0},handlePress:function(e,t){var n,r=this.buttonStates[e];return t.pressed!==r.pressed&&(n=t.pressed?v:y,this.el.emit(n,this.buttonEventDetails[e],!1),r.pressed=t.pressed,!0)},handleTouch:function(e,t){var n,r=this.buttonStates[e];return t.touched!==r.touched&&(n=t.touched?b:w,this.el.emit(n,this.buttonEventDetails[e],!1,p),r.touched=t.touched,!0)},handleValue:function(e,t){var n=this.buttonStates[e];return t.value!==n.value&&(n.value=t.value,!0)}})},{"../constants":123,"../core/component":131,"../lib/three":179,"../utils/tracked-controls":214}],115:[function(e,t,n){var r=e("../utils/tracked-controls"),i=e("../core/component").registerComponent,o="axismove",a="buttonchanged",s="buttondown",l="buttonup",c="touchstart",u="touchend";t.exports.Component=i("tracked-controls-webxr",{schema:{id:{type:"string",default:""},hand:{type:"string",default:""},handTrackingEnabled:{default:!1},index:{type:"int",default:-1},iterateControllerProfiles:{default:!1}},init:function(){this.updateController=this.updateController.bind(this),this.buttonEventDetails={},this.buttonStates=this.el.components["tracked-controls"].buttonStates={},this.axis=this.el.components["tracked-controls"].axis=[0,0,0],this.changedAxes=[],this.axisMoveEventDetail={axis:this.axis,changed:this.changedAxes}},update:function(){this.updateController()},play:function(){var e=this.el.sceneEl;this.updateController(),e.addEventListener("controllersupdated",this.updateController)},pause:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.updateController)},isControllerPresent:function(e){return!(!this.controller||this.controller.gamepad)&&("none"===e.inputSource.handedness||e.inputSource.handedness===this.data.hand)},updateController:function(){this.controller=r.findMatchingControllerWebXR(this.system.controllers,this.data.id,this.data.hand,this.data.index,this.data.iterateControllerProfiles,this.data.handTrackingEnabled),this.el.components["tracked-controls"].controller=this.controller,this.data.autoHide&&(this.el.object3D.visible=!!this.controller)},tick:function(){var e=this.el.sceneEl,t=this.controller,n=e.frame;t&&e.frame&&this.system.referenceSpace&&(t.hand||(this.pose=n.getPose(t.targetRaySpace,this.system.referenceSpace),this.updatePose(),this.updateButtons()))},updatePose:function(){var e=this.el.object3D,t=this.pose;t&&(e.matrix.elements=t.transform.matrix,e.matrix.decompose(e.position,e.rotation,e.scale))},updateButtons:function(){var e,t,n,r=this.controller;if(r&&r.gamepad){for(n=r.gamepad,t=0;t<n.buttons.length;++t)this.buttonStates[t]||(this.buttonStates[t]={pressed:!1,touched:!1,value:0}),this.buttonEventDetails[t]||(this.buttonEventDetails[t]={id:t,state:this.buttonStates[t]}),e=n.buttons[t],this.handleButton(t,e);this.handleAxes()}},handleButton:function(e,t){return!!(this.handlePress(e,t)|this.handleTouch(e,t)|this.handleValue(e,t))&&(this.el.emit(a,this.buttonEventDetails[e],!1),!0)},handleAxes:function(){var e,t=!1,n=this.controller.gamepad.axes,r=this.axis,i=this.changedAxes;for(this.changedAxes.splice(0,this.changedAxes.length),e=0;e<n.length;++e)i.push(r[e]!==n[e]),i[e]&&(t=!0);if(!t)return!1;for(this.axis.splice(0,this.axis.length),e=0;e<n.length;e++)this.axis.push(n[e]);return this.el.emit(o,this.axisMoveEventDetail,!1),!0},handlePress:function(e,t){var n,r=this.buttonStates[e];return t.pressed!==r.pressed&&(n=t.pressed?s:l,this.el.emit(n,this.buttonEventDetails[e],!1),r.pressed=t.pressed,!0)},handleTouch:function(e,t){var n,r=this.buttonStates[e];return t.touched!==r.touched&&(n=t.touched?c:u,this.el.emit(n,this.buttonEventDetails[e],!1),r.touched=t.touched,!0)},handleValue:function(e,t){var n=this.buttonStates[e];return t.value!==n.value&&(n.value=t.value,!0)}})},{"../core/component":131,"../utils/tracked-controls":214}],116:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("tracked-controls",{schema:{autoHide:{default:!0},controller:{default:-1},id:{type:"string",default:""},hand:{type:"string",default:""},idPrefix:{type:"string",default:""},handTrackingEnabled:{default:!1},orientationOffset:{type:"vec3"},armModel:{default:!1},headElement:{type:"selector"},iterateControllerProfiles:{default:!1}},update:function(){var e=this.data,t=this.el;t.sceneEl.hasWebXR?t.setAttribute("tracked-controls-webxr",{id:e.id,hand:e.hand,index:e.controller,iterateControllerProfiles:e.iterateControllerProfiles,handTrackingEnabled:e.handTrackingEnabled}):t.setAttribute("tracked-controls-webvr",e)}})},{"../core/component":131}],117:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../lib/three"),a=e("../utils/tracked-controls"),s=a.checkControllerPresentAndSetup,l=a.emitIfAxesChanged,c=a.onButtonEvent,u={left:"https://cdn.aframe.io/controllers/valve/index/valve-index-left.glb",right:"https://cdn.aframe.io/controllers/valve/index/valve-index-right.glb"},h=e("../utils/").device.isWebXRAvailable,d={left:{_x:Math.PI/3,_y:0,_z:0,_order:"XYZ"},right:{_x:Math.PI/3,_y:0,_z:0,_order:"XYZ"}},f=h?d:{left:{_x:.692295102620542,_y:-.0627618864318427,_z:-.06265893149611756,_order:"XYZ"},right:{_x:.6484021229942998,_y:-.032563619881892894,_z:-.1327973171917482,_order:"XYZ"}},p=h?{left:{x:0,y:-.05,z:.06},right:{x:0,y:-.05,z:.06}}:{left:{x:-.00023692678902063457,y:.04724540367838371,z:-.061959880395271096},right:{x:.002471558599671131,y:.055765208987076195,z:-.061068168708348844}};t.exports.Component=r("valve-index-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#FAFAFA"},buttonHighlightColor:{type:"color",default:"#22D1EE"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:{axes:{trackpad:[0,1],thumbstick:[2,3]},buttons:["trigger","grip","trackpad","thumbstick","abutton"]},init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){c(t.detail.id,"down",e)},this.onButtonUp=function(t){c(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){c(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){c(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data,t="right"===e.hand?0:"left"===e.hand?1:2;s(this,"valve",{index:t,iterateControllerProfiles:!0,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:"valve",controller:"right"===t.hand?1:"left"===t.hand?0:2,hand:t.hand,orientationOffset:t.orientationOffset}),this.loadModel()},loadModel:function(){var e=this.data;e.model&&this.el.setAttribute("gltf-model",""+u[e.hand])},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"===n&&(t=e.detail.state.value,r&&r.trigger&&(r.trigger.rotation.x=this.triggerOriginalRotationX-t*(Math.PI/40))),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=e.detail.model,r=this;this.data.model&&((t=this.buttonMeshes={}).grip={left:n.getObjectByName("leftgrip"),right:n.getObjectByName("rightgrip")},t.menu=n.getObjectByName("menubutton"),t.system=n.getObjectByName("systembutton"),t.trackpad=n.getObjectByName("touchpad"),t.trigger=n.getObjectByName("trigger"),this.triggerOriginalRotationX=t.trigger.rotation.x,Object.keys(t).forEach((function(e){r.setButtonColor(e,r.data.buttonColor)})),n.position.copy(p[this.data.hand]),n.rotation.copy(f[this.data.hand]),this.el.emit("controllermodelready",{name:"valve-index-controlls",model:this.data.model,rayOrigin:new o.Vector3(0,0,0)}))},onAxisMoved:function(e){l(this,this.mapping.axes,e)},updateModel:function(e,t){var n;this.data.model&&(-1!==t.indexOf("touch")||(n="up"===t?this.data.buttonColor:this.data.buttonHighlightColor,this.setButtonColor(e,n)))},setButtonColor:function(e,t){}})},{"../core/component":131,"../lib/three":179,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],118:[function(e,t,n){var r=e("../core/component").registerComponent;t.exports.Component=r("visible",{schema:{default:!0},update:function(){this.el.object3D.visible=this.data}})},{"../core/component":131}],119:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/").device.isWebXRAvailable,u=c?"htc-vive-controller-mv":"OpenVR ",h=c?{axes:{thumbstick:[0,1]},buttons:["trigger","grip","trackpad","none","menu"]}:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger","grip","menu","system"]};t.exports.Component=r("vive-controls",{schema:{hand:{default:"left"},buttonColor:{type:"color",default:"#FAFAFA"},buttonHighlightColor:{type:"color",default:"#22D1EE"},model:{default:!0},orientationOffset:{type:"vec3"}},mapping:h,init:function(){var e=this;this.controllerPresent=!1,this.lastControllerCheck=0,this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.previousButtonValues={},this.rendererSystem=this.el.sceneEl.systems.renderer,this.bindMethods()},update:function(){var e=this.data;this.controllerIndex="right"===e.hand?0:"left"===e.hand?1:2},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1},checkIfControllerPresent:function(){var e=this.data;a(this,u,{index:this.controllerIndex,hand:e.hand})},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{idPrefix:u,hand:t.hand,controller:this.controllerIndex,orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("obj-model",{obj:"https://cdn.aframe.io/controllers/vive/vr_controller_vive.obj",mtl:"https://cdn.aframe.io/controllers/vive/vr_controller_vive.mtl"})},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onButtonChanged:function(e){var t,n=this.mapping.buttons[e.detail.id],r=this.buttonMeshes;n&&("trigger"===n&&(t=e.detail.state.value,r&&r.trigger&&(r.trigger.rotation.x=-t*(Math.PI/12))),this.el.emit(n+"changed",e.detail.state))},onModelLoaded:function(e){var t,n=e.detail.model,r=this;this.data.model&&((t=this.buttonMeshes={}).grip={left:n.getObjectByName("leftgrip"),right:n.getObjectByName("rightgrip")},t.menu=n.getObjectByName("menubutton"),t.system=n.getObjectByName("systembutton"),t.trackpad=n.getObjectByName("touchpad"),t.trigger=n.getObjectByName("trigger"),Object.keys(t).forEach((function(e){r.setButtonColor(e,r.data.buttonColor)})),n.position.set(0,-.015,.04))},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){var n;this.data.model&&(-1!==t.indexOf("touch")||(n="up"===t?this.data.buttonColor:this.data.buttonHighlightColor,this.setButtonColor(e,n)))},setButtonColor:function(e,t){var n=this.buttonMeshes,r=this.rendererSystem;if(n){if("grip"===e)return n.grip.left.material.color.set(t),n.grip.right.material.color.set(t),r.applyColorCorrection(n.grip.left.material.color),void r.applyColorCorrection(n.grip.right.material.color);n[e].material.color.set(t),r.applyColorCorrection(n[e].material.color)}}})},{"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],120:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent;t.exports.Component=r("vive-focus-controls",{schema:{hand:{default:""},buttonTouchedColor:{type:"color",default:"#BBBBBB"},buttonHighlightColor:{type:"color",default:"#7A7A7A"},model:{default:!0},orientationOffset:{type:"vec3"},armModel:{default:!0}},mapping:{axes:{trackpad:[0,1]},buttons:["trackpad","trigger"]},bindMethods:function(){this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.removeControllersUpdateListener=i(this.removeControllersUpdateListener,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.controllerPresent=!1,this.lastControllerCheck=0,this.bindMethods()},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("model-loaded",this.onModelLoaded),e.addEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!0,this.addControllersUpdateListener()},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("model-loaded",this.onModelLoaded),e.removeEventListener("axismove",this.onAxisMoved),this.controllerEventsActive=!1,this.removeControllersUpdateListener()},checkIfControllerPresent:function(){a(this,"HTC Vive Focus",this.data.hand?{hand:this.data.hand}:{})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},injectTrackedControls:function(){var e=this.el,t=this.data;e.setAttribute("tracked-controls",{armModel:t.armModel,idPrefix:"HTC Vive Focus",orientationOffset:t.orientationOffset}),this.data.model&&this.el.setAttribute("gltf-model","https://cdn.aframe.io/controllers/vive/focus-controller/focus-controller.gltf")},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelLoaded:function(e){var t,n=e.detail.model;this.data.model&&((t=this.buttonMeshes={}).trigger=n.getObjectByName("BumperKey"),t.triggerPressed=n.getObjectByName("BumperKey_Press"),t.triggerPressed&&(t.triggerPressed.visible=!1),t.trackpad=n.getObjectByName("TouchPad"),t.trackpadPressed=n.getObjectByName("TouchPad_Press"),t.trackpadPressed&&(t.trackpadPressed.visible=!1))},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&this.el.emit(t+"changed",e.detail.state)},onAxisMoved:function(e){s(this,this.mapping.axes,e)},updateModel:function(e,t){this.data.model&&this.updateButtonModel(e,t)},updateButtonModel:function(e,t){var n=this.buttonMeshes,r=e+"Pressed";if(n&&n[e]&&n[r]){var i;switch(t){case"down":i=this.data.buttonHighlightColor;break;case"touchstart":i=this.data.buttonTouchedColor}i&&n[r].material.color.set(i),n[r].visible=!!i,n[e].visible=!i}}})},{"../core/component":131,"../utils/bind":199,"../utils/tracked-controls":214}],121:[function(e,t,n){var r=e("../constants").keyboardevent.KEYCODE_TO_CODE,i=e("../core/component").registerComponent,o=e("../lib/three"),a=e("../utils/"),s=a.bind,l=a.shouldCaptureKeyEvent,c=["KeyW","KeyA","KeyS","KeyD","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"];t.exports.Component=i("wasd-controls",{schema:{acceleration:{default:65},adAxis:{default:"x",oneOf:["x","y","z"]},adEnabled:{default:!0},adInverted:{default:!1},enabled:{default:!0},fly:{default:!1},wsAxis:{default:"z",oneOf:["x","y","z"]},wsEnabled:{default:!0},wsInverted:{default:!1}},init:function(){this.keys={},this.easing=1.1,this.velocity=new o.Vector3,this.onBlur=s(this.onBlur,this),this.onContextMenu=s(this.onContextMenu,this),this.onFocus=s(this.onFocus,this),this.onKeyDown=s(this.onKeyDown,this),this.onKeyUp=s(this.onKeyUp,this),this.onVisibilityChange=s(this.onVisibilityChange,this),this.attachVisibilityEventListeners()},tick:function(e,t){var n=this.data,r=this.el,i=this.velocity;(i[n.adAxis]||i[n.wsAxis]||!function(e){var t;for(t in e)return!1;return!0}(this.keys))&&(t/=1e3,this.updateVelocity(t),(i[n.adAxis]||i[n.wsAxis])&&r.object3D.position.add(this.getMovementVector(t)))},remove:function(){this.removeKeyEventListeners(),this.removeVisibilityEventListeners()},play:function(){this.attachKeyEventListeners()},pause:function(){this.keys={},this.removeKeyEventListeners()},updateVelocity:function(e){var t,n,r,i,o,a=this.data,s=this.keys,l=this.velocity;if(n=a.adAxis,i=a.wsAxis,e>.2)return l[n]=0,void(l[i]=0);var c=Math.pow(1/this.easing,60*e);0!==l[n]&&(l[n]=l[n]*c),0!==l[i]&&(l[i]=l[i]*c),Math.abs(l[n])<1e-5&&(l[n]=0),Math.abs(l[i])<1e-5&&(l[i]=0),a.enabled&&(t=a.acceleration,a.adEnabled&&(r=a.adInverted?-1:1,(s.KeyA||s.ArrowLeft)&&(l[n]-=r*t*e),(s.KeyD||s.ArrowRight)&&(l[n]+=r*t*e)),a.wsEnabled&&(o=a.wsInverted?-1:1,(s.KeyW||s.ArrowUp)&&(l[i]-=o*t*e),(s.KeyS||s.ArrowDown)&&(l[i]+=o*t*e)))},getMovementVector:function(){var e=new o.Vector3(0,0,0),t=new o.Euler(0,0,0,"YXZ");return function(n){var r,i=this.el.getAttribute("rotation"),a=this.velocity;return e.copy(a),e.multiplyScalar(n),i?(r=this.data.fly?i.x:0,t.set(o.Math.degToRad(r),o.Math.degToRad(i.y),0),e.applyEuler(t),e):e}}(),attachVisibilityEventListeners:function(){window.oncontextmenu=this.onContextMenu,window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus),document.addEventListener("visibilitychange",this.onVisibilityChange)},removeVisibilityEventListeners:function(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),document.removeEventListener("visibilitychange",this.onVisibilityChange)},attachKeyEventListeners:function(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp)},removeKeyEventListeners:function(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)},onContextMenu:function(){for(var e=Object.keys(this.keys),t=0;t<e.length;t++)delete this.keys[e[t]]},onBlur:function(){this.pause()},onFocus:function(){this.play()},onVisibilityChange:function(){document.hidden?this.onBlur():this.onFocus()},onKeyDown:function(e){var t;l(e)&&(t=e.code||r[e.keyCode],-1!==c.indexOf(t)&&(this.keys[t]=!0))},onKeyUp:function(e){var t;t=e.code||r[e.keyCode],delete this.keys[t]}})},{"../constants":123,"../core/component":131,"../lib/three":179,"../utils/":205}],122:[function(e,t,n){var r=e("../core/component").registerComponent,i=e("../utils/bind"),o=e("../utils/tracked-controls"),a=o.checkControllerPresentAndSetup,s=o.emitIfAxesChanged,l=o.onButtonEvent,c=e("../utils/"),u=c.debug("components:windows-motion-controls:debug"),h=c.debug("components:windows-motion-controls:warn"),d=e("../constants").DEFAULT_HANDEDNESS,f={left:"left.glb",right:"right.glb",default:"universal.glb"},p=e("../utils/").device.isWebXRAvailable,m=/([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/,g=p?"windows-mixed-reality":"Spatial Controller (Spatial Interaction Source) ",v=p?{axes:{touchpad:[0,1],thumbstick:[2,3]},buttons:["trigger","squeeze","touchpad","thumbstick","menu"],axisMeshNames:["TOUCHPAD_TOUCH_X","TOUCHPAD_TOUCH_X","THUMBSTICK_X","THUMBSTICK_Y"],buttonMeshNames:{trigger:"SELECT",menu:"MENU",squeeze:"GRASP",thumbstick:"THUMBSTICK_PRESS",touchpad:"TOUCHPAD_PRESS"},pointingPoseMeshName:"POINTING_POSE"}:{axes:{thumbstick:[0,1],trackpad:[2,3]},buttons:["thumbstick","trigger","grip","menu","trackpad"],axisMeshNames:["THUMBSTICK_X","THUMBSTICK_Y","TOUCHPAD_TOUCH_X","TOUCHPAD_TOUCH_Y"],buttonMeshNames:{trigger:"SELECT",menu:"MENU",grip:"GRASP",thumbstick:"THUMBSTICK_PRESS",trackpad:"TOUCHPAD_PRESS"},pointingPoseMeshName:"POINTING_POSE"};t.exports.Component=r("windows-motion-controls",{schema:{hand:{default:d},pair:{default:0},model:{default:!0},hideDisconnected:{default:!0}},mapping:v,bindMethods:function(){this.onModelError=i(this.onModelError,this),this.onModelLoaded=i(this.onModelLoaded,this),this.onControllersUpdate=i(this.onControllersUpdate,this),this.checkIfControllerPresent=i(this.checkIfControllerPresent,this),this.onAxisMoved=i(this.onAxisMoved,this)},init:function(){var e=this,t=this.el;this.onButtonChanged=i(this.onButtonChanged,this),this.onButtonDown=function(t){l(t.detail.id,"down",e)},this.onButtonUp=function(t){l(t.detail.id,"up",e)},this.onButtonTouchStart=function(t){l(t.detail.id,"touchstart",e)},this.onButtonTouchEnd=function(t){l(t.detail.id,"touchend",e)},this.onControllerConnected=function(){e.setModelVisibility(!0)},this.onControllerDisconnected=function(){e.setModelVisibility(!1)},this.controllerPresent=!1,this.lastControllerCheck=0,this.previousButtonValues={},this.bindMethods(),this.loadedMeshInfo={buttonMeshes:null,axisMeshes:null},this.rayOrigin={origin:new THREE.Vector3,direction:new THREE.Vector3(0,0,-1),createdFromMesh:!1},t.addEventListener("controllerconnected",this.onControllerConnected),t.addEventListener("controllerdisconnected",this.onControllerDisconnected)},addEventListeners:function(){var e=this.el;e.addEventListener("buttonchanged",this.onButtonChanged),e.addEventListener("buttondown",this.onButtonDown),e.addEventListener("buttonup",this.onButtonUp),e.addEventListener("touchstart",this.onButtonTouchStart),e.addEventListener("touchend",this.onButtonTouchEnd),e.addEventListener("axismove",this.onAxisMoved),e.addEventListener("model-error",this.onModelError),e.addEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!0},removeEventListeners:function(){var e=this.el;e.removeEventListener("buttonchanged",this.onButtonChanged),e.removeEventListener("buttondown",this.onButtonDown),e.removeEventListener("buttonup",this.onButtonUp),e.removeEventListener("touchstart",this.onButtonTouchStart),e.removeEventListener("touchend",this.onButtonTouchEnd),e.removeEventListener("axismove",this.onAxisMoved),e.removeEventListener("model-error",this.onModelError),e.removeEventListener("model-loaded",this.onModelLoaded),this.controllerEventsActive=!1},checkIfControllerPresent:function(){a(this,g,{hand:this.data.hand,index:this.data.pair,iterateControllerProfiles:!0})},play:function(){this.checkIfControllerPresent(),this.addControllersUpdateListener()},pause:function(){this.removeEventListeners(),this.removeControllersUpdateListener()},updateControllerModel:function(){if(this.data.model&&!this.rayOrigin.createdFromMesh){var e=this.createControllerModelUrl();this.loadModel(e)}else this.modelReady()},createControllerModelUrl:function(e){var t=this.el.components["tracked-controls"],n=t?t.controller:null,r="default",i=this.data.hand;if(n&&!window.hasNativeWebXRImplementation&&(i=n.hand,!e)){var o=n.id.match(m);r=o&&o[0]||r}return"https://cdn.aframe.io/controllers/microsoft/"+r+"/"+(f[i]||f.default)},injectTrackedControls:function(){var e=this.data;this.el.setAttribute("tracked-controls",{idPrefix:g,controller:e.pair,hand:e.hand,armModel:!1}),this.updateControllerModel()},addControllersUpdateListener:function(){this.el.sceneEl.addEventListener("controllersupdated",this.onControllersUpdate,!1)},removeControllersUpdateListener:function(){this.el.sceneEl.removeEventListener("controllersupdated",this.onControllersUpdate,!1)},onControllersUpdate:function(){this.checkIfControllerPresent()},onModelError:function(e){var t=this.createControllerModelUrl(!0);e.detail.src!==t?(h("Failed to load controller model for device, attempting to load default."),this.loadModel(t)):h("Failed to load default controller model.")},loadModel:function(e){this.el.setAttribute("gltf-model","url("+e+")")},onModelLoaded:function(e){var t,n,r,i,o=this.controllerModel=e.detail.model,a=this.loadedMeshInfo;if(u("Processing model"),a.buttonMeshes={},a.axisMeshes={},o){for(t=0;t<this.mapping.buttons.length;t++)(n=this.mapping.buttonMeshNames[this.mapping.buttons[t]])?(r=o.getObjectByName(n))?(i={index:t,value:s(r,"VALUE"),pressed:s(r,"PRESSED"),unpressed:s(r,"UNPRESSED")}).value&&i.pressed&&i.unpressed?a.buttonMeshes[this.mapping.buttons[t]]=i:h("Missing button submesh under mesh with name: "+n+"(VALUE: "+!!i.value+", PRESSED: "+!!i.pressed+", UNPRESSED:"+!!i.unpressed+")"):h("Missing button mesh with name: "+n):u("Skipping unknown button at index: "+t+" with mapped name: "+this.mapping.buttons[t]);for(t=0;t<this.mapping.axisMeshNames.length;t++)(n=this.mapping.axisMeshNames[t])?(r=o.getObjectByName(n))?(i={index:t,value:s(r,"VALUE"),min:s(r,"MIN"),max:s(r,"MAX")}).value&&i.min&&i.max?a.axisMeshes[t]=i:h("Missing axis submesh under mesh with name: "+n+"(VALUE: "+!!i.value+", MIN: "+!!i.min+", MAX:"+!!i.max+")"):h("Missing axis mesh with name: "+n):u("Skipping unknown axis at index: "+t);this.calculateRayOriginFromMesh(o),this.setModelVisibility()}function s(e,t){for(var n=0,r=e.children.length;n<r;n++){var i=e.children[n];if(i&&i.name===t)return i}}u("Model load complete.")},calculateRayOriginFromMesh:function(){var e=new THREE.Quaternion;return function(t){var n;if(this.rayOrigin.origin.set(0,0,0),this.rayOrigin.direction.set(0,0,-1),this.rayOrigin.createdFromMesh=!0,n=t.getObjectByName(this.mapping.pointingPoseMeshName)){var r=t.parent;r&&(t.parent=null,t.updateMatrixWorld(!0),t.parent=r),n.getWorldPosition(this.rayOrigin.origin),n.getWorldQuaternion(e),this.rayOrigin.direction.applyQuaternion(e),r&&t.updateMatrixWorld(!0)}else u("Mesh does not contain pointing origin data, defaulting to none.");this.modelReady()}}(),lerpAxisTransform:function(){var e=new THREE.Quaternion;return function(t,n){var r=this.loadedMeshInfo.axisMeshes[t];if(r){var i=r.min,o=r.max,a=r.value,s=.5*n+.5;a.setRotationFromQuaternion(e.copy(i.quaternion).slerp(o.quaternion,s)),a.position.lerpVectors(i.position,o.position,s)}}}(),lerpButtonTransform:function(){var e=new THREE.Quaternion;return function(t,n){var r=this.loadedMeshInfo.buttonMeshes[t];if(r){var i=r.unpressed,o=r.pressed,a=r.value;a.setRotationFromQuaternion(e.copy(i.quaternion).slerp(o.quaternion,n)),a.position.lerpVectors(i.position,o.position,n)}}}(),modelReady:function(){this.el.emit("controllermodelready",{name:"windows-motion-controls",model:this.data.model,rayOrigin:this.rayOrigin})},onButtonChanged:function(e){var t=this.mapping.buttons[e.detail.id];t&&(this.loadedMeshInfo&&this.loadedMeshInfo.buttonMeshes&&this.lerpButtonTransform(t,e.detail.state.value),this.el.emit(t+"changed",e.detail.state))},onAxisMoved:function(e){var t=this.mapping.axisMeshNames.length;if(this.loadedMeshInfo&&this.loadedMeshInfo.axisMeshes)for(var n=0;n<t;n++)this.lerpAxisTransform(n,e.detail.axis[n]||0);s(this,this.mapping.axes,e)},setModelVisibility:function(e){var t=this.el.getObject3D("mesh");e=void 0!==e?e:this.modelVisible,this.modelVisible=e,t&&(t.visible=e)}})},{"../constants":123,"../core/component":131,"../utils/":205,"../utils/bind":199,"../utils/tracked-controls":214}],123:[function(e,t,n){t.exports={AFRAME_INJECTED:"aframe-injected",DEFAULT_CAMERA_HEIGHT:1.6,DEFAULT_HANDEDNESS:"right",keyboardevent:e("./keyboardevent")}},{"./keyboardevent":124}],124:[function(e,t,n){t.exports={KEYCODE_TO_CODE:{38:"ArrowUp",37:"ArrowLeft",40:"ArrowDown",39:"ArrowRight",87:"KeyW",65:"KeyA",83:"KeyS",68:"KeyD"}}},{}],125:[function(e,t,n){var r=e("./a-node"),i=e("../utils/bind"),o=e("../utils/debug"),a=e("./a-register-element").registerElement,s=e("../lib/three"),l=new s.FileLoader,c=o("core:a-assets:warn");function u(e){if(e.hasAttribute("autoplay")||"auto"===e.getAttribute("preload"))return new Promise((function(t,n){if(4===e.readyState)return t();if(e.error)return n();function r(){for(var n=0,r=0;r<e.buffered.length;r++)n+=e.buffered.end(r)-e.buffered.start(r);n>=e.duration&&("VIDEO"===e.tagName&&(s.Cache.files[e.getAttribute("src")]=e),t())}e.addEventListener("loadeddata",r,!1),e.addEventListener("progress",r,!1),e.addEventListener("error",n,!1)}))}function h(e){var t=function(e){var t;if(e.hasAttribute("crossorigin"))return e;if(null!==(t=e.getAttribute("src"))){if(-1===t.indexOf("://"))return e;if(function(e){var t=e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0];return t.substring(0,t.indexOf(":"))}(t)===window.location.host)return e}return c('Cross-origin element (e.g., <img>) was requested without `crossorigin` set. A-Frame will re-request the asset with `crossorigin` attribute set. Please set `crossorigin` on the element (e.g., <img crossorigin="anonymous">)',t),e.crossOrigin="anonymous",e.cloneNode(!0)}(e);return t.tagName&&"video"===t.tagName.toLowerCase()&&(t.setAttribute("playsinline",""),t.setAttribute("webkit-playsinline","")),t!==e&&(e.parentNode.appendChild(t),e.parentNode.removeChild(e)),t}function d(e){var t=f(e),n=t.lastIndexOf(".");return n>=0&&".glb"===t.slice(n,e.search(/\?|#|$/))?"arraybuffer":"text"}function f(e){var t=document.createElement("a");t.href=e;var n=t.search.replace(/^\?/,""),r=e.replace(n,"").replace("?","");return r.substring(r.lastIndexOf("/")+1)}t.exports=a("a-assets",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.isAssets=!0,this.fileLoader=l,this.timeout=null}},attachedCallback:{value:function(){var e,t,n,r,o,a,l=this,d=[];if(!this.parentNode.isScene)throw new Error("<a-assets> must be a child of a <a-scene>.");for(o=this.querySelectorAll("img"),e=0;e<o.length;e++)r=h(o[e]),d.push(new Promise((function(t,n){s.Cache.files[o[e].getAttribute("src")]=r,r.onload=t,r.onerror=n})));for(n=this.querySelectorAll("audio, video"),e=0;e<n.length;e++)(t=h(n[e])).src||t.srcObject||c("Audio/video asset has neither `src` nor `srcObject` attributes."),d.push(u(t));Promise.all(d).then(i(this.load,this)),a=parseInt(this.getAttribute("timeout"),10)||3e3,this.timeout=setTimeout((function(){l.hasLoaded||(c("Asset loading timed out in ",a,"ms"),l.emit("timeout"),l.load())}),a)}},detachedCallback:{value:function(){this.timeout&&clearTimeout(this.timeout)}},load:{value:function(){r.prototype.load.call(this,null,(function(e){return e.isAssetItem&&e.hasAttribute("src")}))}}})}),a("a-asset-item",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.data=null,this.isAssetItem=!0}},attachedCallback:{value:function(){var e=this,t=this.getAttribute("src");l.setResponseType(this.getAttribute("response-type")||d(t)),l.load(t,(function(t){e.data=t,setTimeout((function(){r.prototype.load.call(e)}))}),(function(t){e.emit("progress",{loadedBytes:t.loaded,totalBytes:t.total,xhr:t})}),(function(t){e.emit("error",{xhr:t})}))}}})}),t.exports.inferResponseType=d,t.exports.getFileNameFromURL=f},{"../lib/three":179,"../utils/bind":199,"../utils/debug":201,"./a-node":129,"./a-register-element":130}],126:[function(e,t,n){var r=e("../utils/debug"),i=e("./a-register-element").registerElement,o=r("core:cubemap:warn");t.exports=i("a-cubemap",{prototype:Object.create(window.HTMLElement.prototype,{attachedCallback:{value:function(){this.srcs=this.validate()},writable:window.debug},validate:{value:function(){var e,t=this.querySelectorAll("[src]"),n=[];if(6===t.length){for(e=0;e<t.length;e++)n.push(t[e].getAttribute("src"));return n}o("<a-cubemap> did not contain exactly six elements each with a `src` attribute.")},writable:window.debug}})})},{"../utils/debug":201,"./a-register-element":130}],127:[function(e,t,n){var r,i=e("./a-node"),o=e("./component").components,a=e("./a-register-element").registerElement,s=e("../lib/three"),l=e("../utils/"),c=l.debug("core:a-entity:debug"),u=l.debug("core:a-entity:warn"),h=["position","rotation","scale","visible"],d={once:!0},f=Object.create(i.prototype,{createdCallback:{value:function(){this.components={},this.initializingComponents={},this.componentsToUpdate={},this.isEntity=!0,this.isPlaying=!1,this.object3D=new s.Group,this.object3D.el=this,this.object3DMap={},this.parentEl=null,this.rotationObj={},this.states=[]}},attributeChangedCallback:{value:function(e,t,n){var r=this.components[e];r&&r.justInitialized&&""===n?delete r.justInitialized:(r||null!==n)&&this.setEntityAttribute(e,t,n)}},attachedCallback:{value:function(){var e,t=this.sceneEl,n=this;this.addToParent(),this.isScene||(t?!(e=t.querySelector("a-assets"))||e.hasLoaded?this.load():e.addEventListener("loaded",(function(){n.load()})):this.load())}},detachedCallback:{value:function(){var e;if(this.parentEl){for(e in this.components)this.removeComponent(e,!1);this.isScene||(this.removeFromParent(),i.prototype.detachedCallback.call(this),this.object3D.el=null)}}},getObject3D:{value:function(e){return this.object3DMap[e]}},setObject3D:{value:function(e,t){var n,r=this;if(!(t instanceof s.Object3D))throw new Error("`Entity.setObject3D` was called with an object that was not an instance of THREE.Object3D.");(n=this.getObject3D(e))&&this.object3D.remove(n),t.el=this,t.children.length&&t.traverse((function(e){e.el=r})),this.object3D.add(t),this.object3DMap[e]=t,this.emit("object3dset",{object:t,type:e})}},removeObject3D:{value:function(e){var t=this.getObject3D(e);t?(this.object3D.remove(t),delete this.object3DMap[e],this.emit("object3dremove",{type:e})):u("Tried to remove `Object3D` of type:",e,"which was not defined.")}},getOrCreateObject3D:{value:function(e,t){var n=this.getObject3D(e);return!n&&t&&(n=new t,this.setObject3D(e,n)),u("`getOrCreateObject3D` has been deprecated. Use `setObject3D()` and `object3dset` event instead."),n}},add:{value:function(e){if(!e.object3D)throw new Error("Trying to add an element that doesn't have an `object3D`");this.object3D.add(e.object3D),this.emit("child-attached",{el:e})}},addToParent:{value:function(){var e=this.parentEl=this.parentNode;e&&e.add&&!this.attachedToParent&&(e.add(this),this.attachedToParent=!0)}},removeFromParent:{value:function(){var e=this.parentEl;this.parentEl.remove(this),this.attachedToParent=!1,this.parentEl=null,e.emit("child-detached",{el:this})}},load:{value:function(){var e=this;!this.hasLoaded&&this.parentEl&&i.prototype.load.call(this,(function(){e.parentEl&&(e.updateComponents(),(e.isScene||e.parentEl.isPlaying)&&e.play())}))},writable:window.debug},remove:{value:function(e){e?this.object3D.remove(e.object3D):this.parentNode.removeChild(this)}},getChildEntities:{value:function(){for(var e=this.children,t=[],n=0;n<e.length;n++){var i=e[n];i instanceof r&&t.push(i)}return t}},initComponent:{value:function(e,t,n){var r,i,a,s;if(s=(a=l.split(e,"__"))[0],i=a.length>2?a.slice(1).join("__"):a[1],o[s]&&(p(this,e)||void 0!==t||n)&&!(e in this.components)){if(this.initComponentDependencies(s),i&&!o[s].multiple)throw new Error("Trying to initialize multiple components of type `"+s+"`. There can only be one component of this type per entity.");r=new o[s].Component(this,t,i),this.isPlaying&&r.play(),this.hasAttribute(e)||(r.justInitialized=!0,window.HTMLElement.prototype.setAttribute.call(this,e,"")),c("Component initialized: %s",e)}},writable:window.debug},initComponentDependencies:{value:function(e){var t,n;if(o[e]&&(t=o[e].dependencies))for(n=0;n<t.length;n++)this.initComponent(t[n],window.HTMLElement.prototype.getAttribute.call(this,t[n])||void 0,!0)}},removeComponent:{value:function(e,t){var n;(n=this.components[e])&&(n.initialized?(n.pause(),n.remove(),t&&(n.destroy(),delete this.components[e]),this.emit("componentremoved",n.evtDetail,!1)):this.addEventListener("componentinitialized",(function n(r){r.detail.name===e&&(this.removeComponent(e,t),this.removeEventListener("componentinitialized",n))})))},writable:window.debug},updateComponents:{value:function(){var e,t,n,r,i,o,a=this.componentsToUpdate;if(this.hasLoaded){for(n=0;n<this.mixinEls.length;n++)for(r in this.mixinEls[n].componentCache)m(r)&&(a[r]=!0);if(this.getExtraComponents)for(r in t=this.getExtraComponents())m(r)&&(a[r]=!0);for(n=0;n<this.attributes.length;++n)r=this.attributes[n].name,-1===h.indexOf(r)&&m(r)&&(a[r]=!0);for(n=0;n<h.length;n++)r=h[n],this.hasAttribute(r)&&this.updateComponent(r,this.getDOMAttribute(r));for(r in a)i=this.getDOMAttribute(r),o=t&&t[r],e=o?o.constructor===Object?l.extend(o,l.styleParser.parse(i||{})):i||o:i,this.updateComponent(r,e),delete a[r]}},writable:window.debug},updateComponent:{value:function(e,t,n){var r=this.components[e];if(r)return null!==t||p(this,e)?void r.updateProperties(t,n):void this.removeComponent(e,!0);this.initComponent(e,t,!1)}},removeAttribute:{value:function(e,t){var n=this.components[e];n&&void 0===t&&this.removeComponent(e,!0),n&&void 0!==t?n.resetProperty(t):("mixin"===e&&this.mixinUpdate(""),window.HTMLElement.prototype.removeAttribute.call(this,e))}},play:{value:function(){var e,t,n;if(!this.isPlaying&&this.hasLoaded){for(n in this.isPlaying=!0,this.components)this.components[n].play();for(e=this.getChildEntities(),t=0;t<e.length;t++)e[t].play();this.emit("play")}},writable:!0},pause:{value:function(){var e,t,n;if(this.isPlaying){for(n in this.isPlaying=!1,this.components)this.components[n].pause();for(e=this.getChildEntities(),t=0;t<e.length;t++)e[t].pause();this.emit("pause")}},writable:!0},setEntityAttribute:{value:function(e,t,n){if(o[e]||this.components[e])this.updateComponent(e,n);else if("mixin"===e){if(n===this.computedMixinStr)return;this.mixinUpdate(n,t)}}},mixinUpdate:{value:function(){var e=[];return function(t,n){var r,i,o,a,s=this;if(this.hasLoaded){for(n=n||this.getAttribute("mixin"),o=this.updateMixins(t,n),e.length=0,a=0;a<this.mixinEls.length;a++)for(r in this.mixinEls[a].componentCache)-1===e.indexOf(r)&&(this.components[r]?this.components[r].handleMixinUpdate():this.initComponent(r,null),e.push(r));for(a=0;a<o.oldMixinIds.length;a++)if(i=document.getElementById(o.oldMixinIds[a]))for(r in i.componentCache)-1===e.indexOf(r)&&this.components[r]&&(this.getDOMAttribute(r)?this.components[r].handleMixinUpdate():this.removeComponent(r,!0))}else this.addEventListener("loaded",(function(){s.mixinUpdate(t,n)}),d)}}()},setAttribute:{value:function(){var e={};return function(t,n,r){var a,s,c,u,h;if(c=(u=t.indexOf("__"))>0?t.substring(0,u):t,!o[c])return"mixin"===t&&this.mixinUpdate(n),void i.prototype.setAttribute.call(this,t,n);if(!this.components[t]&&this.hasAttribute(t)&&this.updateComponent(t,window.HTMLElement.prototype.getAttribute.call(this,t)),"undefined"!==typeof r&&"string"===typeof n&&n.length>0&&"string"===typeof l.styleParser.parse(n)){for(h in e)delete e[h];(a=e)[n]=r,s=!1}else a=n,s=!0===r;this.updateComponent(t,a,s),this.sceneEl&&this.sceneEl.getAttribute("debug")&&this.components[t].flushToDOM()}}(),writable:window.debug},flushToDOM:{value:function(e){var t,n,r,i=this.components,o=this.children;for(r in i)i[r].flushToDOM();if(e)for(n=0;n<o.length;++n)(t=o[n]).flushToDOM&&t.flushToDOM(e)}},getAttribute:{value:function(e){var t;return"position"===e?this.object3D.position:"rotation"===e?function(e){var t=s.Math.radToDeg,n=e.object3D.rotation,r=e.rotationObj;return r.x=t(n.x),r.y=t(n.y),r.z=t(n.z),r}(this):"scale"===e?this.object3D.scale:"visible"===e?this.object3D.visible:(t=this.components[e])?t.data:window.HTMLElement.prototype.getAttribute.call(this,e)},writable:window.debug},getDOMAttribute:{value:function(e){var t=this.components[e];return t?t.attrValue:window.HTMLElement.prototype.getAttribute.call(this,e)},writable:window.debug},addState:{value:function(e){this.is(e)||(this.states.push(e),this.emit("stateadded",e))}},removeState:{value:function(e){var t=this.states.indexOf(e);-1!==t&&(this.states.splice(t,1),this.emit("stateremoved",e))}},is:{value:function(e){return-1!==this.states.indexOf(e)}},inspect:{value:function(){this.sceneEl.components.inspector.openInspector(this)}},destroy:{value:function(){var e;if(this.parentNode)u("Entity can only be destroyed if detached from scenegraph.");else for(e in this.components)this.components[e].destroy()}}});function p(e,t){return!(!e.components[t]||!e.components[t].attrValue)||function(e,t){var n,r=!1;for(n=0;n<t.length&&!(r=t[n].hasAttribute(e));++n);return r}(t,e.mixinEls)}function m(e){return-1!==e.indexOf("__")&&(e=l.split(e,"__")[0]),!!o[e]}r=a("a-entity",{prototype:f}),t.exports=r},{"../lib/three":179,"../utils/":205,"./a-node":129,"./a-register-element":130,"./component":131}],128:[function(e,t,n){var r=e("./a-node"),i=e("./a-register-element").registerElement,o=e("./component").components,a=e("../utils");t.exports=i("a-mixin",{prototype:Object.create(r.prototype,{createdCallback:{value:function(){this.componentCache={},this.id=this.getAttribute("id"),this.isMixin=!0}},attributeChangedCallback:{value:function(e,t,n){this.cacheAttribute(e,n),this.updateEntities()}},attachedCallback:{value:function(){this.sceneEl=this.closestScene(),this.cacheAttributes(),this.updateEntities(),this.load()}},setAttribute:{value:function(e,t){window.HTMLElement.prototype.setAttribute.call(this,e,t),this.cacheAttribute(e,t)}},cacheAttribute:{value:function(e,t){var n,r;r=a.split(e,"__")[0],(n=o[r])&&(void 0===t&&(t=window.HTMLElement.prototype.getAttribute.call(this,e)),this.componentCache[e]=n.parseAttrValueForCache(t))}},getAttribute:{value:function(e){return this.componentCache[e]||window.HTMLElement.prototype.getAttribute.call(this,e)}},cacheAttributes:{value:function(){var e,t,n=this.attributes;for(t=0;t<n.length;t++)e=n[t].name,this.cacheAttribute(e)}},updateEntities:{value:function(){var e,t,n;if(this.sceneEl)for(t=this.sceneEl.querySelectorAll("[mixin~="+this.id+"]"),n=0;n<t.length;n++)(e=t[n]).hasLoaded&&!e.isMixin&&e.mixinUpdate(this.id)}}})})},{"../utils":205,"./a-node":129,"./a-register-element":130,"./component":131}],129:[function(e,t,n){var r=e("./a-register-element").registerElement,i=e("./a-register-element").isNode,o=e("../utils/"),a=o.debug("core:a-node:warn"),s=o.debug("core:a-node:error");t.exports=r("a-node",{prototype:Object.create(window.HTMLElement.prototype,{createdCallback:{value:function(){this.computedMixinStr="",this.hasLoaded=!1,this.isNode=!0,this.mixinEls=[]},writable:window.debug},attachedCallback:{value:function(){var e;this.sceneEl=this.closestScene(),this.sceneEl||a("You are attempting to attach <"+this.tagName+"> outside of an A-Frame scene. Append this element to `<a-scene>` instead."),this.hasLoaded=!1,this.emit("nodeready",void 0,!1),this.isMixin||(e=this.getAttribute("mixin"))&&this.updateMixins(e)},writable:window.debug},attributeChangedCallback:{value:function(e,t,n){n!==this.computedMixinStr&&("mixin"!==e||this.isMixin||this.updateMixins(n,t))}},closestScene:{value:function(){for(var e=this;e&&!e.isScene;)e=e.parentElement;return e}},closest:{value:function(e){for(var t=this.matches||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector,n=this;n&&!t.call(n,e);)n=n.parentElement;return n}},detachedCallback:{value:function(){this.hasLoaded=!1}},load:{value:function(e,t){var n,r=this;this.hasLoaded||(t=t||i,n=this.getChildren().filter(t).map((function(e){return new Promise((function(t){if(e.hasLoaded)return t();e.addEventListener("loaded",t)}))})),Promise.all(n).then((function(){r.hasLoaded=!0,e&&e(),r.emit("loaded",void 0,!1)})).catch((function(e){s("Failure loading node: ",e)})))},writable:!0},getChildren:{value:function(){return Array.prototype.slice.call(this.children,0)}},updateMixins:{value:function(){var e=[],t=[],n={};return function(r,i){var a,s,l;for(e.length=0,t.length=0,s=r?o.split(r.trim(),/\s+/):e,l=i?o.split(i.trim(),/\s+/):t,n.newMixinIds=s,n.oldMixinIds=l,a=0;a<l.length;a++)-1===s.indexOf(l[a])&&this.unregisterMixin(l[a]);for(this.computedMixinStr="",this.mixinEls.length=0,a=0;a<s.length;a++)this.registerMixin(document.getElementById(s[a]));return this.computedMixinStr&&(this.computedMixinStr=this.computedMixinStr.trim(),window.HTMLElement.prototype.setAttribute.call(this,"mixin",this.computedMixinStr)),n}}()},registerMixin:{value:function(e){var t,n,r;if(e){if(r=e.getAttribute("mixin"))for(t=o.split(r.trim(),/\s+/),n=0;n<t.length;n++)this.registerMixin(document.getElementById(t[n]));this.computedMixinStr=this.computedMixinStr+" "+e.id,this.mixinEls.push(e)}}},setAttribute:{value:function(e,t){"mixin"===e&&this.updateMixins(t),window.HTMLElement.prototype.setAttribute.call(this,e,t)}},unregisterMixin:{value:function(e){var t,n=this.mixinEls;for(t=0;t<n.length;++t)if(e===n[t].id){n.splice(t,1);break}}},emit:{value:function(){var e={};return function(t,n,r,i){void 0===r&&(r=!0),e.bubbles=!!r,e.detail=n,i&&(e=o.extend({},i,e)),this.dispatchEvent(new CustomEvent(t,e))}}(),writable:window.debug}})})},{"../utils/":205,"./a-register-element":130}],130:[function(e,t,n){var r,i;e("document-register-element");var o=t.exports.knownTags={};function a(e,t,n,r){t.forEach((function(t){!function(e,t,n,r){var i=n[t],o=r[t];i&&o&&i!==o&&(e[t]={value:function(){return o.apply(this,arguments),i.apply(this,arguments)},writable:window.debug})}(e,t,n,r)}))}function s(e,t){Object.getOwnPropertyNames(e).forEach((function(n){var r;t[n]||(r=Object.getOwnPropertyDescriptor(e,n),t[n]={value:e[n],writable:r.writable})}))}t.exports.isNode=function(e){return e.tagName.toLowerCase()in o||e.isNode},t.exports.registerElement=function(e,t){var n=Object.getPrototypeOf(t.prototype),l=t,c=r&&n===r.prototype,u=i&&n===i.prototype;return(c||u)&&function(e){o[e.toLowerCase()]=!0}(e),c&&(l=function(e){var t={};return a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,r.prototype),s(e,t),t}(t.prototype),l={prototype:Object.create(n,l)}),u&&(l=function(e){var t={};return a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,r.prototype),a(t,["attachedCallback","attributeChangedCallback","createdCallback","detachedCallback"],e,i.prototype),s(e,t),t}(t.prototype),l={prototype:Object.create(n,l)}),Object.getOwnPropertyNames(l.prototype).forEach((function(e){var t=l.prototype[e];"function"===typeof t&&(t.displayName=e)})),document.registerElement(e,l)},t.exports.wrapMethods=a,r=e("./a-node"),i=e("./a-entity")},{"./a-entity":127,"./a-node":129,"document-register-element":12}],131:[function(e,t,n){var r=e("./schema"),i=e("./scene/scenes"),o=e("./system"),a=e("../utils/"),s=t.exports.components={},l=r.parseProperties,c=r.parseProperty,u=r.process,h=r.isSingleProperty,d=r.stringifyProperties,f=r.stringifyProperty,p=a.styleParser,m=a.debug("core:component:warn"),g=document.currentScript,v=new RegExp("[A-Z]+"),y={},b=t.exports.Component=function(e,t,n){var r=this;this.el=e,this.id=n,this.attrName=this.name+(n?"__"+n:""),this.evtDetail={id:this.id,name:this.name},this.initialized=!1,this.isSingleProperty=h(this.schema),this.isSinglePropertyObject=this.isSingleProperty&&A(c(void 0,this.schema))&&!(this.schema.default instanceof window.HTMLElement),this.isObjectBased=!this.isSingleProperty||this.isSinglePropertyObject,this.el.components[this.attrName]=this,this.objectPool=y[this.name];const i=this.events;this.events={},function(e,t){var n;for(n in t)e.events[n]=t[n].bind(e)}(this,i),this.attrValue=void 0,this.isObjectBased?(this.nextData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.nextData,this.schema),this.oldData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.oldData,this.schema),this.previousOldData=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.previousOldData,this.schema),this.parsingAttrValue=this.objectPool.use(),a.objectPool.removeUnusedKeys(this.parsingAttrValue,this.schema)):(this.nextData=void 0,this.oldData=void 0,this.previousOldData=void 0,this.parsingAttrValue=void 0),this.throttledEmitComponentChanged=a.throttle((function(){e.emit("componentchanged",r.evtDetail,!1)}),200),this.updateProperties(t)};if(b.prototype={schema:{},init:function(){},events:{},update:function(e){},updateSchema:void 0,tick:void 0,tock:void 0,play:function(){},pause:function(){},remove:function(){},parse:function(e,t){var n=this.schema;return this.isSingleProperty?c(e,n):l(p.parse(e),n,!0,this.name,t)},stringify:function(e){var t=this.schema;return"string"===typeof e?e:this.isSingleProperty?f(e,t):(e=d(e,t),p.stringify(e))},updateCachedAttrValue:function(e,t){var n,r,i;if(void 0!==e){if(null===e)return this.isObjectBased&&this.attrValue&&this.objectPool.recycle(this.attrValue),void(this.attrValue=void 0);if(e instanceof Object&&!(e instanceof window.HTMLElement)?(r=this.objectPool.use(),n=a.extend(r,e)):n=this.parseAttrValueForCache(e),this.isObjectBased&&!t&&this.attrValue)for(i in this.attrValue)void 0===n[i]&&(n[i]=this.attrValue[i]);this.isObjectBased&&!this.attrValue&&(this.attrValue=this.objectPool.use()),a.objectPool.clearObject(this.attrValue),this.attrValue=_(this.attrValue,n,this.isObjectBased),a.objectPool.clearObject(r)}},parseAttrValueForCache:function(e){var t;return"string"!==typeof e?e:(this.isSingleProperty?"string"===typeof(t=this.schema.parse(e))&&(t=e):(a.objectPool.clearObject(this.parsingAttrValue),t=p.parse(e,this.parsingAttrValue)),t)},flushToDOM:function(e){var t=e?this.data:this.attrValue;null!==t&&void 0!==t&&window.HTMLElement.prototype.setAttribute.call(this.el,this.attrName,this.stringify(t))},updateProperties:function(e,t){this.el.hasLoaded?(null!==e&&(e=this.parseAttrValueForCache(e)),this.updateCachedAttrValue(e,t),this.initialized?(this.updateComponent(e,t),this.callUpdateHandler()):this.initComponent()):this.updateCachedAttrValue(e)},initComponent:function(){var e,t=this.el;this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!1,!0)),this.data=this.buildData(this.attrValue),t.initializingComponents[this.name]||(t.initializingComponents[this.name]=!0,this.init(),this.initialized=!0,delete t.initializingComponents[this.name],this.oldData=_(this.oldData,this.data,this.isObjectBased),e=this.isObjectBased?this.objectPool.use():void 0,this.update(e),this.isObjectBased&&this.objectPool.recycle(e),t.isPlaying&&this.play(),t.emit("componentinitialized",this.evtDetail,!1))},updateComponent:function(e,t){var n,r;if(t)return this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!0,!0)),void(this.data=this.buildData(this.attrValue,!0,!1));if(this.isSingleProperty)return this.isObjectBased&&c(e,this.schema),void(this.data=e);if(l(e,this.schema,!0,this.name),this.schemaChangeKeys.length)for(n in e)if(this.schema[n].schemaChange){r=!0;break}if(r)return this.updateSchema&&this.updateSchema(this.buildData(this.attrValue,!0,!0)),void(this.data=this.buildData(this.attrValue,!0,!1));for(n in e)void 0!==e[n]&&(this.data[n]=e[n])},callUpdateHandler:function(){var e;this.previousOldData instanceof Object&&a.objectPool.clearObject(this.previousOldData),this.isObjectBased?x(this.previousOldData,this.oldData):this.previousOldData=this.oldData,e=!a.deepEqual(this.oldData,this.data),(this.isPositionRotationScale||e)&&(this.oldData instanceof Object&&a.objectPool.clearObject(this.oldData),this.oldData=_(this.oldData,this.data,this.isObjectBased),this.update(this.previousOldData),this.throttledEmitComponentChanged())},handleMixinUpdate:function(){this.data=this.buildData(this.attrValue),this.callUpdateHandler()},resetProperty:function(e){if(this.isObjectBased){if(!(e in this.attrValue))return;delete this.attrValue[e],this.data[e]=this.schema[e].default}else this.attrValue=this.schema.default,this.data=this.schema.default;this.updateProperties(this.attrValue)},extendSchema:function(e){var t;t=a.extend({},s[this.name].schema),a.extend(t,e),this.schema=u(t),this.el.emit("schemachanged",this.evtDetail)},buildData:function(e,t,n){var r,i,o,s,u,h,d,f=this.nextData,p=this.schema,m=this.el.mixinEls;if(r=e&&e.constructor===Array?e.length:void 0!==e&&null!==e,this.isObjectBased&&a.objectPool.clearObject(f),this.isSingleProperty)i=this.isObjectBased?x(f,p.default):S(p.default)?a.clone(p.default):p.default;else for(s in i=(d=!t&&this.attrValue)instanceof Object?x(f,d):f,p)o=p[s].default,void 0===i[s]&&(i[s]=S(o)?a.clone(o):o);for(h=0;h<m.length;h++)(u=m[h].getAttribute(this.attrName))&&(i=_(i,u,this.isObjectBased));if(r){if(this.isSingleProperty)return A(e)?(x(this.parsingAttrValue,e),c(this.parsingAttrValue,p)):c(e,p);i=_(i,e,this.isObjectBased)}else if(this.isSingleProperty)return c(i,p);return l(i,p,void 0,this.name,n)},eventsAttach:function(){var e;for(e in this.eventsDetach(),this.events)this.el.addEventListener(e,this.events[e])},eventsDetach:function(){var e;for(e in this.events)this.el.removeEventListener(e,this.events[e])},destroy:function(){this.objectPool.recycle(this.attrValue),this.objectPool.recycle(this.oldData),this.objectPool.recycle(this.parsingAttrValue),this.attrValue=this.oldData=this.parsingAttrValue=void 0}},window.debug)var w=t.exports.registrationOrderWarnings={};function x(e,t){var n,r;for(r in t)void 0!==t[r]&&(n=t[r],e[r]=S(n)?a.clone(n):n);return e}function _(e,t,n){var r;if(n&&t.constructor===Object){for(r in t)void 0!==t[r]&&(t[r]&&t[r].constructor===Object?e[r]=a.clone(t[r]):e[r]=t[r]);return e}return t}function E(e){return e.tick||e.tock}function A(e){return e&&e.constructor===Object&&!(e instanceof window.HTMLElement)}function S(e){return e&&(e.constructor===Object||e.constructor===Array)&&!(e instanceof window.HTMLElement)}t.exports.registerComponent=function(e,t){var n,r,l,c,d,f,p={};if(document.currentScript&&document.currentScript!==g&&i.forEach((function(t){t.hasLoaded||document.currentScript.compareDocumentPosition(t)!==Node.DOCUMENT_POSITION_FOLLOWING&&(m("The component `"+e+"` was registered in a <script> tag after the scene. Component <script> tags in an HTML file should be declared *before* the scene such that the component is available to entities during scene initialization."),window.debug&&(w[e]=!0))})),!0===v.test(e)&&m("The component name `"+e+"` contains uppercase characters, but HTML will ignore the capitalization of attribute names. Change the name to be lowercase: `"+e.toLowerCase()+"`"),-1!==e.indexOf("__"))throw new Error("The component name `"+e+"` is not allowed. The sequence __ (double underscore) is reserved to specify an id for multiple components of the same type");if(Object.keys(t).forEach((function(e){p[e]={value:t[e],writable:!0}})),s[e])throw new Error("The component `"+e+"` has been already registered. Check that you are not loading two versions of the same component or two different components of the same name.");if(((n=function(e,t,n){b.call(this,e,t,n)}).prototype=Object.create(b.prototype,p)).name=e,n.prototype.isPositionRotationScale="position"===e||"rotation"===e||"scale"===e,n.prototype.constructor=n,n.prototype.system=o&&o.systems[e],n.prototype.play=(d=n.prototype.play,function(){var e=this.el.sceneEl,t=this.el.isPlaying&&!this.isPlaying;this.initialized&&t&&(d.call(this),this.isPlaying=!0,this.eventsAttach(),E(this)&&e.addBehavior(this))}),n.prototype.pause=(f=n.prototype.pause,function(){var e=this.el.sceneEl;this.isPlaying&&(f.call(this),this.isPlaying=!1,this.eventsDetach(),E(this)&&e.removeBehavior(this))}),l=a.extend(u(n.prototype.schema,n.prototype.name)),!(c=h(n.prototype.schema)))for(r in n.prototype.schemaChangeKeys=[],l)l[r].schemaChange&&n.prototype.schemaChangeKeys.push(r);return y[e]=a.objectPool.createPool(),s[e]={Component:n,dependencies:n.prototype.dependencies,isSingleProp:c,multiple:n.prototype.multiple,name:e,parse:n.prototype.parse,parseAttrValueForCache:n.prototype.parseAttrValueForCache,schema:l,stringify:n.prototype.stringify,type:n.prototype.type},n}},{"../utils/":205,"./scene/scenes":138,"./schema":140,"./system":142}],132:[function(e,t,n){var r=e("./schema").process,i=t.exports.geometries={},o=t.exports.geometryNames=[],a=e("../lib/three"),s=t.exports.Geometry=function(){};s.prototype={schema:{},init:function(e){return this.geometry=new a.BufferGeometry,this.geometry},update:function(e){}},t.exports.registerGeometry=function(e,t){var n,a={};if(Object.keys(t).forEach((function(e){a[e]={value:t[e],writable:!0}})),i[e])throw new Error("The geometry `"+e+"` has been already registered");return((n=function(){s.call(this)}).prototype=Object.create(s.prototype,a)).name=e,n.prototype.constructor=n,i[e]={Geometry:n,schema:r(n.prototype.schema)},o.push(e),n}},{"../lib/three":179,"./schema":140}],133:[function(e,t,n){var r=e("../utils/coordinates"),i=e("debug"),o=i("core:propertyTypes:warn"),a=i("core:propertyTypes:warn"),s=t.exports.propertyTypes={},l=/[,> .[\]:]/,c=/\url\((.+)\)/;function u(e,t,n,r){"type"in s?o("Property type "+e+" is already registered."):s[e]={default:t,parse:n||d,stringify:r||f}}function h(e){var t,n;return"string"!==typeof e?e:(n=e.match(c))?n[1]:"#"===e.charAt(0)?(t=document.getElementById(e.substring(1)))?"CANVAS"===t.tagName||"VIDEO"===t.tagName||"IMG"===t.tagName?t:t.getAttribute("src"):void a('"'+e+'" asset not found.'):e}function d(e){return e}function f(e){return null===e?"null":e.toString()}function p(e){return parseInt(e,10)}function m(e){return r.parse(e,this.default)}function g(e,t){if(null===e)return!0;if("object"!==typeof e)return!1;if(Object.keys(e).length!==t)return!1;var n=e.x,r=e.y,i=e.z,o=e.w;return"number"===typeof n&&"number"===typeof r&&!(t>2&&"number"!==typeof i)&&!(t>3&&"number"!==typeof o)}u("audio","",h),u("array",[],(function(e){return Array.isArray(e)?e:e&&"string"===typeof e?e.split(",").map((function(e){return e.trim()})):[]}),(function(e){return e.join(", ")})),u("asset","",h),u("boolean",!1,(function(e){return"false"!==e&&!1!==e})),u("color","#FFF",d,f),u("int",0,p),u("number",0,(function(e){return parseFloat(e,10)})),u("map","",h),u("model","",h),u("selector",null,(function(e){return e?"string"!==typeof e?e:"#"!==e[0]||l.test(e)?document.querySelector(e):document.getElementById(e.substring(1)):null}),(function(e){return e.getAttribute?"#"+e.getAttribute("id"):f(e)})),u("selectorAll",null,(function(e){return e?"string"!==typeof e?e:Array.prototype.slice.call(document.querySelectorAll(e),0):null}),(function(e){return e instanceof Array?e.map((function(e){return"#"+e.getAttribute("id")})).join(", "):f(e)})),u("src","",(function(e){return a("`src` property type is deprecated. Use `asset` instead."),h(e)})),u("string","",d,f),u("time",0,p),u("vec2",{x:0,y:0},m,r.stringify),u("vec3",{x:0,y:0,z:0},m,r.stringify),u("vec4",{x:0,y:0,z:0,w:1},m,r.stringify),t.exports.registerPropertyType=u,t.exports.isValidDefaultValue=function(e,t){return("audio"!==e||"string"===typeof t)&&!("array"===e&&!Array.isArray(t))&&("asset"!==e||"string"===typeof t)&&("boolean"!==e||"boolean"===typeof t)&&("color"!==e||"string"===typeof t)&&("int"!==e||"number"===typeof t)&&("number"!==e||"number"===typeof t)&&("map"!==e||"string"===typeof t)&&("model"!==e||"string"===typeof t)&&("selector"!==e||"string"===typeof t||null===t)&&("selectorAll"!==e||"string"===typeof t||null===t)&&("src"!==e||"string"===typeof t)&&("string"!==e||"string"===typeof t)&&("time"!==e||"number"===typeof t)&&("vec2"===e?g(t,2):"vec3"===e?g(t,3):"vec4"!==e||g(t,4))},t.exports.isValidDefaultCoordinate=g},{"../utils/coordinates":200,debug:8}],134:[function(e,t,n){var r=e("./metaTags").inject,i=e("./wakelock"),o=e("./loadingScreen"),a=e("../a-register-element"),s=e("./scenes"),l=e("../system").systems,c=e("../../lib/three"),u=e("../../utils/"),h=e("../a-entity"),d=e("../a-node"),f=e("./postMessage"),p=u.bind,m=u.device.isIOS(),g=u.device.isMobile(),v=u.device.isWebXRAvailable,y=a.registerElement,b=u.debug("core:a-scene:warn");function w(e,t,n,r){return e.parentElement?t?{height:e.parentElement.offsetHeight,width:e.parentElement.offsetWidth}:function(e,t){var n,r,i=window.devicePixelRatio;return r={height:document.body.offsetHeight,width:document.body.offsetWidth},!e||t||-1===e.width&&-1===e.height||r.width*i<e.width&&r.height*i<e.height||(n=r.width/r.height,r.width*i>e.width&&-1!==e.width&&(r.width=Math.round(e.width/i),r.height=Math.round(e.width/n/i)),r.height*i>e.height&&-1!==e.height&&(r.height=Math.round(e.height/i),r.width=Math.round(e.height*n/i))),r}(n,r):{height:0,width:0}}function x(e){var t;function n(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||e.exitVR(),document.activeElement.blur(),document.body.focus()}(t=document.createElement("canvas")).classList.add("a-canvas"),t.dataset.aframeCanvas=!0,e.appendChild(t),document.addEventListener("fullscreenchange",n),document.addEventListener("mozfullscreenchange",n),document.addEventListener("webkitfullscreenchange",n),document.addEventListener("MSFullscreenChange",n),t.addEventListener("touchmove",(function(e){e.preventDefault()})),e.canvas=t,e.emit("render-target-loaded",{target:t}),setTimeout(p(e.resize,e),0)}m&&e("../../utils/ios-orientationchange-blank-bug"),t.exports.AScene=y("a-scene",{prototype:Object.create(h.prototype,{createdCallback:{value:function(){this.clock=new c.Clock,this.isIOS=m,this.isMobile=g,this.hasWebXR=v,this.isAR=!1,this.isScene=!0,this.object3D=new c.Scene;var e=this;this.object3D.onAfterRender=function(t,n,r){e.isPlaying&&e.tock(e.time,e.delta,r)},this.resize=p(this.resize,this),this.render=p(this.render,this),this.systems={},this.systemNames=[],this.time=this.delta=0,this.behaviors={tick:[],tock:[]},this.hasLoaded=!1,this.isPlaying=!1,this.originalHTML=this.innerHTML,this.setAttribute("inspector",""),this.setAttribute("keyboard-shortcuts",""),this.setAttribute("screenshot",""),this.setAttribute("vr-mode-ui",""),this.setAttribute("device-orientation-permission-ui","")}},addFullScreenStyles:{value:function(){document.documentElement.classList.add("a-fullscreen")}},removeFullScreenStyles:{value:function(){document.documentElement.classList.remove("a-fullscreen")}},attachedCallback:{value:function(){var e=this,t=this.hasAttribute("embedded");x(this),this.setupRenderer(),o.setup(this,w),this.resize(),t||this.addFullScreenStyles(),f(this),r(this),i(this),this.onVRPresentChangeBound=p(this.onVRPresentChange,this),window.addEventListener("vrdisplaypresentchange",this.onVRPresentChangeBound),this.enterVRBound=function(){e.enterVR()},this.exitVRBound=function(){e.exitVR()},this.exitVRTrueBound=function(){e.exitVR(!0)},this.pointerRestrictedBound=function(){e.pointerRestricted()},this.pointerUnrestrictedBound=function(){e.pointerUnrestricted()},v||(window.addEventListener("vrdisplaydeactivate",this.exitVRBound),window.addEventListener("vrdisplaydisconnect",this.exitVRTrueBound),window.addEventListener("vrdisplaypointerrestricted",this.pointerRestrictedBound),window.addEventListener("vrdisplaypointerunrestricted",this.pointerUnrestrictedBound)),window.addEventListener("sessionend",this.resize),this.addEventListener("cameraready",(function(){e.attachedCallbackPostCamera()})),this.initSystems(),this.hasWebXR&&navigator.xr&&navigator.xr.addEventListener&&navigator.xr.addEventListener("sessiongranted",(function(){e.enterVR()}))}},attachedCallbackPostCamera:{value:function(){var e=this;window.addEventListener("load",void 0),window.addEventListener("resize",(function(){e.isIOS?setTimeout(e.resize,100):e.resize()})),this.play(),s.push(this)},writable:window.debug},initSystems:{value:function(){var e;for(e in this.initSystem("camera"),l)"camera"!==e&&this.initSystem(e)}},initSystem:{value:function(e){this.systems[e]||(this.systems[e]=new l[e](this),this.systemNames.push(e))}},detachedCallback:{value:function(){var e=s.indexOf(this);s.splice(e,1),window.removeEventListener("vrdisplaypresentchange",this.onVRPresentChangeBound),window.removeEventListener("vrdisplayactivate",this.enterVRBound),window.removeEventListener("vrdisplaydeactivate",this.exitVRBound),window.removeEventListener("vrdisplayconnect",this.enterVRBound),window.removeEventListener("vrdisplaydisconnect",this.exitVRTrueBound),window.removeEventListener("vrdisplaypointerrestricted",this.pointerRestrictedBound),window.removeEventListener("vrdisplaypointerunrestricted",this.pointerUnrestrictedBound),window.removeEventListener("sessionend",this.resize),this.renderer.xr.dispose()}},addBehavior:{value:function(e){var t,n,r=this.behaviors;for(n in r)e[n]&&-1===(t=this.behaviors[n]).indexOf(e)&&t.push(e)}},getPointerLockElement:{value:function(){return document.pointerLockElement},writable:window.debug},checkHeadsetConnected:{value:u.device.checkHeadsetConnected,writable:window.debug},enterAR:{value:function(){var e;if(!this.hasWebXR)throw e="Failed to enter AR mode, WebXR not supported.",new Error(e);if(!u.device.checkARSupport())throw e="Failed to enter AR, WebXR immersive-ar mode not supported in your browser or device.",new Error(e);return this.enterVR(!0)}},enterVR:{value:function(e){var t,n,r=this,i=r.renderer.xr;if(this.is("vr-mode"))return Promise.resolve("Already in VR.");if(this.checkHeadsetConnected()||this.isMobile){if(i.enabled=!0,this.hasWebXR){this.xrSession&&this.xrSession.removeEventListener("end",this.exitVRBound);var o=this.sceneEl.systems.webxr.sessionReferenceSpaceType;i.setReferenceSpaceType(o);var a=e?"immersive-ar":"immersive-vr";return n=this.sceneEl.systems.webxr.sessionConfiguration,new Promise((function(e,t){navigator.xr.requestSession(a,n).then((function(t){r.xrSession=t,i.layersEnabled=-1!==n.requiredFeatures.indexOf("layers"),i.setSession(t),t.addEventListener("end",r.exitVRBound),c(e)}),(function(e){throw new Error("Failed to enter "+("immersive-ar"===a?"AR":"VR")+" mode (`requestSession`) "+e)}))}))}if(t=u.device.getVRDisplay(),i.setDevice(t),t.isPresenting&&!window.hasNativeWebVRImplementation)return c(),Promise.resolve();var s=this.getAttribute("renderer"),l={highRefreshRate:s.highRefreshRate,foveationLevel:s.foveationLevel};return t.requestPresent([{source:this.canvas,attributes:l}]).then(c,(function(e){throw r.removeState("vr-mode"),e&&e.message?new Error("Failed to enter VR mode (`requestPresent`): "+e.message):new Error("Failed to enter VR mode (`requestPresent`).")}))}return c(),Promise.resolve();function c(t){var n,i;window.hasNativeWebVRImplementation&&!window.hasNativeWebXRImplementation&&(n=new CustomEvent("vrdisplaypresentchange",{detail:{display:u.device.getVRDisplay()}}),window.dispatchEvent(n)),e?r.addState("ar-mode"):r.addState("vr-mode"),r.emit("enter-vr",{target:r}),!v&&r.isMobile&&screen.orientation&&screen.orientation.lock&&screen.orientation.lock("landscape"),r.addFullScreenStyles(),r.isMobile||r.checkHeadsetConnected()||((i=r.canvas).requestFullscreen||i.webkitRequestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen).apply(i,[{navigationUI:"hide"}]),r.renderer.setAnimationLoop(r.render),r.resize(),t&&t()}},writable:!0},exitVR:{value:function(){var e,t=this,n=this.renderer.xr;if(!this.is("vr-mode")&&!this.is("ar-mode"))return Promise.resolve("Not in immersive mode.");if(this.checkHeadsetConnected()||this.isMobile){if(n.enabled=!1,e=u.device.getVRDisplay(),this.hasWebXR)this.xrSession.removeEventListener("end",this.exitVRBound),this.xrSession.end().then((function(){}),(function(){})),this.xrSession=void 0,n.setSession(null);else if(e.isPresenting)return e.exitPresent().then(r,(function(e){throw e&&e.message?new Error("Failed to exit VR mode (`exitPresent`): "+e.message):new Error("Failed to exit VR mode (`exitPresent`).")}))}else(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement)&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen());return r(),Promise.resolve();function r(){t.removeState("vr-mode"),t.removeState("ar-mode"),t.isMobile&&screen.orientation&&screen.orientation.unlock&&screen.orientation.unlock(),t.hasAttribute("embedded")&&t.removeFullScreenStyles(),t.resize(),t.isIOS&&u.forceCanvasResizeSafariMobile(t.canvas),t.renderer.setPixelRatio(window.devicePixelRatio),t.emit("exit-vr",{target:t})}},writable:!0},pointerRestricted:{value:function(){if(this.canvas){var e=this.getPointerLockElement();e&&e!==this.canvas&&document.exitPointerLock&&document.exitPointerLock(),this.canvas.requestPointerLock&&this.canvas.requestPointerLock()}}},pointerUnrestricted:{value:function(){var e=this.getPointerLockElement();e&&e===this.canvas&&document.exitPointerLock&&document.exitPointerLock()}},onVRPresentChange:{value:function(e){var t=e.display||e.detail.display;t&&t.isPresenting?this.enterVR():this.exitVR()}},getAttribute:{value:function(e){var t=this.systems[e];return t?t.data:h.prototype.getAttribute.call(this,e)}},getComputedAttribute:{value:function(e){b("`getComputedAttribute` is deprecated. Use `getAttribute` instead."),this.getAttribute(e)}},getDOMAttribute:{value:function(e){var t=this.systems[e];return t?t.data:h.prototype.getDOMAttribute.call(this,e)}},setAttribute:{value:function(e,t,n){var r=this.systems[e];if(r)return d.prototype.setAttribute.call(this,e,t),void r.updateProperties(t);h.prototype.setAttribute.call(this,e,t,n)}},removeBehavior:{value:function(e){var t,n,r,i=this.behaviors;for(n in i)e[n]&&-1!==(r=(t=this.behaviors[n]).indexOf(e))&&t.splice(r,1)}},resize:{value:function(){var e,t,n=this.camera,r=this.canvas,i=this.renderer.xr.isPresenting;e=this.renderer.xr.enabled&&i,!n||!r||this.is("vr-mode")&&(this.isMobile||e)||(t=w(r,this.getAttribute("embedded")&&!this.is("vr-mode"),this.maxCanvasSize,this.is("vr-mode")),n.aspect=t.width/t.height,n.updateProjectionMatrix(),this.renderer.setSize(t.width,t.height,!1),this.emit("rendererresize",null,!1))},writable:!0},setupRenderer:{value:function(){var e,t,n,r,i=this;r={alpha:!0,antialias:!g,canvas:this.canvas,logarithmicDepthBuffer:!1,powerPreference:"high-performance"},this.maxCanvasSize={height:1920,width:1920},this.hasAttribute("renderer")&&(n=this.getAttribute("renderer"),(t=u.styleParser.parse(n)).precision&&(r.precision=t.precision+"p"),t.antialias&&"auto"!==t.antialias&&(r.antialias="true"===t.antialias),t.logarithmicDepthBuffer&&"auto"!==t.logarithmicDepthBuffer&&(r.logarithmicDepthBuffer="true"===t.logarithmicDepthBuffer),t.alpha&&(r.alpha="true"===t.alpha),this.maxCanvasSize={width:t.maxCanvasWidth?parseInt(t.maxCanvasWidth):this.maxCanvasSize.width,height:t.maxCanvasHeight?parseInt(t.maxCanvasHeight):this.maxCanvasSize.height}),(e=this.renderer=new c.WebGLRenderer(r)).setPixelRatio(window.devicePixelRatio),e.sortObjects=!1,this.camera&&e.xr.setPoseTarget(this.camera.el.object3D),this.addEventListener("camera-set-active",(function(){e.xr.setPoseTarget(i.camera.el.object3D)}))},writable:window.debug},play:{value:function(){var e=this,t=this;this.renderStarted?h.prototype.play.call(this):(this.addEventListener("loaded",(function(){var e,n=this.renderer,r=this.renderer.xr;h.prototype.play.call(this),t.renderStarted||(t.resize(),t.renderer&&(window.performance&&window.performance.mark("render-started"),o.remove(),(e=u.device.getVRDisplay())&&e.isPresenting&&(r.setDevice(e),r.enabled=!0,t.enterVR()),n.setAnimationLoop(this.render),t.renderStarted=!0,t.emit("renderstart")))})),setTimeout((function(){h.prototype.load.call(e)})))}},updateComponent:{value:function(e){e in l||h.prototype.updateComponent.apply(this,arguments)}},tick:{value:function(e,t){var n,r=this.systems;for(n=0;n<this.behaviors.tick.length;n++)this.behaviors.tick[n].el.isPlaying&&this.behaviors.tick[n].tick(e,t);for(n=0;n<this.systemNames.length;n++)r[this.systemNames[n]].tick&&r[this.systemNames[n]].tick(e,t)}},tock:{value:function(e,t,n){var r,i=this.systems;for(r=0;r<this.behaviors.tock.length;r++)this.behaviors.tock[r].el.isPlaying&&this.behaviors.tock[r].tock(e,t,n);for(r=0;r<this.systemNames.length;r++)i[this.systemNames[r]].tock&&i[this.systemNames[r]].tock(e,t,n)}},render:{value:function(e,t){var n=this.renderer;this.frame=t,this.delta=1e3*this.clock.getDelta(),this.time=1e3*this.clock.elapsedTime,this.isPlaying&&this.tick(this.time,this.delta);var r=null;this.is("ar-mode")&&(r=this.object3D.background,this.object3D.background=null),n.render(this.object3D,this.camera),r&&(this.object3D.background=r)},writable:!0}})}),t.exports.setupCanvas=x},{"../../lib/three":179,"../../utils/":205,"../../utils/ios-orientationchange-blank-bug":206,"../a-entity":127,"../a-node":129,"../a-register-element":130,"../system":142,"./loadingScreen":135,"./metaTags":136,"./postMessage":137,"./scenes":138,"./wakelock":139}],135:[function(e,t,n){var r,i,o,a=e("../../utils/").styleParser;function s(e){var t=r.hasAttribute("embedded"),n=o(r.canvas,t,r.maxCanvasSize,r.is("vr-mode"));e.aspect=n.width/n.height,e.updateProjectionMatrix(),r.renderer.setSize(n.width,n.height,!1)}t.exports.setup=function(e,t){o=t;var n,l,c,u,h,d,f,p,m,g,v=(r=e).hasAttribute("loading-screen")?a.parse(r.getAttribute("loading-screen")):void 0,y=v&&v.dotsColor||"white",b=v&&v.backgroundColor||"#24CAFF";(void 0===v||"true"===v.enabled||void 0===v.enabled)&&(n=new THREE.Scene,l=new THREE.SphereGeometry(.2,36,18,0,2*Math.PI,0,Math.PI),c=new THREE.MeshBasicMaterial({color:y}),u=new THREE.Mesh(l,c),h=u.clone(),d=u.clone(),f=new THREE.PerspectiveCamera(80,window.innerWidth/window.innerHeight,5e-4,1e4),p=new THREE.Clock,m=0,g=function(){r.renderer.render(n,f),m=p.getElapsedTime()%4,u.visible=m>=1,h.visible=m>=2,d.visible=m>=3},n.background=new THREE.Color(b),n.add(f),u.position.set(-1,0,-15),h.position.set(0,0,-15),d.position.set(1,0,-15),f.add(u),f.add(h),f.add(d),(i=document.createElement("div")).className="a-loader-title",i.innerHTML=document.title,i.style.display="none",r.appendChild(i),setTimeout((function(){r.hasLoaded||(s(f),i.style.display="block",window.addEventListener("resize",(function(){s(f)})),r.renderer.setAnimationLoop(g))}),200))},t.exports.remove=function(){window.removeEventListener("resize",s),i&&(i.style.display="none")}},{"../../utils/":205}],136:[function(e,t,n){var r,i=e("../../constants/"),o=e("../../utils").extend,a=t.exports.MOBILE_HEAD_TAGS=[l({name:"viewport",content:"width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no,user-scalable=no,minimal-ui,viewport-fit=cover"}),l({name:"mobile-web-app-capable",content:"yes"}),l({name:"theme-color",content:"black"})],s=[l({name:"apple-mobile-web-app-capable",content:"yes"}),l({name:"apple-mobile-web-app-status-bar-style",content:"black"}),(r={rel:"apple-touch-icon",href:"https://aframe.io/images/aframe-logo-152.png"},{tagName:"link",attributes:r,exists:function(){return document.querySelector('link[rel="'+r.rel+'"]')}})];function l(e){return{tagName:"meta",attributes:e,exists:function(){return document.querySelector('meta[name="'+e.name+'"]')}}}t.exports.inject=function(e){var t,n=document.head,r=n.querySelector("script"),l=[];return a.forEach(c),e.isIOS&&s.forEach(c),l;function c(e){e&&!e.exists()&&(t=function(e){if(e&&e.tagName){var t=document.createElement(e.tagName);return t.setAttribute(i.AFRAME_INJECTED,""),o(t,e.attributes)}}(e))&&(r?r.parentNode.insertBefore(t,r):n.appendChild(t),l.push(t))}}},{"../../constants/":123,"../../utils":205}],137:[function(e,t,n){var r=e("../../utils/bind"),i=e("../../utils/").isIframed;function o(e){if(e.data)switch(e.data.type){case"vr":switch(e.data.data){case"enter":this.enterVR();break;case"exit":this.exitVR()}}}t.exports=function(e){i()&&window.addEventListener("message",r(o,e))}},{"../../utils/":205,"../../utils/bind":199}],138:[function(e,t,n){t.exports=[]},{}],139:[function(e,t,n){var r=e("../../../vendor/wakelock/wakelock");t.exports=function(e){if(e.isMobile){var t=e.wakelock=new r;e.addEventListener("enter-vr",(function(){t.request()})),e.addEventListener("exit-vr",(function(){t.release()}))}}},{"../../../vendor/wakelock/wakelock":220}],140:[function(e,t,n){var r=e("../utils/"),i=e("./propertyTypes"),o=r.debug,a=i.isValidDefaultValue,s=i.propertyTypes,l=o("core:schema:warn");function c(e){return"type"in e?"string"===typeof e.type:"default"in e}function u(e,t){var n,r,i=e.default,o=e.type;return e.type?"bool"===e.type?o="boolean":"float"===e.type&&(o="number"):o=void 0===i||"boolean"!==typeof i&&"number"!==typeof i?Array.isArray(i)?"array":"string":typeof i,(r=s[o])||l("Unknown property type for component `"+t+"`: "+o),n=!!e.parse,e.parse=e.parse||r.parse,e.stringify=e.stringify||r.stringify,e.type=o,"default"in e?n||a(o,i)||l("Default value `"+i+"` does not match type `"+o+"` in component `"+t+"`"):e.default=r.default,e}function h(e,t){return void 0!==e&&null!==e&&""!==e||(e=t.default,Array.isArray(e)&&(e=e.slice())),t.parse(e,t.default)}function d(e,t){return"object"!==typeof e?e:t&&null!==e?t.stringify(e):JSON.stringify(e)}t.exports.isSingleProperty=c,t.exports.process=function(e,t){var n;if(c(e))return u(e,t);for(n in e)e[n]=u(e[n],t);return e},t.exports.processPropertyDefinition=u,t.exports.parseProperties=function(){var e=[];return function(t,n,r,i,o){var a,s,c,u;for(s in e.length=0,r?t:n)r&&void 0===t[s]||e.push(s);if(null===t||"object"!==typeof t)return t;for(s in t)void 0===t[s]||n[s]||o||l("Unknown property `"+s+"` for component/system `"+i+"`.");for(a=0;a<e.length;a++){if(c=n[s=e[a]],u=t[s],!n[s])return;t[s]=h(u,c)}return t}}(),t.exports.parseProperty=h,t.exports.stringifyProperties=function(e,t){var n,r,i,o,a={};for(n in e)r=t[n],"object"===typeof(o=i=e[n])&&(o=d(i,r),r||l("Unknown component property: "+n)),a[n]=o;return a},t.exports.stringifyProperty=d},{"../utils/":205,"./propertyTypes":133}],141:[function(e,t,n){var r=e("./schema").process,i=t.exports.shaders={},o=t.exports.shaderNames=[],a=e("../lib/three"),s=e("../utils"),l={array:"v3",color:"v3",int:"i",number:"f",map:"t",time:"f",vec2:"v2",vec3:"v3",vec4:"v4"},c=t.exports.Shader=function(){};c.prototype={schema:{},vertexShader:"void main() {gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);}",fragmentShader:"void main() {gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);}",init:function(e){return this.attributes=this.initVariables(e,"attribute"),this.uniforms=this.initVariables(e,"uniform"),this.material=new(this.raw?a.RawShaderMaterial:a.ShaderMaterial)({uniforms:this.uniforms,vertexShader:this.vertexShader,fragmentShader:this.fragmentShader}),this.material},initVariables:function(e,t){var n,r,i=this.schema,o={};for(n in i)i[n].is===t&&(r=l[i[n].type],o[n]={type:r,value:void 0});return o},update:function(e){this.updateVariables(e,"attribute"),this.updateVariables(e,"uniform")},updateVariables:function(e,t){var n,r,i,o=this.schema;for(n in i="uniform"===t?this.uniforms:this.attributes,e)if(o[n]&&o[n].is===t)if("map"!==o[n].type)i[n].value=this.parseValue(o[n].type,e[n]),i[n].needsUpdate=!0;else{if(!i[n]||i[n].value===e[n])continue;r="_texture_"+n,this.setMapOnTextureLoad(i,n,r),s.material.updateMapMaterialFromData(r,n,this,e)}},parseValue:function(e,t){var n;switch(e){case"vec2":return new a.Vector2(t.x,t.y);case"vec3":return new a.Vector3(t.x,t.y,t.z);case"vec4":return new a.Vector4(t.x,t.y,t.z,t.w);case"color":return n=new a.Color(t),new a.Vector3(n.r,n.g,n.b);case"map":return a.ImageUtils.loadTexture(t);default:return t}},setMapOnTextureLoad:function(e,t,n){var r=this;this.el.addEventListener("materialtextureloaded",(function(){e[t].value=r.material[n],e[t].needsUpdate=!0}))}},t.exports.registerShader=function(e,t){var n,a={};if(Object.keys(t).forEach((function(e){a[e]={value:t[e],writable:!0}})),i[e])throw new Error("The shader "+e+" has been already registered");return((n=function(){c.call(this)}).prototype=Object.create(c.prototype,a)).name=e,n.prototype.constructor=n,i[e]={Shader:n,schema:r(n.prototype.schema)},o.push(e),n}},{"../lib/three":179,"../utils":205,"./schema":140}],142:[function(e,t,n){var r=e("./component"),i=e("./schema"),o=e("../utils/"),a=i.parseProperties,s=i.parseProperty,l=i.process,c=i.isSingleProperty,u=o.styleParser,h=t.exports.systems={},d=t.exports.System=function(e){var t=r&&r.components[this.name];this.el=e,this.sceneEl=e,t&&(t.Component.prototype.system=this),this.buildData(),this.init(),this.update({})};d.prototype={schema:{},init:function(){},update:function(e){},updateProperties:function(e){var t=this.data;Object.keys(i).length&&(this.buildData(e),this.update(t))},buildData:function(e){var t=this.schema;Object.keys(t).length&&(e=e||window.HTMLElement.prototype.getAttribute.call(this.sceneEl,this.name),c(t)?this.data=s(e,t):this.data=a(u.parse(e)||{},t))},tick:void 0,tock:void 0,play:function(){},pause:function(){}},t.exports.registerSystem=function(e,t){var n,r,i={},a=o.findAllScenes(document);if(Object.keys(t).forEach((function(e){i[e]={value:t[e],writable:!0}})),h[e])throw new Error("The system `"+e+"` has been already registered. Check that you are not loading two versions of the same system or two different systems of the same name.");for(((r=function(e){d.call(this,e)}).prototype=Object.create(d.prototype,i)).name=e,r.prototype.constructor=r,r.prototype.schema=o.extend(l(r.prototype.schema)),h[e]=r,n=0;n<a.length;n++)a[n].initSystem(e)}},{"../utils/":205,"./component":131,"./schema":140}],143:[function(e,t,n){e("./pivot")},{"./pivot":144}],144:[function(e,t,n){var r=e("../../core/component").registerComponent,i=e("../../lib/three"),o=new i.Vector3,a=new i.Vector3;r("pivot",{dependencies:["position"],schema:{type:"vec3"},init:function(){var e=this.data,t=this.el,n=t.object3D.parent,r=t.object3D,s=new i.Group;o.copy(r.position),a.copy(r.rotation),n.remove(r),s.add(r),n.add(s),t.object3D=s,r.position.set(-1*e.x,-1*e.y,-1*e.z),s.position.set(e.x+o.x,e.y+o.y,e.z+o.z),s.rotation.copy(r.rotation),r.rotation.set(0,0,0)}})},{"../../core/component":131,"../../lib/three":179}],145:[function(e,t,n){var r=e("../../core/component").components,i=e("../../core/shader").shaders,o=e("../../utils/"),a={};function s(e){var t=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();"fog"===e&&(t="material-fog"),"visible"===e&&(t="material-visible"),a[t]="material."+e}Object.keys(r.material.schema).forEach(s),Object.keys(i.standard.schema).forEach(s),t.exports=function(){return{defaultComponents:{material:{}},mappings:o.extend({},a)}}},{"../../core/component":131,"../../core/shader":141,"../../utils/":205}],146:[function(e,t,n){e("./primitives/a-camera"),e("./primitives/a-cursor"),e("./primitives/a-curvedimage"),e("./primitives/a-gltf-model"),e("./primitives/a-image"),e("./primitives/a-light"),e("./primitives/a-link"),e("./primitives/a-obj-model"),e("./primitives/a-sky"),e("./primitives/a-sound"),e("./primitives/a-text"),e("./primitives/a-video"),e("./primitives/a-videosphere"),e("./primitives/meshPrimitives")},{"./primitives/a-camera":148,"./primitives/a-cursor":149,"./primitives/a-curvedimage":150,"./primitives/a-gltf-model":151,"./primitives/a-image":152,"./primitives/a-light":153,"./primitives/a-link":154,"./primitives/a-obj-model":155,"./primitives/a-sky":156,"./primitives/a-sound":157,"./primitives/a-text":158,"./primitives/a-video":159,"./primitives/a-videosphere":160,"./primitives/meshPrimitives":161}],147:[function(e,t,n){var r=e("../../core/a-entity"),i=e("../../core/component").components,o=e("../../core/a-register-element").registerElement,a=e("../../utils/"),s=a.debug,l=a.entity.setComponentProperty,c=s("extras:primitives:debug"),u=s("extras:primitives:warn"),h=t.exports.primitives={};t.exports.registerPrimitive=function(e,t){e=e.toLowerCase(),c("Registering <%s>",e),t.defaultAttributes&&u("The 'defaultAttributes' object is deprecated. Use 'defaultComponents' instead.");var n=o(e,{prototype:Object.create(r.prototype,{defaultComponentsFromPrimitive:{value:t.defaultComponents||t.defaultAttributes||{}},deprecated:{value:t.deprecated||null},deprecatedMappings:{value:t.deprecatedMappings||{}},mappings:{value:t.mappings||{}},createdCallback:{value:function(){t.deprecated&&console.warn(t.deprecated),this.resolveMappingCollisions()}},resolveMappingCollisions:{value:function(){var e=this.mappings,t=this;Object.keys(e).forEach((function(n){var r;n!==n.toLowerCase()&&u("Mapping keys should be specified in lower case. The mapping key "+n+" may not be recognized"),i[n]&&(r=e[n].replace(".","-"),e[r]=e[n],delete e[n],console.warn("The primitive "+t.tagName.toLowerCase()+" has a mapping collision. The attribute "+n+" has the same name as a registered component and has been renamed to "+r))}))}},getExtraComponents:{value:function(){var e,t,n,r,i,o,s=this;for(t=a.clone(this.defaultComponentsFromPrimitive),(i=this.getAttribute("mixin"))&&(i=i.trim().split(" ")).forEach((function(e){var n=s.sceneEl.querySelector("#"+e).componentCache;Object.keys(n).forEach((function(e){var r,i;t[e]=(r=t[e],i=n[e],l(r)?c(i):l(i)?c(r):u(r)&&u(i)?a.extendDeep(r,i):c(i))}))})),n=0;n<this.attributes.length;n++)e=this.attributes[n],(r=this.mappings[e.name])&&((o=a.entity.getComponentPropertyPath(r)).constructor===Array?(t[o[0]]=t[o[0]]||{},t[o[0]][o[1]]=e.value.trim()):t[o]=e.value.trim());return t;function l(e){return"undefined"===typeof e}function c(e){return u(e)?a.extendDeep({},e):e}function u(e){return null!==e&&e.constructor===Object}}},attributeChangedCallback:{value:function(e,t,n){var r=this.mappings[e];e in this.deprecatedMappings&&console.warn(this.deprecatedMappings[e]),e&&r&&l(this,r,n)}}})});return h[e]=n,n},t.exports.definePrimitive=function(e,n,r){r=r||{},Object.keys(n).map((function(e){!function(e,t){var n=i[e].schema;Object.keys(n).map((function(n){var r=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();void 0!==t[r]&&(r=e+"-"+n),t[r]=e+"."+n}))}(e,r)})),t.exports.registerPrimitive(e,a.extendDeep({},null,{defaultComponents:n,mappings:r}))}},{"../../core/a-entity":127,"../../core/a-register-element":130,"../../core/component":131,"../../utils/":205}],148:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-camera",{defaultComponents:{camera:{},"look-controls":{},"wasd-controls":{},position:{x:0,y:1.6,z:0}},mappings:{active:"camera.active",far:"camera.far",fov:"camera.fov","look-controls-enabled":"look-controls.enabled",near:"camera.near","pointer-lock-enabled":"look-controls.pointerLockEnabled","wasd-controls-enabled":"wasd-controls.enabled","reverse-mouse-drag":"look-controls.reverseMouseDrag",zoom:"camera.zoom"}})},{"../primitives":147}],149:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-cursor",e("../../../utils/").extendDeep({},r(),{defaultComponents:{cursor:{},geometry:{primitive:"ring",radiusOuter:.016,radiusInner:.01,segmentsTheta:32},material:{color:"#000",shader:"flat",opacity:.8},position:{x:0,y:0,z:-1}},mappings:{far:"raycaster.far",fuse:"cursor.fuse","fuse-timeout":"cursor.fuseTimeout",interval:"raycaster.interval",objects:"raycaster.objects"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],150:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-curvedimage",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{height:1,primitive:"cylinder",radius:2,segmentsRadial:48,thetaLength:270,openEnded:!0,thetaStart:0},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0,repeat:"-1 1"}},mappings:{height:"geometry.height","open-ended":"geometry.openEnded",radius:"geometry.radius",segments:"geometry.segmentsRadial",start:"geometry.thetaStart","theta-length":"geometry.thetaLength","theta-start":"geometry.thetaStart",width:"geometry.thetaLength"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],151:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-gltf-model",{mappings:{src:"gltf-model"}})},{"../primitives":147}],152:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-image",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],153:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-light",{defaultComponents:{light:{}},mappings:{angle:"light.angle",color:"light.color","ground-color":"light.groundColor",decay:"light.decay",distance:"light.distance",intensity:"light.intensity",penumbra:"light.penumbra",type:"light.type",target:"light.target"}})},{"../primitives":147}],154:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-link",{defaultComponents:{link:{visualAspectEnabled:!0}},mappings:{href:"link.href",image:"link.image",title:"link.title"}})},{"../primitives":147}],155:[function(e,t,n){var r=e("../getMeshMixin")();(0,e("../primitives").registerPrimitive)("a-obj-model",e("../../../utils/").extendDeep({},r,{defaultComponents:{"obj-model":{}},mappings:{src:"obj-model.obj",mtl:"obj-model.mtl"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],156:[function(e,t,n){var r=e("../getMeshMixin"),i=e("../primitives").registerPrimitive,o=e("../../../utils/"),a=e("./meshPrimitives");i("a-sky",o.extendDeep({},r(),{defaultComponents:{geometry:{primitive:"sphere",radius:500,segmentsWidth:64,segmentsHeight:32},material:{color:"#FFF",side:"back",shader:"flat",npot:!0},scale:"-1 1 1"},mappings:o.extendDeep({},a["a-sphere"].prototype.mappings)}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147,"./meshPrimitives":161}],157:[function(e,t,n){(0,e("../primitives").registerPrimitive)("a-sound",{defaultComponents:{sound:{}},mappings:{src:"sound.src",on:"sound.on",autoplay:"sound.autoplay",loop:"sound.loop",volume:"sound.volume"}})},{"../primitives":147}],158:[function(e,t,n){(0,e("../primitives").definePrimitive)("a-text",{text:{anchor:"align",width:5}})},{"../primitives":147}],159:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-video",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],160:[function(e,t,n){var r=e("../getMeshMixin");(0,e("../primitives").registerPrimitive)("a-videosphere",e("../../../utils/").extendDeep({},r(),{defaultComponents:{geometry:{primitive:"sphere",radius:500,segmentsWidth:64,segmentsHeight:32},material:{color:"#FFF",shader:"flat",side:"back",npot:!0},scale:"-1 1 1"},mappings:{radius:"geometry.radius","segments-height":"geometry.segmentsHeight","segments-width":"geometry.segmentsWidth"}}))},{"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],161:[function(e,t,n){var r=e("../getMeshMixin"),i=e("../../../core/geometry").geometries,o=e("../../../core/geometry").geometryNames,a=e("../primitives").registerPrimitive,s=e("../../../utils/"),l=t.exports={};function c(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}o.forEach((function(e){var t=i[e],n=c(e),o={};Object.keys(t.schema).forEach((function(e){o[c(e)]="geometry."+e}));var u="a-"+n,h=a(u,s.extendDeep({},r(),{defaultComponents:{geometry:{primitive:e}},mappings:o}));l[u]=h}))},{"../../../core/geometry":132,"../../../utils/":205,"../getMeshMixin":145,"../primitives":147}],162:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("box",{schema:{depth:{default:1,min:0},height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:"int"},segmentsWidth:{default:1,min:1,max:20,type:"int"},segmentsDepth:{default:1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new i.BoxGeometry(e.width,e.height,e.depth,e.segmentsWidth,e.segmentsHeight,e.segmentsDepth)}})},{"../core/geometry":132,"../lib/three":179}],163:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("circle",{schema:{radius:{default:1,min:0},segments:{default:32,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CircleGeometry(e.radius,e.segments,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],164:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("cone",{schema:{height:{default:1,min:0},openEnded:{default:!1},radiusBottom:{default:1,min:0},radiusTop:{default:.01,min:0},segmentsHeight:{default:18,min:1,type:"int"},segmentsRadial:{default:36,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CylinderGeometry(e.radiusTop,e.radiusBottom,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],165:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("cylinder",{schema:{height:{default:1,min:0},openEnded:{default:!1},radius:{default:1,min:0},segmentsHeight:{default:18,min:1,type:"int"},segmentsRadial:{default:36,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.CylinderGeometry(e.radius,e.radius,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],166:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("dodecahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.DodecahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],167:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("icosahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.IcosahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],168:[function(e,t,n){e("./box.js"),e("./circle.js"),e("./cone.js"),e("./cylinder.js"),e("./dodecahedron.js"),e("./icosahedron.js"),e("./octahedron.js"),e("./plane.js"),e("./ring.js"),e("./sphere.js"),e("./tetrahedron.js"),e("./torus.js"),e("./torusKnot.js"),e("./triangle.js")},{"./box.js":162,"./circle.js":163,"./cone.js":164,"./cylinder.js":165,"./dodecahedron.js":166,"./icosahedron.js":167,"./octahedron.js":169,"./plane.js":170,"./ring.js":171,"./sphere.js":172,"./tetrahedron.js":173,"./torus.js":174,"./torusKnot.js":175,"./triangle.js":176}],169:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("octahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.OctahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],170:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("plane",{schema:{height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:"int"},segmentsWidth:{default:1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new i.PlaneGeometry(e.width,e.height,e.segmentsWidth,e.segmentsHeight)}})},{"../core/geometry":132,"../lib/three":179}],171:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("ring",{schema:{radiusInner:{default:.8,min:0},radiusOuter:{default:1.2,min:0},segmentsPhi:{default:10,min:1,type:"int"},segmentsTheta:{default:32,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new i.RingGeometry(e.radiusInner,e.radiusOuter,e.segmentsTheta,e.segmentsPhi,o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],172:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("sphere",{schema:{radius:{default:1,min:0},phiLength:{default:360},phiStart:{default:0,min:0},thetaLength:{default:180,min:0},thetaStart:{default:0},segmentsHeight:{default:18,min:2,type:"int"},segmentsWidth:{default:36,min:3,type:"int"}},init:function(e){this.geometry=new i.SphereGeometry(e.radius,e.segmentsWidth,e.segmentsHeight,o(e.phiStart),o(e.phiLength),o(e.thetaStart),o(e.thetaLength))}})},{"../core/geometry":132,"../lib/three":179}],173:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("tetrahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new i.TetrahedronGeometry(e.radius,e.detail)}})},{"../core/geometry":132,"../lib/three":179}],174:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=i.Math.degToRad;r("torus",{schema:{arc:{default:360},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:36,min:2,type:"int"},segmentsTubular:{default:32,min:3,type:"int"}},init:function(e){this.geometry=new i.TorusGeometry(e.radius,2*e.radiusTubular,e.segmentsRadial,e.segmentsTubular,o(e.arc))}})},{"../core/geometry":132,"../lib/three":179}],175:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three");r("torusKnot",{schema:{p:{default:2,min:1},q:{default:3,min:1},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:8,min:3,type:"int"},segmentsTubular:{default:100,min:3,type:"int"}},init:function(e){this.geometry=new i.TorusKnotGeometry(e.radius,2*e.radiusTubular,e.segmentsTubular,e.segmentsRadial,e.p,e.q)}})},{"../core/geometry":132,"../lib/three":179}],176:[function(e,t,n){var r=e("../core/geometry").registerGeometry,i=e("../lib/three"),o=new i.Quaternion,a=new i.Vector3(0,0,1),s=new i.Vector2,l=new i.Vector2,c=new i.Vector2;r("triangle",{schema:{vertexA:{type:"vec3",default:{x:0,y:.5,z:0}},vertexB:{type:"vec3",default:{x:-.5,y:-.5,z:0}},vertexC:{type:"vec3",default:{x:.5,y:-.5,z:0}}},init:function(e){var t,n,r,u,h,d,f,p,m;(r=new i.Triangle).a.set(e.vertexA.x,e.vertexA.y,e.vertexA.z),r.b.set(e.vertexB.x,e.vertexB.y,e.vertexB.z),r.c.set(e.vertexC.x,e.vertexC.y,e.vertexC.z),n=r.getNormal(new i.Vector3),o.setFromUnitVectors(n,a),u=r.a.clone().applyQuaternion(o),h=r.b.clone().applyQuaternion(o),d=r.c.clone().applyQuaternion(o),s.set(Math.min(u.x,h.x,d.x),Math.min(u.y,h.y,d.y)),l.set(Math.max(u.x,h.x,d.x),Math.max(u.y,h.y,d.y)),c.set(0,0).subVectors(l,s),u=(new i.Vector2).subVectors(u,s).divide(c),h=(new i.Vector2).subVectors(h,s).divide(c),d=(new i.Vector2).subVectors(d,s).divide(c),t=this.geometry=new i.BufferGeometry,f=[r.a.x,r.a.y,r.a.z,r.b.x,r.b.y,r.b.z,r.c.x,r.c.y,r.c.z],p=[n.x,n.y,n.z,n.x,n.y,n.z,n.x,n.y,n.z],m=[u.x,u.y,h.x,h.y,d.x,d.y],t.setAttribute("position",new i.Float32BufferAttribute(f,3)),t.setAttribute("normal",new i.Float32BufferAttribute(p,3)),t.setAttribute("uv",new i.Float32BufferAttribute(m,2))}})},{"../core/geometry":132,"../lib/three":179}],177:[function(e,t,n){if(window.Promise=window.Promise||e("promise-polyfill"),window.hasNativeWebVRImplementation=!!window.navigator.getVRDisplays||!!window.navigator.getVRDevices,window.hasNativeWebXRImplementation=void 0!==navigator.xr,!window.hasNativeWebXRImplementation&&!window.hasNativeWebVRImplementation){var r=e("./utils/isIOSOlderThan10")(window.navigator.userAgent)?1/window.devicePixelRatio:1,i=e("webvr-polyfill"),o={BUFFER_SCALE:r,CARDBOARD_UI_DISABLED:!0,ROTATE_INSTRUCTIONS_DISABLED:!0,MOBILE_WAKE_LOCK:!!window.cordova};window.webvrpolyfill=new i(o)}var a=e("./utils/"),s=a.debug;a.isIE11&&(e("custom-event-polyfill"),e("../vendor/starts-with-polyfill"));var l=s("A-Frame:error"),c=s("A-Frame:warn");window.document.currentScript&&window.document.currentScript.parentNode!==window.document.head&&!window.debug&&c("Put the A-Frame <script> tag in the <head> of the HTML *before* the scene to ensure everything for A-Frame is properly registered before they are used from HTML."),window.cordova||"file:"!==window.location.protocol||l("This HTML file is currently being served via the file:// protocol. Assets, textures, and models WILL NOT WORK due to cross-origin policy! Please use a local or hosted server: https://aframe.io/docs/0.5.0/introduction/getting-started.html#using-a-local-server."),e("present"),a.device.isBrowserEnvironment&&(e("./style/aframe.css"),e("./style/rStats.css"));var u=e("./core/scene/a-scene").AScene,h=e("./core/component").components,d=e("./core/component").registerComponent,f=e("./core/geometry").registerGeometry,p=e("./extras/primitives/primitives").registerPrimitive,m=e("./core/shader").registerShader,g=e("./core/system").registerSystem,v=e("./core/shader").shaders,y=e("./core/system").systems,b=window.THREE=e("./lib/three"),w=e("../package");e("./components/index"),e("./geometries/index"),e("./shaders/index"),e("./systems/index");var x=e("./core/a-node"),_=e("./core/a-entity");e("./core/a-assets"),e("./core/a-cubemap"),e("./core/a-mixin"),e("./extras/components/"),e("./extras/primitives/"),console.log("A-Frame Version: 1.2.0 (Date 2021-02-05, Commit #b220fa00)"),console.log("THREE Version (https://github.com/supermedium/three.js):",w.dependencies["super-three"]),console.log("WebVR Polyfill Version:",w.dependencies["webvr-polyfill"]),t.exports=window.AFRAME={AComponent:e("./core/component").Component,AEntity:_,ANode:x,ANIME:e("super-animejs"),AScene:u,components:h,coreComponents:Object.keys(h),geometries:e("./core/geometry").geometries,registerComponent:d,registerElement:e("./core/a-register-element").registerElement,registerGeometry:f,registerPrimitive:p,registerShader:m,registerSystem:g,primitives:{getMeshMixin:e("./extras/primitives/getMeshMixin"),primitives:e("./extras/primitives/primitives").primitives},scenes:e("./core/scene/scenes"),schema:e("./core/schema"),shaders:v,systems:y,THREE:b,utils:a,version:w.version}},{"../package":73,"../vendor/starts-with-polyfill":218,"./components/index":84,"./core/a-assets":125,"./core/a-cubemap":126,"./core/a-entity":127,"./core/a-mixin":128,"./core/a-node":129,"./core/a-register-element":130,"./core/component":131,"./core/geometry":132,"./core/scene/a-scene":134,"./core/scene/scenes":138,"./core/schema":140,"./core/shader":141,"./core/system":142,"./extras/components/":143,"./extras/primitives/":146,"./extras/primitives/getMeshMixin":145,"./extras/primitives/primitives":147,"./geometries/index":168,"./lib/three":179,"./shaders/index":181,"./style/aframe.css":186,"./style/rStats.css":187,"./systems/index":191,"./utils/":205,"./utils/isIOSOlderThan10":208,"custom-event-polyfill":7,present:48,"promise-polyfill":50,"super-animejs":56,"webvr-polyfill":68}],178:[function(e,t,n){window.aframeStats=function(e){var t=null,n=e;return{update:function(){t("te").set(function(){var e=n.querySelectorAll("*");return Array.prototype.slice.call(e).filter((function(e){return e.isEntity})),e.length}()),window.performance.getEntriesByName&&t("lt").set(window.performance.getEntriesByName("render-started")[0].startTime.toFixed(0))},start:function(){},end:function(){},attach:function(e){t=e},values:{te:{caption:"Entities"},lt:{caption:"Load Time"}},groups:[{caption:"A-Frame",values:["te","lt"]}],fractions:[]}},"object"===typeof t&&(t.exports={aframeStats:window.aframeStats})},{}],179:[function(e,t,r){(function(n){var r=n.THREE=e("super-three");r.TextureLoader&&(r.TextureLoader.prototype.crossOrigin="anonymous"),r.ImageLoader&&(r.ImageLoader.prototype.crossOrigin="anonymous"),r.Cache&&(r.Cache.enabled=!0),e("../../vendor/DeviceOrientationControls"),e("super-three/examples/js/loaders/DRACOLoader"),e("super-three/examples/js/loaders/GLTFLoader"),e("super-three/examples/js/loaders/OBJLoader"),e("super-three/examples/js/loaders/MTLLoader"),e("super-three/examples/js/utils/BufferGeometryUtils"),r.DRACOLoader.prototype.crossOrigin="anonymous",r.GLTFLoader.prototype.crossOrigin="anonymous",r.MTLLoader.prototype.crossOrigin="anonymous",r.OBJLoader.prototype.crossOrigin="anonymous",t.exports=r}).call(this,"undefined"!==typeof n?n:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{"../../vendor/DeviceOrientationControls":215,"super-three":57,"super-three/examples/js/loaders/DRACOLoader":58,"super-three/examples/js/loaders/GLTFLoader":59,"super-three/examples/js/loaders/MTLLoader":60,"super-three/examples/js/loaders/OBJLoader":61,"super-three/examples/js/utils/BufferGeometryUtils":62}],180:[function(e,t,n){var r=e("../core/shader").registerShader,i=e("../lib/three"),o=e("../utils/");function a(e,t){return t.color.set(e.color),t.fog=e.fog,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,t}t.exports.Shader=r("flat",{schema:{color:{type:"color"},fog:{default:!0},height:{default:256},offset:{type:"vec2",default:{x:0,y:0}},repeat:{type:"vec2",default:{x:1,y:1}},src:{type:"map"},width:{default:512},wireframe:{default:!1},wireframeLinewidth:{default:2}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new i.Color},this.textureSrc=null,a(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.material=new i.MeshBasicMaterial(this.materialData),o.material.updateMap(this,e)},update:function(e){this.updateMaterial(e),o.material.updateMap(this,e)},updateMaterial:function(e){var t;for(t in a(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.materialData)this.material[t]=this.materialData[t]}})},{"../core/shader":141,"../lib/three":179,"../utils/":205}],181:[function(e,t,n){e("./flat"),e("./standard"),e("./sdf"),e("./msdf"),e("./ios10hls")},{"./flat":180,"./ios10hls":182,"./msdf":183,"./sdf":184,"./standard":185}],182:[function(e,t,n){var r=e("../core/shader").registerShader;t.exports.Shader=r("ios10hls",{schema:{src:{type:"map",is:"uniform"},opacity:{type:"number",is:"uniform",default:1}},vertexShader:["varying vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),fragmentShader:["uniform sampler2D src;","uniform float opacity;","varying vec2 vUV;","void main() {"," vec2 offset = vec2(0, 0);"," vec2 repeat = vec2(1, 1);"," vec4 color = texture2D(src, vec2(vUV.x / repeat.x + offset.x, (1.0 - vUV.y) / repeat.y + offset.y)).bgra;"," gl_FragColor = vec4(color.rgb, opacity);","}"].join("\n")})},{"../core/shader":141}],183:[function(e,t,n){var r=e("../core/shader").registerShader,i=!!document.createElement("canvas").getContext("webgl2"),o=["attribute vec2 uv;","attribute vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","varying vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),a=["#version 300 es","in vec2 uv;","in vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","out vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),s=i?a:o,l=["#ifdef GL_OES_standard_derivatives","#extension GL_OES_standard_derivatives: enable","#endif","precision highp float;","uniform bool negate;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","varying vec2 vUV;","float median(float r, float g, float b) {"," return max(min(r, g), min(max(r, g), b));","}","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","void main() {"," vec3 sampleColor = texture2D(map, vUV).rgb;"," if (negate) { sampleColor = 1.0 - sampleColor; }"," float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;"," float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," // Do modified alpha test."," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);"," }"," // Do modified alpha test."," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," gl_FragColor = vec4(color.xyz, alpha * opacity);","}"].join("\n"),c=["#version 300 es","precision highp float;","uniform bool negate;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","in vec2 vUV;","out vec4 fragColor;","float median(float r, float g, float b) {"," return max(min(r, g), min(max(r, g), b));","}","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","void main() {"," vec3 sampleColor = texture(map, vUV).rgb;"," if (negate) { sampleColor = 1.0 - sampleColor; }"," float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;"," float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," // Do modified alpha test."," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);"," }"," // Do modified alpha test."," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," fragColor = vec4(color.xyz, alpha * opacity);","}"].join("\n"),u=i?c:l;t.exports.Shader=r("msdf",{schema:{alphaTest:{type:"number",is:"uniform",default:.5},color:{type:"color",is:"uniform",default:"white"},map:{type:"map",is:"uniform"},negate:{type:"boolean",is:"uniform",default:!0},opacity:{type:"number",is:"uniform",default:1}},raw:!0,vertexShader:s,fragmentShader:u})},{"../core/shader":141}],184:[function(e,t,n){var r=e("../core/shader").registerShader;t.exports.Shader=r("sdf",{schema:{alphaTest:{type:"number",is:"uniform",default:.5},color:{type:"color",is:"uniform",default:"white"},map:{type:"map",is:"uniform"},opacity:{type:"number",is:"uniform",default:1}},raw:!0,vertexShader:["#version 300 es","in vec2 uv;","in vec3 position;","uniform mat4 projectionMatrix;","uniform mat4 modelViewMatrix;","out vec2 vUV;","void main(void) {"," gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);"," vUV = uv;","}"].join("\n"),fragmentShader:["#version 300 es","precision highp float;","uniform float alphaTest;","uniform float opacity;","uniform sampler2D map;","uniform vec3 color;","in vec2 vUV;","out vec4 fragColor;","#ifdef GL_OES_standard_derivatives"," float contour(float width, float value) {"," return smoothstep(0.5 - value, 0.5 + value, width);"," }","#else"," float aastep(float value, float afwidth) {"," return smoothstep(0.5 - afwidth, 0.5 + afwidth, value);"," }","#endif","#define BIG_ENOUGH 0.001","#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)","#define ALL_SMOOTH 0.4","#define ALL_ROUGH 0.02","#define DISCARD_ALPHA (alphaTest / (2.2 - 1.2 * ratio))","void main() {"," #ifdef GL_OES_standard_derivatives"," vec2 uv = vUV;"," vec4 texColor = texture(map, uv);"," float dist = texColor.a;"," float width = fwidth(dist);"," float alpha = contour(dist, width);"," float dscale = 0.353505;"," vec2 duv = dscale * (dFdx(uv) + dFdy(uv));"," float isBigEnough = max(abs(duv.x), abs(duv.y));"," if (isBigEnough > BIG_ENOUGH) {"," float ratio = BIG_ENOUGH / isBigEnough;"," alpha = ratio * alpha + (1.0 - ratio) * dist;"," }"," if (isBigEnough <= BIG_ENOUGH) {"," vec4 box = vec4 (uv - duv, uv + duv);"," alpha = (alpha + 0.5 * ("," contour(texture(map, box.xy).a, width)"," + contour(texture(map, box.zw).a, width)"," + contour(texture(map, box.xw).a, width)"," + contour(texture(map, box.zy).a, width)"," )) / 3.0;"," }"," if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }"," #else"," vec4 texColor = texture(map, vUV);"," float value = texColor.a;"," float afwidth = (1.0 / 32.0) * (1.4142135623730951 / (2.0 * gl_FragCoord.w));"," float alpha = aastep(value, afwidth);"," float ratio = (gl_FragCoord.w >= ALL_SMOOTH) ? 1.0 : (gl_FragCoord.w < ALL_ROUGH) ? 0.0 : (gl_FragCoord.w - ALL_ROUGH) / (ALL_SMOOTH - ALL_ROUGH);"," if (alpha < alphaTest) { if (ratio >= 1.0) { discard; return; } alpha = 0.0; }"," alpha = alpha * ratio + (1.0 - ratio) * value;"," if (ratio < 1.0 && alpha <= DISCARD_ALPHA) { discard; return; }"," #endif"," fragColor = vec4(color, opacity * alpha);","}"].join("\n")})},{"../core/shader":141}],185:[function(e,t,n){var r=e("../core/shader").registerShader,i=e("../lib/three"),o=e("../utils/"),a=new i.CubeTextureLoader,s={};function l(e,t){return t.color.set(e.color),t.emissive.set(e.emissive),t.emissiveIntensity=e.emissiveIntensity,t.fog=e.fog,t.metalness=e.metalness,t.roughness=e.roughness,t.wireframe=e.wireframe,t.wireframeLinewidth=e.wireframeLinewidth,e.normalMap&&(t.normalScale=e.normalScale),e.ambientOcclusionMap&&(t.aoMapIntensity=e.ambientOcclusionMapIntensity),e.displacementMap&&(t.displacementScale=e.displacementScale,t.displacementBias=e.displacementBias),t}t.exports.Shader=r("standard",{schema:{ambientOcclusionMap:{type:"map"},ambientOcclusionMapIntensity:{default:1},ambientOcclusionTextureOffset:{type:"vec2"},ambientOcclusionTextureRepeat:{type:"vec2",default:{x:1,y:1}},color:{type:"color"},displacementMap:{type:"map"},displacementScale:{default:1},displacementBias:{default:.5},displacementTextureOffset:{type:"vec2"},displacementTextureRepeat:{type:"vec2",default:{x:1,y:1}},emissive:{type:"color",default:"#000"},emissiveIntensity:{default:1},envMap:{default:""},fog:{default:!0},height:{default:256},metalness:{default:0,min:0,max:1},metalnessMap:{type:"map"},metalnessTextureOffset:{type:"vec2"},metalnessTextureRepeat:{type:"vec2",default:{x:1,y:1}},normalMap:{type:"map"},normalScale:{type:"vec2",default:{x:1,y:1}},normalTextureOffset:{type:"vec2"},normalTextureRepeat:{type:"vec2",default:{x:1,y:1}},offset:{type:"vec2",default:{x:0,y:0}},repeat:{type:"vec2",default:{x:1,y:1}},roughness:{default:.5,min:0,max:1},roughnessMap:{type:"map"},roughnessTextureOffset:{type:"vec2"},roughnessTextureRepeat:{type:"vec2",default:{x:1,y:1}},sphericalEnvMap:{type:"map"},src:{type:"map"},width:{default:512},wireframe:{default:!1},wireframeLinewidth:{default:2}},init:function(e){this.rendererSystem=this.el.sceneEl.systems.renderer,this.materialData={color:new i.Color,emissive:new i.Color},l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.rendererSystem.applyColorCorrection(this.materialData.emissive),this.material=new i.MeshStandardMaterial(this.materialData),o.material.updateMap(this,e),e.normalMap&&o.material.updateDistortionMap("normal",this,e),e.displacementMap&&o.material.updateDistortionMap("displacement",this,e),e.ambientOcclusionMap&&o.material.updateDistortionMap("ambientOcclusion",this,e),e.metalnessMap&&o.material.updateDistortionMap("metalness",this,e),e.roughnessMap&&o.material.updateDistortionMap("roughness",this,e),this.updateEnvMap(e)},update:function(e){this.updateMaterial(e),o.material.updateMap(this,e),e.normalMap&&o.material.updateDistortionMap("normal",this,e),e.displacementMap&&o.material.updateDistortionMap("displacement",this,e),e.ambientOcclusionMap&&o.material.updateDistortionMap("ambientOcclusion",this,e),e.metalnessMap&&o.material.updateDistortionMap("metalness",this,e),e.roughnessMap&&o.material.updateDistortionMap("roughness",this,e),this.updateEnvMap(e)},updateMaterial:function(e){var t,n=this.material;for(t in l(e,this.materialData),this.rendererSystem.applyColorCorrection(this.materialData.color),this.rendererSystem.applyColorCorrection(this.materialData.emissive),this.materialData)n[t]=this.materialData[t]},updateEnvMap:function(e){var t=this,n=this.material,r=e.envMap,l=e.sphericalEnvMap;if(!r&&!l||this.isLoadingEnvMap)return n.envMap=null,void(n.needsUpdate=!0);this.isLoadingEnvMap=!0,l?this.el.sceneEl.systems.material.loadTexture(l,{src:l},(function(e){t.isLoadingEnvMap=!1,e.mapping=i.SphericalReflectionMapping,n.envMap=e,o.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):s[r]?s[r].then((function(e){t.isLoadingEnvMap=!1,n.envMap=e,o.material.handleTextureEvents(t.el,e),n.needsUpdate=!0})):s[r]=new Promise((function(e){o.srcLoader.validateCubemapSrc(r,(function(r){a.load(r,(function(r){t.isLoadingEnvMap=!1,n.envMap=r,o.material.handleTextureEvents(t.el,r),e(r)}))}))}))}})},{"../core/shader":141,"../lib/three":179,"../utils/":205}],186:[function(e,t,n){var r="html.a-fullscreen{bottom:0;left:0;position:fixed;right:0;top:0}html.a-fullscreen body{height:100%;margin:0;overflow:hidden;padding:0;width:100%}html.a-fullscreen .a-canvas{width:100%!important;height:100%!important;top:0!important;left:0!important;right:0!important;bottom:0!important;position:fixed!important}html:not(.a-fullscreen) .a-enter-ar,html:not(.a-fullscreen) .a-enter-vr{right:5px;bottom:5px}:-webkit-full-screen{background-color:transparent}.a-hidden{display:none!important}.a-canvas{height:100%;left:0;position:absolute;top:0;width:100%}.a-canvas.a-grab-cursor:hover{cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}canvas.a-canvas.a-mouse-cursor-hover:hover{cursor:pointer}.a-inspector-loader{background-color:#ed3160;position:fixed;left:3px;top:3px;padding:6px 10px;color:#fff;text-decoration:none;font-size:12px;font-family:Roboto,sans-serif;text-align:center;z-index:99999;width:204px}@keyframes dots-1{from{opacity:0}25%{opacity:1}}@keyframes dots-2{from{opacity:0}50%{opacity:1}}@keyframes dots-3{from{opacity:0}75%{opacity:1}}@-webkit-keyframes dots-1{from{opacity:0}25%{opacity:1}}@-webkit-keyframes dots-2{from{opacity:0}50%{opacity:1}}@-webkit-keyframes dots-3{from{opacity:0}75%{opacity:1}}.a-inspector-loader .dots span{animation:dots-1 2s infinite steps(1);-webkit-animation:dots-1 2s infinite steps(1)}.a-inspector-loader .dots span:first-child+span{animation-name:dots-2;-webkit-animation-name:dots-2}.a-inspector-loader .dots span:first-child+span+span{animation-name:dots-3;-webkit-animation-name:dots-3}a-scene{display:block;position:relative;height:100%;width:100%}a-assets,a-scene audio,a-scene img,a-scene video{display:none}.a-enter-vr-modal,.a-orientation-modal{font-family:Consolas,Andale Mono,Courier New,monospace}.a-enter-vr-modal a{border-bottom:1px solid #fff;padding:2px 0;text-decoration:none;transition:.1s color ease-in}.a-enter-vr-modal a:hover{background-color:#fff;color:#111;padding:2px 4px;position:relative;left:-4px}.a-enter-ar,.a-enter-vr{font-family:sans-serif,monospace;font-size:13px;width:100%;font-weight:200;line-height:16px;position:absolute;right:20px;bottom:20px}.a-enter-ar{right:80px}.a-enter-vr-button,.a-enter-vr-modal,.a-enter-vr-modal a{color:#fff;user-select:none;outline:0}.a-enter-vr-button{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z' fill='%23fff'/%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z' fill='%23fff'/%3E%3C/svg%3E\") 50% 50% no-repeat rgba(0,0,0,.35)}.a-enter-ar-button{background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z' fill='%23fff'/%3E%3Cpath d='M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z' fill='%23fff'/%3E%3Cpath d='M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z' fill='%23fff'/%3E%3C/svg%3E\") 50% 50% no-repeat rgba(0,0,0,.2)}.a-enter-ar-button,.a-enter-vr-button{background-size:90% 90%;border:0;bottom:0;cursor:pointer;min-width:58px;min-height:34px;padding-right:0;padding-top:0;position:absolute;right:0;transition:background-color .05s ease;-webkit-transition:background-color .05s ease;z-index:9999;border-radius:8px;touch-action:manipulation}.a-enter-ar-button{background-size:100% 90%;margin-right:10px;border-radius:7px}.a-enter-ar-button:active,.a-enter-ar-button:hover,.a-enter-vr-button:active,.a-enter-vr-button:hover{background-color:#ef2d5e}.a-enter-vr-button.resethover{background-color:rgba(0,0,0,.35)}[data-a-enter-vr-no-webvr] .a-enter-vr-button{border-color:#666;opacity:.65}[data-a-enter-vr-no-webvr] .a-enter-vr-button:active,[data-a-enter-vr-no-webvr] .a-enter-vr-button:hover{background-color:rgba(0,0,0,.35);cursor:not-allowed}.a-enter-vr-modal{background-color:#666;border-radius:0;display:none;min-height:32px;margin-right:70px;padding:9px;width:280px;right:2%;position:absolute}.a-enter-vr-modal:after{border-bottom:10px solid transparent;border-left:10px solid #666;border-top:10px solid transparent;display:inline-block;content:'';position:absolute;right:-5px;top:5px;width:0;height:0}.a-enter-vr-modal a,.a-enter-vr-modal p{display:inline}.a-enter-vr-modal p{margin:0}.a-enter-vr-modal p:after{content:' '}[data-a-enter-vr-no-headset].a-enter-vr:hover .a-enter-vr-modal,[data-a-enter-vr-no-webvr].a-enter-vr:hover .a-enter-vr-modal{display:block}.a-orientation-modal{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E) center/50% 50% no-repeat rgba(244,244,244,1);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-orientation-modal:after{color:#666;content:\"Insert phone into Cardboard holder.\";display:block;position:absolute;text-align:center;top:70%;transform:translateY(-70%);width:100%}.a-orientation-modal button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E) no-repeat;border:none;height:50px;text-indent:-9999px;width:50px}.a-loader-title{background-color:rgba(0,0,0,.6);font-family:sans-serif,monospace;text-align:center;font-size:20px;height:50px;font-weight:300;line-height:50px;position:absolute;right:0;left:0;top:0;color:#fff}.a-modal{background:0 0/50% 50% rgba(0,0,0,.6);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-dialog{position:relative;left:50%;top:50%;transform:translate(-50%,-50%);z-index:199995;width:300px;height:200px;background-size:contain;background-color:#fff;font-family:sans-serif,monospace;font-size:20px;border-radius:3px;padding:6px}.a-dialog-text-container{width:100%;height:70%;align-self:flex-start;display:flex;justify-content:center;align-content:center;flex-direction:column}.a-dialog-text{display:inline-block;font-weight:400;font-size:14pt;margin:8px}.a-dialog-buttons-container{display:inline-flex;align-self:flex-end;width:100%;height:30%}.a-dialog-button{cursor:pointer;align-self:center;opacity:.9;height:80%;width:50%;font-size:12pt;margin:4px;border-radius:2px;text-align:center;border:none;display:inline-block;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);user-select:none}.a-dialog-permission-button:hover{box-shadow:0 7px 14px rgba(0,0,0,.2),0 2px 2px rgba(0,0,0,.2)}.a-dialog-allow-button{background-color:#00ceff}.a-dialog-deny-button{background-color:#ff005b}.a-dialog-ok-button{background-color:#00ceff;width:100%}";e("browserify-css").createStyle(r,{href:"src/style/aframe.css"}),t.exports=r},{"browserify-css":4}],187:[function(e,t,n){var r=".rs-base{background-color:#333;color:#fafafa;border-radius:0;font:10px monospace;left:5px;line-height:1em;opacity:.85;overflow:hidden;padding:10px;position:fixed;top:5px;width:300px;z-index:10000}.rs-base div.hidden{display:none}.rs-base h1{color:#fff;cursor:pointer;font-size:1.4em;font-weight:300;margin:0 0 5px;padding:0}.rs-group{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;margin-bottom:5px}.rs-group:last-child{margin-bottom:0}.rs-counter-base{align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;height:10px;-webkit-justify-content:space-between;justify-content:space-between;margin:2px 0}.rs-counter-base.alarm{color:#b70000;text-shadow:0 0 0 #b70000,0 0 1px #fff,0 0 1px #fff,0 0 2px #fff,0 0 2px #fff,0 0 3px #fff,0 0 3px #fff,0 0 4px #fff,0 0 4px #fff}.rs-counter-id{font-weight:300;-webkit-box-ordinal-group:0;-webkit-order:0;order:0;width:54px}.rs-counter-value{font-weight:300;-webkit-box-ordinal-group:1;-webkit-order:1;order:1;text-align:right;width:35px}.rs-canvas{-webkit-box-ordinal-group:2;-webkit-order:2;order:2}@media (min-width:480px){.rs-base{left:20px;top:20px}}";e("browserify-css").createStyle(r,{href:"src/style/rStats.css"}),t.exports=r},{"browserify-css":4}],188:[function(e,t,n){var r=e("../constants/"),i=e("../core/system").registerSystem;t.exports.System=i("camera",{init:function(){this.activeCameraEl=null,this.render=this.render.bind(this),this.unwrapRender=this.unwrapRender.bind(this),this.wrapRender=this.wrapRender.bind(this),this.initialCameraFound=!1,this.numUserCameras=0,this.numUserCamerasChecked=0,this.setupInitialCamera()},setupInitialCamera:function(){var e,t,n=this.sceneEl,r=this;if(!n.camera||n.camera.el.getAttribute("camera").spectator)if((e=n.querySelectorAll("a-camera, [camera]")).length)for(this.numUserCameras=e.length,t=0;t<e.length;t++)e[t].addEventListener("object3dset",(function(e){"camera"===e.detail.type&&r.checkUserCamera(this)})),e[t].isNode?e[t].load():e[t].addEventListener("nodeready",(function(){this.load()}));else this.createDefaultCamera();else n.emit("cameraready",{cameraEl:n.camera.el})},checkUserCamera:function(e){var t,n=this.el.sceneEl;this.numUserCamerasChecked++,this.initialCameraFound||((t=e.getAttribute("camera")).active&&!t.spectator?(this.initialCameraFound=!0,n.camera=e.getObject3D("camera"),n.emit("cameraready",{cameraEl:e})):this.numUserCamerasChecked===this.numUserCameras&&this.createDefaultCamera())},createDefaultCamera:function(){var e,t=this.sceneEl;(e=document.createElement("a-entity")).setAttribute("camera",{active:!0}),e.setAttribute("position",{x:0,y:r.DEFAULT_CAMERA_HEIGHT,z:0}),e.setAttribute("wasd-controls",""),e.setAttribute("look-controls",""),e.setAttribute(r.AFRAME_INJECTED,""),e.addEventListener("object3dset",(function(n){"camera"===n.detail.type&&(t.camera=n.detail.object,t.emit("cameraready",{cameraEl:e}))})),t.appendChild(e)},disableActiveCamera:function(){var e;(e=this.sceneEl.querySelectorAll("[camera]"))[e.length-1].setAttribute("camera","active",!0)},setActiveCamera:function(e){var t,n,r,i,o=this.activeCameraEl,a=this.sceneEl;if((i=e.getObject3D("camera"))&&e!==this.activeCameraEl){var s=a.querySelector("[data-aframe-default-camera]");for(e!==(s&&s.querySelector("[camera]"))&&function(e){var t;e.camera&&(t=e.querySelector("[data-aframe-default-camera]"))&&e.removeChild(t)}(a),this.activeCameraEl=e,this.activeCameraEl.play(),a.camera=i,o&&o.setAttribute("camera","active",!1),n=a.querySelectorAll("[camera]"),r=0;r<n.length;r++)(t=n[r]).isEntity&&e!==t&&(t.setAttribute("camera","active",!1),t.pause());a.emit("camera-set-active",{cameraEl:e})}},setSpectatorCamera:function(e){var t,n=this.spectatorCameraEl,r=this.sceneEl;e.getObject3D("camera")&&e!==this.spectatorCameraEl&&(n&&n.setAttribute("camera","spectator",!1),t=this.spectatorCameraEl=e,r.addEventListener("enter-vr",this.wrapRender),r.addEventListener("exit-vr",this.unwrapRender),t.setAttribute("camera","active",!1),t.play(),r.emit("camera-set-spectator",{cameraEl:e}))},disableSpectatorCamera:function(){this.spectatorCameraEl=void 0},wrapRender:function(){this.spectatorCameraEl&&!this.originalRender&&(this.originalRender=this.sceneEl.renderer.render,this.sceneEl.renderer.render=this.render)},unwrapRender:function(){this.originalRender&&(this.sceneEl.renderer.render=this.originalRender,this.originalRender=void 0)},render:function(e,t){var n,r,i=this.sceneEl;n=i.renderer.xr.enabled,this.originalRender.call(i.renderer,e,t),this.spectatorCameraEl&&!i.isMobile&&n&&(r=this.spectatorCameraEl.components.camera.camera,i.renderer.xr.enabled=!1,this.originalRender.call(i.renderer,e,r),i.renderer.xr.enabled=n)}})},{"../constants/":123,"../core/system":142}],189:[function(e,t,n){var r=e("../core/geometry").geometries,i=e("../core/system").registerSystem;function o(e){var t=e.primitive,n=r[t]&&r[t].Geometry,i=new n;if(!n)throw new Error("Unknown geometry `"+t+"`");return i.init(e),i.geometry}t.exports.System=i("geometry",{init:function(){this.cache={},this.cacheCount={}},clearCache:function(){this.cache={},this.cacheCount={}},getOrCreateGeometry:function(e){var t,n,r=this.cache;return e.skipCache?o(e):(t=r[n=this.hash(e)],function(e,t){e[t]=void 0===e[t]?1:e[t]+1}(this.cacheCount,n),t||(t=o(e),r[n]=t,t))},unuseGeometry:function(e){var t,n=this.cache,r=this.cacheCount;e.skipCache||n[t=this.hash(e)]&&(function(e,t){e[t]--}(r,t),r[t]>0||(n[t].dispose(),delete n[t],delete r[t]))},hash:function(e){return JSON.stringify(e)}})},{"../core/geometry":132,"../core/system":142}],190:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three");t.exports.System=r("gltf-model",{schema:{dracoDecoderPath:{default:""}},init:function(){var e=this.data.dracoDecoderPath;this.dracoLoader=new i.DRACOLoader,this.dracoLoader.setDecoderPath(e)},update:function(){var e;this.dracoLoader||(e=this.data.dracoDecoderPath,this.dracoLoader=new i.DRACOLoader,this.dracoLoader.setDecoderPath(e))},getDRACOLoader:function(){return this.dracoLoader}})},{"../core/system":142,"../lib/three":179}],191:[function(e,t,n){e("./camera"),e("./geometry"),e("./gltf-model"),e("./light"),e("./material"),e("./renderer"),e("./shadow"),e("./tracked-controls-webvr"),e("./tracked-controls-webxr"),e("./webxr")},{"./camera":188,"./geometry":189,"./gltf-model":190,"./light":192,"./material":193,"./renderer":194,"./shadow":195,"./tracked-controls-webvr":196,"./tracked-controls-webxr":197,"./webxr":198}],192:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/bind"),o=e("../constants/");t.exports.System=r("light",{schema:{defaultLightsEnabled:{default:!0}},init:function(){this.defaultLights=!1,this.userDefinedLights=!1,this.sceneEl.addEventListener("loaded",i(this.setupDefaultLights,this))},registerLight:function(e){e.hasAttribute("data-aframe-default-light")||(this.removeDefaultLights(),this.userDefinedLights=!0)},removeDefaultLights:function(){var e,t=this.sceneEl;if(this.defaultLights){e=document.querySelectorAll("[data-aframe-default-light]");for(var n=0;n<e.length;n++)t.removeChild(e[n]);this.defaultLights=!1}},setupDefaultLights:function(){var e,t,n=this.sceneEl;this.userDefinedLights||this.defaultLights||!this.data.defaultLightsEnabled||((e=document.createElement("a-entity")).setAttribute("light",{color:"#BBB",type:"ambient"}),e.setAttribute("data-aframe-default-light",""),e.setAttribute(o.AFRAME_INJECTED,""),n.appendChild(e),(t=document.createElement("a-entity")).setAttribute("light",{color:"#FFF",intensity:.6,castShadow:!0}),t.setAttribute("position",{x:-.5,y:1,z:1}),t.setAttribute("data-aframe-default-light",""),t.setAttribute(o.AFRAME_INJECTED,""),n.appendChild(t),this.defaultLights=!0)}})},{"../constants/":123,"../core/system":142,"../utils/bind":199}],193:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three"),o=e("../utils/"),a=e("../utils/material").isHLS,s=o.bind,l=o.debug,c=l("components:texture:error"),u=new i.TextureLoader,h=l("components:texture:warn");function d(e,t){var n=t.offset||{x:0,y:0},r=t.repeat||{x:1,y:1};!!t.npot&&(e.wrapS=i.ClampToEdgeWrapping,e.wrapT=i.ClampToEdgeWrapping,e.magFilter=i.LinearFilter,e.minFilter=i.LinearFilter),1===r.x&&1===r.y||(e.wrapS=i.RepeatWrapping,e.wrapT=i.RepeatWrapping,e.repeat.set(r.x,r.y)),0===n.x&&0===n.y||e.offset.set(n.x,n.y)}u.setCrossOrigin("anonymous"),t.exports.System=r("material",{init:function(){this.materials={},this.textureCounts={},this.textureCache={},this.sceneEl.addEventListener("materialtextureloaded",s(this.onMaterialTextureLoaded,this))},clearTextureCache:function(){this.textureCache={}},loadTexture:function(e,t,n){var r=this;if("CANVAS"!==e.tagName){if("VIDEO"===e.tagName)return e.src||e.srcObject||e.childElementCount||h("Video element was defined with neither `source` elements nor `src` / `srcObject` attributes."),void this.loadVideo(e,t,n);o.srcLoader.validateSrc(e,(function(e){r.loadImage(e,t,n)}),(function(e){r.loadVideo(e,t,n)}))}else this.loadCanvas(e,t,n)},loadImage:function(e,t,n){var r=this.hash(t),o=this.textureCache;o[r]||(o[r]=function(e,t){return new Promise((function(n,r){function o(e){d(e,t),e.needsUpdate=!0,n(e)}"string"===typeof e?u.load(e,o,(function(){}),(function(e){c("`$s` could not be fetched (Error code: %s; Response: %s)",e.status,e.statusText)})):o(new i.Texture(e))}))}(e,t)),o[r].then(n)},loadCanvas:function(e,t,n){var r;d(r=new i.CanvasTexture(e),t),n(r)},loadVideo:function(e,t,n){var r,o,s,l,c=this.textureCache;function u(e){e.texture.needsUpdate=!0,n(e.texture,e.videoEl)}if("string"!==typeof e){if(s=e,c[r=this.hashVideo(t,s)])return void c[r].then(u);!function(e){e.autoplay=e.hasAttribute("autoplay")&&"false"!==e.getAttribute("autoplay"),e.controls=e.hasAttribute("controls")&&"false"!==e.getAttribute("controls"),"false"===e.getAttribute("loop")&&e.removeAttribute("loop"),"false"===e.getAttribute("preload")&&(e.preload="none"),e.crossOrigin=e.crossOrigin||"anonymous",e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline","")}(s)}s=s||function(e,t,n){var r=document.createElement("video");return r.width=t,r.height=n,r.setAttribute("playsinline",""),r.setAttribute("webkit-playsinline",""),r.autoplay=!0,r.loop=!0,r.crossOrigin="anonymous",r.addEventListener("error",(function(){h("`$s` is not a valid video",e)}),!0),r.src=e,r}(e,t.width,t.height),c[r=this.hashVideo(t,s)]?c[r].then(u):((o=new i.VideoTexture(s)).minFilter=i.LinearFilter,d(o,t),this.sceneEl.isIOS&&a(s.src||s.getAttribute("src"),s.type||s.getAttribute("type"))&&(o.format=i.RGBAFormat,o.needsCorrectionBGRA=!0,o.flipY=!1,o.needsCorrectionFlipY=!0),l={texture:o,videoEl:s},c[r]=Promise.resolve(l),u(l))},hash:function(e){return e.src.tagName&&((e=o.extendDeep({},e)).src=e.src.src),JSON.stringify(e)},hashVideo:function(e,t){return function(e,t){var n,r,i,o=t.getAttribute("id");if(o)return o;for(r="",i=e||{},n=0;n<t.attributes.length;n++)i[t.attributes[n].name]=t.attributes[n].value;return Object.keys(i).sort().forEach((function(e){r+=e+":"+i[e]+";"})),r}(e,t)},registerMaterial:function(e){this.materials[e.uuid]=e},unregisterMaterial:function(e){delete this.materials[e.uuid];var t=this.textureCounts;Object.keys(e).filter((function(t){return e[t]&&e[t].isTexture})).forEach((function(n){t[e[n].uuid]--,t[e[n].uuid]<=0&&e[n].dispose()}))},updateMaterials:function(e){var t=this.materials;Object.keys(t).forEach((function(e){t[e].needsUpdate=!0}))},onMaterialTextureLoaded:function(e){this.textureCounts[e.detail.texture.uuid]||(this.textureCounts[e.detail.texture.uuid]=0),this.textureCounts[e.detail.texture.uuid]++}})},{"../core/system":142,"../lib/three":179,"../utils/":205,"../utils/material":209}],194:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/"),o=e("../lib/three"),a=(0,i.debug)("components:renderer:warn");t.exports.System=r("renderer",{schema:{antialias:{default:"auto",oneOf:["true","false","auto"]},highRefreshRate:{default:i.device.isOculusBrowser()},logarithmicDepthBuffer:{default:"auto",oneOf:["true","false","auto"]},maxCanvasWidth:{default:1920},maxCanvasHeight:{default:1920},physicallyCorrectLights:{default:!1},precision:{default:"high",oneOf:["high","medium","low"]},sortObjects:{default:!1},colorManagement:{default:!1},gammaOutput:{default:!1},alpha:{default:!0},foveationLevel:{default:0}},init:function(){var e=this.data,t=this.el,n=t.renderer;n.sortObjects=e.sortObjects,n.physicallyCorrectLights=e.physicallyCorrectLights,(e.colorManagement||e.gammaOutput)&&(n.outputEncoding=o.sRGBEncoding,e.gammaOutput&&a('Property `gammaOutput` is deprecated. Use `renderer="colorManagement: true;"` instead.')),t.hasAttribute("antialias")&&a('Component `antialias` is deprecated. Use `renderer="antialias: true"` instead.'),t.hasAttribute("logarithmicDepthBuffer")&&a('Component `logarithmicDepthBuffer` is deprecated. Use `renderer="logarithmicDepthBuffer: true"` instead.')},applyColorCorrection:function(e){this.data.colorManagement&&e&&(e.isColor?e.convertSRGBToLinear():e.isTexture&&(e.encoding=o.sRGBEncoding))}})},{"../core/system":142,"../lib/three":179,"../utils/":205}],195:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../lib/three"),o={basic:i.BasicShadowMap,pcf:i.PCFShadowMap,pcfsoft:i.PCFSoftShadowMap};t.exports.System=r("shadow",{schema:{enabled:{default:!0},autoUpdate:{default:!0},type:{default:"pcf",oneOf:["basic","pcf","pcfsoft"]}},init:function(){var e=this.sceneEl,t=this.data;this.shadowMapEnabled=!1,e.renderer&&(e.renderer.shadowMap.type=o[t.type],e.renderer.shadowMap.autoUpdate=t.autoUpdate,this.setShadowMapEnabled(this.shadowMapEnabled))},update:function(e){e.enabled!==this.data.enabled&&this.setShadowMapEnabled(this.data.enabled)},setShadowMapEnabled:function(e){var t=this.sceneEl.renderer;this.shadowMapEnabled=this.data.enabled&&e,t&&(t.shadowMap.enabled=this.shadowMapEnabled)}})},{"../core/system":142,"../lib/three":179}],196:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils"),o=i.device.isWebXRAvailable;t.exports.System=r("tracked-controls-webvr",{init:function(){var e=this;this.controllers=[],this.isChrome=-1!==navigator.userAgent.indexOf("Chrome"),this.updateControllerList(),this.throttledUpdateControllerList=i.throttle(this.updateControllerList,500,this),o||navigator.getVRDisplays&&this.sceneEl.addEventListener("enter-vr",(function(){navigator.getVRDisplays().then((function(t){t.length&&(e.vrDisplay=t[0])}))}))},tick:function(){this.isChrome?this.updateControllerList():this.throttledUpdateControllerList()},updateControllerList:function(){var e,t,n,r,i=this.controllers;if(t=navigator.getGamepads&&navigator.getGamepads()){for(r=i.length,i.length=0,n=0;n<t.length;++n)(e=t[n])&&e.pose&&i.push(e);i.length!==r&&this.el.emit("controllersupdated",void 0,!1)}}})},{"../core/system":142,"../utils":205}],197:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils");t.exports.System=r("tracked-controls-webxr",{init:function(){this.controllers=[],this.oldControllers=[],this.oldControllersLength=0,this.throttledUpdateControllerList=i.throttle(this.updateControllerList,500,this),this.updateReferenceSpace=this.updateReferenceSpace.bind(this),this.el.addEventListener("enter-vr",this.updateReferenceSpace),this.el.addEventListener("exit-vr",this.updateReferenceSpace)},tick:function(){this.throttledUpdateControllerList()},updateReferenceSpace:function(){var e=this,t=this.el.xrSession;if(!t)return this.referenceSpace=void 0,this.controllers=[],void(this.oldControllersLength>0&&(this.oldControllersLength=0,this.el.emit("controllersupdated",void 0,!1)));var n=e.el.sceneEl.systems.webxr.sessionReferenceSpaceType;t.requestReferenceSpace(n).then((function(t){e.referenceSpace=t})).catch((function(t){throw e.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(n,'tracked-controls-webxr uses reference space "'+n+'".'),t}))},updateControllerList:function(){var e,t=this.el.xrSession,n=this.oldControllers;if(!t){if(0===this.oldControllersLength)return;return this.oldControllersLength=0,this.controllers=[],void this.el.emit("controllersupdated",void 0,!1)}if(t.inputSources){if(this.controllers=t.inputSources,this.oldControllersLength===this.controllers.length){var r=!0;for(e=0;e<this.controllers.length;++e)if(this.controllers[e]!==n[e]||this.controllers[e].gamepad!==n[e].gamepad){r=!1;break}if(r)return}for(n.length=0,e=0;e<this.controllers.length;e++)n.push(this.controllers[e]);this.oldControllersLength=this.controllers.length,this.el.emit("controllersupdated",void 0,!1)}}})},{"../core/system":142,"../utils":205}],198:[function(e,t,n){var r=e("../core/system").registerSystem,i=e("../utils/").debug("systems:webxr:warn");t.exports.System=r("webxr",{schema:{referenceSpaceType:{type:"string",default:"local-floor"},requiredFeatures:{type:"array",default:["local-floor"]},optionalFeatures:{type:"array",default:["bounded-floor"]},overlayElement:{type:"selector"}},update:function(){var e=this.data;this.sessionConfiguration={requiredFeatures:e.requiredFeatures,optionalFeatures:e.optionalFeatures},this.sessionReferenceSpaceType=e.referenceSpaceType,e.overlayElement&&(this.warnIfFeatureNotRequested("dom-overlay"),this.sessionConfiguration.domOverlay={root:e.overlayElement})},wasFeatureRequested:function(e){return"viewer"===e||"local"===e||!(!this.sessionConfiguration.requiredFeatures.includes(e)&&!this.sessionConfiguration.optionalFeatures.includes(e))},warnIfFeatureNotRequested:function(e,t){this.wasFeatureRequested(e)||i((t?t+" ":"")+'Please add the feature "'+e+"\" to a-scene's webxr system options in requiredFeatures/optionalFeatures.")}})},{"../core/system":142,"../utils/":205}],199:[function(e,t,n){t.exports=function(e,t){return n=Array.prototype.slice.call(arguments,2),function(){var r=n.concat(Array.prototype.slice.call(arguments,0));return e.apply(t,r)};var n}},{}],200:[function(e,t,n){var r=e("./debug"),i=e("object-assign"),o=r("utils:coordinates:warn"),a=["x","y","z","w"],s=/^\s*((-?\d*\.{0,1}\d+(e-?\d+)?)\s+){2,3}(-?\d*\.{0,1}\d+(e-?\d+)?)\s*$/;t.exports.regex=s;var l=/\s+/g;function c(e){return s.test(e)}function u(e){return null!==e&&void 0!==e&&e.constructor===String?parseFloat(e,10):e}t.exports.parse=function(e,t){var n,r,o,s,c,h,d,f,p;if(e&&e instanceof Object)return h=void 0===e.x?t&&t.x:e.x,d=void 0===e.y?t&&t.y:e.y,f=void 0===e.z?t&&t.z:e.z,p=void 0===e.w?t&&t.w:e.w,void 0!==h&&null!==h&&(e.x=u(h)),void 0!==d&&null!==d&&(e.y=u(d)),void 0!==f&&null!==f&&(e.z=u(f)),void 0!==p&&null!==p&&(e.w=u(p)),e;if(null===e||void 0===e)return"object"===typeof t?i({},t):t;for(n=e.trim().split(l),c={},s=0;s<a.length;s++)if(o=a[s],n[s])c[o]=parseFloat(n[s],10);else{if(void 0===(r=t&&t[o]))continue;c[o]=u(r)}return c},t.exports.stringify=function(e){var t;return"object"!==typeof e?e:(t=e.x+" "+e.y,null!=e.z&&(t+=" "+e.z),null!=e.w&&(t+=" "+e.w),t)},t.exports.isCoordinates=c,t.exports.isCoordinate=function(e){return o("`AFRAME.utils.isCoordinate` has been renamed to `AFRAME.utils.isCoordinates`"),c(e)},t.exports.toVector3=function(e){return new THREE.Vector3(e.x,e.y,e.z)}},{"./debug":201,"object-assign":39}],201:[function(t,n,r){(function(r){var i=t("debug"),o=t("object-assign"),a={colors:{debug:"gray",error:"red",info:"gray",warn:"orange"}},s=function(e){var t=i(e);return t.color=function(e){var t=function(e){var t=e.split(":");return t[t.length-1]}(e);return a.colors&&a.colors[t]||null}(e),t};o(s,i);var l=function(){try{return window.localStorage}catch(e){}}();l&&(parseInt(l.logs,10)||"true"===l.logs)?s.enable("*"):s.enable("*:error,*:info,*:warn"),r.browser&&(window.logs=s),n.exports=s}).call(this,t("_process"))},{_process:49,debug:8,"object-assign":39}],202:[function(e,t,n){(function(n){var r,i=e("debug")("device:error"),o=!1,a=!1,s=t.exports.isWebXRAvailable=!window.debug&&void 0!==navigator.xr;if(window.addEventListener("vrdisplayactivate",(function(e){var t;s||(t=document.createElement("canvas"),r=e.display,t.getContext("webgl",{}),r.requestPresent([{source:t}]).then((function(){}),(function(){})))})),s){var l=function(){var e=document.querySelector("a-scene");e?e.hasLoaded?e.components["vr-mode-ui"].updateEnterInterfaces():e.addEventListener("loaded",l):window.addEventListener("DOMContentLoaded",l)},c=function(e){i("WebXR session support error: "+e.message)};navigator.xr.isSessionSupported?(navigator.xr.isSessionSupported("immersive-vr").then((function(e){o=e,l()})).catch(c),navigator.xr.isSessionSupported("immersive-ar").then((function(e){a=e,l()})).catch((function(){}))):navigator.xr.supportsSession?(navigator.xr.supportsSession("immersive-vr").then((function(){o=!0,l()})).catch(c),navigator.xr.supportsSession("immersive-ar").then((function(){a=!0,l()})).catch((function(){}))):i("WebXR has neither isSessionSupported or supportsSession?!")}else navigator.getVRDisplays&&navigator.getVRDisplays().then((function(e){var t=document.querySelector("a-scene");r=e.length&&e[0],t&&t.emit("displayconnected",{vrDisplay:r})}));function u(){return r}t.exports.getVRDisplay=u,t.exports.checkHeadsetConnected=function(){return o||a||!!u()},t.exports.checkARSupport=function(){return a};var h=function(){var e,t=!1;return e=window.navigator.userAgent||window.navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),(f()||d()||v())&&(t=!0),g()&&(t=!1),function(){return t}}();function d(e){var t=e||window.navigator.userAgent;return/ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle/i.test(t)}function f(){return/iPad|iPhone|iPod/.test(window.navigator.platform)}function p(){return/(OculusBrowser)/i.test(window.navigator.userAgent)}function m(){return/(Mobile VR)/i.test(window.navigator.userAgent)}function g(){return p()||m()}function v(){return/R7 Build/.test(window.navigator.userAgent)}t.exports.isMobile=h,t.exports.isTablet=d,t.exports.isIOS=f,t.exports.isMobileDeviceRequestingDesktopSite=function(){return!h()&&!g()&&void 0!==window.orientation},t.exports.isOculusBrowser=p,t.exports.isFirefoxReality=m,t.exports.isMobileVR=g,t.exports.isR7=v,t.exports.isLandscape=function(){var e=window.orientation;return v()&&(e+=90),90===e||-90===e},t.exports.isBrowserEnvironment=!(n&&!n.browser),t.exports.isNodeEnvironment=!t.exports.isBrowserEnvironment}).call(this,e("_process"))},{_process:49,debug:8}],203:[function(e,t,n){var r={};function i(e,t){return r[t=t||"."]||(r[t]={}),-1!==e.indexOf(t)?r[t][e]=e.split(t):r[t][e]=e,r[t][e]}t.exports.getComponentPropertyPath=i,t.exports.propertyPathCache=r,t.exports.getComponentProperty=function(e,t,n){var r;return n=n||".",-1!==t.indexOf(n)?(r=i(t,n)).constructor===String?e.getAttribute(r):e.getAttribute(r[0])[r[1]]:e.getAttribute(t)},t.exports.setComponentProperty=function(e,t,n,r){var o;r=r||".",-1===t.indexOf(r)?e.setAttribute(t,n):(o=i(t,r)).constructor===String?e.setAttribute(o,n):e.setAttribute(o[0],o[1],n)}},{}],204:[function(e,t,n){t.exports=function(e){var t=e.style.width,n=e.style.height;e.style.width=parseInt(t,10)+1+"px",e.style.height=parseInt(n,10)+1+"px",setTimeout((function(){e.style.width=t,e.style.height=n}),200)}},{}],205:[function(e,t,n){var r=e("./debug"),i=e("deep-assign"),o=e("./device"),a=e("object-assign"),s=e("./object-pool"),l=r("utils:warn");t.exports.bind=e("./bind"),t.exports.coordinates=e("./coordinates"),t.exports.debug=r,t.exports.device=o,t.exports.entity=e("./entity"),t.exports.forceCanvasResizeSafariMobile=e("./forceCanvasResizeSafariMobile"),t.exports.isIE11=e("./is-ie11"),t.exports.material=e("./material"),t.exports.objectPool=s,t.exports.split=e("./split").split,t.exports.styleParser=e("./styleParser"),t.exports.trackedControls=e("./tracked-controls"),t.exports.checkHeadsetConnected=function(){return l("`utils.checkHeadsetConnected` has moved to `utils.device.checkHeadsetConnected`"),o.checkHeadsetConnected(arguments)},t.exports.isGearVR=t.exports.device.isGearVR=function(){l("`utils.isGearVR` has been deprecated, use `utils.device.isMobileVR`")},t.exports.isIOS=function(){return l("`utils.isIOS` has moved to `utils.device.isIOS`"),o.isIOS(arguments)},t.exports.isOculusGo=t.exports.device.isOculusGo=function(){l("`utils.isOculusGo` has been deprecated, use `utils.device.isMobileVR`")},t.exports.isMobile=function(){return l("`utils.isMobile has moved to `utils.device.isMobile`"),o.isMobile(arguments)},t.exports.throttle=function(e,n,r){var i;return r&&(e=t.exports.bind(e,r)),function(){var t=Date.now(),r="undefined"===typeof i?n:t-i;("undefined"===typeof i||r>=n)&&(i=t,e.apply(null,arguments))}},t.exports.throttleTick=function(e,n,r){var i;return r&&(e=t.exports.bind(e,r)),function(t,r){var o="undefined"===typeof i?r:t-i;("undefined"===typeof i||o>=n)&&(i=t,e(t,o))}},t.exports.debounce=function(e,t,n){var r;return function(){var i=this,o=arguments,a=function(){r=null,n||e.apply(i,o)},s=n&&!r;clearTimeout(r),r=setTimeout(a,t),s&&e.apply(i,o)}},t.exports.extend=a,t.exports.extendDeep=i,t.exports.clone=function(e){return JSON.parse(JSON.stringify(e))};var c=function(){var e=s.createPool((function(){return[]}));return function(t,n){var r,i,o,a,s,l;if(void 0===t||void 0===n||null===t||null===n||!(t&&n&&t.constructor===Object&&n.constructor===Object||t.constructor===Array&&n.constructor===Array))return t===n;for(r in i=e.use(),o=e.use(),i.length=0,o.length=0,t)i.push(r);for(r in n)o.push(r);if(i.length!==o.length)return e.recycle(i),e.recycle(o),!1;for(a=0;a<i.length;++a)if(s=t[i[a]],l=n[i[a]],"object"===typeof s||"object"===typeof l||Array.isArray(s)&&Array.isArray(l)){if(s===l)continue;if(!c(s,l))return e.recycle(i),e.recycle(o),!1}else if(s!==l)return e.recycle(i),e.recycle(o),!1;return e.recycle(i),e.recycle(o),!0}}();t.exports.deepEqual=c,t.exports.diff=function(){var e=[];return function(t,n,r){var i,o,a,s,l,u,h;for(l in s=r||{},e.length=0,t)e.push(l);if(!n)return s;for(a in n)-1===e.indexOf(a)&&e.push(a);for(u=0;u<e.length;u++)i=t[l=e[u]],o=n[l],((h=i&&o&&i.constructor===Object&&o.constructor===Object)&&!c(i,o)||!h&&i!==o)&&(s[l]=o);return s}}(),t.exports.shouldCaptureKeyEvent=function(e){return!e.metaKey&&document.activeElement===document.body},t.exports.splitString=function(e,t){"undefined"===typeof t&&(t=" ");var n=new RegExp(t,"g");return(e=(e||"").replace(n,t)).split(t)},t.exports.getElData=function(e,t){t=t||{};var n={};return Object.keys(t).forEach((function(t){e.hasAttribute(t)&&(n[t]=e.getAttribute(t))})),n},t.exports.getUrlParameter=function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},t.exports.isIframed=function(){return window.top!==window.self},t.exports.findAllScenes=function(e){for(var t=[],n=e.getElementsByTagName("*"),r=0,i=n.length;r<i;r++)n[r].isScene&&t.push(n[r]);return t},t.exports.srcLoader=e("./src-loader")},{"./bind":199,"./coordinates":200,"./debug":201,"./device":202,"./entity":203,"./forceCanvasResizeSafariMobile":204,"./is-ie11":207,"./material":209,"./object-pool":210,"./split":211,"./src-loader":212,"./styleParser":213,"./tracked-controls":214,"deep-assign":10,"object-assign":39}],206:[function(e,t,n){window.addEventListener("orientationchange",(function(){document.documentElement.style.height="initial",setTimeout((function(){document.documentElement.style.height="100%",setTimeout((function(){window.scrollTo(0,1)}),500)}),500)}))},{}],207:[function(e,t,n){t.exports=11===function(){var e=-1,t=navigator.userAgent;return"Microsoft Internet Explorer"===navigator.appName?null!=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)):"Netscape"===navigator.appName&&null!=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1)),e}()},{}],208:[function(e,t,n){t.exports=function(e){return/(iphone|ipod|ipad).*os.(7_|8_|9_)/i.test(e)}},{}],209:[function(e,t,n){var r=e("../lib/three"),i=["application/x-mpegurl","application/vnd.apple.mpegurl"],o=new Set(["emissiveMap","envMap","map","specularMap"]);function a(e,t){t&&(e.emit("materialtextureloaded",{src:t.image,texture:t}),t.image&&"VIDEO"===t.image.tagName&&(t.image.addEventListener("loadeddata",(function(){e.components&&e.components.material&&(t.needsCorrectionBGRA&&t.needsCorrectionFlipY&&-1!==["standard","flat"].indexOf(e.components.material.data.shader)&&e.setAttribute("material","shader","ios10hls"),e.emit("materialvideoloadeddata",{src:t.image,texture:t}))})),t.image.addEventListener("ended",(function(){e.emit("materialvideoended",{src:t.image,texture:t})}))))}t.exports.updateMapMaterialFromData=function(e,t,n,i){var s=n.el,l=n.material,c=s.sceneEl.systems.renderer,u=i[t];if(n.materialSrcs||(n.materialSrcs={}),!u)return delete n.materialSrcs[e],void h(null);function h(t){l[e]=t,t&&o.has(e)&&c.applyColorCorrection(t),l.needsUpdate=!0,a(s,t)}u!==n.materialSrcs[e]&&(n.materialSrcs[e]=u,u instanceof r.Texture?h(u):s.sceneEl.systems.material.loadTexture(u,{src:u,repeat:i.repeat,offset:i.offset,npot:i.npot},(function(t){n.materialSrcs[e]===u&&h(t)})))},t.exports.updateMap=function(e,n){return t.exports.updateMapMaterialFromData("map","src",e,n)},t.exports.updateDistortionMap=function(e,t,n){var r=e;"ambientOcclusion"===e&&(r="ao");var i=t.el,s=t.material,l=i.sceneEl.systems.renderer,c=n[e+"Map"],u={};if(u.src=c,u.offset=n[e+"TextureOffset"],u.repeat=n[e+"TextureRepeat"],u.wrap=n[e+"TextureWrap"],c){if(c===t[e+"TextureSrc"])return;return t[e+"TextureSrc"]=c,void i.sceneEl.systems.material.loadTexture(c,u,h)}function h(e){var t=r+"Map";s[t]=e,e&&o.has(t)&&l.applyColorCorrection(e),s.needsUpdate=!0,a(i,e)}s.map&&h(null)},t.exports.handleTextureEvents=a,t.exports.isHLS=function(e,t){return!(!t||!i.includes(t.toLowerCase()))||!!(e&&e.toLowerCase().indexOf(".m3u8")>0)}},{"../lib/three":179}],210:[function(e,t,n){var r=Object.freeze(Object.create(null));function i(){return{}}function o(e){var t;if(e&&e.constructor===Object)for(t in e)e[t]=void 0}t.exports.createPool=function(e){var t=[],n=null;function a(r){var i,o;if((r=void 0===r?t.length:r)>0&&null==n&&(n=0),r>0)for(i=t.length,t.length+=Number(r),o=i;o<t.length;o++)t[o]=e();return t.length}return e=e||i,{grow:a,pool:t,recycle:function(e){e instanceof Object&&(null!==n&&-1!==n?t[--n]=e:t[t.length]=e)},size:function(){return t.length},use:function(){var e;return null!==n&&n!==t.length||a(t.length||5),e=t[n],t[n++]=r,o(e),e}}},t.exports.clearObject=o,t.exports.removeUnusedKeys=function(e,t){var n;if(e&&e.constructor===Object)for(n in e)n in t||delete e[n]}},{}],211:[function(e,t,n){t.exports.split=function(){var e={};return function(t,n){return n in e||(e[n]={}),t in e[n]||(e[n][t]=t.split(n)),e[n][t]}}()},{}],212:[function(t,n,r){var i=t("./debug")("utils:src-loader:warn");function o(e,t,n){!function(e,t){var n;e.tagName?t("IMG"===e.tagName):((n=new XMLHttpRequest).open("HEAD",e),n.addEventListener("load",(function(r){var i;n.status>=200&&n.status<300?null==(i=n.getResponseHeader("Content-Type"))?s(e,t):i.startsWith("image")?t(!0):t(!1):s(e,t),n.abort()})),n.send())}(e,(function(r){r?t(e):n(e)}))}function a(e){var t=e.match(/\url\((.+)\)/);if(t)return t[1]}function s(e,t){var n=new Image;n.addEventListener("load",(function(){t(!0)})),n.addEventListener("error",(function(){t(!1)})),n.src=e}n.exports={parseUrl:a,validateSrc:o,validateCubemapSrc:function(t,n){var r,s,l,c="",u=[];for(s=0;s<5;s++)c+="(url\\((?:[^\\)]+)\\),\\s*)";function h(e){u.push(e),6===u.length&&n(u)}if(c+="(url\\((?:[^\\)]+)\\)\\s*)",l=t.match(new RegExp(c)))for(s=1;s<7;s++)o(a(l[s]),h);else if(r=function(t){try{var n=document.querySelector(t);return n||i('No element was found matching the selector: "%s"',t),n}catch(e){return void i('"%s" is not a valid selector',t)}}(t))return"A-CUBEMAP"===r.tagName&&r.srcs?n(r.srcs):void i('Selector "%s" does not point to <a-cubemap>',t)}}},{"./debug":201}],213:[function(e,t,n){var r=/-([a-z])/g;function i(e){return e.replace(r,s)}function o(e){var t,n;for(n in e)n!==(t=i(n))&&(e[t]=e[n],delete e[n]);return e}t.exports.parse=function(e,t){var n;return"string"!==typeof e||(n=function(e,t){var n,r,i,o,s,l;for(t=t||{},n=a(e),r=0;r<n.length;r++)(i=n[r])&&(o=i.indexOf(":"),s=i.substr(0,o).trim(),l=i.substr(o+1).trim(),t[s]=l);return t}(e,t))[""]?e:o(n)},t.exports.stringify=function(e){return"string"===typeof e?e:function(e){var t,n=0,r=0,i="";for(t in e)n++;for(t in e)i+=t+": "+e[t],r<n-1&&(i+="; "),r++;return i}(e)},t.exports.toCamelCase=i,t.exports.transformKeysToCamelCase=o;var a=function(){var e=[],t=/url\([^)]+$/;return function(n){var r,i="",o=0;for(e.length=0;o<n.length;)-1===(r=n.indexOf(";",o))&&(r=n.length),i+=n.substring(o,r),t.test(i)?(i+=";",o=r+1):(e.push(i.trim()),i="",o=r+1);return e}}();function s(e){return e[1].toUpperCase()}},{}],214:[function(e,t,n){var r=e("../constants").DEFAULT_HANDEDNESS,i=["x","y","z","w"];function o(e,t,n){var r,i,o=e.el.sceneEl,a=n.index||0;return!!t&&!!(i=o&&o.systems["tracked-controls-webvr"])&&!!(r=i.controllers).length&&!!s(r,null,t,n.hand,a)}function a(e,t,n){var r,i=e.el.sceneEl,o=i&&i.systems["tracked-controls-webxr"];return!!o&&!(!(r=o.controllers)||!r.length)&&l(r,t,n.hand,n.index,n.iterateControllerProfiles,n.handTracking)}function s(e,t,n,i,o){var a,s,l=0;for(s=0;s<e.length;s++)if(a=e[s],(!n||a.id.startsWith(n))&&(n||a.id===t)&&(!i||!a.hand||i===a.hand)){if(!i||a.hand)return a;if(l===2*o+(i===r?0:1))return a;++l}}function l(e,t,n,r,i,o){var a,s,l,c,u=!1;for(a=0;a<e.length;a++){if(c=(l=e[a]).profiles,o)u=l.hand;else if(i)for(s=0;s<c.length&&!(u=c[s].startsWith(t));s++);else u=c.length>0&&c[0].startsWith(t);if(u)if("right"===l.handedness||"left"===l.handedness){if(l.handedness===n)return e[a]}else if(a===r)return e[a]}}t.exports.checkControllerPresentAndSetup=function(e,t,n){var r,i,s=e.el,l=s.sceneEl.hasWebXR;if(i=!!(r=(l?a:o)(e,t,n)),!e.controllerPresent||e.controllerEventsActive||l||e.addEventListeners(),i===e.controllerPresent)return i;e.controllerPresent=i,i?(e.addEventListeners(),e.injectTrackedControls(r),s.emit("controllerconnected",{name:e.name,component:e})):(e.removeEventListeners(),s.emit("controllerdisconnected",{name:e.name,component:e}))},t.exports.isControllerPresentWebVR=o,t.exports.isControllerPresentWebXR=a,t.exports.findMatchingControllerWebVR=s,t.exports.findMatchingControllerWebXR=l,t.exports.emitIfAxesChanged=function(e,t,n){var r,o,a,s,l;for(o in t){for(r=t[o],a=!1,l=0;l<r.length;l++)n.detail.changed[r[l]]&&(a=!0);if(a){for(s={},l=0;l<r.length;l++)s[i[l]]=n.detail.axis[r[l]];e.el.emit(o+"moved",s)}}},t.exports.onButtonEvent=function(e,t,n,r){var i=(r?n.mapping[r]:n.mapping).buttons[e];n.el.emit(i+t),n.updateModel&&n.updateModel(i,t)}},{"../constants":123}],215:[function(e,t,n){THREE.DeviceOrientationControls=function(e){var t=this;this.object=e,this.object.rotation.reorder("YXZ"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0,this.alphaOffset=0;var n=function(e){t.deviceOrientation=e},r=function(){t.screenOrientation=window.orientation||0},i=function(){var e=new THREE.Vector3(0,0,1),t=new THREE.Euler,n=new THREE.Quaternion,r=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5));return function(i,o,a,s,l){t.set(a,o,-s,"YXZ"),i.setFromEuler(t),i.multiply(r),i.multiply(n.setFromAxisAngle(e,-l))}}();this.connect=function(){r(),window.addEventListener("orientationchange",r,!1),window.addEventListener("deviceorientation",n,!1),t.enabled=!0},this.disconnect=function(){window.removeEventListener("orientationchange",r,!1),window.removeEventListener("deviceorientation",n,!1),t.enabled=!1},this.update=function(){if(!1!==t.enabled){var e=t.deviceOrientation;if(e){var n=e.alpha?THREE.Math.degToRad(e.alpha)+t.alphaOffset:0,r=e.beta?THREE.Math.degToRad(e.beta):0,o=e.gamma?THREE.Math.degToRad(e.gamma):0,a=t.screenOrientation?THREE.Math.degToRad(t.screenOrientation):0;i(t.object.quaternion,n,r,o,a)}}},this.dispose=function(){t.disconnect()},this.connect()}},{}],216:[function(e,t,n){window.glStats=function(){var e=null,t=0,n=0,r=0,i=0,o=0,a=0,s=0;function l(e,t){return function(){t.apply(this,arguments),e.apply(this,arguments)}}return WebGLRenderingContext.prototype.drawArrays=l(WebGLRenderingContext.prototype.drawArrays,(function(){t++,arguments[0]==this.POINTS?a+=arguments[2]:o+=arguments[2]})),WebGLRenderingContext.prototype.drawElements=l(WebGLRenderingContext.prototype.drawElements,(function(){n++,i+=arguments[1]/3,o+=arguments[1]})),WebGLRenderingContext.prototype.useProgram=l(WebGLRenderingContext.prototype.useProgram,(function(){r++})),WebGLRenderingContext.prototype.bindTexture=l(WebGLRenderingContext.prototype.bindTexture,(function(){s++})),{update:function(){e("allcalls").set(t+n),e("drawElements").set(n),e("drawArrays").set(t),e("bindTexture").set(s),e("useProgram").set(r),e("glfaces").set(i),e("glvertices").set(o),e("glpoints").set(a)},start:function(){t=0,n=0,r=0,i=0,o=0,a=0,s=0},end:function(){},attach:function(t){e=t},values:{allcalls:{over:3e3,caption:"Calls (hook)"},drawelements:{caption:"drawElements (hook)"},drawarrays:{caption:"drawArrays (hook)"}},groups:[{caption:"WebGL",values:["allcalls","drawelements","drawarrays","useprogram","bindtexture","glfaces","glvertices","glpoints"]}],fractions:[{base:"allcalls",steps:["drawelements","drawarrays"]}]}},window.threeStats=function(e){var t=null;return{update:function(){t("renderer.info.memory.geometries").set(e.info.memory.geometries),t("renderer.info.programs").set(e.info.programs.length),t("renderer.info.memory.textures").set(e.info.memory.textures),t("renderer.info.render.calls").set(e.info.render.calls),t("renderer.info.render.triangles").set(e.info.render.triangles),t("renderer.info.render.points").set(e.info.render.points)},start:function(){},end:function(){},attach:function(e){t=e},values:{"renderer.info.memory.geometries":{caption:"Geometries"},"renderer.info.memory.textures":{caption:"Textures"},"renderer.info.programs":{caption:"Programs"},"renderer.info.render.calls":{caption:"Calls"},"renderer.info.render.triangles":{caption:"Triangles",over:1e3},"renderer.info.render.points":{caption:"Points"}},groups:[{caption:"Three.js - Memory",values:["renderer.info.memory.geometries","renderer.info.programs","renderer.info.memory.textures"]},{caption:"Three.js - Render",values:["renderer.info.render.calls","renderer.info.render.triangles","renderer.info.render.points"]}],fractions:[]}},window.BrowserStats=function(){var e=null,t=0,n=0;window.performance&&!performance.memory&&(performance.memory={usedJSHeapSize:0,totalJSHeapSize:0}),0===performance.memory.totalJSHeapSize&&console.warn("totalJSHeapSize === 0... performance.memory is only available in Chrome .");var r=Math.log(1024);function i(e){var t=Math.floor(Math.log(e)/r);return Math.round(100*e/Math.pow(1024,t))/100}return{update:function(){t=i(performance.memory.usedJSHeapSize),n=i(performance.memory.totalJSHeapSize),e("memory").set(t),e("total").set(n)},start:function(){t=0},end:function(){},attach:function(t){e=t},values:{memory:{caption:"Used Memory",average:!0,avgMs:1e3,over:22},total:{caption:"Total Memory"}},groups:[{caption:"Browser",values:["memory","total"]}],fractions:[{base:"total",steps:["memory"]}]}},"object"===typeof t&&(t.exports={glStats:window.glStats,threeStats:window.threeStats,BrowserStats:window.BrowserStats})},{}],217:[function(e,t,n){"use strict";!function(){"performance"in window==0&&(window.performance={});var e=window.performance;if("now"in e==0){var t=Date.now();e.timing&&e.timing.navigationStart&&(t=e.timing.navigationStart),e.now=function(){return Date.now()-t}}e.mark||(e.mark=function(){}),e.measure||(e.measure=function(){})}(),window.rStats=function(e){function t(e,t){for(var n=Object.keys(e),r=0,i=n.length;r<i;r++)t(n[r])}var n=e||{},r=n.colours||["#850700","#c74900","#fcb300","#284280","#4c7c0c"],i=(n.CSSPath?n.CSSPath:"")+"rStats.css";(n.css||["https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300",i]).forEach((function(e){!function(e){var t=document.createElement("link");t.href=e,t.rel="stylesheet",t.type="text/css",document.getElementsByTagName("head")[0].appendChild(t)}(e)})),n.values||(n.values={});var o,a,s={};function l(e,t,n){var r=n||{},i=document.createElement("canvas"),o=i.getContext("2d"),a=0,s=0,l=r.color?r.color:"#666666",c=document.createElement("canvas"),u=c.getContext("2d");c.width=1,c.height=20,u.fillStyle="#444444",u.fillRect(0,0,1,20),u.fillStyle=l,u.fillRect(0,10,1,10),u.fillStyle="#ffffff",u.globalAlpha=.5,u.fillRect(0,10,1,1),u.globalAlpha=1;var h=document.createElement("canvas"),d=h.getContext("2d");return h.width=1,h.height=20,d.fillStyle="#444444",d.fillRect(0,0,1,20),d.fillStyle="#b70000",d.fillRect(0,10,1,10),d.globalAlpha=.5,d.fillStyle="#ffffff",d.fillRect(0,10,1,1),d.globalAlpha=1,i.width=200,i.height=10,i.style.width=i.width+"px",i.style.height=i.height+"px",i.className="rs-canvas",e.appendChild(i),o.fillStyle="#444444",o.fillRect(0,0,i.width,i.height),{draw:function(e,t){(s+=.1*(e-s))>(a*=.99)&&(a=s),o.drawImage(i,1,0,i.width-1,i.height,0,0,i.width-1,i.height),t?o.drawImage(h,i.width-1,i.height-s*i.height/a-10):o.drawImage(c,i.width-1,i.height-s*i.height/a-10)}}}function c(e,n){var i=document.createElement("canvas"),o=i.getContext("2d");return i.width=200,i.height=10*n,i.style.width=i.width+"px",i.style.height=i.height+"px",i.className="rs-canvas",e.appendChild(i),o.fillStyle="#444444",o.fillRect(0,0,i.width,i.height),{draw:function(e){o.drawImage(i,1,0,i.width-1,i.height,0,0,i.width-1,i.height);var n=0;t(e,(function(t){var a=e[t]*i.height;o.fillStyle=r[t],o.fillRect(i.width-1,n,1,a),n+=a}))}}}function u(e,t){var r,i=e,o=0,s=0,c=0,u=0,h=performance.now(),d=0,f=document.createElement("div"),p=document.createElement("span"),m=document.createElement("div"),g=document.createTextNode(""),v=n?n.values[i.toLowerCase()]:null,y=new l(f,i,v),b=!1;function w(e){if(v&&v.average){u+=e,d++;var t=performance.now();t-h>=(v.avgMs||1e3)&&(c=u/d,u=0,h=t,d=0)}}function x(){r=performance.now(),n.userTimingAPI&&performance.mark(i+"-start"),b=!0}function _(){o=performance.now()-r,n.userTimingAPI&&(performance.mark(i+"-end"),b&&performance.measure(i,i+"-start",i+"-end")),w(o)}return p.className="rs-counter-id",p.textContent=v&&v.caption?v.caption:i,m.className="rs-counter-value",m.appendChild(g),f.appendChild(p),f.appendChild(m),t?t.div.appendChild(f):a.appendChild(f),r=performance.now(),{set:function(e){w(o=e)},start:x,tick:function(){_(),x()},end:_,frame:function(){var e=performance.now(),t=e-r;s++,t>1e3&&(o=v&&!1===v.interpolate?s:1e3*s/t,s=0,r=e,w(o))},value:function(){return o},draw:function(){var e=v&&v.average?c:o;g.nodeValue=Math.round(100*e)/100;var t=v&&(v.below&&o<v.below||v.over&&o>v.over);y.draw(o,t),f.className=t?"rs-counter-base alarm":"rs-counter-base"}}}function h(e){var r=e.toLowerCase();if(void 0===r&&(r="default"),s[r])return s[r];var i=null;n&&n.groups&&t(n.groups,(function(e){var t=n.groups[parseInt(e,10)];i||-1===t.values.indexOf(r.toLowerCase())||(i=t)}));var o=new u(r,i);return s[r]=o,o}function d(){t(n.plugins,(function(e){n.plugins[e].update()})),t(s,(function(e){s[e].draw()})),n&&n.fractions&&t(n.fractions,(function(e){var r=n.fractions[parseInt(e,10)],i=[],o=s[r.base.toLowerCase()];o&&(o=o.value(),t(n.fractions[e].steps,(function(t){var r=n.fractions[e].steps[parseInt(t,10)].toLowerCase(),a=s[r];a&&i.push(a.value()/o)}))),r.graph.draw(i)}))}return function(){if(n.plugins){n.values||(n.values={}),n.groups||(n.groups=[]),n.fractions||(n.fractions=[]);for(var e=0;e<n.plugins.length;e++)n.plugins[e].attach(h),t(n.plugins[e].values,(function(t){n.values[t]=n.plugins[e].values[t]})),n.groups=n.groups.concat(n.plugins[e].groups),n.fractions=n.fractions.concat(n.plugins[e].fractions)}else n.plugins={};(o=document.createElement("div")).className="rs-base",(a=document.createElement("div")).className="rs-container",a.style.height="auto",o.appendChild(a),document.body.appendChild(o),n&&(n.groups&&t(n.groups,(function(e){var t=n.groups[parseInt(e,10)],r=document.createElement("div");r.className="rs-group",t.div=r;var i=document.createElement("h1");i.textContent=t.caption,i.addEventListener("click",function(e){this.classList.toggle("hidden"),e.preventDefault()}.bind(r)),a.appendChild(i),a.appendChild(r)})),n.fractions&&t(n.fractions,(function(e){var i=n.fractions[parseInt(e,10)],o=document.createElement("div");o.className="rs-fraction";var s=document.createElement("div");s.className="rs-legend";var l=0;t(n.fractions[e].steps,(function(t){var i=document.createElement("p");i.textContent=n.fractions[e].steps[t],i.style.color=r[l],s.appendChild(i),l++})),o.appendChild(s),o.style.height=10*l+"px",i.div=o;var u=new c(o,l);i.graph=u,a.appendChild(o)})))}(),function(e){return e?h(e):{element:o,update:d}}},"object"===typeof t&&(t.exports=window.rStats)},{}],218:[function(e,t,n){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e})},{}],219:[function(t,n,r){var i={base64:function(e,t){return"data:"+e+";base64,"+t},isMobile:function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(t=!0),t},isIOS:function(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)},isIFrame:function(){try{return window.self!==window.top}catch(e){return!0}},appendQueryParameter:function(e,t,n){var r=e.indexOf("?")<0?"?":"&";return e+=r+t+"="+n},getQueryParameter:function(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))},isLandscapeMode:function(){return 90==window.orientation||-90==window.orientation}};n.exports=i},{}],220:[function(e,t,n){var r=e("./util.js");function i(){var e=document.createElement("video");e.addEventListener("ended",(function(){e.play()})),this.request=function(){e.paused&&(e.src=r.base64("video/webm","GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAAH4xFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsggfG7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU2LjQwLjEwMVdBjUxhdmY1Ni40MC4xMDFzpJAGSJTMbsLpDt/ySkipgX1fRImIQO1MAAAAAAAWVK5rAQAAAAAAADuuAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDmDgQEj44OEO5rKAOABAAAAAAAABrCBsLqBkB9DtnUBAAAAAAAAo+eBAKOmgQAAgKJJg0IAAV4BHsAHBIODCoAACmH2MAAAZxgz4dPSTFi5JACjloED6ACmAECSnABMQAADYAAAWi0quoCjloEH0ACmAECSnABNwAADYAAAWi0quoCjloELuACmAECSnABNgAADYAAAWi0quoCjloEPoACmAECSnABNYAADYAAAWi0quoCjloETiACmAECSnABNIAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTnghdwo5aBAAAApgBAkpwATOAAA2AAAFotKrqAo5aBA+gApgBAkpwATMAAA2AAAFotKrqAo5aBB9AApgBAkpwATIAAA2AAAFotKrqAo5aBC7gApgBAkpwATEAAA2AAAFotKrqAo5aBD6AApgDAkpwAQ2AAA2AAAFotKrqAo5aBE4gApgBAkpwATCAAA2AAAFotKrqAH0O2dQEAAAAAAACU54Iu4KOWgQAAAKYAQJKcAEvAAANgAABaLSq6gKOWgQPoAKYAQJKcAEtgAANgAABaLSq6gKOWgQfQAKYAQJKcAEsAAANgAABaLSq6gKOWgQu4AKYAQJKcAEqAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEogAANgAABaLSq6gKOWgROIAKYAQJKcAEnAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCRlCjloEAAACmAECSnABJgAADYAAAWi0quoCjloED6ACmAECSnABJIAADYAAAWi0quoCjloEH0ACmAMCSnABDYAADYAAAWi0quoCjloELuACmAECSnABI4AADYAAAWi0quoCjloEPoACmAECSnABIoAADYAAAWi0quoCjloETiACmAECSnABIYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngl3Ao5aBAAAApgBAkpwASCAAA2AAAFotKrqAo5aBA+gApgBAkpwASAAAA2AAAFotKrqAo5aBB9AApgBAkpwAR8AAA2AAAFotKrqAo5aBC7gApgBAkpwAR4AAA2AAAFotKrqAo5aBD6AApgBAkpwAR2AAA2AAAFotKrqAo5aBE4gApgBAkpwARyAAA2AAAFotKrqAH0O2dQEAAAAAAACU54J1MKOWgQAAAKYAwJKcAENgAANgAABaLSq6gKOWgQPoAKYAQJKcAEbgAANgAABaLSq6gKOWgQfQAKYAQJKcAEagAANgAABaLSq6gKOWgQu4AKYAQJKcAEaAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEZAAANgAABaLSq6gKOWgROIAKYAQJKcAEYAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCjKCjloEAAACmAECSnABF4AADYAAAWi0quoCjloED6ACmAECSnABFwAADYAAAWi0quoCjloEH0ACmAECSnABFoAADYAAAWi0quoCjloELuACmAECSnABFgAADYAAAWi0quoCjloEPoACmAMCSnABDYAADYAAAWi0quoCjloETiACmAECSnABFYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngqQQo5aBAAAApgBAkpwARUAAA2AAAFotKrqAo5aBA+gApgBAkpwARSAAA2AAAFotKrqAo5aBB9AApgBAkpwARQAAA2AAAFotKrqAo5aBC7gApgBAkpwARQAAA2AAAFotKrqAo5aBD6AApgBAkpwAROAAA2AAAFotKrqAo5aBE4gApgBAkpwARMAAA2AAAFotKrqAH0O2dQEAAAAAAACU54K7gKOWgQAAAKYAQJKcAESgAANgAABaLSq6gKOWgQPoAKYAQJKcAESAAANgAABaLSq6gKOWgQfQAKYAwJKcAENgAANgAABaLSq6gKOWgQu4AKYAQJKcAERgAANgAABaLSq6gKOWgQ+gAKYAQJKcAERAAANgAABaLSq6gKOWgROIAKYAQJKcAEQgAANgAABaLSq6gB9DtnUBAAAAAAAAlOeC0vCjloEAAACmAECSnABEIAADYAAAWi0quoCjloED6ACmAECSnABEAAADYAAAWi0quoCjloEH0ACmAECSnABD4AADYAAAWi0quoCjloELuACmAECSnABDwAADYAAAWi0quoCjloEPoACmAECSnABDoAADYAAAWi0quoCjloETiACmAECSnABDgAADYAAAWi0quoAcU7trAQAAAAAAABG7j7OBALeK94EB8YIBd/CBAw=="),e.play())},this.release=function(){e.pause(),e.src=""}}function o(){var e=null;this.request=function(){e||(e=setInterval((function(){window.location.href="/",setTimeout(window.stop,0)}),15e3))},this.release=function(){e&&(clearInterval(e),e=null)}}t.exports=function(){var e=navigator.userAgent||navigator.vendor||window.opera;return e.match(/iPhone/i)||e.match(/iPod/i)?o:i}()},{"./util.js":219}]},{},[177])(177)}).call(this,r(43))},function(e,t,n){n(311),n(321),n(330),n(339),n(344)},function(e,t,n){n(312),n(313),n(316),n(318),n(319),n(320)},function(e,t){e.exports=AFRAME.registerComponent("checkpoint-controls",{schema:{enabled:{default:!0},mode:{default:"teleport",oneOf:["teleport","animate"]},animateSpeed:{default:3}},init:function(){this.active=!0,this.checkpoint=null,this.isNavMeshConstrained=!1,this.offset=new THREE.Vector3,this.position=new THREE.Vector3,this.targetPosition=new THREE.Vector3},play:function(){this.active=!0},pause:function(){this.active=!1},setCheckpoint:function(e){const t=this.el;this.active&&this.checkpoint!==e&&(this.checkpoint&&t.emit("navigation-end",{checkpoint:this.checkpoint}),this.checkpoint=e,this.sync(),this.position.distanceTo(this.targetPosition)<.1?this.checkpoint=null:(t.emit("navigation-start",{checkpoint:e}),"teleport"===this.data.mode&&(this.el.setAttribute("position",this.targetPosition),this.checkpoint=null,t.emit("navigation-end",{checkpoint:e}),t.components["movement-controls"].updateNavLocation())))},isVelocityActive:function(){return!(!this.active||!this.checkpoint)},getVelocity:function(){if(!this.active)return;const e=this.data,t=this.offset,n=this.position,r=this.targetPosition,i=this.checkpoint;return this.sync(),n.distanceTo(r)<.1?(this.checkpoint=null,this.el.emit("navigation-end",{checkpoint:i}),t.set(0,0,0)):(t.setLength(e.animateSpeed),t)},sync:function(){const e=this.offset,t=this.position,n=this.targetPosition;t.copy(this.el.getAttribute("position")),this.checkpoint.object3D.getWorldPosition(n),n.add(this.checkpoint.components.checkpoint.getOffset()),e.copy(n).sub(t)}})},function(e,t,n){const r=n(314),i=n(315),o="left",a="right",s=1,l=2;e.exports=AFRAME.registerComponent("gamepad-controls",{GamepadButton:r,schema:{enabled:{default:!0},camera:{default:"[camera]",type:"selector"},rotationSensitivity:{default:2}},init:function(){const e=this.el.sceneEl;this.system=e.systems["tracked-controls-webxr"]||{controllers:[]},this.prevTime=window.performance.now(),this.buttons={};const t=this.el.object3D.rotation;this.pitch=new THREE.Object3D,this.pitch.rotation.x=THREE.Math.degToRad(t.x),this.yaw=new THREE.Object3D,this.yaw.position.y=10,this.yaw.rotation.y=THREE.Math.degToRad(t.y),this.yaw.add(this.pitch),this._lookVector=new THREE.Vector2,this._moveVector=new THREE.Vector2,this._dpadVector=new THREE.Vector2,e.addBehavior(this)},update:function(){this.tick()},tick:function(e,t){this.updateButtonState(),this.updateRotation(t)},remove:function(){},isVelocityActive:function(){if(!this.data.enabled||!this.isConnected())return!1;const e=this._dpadVector,t=this._moveVector;this.getDpad(e),this.getJoystick(s,t);const n=e.x||t.x,r=e.y||t.y;return Math.abs(n)>.2||Math.abs(r)>.2},getVelocityDelta:function(){const e=this._dpadVector,t=this._moveVector;this.getDpad(e),this.getJoystick(s,t);const n=e.x||t.x,r=e.y||t.y,i=new THREE.Vector3;return Math.abs(n)>.2&&(i.x+=n),Math.abs(r)>.2&&(i.z+=r),i},isRotationActive:function(){if(!this.data.enabled||!this.isConnected())return!1;const e=this._lookVector;return this.getJoystick(l,e),Math.abs(e.x)>.2||Math.abs(e.y)>.2},updateRotation:function(e){if(!this.isRotationActive())return;const t=this.data,n=this.yaw,r=this.pitch,i=t.camera.components["look-controls"],o=i&&i.pitchObject&&i.yawObject;o&&(r.rotation.copy(i.pitchObject.rotation),n.rotation.copy(i.yawObject.rotation));const a=this._lookVector;this.getJoystick(l,a),Math.abs(a.x)<=.2&&(a.x=0),Math.abs(a.y)<=.2&&(a.y=0),a.multiplyScalar(t.rotationSensitivity*e/1e3),n.rotation.y-=a.x,r.rotation.x-=a.y,r.rotation.x=Math.max(-Math.PI/2,Math.min(Math.PI/2,r.rotation.x)),t.camera.object3D.rotation.set(r.rotation.x,n.rotation.y,0),o&&(i.pitchObject.rotation.copy(r.rotation),i.yawObject.rotation.copy(n.rotation))},updateButtonState:function(){const e=this.getGamepad(a);if(this.data.enabled&&e)for(var t=0;t<e.buttons.length;t++)e.buttons[t].pressed&&!this.buttons[t]?this.emit(new i("gamepadbuttondown",t,e.buttons[t])):!e.buttons[t].pressed&&this.buttons[t]&&this.emit(new i("gamepadbuttonup",t,e.buttons[t])),this.buttons[t]=e.buttons[t].pressed;else Object.keys(this.buttons)&&(this.buttons={})},emit:function(e){this.el.emit(e.type,e),this.el.emit(e.type+":"+e.index,new i(e.type,e.index,e))},getGamepad:function(){const e=[],t=[];return function(n){const r=this.el.sceneEl.components["proxy-controls"],i=r&&r.isConnected()&&r.getGamepad(0);if(i)return i;e.length=0;for(let t=0;t<this.system.controllers.length;t++){const r=this.system.controllers[t],i=r?r.gamepad:null;if(e.push(i),i&&i.handedness===n)return i}const o=navigator.getGamepads?navigator.getGamepads():t;for(let e=0;e<o.length;e++){const t=o[e];if(t&&t.hand===n)return t}return e[0]||o[0]}}(),getButton:function(e){return this.getGamepad(a).buttons[e]},getAxis:function(e){return this.getGamepad(e>1?a:o).axes[e]},getJoystick:function(e,t){const n=this.getGamepad(e===s?o:a);if("xr-standard"===n.mapping)switch(e){case s:return t.set(n.axes[2],n.axes[3]);case l:return t.set(n.axes[0],n.axes[1])}else switch(e){case s:return t.set(n.axes[0],n.axes[1]);case l:return t.set(n.axes[2],n.axes[3])}throw new Error('Unexpected joystick index "%d".',e)},getDpad:function(e){const t=this.getGamepad(o);return t.buttons[r.DPAD_RIGHT]?e.set((t.buttons[r.DPAD_RIGHT].pressed?1:0)+(t.buttons[r.DPAD_LEFT].pressed?-1:0),(t.buttons[r.DPAD_UP].pressed?-1:0)+(t.buttons[r.DPAD_DOWN].pressed?1:0)):e.set(0,0)},isConnected:function(){const e=this.getGamepad(o);return!(!e||!e.connected)},getID:function(){return this.getGamepad(o).id}})},function(e,t){e.exports=Object.assign((function(){}),{FACE_1:0,FACE_2:1,FACE_3:2,FACE_4:3,L_SHOULDER_1:4,R_SHOULDER_1:5,L_SHOULDER_2:6,R_SHOULDER_2:7,SELECT:8,START:9,DPAD_UP:12,DPAD_DOWN:13,DPAD_LEFT:14,DPAD_RIGHT:15,VENDOR:16})},function(e,t){e.exports=function(e,t,n){this.type=e,this.index=t,this.pressed=n.pressed,this.value=n.value}},function(e,t,n){n(317);const r=window.KeyboardEvent;e.exports=AFRAME.registerComponent("keyboard-controls",{schema:{enabled:{default:!0},debug:{default:!1}},init:function(){this.dVelocity=new THREE.Vector3,this.localKeys={},this.listeners={keydown:this.onKeyDown.bind(this),keyup:this.onKeyUp.bind(this),blur:this.onBlur.bind(this)},this.attachEventListeners()},isVelocityActive:function(){return this.data.enabled&&!!Object.keys(this.getKeys()).length},getVelocityDelta:function(){const e=this.data,t=this.getKeys();return this.dVelocity.set(0,0,0),e.enabled&&((t.KeyW||t.ArrowUp)&&(this.dVelocity.z-=1),(t.KeyA||t.ArrowLeft)&&(this.dVelocity.x-=1),(t.KeyS||t.ArrowDown)&&(this.dVelocity.z+=1),(t.KeyD||t.ArrowRight)&&(this.dVelocity.x+=1)),this.dVelocity.clone()},play:function(){this.attachEventListeners()},pause:function(){this.removeEventListeners()},remove:function(){this.pause()},attachEventListeners:function(){window.addEventListener("keydown",this.listeners.keydown,!1),window.addEventListener("keyup",this.listeners.keyup,!1),window.addEventListener("blur",this.listeners.blur,!1)},removeEventListeners:function(){window.removeEventListener("keydown",this.listeners.keydown),window.removeEventListener("keyup",this.listeners.keyup),window.removeEventListener("blur",this.listeners.blur)},onKeyDown:function(e){AFRAME.utils.shouldCaptureKeyEvent(e)&&(this.localKeys[e.code]=!0,this.emit(e))},onKeyUp:function(e){AFRAME.utils.shouldCaptureKeyEvent(e)&&(delete this.localKeys[e.code],this.emit(e))},onBlur:function(){for(let e in this.localKeys)this.localKeys.hasOwnProperty(e)&&delete this.localKeys[e]},emit:function(e){"__keyboard-controls-proxy"in e&&this.el.emit(e.type,e),this.el.emit(e.type+":"+e.code,new r(e.type,e)),this.data.debug&&console.log(e.type+":"+e.code)},isPressed:function(e){return e in this.getKeys()},getKeys:function(){return this.isProxied()?this.el.sceneEl.components["proxy-controls"].getKeyboard():this.localKeys},isProxied:function(){const e=this.el.sceneEl.components["proxy-controls"];return e&&e.isConnected()}})},function(e,t,n){!function(e){var t="KeyboardEvent"in e;t||(e.KeyboardEvent=function(){throw TypeError("Illegal constructor")}),"DOM_KEY_LOCATION_STANDARD"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_STANDARD=0),"DOM_KEY_LOCATION_LEFT"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_LEFT=1),"DOM_KEY_LOCATION_RIGHT"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_RIGHT=2),"DOM_KEY_LOCATION_NUMPAD"in e.KeyboardEvent||(e.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD=3);var n=window.KeyboardEvent.DOM_KEY_LOCATION_STANDARD,r=window.KeyboardEvent.DOM_KEY_LOCATION_LEFT,i=window.KeyboardEvent.DOM_KEY_LOCATION_RIGHT,o=window.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;function a(e,t){return-1!==String(e).indexOf(t)}var s=a(navigator.platform,"Win")?"win":a(navigator.platform,"Mac")?"mac":a(navigator.platform,"CrOS")?"cros":a(navigator.platform,"Linux")?"linux":a(navigator.userAgent,"iPad")||a(navigator.platform,"iPod")||a(navigator.platform,"iPhone")?"ios":"",l=a(navigator.userAgent,"Chrome/")?"chrome":a(navigator.vendor,"Apple")?"safari":a(navigator.userAgent,"MSIE")?"ie":a(navigator.userAgent,"Gecko/")?"moz":a(navigator.userAgent,"Opera/")?"opera":"",c=l+"-"+s;function u(e,t,n){c!==t&&l!==t&&s!==t||Object.keys(n).forEach((function(t){e[t]=n[t]}))}var h={3:{code:"Cancel"},6:{code:"Help"},8:{code:"Backspace"},9:{code:"Tab"},12:{code:"Clear"},13:{code:"Enter"},16:{code:"Shift"},17:{code:"Control"},18:{code:"Alt"},19:{code:"Pause"},20:{code:"CapsLock"},21:{code:"KanaMode"},22:{code:"HangulMode"},23:{code:"JunjaMode"},24:{code:"FinalMode"},25:{code:"KanjiMode"},27:{code:"Escape"},28:{code:"Convert"},29:{code:"NonConvert"},30:{code:"Accept"},31:{code:"ModeChange"},32:{code:"Space"},33:{code:"PageUp"},34:{code:"PageDown"},35:{code:"End"},36:{code:"Home"},37:{code:"ArrowLeft"},38:{code:"ArrowUp"},39:{code:"ArrowRight"},40:{code:"ArrowDown"},41:{code:"Select"},42:{code:"Print"},43:{code:"Execute"},44:{code:"PrintScreen"},45:{code:"Insert"},46:{code:"Delete"},47:{code:"Help"},48:{code:"Digit0",keyCap:"0"},49:{code:"Digit1",keyCap:"1"},50:{code:"Digit2",keyCap:"2"},51:{code:"Digit3",keyCap:"3"},52:{code:"Digit4",keyCap:"4"},53:{code:"Digit5",keyCap:"5"},54:{code:"Digit6",keyCap:"6"},55:{code:"Digit7",keyCap:"7"},56:{code:"Digit8",keyCap:"8"},57:{code:"Digit9",keyCap:"9"},65:{code:"KeyA",keyCap:"a"},66:{code:"KeyB",keyCap:"b"},67:{code:"KeyC",keyCap:"c"},68:{code:"KeyD",keyCap:"d"},69:{code:"KeyE",keyCap:"e"},70:{code:"KeyF",keyCap:"f"},71:{code:"KeyG",keyCap:"g"},72:{code:"KeyH",keyCap:"h"},73:{code:"KeyI",keyCap:"i"},74:{code:"KeyJ",keyCap:"j"},75:{code:"KeyK",keyCap:"k"},76:{code:"KeyL",keyCap:"l"},77:{code:"KeyM",keyCap:"m"},78:{code:"KeyN",keyCap:"n"},79:{code:"KeyO",keyCap:"o"},80:{code:"KeyP",keyCap:"p"},81:{code:"KeyQ",keyCap:"q"},82:{code:"KeyR",keyCap:"r"},83:{code:"KeyS",keyCap:"s"},84:{code:"KeyT",keyCap:"t"},85:{code:"KeyU",keyCap:"u"},86:{code:"KeyV",keyCap:"v"},87:{code:"KeyW",keyCap:"w"},88:{code:"KeyX",keyCap:"x"},89:{code:"KeyY",keyCap:"y"},90:{code:"KeyZ",keyCap:"z"},91:{code:"OSLeft",location:r},92:{code:"OSRight",location:i},93:{code:"ContextMenu"},95:{code:"Standby"},96:{code:"Numpad0",keyCap:"0",location:o},97:{code:"Numpad1",keyCap:"1",location:o},98:{code:"Numpad2",keyCap:"2",location:o},99:{code:"Numpad3",keyCap:"3",location:o},100:{code:"Numpad4",keyCap:"4",location:o},101:{code:"Numpad5",keyCap:"5",location:o},102:{code:"Numpad6",keyCap:"6",location:o},103:{code:"Numpad7",keyCap:"7",location:o},104:{code:"Numpad8",keyCap:"8",location:o},105:{code:"Numpad9",keyCap:"9",location:o},106:{code:"NumpadMultiply",keyCap:"*",location:o},107:{code:"NumpadAdd",keyCap:"+",location:o},108:{code:"NumpadComma",keyCap:",",location:o},109:{code:"NumpadSubtract",keyCap:"-",location:o},110:{code:"NumpadDecimal",keyCap:".",location:o},111:{code:"NumpadDivide",keyCap:"/",location:o},112:{code:"F1"},113:{code:"F2"},114:{code:"F3"},115:{code:"F4"},116:{code:"F5"},117:{code:"F6"},118:{code:"F7"},119:{code:"F8"},120:{code:"F9"},121:{code:"F10"},122:{code:"F11"},123:{code:"F12"},124:{code:"F13"},125:{code:"F14"},126:{code:"F15"},127:{code:"F16"},128:{code:"F17"},129:{code:"F18"},130:{code:"F19"},131:{code:"F20"},132:{code:"F21"},133:{code:"F22"},134:{code:"F23"},135:{code:"F24"},144:{code:"NumLock",location:o},145:{code:"ScrollLock"},160:{code:"ShiftLeft",location:r},161:{code:"ShiftRight",location:i},162:{code:"ControlLeft",location:r},163:{code:"ControlRight",location:i},164:{code:"AltLeft",location:r},165:{code:"AltRight",location:i},166:{code:"BrowserBack"},167:{code:"BrowserForward"},168:{code:"BrowserRefresh"},169:{code:"BrowserStop"},170:{code:"BrowserSearch"},171:{code:"BrowserFavorites"},172:{code:"BrowserHome"},173:{code:"VolumeMute"},174:{code:"VolumeDown"},175:{code:"VolumeUp"},176:{code:"MediaTrackNext"},177:{code:"MediaTrackPrevious"},178:{code:"MediaStop"},179:{code:"MediaPlayPause"},180:{code:"LaunchMail"},181:{code:"MediaSelect"},182:{code:"LaunchApp1"},183:{code:"LaunchApp2"},186:{code:"Semicolon",keyCap:";"},187:{code:"Equal",keyCap:"="},188:{code:"Comma",keyCap:","},189:{code:"Minus",keyCap:"-"},190:{code:"Period",keyCap:"."},191:{code:"Slash",keyCap:"/"},192:{code:"Backquote",keyCap:"`"},219:{code:"BracketLeft",keyCap:"["},220:{code:"Backslash",keyCap:"\\"},221:{code:"BracketRight",keyCap:"]"},222:{code:"Quote",keyCap:"'"},226:{code:"IntlBackslash",keyCap:"\\"},229:{code:"Process"},246:{code:"Attn"},247:{code:"CrSel"},248:{code:"ExSel"},249:{code:"EraseEof"},250:{code:"Play"},251:{code:"ZoomToggle"},254:{code:"Clear"}};u(h,"moz",{59:{code:"Semicolon",keyCap:";"},61:{code:"Equal",keyCap:"="},107:{code:"Equal",keyCap:"="},109:{code:"Minus",keyCap:"-"},187:{code:"NumpadAdd",keyCap:"+",location:o},189:{code:"NumpadSubtract",keyCap:"-",location:o}}),u(h,"moz-mac",{12:{code:"NumLock",location:o},173:{code:"Minus",keyCap:"-"}}),u(h,"moz-win",{173:{code:"Minus",keyCap:"-"}}),u(h,"chrome-mac",{93:{code:"OSRight",location:i}}),u(h,"safari",{3:{code:"Enter"},25:{code:"Tab"}}),u(h,"ios",{10:{code:"Enter",location:n}}),u(h,"safari-mac",{91:{code:"OSLeft",location:r},93:{code:"OSRight",location:i},229:{code:"KeyQ",keyCap:"Q"}});var d={};"cros"===s&&(d["U+00A0"]={code:"ShiftLeft",location:r},d["U+00A1"]={code:"ShiftRight",location:i},d["U+00A2"]={code:"ControlLeft",location:r},d["U+00A3"]={code:"ControlRight",location:i},d["U+00A4"]={code:"AltLeft",location:r},d["U+00A5"]={code:"AltRight",location:i}),"chrome-mac"===c&&(d["U+0010"]={code:"ContextMenu"}),"safari-mac"===c&&(d["U+0010"]={code:"ContextMenu"}),"ios"===s&&(d["U+0010"]={code:"Function"},d["U+001C"]={code:"ArrowLeft"},d["U+001D"]={code:"ArrowRight"},d["U+001E"]={code:"ArrowUp"},d["U+001F"]={code:"ArrowDown"},d["U+0001"]={code:"Home"},d["U+0004"]={code:"End"},d["U+000B"]={code:"PageUp"},d["U+000C"]={code:"PageDown"});var f=[];f[r]={16:{code:"ShiftLeft",location:r},17:{code:"ControlLeft",location:r},18:{code:"AltLeft",location:r}},f[i]={16:{code:"ShiftRight",location:i},17:{code:"ControlRight",location:i},18:{code:"AltRight",location:i}},f[o]={13:{code:"NumpadEnter",location:o}},u(f[o],"moz",{109:{code:"NumpadSubtract",location:o},107:{code:"NumpadAdd",location:o}}),u(f[r],"moz-mac",{224:{code:"OSLeft",location:r}}),u(f[i],"moz-mac",{224:{code:"OSRight",location:i}}),u(f[i],"moz-win",{91:{code:"OSRight",location:i}}),u(f[i],"mac",{93:{code:"OSRight",location:i}}),u(f[o],"chrome-mac",{12:{code:"NumLock",location:o}}),u(f[o],"safari-mac",{12:{code:"NumLock",location:o},187:{code:"NumpadAdd",location:o},189:{code:"NumpadSubtract",location:o},190:{code:"NumpadDecimal",location:o},191:{code:"NumpadDivide",location:o}});var p={ShiftLeft:{key:"Shift"},ShiftRight:{key:"Shift"},ControlLeft:{key:"Control"},ControlRight:{key:"Control"},AltLeft:{key:"Alt"},AltRight:{key:"Alt"},OSLeft:{key:"OS"},OSRight:{key:"OS"},NumpadEnter:{key:"Enter"},Space:{key:" "},Digit0:{key:"0",shiftKey:")"},Digit1:{key:"1",shiftKey:"!"},Digit2:{key:"2",shiftKey:"@"},Digit3:{key:"3",shiftKey:"#"},Digit4:{key:"4",shiftKey:"$"},Digit5:{key:"5",shiftKey:"%"},Digit6:{key:"6",shiftKey:"^"},Digit7:{key:"7",shiftKey:"&"},Digit8:{key:"8",shiftKey:"*"},Digit9:{key:"9",shiftKey:"("},KeyA:{key:"a",shiftKey:"A"},KeyB:{key:"b",shiftKey:"B"},KeyC:{key:"c",shiftKey:"C"},KeyD:{key:"d",shiftKey:"D"},KeyE:{key:"e",shiftKey:"E"},KeyF:{key:"f",shiftKey:"F"},KeyG:{key:"g",shiftKey:"G"},KeyH:{key:"h",shiftKey:"H"},KeyI:{key:"i",shiftKey:"I"},KeyJ:{key:"j",shiftKey:"J"},KeyK:{key:"k",shiftKey:"K"},KeyL:{key:"l",shiftKey:"L"},KeyM:{key:"m",shiftKey:"M"},KeyN:{key:"n",shiftKey:"N"},KeyO:{key:"o",shiftKey:"O"},KeyP:{key:"p",shiftKey:"P"},KeyQ:{key:"q",shiftKey:"Q"},KeyR:{key:"r",shiftKey:"R"},KeyS:{key:"s",shiftKey:"S"},KeyT:{key:"t",shiftKey:"T"},KeyU:{key:"u",shiftKey:"U"},KeyV:{key:"v",shiftKey:"V"},KeyW:{key:"w",shiftKey:"W"},KeyX:{key:"x",shiftKey:"X"},KeyY:{key:"y",shiftKey:"Y"},KeyZ:{key:"z",shiftKey:"Z"},Numpad0:{key:"0"},Numpad1:{key:"1"},Numpad2:{key:"2"},Numpad3:{key:"3"},Numpad4:{key:"4"},Numpad5:{key:"5"},Numpad6:{key:"6"},Numpad7:{key:"7"},Numpad8:{key:"8"},Numpad9:{key:"9"},NumpadMultiply:{key:"*"},NumpadAdd:{key:"+"},NumpadComma:{key:","},NumpadSubtract:{key:"-"},NumpadDecimal:{key:"."},NumpadDivide:{key:"/"},Semicolon:{key:";",shiftKey:":"},Equal:{key:"=",shiftKey:"+"},Comma:{key:",",shiftKey:"<"},Minus:{key:"-",shiftKey:"_"},Period:{key:".",shiftKey:">"},Slash:{key:"/",shiftKey:"?"},Backquote:{key:"`",shiftKey:"~"},BracketLeft:{key:"[",shiftKey:"{"},Backslash:{key:"\\",shiftKey:"|"},BracketRight:{key:"]",shiftKey:"}"},Quote:{key:"'",shiftKey:'"'},IntlBackslash:{key:"\\",shiftKey:"|"}};u(p,"mac",{OSLeft:{key:"Meta"},OSRight:{key:"Meta"}});var m={Esc:"Escape",Nonconvert:"NonConvert",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Menu:"ContextMenu",MediaNextTrack:"MediaTrackNext",MediaPreviousTrack:"MediaTrackPrevious",SelectMedia:"MediaSelect",HalfWidth:"Hankaku",FullWidth:"Zenkaku",RomanCharacters:"Romaji",Crsel:"CrSel",Exsel:"ExSel",Zoom:"ZoomToggle"},g=function(e,t){var n={};return Object.keys(e).forEach((function(r){var i=e[r];t in i&&(n[i[t]]=i)})),n}(h,"code");try{var v=t&&"location"in new KeyboardEvent("")}catch(b){}function y(e){var t="keyCode"in e?e.keyCode:"which"in e?e.which:0,n=function(){if(v||"keyLocation"in e){var n=v?e.location:e.keyLocation;if(n&&t in f[n])return f[n][t]}return"keyIdentifier"in e&&e.keyIdentifier in d?d[e.keyIdentifier]:t in h?h[t]:null}();if(!n)return null;var r=function(){var t=p[n.code];return t?e.shiftKey&&"shiftKey"in t?t.shiftKey:t.key:n.code}();return{code:n.code,key:r,location:n.location,keyCap:n.keyCap}}"KeyboardEvent"in e&&"defineProperty"in Object&&function(){function e(e,t,n){t in e||Object.defineProperty(e,t,n)}if(e(KeyboardEvent.prototype,"code",{get:function(){var e=y(this);return e?e.code:""}}),"key"in KeyboardEvent.prototype){var t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,"key");Object.defineProperty(KeyboardEvent.prototype,"key",{get:function(){var e=t.get.call(this);return m.hasOwnProperty(e)?m[e]:e}})}e(KeyboardEvent.prototype,"key",{get:function(){var e=y(this);return e&&"key"in e?e.key:"Unidentified"}}),e(KeyboardEvent.prototype,"location",{get:function(){var e=y(this);return e&&"location"in e?e.location:n}}),e(KeyboardEvent.prototype,"locale",{get:function(){return""}})}(),"queryKeyCap"in e.KeyboardEvent||(e.KeyboardEvent.queryKeyCap=function(e,t){if(e=String(e),!g.hasOwnProperty(e))return"Undefined";if(t&&"en-us"!==String(t).toLowerCase())throw Error("Unsupported locale");var n=g[e];return n.keyCap||n.code||"Undefined"}),e.identifyKey=function(e){if(!("code"in e)){var t=y(e);e.code=t?t.code:"",e.key=t&&"key"in t?t.key:"Unidentified",e.location="location"in e?e.location:"keyLocation"in e?e.keyLocation:t&&"location"in t?t.location:n,e.locale=""}}}(window)},function(e,t){e.exports=AFRAME.registerComponent("touch-controls",{schema:{enabled:{default:!0},reverseEnabled:{default:!0}},init:function(){this.dVelocity=new THREE.Vector3,this.bindMethods(),this.direction=0},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.dVelocity.set(0,0,0)},remove:function(){this.pause()},addEventListeners:function(){const e=this.el.sceneEl,t=e.canvas;t?(t.addEventListener("touchstart",this.onTouchStart),t.addEventListener("touchend",this.onTouchEnd)):e.addEventListener("render-target-loaded",this.addEventListeners.bind(this))},removeEventListeners:function(){const e=this.el.sceneEl&&this.el.sceneEl.canvas;e&&(e.removeEventListener("touchstart",this.onTouchStart),e.removeEventListener("touchend",this.onTouchEnd))},isVelocityActive:function(){return this.data.enabled&&!!this.direction},getVelocityDelta:function(){return this.dVelocity.z=this.direction,this.dVelocity.clone()},bindMethods:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)},onTouchStart:function(e){this.direction=-1,this.data.reverseEnabled&&2===e.touches.length&&(this.direction=1),e.preventDefault()},onTouchEnd:function(e){this.direction=0,e.preventDefault()}})},function(e,t){e.exports=AFRAME.registerComponent("movement-controls",{dependencies:["rotation"],schema:{enabled:{default:!0},controls:{default:["gamepad","trackpad","keyboard","touch"]},speed:{default:.3,min:0},fly:{default:!1},constrainToNavMesh:{default:!1},camera:{default:"[movement-controls] [camera]",type:"selector"}},init:function(){const e=this.el;this.velocityCtrl=null,this.velocity=new THREE.Vector3,this.heading=new THREE.Quaternion,this.navGroup=null,this.navNode=null,e.sceneEl.hasLoaded?this.injectControls():e.sceneEl.addEventListener("loaded",this.injectControls.bind(this))},update:function(e){const t=this.el,n=this.data,r=t.sceneEl.systems.nav;t.sceneEl.hasLoaded&&this.injectControls(),r&&n.constrainToNavMesh!==e.constrainToNavMesh&&(n.constrainToNavMesh?r.addAgent(this):r.removeAgent(this))},injectControls:function(){const e=this.data;var t;for(let n=0;n<e.controls.length;n++)t=e.controls[n]+"-controls",this.el.components[t]||this.el.setAttribute(t,"")},updateNavLocation:function(){this.navGroup=null,this.navNode=null},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i){if(!i)return;const o=this.el,a=this.data;if(!a.enabled)return;this.updateVelocityCtrl();const s=this.velocityCtrl,l=this.velocity;if(s)if(i/1e3>.2?l.set(0,0,0):this.updateVelocity(i),a.constrainToNavMesh&&!1!==s.isNavMeshConstrained){if(l.lengthSq()<1e-5)return;e.copy(o.object3D.position),t.copy(l).multiplyScalar(i/1e3).add(e);const r=o.sceneEl.systems.nav;this.navGroup=null===this.navGroup?r.getGroup(e):this.navGroup,this.navNode=this.navNode||r.getNode(e,this.navGroup),this.navNode=r.clampStep(e,t,this.navGroup,this.navNode,n),o.object3D.position.copy(n)}else o.hasAttribute("velocity")?o.setAttribute("velocity",l):(o.object3D.position.x+=l.x*i/1e3,o.object3D.position.y+=l.y*i/1e3,o.object3D.position.z+=l.z*i/1e3)}}(),updateVelocityCtrl:function(){const e=this.data;if(e.enabled){for(let t=0,n=e.controls.length;t<n;t++){const n=this.el.components[e.controls[t]+"-controls"];if(n&&n.isVelocityActive())return void(this.velocityCtrl=n)}this.velocityCtrl=null}},updateVelocity:function(){const e=new THREE.Vector2,t=new THREE.Quaternion;return function(n){let r;const i=this.el,o=this.velocityCtrl,a=this.velocity,s=this.data;if(o){if(!o.getVelocityDelta){if(o.getVelocity)return void a.copy(o.getVelocity());if(o.getPositionDelta)return void a.copy(o.getPositionDelta(n).multiplyScalar(1e3/n));throw new Error("Incompatible movement controls: ",o)}r=o.getVelocityDelta(n)}if(i.hasAttribute("velocity")&&!s.constrainToNavMesh&&a.copy(this.el.getAttribute("velocity")),r&&s.enabled){const n=s.camera;t.copy(n.object3D.quaternion),t.premultiply(i.object3D.quaternion),r.applyQuaternion(t);const o=r.length();s.fly?(a.copy(r),a.multiplyScalar(16.66667*this.data.speed)):(e.set(r.x,r.z),e.setLength(o*this.data.speed*16.66667),a.x=e.x,a.z=e.y)}}}()})},function(e,t){e.exports=AFRAME.registerComponent("trackpad-controls",{schema:{enabled:{default:!0},enableNegX:{default:!0},enablePosX:{default:!0},enableNegZ:{default:!0},enablePosZ:{default:!0},mode:{default:"touch",oneOf:["swipe","touch","press"]}},init:function(){this.dVelocity=new THREE.Vector3,this.zVel=0,this.xVel=0,this.bindMethods()},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.dVelocity.set(0,0,0)},remove:function(){this.pause()},addEventListeners:function(){const e=this.data,t=this.el.sceneEl;switch(t.addEventListener("axismove",this.onAxisMove),e.mode){case"swipe":case"touch":t.addEventListener("trackpadtouchstart",this.onTouchStart),t.addEventListener("trackpadtouchend",this.onTouchEnd);break;case"press":t.addEventListener("trackpaddown",this.onTouchStart),t.addEventListener("trackpadup",this.onTouchEnd)}},removeEventListeners:function(){const e=this.el.sceneEl;e.removeEventListener("axismove",this.onAxisMove),e.removeEventListener("trackpadtouchstart",this.onTouchStart),e.removeEventListener("trackpadtouchend",this.onTouchEnd),e.removeEventListener("trackpaddown",this.onTouchStart),e.removeEventListener("trackpadup",this.onTouchEnd)},isVelocityActive:function(){return this.data.enabled&&this.isMoving},getVelocityDelta:function(){return this.dVelocity.z=this.isMoving?-this.zVel:1,this.dVelocity.x=this.isMoving?this.xVel:1,this.dVelocity.clone()},bindMethods:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onAxisMove=this.onAxisMove.bind(this)},onTouchStart:function(e){switch(this.data.mode){case"swipe":this.canRecordAxis=!0,this.startingAxisData=[];break;case"touch":case"press":this.isMoving=!0}e.preventDefault()},onTouchEnd:function(e){"swipe"==this.data.mode&&(this.startingAxisData=[]),this.isMoving=!1,e.preventDefault()},onAxisMove:function(e){switch(this.data.mode){case"swipe":return this.handleSwipeAxis(e);case"touch":case"press":return this.handleTouchAxis(e)}},handleSwipeAxis:function(e){const t=this.data,n=e.detail.axis;if(0===this.startingAxisData.length&&this.canRecordAxis&&(this.canRecordAxis=!1,this.startingAxisData[0]=n[0],this.startingAxisData[1]=n[1]),this.startingAxisData.length>0){let e=0,r=0;t.enableNegX&&n[0]<this.startingAxisData[0]&&(e=-1),t.enablePosX&&n[0]>this.startingAxisData[0]&&(e=1),t.enablePosZ&&n[1]>this.startingAxisData[1]&&(r=-1),t.enableNegZ&&n[1]<this.startingAxisData[1]&&(r=1);const i=Math.abs(this.startingAxisData[1]-n[1]);Math.abs(this.startingAxisData[0]-n[0])>i?(this.zVel=0,this.xVel=e,this.isMoving=!0):(this.xVel=0,this.zVel=r,this.isMoving=!0)}},handleTouchAxis:function(e){const t=this.data,n=e.detail.axis;let r=0,i=0;t.enableNegX&&n[0]<0&&(r=-1),t.enablePosX&&n[0]>0&&(r=1),t.enablePosZ&&n[1]>0&&(i=-1),t.enableNegZ&&n[1]<0&&(i=1),Math.abs(n[0])>Math.abs(n[1])?(this.zVel=0,this.xVel=r):(this.xVel=0,this.zVel=i)}})},function(e,t,n){n(322),n(323),n(325),n(327),n(329)},function(e,t){const n={once:THREE.LoopOnce,repeat:THREE.LoopRepeat,pingpong:THREE.LoopPingPong};function r(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}e.exports=AFRAME.registerComponent("animation-mixer",{schema:{clip:{default:"*"},duration:{default:0},clampWhenFinished:{default:!1,type:"boolean"},crossFadeDuration:{default:0},loop:{default:"repeat",oneOf:Object.keys(n)},repetitions:{default:1/0,min:0},timeScale:{default:1}},init:function(){this.model=null,this.mixer=null,this.activeActions=[];const e=this.el.getObject3D("mesh");e?this.load(e):this.el.addEventListener("model-loaded",e=>{this.load(e.detail.model)})},load:function(e){const t=this.el;this.model=e,this.mixer=new THREE.AnimationMixer(e),this.mixer.addEventListener("loop",e=>{t.emit("animation-loop",{action:e.action,loopDelta:e.loopDelta})}),this.mixer.addEventListener("finished",e=>{t.emit("animation-finished",{action:e.action,direction:e.direction})}),this.data.clip&&this.update({})},remove:function(){this.mixer&&this.mixer.stopAllAction()},update:function(e){if(!e)return;const t=this.data,r=AFRAME.utils.diff(t,e);if("clip"in r)return this.stopAction(),void(t.clip&&this.playAction());this.activeActions.forEach(e=>{"duration"in r&&t.duration&&e.setDuration(t.duration),"clampWhenFinished"in r&&(e.clampWhenFinished=t.clampWhenFinished),("loop"in r||"repetitions"in r)&&e.setLoop(n[t.loop],t.repetitions),"timeScale"in r&&e.setEffectiveTimeScale(t.timeScale)})},stopAction:function(){const e=this.data;for(let t=0;t<this.activeActions.length;t++)e.crossFadeDuration?this.activeActions[t].fadeOut(e.crossFadeDuration):this.activeActions[t].stop();this.activeActions.length=0},playAction:function(){if(!this.mixer)return;const e=this.model,t=this.data,i=e.animations||(e.geometry||{}).animations||[];if(!i.length)return;const o=(a=t.clip,new RegExp("^"+a.split(/\*+/).map(r).join(".*")+"$"));var a;for(let r,s=0;r=i[s];s++)if(r.name.match(o)){const i=this.mixer.clipAction(r,e);i.enabled=!0,i.clampWhenFinished=t.clampWhenFinished,t.duration&&i.setDuration(t.duration),1!==t.timeScale&&i.setEffectiveTimeScale(t.timeScale),i.setLoop(n[t.loop],t.repetitions).fadeIn(t.crossFadeDuration).play(),this.activeActions.push(i)}},tick:function(e,t){this.mixer&&!isNaN(t)&&this.mixer.update(t/1e3)}})},function(e,t,n){THREE.ColladaLoader=n(324),e.exports.Component=AFRAME.registerComponent("collada-model-legacy",{schema:{type:"asset"},init:function(){this.model=null,this.loader=new THREE.ColladaLoader},update:function(){var e=this,t=this.el,n=this.data,r=this.el.sceneEl.systems.renderer;n&&(this.remove(),this.loader.load(n,(function(n){e.model=n.scene,e.model.traverse((function(e){if(e.isMesh){var t=e.material;t.color&&r.applyColorCorrection(t.color),t.map&&r.applyColorCorrection(t.map),t.emissive&&r.applyColorCorrection(t.emissive),t.emissiveMap&&r.applyColorCorrection(t.emissiveMap)}})),t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"collada",model:e.model})})))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t){e.exports=THREE.ColladaLoader=function(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager},THREE.ColladaLoader.prototype={constructor:THREE.ColladaLoader,crossOrigin:"anonymous",load:function(e,t,n,r){var i=this,o=void 0===i.path?THREE.LoaderUtils.extractUrlBase(e):i.path,a=new THREE.FileLoader(i.manager);a.setPath(i.path),a.load(e,(function(e){t(i.parse(e,o))}),n,r)},setPath:function(e){return this.path=e,this},setResourcePath:function(e){return this.resourcePath=e,this},options:{set convertUpAxis(e){console.warn("THREE.ColladaLoader: options.convertUpAxis() has been removed. Up axis is converted automatically.")}},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(e,t){function n(e,t){for(var n=[],r=e.childNodes,i=0,o=r.length;i<o;i++){var a=r[i];a.nodeName===t&&n.push(a)}return n}function r(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=t[r];return n}function i(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=parseFloat(t[r]);return n}function o(e){if(0===e.length)return[];for(var t=e.trim().split(/\s+/),n=new Array(t.length),r=0,i=t.length;r<i;r++)n[r]=parseInt(t[r]);return n}function a(e){return e.substring(1)}function s(e){return 0===Object.keys(e).length}function l(e){return void 0!==e&&!0===e.hasAttribute("meter")?parseFloat(e.getAttribute("meter")):1}function c(e){return void 0!==e?e.textContent:"Y_UP"}function u(e,t,r,i){var o=n(e,t)[0];if(void 0!==o)for(var a=n(o,r),s=0;s<a.length;s++)i(a[s])}function h(e,t){for(var n in e){e[n].build=t(e[n])}}function d(e,t){return void 0!==e.build||(e.build=t(e)),e.build}function f(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var o=a(i.getAttribute("source")),s=i.getAttribute("semantic");t.inputs[s]=o}}return t}function p(e){var t={},n=e.getAttribute("target").split("/"),r=n.shift(),i=n.shift(),o=-1!==i.indexOf("("),s=-1!==i.indexOf(".");if(s)n=i.split("."),i=n.shift(),t.member=n.shift();else if(o){var l=i.split("(");i=l.shift();for(var c=0;c<l.length;c++)l[c]=parseInt(l[c].replace(/\)/,""));t.indices=l}return t.id=r,t.sid=i,t.arraySyntax=o,t.memberSyntax=s,t.sampler=a(e.getAttribute("source")),t}function m(e){var t=[],n=e.channels,r=e.samplers,i=e.sources;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o],s=r[a.sampler],l=s.inputs.INPUT,c=s.inputs.OUTPUT;x(v(a,i[l],i[c]),t)}return t}function g(e){return d(qe.animations[e],m)}function v(e,t,n){var r,i,o,a,s,l,c=qe.nodes[e.id],u=Ie(c.id),h=c.transforms[e.sid],d=c.matrix.clone().transpose(),f={};switch(h){case"matrix":for(o=0,a=t.array.length;o<a;o++)if(r=t.array[o],i=o*n.stride,void 0===f[r]&&(f[r]={}),!0===e.arraySyntax){var p=n.array[i],m=e.indices[0]+4*e.indices[1];f[r][m]=p}else for(s=0,l=n.stride;s<l;s++)f[r][s]=n.array[i+s];break;case"translate":case"rotate":case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',h)}var g=function(e,t){var n=[];for(var r in e)n.push({time:parseFloat(r),value:e[r]});n.sort((function(e,t){return e.time-t.time}));for(var i=0;i<16;i++)_(n,i,t.elements[i]);return n}(f,d);return{name:u.uuid,keyframes:g}}var y=new THREE.Vector3,b=new THREE.Vector3,w=new THREE.Quaternion;function x(e,t){for(var n=e.keyframes,r=e.name,i=[],o=[],a=[],s=[],l=0,c=n.length;l<c;l++){var u=n[l],h=u.time,d=u.value;Ae.fromArray(d).transpose(),Ae.decompose(y,w,b),i.push(h),o.push(y.x,y.y,y.z),a.push(w.x,w.y,w.z,w.w),s.push(b.x,b.y,b.z)}return o.length>0&&t.push(new THREE.VectorKeyframeTrack(r+".position",i,o)),a.length>0&&t.push(new THREE.QuaternionKeyframeTrack(r+".quaternion",i,a)),s.length>0&&t.push(new THREE.VectorKeyframeTrack(r+".scale",i,s)),t}function _(e,t,n){var r,i,o,a=!0;for(i=0,o=e.length;i<o;i++)void 0===(r=e[i]).value[t]?r.value[t]=null:a=!1;if(!0===a)for(i=0,o=e.length;i<o;i++)(r=e[i]).value[t]=n;else!function(e,t){for(var n,r,i=0,o=e.length;i<o;i++){var a=e[i];if(null===a.value[t]){if(n=E(e,i,t),r=A(e,i,t),null===n){a.value[t]=r.value[t];continue}if(null===r){a.value[t]=n.value[t];continue}S(a,n,r,t)}}}(e,t)}function E(e,t,n){for(;t>=0;){var r=e[t];if(null!==r.value[n])return r;t--}return null}function A(e,t,n){for(;t<e.length;){var r=e[t];if(null!==r.value[n])return r;t++}return null}function S(e,t,n,r){n.time-t.time!==0?e.value[r]=(e.time-t.time)*(n.value[r]-t.value[r])/(n.time-t.time)+t.value[r]:e.value[r]=t.value[r]}function M(e){for(var t=[],n=e.name,r=e.end-e.start||-1,i=e.animations,o=0,a=i.length;o<a;o++)for(var s=g(i[o]),l=0,c=s.length;l<c;l++)t.push(s[l]);return new THREE.AnimationClip(n,r,t)}function T(e){return d(qe.clips[e],M)}function C(e){for(var t={sources:{}},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"bind_shape_matrix":t.bindShapeMatrix=i(o.textContent);break;case"source":var a=o.getAttribute("id");t.sources[a]=ie(o);break;case"joints":t.joints=O(o);break;case"vertex_weights":t.vertexWeights=R(o)}}return t}function O(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var o=i.getAttribute("semantic"),s=a(i.getAttribute("source"));t.inputs[o]=s}}return t}function R(e){for(var t={inputs:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var s=i.getAttribute("semantic"),l=a(i.getAttribute("source")),c=parseInt(i.getAttribute("offset"));t.inputs[s]={id:l,offset:c};break;case"vcount":t.vcount=o(i.textContent);break;case"v":t.v=o(i.textContent)}}return t}function k(e){var t={id:e.id},n=qe.geometries[t.id];return void 0!==e.skin&&(t.skin=function(e){var t,n,r,i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},o=e.sources,a=e.vertexWeights,s=a.vcount,l=a.v,c=a.inputs.JOINT.offset,u=a.inputs.WEIGHT.offset,h=e.sources[e.joints.inputs.JOINT],d=e.sources[e.joints.inputs.INV_BIND_MATRIX],f=o[a.inputs.WEIGHT.id].array,p=0;for(t=0,r=s.length;t<r;t++){var m=s[t],g=[];for(n=0;n<m;n++){var v=l[p+c],y=l[p+u],b=f[y];g.push({index:v,weight:b}),p+=2}for(g.sort(E),n=0;n<4;n++){var w=g[n];void 0!==w?(i.indices.array.push(w.index),i.weights.array.push(w.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}e.bindShapeMatrix?i.bindMatrix=(new THREE.Matrix4).fromArray(e.bindShapeMatrix).transpose():i.bindMatrix=(new THREE.Matrix4).identity();for(t=0,r=h.array.length;t<r;t++){var x=h.array[t],_=(new THREE.Matrix4).fromArray(d.array,t*d.stride).transpose();i.joints.push({name:x,boneInverse:_})}return i;function E(e,t){return t.weight-e.weight}}(e.skin),n.sources.skinIndices=t.skin.indices,n.sources.skinWeights=t.skin.weights),t}function P(e){return void 0!==e.build?e.build:e.init_from}function L(e){var t=qe.images[e];return void 0!==t?d(t,P):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",e),null)}function D(e){for(var t={surfaces:{},samplers:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"newparam":I(i,t);break;case"technique":t.technique=B(i);break;case"extra":t.extra=G(i)}}return t}function I(e,t){for(var n=e.getAttribute("sid"),r=0,i=e.childNodes.length;r<i;r++){var o=e.childNodes[r];if(1===o.nodeType)switch(o.nodeName){case"surface":t.surfaces[n]=N(o);break;case"sampler2D":t.samplers[n]=j(o)}}}function N(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"init_from":t.init_from=i.textContent}}return t}function j(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"source":t.source=i.textContent}}return t}function B(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"constant":case"lambert":case"blinn":case"phong":t.type=i.nodeName,t.parameters=F(i)}}return t}function F(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":t[i.nodeName]=z(i);break;case"transparent":t[i.nodeName]={opaque:i.getAttribute("opaque"),data:z(i)}}}return t}function z(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"color":t[o.nodeName]=i(o.textContent);break;case"float":t[o.nodeName]=parseFloat(o.textContent);break;case"texture":t[o.nodeName]={id:o.getAttribute("texture"),extra:H(o)}}}return t}function H(e){for(var t={technique:{}},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"extra":U(i,t)}}return t}function U(e,t){for(var n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique":V(i,t)}}}function V(e,t){for(var n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":t.technique[i.nodeName]=parseFloat(i.textContent);break;case"wrapU":case"wrapV":"TRUE"===i.textContent.toUpperCase()?t.technique[i.nodeName]=1:"FALSE"===i.textContent.toUpperCase()?t.technique[i.nodeName]=0:t.technique[i.nodeName]=parseInt(i.textContent)}}}function G(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique":t.technique=W(i)}}return t}function W(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"double_sided":t[i.nodeName]=parseInt(i.textContent)}}return t}function q(e){return e}function X(e){var t,n,r=(t=e.url,d(qe.effects[t],q)),i=r.profile.technique,o=r.profile.extra;switch(i.type){case"phong":case"blinn":n=new THREE.MeshPhongMaterial;break;case"lambert":n=new THREE.MeshLambertMaterial;break;default:n=new THREE.MeshBasicMaterial}function a(e){var t=r.profile.samplers[e.id],n=null;void 0!==t?n=L(r.profile.surfaces[t.source].init_from):(console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),n=L(e.id));if(null!==n){var i=function(e){var t,n=e.slice(2+(e.lastIndexOf(".")-1>>>0));switch(n=n.toLowerCase()){case"tga":t=ze;break;default:t=Ue}return t}(n);if(void 0!==i){var o=i.load(n),a=e.extra;if(void 0!==a&&void 0!==a.technique&&!1===s(a.technique)){var l=a.technique;o.wrapS=l.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,o.wrapT=l.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,o.offset.set(l.offsetU||0,l.offsetV||0),o.repeat.set(l.repeatU||1,l.repeatV||1)}else o.wrapS=THREE.RepeatWrapping,o.wrapT=THREE.RepeatWrapping;return o}return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",n),null}return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",e.id),null}n.name=e.name;var l=i.parameters;for(var c in l){var u=l[c];switch(c){case"diffuse":u.color&&n.color.fromArray(u.color),u.texture&&(n.map=a(u.texture));break;case"specular":u.color&&n.specular&&n.specular.fromArray(u.color),u.texture&&(n.specularMap=a(u.texture));break;case"bump":u.texture&&(n.normalMap=a(u.texture));break;case"ambient":u.texture&&(n.lightMap=a(u.texture));break;case"shininess":u.float&&n.shininess&&(n.shininess=u.float);break;case"emission":u.color&&n.emissive&&n.emissive.fromArray(u.color),u.texture&&(n.emissiveMap=a(u.texture))}}var h=l.transparent,f=l.transparency;if(void 0===f&&h&&(f={float:1}),void 0===h&&f&&(h={opaque:"A_ONE",data:{color:[1,1,1,1]}}),h&&f)if(h.data.texture)n.transparent=!0;else{var p=h.data.color;switch(h.opaque){case"A_ONE":n.opacity=p[3]*f.float;break;case"RGB_ZERO":n.opacity=1-p[0]*f.float;break;case"A_ZERO":n.opacity=1-p[3]*f.float;break;case"RGB_ONE":n.opacity=p[0]*f.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',h.opaque)}n.opacity<1&&(n.transparent=!0)}return void 0!==o&&void 0!==o.technique&&1===o.technique.double_sided&&(n.side=THREE.DoubleSide),n}function Y(e){return d(qe.materials[e],X)}function K(e){for(var t=0;t<e.childNodes.length;t++){var n=e.childNodes[t];switch(n.nodeName){case"technique_common":return Q(n)}}return{}}function Q(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"perspective":case"orthographic":t.technique=r.nodeName,t.parameters=Z(r)}}return t}function Z(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":t[r.nodeName]=parseFloat(r.textContent)}}return t}function J(e){var t;switch(e.optics.technique){case"perspective":t=new THREE.PerspectiveCamera(e.optics.parameters.yfov,e.optics.parameters.aspect_ratio,e.optics.parameters.znear,e.optics.parameters.zfar);break;case"orthographic":var n=e.optics.parameters.ymag,r=e.optics.parameters.xmag,i=e.optics.parameters.aspect_ratio;r=void 0===r?n*i:r,n=void 0===n?r/i:n,r*=.5,n*=.5,t=new THREE.OrthographicCamera(-r,r,n,-n,e.optics.parameters.znear,e.optics.parameters.zfar);break;default:t=new THREE.PerspectiveCamera}return t.name=e.name,t}function $(e){var t=qe.cameras[e];return void 0!==t?d(t,J):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",e),null)}function ee(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"directional":case"point":case"spot":case"ambient":t.technique=i.nodeName,t.parameters=te(i)}}return t}function te(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"color":var a=i(o.textContent);t.color=(new THREE.Color).fromArray(a);break;case"falloff_angle":t.falloffAngle=parseFloat(o.textContent);break;case"quadratic_attenuation":var s=parseFloat(o.textContent);t.distance=s?Math.sqrt(1/s):0}}return t}function ne(e){var t;switch(e.technique){case"directional":t=new THREE.DirectionalLight;break;case"point":t=new THREE.PointLight;break;case"spot":t=new THREE.SpotLight;break;case"ambient":t=new THREE.AmbientLight}return e.parameters.color&&t.color.copy(e.parameters.color),e.parameters.distance&&(t.distance=e.parameters.distance),t}function re(e){var t=qe.lights[e];return void 0!==t?d(t,ne):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",e),null)}function ie(e){for(var t={array:[],stride:3},o=0;o<e.childNodes.length;o++){var a=e.childNodes[o];if(1===a.nodeType)switch(a.nodeName){case"float_array":t.array=i(a.textContent);break;case"Name_array":t.array=r(a.textContent);break;case"technique_common":var s=n(a,"accessor")[0];void 0!==s&&(t.stride=parseInt(s.getAttribute("stride")))}}return t}function oe(e){for(var t={},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];1===r.nodeType&&(t[r.getAttribute("semantic")]=a(r.getAttribute("source")))}return t}function ae(e){for(var t={type:e.nodeName,material:e.getAttribute("material"),count:parseInt(e.getAttribute("count")),inputs:{},stride:0,hasUV:!1},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"input":var s=a(i.getAttribute("source")),l=i.getAttribute("semantic"),c=parseInt(i.getAttribute("offset")),u=parseInt(i.getAttribute("set")),h=u>0?l+u:l;t.inputs[h]={id:s,offset:c},t.stride=Math.max(t.stride,c+1),"TEXCOORD"===l&&(t.hasUV=!0);break;case"vcount":t.vcount=o(i.textContent);break;case"p":t.p=o(i.textContent)}}return t}function se(e){for(var t=0,n=0,r=e.length;n<r;n++){!0===e[n].hasUV&&t++}t>0&&t<e.length&&(e.uvsNeedsFix=!0)}function le(e){var t={},n=e.sources,r=e.vertices,i=e.primitives;if(0===i.length)return{};var o=function(e){for(var t={},n=0;n<e.length;n++){var r=e[n];void 0===t[r.type]&&(t[r.type]=[]),t[r.type].push(r)}return t}(i);for(var a in o){var s=o[a];se(s),t[a]=ce(s,n,r)}return t}function ce(e,t,n){for(var r={},i={array:[],stride:0},o={array:[],stride:0},a={array:[],stride:0},s={array:[],stride:0},l={array:[],stride:0},c=[],u=4,h=[],d=4,f=new THREE.BufferGeometry,p=[],m=0,g=0;g<e.length;g++){var v=e[g],y=v.inputs,b=0;switch(v.type){case"lines":case"linestrips":b=2*v.count;break;case"triangles":b=3*v.count;break;case"polylist":for(var w=0;w<v.count;w++){var x=v.vcount[w];switch(x){case 3:b+=3;break;case 4:b+=6;break;default:b+=3*(x-2)}}break;default:console.warn("THREE.ColladaLoader: Unknow primitive type:",v.type)}for(var _ in f.addGroup(m,b,g),m+=b,v.material&&p.push(v.material),y){var E=y[_];switch(_){case"VERTEX":for(var A in n){var S=n[A];switch(A){case"POSITION":var M=i.array.length;if(ue(v,t[S],E.offset,i.array),i.stride=t[S].stride,t.skinWeights&&t.skinIndices&&(ue(v,t.skinIndices,E.offset,c),ue(v,t.skinWeights,E.offset,h)),!1===v.hasUV&&!0===e.uvsNeedsFix){b=(i.array.length-M)/i.stride;for(var T=0;T<b;T++)a.array.push(0,0)}break;case"NORMAL":ue(v,t[S],E.offset,o.array),o.stride=t[S].stride;break;case"COLOR":ue(v,t[S],E.offset,l.array),l.stride=t[S].stride;break;case"TEXCOORD":ue(v,t[S],E.offset,a.array),a.stride=t[S].stride;break;case"TEXCOORD1":ue(v,t[S],E.offset,s.array),a.stride=t[S].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',A)}}break;case"NORMAL":ue(v,t[E.id],E.offset,o.array),o.stride=t[E.id].stride;break;case"COLOR":ue(v,t[E.id],E.offset,l.array),l.stride=t[E.id].stride;break;case"TEXCOORD":ue(v,t[E.id],E.offset,a.array),a.stride=t[E.id].stride;break;case"TEXCOORD1":ue(v,t[E.id],E.offset,s.array),s.stride=t[E.id].stride}}}return i.array.length>0&&f.addAttribute("position",new THREE.Float32BufferAttribute(i.array,i.stride)),o.array.length>0&&f.addAttribute("normal",new THREE.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&f.addAttribute("color",new THREE.Float32BufferAttribute(l.array,l.stride)),a.array.length>0&&f.addAttribute("uv",new THREE.Float32BufferAttribute(a.array,a.stride)),s.array.length>0&&f.addAttribute("uv2",new THREE.Float32BufferAttribute(s.array,s.stride)),c.length>0&&f.addAttribute("skinIndex",new THREE.Float32BufferAttribute(c,u)),h.length>0&&f.addAttribute("skinWeight",new THREE.Float32BufferAttribute(h,d)),r.data=f,r.type=e[0].type,r.materialKeys=p,r}function ue(e,t,n,r){var i=e.p,o=e.stride,a=e.vcount;function s(e){for(var t=i[e+n]*c,o=t+c;t<o;t++)r.push(l[t])}var l=t.array,c=t.stride;if(void 0!==e.vcount)for(var u=0,h=0,d=a.length;h<d;h++){var f=a[h];if(4===f){var p=u+1*o,m=u+2*o,g=u+3*o;s(u+0*o),s(p),s(g),s(p),s(m),s(g)}else if(3===f){p=u+1*o,m=u+2*o;s(u+0*o),s(p),s(m)}else if(f>4)for(var v=1,y=f-2;v<=y;v++){p=u+o*v,m=u+o*(v+1);s(u+0*o),s(p),s(m)}u+=o*f}else for(h=0,d=i.length;h<d;h+=o)s(h)}function he(e){return d(qe.geometries[e],le)}function de(e){return void 0!==e.build?e.build:e}function fe(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"joint":t.joints[r.getAttribute("sid")]=pe(r);break;case"link":t.links.push(ge(r))}}}function pe(e){for(var t,n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"prismatic":case"revolute":t=me(r)}}return t}function me(e,t){t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",axis:new THREE.Vector3,limits:{min:0,max:0},type:e.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"axis":var o=i(r.textContent);t.axis.fromArray(o);break;case"limits":var a=r.getElementsByTagName("max")[0],s=r.getElementsByTagName("min")[0];t.limits.max=parseFloat(a.textContent),t.limits.min=parseFloat(s.textContent)}}return t.limits.min>=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}function ge(e){for(var t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",attachments:[],transforms:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"attachment_full":t.attachments.push(ve(r));break;case"matrix":case"translate":case"rotate":t.transforms.push(ye(r))}}return t}function ve(e){for(var t={joint:e.getAttribute("joint").split("/").pop(),transforms:[],links:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"link":t.links.push(ge(r));break;case"matrix":case"translate":case"rotate":t.transforms.push(ye(r))}}return t}function ye(e){var t={type:e.nodeName},n=i(e.textContent);switch(t.type){case"matrix":t.obj=new THREE.Matrix4,t.obj.fromArray(n).transpose();break;case"translate":t.obj=new THREE.Vector3,t.obj.fromArray(n);break;case"rotate":t.obj=new THREE.Vector3,t.obj.fromArray(n),t.angle=THREE.Math.degToRad(n[3])}return t}function be(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"technique_common":we(r,t)}}}function we(e,t){for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"inertia":t.inertia=i(r.textContent);break;case"mass":t.mass=i(r.textContent)[0]}}}function xe(e){for(var t={target:e.getAttribute("target").split("/").pop()},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"axis":var i=r.getElementsByTagName("param")[0];t.axis=i.textContent;var o=t.axis.split("inst_").pop().split("axis")[0];t.jointIndex=o.substr(0,o.length-1)}}return t}function _e(e){return void 0!==e.build?e.build:e}function Ee(e){for(var t=[],n=Be.querySelector('[id="'+e.id+'"]'),r=0;r<n.childNodes.length;r++){var o=n.childNodes[r];if(1===o.nodeType)switch(o.nodeName){case"matrix":var a=i(o.textContent),s=(new THREE.Matrix4).fromArray(a).transpose();t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:s});break;case"translate":case"scale":a=i(o.textContent);var l=(new THREE.Vector3).fromArray(a);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:l});break;case"rotate":a=i(o.textContent),l=(new THREE.Vector3).fromArray(a);var c=THREE.Math.degToRad(a[3]);t.push({sid:o.getAttribute("sid"),type:o.nodeName,obj:l,angle:c})}}return t}var Ae=new THREE.Matrix4,Se=new THREE.Vector3;function Me(e){for(var t={name:e.getAttribute("name")||"",type:e.getAttribute("type"),id:e.getAttribute("id"),sid:e.getAttribute("sid"),matrix:new THREE.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"node":t.nodes.push(r.getAttribute("id")),Me(r);break;case"instance_camera":t.instanceCameras.push(a(r.getAttribute("url")));break;case"instance_controller":t.instanceControllers.push(Te(r));break;case"instance_light":t.instanceLights.push(a(r.getAttribute("url")));break;case"instance_geometry":t.instanceGeometries.push(Te(r));break;case"instance_node":t.instanceNodes.push(a(r.getAttribute("url")));break;case"matrix":var o=i(r.textContent);t.matrix.multiply(Ae.fromArray(o).transpose()),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"translate":o=i(r.textContent);Se.fromArray(o),t.matrix.multiply(Ae.makeTranslation(Se.x,Se.y,Se.z)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"rotate":o=i(r.textContent);var s=THREE.Math.degToRad(o[3]);t.matrix.multiply(Ae.makeRotationAxis(Se.fromArray(o),s)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"scale":o=i(r.textContent);t.matrix.scale(Se.fromArray(o)),t.transforms[r.getAttribute("sid")]=r.nodeName;break;case"extra":break;default:console.log(r)}}return De(t.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",t.id):qe.nodes[t.id]=t,t}function Te(e){for(var t={id:a(e.getAttribute("url")),materials:{},skeletons:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];switch(r.nodeName){case"bind_material":for(var i=r.getElementsByTagName("instance_material"),o=0;o<i.length;o++){var s=i[o],l=s.getAttribute("symbol"),c=s.getAttribute("target");t.materials[l]=a(c)}break;case"skeleton":t.skeletons.push(a(r.textContent))}}return t}function Ce(e,t){var n,r,i,o=[],a=[];for(n=0;n<e.length;n++){var s=e[n];if(De(s))Oe(Ie(s),t,o);else if(i=s,void 0!==qe.visualScenes[i])for(var l=qe.visualScenes[s].children,c=0;c<l.length;c++){var u=l[c];if("JOINT"===u.type)Oe(Ie(u.id),t,o)}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",s)}for(n=0;n<t.length;n++)for(c=0;c<o.length;c++)if((r=o[c]).bone.name===t[n].name){a[n]=r,r.processed=!0;break}for(n=0;n<o.length;n++)!1===(r=o[n]).processed&&(a.push(r),r.processed=!0);var h=[],d=[];for(n=0;n<a.length;n++)r=a[n],h.push(r.bone),d.push(r.boneInverse);return new THREE.Skeleton(h,d)}function Oe(e,t,n){e.traverse((function(e){if(!0===e.isBone){for(var r,i=0;i<t.length;i++){var o=t[i];if(o.name===e.name){r=o.boneInverse;break}}void 0===r&&(r=new THREE.Matrix4),n.push({bone:e,boneInverse:r,processed:!1})}}))}function Re(e){for(var t,n=[],r=e.matrix,i=e.nodes,o=e.type,a=e.instanceCameras,s=e.instanceControllers,l=e.instanceLights,c=e.instanceGeometries,u=e.instanceNodes,h=0,f=i.length;h<f;h++)n.push(Ie(i[h]));for(h=0,f=a.length;h<f;h++){var p=$(a[h]);null!==p&&n.push(p.clone())}for(h=0,f=s.length;h<f;h++)for(var m=s[h],g=(t=m.id,d(qe.controllers[t],k)),v=Le(he(g.id),m.materials),y=Ce(m.skeletons,g.skin.joints),b=0,w=v.length;b<w;b++){var x;(x=v[b]).isSkinnedMesh&&(x.bind(y,g.skin.bindMatrix),x.normalizeSkinWeights()),n.push(x)}for(h=0,f=l.length;h<f;h++){var _=re(l[h]);null!==_&&n.push(_.clone())}for(h=0,f=c.length;h<f;h++)for(b=0,w=(v=Le(he((m=c[h]).id),m.materials)).length;b<w;b++)n.push(v[b]);for(h=0,f=u.length;h<f;h++)n.push(Ie(u[h]).clone());if(0===i.length&&1===n.length)x=n[0];else{x="JOINT"===o?new THREE.Bone:new THREE.Group;for(h=0;h<n.length;h++)x.add(n[h])}return""===x.name&&(x.name="JOINT"===o?e.sid:e.name),x.matrix.copy(r),x.matrix.decompose(x.position,x.quaternion,x.scale),x}var ke=new THREE.MeshBasicMaterial({color:16711935});function Pe(e,t){for(var n=[],r=0,i=e.length;r<i;r++){var o=t[e[r]];void 0===o?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",e[r]),n.push(ke)):n.push(Y(o))}return n}function Le(e,t){var n=[];for(var r in e){var i=e[r],o=Pe(i.materialKeys,t);0===o.length&&("lines"===r||"linestrips"===r?o.push(new THREE.LineBasicMaterial):o.push(new THREE.MeshPhongMaterial));var a=void 0!==i.data.attributes.skinIndex;if(a)for(var s=0,l=o.length;s<l;s++)o[s].skinning=!0;var c,u=1===o.length?o[0]:o;switch(r){case"lines":c=new THREE.LineSegments(i.data,u);break;case"linestrips":c=new THREE.Line(i.data,u);break;case"triangles":case"polylist":c=a?new THREE.SkinnedMesh(i.data,u):new THREE.Mesh(i.data,u)}n.push(c)}return n}function De(e){return void 0!==qe.nodes[e]}function Ie(e){return d(qe.nodes[e],Re)}function Ne(e){var t=new THREE.Group;t.name=e.name;for(var n=e.children,r=0;r<n.length;r++){var i=n[r];t.add(Ie(i.id))}return t}function je(e){return d(qe.visualScenes[e],Ne)}if(0===e.length)return{scene:new THREE.Scene};var Be=n((new DOMParser).parseFromString(e,"application/xml"),"COLLADA")[0],Fe=Be.getAttribute("version");console.log("THREE.ColladaLoader: File version",Fe);var ze,He=function(e){return{unit:l(n(e,"unit")[0]),upAxis:c(n(e,"up_axis")[0])}}(n(Be,"asset")[0]),Ue=new THREE.TextureLoader(this.manager);Ue.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin),THREE.TGALoader&&(ze=new THREE.TGALoader(this.manager)).setPath(this.resourcePath||t);var Ve=[],Ge={},We=0,qe={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};u(Be,"library_animations","animation",(function(e){for(var t={sources:{},samplers:{},channels:{}},n=0,r=e.childNodes.length;n<r;n++){var i,o=e.childNodes[n];if(1===o.nodeType)switch(o.nodeName){case"source":i=o.getAttribute("id"),t.sources[i]=ie(o);break;case"sampler":i=o.getAttribute("id"),t.samplers[i]=f(o);break;case"channel":i=o.getAttribute("target"),t.channels[i]=p(o);break;default:console.log(o)}}qe.animations[e.getAttribute("id")]=t})),u(Be,"library_animation_clips","animation_clip",(function(e){for(var t={name:e.getAttribute("id")||"default",start:parseFloat(e.getAttribute("start")||0),end:parseFloat(e.getAttribute("end")||0),animations:[]},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"instance_animation":t.animations.push(a(i.getAttribute("url")))}}qe.clips[e.getAttribute("id")]=t})),u(Be,"library_controllers","controller",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"skin":t.id=a(i.getAttribute("source")),t.skin=C(i);break;case"morph":t.id=a(i.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.")}}qe.controllers[e.getAttribute("id")]=t})),u(Be,"library_images","image",(function(e){var t={init_from:n(e,"init_from")[0].textContent};qe.images[e.getAttribute("id")]=t})),u(Be,"library_effects","effect",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"profile_COMMON":t.profile=D(i)}}qe.effects[e.getAttribute("id")]=t})),u(Be,"library_materials","material",(function(e){for(var t={name:e.getAttribute("name")},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"instance_effect":t.url=a(i.getAttribute("url"))}}qe.materials[e.getAttribute("id")]=t})),u(Be,"library_cameras","camera",(function(e){for(var t={name:e.getAttribute("name")},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"optics":t.optics=K(i)}}qe.cameras[e.getAttribute("id")]=t})),u(Be,"library_lights","light",(function(e){for(var t={},n=0,r=e.childNodes.length;n<r;n++){var i=e.childNodes[n];if(1===i.nodeType)switch(i.nodeName){case"technique_common":t=ee(i)}}qe.lights[e.getAttribute("id")]=t})),u(Be,"library_geometries","geometry",(function(e){var t={name:e.getAttribute("name"),sources:{},vertices:{},primitives:[]},r=n(e,"mesh")[0];if(void 0!==r){for(var i=0;i<r.childNodes.length;i++){var o=r.childNodes[i];if(1===o.nodeType){var a=o.getAttribute("id");switch(o.nodeName){case"source":t.sources[a]=ie(o);break;case"vertices":t.vertices=oe(o);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",o.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":t.primitives.push(ae(o));break;default:console.log(o)}}}qe.geometries[e.getAttribute("id")]=t}})),u(Be,"library_nodes","node",Me),u(Be,"library_visual_scenes","visual_scene",(function(e){var t={name:e.getAttribute("name"),children:[]};!function(e){for(var t=e.getElementsByTagName("node"),n=0;n<t.length;n++){var r=t[n];!1===r.hasAttribute("id")&&r.setAttribute("id","three_default_"+We++)}}(e);for(var r=n(e,"node"),i=0;i<r.length;i++)t.children.push(Me(r[i]));qe.visualScenes[e.getAttribute("id")]=t})),u(Be,"library_kinematics_models","kinematics_model",(function(e){for(var t={name:e.getAttribute("name")||"",joints:{},links:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"technique_common":fe(r,t)}}qe.kinematicsModels[e.getAttribute("id")]=t})),u(Be,"library_physics_models","physics_model",(function(e){for(var t={name:e.getAttribute("name")||"",rigidBodies:{}},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"rigid_body":t.rigidBodies[r.getAttribute("name")]={},be(r,t.rigidBodies[r.getAttribute("name")])}}qe.physicsModels[e.getAttribute("id")]=t})),u(Be,"scene","instance_kinematics_scene",(function(e){for(var t={bindJointAxis:[]},n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];if(1===r.nodeType)switch(r.nodeName){case"bind_joint_axis":t.bindJointAxis.push(xe(r))}}qe.kinematicsScenes[a(e.getAttribute("url"))]=t})),h(qe.animations,m),h(qe.clips,M),h(qe.controllers,k),h(qe.images,P),h(qe.effects,q),h(qe.materials,X),h(qe.cameras,J),h(qe.lights,ne),h(qe.geometries,le),h(qe.visualScenes,Ne),function(){var e=qe.clips;if(!0===s(e)){if(!1===s(qe.animations)){var t=[];for(var n in qe.animations)for(var r=g(n),i=0,o=r.length;i<o;i++)t.push(r[i]);Ve.push(new THREE.AnimationClip("default",-1,t))}}else for(var n in e)Ve.push(T(n))}(),function(){var e=Object.keys(qe.kinematicsModels)[0],t=Object.keys(qe.kinematicsScenes)[0],n=Object.keys(qe.visualScenes)[0];if(void 0!==e&&void 0!==t){for(var r,i=(r=e,d(qe.kinematicsModels[r],de)),o=function(e){return d(qe.kinematicsScenes[e],_e)}(t),a=je(n),s=o.bindJointAxis,l={},c=0,u=s.length;c<u;c++){var h=s[c],f=Be.querySelector('[sid="'+h.target+'"]');if(f){var p=f.parentElement;g(h.jointIndex,p)}}var m=new THREE.Matrix4;Ge={joints:i&&i.joints,getJointValue:function(e){var t=l[e];if(t)return t.position;console.warn("THREE.ColladaLoader: Joint "+e+" doesn't exist.")},setJointValue:function(e,t){var n=l[e];if(n){var r=n.joint;if(t>r.limits.max||t<r.limits.min)console.warn("THREE.ColladaLoader: Joint "+e+" value "+t+" outside of limits (min: "+r.limits.min+", max: "+r.limits.max+").");else if(r.static)console.warn("THREE.ColladaLoader: Joint "+e+" is static.");else{var i=n.object,o=r.axis,a=n.transforms;Ae.identity();for(var s=0;s<a.length;s++){var c=a[s];if(c.sid&&-1!==c.sid.indexOf(e))switch(r.type){case"revolute":Ae.multiply(m.makeRotationAxis(o,THREE.Math.degToRad(t)));break;case"prismatic":Ae.multiply(m.makeTranslation(o.x*t,o.y*t,o.z*t));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+r.type)}else switch(c.type){case"matrix":Ae.multiply(c.obj);break;case"translate":Ae.multiply(m.makeTranslation(c.obj.x,c.obj.y,c.obj.z));break;case"scale":Ae.scale(c.obj);break;case"rotate":Ae.multiply(m.makeRotationAxis(c.obj,c.angle))}}i.matrix.copy(Ae),i.matrix.decompose(i.position,i.quaternion,i.scale),l[e].position=t}}else console.log("THREE.ColladaLoader: "+e+" does not exist.")}}}function g(e,t){var n=t.getAttribute("name"),r=i.joints[e];a.traverse((function(i){i.name===n&&(l[e]={object:i,transforms:Ee(t),joint:r,position:r.zeroPosition})}))}}();var Xe=function(e){return je(a(n(e,"instance_visual_scene")[0].getAttribute("url")))}(n(Be,"scene")[0]);return"Z_UP"===He.upAxis&&Xe.quaternion.setFromEuler(new THREE.Euler(-Math.PI/2,0,0)),Xe.scale.multiplyScalar(He.unit),{animations:Ve,kinematics:Ge,library:qe,scene:Xe}}}},function(e,t,n){THREE.FBXLoader=n(326),e.exports=AFRAME.registerComponent("fbx-model",{schema:{src:{type:"asset"},crossorigin:{default:""}},init:function(){this.model=null},update:function(){const e=this.data;if(!e.src)return;this.remove();const t=new THREE.FBXLoader;e.crossorigin&&t.setCrossOrigin(e.crossorigin),t.load(e.src,this.load.bind(this))},load:function(e){this.model=e,this.el.setObject3D("mesh",e),this.el.emit("model-loaded",{format:"fbx",model:e})},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t){e.exports=THREE.FBXLoader=function(){var e,t,n;function r(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager}function i(e){this.textureLoader=e}function o(){}function a(){}function s(){}function l(){}function c(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t}function u(){}function h(e){var t=e.match(/FBXVersion: (\d+)/);if(t)return parseInt(t[1]);throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function d(e){return e/46186158e3}r.prototype={constructor:r,crossOrigin:"anonymous",load:function(e,t,n,r){var i=this,o=THREE.LoaderUtils.extractUrlBase(e),a=new THREE.FileLoader(this.manager);a.setResponseType("arraybuffer"),a.load(e,(function(n){try{var a=i.parse(n,o);t(a)}catch(s){setTimeout((function(){r&&r(s),i.manager.itemError(e)}),0)}}),n,r)},setCrossOrigin:function(e){return this.crossOrigin=e,this},parse:function(t,n){if(function(e){var t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===E(e,0,t.length)}(t))e=(new l).parse(t);else{var r=E(t);if(!function(e){var t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"],n=0;function r(t){var r=e[t-1];return e=e.slice(n+t),n++,r}for(var i=0;i<t.length;++i){if(r(1)===t[i])return!1}return!0}(r))throw new Error("THREE.FBXLoader: Unknown format.");if(h(r)<7e3)throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: "+h(r));e=(new s).parse(r)}return new i(new THREE.TextureLoader(this.manager).setPath(n).setCrossOrigin(this.crossOrigin)).parse(e)}},i.prototype={constructor:i,parse:function(){t=this.parseConnections();var e=this.parseImages(),r=this.parseTextures(e),i=this.parseMaterials(r),a=this.parseDeformers(),s=(new o).parse(a);return this.parseScene(a,s,i),n},parseConnections:function(){var t=new Map;"Connections"in e&&e.Connections.connections.forEach((function(e){var n=e[0],r=e[1],i=e[2];t.has(n)||t.set(n,{parents:[],children:[]});var o={ID:r,relationship:i};t.get(n).parents.push(o),t.has(r)||t.set(r,{parents:[],children:[]});var a={ID:n,relationship:i};t.get(r).children.push(a)}));return t},parseImages:function(){var t={},n={};if("Video"in e.Objects){var r=e.Objects.Video;for(var i in r){var o=r[i];if(t[c=parseInt(i)]=o.RelativeFilename||o.Filename,"Content"in o){var a=o.Content instanceof ArrayBuffer&&o.Content.byteLength>0,s="string"===typeof o.Content&&""!==o.Content;if(a||s){var l=this.parseImage(r[i]);n[o.RelativeFilename||o.Filename]=l}}}}for(var c in t){var u=t[c];void 0!==n[u]?t[c]=n[u]:t[c]=t[c].split("\\").pop()}return t},parseImage:function(e){var t,n=e.Content,r=e.RelativeFilename||e.Filename,i=r.slice(r.lastIndexOf(".")+1).toLowerCase();switch(i){case"bmp":t="image/bmp";break;case"jpg":case"jpeg":t="image/jpeg";break;case"png":t="image/png";break;case"tif":t="image/tiff";break;case"tga":if("function"!==typeof THREE.TGALoader)return void console.warn("FBXLoader: THREE.TGALoader is required to load TGA textures");null===THREE.Loader.Handlers.get(".tga")&&THREE.Loader.Handlers.add(/\.tga$/i,new THREE.TGALoader),t="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+i+'" is not supported.')}if("string"===typeof n)return"data:"+t+";base64,"+n;var o=new Uint8Array(n);return window.URL.createObjectURL(new Blob([o],{type:t}))},parseTextures:function(t){var n=new Map;if("Texture"in e.Objects){var r=e.Objects.Texture;for(var i in r){var o=this.parseTexture(r[i],t);n.set(parseInt(i),o)}}return n},parseTexture:function(e,t){var n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;var r=e.WrapModeU,i=e.WrapModeV,o=void 0!==r?r.value:0,a=void 0!==i?i.value:0;if(n.wrapS=0===o?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,n.wrapT=0===a?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,"Scaling"in e){var s=e.Scaling.value;n.repeat.x=s[0],n.repeat.y=s[1]}return n},loadTexture:function(e,n){var r,i,o=this.textureLoader.path,a=t.get(e.id).children;void 0!==a&&a.length>0&&void 0!==n[a[0].ID]&&(0!==(r=n[a[0].ID]).indexOf("blob:")&&0!==r.indexOf("data:")||this.textureLoader.setPath(void 0));var s=e.FileName.slice(-3).toLowerCase();if("tga"===s){var l=THREE.Loader.Handlers.get(".tga");null===l?(console.warn("FBXLoader: TGALoader not found, creating empty placeholder texture for",r),i=new THREE.Texture):i=l.load(r)}else"psd"===s?(console.warn("FBXLoader: PSD textures are not supported, creating empty placeholder texture for",r),i=new THREE.Texture):i=this.textureLoader.load(r);return this.textureLoader.setPath(o),i},parseMaterials:function(t){var n=new Map;if("Material"in e.Objects){var r=e.Objects.Material;for(var i in r){var o=this.parseMaterial(r[i],t);null!==o&&n.set(parseInt(i),o)}}return n},parseMaterial:function(e,n){var r=e.id,i=e.attrName,o=e.ShadingModel;if("object"===typeof o&&(o=o.value),!t.has(r))return null;var a,s=this.parseParameters(e,n,r);switch(o.toLowerCase()){case"phong":a=new THREE.MeshPhongMaterial;break;case"lambert":a=new THREE.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',o),a=new THREE.MeshPhongMaterial({color:3342591})}return a.setValues(s),a.name=i,a},parseParameters:function(e,n,r){var i={};e.BumpFactor&&(i.bumpScale=e.BumpFactor.value),e.Diffuse?i.color=(new THREE.Color).fromArray(e.Diffuse.value):e.DiffuseColor&&"Color"===e.DiffuseColor.type&&(i.color=(new THREE.Color).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(i.displacementScale=e.DisplacementFactor.value),e.Emissive?i.emissive=(new THREE.Color).fromArray(e.Emissive.value):e.EmissiveColor&&"Color"===e.EmissiveColor.type&&(i.emissive=(new THREE.Color).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(i.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(i.opacity=parseFloat(e.Opacity.value)),i.opacity<1&&(i.transparent=!0),e.ReflectionFactor&&(i.reflectivity=e.ReflectionFactor.value),e.Shininess&&(i.shininess=e.Shininess.value),e.Specular?i.specular=(new THREE.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(i.specular=(new THREE.Color).fromArray(e.SpecularColor.value));var o=this;return t.get(r).children.forEach((function(e){var t=e.relationship;switch(t){case"Bump":i.bumpMap=o.getTexture(n,e.ID);break;case"DiffuseColor":i.map=o.getTexture(n,e.ID);break;case"DisplacementColor":i.displacementMap=o.getTexture(n,e.ID);break;case"EmissiveColor":i.emissiveMap=o.getTexture(n,e.ID);break;case"NormalMap":i.normalMap=o.getTexture(n,e.ID);break;case"ReflectionColor":i.envMap=o.getTexture(n,e.ID),i.envMap.mapping=THREE.EquirectangularReflectionMapping;break;case"SpecularColor":i.specularMap=o.getTexture(n,e.ID);break;case"TransparentColor":i.alphaMap=o.getTexture(n,e.ID),i.transparent=!0;break;case"AmbientColor":case"ShininessExponent":case"SpecularFactor":case"VectorDisplacementColor":default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",t)}})),i},getTexture:function(n,r){return"LayeredTexture"in e.Objects&&r in e.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),r=t.get(r).children[0].ID),n.get(r)},parseDeformers:function(){var n={},r={};if("Deformer"in e.Objects){var i=e.Objects.Deformer;for(var o in i){var a=i[o],s=t.get(parseInt(o));if("Skin"===a.attrType){var l=this.parseSkeleton(s,i);l.ID=o,s.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),l.geometryID=s.parents[0].ID,n[o]=l}else if("BlendShape"===a.attrType){var c={id:o};c.rawTargets=this.parseMorphTargets(s,i),c.id=o,s.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),r[o]=c}}}return{skeletons:n,morphTargets:r}},parseSkeleton:function(e,t){var n=[];return e.children.forEach((function(e){var r=t[e.ID];if("Cluster"===r.attrType){var i={ID:e.ID,indices:[],weights:[],transform:(new THREE.Matrix4).fromArray(r.Transform.a),transformLink:(new THREE.Matrix4).fromArray(r.TransformLink.a),linkMode:r.Mode};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)}})),{rawBones:n,bones:[]}},parseMorphTargets:function(e,n){for(var r=[],i=0;i<e.children.length;i++){if(8===i){console.warn("FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.");break}var o=e.children[i],a=n[o.ID],s={name:a.attrName,initialWeight:a.DeformPercent,id:a.id,fullWeights:a.FullWeights.a};if("BlendShapeChannel"!==a.attrType)return;t.get(parseInt(o.ID)).children.forEach((function(e){void 0===e.relationship&&(s.geoID=e.ID)})),r.push(s)}return r},parseScene:function(r,i,o){n=new THREE.Group;var s=this.parseModels(r.skeletons,i,o),l=e.Objects.Model,c=this;s.forEach((function(e){var r=l[e.ID];c.setLookAtProperties(e,r),t.get(e.ID).parents.forEach((function(t){var n=s.get(t.ID);void 0!==n&&n.add(e)})),null===e.parent&&n.add(e)})),this.bindSkeleton(r.skeletons,i,s),this.createAmbientLight(),this.setupMorphMaterials();var u=(new a).parse();1===n.children.length&&n.children[0].isGroup&&(n.children[0].animations=u,n=n.children[0]),n.animations=u},parseModels:function(n,r,i){var o=new Map,a=e.Objects.Model;for(var s in a){var l=parseInt(s),c=a[s],u=t.get(l),h=this.buildSkeleton(u,n,l,c.attrName);if(!h){switch(c.attrType){case"Camera":h=this.createCamera(u);break;case"Light":h=this.createLight(u);break;case"Mesh":h=this.createMesh(u,r,i);break;case"NurbsCurve":h=this.createCurve(u,r);break;case"LimbNode":case"Null":default:h=new THREE.Group}h.name=THREE.PropertyBinding.sanitizeNodeName(c.attrName),h.ID=l}this.setModelTransforms(h,c),o.set(l,h)}return o},buildSkeleton:function(e,t,n,r){var i=null;return e.parents.forEach((function(e){for(var o in t){var a=t[o];a.rawBones.forEach((function(t,o){if(t.ID===e.ID){var s=i;(i=new THREE.Bone).matrixWorld.copy(t.transformLink),i.name=THREE.PropertyBinding.sanitizeNodeName(r),i.ID=n,a.bones[o]=i,null!==s&&i.add(s)}}))}})),i},createCamera:function(t){var n,r;if(t.children.forEach((function(t){var n=e.Objects.NodeAttribute[t.ID];void 0!==n&&(r=n)})),void 0===r)n=new THREE.Object3D;else{var i=0;void 0!==r.CameraProjectionType&&1===r.CameraProjectionType.value&&(i=1);var o=1;void 0!==r.NearPlane&&(o=r.NearPlane.value/1e3);var a=1e3;void 0!==r.FarPlane&&(a=r.FarPlane.value/1e3);var s=window.innerWidth,l=window.innerHeight;void 0!==r.AspectWidth&&void 0!==r.AspectHeight&&(s=r.AspectWidth.value,l=r.AspectHeight.value);var c=s/l,u=45;void 0!==r.FieldOfView&&(u=r.FieldOfView.value);var h=r.FocalLength?r.FocalLength.value:null;switch(i){case 0:n=new THREE.PerspectiveCamera(u,c,o,a),null!==h&&n.setFocalLength(h);break;case 1:n=new THREE.OrthographicCamera(-s/2,s/2,l/2,-l/2,o,a);break;default:console.warn("THREE.FBXLoader: Unknown camera type "+i+"."),n=new THREE.Object3D}}return n},createLight:function(t){var n,r;if(t.children.forEach((function(t){var n=e.Objects.NodeAttribute[t.ID];void 0!==n&&(r=n)})),void 0===r)n=new THREE.Object3D;else{var i;i=void 0===r.LightType?0:r.LightType.value;var o=16777215;void 0!==r.Color&&(o=(new THREE.Color).fromArray(r.Color.value));var a=void 0===r.Intensity?1:r.Intensity.value/100;void 0!==r.CastLightOnObject&&0===r.CastLightOnObject.value&&(a=0);var s=0;void 0!==r.FarAttenuationEnd&&(s=void 0!==r.EnableFarAttenuation&&0===r.EnableFarAttenuation.value?0:r.FarAttenuationEnd.value);switch(i){case 0:n=new THREE.PointLight(o,a,s,1);break;case 1:n=new THREE.DirectionalLight(o,a);break;case 2:var l=Math.PI/3;void 0!==r.InnerAngle&&(l=THREE.Math.degToRad(r.InnerAngle.value));var c=0;void 0!==r.OuterAngle&&(c=THREE.Math.degToRad(r.OuterAngle.value),c=Math.max(c,1)),n=new THREE.SpotLight(o,a,s,l,c,1);break;default:console.warn("THREE.FBXLoader: Unknown light type "+r.LightType.value+", defaulting to a THREE.PointLight."),n=new THREE.PointLight(o,a)}void 0!==r.CastShadows&&1===r.CastShadows.value&&(n.castShadow=!0)}return n},createMesh:function(e,t,n){var r,i=null,o=null,a=[];return e.children.forEach((function(e){t.has(e.ID)&&(i=t.get(e.ID)),n.has(e.ID)&&a.push(n.get(e.ID))})),a.length>1?o=a:a.length>0?o=a[0]:(o=new THREE.MeshPhongMaterial({color:13421772}),a.push(o)),"color"in i.attributes&&a.forEach((function(e){e.vertexColors=THREE.VertexColors})),i.FBX_Deformer?(a.forEach((function(e){e.skinning=!0})),r=new THREE.SkinnedMesh(i,o)):r=new THREE.Mesh(i,o),r},createCurve:function(e,t){var n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),r=new THREE.LineBasicMaterial({color:3342591,linewidth:1});return new THREE.Line(n,r)},setModelTransforms:function(e,t){var n={};"RotationOrder"in t&&(n.eulerOrder=parseInt(t.RotationOrder.value)),"Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value);var r=w(n);e.applyMatrix(r)},setLookAtProperties:function(r,i){"LookAtProperty"in i&&t.get(r.ID).children.forEach((function(t){if("LookAtProperty"===t.relationship){var i=e.Objects.Model[t.ID];if("Lcl_Translation"in i){var o=i.Lcl_Translation.value;void 0!==r.target?(r.target.position.fromArray(o),n.add(r.target)):r.lookAt((new THREE.Vector3).fromArray(o))}}}))},bindSkeleton:function(e,n,r){var i=this.parsePoseNodes();for(var o in e){var a=e[o];t.get(parseInt(a.ID)).parents.forEach((function(e){if(n.has(e.ID)){var o=e.ID;t.get(o).parents.forEach((function(e){r.has(e.ID)&&r.get(e.ID).bind(new THREE.Skeleton(a.bones),i[e.ID])}))}}))}},parsePoseNodes:function(){var t={};if("Pose"in e.Objects){var n=e.Objects.Pose;for(var r in n)if("BindPose"===n[r].attrType){var i=n[r].PoseNode;Array.isArray(i)?i.forEach((function(e){t[e.Node]=(new THREE.Matrix4).fromArray(e.Matrix.a)})):t[i.Node]=(new THREE.Matrix4).fromArray(i.Matrix.a)}}return t},createAmbientLight:function(){if("GlobalSettings"in e&&"AmbientColor"in e.GlobalSettings){var t=e.GlobalSettings.AmbientColor.value,r=t[0],i=t[1],o=t[2];if(0!==r||0!==i||0!==o){var a=new THREE.Color(r,i,o);n.add(new THREE.AmbientLight(a,1))}}},setupMorphMaterials:function(){n.traverse((function(e){if(e.isMesh&&(e.geometry.morphAttributes.position||e.geometry.morphAttributes.normal)){var t=e.uuid,r=e.material.uuid,i=!1;n.traverse((function(e){e.isMesh&&e.material.uuid===r&&e.uuid!==t&&(i=!0)})),!0===i&&(e.material=e.material.clone()),e.material.morphTargets=!0}}))}},o.prototype={constructor:o,parse:function(n){var r=new Map;if("Geometry"in e.Objects){var i=e.Objects.Geometry;for(var o in i){var a=t.get(parseInt(o)),s=this.parseGeometry(a,i[o],n);r.set(parseInt(o),s)}}return r},parseGeometry:function(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}},parseMeshGeometry:function(t,n,r){var i=r.skeletons,o=r.morphTargets,a=t.parents.map((function(t){return e.Objects.Model[t.ID]}));if(0!==a.length){var s=t.children.reduce((function(e,t){return void 0!==i[t.ID]&&(e=i[t.ID]),e}),null),l=t.children.reduce((function(e,t){return void 0!==o[t.ID]&&(e=o[t.ID]),e}),null),c=a[0],u={};"RotationOrder"in c&&(u.eulerOrder=c.RotationOrder.value),"GeometricTranslation"in c&&(u.translation=c.GeometricTranslation.value),"GeometricRotation"in c&&(u.rotation=c.GeometricRotation.value),"GeometricScaling"in c&&(u.scale=c.GeometricScaling.value);var h=w(u);return this.genGeometry(n,s,l,h)}},genGeometry:function(e,t,n,r){var i=new THREE.BufferGeometry;e.attrName&&(i.name=e.attrName);var o=this.parseGeoNode(e,t),a=this.genBuffers(o),s=new THREE.Float32BufferAttribute(a.vertex,3);if(r.applyToBufferAttribute(s),i.addAttribute("position",s),a.colors.length>0&&i.addAttribute("color",new THREE.Float32BufferAttribute(a.colors,3)),t&&(i.addAttribute("skinIndex",new THREE.Uint16BufferAttribute(a.weightsIndices,4)),i.addAttribute("skinWeight",new THREE.Float32BufferAttribute(a.vertexWeights,4)),i.FBX_Deformer=t),a.normal.length>0){var l=new THREE.Float32BufferAttribute(a.normal,3);(new THREE.Matrix3).getNormalMatrix(r).applyToBufferAttribute(l),i.addAttribute("normal",l)}if(a.uvs.forEach((function(e,t){var n="uv"+(t+1).toString();0===t&&(n="uv"),i.addAttribute(n,new THREE.Float32BufferAttribute(a.uvs[t],2))})),o.material&&"AllSame"!==o.material.mappingType){var c=a.materialIndex[0],u=0;if(a.materialIndex.forEach((function(e,t){e!==c&&(i.addGroup(u,t-u,c),c=e,u=t)})),i.groups.length>0){var h=i.groups[i.groups.length-1],d=h.start+h.count;d!==a.materialIndex.length&&i.addGroup(d,a.materialIndex.length-d,c)}0===i.groups.length&&i.addGroup(0,a.materialIndex.length,a.materialIndex[0])}return this.addMorphTargets(i,e,n,r),i},parseGeoNode:function(e,t){var n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];for(var r=0;e.LayerElementUV[r];)n.uv.push(this.parseUVs(e.LayerElementUV[r])),r++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:t,weight:e.weights[i]})}))}))),n},genBuffers:function(e){var t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]},n=0,r=0,i=!1,o=[],a=[],s=[],l=[],c=[],u=[],h=this;return e.vertexIndices.forEach((function(d,f){var m=!1;d<0&&(d^=-1,m=!0);var g=[],v=[];if(o.push(3*d,3*d+1,3*d+2),e.color){var y=p(f,n,d,e.color);s.push(y[0],y[1],y[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){v.push(e.weight),g.push(e.id)})),v.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);var b=[0,0,0,0],w=[0,0,0,0];v.forEach((function(e,t){var n=e,r=g[t];w.forEach((function(e,t,i){if(n>e){i[t]=n,n=e;var o=b[t];b[t]=r,r=o}}))})),g=b,v=w}for(;v.length<4;)v.push(0),g.push(0);for(var x=0;x<4;++x)c.push(v[x]),u.push(g[x])}if(e.normal){y=p(f,n,d,e.normal);a.push(y[0],y[1],y[2])}if(e.material&&"AllSame"!==e.material.mappingType)var _=p(f,n,d,e.material)[0];e.uv&&e.uv.forEach((function(e,t){var r=p(f,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(r[0]),l[t].push(r[1])})),r++,m&&(h.genFace(t,e,o,_,a,s,l,c,u,r),n++,r=0,o=[],a=[],s=[],l=[],c=[],u=[])})),t},genFace:function(e,t,n,r,i,o,a,s,l,c){for(var u=2;u<c;u++)e.vertex.push(t.vertexPositions[n[0]]),e.vertex.push(t.vertexPositions[n[1]]),e.vertex.push(t.vertexPositions[n[2]]),e.vertex.push(t.vertexPositions[n[3*(u-1)]]),e.vertex.push(t.vertexPositions[n[3*(u-1)+1]]),e.vertex.push(t.vertexPositions[n[3*(u-1)+2]]),e.vertex.push(t.vertexPositions[n[3*u]]),e.vertex.push(t.vertexPositions[n[3*u+1]]),e.vertex.push(t.vertexPositions[n[3*u+2]]),t.skeleton&&(e.vertexWeights.push(s[0]),e.vertexWeights.push(s[1]),e.vertexWeights.push(s[2]),e.vertexWeights.push(s[3]),e.vertexWeights.push(s[4*(u-1)]),e.vertexWeights.push(s[4*(u-1)+1]),e.vertexWeights.push(s[4*(u-1)+2]),e.vertexWeights.push(s[4*(u-1)+3]),e.vertexWeights.push(s[4*u]),e.vertexWeights.push(s[4*u+1]),e.vertexWeights.push(s[4*u+2]),e.vertexWeights.push(s[4*u+3]),e.weightsIndices.push(l[0]),e.weightsIndices.push(l[1]),e.weightsIndices.push(l[2]),e.weightsIndices.push(l[3]),e.weightsIndices.push(l[4*(u-1)]),e.weightsIndices.push(l[4*(u-1)+1]),e.weightsIndices.push(l[4*(u-1)+2]),e.weightsIndices.push(l[4*(u-1)+3]),e.weightsIndices.push(l[4*u]),e.weightsIndices.push(l[4*u+1]),e.weightsIndices.push(l[4*u+2]),e.weightsIndices.push(l[4*u+3])),t.color&&(e.colors.push(o[0]),e.colors.push(o[1]),e.colors.push(o[2]),e.colors.push(o[3*(u-1)]),e.colors.push(o[3*(u-1)+1]),e.colors.push(o[3*(u-1)+2]),e.colors.push(o[3*u]),e.colors.push(o[3*u+1]),e.colors.push(o[3*u+2])),t.material&&"AllSame"!==t.material.mappingType&&(e.materialIndex.push(r),e.materialIndex.push(r),e.materialIndex.push(r)),t.normal&&(e.normal.push(i[0]),e.normal.push(i[1]),e.normal.push(i[2]),e.normal.push(i[3*(u-1)]),e.normal.push(i[3*(u-1)+1]),e.normal.push(i[3*(u-1)+2]),e.normal.push(i[3*u]),e.normal.push(i[3*u+1]),e.normal.push(i[3*u+2])),t.uv&&t.uv.forEach((function(t,n){void 0===e.uvs[n]&&(e.uvs[n]=[]),e.uvs[n].push(a[n][0]),e.uvs[n].push(a[n][1]),e.uvs[n].push(a[n][2*(u-1)]),e.uvs[n].push(a[n][2*(u-1)+1]),e.uvs[n].push(a[n][2*u]),e.uvs[n].push(a[n][2*u+1])}))},addMorphTargets:function(t,n,r,i){if(null!==r){t.morphAttributes.position=[],t.morphAttributes.normal=[];var o=this;r.rawTargets.forEach((function(r){var a=e.Objects.Geometry[r.geoID];void 0!==a&&o.genMorphGeometry(t,n,a,i)}))}},genMorphGeometry:function(e,t,n,r){var i=new THREE.BufferGeometry;n.attrName&&(i.name=n.attrName);for(var o=void 0!==t.PolygonVertexIndex?t.PolygonVertexIndex.a:[],a=void 0!==t.Vertices?t.Vertices.a.slice():[],s=void 0!==n.Vertices?n.Vertices.a:[],l=void 0!==n.Indexes?n.Indexes.a:[],c=0;c<l.length;c++){var u=3*l[c];a[u]+=s[3*c],a[u+1]+=s[3*c+1],a[u+2]+=s[3*c+2]}var h={vertexIndices:o,vertexPositions:a},d=this.genBuffers(h),f=new THREE.Float32BufferAttribute(d.vertex,3);f.name=n.attrName,r.applyToBufferAttribute(f),e.morphAttributes.position.push(f)},parseNormals:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.Normals.a,i=[];return"IndexToDirect"===n&&("NormalIndex"in e?i=e.NormalIndex.a:"NormalsIndex"in e&&(i=e.NormalsIndex.a)),{dataSize:3,buffer:r,indices:i,mappingType:t,referenceType:n}},parseUVs:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.UV.a,i=[];return"IndexToDirect"===n&&(i=e.UVIndex.a),{dataSize:2,buffer:r,indices:i,mappingType:t,referenceType:n}},parseVertexColors:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType,r=e.Colors.a,i=[];return"IndexToDirect"===n&&(i=e.ColorIndex.a),{dataSize:4,buffer:r,indices:i,mappingType:t,referenceType:n}},parseMaterialIndices:function(e){var t=e.MappingInformationType,n=e.ReferenceInformationType;if("NoMappingInformation"===t)return{dataSize:1,buffer:[0],indices:[0],mappingType:"AllSame",referenceType:n};for(var r=e.Materials.a,i=[],o=0;o<r.length;++o)i.push(o);return{dataSize:1,buffer:r,indices:i,mappingType:t,referenceType:n}},parseNurbsGeometry:function(e){if(void 0===THREE.NURBSCurve)return console.error("THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry."),new THREE.BufferGeometry;var t=parseInt(e.Order);if(isNaN(t))return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s",e.Order,e.id),new THREE.BufferGeometry;for(var n,r,i=t-1,o=e.KnotVector.a,a=[],s=e.Points.a,l=0,c=s.length;l<c;l+=4)a.push((new THREE.Vector4).fromArray(s,l));if("Closed"===e.Form)a.push(a[0]);else if("Periodic"===e.Form){n=i,r=o.length-1-n;for(l=0;l<i;++l)a.push(a[l])}var u=new THREE.NURBSCurve(i,o,a,n,r).getPoints(7*a.length),h=new Float32Array(3*u.length);u.forEach((function(e,t){e.toArray(h,3*t)}));var d=new THREE.BufferGeometry;return d.addAttribute("position",new THREE.BufferAttribute(h,3)),d}},a.prototype={constructor:a,parse:function(){var e=[],t=this.parseClips();if(void 0===t)return e;for(var n in t){var r=t[n],i=this.addClip(r);e.push(i)}return e},parseClips:function(){if(void 0!==e.Objects.AnimationCurve){var t=this.parseAnimationCurveNodes();this.parseAnimationCurves(t);var n=this.parseAnimationLayers(t);return this.parseAnimStacks(n)}},parseAnimationCurveNodes:function(){var t=e.Objects.AnimationCurveNode,n=new Map;for(var r in t){var i=t[r];if(null!==i.attrName.match(/S|R|T|DeformPercent/)){var o={id:i.id,attr:i.attrName,curves:{}};n.set(o.id,o)}}return n},parseAnimationCurves:function(n){var r=e.Objects.AnimationCurve;for(var i in r){var o={id:r[i].id,times:r[i].KeyTime.a.map(d),values:r[i].KeyValueFloat.a},a=t.get(o.id);if(void 0!==a){var s=a.parents[0].ID,l=a.parents[0].relationship;l.match(/X/)?n.get(s).curves.x=o:l.match(/Y/)?n.get(s).curves.y=o:l.match(/Z/)?n.get(s).curves.z=o:l.match(/d|DeformPercent/)&&n.has(s)&&(n.get(s).curves.morph=o)}}},parseAnimationLayers:function(n){var r=e.Objects.AnimationLayer,i=new Map;for(var o in r){var a=[],s=t.get(parseInt(o));if(void 0!==s){var l=s.children,c=this;l.forEach((function(r,i){if(n.has(r.ID)){var o=n.get(r.ID);if(void 0!==o.curves.x||void 0!==o.curves.y||void 0!==o.curves.z){if(void 0===a[i]){t.get(r.ID).parents.forEach((function(e){void 0!==e.relationship&&(f=e.ID)}));var s=e.Objects.Model[f.toString()],l={modelName:THREE.PropertyBinding.sanitizeNodeName(s.attrName),initialPosition:[0,0,0],initialRotation:[0,0,0],initialScale:[1,1,1],transform:c.getModelAnimTransform(s)};"PreRotation"in s&&(l.preRotations=s.PreRotation.value),"PostRotation"in s&&(l.postRotations=s.PostRotation.value),a[i]=l}a[i][o.attr]=o}else if(void 0!==o.curves.morph){if(void 0===a[i]){var u;t.get(r.ID).parents.forEach((function(e){void 0!==e.relationship&&(u=e.ID)}));var h=t.get(u).parents[0].ID,d=t.get(h).parents[0].ID,f=t.get(d).parents[0].ID;s=e.Objects.Model[f],l={modelName:THREE.PropertyBinding.sanitizeNodeName(s.attrName),morphName:e.Objects.Deformer[u].attrName};a[i]=l}a[i][o.attr]=o}}})),i.set(parseInt(o),a)}}return i},getModelAnimTransform:function(e){var t={};return"RotationOrder"in e&&(t.eulerOrder=parseInt(e.RotationOrder.value)),"Lcl_Translation"in e&&(t.translation=e.Lcl_Translation.value),"RotationOffset"in e&&(t.rotationOffset=e.RotationOffset.value),"Lcl_Rotation"in e&&(t.rotation=e.Lcl_Rotation.value),"PreRotation"in e&&(t.preRotation=e.PreRotation.value),"PostRotation"in e&&(t.postRotation=e.PostRotation.value),"Lcl_Scaling"in e&&(t.scale=e.Lcl_Scaling.value),w(t)},parseAnimStacks:function(n){var r=e.Objects.AnimationStack,i={};for(var o in r){var a=t.get(parseInt(o)).children;a.length>1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");var s=n.get(a[0].ID);i[o]={name:r[o].attrName,layer:s}}return i},addClip:function(e){var t=[],n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new THREE.AnimationClip(e.name,-1,t)},generateTracks:function(e){var t=[],n=new THREE.Vector3,r=new THREE.Quaternion,i=new THREE.Vector3;if(e.transform&&e.transform.decompose(n,r,i),n=n.toArray(),r=(new THREE.Euler).setFromQuaternion(r).toArray(),i=i.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){var o=this.generateVectorTrack(e.modelName,e.T.curves,n,"position");void 0!==o&&t.push(o)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){var a=this.generateRotationTrack(e.modelName,e.R.curves,r,e.preRotations,e.postRotations);void 0!==a&&t.push(a)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){var s=this.generateVectorTrack(e.modelName,e.S.curves,i,"scale");void 0!==s&&t.push(s)}if(void 0!==e.DeformPercent){var l=this.generateMorphTrack(e);void 0!==l&&t.push(l)}return t},generateVectorTrack:function(e,t,n,r){var i=this.getTimesForAllAxes(t),o=this.getKeyframeTrackValues(i,t,n);return new THREE.VectorKeyframeTrack(e+"."+r,i,o)},generateRotationTrack:function(e,t,n,r,i){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(THREE.Math.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(THREE.Math.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(THREE.Math.degToRad));var o=this.getTimesForAllAxes(t),a=this.getKeyframeTrackValues(o,t,n);void 0!==r&&((r=r.map(THREE.Math.degToRad)).push("ZYX"),r=(new THREE.Euler).fromArray(r),r=(new THREE.Quaternion).setFromEuler(r)),void 0!==i&&((i=i.map(THREE.Math.degToRad)).push("ZYX"),i=(new THREE.Euler).fromArray(i),i=(new THREE.Quaternion).setFromEuler(i).inverse());for(var s=new THREE.Quaternion,l=new THREE.Euler,c=[],u=0;u<a.length;u+=3)l.set(a[u],a[u+1],a[u+2],"ZYX"),s.setFromEuler(l),void 0!==r&&s.premultiply(r),void 0!==i&&s.multiply(i),s.toArray(c,u/3*4);return new THREE.QuaternionKeyframeTrack(e+".quaternion",o,c)},generateMorphTrack:function(e){var t=e.DeformPercent.curves.morph,r=t.values.map((function(e){return e/100})),i=n.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new THREE.NumberKeyframeTrack(e.modelName+".morphTargetInfluences["+i+"]",t.times,r)},getTimesForAllAxes:function(e){var t=[];return void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})).filter((function(e,t,n){return n.indexOf(e)==t}))},getKeyframeTrackValues:function(e,t,n){var r=n,i=[],o=-1,a=-1,s=-1;return e.forEach((function(e){if(t.x&&(o=t.x.times.indexOf(e)),t.y&&(a=t.y.times.indexOf(e)),t.z&&(s=t.z.times.indexOf(e)),-1!==o){var n=t.x.values[o];i.push(n),r[0]=n}else i.push(r[0]);if(-1!==a){var l=t.y.values[a];i.push(l),r[1]=l}else i.push(r[1]);if(-1!==s){var c=t.z.values[s];i.push(c),r[2]=c}else i.push(r[2])})),i},interpolateRotations:function(e){for(var t=1;t<e.values.length;t++){var n=e.values[t-1],r=e.values[t]-n,i=Math.abs(r);if(i>=180){for(var o=i/180,a=r/o,s=n+a,l=e.times[t-1],c=(e.times[t]-l)/o,u=l+c,h=[],d=[];u<e.times[t];)h.push(u),u+=c,d.push(s),s+=a;e.times=A(e.times,t,h),e.values=A(e.values,t,d)}}}},s.prototype={constructor:s,getPrevNode:function(){return this.nodeStack[this.currentIndent-2]},getCurrentNode:function(){return this.nodeStack[this.currentIndent-1]},getCurrentProp:function(){return this.currentProp},pushStack:function(e){this.nodeStack.push(e),this.currentIndent+=1},popStack:function(){this.nodeStack.pop(),this.currentIndent-=1},setCurrentProp:function(e,t){this.currentProp=e,this.currentPropName=t},parse:function(e){this.currentIndent=0,console.log("FBXTree: ",u),this.allNodes=new u,this.nodeStack=[],this.currentProp=[],this.currentPropName="";var t=this,n=e.split(/[\r\n]+/);return n.forEach((function(e,r){var i=e.match(/^[\s\t]*;/),o=e.match(/^[\s\t]*$/);if(!i&&!o){var a=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),s=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");a?t.parseNodeBegin(e,a):s?t.parseNodeProperty(e,s,n[++r]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)}})),this.allNodes},parseNodeBegin:function(e,t){var n=t[1].trim().replace(/^"/,"").replace(/"$/,""),r=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),i={name:n},o=this.parseNodeAttr(r),a=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,i):n in a?("PoseNode"===n?a.PoseNode.push(i):void 0!==a[n].id&&(a[n]={},a[n][a[n].id]=a[n]),""!==o.id&&(a[n][o.id]=i)):"number"===typeof o.id?(a[n]={},a[n][o.id]=i):"Properties70"!==n&&(a[n]="PoseNode"===n?[i]:i),"number"===typeof o.id&&(i.id=o.id),""!==o.name&&(i.attrName=o.name),""!==o.type&&(i.attrType=o.type),this.pushStack(i)},parseNodeAttr:function(e){var t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));var n="",r="";return e.length>1&&(n=e[1].replace(/^(\w+)::/,""),r=e[2]),{id:t,name:n,type:r}},parseNodeProperty:function(e,t,n){var r=t[1].replace(/^"/,"").replace(/"$/,"").trim(),i=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());var o=this.getCurrentNode();if("Properties70"!==o.name){if("C"===r){var a=i.split(",").slice(1),s=parseInt(a[0]),l=parseInt(a[1]),c=i.split(",").slice(3);r="connections",function(e,t){for(var n=0,r=e.length,i=t.length;n<i;n++,r++)e[r]=t[n]}(i=[s,l],c=c.map((function(e){return e.trim().replace(/^"/,"")}))),void 0===o[r]&&(o[r]=[])}"Node"===r&&(o.id=i),r in o&&Array.isArray(o[r])?o[r].push(i):"a"!==r?o[r]=i:o.a=i,this.setCurrentProp(o,r),"a"===r&&","!==i.slice(-1)&&(o.a=_(i))}else this.parseNodeSpecialProperty(e,r,i)},parseNodePropertyContinued:function(e){var t=this.getCurrentNode();t.a+=e,","!==e.slice(-1)&&(t.a=_(t.a))},parseNodeSpecialProperty:function(e,t,n){var r=n.split('",').map((function(e){return e.trim().replace(/^\"/,"").replace(/\s/,"_")})),i=r[0],o=r[1],a=r[2],s=r[3],l=r[4];switch(o){case"int":case"enum":case"bool":case"ULongLong":case"double":case"Number":case"FieldOfView":l=parseFloat(l);break;case"Color":case"ColorRGB":case"Vector3D":case"Lcl_Translation":case"Lcl_Rotation":case"Lcl_Scaling":l=_(l)}this.getPrevNode()[i]={type:o,type2:a,flag:s,value:l},this.setCurrentProp(this.getPrevNode(),i)}},l.prototype={constructor:l,parse:function(e){var t=new c(e);t.skip(23);var n=t.getUint32();console.log("THREE.FBXLoader: FBX binary version: "+n);for(var r=new u;!this.endOfContent(t);){var i=this.parseNode(t,n);null!==i&&r.add(i.name,i)}return r},endOfContent:function(e){return e.size()%16===0?(e.getOffset()+160+16&-16)>=e.size():e.getOffset()+160+16>=e.size()},parseNode:function(e,t){var n={},r=t>=7500?e.getUint64():e.getUint32(),i=t>=7500?e.getUint64():e.getUint32(),o=(t>=7500?e.getUint64():e.getUint32(),e.getUint8()),a=e.getString(o);if(0===r)return null;for(var s=[],l=0;l<i;l++)s.push(this.parseProperty(e));var c=s.length>0?s[0]:"",u=s.length>1?s[1]:"",h=s.length>2?s[2]:"";for(n.singleProperty=1===i&&e.getOffset()===r;r>e.getOffset();){var d=this.parseNode(e,t);null!==d&&this.parseSubNode(a,n,d)}return n.propertyList=s,"number"===typeof c&&(n.id=c),""!==u&&(n.attrName=u),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n},parseSubNode:function(e,t,n){if(!0===n.singleProperty){var r=n.propertyList[0];Array.isArray(r)?(t[n.name]=n,n.a=r):t[n.name]=r}else if("Connections"===e&&"C"===n.name){var i=[];n.propertyList.forEach((function(e,t){0!==t&&i.push(e)})),void 0===t.connections&&(t.connections=[]),t.connections.push(i)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){var o,a=n.propertyList[0],s=n.propertyList[1],l=n.propertyList[2],c=n.propertyList[3];0===a.indexOf("Lcl ")&&(a=a.replace("Lcl ","Lcl_")),0===s.indexOf("Lcl ")&&(s=s.replace("Lcl ","Lcl_")),o="Color"===s||"ColorRGB"===s||"Vector"===s||"Vector3D"===s||0===s.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[a]={type:s,type2:l,flag:c,value:o}}else void 0===t[n.name]?"number"===typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)},parseProperty:function(e){var t=e.getString(1);switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":var n=e.getUint32();return e.getArrayBuffer(n);case"S":n=e.getUint32();return e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":var r=e.getUint32(),i=e.getUint32(),o=e.getUint32();if(0===i)switch(t){case"b":case"c":return e.getBooleanArray(r);case"d":return e.getFloat64Array(r);case"f":return e.getFloat32Array(r);case"i":return e.getInt32Array(r);case"l":return e.getInt64Array(r)}"undefined"===typeof Zlib&&console.error("THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js");var a=new c(new Zlib.Inflate(new Uint8Array(e.getArrayBuffer(o))).decompress().buffer);switch(t){case"b":case"c":return a.getBooleanArray(r);case"d":return a.getFloat64Array(r);case"f":return a.getFloat32Array(r);case"i":return a.getInt32Array(r);case"l":return a.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}},c.prototype={constructor:c,getOffset:function(){return this.offset},size:function(){return this.dv.buffer.byteLength},skip:function(e){this.offset+=e},getBoolean:function(){return 1===(1&this.getUint8())},getBooleanArray:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getBoolean());return t},getUint8:function(){var e=this.dv.getUint8(this.offset);return this.offset+=1,e},getInt16:function(){var e=this.dv.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},getInt32:function(){var e=this.dv.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},getInt32Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getInt32());return t},getUint32:function(){var e=this.dv.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},getInt64:function(){var e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),2147483648&t?(t=4294967295&~t,4294967295===(e=4294967295&~e)&&(t=t+1&4294967295),-(4294967296*t+(e=e+1&4294967295))):4294967296*t+e},getInt64Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getInt64());return t},getUint64:function(){var e,t;return this.littleEndian?(e=this.getUint32(),t=this.getUint32()):(t=this.getUint32(),e=this.getUint32()),4294967296*t+e},getFloat32:function(){var e=this.dv.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},getFloat32Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getFloat32());return t},getFloat64:function(){var e=this.dv.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},getFloat64Array:function(e){for(var t=[],n=0;n<e;n++)t.push(this.getFloat64());return t},getArrayBuffer:function(e){var t=this.dv.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t},getString:function(e){for(var t=[],n=0;n<e;n++)t[n]=this.getUint8();var r=t.indexOf(0);return r>=0&&(t=t.slice(0,r)),THREE.LoaderUtils.decodeText(new Uint8Array(t))}},u.prototype={constructor:u,add:function(e,t){this[e]=t}};var f=[];function p(e,t,n,r){var i;switch(r.mappingType){case"ByPolygonVertex":i=e;break;case"ByPolygon":i=t;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);var o=i*r.dataSize,a=o+r.dataSize;return function(e,t,n,r){for(var i=n,o=0;i<r;i++,o++)e[o]=t[i];return e}(f,r.buffer,o,a)}var m=new THREE.Matrix4,g=new THREE.Euler,v=new THREE.Vector3,y=new THREE.Vector3,b=new THREE.Matrix4;function w(e){var t=new THREE.Matrix4;y.set(0,0,0),b.identity();var n,r=e.eulerOrder?x(e.eulerOrder):x(0);(e.translation&&y.fromArray(e.translation),e.rotationOffset&&y.add(v.fromArray(e.rotationOffset)),e.rotation)&&((n=e.rotation.map(THREE.Math.degToRad)).push(r),b.makeRotationFromEuler(g.fromArray(n)));e.preRotation&&((n=e.preRotation.map(THREE.Math.degToRad)).push(r),m.makeRotationFromEuler(g.fromArray(n)),b.premultiply(m));e.postRotation&&((n=e.postRotation.map(THREE.Math.degToRad)).push(r),m.makeRotationFromEuler(g.fromArray(n)),m.getInverse(m),b.multiply(m));return e.scale&&t.scale(v.fromArray(e.scale)),t.setPosition(y),t.multiply(b),t}function x(e){var t=["ZYX","YZX","XZY","ZXY","YXZ","XYZ"];return 6===e?(console.warn("THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."),t[0]):t[e]}function _(e){return e.split(",").map((function(e){return parseFloat(e)}))}function E(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=e.byteLength),THREE.LoaderUtils.decodeText(new Uint8Array(e,t,n))}function A(e,t,n){return e.slice(0,t).concat(n).concat(e.slice(t))}return r}()},function(e,t,n){const r=n(328)(),i=function(){let e;return function(){return e=e||r("https://cdn.jsdelivr.net/gh/mrdoob/three.js@r86/examples/js/loaders/GLTFLoader.js"),e}}();e.exports=AFRAME.registerComponent("gltf-model-legacy",{schema:{type:"model"},init:function(){this.model=null,this.loader=null,this.loaderPromise=i().then(()=>{this.loader=new THREE.GLTFLoader,this.loader.setCrossOrigin("Anonymous")})},update:function(){const e=this,t=this.el,n=this.data;n&&(this.remove(),this.loaderPromise.then(()=>{this.loader.load(n,(function(n){e.model=n.scene,e.model.animations=n.animations,t.setObject3D("mesh",e.model),t.emit("model-loaded",{format:"gltf",model:e.model})}))}))},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(t,n){function r(t){const n=document.getElementById(t),r=n.parentNode;try{r&&r.removeChild(n)}catch(e){}}function i(e,t,n){return new n((function(n,i){const o=t.timeout||5e3,a="script_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),s=function(e,t){var n=document.createElement("script");return n.type="text/javascript",n.async=!0,n.id=t,n.src=e,n}(e,a),l=setTimeout((function(){i(new Error("Script request to "+e+" timed out")),r(a)}),o),c=function(e){clearTimeout(e)};s.addEventListener("load",(function(e){n({ok:!0}),c(l),r(a)})),s.addEventListener("error",(function(t){i(new Error("Script request to "+e+" failed "+t)),c(l),r(a)})),function(e){const t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}(s)}))}t.exports=function(e){return e=e||{},function(t,n){return i(t,n=n||{},e.Promise||Promise)}}},function(e,t){e.exports=AFRAME.registerComponent("object-model",{schema:{src:{type:"asset"},crossorigin:{default:""}},init:function(){this.model=null},update:function(){let e;const t=this.data;t.src&&(this.remove(),e=new THREE.ObjectLoader,t.crossorigin&&e.setCrossOrigin(t.crossorigin),e.load(t.src,e=>{e.traverse(e=>{e instanceof THREE.SkinnedMesh&&e.material&&(e.material.skinning=!!(e.geometry&&e.geometry.bones||[]).length)}),this.load(e)}))},load:function(e){this.model=e,this.el.setObject3D("mesh",e),this.el.emit("model-loaded",{format:"json",model:e})},remove:function(){this.model&&this.el.removeObject3D("mesh")}})},function(e,t,n){n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338)},function(e,t){e.exports=AFRAME.registerComponent("checkpoint",{schema:{offset:{default:{x:0,y:0,z:0},type:"vec3"}},init:function(){this.active=!1,this.targetEl=null,this.fire=this.fire.bind(this),this.offset=new THREE.Vector3},update:function(){this.offset.copy(this.data.offset)},play:function(){this.el.addEventListener("click",this.fire)},pause:function(){this.el.removeEventListener("click",this.fire)},remove:function(){this.pause()},fire:function(){const e=this.el.sceneEl.querySelector("[checkpoint-controls]");if(!e)throw new Error("No `checkpoint-controls` component found.");e.components["checkpoint-controls"].setCheckpoint(this.el)},getOffset:function(){return this.offset.copy(this.data.offset)}})},function(e,t){function n(e,t,n,r){e&&(t=t||[],e.traverse(e=>{if(!e.isMesh)return;var i;((i=e.material)?Array.isArray(i)?i:i.materials?i.materials:[i]:[]).forEach(e=>{e&&!("envMap"in e)||t.length&&-1===t.indexOf(e.name)||(e.envMap=n,e.reflectivity=r,e.needsUpdate=!0)})}))}e.exports=AFRAME.registerComponent("cube-env-map",{multiple:!0,schema:{path:{default:""},extension:{default:"jpg",oneOf:["jpg","png"]},format:{default:"RGBFormat",oneOf:["RGBFormat","RGBAFormat"]},enableBackground:{default:!1},reflectivity:{default:1,min:0,max:1},materials:{default:[]}},init:function(){const e=this.data;this.texture=(new THREE.CubeTextureLoader).load([e.path+"posx."+e.extension,e.path+"negx."+e.extension,e.path+"posy."+e.extension,e.path+"negy."+e.extension,e.path+"posz."+e.extension,e.path+"negz."+e.extension]),this.texture.format=THREE[e.format],this.object3dsetHandler=()=>{const e=this.el.getObject3D("mesh"),t=this.data;n(e,t.materials,this.texture,t.reflectivity)},this.el.addEventListener("object3dset",this.object3dsetHandler)},update:function(e){const t=this.data,r=this.el.getObject3D("mesh");let i=[],o=[];if(t.materials.length&&(e.materials?(i=t.materials.filter(t=>!e.materials.includes(t)),o=e.materials.filter(e=>!t.materials.includes(e))):i=t.materials),i.length&&n(r,i,this.texture,t.reflectivity),o.length&&n(r,o,null,1),e.materials&&t.reflectivity!==e.reflectivity){const i=t.materials.filter(t=>e.materials.includes(t));i.length&&n(r,i,this.texture,t.reflectivity)}this.data.enableBackground&&!e.enableBackground?this.setBackground(this.texture):!this.data.enableBackground&&e.enableBackground&&this.setBackground(null)},remove:function(){this.el.removeEventListener("object3dset",this.object3dsetHandler);const e=this.el.getObject3D("mesh"),t=this.data;n(e,t.materials,null,1),t.enableBackground&&this.setBackground(null)},setBackground:function(e){this.el.sceneEl.object3D.background=e}})},function(e,t){e.exports=AFRAME.registerComponent("grab",{init:function(){this.system=this.el.sceneEl.systems.physics,this.GRABBED_STATE="grabbed",this.grabbing=!1,this.hitEl=null,this.physics=this.el.sceneEl.systems.physics,this.constraint=null,this.onHit=this.onHit.bind(this),this.onGripOpen=this.onGripOpen.bind(this),this.onGripClose=this.onGripClose.bind(this)},play:function(){const e=this.el;e.addEventListener("hit",this.onHit),e.addEventListener("gripdown",this.onGripClose),e.addEventListener("gripup",this.onGripOpen),e.addEventListener("trackpaddown",this.onGripClose),e.addEventListener("trackpadup",this.onGripOpen),e.addEventListener("triggerdown",this.onGripClose),e.addEventListener("triggerup",this.onGripOpen)},pause:function(){const e=this.el;e.removeEventListener("hit",this.onHit),e.removeEventListener("gripdown",this.onGripClose),e.removeEventListener("gripup",this.onGripOpen),e.removeEventListener("trackpaddown",this.onGripClose),e.removeEventListener("trackpadup",this.onGripOpen),e.removeEventListener("triggerdown",this.onGripClose),e.removeEventListener("triggerup",this.onGripOpen)},onGripClose:function(){this.grabbing=!0},onGripOpen:function(){const e=this.hitEl;this.grabbing=!1,e&&(e.removeState(this.GRABBED_STATE),this.hitEl=void 0,this.system.removeConstraint(this.constraint),this.constraint=null)},onHit:function(e){const t=e.detail.el;t&&!t.is(this.GRABBED_STATE)&&this.grabbing&&!this.hitEl&&(t.addState(this.GRABBED_STATE),this.hitEl=t,this.constraint=new CANNON.LockConstraint(this.el.body,t.body),this.system.addConstraint(this.constraint))}})},function(e,t){e.exports=AFRAME.registerComponent("jump-ability",{dependencies:["velocity"],schema:{on:{default:"keydown:Space gamepadbuttondown:0"},playerHeight:{default:1.764},maxJumps:{default:1},distance:{default:5},debug:{default:!1}},init:function(){this.velocity=0,this.numJumps=0;const e=this.beginJump.bind(this),t=this.data.on.split(" ");this.bindings={};for(let n=0;n<t.length;n++)this.bindings[t[n]]=e,this.el.addEventListener(t[n],e);this.bindings.collide=this.onCollide.bind(this),this.el.addEventListener("collide",this.bindings.collide)},remove:function(){for(var e in this.bindings)this.bindings.hasOwnProperty(e)&&(this.el.removeEventListener(e,this.bindings[e]),delete this.bindings[e]);this.el.removeEventListener("collide",this.bindings.collide),delete this.bindings.collide},beginJump:function(){if(this.numJumps<this.data.maxJumps){const e=this.data,t=Math.sqrt(-2*e.distance*-24.8),n=this.el.getAttribute("velocity");this.el.setAttribute("velocity",{x:n.x,y:t,z:n.z}),this.numJumps++,this.el.emit("jumpstart")}},onCollide:function(){this.numJumps>0&&this.el.emit("jumpend"),this.numJumps=0}})},function(e,t){e.exports=AFRAME.registerComponent("kinematic-body",{dependencies:["velocity"],schema:{mass:{default:5},radius:{default:1.3},linearDamping:{default:.05},enableSlopes:{default:!0},enableJumps:{default:!1}},init:function(){this.system=this.el.sceneEl.systems.physics,this.system.addComponent(this);const e=this.el,t=this.data,n=(new CANNON.Vec3).copy(e.object3D.getWorldPosition(new THREE.Vector3));this.body=new CANNON.Body({material:this.system.getMaterial("staticMaterial"),position:n,mass:t.mass,linearDamping:t.linearDamping,fixedRotation:!0}),this.body.addShape(new CANNON.Sphere(t.radius),new CANNON.Vec3(0,t.radius,0)),this.body.el=this.el,this.el.body=this.body,this.system.addBody(this.body),e.hasAttribute("wasd-controls")&&console.warn("[kinematic-body] Not compatible with wasd-controls, use movement-controls.")},remove:function(){this.system.removeBody(this.body),this.system.removeComponent(this),delete this.el.body},beforeStep:function(e,t){if(!t)return;const n=this.el,r=this.data,i=this.body;r.enableJumps||i.velocity.set(0,0,0),i.position.copy(n.getAttribute("position"))},step:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3;return function(i,o){if(!o)return;let a,s,l=this.body,c=this.data,u=!1,h=-1/0,d=this.system.getContacts();o=Math.min(o,1e3*this.system.data.maxInterval),r.set(0,0,0),e.copy(this.el.getAttribute("velocity")),l.velocity.copy(e);for(var f,p=0;f=d[p];p++)if(f.enabled){if(l.id===f.bi.id)f.ni.negate(n);else{if(l.id!==f.bj.id)continue;n.copy(f.ni)}u=l.velocity.dot(n)<-1e-6,u&&n.y<=.5?e.projectOnPlane(n):n.y>.5&&(a=l.id===f.bi.id?Math.abs(f.rj.y+f.bj.position.y):Math.abs(f.ri.y+f.bi.position.y),a>h&&(h=a,r.copy(n),s=l.id===f.bi.id?f.bj:f.bi))}t.copy(e).normalize(),s&&(!c.enableJumps||t.y<.5)?(c.enableSlopes?r.y<.999999&&r.copy(this.raycastToGround(s,r)):r.set(0,1,0),e.projectOnPlane(r)):this.system.driver.world&&e.add(this.system.driver.world.gravity.scale(4*o/1e3)),l.velocity.copy(e),this.el.setAttribute("velocity",l.velocity),this.el.setAttribute("position",l.position)}}(),raycastToGround:function(e,t){let n,r,i=this.body.position,o=this.body.position.clone();return n=new CANNON.Ray(i,o),n._updateDirection(),n.intersectBody(e),n.hasHit?(r=n.result.hitNormalWorld,Math.abs(r.y)>Math.abs(t.y)?r:t):t}})},function(e,t){e.exports=AFRAME.registerComponent("mesh-smooth",{init:function(){this.el.addEventListener("model-loaded",e=>{e.detail.model.traverse(e=>{e.isMesh&&e.geometry.computeVertexNormals()})})}})},function(e,t){e.exports=AFRAME.registerComponent("normal-material",{init:function(){this.material=new THREE.MeshNormalMaterial({flatShading:!0}),this.applyMaterial=this.applyMaterial.bind(this),this.el.addEventListener("object3dset",this.applyMaterial)},remove:function(){this.el.removeEventListener("object3dset",this.applyMaterial)},applyMaterial:function(){this.el.object3D.traverse(e=>{e.isMesh&&(e.material=this.material)})}})},function(e,t){e.exports=AFRAME.registerComponent("sphere-collider",{schema:{objects:{default:""},state:{default:"collided"},radius:{default:.05},watch:{default:!0}},init:function(){this.observer=null,this.els=[],this.collisions=[],this.handleHit=this.handleHit.bind(this),this.handleHitEnd=this.handleHitEnd.bind(this)},remove:function(){this.pause()},play:function(){const e=this.el.sceneEl;this.data.watch&&(this.observer=new MutationObserver(this.update.bind(this,null)),this.observer.observe(e,{childList:!0,subtree:!0}))},pause:function(){this.observer&&(this.observer.disconnect(),this.observer=null)},update:function(){const e=this.data;let t;t=e.objects?this.el.sceneEl.querySelectorAll(e.objects):this.el.sceneEl.children,this.els=Array.prototype.slice.call(t)},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3,r=new THREE.Vector3,i=new THREE.Box3,o=new Map;return function(){const a=this.el,s=this.data,l=a.getObject3D("mesh"),c=[];let u;var h;l&&(o.clear(),a.object3D.getWorldPosition(e),a.object3D.getWorldScale(n),u=s.radius*(h=n,Math.max.apply(null,h.toArray())),this.els.forEach((function(n){let a,s,l,h;if(!n.isEntity)return;if(s=n.getObject3D("mesh"),!s)return;if(i.setFromObject(s).getSize(r),h=Math.max(r.x,r.y,r.z)/2,a=Math.sqrt(2*h*h),i.getCenter(t),!a)return;l=e.distanceTo(t),l<a+u&&(c.push(n),o.set(n,l))})),c.sort((e,t)=>o.get(e)>o.get(t)?1:-1).forEach(this.handleHit),0===c.length&&a.emit("hit",{el:null}),this.collisions.filter(e=>!o.has(e)).forEach(this.handleHitEnd),this.collisions=c)}}(),handleHit:function(e){e.emit("hit"),e.addState(this.data.state),this.el.emit("hit",{el:e})},handleHitEnd:function(e){e.emit("hitend"),e.removeState(this.data.state),this.el.emit("hitend",{el:e})}})},function(e,t,n){n(340),n(341),n(342)},function(e,t){e.exports=AFRAME.registerComponent("nav-mesh",{init:function(){this.system=this.el.sceneEl.systems.nav,this.hasLoadedNavMesh=!1,this.el.addEventListener("object3dset",this.loadNavMesh.bind(this))},play:function(){this.hasLoadedNavMesh||this.loadNavMesh()},loadNavMesh:function(){const e=this.el.getObject3D("mesh"),t=this.el.sceneEl.object3D;if(!e)return;let n;if(e.traverse(e=>{e.isMesh&&(n=e)}),!n)return;const r=n.geometry.isBufferGeometry?(new THREE.Geometry).fromBufferGeometry(n.geometry):n.geometry.clone();t.updateMatrixWorld(),r.applyMatrix(n.matrixWorld),this.system.setNavMeshGeometry(r),this.hasLoadedNavMesh=!0}})},function(e,t){e.exports=AFRAME.registerComponent("nav-agent",{schema:{destination:{type:"vec3"},active:{default:!1},speed:{default:2}},init:function(){this.system=this.el.sceneEl.systems.nav,this.system.addAgent(this),this.group=null,this.path=[],this.raycaster=new THREE.Raycaster},remove:function(){this.system.removeAgent(this)},update:function(){this.path.length=0},updateNavLocation:function(){this.group=null,this.path=[]},tick:function(){const e=new THREE.Vector3,t=new THREE.Vector3,n=new THREE.Vector3;return function(r,i){const o=this.el,a=this.data,s=this.raycaster,l=a.speed*i/1e3;if(!a.active)return;if(!this.path.length){const t=this.el.object3D.position;this.group=this.group||this.system.getGroup(t),this.path=this.system.getPath(t,e.copy(a.destination),this.group)||[],o.emit("navigation-start")}if(!this.path.length)return console.warn("[nav] Unable to find path to %o.",a.destination),this.el.setAttribute("nav-agent",{active:!1}),void o.emit("navigation-end");const c=o.object3D.position,u=this.path[0];t.subVectors(u,c);let h;if(t.length()<l){if(this.path.shift(),!this.path.length)return this.el.setAttribute("nav-agent",{active:!1}),void o.emit("navigation-end");n.copy(c),h=this.path[0]}else n.copy(t.setLength(l)).add(c),h=u;h.y=c.y,o.object3D.lookAt(h),s.ray.origin.copy(n),s.ray.origin.y+=1.5,s.ray.direction.y=-1;const d=s.intersectObject(this.system.getNavMesh());d.length?(t.subVectors(d[0].point,c),c.add(t.setLength(l))):c.copy(n)}}()})},function(e,t,n){const{Pathfinding:r}=n(343),i=new r,o="level";e.exports=AFRAME.registerSystem("nav",{init:function(){this.navMesh=null,this.agents=new Set},setNavMeshGeometry:function(e){this.navMesh=new THREE.Mesh(e),i.setZoneData(o,r.createZone(e)),Array.from(this.agents).forEach(e=>e.updateNavLocation())},getNavMesh:function(){return this.navMesh},addAgent:function(e){this.agents.add(e)},removeAgent:function(e){this.agents.delete(e)},getPath:function(e,t,n){return this.navMesh?i.findPath(e,t,o,n):null},getGroup:function(e){return this.navMesh?i.getGroup(o,e):null},getNode:function(e,t){return this.navMesh?i.getClosestNode(e,o,t,!0):null},clampStep:function(e,t,n,r,a){return this.navMesh?r?i.clampStep(e,t,r,o,n,a):(a.copy(t),this.getNode(t,n)):(a.copy(t),null)}})},function(e,t,n){"use strict";n.r(t),n.d(t,"Pathfinding",(function(){return m}));var r=function(){};r.computeCentroids=function(e){var t,n,r;for(t=0,n=e.faces.length;t<n;t++)(r=e.faces[t]).centroid=new THREE.Vector3(0,0,0),r.centroid.add(e.vertices[r.a]),r.centroid.add(e.vertices[r.b]),r.centroid.add(e.vertices[r.c]),r.centroid.divideScalar(3)},r.roundNumber=function(e,t){return Number(e.toFixed(t))},r.sample=function(e){return e[Math.floor(Math.random()*e.length)]},r.mergeVertexIds=function(e,t){var n=[];if(e.forEach((function(e){t.indexOf(e)>=0&&n.push(e)})),n.length<2)return[];n.includes(e[0])&&n.includes(e[e.length-1])&&e.push(e.shift()),n.includes(t[0])&&n.includes(t[t.length-1])&&t.push(t.shift()),n=[],e.forEach((function(e){t.includes(e)&&n.push(e)}));for(var r=n[1],i=n[0],o=e.slice();o[0]!==r;)o.push(o.shift());for(var a=0,s=t.slice();s[0]!==i;)if(s.push(s.shift()),a++>10)throw new Error("Unexpected state");return s.shift(),s.pop(),o.concat(s)},r.setPolygonCentroid=function(e,t){var n=new THREE.Vector3,r=t.vertices;e.vertexIds.forEach((function(e){n.add(r[e])})),n.divideScalar(e.vertexIds.length),e.centroid.copy(n)},r.cleanPolygon=function(e,t){for(var n=[],r=t.vertices,i=0;i<e.vertexIds.length;i++){var o,a,s,l=r[e.vertexIds[i]];0===i?(o=e.vertexIds[1],a=e.vertexIds[e.vertexIds.length-1]):i===e.vertexIds.length-1?(o=e.vertexIds[0],a=e.vertexIds[e.vertexIds.length-2]):(o=e.vertexIds[i+1],a=e.vertexIds[i-1]),s=r[a];var c=r[o].clone().sub(l),u=s.clone().sub(l),h=c.angleTo(u);if(h>Math.PI-.01&&h<Math.PI+.01){var d=[];e.neighbours.forEach((function(t){t.vertexIds.includes(e.vertexIds[i])||d.push(t)})),e.neighbours=d}else n.push(e.vertexIds[i])}e.vertexIds=n,this.setPolygonCentroid(e,t)},r.isConvex=function(e,t){var n=t.vertices;if(e.vertexIds.length<3)return!1;for(var r=!0,i=[],o=0;o<e.vertexIds.length;o++){var a,s,l=n[e.vertexIds[o]];0===o?(a=n[e.vertexIds[1]],s=n[e.vertexIds[e.vertexIds.length-1]]):o===e.vertexIds.length-1?(a=n[e.vertexIds[0]],s=n[e.vertexIds[e.vertexIds.length-2]]):(a=n[e.vertexIds[o+1]],s=n[e.vertexIds[o-1]]);var c=a.clone().sub(l),u=s.clone().sub(l),h=c.angleTo(u);if(h===Math.PI||0===h)return!1;var d=c.cross(u).y;i.push(d)}return i.forEach((function(e){0===e&&(r=!1)})),i.forEach(i[0]>0?function(e){e<0&&(r=!1)}:function(e){e>0&&(r=!1)}),r},r.distanceToSquared=function(e,t){var n=e.x-t.x,r=e.y-t.y,i=e.z-t.z;return n*n+r*r+i*i},r.isPointInPoly=function(e,t){for(var n=!1,r=-1,i=e.length,o=i-1;++r<i;o=r)(e[r].z<=t.z&&t.z<e[o].z||e[o].z<=t.z&&t.z<e[r].z)&&t.x<(e[o].x-e[r].x)*(t.z-e[r].z)/(e[o].z-e[r].z)+e[r].x&&(n=!n);return n},r.isVectorInPolygon=function(e,t,n){var r=1e5,i=-1e5,o=[];return t.vertexIds.forEach((function(e){r=Math.min(n[e].y,r),i=Math.max(n[e].y,i),o.push(n[e])})),!!(e.y<i+.5&&e.y>r-.5&&this.isPointInPoly(o,e))},r.triarea2=function(e,t,n){return(n.x-e.x)*(t.z-e.z)-(t.x-e.x)*(n.z-e.z)},r.vequal=function(e,t){return this.distanceToSquared(e,t)<1e-5};var i=function(e){this.content=[],this.scoreFunction=e};i.prototype.push=function(e){this.content.push(e),this.sinkDown(this.content.length-1)},i.prototype.pop=function(){var e=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.bubbleUp(0)),e},i.prototype.remove=function(e){var t=this.content.indexOf(e),n=this.content.pop();t!==this.content.length-1&&(this.content[t]=n,this.scoreFunction(n)<this.scoreFunction(e)?this.sinkDown(t):this.bubbleUp(t))},i.prototype.size=function(){return this.content.length},i.prototype.rescoreElement=function(e){this.sinkDown(this.content.indexOf(e))},i.prototype.sinkDown=function(e){for(var t=this.content[e];e>0;){var n=(e+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(t)<this.scoreFunction(r)))break;this.content[n]=t,this.content[e]=r,e=n}},i.prototype.bubbleUp=function(e){for(var t=this.content.length,n=this.content[e],r=this.scoreFunction(n);;){var i=e+1<<1,o=i-1,a=null,s=void 0;if(o<t&&(s=this.scoreFunction(this.content[o]))<r&&(a=o),i<t&&this.scoreFunction(this.content[i])<(null===a?r:s)&&(a=i),null===a)break;this.content[e]=this.content[a],this.content[a]=n,e=a}};var o=function(){};o.init=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.f=0,n.g=0,n.h=0,n.cost=1,n.visited=!1,n.closed=!1,n.parent=null}},o.cleanUp=function(e){for(var t=0;t<e.length;t++){var n=e[t];delete n.f,delete n.g,delete n.h,delete n.cost,delete n.visited,delete n.closed,delete n.parent}},o.heap=function(){return new i((function(e){return e.f}))},o.search=function(e,t,n){this.init(e);var r=this.heap();for(r.push(t);r.size()>0;){var i=r.pop();if(i===n){for(var o=i,a=[];o.parent;)a.push(o),o=o.parent;return this.cleanUp(a),a.reverse()}i.closed=!0;for(var s=this.neighbours(e,i),l=0,c=s.length;l<c;l++){var u=s[l];if(!u.closed){var h=i.g+u.cost,d=u.visited;if(!d||h<u.g){if(u.visited=!0,u.parent=i,!u.centroid||!n.centroid)throw new Error("Unexpected state");u.h=u.h||this.heuristic(u.centroid,n.centroid),u.g=h,u.f=u.g+u.h,d?r.rescoreElement(u):r.push(u)}}}}return[]},o.heuristic=function(e,t){return r.distanceToSquared(e,t)},o.neighbours=function(e,t){for(var n=[],r=0;r<t.neighbours.length;r++)n.push(e[t.neighbours[r]]);return n};var a=1,s=function(){};s.buildZone=function(e){var t=this,n=this._buildNavigationMesh(e),i={};n.vertices.forEach((function(e){e.x=r.roundNumber(e.x,2),e.y=r.roundNumber(e.y,2),e.z=r.roundNumber(e.z,2)})),i.vertices=n.vertices;var o=this._buildPolygonGroups(n);i.groups=[];var a=function(e,t){for(var n=0;n<e.length;n++)if(t===e[n])return n};return o.forEach((function(e){var n=[];e.forEach((function(i){var o=i.neighbours.map((function(t){return a(e,t)})),s=i.neighbours.map((function(e){return t._getSharedVerticesInOrder(i,e)}));i.centroid.x=r.roundNumber(i.centroid.x,2),i.centroid.y=r.roundNumber(i.centroid.y,2),i.centroid.z=r.roundNumber(i.centroid.z,2),n.push({id:a(e,i),neighbours:o,vertexIds:i.vertexIds,centroid:i.centroid,portals:s})})),i.groups.push(n)})),i},s._buildNavigationMesh=function(e){return r.computeCentroids(e),e.mergeVertices(),this._buildPolygonsFromGeometry(e)},s._buildPolygonGroups=function(e){var t=[],n=0,r=function(e){e.neighbours.forEach((function(t){void 0===t.group&&(t.group=e.group,r(t))}))};return e.polygons.forEach((function(e){void 0===e.group&&(e.group=n++,r(e)),t[e.group]||(t[e.group]=[]),t[e.group].push(e)})),t},s._buildPolygonNeighbours=function(e,t,n){var r=new Set,i=n.get(e.vertexIds[0]),o=n.get(e.vertexIds[1]),a=n.get(e.vertexIds[2]);i.forEach((function(e){(o.has(e)||a.has(e))&&r.add(t.polygons[e])})),o.forEach((function(e){a.has(e)&&r.add(t.polygons[e])})),e.neighbours=Array.from(r)},s._buildPolygonsFromGeometry=function(e){for(var t=this,n=[],r=e.vertices,i=e.faceVertexUvs,o=new Map,s=0;s<r.length;s++)o.set(s,new Set);e.faces.forEach((function(e){n.push({id:a++,vertexIds:[e.a,e.b,e.c],centroid:e.centroid,normal:e.normal,neighbours:[]}),o.get(e.a).add(n.length-1),o.get(e.b).add(n.length-1),o.get(e.c).add(n.length-1)}));var l={polygons:n,vertices:r,faceVertexUvs:i};return n.forEach((function(e){t._buildPolygonNeighbours(e,l,o)})),l},s._getSharedVerticesInOrder=function(e,t){var n=e.vertexIds,r=t.vertexIds,i=new Set;if(n.forEach((function(e){r.includes(e)&&i.add(e)})),i.size<2)return[];i.has(n[0])&&i.has(n[n.length-1])&&n.push(n.shift()),i.has(r[0])&&i.has(r[r.length-1])&&r.push(r.shift());var o=[];return n.forEach((function(e){r.includes(e)&&o.push(e)})),o};var l=function(){this.portals=[]};l.prototype.push=function(e,t){void 0===t&&(t=e),this.portals.push({left:e,right:t})},l.prototype.stringPull=function(){var e,t,n,i=this.portals,o=[],a=0,s=0,l=0;t=i[0].left,n=i[0].right,o.push(e=i[0].left);for(var c=1;c<i.length;c++){var u=i[c].left,h=i[c].right;if(r.triarea2(e,n,h)<=0){if(!(r.vequal(e,n)||r.triarea2(e,t,h)>0)){o.push(t),t=e=t,n=e,s=a=s,l=a,c=a;continue}n=h,l=c}if(r.triarea2(e,t,u)>=0){if(!(r.vequal(e,t)||r.triarea2(e,n,u)<0)){o.push(n),t=e=n,n=e,s=a=l,l=a,c=a;continue}t=u,s=c}}return 0!==o.length&&r.vequal(o[o.length-1],i[i.length-1].left)||o.push(i[i.length-1].left),this.path=o,o};var c,u,h,d,f,p,m=function(){this.zones={}};m.createZone=function(e){return s.buildZone(e)},m.prototype.setZoneData=function(e,t){this.zones[e]=t},m.prototype.getGroup=function(e,t){if(!this.zones[e])return null;var n=null,i=Math.pow(50,2);return this.zones[e].groups.forEach((function(e,o){e.forEach((function(e){var a=r.distanceToSquared(e.centroid,t);a<i&&(n=o,i=a)}))})),n},m.prototype.getRandomNode=function(e,t,n,i){if(!this.zones[e])return new THREE.Vector3;n=n||null,i=i||0;var o=[];return this.zones[e].groups[t].forEach((function(e){n&&i?r.distanceToSquared(n,e.centroid)<i*i&&o.push(e.centroid):o.push(e.centroid)})),r.sample(o)||new THREE.Vector3},m.prototype.getClosestNode=function(e,t,n,i){void 0===i&&(i=!1);var o=this.zones[t].vertices,a=null,s=1/0;return this.zones[t].groups[n].forEach((function(t){var n=r.distanceToSquared(t.centroid,e);n<s&&(!i||r.isVectorInPolygon(e,t,o))&&(a=t,s=n)})),a},m.prototype.findPath=function(e,t,n,r){var i=this.zones[n].groups[r],a=this.zones[n].vertices,s=this.getClosestNode(e,n,r),c=this.getClosestNode(t,n,r,!0);if(!s||!c)return null;var u=o.search(i,s,c),h=function(e,t){for(var n=0;n<e.neighbours.length;n++)if(e.neighbours[n]===t.id)return e.portals[n]},d=new l;d.push(e);for(var f=0;f<u.length;f++){var p=u[f+1];if(p){var m=h(u[f],p);d.push(a[m[0]],a[m[1]])}}d.push(t),d.stringPull();var g=d.path.map((function(e){return new THREE.Vector3(e.x,e.y,e.z)}));return g.shift(),g},m.prototype.clampStep=(h=new THREE.Vector3,d=new THREE.Plane,f=new THREE.Triangle,p=new THREE.Vector3,function(e,t,n,r,i,o){var a=this.zones[r].vertices,s=this.zones[r].groups[i],l=[n],m={};m[n.id]=0,c=void 0,p.set(0,0,0),u=1/0,d.setFromCoplanarPoints(a[n.vertexIds[0]],a[n.vertexIds[1]],a[n.vertexIds[2]]),d.projectPoint(t,h),t.copy(h);for(var g=l.pop();g;g=l.pop()){f.set(a[g.vertexIds[0]],a[g.vertexIds[1]],a[g.vertexIds[2]]),f.closestPointToPoint(t,h),h.distanceToSquared(t)<u&&(c=g,p.copy(h),u=h.distanceToSquared(t));var v=m[g];if(!(v>2))for(var y=0;y<g.neighbours.length;y++){var b=s[g.neighbours[y]];b.id in m||(l.push(b),m[b.id]=v+1)}}return o.copy(p),c})},function(e,t,n){n(345),n(346),n(349),n(350)},function(e,t){e.exports=AFRAME.registerPrimitive("a-grid",{defaultComponents:{geometry:{primitive:"plane",width:75,height:75},rotation:{x:-90,y:0,z:0},material:{src:"url(https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/assets/grid.png)",repeat:"75 75"}},mappings:{width:"geometry.width",height:"geometry.height",src:"material.src"}})},function(e,t,n){const r=n(347),i=n(348);e.exports.Primitive=AFRAME.registerPrimitive("a-hexgrid",{defaultComponents:{hexgrid:{}},mappings:{src:"hexgrid.src"}}),e.exports.Component=AFRAME.registerComponent("hexgrid",{dependencies:["material"],schema:{src:{type:"asset"}},init:function(){const e=this.data;e.src?fetch(e.src).then(e=>e.json()).then(e=>this.addMesh(e)):this.addMesh(i)},addMesh:function(e){const t=new r.HexGrid;t.fromJSON(e);const n=new r.Board(t);n.generateTilemap(),this.el.setObject3D("mesh",n.group),this.addMaterial()},addMaterial:function(){const e=(this.el.components.material||{}).material;e&&this.el.object3D.traverse(t=>{t.isMesh&&(t.material=e)})},remove:function(){this.el.removeObject3D("mesh")}})},function(e,t){var n=e.exports={VERSION:"0.1.1",PI:Math.PI,TAU:2*Math.PI,DEG_TO_RAD:.0174532925,RAD_TO_DEG:57.2957795,SQRT3:Math.sqrt(3),TILE:"tile",ENT:"entity",STR:"structure",HEX:"hex",SQR:"square",ABS:"abstract"};n.Board=function(e,t){if(!e)throw new Error("You must pass in a grid system for the board to use.");this.tiles=[],this.tileGroup=null,this.group=new THREE.Object3D,this.grid=null,this.overlay=null,this.finder=new n.AStarFinder(t),n.Loader.init(),this.setGrid(e)},n.Board.prototype={setEntityOnTile:function(e,t){var n=this.grid.cellToPixel(t.cell);e.position.copy(n),e.position.y+=e.heightOffset||0,e.tile&&(e.tile.entity=null),e.tile=t,t.entity=e},addTile:function(e){-1===this.tiles.indexOf(e)&&(this.tiles.push(e),this.snapTileToGrid(e),e.position.y=0,this.tileGroup.add(e.mesh),this.grid.add(e.cell),e.cell.tile=e)},removeTile:function(e){if(e){var t=this.tiles.indexOf(e);this.grid.remove(e.cell),-1!==t&&this.tiles.splice(t,1),e.dispose()}},removeAllTiles:function(){if(this.tileGroup)for(var e=this.tileGroup.children,t=0;t<e.length;t++)this.tileGroup.remove(e[t])},getTileAtCell:function(e){var t=this.grid.cellToHash(e);return e.tile||("undefined"!=typeof this.grid.cells[t]?this.grid.cells[t].tile:null)},snapToGrid:function(e){var t=this.grid.pixelToCell(e);e.copy(this.grid.cellToPixel(t))},snapTileToGrid:function(e){if(e.cell)e.position.copy(this.grid.cellToPixel(e.cell));else{var t=this.grid.pixelToCell(e.position);e.position.copy(this.grid.cellToPixel(t))}return e},getRandomTile:function(){var e=n.Tools.randomInt(0,this.tiles.length-1);return this.tiles[e]},findPath:function(e,t,n){return this.finder.findPath(e.cell,t.cell,n,this.grid)},setGrid:function(e){this.group.remove(this.tileGroup),this.grid&&e!==this.grid&&(this.removeAllTiles(),this.tiles.forEach((function(e){this.grid.remove(e.cell),e.dispose()})),this.grid.dispose()),this.grid=e,this.tiles=[],this.tileGroup=new THREE.Object3D,this.group.add(this.tileGroup)},generateOverlay:function(e){var t=new THREE.LineBasicMaterial({color:0,opacity:.3});this.overlay&&this.group.remove(this.overlay),this.overlay=new THREE.Object3D,this.grid.generateOverlay(e,this.overlay,t),this.group.add(this.overlay)},generateTilemap:function(e){this.reset();var t=this.grid.generateTiles(e);this.tiles=t,this.tileGroup=new THREE.Object3D;for(var n=0;n<t.length;n++)this.tileGroup.add(t[n].mesh);this.group.add(this.tileGroup)},reset:function(){this.removeAllTiles(),this.tileGroup&&this.group.remove(this.tileGroup)}},n.Board.prototype.constructor=n.Board,n.Cell=function(e,t,r,i){this.q=e||0,this.r=t||0,this.s=r||0,this.h=i||1,this.tile=null,this.userData={},this.walkable=!0,this._calcCost=0,this._priority=0,this._visited=!1,this._parent=null,this.uniqueID=n.LinkedList.generateID()},n.Cell.prototype={set:function(e,t,n){return this.q=e,this.r=t,this.s=n,this},copy:function(e){return this.q=e.q,this.r=e.r,this.s=e.s,this.h=e.h,this.tile=e.tile||null,this.userData=e.userData||{},this.walkable=e.walkable,this},add:function(e){return this.q+=e.q,this.r+=e.r,this.s+=e.s,this},equals:function(e){return this.q===e.q&&this.r===e.r&&this.s===e.s}},n.Cell.prototype.constructor=n.Cell,n.HexGrid=function(e){e=e||{},this.type=n.HEX,this.size=5,this.cellSize="undefined"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t,r=[];for(t=0;6>t;t++)r.push(this._createVertex(t));for(this.cellShape=new THREE.Shape,this.cellShape.moveTo(r[0].x,r[0].y),t=1;6>t;t++)this.cellShape.lineTo(r[t].x,r[t].y);this.cellShape.lineTo(r[0].x,r[0].y),this.cellShape.autoClose=!0,this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=r,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this._hashDelimeter=".",this._directions=[new n.Cell(1,-1,0),new n.Cell(1,0,-1),new n.Cell(0,1,-1),new n.Cell(-1,1,0),new n.Cell(-1,0,1),new n.Cell(0,-1,1)],this._diagonals=[new n.Cell(2,-1,-1),new n.Cell(1,1,-2),new n.Cell(-1,2,-1),new n.Cell(-2,1,1),new n.Cell(-1,-1,2),new n.Cell(1,-2,1)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new n.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},n.HexGrid.TWO_THIRDS=2/3,n.HexGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._cellWidth*.75,this._vec3.y=e.h,this._vec3.z=-(e.s-e.r)*this._cellLength*.5,this._vec3},pixelToCell:function(e){var t=e.x*(n.HexGrid.TWO_THIRDS/this.cellSize),r=(-e.x/3+n.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,r,-t-r),this._cubeRound(this._cel)},getCellAt:function(e){var t=e.x*(n.HexGrid.TWO_THIRDS/this.cellSize),r=(-e.x/3+n.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,r,-t-r),this._cubeRound(this._cel),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,n){var r,i,o=this._directions.length;for(this._list.length=0,r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._directions[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);if(t)for(r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._diagonals[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);return this._list},getRandomCell:function(){var e,t=0,r=n.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===r)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r+this._hashDelimeter+e.s},distance:function(e,t){return Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r),Math.abs(e.s-t.s))+(t.h-e.h)},clearPath:function(){var e,t;for(e in this.cells)(t=this.cells[e])._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,r){var i=Math.abs(e.h);1>i&&(i=1);var o=this._geoCache[i];o||(this.extrudeSettings.amount=i,o=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[i]=o);var a=new n.Tile({size:this.cellSize,scale:t,cell:e,geometry:o,material:r});return e.tile=a,a},generateTiles:function(e){e=e||{};var t,r,i,o=[],a={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};for(t in a=n.Tools.merge(a,e),this.cellSize=a.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this.autogenerated=!0,this.extrudeSettings=a.extrudeSettings,this.cells)i=this.cells[t],(r=this.generateTile(i,a.tileScale,a.material)).position.copy(this.cellToPixel(i)),r.position.y=0,o.push(r);return o},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,n.PI/2),t},generate:function(e){var t,r,i,o;for(e=e||{},this.size="undefined"==typeof e.size?this.size:e.size,t=-this.size;t<this.size+1;t++)for(r=-this.size;r<this.size+1;r++)i=-t-r,Math.abs(t)<=this.size&&Math.abs(r)<=this.size&&Math.abs(i)<=this.size&&(o=new n.Cell(t,r,i),this.add(o))},generateOverlay:function(e,t,r){var i,o,a,s=this.cellShape.createPointsGeometry();for(i=-e;e+1>i;i++)for(o=-e;e+1>o;o++)if(a=-i-o,Math.abs(i)<=e&&Math.abs(o)<=e&&Math.abs(a)<=e){this._cel.set(i,o,a);var l=new THREE.Line(s,r);l.position.copy(this.cellToPixel(this._cel)),l.rotation.x=90*n.DEG_TO_RAD,t.add(l)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,r){var i=this;n.Tools.getJSON({url:e,callback:function(e){i.fromJSON(e),t.call(r||null,e)},cache:!1,scope:i})},fromJSON:function(e){var t,r,i=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*n.SQRT3*this._cellWidth,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<i.length;t++)(r=new n.Cell).copy(i[t]),this.add(r)},toJSON:function(){var e,t,n={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},r=[];for(t in this.cells)e=this.cells[t],r.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return n.cells=r,n},_createVertex:function(e){var t=n.TAU/6*e;return new THREE.Vector3(this.cellSize*Math.cos(t),this.cellSize*Math.sin(t),0)},_cubeRound:function(e){var t=Math.round(e.q),n=Math.round(e.r),r=Math.round(e.s),i=Math.abs(t-e.q),o=Math.abs(n-e.r),a=Math.abs(r-e.s);return i>o&&i>a?t=-n-r:o>a?n=-t-r:r=-t-n,this._cel.set(t,n,r)}},n.HexGrid.prototype.constructor=n.HexGrid,n.SqrGrid=function(e){e=e||{},this.type=n.SQR,this.size=5,this.cellSize="undefined"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t=[];t.push(new THREE.Vector3),t.push(new THREE.Vector3(-this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,-this.cellSize)),this.cellShape=new THREE.Shape,this.cellShape.moveTo(-this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,-this.cellSize),this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=t,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._fullCellSize=2*this.cellSize,this._hashDelimeter=".",this._directions=[new n.Cell(1,0,0),new n.Cell(0,-1,0),new n.Cell(-1,0,0),new n.Cell(0,1,0)],this._diagonals=[new n.Cell(-1,-1,0),new n.Cell(-1,1,0),new n.Cell(1,1,0),new n.Cell(1,-1,0)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new n.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},n.SqrGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._fullCellSize,this._vec3.y=e.h,this._vec3.z=e.r*this._fullCellSize,this._vec3},pixelToCell:function(e){var t=Math.round(e.x/this._fullCellSize),n=Math.round(e.z/this._fullCellSize);return this._cel.set(t,n,0)},getCellAt:function(e){var t=Math.round(e.x/this._fullCellSize),n=Math.round(e.z/this._fullCellSize);return this._cel.set(t,n),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,n){var r,i,o=this._directions.length;for(this._list.length=0,r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._directions[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);if(t)for(r=0;o>r;r++)this._cel.copy(e),this._cel.add(this._diagonals[r]),!(i=this.cells[this.cellToHash(this._cel)])||n&&!n(e,i)||this._list.push(i);return this._list},getRandomCell:function(){var e,t=0,r=n.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===r)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r},distance:function(e,t){return Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r))+(t.h-e.h)},clearPath:function(){var e,t;for(e in this.cells)(t=this.cells[e])._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,r){var i=Math.abs(e.h);1>i&&(i=1);var o=this._geoCache[i];o||(this.extrudeSettings.amount=i,o=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[i]=o);var a=new n.Tile({size:this.cellSize,scale:t,cell:e,geometry:o,material:r});return e.tile=a,a},generateTiles:function(e){e=e||{};var t,r,i,o=[],a={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};for(t in a=n.Tools.merge(a,e),this.cellSize=a.cellSize,this._fullCellSize=2*this.cellSize,this.autogenerated=!0,this.extrudeSettings=a.extrudeSettings,this.cells)i=this.cells[t],(r=this.generateTile(i,a.tileScale,a.material)).position.copy(this.cellToPixel(i)),r.position.y=0,o.push(r);return o},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,n.PI/2),t},generate:function(e){e=e||{},this.size="undefined"==typeof e.size?this.size:e.size;var t,r,i,o=Math.ceil(this.size/2);for(t=-o;o>t;t++)for(r=-o;o>r;r++)i=new n.Cell(t,r+1),this.add(i)},generateOverlay:function(e,t,r){var i,o,a=Math.ceil(e/2);for(i=-a;a>i;i++)for(o=-a;a>o;o++){this._cel.set(i,o);var s=new THREE.Line(this.cellGeo,r);s.position.copy(this.cellToPixel(this._cel)),s.rotation.x=90*n.DEG_TO_RAD,t.add(s)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,r){n.Tools.getJSON({url:e,callback:function(e){this.fromJSON(e),t.call(r||null,e)},cache:!1,scope:this})},fromJSON:function(e){var t,r,i=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._fullCellSize=2*this.cellSize,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<i.length;t++)(r=new n.Cell).copy(i[t]),this.add(r)},toJSON:function(){var e,t,n={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},r=[];for(t in this.cells)e=this.cells[t],r.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return n.cells=r,n}},n.SqrGrid.prototype.constructor=n.SqrGrid,n.Tile=function(e){e=e||{};var t={cell:null,geometry:null,material:null};if(!(t=n.Tools.merge(t,e)).cell||!t.geometry)throw new Error("Missing vg.Tile configuration");this.cell=t.cell,this.cell.tile&&this.cell.tile!==this&&this.cell.tile.dispose(),this.cell.tile=this,this.uniqueID=n.Tools.generateID(),this.geometry=t.geometry,this.material=t.material,this.material||(this.material=new THREE.MeshPhongMaterial({color:n.Tools.randomizeRGB("30, 30, 30",13)})),this.objectType=n.TILE,this.entity=null,this.userData={},this.selected=!1,this.highlight="0x0084cc",this.mesh=new THREE.Mesh(this.geometry,this.material),this.mesh.userData.structure=this,this.position=this.mesh.position,this.rotation=this.mesh.rotation,this.rotation.x=-90*n.DEG_TO_RAD,this.mesh.scale.set(t.scale,t.scale,1),this.material.emissive?this._emissive=this.material.emissive.getHex():this._emissive=null},n.Tile.prototype={select:function(){return this.material.emissive&&this.material.emissive.setHex(this.highlight),this.selected=!0,this},deselect:function(){return null!==this._emissive&&this.material.emissive&&this.material.emissive.setHex(this._emissive),this.selected=!1,this},toggle:function(){return this.selected?this.deselect():this.select(),this},dispose:function(){this.cell&&this.cell.tile&&(this.cell.tile=null),this.cell=null,this.position=null,this.rotation=null,this.mesh.parent&&this.mesh.parent.remove(this.mesh),this.mesh.userData.structure=null,this.mesh=null,this.material=null,this.userData=null,this.entity=null,this.geometry=null,this._emissive=null}},n.Tile.prototype.constructor=n.Tile,function(){var e=function(){this.obj=null,this.next=null,this.prev=null,this.free=!0},t=function(){this.first=null,this.last=null,this.length=0,this.objToNodeMap={},this.uniqueID=Date.now()+""+Math.floor(1e3*Math.random()),this.sortArray=[]};t.generateID=function(){return Math.random().toString(36).slice(2)+Date.now()},(t.prototype={getNode:function(e){return this.objToNodeMap[e.uniqueID]},addNode:function(n){var r=new e;if(!n.uniqueID)try{n.uniqueID=t.generateID()}catch(i){return console.error("[LinkedList.addNode] obj passed is immutable: cannot attach necessary identifier"),null}return r.obj=n,r.free=!1,this.objToNodeMap[n.uniqueID]=r,r},swapObjects:function(e,t){this.objToNodeMap[e.obj.uniqueID]=null,this.objToNodeMap[t.uniqueID]=e,e.obj=t},add:function(e){var t=this.objToNodeMap[e.uniqueID];if(t){if(!1===t.free)return;t.obj=e,t.free=!1,t.next=null,t.prev=null}else t=this.addNode(e);if(this.first){if(!this.last)throw new Error("[LinkedList.add] No last in the list -- that shouldn't happen here");this.last.next=t,t.prev=this.last,this.last=t,t.next=null}else this.first=t,this.last=t,t.next=null,t.prev=null;this.length++,this.showDebug&&this.dump("after add")},has:function(e){return!!this.objToNodeMap[e.uniqueID]},moveUp:function(e){this.dump("before move up");var t=this.getNode(e);if(!t)throw"Oops, trying to move an object that isn't in the list";if(t.prev){var n=t.prev,r=n.prev;t==this.last&&(this.last=n);var i=t.next;r&&(r.next=t),t.next=n,t.prev=n.prev,n.next=i,n.prev=t,this.first==n&&(this.first=t)}},moveDown:function(e){var t=this.getNode(e);if(!t)throw"Oops, trying to move an object that isn't in the list";if(t.next){var n=t.next;this.moveUp(n.obj),this.last==n&&(this.last=t)}},sort:function(e){var t,n,r=this.sortArray,i=this.first;for(r.length=0;i;)r.push(i.obj),i=i.next;for(this.clear(),r.sort(e),n=r.length,t=0;n>t;t++)this.add(r[t])},remove:function(e){var t=this.getNode(e);return!(!t||t.free)&&(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.prev||(this.first=t.next),t.next||(this.last=t.prev),t.free=!0,t.prev=null,t.next=null,this.length--,!0)},shift:function(){var e=this.first;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.first=e.next,e.next||(this.last=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},pop:function(){var e=this.last;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.last=e.prev,e.prev||(this.first=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},concat:function(e){for(var t=e.first;t;)this.add(t.obj),t=t.next},clear:function(){for(var e=this.first;e;)e.free=!0,e=e.next;this.first=null,this.length=0},dispose:function(){for(var e=this.first;e;)e.obj=null,e=e.next;this.first=null,this.objToNodeMap=null},dump:function(e){console.log("===================="+e+"=====================");for(var t=this.first;t;)console.log("{"+t.obj.toString()+"} previous="+(t.prev?t.prev.obj:"NULL")),t=t.next();console.log("==================================="),console.log("Last: {"+(this.last?this.last.obj:"NULL")+"} First: {"+(this.first?this.first.obj:"NULL")+"}")}}).constructor=t,n.LinkedList=t}(),function(){var e=function(e,t,n,r,i){this._listener=t,this.isOnce=n,this.context=r,this.signal=e,this._priority=i||0};(e.prototype={active:!0,params:null,execute:function(e){var t,n;return this.active&&this._listener&&(n=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,n),this.isOnce&&this.detach()),t},detach:function(){return this.isBound()?this.signal.remove(this._listener,this.context):null},isBound:function(){return!!this.signal&&!!this._listener},_destroy:function(){delete this.signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this.isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}}).constructor=e;var t=function(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){t.prototype.dispatch.apply(e,arguments)}};t.prototype={memorize:!1,_shouldPropagate:!0,active:!0,validateListener:function(e,t){if("function"!=typeof e)throw new Error("Signal: listener is a required param of {fn}() and should be a Function.".replace("{fn}",t))},_registerListener:function(t,n,r,i){var o,a=this._indexOfListener(t,r);if(-1!==a){if((o=this._bindings[a]).isOnce!==n)throw new Error("You cannot add"+(n?"":"Once")+"() then add"+(n?"Once":"")+"() the same listener without removing the relationship first.")}else o=new e(this,t,n,r,i),this._addBinding(o);return this.memorize&&this._prevParams&&o.execute(this._prevParams),o},_addBinding:function(e){var t=this._bindings.length;do{t--}while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var n,r=this._bindings.length;r--;)if((n=this._bindings[r])._listener===e&&n.context===t)return r;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,n){return this.validateListener(e,"add"),this._registerListener(e,!1,t,n)},addOnce:function(e,t,n){return this.validateListener(e,"addOnce"),this._registerListener(e,!0,t,n)},remove:function(e,t){this.validateListener(e,"remove");var n=this._indexOfListener(e,t);return-1!==n&&(this._bindings[n]._destroy(),this._bindings.splice(n,1)),e},removeAll:function(e){"undefined"==typeof e&&(e=null);for(var t=this._bindings.length;t--;)e?this._bindings[t].context===e&&(this._bindings[t]._destroy(),this._bindings.splice(t,1)):this._bindings[t]._destroy();e||(this._bindings.length=0)},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(){if(this.active){var e,t=Array.prototype.slice.call(arguments),n=this._bindings.length;if(this.memorize&&(this._prevParams=t),n){e=this._bindings.slice(),this._shouldPropagate=!0;do{n--}while(e[n]&&this._shouldPropagate&&!1!==e[n].execute(t))}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}},t.prototype.constructor=t,n.Signal=t}(),n.AStarFinder=function(e){e=e||{};var t={allowDiagonal:!1,heuristicFilter:null};t=n.Tools.merge(t,e),this.allowDiagonal=t.allowDiagonal,this.heuristicFilter=t.heuristicFilter,this.list=new n.LinkedList},n.AStarFinder.prototype={findPath:function(e,t,r,i){var o,a,s,l,c,u;for(r=r||this.heuristicFilter,i.clearPath(),this.list.clear(),this.list.add(e);this.list.length>0;){if(this.list.sort(this.compare),(o=this.list.shift())._visited=!0,o===t)return n.PathUtil.backtrace(t);for(c=0,u=(s=i.getNeighbors(o,this.allowDiagonal,r)).length;u>c;c++)if((l=s[c]).walkable&&(a=o._calcCost+i.distance(o,l),!l._visited||a<l._calcCost)){if(l._visited=!0,l._parent=o,l._calcCost=a,l._priority=a+i.distance(t,l),l===t)return n.PathUtil.backtrace(t);this.list.add(l)}}return null},compare:function(e,t){return e._priority-t._priority}},n.AStarFinder.prototype.constructor=n.AStarFinder,n.PathUtil={backtrace:function(e){for(var t=[e];e._parent;)e=e._parent,t.push(e);return t.reverse()},biBacktrace:function(e,t){var n=this.backtrace(e),r=this.backtrace(t);return n.concat(r.reverse())},pathLength:function(e){var t,n,r,i,o,a=0;for(t=1;t<e.length;++t)n=e[t-1],r=e[t],i=n[0]-r[0],o=n[1]-r[1],a+=Math.sqrt(i*i+o*o);return a},interpolate:function(e,t,n,r){var i,o,a,s,l,c,u=Math.abs,h=[];for(i=n>e?1:-1,o=r>t?1:-1,l=(a=u(n-e))-(s=u(r-t));e!==n||t!==r;)h.push([e,t]),(c=2*l)>-s&&(l-=s,e+=i),a>c&&(l+=a,t+=o);return h},expandPath:function(e){var t,n,r,i,o,a,s=[],l=e.length;if(2>l)return s;for(o=0;l-1>o;++o)for(t=e[o],n=e[o+1],i=(r=this.interpolate(t[0],t[1],n[0],n[1])).length,a=0;i-1>a;++a)s.push(r[a]);return s.push(e[l-1]),s},smoothenPath:function(e,t){var n,r,i,o,a,s,l,c,u,h,d,f,p=t.length,m=t[0][0],g=t[0][1],v=t[p-1][0],y=t[p-1][1];for(a=[[n=m,r=g]],l=2;p>l;++l){for(i=(u=t[l])[0],o=u[1],h=this.interpolate(n,r,i,o),f=!1,c=1;c<h.length;++c)if(d=h[c],!e.isWalkableAt(d[0],d[1])){f=!0;break}f&&(s=t[l-1],a.push(s),n=s[0],r=s[1])}return a.push([v,y]),a},compressPath:function(e){if(e.length<3)return e;var t,n,r,i,o,a,s=[],l=e[0][0],c=e[0][1],u=e[1][0],h=e[1][1],d=u-l,f=h-c;for(d/=o=Math.sqrt(d*d+f*f),f/=o,s.push([l,c]),a=2;a<e.length;a++)t=u,n=h,r=d,i=f,d=(u=e[a][0])-t,f=(h=e[a][1])-n,f/=o=Math.sqrt(d*d+f*f),((d/=o)!==r||f!==i)&&s.push([t,n]);return s.push([u,h]),s}},n.Loader={manager:null,imageLoader:null,crossOrigin:!1,init:function(e){this.crossOrigin=e||!1,this.manager=new THREE.LoadingManager((function(){}),(function(){}),(function(){console.warn("Error loading images")})),this.imageLoader=new THREE.ImageLoader(this.manager),this.imageLoader.crossOrigin=e},loadTexture:function(e,t,n,r){var i=new THREE.Texture(null,t);return this.imageLoader.load(e,(function(e){i.image=e,i.needsUpdate=!0,n&&n(i)}),null,(function(e){r&&r(e)})),i.sourceFile=e,i}},n.MouseCaster=function(e,t,r){this.down=!1,this.rightDown=!1,this.pickedObject=null,this.selectedObject=null,this.allHits=null,this.active=!0,this.shift=!1,this.ctrl=!1,this.wheel=0,this.position=new THREE.Vector3,this.screenPosition=new THREE.Vector2,this.signal=new n.Signal,this.group=e,this._camera=t,this._raycaster=new THREE.Raycaster,this._preventDefault=!1,(r=r||document).addEventListener("mousemove",this._onDocumentMouseMove.bind(this),!1),r.addEventListener("mousedown",this._onDocumentMouseDown.bind(this),!1),r.addEventListener("mouseup",this._onDocumentMouseUp.bind(this),!1),r.addEventListener("mousewheel",this._onMouseWheel.bind(this),!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel.bind(this),!1)},n.MouseCaster.OVER="over",n.MouseCaster.OUT="out",n.MouseCaster.DOWN="down",n.MouseCaster.UP="up",n.MouseCaster.CLICK="click",n.MouseCaster.WHEEL="wheel",n.MouseCaster.prototype={update:function(){if(this.active){this._raycaster.setFromCamera(this.screenPosition,this._camera);var e,t,r=this._raycaster.intersectObject(this.group,!0);r.length>0?(t=(e=r[0]).object.userData.structure,this.pickedObject!=t&&(this.pickedObject&&this.signal.dispatch(n.MouseCaster.OUT,this.pickedObject),this.pickedObject=t,this.selectedObject=null,this.signal.dispatch(n.MouseCaster.OVER,this.pickedObject)),this.position.copy(e.point),this.screenPosition.z=e.distance):(this.pickedObject&&this.signal.dispatch(n.MouseCaster.OUT,this.pickedObject),this.pickedObject=null,this.selectedObject=null),this.allHits=r}},preventDefault:function(){this._preventDefault=!0},_onDocumentMouseDown:function(e){return(e=e||window.event).preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.pickedObject&&(this.selectedObject=this.pickedObject),this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.down=1===e.which,this.rightDown=3===e.which,void this.signal.dispatch(n.MouseCaster.DOWN,this.pickedObject))},_onDocumentMouseUp:function(e){return e.preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.signal.dispatch(n.MouseCaster.UP,this.pickedObject),this.selectedObject&&this.pickedObject&&this.selectedObject.uniqueID===this.pickedObject.uniqueID&&this.signal.dispatch(n.MouseCaster.CLICK,this.pickedObject),this.down=1!==e.which&&this.down,void(this.rightDown=3!==e.which&&this.rightDown))},_onDocumentMouseMove:function(e){e.preventDefault(),this.screenPosition.x=e.clientX/window.innerWidth*2-1,this.screenPosition.y=-e.clientY/window.innerHeight*2+1},_onMouseWheel:function(e){if(this.active){e.preventDefault(),e.stopPropagation();var t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),t>0?this.wheel++:this.wheel--,this.signal.dispatch(n.MouseCaster.WHEEL,this.wheel)}}},n.MouseCaster.prototype.constructor=n.MouseCaster,n.Scene=function(e,t){var r={element:document.body,alpha:!0,antialias:!0,clearColor:"#fff",sortObjects:!1,fog:null,light:new THREE.DirectionalLight(16777215),lightPosition:null,cameraType:"PerspectiveCamera",cameraPosition:null,orthoZoom:4},i={minDistance:100,maxDistance:1e3,zoomSpeed:2,noZoom:!1};if(r=n.Tools.merge(r,e),"boolean"!=typeof t&&(i=n.Tools.merge(i,t)),this.renderer=new THREE.WebGLRenderer({alpha:r.alpha,antialias:r.antialias}),this.renderer.setClearColor(r.clearColor,0),this.renderer.sortObjects=r.sortObjects,this.width=window.innerWidth,this.height=window.innerHeight,this.orthoZoom=r.orthoZoom,this.container=new THREE.Scene,this.container.fog=r.fog,this.container.add(new THREE.AmbientLight(14540253)),r.lightPosition||r.light.position.set(-1,1,-1).normalize(),this.container.add(r.light),"OrthographicCamera"===r.cameraType){var o=window.innerWidth/this.orthoZoom,a=window.innerHeight/this.orthoZoom;this.camera=new THREE.OrthographicCamera(o/-2,o/2,a/2,a/-2,1,5e3)}else this.camera=new THREE.PerspectiveCamera(50,this.width/this.height,1,5e3);this.contolled=!!t,this.contolled&&(this.controls=new THREE.OrbitControls(this.camera,this.renderer.domElement),this.controls.minDistance=i.minDistance,this.controls.maxDistance=i.maxDistance,this.controls.zoomSpeed=i.zoomSpeed,this.controls.noZoom=i.noZoom),r.cameraPosition&&this.camera.position.copy(r.cameraPosition),window.addEventListener("resize",function(){if(this.width=window.innerWidth,this.height=window.innerHeight,"OrthographicCamera"===this.camera.type){var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2}else this.camera.aspect=this.width/this.height;this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height)}.bind(this),!1),this.attachTo(r.element)},n.Scene.prototype={attachTo:function(e){e.style.width=this.width+"px",e.style.height=this.height+"px",this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),e.appendChild(this.renderer.domElement)},add:function(e){this.container.add(e)},remove:function(e){this.container.remove(e)},render:function(){this.contolled&&this.controls.update(),this.renderer.render(this.container,this.camera)},updateOrthoZoom:function(){if(this.orthoZoom<=0)this.orthoZoom=0;else{var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2,this.camera.updateProjectionMatrix()}},focusOn:function(e){this.camera.lookAt(e.position)}},n.Scene.prototype.constructor=n.Scene,n.SelectionManager=function(e){this.mouse=e,this.onSelect=new n.Signal,this.onDeselect=new n.Signal,this.selected=null,this.toggleSelection=!1,this.mouse.signal.add(this.onMouse,this)},n.SelectionManager.prototype={select:function(e,t){e&&(t=t||!0,this.selected!==e&&this.clearSelection(t),e.selected?this.toggleSelection&&(t&&this.onDeselect.dispatch(e),e.deselect()):e.select(),this.selected=e,t&&this.onSelect.dispatch(e))},clearSelection:function(e){e=e||!0,this.selected&&(e&&this.onDeselect.dispatch(this.selected),this.selected.deselect()),this.selected=null},onMouse:function(e,t){switch(e){case n.MouseCaster.DOWN:t||this.clearSelection();break;case n.MouseCaster.CLICK:this.select(t)}}},n.SelectionManager.prototype.constructor=n.SelectionManager,n.Tools={clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},sign:function(e){return e&&e/Math.abs(e)},random:function(e,t){return 1===arguments.length?Math.random()*e-.5*e:Math.random()*(t-e)+e},randomInt:function(e,t){return 1===arguments.length?Math.random()*e-.5*e|0:Math.random()*(t-e+1)+e|0},normalize:function(e,t,n){return(e-t)/(n-t)},getShortRotation:function(e){return(e%=this.TAU)>this.PI?e-=this.TAU:e<-this.PI&&(e+=this.TAU),e},generateID:function(){return Math.random().toString(36).slice(2)+Date.now()},isPlainObject:function(e){if("object"!=typeof e||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!Object.prototype.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0},merge:function(e,t){var n=this,r=Array.isArray(t),i=r&&[]||{};return r?(e=e||[],i=i.concat(e),t.forEach((function(t,r){"undefined"==typeof i[r]?i[r]=t:n.isPlainObject(t)?i[r]=n.merge(e[r],t):-1===e.indexOf(t)&&i.push(t)})),i):(e&&n.isPlainObject(e)&&Object.keys(e).forEach((function(t){i[t]=e[t]})),Object.keys(t).forEach((function(r){t[r]&&n.isPlainObject(t[r])&&e[r]?i[r]=n.merge(e[r],t[r]):i[r]=t[r]})),i)},now:function(){return window.nwf?window.nwf.system.Performance.elapsedTime:window.performance.now()},empty:function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},radixSort:function(e,t,n,r){if(r=r||31,!((t=t||0)>=(n=n||e.length)-1||0>r)){for(var i=t,o=n,a=1<<r;o>i;)if(e[i]&a){--o;var s=e[i];e[i]=e[o],e[o]=s}else++i;this.radixSort(e,t,o,r-1),this.radixSort(e,o,n,r-1)}},randomizeRGB:function(e,t){var n,r,i=e.split(","),o="rgb(";for(t=this.randomInt(t),n=0;3>n;n++)0>(r=parseInt(i[n])+t)?r=0:r>255&&(r=255),o+=r+",";return(o=o.substring(0,o.length-1))+")"},getJSON:function(e){var t=new XMLHttpRequest,n="undefined"!=typeof e.cache&&e.cache?e.url:e.url+"?t="+Math.floor(1e4*Math.random())+Date.now();t.onreadystatechange=function(){if(200!==this.status)0!==this.status&&console.warn("[Tools.getJSON] Error: "+this.status+" ("+this.statusText+") :: "+e.url);else{var t=null;try{t=JSON.parse(this.responseText)}catch(n){return}e.callback.call(e.scope||null,t)}},t.open("GET",n,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Content-Type","application/json"),t.send("")}}},function(e,t){e.exports={size:5,cellSize:10,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5},autogenerated:!0,cells:[{q:-1,r:0,s:1,h:1,walkable:!0,userData:{}},{q:0,r:-1,s:1,h:1,walkable:!0,userData:{}},{q:0,r:0,s:0,h:1,walkable:!0,userData:{}},{q:1,r:-1,s:0,h:1,walkable:!0,userData:{}},{q:-1,r:1,s:0,h:0,walkable:!0,userData:{}},{q:0,r:1,s:-1,h:0,walkable:!0,userData:{}},{q:1,r:0,s:-1,h:0,walkable:!0,userData:{}}]}},function(e,t){e.exports.Primitive=AFRAME.registerPrimitive("a-ocean",{defaultComponents:{ocean:{},rotation:{x:-90,y:0,z:0}},mappings:{width:"ocean.width",depth:"ocean.depth",density:"ocean.density",amplitude:"ocean.amplitude",amplitudeVariance:"ocean.amplitudeVariance",speed:"ocean.speed",speedVariance:"ocean.speedVariance",color:"ocean.color",opacity:"ocean.opacity"}}),e.exports.Component=AFRAME.registerComponent("ocean",{schema:{width:{default:10,min:0},depth:{default:10,min:0},density:{default:10},amplitude:{default:.1},amplitudeVariance:{default:.3},speed:{default:1},speedVariance:{default:2},color:{default:"#7AD2F7",type:"color"},opacity:{default:.8}},play:function(){const e=this.el,t=this.data;let n=e.components.material;const r=new THREE.PlaneGeometry(t.width,t.depth,t.density,t.density);r.mergeVertices(),this.waves=[];for(let i,o=0,a=r.vertices.length;o<a;o++)i=r.vertices[o],this.waves.push({z:i.z,ang:Math.random()*Math.PI*2,amp:t.amplitude+Math.random()*t.amplitudeVariance,speed:(t.speed+Math.random()*t.speedVariance)/1e3});n||(n={},n.material=new THREE.MeshPhongMaterial({color:t.color,transparent:t.opacity<1,opacity:t.opacity,shading:THREE.FlatShading})),this.mesh=new THREE.Mesh(r,n.material),e.setObject3D("mesh",this.mesh)},remove:function(){this.el.removeObject3D("mesh")},tick:function(e,t){if(!t)return;const n=this.mesh.geometry.vertices;for(let r,i,o=0;r=n[o];o++)i=this.waves[o],r.z=i.z+Math.sin(i.ang)*i.amp,i.ang+=i.speed*t;this.mesh.geometry.verticesNeedUpdate=!0}})},function(e,t){e.exports.Primitive=AFRAME.registerPrimitive("a-tube",{defaultComponents:{tube:{}},mappings:{path:"tube.path",segments:"tube.segments",radius:"tube.radius","radial-segments":"tube.radialSegments",closed:"tube.closed"}}),e.exports.Component=AFRAME.registerComponent("tube",{schema:{path:{default:[]},segments:{default:64},radius:{default:1},radialSegments:{default:8},closed:{default:!1}},init:function(){const e=this.el,t=this.data;let n=e.components.material;if(!t.path.length)return void console.error("[a-tube] `path` property expected but not found.");const r=new THREE.CatmullRomCurve3(t.path.map((function(e){return e=e.split(" "),new THREE.Vector3(Number(e[0]),Number(e[1]),Number(e[2]))}))),i=new THREE.TubeGeometry(r,t.segments,t.radius,t.radialSegments,t.closed);n||(n={},n.material=new THREE.MeshPhongMaterial),this.mesh=new THREE.Mesh(i,n.material),this.el.setObject3D("mesh",this.mesh)},update:function(e){Object.keys(e).length&&(this.remove(),this.init())},remove:function(){this.mesh&&this.el.removeObject3D("mesh")}})},function(e,t,n){const r=n(84);function i(e,t){return`\n${a(e,t)}\n${o(e)}\nreturn {Body: Body, Vector: Vector};\n`}function o(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function a(e,t){let n=r(e),i="";return t&&(i=""+n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")),`function Vector(${n("{var}",{join:", "})}) {\n ${i}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=i(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=a,e.exports.getBodyCode=o},function(e,t,n){const r=n(84),i=n(183);function o(e){let t=r(e),n=Math.pow(2,e);return`\n${u()}\n${c(e)}\n${a(e)}\n${l(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" node.")}\n node.body = null;\n node.mass = ${t("node.mass_{var} = ",{join:""})}0;\n ${t("node.min_{var} = node.max_{var} = ",{join:""})}0;\n } else {\n node = new QuadNode();\n nodesCache[currentInCache] = node;\n }\n\n ++currentInCache;\n return node;\n }\n\n function update(sourceBody) {\n var queue = updateQueue;\n var v;\n ${t("var d{var};",{indent:4})}\n var r; \n ${t("var f{var} = 0;",{indent:4})}\n var queueLength = 1;\n var shiftIdx = 0;\n var pushIdx = 1;\n\n queue[0] = root;\n\n while (queueLength) {\n var node = queue[shiftIdx];\n var body = node.body;\n\n queueLength -= 1;\n shiftIdx += 1;\n var differentBody = (body !== sourceBody);\n if (body && differentBody) {\n // If the current node is a leaf node (and it is not source body),\n // calculate the force exerted by the current node on body, and add this\n // amount to body's net force.\n ${t("d{var} = body.pos.{var} - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Poor man's protection against zero distance.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n // This is standard gravitation force calculation but we divide\n // by r^3 to save two operations when normalizing force vector.\n v = gravity * body.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:8})}\n } else if (differentBody) {\n // Otherwise, calculate the ratio s / r, where s is the width of the region\n // represented by the internal node, and r is the distance between the body\n // and the node's center-of-mass\n ${t("d{var} = node.mass_{var} / node.mass - sourceBody.pos.{var};",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n // Sorry about code duplication. I don't want to create many functions\n // right away. Just want to see performance first.\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:10})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n // If s / r < \u03b8, treat this internal node as a single body, and calculate the\n // force it exerts on sourceBody, and add this amount to sourceBody's net force.\n if ((node.max_${i(0)} - node.min_${i(0)}) / r < theta) {\n // in the if statement above we consider node's width only\n // because the region was made into square during tree creation.\n // Thus there is no difference between using width or height.\n v = gravity * node.mass * sourceBody.mass / (r * r * r);\n ${t("f{var} += v * d{var};",{indent:10})}\n } else {\n // Otherwise, run the procedure recursively on each of the current node's children.\n\n // I intentionally unfolded this loop, to save several CPU cycles.\n${function(){let e=Array(11).join(" "),t=[];for(let r=0;r<n;++r)t.push(e+`if (node.quad${r}) {`),t.push(e+` queue[pushIdx] = node.quad${r};`),t.push(e+" queueLength += 1;"),t.push(e+" pushIdx += 1;"),t.push(e+"}");return t.join("\n")}()}\n }\n }\n }\n\n ${t("sourceBody.force.{var} += f{var};",{indent:4})}\n }\n\n function insertBodies(bodies) {\n ${t("var {var}min = Number.MAX_VALUE;",{indent:4})}\n ${t("var {var}max = Number.MIN_VALUE;",{indent:4})}\n var i = bodies.length;\n\n // To reduce quad tree depth we are looking for exact bounding box of all particles.\n while (i--) {\n var pos = bodies[i].pos;\n ${t("if (pos.{var} < {var}min) {var}min = pos.{var};",{indent:6})}\n ${t("if (pos.{var} > {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(t){let n=[],r=Array(t+1).join(" ");for(let o=0;o<e;++o)n.push(r+`if (${i(o)} > max_${i(o)}) {`),n.push(r+` quadIdx = quadIdx + ${Math.pow(2,o)};`),n.push(r+` min_${i(o)} = max_${i(o)};`),n.push(r+` max_${i(o)} = node.max_${i(o)};`),n.push(r+"}");return n.join("\n")}(8)}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function a(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n<t;++n){let t=0===n?" ":" else ";e.push(`${t}if (idx === ${n}) node.quad${n} = child;`)}return e.join("\n")}()}\n}`}function l(e){return`function getChild(node, idx) {\n${function(){let t=[],n=Math.pow(2,e);for(let e=0;e<n;++e)t.push(` if (idx === ${e}) return node.quad${e};`);return t.join("\n")}()}\n return null;\n}`}function c(e){let t=r(e),n=Math.pow(2,e);return`\nfunction QuadNode() {\n // body stored inside this node. In quad tree only leaf nodes (by construction)\n // contain bodies:\n this.body = null;\n\n // Child nodes are stored in quads. Each quad is presented by number:\n // 0 | 1\n // -----\n // 2 | 3\n${function(e){let t=[];for(let r=0;r<n;++r)t.push(`${e}quad${r} = null;`);return t.join("\n")}(" this.")}\n\n // Total mass of current node\n this.mass = 0;\n\n // Center of mass coordinates\n ${t("this.mass_{var} = 0;",{indent:2})}\n\n // bounding box coordinates\n ${t("this.min_{var} = 0;",{indent:2})}\n ${t("this.max_{var} = 0;",{indent:2})}\n}\n`}function u(){return"\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=o(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=o,e.exports.getInsertStackCode=u,e.exports.getQuadNodeCode=c,e.exports.isSamePosition=a,e.exports.getChildBodyCode=l,e.exports.setChildBodyCode=s},function(e,t,n){e.exports=function(e){let t=i(e);return new Function("bodies","settings","random",t)},e.exports.generateFunctionBody=i;const r=n(84);function i(e){let t=r(e);return`\n var boundingBox = {\n ${t("min_{var}: 0, max_{var}: 0,",{indent:4})}\n };\n\n return {\n box: boundingBox,\n\n update: updateBoundingBox,\n\n reset: resetBoundingBox,\n\n getBestNewPosition: function (neighbors) {\n var ${t("base_{var} = 0",{join:", "})};\n\n if (neighbors.length) {\n for (var i = 0; i < neighbors.length; ++i) {\n let neighborPos = neighbors[i].pos;\n ${t("base_{var} += neighborPos.{var};",{indent:10})}\n }\n\n ${t("base_{var} /= neighbors.length;",{indent:8})}\n } else {\n ${t("base_{var} = (boundingBox.min_{var} + boundingBox.max_{var}) / 2;",{indent:8})}\n }\n\n var springLength = settings.springLength;\n return {\n ${t("{var}: base_{var} + (random.nextDouble() - 0.5) * springLength,",{indent:8})}\n };\n }\n };\n\n function updateBoundingBox() {\n var i = bodies.length;\n if (i === 0) return; // No bodies - no borders.\n\n ${t("var max_{var} = -Infinity;",{indent:4})}\n ${t("var min_{var} = Infinity;",{indent:4})}\n\n while(i--) {\n // this is O(n), it could be done faster with quadtree, if we check the root node bounds\n var bodyPos = bodies[i].pos;\n ${t("if (bodyPos.{var} < min_{var}) min_{var} = bodyPos.{var};",{indent:6})}\n ${t("if (bodyPos.{var} > max_{var}) max_{var} = bodyPos.{var};",{indent:6})}\n }\n\n ${t("boundingBox.min_{var} = min_{var};",{indent:4})}\n ${t("boundingBox.max_{var} = max_{var};",{indent:4})}\n }\n\n function resetBoundingBox() {\n ${t("boundingBox.min_{var} = boundingBox.max_{var} = 0;",{indent:4})}\n }\n`}},function(e,t,n){const r=n(84);function i(e){return`\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ${r(e)("body.force.{var} -= options.dragCoefficient * body.velocity.{var};",{indent:6})}\n }\n };\n`}e.exports=function(e){let t=i(e);return new Function("options",t)},e.exports.generateCreateDragForceFunctionBody=i},function(e,t,n){const r=n(84);function i(e){let t=r(e);return`\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ${t("var d{var} = body2.pos.{var} - body1.pos.{var};",{indent:6})}\n var r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ${t("body1.force.{var} += coefficient * d{var}",{indent:6})};\n body1.springCount += 1;\n body1.springLength += r;\n\n ${t("body2.force.{var} -= coefficient * d{var}",{indent:6})};\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n`}e.exports=function(e){let t=i(e);return new Function("options","random",t)},e.exports.generateCreateSpringForceFunctionBody=i},function(e,t,n){const r=n(84);function i(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},function(e,t){e.exports=function(e,t,n,r){this.from=e,this.to=t,this.length=n,this.coefficient=r}},function(e,t){e.exports=function e(t,n){var r;t||(t={});if(n)for(r in n)if(n.hasOwnProperty(r)){var i=t.hasOwnProperty(r),o=typeof n[r];!i||typeof t[r]!==o?t[r]=n[r]:"object"===o&&(t[r]=e(t[r],n[r]))}return t}},function(e,t){function n(e){return new r("number"===typeof e?e:+new Date)}function r(e){this.seed=e}function i(e){return Math.sqrt(2*Math.PI/e)*Math.pow(1/Math.E*(e+1/(12*e-1/(10*e))),e)}function o(){var e=this.seed;return e=4294967295&(3042594569^(e=(e=4294967295&((e=(e=4294967295&(3345072700^(e=e+2127912214+(e<<12)&4294967295)^e>>>19))+374761393+(e<<5)&4294967295)+3550635116^e<<9))+4251993797+(e<<3)&4294967295)^e>>>16),this.seed=e,(268435455&e)/268435456}e.exports=n,e.exports.random=n,e.exports.randomIterator=function(e,t){var r=t||n();if("function"!==typeof r.next)throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(t){var n,i,o;for(n=e.length-1;n>0;--n)i=r.next(n+1),o=e[i],e[i]=e[n],e[n]=o,t(o);e.length&&t(e[0])},shuffle:function(){var t,n,i;for(t=e.length-1;t>0;--t)n=r.next(t+1),i=e[n],e[n]=e[t],e[t]=i;return e}}},r.prototype.next=function(e){return Math.floor(this.nextDouble()*e)},r.prototype.nextDouble=o,r.prototype.uniform=o,r.prototype.gaussian=function(){var e,t,n;do{t=2*this.nextDouble()-1,n=2*this.nextDouble()-1,e=t*t+n*n}while(e>=1||0===e);return t*Math.sqrt(-2*Math.log(e)/e)},r.prototype.levy=function(){var e=Math.pow(i(2.5)*Math.sin(1.5*Math.PI/2)/(1.5*i(1.25)*Math.pow(2,.25)),1/1.5);return this.gaussian()*e/Math.pow(Math.abs(this.gaussian()),1/1.5)}},function(e,t,n){var r=n(184),i=n(361);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(22)),a=r(n(19)),s=r(n(6)),l=r(n(9)),c=r(n(17)),u=i(n(0)),h=n(159),d="/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/RNCSliderNativeComponent.web.js";function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(n,!0).forEach((function(t){(0,s.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=u.default.forwardRef((function(e,t){var n=e.value,r=e.minimumValue,i=void 0===r?0:r,o=e.maximumValue,s=void 0===o?0:o,f=e.step,m=void 0===f?1:f,v=e.minimumTrackTintColor,y=void 0===v?"#009688":v,b=e.maximumTrackTintColor,w=void 0===b?"#939393":b,x=e.thumbTintColor,_=void 0===x?"#009688":x,E=e.thumbStyle,A=void 0===E?{}:E,S=e.style,M=void 0===S?[]:S,T=e.inverted,C=void 0!==T&&T,O=e.enabled,R=void 0===O||O,k=e.trackHeight,P=void 0===k?4:k,L=e.thumbSize,D=void 0===L?20:L,I=e.onRNCSliderSlidingStart,N=void 0===I?function(){}:I,j=e.onRNCSliderSlidingComplete,B=void 0===j?function(){}:j,F=e.onRNCSliderValueChange,z=void 0===F?function(){}:F,H=(0,c.default)(e,["value","minimumValue","maximumValue","step","minimumTrackTintColor","maximumTrackTintColor","thumbTintColor","thumbStyle","style","inverted","enabled","trackHeight","thumbSize","onRNCSliderSlidingStart","onRNCSliderSlidingComplete","onRNCSliderValueChange"]),U=(0,u.useCallback)((function(e){z&&z({nativeEvent:{fromUser:!0,value:e}})}),[z]),V=(0,u.useCallback)((function(e){N&&N({nativeEvent:{fromUser:!0,value:e}})}),[N]),G=(0,u.useCallback)((function(e){B&&B({nativeEvent:{fromUser:!0,value:e}})}),[B]),W=u.default.useRef({width:0,height:0}),q=t||u.default.createRef(),X=u.default.useState(n||i),Y=(0,l.default)(X,2),K=Y[0],Q=Y[1];u.default.useLayoutEffect((function(){return ae(n)}),[n,ae]);var Z=(K-i)/(s-i),J=Z,$=1-Z,ee=h.StyleSheet.compose({flexGrow:1,flexShrink:1,flexBasis:"auto",flexDirection:"row",userSelect:"none",alignItems:"center",cursor:"pointer"},M),te={height:P,borderRadius:P/2,userSelect:"none"},ne=p({},te,{backgroundColor:y,flexGrow:100*J}),re=p({},te,{backgroundColor:w,flexGrow:100*$}),ie=h.StyleSheet.compose({width:D,height:D,backgroundColor:_,zIndex:1,borderRadius:D/2,overflow:"hidden",userSelect:"none"},A),oe=u.default.useRef(g(i,s,m));u.default.useEffect((function(){oe.current=g(i,s,m)}),[s,i,m]);var ae=(0,u.useCallback)((function(e){var t=oe.current<20?Number.parseFloat(e.toFixed(oe.current)):e,n=Math.max(i,Math.min(t,s));K!==n&&(Q(n),U(n))}),[i,s,K,U]),se=function(e){var t=(s-i)/10;switch(e.nativeEvent.actionName){case"increment":ae(K+(m||t));break;case"decrement":ae(K-(m||t))}};return u.default.useImperativeHandle(t,(function(){return{updateValue:function(e){ae(e)}}}),[ae]),u.default.createElement(h.View,(0,a.default)({ref:q,onLayout:function(e){var t=e.nativeEvent;return W.current=t.layout},accessibilityActions:[{name:"increment",label:"increment"},{name:"decrement",label:"decrement"}],onAccessibilityAction:se,accessible:!0,accessibleValue:K,accessibilityRole:"adjustable",style:ee,onStartShouldSetResponder:function(){return R},onMoveShouldSetResponder:function(){return R},onResponderGrant:function(){return V(K)},onResponderRelease:function(){G(K)},onResponderMove:function(e){var t=e.nativeEvent.locationX,n=W.current?W.current.width:1,r=C?s-(s-i)*t/n:i+(s-i)*t/n,o=m?Math.round(r/m)*m:r;ae(o)},onKeyDown:function(e){return function(e){switch(e){case"ArrowUp":case"ArrowRight":se({nativeEvent:{actionName:"increment"}});break;case"ArrowDown":case"ArrowLeft":se({nativeEvent:{actionName:"decrement"}})}}(e.nativeEvent.key)}},H,{__source:{fileName:d,lineNumber:324}}),u.default.createElement(h.View,{pointerEvents:"none",style:ne,__source:{fileName:d,lineNumber:345}}),u.default.createElement(h.View,{pointerEvents:"none",style:ie,__source:{fileName:d,lineNumber:346}}),u.default.createElement(h.View,{pointerEvents:"none",style:re,__source:{fileName:d,lineNumber:347}}))}));function g(e,t,n){if(n){var r=[e,t,n].map((function(e){return((e+"").split(".").pop()||"").length}));return Math.max.apply(Math,(0,o.default)(r))}return 1/0}m.displayName="RTCSliderWebComponent";var v=m;t.default=v},function(e,t,n){var r=n(186).default;function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=a?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(o,s,l):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(178);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(153),i=n(367);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(t,n){t.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},,function(e,t,n){"use strict";n(22)},function(e,t,n){"use strict";e.exports=n(371)},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,h=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case h:case d:case a:case l:case s:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case g:case c:return e;default:return t}}case o:return t}}}function E(e){return _(e)===d}t.AsyncMode=h,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=i,t.ForwardRef=f,t.Fragment=a,t.Lazy=v,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return E(e)||_(e)===h},t.isConcurrentMode=E,t.isContextConsumer=function(e){return _(e)===u},t.isContextProvider=function(e){return _(e)===c},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return _(e)===f},t.isFragment=function(e){return _(e)===a},t.isLazy=function(e){return _(e)===v},t.isMemo=function(e){return _(e)===g},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===l},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===a||e===d||e===l||e===s||e===p||e===m||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===w||e.$$typeof===x||e.$$typeof===y)},t.typeOf=_},function(e,t,n){var r=n(373),i=n(374)(r);e.exports=i},function(e,t){e.exports=function(e,t){var n;t=t||[];var r=(e=e||[]).length,i=t.length,o=[];for(n=0;n<r;)o[o.length]=e[n],n+=1;for(n=0;n<i;)o[o.length]=t[n],n+=1;return o}},function(e,t,n){var r=n(85),i=n(38);e.exports=function(e){return i((function(t,n){return r(Math.max(0,t.length-n.length),(function(){return t.apply(this,e(n,arguments))}))}))}},function(e,t,n){var r=n(53),i=n(113),o=r((function(e){return i(e.length,e)}));e.exports=o},function(e,t,n){var r=n(85),i=n(112);e.exports=function e(t,n,o){return function(){for(var a=[],s=0,l=t,c=0;c<n.length||s<arguments.length;){var u;c<n.length&&(!i(n[c])||s>=arguments.length)?u=n[c]:(u=arguments[s],s+=1),a[c]=u,i(u)||(l-=1),c+=1}return l<=0?o.apply(this,a):r(l,e(t,a,o))}}},function(e,t,n){var r=n(85),i=n(378),o=n(204),a=n(383);e.exports=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,o(i,arguments[0],a(arguments)))}},function(e,t){e.exports=function(e,t){return function(){var n=this;return e.apply(n,arguments).then((function(e){return t.call(n,e)}))}}},function(e,t,n){var r=n(53),i=n(156),o=n(380),a=r((function(e){return!!i(e)||!!e&&("object"===typeof e&&(!o(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&(e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1)))))}));e.exports=a},function(e,t){e.exports=function(e){return"[object String]"===Object.prototype.toString.call(e)}},function(e,t){var n=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}();e.exports=function(e){return new n(e)}},function(e,t,n){var r=n(85),i=n(38)((function(e,t){return r(e.length,(function(){return e.apply(t,arguments)}))}));e.exports=i},function(e,t,n){var r=n(157),i=n(53)(r("tail",n(384)(1,1/0)));e.exports=i},function(e,t,n){var r=n(157),i=n(155)(r("slice",(function(e,t,n){return Array.prototype.slice.call(n,e,t)})));e.exports=i},function(e,t,n){var r=n(114),i=Object.prototype.toString;e.exports=function(){return"[object Arguments]"===i.call(arguments)?function(e){return"[object Arguments]"===i.call(e)}:function(e){return r("callee",e)}}},function(e,t,n){var r=n(157),i=n(38)(r("forEach",(function(e,t){for(var n=t.length,r=0;r<n;)e(t[r]),r+=1;return t})));e.exports=i},function(e,t,n){var r=n(38)((function(e,t){var n={};for(var r in t)n[r]=t[r];return delete n[e],n}));e.exports=r},function(e,t,n){var r=n(389),i=n(38)((function(e,t){return r({},e,t)}));e.exports=i},function(e,t,n){var r=n(390);e.exports="function"===typeof Object.assign?Object.assign:r},function(e,t,n){var r=n(114);e.exports=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,i=arguments.length;n<i;){var o=arguments[n];if(null!=o)for(var a in o)r(a,o)&&(t[a]=o[a]);n+=1}return t}},function(e,t,n){var r=n(38),i=n(392),o=r((function(e,t){return i([e],t)}));e.exports=o},function(e,t,n){var r=n(38)((function(e,t){for(var n=t,r=0;r<e.length;){if(null==n)return;n=n[e[r]],r+=1}return n}));e.exports=r},function(e,t,n){var r=n(155),i=n(113),o=r((function(e,t,n){return i(Math.max(e.length,t.length,n.length),(function(){return e.apply(this,arguments)?t.apply(this,arguments):n.apply(this,arguments)}))}));e.exports=o},function(e,t,n){var r=n(395),i=n(38)(r);e.exports=i},function(e,t,n){var r=n(396);e.exports=function(e,t){return r(t,e,0)>=0}},function(e,t,n){var r=n(397);e.exports=function(e,t,n){var i,o;if("function"===typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(i=1/t;n<e.length;){if(0===(o=e[n])&&1/o===i)return n;n+=1}return-1}if(t!==t){for(;n<e.length;){if("number"===typeof(o=e[n])&&o!==o)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(null===t)return e.indexOf(t,n)}for(;n<e.length;){if(r(e[n],t))return n;n+=1}return-1}},function(e,t,n){var r=n(38),i=n(398),o=r((function(e,t){return i(e,t,[],[])}));e.exports=o},function(e,t,n){var r=n(399),i=n(400),o=n(401),a=n(114),s=n(402),l=n(158),c=n(403);function u(e,t,n,o){var a=r(e),s=r(t);function l(e,t){return h(e,t,n.slice(),o.slice())}return!i((function(e,t){return!i(l,t,e)}),s,a)}function h(e,t,n,r){if(s(e,t))return!0;var i=c(e);if(i!==c(t))return!1;if(null==e||null==t)return!1;if("function"===typeof e["fantasy-land/equals"]||"function"===typeof t["fantasy-land/equals"])return"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"===typeof e.equals||"function"===typeof t.equals)return"function"===typeof e.equals&&e.equals(t)&&"function"===typeof t.equals&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if("function"===typeof e.constructor&&"Promise"===o(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!==typeof t||!s(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!s(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var d=n.length-1;d>=0;){if(n[d]===e)return r[d]===t;d-=1}switch(i){case"Map":return e.size===t.size&&u(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&u(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=l(e);if(f.length!==l(t).length)return!1;var p=n.concat([e]),m=r.concat([t]);for(d=f.length-1;d>=0;){var g=f[d];if(!a(g,t)||!h(t[g],e[g],p,m))return!1;d-=1}return!0}e.exports=h},function(e,t){e.exports=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}},function(e,t){e.exports=function(e,t,n){for(var r=0,i=n.length;r<i;){if(e(t,n[r]))return!0;r+=1}return!1}},function(e,t){e.exports=function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}},function(e,t,n){var r=n(38)((function(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}));e.exports=r},function(e,t,n){var r=n(53)((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));e.exports=r},function(e,t,n){var r=n(38)((function(e,t){return e>=t}));e.exports=r},function(e,t,n){var r=n(206)(!0);e.exports=r},function(e,t,n){var r=n(38)((function(e,t){return null!=t&&t.constructor===e||t instanceof e}));e.exports=r},function(e,t,n){var r=n(53)(n(408));e.exports=r},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(53)((function(e){return null==e}));e.exports=r},function(e,t,n){var r=n(85),i=n(53),o=n(411),a=n(417),s=n(204),l=i((function(e){var t=s(a,0,o((function(e){return e[0].length}),e));return r(t,(function(){for(var t=0;t<e.length;){if(e[t][0].apply(this,arguments))return e[t][1].apply(this,arguments);t+=1}}))}));e.exports=l},function(e,t,n){var r=n(38),i=n(412),o=n(414),a=n(205),s=n(415),l=n(113),c=n(158),u=r(i(["fantasy-land/map","map"],s,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return l(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return a((function(n,r){return n[r]=e(t[r]),n}),{},c(t));default:return o(e,t)}})));e.exports=u},function(e,t,n){var r=n(156),i=n(413);e.exports=function(e,t,n){return function(){if(0===arguments.length)return n();var o=Array.prototype.slice.call(arguments,0),a=o.pop();if(!r(a)){for(var s=0;s<e.length;){if("function"===typeof a[e[s]])return a[e[s]].apply(a,o);s+=1}if(i(a)){var l=t.apply(null,o);return l(a)}}return n.apply(this,arguments)}}},function(e,t){e.exports=function(e){return"function"===typeof e["@@transducer/step"]}},function(e,t){e.exports=function(e,t){for(var n=0,r=t.length,i=Array(r);n<r;)i[n]=e(t[n]),n+=1;return i}},function(e,t,n){var r=n(38),i=n(416),o=function(){function e(e,t){this.xf=t,this.f=e}return e.prototype["@@transducer/init"]=i.init,e.prototype["@@transducer/result"]=i.result,e.prototype["@@transducer/step"]=function(e,t){return this.xf["@@transducer/step"](e,this.f(t))},e}(),a=r((function(e,t){return new o(e,t)}));e.exports=a},function(e,t){e.exports={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}}},function(e,t,n){var r=n(38)((function(e,t){return t>e?t:e}));e.exports=r},function(e,t,n){"use strict";var r=n(48),i=n(207),o=n(419),a=n(213);function s(e){var t=new o(e),n=i(o.prototype.request,t);return r.extend(n,o.prototype,t),r.extend(n,t),n}var l=s(n(210));l.Axios=o,l.create=function(e){return s(a(l.defaults,e))},l.Cancel=n(214),l.CancelToken=n(432),l.isCancel=n(209),l.all=function(e){return Promise.all(e)},l.spread=n(433),l.isAxiosError=n(434),e.exports=l,e.exports.default=l},function(e,t,n){"use strict";var r=n(48),i=n(208),o=n(420),a=n(421),s=n(213);function l(e){this.defaults=e,this.interceptors={request:new o,response:new o}}l.prototype.request=function(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){"use strict";var r=n(48);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(48),i=n(422),o=n(209),a=n(210);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return s(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(s(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(48);e.exports=function(e,t,n){return r.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t,n){"use strict";var r=n(48);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";var r=n(212);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(48);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";var r=n(428),i=n(429);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(48),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(48);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";var r=n(214);function i(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";e.exports=function(e){return"object"===typeof e&&!0===e.isAxiosError}},,,function(e,t,n){(function(e){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(438),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(43))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i=1,o={},a=!1,s=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){u(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"===typeof n.data&&0===n.data.indexOf(t)&&u(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),r=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){u(e.data)},r=function(t){e.port2.postMessage(t)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var e=s.documentElement;r=function(t){var n=s.createElement("script");n.onreadystatechange=function(){u(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():r=function(e){setTimeout(u,0,e)},l.setImmediate=function(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var a={callback:e,args:t};return o[i]=a,r(i),i++},l.clearImmediate=c}function c(e){delete o[e]}function u(e){if(a)setTimeout(u,0,e);else{var t=o[e];if(t){a=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{c(e),a=!1}}}}}("undefined"===typeof self?"undefined"===typeof e?this:e:self)}).call(this,n(43),n(111))},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLig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nPdJVRB7tbCVMQNZkSkqlfKDtD+kLs/Eem0xHpGoe631cdHzIhIIiGUrSQp0XHmlEgo7xJK7loZZMiMJGlqjTVNbebCRKy5cPJsLjMn3EJZvdDUQWh+krwCReZJUHOmVaqxzrSEpnNCc0ahiWlz9ksrrLNfoSn27sgf5mCZfrIiStnB8lF8rHdYEaWU+ljQV/dW0X8Ac6zWpmDZsO8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDEtMDNUMTA6Mjg6NTIrMDA6MDD7fVVWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAxLTAzVDEwOjI4OjUyKzAwOjAwiiDt6gAAAABJRU5ErkJggg=="},function(e,t,n){var r=n(442),i=n(443),o={};for(var a in r)r.hasOwnProperty(a)&&(o[r[a]]=a);var s=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function c(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}s.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=s.get.hsl(e),n="hsl";break;case"hwb":t=s.get.hwb(e),n="hwb";break;default:t=s.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},s.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var a=2*n;o[n]=parseInt(t.slice(a,a+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(t=e.match(/(\D+)/))?"transparent"===t[1]?[0,0,0,0]:(o=r[t[1]])?(o[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},s.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var e=i(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},s.to.rgb=function(){var e=i(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},s.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},s.to.hsl=function(){var e=i(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},s.to.hwb=function(){var e=i(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},s.to.keyword=function(e){return o[e.slice(0,3)]}},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){"use strict";var r=n(444),i=Array.prototype.concat,o=Array.prototype.slice,a=e.exports=function(e){for(var t=[],n=0,a=e.length;n<a;n++){var s=e[n];r(s)?t=i.call(t,o.call(s)):t.push(s)}return t};a.wrap=function(e){return function(){return e(a(arguments))}}},function(e,t){e.exports=function(e){return!(!e||"string"===typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},function(e,t,n){var r=n(217),i=n(447),o={};Object.keys(r).forEach((function(e){o[e]={},Object.defineProperty(o[e],"channels",{value:r[e].channels}),Object.defineProperty(o[e],"labels",{value:r[e].labels});var t=i(e);Object.keys(t).forEach((function(n){var r=t[n];o[e][n]=function(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"===typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),o[e][n].raw=function(e){var t=function(t){return void 0===t||null===t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=o},function(e,t,n){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,n){var r=n(217);function i(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,i=0;i<n;i++)e[t[i]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var i=n.pop(),o=Object.keys(r[i]),a=o.length,s=0;s<a;s++){var l=o[s],c=t[l];-1===c.distance&&(c.distance=t[i].distance+1,c.parent=i,n.unshift(l))}return t}function o(e,t){return function(n){return t(e(n))}}function a(e,t){for(var n=[t[e].parent,e],i=r[t[e].parent][e],a=t[e].parent;t[a].parent;)n.unshift(t[a].parent),i=o(r[t[a].parent][a],i),a=t[a].parent;return i.conversion=n,i}e.exports=function(e){for(var t=i(e),n={},r=Object.keys(t),o=r.length,s=0;s<o;s++){var l=r[s];null!==t[l].parent&&(n[l]=a(l,t))}return n}},function(e,t,n){"use strict";const r=n(196),i=n(197),o=n(198),a=n(199);function s(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function c(e,t){return t.decode?i(e):e}function u(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function h(e){const t=(e=u(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){s((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const i="string"===typeof n&&n.includes(e.arrayFormatSeparator),o="string"===typeof n&&!i&&c(n,e).includes(e.arrayFormatSeparator);n=o?c(n,e):n;const a=i||o?n.split(e.arrayFormatSeparator).map(t=>c(t,e)):null===n?n:c(n,e);r[t]=a};case"bracket-separator":return(t,n,r)=>{const i=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!i)return void(r[t]=n?c(n,e):n);const o=null===n?[]:n.split(e.arrayFormatSeparator).map(t=>c(t,e));void 0!==r[t]?r[t]=[].concat(r[t],o):r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!==typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const i of e.split("&")){if(""===i)continue;let[e,a]=o(t.decode?i.replace(/\+/g," "):i,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:c(a,t),n(c(e,t),a,r)}for(const i of Object.keys(r)){const e=r[i];if("object"===typeof e&&null!==e)for(const n of Object.keys(e))e[n]=d(e[n],t);else r[i]=d(e,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"===typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"===typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=h,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";s((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&(e=>null===e||void 0===e)(e[n])||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const i=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[",i,"]"].join("")]:[...n,[l(t,e),"[",l(i,e),"]=",l(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[l(t,e),"[]"].join("")]:[...n,[l(t,e),"[]=",l(r,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return n=>(r,i)=>void 0===i||e.skipNull&&null===i||e.skipEmptyString&&""===i?r:(i=null===i?"":i,0===r.length?[[l(n,e),t,l(i,e)].join("")]:[[r,l(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,l(t,e)]:[...n,[l(t,e),"=",l(r,e)].join("")]}}(t),i={};for(const a of Object.keys(e))n(a)||(i[a]=e[a]);const o=Object.keys(i);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{const i=e[n];return void 0===i?"":null===i?l(n,t):Array.isArray(i)?0===i.length&&"bracket-separator"===t.arrayFormat?l(n,t)+"[]":i.reduce(r(n),[]).join("&"):l(n,t)+"="+l(i,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=o(e,"#");return Object.assign({url:n.split("?")[0]||"",query:f(h(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:c(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=u(e.url).split("?")[0]||"",i=t.extract(e.url),o=t.parse(i,{sort:!1}),a=Object.assign(o,e.query);let s=t.stringify(a,n);s&&(s="?"+s);let c=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(c="#"+l(e.fragmentIdentifier,n)),`${r}${s}${c}`},t.pick=(e,n,r)=>{r=Object.assign({parseFragmentIdentifier:!0},r);const{url:i,query:o,fragmentIdentifier:s}=t.parseUrl(e,r);return t.stringifyUrl({url:i,query:a(o,n),fragmentIdentifier:s},r)},t.exclude=(e,n,r)=>{const i=Array.isArray(n)?e=>!n.includes(e):(e,t)=>!n(e,t);return t.pick(e,i,r)}},,,,,,,,,,function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){let n;if(void 0===t)for(const r of e)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r={value:()=>{}};function i(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new o(r)}function o(e){this._=e}function a(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}function s(e,t){for(var n,r=0,i=e.length;r<i;++r)if((n=e[r]).name===t)return n.value}function l(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=r,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}o.prototype=i.prototype={constructor:o,on:function(e,t){var n,r=this._,i=a(e+"",r),o=-1,c=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++o<c;)if(n=(e=i[o]).type)r[n]=l(r[n],e.name,t);else if(null==t)for(n in r)r[n]=l(r[n],e.name,null);return this}for(;++o<c;)if((n=(e=i[o]).type)&&(n=s(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new o(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=0,n=(r=this._[e]).length;o<n;++o)r[o].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}},t.a=i},function(e,t,n){"use strict";var r=n(59),i=n(62);function o(e){return e.index}function a(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}t.a=function(e){var t,n,s,l,c,u,h,d=o,f=function(e){return 1/Math.min(c[e.source.index],c[e.target.index])},p=Object(r.a)(30),m=1;function g(r){for(var o=0,a=e.length;o<m;++o)for(var s,c,d,f,p,g=0,v=0,y=0,b=0;g<a;++g)c=(s=e[g]).source,v=(d=s.target).x+d.vx-c.x-c.vx||Object(i.a)(h),l>1&&(y=d.y+d.vy-c.y-c.vy||Object(i.a)(h)),l>2&&(b=d.z+d.vz-c.z-c.vz||Object(i.a)(h)),v*=f=((f=Math.sqrt(v*v+y*y+b*b))-n[g])/f*r*t[g],y*=f,b*=f,d.vx-=v*(p=u[g]),l>1&&(d.vy-=y*p),l>2&&(d.vz-=b*p),c.vx+=v*(p=1-p),l>1&&(c.vy+=y*p),l>2&&(c.vz+=b*p)}function v(){if(s){var r,i,o=s.length,l=e.length,h=new Map(s.map((e,t)=>[d(e,t,s),e]));for(r=0,c=new Array(o);r<l;++r)(i=e[r]).index=r,"object"!==typeof i.source&&(i.source=a(h,i.source)),"object"!==typeof i.target&&(i.target=a(h,i.target)),c[i.source.index]=(c[i.source.index]||0)+1,c[i.target.index]=(c[i.target.index]||0)+1;for(r=0,u=new Array(l);r<l;++r)i=e[r],u[r]=c[i.source.index]/(c[i.source.index]+c[i.target.index]);t=new Array(l),y(),n=new Array(l),b()}}function y(){if(s)for(var n=0,r=e.length;n<r;++n)t[n]=+f(e[n],n,e)}function b(){if(s)for(var t=0,r=e.length;t<r;++t)n[t]=+p(e[t],t,e)}return null==e&&(e=[]),g.initialize=function(e,...t){s=e,h=t.find(e=>"function"===typeof e)||Math.random,l=t.find(e=>[1,2,3].includes(e))||2,v()},g.links=function(t){return arguments.length?(e=t,v(),g):e},g.id=function(e){return arguments.length?(d=e,g):d},g.iterations=function(e){return arguments.length?(m=+e,g):m},g.strength=function(e){return arguments.length?(f="function"===typeof e?e:Object(r.a)(+e),y(),g):f},g.distance=function(e){return arguments.length?(p="function"===typeof e?e:Object(r.a)(+e),b(),g):p},g}},function(e,t,n){"use strict";t.a=function(e,t,n){var r,i=1;function o(){var o,a,s=r.length,l=0,c=0,u=0;for(o=0;o<s;++o)l+=(a=r[o]).x||0,c+=a.y||0,u+=a.z||0;for(l=(l/s-e)*i,c=(c/s-t)*i,u=(u/s-n)*i,o=0;o<s;++o)a=r[o],l&&(a.x-=l),c&&(a.y-=c),u&&(a.z-=u)}return null==e&&(e=0),null==t&&(t=0),null==n&&(n=0),o.initialize=function(e){r=e},o.x=function(t){return arguments.length?(e=+t,o):e},o.y=function(e){return arguments.length?(t=+e,o):t},o.z=function(e){return arguments.length?(n=+e,o):n},o.strength=function(e){return arguments.length?(i=+e,o):i},o}},function(e,t,n){"use strict";var r=n(59);t.a=function(e,t,n,i){var o,a,s,l,c=Object(r.a)(.1);function u(e){for(var r=0,c=o.length;r<c;++r){var u=o[r],h=u.x-t||1e-6,d=(u.y||0)-n||1e-6,f=(u.z||0)-i||1e-6,p=Math.sqrt(h*h+d*d+f*f),m=(l[r]-p)*s[r]*e/p;u.vx+=h*m,a>1&&(u.vy+=d*m),a>2&&(u.vz+=f*m)}}function h(){if(o){var t,n=o.length;for(s=new Array(n),l=new Array(n),t=0;t<n;++t)l[t]=+e(o[t],t,o),s[t]=isNaN(l[t])?0:+c(o[t],t,o)}}return"function"!==typeof e&&(e=Object(r.a)(+e)),null==t&&(t=0),null==n&&(n=0),null==i&&(i=0),u.initialize=function(e,...t){o=e,a=t.find(e=>[1,2,3].includes(e))||2,h()},u.strength=function(e){return arguments.length?(c="function"===typeof e?e:Object(r.a)(+e),h(),u):c},u.radius=function(t){return arguments.length?(e="function"===typeof t?t:Object(r.a)(+t),h(),u):e},u.x=function(e){return arguments.length?(t=+e,u):t},u.y=function(e){return arguments.length?(n=+e,u):n},u.z=function(e){return arguments.length?(i=+e,u):i},u}},function(t,n,r){"use strict";r.d(n,"a",(function(){return p}));var i=r(20),o=r.n(i),a=r(24),s=r.n(a),l=r(25),c=r.n(l),u=r(18),h=r.n(u),d=r(265);function f(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=h()(t);if(n){var i=h()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return c()(this,e)}}var p=function(e){s()(n,e);var t=f(n);function n(e,r){return o()(this,n),t.call(this,"ERR_UNAVAILABLE","The method or property "+e+"."+r+" is not available on "+d.a.OS+", are you sure you've linked all the native dependencies properly?")}return n}(r(252).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r=null,i=null},function(t,n,r){"use strict";var i,o,a=r(6),s=r.n(a),l=r(17),c=r.n(l),u=r(0),h=r(8),d=r(29),f=r(22),p=r.n(f),m=r(20),g=r.n(m),v=r(23),y=r.n(v),b=r(16),w=r.n(b),x=r(24),_=r.n(x),E=r(25),A=r.n(E),S=r(18),M=r.n(S),T=r(2),C=r(5),O=r(471),R=function(e){var t=e.children;return u.createElement(u.Fragment,null,t)},k=T.a,P=2,L=3,D=5,I=r(12),N=r(33),j=["active","style"],B=["enabled"],F=["enabled","active"];function z(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}try{o=r(163)}catch(e){}var U=function(e){_()(n,e);var t=z(n);function n(){return g()(this,n),t.apply(this,arguments)}return y()(n,[{key:"render",value:function(){var e=this.props,t=e.active,n=e.style,r=c()(e,j);return u.createElement(T.a,H({hidden:!t,style:[n,{display:t?"flex":"none"}]},r))}}]),n}(u.Component),V=I.a.createAnimatedComponent(U),G=null===(i=o)||void 0===i?void 0:i.shouldUseActivityState,W=function(e){var t,n=e.enabled,r=c()(e,B);return n&&"web"!==h.a.OS&&(null===(t=o)||void 0===t?void 0:t.screensEnabled())?u.createElement(o.ScreenContainer,H({enabled:n},r)):u.createElement(T.a,r)},q=function(e){var t,n=e.enabled,r=e.active,i=c()(e,F);return n&&"web"===h.a.OS?u.createElement(V,H({active:r},i)):n&&(null===(t=o)||void 0===t?void 0:t.screensEnabled())?G?u.createElement(o.Screen,H({enabled:n,activityState:r},i)):u.createElement(o.Screen,H({enabled:n,active:r},i)):u.createElement(T.a,i)},X=r(9),Y=r.n(X),K=r(35),Q=r(37),Z=r(215);function J(e){return e.children}var $=r(92),ee=r(45),te=["borderless","pressColor","style","children"];function ne(){return(ne=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function re(e){var t=e.borderless,n=void 0!==t&&t,r=e.pressColor,i=void 0===r?"rgba(0, 0, 0, .32)":r,o=e.style,a=e.children,s=c()(e,te);return"android"===h.a.OS&&h.a.Version>=21?u.createElement($.a,ne({},s,{useForeground:$.a.canUseNativeForeground(),background:$.a.Ripple(i,n)}),u.createElement(T.a,{style:o},u.Children.only(a))):u.createElement(ee.a,ne({style:o},s),a)}function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){var t=e.disabled,n=e.allowFontScaling,i=e.backImage,o=e.label,a=e.labelStyle,s=e.labelVisible,l=void 0===s?"ios"===h.a.OS:s,c=e.onLabelLayout,d=e.onPress,f=e.pressColorAndroid,p=e.screenLayout,m=e.tintColor,g=e.titleLayout,v=e.truncatedLabel,y=void 0===v?"Back":v,b=e.accessibilityLabel,w=void 0===b?o&&"Back"!==o?"".concat(o,", back"):"Go back":b,x=e.style,_=Object(Z.a)(),E=_.dark,A=_.colors,S=u.useState(void 0),M=Y()(S,2),C=M[0],O=M[1],R=void 0!==m?m:h.a.select({ios:A.primary,default:A.text}),k=void 0!==f?f:E?"rgba(255, 255, 255, .32)":"rgba(0, 0, 0, .32)",P=function(e){null===c||void 0===c||c(e),O(e.nativeEvent.layout.x+e.nativeEvent.layout.width)};return u.createElement(re,{disabled:t,accessible:!0,accessibilityRole:"button",accessibilityComponentType:"button",accessibilityLabel:w,accessibilityTraits:"button",testID:"header-back",delayPressIn:0,onPress:t?void 0:function(){return d&&requestAnimationFrame(d)},pressColor:k,style:[ae.container,t&&ae.disabled,x],hitSlop:h.a.select({ios:void 0,default:{top:16,right:16,bottom:16,left:16}}),borderless:!0},u.createElement(u.Fragment,null,i?i({tintColor:R}):u.createElement(Q.a,{style:[ae.icon,Boolean(l)&&ae.iconWithLabel,Boolean(R)&&{tintColor:R}],source:r(439),fadeDuration:0}),function(){var e=!o||C&&g&&p&&(p.width-g.width)/2<C+26?y:o;if(!l||void 0===e)return null;var t=u.createElement(T.a,{style:p?[ae.labelWrapper,{minWidth:p.width/2-27}]:null},u.createElement(I.a.Text,{accessible:!1,onLayout:e===o?P:void 0,style:[ae.label,R?{color:R}:null,a],numberOfLines:1,allowFontScaling:!!n},e));return i||"ios"!==h.a.OS?t:u.createElement(J,{maskElement:u.createElement(T.a,{style:ae.iconMaskContainer},u.createElement(Q.a,{source:r(440),style:ae.iconMask}),u.createElement(T.a,{style:ae.iconMaskFillerRect}))},t)}()))}var ae=C.a.create({container:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({alignItems:"center",flexDirection:"row"},h.a.select({ios:null,default:{marginVertical:3,marginHorizontal:11}})),disabled:{opacity:.5},label:{fontSize:17,letterSpacing:.35},labelWrapper:{flexDirection:"row",alignItems:"flex-start"},icon:h.a.select({ios:{height:21,width:13,marginLeft:8,marginRight:22,marginVertical:12,resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]},default:{height:24,width:24,margin:3,resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]}}),iconWithLabel:"ios"===h.a.OS?{marginRight:6}:{},iconMaskContainer:{flex:1,flexDirection:"row",justifyContent:"center"},iconMaskFillerRect:{flex:1,backgroundColor:"#000"},iconMask:{height:21,width:13,marginLeft:-14.5,marginVertical:12,alignSelf:"center",resizeMode:"contain",transform:[{scaleX:K.a.isRTL?-1:1}]}}),se=["style"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(){return(ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ue(e){var t=e.style,n=c()(e,se),r=Object(Z.a)().colors;return u.createElement(I.a.View,ce({style:[he.container,{backgroundColor:r.card,borderBottomColor:r.border,shadowColor:r.border},t]},n))}var he=C.a.create({container:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({flex:1},h.a.select({android:{elevation:4},ios:{shadowOpacity:.85,shadowRadius:0,shadowOffset:{width:0,height:C.a.hairlineWidth}},default:{borderBottomWidth:C.a.hairlineWidth}}))}),de=u.createContext(!1);function fe(e){var t,n;return function(){for(var r=!1,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];if(t){if(t.length!==o.length)r=!0;else for(var s=0;s<t.length;s++)if(t[s]!==o[s]){r=!0;break}}else r=!0;return t=o,(r||void 0===n)&&(n=e.apply(void 0,o)),n}}var pe=["height","minHeight","maxHeight","backgroundColor","borderBottomColor","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderBottomWidth","borderColor","borderEndColor","borderEndWidth","borderLeftColor","borderLeftWidth","borderRadius","borderRightColor","borderRightWidth","borderStartColor","borderStartWidth","borderStyle","borderTopColor","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","borderTopWidth","borderWidth","boxShadow","elevation","shadowColor","shadowOffset","shadowOpacity","shadowRadius","opacity","transform"],me=function(e,t){var n=e.width>e.height;return("ios"===h.a.OS?n&&!h.a.isPad?32:44:"android"===h.a.OS?56:64)+t};function ge(e){var t=u.useState(void 0),n=Y()(t,2),r=n[0],i=n[1],o=u.useState(void 0),a=Y()(o,2),s=a[0],l=a[1],d=u.useContext(de),f=fe((function(e,t,n,r,i,o,a){return e({current:{progress:n},next:r&&{progress:r},layouts:{header:{height:a,width:t.width},screen:t,title:i,leftLabel:o}})})),p=e.scene,m=e.layout,g=e.insets,v=e.title,y=e.leftLabel,b=e.onGoBack,w=e.headerTitle,x=e.headerTitleAlign,_=void 0===x?h.a.select({ios:"center",default:"left"}):x,E=e.headerLeft,A=void 0===E?b?function(e){return u.createElement(oe,e)}:void 0:E,S=e.headerTransparent,M=e.headerTintColor,O=e.headerBackground,R=e.headerRight,k=e.headerBackImage,P=e.headerBackTitle,L=e.headerBackTitleVisible,D=e.headerTruncatedBackTitle,N=e.headerPressColorAndroid,j=e.headerBackAccessibilityLabel,B=e.headerBackAllowFontScaling,F=e.headerTitleAllowFontScaling,z=e.headerTitleStyle,H=e.headerBackTitleStyle,U=e.headerLeftContainerStyle,V=e.headerRightContainerStyle,G=e.headerTitleContainerStyle,W=e.headerStyle,q=e.headerStatusBarHeight,X=void 0===q?d?0:g.top:q,K=e.styleInterpolator,Q=me(m,X),Z=C.a.flatten(W||{}),J=Z.height,$=void 0===J?Q:J,ee=Z.minHeight,te=Z.maxHeight,ne=Z.backgroundColor,re=Z.borderBottomColor,ie=Z.borderBottomEndRadius,ae=Z.borderBottomLeftRadius,se=Z.borderBottomRightRadius,le=Z.borderBottomStartRadius,ce=Z.borderBottomWidth,he=Z.borderColor,ge=Z.borderEndColor,ye=Z.borderEndWidth,be=Z.borderLeftColor,we=Z.borderLeftWidth,xe=Z.borderRadius,_e=Z.borderRightColor,Ee=Z.borderRightWidth,Ae=Z.borderStartColor,Se=Z.borderStartWidth,Me=Z.borderStyle,Te=Z.borderTopColor,Ce=Z.borderTopEndRadius,Oe=Z.borderTopLeftRadius,Re=Z.borderTopRightRadius,ke=Z.borderTopStartRadius,Pe=Z.borderTopWidth,Le=Z.borderWidth,De=Z.boxShadow,Ie=Z.elevation,Ne=Z.shadowColor,je=Z.shadowOffset,Be=Z.shadowOpacity,Fe=Z.shadowRadius,ze=Z.opacity,He=Z.transform;c()(Z,pe);var Ue={backgroundColor:ne,borderBottomColor:re,borderBottomEndRadius:ie,borderBottomLeftRadius:ae,borderBottomRightRadius:se,borderBottomStartRadius:le,borderBottomWidth:ce,borderColor:he,borderEndColor:ge,borderEndWidth:ye,borderLeftColor:be,borderLeftWidth:we,borderRadius:xe,borderRightColor:_e,borderRightWidth:Ee,borderStartColor:Ae,borderStartWidth:Se,borderStyle:Me,borderTopColor:Te,borderTopEndRadius:Ce,borderTopLeftRadius:Oe,borderTopRightRadius:Re,borderTopStartRadius:ke,borderTopWidth:Pe,borderWidth:Le,boxShadow:De,elevation:Ie,shadowColor:Ne,shadowOffset:je,shadowOpacity:Be,shadowRadius:Fe,opacity:ze,transform:He};for(var Ve in Ue)void 0===Ue[Ve]&&delete Ue[Ve];var Ge=f(K,m,p.progress.current,p.progress.next,s,y?r:void 0,"number"===typeof $?$:Q),We=Ge.titleStyle,qe=Ge.leftButtonStyle,Xe=Ge.leftLabelStyle,Ye=Ge.rightButtonStyle,Ke=Ge.backgroundStyle,Qe=A?A({backImage:k,pressColorAndroid:N,accessibilityLabel:j,allowFontScaling:B,onPress:b,labelVisible:L,label:void 0!==P?P:y,truncatedLabel:D,labelStyle:[Xe,H],onLabelLayout:function(e){var t=e.nativeEvent.layout,n=t.height,o=t.width;r&&n===r.height&&o===r.width||i({height:n,width:o})},screenLayout:m,titleLayout:s,tintColor:M,canGoBack:Boolean(b)}):null,Ze=R?R({tintColor:M}):null;return u.createElement(u.Fragment,null,u.createElement(I.a.View,{pointerEvents:"box-none",style:[C.a.absoluteFill,{zIndex:0},Ke]},O?O({style:Ue}):S?null:u.createElement(ue,{style:Ue})),u.createElement(I.a.View,{pointerEvents:"box-none",style:[{height:$,minHeight:ee,maxHeight:te,opacity:ze,transform:He}]},u.createElement(T.a,{pointerEvents:"none",style:{height:X}}),u.createElement(T.a,{pointerEvents:"box-none",style:ve.content},Qe?u.createElement(I.a.View,{pointerEvents:"box-none",style:[ve.left,{left:g.left},qe,U]},Qe):null,u.createElement(I.a.View,{pointerEvents:"box-none",style:["left"===_?{position:"absolute",left:(Qe?72:16)+g.left,right:(Ze?72:16)+g.right}:{marginHorizontal:(Qe?32:16)+(Qe&&!1!==L?40:0)+Math.max(g.left,g.right)},We,G]},w({children:v,onLayout:function(e){var t=e.nativeEvent.layout,n=t.height,r=t.width;l((function(e){return e&&n===e.height&&r===e.width?e:{height:n,width:r}}))},allowFontScaling:F,tintColor:M,style:z})),Ze?u.createElement(I.a.View,{pointerEvents:"box-none",style:[ve.right,{right:g.right},Ye,V]},Ze):null)))}var ve=C.a.create({content:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center"},left:{position:"absolute",left:0,top:0,bottom:0,justifyContent:"center",alignItems:"flex-start"},right:{position:"absolute",right:0,top:0,bottom:0,justifyContent:"center",alignItems:"flex-end"}}),ye=r(51),be=r(260),we=r.n(be),xe=["enabled","layout","style"];function _e(){return(_e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ee=u.forwardRef((function(e,t){var n=e.enabled,r=e.layout,i=e.style,o=c()(e,xe),a=u.useState(!1),s=Y()(a,2),l=s[0],h=s[1];return u.useEffect((function(){if("undefined"!==typeof document&&document.body){var e=document.body.clientWidth,t=document.body.clientHeight;h(e===r.width&&t===r.height)}}),[r.height,r.width]),u.createElement(T.a,_e({},o,{ref:t,style:[n&&l?Ae.page:Ae.card,i]}))})),Ae=C.a.create({page:{minHeight:"100%"},card:{flex:1,overflow:"hidden"}}),Se=u.createContext(void 0);function Me(e){switch(e){case"vertical":return 1;case"vertical-inverted":return-1;case"horizontal":return K.a.isRTL?-1:1;case"horizontal-inverted":return K.a.isRTL?1:-1}}function Te(e,t){var n=Me(t);switch(t){case"vertical":case"vertical-inverted":return e.height*n;case"horizontal":case"horizontal-inverted":return e.width*n}}var Ce=["styleInterpolator","index","current","gesture","next","layout","insets","overlay","overlayEnabled","shadowEnabled","gestureEnabled","gestureDirection","pageOverflowEnabled","children","containerStyle","contentStyle"];function Oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ke(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Pe(){return(Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var De="web"!==h.a.OS,Ie=function(e){_()(n,e);var t=ke(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Le(w()(e),"isCurrentlyMounted",!1),Le(w()(e),"isClosing",new I.a.Value(0)),Le(w()(e),"inverted",new I.a.Value(Me(e.props.gestureDirection))),Le(w()(e),"layout",{width:new I.a.Value(e.props.layout.width),height:new I.a.Value(e.props.layout.height)}),Le(w()(e),"isSwiping",new I.a.Value(0)),Le(w()(e),"interactionHandle",void 0),Le(w()(e),"pendingGestureCallback",void 0),Le(w()(e),"lastToValue",void 0),Le(w()(e),"animate",(function(t){var n=t.closing,r=t.velocity,i=e.props,o=i.gesture,a=i.transitionSpec,s=i.onOpen,l=i.onClose,c=i.onTransition,u=e.getAnimateToValue(Re(Re({},e.props),{},{closing:n}));e.lastToValue=u;var h=n?a.close:a.open,d="spring"===h.animation?I.a.spring:I.a.timing;e.setPointerEventsEnabled(!n),e.handleStartInteraction(),clearTimeout(e.pendingGestureCallback),null===c||void 0===c||c({closing:n,gesture:void 0!==r}),d(o,Re(Re({},h.config),{},{velocity:r,toValue:u,useNativeDriver:De,isInteraction:!1})).start((function(t){var r=t.finished;e.handleEndInteraction(),clearTimeout(e.pendingGestureCallback),r&&(n?l():s(),e.isCurrentlyMounted&&e.forceUpdate())}))})),Le(w()(e),"getAnimateToValue",(function(e){var t=e.closing,n=e.layout,r=e.gestureDirection;return t?Te(n,r):0})),Le(w()(e),"setPointerEventsEnabled",(function(t){var n,r=t?"box-none":"none";null===(n=e.contentRef.current)||void 0===n||n.setNativeProps({pointerEvents:r})})),Le(w()(e),"handleStartInteraction",(function(){void 0===e.interactionHandle&&(e.interactionHandle=ye.a.createInteractionHandle())})),Le(w()(e),"handleEndInteraction",(function(){void 0!==e.interactionHandle&&(ye.a.clearInteractionHandle(e.interactionHandle),e.interactionHandle=void 0)})),Le(w()(e),"handleGestureStateChange",(function(t){var n=t.nativeEvent,r=e.props,i=r.layout,o=r.onClose,a=r.onGestureBegin,s=r.onGestureCanceled,l=r.onGestureEnd,c=r.gestureDirection,u=r.gestureVelocityImpact;switch(n.state){case P:e.isSwiping.setValue(1),e.handleStartInteraction(),null===a||void 0===a||a();break;case L:e.isSwiping.setValue(0),e.handleEndInteraction();var h="vertical"===c||"vertical-inverted"===c?n.velocityY:n.velocityX;e.animate({closing:e.props.closing,velocity:h}),null===s||void 0===s||s();break;case D:var d,f,p;e.isSwiping.setValue(0),"vertical"===c||"vertical-inverted"===c?(d=i.height,f=n.translationY,p=n.velocityY):(d=i.width,f=n.translationX,p=n.velocityX);var m=(f+p*u)*Me(c)>d/2?0!==p||0!==f:e.props.closing;e.animate({closing:m,velocity:p}),m&&(e.pendingGestureCallback=setTimeout((function(){o(),e.forceUpdate()}),32)),null===l||void 0===l||l()}})),Le(w()(e),"getInterpolatedStyle",fe((function(t,n,r,i,o,a,s,l,c){return t({index:n,current:{progress:r},next:i&&{progress:i},closing:e.isClosing,swiping:e.isSwiping,inverted:e.inverted,layouts:{screen:o},insets:{top:a,right:s,bottom:l,left:c}})}))),Le(w()(e),"getCardAnimationContext",fe((function(t,n,r,i,o,a,s,l){return{index:t,current:{progress:n},next:r&&{progress:r},closing:e.isClosing,swiping:e.isSwiping,inverted:e.inverted,layouts:{screen:i},insets:{top:o,right:a,bottom:s,left:l}}}))),Le(w()(e),"contentRef",u.createRef()),e}return y()(n,[{key:"componentDidMount",value:function(){this.animate({closing:this.props.closing}),this.isCurrentlyMounted=!0}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.layout,r=t.gestureDirection,i=t.closing,o=n.width,a=n.height;o!==e.layout.width&&this.layout.width.setValue(o),a!==e.layout.height&&this.layout.height.setValue(a),r!==e.gestureDirection&&this.inverted.setValue(Me(r));var s=this.getAnimateToValue(this.props);this.getAnimateToValue(e)===s&&this.lastToValue===s||this.animate({closing:i})}},{key:"componentWillUnmount",value:function(){this.isCurrentlyMounted=!1,this.handleEndInteraction()}},{key:"gestureActivationCriteria",value:function(){var e=this.props,t=e.layout,n=e.gestureDirection,r=e.gestureResponseDistance,i="vertical"===n||"vertical-inverted"===n?void 0!==(null===r||void 0===r?void 0:r.vertical)?r.vertical:135:void 0!==(null===r||void 0===r?void 0:r.horizontal)?r.horizontal:50;if("vertical"===n)return{maxDeltaX:15,minOffsetY:5,hitSlop:{bottom:-t.height+i}};if("vertical-inverted"===n)return{maxDeltaX:15,minOffsetY:-5,hitSlop:{top:-t.height+i}};var o=-t.width+i;return 1===Me(n)?{minOffsetX:5,maxDeltaY:20,hitSlop:{right:o}}:{minOffsetX:-5,maxDeltaY:20,hitSlop:{left:o}}}},{key:"render",value:function(){var e,t=this.props,n=t.styleInterpolator,r=t.index,i=t.current,o=t.gesture,a=t.next,s=t.layout,l=t.insets,h=t.overlay,d=t.overlayEnabled,f=t.shadowEnabled,p=t.gestureEnabled,m=t.gestureDirection,g=t.pageOverflowEnabled,v=t.children,y=t.containerStyle,b=t.contentStyle,w=c()(t,Ce),x=this.getInterpolatedStyle(n,r,i,a,s,l.top,l.right,l.bottom,l.left),_=this.getCardAnimationContext(r,i,a,s,l.top,l.right,l.bottom,l.left),E=x.containerStyle,A=x.cardStyle,S=x.overlayStyle,M=x.shadowStyle,O=p?I.a.event([{nativeEvent:"vertical"===m||"vertical-inverted"===m?{translationY:o}:{translationX:o}}],{useNativeDriver:De}):void 0,k=C.a.flatten(b||{}).backgroundColor,P="string"===typeof k&&0===we()(k).alpha();return u.createElement(Se.Provider,{value:_},u.createElement(I.a.View,{style:{opacity:i},collapsable:!1}),u.createElement(T.a,Pe({pointerEvents:"box-none"},w),d?u.createElement(T.a,{pointerEvents:"box-none",style:C.a.absoluteFill},h({style:S})):null,u.createElement(I.a.View,{needsOffscreenAlphaCompositing:(e=E,!!e&&null!=C.a.flatten(e).opacity),style:[Ne.container,E,y],pointerEvents:"box-none"},u.createElement(R,Pe({enabled:0!==s.width&&p,onGestureEvent:O,onHandlerStateChange:this.handleGestureStateChange},this.gestureActivationCriteria()),u.createElement(I.a.View,{style:[Ne.container,A]},f&&M&&!P?u.createElement(I.a.View,{style:[Ne.shadow,"horizontal"===m?[Ne.shadowHorizontal,Ne.shadowLeft]:"horizontal-inverted"===m?[Ne.shadowHorizontal,Ne.shadowRight]:"vertical"===m?[Ne.shadowVertical,Ne.shadowTop]:[Ne.shadowVertical,Ne.shadowBottom],{backgroundColor:k},M],pointerEvents:"none"}):null,u.createElement(Ee,{ref:this.contentRef,enabled:g,layout:s,style:b},v))))))}}]),n}(u.Component);Le(Ie,"defaultProps",{overlayEnabled:"ios"!==h.a.OS,shadowEnabled:!0,gestureEnabled:!0,gestureVelocityImpact:.3,overlay:function(e){var t=e.style;return t?u.createElement(I.a.View,{pointerEvents:"none",style:[Ne.overlay,t]}):null}});var Ne=C.a.create({container:{flex:1},overlay:{flex:1,backgroundColor:"#000"},shadow:{position:"absolute",shadowRadius:5,shadowColor:"#000",shadowOpacity:.3},shadowHorizontal:{top:0,bottom:0,width:3,shadowOffset:{width:-1,height:1}},shadowLeft:{left:0},shadowRight:{right:0},shadowVertical:{left:0,right:0,height:3,shadowOffset:{width:1,height:-1}},shadowTop:{top:0},shadowBottom:{bottom:0}}),je=u.createContext(void 0),Be=u.createContext(void 0);var Fe=u.memo((function(e){var t=e.active,n=e.cardOverlay,r=e.cardOverlayEnabled,i=e.cardShadowEnabled,o=e.cardStyle,a=e.cardStyleInterpolator,s=e.closing,l=e.gesture,c=e.focused,h=e.gestureDirection,d=e.gestureEnabled,f=e.gestureResponseDistance,p=e.gestureVelocityImpact,m=e.getPreviousScene,g=e.getFocusedRoute,v=e.mode,y=e.headerMode,b=e.headerShown,w=e.headerStyleInterpolator,x=e.hasAbsoluteHeader,_=e.headerHeight,E=e.onHeaderHeightChange,A=e.isParentHeaderShown,S=e.index,M=e.layout,O=e.onCloseRoute,R=e.onOpenRoute,k=e.onPageChangeCancel,P=e.onPageChangeConfirm,L=e.onPageChangeStart,D=e.onGestureCancel,I=e.onGestureEnd,N=e.onGestureStart,j=e.onTransitionEnd,B=e.onTransitionStart,F=e.renderHeader,z=e.renderScene,H=e.safeAreaInsetBottom,U=e.safeAreaInsetLeft,V=e.safeAreaInsetRight,G=e.safeAreaInsetTop,W=e.scene,q=e.transitionSpec,X={top:G,right:V,bottom:H,left:U},K=Object(Z.a)().colors,Q=u.useState("box-none"),J=Y()(Q,2),$=J[0],ee=J[1];u.useEffect((function(){var e,t,n=null===(e=W.progress.next)||void 0===e||null===(t=e.addListener)||void 0===t?void 0:t.call(e,(function(e){var t=e.value;ee(t<=.1?"box-none":"none")}));return function(){var e,t;n&&(null===(e=W.progress.next)||void 0===e||null===(t=e.removeListener)||void 0===t||t.call(e,n))}}),[$,W.progress.next]);var te="none"!==y&&!1!==b,ne=m({route:W.route});return u.createElement(Ie,{index:S,gestureDirection:h,layout:M,insets:X,gesture:l,current:W.progress.current,next:W.progress.next,closing:s,onOpen:function(){var e=W.route;null===j||void 0===j||j({route:e},!1),R({route:e})},onClose:function(){var e=W.route;null===j||void 0===j||j({route:e},!0),O({route:e})},overlay:n,overlayEnabled:r,shadowEnabled:i,onTransition:function(e){var n=e.closing,r=e.gesture,i=W.route;r?t&&n?null===P||void 0===P||P(!1):null===k||void 0===k||k():null===P||void 0===P||P(!0),null===B||void 0===B||B({route:i},n)},onGestureBegin:function(){var e=W.route;null===L||void 0===L||L(),null===N||void 0===N||N({route:e})},onGestureCanceled:function(){var e=W.route;null===k||void 0===k||k(),null===D||void 0===D||D({route:e})},onGestureEnd:function(){var e=W.route;null===I||void 0===I||I({route:e})},gestureEnabled:d,gestureResponseDistance:f,gestureVelocityImpact:p,transitionSpec:q,styleInterpolator:a,accessibilityElementsHidden:!c,importantForAccessibility:c?"auto":"no-hide-descendants",pointerEvents:t?"box-none":$,pageOverflowEnabled:"screen"===y&&"card"===v,containerStyle:x?{marginTop:_}:null,contentStyle:[{backgroundColor:K.background},o],style:[{overflow:t?void 0:"hidden"},C.a.absoluteFill]},u.createElement(T.a,{style:ze.container},u.createElement(T.a,{style:ze.scene},u.createElement(Be.Provider,{value:ne},u.createElement(de.Provider,{value:A||te},u.createElement(je.Provider,{value:_},z({route:W.route}))))),"screen"===y?F({mode:"screen",layout:M,insets:X,scenes:[ne,W],getPreviousScene:m,getFocusedRoute:g,gestureDirection:h,styleInterpolator:w,onContentHeightChange:E}):null))})),ze=C.a.create({container:{flex:1,flexDirection:"column-reverse"},scene:{flex:1}}),He=r(77);function Ue(){var e=N.a.get("window");return"ios"===h.a.OS&&!h.a.isPad&&!h.a.isTVOS&&(780===e.height||780===e.width||812===e.height||812===e.width||844===e.height||844===e.width||896===e.height||896===e.width||926===e.height||926===e.width)}var Ve=I.a.add,Ge=I.a.multiply;function We(e,t,n){return Ve(Ge(e,t),Ge(e.interpolate({inputRange:[0,1],outputRange:[1,0]}),n))}var qe=I.a.add,Xe=I.a.multiply;function Ye(){return{}}var Ke=I.a.add;function Qe(e){var t=e.current,n=e.next,r=Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),i=r.interpolate({inputRange:[0,1,2],outputRange:[0,1,0]});return{leftButtonStyle:{opacity:i},rightButtonStyle:{opacity:i},titleStyle:{opacity:i},backgroundStyle:{opacity:r.interpolate({inputRange:[0,1,1.9,2],outputRange:[0,1,1,0]})}}}function Ze(e){var t=e.current,n=e.next,r=e.layouts.screen,i=[{translateX:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:K.a.isRTL?[-r.width,0,r.width]:[r.width,0,-r.width]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function Je(e){var t=e.current,n=e.next,r=e.layouts.screen,i=[{translateX:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:K.a.isRTL?[r.width,0,-r.width]:[-r.width,0,r.width]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function $e(e){var t=e.current,n=e.next,r=e.layouts.header,i=[{translateY:Ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:[-r.height,0,-r.height]})}];return{leftButtonStyle:{transform:i},rightButtonStyle:{transform:i},titleStyle:{transform:i},backgroundStyle:{transform:i}}}function et(){return{}}var tt=r(14),nt={animation:"spring",config:{stiffness:1e3,damping:500,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10}},rt={animation:"timing",config:{duration:350,easing:tt.a.out(tt.a.poly(5))}},it={animation:"timing",config:{duration:150,easing:tt.a.in(tt.a.linear)}},ot={animation:"timing",config:{duration:425,easing:tt.a.bezier(.35,.45,0,1)}},at={animation:"timing",config:{duration:400,easing:tt.a.bezier(.35,.45,0,1)}},st={gestureDirection:"horizontal",transitionSpec:{open:nt,close:nt},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.inverted,i=e.layouts.screen;return{cardStyle:{transform:[{translateX:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.width,0],extrapolate:"clamp"}),r)},{translateX:n?Xe(n.progress.interpolate({inputRange:[0,1],outputRange:[0,-.3*i.width],extrapolate:"clamp"}),r):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.07],extrapolate:"clamp"})},shadowStyle:{shadowOpacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:"clamp"})}}},headerStyleInterpolator:Qe},lt={gestureDirection:"vertical",transitionSpec:{open:nt,close:nt},cardStyleInterpolator:function(e){var t=e.current,n=e.inverted,r=e.layouts.screen;return{cardStyle:{transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[r.height,0],extrapolate:"clamp"}),n)}]}}},headerStyleInterpolator:Qe},ct={gestureDirection:"vertical",transitionSpec:{open:rt,close:it},cardStyleInterpolator:function(e){var t=e.current,n=e.inverted,r=e.layouts.screen,i=e.closing,o=Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[.08*r.height,0],extrapolate:"clamp"}),n);return{cardStyle:{opacity:We(i,t.progress,t.progress.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1]})),transform:[{translateY:o}]}}},headerStyleInterpolator:Qe},ut={gestureDirection:"vertical",transitionSpec:{open:ot,close:ot},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.inverted,i=e.layouts.screen;return{containerStyle:{overflow:"hidden",transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.height,0],extrapolate:"clamp"}),r)}]},cardStyle:{transform:[{translateY:Xe(t.progress.interpolate({inputRange:[0,1],outputRange:[i.height*(95.9/100)*-1,0],extrapolate:"clamp"}),r)},{translateY:n?Xe(n.progress.interpolate({inputRange:[0,1],outputRange:[0,.02*i.height*-1],extrapolate:"clamp"}),r):0}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,.36,1],outputRange:[0,.1,.1],extrapolate:"clamp"})}}},headerStyleInterpolator:Qe},ht={gestureDirection:"horizontal",transitionSpec:{open:at,close:at},cardStyleInterpolator:function(e){var t=e.current,n=e.next,r=e.closing,i=qe(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0);return{containerStyle:{opacity:i.interpolate({inputRange:[0,.75,.875,1,1.0825,1.2075,2],outputRange:[0,0,1,1,1,1,0]}),transform:[{scale:We(r,t.progress.interpolate({inputRange:[0,1],outputRange:[.9,1],extrapolate:"clamp"}),i.interpolate({inputRange:[0,1,2],outputRange:[.85,1,1.1]}))}]}}},headerStyleInterpolator:Qe},dt=h.a.select({ios:st,android:h.a.Version>=29?ht:h.a.Version>=28?ut:ct,default:ht}),ft=h.a.select({ios:lt,default:dt});function pt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(){return(vt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var bt=Object.freeze({options:{}}),wt=function(e,t,n,r,i,o){return e.reduce((function(e,a){var s=(r[a.key]||{}).options,l=void 0===s?{}:s,c=C.a.flatten(l.headerStyle||{}),u="number"===typeof c.height?c.height:o[a.key],h=gt(gt({},t),l.safeAreaInsets),d=l.headerStatusBarHeight,f=void 0===d?n?0:h.top:d;return e[a.key]="number"===typeof u?u:me(i,f),e}),{})},xt=function(e,t,n){var r=((null===n||void 0===n?void 0:n.options)||{}).gestureDirection;return Te(t,void 0===r?"modal"===e?ft.gestureDirection:dt.gestureDirection:r)},_t=function(e,t,n,r){var i=xt(e,{width:Math.max(1,n.width),height:Math.max(1,n.height)},r);return i>0?t.interpolate({inputRange:[0,i],outputRange:[1,0]}):t.interpolate({inputRange:[i,0],outputRange:[0,1]})},Et=function(e){_()(n,e);var t=pt(n);function n(e){var r;g()(this,n),r=t.call(this,e),yt(w()(r),"handleLayout",(function(e){var t=e.nativeEvent.layout,n=t.height,i=t.width,o={width:i,height:n};r.setState((function(e,t){return n===e.layout.height&&i===e.layout.width?null:{layout:o,headerHeights:wt(t.routes,t.insets,t.isParentHeaderShown,e.descriptors,o,e.headerHeights)}}))})),yt(w()(r),"handleHeaderLayout",(function(e){var t=e.route,n=e.height;r.setState((function(e){var r=e.headerHeights;return r[t.key]===n?null:{headerHeights:gt(gt({},r),{},s()({},t.key,n))}}))})),yt(w()(r),"getFocusedRoute",(function(){var e=r.props.state;return e.routes[e.index]})),yt(w()(r),"getPreviousScene",(function(e){var t=e.route,n=r.props.getPreviousRoute,i=r.state.scenes,o=n({route:t});if(o)return i.find((function(e){return e.route.key===o.key}))}));var i=N.a.get("window"),o=i.height,a=void 0===o?0:o,l=i.width,c=void 0===l?0:l;return r.state={routes:[],scenes:[],gestures:{},layout:{height:a,width:c},descriptors:r.props.descriptors,headerHeights:{}},r}return y()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.mode,r=t.insets,i=t.descriptors,o=t.state,a=t.routes,s=t.closingRouteKeys,l=t.onOpenRoute,c=t.onCloseRoute,h=t.getGesturesEnabled,d=t.renderHeader,f=t.renderScene,p=t.headerMode,m=t.isParentHeaderShown,g=t.onTransitionStart,v=t.onTransitionEnd,y=t.onPageChangeStart,b=t.onPageChangeConfirm,w=t.onPageChangeCancel,x=t.onGestureStart,_=t.onGestureEnd,E=t.onGestureCancel,A=t.detachInactiveScreens,S=void 0===A?G:A,M=this.state,T=M.scenes,O=M.layout,R=M.gestures,k=M.headerHeights,P=o.routes[o.index],L=i[P.key],D=L?L.options:{},I=k[P.key],N="modal"===n?ft:dt;"screen"===p&&(N=gt(gt({},N),{},{headerStyleInterpolator:et}));for(var j=D.safeAreaInsets||{},B=j.top,F=void 0===B?r.top:B,z=j.right,H=void 0===z?r.right:z,U=j.bottom,V=void 0===U?r.bottom:U,X=j.left,Y=void 0===X?r.left:X,K=1,Q=T.length-1;Q>=0;Q--){var Z=T[Q].descriptor.options.detachPreviousScreen;if(!1!==(void 0===Z?"modal"!==n||Q!==T.length-1:Z))break;K++}var J="float"===p&&this.state.scenes.slice(-2).some((function(e){var t=e.descriptor,n=t?t.options:{},r=n.headerTransparent,i=n.headerShown;return!(!r&&!1!==(void 0===i||i))})),$="float"===p?u.createElement(u.Fragment,{key:"header"},d({mode:"float",layout:O,insets:{top:F,right:H,bottom:V,left:Y},scenes:T,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,onContentHeightChange:this.handleHeaderLayout,gestureDirection:void 0!==D.gestureDirection?D.gestureDirection:N.gestureDirection,styleInterpolator:void 0!==D.headerStyleInterpolator?D.headerStyleInterpolator:N.headerStyleInterpolator,style:[At.floating,J&&[{height:I},At.absolute]]})):null;return u.createElement(u.Fragment,null,J?null:$,u.createElement(W,{enabled:S,style:At.container,onLayout:this.handleLayout},a.map((function(t,i,o){var a=P.key===t.key,A=R[t.key],M=T[i],L=1;if(G)if(i<o.length-K-1)L=0;else{var D=T[o.length-1],I=i===o.length-1?2:i>=o.length-K?1:0;L=D?D.progress.current.interpolate({inputRange:[0,.99,1],outputRange:[1,1,I],extrapolate:"clamp"}):1}else L=M.progress.next?M.progress.next.interpolate({inputRange:[0,.99,1],outputRange:[1,1,0],extrapolate:"clamp"}):1;var j=M.descriptor?M.descriptor.options:{},B=j.safeAreaInsets,F=j.headerShown,z=void 0===F||F,H=j.headerTransparent,U=j.cardShadowEnabled,V=j.cardOverlayEnabled,W=j.cardOverlay,X=j.cardStyle,Y=j.animationEnabled,Q=j.gestureResponseDistance,Z=j.gestureVelocityImpact,$=j.gestureDirection,ee=void 0===$?N.gestureDirection:$,te=j.transitionSpec,ne=void 0===te?N.transitionSpec:te,re=j.cardStyleInterpolator,ie=void 0===re?!1===Y?Ye:N.cardStyleInterpolator:re,oe=j.headerStyleInterpolator,ae={gestureDirection:ee,transitionSpec:ne,cardStyleInterpolator:ie,headerStyleInterpolator:void 0===oe?N.headerStyleInterpolator:oe};if(i!==o.length-1){var se=T[i+1];if(se){var le=se.descriptor?se.descriptor.options:{},ce=le.animationEnabled,ue=le.gestureDirection,he=void 0===ue?N.gestureDirection:ue,de=le.transitionSpec,fe=void 0===de?N.transitionSpec:de,pe=le.cardStyleInterpolator,me=void 0===pe?!1===ce?Ye:N.cardStyleInterpolator:pe,ge=le.headerStyleInterpolator;ae={gestureDirection:he,transitionSpec:fe,cardStyleInterpolator:me,headerStyleInterpolator:void 0===ge?N.headerStyleInterpolator:ge}}}var ve=B||{},ye=ve.top,be=void 0===ye?r.top:ye,we=ve.right,xe=void 0===we?r.right:we,_e=ve.bottom,Ee=void 0===_e?r.bottom:_e,Ae=ve.left,Se=void 0===Ae?r.left:Ae,Me="none"!==p&&!1!==z?k[t.key]:0;return u.createElement(q,{key:t.key,style:C.a.absoluteFill,enabled:S,active:L,pointerEvents:"box-none"},u.createElement(Fe,vt({index:i,active:i===o.length-1,focused:a,closing:s.includes(t.key),layout:O,gesture:A,scene:M,safeAreaInsetTop:be,safeAreaInsetRight:xe,safeAreaInsetBottom:Ee,safeAreaInsetLeft:Se,cardOverlay:W,cardOverlayEnabled:V,cardShadowEnabled:U,cardStyle:X,onPageChangeStart:y,onPageChangeConfirm:b,onPageChangeCancel:w,onGestureStart:x,onGestureCancel:E,onGestureEnd:_,gestureResponseDistance:Q,headerHeight:Me,isParentHeaderShown:m,onHeaderHeightChange:e.handleHeaderLayout,getPreviousScene:e.getPreviousScene,getFocusedRoute:e.getFocusedRoute,mode:n,headerMode:p,headerShown:z,hasAbsoluteHeader:J&&!H,renderHeader:d,renderScene:f,onOpenRoute:l,onCloseRoute:c,onTransitionStart:g,onTransitionEnd:v,gestureEnabled:0!==i&&h({route:t}),gestureVelocityImpact:Z},ae)))}))),J?$:null)}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(e.routes===t.routes&&e.descriptors===t.descriptors)return null;var n=e.routes.reduce((function(n,r){var i=e.descriptors[r.key],o=((null===i||void 0===i?void 0:i.options)||{}).animationEnabled;return n[r.key]=t.gestures[r.key]||new I.a.Value(e.openingRouteKeys.includes(r.key)&&!1!==o?xt(e.mode,t.layout,i):0),n}),{});return{routes:e.routes,scenes:e.routes.map((function(r,i,o){var a=o[i-1],s=o[i+1],l=t.scenes[i],c=n[r.key],u=a?n[a.key]:void 0,h=s?n[s.key]:void 0,d=e.descriptors[r.key]||t.descriptors[r.key]||(l?l.descriptor:bt),f=e.descriptors[null===s||void 0===s?void 0:s.key]||t.descriptors[null===s||void 0===s?void 0:s.key],p=e.descriptors[null===a||void 0===a?void 0:a.key]||t.descriptors[null===a||void 0===a?void 0:a.key],m={route:r,descriptor:d,progress:{current:_t(e.mode,c,t.layout,d),next:h?_t(e.mode,h,t.layout,f):void 0,previous:u?_t(e.mode,u,t.layout,p):void 0},__memo:[r,t.layout,d,f,p,c,h,u]};return l&&m.__memo.every((function(e,t){return l.__memo[t]===e}))?l:m})),gestures:n,descriptors:e.descriptors,headerHeights:wt(e.routes,e.insets,e.isParentHeaderShown,t.descriptors,t.layout,t.headerHeights)}}}]),n}(u.Component),At=C.a.create({container:{flex:1},absolute:{position:"absolute",top:0,left:0,right:0},floating:{zIndex:1}}),St=r(57),Mt=r(121);function Tt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Ct(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ot=function(e){_()(n,e);var t=Tt(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Ct(w()(e),"previouslyFocusedTextInput",void 0),Ct(w()(e),"startTimestamp",0),Ct(w()(e),"keyboardTimeout",void 0),Ct(w()(e),"clearKeyboardTimeout",(function(){void 0!==e.keyboardTimeout&&(clearTimeout(e.keyboardTimeout),e.keyboardTimeout=void 0)})),Ct(w()(e),"handlePageChangeStart",(function(){if(e.props.enabled){e.clearKeyboardTimeout();var t=St.a.State.currentlyFocusedInput?St.a.State.currentlyFocusedInput():St.a.State.currentlyFocusedField();St.a.State.blurTextInput(t),e.previouslyFocusedTextInput=t,e.startTimestamp=Date.now()}})),Ct(w()(e),"handlePageChangeConfirm",(function(t){if(e.props.enabled){if(e.clearKeyboardTimeout(),t)Mt.a.dismiss();else{var n=e.previouslyFocusedTextInput;n&&St.a.State.blurTextInput(n)}e.previouslyFocusedTextInput=void 0}})),Ct(w()(e),"handlePageChangeCancel",(function(){if(e.props.enabled){e.clearKeyboardTimeout();var t=e.previouslyFocusedTextInput;t&&(Date.now()-e.startTimestamp<100?e.keyboardTimeout=setTimeout((function(){St.a.State.focusTextInput(t),e.previouslyFocusedTextInput=void 0}),100):(St.a.State.focusTextInput(t),e.previouslyFocusedTextInput=void 0))}})),e}return y()(n,[{key:"componentWillUnmount",value:function(){this.clearKeyboardTimeout()}},{key:"render",value:function(){return this.props.children({onPageChangeStart:this.handlePageChangeStart,onPageChangeConfirm:this.handlePageChangeConfirm,onPageChangeCancel:this.handlePageChangeCancel})}}]),n}(u.Component),Rt=["tintColor","style"];function kt(){return(kt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Pt(e){var t=e.tintColor,n=e.style,r=c()(e,Rt),i=Object(Z.a)().colors;return u.createElement(I.a.Text,kt({accessibilityRole:"header","aria-level":"1",numberOfLines:1},r,{style:[Lt.title,{color:void 0===t?i.text:t},n]}))}var Lt=C.a.create({title:h.a.select({ios:{fontSize:17,fontWeight:"600"},android:{fontSize:20,fontFamily:"sans-serif-medium",fontWeight:"normal"},default:{fontSize:18,fontWeight:"500"}})});function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nt(){return(Nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var jt=u.memo((function(e){var t,n=e.scene,r=e.previous,i=e.layout,o=e.insets,a=e.navigation,s=e.styleInterpolator,l=n.descriptor.options,c="function"!==typeof l.headerTitle&&void 0!==l.headerTitle?l.headerTitle:void 0!==l.title?l.title:n.route.name;if(void 0!==l.headerBackTitle)t=l.headerBackTitle;else if(r){var h=r.descriptor.options;t="function"!==typeof h.headerTitle&&void 0!==h.headerTitle?h.headerTitle:void 0!==h.title?h.title:r.route.name}var f=u.useCallback(function(e,t){var n;return function(){if(!n){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];e.apply(this,i),n=setTimeout((function(){n=void 0}),t)}}}((function(){a.isFocused()&&a.canGoBack()&&a.dispatch(It(It({},d.StackActions.pop()),{},{source:n.route.key}))}),50),[a,n.route.key]);return u.createElement(ge,Nt({},l,{insets:o,layout:i,scene:n,title:c,leftLabel:t,headerTitle:"function"!==typeof l.headerTitle?function(e){return u.createElement(Pt,e)}:l.headerTitle,onGoBack:r?f:void 0,styleInterpolator:s}))}));function Bt(e){var t=e.mode,n=e.scenes,r=e.layout,i=e.insets,o=e.getPreviousScene,a=e.getFocusedRoute,s=e.onContentHeightChange,l=e.gestureDirection,c=e.styleInterpolator,h=e.style,f=a(),p=u.useContext(Be);return u.createElement(I.a.View,{pointerEvents:"box-none",style:h},n.slice(-3).map((function(e,n,a){var h;if("screen"===t&&n!==a.length-1||!e)return null;var m=e.descriptor.options||{},g=m.header,v=m.headerShown,y=void 0===v||v,b=m.headerTransparent;if(!y)return null;var w=f.key===e.route.key,x=null!==(h=o({route:e.route}))&&void 0!==h?h:p,_=a[n-1],E=a[n+1],A=((null===_||void 0===_?void 0:_.descriptor.options)||{}).headerShown,S=void 0===A||A,M=((null===E||void 0===E?void 0:E.descriptor.options)||{}).headerShown,C=!1===S&&!E||!1===(void 0===M||M),O={mode:t,layout:r,insets:i,scene:e,previous:x,navigation:e.descriptor.navigation,styleInterpolator:"float"===t?C?"vertical"===l||"vertical-inverted"===l?$e:"horizontal-inverted"===l?Je:Ze:c:et};return u.createElement(d.NavigationContext.Provider,{key:e.route.key,value:e.descriptor.navigation},u.createElement(d.NavigationRouteContext.Provider,{value:e.route},u.createElement(T.a,{onLayout:s?function(t){var n=t.nativeEvent.layout.height;s({route:e.route,height:n})}:void 0,pointerEvents:w?"box-none":"none",accessibilityElementsHidden:!w,importantForAccessibility:w?"auto":"no-hide-descendants",style:"float"===t&&!w||b?Ft.header:null},void 0!==g?g(O):u.createElement(jt,O))))})))}var Ft=C.a.create({header:{position:"absolute",top:0,left:0,right:0}}),zt=r(465);function Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ut=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({top:function(e){return h.a.select({ios:(t=e?44:30,n=20,Ue()?t:n),android:He.a.currentHeight,default:0});var t,n}(!0),bottom:Ue()?34:0,right:0,left:0},zt.b);function Vt(e){var t=e.children;return u.createElement(O.a,null,(function(e){return e?t:u.createElement(O.b,{initialSafeAreaInsets:Ut},t)}))}var Gt=["state","navigation","keyboardHandlingEnabled","mode","headerMode","descriptors"];function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xt(t){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var e,r=M()(t);if(n){var i=M()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return A()(this,e)}}function Yt(){return(Yt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qt=null!==k&&void 0!==k?k:T.a,Zt=function(e){_()(n,e);var t=Xt(n);function n(){var e;g()(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return e=t.call.apply(t,[this].concat(i)),Kt(w()(e),"state",{routes:[],previousRoutes:[],previousDescriptors:{},openingRouteKeys:[],closingRouteKeys:[],replacingRouteKeys:[],descriptors:{}}),Kt(w()(e),"getGesturesEnabled",(function(t){var n=t.route,r=e.state.descriptors[n.key];if(r){var i=r.options,o=i.gestureEnabled;return!1!==i.animationEnabled&&!1!==o}return!1})),Kt(w()(e),"getPreviousRoute",(function(t){var n=t.route,r=e.state,i=r.closingRouteKeys,o=r.replacingRouteKeys,a=e.state.routes.filter((function(e){return e.key===n.key||!i.includes(e.key)&&!o.includes(e.key)})),s=a.findIndex((function(e){return e.key===n.key}));return a[s-1]})),Kt(w()(e),"renderScene",(function(t){var n=t.route,r=e.state.descriptors[n.key]||e.props.descriptors[n.key];return r?r.render():null})),Kt(w()(e),"renderHeader",(function(e){return u.createElement(Bt,e)})),Kt(w()(e),"handleOpenRoute",(function(t){var n=t.route,r=e.props,i=r.state,o=r.navigation,a=e.state,s=a.closingRouteKeys,l=a.replacingRouteKeys;s.some((function(e){return e===n.key}))&&l.every((function(e){return e!==n.key}))&&i.routeNames.includes(n.name)&&!i.routes.some((function(e){return e.key===n.key}))?o.navigate(n):e.setState((function(e){return{routes:e.replacingRouteKeys.length?e.routes.filter((function(t){return!e.replacingRouteKeys.includes(t.key)})):e.routes,openingRouteKeys:e.openingRouteKeys.filter((function(e){return e!==n.key})),closingRouteKeys:e.closingRouteKeys.filter((function(e){return e!==n.key})),replacingRouteKeys:[]}}))})),Kt(w()(e),"handleCloseRoute",(function(t){var n=t.route,r=e.props,i=r.state,o=r.navigation;i.routes.some((function(e){return e.key===n.key}))?o.dispatch(qt(qt({},d.StackActions.pop()),{},{source:n.key,target:i.key})):e.setState((function(e){return{routes:e.routes.filter((function(e){return e.key!==n.key})),openingRouteKeys:e.openingRouteKeys.filter((function(e){return e!==n.key})),closingRouteKeys:e.closingRouteKeys.filter((function(e){return e!==n.key}))}}))})),Kt(w()(e),"handleTransitionStart",(function(t,n){var r=t.route;return e.props.navigation.emit({type:"transitionStart",data:{closing:n},target:r.key})})),Kt(w()(e),"handleTransitionEnd",(function(t,n){var r=t.route;return e.props.navigation.emit({type:"transitionEnd",data:{closing:n},target:r.key})})),Kt(w()(e),"handleGestureStart",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureStart",target:n.key})})),Kt(w()(e),"handleGestureEnd",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureEnd",target:n.key})})),Kt(w()(e),"handleGestureCancel",(function(t){var n=t.route;e.props.navigation.emit({type:"gestureCancel",target:n.key})})),e}return y()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.state,r=t.navigation,i=t.keyboardHandlingEnabled,o=t.mode,a=void 0===o?"card":o,s=t.headerMode,l=void 0===s?"card"===a&&"ios"===h.a.OS?"float":"screen":s,f=(t.descriptors,c()(t,Gt)),p=this.state,m=p.routes,g=p.descriptors,v=p.openingRouteKeys,y=p.closingRouteKeys;return u.createElement(d.NavigationHelpersContext.Provider,{value:r},u.createElement(Qt,{style:Jt.container},u.createElement(Vt,null,u.createElement(O.a,null,(function(t){return u.createElement(Ot,{enabled:!1!==i},(function(r){return u.createElement(de.Consumer,null,(function(i){return u.createElement(Et,Yt({mode:a,insets:t,isParentHeaderShown:i,getPreviousRoute:e.getPreviousRoute,getGesturesEnabled:e.getGesturesEnabled,routes:m,openingRouteKeys:v,closingRouteKeys:y,onOpenRoute:e.handleOpenRoute,onCloseRoute:e.handleCloseRoute,onTransitionStart:e.handleTransitionStart,onTransitionEnd:e.handleTransitionEnd,renderHeader:e.renderHeader,renderScene:e.renderScene,headerMode:l,state:n,descriptors:g,onGestureStart:e.handleGestureStart,onGestureEnd:e.handleGestureEnd,onGestureCancel:e.handleGestureCancel},f,r))}))}))})))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){if((e.state.routes===t.previousRoutes||(s=e.state.routes.map((function(e){return e.key})),l=t.previousRoutes.map((function(e){return e.key})),s.length===l.length&&s.every((function(e,t){return e===l[t]}))))&&t.routes.length){var n=t.routes,r=t.previousRoutes,i=e.descriptors,o=t.previousDescriptors;if(e.descriptors!==t.previousDescriptors&&(i=t.routes.reduce((function(n,r){return n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n}),{}),o=e.descriptors),e.state.routes!==t.previousRoutes){var a=e.state.routes.reduce((function(e,t){return e[t.key]=t,e}),{});n=t.routes.map((function(e){return a[e.key]||e})),r=e.state.routes}return{routes:n,previousRoutes:r,descriptors:i,previousDescriptors:o}}var s,l,c=e.state.index<e.state.routes.length-1?e.state.routes.slice(0,e.state.index+1):e.state.routes,u=t.openingRouteKeys,h=t.closingRouteKeys,d=t.replacingRouteKeys,f=t.previousRoutes,m=f[f.length-1],g=c[c.length-1],v=function(n){var r=e.descriptors[n]||t.descriptors[n];return!r||!1!==r.options.animationEnabled};if(m&&m.key!==g.key)f.some((function(e){return e.key===g.key}))?c.some((function(e){return e.key===m.key}))||v(m.key)&&!h.includes(m.key)&&(h=[].concat(p()(h),[m.key]),u=u.filter((function(e){return e!==m.key})),d=d.filter((function(e){return e!==m.key})),c=[].concat(p()(c),[m])):v(g.key)&&!u.includes(g.key)&&(u=[].concat(p()(u),[g.key]),h=h.filter((function(e){return e!==g.key})),d=d.filter((function(e){return e!==g.key})),c.some((function(e){return e.key===m.key}))||(u=u.filter((function(e){return e!==m.key})),"pop"===function(n){var r;return null!==(r=(e.descriptors[n]||t.descriptors[n]).options.animationTypeForReplace)&&void 0!==r?r:"push"}(g.key)?(h=[].concat(p()(h),[m.key]),u=u.filter((function(e){return e!==g.key})),c=[].concat(p()(c),[m])):(d=[].concat(p()(d),[m.key]),h=h.filter((function(e){return e!==m.key})),(c=c.slice()).splice(c.length-1,0,m))));else if(d.length||h.length){var y;(y=c=c.slice()).splice.apply(y,[c.length-1,0].concat(p()(t.routes.filter((function(e){var t=e.key;return!!v(t)&&(d.includes(t)||h.includes(t))})))))}if(!c.length)throw new Error("There should always be at least one route in the navigation state.");var b=c.reduce((function(n,r){return n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n}),{});return{routes:c,previousRoutes:e.state.routes,previousDescriptors:e.descriptors,openingRouteKeys:u,closingRouteKeys:h,replacingRouteKeys:d,descriptors:b}}}]),n}(u.Component),Jt=C.a.create({container:{flex:1}}),$t=["initialRouteName","children","screenOptions"];function en(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?en(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):en(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nn(){return(nn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.a=Object(d.createNavigatorFactory)((function(e){var t=e.initialRouteName,n=e.children,r=e.screenOptions,i=c()(e,$t),o={gestureEnabled:"ios"===h.a.OS,animationEnabled:"web"!==h.a.OS&&"windows"!==h.a.OS&&"macos"!==h.a.OS},a=Object(d.useNavigationBuilder)(d.StackRouter,{initialRouteName:t,children:n,screenOptions:"function"===typeof r?function(){return tn(tn({},o),r.apply(void 0,arguments))}:tn(tn({},o),r)}),s=a.state,l=a.descriptors,f=a.navigation;return u.useEffect((function(){var e;return null===(e=f.addListener)||void 0===e?void 0:e.call(f,"tabPress",(function(e){var t=f.isFocused();requestAnimationFrame((function(){s.index>0&&t&&!e.defaultPrevented&&f.dispatch(tn(tn({},d.StackActions.popToTop()),{},{target:s.key}))}))}))}),[f,s.index,s.key]),u.createElement(Zt,nn({},i,{state:s,descriptors:l,navigation:f}))}))},function(e,t,n){"use strict";function r(e,t,n){if(isNaN(t))return e;var r,i,o,a,s,l,c=e._root,u={data:n},h=e._x0,d=e._x1;if(!c)return e._root=u,e;for(;c.length;)if((a=t>=(i=(h+d)/2))?h=i:d=i,r=c,!(c=c[s=+a]))return r[s]=u,e;if(t===(o=+e._x.call(null,c.data)))return u.next=c,r?r[s]=u:e._root=u,e;do{r=r?r[s]=new Array(2):e._root=new Array(2),(a=t>=(i=(h+d)/2))?h=i:d=i}while((s=+a)===(l=+(o>=i)));return r[l]=c,r[s]=u,e}var i=function(e,t,n){this.node=e,this.x0=t,this.x1=n};function o(e){return e[0]}function a(e,t){var n=new s(null==t?o:t,NaN,NaN);return null==e?n:n.addAll(e)}function s(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function l(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var c=a.prototype=s.prototype;c.copy=function(){var e,t,n=new s(this._x,this._x0,this._x1),r=this._root;if(!r)return n;if(!r.length)return n._root=l(r),n;for(e=[{source:r,target:n._root=new Array(2)}];r=e.pop();)for(var i=0;i<2;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(2)}):r.target[i]=l(t));return n},c.add=function(e){var t=+this._x.call(null,e);return r(this.cover(t),t,e)},c.addAll=function(e){var t,n,i=e.length,o=new Array(i),a=1/0,s=-1/0;for(t=0;t<i;++t)isNaN(n=+this._x.call(null,e[t]))||(o[t]=n,n<a&&(a=n),n>s&&(s=n));if(a>s)return this;for(this.cover(a).cover(s),t=0;t<i;++t)r(this,o[t],e[t]);return this},c.cover=function(e){if(isNaN(e=+e))return this;var t=this._x0,n=this._x1;if(isNaN(t))n=(t=Math.floor(e))+1;else{for(var r,i,o=n-t||1,a=this._root;t>e||e>=n;)switch(i=+(e<t),(r=new Array(2))[i]=a,a=r,o*=2,i){case 0:n=t+o;break;case 1:t=n-o}this._root&&this._root.length&&(this._root=a)}return this._x0=t,this._x1=n,this},c.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},c.extent=function(e){return arguments.length?this.cover(+e[0][0]).cover(+e[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},c.find=function(e,t){var n,r,o,a,s,l=this._x0,c=this._x1,u=[],h=this._root;for(h&&u.push(new i(h,l,c)),null==t?t=1/0:(l=e-t,c=e+t);a=u.pop();)if(!(!(h=a.node)||(r=a.x0)>c||(o=a.x1)<l))if(h.length){var d=(r+o)/2;u.push(new i(h[1],d,o),new i(h[0],r,d)),(s=+(e>=d))&&(a=u[u.length-1],u[u.length-1]=u[u.length-1-s],u[u.length-1-s]=a)}else{var f=Math.abs(e-+this._x.call(null,h.data));f<t&&(t=f,l=e-f,c=e+f,n=h.data)}return n},c.remove=function(e){if(isNaN(o=+this._x.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u=this._root,h=this._x0,d=this._x1;if(!u)return this;if(u.length)for(;;){if((s=o>=(a=(h+d)/2))?h=a:d=a,t=u,!(u=u[l=+s]))return this;if(!u.length)break;t[l+1&1]&&(n=t,c=l)}for(;u.data!==e;)if(r=u,!(u=u.next))return this;return(i=u.next)&&delete u.next,r?(i?r.next=i:delete r.next,this):t?(i?t[l]=i:delete t[l],(u=t[0]||t[1])&&u===(t[1]||t[0])&&!u.length&&(n?n[c]=u:this._root=u),this):(this._root=i,this)},c.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},c.root=function(){return this._root},c.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},c.visit=function(e){var t,n,r,o,a=[],s=this._root;for(s&&a.push(new i(s,this._x0,this._x1));t=a.pop();)if(!e(s=t.node,r=t.x0,o=t.x1)&&s.length){var l=(r+o)/2;(n=s[1])&&a.push(new i(n,l,o)),(n=s[0])&&a.push(new i(n,r,l))}return this},c.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._x1));t=n.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.x1,c=(s+l)/2;(a=o[0])&&n.push(new i(a,s,c)),(a=o[1])&&n.push(new i(a,c,l))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.x1);return this},c.x=function(e){return arguments.length?(this._x=e,this):this._x};var u=n(468);function h(e,t,n,r,i){if(isNaN(t)||isNaN(n)||isNaN(r))return e;var o,a,s,l,c,u,h,d,f,p,m,g,v=e._root,y={data:i},b=e._x0,w=e._y0,x=e._z0,_=e._x1,E=e._y1,A=e._z1;if(!v)return e._root=y,e;for(;v.length;)if((d=t>=(a=(b+_)/2))?b=a:_=a,(f=n>=(s=(w+E)/2))?w=s:E=s,(p=r>=(l=(x+A)/2))?x=l:A=l,o=v,!(v=v[m=p<<2|f<<1|d]))return o[m]=y,e;if(c=+e._x.call(null,v.data),u=+e._y.call(null,v.data),h=+e._z.call(null,v.data),t===c&&n===u&&r===h)return y.next=v,o?o[m]=y:e._root=y,e;do{o=o?o[m]=new Array(8):e._root=new Array(8),(d=t>=(a=(b+_)/2))?b=a:_=a,(f=n>=(s=(w+E)/2))?w=s:E=s,(p=r>=(l=(x+A)/2))?x=l:A=l}while((m=p<<2|f<<1|d)===(g=(h>=l)<<2|(u>=s)<<1|c>=a));return o[g]=v,o[m]=y,e}var d=function(e,t,n,r,i,o,a){this.node=e,this.x0=t,this.y0=n,this.z0=r,this.x1=i,this.y1=o,this.z1=a};function f(e){return e[0]}function p(e){return e[1]}function m(e){return e[2]}function g(e,t,n,r){var i=new v(null==t?f:t,null==n?p:n,null==r?m:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function v(e,t,n,r,i,o,a,s,l){this._x=e,this._y=t,this._z=n,this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=s,this._z1=l,this._root=void 0}function y(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var b=g.prototype=v.prototype;b.copy=function(){var e,t,n=new v(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),r=this._root;if(!r)return n;if(!r.length)return n._root=y(r),n;for(e=[{source:r,target:n._root=new Array(8)}];r=e.pop();)for(var i=0;i<8;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(8)}):r.target[i]=y(t));return n},b.add=function(e){var t=+this._x.call(null,e),n=+this._y.call(null,e),r=+this._z.call(null,e);return h(this.cover(t,n,r),t,n,r,e)},b.addAll=function(e){var t,n,r,i,o,a=e.length,s=new Array(a),l=new Array(a),c=new Array(a),u=1/0,d=1/0,f=1/0,p=-1/0,m=-1/0,g=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,t=e[n]))||isNaN(i=+this._y.call(null,t))||isNaN(o=+this._z.call(null,t))||(s[n]=r,l[n]=i,c[n]=o,r<u&&(u=r),r>p&&(p=r),i<d&&(d=i),i>m&&(m=i),o<f&&(f=o),o>g&&(g=o));if(u>p||d>m||f>g)return this;for(this.cover(u,d,f).cover(p,m,g),n=0;n<a;++n)h(this,s[n],l[n],c[n],e[n]);return this},b.cover=function(e,t,n){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(n=+n))return this;var r=this._x0,i=this._y0,o=this._z0,a=this._x1,s=this._y1,l=this._z1;if(isNaN(r))a=(r=Math.floor(e))+1,s=(i=Math.floor(t))+1,l=(o=Math.floor(n))+1;else{for(var c,u,h=a-r||1,d=this._root;r>e||e>=a||i>t||t>=s||o>n||n>=l;)switch(u=(n<o)<<2|(t<i)<<1|e<r,(c=new Array(8))[u]=d,d=c,h*=2,u){case 0:a=r+h,s=i+h,l=o+h;break;case 1:r=a-h,s=i+h,l=o+h;break;case 2:a=r+h,i=s-h,l=o+h;break;case 3:r=a-h,i=s-h,l=o+h;break;case 4:a=r+h,s=i+h,o=l-h;break;case 5:r=a-h,s=i+h,o=l-h;break;case 6:a=r+h,i=s-h,o=l-h;break;case 7:r=a-h,i=s-h,o=l-h}this._root&&this._root.length&&(this._root=d)}return this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=s,this._z1=l,this},b.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},b.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},b.find=function(e,t,n,r){var i,o,a,s,l,c,u,h,f,p=this._x0,m=this._y0,g=this._z0,v=this._x1,y=this._y1,b=this._z1,w=[],x=this._root;for(x&&w.push(new d(x,p,m,g,v,y,b)),null==r?r=1/0:(p=e-r,m=t-r,g=n-r,v=e+r,y=t+r,b=n+r,r*=r);h=w.pop();)if(!(!(x=h.node)||(o=h.x0)>v||(a=h.y0)>y||(s=h.z0)>b||(l=h.x1)<p||(c=h.y1)<m||(u=h.z1)<g))if(x.length){var _=(o+l)/2,E=(a+c)/2,A=(s+u)/2;w.push(new d(x[7],_,E,A,l,c,u),new d(x[6],o,E,A,_,c,u),new d(x[5],_,a,A,l,E,u),new d(x[4],o,a,A,_,E,u),new d(x[3],_,E,s,l,c,A),new d(x[2],o,E,s,_,c,A),new d(x[1],_,a,s,l,E,A),new d(x[0],o,a,s,_,E,A)),(f=(n>=A)<<2|(t>=E)<<1|e>=_)&&(h=w[w.length-1],w[w.length-1]=w[w.length-1-f],w[w.length-1-f]=h)}else{var S=e-+this._x.call(null,x.data),M=t-+this._y.call(null,x.data),T=n-+this._z.call(null,x.data),C=S*S+M*M+T*T;if(C<r){var O=Math.sqrt(r=C);p=e-O,m=t-O,g=n-O,v=e+O,y=t+O,b=n+O,i=x.data}}return i},b.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e))||isNaN(s=+this._z.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u,h,d,f,p,m,g=this._root,v=this._x0,y=this._y0,b=this._z0,w=this._x1,x=this._y1,_=this._z1;if(!g)return this;if(g.length)for(;;){if((h=o>=(l=(v+w)/2))?v=l:w=l,(d=a>=(c=(y+x)/2))?y=c:x=c,(f=s>=(u=(b+_)/2))?b=u:_=u,t=g,!(g=g[p=f<<2|d<<1|h]))return this;if(!g.length)break;(t[p+1&7]||t[p+2&7]||t[p+3&7]||t[p+4&7]||t[p+5&7]||t[p+6&7]||t[p+7&7])&&(n=t,m=p)}for(;g.data!==e;)if(r=g,!(g=g.next))return this;return(i=g.next)&&delete g.next,r?(i?r.next=i:delete r.next,this):t?(i?t[p]=i:delete t[p],(g=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&g===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!g.length&&(n?n[m]=g:this._root=g),this):(this._root=i,this)},b.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},b.root=function(){return this._root},b.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},b.visit=function(e){var t,n,r,i,o,a,s,l,c=[],u=this._root;for(u&&c.push(new d(u,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=c.pop();)if(!e(u=t.node,r=t.x0,i=t.y0,o=t.z0,a=t.x1,s=t.y1,l=t.z1)&&u.length){var h=(r+a)/2,f=(i+s)/2,p=(o+l)/2;(n=u[7])&&c.push(new d(n,h,f,p,a,s,l)),(n=u[6])&&c.push(new d(n,r,f,p,h,s,l)),(n=u[5])&&c.push(new d(n,h,i,p,a,f,l)),(n=u[4])&&c.push(new d(n,r,i,p,h,f,l)),(n=u[3])&&c.push(new d(n,h,f,o,a,s,p)),(n=u[2])&&c.push(new d(n,r,f,o,h,s,p)),(n=u[1])&&c.push(new d(n,h,i,o,a,f,p)),(n=u[0])&&c.push(new d(n,r,i,o,h,f,p))}return this},b.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new d(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=n.pop();){var i=t.node;if(i.length){var o,a=t.x0,s=t.y0,l=t.z0,c=t.x1,u=t.y1,h=t.z1,f=(a+c)/2,p=(s+u)/2,m=(l+h)/2;(o=i[0])&&n.push(new d(o,a,s,l,f,p,m)),(o=i[1])&&n.push(new d(o,f,s,l,c,p,m)),(o=i[2])&&n.push(new d(o,a,p,l,f,u,m)),(o=i[3])&&n.push(new d(o,f,p,l,c,u,m)),(o=i[4])&&n.push(new d(o,a,s,m,f,p,h)),(o=i[5])&&n.push(new d(o,f,s,m,c,p,h)),(o=i[6])&&n.push(new d(o,a,p,m,f,u,h)),(o=i[7])&&n.push(new d(o,f,p,m,c,u,h))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.z0,t.x1,t.y1,t.z1);return this},b.x=function(e){return arguments.length?(this._x=e,this):this._x},b.y=function(e){return arguments.length?(this._y=e,this):this._y},b.z=function(e){return arguments.length?(this._z=e,this):this._z};var w=n(59),x=n(62),_=n(83);t.a=function(){var e,t,n,r,i,o,s=Object(w.a)(-30),l=1,c=1/0,h=.81;function d(r){var o,s=e.length,l=(1===t?a(e,_.b):2===t?Object(u.a)(e,_.b,_.c):3===t?g(e,_.b,_.c,_.d):null).visitAfter(p);for(i=r,o=0;o<s;++o)n=e[o],l.visit(m)}function f(){if(e){var t,n,r=e.length;for(o=new Array(r),t=0;t<r;++t)n=e[t],o[n.index]=+s(n,t,e)}}function p(e){var n,r,i,a,s,l,c=0,u=0,h=e.length;if(h){for(i=a=s=l=0;l<h;++l)(n=e[l])&&(r=Math.abs(n.value))&&(c+=n.value,u+=r,i+=r*(n.x||0),a+=r*(n.y||0),s+=r*(n.z||0));c*=Math.sqrt(4/h),e.x=i/u,t>1&&(e.y=a/u),t>2&&(e.z=s/u)}else{(n=e).x=n.data.x,t>1&&(n.y=n.data.y),t>2&&(n.z=n.data.z);do{c+=o[n.data.index]}while(n=n.next)}e.value=c}function m(e,a,s,u,d){if(!e.value)return!0;var f=[s,u,d][t-1],p=e.x-n.x,m=t>1?e.y-n.y:0,g=t>2?e.z-n.z:0,v=f-a,y=p*p+m*m+g*g;if(v*v/h<y)return y<c&&(0===p&&(y+=(p=Object(x.a)(r))*p),t>1&&0===m&&(y+=(m=Object(x.a)(r))*m),t>2&&0===g&&(y+=(g=Object(x.a)(r))*g),y<l&&(y=Math.sqrt(l*y)),n.vx+=p*e.value*i/y,t>1&&(n.vy+=m*e.value*i/y),t>2&&(n.vz+=g*e.value*i/y)),!0;if(!(e.length||y>=c)){(e.data!==n||e.next)&&(0===p&&(y+=(p=Object(x.a)(r))*p),t>1&&0===m&&(y+=(m=Object(x.a)(r))*m),t>2&&0===g&&(y+=(g=Object(x.a)(r))*g),y<l&&(y=Math.sqrt(l*y)));do{e.data!==n&&(v=o[e.data.index]*i/y,n.vx+=p*v,t>1&&(n.vy+=m*v),t>2&&(n.vz+=g*v))}while(e=e.next)}}return d.initialize=function(n,...i){e=n,r=i.find(e=>"function"===typeof e)||Math.random,t=i.find(e=>[1,2,3].includes(e))||2,f()},d.strength=function(e){return arguments.length?(s="function"===typeof e?e:Object(w.a)(+e),f(),d):s},d.distanceMin=function(e){return arguments.length?(l=e*e,d):Math.sqrt(l)},d.distanceMax=function(e){return arguments.length?(c=e*e,d):Math.sqrt(c)},d.theta=function(e){return arguments.length?(h=e*e,d):Math.sqrt(h)},d}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));function r(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o,a,s,l,c,u,h,d,f=e._root,p={data:r},m=e._x0,g=e._y0,v=e._x1,y=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(o=(m+v)/2))?m=o:v=o,(u=n>=(a=(g+y)/2))?g=a:y=a,i=f,!(f=f[h=u<<1|c]))return i[h]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&n===l)return p.next=f,i?i[h]=p:e._root=p,e;do{i=i?i[h]=new Array(4):e._root=new Array(4),(c=t>=(o=(m+v)/2))?m=o:v=o,(u=n>=(a=(g+y)/2))?g=a:y=a}while((h=u<<1|c)===(d=(l>=a)<<1|s>=o));return i[d]=f,i[h]=p,e}var i=function(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i};function o(e){return e[0]}function a(e){return e[1]}function s(e,t,n){var r=new l(null==t?o:t,null==n?a:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function l(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function c(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var u=s.prototype=l.prototype;u.copy=function(){var e,t,n=new l(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=c(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=c(t));return n},u.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return r(this.cover(t,n),t,n,e)},u.addAll=function(e){var t,n,i,o,a=e.length,s=new Array(a),l=new Array(a),c=1/0,u=1/0,h=-1/0,d=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(s[n]=i,l[n]=o,i<c&&(c=i),i>h&&(h=i),o<u&&(u=o),o>d&&(d=o));if(c>h||u>d)return this;for(this.cover(c,u).cover(h,d),n=0;n<a;++n)r(this,s[n],l[n],e[n]);return this},u.cover=function(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a,s,l=i-n||1,c=this._root;n>e||e>=i||r>t||t>=o;)switch(s=(t<r)<<1|e<n,(a=new Array(4))[s]=c,c=a,l*=2,s){case 0:i=n+l,o=r+l;break;case 1:n=i-l,o=r+l;break;case 2:i=n+l,r=o-l;break;case 3:n=i-l,r=o-l}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},u.data=function(){var e=[];return this.visit((function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)})),e},u.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},u.find=function(e,t,n){var r,o,a,s,l,c,u,h=this._x0,d=this._y0,f=this._x1,p=this._y1,m=[],g=this._root;for(g&&m.push(new i(g,h,d,f,p)),null==n?n=1/0:(h=e-n,d=t-n,f=e+n,p=t+n,n*=n);c=m.pop();)if(!(!(g=c.node)||(o=c.x0)>f||(a=c.y0)>p||(s=c.x1)<h||(l=c.y1)<d))if(g.length){var v=(o+s)/2,y=(a+l)/2;m.push(new i(g[3],v,y,s,l),new i(g[2],o,y,v,l),new i(g[1],v,a,s,y),new i(g[0],o,a,v,y)),(u=(t>=y)<<1|e>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var b=e-+this._x.call(null,g.data),w=t-+this._y.call(null,g.data),x=b*b+w*w;if(x<n){var _=Math.sqrt(n=x);h=e-_,d=t-_,f=e+_,p=t+_,r=g.data}}return r},u.remove=function(e){if(isNaN(o=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e)))return this;var t,n,r,i,o,a,s,l,c,u,h,d,f=this._root,p=this._x0,m=this._y0,g=this._x1,v=this._y1;if(!f)return this;if(f.length)for(;;){if((c=o>=(s=(p+g)/2))?p=s:g=s,(u=a>=(l=(m+v)/2))?m=l:v=l,t=f,!(f=f[h=u<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(n=t,d=h)}for(;f.data!==e;)if(r=f,!(f=f.next))return this;return(i=f.next)&&delete f.next,r?(i?r.next=i:delete r.next,this):t?(i?t[h]=i:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(n?n[d]=f:this._root=f),this):(this._root=i,this)},u.removeAll=function(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},u.root=function(){return this._root},u.size=function(){var e=0;return this.visit((function(t){if(!t.length)do{++e}while(t=t.next)})),e},u.visit=function(e){var t,n,r,o,a,s,l=[],c=this._root;for(c&&l.push(new i(c,this._x0,this._y0,this._x1,this._y1));t=l.pop();)if(!e(c=t.node,r=t.x0,o=t.y0,a=t.x1,s=t.y1)&&c.length){var u=(r+a)/2,h=(o+s)/2;(n=c[3])&&l.push(new i(n,u,h,a,s)),(n=c[2])&&l.push(new i(n,r,h,u,s)),(n=c[1])&&l.push(new i(n,u,o,a,h)),(n=c[0])&&l.push(new i(n,r,o,u,h))}return this},u.visitAfter=function(e){var t,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));t=n.pop();){var o=t.node;if(o.length){var a,s=t.x0,l=t.y0,c=t.x1,u=t.y1,h=(s+c)/2,d=(l+u)/2;(a=o[0])&&n.push(new i(a,s,l,h,d)),(a=o[1])&&n.push(new i(a,h,l,c,d)),(a=o[2])&&n.push(new i(a,s,d,h,u)),(a=o[3])&&n.push(new i(a,h,d,c,u))}r.push(t)}for(;t=r.pop();)e(t.node,t.x0,t.y0,t.x1,t.y1);return this},u.x=function(e){return arguments.length?(this._x=e,this):this._x},u.y=function(e){return arguments.length?(this._y=e,this):this._y}},function(e,t,n){"use strict";var r=n(468),i=function(e){return function(){return e}},o=function(e){return 1e-6*(e()-.5)};function a(e){return e.x+e.vx}function s(e){return e.y+e.vy}t.a=function(e){var t,n,l,c=1,u=1;function h(){for(var e,i,h,f,p,m,g,v=t.length,y=0;y<u;++y)for(i=Object(r.a)(t,a,s).visitAfter(d),e=0;e<v;++e)h=t[e],m=n[h.index],g=m*m,f=h.x+h.vx,p=h.y+h.vy,i.visit(b);function b(e,t,n,r,i){var a=e.data,s=e.r,u=m+s;if(!a)return t>f+u||r<f-u||n>p+u||i<p-u;if(a.index>h.index){var d=f-a.x-a.vx,v=p-a.y-a.vy,y=d*d+v*v;y<u*u&&(0===d&&(y+=(d=o(l))*d),0===v&&(y+=(v=o(l))*v),y=(u-(y=Math.sqrt(y)))/y*c,h.vx+=(d*=y)*(u=(s*=s)/(g+s)),h.vy+=(v*=y)*u,a.vx-=d*(u=1-u),a.vy-=v*u)}}}function d(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function f(){if(t){var r,i,o=t.length;for(n=new Array(o),r=0;r<o;++r)i=t[r],n[i.index]=+e(i,r,t)}}return"function"!==typeof e&&(e=i(null==e?1:+e)),h.initialize=function(e,n){t=e,l=n,f()},h.iterations=function(e){return arguments.length?(u=+e,h):u},h.strength=function(e){return arguments.length?(c=+e,h):c},h.radius=function(t){return arguments.length?(e="function"===typeof t?t:i(+t),f(),h):e},h}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));class r extends Map{constructor(e,t=s){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(i(this,e))}has(e){return super.has(i(this,e))}set(e,t){return super.set(o(this,e),t)}delete(e){return super.delete(a(this,e))}}Set;function i({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function o({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function a({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function s(e){return null!==e&&"object"===typeof e?e.valueOf():e}function l(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const c=Symbol("implicit");function u(){var e=new r,t=[],n=[],i=c;function o(r){let o=e.get(r);if(void 0===o){if(i!==c)return i;e.set(r,o=t.push(r)-1)}return n[o%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new r;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(i=e,o):i},o.copy=function(){return u(t,n).unknown(i)},l.apply(o,arguments),o}},function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return b})),n.d(t,"a",(function(){return w}));var r=n(9),i=n.n(r),o=n(0),a=n(33),s=n(5),l=n(2),c={WebkitTransition:"webkitTransitionEnd",Transition:"transitionEnd",MozTransition:"transitionend",MSTransition:"msTransitionEnd",OTransition:"oTransitionEnd"};function u(e){var t=e.children,n=e.style,r=e.onInsetsChange;return o.useEffect((function(){if("undefined"!==typeof document){var e=function(){var e=document.createElement("div"),t=e.style;return t.position="fixed",t.left="0",t.top="0",t.width="0",t.height="0",t.zIndex="-1",t.overflow="hidden",t.visibility="hidden",t.transitionDuration="0.05s",t.transitionProperty="padding",t.transitionDelay="0s",t.paddingTop=p("top"),t.paddingBottom=p("bottom"),t.paddingLeft=p("left"),t.paddingRight=p("right"),e}();document.body.appendChild(e);var t=function(){var t=window.getComputedStyle(e),n=t.paddingTop,i=t.paddingBottom,o=t.paddingLeft,a=t.paddingRight,s={top:n?parseInt(n,10):0,bottom:i?parseInt(i,10):0,left:o?parseInt(o,10):0,right:a?parseInt(a,10):0},l={x:0,y:0,width:document.documentElement.offsetWidth,height:document.documentElement.offsetHeight};r({nativeEvent:{insets:s,frame:l}})};return e.addEventListener(d(),t),t(),function(){document.body.removeChild(e),e.removeEventListener(d(),t)}}}),[r]),o.createElement(l.a,{style:n},t)}var h=null;function d(){if(null!==h)return h;var e=document.createElement("invalidtype");for(var t in h=c.Transition,c)if(void 0!==e.style[t]){h=c[t];break}return h}var f=null;function p(e){return"".concat(function(){if(null!==f)return f;var e=window.CSS;return f=e&&e.supports&&e.supports("top: constant(safe-area-inset-top)")?"constant":"env"}(),"(safe-area-inset-").concat(e,")")}var m=o.createContext(null),g=o.createContext(null);function v(e){var t,n,r,s,l,c=e.children,h=e.initialMetrics,d=e.initialSafeAreaInsets,f=e.style,p=o.useContext(m),v=o.useContext(g),b=o.useState(null!==(t=null!==(n=null!==(r=null===h||void 0===h?void 0:h.insets)&&void 0!==r?r:d)&&void 0!==n?n:p)&&void 0!==t?t:null),w=i()(b,2),x=w[0],_=w[1],E=o.useState(null!==(s=null!==(l=null===h||void 0===h?void 0:h.frame)&&void 0!==l?l:v)&&void 0!==s?s:{x:0,y:0,width:a.a.get("window").width,height:a.a.get("window").height}),A=i()(E,2),S=A[0],M=A[1],T=o.useCallback((function(e){var t=e.nativeEvent,n=t.frame,r=t.insets;!n||n.height===S.height&&n.width===S.width&&n.x===S.x&&n.y===S.y||M(n),x&&r.bottom===x.bottom&&r.left===x.left&&r.right===x.right&&r.top===x.top||_(r)}),[S,x]);return o.createElement(u,{style:[y.fill,f],onInsetsChange:T},null!=x?o.createElement(g.Provider,{value:S},o.createElement(m.Provider,{value:x},c)):null)}var y=s.a.create({fill:{flex:1}});function b(){var e=o.useContext(m);if(null==e)throw new Error("No safe area insets value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.");return e}var w=m.Consumer},function(e,t,n){"use strict";t.a=function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928")}]]); +//# sourceMappingURL=2.76477044.chunk.js.map
\ No newline at end of file diff --git a/web-build/static/js/2.76477044.chunk.js.LICENSE.txt b/web-build/static/js/2.76477044.chunk.js.LICENSE.txt new file mode 100644 index 0000000..03ba9cb --- /dev/null +++ b/web-build/static/js/2.76477044.chunk.js.LICENSE.txt @@ -0,0 +1,220 @@ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +/*! + * Determine if an object is a Buffer + * + * @author Feross Aboukhadijeh <https://feross.org> + * @license MIT + */ + +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh <[email protected]> <http://feross.org> + * @license MIT + */ + +/*! (C) WebReflection Mit Style License */ + +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ + +/*! fromentries. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ + +/** + * @license + * Copyright 2010-2021 Three.js Authors + * SPDX-License-Identifier: MIT + */ + +/** + * @license + * cardboard-vr-display + * Copyright (c) 2015-2017 Google + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * gl-preserve-state + * Copyright (c) 2016, Brandon Jones. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * @license + * nosleep.js + * Copyright (c) 2017, Rich Tibbett + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** + * @license + * webvr-polyfill + * Copyright (c) 2015-2017 Google + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * webvr-polyfill-dpdb + * Copyright (c) 2015-2017 Google + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * webvr-polyfill-dpdb + * Copyright (c) 2017 Google + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @license + * wglu-preserve-state + * Copyright (c) 2016, Brandon Jones. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +/** @license React v0.20.2 + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v16.13.1 + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +/** @license React v17.0.2 + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ diff --git a/web-build/static/js/2.76477044.chunk.js.map b/web-build/static/js/2.76477044.chunk.js.map new file mode 100644 index 0000000..284a698 --- /dev/null +++ b/web-build/static/js/2.76477044.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["node_modules/react/index.js","node_modules/prop-types/index.js","node_modules/react-native-web/dist/exports/View/index.js","node_modules/three/build/three.module.js","node_modules/react-native-web/node_modules/fbjs/lib/invariant.js","node_modules/react-native-web/dist/exports/StyleSheet/StyleSheet.js","node_modules/react-native-web/dist/exports/StyleSheet/index.js","node_modules/@babel/runtime/helpers/defineProperty.js","node_modules/@babel/runtime/regenerator/index.js","node_modules/react-native-web/dist/exports/Platform/index.js","node_modules/@babel/runtime/helpers/slicedToArray.js","node_modules/mobx/dist/mobx.esm.js","node_modules/accessor-fn/dist/accessor-fn.module.js","node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedEvent.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedTransform.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedStyle.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedProps.js","node_modules/react-native-web/dist/vendor/react-native/Utilities/setAndForwardRef.js","node_modules/react-native-web/dist/vendor/react-native/Animated/createAnimatedComponent.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedFlatList.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedImage.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedScrollView.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedSectionList.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedText.js","node_modules/react-native-web/dist/vendor/react-native/Animated/components/AnimatedView.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedAddition.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDivision.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedModulo.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedMultiplication.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedSubtraction.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedTracking.js","node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedImplementation.js","node_modules/react-native-web/dist/vendor/react-native/Animated/AnimatedMock.js","node_modules/react-native-web/dist/vendor/react-native/Animated/Animated.js","node_modules/react-native-web/dist/exports/Animated/index.js","node_modules/react-native-web/node_modules/fbjs/lib/ExecutionEnvironment.js","node_modules/react-native-web/dist/vendor/react-native/Animated/bezier.js","node_modules/react-native-web/dist/vendor/react-native/Animated/Easing.js","node_modules/react-native-web/dist/exports/Easing/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedHelper.js","node_modules/@babel/runtime/helpers/assertThisInitialized.js","node_modules/@babel/runtime/helpers/objectWithoutProperties.js","node_modules/@babel/runtime/helpers/getPrototypeOf.js","node_modules/@babel/runtime/helpers/extends.js","node_modules/@babel/runtime/helpers/classCallCheck.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedNode.js","node_modules/@babel/runtime/helpers/toConsumableArray.js","node_modules/@babel/runtime/helpers/createClass.js","node_modules/@babel/runtime/helpers/inherits.js","node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValue.js","node_modules/react-native-web/dist/modules/forwardedProps/index.js","node_modules/react-native-web/dist/modules/setValueForStyles/dangerousStyleValue.js","node_modules/react-native-web/dist/modules/setValueForStyles/index.js","node_modules/react-native-web/dist/exports/UIManager/index.js","index.tsx","node_modules/mobx-state-tree/dist/mobx-state-tree.module.js","node_modules/react-native-web/dist/exports/createElement/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedWithChildren.js","node_modules/react-native-web/dist/exports/Dimensions/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedInterpolation.js","node_modules/react-native-web/dist/exports/I18nManager/index.js","node_modules/react-native-web/dist/modules/useMergeRefs/index.js","node_modules/react-native-web/dist/modules/AssetRegistry/index.js","node_modules/react-native-web/dist/modules/ImageLoader/index.js","node_modules/react-native-web/dist/exports/Image/index.js","node_modules/ramda/src/internal/_curry2.js","NavigationBuilderContext.tsx","node_modules/nanoid/non-secure/index.js","node_modules/react-native-web/dist/exports/StyleSheet/constants.js","../../../.local/share/nvm/v15.12.0/lib/node_modules/expo-cli/node_modules/webpack/buildin/global.js","NavigationRouteContext.tsx","node_modules/react-native-web/dist/exports/TouchableOpacity/index.js","node_modules/react-native-web/dist/exports/findNodeHandle/index.js","node_modules/react-native-web/dist/exports/StyleSheet/normalizeValueWithProperty.js","node_modules/axios/lib/utils.js","node_modules/react-native-web/dist/modules/ScrollResponder/index.js","node_modules/react-native-web/dist/exports/ScrollView/ScrollViewBase.js","node_modules/react-native-web/dist/exports/ScrollView/index.js","node_modules/kapsule/dist/kapsule.module.js","node_modules/react-native-web/dist/modules/requestIdleCallback/index.js","node_modules/react-native-web/dist/exports/InteractionManager/index.js","node_modules/ramda/src/internal/_curry1.js","node_modules/react-native-web/dist/exports/Text/index.js","NavigationContext.tsx","node_modules/mobx-react-lite/es/utils/assertEnvironment.js","node_modules/mobx-react-lite/es/utils/observerBatching.js","node_modules/mobx-react-lite/es/utils/utils.js","node_modules/mobx-react-lite/es/utils/printDebugValue.js","node_modules/mobx-react-lite/es/utils/FinalizationRegistryWrapper.js","node_modules/mobx-react-lite/es/utils/reactionCleanupTrackingCommon.js","node_modules/mobx-react-lite/es/utils/createTimerBasedReactionCleanupTracking.js","node_modules/mobx-react-lite/es/utils/reactionCleanupTracking.js","node_modules/mobx-react-lite/es/utils/createReactionCleanupTrackingUsingFinalizationRegister.js","node_modules/mobx-react-lite/es/staticRendering.js","node_modules/mobx-react-lite/es/useObserver.js","node_modules/mobx-react-lite/es/observer.js","node_modules/mobx-react-lite/es/useAsObservableSource.js","node_modules/mobx-react-lite/es/index.js","node_modules/react-native-web/dist/exports/TextInput/index.js","node_modules/react-native-web/dist/modules/TextInputState/index.js","node_modules/d3-force-3d/src/constant.js","node_modules/@tweenjs/tween.js/dist/tween.esm.js","node_modules/react-dom/index.js","node_modules/d3-force-3d/src/jiggle.js","node_modules/react-native-web/dist/exports/StyleSheet/css.js","node_modules/react-native-web/dist/modules/UnimplementedView/index.js","AsyncStorage.js","index.js","node_modules/react-native-web/dist/modules/useLayoutEffect/index.js","NavigationStateContext.tsx","node_modules/react-native-web/dist/vendor/react-native/emitter/_EmitterSubscription.js","node_modules/react-native-web/dist/vendor/react-native/emitter/_EventSubscription.js","node_modules/react-native-web/dist/vendor/react-native/emitter/_EventSubscriptionVendor.js","node_modules/react-native-web/dist/vendor/react-native/emitter/_EventEmitter.js","node_modules/react-native-web/dist/vendor/react-native/emitter/EventEmitter.js","node_modules/react-native-web/dist/vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter.js","node_modules/@react-native-community/slider/dist/Slider.js","useNavigation.tsx","node_modules/react-native-web/dist/vendor/react-native/deepDiffer/index.js","node_modules/react-native-web/dist/vendor/react-native/FlatList/index.js","node_modules/react-native-web/dist/exports/FlatList/index.js","node_modules/react-native-web/dist/modules/pick/index.js","node_modules/react-native-web/dist/modules/usePlatformMethods/index.js","node_modules/react-native-web/dist/modules/usePressEvents/PressResponder.js","node_modules/react-native-web/dist/modules/usePressEvents/index.js","node_modules/react-native-web/dist/vendor/react-native/Batchinator/index.js","node_modules/react-native-web/dist/vendor/react-native/ViewabilityHelper/index.js","node_modules/react-native-web/dist/vendor/react-native/infoLog/index.js","node_modules/react-native-web/dist/vendor/react-native/VirtualizeUtils/index.js","node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/VirtualizedListContext.js","node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js","node_modules/react-native-web/dist/exports/StatusBar/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedValueXY.js","node_modules/react-native-web/dist/exports/BackHandler/index.js","node_modules/react-native-web/dist/exports/Text/TextAncestorContext.js","node_modules/react-native-web/dist/exports/StyleSheet/flattenStyle.js","node_modules/fbjs/lib/ExecutionEnvironment.js","node_modules/d3-force-3d/src/lcg.js","node_modules/d3-force-3d/src/simulation.js","node_modules/ngraph.forcelayout/lib/codeGenerators/createPatternBuilder.js","node_modules/ramda/src/internal/_arity.js","types.tsx","DefaultTheme.tsx","node_modules/react-native-web/dist/modules/useElementLayout/index.js","node_modules/normalize-css-color/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/animations/Animation.js","node_modules/react-native-web/dist/exports/Switch/index.js","node_modules/react-native-web/dist/exports/TouchableNativeFeedback/index.js","EnsureSingleNavigator.tsx","node_modules/react-native-web/dist/exports/StyleSheet/createCompileableStyle.js","node_modules/react-native-web/dist/exports/StyleSheet/createOrderedCSSStyleSheet.js","node_modules/react-native-web/dist/modules/flattenArray/index.js","node_modules/react-native-web/dist/exports/StyleSheet/i18nStyle.js","node_modules/react-native-web/dist/exports/StyleSheet/createReactDOMStyle.js","node_modules/react-native-web/dist/vendor/hash/index.js","node_modules/react-native-web/dist/modules/prefixStyles/static.js","node_modules/react-native-web/dist/modules/prefixStyles/index.js","node_modules/react-native-web/dist/exports/StyleSheet/compile.js","node_modules/react-native-web/dist/exports/StyleSheet/initialRules.js","node_modules/react-native-web/dist/exports/StyleSheet/modality.js","node_modules/react-native-web/dist/exports/StyleSheet/createStyleResolver.js","node_modules/react-native-web/dist/exports/StyleSheet/styleResolver.js","node_modules/react-native-web/dist/exports/StyleSheet/createCSSStyleSheet.js","node_modules/react-native-web/dist/modules/useResponderEvents/ResponderEventTypes.js","node_modules/react-native-web/dist/modules/useResponderEvents/ResponderTouchHistoryStore.js","node_modules/react-native-web/dist/modules/useResponderEvents/createResponderEvent.js","node_modules/react-native-web/dist/modules/useResponderEvents/utils.js","node_modules/react-native-web/dist/modules/isSelectionValid/index.js","node_modules/react-native-web/dist/modules/useResponderEvents/ResponderSystem.js","node_modules/react-native-web/dist/modules/useResponderEvents/index.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/buttonLikeRoles.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAriaRole.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAccessibilityComponent.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/index.js","node_modules/react-native-web/dist/modules/AccessibilityUtil/isDisabled.js","node_modules/i18n-js/app/assets/javascripts/i18n.js","node_modules/react-native-web/dist/modules/getBoundingClientRect/index.js","node_modules/react-native-web/dist/modules/multiplyStyleLengthValue/index.js","node_modules/css-in-js-utils/lib/isPrefixedValue.js","node_modules/react-native-web/dist/exports/KeyboardAvoidingView/index.js","BaseRouter.tsx","node_modules/react-native-web/dist/exports/AppRegistry/AppContainer.js","node_modules/react-native-web/dist/exports/AppRegistry/renderApplication.js","node_modules/react-native-web/dist/exports/AppRegistry/index.js","node_modules/react-native-web/dist/modules/unitlessNumbers/index.js","node_modules/react-native-web/dist/exports/StyleSheet/ReactNativePropRegistry.js","node_modules/react-native-web/dist/modules/useStable/index.js","node_modules/index-array-by/dist/index-array-by.module.js","node_modules/tinycolor2/tinycolor.js","useRouteCache.tsx","node_modules/lodash.pick/index.js","../../../.local/share/nvm/v15.12.0/lib/node_modules/expo-cli/node_modules/process/browser.js","node_modules/ramda/src/internal/_isPlaceholder.js","node_modules/ramda/src/curryN.js","node_modules/ramda/src/internal/_has.js","node_modules/react-native-web/dist/exports/processColor/index.js","node_modules/react-native-web/dist/exports/PixelRatio/index.js","node_modules/react-native-web/dist/exports/RefreshControl/index.js","node_modules/react-native-web/dist/exports/TouchableWithoutFeedback/index.js","node_modules/react-native-web/dist/exports/render/index.js","node_modules/react-native-web/dist/exports/unmountComponentAtNode/index.js","node_modules/react-native-web/dist/exports/Keyboard/index.js","node_modules/react-native-web/dist/exports/SafeAreaView/index.js","node_modules/react-native-web/dist/exports/TouchableHighlight/index.js","CurrentRenderContext.tsx","useBackButton.tsx","ThemeProvider.tsx","node_modules/react-native-web/dist/vendor/react-native/VirtualizedSectionList/index.js","node_modules/react-native-web/dist/vendor/react-native/SectionList/index.js","node_modules/react-native-web/dist/exports/SectionList/index.js","ServerContext.tsx","useLinking.tsx","node_modules/react-native-web/dist/modules/createDOMProps/index.js","node_modules/react-native-web/dist/exports/StyleSheet/resolveShadowValue.js","node_modules/react-native-web/dist/modules/mergeRefs/index.js","node_modules/react-native-web/dist/modules/dismissKeyboard/index.js","node_modules/react-native-web/dist/vendor/react-native/TurboModule/TurboModuleRegistry.js","node_modules/react-native-web/dist/vendor/react-native/NativeEventEmitter/index.js","UnhandledActionContext.tsx","useScheduleUpdate.tsx","useChildListeners.tsx","useKeyedChildListeners.tsx","useOptionsGetters.tsx","useEventEmitter.tsx","Screen.tsx","node_modules/@react-navigation/core/node_modules/query-string/index.js","checkLegacyPathConfig.tsx","ThemeContext.tsx","node_modules/react-native-web/dist/modules/isWebColor/index.js","node_modules/react-native-web/dist/modules/normalizeColor/index.js","node_modules/data-joint/dist/data-joint.module.js","node_modules/three-forcegraph/dist/three-forcegraph.module.js","node_modules/object-assign/index.js","node_modules/ngraph.events/index.js","node_modules/@babel/runtime/helpers/setPrototypeOf.js","StackRouter.tsx","node_modules/ramda/src/internal/_curry3.js","node_modules/ramda/src/internal/_isArray.js","node_modules/ramda/src/internal/_checkForMethod.js","node_modules/ramda/src/keys.js","node_modules/react-native-web/dist/exports/AccessibilityInfo/index.js","node_modules/react-native-web/dist/exports/Alert/index.js","node_modules/react-native-web/dist/exports/Appearance/index.js","node_modules/react-native-web/dist/exports/AppState/index.js","node_modules/react-native-web/dist/exports/Clipboard/index.js","node_modules/react-native-web/dist/exports/DeviceInfo/index.js","node_modules/react-native-web/dist/vendor/react-native/LayoutAnimation/index.js","node_modules/react-native-web/dist/exports/LayoutAnimation/index.js","node_modules/react-native-web/dist/exports/Linking/index.js","node_modules/react-native-web/dist/exports/NativeEventEmitter/index.js","node_modules/react-native-web/dist/vendor/react-native/TouchHistoryMath/index.js","node_modules/react-native-web/dist/vendor/react-native/PanResponder/index.js","node_modules/react-native-web/dist/exports/PanResponder/index.js","node_modules/react-native-web/dist/exports/Share/index.js","node_modules/react-native-web/dist/exports/Vibration/index.js","node_modules/react-native-web/dist/exports/ActivityIndicator/index.js","node_modules/react-native-web/dist/exports/Button/index.js","node_modules/react-native-web/dist/exports/CheckBox/index.js","node_modules/react-native-web/dist/exports/ImageBackground/index.js","node_modules/react-native-web/dist/exports/Modal/ModalPortal.js","node_modules/react-native-web/dist/exports/Modal/ModalAnimation.js","node_modules/react-native-web/dist/exports/Modal/ModalContent.js","node_modules/react-native-web/dist/exports/Modal/ModalFocusTrap.js","node_modules/react-native-web/dist/exports/Modal/index.js","node_modules/react-native-web/dist/exports/Picker/index.js","node_modules/react-native-web/dist/exports/Picker/PickerItem.js","node_modules/react-native-web/dist/modules/createEventHandle/index.js","node_modules/react-native-web/dist/modules/modality/index.js","node_modules/react-native-web/dist/modules/useEvent/index.js","node_modules/react-native-web/dist/modules/useHover/index.js","node_modules/react-native-web/dist/exports/Pressable/index.js","node_modules/react-native-web/dist/exports/ProgressBar/index.js","node_modules/react-native-web/dist/vendor/react-native/PooledClass/index.js","node_modules/react-native-web/dist/exports/Touchable/BoundingDimensions.js","node_modules/react-native-web/dist/exports/Touchable/Position.js","node_modules/react-native-web/dist/exports/Touchable/index.js","node_modules/react-native-web/dist/exports/VirtualizedList/index.js","node_modules/react-native-web/dist/exports/YellowBox/index.js","node_modules/react-native-web/dist/exports/DrawerLayoutAndroid/index.js","node_modules/react-native-web/dist/exports/InputAccessoryView/index.js","node_modules/react-native-web/dist/exports/ToastAndroid/index.js","node_modules/react-native-web/dist/exports/PermissionsAndroid/index.js","node_modules/react-native-web/dist/exports/Settings/index.js","node_modules/react-native-web/dist/exports/Systrace/index.js","node_modules/react-native-web/dist/exports/TVEventHandler/index.js","node_modules/react-native-web/dist/exports/DeviceEventEmitter/index.js","node_modules/react-native-web/dist/exports/useColorScheme/index.js","node_modules/react-native-web/dist/exports/useWindowDimensions/index.js","node_modules/hyphenate-style-name/index.js","node_modules/react-native-web/node_modules/fbjs/lib/warning.js","node_modules/axios/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/animations/SpringAnimation.js","node_modules/react-native-web/dist/vendor/react-native/Animated/SpringConfig.js","node_modules/react-native-web/dist/vendor/react-native/Animated/animations/TimingAnimation.js","node_modules/fromentries/index.js","node_modules/bezier-js/dist/bezier.cjs","node_modules/jerrypick/dist/jerrypick.module.js","node_modules/react-kapsule/dist/react-kapsule.module.js","node_modules/3d-force-graph-vr/dist/3d-force-graph-vr.module.js","node_modules/3d-force-graph-ar/dist/3d-force-graph-ar.module.js","node_modules/three/examples/jsm/controls/DragControls.js","node_modules/three/examples/jsm/controls/TrackballControls.js","node_modules/three/examples/jsm/controls/OrbitControls.js","node_modules/three/examples/jsm/controls/FlyControls.js","node_modules/three/examples/jsm/shaders/CopyShader.js","node_modules/three/examples/jsm/postprocessing/Pass.js","node_modules/three/examples/jsm/postprocessing/ShaderPass.js","node_modules/three/examples/jsm/postprocessing/MaskPass.js","node_modules/three/examples/jsm/postprocessing/EffectComposer.js","node_modules/three/examples/jsm/postprocessing/RenderPass.js","node_modules/@babel/runtime/helpers/esm/extends.js","node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","node_modules/@babel/runtime/helpers/esm/construct.js","node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","node_modules/three-render-objects/node_modules/polished/dist/polished.esm.js","node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","node_modules/three-render-objects/dist/three-render-objects.module.js","node_modules/3d-force-graph/dist/3d-force-graph.module.js","node_modules/d3-selection/src/selector.js","node_modules/d3-selection/src/array.js","node_modules/d3-selection/src/selectorAll.js","node_modules/d3-selection/src/selection/selectAll.js","node_modules/d3-selection/src/matcher.js","node_modules/d3-selection/src/selection/selectChild.js","node_modules/d3-selection/src/selection/selectChildren.js","node_modules/d3-selection/src/selection/sparse.js","node_modules/d3-selection/src/selection/enter.js","node_modules/d3-selection/src/constant.js","node_modules/d3-selection/src/selection/data.js","node_modules/d3-selection/src/selection/sort.js","node_modules/d3-selection/src/selection/call.js","node_modules/d3-selection/src/namespaces.js","node_modules/d3-selection/src/namespace.js","node_modules/d3-selection/src/selection/attr.js","node_modules/d3-selection/src/window.js","node_modules/d3-selection/src/selection/style.js","node_modules/d3-selection/src/selection/property.js","node_modules/d3-selection/src/selection/classed.js","node_modules/d3-selection/src/selection/text.js","node_modules/d3-selection/src/selection/html.js","node_modules/d3-selection/src/selection/raise.js","node_modules/d3-selection/src/selection/lower.js","node_modules/d3-selection/src/creator.js","node_modules/d3-selection/src/selection/insert.js","node_modules/d3-selection/src/selection/remove.js","node_modules/d3-selection/src/selection/clone.js","node_modules/d3-selection/src/selection/on.js","node_modules/d3-selection/src/selection/dispatch.js","node_modules/d3-selection/src/selection/index.js","node_modules/d3-selection/src/selection/select.js","node_modules/d3-selection/src/selection/filter.js","node_modules/d3-selection/src/selection/exit.js","node_modules/d3-selection/src/selection/join.js","node_modules/d3-selection/src/selection/merge.js","node_modules/d3-selection/src/selection/order.js","node_modules/d3-selection/src/selection/nodes.js","node_modules/d3-selection/src/selection/node.js","node_modules/d3-selection/src/selection/size.js","node_modules/d3-selection/src/selection/empty.js","node_modules/d3-selection/src/selection/each.js","node_modules/d3-selection/src/selection/append.js","node_modules/d3-selection/src/selection/datum.js","node_modules/d3-selection/src/selection/iterator.js","node_modules/d3-selection/src/select.js","node_modules/d3-drag/src/noevent.js","node_modules/d3-drag/src/nodrag.js","node_modules/d3-interpolate/src/zoom.js","node_modules/d3-selection/src/pointer.js","node_modules/d3-selection/src/sourceEvent.js","node_modules/d3-timer/src/timeout.js","node_modules/d3-transition/src/transition/schedule.js","node_modules/d3-transition/src/interrupt.js","node_modules/d3-interpolate/src/transform/parse.js","node_modules/d3-interpolate/src/number.js","node_modules/d3-interpolate/src/transform/decompose.js","node_modules/d3-interpolate/src/transform/index.js","node_modules/d3-transition/src/transition/tween.js","node_modules/d3-color/src/define.js","node_modules/d3-color/src/color.js","node_modules/d3-interpolate/src/basis.js","node_modules/d3-interpolate/src/constant.js","node_modules/d3-interpolate/src/color.js","node_modules/d3-interpolate/src/rgb.js","node_modules/d3-interpolate/src/basisClosed.js","node_modules/d3-interpolate/src/string.js","node_modules/d3-transition/src/transition/interpolate.js","node_modules/d3-transition/src/transition/attr.js","node_modules/d3-transition/src/transition/attrTween.js","node_modules/d3-transition/src/transition/delay.js","node_modules/d3-transition/src/transition/duration.js","node_modules/d3-transition/src/transition/ease.js","node_modules/d3-transition/src/transition/on.js","node_modules/d3-transition/src/transition/remove.js","node_modules/d3-transition/src/transition/selection.js","node_modules/d3-transition/src/transition/style.js","node_modules/d3-transition/src/transition/styleTween.js","node_modules/d3-transition/src/transition/textTween.js","node_modules/d3-transition/src/transition/index.js","node_modules/d3-transition/src/transition/select.js","node_modules/d3-transition/src/transition/selectAll.js","node_modules/d3-transition/src/transition/filter.js","node_modules/d3-transition/src/transition/merge.js","node_modules/d3-transition/src/transition/transition.js","node_modules/d3-transition/src/transition/text.js","node_modules/d3-transition/src/transition/easeVarying.js","node_modules/d3-transition/src/transition/end.js","node_modules/d3-transition/src/selection/transition.js","node_modules/d3-ease/src/cubic.js","node_modules/d3-transition/src/selection/index.js","node_modules/d3-transition/src/selection/interrupt.js","node_modules/d3-zoom/src/constant.js","node_modules/d3-zoom/src/event.js","node_modules/d3-zoom/src/transform.js","node_modules/d3-zoom/src/noevent.js","node_modules/d3-zoom/src/zoom.js","node_modules/d3-drag/src/constant.js","node_modules/d3-drag/src/event.js","node_modules/d3-drag/src/drag.js","node_modules/canvas-color-tracker/dist/canvas-color-tracker.module.js","node_modules/force-graph/dist/force-graph.module.js","node_modules/react-force-graph/dist/react-force-graph.module.js","node_modules/react-native-animatable/wrapStyleTransforms.js","node_modules/react-native-animatable/flattenStyle.js","node_modules/react-native-animatable/getDefaultStyleValue.js","node_modules/react-native-animatable/getStyleValues.js","node_modules/react-native-animatable/createAnimation.js","node_modules/react-native-animatable/registry.js","node_modules/react-native-animatable/easing.js","node_modules/react-native-animatable/createAnimatableComponent.js","node_modules/react-native-animatable/definitions/attention-seekers.js","node_modules/react-native-animatable/definitions/bouncing-entrances.js","node_modules/react-native-animatable/definitions/bouncing-exits.js","node_modules/react-native-animatable/definitions/fading-entrances.js","node_modules/react-native-animatable/definitions/fading-exits.js","node_modules/react-native-animatable/definitions/flippers.js","node_modules/react-native-animatable/definitions/lightspeed.js","node_modules/react-native-animatable/definitions/sliding-entrances.js","node_modules/react-native-animatable/definitions/sliding-exits.js","node_modules/react-native-animatable/definitions/zooming-entrances.js","node_modules/react-native-animatable/definitions/zooming-exits.js","node_modules/react-native-animatable/index.js","../src/Font.types.ts","../src/ExpoFontLoader.web.ts","../src/FontLoader.web.ts","../src/Font.ts","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/ensure-native-module-available.js","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/icon-button.js","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/create-icon-set.js","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/lib/create-icon-source-cache.js","../src/createIconSet.tsx","../src/MaterialCommunityIcons.ts","node_modules/@expo/vector-icons/MaterialCommunityIcons.js","node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","node_modules/@babel/runtime/helpers/arrayLikeToArray.js","node_modules/react-native-web/dist/exports/LogBox/index.js","node_modules/inline-style-prefixer/lib/utils/capitalizeString.js","node_modules/aframe-forcegraph-component/index.js","node_modules/ngraph.forcelayout/lib/createPhysicsSimulator.js","node_modules/ngraph.forcelayout/lib/codeGenerators/getVariableName.js","node_modules/@babel/runtime/helpers/interopRequireDefault.js","node_modules/react-native-web/dist/exports/NativeModules/index.js","node_modules/@babel/runtime/helpers/typeof.js","CommonActions.tsx","BaseNavigationContainer.tsx","createNavigatorFactory.tsx","NavigationHelpersContext.tsx","useRoute.tsx","useFocusEffect.tsx","getStateFromPath.tsx","node_modules/strict-uri-encode/index.js","node_modules/decode-uri-component/index.js","node_modules/split-on-first/index.js","node_modules/filter-obj/index.js","getPathFromState.tsx","getActionFromState.tsx","getFocusedRouteNameFromRoute.tsx","node_modules/ramda/src/reduce.js","node_modules/ramda/src/internal/_reduce.js","node_modules/ramda/src/always.js","node_modules/axios/lib/helpers/bind.js","node_modules/axios/lib/helpers/buildURL.js","node_modules/axios/lib/cancel/isCancel.js","node_modules/axios/lib/defaults.js","node_modules/axios/lib/adapters/xhr.js","node_modules/axios/lib/core/createError.js","node_modules/axios/lib/core/mergeConfig.js","node_modules/axios/lib/cancel/Cancel.js","useTheme.tsx","node_modules/color-convert/conversions.js","StaticContainer.tsx","SceneView.tsx","useDescriptors.tsx","useNavigationCache.tsx","useNavigationHelpers.tsx","useOnPreventRemove.tsx","useOnAction.tsx","isArrayEqual.tsx","useNavigationBuilder.tsx","useRegisterNavigator.tsx","useFocusEvents.tsx","useOnRouteFocus.tsx","useFocusedListenersChildrenAdapter.tsx","useOnGetState.tsx","useCurrentRender.tsx","LinkingContext.tsx","NavigationContainer.tsx","useDocumentTitle.tsx","useThenable.tsx","node_modules/rtl-detect/index.js","node_modules/deep-assign/index.js","node_modules/inline-style-prefixer/lib/createPrefixer.js","node_modules/inline-style-prefixer/lib/plugins/backgroundClip.js","node_modules/inline-style-prefixer/lib/plugins/crossFade.js","node_modules/inline-style-prefixer/lib/plugins/cursor.js","node_modules/inline-style-prefixer/lib/plugins/filter.js","node_modules/inline-style-prefixer/lib/plugins/flex.js","node_modules/inline-style-prefixer/lib/plugins/flexboxIE.js","node_modules/inline-style-prefixer/lib/plugins/flexboxOld.js","node_modules/inline-style-prefixer/lib/plugins/gradient.js","node_modules/inline-style-prefixer/lib/plugins/grid.js","node_modules/inline-style-prefixer/lib/plugins/imageSet.js","node_modules/inline-style-prefixer/lib/plugins/logical.js","node_modules/inline-style-prefixer/lib/plugins/position.js","node_modules/inline-style-prefixer/lib/plugins/sizing.js","node_modules/inline-style-prefixer/lib/plugins/transition.js","node_modules/create-react-class/index.js","node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedTurboModule.js","node_modules/react-native-web/dist/vendor/react-native/Animated/NativeAnimatedModule.js","node_modules/react-native-web/dist/vendor/react-native/Animated/animations/DecayAnimation.js","node_modules/react-native-web/dist/vendor/react-native/FillRateHelper/index.js","node_modules/ngraph.graph/index.js","node_modules/ngraph.forcelayout/index.js","node_modules/debounce/index.js","node_modules/d3-timer/src/timer.js","node_modules/lodash.throttle/index.js","node_modules/array-find-index/index.js","node_modules/lodash.isstring/index.js","node_modules/lodash.omit/index.js","../../src/errors/CodedError.ts","node_modules/@babel/runtime/helpers/wrapNativeSuper.js","node_modules/fontfaceobserver/fontfaceobserver.standalone.js","node_modules/@expo/vector-icons/build/vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf","useSyncState.tsx","node_modules/@react-navigation/core/node_modules/escape-string-regexp/index.js","node_modules/apisauce/dist/apisauce.js","node_modules/color/index.js","node_modules/ramda/es/internal/_isPlaceholder.js","node_modules/ramda/es/internal/_curry1.js","node_modules/ramda/es/adjust.js","node_modules/ramda/es/internal/_isArray.js","node_modules/ramda/es/internal/_isString.js","node_modules/ramda/es/internal/_isArrayLike.js","node_modules/ramda/es/internal/_reduce.js","node_modules/ramda/es/internal/_has.js","node_modules/ramda/es/internal/_isArguments.js","node_modules/ramda/es/keys.js","node_modules/ramda/es/internal/_isInteger.js","node_modules/ramda/es/internal/_makeFlat.js","node_modules/ramda/es/internal/_toISOString.js","node_modules/ramda/es/internal/_xdropLastWhile.js","node_modules/ramda/es/flatten.js","node_modules/ramda/es/internal/_assign.js","node_modules/ramda/es/test.js","node_modules/ramda/es/trim.js","../src/ExpoErrorRecovery.web.ts","../src/ErrorRecovery.ts","../../src/launch/registerRootComponent.web.tsx","../../src/launch/withExpoRoot.web.tsx","../src/ExpoLocalization.ts","../src/Localization.ts","../../src/environment/browser.web.ts","../src/Platform.ts","node_modules/react-native-collapsible/Collapsible.js","node_modules/react-native-collapsible/Accordion.js","node_modules/resize-observer-polyfill/dist/ResizeObserver.global.js","node_modules/expo/AppEntry.js","node_modules/@babel/runtime/helpers/arrayWithHoles.js","node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","node_modules/@babel/runtime/helpers/nonIterableRest.js","node_modules/regenerator-runtime/runtime.js","node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","node_modules/rtl-detect/lib/rtl-detect.js","node_modules/react/cjs/react.production.min.js","node_modules/is-obj/index.js","node_modules/react-dom/cjs/react-dom.production.min.js","node_modules/react-dom/node_modules/scheduler/index.js","node_modules/react-dom/node_modules/scheduler/cjs/scheduler.production.min.js","node_modules/inline-style-prefixer/lib/utils/prefixProperty.js","node_modules/inline-style-prefixer/lib/utils/prefixValue.js","node_modules/inline-style-prefixer/lib/utils/addNewValuesOnly.js","node_modules/inline-style-prefixer/lib/utils/isObject.js","node_modules/css-in-js-utils/lib/hyphenateProperty.js","node_modules/create-react-class/factory.js","node_modules/react-native-web/node_modules/fbjs/lib/emptyFunction.js","node_modules/prop-types/factoryWithThrowingShims.js","node_modules/prop-types/lib/ReactPropTypesSecret.js","node_modules/aframe/dist/aframe-master.js","node_modules/aframe-extras/index.js","node_modules/aframe-extras/src/controls/index.js","node_modules/aframe-extras/src/controls/checkpoint-controls.js","node_modules/aframe-extras/src/controls/gamepad-controls.js","node_modules/aframe-extras/lib/GamepadButton.js","node_modules/aframe-extras/lib/GamepadButtonEvent.js","node_modules/aframe-extras/src/controls/keyboard-controls.js","node_modules/aframe-extras/lib/keyboard.polyfill.js","node_modules/aframe-extras/src/controls/touch-controls.js","node_modules/aframe-extras/src/controls/movement-controls.js","node_modules/aframe-extras/src/controls/trackpad-controls.js","node_modules/aframe-extras/src/loaders/index.js","node_modules/aframe-extras/src/loaders/animation-mixer.js","node_modules/aframe-extras/src/loaders/collada-model-legacy.js","node_modules/aframe-extras/lib/ColladaLoader.js","node_modules/aframe-extras/src/loaders/fbx-model.js","node_modules/aframe-extras/lib/FBXLoader.js","node_modules/aframe-extras/src/loaders/gltf-model-legacy.js","node_modules/aframe-extras/lib/fetch-script.js","node_modules/aframe-extras/src/loaders/object-model.js","node_modules/aframe-extras/src/misc/index.js","node_modules/aframe-extras/src/misc/checkpoint.js","node_modules/aframe-extras/src/misc/cube-env-map.js","node_modules/aframe-extras/src/misc/grab.js","node_modules/aframe-extras/src/misc/jump-ability.js","node_modules/aframe-extras/src/misc/kinematic-body.js","node_modules/aframe-extras/src/misc/mesh-smooth.js","node_modules/aframe-extras/src/misc/normal-material.js","node_modules/aframe-extras/src/misc/sphere-collider.js","node_modules/aframe-extras/src/pathfinding/index.js","node_modules/aframe-extras/src/pathfinding/nav-mesh.js","node_modules/aframe-extras/src/pathfinding/nav-agent.js","node_modules/aframe-extras/src/pathfinding/system.js","node_modules/three-pathfinding/dist/three-pathfinding.module.js","node_modules/aframe-extras/src/primitives/index.js","node_modules/aframe-extras/src/primitives/a-grid.js","node_modules/aframe-extras/src/primitives/a-hexgrid.js","node_modules/aframe-extras/lib/hex-grid.min.js","node_modules/aframe-extras/lib/default-hex-grid.js","node_modules/aframe-extras/src/primitives/a-ocean.js","node_modules/aframe-extras/src/primitives/a-tube.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateBody.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateQuadTree.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateBounds.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateDragForce.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateSpringForce.js","node_modules/ngraph.forcelayout/lib/codeGenerators/generateIntegrator.js","node_modules/ngraph.forcelayout/lib/spring.js","node_modules/ngraph.merge/index.js","node_modules/ngraph.random/index.js","node_modules/@react-native-community/slider/dist/RNCSliderNativeComponent.web.js","node_modules/@babel/runtime/helpers/interopRequireWildcard.js","node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","node_modules/@babel/runtime/helpers/iterableToArray.js","node_modules/@babel/runtime/helpers/nonIterableSpread.js","node_modules/@babel/runtime/helpers/isNativeFunction.js","node_modules/@babel/runtime/helpers/construct.js","node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js","node_modules/react-is/index.js","node_modules/react-is/cjs/react-is.production.min.js","node_modules/ramda/src/partial.js","node_modules/ramda/src/internal/_concat.js","node_modules/ramda/src/internal/_createPartialApplicator.js","node_modules/ramda/src/curry.js","node_modules/ramda/src/internal/_curryN.js","node_modules/ramda/src/pipeP.js","node_modules/ramda/src/internal/_pipeP.js","node_modules/ramda/src/internal/_isArrayLike.js","node_modules/ramda/src/internal/_isString.js","node_modules/ramda/src/internal/_xwrap.js","node_modules/ramda/src/bind.js","node_modules/ramda/src/tail.js","node_modules/ramda/src/slice.js","node_modules/ramda/src/internal/_isArguments.js","node_modules/ramda/src/forEach.js","node_modules/ramda/src/dissoc.js","node_modules/ramda/src/merge.js","node_modules/ramda/src/internal/_assign.js","node_modules/ramda/src/internal/_objectAssign.js","node_modules/ramda/src/prop.js","node_modules/ramda/src/path.js","node_modules/ramda/src/ifElse.js","node_modules/ramda/src/contains.js","node_modules/ramda/src/internal/_contains.js","node_modules/ramda/src/internal/_indexOf.js","node_modules/ramda/src/equals.js","node_modules/ramda/src/internal/_equals.js","node_modules/ramda/src/internal/_arrayFromIterator.js","node_modules/ramda/src/internal/_containsWith.js","node_modules/ramda/src/internal/_functionName.js","node_modules/ramda/src/identical.js","node_modules/ramda/src/type.js","node_modules/ramda/src/gte.js","node_modules/ramda/src/T.js","node_modules/ramda/src/is.js","node_modules/ramda/src/identity.js","node_modules/ramda/src/internal/_identity.js","node_modules/ramda/src/isNil.js","node_modules/ramda/src/cond.js","node_modules/ramda/src/map.js","node_modules/ramda/src/internal/_dispatchable.js","node_modules/ramda/src/internal/_isTransformer.js","node_modules/ramda/src/internal/_map.js","node_modules/ramda/src/internal/_xmap.js","node_modules/ramda/src/internal/_xfBase.js","node_modules/ramda/src/max.js","node_modules/axios/lib/axios.js","node_modules/axios/lib/core/Axios.js","node_modules/axios/lib/core/InterceptorManager.js","node_modules/axios/lib/core/dispatchRequest.js","node_modules/axios/lib/core/transformData.js","node_modules/axios/lib/helpers/normalizeHeaderName.js","node_modules/axios/lib/core/settle.js","node_modules/axios/lib/core/enhanceError.js","node_modules/axios/lib/helpers/cookies.js","node_modules/axios/lib/core/buildFullPath.js","node_modules/axios/lib/helpers/isAbsoluteURL.js","node_modules/axios/lib/helpers/combineURLs.js","node_modules/axios/lib/helpers/parseHeaders.js","node_modules/axios/lib/helpers/isURLSameOrigin.js","node_modules/axios/lib/cancel/CancelToken.js","node_modules/axios/lib/helpers/spread.js","node_modules/axios/lib/helpers/isAxiosError.js","../../../.local/share/nvm/v15.12.0/lib/node_modules/expo-cli/node_modules/timers-browserify/main.js","../../../.local/share/nvm/v15.12.0/lib/node_modules/expo-cli/node_modules/setimmediate/setImmediate.js","node_modules/@react-navigation/stack/lib/module/views/assets/back-icon.png","node_modules/@react-navigation/stack/lib/module/views/assets/back-icon-mask.png","node_modules/color-string/index.js","node_modules/color-name/index.js","node_modules/simple-swizzle/index.js","node_modules/simple-swizzle/node_modules/is-arrayish/index.js","node_modules/color-convert/index.js","node_modules/color-convert/node_modules/color-name/index.js","node_modules/color-convert/route.js","node_modules/query-string/index.js","node_modules/d3-array/src/min.js","node_modules/d3-array/src/max.js","node_modules/d3-dispatch/src/dispatch.js","node_modules/d3-force-3d/src/link.js","node_modules/d3-force-3d/src/center.js","node_modules/d3-force-3d/src/radial.js","../../src/errors/UnavailabilityError.ts","InitialWindow.ts","Screens.tsx","GestureHandler.tsx","MaskedView.tsx","TouchableItem.tsx","HeaderBackButton.tsx","HeaderBackground.tsx","HeaderShownContext.tsx","memoize.tsx","HeaderSegment.tsx","CardSheet.tsx","CardAnimationContext.tsx","getInvertedMultiplier.tsx","getDistanceForDirection.tsx","Card.tsx","HeaderHeightContext.tsx","PreviousSceneContext.tsx","CardContainer.tsx","node_modules/react-native-iphone-x-helper/index.js","conditional.tsx","CardStyleInterpolators.tsx","HeaderStyleInterpolators.tsx","TransitionSpecs.tsx","TransitionPresets.tsx","CardStack.tsx","KeyboardManager.tsx","HeaderTitle.tsx","Header.tsx","debounce.tsx","HeaderContainer.tsx","SafeAreaProviderCompat.tsx","StackView.tsx","createStackNavigator.tsx","node_modules/d3-binarytree/src/add.js","node_modules/d3-binarytree/src/cover.js","node_modules/d3-binarytree/src/half.js","node_modules/d3-binarytree/src/x.js","node_modules/d3-binarytree/src/binarytree.js","node_modules/d3-binarytree/src/data.js","node_modules/d3-binarytree/src/extent.js","node_modules/d3-binarytree/src/find.js","node_modules/d3-binarytree/src/remove.js","node_modules/d3-binarytree/src/root.js","node_modules/d3-binarytree/src/size.js","node_modules/d3-binarytree/src/visit.js","node_modules/d3-binarytree/src/visitAfter.js","node_modules/d3-octree/src/add.js","node_modules/d3-octree/src/cover.js","node_modules/d3-octree/src/octant.js","node_modules/d3-octree/src/x.js","node_modules/d3-octree/src/y.js","node_modules/d3-octree/src/z.js","node_modules/d3-octree/src/octree.js","node_modules/d3-octree/src/data.js","node_modules/d3-octree/src/extent.js","node_modules/d3-octree/src/find.js","node_modules/d3-octree/src/remove.js","node_modules/d3-octree/src/root.js","node_modules/d3-octree/src/size.js","node_modules/d3-octree/src/visit.js","node_modules/d3-octree/src/visitAfter.js","node_modules/d3-force-3d/src/manyBody.js","node_modules/d3-quadtree/src/add.js","node_modules/d3-quadtree/src/cover.js","node_modules/d3-quadtree/src/quad.js","node_modules/d3-quadtree/src/x.js","node_modules/d3-quadtree/src/y.js","node_modules/d3-quadtree/src/quadtree.js","node_modules/d3-quadtree/src/data.js","node_modules/d3-quadtree/src/extent.js","node_modules/d3-quadtree/src/find.js","node_modules/d3-quadtree/src/remove.js","node_modules/d3-quadtree/src/root.js","node_modules/d3-quadtree/src/size.js","node_modules/d3-quadtree/src/visit.js","node_modules/d3-quadtree/src/visitAfter.js","node_modules/d3-force/src/constant.js","node_modules/d3-force/src/jiggle.js","node_modules/d3-force/src/collide.js","node_modules/internmap/src/index.js","node_modules/d3-scale/src/init.js","node_modules/d3-scale/src/ordinal.js","NativeSafeAreaProvider.tsx","SafeAreaContext.tsx","node_modules/d3-scale-chromatic/src/categorical/Paired.js","node_modules/d3-scale-chromatic/src/colors.js"],"names":["module","exports","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","configurable","writable","forwardPropsList","forwardedProps","href","lang","onScroll","onWheel","pointerEvents","View","React","props","forwardedRef","hrefAttrs","onLayout","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","onResponderEnd","onResponderGrant","onResponderMove","onResponderReject","onResponderRelease","onResponderStart","onResponderTerminate","onResponderTerminationRequest","onScrollShouldSetResponder","onScrollShouldSetResponderCapture","onSelectionChangeShouldSetResponder","onSelectionChangeShouldSetResponderCapture","onStartShouldSetResponder","onStartShouldSetResponderCapture","hasTextAncestor","TextAncestorContext","hostRef","useElementLayout","useResponderEvents","style","StyleSheet","compose","styles","inline","supportedProps","pick","pickProps","classList","download","rel","charAt","platformMethodsRef","usePlatformMethods","setRef","useMergeRefs","ref","createElement","displayName","css","create","view","alignItems","border","boxSizing","display","flexBasis","flexDirection","flexShrink","margin","minHeight","minWidth","padding","position","zIndex","MOUSE","LEFT","MIDDLE","RIGHT","ROTATE","DOLLY","PAN","TOUCH","DOLLY_PAN","DOLLY_ROTATE","BackSide","LinearFilter","RGBAFormat","EventDispatcher","type","listener","undefined","this","_listeners","listeners","indexOf","listenerArray","index","splice","event","array","slice","l","call","_lut","toString","DEG2RAD","Math","PI","RAD2DEG","generateUUID","d0","random","d1","d2","d3","toUpperCase","clamp","min","max","euclideanModulo","n","m","lerp","x","y","t","isPowerOfTwo","floorPowerOfTwo","pow","floor","log","LN2","Vector2","scalar","Error","constructor","v","w","console","warn","addVectors","s","a","b","subVectors","multiplyScalar","e","elements","minVal","maxVal","divideScalar","ceil","round","sqrt","abs","atan2","distanceToSquared","dx","dy","normalize","alpha","v1","v2","offset","attribute","getX","getY","center","angle","c","cos","sin","prototype","isVector2","Matrix3","error","n11","n12","n13","n21","n22","n23","n31","n32","n33","te","set","me","xAxis","yAxis","zAxis","setFromMatrix3Column","multiplyMatrices","ae","be","a11","a12","a13","a21","a22","a23","a31","a32","a33","b11","b12","b13","b21","b22","b23","b31","b32","b33","d","f","g","h","t11","t12","t13","det","detInv","tmp","matrix4","setFromMatrix4","invert","transpose","r","tx","ty","sx","sy","rotation","cx","cy","theta","matrix","fromArray","_canvas","isMatrix3","ImageUtils","image","test","src","HTMLCanvasElement","canvas","document","createElementNS","width","height","context","getContext","ImageData","putImageData","drawImage","toDataURL","textureId","Texture","DEFAULT_IMAGE","mapping","DEFAULT_MAPPING","wrapS","wrapT","magFilter","minFilter","format","anisotropy","encoding","super","uuid","name","mipmaps","internalFormat","repeat","matrixAutoUpdate","generateMipmaps","premultiplyAlpha","flipY","unpackAlignment","version","onUpdate","setUvTransform","copy","meta","isRootObject","textures","output","metadata","generator","wrap","images","url","Array","isArray","isDataTexture","serializeImage","dispatchEvent","uv","applyMatrix3","HTMLImageElement","ImageBitmap","getDataURL","data","isTexture","Vector4","z","q","acos","m11","m12","m13","m21","m22","m23","m31","m32","m33","xx","yy","zz","xy","xz","yz","getZ","getW","isVector4","WebGLRenderTarget","options","depth","scissor","scissorTest","viewport","texture","depthBuffer","stencilBuffer","depthTexture","dispose","clone","isWebGLRenderTarget","count","il","isWebGLMultipleRenderTargets","WebGLMultisampleRenderTarget","samples","isWebGLMultisampleRenderTarget","Quaternion","_x","_y","_z","_w","qa","qb","qm","slerpQuaternions","dst","dstOffset","src0","srcOffset0","src1","srcOffset1","x0","y0","z0","w0","x1","y1","z1","w1","dir","sqrSin","Number","EPSILON","len","tDir","_onChangeCallback","quaternion","euler","update","isEuler","order","_order","c1","c2","c3","s1","s2","s3","axis","halfAngle","trace","vFrom","vTo","dot","step","angleTo","slerp","conjugate","p","multiplyQuaternions","qax","qay","qaz","qaw","qbx","qby","qbz","qbw","cosHalfTheta","sqrSinHalfTheta","sinHalfTheta","halfTheta","ratioA","ratioB","callback","isQuaternion","Vector3","multiplyVectors","applyQuaternion","_quaternion$4","setFromEuler","setFromAxisAngle","qx","qy","qz","qw","ix","iy","iz","iw","camera","applyMatrix4","matrixWorldInverse","projectionMatrix","projectionMatrixInverse","matrixWorld","crossVectors","ax","ay","az","bx","by","bz","denominator","lengthSq","planeNormal","_vector$c","projectOnVector","sub","normal","dz","setFromSphericalCoords","radius","phi","sinPhiRadius","setFromCylindricalCoords","setFromMatrixColumn","sz","isVector3","Box3","Infinity","minX","minY","minZ","maxX","maxY","maxZ","points","makeEmpty","expandByPoint","size","halfSize","_vector$b","add","expandByObject","box","isEmpty","point","vector","addScalar","updateWorldMatrix","geometry","boundingBox","computeBoundingBox","_box$3","union","children","sphere","clampPoint","plane","constant","triangle","getCenter","_center","_extents","_v0$2","_v1$7","_v2$3","_f0","_f1","_f2","axes","satForAxes","_triangleNormal","getSize","_points","setFromPoints","equals","isBox3","_testAxis","v0","extents","j","p0","p1","p2","_box$2","_v1$6","_toFarthestPoint","_toPoint","Sphere","optionalCenter","maxRadiusSq","distanceTo","radiusSum","intersectsSphere","distanceToPoint","deltaLengthSq","expandByScalar","getMaxScaleOnAxis","missingRadiusHalf","_vector$a","_segCenter","_segDir","_diff","_edge1","_edge2","_normal$1","Ray","origin","direction","ray","at","directionDistance","distanceSqToPoint","optionalPointOnRay","optionalPointOnSegment","segExtent","a01","b0","b1","s0","sqrDist","extDet","invDet","tca","radius2","thc","t0","t1","distanceToPlane","distToPoint","tmin","tmax","tymin","tymax","tzmin","tzmax","invdirx","invdiry","invdirz","intersectBox","backfaceCulling","sign","DdN","DdQxE2","DdE1xQ","cross","QdN","transformDirection","Matrix4","n14","n24","n34","n41","n42","n43","n44","scaleX","_v1$5","scaleY","scaleZ","af","bf","ce","cf","de","df","ac","ad","bc","bd","_zero","_one","eye","up","a14","a24","a34","a41","a42","a43","a44","b14","b24","b34","b41","b42","b43","b44","t14","scaleXSq","scaleYSq","scaleZSq","yx","zx","zy","scale","x2","y2","z2","wx","wy","wz","determinant","_m1$2","invSX","invSY","invSZ","setFromRotationMatrix","left","right","top","bottom","near","far","isMatrix4","_matrix$1","_quaternion$3","Euler","DefaultOrder","asin","makeRotationFromQuaternion","newOrder","setFromQuaternion","optionalResult","RotationOrders","Layers","mask","channel","layers","_object3DId","_v1$4","_q1","_m1$1","_target","_position$3","_scale$2","_quaternion$2","_xAxis","_yAxis","_zAxis","_addedEvent","_removedEvent","Object3D","parent","DefaultUp","_onChange","modelViewMatrix","normalMatrix","DefaultMatrixAutoUpdate","matrixWorldNeedsUpdate","visible","castShadow","receiveShadow","frustumCulled","renderOrder","animations","userData","updateMatrix","premultiply","decompose","multiply","rotateOnAxis","distance","translateOnAxis","setFromMatrixPosition","isCamera","isLight","lookAt","extractRotation","isObject3D","remove","id","getObjectByProperty","traverse","traverseVisible","traverseAncestors","force","updateMatrixWorld","updateParents","updateChildren","geometries","materials","shapes","skeletons","serialize","library","element","toJSON","JSON","stringify","toArray","isInstancedMesh","instanceMatrix","instanceColor","isScene","background","isColor","environment","isMesh","isLine","isPoints","parameters","shape","isSkinnedMesh","bindMode","bindMatrix","skeleton","material","uuids","animation","extractFromCache","cache","values","recursive","parse","child","_v0$1","_v1$3","_v2$2","_v3$1","_vab","_vac","_vbc","_vap","_vbp","_vcp","Triangle","targetLengthSq","dot00","dot01","dot02","dot11","dot12","denom","invDenom","u","getBarycoord","p3","uv1","uv2","uv3","addScaledVector","i0","i1","i2","getNormal","setFromCoplanarPoints","getUV","containsPoint","isFrontFacing","intersectsTriangle","d4","vc","d5","d6","vb","va","materialId","Material","fog","blending","side","vertexColors","opacity","transparent","blendSrc","blendDst","blendEquation","blendSrcAlpha","blendDstAlpha","blendEquationAlpha","depthFunc","depthTest","depthWrite","stencilWriteMask","stencilFunc","stencilRef","stencilFuncMask","stencilFail","stencilZFail","stencilZPass","stencilWrite","clippingPlanes","clipIntersection","clipShadows","shadowSide","colorWrite","precision","polygonOffset","polygonOffsetFactor","polygonOffsetUnits","dithering","alphaTest","alphaToCoverage","premultipliedAlpha","toneMapped","onBeforeCompile","newValue","flatShading","currentValue","isRoot","color","getHex","roughness","metalness","sheen","emissive","emissiveIntensity","specular","shininess","clearcoat","clearcoatRoughness","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","clearcoatNormalScale","map","matcap","alphaMap","lightMap","lightMapIntensity","aoMap","aoMapIntensity","bumpMap","bumpScale","normalMap","normalMapType","normalScale","displacementMap","displacementScale","displacementBias","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","combine","envMapIntensity","reflectivity","refractionRatio","gradientMap","transmission","transmissionMap","thickness","thicknessMap","attenuationDistance","attenuationColor","sizeAttenuation","linewidth","dashSize","gapSize","wireframe","wireframeLinewidth","wireframeLinecap","wireframeLinejoin","morphTargets","morphNormals","srcPlanes","dstPlanes","isMaterial","_colorKeywords","_hslA","_hslB","hue2rgb","SRGBToLinear","LinearToSRGB","Color","setRGB","setHex","setStyle","hex","handleAlpha","string","parseFloat","exec","components","parseInt","setHSL","setColorName","toLowerCase","gammaFactor","safeInverse","copyGammaToLinear","copyLinearToGamma","copySRGBToLinear","copyLinearToSRGB","hue","saturation","lightness","delta","getHSL","color1","color2","normalized","NAMES","MeshBasicMaterial","setValues","isMeshBasicMaterial","_vector$9","_vector2$1","BufferAttribute","itemSize","TypeError","usage","updateRange","index1","index2","colors","vectors","fromBufferAttribute","setXY","setXYZ","applyNormalMatrix","onUploadCallback","isBufferAttribute","Uint16BufferAttribute","Uint16Array","Uint32BufferAttribute","Uint32Array","isFloat16BufferAttribute","Float32BufferAttribute","Float32Array","arrayMax","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Float64Array","_id","_m1","_obj","_offset","_box$1","_boxMorphTargets","_vector$8","BufferGeometry","attributes","morphAttributes","morphTargetsRelative","groups","boundingSphere","drawRange","start","materialIndex","needsUpdate","getNormalMatrix","tangent","computeBoundingSphere","makeRotationX","makeRotationY","makeRotationZ","makeTranslation","makeScale","negate","translate","setAttribute","morphAttributesPosition","isGLBufferAttribute","setFromBufferAttribute","morphAttribute","isNaN","jl","indices","positions","normals","uvs","nVertices","tangents","tan1","tan2","vA","vB","vC","uvA","uvB","uvC","sdir","tdir","handleTriangle","isFinite","group","tmp2","n2","handleVertex","positionAttribute","getAttribute","normalAttribute","pA","pB","pC","nA","nB","nC","cb","ab","normalizeNormals","isBufferGeometry","attributeArray1","attribute2","attributeArray2","attributeOffset","convertBufferAttribute","array2","isInterleavedBufferAttribute","stride","geometry2","newAttribute","morphArray","addGroup","hasMorphAttributes","attributeArray","setIndex","_inverseMatrix$2","_ray$2","_sphere$3","_vA$1","_vB$1","_vC$1","_tempA","_tempB","_tempC","_morphA","_morphB","_morphC","_uvA$1","_uvB$1","_uvC$1","_intersectionPoint","_intersectionPointWorld","Mesh","updateMorphTargets","morphTargetInfluences","morphTargetDictionary","assign","ml","String","raycaster","intersects","intersectsBox","intersection","morphPosition","groupMaterial","checkBufferGeometryIntersection","faceIndex","face","isGeometry","morphInfluences","influence","boneTransform","intersect","intersectTriangle","checkIntersection","BoxGeometry","widthSegments","heightSegments","depthSegments","scope","vertices","numberOfVertices","groupStart","buildPlane","udir","vdir","gridX","gridY","segmentWidth","segmentHeight","widthHalf","heightHalf","depthHalf","gridX1","gridY1","vertexCounter","groupCount","cloneUniforms","property","mergeUniforms","uniforms","merged","UniformsUtils","merge","ShaderMaterial","defines","vertexShader","fragmentShader","lights","clipping","extensions","derivatives","fragDepth","drawBuffers","shaderTextureLOD","defaultAttributeValues","index0AttributeName","uniformsNeedUpdate","glslVersion","isShaderMaterial","Camera","PerspectiveCamera","fov","aspect","zoom","focus","filmGauge","filmOffset","updateProjectionMatrix","focalLength","vExtentSlope","getFilmHeight","atan","tan","fullWidth","fullHeight","enabled","offsetX","offsetY","skew","getFilmWidth","makePerspective","isPerspectiveCamera","CubeCamera","renderTarget","isWebGLCubeRenderTarget","cameraPX","cameraNX","cameraPY","cameraNY","cameraPZ","cameraNZ","renderer","scene","currentXrEnabled","xr","currentRenderTarget","getRenderTarget","setRenderTarget","render","CubeTexture","_needsFlipEnvMap","isCubeTexture","WebGLCubeRenderTarget","dummy","isInteger","shader","tEquirect","mesh","currentMinFilter","stencil","clear","_vector1","_vector2","_normalMatrix","Plane","setFromNormalAndCoplanarPoint","inverseNormalLength","line","startSign","endSign","end","intersectsPlane","optionalNormalMatrix","referencePoint","coplanarPoint","isPlane","_sphere$2","_vector$7","Frustum","p4","p5","planes","frustum","me0","me1","me2","me3","me4","me5","me6","me7","me8","me9","me10","me11","me12","me13","me14","me15","setComponents","sprite","negRadius","WebGLAnimation","isAnimating","animationLoop","requestId","onAnimationFrame","time","frame","requestAnimationFrame","stop","cancelAnimationFrame","setAnimationLoop","setContext","WebGLAttributes","gl","capabilities","isWebGL2","buffers","WeakMap","get","deleteBuffer","buffer","delete","bufferType","cached","bytesPerElement","elementSize","createBuffer","bindBuffer","bufferData","BYTES_PER_ELEMENT","bufferSubData","subarray","updateBuffer","PlaneGeometry","width_half","height_half","segment_width","segment_height","ShaderChunk","alphamap_fragment","alphamap_pars_fragment","alphatest_fragment","aomap_fragment","aomap_pars_fragment","begin_vertex","beginnormal_vertex","bsdfs","bumpmap_pars_fragment","clipping_planes_fragment","clipping_planes_pars_fragment","clipping_planes_pars_vertex","clipping_planes_vertex","color_fragment","color_pars_fragment","color_pars_vertex","color_vertex","common","cube_uv_reflection_fragment","defaultnormal_vertex","displacementmap_pars_vertex","displacementmap_vertex","emissivemap_fragment","emissivemap_pars_fragment","encodings_fragment","encodings_pars_fragment","envmap_fragment","envmap_common_pars_fragment","envmap_pars_fragment","envmap_pars_vertex","envmap_physical_pars_fragment","envmap_vertex","fog_vertex","fog_pars_vertex","fog_fragment","fog_pars_fragment","gradientmap_pars_fragment","lightmap_fragment","lightmap_pars_fragment","lights_lambert_vertex","lights_pars_begin","lights_toon_fragment","lights_toon_pars_fragment","lights_phong_fragment","lights_phong_pars_fragment","lights_physical_fragment","lights_physical_pars_fragment","lights_fragment_begin","lights_fragment_maps","lights_fragment_end","logdepthbuf_fragment","logdepthbuf_pars_fragment","logdepthbuf_pars_vertex","logdepthbuf_vertex","map_fragment","map_pars_fragment","map_particle_fragment","map_particle_pars_fragment","metalnessmap_fragment","metalnessmap_pars_fragment","morphnormal_vertex","morphtarget_pars_vertex","morphtarget_vertex","normal_fragment_begin","normal_fragment_maps","normalmap_pars_fragment","clearcoat_normal_fragment_begin","clearcoat_normal_fragment_maps","clearcoat_pars_fragment","packing","premultiplied_alpha_fragment","project_vertex","dithering_fragment","dithering_pars_fragment","roughnessmap_fragment","roughnessmap_pars_fragment","shadowmap_pars_fragment","shadowmap_pars_vertex","shadowmap_vertex","shadowmask_pars_fragment","skinbase_vertex","skinning_pars_vertex","skinning_vertex","skinnormal_vertex","specularmap_fragment","specularmap_pars_fragment","tonemapping_fragment","tonemapping_pars_fragment","transmission_fragment","transmission_pars_fragment","uv_pars_fragment","uv_pars_vertex","uv_vertex","uv2_pars_fragment","uv2_pars_vertex","uv2_vertex","worldpos_vertex","background_frag","background_vert","cube_frag","cube_vert","depth_frag","depth_vert","distanceRGBA_frag","distanceRGBA_vert","equirect_frag","equirect_vert","linedashed_frag","linedashed_vert","meshbasic_frag","meshbasic_vert","meshlambert_frag","meshlambert_vert","meshmatcap_frag","meshmatcap_vert","meshtoon_frag","meshtoon_vert","meshphong_frag","meshphong_vert","meshphysical_frag","meshphysical_vert","normal_frag","normal_vert","points_frag","points_vert","shadow_frag","shadow_vert","sprite_frag","sprite_vert","UniformsLib","diffuse","uvTransform","uv2Transform","specularmap","envmap","flipEnvMap","maxMipLevel","aomap","lightmap","emissivemap","bumpmap","normalmap","displacementmap","roughnessmap","metalnessmap","gradientmap","fogDensity","fogNear","fogFar","fogColor","ambientLightColor","lightProbe","directionalLights","properties","directionalLightShadows","shadowBias","shadowNormalBias","shadowRadius","shadowMapSize","directionalShadowMap","directionalShadowMatrix","spotLights","coneCos","penumbraCos","decay","spotLightShadows","spotShadowMap","spotShadowMatrix","pointLights","pointLightShadows","shadowCameraNear","shadowCameraFar","pointShadowMap","pointShadowMatrix","hemisphereLights","skyColor","groundColor","rectAreaLights","ltc_1","ltc_2","ShaderLib","basic","lambert","phong","standard","toon","dashed","totalSize","t2D","cube","equirect","distanceRGBA","referencePosition","nearDistance","farDistance","shadow","WebGLBackground","cubemaps","state","objects","clearColor","planeMesh","boxMesh","clearAlpha","currentBackground","currentBackgroundVersion","currentTonemapping","setClear","getClearColor","setClearColor","getClearAlpha","setClearAlpha","renderList","forceClear","session","getSession","environmentBlendMode","autoClear","autoClearColor","autoClearDepth","autoClearStencil","deleteAttribute","onBeforeRender","copyPosition","toneMapping","unshift","WebGLBindingStates","maxVertexAttributes","getParameter","extension","vaoAvailable","bindingStates","defaultState","createBindingState","currentState","bindVertexArrayObject","vao","bindVertexArray","bindVertexArrayOES","deleteVertexArrayObject","deleteVertexArray","deleteVertexArrayOES","newAttributes","enabledAttributes","attributeDivisors","program","initAttributes","enableAttribute","enableAttributeAndDivisor","meshPerAttribute","enableVertexAttribArray","disableUnusedAttributes","disableVertexAttribArray","vertexAttribPointer","vertexAttribIPointer","reset","resetDefaultState","setup","updateBuffers","programMap","stateMap","createVertexArray","createVertexArrayOES","getBindingState","cachedAttributes","geometryAttributes","attributesNum","cachedAttribute","geometryAttribute","saveCache","isInstancedBufferGeometry","programAttributes","getAttributes","materialDefaultAttributeValues","programAttribute","isInstancedInterleavedBuffer","_maxInstanceCount","isInstancedBufferAttribute","vertexAttrib2fv","vertexAttrib3fv","vertexAttrib4fv","vertexAttrib1fv","setupVertexAttributes","geometryId","programId","releaseStatesOfGeometry","releaseStatesOfProgram","WebGLBufferRenderer","info","mode","setMode","drawArrays","renderInstances","primcount","methodName","WebGLCapabilities","maxAnisotropy","getMaxPrecision","getShaderPrecisionFormat","WebGL2RenderingContext","WebGL2ComputeRenderingContext","maxPrecision","has","logarithmicDepthBuffer","maxTextures","maxVertexTextures","maxTextureSize","maxCubemapSize","maxAttributes","maxVertexUniforms","maxVaryings","maxFragmentUniforms","vertexTextures","floatFragmentTextures","getMaxAnisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT","floatVertexTextures","maxSamples","WebGLClipping","globalState","numGlobalPlanes","localClippingEnabled","renderingShadows","viewNormalMatrix","uniform","resetGlobalState","numPlanes","numIntersection","projectPlanes","skipTransform","nPlanes","dstArray","flatSize","viewMatrix","i4","init","enableLocalClipping","beginShadows","endShadows","setState","useCache","materialProperties","nGlobal","lGlobal","clippingState","WebGLCubeMaps","mapTextureMapping","onTextureDispose","removeEventListener","cubemap","fromEquirectangularTexture","addEventListener","WebGLExtensions","getExtension","WebGLGeometries","wireframeAttributes","onGeometryDispose","memory","updateWireframeAttribute","geometryIndex","geometryPosition","previousAttribute","getWireframeAttribute","currentAttribute","WebGLIndexedBufferRenderer","drawElements","WebGLInfo","calls","triangles","lines","programs","autoReset","instanceCount","numericalSort","absNumericalSort","WebGLMorphtargets","influencesList","workInfluences","objectInfluences","influences","sort","MAX_SAFE_INTEGER","morphInfluencesSum","hasAttribute","morphBaseInfluence","getUniforms","setValue","WebGLObjects","updateMap","onInstancedMeshDispose","instancedMesh","buffergeometry","hasEventListener","physical","transmissionSamplerSize","transmissionSamplerMap","DataTexture2DArray","wrapR","isDataTexture2DArray","DataTexture3D","isDataTexture3D","emptyTexture","emptyTexture2dArray","emptyTexture3d","emptyCubeTexture","arrayCacheF32","arrayCacheI32","mat4array","mat3array","mat2array","flatten","nBlocks","blockSize","firstElem","arraysEqual","copyArray","allocTexUnits","allocateTextureUnit","setValueV1f","uniform1f","addr","setValueV2f","uniform2f","uniform2fv","setValueV3f","uniform3f","uniform3fv","setValueV4f","uniform4f","uniform4fv","setValueM2","uniformMatrix2fv","setValueM3","uniformMatrix3fv","setValueM4","uniformMatrix4fv","setValueV1i","uniform1i","setValueV2i","uniform2iv","setValueV3i","uniform3iv","setValueV4i","uniform4iv","setValueV1ui","uniform1ui","setValueV2ui","uniform2uiv","setValueV3ui","uniform3uiv","setValueV4ui","uniform4uiv","setValueT1","unit","safeSetTexture2D","setValueT3D1","setTexture3D","setValueT6","safeSetTextureCube","setValueT2DArray1","setTexture2DArray","setValueV1fArray","uniform1fv","setValueV2fArray","setValueV3fArray","setValueV4fArray","setValueM2Array","setValueM3Array","setValueM4Array","setValueV1iArray","uniform1iv","setValueV2iArray","setValueV3iArray","setValueV4iArray","setValueV1uiArray","uniform1uiv","setValueV2uiArray","setValueV3uiArray","setValueV4uiArray","setValueT1Array","units","setValueT6Array","SingleUniform","activeInfo","getSingularSetter","PureArrayUniform","getPureArraySetter","StructuredUniform","seq","updateCache","RePathPart","addUniform","container","uniformObject","parseUniform","path","pathLength","lastIndex","match","matchEnd","idIsIndex","subscript","next","WebGLUniforms","getProgramParameter","getActiveUniform","getUniformLocation","WebGLShader","createShader","shaderSource","compileShader","setOptional","upload","seqWithValue","programIdCount","getEncodingComponents","getShaderErrors","status","getShaderParameter","getShaderInfoLog","trim","split","join","addLineNumbers","getShaderSource","getTexelDecodingFunction","functionName","getTexelEncodingFunction","getToneMappingFunction","toneMappingName","filterEmptyLine","replaceLightNums","replace","numDirLights","numSpotLights","numRectAreaLights","numPointLights","numHemiLights","numDirLightShadows","numSpotLightShadows","numPointLightShadows","replaceClippingPlaneNums","numClippingPlanes","numClipIntersection","includePattern","resolveIncludes","includeReplacer","include","deprecatedUnrollLoopPattern","unrollLoopPattern","unrollLoops","loopReplacer","deprecatedLoopReplacer","snippet","generatePrecision","precisionstring","WebGLProgram","cacheKey","shadowMapTypeDefine","shadowMapType","generateShadowMapTypeDefine","envMapTypeDefine","envMapMode","generateEnvMapTypeDefine","envMapModeDefine","generateEnvMapModeDefine","envMapBlendingDefine","generateEnvMapBlendingDefine","gammaFactorDefine","customExtensions","extensionDerivatives","envMapCubeUV","tangentSpaceNormalMap","shaderID","extensionFragDepth","rendererExtensionFragDepth","extensionDrawBuffers","rendererExtensionDrawBuffers","extensionShaderTextureLOD","rendererExtensionShaderTextureLod","generateExtensions","customDefines","chunks","generateDefines","createProgram","prefixVertex","prefixFragment","versionString","isRawShaderMaterial","shaderName","instancing","instancingColor","supportsVertexTextures","maxBones","useFog","fogExp2","objectSpaceNormalMap","vertexTangents","vertexAlphas","vertexUvs","uvsVertexOnly","skinning","useVertexTexture","doubleSided","flipSided","shadowMapEnabled","physicallyCorrectLights","mapEncoding","matcapEncoding","envMapEncoding","emissiveMapEncoding","lightMapEncoding","outputEncoding","depthPacking","fragmentGlsl","glVertexShader","glFragmentShader","attachShader","bindAttribLocation","linkProgram","debug","checkShaderErrors","programLog","getProgramInfoLog","vertexLog","fragmentLog","runnable","haveDiagnostics","vertexErrors","fragmentErrors","getError","diagnostics","prefix","cachedUniforms","deleteShader","getActiveAttrib","getAttribLocation","fetchAttributeLocations","destroy","deleteProgram","usedTimes","WebGLPrograms","shaderIDs","MeshDepthMaterial","MeshDistanceMaterial","MeshNormalMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshToonMaterial","MeshStandardMaterial","MeshPhysicalMaterial","MeshMatcapMaterial","LineBasicMaterial","LineDashedMaterial","PointsMaterial","ShadowMaterial","SpriteMaterial","parameterNames","getTextureEncodingFromMap","getParameters","shadows","isMeshStandardMaterial","bones","nVertexUniforms","nVertexMatrices","getMaxBones","isFogExp2","directional","spot","rectArea","hemi","shadowMap","customProgramCacheKey","getProgramCacheKey","acquireProgram","pl","preexistingProgram","releaseProgram","pop","WebGLProperties","painterSortStable","groupOrder","reversePainterSortStable","WebGLRenderList","renderItems","renderItemsIndex","opaque","transmissive","defaultProgram","getNextRenderItem","renderItem","finish","customOpaqueSort","customTransparentSort","WebGLRenderLists","lists","renderCallDepth","list","UniformsCache","light","halfWidth","halfHeight","nextVersion","shadowCastingLightsFirst","lightA","lightB","WebGLLights","shadowCache","ShadowUniformsCache","hash","directionalLength","pointLength","spotLength","rectAreaLength","hemiLength","numDirectionalShadows","numPointShadows","numSpotShadows","ambient","probe","directionalShadow","spotShadow","rectAreaLTC1","rectAreaLTC2","pointShadow","vector3","matrix42","intensity","isAmbientLight","isLightProbe","sh","coefficients","isDirectionalLight","shadowUniforms","bias","normalBias","mapSize","isSpotLight","penumbra","isRectAreaLight","isPointLight","isHemisphereLight","LTC_FLOAT_1","LTC_FLOAT_2","LTC_HALF_1","LTC_HALF_2","setupView","identity","WebGLRenderState","lightsArray","shadowsArray","setupLights","setupLightsView","pushLight","pushShadow","shadowLight","WebGLRenderStates","renderStates","renderState","isMeshDepthMaterial","isMeshDistanceMaterial","WebGLShadowMap","_renderer","_objects","_capabilities","_frustum","_shadowMapSize","_viewportSize","_viewport","_depthMaterials","_distanceMaterials","_materialCache","_maxTextureSize","0","1","2","shadowMaterialVertical","SAMPLE_RATE","HALF_SAMPLE_RATE","shadow_pass","resolution","shadowMaterialHorizontal","HORIZONTAL_PASS","fullScreenTri","fullScreenMesh","VSMPass","mapPass","renderBufferDirect","getDepthMaterialVariant","useMorphing","getDistanceMaterialVariant","getDepthMaterial","result","getMaterialVariant","customMaterial","customDepthMaterial","customDistanceMaterial","keyA","keyB","materialsForVariant","cachedMaterial","renderObject","shadowCamera","intersectsObject","k","kl","depthMaterial","autoUpdate","activeCubeFace","getActiveCubeFace","activeMipmapLevel","getActiveMipmapLevel","_state","setBlending","setTest","setScissorTest","shadowFrameExtents","getFrameExtents","isPointLightShadow","pars","viewportCount","getViewportCount","vp","getViewport","updateMatrices","getFrustum","WebGLState","colorBuffer","locked","currentColorMask","currentColorClear","setMask","colorMask","setLocked","lock","currentDepthMask","currentDepthFunc","currentDepthClear","enable","disable","depthMask","setFunc","clearDepth","currentStencilMask","currentStencilFunc","currentStencilRef","currentStencilFuncMask","currentStencilFail","currentStencilZFail","currentStencilZPass","currentStencilClear","stencilTest","stencilMask","setOp","stencilOp","clearStencil","enabledCapabilities","xrFramebuffer","currentBoundFramebuffers","currentProgram","currentBlendingEnabled","currentBlending","currentBlendEquation","currentBlendSrc","currentBlendDst","currentBlendEquationAlpha","currentBlendSrcAlpha","currentBlendDstAlpha","currentPremultipledAlpha","currentFlipSided","currentCullFace","currentLineWidth","currentPolygonOffsetFactor","currentPolygonOffsetUnits","lineWidthAvailable","glVersion","currentTextureSlot","currentBoundTextures","scissorParam","viewportParam","currentScissor","currentViewport","createTexture","bindTexture","texParameteri","texImage2D","emptyTextures","setFlipSided","setCullFace","equationToGL","MIN_EXT","MAX_EXT","factorToGL","blendEquationSeparate","blendFuncSeparate","blendFunc","frontFace","cullFace","setPolygonOffset","factor","activeTexture","webglSlot","bindFramebuffer","framebuffer","bindXRFramebuffer","useProgram","setMaterial","frontFaceCW","setLineWidth","lineWidth","webglType","webglTexture","boundTexture","unbindTexture","compressedTexImage2D","texImage3D","WebGLTextures","_gl","utils","_videoTextures","useOffscreenCanvas","OffscreenCanvas","err","createCanvas","resizeImage","needsPowerOfTwo","needsNewCanvas","maxSize","isPowerOfTwo$1","textureNeedsGenerateMipmaps","supportsMips","generateMipmap","__maxMipLevel","log2","getInternalFormat","internalFormatName","glFormat","glType","filterFallback","textureProperties","__webglInit","deleteTexture","__webglTexture","deallocateTexture","isVideoTexture","onRenderTargetDispose","renderTargetProperties","deleteFramebuffer","__webglFramebuffer","__webglDepthbuffer","deleteRenderbuffer","__webglMultisampledFramebuffer","__webglColorRenderbuffer","__webglDepthRenderbuffer","attachmentProperties","deallocateRenderTarget","textureUnits","setTexture2D","slot","updateVideoTexture","__version","complete","uploadTexture","setTextureCube","initTexture","pixelStorei","isCompressed","isCompressedTexture","cubeImage","convert","glInternalFormat","setTextureParameters","mipmap","mipmapImage","uploadCubeTexture","wrappingToGL","filterToGL","textureType","__currentAnisotropy","texParameterf","TEXTURE_MAX_ANISOTROPY_EXT","textureNeedsPowerOfTwo","isDepthTexture","setupFrameBufferTexture","attachment","textureTarget","framebufferTexture2D","setupRenderBufferStorage","renderbuffer","isMultisample","bindRenderbuffer","getRenderTargetSamples","renderbufferStorageMultisample","renderbufferStorage","framebufferRenderbuffer","setupDepthRenderbuffer","isCube","webglDepthTexture","setupDepthTexture","createRenderbuffer","warnedTexture2D","warnedTextureCube","textureUnit","resetTextureUnits","setupRenderTarget","isMultipleRenderTargets","isRenderTarget3D","createFramebuffer","glTextureType","updateRenderTargetMipmap","updateMultisampleRenderTarget","blitFramebuffer","WebGLUtils","HALF_FLOAT_OES","COMPRESSED_RGB_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT3_EXT","COMPRESSED_RGBA_S3TC_DXT5_EXT","COMPRESSED_RGB_PVRTC_4BPPV1_IMG","COMPRESSED_RGB_PVRTC_2BPPV1_IMG","COMPRESSED_RGBA_PVRTC_4BPPV1_IMG","COMPRESSED_RGBA_PVRTC_2BPPV1_IMG","COMPRESSED_RGB_ETC1_WEBGL","COMPRESSED_RGB8_ETC2","COMPRESSED_RGBA8_ETC2_EAC","UNSIGNED_INT_24_8_WEBGL","ArrayCamera","cameras","isArrayCamera","Group","isGroup","_moveEvent","WebXRController","_targetRay","_grip","_hand","joints","inputState","pinching","hasLinearVelocity","linearVelocity","hasAngularVelocity","angularVelocity","inputSource","referenceSpace","inputPose","gripPose","handPose","targetRay","grip","hand","visibilityState","getPose","targetRaySpace","transform","inputjoint","jointPose","getJointPose","jointName","joint","jointRadius","indexTip","thumbTip","distanceToPinch","threshold","handedness","gripSpace","WebXRManager","framebufferScaleFactor","referenceSpaceType","pose","glBinding","glFramebuffer","glProjLayer","controllers","inputSourcesMap","Map","cameraL","cameraR","cameraVR","_currentDepthNear","_currentDepthFar","onSessionEvent","controller","onSessionEnd","disconnect","isPresenting","onInputSourcesChange","inputSources","removed","added","cameraAutoUpdate","getController","getTargetRaySpace","getControllerGrip","getGripSpace","getHand","getHandSpace","setFramebufferScaleFactor","setReferenceSpaceType","getReferenceSpace","setSession","async","getContextAttributes","xrCompatible","makeXRCompatible","layerInit","antialias","baseLayer","XRWebGLLayer","updateRenderState","depthFormat","projectionlayerInit","colorFormat","scaleFactor","XRWebGLBinding","createProjectionLayer","requestReferenceSpace","cameraLPos","cameraRPos","updateCamera","depthNear","depthFar","ipd","projL","projR","topFov","bottomFov","leftFov","rightFov","zOffset","xOffset","translateX","translateZ","near2","far2","left2","right2","top2","bottom2","setProjectionFromUnion","getCamera","onAnimationFrameCallback","getViewerPose","views","cameraVRNeedsUpdate","glSubImage","getViewSubImage","colorTexture","depthStencilTexture","WebGLMaterials","refreshUniformsCommon","uvScaleMap","uv2ScaleMap","refreshUniformsStandard","refreshFogUniforms","isFog","density","refreshMaterialUniforms","pixelRatio","transmissionRenderTarget","isMeshLambertMaterial","refreshUniformsLambert","isMeshToonMaterial","refreshUniformsToon","isMeshPhongMaterial","refreshUniformsPhong","isMeshPhysicalMaterial","refreshUniformsPhysical","isMeshMatcapMaterial","refreshUniformsMatcap","refreshUniformsDepth","refreshUniformsDistance","isMeshNormalMaterial","refreshUniformsNormal","isLineBasicMaterial","refreshUniformsLine","isLineDashedMaterial","refreshUniformsDash","isPointsMaterial","refreshUniformsPoints","isSpriteMaterial","refreshUniformsSprites","isShadowMaterial","WebGLRenderer","createCanvasElement","_context","_alpha","_depth","_stencil","_antialias","_premultipliedAlpha","_preserveDrawingBuffer","preserveDrawingBuffer","_powerPreference","powerPreference","_failIfMajorPerformanceCaveat","failIfMajorPerformanceCaveat","currentRenderList","currentRenderState","renderListStack","renderStateStack","domElement","sortObjects","toneMappingExposure","_this","_isContextLost","_currentActiveCubeFace","_currentActiveMipmapLevel","_currentRenderTarget","_currentMaterialId","_currentCamera","_currentViewport","_currentScissor","_currentScissorTest","_width","_height","_pixelRatio","_opaqueSort","_transparentSort","_scissor","_scissorTest","_currentDrawBuffers","_clippingEnabled","_localClippingEnabled","_transmissionRenderTarget","_projScreenMatrix","_vector3","_emptyScene","overrideMaterial","getTargetPixelRatio","programCache","renderLists","morphtargets","bufferRenderer","indexedBufferRenderer","contextNames","contextAttributes","contextName","onContextLost","onContextRestore","isWebGL1Renderer","shift","message","initGLContext","preventDefault","infoAutoReset","shadowMapAutoUpdate","shadowMapNeedsUpdate","onMaterialDispose","releaseMaterialProgramReferences","deallocateMaterial","forceContextLoss","loseContext","forceContextRestore","restoreContext","getPixelRatio","setPixelRatio","setSize","updateStyle","setViewport","getDrawingBufferSize","setDrawingBufferSize","getCurrentViewport","getScissor","setScissor","getScissorTest","boolean","setOpaqueSort","method","setTransparentSort","bits","onXRSessionStart","onXRSessionEnd","renderBufferImmediate","hasPositions","hasNormals","hasUvs","hasColors","positionArray","normalArray","uvArray","colorArray","setProgram","rangeFactor","dataCount","rangeStart","rangeCount","drawStart","drawEnd","drawCount","isLineSegments","isLineLoop","isSprite","compile","getProgram","renderObjects","camera2","isImmediateRenderObject","renderObjectImmediate","onAfterRender","lightsStateVersion","programCacheKey","updateCommonMaterialProperties","onBuild","needsLights","materialNeedsLights","progUniforms","uniformsList","needsProgramChange","refreshProgram","refreshMaterial","refreshLights","p_uniforms","m_uniforms","uCamPos","cameraPosition","isOrthographicCamera","boneTexture","computeBoneTexture","boneTextureSize","markUniformsLightsNeedsUpdate","window","setFromProjectionMatrix","projectObject","isLOD","intersectsSprite","opaqueObjects","transmissiveObjects","transparentObjects","needsAntialias","currentToneMapping","renderTransmissiveObjects","drawBuffersWEBGL","layer","framebufferTextureLayer","readRenderTargetPixels","activeCubeFaceIndex","textureFormat","halfFloatSupportedByExt","checkFramebufferStatus","readPixels","copyFramebufferToTexture","level","levelScale","copyTexImage2D","copyTextureToTexture","srcTexture","dstTexture","texSubImage2D","compressedTexSubImage2D","copyTextureToTexture3D","sourceBox","glTarget","unpackRowLen","unpackImageHeight","unpackSkipPixels","unpackSkipRows","unpackSkipImages","texSubImage3D","compressedTexSubImage3D","resetState","__THREE_DEVTOOLS__","CustomEvent","detail","FogExp2","Fog","Scene","InterleavedBuffer","arrayBuffers","_uuid","ib","setUsage","isInterleavedBuffer","_vector$6","InterleavedBufferAttribute","interleavedBuffer","interleavedBuffers","_geometry","_intersectPoint","_worldScale","_mvPosition","_alignedPosition","_rotatedPosition","_viewWorldMatrix","_vA","_vB","_vC","_uvA","_uvB","_uvC","Sprite","float32Array","setFromMatrixScale","transformVertex","vertexPosition","mvPosition","_basePosition","_skinIndex","_skinWeight","_vector$5","_matrix","SkinnedMesh","bindMatrixInverse","calculateInverses","skinWeight","manhattanLength","setXYZW","skinIndex","weight","getComponent","boneIndex","boneInverses","Bone","isBone","DataTexture","_instanceLocalMatrix","_instanceWorldMatrix","_instanceIntersects","_mesh","InstancedMesh","raycastTimes","instanceId","getMatrixAt","raycast","linecap","linejoin","_start$1","_end$1","_inverseMatrix$1","_ray$1","_sphere$1","Line","lineDistances","params","localThreshold","localThresholdSq","vStart","vEnd","interSegment","interRay","distanceSqToSegment","_start","_end","LineSegments","LineLoop","_inverseMatrix","_ray","_sphere","_position$2","Points","testPoint","rayPointDistanceSq","intersectPoint","closestPointToPoint","distanceToRay","video","requestVideoFrameCallback","updateVideo","readyState","HAVE_CURRENT_DATA","CompressedTexture","isCanvasTexture","CylinderGeometry","radiusTop","radiusBottom","radialSegments","openEnded","thetaStart","thetaLength","indexArray","generateCap","centerIndexStart","vertex","centerIndexEnd","cosTheta","sinTheta","slope","indexRow","generateTorso","ConeGeometry","Curve","arcLengthDivisions","optionalTarget","getUtoTmapping","getPoint","divisions","getPointAt","lengths","getLengths","cacheArcLengths","current","last","sum","arcLengths","targetArcLength","comparison","low","high","lengthBefore","t2","pt1","pt2","getTangent","segments","closed","binormals","vec","mat","getTangentAt","MAX_VALUE","tz","makeRotationAxis","json","EllipseCurve","aX","aY","xRadius","yRadius","aStartAngle","aEndAngle","aClockwise","aRotation","twoPi","deltaAngle","samePoints","fromJSON","isEllipseCurve","ArcCurve","aRadius","CubicPoly","c0","initCatmullRom","x3","tension","initNonuniformCatmullRom","dt0","dt1","dt2","calc","isArcCurve","px","py","pz","CatmullRomCurve3","curveType","intPoint","CatmullRom","QuadraticBezier","QuadraticBezierP0","QuadraticBezierP1","QuadraticBezierP2","CubicBezier","CubicBezierP0","CubicBezierP1","CubicBezierP2","CubicBezierP3","isCatmullRomCurve3","CubicBezierCurve","v3","isCubicBezierCurve","CubicBezierCurve3","isCubicBezierCurve3","LineCurve","isLineCurve","QuadraticBezierCurve","isQuadraticBezierCurve","QuadraticBezierCurve3","isQuadraticBezierCurve3","SplineCurve","isSplineCurve","Curves","freeze","__proto__","LineCurve3","isLineCurve3","Earcut","holeIndices","dim","hasHoles","outerLen","outerNode","linkedList","prev","invSize","queue","steiner","getLeftmost","compareX","eliminateHole","filterPoints","eliminateHoles","earcutLinked","clockwise","signedArea","insertNode","removeNode","again","area","ear","pass","zOrder","prevZ","nextZ","tail","numMerges","pSize","qSize","inSize","sortLinked","indexCurve","isEarHashed","isEar","cureLocalIntersections","splitEarcut","pointInTriangle","minTX","minTY","maxTX","maxTY","locallyInside","isValidDiagonal","splitPolygon","hole","hx","hy","mx","my","tanMin","sectorContainsSector","findHoleBridge","leftmost","intersectsPolygon","inside","middleInside","q1","q2","o1","o2","o3","o4","onSegment","num","a2","Node","b2","an","bp","ShapeUtils","contour","pts","holes","faces","removeDupEndPts","addContour","holeIndex","ExtrudeGeometry","verticesArray","addShape","placeholder","curveSegments","steps","bevelEnabled","bevelThickness","bevelSize","bevelOffset","bevelSegments","extrudePath","uvgen","UVGenerator","WorldUVGenerator","amount","extrudePts","splineTube","binormal","position2","extrudeByPath","getSpacedPoints","computeFrenetFrames","shapePoints","extractPoints","isClockWise","reverse","hl","ahole","triangulateShape","concat","scalePt2","pt","vlen","flen","getBevelVec","inPt","inPrev","inNext","v_trans_x","v_trans_y","shrink_by","v_prev_x","v_prev_y","v_next_x","v_next_y","v_prev_lensq","collinear0","v_prev_len","v_next_len","ptPrevShift_x","ptPrevShift_y","sf","v_trans_lensq","direction_eq","contourMovements","holesMovements","oneHoleMovements","verticesMovements","bs","vert","sidewalls","layeroffset","sl","slen1","slen2","f4","f3","addVertex","nextIndex","generateTopUV","addUV","generateSideWallUV","vector2","buildLidFaces","buildSideFaces","computeVertexNormals","toJSON$1","geometryShapes","indexA","indexB","indexC","a_x","a_y","b_x","b_y","c_x","c_y","indexD","a_z","b_z","c_z","d_x","d_y","d_z","ShapeGeometry","indexOffset","shapeVertices","shapeHoles","shapeHole","SphereGeometry","phiStart","phiLength","thetaEnd","grid","verticesRow","uOffset","TubeGeometry","tubularSegments","frames","P","generateSegment","N","B","generateUVs","generateIndices","generateBufferData","RawShaderMaterial","ior","AnimationUtils","arraySlice","from","to","isTypedArray","convertArray","forceClone","ArrayBuffer","isView","DataView","getKeyframeOrder","times","sortedArray","nValues","srcOffset","flattenJSON","jsonKeys","valuePropertyName","subclip","sourceClip","startFrame","endFrame","fps","clip","tracks","track","valueSize","getValueSize","minStartTime","resetDuration","makeClipAdditive","targetClip","referenceFrame","referenceClip","numTracks","referenceTime","referenceTrack","referenceTrackType","ValueTypeName","targetTrack","find","referenceOffset","referenceValueSize","createInterpolant","isInterpolantFactoryMethodGLTFCubicSpline","targetOffset","targetValueSize","referenceValue","startIndex","endIndex","interpolant","evaluate","resultBuffer","numTimes","valueStart","multiplyQuaternionsFlat","valueEnd","blendMode","Interpolant","parameterPositions","sampleValues","sampleSize","_cachedIndex","settings","DefaultSettings_","pp","validate_interval","seek","linear_scan","forward_scan","giveUpAt","afterEnd_","t1global","beforeStart_","mid","intervalChanged_","interpolate_","copySampleValue_","CubicInterpolant","_weightPrev","_offsetPrev","_weightNext","_offsetNext","endingStart","endingEnd","iPrev","iNext","tPrev","tNext","getSettings_","halfDt","o0","oP","oN","wP","wN","ppp","sP","sN","LinearInterpolant","offset1","offset0","weight1","weight0","DiscreteInterpolant","KeyframeTrack","interpolation","TimeBufferType","ValueBufferType","setInterpolation","DefaultInterpolation","trackType","getInterpolation","factoryMethod","InterpolantFactoryMethodDiscrete","InterpolantFactoryMethodLinear","InterpolantFactoryMethodSmooth","timeOffset","timeScale","startTime","endTime","nKeys","valid","prevTime","currTime","smoothInterpolation","writeIndex","keep","offsetP","offsetN","readOffset","writeOffset","TypedKeyframeTrack","BooleanKeyframeTrack","ColorKeyframeTrack","NumberKeyframeTrack","QuaternionLinearInterpolant","slerpFlat","QuaternionKeyframeTrack","StringKeyframeTrack","VectorKeyframeTrack","AnimationClip","duration","jsonTracks","frameTime","parseKeyframeTrack","clipTracks","morphTargetSequence","noLoop","numMorphTargets","objectOrClipArray","clipArray","o","animationToMorphTargets","pattern","morphTarget","parts","animationMorphTargets","clips","CreateFromMorphTargetSequence","addNonemptyTrack","trackName","animationKeys","propertyName","destTracks","clipName","hierarchyTracks","hierarchy","morphTargetNames","morphTargetName","animationKey","boneName","validate","optimize","typeName","getTrackTypeForValueTypeName","Cache","files","file","LoadingManager","onLoad","onProgress","onError","isLoading","itemsLoaded","itemsTotal","urlModifier","handlers","onStart","itemStart","itemEnd","itemError","resolveURL","setURLModifier","addHandler","regex","loader","removeHandler","getHandler","global","DefaultLoadingManager","Loader","manager","crossOrigin","withCredentials","resourcePath","requestHeader","Promise","resolve","reject","load","loading","FileLoader","setTimeout","dataUriRegexResult","request","mimeType","isBase64","decodeURIComponent","atob","response","responseType","charCodeAt","Blob","parser","DOMParser","parseFromString","XMLHttpRequest","open","callbacks","overrideMimeType","header","setRequestHeader","send","ImageLoader","onImageLoad","onImageError","substr","CubeTextureLoader","urls","setCrossOrigin","setPath","loaded","loadTexture","TextureLoader","isJPEG","search","CurvePath","curves","autoClose","curve","startPoint","endPoint","getLength","curveLengths","getCurveLengths","diff","segmentLength","lens","cacheLengths","sums","getPoints","Path","currentPoint","moveTo","lineTo","aCPx","aCPy","aCP1x","aCP1y","aCP2x","aCP2y","npts","absarc","absellipse","firstPoint","lastPoint","Shape","holesPts","getPointsHoles","Light","HemisphereLight","_projScreenMatrix$1","_lightPositionWorld$1","_lookTarget$1","LightShadow","_frameExtents","_viewportCount","_viewports","shadowMatrix","viewportIndex","SpotLightShadow","isSpotLightShadow","SpotLight","power","_lightPositionWorld","_lookTarget","PointLightShadow","_cubeDirections","_cubeUps","PointLight","OrthographicCamera","scaleW","scaleH","makeOrthographic","DirectionalLightShadow","isDirectionalLightShadow","DirectionalLight","AmbientLight","RectAreaLight","SphericalHarmonics3","coeff","shBasis","isSphericalHarmonics3","LightProbe","LoaderUtils","TextDecoder","decode","fromCharCode","escape","lastIndexOf","InstancedBufferGeometry","InstancedBufferAttribute","createImageBitmap","fetch","fetchOptions","credentials","headers","then","res","blob","colorSpaceConversion","imageBitmap","catch","isImageBitmapLoader","ShapePath","subPaths","currentPath","quadraticCurveTo","bezierCurveTo","splineThru","isCCW","noHoles","toShapesNoHoles","inSubpaths","tmpPath","tmpShape","isPointInsidePolygon","inPolygon","polyLen","edgeLowPt","edgeHighPt","edgeDx","edgeDy","perpEdge","solid","holesFirst","betterShapeHoles","newShapes","tmpPoints","tmpHoles","newShapeHoles","mainIdx","ambiguous","toChange","sIdx","sLen","sho","hIdx","ho","hole_unassigned","s2Idx","froms","tos","Font","text","paths","chars","line_height","yMax","yMin","underlineThickness","char","ret","createPath","createPaths","toShapes","glyph","glyphs","familyName","cpx","cpy","cpx1","cpy1","cpx2","cpy2","outline","_cachedOutline","ha","isFont","AudioContext","webkitAudioContext","AudioLoader","setResponseType","setWithCredentials","bufferCopy","decodeAudioData","audioBuffer","sky","ground","isHemisphereLightProbe","isAmbientLightProbe","Clock","autoStart","oldTime","elapsedTime","running","now","getElapsedTime","getDelta","newTime","performance","Date","Audio","gain","createGain","connect","getInput","autoplay","detune","loop","loopStart","loopEnd","playbackRate","isPlaying","hasPlaybackControl","sourceType","_startedAt","_progress","_connected","filters","audioNode","mediaElement","createMediaElementSource","mediaStream","createMediaStreamSource","play","delay","currentTime","createBufferSource","onended","onEnded","bind","setDetune","setPlaybackRate","getOutput","setTargetAtTime","getFilters","setFilters","PropertyMixer","binding","mixFunction","mixFunctionAdditive","setIdentity","_slerp","_slerpAdditive","_setAdditiveIdentityQuaternion","_workIndex","_select","_setAdditiveIdentityOther","_lerp","_lerpAdditive","_setAdditiveIdentityNumeric","_mixBufferRegion","_mixBufferRegionAdditive","_setIdentity","_origIndex","_addIndex","cumulativeWeight","cumulativeWeightAdditive","useCount","referenceCount","accuIndex","currentWeight","mix","weightAdditive","originalValueOffset","getValue","targetIndex","workOffset","_reservedRe","RegExp","_wordCharOrDot","_directoryRe","_nodeRe","_objectRe","_propertyRe","_trackRe","_supportedObjectNames","PropertyBinding","rootNode","parsedPath","parseTrackName","node","findNode","nodeName","_getValue_unbound","_setValue_unbound","root","isAnimationObjectGroup","Composite","matches","results","objectName","objectIndex","propertyIndex","lastDot","substring","bone","getBoneByName","searchNodeSubtree","childNode","subTreeNode","resolvedProperty","targetObject","dest","targetArray","sourceArray","_getValue_unavailable","_setValue_unavailable","nodeProperty","versioning","Versioning","None","NeedsUpdate","MatrixWorldNeedsUpdate","bindingType","BindingType","Direct","ArrayElement","HasFromToArray","EntireArray","GetterByBindingType","SetterByBindingTypeAndVersioning","targetGroup","optionalParsedPath","_targetGroup","_bindings","subscribe_","firstValidIndex","nCachedObjects_","bindings","unbind","_getValue_direct","_getValue_array","_getValue_arrayElement","_getValue_toArray","_setValue_direct","_setValue_direct_setNeedsUpdate","_setValue_direct_setMatrixWorldNeedsUpdate","_setValue_array","_setValue_array_setNeedsUpdate","_setValue_array_setMatrixWorldNeedsUpdate","_setValue_arrayElement","_setValue_arrayElement_setNeedsUpdate","_setValue_arrayElement_setMatrixWorldNeedsUpdate","_setValue_fromArray","_setValue_fromArray_setNeedsUpdate","_setValue_fromArray_setMatrixWorldNeedsUpdate","_indicesByUUID","_paths","_parsedPaths","_bindingsIndicesByPath","stats","total","indicesByUUID","parsedPaths","nBindings","knownObject","nObjects","nCachedObjects","firstActiveIndex","lastCachedObject","bindingsForPath","lastCached","lastCachedIndex","firstActiveObject","firstActive","lastObject","indicesByPath","lastBindingsIndex","lastBindings","AnimationAction","mixer","localRoot","_mixer","_clip","_localRoot","nTracks","interpolants","interpolantSettings","_interpolantSettings","_interpolants","_propertyBindings","_cacheIndex","_byClipCacheIndex","_timeScaleInterpolant","_weightInterpolant","_loopCount","_startTime","_effectiveTimeScale","_effectiveWeight","repetitions","paused","clampWhenFinished","zeroSlopeAtStart","zeroSlopeAtEnd","_activateAction","_deactivateAction","stopFading","stopWarping","_isActiveAction","_scheduleFading","fadeOutAction","warp","fadeOut","fadeIn","fadeInDuration","fadeOutDuration","startEndRatio","endStartRatio","fadeInAction","crossFadeFrom","weightInterpolant","_takeBackControlInterpolant","action","startTimeScale","endTimeScale","_lendControlInterpolant","timeScaleInterpolant","_root","deltaTime","timeDirection","_updateWeight","timeRunning","_updateTimeScale","clipTime","_updateTime","propertyMixers","accumulateAdditive","accumulate","interpolantValue","loopCount","pingPong","_setEndings","handle_stop","loopDelta","pending","atStart","atEnd","weightNow","weightThen","_initMemoryManager","_accuIndex","prototypeAction","rootUuid","bindingsByRoot","_bindingsByRootAndName","bindingsByName","_addInactiveBinding","clipUuid","actionsForClip","_actionsByClip","_bindAction","knownActions","_addInactiveAction","_lendBinding","saveOriginalState","_lendAction","restoreOriginalState","_takeBackBinding","_takeBackAction","_actions","_nActiveActions","_nActiveBindings","_controlInterpolants","_nActiveControlInterpolants","actions","controlInterpolants","actionsByClip","actionByRoot","lastInactiveAction","cacheIndex","knownActionsForClip","lastKnownAction","byClipCacheIndex","_removeInactiveBindingsForAction","_removeInactiveBinding","prevIndex","lastActiveIndex","firstInactiveAction","firstInactiveIndex","lastActiveAction","bindingByName","propBinding","lastInactiveBinding","firstInactiveBinding","lastActiveBinding","_controlInterpolantsResultBuffer","__cacheIndex","lastActiveInterpolant","optionalRoot","clipObject","findByName","existingAction","newAction","nActions","_update","timeInSeconds","actionsToRemove","_removeInactiveAction","Uniform","Raycaster","LOD","coords","unproject","intersectObject","ascSort","Spherical","other","setFromCartesianCoords","_vector$4","Box2","isBox2","_startP","_startEnd","_vector$2","_boneMatrix","_matrixWorldInv","_floatView","EXTRA_LOD_SIGMA","TOTAL_LODS","LOD_MAX","backgroundMaterial","_lodPlanes","_sizeLods","_sigmas","_createPlanes","lod","sizeLod","sigma","texelSize","cubeFaces","positionSize","uvSize","faceIndexSize","coordinates","fill","construct","fromPoints","setColors","getBoneList","boneList","isSkeletonHelper","extractUrlBase","Handlers","empty","isIntersectionBox","isIntersectionSphere","setFromMatrix","clampToLine","startEnd2","closestPointToPointParameter","flattenToArrayOffset","multiplyVector3","multiplyVector3Array","applyToBufferAttribute","applyToVector3Array","getInverse","extractPosition","getPosition","setRotationFromQuaternion","multiplyToArray","multiplyVector4","rotateAxis","crossVector","rotateX","rotateY","rotateZ","rotateByAxis","makeFrustum","isIntersectionLine","intersectsLine","inverse","isIntersectionPlane","getArea","barycoordFromPoint","midpoint","getMidpoint","prototypenormal","getPlane","extractAllPoints","extrude","makeGeometry","fromAttribute","distanceToManhattan","manhattanDistanceTo","lengthManhattan","setEulerFromRotationMatrix","setEulerFromQuaternion","getPositionFromMatrix","getScaleFromMatrix","getColumnFromMatrix","applyProjection","getChildByName","getObjectByName","renderDepth","getWorldRotation","applyMatrix","eulerOrder","useQuaternion","setDrawMode","drawMode","initBones","setLens","setFocalLength","onlyShadow","shadowCameraFov","shadowCameraLeft","shadowCameraRight","shadowCameraTop","shadowCameraBottom","shadowCameraVisible","shadowDarkness","shadowMapWidth","shadowMapHeight","dynamic","setDynamic","copyIndicesArray","setArray","addIndex","addAttribute","addDrawCall","clearDrawCalls","clearGroups","computeOffsets","removeAttribute","drawcalls","offsets","getArrays","addShapeList","wrapAround","overdraw","wrapRGB","shading","clearTarget","animate","getCurrentRenderTarget","getPrecision","resetGLState","supportsFloatTextures","supportsHalfFloatTextures","supportsStandardDerivatives","supportsCompressedTextureS3TC","supportsCompressedTexturePVRTC","supportsBlendMinMax","supportsInstancedArrays","enableScissorTest","initMaterial","addPrePlugin","addPostPlugin","updateShadowMap","setFaceCulling","allocTextureUnit","setTexture","getActiveMipMapLevel","shadowMapCullFace","vr","gammaInput","gammaOutput","toneMappingWhitePoint","renderReverseSided","renderSingleSided","setBuffer","audio","fftSize","analyser","createAnalyser","frequencyBinCount","getByteFrequencyData","getFrequencyData","getData","updateCubeMap","loadTextureCube","loadCompressedTexture","loadCompressedTextureCube","revision","__THREE__","validateFormat","condition","_len","args","_key","argIndex","framesToPop","absoluteFillObject","absoluteFill","ReactNativePropRegistry","register","style1","style2","flattenStyle","hairlineWidth","canUseDOM","__REACT_DEVTOOLS_GLOBAL_HOOK__","resolveRNStyle","__esModule","Platform","OS","select","web","default","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","arr","die","mockGlobal","getGlobal","globalThis","self","getDescriptor","objectPrototype","EMPTY_ARRAY","EMPTY_OBJECT","hasProxy","Proxy","plainObjectString","assertProxies","once","func","invoked","noop","isFunction","fn","isStringish","isObject","isPlainObject","_proto$constructor","proto","getPrototypeOf","addHiddenProp","propName","addHiddenFinalProp","createInstanceofPredicate","theClass","isES6Map","thing","isES6Set","Set","hasGetOwnPropertySymbols","getPlainObjectKeys","propertyIsEnumerable","Reflect","getOwnPropertyNames","toPrimitive","hasProp","prop","hasOwnProperty","_defineProperties","descriptor","_createClass","Constructor","protoProps","staticProps","_extends","_inheritsLoose","subClass","superClass","_assertThisInitialized","ReferenceError","_arrayLikeToArray","arr2","_createForOfIteratorHelperLoose","allowArrayLike","it","Symbol","iterator","minLen","_unsupportedIterableToArray","done","storedAnnotationsSymbol","createDecoratorAnnotation","annotation","storeAnnotation","annotationType_","isOverride","$mobx","Atom","name_","isPendingUnobservation_","isBeingObserved_","observers_","diffValue_","lastAccessedBy_","lowestObserverState_","IDerivationState_","NOT_TRACKING_","onBOL","onBUOL","_proto","onBO","onBUO","reportObserved","reportChanged","startBatch","propagateChanged","endBatch","isAtom","createAtom","onBecomeObservedHandler","onBecomeUnobservedHandler","arg3","atom","interceptHook","onBecomeUnobserved","comparer","structural","deepEqual","is","shallow","deepEnhancer","_","isObservable","observable","referenceEnhancer","createActionAnnotation","options_","make_","make_$1","extend_","extend_$1","adm","_this$options_$bound","_this$options_","_adm$target_$storedAn","annotated","target_","bound","actionDescriptor","createActionDescriptor","defineProperty_","isAction","_actionDescriptor","recordAnnotationApplied","proxyTrap","safeDescriptors","_annotation$options_","_annotation$options_$","_annotation$options_2","_annotation$options_$2","_annotation$options_3","_ref2","_adm$proxy_","proxy_","createAction","autoAction","isPlainObject_","createFlowAnnotation","make_$2","extend_$2","isFlow","flowDescriptor","createFlowDescriptor","_flowDescriptor","flow","createComputedAnnotation","make_$3","extend_$3","assertComputedDescriptor","defineComputedProperty_","_ref","createObservableAnnotation","make_$4","extend_$4","_this$options_$enhanc","assertObservableDescriptor","defineObservableProperty_","enhancer","_this$options_$enhanc2","_this$options_2","defaultCreateObservableOptions","deep","defaultDecorator","proxy","asCreateObservableOptions","observableAnnotation","observableRefAnnotation","observableShallowAnnotation","isObservableObject","isObservableArray","isObservableMap","isObservableSet","observableStructAnnotation","oldValue","observableDecoratorAnnotation","getEnhancerFromOptions","getEnhancerFromAnnotation","createObservable","arg2","_getDescriptor$config","_getDescriptor","ObservableValue","initialValues","useProxies","createLegacyArray","createObservableArray","ObservableMap","ObservableSet","decorators","extendObservable","asObservableObject","_target$$mobx","_target$$mobx$proxy_","objectProxyTraps","asDynamicObservableObject","struct","computedAnnotation","computedStructAnnotation","computed","arg1","opts","ComputedValue","_Symbol$toPrimitive","currentActionId","nextActionId","isFunctionNameConfigurable","tmpNameDescriptor","actionName","executeAction","isMobxAction","canRunAsDerivation","runInfo","prevDerivation_","trackingDerivation","runAsAction","prevAllowStateChanges_","allowStateChanges","untrackedStart","allowStateChangesStart","prevAllowStateReads_","allowStateReadsStart","runAsAction_","notifySpy_","startTime_","actionId_","parentActionId_","_startAction","error_","suppressReactionErrors","allowStateChangesEnd","allowStateReadsEnd","untrackedEnd","_endAction","_Symbol$toPrimitive$1","_Atom","notifySpy","hasUnreportedChange_","interceptors_","changeListeners_","value_","dehancer","dehanceValue","prepareNewValue_","UNCHANGED","setNewValue_","checkIfStateModificationsAreAllowed","hasInterceptors","change","interceptChange","UPDATE","hasListeners","notifyListeners","intercept_","handler","registerInterceptor","observe_","fireImmediately","observableKind","debugObjectName","registerListener","raw","valueOf","isObservableValue","TraceMode","dependenciesState_","observing_","newObserving_","runId_","UP_TO_DATE_","unboundDepsCount_","CaughtException","triggeredBy_","isComputing_","isRunningSetter_","derivation","setter_","isTracing_","NONE","scope_","equals_","requiresReaction_","keepAlive_","compareStructural","requiresReaction","keepAlive","onBecomeStale_","POSSIBLY_STALE_","propagateMaybeChanged","inBatch","shouldCompute","prevTrackingContext","trackingContext","trackAndCompute","STALE_","propagateChangeConfirmed","warnAboutUntrackedRead_","computeValue_","isCaughtException","cause","wasSuspended","changed","trackDerivedFunction","disableErrorBoundaries","suspend_","clearObserving","firstTime","prevValue","autorun","prevU","isComputedValue","prevAllowStateReads","prevUntracked","obs","changeDependenciesStateTo0","runId","prevTracking","prevObserving","observing","lowestNewObservingDerivationState","dep","_dep","removeObserver","_dep2","addObserver","bindDependencies","untracked","allowStateReads","MobXGlobals","mobxGuid","pendingUnobservations","pendingReactions","isRunningReactions","enforceActions","spyListeners","globalReactionErrorHandlers","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","verifyProxies","canMergeGlobalState","isolateCalled","__mobxInstanceCount","__mobxGlobals","getGlobalState","queueForUnobservation","runReactions","Reaction","onInvalidate_","errorHandler_","requiresObservable_","isDisposed_","isScheduled_","isTrackPending_","isRunning_","schedule_","isScheduled","runReaction_","reportExceptionInDerivation_","prevReaction","getDisposer_","enterBreakPoint","getAtomFromArgs","BREAK","LOG","reactionScheduler","runReactionsHelper","allReactions","iterations","remainingReactions","isReaction","actionAnnotation","actionBoundAnnotation","autoActionAnnotation","autoActionBoundAnnotation","createActionFactory","runInAction","_opts$name","_opts","reaction","scheduler","reactionRunner","requiresObservable","createSchedulerFromOptions","run","expression","effect","_opts$name2","errorHandler","baseFn","effectAction","runSync","nextValue","hook","getAtom","listenersKey","hookListeners","configure","isolateGlobalState","ea","baseScheduler","setReactionScheduler","annotations","descriptors","getDependencyTree","nodeToDependencyTree","dependencies","generatorId","FlowCancellationError","flowAnnotation","rejector","ctx","gen","pendingPromise","promise","stepId","onFulfilled","onRejected","cancel","cancelPromise","_res","yieldedPromise","isMobXFlow","interceptReads","propOrHandler","getAdministration","intercept","interceptProperty","interceptInterceptable","_isComputed","values_","isComputedProp","_isObservable","isObservableProp","keys_","entries","set_","_values","observe","propOrCb","cbOrFire","observeObservableProperty","observeObservable","transaction","thisArg","getAdm","has_","get_","_getAdm$set_","deleteProperty","_getAdm$delete_","delete_","_getAdm$definePropert","ownKeys_","preventExtensions","interceptable","interceptors","idx","listenable","makeObservable","collectStoredAnnotations","arrayTraps","getArrayLength_","arrayExtensions","setArrayLength_","ObservableArrayAdministration","owned_","legacyMode_","atom_","enhancer_","lastKnownLength_","newV","oldV","dehanceValue_","dehanceValues_","addedCount","removedCount","newLength","currentLength","newItems","spliceWithArray_","updateArrayLength_","oldLength","reserveArrayBuffer","deleteCount","lengthDelta","spliceItemsIntoValues_","notifyArraySplice_","_this$values_","oldItems","_i","notifyArrayChildUpdate_","notify","owned","spliceWithArray","_len2","items","_key2","_len3","_key3","addArrayExtension","funcName","funcFactory","simpleFunc","dehancedValues","mapLikeFunc","_this2","reduceLikeFunc","_this3","accumulator","_Symbol$iterator","_Symbol$toStringTag","isObservableArrayAdministration","ObservableMapMarker","ADD","toStringTag","_Symbol$iterator$1","_Symbol$toStringTag$1","initialData","data_","hasMap_","keysAtom_","entry","newEntry","hasKey","updateValue_","addValue_","_change","updateHasMapEntry_","makeIterable","_keys$next","_keys$next2","_step","_iterator","_step$value","_this4","_this5","_step2","_iterator2","_this6","_step3","replacementMap","dataStructure","convertToMap","orderedData","keysReportChangedCalled","_iterator3","_step4","_iterator4","_step4$value","_value","keyExisted","_value2","iter1","iter2","next1","next2","ObservableSetMarker","callbackFn","_change2","observableValues","inferredAnnotationsSymbol","descriptorCache","ObservableObjectAdministration","defaultAnnotation_","autoBind_","appliedAnnotations_","pendingKeys_","getObservablePropValue_","setObservablePropValue_","inferAnnotation_","assertAnnotable","inferAnnotationFromDescriptor","outcome","_this$target_$inferre","closestProto","deleteOutcome","notifyPropertyAddition_","cachedDescriptor","getCachedObservablePropDescriptor","_observable","_this$pendingKeys_","_this$pendingKeys_$ge","_observable2","_this$pendingKeys_2","_this$pendingKeys_2$g","_options$name","getAnnotationFromOptions","autoBind","isObservableObjectAdministration","ctor","OBSERVABLE_ARRAY_BUFFER_SIZE","StubArray","setPrototypeOf","LegacyObservableArray","_StubArray","arrays","createArrayBufferItem","createArrayEntryDescriptor","getDebugName","named","eq","aStack","bStack","className","unwrap","areArrays","aCtor","bCtor","getSelf","desc","defaultAnnotation","isGenerator","__MOBX_DEVTOOLS_GLOBAL_HOOK__","injectMobx","spy","extras","Function","attachNativeEvent","viewRef","eventName","argMapping","eventMappings","invariant","nativeEvent","AnimatedValue","__makeNative","nativeEventPath","animatedValueTag","__getNativeTag","viewTag","findNodeHandle","NativeAnimatedHelper","API","addAnimatedEventToView","detach","removeAnimatedEventFromView","AnimatedEvent","config","_argMapping","useNativeDriver","__addListener","_callListeners","_attachedEvent","__isNative","shouldUseNativeDriver","__removeListener","__attach","__detach","__getHandler","recMapping","recEvt","mappingKey","_key4","_setPrototypeOf","AnimatedTransform","_AnimatedWithChildren","transforms","_transforms","AnimatedNode","__getValue","__getAnimatedValue","__addChild","__removeChild","__getNativeConfig","transConfigs","nodeTag","transformDataType","validateTransform","AnimatedWithChildren","AnimatedStyle","_style","_walkStyleAndGetValues","updatedStyle","_walkStyleAndGetAnimatedValues","styleConfig","styleKey","validateStyles","AnimatedProps","_AnimatedNode","_props","_callback","_animatedView","__disconnectAnimatedView","__connectAnimatedView","setNativeView","animatedView","nativeViewTag","connectAnimatedNodeToView","disconnectAnimatedNodeFromView","__restoreDefaultValues","restoreDefaultValues","propsConfig","propKey","setAndForwardRef","getForwardedRef","setLocalRef","_objectWithoutPropertiesLoose","excluded","sourceKeys","animatedComponentNextId","createAnimatedComponent","Component","isReactComponent","AnimatedComponent","_React$Component","_invokeAnimatedPropsCallbackOnMount","_eventDetachers","_animatedComponentId","_isFabric","_this$_component$_int","_this$_component$_int2","_this$_component$getN","_this$_component$getN2","_this$_component$getS","_this$_component$getS2","_component","stateNode","canonical","getNativeScrollRef","getScrollResponder","_waitForUpdate","setWaitingForIdentifier","_markUpdateComplete","unsetWaitingForIdentifier","_animatedPropsCallback","setNativeProps","forceUpdate","_propsAnimated","_setComponentRef","_prevComponent","getNode","_ref$constructor$name","_attachNativeEvents","_this$_component","scrollableNode","getScrollableNode","_loop","_detachNativeEvents","_attachProps","nextProps","oldPropsAnimated","_props$collapsable","_props$nativeID","_ref$style","passthroughAnimatedPropExplicitValues","_ref2$style","passthruStyle","passthruProps","mergedStyle","forceNativeIdFabric","collapsable","collapsableProps","nativeID","UNSAFE_componentWillMount","componentDidMount","UNSAFE_componentWillReceiveProps","newProps","componentDidUpdate","prevProps","componentWillUnmount","FlatList","scrollEventThrottle","Image","ScrollView","SectionList","Text","AnimatedAddition","_a","_b","interpolate","AnimatedInterpolation","input","AnimatedDiffClamp","_min","_max","_lastValue","AnimatedDivision","_warnedAboutDivideByZero","AnimatedModulo","modulus","_modulus","AnimatedMultiplication","AnimatedSubtraction","AnimatedTracking","animationClass","animationConfig","_parent","_animationClass","_animationConfig","_useNativeDriver","toValue","__getNativeAnimationConfig","animationId","generateNewAnimationId","_combineCallbacks","onComplete","maybeVectorAnim","anim","AnimatedValueXY","configX","configY","_config$key","parallel","stopTogether","timing","_start2","animatedValue","configuration","singleValue","singleConfig","stopTracking","TimingAnimation","stopAnimation","resetAnimation","_startNativeLoop","_isUsingNativeDriver","sequence","finished","doneCount","hasEnded","endResult","Value","ValueXY","Interpolation","_start3","DecayAnimation","spring","SpringAnimation","subtract","divide","modulo","diffClamp","stagger","_temp","_ref$iterations","_ref$resetBeforeItera","resetBeforeIteration","isFinished","iterationsSoFar","restart","animatedEvent","forkEvent","unforkEvent","Event","__PropsOnlyForTests","emptyAnimation","anyValue","AnimatedImplementation","isTesting","AnimatedMock","Animated","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","attachEvent","canUseViewport","screen","isInWorker","_ease","float32ArraySupported","A","aA1","aA2","C","calcBezier","aT","getSlope","bezier","mX1","mY1","mX2","mY2","getTForX","intervalStart","currentSample","kSplineTableSize","guessForT","initialSlope","_aGuessT","aGuessT","currentSlope","newtonRaphsonIterate","_aA","_aB","currentX","currentT","aA","aB","binarySubdivide","Easing","step0","step1","linear","ease","quad","cubic","poly","circle","exp","elastic","bounciness","back","bounce","_t","_t2","_bezier","in","easing","out","inOut","nativeEventEmitter","NativeAnimatedModule","RN$Bridgeless","NativeAnimatedTurboModule","NativeAnimatedNonTurboModule","__nativeAnimatedNodeTagCount","__nativeAnimationIdCount","waitingForQueuedOperations","queueOperations","tag","saveValueCallback","disableQueue","startOperationBatch","finishOperationBatch","queueOperation","createAnimatedNode","startListeningToAnimatedNodeValue","stopListeningToAnimatedNodeValue","connectAnimatedNodes","parentTag","childTag","disconnectAnimatedNodes","startAnimatingNode","endCallback","setAnimatedNodeValue","setAnimatedNodeOffset","flattenAnimatedNodeOffset","extractAnimatedNodeOffset","dropAnimatedNode","eventMapping","animatedNodeTag","SUPPORTED_STYLES","borderRadius","borderBottomEndRadius","borderBottomLeftRadius","borderBottomRightRadius","borderBottomStartRadius","borderTopEndRadius","borderTopLeftRadius","borderTopRightRadius","borderTopStartRadius","elevation","shadowOpacity","translateY","SUPPORTED_TRANSFORMS","rotate","perspective","SUPPORTED_INTERPOLATION_PARAMS","inputRange","outputRange","extrapolate","extrapolateRight","extrapolateLeft","_warnedMissingNativeAnimated","addWhitelistedStyleProp","addWhitelistedTransformProp","addWhitelistedInterpolationParam","param","configs","validateInterpolation","generateNewNodeTag","assertNativeAnimatedModule","NativeEventEmitter","objectWithoutPropertiesLoose","sourceSymbolKeys","_getPrototypeOf","instance","NativeAnimatedAPI","_uniqueId","__nativeTag","__getChildren","_startListeningToNativeValueUpdates","addListener","removeListener","_stopListeningForNativeValueUpdates","removeAllListeners","__nativeAnimatedValueListener","__shouldUpdateListenersForNewNativeTag","_onAnimatedValueUpdateReceived","__callListeners","_this$__nativeTag","nativeTag","arrayWithoutHoles","iterableToArray","nonIterableSpread","_typeof","assertThisInitialized","_startingValue","_animation","_updateValue","setOffset","flattenOffset","extractOffset","handle","__isInteraction","InteractionManager","createInteractionHandle","previousAnimation","clearInteractionHandle","_tracking","tracking","flush","animatedStyles","findAnimatedStyles","animatedStyle","_flush","defaultProps","dataSet","suppressHydrationWarning","testID","accessibilityProps","accessibilityActiveDescendant","accessibilityAtomic","accessibilityAutoComplete","accessibilityBusy","accessibilityChecked","accessibilityColumnCount","accessibilityColumnIndex","accessibilityColumnSpan","accessibilityControls","accessibilityCurrent","accessibilityDescribedBy","accessibilityDetails","accessibilityDisabled","accessibilityErrorMessage","accessibilityExpanded","accessibilityFlowTo","accessibilityHasPopup","accessibilityHidden","accessibilityInvalid","accessibilityKeyShortcuts","accessibilityLabel","accessibilityLabelledBy","accessibilityLevel","accessibilityLiveRegion","accessibilityModal","accessibilityMultiline","accessibilityMultiSelectable","accessibilityOrientation","accessibilityOwns","accessibilityPlaceholder","accessibilityPosInSet","accessibilityPressed","accessibilityReadOnly","accessibilityRequired","accessibilityRole","accessibilityRoleDescription","accessibilityRowCount","accessibilityRowIndex","accessibilityRowSpan","accessibilitySelected","accessibilitySetSize","accessibilitySort","accessibilityValueMax","accessibilityValueMin","accessibilityValueNow","accessibilityValueText","focusable","accessible","accessibilityState","accessibilityValue","clickProps","onClick","onClickCapture","onContextMenu","focusProps","onBlur","onFocus","keyboardProps","onKeyDown","onKeyDownCapture","onKeyUp","onKeyUpCapture","mouseProps","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOver","onMouseOut","onMouseUp","touchProps","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","styleProps","dangerousStyleValue","isCustomProperty","isUnitlessNumber","setValueForStyles","styleName","styleValue","setProperty","getRect","_getBoundingClientRec","getBoundingClientRect","offsetWidth","offsetHeight","_measureLayout","relativeToNativeNode","relativeNode","parentNode","relativeRect","_getRect","focusableElements","INPUT","SELECT","TEXTAREA","UIManager","blur","measure","measureInWindow","_getRect2","measureLayout","onFail","onSuccess","updateView","configureNextLayoutAnimation","onAnimationDidEnd","setLayoutAnimationEnabledExperimental","Hook","livelinessChecking","getLivelinessChecking","extendStatics","__extends","__","__assign","__values","__read","ar","__spread","getType","assertIsStateTreeNode","getStateTreeNode","onSnapshot","assertIsFunction","applyPatch","patch","assertArg","applyPatches","asArray","getSnapshot","applyPostProcess","snapshot","getRoot","storedValue","getEnv","env","BaseNode","subpath","NodeLifeCycle","INITIALIZING","baseSetParent","_subpath","_subpathUponDeath","_pathUponDeath","val","wasAlive","isAlive","aliveAtom","_hookSubscribers","emit","hookHandler","EventHandlers","_escapedSubpath","pathAtom","getEscapedPath","escapeJsonPath","DEAD","DETACHING","whenFinalized","CREATED","FINALIZED","fireHook","afterAttach","clearAll","beforeDestroy","ScalarNode","_super","simpleType","initialSnapshot","createNewInstance","finalizeCreation","fail$1","newParent","parentChanged","subpathChanged","pathUponDeath","aboutToDie","finalizeDeath","baseFinalizeCreation","baseAboutToDie","baseFinalizeDeath","fireInternalHook","TypeFlags","nextNodeId","snapshotReactionOptions","ObjectNode","complexType","initialValue","_snapshotComputed","unbox","_initialSnapshot","identifierAttribute","identifierCache","IdentifierCache","_childNodes","initializeChildNodes","identifier","unnormalizedIdentifier","normalizeIdentifier","addNodeToCache","patches","createObservableInstanceIfNeeded","_applyPatches","_applySnapshot","_observableInstanceState","createObservableInstance","e_1","parentChain","parentChain_1","parentChain_1_1","e_1_1","return","preboot","_isRunningAction","finalizeNewInstance","_addSnapshotReaction","afterCreate","beforeDetach","previousState","newEnv","newIdCache","splitCache","removeChild","mergeCache","_getActualSnapshot","_getCachedInitialSnapshot","_snapshotUponDeath","_cachedInitialSnapshotCreated","childNodes","_cachedInitialSnapshot","processInitialSnapshot","isRunningAction","_getAssertAliveError","warnError","escapedPath","actionContext","getCurrentActionContext","parentActionEvent","actionFullPath","assertAlive","_autoUnbox","getChildNode","getChildren","convertChildNodesToArray","getChildType","isProtectionEnabled","isProtected","subpathUponDeath","e_2","_c","e_2_1","afterCreationFinalization","clearParent","createActionInvoker","splitJsonPath","resolveNodeByPathParts","applyPatchLocally","applySnapshot","_internalEventsEmit","_internalEventsClear","notifyDied","_internalEventsClearAll","onChange","_internalEventsRegister","basePatch","_internalEventsHasSubscribers","stripPatch","invertPatch","splitPatch","extend","reversePatch","emitPatch","disposer","_internalEventsHas","hasDisposer","_internalEventsUnregister","middleware","middlewares","includeHooks","removeMiddleware","assertWritable","_hasSnapshotReaction","snapshotDisposer","emitSnapshot","addDisposer","_internalEvents","hasSubscribers","eventHandler","atTheBeginning","unregister","$type","BaseType","typecheckInternal","instantiate","getStateTreeNodeSafe","valueType","isAssignableFrom","typeCheckSuccess","typeCheckFailure","isValidSnapshot","ComplexType","getDefaultSnapshot","isDetaching","isStateTreeNode","isMutable","tryToReconcileNode","setParent","newNode","SimpleType","isType","assertIsType","argNumber","RunningAction","hooks","onFinish","flowsPending","currentActionContext","getNextActionId","runWithActionContext","baseIsRunningAction","previousContext","baseCall","originalFn","CollectedMiddlewares","runNextMiddleware","getNextMiddleware","call2","runMiddleWares","getParentActionContext","parentContext","parentActionContext","argsToArray","tree","rootId","parentId","allParentIds","parentEvent","_isMSTAction","$mst_middleware","arrayIndex","item","inArrayIndex","prettyPrintValue","safeStringify","toErrorString","fullPath","pathPrefix","currentTypename","isPrimitive","isSnapshotCompatible","flags","Integer","Boolean","isPrimitiveType","describe","getContextForPath","flattenTypeErrors","errors","reduce","process","ENABLE_TYPE_CHECK","valueInString","validationErrorsToString","typecheck","identifierCacheId","lcm","lastCacheModificationPerId","modificationId","cacheId","lastCacheUpdate","mobxShallow","updateLastCacheModificationPerId","nodes","basePath","modified","some","candidate","createObjectNode","existingNode","createScalarNode","isNode","$treenode","base","pathParts","failIfResolveFails","part","joinJsonPath","includeDate","EventHandler","eventHandlers","stringStartsWith","str","beginning","deprecated","msg","assertIsString","canBeEmpty","op","unescapeJsonPath","getPathStr","ids","SnapshotProcessor","_subtype","_processors","sn","preProcessor","postProcessor","nodeType","snapshotProcessorType","methods","methods_1","methods_1_1","proxyNodeTypeMethods","oldGetSnapshot","postProcessSnapshot","processedInitialValue","preProcessSnapshot","_fixNode","reconcile","processedSn","MapIdentifierMode","needsIdentifierError","MSTMap","mapNode","mapType","identifierMode","YES","mapIdentifierAttribute","isValidIdentifier","put","MapType","_subType","hookInitializers","UNKNOWN","_determineIdentifierMode","modelTypes","tryCollectModelTypes","subtypes","getSubTypes","subtypesArray","subtypesArray_1","subtypesArray_1_1","ModelType","identifierAttribute_1","NO","objNode","subType","initializer","actionInvoker","willChange","didChange","processIdentifier","expected","processed","oldSnapshot","currentKeys","ArrayType","updatedNodes","reconcileArrayChildren","index_1","addedNodes","childType","oldNodes","newValues","newPaths","nothingChanged","hasNewNode","oldNode","newPath","areSame","valueAsNode","oldMatch","getNewNode","objectTypeToString","defaultObjectOptions","initializers","toPropertiesObject","declaredProps","optional","number","DatePrimitive","getPrimitiveFactoryFromValue","cloneAndEnhance","currentPreprocessor","currentPostprocessor","propertyNames","_getIdentifierAttribute","forAllProps","propType","Identifier","instantiateActions","action2","baseAction","specializedAction_1","boundAction","instantiateVolatileState","rest","__rest","instantiateViews","computedValue","setter","applySnapshotPreProcessor","chg","oldChildValue","applySnapshotPostProcessor","preProcessedSnapshot","processor","isModelType","CoreType","checker","integer","nullType","Null","undefinedType","Undefined","_DatePrimitive","getTime","Literal","literal","Refinement","_predicate","_message","subtypeErrors","Union","_types","eager","dispatcher","_dispatcher","_eager","factory","determineType","reconcileCurrentType","allErrors","applicableTypes","optionsOrType","otherTypes","types","OptionalValue","_defaultValue","optionalValues","Optional","defaultInstanceOrSnapshot","getDefaultInstanceOrSnapshot","defaultValueOrFunction","checkOptionalPreconditions","undefinedAsOptionalValues","optionalUndefinedType","optionalNullType","maybe","Late","_definition","mustSucceed","getSubType","subtype","Frozen","isSerializable","untypedFrozenInstance","StoredReference","targetType","targetNode","normalizedId","lastCacheModification","getLastCacheModificationPerId","resolvedReference","InvalidReferenceError","updateResolvedReference","BaseReferenceType","onInvalidated","Reference","storedRefNode","referenceId","refTargetNode","storedRefParentNode","storedRefParentValue","invalidTarget","invalidId","replaceRef","newRef","removeRef","refTargetValue","refTargetNodeHook","getInvalidationCause","fireInvalidated","refTargetDetachHookDisposer","registerHook","refTargetDestroyHookDisposer","customGetSet","onRefTargetDestroyedHookDisposer","startWatching","sync","addTargetNodeWatcher","IdentifierReferenceType","resolvedValue","storedRef","watchTargetNodeForInvalidations","compareByValue","CustomReferenceType","newIdentifier","reference","getSetOptions","BaseIdentifierType","validType","IdentifierType","IdentifierNumberType","identifierNumber","CustomType","Custom","isTargetType","typeError","getValidationMessage","toSnapshot","fromSnapshot","isSnapshot","valueToStore","enumeration","realOptions","option","model","hasTypename","cur","custom","safeReference","refType","ev","acceptsUndefined","maybeNull","refinement","predicate","frozen","arg","late","nameOrType","maybeType","null","snapshotProcessor","processors","component","accessibilityComponent","AccessibilityUtil","propsToAccessibilityComponent","domProps","createDOMProps","_children","dimensions","fontScale","Dimensions","dimension","initialDimensions","win","docEl","documentElement","clientHeight","devicePixelRatio","clientWidth","_handler","createInterpolation","stringShapeRegex","checkPattern","colorToRgba","outputRanges","interpolations","shouldRound","range","startsWith","createInterpolationFromStringOutputRange","checkInfiniteRange","checkValidInputRange","findRange","inputMin","inputMax","outputMin","outputMax","normalizedColor","normalizeColor","_config","_interpolation","parentValue","__transformDataType","__createInterpolation","doLeftAndRightSwapInRTL","isPreferredLanguageRTL","isRTLAllowed","isRTLForced","isRTL","onDirectionChange","I18nManager","allowRTL","bool","forceRTL","getConstants","setPreferredLanguageRTL","swapLeftAndRightInRTL","mergeRefs","assets","getAssetByID","assetId","dataUriPattern","ImageUriCache","uri","_entries","lastUsedTimestamp","refCount","_cleanUpIfNeeded","leastRecentlyUsedKey","leastRecentlyUsedEntry","imageUris","_maximumEntries","requests","abort","onerror","onload","success","failure","interval","setInterval","clearInterval","naturalHeight","naturalWidth","onDecode","prefetch","queryCache","uris","_filterId","svgDataUriPattern","resolveAssetUri","asset","scales","preferredScale","PixelRatio","curr","scaleSuffix","httpServerLocation","svg","encodeURIComponent","blurRadius","defaultSource","draggable","onLoadEnd","onLoadStart","_React$useState","updateState","_React$useState2","layout","updateLayout","hiddenImageRef","filterRef","requestRef","shouldDisplaySource","_getFlatStyle","filterId","flatStyle","resizeMode","shadowOffset","tintColor","_filter","shadowString","resolveShadowValue","shadowColor","overlayColor","getFlatStyle","_resizeMode","selectedSource","displayImageUri","imageSizeStyle","_getAssetByID","resolveAssetDimensions","backgroundImage","backgroundSize","_hiddenImageRef$curre","_height3","_width3","getBackgroundSize","hiddenImage","alt","classes","accessibilityImage","abortPendingRequest","_layout","resizeModeStyles","visibility","floodColor","in2","operator","createTintColorSVG","ImageWithStatics","overflow","backgroundColor","backgroundPosition","backgroundRepeat","contain","cover","none","stretch","_curry1","_isPlaceholder","f2","NavigationBuilderContext","onDispatchAction","onOptionsChange","nanoid","STYLE_ELEMENT_ID","STYLE_GROUPS","modality","classicReset","classic","atomic","borderColor","borderStyle","borderWidth","flex","overscrollBehavior","marginHorizontal","marginVertical","paddingHorizontal","paddingVertical","STYLE_SHORT_FORM_EXPANSIONS","MONOSPACE_FONT_STACK","SYSTEM_FONT_STACK","NavigationContext","transitionProperty","transitionDuration","userSelect","actionable","cursor","touchAction","MemoedTouchableOpacity","activeOpacity","delayPressIn","delayPressOut","delayLongPress","disabled","onLongPress","onPress","onPressIn","onPressOut","rejectResponderTermination","useRef","_useState","useState","setDuration","_useState2","opacityOverride","setOpacityOverride","setOpacityTo","useCallback","setOpacityActive","setOpacityInactive","pressConfig","useMemo","cancelable","delayPressStart","delayPressEnd","onPressStart","isGrant","dispatchConfig","registrationName","onPressEnd","pressEventHandlers","usePressEvents","findDOMNode","colorProps","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","textDecorationColor","textShadowColor","normalizeValueWithProperty","returnValue","unitlessNumbers","isUndefined","isArrayBuffer","isBuffer","isFormData","FormData","isArrayBufferView","isString","isNumber","isDate","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","navigator","product","assignValue","stripBOM","content","emptyObject","ScrollResponder","Mixin","scrollResponderMixinGetInitialState","isTouching","lastMomentumScrollBeginTime","lastMomentumScrollEndTime","observedScrollSinceBecomingResponder","becameResponderWhileAnimating","scrollResponderHandleScrollShouldSetResponder","scrollResponderHandleStartShouldSetResponder","scrollResponderHandleStartShouldSetResponderCapture","scrollResponderIsAnimating","scrollResponderHandleResponderReject","warning","scrollResponderHandleTerminationRequest","scrollResponderHandleTouchEnd","touches","scrollResponderHandleResponderRelease","currentlyFocusedTextInput","TextInputState","currentlyFocusedField","keyboardShouldPersistTaps","onScrollResponderKeyboardDismissed","blurTextInput","scrollResponderHandleScroll","scrollResponderHandleResponderGrant","scrollResponderHandleScrollBeginDrag","onScrollBeginDrag","scrollResponderHandleScrollEndDrag","onScrollEndDrag","scrollResponderHandleMomentumScrollBegin","onMomentumScrollBegin","scrollResponderHandleMomentumScrollEnd","onMomentumScrollEnd","scrollResponderHandleTouchStart","scrollResponderHandleTouchMove","scrollResponderGetScrollableNode","scrollResponderScrollTo","animated","scroll","behavior","scrollLeft","scrollTop","scrollResponderZoomTo","rect","scrollResponderFlashScrollIndicators","scrollResponderScrollNativeHandleToKeyboard","nodeHandle","additionalOffset","preventNegativeScrollOffset","additionalScrollOffset","getInnerViewNode","scrollResponderTextInputFocusError","scrollResponderInputMeasureAndScrollToKeyboard","keyboardScreenY","keyboardWillOpenTo","endCoordinates","screenY","scrollOffsetY","scrollResponderKeyboardWillShow","onKeyboardWillShow","scrollResponderKeyboardWillHide","onKeyboardWillHide","scrollResponderKeyboardDidShow","onKeyboardDidShow","scrollResponderKeyboardDidHide","onKeyboardDidHide","normalizeScrollEvent","contentOffset","contentSize","scrollHeight","scrollWidth","layoutMeasurement","timeStamp","ScrollViewBase","_props$scrollEnabled","scrollEnabled","_props$scrollEventThr","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","scrollState","isScrolling","scrollLastTick","scrollTimeout","scrollRef","createPreventableScrollHandler","handleScrollTick","hideScrollbar","stopPropagation","persist","clearTimeout","handleScrollEnd","lastTick","eventThrottle","timeSinceLastTick","shouldEmitScrollEvent","handleScrollStart","scrollDisabled","overflowX","overflowY","scrollbarWidth","createReactClass","mixins","getInitialState","flashScrollIndicators","_scrollNodeRef","getInnerViewRef","_innerViewRef","scrollTo","scrollToEnd","horizontal","scrollResponder","scrollResponderNode","_this$props","contentContainerStyle","onContentSizeChange","refreshControl","stickyHeaderIndices","pagingEnabled","keyboardDismissMode","contentSizeChangeProps","_handleContentOnLayout","hasStickyHeaderIndices","Children","isSticky","stickyHeader","pagingEnabledChild","contentContainer","_setInnerViewRef","contentContainerHorizontal","baseStyle","baseHorizontal","baseVertical","pagingEnabledStyle","pagingEnabledHorizontal","pagingEnabledVertical","_handleScroll","scrollResponderHandleTerminate","ScrollViewClass","scrollView","_setScrollNodeRef","cloneElement","_e$nativeEvent$layout","dismissKeyboard","commonStyle","flexGrow","WebkitOverflowScrolling","scrollSnapType","scrollSnapAlign","ForwardedScrollView","forwardRef","_slicedToArray","_arrayWithHoles","_s","_e","_arr","_n","_d","_iterableToArrayLimit","_nonIterableRest","Prop","_ref$default","defaultVal","_ref$triggerUpdate","triggerUpdate","_ref$onChange","newVal","_classCallCheck","_ref2$stateInit","stateInit","_ref2$props","rawProps","_ref2$methods","_ref2$aliases","aliases","_ref2$init","initFn","_ref2$update","updateFn","initialised","changedProps","comp","nodeElement","initStatic","digest","_ref3","_ref3$triggerUpdate","redigest","_ref3$onChange","_ref3$defaultVal","curVal","getSetProp","_methods$methodName","_ref4","_ref5","alias","resetProps","_rerender","isSupported","requestIdleCallback","didTimeout","timeRemaining","cancelIdleCallback","Events","interactionStart","interactionComplete","runAfterInteractions","task","f1","numberOfLines","selectable","textHasAncestor","textOneLine","textMultiLine","WebkitLineClamp","notSelectable","pressable","Provider","font","whiteSpace","wordWrap","maxWidth","textOverflow","WebkitBoxOrient","defaultNoopBatch","printDebugValue","FinalizationRegistryLocal","FinalizationRegistry","createTrackingData","mounted","changedBeforeMount","cleanAt","CLEANUP_LEAKED_REACTIONS_AFTER_MILLIS","cleanupTokenToReactionTrackingMap","globalCleanupTokensCounter","registry","token","trackedReaction","addReactionToTrack","reactionTrackingRef","objectRetainedByReact","finalizationRegistryCleanupToken","recordReactionAsCommitted","reactionRef","forceCleanupTimerToRunNowForTests","resetCleanupScheduleForTests","createReactionCleanupTrackingUsingFinalizationRegister","reactionCleanupHandle","uncommittedReactionRefs","ensureCleanupTimerRunning","cleanUncommittedReactions","uncommittedReactionRefs_1","uncommittedReactionRefs_1_1","createTimerBasedReactionCleanupTracking","globalIsUsingStaticRendering","isUsingStaticRendering","observerComponentNameFor","baseComponentName","ObjectToBeRetainedByReact","useObserver","setTick","tick","useForceUpdate","newReaction","trackingData_1","rendering","exception","useDebugValue","useEffect","observer","baseComponent","memoComponent","wrappedComponent","hoistBlackList","$$typeof","compare","autoCapitalize","autoComplete","autoCorrect","autoFocus","defaultValue","maxLength","readOnly","rows","spellCheck","TextInput","inputMode","_props$autoCapitalize","autoCompleteType","_props$autoCorrect","blurOnSubmit","clearTextOnFocus","_props$editable","editable","_props$keyboardType","keyboardType","_props$multiline","multiline","_props$numberOfLines","onChangeText","onKeyPress","onSelectionChange","onSubmitEditing","placeholderTextColor","returnKeyType","_props$secureTextEntr","secureTextEntry","selection","selectTextOnFocus","handleContentSizeChange","hostNode","newHeight","newWidth","imperativeRef","isFocused","useLayoutEffect","selectionEnd","selectionStart","isSelectionStale","setSelectionRange","setSelection","activeElement","_currentlyFocusedNode","textinput","enterKeyHint","shouldBlurOnSubmit","isComposing","keyCode","isEventComposing","shiftKey","isDefaultPrevented","onSelect","State","MozAppearance","WebkitAppearance","resize","focusTextInput","textFieldNode","Linear","Quadratic","In","Out","InOut","Cubic","Quartic","Quintic","Sinusoidal","Exponential","Circular","Elastic","Back","Bounce","now$1","hrtime","_tweens","_tweensAddedDuringUpdate","getAll","tweenId","removeAll","tween","getId","preserve","tweenIds","Utils","Bezier","pw","bn","Bernstein","fc","Factorial","Sequence","nextId","_nextId","mainGroup","Tween","_object","_group","_isPaused","_pauseStart","_valuesStart","_valuesEnd","_valuesStartRepeat","_duration","_initialRepeat","_repeat","_yoyo","_isPlaying","_reversed","_delayTime","_easingFunction","_interpolationFunction","_chainedTweens","_onStartCallbackFired","_isChainStopped","_goToEnd","isPaused","_swapEndStartRepeatValues","_setupProperties","startValue","startValueIsArray","isInterpolationList","endValues","_handleRelativeValue","stopChainedTweens","_onStopCallback","pause","resume","numChainedTweens","repeatDelay","_repeatDelayTime","yoyo","easingFunction","interpolationFunction","chain","tweens","_onStartCallback","_onUpdateCallback","onRepeat","_onRepeatCallback","_onCompleteCallback","onStop","elapsed","_updateProperties","startIsArray","endIsArray","endValue","TWEEN","VERSION","checkDCE","rules","styleResolver","createCSS","UnimplementedView","unimplementedViewStyles","createPromise","createPromiseAll","promises","processResult","oldObject","newObject","mergeLocalStorageItem","numberOfKeys","AsyncStorage","keyValuePairs","useLayoutEffectImpl","MISSING_CONTEXT_ERROR","isDefault","EmitterSubscription","_EventSubscription2","emitter","subscriber","removeSubscription","_EventSubscription","EventSubscriptionVendor","_subscriptionsForType","addSubscription","eventType","subscription","removeAllSubscriptions","subscriptionsForType","getSubscriptionsForType","sparseFilterPredicate","EventEmitter","_subscriber","listenerCount","subscriptions","_interopRequireDefault","require","_extends2","_objectWithoutProperties2","_react","_RNCSliderNativeComponent","SliderWithRef","_reactNative","slider","onValueChange","onSlidingStart","onSlidingComplete","localProps","onValueChangeEvent","userEvent","fromUser","onChangeEvent","onSlidingStartEvent","onSlidingCompleteEvent","thumbImage","resolveAssetSource","onRNCSliderSlidingStart","onRNCSliderSlidingComplete","onRNCSliderValueChange","__source","fileName","lineNumber","minimumValue","maximumValue","inverted","_default","useNavigation","navigation","deepDiffer","one","two","maxDepth","ii","twoKey","VirtualizedList","numColumns","_React$PureComponent","_virtualizedListPairs","_captureRef","_listRef","_getItem","kk","_item","_getItemCount","_keyExtractor","keyExtractor","_this$props2","ListItemComponent","columnWrapperStyle","_item2","_index","row","separators","_checkProps","viewabilityConfigCallbackPairs","pair","viewabilityConfig","onViewableItemsChanged","_createOnViewableItemsChanged","scrollToIndex","scrollToItem","scrollToOffset","recordInteraction","getScrollRef","getItem","getItemCount","_pushMultiColumnViewable","_this$props3","viewableItems","_this$props4","restProps","nextObj","previousStyleRef","setNativePropsArgsRef","useStable","relativeToNode","nativeProps","nextDomStyle","ERROR","Transitions","NOT_RESPONDER","DELAY","RESPONDER_GRANT","RESPONDER_RELEASE","RESPONDER_TERMINATED","LONG_PRESS_DETECTED","RESPONDER_INACTIVE_PRESS_START","RESPONDER_ACTIVE_PRESS_START","RESPONDER_ACTIVE_LONG_PRESS_START","isActiveSignal","signal","isButtonRole","isPressStartSignal","PressResponder","_eventHandlers","_isPointerTouch","_longPressDelayTimeout","_longPressDispatched","_pressDelayTimeout","_pressOutDelayTimeout","_touchState","_cancelLongPressDelayTimeout","_cancelPressDelayTimeout","_cancelPressOutDelayTimeout","getEventHandlers","_createEventHandlers","shouldDelay","_selectionTerminated","_receiveSignal","normalizeDelay","_handleLongPress","keyupHandler","currentTarget","role","isSpacebar","isValidKeyPress","onPressMove","touch","getTouchFromResponderEvent","_touchActivatePosition","deltaX","pageX","deltaY","pageY","hypot","_this$_config","_this$_config2","altKey","_this$_config3","defaultPrevented","prevState","nextState","_performTransitionSideEffects","isTerminalSignal","isPrevActive","isNextActive","_activate","_deactivate","_this$_config4","_onLongPress","_this$_config5","onPressChange","_this$_config6","fallback","_event$nativeEvent","changedTouches","pressResponderRef","pressResponder","Batchinator","delayMS","_delay","_taskHandle","schedule","timeoutHandle","_isViewable","viewAreaMode","viewablePercentThreshold","viewportHeight","itemLength","_isEntirelyVisible","pixels","visibleHeight","_getPixelsVisible","ViewabilityHelper","viewAreaCoveragePercentThreshold","_hasInteracted","_timers","_viewableIndices","_viewableItems","computeViewableItems","itemCount","scrollOffset","getFrameMetrics","renderRange","itemVisiblePercentThreshold","viewableIndices","firstVisible","first","metrics","createViewToken","waitForInteraction","every","minimumViewTime","_onUpdateSync","resetViewableIndices","viewableIndicesToCheck","includes","prevItems","nextItems","viewable","_step2$value","_viewable","isViewable","infoLog","_console","elementsThatOverlapOffsets","outLength","trailingOffset","newRangeCount","computeWindowedRenderLimits","getFrameMetricsApprox","scrollMetrics","maxToRenderPerBatch","windowSize","velocity","visibleLength","visibleBegin","visibleEnd","overscanLength","fillPreference","overscanBegin","overscanEnd","_elementsThatOverlapO","overscanFirst","overscanLast","newCellCount","maxNewCells","firstWillAddMore","firstShouldIncrement","lastWillAddMore","lastShouldIncrement","VirtualizedListContext","VirtualizedListContextProvider","cellKey","getScrollMetrics","getOutermostParentListRef","getNestedChildState","registerAsNestedChild","unregisterAsNestedChild","debugInfo","listKey","VirtualizedListCellContextProvider","useContext","_usedIndexForKey","_keylessItemComponentName","_getScrollMetrics","_scrollMetrics","_getOutermostParentListRef","_isNestedWithSameOrientation","_getNestedChildState","existingChildData","_nestedChildLists","_registerAsNestedChild","childList","childListsInCell","_cellKeysToChildListKeys","parentDebugInfo","describeNestedLists","_unregisterAsNestedChild","_onUpdateSeparators","_cellRefs","updateSeparatorProps","_averageCellLength","_frames","_footerLength","_hasDoneInitialScroll","_hasMore","_hasWarned","_headerLength","_hiPriInProgress","_highestMeasuredFrameIndex","_indicesToKeys","_offsetFromParentVirtualizedList","_prevParentOffset","contentLength","dOffset","dt","timestamp","_scrollRef","_sentEndForContentLength","_totalCellLength","_totalCellsMeasured","_viewabilityTuples","_captureScrollRef","_defaultRenderScrollComponent","onRefresh","refreshing","RefreshControl","progressViewOffset","_onCellUnmount","inLayout","_onLayout","measureLayoutRelativeToContainingList","_selectLength","_scheduleCellsToRenderUpdate","_maybeCallOnEndReached","_onLayoutEmpty","_onLayoutFooter","_triggerRemeasureForChildListsInCell","_getFooterCellKey","_onLayoutHeader","_onContentSizeChange","initialScrollIndex","_convertParentScrollMetrics","_onScroll","_selectOffset","_this$_convertParentS","perf","prevDt","_updateViewableItems","_fillRateHelper","activate","_computeBlankness","_onScrollBeginDrag","tuple","viewabilityHelper","_onScrollEndDrag","_onMomentumScrollBegin","_onMomentumScrollEnd","_updateCellsToRender","onEndReachedThreshold","isVirtualizationDisabled","_isVirtualizationDisabled","newState","_this$_scrollMetrics","renderAhead","_getFrameMetricsApprox","newFirst","newLast","cellKeyForIndex","childListKeys","someChildHasMore","childKey","hasMore","_createViewToken","_getFrameMetrics","getItemLayout","_this$props5","FillRateHelper","_updateCellsToRenderBatcher","updateCellsBatchingPeriod","initialState","initialNumToRender","storedState","_getListKey","veryLast","onScrollToIndexFailed","viewOffset","viewPosition","averageItemLength","highestMeasuredFrameIndex","_getCellKey","_this$context","_getDebugInfo","_this$context2","deactivateAndFlush","getDerivedStateFromProps","_pushCells","cells","stickyIndicesFromProps","inversionStyle","prevCellKey","_this$props6","CellRendererComponent","ItemSeparatorComponent","stickyOffset","ListHeaderComponent","CellRenderer","fillRateHelper","onUpdateSeparators","_onCellLayout","onUnmount","parentProps","disableVirtualization","nestedContext","_this$props7","ListEmptyComponent","ListFooterComponent","_this$props8","horizontallyInverted","verticallyInverted","ListHeaderComponentStyle","spacerKey","lastInitialIndex","_this$state","firstAfterInitial","insertedStickySpacer","initBlock","stickyBlock","leadSpace","trailSpace","_initBlock","firstSpace","lastFrame","tailSpacerLength","_element","_element2","ListFooterComponentStyle","scrollProps","renderScrollComponent","_renderDebugOverlay","_this$props9","extraData","hiPriInProgress","computeBlankness","stack","framesInLayout","windowTop","frameLast","windowLen","visTop","visLen","debugOverlayBase","debugOverlay","debugOverlayFrame","debugOverlayFrameLast","debugOverlayFrameVis","_this$props10","onEndReached","_this$_scrollMetrics2","distanceFromEnd","_this$state2","_this$_scrollMetrics3","hiPri","scrollingThreshold","distTop","distBottom","contextType","separatorProps","highlighted","leadingItem","_separators","highlight","_this6$props","unhighlight","_this6$props2","updateProps","_this6$props3","_proto2","_renderElement","_this$props11","itemSeparator","cellStyle","rowReverse","columnReverse","emptyFunction","StatusBar","setBackgroundColor","setBarStyle","setHidden","setNetworkActivityIndicatorVisible","setTranslucent","valueIn","jointCallback","getLayout","getTranslateTransform","BackHandler","exitApp","createContext","getByID","getStyle","styleLength","computedStyle","initialAngleRoll","initialAngleYaw","numDimensions","simulation","nDim","alphaMin","alphaDecay","alphaTarget","velocityDecay","forces","stepper","timer","dispatch","lcg","fx","vx","fy","vy","fz","vz","initializeNodes","cbrt","rollAngle","yawAngle","initializeForce","initialize","randomSource","closest","on","getVariableName","template","indent","indentString","variableName","a0","a1","a3","a4","a5","a6","a7","a8","a9","dark","primary","card","notification","resizeObserver","ResizeObserver","unobserve","matchers","hex6","names","rgb","parse255","rgba","parse1","hex3","hex8","hex4","hsl","hslToRgb","parse360","parsePercentage","hsla","NUMBER","arrayLike","int","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","colorInt","startNativeAnimationNextId","Animation","fromValue","onEnd","__nativeId","__debouncedOnEnd","__onEnd","__startNativeAnimation","startNativeAnimationWaitId","Switch","_props$activeThumbCol","activeThumbColor","_props$activeTrackCol","activeTrackColor","_props$disabled","_props$style","_props$thumbColor","thumbColor","_props$trackColor","trackColor","_props$value","thumbRef","handleFocusState","boxShadow","thumbDefaultBoxShadow","_StyleSheet$flatten","styleHeight","styleWidth","multiplyStyleLengthValue","trackBorderRadius","trackCurrentColor","true","false","thumbCurrentColor","thumbHeight","thumbWidth","rootStyle","cursorDefault","trackStyle","thumbStyle","thumb","thumbActive","marginStart","nativeControl","checked","cursorInherit","alignSelf","SingleNavigatorContext","EnsureSingleNavigator","navigatorKeyRef","currentKey","defaultOffset","createCompileableStyle","textShadowOffset","textShadowRadius","nextStyles","resolvedStyle","boxShadowReducer","textShadow","textShadowReducer","createOrderedCSSStyleSheet","sheet","selectors","cssRules","cssRule","cssText","selectorText","decodeGroupRule","getSelectorText","sheetInsert","orderedGroups","getOrderedGroups","nextGroupIndex","nextGroup","isInserted","insertRule","insertRuleAt","groupNumber","previousStart","getTextContent","insert","groupValue","markerRule","encodeGroupRule","selector","flattenArray","flattenDown","PROPERTIES_FLIP","borderLeftStyle","borderLeftWidth","borderRightStyle","borderRightWidth","marginLeft","marginRight","paddingLeft","paddingRight","PROPERTIES_I18N","borderStartColor","borderStartStyle","borderStartWidth","borderEndColor","borderEndStyle","borderEndWidth","marginEnd","paddingStart","paddingEnd","PROPERTIES_VALUE","float","textAlign","additiveInverse","i18nStyle","originalStyle","_I18nManager$getConst","frozenProps","nextStyle","originalProp","originalValue","convertedProp","convertedValue","flippedValue","invertedValue","supportsCSS3TextDecoration","CSS","supports","mapTransform","createReactDOMStyle","backgroundClip","WebkitBackgroundClip","fontVariant","verticalAlign","textDecorationLine","textDecoration","resolveTransform","longFormProperties","longForm","seed","murmurhash2_32_gc","ms","wm","wms","wmms","plugins","crossFade","flexboxIE","flexboxOld","gradient","imageSet","logical","sizing","transition","prefixMap","animationDelay","animationDirection","animationFillMode","animationDuration","animationIterationCount","animationName","animationPlayState","animationTimingFunction","appearance","textEmphasisPosition","textEmphasis","textEmphasisStyle","textEmphasisColor","boxDecorationBreak","clipPath","maskImage","maskMode","maskRepeat","maskPosition","maskClip","maskOrigin","maskSize","maskComposite","maskBorderSource","maskBorderMode","maskBorderSlice","maskBorderWidth","maskBorderOutset","maskBorderRepeat","maskBorder","maskType","textDecorationStyle","textDecorationSkip","fontFeatureSettings","breakAfter","breakBefore","breakInside","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columns","columnSpan","columnWidth","writingMode","flexFlow","flexWrap","alignContent","justifyContent","transformOrigin","transformOriginX","transformOriginY","backfaceVisibility","perspectiveOrigin","transformStyle","transformOriginZ","backdropFilter","fontKerning","scrollSnapPointsX","scrollSnapPointsY","scrollSnapDestination","scrollSnapCoordinate","shapeImageThreshold","shapeImageMargin","shapeImageOutside","hyphens","flowInto","flowFrom","regionFragment","textOrientation","textAlignLast","tabSize","wrapFlow","wrapThrough","wrapMargin","textSizeAdjust","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","transitionDelay","transitionTimingFunction","prefixAll","createPrefixer","staticData","acc","valueString","stringifyValueWithProperty","cachedResult","_identifier","createIdentifier","_processKeyframesValu2","processKeyframesValue","animationNames","keyframesRules","block","createDeclarationBlock","_block","finalValue","_block3","_block4","_block2","_block5","_createDeclarationBlo","_block6","createAtomicRules","_cachedResult","animationKeyframes","_processKeyframesValu","prefixedStyles","prefixInlineStyles","normalizedValue","domStyle","prefixStyles","hyphenateStyleName","keyframesValue","keyframes","_createKeyframes","stepName","createKeyframes","resets","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","tel","email","password","date","month","week","datetime","metaKey","ctrlKey","isValidFocusTarget","addFocusVisibleAttribute","onPointerDown","el","tagName","isReadOnly","isContentEditable","focusTriggersKeyboardModality","removeFocusVisibleAttribute","addInitialPointerMoveListeners","querySelectorAll","removeAllFocusVisibleAttributes","onInitialPointerMove","createCacheKey","classListToString","inserted","resolved","ltr","rtl","rtlNoSwap","getElementById","head","insertBefore","firstChild","createCSSStyleSheet","rule","initialRules","_injectRegisteredStyle","_results$key","addToCache","_resolveStyle","_I18nManager$getConst2","localizedStyle","styleProp","getClassName","_atomic","_a$key","getStyleSheet","textContent","compiled","_compiled$key","nextClassList","flatArray","isArrayOfNumbers","finalProps","createStyleResolver","isStartish","isMoveish","isEndish","isCancelish","touchBank","touchHistory","numberActiveTouches","indexOfSingleActiveTouch","mostRecentTimeStamp","timestampForTouch","getTouchIdentifier","recordTouchStart","touchRecord","touchActive","startPageX","startPageY","startTimeStamp","currentPageX","currentPageY","currentTimeStamp","previousPageX","previousPageY","previousTimeStamp","resetTouchRecord","createTouchRecord","recordTouchMove","printTouch","printTouchBank","recordTouchEnd","printed","ResponderTouchHistoryStore","recordTouchTrack","topLevelType","touchTrackToCheck","emptyArray","createResponderEvent","domEvent","propagationWasStopped","domEventChangedTouches","domEventType","clientX","clientY","normalizeTouches","locationX","locationY","emulatedTouches","responderEvent","bubbles","eventPhase","isPropagationStopped","isTrusted","composedPathFallback","body","getResponderId","getResponderPaths","idPath","nodePath","eventPath","getSelection","anchorNode","composedPath","getEventPath","hasValidSelection","focusNode","isTextNode","TEXT_NODE","isSelectionValid","startRegistration","moveRegistration","shouldSetResponderEvents","touchstart","mousedown","touchmove","mousemove","emptyResponder","responderListenersMap","isEmulatingMouseEvents","trackedTouchCount","currentResponder","changeCurrentResponder","responder","getResponderConfig","eventListener","eventTarget","isStartEvent","button","buttons","noModifiers","isPrimaryPointerDown","isMoveEvent","isEndEvent","isScrollEvent","isScroll","isSelectionChangeEvent","isSelectionChange","wantsResponder","eventPaths","wasNegotiated","currentResponderIdPath","eventIdPath","lowestCommonAncestor","pathA","pathB","pathALength","pathBLength","itemA","itemB","getLowestCommonAncestor","shouldSetCallbacks","shouldSetCallbackCaptureName","shouldSetCallbackBubbleName","check","callbackName","shouldSetCallback","_node","_result","_id2","_node2","findWantsResponder","_currentResponder2","currentId","currentNode","_getResponderConfig2","_getResponderConfig3","allowTransfer","attemptTransfer","_currentResponder","_getResponderConfig","isTerminateEvent","contains","relatedTarget","isReleaseEvent","hasTargetTouches","shouldTerminate","documentEventsCapturePhase","documentEventsBubblePhase","_currentResponder3","terminateResponder","idCounter","getInitialValue","isAttachedRef","__reactResponderSystemActive","ResponderSystem","requiresResponderSystem","setResponderId","isResponder","accessibilityRoleToWebRole","adjustable","imagebutton","keyboardkey","label","link","summary","propsToAriaRole","inferredRole","roleComponents","article","banner","blockquote","code","complementary","contentinfo","deletion","emphasis","figure","insertion","form","listitem","main","region","strong","buttonLikeRoles","menuitem","isDisabled","accessibilityStates","I18n","isSet","isBoolean","isNull","decimalAdjust","NaN","lazyEvaluate","DATE","day_names","abbr_day_names","month_names","abbr_month_names","meridian","NUMBER_FORMAT","separator","delimiter","strip_insignificant_zeros","CURRENCY_FORMAT","sign_first","PERCENTAGE_FORMAT","SIZE_UNITS","DEFAULT_OPTIONS","defaultLocale","locale","defaultSeparator","fallbacks","translations","missingBehaviour","missingTranslationPrefix","initializeOptions","locales","localeParts","firstFallback","secondFallback","nullableFallbackLocale","pluralization","currentLocale","lookup","scopes","fullScope","getFullScope","pluralizationLookupWithoutFallback","pluralizerKey","pluralizerKeys","pluralizer","pluralizationLookup","am","pm","prepareOptions","subject","attr","createTranslationOptions","translationOptions","defaults","translation","usedScope","optionsWithoutDefault","translationOption","pluralize","missingTranslation","nullPlaceholder","missingPlaceholder","toNumber","formattedNumber","negative","toFixed","toCurrency","localize","toPercentage","localizedValue","toTime","parseDate","convertedDate","fraction","UTC","setTime","$1","$2","$3","$6","$4","$5","strftime","meridianOptions","weekDay","getDay","day","getDate","year","getFullYear","getMonth","hour","getHours","hour12","secs","getSeconds","mins","getMinutes","getTimezoneOffset","absOffsetHours","absOffsetMinutes","timezoneoffset","dateString","date_string","toHumanSize","obj1","obj2","CSS_UNIT_RE","multiple","KeyboardAvoidingView","relativeKeyboardHeight","keyboardFrame","keyboardY","keyboardVerticalOffset","onKeyboardChange","BaseRouter","getStateForAction","routes","route","shouldActionChangeFocus","RootTagContext","AppContainer","WrapperComponent","innerView","appContainer","rootTag","wrapperComponentProvider","runnables","componentProviderInstrumentationHook","AppRegistry","getAppKeys","getApplication","appKey","appParameters","registerComponent","componentProvider","RootComponent","initialProps","getStyleElement","dangerouslySetInnerHTML","__html","shouldHydrate","hydrate","renderFn","renderApplication","registerConfig","registerRunnable","runApplication","setComponentProviderInstrumentationHook","setWrapperComponentProvider","provider","unmountApplicationComponentAtRootTag","unmountComponentAtNode","aspectRatio","boxFlex","boxFlexGroup","boxOrdinalGroup","flexOrder","flexPositive","flexNegative","fontWeight","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","lineClamp","orphans","widows","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixes","prefixKey","uniqueID","createKey","UNINITIALIZED","_objectWithoutProperties","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","_toPropertyKey","hint","prim","_toPrimitive","keyAccessors","multiItem","flattenKeys","keyAccessor","isProp","indexedResult","iterObj","itemVal","_itemVal","propVal","accKeys","vals","trimLeft","trimRight","tinyCounter","mathRound","mathMin","mathMax","mathRandom","tinycolor","ok","hsv","hsva","parseIntFromHex","convertHexToDecimal","stringInputToObject","isValidCSSUnit","bound01","convertToPercentage","mod","hsvToRgb","boundAlpha","inputToRGB","_originalInput","_r","_g","_roundA","_format","_gradientType","gradientType","_ok","_tc_id","rgbToHsl","rgbToHsv","rgbToHex","allow3Char","pad2","rgbaToArgbHex","convertDecimalToHex","desaturate","toHsl","clamp01","saturate","greyscale","lighten","brighten","toRgb","darken","spin","complement","triad","tetrad","splitcomplement","analogous","slices","monochromatic","toHsv","modification","isDark","getBrightness","isValid","getOriginalInput","getFormat","getAlpha","getLuminance","RsRGB","GsRGB","BsRGB","setAlpha","toHsvString","toHslString","toHex","toHexString","toHex8","allow4Char","rgbaToHex","toHex8String","toRgbString","toPercentageRgb","toPercentageRgbString","toName","hexNames","toFilter","secondColor","hex8String","secondHex8String","formatSet","formattedString","hasAlpha","_applyModification","_applyCombination","fromRatio","newColor","rgb1","rgb2","readability","isReadable","wcag2","wcag2Parms","parms","validateWCAG2Parms","mostReadable","baseColor","colorList","includeFallbackColors","bestColor","bestScore","flipped","flip","isOnePointZero","processPercent","isPercentage","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","SUPPRESS_STATE_ACCESS_WARNING","useRouteCache","freeGlobal","freeSelf","arrayPush","objectProto","objectToString","spreadableSymbol","isConcatSpreadable","nativeMax","isFlattenable","isObjectLike","isLength","isArrayLike","isArrayLikeObject","isArguments","toKey","isSymbol","basePickBy","basePick","iteratee","arrayMap","baseFlatten","isStrict","otherArgs","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","marker","runClearTimeout","Item","nextTick","title","browser","argv","versions","off","prependListener","prependOnceListener","cwd","chdir","umask","_arity","_curry2","_curryN","curryN","processColor","int32Color","getFontScale","getPixelSizeForLayoutSize","layoutSize","roundToNearestPixel","ratio","progressBackgroundColor","titleColor","MemoedTouchableWithoutFeedback","only","elementProps","Keyboard","dismiss","cssFunction","SafeAreaView","paddingTop","paddingBottom","createExtraStyles","underlayColor","underlay","hasPressHandler","MemoedTouchableHighlight","onHideUnderlay","onShowUnderlay","testOnly_pressed","extraStyles","setExtraStyles","showUnderlay","hideUnderlay","CurrentRenderContext","useBackButton","ThemeProvider","VirtualizedSectionList","sections","itemIdx","section","sectionData","_subExtractor","_convertViewable","_onViewableItemsChanged","_renderItem","listItemCount","infoIndex","renderSectionHeader","renderSectionFooter","SeparatorComponent","_getSeparatorComponent","ItemWithSeparator","LeadingSeparatorComponent","SectionSeparatorComponent","leadingSection","onUpdateSeparator","_onUpdateSeparator","trailingItem","trailingSection","scrollToLocation","itemIndex","sectionIndex","stickySectionHeadersEnabled","toIndexParams","getListRef","passThroughProps","listHeaderOffset","isLastItemInList","isLastItemInSection","leadingSeparatorProps","_this3$props","leadingSeparator","_wrapperListRef","listRef","createMemoryHistory","interrupt","backIndex","go","interrupted","onPopState","listen","findMatchingState","aHistoryLength","bHistoryLength","aRoute","bRoute","aChildState","bChildState","isUsingLinking","useLinking","getStateFromPath","getPathFromState","getActionFromState","getActionFromStateDefault","enabledRef","configRef","getStateFromPathRef","getActionFromStateRef","getPathFromStateRef","server","location","thenable","onfulfilled","previousIndexRef","previousStateRef","pendingPopStatePathRef","history","previousIndex","record","rootState","handling","series","pendingPath","previousFocusedState","historyDelta","focusedState","currentIndex","uppercasePattern","toHyphenLower","processIDRefList","idRefList","listStyle","pointerEventsStyles","auto","elementType","providedStyle","isNativeInteractiveElement","contentEditable","_prop","required","dataProp","dataName","dataValue","_focusable","tabIndex","reactNativeStyle","needsCursor","finalClassList","_styleResolver$resolv","isSpacebarKey","nativeModule","_nativeModule","_this$_nativeModule","RCTDeviceEventEmitter","_this$_nativeModule2","removeListeners","_this$_nativeModule3","_this$_nativeModule4","UnhandledActionContext","ScheduleUpdateContext","scheduleUpdate","flushUpdates","useScheduleUpdate","useChildListeners","useKeyedChildListeners","keyedListeners","getState","beforeRemove","addKeyedListener","useOptionsGetters","optionsRef","optionsGettersFromChildRef","parentAddOptionsGetter","addOptionsGetter","optionsChangeListener","hasChildren","getOptionsFromListener","getCurrentOptions","optionsFromListener","useEventEmitter","listenRef","canPreventDefault","Screen","strictUriEncode","decodeComponent","splitOnFirst","filterObject","validateArrayFormatSeparator","encode","strict","removeHash","hashStart","extract","queryStart","parseValue","parseNumbers","parseBooleans","query","arrayFormat","arrayFormatSeparator","formatter","isEncodedArray","parserForArrayFormat","keysSorter","shouldFilter","skipNull","isNullOrUndefined","skipEmptyString","encoderForArrayFormat","objectCopy","parseUrl","url_","parseFragmentIdentifier","fragmentIdentifier","stringifyUrl","queryFromUrl","parsedQueryFromUrl","queryString","getHash","exclude","exclusionFilter","checkLegacyPathConfig","legacy","screens","ThemeContext","isWebColor","dataBindDiff","existingObjs","_ref3$objBindAttr","objBindAttr","_ref3$dataBindAttr","dataBindAttr","idAccessor","_ref3$purge","purge","isObjValid","removeObjs","prevD","enter","exit","prevById","nextById","byId","prevSet","nextSet","diffArrays","nextD","appendObj","removeObj","_ref7","_ref7$createObj","createObj","_ref7$updateObj","updateObj","_ref7$exitObj","exitObj","_ref7$objBindAttr","_ref7$dataBindAttr","dataDiffOptions","_dataBindDiff","_objectSpread2","newObjs","createObjs","updateObjs","_inherits","_isNativeReflectConstruct","sham","_construct","Parent","Class","_possibleConstructorReturn","_createSuper","Derived","hasNativeReflectConstruct","Super","NewTarget","deallocate","materialDispose","childObj","_excluded","threeDigest","_ref$objFilter","objFilter","autoColorScale","autoColorObjects","colorByAccessor","colorField","three$1","THREE","SphereBufferGeometry","CylinderBufferGeometry","TubeBufferGeometry","ConeBufferGeometry","ngraph","graph","forcelayout","setAttributeFn","applyMatrix4Fn","threeForcegraph","kapsule","baseClass","initKapsuleWithSelf","FromKapsule","_baseClass","__kapsuleInstance","_this$__kapsuleInstan","returnVal","fromKapsule","jsonUrl","fetchingJson","onLoading","onFinishLoading","graphData","links","engineRunning","numDim","chargeForce","d3ForceLayout","eraseDimension","strength","dagMode","forceEngine","dagLevelDistance","dagNodeFilter","onDagError","nodeRelSize","nodeId","nodeVal","nodeResolution","nodeColor","nodeAutoColorBy","nodeOpacity","nodeVisibility","nodeThreeObject","nodeThreeObjectExtend","linkSource","linkTarget","linkVisibility","linkColor","linkAutoColorBy","linkOpacity","linkWidth","linkResolution","linkCurvature","linkCurveRotation","linkMaterial","linkThreeObject","linkThreeObjectExtend","linkPositionUpdate","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowRelPos","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleSpeed","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution","d3AlphaMin","d3AlphaDecay","d3AlphaTarget","d3VelocityDecay","ngraphPhysics","timeStep","gravity","springLength","springCoefficient","dragCoefficient","warmupTicks","cooldownTicks","cooldownTime","onFinishUpdate","onEngineTick","onEngineStop","refresh","_flushObjects","d3Force","forceName","forceFn","d3ReheatSimulation","resetCountdown","cntTicks","startTickTime","tickFrame","isD3Sim","__threeObj","pos","getNodePosition","linkWidthAccessor","linkCurvatureAccessor","linkCurveRotationAccessor","linkThreeObjectExtendAccessor","lineObj","__lineObj","getLinkPosition","getLink","curvature","curveRotation","vLine","cp","applyAxisAngle","endAngle","startAngle","__curve","calcLinkCurve","extendedObj","linePos","localToWorld","layoutTick","arrowRelPosAccessor","arrowLengthAccessor","nodeValAccessor","arrowObj","__arrowObj","startR","endR","arrowLength","arrowRelPos","getPosAlongLine","iplt","lineLen","posAlongLine","arrowHead","arrowTail","headVec","updateArrows","particleSpeedAccessor","cyclePhotons","__photonsObj","singleHopPhotons","__singleHopPhotonsObj","particleSpeed","getPhotonPos","photon","singleHop","__linkThreeObjType","__progressRatio","photonPosRatio","updatePhotons","emitParticle","graphScene","particleWidthAccessor","photonR","numSegments","particleGeometry","linkColorAccessor","photonColor","particleColorAccessor","materialColor","particleMaterial","getGraphBbox","nodeFilter","bboxes","getBboxes","__graphObjType","__data","bb","threeObj","hasAnyPropChanged","propList","customObjectAccessor","customObjectExtendAccessor","valAccessor","colorAccessor","visibilityAccessor","sphereGeometries","sphereMaterials","customObj","extendObj","__graphDefaultObj","_customObjectAccessor","_customObjectExtendAccessor","customMaterialAccessor","_visibilityAccessor","_colorAccessor","widthAccessor","cylinderGeometries","lambertLineMaterials","basicLineMaterials","visibleLinks","defaultObj","lineGeometry","updObj","useCylinder","materialType","lineMaterials","arrowColorAccessor","coneGeometry","particlesAccessor","particleMaterials","particleGeometries","numPhotons","curPhoton","linkForce","nodeDepths","_ref2$nodeFilter","_ref2$onLoopError","onLoopError","loopIds","skip","sourceId","getNodeId","targetId","sourceNode","foundLoops","_ref6","nodeStack","currentDepth","_ret","foundLoop","getDagDepths","getFFn","fix","fxFn","fyFn","fzFn","nodeDepth","_graph","addNode","addLink","propIsEnumerable","toObject","test1","test2","test3","letter","shouldUseNative","reservedWords","validateSubject","eventsStorage","registeredEvents","fire","fireArguments","callbackInfo","createEventsStorage","StackActions","payload","popToTop","StackRouter","router","routeParamList","initialRouteName","routeNames","stale","getRehydratedState","getStateForRouteNamesChange","getStateForRouteFocus","actionCreators","_isArray","methodname","_has","_isArguments","hasEnumBug","nonEnumerableProps","hasArgsEnumBug","nIdx","ks","checkArgsLength","isScreenReaderEnabled","prefersReducedMotionMedia","matchMedia","AccessibilityInfo","isReduceMotionEnabled","setAccessibilityFocus","reactTag","announceForAccessibility","announcement","Alert","alert","listenerMapping","Appearance","getColorScheme","addChangeListener","mappedListener","colorScheme","removeChangeListener","isPrefixed","EVENT_TYPES","VISIBILITY_CHANGE_EVENT","VISIBILITY_STATE_PROPERTY","AppStates","AppState","isAvailable","listenerIndex","findIndex","clipboardAvailable","Clipboard","queryCommandSupported","getString","setString","appendChild","removeAllRanges","createRange","selectNodeContents","addRange","execCommand","DeviceInfo","_Dimensions$get","_Dimensions$get2","languages","language","deviceMemory","userAgent","configureNext","Presets","easeInEaseOut","springDamping","LayoutAnimation","Types","easeIn","easeOut","keyboard","Properties","scaleXY","checkConfig","initialURL","Linking","_eventCallbacks","filteredCallbacks","_dispatchEvent","canOpenURL","getInitialURL","openURL","_validateURL","urlToOpen","URL","TouchHistoryMath","centroidDimension","touchesChangedAfter","isXAxis","ofCurrent","oneTouchData","touchTrack","noCentroid","currentCentroidXOfTouchesChangedAfter","currentCentroidYOfTouchesChangedAfter","previousCentroidXOfTouchesChangedAfter","previousCentroidYOfTouchesChangedAfter","currentCentroidX","currentCentroidY","PanResponder","_initializeGestureState","gestureState","moveX","moveY","_accountsForMovesUpTo","_updateGestureStateOnMove","movedAfter","prevX","prevY","nextDX","nextDY","interactionState","shouldCancelClick","stateID","panHandlers","onStartShouldSetPanResponder","onMoveShouldSetPanResponder","onStartShouldSetPanResponderCapture","onMoveShouldSetPanResponderCapture","clearInteractionTimeout","onPanResponderGrant","onShouldBlockNativeResponder","onPanResponderReject","onPanResponderRelease","setInteractionTimeout","onPanResponderStart","onPanResponderMove","onPanResponderEnd","onPanResponderTerminate","onPanResponderTerminationRequest","getInteractionHandle","Share","share","_vibrate","vibrate","Vibration","createSvgCircle","ActivityIndicator","_props$animating","animating","_props$color","_props$hidesWhenStopp","hidesWhenStopped","_props$size","viewBox","stroke","indicatorSizes","animationPause","small","large","Button","TouchableOpacity","buttonDisabled","textDisabled","textTransform","CheckBox","fakeControl","fakeControlChecked","fakeControlDisabled","fakeControlCheckedAndDisabled","ImageBackground","imageStyle","imageRef","ModalPortal","elementRef","ReactDOM","createPortal","getAnimationStyle","animationType","animatedSlideInStyles","animatedSlideOutStyles","animatedFadeInStyles","animatedFadeOutStyles","hidden","animatedIn","ANIMATION_DURATION","animatedOut","slideIn","slideOut","ModalAnimation","onDismiss","onShow","isRendering","setIsRendering","wasVisible","isAnimated","animationEndCallback","onAnimationEnd","ModalContent","active","onRequestClose","closeOnEscape","modal","modalTransparent","modalOpaque","FocusBracket","focusBracket","attemptFocus","ModalFocusTrap","trapElementRef","focusRef","trapFocusInProgress","lastFocusedElement","trapFocus","hasFocused","focusFirstDescendant","focusLastDescendant","lastFocusedElementOutsideTrap","outlineStyle","uniqueModalIdentifier","activeModalStack","activeModalListeners","notifyActiveModalListeners","activeModalId","modalId","removeActiveModal","Modal","_props$visible","isActive","setIsActive","onDismissCallback","onShowCallback","addActiveModal","Picker","selectedValue","itemStyle","prompt","_e$target","selectedIndex","initial","fontFamily","fontSize","canUsePassiveEvents","supported","supportsPassiveEvents","cancelBubble","createEventHandle","capture","getOptions","compatListener","previousModality","previousActiveModality","activeModality","bubbleOptions","passive","captureOptions","addBlurListener","addFocusListener","addVisibilityChangeListener","addKeyDownListener","addPointerDownListener","addPointerMoveListener","addContextMenuListener","addMouseDownListener","addMouseMoveListener","addMouseUpListener","addScrollListener","addSelectiomChangeListener","addTouchCancelListener","addTouchMoveListener","addTouchStartListener","restoreModality","callListeners","onPointerish","PointerEvent","pointerType","useEvent","targetListeners","removeTargetListener","dispatchCustomEvent","createEvent","_ref$bubbles","_ref$cancelable","initCustomEvent","getPointerType","useHover","targetRef","onHoverStart","onHoverChange","onHoverUpdate","onHoverEnd","canUsePE","addMoveListener","addEnterListener","addLeaveListener","addLockListener","addUnlockListener","hoverEnd","leaveListener","moveListener","hoverStart","lockEvent","useForceableState","forced","MemoedPressable","memo","onHoverIn","onHoverOut","testOnly_hovered","_useForceableState","hovered","setHovered","_useForceableState2","focused","setFocused","_useForceableState3","pressed","setPressed","onContextMenuPress","onKeyDownPress","blurHandler","focusHandler","contextMenuHandler","keyDownHandler","ProgressBar","_props$indeterminate","indeterminate","_props$progress","progress","percentageProgress","progressRef","twoArgumentPooler","instancePool","standardReleaser","destructor","poolSize","DEFAULT_POOLER","PooledClass","addPoolingTo","CopyConstructor","pooler","NewKlass","getPooled","release","BoundingDimensions","getPooledFromElement","Position","extractSingleTouch","hasTouches","hasChangedTouches","States","baseStatesConditions","RESPONDER_INACTIVE_PRESS_IN","RESPONDER_INACTIVE_PRESS_OUT","RESPONDER_ACTIVE_PRESS_IN","RESPONDER_ACTIVE_PRESS_OUT","RESPONDER_ACTIVE_LONG_PRESS_IN","RESPONDER_ACTIVE_LONG_PRESS_OUT","IsActive","IsPressingIn","IsLongPressingIn","Signals","ENTER_PRESS_RECT","LEAVE_PRESS_RECT","TouchableMixin","_touchableNode","_touchableBlurListener","_isTouchableKeyboardActive","touchable","touchState","touchableHandleResponderTerminate","touchableDelayTimeout","longPressDelayTimeout","pressOutDelayTimeout","pressInLocation","responderID","touchableGetInitialState","touchableHandleResponderTerminationRequest","touchableHandleStartShouldSetResponder","touchableLongPressCancelsPress","touchableHandleResponderGrant","dispatchID","touchableGetHighlightDelayMS","_handleDelay","longDelayMS","touchableGetLongPressDelayMS","LONG_PRESS_THRESHOLD","_handleLongDelay","touchableHandleResponderRelease","touchableHandleResponderMove","positionOnActivate","dimensionsOnActivate","pressRectOffset","touchableGetPressRectOffset","pressExpandLeft","pressExpandTop","pressExpandRight","pressExpandBottom","hitSlop","touchableGetHitSlop","_getDistanceBetweenPoints","touchableHandleFocus","touchableHandleBlur","_remeasureMetricsOnActivation","_handleQueryLayout","globalX","globalY","curState","_performSideEffectsForTransition","_isHighlight","_savePressInLocation","bX","bY","curIsHighlight","newIsHighlight","isInitialTransition","isActiveTransition","touchableHandleLongPress","_startHighlight","_endHighlight","hasLongPressHandler","pressIsLongButStillCallOnPress","touchableHandlePress","_playTouchSound","playTouchSound","touchableHandleActivePressIn","touchableHandleActivePressOut","touchableGetPressOutDelayMS","touchableHandleKeyEvent","withoutDefaultFocusAndBlur","TouchableMixinWithoutDefaultFocusAndBlur","Touchable","TOUCH_TARGET_DEBUG","renderDebugView","debugHitSlopStyle","hexColor","YellowBox","ignoreWarnings","promiseMock","PERMISSIONS","RESULTS","checkPermission","requestPermission","requestMultiple","useColorScheme","setColorScheme","useWindowDimensions","dims","setDims","handleChange","msPattern","hName","ENABLE_SCREENS","enableScreens","shouldEnableScreens","screensEnabled","activityState","ScreenContainer","NativeScreenContainer","ScreenStack","ScreenStackHeaderBackButtonImage","fadeDuration","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderConfig","ScreenStackHeaderSubview","shouldUseActivityState","_Animation","_config$overshootClam","_config$restDisplacem","_config$restSpeedThre","_config$velocity","_config$velocity2","_config$delay","_config$isInteraction","_config$iterations","_config$stiffness","_config$damping","_config$mass","_overshootClamping","overshootClamping","_restDisplacementThreshold","restDisplacementThreshold","_restSpeedThreshold","restSpeedThreshold","_initialVelocity","_lastVelocity","_toValue","isInteraction","__iterations","stiffness","damping","mass","speed","friction","_stiffness","_damping","_mass","_config$bounciness","_config$speed","springConfig","SpringConfig","fromBouncinessAndSpeed","_config$tension","_config$friction","_springConfig","fromOrigamiTensionAndFriction","_this$_initialVelocit","initialVelocity","__active","_startPosition","_lastPosition","_onUpdate","_lastTime","_frameTime","internalState","getInternalState","lastPosition","lastVelocity","lastTime","_timeout","zeta","omega0","omega1","envelope","_envelope","isOvershooting","isVelocity","isDisplacement","_animationFrame","stiffnessFromOrigamiValue","oValue","dampingFromOrigamiValue","projectNormal","bouncyTension","bouncyFriction","b3Friction2","b3Friction3","b3Nobounce","linearInterpolation","_easeInOut","_config$easing","_config$duration","_easing","numFrames","_fromValue","iterable","omit","keySet","kapsuleComponent","comboParam","wrapperElementType","methodNames","initPropNames","_ref$wrapperElementTy","_ref$nodeMapper","nodeMapper","_ref$methodNames","_ref$initPropNames","domEl","setPrevProps","configOptions","_destructor","_call","dynamicProps","insertAt","getElementsByTagName","styleSheet","createTextNode","styleInject","innerWidth","innerHeight","showNavInfo","nodeLabel","nodeDesc","onNodeHover","onNodeClick","linkLabel","linkDesc","onLinkHover","onLinkClick","aframeComp","forcegraph","domNode","innerHTML","navInfo","cameraG","tooltipEl","subTooltipEl","mouseCursor","laser","cct","prevObj","subLabel","_ref8","_ref9","yOffset","glScale","_ref2$markerAttrs","markerAttrs","preset","arMarker","cameraEntity","_ref10","_ref11","_plane","_raycaster","_pointer","_intersection","_worldPosition","_camera","_domElement","_selected","_hovered","_intersections","onPointerMove","onPointerCancel","deactivate","updatePointer","setFromCamera","intersectPlane","intersectObjects","getWorldDirection","transformGroup","getObjects","_changeEvent","_startEvent","_endEvent","STATE","rotateSpeed","zoomSpeed","panSpeed","noRotate","noZoom","noPan","staticMoving","dynamicDampingFactor","minDistance","maxDistance","mouseButtons","lastZoom","_keyState","_touchZoomDistanceStart","_touchZoomDistanceEnd","_lastAngle","_eye","_movePrev","_moveCurr","_lastAxis","_zoomStart","_zoomEnd","_panStart","_panEnd","_pointers","_pointerPositions","target0","position0","up0","zoom0","handleResize","ownerDocument","pageXOffset","clientLeft","pageYOffset","clientTop","getMouseOnScreen","getMouseOnCircle","onPointerUp","addPointer","trackPointer","pointer","pointerId","getSecondPointerPosition","removePointer","keydown","keyup","onMouseWheel","deltaMode","contextmenu","rotateCamera","eyeDirection","objectUpDirection","objectSidewaysDirection","moveDirection","setLength","zoomCamera","panCamera","mouseChange","objectUp","pan","scale_x","scale_y","checkDistances","minZoom","maxZoom","minPolarAngle","maxPolarAngle","minAzimuthAngle","maxAzimuthAngle","enableDamping","dampingFactor","enableZoom","enableRotate","enablePan","screenSpacePanning","keyPanSpeed","autoRotate","autoRotateSpeed","UP","BOTTOM","ONE","TWO","_domElementKeyEvents","getPolarAngle","spherical","getAzimuthalAngle","listenToKeyEvents","saveState","quat","setFromUnitVectors","quatInverse","lastQuaternion","twoPI","setFromVector3","rotateLeft","sphericalDelta","makeSafe","panOffset","setFromSpherical","zoomChanged","EPS","TOUCH_ROTATE","TOUCH_PAN","TOUCH_DOLLY_PAN","TOUCH_DOLLY_ROTATE","rotateStart","rotateEnd","rotateDelta","panStart","panEnd","panDelta","dollyStart","dollyEnd","dollyDelta","pointers","pointerPositions","getZoomScale","rotateUp","panLeft","objectMatrix","panUp","targetDistance","dollyOut","dollyScale","dollyIn","handleMouseDownRotate","handleMouseDownPan","handleTouchStartRotate","handleTouchStartPan","handleTouchStartDolly","handleTouchMoveRotate","handleTouchMovePan","handleTouchMoveDolly","mouseAction","handleMouseDownDolly","handleTouchMoveDollyPan","handleTouchMoveDollyRotate","handleMouseMoveRotate","handleMouseMoveDolly","handleMouseMovePan","handleMouseWheel","handleKeyDown","movementSpeed","rollSpeed","dragToLook","autoForward","tmpQuaternion","mouseStatus","moveState","down","forward","pitchUp","pitchDown","yawLeft","yawRight","rollLeft","rollRight","moveVector","rotationVector","movementSpeedMultiplier","updateMovementVector","updateRotationVector","getContainerDimensions","mouseup","moveMult","rotMult","offsetLeft","offsetTop","_mousedown","_mousemove","_mouseup","_keydown","_keyup","CopyShader","Pass","needsSwap","renderToScreen","textureID","fsQuad","writeBuffer","readBuffer","writeValue","clearValue","REPLACE","ALWAYS","EQUAL","KEEP","renderTarget1","renderTarget2","passes","copyPass","clock","passIndex","maskActive","isLastEnabledPass","NOTEQUAL","swapBuffers","effectiveWidth","effectiveHeight","_oldClearColor","oldAutoClear","oldClearAlpha","oldOverrideMaterial","_cache","Wrapper","_Error","PolishedError","colorToInt","convertToInt","huePrime","chroma","secondComponent","lightnessModification","namedColorMap","hexRegex","hexRgbaRegex","reducedHexRegex","reducedRgbaHexRegex","rgbRegex","rgbaRegex","hslRegex","hslaRegex","parseToRgb","normalizedColorName","nameToHex","rgbMatched","rgbaMatched","hslMatched","rgbColorString","hslRgbMatched","hslaMatched","_rgbColorString","_hslRgbMatched","reduceHexValue","numberToHex","firstValue","secondValue","thirdValue","fourthValue","rgbValue","curry","curried","combined","guard","lowerBoundary","upperBoundary","opacify","parsedColor","curriedOpacify","three","prevWidth","prevHeight","backgroundImageUrl","onBackgroundImageLoaded","skyRadius","enablePointerInteraction","hoverObj","toolTipElem","lineHoverPrecision","hoverOrderComparator","hoverFilter","tooltipContent","hoverDuringDrag","clickAfterDrag","onHover","onRightClick","controls","postProcessingComposer","extraRenderers","topObject","isPointerDragging","intersectingObjects","pointerPos","topIntersect","intersectionPoint","getPointerPos","_state$pointerPos","finalPos","finalLookAt","camPos","camLookAt","getLookAt","setCameraPos","setLookAt","zoomToFit","bboxArgs","fitToBbox","getBbox","bbox","maxBoxSide","coordType","paddedFov","fitHeightDistance","fitWidthDistance","newCameraPosition","objs","getScreenCoords","project","getSceneCoords","screenX","relCoords","tbControls","_ref4$controlType","controlType","_ref4$rendererConfig","rendererConfig","_ref4$extraRenderers","_ref4$waitForLoadComp","waitForLoadComplete","orbit","trackball","fly","evType","isPointerPressed","pressure","movementX","movementY","getOffset","addPass","controlsEngaged","controlsDragging","skysphere","loadComplete","finishLoad","linkKapsule","kapsulePropName","kapsuleType","dummyK","linkProp","linkMethod","kapsuleInstance","bindFG","linkedFGProps","linkedFGMethods","bindRenderObjs","linkedRenderObjsProps","linkedRenderObjsMethods","graph2ScreenCoords","screen2GraphCoords","getGraphObj","linkHoverPrecision","renderObjs","enableNavigationControls","enableNodeDrag","onNodeDrag","onNodeDragEnd","onNodeRightClick","onLinkRightClick","onBackgroundClick","onBackgroundRightClick","_state$forceGraph","forceGraph","pauseAnimation","animationFrameRequestId","resumeAnimation","_animationCycle","roDomNode","infoElem","lastSetCameraZ","_dragControls","curNodeDrag","__initialFixedPos","__disposeControlsAfterDrag","dragControls","__initialPos","__prevPos","nodeObj","initPos","prevPos","_newPos","newPos","__dragged","initFixedPos","aObj","bObj","graphObj","prevObjType","prevObjData","objType","objData","_fn","querySelector","childMatcher","childFirst","firstElementChild","EnterNode","datum","namespaceURI","_next","__data__","bindIndex","groupLength","dataLength","bindKey","keyValue","nodeByKeyValue","keyValues","arraylike","ascending","xhtml","xlink","xml","xmlns","namespaces","space","local","attrRemove","attrRemoveNS","fullname","removeAttributeNS","attrConstant","attrConstantNS","setAttributeNS","attrFunction","attrFunctionNS","defaultView","styleRemove","removeProperty","styleConstant","priority","styleFunction","getPropertyValue","getComputedStyle","propertyRemove","propertyConstant","propertyFunction","classArray","ClassList","_names","classedAdd","classedRemove","classedTrue","classedFalse","classedFunction","textRemove","textConstant","textFunction","htmlRemove","htmlConstant","htmlFunction","raise","nextSibling","lower","previousSibling","creatorInherit","creatorFixed","namespace","constantNull","selection_cloneShallow","cloneNode","selection_cloneDeep","parseTypenames","typenames","onRemove","typename","__on","onAdd","contextListener","initEvent","dispatchConstant","dispatchFunction","Selection","parents","_groups","_parents","subgroups","subnode","subgroup","selectAll","arrayAll","selectorAll","selectChild","childFind","selectChildren","childrenFilter","matcher","enterGroup","updateGroup","exitGroup","previous","_enter","_exit","sparse","onenter","append","onupdate","onexit","groups0","groups1","m0","m1","merges","group0","group1","compareDocumentPosition","compareNode","sortgroups","sortgroup","each","getAttributeNS","classed","html","creator","before","nonpassive","nonpassivecapture","nopropagation","stopImmediatePropagation","noevent","__noselect","MozUserSelect","yesdrag","noclick","cosh","S","ux0","uy0","ux1","uy1","rho","rho4","rho2","r0","r1","coshr0","sinh","SQRT2","_1","_2","zoomRho","sourceEvent","ownerSVGElement","createSVGPoint","matrixTransform","getScreenCTM","emptyOn","emptyTween","schedules","__transition","svgNode","degrees","skewX","interpolateTransform","pxComma","pxParen","degParen","xa","ya","xb","yb","interpolateTransformCss","DOMMatrix","WebKitCSSMatrix","isIdentity","interpolateTransformSvg","baseVal","consolidate","tweenRemove","tween0","tween1","tweenFunction","tweenValue","definition","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","color_formatHex","formatHex","color_formatRgb","formatRgb","rgbn","Rgb","rgbConvert","rgb_formatHex","rgb_formatRgb","Hsl","hslConvert","hsl2rgb","m2","basis","t3","define","channels","displayable","formatHsl","brighter","darker","gamma","nogamma","exponential","rgbGamma","rgbSpline","spline","reA","reB","bm","bi","zero","value1","string00","interpolate0","string1","string0","string10","attrInterpolate","attrInterpolateNS","attrTweenNS","attrTween","delayFunction","delayConstant","durationFunction","durationConstant","easeConstant","onFunction","on0","on1","sit","styleInterpolate","styleTween","textInterpolate","textTween","Transition","_name","newId","selection_prototype","inherit","id0","id1","styleNull","listener0","styleMaybeRemove","easeVarying","that","defaultTiming","ZoomEvent","Transform","applyX","applyY","invertX","invertY","rescaleX","domain","rescaleY","__zoom","defaultFilter","defaultExtent","SVGElement","defaultTransform","defaultWheelDelta","defaultTouchable","maxTouchPoints","defaultConstrain","extent","translateExtent","dx0","dx1","dy0","dy1","touchstarting","touchfirst","touchending","constrain","wheelDelta","scaleExtent","clickDistance2","tapDistance","wheeled","mousedowned","dblclicked","touchstarted","touchmoved","touchended","centroid","gesture","clean","__zooming","Gesture","taps","wheel","mouse","wheelidled","mousemoved","mouseupped","moved","k1","started","touch0","touch1","l0","l1","dp","dl","collection","scaleBy","scaleTo","k0","translateBy","translateTo","clickDistance","DragEvent","defaultContainer","defaultSubject","rgb2Int","checksum","csBits","cs","padStart","_tinyColor$toRgb","notifyRedraw","onNeedsRedraw","CanvasForceGraph","nodeCanvasObject","nodeCanvasObjectMode","linkLineDash","linkCanvasObject","linkCanvasObjectMode","globalScale","forceLayout","isShadow","isEngineRunning","getVisibility","getColor","getWidth","getLineDash","getCurvature","getLinkCanvasObjectMode","padAmount","__controlPoints","beforeCustomLinks","afterCustomLinks","defaultPaintLinks","replaceCustomLinks","otherCustomLinks","after","save","restore","linksPerColor","linksPerWidth","lineColor","linesPerLineDash","lineDashSegments","beginPath","controlPoints","strokeStyle","setLineDash","paintLinks","getRelPos","getNodeVal","arrowColor","arrowHalfWidth","bzLine","getCoordsAlongLine","arrowTailVertex","arrowTailAngle","fillStyle","paintArrows","getNumPhotons","getSpeed","getDiameter","numCyclePhotons","__photons","photons","cyclePhotonIdx","needsCleanup","__singleHop","arc","paintPhotons","getVal","getNodeCanvasObjectMode","visibleNodes","paintNodes","canvasCtx","linkParticlesAccessor","kapsulePropNames","propNames","returnVals","bindBoth","linkedProps","linkedMethods","adjustCanvasSize","curWidth","curHeight","pxScale","shadowCanvas","__baseElem","needsRedraw","resetTransform","pxRatio","setTransform","clearCanvas","clearRect","colorTracker","__indexColor","shadowGraph","nodePointerAreaPaint","paintFn","linkPointerAreaPaint","enableZoomInteraction","enablePanInteraction","enableZoomPanInteraction","autoPauseRedraw","onZoom","onZoomEnd","onRenderFramePre","onRenderFramePost","centerAt","setCenter","getZoom","setZoom","zoomK","getR","nodesPos","lastSetZoom","shadowCtx","getObjUnderPointer","getImageData","mousedownx","mousedowny","mousemoving","gestures","drag","beforestart","nodrag","__initialDragPos","dragPos","pointerDownEvent","cbEvents","refreshShadowCanvas","doRedraw","_fn2","commonPropTypes","arrayOf","isRequired","oneOfType","oneOf","pointerBasedPropTypes","threeBasedPropTypes","ForceGraph2DPropTypes","ForceGraph3DPropTypes","ForceGraphVRPropTypes","ForceGraphARPropTypes","ForceGraphVR","propTypes","ForceGraphAR","ForceGraph3D","ForceGraph2D","TRANSFORM_STYLE_PROPERTIES","wrapStyleTransforms","wrapped","DIRECTIONAL_FALLBACKS","Top","Bottom","Vertical","Left","Right","Horizontal","DIRECTIONAL_SUFFICES","getStyleValues","suffix","getDefaultStyleValue","compareNumbers","notNull","parsePosition","parsed","createAnimation","keyframe","animationRegistry","EASING_FUNCTIONS","INTERPOLATION_STYLE_PROPERTIES","ZERO_CLAMPED_STYLE_PROPERTIES","getAnimationTarget","iteration","getAnimationOrigin","getCompiledAnimation","compiledAnimation","makeInterpolatedStyle","animationValue","transitionToValue","transitionValue","onTransitionBegin","onTransitionEnd","createAnimatableComponent","WrappedComponent","wrappedComponentName","Animatable","handleRef","animationStyle","transitionStyle","transitionValues","currentTransitionValues","initializeTransitionState","delayTimer","transitionKeys","styleValues","missingKeys","transitionState","onAnimationBegin","iterationDelay","startAnimation","endState","transitionTo","setAnimation","scheduledAnimation","iterationCount","currentIteration","fromValues","toValues","fromValuesFlat","toValuesFlat","getTransitionState","needsInterpolation","needsZeroClamping","transitionToValues","transitions","currentTransitionValue","filtered","PropTypes","0.2","0.4","0.43","0.53","0.7","0.8","0.9","flash","0.25","0.5","0.75","jello","skewY","0.111","0.222","0.333","0.444","0.555","0.666","0.777","0.888","pulse","shake","0.1","0.3","0.6","swing","rubberBand","0.65","tada","wobble","0.15","0.45","bounceIn","bounceInUp","bounceInDown","bounceInRight","bounceInLeft","bounceOut","0.55","bounceOutUp","bounceOutDown","bounceOutRight","bounceOutLeft","makeFadeInTranslation","translationType","fadeInDown","fadeInUp","fadeInLeft","fadeInRight","fadeInDownBig","fadeInUpBig","fadeInLeftBig","fadeInRightBig","makeFadeOutTranslation","fadeOutDown","fadeOutUp","fadeOutLeft","fadeOutRight","fadeOutDownBig","fadeOutUpBig","fadeOutLeftBig","fadeOutRightBig","flipInX","flipInY","flipOutX","flipOutY","lightSpeedIn","lightSpeedOut","makeSlideInTranslation","slideInDown","slideInUp","slideInLeft","slideInRight","makeSlideOutTranslation","slideOutDown","slideOutUp","slideOutLeft","slideOutRight","makeZoomInTranslation","pivotPoint","modifier","zoomIn","zoomInDown","zoomInUp","zoomInLeft","zoomInRight","makeZoomOutTranslation","definitions","zoomOut","zoomOutDown","zoomOutUp","zoomOutLeft","zoomOutRight","ANIMATION_DEFINITIONS","registerAnimation","createComponent","CoreView","CoreText","CoreImage","FontDisplay","getFontFaceStyleSheet","getFontFaceRulesMatchingResource","fontFamilyName","CSSFontFaceRule","getFontFaceRules","fontDisplay","unloadAllAsync","ID","HTMLStyleElement","unloadAsync","deleteRule","loadAsync","resource","CodedError","_createWebStyle","isFontLoadingListenerSupported","styleElement","fontStyle","AUTO","styleElementIE","textNode","isIOS","isSafari","isEdge","isIE","isFirefox","getAssetForSource","localUri","displayFromFontSource","throwInvalidSourceError","loadSingleFontAsync","downloadAsync","loadPromises","isLoaded","fontFamilyOrFontMap","fontMap","all","loadFontInNamespaceAsync","NativeIconAPI","NativeModules","RNVectorIconsManager","RNVectorIconsModule","ensureNativeModuleAvailable","icon","TEXT_PROP_NAMES","TOUCHABLE_PROP_NAMES","createIconButtonComponent","Icon","iconStyle","iconProps","touchableProps","colorStyle","blockStyle","TouchableHighlight","PureComponent","createIconSet","glyphMap","fontFile","fontBasename","fontReference","windows","android","fromCodePoint","styleDefaults","styleOverrides","allowFontScaling","imageSourceCache","setError","createIconSourceCache","resolveGlyph","TabBarItemIOS","TabBarItem","getImageSource","processedColor","getImageForFont","imagePath","getImageSourceSync","getImageForFontSync","loadFont","loadFontWithFileName","hasIcon","getRawGlyphMap","getFontFamily","fontName","expoAssetId","RNVIconComponent","_mounted","fontIsLoaded","_icon","MaterialCommunityIcons","arrayLikeToArray","LogBox","ignoreLogs","ignoreAllLogs","uninstall","install","AFRAME","accessorFn","ThreeForceGraph","parseJson","parseFn","geval","eval","parseAccessor","schema","function","infoEl","cameraEl","cameraObj","object3D","sceneEl","evt","setObject3D","hoverDetail","removeObject3D","oldData","elData","td","getIntersection","Spring","eventify","springCoeff","dragCoeff","adaptiveTimeStepWeight","dimensionalCache","Body","generateCreateBodyFunction","createQuadTree","generateQuadTreeFunction","createBounds","generateBoundsFunction","createDragForce","generateCreateDragForceFunction","createSpringForce","generateCreateSpringForceFunction","integrate","generateIntegratorFunction","bodies","springs","quadTree","bounds","springForce","dragForce","forceMap","iterationNumber","addForce","insertBodies","isPinned","updateBodyForce","publicApi","removeForce","forceIndex","getForces","movement","addBody","addBodyAt","createBody","removeBody","addSpring","body1","body2","getTotalMovement","removeSpring","getBestNewBodyPosition","neighbors","getBestNewPosition","getBBox","getBoundingBox","invalidateBBox","augment","expose","forceFunction","sourceIsNumber","goBack","navigate","setParams","NOT_INITIALIZED_ERROR","BaseNavigationContainer","useSyncState","getPartialState","isFirstMountRef","getKey","setKey","canGoBack","handled","resetRoot","CommonActions","getRootState","getCurrentRoute","dangerouslyGetState","dangerouslyGetParent","lastEmittedOptionsRef","builderContext","scheduleContext","isInitialRef","getIsInitial","onStateChangeRef","defaultOnUnhandledAction","onUnhandledAction","createNavigatorFactory","Navigator","NavigationHelpersContext","initialRoutes","compatOptions","parentScreens","remaining","parseQueryParams","createNestedStateObject","createNormalizedConfigs","aParts","bParts","aWildcardIndex","bWildcardIndex","matchAgainstConfigs","remainingPath","findFocusedRoute","findParseConfigForRoute","joinPaths","matchedParams","routeConfig","parentPattern","createConfigItem","initials","nestedConfig","routeName","findInitialRoute","sameParents","createStateObject","initialRoute","nestedState","nestedStateIndex","parseConfig","singleMatcher","multiMatcher","decodeComponents","tokens","encodedURI","replaceMap","customDecodeURIComponent","separatorIndex","isArr","allParams","focusedParams","focusedRoute","getActiveRoute","currentOptions","nestedRouteNames","hasNext","currentParams","fromEntries","getParamName","nextRoute","normalizedConfig","createNormalizedConfigItem","_curry3","_isArrayLike","_xwrap","_iterableReduce","xf","_methodReduce","symIterator","_arrayReduce","always","paramsSerializer","serializedParams","toISOString","hashmarkIndex","__CANCEL__","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","adapter","getDefaultAdapter","transformRequest","transformResponse","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","auth","username","unescape","Authorization","btoa","baseURL","onreadystatechange","responseURL","responseHeaders","getAllResponseHeaders","responseText","statusText","onabort","ontimeout","timeoutErrorMessage","xsrfValue","read","onDownloadProgress","onUploadProgress","cancelToken","enhanceError","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","mergeDeepProperties","axiosKeys","otherKeys","Cancel","useTheme","cssKeywords","reverseKeywords","labels","hwb","cmyk","xyz","lab","lch","keyword","ansi16","ansi256","hcg","apple","rdif","gdif","bdif","diffc","reversed","currentClosestKeyword","currentClosestDistance","smin","lmin","hi","vmin","wh","bl","hr","ansi","mult","rem","colorString","mg","pure","prevPropKeys","nextPropKeys","SceneView","getCurrentState","currentRoute","setCurrentState","ScreenComponent","NavigationStateContext","useDescriptors","onAction","onRouteFocus","navigations","helpers","setOptions","useNavigationCache","routeOptions","screenOptions","NavigationRouteContext","routeState","PrivateValueStore","VISITED_ROUTE_KEYS","shouldPreventRemove","nextRouteKeys","nextRoutes","removedRoutes","currentRoutes","visitedRouteKeys","beforeRemoveAction","beforeRemoveListeners","useOnAction","routerConfigOptionsRef","visitedNavigators","isPrevented","onRouteFocusParent","shouldFocus","onActionParent","actionListeners","routeKey","useOnPreventRemove","addListenerParent","isArrayEqual","useNavigationBuilder","navigatorKey","useRegisterNavigator","createRouter","routeConfigs","getRouteConfigsFromChildren","initialParams","initialParamsFromParams","routeGetIdList","isStateValid","isStateInitialized","previousNestedParamsRef","previousParams","updatedState","shouldUpdate","initializedStateRef","lastFocusedKeyRef","currentFocusedKey","lastFocusedKey","useFocusEvents","childListeners","routerConfigOptions","sourceRouteKey","useOnRouteFocus","parentNavigationHelpers","useNavigationHelpers","focusedListeners","useFocusedListenersChildrenAdapter","getStateListeners","childState","useOnGetState","useCurrentRender","LinkingContext","NavigationContainer","theme","isLinkingEnabled","linking","refContainer","useDocumentTitle","cancelled","useThenable","linkingContext","isReady","onReadyRef","rtlDetect","isRtlLang","getLangDir","isObj","assignKey","_isObject2","combinedValue","processedValue","_prefixValue2","_addNewValuesOnly2","_processedValue","_prefixProperty2","_isPrefixedValue2","_isPrefixedValue","grab","grabbing","alternativeProps","alternativeValues","flexShorthandMappings","msFlex","flexValues","unset","WebkitBoxDirection","grad","sliceIterator","isSimplePositionValue","isComplexSpanValue","displayValues","propertyConverters","propertyConverter","alignmentValues","msGridRowAlign","msGridColumn","_value$split","_value$split2","_end$split","_end$split2","maybeSpan","maybeNumber","msGridColumnSpan","msGridRow","_value$split3","_value$split4","_end$split3","_end$split4","msGridRowSpan","gridTemplateColumns","msGridColumns","gridTemplateRows","msGridRows","justifySelf","msGridColumnAlign","alternativePropList","marginBlockStart","marginBlockEnd","marginInlineStart","marginInlineEnd","paddingBlockStart","paddingBlockEnd","paddingInlineStart","paddingInlineEnd","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderInlineStart","borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth","borderInlineEnd","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","maxHeight","propertyPrefixMap","outputValue","multipleValues","dashCaseProperty","_hyphenateProperty2","pLen","prefixMapping","prefixValue","webkitOutput","mozOutput","_capitalizeString2","WebkitTransition","WebkitTransitionProperty","MozTransition","MozTransitionProperty","Webkit","Moz","ReactNoopUpdateQueue","updater","isValidElement","TurboModuleRegistry","_config$deceleration","_deceleration","deceleration","_velocity","Info","any_blank_count","any_blank_ms","any_blank_speed_sum","mostly_blank_count","mostly_blank_ms","pixels_blank","pixels_sampled","pixels_scrolled","total_time_spent","sample_count","_minSampleCount","_sampleRate","_anyBlankStartTime","_enabled","_info","_mostlyBlankStartTime","_samplesStartTime","_resetData","setSampleRate","sampleRate","setMinSampleCount","minSampleCount","scrollSpeed","blankTop","firstFrame","blankBottom","bottomEdge","blankness","multigraph","uniqueLinkId","multiEdges","suspendEvents","createLink","fromId","toId","linkId","makeLinkId","isMultiEdge","Link","changes","recordLinkChange","recordNodeChange","enterModification","exitModification","graphPart","fromNode","toNode","addLinkToNode","removeLink","getNodeCount","getLinkCount","getLinksCount","getNodesCount","getLinks","forEachNode","forEachLinkedNode","oriented","forEachOrientedLink","linkedNodeId","forEachNonOrientedLink","forEachLink","beginUpdate","endUpdate","hasLink","hasNode","realOn","enterModificationReal","exitModificationReal","recordLinkChangeReal","recordNodeChangeReal","monitorSubscribers","changeType","prevLinks","indexOfElementInArray","fromNodeId","toNodeId","valuesIterator","physicsSettings","physicsSimulator","createSimulator","nodeMass","nodeBodies","bodiesCount","springTransform","initBody","initLink","onGraphChanged","wasStable","api","updateStableStatus","lastMove","isStableNow","getInitializedBody","setNodePosition","setPosition","getGraphRect","forEachBody","pinNode","isNodePinned","getBody","getSpring","getForceVectorLength","simulator","isStable","releaseNode","releaseLink","maxNeighbors","otherBody","getNeighborBodies","updateBodyMass","isNodeOriginallyPinned","fromBody","toBody","debounce","wait","immediate","later","debounced","callNow","taskHead","taskTail","clockLast","clockNow","clockSkew","setFrame","clearNow","Timer","_time","wake","timerFlush","sleep","nap","poke","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","nativeMin","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","isInvoking","isBinary","reIsHostCtor","reIsUint","arrayIncludes","fromIndex","fromRight","baseFindIndex","baseIsNaN","baseIndexOf","arrayIncludesWith","comparator","cacheHas","overArg","arrayProto","funcProto","coreJsData","maskSrcKey","uid","IE_PROTO","funcToString","reIsNative","getPrototype","nativeGetSymbols","getNative","nativeCreate","Hash","ListCache","MapCache","SetCache","arrayLikeKeys","inherited","baseTimes","skipIndexes","isIndex","assocIndexOf","baseIsNative","isHostObject","toSource","baseKeysIn","nativeKeysIn","isProto","Ctor","isPrototype","getAllKeysIn","keysFunc","symbolsFunc","baseGetAllKeys","keysIn","getSymbolsIn","getMapData","isKeyable","getSymbols","stubArray","isCommon","valuesLength","outer","valuesIndex","baseDifference","isNativeFunction","_wrapNativeSuper","family","D","E","F","J","fonts","K","L","H","vendor","G","M","race","detachEvent","I","UNINTIALIZED_STATE","stateRef","isSchedulingRef","isMountedRef","setTrackingState","trackingState","_interopDefault","_partial","_curry","_pipeP","_keys","_forEach","_dissoc","_merge","_always","_ifElse","_contains","_gte","_T","_is","_identity","_isNil","_cond","axios","__awaiter","throw","__generator","sent","trys","ops","isWithin","containsText","isPromise","DEFAULT_HEADERS","Accept","DEFAULT_CONFIG","TIMEOUT_ERROR_CODES","NODEJS_CONNECTION_ERROR_CODES","in200s","in400s","in500s","statusNil","getProblemFromError","isCancel","getProblemFromStatus","axiosInstance","R","O","T","problem","originalError","monitors","addMonitor","requestTransforms","asyncRequestTransforms","responseTransforms","asyncResponseTransforms","addRequestTransform","addAsyncRequestTransform","addResponseTransform","addAsyncResponseTransform","setHeader","setHeaders","deleteHeader","setBaseURL","getBaseURL","any","post","unlink","CancelToken","apisauce","CLIENT_ERROR","SERVER_ERROR","TIMEOUT_ERROR","CONNECTION_ERROR","NETWORK_ERROR","UNKNOWN_ERROR","CANCEL_ERROR","_slice","skippedModels","hashedModelKeys","limiters","valpha","newArr","zeroArray","hashedKeys","limit","getset","maxfn","assertArray","places","percentString","percent","unitArray","unitObject","roundTo","roundToPlace","saturationl","saturationv","wblack","rgbNumber","luminosity","lum","chan","contrast","lum1","lum2","contrastRatio","whiten","blacken","grayscale","fade","opaquer","mixinColor","w2","newAlpha","_isString","_makeFlat","flatt","jlen","ilen","pad","ws","saveRecoveryProps","localStorage","setItem","recoveredProps","removeItem","_consumeRecoveryProps","_getRecoveredProps","registerRootComponent","AppRootComponent","App","errorRecovery","isDOMAvailable","Intl","DateTimeFormat","resolvedOptions","timeZone","iso","getLocalizationAsync","isoCurrencyCodes","timezone","parseLocale","ExpoLocalization","ANIMATED_EASING_PREFIXES","Collapsible","contentHandle","_handleRef","_handleLayoutChange","contentHeight","collapsed","measuring","measured","collapsedHeight","_componentDidUpdate","unmounted","_toggleCollapsed","_transitionToHeight","_measureContent","found","enablePointerEvents","renderChildrenCollapsed","contentStyle","align","shouldRenderChildren","COLLAPSIBLE_PROPS","Accordion","_renderContainer","renderCollapsible","activeSections","sectionContainerStyle","expandFromBottom","touchableComponent","renderHeader","renderFooter","renderSectionTitle","_toggleSection","expanded","expandMultiple","updatedSections","containerStyle","renderContent","renderAsFlatList","viewProps","collapsibleProps","nestedScrollEnabled","MapShim","getIndex","anonymous","__entries__","prototypeAccessors","isBrowser","global$1","requestAnimationFrame$1","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","onTransitionEnd_","leadingCall","trailingCall","resolvePending","timeoutCallback","throttle","connect_","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","characterData","subtree","getInstance","instance_","defineConfigurable","getWindowOf","emptyRect","createRectInit","toFloat","getBordersSize","getHTMLElementContentRect","paddings","getPaddings","horizPad","vertPad","isDocumentElement","vertScrollbar","horizScrollbar","isSVGGraphicsElement","SVGGraphicsElement","getContentRect","getSVGContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","broadcastRect","ResizeObserverEntry","rectInit","contentRect","Constr","DOMRectReadOnly","createReadOnlyRect","ResizeObserverSPI","callbackCtx","activeObservations_","observations_","callback_","controller_","callbackCtx_","Element","observations","clearActive","this$1","observation","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","innerFn","outerFn","tryLocsList","protoGenerator","Generator","Context","_invoke","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","_sent","dispatchException","abrupt","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","__await","unwrapped","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iteratorMethod","isGeneratorFunction","genFun","mark","awrap","skipTempReset","rootRecord","rval","loc","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","RtlDetectLib","_regexEscape","_regexParseLocale","_escapeRegExpPattern","_toLowerCase","reserveReturnValue","_toUpperCase","_trim","regexp","patterns","addPatterns","patternDelimiter","_parseLocale","strLocale","countryCode","objLocale","_BIDI_RTL_LANGS","for","isMounted","enqueueForceUpdate","enqueueReplaceState","enqueueSetState","refs","isPureReactComponent","__self","_owner","Q","keyPrefix","V","U","W","aa","X","Y","Z","ba","ReactCurrentDispatcher","ReactCurrentBatchConfig","suspense","ReactCurrentOwner","IsSomeRendererActing","Fragment","Profiler","StrictMode","Suspense","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","_calculateChangedBits","_currentValue","_currentValue2","_threadCount","Consumer","createFactory","createRef","lazy","_ctor","_status","useImperativeHandle","useReducer","ca","da","fa","ia","ja","ka","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","sanitizeURL","removeEmptyString","oa","pa","ma","na","la","xlinkHref","ra","sa","ta","ua","wa","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ma","Ka","La","Na","Oa","Pa","prepareStackTrace","Qa","_render","Ra","_payload","_init","Sa","Ta","Va","_valueTracker","Ua","Wa","Xa","Ya","defaultChecked","_wrapperState","initialChecked","Za","controlled","$a","eb","db","fb","selected","defaultSelected","gb","hb","jb","kb","lb","mb","nb","ob","MSApp","execUnsafeLocalFunction","pb","lastChild","nodeValue","gridArea","gridRowSpan","gridColumnSpan","lineHeight","rb","sb","tb","ub","br","col","embed","img","keygen","wbr","wb","srcElement","correspondingUseElement","zb","Ab","Bb","Cb","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","Ob","Pb","Qb","Rb","Sb","Tb","Ub","Vb","Wb","Xb","Zb","alternate","$b","memoizedState","dehydrated","cc","sibling","dc","ec","gc","hc","ic","jc","kc","lc","mc","nc","oc","pc","qc","rc","blockedOn","domEventName","eventSystemFlags","targetContainers","sc","tc","wc","lanePriority","unstable_runWithPriority","containerInfo","xc","yc","zc","Ac","Bc","unstable_scheduleCallback","unstable_NormalPriority","Cc","Dc","Ec","animationend","animationiteration","animationstart","transitionend","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Pc","Qc","unstable_now","Rc","Uc","pendingLanes","expiredLanes","suspendedLanes","pingedLanes","Vc","entangledLanes","entanglements","Wc","Xc","Yc","Zc","$c","eventTimes","clz32","cd","dd","unstable_UserBlockingPriority","ed","fd","gd","hd","uc","jd","kd","ld","md","nd","od","charCode","pd","qd","rd","_reactName","_targetInst","isPersistent","wd","xd","yd","sd","ud","vd","Ad","getModifierState","zd","fromElement","toElement","Bd","Dd","dataTransfer","Fd","Hd","pseudoElement","Jd","clipboardData","Ld","Md","Esc","Spacebar","Up","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","8","9","12","13","16","17","18","19","20","27","32","33","34","35","36","37","38","39","40","45","46","112","113","114","115","116","117","118","119","120","121","122","123","144","145","224","Od","Alt","Control","Meta","Shift","Pd","Rd","which","Td","tangentialPressure","tiltX","tiltY","twist","isPrimary","Vd","targetTouches","Xd","Zd","wheelDeltaX","wheelDeltaY","deltaZ","$d","documentMode","ee","fe","ge","he","ie","le","ne","oe","pe","qe","re","se","ue","ve","we","xe","ye","ze","oninput","Ae","Be","Ce","De","Ee","Fe","He","Ie","Je","Ke","Le","Ne","HTMLIFrameElement","contentWindow","Oe","Pe","Qe","Re","Se","Te","Ue","anchorOffset","focusOffset","Ve","We","Xe","Ye","Ze","Yb","$e","Nb","ef","ff","parentWindow","gf","hf","je","ke","jf","kf","lf","mf","nf","of","pf","qf","rf","tf","vf","wf","yf","zf","Af","Bf","Cf","Df","Ef","contextTypes","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Ff","childContextTypes","Gf","Hf","If","getChildContext","Jf","__reactInternalMemoizedMergedChildContext","Kf","Lf","Mf","Nf","Of","Pf","unstable_cancelCallback","Qf","unstable_shouldYield","Rf","unstable_requestPaint","Sf","Tf","unstable_getCurrentPriorityLevel","Uf","unstable_ImmediatePriority","Vf","Wf","Xf","unstable_LowPriority","Yf","unstable_IdlePriority","Zf","$f","ag","bg","cg","dg","eg","fg","gg","hg","ig","jg","kg","lg","ng","og","pg","qg","rg","sg","childLanes","tg","firstContext","lanes","ug","vg","observedBits","responders","wg","xg","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","effects","yg","zg","eventTime","lane","Ag","Bg","Cg","Dg","Eg","Fg","Gg","Kg","_reactInternals","Hg","Ig","Jg","Lg","shouldComponentUpdate","Mg","Ng","componentWillReceiveProps","Og","getSnapshotBeforeUpdate","componentWillMount","Pg","Qg","_stringRef","Rg","Sg","lastEffect","nextEffect","firstEffect","Tg","Ug","Vg","implementation","Wg","Xg","Yg","Zg","$g","ah","bh","ch","dh","eh","fh","gh","hh","ih","memoizedProps","revealOrder","jh","kh","lh","mh","nh","oh","pendingProps","ph","qh","rh","th","uh","_workInProgressVersionPrimary","vh","xh","yh","zh","Ah","Bh","Ch","Dh","Eh","Fh","Gh","Hh","baseQueue","Ih","Jh","Kh","lastRenderedReducer","eagerReducer","eagerState","lastRenderedState","Lh","Mh","_getVersion","_source","mutableReadLanes","Nh","subscribe","setSnapshot","Oh","Ph","Qh","Rh","deps","Sh","Th","Uh","Vh","Wh","Xh","Yh","Zh","$h","ai","ci","di","readContext","useDeferredValue","useTransition","useMutableSource","useOpaqueIdentifier","unstable_isNewReconciler","uf","ei","fi","gi","ji","ki","li","mi","baseLanes","ni","oi","pi","UNSAFE_componentWillUpdate","componentWillUpdate","qi","getDerivedStateFromError","ri","pendingContext","Bi","Di","Ei","si","retryLane","ti","unstable_avoidThisFallback","ui","unstable_expectedLoadTime","vi","wi","xi","yi","zi","isBackwards","renderingStartTime","tailMode","Ai","Fi","Gi","wasMultiple","onclick","Hi","Ii","Ji","Ki","Li","Mi","Ni","Oi","Pi","Qi","Ri","Si","componentDidCatch","Ti","componentStack","Ui","WeakSet","Vi","Wi","Xi","__reactInternalSnapshotBeforeUpdate","Yi","Zi","$i","aj","bj","onCommitFiberUnmount","cj","dj","ej","fj","gj","_reactRootContainer","hj","ij","jj","kj","lj","mj","nj","oj","pj","qj","rj","sj","tj","uj","vj","wj","ck","xj","yj","zj","Aj","Bj","Cj","Dj","Ej","Fj","Gj","Hj","Ij","Jj","Sc","Kj","Lj","Mj","callbackNode","expirationTimes","callbackPriority","Tc","Nj","Oj","Pj","Qj","Rj","Sj","Tj","finishedWork","finishedLanes","Uj","Wj","Xj","pingCache","Yj","Zj","ak","bk","dk","focusedElem","selectionRange","ek","Me","setStart","setEnd","onCommitFiberRoot","fk","gk","ik","pendingChildren","jk","mutableSourceEagerHydrationData","lk","mk","nk","qk","hydrationOptions","mutableSources","_internalRoot","rk","tk","sk","uk","hk","unstable_observedBits","unmount","Vj","vk","wk","findFiberByHostInstance","bundleType","rendererPackageName","xk","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setSuspenseHandler","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","yk","supportsFiber","inject","flushSync","unstable_batchedUpdates","unstable_createPortal","unstable_renderSubtreeIntoContainer","MessageChannel","unstable_forceFrameRate","port2","port1","onmessage","postMessage","sortIndex","expirationTime","priorityLevel","unstable_Profiling","unstable_continueExecution","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_wrapCallback","prefixProperties","newStyle","requiredPrefixes","capitalizedProperty","styleProperty","_capitalizeString","metaData","addIfNew","_hyphenateStyleName2","_hyphenateStyleName","_assign","_invariant","ReactComponent","injectedMixins","ReactClassInterface","statics","getDefaultProps","updateComponent","ReactClassStaticInterface","RESERVED_SPEC_KEYS","mixSpecIntoComponent","createMergedResultFunction","mixStaticSpecIntoComponent","autobind","validateMethodOverride","isAlreadyDefined","specPolicy","ReactClassMixin","spec","autoBindPairs","__reactAutoBindPairs","isReactClassMethod","createChainedFunction","mergeIntoWithNoDuplicateKeys","bindAutoBindMethod","IsMountedPreMixin","__isMounted","IsMountedPostMixin","replaceState","ReactClassComponent","pairs","autoBindKey","bindAutoBindMethods","makeEmptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","ReactPropTypesSecret","emptyFunctionWithReset","resetWarningCache","shim","componentName","propFullName","secret","getShim","ReactPropTypes","symbol","instanceOf","objectOf","exact","checkPropTypes","_dereq_","def","3","byteLength","b64","getLens","validLen","placeHoldersLen","toByteArray","Arr","_byteLength","curByte","revLookup","fromByteArray","uint8","extraBytes","len2","encodeChunk","4","createStyle","5","Buffer","6","base64","ieee754","kMaxLength","TYPED_ARRAY_SUPPORT","RangeError","encodingOrOffset","allocUnsafe","byteOffset","fromArrayLike","fromArrayBuffer","isEncoding","actual","write","fromString","fromObject","assertSize","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","bidirectionalIndexOf","arrayIndexOf","indexSize","arrLength","valLength","buf","readUInt16BE","foundIndex","hexWrite","strLen","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","lo","utf16leToBytes","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","decodeCodePointsArray","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","typedArraySupport","_augment","species","allocUnsafeSlow","_isBuffer","swap16","swap32","swap64","inspect","thisStart","thisEnd","thisCopy","targetCopy","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","stringtrim","base64clean","7","origPrevent","storage","formatArgs","useColors","lastC","firebug","table","chrome","localstorage","formatters","selectColor","coerce","logFn","skips","prevColor","10","11","hasSymbols","toStr","origDefineProperty","supportsDescriptors","arePropertyDescriptorsSupported","predicates","st","gt","ut","ft","lt","attrChange","attrName","attributeChangedCallback","ct","$","ht","vt","nt","tt","createdCallback","created","mt","rt","et","isPrototypeOf","yt","WebKitMutationObserver","HTMLElement","attributeOldValue","webkitRequestAnimationFrame","mozRequestAnimationFrame","msRequestAnimationFrame","removedNodes","innerHTMLHelper","ot","dtype","14","ThrowTypeError","asyncGenIterator","TypedArray","INTRINSICS","Atomics","decodeURI","encodeURI","EvalError","SharedArrayBuffer","SyntaxError","URIError","allowMissing","15","GetIntrinsic","$Object","$TypeError","$String","assertRecord","$isNaN","$isFinite","IsCallable","ES5","ToPrimitive","ToBoolean","ToNumber","ToInteger","ToInt32","ToUint32","ToUint16","posInt","ToString","ToObject","CheckObjectCoercible","optMessage","SameValue","Type","IsPropertyDescriptor","Desc","allowed","isData","IsAccessor","IsAccessorDescriptor","IsDataDescriptor","IsGenericDescriptor","FromPropertyDescriptor","ToPropertyDescriptor","Obj","getter","$SyntaxError","ES","recordType","argumentName","remain","21","isCallable","ES5internalSlots","actualHint","22","23","dstLength","24","forEachArray","receiver","forEachString","forEachObject","25","ERROR_MESSAGE","binder","boundLength","boundArgs","Empty","26","28","29","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","30","superCtor","super_","TempCtor","31","isSlowBuffer","fnToStr","constructorRegex","isES6ClassFn","fnStr","hasToStringTag","tryFunctionObject","strClass","confirm","xtend","X_HEIGHTS","M_WIDTHS","CAP_HEIGHTS","TAB_ID","SPACE_ID","TextLayout","opt","_measure","computeMetrics","wrapper","getGlyphById","glyphIdx","findChar","getKerning","kernings","kern","second","_opt","_setupSpaceGlyphs","maxLineWidth","baseline","descender","letterSpacing","getAlignType","_descender","_baseline","_xHeight","getXHeight","_capHeight","getCapHeight","_lineHeight","_ascender","lineIndex","lastGlyph","getGlyph","xadvance","_linesTotal","_fallbackSpaceGlyph","_fallbackTabGlyph","getMGlyph","tabWidth","xoffset","yoffset","curPen","nextPen","nextWidth","xhr","parseASCII","parseXML","readBinary","isBinaryFormat","xml2","binary","req","getBinaryOpts","statusCode","equal","HEADER","keysShim","isArgs","isEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","41","origKeys","originalKeys","42","callee","43","splitLine","parseData","parseIntList","pages","lineData","44","readBlock","blockID","bitField","smooth","unicode","italic","bold","fixedHeight","charset","stretchH","spacing","readNameNT","readStringNT","readInfo","packed","alphaChnl","redChnl","greenChnl","blueChnl","readCommon","readPages","page","chnl","readChars","readKernings","byte","parseAttributes","NAME_MAP","scaleh","scalew","stretchh","lineheight","alphachnl","redchnl","greenchnl","bluechnl","getAttribs","attribs","getAttribList","dict","attrib","xmlRoot","pageRoot","47","48","present","dateNow","navigationStart","performanceNow","noConflict","conflict","49","50","setImmediate","setTimeoutFunc","asap","_deferreds","doResolve","deferred","finale","Handler","reason","ex","_setImmediateFn","51","anArray","CW","CCW","numIndices","52","leftWhitespace","rightWhitespace","53","getPolyfill","boundTrim","54","55","polyfill","56","defaultInstanceSettings","begin","loopBegin","changeBegin","changeComplete","loopComplete","timelineOffset","defaultTweenSettings","endDelay","validTransforms","minMax","stringContains","applyArguments","rgbPrefixRegex","pth","inp","HTMLInputElement","dom","fnc","und","easingFunctionRegex","parseEasingParameters","solver","amplitude","period","penner","eases","parseEasings","selectString","auxArrayFilter","filterArray","NodeList","HTMLCollection","arrayContains","cloneObject","replaceObjectProps","mergeObjects","hexToRgbaHexRegex","hexToRgbaRgbRegex","hslToRgbaHsl1Regex","hslToRgbaHsl2Regex","colorToRgb","rgbToRgba","hexValue","hexToRgba","hslValue","hslToRgba","unitRegex","getUnit","getFunctionValue","animatable","convertPxToUnit","tempEl","parentEl","convertedUnit","getCSSValue","uppercasePropName","getAnimationType","transformRegex","getElementTransforms","getTransformValue","getTransformUnit","getOriginalTargetValue","operatorRegex","getRelativeValue","whitespaceRegex","validateValue","originalUnit","unitLess","getDistance","getPolylineLength","previousPos","totalLength","numberOfItems","currentPos","getTotalLength","getCircleLength","getRectLength","getLineLength","getPolygonLength","getParentSvg","pathEl","svgData","parentSvgEl","getParentSvgEl","viewBoxAttr","getPathProgress","getPointAtLength","valueRegex","decomposeValue","original","numbers","strings","parseTargets","targets","getAnimatables","springRegex","normalizePropertyTweens","tweenSettings","propArray","getProperties","newKey","flattenKeyframes","normalizeTweens","previousTween","normalizeTweenValues","toUnit","previousValue","fromUnit","isPath","setProgressValue","manual","setTargetsValue","animatables","valueUnit","animType","getAnimations","lastTween","getInstanceTimings","animLength","getTlOffset","timings","raf","instanceID","activeInstances","pausedInstances","engine","activeInstancesLength","activeInstance","instanceIndex","anime","childrenLength","makePromise","_resolve","instanceSettings","toggleInstanceDirection","adjustTime","resetTime","seekCild","setAnimationsProgress","insTime","animationsLength","tweenLength","eased","toNumbersLength","fromNumber","stringsLength","n$1","setCallback","passThrough","setInstanceProgress","engineTime","insDuration","insDelay","insEndDelay","reversePlayback","i$1","syncInstanceChildren","began","changeBegan","changeCompleted","completed","removeTargetsFromAnimations","targetsArray","len$1","childAnimations","convertPx","setDashoffset","fromFirst","fromCenter","fromLast","isRange","val1","val2","maxValue","fromX","fromY","distanceX","distanceY","timeline","tl","instanceParams","tlIndex","ins","insParams","tlDuration","57","nextKey","undefined$1","asyncGeneratorStep","_throw","_seed","MathUtils","mapLinear","damp","lambda","pingpong","smoothstep","smootherstep","randInt","randFloat","randFloatSpread","seededRandom","degToRad","radToDeg","radians","ceilPowerOfTwo","setQuaternionFromProperEuler","c13","s13","c1_3","s1_3","c3_1","s3_1","setScalar","setX","setY","setComponent","subScalar","clampScalar","clampLength","roundToZero","lerpVectors","rotateAround","extractBasis","transposeIntoArray","transformUv","setZ","setW","setAxisAngleFromQuaternion","setAxisAngleFromRotationMatrix","_EventDispatcher","_WebGLRenderTarget","_s2","_s3","rotateTowards","applyEuler","_quaternion","projectOnPlane","_vector","reflect","setFromCylindrical","setFromArray","setFromCenterAndSize","_vector$1","setFromObject","expandByVector","_box","containsBox","_v0","_v1","_v2","getBoundingSphere","_normal","recast","intersectSphere","setFromMatrix3","makeBasis","_v1$1","makeRotationFromEuler","_ce","_cf","_de","_df","_ae","_af","_be","_bf","_ac","_ad","_bc","_bd","makeShear","reorder","_quaternion$1","toVector3","enableAll","toggle","disableAll","_v1$2","_position","_scale","setRotationFromAxisAngle","setRotationFromEuler","setRotationFromMatrix","rotateOnWorldAxis","worldToLocal","attach","getObjectById","getWorldPosition","getWorldQuaternion","getWorldScale","_l","_i2","_i3","_shapes","distanceToSphere","projectPoint","intersectLine","_v2$1","_v3","setFromPointsAndIndices","convertGammaToLinear","convertLinearToGamma","convertSRGBToLinear","convertLinearToSRGB","getHexString","offsetHSL","addColors","lerpColors","lerpHSL","Face3","vertexNormals","_il","_data","_vector$3","Int8BufferAttribute","Uint8BufferAttribute","Uint8ClampedBufferAttribute","Int16BufferAttribute","Int32BufferAttribute","Float16BufferAttribute","Float64BufferAttribute","copyAt","copyColorsArray","copyVector2sArray","copyVector3sArray","copyVector4sArray","onUpload","TYPED_ARRAYS","getTypedArray","setDrawRange","_il2","_morphAttribute","computeFaceNormals","computeTangents","_i4","_il3","_j","_jl","_i5","_il4","_i6","_il5","toNonIndexed","_newAttribute","_i7","attributeData","_attribute2","_attributeData","_name2","_i8","_groupMaterial","_BufferGeometry","_iy","_ix","getFocalLength","getEffectiveFOV","setViewOffset","clearViewOffset","transmissionmap_fragment","transmissionmap_pars_fragment","_attribute","_buffer","_type","_buffer2","_type2","getRenderList","setRenderList","_array","_influence","maxMorphTargets","maxMorphNormals","_uniforms","_shadow","_shadowUniforms","_uniforms2","_uniforms3","_shadow2","_shadowUniforms2","_uniforms4","_uniforms5","_uniforms6","_uniforms7","_uniforms8","useSkinning","useInstancing","_depthMaterial","_pars","_equationToGL","_factorToGL","_wrappingToGL","_filterToGL","LOG2E","_j2","_mipmap2","_samples","_glInternalFormat","_samples2","WebVRManager","renderWidth","renderHeight","device","frameData","poseTarget","standingMatrix","standingMatrixInverse","VRFrameData","onVRDisplayPresentChange","tempQuaternion","tempPosition","currentPixelRatio","currentSize","eyeParameters","getEyeParameters","triggers","grips","findGamepad","gamepads","getGamepads","gamepad","updateViewportFromBounds","getDevice","setDevice","setPoseTarget","userHeight","getFrameData","stageParameters","sittingToStandingTransform","poseObject","orientation","leftViewMatrix","rightViewMatrix","leftProjectionMatrix","rightProjectionMatrix","getLayers","leftBounds","rightBounds","hasPosition","buttonId","updateControllers","getStandingMatrix","submitFrame","setFrameOfReferenceType","setFramebuffer","_inputSource","_controller","layersEnabled","getCameraPose","_callee","addLayer","removeLayer","_framebuffer","_currentFramebuffer","releaseMaterialProgramReference","programInfo","material2","_material","programChange","boneMatrices","warned","WebGL1Renderer","_joint","_Object3D","_currentLevel","levels","addLevel","getCurrentLevel","getObjectForDistance","normalizeSkinWeights","_offsetMatrix","_identityMatrix","Skeleton","_bone","boneInverse","getColorAt","setColorAt","setMatrixAt","computeLineDistances","_distance","_position$1","VideoTexture","CanvasTexture","DepthTexture","CircleGeometry","segment","_x2","_x3","_CylinderGeometry","PolyhedronGeometry","vertexBuffer","uvBuffer","subdivideFace","cols","pushVertex","getVertexByIndex","correctUV","azimuth","subdivide","applyRadius","azi","correctUVs","correctSeam","DodecahedronGeometry","_PolyhedronGeometry","_triangle","EdgesGeometry","thresholdAngle","thresholdDot","indexAttr","positionAttr","indexCount","indexArr","vertKeys","hashes","edgeData","jNext","vecHash0","vecHash1","reverseHash","index0","_edgeData$key","_h","_hl","_ahole","_h2","_hl2","_ahole2","_k","_bs","_h3","_hl3","_ahole3","_vert","_vert2","_vert3","_bs2","_vert4","_h4","_hl4","_ahole4","_vert5","_k2","_i9","_i10","_face","_i11","_face2","_i12","_face3","_h5","_hl5","_ahole5","_toJSON","IcosahedronGeometry","LatheGeometry","inverseSegments","n1","_base","OctahedronGeometry","ParametricGeometry","stacks","pu","pv","sliceCount","RingGeometry","innerRadius","outerRadius","thetaSegments","phiSegments","radiusStep","thetaSegmentLevel","_segment","_shapeHole","_l2","_l3","_toJSON$1","TetrahedronGeometry","TextGeometry","_ExtrudeGeometry","generateShapes","TorusGeometry","tube","TorusKnotGeometry","P1","P2","calculatePositionOnCurve","cu","su","quOverP","WireframeGeometry","edge","edges","ol","edge1","edge2","Geometries","BoxBufferGeometry","CircleBufferGeometry","DodecahedronBufferGeometry","ExtrudeBufferGeometry","IcosahedronBufferGeometry","LatheBufferGeometry","OctahedronBufferGeometry","ParametricBufferGeometry","PlaneBufferGeometry","PolyhedronBufferGeometry","RingBufferGeometry","ShapeBufferGeometry","TetrahedronBufferGeometry","TextBufferGeometry","TorusBufferGeometry","TorusKnotBufferGeometry","Materials","_startIndex","_endIndex","_startIndex2","_endIndex2","_giveUpAt","_readOffset","_writeOffset","CreateClipsFromMorphTargetSequences","parseAnimation","_m","setResourcePath","AnimationLoader","CompressedTextureLoader","DataTextureLoader","setMimeType","texDatas","mipmapCount","isCubemap","texData","updateArcLengths","_theta","closePath","ellipse","projScreenMatrix","lookTarget","lightPositionWorld","getAt","getIrradianceAt","addScaledSH","getBasisAt","MaterialLoader","getTexture","setTextures","decodeText","BufferGeometryLoader","interleavedBufferMap","arrayBufferMap","getInterleavedBuffer","arrayBuffer","getArrayBuffer","typedArray","bufferAttribute","_typedArray","_bufferAttribute","ObjectLoader","_Loader","parseAnimations","parseShapes","parseGeometries","parseImages","parseTextures","parseMaterials","parseObject","parseSkeletons","bindSkeletons","hasImages","bufferGeometryLoader","details","_shape","LegacyJSONLoader","deserializeImage","loadImage","deserializedImage","_deserializedImage","parseConstant","TEXTURE_MAPPING","TEXTURE_WRAPPING","TEXTURE_FILTER","getGeometry","getMaterial","objectAnimations","setTexturePath","UVMapping","CubeReflectionMapping","CubeRefractionMapping","EquirectangularReflectionMapping","EquirectangularRefractionMapping","CubeUVReflectionMapping","CubeUVRefractionMapping","RepeatWrapping","ClampToEdgeWrapping","MirroredRepeatWrapping","NearestFilter","NearestMipmapNearestFilter","NearestMipmapLinearFilter","LinearMipmapNearestFilter","LinearMipmapLinearFilter","ImageBitmapLoader","_tmpPath","_tmpShape","_sIdx","_sLen","FontLoader","HemisphereLightProbe","AmbientLightProbe","_eyeRight","_eyeLeft","StereoCamera","eyeSep","xmin","xmax","eyeSepHalf","eyeSepOnProjection","ymax","_scale$1","_orientation","AudioListener","destination","timeDelta","_clock","removeFilter","getFilter","setFilter","getMasterVolume","setMasterVolume","positionX","linearRampToValueAtTime","positionY","positionZ","forwardX","forwardY","forwardZ","upX","upY","upZ","setOrientation","setNodeSource","setMediaElementSource","setMediaStreamSource","getDetune","getPlaybackRate","getLoop","setLoop","setLoopStart","setLoopEnd","getVolume","setVolume","_orientation$1","PositionalAudio","_Audio","panner","createPanner","panningModel","getRefDistance","refDistance","setRefDistance","getRolloffFactor","rolloffFactor","setRolloffFactor","getDistanceModel","distanceModel","setDistanceModel","getMaxDistance","setMaxDistance","setDirectionalCone","coneInnerAngle","coneOuterAngle","coneOuterGain","orientationX","orientationY","orientationZ","AudioAnalyser","getAverageFrequency","AnimationObjectGroup","sanitizeNodeName","uncache","_lastIndex","_lastObject","_m2","_bindingsForPath","unsubscribe_","isRunning","startAt","setEffectiveWeight","getEffectiveWeight","crossFadeTo","setEffectiveTimeScale","getEffectiveTimeScale","syncWith","halt","getMixer","getClip","AnimationMixer","clipAction","stopAllAction","uncacheClip","uncacheRoot","uncacheAction","InstancedInterleavedBuffer","GLBufferAttribute","PointCloud","_intersectObject","setType","setItemSize","setCount","Cylindrical","Line3","distanceSq","ImmediateRenderObject","SpotLightHelper","cone","coneLength","coneWidth","SkeletonHelper","_LineSegments","PointLightHelper","_Mesh","sphereSize","_color1","_color2","HemisphereLightHelper","GridHelper","PolarGridHelper","radials","circles","_color","_v","DirectionalLightHelper","lightPlane","targetLine","CameraHelper","pointMap","colorFrustum","colorCone","colorUp","colorTarget","colorCross","addLine","addPoint","setPoint","_lineGeometry","_coneGeometry","_ENCODINGS","BoxHelper","Box3Helper","PlaneHelper","_Line","_axis","ArrowHelper","headLength","headWidth","setDirection","setColor","AxesHelper","_int32View","DataUtils","toHalfFloat","SIZE_MAX","ENCODINGS","backgroundBox","_flatCamera","_createPlanes2","_clearColor","_oldTarget","PHI","INV_PHI","_axisDirections","convertLinearToRGBE","maxComponent","fExp","PMREMGenerator","_pingPongRenderTarget","_blurMaterial","weights","poleAxis","_getBlurShader","_equirectShader","_cubemapShader","_compileMaterial","fromScene","cubeUVRenderTarget","_allocateTargets","_sceneToCubeUV","_blur","_applyPMREM","_cleanup","fromEquirectangular","equirectangular","_fromTexture","fromCubemap","compileCubemapShader","_getCubemapShader","compileEquirectangularShader","_getEquirectShader","outputTarget","_setViewport","_textureToCubeUV","_isLDR","_createRenderTarget","tmpMesh","cubeCamera","upSign","forwardSign","originalAutoClear","useSolidColor","lodIn","lodOut","pingPongRenderTarget","_halfBlur","targetIn","targetOut","sigmaRadians","blurMaterial","blurMesh","blurUniforms","radiansPerPixel","sigmaPixels","outputSize","ClosedSplineCurve3","SplineCurve3","Spline","initFromArray","getControlPointsArray","reparametrizeByArcLength","random16","nearestPowerOfTwo","nextPowerOfTwo","maxInstancedCount","linePrecision","metal","transparency","GeometryUtils","geometry1","materialIndexOffset","SceneUtils","createMultiMaterialObject","ACESFilmicToneMapping","AddEquation","AddOperation","AdditiveAnimationBlendMode","AdditiveBlending","AlphaFormat","AlwaysDepth","AlwaysStencilFunc","AxisHelper","BasicDepthPacking","BasicShadowMap","BinaryTextureLoader","BoundingBoxHelper","ByteType","CanvasRenderer","CineonToneMapping","CullFaceBack","CullFaceFront","CullFaceFrontBack","CullFaceNone","CustomBlending","CustomToneMapping","DecrementStencilOp","DecrementWrapStencilOp","DepthFormat","DepthStencilFormat","DoubleSide","DstAlphaFactor","DstColorFactor","DynamicBufferAttribute","DynamicCopyUsage","DynamicDrawUsage","DynamicReadUsage","EdgesHelper","EqualDepth","EqualStencilFunc","Face4","FaceColors","FlatShading","Float32Attribute","Float64Attribute","FloatType","FrontSide","GLSL1","GLSL3","GammaEncoding","GreaterDepth","GreaterEqualDepth","GreaterEqualStencilFunc","GreaterStencilFunc","HalfFloatType","IncrementStencilOp","IncrementWrapStencilOp","Int16Attribute","Int32Attribute","Int8Attribute","IntType","InterpolateDiscrete","InterpolateLinear","InterpolateSmooth","InvertStencilOp","JSONLoader","KeepStencilOp","LensFlare","LessDepth","LessEqualDepth","LessEqualStencilFunc","LessStencilFunc","LinePieces","LineStrip","LinearEncoding","LinearMipMapLinearFilter","LinearMipMapNearestFilter","LinearToneMapping","LogLuvEncoding","LoopOnce","LoopPingPong","LoopRepeat","LuminanceAlphaFormat","LuminanceFormat","MaxEquation","MeshFaceMaterial","MinEquation","MixOperation","MultiMaterial","isMultiMaterial","MultiplyBlending","MultiplyOperation","NearestMipMapLinearFilter","NearestMipMapNearestFilter","NeverDepth","NeverStencilFunc","NoBlending","NoColors","NoToneMapping","NormalAnimationBlendMode","NormalBlending","NotEqualDepth","NotEqualStencilFunc","ObjectSpaceNormalMap","OneFactor","OneMinusDstAlphaFactor","OneMinusDstColorFactor","OneMinusSrcAlphaFactor","OneMinusSrcColorFactor","PCFShadowMap","PCFSoftShadowMap","Particle","ParticleBasicMaterial","ParticleSystem","ParticleSystemMaterial","PointCloudMaterial","REVISION","RGBADepthPacking","RGBAIntegerFormat","RGBA_ASTC_10x10_Format","RGBA_ASTC_10x5_Format","RGBA_ASTC_10x6_Format","RGBA_ASTC_10x8_Format","RGBA_ASTC_12x10_Format","RGBA_ASTC_12x12_Format","RGBA_ASTC_4x4_Format","RGBA_ASTC_5x4_Format","RGBA_ASTC_5x5_Format","RGBA_ASTC_6x5_Format","RGBA_ASTC_6x6_Format","RGBA_ASTC_8x5_Format","RGBA_ASTC_8x6_Format","RGBA_ASTC_8x8_Format","RGBA_BPTC_Format","RGBA_ETC2_EAC_Format","RGBA_PVRTC_2BPPV1_Format","RGBA_PVRTC_4BPPV1_Format","RGBA_S3TC_DXT1_Format","RGBA_S3TC_DXT3_Format","RGBA_S3TC_DXT5_Format","RGBDEncoding","RGBEEncoding","RGBEFormat","RGBFormat","RGBIntegerFormat","RGBM16Encoding","RGBM7Encoding","RGB_ETC1_Format","RGB_ETC2_Format","RGB_PVRTC_2BPPV1_Format","RGB_PVRTC_4BPPV1_Format","RGB_S3TC_DXT1_Format","RGFormat","RGIntegerFormat","RedFormat","RedIntegerFormat","ReinhardToneMapping","ReplaceStencilOp","ReverseSubtractEquation","SRGB8_ALPHA8_ASTC_10x10_Format","SRGB8_ALPHA8_ASTC_10x5_Format","SRGB8_ALPHA8_ASTC_10x6_Format","SRGB8_ALPHA8_ASTC_10x8_Format","SRGB8_ALPHA8_ASTC_12x10_Format","SRGB8_ALPHA8_ASTC_12x12_Format","SRGB8_ALPHA8_ASTC_4x4_Format","SRGB8_ALPHA8_ASTC_5x4_Format","SRGB8_ALPHA8_ASTC_5x5_Format","SRGB8_ALPHA8_ASTC_6x5_Format","SRGB8_ALPHA8_ASTC_6x6_Format","SRGB8_ALPHA8_ASTC_8x5_Format","SRGB8_ALPHA8_ASTC_8x6_Format","SRGB8_ALPHA8_ASTC_8x8_Format","ShortType","SmoothShading","SrcAlphaFactor","SrcAlphaSaturateFactor","SrcColorFactor","StaticCopyUsage","StaticDrawUsage","StaticReadUsage","StreamCopyUsage","StreamDrawUsage","StreamReadUsage","SubtractEquation","SubtractiveBlending","TangentSpaceNormalMap","TriangleFanDrawMode","TriangleStripDrawMode","TrianglesDrawMode","Uint16Attribute","Uint32Attribute","Uint8Attribute","Uint8ClampedAttribute","UnsignedByteType","UnsignedInt248Type","UnsignedIntType","UnsignedShort4444Type","UnsignedShort5551Type","UnsignedShort565Type","UnsignedShortType","VSMShadowMap","Vertex","VertexColors","WebGLRenderTargetCube","WireframeHelper","WrapAroundEnding","XHRLoader","ZeroCurvatureEnding","ZeroFactor","ZeroSlopeEnding","ZeroStencilOp","sRGBEncoding","58","DRACOLoader","decoderPath","decoderConfig","decoderBinary","decoderPending","workerLimit","workerPool","workerNextTaskID","workerSourceURL","defaultAttributeIDs","defaultAttributeTypes","setDecoderPath","setDecoderConfig","setWorkerLimit","setVerbosity","setSkipDequantization","taskConfig","attributeIDs","attributeTypes","useUniqueIDs","decodeGeometry","decodeDracoFile","worker","taskKey","taskCache","cachedTask","taskID","taskCost","geometryPending","_getWorker","_worker","_callbacks","_createGeometry","_releaseTask","geometryData","_loadLibrary","preload","_initDecoder","useJS","WebAssembly","librariesPending","libraries","jsContent","wasmBinary","DRACOWorker","createObjectURL","_taskCosts","_taskLoad","terminate","decodeAttribute","draco","decoder","dracoGeometry","attributeType","numComponents","num_components","numValues","num_points","dataType","DT_FLOAT32","DT_INT8","DT_INT16","DT_INT32","DT_UINT8","DT_UINT16","DT_UINT32","getDracoDataType","ptr","_malloc","GetAttributeDataArrayForAllPoints","HEAPF32","_free","onModuleLoaded","DracoDecoderModule","Decoder","decoderBuffer","DecoderBuffer","Init","decodingStatus","geometryType","GetEncodedGeometryType","TRIANGULAR_MESH","DecodeBufferToMesh","POINT_CLOUD","DecodeBufferToPointCloud","error_msg","attributeID","GetAttributeByUniqueId","GetAttributeId","GetAttribute","num_faces","GetTrianglesUInt32Array","decodeIndex","releaseDecoderModule","getDecoderModule","59","GLTFLoader","dracoLoader","ddsLoader","ktx2Loader","meshoptDecoder","pluginCallbacks","GLTFMaterialsClearcoatExtension","GLTFTextureBasisUExtension","GLTFTextureWebPExtension","GLTFMaterialsTransmissionExtension","GLTFLightsExtension","GLTFMeshoptCompression","GLTFRegistry","_onError","gltf","setDRACOLoader","setDDSLoader","setKTX2Loader","setMeshoptDecoder","BINARY_EXTENSION_HEADER_MAGIC","EXTENSIONS","KHR_BINARY_GLTF","GLTFBinaryExtension","GLTFParser","fileLoader","plugin","extensionsUsed","extensionName","extensionsRequired","KHR_MATERIALS_UNLIT","GLTFMaterialsUnlitExtension","KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS","GLTFMaterialsPbrSpecularGlossinessExtension","KHR_DRACO_MESH_COMPRESSION","GLTFDracoMeshCompressionExtension","MSFT_TEXTURE_DDS","GLTFTextureDDSExtension","KHR_TEXTURE_TRANSFORM","GLTFTextureTransformExtension","KHR_MESH_QUANTIZATION","GLTFMeshQuantizationExtension","setExtensions","setPlugins","KHR_LIGHTS_PUNCTUAL","KHR_MATERIALS_CLEARCOAT","KHR_MATERIALS_TRANSMISSION","KHR_TEXTURE_BASISU","EXT_TEXTURE_WEBP","EXT_MESHOPT_COMPRESSION","uses","_markDefs","nodeDefs","nodeIndex","nodeLength","nodeDef","_addNodeRef","_loadLight","lightIndex","dependency","lightNode","lightDef","innerConeAngle","outerConeAngle","createUniqueName","createNodeAttachment","_getNodeRef","getMaterialType","extendParams","materialParams","materialDef","metallicRoughness","pbrMetallicRoughness","baseColorFactor","baseColorTexture","assignTexture","extendMaterialParams","clearcoatFactor","clearcoatTexture","clearcoatRoughnessFactor","clearcoatRoughnessTexture","clearcoatNormalTexture","transmissionFactor","transmissionTexture","textureIndex","textureDef","loadTextureImage","textureLoader","detectSupport","loadBufferView","bufferView","bufferViews","extensionDef","getDependency","ready","byteStride","decodeGltfBuffer","BINARY_EXTENSION_CHUNK_TYPES","headerView","magic","getUint32","chunkContentsLength","chunkView","chunkIndex","chunkLength","chunkType","contentArray","GLTFMeshStandardSGMaterial","isGLTFSpecularGlossinessMaterial","specularMapParsFragmentChunk","glossinessMapParsFragmentChunk","specularMapFragmentChunk","glossinessMapFragmentChunk","lightPhysicalFragmentChunk","glossiness","glossinessMap","_extraUniforms","uniformName","USE_SPECULARMAP","USE_GLOSSINESSMAP","USE_UV","specularGlossinessParams","pbrSpecularGlossiness","diffuseFactor","diffuseTexture","glossinessFactor","specularFactor","specularGlossinessTexture","specGlossMapDef","createMaterial","GLTFCubicSplineInterpolant","decodePrimitive","primitive","bufferViewIndex","gltfAttributeMap","threeAttributeMap","attributeNormalizedMap","attributeTypeMap","threeAttributeName","ATTRIBUTES","accessorDef","accessors","componentType","WEBGL_COMPONENT_TYPES","extendTexture","texCoord","stride2","stride3","WEBGL_CONSTANTS","5120","5121","5122","5123","5125","5126","WEBGL_FILTERS","9728","9729","9984","9985","9986","9987","WEBGL_WRAPPINGS","33071","33648","10497","WEBGL_TYPE_SIZES","POSITION","NORMAL","TANGENT","TEXCOORD_0","TEXCOORD_1","COLOR_0","WEIGHTS_0","JOINTS_0","PATH_PROPERTIES","INTERPOLATION","CUBICSPLINE","LINEAR","STEP","ALPHA_MODES","addUnknownExtensionsToUserData","knownExtensions","objectDef","gltfExtensions","assignExtrasToUserData","gltfDef","meshDef","targetNames","createPrimitiveKey","primitiveDef","dracoExtension","createAttributesKey","attributesKey","associations","primitiveCache","meshCache","cameraCache","lightCache","nodeNamesUsed","addPrimitiveAttributes","assignAttributeAccessor","accessorIndex","accessor","gltfAttributeName","maxDisplacement","computeBounds","hasMorphPosition","hasMorphNormal","pendingPositionAccessors","pendingNormalAccessors","pendingAccessor","morphPositions","addMorphTargets","toTrianglesDrawMode","numberOfTriangles","newIndices","newGeometry","_invokeAll","getDependencies","scenes","skinDefs","skins","meshDefs","meshes","skinLength","skin","_invokeOne","loadScene","loadNode","loadMesh","loadAccessor","loadBuffer","loadMaterial","loadSkin","loadAnimation","loadCamera","defs","bufferIndex","bufferDef","bufferViewDef","pendingBufferViews","elementBytes","itemBytes","ibSlice","ibCacheKey","itemSizeIndices","SCALAR","TypedArrayIndices","byteOffsetIndices","byteOffsetValues","sparseIndices","sparseValues","textureExtensions","webkitURL","sourceURI","isObjectURL","colorType","getUint8","revokeObjectURL","sampler","samplers","mapName","mapDef","gltfReference","assignFinalMaterial","useVertexTangents","useVertexColors","useFlatShading","useMorphTargets","useMorphNormals","pointsMaterial","lineMaterial","materialExtensions","sgExtension","kmuExtension","metallicFactor","roughnessFactor","metallicRoughnessTexture","alphaMode","alphaCutoff","normalTexture","occlusionTexture","emissiveFactor","emissiveTexture","originalName","sanitizedName","loadGeometries","primitives","createDracoPrimitive","geometryPromise","meshIndex","cameraIndex","cameraDef","yfov","znear","zfar","xmag","ymag","skinDef","skinEntry","inverseBindMatrices","animationIndex","animationDef","pendingNodes","pendingInputAccessors","pendingOutputAccessors","pendingSamplers","pendingTargets","inputAccessors","outputAccessors","inputAccessor","outputAccessor","targetName","outputArray","scaled","buildNodeHierachy","parentObject","pendingJoints","jointNodes","jointNode","sceneIndex","sceneDef","nodeIds","60","MTLLoader","setMaterialOptions","materialOptions","delimiter_pattern","materialsInfo","ss","materialCreator","MaterialCreator","setManager","setMaterials","baseUrl","materialsArray","nameLookup","converted","mn","covmat","lprop","normalizeRGB","ignoreZeroRGBs","materialName","getAsArray","createMaterial_","setMapForType","texParams","getTextureParams","invertTrProperty","matParams","61","OBJLoader","object_pattern","material_library_pattern","material_use_pattern","map_use_pattern","ParserState","materialLibraries","startObject","fromDeclaration","previousMaterial","currentMaterial","_finalize","hasUVIndices","startMaterial","mtllib","groupEnd","cloned","lastMultiMaterial","declared","finalize","parseVertexIndex","parseNormalIndex","parseUVIndex","addVertexPoint","addVertexLine","addNormal","addFaceNormal","addColor","addDefaultUV","addUVLine","addFace","vLen","nLen","uvLen","addPointGeometry","addLineGeometry","uvi","lineFirstChar","vertexData","faceVertices","vertexParts","lineParts","lineVertices","lineUVs","llen","pointData","hasVertexColors","createdMaterials","miLen","materialHash","sourceMaterial","materialPoints","materialLine","62","BufferGeometryUtils","mergeBufferGeometries","useGroups","isIndexed","attributesUsed","morphAttributesUsed","mergedGeometry","attributesCount","mergedUserData","mergedIndex","mergedAttribute","mergeBufferAttributes","morphAttributesToMerge","mergedMorphAttribute","arrayLength","interleaveAttributes","getters","setters","iba","estimateBytesUsed","mem","mergeVertices","tolerance","hashToIndex","vertexCount","attributeNames","attrArrays","morphAttrsArrays","morphAttr","decimalShift","log10","shiftMultiplier","newarray","newMorphArrays","getterFunc","oldAttribute","oldMorphAttribute","computeMorphedAttributes","_calculateMorphedAttributeData","modifiedAttributeArray","morphNormal","modifiedPosition","modifiedNormal","morphedPositionAttribute","morphedNormalAttribute","63","createLayout","inherits","createIndices","Base","texWidth","texHeight","bitmap","visibleGlyphs","multipage","computeSphere","computeBox","64","65","bw","u0","u1","66","updateAttribute","newAttrib","isR69","67","clearImmediate","immediateIds","nextImmediateId","Timeout","clearFn","_clearFn","close","unref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","_onTimeout","68","WebVRPolyfill","commonjsGlobal","isMobile","cardboardVrDisplay","createCommonjsModule","createClass","slicedToArray","platform","isWebViewAndroid","isFirefoxAndroid","getChromeVersion","isSafariWithoutDeviceMotion","isChromeWithoutDeviceMotion","_match$1$split","_match$1$split2","branch","build","isR7","isLandscapeMode","rtn","getScreenWidth","getScreenHeight","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","vertexSource","fragmentSource","attribLocationMap","VERTEX_SHADER","FRAGMENT_SHADER","attribName","getProgramUniforms","uniformCount","ACTIVE_UNIFORMS","opera","safariCssSizeWorkaround","frameDataFromPose","piOver180","rad45","defaultOrientation","defaultPosition","updateEyeMatrices","projection","vrDisplay","upTan","upDegrees","downTan","downDegrees","leftTan","leftDegrees","rightTan","rightDegrees","xScale","yScale","mat4_perspectiveFromFieldOfView","mat4_fromRotationTranslation","a00","a02","a03","a10","a20","mat4_translate","a30","b00","b01","b02","b03","b04","b05","b06","b07","b08","b09","b10","mat4_invert","_getFieldOfView","_getEyeOffset","getOriginFromUrl","domainIdx","protoSepIdx","domainEndIdx","warnOnce","observedWarnings","deprecateWarning","suggested","glPreserveState","boundValues","TEXTURE_BINDING_2D","TEXTURE_BINDING_CUBE_MAP","TEXTURE0","TEXTURE31","ACTIVE_TEXTURE","boundValue","ARRAY_BUFFER_BINDING","ARRAY_BUFFER","COLOR_CLEAR_VALUE","COLOR_WRITEMASK","CURRENT_PROGRAM","ELEMENT_ARRAY_BUFFER_BINDING","ELEMENT_ARRAY_BUFFER","FRAMEBUFFER_BINDING","FRAMEBUFFER","RENDERBUFFER_BINDING","RENDERBUFFER","TEXTURE_2D","TEXTURE_CUBE_MAP","VIEWPORT","BLEND","CULL_FACE","DEPTH_TEST","SCISSOR_TEST","STENCIL_TEST","distortionVS","distortionFS","CardboardDistorter","cardboardUI","bufferScale","dirtySubmitFrameBindings","ctxAttribs","instanceExt","meshWidth","meshHeight","bufferWidth","drawingBufferWidth","bufferHeight","drawingBufferHeight","realBindFramebuffer","realEnable","realDisable","realColorMask","realClearColor","realViewport","realCanvasWidth","realCanvasHeight","isPatched","lastBoundFramebuffer","blend","viewportOffsetScale","setTextureBounds","indexBuffer","depthStencilBuffer","onResize","unpatch","glState","COLOR_BUFFER_BIT","RGBA","RGB","UNSIGNED_BYTE","TEXTURE_MAG_FILTER","TEXTURE_MIN_FILTER","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","COLOR_ATTACHMENT0","DEPTH_STENCIL","DEPTH_STENCIL_ATTACHMENT","DEPTH_COMPONENT16","DEPTH_ATTACHMENT","STENCIL_INDEX8","STENCIL_ATTACHMENT","FRAMEBUFFER_COMPLETE","pname","positionDivisor","texCoordDivisor","getVertexAttrib","VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE","FLOAT","vertexAttribDivisorANGLE","TRIANGLES","UNSIGNED_SHORT","renderNoState","updateDeviceInfo","deviceInfo","computeMeshVertices_","STATIC_DRAW","computeMeshIndices_","lensFrustum","getLeftEyeVisibleTanAngles","noLensFrustum","getLeftEyeNoLensTanAngles","getLeftEyeVisibleScreenRect","vidx","distortion","distortInverse","halfwidth","halfheight","iidx","getOwnPropertyDescriptor_","uiVS","uiFS","CardboardUI","gearOffset","gearVertexCount","arrowOffset","arrowVertexCount","projMat","Distortion","optionsCallback","backCallback","midline","kButtonWidthDp","physicalPixels","dps","buttonSize","buttonScale","buttonBorder","addGearSegment","segmentTheta","addArrowVertex","angledLineWidth","lr","bt","orthoMatrix","projectionMat","TRIANGLE_STRIP","dr0","distort","dr1","r2","invScalar","Device","widthMeters","heightMeters","bevelMeters","setFromEulerXYZ","setFromEulerYXZ","DEFAULT_ANDROID","DEFAULT_IOS","Viewers","CardboardV1","CardboardViewer","interLensDistance","baselineLensDistance","screenLensDistance","distortionCoefficients","inverseCoefficients","CardboardV2","deviceParams","additionalViewers","viewer","updateDeviceParams","determineDevice_","setViewer","metersPerPixelX","xdpi","metersPerPixelY","ydpi","bevelMm","getDistortedFieldOfViewLeftEye","eyeToScreenDistance","outerDist","innerDist","bottomDist","topDist","outerAngle","innerAngle","bottomAngle","topAngle","fovLeft","fovTop","fovRight","fovBottom","verticalLensOffset","centerX","centerY","centerZ","screenLeft","screenTop","screenRight","screenBottom","undistortedFrustum","dist","eyeX","eyeY","getFieldOfViewLeftEye","opt_isUndistorted","getUndistortedFieldOfViewLeftEye","getFieldOfViewRightEye","getUndistortedParams_","getUndistortedViewportLeftEye","screenWidth","screenHeight","xPxPerTanAngle","yPxPerTanAngle","eyePosX","eyePosY","halfLensDistance","maxFov","viewerMax","DPDB_CACHE","last_updated","devices","Dpdb","onDeviceParamsUpdated","dpdb","recalculateDeviceParams_","DeviceParams","SensorSample","sample","timestampS","ComplementaryFilter","kFilter","isDebug","currentAccelMeasurement","currentGyroMeasurement","previousGyroMeasurement","filterQ","previousFilterQ","accelQ","isOrientationInitialized","estimatedGravity","measuredGravity","gyroIntegralQ","PosePredictor","predictionTimeS","previousQ","previousTimestampS","deltaQ","outQ","FusionPoseSensor","predictionTime","yawOnly","accelerometer","gyroscope","posePredictor","chromeVersion","isDeviceMotionInRadians","isWithoutDeviceMotion","filterToWorldQ","inverseWorldToScreenQ","worldToScreenQ","originalPoseAdjustQ","setScreenTransform_","resetQ","orientationOut_","getDeviceParams","newDeviceParams","calcDeviceParams_","matched","ruleMatches_","dpi","resX","resY","sensorSample","addAccelMeasurement","addGyroMeasurement","timestampDeltaS","deltaT","run_","accelToQuaternion_","gyroDeltaQ","gyroToQuaternionDelta_","invFilterQ","targetQ","getOrientation","accel","normAccel","gyro","getPrediction","currentQ","angularSpeed","predictAngle","_deviceOrientationQ","deviceOrientationFixQ","deviceOrientationFilterToWorldQ","filterOrientation","resetPose","onDeviceOrientation_","beta","onDeviceMotion_","deviceMotion","updateDeviceMotion_","accGravity","accelerationIncludingGravity","rotRate","rotationRate","deltaS","onOrientationChange_","screenOrientation","onMessage_","deviceMotionEvent","onDeviceMotionCallback_","onOrientationChangeCallback_","onMessageCallback_","onDeviceOrientationCallback_","isFramed","refOrigin","referrer","thisOrigin","isInsideCrossOriginIFrame","X_AXIS","Z_AXIS","SENSOR_TO_VR","PoseSensor","classCallCheck","sensor","fusionSensor","_out","_sensorQ","_outQ","_onSensorRead","_onSensorError","RelativeOrientationSensor","frequency","useDeviceMotion","K_FILTER","PREDICTION_TIME_S","YAW_ONLY","DEBUG","RotateInstructions","loadIcon_","overlay","marginTop","snackbar","snackbarText","snackbarButton","borderLeft","hide","ViewerSelector","defaultViewer","selectedKey","dialog","createDialog_","onChangeCallbacks_","show","parentElement","showTemporarily","disableShowTemporarily","getCurrentViewer","getSelectedKey_","fireOnChange_","onSave_","createH1_","createChoice_","createButton_","h1","marginBottom","div","NoSleep$1","createCommonjsModule$$1","commonjsGlobal$$1","modules","installedModules","__webpack_require__","moduleId","mediaFile","oldIOS","MSStream","NoSleep","noSleepTimer","noSleepVideo","nextDisplayId","defaultLeftBounds","defaultRightBounds","caf","VRDisplayCapabilities","hasExternalDisplay","canPresent","maxLayers","hasOrientation","VRDisplay","USE_WAKELOCK","wakelock","isPolyfilled","displayId","waitingForPresent_","layer_","originalParent_","fullscreenElement_","fullscreenWrapper_","fullscreenElementCachedStyle_","fullscreenEventTarget_","fullscreenChangeHandler_","fullscreenErrorHandler_","wakelock_","_getPose","_resetPose","getImmediatePose","wrapForFullscreen","cssProperties","applyFullscreenElementStyle","removeFullscreenWrapper","requestPresent","wasPresenting","incomingLayer","updatePresent_","predistorted","fullscreenElement","addFullscreenListeners_","actualFullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","beginPresent_","unlock","disableWakeLock","endPresent_","removeFullscreenListeners_","fireVRDisplayPresentChange_","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","enableWakeLock","exitPresent","fireVRDisplayConnect_","changeHandler","fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","whichEye","ADDITIONAL_VIEWERS","DEFAULT_VIEWER","MOBILE_WAKE_LOCK","DPDB_URL","CARDBOARD_UI_DISABLED","ROTATE_INSTRUCTIONS_DISABLED","BUFFER_SCALE","DIRTY_SUBMIT_FRAME_BINDINGS","Eye","CardboardVRDisplay","config$$1","bufferScale_","poseSensor_","distorter_","cardboardUI_","dpdb_","onDeviceParamsUpdated_","deviceInfo_","viewerSelector_","onViewerChanged_","rotateInstructions_","onResize_","linearAcceleration","angularAcceleration","fieldOfView","eyeParams","newParams","updateBounds_","orientationHandler","vrdisplaypresentchangeHandler","fireVRDisplayDeviceParamsChange_","lastWidth","lastHeight","vrdisplay","DefaultConfig","PROVIDE_MOBILE_VRDISPLAY","polyfillDisplays","hasNative","native","getVRDisplays","displays","getPolyfillDisplays","_polyfillDisplaysPopulated","NativeVRFrameData","nativeFrameData","nativeGetFrameData","nativeDisplays","webvrPolyfill","require$$0","69","newline","whitespace","idxOf","chr","isWhitespace","monospace","lineStart","isNewline","pre","testWidth","newLine","lineEnd","nextStart","greedy","70","initParams","createXHR","_createXHR","called","responseXML","firefoxBugTakenEffect","getXml","isJson","errorFunc","timeoutTimer","failureResponse","loadFunc","aborted","useXDR","rawRequest","cors","XDomainRequest","onprogress","beforeSend","71","ActiveXObject","xmlDoc","loadXML","72","73","74","colorHelperFrom","colorHelperTo","getComponentProperty","entity","setComponentProperty","toRadians","addEventListeners","eventNames","removeEventListeners","getRawProperty","splitDot","setRawProperty","targetValue","isRawProperty","dur","elasticity","startEvents","pauseEvents","resumeEvents","eventDetail","animationIsPlaying","onStartEvent","beginAnimation","fromColor","toColor","updateConfigForDefault","updateConfigForRawColor","createAndStartAnimation","pausedWasPlaying","updateConfig","stopRelatedAnimations","waitComponentInitRawProperty","setColorConfig","lastValue","aframeProperty","updateConfigForVector","getPropertyType","75","spectator","updateActiveCamera","updateSpectatorCamera","system","activeCameraEl","setActiveCamera","disableActiveCamera","spectatorCameraEl","setSpectatorCamera","disableSpectatorCamera","76","EVENTS","STATES","CANVAS_EVENTS","DOWN","WEBXR_EVENTS","downEvents","fuse","fuseTimeout","mouseCursorStylesEnabled","upEvents","rayOrigin","cursorDownEl","intersectedEl","canvasBounds","isCursorDown","updateCanvasBounds","intersectedEventDetail","cursorEl","onCursorDown","onCursorUp","onIntersection","onIntersectionCleared","onEnterVR","updateMouseEventListeners","removeState","addCanvasListeners","downEvent","upEvent","rayCasterConfig","checkIntersections","twoWayEmit","currentIntersection","els","intersections","clearCurrentIntersection","setIntersection","clearedEls","xrSession","addState","ignoreRemaining","evtName","77","trackedControlsUtils","checkControllerPresentAndSetup","emitIfAxesChanged","onButtonEvent","isWebXRAvailable","GAMEPAD_ID_PREFIX","INPUT_MAPPING","touchpad","trackpad","buttonColor","buttonTouchedColor","buttonHighlightColor","orientationOffset","armModel","bindMethods","onModelLoaded","onControllersUpdate","checkIfControllerPresent","removeControllersUpdateListener","onAxisMoved","onButtonChanged","onButtonDown","onButtonUp","onButtonTouchStart","onButtonTouchEnd","controllerPresent","lastControllerCheck","controllerEventsActive","addControllersUpdateListener","injectTrackedControls","idPrefix","DAYDREAM_CONTROLLER_MODEL_BASE_URL","mtl","buttonMeshes","controllerObject3D","menu","updateModel","buttonName","updateButtonModel","78","GEARVR_CONTROLLER_MODEL_BASE_URL","trigger","79","defaultModel","defaultModelColor","thumbstick","wasControllerConnected","rendererSystem","systems","iterateControllerProfiles","initDefaultModel","modelEl","80","geometryNames","dummyGeometry","schemaChange","skipCache","previousData","unuseGeometry","getOrCreateGeometry","getObject3D","updateSchema","currentGeometryType","newGeometryType","extendSchema","81","getDRACOLoader","gltfModel","82","MODEL_URLS","toonLeft","toonRight","lowPolyLeft","lowPolyRight","highPolyLeft","highPolyRight","ANIMATIONS","getGestureEventName","handModelStyle","pressedButtons","touchedButtons","onGripDown","handleButton","onGripUp","onTrackpadDown","onTrackpadUp","onTrackpadTouchStart","onTrackpadTouchEnd","onTriggerDown","onTriggerUp","onTriggerTouchStart","onTriggerTouchEnd","onGripTouchStart","onGripTouchEnd","onThumbstickDown","onThumbstickUp","onAorXTouchStart","onAorXTouchEnd","onBorYTouchStart","onBorYTouchEnd","onSurfaceTouchStart","onSurfaceTouchEnd","onControllerConnected","onControllerDisconnected","previousHand","controlConfiguration","handColor","handmodelUrl","handModelOrientation","lastGesture","isPressed","isTouched","determineGesture","animateGesture","emitGestureEvents","isGripActive","isSurfaceActive","surface","isTrackpadActive","isTriggerActive","isABXYActive","AorX","BorY","trackedControls","profiles","isViveController","playAnimation","fromAction","toAction","83","BONE_PREFIX","JOINTS","BONE_MAPPING","modelStyle","modelColor","jointEls","webXROptionalAttributes","optionalFeatures","isPinched","pinchEventDetail","indexTipPosition","updateReferenceSpace","webxr","sessionReferenceSpaceType","getOffsetReferenceSpace","XRRigidTransform","warnIfFeatureNotRequested","handTracking","trackedControlsWebXR","updateHandModel","detectGesture","updateHandDotsModel","updateHandMeshModel","getBone","jointTransform","jointEl","detectPinch","thumbTipPosition","indexTipPose","thumbTipPose","handTrackingEnabled","initDotsModel","initMeshHandModel","modelURL","skinnedMesh","84","85","controlsConfiguration","createRay","controllerConfig","raycasterConfig","showLine","modelReady","86","rotateCubemap","frameBuffer","requiredFeatures","onExitVR","onRequestedReferenceSpace","updateSrc","loadCubeMapImages","loadQuadImage","glayer","xrGLFactory","visibilityChanged","pendingCubeMapUpdate","loadingScreen","getSubImage","loadCubeMapImage","textureIsVideo","updateQuadPanel","preGenerateCubeMapTextures","generateCubeMapTextures","faceOffset","imgTmp0","imgTmp2","cubeFaceSize","textureSourceCubeFaceSize","cubefaceTextures","tempCanvas","tempCanvasContext","layerColorTexture","UNPACK_FLIP_Y_WEBGL","loadingScreenImages","errorCode","TEXTURE_CUBE_MAP_POSITIVE_X","initLayer","updateTransform","draw","onvisibilitychange","initCubeMapLayer","initQuadLayer","createQuadLayer","viewPixelHeight","viewPixelWidth","glSizeLimit","MAX_CUBE_MAP_TEXTURE_SIZE","createCubeLayer","isStatic","initLoadingScreenImages","fillRect","fillText","destroyLayer","toggleCompositorLayer","enableCompositorLayer","layerEnabled","quadPanelEl","previousFrameBuffer","subImage","textureEl","xrReadFramebuffer","x1offset","y1offset","x2offset","y2offset","READ_FRAMEBUFFER","NEAREST","blitTexture","hasWebXR","87","if","defaultTarget","registerLight","diffData","setLight","updateShadow","shadowsLoaded","applyColorCorrection","hasLoaded","onSetTarget","newLight","getLight","cameraHelper","targetEl","88","isEqualVec3","geoNeedsUpdate","89","registerShader","highlightedColor","peekMode","visualAspectEnabled","previousQuaternion","quaternionClone","hiddenEls","strokeColor","initVisualAspect","updateEventListener","updatePeekMode","sphereEl","hideAll","showAll","semiSphereEl","textEl","visualAspectInitialized","pano","segmentsWidth","segmentsHeight","borderEnabled","cameraWorldPosition","elWorldPosition","cameraPortalOrientation","calculateCameraPortalOrientation","peekCameraPortalOrientation","mat4","portalNormal","portalPosition","90","PI_2","magicWindowTrackingEnabled","pointerLockEnabled","reverseMouseDrag","reverseTouchDrag","touchEnabled","mouseEnabled","deltaYaw","previousHMDPosition","hmdQuaternion","magicWindowAbsoluteEuler","magicWindowDeltaEuler","magicWindowObject","deltaRotation","savedPose","pointerLocked","setupMouseControls","previousMouseEvent","setupMagicWindowControls","magicWindowControls","DeviceOrientationControls","DeviceOrientationEvent","permissionGranted","updateGrabCursor","exitPointerLock","updateOrientation","onPointerLockChange","onPointerLockError","mouseDown","pitchObject","yawObject","canvasEl","poseMatrix","checkHeadsetConnected","updateMagicWindowOrientation","previousMagicWindowYaw","mozMovementX","mozMovementY","showGrabbingCursor","requestPointerLock","mozRequestPointerLock","hideGrabbingCursor","touchStart","touchStarted","saveCameraPose","restoreCameraPose","pointerLockElement","mozPointerLockElement","enableGrabCursor","disableGrabCursor","hasSavedPose","91","previousButtonValues","controllerIndex","analogValue","setButtonColor","92","shaders","shaderNames","disposeMaterial","unregisterMaterial","npot","updateShader","updateMaterial","currentShader","newShader","updateBehavior","tickProperties","tickTime","addBehavior","removeBehavior","shaderInstance","Shader","oldDataHasKeys","parseSide","coloring","parseVertexColors","parseBlending","defaultMaterial","registerMaterial","waitForMesh","93","objLoader","mtlLoader","applyMaterial","resetMesh","loadObj","objUrl","mtlUrl","BASE_PATH","objModel","94","95","TOUCH_CONTROLLER_MODEL_BASE_URL","OCULUS_TOUCH_WEBVR","modelUrl","modelPivotOffset","modelPivotRotation","OCULUS_TOUCH_WEBXR","CONTROLLER_PROPERTIES","buttonTouchColor","controllerType","loadModel","controllerId","displayModel","trackedControlsSystem","webVRId","originalXRotationTrigger","originalXPositionGrip","xbutton","abutton","ybutton","bbutton","96","97","OBSERVER_SELECTOR_RE","OBSERVER_CONFIG","autoRefresh","lineOpacity","useWorldCoordinates","clearedIntersectedEls","unitLineEndVec3","intersectedEls","newIntersectedEls","newIntersections","prevCheckTime","prevIntersectedEls","rawIntersections","updateOriginDirection","setDirty","updateLine","dirty","lineEndVec3","otherLineEndVec3","intersectedDetail","intersectedClearedDetail","intersectionClearedDetail","intersectionDetail","drawLine","clearAllIntersections","refreshObjects","flattenObject3DMaps","tock","lineLength","originVec3","endVec3","isEntity","object3DMap","98","99","100","COMPONENTS","101","102","constants","createAlertDialog","closeText","dialogText","onOkClicked","buttonsContainer","okButton","AFRAME_INJECTED","createDialog","buttonsContainerEl","modalContainer","dialogTextContainer","deviceMotionMessage","mobileDesktopMessage","httpsMessage","denyButtonText","allowButtonText","cancelButtonText","hostname","protocol","showHTTPAlert","isMobileDeviceRequestingDesktopSite","showMobileDesktopModeAlert","onDeviceMotionDialogAllowClicked","onDeviceMotionDialogDenyClicked","devicePermissionDialogEl","denyText","allowText","onAllowClicked","onDenyClicked","denyButton","acceptButton","createPermissionDialog","safariIpadAlertEl","httpAlertEl","103","enterVREl","removeFullScreenStyles","addFullScreenStyles","104","getFog","updateMaterials","105","pkg","INSPECTOR_RELEASE_URL","getFuzzyPatchVersion","INSPECTOR_URL","INSPECTOR_VERSION","firstPlay","onKeydown","onMessage","initOverlay","urlParam","getUrlParameter","openInspector","loadingMessageEl","LOADING_MESSAGE","showLoader","hideLoader","focusEl","script","INSPECTOR","inspectorInjected","106","shouldCaptureKeyEvent","enterVR","exitVR","onKeyup","enterVREnabled","107","mixin","initPool","availableEls","usedEls","createEntity","wrapPlay","playMethod","requestEntity","returnEntity","108","cubeMapSize","shortcutPressed","setCapture","cubeRenderTarget","isVREnabled","renderCapture","saveCapture","getCanvas","imageData","flipPixelsVertically","flippedPixels","toBlob","linkEl","click","109","RStats","AFrameStats","aframeStats","ThreeStats","threeStats","caption","below","createStats","statsEl","hideBound","showBound","110","applyStickyHoverFix","buttonEl","enterVRButton","enterARButton","insideLoader","enterAREl","orientationModalEl","updateEnterInterfaces","toggleOrientationModalIfNeeded","onEnterVRButtonClick","onEnterARButtonClick","onModalClick","enterAR","vrButton","createEnterVRButton","arButton","createEnterARButton","createOrientationModal","uiElement","toggleEnterVRButtonIfNeeded","toggleEnterARButtonIfNeeded","checkARSupport","isLandscape","111","cast","receive","onMeshChanged","setShadowMapEnabled","updateDescendants","positional","volume","audioLoader","pool","mustPlay","playSoundBound","playSound","sound","srcChanged","setupSound","evtDetail","stopSound","oldEvt","audioListener","pauseSound","processSound","createTextGeometry","loadBMFont","coreShader","FONT_BASE_URL","FONTS","aileronsemibold","dejavu","exo2bold","exo2semibold","kelsonsans","monoid","mozillavr","roboto","sourcecodepro","MSDF_FONTS","promiseGenerator","fontWidthFactors","protocolRe","computeWidth","wrapPixels","wrapCount","widthFactor","anchor","fontImage","shaderData","createOrUpdateMaterial","currentFont","updateGeometry","updateFont","shaderObject","hasChangedShader","NewShader","fontSrc","lookupFont","fontImgSrc","digitsum","digits","computeFontWidthFactor","getFontImageSrc","initMesh","fontObj","imageSrc","geometryComponent","textScale","ascender","geometryUpdateBase","geometryUpdateData","newLineRegex","tabRegex","controllerUtils","DEFAULT_CAMERA_HEIGHT","DEFAULT_HANDEDNESS","EYES_TO_ELBOW","FOREARM","EMPTY_DAYDREAM_TOUCHES","autoHide","headElement","buttonStates","changedAxes","targetControllerNumber","axisMoveEventDetail","deltaControllerPosition","controllerQuaternion","controllerEuler","updateGamepad","buttonEventDetails","updatePose","updateButtons","defaultUserHeight","getHeadElement","findMatchingControllerWebVR","applyArmModel","controllerPosition","headObject3D","buttonState","touched","handleAxes","handlePress","handleTouch","handleValue","controllerAxes","previousAxis","previousButtonState","updateController","isControllerPresent","findMatchingControllerWebXR","INDEX_CONTROLLER_MODEL_URL","INDEX_CONTROLLER_MODEL_BASE_URL","INDEX_CONTROLLER_ROTATION_OFFSET_WEBXR","INDEX_CONTROLLER_ROTATION_OFFSET","INDEX_CONTROLLER_POSITION_OFFSET","triggerOriginalRotationX","triggerPressed","trackpadPressed","pressedName","KEYCODE_TO_CODE","keyboardevent","KEYS","acceleration","adAxis","adEnabled","adInverted","wsAxis","wsEnabled","wsInverted","onVisibilityChange","attachVisibilityEventListeners","isEmptyObject","updateVelocity","getMovementVector","removeKeyEventListeners","removeVisibilityEventListeners","attachKeyEventListeners","adSign","wsSign","scaledEasing","KeyA","ArrowLeft","KeyD","ArrowRight","KeyW","ArrowUp","KeyS","ArrowDown","directionVector","rotationEuler","xRotation","oncontextmenu","MODEL_FILENAMES","GAMEPAD_ID_PATTERN","axisMeshNames","buttonMeshNames","pointingPoseMeshName","hideDisconnected","onModelError","setModelVisibility","loadedMeshInfo","axisMeshes","createdFromMesh","updateControllerModel","sourceUrl","createControllerModelUrl","forceDefault","trackedControlsComponent","hasNativeWebXRImplementation","defaultUrl","meshName","meshInfo","controllerModel","getImmediateChildByName","unpressed","calculateRayOriginFromMesh","object3d","lerpAxisTransform","axisValue","axisMeshInfo","lerpValue","lerpButtonTransform","buttonValue","buttonMeshInfo","numAxes","modelVisible","124","125","ANode","registerElement","mediaElementLoaded","checkProgress","secondsBuffered","buffered","fixUpMediaElement","mediaEl","newMediaEl","extractDomain","host","inferResponseType","getFileNameFromURL","dotLastIndex","filePath","isAssets","attachedCallback","mediaEls","imgEl","imgEls","srcObject","detachedCallback","isAssetItem","loadedBytes","totalBytes","126","srcs","127","AEntity","OBJECT3D_COMPONENTS","ONCE","initializingComponents","componentsToUpdate","rotationObj","states","oldVal","justInitialized","setEntityAttribute","assetsEl","addToParent","removeComponent","removeFromParent","oldObj","getOrCreateObject3D","attachedToParent","updateComponents","getChildEntities","childEntities","initComponent","isDependency","componentId","componentInfo","checkComponentDefined","initComponentDependencies","initialized","tryRemoveLater","extraComponents","attrValue","mixinEls","componentCache","isComponent","getExtraComponents","getDOMAttribute","styleParser","clobber","updateProperties","resetProperty","mixinUpdate","entities","computedMixinStr","componentsUpdated","newMixins","oldMixins","mixinEl","mixinIds","updateMixins","handleMixinUpdate","oldMixinIds","singlePropUpdate","newAttrValue","delimiterIndex","flushToDOM","entityEl","getRotation","stateIndex","inspector","inMixin","isComponentMixedIn","128","isMixin","cacheAttribute","updateEntities","closestScene","cacheAttributes","parseAttrValueForCache","129","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","childFilter","childrenLoaded","newMixinIdArray","oldMixinIdArray","newMixinIds","unregisterMixin","registerMixin","compositedMixinIds","mixinId","130","knownTags","wrapMethods","targetObj","methodList","derivedObj","baseObj","derivedMethod","baseMethod","wrapMethod","copyProperties","newObj","isANode","isAEntity","addTagName","wrapANodeMethods","wrapAEntityMethods","131","parseProperties","parseProperty","processSchema","isSingleProp","isSingleProperty","stringifyProperties","stringifyProperty","aframeScript","currentScript","upperCaseRegExp","objectPools","isSinglePropertyObject","isObjectBased","objectPool","events","eventsBind","nextData","use","removeUnusedKeys","previousOldData","parsingAttrValue","throttledEmitComponentChanged","prevData","silent","updateCachedAttrValue","tempObject","recycle","clearObject","extendProperties","parsedValue","callUpdateHandler","initialOldData","buildData","mayNeedSchemaUpdate","schemaChangeKeys","hasComponentChanged","copyData","isPositionRotationScale","schemaAddon","extendedSchema","newData","componentDefined","mixinData","isObjectOrArray","eventsAttach","eventsDetach","registrationOrderWarnings","sourceData","parsedProperty","hasBehavior","NewComponent","schemaIsSingleProp","pauseMethod","DOCUMENT_POSITION_FOLLOWING","shouldPlay","createPool","132","Geometry","registerGeometry","NewGeometry","133","propertyTypes","nonCharRegex","urlRegex","registerPropertyType","defaultParse","defaultStringify","assetParse","parsedUrl","intParse","vecParse","isValidDefaultCoordinate","possibleCoordinates","isValidDefaultValue","134","initMetaTags","initWakelock","initPostMessageAPI","getCanvasSize","embedded","isVR","getMaxSize","setupCanvas","onFullScreenChange","dataset","aframeCanvas","AScene","isAR","systemNames","behaviors","originalHTML","setupRenderer","onVRPresentChangeBound","onVRPresentChange","enterVRBound","exitVRBound","exitVRTrueBound","pointerRestrictedBound","pointerRestricted","pointerUnrestrictedBound","pointerUnrestricted","attachedCallbackPostCamera","initSystems","initSystem","behaviorArr","behaviorType","getPointerLockElement","errorMessage","useAR","xrInit","vrManager","refspace","xrMode","sessionConfiguration","requestSession","enterVRSuccess","getVRDisplay","hasNativeWebVRImplementation","presentationAttributes","highRefreshRate","foveationLevel","navigationUI","exitVRSuccess","forceCanvasResizeSafariMobile","getComputedAttribute","componentPropValue","isVRPresenting","maxCanvasSize","rendererAttr","rendererAttrString","maxCanvasWidth","maxCanvasHeight","renderStarted","savedBackground","135","titleEl","getSceneCanvasSize","loaderScene","sphereGeometry","sphereMaterial","sphereMesh1","sphereMesh2","sphereMesh3","loaderAttribute","dotsColor","136","attrs","MOBILE_HEAD_TAGS","MOBILE_IOS_HEAD_TAGS","exists","headEl","headScriptEl","headTags","createAndInjectTag","tagObj","createTag","137","isIframed","postMessageAPIHandler","138","139","Wakelock","140","PropertyTypes","processPropertyDefinition","propDefinition","isCustomType","propData","getPartialData","propValue","stringifiedData","141","propertyToThreeMapping","vec2","vec3","vec4","initVariables","varType","variables","updateVariables","materialKey","setMapOnTextureLoad","updateMapMaterialFromData","142","System","rawData","registerSystem","NewSystem","findAllScenes","143","originalPosition","originalRotation","originalParent","originalGroup","outerGroup","materialMappings","addMapping","htmlAttrName","defaultComponents","mappings","146","147","registerPrimitive","defaultAttributes","defaultComponentsFromPrimitive","deprecatedMappings","resolveMappingCollisions","mixinComponents","isPureObject","extendDeep","getComponentPropertyPath","definePrimitive","addComponentMapping","148","149","getMeshMixin","radiusOuter","radiusInner","segmentsTheta","150","segmentsRadial","151","152","153","154","155","meshMixin","156","meshPrimitives","157","158","159","160","161","unCamelCase","geometryName","geometryHyphened","162","segmentsDepth","163","164","165","166","167","168","169","170","171","segmentsPhi","172","173","174","radiusTubular","segmentsTubular","175","176","rotateVector","uvMinVector","uvMaxVector","uvScaleVector","vertexA","vertexB","vertexC","177","getVRDevices","isIOSOlderThan10","polyfillConfig","cordova","webvrpolyfill","isIE11","isBrowserEnvironment","AComponent","ANIME","coreComponents","178","_rS","_scene","getEntityCount","getEntriesByName","fractions","179","180","getMaterialData","materialData","textureSrc","181","182","183","isWebGL2AVailable","VERTEX_SHADER_WEBGL1","VERTEX_SHADER_WEBGL2","FRAGMENT_SHADER_WEBGL1","FRAGMENT_SHADER_WEBGL2","184","185","CubeLoader","texturePromises","ambientOcclusionMap","ambientOcclusionMapIntensity","ambientOcclusionTextureOffset","ambientOcclusionTextureRepeat","displacementTextureOffset","displacementTextureRepeat","metalnessTextureOffset","metalnessTextureRepeat","normalTextureOffset","normalTextureRepeat","roughnessTextureOffset","roughnessTextureRepeat","sphericalEnvMap","updateDistortionMap","updateEnvMap","isLoadingEnvMap","SphericalReflectionMapping","handleTextureEvents","srcLoader","validateCubemapSrc","186","187","188","unwrapRender","wrapRender","initialCameraFound","numUserCameras","numUserCamerasChecked","setupInitialCamera","cameraEls","checkUserCamera","createDefaultCamera","cameraData","defaultCameraEl","newCameraEl","newCamera","previousCamera","defaultCameraWrapper","defaultCamera","removeDefaultCamera","originalRender","spectatorCamera","189","createGeometry","GeometryClass","geometryInstance","cacheCount","clearCache","cachedGeometry","incrementCacheCount","decrementCacheCount","190","dracoDecoderPath","191","192","defaultLightsEnabled","defaultLights","userDefinedLights","setupDefaultLights","removeDefaultLights","ambientLight","directionalLight","193","isHLS","setTextureProperties","textureCounts","textureCache","onMaterialTextureLoaded","clearTextureCache","childElementCount","loadVideo","validateSrc","loadCanvas","handleImageTextureLoaded","resolveTexture","loadImageTexture","videoEl","videoTextureResult","handleVideoTextureLoaded","hashVideo","fixVideoAttributes","createVideoEl","needsCorrectionBGRA","needsCorrectionFlipY","videoAttributes","calculateVideoCacheHash","194","isOculusBrowser","colorManagement","colorOrTexture","195","SHADOW_MAP_TYPE_MAP","pcf","pcfsoft","196","isChrome","updateControllerList","throttledUpdateControllerList","prevCount","197","oldControllers","oldControllersLength","198","overlayElement","domOverlay","wasFeatureRequested","feature","optIntro","199","prependedArgs","200","COORDINATE_KEYS","isCoordinates","parseIfString","defaultVec","coordinate","isCoordinate","201","debugLib","getDebugNamespaceType","getDebugNamespaceColor","ls","logs","202","supportsVRSession","supportsARSession","isSessionSupported","supportsSession","_isMobile","isTablet","isMobileVR","mockUserAgent","isFirefoxReality","isNodeEnvironment","203","propertyPathCache","splitName","204","205","deepAssign","objectAssign","isGearVR","isOculusGo","functionToThrottle","minimumInterval","optionalContext","sinceLastTime","throttleTick","arrayPool","keysA","keysB","valA","valB","aVal","bVal","bKey","isComparingObjects","splitString","getElData","matchingElements","allElements","206","207","appName","getInternetExplorerVersion","208","209","HLS_MIMETYPES","COLOR_MAPS","materialSrcs","setMap","longType","shortType","210","EMPTY_SLOT","defaultObjectFactory","objectFactory","objPool","nextFreeSlot","grow","objToUse","211","212","isImageCb","isVideoCb","onResult","contentType","getResponseHeader","checkIsImageFallback","checkIsImage","isImage","parsedSrc","tester","aCubemap","cubemapSrcRegex","validatedUrls","validateAndGetQuerySelector","213","DASH_REGEX","toCamelCase","upperCase","transformKeysToCamelCase","camelKey","parsedData","getKeyValueChunks","styleParse","keyCount","styleStringify","hasUnclosedUrl","nextSplit","chunk","214","AXIS_LABELS","isControllerPresentWebVR","queryObject","filterControllerIndex","isControllerPresentWebXR","filterIdExact","filterIdPrefix","filterHand","matchingControllerOccurence","iterateProfiles","controllerMatch","isPresent","axesMapping","buttonType","215","deviceOrientation","alphaOffset","onDeviceOrientationChangeEvent","onScreenOrientationChangeEvent","setObjectQuaternion","zee","q0","orient","216","glStats","_totalDrawArraysCalls","_totalDrawElementsCalls","_totalUseProgramCalls","_totalFaces","_totalVertices","_totalPoints","_totalBindTexures","WebGLRenderingContext","POINTS","allcalls","over","drawelements","drawarrays","BrowserStats","_usedJSHeapSize","_totalJSHeapSize","usedJSHeapSize","totalJSHeapSize","log1024","_size","average","avgMs","217","nowOffset","rStats","iterateKeys","_settings","_colours","colours","_cssRStats","CSSPath","importCSS","_div","_perfCounters","Graph","_dom","_defArg","_def","_ctx","_current","_dotCanvas","_dotCtx","globalAlpha","_alarmCanvas","_alarmCtx","alarm","StackGraph","_num","PerfCounter","_total","_averageValue","_accumValue","_accumStart","_accumSamples","_spanId","_spanValue","_spanValueText","_started","_average","userTimingAPI","_perf","idArg","legend","218","searchString","219","Util","220","AndroidWakeLock","iOSWakeLock","getWakeLock","animateSpeed","checkpoint","isNavMeshConstrained","targetPosition","setCheckpoint","updateNavLocation","isVelocityActive","getVelocity","GamepadButton","GamepadButtonEvent","Hand","Joystick","rotationSensitivity","pitch","yaw","_lookVector","_moveVector","_dpadVector","updateButtonState","updateRotation","isConnected","dpad","joystick","getDpad","getJoystick","inputX","inputY","getVelocityDelta","dVelocity","isRotationActive","lookControls","hasLookControls","lookVector","getGamepad","_xrGamepads","_empty","handPreference","proxyControls","proxyGamepad","xrController","xrGamepad","navGamepads","navGamepad","getButton","getAxis","DPAD_RIGHT","DPAD_LEFT","DPAD_UP","DPAD_DOWN","connected","getID","FACE_1","FACE_2","FACE_3","FACE_4","L_SHOULDER_1","R_SHOULDER_1","L_SHOULDER_2","R_SHOULDER_2","START","VENDOR","KeyboardEvent","localKeys","attachEventListeners","getKeys","isProxied","getKeyboard","nativeKeyboardEvent","DOM_KEY_LOCATION_STANDARD","DOM_KEY_LOCATION_LEFT","DOM_KEY_LOCATION_RIGHT","DOM_KEY_LOCATION_NUMPAD","STANDARD","NUMPAD","os","browser_os","mergeIf","baseTable","keyCodeToInfoTable","keyCap","keyIdentifierTable","locationTable","codeToKeyTable","ShiftLeft","ShiftRight","ControlLeft","ControlRight","AltLeft","AltRight","OSLeft","OSRight","NumpadEnter","Space","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","KeyB","KeyC","KeyE","KeyF","KeyG","KeyH","KeyI","KeyJ","KeyK","KeyL","KeyM","KeyN","KeyO","KeyP","KeyQ","KeyR","KeyT","KeyU","KeyV","KeyX","KeyY","KeyZ","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadMultiply","NumpadAdd","NumpadComma","NumpadSubtract","NumpadDecimal","NumpadDivide","Semicolon","Equal","Comma","Minus","Period","Slash","Backquote","BracketLeft","Backslash","BracketRight","Quote","IntlBackslash","keyFixTable","Nonconvert","MediaNextTrack","MediaPreviousTrack","SelectMedia","HalfWidth","FullWidth","RomanCharacters","Crsel","Exsel","Zoom","codeTable","remap","nativeLocation","keyInfoForEvent","keyInfo","keyLocation","keyIdentifier","queryKeyCap","identifyKey","reverseEnabled","constrainToNavMesh","velocityCtrl","heading","navGroup","navNode","injectControls","nav","addAgent","removeAgent","clampedEnd","updateVelocityCtrl","getGroup","clampStep","control","getPositionDelta","enableNegX","enablePosX","enableNegZ","enablePosZ","zVel","xVel","onAxisMove","isMoving","canRecordAxis","startingAxisData","handleSwipeAxis","handleTouchAxis","axisData","velX","velZ","absChangeZ","LoopMode","regExpEscape","crossFadeDuration","activeActions","stopAction","playAction","ColladaLoader","colladaModel","parseStrings","parseFloats","parseInts","parseId","parseAssetUnit","parseAssetUpAxis","parseLibrary","libraryName","buildLibrary","builder","getBuild","parseAnimationSampler","inputs","semantic","parseAnimationChannel","sid","arraySyntax","memberSyntax","member","buildAnimation","sources","inputId","outputId","OUTPUT","createKeyframeTracks","buildAnimationChannel","getAnimation","outputSource","defaultMatrix","transformAnimationData","prepareAnimationData","positionData","quaternionData","scaleData","getPrev","getNext","createMissingKeyframes","buildAnimationClip","animationTracks","getAnimationClip","parseSkin","bindShapeMatrix","parseSource","parseJoints","vertexWeights","parseVertexWeights","vcount","buildController","jointOffset","JOINT","weightOffset","WEIGHT","jointSource","inverseSource","INV_BIND_MATRIX","jointCount","vertexSkinData","weightId","descending","buildSkin","skinIndices","skinWeights","buildImage","init_from","getImage","parseEffectProfileCOMMON","surfaces","parseEffectNewparam","technique","parseEffectTechnique","extra","parseEffectExtra","parseEffectSurface","parseEffectSampler","parseEffectParameters","parseEffectParameter","parseEffectParameterTexture","parseEffectParameterTextureExtra","parseEffectParameterTextureExtraTechnique","parseEffectExtraTechnique","buildEffect","buildMaterial","profile","textureObject","tgaLoader","getTextureLoader","wrapU","wrapV","offsetU","offsetV","repeatU","repeatV","parameter","double_sided","parseCameraOptics","parseCameraTechnique","parseCameraParameters","buildCamera","optics","aspect_ratio","parseLightTechnique","parseLightParameters","falloffAngle","buildLight","parseGeometryVertices","parseGeometryPrimitive","hasUV","inputname","checkUVCoordinates","uvsNeedsFix","buildGeometry","groupedPrimitives","groupPrimitives","primitiveType","buildGeometryType","materialKeys","prevLength","buildGeometryData","pushVector","sourceStride","buildKinematicsModel","parseKinematicsTechniqueCommon","parseKinematicsJoint","parseKinematicsLink","parseKinematicsJointParameter","limits","static","zeroPosition","middlePosition","attachments","parseKinematicsAttachment","parseKinematicsTransform","parsePhysicsRigidBody","parsePhysicsTechniqueCommon","inertia","parseKinematicsBindJointAxis","tmpJointIndex","jointIndex","buildKinematicsScene","buildTransformList","collada","parseNode","instanceCameras","instanceControllers","instanceLights","instanceGeometries","instanceNodes","parseNodeInstance","instances","buildSkeleton","boneData","sortedBoneData","buildBoneHierarchy","visualScenes","buildNode","instanceCamera","newObjects","buildObjects","instanceLight","fallbackMaterial","resolveMaterialBinding","instanceMaterials","buildVisualScene","getVisualScene","upAxis","parseAsset","TGALoader","kinematics","kinematicsModels","physicsModels","kinematicsScenes","prepareNodes","rigidBodies","bindJointAxis","setupAnimations","kinematicsModelId","kinematicsSceneId","visualSceneId","kinematicsModel","kinematicsScene","getKinematicsScene","visualScene","jointMap","targetElement","parentVisualElement","getJointValue","jointData","setJointValue","visualElement","visualElementName","setupKinematics","parseScene","FBXLoader","crossorigin","fbxTree","connections","sceneGraph","FBXTreeParser","GeometryParser","AnimationParser","TextParser","BinaryParser","BinaryReader","dv","FBXTree","getFbxVersion","convertFBXTimeToSeconds","resourceDirectory","FBXBuffer","CORRECT","convertArrayBufferToString","isFbxFormatBinary","FBXText","isFbxFormatASCII","parseConnections","deformers","parseDeformers","geometryMap","connectionMap","Connections","rawConnection","fromID","toID","relationship","parentRelationship","childRelationship","blobs","Objects","videoNodes","Video","nodeID","videoNode","RelativeFilename","Filename","arrayBufferContent","Content","base64Content","parseImage","filename","textureMap","textureNodes","parseTexture","textureNode","wrapModeU","WrapModeU","wrapModeV","WrapModeV","valueU","valueV","Scaling","FileName","materialMap","materialNodes","parseMaterial","materialNode","ShadingModel","parseParameters","BumpFactor","Diffuse","DiffuseColor","DisplacementFactor","Emissive","EmissiveColor","EmissiveFactor","Opacity","ReflectionFactor","Shininess","Specular","SpecularColor","LayeredTexture","DeformerNodes","Deformer","deformerNode","relationships","attrType","parseSkeleton","geometryID","rawTargets","parseMorphTargets","deformerNodes","rawBones","boneNode","rawBone","transformLink","TransformLink","linkMode","Mode","Indexes","Weights","rawMorphTargets","morphTargetNode","rawMorphTarget","initialWeight","DeformPercent","fullWeights","FullWeights","geoID","modelMap","parseModels","modelNodes","Model","modelNode","setLookAtProperties","connection","bindSkeleton","createAmbientLight","setupMorphMaterials","createCamera","createLight","createMesh","createCurve","setModelTransforms","subBone","cameraAttribute","NodeAttribute","CameraProjectionType","nearClippingPlane","NearPlane","farClippingPlane","FarPlane","AspectWidth","AspectHeight","FieldOfView","FocalLength","lightAttribute","LightType","Intensity","CastLightOnObject","FarAttenuationEnd","EnableFarAttenuation","InnerAngle","OuterAngle","CastShadows","FBX_Deformer","geo","transformData","RotationOrder","Lcl_Translation","rotationOffset","RotationOffset","Lcl_Rotation","preRotation","PreRotation","postRotation","PostRotation","Lcl_Scaling","generateTransform","lookAtTarget","bindMatrices","parsePoseNodes","geoConnParent","BindPoseNode","Pose","poseNodes","PoseNode","poseNode","Matrix","GlobalSettings","ambientColor","AmbientColor","matUuid","sharedMat","geoNodes","parseGeometry","geoNode","parseMeshGeometry","parseNurbsGeometry","GeometricTranslation","GeometricRotation","GeometricScaling","genGeometry","preTransform","geoInfo","parseGeoNode","genBuffers","weightsIndices","mappingType","prevMaterialIndex","lastGroup","vertexPositions","Vertices","vertexIndices","PolygonVertexIndex","LayerElementColor","LayerElementMaterial","parseMaterialIndices","LayerElementNormal","parseNormals","LayerElementUV","parseUVs","weightTable","polygonIndex","faceLength","displayedWeightsWarning","facePositionIndexes","faceNormals","faceColors","faceUVs","faceWeights","faceWeightIndices","vertexIndex","polygonVertexIndex","endOfFace","weightIndices","wt","wIndex","Weight","weightIndex","comparedWeight","comparedWeightIndex","comparedWeightArray","genFace","parentGeo","parentGeoNode","rawTarget","morphGeoNode","genMorphGeometry","morphGeo","morphIndex","morphGeoInfo","morphBuffers","NormalNode","MappingInformationType","referenceType","ReferenceInformationType","Normals","NormalIndex","NormalsIndex","dataSize","UVNode","UV","UVIndex","ColorNode","Colors","ColorIndex","MaterialNode","materialIndexBuffer","materialIndices","NURBSCurve","Order","startKnot","endKnot","degree","knots","KnotVector","pointsValues","Form","animationClips","rawClips","parseClips","rawClip","addClip","AnimationCurve","curveNodesMap","parseAnimationCurveNodes","parseAnimationCurves","layersMap","parseAnimationLayers","parseAnimStacks","rawCurveNodes","AnimationCurveNode","rawCurveNode","curveNode","rawCurves","animationCurve","KeyTime","KeyValueFloat","animationCurveID","animationCurveRelationship","rawLayers","AnimationLayer","layerCurveNodes","modelID","rawModel","modelName","initialPosition","initialRotation","initialScale","getModelAnimTransform","preRotations","postRotations","morph","deformerID","morpherID","morphName","rawStacks","AnimationStack","rawTracks","generateTracks","positionTrack","generateVectorTrack","rotationTrack","generateRotationTrack","scaleTrack","morphTrack","generateMorphTrack","getTimesForAllAxes","getKeyframeTrackValues","interpolateRotations","quaternionValues","morphNum","elem","xIndex","yIndex","xValue","yValue","zValue","valuesSpan","absoluteSpan","numSubIntervals","initialTime","nextTime","interpolatedTimes","interpolatedValues","getPrevNode","currentIndent","getCurrentNode","getCurrentProp","currentProp","pushStack","popStack","setCurrentProp","currentPropName","allNodes","matchComment","matchEmpty","matchBeginning","matchProperty","parseNodeBegin","parseNodeProperty","parseNodePropertyContinued","nodeAttrs","parseNodeAttr","contentLine","connProps","parseNumberArray","parseNodeSpecialProperty","innerPropName","innerPropType1","innerPropType2","innerPropFlag","innerPropValue","reader","endOfContent","endOffset","getUint64","numProperties","nameLen","propertyList","singleProperty","subNode","parseSubNode","getBoolean","getFloat64","getFloat32","getInt32","getInt64","getInt16","compressedLength","getBooleanArray","getFloat64Array","getFloat32Array","getInt32Array","getInt64Array","Zlib","reader2","Inflate","decompress","nullByte","dataArray","infoObject","tempMat","tempEuler","tempVec","getEulerOrder","enums","fetchScript","loadLoader","loaderPromise","removeScript","fetchScriptInternal","scriptId","createScript","timeoutId","disableTimeout","firstScript","appendScript","applyEnvMap","materialNames","enableBackground","object3dsetHandler","addedMaterialNames","removedMaterialNames","maintainedMaterialNames","setBackground","physics","GRABBED_STATE","hitEl","constraint","onHit","onGripOpen","onGripClose","removeConstraint","CANNON","LockConstraint","addConstraint","playerHeight","maxJumps","numJumps","beginJump","collide","onCollide","linearDamping","enableSlopes","enableJumps","addComponent","Vec3","fixedRotation","beforeStep","normalizedVelocity","currentSurfaceNormal","groundNormal","groundBody","didCollide","groundHeight","contacts","getContacts","maxInterval","contact","raycastToGround","driver","world","hitNormal","_updateDirection","intersectBody","hasHit","hitNormalWorld","watch","collisions","handleHit","handleHitEnd","objectEls","meshPosition","colliderScale","distanceMap","colliderRadius","scaleVec","hasLoadedNavMesh","loadNavMesh","navMesh","navMeshGeometry","fromBufferGeometry","setNavMeshGeometry","vDest","vDelta","vNext","getPath","vCurrent","vWaypoint","gazeTarget","getNavMesh","Pathfinding","pathfinder","ZONE","agents","setZoneData","createZone","agent","ctrl","groupID","findPath","getClosestNode","endTarget","computeCentroids","roundNumber","mergeVertexIds","setPolygonCentroid","vertexIds","cleanPolygon","neighbours","isConvex","isPointInPoly","isVectorInPolygon","triarea2","vequal","scoreFunction","sinkDown","bubbleUp","rescoreElement","cost","visited","cleanUp","heap","heuristic","buildZone","_buildNavigationMesh","_buildPolygonGroups","_getSharedVerticesInOrder","portals","_buildPolygonsFromGeometry","polygons","_buildPolygonNeighbours","faceVertexUvs","stringPull","zones","getRandomNode","defaultHexGrid","Primitive","addMesh","HexGrid","board","Board","generateTilemap","addMaterial","TAU","DEG_TO_RAD","RAD_TO_DEG","SQRT3","TILE","ENT","STR","HEX","SQR","ABS","tiles","tileGroup","finder","AStarFinder","setGrid","setEntityOnTile","cellToPixel","cell","heightOffset","tile","addTile","snapTileToGrid","removeTile","removeAllTiles","getTileAtCell","cellToHash","snapToGrid","pixelToCell","getRandomTile","Tools","randomInt","generateOverlay","generateTiles","Cell","walkable","_calcCost","_priority","_visited","LinkedList","generateID","cellSize","numCells","extrudeSettings","autogenerated","_createVertex","cellShape","cellGeo","verticesNeedUpdate","cellShapeGeo","_cellWidth","_cellLength","_hashDelimeter","_directions","_diagonals","_list","_vec3","_cel","_conversionVec","_geoCache","_matCache","TWO_THIRDS","_cubeRound","getCellAt","getNeighbors","getRandomCell","clearPath","generateTile","Tile","tileScale","generateTilePoly","generate","createPointsGeometry","getJSON","SqrGrid","_fullCellSize","randomizeRGB","objectType","structure","_emissive","deselect","free","objToNodeMap","sortArray","swapObjects","showDebug","dump","moveUp","moveDown","_listener","isOnce","execute","isBound","_destroy","_prevParams","memorize","_shouldPropagate","validateListener","_registerListener","_indexOfListener","_addBinding","addOnce","getNumListeners","forget","Signal","allowDiagonal","heuristicFilter","PathUtil","backtrace","biBacktrace","expandPath","smoothenPath","isWalkableAt","compressPath","imageLoader","sourceFile","MouseCaster","rightDown","pickedObject","selectedObject","allHits","screenPosition","_preventDefault","_onDocumentMouseMove","_onDocumentMouseDown","_onDocumentMouseUp","_onMouseWheel","OVER","OUT","CLICK","WHEEL","lightPosition","cameraType","orthoZoom","contolled","OrbitControls","attachTo","updateOrthoZoom","focusOn","SelectionManager","onDeselect","toggleSelection","onMouse","clearSelection","getShortRotation","nwf","Performance","radixSort","ocean","amplitudeVariance","speedVariance","waves","ang","amp","verts","vprops","createPatternBuilder","generateCreateBodyFunctionBody","debugSetters","getVectorCode","getBodyCode","variableList","generateQuadTreeFunctionBody","quadCount","getInsertStackCode","getQuadNodeCode","isSamePosition","getChildBodyCode","setChildBodyCode","quads","assignQuads","recursiveCode","runRecursiveOnChildren","indentCount","insertionCode","assignInsertionQuadIndex","childBody","setChildBody","getChildBody","generateBoundsFunctionBody","generateFunctionBody","generateCreateDragForceFunctionBody","generateCreateSpringForceFunctionBody","generateIntegratorFunctionBody","coefficient","targetHasIt","optionsValueType","inputSeed","nextDouble","randomIterator","customRandom","localRandom","shuffle","gaussian","levy","_interopRequireWildcard","_toConsumableArray2","_defineProperty2","_slicedToArray2","_jsxFileName","RCTSliderWebComponent","_ref$minimumValue","_ref$maximumValue","_ref$step","_ref$minimumTrackTint","minimumTrackTintColor","_ref$maximumTrackTint","maximumTrackTintColor","_ref$thumbTintColor","thumbTintColor","_ref$thumbStyle","_ref$inverted","_ref$enabled","_ref$trackHeight","trackHeight","_ref$thumbSize","thumbSize","_ref$onRNCSliderSlidi","_ref$onRNCSliderSlidi2","_ref$onRNCSliderValue","others","containerSize","containerRef","percentageValue","minPercent","maxPercent","minimumTrackStyle","maximumTrackStyle","thumbViewStyle","decimalPrecision","calculatePrecision","hardRounded","withinBounds","accessibilityActions","tenth","updateValue","onAccessibilityAction","accessibleValue","roundedValue","handleAccessibilityKeys","decimals","_getRequireWildcardCache","nodeInterop","cacheBabelInterop","cacheNodeInterop","hasPropertyDescriptor","isNativeReflectConstruct","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","ForwardRef","Lazy","Memo","Portal","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","_concat","partial","_createPartialApplicator","set1","set2","len1","received","argsIdx","combinedIdx","XWrap","thisObj","_checkForMethod","toIndex","dissoc","_objectAssign","ifElse","onTrue","onFalse","_indexOf","inf","_equals","_arrayFromIterator","_containsWith","_functionName","identical","_uniqContentEquals","aIterator","bIterator","stackA","stackB","aItem","typeA","ignoreCase","sticky","extendedStackA","extendedStackB","pred","gte","isNil","cond","arity","_dispatchable","_map","_reduce","_xmap","functor","_isTransformer","transducer","_xfBase","XMap","Axios","mergeConfig","createInstance","defaultConfig","instanceConfig","spread","isAxiosError","InterceptorManager","dispatchRequest","interceptor","fulfilled","rejected","getUri","eject","throwIfCancellationRequested","throwIfRequested","fns","normalizedName","description","columnNumber","expires","secure","cookie","toGMTString","isAbsoluteURL","combineURLs","requestedURL","relativeURL","ignoreDuplicateOf","originURL","msie","urlParsingNode","port","pathname","requestURL","executor","resolvePromise","registerImmediate","nextHandle","tasksByHandle","currentlyRunningATask","doc","runIfPresent","importScripts","postMessageIsAsynchronous","oldOnMessage","canUsePostMessage","messagePrefix","onGlobalMessage","installPostMessageImplementation","installMessageChannelImplementation","installReadyStateChangeImplementation","colorNames","swizzle","reverseNames","hexDouble","hexAlpha","hwba","isArrayish","conversions","fromModel","toModel","wrappedFn","conversion","wrapRounded","wrapRaw","deriveBFS","models","buildGraph","adjacents","adjacent","wrapConversion","arrayValue","keyValueSep","valueof","Dispatch","nodeById","strengths","distances","initializeStrength","initializeDistance","_nodes","radiuses","initNodes","UnavailabilityError","moduleName","initialWindowMetrics","initialWindowSafeAreaInsets","PanGestureHandler","GestureHandlerRootView","GestureState","Screens","AnimatedWebScreen","MaybeScreenContainer","MaybeScreen","MaskedView","TouchableItem","borderless","pressColor","useForeground","TouchableNativeFeedback","HeaderBackButton","labelVisible","pressColorAndroid","truncatedLabel","customTintColor","ios","customPressColorAndroid","handleLabelLayout","onLabelLayout","setInitialLabelWidth","accessibilityComponentType","accessibilityTraits","backImage","leftLabelText","initialLabelWidth","screenLayout","titleLayout","labelElement","maskElement","iconMaskContainer","iconMask","iconMaskFillerRect","renderLabel","labelWrapper","iconWithLabel","HeaderBackground","borderBottomWidth","memoize","hasChanged","getDefaultHeaderHeight","headerHeight","HeaderSegment","isParentHeaderShown","getInterpolatedStyle","styleInterpolator","layouts","leftLabel","leftLabelLayout","headerTitleAlign","headerLeft","onGoBack","headerRight","headerBackImage","headerBackTitle","headerTruncatedBackTitle","headerPressColorAndroid","headerBackAccessibilityLabel","headerBackAllowFontScaling","headerTitleAllowFontScaling","headerTitleStyle","headerBackTitleStyle","headerLeftContainerStyle","headerRightContainerStyle","headerTitleContainerStyle","headerStyle","headerStatusBarHeight","insets","defaultHeight","customHeaderStyle","safeStyles","borderTopWidth","previousTitle","backgroundStyle","leftButton","labelStyle","leftLabelStyle","setLeftLabelLayout","rightButton","headerTintColor","headerBackground","headerTransparent","headerBackTitleVisible","headerTitle","setTitleLayout","customTitleStyle","setFill","getInvertedMultiplier","getDistanceForDirection","multiplier","onTransition","closing","transitionSpec","onClose","onOpen","gestureDirection","gestureVelocityImpact","onGestureBegin","onGestureCanceled","onGestureEnd","swiping","insetLeft","isCurrentlyMounted","getAnimateToValue","lastToValue","handleEndInteraction","gestureResponseDistance","maxDeltaX","minOffsetY","minOffsetX","maxDeltaY","interpolatedStyle","animationContext","getCardAnimationContext","shadowStyle","handleGestureEvent","gestureEnabled","translationY","translationX","isTransparent","CardAnimationContext","overlayEnabled","overlayStyle","needsOffscreenAlphaCompositing","flattenedStyle","onGestureEvent","onHandlerStateChange","handleGestureStateChange","shadowEnabled","Card","shadowHorizontal","shadowLeft","shadowRight","shadowVertical","shadowTop","shadowBottom","safeAreaInsetLeft","setPointerEvents","isCurrentHeaderShown","headerMode","headerShown","previousScene","getPreviousScene","onOpenRoute","onCloseRoute","onPageChangeConfirm","onPageChangeCancel","onTransitionStart","onPageChangeStart","onGestureStart","onGestureCancel","accessibilityElementsHidden","importantForAccessibility","pageOverflowEnabled","hasAbsoluteHeader","HeaderHeightContext","renderScene","getFocusedRoute","onContentHeightChange","onHeaderHeightChange","isIphoneX","dimen","isPad","isTVOS","conditional","forNoAnimation","forFade","leftButtonStyle","rightButtonStyle","titleStyle","forSlideLeft","forSlideRight","forSlideUp","TransitionIOSSpec","FadeInFromBottomAndroidSpec","FadeOutToBottomAndroidSpec","RevealFromBottomAndroidSpec","ScaleFromCenterAndroidSpec","SlideFromRightIOS","cardStyleInterpolator","cardStyle","headerStyleInterpolator","ModalSlideFromBottomIOS","FadeFromBottomAndroid","RevealFromBottomAndroid","ScaleFromCenterAndroid","DefaultTransition","ModalTransition","FALLBACK_DESCRIPTOR","getHeaderHeights","safeAreaInsets","getDistanceFromOptions","getProgressFromGesture","headerHeights","getPreviousRoute","previousRoute","detachInactiveScreens","focusedDescriptor","focusedOptions","focusedHeaderHeight","defaultTransitionPreset","forNoAnimationHeader","activeScreensLimit","detachPreviousScreen","isFloatHeaderAbsolute","floatingHeader","handleLayout","isScreenActive","sceneForActivity","animationEnabled","transitionConfig","nextScene","safeAreaInsetTop","safeAreaInsetRight","safeAreaInsetBottom","closingRouteKeys","cardOverlay","cardOverlayEnabled","cardShadowEnabled","getGesturesEnabled","oldScene","currentGesture","previousGesture","nextGesture","nextDescriptor","previousDescriptor","__memo","absolute","floating","clearKeyboardTimeout","handlePageChangeCancel","HeaderTitle","aria-level","HeaderContainer","parentPreviousScene","previousHeaderShown","isHeaderStatic","initialSafeAreaInsets","safe","iphoneXStyle","regularStyle","currentHeight","getStatusBarHeight","SafeAreaProviderCompat","GestureHandlerWrapper","previousRoutes","previousDescriptors","openingRouteKeys","replacingRouteKeys","keyboardHandlingEnabled","handleGestureCancel","previousFocusedRoute","nextFocusedRoute","isAnimationEnabled","getAnimationTypeForReplace","defaultOptions","xm","xp","leaf","_x0","_x1","defaultX","binarytree","Binarytree","addAll","leaf_copy","treeProto","visit","halves","retainer","visitAfter","ym","zm","yp","zp","_y0","_z0","_y1","_z1","defaultY","defaultZ","octree","Octree","y3","z3","octs","distanceMin2","distanceMax2","theta2","quadtree","treeNode","numChildren","jiggle","distanceMin","distanceMax","Quadtree","radii","ri2","prepare","_random","InternMap","keyof","_intern","intern_get","intern_set","intern_delete","initRange","implicit","ordinal","unknown","CSSTransitions","MSTransition","OTransition","NativeSafeAreaView","onInsetsChange","getInset","createContextElement","getSupportedTransitionEvent","_supportedTransitionEvent","_supportedEnv","getSupportedEnv","SafeAreaInsetsContext","SafeAreaFrameContext","SafeAreaProvider","parentInsets","parentFrame","initialMetrics","nextInsets","nextFrame","setIns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qH,KAAM,CAAE49D,KAAM,KAWT,SAAS0jY,IACd,IAAMC,EAAW3tjB,aAAjB,GACA,SAAI2tjB,EACF,MAAM,UAAN,iHAIF,OAAOA,EAiCF,IAAMC,EAAmBX,EAAzB,U,6BC1IQ,ICFA,YAEb,IADA,IAAItmjB,EAAIknjB,EAAUjvjB,OAAS,EAAI,EAAGi7B,EAAS,IAAItoB,MAAM5K,GAAIjI,EAAI,EACtDA,EAAIiI,GAAGkzB,EAAOn7B,GAAK,IAAMmvjB,EAAUtojB,MAAU,EAAJ7G,EAAa,IAAJA,GACzD,OAAOm7B,EDDM,CAAO","file":"static/js/2.76477044.chunk.js","sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport css from '../StyleSheet/css';\nimport * as forwardedProps from '../../modules/forwardedProps';\nimport pick from '../../modules/pick';\nimport useElementLayout from '../../modules/useElementLayout';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport useResponderEvents from '../../modules/useResponderEvents';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from '../Text/TextAncestorContext';\n\nvar forwardPropsList = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, forwardedProps.defaultProps), forwardedProps.accessibilityProps), forwardedProps.clickProps), forwardedProps.focusProps), forwardedProps.keyboardProps), forwardedProps.mouseProps), forwardedProps.touchProps), forwardedProps.styleProps), {}, {\n href: true,\n lang: true,\n onScroll: true,\n onWheel: true,\n pointerEvents: true\n});\n\nvar pickProps = function pickProps(props) {\n return pick(props, forwardPropsList);\n};\n\nvar View = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var hrefAttrs = props.hrefAttrs,\n onLayout = props.onLayout,\n onMoveShouldSetResponder = props.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = props.onMoveShouldSetResponderCapture,\n onResponderEnd = props.onResponderEnd,\n onResponderGrant = props.onResponderGrant,\n onResponderMove = props.onResponderMove,\n onResponderReject = props.onResponderReject,\n onResponderRelease = props.onResponderRelease,\n onResponderStart = props.onResponderStart,\n onResponderTerminate = props.onResponderTerminate,\n onResponderTerminationRequest = props.onResponderTerminationRequest,\n onScrollShouldSetResponder = props.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = props.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = props.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = props.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = props.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture;\n\n if (process.env.NODE_ENV !== 'production') {\n React.Children.toArray(props.children).forEach(function (item) {\n if (typeof item === 'string') {\n console.error(\"Unexpected text node: \" + item + \". A text node cannot be a child of a <View>.\");\n }\n });\n }\n\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hostRef = React.useRef(null);\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder: onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture,\n onResponderEnd: onResponderEnd,\n onResponderGrant: onResponderGrant,\n onResponderMove: onResponderMove,\n onResponderReject: onResponderReject,\n onResponderRelease: onResponderRelease,\n onResponderStart: onResponderStart,\n onResponderTerminate: onResponderTerminate,\n onResponderTerminationRequest: onResponderTerminationRequest,\n onScrollShouldSetResponder: onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture: onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder: onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture: onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder: onStartShouldSetResponder,\n onStartShouldSetResponderCapture: onStartShouldSetResponderCapture\n });\n var style = StyleSheet.compose(hasTextAncestor && styles.inline, props.style);\n var supportedProps = pickProps(props);\n supportedProps.classList = classList;\n supportedProps.style = style;\n\n if (props.href != null && hrefAttrs != null) {\n var download = hrefAttrs.download,\n rel = hrefAttrs.rel,\n target = hrefAttrs.target;\n\n if (download != null) {\n supportedProps.download = download;\n }\n\n if (rel != null) {\n supportedProps.rel = rel;\n }\n\n if (typeof target === 'string') {\n supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;\n }\n }\n\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n supportedProps.ref = setRef;\n return createElement('div', supportedProps);\n});\nView.displayName = 'View';\nvar classes = css.create({\n view: {\n alignItems: 'stretch',\n border: '0 solid black',\n boxSizing: 'border-box',\n display: 'flex',\n flexBasis: 'auto',\n flexDirection: 'column',\n flexShrink: 0,\n margin: 0,\n minHeight: 0,\n minWidth: 0,\n padding: 0,\n position: 'relative',\n zIndex: 0\n }\n});\nvar classList = [classes.view];\nvar styles = StyleSheet.create({\n inline: {\n display: 'inline-flex'\n }\n});\nexport default View;","/**\n * @license\n * Copyright 2010-2021 Three.js Authors\n * SPDX-License-Identifier: MIT\n */\nconst REVISION = '130';\nconst MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };\nconst TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };\nconst CullFaceNone = 0;\nconst CullFaceBack = 1;\nconst CullFaceFront = 2;\nconst CullFaceFrontBack = 3;\nconst BasicShadowMap = 0;\nconst PCFShadowMap = 1;\nconst PCFSoftShadowMap = 2;\nconst VSMShadowMap = 3;\nconst FrontSide = 0;\nconst BackSide = 1;\nconst DoubleSide = 2;\nconst FlatShading = 1;\nconst SmoothShading = 2;\nconst NoBlending = 0;\nconst NormalBlending = 1;\nconst AdditiveBlending = 2;\nconst SubtractiveBlending = 3;\nconst MultiplyBlending = 4;\nconst CustomBlending = 5;\nconst AddEquation = 100;\nconst SubtractEquation = 101;\nconst ReverseSubtractEquation = 102;\nconst MinEquation = 103;\nconst MaxEquation = 104;\nconst ZeroFactor = 200;\nconst OneFactor = 201;\nconst SrcColorFactor = 202;\nconst OneMinusSrcColorFactor = 203;\nconst SrcAlphaFactor = 204;\nconst OneMinusSrcAlphaFactor = 205;\nconst DstAlphaFactor = 206;\nconst OneMinusDstAlphaFactor = 207;\nconst DstColorFactor = 208;\nconst OneMinusDstColorFactor = 209;\nconst SrcAlphaSaturateFactor = 210;\nconst NeverDepth = 0;\nconst AlwaysDepth = 1;\nconst LessDepth = 2;\nconst LessEqualDepth = 3;\nconst EqualDepth = 4;\nconst GreaterEqualDepth = 5;\nconst GreaterDepth = 6;\nconst NotEqualDepth = 7;\nconst MultiplyOperation = 0;\nconst MixOperation = 1;\nconst AddOperation = 2;\nconst NoToneMapping = 0;\nconst LinearToneMapping = 1;\nconst ReinhardToneMapping = 2;\nconst CineonToneMapping = 3;\nconst ACESFilmicToneMapping = 4;\nconst CustomToneMapping = 5;\n\nconst UVMapping = 300;\nconst CubeReflectionMapping = 301;\nconst CubeRefractionMapping = 302;\nconst EquirectangularReflectionMapping = 303;\nconst EquirectangularRefractionMapping = 304;\nconst CubeUVReflectionMapping = 306;\nconst CubeUVRefractionMapping = 307;\nconst RepeatWrapping = 1000;\nconst ClampToEdgeWrapping = 1001;\nconst MirroredRepeatWrapping = 1002;\nconst NearestFilter = 1003;\nconst NearestMipmapNearestFilter = 1004;\nconst NearestMipMapNearestFilter = 1004;\nconst NearestMipmapLinearFilter = 1005;\nconst NearestMipMapLinearFilter = 1005;\nconst LinearFilter = 1006;\nconst LinearMipmapNearestFilter = 1007;\nconst LinearMipMapNearestFilter = 1007;\nconst LinearMipmapLinearFilter = 1008;\nconst LinearMipMapLinearFilter = 1008;\nconst UnsignedByteType = 1009;\nconst ByteType = 1010;\nconst ShortType = 1011;\nconst UnsignedShortType = 1012;\nconst IntType = 1013;\nconst UnsignedIntType = 1014;\nconst FloatType = 1015;\nconst HalfFloatType = 1016;\nconst UnsignedShort4444Type = 1017;\nconst UnsignedShort5551Type = 1018;\nconst UnsignedShort565Type = 1019;\nconst UnsignedInt248Type = 1020;\nconst AlphaFormat = 1021;\nconst RGBFormat = 1022;\nconst RGBAFormat = 1023;\nconst LuminanceFormat = 1024;\nconst LuminanceAlphaFormat = 1025;\nconst RGBEFormat = RGBAFormat;\nconst DepthFormat = 1026;\nconst DepthStencilFormat = 1027;\nconst RedFormat = 1028;\nconst RedIntegerFormat = 1029;\nconst RGFormat = 1030;\nconst RGIntegerFormat = 1031;\nconst RGBIntegerFormat = 1032;\nconst RGBAIntegerFormat = 1033;\n\nconst RGB_S3TC_DXT1_Format = 33776;\nconst RGBA_S3TC_DXT1_Format = 33777;\nconst RGBA_S3TC_DXT3_Format = 33778;\nconst RGBA_S3TC_DXT5_Format = 33779;\nconst RGB_PVRTC_4BPPV1_Format = 35840;\nconst RGB_PVRTC_2BPPV1_Format = 35841;\nconst RGBA_PVRTC_4BPPV1_Format = 35842;\nconst RGBA_PVRTC_2BPPV1_Format = 35843;\nconst RGB_ETC1_Format = 36196;\nconst RGB_ETC2_Format = 37492;\nconst RGBA_ETC2_EAC_Format = 37496;\nconst RGBA_ASTC_4x4_Format = 37808;\nconst RGBA_ASTC_5x4_Format = 37809;\nconst RGBA_ASTC_5x5_Format = 37810;\nconst RGBA_ASTC_6x5_Format = 37811;\nconst RGBA_ASTC_6x6_Format = 37812;\nconst RGBA_ASTC_8x5_Format = 37813;\nconst RGBA_ASTC_8x6_Format = 37814;\nconst RGBA_ASTC_8x8_Format = 37815;\nconst RGBA_ASTC_10x5_Format = 37816;\nconst RGBA_ASTC_10x6_Format = 37817;\nconst RGBA_ASTC_10x8_Format = 37818;\nconst RGBA_ASTC_10x10_Format = 37819;\nconst RGBA_ASTC_12x10_Format = 37820;\nconst RGBA_ASTC_12x12_Format = 37821;\nconst RGBA_BPTC_Format = 36492;\nconst SRGB8_ALPHA8_ASTC_4x4_Format = 37840;\nconst SRGB8_ALPHA8_ASTC_5x4_Format = 37841;\nconst SRGB8_ALPHA8_ASTC_5x5_Format = 37842;\nconst SRGB8_ALPHA8_ASTC_6x5_Format = 37843;\nconst SRGB8_ALPHA8_ASTC_6x6_Format = 37844;\nconst SRGB8_ALPHA8_ASTC_8x5_Format = 37845;\nconst SRGB8_ALPHA8_ASTC_8x6_Format = 37846;\nconst SRGB8_ALPHA8_ASTC_8x8_Format = 37847;\nconst SRGB8_ALPHA8_ASTC_10x5_Format = 37848;\nconst SRGB8_ALPHA8_ASTC_10x6_Format = 37849;\nconst SRGB8_ALPHA8_ASTC_10x8_Format = 37850;\nconst SRGB8_ALPHA8_ASTC_10x10_Format = 37851;\nconst SRGB8_ALPHA8_ASTC_12x10_Format = 37852;\nconst SRGB8_ALPHA8_ASTC_12x12_Format = 37853;\nconst LoopOnce = 2200;\nconst LoopRepeat = 2201;\nconst LoopPingPong = 2202;\nconst InterpolateDiscrete = 2300;\nconst InterpolateLinear = 2301;\nconst InterpolateSmooth = 2302;\nconst ZeroCurvatureEnding = 2400;\nconst ZeroSlopeEnding = 2401;\nconst WrapAroundEnding = 2402;\nconst NormalAnimationBlendMode = 2500;\nconst AdditiveAnimationBlendMode = 2501;\nconst TrianglesDrawMode = 0;\nconst TriangleStripDrawMode = 1;\nconst TriangleFanDrawMode = 2;\nconst LinearEncoding = 3000;\nconst sRGBEncoding = 3001;\nconst GammaEncoding = 3007;\nconst RGBEEncoding = 3002;\nconst LogLuvEncoding = 3003;\nconst RGBM7Encoding = 3004;\nconst RGBM16Encoding = 3005;\nconst RGBDEncoding = 3006;\nconst BasicDepthPacking = 3200;\nconst RGBADepthPacking = 3201;\nconst TangentSpaceNormalMap = 0;\nconst ObjectSpaceNormalMap = 1;\n\nconst ZeroStencilOp = 0;\nconst KeepStencilOp = 7680;\nconst ReplaceStencilOp = 7681;\nconst IncrementStencilOp = 7682;\nconst DecrementStencilOp = 7683;\nconst IncrementWrapStencilOp = 34055;\nconst DecrementWrapStencilOp = 34056;\nconst InvertStencilOp = 5386;\n\nconst NeverStencilFunc = 512;\nconst LessStencilFunc = 513;\nconst EqualStencilFunc = 514;\nconst LessEqualStencilFunc = 515;\nconst GreaterStencilFunc = 516;\nconst NotEqualStencilFunc = 517;\nconst GreaterEqualStencilFunc = 518;\nconst AlwaysStencilFunc = 519;\n\nconst StaticDrawUsage = 35044;\nconst DynamicDrawUsage = 35048;\nconst StreamDrawUsage = 35040;\nconst StaticReadUsage = 35045;\nconst DynamicReadUsage = 35049;\nconst StreamReadUsage = 35041;\nconst StaticCopyUsage = 35046;\nconst DynamicCopyUsage = 35050;\nconst StreamCopyUsage = 35042;\n\nconst GLSL1 = '100';\nconst GLSL3 = '300 es';\n\n/**\n * https://github.com/mrdoob/eventdispatcher.js/\n */\n\nclass EventDispatcher {\n\n\taddEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) this._listeners = {};\n\n\t\tconst listeners = this._listeners;\n\n\t\tif ( listeners[ type ] === undefined ) {\n\n\t\t\tlisteners[ type ] = [];\n\n\t\t}\n\n\t\tif ( listeners[ type ].indexOf( listener ) === - 1 ) {\n\n\t\t\tlisteners[ type ].push( listener );\n\n\t\t}\n\n\t}\n\n\thasEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) return false;\n\n\t\tconst listeners = this._listeners;\n\n\t\treturn listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1;\n\n\t}\n\n\tremoveEventListener( type, listener ) {\n\n\t\tif ( this._listeners === undefined ) return;\n\n\t\tconst listeners = this._listeners;\n\t\tconst listenerArray = listeners[ type ];\n\n\t\tif ( listenerArray !== undefined ) {\n\n\t\t\tconst index = listenerArray.indexOf( listener );\n\n\t\t\tif ( index !== - 1 ) {\n\n\t\t\t\tlistenerArray.splice( index, 1 );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tdispatchEvent( event ) {\n\n\t\tif ( this._listeners === undefined ) return;\n\n\t\tconst listeners = this._listeners;\n\t\tconst listenerArray = listeners[ event.type ];\n\n\t\tif ( listenerArray !== undefined ) {\n\n\t\t\tevent.target = this;\n\n\t\t\t// Make a copy, in case listeners are removed while iterating.\n\t\t\tconst array = listenerArray.slice( 0 );\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tarray[ i ].call( this, event );\n\n\t\t\t}\n\n\t\t\tevent.target = null;\n\n\t\t}\n\n\t}\n\n}\n\nconst _lut = [];\n\nfor ( let i = 0; i < 256; i ++ ) {\n\n\t_lut[ i ] = ( i < 16 ? '0' : '' ) + ( i ).toString( 16 );\n\n}\n\nlet _seed = 1234567;\n\n\nconst DEG2RAD = Math.PI / 180;\nconst RAD2DEG = 180 / Math.PI;\n\n// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\nfunction generateUUID() {\n\n\tconst d0 = Math.random() * 0xffffffff | 0;\n\tconst d1 = Math.random() * 0xffffffff | 0;\n\tconst d2 = Math.random() * 0xffffffff | 0;\n\tconst d3 = Math.random() * 0xffffffff | 0;\n\tconst uuid = _lut[ d0 & 0xff ] + _lut[ d0 >> 8 & 0xff ] + _lut[ d0 >> 16 & 0xff ] + _lut[ d0 >> 24 & 0xff ] + '-' +\n\t\t\t_lut[ d1 & 0xff ] + _lut[ d1 >> 8 & 0xff ] + '-' + _lut[ d1 >> 16 & 0x0f | 0x40 ] + _lut[ d1 >> 24 & 0xff ] + '-' +\n\t\t\t_lut[ d2 & 0x3f | 0x80 ] + _lut[ d2 >> 8 & 0xff ] + '-' + _lut[ d2 >> 16 & 0xff ] + _lut[ d2 >> 24 & 0xff ] +\n\t\t\t_lut[ d3 & 0xff ] + _lut[ d3 >> 8 & 0xff ] + _lut[ d3 >> 16 & 0xff ] + _lut[ d3 >> 24 & 0xff ];\n\n\t// .toUpperCase() here flattens concatenated strings to save heap memory space.\n\treturn uuid.toUpperCase();\n\n}\n\nfunction clamp( value, min, max ) {\n\n\treturn Math.max( min, Math.min( max, value ) );\n\n}\n\n// compute euclidian modulo of m % n\n// https://en.wikipedia.org/wiki/Modulo_operation\nfunction euclideanModulo( n, m ) {\n\n\treturn ( ( n % m ) + m ) % m;\n\n}\n\n// Linear mapping from range <a1, a2> to range <b1, b2>\nfunction mapLinear( x, a1, a2, b1, b2 ) {\n\n\treturn b1 + ( x - a1 ) * ( b2 - b1 ) / ( a2 - a1 );\n\n}\n\n// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/\nfunction inverseLerp( x, y, value ) {\n\n\tif ( x !== y ) {\n\n\t\treturn ( value - x ) / ( y - x );\n\n\t\t } else {\n\n\t\treturn 0;\n\n\t\t }\n\n}\n\n// https://en.wikipedia.org/wiki/Linear_interpolation\nfunction lerp( x, y, t ) {\n\n\treturn ( 1 - t ) * x + t * y;\n\n}\n\n// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/\nfunction damp( x, y, lambda, dt ) {\n\n\treturn lerp( x, y, 1 - Math.exp( - lambda * dt ) );\n\n}\n\n// https://www.desmos.com/calculator/vcsjnyz7x4\nfunction pingpong( x, length = 1 ) {\n\n\treturn length - Math.abs( euclideanModulo( x, length * 2 ) - length );\n\n}\n\n// http://en.wikipedia.org/wiki/Smoothstep\nfunction smoothstep( x, min, max ) {\n\n\tif ( x <= min ) return 0;\n\tif ( x >= max ) return 1;\n\n\tx = ( x - min ) / ( max - min );\n\n\treturn x * x * ( 3 - 2 * x );\n\n}\n\nfunction smootherstep( x, min, max ) {\n\n\tif ( x <= min ) return 0;\n\tif ( x >= max ) return 1;\n\n\tx = ( x - min ) / ( max - min );\n\n\treturn x * x * x * ( x * ( x * 6 - 15 ) + 10 );\n\n}\n\n// Random integer from <low, high> interval\nfunction randInt( low, high ) {\n\n\treturn low + Math.floor( Math.random() * ( high - low + 1 ) );\n\n}\n\n// Random float from <low, high> interval\nfunction randFloat( low, high ) {\n\n\treturn low + Math.random() * ( high - low );\n\n}\n\n// Random float from <-range/2, range/2> interval\nfunction randFloatSpread( range ) {\n\n\treturn range * ( 0.5 - Math.random() );\n\n}\n\n// Deterministic pseudo-random float in the interval [ 0, 1 ]\nfunction seededRandom( s ) {\n\n\tif ( s !== undefined ) _seed = s % 2147483647;\n\n\t// Park-Miller algorithm\n\n\t_seed = _seed * 16807 % 2147483647;\n\n\treturn ( _seed - 1 ) / 2147483646;\n\n}\n\nfunction degToRad( degrees ) {\n\n\treturn degrees * DEG2RAD;\n\n}\n\nfunction radToDeg( radians ) {\n\n\treturn radians * RAD2DEG;\n\n}\n\nfunction isPowerOfTwo( value ) {\n\n\treturn ( value & ( value - 1 ) ) === 0 && value !== 0;\n\n}\n\nfunction ceilPowerOfTwo( value ) {\n\n\treturn Math.pow( 2, Math.ceil( Math.log( value ) / Math.LN2 ) );\n\n}\n\nfunction floorPowerOfTwo( value ) {\n\n\treturn Math.pow( 2, Math.floor( Math.log( value ) / Math.LN2 ) );\n\n}\n\nfunction setQuaternionFromProperEuler( q, a, b, c, order ) {\n\n\t// Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles\n\n\t// rotations are applied to the axes in the order specified by 'order'\n\t// rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c'\n\t// angles are in radians\n\n\tconst cos = Math.cos;\n\tconst sin = Math.sin;\n\n\tconst c2 = cos( b / 2 );\n\tconst s2 = sin( b / 2 );\n\n\tconst c13 = cos( ( a + c ) / 2 );\n\tconst s13 = sin( ( a + c ) / 2 );\n\n\tconst c1_3 = cos( ( a - c ) / 2 );\n\tconst s1_3 = sin( ( a - c ) / 2 );\n\n\tconst c3_1 = cos( ( c - a ) / 2 );\n\tconst s3_1 = sin( ( c - a ) / 2 );\n\n\tswitch ( order ) {\n\n\t\tcase 'XYX':\n\t\t\tq.set( c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'YZY':\n\t\t\tq.set( s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'ZXZ':\n\t\t\tq.set( s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'XZX':\n\t\t\tq.set( c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'YXY':\n\t\t\tq.set( s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13 );\n\t\t\tbreak;\n\n\t\tcase 'ZYZ':\n\t\t\tq.set( s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13 );\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order );\n\n\t}\n\n}\n\nvar MathUtils = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tDEG2RAD: DEG2RAD,\n\tRAD2DEG: RAD2DEG,\n\tgenerateUUID: generateUUID,\n\tclamp: clamp,\n\teuclideanModulo: euclideanModulo,\n\tmapLinear: mapLinear,\n\tinverseLerp: inverseLerp,\n\tlerp: lerp,\n\tdamp: damp,\n\tpingpong: pingpong,\n\tsmoothstep: smoothstep,\n\tsmootherstep: smootherstep,\n\trandInt: randInt,\n\trandFloat: randFloat,\n\trandFloatSpread: randFloatSpread,\n\tseededRandom: seededRandom,\n\tdegToRad: degToRad,\n\tradToDeg: radToDeg,\n\tisPowerOfTwo: isPowerOfTwo,\n\tceilPowerOfTwo: ceilPowerOfTwo,\n\tfloorPowerOfTwo: floorPowerOfTwo,\n\tsetQuaternionFromProperEuler: setQuaternionFromProperEuler\n});\n\nclass Vector2 {\n\n\tconstructor( x = 0, y = 0 ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t}\n\n\tget width() {\n\n\t\treturn this.x;\n\n\t}\n\n\tset width( value ) {\n\n\t\tthis.x = value;\n\n\t}\n\n\tget height() {\n\n\t\treturn this.y;\n\n\t}\n\n\tset height( value ) {\n\n\t\tthis.y = value;\n\n\t}\n\n\tset( x, y ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );\n\t\t\treturn this.addVectors( v, w );\n\n\t\t}\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );\n\t\t\treturn this.subVectors( v, w );\n\n\t\t}\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tdivide( v ) {\n\n\t\tthis.x /= v.x;\n\t\tthis.y /= v.y;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst x = this.x, y = this.y;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ];\n\t\tthis.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ];\n\n\t\treturn this;\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y;\n\n\t}\n\n\tcross( v ) {\n\n\t\treturn this.x * v.y - this.y * v.x;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tangle() {\n\n\t\t// computes the angle in radians with respect to the positive x-axis\n\n\t\tconst angle = Math.atan2( - this.y, - this.x ) + Math.PI;\n\n\t\treturn angle;\n\n\t}\n\n\tdistanceTo( v ) {\n\n\t\treturn Math.sqrt( this.distanceToSquared( v ) );\n\n\t}\n\n\tdistanceToSquared( v ) {\n\n\t\tconst dx = this.x - v.x, dy = this.y - v.y;\n\t\treturn dx * dx + dy * dy;\n\n\t}\n\n\tmanhattanDistanceTo( v ) {\n\n\t\treturn Math.abs( this.x - v.x ) + Math.abs( this.y - v.y );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index, offset ) {\n\n\t\tif ( offset !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector2: offset has been removed from .fromBufferAttribute().' );\n\n\t\t}\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\n\t\treturn this;\n\n\t}\n\n\trotateAround( center, angle ) {\n\n\t\tconst c = Math.cos( angle ), s = Math.sin( angle );\n\n\t\tconst x = this.x - center.x;\n\t\tconst y = this.y - center.y;\n\n\t\tthis.x = x * c - y * s + center.x;\n\t\tthis.y = x * s + y * c + center.y;\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\n\t\treturn this;\n\n\t}\n\n}\n\nVector2.prototype.isVector2 = true;\n\nclass Matrix3 {\n\n\tconstructor() {\n\n\t\tthis.elements = [\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t];\n\n\t\tif ( arguments.length > 0 ) {\n\n\t\t\tconsole.error( 'THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.' );\n\n\t\t}\n\n\t}\n\n\tset( n11, n12, n13, n21, n22, n23, n31, n32, n33 ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] = n11; te[ 1 ] = n21; te[ 2 ] = n31;\n\t\tte[ 3 ] = n12; te[ 4 ] = n22; te[ 5 ] = n32;\n\t\tte[ 6 ] = n13; te[ 7 ] = n23; te[ 8 ] = n33;\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tcopy( m ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tte[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ];\n\t\tte[ 3 ] = me[ 3 ]; te[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ];\n\t\tte[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ]; te[ 8 ] = me[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\textractBasis( xAxis, yAxis, zAxis ) {\n\n\t\txAxis.setFromMatrix3Column( this, 0 );\n\t\tyAxis.setFromMatrix3Column( this, 1 );\n\t\tzAxis.setFromMatrix3Column( this, 2 );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrix4( m ) {\n\n\t\tconst me = m.elements;\n\n\t\tthis.set(\n\n\t\t\tme[ 0 ], me[ 4 ], me[ 8 ],\n\t\t\tme[ 1 ], me[ 5 ], me[ 9 ],\n\t\t\tme[ 2 ], me[ 6 ], me[ 10 ]\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( m ) {\n\n\t\treturn this.multiplyMatrices( this, m );\n\n\t}\n\n\tpremultiply( m ) {\n\n\t\treturn this.multiplyMatrices( m, this );\n\n\t}\n\n\tmultiplyMatrices( a, b ) {\n\n\t\tconst ae = a.elements;\n\t\tconst be = b.elements;\n\t\tconst te = this.elements;\n\n\t\tconst a11 = ae[ 0 ], a12 = ae[ 3 ], a13 = ae[ 6 ];\n\t\tconst a21 = ae[ 1 ], a22 = ae[ 4 ], a23 = ae[ 7 ];\n\t\tconst a31 = ae[ 2 ], a32 = ae[ 5 ], a33 = ae[ 8 ];\n\n\t\tconst b11 = be[ 0 ], b12 = be[ 3 ], b13 = be[ 6 ];\n\t\tconst b21 = be[ 1 ], b22 = be[ 4 ], b23 = be[ 7 ];\n\t\tconst b31 = be[ 2 ], b32 = be[ 5 ], b33 = be[ 8 ];\n\n\t\tte[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31;\n\t\tte[ 3 ] = a11 * b12 + a12 * b22 + a13 * b32;\n\t\tte[ 6 ] = a11 * b13 + a12 * b23 + a13 * b33;\n\n\t\tte[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31;\n\t\tte[ 4 ] = a21 * b12 + a22 * b22 + a23 * b32;\n\t\tte[ 7 ] = a21 * b13 + a22 * b23 + a23 * b33;\n\n\t\tte[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31;\n\t\tte[ 5 ] = a31 * b12 + a32 * b22 + a33 * b32;\n\t\tte[ 8 ] = a31 * b13 + a32 * b23 + a33 * b33;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= s; te[ 3 ] *= s; te[ 6 ] *= s;\n\t\tte[ 1 ] *= s; te[ 4 ] *= s; te[ 7 ] *= s;\n\t\tte[ 2 ] *= s; te[ 5 ] *= s; te[ 8 ] *= s;\n\n\t\treturn this;\n\n\t}\n\n\tdeterminant() {\n\n\t\tconst te = this.elements;\n\n\t\tconst a = te[ 0 ], b = te[ 1 ], c = te[ 2 ],\n\t\t\td = te[ 3 ], e = te[ 4 ], f = te[ 5 ],\n\t\t\tg = te[ 6 ], h = te[ 7 ], i = te[ 8 ];\n\n\t\treturn a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;\n\n\t}\n\n\tinvert() {\n\n\t\tconst te = this.elements,\n\n\t\t\tn11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ],\n\t\t\tn12 = te[ 3 ], n22 = te[ 4 ], n32 = te[ 5 ],\n\t\t\tn13 = te[ 6 ], n23 = te[ 7 ], n33 = te[ 8 ],\n\n\t\t\tt11 = n33 * n22 - n32 * n23,\n\t\t\tt12 = n32 * n13 - n33 * n12,\n\t\t\tt13 = n23 * n12 - n22 * n13,\n\n\t\t\tdet = n11 * t11 + n21 * t12 + n31 * t13;\n\n\t\tif ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0 );\n\n\t\tconst detInv = 1 / det;\n\n\t\tte[ 0 ] = t11 * detInv;\n\t\tte[ 1 ] = ( n31 * n23 - n33 * n21 ) * detInv;\n\t\tte[ 2 ] = ( n32 * n21 - n31 * n22 ) * detInv;\n\n\t\tte[ 3 ] = t12 * detInv;\n\t\tte[ 4 ] = ( n33 * n11 - n31 * n13 ) * detInv;\n\t\tte[ 5 ] = ( n31 * n12 - n32 * n11 ) * detInv;\n\n\t\tte[ 6 ] = t13 * detInv;\n\t\tte[ 7 ] = ( n21 * n13 - n23 * n11 ) * detInv;\n\t\tte[ 8 ] = ( n22 * n11 - n21 * n12 ) * detInv;\n\n\t\treturn this;\n\n\t}\n\n\ttranspose() {\n\n\t\tlet tmp;\n\t\tconst m = this.elements;\n\n\t\ttmp = m[ 1 ]; m[ 1 ] = m[ 3 ]; m[ 3 ] = tmp;\n\t\ttmp = m[ 2 ]; m[ 2 ] = m[ 6 ]; m[ 6 ] = tmp;\n\t\ttmp = m[ 5 ]; m[ 5 ] = m[ 7 ]; m[ 7 ] = tmp;\n\n\t\treturn this;\n\n\t}\n\n\tgetNormalMatrix( matrix4 ) {\n\n\t\treturn this.setFromMatrix4( matrix4 ).invert().transpose();\n\n\t}\n\n\ttransposeIntoArray( r ) {\n\n\t\tconst m = this.elements;\n\n\t\tr[ 0 ] = m[ 0 ];\n\t\tr[ 1 ] = m[ 3 ];\n\t\tr[ 2 ] = m[ 6 ];\n\t\tr[ 3 ] = m[ 1 ];\n\t\tr[ 4 ] = m[ 4 ];\n\t\tr[ 5 ] = m[ 7 ];\n\t\tr[ 6 ] = m[ 2 ];\n\t\tr[ 7 ] = m[ 5 ];\n\t\tr[ 8 ] = m[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetUvTransform( tx, ty, sx, sy, rotation, cx, cy ) {\n\n\t\tconst c = Math.cos( rotation );\n\t\tconst s = Math.sin( rotation );\n\n\t\tthis.set(\n\t\t\tsx * c, sx * s, - sx * ( c * cx + s * cy ) + cx + tx,\n\t\t\t- sy * s, sy * c, - sy * ( - s * cx + c * cy ) + cy + ty,\n\t\t\t0, 0, 1\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tscale( sx, sy ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= sx; te[ 3 ] *= sx; te[ 6 ] *= sx;\n\t\tte[ 1 ] *= sy; te[ 4 ] *= sy; te[ 7 ] *= sy;\n\n\t\treturn this;\n\n\t}\n\n\trotate( theta ) {\n\n\t\tconst c = Math.cos( theta );\n\t\tconst s = Math.sin( theta );\n\n\t\tconst te = this.elements;\n\n\t\tconst a11 = te[ 0 ], a12 = te[ 3 ], a13 = te[ 6 ];\n\t\tconst a21 = te[ 1 ], a22 = te[ 4 ], a23 = te[ 7 ];\n\n\t\tte[ 0 ] = c * a11 + s * a21;\n\t\tte[ 3 ] = c * a12 + s * a22;\n\t\tte[ 6 ] = c * a13 + s * a23;\n\n\t\tte[ 1 ] = - s * a11 + c * a21;\n\t\tte[ 4 ] = - s * a12 + c * a22;\n\t\tte[ 7 ] = - s * a13 + c * a23;\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( tx, ty ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] += tx * te[ 2 ]; te[ 3 ] += tx * te[ 5 ]; te[ 6 ] += tx * te[ 8 ];\n\t\tte[ 1 ] += ty * te[ 2 ]; te[ 4 ] += ty * te[ 5 ]; te[ 7 ] += ty * te[ 8 ];\n\n\t\treturn this;\n\n\t}\n\n\tequals( matrix ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = matrix.elements;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tif ( te[ i ] !== me[ i ] ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.elements[ i ] = array[ i + offset ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst te = this.elements;\n\n\t\tarray[ offset ] = te[ 0 ];\n\t\tarray[ offset + 1 ] = te[ 1 ];\n\t\tarray[ offset + 2 ] = te[ 2 ];\n\n\t\tarray[ offset + 3 ] = te[ 3 ];\n\t\tarray[ offset + 4 ] = te[ 4 ];\n\t\tarray[ offset + 5 ] = te[ 5 ];\n\n\t\tarray[ offset + 6 ] = te[ 6 ];\n\t\tarray[ offset + 7 ] = te[ 7 ];\n\t\tarray[ offset + 8 ] = te[ 8 ];\n\n\t\treturn array;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().fromArray( this.elements );\n\n\t}\n\n}\n\nMatrix3.prototype.isMatrix3 = true;\n\nlet _canvas;\n\nclass ImageUtils {\n\n\tstatic getDataURL( image ) {\n\n\t\tif ( /^data:/i.test( image.src ) ) {\n\n\t\t\treturn image.src;\n\n\t\t}\n\n\t\tif ( typeof HTMLCanvasElement == 'undefined' ) {\n\n\t\t\treturn image.src;\n\n\t\t}\n\n\t\tlet canvas;\n\n\t\tif ( image instanceof HTMLCanvasElement ) {\n\n\t\t\tcanvas = image;\n\n\t\t} else {\n\n\t\t\tif ( _canvas === undefined ) _canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );\n\n\t\t\t_canvas.width = image.width;\n\t\t\t_canvas.height = image.height;\n\n\t\t\tconst context = _canvas.getContext( '2d' );\n\n\t\t\tif ( image instanceof ImageData ) {\n\n\t\t\t\tcontext.putImageData( image, 0, 0 );\n\n\t\t\t} else {\n\n\t\t\t\tcontext.drawImage( image, 0, 0, image.width, image.height );\n\n\t\t\t}\n\n\t\t\tcanvas = _canvas;\n\n\t\t}\n\n\t\tif ( canvas.width > 2048 || canvas.height > 2048 ) {\n\n\t\t\tconsole.warn( 'THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons', image );\n\n\t\t\treturn canvas.toDataURL( 'image/jpeg', 0.6 );\n\n\t\t} else {\n\n\t\t\treturn canvas.toDataURL( 'image/png' );\n\n\t\t}\n\n\t}\n\n}\n\nlet textureId = 0;\n\nclass Texture extends EventDispatcher {\n\n\tconstructor( image = Texture.DEFAULT_IMAGE, mapping = Texture.DEFAULT_MAPPING, wrapS = ClampToEdgeWrapping, wrapT = ClampToEdgeWrapping, magFilter = LinearFilter, minFilter = LinearMipmapLinearFilter, format = RGBAFormat, type = UnsignedByteType, anisotropy = 1, encoding = LinearEncoding ) {\n\n\t\tsuper();\n\n\t\tObject.defineProperty( this, 'id', { value: textureId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\n\t\tthis.image = image;\n\t\tthis.mipmaps = [];\n\n\t\tthis.mapping = mapping;\n\n\t\tthis.wrapS = wrapS;\n\t\tthis.wrapT = wrapT;\n\n\t\tthis.magFilter = magFilter;\n\t\tthis.minFilter = minFilter;\n\n\t\tthis.anisotropy = anisotropy;\n\n\t\tthis.format = format;\n\t\tthis.internalFormat = null;\n\t\tthis.type = type;\n\n\t\tthis.offset = new Vector2( 0, 0 );\n\t\tthis.repeat = new Vector2( 1, 1 );\n\t\tthis.center = new Vector2( 0, 0 );\n\t\tthis.rotation = 0;\n\n\t\tthis.matrixAutoUpdate = true;\n\t\tthis.matrix = new Matrix3();\n\n\t\tthis.generateMipmaps = true;\n\t\tthis.premultiplyAlpha = false;\n\t\tthis.flipY = true;\n\t\tthis.unpackAlignment = 4;\t// valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)\n\n\t\t// Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap.\n\t\t//\n\t\t// Also changing the encoding after already used by a Material will not automatically make the Material\n\t\t// update. You need to explicitly call Material.needsUpdate to trigger it to recompile.\n\t\tthis.encoding = encoding;\n\n\t\tthis.version = 0;\n\t\tthis.onUpdate = null;\n\n\t}\n\n\tupdateMatrix() {\n\n\t\tthis.matrix.setUvTransform( this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.image = source.image;\n\t\tthis.mipmaps = source.mipmaps.slice( 0 );\n\n\t\tthis.mapping = source.mapping;\n\n\t\tthis.wrapS = source.wrapS;\n\t\tthis.wrapT = source.wrapT;\n\n\t\tthis.magFilter = source.magFilter;\n\t\tthis.minFilter = source.minFilter;\n\n\t\tthis.anisotropy = source.anisotropy;\n\n\t\tthis.format = source.format;\n\t\tthis.internalFormat = source.internalFormat;\n\t\tthis.type = source.type;\n\n\t\tthis.offset.copy( source.offset );\n\t\tthis.repeat.copy( source.repeat );\n\t\tthis.center.copy( source.center );\n\t\tthis.rotation = source.rotation;\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\tthis.matrix.copy( source.matrix );\n\n\t\tthis.generateMipmaps = source.generateMipmaps;\n\t\tthis.premultiplyAlpha = source.premultiplyAlpha;\n\t\tthis.flipY = source.flipY;\n\t\tthis.unpackAlignment = source.unpackAlignment;\n\t\tthis.encoding = source.encoding;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( ! isRootObject && meta.textures[ this.uuid ] !== undefined ) {\n\n\t\t\treturn meta.textures[ this.uuid ];\n\n\t\t}\n\n\t\tconst output = {\n\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Texture',\n\t\t\t\tgenerator: 'Texture.toJSON'\n\t\t\t},\n\n\t\t\tuuid: this.uuid,\n\t\t\tname: this.name,\n\n\t\t\tmapping: this.mapping,\n\n\t\t\trepeat: [ this.repeat.x, this.repeat.y ],\n\t\t\toffset: [ this.offset.x, this.offset.y ],\n\t\t\tcenter: [ this.center.x, this.center.y ],\n\t\t\trotation: this.rotation,\n\n\t\t\twrap: [ this.wrapS, this.wrapT ],\n\n\t\t\tformat: this.format,\n\t\t\ttype: this.type,\n\t\t\tencoding: this.encoding,\n\n\t\t\tminFilter: this.minFilter,\n\t\t\tmagFilter: this.magFilter,\n\t\t\tanisotropy: this.anisotropy,\n\n\t\t\tflipY: this.flipY,\n\n\t\t\tpremultiplyAlpha: this.premultiplyAlpha,\n\t\t\tunpackAlignment: this.unpackAlignment\n\n\t\t};\n\n\t\tif ( this.image !== undefined ) {\n\n\t\t\t// TODO: Move to THREE.Image\n\n\t\t\tconst image = this.image;\n\n\t\t\tif ( image.uuid === undefined ) {\n\n\t\t\t\timage.uuid = generateUUID(); // UGH\n\n\t\t\t}\n\n\t\t\tif ( ! isRootObject && meta.images[ image.uuid ] === undefined ) {\n\n\t\t\t\tlet url;\n\n\t\t\t\tif ( Array.isArray( image ) ) {\n\n\t\t\t\t\t// process array of images e.g. CubeTexture\n\n\t\t\t\t\turl = [];\n\n\t\t\t\t\tfor ( let i = 0, l = image.length; i < l; i ++ ) {\n\n\t\t\t\t\t\t// check cube texture with data textures\n\n\t\t\t\t\t\tif ( image[ i ].isDataTexture ) {\n\n\t\t\t\t\t\t\turl.push( serializeImage( image[ i ].image ) );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\turl.push( serializeImage( image[ i ] ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// process single image\n\n\t\t\t\t\turl = serializeImage( image );\n\n\t\t\t\t}\n\n\t\t\t\tmeta.images[ image.uuid ] = {\n\t\t\t\t\tuuid: image.uuid,\n\t\t\t\t\turl: url\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t\toutput.image = image.uuid;\n\n\t\t}\n\n\t\tif ( ! isRootObject ) {\n\n\t\t\tmeta.textures[ this.uuid ] = output;\n\n\t\t}\n\n\t\treturn output;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n\ttransformUv( uv ) {\n\n\t\tif ( this.mapping !== UVMapping ) return uv;\n\n\t\tuv.applyMatrix3( this.matrix );\n\n\t\tif ( uv.x < 0 || uv.x > 1 ) {\n\n\t\t\tswitch ( this.wrapS ) {\n\n\t\t\t\tcase RepeatWrapping:\n\n\t\t\t\t\tuv.x = uv.x - Math.floor( uv.x );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ClampToEdgeWrapping:\n\n\t\t\t\t\tuv.x = uv.x < 0 ? 0 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MirroredRepeatWrapping:\n\n\t\t\t\t\tif ( Math.abs( Math.floor( uv.x ) % 2 ) === 1 ) {\n\n\t\t\t\t\t\tuv.x = Math.ceil( uv.x ) - uv.x;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tuv.x = uv.x - Math.floor( uv.x );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( uv.y < 0 || uv.y > 1 ) {\n\n\t\t\tswitch ( this.wrapT ) {\n\n\t\t\t\tcase RepeatWrapping:\n\n\t\t\t\t\tuv.y = uv.y - Math.floor( uv.y );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ClampToEdgeWrapping:\n\n\t\t\t\t\tuv.y = uv.y < 0 ? 0 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MirroredRepeatWrapping:\n\n\t\t\t\t\tif ( Math.abs( Math.floor( uv.y ) % 2 ) === 1 ) {\n\n\t\t\t\t\t\tuv.y = Math.ceil( uv.y ) - uv.y;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tuv.y = uv.y - Math.floor( uv.y );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.flipY ) {\n\n\t\t\tuv.y = 1 - uv.y;\n\n\t\t}\n\n\t\treturn uv;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n}\n\nTexture.DEFAULT_IMAGE = undefined;\nTexture.DEFAULT_MAPPING = UVMapping;\n\nTexture.prototype.isTexture = true;\n\nfunction serializeImage( image ) {\n\n\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t// default images\n\n\t\treturn ImageUtils.getDataURL( image );\n\n\t} else {\n\n\t\tif ( image.data ) {\n\n\t\t\t// images of DataTexture\n\n\t\t\treturn {\n\t\t\t\tdata: Array.prototype.slice.call( image.data ),\n\t\t\t\twidth: image.width,\n\t\t\t\theight: image.height,\n\t\t\t\ttype: image.data.constructor.name\n\t\t\t};\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.Texture: Unable to serialize Texture.' );\n\t\t\treturn {};\n\n\t\t}\n\n\t}\n\n}\n\nclass Vector4 {\n\n\tconstructor( x = 0, y = 0, z = 0, w = 1 ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\tthis.w = w;\n\n\t}\n\n\tget width() {\n\n\t\treturn this.z;\n\n\t}\n\n\tset width( value ) {\n\n\t\tthis.z = value;\n\n\t}\n\n\tget height() {\n\n\t\treturn this.w;\n\n\t}\n\n\tset height( value ) {\n\n\t\tthis.w = value;\n\n\t}\n\n\tset( x, y, z, w ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\t\tthis.w = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\t\tthis.z = scalar;\n\t\tthis.w = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( z ) {\n\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetW( w ) {\n\n\t\tthis.w = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tcase 2: this.z = value; break;\n\t\t\tcase 3: this.w = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tcase 2: return this.z;\n\t\t\tcase 3: return this.w;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y, this.z, this.w );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\t\tthis.z = v.z;\n\t\tthis.w = ( v.w !== undefined ) ? v.w : 1;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );\n\t\t\treturn this.addVectors( v, w );\n\n\t\t}\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\t\tthis.z += v.z;\n\t\tthis.w += v.w;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\t\tthis.z += s;\n\t\tthis.w += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\t\tthis.z = a.z + b.z;\n\t\tthis.w = a.w + b.w;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\t\tthis.z += v.z * s;\n\t\tthis.w += v.w * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );\n\t\t\treturn this.subVectors( v, w );\n\n\t\t}\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\t\tthis.z -= v.z;\n\t\tthis.w -= v.w;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\t\tthis.z -= s;\n\t\tthis.w -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\t\tthis.z = a.z - b.z;\n\t\tthis.w = a.w - b.w;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v ) {\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\t\tthis.z *= v.z;\n\t\tthis.w *= v.w;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\t\tthis.z *= scalar;\n\t\tthis.w *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z, w = this.w;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] * w;\n\t\tthis.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] * w;\n\t\tthis.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] * w;\n\t\tthis.w = e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] * w;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tsetAxisAngleFromQuaternion( q ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm\n\n\t\t// q is assumed to be normalized\n\n\t\tthis.w = 2 * Math.acos( q.w );\n\n\t\tconst s = Math.sqrt( 1 - q.w * q.w );\n\n\t\tif ( s < 0.0001 ) {\n\n\t\t\tthis.x = 1;\n\t\t\tthis.y = 0;\n\t\t\tthis.z = 0;\n\n\t\t} else {\n\n\t\t\tthis.x = q.x / s;\n\t\t\tthis.y = q.y / s;\n\t\t\tthis.z = q.z / s;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetAxisAngleFromRotationMatrix( m ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tlet angle, x, y, z; // variables for result\n\t\tconst epsilon = 0.01,\t\t// margin to allow for rounding errors\n\t\t\tepsilon2 = 0.1,\t\t// margin to distinguish between 0 and 180 degrees\n\n\t\t\tte = m.elements,\n\n\t\t\tm11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ],\n\t\t\tm21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],\n\t\t\tm31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];\n\n\t\tif ( ( Math.abs( m12 - m21 ) < epsilon ) &&\n\t\t ( Math.abs( m13 - m31 ) < epsilon ) &&\n\t\t ( Math.abs( m23 - m32 ) < epsilon ) ) {\n\n\t\t\t// singularity found\n\t\t\t// first check for identity matrix which must have +1 for all terms\n\t\t\t// in leading diagonal and zero in other terms\n\n\t\t\tif ( ( Math.abs( m12 + m21 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m13 + m31 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m23 + m32 ) < epsilon2 ) &&\n\t\t\t ( Math.abs( m11 + m22 + m33 - 3 ) < epsilon2 ) ) {\n\n\t\t\t\t// this singularity is identity matrix so angle = 0\n\n\t\t\t\tthis.set( 1, 0, 0, 0 );\n\n\t\t\t\treturn this; // zero angle, arbitrary axis\n\n\t\t\t}\n\n\t\t\t// otherwise this singularity is angle = 180\n\n\t\t\tangle = Math.PI;\n\n\t\t\tconst xx = ( m11 + 1 ) / 2;\n\t\t\tconst yy = ( m22 + 1 ) / 2;\n\t\t\tconst zz = ( m33 + 1 ) / 2;\n\t\t\tconst xy = ( m12 + m21 ) / 4;\n\t\t\tconst xz = ( m13 + m31 ) / 4;\n\t\t\tconst yz = ( m23 + m32 ) / 4;\n\n\t\t\tif ( ( xx > yy ) && ( xx > zz ) ) {\n\n\t\t\t\t// m11 is the largest diagonal term\n\n\t\t\t\tif ( xx < epsilon ) {\n\n\t\t\t\t\tx = 0;\n\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\tz = 0.707106781;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tx = Math.sqrt( xx );\n\t\t\t\t\ty = xy / x;\n\t\t\t\t\tz = xz / x;\n\n\t\t\t\t}\n\n\t\t\t} else if ( yy > zz ) {\n\n\t\t\t\t// m22 is the largest diagonal term\n\n\t\t\t\tif ( yy < epsilon ) {\n\n\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\ty = 0;\n\t\t\t\t\tz = 0.707106781;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ty = Math.sqrt( yy );\n\t\t\t\t\tx = xy / y;\n\t\t\t\t\tz = yz / y;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// m33 is the largest diagonal term so base result on this\n\n\t\t\t\tif ( zz < epsilon ) {\n\n\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\tz = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tz = Math.sqrt( zz );\n\t\t\t\t\tx = xz / z;\n\t\t\t\t\ty = yz / z;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.set( x, y, z, angle );\n\n\t\t\treturn this; // return 180 deg rotation\n\n\t\t}\n\n\t\t// as we have reached here there are no singularities so we can handle normally\n\n\t\tlet s = Math.sqrt( ( m32 - m23 ) * ( m32 - m23 ) +\n\t\t\t( m13 - m31 ) * ( m13 - m31 ) +\n\t\t\t( m21 - m12 ) * ( m21 - m12 ) ); // used to normalize\n\n\t\tif ( Math.abs( s ) < 0.001 ) s = 1;\n\n\t\t// prevent divide by zero, should not happen if matrix is orthogonal and should be\n\t\t// caught by singularity test above, but I've left it in just in case\n\n\t\tthis.x = ( m32 - m23 ) / s;\n\t\tthis.y = ( m13 - m31 ) / s;\n\t\tthis.z = ( m21 - m12 ) / s;\n\t\tthis.w = Math.acos( ( m11 + m22 + m33 - 1 ) / 2 );\n\n\t\treturn this;\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\t\tthis.z = Math.min( this.z, v.z );\n\t\tthis.w = Math.min( this.w, v.w );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\t\tthis.z = Math.max( this.z, v.z );\n\t\tthis.w = Math.max( this.w, v.w );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\t\tthis.z = Math.max( min.z, Math.min( max.z, this.z ) );\n\t\tthis.w = Math.max( min.w, Math.min( max.w, this.w ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\t\tthis.z = Math.max( minVal, Math.min( maxVal, this.z ) );\n\t\tthis.w = Math.max( minVal, Math.min( maxVal, this.w ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\t\tthis.z = Math.floor( this.z );\n\t\tthis.w = Math.floor( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\t\tthis.z = Math.ceil( this.z );\n\t\tthis.w = Math.ceil( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\t\tthis.z = Math.round( this.z );\n\t\tthis.w = Math.round( this.w );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\t\tthis.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z );\n\t\tthis.w = ( this.w < 0 ) ? Math.ceil( this.w ) : Math.floor( this.w );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\t\tthis.z = - this.z;\n\t\tthis.w = - this.w;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z ) + Math.abs( this.w );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\t\tthis.z += ( v.z - this.z ) * alpha;\n\t\tthis.w += ( v.w - this.w ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\t\tthis.z = v1.z + ( v2.z - v1.z ) * alpha;\n\t\tthis.w = v1.w + ( v2.w - v1.w ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) && ( v.w === this.w ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\t\tthis.z = array[ offset + 2 ];\n\t\tthis.w = array[ offset + 3 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\t\tarray[ offset + 2 ] = this.z;\n\t\tarray[ offset + 3 ] = this.w;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index, offset ) {\n\n\t\tif ( offset !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector4: offset has been removed from .fromBufferAttribute().' );\n\n\t\t}\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\t\tthis.z = attribute.getZ( index );\n\t\tthis.w = attribute.getW( index );\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\t\tthis.z = Math.random();\n\t\tthis.w = Math.random();\n\n\t\treturn this;\n\n\t}\n\n}\n\nVector4.prototype.isVector4 = true;\n\n/*\n In options, we can specify:\n * Texture parameters for an auto-generated target texture\n * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers\n*/\nclass WebGLRenderTarget extends EventDispatcher {\n\n\tconstructor( width, height, options = {} ) {\n\n\t\tsuper();\n\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t\tthis.depth = 1;\n\n\t\tthis.scissor = new Vector4( 0, 0, width, height );\n\t\tthis.scissorTest = false;\n\n\t\tthis.viewport = new Vector4( 0, 0, width, height );\n\n\t\tthis.texture = new Texture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );\n\n\t\tthis.texture.image = { width: width, height: height, depth: 1 };\n\n\t\tthis.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\tthis.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\n\t\tthis.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;\n\t\tthis.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false;\n\t\tthis.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;\n\n\t}\n\n\tsetTexture( texture ) {\n\n\t\ttexture.image = {\n\t\t\twidth: this.width,\n\t\t\theight: this.height,\n\t\t\tdepth: this.depth\n\t\t};\n\n\t\tthis.texture = texture;\n\n\t}\n\n\tsetSize( width, height, depth = 1 ) {\n\n\t\tif ( this.width !== width || this.height !== height || this.depth !== depth ) {\n\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.depth = depth;\n\n\t\t\tthis.texture.image.width = width;\n\t\t\tthis.texture.image.height = height;\n\t\t\tthis.texture.image.depth = depth;\n\n\t\t\tthis.dispose();\n\n\t\t}\n\n\t\tthis.viewport.set( 0, 0, width, height );\n\t\tthis.scissor.set( 0, 0, width, height );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\t\tthis.depth = source.depth;\n\n\t\tthis.viewport.copy( source.viewport );\n\n\t\tthis.texture = source.texture.clone();\n\t\tthis.texture.image = { ...this.texture.image }; // See #20328.\n\n\t\tthis.depthBuffer = source.depthBuffer;\n\t\tthis.stencilBuffer = source.stencilBuffer;\n\t\tthis.depthTexture = source.depthTexture;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nWebGLRenderTarget.prototype.isWebGLRenderTarget = true;\n\nclass WebGLMultipleRenderTargets extends WebGLRenderTarget {\n\n\tconstructor( width, height, count ) {\n\n\t\tsuper( width, height );\n\n\t\tconst texture = this.texture;\n\n\t\tthis.texture = [];\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tthis.texture[ i ] = texture.clone();\n\n\t\t}\n\n\t}\n\n\tsetSize( width, height, depth = 1 ) {\n\n\t\tif ( this.width !== width || this.height !== height || this.depth !== depth ) {\n\n\t\t\tthis.width = width;\n\t\t\tthis.height = height;\n\t\t\tthis.depth = depth;\n\n\t\t\tfor ( let i = 0, il = this.texture.length; i < il; i ++ ) {\n\n\t\t\t\tthis.texture[ i ].image.width = width;\n\t\t\t\tthis.texture[ i ].image.height = height;\n\t\t\t\tthis.texture[ i ].image.depth = depth;\n\n\t\t\t}\n\n\t\t\tthis.dispose();\n\n\t\t}\n\n\t\tthis.viewport.set( 0, 0, width, height );\n\t\tthis.scissor.set( 0, 0, width, height );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.dispose();\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\t\tthis.depth = source.depth;\n\n\t\tthis.viewport.set( 0, 0, this.width, this.height );\n\t\tthis.scissor.set( 0, 0, this.width, this.height );\n\n\t\tthis.depthBuffer = source.depthBuffer;\n\t\tthis.stencilBuffer = source.stencilBuffer;\n\t\tthis.depthTexture = source.depthTexture;\n\n\t\tthis.texture.length = 0;\n\n\t\tfor ( let i = 0, il = source.texture.length; i < il; i ++ ) {\n\n\t\t\tthis.texture[ i ] = source.texture[ i ].clone();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nWebGLMultipleRenderTargets.prototype.isWebGLMultipleRenderTargets = true;\n\nclass WebGLMultisampleRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( width, height, options ) {\n\n\t\tsuper( width, height, options );\n\n\t\tthis.samples = 4;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy.call( this, source );\n\n\t\tthis.samples = source.samples;\n\n\t\treturn this;\n\n\t}\n\n}\n\nWebGLMultisampleRenderTarget.prototype.isWebGLMultisampleRenderTarget = true;\n\nclass Quaternion {\n\n\tconstructor( x = 0, y = 0, z = 0, w = 1 ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._w = w;\n\n\t}\n\n\tstatic slerp( qa, qb, qm, t ) {\n\n\t\tconsole.warn( 'THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead.' );\n\t\treturn qm.slerpQuaternions( qa, qb, t );\n\n\t}\n\n\tstatic slerpFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t ) {\n\n\t\t// fuzz-free, array-based Quaternion SLERP operation\n\n\t\tlet x0 = src0[ srcOffset0 + 0 ],\n\t\t\ty0 = src0[ srcOffset0 + 1 ],\n\t\t\tz0 = src0[ srcOffset0 + 2 ],\n\t\t\tw0 = src0[ srcOffset0 + 3 ];\n\n\t\tconst x1 = src1[ srcOffset1 + 0 ],\n\t\t\ty1 = src1[ srcOffset1 + 1 ],\n\t\t\tz1 = src1[ srcOffset1 + 2 ],\n\t\t\tw1 = src1[ srcOffset1 + 3 ];\n\n\t\tif ( t === 0 ) {\n\n\t\t\tdst[ dstOffset + 0 ] = x0;\n\t\t\tdst[ dstOffset + 1 ] = y0;\n\t\t\tdst[ dstOffset + 2 ] = z0;\n\t\t\tdst[ dstOffset + 3 ] = w0;\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( t === 1 ) {\n\n\t\t\tdst[ dstOffset + 0 ] = x1;\n\t\t\tdst[ dstOffset + 1 ] = y1;\n\t\t\tdst[ dstOffset + 2 ] = z1;\n\t\t\tdst[ dstOffset + 3 ] = w1;\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1 ) {\n\n\t\t\tlet s = 1 - t;\n\t\t\tconst cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,\n\t\t\t\tdir = ( cos >= 0 ? 1 : - 1 ),\n\t\t\t\tsqrSin = 1 - cos * cos;\n\n\t\t\t// Skip the Slerp for tiny steps to avoid numeric problems:\n\t\t\tif ( sqrSin > Number.EPSILON ) {\n\n\t\t\t\tconst sin = Math.sqrt( sqrSin ),\n\t\t\t\t\tlen = Math.atan2( sin, cos * dir );\n\n\t\t\t\ts = Math.sin( s * len ) / sin;\n\t\t\t\tt = Math.sin( t * len ) / sin;\n\n\t\t\t}\n\n\t\t\tconst tDir = t * dir;\n\n\t\t\tx0 = x0 * s + x1 * tDir;\n\t\t\ty0 = y0 * s + y1 * tDir;\n\t\t\tz0 = z0 * s + z1 * tDir;\n\t\t\tw0 = w0 * s + w1 * tDir;\n\n\t\t\t// Normalize in case we just did a lerp:\n\t\t\tif ( s === 1 - t ) {\n\n\t\t\t\tconst f = 1 / Math.sqrt( x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0 );\n\n\t\t\t\tx0 *= f;\n\t\t\t\ty0 *= f;\n\t\t\t\tz0 *= f;\n\t\t\t\tw0 *= f;\n\n\t\t\t}\n\n\t\t}\n\n\t\tdst[ dstOffset ] = x0;\n\t\tdst[ dstOffset + 1 ] = y0;\n\t\tdst[ dstOffset + 2 ] = z0;\n\t\tdst[ dstOffset + 3 ] = w0;\n\n\t}\n\n\tstatic multiplyQuaternionsFlat( dst, dstOffset, src0, srcOffset0, src1, srcOffset1 ) {\n\n\t\tconst x0 = src0[ srcOffset0 ];\n\t\tconst y0 = src0[ srcOffset0 + 1 ];\n\t\tconst z0 = src0[ srcOffset0 + 2 ];\n\t\tconst w0 = src0[ srcOffset0 + 3 ];\n\n\t\tconst x1 = src1[ srcOffset1 ];\n\t\tconst y1 = src1[ srcOffset1 + 1 ];\n\t\tconst z1 = src1[ srcOffset1 + 2 ];\n\t\tconst w1 = src1[ srcOffset1 + 3 ];\n\n\t\tdst[ dstOffset ] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1;\n\t\tdst[ dstOffset + 1 ] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1;\n\t\tdst[ dstOffset + 2 ] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1;\n\t\tdst[ dstOffset + 3 ] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1;\n\n\t\treturn dst;\n\n\t}\n\n\tget x() {\n\n\t\treturn this._x;\n\n\t}\n\n\tset x( value ) {\n\n\t\tthis._x = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget y() {\n\n\t\treturn this._y;\n\n\t}\n\n\tset y( value ) {\n\n\t\tthis._y = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget z() {\n\n\t\treturn this._z;\n\n\t}\n\n\tset z( value ) {\n\n\t\tthis._z = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget w() {\n\n\t\treturn this._w;\n\n\t}\n\n\tset w( value ) {\n\n\t\tthis._w = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tset( x, y, z, w ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._w = w;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this._x, this._y, this._z, this._w );\n\n\t}\n\n\tcopy( quaternion ) {\n\n\t\tthis._x = quaternion.x;\n\t\tthis._y = quaternion.y;\n\t\tthis._z = quaternion.z;\n\t\tthis._w = quaternion.w;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromEuler( euler, update ) {\n\n\t\tif ( ! ( euler && euler.isEuler ) ) {\n\n\t\t\tthrow new Error( 'THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.' );\n\n\t\t}\n\n\t\tconst x = euler._x, y = euler._y, z = euler._z, order = euler._order;\n\n\t\t// http://www.mathworks.com/matlabcentral/fileexchange/\n\t\t// \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n\t\t//\tcontent/SpinCalc.m\n\n\t\tconst cos = Math.cos;\n\t\tconst sin = Math.sin;\n\n\t\tconst c1 = cos( x / 2 );\n\t\tconst c2 = cos( y / 2 );\n\t\tconst c3 = cos( z / 2 );\n\n\t\tconst s1 = sin( x / 2 );\n\t\tconst s2 = sin( y / 2 );\n\t\tconst s3 = sin( z / 2 );\n\n\t\tswitch ( order ) {\n\n\t\t\tcase 'XYZ':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'YXZ':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZXY':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZYX':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'YZX':\n\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tcase 'XZY':\n\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn( 'THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order );\n\n\t\t}\n\n\t\tif ( update !== false ) this._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromAxisAngle( axis, angle ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm\n\n\t\t// assumes axis is normalized\n\n\t\tconst halfAngle = angle / 2, s = Math.sin( halfAngle );\n\n\t\tthis._x = axis.x * s;\n\t\tthis._y = axis.y * s;\n\t\tthis._z = axis.z * s;\n\t\tthis._w = Math.cos( halfAngle );\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromRotationMatrix( m ) {\n\n\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tconst te = m.elements,\n\n\t\t\tm11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ],\n\t\t\tm21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ],\n\t\t\tm31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ],\n\n\t\t\ttrace = m11 + m22 + m33;\n\n\t\tif ( trace > 0 ) {\n\n\t\t\tconst s = 0.5 / Math.sqrt( trace + 1.0 );\n\n\t\t\tthis._w = 0.25 / s;\n\t\t\tthis._x = ( m32 - m23 ) * s;\n\t\t\tthis._y = ( m13 - m31 ) * s;\n\t\t\tthis._z = ( m21 - m12 ) * s;\n\n\t\t} else if ( m11 > m22 && m11 > m33 ) {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m11 - m22 - m33 );\n\n\t\t\tthis._w = ( m32 - m23 ) / s;\n\t\t\tthis._x = 0.25 * s;\n\t\t\tthis._y = ( m12 + m21 ) / s;\n\t\t\tthis._z = ( m13 + m31 ) / s;\n\n\t\t} else if ( m22 > m33 ) {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m22 - m11 - m33 );\n\n\t\t\tthis._w = ( m13 - m31 ) / s;\n\t\t\tthis._x = ( m12 + m21 ) / s;\n\t\t\tthis._y = 0.25 * s;\n\t\t\tthis._z = ( m23 + m32 ) / s;\n\n\t\t} else {\n\n\t\t\tconst s = 2.0 * Math.sqrt( 1.0 + m33 - m11 - m22 );\n\n\t\t\tthis._w = ( m21 - m12 ) / s;\n\t\t\tthis._x = ( m13 + m31 ) / s;\n\t\t\tthis._y = ( m23 + m32 ) / s;\n\t\t\tthis._z = 0.25 * s;\n\n\t\t}\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromUnitVectors( vFrom, vTo ) {\n\n\t\t// assumes direction vectors vFrom and vTo are normalized\n\n\t\tlet r = vFrom.dot( vTo ) + 1;\n\n\t\tif ( r < Number.EPSILON ) {\n\n\t\t\t// vFrom and vTo point in opposite directions\n\n\t\t\tr = 0;\n\n\t\t\tif ( Math.abs( vFrom.x ) > Math.abs( vFrom.z ) ) {\n\n\t\t\t\tthis._x = - vFrom.y;\n\t\t\t\tthis._y = vFrom.x;\n\t\t\t\tthis._z = 0;\n\t\t\t\tthis._w = r;\n\n\t\t\t} else {\n\n\t\t\t\tthis._x = 0;\n\t\t\t\tthis._y = - vFrom.z;\n\t\t\t\tthis._z = vFrom.y;\n\t\t\t\tthis._w = r;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3\n\n\t\t\tthis._x = vFrom.y * vTo.z - vFrom.z * vTo.y;\n\t\t\tthis._y = vFrom.z * vTo.x - vFrom.x * vTo.z;\n\t\t\tthis._z = vFrom.x * vTo.y - vFrom.y * vTo.x;\n\t\t\tthis._w = r;\n\n\t\t}\n\n\t\treturn this.normalize();\n\n\t}\n\n\tangleTo( q ) {\n\n\t\treturn 2 * Math.acos( Math.abs( clamp( this.dot( q ), - 1, 1 ) ) );\n\n\t}\n\n\trotateTowards( q, step ) {\n\n\t\tconst angle = this.angleTo( q );\n\n\t\tif ( angle === 0 ) return this;\n\n\t\tconst t = Math.min( 1, step / angle );\n\n\t\tthis.slerp( q, t );\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\treturn this.set( 0, 0, 0, 1 );\n\n\t}\n\n\tinvert() {\n\n\t\t// quaternion is assumed to have unit length\n\n\t\treturn this.conjugate();\n\n\t}\n\n\tconjugate() {\n\n\t\tthis._x *= - 1;\n\t\tthis._y *= - 1;\n\t\tthis._z *= - 1;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;\n\n\t}\n\n\tlengthSq() {\n\n\t\treturn this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w );\n\n\t}\n\n\tnormalize() {\n\n\t\tlet l = this.length();\n\n\t\tif ( l === 0 ) {\n\n\t\t\tthis._x = 0;\n\t\t\tthis._y = 0;\n\t\t\tthis._z = 0;\n\t\t\tthis._w = 1;\n\n\t\t} else {\n\n\t\t\tl = 1 / l;\n\n\t\t\tthis._x = this._x * l;\n\t\t\tthis._y = this._y * l;\n\t\t\tthis._z = this._z * l;\n\t\t\tthis._w = this._w * l;\n\n\t\t}\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( q, p ) {\n\n\t\tif ( p !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.' );\n\t\t\treturn this.multiplyQuaternions( q, p );\n\n\t\t}\n\n\t\treturn this.multiplyQuaternions( this, q );\n\n\t}\n\n\tpremultiply( q ) {\n\n\t\treturn this.multiplyQuaternions( q, this );\n\n\t}\n\n\tmultiplyQuaternions( a, b ) {\n\n\t\t// from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n\n\t\tconst qax = a._x, qay = a._y, qaz = a._z, qaw = a._w;\n\t\tconst qbx = b._x, qby = b._y, qbz = b._z, qbw = b._w;\n\n\t\tthis._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n\t\tthis._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n\t\tthis._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n\t\tthis._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tslerp( qb, t ) {\n\n\t\tif ( t === 0 ) return this;\n\t\tif ( t === 1 ) return this.copy( qb );\n\n\t\tconst x = this._x, y = this._y, z = this._z, w = this._w;\n\n\t\t// http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/\n\n\t\tlet cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;\n\n\t\tif ( cosHalfTheta < 0 ) {\n\n\t\t\tthis._w = - qb._w;\n\t\t\tthis._x = - qb._x;\n\t\t\tthis._y = - qb._y;\n\t\t\tthis._z = - qb._z;\n\n\t\t\tcosHalfTheta = - cosHalfTheta;\n\n\t\t} else {\n\n\t\t\tthis.copy( qb );\n\n\t\t}\n\n\t\tif ( cosHalfTheta >= 1.0 ) {\n\n\t\t\tthis._w = w;\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;\n\n\t\tif ( sqrSinHalfTheta <= Number.EPSILON ) {\n\n\t\t\tconst s = 1 - t;\n\t\t\tthis._w = s * w + t * this._w;\n\t\t\tthis._x = s * x + t * this._x;\n\t\t\tthis._y = s * y + t * this._y;\n\t\t\tthis._z = s * z + t * this._z;\n\n\t\t\tthis.normalize();\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst sinHalfTheta = Math.sqrt( sqrSinHalfTheta );\n\t\tconst halfTheta = Math.atan2( sinHalfTheta, cosHalfTheta );\n\t\tconst ratioA = Math.sin( ( 1 - t ) * halfTheta ) / sinHalfTheta,\n\t\t\tratioB = Math.sin( t * halfTheta ) / sinHalfTheta;\n\n\t\tthis._w = ( w * ratioA + this._w * ratioB );\n\t\tthis._x = ( x * ratioA + this._x * ratioB );\n\t\tthis._y = ( y * ratioA + this._y * ratioB );\n\t\tthis._z = ( z * ratioA + this._z * ratioB );\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tslerpQuaternions( qa, qb, t ) {\n\n\t\tthis.copy( qa ).slerp( qb, t );\n\n\t}\n\n\tequals( quaternion ) {\n\n\t\treturn ( quaternion._x === this._x ) && ( quaternion._y === this._y ) && ( quaternion._z === this._z ) && ( quaternion._w === this._w );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis._x = array[ offset ];\n\t\tthis._y = array[ offset + 1 ];\n\t\tthis._z = array[ offset + 2 ];\n\t\tthis._w = array[ offset + 3 ];\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this._x;\n\t\tarray[ offset + 1 ] = this._y;\n\t\tarray[ offset + 2 ] = this._z;\n\t\tarray[ offset + 3 ] = this._w;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis._x = attribute.getX( index );\n\t\tthis._y = attribute.getY( index );\n\t\tthis._z = attribute.getZ( index );\n\t\tthis._w = attribute.getW( index );\n\n\t\treturn this;\n\n\t}\n\n\t_onChange( callback ) {\n\n\t\tthis._onChangeCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\t_onChangeCallback() {}\n\n}\n\nQuaternion.prototype.isQuaternion = true;\n\nclass Vector3 {\n\n\tconstructor( x = 0, y = 0, z = 0 ) {\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\n\t}\n\n\tset( x, y, z ) {\n\n\t\tif ( z === undefined ) z = this.z; // sprite.scale.set(x,y)\n\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.x = scalar;\n\t\tthis.y = scalar;\n\t\tthis.z = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetX( x ) {\n\n\t\tthis.x = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( y ) {\n\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( z ) {\n\n\t\tthis.z = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponent( index, value ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: this.x = value; break;\n\t\t\tcase 1: this.y = value; break;\n\t\t\tcase 2: this.z = value; break;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetComponent( index ) {\n\n\t\tswitch ( index ) {\n\n\t\t\tcase 0: return this.x;\n\t\t\tcase 1: return this.y;\n\t\t\tcase 2: return this.z;\n\t\t\tdefault: throw new Error( 'index is out of range: ' + index );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.x, this.y, this.z );\n\n\t}\n\n\tcopy( v ) {\n\n\t\tthis.x = v.x;\n\t\tthis.y = v.y;\n\t\tthis.z = v.z;\n\n\t\treturn this;\n\n\t}\n\n\tadd( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.' );\n\t\t\treturn this.addVectors( v, w );\n\n\t\t}\n\n\t\tthis.x += v.x;\n\t\tthis.y += v.y;\n\t\tthis.z += v.z;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.x += s;\n\t\tthis.y += s;\n\t\tthis.z += s;\n\n\t\treturn this;\n\n\t}\n\n\taddVectors( a, b ) {\n\n\t\tthis.x = a.x + b.x;\n\t\tthis.y = a.y + b.y;\n\t\tthis.z = a.z + b.z;\n\n\t\treturn this;\n\n\t}\n\n\taddScaledVector( v, s ) {\n\n\t\tthis.x += v.x * s;\n\t\tthis.y += v.y * s;\n\t\tthis.z += v.z * s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.' );\n\t\t\treturn this.subVectors( v, w );\n\n\t\t}\n\n\t\tthis.x -= v.x;\n\t\tthis.y -= v.y;\n\t\tthis.z -= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tsubScalar( s ) {\n\n\t\tthis.x -= s;\n\t\tthis.y -= s;\n\t\tthis.z -= s;\n\n\t\treturn this;\n\n\t}\n\n\tsubVectors( a, b ) {\n\n\t\tthis.x = a.x - b.x;\n\t\tthis.y = a.y - b.y;\n\t\tthis.z = a.z - b.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.' );\n\t\t\treturn this.multiplyVectors( v, w );\n\n\t\t}\n\n\t\tthis.x *= v.x;\n\t\tthis.y *= v.y;\n\t\tthis.z *= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( scalar ) {\n\n\t\tthis.x *= scalar;\n\t\tthis.y *= scalar;\n\t\tthis.z *= scalar;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyVectors( a, b ) {\n\n\t\tthis.x = a.x * b.x;\n\t\tthis.y = a.y * b.y;\n\t\tthis.z = a.z * b.z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyEuler( euler ) {\n\n\t\tif ( ! ( euler && euler.isEuler ) ) {\n\n\t\t\tconsole.error( 'THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.' );\n\n\t\t}\n\n\t\treturn this.applyQuaternion( _quaternion$4.setFromEuler( euler ) );\n\n\t}\n\n\tapplyAxisAngle( axis, angle ) {\n\n\t\treturn this.applyQuaternion( _quaternion$4.setFromAxisAngle( axis, angle ) );\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 3 ] * y + e[ 6 ] * z;\n\t\tthis.y = e[ 1 ] * x + e[ 4 ] * y + e[ 7 ] * z;\n\t\tthis.z = e[ 2 ] * x + e[ 5 ] * y + e[ 8 ] * z;\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\treturn this.applyMatrix3( m ).normalize();\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tconst w = 1 / ( e[ 3 ] * x + e[ 7 ] * y + e[ 11 ] * z + e[ 15 ] );\n\n\t\tthis.x = ( e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z + e[ 12 ] ) * w;\n\t\tthis.y = ( e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z + e[ 13 ] ) * w;\n\t\tthis.z = ( e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z + e[ 14 ] ) * w;\n\n\t\treturn this;\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst qx = q.x, qy = q.y, qz = q.z, qw = q.w;\n\n\t\t// calculate quat * vector\n\n\t\tconst ix = qw * x + qy * z - qz * y;\n\t\tconst iy = qw * y + qz * x - qx * z;\n\t\tconst iz = qw * z + qx * y - qy * x;\n\t\tconst iw = - qx * x - qy * y - qz * z;\n\n\t\t// calculate result * inverse quat\n\n\t\tthis.x = ix * qw + iw * - qx + iy * - qz - iz * - qy;\n\t\tthis.y = iy * qw + iw * - qy + iz * - qx - ix * - qz;\n\t\tthis.z = iz * qw + iw * - qz + ix * - qy - iy * - qx;\n\n\t\treturn this;\n\n\t}\n\n\tproject( camera ) {\n\n\t\treturn this.applyMatrix4( camera.matrixWorldInverse ).applyMatrix4( camera.projectionMatrix );\n\n\t}\n\n\tunproject( camera ) {\n\n\t\treturn this.applyMatrix4( camera.projectionMatrixInverse ).applyMatrix4( camera.matrixWorld );\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\t// input: THREE.Matrix4 affine matrix\n\t\t// vector interpreted as a direction\n\n\t\tconst x = this.x, y = this.y, z = this.z;\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 0 ] * x + e[ 4 ] * y + e[ 8 ] * z;\n\t\tthis.y = e[ 1 ] * x + e[ 5 ] * y + e[ 9 ] * z;\n\t\tthis.z = e[ 2 ] * x + e[ 6 ] * y + e[ 10 ] * z;\n\n\t\treturn this.normalize();\n\n\t}\n\n\tdivide( v ) {\n\n\t\tthis.x /= v.x;\n\t\tthis.y /= v.y;\n\t\tthis.z /= v.z;\n\n\t\treturn this;\n\n\t}\n\n\tdivideScalar( scalar ) {\n\n\t\treturn this.multiplyScalar( 1 / scalar );\n\n\t}\n\n\tmin( v ) {\n\n\t\tthis.x = Math.min( this.x, v.x );\n\t\tthis.y = Math.min( this.y, v.y );\n\t\tthis.z = Math.min( this.z, v.z );\n\n\t\treturn this;\n\n\t}\n\n\tmax( v ) {\n\n\t\tthis.x = Math.max( this.x, v.x );\n\t\tthis.y = Math.max( this.y, v.y );\n\t\tthis.z = Math.max( this.z, v.z );\n\n\t\treturn this;\n\n\t}\n\n\tclamp( min, max ) {\n\n\t\t// assumes min < max, componentwise\n\n\t\tthis.x = Math.max( min.x, Math.min( max.x, this.x ) );\n\t\tthis.y = Math.max( min.y, Math.min( max.y, this.y ) );\n\t\tthis.z = Math.max( min.z, Math.min( max.z, this.z ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampScalar( minVal, maxVal ) {\n\n\t\tthis.x = Math.max( minVal, Math.min( maxVal, this.x ) );\n\t\tthis.y = Math.max( minVal, Math.min( maxVal, this.y ) );\n\t\tthis.z = Math.max( minVal, Math.min( maxVal, this.z ) );\n\n\t\treturn this;\n\n\t}\n\n\tclampLength( min, max ) {\n\n\t\tconst length = this.length();\n\n\t\treturn this.divideScalar( length || 1 ).multiplyScalar( Math.max( min, Math.min( max, length ) ) );\n\n\t}\n\n\tfloor() {\n\n\t\tthis.x = Math.floor( this.x );\n\t\tthis.y = Math.floor( this.y );\n\t\tthis.z = Math.floor( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tceil() {\n\n\t\tthis.x = Math.ceil( this.x );\n\t\tthis.y = Math.ceil( this.y );\n\t\tthis.z = Math.ceil( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tround() {\n\n\t\tthis.x = Math.round( this.x );\n\t\tthis.y = Math.round( this.y );\n\t\tthis.z = Math.round( this.z );\n\n\t\treturn this;\n\n\t}\n\n\troundToZero() {\n\n\t\tthis.x = ( this.x < 0 ) ? Math.ceil( this.x ) : Math.floor( this.x );\n\t\tthis.y = ( this.y < 0 ) ? Math.ceil( this.y ) : Math.floor( this.y );\n\t\tthis.z = ( this.z < 0 ) ? Math.ceil( this.z ) : Math.floor( this.z );\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.x = - this.x;\n\t\tthis.y = - this.y;\n\t\tthis.z = - this.z;\n\n\t\treturn this;\n\n\t}\n\n\tdot( v ) {\n\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z;\n\n\t}\n\n\t// TODO lengthSquared?\n\n\tlengthSq() {\n\n\t\treturn this.x * this.x + this.y * this.y + this.z * this.z;\n\n\t}\n\n\tlength() {\n\n\t\treturn Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z );\n\n\t}\n\n\tmanhattanLength() {\n\n\t\treturn Math.abs( this.x ) + Math.abs( this.y ) + Math.abs( this.z );\n\n\t}\n\n\tnormalize() {\n\n\t\treturn this.divideScalar( this.length() || 1 );\n\n\t}\n\n\tsetLength( length ) {\n\n\t\treturn this.normalize().multiplyScalar( length );\n\n\t}\n\n\tlerp( v, alpha ) {\n\n\t\tthis.x += ( v.x - this.x ) * alpha;\n\t\tthis.y += ( v.y - this.y ) * alpha;\n\t\tthis.z += ( v.z - this.z ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpVectors( v1, v2, alpha ) {\n\n\t\tthis.x = v1.x + ( v2.x - v1.x ) * alpha;\n\t\tthis.y = v1.y + ( v2.y - v1.y ) * alpha;\n\t\tthis.z = v1.z + ( v2.z - v1.z ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tcross( v, w ) {\n\n\t\tif ( w !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.' );\n\t\t\treturn this.crossVectors( v, w );\n\n\t\t}\n\n\t\treturn this.crossVectors( this, v );\n\n\t}\n\n\tcrossVectors( a, b ) {\n\n\t\tconst ax = a.x, ay = a.y, az = a.z;\n\t\tconst bx = b.x, by = b.y, bz = b.z;\n\n\t\tthis.x = ay * bz - az * by;\n\t\tthis.y = az * bx - ax * bz;\n\t\tthis.z = ax * by - ay * bx;\n\n\t\treturn this;\n\n\t}\n\n\tprojectOnVector( v ) {\n\n\t\tconst denominator = v.lengthSq();\n\n\t\tif ( denominator === 0 ) return this.set( 0, 0, 0 );\n\n\t\tconst scalar = v.dot( this ) / denominator;\n\n\t\treturn this.copy( v ).multiplyScalar( scalar );\n\n\t}\n\n\tprojectOnPlane( planeNormal ) {\n\n\t\t_vector$c.copy( this ).projectOnVector( planeNormal );\n\n\t\treturn this.sub( _vector$c );\n\n\t}\n\n\treflect( normal ) {\n\n\t\t// reflect incident vector off plane orthogonal to normal\n\t\t// normal is assumed to have unit length\n\n\t\treturn this.sub( _vector$c.copy( normal ).multiplyScalar( 2 * this.dot( normal ) ) );\n\n\t}\n\n\tangleTo( v ) {\n\n\t\tconst denominator = Math.sqrt( this.lengthSq() * v.lengthSq() );\n\n\t\tif ( denominator === 0 ) return Math.PI / 2;\n\n\t\tconst theta = this.dot( v ) / denominator;\n\n\t\t// clamp, to handle numerical problems\n\n\t\treturn Math.acos( clamp( theta, - 1, 1 ) );\n\n\t}\n\n\tdistanceTo( v ) {\n\n\t\treturn Math.sqrt( this.distanceToSquared( v ) );\n\n\t}\n\n\tdistanceToSquared( v ) {\n\n\t\tconst dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;\n\n\t\treturn dx * dx + dy * dy + dz * dz;\n\n\t}\n\n\tmanhattanDistanceTo( v ) {\n\n\t\treturn Math.abs( this.x - v.x ) + Math.abs( this.y - v.y ) + Math.abs( this.z - v.z );\n\n\t}\n\n\tsetFromSpherical( s ) {\n\n\t\treturn this.setFromSphericalCoords( s.radius, s.phi, s.theta );\n\n\t}\n\n\tsetFromSphericalCoords( radius, phi, theta ) {\n\n\t\tconst sinPhiRadius = Math.sin( phi ) * radius;\n\n\t\tthis.x = sinPhiRadius * Math.sin( theta );\n\t\tthis.y = Math.cos( phi ) * radius;\n\t\tthis.z = sinPhiRadius * Math.cos( theta );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCylindrical( c ) {\n\n\t\treturn this.setFromCylindricalCoords( c.radius, c.theta, c.y );\n\n\t}\n\n\tsetFromCylindricalCoords( radius, theta, y ) {\n\n\t\tthis.x = radius * Math.sin( theta );\n\t\tthis.y = y;\n\t\tthis.z = radius * Math.cos( theta );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixPosition( m ) {\n\n\t\tconst e = m.elements;\n\n\t\tthis.x = e[ 12 ];\n\t\tthis.y = e[ 13 ];\n\t\tthis.z = e[ 14 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixScale( m ) {\n\n\t\tconst sx = this.setFromMatrixColumn( m, 0 ).length();\n\t\tconst sy = this.setFromMatrixColumn( m, 1 ).length();\n\t\tconst sz = this.setFromMatrixColumn( m, 2 ).length();\n\n\t\tthis.x = sx;\n\t\tthis.y = sy;\n\t\tthis.z = sz;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrixColumn( m, index ) {\n\n\t\treturn this.fromArray( m.elements, index * 4 );\n\n\t}\n\n\tsetFromMatrix3Column( m, index ) {\n\n\t\treturn this.fromArray( m.elements, index * 3 );\n\n\t}\n\n\tequals( v ) {\n\n\t\treturn ( ( v.x === this.x ) && ( v.y === this.y ) && ( v.z === this.z ) );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.x = array[ offset ];\n\t\tthis.y = array[ offset + 1 ];\n\t\tthis.z = array[ offset + 2 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.x;\n\t\tarray[ offset + 1 ] = this.y;\n\t\tarray[ offset + 2 ] = this.z;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index, offset ) {\n\n\t\tif ( offset !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Vector3: offset has been removed from .fromBufferAttribute().' );\n\n\t\t}\n\n\t\tthis.x = attribute.getX( index );\n\t\tthis.y = attribute.getY( index );\n\t\tthis.z = attribute.getZ( index );\n\n\t\treturn this;\n\n\t}\n\n\trandom() {\n\n\t\tthis.x = Math.random();\n\t\tthis.y = Math.random();\n\t\tthis.z = Math.random();\n\n\t\treturn this;\n\n\t}\n\n}\n\nVector3.prototype.isVector3 = true;\n\nconst _vector$c = /*@__PURE__*/ new Vector3();\nconst _quaternion$4 = /*@__PURE__*/ new Quaternion();\n\nclass Box3 {\n\n\tconstructor( min = new Vector3( + Infinity, + Infinity, + Infinity ), max = new Vector3( - Infinity, - Infinity, - Infinity ) ) {\n\n\t\tthis.min = min;\n\t\tthis.max = max;\n\n\t}\n\n\tset( min, max ) {\n\n\t\tthis.min.copy( min );\n\t\tthis.max.copy( max );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromArray( array ) {\n\n\t\tlet minX = + Infinity;\n\t\tlet minY = + Infinity;\n\t\tlet minZ = + Infinity;\n\n\t\tlet maxX = - Infinity;\n\t\tlet maxY = - Infinity;\n\t\tlet maxZ = - Infinity;\n\n\t\tfor ( let i = 0, l = array.length; i < l; i += 3 ) {\n\n\t\t\tconst x = array[ i ];\n\t\t\tconst y = array[ i + 1 ];\n\t\t\tconst z = array[ i + 2 ];\n\n\t\t\tif ( x < minX ) minX = x;\n\t\t\tif ( y < minY ) minY = y;\n\t\t\tif ( z < minZ ) minZ = z;\n\n\t\t\tif ( x > maxX ) maxX = x;\n\t\t\tif ( y > maxY ) maxY = y;\n\t\t\tif ( z > maxZ ) maxZ = z;\n\n\t\t}\n\n\t\tthis.min.set( minX, minY, minZ );\n\t\tthis.max.set( maxX, maxY, maxZ );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromBufferAttribute( attribute ) {\n\n\t\tlet minX = + Infinity;\n\t\tlet minY = + Infinity;\n\t\tlet minZ = + Infinity;\n\n\t\tlet maxX = - Infinity;\n\t\tlet maxY = - Infinity;\n\t\tlet maxZ = - Infinity;\n\n\t\tfor ( let i = 0, l = attribute.count; i < l; i ++ ) {\n\n\t\t\tconst x = attribute.getX( i );\n\t\t\tconst y = attribute.getY( i );\n\t\t\tconst z = attribute.getZ( i );\n\n\t\t\tif ( x < minX ) minX = x;\n\t\t\tif ( y < minY ) minY = y;\n\t\t\tif ( z < minZ ) minZ = z;\n\n\t\t\tif ( x > maxX ) maxX = x;\n\t\t\tif ( y > maxY ) maxY = y;\n\t\t\tif ( z > maxZ ) maxZ = z;\n\n\t\t}\n\n\t\tthis.min.set( minX, minY, minZ );\n\t\tthis.max.set( maxX, maxY, maxZ );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( points[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCenterAndSize( center, size ) {\n\n\t\tconst halfSize = _vector$b.copy( size ).multiplyScalar( 0.5 );\n\n\t\tthis.min.copy( center ).sub( halfSize );\n\t\tthis.max.copy( center ).add( halfSize );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromObject( object ) {\n\n\t\tthis.makeEmpty();\n\n\t\treturn this.expandByObject( object );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( box ) {\n\n\t\tthis.min.copy( box.min );\n\t\tthis.max.copy( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.min.x = this.min.y = this.min.z = + Infinity;\n\t\tthis.max.x = this.max.y = this.max.z = - Infinity;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\n\t\treturn ( this.max.x < this.min.x ) || ( this.max.y < this.min.y ) || ( this.max.z < this.min.z );\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );\n\n\t}\n\n\tgetSize( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0, 0 ) : target.subVectors( this.max, this.min );\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tthis.min.min( point );\n\t\tthis.max.max( point );\n\n\t\treturn this;\n\n\t}\n\n\texpandByVector( vector ) {\n\n\t\tthis.min.sub( vector );\n\t\tthis.max.add( vector );\n\n\t\treturn this;\n\n\t}\n\n\texpandByScalar( scalar ) {\n\n\t\tthis.min.addScalar( - scalar );\n\t\tthis.max.addScalar( scalar );\n\n\t\treturn this;\n\n\t}\n\n\texpandByObject( object ) {\n\n\t\t// Computes the world-axis-aligned bounding box of an object (including its children),\n\t\t// accounting for both the object's, and children's, world transforms\n\n\t\tobject.updateWorldMatrix( false, false );\n\n\t\tconst geometry = object.geometry;\n\n\t\tif ( geometry !== undefined ) {\n\n\t\t\tif ( geometry.boundingBox === null ) {\n\n\t\t\t\tgeometry.computeBoundingBox();\n\n\t\t\t}\n\n\t\t\t_box$3.copy( geometry.boundingBox );\n\t\t\t_box$3.applyMatrix4( object.matrixWorld );\n\n\t\t\tthis.union( _box$3 );\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tthis.expandByObject( children[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn point.x < this.min.x || point.x > this.max.x ||\n\t\t\tpoint.y < this.min.y || point.y > this.max.y ||\n\t\t\tpoint.z < this.min.z || point.z > this.max.z ? false : true;\n\n\t}\n\n\tcontainsBox( box ) {\n\n\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x &&\n\t\t\tthis.min.y <= box.min.y && box.max.y <= this.max.y &&\n\t\t\tthis.min.z <= box.min.z && box.max.z <= this.max.z;\n\n\t}\n\n\tgetParameter( point, target ) {\n\n\t\t// This can potentially have a divide by zero if the box\n\t\t// has a size dimension of 0.\n\n\t\treturn target.set(\n\t\t\t( point.x - this.min.x ) / ( this.max.x - this.min.x ),\n\t\t\t( point.y - this.min.y ) / ( this.max.y - this.min.y ),\n\t\t\t( point.z - this.min.z ) / ( this.max.z - this.min.z )\n\t\t);\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\t// using 6 splitting planes to rule out intersections.\n\t\treturn box.max.x < this.min.x || box.min.x > this.max.x ||\n\t\t\tbox.max.y < this.min.y || box.min.y > this.max.y ||\n\t\t\tbox.max.z < this.min.z || box.min.z > this.max.z ? false : true;\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\t// Find the point on the AABB closest to the sphere center.\n\t\tthis.clampPoint( sphere.center, _vector$b );\n\n\t\t// If that point is inside the sphere, the AABB and sphere intersect.\n\t\treturn _vector$b.distanceToSquared( sphere.center ) <= ( sphere.radius * sphere.radius );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\t// We compute the minimum and maximum dot product values. If those values\n\t\t// are on the same side (back or front) of the plane, then there is no intersection.\n\n\t\tlet min, max;\n\n\t\tif ( plane.normal.x > 0 ) {\n\n\t\t\tmin = plane.normal.x * this.min.x;\n\t\t\tmax = plane.normal.x * this.max.x;\n\n\t\t} else {\n\n\t\t\tmin = plane.normal.x * this.max.x;\n\t\t\tmax = plane.normal.x * this.min.x;\n\n\t\t}\n\n\t\tif ( plane.normal.y > 0 ) {\n\n\t\t\tmin += plane.normal.y * this.min.y;\n\t\t\tmax += plane.normal.y * this.max.y;\n\n\t\t} else {\n\n\t\t\tmin += plane.normal.y * this.max.y;\n\t\t\tmax += plane.normal.y * this.min.y;\n\n\t\t}\n\n\t\tif ( plane.normal.z > 0 ) {\n\n\t\t\tmin += plane.normal.z * this.min.z;\n\t\t\tmax += plane.normal.z * this.max.z;\n\n\t\t} else {\n\n\t\t\tmin += plane.normal.z * this.max.z;\n\t\t\tmax += plane.normal.z * this.min.z;\n\n\t\t}\n\n\t\treturn ( min <= - plane.constant && max >= - plane.constant );\n\n\t}\n\n\tintersectsTriangle( triangle ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// compute box center and extents\n\t\tthis.getCenter( _center );\n\t\t_extents.subVectors( this.max, _center );\n\n\t\t// translate triangle to aabb origin\n\t\t_v0$2.subVectors( triangle.a, _center );\n\t\t_v1$7.subVectors( triangle.b, _center );\n\t\t_v2$3.subVectors( triangle.c, _center );\n\n\t\t// compute edge vectors for triangle\n\t\t_f0.subVectors( _v1$7, _v0$2 );\n\t\t_f1.subVectors( _v2$3, _v1$7 );\n\t\t_f2.subVectors( _v0$2, _v2$3 );\n\n\t\t// test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb\n\t\t// make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation\n\t\t// axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)\n\t\tlet axes = [\n\t\t\t0, - _f0.z, _f0.y, 0, - _f1.z, _f1.y, 0, - _f2.z, _f2.y,\n\t\t\t_f0.z, 0, - _f0.x, _f1.z, 0, - _f1.x, _f2.z, 0, - _f2.x,\n\t\t\t- _f0.y, _f0.x, 0, - _f1.y, _f1.x, 0, - _f2.y, _f2.x, 0\n\t\t];\n\t\tif ( ! satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents ) ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// test 3 face normals from the aabb\n\t\taxes = [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ];\n\t\tif ( ! satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents ) ) {\n\n\t\t\treturn false;\n\n\t\t}\n\n\t\t// finally testing the face normal of the triangle\n\t\t// use already existing triangle edge vectors here\n\t\t_triangleNormal.crossVectors( _f0, _f1 );\n\t\taxes = [ _triangleNormal.x, _triangleNormal.y, _triangleNormal.z ];\n\n\t\treturn satForAxes( axes, _v0$2, _v1$7, _v2$3, _extents );\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\treturn target.copy( point ).clamp( this.min, this.max );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\tconst clampedPoint = _vector$b.copy( point ).clamp( this.min, this.max );\n\n\t\treturn clampedPoint.sub( point ).length();\n\n\t}\n\n\tgetBoundingSphere( target ) {\n\n\t\tthis.getCenter( target.center );\n\n\t\ttarget.radius = this.getSize( _vector$b ).length() * 0.5;\n\n\t\treturn target;\n\n\t}\n\n\tintersect( box ) {\n\n\t\tthis.min.max( box.min );\n\t\tthis.max.min( box.max );\n\n\t\t// ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.\n\t\tif ( this.isEmpty() ) this.makeEmpty();\n\n\t\treturn this;\n\n\t}\n\n\tunion( box ) {\n\n\t\tthis.min.min( box.min );\n\t\tthis.max.max( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\t// transform of empty box is an empty box.\n\t\tif ( this.isEmpty() ) return this;\n\n\t\t// NOTE: I am using a binary pattern to specify all 2^3 combinations below\n\t\t_points[ 0 ].set( this.min.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 000\n\t\t_points[ 1 ].set( this.min.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 001\n\t\t_points[ 2 ].set( this.min.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 010\n\t\t_points[ 3 ].set( this.min.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 011\n\t\t_points[ 4 ].set( this.max.x, this.min.y, this.min.z ).applyMatrix4( matrix ); // 100\n\t\t_points[ 5 ].set( this.max.x, this.min.y, this.max.z ).applyMatrix4( matrix ); // 101\n\t\t_points[ 6 ].set( this.max.x, this.max.y, this.min.z ).applyMatrix4( matrix ); // 110\n\t\t_points[ 7 ].set( this.max.x, this.max.y, this.max.z ).applyMatrix4( matrix ); // 111\n\n\t\tthis.setFromPoints( _points );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.min.add( offset );\n\t\tthis.max.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\tequals( box ) {\n\n\t\treturn box.min.equals( this.min ) && box.max.equals( this.max );\n\n\t}\n\n}\n\nBox3.prototype.isBox3 = true;\n\nconst _points = [\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3(),\n\t/*@__PURE__*/ new Vector3()\n];\n\nconst _vector$b = /*@__PURE__*/ new Vector3();\n\nconst _box$3 = /*@__PURE__*/ new Box3();\n\n// triangle centered vertices\n\nconst _v0$2 = /*@__PURE__*/ new Vector3();\nconst _v1$7 = /*@__PURE__*/ new Vector3();\nconst _v2$3 = /*@__PURE__*/ new Vector3();\n\n// triangle edge vectors\n\nconst _f0 = /*@__PURE__*/ new Vector3();\nconst _f1 = /*@__PURE__*/ new Vector3();\nconst _f2 = /*@__PURE__*/ new Vector3();\n\nconst _center = /*@__PURE__*/ new Vector3();\nconst _extents = /*@__PURE__*/ new Vector3();\nconst _triangleNormal = /*@__PURE__*/ new Vector3();\nconst _testAxis = /*@__PURE__*/ new Vector3();\n\nfunction satForAxes( axes, v0, v1, v2, extents ) {\n\n\tfor ( let i = 0, j = axes.length - 3; i <= j; i += 3 ) {\n\n\t\t_testAxis.fromArray( axes, i );\n\t\t// project the aabb onto the seperating axis\n\t\tconst r = extents.x * Math.abs( _testAxis.x ) + extents.y * Math.abs( _testAxis.y ) + extents.z * Math.abs( _testAxis.z );\n\t\t// project all 3 vertices of the triangle onto the seperating axis\n\t\tconst p0 = v0.dot( _testAxis );\n\t\tconst p1 = v1.dot( _testAxis );\n\t\tconst p2 = v2.dot( _testAxis );\n\t\t// actual test, basically see if either of the most extreme of the triangle points intersects r\n\t\tif ( Math.max( - Math.max( p0, p1, p2 ), Math.min( p0, p1, p2 ) ) > r ) {\n\n\t\t\t// points of the projected triangle are outside the projected half-length of the aabb\n\t\t\t// the axis is seperating and we can exit\n\t\t\treturn false;\n\n\t\t}\n\n\t}\n\n\treturn true;\n\n}\n\nconst _box$2 = /*@__PURE__*/ new Box3();\nconst _v1$6 = /*@__PURE__*/ new Vector3();\nconst _toFarthestPoint = /*@__PURE__*/ new Vector3();\nconst _toPoint = /*@__PURE__*/ new Vector3();\n\nclass Sphere {\n\n\tconstructor( center = new Vector3(), radius = - 1 ) {\n\n\t\tthis.center = center;\n\t\tthis.radius = radius;\n\n\t}\n\n\tset( center, radius ) {\n\n\t\tthis.center.copy( center );\n\t\tthis.radius = radius;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points, optionalCenter ) {\n\n\t\tconst center = this.center;\n\n\t\tif ( optionalCenter !== undefined ) {\n\n\t\t\tcenter.copy( optionalCenter );\n\n\t\t} else {\n\n\t\t\t_box$2.setFromPoints( points ).getCenter( center );\n\n\t\t}\n\n\t\tlet maxRadiusSq = 0;\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( points[ i ] ) );\n\n\t\t}\n\n\t\tthis.radius = Math.sqrt( maxRadiusSq );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( sphere ) {\n\n\t\tthis.center.copy( sphere.center );\n\t\tthis.radius = sphere.radius;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\treturn ( this.radius < 0 );\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.center.set( 0, 0, 0 );\n\t\tthis.radius = - 1;\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn ( point.distanceToSquared( this.center ) <= ( this.radius * this.radius ) );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn ( point.distanceTo( this.center ) - this.radius );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\tconst radiusSum = this.radius + sphere.radius;\n\n\t\treturn sphere.center.distanceToSquared( this.center ) <= ( radiusSum * radiusSum );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsSphere( this );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\treturn Math.abs( plane.distanceToPoint( this.center ) ) <= this.radius;\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\tconst deltaLengthSq = this.center.distanceToSquared( point );\n\n\t\ttarget.copy( point );\n\n\t\tif ( deltaLengthSq > ( this.radius * this.radius ) ) {\n\n\t\t\ttarget.sub( this.center ).normalize();\n\t\t\ttarget.multiplyScalar( this.radius ).add( this.center );\n\n\t\t}\n\n\t\treturn target;\n\n\t}\n\n\tgetBoundingBox( target ) {\n\n\t\tif ( this.isEmpty() ) {\n\n\t\t\t// Empty sphere produces empty bounding box\n\t\t\ttarget.makeEmpty();\n\t\t\treturn target;\n\n\t\t}\n\n\t\ttarget.set( this.center, this.center );\n\t\ttarget.expandByScalar( this.radius );\n\n\t\treturn target;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tthis.center.applyMatrix4( matrix );\n\t\tthis.radius = this.radius * matrix.getMaxScaleOnAxis();\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.center.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\t// from https://github.com/juj/MathGeoLib/blob/2940b99b99cfe575dd45103ef20f4019dee15b54/src/Geometry/Sphere.cpp#L649-L671\n\n\t\t_toPoint.subVectors( point, this.center );\n\n\t\tconst lengthSq = _toPoint.lengthSq();\n\n\t\tif ( lengthSq > ( this.radius * this.radius ) ) {\n\n\t\t\tconst length = Math.sqrt( lengthSq );\n\t\t\tconst missingRadiusHalf = ( length - this.radius ) * 0.5;\n\n\t\t\t// Nudge this sphere towards the target point. Add half the missing distance to radius,\n\t\t\t// and the other half to position. This gives a tighter enclosure, instead of if\n\t\t\t// the whole missing distance were just added to radius.\n\n\t\t\tthis.center.add( _toPoint.multiplyScalar( missingRadiusHalf / length ) );\n\t\t\tthis.radius += missingRadiusHalf;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tunion( sphere ) {\n\n\t\t// from https://github.com/juj/MathGeoLib/blob/2940b99b99cfe575dd45103ef20f4019dee15b54/src/Geometry/Sphere.cpp#L759-L769\n\n\t\t// To enclose another sphere into this sphere, we only need to enclose two points:\n\t\t// 1) Enclose the farthest point on the other sphere into this sphere.\n\t\t// 2) Enclose the opposite point of the farthest point into this sphere.\n\n\t\t_toFarthestPoint.subVectors( sphere.center, this.center ).normalize().multiplyScalar( sphere.radius );\n\n\t\tthis.expandByPoint( _v1$6.copy( sphere.center ).add( _toFarthestPoint ) );\n\t\tthis.expandByPoint( _v1$6.copy( sphere.center ).sub( _toFarthestPoint ) );\n\n\t\treturn this;\n\n\t}\n\n\tequals( sphere ) {\n\n\t\treturn sphere.center.equals( this.center ) && ( sphere.radius === this.radius );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$a = /*@__PURE__*/ new Vector3();\nconst _segCenter = /*@__PURE__*/ new Vector3();\nconst _segDir = /*@__PURE__*/ new Vector3();\nconst _diff = /*@__PURE__*/ new Vector3();\n\nconst _edge1 = /*@__PURE__*/ new Vector3();\nconst _edge2 = /*@__PURE__*/ new Vector3();\nconst _normal$1 = /*@__PURE__*/ new Vector3();\n\nclass Ray {\n\n\tconstructor( origin = new Vector3(), direction = new Vector3( 0, 0, - 1 ) ) {\n\n\t\tthis.origin = origin;\n\t\tthis.direction = direction;\n\n\t}\n\n\tset( origin, direction ) {\n\n\t\tthis.origin.copy( origin );\n\t\tthis.direction.copy( direction );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( ray ) {\n\n\t\tthis.origin.copy( ray.origin );\n\t\tthis.direction.copy( ray.direction );\n\n\t\treturn this;\n\n\t}\n\n\tat( t, target ) {\n\n\t\treturn target.copy( this.direction ).multiplyScalar( t ).add( this.origin );\n\n\t}\n\n\tlookAt( v ) {\n\n\t\tthis.direction.copy( v ).sub( this.origin ).normalize();\n\n\t\treturn this;\n\n\t}\n\n\trecast( t ) {\n\n\t\tthis.origin.copy( this.at( t, _vector$a ) );\n\n\t\treturn this;\n\n\t}\n\n\tclosestPointToPoint( point, target ) {\n\n\t\ttarget.subVectors( point, this.origin );\n\n\t\tconst directionDistance = target.dot( this.direction );\n\n\t\tif ( directionDistance < 0 ) {\n\n\t\t\treturn target.copy( this.origin );\n\n\t\t}\n\n\t\treturn target.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn Math.sqrt( this.distanceSqToPoint( point ) );\n\n\t}\n\n\tdistanceSqToPoint( point ) {\n\n\t\tconst directionDistance = _vector$a.subVectors( point, this.origin ).dot( this.direction );\n\n\t\t// point behind the ray\n\n\t\tif ( directionDistance < 0 ) {\n\n\t\t\treturn this.origin.distanceToSquared( point );\n\n\t\t}\n\n\t\t_vector$a.copy( this.direction ).multiplyScalar( directionDistance ).add( this.origin );\n\n\t\treturn _vector$a.distanceToSquared( point );\n\n\t}\n\n\tdistanceSqToSegment( v0, v1, optionalPointOnRay, optionalPointOnSegment ) {\n\n\t\t// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteDistRaySegment.h\n\t\t// It returns the min distance between the ray and the segment\n\t\t// defined by v0 and v1\n\t\t// It can also set two optional targets :\n\t\t// - The closest point on the ray\n\t\t// - The closest point on the segment\n\n\t\t_segCenter.copy( v0 ).add( v1 ).multiplyScalar( 0.5 );\n\t\t_segDir.copy( v1 ).sub( v0 ).normalize();\n\t\t_diff.copy( this.origin ).sub( _segCenter );\n\n\t\tconst segExtent = v0.distanceTo( v1 ) * 0.5;\n\t\tconst a01 = - this.direction.dot( _segDir );\n\t\tconst b0 = _diff.dot( this.direction );\n\t\tconst b1 = - _diff.dot( _segDir );\n\t\tconst c = _diff.lengthSq();\n\t\tconst det = Math.abs( 1 - a01 * a01 );\n\t\tlet s0, s1, sqrDist, extDet;\n\n\t\tif ( det > 0 ) {\n\n\t\t\t// The ray and segment are not parallel.\n\n\t\t\ts0 = a01 * b1 - b0;\n\t\t\ts1 = a01 * b0 - b1;\n\t\t\textDet = segExtent * det;\n\n\t\t\tif ( s0 >= 0 ) {\n\n\t\t\t\tif ( s1 >= - extDet ) {\n\n\t\t\t\t\tif ( s1 <= extDet ) {\n\n\t\t\t\t\t\t// region 0\n\t\t\t\t\t\t// Minimum at interior points of ray and segment.\n\n\t\t\t\t\t\tconst invDet = 1 / det;\n\t\t\t\t\t\ts0 *= invDet;\n\t\t\t\t\t\ts1 *= invDet;\n\t\t\t\t\t\tsqrDist = s0 * ( s0 + a01 * s1 + 2 * b0 ) + s1 * ( a01 * s0 + s1 + 2 * b1 ) + c;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// region 1\n\n\t\t\t\t\t\ts1 = segExtent;\n\t\t\t\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// region 5\n\n\t\t\t\t\ts1 = - segExtent;\n\t\t\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( s1 <= - extDet ) {\n\n\t\t\t\t\t// region 4\n\n\t\t\t\t\ts0 = Math.max( 0, - ( - a01 * segExtent + b0 ) );\n\t\t\t\t\ts1 = ( s0 > 0 ) ? - segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t} else if ( s1 <= extDet ) {\n\n\t\t\t\t\t// region 3\n\n\t\t\t\t\ts0 = 0;\n\t\t\t\t\ts1 = Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// region 2\n\n\t\t\t\t\ts0 = Math.max( 0, - ( a01 * segExtent + b0 ) );\n\t\t\t\t\ts1 = ( s0 > 0 ) ? segExtent : Math.min( Math.max( - segExtent, - b1 ), segExtent );\n\t\t\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// Ray and segment are parallel.\n\n\t\t\ts1 = ( a01 > 0 ) ? - segExtent : segExtent;\n\t\t\ts0 = Math.max( 0, - ( a01 * s1 + b0 ) );\n\t\t\tsqrDist = - s0 * s0 + s1 * ( s1 + 2 * b1 ) + c;\n\n\t\t}\n\n\t\tif ( optionalPointOnRay ) {\n\n\t\t\toptionalPointOnRay.copy( this.direction ).multiplyScalar( s0 ).add( this.origin );\n\n\t\t}\n\n\t\tif ( optionalPointOnSegment ) {\n\n\t\t\toptionalPointOnSegment.copy( _segDir ).multiplyScalar( s1 ).add( _segCenter );\n\n\t\t}\n\n\t\treturn sqrDist;\n\n\t}\n\n\tintersectSphere( sphere, target ) {\n\n\t\t_vector$a.subVectors( sphere.center, this.origin );\n\t\tconst tca = _vector$a.dot( this.direction );\n\t\tconst d2 = _vector$a.dot( _vector$a ) - tca * tca;\n\t\tconst radius2 = sphere.radius * sphere.radius;\n\n\t\tif ( d2 > radius2 ) return null;\n\n\t\tconst thc = Math.sqrt( radius2 - d2 );\n\n\t\t// t0 = first intersect point - entrance on front of sphere\n\t\tconst t0 = tca - thc;\n\n\t\t// t1 = second intersect point - exit point on back of sphere\n\t\tconst t1 = tca + thc;\n\n\t\t// test to see if both t0 and t1 are behind the ray - if so, return null\n\t\tif ( t0 < 0 && t1 < 0 ) return null;\n\n\t\t// test to see if t0 is behind the ray:\n\t\t// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,\n\t\t// in order to always return an intersect point that is in front of the ray.\n\t\tif ( t0 < 0 ) return this.at( t1, target );\n\n\t\t// else t0 is in front of the ray, so return the first collision point scaled by t0\n\t\treturn this.at( t0, target );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\treturn this.distanceSqToPoint( sphere.center ) <= ( sphere.radius * sphere.radius );\n\n\t}\n\n\tdistanceToPlane( plane ) {\n\n\t\tconst denominator = plane.normal.dot( this.direction );\n\n\t\tif ( denominator === 0 ) {\n\n\t\t\t// line is coplanar, return origin\n\t\t\tif ( plane.distanceToPoint( this.origin ) === 0 ) {\n\n\t\t\t\treturn 0;\n\n\t\t\t}\n\n\t\t\t// Null is preferable to undefined since undefined means.... it is undefined\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst t = - ( this.origin.dot( plane.normal ) + plane.constant ) / denominator;\n\n\t\t// Return if the ray never intersects the plane\n\n\t\treturn t >= 0 ? t : null;\n\n\t}\n\n\tintersectPlane( plane, target ) {\n\n\t\tconst t = this.distanceToPlane( plane );\n\n\t\tif ( t === null ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\treturn this.at( t, target );\n\n\t}\n\n\tintersectsPlane( plane ) {\n\n\t\t// check if the ray lies on the plane first\n\n\t\tconst distToPoint = plane.distanceToPoint( this.origin );\n\n\t\tif ( distToPoint === 0 ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\tconst denominator = plane.normal.dot( this.direction );\n\n\t\tif ( denominator * distToPoint < 0 ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\t// ray origin is behind the plane (and is pointing behind it)\n\n\t\treturn false;\n\n\t}\n\n\tintersectBox( box, target ) {\n\n\t\tlet tmin, tmax, tymin, tymax, tzmin, tzmax;\n\n\t\tconst invdirx = 1 / this.direction.x,\n\t\t\tinvdiry = 1 / this.direction.y,\n\t\t\tinvdirz = 1 / this.direction.z;\n\n\t\tconst origin = this.origin;\n\n\t\tif ( invdirx >= 0 ) {\n\n\t\t\ttmin = ( box.min.x - origin.x ) * invdirx;\n\t\t\ttmax = ( box.max.x - origin.x ) * invdirx;\n\n\t\t} else {\n\n\t\t\ttmin = ( box.max.x - origin.x ) * invdirx;\n\t\t\ttmax = ( box.min.x - origin.x ) * invdirx;\n\n\t\t}\n\n\t\tif ( invdiry >= 0 ) {\n\n\t\t\ttymin = ( box.min.y - origin.y ) * invdiry;\n\t\t\ttymax = ( box.max.y - origin.y ) * invdiry;\n\n\t\t} else {\n\n\t\t\ttymin = ( box.max.y - origin.y ) * invdiry;\n\t\t\ttymax = ( box.min.y - origin.y ) * invdiry;\n\n\t\t}\n\n\t\tif ( ( tmin > tymax ) || ( tymin > tmax ) ) return null;\n\n\t\t// These lines also handle the case where tmin or tmax is NaN\n\t\t// (result of 0 * Infinity). x !== x returns true if x is NaN\n\n\t\tif ( tymin > tmin || tmin !== tmin ) tmin = tymin;\n\n\t\tif ( tymax < tmax || tmax !== tmax ) tmax = tymax;\n\n\t\tif ( invdirz >= 0 ) {\n\n\t\t\ttzmin = ( box.min.z - origin.z ) * invdirz;\n\t\t\ttzmax = ( box.max.z - origin.z ) * invdirz;\n\n\t\t} else {\n\n\t\t\ttzmin = ( box.max.z - origin.z ) * invdirz;\n\t\t\ttzmax = ( box.min.z - origin.z ) * invdirz;\n\n\t\t}\n\n\t\tif ( ( tmin > tzmax ) || ( tzmin > tmax ) ) return null;\n\n\t\tif ( tzmin > tmin || tmin !== tmin ) tmin = tzmin;\n\n\t\tif ( tzmax < tmax || tmax !== tmax ) tmax = tzmax;\n\n\t\t//return point closest to the ray (positive side)\n\n\t\tif ( tmax < 0 ) return null;\n\n\t\treturn this.at( tmin >= 0 ? tmin : tmax, target );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn this.intersectBox( box, _vector$a ) !== null;\n\n\t}\n\n\tintersectTriangle( a, b, c, backfaceCulling, target ) {\n\n\t\t// Compute the offset origin, edges, and normal.\n\n\t\t// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h\n\n\t\t_edge1.subVectors( b, a );\n\t\t_edge2.subVectors( c, a );\n\t\t_normal$1.crossVectors( _edge1, _edge2 );\n\n\t\t// Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction,\n\t\t// E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by\n\t\t// |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))\n\t\t// |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))\n\t\t// |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)\n\t\tlet DdN = this.direction.dot( _normal$1 );\n\t\tlet sign;\n\n\t\tif ( DdN > 0 ) {\n\n\t\t\tif ( backfaceCulling ) return null;\n\t\t\tsign = 1;\n\n\t\t} else if ( DdN < 0 ) {\n\n\t\t\tsign = - 1;\n\t\t\tDdN = - DdN;\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t_diff.subVectors( this.origin, a );\n\t\tconst DdQxE2 = sign * this.direction.dot( _edge2.crossVectors( _diff, _edge2 ) );\n\n\t\t// b1 < 0, no intersection\n\t\tif ( DdQxE2 < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst DdE1xQ = sign * this.direction.dot( _edge1.cross( _diff ) );\n\n\t\t// b2 < 0, no intersection\n\t\tif ( DdE1xQ < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// b1+b2 > 1, no intersection\n\t\tif ( DdQxE2 + DdE1xQ > DdN ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// Line intersects triangle, check if ray does.\n\t\tconst QdN = - sign * _diff.dot( _normal$1 );\n\n\t\t// t < 0, no intersection\n\t\tif ( QdN < 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\t// Ray intersects triangle.\n\t\treturn this.at( QdN / DdN, target );\n\n\t}\n\n\tapplyMatrix4( matrix4 ) {\n\n\t\tthis.origin.applyMatrix4( matrix4 );\n\t\tthis.direction.transformDirection( matrix4 );\n\n\t\treturn this;\n\n\t}\n\n\tequals( ray ) {\n\n\t\treturn ray.origin.equals( this.origin ) && ray.direction.equals( this.direction );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass Matrix4 {\n\n\tconstructor() {\n\n\t\tthis.elements = [\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t];\n\n\t\tif ( arguments.length > 0 ) {\n\n\t\t\tconsole.error( 'THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.' );\n\n\t\t}\n\n\t}\n\n\tset( n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44 ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] = n11; te[ 4 ] = n12; te[ 8 ] = n13; te[ 12 ] = n14;\n\t\tte[ 1 ] = n21; te[ 5 ] = n22; te[ 9 ] = n23; te[ 13 ] = n24;\n\t\tte[ 2 ] = n31; te[ 6 ] = n32; te[ 10 ] = n33; te[ 14 ] = n34;\n\t\tte[ 3 ] = n41; te[ 7 ] = n42; te[ 11 ] = n43; te[ 15 ] = n44;\n\n\t\treturn this;\n\n\t}\n\n\tidentity() {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Matrix4().fromArray( this.elements );\n\n\t}\n\n\tcopy( m ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tte[ 0 ] = me[ 0 ]; te[ 1 ] = me[ 1 ]; te[ 2 ] = me[ 2 ]; te[ 3 ] = me[ 3 ];\n\t\tte[ 4 ] = me[ 4 ]; te[ 5 ] = me[ 5 ]; te[ 6 ] = me[ 6 ]; te[ 7 ] = me[ 7 ];\n\t\tte[ 8 ] = me[ 8 ]; te[ 9 ] = me[ 9 ]; te[ 10 ] = me[ 10 ]; te[ 11 ] = me[ 11 ];\n\t\tte[ 12 ] = me[ 12 ]; te[ 13 ] = me[ 13 ]; te[ 14 ] = me[ 14 ]; te[ 15 ] = me[ 15 ];\n\n\t\treturn this;\n\n\t}\n\n\tcopyPosition( m ) {\n\n\t\tconst te = this.elements, me = m.elements;\n\n\t\tte[ 12 ] = me[ 12 ];\n\t\tte[ 13 ] = me[ 13 ];\n\t\tte[ 14 ] = me[ 14 ];\n\n\t\treturn this;\n\n\t}\n\n\tsetFromMatrix3( m ) {\n\n\t\tconst me = m.elements;\n\n\t\tthis.set(\n\n\t\t\tme[ 0 ], me[ 3 ], me[ 6 ], 0,\n\t\t\tme[ 1 ], me[ 4 ], me[ 7 ], 0,\n\t\t\tme[ 2 ], me[ 5 ], me[ 8 ], 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\textractBasis( xAxis, yAxis, zAxis ) {\n\n\t\txAxis.setFromMatrixColumn( this, 0 );\n\t\tyAxis.setFromMatrixColumn( this, 1 );\n\t\tzAxis.setFromMatrixColumn( this, 2 );\n\n\t\treturn this;\n\n\t}\n\n\tmakeBasis( xAxis, yAxis, zAxis ) {\n\n\t\tthis.set(\n\t\t\txAxis.x, yAxis.x, zAxis.x, 0,\n\t\t\txAxis.y, yAxis.y, zAxis.y, 0,\n\t\t\txAxis.z, yAxis.z, zAxis.z, 0,\n\t\t\t0, 0, 0, 1\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\textractRotation( m ) {\n\n\t\t// this method does not support reflection matrices\n\n\t\tconst te = this.elements;\n\t\tconst me = m.elements;\n\n\t\tconst scaleX = 1 / _v1$5.setFromMatrixColumn( m, 0 ).length();\n\t\tconst scaleY = 1 / _v1$5.setFromMatrixColumn( m, 1 ).length();\n\t\tconst scaleZ = 1 / _v1$5.setFromMatrixColumn( m, 2 ).length();\n\n\t\tte[ 0 ] = me[ 0 ] * scaleX;\n\t\tte[ 1 ] = me[ 1 ] * scaleX;\n\t\tte[ 2 ] = me[ 2 ] * scaleX;\n\t\tte[ 3 ] = 0;\n\n\t\tte[ 4 ] = me[ 4 ] * scaleY;\n\t\tte[ 5 ] = me[ 5 ] * scaleY;\n\t\tte[ 6 ] = me[ 6 ] * scaleY;\n\t\tte[ 7 ] = 0;\n\n\t\tte[ 8 ] = me[ 8 ] * scaleZ;\n\t\tte[ 9 ] = me[ 9 ] * scaleZ;\n\t\tte[ 10 ] = me[ 10 ] * scaleZ;\n\t\tte[ 11 ] = 0;\n\n\t\tte[ 12 ] = 0;\n\t\tte[ 13 ] = 0;\n\t\tte[ 14 ] = 0;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationFromEuler( euler ) {\n\n\t\tif ( ! ( euler && euler.isEuler ) ) {\n\n\t\t\tconsole.error( 'THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.' );\n\n\t\t}\n\n\t\tconst te = this.elements;\n\n\t\tconst x = euler.x, y = euler.y, z = euler.z;\n\t\tconst a = Math.cos( x ), b = Math.sin( x );\n\t\tconst c = Math.cos( y ), d = Math.sin( y );\n\t\tconst e = Math.cos( z ), f = Math.sin( z );\n\n\t\tif ( euler.order === 'XYZ' ) {\n\n\t\t\tconst ae = a * e, af = a * f, be = b * e, bf = b * f;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = - c * f;\n\t\t\tte[ 8 ] = d;\n\n\t\t\tte[ 1 ] = af + be * d;\n\t\t\tte[ 5 ] = ae - bf * d;\n\t\t\tte[ 9 ] = - b * c;\n\n\t\t\tte[ 2 ] = bf - ae * d;\n\t\t\tte[ 6 ] = be + af * d;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'YXZ' ) {\n\n\t\t\tconst ce = c * e, cf = c * f, de = d * e, df = d * f;\n\n\t\t\tte[ 0 ] = ce + df * b;\n\t\t\tte[ 4 ] = de * b - cf;\n\t\t\tte[ 8 ] = a * d;\n\n\t\t\tte[ 1 ] = a * f;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = - b;\n\n\t\t\tte[ 2 ] = cf * b - de;\n\t\t\tte[ 6 ] = df + ce * b;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'ZXY' ) {\n\n\t\t\tconst ce = c * e, cf = c * f, de = d * e, df = d * f;\n\n\t\t\tte[ 0 ] = ce - df * b;\n\t\t\tte[ 4 ] = - a * f;\n\t\t\tte[ 8 ] = de + cf * b;\n\n\t\t\tte[ 1 ] = cf + de * b;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = df - ce * b;\n\n\t\t\tte[ 2 ] = - a * d;\n\t\t\tte[ 6 ] = b;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'ZYX' ) {\n\n\t\t\tconst ae = a * e, af = a * f, be = b * e, bf = b * f;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = be * d - af;\n\t\t\tte[ 8 ] = ae * d + bf;\n\n\t\t\tte[ 1 ] = c * f;\n\t\t\tte[ 5 ] = bf * d + ae;\n\t\t\tte[ 9 ] = af * d - be;\n\n\t\t\tte[ 2 ] = - d;\n\t\t\tte[ 6 ] = b * c;\n\t\t\tte[ 10 ] = a * c;\n\n\t\t} else if ( euler.order === 'YZX' ) {\n\n\t\t\tconst ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = bd - ac * f;\n\t\t\tte[ 8 ] = bc * f + ad;\n\n\t\t\tte[ 1 ] = f;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = - b * e;\n\n\t\t\tte[ 2 ] = - d * e;\n\t\t\tte[ 6 ] = ad * f + bc;\n\t\t\tte[ 10 ] = ac - bd * f;\n\n\t\t} else if ( euler.order === 'XZY' ) {\n\n\t\t\tconst ac = a * c, ad = a * d, bc = b * c, bd = b * d;\n\n\t\t\tte[ 0 ] = c * e;\n\t\t\tte[ 4 ] = - f;\n\t\t\tte[ 8 ] = d * e;\n\n\t\t\tte[ 1 ] = ac * f + bd;\n\t\t\tte[ 5 ] = a * e;\n\t\t\tte[ 9 ] = ad * f - bc;\n\n\t\t\tte[ 2 ] = bc * f - ad;\n\t\t\tte[ 6 ] = b * e;\n\t\t\tte[ 10 ] = bd * f + ac;\n\n\t\t}\n\n\t\t// bottom row\n\t\tte[ 3 ] = 0;\n\t\tte[ 7 ] = 0;\n\t\tte[ 11 ] = 0;\n\n\t\t// last column\n\t\tte[ 12 ] = 0;\n\t\tte[ 13 ] = 0;\n\t\tte[ 14 ] = 0;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationFromQuaternion( q ) {\n\n\t\treturn this.compose( _zero, q, _one );\n\n\t}\n\n\tlookAt( eye, target, up ) {\n\n\t\tconst te = this.elements;\n\n\t\t_z.subVectors( eye, target );\n\n\t\tif ( _z.lengthSq() === 0 ) {\n\n\t\t\t// eye and target are in the same position\n\n\t\t\t_z.z = 1;\n\n\t\t}\n\n\t\t_z.normalize();\n\t\t_x.crossVectors( up, _z );\n\n\t\tif ( _x.lengthSq() === 0 ) {\n\n\t\t\t// up and z are parallel\n\n\t\t\tif ( Math.abs( up.z ) === 1 ) {\n\n\t\t\t\t_z.x += 0.0001;\n\n\t\t\t} else {\n\n\t\t\t\t_z.z += 0.0001;\n\n\t\t\t}\n\n\t\t\t_z.normalize();\n\t\t\t_x.crossVectors( up, _z );\n\n\t\t}\n\n\t\t_x.normalize();\n\t\t_y.crossVectors( _z, _x );\n\n\t\tte[ 0 ] = _x.x; te[ 4 ] = _y.x; te[ 8 ] = _z.x;\n\t\tte[ 1 ] = _x.y; te[ 5 ] = _y.y; te[ 9 ] = _z.y;\n\t\tte[ 2 ] = _x.z; te[ 6 ] = _y.z; te[ 10 ] = _z.z;\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( m, n ) {\n\n\t\tif ( n !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.' );\n\t\t\treturn this.multiplyMatrices( m, n );\n\n\t\t}\n\n\t\treturn this.multiplyMatrices( this, m );\n\n\t}\n\n\tpremultiply( m ) {\n\n\t\treturn this.multiplyMatrices( m, this );\n\n\t}\n\n\tmultiplyMatrices( a, b ) {\n\n\t\tconst ae = a.elements;\n\t\tconst be = b.elements;\n\t\tconst te = this.elements;\n\n\t\tconst a11 = ae[ 0 ], a12 = ae[ 4 ], a13 = ae[ 8 ], a14 = ae[ 12 ];\n\t\tconst a21 = ae[ 1 ], a22 = ae[ 5 ], a23 = ae[ 9 ], a24 = ae[ 13 ];\n\t\tconst a31 = ae[ 2 ], a32 = ae[ 6 ], a33 = ae[ 10 ], a34 = ae[ 14 ];\n\t\tconst a41 = ae[ 3 ], a42 = ae[ 7 ], a43 = ae[ 11 ], a44 = ae[ 15 ];\n\n\t\tconst b11 = be[ 0 ], b12 = be[ 4 ], b13 = be[ 8 ], b14 = be[ 12 ];\n\t\tconst b21 = be[ 1 ], b22 = be[ 5 ], b23 = be[ 9 ], b24 = be[ 13 ];\n\t\tconst b31 = be[ 2 ], b32 = be[ 6 ], b33 = be[ 10 ], b34 = be[ 14 ];\n\t\tconst b41 = be[ 3 ], b42 = be[ 7 ], b43 = be[ 11 ], b44 = be[ 15 ];\n\n\t\tte[ 0 ] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n\t\tte[ 4 ] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n\t\tte[ 8 ] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n\t\tte[ 12 ] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n\n\t\tte[ 1 ] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n\t\tte[ 5 ] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n\t\tte[ 9 ] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n\t\tte[ 13 ] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n\n\t\tte[ 2 ] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n\t\tte[ 6 ] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n\t\tte[ 10 ] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n\t\tte[ 14 ] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n\n\t\tte[ 3 ] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n\t\tte[ 7 ] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n\t\tte[ 11 ] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n\t\tte[ 15 ] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tconst te = this.elements;\n\n\t\tte[ 0 ] *= s; te[ 4 ] *= s; te[ 8 ] *= s; te[ 12 ] *= s;\n\t\tte[ 1 ] *= s; te[ 5 ] *= s; te[ 9 ] *= s; te[ 13 ] *= s;\n\t\tte[ 2 ] *= s; te[ 6 ] *= s; te[ 10 ] *= s; te[ 14 ] *= s;\n\t\tte[ 3 ] *= s; te[ 7 ] *= s; te[ 11 ] *= s; te[ 15 ] *= s;\n\n\t\treturn this;\n\n\t}\n\n\tdeterminant() {\n\n\t\tconst te = this.elements;\n\n\t\tconst n11 = te[ 0 ], n12 = te[ 4 ], n13 = te[ 8 ], n14 = te[ 12 ];\n\t\tconst n21 = te[ 1 ], n22 = te[ 5 ], n23 = te[ 9 ], n24 = te[ 13 ];\n\t\tconst n31 = te[ 2 ], n32 = te[ 6 ], n33 = te[ 10 ], n34 = te[ 14 ];\n\t\tconst n41 = te[ 3 ], n42 = te[ 7 ], n43 = te[ 11 ], n44 = te[ 15 ];\n\n\t\t//TODO: make this more efficient\n\t\t//( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )\n\n\t\treturn (\n\t\t\tn41 * (\n\t\t\t\t+ n14 * n23 * n32\n\t\t\t\t - n13 * n24 * n32\n\t\t\t\t - n14 * n22 * n33\n\t\t\t\t + n12 * n24 * n33\n\t\t\t\t + n13 * n22 * n34\n\t\t\t\t - n12 * n23 * n34\n\t\t\t) +\n\t\t\tn42 * (\n\t\t\t\t+ n11 * n23 * n34\n\t\t\t\t - n11 * n24 * n33\n\t\t\t\t + n14 * n21 * n33\n\t\t\t\t - n13 * n21 * n34\n\t\t\t\t + n13 * n24 * n31\n\t\t\t\t - n14 * n23 * n31\n\t\t\t) +\n\t\t\tn43 * (\n\t\t\t\t+ n11 * n24 * n32\n\t\t\t\t - n11 * n22 * n34\n\t\t\t\t - n14 * n21 * n32\n\t\t\t\t + n12 * n21 * n34\n\t\t\t\t + n14 * n22 * n31\n\t\t\t\t - n12 * n24 * n31\n\t\t\t) +\n\t\t\tn44 * (\n\t\t\t\t- n13 * n22 * n31\n\t\t\t\t - n11 * n23 * n32\n\t\t\t\t + n11 * n22 * n33\n\t\t\t\t + n13 * n21 * n32\n\t\t\t\t - n12 * n21 * n33\n\t\t\t\t + n12 * n23 * n31\n\t\t\t)\n\n\t\t);\n\n\t}\n\n\ttranspose() {\n\n\t\tconst te = this.elements;\n\t\tlet tmp;\n\n\t\ttmp = te[ 1 ]; te[ 1 ] = te[ 4 ]; te[ 4 ] = tmp;\n\t\ttmp = te[ 2 ]; te[ 2 ] = te[ 8 ]; te[ 8 ] = tmp;\n\t\ttmp = te[ 6 ]; te[ 6 ] = te[ 9 ]; te[ 9 ] = tmp;\n\n\t\ttmp = te[ 3 ]; te[ 3 ] = te[ 12 ]; te[ 12 ] = tmp;\n\t\ttmp = te[ 7 ]; te[ 7 ] = te[ 13 ]; te[ 13 ] = tmp;\n\t\ttmp = te[ 11 ]; te[ 11 ] = te[ 14 ]; te[ 14 ] = tmp;\n\n\t\treturn this;\n\n\t}\n\n\tsetPosition( x, y, z ) {\n\n\t\tconst te = this.elements;\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\tte[ 12 ] = x.x;\n\t\t\tte[ 13 ] = x.y;\n\t\t\tte[ 14 ] = x.z;\n\n\t\t} else {\n\n\t\t\tte[ 12 ] = x;\n\t\t\tte[ 13 ] = y;\n\t\t\tte[ 14 ] = z;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tinvert() {\n\n\t\t// based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n\t\tconst te = this.elements,\n\n\t\t\tn11 = te[ 0 ], n21 = te[ 1 ], n31 = te[ 2 ], n41 = te[ 3 ],\n\t\t\tn12 = te[ 4 ], n22 = te[ 5 ], n32 = te[ 6 ], n42 = te[ 7 ],\n\t\t\tn13 = te[ 8 ], n23 = te[ 9 ], n33 = te[ 10 ], n43 = te[ 11 ],\n\t\t\tn14 = te[ 12 ], n24 = te[ 13 ], n34 = te[ 14 ], n44 = te[ 15 ],\n\n\t\t\tt11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44,\n\t\t\tt12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44,\n\t\t\tt13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44,\n\t\t\tt14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n\n\t\tconst det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\n\n\t\tif ( det === 0 ) return this.set( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );\n\n\t\tconst detInv = 1 / det;\n\n\t\tte[ 0 ] = t11 * detInv;\n\t\tte[ 1 ] = ( n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44 ) * detInv;\n\t\tte[ 2 ] = ( n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44 ) * detInv;\n\t\tte[ 3 ] = ( n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43 ) * detInv;\n\n\t\tte[ 4 ] = t12 * detInv;\n\t\tte[ 5 ] = ( n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44 ) * detInv;\n\t\tte[ 6 ] = ( n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44 ) * detInv;\n\t\tte[ 7 ] = ( n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43 ) * detInv;\n\n\t\tte[ 8 ] = t13 * detInv;\n\t\tte[ 9 ] = ( n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44 ) * detInv;\n\t\tte[ 10 ] = ( n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44 ) * detInv;\n\t\tte[ 11 ] = ( n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43 ) * detInv;\n\n\t\tte[ 12 ] = t14 * detInv;\n\t\tte[ 13 ] = ( n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34 ) * detInv;\n\t\tte[ 14 ] = ( n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34 ) * detInv;\n\t\tte[ 15 ] = ( n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33 ) * detInv;\n\n\t\treturn this;\n\n\t}\n\n\tscale( v ) {\n\n\t\tconst te = this.elements;\n\t\tconst x = v.x, y = v.y, z = v.z;\n\n\t\tte[ 0 ] *= x; te[ 4 ] *= y; te[ 8 ] *= z;\n\t\tte[ 1 ] *= x; te[ 5 ] *= y; te[ 9 ] *= z;\n\t\tte[ 2 ] *= x; te[ 6 ] *= y; te[ 10 ] *= z;\n\t\tte[ 3 ] *= x; te[ 7 ] *= y; te[ 11 ] *= z;\n\n\t\treturn this;\n\n\t}\n\n\tgetMaxScaleOnAxis() {\n\n\t\tconst te = this.elements;\n\n\t\tconst scaleXSq = te[ 0 ] * te[ 0 ] + te[ 1 ] * te[ 1 ] + te[ 2 ] * te[ 2 ];\n\t\tconst scaleYSq = te[ 4 ] * te[ 4 ] + te[ 5 ] * te[ 5 ] + te[ 6 ] * te[ 6 ];\n\t\tconst scaleZSq = te[ 8 ] * te[ 8 ] + te[ 9 ] * te[ 9 ] + te[ 10 ] * te[ 10 ];\n\n\t\treturn Math.sqrt( Math.max( scaleXSq, scaleYSq, scaleZSq ) );\n\n\t}\n\n\tmakeTranslation( x, y, z ) {\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, x,\n\t\t\t0, 1, 0, y,\n\t\t\t0, 0, 1, z,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationX( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\t1, 0, 0, 0,\n\t\t\t0, c, - s, 0,\n\t\t\t0, s, c, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationY( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\t c, 0, s, 0,\n\t\t\t 0, 1, 0, 0,\n\t\t\t- s, 0, c, 0,\n\t\t\t 0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationZ( theta ) {\n\n\t\tconst c = Math.cos( theta ), s = Math.sin( theta );\n\n\t\tthis.set(\n\n\t\t\tc, - s, 0, 0,\n\t\t\ts, c, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeRotationAxis( axis, angle ) {\n\n\t\t// Based on http://www.gamedev.net/reference/articles/article1199.asp\n\n\t\tconst c = Math.cos( angle );\n\t\tconst s = Math.sin( angle );\n\t\tconst t = 1 - c;\n\t\tconst x = axis.x, y = axis.y, z = axis.z;\n\t\tconst tx = t * x, ty = t * y;\n\n\t\tthis.set(\n\n\t\t\ttx * x + c, tx * y - s * z, tx * z + s * y, 0,\n\t\t\ttx * y + s * z, ty * y + c, ty * z - s * x, 0,\n\t\t\ttx * z - s * y, ty * z + s * x, t * z * z + c, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeScale( x, y, z ) {\n\n\t\tthis.set(\n\n\t\t\tx, 0, 0, 0,\n\t\t\t0, y, 0, 0,\n\t\t\t0, 0, z, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tmakeShear( xy, xz, yx, yz, zx, zy ) {\n\n\t\tthis.set(\n\n\t\t\t1, yx, zx, 0,\n\t\t\txy, 1, zy, 0,\n\t\t\txz, yz, 1, 0,\n\t\t\t0, 0, 0, 1\n\n\t\t);\n\n\t\treturn this;\n\n\t}\n\n\tcompose( position, quaternion, scale ) {\n\n\t\tconst te = this.elements;\n\n\t\tconst x = quaternion._x, y = quaternion._y, z = quaternion._z, w = quaternion._w;\n\t\tconst x2 = x + x,\ty2 = y + y, z2 = z + z;\n\t\tconst xx = x * x2, xy = x * y2, xz = x * z2;\n\t\tconst yy = y * y2, yz = y * z2, zz = z * z2;\n\t\tconst wx = w * x2, wy = w * y2, wz = w * z2;\n\n\t\tconst sx = scale.x, sy = scale.y, sz = scale.z;\n\n\t\tte[ 0 ] = ( 1 - ( yy + zz ) ) * sx;\n\t\tte[ 1 ] = ( xy + wz ) * sx;\n\t\tte[ 2 ] = ( xz - wy ) * sx;\n\t\tte[ 3 ] = 0;\n\n\t\tte[ 4 ] = ( xy - wz ) * sy;\n\t\tte[ 5 ] = ( 1 - ( xx + zz ) ) * sy;\n\t\tte[ 6 ] = ( yz + wx ) * sy;\n\t\tte[ 7 ] = 0;\n\n\t\tte[ 8 ] = ( xz + wy ) * sz;\n\t\tte[ 9 ] = ( yz - wx ) * sz;\n\t\tte[ 10 ] = ( 1 - ( xx + yy ) ) * sz;\n\t\tte[ 11 ] = 0;\n\n\t\tte[ 12 ] = position.x;\n\t\tte[ 13 ] = position.y;\n\t\tte[ 14 ] = position.z;\n\t\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tdecompose( position, quaternion, scale ) {\n\n\t\tconst te = this.elements;\n\n\t\tlet sx = _v1$5.set( te[ 0 ], te[ 1 ], te[ 2 ] ).length();\n\t\tconst sy = _v1$5.set( te[ 4 ], te[ 5 ], te[ 6 ] ).length();\n\t\tconst sz = _v1$5.set( te[ 8 ], te[ 9 ], te[ 10 ] ).length();\n\n\t\t// if determine is negative, we need to invert one scale\n\t\tconst det = this.determinant();\n\t\tif ( det < 0 ) sx = - sx;\n\n\t\tposition.x = te[ 12 ];\n\t\tposition.y = te[ 13 ];\n\t\tposition.z = te[ 14 ];\n\n\t\t// scale the rotation part\n\t\t_m1$2.copy( this );\n\n\t\tconst invSX = 1 / sx;\n\t\tconst invSY = 1 / sy;\n\t\tconst invSZ = 1 / sz;\n\n\t\t_m1$2.elements[ 0 ] *= invSX;\n\t\t_m1$2.elements[ 1 ] *= invSX;\n\t\t_m1$2.elements[ 2 ] *= invSX;\n\n\t\t_m1$2.elements[ 4 ] *= invSY;\n\t\t_m1$2.elements[ 5 ] *= invSY;\n\t\t_m1$2.elements[ 6 ] *= invSY;\n\n\t\t_m1$2.elements[ 8 ] *= invSZ;\n\t\t_m1$2.elements[ 9 ] *= invSZ;\n\t\t_m1$2.elements[ 10 ] *= invSZ;\n\n\t\tquaternion.setFromRotationMatrix( _m1$2 );\n\n\t\tscale.x = sx;\n\t\tscale.y = sy;\n\t\tscale.z = sz;\n\n\t\treturn this;\n\n\t}\n\n\tmakePerspective( left, right, top, bottom, near, far ) {\n\n\t\tif ( far === undefined ) {\n\n\t\t\tconsole.warn( 'THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.' );\n\n\t\t}\n\n\t\tconst te = this.elements;\n\t\tconst x = 2 * near / ( right - left );\n\t\tconst y = 2 * near / ( top - bottom );\n\n\t\tconst a = ( right + left ) / ( right - left );\n\t\tconst b = ( top + bottom ) / ( top - bottom );\n\t\tconst c = - ( far + near ) / ( far - near );\n\t\tconst d = - 2 * far * near / ( far - near );\n\n\t\tte[ 0 ] = x;\tte[ 4 ] = 0;\tte[ 8 ] = a;\tte[ 12 ] = 0;\n\t\tte[ 1 ] = 0;\tte[ 5 ] = y;\tte[ 9 ] = b;\tte[ 13 ] = 0;\n\t\tte[ 2 ] = 0;\tte[ 6 ] = 0;\tte[ 10 ] = c;\tte[ 14 ] = d;\n\t\tte[ 3 ] = 0;\tte[ 7 ] = 0;\tte[ 11 ] = - 1;\tte[ 15 ] = 0;\n\n\t\treturn this;\n\n\t}\n\n\tmakeOrthographic( left, right, top, bottom, near, far ) {\n\n\t\tconst te = this.elements;\n\t\tconst w = 1.0 / ( right - left );\n\t\tconst h = 1.0 / ( top - bottom );\n\t\tconst p = 1.0 / ( far - near );\n\n\t\tconst x = ( right + left ) * w;\n\t\tconst y = ( top + bottom ) * h;\n\t\tconst z = ( far + near ) * p;\n\n\t\tte[ 0 ] = 2 * w;\tte[ 4 ] = 0;\tte[ 8 ] = 0;\tte[ 12 ] = - x;\n\t\tte[ 1 ] = 0;\tte[ 5 ] = 2 * h;\tte[ 9 ] = 0;\tte[ 13 ] = - y;\n\t\tte[ 2 ] = 0;\tte[ 6 ] = 0;\tte[ 10 ] = - 2 * p;\tte[ 14 ] = - z;\n\t\tte[ 3 ] = 0;\tte[ 7 ] = 0;\tte[ 11 ] = 0;\tte[ 15 ] = 1;\n\n\t\treturn this;\n\n\t}\n\n\tequals( matrix ) {\n\n\t\tconst te = this.elements;\n\t\tconst me = matrix.elements;\n\n\t\tfor ( let i = 0; i < 16; i ++ ) {\n\n\t\t\tif ( te[ i ] !== me[ i ] ) return false;\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tfor ( let i = 0; i < 16; i ++ ) {\n\n\t\t\tthis.elements[ i ] = array[ i + offset ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst te = this.elements;\n\n\t\tarray[ offset ] = te[ 0 ];\n\t\tarray[ offset + 1 ] = te[ 1 ];\n\t\tarray[ offset + 2 ] = te[ 2 ];\n\t\tarray[ offset + 3 ] = te[ 3 ];\n\n\t\tarray[ offset + 4 ] = te[ 4 ];\n\t\tarray[ offset + 5 ] = te[ 5 ];\n\t\tarray[ offset + 6 ] = te[ 6 ];\n\t\tarray[ offset + 7 ] = te[ 7 ];\n\n\t\tarray[ offset + 8 ] = te[ 8 ];\n\t\tarray[ offset + 9 ] = te[ 9 ];\n\t\tarray[ offset + 10 ] = te[ 10 ];\n\t\tarray[ offset + 11 ] = te[ 11 ];\n\n\t\tarray[ offset + 12 ] = te[ 12 ];\n\t\tarray[ offset + 13 ] = te[ 13 ];\n\t\tarray[ offset + 14 ] = te[ 14 ];\n\t\tarray[ offset + 15 ] = te[ 15 ];\n\n\t\treturn array;\n\n\t}\n\n}\n\nMatrix4.prototype.isMatrix4 = true;\n\nconst _v1$5 = /*@__PURE__*/ new Vector3();\nconst _m1$2 = /*@__PURE__*/ new Matrix4();\nconst _zero = /*@__PURE__*/ new Vector3( 0, 0, 0 );\nconst _one = /*@__PURE__*/ new Vector3( 1, 1, 1 );\nconst _x = /*@__PURE__*/ new Vector3();\nconst _y = /*@__PURE__*/ new Vector3();\nconst _z = /*@__PURE__*/ new Vector3();\n\nconst _matrix$1 = /*@__PURE__*/ new Matrix4();\nconst _quaternion$3 = /*@__PURE__*/ new Quaternion();\n\nclass Euler {\n\n\tconstructor( x = 0, y = 0, z = 0, order = Euler.DefaultOrder ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._order = order;\n\n\t}\n\n\tget x() {\n\n\t\treturn this._x;\n\n\t}\n\n\tset x( value ) {\n\n\t\tthis._x = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget y() {\n\n\t\treturn this._y;\n\n\t}\n\n\tset y( value ) {\n\n\t\tthis._y = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget z() {\n\n\t\treturn this._z;\n\n\t}\n\n\tset z( value ) {\n\n\t\tthis._z = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tget order() {\n\n\t\treturn this._order;\n\n\t}\n\n\tset order( value ) {\n\n\t\tthis._order = value;\n\t\tthis._onChangeCallback();\n\n\t}\n\n\tset( x, y, z, order = this._order ) {\n\n\t\tthis._x = x;\n\t\tthis._y = y;\n\t\tthis._z = z;\n\t\tthis._order = order;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this._x, this._y, this._z, this._order );\n\n\t}\n\n\tcopy( euler ) {\n\n\t\tthis._x = euler._x;\n\t\tthis._y = euler._y;\n\t\tthis._z = euler._z;\n\t\tthis._order = euler._order;\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromRotationMatrix( m, order = this._order, update = true ) {\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tconst te = m.elements;\n\t\tconst m11 = te[ 0 ], m12 = te[ 4 ], m13 = te[ 8 ];\n\t\tconst m21 = te[ 1 ], m22 = te[ 5 ], m23 = te[ 9 ];\n\t\tconst m31 = te[ 2 ], m32 = te[ 6 ], m33 = te[ 10 ];\n\n\t\tswitch ( order ) {\n\n\t\t\tcase 'XYZ':\n\n\t\t\t\tthis._y = Math.asin( clamp( m13, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m13 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m33 );\n\t\t\t\t\tthis._z = Math.atan2( - m12, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m22 );\n\t\t\t\t\tthis._z = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'YXZ':\n\n\t\t\t\tthis._x = Math.asin( - clamp( m23, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m23 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._y = Math.atan2( m13, m33 );\n\t\t\t\t\tthis._z = Math.atan2( m21, m22 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._y = Math.atan2( - m31, m11 );\n\t\t\t\t\tthis._z = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZXY':\n\n\t\t\t\tthis._x = Math.asin( clamp( m32, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m32 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._y = Math.atan2( - m31, m33 );\n\t\t\t\t\tthis._z = Math.atan2( - m12, m22 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._y = 0;\n\t\t\t\t\tthis._z = Math.atan2( m21, m11 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'ZYX':\n\n\t\t\t\tthis._y = Math.asin( - clamp( m31, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m31 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m33 );\n\t\t\t\t\tthis._z = Math.atan2( m21, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._z = Math.atan2( - m12, m22 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'YZX':\n\n\t\t\t\tthis._z = Math.asin( clamp( m21, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m21 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m22 );\n\t\t\t\t\tthis._y = Math.atan2( - m31, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._y = Math.atan2( m13, m33 );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'XZY':\n\n\t\t\t\tthis._z = Math.asin( - clamp( m12, - 1, 1 ) );\n\n\t\t\t\tif ( Math.abs( m12 ) < 0.9999999 ) {\n\n\t\t\t\t\tthis._x = Math.atan2( m32, m22 );\n\t\t\t\t\tthis._y = Math.atan2( m13, m11 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis._x = Math.atan2( - m23, m33 );\n\t\t\t\t\tthis._y = 0;\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tconsole.warn( 'THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order );\n\n\t\t}\n\n\t\tthis._order = order;\n\n\t\tif ( update === true ) this._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\tsetFromQuaternion( q, order, update ) {\n\n\t\t_matrix$1.makeRotationFromQuaternion( q );\n\n\t\treturn this.setFromRotationMatrix( _matrix$1, order, update );\n\n\t}\n\n\tsetFromVector3( v, order = this._order ) {\n\n\t\treturn this.set( v.x, v.y, v.z, order );\n\n\t}\n\n\treorder( newOrder ) {\n\n\t\t// WARNING: this discards revolution information -bhouston\n\n\t\t_quaternion$3.setFromEuler( this );\n\n\t\treturn this.setFromQuaternion( _quaternion$3, newOrder );\n\n\t}\n\n\tequals( euler ) {\n\n\t\treturn ( euler._x === this._x ) && ( euler._y === this._y ) && ( euler._z === this._z ) && ( euler._order === this._order );\n\n\t}\n\n\tfromArray( array ) {\n\n\t\tthis._x = array[ 0 ];\n\t\tthis._y = array[ 1 ];\n\t\tthis._z = array[ 2 ];\n\t\tif ( array[ 3 ] !== undefined ) this._order = array[ 3 ];\n\n\t\tthis._onChangeCallback();\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this._x;\n\t\tarray[ offset + 1 ] = this._y;\n\t\tarray[ offset + 2 ] = this._z;\n\t\tarray[ offset + 3 ] = this._order;\n\n\t\treturn array;\n\n\t}\n\n\ttoVector3( optionalResult ) {\n\n\t\tif ( optionalResult ) {\n\n\t\t\treturn optionalResult.set( this._x, this._y, this._z );\n\n\t\t} else {\n\n\t\t\treturn new Vector3( this._x, this._y, this._z );\n\n\t\t}\n\n\t}\n\n\t_onChange( callback ) {\n\n\t\tthis._onChangeCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\t_onChangeCallback() {}\n\n}\n\nEuler.prototype.isEuler = true;\n\nEuler.DefaultOrder = 'XYZ';\nEuler.RotationOrders = [ 'XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX' ];\n\nclass Layers {\n\n\tconstructor() {\n\n\t\tthis.mask = 1 | 0;\n\n\t}\n\n\tset( channel ) {\n\n\t\tthis.mask = 1 << channel | 0;\n\n\t}\n\n\tenable( channel ) {\n\n\t\tthis.mask |= 1 << channel | 0;\n\n\t}\n\n\tenableAll() {\n\n\t\tthis.mask = 0xffffffff | 0;\n\n\t}\n\n\ttoggle( channel ) {\n\n\t\tthis.mask ^= 1 << channel | 0;\n\n\t}\n\n\tdisable( channel ) {\n\n\t\tthis.mask &= ~ ( 1 << channel | 0 );\n\n\t}\n\n\tdisableAll() {\n\n\t\tthis.mask = 0;\n\n\t}\n\n\ttest( layers ) {\n\n\t\treturn ( this.mask & layers.mask ) !== 0;\n\n\t}\n\n}\n\nlet _object3DId = 0;\n\nconst _v1$4 = /*@__PURE__*/ new Vector3();\nconst _q1 = /*@__PURE__*/ new Quaternion();\nconst _m1$1 = /*@__PURE__*/ new Matrix4();\nconst _target = /*@__PURE__*/ new Vector3();\n\nconst _position$3 = /*@__PURE__*/ new Vector3();\nconst _scale$2 = /*@__PURE__*/ new Vector3();\nconst _quaternion$2 = /*@__PURE__*/ new Quaternion();\n\nconst _xAxis = /*@__PURE__*/ new Vector3( 1, 0, 0 );\nconst _yAxis = /*@__PURE__*/ new Vector3( 0, 1, 0 );\nconst _zAxis = /*@__PURE__*/ new Vector3( 0, 0, 1 );\n\nconst _addedEvent = { type: 'added' };\nconst _removedEvent = { type: 'removed' };\n\nclass Object3D extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tObject.defineProperty( this, 'id', { value: _object3DId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Object3D';\n\n\t\tthis.parent = null;\n\t\tthis.children = [];\n\n\t\tthis.up = Object3D.DefaultUp.clone();\n\n\t\tconst position = new Vector3();\n\t\tconst rotation = new Euler();\n\t\tconst quaternion = new Quaternion();\n\t\tconst scale = new Vector3( 1, 1, 1 );\n\n\t\tfunction onRotationChange() {\n\n\t\t\tquaternion.setFromEuler( rotation, false );\n\n\t\t}\n\n\t\tfunction onQuaternionChange() {\n\n\t\t\trotation.setFromQuaternion( quaternion, undefined, false );\n\n\t\t}\n\n\t\trotation._onChange( onRotationChange );\n\t\tquaternion._onChange( onQuaternionChange );\n\n\t\tObject.defineProperties( this, {\n\t\t\tposition: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: position\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: rotation\n\t\t\t},\n\t\t\tquaternion: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: quaternion\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: scale\n\t\t\t},\n\t\t\tmodelViewMatrix: {\n\t\t\t\tvalue: new Matrix4()\n\t\t\t},\n\t\t\tnormalMatrix: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t} );\n\n\t\tthis.matrix = new Matrix4();\n\t\tthis.matrixWorld = new Matrix4();\n\n\t\tthis.matrixAutoUpdate = Object3D.DefaultMatrixAutoUpdate;\n\t\tthis.matrixWorldNeedsUpdate = false;\n\n\t\tthis.layers = new Layers();\n\t\tthis.visible = true;\n\n\t\tthis.castShadow = false;\n\t\tthis.receiveShadow = false;\n\n\t\tthis.frustumCulled = true;\n\t\tthis.renderOrder = 0;\n\n\t\tthis.animations = [];\n\n\t\tthis.userData = {};\n\n\t}\n\n\tonBeforeRender() {}\n\tonAfterRender() {}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tthis.matrix.premultiply( matrix );\n\n\t\tthis.matrix.decompose( this.position, this.quaternion, this.scale );\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\tthis.quaternion.premultiply( q );\n\n\t\treturn this;\n\n\t}\n\n\tsetRotationFromAxisAngle( axis, angle ) {\n\n\t\t// assumes axis is normalized\n\n\t\tthis.quaternion.setFromAxisAngle( axis, angle );\n\n\t}\n\n\tsetRotationFromEuler( euler ) {\n\n\t\tthis.quaternion.setFromEuler( euler, true );\n\n\t}\n\n\tsetRotationFromMatrix( m ) {\n\n\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\tthis.quaternion.setFromRotationMatrix( m );\n\n\t}\n\n\tsetRotationFromQuaternion( q ) {\n\n\t\t// assumes q is normalized\n\n\t\tthis.quaternion.copy( q );\n\n\t}\n\n\trotateOnAxis( axis, angle ) {\n\n\t\t// rotate object on axis in object space\n\t\t// axis is assumed to be normalized\n\n\t\t_q1.setFromAxisAngle( axis, angle );\n\n\t\tthis.quaternion.multiply( _q1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateOnWorldAxis( axis, angle ) {\n\n\t\t// rotate object on axis in world space\n\t\t// axis is assumed to be normalized\n\t\t// method assumes no rotated parent\n\n\t\t_q1.setFromAxisAngle( axis, angle );\n\n\t\tthis.quaternion.premultiply( _q1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateX( angle ) {\n\n\t\treturn this.rotateOnAxis( _xAxis, angle );\n\n\t}\n\n\trotateY( angle ) {\n\n\t\treturn this.rotateOnAxis( _yAxis, angle );\n\n\t}\n\n\trotateZ( angle ) {\n\n\t\treturn this.rotateOnAxis( _zAxis, angle );\n\n\t}\n\n\ttranslateOnAxis( axis, distance ) {\n\n\t\t// translate object by distance along axis in object space\n\t\t// axis is assumed to be normalized\n\n\t\t_v1$4.copy( axis ).applyQuaternion( this.quaternion );\n\n\t\tthis.position.add( _v1$4.multiplyScalar( distance ) );\n\n\t\treturn this;\n\n\t}\n\n\ttranslateX( distance ) {\n\n\t\treturn this.translateOnAxis( _xAxis, distance );\n\n\t}\n\n\ttranslateY( distance ) {\n\n\t\treturn this.translateOnAxis( _yAxis, distance );\n\n\t}\n\n\ttranslateZ( distance ) {\n\n\t\treturn this.translateOnAxis( _zAxis, distance );\n\n\t}\n\n\tlocalToWorld( vector ) {\n\n\t\treturn vector.applyMatrix4( this.matrixWorld );\n\n\t}\n\n\tworldToLocal( vector ) {\n\n\t\treturn vector.applyMatrix4( _m1$1.copy( this.matrixWorld ).invert() );\n\n\t}\n\n\tlookAt( x, y, z ) {\n\n\t\t// This method does not support objects having non-uniformly-scaled parent(s)\n\n\t\tif ( x.isVector3 ) {\n\n\t\t\t_target.copy( x );\n\n\t\t} else {\n\n\t\t\t_target.set( x, y, z );\n\n\t\t}\n\n\t\tconst parent = this.parent;\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\t_position$3.setFromMatrixPosition( this.matrixWorld );\n\n\t\tif ( this.isCamera || this.isLight ) {\n\n\t\t\t_m1$1.lookAt( _position$3, _target, this.up );\n\n\t\t} else {\n\n\t\t\t_m1$1.lookAt( _target, _position$3, this.up );\n\n\t\t}\n\n\t\tthis.quaternion.setFromRotationMatrix( _m1$1 );\n\n\t\tif ( parent ) {\n\n\t\t\t_m1$1.extractRotation( parent.matrixWorld );\n\t\t\t_q1.setFromRotationMatrix( _m1$1 );\n\t\t\tthis.quaternion.premultiply( _q1.invert() );\n\n\t\t}\n\n\t}\n\n\tadd( object ) {\n\n\t\tif ( arguments.length > 1 ) {\n\n\t\t\tfor ( let i = 0; i < arguments.length; i ++ ) {\n\n\t\t\t\tthis.add( arguments[ i ] );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( object === this ) {\n\n\t\t\tconsole.error( 'THREE.Object3D.add: object can\\'t be added as a child of itself.', object );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tif ( object && object.isObject3D ) {\n\n\t\t\tif ( object.parent !== null ) {\n\n\t\t\t\tobject.parent.remove( object );\n\n\t\t\t}\n\n\t\t\tobject.parent = this;\n\t\t\tthis.children.push( object );\n\n\t\t\tobject.dispatchEvent( _addedEvent );\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Object3D.add: object not an instance of THREE.Object3D.', object );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremove( object ) {\n\n\t\tif ( arguments.length > 1 ) {\n\n\t\t\tfor ( let i = 0; i < arguments.length; i ++ ) {\n\n\t\t\t\tthis.remove( arguments[ i ] );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst index = this.children.indexOf( object );\n\n\t\tif ( index !== - 1 ) {\n\n\t\t\tobject.parent = null;\n\t\t\tthis.children.splice( index, 1 );\n\n\t\t\tobject.dispatchEvent( _removedEvent );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tremoveFromParent() {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( parent !== null ) {\n\n\t\t\tparent.remove( this );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclear() {\n\n\t\tfor ( let i = 0; i < this.children.length; i ++ ) {\n\n\t\t\tconst object = this.children[ i ];\n\n\t\t\tobject.parent = null;\n\n\t\t\tobject.dispatchEvent( _removedEvent );\n\n\t\t}\n\n\t\tthis.children.length = 0;\n\n\t\treturn this;\n\n\n\t}\n\n\tattach( object ) {\n\n\t\t// adds object as a child of this, while maintaining the object's world transform\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\t_m1$1.copy( this.matrixWorld ).invert();\n\n\t\tif ( object.parent !== null ) {\n\n\t\t\tobject.parent.updateWorldMatrix( true, false );\n\n\t\t\t_m1$1.multiply( object.parent.matrixWorld );\n\n\t\t}\n\n\t\tobject.applyMatrix4( _m1$1 );\n\n\t\tthis.add( object );\n\n\t\tobject.updateWorldMatrix( false, true );\n\n\t\treturn this;\n\n\t}\n\n\tgetObjectById( id ) {\n\n\t\treturn this.getObjectByProperty( 'id', id );\n\n\t}\n\n\tgetObjectByName( name ) {\n\n\t\treturn this.getObjectByProperty( 'name', name );\n\n\t}\n\n\tgetObjectByProperty( name, value ) {\n\n\t\tif ( this[ name ] === value ) return this;\n\n\t\tfor ( let i = 0, l = this.children.length; i < l; i ++ ) {\n\n\t\t\tconst child = this.children[ i ];\n\t\t\tconst object = child.getObjectByProperty( name, value );\n\n\t\t\tif ( object !== undefined ) {\n\n\t\t\t\treturn object;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn undefined;\n\n\t}\n\n\tgetWorldPosition( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\treturn target.setFromMatrixPosition( this.matrixWorld );\n\n\t}\n\n\tgetWorldQuaternion( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tthis.matrixWorld.decompose( _position$3, target, _scale$2 );\n\n\t\treturn target;\n\n\t}\n\n\tgetWorldScale( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tthis.matrixWorld.decompose( _position$3, _quaternion$2, target );\n\n\t\treturn target;\n\n\t}\n\n\tgetWorldDirection( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tconst e = this.matrixWorld.elements;\n\n\t\treturn target.set( e[ 8 ], e[ 9 ], e[ 10 ] ).normalize();\n\n\t}\n\n\traycast() {}\n\n\ttraverse( callback ) {\n\n\t\tcallback( this );\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].traverse( callback );\n\n\t\t}\n\n\t}\n\n\ttraverseVisible( callback ) {\n\n\t\tif ( this.visible === false ) return;\n\n\t\tcallback( this );\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].traverseVisible( callback );\n\n\t\t}\n\n\t}\n\n\ttraverseAncestors( callback ) {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( parent !== null ) {\n\n\t\t\tcallback( parent );\n\n\t\t\tparent.traverseAncestors( callback );\n\n\t\t}\n\n\t}\n\n\tupdateMatrix() {\n\n\t\tthis.matrix.compose( this.position, this.quaternion, this.scale );\n\n\t\tthis.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tif ( this.matrixWorldNeedsUpdate || force ) {\n\n\t\t\tif ( this.parent === null ) {\n\n\t\t\t\tthis.matrixWorld.copy( this.matrix );\n\n\t\t\t} else {\n\n\t\t\t\tthis.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );\n\n\t\t\t}\n\n\t\t\tthis.matrixWorldNeedsUpdate = false;\n\n\t\t\tforce = true;\n\n\t\t}\n\n\t\t// update children\n\n\t\tconst children = this.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tchildren[ i ].updateMatrixWorld( force );\n\n\t\t}\n\n\t}\n\n\tupdateWorldMatrix( updateParents, updateChildren ) {\n\n\t\tconst parent = this.parent;\n\n\t\tif ( updateParents === true && parent !== null ) {\n\n\t\t\tparent.updateWorldMatrix( true, false );\n\n\t\t}\n\n\t\tif ( this.matrixAutoUpdate ) this.updateMatrix();\n\n\t\tif ( this.parent === null ) {\n\n\t\t\tthis.matrixWorld.copy( this.matrix );\n\n\t\t} else {\n\n\t\t\tthis.matrixWorld.multiplyMatrices( this.parent.matrixWorld, this.matrix );\n\n\t\t}\n\n\t\t// update children\n\n\t\tif ( updateChildren === true ) {\n\n\t\t\tconst children = this.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tchildren[ i ].updateWorldMatrix( false, true );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\t// meta is a string when called from JSON.stringify\n\t\tconst isRootObject = ( meta === undefined || typeof meta === 'string' );\n\n\t\tconst output = {};\n\n\t\t// meta is a hash used to collect geometries, materials.\n\t\t// not providing it implies that this is the root object\n\t\t// being serialized.\n\t\tif ( isRootObject ) {\n\n\t\t\t// initialize meta obj\n\t\t\tmeta = {\n\t\t\t\tgeometries: {},\n\t\t\t\tmaterials: {},\n\t\t\t\ttextures: {},\n\t\t\t\timages: {},\n\t\t\t\tshapes: {},\n\t\t\t\tskeletons: {},\n\t\t\t\tanimations: {}\n\t\t\t};\n\n\t\t\toutput.metadata = {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Object',\n\t\t\t\tgenerator: 'Object3D.toJSON'\n\t\t\t};\n\n\t\t}\n\n\t\t// standard Object3D serialization\n\n\t\tconst object = {};\n\n\t\tobject.uuid = this.uuid;\n\t\tobject.type = this.type;\n\n\t\tif ( this.name !== '' ) object.name = this.name;\n\t\tif ( this.castShadow === true ) object.castShadow = true;\n\t\tif ( this.receiveShadow === true ) object.receiveShadow = true;\n\t\tif ( this.visible === false ) object.visible = false;\n\t\tif ( this.frustumCulled === false ) object.frustumCulled = false;\n\t\tif ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder;\n\t\tif ( JSON.stringify( this.userData ) !== '{}' ) object.userData = this.userData;\n\n\t\tobject.layers = this.layers.mask;\n\t\tobject.matrix = this.matrix.toArray();\n\n\t\tif ( this.matrixAutoUpdate === false ) object.matrixAutoUpdate = false;\n\n\t\t// object specific properties\n\n\t\tif ( this.isInstancedMesh ) {\n\n\t\t\tobject.type = 'InstancedMesh';\n\t\t\tobject.count = this.count;\n\t\t\tobject.instanceMatrix = this.instanceMatrix.toJSON();\n\t\t\tif ( this.instanceColor !== null ) object.instanceColor = this.instanceColor.toJSON();\n\n\t\t}\n\n\t\t//\n\n\t\tfunction serialize( library, element ) {\n\n\t\t\tif ( library[ element.uuid ] === undefined ) {\n\n\t\t\t\tlibrary[ element.uuid ] = element.toJSON( meta );\n\n\t\t\t}\n\n\t\t\treturn element.uuid;\n\n\t\t}\n\n\t\tif ( this.isScene ) {\n\n\t\t\tif ( this.background ) {\n\n\t\t\t\tif ( this.background.isColor ) {\n\n\t\t\t\t\tobject.background = this.background.toJSON();\n\n\t\t\t\t} else if ( this.background.isTexture ) {\n\n\t\t\t\t\tobject.background = this.background.toJSON( meta ).uuid;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( this.environment && this.environment.isTexture ) {\n\n\t\t\t\tobject.environment = this.environment.toJSON( meta ).uuid;\n\n\t\t\t}\n\n\t\t} else if ( this.isMesh || this.isLine || this.isPoints ) {\n\n\t\t\tobject.geometry = serialize( meta.geometries, this.geometry );\n\n\t\t\tconst parameters = this.geometry.parameters;\n\n\t\t\tif ( parameters !== undefined && parameters.shapes !== undefined ) {\n\n\t\t\t\tconst shapes = parameters.shapes;\n\n\t\t\t\tif ( Array.isArray( shapes ) ) {\n\n\t\t\t\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\t\t\t\tconst shape = shapes[ i ];\n\n\t\t\t\t\t\tserialize( meta.shapes, shape );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tserialize( meta.shapes, shapes );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.isSkinnedMesh ) {\n\n\t\t\tobject.bindMode = this.bindMode;\n\t\t\tobject.bindMatrix = this.bindMatrix.toArray();\n\n\t\t\tif ( this.skeleton !== undefined ) {\n\n\t\t\t\tserialize( meta.skeletons, this.skeleton );\n\n\t\t\t\tobject.skeleton = this.skeleton.uuid;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.material !== undefined ) {\n\n\t\t\tif ( Array.isArray( this.material ) ) {\n\n\t\t\t\tconst uuids = [];\n\n\t\t\t\tfor ( let i = 0, l = this.material.length; i < l; i ++ ) {\n\n\t\t\t\t\tuuids.push( serialize( meta.materials, this.material[ i ] ) );\n\n\t\t\t\t}\n\n\t\t\t\tobject.material = uuids;\n\n\t\t\t} else {\n\n\t\t\t\tobject.material = serialize( meta.materials, this.material );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.children.length > 0 ) {\n\n\t\t\tobject.children = [];\n\n\t\t\tfor ( let i = 0; i < this.children.length; i ++ ) {\n\n\t\t\t\tobject.children.push( this.children[ i ].toJSON( meta ).object );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.animations.length > 0 ) {\n\n\t\t\tobject.animations = [];\n\n\t\t\tfor ( let i = 0; i < this.animations.length; i ++ ) {\n\n\t\t\t\tconst animation = this.animations[ i ];\n\n\t\t\t\tobject.animations.push( serialize( meta.animations, animation ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( isRootObject ) {\n\n\t\t\tconst geometries = extractFromCache( meta.geometries );\n\t\t\tconst materials = extractFromCache( meta.materials );\n\t\t\tconst textures = extractFromCache( meta.textures );\n\t\t\tconst images = extractFromCache( meta.images );\n\t\t\tconst shapes = extractFromCache( meta.shapes );\n\t\t\tconst skeletons = extractFromCache( meta.skeletons );\n\t\t\tconst animations = extractFromCache( meta.animations );\n\n\t\t\tif ( geometries.length > 0 ) output.geometries = geometries;\n\t\t\tif ( materials.length > 0 ) output.materials = materials;\n\t\t\tif ( textures.length > 0 ) output.textures = textures;\n\t\t\tif ( images.length > 0 ) output.images = images;\n\t\t\tif ( shapes.length > 0 ) output.shapes = shapes;\n\t\t\tif ( skeletons.length > 0 ) output.skeletons = skeletons;\n\t\t\tif ( animations.length > 0 ) output.animations = animations;\n\n\t\t}\n\n\t\toutput.object = object;\n\n\t\treturn output;\n\n\t\t// extract data from the cache hash\n\t\t// remove metadata on each item\n\t\t// and return as array\n\t\tfunction extractFromCache( cache ) {\n\n\t\t\tconst values = [];\n\t\t\tfor ( const key in cache ) {\n\n\t\t\t\tconst data = cache[ key ];\n\t\t\t\tdelete data.metadata;\n\t\t\t\tvalues.push( data );\n\n\t\t\t}\n\n\t\t\treturn values;\n\n\t\t}\n\n\t}\n\n\tclone( recursive ) {\n\n\t\treturn new this.constructor().copy( this, recursive );\n\n\t}\n\n\tcopy( source, recursive = true ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.up.copy( source.up );\n\n\t\tthis.position.copy( source.position );\n\t\tthis.rotation.order = source.rotation.order;\n\t\tthis.quaternion.copy( source.quaternion );\n\t\tthis.scale.copy( source.scale );\n\n\t\tthis.matrix.copy( source.matrix );\n\t\tthis.matrixWorld.copy( source.matrixWorld );\n\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\tthis.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;\n\n\t\tthis.layers.mask = source.layers.mask;\n\t\tthis.visible = source.visible;\n\n\t\tthis.castShadow = source.castShadow;\n\t\tthis.receiveShadow = source.receiveShadow;\n\n\t\tthis.frustumCulled = source.frustumCulled;\n\t\tthis.renderOrder = source.renderOrder;\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\tif ( recursive === true ) {\n\n\t\t\tfor ( let i = 0; i < source.children.length; i ++ ) {\n\n\t\t\t\tconst child = source.children[ i ];\n\t\t\t\tthis.add( child.clone() );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nObject3D.DefaultUp = new Vector3( 0, 1, 0 );\nObject3D.DefaultMatrixAutoUpdate = true;\n\nObject3D.prototype.isObject3D = true;\n\nconst _v0$1 = /*@__PURE__*/ new Vector3();\nconst _v1$3 = /*@__PURE__*/ new Vector3();\nconst _v2$2 = /*@__PURE__*/ new Vector3();\nconst _v3$1 = /*@__PURE__*/ new Vector3();\n\nconst _vab = /*@__PURE__*/ new Vector3();\nconst _vac = /*@__PURE__*/ new Vector3();\nconst _vbc = /*@__PURE__*/ new Vector3();\nconst _vap = /*@__PURE__*/ new Vector3();\nconst _vbp = /*@__PURE__*/ new Vector3();\nconst _vcp = /*@__PURE__*/ new Vector3();\n\nclass Triangle {\n\n\tconstructor( a = new Vector3(), b = new Vector3(), c = new Vector3() ) {\n\n\t\tthis.a = a;\n\t\tthis.b = b;\n\t\tthis.c = c;\n\n\t}\n\n\tstatic getNormal( a, b, c, target ) {\n\n\t\ttarget.subVectors( c, b );\n\t\t_v0$1.subVectors( a, b );\n\t\ttarget.cross( _v0$1 );\n\n\t\tconst targetLengthSq = target.lengthSq();\n\t\tif ( targetLengthSq > 0 ) {\n\n\t\t\treturn target.multiplyScalar( 1 / Math.sqrt( targetLengthSq ) );\n\n\t\t}\n\n\t\treturn target.set( 0, 0, 0 );\n\n\t}\n\n\t// static/instance method to calculate barycentric coordinates\n\t// based on: http://www.blackpawn.com/texts/pointinpoly/default.html\n\tstatic getBarycoord( point, a, b, c, target ) {\n\n\t\t_v0$1.subVectors( c, a );\n\t\t_v1$3.subVectors( b, a );\n\t\t_v2$2.subVectors( point, a );\n\n\t\tconst dot00 = _v0$1.dot( _v0$1 );\n\t\tconst dot01 = _v0$1.dot( _v1$3 );\n\t\tconst dot02 = _v0$1.dot( _v2$2 );\n\t\tconst dot11 = _v1$3.dot( _v1$3 );\n\t\tconst dot12 = _v1$3.dot( _v2$2 );\n\n\t\tconst denom = ( dot00 * dot11 - dot01 * dot01 );\n\n\t\t// collinear or singular triangle\n\t\tif ( denom === 0 ) {\n\n\t\t\t// arbitrary location outside of triangle?\n\t\t\t// not sure if this is the best idea, maybe should be returning undefined\n\t\t\treturn target.set( - 2, - 1, - 1 );\n\n\t\t}\n\n\t\tconst invDenom = 1 / denom;\n\t\tconst u = ( dot11 * dot02 - dot01 * dot12 ) * invDenom;\n\t\tconst v = ( dot00 * dot12 - dot01 * dot02 ) * invDenom;\n\n\t\t// barycentric coordinates must always sum to 1\n\t\treturn target.set( 1 - u - v, v, u );\n\n\t}\n\n\tstatic containsPoint( point, a, b, c ) {\n\n\t\tthis.getBarycoord( point, a, b, c, _v3$1 );\n\n\t\treturn ( _v3$1.x >= 0 ) && ( _v3$1.y >= 0 ) && ( ( _v3$1.x + _v3$1.y ) <= 1 );\n\n\t}\n\n\tstatic getUV( point, p1, p2, p3, uv1, uv2, uv3, target ) {\n\n\t\tthis.getBarycoord( point, p1, p2, p3, _v3$1 );\n\n\t\ttarget.set( 0, 0 );\n\t\ttarget.addScaledVector( uv1, _v3$1.x );\n\t\ttarget.addScaledVector( uv2, _v3$1.y );\n\t\ttarget.addScaledVector( uv3, _v3$1.z );\n\n\t\treturn target;\n\n\t}\n\n\tstatic isFrontFacing( a, b, c, direction ) {\n\n\t\t_v0$1.subVectors( c, b );\n\t\t_v1$3.subVectors( a, b );\n\n\t\t// strictly front facing\n\t\treturn ( _v0$1.cross( _v1$3 ).dot( direction ) < 0 ) ? true : false;\n\n\t}\n\n\tset( a, b, c ) {\n\n\t\tthis.a.copy( a );\n\t\tthis.b.copy( b );\n\t\tthis.c.copy( c );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPointsAndIndices( points, i0, i1, i2 ) {\n\n\t\tthis.a.copy( points[ i0 ] );\n\t\tthis.b.copy( points[ i1 ] );\n\t\tthis.c.copy( points[ i2 ] );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( triangle ) {\n\n\t\tthis.a.copy( triangle.a );\n\t\tthis.b.copy( triangle.b );\n\t\tthis.c.copy( triangle.c );\n\n\t\treturn this;\n\n\t}\n\n\tgetArea() {\n\n\t\t_v0$1.subVectors( this.c, this.b );\n\t\t_v1$3.subVectors( this.a, this.b );\n\n\t\treturn _v0$1.cross( _v1$3 ).length() * 0.5;\n\n\t}\n\n\tgetMidpoint( target ) {\n\n\t\treturn target.addVectors( this.a, this.b ).add( this.c ).multiplyScalar( 1 / 3 );\n\n\t}\n\n\tgetNormal( target ) {\n\n\t\treturn Triangle.getNormal( this.a, this.b, this.c, target );\n\n\t}\n\n\tgetPlane( target ) {\n\n\t\treturn target.setFromCoplanarPoints( this.a, this.b, this.c );\n\n\t}\n\n\tgetBarycoord( point, target ) {\n\n\t\treturn Triangle.getBarycoord( point, this.a, this.b, this.c, target );\n\n\t}\n\n\tgetUV( point, uv1, uv2, uv3, target ) {\n\n\t\treturn Triangle.getUV( point, this.a, this.b, this.c, uv1, uv2, uv3, target );\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn Triangle.containsPoint( point, this.a, this.b, this.c );\n\n\t}\n\n\tisFrontFacing( direction ) {\n\n\t\treturn Triangle.isFrontFacing( this.a, this.b, this.c, direction );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsTriangle( this );\n\n\t}\n\n\tclosestPointToPoint( p, target ) {\n\n\t\tconst a = this.a, b = this.b, c = this.c;\n\t\tlet v, w;\n\n\t\t// algorithm thanks to Real-Time Collision Detection by Christer Ericson,\n\t\t// published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc.,\n\t\t// under the accompanying license; see chapter 5.1.5 for detailed explanation.\n\t\t// basically, we're distinguishing which of the voronoi regions of the triangle\n\t\t// the point lies in with the minimum amount of redundant computation.\n\n\t\t_vab.subVectors( b, a );\n\t\t_vac.subVectors( c, a );\n\t\t_vap.subVectors( p, a );\n\t\tconst d1 = _vab.dot( _vap );\n\t\tconst d2 = _vac.dot( _vap );\n\t\tif ( d1 <= 0 && d2 <= 0 ) {\n\n\t\t\t// vertex region of A; barycentric coords (1, 0, 0)\n\t\t\treturn target.copy( a );\n\n\t\t}\n\n\t\t_vbp.subVectors( p, b );\n\t\tconst d3 = _vab.dot( _vbp );\n\t\tconst d4 = _vac.dot( _vbp );\n\t\tif ( d3 >= 0 && d4 <= d3 ) {\n\n\t\t\t// vertex region of B; barycentric coords (0, 1, 0)\n\t\t\treturn target.copy( b );\n\n\t\t}\n\n\t\tconst vc = d1 * d4 - d3 * d2;\n\t\tif ( vc <= 0 && d1 >= 0 && d3 <= 0 ) {\n\n\t\t\tv = d1 / ( d1 - d3 );\n\t\t\t// edge region of AB; barycentric coords (1-v, v, 0)\n\t\t\treturn target.copy( a ).addScaledVector( _vab, v );\n\n\t\t}\n\n\t\t_vcp.subVectors( p, c );\n\t\tconst d5 = _vab.dot( _vcp );\n\t\tconst d6 = _vac.dot( _vcp );\n\t\tif ( d6 >= 0 && d5 <= d6 ) {\n\n\t\t\t// vertex region of C; barycentric coords (0, 0, 1)\n\t\t\treturn target.copy( c );\n\n\t\t}\n\n\t\tconst vb = d5 * d2 - d1 * d6;\n\t\tif ( vb <= 0 && d2 >= 0 && d6 <= 0 ) {\n\n\t\t\tw = d2 / ( d2 - d6 );\n\t\t\t// edge region of AC; barycentric coords (1-w, 0, w)\n\t\t\treturn target.copy( a ).addScaledVector( _vac, w );\n\n\t\t}\n\n\t\tconst va = d3 * d6 - d5 * d4;\n\t\tif ( va <= 0 && ( d4 - d3 ) >= 0 && ( d5 - d6 ) >= 0 ) {\n\n\t\t\t_vbc.subVectors( c, b );\n\t\t\tw = ( d4 - d3 ) / ( ( d4 - d3 ) + ( d5 - d6 ) );\n\t\t\t// edge region of BC; barycentric coords (0, 1-w, w)\n\t\t\treturn target.copy( b ).addScaledVector( _vbc, w ); // edge region of BC\n\n\t\t}\n\n\t\t// face region\n\t\tconst denom = 1 / ( va + vb + vc );\n\t\t// u = va * denom\n\t\tv = vb * denom;\n\t\tw = vc * denom;\n\n\t\treturn target.copy( a ).addScaledVector( _vab, v ).addScaledVector( _vac, w );\n\n\t}\n\n\tequals( triangle ) {\n\n\t\treturn triangle.a.equals( this.a ) && triangle.b.equals( this.b ) && triangle.c.equals( this.c );\n\n\t}\n\n}\n\nlet materialId = 0;\n\nclass Material extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tObject.defineProperty( this, 'id', { value: materialId ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'Material';\n\n\t\tthis.fog = true;\n\n\t\tthis.blending = NormalBlending;\n\t\tthis.side = FrontSide;\n\t\tthis.vertexColors = false;\n\n\t\tthis.opacity = 1;\n\t\tthis.transparent = false;\n\n\t\tthis.blendSrc = SrcAlphaFactor;\n\t\tthis.blendDst = OneMinusSrcAlphaFactor;\n\t\tthis.blendEquation = AddEquation;\n\t\tthis.blendSrcAlpha = null;\n\t\tthis.blendDstAlpha = null;\n\t\tthis.blendEquationAlpha = null;\n\n\t\tthis.depthFunc = LessEqualDepth;\n\t\tthis.depthTest = true;\n\t\tthis.depthWrite = true;\n\n\t\tthis.stencilWriteMask = 0xff;\n\t\tthis.stencilFunc = AlwaysStencilFunc;\n\t\tthis.stencilRef = 0;\n\t\tthis.stencilFuncMask = 0xff;\n\t\tthis.stencilFail = KeepStencilOp;\n\t\tthis.stencilZFail = KeepStencilOp;\n\t\tthis.stencilZPass = KeepStencilOp;\n\t\tthis.stencilWrite = false;\n\n\t\tthis.clippingPlanes = null;\n\t\tthis.clipIntersection = false;\n\t\tthis.clipShadows = false;\n\n\t\tthis.shadowSide = null;\n\n\t\tthis.colorWrite = true;\n\n\t\tthis.precision = null; // override the renderer's default precision for this material\n\n\t\tthis.polygonOffset = false;\n\t\tthis.polygonOffsetFactor = 0;\n\t\tthis.polygonOffsetUnits = 0;\n\n\t\tthis.dithering = false;\n\n\t\tthis.alphaTest = 0;\n\t\tthis.alphaToCoverage = false;\n\t\tthis.premultipliedAlpha = false;\n\n\t\tthis.visible = true;\n\n\t\tthis.toneMapped = true;\n\n\t\tthis.userData = {};\n\n\t\tthis.version = 0;\n\n\t}\n\n\tonBuild( /* shaderobject, renderer */ ) {}\n\n\tonBeforeCompile( /* shaderobject, renderer */ ) {}\n\n\tcustomProgramCacheKey() {\n\n\t\treturn this.onBeforeCompile.toString();\n\n\t}\n\n\tsetValues( values ) {\n\n\t\tif ( values === undefined ) return;\n\n\t\tfor ( const key in values ) {\n\n\t\t\tconst newValue = values[ key ];\n\n\t\t\tif ( newValue === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.Material: \\'' + key + '\\' parameter is undefined.' );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t// for backward compatability if shading is set in the constructor\n\t\t\tif ( key === 'shading' ) {\n\n\t\t\t\tconsole.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );\n\t\t\t\tthis.flatShading = ( newValue === FlatShading ) ? true : false;\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tconst currentValue = this[ key ];\n\n\t\t\tif ( currentValue === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.' + this.type + ': \\'' + key + '\\' is not a property of this material.' );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( currentValue && currentValue.isColor ) {\n\n\t\t\t\tcurrentValue.set( newValue );\n\n\t\t\t} else if ( ( currentValue && currentValue.isVector3 ) && ( newValue && newValue.isVector3 ) ) {\n\n\t\t\t\tcurrentValue.copy( newValue );\n\n\t\t\t} else {\n\n\t\t\t\tthis[ key ] = newValue;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst isRoot = ( meta === undefined || typeof meta === 'string' );\n\n\t\tif ( isRoot ) {\n\n\t\t\tmeta = {\n\t\t\t\ttextures: {},\n\t\t\t\timages: {}\n\t\t\t};\n\n\t\t}\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Material',\n\t\t\t\tgenerator: 'Material.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard Material serialization\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\n\t\tif ( this.name !== '' ) data.name = this.name;\n\n\t\tif ( this.color && this.color.isColor ) data.color = this.color.getHex();\n\n\t\tif ( this.roughness !== undefined ) data.roughness = this.roughness;\n\t\tif ( this.metalness !== undefined ) data.metalness = this.metalness;\n\n\t\tif ( this.sheen && this.sheen.isColor ) data.sheen = this.sheen.getHex();\n\t\tif ( this.emissive && this.emissive.isColor ) data.emissive = this.emissive.getHex();\n\t\tif ( this.emissiveIntensity && this.emissiveIntensity !== 1 ) data.emissiveIntensity = this.emissiveIntensity;\n\n\t\tif ( this.specular && this.specular.isColor ) data.specular = this.specular.getHex();\n\t\tif ( this.shininess !== undefined ) data.shininess = this.shininess;\n\t\tif ( this.clearcoat !== undefined ) data.clearcoat = this.clearcoat;\n\t\tif ( this.clearcoatRoughness !== undefined ) data.clearcoatRoughness = this.clearcoatRoughness;\n\n\t\tif ( this.clearcoatMap && this.clearcoatMap.isTexture ) {\n\n\t\t\tdata.clearcoatMap = this.clearcoatMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture ) {\n\n\t\t\tdata.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture ) {\n\n\t\t\tdata.clearcoatNormalMap = this.clearcoatNormalMap.toJSON( meta ).uuid;\n\t\t\tdata.clearcoatNormalScale = this.clearcoatNormalScale.toArray();\n\n\t\t}\n\n\t\tif ( this.map && this.map.isTexture ) data.map = this.map.toJSON( meta ).uuid;\n\t\tif ( this.matcap && this.matcap.isTexture ) data.matcap = this.matcap.toJSON( meta ).uuid;\n\t\tif ( this.alphaMap && this.alphaMap.isTexture ) data.alphaMap = this.alphaMap.toJSON( meta ).uuid;\n\n\t\tif ( this.lightMap && this.lightMap.isTexture ) {\n\n\t\t\tdata.lightMap = this.lightMap.toJSON( meta ).uuid;\n\t\t\tdata.lightMapIntensity = this.lightMapIntensity;\n\n\t\t}\n\n\t\tif ( this.aoMap && this.aoMap.isTexture ) {\n\n\t\t\tdata.aoMap = this.aoMap.toJSON( meta ).uuid;\n\t\t\tdata.aoMapIntensity = this.aoMapIntensity;\n\n\t\t}\n\n\t\tif ( this.bumpMap && this.bumpMap.isTexture ) {\n\n\t\t\tdata.bumpMap = this.bumpMap.toJSON( meta ).uuid;\n\t\t\tdata.bumpScale = this.bumpScale;\n\n\t\t}\n\n\t\tif ( this.normalMap && this.normalMap.isTexture ) {\n\n\t\t\tdata.normalMap = this.normalMap.toJSON( meta ).uuid;\n\t\t\tdata.normalMapType = this.normalMapType;\n\t\t\tdata.normalScale = this.normalScale.toArray();\n\n\t\t}\n\n\t\tif ( this.displacementMap && this.displacementMap.isTexture ) {\n\n\t\t\tdata.displacementMap = this.displacementMap.toJSON( meta ).uuid;\n\t\t\tdata.displacementScale = this.displacementScale;\n\t\t\tdata.displacementBias = this.displacementBias;\n\n\t\t}\n\n\t\tif ( this.roughnessMap && this.roughnessMap.isTexture ) data.roughnessMap = this.roughnessMap.toJSON( meta ).uuid;\n\t\tif ( this.metalnessMap && this.metalnessMap.isTexture ) data.metalnessMap = this.metalnessMap.toJSON( meta ).uuid;\n\n\t\tif ( this.emissiveMap && this.emissiveMap.isTexture ) data.emissiveMap = this.emissiveMap.toJSON( meta ).uuid;\n\t\tif ( this.specularMap && this.specularMap.isTexture ) data.specularMap = this.specularMap.toJSON( meta ).uuid;\n\n\t\tif ( this.envMap && this.envMap.isTexture ) {\n\n\t\t\tdata.envMap = this.envMap.toJSON( meta ).uuid;\n\n\t\t\tif ( this.combine !== undefined ) data.combine = this.combine;\n\n\t\t}\n\n\t\tif ( this.envMapIntensity !== undefined ) data.envMapIntensity = this.envMapIntensity;\n\t\tif ( this.reflectivity !== undefined ) data.reflectivity = this.reflectivity;\n\t\tif ( this.refractionRatio !== undefined ) data.refractionRatio = this.refractionRatio;\n\n\t\tif ( this.gradientMap && this.gradientMap.isTexture ) {\n\n\t\t\tdata.gradientMap = this.gradientMap.toJSON( meta ).uuid;\n\n\t\t}\n\n\t\tif ( this.transmission !== undefined ) data.transmission = this.transmission;\n\t\tif ( this.transmissionMap && this.transmissionMap.isTexture ) data.transmissionMap = this.transmissionMap.toJSON( meta ).uuid;\n\t\tif ( this.thickness !== undefined ) data.thickness = this.thickness;\n\t\tif ( this.thicknessMap && this.thicknessMap.isTexture ) data.thicknessMap = this.thicknessMap.toJSON( meta ).uuid;\n\t\tif ( this.attenuationDistance !== undefined ) data.attenuationDistance = this.attenuationDistance;\n\t\tif ( this.attenuationColor !== undefined ) data.attenuationColor = this.attenuationColor.getHex();\n\n\t\tif ( this.size !== undefined ) data.size = this.size;\n\t\tif ( this.shadowSide !== null ) data.shadowSide = this.shadowSide;\n\t\tif ( this.sizeAttenuation !== undefined ) data.sizeAttenuation = this.sizeAttenuation;\n\n\t\tif ( this.blending !== NormalBlending ) data.blending = this.blending;\n\t\tif ( this.side !== FrontSide ) data.side = this.side;\n\t\tif ( this.vertexColors ) data.vertexColors = true;\n\n\t\tif ( this.opacity < 1 ) data.opacity = this.opacity;\n\t\tif ( this.transparent === true ) data.transparent = this.transparent;\n\n\t\tdata.depthFunc = this.depthFunc;\n\t\tdata.depthTest = this.depthTest;\n\t\tdata.depthWrite = this.depthWrite;\n\t\tdata.colorWrite = this.colorWrite;\n\n\t\tdata.stencilWrite = this.stencilWrite;\n\t\tdata.stencilWriteMask = this.stencilWriteMask;\n\t\tdata.stencilFunc = this.stencilFunc;\n\t\tdata.stencilRef = this.stencilRef;\n\t\tdata.stencilFuncMask = this.stencilFuncMask;\n\t\tdata.stencilFail = this.stencilFail;\n\t\tdata.stencilZFail = this.stencilZFail;\n\t\tdata.stencilZPass = this.stencilZPass;\n\n\t\t// rotation (SpriteMaterial)\n\t\tif ( this.rotation && this.rotation !== 0 ) data.rotation = this.rotation;\n\n\t\tif ( this.polygonOffset === true ) data.polygonOffset = true;\n\t\tif ( this.polygonOffsetFactor !== 0 ) data.polygonOffsetFactor = this.polygonOffsetFactor;\n\t\tif ( this.polygonOffsetUnits !== 0 ) data.polygonOffsetUnits = this.polygonOffsetUnits;\n\n\t\tif ( this.linewidth && this.linewidth !== 1 ) data.linewidth = this.linewidth;\n\t\tif ( this.dashSize !== undefined ) data.dashSize = this.dashSize;\n\t\tif ( this.gapSize !== undefined ) data.gapSize = this.gapSize;\n\t\tif ( this.scale !== undefined ) data.scale = this.scale;\n\n\t\tif ( this.dithering === true ) data.dithering = true;\n\n\t\tif ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest;\n\t\tif ( this.alphaToCoverage === true ) data.alphaToCoverage = this.alphaToCoverage;\n\t\tif ( this.premultipliedAlpha === true ) data.premultipliedAlpha = this.premultipliedAlpha;\n\n\t\tif ( this.wireframe === true ) data.wireframe = this.wireframe;\n\t\tif ( this.wireframeLinewidth > 1 ) data.wireframeLinewidth = this.wireframeLinewidth;\n\t\tif ( this.wireframeLinecap !== 'round' ) data.wireframeLinecap = this.wireframeLinecap;\n\t\tif ( this.wireframeLinejoin !== 'round' ) data.wireframeLinejoin = this.wireframeLinejoin;\n\n\t\tif ( this.morphTargets === true ) data.morphTargets = true;\n\t\tif ( this.morphNormals === true ) data.morphNormals = true;\n\n\t\tif ( this.flatShading === true ) data.flatShading = this.flatShading;\n\n\t\tif ( this.visible === false ) data.visible = false;\n\n\t\tif ( this.toneMapped === false ) data.toneMapped = false;\n\n\t\tif ( JSON.stringify( this.userData ) !== '{}' ) data.userData = this.userData;\n\n\t\t// TODO: Copied from Object3D.toJSON\n\n\t\tfunction extractFromCache( cache ) {\n\n\t\t\tconst values = [];\n\n\t\t\tfor ( const key in cache ) {\n\n\t\t\t\tconst data = cache[ key ];\n\t\t\t\tdelete data.metadata;\n\t\t\t\tvalues.push( data );\n\n\t\t\t}\n\n\t\t\treturn values;\n\n\t\t}\n\n\t\tif ( isRoot ) {\n\n\t\t\tconst textures = extractFromCache( meta.textures );\n\t\t\tconst images = extractFromCache( meta.images );\n\n\t\t\tif ( textures.length > 0 ) data.textures = textures;\n\t\t\tif ( images.length > 0 ) data.images = images;\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\n\t\tthis.fog = source.fog;\n\n\t\tthis.blending = source.blending;\n\t\tthis.side = source.side;\n\t\tthis.vertexColors = source.vertexColors;\n\n\t\tthis.opacity = source.opacity;\n\t\tthis.transparent = source.transparent;\n\n\t\tthis.blendSrc = source.blendSrc;\n\t\tthis.blendDst = source.blendDst;\n\t\tthis.blendEquation = source.blendEquation;\n\t\tthis.blendSrcAlpha = source.blendSrcAlpha;\n\t\tthis.blendDstAlpha = source.blendDstAlpha;\n\t\tthis.blendEquationAlpha = source.blendEquationAlpha;\n\n\t\tthis.depthFunc = source.depthFunc;\n\t\tthis.depthTest = source.depthTest;\n\t\tthis.depthWrite = source.depthWrite;\n\n\t\tthis.stencilWriteMask = source.stencilWriteMask;\n\t\tthis.stencilFunc = source.stencilFunc;\n\t\tthis.stencilRef = source.stencilRef;\n\t\tthis.stencilFuncMask = source.stencilFuncMask;\n\t\tthis.stencilFail = source.stencilFail;\n\t\tthis.stencilZFail = source.stencilZFail;\n\t\tthis.stencilZPass = source.stencilZPass;\n\t\tthis.stencilWrite = source.stencilWrite;\n\n\t\tconst srcPlanes = source.clippingPlanes;\n\t\tlet dstPlanes = null;\n\n\t\tif ( srcPlanes !== null ) {\n\n\t\t\tconst n = srcPlanes.length;\n\t\t\tdstPlanes = new Array( n );\n\n\t\t\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\t\t\tdstPlanes[ i ] = srcPlanes[ i ].clone();\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.clippingPlanes = dstPlanes;\n\t\tthis.clipIntersection = source.clipIntersection;\n\t\tthis.clipShadows = source.clipShadows;\n\n\t\tthis.shadowSide = source.shadowSide;\n\n\t\tthis.colorWrite = source.colorWrite;\n\n\t\tthis.precision = source.precision;\n\n\t\tthis.polygonOffset = source.polygonOffset;\n\t\tthis.polygonOffsetFactor = source.polygonOffsetFactor;\n\t\tthis.polygonOffsetUnits = source.polygonOffsetUnits;\n\n\t\tthis.dithering = source.dithering;\n\n\t\tthis.alphaTest = source.alphaTest;\n\t\tthis.alphaToCoverage = source.alphaToCoverage;\n\t\tthis.premultipliedAlpha = source.premultipliedAlpha;\n\n\t\tthis.visible = source.visible;\n\n\t\tthis.toneMapped = source.toneMapped;\n\n\t\tthis.userData = JSON.parse( JSON.stringify( source.userData ) );\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n}\n\nMaterial.prototype.isMaterial = true;\n\nconst _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,\n\t'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,\n\t'brown': 0xA52A2A, 'burlywood': 0xDEB887, 'cadetblue': 0x5F9EA0, 'chartreuse': 0x7FFF00, 'chocolate': 0xD2691E, 'coral': 0xFF7F50,\n\t'cornflowerblue': 0x6495ED, 'cornsilk': 0xFFF8DC, 'crimson': 0xDC143C, 'cyan': 0x00FFFF, 'darkblue': 0x00008B, 'darkcyan': 0x008B8B,\n\t'darkgoldenrod': 0xB8860B, 'darkgray': 0xA9A9A9, 'darkgreen': 0x006400, 'darkgrey': 0xA9A9A9, 'darkkhaki': 0xBDB76B, 'darkmagenta': 0x8B008B,\n\t'darkolivegreen': 0x556B2F, 'darkorange': 0xFF8C00, 'darkorchid': 0x9932CC, 'darkred': 0x8B0000, 'darksalmon': 0xE9967A, 'darkseagreen': 0x8FBC8F,\n\t'darkslateblue': 0x483D8B, 'darkslategray': 0x2F4F4F, 'darkslategrey': 0x2F4F4F, 'darkturquoise': 0x00CED1, 'darkviolet': 0x9400D3,\n\t'deeppink': 0xFF1493, 'deepskyblue': 0x00BFFF, 'dimgray': 0x696969, 'dimgrey': 0x696969, 'dodgerblue': 0x1E90FF, 'firebrick': 0xB22222,\n\t'floralwhite': 0xFFFAF0, 'forestgreen': 0x228B22, 'fuchsia': 0xFF00FF, 'gainsboro': 0xDCDCDC, 'ghostwhite': 0xF8F8FF, 'gold': 0xFFD700,\n\t'goldenrod': 0xDAA520, 'gray': 0x808080, 'green': 0x008000, 'greenyellow': 0xADFF2F, 'grey': 0x808080, 'honeydew': 0xF0FFF0, 'hotpink': 0xFF69B4,\n\t'indianred': 0xCD5C5C, 'indigo': 0x4B0082, 'ivory': 0xFFFFF0, 'khaki': 0xF0E68C, 'lavender': 0xE6E6FA, 'lavenderblush': 0xFFF0F5, 'lawngreen': 0x7CFC00,\n\t'lemonchiffon': 0xFFFACD, 'lightblue': 0xADD8E6, 'lightcoral': 0xF08080, 'lightcyan': 0xE0FFFF, 'lightgoldenrodyellow': 0xFAFAD2, 'lightgray': 0xD3D3D3,\n\t'lightgreen': 0x90EE90, 'lightgrey': 0xD3D3D3, 'lightpink': 0xFFB6C1, 'lightsalmon': 0xFFA07A, 'lightseagreen': 0x20B2AA, 'lightskyblue': 0x87CEFA,\n\t'lightslategray': 0x778899, 'lightslategrey': 0x778899, 'lightsteelblue': 0xB0C4DE, 'lightyellow': 0xFFFFE0, 'lime': 0x00FF00, 'limegreen': 0x32CD32,\n\t'linen': 0xFAF0E6, 'magenta': 0xFF00FF, 'maroon': 0x800000, 'mediumaquamarine': 0x66CDAA, 'mediumblue': 0x0000CD, 'mediumorchid': 0xBA55D3,\n\t'mediumpurple': 0x9370DB, 'mediumseagreen': 0x3CB371, 'mediumslateblue': 0x7B68EE, 'mediumspringgreen': 0x00FA9A, 'mediumturquoise': 0x48D1CC,\n\t'mediumvioletred': 0xC71585, 'midnightblue': 0x191970, 'mintcream': 0xF5FFFA, 'mistyrose': 0xFFE4E1, 'moccasin': 0xFFE4B5, 'navajowhite': 0xFFDEAD,\n\t'navy': 0x000080, 'oldlace': 0xFDF5E6, 'olive': 0x808000, 'olivedrab': 0x6B8E23, 'orange': 0xFFA500, 'orangered': 0xFF4500, 'orchid': 0xDA70D6,\n\t'palegoldenrod': 0xEEE8AA, 'palegreen': 0x98FB98, 'paleturquoise': 0xAFEEEE, 'palevioletred': 0xDB7093, 'papayawhip': 0xFFEFD5, 'peachpuff': 0xFFDAB9,\n\t'peru': 0xCD853F, 'pink': 0xFFC0CB, 'plum': 0xDDA0DD, 'powderblue': 0xB0E0E6, 'purple': 0x800080, 'rebeccapurple': 0x663399, 'red': 0xFF0000, 'rosybrown': 0xBC8F8F,\n\t'royalblue': 0x4169E1, 'saddlebrown': 0x8B4513, 'salmon': 0xFA8072, 'sandybrown': 0xF4A460, 'seagreen': 0x2E8B57, 'seashell': 0xFFF5EE,\n\t'sienna': 0xA0522D, 'silver': 0xC0C0C0, 'skyblue': 0x87CEEB, 'slateblue': 0x6A5ACD, 'slategray': 0x708090, 'slategrey': 0x708090, 'snow': 0xFFFAFA,\n\t'springgreen': 0x00FF7F, 'steelblue': 0x4682B4, 'tan': 0xD2B48C, 'teal': 0x008080, 'thistle': 0xD8BFD8, 'tomato': 0xFF6347, 'turquoise': 0x40E0D0,\n\t'violet': 0xEE82EE, 'wheat': 0xF5DEB3, 'white': 0xFFFFFF, 'whitesmoke': 0xF5F5F5, 'yellow': 0xFFFF00, 'yellowgreen': 0x9ACD32 };\n\nconst _hslA = { h: 0, s: 0, l: 0 };\nconst _hslB = { h: 0, s: 0, l: 0 };\n\nfunction hue2rgb( p, q, t ) {\n\n\tif ( t < 0 ) t += 1;\n\tif ( t > 1 ) t -= 1;\n\tif ( t < 1 / 6 ) return p + ( q - p ) * 6 * t;\n\tif ( t < 1 / 2 ) return q;\n\tif ( t < 2 / 3 ) return p + ( q - p ) * 6 * ( 2 / 3 - t );\n\treturn p;\n\n}\n\nfunction SRGBToLinear( c ) {\n\n\treturn ( c < 0.04045 ) ? c * 0.0773993808 : Math.pow( c * 0.9478672986 + 0.0521327014, 2.4 );\n\n}\n\nfunction LinearToSRGB( c ) {\n\n\treturn ( c < 0.0031308 ) ? c * 12.92 : 1.055 * ( Math.pow( c, 0.41666 ) ) - 0.055;\n\n}\n\nclass Color {\n\n\tconstructor( r, g, b ) {\n\n\t\tif ( g === undefined && b === undefined ) {\n\n\t\t\t// r is THREE.Color, hex or string\n\t\t\treturn this.set( r );\n\n\t\t}\n\n\t\treturn this.setRGB( r, g, b );\n\n\t}\n\n\tset( value ) {\n\n\t\tif ( value && value.isColor ) {\n\n\t\t\tthis.copy( value );\n\n\t\t} else if ( typeof value === 'number' ) {\n\n\t\t\tthis.setHex( value );\n\n\t\t} else if ( typeof value === 'string' ) {\n\n\t\t\tthis.setStyle( value );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetScalar( scalar ) {\n\n\t\tthis.r = scalar;\n\t\tthis.g = scalar;\n\t\tthis.b = scalar;\n\n\t\treturn this;\n\n\t}\n\n\tsetHex( hex ) {\n\n\t\thex = Math.floor( hex );\n\n\t\tthis.r = ( hex >> 16 & 255 ) / 255;\n\t\tthis.g = ( hex >> 8 & 255 ) / 255;\n\t\tthis.b = ( hex & 255 ) / 255;\n\n\t\treturn this;\n\n\t}\n\n\tsetRGB( r, g, b ) {\n\n\t\tthis.r = r;\n\t\tthis.g = g;\n\t\tthis.b = b;\n\n\t\treturn this;\n\n\t}\n\n\tsetHSL( h, s, l ) {\n\n\t\t// h,s,l ranges are in 0.0 - 1.0\n\t\th = euclideanModulo( h, 1 );\n\t\ts = clamp( s, 0, 1 );\n\t\tl = clamp( l, 0, 1 );\n\n\t\tif ( s === 0 ) {\n\n\t\t\tthis.r = this.g = this.b = l;\n\n\t\t} else {\n\n\t\t\tconst p = l <= 0.5 ? l * ( 1 + s ) : l + s - ( l * s );\n\t\t\tconst q = ( 2 * l ) - p;\n\n\t\t\tthis.r = hue2rgb( q, p, h + 1 / 3 );\n\t\t\tthis.g = hue2rgb( q, p, h );\n\t\t\tthis.b = hue2rgb( q, p, h - 1 / 3 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetStyle( style ) {\n\n\t\tfunction handleAlpha( string ) {\n\n\t\t\tif ( string === undefined ) return;\n\n\t\t\tif ( parseFloat( string ) < 1 ) {\n\n\t\t\t\tconsole.warn( 'THREE.Color: Alpha component of ' + style + ' will be ignored.' );\n\n\t\t\t}\n\n\t\t}\n\n\n\t\tlet m;\n\n\t\tif ( m = /^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec( style ) ) {\n\n\t\t\t// rgb / hsl\n\n\t\t\tlet color;\n\t\t\tconst name = m[ 1 ];\n\t\t\tconst components = m[ 2 ];\n\n\t\t\tswitch ( name ) {\n\n\t\t\t\tcase 'rgb':\n\t\t\t\tcase 'rgba':\n\n\t\t\t\t\tif ( color = /^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// rgb(255,0,0) rgba(255,0,0,0.5)\n\t\t\t\t\t\tthis.r = Math.min( 255, parseInt( color[ 1 ], 10 ) ) / 255;\n\t\t\t\t\t\tthis.g = Math.min( 255, parseInt( color[ 2 ], 10 ) ) / 255;\n\t\t\t\t\t\tthis.b = Math.min( 255, parseInt( color[ 3 ], 10 ) ) / 255;\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( color = /^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)\n\t\t\t\t\t\tthis.r = Math.min( 100, parseInt( color[ 1 ], 10 ) ) / 100;\n\t\t\t\t\t\tthis.g = Math.min( 100, parseInt( color[ 2 ], 10 ) ) / 100;\n\t\t\t\t\t\tthis.b = Math.min( 100, parseInt( color[ 3 ], 10 ) ) / 100;\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'hsl':\n\t\t\t\tcase 'hsla':\n\n\t\t\t\t\tif ( color = /^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec( components ) ) {\n\n\t\t\t\t\t\t// hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n\t\t\t\t\t\tconst h = parseFloat( color[ 1 ] ) / 360;\n\t\t\t\t\t\tconst s = parseInt( color[ 2 ], 10 ) / 100;\n\t\t\t\t\t\tconst l = parseInt( color[ 3 ], 10 ) / 100;\n\n\t\t\t\t\t\thandleAlpha( color[ 4 ] );\n\n\t\t\t\t\t\treturn this.setHSL( h, s, l );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t} else if ( m = /^\\#([A-Fa-f\\d]+)$/.exec( style ) ) {\n\n\t\t\t// hex color\n\n\t\t\tconst hex = m[ 1 ];\n\t\t\tconst size = hex.length;\n\n\t\t\tif ( size === 3 ) {\n\n\t\t\t\t// #ff0\n\t\t\t\tthis.r = parseInt( hex.charAt( 0 ) + hex.charAt( 0 ), 16 ) / 255;\n\t\t\t\tthis.g = parseInt( hex.charAt( 1 ) + hex.charAt( 1 ), 16 ) / 255;\n\t\t\t\tthis.b = parseInt( hex.charAt( 2 ) + hex.charAt( 2 ), 16 ) / 255;\n\n\t\t\t\treturn this;\n\n\t\t\t} else if ( size === 6 ) {\n\n\t\t\t\t// #ff0000\n\t\t\t\tthis.r = parseInt( hex.charAt( 0 ) + hex.charAt( 1 ), 16 ) / 255;\n\t\t\t\tthis.g = parseInt( hex.charAt( 2 ) + hex.charAt( 3 ), 16 ) / 255;\n\t\t\t\tthis.b = parseInt( hex.charAt( 4 ) + hex.charAt( 5 ), 16 ) / 255;\n\n\t\t\t\treturn this;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( style && style.length > 0 ) {\n\n\t\t\treturn this.setColorName( style );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetColorName( style ) {\n\n\t\t// color keywords\n\t\tconst hex = _colorKeywords[ style.toLowerCase() ];\n\n\t\tif ( hex !== undefined ) {\n\n\t\t\t// red\n\t\t\tthis.setHex( hex );\n\n\t\t} else {\n\n\t\t\t// unknown color\n\t\t\tconsole.warn( 'THREE.Color: Unknown color ' + style );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.r, this.g, this.b );\n\n\t}\n\n\tcopy( color ) {\n\n\t\tthis.r = color.r;\n\t\tthis.g = color.g;\n\t\tthis.b = color.b;\n\n\t\treturn this;\n\n\t}\n\n\tcopyGammaToLinear( color, gammaFactor = 2.0 ) {\n\n\t\tthis.r = Math.pow( color.r, gammaFactor );\n\t\tthis.g = Math.pow( color.g, gammaFactor );\n\t\tthis.b = Math.pow( color.b, gammaFactor );\n\n\t\treturn this;\n\n\t}\n\n\tcopyLinearToGamma( color, gammaFactor = 2.0 ) {\n\n\t\tconst safeInverse = ( gammaFactor > 0 ) ? ( 1.0 / gammaFactor ) : 1.0;\n\n\t\tthis.r = Math.pow( color.r, safeInverse );\n\t\tthis.g = Math.pow( color.g, safeInverse );\n\t\tthis.b = Math.pow( color.b, safeInverse );\n\n\t\treturn this;\n\n\t}\n\n\tconvertGammaToLinear( gammaFactor ) {\n\n\t\tthis.copyGammaToLinear( this, gammaFactor );\n\n\t\treturn this;\n\n\t}\n\n\tconvertLinearToGamma( gammaFactor ) {\n\n\t\tthis.copyLinearToGamma( this, gammaFactor );\n\n\t\treturn this;\n\n\t}\n\n\tcopySRGBToLinear( color ) {\n\n\t\tthis.r = SRGBToLinear( color.r );\n\t\tthis.g = SRGBToLinear( color.g );\n\t\tthis.b = SRGBToLinear( color.b );\n\n\t\treturn this;\n\n\t}\n\n\tcopyLinearToSRGB( color ) {\n\n\t\tthis.r = LinearToSRGB( color.r );\n\t\tthis.g = LinearToSRGB( color.g );\n\t\tthis.b = LinearToSRGB( color.b );\n\n\t\treturn this;\n\n\t}\n\n\tconvertSRGBToLinear() {\n\n\t\tthis.copySRGBToLinear( this );\n\n\t\treturn this;\n\n\t}\n\n\tconvertLinearToSRGB() {\n\n\t\tthis.copyLinearToSRGB( this );\n\n\t\treturn this;\n\n\t}\n\n\tgetHex() {\n\n\t\treturn ( this.r * 255 ) << 16 ^ ( this.g * 255 ) << 8 ^ ( this.b * 255 ) << 0;\n\n\t}\n\n\tgetHexString() {\n\n\t\treturn ( '000000' + this.getHex().toString( 16 ) ).slice( - 6 );\n\n\t}\n\n\tgetHSL( target ) {\n\n\t\t// h,s,l ranges are in 0.0 - 1.0\n\n\t\tconst r = this.r, g = this.g, b = this.b;\n\n\t\tconst max = Math.max( r, g, b );\n\t\tconst min = Math.min( r, g, b );\n\n\t\tlet hue, saturation;\n\t\tconst lightness = ( min + max ) / 2.0;\n\n\t\tif ( min === max ) {\n\n\t\t\thue = 0;\n\t\t\tsaturation = 0;\n\n\t\t} else {\n\n\t\t\tconst delta = max - min;\n\n\t\t\tsaturation = lightness <= 0.5 ? delta / ( max + min ) : delta / ( 2 - max - min );\n\n\t\t\tswitch ( max ) {\n\n\t\t\t\tcase r: hue = ( g - b ) / delta + ( g < b ? 6 : 0 ); break;\n\t\t\t\tcase g: hue = ( b - r ) / delta + 2; break;\n\t\t\t\tcase b: hue = ( r - g ) / delta + 4; break;\n\n\t\t\t}\n\n\t\t\thue /= 6;\n\n\t\t}\n\n\t\ttarget.h = hue;\n\t\ttarget.s = saturation;\n\t\ttarget.l = lightness;\n\n\t\treturn target;\n\n\t}\n\n\tgetStyle() {\n\n\t\treturn 'rgb(' + ( ( this.r * 255 ) | 0 ) + ',' + ( ( this.g * 255 ) | 0 ) + ',' + ( ( this.b * 255 ) | 0 ) + ')';\n\n\t}\n\n\toffsetHSL( h, s, l ) {\n\n\t\tthis.getHSL( _hslA );\n\n\t\t_hslA.h += h; _hslA.s += s; _hslA.l += l;\n\n\t\tthis.setHSL( _hslA.h, _hslA.s, _hslA.l );\n\n\t\treturn this;\n\n\t}\n\n\tadd( color ) {\n\n\t\tthis.r += color.r;\n\t\tthis.g += color.g;\n\t\tthis.b += color.b;\n\n\t\treturn this;\n\n\t}\n\n\taddColors( color1, color2 ) {\n\n\t\tthis.r = color1.r + color2.r;\n\t\tthis.g = color1.g + color2.g;\n\t\tthis.b = color1.b + color2.b;\n\n\t\treturn this;\n\n\t}\n\n\taddScalar( s ) {\n\n\t\tthis.r += s;\n\t\tthis.g += s;\n\t\tthis.b += s;\n\n\t\treturn this;\n\n\t}\n\n\tsub( color ) {\n\n\t\tthis.r = Math.max( 0, this.r - color.r );\n\t\tthis.g = Math.max( 0, this.g - color.g );\n\t\tthis.b = Math.max( 0, this.b - color.b );\n\n\t\treturn this;\n\n\t}\n\n\tmultiply( color ) {\n\n\t\tthis.r *= color.r;\n\t\tthis.g *= color.g;\n\t\tthis.b *= color.b;\n\n\t\treturn this;\n\n\t}\n\n\tmultiplyScalar( s ) {\n\n\t\tthis.r *= s;\n\t\tthis.g *= s;\n\t\tthis.b *= s;\n\n\t\treturn this;\n\n\t}\n\n\tlerp( color, alpha ) {\n\n\t\tthis.r += ( color.r - this.r ) * alpha;\n\t\tthis.g += ( color.g - this.g ) * alpha;\n\t\tthis.b += ( color.b - this.b ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpColors( color1, color2, alpha ) {\n\n\t\tthis.r = color1.r + ( color2.r - color1.r ) * alpha;\n\t\tthis.g = color1.g + ( color2.g - color1.g ) * alpha;\n\t\tthis.b = color1.b + ( color2.b - color1.b ) * alpha;\n\n\t\treturn this;\n\n\t}\n\n\tlerpHSL( color, alpha ) {\n\n\t\tthis.getHSL( _hslA );\n\t\tcolor.getHSL( _hslB );\n\n\t\tconst h = lerp( _hslA.h, _hslB.h, alpha );\n\t\tconst s = lerp( _hslA.s, _hslB.s, alpha );\n\t\tconst l = lerp( _hslA.l, _hslB.l, alpha );\n\n\t\tthis.setHSL( h, s, l );\n\n\t\treturn this;\n\n\t}\n\n\tequals( c ) {\n\n\t\treturn ( c.r === this.r ) && ( c.g === this.g ) && ( c.b === this.b );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tthis.r = array[ offset ];\n\t\tthis.g = array[ offset + 1 ];\n\t\tthis.b = array[ offset + 2 ];\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tarray[ offset ] = this.r;\n\t\tarray[ offset + 1 ] = this.g;\n\t\tarray[ offset + 2 ] = this.b;\n\n\t\treturn array;\n\n\t}\n\n\tfromBufferAttribute( attribute, index ) {\n\n\t\tthis.r = attribute.getX( index );\n\t\tthis.g = attribute.getY( index );\n\t\tthis.b = attribute.getZ( index );\n\n\t\tif ( attribute.normalized === true ) {\n\n\t\t\t// assuming Uint8Array\n\n\t\t\tthis.r /= 255;\n\t\t\tthis.g /= 255;\n\t\t\tthis.b /= 255;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.getHex();\n\n\t}\n\n}\n\nColor.NAMES = _colorKeywords;\n\nColor.prototype.isColor = true;\nColor.prototype.r = 1;\nColor.prototype.g = 1;\nColor.prototype.b = 1;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n * map: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * specularMap: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n * combine: THREE.Multiply,\n * reflectivity: <float>,\n * refractionRatio: <float>,\n *\n * depthTest: <bool>,\n * depthWrite: <bool>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>\n * }\n */\n\nclass MeshBasicMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshBasicMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // emissive\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshBasicMaterial.prototype.isMeshBasicMaterial = true;\n\nconst _vector$9 = /*@__PURE__*/ new Vector3();\nconst _vector2$1 = /*@__PURE__*/ new Vector2();\n\nclass BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tif ( Array.isArray( array ) ) {\n\n\t\t\tthrow new TypeError( 'THREE.BufferAttribute: array should be a Typed Array.' );\n\n\t\t}\n\n\t\tthis.name = '';\n\n\t\tthis.array = array;\n\t\tthis.itemSize = itemSize;\n\t\tthis.count = array !== undefined ? array.length / itemSize : 0;\n\t\tthis.normalized = normalized === true;\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = { offset: 0, count: - 1 };\n\n\t\tthis.version = 0;\n\n\t}\n\n\tonUploadCallback() {}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.name = source.name;\n\t\tthis.array = new source.array.constructor( source.array );\n\t\tthis.itemSize = source.itemSize;\n\t\tthis.count = source.count;\n\t\tthis.normalized = source.normalized;\n\n\t\tthis.usage = source.usage;\n\n\t\treturn this;\n\n\t}\n\n\tcopyAt( index1, attribute, index2 ) {\n\n\t\tindex1 *= this.itemSize;\n\t\tindex2 *= attribute.itemSize;\n\n\t\tfor ( let i = 0, l = this.itemSize; i < l; i ++ ) {\n\n\t\t\tthis.array[ index1 + i ] = attribute.array[ index2 + i ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyArray( array ) {\n\n\t\tthis.array.set( array );\n\n\t\treturn this;\n\n\t}\n\n\tcopyColorsArray( colors ) {\n\n\t\tconst array = this.array;\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0, l = colors.length; i < l; i ++ ) {\n\n\t\t\tlet color = colors[ i ];\n\n\t\t\tif ( color === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.BufferAttribute.copyColorsArray(): color is undefined', i );\n\t\t\t\tcolor = new Color();\n\n\t\t\t}\n\n\t\t\tarray[ offset ++ ] = color.r;\n\t\t\tarray[ offset ++ ] = color.g;\n\t\t\tarray[ offset ++ ] = color.b;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyVector2sArray( vectors ) {\n\n\t\tconst array = this.array;\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0, l = vectors.length; i < l; i ++ ) {\n\n\t\t\tlet vector = vectors[ i ];\n\n\t\t\tif ( vector === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.BufferAttribute.copyVector2sArray(): vector is undefined', i );\n\t\t\t\tvector = new Vector2();\n\n\t\t\t}\n\n\t\t\tarray[ offset ++ ] = vector.x;\n\t\t\tarray[ offset ++ ] = vector.y;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyVector3sArray( vectors ) {\n\n\t\tconst array = this.array;\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0, l = vectors.length; i < l; i ++ ) {\n\n\t\t\tlet vector = vectors[ i ];\n\n\t\t\tif ( vector === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.BufferAttribute.copyVector3sArray(): vector is undefined', i );\n\t\t\t\tvector = new Vector3();\n\n\t\t\t}\n\n\t\t\tarray[ offset ++ ] = vector.x;\n\t\t\tarray[ offset ++ ] = vector.y;\n\t\t\tarray[ offset ++ ] = vector.z;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcopyVector4sArray( vectors ) {\n\n\t\tconst array = this.array;\n\t\tlet offset = 0;\n\n\t\tfor ( let i = 0, l = vectors.length; i < l; i ++ ) {\n\n\t\t\tlet vector = vectors[ i ];\n\n\t\t\tif ( vector === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.BufferAttribute.copyVector4sArray(): vector is undefined', i );\n\t\t\t\tvector = new Vector4();\n\n\t\t\t}\n\n\t\t\tarray[ offset ++ ] = vector.x;\n\t\t\tarray[ offset ++ ] = vector.y;\n\t\t\tarray[ offset ++ ] = vector.z;\n\t\t\tarray[ offset ++ ] = vector.w;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix3( m ) {\n\n\t\tif ( this.itemSize === 2 ) {\n\n\t\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t\t_vector2$1.fromBufferAttribute( this, i );\n\t\t\t\t_vector2$1.applyMatrix3( m );\n\n\t\t\t\tthis.setXY( i, _vector2$1.x, _vector2$1.y );\n\n\t\t\t}\n\n\t\t} else if ( this.itemSize === 3 ) {\n\n\t\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t\t_vector$9.fromBufferAttribute( this, i );\n\t\t\t\t_vector$9.applyMatrix3( m );\n\n\t\t\t\tthis.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$9.x = this.getX( i );\n\t\t\t_vector$9.y = this.getY( i );\n\t\t\t_vector$9.z = this.getZ( i );\n\n\t\t\t_vector$9.applyMatrix4( m );\n\n\t\t\tthis.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$9.x = this.getX( i );\n\t\t\t_vector$9.y = this.getY( i );\n\t\t\t_vector$9.z = this.getZ( i );\n\n\t\t\t_vector$9.applyNormalMatrix( m );\n\n\t\t\tthis.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$9.x = this.getX( i );\n\t\t\t_vector$9.y = this.getY( i );\n\t\t\t_vector$9.z = this.getZ( i );\n\n\t\t\t_vector$9.transformDirection( m );\n\n\t\t\tthis.setXYZ( i, _vector$9.x, _vector$9.y, _vector$9.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tset( value, offset = 0 ) {\n\n\t\tthis.array.set( value, offset );\n\n\t\treturn this;\n\n\t}\n\n\tgetX( index ) {\n\n\t\treturn this.array[ index * this.itemSize ];\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tthis.array[ index * this.itemSize ] = x;\n\n\t\treturn this;\n\n\t}\n\n\tgetY( index ) {\n\n\t\treturn this.array[ index * this.itemSize + 1 ];\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tthis.array[ index * this.itemSize + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tgetZ( index ) {\n\n\t\treturn this.array[ index * this.itemSize + 2 ];\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tthis.array[ index * this.itemSize + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tgetW( index ) {\n\n\t\treturn this.array[ index * this.itemSize + 3 ];\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tthis.array[ index * this.itemSize + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\t\tthis.array[ index + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex *= this.itemSize;\n\n\t\tthis.array[ index + 0 ] = x;\n\t\tthis.array[ index + 1 ] = y;\n\t\tthis.array[ index + 2 ] = z;\n\t\tthis.array[ index + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tonUpload( callback ) {\n\n\t\tthis.onUploadCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.array, this.itemSize ).copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\titemSize: this.itemSize,\n\t\t\ttype: this.array.constructor.name,\n\t\t\tarray: Array.prototype.slice.call( this.array ),\n\t\t\tnormalized: this.normalized\n\t\t};\n\n\t\tif ( this.name !== '' ) data.name = this.name;\n\t\tif ( this.usage !== StaticDrawUsage ) data.usage = this.usage;\n\t\tif ( this.updateRange.offset !== 0 || this.updateRange.count !== - 1 ) data.updateRange = this.updateRange;\n\n\t\treturn data;\n\n\t}\n\n}\n\nBufferAttribute.prototype.isBufferAttribute = true;\n\n//\n\nclass Int8BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int8Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint8BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint8Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint8ClampedBufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint8ClampedArray( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Int16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Int32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Int32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Uint32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Float16BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Uint16Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nFloat16BufferAttribute.prototype.isFloat16BufferAttribute = true;\n\nclass Float32BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Float32Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nclass Float64BufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized ) {\n\n\t\tsuper( new Float64Array( array ), itemSize, normalized );\n\n\t}\n\n}\n\nfunction arrayMax( array ) {\n\n\tif ( array.length === 0 ) return - Infinity;\n\n\tlet max = array[ 0 ];\n\n\tfor ( let i = 1, l = array.length; i < l; ++ i ) {\n\n\t\tif ( array[ i ] > max ) max = array[ i ];\n\n\t}\n\n\treturn max;\n\n}\n\nconst TYPED_ARRAYS = {\n\tInt8Array: Int8Array,\n\tUint8Array: Uint8Array,\n\tUint8ClampedArray: Uint8ClampedArray,\n\tInt16Array: Int16Array,\n\tUint16Array: Uint16Array,\n\tInt32Array: Int32Array,\n\tUint32Array: Uint32Array,\n\tFloat32Array: Float32Array,\n\tFloat64Array: Float64Array\n};\n\nfunction getTypedArray( type, buffer ) {\n\n\treturn new TYPED_ARRAYS[ type ]( buffer );\n\n}\n\nlet _id = 0;\n\nconst _m1 = /*@__PURE__*/ new Matrix4();\nconst _obj = /*@__PURE__*/ new Object3D();\nconst _offset = /*@__PURE__*/ new Vector3();\nconst _box$1 = /*@__PURE__*/ new Box3();\nconst _boxMorphTargets = /*@__PURE__*/ new Box3();\nconst _vector$8 = /*@__PURE__*/ new Vector3();\n\nclass BufferGeometry extends EventDispatcher {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tObject.defineProperty( this, 'id', { value: _id ++ } );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.name = '';\n\t\tthis.type = 'BufferGeometry';\n\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\n\t\tthis.morphAttributes = {};\n\t\tthis.morphTargetsRelative = false;\n\n\t\tthis.groups = [];\n\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\tthis.drawRange = { start: 0, count: Infinity };\n\n\t\tthis.userData = {};\n\n\t}\n\n\tgetIndex() {\n\n\t\treturn this.index;\n\n\t}\n\n\tsetIndex( index ) {\n\n\t\tif ( Array.isArray( index ) ) {\n\n\t\t\tthis.index = new ( arrayMax( index ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( index, 1 );\n\n\t\t} else {\n\n\t\t\tthis.index = index;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetAttribute( name ) {\n\n\t\treturn this.attributes[ name ];\n\n\t}\n\n\tsetAttribute( name, attribute ) {\n\n\t\tthis.attributes[ name ] = attribute;\n\n\t\treturn this;\n\n\t}\n\n\tdeleteAttribute( name ) {\n\n\t\tdelete this.attributes[ name ];\n\n\t\treturn this;\n\n\t}\n\n\thasAttribute( name ) {\n\n\t\treturn this.attributes[ name ] !== undefined;\n\n\t}\n\n\taddGroup( start, count, materialIndex = 0 ) {\n\n\t\tthis.groups.push( {\n\n\t\t\tstart: start,\n\t\t\tcount: count,\n\t\t\tmaterialIndex: materialIndex\n\n\t\t} );\n\n\t}\n\n\tclearGroups() {\n\n\t\tthis.groups = [];\n\n\t}\n\n\tsetDrawRange( start, count ) {\n\n\t\tthis.drawRange.start = start;\n\t\tthis.drawRange.count = count;\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tconst position = this.attributes.position;\n\n\t\tif ( position !== undefined ) {\n\n\t\t\tposition.applyMatrix4( matrix );\n\n\t\t\tposition.needsUpdate = true;\n\n\t\t}\n\n\t\tconst normal = this.attributes.normal;\n\n\t\tif ( normal !== undefined ) {\n\n\t\t\tconst normalMatrix = new Matrix3().getNormalMatrix( matrix );\n\n\t\t\tnormal.applyNormalMatrix( normalMatrix );\n\n\t\t\tnormal.needsUpdate = true;\n\n\t\t}\n\n\t\tconst tangent = this.attributes.tangent;\n\n\t\tif ( tangent !== undefined ) {\n\n\t\t\ttangent.transformDirection( matrix );\n\n\t\t\ttangent.needsUpdate = true;\n\n\t\t}\n\n\t\tif ( this.boundingBox !== null ) {\n\n\t\t\tthis.computeBoundingBox();\n\n\t\t}\n\n\t\tif ( this.boundingSphere !== null ) {\n\n\t\t\tthis.computeBoundingSphere();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyQuaternion( q ) {\n\n\t\t_m1.makeRotationFromQuaternion( q );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateX( angle ) {\n\n\t\t// rotate geometry around world x-axis\n\n\t\t_m1.makeRotationX( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateY( angle ) {\n\n\t\t// rotate geometry around world y-axis\n\n\t\t_m1.makeRotationY( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\trotateZ( angle ) {\n\n\t\t// rotate geometry around world z-axis\n\n\t\t_m1.makeRotationZ( angle );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( x, y, z ) {\n\n\t\t// translate geometry\n\n\t\t_m1.makeTranslation( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\tscale( x, y, z ) {\n\n\t\t// scale geometry\n\n\t\t_m1.makeScale( x, y, z );\n\n\t\tthis.applyMatrix4( _m1 );\n\n\t\treturn this;\n\n\t}\n\n\tlookAt( vector ) {\n\n\t\t_obj.lookAt( vector );\n\n\t\t_obj.updateMatrix();\n\n\t\tthis.applyMatrix4( _obj.matrix );\n\n\t\treturn this;\n\n\t}\n\n\tcenter() {\n\n\t\tthis.computeBoundingBox();\n\n\t\tthis.boundingBox.getCenter( _offset ).negate();\n\n\t\tthis.translate( _offset.x, _offset.y, _offset.z );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tconst position = [];\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tconst point = points[ i ];\n\t\t\tposition.push( point.x, point.y, point.z || 0 );\n\n\t\t}\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( position, 3 ) );\n\n\t\treturn this;\n\n\t}\n\n\tcomputeBoundingBox() {\n\n\t\tif ( this.boundingBox === null ) {\n\n\t\t\tthis.boundingBox = new Box3();\n\n\t\t}\n\n\t\tconst position = this.attributes.position;\n\t\tconst morphAttributesPosition = this.morphAttributes.position;\n\n\t\tif ( position && position.isGLBufferAttribute ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".', this );\n\n\t\t\tthis.boundingBox.set(\n\t\t\t\tnew Vector3( - Infinity, - Infinity, - Infinity ),\n\t\t\t\tnew Vector3( + Infinity, + Infinity, + Infinity )\n\t\t\t);\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( position !== undefined ) {\n\n\t\t\tthis.boundingBox.setFromBufferAttribute( position );\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\t_box$1.setFromBufferAttribute( morphAttribute );\n\n\t\t\t\t\tif ( this.morphTargetsRelative ) {\n\n\t\t\t\t\t\t_vector$8.addVectors( this.boundingBox.min, _box$1.min );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _vector$8 );\n\n\t\t\t\t\t\t_vector$8.addVectors( this.boundingBox.max, _box$1.max );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _vector$8 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _box$1.min );\n\t\t\t\t\t\tthis.boundingBox.expandByPoint( _box$1.max );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tthis.boundingBox.makeEmpty();\n\n\t\t}\n\n\t\tif ( isNaN( this.boundingBox.min.x ) || isNaN( this.boundingBox.min.y ) || isNaN( this.boundingBox.min.z ) ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.', this );\n\n\t\t}\n\n\t}\n\n\tcomputeBoundingSphere() {\n\n\t\tif ( this.boundingSphere === null ) {\n\n\t\t\tthis.boundingSphere = new Sphere();\n\n\t\t}\n\n\t\tconst position = this.attributes.position;\n\t\tconst morphAttributesPosition = this.morphAttributes.position;\n\n\t\tif ( position && position.isGLBufferAttribute ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".', this );\n\n\t\t\tthis.boundingSphere.set( new Vector3(), Infinity );\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( position ) {\n\n\t\t\t// first, find the center of the bounding sphere\n\n\t\t\tconst center = this.boundingSphere.center;\n\n\t\t\t_box$1.setFromBufferAttribute( position );\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\t_boxMorphTargets.setFromBufferAttribute( morphAttribute );\n\n\t\t\t\t\tif ( this.morphTargetsRelative ) {\n\n\t\t\t\t\t\t_vector$8.addVectors( _box$1.min, _boxMorphTargets.min );\n\t\t\t\t\t\t_box$1.expandByPoint( _vector$8 );\n\n\t\t\t\t\t\t_vector$8.addVectors( _box$1.max, _boxMorphTargets.max );\n\t\t\t\t\t\t_box$1.expandByPoint( _vector$8 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_box$1.expandByPoint( _boxMorphTargets.min );\n\t\t\t\t\t\t_box$1.expandByPoint( _boxMorphTargets.max );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t_box$1.getCenter( center );\n\n\t\t\t// second, try to find a boundingSphere with a radius smaller than the\n\t\t\t// boundingSphere of the boundingBox: sqrt(3) smaller in the best case\n\n\t\t\tlet maxRadiusSq = 0;\n\n\t\t\tfor ( let i = 0, il = position.count; i < il; i ++ ) {\n\n\t\t\t\t_vector$8.fromBufferAttribute( position, i );\n\n\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) );\n\n\t\t\t}\n\n\t\t\t// process morph attributes if present\n\n\t\t\tif ( morphAttributesPosition ) {\n\n\t\t\t\tfor ( let i = 0, il = morphAttributesPosition.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst morphAttribute = morphAttributesPosition[ i ];\n\t\t\t\t\tconst morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t\t\t\tfor ( let j = 0, jl = morphAttribute.count; j < jl; j ++ ) {\n\n\t\t\t\t\t\t_vector$8.fromBufferAttribute( morphAttribute, j );\n\n\t\t\t\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t\t\t\t_offset.fromBufferAttribute( position, j );\n\t\t\t\t\t\t\t_vector$8.add( _offset );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaxRadiusSq = Math.max( maxRadiusSq, center.distanceToSquared( _vector$8 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.boundingSphere.radius = Math.sqrt( maxRadiusSq );\n\n\t\t\tif ( isNaN( this.boundingSphere.radius ) ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.', this );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcomputeFaceNormals() {\n\n\t\t// backwards compatibility\n\n\t}\n\n\tcomputeTangents() {\n\n\t\tconst index = this.index;\n\t\tconst attributes = this.attributes;\n\n\t\t// based on http://www.terathon.com/code/tangent.html\n\t\t// (per vertex tangents)\n\n\t\tif ( index === null ||\n\t\t\t attributes.position === undefined ||\n\t\t\t attributes.normal === undefined ||\n\t\t\t attributes.uv === undefined ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst indices = index.array;\n\t\tconst positions = attributes.position.array;\n\t\tconst normals = attributes.normal.array;\n\t\tconst uvs = attributes.uv.array;\n\n\t\tconst nVertices = positions.length / 3;\n\n\t\tif ( attributes.tangent === undefined ) {\n\n\t\t\tthis.setAttribute( 'tangent', new BufferAttribute( new Float32Array( 4 * nVertices ), 4 ) );\n\n\t\t}\n\n\t\tconst tangents = attributes.tangent.array;\n\n\t\tconst tan1 = [], tan2 = [];\n\n\t\tfor ( let i = 0; i < nVertices; i ++ ) {\n\n\t\t\ttan1[ i ] = new Vector3();\n\t\t\ttan2[ i ] = new Vector3();\n\n\t\t}\n\n\t\tconst vA = new Vector3(),\n\t\t\tvB = new Vector3(),\n\t\t\tvC = new Vector3(),\n\n\t\t\tuvA = new Vector2(),\n\t\t\tuvB = new Vector2(),\n\t\t\tuvC = new Vector2(),\n\n\t\t\tsdir = new Vector3(),\n\t\t\ttdir = new Vector3();\n\n\t\tfunction handleTriangle( a, b, c ) {\n\n\t\t\tvA.fromArray( positions, a * 3 );\n\t\t\tvB.fromArray( positions, b * 3 );\n\t\t\tvC.fromArray( positions, c * 3 );\n\n\t\t\tuvA.fromArray( uvs, a * 2 );\n\t\t\tuvB.fromArray( uvs, b * 2 );\n\t\t\tuvC.fromArray( uvs, c * 2 );\n\n\t\t\tvB.sub( vA );\n\t\t\tvC.sub( vA );\n\n\t\t\tuvB.sub( uvA );\n\t\t\tuvC.sub( uvA );\n\n\t\t\tconst r = 1.0 / ( uvB.x * uvC.y - uvC.x * uvB.y );\n\n\t\t\t// silently ignore degenerate uv triangles having coincident or colinear vertices\n\n\t\t\tif ( ! isFinite( r ) ) return;\n\n\t\t\tsdir.copy( vB ).multiplyScalar( uvC.y ).addScaledVector( vC, - uvB.y ).multiplyScalar( r );\n\t\t\ttdir.copy( vC ).multiplyScalar( uvB.x ).addScaledVector( vB, - uvC.x ).multiplyScalar( r );\n\n\t\t\ttan1[ a ].add( sdir );\n\t\t\ttan1[ b ].add( sdir );\n\t\t\ttan1[ c ].add( sdir );\n\n\t\t\ttan2[ a ].add( tdir );\n\t\t\ttan2[ b ].add( tdir );\n\t\t\ttan2[ c ].add( tdir );\n\n\t\t}\n\n\t\tlet groups = this.groups;\n\n\t\tif ( groups.length === 0 ) {\n\n\t\t\tgroups = [ {\n\t\t\t\tstart: 0,\n\t\t\t\tcount: indices.length\n\t\t\t} ];\n\n\t\t}\n\n\t\tfor ( let i = 0, il = groups.length; i < il; ++ i ) {\n\n\t\t\tconst group = groups[ i ];\n\n\t\t\tconst start = group.start;\n\t\t\tconst count = group.count;\n\n\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\thandleTriangle(\n\t\t\t\t\tindices[ j + 0 ],\n\t\t\t\t\tindices[ j + 1 ],\n\t\t\t\t\tindices[ j + 2 ]\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst tmp = new Vector3(), tmp2 = new Vector3();\n\t\tconst n = new Vector3(), n2 = new Vector3();\n\n\t\tfunction handleVertex( v ) {\n\n\t\t\tn.fromArray( normals, v * 3 );\n\t\t\tn2.copy( n );\n\n\t\t\tconst t = tan1[ v ];\n\n\t\t\t// Gram-Schmidt orthogonalize\n\n\t\t\ttmp.copy( t );\n\t\t\ttmp.sub( n.multiplyScalar( n.dot( t ) ) ).normalize();\n\n\t\t\t// Calculate handedness\n\n\t\t\ttmp2.crossVectors( n2, t );\n\t\t\tconst test = tmp2.dot( tan2[ v ] );\n\t\t\tconst w = ( test < 0.0 ) ? - 1.0 : 1.0;\n\n\t\t\ttangents[ v * 4 ] = tmp.x;\n\t\t\ttangents[ v * 4 + 1 ] = tmp.y;\n\t\t\ttangents[ v * 4 + 2 ] = tmp.z;\n\t\t\ttangents[ v * 4 + 3 ] = w;\n\n\t\t}\n\n\t\tfor ( let i = 0, il = groups.length; i < il; ++ i ) {\n\n\t\t\tconst group = groups[ i ];\n\n\t\t\tconst start = group.start;\n\t\t\tconst count = group.count;\n\n\t\t\tfor ( let j = start, jl = start + count; j < jl; j += 3 ) {\n\n\t\t\t\thandleVertex( indices[ j + 0 ] );\n\t\t\t\thandleVertex( indices[ j + 1 ] );\n\t\t\t\thandleVertex( indices[ j + 2 ] );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcomputeVertexNormals() {\n\n\t\tconst index = this.index;\n\t\tconst positionAttribute = this.getAttribute( 'position' );\n\n\t\tif ( positionAttribute !== undefined ) {\n\n\t\t\tlet normalAttribute = this.getAttribute( 'normal' );\n\n\t\t\tif ( normalAttribute === undefined ) {\n\n\t\t\t\tnormalAttribute = new BufferAttribute( new Float32Array( positionAttribute.count * 3 ), 3 );\n\t\t\t\tthis.setAttribute( 'normal', normalAttribute );\n\n\t\t\t} else {\n\n\t\t\t\t// reset existing normals to zero\n\n\t\t\t\tfor ( let i = 0, il = normalAttribute.count; i < il; i ++ ) {\n\n\t\t\t\t\tnormalAttribute.setXYZ( i, 0, 0, 0 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst pA = new Vector3(), pB = new Vector3(), pC = new Vector3();\n\t\t\tconst nA = new Vector3(), nB = new Vector3(), nC = new Vector3();\n\t\t\tconst cb = new Vector3(), ab = new Vector3();\n\n\t\t\t// indexed elements\n\n\t\t\tif ( index ) {\n\n\t\t\t\tfor ( let i = 0, il = index.count; i < il; i += 3 ) {\n\n\t\t\t\t\tconst vA = index.getX( i + 0 );\n\t\t\t\t\tconst vB = index.getX( i + 1 );\n\t\t\t\t\tconst vC = index.getX( i + 2 );\n\n\t\t\t\t\tpA.fromBufferAttribute( positionAttribute, vA );\n\t\t\t\t\tpB.fromBufferAttribute( positionAttribute, vB );\n\t\t\t\t\tpC.fromBufferAttribute( positionAttribute, vC );\n\n\t\t\t\t\tcb.subVectors( pC, pB );\n\t\t\t\t\tab.subVectors( pA, pB );\n\t\t\t\t\tcb.cross( ab );\n\n\t\t\t\t\tnA.fromBufferAttribute( normalAttribute, vA );\n\t\t\t\t\tnB.fromBufferAttribute( normalAttribute, vB );\n\t\t\t\t\tnC.fromBufferAttribute( normalAttribute, vC );\n\n\t\t\t\t\tnA.add( cb );\n\t\t\t\t\tnB.add( cb );\n\t\t\t\t\tnC.add( cb );\n\n\t\t\t\t\tnormalAttribute.setXYZ( vA, nA.x, nA.y, nA.z );\n\t\t\t\t\tnormalAttribute.setXYZ( vB, nB.x, nB.y, nB.z );\n\t\t\t\t\tnormalAttribute.setXYZ( vC, nC.x, nC.y, nC.z );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// non-indexed elements (unconnected triangle soup)\n\n\t\t\t\tfor ( let i = 0, il = positionAttribute.count; i < il; i += 3 ) {\n\n\t\t\t\t\tpA.fromBufferAttribute( positionAttribute, i + 0 );\n\t\t\t\t\tpB.fromBufferAttribute( positionAttribute, i + 1 );\n\t\t\t\t\tpC.fromBufferAttribute( positionAttribute, i + 2 );\n\n\t\t\t\t\tcb.subVectors( pC, pB );\n\t\t\t\t\tab.subVectors( pA, pB );\n\t\t\t\t\tcb.cross( ab );\n\n\t\t\t\t\tnormalAttribute.setXYZ( i + 0, cb.x, cb.y, cb.z );\n\t\t\t\t\tnormalAttribute.setXYZ( i + 1, cb.x, cb.y, cb.z );\n\t\t\t\t\tnormalAttribute.setXYZ( i + 2, cb.x, cb.y, cb.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.normalizeNormals();\n\n\t\t\tnormalAttribute.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tmerge( geometry, offset ) {\n\n\t\tif ( ! ( geometry && geometry.isBufferGeometry ) ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', geometry );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( offset === undefined ) {\n\n\t\t\toffset = 0;\n\n\t\t\tconsole.warn(\n\t\t\t\t'THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. '\n\t\t\t\t+ 'Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge.'\n\t\t\t);\n\n\t\t}\n\n\t\tconst attributes = this.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tif ( geometry.attributes[ key ] === undefined ) continue;\n\n\t\t\tconst attribute1 = attributes[ key ];\n\t\t\tconst attributeArray1 = attribute1.array;\n\n\t\t\tconst attribute2 = geometry.attributes[ key ];\n\t\t\tconst attributeArray2 = attribute2.array;\n\n\t\t\tconst attributeOffset = attribute2.itemSize * offset;\n\t\t\tconst length = Math.min( attributeArray2.length, attributeArray1.length - attributeOffset );\n\n\t\t\tfor ( let i = 0, j = attributeOffset; i < length; i ++, j ++ ) {\n\n\t\t\t\tattributeArray1[ j ] = attributeArray2[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tnormalizeNormals() {\n\n\t\tconst normals = this.attributes.normal;\n\n\t\tfor ( let i = 0, il = normals.count; i < il; i ++ ) {\n\n\t\t\t_vector$8.fromBufferAttribute( normals, i );\n\n\t\t\t_vector$8.normalize();\n\n\t\t\tnormals.setXYZ( i, _vector$8.x, _vector$8.y, _vector$8.z );\n\n\t\t}\n\n\t}\n\n\ttoNonIndexed() {\n\n\t\tfunction convertBufferAttribute( attribute, indices ) {\n\n\t\t\tconst array = attribute.array;\n\t\t\tconst itemSize = attribute.itemSize;\n\t\t\tconst normalized = attribute.normalized;\n\n\t\t\tconst array2 = new array.constructor( indices.length * itemSize );\n\n\t\t\tlet index = 0, index2 = 0;\n\n\t\t\tfor ( let i = 0, l = indices.length; i < l; i ++ ) {\n\n\t\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\tindex = indices[ i ] * attribute.data.stride + attribute.offset;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tindex = indices[ i ] * itemSize;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let j = 0; j < itemSize; j ++ ) {\n\n\t\t\t\t\tarray2[ index2 ++ ] = array[ index ++ ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new BufferAttribute( array2, itemSize, normalized );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( this.index === null ) {\n\n\t\t\tconsole.warn( 'THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.' );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tconst geometry2 = new BufferGeometry();\n\n\t\tconst indices = this.index.array;\n\t\tconst attributes = this.attributes;\n\n\t\t// attributes\n\n\t\tfor ( const name in attributes ) {\n\n\t\t\tconst attribute = attributes[ name ];\n\n\t\t\tconst newAttribute = convertBufferAttribute( attribute, indices );\n\n\t\t\tgeometry2.setAttribute( name, newAttribute );\n\n\t\t}\n\n\t\t// morph attributes\n\n\t\tconst morphAttributes = this.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst morphArray = [];\n\t\t\tconst morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\tfor ( let i = 0, il = morphAttribute.length; i < il; i ++ ) {\n\n\t\t\t\tconst attribute = morphAttribute[ i ];\n\n\t\t\t\tconst newAttribute = convertBufferAttribute( attribute, indices );\n\n\t\t\t\tmorphArray.push( newAttribute );\n\n\t\t\t}\n\n\t\t\tgeometry2.morphAttributes[ name ] = morphArray;\n\n\t\t}\n\n\t\tgeometry2.morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t// groups\n\n\t\tconst groups = this.groups;\n\n\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\tconst group = groups[ i ];\n\t\t\tgeometry2.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t}\n\n\t\treturn geometry2;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'BufferGeometry',\n\t\t\t\tgenerator: 'BufferGeometry.toJSON'\n\t\t\t}\n\t\t};\n\n\t\t// standard BufferGeometry serialization\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.type = this.type;\n\t\tif ( this.name !== '' ) data.name = this.name;\n\t\tif ( Object.keys( this.userData ).length > 0 ) data.userData = this.userData;\n\n\t\tif ( this.parameters !== undefined ) {\n\n\t\t\tconst parameters = this.parameters;\n\n\t\t\tfor ( const key in parameters ) {\n\n\t\t\t\tif ( parameters[ key ] !== undefined ) data[ key ] = parameters[ key ];\n\n\t\t\t}\n\n\t\t\treturn data;\n\n\t\t}\n\n\t\t// for simplicity the code assumes attributes are not shared across geometries, see #15811\n\n\t\tdata.data = { attributes: {} };\n\n\t\tconst index = this.index;\n\n\t\tif ( index !== null ) {\n\n\t\t\tdata.data.index = {\n\t\t\t\ttype: index.array.constructor.name,\n\t\t\t\tarray: Array.prototype.slice.call( index.array )\n\t\t\t};\n\n\t\t}\n\n\t\tconst attributes = this.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\n\t\t\tdata.data.attributes[ key ] = attribute.toJSON( data.data );\n\n\t\t}\n\n\t\tconst morphAttributes = {};\n\t\tlet hasMorphAttributes = false;\n\n\t\tfor ( const key in this.morphAttributes ) {\n\n\t\t\tconst attributeArray = this.morphAttributes[ key ];\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0, il = attributeArray.length; i < il; i ++ ) {\n\n\t\t\t\tconst attribute = attributeArray[ i ];\n\n\t\t\t\tarray.push( attribute.toJSON( data.data ) );\n\n\t\t\t}\n\n\t\t\tif ( array.length > 0 ) {\n\n\t\t\t\tmorphAttributes[ key ] = array;\n\n\t\t\t\thasMorphAttributes = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( hasMorphAttributes ) {\n\n\t\t\tdata.data.morphAttributes = morphAttributes;\n\t\t\tdata.data.morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t}\n\n\t\tconst groups = this.groups;\n\n\t\tif ( groups.length > 0 ) {\n\n\t\t\tdata.data.groups = JSON.parse( JSON.stringify( groups ) );\n\n\t\t}\n\n\t\tconst boundingSphere = this.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tdata.data.boundingSphere = {\n\t\t\t\tcenter: boundingSphere.center.toArray(),\n\t\t\t\tradius: boundingSphere.radius\n\t\t\t};\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tclone() {\n\n\t\t/*\n\t\t // Handle primitives\n\n\t\t const parameters = this.parameters;\n\n\t\t if ( parameters !== undefined ) {\n\n\t\t const values = [];\n\n\t\t for ( const key in parameters ) {\n\n\t\t values.push( parameters[ key ] );\n\n\t\t }\n\n\t\t const geometry = Object.create( this.constructor.prototype );\n\t\t this.constructor.apply( geometry, values );\n\t\t return geometry;\n\n\t\t }\n\n\t\t return new this.constructor().copy( this );\n\t\t */\n\n\t\treturn new BufferGeometry().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\t// reset\n\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\t\tthis.morphAttributes = {};\n\t\tthis.groups = [];\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\n\t\t// used for storing cloned, shared data\n\n\t\tconst data = {};\n\n\t\t// name\n\n\t\tthis.name = source.name;\n\n\t\t// index\n\n\t\tconst index = source.index;\n\n\t\tif ( index !== null ) {\n\n\t\t\tthis.setIndex( index.clone( data ) );\n\n\t\t}\n\n\t\t// attributes\n\n\t\tconst attributes = source.attributes;\n\n\t\tfor ( const name in attributes ) {\n\n\t\t\tconst attribute = attributes[ name ];\n\t\t\tthis.setAttribute( name, attribute.clone( data ) );\n\n\t\t}\n\n\t\t// morph attributes\n\n\t\tconst morphAttributes = source.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst array = [];\n\t\t\tconst morphAttribute = morphAttributes[ name ]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\tfor ( let i = 0, l = morphAttribute.length; i < l; i ++ ) {\n\n\t\t\t\tarray.push( morphAttribute[ i ].clone( data ) );\n\n\t\t\t}\n\n\t\t\tthis.morphAttributes[ name ] = array;\n\n\t\t}\n\n\t\tthis.morphTargetsRelative = source.morphTargetsRelative;\n\n\t\t// groups\n\n\t\tconst groups = source.groups;\n\n\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\tconst group = groups[ i ];\n\t\t\tthis.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t}\n\n\t\t// bounding box\n\n\t\tconst boundingBox = source.boundingBox;\n\n\t\tif ( boundingBox !== null ) {\n\n\t\t\tthis.boundingBox = boundingBox.clone();\n\n\t\t}\n\n\t\t// bounding sphere\n\n\t\tconst boundingSphere = source.boundingSphere;\n\n\t\tif ( boundingSphere !== null ) {\n\n\t\t\tthis.boundingSphere = boundingSphere.clone();\n\n\t\t}\n\n\t\t// draw range\n\n\t\tthis.drawRange.start = source.drawRange.start;\n\t\tthis.drawRange.count = source.drawRange.count;\n\n\t\t// user data\n\n\t\tthis.userData = source.userData;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nBufferGeometry.prototype.isBufferGeometry = true;\n\nconst _inverseMatrix$2 = /*@__PURE__*/ new Matrix4();\nconst _ray$2 = /*@__PURE__*/ new Ray();\nconst _sphere$3 = /*@__PURE__*/ new Sphere();\n\nconst _vA$1 = /*@__PURE__*/ new Vector3();\nconst _vB$1 = /*@__PURE__*/ new Vector3();\nconst _vC$1 = /*@__PURE__*/ new Vector3();\n\nconst _tempA = /*@__PURE__*/ new Vector3();\nconst _tempB = /*@__PURE__*/ new Vector3();\nconst _tempC = /*@__PURE__*/ new Vector3();\n\nconst _morphA = /*@__PURE__*/ new Vector3();\nconst _morphB = /*@__PURE__*/ new Vector3();\nconst _morphC = /*@__PURE__*/ new Vector3();\n\nconst _uvA$1 = /*@__PURE__*/ new Vector2();\nconst _uvB$1 = /*@__PURE__*/ new Vector2();\nconst _uvC$1 = /*@__PURE__*/ new Vector2();\n\nconst _intersectionPoint = /*@__PURE__*/ new Vector3();\nconst _intersectionPointWorld = /*@__PURE__*/ new Vector3();\n\nclass Mesh extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new MeshBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Mesh';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tif ( source.morphTargetInfluences !== undefined ) {\n\n\t\t\tthis.morphTargetInfluences = source.morphTargetInfluences.slice();\n\n\t\t}\n\n\t\tif ( source.morphTargetDictionary !== undefined ) {\n\n\t\t\tthis.morphTargetDictionary = Object.assign( {}, source.morphTargetDictionary );\n\n\t\t}\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst material = this.material;\n\t\tconst matrixWorld = this.matrixWorld;\n\n\t\tif ( material === undefined ) return;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$3.copy( geometry.boundingSphere );\n\t\t_sphere$3.applyMatrix4( matrixWorld );\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$3 ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix$2.copy( matrixWorld ).invert();\n\t\t_ray$2.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$2 );\n\n\t\t// Check boundingBox before continuing\n\n\t\tif ( geometry.boundingBox !== null ) {\n\n\t\t\tif ( _ray$2.intersectsBox( geometry.boundingBox ) === false ) return;\n\n\t\t}\n\n\t\tlet intersection;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst position = geometry.attributes.position;\n\t\t\tconst morphPosition = geometry.morphAttributes.position;\n\t\t\tconst morphTargetsRelative = geometry.morphTargetsRelative;\n\t\t\tconst uv = geometry.attributes.uv;\n\t\t\tconst uv2 = geometry.attributes.uv2;\n\t\t\tconst groups = geometry.groups;\n\t\t\tconst drawRange = geometry.drawRange;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\t// indexed buffer geometry\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\tconst start = Math.max( group.start, drawRange.start );\n\t\t\t\t\t\tconst end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\t\tfor ( let j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\t\tconst a = index.getX( j );\n\t\t\t\t\t\t\tconst b = index.getX( j + 1 );\n\t\t\t\t\t\t\tconst c = index.getX( j + 2 );\n\n\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection( this, groupMaterial, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c );\n\n\t\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( j / 3 ); // triangle number in indexed buffer semantics\n\t\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\tfor ( let i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\t\tconst a = index.getX( i );\n\t\t\t\t\t\tconst b = index.getX( i + 1 );\n\t\t\t\t\t\tconst c = index.getX( i + 2 );\n\n\t\t\t\t\t\tintersection = checkBufferGeometryIntersection( this, material, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c );\n\n\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( i / 3 ); // triangle number in indexed buffer semantics\n\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( position !== undefined ) {\n\n\t\t\t\t// non-indexed buffer geometry\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tfor ( let i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\tconst start = Math.max( group.start, drawRange.start );\n\t\t\t\t\t\tconst end = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\t\tfor ( let j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\t\tconst a = j;\n\t\t\t\t\t\t\tconst b = j + 1;\n\t\t\t\t\t\t\tconst c = j + 2;\n\n\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection( this, groupMaterial, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c );\n\n\t\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( j / 3 ); // triangle number in non-indexed buffer semantics\n\t\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\t\tconst end = Math.min( position.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\tfor ( let i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\t\tconst a = i;\n\t\t\t\t\t\tconst b = i + 1;\n\t\t\t\t\t\tconst c = i + 2;\n\n\t\t\t\t\t\tintersection = checkBufferGeometryIntersection( this, material, raycaster, _ray$2, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c );\n\n\t\t\t\t\t\tif ( intersection ) {\n\n\t\t\t\t\t\t\tintersection.faceIndex = Math.floor( i / 3 ); // triangle number in non-indexed buffer semantics\n\t\t\t\t\t\t\tintersects.push( intersection );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n}\n\nMesh.prototype.isMesh = true;\n\nfunction checkIntersection( object, material, raycaster, ray, pA, pB, pC, point ) {\n\n\tlet intersect;\n\n\tif ( material.side === BackSide ) {\n\n\t\tintersect = ray.intersectTriangle( pC, pB, pA, true, point );\n\n\t} else {\n\n\t\tintersect = ray.intersectTriangle( pA, pB, pC, material.side !== DoubleSide, point );\n\n\t}\n\n\tif ( intersect === null ) return null;\n\n\t_intersectionPointWorld.copy( point );\n\t_intersectionPointWorld.applyMatrix4( object.matrixWorld );\n\n\tconst distance = raycaster.ray.origin.distanceTo( _intersectionPointWorld );\n\n\tif ( distance < raycaster.near || distance > raycaster.far ) return null;\n\n\treturn {\n\t\tdistance: distance,\n\t\tpoint: _intersectionPointWorld.clone(),\n\t\tobject: object\n\t};\n\n}\n\nfunction checkBufferGeometryIntersection( object, material, raycaster, ray, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c ) {\n\n\t_vA$1.fromBufferAttribute( position, a );\n\t_vB$1.fromBufferAttribute( position, b );\n\t_vC$1.fromBufferAttribute( position, c );\n\n\tconst morphInfluences = object.morphTargetInfluences;\n\n\tif ( material.morphTargets && morphPosition && morphInfluences ) {\n\n\t\t_morphA.set( 0, 0, 0 );\n\t\t_morphB.set( 0, 0, 0 );\n\t\t_morphC.set( 0, 0, 0 );\n\n\t\tfor ( let i = 0, il = morphPosition.length; i < il; i ++ ) {\n\n\t\t\tconst influence = morphInfluences[ i ];\n\t\t\tconst morphAttribute = morphPosition[ i ];\n\n\t\t\tif ( influence === 0 ) continue;\n\n\t\t\t_tempA.fromBufferAttribute( morphAttribute, a );\n\t\t\t_tempB.fromBufferAttribute( morphAttribute, b );\n\t\t\t_tempC.fromBufferAttribute( morphAttribute, c );\n\n\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t_morphA.addScaledVector( _tempA, influence );\n\t\t\t\t_morphB.addScaledVector( _tempB, influence );\n\t\t\t\t_morphC.addScaledVector( _tempC, influence );\n\n\t\t\t} else {\n\n\t\t\t\t_morphA.addScaledVector( _tempA.sub( _vA$1 ), influence );\n\t\t\t\t_morphB.addScaledVector( _tempB.sub( _vB$1 ), influence );\n\t\t\t\t_morphC.addScaledVector( _tempC.sub( _vC$1 ), influence );\n\n\t\t\t}\n\n\t\t}\n\n\t\t_vA$1.add( _morphA );\n\t\t_vB$1.add( _morphB );\n\t\t_vC$1.add( _morphC );\n\n\t}\n\n\tif ( object.isSkinnedMesh ) {\n\n\t\tobject.boneTransform( a, _vA$1 );\n\t\tobject.boneTransform( b, _vB$1 );\n\t\tobject.boneTransform( c, _vC$1 );\n\n\t}\n\n\tconst intersection = checkIntersection( object, material, raycaster, ray, _vA$1, _vB$1, _vC$1, _intersectionPoint );\n\n\tif ( intersection ) {\n\n\t\tif ( uv ) {\n\n\t\t\t_uvA$1.fromBufferAttribute( uv, a );\n\t\t\t_uvB$1.fromBufferAttribute( uv, b );\n\t\t\t_uvC$1.fromBufferAttribute( uv, c );\n\n\t\t\tintersection.uv = Triangle.getUV( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() );\n\n\t\t}\n\n\t\tif ( uv2 ) {\n\n\t\t\t_uvA$1.fromBufferAttribute( uv2, a );\n\t\t\t_uvB$1.fromBufferAttribute( uv2, b );\n\t\t\t_uvC$1.fromBufferAttribute( uv2, c );\n\n\t\t\tintersection.uv2 = Triangle.getUV( _intersectionPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2() );\n\n\t\t}\n\n\t\tconst face = {\n\t\t\ta: a,\n\t\t\tb: b,\n\t\t\tc: c,\n\t\t\tnormal: new Vector3(),\n\t\t\tmaterialIndex: 0\n\t\t};\n\n\t\tTriangle.getNormal( _vA$1, _vB$1, _vC$1, face.normal );\n\n\t\tintersection.face = face;\n\n\t}\n\n\treturn intersection;\n\n}\n\nclass BoxGeometry extends BufferGeometry {\n\n\tconstructor( width = 1, height = 1, depth = 1, widthSegments = 1, heightSegments = 1, depthSegments = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'BoxGeometry';\n\n\t\tthis.parameters = {\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tdepth: depth,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\tdepthSegments: depthSegments\n\t\t};\n\n\t\tconst scope = this;\n\n\t\t// segments\n\n\t\twidthSegments = Math.floor( widthSegments );\n\t\theightSegments = Math.floor( heightSegments );\n\t\tdepthSegments = Math.floor( depthSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet numberOfVertices = 0;\n\t\tlet groupStart = 0;\n\n\t\t// build each side of the box geometry\n\n\t\tbuildPlane( 'z', 'y', 'x', - 1, - 1, depth, height, width, depthSegments, heightSegments, 0 ); // px\n\t\tbuildPlane( 'z', 'y', 'x', 1, - 1, depth, height, - width, depthSegments, heightSegments, 1 ); // nx\n\t\tbuildPlane( 'x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2 ); // py\n\t\tbuildPlane( 'x', 'z', 'y', 1, - 1, width, depth, - height, widthSegments, depthSegments, 3 ); // ny\n\t\tbuildPlane( 'x', 'y', 'z', 1, - 1, width, height, depth, widthSegments, heightSegments, 4 ); // pz\n\t\tbuildPlane( 'x', 'y', 'z', - 1, - 1, width, height, - depth, widthSegments, heightSegments, 5 ); // nz\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\tfunction buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) {\n\n\t\t\tconst segmentWidth = width / gridX;\n\t\t\tconst segmentHeight = height / gridY;\n\n\t\t\tconst widthHalf = width / 2;\n\t\t\tconst heightHalf = height / 2;\n\t\t\tconst depthHalf = depth / 2;\n\n\t\t\tconst gridX1 = gridX + 1;\n\t\t\tconst gridY1 = gridY + 1;\n\n\t\t\tlet vertexCounter = 0;\n\t\t\tlet groupCount = 0;\n\n\t\t\tconst vector = new Vector3();\n\n\t\t\t// generate vertices, normals and uvs\n\n\t\t\tfor ( let iy = 0; iy < gridY1; iy ++ ) {\n\n\t\t\t\tconst y = iy * segmentHeight - heightHalf;\n\n\t\t\t\tfor ( let ix = 0; ix < gridX1; ix ++ ) {\n\n\t\t\t\t\tconst x = ix * segmentWidth - widthHalf;\n\n\t\t\t\t\t// set values to correct vector component\n\n\t\t\t\t\tvector[ u ] = x * udir;\n\t\t\t\t\tvector[ v ] = y * vdir;\n\t\t\t\t\tvector[ w ] = depthHalf;\n\n\t\t\t\t\t// now apply vector to vertex buffer\n\n\t\t\t\t\tvertices.push( vector.x, vector.y, vector.z );\n\n\t\t\t\t\t// set values to correct vector component\n\n\t\t\t\t\tvector[ u ] = 0;\n\t\t\t\t\tvector[ v ] = 0;\n\t\t\t\t\tvector[ w ] = depth > 0 ? 1 : - 1;\n\n\t\t\t\t\t// now apply vector to normal buffer\n\n\t\t\t\t\tnormals.push( vector.x, vector.y, vector.z );\n\n\t\t\t\t\t// uvs\n\n\t\t\t\t\tuvs.push( ix / gridX );\n\t\t\t\t\tuvs.push( 1 - ( iy / gridY ) );\n\n\t\t\t\t\t// counters\n\n\t\t\t\t\tvertexCounter += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// indices\n\n\t\t\t// 1. you need three indices to draw a single face\n\t\t\t// 2. a single segment consists of two faces\n\t\t\t// 3. so we need to generate six (2*3) indices per segment\n\n\t\t\tfor ( let iy = 0; iy < gridY; iy ++ ) {\n\n\t\t\t\tfor ( let ix = 0; ix < gridX; ix ++ ) {\n\n\t\t\t\t\tconst a = numberOfVertices + ix + gridX1 * iy;\n\t\t\t\t\tconst b = numberOfVertices + ix + gridX1 * ( iy + 1 );\n\t\t\t\t\tconst c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 );\n\t\t\t\t\tconst d = numberOfVertices + ( ix + 1 ) + gridX1 * iy;\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t\t// increase counter\n\n\t\t\t\t\tgroupCount += 6;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, materialIndex );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t\t// update total number of vertices\n\n\t\t\tnumberOfVertices += vertexCounter;\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments );\n\n\t}\n\n}\n\n/**\n * Uniform Utilities\n */\n\nfunction cloneUniforms( src ) {\n\n\tconst dst = {};\n\n\tfor ( const u in src ) {\n\n\t\tdst[ u ] = {};\n\n\t\tfor ( const p in src[ u ] ) {\n\n\t\t\tconst property = src[ u ][ p ];\n\n\t\t\tif ( property && ( property.isColor ||\n\t\t\t\tproperty.isMatrix3 || property.isMatrix4 ||\n\t\t\t\tproperty.isVector2 || property.isVector3 || property.isVector4 ||\n\t\t\t\tproperty.isTexture || property.isQuaternion ) ) {\n\n\t\t\t\tdst[ u ][ p ] = property.clone();\n\n\t\t\t} else if ( Array.isArray( property ) ) {\n\n\t\t\t\tdst[ u ][ p ] = property.slice();\n\n\t\t\t} else {\n\n\t\t\t\tdst[ u ][ p ] = property;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn dst;\n\n}\n\nfunction mergeUniforms( uniforms ) {\n\n\tconst merged = {};\n\n\tfor ( let u = 0; u < uniforms.length; u ++ ) {\n\n\t\tconst tmp = cloneUniforms( uniforms[ u ] );\n\n\t\tfor ( const p in tmp ) {\n\n\t\t\tmerged[ p ] = tmp[ p ];\n\n\t\t}\n\n\t}\n\n\treturn merged;\n\n}\n\n// Legacy\n\nconst UniformsUtils = { clone: cloneUniforms, merge: mergeUniforms };\n\nvar default_vertex = \"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\n\nvar default_fragment = \"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";\n\n/**\n * parameters = {\n * defines: { \"label\" : \"value\" },\n * uniforms: { \"parameter1\": { value: 1.0 }, \"parameter2\": { value2: 2 } },\n *\n * fragmentShader: <string>,\n * vertexShader: <string>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * lights: <bool>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>\n * }\n */\n\nclass ShaderMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ShaderMaterial';\n\n\t\tthis.defines = {};\n\t\tthis.uniforms = {};\n\n\t\tthis.vertexShader = default_vertex;\n\t\tthis.fragmentShader = default_fragment;\n\n\t\tthis.linewidth = 1;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.fog = false; // set to use scene fog\n\t\tthis.lights = false; // set to use scene lights\n\t\tthis.clipping = false; // set to use user-defined clipping planes\n\n\t\tthis.morphTargets = false; // set to use morph targets\n\t\tthis.morphNormals = false; // set to use morph normals\n\n\t\tthis.extensions = {\n\t\t\tderivatives: false, // set to use derivatives\n\t\t\tfragDepth: false, // set to use fragment depth values\n\t\t\tdrawBuffers: false, // set to use draw buffers\n\t\t\tshaderTextureLOD: false // set to use shader texture LOD\n\t\t};\n\n\t\t// When rendered geometry doesn't include these attributes but the material does,\n\t\t// use these default values in WebGL. This avoids errors when buffer data is missing.\n\t\tthis.defaultAttributeValues = {\n\t\t\t'color': [ 1, 1, 1 ],\n\t\t\t'uv': [ 0, 0 ],\n\t\t\t'uv2': [ 0, 0 ]\n\t\t};\n\n\t\tthis.index0AttributeName = undefined;\n\t\tthis.uniformsNeedUpdate = false;\n\n\t\tthis.glslVersion = null;\n\n\t\tif ( parameters !== undefined ) {\n\n\t\t\tif ( parameters.attributes !== undefined ) {\n\n\t\t\t\tconsole.error( 'THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t\tthis.setValues( parameters );\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.fragmentShader = source.fragmentShader;\n\t\tthis.vertexShader = source.vertexShader;\n\n\t\tthis.uniforms = cloneUniforms( source.uniforms );\n\n\t\tthis.defines = Object.assign( {}, source.defines );\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\tthis.lights = source.lights;\n\t\tthis.clipping = source.clipping;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.extensions = Object.assign( {}, source.extensions );\n\n\t\tthis.glslVersion = source.glslVersion;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.glslVersion = this.glslVersion;\n\t\tdata.uniforms = {};\n\n\t\tfor ( const name in this.uniforms ) {\n\n\t\t\tconst uniform = this.uniforms[ name ];\n\t\t\tconst value = uniform.value;\n\n\t\t\tif ( value && value.isTexture ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 't',\n\t\t\t\t\tvalue: value.toJSON( meta ).uuid\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isColor ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'c',\n\t\t\t\t\tvalue: value.getHex()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector2 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v2',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector3 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isVector4 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'v4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isMatrix3 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'm3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else if ( value && value.isMatrix4 ) {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\ttype: 'm4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\n\t\t\t} else {\n\n\t\t\t\tdata.uniforms[ name ] = {\n\t\t\t\t\tvalue: value\n\t\t\t\t};\n\n\t\t\t\t// note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( Object.keys( this.defines ).length > 0 ) data.defines = this.defines;\n\n\t\tdata.vertexShader = this.vertexShader;\n\t\tdata.fragmentShader = this.fragmentShader;\n\n\t\tconst extensions = {};\n\n\t\tfor ( const key in this.extensions ) {\n\n\t\t\tif ( this.extensions[ key ] === true ) extensions[ key ] = true;\n\n\t\t}\n\n\t\tif ( Object.keys( extensions ).length > 0 ) data.extensions = extensions;\n\n\t\treturn data;\n\n\t}\n\n}\n\nShaderMaterial.prototype.isShaderMaterial = true;\n\nclass Camera extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'Camera';\n\n\t\tthis.matrixWorldInverse = new Matrix4();\n\n\t\tthis.projectionMatrix = new Matrix4();\n\t\tthis.projectionMatrixInverse = new Matrix4();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.matrixWorldInverse.copy( source.matrixWorldInverse );\n\n\t\tthis.projectionMatrix.copy( source.projectionMatrix );\n\t\tthis.projectionMatrixInverse.copy( source.projectionMatrixInverse );\n\n\t\treturn this;\n\n\t}\n\n\tgetWorldDirection( target ) {\n\n\t\tthis.updateWorldMatrix( true, false );\n\n\t\tconst e = this.matrixWorld.elements;\n\n\t\treturn target.set( - e[ 8 ], - e[ 9 ], - e[ 10 ] ).normalize();\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tthis.matrixWorldInverse.copy( this.matrixWorld ).invert();\n\n\t}\n\n\tupdateWorldMatrix( updateParents, updateChildren ) {\n\n\t\tsuper.updateWorldMatrix( updateParents, updateChildren );\n\n\t\tthis.matrixWorldInverse.copy( this.matrixWorld ).invert();\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nCamera.prototype.isCamera = true;\n\nclass PerspectiveCamera extends Camera {\n\n\tconstructor( fov = 50, aspect = 1, near = 0.1, far = 2000 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PerspectiveCamera';\n\n\t\tthis.fov = fov;\n\t\tthis.zoom = 1;\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.focus = 10;\n\n\t\tthis.aspect = aspect;\n\t\tthis.view = null;\n\n\t\tthis.filmGauge = 35;\t// width of the film (default in millimeters)\n\t\tthis.filmOffset = 0;\t// horizontal film offset (same unit as gauge)\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.fov = source.fov;\n\t\tthis.zoom = source.zoom;\n\n\t\tthis.near = source.near;\n\t\tthis.far = source.far;\n\t\tthis.focus = source.focus;\n\n\t\tthis.aspect = source.aspect;\n\t\tthis.view = source.view === null ? null : Object.assign( {}, source.view );\n\n\t\tthis.filmGauge = source.filmGauge;\n\t\tthis.filmOffset = source.filmOffset;\n\n\t\treturn this;\n\n\t}\n\n\t/**\n\t * Sets the FOV by focal length in respect to the current .filmGauge.\n\t *\n\t * The default film gauge is 35, so that the focal length can be specified for\n\t * a 35mm (full frame) camera.\n\t *\n\t * Values for focal length and film gauge must have the same unit.\n\t */\n\tsetFocalLength( focalLength ) {\n\n\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\tconst vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\n\t\tthis.fov = RAD2DEG * 2 * Math.atan( vExtentSlope );\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\t/**\n\t * Calculates the focal length from the current .fov and .filmGauge.\n\t */\n\tgetFocalLength() {\n\n\t\tconst vExtentSlope = Math.tan( DEG2RAD * 0.5 * this.fov );\n\n\t\treturn 0.5 * this.getFilmHeight() / vExtentSlope;\n\n\t}\n\n\tgetEffectiveFOV() {\n\n\t\treturn RAD2DEG * 2 * Math.atan(\n\t\t\tMath.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom );\n\n\t}\n\n\tgetFilmWidth() {\n\n\t\t// film not completely covered in portrait format (aspect < 1)\n\t\treturn this.filmGauge * Math.min( this.aspect, 1 );\n\n\t}\n\n\tgetFilmHeight() {\n\n\t\t// film not completely covered in landscape format (aspect > 1)\n\t\treturn this.filmGauge / Math.max( this.aspect, 1 );\n\n\t}\n\n\t/**\n\t * Sets an offset in a larger frustum. This is useful for multi-window or\n\t * multi-monitor/multi-machine setups.\n\t *\n\t * For example, if you have 3x2 monitors and each monitor is 1920x1080 and\n\t * the monitors are in grid like this\n\t *\n\t * +---+---+---+\n\t * | A | B | C |\n\t * +---+---+---+\n\t * | D | E | F |\n\t * +---+---+---+\n\t *\n\t * then for each monitor you would call it like this\n\t *\n\t * const w = 1920;\n\t * const h = 1080;\n\t * const fullWidth = w * 3;\n\t * const fullHeight = h * 2;\n\t *\n\t * --A--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );\n\t * --B--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );\n\t * --C--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );\n\t * --D--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );\n\t * --E--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );\n\t * --F--\n\t * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );\n\t *\n\t * Note there is no reason monitors have to be the same size or in a grid.\n\t */\n\tsetViewOffset( fullWidth, fullHeight, x, y, width, height ) {\n\n\t\tthis.aspect = fullWidth / fullHeight;\n\n\t\tif ( this.view === null ) {\n\n\t\t\tthis.view = {\n\t\t\t\tenabled: true,\n\t\t\t\tfullWidth: 1,\n\t\t\t\tfullHeight: 1,\n\t\t\t\toffsetX: 0,\n\t\t\t\toffsetY: 0,\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1\n\t\t\t};\n\n\t\t}\n\n\t\tthis.view.enabled = true;\n\t\tthis.view.fullWidth = fullWidth;\n\t\tthis.view.fullHeight = fullHeight;\n\t\tthis.view.offsetX = x;\n\t\tthis.view.offsetY = y;\n\t\tthis.view.width = width;\n\t\tthis.view.height = height;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tclearViewOffset() {\n\n\t\tif ( this.view !== null ) {\n\n\t\t\tthis.view.enabled = false;\n\n\t\t}\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tupdateProjectionMatrix() {\n\n\t\tconst near = this.near;\n\t\tlet top = near * Math.tan( DEG2RAD * 0.5 * this.fov ) / this.zoom;\n\t\tlet height = 2 * top;\n\t\tlet width = this.aspect * height;\n\t\tlet left = - 0.5 * width;\n\t\tconst view = this.view;\n\n\t\tif ( this.view !== null && this.view.enabled ) {\n\n\t\t\tconst fullWidth = view.fullWidth,\n\t\t\t\tfullHeight = view.fullHeight;\n\n\t\t\tleft += view.offsetX * width / fullWidth;\n\t\t\ttop -= view.offsetY * height / fullHeight;\n\t\t\twidth *= view.width / fullWidth;\n\t\t\theight *= view.height / fullHeight;\n\n\t\t}\n\n\t\tconst skew = this.filmOffset;\n\t\tif ( skew !== 0 ) left += near * skew / this.getFilmWidth();\n\n\t\tthis.projectionMatrix.makePerspective( left, left + width, top, top - height, near, this.far );\n\n\t\tthis.projectionMatrixInverse.copy( this.projectionMatrix ).invert();\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.fov = this.fov;\n\t\tdata.object.zoom = this.zoom;\n\n\t\tdata.object.near = this.near;\n\t\tdata.object.far = this.far;\n\t\tdata.object.focus = this.focus;\n\n\t\tdata.object.aspect = this.aspect;\n\n\t\tif ( this.view !== null ) data.object.view = Object.assign( {}, this.view );\n\n\t\tdata.object.filmGauge = this.filmGauge;\n\t\tdata.object.filmOffset = this.filmOffset;\n\n\t\treturn data;\n\n\t}\n\n}\n\nPerspectiveCamera.prototype.isPerspectiveCamera = true;\n\nconst fov = 90, aspect = 1;\n\nclass CubeCamera extends Object3D {\n\n\tconstructor( near, far, renderTarget ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CubeCamera';\n\n\t\tif ( renderTarget.isWebGLCubeRenderTarget !== true ) {\n\n\t\t\tconsole.error( 'THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.renderTarget = renderTarget;\n\n\t\tconst cameraPX = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPX.layers = this.layers;\n\t\tcameraPX.up.set( 0, - 1, 0 );\n\t\tcameraPX.lookAt( new Vector3( 1, 0, 0 ) );\n\t\tthis.add( cameraPX );\n\n\t\tconst cameraNX = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNX.layers = this.layers;\n\t\tcameraNX.up.set( 0, - 1, 0 );\n\t\tcameraNX.lookAt( new Vector3( - 1, 0, 0 ) );\n\t\tthis.add( cameraNX );\n\n\t\tconst cameraPY = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPY.layers = this.layers;\n\t\tcameraPY.up.set( 0, 0, 1 );\n\t\tcameraPY.lookAt( new Vector3( 0, 1, 0 ) );\n\t\tthis.add( cameraPY );\n\n\t\tconst cameraNY = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNY.layers = this.layers;\n\t\tcameraNY.up.set( 0, 0, - 1 );\n\t\tcameraNY.lookAt( new Vector3( 0, - 1, 0 ) );\n\t\tthis.add( cameraNY );\n\n\t\tconst cameraPZ = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraPZ.layers = this.layers;\n\t\tcameraPZ.up.set( 0, - 1, 0 );\n\t\tcameraPZ.lookAt( new Vector3( 0, 0, 1 ) );\n\t\tthis.add( cameraPZ );\n\n\t\tconst cameraNZ = new PerspectiveCamera( fov, aspect, near, far );\n\t\tcameraNZ.layers = this.layers;\n\t\tcameraNZ.up.set( 0, - 1, 0 );\n\t\tcameraNZ.lookAt( new Vector3( 0, 0, - 1 ) );\n\t\tthis.add( cameraNZ );\n\n\t}\n\n\tupdate( renderer, scene ) {\n\n\t\tif ( this.parent === null ) this.updateMatrixWorld();\n\n\t\tconst renderTarget = this.renderTarget;\n\n\t\tconst [ cameraPX, cameraNX, cameraPY, cameraNY, cameraPZ, cameraNZ ] = this.children;\n\n\t\tconst currentXrEnabled = renderer.xr.enabled;\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\trenderer.xr.enabled = false;\n\n\t\tconst generateMipmaps = renderTarget.texture.generateMipmaps;\n\n\t\trenderTarget.texture.generateMipmaps = false;\n\n\t\trenderer.setRenderTarget( renderTarget, 0 );\n\t\trenderer.render( scene, cameraPX );\n\n\t\trenderer.setRenderTarget( renderTarget, 1 );\n\t\trenderer.render( scene, cameraNX );\n\n\t\trenderer.setRenderTarget( renderTarget, 2 );\n\t\trenderer.render( scene, cameraPY );\n\n\t\trenderer.setRenderTarget( renderTarget, 3 );\n\t\trenderer.render( scene, cameraNY );\n\n\t\trenderer.setRenderTarget( renderTarget, 4 );\n\t\trenderer.render( scene, cameraPZ );\n\n\t\trenderTarget.texture.generateMipmaps = generateMipmaps;\n\n\t\trenderer.setRenderTarget( renderTarget, 5 );\n\t\trenderer.render( scene, cameraNZ );\n\n\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t\trenderer.xr.enabled = currentXrEnabled;\n\n\t}\n\n}\n\nclass CubeTexture extends Texture {\n\n\tconstructor( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding ) {\n\n\t\timages = images !== undefined ? images : [];\n\t\tmapping = mapping !== undefined ? mapping : CubeReflectionMapping;\n\t\tformat = format !== undefined ? format : RGBFormat;\n\n\t\tsuper( images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );\n\n\t\t// Why CubeTexture._needsFlipEnvMap is necessary:\n\t\t//\n\t\t// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)\n\t\t// in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,\n\t\t// in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.\n\n\t\t// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped\n\t\t// and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false)\n\t\t// when using WebGLCubeRenderTarget.texture as a cube texture.\n\n\t\tthis._needsFlipEnvMap = true;\n\n\t\tthis.flipY = false;\n\n\t}\n\n\tget images() {\n\n\t\treturn this.image;\n\n\t}\n\n\tset images( value ) {\n\n\t\tthis.image = value;\n\n\t}\n\n}\n\nCubeTexture.prototype.isCubeTexture = true;\n\nclass WebGLCubeRenderTarget extends WebGLRenderTarget {\n\n\tconstructor( size, options, dummy ) {\n\n\t\tif ( Number.isInteger( options ) ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )' );\n\n\t\t\toptions = dummy;\n\n\t\t}\n\n\t\tsuper( size, size, options );\n\n\t\toptions = options || {};\n\n\t\tthis.texture = new CubeTexture( undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding );\n\n\t\tthis.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\tthis.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\n\t\tthis.texture._needsFlipEnvMap = false;\n\n\t}\n\n\tfromEquirectangularTexture( renderer, texture ) {\n\n\t\tthis.texture.type = texture.type;\n\t\tthis.texture.format = RGBAFormat; // see #18859\n\t\tthis.texture.encoding = texture.encoding;\n\n\t\tthis.texture.generateMipmaps = texture.generateMipmaps;\n\t\tthis.texture.minFilter = texture.minFilter;\n\t\tthis.texture.magFilter = texture.magFilter;\n\n\t\tconst shader = {\n\n\t\t\tuniforms: {\n\t\t\t\ttEquirect: { value: null },\n\t\t\t},\n\n\t\t\tvertexShader: /* glsl */`\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t`,\n\n\t\t\tfragmentShader: /* glsl */`\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t`\n\t\t};\n\n\t\tconst geometry = new BoxGeometry( 5, 5, 5 );\n\n\t\tconst material = new ShaderMaterial( {\n\n\t\t\tname: 'CubemapFromEquirect',\n\n\t\t\tuniforms: cloneUniforms( shader.uniforms ),\n\t\t\tvertexShader: shader.vertexShader,\n\t\t\tfragmentShader: shader.fragmentShader,\n\t\t\tside: BackSide,\n\t\t\tblending: NoBlending\n\n\t\t} );\n\n\t\tmaterial.uniforms.tEquirect.value = texture;\n\n\t\tconst mesh = new Mesh( geometry, material );\n\n\t\tconst currentMinFilter = texture.minFilter;\n\n\t\t// Avoid blurred poles\n\t\tif ( texture.minFilter === LinearMipmapLinearFilter ) texture.minFilter = LinearFilter;\n\n\t\tconst camera = new CubeCamera( 1, 10, this );\n\t\tcamera.update( renderer, mesh );\n\n\t\ttexture.minFilter = currentMinFilter;\n\n\t\tmesh.geometry.dispose();\n\t\tmesh.material.dispose();\n\n\t\treturn this;\n\n\t}\n\n\tclear( renderer, color, depth, stencil ) {\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\trenderer.setRenderTarget( this, i );\n\n\t\t\trenderer.clear( color, depth, stencil );\n\n\t\t}\n\n\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t}\n\n}\n\nWebGLCubeRenderTarget.prototype.isWebGLCubeRenderTarget = true;\n\nconst _vector1 = /*@__PURE__*/ new Vector3();\nconst _vector2 = /*@__PURE__*/ new Vector3();\nconst _normalMatrix = /*@__PURE__*/ new Matrix3();\n\nclass Plane {\n\n\tconstructor( normal = new Vector3( 1, 0, 0 ), constant = 0 ) {\n\n\t\t// normal is assumed to be normalized\n\n\t\tthis.normal = normal;\n\t\tthis.constant = constant;\n\n\t}\n\n\tset( normal, constant ) {\n\n\t\tthis.normal.copy( normal );\n\t\tthis.constant = constant;\n\n\t\treturn this;\n\n\t}\n\n\tsetComponents( x, y, z, w ) {\n\n\t\tthis.normal.set( x, y, z );\n\t\tthis.constant = w;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromNormalAndCoplanarPoint( normal, point ) {\n\n\t\tthis.normal.copy( normal );\n\t\tthis.constant = - point.dot( this.normal );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCoplanarPoints( a, b, c ) {\n\n\t\tconst normal = _vector1.subVectors( c, b ).cross( _vector2.subVectors( a, b ) ).normalize();\n\n\t\t// Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n\n\t\tthis.setFromNormalAndCoplanarPoint( normal, a );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( plane ) {\n\n\t\tthis.normal.copy( plane.normal );\n\t\tthis.constant = plane.constant;\n\n\t\treturn this;\n\n\t}\n\n\tnormalize() {\n\n\t\t// Note: will lead to a divide by zero if the plane is invalid.\n\n\t\tconst inverseNormalLength = 1.0 / this.normal.length();\n\t\tthis.normal.multiplyScalar( inverseNormalLength );\n\t\tthis.constant *= inverseNormalLength;\n\n\t\treturn this;\n\n\t}\n\n\tnegate() {\n\n\t\tthis.constant *= - 1;\n\t\tthis.normal.negate();\n\n\t\treturn this;\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\treturn this.normal.dot( point ) + this.constant;\n\n\t}\n\n\tdistanceToSphere( sphere ) {\n\n\t\treturn this.distanceToPoint( sphere.center ) - sphere.radius;\n\n\t}\n\n\tprojectPoint( point, target ) {\n\n\t\treturn target.copy( this.normal ).multiplyScalar( - this.distanceToPoint( point ) ).add( point );\n\n\t}\n\n\tintersectLine( line, target ) {\n\n\t\tconst direction = line.delta( _vector1 );\n\n\t\tconst denominator = this.normal.dot( direction );\n\n\t\tif ( denominator === 0 ) {\n\n\t\t\t// line is coplanar, return origin\n\t\t\tif ( this.distanceToPoint( line.start ) === 0 ) {\n\n\t\t\t\treturn target.copy( line.start );\n\n\t\t\t}\n\n\t\t\t// Unsure if this is the correct method to handle this case.\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst t = - ( line.start.dot( this.normal ) + this.constant ) / denominator;\n\n\t\tif ( t < 0 || t > 1 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\treturn target.copy( direction ).multiplyScalar( t ).add( line.start );\n\n\t}\n\n\tintersectsLine( line ) {\n\n\t\t// Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n\n\t\tconst startSign = this.distanceToPoint( line.start );\n\t\tconst endSign = this.distanceToPoint( line.end );\n\n\t\treturn ( startSign < 0 && endSign > 0 ) || ( endSign < 0 && startSign > 0 );\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\treturn box.intersectsPlane( this );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\treturn sphere.intersectsPlane( this );\n\n\t}\n\n\tcoplanarPoint( target ) {\n\n\t\treturn target.copy( this.normal ).multiplyScalar( - this.constant );\n\n\t}\n\n\tapplyMatrix4( matrix, optionalNormalMatrix ) {\n\n\t\tconst normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix( matrix );\n\n\t\tconst referencePoint = this.coplanarPoint( _vector1 ).applyMatrix4( matrix );\n\n\t\tconst normal = this.normal.applyMatrix3( normalMatrix ).normalize();\n\n\t\tthis.constant = - referencePoint.dot( normal );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.constant -= offset.dot( this.normal );\n\n\t\treturn this;\n\n\t}\n\n\tequals( plane ) {\n\n\t\treturn plane.normal.equals( this.normal ) && ( plane.constant === this.constant );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nPlane.prototype.isPlane = true;\n\nconst _sphere$2 = /*@__PURE__*/ new Sphere();\nconst _vector$7 = /*@__PURE__*/ new Vector3();\n\nclass Frustum {\n\n\tconstructor( p0 = new Plane(), p1 = new Plane(), p2 = new Plane(), p3 = new Plane(), p4 = new Plane(), p5 = new Plane() ) {\n\n\t\tthis.planes = [ p0, p1, p2, p3, p4, p5 ];\n\n\t}\n\n\tset( p0, p1, p2, p3, p4, p5 ) {\n\n\t\tconst planes = this.planes;\n\n\t\tplanes[ 0 ].copy( p0 );\n\t\tplanes[ 1 ].copy( p1 );\n\t\tplanes[ 2 ].copy( p2 );\n\t\tplanes[ 3 ].copy( p3 );\n\t\tplanes[ 4 ].copy( p4 );\n\t\tplanes[ 5 ].copy( p5 );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( frustum ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tplanes[ i ].copy( frustum.planes[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromProjectionMatrix( m ) {\n\n\t\tconst planes = this.planes;\n\t\tconst me = m.elements;\n\t\tconst me0 = me[ 0 ], me1 = me[ 1 ], me2 = me[ 2 ], me3 = me[ 3 ];\n\t\tconst me4 = me[ 4 ], me5 = me[ 5 ], me6 = me[ 6 ], me7 = me[ 7 ];\n\t\tconst me8 = me[ 8 ], me9 = me[ 9 ], me10 = me[ 10 ], me11 = me[ 11 ];\n\t\tconst me12 = me[ 12 ], me13 = me[ 13 ], me14 = me[ 14 ], me15 = me[ 15 ];\n\n\t\tplanes[ 0 ].setComponents( me3 - me0, me7 - me4, me11 - me8, me15 - me12 ).normalize();\n\t\tplanes[ 1 ].setComponents( me3 + me0, me7 + me4, me11 + me8, me15 + me12 ).normalize();\n\t\tplanes[ 2 ].setComponents( me3 + me1, me7 + me5, me11 + me9, me15 + me13 ).normalize();\n\t\tplanes[ 3 ].setComponents( me3 - me1, me7 - me5, me11 - me9, me15 - me13 ).normalize();\n\t\tplanes[ 4 ].setComponents( me3 - me2, me7 - me6, me11 - me10, me15 - me14 ).normalize();\n\t\tplanes[ 5 ].setComponents( me3 + me2, me7 + me6, me11 + me10, me15 + me14 ).normalize();\n\n\t\treturn this;\n\n\t}\n\n\tintersectsObject( object ) {\n\n\t\tconst geometry = object.geometry;\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$2.copy( geometry.boundingSphere ).applyMatrix4( object.matrixWorld );\n\n\t\treturn this.intersectsSphere( _sphere$2 );\n\n\t}\n\n\tintersectsSprite( sprite ) {\n\n\t\t_sphere$2.center.set( 0, 0, 0 );\n\t\t_sphere$2.radius = 0.7071067811865476;\n\t\t_sphere$2.applyMatrix4( sprite.matrixWorld );\n\n\t\treturn this.intersectsSphere( _sphere$2 );\n\n\t}\n\n\tintersectsSphere( sphere ) {\n\n\t\tconst planes = this.planes;\n\t\tconst center = sphere.center;\n\t\tconst negRadius = - sphere.radius;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst distance = planes[ i ].distanceToPoint( center );\n\n\t\t\tif ( distance < negRadius ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst plane = planes[ i ];\n\n\t\t\t// corner at max distance\n\n\t\t\t_vector$7.x = plane.normal.x > 0 ? box.max.x : box.min.x;\n\t\t\t_vector$7.y = plane.normal.y > 0 ? box.max.y : box.min.y;\n\t\t\t_vector$7.z = plane.normal.z > 0 ? box.max.z : box.min.z;\n\n\t\t\tif ( plane.distanceToPoint( _vector$7 ) < 0 ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\tconst planes = this.planes;\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tif ( planes[ i ].distanceToPoint( point ) < 0 ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nfunction WebGLAnimation() {\n\n\tlet context = null;\n\tlet isAnimating = false;\n\tlet animationLoop = null;\n\tlet requestId = null;\n\n\tfunction onAnimationFrame( time, frame ) {\n\n\t\tanimationLoop( time, frame );\n\n\t\trequestId = context.requestAnimationFrame( onAnimationFrame );\n\n\t}\n\n\treturn {\n\n\t\tstart: function () {\n\n\t\t\tif ( isAnimating === true ) return;\n\t\t\tif ( animationLoop === null ) return;\n\n\t\t\trequestId = context.requestAnimationFrame( onAnimationFrame );\n\n\t\t\tisAnimating = true;\n\n\t\t},\n\n\t\tstop: function () {\n\n\t\t\tcontext.cancelAnimationFrame( requestId );\n\n\t\t\tisAnimating = false;\n\n\t\t},\n\n\t\tsetAnimationLoop: function ( callback ) {\n\n\t\t\tanimationLoop = callback;\n\n\t\t},\n\n\t\tsetContext: function ( value ) {\n\n\t\t\tcontext = value;\n\n\t\t}\n\n\t};\n\n}\n\nfunction WebGLAttributes( gl, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tconst buffers = new WeakMap();\n\n\tfunction createBuffer( attribute, bufferType ) {\n\n\t\tconst array = attribute.array;\n\t\tconst usage = attribute.usage;\n\n\t\tconst buffer = gl.createBuffer();\n\n\t\tgl.bindBuffer( bufferType, buffer );\n\t\tgl.bufferData( bufferType, array, usage );\n\n\t\tattribute.onUploadCallback();\n\n\t\tlet type = 5126;\n\n\t\tif ( array instanceof Float32Array ) {\n\n\t\t\ttype = 5126;\n\n\t\t} else if ( array instanceof Float64Array ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.' );\n\n\t\t} else if ( array instanceof Uint16Array ) {\n\n\t\t\tif ( attribute.isFloat16BufferAttribute ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\ttype = 5131;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\ttype = 5123;\n\n\t\t\t}\n\n\t\t} else if ( array instanceof Int16Array ) {\n\n\t\t\ttype = 5122;\n\n\t\t} else if ( array instanceof Uint32Array ) {\n\n\t\t\ttype = 5125;\n\n\t\t} else if ( array instanceof Int32Array ) {\n\n\t\t\ttype = 5124;\n\n\t\t} else if ( array instanceof Int8Array ) {\n\n\t\t\ttype = 5120;\n\n\t\t} else if ( array instanceof Uint8Array ) {\n\n\t\t\ttype = 5121;\n\n\t\t} else if ( array instanceof Uint8ClampedArray ) {\n\n\t\t\ttype = 5121;\n\n\t\t}\n\n\t\treturn {\n\t\t\tbuffer: buffer,\n\t\t\ttype: type,\n\t\t\tbytesPerElement: array.BYTES_PER_ELEMENT,\n\t\t\tversion: attribute.version\n\t\t};\n\n\t}\n\n\tfunction updateBuffer( buffer, attribute, bufferType ) {\n\n\t\tconst array = attribute.array;\n\t\tconst updateRange = attribute.updateRange;\n\n\t\tgl.bindBuffer( bufferType, buffer );\n\n\t\tif ( updateRange.count === - 1 ) {\n\n\t\t\t// Not using update ranges\n\n\t\t\tgl.bufferSubData( bufferType, 0, array );\n\n\t\t} else {\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\tgl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,\n\t\t\t\t\tarray, updateRange.offset, updateRange.count );\n\n\t\t\t} else {\n\n\t\t\t\tgl.bufferSubData( bufferType, updateRange.offset * array.BYTES_PER_ELEMENT,\n\t\t\t\t\tarray.subarray( updateRange.offset, updateRange.offset + updateRange.count ) );\n\n\t\t\t}\n\n\t\t\tupdateRange.count = - 1; // reset range\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction get( attribute ) {\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\treturn buffers.get( attribute );\n\n\t}\n\n\tfunction remove( attribute ) {\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\tconst data = buffers.get( attribute );\n\n\t\tif ( data ) {\n\n\t\t\tgl.deleteBuffer( data.buffer );\n\n\t\t\tbuffers.delete( attribute );\n\n\t\t}\n\n\t}\n\n\tfunction update( attribute, bufferType ) {\n\n\t\tif ( attribute.isGLBufferAttribute ) {\n\n\t\t\tconst cached = buffers.get( attribute );\n\n\t\t\tif ( ! cached || cached.version < attribute.version ) {\n\n\t\t\t\tbuffers.set( attribute, {\n\t\t\t\t\tbuffer: attribute.buffer,\n\t\t\t\t\ttype: attribute.type,\n\t\t\t\t\tbytesPerElement: attribute.elementSize,\n\t\t\t\t\tversion: attribute.version\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( attribute.isInterleavedBufferAttribute ) attribute = attribute.data;\n\n\t\tconst data = buffers.get( attribute );\n\n\t\tif ( data === undefined ) {\n\n\t\t\tbuffers.set( attribute, createBuffer( attribute, bufferType ) );\n\n\t\t} else if ( data.version < attribute.version ) {\n\n\t\t\tupdateBuffer( data.buffer, attribute, bufferType );\n\n\t\t\tdata.version = attribute.version;\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\tget: get,\n\t\tremove: remove,\n\t\tupdate: update\n\n\t};\n\n}\n\nclass PlaneGeometry extends BufferGeometry {\n\n\tconstructor( width = 1, height = 1, widthSegments = 1, heightSegments = 1 ) {\n\n\t\tsuper();\n\t\tthis.type = 'PlaneGeometry';\n\n\t\tthis.parameters = {\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments\n\t\t};\n\n\t\tconst width_half = width / 2;\n\t\tconst height_half = height / 2;\n\n\t\tconst gridX = Math.floor( widthSegments );\n\t\tconst gridY = Math.floor( heightSegments );\n\n\t\tconst gridX1 = gridX + 1;\n\t\tconst gridY1 = gridY + 1;\n\n\t\tconst segment_width = width / gridX;\n\t\tconst segment_height = height / gridY;\n\n\t\t//\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\tfor ( let iy = 0; iy < gridY1; iy ++ ) {\n\n\t\t\tconst y = iy * segment_height - height_half;\n\n\t\t\tfor ( let ix = 0; ix < gridX1; ix ++ ) {\n\n\t\t\t\tconst x = ix * segment_width - width_half;\n\n\t\t\t\tvertices.push( x, - y, 0 );\n\n\t\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t\tuvs.push( ix / gridX );\n\t\t\t\tuvs.push( 1 - ( iy / gridY ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let iy = 0; iy < gridY; iy ++ ) {\n\n\t\t\tfor ( let ix = 0; ix < gridX; ix ++ ) {\n\n\t\t\t\tconst a = ix + gridX1 * iy;\n\t\t\t\tconst b = ix + gridX1 * ( iy + 1 );\n\t\t\t\tconst c = ( ix + 1 ) + gridX1 * ( iy + 1 );\n\t\t\t\tconst d = ( ix + 1 ) + gridX1 * iy;\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments );\n\n\t}\n\n}\n\nvar alphamap_fragment = \"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\";\n\nvar alphamap_pars_fragment = \"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\nvar alphatest_fragment = \"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\";\n\nvar aomap_fragment = \"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\";\n\nvar aomap_pars_fragment = \"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\";\n\nvar begin_vertex = \"vec3 transformed = vec3( position );\";\n\nvar beginnormal_vertex = \"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\";\n\nvar bsdfs = \"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\\n}\\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\tif( cutoffDistance > 0.0 ) {\\n\\t\\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t}\\n\\treturn distanceFalloff;\\n#else\\n\\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\\t}\\n\\treturn 1.0;\\n#endif\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\\n\\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\\n\\treturn Fr * fresnel + F0;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\\n\\treturn specularColor * brdf.x + brdf.y;\\n}\\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\\n\\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\\n\\tvec3 FssEss = F * brdf.x + brdf.y;\\n\\tfloat Ess = brdf.x + brdf.y;\\n\\tfloat Ems = 1.0 - Ess;\\n\\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\\tsingleScatter += FssEss;\\n\\tmultiScatter += Fms * Ems;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie(float roughness, float NoH) {\\n\\tfloat invAlpha = 1.0 / roughness;\\n\\tfloat cos2h = NoH * NoH;\\n\\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\\n}\\nfloat V_Neubelt(float NoV, float NoL) {\\n\\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\\n}\\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\\n\\tvec3 N = geometry.normal;\\n\\tvec3 V = geometry.viewDir;\\n\\tvec3 H = normalize( V + L );\\n\\tfloat dotNH = saturate( dot( N, H ) );\\n\\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\\n}\\n#endif\";\n\nvar bumpmap_pars_fragment = \"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\";\n\nvar clipping_planes_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\";\n\nvar clipping_planes_pars_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\";\n\nvar clipping_planes_pars_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n#endif\";\n\nvar clipping_planes_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvClipPosition = - mvPosition.xyz;\\n#endif\";\n\nvar color_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\\tdiffuseColor *= vColor;\\n#elif defined( USE_COLOR )\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\";\n\nvar color_pars_fragment = \"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\nvar color_pars_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\\tvarying vec4 vColor;\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\nvar color_vertex = \"#if defined( USE_COLOR_ALPHA )\\n\\tvColor = vec4( 1.0 );\\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\\tvColor *= color;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\\tvColor.xyz *= instanceColor.xyz;\\n#endif\";\n\nvar common = \"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\n#ifdef HIGH_PRECISION\\n\\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\n\\tfloat precisionSafeLength( vec3 v ) {\\n\\t\\tfloat maxComponent = max3( abs( v ) );\\n\\t\\treturn length( v / maxComponent ) * maxComponent;\\n\\t}\\n#endif\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n#ifdef CLEARCOAT\\n\\tvec3 clearcoatNormal;\\n#endif\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\treturn vec2( u, v );\\n}\";\n\nvar cube_uv_reflection_fragment = \"#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t#define cubeUV_maxMipLevel 8.0\\n\\t#define cubeUV_minMipLevel 4.0\\n\\t#define cubeUV_maxTileSize 256.0\\n\\t#define cubeUV_minTileSize 16.0\\n\\tfloat getFace( vec3 direction ) {\\n\\t\\tvec3 absDirection = abs( direction );\\n\\t\\tfloat face = - 1.0;\\n\\t\\tif ( absDirection.x > absDirection.z ) {\\n\\t\\t\\tif ( absDirection.x > absDirection.y )\\n\\t\\t\\t\\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t} else {\\n\\t\\t\\tif ( absDirection.z > absDirection.y )\\n\\t\\t\\t\\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t}\\n\\t\\treturn face;\\n\\t}\\n\\tvec2 getUV( vec3 direction, float face ) {\\n\\t\\tvec2 uv;\\n\\t\\tif ( face == 0.0 ) {\\n\\t\\t\\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 1.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\\t\\t} else if ( face == 2.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\\t\\t} else if ( face == 3.0 ) {\\n\\t\\t\\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 4.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\\t\\t} else {\\n\\t\\t\\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\\t\\t}\\n\\t\\treturn 0.5 * ( uv + 1.0 );\\n\\t}\\n\\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\\t\\tfloat face = getFace( direction );\\n\\t\\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\\t\\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\\t\\tfloat faceSize = exp2( mipInt );\\n\\t\\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\\n\\t\\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\\n\\t\\tvec2 f = fract( uv );\\n\\t\\tuv += 0.5 - f;\\n\\t\\tif ( face > 2.0 ) {\\n\\t\\t\\tuv.y += faceSize;\\n\\t\\t\\tface -= 3.0;\\n\\t\\t}\\n\\t\\tuv.x += face * faceSize;\\n\\t\\tif ( mipInt < cubeUV_maxMipLevel ) {\\n\\t\\t\\tuv.y += 2.0 * cubeUV_maxTileSize;\\n\\t\\t}\\n\\t\\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\\n\\t\\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\\n\\t\\tuv *= texelSize;\\n\\t\\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.x += texelSize;\\n\\t\\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.y += texelSize;\\n\\t\\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.x -= texelSize;\\n\\t\\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tvec3 tm = mix( tl, tr, f.x );\\n\\t\\tvec3 bm = mix( bl, br, f.x );\\n\\t\\treturn mix( tm, bm, f.y );\\n\\t}\\n\\t#define r0 1.0\\n\\t#define v0 0.339\\n\\t#define m0 - 2.0\\n\\t#define r1 0.8\\n\\t#define v1 0.276\\n\\t#define m1 - 1.0\\n\\t#define r4 0.4\\n\\t#define v4 0.046\\n\\t#define m4 2.0\\n\\t#define r5 0.305\\n\\t#define v5 0.016\\n\\t#define m5 3.0\\n\\t#define r6 0.21\\n\\t#define v6 0.0038\\n\\t#define m6 4.0\\n\\tfloat roughnessToMip( float roughness ) {\\n\\t\\tfloat mip = 0.0;\\n\\t\\tif ( roughness >= r1 ) {\\n\\t\\t\\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\\n\\t\\t} else if ( roughness >= r4 ) {\\n\\t\\t\\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\\n\\t\\t} else if ( roughness >= r5 ) {\\n\\t\\t\\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\\n\\t\\t} else if ( roughness >= r6 ) {\\n\\t\\t\\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\\n\\t\\t} else {\\n\\t\\t\\tmip = - 2.0 * log2( 1.16 * roughness );\\t\\t}\\n\\t\\treturn mip;\\n\\t}\\n\\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\\t\\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\\n\\t\\tfloat mipF = fract( mip );\\n\\t\\tfloat mipInt = floor( mip );\\n\\t\\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\\t\\tif ( mipF == 0.0 ) {\\n\\t\\t\\treturn vec4( color0, 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\\t\\t\\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\\t\\t}\\n\\t}\\n#endif\";\n\nvar defaultnormal_vertex = \"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\\tmat3 m = mat3( instanceMatrix );\\n\\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#ifdef FLIP_SIDED\\n\\t\\ttransformedTangent = - transformedTangent;\\n\\t#endif\\n#endif\";\n\nvar displacementmap_pars_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\";\n\nvar displacementmap_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\\n#endif\";\n\nvar emissivemap_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\";\n\nvar emissivemap_pars_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\";\n\nvar encodings_fragment = \"gl_FragColor = linearToOutputTexel( gl_FragColor );\";\n\nvar encodings_pars_fragment = \"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\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.a );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\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.a );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\\n\\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\\n\\tfloat D = max( maxRange / maxRGB, 1.0 );\\n\\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value ) {\\n\\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\\n\\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract( Le );\\n\\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\\n\\treturn vec4( max( vRGB, 0.0 ), 1.0 );\\n}\";\n\nvar envmap_fragment = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvec3 cameraToFrag;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\t#ifndef ENVMAP_TYPE_CUBE_UV\\n\\t\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#endif\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\";\n\nvar envmap_common_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float envMapIntensity;\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\t\\n#endif\";\n\nvar envmap_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float reflectivity;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\";\n\nvar envmap_pars_vertex = \"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\t\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\";\n\nvar envmap_vertex = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\nvar fog_vertex = \"#ifdef USE_FOG\\n\\tfogDepth = - mvPosition.z;\\n#endif\";\n\nvar fog_pars_vertex = \"#ifdef USE_FOG\\n\\tvarying float fogDepth;\\n#endif\";\n\nvar fog_fragment = \"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\";\n\nvar fog_pars_fragment = \"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\";\n\nvar gradientmap_pars_fragment = \"#ifdef USE_GRADIENTMAP\\n\\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\tfloat dotNL = dot( normal, lightDirection );\\n\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t#ifdef USE_GRADIENTMAP\\n\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t#else\\n\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t#endif\\n}\";\n\nvar lightmap_fragment = \"#ifdef USE_LIGHTMAP\\n\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n#endif\";\n\nvar lightmap_pars_fragment = \"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\";\n\nvar lights_lambert_vertex = \"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\nvIndirectFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n\\tvIndirectBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\\n#ifdef DOUBLE_SIDED\\n\\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\\n\\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\";\n\nvar lights_pars_begin = \"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\nuniform vec3 lightProbe[ 9 ];\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\\n\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\";\n\nvar envmap_physical_pars_fragment = \"#if defined( USE_ENVMAP )\\n\\t#ifdef ENVMAP_MODE_REFRACTION\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -viewDir, normal );\\n\\t\\t\\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\";\n\nvar lights_toon_fragment = \"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\";\n\nvar lights_toon_pars_fragment = \"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct ToonMaterial {\\n\\tvec3 diffuseColor;\\n};\\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Toon\\n#define Material_LightProbeLOD( material )\\t(0)\";\n\nvar lights_phong_fragment = \"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\";\n\nvar lights_phong_pars_fragment = \"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3 diffuseColor;\\n\\tvec3 specularColor;\\n\\tfloat specularShininess;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\";\n\nvar lights_physical_fragment = \"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\\n#ifdef REFLECTIVITY\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#endif\\n#ifdef CLEARCOAT\\n\\tmaterial.clearcoat = clearcoat;\\n\\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\\t#ifdef USE_CLEARCOATMAP\\n\\t\\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\t\\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\\n\\t#endif\\n\\tmaterial.clearcoat = saturate( material.clearcoat );\\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\\tmaterial.clearcoatRoughness += geometryRoughness;\\n\\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_SHEEN\\n\\tmaterial.sheenColor = sheen;\\n#endif\";\n\nvar lights_physical_pars_fragment = \"struct PhysicalMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat specularRoughness;\\n\\tvec3 specularColor;\\n#ifdef CLEARCOAT\\n\\tfloat clearcoat;\\n\\tfloat clearcoatRoughness;\\n#endif\\n#ifdef USE_SHEEN\\n\\tvec3 sheenColor;\\n#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3( 0, 1, 0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifdef CLEARCOAT\\n\\t\\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\\n\\t\\tvec3 ccIrradiance = ccDotNL * directLight.color;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tccIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\\n\\t\\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\\n\\t#else\\n\\t\\tfloat clearcoatDHR = 0.0;\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\\n\\t\\t\\tmaterial.specularRoughness,\\n\\t\\t\\tdirectLight.direction,\\n\\t\\t\\tgeometry,\\n\\t\\t\\tmaterial.sheenColor\\n\\t\\t);\\n\\t#else\\n\\t\\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\\n\\t#endif\\n\\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\\t#ifdef CLEARCOAT\\n\\t\\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\\n\\t\\tfloat ccDotNL = ccDotNV;\\n\\t\\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\\n\\t#else\\n\\t\\tfloat clearcoatDHR = 0.0;\\n\\t#endif\\n\\tfloat clearcoatInv = 1.0 - clearcoatDHR;\\n\\tvec3 singleScattering = vec3( 0.0 );\\n\\tvec3 multiScattering = vec3( 0.0 );\\n\\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\\n\\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\\n\\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\\n\\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\";\n\nvar lights_fragment_begin = \"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\n#ifdef CLEARCOAT\\n\\tgeometry.clearcoatNormal = clearcoatNormal;\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\\n\\t\\tpointLightShadow = pointLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\tspotLightShadow = spotLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\\n\\t\\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 iblIrradiance = vec3( 0.0 );\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\";\n\nvar lights_fragment_maps = \"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\t\\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\\n\\t#ifdef CLEARCOAT\\n\\t\\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\\n\\t#endif\\n#endif\";\n\nvar lights_fragment_end = \"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\\n#endif\";\n\nvar logdepthbuf_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\";\n\nvar logdepthbuf_pars_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tuniform float logDepthBufFC;\\n\\tvarying float vFragDepth;\\n\\tvarying float vIsPerspective;\\n#endif\";\n\nvar logdepthbuf_pars_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t\\tvarying float vIsPerspective;\\n\\t#else\\n\\t\\tuniform float logDepthBufFC;\\n\\t#endif\\n#endif\";\n\nvar logdepthbuf_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t\\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\\t#else\\n\\t\\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\\t\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\t\\tgl_Position.z *= gl_Position.w;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\nvar map_fragment = \"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\";\n\nvar map_pars_fragment = \"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\";\n\nvar map_particle_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n#endif\\n#ifdef USE_MAP\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\";\n\nvar map_particle_pars_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tuniform mat3 uvTransform;\\n#endif\\n#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\nvar metalnessmap_fragment = \"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\";\n\nvar metalnessmap_pars_fragment = \"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\";\n\nvar morphnormal_vertex = \"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal *= morphTargetBaseInfluence;\\n\\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n#endif\";\n\nvar morphtarget_pars_vertex = \"#ifdef USE_MORPHTARGETS\\n\\tuniform float morphTargetBaseInfluence;\\n\\t#ifndef USE_MORPHNORMALS\\n\\t\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\t\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif\";\n\nvar morphtarget_vertex = \"#ifdef USE_MORPHTARGETS\\n\\ttransformed *= morphTargetBaseInfluence;\\n\\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\t\\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\\t\\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\\t\\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\\t\\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\";\n\nvar normal_fragment_begin = \"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\\n#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * faceDirection;\\n\\t#endif\\n\\t#ifdef USE_TANGENT\\n\\t\\tvec3 tangent = normalize( vTangent );\\n\\t\\tvec3 bitangent = normalize( vBitangent );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\ttangent = tangent * faceDirection;\\n\\t\\t\\tbitangent = bitangent * faceDirection;\\n\\t\\t#endif\\n\\t\\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\\n\\t\\t\\tmat3 vTBN = mat3( tangent, bitangent, normal );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\nvec3 geometryNormal = normal;\";\n\nvar normal_fragment_maps = \"#ifdef OBJECTSPACE_NORMALMAP\\n\\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t#ifdef FLIP_SIDED\\n\\t\\tnormal = - normal;\\n\\t#endif\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * faceDirection;\\n\\t#endif\\n\\tnormal = normalize( normalMatrix * normal );\\n#elif defined( TANGENTSPACE_NORMALMAP )\\n\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tmapN.xy *= normalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tnormal = normalize( vTBN * mapN );\\n\\t#else\\n\\t\\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\\n\\t#endif\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\\n#endif\";\n\nvar normalmap_pars_fragment = \"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n#endif\\n#ifdef OBJECTSPACE_NORMALMAP\\n\\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tvec3 N = surf_norm;\\n\\t\\tvec3 q1perp = cross( q1, N );\\n\\t\\tvec3 q0perp = cross( N, q0 );\\n\\t\\tvec3 T = q1perp * st0.x + q0perp * st1.x;\\n\\t\\tvec3 B = q1perp * st0.y + q0perp * st1.y;\\n\\t\\tfloat det = max( dot( T, T ), dot( B, B ) );\\n\\t\\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\\n\\t\\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\\n\\t}\\n#endif\";\n\nvar clearcoat_normal_fragment_begin = \"#ifdef CLEARCOAT\\n\\tvec3 clearcoatNormal = geometryNormal;\\n#endif\";\n\nvar clearcoat_normal_fragment_maps = \"#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\\n\\t#else\\n\\t\\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\\n\\t#endif\\n#endif\";\n\nvar clearcoat_pars_fragment = \"#ifdef USE_CLEARCOATMAP\\n\\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform sampler2D clearcoatNormalMap;\\n\\tuniform vec2 clearcoatNormalScale;\\n#endif\";\n\nvar packing = \"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\\n\\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\";\n\nvar premultiplied_alpha_fragment = \"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\";\n\nvar project_vertex = \"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\";\n\nvar dithering_fragment = \"#ifdef DITHERING\\n\\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\";\n\nvar dithering_pars_fragment = \"#ifdef DITHERING\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\";\n\nvar roughnessmap_fragment = \"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\";\n\nvar roughnessmap_pars_fragment = \"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\";\n\nvar shadowmap_pars_fragment = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\\t\\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\\t}\\n\\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\\t\\tfloat occlusion = 1.0;\\n\\t\\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\\t\\tfloat hard_shadow = step( compare , distribution.x );\\n\\t\\tif (hard_shadow != 1.0 ) {\\n\\t\\t\\tfloat distance = compare - distribution.x ;\\n\\t\\t\\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\\t\\t\\tfloat softness_probability = variance / (variance + distance * distance );\\t\\t\\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\\t\\t\\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\\t\\t}\\n\\t\\treturn occlusion;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx2 = dx0 / 2.0;\\n\\t\\t\\tfloat dy2 = dy0 / 2.0;\\n\\t\\t\\tfloat dx3 = dx1 / 2.0;\\n\\t\\t\\tfloat dy3 = dy1 / 2.0;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 17.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx = texelSize.x;\\n\\t\\t\\tfloat dy = texelSize.y;\\n\\t\\t\\tvec2 uv = shadowCoord.xy;\\n\\t\\t\\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t f.x ),\\n\\t\\t\\t\\t\\t f.y )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\";\n\nvar shadowmap_pars_vertex = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n#endif\";\n\nvar shadowmap_vertex = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\tvec4 shadowWorldPosition;\\n\\t#endif\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\";\n\nvar shadowmask_pars_fragment = \"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tspotLight = spotLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tpointLight = pointLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\";\n\nvar skinbase_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\";\n\nvar skinning_pars_vertex = \"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform highp sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\nvar skinning_vertex = \"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\";\n\nvar skinnormal_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\\t#ifdef USE_TANGENT\\n\\t\\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#endif\\n#endif\";\n\nvar specularmap_fragment = \"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\";\n\nvar specularmap_pars_fragment = \"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\";\n\nvar tonemapping_fragment = \"#if defined( TONE_MAPPING )\\n\\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\";\n\nvar tonemapping_pars_fragment = \"#ifndef saturate\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\\tconst mat3 ACESInputMat = mat3(\\n\\t\\tvec3( 0.59719, 0.07600, 0.02840 ),\\t\\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\\t\\tvec3( 0.04823, 0.01566, 0.83777 )\\n\\t);\\n\\tconst mat3 ACESOutputMat = mat3(\\n\\t\\tvec3( 1.60475, -0.10208, -0.00327 ),\\t\\tvec3( -0.53108, 1.10813, -0.07276 ),\\n\\t\\tvec3( -0.07367, -0.00605, 1.07602 )\\n\\t);\\n\\tcolor *= toneMappingExposure / 0.6;\\n\\tcolor = ACESInputMat * color;\\n\\tcolor = RRTAndODTFit( color );\\n\\tcolor = ACESOutputMat * color;\\n\\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\";\n\nvar transmission_fragment = \"#ifdef USE_TRANSMISSION\\n\\tfloat transmissionFactor = transmission;\\n\\tfloat thicknessFactor = thickness;\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSNMAP\\n\\t\\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\\n\\t#endif\\n\\tvec3 pos = vWorldPosition.xyz / vWorldPosition.w;\\n\\tvec3 v = normalize( cameraPosition - pos );\\n\\tfloat ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\\n\\tvec3 transmission = transmissionFactor * getIBLVolumeRefraction(\\n\\t\\tnormal, v, roughnessFactor, material.diffuseColor, totalSpecular,\\n\\t\\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\\n\\t\\tattenuationColor, attenuationDistance );\\n\\ttotalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\\n#endif\";\n\nvar transmission_pars_fragment = \"#ifdef USE_TRANSMISSION\\n\\t#ifdef USE_TRANSMISSIONMAP\\n\\t\\tuniform sampler2D transmissionMap;\\n\\t#endif\\n\\t#ifdef USE_THICKNESSMAP\\n\\t\\tuniform sampler2D thicknessMap;\\n\\t#endif\\n\\tuniform vec2 transmissionSamplerSize;\\n\\tuniform sampler2D transmissionSamplerMap;\\n\\tuniform mat4 modelMatrix;\\n\\tuniform mat4 projectionMatrix;\\n\\tvarying vec4 vWorldPosition;\\n\\tvec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\\n\\t\\tvec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\\n\\t\\tvec3 modelScale;\\n\\t\\tmodelScale.x = length(vec3(modelMatrix[0].xyz));\\n\\t\\tmodelScale.y = length(vec3(modelMatrix[1].xyz));\\n\\t\\tmodelScale.z = length(vec3(modelMatrix[2].xyz));\\n\\t\\treturn normalize(refractionVector) * thickness * modelScale;\\n\\t}\\n\\tfloat applyIorToRoughness(float roughness, float ior) {\\n\\t\\treturn roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\\n\\t}\\n\\tvec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\\n\\t\\tfloat framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\\n\\t\\treturn texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\\n\\t}\\n\\tvec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\\n\\t\\tif (attenuationDistance == 0.0) {\\n\\t\\t\\treturn radiance;\\n\\t\\t} else {\\n\\t\\t\\tvec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\\n\\t\\t\\tvec3 transmittance = exp(-attenuationCoefficient * transmissionDistance);\\t\\t\\treturn transmittance * radiance;\\n\\t\\t}\\n\\t}\\n\\tvec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\\n\\t\\tvec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\\n\\t\\tvec3 attenuationColor, float attenuationDistance) {\\n\\t\\tvec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\\n\\t\\tvec3 refractedRayExit = position + transmissionRay;\\n\\t\\tvec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\\n\\t\\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\\n\\t\\trefractionCoords += 1.0;\\n\\t\\trefractionCoords /= 2.0;\\n\\t\\tvec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\\n\\t\\tvec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\\n\\t\\treturn (1.0 - specularColor) * attenuatedColor * baseColor;\\n\\t}\\n#endif\";\n\nvar uv_pars_fragment = \"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\\n\\tvarying vec2 vUv;\\n#endif\";\n\nvar uv_pars_vertex = \"#ifdef USE_UV\\n\\t#ifdef UVS_VERTEX_ONLY\\n\\t\\tvec2 vUv;\\n\\t#else\\n\\t\\tvarying vec2 vUv;\\n\\t#endif\\n\\tuniform mat3 uvTransform;\\n#endif\";\n\nvar uv_vertex = \"#ifdef USE_UV\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif\";\n\nvar uv2_pars_fragment = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif\";\n\nvar uv2_pars_vertex = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n\\tuniform mat3 uv2Transform;\\n#endif\";\n\nvar uv2_vertex = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\\n#endif\";\n\nvar worldpos_vertex = \"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\\n\\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\\t#ifdef USE_INSTANCING\\n\\t\\tworldPosition = instanceMatrix * worldPosition;\\n\\t#endif\\n\\tworldPosition = modelMatrix * worldPosition;\\n#endif\";\n\nvar background_frag = \"uniform sampler2D t2D;\\nvarying vec2 vUv;\\nvoid main() {\\n\\tvec4 texColor = texture2D( t2D, vUv );\\n\\tgl_FragColor = mapTexelToLinear( texColor );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\nvar background_vert = \"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\";\n\nvar cube_frag = \"#include <envmap_common_pars_fragment>\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\n#include <cube_uv_reflection_fragment>\\nvoid main() {\\n\\tvec3 vReflect = vWorldDirection;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = envColor;\\n\\tgl_FragColor.a *= opacity;\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\nvar cube_vert = \"varying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\";\n\nvar depth_frag = \"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\\t#endif\\n}\";\n\nvar depth_vert = \"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvHighPrecisionZW = gl_Position.zw;\\n}\";\n\nvar distanceRGBA_frag = \"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\";\n\nvar distanceRGBA_vert = \"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\";\n\nvar equirect_frag = \"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldDirection );\\n\\tvec2 sampleUV = equirectUv( direction );\\n\\tvec4 texColor = texture2D( tEquirect, sampleUV );\\n\\tgl_FragColor = mapTexelToLinear( texColor );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\nvar equirect_vert = \"varying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\";\n\nvar linedashed_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n}\";\n\nvar linedashed_vert = \"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\tvLineDistance = scale * lineDistance;\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshbasic_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\n\\t\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\t\\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshbasic_vert = \"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshlambert_frag = \"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\nvarying vec3 vIndirectFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n\\tvarying vec3 vIndirectBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vIndirectFront;\\n\\t#endif\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshlambert_vert = \"#define LAMBERT\\nvarying vec3 vLightFront;\\nvarying vec3 vIndirectFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n\\tvarying vec3 vIndirectBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshmatcap_frag = \"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tvec3 viewDir = normalize( vViewPosition );\\n\\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\\tvec3 y = cross( viewDir, x );\\n\\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\\t#ifdef USE_MATCAP\\n\\t\\tvec4 matcapColor = texture2D( matcap, uv );\\n\\t\\tmatcapColor = matcapTexelToLinear( matcapColor );\\n\\t#else\\n\\t\\tvec4 matcapColor = vec4( 1.0 );\\n\\t#endif\\n\\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshmatcap_vert = \"#define MATCAP\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <color_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#ifndef FLAT_SHADED\\n\\t\\tvNormal = normalize( transformedNormal );\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n}\";\n\nvar meshtoon_frag = \"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_toon_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_toon_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshtoon_vert = \"#define TOON\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshphong_frag = \"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshphong_vert = \"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar meshphysical_frag = \"#define STANDARD\\n#ifdef PHYSICAL\\n\\t#define REFLECTIVITY\\n\\t#define CLEARCOAT\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef USE_TRANSMISSION\\n\\tuniform float transmission;\\n\\tuniform float thickness;\\n\\tuniform vec3 attenuationColor;\\n\\tuniform float attenuationDistance;\\n#endif\\n#ifdef REFLECTIVITY\\n\\tuniform float reflectivity;\\n#endif\\n#ifdef CLEARCOAT\\n\\tuniform float clearcoat;\\n\\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_SHEEN\\n\\tuniform vec3 sheen;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <bsdfs>\\n#include <transmission_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_physical_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <lights_pars_begin>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <clearcoat_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <clearcoat_normal_fragment_begin>\\n\\t#include <clearcoat_normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\\n\\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\\n\\t#include <transmission_fragment>\\n\\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\nvar meshphysical_vert = \"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#ifdef USE_TRANSMISSION\\n\\tvarying vec4 vWorldPosition;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n#ifdef USE_TRANSMISSION\\n\\tvWorldPosition = worldPosition;\\n#endif\\n}\";\n\nvar normal_frag = \"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\";\n\nvar normal_vert = \"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\";\n\nvar points_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n}\";\n\nvar points_vert = \"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\tgl_PointSize = size;\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar shadow_frag = \"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\";\n\nvar shadow_vert = \"#include <common>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nvar sprite_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\";\n\nvar sprite_vert = \"uniform float rotation;\\nuniform vec2 center;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\tvec2 scale;\\n\\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\\t#ifndef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) scale *= - mvPosition.z;\\n\\t#endif\\n\\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\\tvec2 rotatedPosition;\\n\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\\tmvPosition.xy += rotatedPosition;\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\nconst ShaderChunk = {\n\talphamap_fragment: alphamap_fragment,\n\talphamap_pars_fragment: alphamap_pars_fragment,\n\talphatest_fragment: alphatest_fragment,\n\taomap_fragment: aomap_fragment,\n\taomap_pars_fragment: aomap_pars_fragment,\n\tbegin_vertex: begin_vertex,\n\tbeginnormal_vertex: beginnormal_vertex,\n\tbsdfs: bsdfs,\n\tbumpmap_pars_fragment: bumpmap_pars_fragment,\n\tclipping_planes_fragment: clipping_planes_fragment,\n\tclipping_planes_pars_fragment: clipping_planes_pars_fragment,\n\tclipping_planes_pars_vertex: clipping_planes_pars_vertex,\n\tclipping_planes_vertex: clipping_planes_vertex,\n\tcolor_fragment: color_fragment,\n\tcolor_pars_fragment: color_pars_fragment,\n\tcolor_pars_vertex: color_pars_vertex,\n\tcolor_vertex: color_vertex,\n\tcommon: common,\n\tcube_uv_reflection_fragment: cube_uv_reflection_fragment,\n\tdefaultnormal_vertex: defaultnormal_vertex,\n\tdisplacementmap_pars_vertex: displacementmap_pars_vertex,\n\tdisplacementmap_vertex: displacementmap_vertex,\n\temissivemap_fragment: emissivemap_fragment,\n\temissivemap_pars_fragment: emissivemap_pars_fragment,\n\tencodings_fragment: encodings_fragment,\n\tencodings_pars_fragment: encodings_pars_fragment,\n\tenvmap_fragment: envmap_fragment,\n\tenvmap_common_pars_fragment: envmap_common_pars_fragment,\n\tenvmap_pars_fragment: envmap_pars_fragment,\n\tenvmap_pars_vertex: envmap_pars_vertex,\n\tenvmap_physical_pars_fragment: envmap_physical_pars_fragment,\n\tenvmap_vertex: envmap_vertex,\n\tfog_vertex: fog_vertex,\n\tfog_pars_vertex: fog_pars_vertex,\n\tfog_fragment: fog_fragment,\n\tfog_pars_fragment: fog_pars_fragment,\n\tgradientmap_pars_fragment: gradientmap_pars_fragment,\n\tlightmap_fragment: lightmap_fragment,\n\tlightmap_pars_fragment: lightmap_pars_fragment,\n\tlights_lambert_vertex: lights_lambert_vertex,\n\tlights_pars_begin: lights_pars_begin,\n\tlights_toon_fragment: lights_toon_fragment,\n\tlights_toon_pars_fragment: lights_toon_pars_fragment,\n\tlights_phong_fragment: lights_phong_fragment,\n\tlights_phong_pars_fragment: lights_phong_pars_fragment,\n\tlights_physical_fragment: lights_physical_fragment,\n\tlights_physical_pars_fragment: lights_physical_pars_fragment,\n\tlights_fragment_begin: lights_fragment_begin,\n\tlights_fragment_maps: lights_fragment_maps,\n\tlights_fragment_end: lights_fragment_end,\n\tlogdepthbuf_fragment: logdepthbuf_fragment,\n\tlogdepthbuf_pars_fragment: logdepthbuf_pars_fragment,\n\tlogdepthbuf_pars_vertex: logdepthbuf_pars_vertex,\n\tlogdepthbuf_vertex: logdepthbuf_vertex,\n\tmap_fragment: map_fragment,\n\tmap_pars_fragment: map_pars_fragment,\n\tmap_particle_fragment: map_particle_fragment,\n\tmap_particle_pars_fragment: map_particle_pars_fragment,\n\tmetalnessmap_fragment: metalnessmap_fragment,\n\tmetalnessmap_pars_fragment: metalnessmap_pars_fragment,\n\tmorphnormal_vertex: morphnormal_vertex,\n\tmorphtarget_pars_vertex: morphtarget_pars_vertex,\n\tmorphtarget_vertex: morphtarget_vertex,\n\tnormal_fragment_begin: normal_fragment_begin,\n\tnormal_fragment_maps: normal_fragment_maps,\n\tnormalmap_pars_fragment: normalmap_pars_fragment,\n\tclearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin,\n\tclearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps,\n\tclearcoat_pars_fragment: clearcoat_pars_fragment,\n\tpacking: packing,\n\tpremultiplied_alpha_fragment: premultiplied_alpha_fragment,\n\tproject_vertex: project_vertex,\n\tdithering_fragment: dithering_fragment,\n\tdithering_pars_fragment: dithering_pars_fragment,\n\troughnessmap_fragment: roughnessmap_fragment,\n\troughnessmap_pars_fragment: roughnessmap_pars_fragment,\n\tshadowmap_pars_fragment: shadowmap_pars_fragment,\n\tshadowmap_pars_vertex: shadowmap_pars_vertex,\n\tshadowmap_vertex: shadowmap_vertex,\n\tshadowmask_pars_fragment: shadowmask_pars_fragment,\n\tskinbase_vertex: skinbase_vertex,\n\tskinning_pars_vertex: skinning_pars_vertex,\n\tskinning_vertex: skinning_vertex,\n\tskinnormal_vertex: skinnormal_vertex,\n\tspecularmap_fragment: specularmap_fragment,\n\tspecularmap_pars_fragment: specularmap_pars_fragment,\n\ttonemapping_fragment: tonemapping_fragment,\n\ttonemapping_pars_fragment: tonemapping_pars_fragment,\n\ttransmission_fragment: transmission_fragment,\n\ttransmission_pars_fragment: transmission_pars_fragment,\n\tuv_pars_fragment: uv_pars_fragment,\n\tuv_pars_vertex: uv_pars_vertex,\n\tuv_vertex: uv_vertex,\n\tuv2_pars_fragment: uv2_pars_fragment,\n\tuv2_pars_vertex: uv2_pars_vertex,\n\tuv2_vertex: uv2_vertex,\n\tworldpos_vertex: worldpos_vertex,\n\n\tbackground_frag: background_frag,\n\tbackground_vert: background_vert,\n\tcube_frag: cube_frag,\n\tcube_vert: cube_vert,\n\tdepth_frag: depth_frag,\n\tdepth_vert: depth_vert,\n\tdistanceRGBA_frag: distanceRGBA_frag,\n\tdistanceRGBA_vert: distanceRGBA_vert,\n\tequirect_frag: equirect_frag,\n\tequirect_vert: equirect_vert,\n\tlinedashed_frag: linedashed_frag,\n\tlinedashed_vert: linedashed_vert,\n\tmeshbasic_frag: meshbasic_frag,\n\tmeshbasic_vert: meshbasic_vert,\n\tmeshlambert_frag: meshlambert_frag,\n\tmeshlambert_vert: meshlambert_vert,\n\tmeshmatcap_frag: meshmatcap_frag,\n\tmeshmatcap_vert: meshmatcap_vert,\n\tmeshtoon_frag: meshtoon_frag,\n\tmeshtoon_vert: meshtoon_vert,\n\tmeshphong_frag: meshphong_frag,\n\tmeshphong_vert: meshphong_vert,\n\tmeshphysical_frag: meshphysical_frag,\n\tmeshphysical_vert: meshphysical_vert,\n\tnormal_frag: normal_frag,\n\tnormal_vert: normal_vert,\n\tpoints_frag: points_frag,\n\tpoints_vert: points_vert,\n\tshadow_frag: shadow_frag,\n\tshadow_vert: shadow_vert,\n\tsprite_frag: sprite_frag,\n\tsprite_vert: sprite_vert\n};\n\n/**\n * Uniforms library for shared webgl shaders\n */\n\nconst UniformsLib = {\n\n\tcommon: {\n\n\t\tdiffuse: { value: new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\n\t\tmap: { value: null },\n\t\tuvTransform: { value: new Matrix3() },\n\t\tuv2Transform: { value: new Matrix3() },\n\n\t\talphaMap: { value: null },\n\n\t},\n\n\tspecularmap: {\n\n\t\tspecularMap: { value: null },\n\n\t},\n\n\tenvmap: {\n\n\t\tenvMap: { value: null },\n\t\tflipEnvMap: { value: - 1 },\n\t\treflectivity: { value: 1.0 },\n\t\trefractionRatio: { value: 0.98 },\n\t\tmaxMipLevel: { value: 0 }\n\n\t},\n\n\taomap: {\n\n\t\taoMap: { value: null },\n\t\taoMapIntensity: { value: 1 }\n\n\t},\n\n\tlightmap: {\n\n\t\tlightMap: { value: null },\n\t\tlightMapIntensity: { value: 1 }\n\n\t},\n\n\temissivemap: {\n\n\t\temissiveMap: { value: null }\n\n\t},\n\n\tbumpmap: {\n\n\t\tbumpMap: { value: null },\n\t\tbumpScale: { value: 1 }\n\n\t},\n\n\tnormalmap: {\n\n\t\tnormalMap: { value: null },\n\t\tnormalScale: { value: new Vector2( 1, 1 ) }\n\n\t},\n\n\tdisplacementmap: {\n\n\t\tdisplacementMap: { value: null },\n\t\tdisplacementScale: { value: 1 },\n\t\tdisplacementBias: { value: 0 }\n\n\t},\n\n\troughnessmap: {\n\n\t\troughnessMap: { value: null }\n\n\t},\n\n\tmetalnessmap: {\n\n\t\tmetalnessMap: { value: null }\n\n\t},\n\n\tgradientmap: {\n\n\t\tgradientMap: { value: null }\n\n\t},\n\n\tfog: {\n\n\t\tfogDensity: { value: 0.00025 },\n\t\tfogNear: { value: 1 },\n\t\tfogFar: { value: 2000 },\n\t\tfogColor: { value: new Color( 0xffffff ) }\n\n\t},\n\n\tlights: {\n\n\t\tambientLightColor: { value: [] },\n\n\t\tlightProbe: { value: [] },\n\n\t\tdirectionalLights: { value: [], properties: {\n\t\t\tdirection: {},\n\t\t\tcolor: {}\n\t\t} },\n\n\t\tdirectionalLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {}\n\t\t} },\n\n\t\tdirectionalShadowMap: { value: [] },\n\t\tdirectionalShadowMatrix: { value: [] },\n\n\t\tspotLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\tdirection: {},\n\t\t\tdistance: {},\n\t\t\tconeCos: {},\n\t\t\tpenumbraCos: {},\n\t\t\tdecay: {}\n\t\t} },\n\n\t\tspotLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {}\n\t\t} },\n\n\t\tspotShadowMap: { value: [] },\n\t\tspotShadowMatrix: { value: [] },\n\n\t\tpointLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\tdecay: {},\n\t\t\tdistance: {}\n\t\t} },\n\n\t\tpointLightShadows: { value: [], properties: {\n\t\t\tshadowBias: {},\n\t\t\tshadowNormalBias: {},\n\t\t\tshadowRadius: {},\n\t\t\tshadowMapSize: {},\n\t\t\tshadowCameraNear: {},\n\t\t\tshadowCameraFar: {}\n\t\t} },\n\n\t\tpointShadowMap: { value: [] },\n\t\tpointShadowMatrix: { value: [] },\n\n\t\themisphereLights: { value: [], properties: {\n\t\t\tdirection: {},\n\t\t\tskyColor: {},\n\t\t\tgroundColor: {}\n\t\t} },\n\n\t\t// TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src\n\t\trectAreaLights: { value: [], properties: {\n\t\t\tcolor: {},\n\t\t\tposition: {},\n\t\t\twidth: {},\n\t\t\theight: {}\n\t\t} },\n\n\t\tltc_1: { value: null },\n\t\tltc_2: { value: null }\n\n\t},\n\n\tpoints: {\n\n\t\tdiffuse: { value: new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\t\tsize: { value: 1.0 },\n\t\tscale: { value: 1.0 },\n\t\tmap: { value: null },\n\t\talphaMap: { value: null },\n\t\tuvTransform: { value: new Matrix3() }\n\n\t},\n\n\tsprite: {\n\n\t\tdiffuse: { value: new Color( 0xffffff ) },\n\t\topacity: { value: 1.0 },\n\t\tcenter: { value: new Vector2( 0.5, 0.5 ) },\n\t\trotation: { value: 0.0 },\n\t\tmap: { value: null },\n\t\talphaMap: { value: null },\n\t\tuvTransform: { value: new Matrix3() }\n\n\t}\n\n};\n\nconst ShaderLib = {\n\n\tbasic: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshbasic_vert,\n\t\tfragmentShader: ShaderChunk.meshbasic_frag\n\n\t},\n\n\tlambert: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: new Color( 0x000000 ) }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshlambert_vert,\n\t\tfragmentShader: ShaderChunk.meshlambert_frag\n\n\t},\n\n\tphong: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.specularmap,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: new Color( 0x000000 ) },\n\t\t\t\tspecular: { value: new Color( 0x111111 ) },\n\t\t\t\tshininess: { value: 30 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshphong_vert,\n\t\tfragmentShader: ShaderChunk.meshphong_frag\n\n\t},\n\n\tstandard: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.envmap,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.roughnessmap,\n\t\t\tUniformsLib.metalnessmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: new Color( 0x000000 ) },\n\t\t\t\troughness: { value: 1.0 },\n\t\t\t\tmetalness: { value: 0.0 },\n\t\t\t\tenvMapIntensity: { value: 1 } // temporary\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshphysical_vert,\n\t\tfragmentShader: ShaderChunk.meshphysical_frag\n\n\t},\n\n\ttoon: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.aomap,\n\t\t\tUniformsLib.lightmap,\n\t\t\tUniformsLib.emissivemap,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.gradientmap,\n\t\t\tUniformsLib.fog,\n\t\t\tUniformsLib.lights,\n\t\t\t{\n\t\t\t\temissive: { value: new Color( 0x000000 ) }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshtoon_vert,\n\t\tfragmentShader: ShaderChunk.meshtoon_frag\n\n\t},\n\n\tmatcap: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tmatcap: { value: null }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.meshmatcap_vert,\n\t\tfragmentShader: ShaderChunk.meshmatcap_frag\n\n\t},\n\n\tpoints: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.points,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.points_vert,\n\t\tfragmentShader: ShaderChunk.points_frag\n\n\t},\n\n\tdashed: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tscale: { value: 1 },\n\t\t\t\tdashSize: { value: 1 },\n\t\t\t\ttotalSize: { value: 2 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.linedashed_vert,\n\t\tfragmentShader: ShaderChunk.linedashed_frag\n\n\t},\n\n\tdepth: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.displacementmap\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.depth_vert,\n\t\tfragmentShader: ShaderChunk.depth_frag\n\n\t},\n\n\tnormal: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.bumpmap,\n\t\t\tUniformsLib.normalmap,\n\t\t\tUniformsLib.displacementmap,\n\t\t\t{\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.normal_vert,\n\t\tfragmentShader: ShaderChunk.normal_frag\n\n\t},\n\n\tsprite: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.sprite,\n\t\t\tUniformsLib.fog\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.sprite_vert,\n\t\tfragmentShader: ShaderChunk.sprite_frag\n\n\t},\n\n\tbackground: {\n\n\t\tuniforms: {\n\t\t\tuvTransform: { value: new Matrix3() },\n\t\t\tt2D: { value: null },\n\t\t},\n\n\t\tvertexShader: ShaderChunk.background_vert,\n\t\tfragmentShader: ShaderChunk.background_frag\n\n\t},\n\t/* -------------------------------------------------------------------------\n\t//\tCube map shader\n\t ------------------------------------------------------------------------- */\n\n\tcube: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.envmap,\n\t\t\t{\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.cube_vert,\n\t\tfragmentShader: ShaderChunk.cube_frag\n\n\t},\n\n\tequirect: {\n\n\t\tuniforms: {\n\t\t\ttEquirect: { value: null },\n\t\t},\n\n\t\tvertexShader: ShaderChunk.equirect_vert,\n\t\tfragmentShader: ShaderChunk.equirect_frag\n\n\t},\n\n\tdistanceRGBA: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.common,\n\t\t\tUniformsLib.displacementmap,\n\t\t\t{\n\t\t\t\treferencePosition: { value: new Vector3() },\n\t\t\t\tnearDistance: { value: 1 },\n\t\t\t\tfarDistance: { value: 1000 }\n\t\t\t}\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.distanceRGBA_vert,\n\t\tfragmentShader: ShaderChunk.distanceRGBA_frag\n\n\t},\n\n\tshadow: {\n\n\t\tuniforms: mergeUniforms( [\n\t\t\tUniformsLib.lights,\n\t\t\tUniformsLib.fog,\n\t\t\t{\n\t\t\t\tcolor: { value: new Color( 0x00000 ) },\n\t\t\t\topacity: { value: 1.0 }\n\t\t\t},\n\t\t] ),\n\n\t\tvertexShader: ShaderChunk.shadow_vert,\n\t\tfragmentShader: ShaderChunk.shadow_frag\n\n\t}\n\n};\n\nShaderLib.physical = {\n\n\tuniforms: mergeUniforms( [\n\t\tShaderLib.standard.uniforms,\n\t\t{\n\t\t\tclearcoat: { value: 0 },\n\t\t\tclearcoatMap: { value: null },\n\t\t\tclearcoatRoughness: { value: 0 },\n\t\t\tclearcoatRoughnessMap: { value: null },\n\t\t\tclearcoatNormalScale: { value: new Vector2( 1, 1 ) },\n\t\t\tclearcoatNormalMap: { value: null },\n\t\t\tsheen: { value: new Color( 0x000000 ) },\n\t\t\ttransmission: { value: 0 },\n\t\t\ttransmissionMap: { value: null },\n\t\t\ttransmissionSamplerSize: { value: new Vector2() },\n\t\t\ttransmissionSamplerMap: { value: null },\n\t\t\tthickness: { value: 0 },\n\t\t\tthicknessMap: { value: null },\n\t\t\tattenuationDistance: { value: 0 },\n\t\t\tattenuationColor: { value: new Color( 0x000000 ) }\n\t\t}\n\t] ),\n\n\tvertexShader: ShaderChunk.meshphysical_vert,\n\tfragmentShader: ShaderChunk.meshphysical_frag\n\n};\n\nfunction WebGLBackground( renderer, cubemaps, state, objects, premultipliedAlpha ) {\n\n\tconst clearColor = new Color( 0x000000 );\n\tlet clearAlpha = 0;\n\n\tlet planeMesh;\n\tlet boxMesh;\n\n\tlet currentBackground = null;\n\tlet currentBackgroundVersion = 0;\n\tlet currentTonemapping = null;\n\n\tfunction render( renderList, scene ) {\n\n\t\tlet forceClear = false;\n\t\tlet background = scene.isScene === true ? scene.background : null;\n\n\t\tif ( background && background.isTexture ) {\n\n\t\t\tbackground = cubemaps.get( background );\n\n\t\t}\n\n\t\t// Ignore background in AR\n\t\t// TODO: Reconsider this.\n\n\t\tconst xr = renderer.xr;\n\t\tconst session = xr.getSession && xr.getSession();\n\n\t\tif ( session && session.environmentBlendMode === 'additive' ) {\n\n\t\t\tbackground = null;\n\n\t\t}\n\n\t\tif ( background === null ) {\n\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t} else if ( background && background.isColor ) {\n\n\t\t\tsetClear( background, 1 );\n\t\t\tforceClear = true;\n\n\t\t}\n\n\t\tif ( renderer.autoClear || forceClear ) {\n\n\t\t\trenderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\n\t\t}\n\n\t\tif ( background && ( background.isCubeTexture || background.mapping === CubeUVReflectionMapping ) ) {\n\n\t\t\tif ( boxMesh === undefined ) {\n\n\t\t\t\tboxMesh = new Mesh(\n\t\t\t\t\tnew BoxGeometry( 1, 1, 1 ),\n\t\t\t\t\tnew ShaderMaterial( {\n\t\t\t\t\t\tname: 'BackgroundCubeMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms( ShaderLib.cube.uniforms ),\n\t\t\t\t\t\tvertexShader: ShaderLib.cube.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.cube.fragmentShader,\n\t\t\t\t\t\tside: BackSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tboxMesh.geometry.deleteAttribute( 'normal' );\n\t\t\t\tboxMesh.geometry.deleteAttribute( 'uv' );\n\n\t\t\t\tboxMesh.onBeforeRender = function ( renderer, scene, camera ) {\n\n\t\t\t\t\tthis.matrixWorld.copyPosition( camera.matrixWorld );\n\n\t\t\t\t};\n\n\t\t\t\t// enable code injection for non-built-in material\n\t\t\t\tObject.defineProperty( boxMesh.material, 'envMap', {\n\n\t\t\t\t\tget: function () {\n\n\t\t\t\t\t\treturn this.uniforms.envMap.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\tobjects.update( boxMesh );\n\n\t\t\t}\n\n\t\t\tboxMesh.material.uniforms.envMap.value = background;\n\t\t\tboxMesh.material.uniforms.flipEnvMap.value = ( background.isCubeTexture && background._needsFlipEnvMap ) ? - 1 : 1;\n\n\t\t\tif ( currentBackground !== background ||\n\t\t\t\tcurrentBackgroundVersion !== background.version ||\n\t\t\t\tcurrentTonemapping !== renderer.toneMapping ) {\n\n\t\t\t\tboxMesh.material.needsUpdate = true;\n\n\t\t\t\tcurrentBackground = background;\n\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\n\t\t\t}\n\n\t\t\t// push to the pre-sorted opaque render list\n\t\t\trenderList.unshift( boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null );\n\n\t\t} else if ( background && background.isTexture ) {\n\n\t\t\tif ( planeMesh === undefined ) {\n\n\t\t\t\tplaneMesh = new Mesh(\n\t\t\t\t\tnew PlaneGeometry( 2, 2 ),\n\t\t\t\t\tnew ShaderMaterial( {\n\t\t\t\t\t\tname: 'BackgroundMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms( ShaderLib.background.uniforms ),\n\t\t\t\t\t\tvertexShader: ShaderLib.background.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.background.fragmentShader,\n\t\t\t\t\t\tside: FrontSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tplaneMesh.geometry.deleteAttribute( 'normal' );\n\n\t\t\t\t// enable code injection for non-built-in material\n\t\t\t\tObject.defineProperty( planeMesh.material, 'map', {\n\n\t\t\t\t\tget: function () {\n\n\t\t\t\t\t\treturn this.uniforms.t2D.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\tobjects.update( planeMesh );\n\n\t\t\t}\n\n\t\t\tplaneMesh.material.uniforms.t2D.value = background;\n\n\t\t\tif ( background.matrixAutoUpdate === true ) {\n\n\t\t\t\tbackground.updateMatrix();\n\n\t\t\t}\n\n\t\t\tplaneMesh.material.uniforms.uvTransform.value.copy( background.matrix );\n\n\t\t\tif ( currentBackground !== background ||\n\t\t\t\tcurrentBackgroundVersion !== background.version ||\n\t\t\t\tcurrentTonemapping !== renderer.toneMapping ) {\n\n\t\t\t\tplaneMesh.material.needsUpdate = true;\n\n\t\t\t\tcurrentBackground = background;\n\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\n\t\t\t}\n\n\n\t\t\t// push to the pre-sorted opaque render list\n\t\t\trenderList.unshift( planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null );\n\n\t\t}\n\n\t}\n\n\tfunction setClear( color, alpha ) {\n\n\t\tstate.buffers.color.setClear( color.r, color.g, color.b, alpha, premultipliedAlpha );\n\n\t}\n\n\treturn {\n\n\t\tgetClearColor: function () {\n\n\t\t\treturn clearColor;\n\n\t\t},\n\t\tsetClearColor: function ( color, alpha = 1 ) {\n\n\t\t\tclearColor.set( color );\n\t\t\tclearAlpha = alpha;\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t},\n\t\tgetClearAlpha: function () {\n\n\t\t\treturn clearAlpha;\n\n\t\t},\n\t\tsetClearAlpha: function ( alpha ) {\n\n\t\t\tclearAlpha = alpha;\n\t\t\tsetClear( clearColor, clearAlpha );\n\n\t\t},\n\t\trender: render\n\n\t};\n\n}\n\nfunction WebGLBindingStates( gl, extensions, attributes, capabilities ) {\n\n\tconst maxVertexAttributes = gl.getParameter( 34921 );\n\n\tconst extension = capabilities.isWebGL2 ? null : extensions.get( 'OES_vertex_array_object' );\n\tconst vaoAvailable = capabilities.isWebGL2 || extension !== null;\n\n\tconst bindingStates = {};\n\n\tconst defaultState = createBindingState( null );\n\tlet currentState = defaultState;\n\n\tfunction setup( object, material, program, geometry, index ) {\n\n\t\tlet updateBuffers = false;\n\n\t\tif ( vaoAvailable ) {\n\n\t\t\tconst state = getBindingState( geometry, program, material );\n\n\t\t\tif ( currentState !== state ) {\n\n\t\t\t\tcurrentState = state;\n\t\t\t\tbindVertexArrayObject( currentState.object );\n\n\t\t\t}\n\n\t\t\tupdateBuffers = needsUpdate( geometry, index );\n\n\t\t\tif ( updateBuffers ) saveCache( geometry, index );\n\n\t\t} else {\n\n\t\t\tconst wireframe = ( material.wireframe === true );\n\n\t\t\tif ( currentState.geometry !== geometry.id ||\n\t\t\t\tcurrentState.program !== program.id ||\n\t\t\t\tcurrentState.wireframe !== wireframe ) {\n\n\t\t\t\tcurrentState.geometry = geometry.id;\n\t\t\t\tcurrentState.program = program.id;\n\t\t\t\tcurrentState.wireframe = wireframe;\n\n\t\t\t\tupdateBuffers = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( object.isInstancedMesh === true ) {\n\n\t\t\tupdateBuffers = true;\n\n\t\t}\n\n\t\tif ( index !== null ) {\n\n\t\t\tattributes.update( index, 34963 );\n\n\t\t}\n\n\t\tif ( updateBuffers ) {\n\n\t\t\tsetupVertexAttributes( object, material, program, geometry );\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tgl.bindBuffer( 34963, attributes.get( index ).buffer );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction createVertexArrayObject() {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.createVertexArray();\n\n\t\treturn extension.createVertexArrayOES();\n\n\t}\n\n\tfunction bindVertexArrayObject( vao ) {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.bindVertexArray( vao );\n\n\t\treturn extension.bindVertexArrayOES( vao );\n\n\t}\n\n\tfunction deleteVertexArrayObject( vao ) {\n\n\t\tif ( capabilities.isWebGL2 ) return gl.deleteVertexArray( vao );\n\n\t\treturn extension.deleteVertexArrayOES( vao );\n\n\t}\n\n\tfunction getBindingState( geometry, program, material ) {\n\n\t\tconst wireframe = ( material.wireframe === true );\n\n\t\tlet programMap = bindingStates[ geometry.id ];\n\n\t\tif ( programMap === undefined ) {\n\n\t\t\tprogramMap = {};\n\t\t\tbindingStates[ geometry.id ] = programMap;\n\n\t\t}\n\n\t\tlet stateMap = programMap[ program.id ];\n\n\t\tif ( stateMap === undefined ) {\n\n\t\t\tstateMap = {};\n\t\t\tprogramMap[ program.id ] = stateMap;\n\n\t\t}\n\n\t\tlet state = stateMap[ wireframe ];\n\n\t\tif ( state === undefined ) {\n\n\t\t\tstate = createBindingState( createVertexArrayObject() );\n\t\t\tstateMap[ wireframe ] = state;\n\n\t\t}\n\n\t\treturn state;\n\n\t}\n\n\tfunction createBindingState( vao ) {\n\n\t\tconst newAttributes = [];\n\t\tconst enabledAttributes = [];\n\t\tconst attributeDivisors = [];\n\n\t\tfor ( let i = 0; i < maxVertexAttributes; i ++ ) {\n\n\t\t\tnewAttributes[ i ] = 0;\n\t\t\tenabledAttributes[ i ] = 0;\n\t\t\tattributeDivisors[ i ] = 0;\n\n\t\t}\n\n\t\treturn {\n\n\t\t\t// for backward compatibility on non-VAO support browser\n\t\t\tgeometry: null,\n\t\t\tprogram: null,\n\t\t\twireframe: false,\n\n\t\t\tnewAttributes: newAttributes,\n\t\t\tenabledAttributes: enabledAttributes,\n\t\t\tattributeDivisors: attributeDivisors,\n\t\t\tobject: vao,\n\t\t\tattributes: {},\n\t\t\tindex: null\n\n\t\t};\n\n\t}\n\n\tfunction needsUpdate( geometry, index ) {\n\n\t\tconst cachedAttributes = currentState.attributes;\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\tlet attributesNum = 0;\n\n\t\tfor ( const key in geometryAttributes ) {\n\n\t\t\tconst cachedAttribute = cachedAttributes[ key ];\n\t\t\tconst geometryAttribute = geometryAttributes[ key ];\n\n\t\t\tif ( cachedAttribute === undefined ) return true;\n\n\t\t\tif ( cachedAttribute.attribute !== geometryAttribute ) return true;\n\n\t\t\tif ( cachedAttribute.data !== geometryAttribute.data ) return true;\n\n\t\t\tattributesNum ++;\n\n\t\t}\n\n\t\tif ( currentState.attributesNum !== attributesNum ) return true;\n\n\t\tif ( currentState.index !== index ) return true;\n\n\t\treturn false;\n\n\t}\n\n\tfunction saveCache( geometry, index ) {\n\n\t\tconst cache = {};\n\t\tconst attributes = geometry.attributes;\n\t\tlet attributesNum = 0;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\n\t\t\tconst data = {};\n\t\t\tdata.attribute = attribute;\n\n\t\t\tif ( attribute.data ) {\n\n\t\t\t\tdata.data = attribute.data;\n\n\t\t\t}\n\n\t\t\tcache[ key ] = data;\n\n\t\t\tattributesNum ++;\n\n\t\t}\n\n\t\tcurrentState.attributes = cache;\n\t\tcurrentState.attributesNum = attributesNum;\n\n\t\tcurrentState.index = index;\n\n\t}\n\n\tfunction initAttributes() {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\n\t\tfor ( let i = 0, il = newAttributes.length; i < il; i ++ ) {\n\n\t\t\tnewAttributes[ i ] = 0;\n\n\t\t}\n\n\t}\n\n\tfunction enableAttribute( attribute ) {\n\n\t\tenableAttributeAndDivisor( attribute, 0 );\n\n\t}\n\n\tfunction enableAttributeAndDivisor( attribute, meshPerAttribute ) {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\t\tconst enabledAttributes = currentState.enabledAttributes;\n\t\tconst attributeDivisors = currentState.attributeDivisors;\n\n\t\tnewAttributes[ attribute ] = 1;\n\n\t\tif ( enabledAttributes[ attribute ] === 0 ) {\n\n\t\t\tgl.enableVertexAttribArray( attribute );\n\t\t\tenabledAttributes[ attribute ] = 1;\n\n\t\t}\n\n\t\tif ( attributeDivisors[ attribute ] !== meshPerAttribute ) {\n\n\t\t\tconst extension = capabilities.isWebGL2 ? gl : extensions.get( 'ANGLE_instanced_arrays' );\n\n\t\t\textension[ capabilities.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE' ]( attribute, meshPerAttribute );\n\t\t\tattributeDivisors[ attribute ] = meshPerAttribute;\n\n\t\t}\n\n\t}\n\n\tfunction disableUnusedAttributes() {\n\n\t\tconst newAttributes = currentState.newAttributes;\n\t\tconst enabledAttributes = currentState.enabledAttributes;\n\n\t\tfor ( let i = 0, il = enabledAttributes.length; i < il; i ++ ) {\n\n\t\t\tif ( enabledAttributes[ i ] !== newAttributes[ i ] ) {\n\n\t\t\t\tgl.disableVertexAttribArray( i );\n\t\t\t\tenabledAttributes[ i ] = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction vertexAttribPointer( index, size, type, normalized, stride, offset ) {\n\n\t\tif ( capabilities.isWebGL2 === true && ( type === 5124 || type === 5125 ) ) {\n\n\t\t\tgl.vertexAttribIPointer( index, size, type, stride, offset );\n\n\t\t} else {\n\n\t\t\tgl.vertexAttribPointer( index, size, type, normalized, stride, offset );\n\n\t\t}\n\n\t}\n\n\tfunction setupVertexAttributes( object, material, program, geometry ) {\n\n\t\tif ( capabilities.isWebGL2 === false && ( object.isInstancedMesh || geometry.isInstancedBufferGeometry ) ) {\n\n\t\t\tif ( extensions.get( 'ANGLE_instanced_arrays' ) === null ) return;\n\n\t\t}\n\n\t\tinitAttributes();\n\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tconst materialDefaultAttributeValues = material.defaultAttributeValues;\n\n\t\tfor ( const name in programAttributes ) {\n\n\t\t\tconst programAttribute = programAttributes[ name ];\n\n\t\t\tif ( programAttribute >= 0 ) {\n\n\t\t\t\tconst geometryAttribute = geometryAttributes[ name ];\n\n\t\t\t\tif ( geometryAttribute !== undefined ) {\n\n\t\t\t\t\tconst normalized = geometryAttribute.normalized;\n\t\t\t\t\tconst size = geometryAttribute.itemSize;\n\n\t\t\t\t\tconst attribute = attributes.get( geometryAttribute );\n\n\t\t\t\t\t// TODO Attribute may not be available on context restore\n\n\t\t\t\t\tif ( attribute === undefined ) continue;\n\n\t\t\t\t\tconst buffer = attribute.buffer;\n\t\t\t\t\tconst type = attribute.type;\n\t\t\t\t\tconst bytesPerElement = attribute.bytesPerElement;\n\n\t\t\t\t\tif ( geometryAttribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\t\tconst data = geometryAttribute.data;\n\t\t\t\t\t\tconst stride = data.stride;\n\t\t\t\t\t\tconst offset = geometryAttribute.offset;\n\n\t\t\t\t\t\tif ( data && data.isInstancedInterleavedBuffer ) {\n\n\t\t\t\t\t\t\tenableAttributeAndDivisor( programAttribute, data.meshPerAttribute );\n\n\t\t\t\t\t\t\tif ( geometry._maxInstanceCount === undefined ) {\n\n\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = data.meshPerAttribute * data.count;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tenableAttribute( programAttribute );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgl.bindBuffer( 34962, buffer );\n\t\t\t\t\t\tvertexAttribPointer( programAttribute, size, type, normalized, stride * bytesPerElement, offset * bytesPerElement );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( geometryAttribute.isInstancedBufferAttribute ) {\n\n\t\t\t\t\t\t\tenableAttributeAndDivisor( programAttribute, geometryAttribute.meshPerAttribute );\n\n\t\t\t\t\t\t\tif ( geometry._maxInstanceCount === undefined ) {\n\n\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tenableAttribute( programAttribute );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgl.bindBuffer( 34962, buffer );\n\t\t\t\t\t\tvertexAttribPointer( programAttribute, size, type, normalized, 0, 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( name === 'instanceMatrix' ) {\n\n\t\t\t\t\tconst attribute = attributes.get( object.instanceMatrix );\n\n\t\t\t\t\t// TODO Attribute may not be available on context restore\n\n\t\t\t\t\tif ( attribute === undefined ) continue;\n\n\t\t\t\t\tconst buffer = attribute.buffer;\n\t\t\t\t\tconst type = attribute.type;\n\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute + 0, 1 );\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute + 1, 1 );\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute + 2, 1 );\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute + 3, 1 );\n\n\t\t\t\t\tgl.bindBuffer( 34962, buffer );\n\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute + 0, 4, type, false, 64, 0 );\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute + 1, 4, type, false, 64, 16 );\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute + 2, 4, type, false, 64, 32 );\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute + 3, 4, type, false, 64, 48 );\n\n\t\t\t\t} else if ( name === 'instanceColor' ) {\n\n\t\t\t\t\tconst attribute = attributes.get( object.instanceColor );\n\n\t\t\t\t\t// TODO Attribute may not be available on context restore\n\n\t\t\t\t\tif ( attribute === undefined ) continue;\n\n\t\t\t\t\tconst buffer = attribute.buffer;\n\t\t\t\t\tconst type = attribute.type;\n\n\t\t\t\t\tenableAttributeAndDivisor( programAttribute, 1 );\n\n\t\t\t\t\tgl.bindBuffer( 34962, buffer );\n\n\t\t\t\t\tgl.vertexAttribPointer( programAttribute, 3, type, false, 12, 0 );\n\n\t\t\t\t} else if ( materialDefaultAttributeValues !== undefined ) {\n\n\t\t\t\t\tconst value = materialDefaultAttributeValues[ name ];\n\n\t\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\t\tswitch ( value.length ) {\n\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tgl.vertexAttrib2fv( programAttribute, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tgl.vertexAttrib3fv( programAttribute, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tgl.vertexAttrib4fv( programAttribute, value );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tgl.vertexAttrib1fv( programAttribute, value );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tdisableUnusedAttributes();\n\n\t}\n\n\tfunction dispose() {\n\n\t\treset();\n\n\t\tfor ( const geometryId in bindingStates ) {\n\n\t\t\tconst programMap = bindingStates[ geometryId ];\n\n\t\t\tfor ( const programId in programMap ) {\n\n\t\t\t\tconst stateMap = programMap[ programId ];\n\n\t\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t\t}\n\n\t\t\t\tdelete programMap[ programId ];\n\n\t\t\t}\n\n\t\t\tdelete bindingStates[ geometryId ];\n\n\t\t}\n\n\t}\n\n\tfunction releaseStatesOfGeometry( geometry ) {\n\n\t\tif ( bindingStates[ geometry.id ] === undefined ) return;\n\n\t\tconst programMap = bindingStates[ geometry.id ];\n\n\t\tfor ( const programId in programMap ) {\n\n\t\t\tconst stateMap = programMap[ programId ];\n\n\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t}\n\n\t\t\tdelete programMap[ programId ];\n\n\t\t}\n\n\t\tdelete bindingStates[ geometry.id ];\n\n\t}\n\n\tfunction releaseStatesOfProgram( program ) {\n\n\t\tfor ( const geometryId in bindingStates ) {\n\n\t\t\tconst programMap = bindingStates[ geometryId ];\n\n\t\t\tif ( programMap[ program.id ] === undefined ) continue;\n\n\t\t\tconst stateMap = programMap[ program.id ];\n\n\t\t\tfor ( const wireframe in stateMap ) {\n\n\t\t\t\tdeleteVertexArrayObject( stateMap[ wireframe ].object );\n\n\t\t\t\tdelete stateMap[ wireframe ];\n\n\t\t\t}\n\n\t\t\tdelete programMap[ program.id ];\n\n\t\t}\n\n\t}\n\n\tfunction reset() {\n\n\t\tresetDefaultState();\n\n\t\tif ( currentState === defaultState ) return;\n\n\t\tcurrentState = defaultState;\n\t\tbindVertexArrayObject( currentState.object );\n\n\t}\n\n\t// for backward-compatilibity\n\n\tfunction resetDefaultState() {\n\n\t\tdefaultState.geometry = null;\n\t\tdefaultState.program = null;\n\t\tdefaultState.wireframe = false;\n\n\t}\n\n\treturn {\n\n\t\tsetup: setup,\n\t\treset: reset,\n\t\tresetDefaultState: resetDefaultState,\n\t\tdispose: dispose,\n\t\treleaseStatesOfGeometry: releaseStatesOfGeometry,\n\t\treleaseStatesOfProgram: releaseStatesOfProgram,\n\n\t\tinitAttributes: initAttributes,\n\t\tenableAttribute: enableAttribute,\n\t\tdisableUnusedAttributes: disableUnusedAttributes\n\n\t};\n\n}\n\nfunction WebGLBufferRenderer( gl, extensions, info, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tlet mode;\n\n\tfunction setMode( value ) {\n\n\t\tmode = value;\n\n\t}\n\n\tfunction render( start, count ) {\n\n\t\tgl.drawArrays( mode, start, count );\n\n\t\tinfo.update( count, mode, 1 );\n\n\t}\n\n\tfunction renderInstances( start, count, primcount ) {\n\n\t\tif ( primcount === 0 ) return;\n\n\t\tlet extension, methodName;\n\n\t\tif ( isWebGL2 ) {\n\n\t\t\textension = gl;\n\t\t\tmethodName = 'drawArraysInstanced';\n\n\t\t} else {\n\n\t\t\textension = extensions.get( 'ANGLE_instanced_arrays' );\n\t\t\tmethodName = 'drawArraysInstancedANGLE';\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\textension[ methodName ]( mode, start, count, primcount );\n\n\t\tinfo.update( count, mode, primcount );\n\n\t}\n\n\t//\n\n\tthis.setMode = setMode;\n\tthis.render = render;\n\tthis.renderInstances = renderInstances;\n\n}\n\nfunction WebGLCapabilities( gl, extensions, parameters ) {\n\n\tlet maxAnisotropy;\n\n\tfunction getMaxAnisotropy() {\n\n\t\tif ( maxAnisotropy !== undefined ) return maxAnisotropy;\n\n\t\tif ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {\n\n\t\t\tconst extension = extensions.get( 'EXT_texture_filter_anisotropic' );\n\n\t\t\tmaxAnisotropy = gl.getParameter( extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT );\n\n\t\t} else {\n\n\t\t\tmaxAnisotropy = 0;\n\n\t\t}\n\n\t\treturn maxAnisotropy;\n\n\t}\n\n\tfunction getMaxPrecision( precision ) {\n\n\t\tif ( precision === 'highp' ) {\n\n\t\t\tif ( gl.getShaderPrecisionFormat( 35633, 36338 ).precision > 0 &&\n\t\t\t\tgl.getShaderPrecisionFormat( 35632, 36338 ).precision > 0 ) {\n\n\t\t\t\treturn 'highp';\n\n\t\t\t}\n\n\t\t\tprecision = 'mediump';\n\n\t\t}\n\n\t\tif ( precision === 'mediump' ) {\n\n\t\t\tif ( gl.getShaderPrecisionFormat( 35633, 36337 ).precision > 0 &&\n\t\t\t\tgl.getShaderPrecisionFormat( 35632, 36337 ).precision > 0 ) {\n\n\t\t\t\treturn 'mediump';\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn 'lowp';\n\n\t}\n\n\t/* eslint-disable no-undef */\n\tconst isWebGL2 = ( typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext ) ||\n\t\t( typeof WebGL2ComputeRenderingContext !== 'undefined' && gl instanceof WebGL2ComputeRenderingContext );\n\t/* eslint-enable no-undef */\n\n\tlet precision = parameters.precision !== undefined ? parameters.precision : 'highp';\n\tconst maxPrecision = getMaxPrecision( precision );\n\n\tif ( maxPrecision !== precision ) {\n\n\t\tconsole.warn( 'THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.' );\n\t\tprecision = maxPrecision;\n\n\t}\n\n\tconst drawBuffers = isWebGL2 || extensions.has( 'WEBGL_draw_buffers' );\n\n\tconst logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true;\n\n\tconst maxTextures = gl.getParameter( 34930 );\n\tconst maxVertexTextures = gl.getParameter( 35660 );\n\tconst maxTextureSize = gl.getParameter( 3379 );\n\tconst maxCubemapSize = gl.getParameter( 34076 );\n\n\tconst maxAttributes = gl.getParameter( 34921 );\n\tconst maxVertexUniforms = gl.getParameter( 36347 );\n\tconst maxVaryings = gl.getParameter( 36348 );\n\tconst maxFragmentUniforms = gl.getParameter( 36349 );\n\n\tconst vertexTextures = maxVertexTextures > 0;\n\tconst floatFragmentTextures = isWebGL2 || extensions.has( 'OES_texture_float' );\n\tconst floatVertexTextures = vertexTextures && floatFragmentTextures;\n\n\tconst maxSamples = isWebGL2 ? gl.getParameter( 36183 ) : 0;\n\n\treturn {\n\n\t\tisWebGL2: isWebGL2,\n\n\t\tdrawBuffers: drawBuffers,\n\n\t\tgetMaxAnisotropy: getMaxAnisotropy,\n\t\tgetMaxPrecision: getMaxPrecision,\n\n\t\tprecision: precision,\n\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\n\t\tmaxTextures: maxTextures,\n\t\tmaxVertexTextures: maxVertexTextures,\n\t\tmaxTextureSize: maxTextureSize,\n\t\tmaxCubemapSize: maxCubemapSize,\n\n\t\tmaxAttributes: maxAttributes,\n\t\tmaxVertexUniforms: maxVertexUniforms,\n\t\tmaxVaryings: maxVaryings,\n\t\tmaxFragmentUniforms: maxFragmentUniforms,\n\n\t\tvertexTextures: vertexTextures,\n\t\tfloatFragmentTextures: floatFragmentTextures,\n\t\tfloatVertexTextures: floatVertexTextures,\n\n\t\tmaxSamples: maxSamples\n\n\t};\n\n}\n\nfunction WebGLClipping( properties ) {\n\n\tconst scope = this;\n\n\tlet globalState = null,\n\t\tnumGlobalPlanes = 0,\n\t\tlocalClippingEnabled = false,\n\t\trenderingShadows = false;\n\n\tconst plane = new Plane(),\n\t\tviewNormalMatrix = new Matrix3(),\n\n\t\tuniform = { value: null, needsUpdate: false };\n\n\tthis.uniform = uniform;\n\tthis.numPlanes = 0;\n\tthis.numIntersection = 0;\n\n\tthis.init = function ( planes, enableLocalClipping, camera ) {\n\n\t\tconst enabled =\n\t\t\tplanes.length !== 0 ||\n\t\t\tenableLocalClipping ||\n\t\t\t// enable state of previous frame - the clipping code has to\n\t\t\t// run another frame in order to reset the state:\n\t\t\tnumGlobalPlanes !== 0 ||\n\t\t\tlocalClippingEnabled;\n\n\t\tlocalClippingEnabled = enableLocalClipping;\n\n\t\tglobalState = projectPlanes( planes, camera, 0 );\n\t\tnumGlobalPlanes = planes.length;\n\n\t\treturn enabled;\n\n\t};\n\n\tthis.beginShadows = function () {\n\n\t\trenderingShadows = true;\n\t\tprojectPlanes( null );\n\n\t};\n\n\tthis.endShadows = function () {\n\n\t\trenderingShadows = false;\n\t\tresetGlobalState();\n\n\t};\n\n\tthis.setState = function ( material, camera, useCache ) {\n\n\t\tconst planes = material.clippingPlanes,\n\t\t\tclipIntersection = material.clipIntersection,\n\t\t\tclipShadows = material.clipShadows;\n\n\t\tconst materialProperties = properties.get( material );\n\n\t\tif ( ! localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && ! clipShadows ) {\n\n\t\t\t// there's no local clipping\n\n\t\t\tif ( renderingShadows ) {\n\n\t\t\t\t// there's no global clipping\n\n\t\t\t\tprojectPlanes( null );\n\n\t\t\t} else {\n\n\t\t\t\tresetGlobalState();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst nGlobal = renderingShadows ? 0 : numGlobalPlanes,\n\t\t\t\tlGlobal = nGlobal * 4;\n\n\t\t\tlet dstArray = materialProperties.clippingState || null;\n\n\t\t\tuniform.value = dstArray; // ensure unique state\n\n\t\t\tdstArray = projectPlanes( planes, camera, lGlobal, useCache );\n\n\t\t\tfor ( let i = 0; i !== lGlobal; ++ i ) {\n\n\t\t\t\tdstArray[ i ] = globalState[ i ];\n\n\t\t\t}\n\n\t\t\tmaterialProperties.clippingState = dstArray;\n\t\t\tthis.numIntersection = clipIntersection ? this.numPlanes : 0;\n\t\t\tthis.numPlanes += nGlobal;\n\n\t\t}\n\n\n\t};\n\n\tfunction resetGlobalState() {\n\n\t\tif ( uniform.value !== globalState ) {\n\n\t\t\tuniform.value = globalState;\n\t\t\tuniform.needsUpdate = numGlobalPlanes > 0;\n\n\t\t}\n\n\t\tscope.numPlanes = numGlobalPlanes;\n\t\tscope.numIntersection = 0;\n\n\t}\n\n\tfunction projectPlanes( planes, camera, dstOffset, skipTransform ) {\n\n\t\tconst nPlanes = planes !== null ? planes.length : 0;\n\t\tlet dstArray = null;\n\n\t\tif ( nPlanes !== 0 ) {\n\n\t\t\tdstArray = uniform.value;\n\n\t\t\tif ( skipTransform !== true || dstArray === null ) {\n\n\t\t\t\tconst flatSize = dstOffset + nPlanes * 4,\n\t\t\t\t\tviewMatrix = camera.matrixWorldInverse;\n\n\t\t\t\tviewNormalMatrix.getNormalMatrix( viewMatrix );\n\n\t\t\t\tif ( dstArray === null || dstArray.length < flatSize ) {\n\n\t\t\t\t\tdstArray = new Float32Array( flatSize );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0, i4 = dstOffset; i !== nPlanes; ++ i, i4 += 4 ) {\n\n\t\t\t\t\tplane.copy( planes[ i ] ).applyMatrix4( viewMatrix, viewNormalMatrix );\n\n\t\t\t\t\tplane.normal.toArray( dstArray, i4 );\n\t\t\t\t\tdstArray[ i4 + 3 ] = plane.constant;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tuniform.value = dstArray;\n\t\t\tuniform.needsUpdate = true;\n\n\t\t}\n\n\t\tscope.numPlanes = nPlanes;\n\t\tscope.numIntersection = 0;\n\n\t\treturn dstArray;\n\n\t}\n\n}\n\nfunction WebGLCubeMaps( renderer ) {\n\n\tlet cubemaps = new WeakMap();\n\n\tfunction mapTextureMapping( texture, mapping ) {\n\n\t\tif ( mapping === EquirectangularReflectionMapping ) {\n\n\t\t\ttexture.mapping = CubeReflectionMapping;\n\n\t\t} else if ( mapping === EquirectangularRefractionMapping ) {\n\n\t\t\ttexture.mapping = CubeRefractionMapping;\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction get( texture ) {\n\n\t\tif ( texture && texture.isTexture ) {\n\n\t\t\tconst mapping = texture.mapping;\n\n\t\t\tif ( mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping ) {\n\n\t\t\t\tif ( cubemaps.has( texture ) ) {\n\n\t\t\t\t\tconst cubemap = cubemaps.get( texture ).texture;\n\t\t\t\t\treturn mapTextureMapping( cubemap, texture.mapping );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst image = texture.image;\n\n\t\t\t\t\tif ( image && image.height > 0 ) {\n\n\t\t\t\t\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\t\t\t\t\tconst renderTarget = new WebGLCubeRenderTarget( image.height / 2 );\n\t\t\t\t\t\trenderTarget.fromEquirectangularTexture( renderer, texture );\n\t\t\t\t\t\tcubemaps.set( texture, renderTarget );\n\n\t\t\t\t\t\trenderer.setRenderTarget( currentRenderTarget );\n\n\t\t\t\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t\t\t\t\treturn mapTextureMapping( renderTarget.texture, texture.mapping );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// image not yet ready. try the conversion next frame\n\n\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tconst cubemap = cubemaps.get( texture );\n\n\t\tif ( cubemap !== undefined ) {\n\n\t\t\tcubemaps.delete( texture );\n\t\t\tcubemap.dispose();\n\n\t\t}\n\n\t}\n\n\tfunction dispose() {\n\n\t\tcubemaps = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction WebGLExtensions( gl ) {\n\n\tconst extensions = {};\n\n\tfunction getExtension( name ) {\n\n\t\tif ( extensions[ name ] !== undefined ) {\n\n\t\t\treturn extensions[ name ];\n\n\t\t}\n\n\t\tlet extension;\n\n\t\tswitch ( name ) {\n\n\t\t\tcase 'WEBGL_depth_texture':\n\t\t\t\textension = gl.getExtension( 'WEBGL_depth_texture' ) || gl.getExtension( 'MOZ_WEBGL_depth_texture' ) || gl.getExtension( 'WEBKIT_WEBGL_depth_texture' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'EXT_texture_filter_anisotropic':\n\t\t\t\textension = gl.getExtension( 'EXT_texture_filter_anisotropic' ) || gl.getExtension( 'MOZ_EXT_texture_filter_anisotropic' ) || gl.getExtension( 'WEBKIT_EXT_texture_filter_anisotropic' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'WEBGL_compressed_texture_s3tc':\n\t\t\t\textension = gl.getExtension( 'WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'MOZ_WEBGL_compressed_texture_s3tc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_s3tc' );\n\t\t\t\tbreak;\n\n\t\t\tcase 'WEBGL_compressed_texture_pvrtc':\n\t\t\t\textension = gl.getExtension( 'WEBGL_compressed_texture_pvrtc' ) || gl.getExtension( 'WEBKIT_WEBGL_compressed_texture_pvrtc' );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\textension = gl.getExtension( name );\n\n\t\t}\n\n\t\textensions[ name ] = extension;\n\n\t\treturn extension;\n\n\t}\n\n\treturn {\n\n\t\thas: function ( name ) {\n\n\t\t\treturn getExtension( name ) !== null;\n\n\t\t},\n\n\t\tinit: function ( capabilities ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\tgetExtension( 'EXT_color_buffer_float' );\n\n\t\t\t} else {\n\n\t\t\t\tgetExtension( 'WEBGL_depth_texture' );\n\t\t\t\tgetExtension( 'OES_texture_float' );\n\t\t\t\tgetExtension( 'OES_texture_half_float' );\n\t\t\t\tgetExtension( 'OES_texture_half_float_linear' );\n\t\t\t\tgetExtension( 'OES_standard_derivatives' );\n\t\t\t\tgetExtension( 'OES_element_index_uint' );\n\t\t\t\tgetExtension( 'OES_vertex_array_object' );\n\t\t\t\tgetExtension( 'ANGLE_instanced_arrays' );\n\n\t\t\t}\n\n\t\t\tgetExtension( 'OES_texture_float_linear' );\n\t\t\tgetExtension( 'EXT_color_buffer_half_float' );\n\n\t\t},\n\n\t\tget: function ( name ) {\n\n\t\t\tconst extension = getExtension( name );\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: ' + name + ' extension not supported.' );\n\n\t\t\t}\n\n\t\t\treturn extension;\n\n\t\t}\n\n\t};\n\n}\n\nfunction WebGLGeometries( gl, attributes, info, bindingStates ) {\n\n\tconst geometries = {};\n\tconst wireframeAttributes = new WeakMap();\n\n\tfunction onGeometryDispose( event ) {\n\n\t\tconst geometry = event.target;\n\n\t\tif ( geometry.index !== null ) {\n\n\t\t\tattributes.remove( geometry.index );\n\n\t\t}\n\n\t\tfor ( const name in geometry.attributes ) {\n\n\t\t\tattributes.remove( geometry.attributes[ name ] );\n\n\t\t}\n\n\t\tgeometry.removeEventListener( 'dispose', onGeometryDispose );\n\n\t\tdelete geometries[ geometry.id ];\n\n\t\tconst attribute = wireframeAttributes.get( geometry );\n\n\t\tif ( attribute ) {\n\n\t\t\tattributes.remove( attribute );\n\t\t\twireframeAttributes.delete( geometry );\n\n\t\t}\n\n\t\tbindingStates.releaseStatesOfGeometry( geometry );\n\n\t\tif ( geometry.isInstancedBufferGeometry === true ) {\n\n\t\t\tdelete geometry._maxInstanceCount;\n\n\t\t}\n\n\t\t//\n\n\t\tinfo.memory.geometries --;\n\n\t}\n\n\tfunction get( object, geometry ) {\n\n\t\tif ( geometries[ geometry.id ] === true ) return geometry;\n\n\t\tgeometry.addEventListener( 'dispose', onGeometryDispose );\n\n\t\tgeometries[ geometry.id ] = true;\n\n\t\tinfo.memory.geometries ++;\n\n\t\treturn geometry;\n\n\t}\n\n\tfunction update( geometry ) {\n\n\t\tconst geometryAttributes = geometry.attributes;\n\n\t\t// Updating index buffer in VAO now. See WebGLBindingStates.\n\n\t\tfor ( const name in geometryAttributes ) {\n\n\t\t\tattributes.update( geometryAttributes[ name ], 34962 );\n\n\t\t}\n\n\t\t// morph targets\n\n\t\tconst morphAttributes = geometry.morphAttributes;\n\n\t\tfor ( const name in morphAttributes ) {\n\n\t\t\tconst array = morphAttributes[ name ];\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i ++ ) {\n\n\t\t\t\tattributes.update( array[ i ], 34962 );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction updateWireframeAttribute( geometry ) {\n\n\t\tconst indices = [];\n\n\t\tconst geometryIndex = geometry.index;\n\t\tconst geometryPosition = geometry.attributes.position;\n\t\tlet version = 0;\n\n\t\tif ( geometryIndex !== null ) {\n\n\t\t\tconst array = geometryIndex.array;\n\t\t\tversion = geometryIndex.version;\n\n\t\t\tfor ( let i = 0, l = array.length; i < l; i += 3 ) {\n\n\t\t\t\tconst a = array[ i + 0 ];\n\t\t\t\tconst b = array[ i + 1 ];\n\t\t\t\tconst c = array[ i + 2 ];\n\n\t\t\t\tindices.push( a, b, b, c, c, a );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst array = geometryPosition.array;\n\t\t\tversion = geometryPosition.version;\n\n\t\t\tfor ( let i = 0, l = ( array.length / 3 ) - 1; i < l; i += 3 ) {\n\n\t\t\t\tconst a = i + 0;\n\t\t\t\tconst b = i + 1;\n\t\t\t\tconst c = i + 2;\n\n\t\t\t\tindices.push( a, b, b, c, c, a );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst attribute = new ( arrayMax( indices ) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 );\n\t\tattribute.version = version;\n\n\t\t// Updating index buffer in VAO now. See WebGLBindingStates\n\n\t\t//\n\n\t\tconst previousAttribute = wireframeAttributes.get( geometry );\n\n\t\tif ( previousAttribute ) attributes.remove( previousAttribute );\n\n\t\t//\n\n\t\twireframeAttributes.set( geometry, attribute );\n\n\t}\n\n\tfunction getWireframeAttribute( geometry ) {\n\n\t\tconst currentAttribute = wireframeAttributes.get( geometry );\n\n\t\tif ( currentAttribute ) {\n\n\t\t\tconst geometryIndex = geometry.index;\n\n\t\t\tif ( geometryIndex !== null ) {\n\n\t\t\t\t// if the attribute is obsolete, create a new one\n\n\t\t\t\tif ( currentAttribute.version < geometryIndex.version ) {\n\n\t\t\t\t\tupdateWireframeAttribute( geometry );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tupdateWireframeAttribute( geometry );\n\n\t\t}\n\n\t\treturn wireframeAttributes.get( geometry );\n\n\t}\n\n\treturn {\n\n\t\tget: get,\n\t\tupdate: update,\n\n\t\tgetWireframeAttribute: getWireframeAttribute\n\n\t};\n\n}\n\nfunction WebGLIndexedBufferRenderer( gl, extensions, info, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tlet mode;\n\n\tfunction setMode( value ) {\n\n\t\tmode = value;\n\n\t}\n\n\tlet type, bytesPerElement;\n\n\tfunction setIndex( value ) {\n\n\t\ttype = value.type;\n\t\tbytesPerElement = value.bytesPerElement;\n\n\t}\n\n\tfunction render( start, count ) {\n\n\t\tgl.drawElements( mode, count, type, start * bytesPerElement );\n\n\t\tinfo.update( count, mode, 1 );\n\n\t}\n\n\tfunction renderInstances( start, count, primcount ) {\n\n\t\tif ( primcount === 0 ) return;\n\n\t\tlet extension, methodName;\n\n\t\tif ( isWebGL2 ) {\n\n\t\t\textension = gl;\n\t\t\tmethodName = 'drawElementsInstanced';\n\n\t\t} else {\n\n\t\t\textension = extensions.get( 'ANGLE_instanced_arrays' );\n\t\t\tmethodName = 'drawElementsInstancedANGLE';\n\n\t\t\tif ( extension === null ) {\n\n\t\t\t\tconsole.error( 'THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.' );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\textension[ methodName ]( mode, count, type, start * bytesPerElement, primcount );\n\n\t\tinfo.update( count, mode, primcount );\n\n\t}\n\n\t//\n\n\tthis.setMode = setMode;\n\tthis.setIndex = setIndex;\n\tthis.render = render;\n\tthis.renderInstances = renderInstances;\n\n}\n\nfunction WebGLInfo( gl ) {\n\n\tconst memory = {\n\t\tgeometries: 0,\n\t\ttextures: 0\n\t};\n\n\tconst render = {\n\t\tframe: 0,\n\t\tcalls: 0,\n\t\ttriangles: 0,\n\t\tpoints: 0,\n\t\tlines: 0\n\t};\n\n\tfunction update( count, mode, instanceCount ) {\n\n\t\trender.calls ++;\n\n\t\tswitch ( mode ) {\n\n\t\t\tcase 4:\n\t\t\t\trender.triangles += instanceCount * ( count / 3 );\n\t\t\t\tbreak;\n\n\t\t\tcase 1:\n\t\t\t\trender.lines += instanceCount * ( count / 2 );\n\t\t\t\tbreak;\n\n\t\t\tcase 3:\n\t\t\t\trender.lines += instanceCount * ( count - 1 );\n\t\t\t\tbreak;\n\n\t\t\tcase 2:\n\t\t\t\trender.lines += instanceCount * count;\n\t\t\t\tbreak;\n\n\t\t\tcase 0:\n\t\t\t\trender.points += instanceCount * count;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.error( 'THREE.WebGLInfo: Unknown draw mode:', mode );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\tfunction reset() {\n\n\t\trender.frame ++;\n\t\trender.calls = 0;\n\t\trender.triangles = 0;\n\t\trender.points = 0;\n\t\trender.lines = 0;\n\n\t}\n\n\treturn {\n\t\tmemory: memory,\n\t\trender: render,\n\t\tprograms: null,\n\t\tautoReset: true,\n\t\treset: reset,\n\t\tupdate: update\n\t};\n\n}\n\nfunction numericalSort( a, b ) {\n\n\treturn a[ 0 ] - b[ 0 ];\n\n}\n\nfunction absNumericalSort( a, b ) {\n\n\treturn Math.abs( b[ 1 ] ) - Math.abs( a[ 1 ] );\n\n}\n\nfunction WebGLMorphtargets( gl ) {\n\n\tconst influencesList = {};\n\tconst morphInfluences = new Float32Array( 8 );\n\n\tconst workInfluences = [];\n\n\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\tworkInfluences[ i ] = [ i, 0 ];\n\n\t}\n\n\tfunction update( object, geometry, material, program ) {\n\n\t\tconst objectInfluences = object.morphTargetInfluences;\n\n\t\t// When object doesn't have morph target influences defined, we treat it as a 0-length array\n\t\t// This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences\n\n\t\tconst length = objectInfluences === undefined ? 0 : objectInfluences.length;\n\n\t\tlet influences = influencesList[ geometry.id ];\n\n\t\tif ( influences === undefined || influences.length !== length ) {\n\n\t\t\t// initialise list\n\n\t\t\tinfluences = [];\n\n\t\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\t\tinfluences[ i ] = [ i, 0 ];\n\n\t\t\t}\n\n\t\t\tinfluencesList[ geometry.id ] = influences;\n\n\t\t}\n\n\t\t// Collect influences\n\n\t\tfor ( let i = 0; i < length; i ++ ) {\n\n\t\t\tconst influence = influences[ i ];\n\n\t\t\tinfluence[ 0 ] = i;\n\t\t\tinfluence[ 1 ] = objectInfluences[ i ];\n\n\t\t}\n\n\t\tinfluences.sort( absNumericalSort );\n\n\t\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\t\tif ( i < length && influences[ i ][ 1 ] ) {\n\n\t\t\t\tworkInfluences[ i ][ 0 ] = influences[ i ][ 0 ];\n\t\t\t\tworkInfluences[ i ][ 1 ] = influences[ i ][ 1 ];\n\n\t\t\t} else {\n\n\t\t\t\tworkInfluences[ i ][ 0 ] = Number.MAX_SAFE_INTEGER;\n\t\t\t\tworkInfluences[ i ][ 1 ] = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\tworkInfluences.sort( numericalSort );\n\n\t\tconst morphTargets = material.morphTargets && geometry.morphAttributes.position;\n\t\tconst morphNormals = material.morphNormals && geometry.morphAttributes.normal;\n\n\t\tlet morphInfluencesSum = 0;\n\n\t\tfor ( let i = 0; i < 8; i ++ ) {\n\n\t\t\tconst influence = workInfluences[ i ];\n\t\t\tconst index = influence[ 0 ];\n\t\t\tconst value = influence[ 1 ];\n\n\t\t\tif ( index !== Number.MAX_SAFE_INTEGER && value ) {\n\n\t\t\t\tif ( morphTargets && geometry.getAttribute( 'morphTarget' + i ) !== morphTargets[ index ] ) {\n\n\t\t\t\t\tgeometry.setAttribute( 'morphTarget' + i, morphTargets[ index ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( morphNormals && geometry.getAttribute( 'morphNormal' + i ) !== morphNormals[ index ] ) {\n\n\t\t\t\t\tgeometry.setAttribute( 'morphNormal' + i, morphNormals[ index ] );\n\n\t\t\t\t}\n\n\t\t\t\tmorphInfluences[ i ] = value;\n\t\t\t\tmorphInfluencesSum += value;\n\n\t\t\t} else {\n\n\t\t\t\tif ( morphTargets && geometry.hasAttribute( 'morphTarget' + i ) === true ) {\n\n\t\t\t\t\tgeometry.deleteAttribute( 'morphTarget' + i );\n\n\t\t\t\t}\n\n\t\t\t\tif ( morphNormals && geometry.hasAttribute( 'morphNormal' + i ) === true ) {\n\n\t\t\t\t\tgeometry.deleteAttribute( 'morphNormal' + i );\n\n\t\t\t\t}\n\n\t\t\t\tmorphInfluences[ i ] = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// GLSL shader uses formula baseinfluence * base + sum(target * influence)\n\t\t// This allows us to switch between absolute morphs and relative morphs without changing shader code\n\t\t// When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence)\n\t\tconst morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n\n\t\tprogram.getUniforms().setValue( gl, 'morphTargetBaseInfluence', morphBaseInfluence );\n\t\tprogram.getUniforms().setValue( gl, 'morphTargetInfluences', morphInfluences );\n\n\t}\n\n\treturn {\n\n\t\tupdate: update\n\n\t};\n\n}\n\nfunction WebGLObjects( gl, geometries, attributes, info ) {\n\n\tlet updateMap = new WeakMap();\n\n\tfunction update( object ) {\n\n\t\tconst frame = info.render.frame;\n\n\t\tconst geometry = object.geometry;\n\t\tconst buffergeometry = geometries.get( object, geometry );\n\n\t\t// Update once per frame\n\n\t\tif ( updateMap.get( buffergeometry ) !== frame ) {\n\n\t\t\tgeometries.update( buffergeometry );\n\n\t\t\tupdateMap.set( buffergeometry, frame );\n\n\t\t}\n\n\t\tif ( object.isInstancedMesh ) {\n\n\t\t\tif ( object.hasEventListener( 'dispose', onInstancedMeshDispose ) === false ) {\n\n\t\t\t\tobject.addEventListener( 'dispose', onInstancedMeshDispose );\n\n\t\t\t}\n\n\t\t\tattributes.update( object.instanceMatrix, 34962 );\n\n\t\t\tif ( object.instanceColor !== null ) {\n\n\t\t\t\tattributes.update( object.instanceColor, 34962 );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn buffergeometry;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tupdateMap = new WeakMap();\n\n\t}\n\n\tfunction onInstancedMeshDispose( event ) {\n\n\t\tconst instancedMesh = event.target;\n\n\t\tinstancedMesh.removeEventListener( 'dispose', onInstancedMeshDispose );\n\n\t\tattributes.remove( instancedMesh.instanceMatrix );\n\n\t\tif ( instancedMesh.instanceColor !== null ) attributes.remove( instancedMesh.instanceColor );\n\n\t}\n\n\treturn {\n\n\t\tupdate: update,\n\t\tdispose: dispose\n\n\t};\n\n}\n\nclass DataTexture2DArray extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, depth = 1 ) {\n\n\t\tsuper( null );\n\n\t\tthis.image = { data, width, height, depth };\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nDataTexture2DArray.prototype.isDataTexture2DArray = true;\n\nclass DataTexture3D extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, depth = 1 ) {\n\n\t\t// We're going to add .setXXX() methods for setting properties later.\n\t\t// Users can still set in DataTexture3D directly.\n\t\t//\n\t\t//\tconst texture = new THREE.DataTexture3D( data, width, height, depth );\n\t\t// \ttexture.anisotropy = 16;\n\t\t//\n\t\t// See #14839\n\n\t\tsuper( null );\n\n\t\tthis.image = { data, width, height, depth };\n\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nDataTexture3D.prototype.isDataTexture3D = true;\n\n/**\n * Uniforms of a program.\n * Those form a tree structure with a special top-level container for the root,\n * which you get by calling 'new WebGLUniforms( gl, program )'.\n *\n *\n * Properties of inner nodes including the top-level container:\n *\n * .seq - array of nested uniforms\n * .map - nested uniforms by name\n *\n *\n * Methods of all nodes except the top-level container:\n *\n * .setValue( gl, value, [textures] )\n *\n * \t\tuploads a uniform value(s)\n * \tthe 'textures' parameter is needed for sampler uniforms\n *\n *\n * Static methods of the top-level container (textures factorizations):\n *\n * .upload( gl, seq, values, textures )\n *\n * \t\tsets uniforms in 'seq' to 'values[id].value'\n *\n * .seqWithValue( seq, values ) : filteredSeq\n *\n * \t\tfilters 'seq' entries with corresponding entry in values\n *\n *\n * Methods of the top-level container (textures factorizations):\n *\n * .setValue( gl, name, value, textures )\n *\n * \t\tsets uniform with name 'name' to 'value'\n *\n * .setOptional( gl, obj, prop )\n *\n * \t\tlike .set for an optional property of the object\n *\n */\n\nconst emptyTexture = new Texture();\nconst emptyTexture2dArray = new DataTexture2DArray();\nconst emptyTexture3d = new DataTexture3D();\nconst emptyCubeTexture = new CubeTexture();\n\n// --- Utilities ---\n\n// Array Caches (provide typed arrays for temporary by size)\n\nconst arrayCacheF32 = [];\nconst arrayCacheI32 = [];\n\n// Float32Array caches used for uploading Matrix uniforms\n\nconst mat4array = new Float32Array( 16 );\nconst mat3array = new Float32Array( 9 );\nconst mat2array = new Float32Array( 4 );\n\n// Flattening for arrays of vectors and matrices\n\nfunction flatten( array, nBlocks, blockSize ) {\n\n\tconst firstElem = array[ 0 ];\n\n\tif ( firstElem <= 0 || firstElem > 0 ) return array;\n\t// unoptimized: ! isNaN( firstElem )\n\t// see http://jacksondunstan.com/articles/983\n\n\tconst n = nBlocks * blockSize;\n\tlet r = arrayCacheF32[ n ];\n\n\tif ( r === undefined ) {\n\n\t\tr = new Float32Array( n );\n\t\tarrayCacheF32[ n ] = r;\n\n\t}\n\n\tif ( nBlocks !== 0 ) {\n\n\t\tfirstElem.toArray( r, 0 );\n\n\t\tfor ( let i = 1, offset = 0; i !== nBlocks; ++ i ) {\n\n\t\t\toffset += blockSize;\n\t\t\tarray[ i ].toArray( r, offset );\n\n\t\t}\n\n\t}\n\n\treturn r;\n\n}\n\nfunction arraysEqual( a, b ) {\n\n\tif ( a.length !== b.length ) return false;\n\n\tfor ( let i = 0, l = a.length; i < l; i ++ ) {\n\n\t\tif ( a[ i ] !== b[ i ] ) return false;\n\n\t}\n\n\treturn true;\n\n}\n\nfunction copyArray( a, b ) {\n\n\tfor ( let i = 0, l = b.length; i < l; i ++ ) {\n\n\t\ta[ i ] = b[ i ];\n\n\t}\n\n}\n\n// Texture unit allocation\n\nfunction allocTexUnits( textures, n ) {\n\n\tlet r = arrayCacheI32[ n ];\n\n\tif ( r === undefined ) {\n\n\t\tr = new Int32Array( n );\n\t\tarrayCacheI32[ n ] = r;\n\n\t}\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\tr[ i ] = textures.allocateTextureUnit();\n\n\t}\n\n\treturn r;\n\n}\n\n// --- Setters ---\n\n// Note: Defining these methods externally, because they come in a bunch\n// and this way their names minify.\n\n// Single scalar\n\nfunction setValueV1f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1f( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single float vector (from flat array or THREE.VectorN)\n\nfunction setValueV2f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y ) {\n\n\t\t\tgl.uniform2f( this.addr, v.x, v.y );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform2fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV3f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z ) {\n\n\t\t\tgl.uniform3f( this.addr, v.x, v.y, v.z );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\n\t\t}\n\n\t} else if ( v.r !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.r || cache[ 1 ] !== v.g || cache[ 2 ] !== v.b ) {\n\n\t\t\tgl.uniform3f( this.addr, v.r, v.g, v.b );\n\n\t\t\tcache[ 0 ] = v.r;\n\t\t\tcache[ 1 ] = v.g;\n\t\t\tcache[ 2 ] = v.b;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform3fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\nfunction setValueV4f( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( v.x !== undefined ) {\n\n\t\tif ( cache[ 0 ] !== v.x || cache[ 1 ] !== v.y || cache[ 2 ] !== v.z || cache[ 3 ] !== v.w ) {\n\n\t\t\tgl.uniform4f( this.addr, v.x, v.y, v.z, v.w );\n\n\t\t\tcache[ 0 ] = v.x;\n\t\t\tcache[ 1 ] = v.y;\n\t\t\tcache[ 2 ] = v.z;\n\t\t\tcache[ 3 ] = v.w;\n\n\t\t}\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniform4fv( this.addr, v );\n\n\t\tcopyArray( cache, v );\n\n\t}\n\n}\n\n// Single matrix (from flat array or THREE.MatrixN)\n\nfunction setValueM2( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix2fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat2array.set( elements );\n\n\t\tgl.uniformMatrix2fv( this.addr, false, mat2array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\nfunction setValueM3( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix3fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat3array.set( elements );\n\n\t\tgl.uniformMatrix3fv( this.addr, false, mat3array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\nfunction setValueM4( gl, v ) {\n\n\tconst cache = this.cache;\n\tconst elements = v.elements;\n\n\tif ( elements === undefined ) {\n\n\t\tif ( arraysEqual( cache, v ) ) return;\n\n\t\tgl.uniformMatrix4fv( this.addr, false, v );\n\n\t\tcopyArray( cache, v );\n\n\t} else {\n\n\t\tif ( arraysEqual( cache, elements ) ) return;\n\n\t\tmat4array.set( elements );\n\n\t\tgl.uniformMatrix4fv( this.addr, false, mat4array );\n\n\t\tcopyArray( cache, elements );\n\n\t}\n\n}\n\n// Single integer / boolean\n\nfunction setValueV1i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1i( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single integer / boolean vector (from flat array)\n\nfunction setValueV2i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform2iv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\nfunction setValueV3i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform3iv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\nfunction setValueV4i( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform4iv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\n// Single unsigned integer\n\nfunction setValueV1ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( cache[ 0 ] === v ) return;\n\n\tgl.uniform1ui( this.addr, v );\n\n\tcache[ 0 ] = v;\n\n}\n\n// Single unsigned integer vector (from flat array)\n\nfunction setValueV2ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform2uiv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\nfunction setValueV3ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform3uiv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\nfunction setValueV4ui( gl, v ) {\n\n\tconst cache = this.cache;\n\n\tif ( arraysEqual( cache, v ) ) return;\n\n\tgl.uniform4uiv( this.addr, v );\n\n\tcopyArray( cache, v );\n\n}\n\n\n// Single texture (2D / Cube)\n\nfunction setValueT1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.safeSetTexture2D( v || emptyTexture, unit );\n\n}\n\nfunction setValueT3D1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture3D( v || emptyTexture3d, unit );\n\n}\n\nfunction setValueT6( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.safeSetTextureCube( v || emptyCubeTexture, unit );\n\n}\n\nfunction setValueT2DArray1( gl, v, textures ) {\n\n\tconst cache = this.cache;\n\tconst unit = textures.allocateTextureUnit();\n\n\tif ( cache[ 0 ] !== unit ) {\n\n\t\tgl.uniform1i( this.addr, unit );\n\t\tcache[ 0 ] = unit;\n\n\t}\n\n\ttextures.setTexture2DArray( v || emptyTexture2dArray, unit );\n\n}\n\n// Helper to pick the right setter for the singular case\n\nfunction getSingularSetter( type ) {\n\n\tswitch ( type ) {\n\n\t\tcase 0x1406: return setValueV1f; // FLOAT\n\t\tcase 0x8b50: return setValueV2f; // _VEC2\n\t\tcase 0x8b51: return setValueV3f; // _VEC3\n\t\tcase 0x8b52: return setValueV4f; // _VEC4\n\n\t\tcase 0x8b5a: return setValueM2; // _MAT2\n\t\tcase 0x8b5b: return setValueM3; // _MAT3\n\t\tcase 0x8b5c: return setValueM4; // _MAT4\n\n\t\tcase 0x1404: case 0x8b56: return setValueV1i; // INT, BOOL\n\t\tcase 0x8b53: case 0x8b57: return setValueV2i; // _VEC2\n\t\tcase 0x8b54: case 0x8b58: return setValueV3i; // _VEC3\n\t\tcase 0x8b55: case 0x8b59: return setValueV4i; // _VEC4\n\n\t\tcase 0x1405: return setValueV1ui; // UINT\n\t\tcase 0x8dc6: return setValueV2ui; // _VEC2\n\t\tcase 0x8dc7: return setValueV3ui; // _VEC3\n\t\tcase 0x8dc8: return setValueV4ui; // _VEC4\n\n\t\tcase 0x8b5e: // SAMPLER_2D\n\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\t\tcase 0x8dca: // INT_SAMPLER_2D\n\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\t\tcase 0x8b62: // SAMPLER_2D_SHADOW\n\t\t\treturn setValueT1;\n\n\t\tcase 0x8b5f: // SAMPLER_3D\n\t\tcase 0x8dcb: // INT_SAMPLER_3D\n\t\tcase 0x8dd3: // UNSIGNED_INT_SAMPLER_3D\n\t\t\treturn setValueT3D1;\n\n\t\tcase 0x8b60: // SAMPLER_CUBE\n\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\t\tcase 0x8dc5: // SAMPLER_CUBE_SHADOW\n\t\t\treturn setValueT6;\n\n\t\tcase 0x8dc1: // SAMPLER_2D_ARRAY\n\t\tcase 0x8dcf: // INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY\n\t\tcase 0x8dc4: // SAMPLER_2D_ARRAY_SHADOW\n\t\t\treturn setValueT2DArray1;\n\n\t}\n\n}\n\n\n// Array of scalars\n\nfunction setValueV1fArray( gl, v ) {\n\n\tgl.uniform1fv( this.addr, v );\n\n}\n\n// Array of vectors (from flat array or array of THREE.VectorN)\n\nfunction setValueV2fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 2 );\n\n\tgl.uniform2fv( this.addr, data );\n\n}\n\nfunction setValueV3fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 3 );\n\n\tgl.uniform3fv( this.addr, data );\n\n}\n\nfunction setValueV4fArray( gl, v ) {\n\n\tconst data = flatten( v, this.size, 4 );\n\n\tgl.uniform4fv( this.addr, data );\n\n}\n\n// Array of matrices (from flat array or array of THREE.MatrixN)\n\nfunction setValueM2Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 4 );\n\n\tgl.uniformMatrix2fv( this.addr, false, data );\n\n}\n\nfunction setValueM3Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 9 );\n\n\tgl.uniformMatrix3fv( this.addr, false, data );\n\n}\n\nfunction setValueM4Array( gl, v ) {\n\n\tconst data = flatten( v, this.size, 16 );\n\n\tgl.uniformMatrix4fv( this.addr, false, data );\n\n}\n\n// Array of integer / boolean\n\nfunction setValueV1iArray( gl, v ) {\n\n\tgl.uniform1iv( this.addr, v );\n\n}\n\n// Array of integer / boolean vectors (from flat array)\n\nfunction setValueV2iArray( gl, v ) {\n\n\tgl.uniform2iv( this.addr, v );\n\n}\n\nfunction setValueV3iArray( gl, v ) {\n\n\tgl.uniform3iv( this.addr, v );\n\n}\n\nfunction setValueV4iArray( gl, v ) {\n\n\tgl.uniform4iv( this.addr, v );\n\n}\n\n// Array of unsigned integer\n\nfunction setValueV1uiArray( gl, v ) {\n\n\tgl.uniform1uiv( this.addr, v );\n\n}\n\n// Array of unsigned integer vectors (from flat array)\n\nfunction setValueV2uiArray( gl, v ) {\n\n\tgl.uniform2uiv( this.addr, v );\n\n}\n\nfunction setValueV3uiArray( gl, v ) {\n\n\tgl.uniform3uiv( this.addr, v );\n\n}\n\nfunction setValueV4uiArray( gl, v ) {\n\n\tgl.uniform4uiv( this.addr, v );\n\n}\n\n\n// Array of textures (2D / Cube)\n\nfunction setValueT1Array( gl, v, textures ) {\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tgl.uniform1iv( this.addr, units );\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.safeSetTexture2D( v[ i ] || emptyTexture, units[ i ] );\n\n\t}\n\n}\n\nfunction setValueT6Array( gl, v, textures ) {\n\n\tconst n = v.length;\n\n\tconst units = allocTexUnits( textures, n );\n\n\tgl.uniform1iv( this.addr, units );\n\n\tfor ( let i = 0; i !== n; ++ i ) {\n\n\t\ttextures.safeSetTextureCube( v[ i ] || emptyCubeTexture, units[ i ] );\n\n\t}\n\n}\n\n// Helper to pick the right setter for a pure (bottom-level) array\n\nfunction getPureArraySetter( type ) {\n\n\tswitch ( type ) {\n\n\t\tcase 0x1406: return setValueV1fArray; // FLOAT\n\t\tcase 0x8b50: return setValueV2fArray; // _VEC2\n\t\tcase 0x8b51: return setValueV3fArray; // _VEC3\n\t\tcase 0x8b52: return setValueV4fArray; // _VEC4\n\n\t\tcase 0x8b5a: return setValueM2Array; // _MAT2\n\t\tcase 0x8b5b: return setValueM3Array; // _MAT3\n\t\tcase 0x8b5c: return setValueM4Array; // _MAT4\n\n\t\tcase 0x1404: case 0x8b56: return setValueV1iArray; // INT, BOOL\n\t\tcase 0x8b53: case 0x8b57: return setValueV2iArray; // _VEC2\n\t\tcase 0x8b54: case 0x8b58: return setValueV3iArray; // _VEC3\n\t\tcase 0x8b55: case 0x8b59: return setValueV4iArray; // _VEC4\n\n\t\tcase 0x1405: return setValueV1uiArray; // UINT\n\t\tcase 0x8dc6: return setValueV2uiArray; // _VEC2\n\t\tcase 0x8dc7: return setValueV3uiArray; // _VEC3\n\t\tcase 0x8dc8: return setValueV4uiArray; // _VEC4\n\n\t\tcase 0x8b5e: // SAMPLER_2D\n\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\t\tcase 0x8dca: // INT_SAMPLER_2D\n\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\t\tcase 0x8b62: // SAMPLER_2D_SHADOW\n\t\t\treturn setValueT1Array;\n\n\t\tcase 0x8b60: // SAMPLER_CUBE\n\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\t\tcase 0x8dc5: // SAMPLER_CUBE_SHADOW\n\t\t\treturn setValueT6Array;\n\n\t}\n\n}\n\n// --- Uniform Classes ---\n\nfunction SingleUniform( id, activeInfo, addr ) {\n\n\tthis.id = id;\n\tthis.addr = addr;\n\tthis.cache = [];\n\tthis.setValue = getSingularSetter( activeInfo.type );\n\n\t// this.path = activeInfo.name; // DEBUG\n\n}\n\nfunction PureArrayUniform( id, activeInfo, addr ) {\n\n\tthis.id = id;\n\tthis.addr = addr;\n\tthis.cache = [];\n\tthis.size = activeInfo.size;\n\tthis.setValue = getPureArraySetter( activeInfo.type );\n\n\t// this.path = activeInfo.name; // DEBUG\n\n}\n\nPureArrayUniform.prototype.updateCache = function ( data ) {\n\n\tconst cache = this.cache;\n\n\tif ( data instanceof Float32Array && cache.length !== data.length ) {\n\n\t\tthis.cache = new Float32Array( data.length );\n\n\t}\n\n\tcopyArray( cache, data );\n\n};\n\nfunction StructuredUniform( id ) {\n\n\tthis.id = id;\n\n\tthis.seq = [];\n\tthis.map = {};\n\n}\n\nStructuredUniform.prototype.setValue = function ( gl, value, textures ) {\n\n\tconst seq = this.seq;\n\n\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\tconst u = seq[ i ];\n\t\tu.setValue( gl, value[ u.id ], textures );\n\n\t}\n\n};\n\n// --- Top-level ---\n\n// Parser - builds up the property tree from the path strings\n\nconst RePathPart = /(\\w+)(\\])?(\\[|\\.)?/g;\n\n// extracts\n// \t- the identifier (member name or array index)\n// - followed by an optional right bracket (found when array index)\n// - followed by an optional left bracket or dot (type of subscript)\n//\n// Note: These portions can be read in a non-overlapping fashion and\n// allow straightforward parsing of the hierarchy that WebGL encodes\n// in the uniform names.\n\nfunction addUniform( container, uniformObject ) {\n\n\tcontainer.seq.push( uniformObject );\n\tcontainer.map[ uniformObject.id ] = uniformObject;\n\n}\n\nfunction parseUniform( activeInfo, addr, container ) {\n\n\tconst path = activeInfo.name,\n\t\tpathLength = path.length;\n\n\t// reset RegExp object, because of the early exit of a previous run\n\tRePathPart.lastIndex = 0;\n\n\twhile ( true ) {\n\n\t\tconst match = RePathPart.exec( path ),\n\t\t\tmatchEnd = RePathPart.lastIndex;\n\n\t\tlet id = match[ 1 ];\n\t\tconst idIsIndex = match[ 2 ] === ']',\n\t\t\tsubscript = match[ 3 ];\n\n\t\tif ( idIsIndex ) id = id | 0; // convert to integer\n\n\t\tif ( subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength ) {\n\n\t\t\t// bare name or \"pure\" bottom-level array \"[0]\" suffix\n\n\t\t\taddUniform( container, subscript === undefined ?\n\t\t\t\tnew SingleUniform( id, activeInfo, addr ) :\n\t\t\t\tnew PureArrayUniform( id, activeInfo, addr ) );\n\n\t\t\tbreak;\n\n\t\t} else {\n\n\t\t\t// step into inner node / create it in case it doesn't exist\n\n\t\t\tconst map = container.map;\n\t\t\tlet next = map[ id ];\n\n\t\t\tif ( next === undefined ) {\n\n\t\t\t\tnext = new StructuredUniform( id );\n\t\t\t\taddUniform( container, next );\n\n\t\t\t}\n\n\t\t\tcontainer = next;\n\n\t\t}\n\n\t}\n\n}\n\n// Root Container\n\nfunction WebGLUniforms( gl, program ) {\n\n\tthis.seq = [];\n\tthis.map = {};\n\n\tconst n = gl.getProgramParameter( program, 35718 );\n\n\tfor ( let i = 0; i < n; ++ i ) {\n\n\t\tconst info = gl.getActiveUniform( program, i ),\n\t\t\taddr = gl.getUniformLocation( program, info.name );\n\n\t\tparseUniform( info, addr, this );\n\n\t}\n\n}\n\nWebGLUniforms.prototype.setValue = function ( gl, name, value, textures ) {\n\n\tconst u = this.map[ name ];\n\n\tif ( u !== undefined ) u.setValue( gl, value, textures );\n\n};\n\nWebGLUniforms.prototype.setOptional = function ( gl, object, name ) {\n\n\tconst v = object[ name ];\n\n\tif ( v !== undefined ) this.setValue( gl, name, v );\n\n};\n\n\n// Static interface\n\nWebGLUniforms.upload = function ( gl, seq, values, textures ) {\n\n\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\tconst u = seq[ i ],\n\t\t\tv = values[ u.id ];\n\n\t\tif ( v.needsUpdate !== false ) {\n\n\t\t\t// note: always updating when .needsUpdate is undefined\n\t\t\tu.setValue( gl, v.value, textures );\n\n\t\t}\n\n\t}\n\n};\n\nWebGLUniforms.seqWithValue = function ( seq, values ) {\n\n\tconst r = [];\n\n\tfor ( let i = 0, n = seq.length; i !== n; ++ i ) {\n\n\t\tconst u = seq[ i ];\n\t\tif ( u.id in values ) r.push( u );\n\n\t}\n\n\treturn r;\n\n};\n\nfunction WebGLShader( gl, type, string ) {\n\n\tconst shader = gl.createShader( type );\n\n\tgl.shaderSource( shader, string );\n\tgl.compileShader( shader );\n\n\treturn shader;\n\n}\n\nlet programIdCount = 0;\n\nfunction addLineNumbers( string ) {\n\n\tconst lines = string.split( '\\n' );\n\n\tfor ( let i = 0; i < lines.length; i ++ ) {\n\n\t\tlines[ i ] = ( i + 1 ) + ': ' + lines[ i ];\n\n\t}\n\n\treturn lines.join( '\\n' );\n\n}\n\nfunction getEncodingComponents( encoding ) {\n\n\tswitch ( encoding ) {\n\n\t\tcase LinearEncoding:\n\t\t\treturn [ 'Linear', '( value )' ];\n\t\tcase sRGBEncoding:\n\t\t\treturn [ 'sRGB', '( value )' ];\n\t\tcase RGBEEncoding:\n\t\t\treturn [ 'RGBE', '( value )' ];\n\t\tcase RGBM7Encoding:\n\t\t\treturn [ 'RGBM', '( value, 7.0 )' ];\n\t\tcase RGBM16Encoding:\n\t\t\treturn [ 'RGBM', '( value, 16.0 )' ];\n\t\tcase RGBDEncoding:\n\t\t\treturn [ 'RGBD', '( value, 256.0 )' ];\n\t\tcase GammaEncoding:\n\t\t\treturn [ 'Gamma', '( value, float( GAMMA_FACTOR ) )' ];\n\t\tcase LogLuvEncoding:\n\t\t\treturn [ 'LogLuv', '( value )' ];\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Unsupported encoding:', encoding );\n\t\t\treturn [ 'Linear', '( value )' ];\n\n\t}\n\n}\n\nfunction getShaderErrors( gl, shader, type ) {\n\n\tconst status = gl.getShaderParameter( shader, 35713 );\n\tconst log = gl.getShaderInfoLog( shader ).trim();\n\n\tif ( status && log === '' ) return '';\n\n\t// --enable-privileged-webgl-extension\n\t// console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );\n\n\tconst source = gl.getShaderSource( shader );\n\n\treturn 'THREE.WebGLShader: gl.getShaderInfoLog() ' + type + '\\n' + log + addLineNumbers( source );\n\n}\n\nfunction getTexelDecodingFunction( functionName, encoding ) {\n\n\tconst components = getEncodingComponents( encoding );\n\treturn 'vec4 ' + functionName + '( vec4 value ) { return ' + components[ 0 ] + 'ToLinear' + components[ 1 ] + '; }';\n\n}\n\nfunction getTexelEncodingFunction( functionName, encoding ) {\n\n\tconst components = getEncodingComponents( encoding );\n\treturn 'vec4 ' + functionName + '( vec4 value ) { return LinearTo' + components[ 0 ] + components[ 1 ] + '; }';\n\n}\n\nfunction getToneMappingFunction( functionName, toneMapping ) {\n\n\tlet toneMappingName;\n\n\tswitch ( toneMapping ) {\n\n\t\tcase LinearToneMapping:\n\t\t\ttoneMappingName = 'Linear';\n\t\t\tbreak;\n\n\t\tcase ReinhardToneMapping:\n\t\t\ttoneMappingName = 'Reinhard';\n\t\t\tbreak;\n\n\t\tcase CineonToneMapping:\n\t\t\ttoneMappingName = 'OptimizedCineon';\n\t\t\tbreak;\n\n\t\tcase ACESFilmicToneMapping:\n\t\t\ttoneMappingName = 'ACESFilmic';\n\t\t\tbreak;\n\n\t\tcase CustomToneMapping:\n\t\t\ttoneMappingName = 'Custom';\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tconsole.warn( 'THREE.WebGLProgram: Unsupported toneMapping:', toneMapping );\n\t\t\ttoneMappingName = 'Linear';\n\n\t}\n\n\treturn 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }';\n\n}\n\nfunction generateExtensions( parameters ) {\n\n\tconst chunks = [\n\t\t( parameters.extensionDerivatives || parameters.envMapCubeUV || parameters.bumpMap || parameters.tangentSpaceNormalMap || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ) ? '#extension GL_OES_standard_derivatives : enable' : '',\n\t\t( parameters.extensionFragDepth || parameters.logarithmicDepthBuffer ) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '',\n\t\t( parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ) ? '#extension GL_EXT_draw_buffers : require' : '',\n\t\t( parameters.extensionShaderTextureLOD || parameters.envMap || parameters.transmission > 0.0 ) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : ''\n\t];\n\n\treturn chunks.filter( filterEmptyLine ).join( '\\n' );\n\n}\n\nfunction generateDefines( defines ) {\n\n\tconst chunks = [];\n\n\tfor ( const name in defines ) {\n\n\t\tconst value = defines[ name ];\n\n\t\tif ( value === false ) continue;\n\n\t\tchunks.push( '#define ' + name + ' ' + value );\n\n\t}\n\n\treturn chunks.join( '\\n' );\n\n}\n\nfunction fetchAttributeLocations( gl, program ) {\n\n\tconst attributes = {};\n\n\tconst n = gl.getProgramParameter( program, 35721 );\n\n\tfor ( let i = 0; i < n; i ++ ) {\n\n\t\tconst info = gl.getActiveAttrib( program, i );\n\t\tconst name = info.name;\n\n\t\t// console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i );\n\n\t\tattributes[ name ] = gl.getAttribLocation( program, name );\n\n\t}\n\n\treturn attributes;\n\n}\n\nfunction filterEmptyLine( string ) {\n\n\treturn string !== '';\n\n}\n\nfunction replaceLightNums( string, parameters ) {\n\n\treturn string\n\t\t.replace( /NUM_DIR_LIGHTS/g, parameters.numDirLights )\n\t\t.replace( /NUM_SPOT_LIGHTS/g, parameters.numSpotLights )\n\t\t.replace( /NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights )\n\t\t.replace( /NUM_POINT_LIGHTS/g, parameters.numPointLights )\n\t\t.replace( /NUM_HEMI_LIGHTS/g, parameters.numHemiLights )\n\t\t.replace( /NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows )\n\t\t.replace( /NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows )\n\t\t.replace( /NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows );\n\n}\n\nfunction replaceClippingPlaneNums( string, parameters ) {\n\n\treturn string\n\t\t.replace( /NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes )\n\t\t.replace( /UNION_CLIPPING_PLANES/g, ( parameters.numClippingPlanes - parameters.numClipIntersection ) );\n\n}\n\n// Resolve Includes\n\nconst includePattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\n\nfunction resolveIncludes( string ) {\n\n\treturn string.replace( includePattern, includeReplacer );\n\n}\n\nfunction includeReplacer( match, include ) {\n\n\tconst string = ShaderChunk[ include ];\n\n\tif ( string === undefined ) {\n\n\t\tthrow new Error( 'Can not resolve #include <' + include + '>' );\n\n\t}\n\n\treturn resolveIncludes( string );\n\n}\n\n// Unroll Loops\n\nconst deprecatedUnrollLoopPattern = /#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g;\nconst unrollLoopPattern = /#pragma unroll_loop_start\\s+for\\s*\\(\\s*int\\s+i\\s*=\\s*(\\d+)\\s*;\\s*i\\s*<\\s*(\\d+)\\s*;\\s*i\\s*\\+\\+\\s*\\)\\s*{([\\s\\S]+?)}\\s+#pragma unroll_loop_end/g;\n\nfunction unrollLoops( string ) {\n\n\treturn string\n\t\t.replace( unrollLoopPattern, loopReplacer )\n\t\t.replace( deprecatedUnrollLoopPattern, deprecatedLoopReplacer );\n\n}\n\nfunction deprecatedLoopReplacer( match, start, end, snippet ) {\n\n\tconsole.warn( 'WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.' );\n\treturn loopReplacer( match, start, end, snippet );\n\n}\n\nfunction loopReplacer( match, start, end, snippet ) {\n\n\tlet string = '';\n\n\tfor ( let i = parseInt( start ); i < parseInt( end ); i ++ ) {\n\n\t\tstring += snippet\n\t\t\t.replace( /\\[\\s*i\\s*\\]/g, '[ ' + i + ' ]' )\n\t\t\t.replace( /UNROLLED_LOOP_INDEX/g, i );\n\n\t}\n\n\treturn string;\n\n}\n\n//\n\nfunction generatePrecision( parameters ) {\n\n\tlet precisionstring = 'precision ' + parameters.precision + ' float;\\nprecision ' + parameters.precision + ' int;';\n\n\tif ( parameters.precision === 'highp' ) {\n\n\t\tprecisionstring += '\\n#define HIGH_PRECISION';\n\n\t} else if ( parameters.precision === 'mediump' ) {\n\n\t\tprecisionstring += '\\n#define MEDIUM_PRECISION';\n\n\t} else if ( parameters.precision === 'lowp' ) {\n\n\t\tprecisionstring += '\\n#define LOW_PRECISION';\n\n\t}\n\n\treturn precisionstring;\n\n}\n\nfunction generateShadowMapTypeDefine( parameters ) {\n\n\tlet shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC';\n\n\tif ( parameters.shadowMapType === PCFShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF';\n\n\t} else if ( parameters.shadowMapType === PCFSoftShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT';\n\n\t} else if ( parameters.shadowMapType === VSMShadowMap ) {\n\n\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM';\n\n\t}\n\n\treturn shadowMapTypeDefine;\n\n}\n\nfunction generateEnvMapTypeDefine( parameters ) {\n\n\tlet envMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.envMapMode ) {\n\n\t\t\tcase CubeReflectionMapping:\n\t\t\tcase CubeRefractionMapping:\n\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\t\t\t\tbreak;\n\n\t\t\tcase CubeUVReflectionMapping:\n\t\t\tcase CubeUVRefractionMapping:\n\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapTypeDefine;\n\n}\n\nfunction generateEnvMapModeDefine( parameters ) {\n\n\tlet envMapModeDefine = 'ENVMAP_MODE_REFLECTION';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.envMapMode ) {\n\n\t\t\tcase CubeRefractionMapping:\n\t\t\tcase CubeUVRefractionMapping:\n\n\t\t\t\tenvMapModeDefine = 'ENVMAP_MODE_REFRACTION';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapModeDefine;\n\n}\n\nfunction generateEnvMapBlendingDefine( parameters ) {\n\n\tlet envMapBlendingDefine = 'ENVMAP_BLENDING_NONE';\n\n\tif ( parameters.envMap ) {\n\n\t\tswitch ( parameters.combine ) {\n\n\t\t\tcase MultiplyOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY';\n\t\t\t\tbreak;\n\n\t\t\tcase MixOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MIX';\n\t\t\t\tbreak;\n\n\t\t\tcase AddOperation:\n\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_ADD';\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n\treturn envMapBlendingDefine;\n\n}\n\nfunction WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {\n\n\tconst gl = renderer.getContext();\n\n\tconst defines = parameters.defines;\n\n\tlet vertexShader = parameters.vertexShader;\n\tlet fragmentShader = parameters.fragmentShader;\n\n\tconst shadowMapTypeDefine = generateShadowMapTypeDefine( parameters );\n\tconst envMapTypeDefine = generateEnvMapTypeDefine( parameters );\n\tconst envMapModeDefine = generateEnvMapModeDefine( parameters );\n\tconst envMapBlendingDefine = generateEnvMapBlendingDefine( parameters );\n\n\n\tconst gammaFactorDefine = ( renderer.gammaFactor > 0 ) ? renderer.gammaFactor : 1.0;\n\n\tconst customExtensions = parameters.isWebGL2 ? '' : generateExtensions( parameters );\n\n\tconst customDefines = generateDefines( defines );\n\n\tconst program = gl.createProgram();\n\n\tlet prefixVertex, prefixFragment;\n\tlet versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\\n' : '';\n\n\tif ( parameters.isRawShaderMaterial ) {\n\n\t\tprefixVertex = [\n\n\t\t\tcustomDefines\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tif ( prefixVertex.length > 0 ) {\n\n\t\t\tprefixVertex += '\\n';\n\n\t\t}\n\n\t\tprefixFragment = [\n\n\t\t\tcustomExtensions,\n\t\t\tcustomDefines\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tif ( prefixFragment.length > 0 ) {\n\n\t\t\tprefixFragment += '\\n';\n\n\t\t}\n\n\t} else {\n\n\t\tprefixVertex = [\n\n\t\t\tgeneratePrecision( parameters ),\n\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines,\n\n\t\t\tparameters.instancing ? '#define USE_INSTANCING' : '',\n\t\t\tparameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '',\n\n\t\t\tparameters.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '',\n\n\t\t\t'#define GAMMA_FACTOR ' + gammaFactorDefine,\n\n\t\t\t'#define MAX_BONES ' + parameters.maxBones,\n\t\t\t( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '',\n\t\t\t( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '',\n\n\t\t\tparameters.map ? '#define USE_MAP' : '',\n\t\t\tparameters.envMap ? '#define USE_ENVMAP' : '',\n\t\t\tparameters.envMap ? '#define ' + envMapModeDefine : '',\n\t\t\tparameters.lightMap ? '#define USE_LIGHTMAP' : '',\n\t\t\tparameters.aoMap ? '#define USE_AOMAP' : '',\n\t\t\tparameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '',\n\t\t\tparameters.bumpMap ? '#define USE_BUMPMAP' : '',\n\t\t\tparameters.normalMap ? '#define USE_NORMALMAP' : '',\n\t\t\t( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '',\n\t\t\t( parameters.normalMap && parameters.tangentSpaceNormalMap ) ? '#define TANGENTSPACE_NORMALMAP' : '',\n\n\t\t\tparameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '',\n\t\t\tparameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '',\n\t\t\tparameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',\n\t\t\tparameters.displacementMap && parameters.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '',\n\t\t\tparameters.specularMap ? '#define USE_SPECULARMAP' : '',\n\t\t\tparameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',\n\t\t\tparameters.metalnessMap ? '#define USE_METALNESSMAP' : '',\n\t\t\tparameters.alphaMap ? '#define USE_ALPHAMAP' : '',\n\t\t\tparameters.transmission ? '#define USE_TRANSMISSION' : '',\n\t\t\tparameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',\n\t\t\tparameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',\n\n\t\t\tparameters.vertexTangents ? '#define USE_TANGENT' : '',\n\t\t\tparameters.vertexColors ? '#define USE_COLOR' : '',\n\t\t\tparameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',\n\t\t\tparameters.vertexUvs ? '#define USE_UV' : '',\n\t\t\tparameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '',\n\n\t\t\tparameters.flatShading ? '#define FLAT_SHADED' : '',\n\n\t\t\tparameters.skinning ? '#define USE_SKINNING' : '',\n\t\t\tparameters.useVertexTexture ? '#define BONE_TEXTURE' : '',\n\n\t\t\tparameters.morphTargets ? '#define USE_MORPHTARGETS' : '',\n\t\t\tparameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '',\n\t\t\tparameters.doubleSided ? '#define DOUBLE_SIDED' : '',\n\t\t\tparameters.flipSided ? '#define FLIP_SIDED' : '',\n\n\t\t\tparameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '',\n\t\t\tparameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '',\n\n\t\t\tparameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '',\n\n\t\t\tparameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',\n\t\t\t( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',\n\n\t\t\t'uniform mat4 modelMatrix;',\n\t\t\t'uniform mat4 modelViewMatrix;',\n\t\t\t'uniform mat4 projectionMatrix;',\n\t\t\t'uniform mat4 viewMatrix;',\n\t\t\t'uniform mat3 normalMatrix;',\n\t\t\t'uniform vec3 cameraPosition;',\n\t\t\t'uniform bool isOrthographic;',\n\n\t\t\t'#ifdef USE_INSTANCING',\n\n\t\t\t'\tattribute mat4 instanceMatrix;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_INSTANCING_COLOR',\n\n\t\t\t'\tattribute vec3 instanceColor;',\n\n\t\t\t'#endif',\n\n\t\t\t'attribute vec3 position;',\n\t\t\t'attribute vec3 normal;',\n\t\t\t'attribute vec2 uv;',\n\n\t\t\t'#ifdef USE_TANGENT',\n\n\t\t\t'\tattribute vec4 tangent;',\n\n\t\t\t'#endif',\n\n\t\t\t'#if defined( USE_COLOR_ALPHA )',\n\n\t\t\t'\tattribute vec4 color;',\n\n\t\t\t'#elif defined( USE_COLOR )',\n\n\t\t\t'\tattribute vec3 color;',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_MORPHTARGETS',\n\n\t\t\t'\tattribute vec3 morphTarget0;',\n\t\t\t'\tattribute vec3 morphTarget1;',\n\t\t\t'\tattribute vec3 morphTarget2;',\n\t\t\t'\tattribute vec3 morphTarget3;',\n\n\t\t\t'\t#ifdef USE_MORPHNORMALS',\n\n\t\t\t'\t\tattribute vec3 morphNormal0;',\n\t\t\t'\t\tattribute vec3 morphNormal1;',\n\t\t\t'\t\tattribute vec3 morphNormal2;',\n\t\t\t'\t\tattribute vec3 morphNormal3;',\n\n\t\t\t'\t#else',\n\n\t\t\t'\t\tattribute vec3 morphTarget4;',\n\t\t\t'\t\tattribute vec3 morphTarget5;',\n\t\t\t'\t\tattribute vec3 morphTarget6;',\n\t\t\t'\t\tattribute vec3 morphTarget7;',\n\n\t\t\t'\t#endif',\n\n\t\t\t'#endif',\n\n\t\t\t'#ifdef USE_SKINNING',\n\n\t\t\t'\tattribute vec4 skinIndex;',\n\t\t\t'\tattribute vec4 skinWeight;',\n\n\t\t\t'#endif',\n\n\t\t\t'\\n'\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t\tprefixFragment = [\n\n\t\t\tcustomExtensions,\n\n\t\t\tgeneratePrecision( parameters ),\n\n\t\t\t'#define SHADER_NAME ' + parameters.shaderName,\n\n\t\t\tcustomDefines,\n\n\t\t\tparameters.alphaTest ? '#define ALPHATEST ' + parameters.alphaTest + ( parameters.alphaTest % 1 ? '' : '.0' ) : '', // add '.0' if integer\n\n\t\t\t'#define GAMMA_FACTOR ' + gammaFactorDefine,\n\n\t\t\t( parameters.useFog && parameters.fog ) ? '#define USE_FOG' : '',\n\t\t\t( parameters.useFog && parameters.fogExp2 ) ? '#define FOG_EXP2' : '',\n\n\t\t\tparameters.map ? '#define USE_MAP' : '',\n\t\t\tparameters.matcap ? '#define USE_MATCAP' : '',\n\t\t\tparameters.envMap ? '#define USE_ENVMAP' : '',\n\t\t\tparameters.envMap ? '#define ' + envMapTypeDefine : '',\n\t\t\tparameters.envMap ? '#define ' + envMapModeDefine : '',\n\t\t\tparameters.envMap ? '#define ' + envMapBlendingDefine : '',\n\t\t\tparameters.lightMap ? '#define USE_LIGHTMAP' : '',\n\t\t\tparameters.aoMap ? '#define USE_AOMAP' : '',\n\t\t\tparameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '',\n\t\t\tparameters.bumpMap ? '#define USE_BUMPMAP' : '',\n\t\t\tparameters.normalMap ? '#define USE_NORMALMAP' : '',\n\t\t\t( parameters.normalMap && parameters.objectSpaceNormalMap ) ? '#define OBJECTSPACE_NORMALMAP' : '',\n\t\t\t( parameters.normalMap && parameters.tangentSpaceNormalMap ) ? '#define TANGENTSPACE_NORMALMAP' : '',\n\t\t\tparameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '',\n\t\t\tparameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '',\n\t\t\tparameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '',\n\t\t\tparameters.specularMap ? '#define USE_SPECULARMAP' : '',\n\t\t\tparameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '',\n\t\t\tparameters.metalnessMap ? '#define USE_METALNESSMAP' : '',\n\t\t\tparameters.alphaMap ? '#define USE_ALPHAMAP' : '',\n\n\t\t\tparameters.sheen ? '#define USE_SHEEN' : '',\n\t\t\tparameters.transmission ? '#define USE_TRANSMISSION' : '',\n\t\t\tparameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '',\n\t\t\tparameters.thicknessMap ? '#define USE_THICKNESSMAP' : '',\n\n\t\t\tparameters.vertexTangents ? '#define USE_TANGENT' : '',\n\t\t\tparameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '',\n\t\t\tparameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',\n\t\t\tparameters.vertexUvs ? '#define USE_UV' : '',\n\t\t\tparameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '',\n\n\t\t\tparameters.gradientMap ? '#define USE_GRADIENTMAP' : '',\n\n\t\t\tparameters.flatShading ? '#define FLAT_SHADED' : '',\n\n\t\t\tparameters.doubleSided ? '#define DOUBLE_SIDED' : '',\n\t\t\tparameters.flipSided ? '#define FLIP_SIDED' : '',\n\n\t\t\tparameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '',\n\t\t\tparameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '',\n\n\t\t\tparameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '',\n\n\t\t\tparameters.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '',\n\n\t\t\tparameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '',\n\t\t\t( parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ) ? '#define USE_LOGDEPTHBUF_EXT' : '',\n\n\t\t\t( ( parameters.extensionShaderTextureLOD || parameters.envMap ) && parameters.rendererExtensionShaderTextureLod ) ? '#define TEXTURE_LOD_EXT' : '',\n\n\t\t\t'uniform mat4 viewMatrix;',\n\t\t\t'uniform vec3 cameraPosition;',\n\t\t\t'uniform bool isOrthographic;',\n\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? '#define TONE_MAPPING' : '',\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? ShaderChunk[ 'tonemapping_pars_fragment' ] : '', // this code is required here because it is used by the toneMapping() function defined below\n\t\t\t( parameters.toneMapping !== NoToneMapping ) ? getToneMappingFunction( 'toneMapping', parameters.toneMapping ) : '',\n\n\t\t\tparameters.dithering ? '#define DITHERING' : '',\n\n\t\t\tShaderChunk[ 'encodings_pars_fragment' ], // this code is required here because it is used by the various encoding/decoding function defined below\n\t\t\tparameters.map ? getTexelDecodingFunction( 'mapTexelToLinear', parameters.mapEncoding ) : '',\n\t\t\tparameters.matcap ? getTexelDecodingFunction( 'matcapTexelToLinear', parameters.matcapEncoding ) : '',\n\t\t\tparameters.envMap ? getTexelDecodingFunction( 'envMapTexelToLinear', parameters.envMapEncoding ) : '',\n\t\t\tparameters.emissiveMap ? getTexelDecodingFunction( 'emissiveMapTexelToLinear', parameters.emissiveMapEncoding ) : '',\n\t\t\tparameters.lightMap ? getTexelDecodingFunction( 'lightMapTexelToLinear', parameters.lightMapEncoding ) : '',\n\t\t\tgetTexelEncodingFunction( 'linearToOutputTexel', parameters.outputEncoding ),\n\n\t\t\tparameters.depthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '',\n\n\t\t\t'\\n'\n\n\t\t].filter( filterEmptyLine ).join( '\\n' );\n\n\t}\n\n\tvertexShader = resolveIncludes( vertexShader );\n\tvertexShader = replaceLightNums( vertexShader, parameters );\n\tvertexShader = replaceClippingPlaneNums( vertexShader, parameters );\n\n\tfragmentShader = resolveIncludes( fragmentShader );\n\tfragmentShader = replaceLightNums( fragmentShader, parameters );\n\tfragmentShader = replaceClippingPlaneNums( fragmentShader, parameters );\n\n\tvertexShader = unrollLoops( vertexShader );\n\tfragmentShader = unrollLoops( fragmentShader );\n\n\tif ( parameters.isWebGL2 && parameters.isRawShaderMaterial !== true ) {\n\n\t\t// GLSL 3.0 conversion for built-in materials and ShaderMaterial\n\n\t\tversionString = '#version 300 es\\n';\n\n\t\tprefixVertex = [\n\t\t\t'#define attribute in',\n\t\t\t'#define varying out',\n\t\t\t'#define texture2D texture'\n\t\t].join( '\\n' ) + '\\n' + prefixVertex;\n\n\t\tprefixFragment = [\n\t\t\t'#define varying in',\n\t\t\t( parameters.glslVersion === GLSL3 ) ? '' : 'out highp vec4 pc_fragColor;',\n\t\t\t( parameters.glslVersion === GLSL3 ) ? '' : '#define gl_FragColor pc_fragColor',\n\t\t\t'#define gl_FragDepthEXT gl_FragDepth',\n\t\t\t'#define texture2D texture',\n\t\t\t'#define textureCube texture',\n\t\t\t'#define texture2DProj textureProj',\n\t\t\t'#define texture2DLodEXT textureLod',\n\t\t\t'#define texture2DProjLodEXT textureProjLod',\n\t\t\t'#define textureCubeLodEXT textureLod',\n\t\t\t'#define texture2DGradEXT textureGrad',\n\t\t\t'#define texture2DProjGradEXT textureProjGrad',\n\t\t\t'#define textureCubeGradEXT textureGrad'\n\t\t].join( '\\n' ) + '\\n' + prefixFragment;\n\n\t}\n\n\tconst vertexGlsl = versionString + prefixVertex + vertexShader;\n\tconst fragmentGlsl = versionString + prefixFragment + fragmentShader;\n\n\t// console.log( '*VERTEX*', vertexGlsl );\n\t// console.log( '*FRAGMENT*', fragmentGlsl );\n\n\tconst glVertexShader = WebGLShader( gl, 35633, vertexGlsl );\n\tconst glFragmentShader = WebGLShader( gl, 35632, fragmentGlsl );\n\n\tgl.attachShader( program, glVertexShader );\n\tgl.attachShader( program, glFragmentShader );\n\n\t// Force a particular attribute to index 0.\n\n\tif ( parameters.index0AttributeName !== undefined ) {\n\n\t\tgl.bindAttribLocation( program, 0, parameters.index0AttributeName );\n\n\t} else if ( parameters.morphTargets === true ) {\n\n\t\t// programs with morphTargets displace position out of attribute 0\n\t\tgl.bindAttribLocation( program, 0, 'position' );\n\n\t}\n\n\tgl.linkProgram( program );\n\n\t// check for link errors\n\tif ( renderer.debug.checkShaderErrors ) {\n\n\t\tconst programLog = gl.getProgramInfoLog( program ).trim();\n\t\tconst vertexLog = gl.getShaderInfoLog( glVertexShader ).trim();\n\t\tconst fragmentLog = gl.getShaderInfoLog( glFragmentShader ).trim();\n\n\t\tlet runnable = true;\n\t\tlet haveDiagnostics = true;\n\n\t\tif ( gl.getProgramParameter( program, 35714 ) === false ) {\n\n\t\t\trunnable = false;\n\n\t\t\tconst vertexErrors = getShaderErrors( gl, glVertexShader, 'vertex' );\n\t\t\tconst fragmentErrors = getShaderErrors( gl, glFragmentShader, 'fragment' );\n\n\t\t\tconsole.error( 'THREE.WebGLProgram: shader error: ', gl.getError(), '35715', gl.getProgramParameter( program, 35715 ), 'gl.getProgramInfoLog', programLog, vertexErrors, fragmentErrors );\n\n\t\t} else if ( programLog !== '' ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLProgram: gl.getProgramInfoLog()', programLog );\n\n\t\t} else if ( vertexLog === '' || fragmentLog === '' ) {\n\n\t\t\thaveDiagnostics = false;\n\n\t\t}\n\n\t\tif ( haveDiagnostics ) {\n\n\t\t\tthis.diagnostics = {\n\n\t\t\t\trunnable: runnable,\n\n\t\t\t\tprogramLog: programLog,\n\n\t\t\t\tvertexShader: {\n\n\t\t\t\t\tlog: vertexLog,\n\t\t\t\t\tprefix: prefixVertex\n\n\t\t\t\t},\n\n\t\t\t\tfragmentShader: {\n\n\t\t\t\t\tlog: fragmentLog,\n\t\t\t\t\tprefix: prefixFragment\n\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t}\n\n\t}\n\n\t// Clean up\n\n\t// Crashes in iOS9 and iOS10. #18402\n\t// gl.detachShader( program, glVertexShader );\n\t// gl.detachShader( program, glFragmentShader );\n\n\tgl.deleteShader( glVertexShader );\n\tgl.deleteShader( glFragmentShader );\n\n\t// set up caching for uniform locations\n\n\tlet cachedUniforms;\n\n\tthis.getUniforms = function () {\n\n\t\tif ( cachedUniforms === undefined ) {\n\n\t\t\tcachedUniforms = new WebGLUniforms( gl, program );\n\n\t\t}\n\n\t\treturn cachedUniforms;\n\n\t};\n\n\t// set up caching for attribute locations\n\n\tlet cachedAttributes;\n\n\tthis.getAttributes = function () {\n\n\t\tif ( cachedAttributes === undefined ) {\n\n\t\t\tcachedAttributes = fetchAttributeLocations( gl, program );\n\n\t\t}\n\n\t\treturn cachedAttributes;\n\n\t};\n\n\t// free resource\n\n\tthis.destroy = function () {\n\n\t\tbindingStates.releaseStatesOfProgram( this );\n\n\t\tgl.deleteProgram( program );\n\t\tthis.program = undefined;\n\n\t};\n\n\t//\n\n\tthis.name = parameters.shaderName;\n\tthis.id = programIdCount ++;\n\tthis.cacheKey = cacheKey;\n\tthis.usedTimes = 1;\n\tthis.program = program;\n\tthis.vertexShader = glVertexShader;\n\tthis.fragmentShader = glFragmentShader;\n\n\treturn this;\n\n}\n\nfunction WebGLPrograms( renderer, cubemaps, extensions, capabilities, bindingStates, clipping ) {\n\n\tconst programs = [];\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\tconst logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;\n\tconst floatVertexTextures = capabilities.floatVertexTextures;\n\tconst maxVertexUniforms = capabilities.maxVertexUniforms;\n\tconst vertexTextures = capabilities.vertexTextures;\n\n\tlet precision = capabilities.precision;\n\n\tconst shaderIDs = {\n\t\tMeshDepthMaterial: 'depth',\n\t\tMeshDistanceMaterial: 'distanceRGBA',\n\t\tMeshNormalMaterial: 'normal',\n\t\tMeshBasicMaterial: 'basic',\n\t\tMeshLambertMaterial: 'lambert',\n\t\tMeshPhongMaterial: 'phong',\n\t\tMeshToonMaterial: 'toon',\n\t\tMeshStandardMaterial: 'physical',\n\t\tMeshPhysicalMaterial: 'physical',\n\t\tMeshMatcapMaterial: 'matcap',\n\t\tLineBasicMaterial: 'basic',\n\t\tLineDashedMaterial: 'dashed',\n\t\tPointsMaterial: 'points',\n\t\tShadowMaterial: 'shadow',\n\t\tSpriteMaterial: 'sprite'\n\t};\n\n\tconst parameterNames = [\n\t\t'precision', 'isWebGL2', 'supportsVertexTextures', 'outputEncoding', 'instancing', 'instancingColor',\n\t\t'map', 'mapEncoding', 'matcap', 'matcapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'envMapCubeUV',\n\t\t'lightMap', 'lightMapEncoding', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap', 'objectSpaceNormalMap', 'tangentSpaceNormalMap', 'clearcoatMap', 'clearcoatRoughnessMap', 'clearcoatNormalMap', 'displacementMap', 'specularMap',\n\t\t'roughnessMap', 'metalnessMap', 'gradientMap',\n\t\t'alphaMap', 'combine', 'vertexColors', 'vertexAlphas', 'vertexTangents', 'vertexUvs', 'uvsVertexOnly', 'fog', 'useFog', 'fogExp2',\n\t\t'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning',\n\t\t'maxBones', 'useVertexTexture', 'morphTargets', 'morphNormals', 'premultipliedAlpha',\n\t\t'numDirLights', 'numPointLights', 'numSpotLights', 'numHemiLights', 'numRectAreaLights',\n\t\t'numDirLightShadows', 'numPointLightShadows', 'numSpotLightShadows',\n\t\t'shadowMapEnabled', 'shadowMapType', 'toneMapping', 'physicallyCorrectLights',\n\t\t'alphaTest', 'doubleSided', 'flipSided', 'numClippingPlanes', 'numClipIntersection', 'depthPacking', 'dithering',\n\t\t'sheen', 'transmission', 'transmissionMap', 'thicknessMap'\n\t];\n\n\tfunction getMaxBones( object ) {\n\n\t\tconst skeleton = object.skeleton;\n\t\tconst bones = skeleton.bones;\n\n\t\tif ( floatVertexTextures ) {\n\n\t\t\treturn 1024;\n\n\t\t} else {\n\n\t\t\t// default for when object is not specified\n\t\t\t// ( for example when prebuilding shader to be used with multiple objects )\n\t\t\t//\n\t\t\t// - leave some extra space for other uniforms\n\t\t\t// - limit here is ANGLE's 254 max uniform vectors\n\t\t\t// (up to 54 should be safe)\n\n\t\t\tconst nVertexUniforms = maxVertexUniforms;\n\t\t\tconst nVertexMatrices = Math.floor( ( nVertexUniforms - 20 ) / 4 );\n\n\t\t\tconst maxBones = Math.min( nVertexMatrices, bones.length );\n\n\t\t\tif ( maxBones < bones.length ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Skeleton has ' + bones.length + ' bones. This GPU supports ' + maxBones + '.' );\n\t\t\t\treturn 0;\n\n\t\t\t}\n\n\t\t\treturn maxBones;\n\n\t\t}\n\n\t}\n\n\tfunction getTextureEncodingFromMap( map ) {\n\n\t\tlet encoding;\n\n\t\tif ( map && map.isTexture ) {\n\n\t\t\tencoding = map.encoding;\n\n\t\t} else if ( map && map.isWebGLRenderTarget ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLPrograms.getTextureEncodingFromMap: don\\'t use render targets as textures. Use their .texture property instead.' );\n\t\t\tencoding = map.texture.encoding;\n\n\t\t} else {\n\n\t\t\tencoding = LinearEncoding;\n\n\t\t}\n\n\t\treturn encoding;\n\n\t}\n\n\tfunction getParameters( material, lights, shadows, scene, object ) {\n\n\t\tconst fog = scene.fog;\n\t\tconst environment = material.isMeshStandardMaterial ? scene.environment : null;\n\n\t\tconst envMap = cubemaps.get( material.envMap || environment );\n\n\t\tconst shaderID = shaderIDs[ material.type ];\n\n\t\t// heuristics to create shader parameters according to lights in the scene\n\t\t// (not to blow over maxLights budget)\n\n\t\tconst maxBones = object.isSkinnedMesh ? getMaxBones( object ) : 0;\n\n\t\tif ( material.precision !== null ) {\n\n\t\t\tprecision = capabilities.getMaxPrecision( material.precision );\n\n\t\t\tif ( precision !== material.precision ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tlet vertexShader, fragmentShader;\n\n\t\tif ( shaderID ) {\n\n\t\t\tconst shader = ShaderLib[ shaderID ];\n\n\t\t\tvertexShader = shader.vertexShader;\n\t\t\tfragmentShader = shader.fragmentShader;\n\n\t\t} else {\n\n\t\t\tvertexShader = material.vertexShader;\n\t\t\tfragmentShader = material.fragmentShader;\n\n\t\t}\n\n\t\tconst currentRenderTarget = renderer.getRenderTarget();\n\n\t\tconst parameters = {\n\n\t\t\tisWebGL2: isWebGL2,\n\n\t\t\tshaderID: shaderID,\n\t\t\tshaderName: material.type,\n\n\t\t\tvertexShader: vertexShader,\n\t\t\tfragmentShader: fragmentShader,\n\t\t\tdefines: material.defines,\n\n\t\t\tisRawShaderMaterial: material.isRawShaderMaterial === true,\n\t\t\tglslVersion: material.glslVersion,\n\n\t\t\tprecision: precision,\n\n\t\t\tinstancing: object.isInstancedMesh === true,\n\t\t\tinstancingColor: object.isInstancedMesh === true && object.instanceColor !== null,\n\n\t\t\tsupportsVertexTextures: vertexTextures,\n\t\t\toutputEncoding: ( currentRenderTarget !== null ) ? getTextureEncodingFromMap( currentRenderTarget.texture ) : renderer.outputEncoding,\n\t\t\tmap: !! material.map,\n\t\t\tmapEncoding: getTextureEncodingFromMap( material.map ),\n\t\t\tmatcap: !! material.matcap,\n\t\t\tmatcapEncoding: getTextureEncodingFromMap( material.matcap ),\n\t\t\tenvMap: !! envMap,\n\t\t\tenvMapMode: envMap && envMap.mapping,\n\t\t\tenvMapEncoding: getTextureEncodingFromMap( envMap ),\n\t\t\tenvMapCubeUV: ( !! envMap ) && ( ( envMap.mapping === CubeUVReflectionMapping ) || ( envMap.mapping === CubeUVRefractionMapping ) ),\n\t\t\tlightMap: !! material.lightMap,\n\t\t\tlightMapEncoding: getTextureEncodingFromMap( material.lightMap ),\n\t\t\taoMap: !! material.aoMap,\n\t\t\temissiveMap: !! material.emissiveMap,\n\t\t\temissiveMapEncoding: getTextureEncodingFromMap( material.emissiveMap ),\n\t\t\tbumpMap: !! material.bumpMap,\n\t\t\tnormalMap: !! material.normalMap,\n\t\t\tobjectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap,\n\t\t\ttangentSpaceNormalMap: material.normalMapType === TangentSpaceNormalMap,\n\t\t\tclearcoatMap: !! material.clearcoatMap,\n\t\t\tclearcoatRoughnessMap: !! material.clearcoatRoughnessMap,\n\t\t\tclearcoatNormalMap: !! material.clearcoatNormalMap,\n\t\t\tdisplacementMap: !! material.displacementMap,\n\t\t\troughnessMap: !! material.roughnessMap,\n\t\t\tmetalnessMap: !! material.metalnessMap,\n\t\t\tspecularMap: !! material.specularMap,\n\t\t\talphaMap: !! material.alphaMap,\n\n\t\t\tgradientMap: !! material.gradientMap,\n\n\t\t\tsheen: !! material.sheen,\n\n\t\t\ttransmission: !! material.transmission,\n\t\t\ttransmissionMap: !! material.transmissionMap,\n\t\t\tthicknessMap: !! material.thicknessMap,\n\n\t\t\tcombine: material.combine,\n\n\t\t\tvertexTangents: ( material.normalMap && material.vertexTangents ),\n\t\t\tvertexColors: material.vertexColors,\n\t\t\tvertexAlphas: material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4,\n\t\t\tvertexUvs: !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatMap || !! material.clearcoatRoughnessMap || !! material.clearcoatNormalMap || !! material.displacementMap || !! material.transmissionMap || !! material.thicknessMap,\n\t\t\tuvsVertexOnly: ! ( !! material.map || !! material.bumpMap || !! material.normalMap || !! material.specularMap || !! material.alphaMap || !! material.emissiveMap || !! material.roughnessMap || !! material.metalnessMap || !! material.clearcoatNormalMap || !! material.transmission || !! material.transmissionMap || !! material.thicknessMap ) && !! material.displacementMap,\n\n\t\t\tfog: !! fog,\n\t\t\tuseFog: material.fog,\n\t\t\tfogExp2: ( fog && fog.isFogExp2 ),\n\n\t\t\tflatShading: !! material.flatShading,\n\n\t\t\tsizeAttenuation: material.sizeAttenuation,\n\t\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\n\t\t\tskinning: object.isSkinnedMesh === true && maxBones > 0,\n\t\t\tmaxBones: maxBones,\n\t\t\tuseVertexTexture: floatVertexTextures,\n\n\t\t\tmorphTargets: material.morphTargets,\n\t\t\tmorphNormals: material.morphNormals,\n\n\t\t\tnumDirLights: lights.directional.length,\n\t\t\tnumPointLights: lights.point.length,\n\t\t\tnumSpotLights: lights.spot.length,\n\t\t\tnumRectAreaLights: lights.rectArea.length,\n\t\t\tnumHemiLights: lights.hemi.length,\n\n\t\t\tnumDirLightShadows: lights.directionalShadowMap.length,\n\t\t\tnumPointLightShadows: lights.pointShadowMap.length,\n\t\t\tnumSpotLightShadows: lights.spotShadowMap.length,\n\n\t\t\tnumClippingPlanes: clipping.numPlanes,\n\t\t\tnumClipIntersection: clipping.numIntersection,\n\n\t\t\tdithering: material.dithering,\n\n\t\t\tshadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,\n\t\t\tshadowMapType: renderer.shadowMap.type,\n\n\t\t\ttoneMapping: material.toneMapped ? renderer.toneMapping : NoToneMapping,\n\t\t\tphysicallyCorrectLights: renderer.physicallyCorrectLights,\n\n\t\t\tpremultipliedAlpha: material.premultipliedAlpha,\n\n\t\t\talphaTest: material.alphaTest,\n\t\t\tdoubleSided: material.side === DoubleSide,\n\t\t\tflipSided: material.side === BackSide,\n\n\t\t\tdepthPacking: ( material.depthPacking !== undefined ) ? material.depthPacking : false,\n\n\t\t\tindex0AttributeName: material.index0AttributeName,\n\n\t\t\textensionDerivatives: material.extensions && material.extensions.derivatives,\n\t\t\textensionFragDepth: material.extensions && material.extensions.fragDepth,\n\t\t\textensionDrawBuffers: material.extensions && material.extensions.drawBuffers,\n\t\t\textensionShaderTextureLOD: material.extensions && material.extensions.shaderTextureLOD,\n\n\t\t\trendererExtensionFragDepth: isWebGL2 || extensions.has( 'EXT_frag_depth' ),\n\t\t\trendererExtensionDrawBuffers: isWebGL2 || extensions.has( 'WEBGL_draw_buffers' ),\n\t\t\trendererExtensionShaderTextureLod: isWebGL2 || extensions.has( 'EXT_shader_texture_lod' ),\n\n\t\t\tcustomProgramCacheKey: material.customProgramCacheKey()\n\n\t\t};\n\n\t\treturn parameters;\n\n\t}\n\n\tfunction getProgramCacheKey( parameters ) {\n\n\t\tconst array = [];\n\n\t\tif ( parameters.shaderID ) {\n\n\t\t\tarray.push( parameters.shaderID );\n\n\t\t} else {\n\n\t\t\tarray.push( parameters.fragmentShader );\n\t\t\tarray.push( parameters.vertexShader );\n\n\t\t}\n\n\t\tif ( parameters.defines !== undefined ) {\n\n\t\t\tfor ( const name in parameters.defines ) {\n\n\t\t\t\tarray.push( name );\n\t\t\t\tarray.push( parameters.defines[ name ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( parameters.isRawShaderMaterial === false ) {\n\n\t\t\tfor ( let i = 0; i < parameterNames.length; i ++ ) {\n\n\t\t\t\tarray.push( parameters[ parameterNames[ i ] ] );\n\n\t\t\t}\n\n\t\t\tarray.push( renderer.outputEncoding );\n\t\t\tarray.push( renderer.gammaFactor );\n\n\t\t}\n\n\t\tarray.push( parameters.customProgramCacheKey );\n\n\t\treturn array.join();\n\n\t}\n\n\tfunction getUniforms( material ) {\n\n\t\tconst shaderID = shaderIDs[ material.type ];\n\t\tlet uniforms;\n\n\t\tif ( shaderID ) {\n\n\t\t\tconst shader = ShaderLib[ shaderID ];\n\t\t\tuniforms = UniformsUtils.clone( shader.uniforms );\n\n\t\t} else {\n\n\t\t\tuniforms = material.uniforms;\n\n\t\t}\n\n\t\treturn uniforms;\n\n\t}\n\n\tfunction acquireProgram( parameters, cacheKey ) {\n\n\t\tlet program;\n\n\t\t// Check if code has been already compiled\n\t\tfor ( let p = 0, pl = programs.length; p < pl; p ++ ) {\n\n\t\t\tconst preexistingProgram = programs[ p ];\n\n\t\t\tif ( preexistingProgram.cacheKey === cacheKey ) {\n\n\t\t\t\tprogram = preexistingProgram;\n\t\t\t\t++ program.usedTimes;\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( program === undefined ) {\n\n\t\t\tprogram = new WebGLProgram( renderer, cacheKey, parameters, bindingStates );\n\t\t\tprograms.push( program );\n\n\t\t}\n\n\t\treturn program;\n\n\t}\n\n\tfunction releaseProgram( program ) {\n\n\t\tif ( -- program.usedTimes === 0 ) {\n\n\t\t\t// Remove from unordered set\n\t\t\tconst i = programs.indexOf( program );\n\t\t\tprograms[ i ] = programs[ programs.length - 1 ];\n\t\t\tprograms.pop();\n\n\t\t\t// Free WebGL resources\n\t\t\tprogram.destroy();\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tgetParameters: getParameters,\n\t\tgetProgramCacheKey: getProgramCacheKey,\n\t\tgetUniforms: getUniforms,\n\t\tacquireProgram: acquireProgram,\n\t\treleaseProgram: releaseProgram,\n\t\t// Exposed for resource monitoring & error feedback via renderer.info:\n\t\tprograms: programs\n\t};\n\n}\n\nfunction WebGLProperties() {\n\n\tlet properties = new WeakMap();\n\n\tfunction get( object ) {\n\n\t\tlet map = properties.get( object );\n\n\t\tif ( map === undefined ) {\n\n\t\t\tmap = {};\n\t\t\tproperties.set( object, map );\n\n\t\t}\n\n\t\treturn map;\n\n\t}\n\n\tfunction remove( object ) {\n\n\t\tproperties.delete( object );\n\n\t}\n\n\tfunction update( object, key, value ) {\n\n\t\tproperties.get( object )[ key ] = value;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tproperties = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tremove: remove,\n\t\tupdate: update,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction painterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.program !== b.program ) {\n\n\t\treturn a.program.id - b.program.id;\n\n\t} else if ( a.material.id !== b.material.id ) {\n\n\t\treturn a.material.id - b.material.id;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn a.z - b.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}\n\nfunction reversePainterSortStable( a, b ) {\n\n\tif ( a.groupOrder !== b.groupOrder ) {\n\n\t\treturn a.groupOrder - b.groupOrder;\n\n\t} else if ( a.renderOrder !== b.renderOrder ) {\n\n\t\treturn a.renderOrder - b.renderOrder;\n\n\t} else if ( a.z !== b.z ) {\n\n\t\treturn b.z - a.z;\n\n\t} else {\n\n\t\treturn a.id - b.id;\n\n\t}\n\n}\n\n\nfunction WebGLRenderList( properties ) {\n\n\tconst renderItems = [];\n\tlet renderItemsIndex = 0;\n\n\tconst opaque = [];\n\tconst transmissive = [];\n\tconst transparent = [];\n\n\tconst defaultProgram = { id: - 1 };\n\n\tfunction init() {\n\n\t\trenderItemsIndex = 0;\n\n\t\topaque.length = 0;\n\t\ttransmissive.length = 0;\n\t\ttransparent.length = 0;\n\n\t}\n\n\tfunction getNextRenderItem( object, geometry, material, groupOrder, z, group ) {\n\n\t\tlet renderItem = renderItems[ renderItemsIndex ];\n\t\tconst materialProperties = properties.get( material );\n\n\t\tif ( renderItem === undefined ) {\n\n\t\t\trenderItem = {\n\t\t\t\tid: object.id,\n\t\t\t\tobject: object,\n\t\t\t\tgeometry: geometry,\n\t\t\t\tmaterial: material,\n\t\t\t\tprogram: materialProperties.program || defaultProgram,\n\t\t\t\tgroupOrder: groupOrder,\n\t\t\t\trenderOrder: object.renderOrder,\n\t\t\t\tz: z,\n\t\t\t\tgroup: group\n\t\t\t};\n\n\t\t\trenderItems[ renderItemsIndex ] = renderItem;\n\n\t\t} else {\n\n\t\t\trenderItem.id = object.id;\n\t\t\trenderItem.object = object;\n\t\t\trenderItem.geometry = geometry;\n\t\t\trenderItem.material = material;\n\t\t\trenderItem.program = materialProperties.program || defaultProgram;\n\t\t\trenderItem.groupOrder = groupOrder;\n\t\t\trenderItem.renderOrder = object.renderOrder;\n\t\t\trenderItem.z = z;\n\t\t\trenderItem.group = group;\n\n\t\t}\n\n\t\trenderItemsIndex ++;\n\n\t\treturn renderItem;\n\n\t}\n\n\tfunction push( object, geometry, material, groupOrder, z, group ) {\n\n\t\tconst renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\ttransmissive.push( renderItem );\n\n\t\t} else if ( material.transparent === true ) {\n\n\t\t\ttransparent.push( renderItem );\n\n\t\t} else {\n\n\t\t\topaque.push( renderItem );\n\n\t\t}\n\n\t}\n\n\tfunction unshift( object, geometry, material, groupOrder, z, group ) {\n\n\t\tconst renderItem = getNextRenderItem( object, geometry, material, groupOrder, z, group );\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\ttransmissive.unshift( renderItem );\n\n\t\t} else if ( material.transparent === true ) {\n\n\t\t\ttransparent.unshift( renderItem );\n\n\t\t} else {\n\n\t\t\topaque.unshift( renderItem );\n\n\t\t}\n\n\t}\n\n\tfunction sort( customOpaqueSort, customTransparentSort ) {\n\n\t\tif ( opaque.length > 1 ) opaque.sort( customOpaqueSort || painterSortStable );\n\t\tif ( transmissive.length > 1 ) transmissive.sort( customTransparentSort || reversePainterSortStable );\n\t\tif ( transparent.length > 1 ) transparent.sort( customTransparentSort || reversePainterSortStable );\n\n\t}\n\n\tfunction finish() {\n\n\t\t// Clear references from inactive renderItems in the list\n\n\t\tfor ( let i = renderItemsIndex, il = renderItems.length; i < il; i ++ ) {\n\n\t\t\tconst renderItem = renderItems[ i ];\n\n\t\t\tif ( renderItem.id === null ) break;\n\n\t\t\trenderItem.id = null;\n\t\t\trenderItem.object = null;\n\t\t\trenderItem.geometry = null;\n\t\t\trenderItem.material = null;\n\t\t\trenderItem.program = null;\n\t\t\trenderItem.group = null;\n\n\t\t}\n\n\t}\n\n\treturn {\n\n\t\topaque: opaque,\n\t\ttransmissive: transmissive,\n\t\ttransparent: transparent,\n\n\t\tinit: init,\n\t\tpush: push,\n\t\tunshift: unshift,\n\t\tfinish: finish,\n\n\t\tsort: sort\n\t};\n\n}\n\nfunction WebGLRenderLists( properties ) {\n\n\tlet lists = new WeakMap();\n\n\tfunction get( scene, renderCallDepth ) {\n\n\t\tlet list;\n\n\t\tif ( lists.has( scene ) === false ) {\n\n\t\t\tlist = new WebGLRenderList( properties );\n\t\t\tlists.set( scene, [ list ] );\n\n\t\t} else {\n\n\t\t\tif ( renderCallDepth >= lists.get( scene ).length ) {\n\n\t\t\t\tlist = new WebGLRenderList( properties );\n\t\t\t\tlists.get( scene ).push( list );\n\n\t\t\t} else {\n\n\t\t\t\tlist = lists.get( scene )[ renderCallDepth ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn list;\n\n\t}\n\n\tfunction dispose() {\n\n\t\tlists = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\nfunction UniformsCache() {\n\n\tconst lights = {};\n\n\treturn {\n\n\t\tget: function ( light ) {\n\n\t\t\tif ( lights[ light.id ] !== undefined ) {\n\n\t\t\t\treturn lights[ light.id ];\n\n\t\t\t}\n\n\t\t\tlet uniforms;\n\n\t\t\tswitch ( light.type ) {\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tcolor: new Color()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\tconeCos: 0,\n\t\t\t\t\t\tpenumbraCos: 0,\n\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'HemisphereLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\tskyColor: new Color(),\n\t\t\t\t\t\tgroundColor: new Color()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RectAreaLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\thalfWidth: new Vector3(),\n\t\t\t\t\t\thalfHeight: new Vector3()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tlights[ light.id ] = uniforms;\n\n\t\t\treturn uniforms;\n\n\t\t}\n\n\t};\n\n}\n\nfunction ShadowUniformsCache() {\n\n\tconst lights = {};\n\n\treturn {\n\n\t\tget: function ( light ) {\n\n\t\t\tif ( lights[ light.id ] !== undefined ) {\n\n\t\t\t\treturn lights[ light.id ];\n\n\t\t\t}\n\n\t\t\tlet uniforms;\n\n\t\t\tswitch ( light.type ) {\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tuniforms = {\n\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\tshadowMapSize: new Vector2(),\n\t\t\t\t\t\tshadowCameraNear: 1,\n\t\t\t\t\t\tshadowCameraFar: 1000\n\t\t\t\t\t};\n\t\t\t\t\tbreak;\n\n\t\t\t\t// TODO (abelnation): set RectAreaLight shadow uniforms\n\n\t\t\t}\n\n\t\t\tlights[ light.id ] = uniforms;\n\n\t\t\treturn uniforms;\n\n\t\t}\n\n\t};\n\n}\n\n\n\nlet nextVersion = 0;\n\nfunction shadowCastingLightsFirst( lightA, lightB ) {\n\n\treturn ( lightB.castShadow ? 1 : 0 ) - ( lightA.castShadow ? 1 : 0 );\n\n}\n\nfunction WebGLLights( extensions, capabilities ) {\n\n\tconst cache = new UniformsCache();\n\n\tconst shadowCache = ShadowUniformsCache();\n\n\tconst state = {\n\n\t\tversion: 0,\n\n\t\thash: {\n\t\t\tdirectionalLength: - 1,\n\t\t\tpointLength: - 1,\n\t\t\tspotLength: - 1,\n\t\t\trectAreaLength: - 1,\n\t\t\themiLength: - 1,\n\n\t\t\tnumDirectionalShadows: - 1,\n\t\t\tnumPointShadows: - 1,\n\t\t\tnumSpotShadows: - 1\n\t\t},\n\n\t\tambient: [ 0, 0, 0 ],\n\t\tprobe: [],\n\t\tdirectional: [],\n\t\tdirectionalShadow: [],\n\t\tdirectionalShadowMap: [],\n\t\tdirectionalShadowMatrix: [],\n\t\tspot: [],\n\t\tspotShadow: [],\n\t\tspotShadowMap: [],\n\t\tspotShadowMatrix: [],\n\t\trectArea: [],\n\t\trectAreaLTC1: null,\n\t\trectAreaLTC2: null,\n\t\tpoint: [],\n\t\tpointShadow: [],\n\t\tpointShadowMap: [],\n\t\tpointShadowMatrix: [],\n\t\themi: []\n\n\t};\n\n\tfor ( let i = 0; i < 9; i ++ ) state.probe.push( new Vector3() );\n\n\tconst vector3 = new Vector3();\n\tconst matrix4 = new Matrix4();\n\tconst matrix42 = new Matrix4();\n\n\tfunction setup( lights ) {\n\n\t\tlet r = 0, g = 0, b = 0;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) state.probe[ i ].set( 0, 0, 0 );\n\n\t\tlet directionalLength = 0;\n\t\tlet pointLength = 0;\n\t\tlet spotLength = 0;\n\t\tlet rectAreaLength = 0;\n\t\tlet hemiLength = 0;\n\n\t\tlet numDirectionalShadows = 0;\n\t\tlet numPointShadows = 0;\n\t\tlet numSpotShadows = 0;\n\n\t\tlights.sort( shadowCastingLightsFirst );\n\n\t\tfor ( let i = 0, l = lights.length; i < l; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\n\t\t\tconst color = light.color;\n\t\t\tconst intensity = light.intensity;\n\t\t\tconst distance = light.distance;\n\n\t\t\tconst shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null;\n\n\t\t\tif ( light.isAmbientLight ) {\n\n\t\t\t\tr += color.r * intensity;\n\t\t\t\tg += color.g * intensity;\n\t\t\t\tb += color.b * intensity;\n\n\t\t\t} else if ( light.isLightProbe ) {\n\n\t\t\t\tfor ( let j = 0; j < 9; j ++ ) {\n\n\t\t\t\t\tstate.probe[ j ].addScaledVector( light.sh.coefficients[ j ], intensity );\n\n\t\t\t\t}\n\n\t\t\t} else if ( light.isDirectionalLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( light.color ).multiplyScalar( light.intensity );\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\n\t\t\t\t\tstate.directionalShadow[ directionalLength ] = shadowUniforms;\n\t\t\t\t\tstate.directionalShadowMap[ directionalLength ] = shadowMap;\n\t\t\t\t\tstate.directionalShadowMatrix[ directionalLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumDirectionalShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.directional[ directionalLength ] = uniforms;\n\n\t\t\t\tdirectionalLength ++;\n\n\t\t\t} else if ( light.isSpotLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\n\t\t\t\tuniforms.color.copy( color ).multiplyScalar( intensity );\n\t\t\t\tuniforms.distance = distance;\n\n\t\t\t\tuniforms.coneCos = Math.cos( light.angle );\n\t\t\t\tuniforms.penumbraCos = Math.cos( light.angle * ( 1 - light.penumbra ) );\n\t\t\t\tuniforms.decay = light.decay;\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\n\t\t\t\t\tstate.spotShadow[ spotLength ] = shadowUniforms;\n\t\t\t\t\tstate.spotShadowMap[ spotLength ] = shadowMap;\n\t\t\t\t\tstate.spotShadowMatrix[ spotLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumSpotShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.spot[ spotLength ] = uniforms;\n\n\t\t\t\tspotLength ++;\n\n\t\t\t} else if ( light.isRectAreaLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\t// (a) intensity is the total visible light emitted\n\t\t\t\t//uniforms.color.copy( color ).multiplyScalar( intensity / ( light.width * light.height * Math.PI ) );\n\n\t\t\t\t// (b) intensity is the brightness of the light\n\t\t\t\tuniforms.color.copy( color ).multiplyScalar( intensity );\n\n\t\t\t\tuniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );\n\t\t\t\tuniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );\n\n\t\t\t\tstate.rectArea[ rectAreaLength ] = uniforms;\n\n\t\t\t\trectAreaLength ++;\n\n\t\t\t} else if ( light.isPointLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.color.copy( light.color ).multiplyScalar( light.intensity );\n\t\t\t\tuniforms.distance = light.distance;\n\t\t\t\tuniforms.decay = light.decay;\n\n\t\t\t\tif ( light.castShadow ) {\n\n\t\t\t\t\tconst shadow = light.shadow;\n\n\t\t\t\t\tconst shadowUniforms = shadowCache.get( light );\n\n\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\t\t\t\t\tshadowUniforms.shadowCameraNear = shadow.camera.near;\n\t\t\t\t\tshadowUniforms.shadowCameraFar = shadow.camera.far;\n\n\t\t\t\t\tstate.pointShadow[ pointLength ] = shadowUniforms;\n\t\t\t\t\tstate.pointShadowMap[ pointLength ] = shadowMap;\n\t\t\t\t\tstate.pointShadowMatrix[ pointLength ] = light.shadow.matrix;\n\n\t\t\t\t\tnumPointShadows ++;\n\n\t\t\t\t}\n\n\t\t\t\tstate.point[ pointLength ] = uniforms;\n\n\t\t\t\tpointLength ++;\n\n\t\t\t} else if ( light.isHemisphereLight ) {\n\n\t\t\t\tconst uniforms = cache.get( light );\n\n\t\t\t\tuniforms.skyColor.copy( light.color ).multiplyScalar( intensity );\n\t\t\t\tuniforms.groundColor.copy( light.groundColor ).multiplyScalar( intensity );\n\n\t\t\t\tstate.hemi[ hemiLength ] = uniforms;\n\n\t\t\t\themiLength ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( rectAreaLength > 0 ) {\n\n\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t// WebGL 2\n\n\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\n\t\t\t} else {\n\n\t\t\t\t// WebGL 1\n\n\t\t\t\tif ( extensions.has( 'OES_texture_float_linear' ) === true ) {\n\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\n\t\t\t\t} else if ( extensions.has( 'OES_texture_half_float_linear' ) === true ) {\n\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_HALF_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_HALF_2;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.ambient[ 0 ] = r;\n\t\tstate.ambient[ 1 ] = g;\n\t\tstate.ambient[ 2 ] = b;\n\n\t\tconst hash = state.hash;\n\n\t\tif ( hash.directionalLength !== directionalLength ||\n\t\t\thash.pointLength !== pointLength ||\n\t\t\thash.spotLength !== spotLength ||\n\t\t\thash.rectAreaLength !== rectAreaLength ||\n\t\t\thash.hemiLength !== hemiLength ||\n\t\t\thash.numDirectionalShadows !== numDirectionalShadows ||\n\t\t\thash.numPointShadows !== numPointShadows ||\n\t\t\thash.numSpotShadows !== numSpotShadows ) {\n\n\t\t\tstate.directional.length = directionalLength;\n\t\t\tstate.spot.length = spotLength;\n\t\t\tstate.rectArea.length = rectAreaLength;\n\t\t\tstate.point.length = pointLength;\n\t\t\tstate.hemi.length = hemiLength;\n\n\t\t\tstate.directionalShadow.length = numDirectionalShadows;\n\t\t\tstate.directionalShadowMap.length = numDirectionalShadows;\n\t\t\tstate.pointShadow.length = numPointShadows;\n\t\t\tstate.pointShadowMap.length = numPointShadows;\n\t\t\tstate.spotShadow.length = numSpotShadows;\n\t\t\tstate.spotShadowMap.length = numSpotShadows;\n\t\t\tstate.directionalShadowMatrix.length = numDirectionalShadows;\n\t\t\tstate.pointShadowMatrix.length = numPointShadows;\n\t\t\tstate.spotShadowMatrix.length = numSpotShadows;\n\n\t\t\thash.directionalLength = directionalLength;\n\t\t\thash.pointLength = pointLength;\n\t\t\thash.spotLength = spotLength;\n\t\t\thash.rectAreaLength = rectAreaLength;\n\t\t\thash.hemiLength = hemiLength;\n\n\t\t\thash.numDirectionalShadows = numDirectionalShadows;\n\t\t\thash.numPointShadows = numPointShadows;\n\t\t\thash.numSpotShadows = numSpotShadows;\n\n\t\t\tstate.version = nextVersion ++;\n\n\t\t}\n\n\t}\n\n\tfunction setupView( lights, camera ) {\n\n\t\tlet directionalLength = 0;\n\t\tlet pointLength = 0;\n\t\tlet spotLength = 0;\n\t\tlet rectAreaLength = 0;\n\t\tlet hemiLength = 0;\n\n\t\tconst viewMatrix = camera.matrixWorldInverse;\n\n\t\tfor ( let i = 0, l = lights.length; i < l; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\n\t\t\tif ( light.isDirectionalLight ) {\n\n\t\t\t\tconst uniforms = state.directional[ directionalLength ];\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tvector3.setFromMatrixPosition( light.target.matrixWorld );\n\t\t\t\tuniforms.direction.sub( vector3 );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\tdirectionalLength ++;\n\n\t\t\t} else if ( light.isSpotLight ) {\n\n\t\t\t\tconst uniforms = state.spot[ spotLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tvector3.setFromMatrixPosition( light.target.matrixWorld );\n\t\t\t\tuniforms.direction.sub( vector3 );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\n\t\t\t\tspotLength ++;\n\n\t\t\t} else if ( light.isRectAreaLight ) {\n\n\t\t\t\tconst uniforms = state.rectArea[ rectAreaLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\t// extract local rotation of light to derive width/height half vectors\n\t\t\t\tmatrix42.identity();\n\t\t\t\tmatrix4.copy( light.matrixWorld );\n\t\t\t\tmatrix4.premultiply( viewMatrix );\n\t\t\t\tmatrix42.extractRotation( matrix4 );\n\n\t\t\t\tuniforms.halfWidth.set( light.width * 0.5, 0.0, 0.0 );\n\t\t\t\tuniforms.halfHeight.set( 0.0, light.height * 0.5, 0.0 );\n\n\t\t\t\tuniforms.halfWidth.applyMatrix4( matrix42 );\n\t\t\t\tuniforms.halfHeight.applyMatrix4( matrix42 );\n\n\t\t\t\trectAreaLength ++;\n\n\t\t\t} else if ( light.isPointLight ) {\n\n\t\t\t\tconst uniforms = state.point[ pointLength ];\n\n\t\t\t\tuniforms.position.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.position.applyMatrix4( viewMatrix );\n\n\t\t\t\tpointLength ++;\n\n\t\t\t} else if ( light.isHemisphereLight ) {\n\n\t\t\t\tconst uniforms = state.hemi[ hemiLength ];\n\n\t\t\t\tuniforms.direction.setFromMatrixPosition( light.matrixWorld );\n\t\t\t\tuniforms.direction.transformDirection( viewMatrix );\n\t\t\t\tuniforms.direction.normalize();\n\n\t\t\t\themiLength ++;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\tsetup: setup,\n\t\tsetupView: setupView,\n\t\tstate: state\n\t};\n\n}\n\nfunction WebGLRenderState( extensions, capabilities ) {\n\n\tconst lights = new WebGLLights( extensions, capabilities );\n\n\tconst lightsArray = [];\n\tconst shadowsArray = [];\n\n\tfunction init() {\n\n\t\tlightsArray.length = 0;\n\t\tshadowsArray.length = 0;\n\n\t}\n\n\tfunction pushLight( light ) {\n\n\t\tlightsArray.push( light );\n\n\t}\n\n\tfunction pushShadow( shadowLight ) {\n\n\t\tshadowsArray.push( shadowLight );\n\n\t}\n\n\tfunction setupLights() {\n\n\t\tlights.setup( lightsArray );\n\n\t}\n\n\tfunction setupLightsView( camera ) {\n\n\t\tlights.setupView( lightsArray, camera );\n\n\t}\n\n\tconst state = {\n\t\tlightsArray: lightsArray,\n\t\tshadowsArray: shadowsArray,\n\n\t\tlights: lights\n\t};\n\n\treturn {\n\t\tinit: init,\n\t\tstate: state,\n\t\tsetupLights: setupLights,\n\t\tsetupLightsView: setupLightsView,\n\n\t\tpushLight: pushLight,\n\t\tpushShadow: pushShadow\n\t};\n\n}\n\nfunction WebGLRenderStates( extensions, capabilities ) {\n\n\tlet renderStates = new WeakMap();\n\n\tfunction get( scene, renderCallDepth = 0 ) {\n\n\t\tlet renderState;\n\n\t\tif ( renderStates.has( scene ) === false ) {\n\n\t\t\trenderState = new WebGLRenderState( extensions, capabilities );\n\t\t\trenderStates.set( scene, [ renderState ] );\n\n\t\t} else {\n\n\t\t\tif ( renderCallDepth >= renderStates.get( scene ).length ) {\n\n\t\t\t\trenderState = new WebGLRenderState( extensions, capabilities );\n\t\t\t\trenderStates.get( scene ).push( renderState );\n\n\t\t\t} else {\n\n\t\t\t\trenderState = renderStates.get( scene )[ renderCallDepth ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn renderState;\n\n\t}\n\n\tfunction dispose() {\n\n\t\trenderStates = new WeakMap();\n\n\t}\n\n\treturn {\n\t\tget: get,\n\t\tdispose: dispose\n\t};\n\n}\n\n/**\n * parameters = {\n *\n * opacity: <float>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>\n * }\n */\n\nclass MeshDepthMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshDepthMaterial';\n\n\t\tthis.depthPacking = BasicDepthPacking;\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.fog = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.depthPacking = source.depthPacking;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshDepthMaterial.prototype.isMeshDepthMaterial = true;\n\n/**\n * parameters = {\n *\n * referencePosition: <float>,\n * nearDistance: <float>,\n * farDistance: <float>,\n *\n * morphTargets: <bool>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>\n *\n * }\n */\n\nclass MeshDistanceMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshDistanceMaterial';\n\n\t\tthis.referencePosition = new Vector3();\n\t\tthis.nearDistance = 1;\n\t\tthis.farDistance = 1000;\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.fog = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.referencePosition.copy( source.referencePosition );\n\t\tthis.nearDistance = source.nearDistance;\n\t\tthis.farDistance = source.farDistance;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshDistanceMaterial.prototype.isMeshDistanceMaterial = true;\n\nvar vsm_frag = \"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include <packing>\\nvoid main() {\\n\\tfloat mean = 0.0;\\n\\tfloat squared_mean = 0.0;\\n\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\\n\\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\\n\\t\\t#ifdef HORIZONTAL_PASS\\n\\t\\t\\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\\n\\t\\t\\tmean += distribution.x;\\n\\t\\t\\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\\t\\t#else\\n\\t\\t\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\\n\\t\\t\\tmean += depth;\\n\\t\\t\\tsquared_mean += depth * depth;\\n\\t\\t#endif\\n\\t}\\n\\tmean = mean * HALF_SAMPLE_RATE;\\n\\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\\n\\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\";\n\nvar vsm_vert = \"void main() {\\n\\tgl_Position = vec4( position, 1.0 );\\n}\";\n\nfunction WebGLShadowMap( _renderer, _objects, _capabilities ) {\n\n\tlet _frustum = new Frustum();\n\n\tconst _shadowMapSize = new Vector2(),\n\t\t_viewportSize = new Vector2(),\n\n\t\t_viewport = new Vector4(),\n\n\t\t_depthMaterials = [],\n\t\t_distanceMaterials = [],\n\n\t\t_materialCache = {},\n\n\t\t_maxTextureSize = _capabilities.maxTextureSize;\n\n\tconst shadowSide = { 0: BackSide, 1: FrontSide, 2: DoubleSide };\n\n\tconst shadowMaterialVertical = new ShaderMaterial( {\n\n\t\tdefines: {\n\t\t\tSAMPLE_RATE: 2.0 / 8.0,\n\t\t\tHALF_SAMPLE_RATE: 1.0 / 8.0\n\t\t},\n\n\t\tuniforms: {\n\t\t\tshadow_pass: { value: null },\n\t\t\tresolution: { value: new Vector2() },\n\t\t\tradius: { value: 4.0 }\n\t\t},\n\n\t\tvertexShader: vsm_vert,\n\n\t\tfragmentShader: vsm_frag\n\n\t} );\n\n\tconst shadowMaterialHorizontal = shadowMaterialVertical.clone();\n\tshadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1;\n\n\tconst fullScreenTri = new BufferGeometry();\n\tfullScreenTri.setAttribute(\n\t\t'position',\n\t\tnew BufferAttribute(\n\t\t\tnew Float32Array( [ - 1, - 1, 0.5, 3, - 1, 0.5, - 1, 3, 0.5 ] ),\n\t\t\t3\n\t\t)\n\t);\n\n\tconst fullScreenMesh = new Mesh( fullScreenTri, shadowMaterialVertical );\n\n\tconst scope = this;\n\n\tthis.enabled = false;\n\n\tthis.autoUpdate = true;\n\tthis.needsUpdate = false;\n\n\tthis.type = PCFShadowMap;\n\n\tthis.render = function ( lights, scene, camera ) {\n\n\t\tif ( scope.enabled === false ) return;\n\t\tif ( scope.autoUpdate === false && scope.needsUpdate === false ) return;\n\n\t\tif ( lights.length === 0 ) return;\n\n\t\tconst currentRenderTarget = _renderer.getRenderTarget();\n\t\tconst activeCubeFace = _renderer.getActiveCubeFace();\n\t\tconst activeMipmapLevel = _renderer.getActiveMipmapLevel();\n\n\t\tconst _state = _renderer.state;\n\n\t\t// Set GL state for depth map.\n\t\t_state.setBlending( NoBlending );\n\t\t_state.buffers.color.setClear( 1, 1, 1, 1 );\n\t\t_state.buffers.depth.setTest( true );\n\t\t_state.setScissorTest( false );\n\n\t\t// render depth map\n\n\t\tfor ( let i = 0, il = lights.length; i < il; i ++ ) {\n\n\t\t\tconst light = lights[ i ];\n\t\t\tconst shadow = light.shadow;\n\n\t\t\tif ( shadow === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' );\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;\n\n\t\t\t_shadowMapSize.copy( shadow.mapSize );\n\n\t\t\tconst shadowFrameExtents = shadow.getFrameExtents();\n\n\t\t\t_shadowMapSize.multiply( shadowFrameExtents );\n\n\t\t\t_viewportSize.copy( shadow.mapSize );\n\n\t\t\tif ( _shadowMapSize.x > _maxTextureSize || _shadowMapSize.y > _maxTextureSize ) {\n\n\t\t\t\tif ( _shadowMapSize.x > _maxTextureSize ) {\n\n\t\t\t\t\t_viewportSize.x = Math.floor( _maxTextureSize / shadowFrameExtents.x );\n\t\t\t\t\t_shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x;\n\t\t\t\t\tshadow.mapSize.x = _viewportSize.x;\n\n\t\t\t\t}\n\n\t\t\t\tif ( _shadowMapSize.y > _maxTextureSize ) {\n\n\t\t\t\t\t_viewportSize.y = Math.floor( _maxTextureSize / shadowFrameExtents.y );\n\t\t\t\t\t_shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y;\n\t\t\t\t\tshadow.mapSize.y = _viewportSize.y;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( shadow.map === null && ! shadow.isPointLightShadow && this.type === VSMShadowMap ) {\n\n\t\t\t\tconst pars = { minFilter: LinearFilter, magFilter: LinearFilter, format: RGBAFormat };\n\n\t\t\t\tshadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );\n\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\n\t\t\t\tshadow.mapPass = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );\n\n\t\t\t\tshadow.camera.updateProjectionMatrix();\n\n\t\t\t}\n\n\t\t\tif ( shadow.map === null ) {\n\n\t\t\t\tconst pars = { minFilter: NearestFilter, magFilter: NearestFilter, format: RGBAFormat };\n\n\t\t\t\tshadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );\n\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\n\t\t\t\tshadow.camera.updateProjectionMatrix();\n\n\t\t\t}\n\n\t\t\t_renderer.setRenderTarget( shadow.map );\n\t\t\t_renderer.clear();\n\n\t\t\tconst viewportCount = shadow.getViewportCount();\n\n\t\t\tfor ( let vp = 0; vp < viewportCount; vp ++ ) {\n\n\t\t\t\tconst viewport = shadow.getViewport( vp );\n\n\t\t\t\t_viewport.set(\n\t\t\t\t\t_viewportSize.x * viewport.x,\n\t\t\t\t\t_viewportSize.y * viewport.y,\n\t\t\t\t\t_viewportSize.x * viewport.z,\n\t\t\t\t\t_viewportSize.y * viewport.w\n\t\t\t\t);\n\n\t\t\t\t_state.viewport( _viewport );\n\n\t\t\t\tshadow.updateMatrices( light, vp );\n\n\t\t\t\t_frustum = shadow.getFrustum();\n\n\t\t\t\trenderObject( scene, camera, shadow.camera, light, this.type );\n\n\t\t\t}\n\n\t\t\t// do blur pass for VSM\n\n\t\t\tif ( ! shadow.isPointLightShadow && this.type === VSMShadowMap ) {\n\n\t\t\t\tVSMPass( shadow, camera );\n\n\t\t\t}\n\n\t\t\tshadow.needsUpdate = false;\n\n\t\t}\n\n\t\tscope.needsUpdate = false;\n\n\t\t_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );\n\n\t};\n\n\tfunction VSMPass( shadow, camera ) {\n\n\t\tconst geometry = _objects.update( fullScreenMesh );\n\n\t\t// vertical pass\n\n\t\tshadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture;\n\t\tshadowMaterialVertical.uniforms.resolution.value = shadow.mapSize;\n\t\tshadowMaterialVertical.uniforms.radius.value = shadow.radius;\n\t\t_renderer.setRenderTarget( shadow.mapPass );\n\t\t_renderer.clear();\n\t\t_renderer.renderBufferDirect( camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null );\n\n\t\t// horizontal pass\n\n\t\tshadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;\n\t\tshadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;\n\t\tshadowMaterialHorizontal.uniforms.radius.value = shadow.radius;\n\t\t_renderer.setRenderTarget( shadow.map );\n\t\t_renderer.clear();\n\t\t_renderer.renderBufferDirect( camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null );\n\n\t}\n\n\tfunction getDepthMaterialVariant( useMorphing ) {\n\n\t\tconst index = useMorphing << 0;\n\n\t\tlet material = _depthMaterials[ index ];\n\n\t\tif ( material === undefined ) {\n\n\t\t\tmaterial = new MeshDepthMaterial( {\n\n\t\t\t\tdepthPacking: RGBADepthPacking,\n\n\t\t\t\tmorphTargets: useMorphing\n\n\t\t\t} );\n\n\t\t\t_depthMaterials[ index ] = material;\n\n\t\t}\n\n\t\treturn material;\n\n\t}\n\n\tfunction getDistanceMaterialVariant( useMorphing ) {\n\n\t\tconst index = useMorphing << 0;\n\n\t\tlet material = _distanceMaterials[ index ];\n\n\t\tif ( material === undefined ) {\n\n\t\t\tmaterial = new MeshDistanceMaterial( {\n\n\t\t\t\tmorphTargets: useMorphing\n\n\t\t\t} );\n\n\t\t\t_distanceMaterials[ index ] = material;\n\n\t\t}\n\n\t\treturn material;\n\n\t}\n\n\tfunction getDepthMaterial( object, geometry, material, light, shadowCameraNear, shadowCameraFar, type ) {\n\n\t\tlet result = null;\n\n\t\tlet getMaterialVariant = getDepthMaterialVariant;\n\t\tlet customMaterial = object.customDepthMaterial;\n\n\t\tif ( light.isPointLight === true ) {\n\n\t\t\tgetMaterialVariant = getDistanceMaterialVariant;\n\t\t\tcustomMaterial = object.customDistanceMaterial;\n\n\t\t}\n\n\t\tif ( customMaterial === undefined ) {\n\n\t\t\tlet useMorphing = false;\n\n\t\t\tif ( material.morphTargets === true ) {\n\n\t\t\t\tuseMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0;\n\n\t\t\t}\n\n\t\t\tresult = getMaterialVariant( useMorphing );\n\n\t\t} else {\n\n\t\t\tresult = customMaterial;\n\n\t\t}\n\n\t\tif ( _renderer.localClippingEnabled &&\n\t\t\t\tmaterial.clipShadows === true &&\n\t\t\t\tmaterial.clippingPlanes.length !== 0 ) {\n\n\t\t\t// in this case we need a unique material instance reflecting the\n\t\t\t// appropriate state\n\n\t\t\tconst keyA = result.uuid, keyB = material.uuid;\n\n\t\t\tlet materialsForVariant = _materialCache[ keyA ];\n\n\t\t\tif ( materialsForVariant === undefined ) {\n\n\t\t\t\tmaterialsForVariant = {};\n\t\t\t\t_materialCache[ keyA ] = materialsForVariant;\n\n\t\t\t}\n\n\t\t\tlet cachedMaterial = materialsForVariant[ keyB ];\n\n\t\t\tif ( cachedMaterial === undefined ) {\n\n\t\t\t\tcachedMaterial = result.clone();\n\t\t\t\tmaterialsForVariant[ keyB ] = cachedMaterial;\n\n\t\t\t}\n\n\t\t\tresult = cachedMaterial;\n\n\t\t}\n\n\t\tresult.visible = material.visible;\n\t\tresult.wireframe = material.wireframe;\n\n\t\tif ( type === VSMShadowMap ) {\n\n\t\t\tresult.side = ( material.shadowSide !== null ) ? material.shadowSide : material.side;\n\n\t\t} else {\n\n\t\t\tresult.side = ( material.shadowSide !== null ) ? material.shadowSide : shadowSide[ material.side ];\n\n\t\t}\n\n\t\tresult.clipShadows = material.clipShadows;\n\t\tresult.clippingPlanes = material.clippingPlanes;\n\t\tresult.clipIntersection = material.clipIntersection;\n\n\t\tresult.wireframeLinewidth = material.wireframeLinewidth;\n\t\tresult.linewidth = material.linewidth;\n\n\t\tif ( light.isPointLight === true && result.isMeshDistanceMaterial === true ) {\n\n\t\t\tresult.referencePosition.setFromMatrixPosition( light.matrixWorld );\n\t\t\tresult.nearDistance = shadowCameraNear;\n\t\t\tresult.farDistance = shadowCameraFar;\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\tfunction renderObject( object, camera, shadowCamera, light, type ) {\n\n\t\tif ( object.visible === false ) return;\n\n\t\tconst visible = object.layers.test( camera.layers );\n\n\t\tif ( visible && ( object.isMesh || object.isLine || object.isPoints ) ) {\n\n\t\t\tif ( ( object.castShadow || ( object.receiveShadow && type === VSMShadowMap ) ) && ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) ) {\n\n\t\t\t\tobject.modelViewMatrix.multiplyMatrices( shadowCamera.matrixWorldInverse, object.matrixWorld );\n\n\t\t\t\tconst geometry = _objects.update( object );\n\t\t\t\tconst material = object.material;\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tconst groups = geometry.groups;\n\n\t\t\t\t\tfor ( let k = 0, kl = groups.length; k < kl; k ++ ) {\n\n\t\t\t\t\t\tconst group = groups[ k ];\n\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\tif ( groupMaterial && groupMaterial.visible ) {\n\n\t\t\t\t\t\t\tconst depthMaterial = getDepthMaterial( object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type );\n\n\t\t\t\t\t\t\t_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, group );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( material.visible ) {\n\n\t\t\t\t\tconst depthMaterial = getDepthMaterial( object, geometry, material, light, shadowCamera.near, shadowCamera.far, type );\n\n\t\t\t\t\t_renderer.renderBufferDirect( shadowCamera, null, geometry, depthMaterial, object, null );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\trenderObject( children[ i ], camera, shadowCamera, light, type );\n\n\t\t}\n\n\t}\n\n}\n\nfunction WebGLState( gl, extensions, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tfunction ColorBuffer() {\n\n\t\tlet locked = false;\n\n\t\tconst color = new Vector4();\n\t\tlet currentColorMask = null;\n\t\tconst currentColorClear = new Vector4( 0, 0, 0, 0 );\n\n\t\treturn {\n\n\t\t\tsetMask: function ( colorMask ) {\n\n\t\t\t\tif ( currentColorMask !== colorMask && ! locked ) {\n\n\t\t\t\t\tgl.colorMask( colorMask, colorMask, colorMask, colorMask );\n\t\t\t\t\tcurrentColorMask = colorMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( r, g, b, a, premultipliedAlpha ) {\n\n\t\t\t\tif ( premultipliedAlpha === true ) {\n\n\t\t\t\t\tr *= a; g *= a; b *= a;\n\n\t\t\t\t}\n\n\t\t\t\tcolor.set( r, g, b, a );\n\n\t\t\t\tif ( currentColorClear.equals( color ) === false ) {\n\n\t\t\t\t\tgl.clearColor( r, g, b, a );\n\t\t\t\t\tcurrentColorClear.copy( color );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentColorMask = null;\n\t\t\t\tcurrentColorClear.set( - 1, 0, 0, 0 ); // set to invalid state\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction DepthBuffer() {\n\n\t\tlet locked = false;\n\n\t\tlet currentDepthMask = null;\n\t\tlet currentDepthFunc = null;\n\t\tlet currentDepthClear = null;\n\n\t\treturn {\n\n\t\t\tsetTest: function ( depthTest ) {\n\n\t\t\t\tif ( depthTest ) {\n\n\t\t\t\t\tenable( 2929 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tdisable( 2929 );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetMask: function ( depthMask ) {\n\n\t\t\t\tif ( currentDepthMask !== depthMask && ! locked ) {\n\n\t\t\t\t\tgl.depthMask( depthMask );\n\t\t\t\t\tcurrentDepthMask = depthMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetFunc: function ( depthFunc ) {\n\n\t\t\t\tif ( currentDepthFunc !== depthFunc ) {\n\n\t\t\t\t\tif ( depthFunc ) {\n\n\t\t\t\t\t\tswitch ( depthFunc ) {\n\n\t\t\t\t\t\t\tcase NeverDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 512 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase AlwaysDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 519 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase LessDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 513 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase LessEqualDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 515 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase EqualDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 514 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase GreaterEqualDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 518 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase GreaterDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 516 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase NotEqualDepth:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 517 );\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\t\tgl.depthFunc( 515 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tgl.depthFunc( 515 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentDepthFunc = depthFunc;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( depth ) {\n\n\t\t\t\tif ( currentDepthClear !== depth ) {\n\n\t\t\t\t\tgl.clearDepth( depth );\n\t\t\t\t\tcurrentDepthClear = depth;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentDepthMask = null;\n\t\t\t\tcurrentDepthFunc = null;\n\t\t\t\tcurrentDepthClear = null;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tfunction StencilBuffer() {\n\n\t\tlet locked = false;\n\n\t\tlet currentStencilMask = null;\n\t\tlet currentStencilFunc = null;\n\t\tlet currentStencilRef = null;\n\t\tlet currentStencilFuncMask = null;\n\t\tlet currentStencilFail = null;\n\t\tlet currentStencilZFail = null;\n\t\tlet currentStencilZPass = null;\n\t\tlet currentStencilClear = null;\n\n\t\treturn {\n\n\t\t\tsetTest: function ( stencilTest ) {\n\n\t\t\t\tif ( ! locked ) {\n\n\t\t\t\t\tif ( stencilTest ) {\n\n\t\t\t\t\t\tenable( 2960 );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdisable( 2960 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetMask: function ( stencilMask ) {\n\n\t\t\t\tif ( currentStencilMask !== stencilMask && ! locked ) {\n\n\t\t\t\t\tgl.stencilMask( stencilMask );\n\t\t\t\t\tcurrentStencilMask = stencilMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetFunc: function ( stencilFunc, stencilRef, stencilMask ) {\n\n\t\t\t\tif ( currentStencilFunc !== stencilFunc ||\n\t\t\t\t currentStencilRef !== stencilRef ||\n\t\t\t\t currentStencilFuncMask !== stencilMask ) {\n\n\t\t\t\t\tgl.stencilFunc( stencilFunc, stencilRef, stencilMask );\n\n\t\t\t\t\tcurrentStencilFunc = stencilFunc;\n\t\t\t\t\tcurrentStencilRef = stencilRef;\n\t\t\t\t\tcurrentStencilFuncMask = stencilMask;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetOp: function ( stencilFail, stencilZFail, stencilZPass ) {\n\n\t\t\t\tif ( currentStencilFail !== stencilFail ||\n\t\t\t\t currentStencilZFail !== stencilZFail ||\n\t\t\t\t currentStencilZPass !== stencilZPass ) {\n\n\t\t\t\t\tgl.stencilOp( stencilFail, stencilZFail, stencilZPass );\n\n\t\t\t\t\tcurrentStencilFail = stencilFail;\n\t\t\t\t\tcurrentStencilZFail = stencilZFail;\n\t\t\t\t\tcurrentStencilZPass = stencilZPass;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tsetLocked: function ( lock ) {\n\n\t\t\t\tlocked = lock;\n\n\t\t\t},\n\n\t\t\tsetClear: function ( stencil ) {\n\n\t\t\t\tif ( currentStencilClear !== stencil ) {\n\n\t\t\t\t\tgl.clearStencil( stencil );\n\t\t\t\t\tcurrentStencilClear = stencil;\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\treset: function () {\n\n\t\t\t\tlocked = false;\n\n\t\t\t\tcurrentStencilMask = null;\n\t\t\t\tcurrentStencilFunc = null;\n\t\t\t\tcurrentStencilRef = null;\n\t\t\t\tcurrentStencilFuncMask = null;\n\t\t\t\tcurrentStencilFail = null;\n\t\t\t\tcurrentStencilZFail = null;\n\t\t\t\tcurrentStencilZPass = null;\n\t\t\t\tcurrentStencilClear = null;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t//\n\n\tconst colorBuffer = new ColorBuffer();\n\tconst depthBuffer = new DepthBuffer();\n\tconst stencilBuffer = new StencilBuffer();\n\n\tlet enabledCapabilities = {};\n\n\tlet xrFramebuffer = null;\n\tlet currentBoundFramebuffers = {};\n\n\tlet currentProgram = null;\n\n\tlet currentBlendingEnabled = false;\n\tlet currentBlending = null;\n\tlet currentBlendEquation = null;\n\tlet currentBlendSrc = null;\n\tlet currentBlendDst = null;\n\tlet currentBlendEquationAlpha = null;\n\tlet currentBlendSrcAlpha = null;\n\tlet currentBlendDstAlpha = null;\n\tlet currentPremultipledAlpha = false;\n\n\tlet currentFlipSided = null;\n\tlet currentCullFace = null;\n\n\tlet currentLineWidth = null;\n\n\tlet currentPolygonOffsetFactor = null;\n\tlet currentPolygonOffsetUnits = null;\n\n\tconst maxTextures = gl.getParameter( 35661 );\n\n\tlet lineWidthAvailable = false;\n\tlet version = 0;\n\tconst glVersion = gl.getParameter( 7938 );\n\n\tif ( glVersion.indexOf( 'WebGL' ) !== - 1 ) {\n\n\t\tversion = parseFloat( /^WebGL (\\d)/.exec( glVersion )[ 1 ] );\n\t\tlineWidthAvailable = ( version >= 1.0 );\n\n\t} else if ( glVersion.indexOf( 'OpenGL ES' ) !== - 1 ) {\n\n\t\tversion = parseFloat( /^OpenGL ES (\\d)/.exec( glVersion )[ 1 ] );\n\t\tlineWidthAvailable = ( version >= 2.0 );\n\n\t}\n\n\tlet currentTextureSlot = null;\n\tlet currentBoundTextures = {};\n\n\tconst scissorParam = gl.getParameter( 3088 );\n\tconst viewportParam = gl.getParameter( 2978 );\n\n\tconst currentScissor = new Vector4().fromArray( scissorParam );\n\tconst currentViewport = new Vector4().fromArray( viewportParam );\n\n\tfunction createTexture( type, target, count ) {\n\n\t\tconst data = new Uint8Array( 4 ); // 4 is required to match default unpack alignment of 4.\n\t\tconst texture = gl.createTexture();\n\n\t\tgl.bindTexture( type, texture );\n\t\tgl.texParameteri( type, 10241, 9728 );\n\t\tgl.texParameteri( type, 10240, 9728 );\n\n\t\tfor ( let i = 0; i < count; i ++ ) {\n\n\t\t\tgl.texImage2D( target + i, 0, 6408, 1, 1, 0, 6408, 5121, data );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n\tconst emptyTextures = {};\n\temptyTextures[ 3553 ] = createTexture( 3553, 3553, 1 );\n\temptyTextures[ 34067 ] = createTexture( 34067, 34069, 6 );\n\n\t// init\n\n\tcolorBuffer.setClear( 0, 0, 0, 1 );\n\tdepthBuffer.setClear( 1 );\n\tstencilBuffer.setClear( 0 );\n\n\tenable( 2929 );\n\tdepthBuffer.setFunc( LessEqualDepth );\n\n\tsetFlipSided( false );\n\tsetCullFace( CullFaceBack );\n\tenable( 2884 );\n\n\tsetBlending( NoBlending );\n\n\t//\n\n\tfunction enable( id ) {\n\n\t\tif ( enabledCapabilities[ id ] !== true ) {\n\n\t\t\tgl.enable( id );\n\t\t\tenabledCapabilities[ id ] = true;\n\n\t\t}\n\n\t}\n\n\tfunction disable( id ) {\n\n\t\tif ( enabledCapabilities[ id ] !== false ) {\n\n\t\t\tgl.disable( id );\n\t\t\tenabledCapabilities[ id ] = false;\n\n\t\t}\n\n\t}\n\n\tfunction bindXRFramebuffer( framebuffer ) {\n\n\t\tif ( framebuffer !== xrFramebuffer ) {\n\n\t\t\tgl.bindFramebuffer( 36160, framebuffer );\n\n\t\t\txrFramebuffer = framebuffer;\n\n\t\t}\n\n\t}\n\n\tfunction bindFramebuffer( target, framebuffer ) {\n\n\t\tif ( framebuffer === null && xrFramebuffer !== null ) framebuffer = xrFramebuffer; // use active XR framebuffer if available\n\n\t\tif ( currentBoundFramebuffers[ target ] !== framebuffer ) {\n\n\t\t\tgl.bindFramebuffer( target, framebuffer );\n\n\t\t\tcurrentBoundFramebuffers[ target ] = framebuffer;\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t// 36009 is equivalent to 36160\n\n\t\t\t\tif ( target === 36009 ) {\n\n\t\t\t\t\tcurrentBoundFramebuffers[ 36160 ] = framebuffer;\n\n\t\t\t\t}\n\n\t\t\t\tif ( target === 36160 ) {\n\n\t\t\t\t\tcurrentBoundFramebuffers[ 36009 ] = framebuffer;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tfunction useProgram( program ) {\n\n\t\tif ( currentProgram !== program ) {\n\n\t\t\tgl.useProgram( program );\n\n\t\t\tcurrentProgram = program;\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}\n\n\tconst equationToGL = {\n\t\t[ AddEquation ]: 32774,\n\t\t[ SubtractEquation ]: 32778,\n\t\t[ ReverseSubtractEquation ]: 32779\n\t};\n\n\tif ( isWebGL2 ) {\n\n\t\tequationToGL[ MinEquation ] = 32775;\n\t\tequationToGL[ MaxEquation ] = 32776;\n\n\t} else {\n\n\t\tconst extension = extensions.get( 'EXT_blend_minmax' );\n\n\t\tif ( extension !== null ) {\n\n\t\t\tequationToGL[ MinEquation ] = extension.MIN_EXT;\n\t\t\tequationToGL[ MaxEquation ] = extension.MAX_EXT;\n\n\t\t}\n\n\t}\n\n\tconst factorToGL = {\n\t\t[ ZeroFactor ]: 0,\n\t\t[ OneFactor ]: 1,\n\t\t[ SrcColorFactor ]: 768,\n\t\t[ SrcAlphaFactor ]: 770,\n\t\t[ SrcAlphaSaturateFactor ]: 776,\n\t\t[ DstColorFactor ]: 774,\n\t\t[ DstAlphaFactor ]: 772,\n\t\t[ OneMinusSrcColorFactor ]: 769,\n\t\t[ OneMinusSrcAlphaFactor ]: 771,\n\t\t[ OneMinusDstColorFactor ]: 775,\n\t\t[ OneMinusDstAlphaFactor ]: 773\n\t};\n\n\tfunction setBlending( blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha ) {\n\n\t\tif ( blending === NoBlending ) {\n\n\t\t\tif ( currentBlendingEnabled === true ) {\n\n\t\t\t\tdisable( 3042 );\n\t\t\t\tcurrentBlendingEnabled = false;\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( currentBlendingEnabled === false ) {\n\n\t\t\tenable( 3042 );\n\t\t\tcurrentBlendingEnabled = true;\n\n\t\t}\n\n\t\tif ( blending !== CustomBlending ) {\n\n\t\t\tif ( blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha ) {\n\n\t\t\t\tif ( currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation ) {\n\n\t\t\t\t\tgl.blendEquation( 32774 );\n\n\t\t\t\t\tcurrentBlendEquation = AddEquation;\n\t\t\t\t\tcurrentBlendEquationAlpha = AddEquation;\n\n\t\t\t\t}\n\n\t\t\t\tif ( premultipliedAlpha ) {\n\n\t\t\t\t\tswitch ( blending ) {\n\n\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( 1, 771, 1, 771 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( 1, 1 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( 0, 0, 769, 771 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( 0, 768, 0, 770 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.WebGLState: Invalid blending: ', blending );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tswitch ( blending ) {\n\n\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\tgl.blendFuncSeparate( 770, 771, 1, 771 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( 770, 1 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\tgl.blendFunc( 0, 769 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\tgl.blendFunc( 0, 768 );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.WebGLState: Invalid blending: ', blending );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tcurrentBlendSrc = null;\n\t\t\t\tcurrentBlendDst = null;\n\t\t\t\tcurrentBlendSrcAlpha = null;\n\t\t\t\tcurrentBlendDstAlpha = null;\n\n\t\t\t\tcurrentBlending = blending;\n\t\t\t\tcurrentPremultipledAlpha = premultipliedAlpha;\n\n\t\t\t}\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// custom blending\n\n\t\tblendEquationAlpha = blendEquationAlpha || blendEquation;\n\t\tblendSrcAlpha = blendSrcAlpha || blendSrc;\n\t\tblendDstAlpha = blendDstAlpha || blendDst;\n\n\t\tif ( blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha ) {\n\n\t\t\tgl.blendEquationSeparate( equationToGL[ blendEquation ], equationToGL[ blendEquationAlpha ] );\n\n\t\t\tcurrentBlendEquation = blendEquation;\n\t\t\tcurrentBlendEquationAlpha = blendEquationAlpha;\n\n\t\t}\n\n\t\tif ( blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha ) {\n\n\t\t\tgl.blendFuncSeparate( factorToGL[ blendSrc ], factorToGL[ blendDst ], factorToGL[ blendSrcAlpha ], factorToGL[ blendDstAlpha ] );\n\n\t\t\tcurrentBlendSrc = blendSrc;\n\t\t\tcurrentBlendDst = blendDst;\n\t\t\tcurrentBlendSrcAlpha = blendSrcAlpha;\n\t\t\tcurrentBlendDstAlpha = blendDstAlpha;\n\n\t\t}\n\n\t\tcurrentBlending = blending;\n\t\tcurrentPremultipledAlpha = null;\n\n\t}\n\n\tfunction setMaterial( material, frontFaceCW ) {\n\n\t\tmaterial.side === DoubleSide\n\t\t\t? disable( 2884 )\n\t\t\t: enable( 2884 );\n\n\t\tlet flipSided = ( material.side === BackSide );\n\t\tif ( frontFaceCW ) flipSided = ! flipSided;\n\n\t\tsetFlipSided( flipSided );\n\n\t\t( material.blending === NormalBlending && material.transparent === false )\n\t\t\t? setBlending( NoBlending )\n\t\t\t: setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha );\n\n\t\tdepthBuffer.setFunc( material.depthFunc );\n\t\tdepthBuffer.setTest( material.depthTest );\n\t\tdepthBuffer.setMask( material.depthWrite );\n\t\tcolorBuffer.setMask( material.colorWrite );\n\n\t\tconst stencilWrite = material.stencilWrite;\n\t\tstencilBuffer.setTest( stencilWrite );\n\t\tif ( stencilWrite ) {\n\n\t\t\tstencilBuffer.setMask( material.stencilWriteMask );\n\t\t\tstencilBuffer.setFunc( material.stencilFunc, material.stencilRef, material.stencilFuncMask );\n\t\t\tstencilBuffer.setOp( material.stencilFail, material.stencilZFail, material.stencilZPass );\n\n\t\t}\n\n\t\tsetPolygonOffset( material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits );\n\n\t\tmaterial.alphaToCoverage === true\n\t\t\t? enable( 32926 )\n\t\t\t: disable( 32926 );\n\n\t}\n\n\t//\n\n\tfunction setFlipSided( flipSided ) {\n\n\t\tif ( currentFlipSided !== flipSided ) {\n\n\t\t\tif ( flipSided ) {\n\n\t\t\t\tgl.frontFace( 2304 );\n\n\t\t\t} else {\n\n\t\t\t\tgl.frontFace( 2305 );\n\n\t\t\t}\n\n\t\t\tcurrentFlipSided = flipSided;\n\n\t\t}\n\n\t}\n\n\tfunction setCullFace( cullFace ) {\n\n\t\tif ( cullFace !== CullFaceNone ) {\n\n\t\t\tenable( 2884 );\n\n\t\t\tif ( cullFace !== currentCullFace ) {\n\n\t\t\t\tif ( cullFace === CullFaceBack ) {\n\n\t\t\t\t\tgl.cullFace( 1029 );\n\n\t\t\t\t} else if ( cullFace === CullFaceFront ) {\n\n\t\t\t\t\tgl.cullFace( 1028 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tgl.cullFace( 1032 );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tdisable( 2884 );\n\n\t\t}\n\n\t\tcurrentCullFace = cullFace;\n\n\t}\n\n\tfunction setLineWidth( width ) {\n\n\t\tif ( width !== currentLineWidth ) {\n\n\t\t\tif ( lineWidthAvailable ) gl.lineWidth( width );\n\n\t\t\tcurrentLineWidth = width;\n\n\t\t}\n\n\t}\n\n\tfunction setPolygonOffset( polygonOffset, factor, units ) {\n\n\t\tif ( polygonOffset ) {\n\n\t\t\tenable( 32823 );\n\n\t\t\tif ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) {\n\n\t\t\t\tgl.polygonOffset( factor, units );\n\n\t\t\t\tcurrentPolygonOffsetFactor = factor;\n\t\t\t\tcurrentPolygonOffsetUnits = units;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tdisable( 32823 );\n\n\t\t}\n\n\t}\n\n\tfunction setScissorTest( scissorTest ) {\n\n\t\tif ( scissorTest ) {\n\n\t\t\tenable( 3089 );\n\n\t\t} else {\n\n\t\t\tdisable( 3089 );\n\n\t\t}\n\n\t}\n\n\t// texture\n\n\tfunction activeTexture( webglSlot ) {\n\n\t\tif ( webglSlot === undefined ) webglSlot = 33984 + maxTextures - 1;\n\n\t\tif ( currentTextureSlot !== webglSlot ) {\n\n\t\t\tgl.activeTexture( webglSlot );\n\t\t\tcurrentTextureSlot = webglSlot;\n\n\t\t}\n\n\t}\n\n\tfunction bindTexture( webglType, webglTexture ) {\n\n\t\tif ( currentTextureSlot === null ) {\n\n\t\t\tactiveTexture();\n\n\t\t}\n\n\t\tlet boundTexture = currentBoundTextures[ currentTextureSlot ];\n\n\t\tif ( boundTexture === undefined ) {\n\n\t\t\tboundTexture = { type: undefined, texture: undefined };\n\t\t\tcurrentBoundTextures[ currentTextureSlot ] = boundTexture;\n\n\t\t}\n\n\t\tif ( boundTexture.type !== webglType || boundTexture.texture !== webglTexture ) {\n\n\t\t\tgl.bindTexture( webglType, webglTexture || emptyTextures[ webglType ] );\n\n\t\t\tboundTexture.type = webglType;\n\t\t\tboundTexture.texture = webglTexture;\n\n\t\t}\n\n\t}\n\n\tfunction unbindTexture() {\n\n\t\tconst boundTexture = currentBoundTextures[ currentTextureSlot ];\n\n\t\tif ( boundTexture !== undefined && boundTexture.type !== undefined ) {\n\n\t\t\tgl.bindTexture( boundTexture.type, null );\n\n\t\t\tboundTexture.type = undefined;\n\t\t\tboundTexture.texture = undefined;\n\n\t\t}\n\n\t}\n\n\tfunction compressedTexImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.compressedTexImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texImage2D() {\n\n\t\ttry {\n\n\t\t\tgl.texImage2D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\tfunction texImage3D() {\n\n\t\ttry {\n\n\t\t\tgl.texImage3D.apply( gl, arguments );\n\n\t\t} catch ( error ) {\n\n\t\t\tconsole.error( 'THREE.WebGLState:', error );\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction scissor( scissor ) {\n\n\t\tif ( currentScissor.equals( scissor ) === false ) {\n\n\t\t\tgl.scissor( scissor.x, scissor.y, scissor.z, scissor.w );\n\t\t\tcurrentScissor.copy( scissor );\n\n\t\t}\n\n\t}\n\n\tfunction viewport( viewport ) {\n\n\t\tif ( currentViewport.equals( viewport ) === false ) {\n\n\t\t\tgl.viewport( viewport.x, viewport.y, viewport.z, viewport.w );\n\t\t\tcurrentViewport.copy( viewport );\n\n\t\t}\n\n\t}\n\n\t//\n\n\tfunction reset() {\n\n\t\t// reset state\n\n\t\tgl.disable( 3042 );\n\t\tgl.disable( 2884 );\n\t\tgl.disable( 2929 );\n\t\tgl.disable( 32823 );\n\t\tgl.disable( 3089 );\n\t\tgl.disable( 2960 );\n\t\tgl.disable( 32926 );\n\n\t\tgl.blendEquation( 32774 );\n\t\tgl.blendFunc( 1, 0 );\n\t\tgl.blendFuncSeparate( 1, 0, 1, 0 );\n\n\t\tgl.colorMask( true, true, true, true );\n\t\tgl.clearColor( 0, 0, 0, 0 );\n\n\t\tgl.depthMask( true );\n\t\tgl.depthFunc( 513 );\n\t\tgl.clearDepth( 1 );\n\n\t\tgl.stencilMask( 0xffffffff );\n\t\tgl.stencilFunc( 519, 0, 0xffffffff );\n\t\tgl.stencilOp( 7680, 7680, 7680 );\n\t\tgl.clearStencil( 0 );\n\n\t\tgl.cullFace( 1029 );\n\t\tgl.frontFace( 2305 );\n\n\t\tgl.polygonOffset( 0, 0 );\n\n\t\tgl.activeTexture( 33984 );\n\n\t\tgl.bindFramebuffer( 36160, null );\n\n\t\tif ( isWebGL2 === true ) {\n\n\t\t\tgl.bindFramebuffer( 36009, null );\n\t\t\tgl.bindFramebuffer( 36008, null );\n\n\t\t}\n\n\t\tgl.useProgram( null );\n\n\t\tgl.lineWidth( 1 );\n\n\t\tgl.scissor( 0, 0, gl.canvas.width, gl.canvas.height );\n\t\tgl.viewport( 0, 0, gl.canvas.width, gl.canvas.height );\n\n\t\t// reset internals\n\n\t\tenabledCapabilities = {};\n\n\t\tcurrentTextureSlot = null;\n\t\tcurrentBoundTextures = {};\n\n\t\txrFramebuffer = null;\n\t\tcurrentBoundFramebuffers = {};\n\n\t\tcurrentProgram = null;\n\n\t\tcurrentBlendingEnabled = false;\n\t\tcurrentBlending = null;\n\t\tcurrentBlendEquation = null;\n\t\tcurrentBlendSrc = null;\n\t\tcurrentBlendDst = null;\n\t\tcurrentBlendEquationAlpha = null;\n\t\tcurrentBlendSrcAlpha = null;\n\t\tcurrentBlendDstAlpha = null;\n\t\tcurrentPremultipledAlpha = false;\n\n\t\tcurrentFlipSided = null;\n\t\tcurrentCullFace = null;\n\n\t\tcurrentLineWidth = null;\n\n\t\tcurrentPolygonOffsetFactor = null;\n\t\tcurrentPolygonOffsetUnits = null;\n\n\t\tcurrentScissor.set( 0, 0, gl.canvas.width, gl.canvas.height );\n\t\tcurrentViewport.set( 0, 0, gl.canvas.width, gl.canvas.height );\n\n\t\tcolorBuffer.reset();\n\t\tdepthBuffer.reset();\n\t\tstencilBuffer.reset();\n\n\t}\n\n\treturn {\n\n\t\tbuffers: {\n\t\t\tcolor: colorBuffer,\n\t\t\tdepth: depthBuffer,\n\t\t\tstencil: stencilBuffer\n\t\t},\n\n\t\tenable: enable,\n\t\tdisable: disable,\n\n\t\tbindFramebuffer: bindFramebuffer,\n\t\tbindXRFramebuffer: bindXRFramebuffer,\n\n\t\tuseProgram: useProgram,\n\n\t\tsetBlending: setBlending,\n\t\tsetMaterial: setMaterial,\n\n\t\tsetFlipSided: setFlipSided,\n\t\tsetCullFace: setCullFace,\n\n\t\tsetLineWidth: setLineWidth,\n\t\tsetPolygonOffset: setPolygonOffset,\n\n\t\tsetScissorTest: setScissorTest,\n\n\t\tactiveTexture: activeTexture,\n\t\tbindTexture: bindTexture,\n\t\tunbindTexture: unbindTexture,\n\t\tcompressedTexImage2D: compressedTexImage2D,\n\t\ttexImage2D: texImage2D,\n\t\ttexImage3D: texImage3D,\n\n\t\tscissor: scissor,\n\t\tviewport: viewport,\n\n\t\treset: reset\n\n\t};\n\n}\n\nfunction WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\tconst maxTextures = capabilities.maxTextures;\n\tconst maxCubemapSize = capabilities.maxCubemapSize;\n\tconst maxTextureSize = capabilities.maxTextureSize;\n\tconst maxSamples = capabilities.maxSamples;\n\n\tconst _videoTextures = new WeakMap();\n\tlet _canvas;\n\n\t// cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas,\n\t// also OffscreenCanvas.getContext(\"webgl\"), but not OffscreenCanvas.getContext(\"2d\")!\n\t// Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d).\n\n\tlet useOffscreenCanvas = false;\n\n\ttry {\n\n\t\tuseOffscreenCanvas = typeof OffscreenCanvas !== 'undefined'\n\t\t\t&& ( new OffscreenCanvas( 1, 1 ).getContext( '2d' ) ) !== null;\n\n\t} catch ( err ) {\n\n\t\t// Ignore any errors\n\n\t}\n\n\tfunction createCanvas( width, height ) {\n\n\t\t// Use OffscreenCanvas when available. Specially needed in web workers\n\n\t\treturn useOffscreenCanvas ?\n\t\t\tnew OffscreenCanvas( width, height ) :\n\t\t\tdocument.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );\n\n\t}\n\n\tfunction resizeImage( image, needsPowerOfTwo, needsNewCanvas, maxSize ) {\n\n\t\tlet scale = 1;\n\n\t\t// handle case if texture exceeds max size\n\n\t\tif ( image.width > maxSize || image.height > maxSize ) {\n\n\t\t\tscale = maxSize / Math.max( image.width, image.height );\n\n\t\t}\n\n\t\t// only perform resize if necessary\n\n\t\tif ( scale < 1 || needsPowerOfTwo === true ) {\n\n\t\t\t// only perform resize for certain image types\n\n\t\t\tif ( ( typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement ) ||\n\t\t\t\t( typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement ) ||\n\t\t\t\t( typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap ) ) {\n\n\t\t\t\tconst floor = needsPowerOfTwo ? floorPowerOfTwo : Math.floor;\n\n\t\t\t\tconst width = floor( scale * image.width );\n\t\t\t\tconst height = floor( scale * image.height );\n\n\t\t\t\tif ( _canvas === undefined ) _canvas = createCanvas( width, height );\n\n\t\t\t\t// cube textures can't reuse the same canvas\n\n\t\t\t\tconst canvas = needsNewCanvas ? createCanvas( width, height ) : _canvas;\n\n\t\t\t\tcanvas.width = width;\n\t\t\t\tcanvas.height = height;\n\n\t\t\t\tconst context = canvas.getContext( '2d' );\n\t\t\t\tcontext.drawImage( image, 0, 0, width, height );\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').' );\n\n\t\t\t\treturn canvas;\n\n\t\t\t} else {\n\n\t\t\t\tif ( 'data' in image ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Image in DataTexture is too big (' + image.width + 'x' + image.height + ').' );\n\n\t\t\t\t}\n\n\t\t\t\treturn image;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn image;\n\n\t}\n\n\tfunction isPowerOfTwo$1( image ) {\n\n\t\treturn isPowerOfTwo( image.width ) && isPowerOfTwo( image.height );\n\n\t}\n\n\tfunction textureNeedsPowerOfTwo( texture ) {\n\n\t\tif ( isWebGL2 ) return false;\n\n\t\treturn ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) ||\n\t\t\t( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter );\n\n\t}\n\n\tfunction textureNeedsGenerateMipmaps( texture, supportsMips ) {\n\n\t\treturn texture.generateMipmaps && supportsMips &&\n\t\t\ttexture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;\n\n\t}\n\n\tfunction generateMipmap( target, texture, width, height, depth = 1 ) {\n\n\t\t_gl.generateMipmap( target );\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\ttextureProperties.__maxMipLevel = Math.log2( Math.max( width, height, depth ) );\n\n\t}\n\n\tfunction getInternalFormat( internalFormatName, glFormat, glType ) {\n\n\t\tif ( isWebGL2 === false ) return glFormat;\n\n\t\tif ( internalFormatName !== null ) {\n\n\t\t\tif ( _gl[ internalFormatName ] !== undefined ) return _gl[ internalFormatName ];\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \\'' + internalFormatName + '\\'' );\n\n\t\t}\n\n\t\tlet internalFormat = glFormat;\n\n\t\tif ( glFormat === 6403 ) {\n\n\t\t\tif ( glType === 5126 ) internalFormat = 33326;\n\t\t\tif ( glType === 5131 ) internalFormat = 33325;\n\t\t\tif ( glType === 5121 ) internalFormat = 33321;\n\n\t\t}\n\n\t\tif ( glFormat === 6407 ) {\n\n\t\t\tif ( glType === 5126 ) internalFormat = 34837;\n\t\t\tif ( glType === 5131 ) internalFormat = 34843;\n\t\t\tif ( glType === 5121 ) internalFormat = 32849;\n\n\t\t}\n\n\t\tif ( glFormat === 6408 ) {\n\n\t\t\tif ( glType === 5126 ) internalFormat = 34836;\n\t\t\tif ( glType === 5131 ) internalFormat = 34842;\n\t\t\tif ( glType === 5121 ) internalFormat = 32856;\n\n\t\t}\n\n\t\tif ( internalFormat === 33325 || internalFormat === 33326 ||\n\t\t\tinternalFormat === 34842 || internalFormat === 34836 ) {\n\n\t\t\textensions.get( 'EXT_color_buffer_float' );\n\n\t\t}\n\n\t\treturn internalFormat;\n\n\t}\n\n\t// Fallback filters for non-power-of-2 textures\n\n\tfunction filterFallback( f ) {\n\n\t\tif ( f === NearestFilter || f === NearestMipmapNearestFilter || f === NearestMipmapLinearFilter ) {\n\n\t\t\treturn 9728;\n\n\t\t}\n\n\t\treturn 9729;\n\n\t}\n\n\t//\n\n\tfunction onTextureDispose( event ) {\n\n\t\tconst texture = event.target;\n\n\t\ttexture.removeEventListener( 'dispose', onTextureDispose );\n\n\t\tdeallocateTexture( texture );\n\n\t\tif ( texture.isVideoTexture ) {\n\n\t\t\t_videoTextures.delete( texture );\n\n\t\t}\n\n\t\tinfo.memory.textures --;\n\n\t}\n\n\tfunction onRenderTargetDispose( event ) {\n\n\t\tconst renderTarget = event.target;\n\n\t\trenderTarget.removeEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tdeallocateRenderTarget( renderTarget );\n\n\t}\n\n\t//\n\n\tfunction deallocateTexture( texture ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( textureProperties.__webglInit === undefined ) return;\n\n\t\t_gl.deleteTexture( textureProperties.__webglTexture );\n\n\t\tproperties.remove( texture );\n\n\t}\n\n\tfunction deallocateRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( ! renderTarget ) return;\n\n\t\tif ( textureProperties.__webglTexture !== undefined ) {\n\n\t\t\t_gl.deleteTexture( textureProperties.__webglTexture );\n\n\t\t\tinfo.memory.textures --;\n\n\t\t}\n\n\t\tif ( renderTarget.depthTexture ) {\n\n\t\t\trenderTarget.depthTexture.dispose();\n\n\t\t}\n\n\t\tif ( renderTarget.isWebGLCubeRenderTarget ) {\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer[ i ] );\n\t\t\t\tif ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer[ i ] );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t_gl.deleteFramebuffer( renderTargetProperties.__webglFramebuffer );\n\t\t\tif ( renderTargetProperties.__webglDepthbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthbuffer );\n\t\t\tif ( renderTargetProperties.__webglMultisampledFramebuffer ) _gl.deleteFramebuffer( renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\tif ( renderTargetProperties.__webglColorRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglColorRenderbuffer );\n\t\t\tif ( renderTargetProperties.__webglDepthRenderbuffer ) _gl.deleteRenderbuffer( renderTargetProperties.__webglDepthRenderbuffer );\n\n\t\t}\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets ) {\n\n\t\t\tfor ( let i = 0, il = texture.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachmentProperties = properties.get( texture[ i ] );\n\n\t\t\t\tif ( attachmentProperties.__webglTexture ) {\n\n\t\t\t\t\t_gl.deleteTexture( attachmentProperties.__webglTexture );\n\n\t\t\t\t\tinfo.memory.textures --;\n\n\t\t\t\t}\n\n\t\t\t\tproperties.remove( texture[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tproperties.remove( texture );\n\t\tproperties.remove( renderTarget );\n\n\t}\n\n\t//\n\n\tlet textureUnits = 0;\n\n\tfunction resetTextureUnits() {\n\n\t\ttextureUnits = 0;\n\n\t}\n\n\tfunction allocateTextureUnit() {\n\n\t\tconst textureUnit = textureUnits;\n\n\t\tif ( textureUnit >= maxTextures ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + maxTextures );\n\n\t\t}\n\n\t\ttextureUnits += 1;\n\n\t\treturn textureUnit;\n\n\t}\n\n\t//\n\n\tfunction setTexture2D( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.isVideoTexture ) updateVideoTexture( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tconst image = texture.image;\n\n\t\t\tif ( image === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture marked for update but image is undefined' );\n\n\t\t\t} else if ( image.complete === false ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture marked for update but image is incomplete' );\n\n\t\t\t} else {\n\n\t\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 3553, textureProperties.__webglTexture );\n\n\t}\n\n\tfunction setTexture2DArray( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 35866, textureProperties.__webglTexture );\n\n\t}\n\n\tfunction setTexture3D( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 32879, textureProperties.__webglTexture );\n\n\t}\n\n\tfunction setTextureCube( texture, slot ) {\n\n\t\tconst textureProperties = properties.get( texture );\n\n\t\tif ( texture.version > 0 && textureProperties.__version !== texture.version ) {\n\n\t\t\tuploadCubeTexture( textureProperties, texture, slot );\n\t\t\treturn;\n\n\t\t}\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\n\t}\n\n\tconst wrappingToGL = {\n\t\t[ RepeatWrapping ]: 10497,\n\t\t[ ClampToEdgeWrapping ]: 33071,\n\t\t[ MirroredRepeatWrapping ]: 33648\n\t};\n\n\tconst filterToGL = {\n\t\t[ NearestFilter ]: 9728,\n\t\t[ NearestMipmapNearestFilter ]: 9984,\n\t\t[ NearestMipmapLinearFilter ]: 9986,\n\n\t\t[ LinearFilter ]: 9729,\n\t\t[ LinearMipmapNearestFilter ]: 9985,\n\t\t[ LinearMipmapLinearFilter ]: 9987\n\t};\n\n\tfunction setTextureParameters( textureType, texture, supportsMips ) {\n\n\t\tif ( supportsMips ) {\n\n\t\t\t_gl.texParameteri( textureType, 10242, wrappingToGL[ texture.wrapS ] );\n\t\t\t_gl.texParameteri( textureType, 10243, wrappingToGL[ texture.wrapT ] );\n\n\t\t\tif ( textureType === 32879 || textureType === 35866 ) {\n\n\t\t\t\t_gl.texParameteri( textureType, 32882, wrappingToGL[ texture.wrapR ] );\n\n\t\t\t}\n\n\t\t\t_gl.texParameteri( textureType, 10240, filterToGL[ texture.magFilter ] );\n\t\t\t_gl.texParameteri( textureType, 10241, filterToGL[ texture.minFilter ] );\n\n\t\t} else {\n\n\t\t\t_gl.texParameteri( textureType, 10242, 33071 );\n\t\t\t_gl.texParameteri( textureType, 10243, 33071 );\n\n\t\t\tif ( textureType === 32879 || textureType === 35866 ) {\n\n\t\t\t\t_gl.texParameteri( textureType, 32882, 33071 );\n\n\t\t\t}\n\n\t\t\tif ( texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.' );\n\n\t\t\t}\n\n\t\t\t_gl.texParameteri( textureType, 10240, filterFallback( texture.magFilter ) );\n\t\t\t_gl.texParameteri( textureType, 10241, filterFallback( texture.minFilter ) );\n\n\t\t\tif ( texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.' );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( extensions.has( 'EXT_texture_filter_anisotropic' ) === true ) {\n\n\t\t\tconst extension = extensions.get( 'EXT_texture_filter_anisotropic' );\n\n\t\t\tif ( texture.type === FloatType && extensions.has( 'OES_texture_float_linear' ) === false ) return; // verify extension for WebGL 1 and WebGL 2\n\t\t\tif ( isWebGL2 === false && ( texture.type === HalfFloatType && extensions.has( 'OES_texture_half_float_linear' ) === false ) ) return; // verify extension for WebGL 1 only\n\n\t\t\tif ( texture.anisotropy > 1 || properties.get( texture ).__currentAnisotropy ) {\n\n\t\t\t\t_gl.texParameterf( textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min( texture.anisotropy, capabilities.getMaxAnisotropy() ) );\n\t\t\t\tproperties.get( texture ).__currentAnisotropy = texture.anisotropy;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction initTexture( textureProperties, texture ) {\n\n\t\tif ( textureProperties.__webglInit === undefined ) {\n\n\t\t\ttextureProperties.__webglInit = true;\n\n\t\t\ttexture.addEventListener( 'dispose', onTextureDispose );\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\n\t\t\tinfo.memory.textures ++;\n\n\t\t}\n\n\t}\n\n\tfunction uploadTexture( textureProperties, texture, slot ) {\n\n\t\tlet textureType = 3553;\n\n\t\tif ( texture.isDataTexture2DArray ) textureType = 35866;\n\t\tif ( texture.isDataTexture3D ) textureType = 32879;\n\n\t\tinitTexture( textureProperties, texture );\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( textureType, textureProperties.__webglTexture );\n\n\t\t_gl.pixelStorei( 37440, texture.flipY );\n\t\t_gl.pixelStorei( 37441, texture.premultiplyAlpha );\n\t\t_gl.pixelStorei( 3317, texture.unpackAlignment );\n\t\t_gl.pixelStorei( 37443, 0 );\n\n\t\tconst needsPowerOfTwo = textureNeedsPowerOfTwo( texture ) && isPowerOfTwo$1( texture.image ) === false;\n\t\tconst image = resizeImage( texture.image, needsPowerOfTwo, false, maxTextureSize );\n\n\t\tconst supportsMips = isPowerOfTwo$1( image ) || isWebGL2,\n\t\t\tglFormat = utils.convert( texture.format );\n\n\t\tlet glType = utils.convert( texture.type ),\n\t\t\tglInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\n\t\tsetTextureParameters( textureType, texture, supportsMips );\n\n\t\tlet mipmap;\n\t\tconst mipmaps = texture.mipmaps;\n\n\t\tif ( texture.isDepthTexture ) {\n\n\t\t\t// populate depth texture with dummy data\n\n\t\t\tglInternalFormat = 6402;\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\tif ( texture.type === FloatType ) {\n\n\t\t\t\t\tglInternalFormat = 36012;\n\n\t\t\t\t} else if ( texture.type === UnsignedIntType ) {\n\n\t\t\t\t\tglInternalFormat = 33190;\n\n\t\t\t\t} else if ( texture.type === UnsignedInt248Type ) {\n\n\t\t\t\t\tglInternalFormat = 35056;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tglInternalFormat = 33189; // WebGL2 requires sized internalformat for glTexImage2D\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( texture.type === FloatType ) {\n\n\t\t\t\t\tconsole.error( 'WebGLRenderer: Floating point depth texture requires WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// validation checks for WebGL 1\n\n\t\t\tif ( texture.format === DepthFormat && glInternalFormat === 6402 ) {\n\n\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t// DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT\n\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\tif ( texture.type !== UnsignedShortType && texture.type !== UnsignedIntType ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.' );\n\n\t\t\t\t\ttexture.type = UnsignedShortType;\n\t\t\t\t\tglType = utils.convert( texture.type );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( texture.format === DepthStencilFormat && glInternalFormat === 6402 ) {\n\n\t\t\t\t// Depth stencil textures need the DEPTH_STENCIL internal format\n\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\tglInternalFormat = 34041;\n\n\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t// DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL.\n\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\tif ( texture.type !== UnsignedInt248Type ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.' );\n\n\t\t\t\t\ttexture.type = UnsignedInt248Type;\n\t\t\t\t\tglType = utils.convert( texture.type );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tstate.texImage2D( 3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null );\n\n\t\t} else if ( texture.isDataTexture ) {\n\n\t\t\t// use manually created mipmaps if available\n\t\t\t// if there are no manual mipmaps\n\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\n\t\t\tif ( mipmaps.length > 0 && supportsMips ) {\n\n\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\tmipmap = mipmaps[ i ];\n\t\t\t\t\tstate.texImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t}\n\n\t\t\t\ttexture.generateMipmaps = false;\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\n\t\t\t} else {\n\n\t\t\t\tstate.texImage2D( 3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data );\n\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\n\t\t\t}\n\n\t\t} else if ( texture.isCompressedTexture ) {\n\n\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\tmipmap = mipmaps[ i ];\n\n\t\t\t\tif ( texture.format !== RGBAFormat && texture.format !== RGBFormat ) {\n\n\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\tstate.compressedTexImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()' );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage2D( 3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\n\t\t} else if ( texture.isDataTexture2DArray ) {\n\n\t\t\tstate.texImage3D( 35866, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );\n\t\t\ttextureProperties.__maxMipLevel = 0;\n\n\t\t} else if ( texture.isDataTexture3D ) {\n\n\t\t\tstate.texImage3D( 32879, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data );\n\t\t\ttextureProperties.__maxMipLevel = 0;\n\n\t\t} else {\n\n\t\t\t// regular Texture (image, video, canvas)\n\n\t\t\t// use manually created mipmaps if available\n\t\t\t// if there are no manual mipmaps\n\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\n\t\t\tif ( mipmaps.length > 0 && supportsMips ) {\n\n\t\t\t\tfor ( let i = 0, il = mipmaps.length; i < il; i ++ ) {\n\n\t\t\t\t\tmipmap = mipmaps[ i ];\n\t\t\t\t\tstate.texImage2D( 3553, i, glInternalFormat, glFormat, glType, mipmap );\n\n\t\t\t\t}\n\n\t\t\t\ttexture.generateMipmaps = false;\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\n\t\t\t} else {\n\n\t\t\t\tstate.texImage2D( 3553, 0, glInternalFormat, glFormat, glType, image );\n\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\tgenerateMipmap( textureType, texture, image.width, image.height );\n\n\t\t}\n\n\t\ttextureProperties.__version = texture.version;\n\n\t\tif ( texture.onUpdate ) texture.onUpdate( texture );\n\n\t}\n\n\tfunction uploadCubeTexture( textureProperties, texture, slot ) {\n\n\t\tif ( texture.image.length !== 6 ) return;\n\n\t\tinitTexture( textureProperties, texture );\n\n\t\tstate.activeTexture( 33984 + slot );\n\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\n\t\t_gl.pixelStorei( 37440, texture.flipY );\n\t\t_gl.pixelStorei( 37441, texture.premultiplyAlpha );\n\t\t_gl.pixelStorei( 3317, texture.unpackAlignment );\n\t\t_gl.pixelStorei( 37443, 0 );\n\n\t\tconst isCompressed = ( texture && ( texture.isCompressedTexture || texture.image[ 0 ].isCompressedTexture ) );\n\t\tconst isDataTexture = ( texture.image[ 0 ] && texture.image[ 0 ].isDataTexture );\n\n\t\tconst cubeImage = [];\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tif ( ! isCompressed && ! isDataTexture ) {\n\n\t\t\t\tcubeImage[ i ] = resizeImage( texture.image[ i ], false, true, maxCubemapSize );\n\n\t\t\t} else {\n\n\t\t\t\tcubeImage[ i ] = isDataTexture ? texture.image[ i ].image : texture.image[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst image = cubeImage[ 0 ],\n\t\t\tsupportsMips = isPowerOfTwo$1( image ) || isWebGL2,\n\t\t\tglFormat = utils.convert( texture.format ),\n\t\t\tglType = utils.convert( texture.type ),\n\t\t\tglInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\n\t\tsetTextureParameters( 34067, texture, supportsMips );\n\n\t\tlet mipmaps;\n\n\t\tif ( isCompressed ) {\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tmipmaps = cubeImage[ i ].mipmaps;\n\n\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\n\t\t\t\t\tif ( texture.format !== RGBAFormat && texture.format !== RGBFormat ) {\n\n\t\t\t\t\t\tif ( glFormat !== null ) {\n\n\t\t\t\t\t\t\tstate.compressedTexImage2D( 34069 + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()' );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tstate.texImage2D( 34069 + i, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\n\t\t} else {\n\n\t\t\tmipmaps = texture.mipmaps;\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tif ( isDataTexture ) {\n\n\t\t\t\t\tstate.texImage2D( 34069 + i, 0, glInternalFormat, cubeImage[ i ].width, cubeImage[ i ].height, 0, glFormat, glType, cubeImage[ i ].data );\n\n\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\t\t\t\t\t\tconst mipmapImage = mipmap.image[ i ].image;\n\n\t\t\t\t\t\tstate.texImage2D( 34069 + i, j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tstate.texImage2D( 34069 + i, 0, glInternalFormat, glFormat, glType, cubeImage[ i ] );\n\n\t\t\t\t\tfor ( let j = 0; j < mipmaps.length; j ++ ) {\n\n\t\t\t\t\t\tconst mipmap = mipmaps[ j ];\n\n\t\t\t\t\t\tstate.texImage2D( 34069 + i, j + 1, glInternalFormat, glFormat, glType, mipmap.image[ i ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttextureProperties.__maxMipLevel = mipmaps.length;\n\n\t\t}\n\n\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t// We assume images for cube map have the same size.\n\t\t\tgenerateMipmap( 34067, texture, image.width, image.height );\n\n\t\t}\n\n\t\ttextureProperties.__version = texture.version;\n\n\t\tif ( texture.onUpdate ) texture.onUpdate( texture );\n\n\t}\n\n\t// Render targets\n\n\t// Setup storage for target texture and bind it to correct framebuffer\n\tfunction setupFrameBufferTexture( framebuffer, renderTarget, texture, attachment, textureTarget ) {\n\n\t\tconst glFormat = utils.convert( texture.format );\n\t\tconst glType = utils.convert( texture.type );\n\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\n\t\tif ( textureTarget === 32879 || textureTarget === 35866 ) {\n\n\t\t\tstate.texImage3D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, renderTarget.depth, 0, glFormat, glType, null );\n\n\t\t} else {\n\n\t\t\tstate.texImage2D( textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null );\n\n\t\t}\n\n\t\tstate.bindFramebuffer( 36160, framebuffer );\n\t\t_gl.framebufferTexture2D( 36160, attachment, textureTarget, properties.get( texture ).__webglTexture, 0 );\n\t\tstate.bindFramebuffer( 36160, null );\n\n\t}\n\n\t// Setup storage for internal depth/stencil buffers and bind to correct framebuffer\n\tfunction setupRenderBufferStorage( renderbuffer, renderTarget, isMultisample ) {\n\n\t\t_gl.bindRenderbuffer( 36161, renderbuffer );\n\n\t\tif ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {\n\n\t\t\tlet glInternalFormat = 33189;\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tconst depthTexture = renderTarget.depthTexture;\n\n\t\t\t\tif ( depthTexture && depthTexture.isDepthTexture ) {\n\n\t\t\t\t\tif ( depthTexture.type === FloatType ) {\n\n\t\t\t\t\t\tglInternalFormat = 36012;\n\n\t\t\t\t\t} else if ( depthTexture.type === UnsignedIntType ) {\n\n\t\t\t\t\t\tglInternalFormat = 33190;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\t_gl.framebufferRenderbuffer( 36160, 36096, 36161, renderbuffer );\n\n\t\t} else if ( renderTarget.depthBuffer && renderTarget.stencilBuffer ) {\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, 35056, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, 34041, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\n\t\t\t_gl.framebufferRenderbuffer( 36160, 33306, 36161, renderbuffer );\n\n\t\t} else {\n\n\t\t\t// Use the first texture for MRT so far\n\t\t\tconst texture = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture[ 0 ] : renderTarget.texture;\n\n\t\t\tconst glFormat = utils.convert( texture.format );\n\t\t\tconst glType = utils.convert( texture.type );\n\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\n\t\t\tif ( isMultisample ) {\n\n\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\n\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.renderbufferStorage( 36161, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t}\n\n\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t}\n\n\t// Setup resources for a Depth Texture for a FBO (needs an extension)\n\tfunction setupDepthTexture( framebuffer, renderTarget ) {\n\n\t\tconst isCube = ( renderTarget && renderTarget.isWebGLCubeRenderTarget );\n\t\tif ( isCube ) throw new Error( 'Depth Texture with cube render targets is not supported' );\n\n\t\tstate.bindFramebuffer( 36160, framebuffer );\n\n\t\tif ( ! ( renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture ) ) {\n\n\t\t\tthrow new Error( 'renderTarget.depthTexture must be an instance of THREE.DepthTexture' );\n\n\t\t}\n\n\t\t// upload an empty depth texture with framebuffer size\n\t\tif ( ! properties.get( renderTarget.depthTexture ).__webglTexture ||\n\t\t\t\trenderTarget.depthTexture.image.width !== renderTarget.width ||\n\t\t\t\trenderTarget.depthTexture.image.height !== renderTarget.height ) {\n\n\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\n\t\t}\n\n\t\tsetTexture2D( renderTarget.depthTexture, 0 );\n\n\t\tconst webglDepthTexture = properties.get( renderTarget.depthTexture ).__webglTexture;\n\n\t\tif ( renderTarget.depthTexture.format === DepthFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( 36160, 36096, 3553, webglDepthTexture, 0 );\n\n\t\t} else if ( renderTarget.depthTexture.format === DepthStencilFormat ) {\n\n\t\t\t_gl.framebufferTexture2D( 36160, 33306, 3553, webglDepthTexture, 0 );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'Unknown depthTexture format' );\n\n\t\t}\n\n\t}\n\n\t// Setup GL resources for a non-texture depth buffer\n\tfunction setupDepthRenderbuffer( renderTarget ) {\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\n\t\tif ( renderTarget.depthTexture ) {\n\n\t\t\tif ( isCube ) throw new Error( 'target.depthTexture not supported in Cube render targets' );\n\n\t\t\tsetupDepthTexture( renderTargetProperties.__webglFramebuffer, renderTarget );\n\n\t\t} else {\n\n\t\t\tif ( isCube ) {\n\n\t\t\t\trenderTargetProperties.__webglDepthbuffer = [];\n\n\t\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\t\tstate.bindFramebuffer( 36160, renderTargetProperties.__webglFramebuffer[ i ] );\n\t\t\t\t\trenderTargetProperties.__webglDepthbuffer[ i ] = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer[ i ], renderTarget, false );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstate.bindFramebuffer( 36160, renderTargetProperties.__webglFramebuffer );\n\t\t\t\trenderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer();\n\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthbuffer, renderTarget, false );\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.bindFramebuffer( 36160, null );\n\n\t}\n\n\t// Set up GL resources for the render target\n\tfunction setupRenderTarget( renderTarget ) {\n\n\t\tconst texture = renderTarget.texture;\n\n\t\tconst renderTargetProperties = properties.get( renderTarget );\n\t\tconst textureProperties = properties.get( texture );\n\n\t\trenderTarget.addEventListener( 'dispose', onRenderTargetDispose );\n\n\t\tif ( renderTarget.isWebGLMultipleRenderTargets !== true ) {\n\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tinfo.memory.textures ++;\n\n\t\t}\n\n\t\tconst isCube = ( renderTarget.isWebGLCubeRenderTarget === true );\n\t\tconst isMultipleRenderTargets = ( renderTarget.isWebGLMultipleRenderTargets === true );\n\t\tconst isMultisample = ( renderTarget.isWebGLMultisampleRenderTarget === true );\n\t\tconst isRenderTarget3D = texture.isDataTexture3D || texture.isDataTexture2DArray;\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\t// Handles WebGL2 RGBFormat fallback - #18858\n\n\t\tif ( isWebGL2 && texture.format === RGBFormat && ( texture.type === FloatType || texture.type === HalfFloatType ) ) {\n\n\t\t\ttexture.format = RGBAFormat;\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.' );\n\n\t\t}\n\n\t\t// Setup framebuffer\n\n\t\tif ( isCube ) {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\trenderTargetProperties.__webglFramebuffer[ i ] = _gl.createFramebuffer();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\tif ( isMultipleRenderTargets ) {\n\n\t\t\t\tif ( capabilities.drawBuffers ) {\n\n\t\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst attachmentProperties = properties.get( textures[ i ] );\n\n\t\t\t\t\t\tif ( attachmentProperties.__webglTexture === undefined ) {\n\n\t\t\t\t\t\t\tattachmentProperties.__webglTexture = _gl.createTexture();\n\n\t\t\t\t\t\t\tinfo.memory.textures ++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.' );\n\n\t\t\t\t}\n\n\t\t\t} else if ( isMultisample ) {\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer();\n\n\t\t\t\t\t_gl.bindRenderbuffer( 36161, renderTargetProperties.__webglColorRenderbuffer );\n\n\t\t\t\t\tconst glFormat = utils.convert( texture.format );\n\t\t\t\t\tconst glType = utils.convert( texture.type );\n\t\t\t\t\tconst glInternalFormat = getInternalFormat( texture.internalFormat, glFormat, glType );\n\t\t\t\t\tconst samples = getRenderTargetSamples( renderTarget );\n\t\t\t\t\t_gl.renderbufferStorageMultisample( 36161, samples, glInternalFormat, renderTarget.width, renderTarget.height );\n\n\t\t\t\t\tstate.bindFramebuffer( 36160, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\t\t_gl.framebufferRenderbuffer( 36160, 36064, 36161, renderTargetProperties.__webglColorRenderbuffer );\n\t\t\t\t\t_gl.bindRenderbuffer( 36161, null );\n\n\t\t\t\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\t\tsetupRenderBufferStorage( renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.bindFramebuffer( 36160, null );\n\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Setup color buffer\n\n\t\tif ( isCube ) {\n\n\t\t\tstate.bindTexture( 34067, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( 34067, texture, supportsMips );\n\n\t\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer[ i ], renderTarget, texture, 36064, 34069 + i );\n\n\t\t\t}\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( 34067, texture, renderTarget.width, renderTarget.height );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( 34067, null );\n\n\t\t} else if ( isMultipleRenderTargets ) {\n\n\t\t\tconst textures = renderTarget.texture;\n\n\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\tconst attachment = textures[ i ];\n\t\t\t\tconst attachmentProperties = properties.get( attachment );\n\n\t\t\t\tstate.bindTexture( 3553, attachmentProperties.__webglTexture );\n\t\t\t\tsetTextureParameters( 3553, attachment, supportsMips );\n\t\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, attachment, 36064 + i, 3553 );\n\n\t\t\t\tif ( textureNeedsGenerateMipmaps( attachment, supportsMips ) ) {\n\n\t\t\t\t\tgenerateMipmap( 3553, attachment, renderTarget.width, renderTarget.height );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( 3553, null );\n\n\t\t} else {\n\n\t\t\tlet glTextureType = 3553;\n\n\t\t\tif ( isRenderTarget3D ) {\n\n\t\t\t\t// Render targets containing layers, i.e: Texture 3D and 2d arrays\n\n\t\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\t\tconst isTexture3D = texture.isDataTexture3D;\n\t\t\t\t\tglTextureType = isTexture3D ? 32879 : 35866;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( glTextureType, textureProperties.__webglTexture );\n\t\t\tsetTextureParameters( glTextureType, texture, supportsMips );\n\t\t\tsetupFrameBufferTexture( renderTargetProperties.__webglFramebuffer, renderTarget, texture, 36064, glTextureType );\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tgenerateMipmap( glTextureType, texture, renderTarget.width, renderTarget.height, renderTarget.depth );\n\n\t\t\t}\n\n\t\t\tstate.bindTexture( glTextureType, null );\n\n\t\t}\n\n\t\t// Setup depth and stencil buffers\n\n\t\tif ( renderTarget.depthBuffer ) {\n\n\t\t\tsetupDepthRenderbuffer( renderTarget );\n\n\t\t}\n\n\t}\n\n\tfunction updateRenderTargetMipmap( renderTarget ) {\n\n\t\tconst supportsMips = isPowerOfTwo$1( renderTarget ) || isWebGL2;\n\n\t\tconst textures = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture : [ renderTarget.texture ];\n\n\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\tconst texture = textures[ i ];\n\n\t\t\tif ( textureNeedsGenerateMipmaps( texture, supportsMips ) ) {\n\n\t\t\t\tconst target = renderTarget.isWebGLCubeRenderTarget ? 34067 : 3553;\n\t\t\t\tconst webglTexture = properties.get( texture ).__webglTexture;\n\n\t\t\t\tstate.bindTexture( target, webglTexture );\n\t\t\t\tgenerateMipmap( target, texture, renderTarget.width, renderTarget.height );\n\t\t\t\tstate.bindTexture( target, null );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction updateMultisampleRenderTarget( renderTarget ) {\n\n\t\tif ( renderTarget.isWebGLMultisampleRenderTarget ) {\n\n\t\t\tif ( isWebGL2 ) {\n\n\t\t\t\tconst width = renderTarget.width;\n\t\t\t\tconst height = renderTarget.height;\n\t\t\t\tlet mask = 16384;\n\n\t\t\t\tif ( renderTarget.depthBuffer ) mask |= 256;\n\t\t\t\tif ( renderTarget.stencilBuffer ) mask |= 1024;\n\n\t\t\t\tconst renderTargetProperties = properties.get( renderTarget );\n\n\t\t\t\tstate.bindFramebuffer( 36008, renderTargetProperties.__webglMultisampledFramebuffer );\n\t\t\t\tstate.bindFramebuffer( 36009, renderTargetProperties.__webglFramebuffer );\n\n\t\t\t\t_gl.blitFramebuffer( 0, 0, width, height, 0, 0, width, height, mask, 9728 );\n\n\t\t\t\tstate.bindFramebuffer( 36008, null );\n\t\t\t\tstate.bindFramebuffer( 36009, renderTargetProperties.__webglMultisampledFramebuffer );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction getRenderTargetSamples( renderTarget ) {\n\n\t\treturn ( isWebGL2 && renderTarget.isWebGLMultisampleRenderTarget ) ?\n\t\t\tMath.min( maxSamples, renderTarget.samples ) : 0;\n\n\t}\n\n\tfunction updateVideoTexture( texture ) {\n\n\t\tconst frame = info.render.frame;\n\n\t\t// Check the last frame we updated the VideoTexture\n\n\t\tif ( _videoTextures.get( texture ) !== frame ) {\n\n\t\t\t_videoTextures.set( texture, frame );\n\t\t\ttexture.update();\n\n\t\t}\n\n\t}\n\n\t// backwards compatibility\n\n\tlet warnedTexture2D = false;\n\tlet warnedTextureCube = false;\n\n\tfunction safeSetTexture2D( texture, slot ) {\n\n\t\tif ( texture && texture.isWebGLRenderTarget ) {\n\n\t\t\tif ( warnedTexture2D === false ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLTextures.safeSetTexture2D: don\\'t use render targets as textures. Use their .texture property instead.' );\n\t\t\t\twarnedTexture2D = true;\n\n\t\t\t}\n\n\t\t\ttexture = texture.texture;\n\n\t\t}\n\n\t\tsetTexture2D( texture, slot );\n\n\t}\n\n\tfunction safeSetTextureCube( texture, slot ) {\n\n\t\tif ( texture && texture.isWebGLCubeRenderTarget ) {\n\n\t\t\tif ( warnedTextureCube === false ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLTextures.safeSetTextureCube: don\\'t use cube render targets as textures. Use their .texture property instead.' );\n\t\t\t\twarnedTextureCube = true;\n\n\t\t\t}\n\n\t\t\ttexture = texture.texture;\n\n\t\t}\n\n\n\t\tsetTextureCube( texture, slot );\n\n\t}\n\n\t//\n\n\tthis.allocateTextureUnit = allocateTextureUnit;\n\tthis.resetTextureUnits = resetTextureUnits;\n\n\tthis.setTexture2D = setTexture2D;\n\tthis.setTexture2DArray = setTexture2DArray;\n\tthis.setTexture3D = setTexture3D;\n\tthis.setTextureCube = setTextureCube;\n\tthis.setupRenderTarget = setupRenderTarget;\n\tthis.updateRenderTargetMipmap = updateRenderTargetMipmap;\n\tthis.updateMultisampleRenderTarget = updateMultisampleRenderTarget;\n\n\tthis.safeSetTexture2D = safeSetTexture2D;\n\tthis.safeSetTextureCube = safeSetTextureCube;\n\n}\n\nfunction WebGLUtils( gl, extensions, capabilities ) {\n\n\tconst isWebGL2 = capabilities.isWebGL2;\n\n\tfunction convert( p ) {\n\n\t\tlet extension;\n\n\t\tif ( p === UnsignedByteType ) return 5121;\n\t\tif ( p === UnsignedShort4444Type ) return 32819;\n\t\tif ( p === UnsignedShort5551Type ) return 32820;\n\t\tif ( p === UnsignedShort565Type ) return 33635;\n\n\t\tif ( p === ByteType ) return 5120;\n\t\tif ( p === ShortType ) return 5122;\n\t\tif ( p === UnsignedShortType ) return 5123;\n\t\tif ( p === IntType ) return 5124;\n\t\tif ( p === UnsignedIntType ) return 5125;\n\t\tif ( p === FloatType ) return 5126;\n\n\t\tif ( p === HalfFloatType ) {\n\n\t\t\tif ( isWebGL2 ) return 5131;\n\n\t\t\textension = extensions.get( 'OES_texture_half_float' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.HALF_FLOAT_OES;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === AlphaFormat ) return 6406;\n\t\tif ( p === RGBFormat ) return 6407;\n\t\tif ( p === RGBAFormat ) return 6408;\n\t\tif ( p === LuminanceFormat ) return 6409;\n\t\tif ( p === LuminanceAlphaFormat ) return 6410;\n\t\tif ( p === DepthFormat ) return 6402;\n\t\tif ( p === DepthStencilFormat ) return 34041;\n\t\tif ( p === RedFormat ) return 6403;\n\n\t\t// WebGL2 formats.\n\n\t\tif ( p === RedIntegerFormat ) return 36244;\n\t\tif ( p === RGFormat ) return 33319;\n\t\tif ( p === RGIntegerFormat ) return 33320;\n\t\tif ( p === RGBIntegerFormat ) return 36248;\n\t\tif ( p === RGBAIntegerFormat ) return 36249;\n\n\t\tif ( p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format ||\n\t\t\tp === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_S3TC_DXT1_Format ) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT1_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT3_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\tif ( p === RGBA_S3TC_DXT5_Format ) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format ||\n\t\t\tp === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGB_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_4BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\tif ( p === RGBA_PVRTC_2BPPV1_Format ) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC1_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc1' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.COMPRESSED_RGB_ETC1_WEBGL;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_etc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\tif ( p === RGB_ETC2_Format ) return extension.COMPRESSED_RGB8_ETC2;\n\t\t\t\tif ( p === RGBA_ETC2_EAC_Format ) return extension.COMPRESSED_RGBA8_ETC2_EAC;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format ||\n\t\t\tp === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format ||\n\t\t\tp === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format ||\n\t\t\tp === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format ||\n\t\t\tp === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_4x4_Format || p === SRGB8_ALPHA8_ASTC_5x4_Format || p === SRGB8_ALPHA8_ASTC_5x5_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_6x5_Format || p === SRGB8_ALPHA8_ASTC_6x6_Format || p === SRGB8_ALPHA8_ASTC_8x5_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_8x6_Format || p === SRGB8_ALPHA8_ASTC_8x8_Format || p === SRGB8_ALPHA8_ASTC_10x5_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_10x6_Format || p === SRGB8_ALPHA8_ASTC_10x8_Format || p === SRGB8_ALPHA8_ASTC_10x10_Format ||\n\t\t\tp === SRGB8_ALPHA8_ASTC_12x10_Format || p === SRGB8_ALPHA8_ASTC_12x12_Format ) {\n\n\t\t\textension = extensions.get( 'WEBGL_compressed_texture_astc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\t// TODO Complete?\n\n\t\t\t\treturn p;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === RGBA_BPTC_Format ) {\n\n\t\t\textension = extensions.get( 'EXT_texture_compression_bptc' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\t// TODO Complete?\n\n\t\t\t\treturn p;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( p === UnsignedInt248Type ) {\n\n\t\t\tif ( isWebGL2 ) return 34042;\n\n\t\t\textension = extensions.get( 'WEBGL_depth_texture' );\n\n\t\t\tif ( extension !== null ) {\n\n\t\t\t\treturn extension.UNSIGNED_INT_24_8_WEBGL;\n\n\t\t\t} else {\n\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn { convert: convert };\n\n}\n\nclass ArrayCamera extends PerspectiveCamera {\n\n\tconstructor( array = [] ) {\n\n\t\tsuper();\n\n\t\tthis.cameras = array;\n\n\t}\n\n}\n\nArrayCamera.prototype.isArrayCamera = true;\n\nclass Group extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'Group';\n\n\t}\n\n}\n\nGroup.prototype.isGroup = true;\n\nconst _moveEvent = { type: 'move' };\n\nclass WebXRController {\n\n\tconstructor() {\n\n\t\tthis._targetRay = null;\n\t\tthis._grip = null;\n\t\tthis._hand = null;\n\n\t}\n\n\tgetHandSpace() {\n\n\t\tif ( this._hand === null ) {\n\n\t\t\tthis._hand = new Group();\n\t\t\tthis._hand.matrixAutoUpdate = false;\n\t\t\tthis._hand.visible = false;\n\n\t\t\tthis._hand.joints = {};\n\t\t\tthis._hand.inputState = { pinching: false };\n\n\t\t}\n\n\t\treturn this._hand;\n\n\t}\n\n\tgetTargetRaySpace() {\n\n\t\tif ( this._targetRay === null ) {\n\n\t\t\tthis._targetRay = new Group();\n\t\t\tthis._targetRay.matrixAutoUpdate = false;\n\t\t\tthis._targetRay.visible = false;\n\t\t\tthis._targetRay.hasLinearVelocity = false;\n\t\t\tthis._targetRay.linearVelocity = new Vector3();\n\t\t\tthis._targetRay.hasAngularVelocity = false;\n\t\t\tthis._targetRay.angularVelocity = new Vector3();\n\n\t\t}\n\n\t\treturn this._targetRay;\n\n\t}\n\n\tgetGripSpace() {\n\n\t\tif ( this._grip === null ) {\n\n\t\t\tthis._grip = new Group();\n\t\t\tthis._grip.matrixAutoUpdate = false;\n\t\t\tthis._grip.visible = false;\n\t\t\tthis._grip.hasLinearVelocity = false;\n\t\t\tthis._grip.linearVelocity = new Vector3();\n\t\t\tthis._grip.hasAngularVelocity = false;\n\t\t\tthis._grip.angularVelocity = new Vector3();\n\n\t\t}\n\n\t\treturn this._grip;\n\n\t}\n\n\tdispatchEvent( event ) {\n\n\t\tif ( this._targetRay !== null ) {\n\n\t\t\tthis._targetRay.dispatchEvent( event );\n\n\t\t}\n\n\t\tif ( this._grip !== null ) {\n\n\t\t\tthis._grip.dispatchEvent( event );\n\n\t\t}\n\n\t\tif ( this._hand !== null ) {\n\n\t\t\tthis._hand.dispatchEvent( event );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tdisconnect( inputSource ) {\n\n\t\tthis.dispatchEvent( { type: 'disconnected', data: inputSource } );\n\n\t\tif ( this._targetRay !== null ) {\n\n\t\t\tthis._targetRay.visible = false;\n\n\t\t}\n\n\t\tif ( this._grip !== null ) {\n\n\t\t\tthis._grip.visible = false;\n\n\t\t}\n\n\t\tif ( this._hand !== null ) {\n\n\t\t\tthis._hand.visible = false;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tupdate( inputSource, frame, referenceSpace ) {\n\n\t\tlet inputPose = null;\n\t\tlet gripPose = null;\n\t\tlet handPose = null;\n\n\t\tconst targetRay = this._targetRay;\n\t\tconst grip = this._grip;\n\t\tconst hand = this._hand;\n\n\t\tif ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) {\n\n\t\t\tif ( targetRay !== null ) {\n\n\t\t\t\tinputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );\n\n\t\t\t\tif ( inputPose !== null ) {\n\n\t\t\t\t\ttargetRay.matrix.fromArray( inputPose.transform.matrix );\n\t\t\t\t\ttargetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );\n\n\t\t\t\t\tif ( inputPose.linearVelocity ) {\n\n\t\t\t\t\t\ttargetRay.hasLinearVelocity = true;\n\t\t\t\t\t\ttargetRay.linearVelocity.copy( inputPose.linearVelocity );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttargetRay.hasLinearVelocity = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( inputPose.angularVelocity ) {\n\n\t\t\t\t\t\ttargetRay.hasAngularVelocity = true;\n\t\t\t\t\t\ttargetRay.angularVelocity.copy( inputPose.angularVelocity );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttargetRay.hasAngularVelocity = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.dispatchEvent( _moveEvent );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( hand && inputSource.hand ) {\n\n\t\t\t\thandPose = true;\n\n\t\t\t\tfor ( const inputjoint of inputSource.hand.values() ) {\n\n\t\t\t\t\t// Update the joints groups with the XRJoint poses\n\t\t\t\t\tconst jointPose = frame.getJointPose( inputjoint, referenceSpace );\n\n\t\t\t\t\tif ( hand.joints[ inputjoint.jointName ] === undefined ) {\n\n\t\t\t\t\t\t// The transform of this joint will be updated with the joint pose on each frame\n\t\t\t\t\t\tconst joint = new Group();\n\t\t\t\t\t\tjoint.matrixAutoUpdate = false;\n\t\t\t\t\t\tjoint.visible = false;\n\t\t\t\t\t\thand.joints[ inputjoint.jointName ] = joint;\n\t\t\t\t\t\t// ??\n\t\t\t\t\t\thand.add( joint );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst joint = hand.joints[ inputjoint.jointName ];\n\n\t\t\t\t\tif ( jointPose !== null ) {\n\n\t\t\t\t\t\tjoint.matrix.fromArray( jointPose.transform.matrix );\n\t\t\t\t\t\tjoint.matrix.decompose( joint.position, joint.rotation, joint.scale );\n\t\t\t\t\t\tjoint.jointRadius = jointPose.radius;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tjoint.visible = jointPose !== null;\n\n\t\t\t\t}\n\n\t\t\t\t// Custom events\n\n\t\t\t\t// Check pinchz\n\t\t\t\tconst indexTip = hand.joints[ 'index-finger-tip' ];\n\t\t\t\tconst thumbTip = hand.joints[ 'thumb-tip' ];\n\t\t\t\tconst distance = indexTip.position.distanceTo( thumbTip.position );\n\n\t\t\t\tconst distanceToPinch = 0.02;\n\t\t\t\tconst threshold = 0.005;\n\n\t\t\t\tif ( hand.inputState.pinching && distance > distanceToPinch + threshold ) {\n\n\t\t\t\t\thand.inputState.pinching = false;\n\t\t\t\t\tthis.dispatchEvent( {\n\t\t\t\t\t\ttype: 'pinchend',\n\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\ttarget: this\n\t\t\t\t\t} );\n\n\t\t\t\t} else if ( ! hand.inputState.pinching && distance <= distanceToPinch - threshold ) {\n\n\t\t\t\t\thand.inputState.pinching = true;\n\t\t\t\t\tthis.dispatchEvent( {\n\t\t\t\t\t\ttype: 'pinchstart',\n\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\ttarget: this\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( grip !== null && inputSource.gripSpace ) {\n\n\t\t\t\t\tgripPose = frame.getPose( inputSource.gripSpace, referenceSpace );\n\n\t\t\t\t\tif ( gripPose !== null ) {\n\n\t\t\t\t\t\tgrip.matrix.fromArray( gripPose.transform.matrix );\n\t\t\t\t\t\tgrip.matrix.decompose( grip.position, grip.rotation, grip.scale );\n\n\t\t\t\t\t\tif ( gripPose.linearVelocity ) {\n\n\t\t\t\t\t\t\tgrip.hasLinearVelocity = true;\n\t\t\t\t\t\t\tgrip.linearVelocity.copy( gripPose.linearVelocity );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tgrip.hasLinearVelocity = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( gripPose.angularVelocity ) {\n\n\t\t\t\t\t\t\tgrip.hasAngularVelocity = true;\n\t\t\t\t\t\t\tgrip.angularVelocity.copy( gripPose.angularVelocity );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tgrip.hasAngularVelocity = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( targetRay !== null ) {\n\n\t\t\ttargetRay.visible = ( inputPose !== null );\n\n\t\t}\n\n\t\tif ( grip !== null ) {\n\n\t\t\tgrip.visible = ( gripPose !== null );\n\n\t\t}\n\n\t\tif ( hand !== null ) {\n\n\t\t\thand.visible = ( handPose !== null );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass WebXRManager extends EventDispatcher {\n\n\tconstructor( renderer, gl ) {\n\n\t\tsuper();\n\n\t\tconst scope = this;\n\t\tconst state = renderer.state;\n\n\t\tlet session = null;\n\t\tlet framebufferScaleFactor = 1.0;\n\n\t\tlet referenceSpace = null;\n\t\tlet referenceSpaceType = 'local-floor';\n\n\t\tlet pose = null;\n\t\tlet glBinding = null;\n\t\tlet glFramebuffer = null;\n\t\tlet glProjLayer = null;\n\n\t\tconst controllers = [];\n\t\tconst inputSourcesMap = new Map();\n\n\t\t//\n\n\t\tconst cameraL = new PerspectiveCamera();\n\t\tcameraL.layers.enable( 1 );\n\t\tcameraL.viewport = new Vector4();\n\n\t\tconst cameraR = new PerspectiveCamera();\n\t\tcameraR.layers.enable( 2 );\n\t\tcameraR.viewport = new Vector4();\n\n\t\tconst cameras = [ cameraL, cameraR ];\n\n\t\tconst cameraVR = new ArrayCamera();\n\t\tcameraVR.layers.enable( 1 );\n\t\tcameraVR.layers.enable( 2 );\n\n\t\tlet _currentDepthNear = null;\n\t\tlet _currentDepthFar = null;\n\n\t\t//\n\n\t\tthis.cameraAutoUpdate = true;\n\t\tthis.enabled = false;\n\n\t\tthis.isPresenting = false;\n\n\t\tthis.getController = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getTargetRaySpace();\n\n\t\t};\n\n\t\tthis.getControllerGrip = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getGripSpace();\n\n\t\t};\n\n\t\tthis.getHand = function ( index ) {\n\n\t\t\tlet controller = controllers[ index ];\n\n\t\t\tif ( controller === undefined ) {\n\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[ index ] = controller;\n\n\t\t\t}\n\n\t\t\treturn controller.getHandSpace();\n\n\t\t};\n\n\t\t//\n\n\t\tfunction onSessionEvent( event ) {\n\n\t\t\tconst controller = inputSourcesMap.get( event.inputSource );\n\n\t\t\tif ( controller ) {\n\n\t\t\t\tcontroller.dispatchEvent( { type: event.type, data: event.inputSource } );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onSessionEnd() {\n\n\t\t\tinputSourcesMap.forEach( function ( controller, inputSource ) {\n\n\t\t\t\tcontroller.disconnect( inputSource );\n\n\t\t\t} );\n\n\t\t\tinputSourcesMap.clear();\n\n\t\t\t_currentDepthNear = null;\n\t\t\t_currentDepthFar = null;\n\n\t\t\t// restore framebuffer/rendering state\n\n\t\t\tstate.bindXRFramebuffer( null );\n\t\t\trenderer.setRenderTarget( renderer.getRenderTarget() );\n\n\t\t\t//\n\n\t\t\tanimation.stop();\n\n\t\t\tscope.isPresenting = false;\n\n\t\t\tscope.dispatchEvent( { type: 'sessionend' } );\n\n\t\t}\n\n\t\tthis.setFramebufferScaleFactor = function ( value ) {\n\n\t\t\tframebufferScaleFactor = value;\n\n\t\t\tif ( scope.isPresenting === true ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebXRManager: Cannot change framebuffer scale while presenting.' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.setReferenceSpaceType = function ( value ) {\n\n\t\t\treferenceSpaceType = value;\n\n\t\t\tif ( scope.isPresenting === true ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebXRManager: Cannot change reference space type while presenting.' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.getReferenceSpace = function () {\n\n\t\t\treturn referenceSpace;\n\n\t\t};\n\n\t\tthis.getSession = function () {\n\n\t\t\treturn session;\n\n\t\t};\n\n\t\tthis.setSession = async function ( value ) {\n\n\t\t\tsession = value;\n\n\t\t\tif ( session !== null ) {\n\n\t\t\t\tsession.addEventListener( 'select', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'selectstart', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'selectend', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeeze', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeezestart', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'squeezeend', onSessionEvent );\n\t\t\t\tsession.addEventListener( 'end', onSessionEnd );\n\t\t\t\tsession.addEventListener( 'inputsourceschange', onInputSourcesChange );\n\n\t\t\t\tconst attributes = gl.getContextAttributes();\n\n\t\t\t\tif ( attributes.xrCompatible !== true ) {\n\n\t\t\t\t\tawait gl.makeXRCompatible();\n\n\t\t\t\t}\n\n\t\t\t\tif ( session.renderState.layers === undefined ) {\n\n\t\t\t\t\tconst layerInit = {\n\t\t\t\t\t\tantialias: attributes.antialias,\n\t\t\t\t\t\talpha: attributes.alpha,\n\t\t\t\t\t\tdepth: attributes.depth,\n\t\t\t\t\t\tstencil: attributes.stencil,\n\t\t\t\t\t\tframebufferScaleFactor: framebufferScaleFactor\n\t\t\t\t\t};\n\n\t\t\t\t\t// eslint-disable-next-line no-undef\n\t\t\t\t\tconst baseLayer = new XRWebGLLayer( session, gl, layerInit );\n\n\t\t\t\t\tsession.updateRenderState( { baseLayer: baseLayer } );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tlet depthFormat = 0;\n\n\t\t\t\t\tif ( attributes.depth ) {\n\n\t\t\t\t\t\tdepthFormat = attributes.stencil ? 34041 : 6402;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst projectionlayerInit = {\n\t\t\t\t\t\tcolorFormat: attributes.alpha ? 6408 : 6407,\n\t\t\t\t\t\tdepthFormat: depthFormat,\n\t\t\t\t\t\tscaleFactor: framebufferScaleFactor\n\t\t\t\t\t};\n\n\t\t\t\t\t// eslint-disable-next-line no-undef\n\t\t\t\t\tglBinding = new XRWebGLBinding( session, gl );\n\n\t\t\t\t\tglProjLayer = glBinding.createProjectionLayer( projectionlayerInit );\n\n\t\t\t\t\tglFramebuffer = gl.createFramebuffer();\n\n\t\t\t\t\tsession.updateRenderState( { layers: [ glProjLayer ] } );\n\n\t\t\t\t}\n\n\t\t\t\treferenceSpace = await session.requestReferenceSpace( referenceSpaceType );\n\n\t\t\t\tanimation.setContext( session );\n\t\t\t\tanimation.start();\n\n\t\t\t\tscope.isPresenting = true;\n\n\t\t\t\tscope.dispatchEvent( { type: 'sessionstart' } );\n\n\t\t\t}\n\n\t\t};\n\n\t\tfunction onInputSourcesChange( event ) {\n\n\t\t\tconst inputSources = session.inputSources;\n\n\t\t\t// Assign inputSources to available controllers\n\n\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\tinputSourcesMap.set( inputSources[ i ], controllers[ i ] );\n\n\t\t\t}\n\n\t\t\t// Notify disconnected\n\n\t\t\tfor ( let i = 0; i < event.removed.length; i ++ ) {\n\n\t\t\t\tconst inputSource = event.removed[ i ];\n\t\t\t\tconst controller = inputSourcesMap.get( inputSource );\n\n\t\t\t\tif ( controller ) {\n\n\t\t\t\t\tcontroller.dispatchEvent( { type: 'disconnected', data: inputSource } );\n\t\t\t\t\tinputSourcesMap.delete( inputSource );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Notify connected\n\n\t\t\tfor ( let i = 0; i < event.added.length; i ++ ) {\n\n\t\t\t\tconst inputSource = event.added[ i ];\n\t\t\t\tconst controller = inputSourcesMap.get( inputSource );\n\n\t\t\t\tif ( controller ) {\n\n\t\t\t\t\tcontroller.dispatchEvent( { type: 'connected', data: inputSource } );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tconst cameraLPos = new Vector3();\n\t\tconst cameraRPos = new Vector3();\n\n\t\t/**\n\t\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t\t * the cameras' projection and world matrices have already been set.\n\t\t * And that near and far planes are identical for both cameras.\n\t\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t\t */\n\t\tfunction setProjectionFromUnion( camera, cameraL, cameraR ) {\n\n\t\t\tcameraLPos.setFromMatrixPosition( cameraL.matrixWorld );\n\t\t\tcameraRPos.setFromMatrixPosition( cameraR.matrixWorld );\n\n\t\t\tconst ipd = cameraLPos.distanceTo( cameraRPos );\n\n\t\t\tconst projL = cameraL.projectionMatrix.elements;\n\t\t\tconst projR = cameraR.projectionMatrix.elements;\n\n\t\t\t// VR systems will have identical far and near planes, and\n\t\t\t// most likely identical top and bottom frustum extents.\n\t\t\t// Use the left camera for these values.\n\t\t\tconst near = projL[ 14 ] / ( projL[ 10 ] - 1 );\n\t\t\tconst far = projL[ 14 ] / ( projL[ 10 ] + 1 );\n\t\t\tconst topFov = ( projL[ 9 ] + 1 ) / projL[ 5 ];\n\t\t\tconst bottomFov = ( projL[ 9 ] - 1 ) / projL[ 5 ];\n\n\t\t\tconst leftFov = ( projL[ 8 ] - 1 ) / projL[ 0 ];\n\t\t\tconst rightFov = ( projR[ 8 ] + 1 ) / projR[ 0 ];\n\t\t\tconst left = near * leftFov;\n\t\t\tconst right = near * rightFov;\n\n\t\t\t// Calculate the new camera's position offset from the\n\t\t\t// left camera. xOffset should be roughly half `ipd`.\n\t\t\tconst zOffset = ipd / ( - leftFov + rightFov );\n\t\t\tconst xOffset = zOffset * - leftFov;\n\n\t\t\t// TODO: Better way to apply this offset?\n\t\t\tcameraL.matrixWorld.decompose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.translateX( xOffset );\n\t\t\tcamera.translateZ( zOffset );\n\t\t\tcamera.matrixWorld.compose( camera.position, camera.quaternion, camera.scale );\n\t\t\tcamera.matrixWorldInverse.copy( camera.matrixWorld ).invert();\n\n\t\t\t// Find the union of the frustum values of the cameras and scale\n\t\t\t// the values so that the near plane's position does not change in world space,\n\t\t\t// although must now be relative to the new union camera.\n\t\t\tconst near2 = near + zOffset;\n\t\t\tconst far2 = far + zOffset;\n\t\t\tconst left2 = left - xOffset;\n\t\t\tconst right2 = right + ( ipd - xOffset );\n\t\t\tconst top2 = topFov * far / far2 * near2;\n\t\t\tconst bottom2 = bottomFov * far / far2 * near2;\n\n\t\t\tcamera.projectionMatrix.makePerspective( left2, right2, top2, bottom2, near2, far2 );\n\n\t\t}\n\n\t\tfunction updateCamera( camera, parent ) {\n\n\t\t\tif ( parent === null ) {\n\n\t\t\t\tcamera.matrixWorld.copy( camera.matrix );\n\n\t\t\t} else {\n\n\t\t\t\tcamera.matrixWorld.multiplyMatrices( parent.matrixWorld, camera.matrix );\n\n\t\t\t}\n\n\t\t\tcamera.matrixWorldInverse.copy( camera.matrixWorld ).invert();\n\n\t\t}\n\n\t\tthis.updateCamera = function ( camera ) {\n\n\t\t\tif ( session === null ) return;\n\n\t\t\tcameraVR.near = cameraR.near = cameraL.near = camera.near;\n\t\t\tcameraVR.far = cameraR.far = cameraL.far = camera.far;\n\n\t\t\tif ( _currentDepthNear !== cameraVR.near || _currentDepthFar !== cameraVR.far ) {\n\n\t\t\t\t// Note that the new renderState won't apply until the next frame. See #18320\n\n\t\t\t\tsession.updateRenderState( {\n\t\t\t\t\tdepthNear: cameraVR.near,\n\t\t\t\t\tdepthFar: cameraVR.far\n\t\t\t\t} );\n\n\t\t\t\t_currentDepthNear = cameraVR.near;\n\t\t\t\t_currentDepthFar = cameraVR.far;\n\n\t\t\t}\n\n\t\t\tconst parent = camera.parent;\n\t\t\tconst cameras = cameraVR.cameras;\n\n\t\t\tupdateCamera( cameraVR, parent );\n\n\t\t\tfor ( let i = 0; i < cameras.length; i ++ ) {\n\n\t\t\t\tupdateCamera( cameras[ i ], parent );\n\n\t\t\t}\n\n\t\t\tcameraVR.matrixWorld.decompose( cameraVR.position, cameraVR.quaternion, cameraVR.scale );\n\n\t\t\t// update user camera and its children\n\n\t\t\tcamera.position.copy( cameraVR.position );\n\t\t\tcamera.quaternion.copy( cameraVR.quaternion );\n\t\t\tcamera.scale.copy( cameraVR.scale );\n\t\t\tcamera.matrix.copy( cameraVR.matrix );\n\t\t\tcamera.matrixWorld.copy( cameraVR.matrixWorld );\n\n\t\t\tconst children = camera.children;\n\n\t\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\t\tchildren[ i ].updateMatrixWorld( true );\n\n\t\t\t}\n\n\t\t\t// update projection matrix for proper view frustum culling\n\n\t\t\tif ( cameras.length === 2 ) {\n\n\t\t\t\tsetProjectionFromUnion( cameraVR, cameraL, cameraR );\n\n\t\t\t} else {\n\n\t\t\t\t// assume single camera setup (AR)\n\n\t\t\t\tcameraVR.projectionMatrix.copy( cameraL.projectionMatrix );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.getCamera = function () {\n\n\t\t\treturn cameraVR;\n\n\t\t};\n\n\t\t// Animation Loop\n\n\t\tlet onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame( time, frame ) {\n\n\t\t\tpose = frame.getViewerPose( referenceSpace );\n\n\t\t\tif ( pose !== null ) {\n\n\t\t\t\tconst views = pose.views;\n\n\t\t\t\tconst baseLayer = session.renderState.baseLayer;\n\n\t\t\t\tif ( session.renderState.layers === undefined ) {\n\n\t\t\t\t\tstate.bindXRFramebuffer( baseLayer.framebuffer );\n\n\t\t\t\t}\n\n\t\t\t\tlet cameraVRNeedsUpdate = false;\n\n\t\t\t\t// check if it's necessary to rebuild cameraVR's camera list\n\n\t\t\t\tif ( views.length !== cameraVR.cameras.length ) {\n\n\t\t\t\t\tcameraVR.cameras.length = 0;\n\n\t\t\t\t\tcameraVRNeedsUpdate = true;\n\n\n\t\t\t\t}\n\n\t\t\t\tfor ( let i = 0; i < views.length; i ++ ) {\n\n\t\t\t\t\tconst view = views[ i ];\n\n\t\t\t\t\tlet viewport = null;\n\n\t\t\t\t\tif ( session.renderState.layers === undefined ) {\n\n\t\t\t\t\t\tviewport = baseLayer.getViewport( view );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst glSubImage = glBinding.getViewSubImage( glProjLayer, view );\n\n\t\t\t\t\t\tstate.bindXRFramebuffer( glFramebuffer );\n\n\t\t\t\t\t\tgl.framebufferTexture2D( 36160, 36064, 3553, glSubImage.colorTexture, 0 );\n\n\t\t\t\t\t\tif ( glSubImage.depthStencilTexture !== undefined ) {\n\n\t\t\t\t\t\t\tgl.framebufferTexture2D( 36160, 36096, 3553, glSubImage.depthStencilTexture, 0 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tviewport = glSubImage.viewport;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst camera = cameras[ i ];\n\n\t\t\t\t\tcamera.matrix.fromArray( view.transform.matrix );\n\n\t\t\t\t\tcamera.projectionMatrix.fromArray( view.projectionMatrix );\n\n\t\t\t\t\tcamera.viewport.set( viewport.x, viewport.y, viewport.width, viewport.height );\n\n\t\t\t\t\tif ( i === 0 ) {\n\n\t\t\t\t\t\tcameraVR.matrix.copy( camera.matrix );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( cameraVRNeedsUpdate === true ) {\n\n\t\t\t\t\t\tcameraVR.cameras.push( camera );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tconst inputSources = session.inputSources;\n\n\t\t\tfor ( let i = 0; i < controllers.length; i ++ ) {\n\n\t\t\t\tconst controller = controllers[ i ];\n\t\t\t\tconst inputSource = inputSources[ i ];\n\n\t\t\t\tcontroller.update( inputSource, frame, referenceSpace );\n\n\t\t\t}\n\n\t\t\tif ( onAnimationFrameCallback ) onAnimationFrameCallback( time, frame );\n\n\t\t}\n\n\t\tconst animation = new WebGLAnimation();\n\t\tanimation.setAnimationLoop( onAnimationFrame );\n\n\t\tthis.setAnimationLoop = function ( callback ) {\n\n\t\t\tonAnimationFrameCallback = callback;\n\n\t\t};\n\n\t\tthis.dispose = function () {};\n\n\t}\n\n}\n\nfunction WebGLMaterials( properties ) {\n\n\tfunction refreshFogUniforms( uniforms, fog ) {\n\n\t\tuniforms.fogColor.value.copy( fog.color );\n\n\t\tif ( fog.isFog ) {\n\n\t\t\tuniforms.fogNear.value = fog.near;\n\t\t\tuniforms.fogFar.value = fog.far;\n\n\t\t} else if ( fog.isFogExp2 ) {\n\n\t\t\tuniforms.fogDensity.value = fog.density;\n\n\t\t}\n\n\t}\n\n\tfunction refreshMaterialUniforms( uniforms, material, pixelRatio, height, transmissionRenderTarget ) {\n\n\t\tif ( material.isMeshBasicMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t} else if ( material.isMeshLambertMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsLambert( uniforms, material );\n\n\t\t} else if ( material.isMeshToonMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsToon( uniforms, material );\n\n\t\t} else if ( material.isMeshPhongMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsPhong( uniforms, material );\n\n\t\t} else if ( material.isMeshStandardMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\n\t\t\tif ( material.isMeshPhysicalMaterial ) {\n\n\t\t\t\trefreshUniformsPhysical( uniforms, material, transmissionRenderTarget );\n\n\t\t\t} else {\n\n\t\t\t\trefreshUniformsStandard( uniforms, material );\n\n\t\t\t}\n\n\t\t} else if ( material.isMeshMatcapMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsMatcap( uniforms, material );\n\n\t\t} else if ( material.isMeshDepthMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsDepth( uniforms, material );\n\n\t\t} else if ( material.isMeshDistanceMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsDistance( uniforms, material );\n\n\t\t} else if ( material.isMeshNormalMaterial ) {\n\n\t\t\trefreshUniformsCommon( uniforms, material );\n\t\t\trefreshUniformsNormal( uniforms, material );\n\n\t\t} else if ( material.isLineBasicMaterial ) {\n\n\t\t\trefreshUniformsLine( uniforms, material );\n\n\t\t\tif ( material.isLineDashedMaterial ) {\n\n\t\t\t\trefreshUniformsDash( uniforms, material );\n\n\t\t\t}\n\n\t\t} else if ( material.isPointsMaterial ) {\n\n\t\t\trefreshUniformsPoints( uniforms, material, pixelRatio, height );\n\n\t\t} else if ( material.isSpriteMaterial ) {\n\n\t\t\trefreshUniformsSprites( uniforms, material );\n\n\t\t} else if ( material.isShadowMaterial ) {\n\n\t\t\tuniforms.color.value.copy( material.color );\n\t\t\tuniforms.opacity.value = material.opacity;\n\n\t\t} else if ( material.isShaderMaterial ) {\n\n\t\t\tmaterial.uniformsNeedUpdate = false; // #15581\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsCommon( uniforms, material ) {\n\n\t\tuniforms.opacity.value = material.opacity;\n\n\t\tif ( material.color ) {\n\n\t\t\tuniforms.diffuse.value.copy( material.color );\n\n\t\t}\n\n\t\tif ( material.emissive ) {\n\n\t\t\tuniforms.emissive.value.copy( material.emissive ).multiplyScalar( material.emissiveIntensity );\n\n\t\t}\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t}\n\n\t\tif ( material.specularMap ) {\n\n\t\t\tuniforms.specularMap.value = material.specularMap;\n\n\t\t}\n\n\t\tconst envMap = properties.get( material ).envMap;\n\n\t\tif ( envMap ) {\n\n\t\t\tuniforms.envMap.value = envMap;\n\n\t\t\tuniforms.flipEnvMap.value = ( envMap.isCubeTexture && envMap._needsFlipEnvMap ) ? - 1 : 1;\n\n\t\t\tuniforms.reflectivity.value = material.reflectivity;\n\t\t\tuniforms.refractionRatio.value = material.refractionRatio;\n\n\t\t\tconst maxMipLevel = properties.get( envMap ).__maxMipLevel;\n\n\t\t\tif ( maxMipLevel !== undefined ) {\n\n\t\t\t\tuniforms.maxMipLevel.value = maxMipLevel;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( material.lightMap ) {\n\n\t\t\tuniforms.lightMap.value = material.lightMap;\n\t\t\tuniforms.lightMapIntensity.value = material.lightMapIntensity;\n\n\t\t}\n\n\t\tif ( material.aoMap ) {\n\n\t\t\tuniforms.aoMap.value = material.aoMap;\n\t\t\tuniforms.aoMapIntensity.value = material.aoMapIntensity;\n\n\t\t}\n\n\t\t// uv repeat and offset setting priorities\n\t\t// 1. color map\n\t\t// 2. specular map\n\t\t// 3. displacementMap map\n\t\t// 4. normal map\n\t\t// 5. bump map\n\t\t// 6. roughnessMap map\n\t\t// 7. metalnessMap map\n\t\t// 8. alphaMap map\n\t\t// 9. emissiveMap map\n\t\t// 10. clearcoat map\n\t\t// 11. clearcoat normal map\n\t\t// 12. clearcoat roughnessMap map\n\n\t\tlet uvScaleMap;\n\n\t\tif ( material.map ) {\n\n\t\t\tuvScaleMap = material.map;\n\n\t\t} else if ( material.specularMap ) {\n\n\t\t\tuvScaleMap = material.specularMap;\n\n\t\t} else if ( material.displacementMap ) {\n\n\t\t\tuvScaleMap = material.displacementMap;\n\n\t\t} else if ( material.normalMap ) {\n\n\t\t\tuvScaleMap = material.normalMap;\n\n\t\t} else if ( material.bumpMap ) {\n\n\t\t\tuvScaleMap = material.bumpMap;\n\n\t\t} else if ( material.roughnessMap ) {\n\n\t\t\tuvScaleMap = material.roughnessMap;\n\n\t\t} else if ( material.metalnessMap ) {\n\n\t\t\tuvScaleMap = material.metalnessMap;\n\n\t\t} else if ( material.alphaMap ) {\n\n\t\t\tuvScaleMap = material.alphaMap;\n\n\t\t} else if ( material.emissiveMap ) {\n\n\t\t\tuvScaleMap = material.emissiveMap;\n\n\t\t} else if ( material.clearcoatMap ) {\n\n\t\t\tuvScaleMap = material.clearcoatMap;\n\n\t\t} else if ( material.clearcoatNormalMap ) {\n\n\t\t\tuvScaleMap = material.clearcoatNormalMap;\n\n\t\t} else if ( material.clearcoatRoughnessMap ) {\n\n\t\t\tuvScaleMap = material.clearcoatRoughnessMap;\n\n\t\t}\n\n\t\tif ( uvScaleMap !== undefined ) {\n\n\t\t\t// backwards compatibility\n\t\t\tif ( uvScaleMap.isWebGLRenderTarget ) {\n\n\t\t\t\tuvScaleMap = uvScaleMap.texture;\n\n\t\t\t}\n\n\t\t\tif ( uvScaleMap.matrixAutoUpdate === true ) {\n\n\t\t\t\tuvScaleMap.updateMatrix();\n\n\t\t\t}\n\n\t\t\tuniforms.uvTransform.value.copy( uvScaleMap.matrix );\n\n\t\t}\n\n\t\t// uv repeat and offset setting priorities for uv2\n\t\t// 1. ao map\n\t\t// 2. light map\n\n\t\tlet uv2ScaleMap;\n\n\t\tif ( material.aoMap ) {\n\n\t\t\tuv2ScaleMap = material.aoMap;\n\n\t\t} else if ( material.lightMap ) {\n\n\t\t\tuv2ScaleMap = material.lightMap;\n\n\t\t}\n\n\t\tif ( uv2ScaleMap !== undefined ) {\n\n\t\t\t// backwards compatibility\n\t\t\tif ( uv2ScaleMap.isWebGLRenderTarget ) {\n\n\t\t\t\tuv2ScaleMap = uv2ScaleMap.texture;\n\n\t\t\t}\n\n\t\t\tif ( uv2ScaleMap.matrixAutoUpdate === true ) {\n\n\t\t\t\tuv2ScaleMap.updateMatrix();\n\n\t\t\t}\n\n\t\t\tuniforms.uv2Transform.value.copy( uv2ScaleMap.matrix );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsLine( uniforms, material ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\n\t}\n\n\tfunction refreshUniformsDash( uniforms, material ) {\n\n\t\tuniforms.dashSize.value = material.dashSize;\n\t\tuniforms.totalSize.value = material.dashSize + material.gapSize;\n\t\tuniforms.scale.value = material.scale;\n\n\t}\n\n\tfunction refreshUniformsPoints( uniforms, material, pixelRatio, height ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\t\tuniforms.size.value = material.size * pixelRatio;\n\t\tuniforms.scale.value = height * 0.5;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t}\n\n\t\t// uv repeat and offset setting priorities\n\t\t// 1. color map\n\t\t// 2. alpha map\n\n\t\tlet uvScaleMap;\n\n\t\tif ( material.map ) {\n\n\t\t\tuvScaleMap = material.map;\n\n\t\t} else if ( material.alphaMap ) {\n\n\t\t\tuvScaleMap = material.alphaMap;\n\n\t\t}\n\n\t\tif ( uvScaleMap !== undefined ) {\n\n\t\t\tif ( uvScaleMap.matrixAutoUpdate === true ) {\n\n\t\t\t\tuvScaleMap.updateMatrix();\n\n\t\t\t}\n\n\t\t\tuniforms.uvTransform.value.copy( uvScaleMap.matrix );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsSprites( uniforms, material ) {\n\n\t\tuniforms.diffuse.value.copy( material.color );\n\t\tuniforms.opacity.value = material.opacity;\n\t\tuniforms.rotation.value = material.rotation;\n\n\t\tif ( material.map ) {\n\n\t\t\tuniforms.map.value = material.map;\n\n\t\t}\n\n\t\tif ( material.alphaMap ) {\n\n\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\n\t\t}\n\n\t\t// uv repeat and offset setting priorities\n\t\t// 1. color map\n\t\t// 2. alpha map\n\n\t\tlet uvScaleMap;\n\n\t\tif ( material.map ) {\n\n\t\t\tuvScaleMap = material.map;\n\n\t\t} else if ( material.alphaMap ) {\n\n\t\t\tuvScaleMap = material.alphaMap;\n\n\t\t}\n\n\t\tif ( uvScaleMap !== undefined ) {\n\n\t\t\tif ( uvScaleMap.matrixAutoUpdate === true ) {\n\n\t\t\t\tuvScaleMap.updateMatrix();\n\n\t\t\t}\n\n\t\t\tuniforms.uvTransform.value.copy( uvScaleMap.matrix );\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsLambert( uniforms, material ) {\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsPhong( uniforms, material ) {\n\n\t\tuniforms.specular.value.copy( material.specular );\n\t\tuniforms.shininess.value = Math.max( material.shininess, 1e-4 ); // to prevent pow( 0.0, 0.0 )\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsToon( uniforms, material ) {\n\n\t\tif ( material.gradientMap ) {\n\n\t\t\tuniforms.gradientMap.value = material.gradientMap;\n\n\t\t}\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsStandard( uniforms, material ) {\n\n\t\tuniforms.roughness.value = material.roughness;\n\t\tuniforms.metalness.value = material.metalness;\n\n\t\tif ( material.roughnessMap ) {\n\n\t\t\tuniforms.roughnessMap.value = material.roughnessMap;\n\n\t\t}\n\n\t\tif ( material.metalnessMap ) {\n\n\t\t\tuniforms.metalnessMap.value = material.metalnessMap;\n\n\t\t}\n\n\t\tif ( material.emissiveMap ) {\n\n\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t\tconst envMap = properties.get( material ).envMap;\n\n\t\tif ( envMap ) {\n\n\t\t\t//uniforms.envMap.value = material.envMap; // part of uniforms common\n\t\t\tuniforms.envMapIntensity.value = material.envMapIntensity;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsPhysical( uniforms, material, transmissionRenderTarget ) {\n\n\t\trefreshUniformsStandard( uniforms, material );\n\n\t\tuniforms.reflectivity.value = material.reflectivity; // also part of uniforms common\n\n\t\tuniforms.clearcoat.value = material.clearcoat;\n\t\tuniforms.clearcoatRoughness.value = material.clearcoatRoughness;\n\n\t\tif ( material.sheen ) uniforms.sheen.value.copy( material.sheen );\n\n\t\tif ( material.clearcoatMap ) {\n\n\t\t\tuniforms.clearcoatMap.value = material.clearcoatMap;\n\n\t\t}\n\n\t\tif ( material.clearcoatRoughnessMap ) {\n\n\t\t\tuniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap;\n\n\t\t}\n\n\t\tif ( material.clearcoatNormalMap ) {\n\n\t\t\tuniforms.clearcoatNormalScale.value.copy( material.clearcoatNormalScale );\n\t\t\tuniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;\n\n\t\t\tif ( material.side === BackSide ) {\n\n\t\t\t\tuniforms.clearcoatNormalScale.value.negate();\n\n\t\t\t}\n\n\t\t}\n\n\t\tuniforms.transmission.value = material.transmission;\n\n\t\tif ( material.transmissionMap ) {\n\n\t\t\tuniforms.transmissionMap.value = material.transmissionMap;\n\n\t\t}\n\n\t\tif ( material.transmission > 0.0 ) {\n\n\t\t\tuniforms.transmissionSamplerMap.value = transmissionRenderTarget.texture;\n\t\t\tuniforms.transmissionSamplerSize.value.set( transmissionRenderTarget.width, transmissionRenderTarget.height );\n\n\t\t}\n\n\t\tuniforms.thickness.value = material.thickness;\n\n\t\tif ( material.thicknessMap ) {\n\n\t\t\tuniforms.thicknessMap.value = material.thicknessMap;\n\n\t\t}\n\n\t\tuniforms.attenuationDistance.value = material.attenuationDistance;\n\t\tuniforms.attenuationColor.value.copy( material.attenuationColor );\n\n\t}\n\n\tfunction refreshUniformsMatcap( uniforms, material ) {\n\n\t\tif ( material.matcap ) {\n\n\t\t\tuniforms.matcap.value = material.matcap;\n\n\t\t}\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsDepth( uniforms, material ) {\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\tfunction refreshUniformsDistance( uniforms, material ) {\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t\tuniforms.referencePosition.value.copy( material.referencePosition );\n\t\tuniforms.nearDistance.value = material.nearDistance;\n\t\tuniforms.farDistance.value = material.farDistance;\n\n\t}\n\n\tfunction refreshUniformsNormal( uniforms, material ) {\n\n\t\tif ( material.bumpMap ) {\n\n\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\tif ( material.side === BackSide ) uniforms.bumpScale.value *= - 1;\n\n\t\t}\n\n\t\tif ( material.normalMap ) {\n\n\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\tuniforms.normalScale.value.copy( material.normalScale );\n\t\t\tif ( material.side === BackSide ) uniforms.normalScale.value.negate();\n\n\t\t}\n\n\t\tif ( material.displacementMap ) {\n\n\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\n\t\t}\n\n\t}\n\n\treturn {\n\t\trefreshFogUniforms: refreshFogUniforms,\n\t\trefreshMaterialUniforms: refreshMaterialUniforms\n\t};\n\n}\n\nfunction createCanvasElement() {\n\n\tconst canvas = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' );\n\tcanvas.style.display = 'block';\n\treturn canvas;\n\n}\n\nfunction WebGLRenderer( parameters = {} ) {\n\n\tconst _canvas = parameters.canvas !== undefined ? parameters.canvas : createCanvasElement(),\n\t\t_context = parameters.context !== undefined ? parameters.context : null,\n\n\t\t_alpha = parameters.alpha !== undefined ? parameters.alpha : false,\n\t\t_depth = parameters.depth !== undefined ? parameters.depth : true,\n\t\t_stencil = parameters.stencil !== undefined ? parameters.stencil : true,\n\t\t_antialias = parameters.antialias !== undefined ? parameters.antialias : false,\n\t\t_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true,\n\t\t_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false,\n\t\t_powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default',\n\t\t_failIfMajorPerformanceCaveat = parameters.failIfMajorPerformanceCaveat !== undefined ? parameters.failIfMajorPerformanceCaveat : false;\n\n\tlet currentRenderList = null;\n\tlet currentRenderState = null;\n\n\t// render() can be called from within a callback triggered by another render.\n\t// We track this so that the nested render call gets its list and state isolated from the parent render call.\n\n\tconst renderListStack = [];\n\tconst renderStateStack = [];\n\n\t// public properties\n\n\tthis.domElement = _canvas;\n\n\t// Debug configuration container\n\tthis.debug = {\n\n\t\t/**\n\t\t * Enables error checking and reporting when shader programs are being compiled\n\t\t * @type {boolean}\n\t\t */\n\t\tcheckShaderErrors: true\n\t};\n\n\t// clearing\n\n\tthis.autoClear = true;\n\tthis.autoClearColor = true;\n\tthis.autoClearDepth = true;\n\tthis.autoClearStencil = true;\n\n\t// scene graph\n\n\tthis.sortObjects = true;\n\n\t// user-defined clipping\n\n\tthis.clippingPlanes = [];\n\tthis.localClippingEnabled = false;\n\n\t// physically based shading\n\n\tthis.gammaFactor = 2.0;\t// for backwards compatibility\n\tthis.outputEncoding = LinearEncoding;\n\n\t// physical lights\n\n\tthis.physicallyCorrectLights = false;\n\n\t// tone mapping\n\n\tthis.toneMapping = NoToneMapping;\n\tthis.toneMappingExposure = 1.0;\n\n\t// internal properties\n\n\tconst _this = this;\n\n\tlet _isContextLost = false;\n\n\t// internal state cache\n\n\tlet _currentActiveCubeFace = 0;\n\tlet _currentActiveMipmapLevel = 0;\n\tlet _currentRenderTarget = null;\n\tlet _currentMaterialId = - 1;\n\n\tlet _currentCamera = null;\n\n\tconst _currentViewport = new Vector4();\n\tconst _currentScissor = new Vector4();\n\tlet _currentScissorTest = null;\n\n\t//\n\n\tlet _width = _canvas.width;\n\tlet _height = _canvas.height;\n\n\tlet _pixelRatio = 1;\n\tlet _opaqueSort = null;\n\tlet _transparentSort = null;\n\n\tconst _viewport = new Vector4( 0, 0, _width, _height );\n\tconst _scissor = new Vector4( 0, 0, _width, _height );\n\tlet _scissorTest = false;\n\n\t//\n\n\tconst _currentDrawBuffers = [];\n\n\t// frustum\n\n\tconst _frustum = new Frustum();\n\n\t// clipping\n\n\tlet _clippingEnabled = false;\n\tlet _localClippingEnabled = false;\n\n\t// transmission\n\n\tlet _transmissionRenderTarget = null;\n\n\t// camera matrices cache\n\n\tconst _projScreenMatrix = new Matrix4();\n\n\tconst _vector3 = new Vector3();\n\n\tconst _emptyScene = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };\n\n\tfunction getTargetPixelRatio() {\n\n\t\treturn _currentRenderTarget === null ? _pixelRatio : 1;\n\n\t}\n\n\t// initialize\n\n\tlet _gl = _context;\n\n\tfunction getContext( contextNames, contextAttributes ) {\n\n\t\tfor ( let i = 0; i < contextNames.length; i ++ ) {\n\n\t\t\tconst contextName = contextNames[ i ];\n\t\t\tconst context = _canvas.getContext( contextName, contextAttributes );\n\t\t\tif ( context !== null ) return context;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\ttry {\n\n\t\tconst contextAttributes = {\n\t\t\talpha: _alpha,\n\t\t\tdepth: _depth,\n\t\t\tstencil: _stencil,\n\t\t\tantialias: _antialias,\n\t\t\tpremultipliedAlpha: _premultipliedAlpha,\n\t\t\tpreserveDrawingBuffer: _preserveDrawingBuffer,\n\t\t\tpowerPreference: _powerPreference,\n\t\t\tfailIfMajorPerformanceCaveat: _failIfMajorPerformanceCaveat\n\t\t};\n\n\t\t// event listeners must be registered before WebGL context is created, see #12753\n\n\t\t_canvas.addEventListener( 'webglcontextlost', onContextLost, false );\n\t\t_canvas.addEventListener( 'webglcontextrestored', onContextRestore, false );\n\n\t\tif ( _gl === null ) {\n\n\t\t\tconst contextNames = [ 'webgl2', 'webgl', 'experimental-webgl' ];\n\n\t\t\tif ( _this.isWebGL1Renderer === true ) {\n\n\t\t\t\tcontextNames.shift();\n\n\t\t\t}\n\n\t\t\t_gl = getContext( contextNames, contextAttributes );\n\n\t\t\tif ( _gl === null ) {\n\n\t\t\t\tif ( getContext( contextNames ) ) {\n\n\t\t\t\t\tthrow new Error( 'Error creating WebGL context with your selected attributes.' );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( 'Error creating WebGL context.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Some experimental-webgl implementations do not have getShaderPrecisionFormat\n\n\t\tif ( _gl.getShaderPrecisionFormat === undefined ) {\n\n\t\t\t_gl.getShaderPrecisionFormat = function () {\n\n\t\t\t\treturn { 'rangeMin': 1, 'rangeMax': 1, 'precision': 1 };\n\n\t\t\t};\n\n\t\t}\n\n\t} catch ( error ) {\n\n\t\tconsole.error( 'THREE.WebGLRenderer: ' + error.message );\n\t\tthrow error;\n\n\t}\n\n\tlet extensions, capabilities, state, info;\n\tlet properties, textures, cubemaps, attributes, geometries, objects;\n\tlet programCache, materials, renderLists, renderStates, clipping, shadowMap;\n\n\tlet background, morphtargets, bufferRenderer, indexedBufferRenderer;\n\n\tlet utils, bindingStates;\n\n\tfunction initGLContext() {\n\n\t\textensions = new WebGLExtensions( _gl );\n\n\t\tcapabilities = new WebGLCapabilities( _gl, extensions, parameters );\n\n\t\textensions.init( capabilities );\n\n\t\tutils = new WebGLUtils( _gl, extensions, capabilities );\n\n\t\tstate = new WebGLState( _gl, extensions, capabilities );\n\n\t\t_currentDrawBuffers[ 0 ] = 1029;\n\n\t\tinfo = new WebGLInfo( _gl );\n\t\tproperties = new WebGLProperties();\n\t\ttextures = new WebGLTextures( _gl, extensions, state, properties, capabilities, utils, info );\n\t\tcubemaps = new WebGLCubeMaps( _this );\n\t\tattributes = new WebGLAttributes( _gl, capabilities );\n\t\tbindingStates = new WebGLBindingStates( _gl, extensions, attributes, capabilities );\n\t\tgeometries = new WebGLGeometries( _gl, attributes, info, bindingStates );\n\t\tobjects = new WebGLObjects( _gl, geometries, attributes, info );\n\t\tmorphtargets = new WebGLMorphtargets( _gl );\n\t\tclipping = new WebGLClipping( properties );\n\t\tprogramCache = new WebGLPrograms( _this, cubemaps, extensions, capabilities, bindingStates, clipping );\n\t\tmaterials = new WebGLMaterials( properties );\n\t\trenderLists = new WebGLRenderLists( properties );\n\t\trenderStates = new WebGLRenderStates( extensions, capabilities );\n\t\tbackground = new WebGLBackground( _this, cubemaps, state, objects, _premultipliedAlpha );\n\t\tshadowMap = new WebGLShadowMap( _this, objects, capabilities );\n\n\t\tbufferRenderer = new WebGLBufferRenderer( _gl, extensions, info, capabilities );\n\t\tindexedBufferRenderer = new WebGLIndexedBufferRenderer( _gl, extensions, info, capabilities );\n\n\t\tinfo.programs = programCache.programs;\n\n\t\t_this.capabilities = capabilities;\n\t\t_this.extensions = extensions;\n\t\t_this.properties = properties;\n\t\t_this.renderLists = renderLists;\n\t\t_this.shadowMap = shadowMap;\n\t\t_this.state = state;\n\t\t_this.info = info;\n\n\t}\n\n\tinitGLContext();\n\n\t// xr\n\n\tconst xr = new WebXRManager( _this, _gl );\n\n\tthis.xr = xr;\n\n\t// API\n\n\tthis.getContext = function () {\n\n\t\treturn _gl;\n\n\t};\n\n\tthis.getContextAttributes = function () {\n\n\t\treturn _gl.getContextAttributes();\n\n\t};\n\n\tthis.forceContextLoss = function () {\n\n\t\tconst extension = extensions.get( 'WEBGL_lose_context' );\n\t\tif ( extension ) extension.loseContext();\n\n\t};\n\n\tthis.forceContextRestore = function () {\n\n\t\tconst extension = extensions.get( 'WEBGL_lose_context' );\n\t\tif ( extension ) extension.restoreContext();\n\n\t};\n\n\tthis.getPixelRatio = function () {\n\n\t\treturn _pixelRatio;\n\n\t};\n\n\tthis.setPixelRatio = function ( value ) {\n\n\t\tif ( value === undefined ) return;\n\n\t\t_pixelRatio = value;\n\n\t\tthis.setSize( _width, _height, false );\n\n\t};\n\n\tthis.getSize = function ( target ) {\n\n\t\treturn target.set( _width, _height );\n\n\t};\n\n\tthis.setSize = function ( width, height, updateStyle ) {\n\n\t\tif ( xr.isPresenting ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: Can\\'t change size while VR device is presenting.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\t_width = width;\n\t\t_height = height;\n\n\t\t_canvas.width = Math.floor( width * _pixelRatio );\n\t\t_canvas.height = Math.floor( height * _pixelRatio );\n\n\t\tif ( updateStyle !== false ) {\n\n\t\t\t_canvas.style.width = width + 'px';\n\t\t\t_canvas.style.height = height + 'px';\n\n\t\t}\n\n\t\tthis.setViewport( 0, 0, width, height );\n\n\t};\n\n\tthis.getDrawingBufferSize = function ( target ) {\n\n\t\treturn target.set( _width * _pixelRatio, _height * _pixelRatio ).floor();\n\n\t};\n\n\tthis.setDrawingBufferSize = function ( width, height, pixelRatio ) {\n\n\t\t_width = width;\n\t\t_height = height;\n\n\t\t_pixelRatio = pixelRatio;\n\n\t\t_canvas.width = Math.floor( width * pixelRatio );\n\t\t_canvas.height = Math.floor( height * pixelRatio );\n\n\t\tthis.setViewport( 0, 0, width, height );\n\n\t};\n\n\tthis.getCurrentViewport = function ( target ) {\n\n\t\treturn target.copy( _currentViewport );\n\n\t};\n\n\tthis.getViewport = function ( target ) {\n\n\t\treturn target.copy( _viewport );\n\n\t};\n\n\tthis.setViewport = function ( x, y, width, height ) {\n\n\t\tif ( x.isVector4 ) {\n\n\t\t\t_viewport.set( x.x, x.y, x.z, x.w );\n\n\t\t} else {\n\n\t\t\t_viewport.set( x, y, width, height );\n\n\t\t}\n\n\t\tstate.viewport( _currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor() );\n\n\t};\n\n\tthis.getScissor = function ( target ) {\n\n\t\treturn target.copy( _scissor );\n\n\t};\n\n\tthis.setScissor = function ( x, y, width, height ) {\n\n\t\tif ( x.isVector4 ) {\n\n\t\t\t_scissor.set( x.x, x.y, x.z, x.w );\n\n\t\t} else {\n\n\t\t\t_scissor.set( x, y, width, height );\n\n\t\t}\n\n\t\tstate.scissor( _currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor() );\n\n\t};\n\n\tthis.getScissorTest = function () {\n\n\t\treturn _scissorTest;\n\n\t};\n\n\tthis.setScissorTest = function ( boolean ) {\n\n\t\tstate.setScissorTest( _scissorTest = boolean );\n\n\t};\n\n\tthis.setOpaqueSort = function ( method ) {\n\n\t\t_opaqueSort = method;\n\n\t};\n\n\tthis.setTransparentSort = function ( method ) {\n\n\t\t_transparentSort = method;\n\n\t};\n\n\t// Clearing\n\n\tthis.getClearColor = function ( target ) {\n\n\t\treturn target.copy( background.getClearColor() );\n\n\t};\n\n\tthis.setClearColor = function () {\n\n\t\tbackground.setClearColor.apply( background, arguments );\n\n\t};\n\n\tthis.getClearAlpha = function () {\n\n\t\treturn background.getClearAlpha();\n\n\t};\n\n\tthis.setClearAlpha = function () {\n\n\t\tbackground.setClearAlpha.apply( background, arguments );\n\n\t};\n\n\tthis.clear = function ( color, depth, stencil ) {\n\n\t\tlet bits = 0;\n\n\t\tif ( color === undefined || color ) bits |= 16384;\n\t\tif ( depth === undefined || depth ) bits |= 256;\n\t\tif ( stencil === undefined || stencil ) bits |= 1024;\n\n\t\t_gl.clear( bits );\n\n\t};\n\n\tthis.clearColor = function () {\n\n\t\tthis.clear( true, false, false );\n\n\t};\n\n\tthis.clearDepth = function () {\n\n\t\tthis.clear( false, true, false );\n\n\t};\n\n\tthis.clearStencil = function () {\n\n\t\tthis.clear( false, false, true );\n\n\t};\n\n\t//\n\n\tthis.dispose = function () {\n\n\t\t_canvas.removeEventListener( 'webglcontextlost', onContextLost, false );\n\t\t_canvas.removeEventListener( 'webglcontextrestored', onContextRestore, false );\n\n\t\trenderLists.dispose();\n\t\trenderStates.dispose();\n\t\tproperties.dispose();\n\t\tcubemaps.dispose();\n\t\tobjects.dispose();\n\t\tbindingStates.dispose();\n\n\t\txr.dispose();\n\n\t\txr.removeEventListener( 'sessionstart', onXRSessionStart );\n\t\txr.removeEventListener( 'sessionend', onXRSessionEnd );\n\n\t\tif ( _transmissionRenderTarget ) {\n\n\t\t\t_transmissionRenderTarget.dispose();\n\t\t\t_transmissionRenderTarget = null;\n\n\t\t}\n\n\t\tanimation.stop();\n\n\t};\n\n\t// Events\n\n\tfunction onContextLost( event ) {\n\n\t\tevent.preventDefault();\n\n\t\tconsole.log( 'THREE.WebGLRenderer: Context Lost.' );\n\n\t\t_isContextLost = true;\n\n\t}\n\n\tfunction onContextRestore( /* event */ ) {\n\n\t\tconsole.log( 'THREE.WebGLRenderer: Context Restored.' );\n\n\t\t_isContextLost = false;\n\n\t\tconst infoAutoReset = info.autoReset;\n\t\tconst shadowMapEnabled = shadowMap.enabled;\n\t\tconst shadowMapAutoUpdate = shadowMap.autoUpdate;\n\t\tconst shadowMapNeedsUpdate = shadowMap.needsUpdate;\n\t\tconst shadowMapType = shadowMap.type;\n\n\t\tinitGLContext();\n\n\t\tinfo.autoReset = infoAutoReset;\n\t\tshadowMap.enabled = shadowMapEnabled;\n\t\tshadowMap.autoUpdate = shadowMapAutoUpdate;\n\t\tshadowMap.needsUpdate = shadowMapNeedsUpdate;\n\t\tshadowMap.type = shadowMapType;\n\n\t}\n\n\tfunction onMaterialDispose( event ) {\n\n\t\tconst material = event.target;\n\n\t\tmaterial.removeEventListener( 'dispose', onMaterialDispose );\n\n\t\tdeallocateMaterial( material );\n\n\t}\n\n\t// Buffer deallocation\n\n\tfunction deallocateMaterial( material ) {\n\n\t\treleaseMaterialProgramReferences( material );\n\n\t\tproperties.remove( material );\n\n\t}\n\n\n\tfunction releaseMaterialProgramReferences( material ) {\n\n\t\tconst programs = properties.get( material ).programs;\n\n\t\tif ( programs !== undefined ) {\n\n\t\t\tprograms.forEach( function ( program ) {\n\n\t\t\t\tprogramCache.releaseProgram( program );\n\n\t\t\t} );\n\n\t\t}\n\n\t}\n\n\t// Buffer rendering\n\n\tfunction renderObjectImmediate( object, program ) {\n\n\t\tobject.render( function ( object ) {\n\n\t\t\t_this.renderBufferImmediate( object, program );\n\n\t\t} );\n\n\t}\n\n\tthis.renderBufferImmediate = function ( object, program ) {\n\n\t\tbindingStates.initAttributes();\n\n\t\tconst buffers = properties.get( object );\n\n\t\tif ( object.hasPositions && ! buffers.position ) buffers.position = _gl.createBuffer();\n\t\tif ( object.hasNormals && ! buffers.normal ) buffers.normal = _gl.createBuffer();\n\t\tif ( object.hasUvs && ! buffers.uv ) buffers.uv = _gl.createBuffer();\n\t\tif ( object.hasColors && ! buffers.color ) buffers.color = _gl.createBuffer();\n\n\t\tconst programAttributes = program.getAttributes();\n\n\t\tif ( object.hasPositions ) {\n\n\t\t\t_gl.bindBuffer( 34962, buffers.position );\n\t\t\t_gl.bufferData( 34962, object.positionArray, 35048 );\n\n\t\t\tbindingStates.enableAttribute( programAttributes.position );\n\t\t\t_gl.vertexAttribPointer( programAttributes.position, 3, 5126, false, 0, 0 );\n\n\t\t}\n\n\t\tif ( object.hasNormals ) {\n\n\t\t\t_gl.bindBuffer( 34962, buffers.normal );\n\t\t\t_gl.bufferData( 34962, object.normalArray, 35048 );\n\n\t\t\tbindingStates.enableAttribute( programAttributes.normal );\n\t\t\t_gl.vertexAttribPointer( programAttributes.normal, 3, 5126, false, 0, 0 );\n\n\t\t}\n\n\t\tif ( object.hasUvs ) {\n\n\t\t\t_gl.bindBuffer( 34962, buffers.uv );\n\t\t\t_gl.bufferData( 34962, object.uvArray, 35048 );\n\n\t\t\tbindingStates.enableAttribute( programAttributes.uv );\n\t\t\t_gl.vertexAttribPointer( programAttributes.uv, 2, 5126, false, 0, 0 );\n\n\t\t}\n\n\t\tif ( object.hasColors ) {\n\n\t\t\t_gl.bindBuffer( 34962, buffers.color );\n\t\t\t_gl.bufferData( 34962, object.colorArray, 35048 );\n\n\t\t\tbindingStates.enableAttribute( programAttributes.color );\n\t\t\t_gl.vertexAttribPointer( programAttributes.color, 3, 5126, false, 0, 0 );\n\n\t\t}\n\n\t\tbindingStates.disableUnusedAttributes();\n\n\t\t_gl.drawArrays( 4, 0, object.count );\n\n\t\tobject.count = 0;\n\n\t};\n\n\tthis.renderBufferDirect = function ( camera, scene, geometry, material, object, group ) {\n\n\t\tif ( scene === null ) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null)\n\n\t\tconst frontFaceCW = ( object.isMesh && object.matrixWorld.determinant() < 0 );\n\n\t\tconst program = setProgram( camera, scene, material, object );\n\n\t\tstate.setMaterial( material, frontFaceCW );\n\n\t\t//\n\n\t\tlet index = geometry.index;\n\t\tconst position = geometry.attributes.position;\n\n\t\t//\n\n\t\tif ( index === null ) {\n\n\t\t\tif ( position === undefined || position.count === 0 ) return;\n\n\t\t} else if ( index.count === 0 ) {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t//\n\n\t\tlet rangeFactor = 1;\n\n\t\tif ( material.wireframe === true ) {\n\n\t\t\tindex = geometries.getWireframeAttribute( geometry );\n\t\t\trangeFactor = 2;\n\n\t\t}\n\n\t\tif ( material.morphTargets || material.morphNormals ) {\n\n\t\t\tmorphtargets.update( object, geometry, material, program );\n\n\t\t}\n\n\t\tbindingStates.setup( object, material, program, geometry, index );\n\n\t\tlet attribute;\n\t\tlet renderer = bufferRenderer;\n\n\t\tif ( index !== null ) {\n\n\t\t\tattribute = attributes.get( index );\n\n\t\t\trenderer = indexedBufferRenderer;\n\t\t\trenderer.setIndex( attribute );\n\n\t\t}\n\n\t\t//\n\n\t\tconst dataCount = ( index !== null ) ? index.count : position.count;\n\n\t\tconst rangeStart = geometry.drawRange.start * rangeFactor;\n\t\tconst rangeCount = geometry.drawRange.count * rangeFactor;\n\n\t\tconst groupStart = group !== null ? group.start * rangeFactor : 0;\n\t\tconst groupCount = group !== null ? group.count * rangeFactor : Infinity;\n\n\t\tconst drawStart = Math.max( rangeStart, groupStart );\n\t\tconst drawEnd = Math.min( dataCount, rangeStart + rangeCount, groupStart + groupCount ) - 1;\n\n\t\tconst drawCount = Math.max( 0, drawEnd - drawStart + 1 );\n\n\t\tif ( drawCount === 0 ) return;\n\n\t\t//\n\n\t\tif ( object.isMesh ) {\n\n\t\t\tif ( material.wireframe === true ) {\n\n\t\t\t\tstate.setLineWidth( material.wireframeLinewidth * getTargetPixelRatio() );\n\t\t\t\trenderer.setMode( 1 );\n\n\t\t\t} else {\n\n\t\t\t\trenderer.setMode( 4 );\n\n\t\t\t}\n\n\t\t} else if ( object.isLine ) {\n\n\t\t\tlet lineWidth = material.linewidth;\n\n\t\t\tif ( lineWidth === undefined ) lineWidth = 1; // Not using Line*Material\n\n\t\t\tstate.setLineWidth( lineWidth * getTargetPixelRatio() );\n\n\t\t\tif ( object.isLineSegments ) {\n\n\t\t\t\trenderer.setMode( 1 );\n\n\t\t\t} else if ( object.isLineLoop ) {\n\n\t\t\t\trenderer.setMode( 2 );\n\n\t\t\t} else {\n\n\t\t\t\trenderer.setMode( 3 );\n\n\t\t\t}\n\n\t\t} else if ( object.isPoints ) {\n\n\t\t\trenderer.setMode( 0 );\n\n\t\t} else if ( object.isSprite ) {\n\n\t\t\trenderer.setMode( 4 );\n\n\t\t}\n\n\t\tif ( object.isInstancedMesh ) {\n\n\t\t\trenderer.renderInstances( drawStart, drawCount, object.count );\n\n\t\t} else if ( geometry.isInstancedBufferGeometry ) {\n\n\t\t\tconst instanceCount = Math.min( geometry.instanceCount, geometry._maxInstanceCount );\n\n\t\t\trenderer.renderInstances( drawStart, drawCount, instanceCount );\n\n\t\t} else {\n\n\t\t\trenderer.render( drawStart, drawCount );\n\n\t\t}\n\n\t};\n\n\t// Compile\n\n\tthis.compile = function ( scene, camera ) {\n\n\t\tcurrentRenderState = renderStates.get( scene );\n\t\tcurrentRenderState.init();\n\n\t\tscene.traverseVisible( function ( object ) {\n\n\t\t\tif ( object.isLight && object.layers.test( camera.layers ) ) {\n\n\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t\tcurrentRenderState.setupLights();\n\n\t\tscene.traverse( function ( object ) {\n\n\t\t\tconst material = object.material;\n\n\t\t\tif ( material ) {\n\n\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\tfor ( let i = 0; i < material.length; i ++ ) {\n\n\t\t\t\t\t\tconst material2 = material[ i ];\n\n\t\t\t\t\t\tgetProgram( material2, scene, object );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tgetProgram( material, scene, object );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t};\n\n\t// Animation Loop\n\n\tlet onAnimationFrameCallback = null;\n\n\tfunction onAnimationFrame( time ) {\n\n\t\tif ( onAnimationFrameCallback ) onAnimationFrameCallback( time );\n\n\t}\n\n\tfunction onXRSessionStart() {\n\n\t\tanimation.stop();\n\n\t}\n\n\tfunction onXRSessionEnd() {\n\n\t\tanimation.start();\n\n\t}\n\n\tconst animation = new WebGLAnimation();\n\tanimation.setAnimationLoop( onAnimationFrame );\n\n\tif ( typeof window !== 'undefined' ) animation.setContext( window );\n\n\tthis.setAnimationLoop = function ( callback ) {\n\n\t\tonAnimationFrameCallback = callback;\n\t\txr.setAnimationLoop( callback );\n\n\t\t( callback === null ) ? animation.stop() : animation.start();\n\n\t};\n\n\txr.addEventListener( 'sessionstart', onXRSessionStart );\n\txr.addEventListener( 'sessionend', onXRSessionEnd );\n\n\t// Rendering\n\n\tthis.render = function ( scene, camera ) {\n\n\t\tif ( camera !== undefined && camera.isCamera !== true ) {\n\n\t\t\tconsole.error( 'THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( _isContextLost === true ) return;\n\n\t\t// update scene graph\n\n\t\tif ( scene.autoUpdate === true ) scene.updateMatrixWorld();\n\n\t\t// update camera matrices and frustum\n\n\t\tif ( camera.parent === null ) camera.updateMatrixWorld();\n\n\t\tif ( xr.enabled === true && xr.isPresenting === true ) {\n\n\t\t\tif ( xr.cameraAutoUpdate === true ) xr.updateCamera( camera );\n\n\t\t\tcamera = xr.getCamera(); // use XR camera for rendering\n\n\t\t}\n\n\t\t//\n\t\tif ( scene.isScene === true ) scene.onBeforeRender( _this, scene, camera, _currentRenderTarget );\n\n\t\tcurrentRenderState = renderStates.get( scene, renderStateStack.length );\n\t\tcurrentRenderState.init();\n\n\t\trenderStateStack.push( currentRenderState );\n\n\t\t_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );\n\t\t_frustum.setFromProjectionMatrix( _projScreenMatrix );\n\n\t\t_localClippingEnabled = this.localClippingEnabled;\n\t\t_clippingEnabled = clipping.init( this.clippingPlanes, _localClippingEnabled, camera );\n\n\t\tcurrentRenderList = renderLists.get( scene, renderListStack.length );\n\t\tcurrentRenderList.init();\n\n\t\trenderListStack.push( currentRenderList );\n\n\t\tprojectObject( scene, camera, 0, _this.sortObjects );\n\n\t\tcurrentRenderList.finish();\n\n\t\tif ( _this.sortObjects === true ) {\n\n\t\t\tcurrentRenderList.sort( _opaqueSort, _transparentSort );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( _clippingEnabled === true ) clipping.beginShadows();\n\n\t\tconst shadowsArray = currentRenderState.state.shadowsArray;\n\n\t\tshadowMap.render( shadowsArray, scene, camera );\n\n\t\tcurrentRenderState.setupLights();\n\t\tcurrentRenderState.setupLightsView( camera );\n\n\t\tif ( _clippingEnabled === true ) clipping.endShadows();\n\n\t\t//\n\n\t\tif ( this.info.autoReset === true ) this.info.reset();\n\n\t\t//\n\n\t\tbackground.render( currentRenderList, scene );\n\n\t\t// render scene\n\n\t\tconst opaqueObjects = currentRenderList.opaque;\n\t\tconst transmissiveObjects = currentRenderList.transmissive;\n\t\tconst transparentObjects = currentRenderList.transparent;\n\n\t\tif ( opaqueObjects.length > 0 ) renderObjects( opaqueObjects, scene, camera );\n\t\tif ( transmissiveObjects.length > 0 ) renderTransmissiveObjects( opaqueObjects, transmissiveObjects, scene, camera );\n\t\tif ( transparentObjects.length > 0 ) renderObjects( transparentObjects, scene, camera );\n\n\t\t//\n\n\t\tif ( _currentRenderTarget !== null ) {\n\n\t\t\t// resolve multisample renderbuffers to a single-sample texture if necessary\n\n\t\t\ttextures.updateMultisampleRenderTarget( _currentRenderTarget );\n\n\t\t\t// Generate mipmap if we're using any kind of mipmap filtering\n\n\t\t\ttextures.updateRenderTargetMipmap( _currentRenderTarget );\n\n\t\t}\n\n\t\t//\n\n\t\tif ( scene.isScene === true ) scene.onAfterRender( _this, scene, camera );\n\n\t\t// Ensure depth buffer writing is enabled so it can be cleared on next render\n\n\t\tstate.buffers.depth.setTest( true );\n\t\tstate.buffers.depth.setMask( true );\n\t\tstate.buffers.color.setMask( true );\n\n\t\tstate.setPolygonOffset( false );\n\n\t\t// _gl.finish();\n\n\t\tbindingStates.resetDefaultState();\n\t\t_currentMaterialId = - 1;\n\t\t_currentCamera = null;\n\n\t\trenderStateStack.pop();\n\n\t\tif ( renderStateStack.length > 0 ) {\n\n\t\t\tcurrentRenderState = renderStateStack[ renderStateStack.length - 1 ];\n\n\t\t} else {\n\n\t\t\tcurrentRenderState = null;\n\n\t\t}\n\n\t\trenderListStack.pop();\n\n\t\tif ( renderListStack.length > 0 ) {\n\n\t\t\tcurrentRenderList = renderListStack[ renderListStack.length - 1 ];\n\n\t\t} else {\n\n\t\t\tcurrentRenderList = null;\n\n\t\t}\n\n\t};\n\n\tfunction projectObject( object, camera, groupOrder, sortObjects ) {\n\n\t\tif ( object.visible === false ) return;\n\n\t\tconst visible = object.layers.test( camera.layers );\n\n\t\tif ( visible ) {\n\n\t\t\tif ( object.isGroup ) {\n\n\t\t\t\tgroupOrder = object.renderOrder;\n\n\t\t\t} else if ( object.isLOD ) {\n\n\t\t\t\tif ( object.autoUpdate === true ) object.update( camera );\n\n\t\t\t} else if ( object.isLight ) {\n\n\t\t\t\tcurrentRenderState.pushLight( object );\n\n\t\t\t\tif ( object.castShadow ) {\n\n\t\t\t\t\tcurrentRenderState.pushShadow( object );\n\n\t\t\t\t}\n\n\t\t\t} else if ( object.isSprite ) {\n\n\t\t\t\tif ( ! object.frustumCulled || _frustum.intersectsSprite( object ) ) {\n\n\t\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t\t_vector3.setFromMatrixPosition( object.matrixWorld )\n\t\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst geometry = objects.update( object );\n\t\t\t\t\tconst material = object.material;\n\n\t\t\t\t\tif ( material.visible ) {\n\n\t\t\t\t\t\tcurrentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if ( object.isImmediateRenderObject ) {\n\n\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t_vector3.setFromMatrixPosition( object.matrixWorld )\n\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t}\n\n\t\t\t\tcurrentRenderList.push( object, null, object.material, groupOrder, _vector3.z, null );\n\n\t\t\t} else if ( object.isMesh || object.isLine || object.isPoints ) {\n\n\t\t\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\t\t\t// update skeleton only once in a frame\n\n\t\t\t\t\tif ( object.skeleton.frame !== info.render.frame ) {\n\n\t\t\t\t\t\tobject.skeleton.update();\n\t\t\t\t\t\tobject.skeleton.frame = info.render.frame;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( ! object.frustumCulled || _frustum.intersectsObject( object ) ) {\n\n\t\t\t\t\tif ( sortObjects ) {\n\n\t\t\t\t\t\t_vector3.setFromMatrixPosition( object.matrixWorld )\n\t\t\t\t\t\t\t.applyMatrix4( _projScreenMatrix );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst geometry = objects.update( object );\n\t\t\t\t\tconst material = object.material;\n\n\t\t\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\t\t\tconst groups = geometry.groups;\n\n\t\t\t\t\t\tfor ( let i = 0, l = groups.length; i < l; i ++ ) {\n\n\t\t\t\t\t\t\tconst group = groups[ i ];\n\t\t\t\t\t\t\tconst groupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\t\t\tif ( groupMaterial && groupMaterial.visible ) {\n\n\t\t\t\t\t\t\t\tcurrentRenderList.push( object, geometry, groupMaterial, groupOrder, _vector3.z, group );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else if ( material.visible ) {\n\n\t\t\t\t\t\tcurrentRenderList.push( object, geometry, material, groupOrder, _vector3.z, null );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tprojectObject( children[ i ], camera, groupOrder, sortObjects );\n\n\t\t}\n\n\t}\n\n\tfunction renderTransmissiveObjects( opaqueObjects, transmissiveObjects, scene, camera ) {\n\n\t\tif ( _transmissionRenderTarget === null ) {\n\n\t\t\tconst needsAntialias = _antialias === true && capabilities.isWebGL2 === true;\n\t\t\tconst renderTargetType = needsAntialias ? WebGLMultisampleRenderTarget : WebGLRenderTarget;\n\n\t\t\t_transmissionRenderTarget = new renderTargetType( 1024, 1024, {\n\t\t\t\tgenerateMipmaps: true,\n\t\t\t\ttype: utils.convert( HalfFloatType ) !== null ? HalfFloatType : UnsignedByteType,\n\t\t\t\tminFilter: LinearMipmapLinearFilter,\n\t\t\t\tmagFilter: NearestFilter,\n\t\t\t\twrapS: ClampToEdgeWrapping,\n\t\t\t\twrapT: ClampToEdgeWrapping\n\t\t\t} );\n\n\t\t}\n\n\t\tconst currentRenderTarget = _this.getRenderTarget();\n\t\t_this.setRenderTarget( _transmissionRenderTarget );\n\t\t_this.clear();\n\n\t\t// Turn off the features which can affect the frag color for opaque objects pass.\n\t\t// Otherwise they are applied twice in opaque objects pass and transmission objects pass.\n\t\tconst currentToneMapping = _this.toneMapping;\n\t\t_this.toneMapping = NoToneMapping;\n\n\t\trenderObjects( opaqueObjects, scene, camera );\n\n\t\t_this.toneMapping = currentToneMapping;\n\n\t\ttextures.updateMultisampleRenderTarget( _transmissionRenderTarget );\n\t\ttextures.updateRenderTargetMipmap( _transmissionRenderTarget );\n\n\t\t_this.setRenderTarget( currentRenderTarget );\n\n\t\trenderObjects( transmissiveObjects, scene, camera );\n\n\t}\n\n\tfunction renderObjects( renderList, scene, camera ) {\n\n\t\tconst overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n\n\t\tfor ( let i = 0, l = renderList.length; i < l; i ++ ) {\n\n\t\t\tconst renderItem = renderList[ i ];\n\n\t\t\tconst object = renderItem.object;\n\t\t\tconst geometry = renderItem.geometry;\n\t\t\tconst material = overrideMaterial === null ? renderItem.material : overrideMaterial;\n\t\t\tconst group = renderItem.group;\n\n\t\t\tif ( camera.isArrayCamera ) {\n\n\t\t\t\tconst cameras = camera.cameras;\n\n\t\t\t\tfor ( let j = 0, jl = cameras.length; j < jl; j ++ ) {\n\n\t\t\t\t\tconst camera2 = cameras[ j ];\n\n\t\t\t\t\tif ( object.layers.test( camera2.layers ) ) {\n\n\t\t\t\t\t\tstate.viewport( _currentViewport.copy( camera2.viewport ) );\n\n\t\t\t\t\t\tcurrentRenderState.setupLightsView( camera2 );\n\n\t\t\t\t\t\trenderObject( object, scene, camera2, geometry, material, group );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\trenderObject( object, scene, camera, geometry, material, group );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction renderObject( object, scene, camera, geometry, material, group ) {\n\n\t\tobject.onBeforeRender( _this, scene, camera, geometry, material, group );\n\n\t\tobject.modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );\n\t\tobject.normalMatrix.getNormalMatrix( object.modelViewMatrix );\n\n\t\tif ( object.isImmediateRenderObject ) {\n\n\t\t\tconst program = setProgram( camera, scene, material, object );\n\n\t\t\tstate.setMaterial( material );\n\n\t\t\tbindingStates.reset();\n\n\t\t\trenderObjectImmediate( object, program );\n\n\t\t} else {\n\n\t\t\tif ( material.transparent === true && material.side === DoubleSide ) {\n\n\t\t\t\tmaterial.side = BackSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t\tmaterial.side = FrontSide;\n\t\t\t\tmaterial.needsUpdate = true;\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t\tmaterial.side = DoubleSide;\n\n\t\t\t} else {\n\n\t\t\t\t_this.renderBufferDirect( camera, scene, geometry, material, object, group );\n\n\t\t\t}\n\n\t\t}\n\n\t\tobject.onAfterRender( _this, scene, camera, geometry, material, group );\n\n\t}\n\n\tfunction getProgram( material, scene, object ) {\n\n\t\tif ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\tconst materialProperties = properties.get( material );\n\n\t\tconst lights = currentRenderState.state.lights;\n\t\tconst shadowsArray = currentRenderState.state.shadowsArray;\n\n\t\tconst lightsStateVersion = lights.state.version;\n\n\t\tconst parameters = programCache.getParameters( material, lights.state, shadowsArray, scene, object );\n\t\tconst programCacheKey = programCache.getProgramCacheKey( parameters );\n\n\t\tlet programs = materialProperties.programs;\n\n\t\t// always update environment and fog - changing these trigger an getProgram call, but it's possible that the program doesn't change\n\n\t\tmaterialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\tmaterialProperties.fog = scene.fog;\n\t\tmaterialProperties.envMap = cubemaps.get( material.envMap || materialProperties.environment );\n\n\t\tif ( programs === undefined ) {\n\n\t\t\t// new material\n\n\t\t\tmaterial.addEventListener( 'dispose', onMaterialDispose );\n\n\t\t\tprograms = new Map();\n\t\t\tmaterialProperties.programs = programs;\n\n\t\t}\n\n\t\tlet program = programs.get( programCacheKey );\n\n\t\tif ( program !== undefined ) {\n\n\t\t\t// early out if program and light state is identical\n\n\t\t\tif ( materialProperties.currentProgram === program && materialProperties.lightsStateVersion === lightsStateVersion ) {\n\n\t\t\t\tupdateCommonMaterialProperties( material, parameters );\n\n\t\t\t\treturn program;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tparameters.uniforms = programCache.getUniforms( material );\n\n\t\t\tmaterial.onBuild( parameters, _this );\n\n\t\t\tmaterial.onBeforeCompile( parameters, _this );\n\n\t\t\tprogram = programCache.acquireProgram( parameters, programCacheKey );\n\t\t\tprograms.set( programCacheKey, program );\n\n\t\t\tmaterialProperties.uniforms = parameters.uniforms;\n\n\t\t}\n\n\t\tconst uniforms = materialProperties.uniforms;\n\n\t\tif ( ( ! material.isShaderMaterial && ! material.isRawShaderMaterial ) || material.clipping === true ) {\n\n\t\t\tuniforms.clippingPlanes = clipping.uniform;\n\n\t\t}\n\n\t\tupdateCommonMaterialProperties( material, parameters );\n\n\t\t// store the light setup it was created for\n\n\t\tmaterialProperties.needsLights = materialNeedsLights( material );\n\t\tmaterialProperties.lightsStateVersion = lightsStateVersion;\n\n\t\tif ( materialProperties.needsLights ) {\n\n\t\t\t// wire up the material to this renderer's lighting state\n\n\t\t\tuniforms.ambientLightColor.value = lights.state.ambient;\n\t\t\tuniforms.lightProbe.value = lights.state.probe;\n\t\t\tuniforms.directionalLights.value = lights.state.directional;\n\t\t\tuniforms.directionalLightShadows.value = lights.state.directionalShadow;\n\t\t\tuniforms.spotLights.value = lights.state.spot;\n\t\t\tuniforms.spotLightShadows.value = lights.state.spotShadow;\n\t\t\tuniforms.rectAreaLights.value = lights.state.rectArea;\n\t\t\tuniforms.ltc_1.value = lights.state.rectAreaLTC1;\n\t\t\tuniforms.ltc_2.value = lights.state.rectAreaLTC2;\n\t\t\tuniforms.pointLights.value = lights.state.point;\n\t\t\tuniforms.pointLightShadows.value = lights.state.pointShadow;\n\t\t\tuniforms.hemisphereLights.value = lights.state.hemi;\n\n\t\t\tuniforms.directionalShadowMap.value = lights.state.directionalShadowMap;\n\t\t\tuniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;\n\t\t\tuniforms.spotShadowMap.value = lights.state.spotShadowMap;\n\t\t\tuniforms.spotShadowMatrix.value = lights.state.spotShadowMatrix;\n\t\t\tuniforms.pointShadowMap.value = lights.state.pointShadowMap;\n\t\t\tuniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix;\n\t\t\t// TODO (abelnation): add area lights shadow info to uniforms\n\n\t\t}\n\n\t\tconst progUniforms = program.getUniforms();\n\t\tconst uniformsList = WebGLUniforms.seqWithValue( progUniforms.seq, uniforms );\n\n\t\tmaterialProperties.currentProgram = program;\n\t\tmaterialProperties.uniformsList = uniformsList;\n\n\t\treturn program;\n\n\t}\n\n\tfunction updateCommonMaterialProperties( material, parameters ) {\n\n\t\tconst materialProperties = properties.get( material );\n\n\t\tmaterialProperties.outputEncoding = parameters.outputEncoding;\n\t\tmaterialProperties.instancing = parameters.instancing;\n\t\tmaterialProperties.skinning = parameters.skinning;\n\t\tmaterialProperties.numClippingPlanes = parameters.numClippingPlanes;\n\t\tmaterialProperties.numIntersection = parameters.numClipIntersection;\n\t\tmaterialProperties.vertexAlphas = parameters.vertexAlphas;\n\n\t}\n\n\tfunction setProgram( camera, scene, material, object ) {\n\n\t\tif ( scene.isScene !== true ) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\ttextures.resetTextureUnits();\n\n\t\tconst fog = scene.fog;\n\t\tconst environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\tconst encoding = ( _currentRenderTarget === null ) ? _this.outputEncoding : _currentRenderTarget.texture.encoding;\n\t\tconst envMap = cubemaps.get( material.envMap || environment );\n\t\tconst vertexAlphas = material.vertexColors === true && object.geometry && object.geometry.attributes.color && object.geometry.attributes.color.itemSize === 4;\n\n\t\tconst materialProperties = properties.get( material );\n\t\tconst lights = currentRenderState.state.lights;\n\n\t\tif ( _clippingEnabled === true ) {\n\n\t\t\tif ( _localClippingEnabled === true || camera !== _currentCamera ) {\n\n\t\t\t\tconst useCache =\n\t\t\t\t\tcamera === _currentCamera &&\n\t\t\t\t\tmaterial.id === _currentMaterialId;\n\n\t\t\t\t// we might want to call this function with some ClippingGroup\n\t\t\t\t// object instead of the material, once it becomes feasible\n\t\t\t\t// (#8465, #8379)\n\t\t\t\tclipping.setState( material, camera, useCache );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tlet needsProgramChange = false;\n\n\t\tif ( material.version === materialProperties.__version ) {\n\n\t\t\tif ( materialProperties.needsLights && ( materialProperties.lightsStateVersion !== lights.state.version ) ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( materialProperties.outputEncoding !== encoding ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( object.isInstancedMesh && materialProperties.instancing === false ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( ! object.isInstancedMesh && materialProperties.instancing === true ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( object.isSkinnedMesh && materialProperties.skinning === false ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( ! object.isSkinnedMesh && materialProperties.skinning === true ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( materialProperties.envMap !== envMap ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( material.fog && materialProperties.fog !== fog ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( materialProperties.numClippingPlanes !== undefined &&\n\t\t\t\t( materialProperties.numClippingPlanes !== clipping.numPlanes ||\n\t\t\t\tmaterialProperties.numIntersection !== clipping.numIntersection ) ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t} else if ( materialProperties.vertexAlphas !== vertexAlphas ) {\n\n\t\t\t\tneedsProgramChange = true;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tneedsProgramChange = true;\n\t\t\tmaterialProperties.__version = material.version;\n\n\t\t}\n\n\t\t//\n\n\t\tlet program = materialProperties.currentProgram;\n\n\t\tif ( needsProgramChange === true ) {\n\n\t\t\tprogram = getProgram( material, scene, object );\n\n\t\t}\n\n\t\tlet refreshProgram = false;\n\t\tlet refreshMaterial = false;\n\t\tlet refreshLights = false;\n\n\t\tconst p_uniforms = program.getUniforms(),\n\t\t\tm_uniforms = materialProperties.uniforms;\n\n\t\tif ( state.useProgram( program.program ) ) {\n\n\t\t\trefreshProgram = true;\n\t\t\trefreshMaterial = true;\n\t\t\trefreshLights = true;\n\n\t\t}\n\n\t\tif ( material.id !== _currentMaterialId ) {\n\n\t\t\t_currentMaterialId = material.id;\n\n\t\t\trefreshMaterial = true;\n\n\t\t}\n\n\t\tif ( refreshProgram || _currentCamera !== camera ) {\n\n\t\t\tp_uniforms.setValue( _gl, 'projectionMatrix', camera.projectionMatrix );\n\n\t\t\tif ( capabilities.logarithmicDepthBuffer ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'logDepthBufFC',\n\t\t\t\t\t2.0 / ( Math.log( camera.far + 1.0 ) / Math.LN2 ) );\n\n\t\t\t}\n\n\t\t\tif ( _currentCamera !== camera ) {\n\n\t\t\t\t_currentCamera = camera;\n\n\t\t\t\t// lighting uniforms depend on the camera so enforce an update\n\t\t\t\t// now, in case this material supports lights - or later, when\n\t\t\t\t// the next material that does gets activated:\n\n\t\t\t\trefreshMaterial = true;\t\t// set to true on material change\n\t\t\t\trefreshLights = true;\t\t// remains set until update done\n\n\t\t\t}\n\n\t\t\t// load material specific uniforms\n\t\t\t// (shader material also gets them for the sake of genericity)\n\n\t\t\tif ( material.isShaderMaterial ||\n\t\t\t\tmaterial.isMeshPhongMaterial ||\n\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\tmaterial.envMap ) {\n\n\t\t\t\tconst uCamPos = p_uniforms.map.cameraPosition;\n\n\t\t\t\tif ( uCamPos !== undefined ) {\n\n\t\t\t\t\tuCamPos.setValue( _gl,\n\t\t\t\t\t\t_vector3.setFromMatrixPosition( camera.matrixWorld ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( material.isMeshPhongMaterial ||\n\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\tmaterial.isMeshLambertMaterial ||\n\t\t\t\tmaterial.isMeshBasicMaterial ||\n\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\tmaterial.isShaderMaterial ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'isOrthographic', camera.isOrthographicCamera === true );\n\n\t\t\t}\n\n\t\t\tif ( material.isMeshPhongMaterial ||\n\t\t\t\tmaterial.isMeshToonMaterial ||\n\t\t\t\tmaterial.isMeshLambertMaterial ||\n\t\t\t\tmaterial.isMeshBasicMaterial ||\n\t\t\t\tmaterial.isMeshStandardMaterial ||\n\t\t\t\tmaterial.isShaderMaterial ||\n\t\t\t\tmaterial.isShadowMaterial ||\n\t\t\t\tobject.isSkinnedMesh ) {\n\n\t\t\t\tp_uniforms.setValue( _gl, 'viewMatrix', camera.matrixWorldInverse );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// skinning uniforms must be set even if material didn't change\n\t\t// auto-setting of texture unit for bone texture must go before other textures\n\t\t// otherwise textures used for skinning can take over texture units reserved for other material textures\n\n\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\tp_uniforms.setOptional( _gl, object, 'bindMatrix' );\n\t\t\tp_uniforms.setOptional( _gl, object, 'bindMatrixInverse' );\n\n\t\t\tconst skeleton = object.skeleton;\n\n\t\t\tif ( skeleton ) {\n\n\t\t\t\tif ( capabilities.floatVertexTextures ) {\n\n\t\t\t\t\tif ( skeleton.boneTexture === null ) skeleton.computeBoneTexture();\n\n\t\t\t\t\tp_uniforms.setValue( _gl, 'boneTexture', skeleton.boneTexture, textures );\n\t\t\t\t\tp_uniforms.setValue( _gl, 'boneTextureSize', skeleton.boneTextureSize );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tp_uniforms.setOptional( _gl, skeleton, 'boneMatrices' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow ) {\n\n\t\t\tmaterialProperties.receiveShadow = object.receiveShadow;\n\t\t\tp_uniforms.setValue( _gl, 'receiveShadow', object.receiveShadow );\n\n\t\t}\n\n\t\tif ( refreshMaterial ) {\n\n\t\t\tp_uniforms.setValue( _gl, 'toneMappingExposure', _this.toneMappingExposure );\n\n\t\t\tif ( materialProperties.needsLights ) {\n\n\t\t\t\t// the current material requires lighting info\n\n\t\t\t\t// note: all lighting uniforms are always set correctly\n\t\t\t\t// they simply reference the renderer's state for their\n\t\t\t\t// values\n\t\t\t\t//\n\t\t\t\t// use the current material's .needsUpdate flags to set\n\t\t\t\t// the GL state when required\n\n\t\t\t\tmarkUniformsLightsNeedsUpdate( m_uniforms, refreshLights );\n\n\t\t\t}\n\n\t\t\t// refresh uniforms common to several materials\n\n\t\t\tif ( fog && material.fog ) {\n\n\t\t\t\tmaterials.refreshFogUniforms( m_uniforms, fog );\n\n\t\t\t}\n\n\t\t\tmaterials.refreshMaterialUniforms( m_uniforms, material, _pixelRatio, _height, _transmissionRenderTarget );\n\n\t\t\tWebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures );\n\n\t\t}\n\n\t\tif ( material.isShaderMaterial && material.uniformsNeedUpdate === true ) {\n\n\t\t\tWebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures );\n\t\t\tmaterial.uniformsNeedUpdate = false;\n\n\t\t}\n\n\t\tif ( material.isSpriteMaterial ) {\n\n\t\t\tp_uniforms.setValue( _gl, 'center', object.center );\n\n\t\t}\n\n\t\t// common matrices\n\n\t\tp_uniforms.setValue( _gl, 'modelViewMatrix', object.modelViewMatrix );\n\t\tp_uniforms.setValue( _gl, 'normalMatrix', object.normalMatrix );\n\t\tp_uniforms.setValue( _gl, 'modelMatrix', object.matrixWorld );\n\n\t\treturn program;\n\n\t}\n\n\t// If uniforms are marked as clean, they don't need to be loaded to the GPU.\n\n\tfunction markUniformsLightsNeedsUpdate( uniforms, value ) {\n\n\t\tuniforms.ambientLightColor.needsUpdate = value;\n\t\tuniforms.lightProbe.needsUpdate = value;\n\n\t\tuniforms.directionalLights.needsUpdate = value;\n\t\tuniforms.directionalLightShadows.needsUpdate = value;\n\t\tuniforms.pointLights.needsUpdate = value;\n\t\tuniforms.pointLightShadows.needsUpdate = value;\n\t\tuniforms.spotLights.needsUpdate = value;\n\t\tuniforms.spotLightShadows.needsUpdate = value;\n\t\tuniforms.rectAreaLights.needsUpdate = value;\n\t\tuniforms.hemisphereLights.needsUpdate = value;\n\n\t}\n\n\tfunction materialNeedsLights( material ) {\n\n\t\treturn material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial ||\n\t\t\tmaterial.isMeshStandardMaterial || material.isShadowMaterial ||\n\t\t\t( material.isShaderMaterial && material.lights === true );\n\n\t}\n\n\tthis.getActiveCubeFace = function () {\n\n\t\treturn _currentActiveCubeFace;\n\n\t};\n\n\tthis.getActiveMipmapLevel = function () {\n\n\t\treturn _currentActiveMipmapLevel;\n\n\t};\n\n\tthis.getRenderTarget = function () {\n\n\t\treturn _currentRenderTarget;\n\n\t};\n\n\tthis.setRenderTarget = function ( renderTarget, activeCubeFace = 0, activeMipmapLevel = 0 ) {\n\n\t\t_currentRenderTarget = renderTarget;\n\t\t_currentActiveCubeFace = activeCubeFace;\n\t\t_currentActiveMipmapLevel = activeMipmapLevel;\n\n\t\tif ( renderTarget && properties.get( renderTarget ).__webglFramebuffer === undefined ) {\n\n\t\t\ttextures.setupRenderTarget( renderTarget );\n\n\t\t}\n\n\t\tlet framebuffer = null;\n\t\tlet isCube = false;\n\t\tlet isRenderTarget3D = false;\n\n\t\tif ( renderTarget ) {\n\n\t\t\tconst texture = renderTarget.texture;\n\n\t\t\tif ( texture.isDataTexture3D || texture.isDataTexture2DArray ) {\n\n\t\t\t\tisRenderTarget3D = true;\n\n\t\t\t}\n\n\t\t\tconst __webglFramebuffer = properties.get( renderTarget ).__webglFramebuffer;\n\n\t\t\tif ( renderTarget.isWebGLCubeRenderTarget ) {\n\n\t\t\t\tframebuffer = __webglFramebuffer[ activeCubeFace ];\n\t\t\t\tisCube = true;\n\n\t\t\t} else if ( renderTarget.isWebGLMultisampleRenderTarget ) {\n\n\t\t\t\tframebuffer = properties.get( renderTarget ).__webglMultisampledFramebuffer;\n\n\t\t\t} else {\n\n\t\t\t\tframebuffer = __webglFramebuffer;\n\n\t\t\t}\n\n\t\t\t_currentViewport.copy( renderTarget.viewport );\n\t\t\t_currentScissor.copy( renderTarget.scissor );\n\t\t\t_currentScissorTest = renderTarget.scissorTest;\n\n\t\t} else {\n\n\t\t\t_currentViewport.copy( _viewport ).multiplyScalar( _pixelRatio ).floor();\n\t\t\t_currentScissor.copy( _scissor ).multiplyScalar( _pixelRatio ).floor();\n\t\t\t_currentScissorTest = _scissorTest;\n\n\t\t}\n\n\t\tconst framebufferBound = state.bindFramebuffer( 36160, framebuffer );\n\n\t\tif ( framebufferBound && capabilities.drawBuffers ) {\n\n\t\t\tlet needsUpdate = false;\n\n\t\t\tif ( renderTarget ) {\n\n\t\t\t\tif ( renderTarget.isWebGLMultipleRenderTargets ) {\n\n\t\t\t\t\tconst textures = renderTarget.texture;\n\n\t\t\t\t\tif ( _currentDrawBuffers.length !== textures.length || _currentDrawBuffers[ 0 ] !== 36064 ) {\n\n\t\t\t\t\t\tfor ( let i = 0, il = textures.length; i < il; i ++ ) {\n\n\t\t\t\t\t\t\t_currentDrawBuffers[ i ] = 36064 + i;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_currentDrawBuffers.length = textures.length;\n\n\t\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( _currentDrawBuffers.length !== 1 || _currentDrawBuffers[ 0 ] !== 36064 ) {\n\n\t\t\t\t\t\t_currentDrawBuffers[ 0 ] = 36064;\n\t\t\t\t\t\t_currentDrawBuffers.length = 1;\n\n\t\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( _currentDrawBuffers.length !== 1 || _currentDrawBuffers[ 0 ] !== 1029 ) {\n\n\t\t\t\t\t_currentDrawBuffers[ 0 ] = 1029;\n\t\t\t\t\t_currentDrawBuffers.length = 1;\n\n\t\t\t\t\tneedsUpdate = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( needsUpdate ) {\n\n\t\t\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t\t\t_gl.drawBuffers( _currentDrawBuffers );\n\n\t\t\t\t} else {\n\n\t\t\t\t\textensions.get( 'WEBGL_draw_buffers' ).drawBuffersWEBGL( _currentDrawBuffers );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tstate.viewport( _currentViewport );\n\t\tstate.scissor( _currentScissor );\n\t\tstate.setScissorTest( _currentScissorTest );\n\n\t\tif ( isCube ) {\n\n\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\t\t\t_gl.framebufferTexture2D( 36160, 36064, 34069 + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel );\n\n\t\t} else if ( isRenderTarget3D ) {\n\n\t\t\tconst textureProperties = properties.get( renderTarget.texture );\n\t\t\tconst layer = activeCubeFace || 0;\n\t\t\t_gl.framebufferTextureLayer( 36160, 36064, textureProperties.__webglTexture, activeMipmapLevel || 0, layer );\n\n\t\t}\n\n\t};\n\n\tthis.readRenderTargetPixels = function ( renderTarget, x, y, width, height, buffer, activeCubeFaceIndex ) {\n\n\t\tif ( ! ( renderTarget && renderTarget.isWebGLRenderTarget ) ) {\n\n\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tlet framebuffer = properties.get( renderTarget ).__webglFramebuffer;\n\n\t\tif ( renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined ) {\n\n\t\t\tframebuffer = framebuffer[ activeCubeFaceIndex ];\n\n\t\t}\n\n\t\tif ( framebuffer ) {\n\n\t\t\tstate.bindFramebuffer( 36160, framebuffer );\n\n\t\t\ttry {\n\n\t\t\t\tconst texture = renderTarget.texture;\n\t\t\t\tconst textureFormat = texture.format;\n\t\t\t\tconst textureType = texture.type;\n\n\t\t\t\tif ( textureFormat !== RGBAFormat && utils.convert( textureFormat ) !== _gl.getParameter( 35739 ) ) {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.' );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tconst halfFloatSupportedByExt = ( textureType === HalfFloatType ) && ( extensions.has( 'EXT_color_buffer_half_float' ) || ( capabilities.isWebGL2 && extensions.has( 'EXT_color_buffer_float' ) ) );\n\n\t\t\t\tif ( textureType !== UnsignedByteType && utils.convert( textureType ) !== _gl.getParameter( 35738 ) && // Edge and Chrome Mac < 52 (#9513)\n\t\t\t\t\t! ( textureType === FloatType && ( capabilities.isWebGL2 || extensions.has( 'OES_texture_float' ) || extensions.has( 'WEBGL_color_buffer_float' ) ) ) && // Chrome Mac >= 52 and Firefox\n\t\t\t\t\t! halfFloatSupportedByExt ) {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.' );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tif ( _gl.checkFramebufferStatus( 36160 ) === 36053 ) {\n\n\t\t\t\t\t// the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)\n\n\t\t\t\t\tif ( ( x >= 0 && x <= ( renderTarget.width - width ) ) && ( y >= 0 && y <= ( renderTarget.height - height ) ) ) {\n\n\t\t\t\t\t\t_gl.readPixels( x, y, width, height, utils.convert( textureFormat ), utils.convert( textureType ), buffer );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.' );\n\n\t\t\t\t}\n\n\t\t\t} finally {\n\n\t\t\t\t// restore framebuffer of current render target if necessary\n\n\t\t\t\tconst framebuffer = ( _currentRenderTarget !== null ) ? properties.get( _currentRenderTarget ).__webglFramebuffer : null;\n\t\t\t\tstate.bindFramebuffer( 36160, framebuffer );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\tthis.copyFramebufferToTexture = function ( position, texture, level = 0 ) {\n\n\t\tconst levelScale = Math.pow( 2, - level );\n\t\tconst width = Math.floor( texture.image.width * levelScale );\n\t\tconst height = Math.floor( texture.image.height * levelScale );\n\n\t\tlet glFormat = utils.convert( texture.format );\n\n\t\tif ( capabilities.isWebGL2 ) {\n\n\t\t\t// Workaround for https://bugs.chromium.org/p/chromium/issues/detail?id=1120100\n\t\t\t// Not needed in Chrome 93+\n\n\t\t\tif ( glFormat === 6407 ) glFormat = 32849;\n\t\t\tif ( glFormat === 6408 ) glFormat = 32856;\n\n\t\t}\n\n\t\ttextures.setTexture2D( texture, 0 );\n\n\t\t_gl.copyTexImage2D( 3553, level, glFormat, position.x, position.y, width, height, 0 );\n\n\t\tstate.unbindTexture();\n\n\t};\n\n\tthis.copyTextureToTexture = function ( position, srcTexture, dstTexture, level = 0 ) {\n\n\t\tconst width = srcTexture.image.width;\n\t\tconst height = srcTexture.image.height;\n\t\tconst glFormat = utils.convert( dstTexture.format );\n\t\tconst glType = utils.convert( dstTexture.type );\n\n\t\ttextures.setTexture2D( dstTexture, 0 );\n\n\t\t// As another texture upload may have changed pixelStorei\n\t\t// parameters, make sure they are correct for the dstTexture\n\t\t_gl.pixelStorei( 37440, dstTexture.flipY );\n\t\t_gl.pixelStorei( 37441, dstTexture.premultiplyAlpha );\n\t\t_gl.pixelStorei( 3317, dstTexture.unpackAlignment );\n\n\t\tif ( srcTexture.isDataTexture ) {\n\n\t\t\t_gl.texSubImage2D( 3553, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data );\n\n\t\t} else {\n\n\t\t\tif ( srcTexture.isCompressedTexture ) {\n\n\t\t\t\t_gl.compressedTexSubImage2D( 3553, level, position.x, position.y, srcTexture.mipmaps[ 0 ].width, srcTexture.mipmaps[ 0 ].height, glFormat, srcTexture.mipmaps[ 0 ].data );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.texSubImage2D( 3553, level, position.x, position.y, glFormat, glType, srcTexture.image );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Generate mipmaps only when copying level 0\n\t\tif ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( 3553 );\n\n\t\tstate.unbindTexture();\n\n\t};\n\n\tthis.copyTextureToTexture3D = function ( sourceBox, position, srcTexture, dstTexture, level = 0 ) {\n\n\t\tif ( _this.isWebGL1Renderer ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst width = sourceBox.max.x - sourceBox.min.x + 1;\n\t\tconst height = sourceBox.max.y - sourceBox.min.y + 1;\n\t\tconst depth = sourceBox.max.z - sourceBox.min.z + 1;\n\t\tconst glFormat = utils.convert( dstTexture.format );\n\t\tconst glType = utils.convert( dstTexture.type );\n\t\tlet glTarget;\n\n\t\tif ( dstTexture.isDataTexture3D ) {\n\n\t\t\ttextures.setTexture3D( dstTexture, 0 );\n\t\t\tglTarget = 32879;\n\n\t\t} else if ( dstTexture.isDataTexture2DArray ) {\n\n\t\t\ttextures.setTexture2DArray( dstTexture, 0 );\n\t\t\tglTarget = 35866;\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\t_gl.pixelStorei( 37440, dstTexture.flipY );\n\t\t_gl.pixelStorei( 37441, dstTexture.premultiplyAlpha );\n\t\t_gl.pixelStorei( 3317, dstTexture.unpackAlignment );\n\n\t\tconst unpackRowLen = _gl.getParameter( 3314 );\n\t\tconst unpackImageHeight = _gl.getParameter( 32878 );\n\t\tconst unpackSkipPixels = _gl.getParameter( 3316 );\n\t\tconst unpackSkipRows = _gl.getParameter( 3315 );\n\t\tconst unpackSkipImages = _gl.getParameter( 32877 );\n\n\t\tconst image = srcTexture.isCompressedTexture ? srcTexture.mipmaps[ 0 ] : srcTexture.image;\n\n\t\t_gl.pixelStorei( 3314, image.width );\n\t\t_gl.pixelStorei( 32878, image.height );\n\t\t_gl.pixelStorei( 3316, sourceBox.min.x );\n\t\t_gl.pixelStorei( 3315, sourceBox.min.y );\n\t\t_gl.pixelStorei( 32877, sourceBox.min.z );\n\n\t\tif ( srcTexture.isDataTexture || srcTexture.isDataTexture3D ) {\n\n\t\t\t_gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image.data );\n\n\t\t} else {\n\n\t\t\tif ( srcTexture.isCompressedTexture ) {\n\n\t\t\t\tconsole.warn( 'THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture.' );\n\t\t\t\t_gl.compressedTexSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, image.data );\n\n\t\t\t} else {\n\n\t\t\t\t_gl.texSubImage3D( glTarget, level, position.x, position.y, position.z, width, height, depth, glFormat, glType, image );\n\n\t\t\t}\n\n\t\t}\n\n\t\t_gl.pixelStorei( 3314, unpackRowLen );\n\t\t_gl.pixelStorei( 32878, unpackImageHeight );\n\t\t_gl.pixelStorei( 3316, unpackSkipPixels );\n\t\t_gl.pixelStorei( 3315, unpackSkipRows );\n\t\t_gl.pixelStorei( 32877, unpackSkipImages );\n\n\t\t// Generate mipmaps only when copying level 0\n\t\tif ( level === 0 && dstTexture.generateMipmaps ) _gl.generateMipmap( glTarget );\n\n\t\tstate.unbindTexture();\n\n\t};\n\n\tthis.initTexture = function ( texture ) {\n\n\t\ttextures.setTexture2D( texture, 0 );\n\n\t\tstate.unbindTexture();\n\n\t};\n\n\tthis.resetState = function () {\n\n\t\t_currentActiveCubeFace = 0;\n\t\t_currentActiveMipmapLevel = 0;\n\t\t_currentRenderTarget = null;\n\n\t\tstate.reset();\n\t\tbindingStates.reset();\n\n\t};\n\n\tif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef\n\n\t}\n\n}\n\nclass WebGL1Renderer extends WebGLRenderer {}\n\nWebGL1Renderer.prototype.isWebGL1Renderer = true;\n\nclass FogExp2 {\n\n\tconstructor( color, density = 0.00025 ) {\n\n\t\tthis.name = '';\n\n\t\tthis.color = new Color( color );\n\t\tthis.density = density;\n\n\t}\n\n\tclone() {\n\n\t\treturn new FogExp2( this.color, this.density );\n\n\t}\n\n\ttoJSON( /* meta */ ) {\n\n\t\treturn {\n\t\t\ttype: 'FogExp2',\n\t\t\tcolor: this.color.getHex(),\n\t\t\tdensity: this.density\n\t\t};\n\n\t}\n\n}\n\nFogExp2.prototype.isFogExp2 = true;\n\nclass Fog {\n\n\tconstructor( color, near = 1, far = 1000 ) {\n\n\t\tthis.name = '';\n\n\t\tthis.color = new Color( color );\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Fog( this.color, this.near, this.far );\n\n\t}\n\n\ttoJSON( /* meta */ ) {\n\n\t\treturn {\n\t\t\ttype: 'Fog',\n\t\t\tcolor: this.color.getHex(),\n\t\t\tnear: this.near,\n\t\t\tfar: this.far\n\t\t};\n\n\t}\n\n}\n\nFog.prototype.isFog = true;\n\nclass Scene extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'Scene';\n\n\t\tthis.background = null;\n\t\tthis.environment = null;\n\t\tthis.fog = null;\n\n\t\tthis.overrideMaterial = null;\n\n\t\tthis.autoUpdate = true; // checked by the renderer\n\n\t\tif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t\t\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef\n\n\t\t}\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tif ( source.background !== null ) this.background = source.background.clone();\n\t\tif ( source.environment !== null ) this.environment = source.environment.clone();\n\t\tif ( source.fog !== null ) this.fog = source.fog.clone();\n\n\t\tif ( source.overrideMaterial !== null ) this.overrideMaterial = source.overrideMaterial.clone();\n\n\t\tthis.autoUpdate = source.autoUpdate;\n\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.fog !== null ) data.object.fog = this.fog.toJSON();\n\n\t\treturn data;\n\n\t}\n\n}\n\nScene.prototype.isScene = true;\n\nclass InterleavedBuffer {\n\n\tconstructor( array, stride ) {\n\n\t\tthis.array = array;\n\t\tthis.stride = stride;\n\t\tthis.count = array !== undefined ? array.length / stride : 0;\n\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = { offset: 0, count: - 1 };\n\n\t\tthis.version = 0;\n\n\t\tthis.uuid = generateUUID();\n\n\t}\n\n\tonUploadCallback() {}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetUsage( value ) {\n\n\t\tthis.usage = value;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.array = new source.array.constructor( source.array );\n\t\tthis.count = source.count;\n\t\tthis.stride = source.stride;\n\t\tthis.usage = source.usage;\n\n\t\treturn this;\n\n\t}\n\n\tcopyAt( index1, attribute, index2 ) {\n\n\t\tindex1 *= this.stride;\n\t\tindex2 *= attribute.stride;\n\n\t\tfor ( let i = 0, l = this.stride; i < l; i ++ ) {\n\n\t\t\tthis.array[ index1 + i ] = attribute.array[ index2 + i ];\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tset( value, offset = 0 ) {\n\n\t\tthis.array.set( value, offset );\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tif ( data.arrayBuffers === undefined ) {\n\n\t\t\tdata.arrayBuffers = {};\n\n\t\t}\n\n\t\tif ( this.array.buffer._uuid === undefined ) {\n\n\t\t\tthis.array.buffer._uuid = generateUUID();\n\n\t\t}\n\n\t\tif ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) {\n\n\t\t\tdata.arrayBuffers[ this.array.buffer._uuid ] = this.array.slice( 0 ).buffer;\n\n\t\t}\n\n\t\tconst array = new this.array.constructor( data.arrayBuffers[ this.array.buffer._uuid ] );\n\n\t\tconst ib = new this.constructor( array, this.stride );\n\t\tib.setUsage( this.usage );\n\n\t\treturn ib;\n\n\t}\n\n\tonUpload( callback ) {\n\n\t\tthis.onUploadCallback = callback;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tif ( data.arrayBuffers === undefined ) {\n\n\t\t\tdata.arrayBuffers = {};\n\n\t\t}\n\n\t\t// generate UUID for array buffer if necessary\n\n\t\tif ( this.array.buffer._uuid === undefined ) {\n\n\t\t\tthis.array.buffer._uuid = generateUUID();\n\n\t\t}\n\n\t\tif ( data.arrayBuffers[ this.array.buffer._uuid ] === undefined ) {\n\n\t\t\tdata.arrayBuffers[ this.array.buffer._uuid ] = Array.prototype.slice.call( new Uint32Array( this.array.buffer ) );\n\n\t\t}\n\n\t\t//\n\n\t\treturn {\n\t\t\tuuid: this.uuid,\n\t\t\tbuffer: this.array.buffer._uuid,\n\t\t\ttype: this.array.constructor.name,\n\t\t\tstride: this.stride\n\t\t};\n\n\t}\n\n}\n\nInterleavedBuffer.prototype.isInterleavedBuffer = true;\n\nconst _vector$6 = /*@__PURE__*/ new Vector3();\n\nclass InterleavedBufferAttribute {\n\n\tconstructor( interleavedBuffer, itemSize, offset, normalized = false ) {\n\n\t\tthis.name = '';\n\n\t\tthis.data = interleavedBuffer;\n\t\tthis.itemSize = itemSize;\n\t\tthis.offset = offset;\n\n\t\tthis.normalized = normalized === true;\n\n\t}\n\n\tget count() {\n\n\t\treturn this.data.count;\n\n\t}\n\n\tget array() {\n\n\t\treturn this.data.array;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tthis.data.needsUpdate = value;\n\n\t}\n\n\tapplyMatrix4( m ) {\n\n\t\tfor ( let i = 0, l = this.data.count; i < l; i ++ ) {\n\n\t\t\t_vector$6.x = this.getX( i );\n\t\t\t_vector$6.y = this.getY( i );\n\t\t\t_vector$6.z = this.getZ( i );\n\n\t\t\t_vector$6.applyMatrix4( m );\n\n\t\t\tthis.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tapplyNormalMatrix( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$6.x = this.getX( i );\n\t\t\t_vector$6.y = this.getY( i );\n\t\t\t_vector$6.z = this.getZ( i );\n\n\t\t\t_vector$6.applyNormalMatrix( m );\n\n\t\t\tthis.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttransformDirection( m ) {\n\n\t\tfor ( let i = 0, l = this.count; i < l; i ++ ) {\n\n\t\t\t_vector$6.x = this.getX( i );\n\t\t\t_vector$6.y = this.getY( i );\n\t\t\t_vector$6.z = this.getZ( i );\n\n\t\t\t_vector$6.transformDirection( m );\n\n\t\t\tthis.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetX( index, x ) {\n\n\t\tthis.data.array[ index * this.data.stride + this.offset ] = x;\n\n\t\treturn this;\n\n\t}\n\n\tsetY( index, y ) {\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetZ( index, z ) {\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetW( index, w ) {\n\n\t\tthis.data.array[ index * this.data.stride + this.offset + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tgetX( index ) {\n\n\t\treturn this.data.array[ index * this.data.stride + this.offset ];\n\n\t}\n\n\tgetY( index ) {\n\n\t\treturn this.data.array[ index * this.data.stride + this.offset + 1 ];\n\n\t}\n\n\tgetZ( index ) {\n\n\t\treturn this.data.array[ index * this.data.stride + this.offset + 2 ];\n\n\t}\n\n\tgetW( index ) {\n\n\t\treturn this.data.array[ index * this.data.stride + this.offset + 3 ];\n\n\t}\n\n\tsetXY( index, x, y ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZ( index, x, y, z ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\t\tthis.data.array[ index + 2 ] = z;\n\n\t\treturn this;\n\n\t}\n\n\tsetXYZW( index, x, y, z, w ) {\n\n\t\tindex = index * this.data.stride + this.offset;\n\n\t\tthis.data.array[ index + 0 ] = x;\n\t\tthis.data.array[ index + 1 ] = y;\n\t\tthis.data.array[ index + 2 ] = z;\n\t\tthis.data.array[ index + 3 ] = w;\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tif ( data === undefined ) {\n\n\t\t\tconsole.log( 'THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.' );\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0; i < this.count; i ++ ) {\n\n\t\t\t\tconst index = i * this.data.stride + this.offset;\n\n\t\t\t\tfor ( let j = 0; j < this.itemSize; j ++ ) {\n\n\t\t\t\t\tarray.push( this.data.array[ index + j ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn new BufferAttribute( new this.array.constructor( array ), this.itemSize, this.normalized );\n\n\t\t} else {\n\n\t\t\tif ( data.interleavedBuffers === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers = {};\n\n\t\t\t}\n\n\t\t\tif ( data.interleavedBuffers[ this.data.uuid ] === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers[ this.data.uuid ] = this.data.clone( data );\n\n\t\t\t}\n\n\t\t\treturn new InterleavedBufferAttribute( data.interleavedBuffers[ this.data.uuid ], this.itemSize, this.offset, this.normalized );\n\n\t\t}\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tif ( data === undefined ) {\n\n\t\t\tconsole.log( 'THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.' );\n\n\t\t\tconst array = [];\n\n\t\t\tfor ( let i = 0; i < this.count; i ++ ) {\n\n\t\t\t\tconst index = i * this.data.stride + this.offset;\n\n\t\t\t\tfor ( let j = 0; j < this.itemSize; j ++ ) {\n\n\t\t\t\t\tarray.push( this.data.array[ index + j ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// deinterleave data and save it as an ordinary buffer attribute for now\n\n\t\t\treturn {\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\tarray: array,\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\n\t\t} else {\n\n\t\t\t// save as true interlaved attribtue\n\n\t\t\tif ( data.interleavedBuffers === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers = {};\n\n\t\t\t}\n\n\t\t\tif ( data.interleavedBuffers[ this.data.uuid ] === undefined ) {\n\n\t\t\t\tdata.interleavedBuffers[ this.data.uuid ] = this.data.toJSON( data );\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tisInterleavedBufferAttribute: true,\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\tdata: this.data.uuid,\n\t\t\t\toffset: this.offset,\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\n\t\t}\n\n\t}\n\n}\n\nInterleavedBufferAttribute.prototype.isInterleavedBufferAttribute = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * map: new THREE.Texture( <Image> ),\n * alphaMap: new THREE.Texture( <Image> ),\n * rotation: <float>,\n * sizeAttenuation: <bool>\n * }\n */\n\nclass SpriteMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'SpriteMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.rotation = 0;\n\n\t\tthis.sizeAttenuation = true;\n\n\t\tthis.transparent = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.rotation = source.rotation;\n\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\n\t\treturn this;\n\n\t}\n\n}\n\nSpriteMaterial.prototype.isSpriteMaterial = true;\n\nlet _geometry;\n\nconst _intersectPoint = /*@__PURE__*/ new Vector3();\nconst _worldScale = /*@__PURE__*/ new Vector3();\nconst _mvPosition = /*@__PURE__*/ new Vector3();\n\nconst _alignedPosition = /*@__PURE__*/ new Vector2();\nconst _rotatedPosition = /*@__PURE__*/ new Vector2();\nconst _viewWorldMatrix = /*@__PURE__*/ new Matrix4();\n\nconst _vA = /*@__PURE__*/ new Vector3();\nconst _vB = /*@__PURE__*/ new Vector3();\nconst _vC = /*@__PURE__*/ new Vector3();\n\nconst _uvA = /*@__PURE__*/ new Vector2();\nconst _uvB = /*@__PURE__*/ new Vector2();\nconst _uvC = /*@__PURE__*/ new Vector2();\n\nclass Sprite extends Object3D {\n\n\tconstructor( material ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Sprite';\n\n\t\tif ( _geometry === undefined ) {\n\n\t\t\t_geometry = new BufferGeometry();\n\n\t\t\tconst float32Array = new Float32Array( [\n\t\t\t\t- 0.5, - 0.5, 0, 0, 0,\n\t\t\t\t0.5, - 0.5, 0, 1, 0,\n\t\t\t\t0.5, 0.5, 0, 1, 1,\n\t\t\t\t- 0.5, 0.5, 0, 0, 1\n\t\t\t] );\n\n\t\t\tconst interleavedBuffer = new InterleavedBuffer( float32Array, 5 );\n\n\t\t\t_geometry.setIndex( [ 0, 1, 2,\t0, 2, 3 ] );\n\t\t\t_geometry.setAttribute( 'position', new InterleavedBufferAttribute( interleavedBuffer, 3, 0, false ) );\n\t\t\t_geometry.setAttribute( 'uv', new InterleavedBufferAttribute( interleavedBuffer, 2, 3, false ) );\n\n\t\t}\n\n\t\tthis.geometry = _geometry;\n\t\tthis.material = ( material !== undefined ) ? material : new SpriteMaterial();\n\n\t\tthis.center = new Vector2( 0.5, 0.5 );\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tif ( raycaster.camera === null ) {\n\n\t\t\tconsole.error( 'THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.' );\n\n\t\t}\n\n\t\t_worldScale.setFromMatrixScale( this.matrixWorld );\n\n\t\t_viewWorldMatrix.copy( raycaster.camera.matrixWorld );\n\t\tthis.modelViewMatrix.multiplyMatrices( raycaster.camera.matrixWorldInverse, this.matrixWorld );\n\n\t\t_mvPosition.setFromMatrixPosition( this.modelViewMatrix );\n\n\t\tif ( raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false ) {\n\n\t\t\t_worldScale.multiplyScalar( - _mvPosition.z );\n\n\t\t}\n\n\t\tconst rotation = this.material.rotation;\n\t\tlet sin, cos;\n\n\t\tif ( rotation !== 0 ) {\n\n\t\t\tcos = Math.cos( rotation );\n\t\t\tsin = Math.sin( rotation );\n\n\t\t}\n\n\t\tconst center = this.center;\n\n\t\ttransformVertex( _vA.set( - 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\ttransformVertex( _vB.set( 0.5, - 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\ttransformVertex( _vC.set( 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\n\t\t_uvA.set( 0, 0 );\n\t\t_uvB.set( 1, 0 );\n\t\t_uvC.set( 1, 1 );\n\n\t\t// check first triangle\n\t\tlet intersect = raycaster.ray.intersectTriangle( _vA, _vB, _vC, false, _intersectPoint );\n\n\t\tif ( intersect === null ) {\n\n\t\t\t// check second triangle\n\t\t\ttransformVertex( _vB.set( - 0.5, 0.5, 0 ), _mvPosition, center, _worldScale, sin, cos );\n\t\t\t_uvB.set( 0, 1 );\n\n\t\t\tintersect = raycaster.ray.intersectTriangle( _vA, _vC, _vB, false, _intersectPoint );\n\t\t\tif ( intersect === null ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( _intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tpoint: _intersectPoint.clone(),\n\t\t\tuv: Triangle.getUV( _intersectPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2() ),\n\t\t\tface: null,\n\t\t\tobject: this\n\n\t\t} );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tif ( source.center !== undefined ) this.center.copy( source.center );\n\n\t\tthis.material = source.material;\n\n\t\treturn this;\n\n\t}\n\n}\n\nSprite.prototype.isSprite = true;\n\nfunction transformVertex( vertexPosition, mvPosition, center, scale, sin, cos ) {\n\n\t// compute position in camera space\n\t_alignedPosition.subVectors( vertexPosition, center ).addScalar( 0.5 ).multiply( scale );\n\n\t// to check if rotation is not zero\n\tif ( sin !== undefined ) {\n\n\t\t_rotatedPosition.x = ( cos * _alignedPosition.x ) - ( sin * _alignedPosition.y );\n\t\t_rotatedPosition.y = ( sin * _alignedPosition.x ) + ( cos * _alignedPosition.y );\n\n\t} else {\n\n\t\t_rotatedPosition.copy( _alignedPosition );\n\n\t}\n\n\n\tvertexPosition.copy( mvPosition );\n\tvertexPosition.x += _rotatedPosition.x;\n\tvertexPosition.y += _rotatedPosition.y;\n\n\t// transform to world space\n\tvertexPosition.applyMatrix4( _viewWorldMatrix );\n\n}\n\nconst _v1$2 = /*@__PURE__*/ new Vector3();\nconst _v2$1 = /*@__PURE__*/ new Vector3();\n\nclass LOD extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis._currentLevel = 0;\n\n\t\tthis.type = 'LOD';\n\n\t\tObject.defineProperties( this, {\n\t\t\tlevels: {\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tisLOD: {\n\t\t\t\tvalue: true,\n\t\t\t}\n\t\t} );\n\n\t\tthis.autoUpdate = true;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source, false );\n\n\t\tconst levels = source.levels;\n\n\t\tfor ( let i = 0, l = levels.length; i < l; i ++ ) {\n\n\t\t\tconst level = levels[ i ];\n\n\t\t\tthis.addLevel( level.object.clone(), level.distance );\n\n\t\t}\n\n\t\tthis.autoUpdate = source.autoUpdate;\n\n\t\treturn this;\n\n\t}\n\n\taddLevel( object, distance = 0 ) {\n\n\t\tdistance = Math.abs( distance );\n\n\t\tconst levels = this.levels;\n\n\t\tlet l;\n\n\t\tfor ( l = 0; l < levels.length; l ++ ) {\n\n\t\t\tif ( distance < levels[ l ].distance ) {\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlevels.splice( l, 0, { distance: distance, object: object } );\n\n\t\tthis.add( object );\n\n\t\treturn this;\n\n\t}\n\n\tgetCurrentLevel() {\n\n\t\treturn this._currentLevel;\n\n\t}\n\n\tgetObjectForDistance( distance ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 0 ) {\n\n\t\t\tlet i, l;\n\n\t\t\tfor ( i = 1, l = levels.length; i < l; i ++ ) {\n\n\t\t\t\tif ( distance < levels[ i ].distance ) {\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn levels[ i - 1 ].object;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 0 ) {\n\n\t\t\t_v1$2.setFromMatrixPosition( this.matrixWorld );\n\n\t\t\tconst distance = raycaster.ray.origin.distanceTo( _v1$2 );\n\n\t\t\tthis.getObjectForDistance( distance ).raycast( raycaster, intersects );\n\n\t\t}\n\n\t}\n\n\tupdate( camera ) {\n\n\t\tconst levels = this.levels;\n\n\t\tif ( levels.length > 1 ) {\n\n\t\t\t_v1$2.setFromMatrixPosition( camera.matrixWorld );\n\t\t\t_v2$1.setFromMatrixPosition( this.matrixWorld );\n\n\t\t\tconst distance = _v1$2.distanceTo( _v2$1 ) / camera.zoom;\n\n\t\t\tlevels[ 0 ].object.visible = true;\n\n\t\t\tlet i, l;\n\n\t\t\tfor ( i = 1, l = levels.length; i < l; i ++ ) {\n\n\t\t\t\tif ( distance >= levels[ i ].distance ) {\n\n\t\t\t\t\tlevels[ i - 1 ].object.visible = false;\n\t\t\t\t\tlevels[ i ].object.visible = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._currentLevel = i - 1;\n\n\t\t\tfor ( ; i < l; i ++ ) {\n\n\t\t\t\tlevels[ i ].object.visible = false;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tif ( this.autoUpdate === false ) data.object.autoUpdate = false;\n\n\t\tdata.object.levels = [];\n\n\t\tconst levels = this.levels;\n\n\t\tfor ( let i = 0, l = levels.length; i < l; i ++ ) {\n\n\t\t\tconst level = levels[ i ];\n\n\t\t\tdata.object.levels.push( {\n\t\t\t\tobject: level.object.uuid,\n\t\t\t\tdistance: level.distance\n\t\t\t} );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst _basePosition = /*@__PURE__*/ new Vector3();\n\nconst _skinIndex = /*@__PURE__*/ new Vector4();\nconst _skinWeight = /*@__PURE__*/ new Vector4();\n\nconst _vector$5 = /*@__PURE__*/ new Vector3();\nconst _matrix = /*@__PURE__*/ new Matrix4();\n\nclass SkinnedMesh extends Mesh {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'SkinnedMesh';\n\n\t\tthis.bindMode = 'attached';\n\t\tthis.bindMatrix = new Matrix4();\n\t\tthis.bindMatrixInverse = new Matrix4();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.bindMode = source.bindMode;\n\t\tthis.bindMatrix.copy( source.bindMatrix );\n\t\tthis.bindMatrixInverse.copy( source.bindMatrixInverse );\n\n\t\tthis.skeleton = source.skeleton;\n\n\t\treturn this;\n\n\t}\n\n\tbind( skeleton, bindMatrix ) {\n\n\t\tthis.skeleton = skeleton;\n\n\t\tif ( bindMatrix === undefined ) {\n\n\t\t\tthis.updateMatrixWorld( true );\n\n\t\t\tthis.skeleton.calculateInverses();\n\n\t\t\tbindMatrix = this.matrixWorld;\n\n\t\t}\n\n\t\tthis.bindMatrix.copy( bindMatrix );\n\t\tthis.bindMatrixInverse.copy( bindMatrix ).invert();\n\n\t}\n\n\tpose() {\n\n\t\tthis.skeleton.pose();\n\n\t}\n\n\tnormalizeSkinWeights() {\n\n\t\tconst vector = new Vector4();\n\n\t\tconst skinWeight = this.geometry.attributes.skinWeight;\n\n\t\tfor ( let i = 0, l = skinWeight.count; i < l; i ++ ) {\n\n\t\t\tvector.x = skinWeight.getX( i );\n\t\t\tvector.y = skinWeight.getY( i );\n\t\t\tvector.z = skinWeight.getZ( i );\n\t\t\tvector.w = skinWeight.getW( i );\n\n\t\t\tconst scale = 1.0 / vector.manhattanLength();\n\n\t\t\tif ( scale !== Infinity ) {\n\n\t\t\t\tvector.multiplyScalar( scale );\n\n\t\t\t} else {\n\n\t\t\t\tvector.set( 1, 0, 0, 0 ); // do something reasonable\n\n\t\t\t}\n\n\t\t\tskinWeight.setXYZW( i, vector.x, vector.y, vector.z, vector.w );\n\n\t\t}\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tif ( this.bindMode === 'attached' ) {\n\n\t\t\tthis.bindMatrixInverse.copy( this.matrixWorld ).invert();\n\n\t\t} else if ( this.bindMode === 'detached' ) {\n\n\t\t\tthis.bindMatrixInverse.copy( this.bindMatrix ).invert();\n\n\t\t} else {\n\n\t\t\tconsole.warn( 'THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode );\n\n\t\t}\n\n\t}\n\n\tboneTransform( index, target ) {\n\n\t\tconst skeleton = this.skeleton;\n\t\tconst geometry = this.geometry;\n\n\t\t_skinIndex.fromBufferAttribute( geometry.attributes.skinIndex, index );\n\t\t_skinWeight.fromBufferAttribute( geometry.attributes.skinWeight, index );\n\n\t\t_basePosition.fromBufferAttribute( geometry.attributes.position, index ).applyMatrix4( this.bindMatrix );\n\n\t\ttarget.set( 0, 0, 0 );\n\n\t\tfor ( let i = 0; i < 4; i ++ ) {\n\n\t\t\tconst weight = _skinWeight.getComponent( i );\n\n\t\t\tif ( weight !== 0 ) {\n\n\t\t\t\tconst boneIndex = _skinIndex.getComponent( i );\n\n\t\t\t\t_matrix.multiplyMatrices( skeleton.bones[ boneIndex ].matrixWorld, skeleton.boneInverses[ boneIndex ] );\n\n\t\t\t\ttarget.addScaledVector( _vector$5.copy( _basePosition ).applyMatrix4( _matrix ), weight );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn target.applyMatrix4( this.bindMatrixInverse );\n\n\t}\n\n}\n\nSkinnedMesh.prototype.isSkinnedMesh = true;\n\nclass Bone extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'Bone';\n\n\t}\n\n}\n\nBone.prototype.isBone = true;\n\nclass DataTexture extends Texture {\n\n\tconstructor( data = null, width = 1, height = 1, format, type, mapping, wrapS, wrapT, magFilter = NearestFilter, minFilter = NearestFilter, anisotropy, encoding ) {\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );\n\n\t\tthis.image = { data: data, width: width, height: height };\n\n\t\tthis.magFilter = magFilter;\n\t\tthis.minFilter = minFilter;\n\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nDataTexture.prototype.isDataTexture = true;\n\nconst _offsetMatrix = /*@__PURE__*/ new Matrix4();\nconst _identityMatrix = /*@__PURE__*/ new Matrix4();\n\nclass Skeleton {\n\n\tconstructor( bones = [], boneInverses = [] ) {\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.bones = bones.slice( 0 );\n\t\tthis.boneInverses = boneInverses;\n\t\tthis.boneMatrices = null;\n\n\t\tthis.boneTexture = null;\n\t\tthis.boneTextureSize = 0;\n\n\t\tthis.frame = - 1;\n\n\t\tthis.init();\n\n\t}\n\n\tinit() {\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\n\t\tthis.boneMatrices = new Float32Array( bones.length * 16 );\n\n\t\t// calculate inverse bone matrices if necessary\n\n\t\tif ( boneInverses.length === 0 ) {\n\n\t\t\tthis.calculateInverses();\n\n\t\t} else {\n\n\t\t\t// handle special case\n\n\t\t\tif ( bones.length !== boneInverses.length ) {\n\n\t\t\t\tconsole.warn( 'THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.' );\n\n\t\t\t\tthis.boneInverses = [];\n\n\t\t\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\t\t\tthis.boneInverses.push( new Matrix4() );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tcalculateInverses() {\n\n\t\tthis.boneInverses.length = 0;\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst inverse = new Matrix4();\n\n\t\t\tif ( this.bones[ i ] ) {\n\n\t\t\t\tinverse.copy( this.bones[ i ].matrixWorld ).invert();\n\n\t\t\t}\n\n\t\t\tthis.boneInverses.push( inverse );\n\n\t\t}\n\n\t}\n\n\tpose() {\n\n\t\t// recover the bind-time world matrices\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone ) {\n\n\t\t\t\tbone.matrixWorld.copy( this.boneInverses[ i ] ).invert();\n\n\t\t\t}\n\n\t\t}\n\n\t\t// compute the local matrices, positions, rotations and scales\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone ) {\n\n\t\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\t\tbone.matrix.copy( bone.parent.matrixWorld ).invert();\n\t\t\t\t\tbone.matrix.multiply( bone.matrixWorld );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tbone.matrix.copy( bone.matrixWorld );\n\n\t\t\t\t}\n\n\t\t\t\tbone.matrix.decompose( bone.position, bone.quaternion, bone.scale );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tupdate() {\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\t\tconst boneMatrices = this.boneMatrices;\n\t\tconst boneTexture = this.boneTexture;\n\n\t\t// flatten bone matrices to array\n\n\t\tfor ( let i = 0, il = bones.length; i < il; i ++ ) {\n\n\t\t\t// compute the offset between the current and the original transform\n\n\t\t\tconst matrix = bones[ i ] ? bones[ i ].matrixWorld : _identityMatrix;\n\n\t\t\t_offsetMatrix.multiplyMatrices( matrix, boneInverses[ i ] );\n\t\t\t_offsetMatrix.toArray( boneMatrices, i * 16 );\n\n\t\t}\n\n\t\tif ( boneTexture !== null ) {\n\n\t\t\tboneTexture.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new Skeleton( this.bones, this.boneInverses );\n\n\t}\n\n\tcomputeBoneTexture() {\n\n\t\t// layout (1 matrix = 4 pixels)\n\t\t// RGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n\t\t// with 8x8 pixel texture max 16 bones * 4 pixels = (8 * 8)\n\t\t// 16x16 pixel texture max 64 bones * 4 pixels = (16 * 16)\n\t\t// 32x32 pixel texture max 256 bones * 4 pixels = (32 * 32)\n\t\t// 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)\n\n\t\tlet size = Math.sqrt( this.bones.length * 4 ); // 4 pixels needed for 1 matrix\n\t\tsize = ceilPowerOfTwo( size );\n\t\tsize = Math.max( size, 4 );\n\n\t\tconst boneMatrices = new Float32Array( size * size * 4 ); // 4 floats per RGBA pixel\n\t\tboneMatrices.set( this.boneMatrices ); // copy current values\n\n\t\tconst boneTexture = new DataTexture( boneMatrices, size, size, RGBAFormat, FloatType );\n\n\t\tthis.boneMatrices = boneMatrices;\n\t\tthis.boneTexture = boneTexture;\n\t\tthis.boneTextureSize = size;\n\n\t\treturn this;\n\n\t}\n\n\tgetBoneByName( name ) {\n\n\t\tfor ( let i = 0, il = this.bones.length; i < il; i ++ ) {\n\n\t\t\tconst bone = this.bones[ i ];\n\n\t\t\tif ( bone.name === name ) {\n\n\t\t\t\treturn bone;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn undefined;\n\n\t}\n\n\tdispose( ) {\n\n\t\tif ( this.boneTexture !== null ) {\n\n\t\t\tthis.boneTexture.dispose();\n\n\t\t\tthis.boneTexture = null;\n\n\t\t}\n\n\t}\n\n\tfromJSON( json, bones ) {\n\n\t\tthis.uuid = json.uuid;\n\n\t\tfor ( let i = 0, l = json.bones.length; i < l; i ++ ) {\n\n\t\t\tconst uuid = json.bones[ i ];\n\t\t\tlet bone = bones[ uuid ];\n\n\t\t\tif ( bone === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.Skeleton: No bone found with UUID:', uuid );\n\t\t\t\tbone = new Bone();\n\n\t\t\t}\n\n\t\t\tthis.bones.push( bone );\n\t\t\tthis.boneInverses.push( new Matrix4().fromArray( json.boneInverses[ i ] ) );\n\n\t\t}\n\n\t\tthis.init();\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Skeleton',\n\t\t\t\tgenerator: 'Skeleton.toJSON'\n\t\t\t},\n\t\t\tbones: [],\n\t\t\tboneInverses: []\n\t\t};\n\n\t\tdata.uuid = this.uuid;\n\n\t\tconst bones = this.bones;\n\t\tconst boneInverses = this.boneInverses;\n\n\t\tfor ( let i = 0, l = bones.length; i < l; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\t\t\tdata.bones.push( bone.uuid );\n\n\t\t\tconst boneInverse = boneInverses[ i ];\n\t\t\tdata.boneInverses.push( boneInverse.toArray() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n}\n\nconst _instanceLocalMatrix = /*@__PURE__*/ new Matrix4();\nconst _instanceWorldMatrix = /*@__PURE__*/ new Matrix4();\n\nconst _instanceIntersects = [];\n\nconst _mesh = /*@__PURE__*/ new Mesh();\n\nclass InstancedMesh extends Mesh {\n\n\tconstructor( geometry, material, count ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.instanceMatrix = new BufferAttribute( new Float32Array( count * 16 ), 16 );\n\t\tthis.instanceColor = null;\n\n\t\tthis.count = count;\n\n\t\tthis.frustumCulled = false;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.instanceMatrix.copy( source.instanceMatrix );\n\n\t\tif ( source.instanceColor !== null ) this.instanceColor = source.instanceColor.clone();\n\n\t\tthis.count = source.count;\n\n\t\treturn this;\n\n\t}\n\n\tgetColorAt( index, color ) {\n\n\t\tcolor.fromArray( this.instanceColor.array, index * 3 );\n\n\t}\n\n\tgetMatrixAt( index, matrix ) {\n\n\t\tmatrix.fromArray( this.instanceMatrix.array, index * 16 );\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst raycastTimes = this.count;\n\n\t\t_mesh.geometry = this.geometry;\n\t\t_mesh.material = this.material;\n\n\t\tif ( _mesh.material === undefined ) return;\n\n\t\tfor ( let instanceId = 0; instanceId < raycastTimes; instanceId ++ ) {\n\n\t\t\t// calculate the world matrix for each instance\n\n\t\t\tthis.getMatrixAt( instanceId, _instanceLocalMatrix );\n\n\t\t\t_instanceWorldMatrix.multiplyMatrices( matrixWorld, _instanceLocalMatrix );\n\n\t\t\t// the mesh represents this single instance\n\n\t\t\t_mesh.matrixWorld = _instanceWorldMatrix;\n\n\t\t\t_mesh.raycast( raycaster, _instanceIntersects );\n\n\t\t\t// process the result of raycast\n\n\t\t\tfor ( let i = 0, l = _instanceIntersects.length; i < l; i ++ ) {\n\n\t\t\t\tconst intersect = _instanceIntersects[ i ];\n\t\t\t\tintersect.instanceId = instanceId;\n\t\t\t\tintersect.object = this;\n\t\t\t\tintersects.push( intersect );\n\n\t\t\t}\n\n\t\t\t_instanceIntersects.length = 0;\n\n\t\t}\n\n\t}\n\n\tsetColorAt( index, color ) {\n\n\t\tif ( this.instanceColor === null ) {\n\n\t\t\tthis.instanceColor = new BufferAttribute( new Float32Array( this.count * 3 ), 3 );\n\n\t\t}\n\n\t\tcolor.toArray( this.instanceColor.array, index * 3 );\n\n\t}\n\n\tsetMatrixAt( index, matrix ) {\n\n\t\tmatrix.toArray( this.instanceMatrix.array, index * 16 );\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t}\n\n\tdispose() {\n\n\t\tthis.dispatchEvent( { type: 'dispose' } );\n\n\t}\n\n}\n\nInstancedMesh.prototype.isInstancedMesh = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n *\n * linewidth: <float>,\n * linecap: \"round\",\n * linejoin: \"round\"\n * }\n */\n\nclass LineBasicMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineBasicMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.linewidth = 1;\n\t\tthis.linecap = 'round';\n\t\tthis.linejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.linewidth = source.linewidth;\n\t\tthis.linecap = source.linecap;\n\t\tthis.linejoin = source.linejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineBasicMaterial.prototype.isLineBasicMaterial = true;\n\nconst _start$1 = /*@__PURE__*/ new Vector3();\nconst _end$1 = /*@__PURE__*/ new Vector3();\nconst _inverseMatrix$1 = /*@__PURE__*/ new Matrix4();\nconst _ray$1 = /*@__PURE__*/ new Ray();\nconst _sphere$1 = /*@__PURE__*/ new Sphere();\n\nclass Line extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new LineBasicMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Line';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\t// we assume non-indexed geometry\n\n\t\t\tif ( geometry.index === null ) {\n\n\t\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\t\tconst lineDistances = [ 0 ];\n\n\t\t\t\tfor ( let i = 1, l = positionAttribute.count; i < l; i ++ ) {\n\n\t\t\t\t\t_start$1.fromBufferAttribute( positionAttribute, i - 1 );\n\t\t\t\t\t_end$1.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\t\tlineDistances[ i ] = lineDistances[ i - 1 ];\n\t\t\t\t\tlineDistances[ i ] += _start$1.distanceTo( _end$1 );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Line.threshold;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere$1.copy( geometry.boundingSphere );\n\t\t_sphere$1.applyMatrix4( matrixWorld );\n\t\t_sphere$1.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere$1 ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix$1.copy( matrixWorld ).invert();\n\t\t_ray$1.copy( raycaster.ray ).applyMatrix4( _inverseMatrix$1 );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tconst vStart = new Vector3();\n\t\tconst vEnd = new Vector3();\n\t\tconst interSegment = new Vector3();\n\t\tconst interRay = new Vector3();\n\t\tconst step = this.isLineSegments ? 2 : 1;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst attributes = geometry.attributes;\n\t\t\tconst positionAttribute = attributes.position;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n\t\t\t\t\tconst b = index.getX( i + 1 );\n\n\t\t\t\t\tvStart.fromBufferAttribute( positionAttribute, a );\n\t\t\t\t\tvEnd.fromBufferAttribute( positionAttribute, b );\n\n\t\t\t\t\tconst distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\t\tintersects.push( {\n\n\t\t\t\t\t\tdistance: distance,\n\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\tface: null,\n\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\tobject: this\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end - 1; i < l; i += step ) {\n\n\t\t\t\t\tvStart.fromBufferAttribute( positionAttribute, i );\n\t\t\t\t\tvEnd.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\t\tconst distSq = _ray$1.distanceSqToSegment( vStart, vEnd, interRay, interSegment );\n\n\t\t\t\t\tif ( distSq > localThresholdSq ) continue;\n\n\t\t\t\t\tinterRay.applyMatrix4( this.matrixWorld ); //Move back to world space for distance calculation\n\n\t\t\t\t\tconst distance = raycaster.ray.origin.distanceTo( interRay );\n\n\t\t\t\t\tif ( distance < raycaster.near || distance > raycaster.far ) continue;\n\n\t\t\t\t\tintersects.push( {\n\n\t\t\t\t\t\tdistance: distance,\n\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4( this.matrixWorld ),\n\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\tface: null,\n\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\tobject: this\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nLine.prototype.isLine = true;\n\nconst _start = /*@__PURE__*/ new Vector3();\nconst _end = /*@__PURE__*/ new Vector3();\n\nclass LineSegments extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'LineSegments';\n\n\t}\n\n\tcomputeLineDistances() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\t// we assume non-indexed geometry\n\n\t\t\tif ( geometry.index === null ) {\n\n\t\t\t\tconst positionAttribute = geometry.attributes.position;\n\t\t\t\tconst lineDistances = [];\n\n\t\t\t\tfor ( let i = 0, l = positionAttribute.count; i < l; i += 2 ) {\n\n\t\t\t\t\t_start.fromBufferAttribute( positionAttribute, i );\n\t\t\t\t\t_end.fromBufferAttribute( positionAttribute, i + 1 );\n\n\t\t\t\t\tlineDistances[ i ] = ( i === 0 ) ? 0 : lineDistances[ i - 1 ];\n\t\t\t\t\tlineDistances[ i + 1 ] = lineDistances[ i ] + _start.distanceTo( _end );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.setAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.' );\n\n\t\t\t}\n\n\t\t} else if ( geometry.isGeometry ) {\n\n\t\t\tconsole.error( 'THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineSegments.prototype.isLineSegments = true;\n\nclass LineLoop extends Line {\n\n\tconstructor( geometry, material ) {\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'LineLoop';\n\n\t}\n\n}\n\nLineLoop.prototype.isLineLoop = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n * map: new THREE.Texture( <Image> ),\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * size: <float>,\n * sizeAttenuation: <bool>\n *\n * morphTargets: <bool>\n * }\n */\n\nclass PointsMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PointsMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.size = 1;\n\t\tthis.sizeAttenuation = true;\n\n\t\tthis.morphTargets = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.size = source.size;\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\n\t\tthis.morphTargets = source.morphTargets;\n\n\t\treturn this;\n\n\t}\n\n}\n\nPointsMaterial.prototype.isPointsMaterial = true;\n\nconst _inverseMatrix = /*@__PURE__*/ new Matrix4();\nconst _ray = /*@__PURE__*/ new Ray();\nconst _sphere = /*@__PURE__*/ new Sphere();\nconst _position$2 = /*@__PURE__*/ new Vector3();\n\nclass Points extends Object3D {\n\n\tconstructor( geometry = new BufferGeometry(), material = new PointsMaterial() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Points';\n\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\n\t\tthis.updateMorphTargets();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.material = source.material;\n\t\tthis.geometry = source.geometry;\n\n\t\treturn this;\n\n\t}\n\n\traycast( raycaster, intersects ) {\n\n\t\tconst geometry = this.geometry;\n\t\tconst matrixWorld = this.matrixWorld;\n\t\tconst threshold = raycaster.params.Points.threshold;\n\t\tconst drawRange = geometry.drawRange;\n\n\t\t// Checking boundingSphere distance to ray\n\n\t\tif ( geometry.boundingSphere === null ) geometry.computeBoundingSphere();\n\n\t\t_sphere.copy( geometry.boundingSphere );\n\t\t_sphere.applyMatrix4( matrixWorld );\n\t\t_sphere.radius += threshold;\n\n\t\tif ( raycaster.ray.intersectsSphere( _sphere ) === false ) return;\n\n\t\t//\n\n\t\t_inverseMatrix.copy( matrixWorld ).invert();\n\t\t_ray.copy( raycaster.ray ).applyMatrix4( _inverseMatrix );\n\n\t\tconst localThreshold = threshold / ( ( this.scale.x + this.scale.y + this.scale.z ) / 3 );\n\t\tconst localThresholdSq = localThreshold * localThreshold;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst index = geometry.index;\n\t\t\tconst attributes = geometry.attributes;\n\t\t\tconst positionAttribute = attributes.position;\n\n\t\t\tif ( index !== null ) {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, il = end; i < il; i ++ ) {\n\n\t\t\t\t\tconst a = index.getX( i );\n\n\t\t\t\t\t_position$2.fromBufferAttribute( positionAttribute, a );\n\n\t\t\t\t\ttestPoint( _position$2, a, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconst start = Math.max( 0, drawRange.start );\n\t\t\t\tconst end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( let i = start, l = end; i < l; i ++ ) {\n\n\t\t\t\t\t_position$2.fromBufferAttribute( positionAttribute, i );\n\n\t\t\t\t\ttestPoint( _position$2, i, localThresholdSq, matrixWorld, raycaster, intersects, this );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t}\n\n\t}\n\n\tupdateMorphTargets() {\n\n\t\tconst geometry = this.geometry;\n\n\t\tif ( geometry.isBufferGeometry ) {\n\n\t\t\tconst morphAttributes = geometry.morphAttributes;\n\t\t\tconst keys = Object.keys( morphAttributes );\n\n\t\t\tif ( keys.length > 0 ) {\n\n\t\t\t\tconst morphAttribute = morphAttributes[ keys[ 0 ] ];\n\n\t\t\t\tif ( morphAttribute !== undefined ) {\n\n\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\tfor ( let m = 0, ml = morphAttribute.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\tconst name = morphAttribute[ m ].name || String( m );\n\n\t\t\t\t\t\tthis.morphTargetInfluences.push( 0 );\n\t\t\t\t\t\tthis.morphTargetDictionary[ name ] = m;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tconst morphTargets = geometry.morphTargets;\n\n\t\t\tif ( morphTargets !== undefined && morphTargets.length > 0 ) {\n\n\t\t\t\tconsole.error( 'THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n\nPoints.prototype.isPoints = true;\n\nfunction testPoint( point, index, localThresholdSq, matrixWorld, raycaster, intersects, object ) {\n\n\tconst rayPointDistanceSq = _ray.distanceSqToPoint( point );\n\n\tif ( rayPointDistanceSq < localThresholdSq ) {\n\n\t\tconst intersectPoint = new Vector3();\n\n\t\t_ray.closestPointToPoint( point, intersectPoint );\n\t\tintersectPoint.applyMatrix4( matrixWorld );\n\n\t\tconst distance = raycaster.ray.origin.distanceTo( intersectPoint );\n\n\t\tif ( distance < raycaster.near || distance > raycaster.far ) return;\n\n\t\tintersects.push( {\n\n\t\t\tdistance: distance,\n\t\t\tdistanceToRay: Math.sqrt( rayPointDistanceSq ),\n\t\t\tpoint: intersectPoint,\n\t\t\tindex: index,\n\t\t\tface: null,\n\t\t\tobject: object\n\n\t\t} );\n\n\t}\n\n}\n\nclass VideoTexture extends Texture {\n\n\tconstructor( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {\n\n\t\tsuper( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.format = format !== undefined ? format : RGBFormat;\n\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : LinearFilter;\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : LinearFilter;\n\n\t\tthis.generateMipmaps = false;\n\n\t\tconst scope = this;\n\n\t\tfunction updateVideo() {\n\n\t\t\tscope.needsUpdate = true;\n\t\t\tvideo.requestVideoFrameCallback( updateVideo );\n\n\t\t}\n\n\t\tif ( 'requestVideoFrameCallback' in video ) {\n\n\t\t\tvideo.requestVideoFrameCallback( updateVideo );\n\n\t\t}\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor( this.image ).copy( this );\n\n\t}\n\n\tupdate() {\n\n\t\tconst video = this.image;\n\t\tconst hasVideoFrameCallback = 'requestVideoFrameCallback' in video;\n\n\t\tif ( hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA ) {\n\n\t\t\tthis.needsUpdate = true;\n\n\t\t}\n\n\t}\n\n}\n\nVideoTexture.prototype.isVideoTexture = true;\n\nclass CompressedTexture extends Texture {\n\n\tconstructor( mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding ) {\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding );\n\n\t\tthis.image = { width: width, height: height };\n\t\tthis.mipmaps = mipmaps;\n\n\t\t// no flipping for cube textures\n\t\t// (also flipping doesn't work for compressed textures )\n\n\t\tthis.flipY = false;\n\n\t\t// can't generate mipmaps for compressed textures\n\t\t// mips must be embedded in DDS files\n\n\t\tthis.generateMipmaps = false;\n\n\t}\n\n}\n\nCompressedTexture.prototype.isCompressedTexture = true;\n\nclass CanvasTexture extends Texture {\n\n\tconstructor( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy ) {\n\n\t\tsuper( canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.needsUpdate = true;\n\n\t}\n\n}\n\nCanvasTexture.prototype.isCanvasTexture = true;\n\nclass DepthTexture extends Texture {\n\n\tconstructor( width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format ) {\n\n\t\tformat = format !== undefined ? format : DepthFormat;\n\n\t\tif ( format !== DepthFormat && format !== DepthStencilFormat ) {\n\n\t\t\tthrow new Error( 'DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat' );\n\n\t\t}\n\n\t\tif ( type === undefined && format === DepthFormat ) type = UnsignedShortType;\n\t\tif ( type === undefined && format === DepthStencilFormat ) type = UnsignedInt248Type;\n\n\t\tsuper( null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );\n\n\t\tthis.image = { width: width, height: height };\n\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : NearestFilter;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : NearestFilter;\n\n\t\tthis.flipY = false;\n\t\tthis.generateMipmaps\t= false;\n\n\t}\n\n\n}\n\nDepthTexture.prototype.isDepthTexture = true;\n\nclass CircleGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, segments = 8, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CircleGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tsegments: segments,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tsegments = Math.max( 3, segments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// center point\n\n\t\tvertices.push( 0, 0, 0 );\n\t\tnormals.push( 0, 0, 1 );\n\t\tuvs.push( 0.5, 0.5 );\n\n\t\tfor ( let s = 0, i = 3; s <= segments; s ++, i += 3 ) {\n\n\t\t\tconst segment = thetaStart + s / segments * thetaLength;\n\n\t\t\t// vertex\n\n\t\t\tvertex.x = radius * Math.cos( segment );\n\t\t\tvertex.y = radius * Math.sin( segment );\n\n\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t// normal\n\n\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t// uvs\n\n\t\t\tuv.x = ( vertices[ i ] / radius + 1 ) / 2;\n\t\t\tuv.y = ( vertices[ i + 1 ] / radius + 1 ) / 2;\n\n\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\tindices.push( i, i + 1, 0 );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass CylinderGeometry extends BufferGeometry {\n\n\tconstructor( radiusTop = 1, radiusBottom = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\t\tthis.type = 'CylinderGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradiusTop: radiusTop,\n\t\t\tradiusBottom: radiusBottom,\n\t\t\theight: height,\n\t\t\tradialSegments: radialSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\topenEnded: openEnded,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tconst scope = this;\n\n\t\tradialSegments = Math.floor( radialSegments );\n\t\theightSegments = Math.floor( heightSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet index = 0;\n\t\tconst indexArray = [];\n\t\tconst halfHeight = height / 2;\n\t\tlet groupStart = 0;\n\n\t\t// generate geometry\n\n\t\tgenerateTorso();\n\n\t\tif ( openEnded === false ) {\n\n\t\t\tif ( radiusTop > 0 ) generateCap( true );\n\t\t\tif ( radiusBottom > 0 ) generateCap( false );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\tfunction generateTorso() {\n\n\t\t\tconst normal = new Vector3();\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tlet groupCount = 0;\n\n\t\t\t// this will be used to calculate the normal\n\t\t\tconst slope = ( radiusBottom - radiusTop ) / height;\n\n\t\t\t// generate vertices, normals and uvs\n\n\t\t\tfor ( let y = 0; y <= heightSegments; y ++ ) {\n\n\t\t\t\tconst indexRow = [];\n\n\t\t\t\tconst v = y / heightSegments;\n\n\t\t\t\t// calculate the radius of the current row\n\n\t\t\t\tconst radius = v * ( radiusBottom - radiusTop ) + radiusTop;\n\n\t\t\t\tfor ( let x = 0; x <= radialSegments; x ++ ) {\n\n\t\t\t\t\tconst u = x / radialSegments;\n\n\t\t\t\t\tconst theta = u * thetaLength + thetaStart;\n\n\t\t\t\t\tconst sinTheta = Math.sin( theta );\n\t\t\t\t\tconst cosTheta = Math.cos( theta );\n\n\t\t\t\t\t// vertex\n\n\t\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\t\tvertex.y = - v * height + halfHeight;\n\t\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t\t// normal\n\n\t\t\t\t\tnormal.set( sinTheta, slope, cosTheta ).normalize();\n\t\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t\t// uv\n\n\t\t\t\t\tuvs.push( u, 1 - v );\n\n\t\t\t\t\t// save index of vertex in respective row\n\n\t\t\t\t\tindexRow.push( index ++ );\n\n\t\t\t\t}\n\n\t\t\t\t// now save vertices of the row in our index array\n\n\t\t\t\tindexArray.push( indexRow );\n\n\t\t\t}\n\n\t\t\t// generate indices\n\n\t\t\tfor ( let x = 0; x < radialSegments; x ++ ) {\n\n\t\t\t\tfor ( let y = 0; y < heightSegments; y ++ ) {\n\n\t\t\t\t\t// we use the index array to access the correct indices\n\n\t\t\t\t\tconst a = indexArray[ y ][ x ];\n\t\t\t\t\tconst b = indexArray[ y + 1 ][ x ];\n\t\t\t\t\tconst c = indexArray[ y + 1 ][ x + 1 ];\n\t\t\t\t\tconst d = indexArray[ y ][ x + 1 ];\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t\t// update group counter\n\n\t\t\t\t\tgroupCount += 6;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, 0 );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t}\n\n\t\tfunction generateCap( top ) {\n\n\t\t\t// save the index of the first center vertex\n\t\t\tconst centerIndexStart = index;\n\n\t\t\tconst uv = new Vector2();\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tlet groupCount = 0;\n\n\t\t\tconst radius = ( top === true ) ? radiusTop : radiusBottom;\n\t\t\tconst sign = ( top === true ) ? 1 : - 1;\n\n\t\t\t// first we generate the center vertex data of the cap.\n\t\t\t// because the geometry needs one set of uvs per face,\n\t\t\t// we must generate a center vertex per face/segment\n\n\t\t\tfor ( let x = 1; x <= radialSegments; x ++ ) {\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertices.push( 0, halfHeight * sign, 0 );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, sign, 0 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( 0.5, 0.5 );\n\n\t\t\t\t// increase index\n\n\t\t\t\tindex ++;\n\n\t\t\t}\n\n\t\t\t// save the index of the last center vertex\n\t\t\tconst centerIndexEnd = index;\n\n\t\t\t// now we generate the surrounding vertices, normals and uvs\n\n\t\t\tfor ( let x = 0; x <= radialSegments; x ++ ) {\n\n\t\t\t\tconst u = x / radialSegments;\n\t\t\t\tconst theta = u * thetaLength + thetaStart;\n\n\t\t\t\tconst cosTheta = Math.cos( theta );\n\t\t\t\tconst sinTheta = Math.sin( theta );\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\tvertex.y = halfHeight * sign;\n\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, sign, 0 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = ( cosTheta * 0.5 ) + 0.5;\n\t\t\t\tuv.y = ( sinTheta * 0.5 * sign ) + 0.5;\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t// increase index\n\n\t\t\t\tindex ++;\n\n\t\t\t}\n\n\t\t\t// generate indices\n\n\t\t\tfor ( let x = 0; x < radialSegments; x ++ ) {\n\n\t\t\t\tconst c = centerIndexStart + x;\n\t\t\t\tconst i = centerIndexEnd + x;\n\n\t\t\t\tif ( top === true ) {\n\n\t\t\t\t\t// face top\n\n\t\t\t\t\tindices.push( i, i + 1, c );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// face bottom\n\n\t\t\t\t\tindices.push( i + 1, i, c );\n\n\t\t\t\t}\n\n\t\t\t\tgroupCount += 3;\n\n\t\t\t}\n\n\t\t\t// add a group to the geometry. this will ensure multi material support\n\n\t\t\tscope.addGroup( groupStart, groupCount, top === true ? 1 : 2 );\n\n\t\t\t// calculate new start value for groups\n\n\t\t\tgroupStart += groupCount;\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass ConeGeometry extends CylinderGeometry {\n\n\tconstructor( radius = 1, height = 1, radialSegments = 8, heightSegments = 1, openEnded = false, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper( 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength );\n\n\t\tthis.type = 'ConeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\theight: height,\n\t\t\tradialSegments: radialSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\topenEnded: openEnded,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new ConeGeometry( data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass PolyhedronGeometry extends BufferGeometry {\n\n\tconstructor( vertices, indices, radius = 1, detail = 0 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'PolyhedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tvertices: vertices,\n\t\t\tindices: indices,\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t\t// default buffer data\n\n\t\tconst vertexBuffer = [];\n\t\tconst uvBuffer = [];\n\n\t\t// the subdivision creates the vertex buffer data\n\n\t\tsubdivide( detail );\n\n\t\t// all vertices should lie on a conceptual sphere with a given radius\n\n\t\tapplyRadius( radius );\n\n\t\t// finally, create the uv data\n\n\t\tgenerateUVs();\n\n\t\t// build non-indexed geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertexBuffer, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( vertexBuffer.slice(), 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvBuffer, 2 ) );\n\n\t\tif ( detail === 0 ) {\n\n\t\t\tthis.computeVertexNormals(); // flat normals\n\n\t\t} else {\n\n\t\t\tthis.normalizeNormals(); // smooth normals\n\n\t\t}\n\n\t\t// helper functions\n\n\t\tfunction subdivide( detail ) {\n\n\t\t\tconst a = new Vector3();\n\t\t\tconst b = new Vector3();\n\t\t\tconst c = new Vector3();\n\n\t\t\t// iterate over all faces and apply a subdivison with the given detail value\n\n\t\t\tfor ( let i = 0; i < indices.length; i += 3 ) {\n\n\t\t\t\t// get the vertices of the face\n\n\t\t\t\tgetVertexByIndex( indices[ i + 0 ], a );\n\t\t\t\tgetVertexByIndex( indices[ i + 1 ], b );\n\t\t\t\tgetVertexByIndex( indices[ i + 2 ], c );\n\n\t\t\t\t// perform subdivision\n\n\t\t\t\tsubdivideFace( a, b, c, detail );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction subdivideFace( a, b, c, detail ) {\n\n\t\t\tconst cols = detail + 1;\n\n\t\t\t// we use this multidimensional array as a data structure for creating the subdivision\n\n\t\t\tconst v = [];\n\n\t\t\t// construct all of the vertices for this subdivision\n\n\t\t\tfor ( let i = 0; i <= cols; i ++ ) {\n\n\t\t\t\tv[ i ] = [];\n\n\t\t\t\tconst aj = a.clone().lerp( c, i / cols );\n\t\t\t\tconst bj = b.clone().lerp( c, i / cols );\n\n\t\t\t\tconst rows = cols - i;\n\n\t\t\t\tfor ( let j = 0; j <= rows; j ++ ) {\n\n\t\t\t\t\tif ( j === 0 && i === cols ) {\n\n\t\t\t\t\t\tv[ i ][ j ] = aj;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tv[ i ][ j ] = aj.clone().lerp( bj, j / rows );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// construct all of the faces\n\n\t\t\tfor ( let i = 0; i < cols; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j < 2 * ( cols - i ) - 1; j ++ ) {\n\n\t\t\t\t\tconst k = Math.floor( j / 2 );\n\n\t\t\t\t\tif ( j % 2 === 0 ) {\n\n\t\t\t\t\t\tpushVertex( v[ i ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k ] );\n\t\t\t\t\t\tpushVertex( v[ i ][ k ] );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tpushVertex( v[ i ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k + 1 ] );\n\t\t\t\t\t\tpushVertex( v[ i + 1 ][ k ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction applyRadius( radius ) {\n\n\t\t\tconst vertex = new Vector3();\n\n\t\t\t// iterate over the entire buffer and apply the radius to each vertex\n\n\t\t\tfor ( let i = 0; i < vertexBuffer.length; i += 3 ) {\n\n\t\t\t\tvertex.x = vertexBuffer[ i + 0 ];\n\t\t\t\tvertex.y = vertexBuffer[ i + 1 ];\n\t\t\t\tvertex.z = vertexBuffer[ i + 2 ];\n\n\t\t\t\tvertex.normalize().multiplyScalar( radius );\n\n\t\t\t\tvertexBuffer[ i + 0 ] = vertex.x;\n\t\t\t\tvertexBuffer[ i + 1 ] = vertex.y;\n\t\t\t\tvertexBuffer[ i + 2 ] = vertex.z;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateUVs() {\n\n\t\t\tconst vertex = new Vector3();\n\n\t\t\tfor ( let i = 0; i < vertexBuffer.length; i += 3 ) {\n\n\t\t\t\tvertex.x = vertexBuffer[ i + 0 ];\n\t\t\t\tvertex.y = vertexBuffer[ i + 1 ];\n\t\t\t\tvertex.z = vertexBuffer[ i + 2 ];\n\n\t\t\t\tconst u = azimuth( vertex ) / 2 / Math.PI + 0.5;\n\t\t\t\tconst v = inclination( vertex ) / Math.PI + 0.5;\n\t\t\t\tuvBuffer.push( u, 1 - v );\n\n\t\t\t}\n\n\t\t\tcorrectUVs();\n\n\t\t\tcorrectSeam();\n\n\t\t}\n\n\t\tfunction correctSeam() {\n\n\t\t\t// handle case when face straddles the seam, see #3269\n\n\t\t\tfor ( let i = 0; i < uvBuffer.length; i += 6 ) {\n\n\t\t\t\t// uv data of a single face\n\n\t\t\t\tconst x0 = uvBuffer[ i + 0 ];\n\t\t\t\tconst x1 = uvBuffer[ i + 2 ];\n\t\t\t\tconst x2 = uvBuffer[ i + 4 ];\n\n\t\t\t\tconst max = Math.max( x0, x1, x2 );\n\t\t\t\tconst min = Math.min( x0, x1, x2 );\n\n\t\t\t\t// 0.9 is somewhat arbitrary\n\n\t\t\t\tif ( max > 0.9 && min < 0.1 ) {\n\n\t\t\t\t\tif ( x0 < 0.2 ) uvBuffer[ i + 0 ] += 1;\n\t\t\t\t\tif ( x1 < 0.2 ) uvBuffer[ i + 2 ] += 1;\n\t\t\t\t\tif ( x2 < 0.2 ) uvBuffer[ i + 4 ] += 1;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction pushVertex( vertex ) {\n\n\t\t\tvertexBuffer.push( vertex.x, vertex.y, vertex.z );\n\n\t\t}\n\n\t\tfunction getVertexByIndex( index, vertex ) {\n\n\t\t\tconst stride = index * 3;\n\n\t\t\tvertex.x = vertices[ stride + 0 ];\n\t\t\tvertex.y = vertices[ stride + 1 ];\n\t\t\tvertex.z = vertices[ stride + 2 ];\n\n\t\t}\n\n\t\tfunction correctUVs() {\n\n\t\t\tconst a = new Vector3();\n\t\t\tconst b = new Vector3();\n\t\t\tconst c = new Vector3();\n\n\t\t\tconst centroid = new Vector3();\n\n\t\t\tconst uvA = new Vector2();\n\t\t\tconst uvB = new Vector2();\n\t\t\tconst uvC = new Vector2();\n\n\t\t\tfor ( let i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6 ) {\n\n\t\t\t\ta.set( vertexBuffer[ i + 0 ], vertexBuffer[ i + 1 ], vertexBuffer[ i + 2 ] );\n\t\t\t\tb.set( vertexBuffer[ i + 3 ], vertexBuffer[ i + 4 ], vertexBuffer[ i + 5 ] );\n\t\t\t\tc.set( vertexBuffer[ i + 6 ], vertexBuffer[ i + 7 ], vertexBuffer[ i + 8 ] );\n\n\t\t\t\tuvA.set( uvBuffer[ j + 0 ], uvBuffer[ j + 1 ] );\n\t\t\t\tuvB.set( uvBuffer[ j + 2 ], uvBuffer[ j + 3 ] );\n\t\t\t\tuvC.set( uvBuffer[ j + 4 ], uvBuffer[ j + 5 ] );\n\n\t\t\t\tcentroid.copy( a ).add( b ).add( c ).divideScalar( 3 );\n\n\t\t\t\tconst azi = azimuth( centroid );\n\n\t\t\t\tcorrectUV( uvA, j + 0, a, azi );\n\t\t\t\tcorrectUV( uvB, j + 2, b, azi );\n\t\t\t\tcorrectUV( uvC, j + 4, c, azi );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction correctUV( uv, stride, vector, azimuth ) {\n\n\t\t\tif ( ( azimuth < 0 ) && ( uv.x === 1 ) ) {\n\n\t\t\t\tuvBuffer[ stride ] = uv.x - 1;\n\n\t\t\t}\n\n\t\t\tif ( ( vector.x === 0 ) && ( vector.z === 0 ) ) {\n\n\t\t\t\tuvBuffer[ stride ] = azimuth / 2 / Math.PI + 0.5;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Angle around the Y axis, counter-clockwise when looking from above.\n\n\t\tfunction azimuth( vector ) {\n\n\t\t\treturn Math.atan2( vector.z, - vector.x );\n\n\t\t}\n\n\n\t\t// Angle above the XZ plane.\n\n\t\tfunction inclination( vector ) {\n\n\t\t\treturn Math.atan2( - vector.y, Math.sqrt( ( vector.x * vector.x ) + ( vector.z * vector.z ) ) );\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details );\n\n\t}\n\n}\n\nclass DodecahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst t = ( 1 + Math.sqrt( 5 ) ) / 2;\n\t\tconst r = 1 / t;\n\n\t\tconst vertices = [\n\n\t\t\t// (±1, ±1, ±1)\n\t\t\t- 1, - 1, - 1,\t- 1, - 1, 1,\n\t\t\t- 1, 1, - 1, - 1, 1, 1,\n\t\t\t1, - 1, - 1, 1, - 1, 1,\n\t\t\t1, 1, - 1, 1, 1, 1,\n\n\t\t\t// (0, ±1/φ, ±φ)\n\t\t\t0, - r, - t, 0, - r, t,\n\t\t\t0, r, - t, 0, r, t,\n\n\t\t\t// (±1/φ, ±φ, 0)\n\t\t\t- r, - t, 0, - r, t, 0,\n\t\t\tr, - t, 0, r, t, 0,\n\n\t\t\t// (±φ, 0, ±1/φ)\n\t\t\t- t, 0, - r, t, 0, - r,\n\t\t\t- t, 0, r, t, 0, r\n\t\t];\n\n\t\tconst indices = [\n\t\t\t3, 11, 7, \t3, 7, 15, \t3, 15, 13,\n\t\t\t7, 19, 17, \t7, 17, 6, \t7, 6, 15,\n\t\t\t17, 4, 8, \t17, 8, 10, \t17, 10, 6,\n\t\t\t8, 0, 16, \t8, 16, 2, \t8, 2, 10,\n\t\t\t0, 12, 1, \t0, 1, 18, \t0, 18, 16,\n\t\t\t6, 10, 2, \t6, 2, 13, \t6, 13, 15,\n\t\t\t2, 16, 18, \t2, 18, 3, \t2, 3, 13,\n\t\t\t18, 1, 9, \t18, 9, 11, \t18, 11, 3,\n\t\t\t4, 14, 12, \t4, 12, 0, \t4, 0, 8,\n\t\t\t11, 9, 5, \t11, 5, 19, \t11, 19, 7,\n\t\t\t19, 5, 14, \t19, 14, 4, \t19, 4, 17,\n\t\t\t1, 12, 14, \t1, 14, 5, \t1, 5, 9\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'DodecahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new DodecahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nconst _v0 = new Vector3();\nconst _v1$1 = new Vector3();\nconst _normal = new Vector3();\nconst _triangle = new Triangle();\n\nclass EdgesGeometry extends BufferGeometry {\n\n\tconstructor( geometry, thresholdAngle ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'EdgesGeometry';\n\n\t\tthis.parameters = {\n\t\t\tthresholdAngle: thresholdAngle\n\t\t};\n\n\t\tthresholdAngle = ( thresholdAngle !== undefined ) ? thresholdAngle : 1;\n\n\t\tif ( geometry.isGeometry === true ) {\n\n\t\t\tconsole.error( 'THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst precisionPoints = 4;\n\t\tconst precision = Math.pow( 10, precisionPoints );\n\t\tconst thresholdDot = Math.cos( DEG2RAD * thresholdAngle );\n\n\t\tconst indexAttr = geometry.getIndex();\n\t\tconst positionAttr = geometry.getAttribute( 'position' );\n\t\tconst indexCount = indexAttr ? indexAttr.count : positionAttr.count;\n\n\t\tconst indexArr = [ 0, 0, 0 ];\n\t\tconst vertKeys = [ 'a', 'b', 'c' ];\n\t\tconst hashes = new Array( 3 );\n\n\t\tconst edgeData = {};\n\t\tconst vertices = [];\n\t\tfor ( let i = 0; i < indexCount; i += 3 ) {\n\n\t\t\tif ( indexAttr ) {\n\n\t\t\t\tindexArr[ 0 ] = indexAttr.getX( i );\n\t\t\t\tindexArr[ 1 ] = indexAttr.getX( i + 1 );\n\t\t\t\tindexArr[ 2 ] = indexAttr.getX( i + 2 );\n\n\t\t\t} else {\n\n\t\t\t\tindexArr[ 0 ] = i;\n\t\t\t\tindexArr[ 1 ] = i + 1;\n\t\t\t\tindexArr[ 2 ] = i + 2;\n\n\t\t\t}\n\n\t\t\tconst { a, b, c } = _triangle;\n\t\t\ta.fromBufferAttribute( positionAttr, indexArr[ 0 ] );\n\t\t\tb.fromBufferAttribute( positionAttr, indexArr[ 1 ] );\n\t\t\tc.fromBufferAttribute( positionAttr, indexArr[ 2 ] );\n\t\t\t_triangle.getNormal( _normal );\n\n\t\t\t// create hashes for the edge from the vertices\n\t\t\thashes[ 0 ] = `${ Math.round( a.x * precision ) },${ Math.round( a.y * precision ) },${ Math.round( a.z * precision ) }`;\n\t\t\thashes[ 1 ] = `${ Math.round( b.x * precision ) },${ Math.round( b.y * precision ) },${ Math.round( b.z * precision ) }`;\n\t\t\thashes[ 2 ] = `${ Math.round( c.x * precision ) },${ Math.round( c.y * precision ) },${ Math.round( c.z * precision ) }`;\n\n\t\t\t// skip degenerate triangles\n\t\t\tif ( hashes[ 0 ] === hashes[ 1 ] || hashes[ 1 ] === hashes[ 2 ] || hashes[ 2 ] === hashes[ 0 ] ) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t// iterate over every edge\n\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t// get the first and next vertex making up the edge\n\t\t\t\tconst jNext = ( j + 1 ) % 3;\n\t\t\t\tconst vecHash0 = hashes[ j ];\n\t\t\t\tconst vecHash1 = hashes[ jNext ];\n\t\t\t\tconst v0 = _triangle[ vertKeys[ j ] ];\n\t\t\t\tconst v1 = _triangle[ vertKeys[ jNext ] ];\n\n\t\t\t\tconst hash = `${ vecHash0 }_${ vecHash1 }`;\n\t\t\t\tconst reverseHash = `${ vecHash1 }_${ vecHash0 }`;\n\n\t\t\t\tif ( reverseHash in edgeData && edgeData[ reverseHash ] ) {\n\n\t\t\t\t\t// if we found a sibling edge add it into the vertex array if\n\t\t\t\t\t// it meets the angle threshold and delete the edge from the map.\n\t\t\t\t\tif ( _normal.dot( edgeData[ reverseHash ].normal ) <= thresholdDot ) {\n\n\t\t\t\t\t\tvertices.push( v0.x, v0.y, v0.z );\n\t\t\t\t\t\tvertices.push( v1.x, v1.y, v1.z );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tedgeData[ reverseHash ] = null;\n\n\t\t\t\t} else if ( ! ( hash in edgeData ) ) {\n\n\t\t\t\t\t// if we've already got an edge here then skip adding a new one\n\t\t\t\t\tedgeData[ hash ] = {\n\n\t\t\t\t\t\tindex0: indexArr[ j ],\n\t\t\t\t\t\tindex1: indexArr[ jNext ],\n\t\t\t\t\t\tnormal: _normal.clone(),\n\n\t\t\t\t\t};\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// iterate over all remaining, unmatched edges and add them to the vertex array\n\t\tfor ( const key in edgeData ) {\n\n\t\t\tif ( edgeData[ key ] ) {\n\n\t\t\t\tconst { index0, index1 } = edgeData[ key ];\n\t\t\t\t_v0.fromBufferAttribute( positionAttr, index0 );\n\t\t\t\t_v1$1.fromBufferAttribute( positionAttr, index1 );\n\n\t\t\t\tvertices.push( _v0.x, _v0.y, _v0.z );\n\t\t\t\tvertices.push( _v1$1.x, _v1$1.y, _v1$1.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\n\t}\n\n}\n\n/**\n * Extensible curve object.\n *\n * Some common of curve methods:\n * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget )\n * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget )\n * .getPoints(), .getSpacedPoints()\n * .getLength()\n * .updateArcLengths()\n *\n * This following curves inherit from THREE.Curve:\n *\n * -- 2D curves --\n * THREE.ArcCurve\n * THREE.CubicBezierCurve\n * THREE.EllipseCurve\n * THREE.LineCurve\n * THREE.QuadraticBezierCurve\n * THREE.SplineCurve\n *\n * -- 3D curves --\n * THREE.CatmullRomCurve3\n * THREE.CubicBezierCurve3\n * THREE.LineCurve3\n * THREE.QuadraticBezierCurve3\n *\n * A series of curves can be represented as a THREE.CurvePath.\n *\n **/\n\nclass Curve {\n\n\tconstructor() {\n\n\t\tthis.type = 'Curve';\n\n\t\tthis.arcLengthDivisions = 200;\n\n\t}\n\n\t// Virtual base class method to overwrite and implement in subclasses\n\t//\t- t [0 .. 1]\n\n\tgetPoint( /* t, optionalTarget */ ) {\n\n\t\tconsole.warn( 'THREE.Curve: .getPoint() not implemented.' );\n\t\treturn null;\n\n\t}\n\n\t// Get point at relative position in curve according to arc length\n\t// - u [0 .. 1]\n\n\tgetPointAt( u, optionalTarget ) {\n\n\t\tconst t = this.getUtoTmapping( u );\n\t\treturn this.getPoint( t, optionalTarget );\n\n\t}\n\n\t// Get sequence of points using getPoint( t )\n\n\tgetPoints( divisions = 5 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let d = 0; d <= divisions; d ++ ) {\n\n\t\t\tpoints.push( this.getPoint( d / divisions ) );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\t// Get sequence of points using getPointAt( u )\n\n\tgetSpacedPoints( divisions = 5 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let d = 0; d <= divisions; d ++ ) {\n\n\t\t\tpoints.push( this.getPointAt( d / divisions ) );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\t// Get total curve arc length\n\n\tgetLength() {\n\n\t\tconst lengths = this.getLengths();\n\t\treturn lengths[ lengths.length - 1 ];\n\n\t}\n\n\t// Get list of cumulative segment lengths\n\n\tgetLengths( divisions = this.arcLengthDivisions ) {\n\n\t\tif ( this.cacheArcLengths &&\n\t\t\t( this.cacheArcLengths.length === divisions + 1 ) &&\n\t\t\t! this.needsUpdate ) {\n\n\t\t\treturn this.cacheArcLengths;\n\n\t\t}\n\n\t\tthis.needsUpdate = false;\n\n\t\tconst cache = [];\n\t\tlet current, last = this.getPoint( 0 );\n\t\tlet sum = 0;\n\n\t\tcache.push( 0 );\n\n\t\tfor ( let p = 1; p <= divisions; p ++ ) {\n\n\t\t\tcurrent = this.getPoint( p / divisions );\n\t\t\tsum += current.distanceTo( last );\n\t\t\tcache.push( sum );\n\t\t\tlast = current;\n\n\t\t}\n\n\t\tthis.cacheArcLengths = cache;\n\n\t\treturn cache; // { sums: cache, sum: sum }; Sum is in the last element.\n\n\t}\n\n\tupdateArcLengths() {\n\n\t\tthis.needsUpdate = true;\n\t\tthis.getLengths();\n\n\t}\n\n\t// Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\n\n\tgetUtoTmapping( u, distance ) {\n\n\t\tconst arcLengths = this.getLengths();\n\n\t\tlet i = 0;\n\t\tconst il = arcLengths.length;\n\n\t\tlet targetArcLength; // The targeted u distance value to get\n\n\t\tif ( distance ) {\n\n\t\t\ttargetArcLength = distance;\n\n\t\t} else {\n\n\t\t\ttargetArcLength = u * arcLengths[ il - 1 ];\n\n\t\t}\n\n\t\t// binary search for the index with largest value smaller than target u distance\n\n\t\tlet low = 0, high = il - 1, comparison;\n\n\t\twhile ( low <= high ) {\n\n\t\t\ti = Math.floor( low + ( high - low ) / 2 ); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n\n\t\t\tcomparison = arcLengths[ i ] - targetArcLength;\n\n\t\t\tif ( comparison < 0 ) {\n\n\t\t\t\tlow = i + 1;\n\n\t\t\t} else if ( comparison > 0 ) {\n\n\t\t\t\thigh = i - 1;\n\n\t\t\t} else {\n\n\t\t\t\thigh = i;\n\t\t\t\tbreak;\n\n\t\t\t\t// DONE\n\n\t\t\t}\n\n\t\t}\n\n\t\ti = high;\n\n\t\tif ( arcLengths[ i ] === targetArcLength ) {\n\n\t\t\treturn i / ( il - 1 );\n\n\t\t}\n\n\t\t// we could get finer grain at lengths, or use simple interpolation between two points\n\n\t\tconst lengthBefore = arcLengths[ i ];\n\t\tconst lengthAfter = arcLengths[ i + 1 ];\n\n\t\tconst segmentLength = lengthAfter - lengthBefore;\n\n\t\t// determine where we are between the 'before' and 'after' points\n\n\t\tconst segmentFraction = ( targetArcLength - lengthBefore ) / segmentLength;\n\n\t\t// add that fractional amount to t\n\n\t\tconst t = ( i + segmentFraction ) / ( il - 1 );\n\n\t\treturn t;\n\n\t}\n\n\t// Returns a unit vector tangent at t\n\t// In case any sub curve does not implement its tangent derivation,\n\t// 2 points a small delta apart will be used to find its gradient\n\t// which seems to give a reasonable approximation\n\n\tgetTangent( t, optionalTarget ) {\n\n\t\tconst delta = 0.0001;\n\t\tlet t1 = t - delta;\n\t\tlet t2 = t + delta;\n\n\t\t// Capping in case of danger\n\n\t\tif ( t1 < 0 ) t1 = 0;\n\t\tif ( t2 > 1 ) t2 = 1;\n\n\t\tconst pt1 = this.getPoint( t1 );\n\t\tconst pt2 = this.getPoint( t2 );\n\n\t\tconst tangent = optionalTarget || ( ( pt1.isVector2 ) ? new Vector2() : new Vector3() );\n\n\t\ttangent.copy( pt2 ).sub( pt1 ).normalize();\n\n\t\treturn tangent;\n\n\t}\n\n\tgetTangentAt( u, optionalTarget ) {\n\n\t\tconst t = this.getUtoTmapping( u );\n\t\treturn this.getTangent( t, optionalTarget );\n\n\t}\n\n\tcomputeFrenetFrames( segments, closed ) {\n\n\t\t// see http://www.cs.indiana.edu/pub/techreports/TR425.pdf\n\n\t\tconst normal = new Vector3();\n\n\t\tconst tangents = [];\n\t\tconst normals = [];\n\t\tconst binormals = [];\n\n\t\tconst vec = new Vector3();\n\t\tconst mat = new Matrix4();\n\n\t\t// compute the tangent vectors for each segment on the curve\n\n\t\tfor ( let i = 0; i <= segments; i ++ ) {\n\n\t\t\tconst u = i / segments;\n\n\t\t\ttangents[ i ] = this.getTangentAt( u, new Vector3() );\n\t\t\ttangents[ i ].normalize();\n\n\t\t}\n\n\t\t// select an initial normal vector perpendicular to the first tangent vector,\n\t\t// and in the direction of the minimum tangent xyz component\n\n\t\tnormals[ 0 ] = new Vector3();\n\t\tbinormals[ 0 ] = new Vector3();\n\t\tlet min = Number.MAX_VALUE;\n\t\tconst tx = Math.abs( tangents[ 0 ].x );\n\t\tconst ty = Math.abs( tangents[ 0 ].y );\n\t\tconst tz = Math.abs( tangents[ 0 ].z );\n\n\t\tif ( tx <= min ) {\n\n\t\t\tmin = tx;\n\t\t\tnormal.set( 1, 0, 0 );\n\n\t\t}\n\n\t\tif ( ty <= min ) {\n\n\t\t\tmin = ty;\n\t\t\tnormal.set( 0, 1, 0 );\n\n\t\t}\n\n\t\tif ( tz <= min ) {\n\n\t\t\tnormal.set( 0, 0, 1 );\n\n\t\t}\n\n\t\tvec.crossVectors( tangents[ 0 ], normal ).normalize();\n\n\t\tnormals[ 0 ].crossVectors( tangents[ 0 ], vec );\n\t\tbinormals[ 0 ].crossVectors( tangents[ 0 ], normals[ 0 ] );\n\n\n\t\t// compute the slowly-varying normal and binormal vectors for each segment on the curve\n\n\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\tnormals[ i ] = normals[ i - 1 ].clone();\n\n\t\t\tbinormals[ i ] = binormals[ i - 1 ].clone();\n\n\t\t\tvec.crossVectors( tangents[ i - 1 ], tangents[ i ] );\n\n\t\t\tif ( vec.length() > Number.EPSILON ) {\n\n\t\t\t\tvec.normalize();\n\n\t\t\t\tconst theta = Math.acos( clamp( tangents[ i - 1 ].dot( tangents[ i ] ), - 1, 1 ) ); // clamp for floating pt errors\n\n\t\t\t\tnormals[ i ].applyMatrix4( mat.makeRotationAxis( vec, theta ) );\n\n\t\t\t}\n\n\t\t\tbinormals[ i ].crossVectors( tangents[ i ], normals[ i ] );\n\n\t\t}\n\n\t\t// if the curve is closed, postprocess the vectors so the first and last normal vectors are the same\n\n\t\tif ( closed === true ) {\n\n\t\t\tlet theta = Math.acos( clamp( normals[ 0 ].dot( normals[ segments ] ), - 1, 1 ) );\n\t\t\ttheta /= segments;\n\n\t\t\tif ( tangents[ 0 ].dot( vec.crossVectors( normals[ 0 ], normals[ segments ] ) ) > 0 ) {\n\n\t\t\t\ttheta = - theta;\n\n\t\t\t}\n\n\t\t\tfor ( let i = 1; i <= segments; i ++ ) {\n\n\t\t\t\t// twist a little...\n\t\t\t\tnormals[ i ].applyMatrix4( mat.makeRotationAxis( tangents[ i ], theta * i ) );\n\t\t\t\tbinormals[ i ].crossVectors( tangents[ i ], normals[ i ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttangents: tangents,\n\t\t\tnormals: normals,\n\t\t\tbinormals: binormals\n\t\t};\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.arcLengthDivisions = source.arcLengthDivisions;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = {\n\t\t\tmetadata: {\n\t\t\t\tversion: 4.5,\n\t\t\t\ttype: 'Curve',\n\t\t\t\tgenerator: 'Curve.toJSON'\n\t\t\t}\n\t\t};\n\n\t\tdata.arcLengthDivisions = this.arcLengthDivisions;\n\t\tdata.type = this.type;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tthis.arcLengthDivisions = json.arcLengthDivisions;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass EllipseCurve extends Curve {\n\n\tconstructor( aX = 0, aY = 0, xRadius = 1, yRadius = 1, aStartAngle = 0, aEndAngle = Math.PI * 2, aClockwise = false, aRotation = 0 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'EllipseCurve';\n\n\t\tthis.aX = aX;\n\t\tthis.aY = aY;\n\n\t\tthis.xRadius = xRadius;\n\t\tthis.yRadius = yRadius;\n\n\t\tthis.aStartAngle = aStartAngle;\n\t\tthis.aEndAngle = aEndAngle;\n\n\t\tthis.aClockwise = aClockwise;\n\n\t\tthis.aRotation = aRotation;\n\n\t}\n\n\tgetPoint( t, optionalTarget ) {\n\n\t\tconst point = optionalTarget || new Vector2();\n\n\t\tconst twoPi = Math.PI * 2;\n\t\tlet deltaAngle = this.aEndAngle - this.aStartAngle;\n\t\tconst samePoints = Math.abs( deltaAngle ) < Number.EPSILON;\n\n\t\t// ensures that deltaAngle is 0 .. 2 PI\n\t\twhile ( deltaAngle < 0 ) deltaAngle += twoPi;\n\t\twhile ( deltaAngle > twoPi ) deltaAngle -= twoPi;\n\n\t\tif ( deltaAngle < Number.EPSILON ) {\n\n\t\t\tif ( samePoints ) {\n\n\t\t\t\tdeltaAngle = 0;\n\n\t\t\t} else {\n\n\t\t\t\tdeltaAngle = twoPi;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.aClockwise === true && ! samePoints ) {\n\n\t\t\tif ( deltaAngle === twoPi ) {\n\n\t\t\t\tdeltaAngle = - twoPi;\n\n\t\t\t} else {\n\n\t\t\t\tdeltaAngle = deltaAngle - twoPi;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst angle = this.aStartAngle + t * deltaAngle;\n\t\tlet x = this.aX + this.xRadius * Math.cos( angle );\n\t\tlet y = this.aY + this.yRadius * Math.sin( angle );\n\n\t\tif ( this.aRotation !== 0 ) {\n\n\t\t\tconst cos = Math.cos( this.aRotation );\n\t\t\tconst sin = Math.sin( this.aRotation );\n\n\t\t\tconst tx = x - this.aX;\n\t\t\tconst ty = y - this.aY;\n\n\t\t\t// Rotate the point about the center of the ellipse.\n\t\t\tx = tx * cos - ty * sin + this.aX;\n\t\t\ty = tx * sin + ty * cos + this.aY;\n\n\t\t}\n\n\t\treturn point.set( x, y );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.aX = source.aX;\n\t\tthis.aY = source.aY;\n\n\t\tthis.xRadius = source.xRadius;\n\t\tthis.yRadius = source.yRadius;\n\n\t\tthis.aStartAngle = source.aStartAngle;\n\t\tthis.aEndAngle = source.aEndAngle;\n\n\t\tthis.aClockwise = source.aClockwise;\n\n\t\tthis.aRotation = source.aRotation;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.aX = this.aX;\n\t\tdata.aY = this.aY;\n\n\t\tdata.xRadius = this.xRadius;\n\t\tdata.yRadius = this.yRadius;\n\n\t\tdata.aStartAngle = this.aStartAngle;\n\t\tdata.aEndAngle = this.aEndAngle;\n\n\t\tdata.aClockwise = this.aClockwise;\n\n\t\tdata.aRotation = this.aRotation;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.aX = json.aX;\n\t\tthis.aY = json.aY;\n\n\t\tthis.xRadius = json.xRadius;\n\t\tthis.yRadius = json.yRadius;\n\n\t\tthis.aStartAngle = json.aStartAngle;\n\t\tthis.aEndAngle = json.aEndAngle;\n\n\t\tthis.aClockwise = json.aClockwise;\n\n\t\tthis.aRotation = json.aRotation;\n\n\t\treturn this;\n\n\t}\n\n}\n\nEllipseCurve.prototype.isEllipseCurve = true;\n\nclass ArcCurve extends EllipseCurve {\n\n\tconstructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tsuper( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );\n\n\t\tthis.type = 'ArcCurve';\n\n\t}\n\n}\n\nArcCurve.prototype.isArcCurve = true;\n\n/**\n * Centripetal CatmullRom Curve - which is useful for avoiding\n * cusps and self-intersections in non-uniform catmull rom curves.\n * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\n *\n * curve.type accepts centripetal(default), chordal and catmullrom\n * curve.tension is used for catmullrom which defaults to 0.5\n */\n\n\n/*\nBased on an optimized c++ solution in\n - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/\n - http://ideone.com/NoEbVM\n\nThis CubicPoly class could be used for reusing some variables and calculations,\nbut for three.js curve use, it could be possible inlined and flatten into a single function call\nwhich can be placed in CurveUtils.\n*/\n\nfunction CubicPoly() {\n\n\tlet c0 = 0, c1 = 0, c2 = 0, c3 = 0;\n\n\t/*\n\t * Compute coefficients for a cubic polynomial\n\t * p(s) = c0 + c1*s + c2*s^2 + c3*s^3\n\t * such that\n\t * p(0) = x0, p(1) = x1\n\t * and\n\t * p'(0) = t0, p'(1) = t1.\n\t */\n\tfunction init( x0, x1, t0, t1 ) {\n\n\t\tc0 = x0;\n\t\tc1 = t0;\n\t\tc2 = - 3 * x0 + 3 * x1 - 2 * t0 - t1;\n\t\tc3 = 2 * x0 - 2 * x1 + t0 + t1;\n\n\t}\n\n\treturn {\n\n\t\tinitCatmullRom: function ( x0, x1, x2, x3, tension ) {\n\n\t\t\tinit( x1, x2, tension * ( x2 - x0 ), tension * ( x3 - x1 ) );\n\n\t\t},\n\n\t\tinitNonuniformCatmullRom: function ( x0, x1, x2, x3, dt0, dt1, dt2 ) {\n\n\t\t\t// compute tangents when parameterized in [t1,t2]\n\t\t\tlet t1 = ( x1 - x0 ) / dt0 - ( x2 - x0 ) / ( dt0 + dt1 ) + ( x2 - x1 ) / dt1;\n\t\t\tlet t2 = ( x2 - x1 ) / dt1 - ( x3 - x1 ) / ( dt1 + dt2 ) + ( x3 - x2 ) / dt2;\n\n\t\t\t// rescale tangents for parametrization in [0,1]\n\t\t\tt1 *= dt1;\n\t\t\tt2 *= dt1;\n\n\t\t\tinit( x1, x2, t1, t2 );\n\n\t\t},\n\n\t\tcalc: function ( t ) {\n\n\t\t\tconst t2 = t * t;\n\t\t\tconst t3 = t2 * t;\n\t\t\treturn c0 + c1 * t + c2 * t2 + c3 * t3;\n\n\t\t}\n\n\t};\n\n}\n\n//\n\nconst tmp = new Vector3();\nconst px = new CubicPoly(), py = new CubicPoly(), pz = new CubicPoly();\n\nclass CatmullRomCurve3 extends Curve {\n\n\tconstructor( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CatmullRomCurve3';\n\n\t\tthis.points = points;\n\t\tthis.closed = closed;\n\t\tthis.curveType = curveType;\n\t\tthis.tension = tension;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst points = this.points;\n\t\tconst l = points.length;\n\n\t\tconst p = ( l - ( this.closed ? 0 : 1 ) ) * t;\n\t\tlet intPoint = Math.floor( p );\n\t\tlet weight = p - intPoint;\n\n\t\tif ( this.closed ) {\n\n\t\t\tintPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l;\n\n\t\t} else if ( weight === 0 && intPoint === l - 1 ) {\n\n\t\t\tintPoint = l - 2;\n\t\t\tweight = 1;\n\n\t\t}\n\n\t\tlet p0, p3; // 4 points (p1 & p2 defined below)\n\n\t\tif ( this.closed || intPoint > 0 ) {\n\n\t\t\tp0 = points[ ( intPoint - 1 ) % l ];\n\n\t\t} else {\n\n\t\t\t// extrapolate first point\n\t\t\ttmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] );\n\t\t\tp0 = tmp;\n\n\t\t}\n\n\t\tconst p1 = points[ intPoint % l ];\n\t\tconst p2 = points[ ( intPoint + 1 ) % l ];\n\n\t\tif ( this.closed || intPoint + 2 < l ) {\n\n\t\t\tp3 = points[ ( intPoint + 2 ) % l ];\n\n\t\t} else {\n\n\t\t\t// extrapolate last point\n\t\t\ttmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] );\n\t\t\tp3 = tmp;\n\n\t\t}\n\n\t\tif ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) {\n\n\t\t\t// init Centripetal / Chordal Catmull-Rom\n\t\t\tconst pow = this.curveType === 'chordal' ? 0.5 : 0.25;\n\t\t\tlet dt0 = Math.pow( p0.distanceToSquared( p1 ), pow );\n\t\t\tlet dt1 = Math.pow( p1.distanceToSquared( p2 ), pow );\n\t\t\tlet dt2 = Math.pow( p2.distanceToSquared( p3 ), pow );\n\n\t\t\t// safety check for repeated points\n\t\t\tif ( dt1 < 1e-4 ) dt1 = 1.0;\n\t\t\tif ( dt0 < 1e-4 ) dt0 = dt1;\n\t\t\tif ( dt2 < 1e-4 ) dt2 = dt1;\n\n\t\t\tpx.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 );\n\t\t\tpy.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 );\n\t\t\tpz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 );\n\n\t\t} else if ( this.curveType === 'catmullrom' ) {\n\n\t\t\tpx.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension );\n\t\t\tpy.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension );\n\t\t\tpz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension );\n\n\t\t}\n\n\t\tpoint.set(\n\t\t\tpx.calc( weight ),\n\t\t\tpy.calc( weight ),\n\t\t\tpz.calc( weight )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = source.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = source.points[ i ];\n\n\t\t\tthis.points.push( point.clone() );\n\n\t\t}\n\n\t\tthis.closed = source.closed;\n\t\tthis.curveType = source.curveType;\n\t\tthis.tension = source.tension;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.points = [];\n\n\t\tfor ( let i = 0, l = this.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = this.points[ i ];\n\t\t\tdata.points.push( point.toArray() );\n\n\t\t}\n\n\t\tdata.closed = this.closed;\n\t\tdata.curveType = this.curveType;\n\t\tdata.tension = this.tension;\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = json.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = json.points[ i ];\n\t\t\tthis.points.push( new Vector3().fromArray( point ) );\n\n\t\t}\n\n\t\tthis.closed = json.closed;\n\t\tthis.curveType = json.curveType;\n\t\tthis.tension = json.tension;\n\n\t\treturn this;\n\n\t}\n\n}\n\nCatmullRomCurve3.prototype.isCatmullRomCurve3 = true;\n\n/**\n * Bezier Curves formulas obtained from\n * http://en.wikipedia.org/wiki/Bézier_curve\n */\n\nfunction CatmullRom( t, p0, p1, p2, p3 ) {\n\n\tconst v0 = ( p2 - p0 ) * 0.5;\n\tconst v1 = ( p3 - p1 ) * 0.5;\n\tconst t2 = t * t;\n\tconst t3 = t * t2;\n\treturn ( 2 * p1 - 2 * p2 + v0 + v1 ) * t3 + ( - 3 * p1 + 3 * p2 - 2 * v0 - v1 ) * t2 + v0 * t + p1;\n\n}\n\n//\n\nfunction QuadraticBezierP0( t, p ) {\n\n\tconst k = 1 - t;\n\treturn k * k * p;\n\n}\n\nfunction QuadraticBezierP1( t, p ) {\n\n\treturn 2 * ( 1 - t ) * t * p;\n\n}\n\nfunction QuadraticBezierP2( t, p ) {\n\n\treturn t * t * p;\n\n}\n\nfunction QuadraticBezier( t, p0, p1, p2 ) {\n\n\treturn QuadraticBezierP0( t, p0 ) + QuadraticBezierP1( t, p1 ) +\n\t\tQuadraticBezierP2( t, p2 );\n\n}\n\n//\n\nfunction CubicBezierP0( t, p ) {\n\n\tconst k = 1 - t;\n\treturn k * k * k * p;\n\n}\n\nfunction CubicBezierP1( t, p ) {\n\n\tconst k = 1 - t;\n\treturn 3 * k * k * t * p;\n\n}\n\nfunction CubicBezierP2( t, p ) {\n\n\treturn 3 * ( 1 - t ) * t * t * p;\n\n}\n\nfunction CubicBezierP3( t, p ) {\n\n\treturn t * t * t * p;\n\n}\n\nfunction CubicBezier( t, p0, p1, p2, p3 ) {\n\n\treturn CubicBezierP0( t, p0 ) + CubicBezierP1( t, p1 ) + CubicBezierP2( t, p2 ) +\n\t\tCubicBezierP3( t, p3 );\n\n}\n\nclass CubicBezierCurve extends Curve {\n\n\tconstructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CubicBezierCurve';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n\n\t\tpoint.set(\n\t\t\tCubicBezier( t, v0.x, v1.x, v2.x, v3.x ),\n\t\t\tCubicBezier( t, v0.y, v1.y, v2.y, v3.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\t\tthis.v3.copy( source.v3 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\t\tthis.v3.fromArray( json.v3 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nCubicBezierCurve.prototype.isCubicBezierCurve = true;\n\nclass CubicBezierCurve3 extends Curve {\n\n\tconstructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'CubicBezierCurve3';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;\n\n\t\tpoint.set(\n\t\t\tCubicBezier( t, v0.x, v1.x, v2.x, v3.x ),\n\t\t\tCubicBezier( t, v0.y, v1.y, v2.y, v3.y ),\n\t\t\tCubicBezier( t, v0.z, v1.z, v2.z, v3.z )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\t\tthis.v3.copy( source.v3 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\t\tthis.v3.fromArray( json.v3 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nCubicBezierCurve3.prototype.isCubicBezierCurve3 = true;\n\nclass LineCurve extends Curve {\n\n\tconstructor( v1 = new Vector2(), v2 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineCurve';\n\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tif ( t === 1 ) {\n\n\t\t\tpoint.copy( this.v2 );\n\n\t\t} else {\n\n\t\t\tpoint.copy( this.v2 ).sub( this.v1 );\n\t\t\tpoint.multiplyScalar( t ).add( this.v1 );\n\n\t\t}\n\n\t\treturn point;\n\n\t}\n\n\t// Line curve is linear, so we can overwrite default getPointAt\n\tgetPointAt( u, optionalTarget ) {\n\n\t\treturn this.getPoint( u, optionalTarget );\n\n\t}\n\n\tgetTangent( t, optionalTarget ) {\n\n\t\tconst tangent = optionalTarget || new Vector2();\n\n\t\ttangent.copy( this.v2 ).sub( this.v1 ).normalize();\n\n\t\treturn tangent;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineCurve.prototype.isLineCurve = true;\n\nclass LineCurve3 extends Curve {\n\n\tconstructor( v1 = new Vector3(), v2 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineCurve3';\n\t\tthis.isLineCurve3 = true;\n\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tif ( t === 1 ) {\n\n\t\t\tpoint.copy( this.v2 );\n\n\t\t} else {\n\n\t\t\tpoint.copy( this.v2 ).sub( this.v1 );\n\t\t\tpoint.multiplyScalar( t ).add( this.v1 );\n\n\t\t}\n\n\t\treturn point;\n\n\t}\n\t// Line curve is linear, so we can overwrite default getPointAt\n\tgetPointAt( u, optionalTarget ) {\n\n\t\treturn this.getPoint( u, optionalTarget );\n\n\t}\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass QuadraticBezierCurve extends Curve {\n\n\tconstructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'QuadraticBezierCurve';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2;\n\n\t\tpoint.set(\n\t\t\tQuadraticBezier( t, v0.x, v1.x, v2.x ),\n\t\t\tQuadraticBezier( t, v0.y, v1.y, v2.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nQuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;\n\nclass QuadraticBezierCurve3 extends Curve {\n\n\tconstructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'QuadraticBezierCurve3';\n\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector3() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst v0 = this.v0, v1 = this.v1, v2 = this.v2;\n\n\t\tpoint.set(\n\t\t\tQuadraticBezier( t, v0.x, v1.x, v2.x ),\n\t\t\tQuadraticBezier( t, v0.y, v1.y, v2.y ),\n\t\t\tQuadraticBezier( t, v0.z, v1.z, v2.z )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.v0.copy( source.v0 );\n\t\tthis.v1.copy( source.v1 );\n\t\tthis.v2.copy( source.v2 );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.v0.fromArray( json.v0 );\n\t\tthis.v1.fromArray( json.v1 );\n\t\tthis.v2.fromArray( json.v2 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nQuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;\n\nclass SplineCurve extends Curve {\n\n\tconstructor( points = [] ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'SplineCurve';\n\n\t\tthis.points = points;\n\n\t}\n\n\tgetPoint( t, optionalTarget = new Vector2() ) {\n\n\t\tconst point = optionalTarget;\n\n\t\tconst points = this.points;\n\t\tconst p = ( points.length - 1 ) * t;\n\n\t\tconst intPoint = Math.floor( p );\n\t\tconst weight = p - intPoint;\n\n\t\tconst p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ];\n\t\tconst p1 = points[ intPoint ];\n\t\tconst p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ];\n\t\tconst p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ];\n\n\t\tpoint.set(\n\t\t\tCatmullRom( weight, p0.x, p1.x, p2.x, p3.x ),\n\t\t\tCatmullRom( weight, p0.y, p1.y, p2.y, p3.y )\n\t\t);\n\n\t\treturn point;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = source.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = source.points[ i ];\n\n\t\t\tthis.points.push( point.clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.points = [];\n\n\t\tfor ( let i = 0, l = this.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = this.points[ i ];\n\t\t\tdata.points.push( point.toArray() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.points = [];\n\n\t\tfor ( let i = 0, l = json.points.length; i < l; i ++ ) {\n\n\t\t\tconst point = json.points[ i ];\n\t\t\tthis.points.push( new Vector2().fromArray( point ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nSplineCurve.prototype.isSplineCurve = true;\n\nvar Curves = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tArcCurve: ArcCurve,\n\tCatmullRomCurve3: CatmullRomCurve3,\n\tCubicBezierCurve: CubicBezierCurve,\n\tCubicBezierCurve3: CubicBezierCurve3,\n\tEllipseCurve: EllipseCurve,\n\tLineCurve: LineCurve,\n\tLineCurve3: LineCurve3,\n\tQuadraticBezierCurve: QuadraticBezierCurve,\n\tQuadraticBezierCurve3: QuadraticBezierCurve3,\n\tSplineCurve: SplineCurve\n});\n\n/**\n * Port from https://github.com/mapbox/earcut (v2.2.2)\n */\n\nconst Earcut = {\n\n\ttriangulate: function ( data, holeIndices, dim = 2 ) {\n\n\t\tconst hasHoles = holeIndices && holeIndices.length;\n\t\tconst outerLen = hasHoles ? holeIndices[ 0 ] * dim : data.length;\n\t\tlet outerNode = linkedList( data, 0, outerLen, dim, true );\n\t\tconst triangles = [];\n\n\t\tif ( ! outerNode || outerNode.next === outerNode.prev ) return triangles;\n\n\t\tlet minX, minY, maxX, maxY, x, y, invSize;\n\n\t\tif ( hasHoles ) outerNode = eliminateHoles( data, holeIndices, outerNode, dim );\n\n\t\t// if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n\t\tif ( data.length > 80 * dim ) {\n\n\t\t\tminX = maxX = data[ 0 ];\n\t\t\tminY = maxY = data[ 1 ];\n\n\t\t\tfor ( let i = dim; i < outerLen; i += dim ) {\n\n\t\t\t\tx = data[ i ];\n\t\t\t\ty = data[ i + 1 ];\n\t\t\t\tif ( x < minX ) minX = x;\n\t\t\t\tif ( y < minY ) minY = y;\n\t\t\t\tif ( x > maxX ) maxX = x;\n\t\t\t\tif ( y > maxY ) maxY = y;\n\n\t\t\t}\n\n\t\t\t// minX, minY and invSize are later used to transform coords into integers for z-order calculation\n\t\t\tinvSize = Math.max( maxX - minX, maxY - minY );\n\t\t\tinvSize = invSize !== 0 ? 1 / invSize : 0;\n\n\t\t}\n\n\t\tearcutLinked( outerNode, triangles, dim, minX, minY, invSize );\n\n\t\treturn triangles;\n\n\t}\n\n};\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList( data, start, end, dim, clockwise ) {\n\n\tlet i, last;\n\n\tif ( clockwise === ( signedArea( data, start, end, dim ) > 0 ) ) {\n\n\t\tfor ( i = start; i < end; i += dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last );\n\n\t} else {\n\n\t\tfor ( i = end - dim; i >= start; i -= dim ) last = insertNode( i, data[ i ], data[ i + 1 ], last );\n\n\t}\n\n\tif ( last && equals( last, last.next ) ) {\n\n\t\tremoveNode( last );\n\t\tlast = last.next;\n\n\t}\n\n\treturn last;\n\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints( start, end ) {\n\n\tif ( ! start ) return start;\n\tif ( ! end ) end = start;\n\n\tlet p = start,\n\t\tagain;\n\tdo {\n\n\t\tagain = false;\n\n\t\tif ( ! p.steiner && ( equals( p, p.next ) || area( p.prev, p, p.next ) === 0 ) ) {\n\n\t\t\tremoveNode( p );\n\t\t\tp = end = p.prev;\n\t\t\tif ( p === p.next ) break;\n\t\t\tagain = true;\n\n\t\t} else {\n\n\t\t\tp = p.next;\n\n\t\t}\n\n\t} while ( again || p !== end );\n\n\treturn end;\n\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked( ear, triangles, dim, minX, minY, invSize, pass ) {\n\n\tif ( ! ear ) return;\n\n\t// interlink polygon nodes in z-order\n\tif ( ! pass && invSize ) indexCurve( ear, minX, minY, invSize );\n\n\tlet stop = ear,\n\t\tprev, next;\n\n\t// iterate through ears, slicing them one by one\n\twhile ( ear.prev !== ear.next ) {\n\n\t\tprev = ear.prev;\n\t\tnext = ear.next;\n\n\t\tif ( invSize ? isEarHashed( ear, minX, minY, invSize ) : isEar( ear ) ) {\n\n\t\t\t// cut off the triangle\n\t\t\ttriangles.push( prev.i / dim );\n\t\t\ttriangles.push( ear.i / dim );\n\t\t\ttriangles.push( next.i / dim );\n\n\t\t\tremoveNode( ear );\n\n\t\t\t// skipping the next vertex leads to less sliver triangles\n\t\t\tear = next.next;\n\t\t\tstop = next.next;\n\n\t\t\tcontinue;\n\n\t\t}\n\n\t\tear = next;\n\n\t\t// if we looped through the whole remaining polygon and can't find any more ears\n\t\tif ( ear === stop ) {\n\n\t\t\t// try filtering points and slicing again\n\t\t\tif ( ! pass ) {\n\n\t\t\t\tearcutLinked( filterPoints( ear ), triangles, dim, minX, minY, invSize, 1 );\n\n\t\t\t\t// if this didn't work, try curing all small self-intersections locally\n\n\t\t\t} else if ( pass === 1 ) {\n\n\t\t\t\tear = cureLocalIntersections( filterPoints( ear ), triangles, dim );\n\t\t\t\tearcutLinked( ear, triangles, dim, minX, minY, invSize, 2 );\n\n\t\t\t\t// as a last resort, try splitting the remaining polygon into two\n\n\t\t\t} else if ( pass === 2 ) {\n\n\t\t\t\tsplitEarcut( ear, triangles, dim, minX, minY, invSize );\n\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\t}\n\n\t}\n\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar( ear ) {\n\n\tconst a = ear.prev,\n\t\tb = ear,\n\t\tc = ear.next;\n\n\tif ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear\n\n\t// now make sure we don't have other points inside the potential ear\n\tlet p = ear.next.next;\n\n\twhile ( p !== ear.prev ) {\n\n\t\tif ( pointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) &&\n\t\t\tarea( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.next;\n\n\t}\n\n\treturn true;\n\n}\n\nfunction isEarHashed( ear, minX, minY, invSize ) {\n\n\tconst a = ear.prev,\n\t\tb = ear,\n\t\tc = ear.next;\n\n\tif ( area( a, b, c ) >= 0 ) return false; // reflex, can't be an ear\n\n\t// triangle bbox; min & max are calculated like this for speed\n\tconst minTX = a.x < b.x ? ( a.x < c.x ? a.x : c.x ) : ( b.x < c.x ? b.x : c.x ),\n\t\tminTY = a.y < b.y ? ( a.y < c.y ? a.y : c.y ) : ( b.y < c.y ? b.y : c.y ),\n\t\tmaxTX = a.x > b.x ? ( a.x > c.x ? a.x : c.x ) : ( b.x > c.x ? b.x : c.x ),\n\t\tmaxTY = a.y > b.y ? ( a.y > c.y ? a.y : c.y ) : ( b.y > c.y ? b.y : c.y );\n\n\t// z-order range for the current triangle bbox;\n\tconst minZ = zOrder( minTX, minTY, minX, minY, invSize ),\n\t\tmaxZ = zOrder( maxTX, maxTY, minX, minY, invSize );\n\n\tlet p = ear.prevZ,\n\t\tn = ear.nextZ;\n\n\t// look for points inside the triangle in both directions\n\twhile ( p && p.z >= minZ && n && n.z <= maxZ ) {\n\n\t\tif ( p !== ear.prev && p !== ear.next &&\n\t\t\tpointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) &&\n\t\t\tarea( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.prevZ;\n\n\t\tif ( n !== ear.prev && n !== ear.next &&\n\t\t\tpointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y ) &&\n\t\t\tarea( n.prev, n, n.next ) >= 0 ) return false;\n\t\tn = n.nextZ;\n\n\t}\n\n\t// look for remaining points in decreasing z-order\n\twhile ( p && p.z >= minZ ) {\n\n\t\tif ( p !== ear.prev && p !== ear.next &&\n\t\t\tpointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y ) &&\n\t\t\tarea( p.prev, p, p.next ) >= 0 ) return false;\n\t\tp = p.prevZ;\n\n\t}\n\n\t// look for remaining points in increasing z-order\n\twhile ( n && n.z <= maxZ ) {\n\n\t\tif ( n !== ear.prev && n !== ear.next &&\n\t\t\tpointInTriangle( a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y ) &&\n\t\t\tarea( n.prev, n, n.next ) >= 0 ) return false;\n\t\tn = n.nextZ;\n\n\t}\n\n\treturn true;\n\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections( start, triangles, dim ) {\n\n\tlet p = start;\n\tdo {\n\n\t\tconst a = p.prev,\n\t\t\tb = p.next.next;\n\n\t\tif ( ! equals( a, b ) && intersects( a, p, p.next, b ) && locallyInside( a, b ) && locallyInside( b, a ) ) {\n\n\t\t\ttriangles.push( a.i / dim );\n\t\t\ttriangles.push( p.i / dim );\n\t\t\ttriangles.push( b.i / dim );\n\n\t\t\t// remove two nodes involved\n\t\t\tremoveNode( p );\n\t\t\tremoveNode( p.next );\n\n\t\t\tp = start = b;\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\treturn filterPoints( p );\n\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut( start, triangles, dim, minX, minY, invSize ) {\n\n\t// look for a valid diagonal that divides the polygon into two\n\tlet a = start;\n\tdo {\n\n\t\tlet b = a.next.next;\n\t\twhile ( b !== a.prev ) {\n\n\t\t\tif ( a.i !== b.i && isValidDiagonal( a, b ) ) {\n\n\t\t\t\t// split the polygon in two by the diagonal\n\t\t\t\tlet c = splitPolygon( a, b );\n\n\t\t\t\t// filter colinear points around the cuts\n\t\t\t\ta = filterPoints( a, a.next );\n\t\t\t\tc = filterPoints( c, c.next );\n\n\t\t\t\t// run earcut on each half\n\t\t\t\tearcutLinked( a, triangles, dim, minX, minY, invSize );\n\t\t\t\tearcutLinked( c, triangles, dim, minX, minY, invSize );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tb = b.next;\n\n\t\t}\n\n\t\ta = a.next;\n\n\t} while ( a !== start );\n\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles( data, holeIndices, outerNode, dim ) {\n\n\tconst queue = [];\n\tlet i, len, start, end, list;\n\n\tfor ( i = 0, len = holeIndices.length; i < len; i ++ ) {\n\n\t\tstart = holeIndices[ i ] * dim;\n\t\tend = i < len - 1 ? holeIndices[ i + 1 ] * dim : data.length;\n\t\tlist = linkedList( data, start, end, dim, false );\n\t\tif ( list === list.next ) list.steiner = true;\n\t\tqueue.push( getLeftmost( list ) );\n\n\t}\n\n\tqueue.sort( compareX );\n\n\t// process holes from left to right\n\tfor ( i = 0; i < queue.length; i ++ ) {\n\n\t\teliminateHole( queue[ i ], outerNode );\n\t\touterNode = filterPoints( outerNode, outerNode.next );\n\n\t}\n\n\treturn outerNode;\n\n}\n\nfunction compareX( a, b ) {\n\n\treturn a.x - b.x;\n\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole( hole, outerNode ) {\n\n\touterNode = findHoleBridge( hole, outerNode );\n\tif ( outerNode ) {\n\n\t\tconst b = splitPolygon( outerNode, hole );\n\n\t\t// filter collinear points around the cuts\n\t\tfilterPoints( outerNode, outerNode.next );\n\t\tfilterPoints( b, b.next );\n\n\t}\n\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge( hole, outerNode ) {\n\n\tlet p = outerNode;\n\tconst hx = hole.x;\n\tconst hy = hole.y;\n\tlet qx = - Infinity, m;\n\n\t// find a segment intersected by a ray from the hole's leftmost point to the left;\n\t// segment's endpoint with lesser x will be potential connection point\n\tdo {\n\n\t\tif ( hy <= p.y && hy >= p.next.y && p.next.y !== p.y ) {\n\n\t\t\tconst x = p.x + ( hy - p.y ) * ( p.next.x - p.x ) / ( p.next.y - p.y );\n\t\t\tif ( x <= hx && x > qx ) {\n\n\t\t\t\tqx = x;\n\t\t\t\tif ( x === hx ) {\n\n\t\t\t\t\tif ( hy === p.y ) return p;\n\t\t\t\t\tif ( hy === p.next.y ) return p.next;\n\n\t\t\t\t}\n\n\t\t\t\tm = p.x < p.next.x ? p : p.next;\n\n\t\t\t}\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== outerNode );\n\n\tif ( ! m ) return null;\n\n\tif ( hx === qx ) return m; // hole touches outer segment; pick leftmost endpoint\n\n\t// look for points inside the triangle of hole point, segment intersection and endpoint;\n\t// if there are no points found, we have a valid connection;\n\t// otherwise choose the point of the minimum angle with the ray as connection point\n\n\tconst stop = m,\n\t\tmx = m.x,\n\t\tmy = m.y;\n\tlet tanMin = Infinity, tan;\n\n\tp = m;\n\n\tdo {\n\n\t\tif ( hx >= p.x && p.x >= mx && hx !== p.x &&\n\t\t\t\tpointInTriangle( hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y ) ) {\n\n\t\t\ttan = Math.abs( hy - p.y ) / ( hx - p.x ); // tangential\n\n\t\t\tif ( locallyInside( p, hole ) && ( tan < tanMin || ( tan === tanMin && ( p.x > m.x || ( p.x === m.x && sectorContainsSector( m, p ) ) ) ) ) ) {\n\n\t\t\t\tm = p;\n\t\t\t\ttanMin = tan;\n\n\t\t\t}\n\n\t\t}\n\n\t\tp = p.next;\n\n\t} while ( p !== stop );\n\n\treturn m;\n\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector( m, p ) {\n\n\treturn area( m.prev, m, p.prev ) < 0 && area( p.next, m, m.next ) < 0;\n\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve( start, minX, minY, invSize ) {\n\n\tlet p = start;\n\tdo {\n\n\t\tif ( p.z === null ) p.z = zOrder( p.x, p.y, minX, minY, invSize );\n\t\tp.prevZ = p.prev;\n\t\tp.nextZ = p.next;\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\tp.prevZ.nextZ = null;\n\tp.prevZ = null;\n\n\tsortLinked( p );\n\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked( list ) {\n\n\tlet i, p, q, e, tail, numMerges, pSize, qSize,\n\t\tinSize = 1;\n\n\tdo {\n\n\t\tp = list;\n\t\tlist = null;\n\t\ttail = null;\n\t\tnumMerges = 0;\n\n\t\twhile ( p ) {\n\n\t\t\tnumMerges ++;\n\t\t\tq = p;\n\t\t\tpSize = 0;\n\t\t\tfor ( i = 0; i < inSize; i ++ ) {\n\n\t\t\t\tpSize ++;\n\t\t\t\tq = q.nextZ;\n\t\t\t\tif ( ! q ) break;\n\n\t\t\t}\n\n\t\t\tqSize = inSize;\n\n\t\t\twhile ( pSize > 0 || ( qSize > 0 && q ) ) {\n\n\t\t\t\tif ( pSize !== 0 && ( qSize === 0 || ! q || p.z <= q.z ) ) {\n\n\t\t\t\t\te = p;\n\t\t\t\t\tp = p.nextZ;\n\t\t\t\t\tpSize --;\n\n\t\t\t\t} else {\n\n\t\t\t\t\te = q;\n\t\t\t\t\tq = q.nextZ;\n\t\t\t\t\tqSize --;\n\n\t\t\t\t}\n\n\t\t\t\tif ( tail ) tail.nextZ = e;\n\t\t\t\telse list = e;\n\n\t\t\t\te.prevZ = tail;\n\t\t\t\ttail = e;\n\n\t\t\t}\n\n\t\t\tp = q;\n\n\t\t}\n\n\t\ttail.nextZ = null;\n\t\tinSize *= 2;\n\n\t} while ( numMerges > 1 );\n\n\treturn list;\n\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder( x, y, minX, minY, invSize ) {\n\n\t// coords are transformed into non-negative 15-bit integer range\n\tx = 32767 * ( x - minX ) * invSize;\n\ty = 32767 * ( y - minY ) * invSize;\n\n\tx = ( x | ( x << 8 ) ) & 0x00FF00FF;\n\tx = ( x | ( x << 4 ) ) & 0x0F0F0F0F;\n\tx = ( x | ( x << 2 ) ) & 0x33333333;\n\tx = ( x | ( x << 1 ) ) & 0x55555555;\n\n\ty = ( y | ( y << 8 ) ) & 0x00FF00FF;\n\ty = ( y | ( y << 4 ) ) & 0x0F0F0F0F;\n\ty = ( y | ( y << 2 ) ) & 0x33333333;\n\ty = ( y | ( y << 1 ) ) & 0x55555555;\n\n\treturn x | ( y << 1 );\n\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost( start ) {\n\n\tlet p = start,\n\t\tleftmost = start;\n\tdo {\n\n\t\tif ( p.x < leftmost.x || ( p.x === leftmost.x && p.y < leftmost.y ) ) leftmost = p;\n\t\tp = p.next;\n\n\t} while ( p !== start );\n\n\treturn leftmost;\n\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {\n\n\treturn ( cx - px ) * ( ay - py ) - ( ax - px ) * ( cy - py ) >= 0 &&\n\t\t\t( ax - px ) * ( by - py ) - ( bx - px ) * ( ay - py ) >= 0 &&\n\t\t\t( bx - px ) * ( cy - py ) - ( cx - px ) * ( by - py ) >= 0;\n\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal( a, b ) {\n\n\treturn a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges\n\t\t( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible\n\t\t( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors\n\t\tequals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case\n\n}\n\n// signed area of a triangle\nfunction area( p, q, r ) {\n\n\treturn ( q.y - p.y ) * ( r.x - q.x ) - ( q.x - p.x ) * ( r.y - q.y );\n\n}\n\n// check if two points are equal\nfunction equals( p1, p2 ) {\n\n\treturn p1.x === p2.x && p1.y === p2.y;\n\n}\n\n// check if two segments intersect\nfunction intersects( p1, q1, p2, q2 ) {\n\n\tconst o1 = sign( area( p1, q1, p2 ) );\n\tconst o2 = sign( area( p1, q1, q2 ) );\n\tconst o3 = sign( area( p2, q2, p1 ) );\n\tconst o4 = sign( area( p2, q2, q1 ) );\n\n\tif ( o1 !== o2 && o3 !== o4 ) return true; // general case\n\n\tif ( o1 === 0 && onSegment( p1, p2, q1 ) ) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n\tif ( o2 === 0 && onSegment( p1, q2, q1 ) ) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n\tif ( o3 === 0 && onSegment( p2, p1, q2 ) ) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n\tif ( o4 === 0 && onSegment( p2, q1, q2 ) ) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n\treturn false;\n\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment( p, q, r ) {\n\n\treturn q.x <= Math.max( p.x, r.x ) && q.x >= Math.min( p.x, r.x ) && q.y <= Math.max( p.y, r.y ) && q.y >= Math.min( p.y, r.y );\n\n}\n\nfunction sign( num ) {\n\n\treturn num > 0 ? 1 : num < 0 ? - 1 : 0;\n\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon( a, b ) {\n\n\tlet p = a;\n\tdo {\n\n\t\tif ( p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n\t\t\t\tintersects( p, p.next, a, b ) ) return true;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn false;\n\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside( a, b ) {\n\n\tlet p = a,\n\t\tinside = false;\n\tconst px = ( a.x + b.x ) / 2,\n\t\tpy = ( a.y + b.y ) / 2;\n\tdo {\n\n\t\tif ( ( ( p.y > py ) !== ( p.next.y > py ) ) && p.next.y !== p.y &&\n\t\t\t\t( px < ( p.next.x - p.x ) * ( py - p.y ) / ( p.next.y - p.y ) + p.x ) )\n\t\t\tinside = ! inside;\n\t\tp = p.next;\n\n\t} while ( p !== a );\n\n\treturn inside;\n\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon( a, b ) {\n\n\tconst a2 = new Node( a.i, a.x, a.y ),\n\t\tb2 = new Node( b.i, b.x, b.y ),\n\t\tan = a.next,\n\t\tbp = b.prev;\n\n\ta.next = b;\n\tb.prev = a;\n\n\ta2.next = an;\n\tan.prev = a2;\n\n\tb2.next = a2;\n\ta2.prev = b2;\n\n\tbp.next = b2;\n\tb2.prev = bp;\n\n\treturn b2;\n\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode( i, x, y, last ) {\n\n\tconst p = new Node( i, x, y );\n\n\tif ( ! last ) {\n\n\t\tp.prev = p;\n\t\tp.next = p;\n\n\t} else {\n\n\t\tp.next = last.next;\n\t\tp.prev = last;\n\t\tlast.next.prev = p;\n\t\tlast.next = p;\n\n\t}\n\n\treturn p;\n\n}\n\nfunction removeNode( p ) {\n\n\tp.next.prev = p.prev;\n\tp.prev.next = p.next;\n\n\tif ( p.prevZ ) p.prevZ.nextZ = p.nextZ;\n\tif ( p.nextZ ) p.nextZ.prevZ = p.prevZ;\n\n}\n\nfunction Node( i, x, y ) {\n\n\t// vertex index in coordinates array\n\tthis.i = i;\n\n\t// vertex coordinates\n\tthis.x = x;\n\tthis.y = y;\n\n\t// previous and next vertex nodes in a polygon ring\n\tthis.prev = null;\n\tthis.next = null;\n\n\t// z-order curve value\n\tthis.z = null;\n\n\t// previous and next nodes in z-order\n\tthis.prevZ = null;\n\tthis.nextZ = null;\n\n\t// indicates whether this is a steiner point\n\tthis.steiner = false;\n\n}\n\nfunction signedArea( data, start, end, dim ) {\n\n\tlet sum = 0;\n\tfor ( let i = start, j = end - dim; i < end; i += dim ) {\n\n\t\tsum += ( data[ j ] - data[ i ] ) * ( data[ i + 1 ] + data[ j + 1 ] );\n\t\tj = i;\n\n\t}\n\n\treturn sum;\n\n}\n\nclass ShapeUtils {\n\n\t// calculate area of the contour polygon\n\n\tstatic area( contour ) {\n\n\t\tconst n = contour.length;\n\t\tlet a = 0.0;\n\n\t\tfor ( let p = n - 1, q = 0; q < n; p = q ++ ) {\n\n\t\t\ta += contour[ p ].x * contour[ q ].y - contour[ q ].x * contour[ p ].y;\n\n\t\t}\n\n\t\treturn a * 0.5;\n\n\t}\n\n\tstatic isClockWise( pts ) {\n\n\t\treturn ShapeUtils.area( pts ) < 0;\n\n\t}\n\n\tstatic triangulateShape( contour, holes ) {\n\n\t\tconst vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ]\n\t\tconst holeIndices = []; // array of hole indices\n\t\tconst faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ]\n\n\t\tremoveDupEndPts( contour );\n\t\taddContour( vertices, contour );\n\n\t\t//\n\n\t\tlet holeIndex = contour.length;\n\n\t\tholes.forEach( removeDupEndPts );\n\n\t\tfor ( let i = 0; i < holes.length; i ++ ) {\n\n\t\t\tholeIndices.push( holeIndex );\n\t\t\tholeIndex += holes[ i ].length;\n\t\t\taddContour( vertices, holes[ i ] );\n\n\t\t}\n\n\t\t//\n\n\t\tconst triangles = Earcut.triangulate( vertices, holeIndices );\n\n\t\t//\n\n\t\tfor ( let i = 0; i < triangles.length; i += 3 ) {\n\n\t\t\tfaces.push( triangles.slice( i, i + 3 ) );\n\n\t\t}\n\n\t\treturn faces;\n\n\t}\n\n}\n\nfunction removeDupEndPts( points ) {\n\n\tconst l = points.length;\n\n\tif ( l > 2 && points[ l - 1 ].equals( points[ 0 ] ) ) {\n\n\t\tpoints.pop();\n\n\t}\n\n}\n\nfunction addContour( vertices, contour ) {\n\n\tfor ( let i = 0; i < contour.length; i ++ ) {\n\n\t\tvertices.push( contour[ i ].x );\n\t\tvertices.push( contour[ i ].y );\n\n\t}\n\n}\n\n/**\n * Creates extruded geometry from a path shape.\n *\n * parameters = {\n *\n * curveSegments: <int>, // number of points on the curves\n * steps: <int>, // number of points for z-side extrusions / used for subdividing segments of extrude spline too\n * depth: <float>, // Depth to extrude the shape\n *\n * bevelEnabled: <bool>, // turn on bevel\n * bevelThickness: <float>, // how deep into the original shape bevel goes\n * bevelSize: <float>, // how far from shape outline (including bevelOffset) is bevel\n * bevelOffset: <float>, // how far from shape outline does bevel start\n * bevelSegments: <int>, // number of bevel layers\n *\n * extrudePath: <THREE.Curve> // curve to extrude shape along\n *\n * UVGenerator: <Object> // object that provides UV generator functions\n *\n * }\n */\n\nclass ExtrudeGeometry extends BufferGeometry {\n\n\tconstructor( shapes, options ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ExtrudeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tshapes: shapes,\n\t\t\toptions: options\n\t\t};\n\n\t\tshapes = Array.isArray( shapes ) ? shapes : [ shapes ];\n\n\t\tconst scope = this;\n\n\t\tconst verticesArray = [];\n\t\tconst uvArray = [];\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\t\t\taddShape( shape );\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( verticesArray, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvArray, 2 ) );\n\n\t\tthis.computeVertexNormals();\n\n\t\t// functions\n\n\t\tfunction addShape( shape ) {\n\n\t\t\tconst placeholder = [];\n\n\t\t\t// options\n\n\t\t\tconst curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;\n\t\t\tconst steps = options.steps !== undefined ? options.steps : 1;\n\t\t\tlet depth = options.depth !== undefined ? options.depth : 100;\n\n\t\t\tlet bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;\n\t\t\tlet bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 6;\n\t\t\tlet bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 2;\n\t\t\tlet bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0;\n\t\t\tlet bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3;\n\n\t\t\tconst extrudePath = options.extrudePath;\n\n\t\t\tconst uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator;\n\n\t\t\t// deprecated options\n\n\t\t\tif ( options.amount !== undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ExtrudeBufferGeometry: amount has been renamed to depth.' );\n\t\t\t\tdepth = options.amount;\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tlet extrudePts, extrudeByPath = false;\n\t\t\tlet splineTube, binormal, normal, position2;\n\n\t\t\tif ( extrudePath ) {\n\n\t\t\t\textrudePts = extrudePath.getSpacedPoints( steps );\n\n\t\t\t\textrudeByPath = true;\n\t\t\t\tbevelEnabled = false; // bevels not supported for path extrusion\n\n\t\t\t\t// SETUP TNB variables\n\n\t\t\t\t// TODO1 - have a .isClosed in spline?\n\n\t\t\t\tsplineTube = extrudePath.computeFrenetFrames( steps, false );\n\n\t\t\t\t// console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);\n\n\t\t\t\tbinormal = new Vector3();\n\t\t\t\tnormal = new Vector3();\n\t\t\t\tposition2 = new Vector3();\n\n\t\t\t}\n\n\t\t\t// Safeguards if bevels are not enabled\n\n\t\t\tif ( ! bevelEnabled ) {\n\n\t\t\t\tbevelSegments = 0;\n\t\t\t\tbevelThickness = 0;\n\t\t\t\tbevelSize = 0;\n\t\t\t\tbevelOffset = 0;\n\n\t\t\t}\n\n\t\t\t// Variables initialization\n\n\t\t\tconst shapePoints = shape.extractPoints( curveSegments );\n\n\t\t\tlet vertices = shapePoints.shape;\n\t\t\tconst holes = shapePoints.holes;\n\n\t\t\tconst reverse = ! ShapeUtils.isClockWise( vertices );\n\n\t\t\tif ( reverse ) {\n\n\t\t\t\tvertices = vertices.reverse();\n\n\t\t\t\t// Maybe we should also check if holes are in the opposite direction, just to be safe ...\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\t\tif ( ShapeUtils.isClockWise( ahole ) ) {\n\n\t\t\t\t\t\tholes[ h ] = ahole.reverse();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tconst faces = ShapeUtils.triangulateShape( vertices, holes );\n\n\t\t\t/* Vertices */\n\n\t\t\tconst contour = vertices; // vertices has all points but contour has only points of circumference\n\n\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\tvertices = vertices.concat( ahole );\n\n\t\t\t}\n\n\n\t\t\tfunction scalePt2( pt, vec, size ) {\n\n\t\t\t\tif ( ! vec ) console.error( 'THREE.ExtrudeGeometry: vec does not exist' );\n\n\t\t\t\treturn vec.clone().multiplyScalar( size ).add( pt );\n\n\t\t\t}\n\n\t\t\tconst vlen = vertices.length, flen = faces.length;\n\n\n\t\t\t// Find directions for point movement\n\n\n\t\t\tfunction getBevelVec( inPt, inPrev, inNext ) {\n\n\t\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t\t// shifted by 1 unit (length of normalized vector) to the left\n\t\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t\t//\n\t\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t\t// adjacent edges of inPt at a distance of 1 unit on the left side.\n\n\t\t\t\tlet v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\n\t\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\t\tconst v_prev_x = inPt.x - inPrev.x,\n\t\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\t\tconst v_next_x = inNext.x - inPt.x,\n\t\t\t\t\tv_next_y = inNext.y - inPt.y;\n\n\t\t\t\tconst v_prev_lensq = ( v_prev_x * v_prev_x + v_prev_y * v_prev_y );\n\n\t\t\t\t// check for collinear edges\n\t\t\t\tconst collinear0 = ( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\tif ( Math.abs( collinear0 ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not collinear\n\n\t\t\t\t\t// length of vectors for normalizing\n\n\t\t\t\t\tconst v_prev_len = Math.sqrt( v_prev_lensq );\n\t\t\t\t\tconst v_next_len = Math.sqrt( v_next_x * v_next_x + v_next_y * v_next_y );\n\n\t\t\t\t\t// shift adjacent points by unit vectors to the left\n\n\t\t\t\t\tconst ptPrevShift_x = ( inPrev.x - v_prev_y / v_prev_len );\n\t\t\t\t\tconst ptPrevShift_y = ( inPrev.y + v_prev_x / v_prev_len );\n\n\t\t\t\t\tconst ptNextShift_x = ( inNext.x - v_next_y / v_next_len );\n\t\t\t\t\tconst ptNextShift_y = ( inNext.y + v_next_x / v_next_len );\n\n\t\t\t\t\t// scaling factor for v_prev to intersection point\n\n\t\t\t\t\tconst sf = ( ( ptNextShift_x - ptPrevShift_x ) * v_next_y -\n\t\t\t\t\t\t\t( ptNextShift_y - ptPrevShift_y ) * v_next_x ) /\n\t\t\t\t\t\t( v_prev_x * v_next_y - v_prev_y * v_next_x );\n\n\t\t\t\t\t// vector from inPt to intersection point\n\n\t\t\t\t\tv_trans_x = ( ptPrevShift_x + v_prev_x * sf - inPt.x );\n\t\t\t\t\tv_trans_y = ( ptPrevShift_y + v_prev_y * sf - inPt.y );\n\n\t\t\t\t\t// Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t\t// but prevent crazy spikes\n\t\t\t\t\tconst v_trans_lensq = ( v_trans_x * v_trans_x + v_trans_y * v_trans_y );\n\t\t\t\t\tif ( v_trans_lensq <= 2 ) {\n\n\t\t\t\t\t\treturn new Vector2( v_trans_x, v_trans_y );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_trans_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// handle special case of collinear edges\n\n\t\t\t\t\tlet direction_eq = false; // assumes: opposite\n\n\t\t\t\t\tif ( v_prev_x > Number.EPSILON ) {\n\n\t\t\t\t\t\tif ( v_next_x > Number.EPSILON ) {\n\n\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( v_prev_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\tif ( v_next_x < - Number.EPSILON ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tif ( Math.sign( v_prev_y ) === Math.sign( v_next_y ) ) {\n\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( direction_eq ) {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\t\tv_trans_x = - v_prev_y;\n\t\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\t\tshrink_by = Math.sqrt( v_prev_lensq / 2 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn new Vector2( v_trans_x / shrink_by, v_trans_y / shrink_by );\n\n\t\t\t}\n\n\n\t\t\tconst contourMovements = [];\n\n\t\t\tfor ( let i = 0, il = contour.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) {\n\n\t\t\t\tif ( j === il ) j = 0;\n\t\t\t\tif ( k === il ) k = 0;\n\n\t\t\t\t// (j)---(i)---(k)\n\t\t\t\t// console.log('i,j,k', i, j , k)\n\n\t\t\t\tcontourMovements[ i ] = getBevelVec( contour[ i ], contour[ j ], contour[ k ] );\n\n\t\t\t}\n\n\t\t\tconst holesMovements = [];\n\t\t\tlet oneHoleMovements, verticesMovements = contourMovements.concat();\n\n\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\tconst ahole = holes[ h ];\n\n\t\t\t\toneHoleMovements = [];\n\n\t\t\t\tfor ( let i = 0, il = ahole.length, j = il - 1, k = i + 1; i < il; i ++, j ++, k ++ ) {\n\n\t\t\t\t\tif ( j === il ) j = 0;\n\t\t\t\t\tif ( k === il ) k = 0;\n\n\t\t\t\t\t// (j)---(i)---(k)\n\t\t\t\t\toneHoleMovements[ i ] = getBevelVec( ahole[ i ], ahole[ j ], ahole[ k ] );\n\n\t\t\t\t}\n\n\t\t\t\tholesMovements.push( oneHoleMovements );\n\t\t\t\tverticesMovements = verticesMovements.concat( oneHoleMovements );\n\n\t\t\t}\n\n\n\t\t\t// Loop bevelSegments, 1 for the front, 1 for the back\n\n\t\t\tfor ( let b = 0; b < bevelSegments; b ++ ) {\n\n\t\t\t\t//for ( b = bevelSegments; b > 0; b -- ) {\n\n\t\t\t\tconst t = b / bevelSegments;\n\t\t\t\tconst z = bevelThickness * Math.cos( t * Math.PI / 2 );\n\t\t\t\tconst bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset;\n\n\t\t\t\t// contract shape\n\n\t\t\t\tfor ( let i = 0, il = contour.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst vert = scalePt2( contour[ i ], contourMovements[ i ], bs );\n\n\t\t\t\t\tv( vert.x, vert.y, - z );\n\n\t\t\t\t}\n\n\t\t\t\t// expand holes\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\toneHoleMovements = holesMovements[ h ];\n\n\t\t\t\t\tfor ( let i = 0, il = ahole.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs );\n\n\t\t\t\t\t\tv( vert.x, vert.y, - z );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst bs = bevelSize + bevelOffset;\n\n\t\t\t// Back facing vertices\n\n\t\t\tfor ( let i = 0; i < vlen; i ++ ) {\n\n\t\t\t\tconst vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ];\n\n\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\tv( vert.x, vert.y, 0 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x );\n\n\t\t\t\t\tnormal.copy( splineTube.normals[ 0 ] ).multiplyScalar( vert.x );\n\t\t\t\t\tbinormal.copy( splineTube.binormals[ 0 ] ).multiplyScalar( vert.y );\n\n\t\t\t\t\tposition2.copy( extrudePts[ 0 ] ).add( normal ).add( binormal );\n\n\t\t\t\t\tv( position2.x, position2.y, position2.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Add stepped vertices...\n\t\t\t// Including front facing vertices\n\n\t\t\tfor ( let s = 1; s <= steps; s ++ ) {\n\n\t\t\t\tfor ( let i = 0; i < vlen; i ++ ) {\n\n\t\t\t\t\tconst vert = bevelEnabled ? scalePt2( vertices[ i ], verticesMovements[ i ], bs ) : vertices[ i ];\n\n\t\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\t\tv( vert.x, vert.y, depth / steps * s );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x );\n\n\t\t\t\t\t\tnormal.copy( splineTube.normals[ s ] ).multiplyScalar( vert.x );\n\t\t\t\t\t\tbinormal.copy( splineTube.binormals[ s ] ).multiplyScalar( vert.y );\n\n\t\t\t\t\t\tposition2.copy( extrudePts[ s ] ).add( normal ).add( binormal );\n\n\t\t\t\t\t\tv( position2.x, position2.y, position2.z );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\t// Add bevel segments planes\n\n\t\t\t//for ( b = 1; b <= bevelSegments; b ++ ) {\n\t\t\tfor ( let b = bevelSegments - 1; b >= 0; b -- ) {\n\n\t\t\t\tconst t = b / bevelSegments;\n\t\t\t\tconst z = bevelThickness * Math.cos( t * Math.PI / 2 );\n\t\t\t\tconst bs = bevelSize * Math.sin( t * Math.PI / 2 ) + bevelOffset;\n\n\t\t\t\t// contract shape\n\n\t\t\t\tfor ( let i = 0, il = contour.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst vert = scalePt2( contour[ i ], contourMovements[ i ], bs );\n\t\t\t\t\tv( vert.x, vert.y, depth + z );\n\n\t\t\t\t}\n\n\t\t\t\t// expand holes\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\toneHoleMovements = holesMovements[ h ];\n\n\t\t\t\t\tfor ( let i = 0, il = ahole.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst vert = scalePt2( ahole[ i ], oneHoleMovements[ i ], bs );\n\n\t\t\t\t\t\tif ( ! extrudeByPath ) {\n\n\t\t\t\t\t\t\tv( vert.x, vert.y, depth + z );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tv( vert.x, vert.y + extrudePts[ steps - 1 ].y, extrudePts[ steps - 1 ].x + z );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t/* Faces */\n\n\t\t\t// Top and bottom faces\n\n\t\t\tbuildLidFaces();\n\n\t\t\t// Sides faces\n\n\t\t\tbuildSideFaces();\n\n\n\t\t\t///// Internal functions\n\n\t\t\tfunction buildLidFaces() {\n\n\t\t\t\tconst start = verticesArray.length / 3;\n\n\t\t\t\tif ( bevelEnabled ) {\n\n\t\t\t\t\tlet layer = 0; // steps + 1\n\t\t\t\t\tlet offset = vlen * layer;\n\n\t\t\t\t\t// Bottom faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 2 ] + offset, face[ 1 ] + offset, face[ 0 ] + offset );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlayer = steps + bevelSegments * 2;\n\t\t\t\t\toffset = vlen * layer;\n\n\t\t\t\t\t// Top faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 0 ] + offset, face[ 1 ] + offset, face[ 2 ] + offset );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Bottom faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 2 ], face[ 1 ], face[ 0 ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Top faces\n\n\t\t\t\t\tfor ( let i = 0; i < flen; i ++ ) {\n\n\t\t\t\t\t\tconst face = faces[ i ];\n\t\t\t\t\t\tf3( face[ 0 ] + vlen * steps, face[ 1 ] + vlen * steps, face[ 2 ] + vlen * steps );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tscope.addGroup( start, verticesArray.length / 3 - start, 0 );\n\n\t\t\t}\n\n\t\t\t// Create faces for the z-sides of the shape\n\n\t\t\tfunction buildSideFaces() {\n\n\t\t\t\tconst start = verticesArray.length / 3;\n\t\t\t\tlet layeroffset = 0;\n\t\t\t\tsidewalls( contour, layeroffset );\n\t\t\t\tlayeroffset += contour.length;\n\n\t\t\t\tfor ( let h = 0, hl = holes.length; h < hl; h ++ ) {\n\n\t\t\t\t\tconst ahole = holes[ h ];\n\t\t\t\t\tsidewalls( ahole, layeroffset );\n\n\t\t\t\t\t//, true\n\t\t\t\t\tlayeroffset += ahole.length;\n\n\t\t\t\t}\n\n\n\t\t\t\tscope.addGroup( start, verticesArray.length / 3 - start, 1 );\n\n\n\t\t\t}\n\n\t\t\tfunction sidewalls( contour, layeroffset ) {\n\n\t\t\t\tlet i = contour.length;\n\n\t\t\t\twhile ( -- i >= 0 ) {\n\n\t\t\t\t\tconst j = i;\n\t\t\t\t\tlet k = i - 1;\n\t\t\t\t\tif ( k < 0 ) k = contour.length - 1;\n\n\t\t\t\t\t//console.log('b', i,j, i-1, k,vertices.length);\n\n\t\t\t\t\tfor ( let s = 0, sl = ( steps + bevelSegments * 2 ); s < sl; s ++ ) {\n\n\t\t\t\t\t\tconst slen1 = vlen * s;\n\t\t\t\t\t\tconst slen2 = vlen * ( s + 1 );\n\n\t\t\t\t\t\tconst a = layeroffset + j + slen1,\n\t\t\t\t\t\t\tb = layeroffset + k + slen1,\n\t\t\t\t\t\t\tc = layeroffset + k + slen2,\n\t\t\t\t\t\t\td = layeroffset + j + slen2;\n\n\t\t\t\t\t\tf4( a, b, c, d );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfunction v( x, y, z ) {\n\n\t\t\t\tplaceholder.push( x );\n\t\t\t\tplaceholder.push( y );\n\t\t\t\tplaceholder.push( z );\n\n\t\t\t}\n\n\n\t\t\tfunction f3( a, b, c ) {\n\n\t\t\t\taddVertex( a );\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( c );\n\n\t\t\t\tconst nextIndex = verticesArray.length / 3;\n\t\t\t\tconst uvs = uvgen.generateTopUV( scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1 );\n\n\t\t\t\taddUV( uvs[ 0 ] );\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 2 ] );\n\n\t\t\t}\n\n\t\t\tfunction f4( a, b, c, d ) {\n\n\t\t\t\taddVertex( a );\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( d );\n\n\t\t\t\taddVertex( b );\n\t\t\t\taddVertex( c );\n\t\t\t\taddVertex( d );\n\n\n\t\t\t\tconst nextIndex = verticesArray.length / 3;\n\t\t\t\tconst uvs = uvgen.generateSideWallUV( scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1 );\n\n\t\t\t\taddUV( uvs[ 0 ] );\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 3 ] );\n\n\t\t\t\taddUV( uvs[ 1 ] );\n\t\t\t\taddUV( uvs[ 2 ] );\n\t\t\t\taddUV( uvs[ 3 ] );\n\n\t\t\t}\n\n\t\t\tfunction addVertex( index ) {\n\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 0 ] );\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 1 ] );\n\t\t\t\tverticesArray.push( placeholder[ index * 3 + 2 ] );\n\n\t\t\t}\n\n\n\t\t\tfunction addUV( vector2 ) {\n\n\t\t\t\tuvArray.push( vector2.x );\n\t\t\t\tuvArray.push( vector2.y );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tconst shapes = this.parameters.shapes;\n\t\tconst options = this.parameters.options;\n\n\t\treturn toJSON$1( shapes, options, data );\n\n\t}\n\n\tstatic fromJSON( data, shapes ) {\n\n\t\tconst geometryShapes = [];\n\n\t\tfor ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) {\n\n\t\t\tconst shape = shapes[ data.shapes[ j ] ];\n\n\t\t\tgeometryShapes.push( shape );\n\n\t\t}\n\n\t\tconst extrudePath = data.options.extrudePath;\n\n\t\tif ( extrudePath !== undefined ) {\n\n\t\t\tdata.options.extrudePath = new Curves[ extrudePath.type ]().fromJSON( extrudePath );\n\n\t\t}\n\n\t\treturn new ExtrudeGeometry( geometryShapes, data.options );\n\n\t}\n\n}\n\nconst WorldUVGenerator = {\n\n\tgenerateTopUV: function ( geometry, vertices, indexA, indexB, indexC ) {\n\n\t\tconst a_x = vertices[ indexA * 3 ];\n\t\tconst a_y = vertices[ indexA * 3 + 1 ];\n\t\tconst b_x = vertices[ indexB * 3 ];\n\t\tconst b_y = vertices[ indexB * 3 + 1 ];\n\t\tconst c_x = vertices[ indexC * 3 ];\n\t\tconst c_y = vertices[ indexC * 3 + 1 ];\n\n\t\treturn [\n\t\t\tnew Vector2( a_x, a_y ),\n\t\t\tnew Vector2( b_x, b_y ),\n\t\t\tnew Vector2( c_x, c_y )\n\t\t];\n\n\t},\n\n\tgenerateSideWallUV: function ( geometry, vertices, indexA, indexB, indexC, indexD ) {\n\n\t\tconst a_x = vertices[ indexA * 3 ];\n\t\tconst a_y = vertices[ indexA * 3 + 1 ];\n\t\tconst a_z = vertices[ indexA * 3 + 2 ];\n\t\tconst b_x = vertices[ indexB * 3 ];\n\t\tconst b_y = vertices[ indexB * 3 + 1 ];\n\t\tconst b_z = vertices[ indexB * 3 + 2 ];\n\t\tconst c_x = vertices[ indexC * 3 ];\n\t\tconst c_y = vertices[ indexC * 3 + 1 ];\n\t\tconst c_z = vertices[ indexC * 3 + 2 ];\n\t\tconst d_x = vertices[ indexD * 3 ];\n\t\tconst d_y = vertices[ indexD * 3 + 1 ];\n\t\tconst d_z = vertices[ indexD * 3 + 2 ];\n\n\t\tif ( Math.abs( a_y - b_y ) < Math.abs( a_x - b_x ) ) {\n\n\t\t\treturn [\n\t\t\t\tnew Vector2( a_x, 1 - a_z ),\n\t\t\t\tnew Vector2( b_x, 1 - b_z ),\n\t\t\t\tnew Vector2( c_x, 1 - c_z ),\n\t\t\t\tnew Vector2( d_x, 1 - d_z )\n\t\t\t];\n\n\t\t} else {\n\n\t\t\treturn [\n\t\t\t\tnew Vector2( a_y, 1 - a_z ),\n\t\t\t\tnew Vector2( b_y, 1 - b_z ),\n\t\t\t\tnew Vector2( c_y, 1 - c_z ),\n\t\t\t\tnew Vector2( d_y, 1 - d_z )\n\t\t\t];\n\n\t\t}\n\n\t}\n\n};\n\nfunction toJSON$1( shapes, options, data ) {\n\n\tdata.shapes = [];\n\n\tif ( Array.isArray( shapes ) ) {\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\n\t\t\tdata.shapes.push( shape.uuid );\n\n\t\t}\n\n\t} else {\n\n\t\tdata.shapes.push( shapes.uuid );\n\n\t}\n\n\tif ( options.extrudePath !== undefined ) data.options.extrudePath = options.extrudePath.toJSON();\n\n\treturn data;\n\n}\n\nclass IcosahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst t = ( 1 + Math.sqrt( 5 ) ) / 2;\n\n\t\tconst vertices = [\n\t\t\t- 1, t, 0, \t1, t, 0, \t- 1, - t, 0, \t1, - t, 0,\n\t\t\t0, - 1, t, \t0, 1, t,\t0, - 1, - t, \t0, 1, - t,\n\t\t\tt, 0, - 1, \tt, 0, 1, \t- t, 0, - 1, \t- t, 0, 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t0, 11, 5, \t0, 5, 1, \t0, 1, 7, \t0, 7, 10, \t0, 10, 11,\n\t\t\t1, 5, 9, \t5, 11, 4,\t11, 10, 2,\t10, 7, 6,\t7, 1, 8,\n\t\t\t3, 9, 4, \t3, 4, 2,\t3, 2, 6,\t3, 6, 8,\t3, 8, 9,\n\t\t\t4, 9, 5, \t2, 4, 11,\t6, 2, 10,\t8, 6, 7,\t9, 8, 1\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'IcosahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new IcosahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\nclass LatheGeometry extends BufferGeometry {\n\n\tconstructor( points, segments = 12, phiStart = 0, phiLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LatheGeometry';\n\n\t\tthis.parameters = {\n\t\t\tpoints: points,\n\t\t\tsegments: segments,\n\t\t\tphiStart: phiStart,\n\t\t\tphiLength: phiLength\n\t\t};\n\n\t\tsegments = Math.floor( segments );\n\n\t\t// clamp phiLength so it's in range of [ 0, 2PI ]\n\n\t\tphiLength = clamp( phiLength, 0, Math.PI * 2 );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst inverseSegments = 1.0 / segments;\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// generate vertices and uvs\n\n\t\tfor ( let i = 0; i <= segments; i ++ ) {\n\n\t\t\tconst phi = phiStart + i * inverseSegments * phiLength;\n\n\t\t\tconst sin = Math.sin( phi );\n\t\t\tconst cos = Math.cos( phi );\n\n\t\t\tfor ( let j = 0; j <= ( points.length - 1 ); j ++ ) {\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = points[ j ].x * sin;\n\t\t\t\tvertex.y = points[ j ].y;\n\t\t\t\tvertex.z = points[ j ].x * cos;\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = i / segments;\n\t\t\t\tuv.y = j / ( points.length - 1 );\n\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\n\t\t\t}\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let i = 0; i < segments; i ++ ) {\n\n\t\t\tfor ( let j = 0; j < ( points.length - 1 ); j ++ ) {\n\n\t\t\t\tconst base = j + i * points.length;\n\n\t\t\t\tconst a = base;\n\t\t\t\tconst b = base + points.length;\n\t\t\t\tconst c = base + points.length + 1;\n\t\t\t\tconst d = base + 1;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// generate normals\n\n\t\tthis.computeVertexNormals();\n\n\t\t// if the geometry is closed, we need to average the normals along the seam.\n\t\t// because the corresponding vertices are identical (but still have different UVs).\n\n\t\tif ( phiLength === Math.PI * 2 ) {\n\n\t\t\tconst normals = this.attributes.normal.array;\n\t\t\tconst n1 = new Vector3();\n\t\t\tconst n2 = new Vector3();\n\t\t\tconst n = new Vector3();\n\n\t\t\t// this is the buffer offset for the last line of vertices\n\n\t\t\tconst base = segments * points.length * 3;\n\n\t\t\tfor ( let i = 0, j = 0; i < points.length; i ++, j += 3 ) {\n\n\t\t\t\t// select the normal of the vertex in the first line\n\n\t\t\t\tn1.x = normals[ j + 0 ];\n\t\t\t\tn1.y = normals[ j + 1 ];\n\t\t\t\tn1.z = normals[ j + 2 ];\n\n\t\t\t\t// select the normal of the vertex in the last line\n\n\t\t\t\tn2.x = normals[ base + j + 0 ];\n\t\t\t\tn2.y = normals[ base + j + 1 ];\n\t\t\t\tn2.z = normals[ base + j + 2 ];\n\n\t\t\t\t// average normals\n\n\t\t\t\tn.addVectors( n1, n2 ).normalize();\n\n\t\t\t\t// assign the new values to both normals\n\n\t\t\t\tnormals[ j + 0 ] = normals[ base + j + 0 ] = n.x;\n\t\t\t\tnormals[ j + 1 ] = normals[ base + j + 1 ] = n.y;\n\t\t\t\tnormals[ j + 2 ] = normals[ base + j + 2 ] = n.z;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength );\n\n\t}\n\n}\n\nclass OctahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst vertices = [\n\t\t\t1, 0, 0, \t- 1, 0, 0,\t0, 1, 0,\n\t\t\t0, - 1, 0, \t0, 0, 1,\t0, 0, - 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t0, 2, 4,\t0, 4, 3,\t0, 3, 5,\n\t\t\t0, 5, 2,\t1, 2, 5,\t1, 5, 3,\n\t\t\t1, 3, 4,\t1, 4, 2\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'OctahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new OctahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\n/**\n * Parametric Surfaces Geometry\n * based on the brilliant article by @prideout https://prideout.net/blog/old/blog/index.html@p=44.html\n */\n\nclass ParametricGeometry extends BufferGeometry {\n\n\tconstructor( func, slices, stacks ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ParametricGeometry';\n\n\t\tthis.parameters = {\n\t\t\tfunc: func,\n\t\t\tslices: slices,\n\t\t\tstacks: stacks\n\t\t};\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\tconst EPS = 0.00001;\n\n\t\tconst normal = new Vector3();\n\n\t\tconst p0 = new Vector3(), p1 = new Vector3();\n\t\tconst pu = new Vector3(), pv = new Vector3();\n\n\t\tif ( func.length < 3 ) {\n\n\t\t\tconsole.error( 'THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.' );\n\n\t\t}\n\n\t\t// generate vertices, normals and uvs\n\n\t\tconst sliceCount = slices + 1;\n\n\t\tfor ( let i = 0; i <= stacks; i ++ ) {\n\n\t\t\tconst v = i / stacks;\n\n\t\t\tfor ( let j = 0; j <= slices; j ++ ) {\n\n\t\t\t\tconst u = j / slices;\n\n\t\t\t\t// vertex\n\n\t\t\t\tfunc( u, v, p0 );\n\t\t\t\tvertices.push( p0.x, p0.y, p0.z );\n\n\t\t\t\t// normal\n\n\t\t\t\t// approximate tangent vectors via finite differences\n\n\t\t\t\tif ( u - EPS >= 0 ) {\n\n\t\t\t\t\tfunc( u - EPS, v, p1 );\n\t\t\t\t\tpu.subVectors( p0, p1 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfunc( u + EPS, v, p1 );\n\t\t\t\t\tpu.subVectors( p1, p0 );\n\n\t\t\t\t}\n\n\t\t\t\tif ( v - EPS >= 0 ) {\n\n\t\t\t\t\tfunc( u, v - EPS, p1 );\n\t\t\t\t\tpv.subVectors( p0, p1 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfunc( u, v + EPS, p1 );\n\t\t\t\t\tpv.subVectors( p1, p0 );\n\n\t\t\t\t}\n\n\t\t\t\t// cross product of tangent vectors returns surface normal\n\n\t\t\t\tnormal.crossVectors( pu, pv ).normalize();\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( u, v );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let i = 0; i < stacks; i ++ ) {\n\n\t\t\tfor ( let j = 0; j < slices; j ++ ) {\n\n\t\t\t\tconst a = i * sliceCount + j;\n\t\t\t\tconst b = i * sliceCount + j + 1;\n\t\t\t\tconst c = ( i + 1 ) * sliceCount + j + 1;\n\t\t\t\tconst d = ( i + 1 ) * sliceCount + j;\n\n\t\t\t\t// faces one and two\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n}\n\nclass RingGeometry extends BufferGeometry {\n\n\tconstructor( innerRadius = 0.5, outerRadius = 1, thetaSegments = 8, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'RingGeometry';\n\n\t\tthis.parameters = {\n\t\t\tinnerRadius: innerRadius,\n\t\t\touterRadius: outerRadius,\n\t\t\tthetaSegments: thetaSegments,\n\t\t\tphiSegments: phiSegments,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\tthetaSegments = Math.max( 3, thetaSegments );\n\t\tphiSegments = Math.max( 1, phiSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// some helper variables\n\n\t\tlet radius = innerRadius;\n\t\tconst radiusStep = ( ( outerRadius - innerRadius ) / phiSegments );\n\t\tconst vertex = new Vector3();\n\t\tconst uv = new Vector2();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let j = 0; j <= phiSegments; j ++ ) {\n\n\t\t\tfor ( let i = 0; i <= thetaSegments; i ++ ) {\n\n\t\t\t\t// values are generate from the inside of the ring to the outside\n\n\t\t\t\tconst segment = thetaStart + i / thetaSegments * thetaLength;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = radius * Math.cos( segment );\n\t\t\t\tvertex.y = radius * Math.sin( segment );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormals.push( 0, 0, 1 );\n\n\t\t\t\t// uv\n\n\t\t\t\tuv.x = ( vertex.x / outerRadius + 1 ) / 2;\n\t\t\t\tuv.y = ( vertex.y / outerRadius + 1 ) / 2;\n\n\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t}\n\n\t\t\t// increase the radius for next row of vertices\n\n\t\t\tradius += radiusStep;\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let j = 0; j < phiSegments; j ++ ) {\n\n\t\t\tconst thetaSegmentLevel = j * ( thetaSegments + 1 );\n\n\t\t\tfor ( let i = 0; i < thetaSegments; i ++ ) {\n\n\t\t\t\tconst segment = i + thetaSegmentLevel;\n\n\t\t\t\tconst a = segment;\n\t\t\t\tconst b = segment + thetaSegments + 1;\n\t\t\t\tconst c = segment + thetaSegments + 2;\n\t\t\t\tconst d = segment + 1;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass ShapeGeometry extends BufferGeometry {\n\n\tconstructor( shapes, curveSegments = 12 ) {\n\n\t\tsuper();\n\t\tthis.type = 'ShapeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tshapes: shapes,\n\t\t\tcurveSegments: curveSegments\n\t\t};\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tlet groupStart = 0;\n\t\tlet groupCount = 0;\n\n\t\t// allow single and array values for \"shapes\" parameter\n\n\t\tif ( Array.isArray( shapes ) === false ) {\n\n\t\t\taddShape( shapes );\n\n\t\t} else {\n\n\t\t\tfor ( let i = 0; i < shapes.length; i ++ ) {\n\n\t\t\t\taddShape( shapes[ i ] );\n\n\t\t\t\tthis.addGroup( groupStart, groupCount, i ); // enables MultiMaterial support\n\n\t\t\t\tgroupStart += groupCount;\n\t\t\t\tgroupCount = 0;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\n\t\t// helper functions\n\n\t\tfunction addShape( shape ) {\n\n\t\t\tconst indexOffset = vertices.length / 3;\n\t\t\tconst points = shape.extractPoints( curveSegments );\n\n\t\t\tlet shapeVertices = points.shape;\n\t\t\tconst shapeHoles = points.holes;\n\n\t\t\t// check direction of vertices\n\n\t\t\tif ( ShapeUtils.isClockWise( shapeVertices ) === false ) {\n\n\t\t\t\tshapeVertices = shapeVertices.reverse();\n\n\t\t\t}\n\n\t\t\tfor ( let i = 0, l = shapeHoles.length; i < l; i ++ ) {\n\n\t\t\t\tconst shapeHole = shapeHoles[ i ];\n\n\t\t\t\tif ( ShapeUtils.isClockWise( shapeHole ) === true ) {\n\n\t\t\t\t\tshapeHoles[ i ] = shapeHole.reverse();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst faces = ShapeUtils.triangulateShape( shapeVertices, shapeHoles );\n\n\t\t\t// join vertices of inner and outer paths to a single array\n\n\t\t\tfor ( let i = 0, l = shapeHoles.length; i < l; i ++ ) {\n\n\t\t\t\tconst shapeHole = shapeHoles[ i ];\n\t\t\t\tshapeVertices = shapeVertices.concat( shapeHole );\n\n\t\t\t}\n\n\t\t\t// vertices, normals, uvs\n\n\t\t\tfor ( let i = 0, l = shapeVertices.length; i < l; i ++ ) {\n\n\t\t\t\tconst vertex = shapeVertices[ i ];\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, 0 );\n\t\t\t\tnormals.push( 0, 0, 1 );\n\t\t\t\tuvs.push( vertex.x, vertex.y ); // world uvs\n\n\t\t\t}\n\n\t\t\t// incides\n\n\t\t\tfor ( let i = 0, l = faces.length; i < l; i ++ ) {\n\n\t\t\t\tconst face = faces[ i ];\n\n\t\t\t\tconst a = face[ 0 ] + indexOffset;\n\t\t\t\tconst b = face[ 1 ] + indexOffset;\n\t\t\t\tconst c = face[ 2 ] + indexOffset;\n\n\t\t\t\tindices.push( a, b, c );\n\t\t\t\tgroupCount += 3;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tconst shapes = this.parameters.shapes;\n\n\t\treturn toJSON( shapes, data );\n\n\t}\n\n\tstatic fromJSON( data, shapes ) {\n\n\t\tconst geometryShapes = [];\n\n\t\tfor ( let j = 0, jl = data.shapes.length; j < jl; j ++ ) {\n\n\t\t\tconst shape = shapes[ data.shapes[ j ] ];\n\n\t\t\tgeometryShapes.push( shape );\n\n\t\t}\n\n\t\treturn new ShapeGeometry( geometryShapes, data.curveSegments );\n\n\t}\n\n}\n\nfunction toJSON( shapes, data ) {\n\n\tdata.shapes = [];\n\n\tif ( Array.isArray( shapes ) ) {\n\n\t\tfor ( let i = 0, l = shapes.length; i < l; i ++ ) {\n\n\t\t\tconst shape = shapes[ i ];\n\n\t\t\tdata.shapes.push( shape.uuid );\n\n\t\t}\n\n\t} else {\n\n\t\tdata.shapes.push( shapes.uuid );\n\n\t}\n\n\treturn data;\n\n}\n\nclass SphereGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, widthSegments = 8, heightSegments = 6, phiStart = 0, phiLength = Math.PI * 2, thetaStart = 0, thetaLength = Math.PI ) {\n\n\t\tsuper();\n\t\tthis.type = 'SphereGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\twidthSegments: widthSegments,\n\t\t\theightSegments: heightSegments,\n\t\t\tphiStart: phiStart,\n\t\t\tphiLength: phiLength,\n\t\t\tthetaStart: thetaStart,\n\t\t\tthetaLength: thetaLength\n\t\t};\n\n\t\twidthSegments = Math.max( 3, Math.floor( widthSegments ) );\n\t\theightSegments = Math.max( 2, Math.floor( heightSegments ) );\n\n\t\tconst thetaEnd = Math.min( thetaStart + thetaLength, Math.PI );\n\n\t\tlet index = 0;\n\t\tconst grid = [];\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let iy = 0; iy <= heightSegments; iy ++ ) {\n\n\t\t\tconst verticesRow = [];\n\n\t\t\tconst v = iy / heightSegments;\n\n\t\t\t// special case for the poles\n\n\t\t\tlet uOffset = 0;\n\n\t\t\tif ( iy == 0 && thetaStart == 0 ) {\n\n\t\t\t\tuOffset = 0.5 / widthSegments;\n\n\t\t\t} else if ( iy == heightSegments && thetaEnd == Math.PI ) {\n\n\t\t\t\tuOffset = - 0.5 / widthSegments;\n\n\t\t\t}\n\n\t\t\tfor ( let ix = 0; ix <= widthSegments; ix ++ ) {\n\n\t\t\t\tconst u = ix / widthSegments;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );\n\t\t\t\tvertex.y = radius * Math.cos( thetaStart + v * thetaLength );\n\t\t\t\tvertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormal.copy( vertex ).normalize();\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( u + uOffset, 1 - v );\n\n\t\t\t\tverticesRow.push( index ++ );\n\n\t\t\t}\n\n\t\t\tgrid.push( verticesRow );\n\n\t\t}\n\n\t\t// indices\n\n\t\tfor ( let iy = 0; iy < heightSegments; iy ++ ) {\n\n\t\t\tfor ( let ix = 0; ix < widthSegments; ix ++ ) {\n\n\t\t\t\tconst a = grid[ iy ][ ix + 1 ];\n\t\t\t\tconst b = grid[ iy ][ ix ];\n\t\t\t\tconst c = grid[ iy + 1 ][ ix ];\n\t\t\t\tconst d = grid[ iy + 1 ][ ix + 1 ];\n\n\t\t\t\tif ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d );\n\t\t\t\tif ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength );\n\n\t}\n\n}\n\nclass TetrahedronGeometry extends PolyhedronGeometry {\n\n\tconstructor( radius = 1, detail = 0 ) {\n\n\t\tconst vertices = [\n\t\t\t1, 1, 1, \t- 1, - 1, 1, \t- 1, 1, - 1, \t1, - 1, - 1\n\t\t];\n\n\t\tconst indices = [\n\t\t\t2, 1, 0, \t0, 3, 2,\t1, 3, 0,\t2, 3, 1\n\t\t];\n\n\t\tsuper( vertices, indices, radius, detail );\n\n\t\tthis.type = 'TetrahedronGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\tdetail: detail\n\t\t};\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TetrahedronGeometry( data.radius, data.detail );\n\n\t}\n\n}\n\n/**\n * Text = 3D Text\n *\n * parameters = {\n * font: <THREE.Font>, // font\n *\n * size: <float>, // size of the text\n * height: <float>, // thickness to extrude text\n * curveSegments: <int>, // number of points on the curves\n *\n * bevelEnabled: <bool>, // turn on bevel\n * bevelThickness: <float>, // how deep into text bevel goes\n * bevelSize: <float>, // how far from text outline (including bevelOffset) is bevel\n * bevelOffset: <float> // how far from text outline does bevel start\n * }\n */\n\nclass TextGeometry extends ExtrudeGeometry {\n\n\tconstructor( text, parameters = {} ) {\n\n\t\tconst font = parameters.font;\n\n\t\tif ( ! ( font && font.isFont ) ) {\n\n\t\t\tconsole.error( 'THREE.TextGeometry: font parameter is not an instance of THREE.Font.' );\n\t\t\treturn new BufferGeometry();\n\n\t\t}\n\n\t\tconst shapes = font.generateShapes( text, parameters.size );\n\n\t\t// translate parameters to ExtrudeGeometry API\n\n\t\tparameters.depth = parameters.height !== undefined ? parameters.height : 50;\n\n\t\t// defaults\n\n\t\tif ( parameters.bevelThickness === undefined ) parameters.bevelThickness = 10;\n\t\tif ( parameters.bevelSize === undefined ) parameters.bevelSize = 8;\n\t\tif ( parameters.bevelEnabled === undefined ) parameters.bevelEnabled = false;\n\n\t\tsuper( shapes, parameters );\n\n\t\tthis.type = 'TextGeometry';\n\n\t}\n\n}\n\nclass TorusGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, tube = 0.4, radialSegments = 8, tubularSegments = 6, arc = Math.PI * 2 ) {\n\n\t\tsuper();\n\t\tthis.type = 'TorusGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\ttube: tube,\n\t\t\tradialSegments: radialSegments,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tarc: arc\n\t\t};\n\n\t\tradialSegments = Math.floor( radialSegments );\n\t\ttubularSegments = Math.floor( tubularSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst center = new Vector3();\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\tfor ( let i = 0; i <= tubularSegments; i ++ ) {\n\n\t\t\t\tconst u = i / tubularSegments * arc;\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u );\n\t\t\t\tvertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u );\n\t\t\t\tvertex.z = tube * Math.sin( v );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal\n\n\t\t\t\tcenter.x = radius * Math.cos( u );\n\t\t\t\tcenter.y = radius * Math.sin( u );\n\t\t\t\tnormal.subVectors( vertex, center ).normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( i / tubularSegments );\n\t\t\t\tuvs.push( j / radialSegments );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let j = 1; j <= radialSegments; j ++ ) {\n\n\t\t\tfor ( let i = 1; i <= tubularSegments; i ++ ) {\n\n\t\t\t\t// indices\n\n\t\t\t\tconst a = ( tubularSegments + 1 ) * j + i - 1;\n\t\t\t\tconst b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1;\n\t\t\t\tconst c = ( tubularSegments + 1 ) * ( j - 1 ) + i;\n\t\t\t\tconst d = ( tubularSegments + 1 ) * j + i;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc );\n\n\t}\n\n}\n\nclass TorusKnotGeometry extends BufferGeometry {\n\n\tconstructor( radius = 1, tube = 0.4, tubularSegments = 64, radialSegments = 8, p = 2, q = 3 ) {\n\n\t\tsuper();\n\t\tthis.type = 'TorusKnotGeometry';\n\n\t\tthis.parameters = {\n\t\t\tradius: radius,\n\t\t\ttube: tube,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tradialSegments: radialSegments,\n\t\t\tp: p,\n\t\t\tq: q\n\t\t};\n\n\t\ttubularSegments = Math.floor( tubularSegments );\n\t\tradialSegments = Math.floor( radialSegments );\n\n\t\t// buffers\n\n\t\tconst indices = [];\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\n\t\tconst P1 = new Vector3();\n\t\tconst P2 = new Vector3();\n\n\t\tconst B = new Vector3();\n\t\tconst T = new Vector3();\n\t\tconst N = new Vector3();\n\n\t\t// generate vertices, normals and uvs\n\n\t\tfor ( let i = 0; i <= tubularSegments; ++ i ) {\n\n\t\t\t// the radian \"u\" is used to calculate the position on the torus curve of the current tubular segement\n\n\t\t\tconst u = i / tubularSegments * p * Math.PI * 2;\n\n\t\t\t// now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead.\n\t\t\t// these points are used to create a special \"coordinate space\", which is necessary to calculate the correct vertex positions\n\n\t\t\tcalculatePositionOnCurve( u, p, q, radius, P1 );\n\t\t\tcalculatePositionOnCurve( u + 0.01, p, q, radius, P2 );\n\n\t\t\t// calculate orthonormal basis\n\n\t\t\tT.subVectors( P2, P1 );\n\t\t\tN.addVectors( P2, P1 );\n\t\t\tB.crossVectors( T, N );\n\t\t\tN.crossVectors( B, T );\n\n\t\t\t// normalize B, N. T can be ignored, we don't use it\n\n\t\t\tB.normalize();\n\t\t\tN.normalize();\n\n\t\t\tfor ( let j = 0; j <= radialSegments; ++ j ) {\n\n\t\t\t\t// now calculate the vertices. they are nothing more than an extrusion of the torus curve.\n\t\t\t\t// because we extrude a shape in the xy-plane, there is no need to calculate a z-value.\n\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\t\t\t\tconst cx = - tube * Math.cos( v );\n\t\t\t\tconst cy = tube * Math.sin( v );\n\n\t\t\t\t// now calculate the final vertex position.\n\t\t\t\t// first we orient the extrusion with our basis vectos, then we add it to the current position on the curve\n\n\t\t\t\tvertex.x = P1.x + ( cx * N.x + cy * B.x );\n\t\t\t\tvertex.y = P1.y + ( cx * N.y + cy * B.y );\n\t\t\t\tvertex.z = P1.z + ( cx * N.z + cy * B.z );\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t// normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)\n\n\t\t\t\tnormal.subVectors( vertex, P1 ).normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// uv\n\n\t\t\t\tuvs.push( i / tubularSegments );\n\t\t\t\tuvs.push( j / radialSegments );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// generate indices\n\n\t\tfor ( let j = 1; j <= tubularSegments; j ++ ) {\n\n\t\t\tfor ( let i = 1; i <= radialSegments; i ++ ) {\n\n\t\t\t\t// indices\n\n\t\t\t\tconst a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );\n\t\t\t\tconst b = ( radialSegments + 1 ) * j + ( i - 1 );\n\t\t\t\tconst c = ( radialSegments + 1 ) * j + i;\n\t\t\t\tconst d = ( radialSegments + 1 ) * ( j - 1 ) + i;\n\n\t\t\t\t// faces\n\n\t\t\t\tindices.push( a, b, d );\n\t\t\t\tindices.push( b, c, d );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// this function calculates the current position on the torus curve\n\n\t\tfunction calculatePositionOnCurve( u, p, q, radius, position ) {\n\n\t\t\tconst cu = Math.cos( u );\n\t\t\tconst su = Math.sin( u );\n\t\t\tconst quOverP = q / p * u;\n\t\t\tconst cs = Math.cos( quOverP );\n\n\t\t\tposition.x = radius * ( 2 + cs ) * 0.5 * cu;\n\t\t\tposition.y = radius * ( 2 + cs ) * su * 0.5;\n\t\t\tposition.z = radius * Math.sin( quOverP ) * 0.5;\n\n\t\t}\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\treturn new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q );\n\n\t}\n\n}\n\nclass TubeGeometry extends BufferGeometry {\n\n\tconstructor( path, tubularSegments = 64, radius = 1, radialSegments = 8, closed = false ) {\n\n\t\tsuper();\n\t\tthis.type = 'TubeGeometry';\n\n\t\tthis.parameters = {\n\t\t\tpath: path,\n\t\t\ttubularSegments: tubularSegments,\n\t\t\tradius: radius,\n\t\t\tradialSegments: radialSegments,\n\t\t\tclosed: closed\n\t\t};\n\n\t\tconst frames = path.computeFrenetFrames( tubularSegments, closed );\n\n\t\t// expose internals\n\n\t\tthis.tangents = frames.tangents;\n\t\tthis.normals = frames.normals;\n\t\tthis.binormals = frames.binormals;\n\n\t\t// helper variables\n\n\t\tconst vertex = new Vector3();\n\t\tconst normal = new Vector3();\n\t\tconst uv = new Vector2();\n\t\tlet P = new Vector3();\n\n\t\t// buffer\n\n\t\tconst vertices = [];\n\t\tconst normals = [];\n\t\tconst uvs = [];\n\t\tconst indices = [];\n\n\t\t// create buffer data\n\n\t\tgenerateBufferData();\n\n\t\t// build geometry\n\n\t\tthis.setIndex( indices );\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tthis.setAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );\n\t\tthis.setAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );\n\n\t\t// functions\n\n\t\tfunction generateBufferData() {\n\n\t\t\tfor ( let i = 0; i < tubularSegments; i ++ ) {\n\n\t\t\t\tgenerateSegment( i );\n\n\t\t\t}\n\n\t\t\t// if the geometry is not closed, generate the last row of vertices and normals\n\t\t\t// at the regular position on the given path\n\t\t\t//\n\t\t\t// if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)\n\n\t\t\tgenerateSegment( ( closed === false ) ? tubularSegments : 0 );\n\n\t\t\t// uvs are generated in a separate function.\n\t\t\t// this makes it easy compute correct values for closed geometries\n\n\t\t\tgenerateUVs();\n\n\t\t\t// finally create faces\n\n\t\t\tgenerateIndices();\n\n\t\t}\n\n\t\tfunction generateSegment( i ) {\n\n\t\t\t// we use getPointAt to sample evenly distributed points from the given path\n\n\t\t\tP = path.getPointAt( i / tubularSegments, P );\n\n\t\t\t// retrieve corresponding normal and binormal\n\n\t\t\tconst N = frames.normals[ i ];\n\t\t\tconst B = frames.binormals[ i ];\n\n\t\t\t// generate normals and vertices for the current segment\n\n\t\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\t\tconst v = j / radialSegments * Math.PI * 2;\n\n\t\t\t\tconst sin = Math.sin( v );\n\t\t\t\tconst cos = - Math.cos( v );\n\n\t\t\t\t// normal\n\n\t\t\t\tnormal.x = ( cos * N.x + sin * B.x );\n\t\t\t\tnormal.y = ( cos * N.y + sin * B.y );\n\t\t\t\tnormal.z = ( cos * N.z + sin * B.z );\n\t\t\t\tnormal.normalize();\n\n\t\t\t\tnormals.push( normal.x, normal.y, normal.z );\n\n\t\t\t\t// vertex\n\n\t\t\t\tvertex.x = P.x + radius * normal.x;\n\t\t\t\tvertex.y = P.y + radius * normal.y;\n\t\t\t\tvertex.z = P.z + radius * normal.z;\n\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateIndices() {\n\n\t\t\tfor ( let j = 1; j <= tubularSegments; j ++ ) {\n\n\t\t\t\tfor ( let i = 1; i <= radialSegments; i ++ ) {\n\n\t\t\t\t\tconst a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );\n\t\t\t\t\tconst b = ( radialSegments + 1 ) * j + ( i - 1 );\n\t\t\t\t\tconst c = ( radialSegments + 1 ) * j + i;\n\t\t\t\t\tconst d = ( radialSegments + 1 ) * ( j - 1 ) + i;\n\n\t\t\t\t\t// faces\n\n\t\t\t\t\tindices.push( a, b, d );\n\t\t\t\t\tindices.push( b, c, d );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction generateUVs() {\n\n\t\t\tfor ( let i = 0; i <= tubularSegments; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j <= radialSegments; j ++ ) {\n\n\t\t\t\t\tuv.x = i / tubularSegments;\n\t\t\t\t\tuv.y = j / radialSegments;\n\n\t\t\t\t\tuvs.push( uv.x, uv.y );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.path = this.parameters.path.toJSON();\n\n\t\treturn data;\n\n\t}\n\n\tstatic fromJSON( data ) {\n\n\t\t// This only works for built-in curves (e.g. CatmullRomCurve3).\n\t\t// User defined curves or instances of CurvePath will not be deserialized.\n\t\treturn new TubeGeometry(\n\t\t\tnew Curves[ data.path.type ]().fromJSON( data.path ),\n\t\t\tdata.tubularSegments,\n\t\t\tdata.radius,\n\t\t\tdata.radialSegments,\n\t\t\tdata.closed\n\t\t);\n\n\t}\n\n}\n\nclass WireframeGeometry extends BufferGeometry {\n\n\tconstructor( geometry ) {\n\n\t\tsuper();\n\t\tthis.type = 'WireframeGeometry';\n\n\t\tif ( geometry.isGeometry === true ) {\n\n\t\t\tconsole.error( 'THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\t// buffer\n\n\t\tconst vertices = [];\n\n\t\t// helper variables\n\n\t\tconst edge = [ 0, 0 ], edges = {};\n\n\t\tconst vertex = new Vector3();\n\n\t\tif ( geometry.index !== null ) {\n\n\t\t\t// indexed BufferGeometry\n\n\t\t\tconst position = geometry.attributes.position;\n\t\t\tconst indices = geometry.index;\n\t\t\tlet groups = geometry.groups;\n\n\t\t\tif ( groups.length === 0 ) {\n\n\t\t\t\tgroups = [ { start: 0, count: indices.count, materialIndex: 0 } ];\n\n\t\t\t}\n\n\t\t\t// create a data structure that contains all eges without duplicates\n\n\t\t\tfor ( let o = 0, ol = groups.length; o < ol; ++ o ) {\n\n\t\t\t\tconst group = groups[ o ];\n\n\t\t\t\tconst start = group.start;\n\t\t\t\tconst count = group.count;\n\n\t\t\t\tfor ( let i = start, l = ( start + count ); i < l; i += 3 ) {\n\n\t\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t\tconst edge1 = indices.getX( i + j );\n\t\t\t\t\t\tconst edge2 = indices.getX( i + ( j + 1 ) % 3 );\n\t\t\t\t\t\tedge[ 0 ] = Math.min( edge1, edge2 ); // sorting prevents duplicates\n\t\t\t\t\t\tedge[ 1 ] = Math.max( edge1, edge2 );\n\n\t\t\t\t\t\tconst key = edge[ 0 ] + ',' + edge[ 1 ];\n\n\t\t\t\t\t\tif ( edges[ key ] === undefined ) {\n\n\t\t\t\t\t\t\tedges[ key ] = { index1: edge[ 0 ], index2: edge[ 1 ] };\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// generate vertices\n\n\t\t\tfor ( const key in edges ) {\n\n\t\t\t\tconst e = edges[ key ];\n\n\t\t\t\tvertex.fromBufferAttribute( position, e.index1 );\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\tvertex.fromBufferAttribute( position, e.index2 );\n\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// non-indexed BufferGeometry\n\n\t\t\tconst position = geometry.attributes.position;\n\n\t\t\tfor ( let i = 0, l = ( position.count / 3 ); i < l; i ++ ) {\n\n\t\t\t\tfor ( let j = 0; j < 3; j ++ ) {\n\n\t\t\t\t\t// three edges per triangle, an edge is represented as (index1, index2)\n\t\t\t\t\t// e.g. the first triangle has the following edges: (0,1),(1,2),(2,0)\n\n\t\t\t\t\tconst index1 = 3 * i + j;\n\t\t\t\t\tvertex.fromBufferAttribute( position, index1 );\n\t\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t\tconst index2 = 3 * i + ( ( j + 1 ) % 3 );\n\t\t\t\t\tvertex.fromBufferAttribute( position, index2 );\n\t\t\t\t\tvertices.push( vertex.x, vertex.y, vertex.z );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// build geometry\n\n\t\tthis.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\n\t}\n\n}\n\nvar Geometries = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tBoxGeometry: BoxGeometry,\n\tBoxBufferGeometry: BoxGeometry,\n\tCircleGeometry: CircleGeometry,\n\tCircleBufferGeometry: CircleGeometry,\n\tConeGeometry: ConeGeometry,\n\tConeBufferGeometry: ConeGeometry,\n\tCylinderGeometry: CylinderGeometry,\n\tCylinderBufferGeometry: CylinderGeometry,\n\tDodecahedronGeometry: DodecahedronGeometry,\n\tDodecahedronBufferGeometry: DodecahedronGeometry,\n\tEdgesGeometry: EdgesGeometry,\n\tExtrudeGeometry: ExtrudeGeometry,\n\tExtrudeBufferGeometry: ExtrudeGeometry,\n\tIcosahedronGeometry: IcosahedronGeometry,\n\tIcosahedronBufferGeometry: IcosahedronGeometry,\n\tLatheGeometry: LatheGeometry,\n\tLatheBufferGeometry: LatheGeometry,\n\tOctahedronGeometry: OctahedronGeometry,\n\tOctahedronBufferGeometry: OctahedronGeometry,\n\tParametricGeometry: ParametricGeometry,\n\tParametricBufferGeometry: ParametricGeometry,\n\tPlaneGeometry: PlaneGeometry,\n\tPlaneBufferGeometry: PlaneGeometry,\n\tPolyhedronGeometry: PolyhedronGeometry,\n\tPolyhedronBufferGeometry: PolyhedronGeometry,\n\tRingGeometry: RingGeometry,\n\tRingBufferGeometry: RingGeometry,\n\tShapeGeometry: ShapeGeometry,\n\tShapeBufferGeometry: ShapeGeometry,\n\tSphereGeometry: SphereGeometry,\n\tSphereBufferGeometry: SphereGeometry,\n\tTetrahedronGeometry: TetrahedronGeometry,\n\tTetrahedronBufferGeometry: TetrahedronGeometry,\n\tTextGeometry: TextGeometry,\n\tTextBufferGeometry: TextGeometry,\n\tTorusGeometry: TorusGeometry,\n\tTorusBufferGeometry: TorusGeometry,\n\tTorusKnotGeometry: TorusKnotGeometry,\n\tTorusKnotBufferGeometry: TorusKnotGeometry,\n\tTubeGeometry: TubeGeometry,\n\tTubeBufferGeometry: TubeGeometry,\n\tWireframeGeometry: WireframeGeometry\n});\n\n/**\n * parameters = {\n * color: <THREE.Color>\n * }\n */\n\nclass ShadowMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ShadowMaterial';\n\n\t\tthis.color = new Color( 0x000000 );\n\t\tthis.transparent = true;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\treturn this;\n\n\t}\n\n}\n\nShadowMaterial.prototype.isShadowMaterial = true;\n\nclass RawShaderMaterial extends ShaderMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper( parameters );\n\n\t\tthis.type = 'RawShaderMaterial';\n\n\t}\n\n}\n\nRawShaderMaterial.prototype.isRawShaderMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * roughness: <float>,\n * metalness: <float>,\n * opacity: <float>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * emissive: <hex>,\n * emissiveIntensity: <float>\n * emissiveMap: new THREE.Texture( <Image> ),\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * roughnessMap: new THREE.Texture( <Image> ),\n *\n * metalnessMap: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n * envMapIntensity: <float>\n *\n * refractionRatio: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>,\n *\n * flatShading: <bool>\n * }\n */\n\nclass MeshStandardMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.defines = { 'STANDARD': '' };\n\n\t\tthis.type = 'MeshStandardMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\t\tthis.roughness = 1.0;\n\t\tthis.metalness = 0.0;\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.roughnessMap = null;\n\n\t\tthis.metalnessMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.envMapIntensity = 1.0;\n\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.vertexTangents = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = { 'STANDARD': '' };\n\n\t\tthis.color.copy( source.color );\n\t\tthis.roughness = source.roughness;\n\t\tthis.metalness = source.metalness;\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.roughnessMap = source.roughnessMap;\n\n\t\tthis.metalnessMap = source.metalnessMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.envMapIntensity = source.envMapIntensity;\n\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\tthis.vertexTangents = source.vertexTangents;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshStandardMaterial.prototype.isMeshStandardMaterial = true;\n\n/**\n * parameters = {\n * clearcoat: <float>,\n * clearcoatMap: new THREE.Texture( <Image> ),\n * clearcoatRoughness: <float>,\n * clearcoatRoughnessMap: new THREE.Texture( <Image> ),\n * clearcoatNormalScale: <Vector2>,\n * clearcoatNormalMap: new THREE.Texture( <Image> ),\n *\n * reflectivity: <float>,\n * ior: <float>,\n *\n * sheen: <Color>,\n *\n * transmission: <float>,\n * transmissionMap: new THREE.Texture( <Image> ),\n *\n * thickness: <float>,\n * thicknessMap: new THREE.Texture( <Image> ),\n * attenuationDistance: <float>,\n * attenuationColor: <Color>\n * }\n */\n\nclass MeshPhysicalMaterial extends MeshStandardMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.defines = {\n\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\n\t\t};\n\n\t\tthis.type = 'MeshPhysicalMaterial';\n\n\t\tthis.clearcoat = 0.0;\n\t\tthis.clearcoatMap = null;\n\t\tthis.clearcoatRoughness = 0.0;\n\t\tthis.clearcoatRoughnessMap = null;\n\t\tthis.clearcoatNormalScale = new Vector2( 1, 1 );\n\t\tthis.clearcoatNormalMap = null;\n\n\t\tthis.reflectivity = 0.5; // maps to F0 = 0.04\n\n\t\tObject.defineProperty( this, 'ior', {\n\t\t\tget: function () {\n\n\t\t\t\treturn ( 1 + 0.4 * this.reflectivity ) / ( 1 - 0.4 * this.reflectivity );\n\n\t\t\t},\n\t\t\tset: function ( ior ) {\n\n\t\t\t\tthis.reflectivity = clamp( 2.5 * ( ior - 1 ) / ( ior + 1 ), 0, 1 );\n\n\t\t\t}\n\t\t} );\n\n\t\tthis.sheen = null; // null will disable sheen bsdf\n\n\t\tthis.transmission = 0.0;\n\t\tthis.transmissionMap = null;\n\n\t\tthis.thickness = 0.01;\n\t\tthis.thicknessMap = null;\n\t\tthis.attenuationDistance = 0.0;\n\t\tthis.attenuationColor = new Color( 1, 1, 1 );\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = {\n\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\n\t\t};\n\n\t\tthis.clearcoat = source.clearcoat;\n\t\tthis.clearcoatMap = source.clearcoatMap;\n\t\tthis.clearcoatRoughness = source.clearcoatRoughness;\n\t\tthis.clearcoatRoughnessMap = source.clearcoatRoughnessMap;\n\t\tthis.clearcoatNormalMap = source.clearcoatNormalMap;\n\t\tthis.clearcoatNormalScale.copy( source.clearcoatNormalScale );\n\n\t\tthis.reflectivity = source.reflectivity;\n\n\t\tif ( source.sheen ) {\n\n\t\t\tthis.sheen = ( this.sheen || new Color() ).copy( source.sheen );\n\n\t\t} else {\n\n\t\t\tthis.sheen = null;\n\n\t\t}\n\n\t\tthis.transmission = source.transmission;\n\t\tthis.transmissionMap = source.transmissionMap;\n\n\t\tthis.thickness = source.thickness;\n\t\tthis.thicknessMap = source.thicknessMap;\n\t\tthis.attenuationDistance = source.attenuationDistance;\n\t\tthis.attenuationColor.copy( source.attenuationColor );\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshPhysicalMaterial.prototype.isMeshPhysicalMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * specular: <hex>,\n * shininess: <float>,\n * opacity: <float>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * emissive: <hex>,\n * emissiveIntensity: <float>\n * emissiveMap: new THREE.Texture( <Image> ),\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * specularMap: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n * combine: THREE.MultiplyOperation,\n * reflectivity: <float>,\n * refractionRatio: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>,\n *\n * flatShading: <bool>\n * }\n */\n\nclass MeshPhongMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshPhongMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\t\tthis.specular = new Color( 0x111111 );\n\t\tthis.shininess = 30;\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\t\tthis.specular.copy( source.specular );\n\t\tthis.shininess = source.shininess;\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshPhongMaterial.prototype.isMeshPhongMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n *\n * map: new THREE.Texture( <Image> ),\n * gradientMap: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * emissive: <hex>,\n * emissiveIntensity: <float>\n * emissiveMap: new THREE.Texture( <Image> ),\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>\n * }\n */\n\nclass MeshToonMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.defines = { 'TOON': '' };\n\n\t\tthis.type = 'MeshToonMaterial';\n\n\t\tthis.color = new Color( 0xffffff );\n\n\t\tthis.map = null;\n\t\tthis.gradientMap = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\t\tthis.gradientMap = source.gradientMap;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshToonMaterial.prototype.isMeshToonMaterial = true;\n\n/**\n * parameters = {\n * opacity: <float>,\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>,\n *\n * flatShading: <bool>\n * }\n */\n\nclass MeshNormalMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshNormalMaterial';\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\n\t\tthis.fog = false;\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshNormalMaterial.prototype.isMeshNormalMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n *\n * map: new THREE.Texture( <Image> ),\n *\n * lightMap: new THREE.Texture( <Image> ),\n * lightMapIntensity: <float>\n *\n * aoMap: new THREE.Texture( <Image> ),\n * aoMapIntensity: <float>\n *\n * emissive: <hex>,\n * emissiveIntensity: <float>\n * emissiveMap: new THREE.Texture( <Image> ),\n *\n * specularMap: new THREE.Texture( <Image> ),\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * envMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n * combine: THREE.Multiply,\n * reflectivity: <float>,\n * refractionRatio: <float>,\n *\n * wireframe: <boolean>,\n * wireframeLinewidth: <float>,\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>\n * }\n */\n\nclass MeshLambertMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'MeshLambertMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\n\t\tthis.map = null;\n\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\n\t\tthis.emissive = new Color( 0x000000 );\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\n\t\tthis.specularMap = null;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.map = source.map;\n\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\n\t\tthis.emissive.copy( source.emissive );\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\n\t\tthis.specularMap = source.specularMap;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshLambertMaterial.prototype.isMeshLambertMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n *\n * matcap: new THREE.Texture( <Image> ),\n *\n * map: new THREE.Texture( <Image> ),\n *\n * bumpMap: new THREE.Texture( <Image> ),\n * bumpScale: <float>,\n *\n * normalMap: new THREE.Texture( <Image> ),\n * normalMapType: THREE.TangentSpaceNormalMap,\n * normalScale: <Vector2>,\n *\n * displacementMap: new THREE.Texture( <Image> ),\n * displacementScale: <float>,\n * displacementBias: <float>,\n *\n * alphaMap: new THREE.Texture( <Image> ),\n *\n * morphTargets: <bool>,\n * morphNormals: <bool>\n *\n * flatShading: <bool>\n * }\n */\n\nclass MeshMatcapMaterial extends Material {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.defines = { 'MATCAP': '' };\n\n\t\tthis.type = 'MeshMatcapMaterial';\n\n\t\tthis.color = new Color( 0xffffff ); // diffuse\n\n\t\tthis.matcap = null;\n\n\t\tthis.map = null;\n\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2( 1, 1 );\n\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\n\t\tthis.alphaMap = null;\n\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\n\t\tthis.flatShading = false;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.defines = { 'MATCAP': '' };\n\n\t\tthis.color.copy( source.color );\n\n\t\tthis.matcap = source.matcap;\n\n\t\tthis.map = source.map;\n\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy( source.normalScale );\n\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\n\t\tthis.alphaMap = source.alphaMap;\n\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\n\t\tthis.flatShading = source.flatShading;\n\n\t\treturn this;\n\n\t}\n\n}\n\nMeshMatcapMaterial.prototype.isMeshMatcapMaterial = true;\n\n/**\n * parameters = {\n * color: <hex>,\n * opacity: <float>,\n *\n * linewidth: <float>,\n *\n * scale: <float>,\n * dashSize: <float>,\n * gapSize: <float>\n * }\n */\n\nclass LineDashedMaterial extends LineBasicMaterial {\n\n\tconstructor( parameters ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'LineDashedMaterial';\n\n\t\tthis.scale = 1;\n\t\tthis.dashSize = 3;\n\t\tthis.gapSize = 1;\n\n\t\tthis.setValues( parameters );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.scale = source.scale;\n\t\tthis.dashSize = source.dashSize;\n\t\tthis.gapSize = source.gapSize;\n\n\t\treturn this;\n\n\t}\n\n}\n\nLineDashedMaterial.prototype.isLineDashedMaterial = true;\n\nvar Materials = /*#__PURE__*/Object.freeze({\n\t__proto__: null,\n\tShadowMaterial: ShadowMaterial,\n\tSpriteMaterial: SpriteMaterial,\n\tRawShaderMaterial: RawShaderMaterial,\n\tShaderMaterial: ShaderMaterial,\n\tPointsMaterial: PointsMaterial,\n\tMeshPhysicalMaterial: MeshPhysicalMaterial,\n\tMeshStandardMaterial: MeshStandardMaterial,\n\tMeshPhongMaterial: MeshPhongMaterial,\n\tMeshToonMaterial: MeshToonMaterial,\n\tMeshNormalMaterial: MeshNormalMaterial,\n\tMeshLambertMaterial: MeshLambertMaterial,\n\tMeshDepthMaterial: MeshDepthMaterial,\n\tMeshDistanceMaterial: MeshDistanceMaterial,\n\tMeshBasicMaterial: MeshBasicMaterial,\n\tMeshMatcapMaterial: MeshMatcapMaterial,\n\tLineDashedMaterial: LineDashedMaterial,\n\tLineBasicMaterial: LineBasicMaterial,\n\tMaterial: Material\n});\n\nconst AnimationUtils = {\n\n\t// same as Array.prototype.slice, but also works on typed arrays\n\tarraySlice: function ( array, from, to ) {\n\n\t\tif ( AnimationUtils.isTypedArray( array ) ) {\n\n\t\t\t// in ios9 array.subarray(from, undefined) will return empty array\n\t\t\t// but array.subarray(from) or array.subarray(from, len) is correct\n\t\t\treturn new array.constructor( array.subarray( from, to !== undefined ? to : array.length ) );\n\n\t\t}\n\n\t\treturn array.slice( from, to );\n\n\t},\n\n\t// converts an array to a specific type\n\tconvertArray: function ( array, type, forceClone ) {\n\n\t\tif ( ! array || // let 'undefined' and 'null' pass\n\t\t\t! forceClone && array.constructor === type ) return array;\n\n\t\tif ( typeof type.BYTES_PER_ELEMENT === 'number' ) {\n\n\t\t\treturn new type( array ); // create typed array\n\n\t\t}\n\n\t\treturn Array.prototype.slice.call( array ); // create Array\n\n\t},\n\n\tisTypedArray: function ( object ) {\n\n\t\treturn ArrayBuffer.isView( object ) &&\n\t\t\t! ( object instanceof DataView );\n\n\t},\n\n\t// returns an array by which times and values can be sorted\n\tgetKeyframeOrder: function ( times ) {\n\n\t\tfunction compareTime( i, j ) {\n\n\t\t\treturn times[ i ] - times[ j ];\n\n\t\t}\n\n\t\tconst n = times.length;\n\t\tconst result = new Array( n );\n\t\tfor ( let i = 0; i !== n; ++ i ) result[ i ] = i;\n\n\t\tresult.sort( compareTime );\n\n\t\treturn result;\n\n\t},\n\n\t// uses the array previously returned by 'getKeyframeOrder' to sort data\n\tsortedArray: function ( values, stride, order ) {\n\n\t\tconst nValues = values.length;\n\t\tconst result = new values.constructor( nValues );\n\n\t\tfor ( let i = 0, dstOffset = 0; dstOffset !== nValues; ++ i ) {\n\n\t\t\tconst srcOffset = order[ i ] * stride;\n\n\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\tresult[ dstOffset ++ ] = values[ srcOffset + j ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn result;\n\n\t},\n\n\t// function for parsing AOS keyframe formats\n\tflattenJSON: function ( jsonKeys, times, values, valuePropertyName ) {\n\n\t\tlet i = 1, key = jsonKeys[ 0 ];\n\n\t\twhile ( key !== undefined && key[ valuePropertyName ] === undefined ) {\n\n\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t}\n\n\t\tif ( key === undefined ) return; // no data\n\n\t\tlet value = key[ valuePropertyName ];\n\t\tif ( value === undefined ) return; // no data\n\n\t\tif ( Array.isArray( value ) ) {\n\n\t\t\tdo {\n\n\t\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\ttimes.push( key.time );\n\t\t\t\t\tvalues.push.apply( values, value ); // push all elements\n\n\t\t\t\t}\n\n\t\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t\t} while ( key !== undefined );\n\n\t\t} else if ( value.toArray !== undefined ) {\n\n\t\t\t// ...assume THREE.Math-ish\n\n\t\t\tdo {\n\n\t\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\ttimes.push( key.time );\n\t\t\t\t\tvalue.toArray( values, values.length );\n\n\t\t\t\t}\n\n\t\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t\t} while ( key !== undefined );\n\n\t\t} else {\n\n\t\t\t// otherwise push as-is\n\n\t\t\tdo {\n\n\t\t\t\tvalue = key[ valuePropertyName ];\n\n\t\t\t\tif ( value !== undefined ) {\n\n\t\t\t\t\ttimes.push( key.time );\n\t\t\t\t\tvalues.push( value );\n\n\t\t\t\t}\n\n\t\t\t\tkey = jsonKeys[ i ++ ];\n\n\t\t\t} while ( key !== undefined );\n\n\t\t}\n\n\t},\n\n\tsubclip: function ( sourceClip, name, startFrame, endFrame, fps = 30 ) {\n\n\t\tconst clip = sourceClip.clone();\n\n\t\tclip.name = name;\n\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\t\tconst track = clip.tracks[ i ];\n\t\t\tconst valueSize = track.getValueSize();\n\n\t\t\tconst times = [];\n\t\t\tconst values = [];\n\n\t\t\tfor ( let j = 0; j < track.times.length; ++ j ) {\n\n\t\t\t\tconst frame = track.times[ j ] * fps;\n\n\t\t\t\tif ( frame < startFrame || frame >= endFrame ) continue;\n\n\t\t\t\ttimes.push( track.times[ j ] );\n\n\t\t\t\tfor ( let k = 0; k < valueSize; ++ k ) {\n\n\t\t\t\t\tvalues.push( track.values[ j * valueSize + k ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( times.length === 0 ) continue;\n\n\t\t\ttrack.times = AnimationUtils.convertArray( times, track.times.constructor );\n\t\t\ttrack.values = AnimationUtils.convertArray( values, track.values.constructor );\n\n\t\t\ttracks.push( track );\n\n\t\t}\n\n\t\tclip.tracks = tracks;\n\n\t\t// find minimum .times value across all tracks in the trimmed clip\n\n\t\tlet minStartTime = Infinity;\n\n\t\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\t\tif ( minStartTime > clip.tracks[ i ].times[ 0 ] ) {\n\n\t\t\t\tminStartTime = clip.tracks[ i ].times[ 0 ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// shift all tracks such that clip begins at t=0\n\n\t\tfor ( let i = 0; i < clip.tracks.length; ++ i ) {\n\n\t\t\tclip.tracks[ i ].shift( - 1 * minStartTime );\n\n\t\t}\n\n\t\tclip.resetDuration();\n\n\t\treturn clip;\n\n\t},\n\n\tmakeClipAdditive: function ( targetClip, referenceFrame = 0, referenceClip = targetClip, fps = 30 ) {\n\n\t\tif ( fps <= 0 ) fps = 30;\n\n\t\tconst numTracks = referenceClip.tracks.length;\n\t\tconst referenceTime = referenceFrame / fps;\n\n\t\t// Make each track's values relative to the values at the reference frame\n\t\tfor ( let i = 0; i < numTracks; ++ i ) {\n\n\t\t\tconst referenceTrack = referenceClip.tracks[ i ];\n\t\t\tconst referenceTrackType = referenceTrack.ValueTypeName;\n\n\t\t\t// Skip this track if it's non-numeric\n\t\t\tif ( referenceTrackType === 'bool' || referenceTrackType === 'string' ) continue;\n\n\t\t\t// Find the track in the target clip whose name and type matches the reference track\n\t\t\tconst targetTrack = targetClip.tracks.find( function ( track ) {\n\n\t\t\t\treturn track.name === referenceTrack.name\n\t\t\t\t\t&& track.ValueTypeName === referenceTrackType;\n\n\t\t\t} );\n\n\t\t\tif ( targetTrack === undefined ) continue;\n\n\t\t\tlet referenceOffset = 0;\n\t\t\tconst referenceValueSize = referenceTrack.getValueSize();\n\n\t\t\tif ( referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\t\treferenceOffset = referenceValueSize / 3;\n\n\t\t\t}\n\n\t\t\tlet targetOffset = 0;\n\t\t\tconst targetValueSize = targetTrack.getValueSize();\n\n\t\t\tif ( targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline ) {\n\n\t\t\t\ttargetOffset = targetValueSize / 3;\n\n\t\t\t}\n\n\t\t\tconst lastIndex = referenceTrack.times.length - 1;\n\t\t\tlet referenceValue;\n\n\t\t\t// Find the value to subtract out of the track\n\t\t\tif ( referenceTime <= referenceTrack.times[ 0 ] ) {\n\n\t\t\t\t// Reference frame is earlier than the first keyframe, so just use the first keyframe\n\t\t\t\tconst startIndex = referenceOffset;\n\t\t\t\tconst endIndex = referenceValueSize - referenceOffset;\n\t\t\t\treferenceValue = AnimationUtils.arraySlice( referenceTrack.values, startIndex, endIndex );\n\n\t\t\t} else if ( referenceTime >= referenceTrack.times[ lastIndex ] ) {\n\n\t\t\t\t// Reference frame is after the last keyframe, so just use the last keyframe\n\t\t\t\tconst startIndex = lastIndex * referenceValueSize + referenceOffset;\n\t\t\t\tconst endIndex = startIndex + referenceValueSize - referenceOffset;\n\t\t\t\treferenceValue = AnimationUtils.arraySlice( referenceTrack.values, startIndex, endIndex );\n\n\t\t\t} else {\n\n\t\t\t\t// Interpolate to the reference value\n\t\t\t\tconst interpolant = referenceTrack.createInterpolant();\n\t\t\t\tconst startIndex = referenceOffset;\n\t\t\t\tconst endIndex = referenceValueSize - referenceOffset;\n\t\t\t\tinterpolant.evaluate( referenceTime );\n\t\t\t\treferenceValue = AnimationUtils.arraySlice( interpolant.resultBuffer, startIndex, endIndex );\n\n\t\t\t}\n\n\t\t\t// Conjugate the quaternion\n\t\t\tif ( referenceTrackType === 'quaternion' ) {\n\n\t\t\t\tconst referenceQuat = new Quaternion().fromArray( referenceValue ).normalize().conjugate();\n\t\t\t\treferenceQuat.toArray( referenceValue );\n\n\t\t\t}\n\n\t\t\t// Subtract the reference value from all of the track values\n\n\t\t\tconst numTimes = targetTrack.times.length;\n\t\t\tfor ( let j = 0; j < numTimes; ++ j ) {\n\n\t\t\t\tconst valueStart = j * targetValueSize + targetOffset;\n\n\t\t\t\tif ( referenceTrackType === 'quaternion' ) {\n\n\t\t\t\t\t// Multiply the conjugate for quaternion track types\n\t\t\t\t\tQuaternion.multiplyQuaternionsFlat(\n\t\t\t\t\t\ttargetTrack.values,\n\t\t\t\t\t\tvalueStart,\n\t\t\t\t\t\treferenceValue,\n\t\t\t\t\t\t0,\n\t\t\t\t\t\ttargetTrack.values,\n\t\t\t\t\t\tvalueStart\n\t\t\t\t\t);\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconst valueEnd = targetValueSize - targetOffset * 2;\n\n\t\t\t\t\t// Subtract each value for all other numeric track types\n\t\t\t\t\tfor ( let k = 0; k < valueEnd; ++ k ) {\n\n\t\t\t\t\t\ttargetTrack.values[ valueStart + k ] -= referenceValue[ k ];\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\ttargetClip.blendMode = AdditiveAnimationBlendMode;\n\n\t\treturn targetClip;\n\n\t}\n\n};\n\n/**\n * Abstract base class of interpolants over parametric samples.\n *\n * The parameter domain is one dimensional, typically the time or a path\n * along a curve defined by the data.\n *\n * The sample values can have any dimensionality and derived classes may\n * apply special interpretations to the data.\n *\n * This class provides the interval seek in a Template Method, deferring\n * the actual interpolation to derived classes.\n *\n * Time complexity is O(1) for linear access crossing at most two points\n * and O(log N) for random access, where N is the number of positions.\n *\n * References:\n *\n * \t\thttp://www.oodesign.com/template-method-pattern.html\n *\n */\n\nclass Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tthis.parameterPositions = parameterPositions;\n\t\tthis._cachedIndex = 0;\n\n\t\tthis.resultBuffer = resultBuffer !== undefined ?\n\t\t\tresultBuffer : new sampleValues.constructor( sampleSize );\n\t\tthis.sampleValues = sampleValues;\n\t\tthis.valueSize = sampleSize;\n\n\t\tthis.settings = null;\n\t\tthis.DefaultSettings_ = {};\n\n\t}\n\n\tevaluate( t ) {\n\n\t\tconst pp = this.parameterPositions;\n\t\tlet i1 = this._cachedIndex,\n\t\t\tt1 = pp[ i1 ],\n\t\t\tt0 = pp[ i1 - 1 ];\n\n\t\tvalidate_interval: {\n\n\t\t\tseek: {\n\n\t\t\t\tlet right;\n\n\t\t\t\tlinear_scan: {\n\n\t\t\t\t\t//- See http://jsperf.com/comparison-to-undefined/3\n\t\t\t\t\t//- slower code:\n\t\t\t\t\t//-\n\t\t\t\t\t//- \t\t\t\tif ( t >= t1 || t1 === undefined ) {\n\t\t\t\t\tforward_scan: if ( ! ( t < t1 ) ) {\n\n\t\t\t\t\t\tfor ( let giveUpAt = i1 + 2; ; ) {\n\n\t\t\t\t\t\t\tif ( t1 === undefined ) {\n\n\t\t\t\t\t\t\t\tif ( t < t0 ) break forward_scan;\n\n\t\t\t\t\t\t\t\t// after end\n\n\t\t\t\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\t\t\t\treturn this.afterEnd_( i1 - 1, t, t0 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( i1 === giveUpAt ) break; // this loop\n\n\t\t\t\t\t\t\tt0 = t1;\n\t\t\t\t\t\t\tt1 = pp[ ++ i1 ];\n\n\t\t\t\t\t\t\tif ( t < t1 ) {\n\n\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\tbreak seek;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// prepare binary search on the right side of the index\n\t\t\t\t\t\tright = pp.length;\n\t\t\t\t\t\tbreak linear_scan;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//- slower code:\n\t\t\t\t\t//-\t\t\t\t\tif ( t < t0 || t0 === undefined ) {\n\t\t\t\t\tif ( ! ( t >= t0 ) ) {\n\n\t\t\t\t\t\t// looping?\n\n\t\t\t\t\t\tconst t1global = pp[ 1 ];\n\n\t\t\t\t\t\tif ( t < t1global ) {\n\n\t\t\t\t\t\t\ti1 = 2; // + 1, using the scan for the details\n\t\t\t\t\t\t\tt0 = t1global;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// linear reverse scan\n\n\t\t\t\t\t\tfor ( let giveUpAt = i1 - 2; ; ) {\n\n\t\t\t\t\t\t\tif ( t0 === undefined ) {\n\n\t\t\t\t\t\t\t\t// before start\n\n\t\t\t\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\t\t\t\treturn this.beforeStart_( 0, t, t1 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( i1 === giveUpAt ) break; // this loop\n\n\t\t\t\t\t\t\tt1 = t0;\n\t\t\t\t\t\t\tt0 = pp[ -- i1 - 1 ];\n\n\t\t\t\t\t\t\tif ( t >= t0 ) {\n\n\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\tbreak seek;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// prepare binary search on the left side of the index\n\t\t\t\t\t\tright = i1;\n\t\t\t\t\t\ti1 = 0;\n\t\t\t\t\t\tbreak linear_scan;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// the interval is valid\n\n\t\t\t\t\tbreak validate_interval;\n\n\t\t\t\t} // linear scan\n\n\t\t\t\t// binary search\n\n\t\t\t\twhile ( i1 < right ) {\n\n\t\t\t\t\tconst mid = ( i1 + right ) >>> 1;\n\n\t\t\t\t\tif ( t < pp[ mid ] ) {\n\n\t\t\t\t\t\tright = mid;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ti1 = mid + 1;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tt1 = pp[ i1 ];\n\t\t\t\tt0 = pp[ i1 - 1 ];\n\n\t\t\t\t// check boundary cases, again\n\n\t\t\t\tif ( t0 === undefined ) {\n\n\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\treturn this.beforeStart_( 0, t, t1 );\n\n\t\t\t\t}\n\n\t\t\t\tif ( t1 === undefined ) {\n\n\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\treturn this.afterEnd_( i1 - 1, t0, t );\n\n\t\t\t\t}\n\n\t\t\t} // seek\n\n\t\t\tthis._cachedIndex = i1;\n\n\t\t\tthis.intervalChanged_( i1, t0, t1 );\n\n\t\t} // validate_interval\n\n\t\treturn this.interpolate_( i1, t0, t, t1 );\n\n\t}\n\n\tgetSettings_() {\n\n\t\treturn this.settings || this.DefaultSettings_;\n\n\t}\n\n\tcopySampleValue_( index ) {\n\n\t\t// copies a sample value to the result buffer\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = index * stride;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] = values[ offset + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n\t// Template methods for derived classes:\n\n\tinterpolate_( /* i1, t0, t, t1 */ ) {\n\n\t\tthrow new Error( 'call to abstract method' );\n\t\t// implementations shall return this.resultBuffer\n\n\t}\n\n\tintervalChanged_( /* i1, t0, t1 */ ) {\n\n\t\t// empty\n\n\t}\n\n}\n\n// ALIAS DEFINITIONS\n\nInterpolant.prototype.beforeStart_ = Interpolant.prototype.copySampleValue_;\nInterpolant.prototype.afterEnd_ = Interpolant.prototype.copySampleValue_;\n\n/**\n * Fast and simple cubic spline interpolant.\n *\n * It was derived from a Hermitian construction setting the first derivative\n * at each sample position to the linear slope between neighboring positions\n * over their parameter interval.\n */\n\nclass CubicInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t\tthis._weightPrev = - 0;\n\t\tthis._offsetPrev = - 0;\n\t\tthis._weightNext = - 0;\n\t\tthis._offsetNext = - 0;\n\n\t\tthis.DefaultSettings_ = {\n\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\n\t\t};\n\n\t}\n\n\tintervalChanged_( i1, t0, t1 ) {\n\n\t\tconst pp = this.parameterPositions;\n\t\tlet iPrev = i1 - 2,\n\t\t\tiNext = i1 + 1,\n\n\t\t\ttPrev = pp[ iPrev ],\n\t\t\ttNext = pp[ iNext ];\n\n\t\tif ( tPrev === undefined ) {\n\n\t\t\tswitch ( this.getSettings_().endingStart ) {\n\n\t\t\t\tcase ZeroSlopeEnding:\n\n\t\t\t\t\t// f'(t0) = 0\n\t\t\t\t\tiPrev = i1;\n\t\t\t\t\ttPrev = 2 * t0 - t1;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase WrapAroundEnding:\n\n\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\tiPrev = pp.length - 2;\n\t\t\t\t\ttPrev = t0 + pp[ iPrev ] - pp[ iPrev + 1 ];\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // ZeroCurvatureEnding\n\n\t\t\t\t\t// f''(t0) = 0 a.k.a. Natural Spline\n\t\t\t\t\tiPrev = i1;\n\t\t\t\t\ttPrev = t1;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( tNext === undefined ) {\n\n\t\t\tswitch ( this.getSettings_().endingEnd ) {\n\n\t\t\t\tcase ZeroSlopeEnding:\n\n\t\t\t\t\t// f'(tN) = 0\n\t\t\t\t\tiNext = i1;\n\t\t\t\t\ttNext = 2 * t1 - t0;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase WrapAroundEnding:\n\n\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\tiNext = 1;\n\t\t\t\t\ttNext = t1 + pp[ 1 ] - pp[ 0 ];\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // ZeroCurvatureEnding\n\n\t\t\t\t\t// f''(tN) = 0, a.k.a. Natural Spline\n\t\t\t\t\tiNext = i1 - 1;\n\t\t\t\t\ttNext = t0;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst halfDt = ( t1 - t0 ) * 0.5,\n\t\t\tstride = this.valueSize;\n\n\t\tthis._weightPrev = halfDt / ( t0 - tPrev );\n\t\tthis._weightNext = halfDt / ( tNext - t1 );\n\t\tthis._offsetPrev = iPrev * stride;\n\t\tthis._offsetNext = iNext * stride;\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\to1 = i1 * stride,\t\to0 = o1 - stride,\n\t\t\toP = this._offsetPrev, \toN = this._offsetNext,\n\t\t\twP = this._weightPrev,\twN = this._weightNext,\n\n\t\t\tp = ( t - t0 ) / ( t1 - t0 ),\n\t\t\tpp = p * p,\n\t\t\tppp = pp * p;\n\n\t\t// evaluate polynomials\n\n\t\tconst sP = - wP * ppp + 2 * wP * pp - wP * p;\n\t\tconst s0 = ( 1 + wP ) * ppp + ( - 1.5 - 2 * wP ) * pp + ( - 0.5 + wP ) * p + 1;\n\t\tconst s1 = ( - 1 - wN ) * ppp + ( 1.5 + wN ) * pp + 0.5 * p;\n\t\tconst sN = wN * ppp - wN * pp;\n\n\t\t// combine data linearly\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] =\n\t\t\t\t\tsP * values[ oP + i ] +\n\t\t\t\t\ts0 * values[ o0 + i ] +\n\t\t\t\t\ts1 * values[ o1 + i ] +\n\t\t\t\t\tsN * values[ oN + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\nclass LinearInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\toffset1 = i1 * stride,\n\t\t\toffset0 = offset1 - stride,\n\n\t\t\tweight1 = ( t - t0 ) / ( t1 - t0 ),\n\t\t\tweight0 = 1 - weight1;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tresult[ i ] =\n\t\t\t\t\tvalues[ offset0 + i ] * weight0 +\n\t\t\t\t\tvalues[ offset1 + i ] * weight1;\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\n/**\n *\n * Interpolant that evaluates to the sample value at the position preceeding\n * the parameter.\n */\n\nclass DiscreteInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1 /*, t0, t, t1 */ ) {\n\n\t\treturn this.copySampleValue_( i1 - 1 );\n\n\t}\n\n}\n\nclass KeyframeTrack {\n\n\tconstructor( name, times, values, interpolation ) {\n\n\t\tif ( name === undefined ) throw new Error( 'THREE.KeyframeTrack: track name is undefined' );\n\t\tif ( times === undefined || times.length === 0 ) throw new Error( 'THREE.KeyframeTrack: no keyframes in track named ' + name );\n\n\t\tthis.name = name;\n\n\t\tthis.times = AnimationUtils.convertArray( times, this.TimeBufferType );\n\t\tthis.values = AnimationUtils.convertArray( values, this.ValueBufferType );\n\n\t\tthis.setInterpolation( interpolation || this.DefaultInterpolation );\n\n\t}\n\n\t// Serialization (in static context, because of constructor invocation\n\t// and automatic invocation of .toJSON):\n\n\tstatic toJSON( track ) {\n\n\t\tconst trackType = track.constructor;\n\n\t\tlet json;\n\n\t\t// derived classes can define a static toJSON method\n\t\tif ( trackType.toJSON !== this.toJSON ) {\n\n\t\t\tjson = trackType.toJSON( track );\n\n\t\t} else {\n\n\t\t\t// by default, we assume the data can be serialized as-is\n\t\t\tjson = {\n\n\t\t\t\t'name': track.name,\n\t\t\t\t'times': AnimationUtils.convertArray( track.times, Array ),\n\t\t\t\t'values': AnimationUtils.convertArray( track.values, Array )\n\n\t\t\t};\n\n\t\t\tconst interpolation = track.getInterpolation();\n\n\t\t\tif ( interpolation !== track.DefaultInterpolation ) {\n\n\t\t\t\tjson.interpolation = interpolation;\n\n\t\t\t}\n\n\t\t}\n\n\t\tjson.type = track.ValueTypeName; // mandatory\n\n\t\treturn json;\n\n\t}\n\n\tInterpolantFactoryMethodDiscrete( result ) {\n\n\t\treturn new DiscreteInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tInterpolantFactoryMethodLinear( result ) {\n\n\t\treturn new LinearInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tInterpolantFactoryMethodSmooth( result ) {\n\n\t\treturn new CubicInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n\tsetInterpolation( interpolation ) {\n\n\t\tlet factoryMethod;\n\n\t\tswitch ( interpolation ) {\n\n\t\t\tcase InterpolateDiscrete:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodDiscrete;\n\n\t\t\t\tbreak;\n\n\t\t\tcase InterpolateLinear:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodLinear;\n\n\t\t\t\tbreak;\n\n\t\t\tcase InterpolateSmooth:\n\n\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodSmooth;\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tif ( factoryMethod === undefined ) {\n\n\t\t\tconst message = 'unsupported interpolation for ' +\n\t\t\t\tthis.ValueTypeName + ' keyframe track named ' + this.name;\n\n\t\t\tif ( this.createInterpolant === undefined ) {\n\n\t\t\t\t// fall back to default, unless the default itself is messed up\n\t\t\t\tif ( interpolation !== this.DefaultInterpolation ) {\n\n\t\t\t\t\tthis.setInterpolation( this.DefaultInterpolation );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( message ); // fatal, in this case\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconsole.warn( 'THREE.KeyframeTrack:', message );\n\t\t\treturn this;\n\n\t\t}\n\n\t\tthis.createInterpolant = factoryMethod;\n\n\t\treturn this;\n\n\t}\n\n\tgetInterpolation() {\n\n\t\tswitch ( this.createInterpolant ) {\n\n\t\t\tcase this.InterpolantFactoryMethodDiscrete:\n\n\t\t\t\treturn InterpolateDiscrete;\n\n\t\t\tcase this.InterpolantFactoryMethodLinear:\n\n\t\t\t\treturn InterpolateLinear;\n\n\t\t\tcase this.InterpolantFactoryMethodSmooth:\n\n\t\t\t\treturn InterpolateSmooth;\n\n\t\t}\n\n\t}\n\n\tgetValueSize() {\n\n\t\treturn this.values.length / this.times.length;\n\n\t}\n\n\t// move all keyframes either forwards or backwards in time\n\tshift( timeOffset ) {\n\n\t\tif ( timeOffset !== 0.0 ) {\n\n\t\t\tconst times = this.times;\n\n\t\t\tfor ( let i = 0, n = times.length; i !== n; ++ i ) {\n\n\t\t\t\ttimes[ i ] += timeOffset;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// scale all keyframe times by a factor (useful for frame <-> seconds conversions)\n\tscale( timeScale ) {\n\n\t\tif ( timeScale !== 1.0 ) {\n\n\t\t\tconst times = this.times;\n\n\t\t\tfor ( let i = 0, n = times.length; i !== n; ++ i ) {\n\n\t\t\t\ttimes[ i ] *= timeScale;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// removes keyframes before and after animation without changing any values within the range [startTime, endTime].\n\t// IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values\n\ttrim( startTime, endTime ) {\n\n\t\tconst times = this.times,\n\t\t\tnKeys = times.length;\n\n\t\tlet from = 0,\n\t\t\tto = nKeys - 1;\n\n\t\twhile ( from !== nKeys && times[ from ] < startTime ) {\n\n\t\t\t++ from;\n\n\t\t}\n\n\t\twhile ( to !== - 1 && times[ to ] > endTime ) {\n\n\t\t\t-- to;\n\n\t\t}\n\n\t\t++ to; // inclusive -> exclusive bound\n\n\t\tif ( from !== 0 || to !== nKeys ) {\n\n\t\t\t// empty tracks are forbidden, so keep at least one keyframe\n\t\t\tif ( from >= to ) {\n\n\t\t\t\tto = Math.max( to, 1 );\n\t\t\t\tfrom = to - 1;\n\n\t\t\t}\n\n\t\t\tconst stride = this.getValueSize();\n\t\t\tthis.times = AnimationUtils.arraySlice( times, from, to );\n\t\t\tthis.values = AnimationUtils.arraySlice( this.values, from * stride, to * stride );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable\n\tvalidate() {\n\n\t\tlet valid = true;\n\n\t\tconst valueSize = this.getValueSize();\n\t\tif ( valueSize - Math.floor( valueSize ) !== 0 ) {\n\n\t\t\tconsole.error( 'THREE.KeyframeTrack: Invalid value size in track.', this );\n\t\t\tvalid = false;\n\n\t\t}\n\n\t\tconst times = this.times,\n\t\t\tvalues = this.values,\n\n\t\t\tnKeys = times.length;\n\n\t\tif ( nKeys === 0 ) {\n\n\t\t\tconsole.error( 'THREE.KeyframeTrack: Track is empty.', this );\n\t\t\tvalid = false;\n\n\t\t}\n\n\t\tlet prevTime = null;\n\n\t\tfor ( let i = 0; i !== nKeys; i ++ ) {\n\n\t\t\tconst currTime = times[ i ];\n\n\t\t\tif ( typeof currTime === 'number' && isNaN( currTime ) ) {\n\n\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime );\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif ( prevTime !== null && prevTime > currTime ) {\n\n\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime );\n\t\t\t\tvalid = false;\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tprevTime = currTime;\n\n\t\t}\n\n\t\tif ( values !== undefined ) {\n\n\t\t\tif ( AnimationUtils.isTypedArray( values ) ) {\n\n\t\t\t\tfor ( let i = 0, n = values.length; i !== n; ++ i ) {\n\n\t\t\t\t\tconst value = values[ i ];\n\n\t\t\t\t\tif ( isNaN( value ) ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.KeyframeTrack: Value is not a valid number.', this, i, value );\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn valid;\n\n\t}\n\n\t// removes equivalent sequential keys as common in morph target sequences\n\t// (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)\n\toptimize() {\n\n\t\t// times or values may be shared with other tracks, so overwriting is unsafe\n\t\tconst times = AnimationUtils.arraySlice( this.times ),\n\t\t\tvalues = AnimationUtils.arraySlice( this.values ),\n\t\t\tstride = this.getValueSize(),\n\n\t\t\tsmoothInterpolation = this.getInterpolation() === InterpolateSmooth,\n\n\t\t\tlastIndex = times.length - 1;\n\n\t\tlet writeIndex = 1;\n\n\t\tfor ( let i = 1; i < lastIndex; ++ i ) {\n\n\t\t\tlet keep = false;\n\n\t\t\tconst time = times[ i ];\n\t\t\tconst timeNext = times[ i + 1 ];\n\n\t\t\t// remove adjacent keyframes scheduled at the same time\n\n\t\t\tif ( time !== timeNext && ( i !== 1 || time !== times[ 0 ] ) ) {\n\n\t\t\t\tif ( ! smoothInterpolation ) {\n\n\t\t\t\t\t// remove unnecessary keyframes same as their neighbors\n\n\t\t\t\t\tconst offset = i * stride,\n\t\t\t\t\t\toffsetP = offset - stride,\n\t\t\t\t\t\toffsetN = offset + stride;\n\n\t\t\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\t\t\tconst value = values[ offset + j ];\n\n\t\t\t\t\t\tif ( value !== values[ offsetP + j ] ||\n\t\t\t\t\t\t\tvalue !== values[ offsetN + j ] ) {\n\n\t\t\t\t\t\t\tkeep = true;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tkeep = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// in-place compaction\n\n\t\t\tif ( keep ) {\n\n\t\t\t\tif ( i !== writeIndex ) {\n\n\t\t\t\t\ttimes[ writeIndex ] = times[ i ];\n\n\t\t\t\t\tconst readOffset = i * stride,\n\t\t\t\t\t\twriteOffset = writeIndex * stride;\n\n\t\t\t\t\tfor ( let j = 0; j !== stride; ++ j ) {\n\n\t\t\t\t\t\tvalues[ writeOffset + j ] = values[ readOffset + j ];\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t++ writeIndex;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// flush last keyframe (compaction looks ahead)\n\n\t\tif ( lastIndex > 0 ) {\n\n\t\t\ttimes[ writeIndex ] = times[ lastIndex ];\n\n\t\t\tfor ( let readOffset = lastIndex * stride, writeOffset = writeIndex * stride, j = 0; j !== stride; ++ j ) {\n\n\t\t\t\tvalues[ writeOffset + j ] = values[ readOffset + j ];\n\n\t\t\t}\n\n\t\t\t++ writeIndex;\n\n\t\t}\n\n\t\tif ( writeIndex !== times.length ) {\n\n\t\t\tthis.times = AnimationUtils.arraySlice( times, 0, writeIndex );\n\t\t\tthis.values = AnimationUtils.arraySlice( values, 0, writeIndex * stride );\n\n\t\t} else {\n\n\t\t\tthis.times = times;\n\t\t\tthis.values = values;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\tconst times = AnimationUtils.arraySlice( this.times, 0 );\n\t\tconst values = AnimationUtils.arraySlice( this.values, 0 );\n\n\t\tconst TypedKeyframeTrack = this.constructor;\n\t\tconst track = new TypedKeyframeTrack( this.name, times, values );\n\n\t\t// Interpolant argument to constructor is not saved, so copy the factory method directly.\n\t\ttrack.createInterpolant = this.createInterpolant;\n\n\t\treturn track;\n\n\t}\n\n}\n\nKeyframeTrack.prototype.TimeBufferType = Float32Array;\nKeyframeTrack.prototype.ValueBufferType = Float32Array;\nKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;\n\n/**\n * A Track of Boolean keyframe values.\n */\nclass BooleanKeyframeTrack extends KeyframeTrack {}\n\nBooleanKeyframeTrack.prototype.ValueTypeName = 'bool';\nBooleanKeyframeTrack.prototype.ValueBufferType = Array;\nBooleanKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;\nBooleanKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;\nBooleanKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track of keyframe values that represent color.\n */\nclass ColorKeyframeTrack extends KeyframeTrack {}\n\nColorKeyframeTrack.prototype.ValueTypeName = 'color';\n\n/**\n * A Track of numeric keyframe values.\n */\nclass NumberKeyframeTrack extends KeyframeTrack {}\n\nNumberKeyframeTrack.prototype.ValueTypeName = 'number';\n\n/**\n * Spherical linear unit quaternion interpolant.\n */\n\nclass QuaternionLinearInterpolant extends Interpolant {\n\n\tconstructor( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tsuper( parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tinterpolate_( i1, t0, t, t1 ) {\n\n\t\tconst result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tstride = this.valueSize,\n\n\t\t\talpha = ( t - t0 ) / ( t1 - t0 );\n\n\t\tlet offset = i1 * stride;\n\n\t\tfor ( let end = offset + stride; offset !== end; offset += 4 ) {\n\n\t\t\tQuaternion.slerpFlat( result, 0, values, offset - stride, values, offset, alpha );\n\n\t\t}\n\n\t\treturn result;\n\n\t}\n\n}\n\n/**\n * A Track of quaternion keyframe values.\n */\nclass QuaternionKeyframeTrack extends KeyframeTrack {\n\n\tInterpolantFactoryMethodLinear( result ) {\n\n\t\treturn new QuaternionLinearInterpolant( this.times, this.values, this.getValueSize(), result );\n\n\t}\n\n}\n\nQuaternionKeyframeTrack.prototype.ValueTypeName = 'quaternion';\n// ValueBufferType is inherited\nQuaternionKeyframeTrack.prototype.DefaultInterpolation = InterpolateLinear;\nQuaternionKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track that interpolates Strings\n */\nclass StringKeyframeTrack extends KeyframeTrack {}\n\nStringKeyframeTrack.prototype.ValueTypeName = 'string';\nStringKeyframeTrack.prototype.ValueBufferType = Array;\nStringKeyframeTrack.prototype.DefaultInterpolation = InterpolateDiscrete;\nStringKeyframeTrack.prototype.InterpolantFactoryMethodLinear = undefined;\nStringKeyframeTrack.prototype.InterpolantFactoryMethodSmooth = undefined;\n\n/**\n * A Track of vectored keyframe values.\n */\nclass VectorKeyframeTrack extends KeyframeTrack {}\n\nVectorKeyframeTrack.prototype.ValueTypeName = 'vector';\n\nclass AnimationClip {\n\n\tconstructor( name, duration = - 1, tracks, blendMode = NormalAnimationBlendMode ) {\n\n\t\tthis.name = name;\n\t\tthis.tracks = tracks;\n\t\tthis.duration = duration;\n\t\tthis.blendMode = blendMode;\n\n\t\tthis.uuid = generateUUID();\n\n\t\t// this means it should figure out its duration by scanning the tracks\n\t\tif ( this.duration < 0 ) {\n\n\t\t\tthis.resetDuration();\n\n\t\t}\n\n\t}\n\n\n\tstatic parse( json ) {\n\n\t\tconst tracks = [],\n\t\t\tjsonTracks = json.tracks,\n\t\t\tframeTime = 1.0 / ( json.fps || 1.0 );\n\n\t\tfor ( let i = 0, n = jsonTracks.length; i !== n; ++ i ) {\n\n\t\t\ttracks.push( parseKeyframeTrack( jsonTracks[ i ] ).scale( frameTime ) );\n\n\t\t}\n\n\t\tconst clip = new this( json.name, json.duration, tracks, json.blendMode );\n\t\tclip.uuid = json.uuid;\n\n\t\treturn clip;\n\n\t}\n\n\tstatic toJSON( clip ) {\n\n\t\tconst tracks = [],\n\t\t\tclipTracks = clip.tracks;\n\n\t\tconst json = {\n\n\t\t\t'name': clip.name,\n\t\t\t'duration': clip.duration,\n\t\t\t'tracks': tracks,\n\t\t\t'uuid': clip.uuid,\n\t\t\t'blendMode': clip.blendMode\n\n\t\t};\n\n\t\tfor ( let i = 0, n = clipTracks.length; i !== n; ++ i ) {\n\n\t\t\ttracks.push( KeyframeTrack.toJSON( clipTracks[ i ] ) );\n\n\t\t}\n\n\t\treturn json;\n\n\t}\n\n\tstatic CreateFromMorphTargetSequence( name, morphTargetSequence, fps, noLoop ) {\n\n\t\tconst numMorphTargets = morphTargetSequence.length;\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < numMorphTargets; i ++ ) {\n\n\t\t\tlet times = [];\n\t\t\tlet values = [];\n\n\t\t\ttimes.push(\n\t\t\t\t( i + numMorphTargets - 1 ) % numMorphTargets,\n\t\t\t\ti,\n\t\t\t\t( i + 1 ) % numMorphTargets );\n\n\t\t\tvalues.push( 0, 1, 0 );\n\n\t\t\tconst order = AnimationUtils.getKeyframeOrder( times );\n\t\t\ttimes = AnimationUtils.sortedArray( times, 1, order );\n\t\t\tvalues = AnimationUtils.sortedArray( values, 1, order );\n\n\t\t\t// if there is a key at the first frame, duplicate it as the\n\t\t\t// last frame as well for perfect loop.\n\t\t\tif ( ! noLoop && times[ 0 ] === 0 ) {\n\n\t\t\t\ttimes.push( numMorphTargets );\n\t\t\t\tvalues.push( values[ 0 ] );\n\n\t\t\t}\n\n\t\t\ttracks.push(\n\t\t\t\tnew NumberKeyframeTrack(\n\t\t\t\t\t'.morphTargetInfluences[' + morphTargetSequence[ i ].name + ']',\n\t\t\t\t\ttimes, values\n\t\t\t\t).scale( 1.0 / fps ) );\n\n\t\t}\n\n\t\treturn new this( name, - 1, tracks );\n\n\t}\n\n\tstatic findByName( objectOrClipArray, name ) {\n\n\t\tlet clipArray = objectOrClipArray;\n\n\t\tif ( ! Array.isArray( objectOrClipArray ) ) {\n\n\t\t\tconst o = objectOrClipArray;\n\t\t\tclipArray = o.geometry && o.geometry.animations || o.animations;\n\n\t\t}\n\n\t\tfor ( let i = 0; i < clipArray.length; i ++ ) {\n\n\t\t\tif ( clipArray[ i ].name === name ) {\n\n\t\t\t\treturn clipArray[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\tstatic CreateClipsFromMorphTargetSequences( morphTargets, fps, noLoop ) {\n\n\t\tconst animationToMorphTargets = {};\n\n\t\t// tested with https://regex101.com/ on trick sequences\n\t\t// such flamingo_flyA_003, flamingo_run1_003, crdeath0059\n\t\tconst pattern = /^([\\w-]*?)([\\d]+)$/;\n\n\t\t// sort morph target names into animation groups based\n\t\t// patterns like Walk_001, Walk_002, Run_001, Run_002\n\t\tfor ( let i = 0, il = morphTargets.length; i < il; i ++ ) {\n\n\t\t\tconst morphTarget = morphTargets[ i ];\n\t\t\tconst parts = morphTarget.name.match( pattern );\n\n\t\t\tif ( parts && parts.length > 1 ) {\n\n\t\t\t\tconst name = parts[ 1 ];\n\n\t\t\t\tlet animationMorphTargets = animationToMorphTargets[ name ];\n\n\t\t\t\tif ( ! animationMorphTargets ) {\n\n\t\t\t\t\tanimationToMorphTargets[ name ] = animationMorphTargets = [];\n\n\t\t\t\t}\n\n\t\t\t\tanimationMorphTargets.push( morphTarget );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst clips = [];\n\n\t\tfor ( const name in animationToMorphTargets ) {\n\n\t\t\tclips.push( this.CreateFromMorphTargetSequence( name, animationToMorphTargets[ name ], fps, noLoop ) );\n\n\t\t}\n\n\t\treturn clips;\n\n\t}\n\n\t// parse the animation.hierarchy format\n\tstatic parseAnimation( animation, bones ) {\n\n\t\tif ( ! animation ) {\n\n\t\t\tconsole.error( 'THREE.AnimationClip: No animation in JSONLoader data.' );\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst addNonemptyTrack = function ( trackType, trackName, animationKeys, propertyName, destTracks ) {\n\n\t\t\t// only return track if there are actually keys.\n\t\t\tif ( animationKeys.length !== 0 ) {\n\n\t\t\t\tconst times = [];\n\t\t\t\tconst values = [];\n\n\t\t\t\tAnimationUtils.flattenJSON( animationKeys, times, values, propertyName );\n\n\t\t\t\t// empty keys are filtered out, so check again\n\t\t\t\tif ( times.length !== 0 ) {\n\n\t\t\t\t\tdestTracks.push( new trackType( trackName, times, values ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tconst tracks = [];\n\n\t\tconst clipName = animation.name || 'default';\n\t\tconst fps = animation.fps || 30;\n\t\tconst blendMode = animation.blendMode;\n\n\t\t// automatic length determination in AnimationClip.\n\t\tlet duration = animation.length || - 1;\n\n\t\tconst hierarchyTracks = animation.hierarchy || [];\n\n\t\tfor ( let h = 0; h < hierarchyTracks.length; h ++ ) {\n\n\t\t\tconst animationKeys = hierarchyTracks[ h ].keys;\n\n\t\t\t// skip empty tracks\n\t\t\tif ( ! animationKeys || animationKeys.length === 0 ) continue;\n\n\t\t\t// process morph targets\n\t\t\tif ( animationKeys[ 0 ].morphTargets ) {\n\n\t\t\t\t// figure out all morph targets used in this track\n\t\t\t\tconst morphTargetNames = {};\n\n\t\t\t\tlet k;\n\n\t\t\t\tfor ( k = 0; k < animationKeys.length; k ++ ) {\n\n\t\t\t\t\tif ( animationKeys[ k ].morphTargets ) {\n\n\t\t\t\t\t\tfor ( let m = 0; m < animationKeys[ k ].morphTargets.length; m ++ ) {\n\n\t\t\t\t\t\t\tmorphTargetNames[ animationKeys[ k ].morphTargets[ m ] ] = - 1;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// create a track for each morph target with all zero\n\t\t\t\t// morphTargetInfluences except for the keys in which\n\t\t\t\t// the morphTarget is named.\n\t\t\t\tfor ( const morphTargetName in morphTargetNames ) {\n\n\t\t\t\t\tconst times = [];\n\t\t\t\t\tconst values = [];\n\n\t\t\t\t\tfor ( let m = 0; m !== animationKeys[ k ].morphTargets.length; ++ m ) {\n\n\t\t\t\t\t\tconst animationKey = animationKeys[ k ];\n\n\t\t\t\t\t\ttimes.push( animationKey.time );\n\t\t\t\t\t\tvalues.push( ( animationKey.morphTarget === morphTargetName ) ? 1 : 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttracks.push( new NumberKeyframeTrack( '.morphTargetInfluence[' + morphTargetName + ']', times, values ) );\n\n\t\t\t\t}\n\n\t\t\t\tduration = morphTargetNames.length * ( fps || 1.0 );\n\n\t\t\t} else {\n\n\t\t\t\t// ...assume skeletal animation\n\n\t\t\t\tconst boneName = '.bones[' + bones[ h ].name + ']';\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tVectorKeyframeTrack, boneName + '.position',\n\t\t\t\t\tanimationKeys, 'pos', tracks );\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tQuaternionKeyframeTrack, boneName + '.quaternion',\n\t\t\t\t\tanimationKeys, 'rot', tracks );\n\n\t\t\t\taddNonemptyTrack(\n\t\t\t\t\tVectorKeyframeTrack, boneName + '.scale',\n\t\t\t\t\tanimationKeys, 'scl', tracks );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( tracks.length === 0 ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tconst clip = new this( clipName, duration, tracks, blendMode );\n\n\t\treturn clip;\n\n\t}\n\n\tresetDuration() {\n\n\t\tconst tracks = this.tracks;\n\t\tlet duration = 0;\n\n\t\tfor ( let i = 0, n = tracks.length; i !== n; ++ i ) {\n\n\t\t\tconst track = this.tracks[ i ];\n\n\t\t\tduration = Math.max( duration, track.times[ track.times.length - 1 ] );\n\n\t\t}\n\n\t\tthis.duration = duration;\n\n\t\treturn this;\n\n\t}\n\n\ttrim() {\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tthis.tracks[ i ].trim( 0, this.duration );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tvalidate() {\n\n\t\tlet valid = true;\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tvalid = valid && this.tracks[ i ].validate();\n\n\t\t}\n\n\t\treturn valid;\n\n\t}\n\n\toptimize() {\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\tthis.tracks[ i ].optimize();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\tconst tracks = [];\n\n\t\tfor ( let i = 0; i < this.tracks.length; i ++ ) {\n\n\t\t\ttracks.push( this.tracks[ i ].clone() );\n\n\t\t}\n\n\t\treturn new this.constructor( this.name, this.duration, tracks, this.blendMode );\n\n\t}\n\n\ttoJSON() {\n\n\t\treturn this.constructor.toJSON( this );\n\n\t}\n\n}\n\nfunction getTrackTypeForValueTypeName( typeName ) {\n\n\tswitch ( typeName.toLowerCase() ) {\n\n\t\tcase 'scalar':\n\t\tcase 'double':\n\t\tcase 'float':\n\t\tcase 'number':\n\t\tcase 'integer':\n\n\t\t\treturn NumberKeyframeTrack;\n\n\t\tcase 'vector':\n\t\tcase 'vector2':\n\t\tcase 'vector3':\n\t\tcase 'vector4':\n\n\t\t\treturn VectorKeyframeTrack;\n\n\t\tcase 'color':\n\n\t\t\treturn ColorKeyframeTrack;\n\n\t\tcase 'quaternion':\n\n\t\t\treturn QuaternionKeyframeTrack;\n\n\t\tcase 'bool':\n\t\tcase 'boolean':\n\n\t\t\treturn BooleanKeyframeTrack;\n\n\t\tcase 'string':\n\n\t\t\treturn StringKeyframeTrack;\n\n\t}\n\n\tthrow new Error( 'THREE.KeyframeTrack: Unsupported typeName: ' + typeName );\n\n}\n\nfunction parseKeyframeTrack( json ) {\n\n\tif ( json.type === undefined ) {\n\n\t\tthrow new Error( 'THREE.KeyframeTrack: track type undefined, can not parse' );\n\n\t}\n\n\tconst trackType = getTrackTypeForValueTypeName( json.type );\n\n\tif ( json.times === undefined ) {\n\n\t\tconst times = [], values = [];\n\n\t\tAnimationUtils.flattenJSON( json.keys, times, values, 'value' );\n\n\t\tjson.times = times;\n\t\tjson.values = values;\n\n\t}\n\n\t// derived classes can define a static parse method\n\tif ( trackType.parse !== undefined ) {\n\n\t\treturn trackType.parse( json );\n\n\t} else {\n\n\t\t// by default, we assume a constructor compatible with the base\n\t\treturn new trackType( json.name, json.times, json.values, json.interpolation );\n\n\t}\n\n}\n\nconst Cache = {\n\n\tenabled: false,\n\n\tfiles: {},\n\n\tadd: function ( key, file ) {\n\n\t\tif ( this.enabled === false ) return;\n\n\t\t// console.log( 'THREE.Cache', 'Adding key:', key );\n\n\t\tthis.files[ key ] = file;\n\n\t},\n\n\tget: function ( key ) {\n\n\t\tif ( this.enabled === false ) return;\n\n\t\t// console.log( 'THREE.Cache', 'Checking key:', key );\n\n\t\treturn this.files[ key ];\n\n\t},\n\n\tremove: function ( key ) {\n\n\t\tdelete this.files[ key ];\n\n\t},\n\n\tclear: function () {\n\n\t\tthis.files = {};\n\n\t}\n\n};\n\nclass LoadingManager {\n\n\tconstructor( onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tlet isLoading = false;\n\t\tlet itemsLoaded = 0;\n\t\tlet itemsTotal = 0;\n\t\tlet urlModifier = undefined;\n\t\tconst handlers = [];\n\n\t\t// Refer to #5689 for the reason why we don't set .onStart\n\t\t// in the constructor\n\n\t\tthis.onStart = undefined;\n\t\tthis.onLoad = onLoad;\n\t\tthis.onProgress = onProgress;\n\t\tthis.onError = onError;\n\n\t\tthis.itemStart = function ( url ) {\n\n\t\t\titemsTotal ++;\n\n\t\t\tif ( isLoading === false ) {\n\n\t\t\t\tif ( scope.onStart !== undefined ) {\n\n\t\t\t\t\tscope.onStart( url, itemsLoaded, itemsTotal );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tisLoading = true;\n\n\t\t};\n\n\t\tthis.itemEnd = function ( url ) {\n\n\t\t\titemsLoaded ++;\n\n\t\t\tif ( scope.onProgress !== undefined ) {\n\n\t\t\t\tscope.onProgress( url, itemsLoaded, itemsTotal );\n\n\t\t\t}\n\n\t\t\tif ( itemsLoaded === itemsTotal ) {\n\n\t\t\t\tisLoading = false;\n\n\t\t\t\tif ( scope.onLoad !== undefined ) {\n\n\t\t\t\t\tscope.onLoad();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.itemError = function ( url ) {\n\n\t\t\tif ( scope.onError !== undefined ) {\n\n\t\t\t\tscope.onError( url );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.resolveURL = function ( url ) {\n\n\t\t\tif ( urlModifier ) {\n\n\t\t\t\treturn urlModifier( url );\n\n\t\t\t}\n\n\t\t\treturn url;\n\n\t\t};\n\n\t\tthis.setURLModifier = function ( transform ) {\n\n\t\t\turlModifier = transform;\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.addHandler = function ( regex, loader ) {\n\n\t\t\thandlers.push( regex, loader );\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.removeHandler = function ( regex ) {\n\n\t\t\tconst index = handlers.indexOf( regex );\n\n\t\t\tif ( index !== - 1 ) {\n\n\t\t\t\thandlers.splice( index, 2 );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t};\n\n\t\tthis.getHandler = function ( file ) {\n\n\t\t\tfor ( let i = 0, l = handlers.length; i < l; i += 2 ) {\n\n\t\t\t\tconst regex = handlers[ i ];\n\t\t\t\tconst loader = handlers[ i + 1 ];\n\n\t\t\t\tif ( regex.global ) regex.lastIndex = 0; // see #17920\n\n\t\t\t\tif ( regex.test( file ) ) {\n\n\t\t\t\t\treturn loader;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn null;\n\n\t\t};\n\n\t}\n\n}\n\nconst DefaultLoadingManager = new LoadingManager();\n\nclass Loader {\n\n\tconstructor( manager ) {\n\n\t\tthis.manager = ( manager !== undefined ) ? manager : DefaultLoadingManager;\n\n\t\tthis.crossOrigin = 'anonymous';\n\t\tthis.withCredentials = false;\n\t\tthis.path = '';\n\t\tthis.resourcePath = '';\n\t\tthis.requestHeader = {};\n\n\t}\n\n\tload( /* url, onLoad, onProgress, onError */ ) {}\n\n\tloadAsync( url, onProgress ) {\n\n\t\tconst scope = this;\n\n\t\treturn new Promise( function ( resolve, reject ) {\n\n\t\t\tscope.load( url, resolve, onProgress, reject );\n\n\t\t} );\n\n\t}\n\n\tparse( /* data */ ) {}\n\n\tsetCrossOrigin( crossOrigin ) {\n\n\t\tthis.crossOrigin = crossOrigin;\n\t\treturn this;\n\n\t}\n\n\tsetWithCredentials( value ) {\n\n\t\tthis.withCredentials = value;\n\t\treturn this;\n\n\t}\n\n\tsetPath( path ) {\n\n\t\tthis.path = path;\n\t\treturn this;\n\n\t}\n\n\tsetResourcePath( resourcePath ) {\n\n\t\tthis.resourcePath = resourcePath;\n\t\treturn this;\n\n\t}\n\n\tsetRequestHeader( requestHeader ) {\n\n\t\tthis.requestHeader = requestHeader;\n\t\treturn this;\n\n\t}\n\n}\n\nconst loading = {};\n\nclass FileLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( url === undefined ) url = '';\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\t// Check if request is duplicate\n\n\t\tif ( loading[ url ] !== undefined ) {\n\n\t\t\tloading[ url ].push( {\n\n\t\t\t\tonLoad: onLoad,\n\t\t\t\tonProgress: onProgress,\n\t\t\t\tonError: onError\n\n\t\t\t} );\n\n\t\t\treturn;\n\n\t\t}\n\n\t\t// Check for data: URI\n\t\tconst dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/;\n\t\tconst dataUriRegexResult = url.match( dataUriRegex );\n\t\tlet request;\n\n\t\t// Safari can not handle Data URIs through XMLHttpRequest so process manually\n\t\tif ( dataUriRegexResult ) {\n\n\t\t\tconst mimeType = dataUriRegexResult[ 1 ];\n\t\t\tconst isBase64 = !! dataUriRegexResult[ 2 ];\n\n\t\t\tlet data = dataUriRegexResult[ 3 ];\n\t\t\tdata = decodeURIComponent( data );\n\n\t\t\tif ( isBase64 ) data = atob( data );\n\n\t\t\ttry {\n\n\t\t\t\tlet response;\n\t\t\t\tconst responseType = ( this.responseType || '' ).toLowerCase();\n\n\t\t\t\tswitch ( responseType ) {\n\n\t\t\t\t\tcase 'arraybuffer':\n\t\t\t\t\tcase 'blob':\n\n\t\t\t\t\t\tconst view = new Uint8Array( data.length );\n\n\t\t\t\t\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\t\t\t\t\tview[ i ] = data.charCodeAt( i );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( responseType === 'blob' ) {\n\n\t\t\t\t\t\t\tresponse = new Blob( [ view.buffer ], { type: mimeType } );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tresponse = view.buffer;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'document':\n\n\t\t\t\t\t\tconst parser = new DOMParser();\n\t\t\t\t\t\tresponse = parser.parseFromString( data, mimeType );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'json':\n\n\t\t\t\t\t\tresponse = JSON.parse( data );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault: // 'text' or other\n\n\t\t\t\t\t\tresponse = data;\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\t// Wait for next browser tick like standard XMLHttpRequest event dispatching does\n\t\t\t\tsetTimeout( function () {\n\n\t\t\t\t\tif ( onLoad ) onLoad( response );\n\n\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t}, 0 );\n\n\t\t\t} catch ( error ) {\n\n\t\t\t\t// Wait for next browser tick like standard XMLHttpRequest event dispatching does\n\t\t\t\tsetTimeout( function () {\n\n\t\t\t\t\tif ( onError ) onError( error );\n\n\t\t\t\t\tscope.manager.itemError( url );\n\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t}, 0 );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// Initialise array for duplicate requests\n\n\t\t\tloading[ url ] = [];\n\n\t\t\tloading[ url ].push( {\n\n\t\t\t\tonLoad: onLoad,\n\t\t\t\tonProgress: onProgress,\n\t\t\t\tonError: onError\n\n\t\t\t} );\n\n\t\t\trequest = new XMLHttpRequest();\n\n\t\t\trequest.open( 'GET', url, true );\n\n\t\t\trequest.addEventListener( 'load', function ( event ) {\n\n\t\t\t\tconst response = this.response;\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tif ( this.status === 200 || this.status === 0 ) {\n\n\t\t\t\t\t// Some browsers return HTTP Status 0 when using non-http protocol\n\t\t\t\t\t// e.g. 'file://' or 'data://'. Handle as success.\n\n\t\t\t\t\tif ( this.status === 0 ) console.warn( 'THREE.FileLoader: HTTP Status 0 received.' );\n\n\t\t\t\t\t// Add to cache only on HTTP success, so that we do not cache\n\t\t\t\t\t// error response bodies as proper responses to requests.\n\t\t\t\t\tCache.add( url, response );\n\n\t\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\t\tif ( callback.onLoad ) callback.onLoad( response );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\t\tif ( callback.onError ) callback.onError( event );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError( url );\n\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t}\n\n\t\t\t}, false );\n\n\t\t\trequest.addEventListener( 'progress', function ( event ) {\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onProgress ) callback.onProgress( event );\n\n\t\t\t\t}\n\n\t\t\t}, false );\n\n\t\t\trequest.addEventListener( 'error', function ( event ) {\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onError ) callback.onError( event );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, false );\n\n\t\t\trequest.addEventListener( 'abort', function ( event ) {\n\n\t\t\t\tconst callbacks = loading[ url ];\n\n\t\t\t\tdelete loading[ url ];\n\n\t\t\t\tfor ( let i = 0, il = callbacks.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst callback = callbacks[ i ];\n\t\t\t\t\tif ( callback.onError ) callback.onError( event );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, false );\n\n\t\t\tif ( this.responseType !== undefined ) request.responseType = this.responseType;\n\t\t\tif ( this.withCredentials !== undefined ) request.withCredentials = this.withCredentials;\n\n\t\t\tif ( request.overrideMimeType ) request.overrideMimeType( this.mimeType !== undefined ? this.mimeType : 'text/plain' );\n\n\t\t\tfor ( const header in this.requestHeader ) {\n\n\t\t\t\trequest.setRequestHeader( header, this.requestHeader[ header ] );\n\n\t\t\t}\n\n\t\t\trequest.send( null );\n\n\t\t}\n\n\t\tscope.manager.itemStart( url );\n\n\t\treturn request;\n\n\t}\n\n\tsetResponseType( value ) {\n\n\t\tthis.responseType = value;\n\t\treturn this;\n\n\t}\n\n\tsetMimeType( value ) {\n\n\t\tthis.mimeType = value;\n\t\treturn this;\n\n\t}\n\n}\n\nclass AnimationLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst animations = [];\n\n\t\tfor ( let i = 0; i < json.length; i ++ ) {\n\n\t\t\tconst clip = AnimationClip.parse( json[ i ] );\n\n\t\t\tanimations.push( clip );\n\n\t\t}\n\n\t\treturn animations;\n\n\t}\n\n}\n\n/**\n * Abstract Base class to block based textures loader (dds, pvr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */\n\nclass CompressedTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst images = [];\n\n\t\tconst texture = new CompressedTexture();\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\n\t\tlet loaded = 0;\n\n\t\tfunction loadTexture( i ) {\n\n\t\t\tloader.load( url[ i ], function ( buffer ) {\n\n\t\t\t\tconst texDatas = scope.parse( buffer, true );\n\n\t\t\t\timages[ i ] = {\n\t\t\t\t\twidth: texDatas.width,\n\t\t\t\t\theight: texDatas.height,\n\t\t\t\t\tformat: texDatas.format,\n\t\t\t\t\tmipmaps: texDatas.mipmaps\n\t\t\t\t};\n\n\t\t\t\tloaded += 1;\n\n\t\t\t\tif ( loaded === 6 ) {\n\n\t\t\t\t\tif ( texDatas.mipmapCount === 1 ) texture.minFilter = LinearFilter;\n\n\t\t\t\t\ttexture.image = images;\n\t\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, onError );\n\n\t\t}\n\n\t\tif ( Array.isArray( url ) ) {\n\n\t\t\tfor ( let i = 0, il = url.length; i < il; ++ i ) {\n\n\t\t\t\tloadTexture( i );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// compressed cubemap texture stored in a single DDS file\n\n\t\t\tloader.load( url, function ( buffer ) {\n\n\t\t\t\tconst texDatas = scope.parse( buffer, true );\n\n\t\t\t\tif ( texDatas.isCubemap ) {\n\n\t\t\t\t\tconst faces = texDatas.mipmaps.length / texDatas.mipmapCount;\n\n\t\t\t\t\tfor ( let f = 0; f < faces; f ++ ) {\n\n\t\t\t\t\t\timages[ f ] = { mipmaps: [] };\n\n\t\t\t\t\t\tfor ( let i = 0; i < texDatas.mipmapCount; i ++ ) {\n\n\t\t\t\t\t\t\timages[ f ].mipmaps.push( texDatas.mipmaps[ f * texDatas.mipmapCount + i ] );\n\t\t\t\t\t\t\timages[ f ].format = texDatas.format;\n\t\t\t\t\t\t\timages[ f ].width = texDatas.width;\n\t\t\t\t\t\t\timages[ f ].height = texDatas.height;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.image = images;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttexture.image.width = texDatas.width;\n\t\t\t\t\ttexture.image.height = texDatas.height;\n\t\t\t\t\ttexture.mipmaps = texDatas.mipmaps;\n\n\t\t\t\t}\n\n\t\t\t\tif ( texDatas.mipmapCount === 1 ) {\n\n\t\t\t\t\ttexture.minFilter = LinearFilter;\n\n\t\t\t\t}\n\n\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t}, onProgress, onError );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass ImageLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\tconst image = document.createElementNS( 'http://www.w3.org/1999/xhtml', 'img' );\n\n\t\tfunction onImageLoad() {\n\n\t\t\timage.removeEventListener( 'load', onImageLoad, false );\n\t\t\timage.removeEventListener( 'error', onImageError, false );\n\n\t\t\tCache.add( url, this );\n\n\t\t\tif ( onLoad ) onLoad( this );\n\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t}\n\n\t\tfunction onImageError( event ) {\n\n\t\t\timage.removeEventListener( 'load', onImageLoad, false );\n\t\t\timage.removeEventListener( 'error', onImageError, false );\n\n\t\t\tif ( onError ) onError( event );\n\n\t\t\tscope.manager.itemError( url );\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t}\n\n\t\timage.addEventListener( 'load', onImageLoad, false );\n\t\timage.addEventListener( 'error', onImageError, false );\n\n\t\tif ( url.substr( 0, 5 ) !== 'data:' ) {\n\n\t\t\tif ( this.crossOrigin !== undefined ) image.crossOrigin = this.crossOrigin;\n\n\t\t}\n\n\t\tscope.manager.itemStart( url );\n\n\t\timage.src = url;\n\n\t\treturn image;\n\n\t}\n\n}\n\nclass CubeTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( urls, onLoad, onProgress, onError ) {\n\n\t\tconst texture = new CubeTexture();\n\n\t\tconst loader = new ImageLoader( this.manager );\n\t\tloader.setCrossOrigin( this.crossOrigin );\n\t\tloader.setPath( this.path );\n\n\t\tlet loaded = 0;\n\n\t\tfunction loadTexture( i ) {\n\n\t\t\tloader.load( urls[ i ], function ( image ) {\n\n\t\t\t\ttexture.images[ i ] = image;\n\n\t\t\t\tloaded ++;\n\n\t\t\t\tif ( loaded === 6 ) {\n\n\t\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\t\tif ( onLoad ) onLoad( texture );\n\n\t\t\t\t}\n\n\t\t\t}, undefined, onError );\n\n\t\t}\n\n\t\tfor ( let i = 0; i < urls.length; ++ i ) {\n\n\t\t\tloadTexture( i );\n\n\t\t}\n\n\t\treturn texture;\n\n\t}\n\n}\n\n/**\n * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)\n *\n * Sub classes have to implement the parse() method which will be used in load().\n */\n\nclass DataTextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst texture = new DataTexture();\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setPath( this.path );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( buffer ) {\n\n\t\t\tconst texData = scope.parse( buffer );\n\n\t\t\tif ( ! texData ) return;\n\n\t\t\tif ( texData.image !== undefined ) {\n\n\t\t\t\ttexture.image = texData.image;\n\n\t\t\t} else if ( texData.data !== undefined ) {\n\n\t\t\t\ttexture.image.width = texData.width;\n\t\t\t\ttexture.image.height = texData.height;\n\t\t\t\ttexture.image.data = texData.data;\n\n\t\t\t}\n\n\t\t\ttexture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping;\n\t\t\ttexture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping;\n\n\t\t\ttexture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter;\n\t\t\ttexture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter;\n\n\t\t\ttexture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1;\n\n\t\t\tif ( texData.encoding !== undefined ) {\n\n\t\t\t\ttexture.encoding = texData.encoding;\n\n\t\t\t}\n\n\t\t\tif ( texData.flipY !== undefined ) {\n\n\t\t\t\ttexture.flipY = texData.flipY;\n\n\t\t\t}\n\n\t\t\tif ( texData.format !== undefined ) {\n\n\t\t\t\ttexture.format = texData.format;\n\n\t\t\t}\n\n\t\t\tif ( texData.type !== undefined ) {\n\n\t\t\t\ttexture.type = texData.type;\n\n\t\t\t}\n\n\t\t\tif ( texData.mipmaps !== undefined ) {\n\n\t\t\t\ttexture.mipmaps = texData.mipmaps;\n\t\t\t\ttexture.minFilter = LinearMipmapLinearFilter; // presumably...\n\n\t\t\t}\n\n\t\t\tif ( texData.mipmapCount === 1 ) {\n\n\t\t\t\ttexture.minFilter = LinearFilter;\n\n\t\t\t}\n\n\t\t\tif ( texData.generateMipmaps !== undefined ) {\n\n\t\t\t\ttexture.generateMipmaps = texData.generateMipmaps;\n\n\t\t\t}\n\n\t\t\ttexture.needsUpdate = true;\n\n\t\t\tif ( onLoad ) onLoad( texture, texData );\n\n\t\t}, onProgress, onError );\n\n\n\t\treturn texture;\n\n\t}\n\n}\n\nclass TextureLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst texture = new Texture();\n\n\t\tconst loader = new ImageLoader( this.manager );\n\t\tloader.setCrossOrigin( this.crossOrigin );\n\t\tloader.setPath( this.path );\n\n\t\tloader.load( url, function ( image ) {\n\n\t\t\ttexture.image = image;\n\n\t\t\t// JPEGs can't have an alpha channel, so memory can be saved by storing them as RGB.\n\t\t\tconst isJPEG = url.search( /\\.jpe?g($|\\?)/i ) > 0 || url.search( /^data\\:image\\/jpeg/ ) === 0;\n\n\t\t\ttexture.format = isJPEG ? RGBFormat : RGBAFormat;\n\t\t\ttexture.needsUpdate = true;\n\n\t\t\tif ( onLoad !== undefined ) {\n\n\t\t\t\tonLoad( texture );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t\treturn texture;\n\n\t}\n\n}\n\n/**************************************************************\n *\tCurved Path - a curve path is simply a array of connected\n * curves, but retains the api of a curve\n **************************************************************/\n\nclass CurvePath extends Curve {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'CurvePath';\n\n\t\tthis.curves = [];\n\t\tthis.autoClose = false; // Automatically closes the path\n\n\t}\n\n\tadd( curve ) {\n\n\t\tthis.curves.push( curve );\n\n\t}\n\n\tclosePath() {\n\n\t\t// Add a line curve if start and end of lines are not connected\n\t\tconst startPoint = this.curves[ 0 ].getPoint( 0 );\n\t\tconst endPoint = this.curves[ this.curves.length - 1 ].getPoint( 1 );\n\n\t\tif ( ! startPoint.equals( endPoint ) ) {\n\n\t\t\tthis.curves.push( new LineCurve( endPoint, startPoint ) );\n\n\t\t}\n\n\t}\n\n\t// To get accurate point with reference to\n\t// entire path distance at time t,\n\t// following has to be done:\n\n\t// 1. Length of each sub path have to be known\n\t// 2. Locate and identify type of curve\n\t// 3. Get t for the curve\n\t// 4. Return curve.getPointAt(t')\n\n\tgetPoint( t ) {\n\n\t\tconst d = t * this.getLength();\n\t\tconst curveLengths = this.getCurveLengths();\n\t\tlet i = 0;\n\n\t\t// To think about boundaries points.\n\n\t\twhile ( i < curveLengths.length ) {\n\n\t\t\tif ( curveLengths[ i ] >= d ) {\n\n\t\t\t\tconst diff = curveLengths[ i ] - d;\n\t\t\t\tconst curve = this.curves[ i ];\n\n\t\t\t\tconst segmentLength = curve.getLength();\n\t\t\t\tconst u = segmentLength === 0 ? 0 : 1 - diff / segmentLength;\n\n\t\t\t\treturn curve.getPointAt( u );\n\n\t\t\t}\n\n\t\t\ti ++;\n\n\t\t}\n\n\t\treturn null;\n\n\t\t// loop where sum != 0, sum > d , sum+1 <d\n\n\t}\n\n\t// We cannot use the default THREE.Curve getPoint() with getLength() because in\n\t// THREE.Curve, getLength() depends on getPoint() but in THREE.CurvePath\n\t// getPoint() depends on getLength\n\n\tgetLength() {\n\n\t\tconst lens = this.getCurveLengths();\n\t\treturn lens[ lens.length - 1 ];\n\n\t}\n\n\t// cacheLengths must be recalculated.\n\tupdateArcLengths() {\n\n\t\tthis.needsUpdate = true;\n\t\tthis.cacheLengths = null;\n\t\tthis.getCurveLengths();\n\n\t}\n\n\t// Compute lengths and cache them\n\t// We cannot overwrite getLengths() because UtoT mapping uses it.\n\n\tgetCurveLengths() {\n\n\t\t// We use cache values if curves and cache array are same length\n\n\t\tif ( this.cacheLengths && this.cacheLengths.length === this.curves.length ) {\n\n\t\t\treturn this.cacheLengths;\n\n\t\t}\n\n\t\t// Get length of sub-curve\n\t\t// Push sums into cached array\n\n\t\tconst lengths = [];\n\t\tlet sums = 0;\n\n\t\tfor ( let i = 0, l = this.curves.length; i < l; i ++ ) {\n\n\t\t\tsums += this.curves[ i ].getLength();\n\t\t\tlengths.push( sums );\n\n\t\t}\n\n\t\tthis.cacheLengths = lengths;\n\n\t\treturn lengths;\n\n\t}\n\n\tgetSpacedPoints( divisions = 40 ) {\n\n\t\tconst points = [];\n\n\t\tfor ( let i = 0; i <= divisions; i ++ ) {\n\n\t\t\tpoints.push( this.getPoint( i / divisions ) );\n\n\t\t}\n\n\t\tif ( this.autoClose ) {\n\n\t\t\tpoints.push( points[ 0 ] );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\tgetPoints( divisions = 12 ) {\n\n\t\tconst points = [];\n\t\tlet last;\n\n\t\tfor ( let i = 0, curves = this.curves; i < curves.length; i ++ ) {\n\n\t\t\tconst curve = curves[ i ];\n\t\t\tconst resolution = ( curve && curve.isEllipseCurve ) ? divisions * 2\n\t\t\t\t: ( curve && ( curve.isLineCurve || curve.isLineCurve3 ) ) ? 1\n\t\t\t\t\t: ( curve && curve.isSplineCurve ) ? divisions * curve.points.length\n\t\t\t\t\t\t: divisions;\n\n\t\t\tconst pts = curve.getPoints( resolution );\n\n\t\t\tfor ( let j = 0; j < pts.length; j ++ ) {\n\n\t\t\t\tconst point = pts[ j ];\n\n\t\t\t\tif ( last && last.equals( point ) ) continue; // ensures no consecutive points are duplicates\n\n\t\t\t\tpoints.push( point );\n\t\t\t\tlast = point;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.autoClose && points.length > 1 && ! points[ points.length - 1 ].equals( points[ 0 ] ) ) {\n\n\t\t\tpoints.push( points[ 0 ] );\n\n\t\t}\n\n\t\treturn points;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.curves = [];\n\n\t\tfor ( let i = 0, l = source.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = source.curves[ i ];\n\n\t\t\tthis.curves.push( curve.clone() );\n\n\t\t}\n\n\t\tthis.autoClose = source.autoClose;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.autoClose = this.autoClose;\n\t\tdata.curves = [];\n\n\t\tfor ( let i = 0, l = this.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = this.curves[ i ];\n\t\t\tdata.curves.push( curve.toJSON() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.autoClose = json.autoClose;\n\t\tthis.curves = [];\n\n\t\tfor ( let i = 0, l = json.curves.length; i < l; i ++ ) {\n\n\t\t\tconst curve = json.curves[ i ];\n\t\t\tthis.curves.push( new Curves[ curve.type ]().fromJSON( curve ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Path extends CurvePath {\n\n\tconstructor( points ) {\n\n\t\tsuper();\n\t\tthis.type = 'Path';\n\n\t\tthis.currentPoint = new Vector2();\n\n\t\tif ( points ) {\n\n\t\t\tthis.setFromPoints( points );\n\n\t\t}\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.moveTo( points[ 0 ].x, points[ 0 ].y );\n\n\t\tfor ( let i = 1, l = points.length; i < l; i ++ ) {\n\n\t\t\tthis.lineTo( points[ i ].x, points[ i ].y );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tmoveTo( x, y ) {\n\n\t\tthis.currentPoint.set( x, y ); // TODO consider referencing vectors instead of copying?\n\n\t\treturn this;\n\n\t}\n\n\tlineTo( x, y ) {\n\n\t\tconst curve = new LineCurve( this.currentPoint.clone(), new Vector2( x, y ) );\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tquadraticCurveTo( aCPx, aCPy, aX, aY ) {\n\n\t\tconst curve = new QuadraticBezierCurve(\n\t\t\tthis.currentPoint.clone(),\n\t\t\tnew Vector2( aCPx, aCPy ),\n\t\t\tnew Vector2( aX, aY )\n\t\t);\n\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tbezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) {\n\n\t\tconst curve = new CubicBezierCurve(\n\t\t\tthis.currentPoint.clone(),\n\t\t\tnew Vector2( aCP1x, aCP1y ),\n\t\t\tnew Vector2( aCP2x, aCP2y ),\n\t\t\tnew Vector2( aX, aY )\n\t\t);\n\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.set( aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tsplineThru( pts /*Array of Vector*/ ) {\n\n\t\tconst npts = [ this.currentPoint.clone() ].concat( pts );\n\n\t\tconst curve = new SplineCurve( npts );\n\t\tthis.curves.push( curve );\n\n\t\tthis.currentPoint.copy( pts[ pts.length - 1 ] );\n\n\t\treturn this;\n\n\t}\n\n\tarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tconst x0 = this.currentPoint.x;\n\t\tconst y0 = this.currentPoint.y;\n\n\t\tthis.absarc( aX + x0, aY + y0, aRadius,\n\t\t\taStartAngle, aEndAngle, aClockwise );\n\n\t\treturn this;\n\n\t}\n\n\tabsarc( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {\n\n\t\tthis.absellipse( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );\n\n\t\treturn this;\n\n\t}\n\n\tellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {\n\n\t\tconst x0 = this.currentPoint.x;\n\t\tconst y0 = this.currentPoint.y;\n\n\t\tthis.absellipse( aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation );\n\n\t\treturn this;\n\n\t}\n\n\tabsellipse( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {\n\n\t\tconst curve = new EllipseCurve( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation );\n\n\t\tif ( this.curves.length > 0 ) {\n\n\t\t\t// if a previous curve is present, attempt to join\n\t\t\tconst firstPoint = curve.getPoint( 0 );\n\n\t\t\tif ( ! firstPoint.equals( this.currentPoint ) ) {\n\n\t\t\t\tthis.lineTo( firstPoint.x, firstPoint.y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.curves.push( curve );\n\n\t\tconst lastPoint = curve.getPoint( 1 );\n\t\tthis.currentPoint.copy( lastPoint );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.currentPoint.copy( source.currentPoint );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.currentPoint = this.currentPoint.toArray();\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.currentPoint.fromArray( json.currentPoint );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Shape extends Path {\n\n\tconstructor( points ) {\n\n\t\tsuper( points );\n\n\t\tthis.uuid = generateUUID();\n\n\t\tthis.type = 'Shape';\n\n\t\tthis.holes = [];\n\n\t}\n\n\tgetPointsHoles( divisions ) {\n\n\t\tconst holesPts = [];\n\n\t\tfor ( let i = 0, l = this.holes.length; i < l; i ++ ) {\n\n\t\t\tholesPts[ i ] = this.holes[ i ].getPoints( divisions );\n\n\t\t}\n\n\t\treturn holesPts;\n\n\t}\n\n\t// get points of shape and holes (keypoints based on segments parameter)\n\n\textractPoints( divisions ) {\n\n\t\treturn {\n\n\t\t\tshape: this.getPoints( divisions ),\n\t\t\tholes: this.getPointsHoles( divisions )\n\n\t\t};\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.holes = [];\n\n\t\tfor ( let i = 0, l = source.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = source.holes[ i ];\n\n\t\t\tthis.holes.push( hole.clone() );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.uuid = this.uuid;\n\t\tdata.holes = [];\n\n\t\tfor ( let i = 0, l = this.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = this.holes[ i ];\n\t\t\tdata.holes.push( hole.toJSON() );\n\n\t\t}\n\n\t\treturn data;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tsuper.fromJSON( json );\n\n\t\tthis.uuid = json.uuid;\n\t\tthis.holes = [];\n\n\t\tfor ( let i = 0, l = json.holes.length; i < l; i ++ ) {\n\n\t\t\tconst hole = json.holes[ i ];\n\t\t\tthis.holes.push( new Path().fromJSON( hole ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Light extends Object3D {\n\n\tconstructor( color, intensity = 1 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Light';\n\n\t\tthis.color = new Color( color );\n\t\tthis.intensity = intensity;\n\n\t}\n\n\tdispose() {\n\n\t\t// Empty here in base class; some subclasses override.\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.color.copy( source.color );\n\t\tthis.intensity = source.intensity;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.color = this.color.getHex();\n\t\tdata.object.intensity = this.intensity;\n\n\t\tif ( this.groundColor !== undefined ) data.object.groundColor = this.groundColor.getHex();\n\n\t\tif ( this.distance !== undefined ) data.object.distance = this.distance;\n\t\tif ( this.angle !== undefined ) data.object.angle = this.angle;\n\t\tif ( this.decay !== undefined ) data.object.decay = this.decay;\n\t\tif ( this.penumbra !== undefined ) data.object.penumbra = this.penumbra;\n\n\t\tif ( this.shadow !== undefined ) data.object.shadow = this.shadow.toJSON();\n\n\t\treturn data;\n\n\t}\n\n}\n\nLight.prototype.isLight = true;\n\nclass HemisphereLight extends Light {\n\n\tconstructor( skyColor, groundColor, intensity ) {\n\n\t\tsuper( skyColor, intensity );\n\n\t\tthis.type = 'HemisphereLight';\n\n\t\tthis.position.copy( Object3D.DefaultUp );\n\t\tthis.updateMatrix();\n\n\t\tthis.groundColor = new Color( groundColor );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tLight.prototype.copy.call( this, source );\n\n\t\tthis.groundColor.copy( source.groundColor );\n\n\t\treturn this;\n\n\t}\n\n}\n\nHemisphereLight.prototype.isHemisphereLight = true;\n\nconst _projScreenMatrix$1 = /*@__PURE__*/ new Matrix4();\nconst _lightPositionWorld$1 = /*@__PURE__*/ new Vector3();\nconst _lookTarget$1 = /*@__PURE__*/ new Vector3();\n\nclass LightShadow {\n\n\tconstructor( camera ) {\n\n\t\tthis.camera = camera;\n\n\t\tthis.bias = 0;\n\t\tthis.normalBias = 0;\n\t\tthis.radius = 1;\n\n\t\tthis.mapSize = new Vector2( 512, 512 );\n\n\t\tthis.map = null;\n\t\tthis.mapPass = null;\n\t\tthis.matrix = new Matrix4();\n\n\t\tthis.autoUpdate = true;\n\t\tthis.needsUpdate = false;\n\n\t\tthis._frustum = new Frustum();\n\t\tthis._frameExtents = new Vector2( 1, 1 );\n\n\t\tthis._viewportCount = 1;\n\n\t\tthis._viewports = [\n\n\t\t\tnew Vector4( 0, 0, 1, 1 )\n\n\t\t];\n\n\t}\n\n\tgetViewportCount() {\n\n\t\treturn this._viewportCount;\n\n\t}\n\n\tgetFrustum() {\n\n\t\treturn this._frustum;\n\n\t}\n\n\tupdateMatrices( light ) {\n\n\t\tconst shadowCamera = this.camera;\n\t\tconst shadowMatrix = this.matrix;\n\n\t\t_lightPositionWorld$1.setFromMatrixPosition( light.matrixWorld );\n\t\tshadowCamera.position.copy( _lightPositionWorld$1 );\n\n\t\t_lookTarget$1.setFromMatrixPosition( light.target.matrixWorld );\n\t\tshadowCamera.lookAt( _lookTarget$1 );\n\t\tshadowCamera.updateMatrixWorld();\n\n\t\t_projScreenMatrix$1.multiplyMatrices( shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse );\n\t\tthis._frustum.setFromProjectionMatrix( _projScreenMatrix$1 );\n\n\t\tshadowMatrix.set(\n\t\t\t0.5, 0.0, 0.0, 0.5,\n\t\t\t0.0, 0.5, 0.0, 0.5,\n\t\t\t0.0, 0.0, 0.5, 0.5,\n\t\t\t0.0, 0.0, 0.0, 1.0\n\t\t);\n\n\t\tshadowMatrix.multiply( shadowCamera.projectionMatrix );\n\t\tshadowMatrix.multiply( shadowCamera.matrixWorldInverse );\n\n\t}\n\n\tgetViewport( viewportIndex ) {\n\n\t\treturn this._viewports[ viewportIndex ];\n\n\t}\n\n\tgetFrameExtents() {\n\n\t\treturn this._frameExtents;\n\n\t}\n\n\tdispose() {\n\n\t\tif ( this.map ) {\n\n\t\t\tthis.map.dispose();\n\n\t\t}\n\n\t\tif ( this.mapPass ) {\n\n\t\t\tthis.mapPass.dispose();\n\n\t\t}\n\n\t}\n\n\tcopy( source ) {\n\n\t\tthis.camera = source.camera.clone();\n\n\t\tthis.bias = source.bias;\n\t\tthis.radius = source.radius;\n\n\t\tthis.mapSize.copy( source.mapSize );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst object = {};\n\n\t\tif ( this.bias !== 0 ) object.bias = this.bias;\n\t\tif ( this.normalBias !== 0 ) object.normalBias = this.normalBias;\n\t\tif ( this.radius !== 1 ) object.radius = this.radius;\n\t\tif ( this.mapSize.x !== 512 || this.mapSize.y !== 512 ) object.mapSize = this.mapSize.toArray();\n\n\t\tobject.camera = this.camera.toJSON( false ).object;\n\t\tdelete object.camera.matrix;\n\n\t\treturn object;\n\n\t}\n\n}\n\nclass SpotLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new PerspectiveCamera( 50, 1, 0.5, 500 ) );\n\n\t\tthis.focus = 1;\n\n\t}\n\n\tupdateMatrices( light ) {\n\n\t\tconst camera = this.camera;\n\n\t\tconst fov = RAD2DEG * 2 * light.angle * this.focus;\n\t\tconst aspect = this.mapSize.width / this.mapSize.height;\n\t\tconst far = light.distance || camera.far;\n\n\t\tif ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) {\n\n\t\t\tcamera.fov = fov;\n\t\t\tcamera.aspect = aspect;\n\t\t\tcamera.far = far;\n\t\t\tcamera.updateProjectionMatrix();\n\n\t\t}\n\n\t\tsuper.updateMatrices( light );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.focus = source.focus;\n\n\t\treturn this;\n\n\t}\n\n}\n\nSpotLightShadow.prototype.isSpotLightShadow = true;\n\nclass SpotLight extends Light {\n\n\tconstructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 1 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'SpotLight';\n\n\t\tthis.position.copy( Object3D.DefaultUp );\n\t\tthis.updateMatrix();\n\n\t\tthis.target = new Object3D();\n\n\t\tthis.distance = distance;\n\t\tthis.angle = angle;\n\t\tthis.penumbra = penumbra;\n\t\tthis.decay = decay; // for physically correct lights, should be 2.\n\n\t\tthis.shadow = new SpotLightShadow();\n\n\t}\n\n\tget power() {\n\n\t\t// intensity = power per solid angle.\n\t\t// ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\treturn this.intensity * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// intensity = power per solid angle.\n\t\t// ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\tthis.intensity = power / Math.PI;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.distance = source.distance;\n\t\tthis.angle = source.angle;\n\t\tthis.penumbra = source.penumbra;\n\t\tthis.decay = source.decay;\n\n\t\tthis.target = source.target.clone();\n\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nSpotLight.prototype.isSpotLight = true;\n\nconst _projScreenMatrix = /*@__PURE__*/ new Matrix4();\nconst _lightPositionWorld = /*@__PURE__*/ new Vector3();\nconst _lookTarget = /*@__PURE__*/ new Vector3();\n\nclass PointLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new PerspectiveCamera( 90, 1, 0.5, 500 ) );\n\n\t\tthis._frameExtents = new Vector2( 4, 2 );\n\n\t\tthis._viewportCount = 6;\n\n\t\tthis._viewports = [\n\t\t\t// These viewports map a cube-map onto a 2D texture with the\n\t\t\t// following orientation:\n\t\t\t//\n\t\t\t// xzXZ\n\t\t\t// y Y\n\t\t\t//\n\t\t\t// X - Positive x direction\n\t\t\t// x - Negative x direction\n\t\t\t// Y - Positive y direction\n\t\t\t// y - Negative y direction\n\t\t\t// Z - Positive z direction\n\t\t\t// z - Negative z direction\n\n\t\t\t// positive X\n\t\t\tnew Vector4( 2, 1, 1, 1 ),\n\t\t\t// negative X\n\t\t\tnew Vector4( 0, 1, 1, 1 ),\n\t\t\t// positive Z\n\t\t\tnew Vector4( 3, 1, 1, 1 ),\n\t\t\t// negative Z\n\t\t\tnew Vector4( 1, 1, 1, 1 ),\n\t\t\t// positive Y\n\t\t\tnew Vector4( 3, 0, 1, 1 ),\n\t\t\t// negative Y\n\t\t\tnew Vector4( 1, 0, 1, 1 )\n\t\t];\n\n\t\tthis._cubeDirections = [\n\t\t\tnew Vector3( 1, 0, 0 ), new Vector3( - 1, 0, 0 ), new Vector3( 0, 0, 1 ),\n\t\t\tnew Vector3( 0, 0, - 1 ), new Vector3( 0, 1, 0 ), new Vector3( 0, - 1, 0 )\n\t\t];\n\n\t\tthis._cubeUps = [\n\t\t\tnew Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ), new Vector3( 0, 1, 0 ),\n\t\t\tnew Vector3( 0, 1, 0 ), new Vector3( 0, 0, 1 ),\tnew Vector3( 0, 0, - 1 )\n\t\t];\n\n\t}\n\n\tupdateMatrices( light, viewportIndex = 0 ) {\n\n\t\tconst camera = this.camera;\n\t\tconst shadowMatrix = this.matrix;\n\n\t\tconst far = light.distance || camera.far;\n\n\t\tif ( far !== camera.far ) {\n\n\t\t\tcamera.far = far;\n\t\t\tcamera.updateProjectionMatrix();\n\n\t\t}\n\n\t\t_lightPositionWorld.setFromMatrixPosition( light.matrixWorld );\n\t\tcamera.position.copy( _lightPositionWorld );\n\n\t\t_lookTarget.copy( camera.position );\n\t\t_lookTarget.add( this._cubeDirections[ viewportIndex ] );\n\t\tcamera.up.copy( this._cubeUps[ viewportIndex ] );\n\t\tcamera.lookAt( _lookTarget );\n\t\tcamera.updateMatrixWorld();\n\n\t\tshadowMatrix.makeTranslation( - _lightPositionWorld.x, - _lightPositionWorld.y, - _lightPositionWorld.z );\n\n\t\t_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );\n\t\tthis._frustum.setFromProjectionMatrix( _projScreenMatrix );\n\n\t}\n\n}\n\nPointLightShadow.prototype.isPointLightShadow = true;\n\nclass PointLight extends Light {\n\n\tconstructor( color, intensity, distance = 0, decay = 1 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'PointLight';\n\n\t\tthis.distance = distance;\n\t\tthis.decay = decay; // for physically correct lights, should be 2.\n\n\t\tthis.shadow = new PointLightShadow();\n\n\t}\n\n\tget power() {\n\n\t\t// intensity = power per solid angle.\n\t\t// ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\treturn this.intensity * 4 * Math.PI;\n\n\t}\n\n\tset power( power ) {\n\n\t\t// intensity = power per solid angle.\n\t\t// ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\tthis.intensity = power / ( 4 * Math.PI );\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.distance = source.distance;\n\t\tthis.decay = source.decay;\n\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nPointLight.prototype.isPointLight = true;\n\nclass OrthographicCamera extends Camera {\n\n\tconstructor( left = - 1, right = 1, top = 1, bottom = - 1, near = 0.1, far = 2000 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'OrthographicCamera';\n\n\t\tthis.zoom = 1;\n\t\tthis.view = null;\n\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.top = top;\n\t\tthis.bottom = bottom;\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tcopy( source, recursive ) {\n\n\t\tsuper.copy( source, recursive );\n\n\t\tthis.left = source.left;\n\t\tthis.right = source.right;\n\t\tthis.top = source.top;\n\t\tthis.bottom = source.bottom;\n\t\tthis.near = source.near;\n\t\tthis.far = source.far;\n\n\t\tthis.zoom = source.zoom;\n\t\tthis.view = source.view === null ? null : Object.assign( {}, source.view );\n\n\t\treturn this;\n\n\t}\n\n\tsetViewOffset( fullWidth, fullHeight, x, y, width, height ) {\n\n\t\tif ( this.view === null ) {\n\n\t\t\tthis.view = {\n\t\t\t\tenabled: true,\n\t\t\t\tfullWidth: 1,\n\t\t\t\tfullHeight: 1,\n\t\t\t\toffsetX: 0,\n\t\t\t\toffsetY: 0,\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1\n\t\t\t};\n\n\t\t}\n\n\t\tthis.view.enabled = true;\n\t\tthis.view.fullWidth = fullWidth;\n\t\tthis.view.fullHeight = fullHeight;\n\t\tthis.view.offsetX = x;\n\t\tthis.view.offsetY = y;\n\t\tthis.view.width = width;\n\t\tthis.view.height = height;\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tclearViewOffset() {\n\n\t\tif ( this.view !== null ) {\n\n\t\t\tthis.view.enabled = false;\n\n\t\t}\n\n\t\tthis.updateProjectionMatrix();\n\n\t}\n\n\tupdateProjectionMatrix() {\n\n\t\tconst dx = ( this.right - this.left ) / ( 2 * this.zoom );\n\t\tconst dy = ( this.top - this.bottom ) / ( 2 * this.zoom );\n\t\tconst cx = ( this.right + this.left ) / 2;\n\t\tconst cy = ( this.top + this.bottom ) / 2;\n\n\t\tlet left = cx - dx;\n\t\tlet right = cx + dx;\n\t\tlet top = cy + dy;\n\t\tlet bottom = cy - dy;\n\n\t\tif ( this.view !== null && this.view.enabled ) {\n\n\t\t\tconst scaleW = ( this.right - this.left ) / this.view.fullWidth / this.zoom;\n\t\t\tconst scaleH = ( this.top - this.bottom ) / this.view.fullHeight / this.zoom;\n\n\t\t\tleft += scaleW * this.view.offsetX;\n\t\t\tright = left + scaleW * this.view.width;\n\t\t\ttop -= scaleH * this.view.offsetY;\n\t\t\tbottom = top - scaleH * this.view.height;\n\n\t\t}\n\n\t\tthis.projectionMatrix.makeOrthographic( left, right, top, bottom, this.near, this.far );\n\n\t\tthis.projectionMatrixInverse.copy( this.projectionMatrix ).invert();\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.zoom = this.zoom;\n\t\tdata.object.left = this.left;\n\t\tdata.object.right = this.right;\n\t\tdata.object.top = this.top;\n\t\tdata.object.bottom = this.bottom;\n\t\tdata.object.near = this.near;\n\t\tdata.object.far = this.far;\n\n\t\tif ( this.view !== null ) data.object.view = Object.assign( {}, this.view );\n\n\t\treturn data;\n\n\t}\n\n}\n\nOrthographicCamera.prototype.isOrthographicCamera = true;\n\nclass DirectionalLightShadow extends LightShadow {\n\n\tconstructor() {\n\n\t\tsuper( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );\n\n\t}\n\n}\n\nDirectionalLightShadow.prototype.isDirectionalLightShadow = true;\n\nclass DirectionalLight extends Light {\n\n\tconstructor( color, intensity ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'DirectionalLight';\n\n\t\tthis.position.copy( Object3D.DefaultUp );\n\t\tthis.updateMatrix();\n\n\t\tthis.target = new Object3D();\n\n\t\tthis.shadow = new DirectionalLightShadow();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.shadow.dispose();\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.target = source.target.clone();\n\t\tthis.shadow = source.shadow.clone();\n\n\t\treturn this;\n\n\t}\n\n}\n\nDirectionalLight.prototype.isDirectionalLight = true;\n\nclass AmbientLight extends Light {\n\n\tconstructor( color, intensity ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'AmbientLight';\n\n\t}\n\n}\n\nAmbientLight.prototype.isAmbientLight = true;\n\nclass RectAreaLight extends Light {\n\n\tconstructor( color, intensity, width = 10, height = 10 ) {\n\n\t\tsuper( color, intensity );\n\n\t\tthis.type = 'RectAreaLight';\n\n\t\tthis.width = width;\n\t\tthis.height = height;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.width = source.width;\n\t\tthis.height = source.height;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.width = this.width;\n\t\tdata.object.height = this.height;\n\n\t\treturn data;\n\n\t}\n\n}\n\nRectAreaLight.prototype.isRectAreaLight = true;\n\n/**\n * Primary reference:\n * https://graphics.stanford.edu/papers/envmap/envmap.pdf\n *\n * Secondary reference:\n * https://www.ppsloan.org/publications/StupidSH36.pdf\n */\n\n// 3-band SH defined by 9 coefficients\n\nclass SphericalHarmonics3 {\n\n\tconstructor() {\n\n\t\tthis.coefficients = [];\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients.push( new Vector3() );\n\n\t\t}\n\n\t}\n\n\tset( coefficients ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].copy( coefficients[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tzero() {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].set( 0, 0, 0 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// get the radiance in the direction of the normal\n\t// target is a Vector3\n\tgetAt( normal, target ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\tconst coeff = this.coefficients;\n\n\t\t// band 0\n\t\ttarget.copy( coeff[ 0 ] ).multiplyScalar( 0.282095 );\n\n\t\t// band 1\n\t\ttarget.addScaledVector( coeff[ 1 ], 0.488603 * y );\n\t\ttarget.addScaledVector( coeff[ 2 ], 0.488603 * z );\n\t\ttarget.addScaledVector( coeff[ 3 ], 0.488603 * x );\n\n\t\t// band 2\n\t\ttarget.addScaledVector( coeff[ 4 ], 1.092548 * ( x * y ) );\n\t\ttarget.addScaledVector( coeff[ 5 ], 1.092548 * ( y * z ) );\n\t\ttarget.addScaledVector( coeff[ 6 ], 0.315392 * ( 3.0 * z * z - 1.0 ) );\n\t\ttarget.addScaledVector( coeff[ 7 ], 1.092548 * ( x * z ) );\n\t\ttarget.addScaledVector( coeff[ 8 ], 0.546274 * ( x * x - y * y ) );\n\n\t\treturn target;\n\n\t}\n\n\t// get the irradiance (radiance convolved with cosine lobe) in the direction of the normal\n\t// target is a Vector3\n\t// https://graphics.stanford.edu/papers/envmap/envmap.pdf\n\tgetIrradianceAt( normal, target ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\tconst coeff = this.coefficients;\n\n\t\t// band 0\n\t\ttarget.copy( coeff[ 0 ] ).multiplyScalar( 0.886227 ); // π * 0.282095\n\n\t\t// band 1\n\t\ttarget.addScaledVector( coeff[ 1 ], 2.0 * 0.511664 * y ); // ( 2 * π / 3 ) * 0.488603\n\t\ttarget.addScaledVector( coeff[ 2 ], 2.0 * 0.511664 * z );\n\t\ttarget.addScaledVector( coeff[ 3 ], 2.0 * 0.511664 * x );\n\n\t\t// band 2\n\t\ttarget.addScaledVector( coeff[ 4 ], 2.0 * 0.429043 * x * y ); // ( π / 4 ) * 1.092548\n\t\ttarget.addScaledVector( coeff[ 5 ], 2.0 * 0.429043 * y * z );\n\t\ttarget.addScaledVector( coeff[ 6 ], 0.743125 * z * z - 0.247708 ); // ( π / 4 ) * 0.315392 * 3\n\t\ttarget.addScaledVector( coeff[ 7 ], 2.0 * 0.429043 * x * z );\n\t\ttarget.addScaledVector( coeff[ 8 ], 0.429043 * ( x * x - y * y ) ); // ( π / 4 ) * 0.546274\n\n\t\treturn target;\n\n\t}\n\n\tadd( sh ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].add( sh.coefficients[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\taddScaledSH( sh, s ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].addScaledVector( sh.coefficients[ i ], s );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tscale( s ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].multiplyScalar( s );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tlerp( sh, alpha ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tthis.coefficients[ i ].lerp( sh.coefficients[ i ], alpha );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tequals( sh ) {\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tif ( ! this.coefficients[ i ].equals( sh.coefficients[ i ] ) ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tcopy( sh ) {\n\n\t\treturn this.set( sh.coefficients );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tfromArray( array, offset = 0 ) {\n\n\t\tconst coefficients = this.coefficients;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tcoefficients[ i ].fromArray( array, offset + ( i * 3 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\ttoArray( array = [], offset = 0 ) {\n\n\t\tconst coefficients = this.coefficients;\n\n\t\tfor ( let i = 0; i < 9; i ++ ) {\n\n\t\t\tcoefficients[ i ].toArray( array, offset + ( i * 3 ) );\n\n\t\t}\n\n\t\treturn array;\n\n\t}\n\n\t// evaluate the basis functions\n\t// shBasis is an Array[ 9 ]\n\tstatic getBasisAt( normal, shBasis ) {\n\n\t\t// normal is assumed to be unit length\n\n\t\tconst x = normal.x, y = normal.y, z = normal.z;\n\n\t\t// band 0\n\t\tshBasis[ 0 ] = 0.282095;\n\n\t\t// band 1\n\t\tshBasis[ 1 ] = 0.488603 * y;\n\t\tshBasis[ 2 ] = 0.488603 * z;\n\t\tshBasis[ 3 ] = 0.488603 * x;\n\n\t\t// band 2\n\t\tshBasis[ 4 ] = 1.092548 * x * y;\n\t\tshBasis[ 5 ] = 1.092548 * y * z;\n\t\tshBasis[ 6 ] = 0.315392 * ( 3 * z * z - 1 );\n\t\tshBasis[ 7 ] = 1.092548 * x * z;\n\t\tshBasis[ 8 ] = 0.546274 * ( x * x - y * y );\n\n\t}\n\n}\n\nSphericalHarmonics3.prototype.isSphericalHarmonics3 = true;\n\nclass LightProbe extends Light {\n\n\tconstructor( sh = new SphericalHarmonics3(), intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tthis.sh = sh;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.sh.copy( source.sh );\n\n\t\treturn this;\n\n\t}\n\n\tfromJSON( json ) {\n\n\t\tthis.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();\n\t\tthis.sh.fromArray( json.sh );\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON( meta ) {\n\n\t\tconst data = super.toJSON( meta );\n\n\t\tdata.object.sh = this.sh.toArray();\n\n\t\treturn data;\n\n\t}\n\n}\n\nLightProbe.prototype.isLightProbe = true;\n\nclass MaterialLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\t\tthis.textures = {};\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( scope.manager );\n\t\tloader.setPath( scope.path );\n\t\tloader.setRequestHeader( scope.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst textures = this.textures;\n\n\t\tfunction getTexture( name ) {\n\n\t\t\tif ( textures[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.MaterialLoader: Undefined texture', name );\n\n\t\t\t}\n\n\t\t\treturn textures[ name ];\n\n\t\t}\n\n\t\tconst material = new Materials[ json.type ]();\n\n\t\tif ( json.uuid !== undefined ) material.uuid = json.uuid;\n\t\tif ( json.name !== undefined ) material.name = json.name;\n\t\tif ( json.color !== undefined && material.color !== undefined ) material.color.setHex( json.color );\n\t\tif ( json.roughness !== undefined ) material.roughness = json.roughness;\n\t\tif ( json.metalness !== undefined ) material.metalness = json.metalness;\n\t\tif ( json.sheen !== undefined ) material.sheen = new Color().setHex( json.sheen );\n\t\tif ( json.emissive !== undefined && material.emissive !== undefined ) material.emissive.setHex( json.emissive );\n\t\tif ( json.specular !== undefined && material.specular !== undefined ) material.specular.setHex( json.specular );\n\t\tif ( json.shininess !== undefined ) material.shininess = json.shininess;\n\t\tif ( json.clearcoat !== undefined ) material.clearcoat = json.clearcoat;\n\t\tif ( json.clearcoatRoughness !== undefined ) material.clearcoatRoughness = json.clearcoatRoughness;\n\t\tif ( json.transmission !== undefined ) material.transmission = json.transmission;\n\t\tif ( json.thickness !== undefined ) material.thickness = json.thickness;\n\t\tif ( json.attenuationDistance !== undefined ) material.attenuationDistance = json.attenuationDistance;\n\t\tif ( json.attenuationColor !== undefined && material.attenuationColor !== undefined ) material.attenuationColor.setHex( json.attenuationColor );\n\t\tif ( json.fog !== undefined ) material.fog = json.fog;\n\t\tif ( json.flatShading !== undefined ) material.flatShading = json.flatShading;\n\t\tif ( json.blending !== undefined ) material.blending = json.blending;\n\t\tif ( json.combine !== undefined ) material.combine = json.combine;\n\t\tif ( json.side !== undefined ) material.side = json.side;\n\t\tif ( json.shadowSide !== undefined ) material.shadowSide = json.shadowSide;\n\t\tif ( json.opacity !== undefined ) material.opacity = json.opacity;\n\t\tif ( json.transparent !== undefined ) material.transparent = json.transparent;\n\t\tif ( json.alphaTest !== undefined ) material.alphaTest = json.alphaTest;\n\t\tif ( json.depthTest !== undefined ) material.depthTest = json.depthTest;\n\t\tif ( json.depthWrite !== undefined ) material.depthWrite = json.depthWrite;\n\t\tif ( json.colorWrite !== undefined ) material.colorWrite = json.colorWrite;\n\n\t\tif ( json.stencilWrite !== undefined ) material.stencilWrite = json.stencilWrite;\n\t\tif ( json.stencilWriteMask !== undefined ) material.stencilWriteMask = json.stencilWriteMask;\n\t\tif ( json.stencilFunc !== undefined ) material.stencilFunc = json.stencilFunc;\n\t\tif ( json.stencilRef !== undefined ) material.stencilRef = json.stencilRef;\n\t\tif ( json.stencilFuncMask !== undefined ) material.stencilFuncMask = json.stencilFuncMask;\n\t\tif ( json.stencilFail !== undefined ) material.stencilFail = json.stencilFail;\n\t\tif ( json.stencilZFail !== undefined ) material.stencilZFail = json.stencilZFail;\n\t\tif ( json.stencilZPass !== undefined ) material.stencilZPass = json.stencilZPass;\n\n\t\tif ( json.wireframe !== undefined ) material.wireframe = json.wireframe;\n\t\tif ( json.wireframeLinewidth !== undefined ) material.wireframeLinewidth = json.wireframeLinewidth;\n\t\tif ( json.wireframeLinecap !== undefined ) material.wireframeLinecap = json.wireframeLinecap;\n\t\tif ( json.wireframeLinejoin !== undefined ) material.wireframeLinejoin = json.wireframeLinejoin;\n\n\t\tif ( json.rotation !== undefined ) material.rotation = json.rotation;\n\n\t\tif ( json.linewidth !== 1 ) material.linewidth = json.linewidth;\n\t\tif ( json.dashSize !== undefined ) material.dashSize = json.dashSize;\n\t\tif ( json.gapSize !== undefined ) material.gapSize = json.gapSize;\n\t\tif ( json.scale !== undefined ) material.scale = json.scale;\n\n\t\tif ( json.polygonOffset !== undefined ) material.polygonOffset = json.polygonOffset;\n\t\tif ( json.polygonOffsetFactor !== undefined ) material.polygonOffsetFactor = json.polygonOffsetFactor;\n\t\tif ( json.polygonOffsetUnits !== undefined ) material.polygonOffsetUnits = json.polygonOffsetUnits;\n\n\t\tif ( json.morphTargets !== undefined ) material.morphTargets = json.morphTargets;\n\t\tif ( json.morphNormals !== undefined ) material.morphNormals = json.morphNormals;\n\t\tif ( json.dithering !== undefined ) material.dithering = json.dithering;\n\n\t\tif ( json.alphaToCoverage !== undefined ) material.alphaToCoverage = json.alphaToCoverage;\n\t\tif ( json.premultipliedAlpha !== undefined ) material.premultipliedAlpha = json.premultipliedAlpha;\n\n\t\tif ( json.vertexTangents !== undefined ) material.vertexTangents = json.vertexTangents;\n\n\t\tif ( json.visible !== undefined ) material.visible = json.visible;\n\n\t\tif ( json.toneMapped !== undefined ) material.toneMapped = json.toneMapped;\n\n\t\tif ( json.userData !== undefined ) material.userData = json.userData;\n\n\t\tif ( json.vertexColors !== undefined ) {\n\n\t\t\tif ( typeof json.vertexColors === 'number' ) {\n\n\t\t\t\tmaterial.vertexColors = ( json.vertexColors > 0 ) ? true : false;\n\n\t\t\t} else {\n\n\t\t\t\tmaterial.vertexColors = json.vertexColors;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Shader Material\n\n\t\tif ( json.uniforms !== undefined ) {\n\n\t\t\tfor ( const name in json.uniforms ) {\n\n\t\t\t\tconst uniform = json.uniforms[ name ];\n\n\t\t\t\tmaterial.uniforms[ name ] = {};\n\n\t\t\t\tswitch ( uniform.type ) {\n\n\t\t\t\t\tcase 't':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = getTexture( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Color().setHex( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v2':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector2().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v3':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector3().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'v4':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Vector4().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'm3':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Matrix3().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'm4':\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = new Matrix4().fromArray( uniform.value );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tmaterial.uniforms[ name ].value = uniform.value;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json.defines !== undefined ) material.defines = json.defines;\n\t\tif ( json.vertexShader !== undefined ) material.vertexShader = json.vertexShader;\n\t\tif ( json.fragmentShader !== undefined ) material.fragmentShader = json.fragmentShader;\n\n\t\tif ( json.extensions !== undefined ) {\n\n\t\t\tfor ( const key in json.extensions ) {\n\n\t\t\t\tmaterial.extensions[ key ] = json.extensions[ key ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Deprecated\n\n\t\tif ( json.shading !== undefined ) material.flatShading = json.shading === 1; // THREE.FlatShading\n\n\t\t// for PointsMaterial\n\n\t\tif ( json.size !== undefined ) material.size = json.size;\n\t\tif ( json.sizeAttenuation !== undefined ) material.sizeAttenuation = json.sizeAttenuation;\n\n\t\t// maps\n\n\t\tif ( json.map !== undefined ) material.map = getTexture( json.map );\n\t\tif ( json.matcap !== undefined ) material.matcap = getTexture( json.matcap );\n\n\t\tif ( json.alphaMap !== undefined ) material.alphaMap = getTexture( json.alphaMap );\n\n\t\tif ( json.bumpMap !== undefined ) material.bumpMap = getTexture( json.bumpMap );\n\t\tif ( json.bumpScale !== undefined ) material.bumpScale = json.bumpScale;\n\n\t\tif ( json.normalMap !== undefined ) material.normalMap = getTexture( json.normalMap );\n\t\tif ( json.normalMapType !== undefined ) material.normalMapType = json.normalMapType;\n\t\tif ( json.normalScale !== undefined ) {\n\n\t\t\tlet normalScale = json.normalScale;\n\n\t\t\tif ( Array.isArray( normalScale ) === false ) {\n\n\t\t\t\t// Blender exporter used to export a scalar. See #7459\n\n\t\t\t\tnormalScale = [ normalScale, normalScale ];\n\n\t\t\t}\n\n\t\t\tmaterial.normalScale = new Vector2().fromArray( normalScale );\n\n\t\t}\n\n\t\tif ( json.displacementMap !== undefined ) material.displacementMap = getTexture( json.displacementMap );\n\t\tif ( json.displacementScale !== undefined ) material.displacementScale = json.displacementScale;\n\t\tif ( json.displacementBias !== undefined ) material.displacementBias = json.displacementBias;\n\n\t\tif ( json.roughnessMap !== undefined ) material.roughnessMap = getTexture( json.roughnessMap );\n\t\tif ( json.metalnessMap !== undefined ) material.metalnessMap = getTexture( json.metalnessMap );\n\n\t\tif ( json.emissiveMap !== undefined ) material.emissiveMap = getTexture( json.emissiveMap );\n\t\tif ( json.emissiveIntensity !== undefined ) material.emissiveIntensity = json.emissiveIntensity;\n\n\t\tif ( json.specularMap !== undefined ) material.specularMap = getTexture( json.specularMap );\n\n\t\tif ( json.envMap !== undefined ) material.envMap = getTexture( json.envMap );\n\t\tif ( json.envMapIntensity !== undefined ) material.envMapIntensity = json.envMapIntensity;\n\n\t\tif ( json.reflectivity !== undefined ) material.reflectivity = json.reflectivity;\n\t\tif ( json.refractionRatio !== undefined ) material.refractionRatio = json.refractionRatio;\n\n\t\tif ( json.lightMap !== undefined ) material.lightMap = getTexture( json.lightMap );\n\t\tif ( json.lightMapIntensity !== undefined ) material.lightMapIntensity = json.lightMapIntensity;\n\n\t\tif ( json.aoMap !== undefined ) material.aoMap = getTexture( json.aoMap );\n\t\tif ( json.aoMapIntensity !== undefined ) material.aoMapIntensity = json.aoMapIntensity;\n\n\t\tif ( json.gradientMap !== undefined ) material.gradientMap = getTexture( json.gradientMap );\n\n\t\tif ( json.clearcoatMap !== undefined ) material.clearcoatMap = getTexture( json.clearcoatMap );\n\t\tif ( json.clearcoatRoughnessMap !== undefined ) material.clearcoatRoughnessMap = getTexture( json.clearcoatRoughnessMap );\n\t\tif ( json.clearcoatNormalMap !== undefined ) material.clearcoatNormalMap = getTexture( json.clearcoatNormalMap );\n\t\tif ( json.clearcoatNormalScale !== undefined ) material.clearcoatNormalScale = new Vector2().fromArray( json.clearcoatNormalScale );\n\n\t\tif ( json.transmissionMap !== undefined ) material.transmissionMap = getTexture( json.transmissionMap );\n\t\tif ( json.thicknessMap !== undefined ) material.thicknessMap = getTexture( json.thicknessMap );\n\n\t\treturn material;\n\n\t}\n\n\tsetTextures( value ) {\n\n\t\tthis.textures = value;\n\t\treturn this;\n\n\t}\n\n}\n\nclass LoaderUtils {\n\n\tstatic decodeText( array ) {\n\n\t\tif ( typeof TextDecoder !== 'undefined' ) {\n\n\t\t\treturn new TextDecoder().decode( array );\n\n\t\t}\n\n\t\t// Avoid the String.fromCharCode.apply(null, array) shortcut, which\n\t\t// throws a \"maximum call stack size exceeded\" error for large arrays.\n\n\t\tlet s = '';\n\n\t\tfor ( let i = 0, il = array.length; i < il; i ++ ) {\n\n\t\t\t// Implicitly assumes little-endian.\n\t\t\ts += String.fromCharCode( array[ i ] );\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// merges multi-byte utf-8 characters.\n\n\t\t\treturn decodeURIComponent( escape( s ) );\n\n\t\t} catch ( e ) { // see #16358\n\n\t\t\treturn s;\n\n\t\t}\n\n\t}\n\n\tstatic extractUrlBase( url ) {\n\n\t\tconst index = url.lastIndexOf( '/' );\n\n\t\tif ( index === - 1 ) return './';\n\n\t\treturn url.substr( 0, index + 1 );\n\n\t}\n\n}\n\nclass InstancedBufferGeometry extends BufferGeometry {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'InstancedBufferGeometry';\n\t\tthis.instanceCount = Infinity;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.instanceCount = source.instanceCount;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON( this );\n\n\t\tdata.instanceCount = this.instanceCount;\n\n\t\tdata.isInstancedBufferGeometry = true;\n\n\t\treturn data;\n\n\t}\n\n}\n\nInstancedBufferGeometry.prototype.isInstancedBufferGeometry = true;\n\nclass InstancedBufferAttribute extends BufferAttribute {\n\n\tconstructor( array, itemSize, normalized, meshPerAttribute = 1 ) {\n\n\t\tif ( typeof normalized === 'number' ) {\n\n\t\t\tmeshPerAttribute = normalized;\n\n\t\t\tnormalized = false;\n\n\t\t\tconsole.error( 'THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.' );\n\n\t\t}\n\n\t\tsuper( array, itemSize, normalized );\n\n\t\tthis.meshPerAttribute = meshPerAttribute;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\n\t\treturn this;\n\n\t}\n\n\ttoJSON() {\n\n\t\tconst data = super.toJSON();\n\n\t\tdata.meshPerAttribute = this.meshPerAttribute;\n\n\t\tdata.isInstancedBufferAttribute = true;\n\n\t\treturn data;\n\n\t}\n\n}\n\nInstancedBufferAttribute.prototype.isInstancedBufferAttribute = true;\n\nclass BufferGeometryLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( scope.manager );\n\t\tloader.setPath( scope.path );\n\t\tloader.setRequestHeader( scope.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( JSON.parse( text ) ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\tconst interleavedBufferMap = {};\n\t\tconst arrayBufferMap = {};\n\n\t\tfunction getInterleavedBuffer( json, uuid ) {\n\n\t\t\tif ( interleavedBufferMap[ uuid ] !== undefined ) return interleavedBufferMap[ uuid ];\n\n\t\t\tconst interleavedBuffers = json.interleavedBuffers;\n\t\t\tconst interleavedBuffer = interleavedBuffers[ uuid ];\n\n\t\t\tconst buffer = getArrayBuffer( json, interleavedBuffer.buffer );\n\n\t\t\tconst array = getTypedArray( interleavedBuffer.type, buffer );\n\t\t\tconst ib = new InterleavedBuffer( array, interleavedBuffer.stride );\n\t\t\tib.uuid = interleavedBuffer.uuid;\n\n\t\t\tinterleavedBufferMap[ uuid ] = ib;\n\n\t\t\treturn ib;\n\n\t\t}\n\n\t\tfunction getArrayBuffer( json, uuid ) {\n\n\t\t\tif ( arrayBufferMap[ uuid ] !== undefined ) return arrayBufferMap[ uuid ];\n\n\t\t\tconst arrayBuffers = json.arrayBuffers;\n\t\t\tconst arrayBuffer = arrayBuffers[ uuid ];\n\n\t\t\tconst ab = new Uint32Array( arrayBuffer ).buffer;\n\n\t\t\tarrayBufferMap[ uuid ] = ab;\n\n\t\t\treturn ab;\n\n\t\t}\n\n\t\tconst geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry();\n\n\t\tconst index = json.data.index;\n\n\t\tif ( index !== undefined ) {\n\n\t\t\tconst typedArray = getTypedArray( index.type, index.array );\n\t\t\tgeometry.setIndex( new BufferAttribute( typedArray, 1 ) );\n\n\t\t}\n\n\t\tconst attributes = json.data.attributes;\n\n\t\tfor ( const key in attributes ) {\n\n\t\t\tconst attribute = attributes[ key ];\n\t\t\tlet bufferAttribute;\n\n\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\tconst interleavedBuffer = getInterleavedBuffer( json.data, attribute.data );\n\t\t\t\tbufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized );\n\n\t\t\t} else {\n\n\t\t\t\tconst typedArray = getTypedArray( attribute.type, attribute.array );\n\t\t\t\tconst bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute;\n\t\t\t\tbufferAttribute = new bufferAttributeConstr( typedArray, attribute.itemSize, attribute.normalized );\n\n\t\t\t}\n\n\t\t\tif ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;\n\t\t\tif ( attribute.usage !== undefined ) bufferAttribute.setUsage( attribute.usage );\n\n\t\t\tif ( attribute.updateRange !== undefined ) {\n\n\t\t\t\tbufferAttribute.updateRange.offset = attribute.updateRange.offset;\n\t\t\t\tbufferAttribute.updateRange.count = attribute.updateRange.count;\n\n\t\t\t}\n\n\t\t\tgeometry.setAttribute( key, bufferAttribute );\n\n\t\t}\n\n\t\tconst morphAttributes = json.data.morphAttributes;\n\n\t\tif ( morphAttributes ) {\n\n\t\t\tfor ( const key in morphAttributes ) {\n\n\t\t\t\tconst attributeArray = morphAttributes[ key ];\n\n\t\t\t\tconst array = [];\n\n\t\t\t\tfor ( let i = 0, il = attributeArray.length; i < il; i ++ ) {\n\n\t\t\t\t\tconst attribute = attributeArray[ i ];\n\t\t\t\t\tlet bufferAttribute;\n\n\t\t\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\t\t\tconst interleavedBuffer = getInterleavedBuffer( json.data, attribute.data );\n\t\t\t\t\t\tbufferAttribute = new InterleavedBufferAttribute( interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst typedArray = getTypedArray( attribute.type, attribute.array );\n\t\t\t\t\t\tbufferAttribute = new BufferAttribute( typedArray, attribute.itemSize, attribute.normalized );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( attribute.name !== undefined ) bufferAttribute.name = attribute.name;\n\t\t\t\t\tarray.push( bufferAttribute );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.morphAttributes[ key ] = array;\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst morphTargetsRelative = json.data.morphTargetsRelative;\n\n\t\tif ( morphTargetsRelative ) {\n\n\t\t\tgeometry.morphTargetsRelative = true;\n\n\t\t}\n\n\t\tconst groups = json.data.groups || json.data.drawcalls || json.data.offsets;\n\n\t\tif ( groups !== undefined ) {\n\n\t\t\tfor ( let i = 0, n = groups.length; i !== n; ++ i ) {\n\n\t\t\t\tconst group = groups[ i ];\n\n\t\t\t\tgeometry.addGroup( group.start, group.count, group.materialIndex );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst boundingSphere = json.data.boundingSphere;\n\n\t\tif ( boundingSphere !== undefined ) {\n\n\t\t\tconst center = new Vector3();\n\n\t\t\tif ( boundingSphere.center !== undefined ) {\n\n\t\t\t\tcenter.fromArray( boundingSphere.center );\n\n\t\t\t}\n\n\t\t\tgeometry.boundingSphere = new Sphere( center, boundingSphere.radius );\n\n\t\t}\n\n\t\tif ( json.name ) geometry.name = json.name;\n\t\tif ( json.userData ) geometry.userData = json.userData;\n\n\t\treturn geometry;\n\n\t}\n\n}\n\nclass ObjectLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path;\n\t\tthis.resourcePath = this.resourcePath || path;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\tlet json = null;\n\n\t\t\ttry {\n\n\t\t\t\tjson = JSON.parse( text );\n\n\t\t\t} catch ( error ) {\n\n\t\t\t\tif ( onError !== undefined ) onError( error );\n\n\t\t\t\tconsole.error( 'THREE:ObjectLoader: Can\\'t parse ' + url + '.', error.message );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tconst metadata = json.metadata;\n\n\t\t\tif ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {\n\n\t\t\t\tconsole.error( 'THREE.ObjectLoader: Can\\'t load ' + url );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tscope.parse( json, onLoad );\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tasync loadAsync( url, onProgress ) {\n\n\t\tconst scope = this;\n\n\t\tconst path = ( this.path === '' ) ? LoaderUtils.extractUrlBase( url ) : this.path;\n\t\tthis.resourcePath = this.resourcePath || path;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\tconst text = await loader.loadAsync( url, onProgress );\n\n\t\tconst json = JSON.parse( text );\n\n\t\tconst metadata = json.metadata;\n\n\t\tif ( metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry' ) {\n\n\t\t\tthrow new Error( 'THREE.ObjectLoader: Can\\'t load ' + url );\n\n\t\t}\n\n\t\treturn await scope.parseAsync( json );\n\n\t}\n\n\tparse( json, onLoad ) {\n\n\t\tconst animations = this.parseAnimations( json.animations );\n\t\tconst shapes = this.parseShapes( json.shapes );\n\t\tconst geometries = this.parseGeometries( json.geometries, shapes );\n\n\t\tconst images = this.parseImages( json.images, function () {\n\n\t\t\tif ( onLoad !== undefined ) onLoad( object );\n\n\t\t} );\n\n\t\tconst textures = this.parseTextures( json.textures, images );\n\t\tconst materials = this.parseMaterials( json.materials, textures );\n\n\t\tconst object = this.parseObject( json.object, geometries, materials, textures, animations );\n\t\tconst skeletons = this.parseSkeletons( json.skeletons, object );\n\n\t\tthis.bindSkeletons( object, skeletons );\n\n\t\t//\n\n\t\tif ( onLoad !== undefined ) {\n\n\t\t\tlet hasImages = false;\n\n\t\t\tfor ( const uuid in images ) {\n\n\t\t\t\tif ( images[ uuid ] instanceof HTMLImageElement ) {\n\n\t\t\t\t\thasImages = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( hasImages === false ) onLoad( object );\n\n\t\t}\n\n\t\treturn object;\n\n\t}\n\n\tasync parseAsync( json ) {\n\n\t\tconst animations = this.parseAnimations( json.animations );\n\t\tconst shapes = this.parseShapes( json.shapes );\n\t\tconst geometries = this.parseGeometries( json.geometries, shapes );\n\n\t\tconst images = await this.parseImagesAsync( json.images );\n\n\t\tconst textures = this.parseTextures( json.textures, images );\n\t\tconst materials = this.parseMaterials( json.materials, textures );\n\n\t\tconst object = this.parseObject( json.object, geometries, materials, textures, animations );\n\t\tconst skeletons = this.parseSkeletons( json.skeletons, object );\n\n\t\tthis.bindSkeletons( object, skeletons );\n\n\t\treturn object;\n\n\t}\n\n\tparseShapes( json ) {\n\n\t\tconst shapes = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst shape = new Shape().fromJSON( json[ i ] );\n\n\t\t\t\tshapes[ shape.uuid ] = shape;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn shapes;\n\n\t}\n\n\tparseSkeletons( json, object ) {\n\n\t\tconst skeletons = {};\n\t\tconst bones = {};\n\n\t\t// generate bone lookup table\n\n\t\tobject.traverse( function ( child ) {\n\n\t\t\tif ( child.isBone ) bones[ child.uuid ] = child;\n\n\t\t} );\n\n\t\t// create skeletons\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst skeleton = new Skeleton().fromJSON( json[ i ], bones );\n\n\t\t\t\tskeletons[ skeleton.uuid ] = skeleton;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn skeletons;\n\n\t}\n\n\tparseGeometries( json, shapes ) {\n\n\t\tconst geometries = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tconst bufferGeometryLoader = new BufferGeometryLoader();\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tlet geometry;\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tswitch ( data.type ) {\n\n\t\t\t\t\tcase 'BufferGeometry':\n\t\t\t\t\tcase 'InstancedBufferGeometry':\n\n\t\t\t\t\t\tgeometry = bufferGeometryLoader.parse( data );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Geometry':\n\n\t\t\t\t\t\tconsole.error( 'THREE.ObjectLoader: The legacy Geometry type is no longer supported.' );\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tif ( data.type in Geometries ) {\n\n\t\t\t\t\t\t\tgeometry = Geometries[ data.type ].fromJSON( data, shapes );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tconsole.warn( `THREE.ObjectLoader: Unsupported geometry type \"${ data.type }\"` );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.uuid = data.uuid;\n\n\t\t\t\tif ( data.name !== undefined ) geometry.name = data.name;\n\t\t\t\tif ( geometry.isBufferGeometry === true && data.userData !== undefined ) geometry.userData = data.userData;\n\n\t\t\t\tgeometries[ data.uuid ] = geometry;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn geometries;\n\n\t}\n\n\tparseMaterials( json, textures ) {\n\n\t\tconst cache = {}; // MultiMaterial\n\t\tconst materials = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tconst loader = new MaterialLoader();\n\t\t\tloader.setTextures( textures );\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tif ( data.type === 'MultiMaterial' ) {\n\n\t\t\t\t\t// Deprecated\n\n\t\t\t\t\tconst array = [];\n\n\t\t\t\t\tfor ( let j = 0; j < data.materials.length; j ++ ) {\n\n\t\t\t\t\t\tconst material = data.materials[ j ];\n\n\t\t\t\t\t\tif ( cache[ material.uuid ] === undefined ) {\n\n\t\t\t\t\t\t\tcache[ material.uuid ] = loader.parse( material );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarray.push( cache[ material.uuid ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmaterials[ data.uuid ] = array;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( cache[ data.uuid ] === undefined ) {\n\n\t\t\t\t\t\tcache[ data.uuid ] = loader.parse( data );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmaterials[ data.uuid ] = cache[ data.uuid ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn materials;\n\n\t}\n\n\tparseAnimations( json ) {\n\n\t\tconst animations = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0; i < json.length; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tconst clip = AnimationClip.parse( data );\n\n\t\t\t\tanimations[ clip.uuid ] = clip;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn animations;\n\n\t}\n\n\tparseImages( json, onLoad ) {\n\n\t\tconst scope = this;\n\t\tconst images = {};\n\n\t\tlet loader;\n\n\t\tfunction loadImage( url ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\treturn loader.load( url, function () {\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, undefined, function () {\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t} );\n\n\t\t}\n\n\t\tfunction deserializeImage( image ) {\n\n\t\t\tif ( typeof image === 'string' ) {\n\n\t\t\t\tconst url = image;\n\n\t\t\t\tconst path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test( url ) ? url : scope.resourcePath + url;\n\n\t\t\t\treturn loadImage( path );\n\n\t\t\t} else {\n\n\t\t\t\tif ( image.data ) {\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: getTypedArray( image.type, image.data ),\n\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\theight: image.height\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json !== undefined && json.length > 0 ) {\n\n\t\t\tconst manager = new LoadingManager( onLoad );\n\n\t\t\tloader = new ImageLoader( manager );\n\t\t\tloader.setCrossOrigin( this.crossOrigin );\n\n\t\t\tfor ( let i = 0, il = json.length; i < il; i ++ ) {\n\n\t\t\t\tconst image = json[ i ];\n\t\t\t\tconst url = image.url;\n\n\t\t\t\tif ( Array.isArray( url ) ) {\n\n\t\t\t\t\t// load array of images e.g CubeTexture\n\n\t\t\t\t\timages[ image.uuid ] = [];\n\n\t\t\t\t\tfor ( let j = 0, jl = url.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tconst currentUrl = url[ j ];\n\n\t\t\t\t\t\tconst deserializedImage = deserializeImage( currentUrl );\n\n\t\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\t\tif ( deserializedImage instanceof HTMLImageElement ) {\n\n\t\t\t\t\t\t\t\timages[ image.uuid ].push( deserializedImage );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\n\t\t\t\t\t\t\t\timages[ image.uuid ].push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// load single image\n\n\t\t\t\t\tconst deserializedImage = deserializeImage( image.url );\n\n\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\timages[ image.uuid ] = deserializedImage;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn images;\n\n\t}\n\n\tasync parseImagesAsync( json ) {\n\n\t\tconst scope = this;\n\t\tconst images = {};\n\n\t\tlet loader;\n\n\t\tasync function deserializeImage( image ) {\n\n\t\t\tif ( typeof image === 'string' ) {\n\n\t\t\t\tconst url = image;\n\n\t\t\t\tconst path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test( url ) ? url : scope.resourcePath + url;\n\n\t\t\t\treturn await loader.loadAsync( path );\n\n\t\t\t} else {\n\n\t\t\t\tif ( image.data ) {\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdata: getTypedArray( image.type, image.data ),\n\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\theight: image.height\n\t\t\t\t\t};\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( json !== undefined && json.length > 0 ) {\n\n\t\t\tloader = new ImageLoader( this.manager );\n\t\t\tloader.setCrossOrigin( this.crossOrigin );\n\n\t\t\tfor ( let i = 0, il = json.length; i < il; i ++ ) {\n\n\t\t\t\tconst image = json[ i ];\n\t\t\t\tconst url = image.url;\n\n\t\t\t\tif ( Array.isArray( url ) ) {\n\n\t\t\t\t\t// load array of images e.g CubeTexture\n\n\t\t\t\t\timages[ image.uuid ] = [];\n\n\t\t\t\t\tfor ( let j = 0, jl = url.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tconst currentUrl = url[ j ];\n\n\t\t\t\t\t\tconst deserializedImage = await deserializeImage( currentUrl );\n\n\t\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\t\tif ( deserializedImage instanceof HTMLImageElement ) {\n\n\t\t\t\t\t\t\t\timages[ image.uuid ].push( deserializedImage );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\n\t\t\t\t\t\t\t\timages[ image.uuid ].push( new DataTexture( deserializedImage.data, deserializedImage.width, deserializedImage.height ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// load single image\n\n\t\t\t\t\tconst deserializedImage = await deserializeImage( image.url );\n\n\t\t\t\t\tif ( deserializedImage !== null ) {\n\n\t\t\t\t\t\timages[ image.uuid ] = deserializedImage;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn images;\n\n\t}\n\n\tparseTextures( json, images ) {\n\n\t\tfunction parseConstant( value, type ) {\n\n\t\t\tif ( typeof value === 'number' ) return value;\n\n\t\t\tconsole.warn( 'THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value );\n\n\t\t\treturn type[ value ];\n\n\t\t}\n\n\t\tconst textures = {};\n\n\t\tif ( json !== undefined ) {\n\n\t\t\tfor ( let i = 0, l = json.length; i < l; i ++ ) {\n\n\t\t\t\tconst data = json[ i ];\n\n\t\t\t\tif ( data.image === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: No \"image\" specified for', data.uuid );\n\n\t\t\t\t}\n\n\t\t\t\tif ( images[ data.image ] === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined image', data.image );\n\n\t\t\t\t}\n\n\t\t\t\tlet texture;\n\t\t\t\tconst image = images[ data.image ];\n\n\t\t\t\tif ( Array.isArray( image ) ) {\n\n\t\t\t\t\ttexture = new CubeTexture( image );\n\n\t\t\t\t\tif ( image.length === 6 ) texture.needsUpdate = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( image && image.data ) {\n\n\t\t\t\t\t\ttexture = new DataTexture( image.data, image.width, image.height );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\ttexture = new Texture( image );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( image ) texture.needsUpdate = true; // textures can have undefined image data\n\n\t\t\t\t}\n\n\t\t\t\ttexture.uuid = data.uuid;\n\n\t\t\t\tif ( data.name !== undefined ) texture.name = data.name;\n\n\t\t\t\tif ( data.mapping !== undefined ) texture.mapping = parseConstant( data.mapping, TEXTURE_MAPPING );\n\n\t\t\t\tif ( data.offset !== undefined ) texture.offset.fromArray( data.offset );\n\t\t\t\tif ( data.repeat !== undefined ) texture.repeat.fromArray( data.repeat );\n\t\t\t\tif ( data.center !== undefined ) texture.center.fromArray( data.center );\n\t\t\t\tif ( data.rotation !== undefined ) texture.rotation = data.rotation;\n\n\t\t\t\tif ( data.wrap !== undefined ) {\n\n\t\t\t\t\ttexture.wrapS = parseConstant( data.wrap[ 0 ], TEXTURE_WRAPPING );\n\t\t\t\t\ttexture.wrapT = parseConstant( data.wrap[ 1 ], TEXTURE_WRAPPING );\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.format !== undefined ) texture.format = data.format;\n\t\t\t\tif ( data.type !== undefined ) texture.type = data.type;\n\t\t\t\tif ( data.encoding !== undefined ) texture.encoding = data.encoding;\n\n\t\t\t\tif ( data.minFilter !== undefined ) texture.minFilter = parseConstant( data.minFilter, TEXTURE_FILTER );\n\t\t\t\tif ( data.magFilter !== undefined ) texture.magFilter = parseConstant( data.magFilter, TEXTURE_FILTER );\n\t\t\t\tif ( data.anisotropy !== undefined ) texture.anisotropy = data.anisotropy;\n\n\t\t\t\tif ( data.flipY !== undefined ) texture.flipY = data.flipY;\n\n\t\t\t\tif ( data.premultiplyAlpha !== undefined ) texture.premultiplyAlpha = data.premultiplyAlpha;\n\t\t\t\tif ( data.unpackAlignment !== undefined ) texture.unpackAlignment = data.unpackAlignment;\n\n\t\t\t\ttextures[ data.uuid ] = texture;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn textures;\n\n\t}\n\n\tparseObject( data, geometries, materials, textures, animations ) {\n\n\t\tlet object;\n\n\t\tfunction getGeometry( name ) {\n\n\t\t\tif ( geometries[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined geometry', name );\n\n\t\t\t}\n\n\t\t\treturn geometries[ name ];\n\n\t\t}\n\n\t\tfunction getMaterial( name ) {\n\n\t\t\tif ( name === undefined ) return undefined;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\n\t\t\t\tconst array = [];\n\n\t\t\t\tfor ( let i = 0, l = name.length; i < l; i ++ ) {\n\n\t\t\t\t\tconst uuid = name[ i ];\n\n\t\t\t\t\tif ( materials[ uuid ] === undefined ) {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined material', uuid );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tarray.push( materials[ uuid ] );\n\n\t\t\t\t}\n\n\t\t\t\treturn array;\n\n\t\t\t}\n\n\t\t\tif ( materials[ name ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined material', name );\n\n\t\t\t}\n\n\t\t\treturn materials[ name ];\n\n\t\t}\n\n\t\tfunction getTexture( uuid ) {\n\n\t\t\tif ( textures[ uuid ] === undefined ) {\n\n\t\t\t\tconsole.warn( 'THREE.ObjectLoader: Undefined texture', uuid );\n\n\t\t\t}\n\n\t\t\treturn textures[ uuid ];\n\n\t\t}\n\n\t\tlet geometry, material;\n\n\t\tswitch ( data.type ) {\n\n\t\t\tcase 'Scene':\n\n\t\t\t\tobject = new Scene();\n\n\t\t\t\tif ( data.background !== undefined ) {\n\n\t\t\t\t\tif ( Number.isInteger( data.background ) ) {\n\n\t\t\t\t\t\tobject.background = new Color( data.background );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tobject.background = getTexture( data.background );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( data.environment !== undefined ) object.environment = getTexture( data.environment );\n\n\t\t\t\tif ( data.fog !== undefined ) {\n\n\t\t\t\t\tif ( data.fog.type === 'Fog' ) {\n\n\t\t\t\t\t\tobject.fog = new Fog( data.fog.color, data.fog.near, data.fog.far );\n\n\t\t\t\t\t} else if ( data.fog.type === 'FogExp2' ) {\n\n\t\t\t\t\t\tobject.fog = new FogExp2( data.fog.color, data.fog.density );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PerspectiveCamera':\n\n\t\t\t\tobject = new PerspectiveCamera( data.fov, data.aspect, data.near, data.far );\n\n\t\t\t\tif ( data.focus !== undefined ) object.focus = data.focus;\n\t\t\t\tif ( data.zoom !== undefined ) object.zoom = data.zoom;\n\t\t\t\tif ( data.filmGauge !== undefined ) object.filmGauge = data.filmGauge;\n\t\t\t\tif ( data.filmOffset !== undefined ) object.filmOffset = data.filmOffset;\n\t\t\t\tif ( data.view !== undefined ) object.view = Object.assign( {}, data.view );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'OrthographicCamera':\n\n\t\t\t\tobject = new OrthographicCamera( data.left, data.right, data.top, data.bottom, data.near, data.far );\n\n\t\t\t\tif ( data.zoom !== undefined ) object.zoom = data.zoom;\n\t\t\t\tif ( data.view !== undefined ) object.view = Object.assign( {}, data.view );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'AmbientLight':\n\n\t\t\t\tobject = new AmbientLight( data.color, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'DirectionalLight':\n\n\t\t\t\tobject = new DirectionalLight( data.color, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PointLight':\n\n\t\t\t\tobject = new PointLight( data.color, data.intensity, data.distance, data.decay );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'RectAreaLight':\n\n\t\t\t\tobject = new RectAreaLight( data.color, data.intensity, data.width, data.height );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'SpotLight':\n\n\t\t\t\tobject = new SpotLight( data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'HemisphereLight':\n\n\t\t\t\tobject = new HemisphereLight( data.color, data.groundColor, data.intensity );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LightProbe':\n\n\t\t\t\tobject = new LightProbe().fromJSON( data );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'SkinnedMesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t \tmaterial = getMaterial( data.material );\n\n\t\t\t\tobject = new SkinnedMesh( geometry, material );\n\n\t\t\t\tif ( data.bindMode !== undefined ) object.bindMode = data.bindMode;\n\t\t\t\tif ( data.bindMatrix !== undefined ) object.bindMatrix.fromArray( data.bindMatrix );\n\t\t\t\tif ( data.skeleton !== undefined ) object.skeleton = data.skeleton;\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Mesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t\tmaterial = getMaterial( data.material );\n\n\t\t\t\tobject = new Mesh( geometry, material );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'InstancedMesh':\n\n\t\t\t\tgeometry = getGeometry( data.geometry );\n\t\t\t\tmaterial = getMaterial( data.material );\n\t\t\t\tconst count = data.count;\n\t\t\t\tconst instanceMatrix = data.instanceMatrix;\n\t\t\t\tconst instanceColor = data.instanceColor;\n\n\t\t\t\tobject = new InstancedMesh( geometry, material, count );\n\t\t\t\tobject.instanceMatrix = new BufferAttribute( new Float32Array( instanceMatrix.array ), 16 );\n\t\t\t\tif ( instanceColor !== undefined ) object.instanceColor = new BufferAttribute( new Float32Array( instanceColor.array ), instanceColor.itemSize );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LOD':\n\n\t\t\t\tobject = new LOD();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Line':\n\n\t\t\t\tobject = new Line( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LineLoop':\n\n\t\t\t\tobject = new LineLoop( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'LineSegments':\n\n\t\t\t\tobject = new LineSegments( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'PointCloud':\n\t\t\tcase 'Points':\n\n\t\t\t\tobject = new Points( getGeometry( data.geometry ), getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Sprite':\n\n\t\t\t\tobject = new Sprite( getMaterial( data.material ) );\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Group':\n\n\t\t\t\tobject = new Group();\n\n\t\t\t\tbreak;\n\n\t\t\tcase 'Bone':\n\n\t\t\t\tobject = new Bone();\n\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\tobject = new Object3D();\n\n\t\t}\n\n\t\tobject.uuid = data.uuid;\n\n\t\tif ( data.name !== undefined ) object.name = data.name;\n\n\t\tif ( data.matrix !== undefined ) {\n\n\t\t\tobject.matrix.fromArray( data.matrix );\n\n\t\t\tif ( data.matrixAutoUpdate !== undefined ) object.matrixAutoUpdate = data.matrixAutoUpdate;\n\t\t\tif ( object.matrixAutoUpdate ) object.matrix.decompose( object.position, object.quaternion, object.scale );\n\n\t\t} else {\n\n\t\t\tif ( data.position !== undefined ) object.position.fromArray( data.position );\n\t\t\tif ( data.rotation !== undefined ) object.rotation.fromArray( data.rotation );\n\t\t\tif ( data.quaternion !== undefined ) object.quaternion.fromArray( data.quaternion );\n\t\t\tif ( data.scale !== undefined ) object.scale.fromArray( data.scale );\n\n\t\t}\n\n\t\tif ( data.castShadow !== undefined ) object.castShadow = data.castShadow;\n\t\tif ( data.receiveShadow !== undefined ) object.receiveShadow = data.receiveShadow;\n\n\t\tif ( data.shadow ) {\n\n\t\t\tif ( data.shadow.bias !== undefined ) object.shadow.bias = data.shadow.bias;\n\t\t\tif ( data.shadow.normalBias !== undefined ) object.shadow.normalBias = data.shadow.normalBias;\n\t\t\tif ( data.shadow.radius !== undefined ) object.shadow.radius = data.shadow.radius;\n\t\t\tif ( data.shadow.mapSize !== undefined ) object.shadow.mapSize.fromArray( data.shadow.mapSize );\n\t\t\tif ( data.shadow.camera !== undefined ) object.shadow.camera = this.parseObject( data.shadow.camera );\n\n\t\t}\n\n\t\tif ( data.visible !== undefined ) object.visible = data.visible;\n\t\tif ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled;\n\t\tif ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder;\n\t\tif ( data.userData !== undefined ) object.userData = data.userData;\n\t\tif ( data.layers !== undefined ) object.layers.mask = data.layers;\n\n\t\tif ( data.children !== undefined ) {\n\n\t\t\tconst children = data.children;\n\n\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\tobject.add( this.parseObject( children[ i ], geometries, materials, textures, animations ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( data.animations !== undefined ) {\n\n\t\t\tconst objectAnimations = data.animations;\n\n\t\t\tfor ( let i = 0; i < objectAnimations.length; i ++ ) {\n\n\t\t\t\tconst uuid = objectAnimations[ i ];\n\n\t\t\t\tobject.animations.push( animations[ uuid ] );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( data.type === 'LOD' ) {\n\n\t\t\tif ( data.autoUpdate !== undefined ) object.autoUpdate = data.autoUpdate;\n\n\t\t\tconst levels = data.levels;\n\n\t\t\tfor ( let l = 0; l < levels.length; l ++ ) {\n\n\t\t\t\tconst level = levels[ l ];\n\t\t\t\tconst child = object.getObjectByProperty( 'uuid', level.object );\n\n\t\t\t\tif ( child !== undefined ) {\n\n\t\t\t\t\tobject.addLevel( child, level.distance );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn object;\n\n\t}\n\n\tbindSkeletons( object, skeletons ) {\n\n\t\tif ( Object.keys( skeletons ).length === 0 ) return;\n\n\t\tobject.traverse( function ( child ) {\n\n\t\t\tif ( child.isSkinnedMesh === true && child.skeleton !== undefined ) {\n\n\t\t\t\tconst skeleton = skeletons[ child.skeleton ];\n\n\t\t\t\tif ( skeleton === undefined ) {\n\n\t\t\t\t\tconsole.warn( 'THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tchild.bind( skeleton, child.bindMatrix );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} );\n\n\t}\n\n\t/* DEPRECATED */\n\n\tsetTexturePath( value ) {\n\n\t\tconsole.warn( 'THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().' );\n\t\treturn this.setResourcePath( value );\n\n\t}\n\n}\n\nconst TEXTURE_MAPPING = {\n\tUVMapping: UVMapping,\n\tCubeReflectionMapping: CubeReflectionMapping,\n\tCubeRefractionMapping: CubeRefractionMapping,\n\tEquirectangularReflectionMapping: EquirectangularReflectionMapping,\n\tEquirectangularRefractionMapping: EquirectangularRefractionMapping,\n\tCubeUVReflectionMapping: CubeUVReflectionMapping,\n\tCubeUVRefractionMapping: CubeUVRefractionMapping\n};\n\nconst TEXTURE_WRAPPING = {\n\tRepeatWrapping: RepeatWrapping,\n\tClampToEdgeWrapping: ClampToEdgeWrapping,\n\tMirroredRepeatWrapping: MirroredRepeatWrapping\n};\n\nconst TEXTURE_FILTER = {\n\tNearestFilter: NearestFilter,\n\tNearestMipmapNearestFilter: NearestMipmapNearestFilter,\n\tNearestMipmapLinearFilter: NearestMipmapLinearFilter,\n\tLinearFilter: LinearFilter,\n\tLinearMipmapNearestFilter: LinearMipmapNearestFilter,\n\tLinearMipmapLinearFilter: LinearMipmapLinearFilter\n};\n\nclass ImageBitmapLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t\tif ( typeof createImageBitmap === 'undefined' ) {\n\n\t\t\tconsole.warn( 'THREE.ImageBitmapLoader: createImageBitmap() not supported.' );\n\n\t\t}\n\n\t\tif ( typeof fetch === 'undefined' ) {\n\n\t\t\tconsole.warn( 'THREE.ImageBitmapLoader: fetch() not supported.' );\n\n\t\t}\n\n\t\tthis.options = { premultiplyAlpha: 'none' };\n\n\t}\n\n\tsetOptions( options ) {\n\n\t\tthis.options = options;\n\n\t\treturn this;\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tif ( url === undefined ) url = '';\n\n\t\tif ( this.path !== undefined ) url = this.path + url;\n\n\t\turl = this.manager.resolveURL( url );\n\n\t\tconst scope = this;\n\n\t\tconst cached = Cache.get( url );\n\n\t\tif ( cached !== undefined ) {\n\n\t\t\tscope.manager.itemStart( url );\n\n\t\t\tsetTimeout( function () {\n\n\t\t\t\tif ( onLoad ) onLoad( cached );\n\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t}, 0 );\n\n\t\t\treturn cached;\n\n\t\t}\n\n\t\tconst fetchOptions = {};\n\t\tfetchOptions.credentials = ( this.crossOrigin === 'anonymous' ) ? 'same-origin' : 'include';\n\t\tfetchOptions.headers = this.requestHeader;\n\n\t\tfetch( url, fetchOptions ).then( function ( res ) {\n\n\t\t\treturn res.blob();\n\n\t\t} ).then( function ( blob ) {\n\n\t\t\treturn createImageBitmap( blob, Object.assign( scope.options, { colorSpaceConversion: 'none' } ) );\n\n\t\t} ).then( function ( imageBitmap ) {\n\n\t\t\tCache.add( url, imageBitmap );\n\n\t\t\tif ( onLoad ) onLoad( imageBitmap );\n\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t} ).catch( function ( e ) {\n\n\t\t\tif ( onError ) onError( e );\n\n\t\t\tscope.manager.itemError( url );\n\t\t\tscope.manager.itemEnd( url );\n\n\t\t} );\n\n\t\tscope.manager.itemStart( url );\n\n\t}\n\n}\n\nImageBitmapLoader.prototype.isImageBitmapLoader = true;\n\nclass ShapePath {\n\n\tconstructor() {\n\n\t\tthis.type = 'ShapePath';\n\n\t\tthis.color = new Color();\n\n\t\tthis.subPaths = [];\n\t\tthis.currentPath = null;\n\n\t}\n\n\tmoveTo( x, y ) {\n\n\t\tthis.currentPath = new Path();\n\t\tthis.subPaths.push( this.currentPath );\n\t\tthis.currentPath.moveTo( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tlineTo( x, y ) {\n\n\t\tthis.currentPath.lineTo( x, y );\n\n\t\treturn this;\n\n\t}\n\n\tquadraticCurveTo( aCPx, aCPy, aX, aY ) {\n\n\t\tthis.currentPath.quadraticCurveTo( aCPx, aCPy, aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tbezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY ) {\n\n\t\tthis.currentPath.bezierCurveTo( aCP1x, aCP1y, aCP2x, aCP2y, aX, aY );\n\n\t\treturn this;\n\n\t}\n\n\tsplineThru( pts ) {\n\n\t\tthis.currentPath.splineThru( pts );\n\n\t\treturn this;\n\n\t}\n\n\ttoShapes( isCCW, noHoles ) {\n\n\t\tfunction toShapesNoHoles( inSubpaths ) {\n\n\t\t\tconst shapes = [];\n\n\t\t\tfor ( let i = 0, l = inSubpaths.length; i < l; i ++ ) {\n\n\t\t\t\tconst tmpPath = inSubpaths[ i ];\n\n\t\t\t\tconst tmpShape = new Shape();\n\t\t\t\ttmpShape.curves = tmpPath.curves;\n\n\t\t\t\tshapes.push( tmpShape );\n\n\t\t\t}\n\n\t\t\treturn shapes;\n\n\t\t}\n\n\t\tfunction isPointInsidePolygon( inPt, inPolygon ) {\n\n\t\t\tconst polyLen = inPolygon.length;\n\n\t\t\t// inPt on polygon contour => immediate success or\n\t\t\t// toggling of inside/outside at every single! intersection point of an edge\n\t\t\t// with the horizontal line through inPt, left of inPt\n\t\t\t// not counting lowerY endpoints of edges and whole edges on that line\n\t\t\tlet inside = false;\n\t\t\tfor ( let p = polyLen - 1, q = 0; q < polyLen; p = q ++ ) {\n\n\t\t\t\tlet edgeLowPt = inPolygon[ p ];\n\t\t\t\tlet edgeHighPt = inPolygon[ q ];\n\n\t\t\t\tlet edgeDx = edgeHighPt.x - edgeLowPt.x;\n\t\t\t\tlet edgeDy = edgeHighPt.y - edgeLowPt.y;\n\n\t\t\t\tif ( Math.abs( edgeDy ) > Number.EPSILON ) {\n\n\t\t\t\t\t// not parallel\n\t\t\t\t\tif ( edgeDy < 0 ) {\n\n\t\t\t\t\t\tedgeLowPt = inPolygon[ q ]; edgeDx = - edgeDx;\n\t\t\t\t\t\tedgeHighPt = inPolygon[ p ]; edgeDy = - edgeDy;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ( inPt.y < edgeLowPt.y ) || ( inPt.y > edgeHighPt.y ) ) \t\tcontinue;\n\n\t\t\t\t\tif ( inPt.y === edgeLowPt.y ) {\n\n\t\t\t\t\t\tif ( inPt.x === edgeLowPt.x )\t\treturn\ttrue;\t\t// inPt is on contour ?\n\t\t\t\t\t\t// continue;\t\t\t\t// no intersection or edgeLowPt => doesn't count !!!\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconst perpEdge = edgeDy * ( inPt.x - edgeLowPt.x ) - edgeDx * ( inPt.y - edgeLowPt.y );\n\t\t\t\t\t\tif ( perpEdge === 0 )\t\t\t\treturn\ttrue;\t\t// inPt is on contour ?\n\t\t\t\t\t\tif ( perpEdge < 0 ) \t\t\t\tcontinue;\n\t\t\t\t\t\tinside = ! inside;\t\t// true intersection left of inPt\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// parallel or collinear\n\t\t\t\t\tif ( inPt.y !== edgeLowPt.y ) \t\tcontinue;\t\t\t// parallel\n\t\t\t\t\t// edge lies on the same horizontal line as inPt\n\t\t\t\t\tif ( ( ( edgeHighPt.x <= inPt.x ) && ( inPt.x <= edgeLowPt.x ) ) ||\n\t\t\t\t\t\t ( ( edgeLowPt.x <= inPt.x ) && ( inPt.x <= edgeHighPt.x ) ) )\t\treturn\ttrue;\t// inPt: Point on contour !\n\t\t\t\t\t// continue;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn\tinside;\n\n\t\t}\n\n\t\tconst isClockWise = ShapeUtils.isClockWise;\n\n\t\tconst subPaths = this.subPaths;\n\t\tif ( subPaths.length === 0 ) return [];\n\n\t\tif ( noHoles === true )\treturn\ttoShapesNoHoles( subPaths );\n\n\n\t\tlet solid, tmpPath, tmpShape;\n\t\tconst shapes = [];\n\n\t\tif ( subPaths.length === 1 ) {\n\n\t\t\ttmpPath = subPaths[ 0 ];\n\t\t\ttmpShape = new Shape();\n\t\t\ttmpShape.curves = tmpPath.curves;\n\t\t\tshapes.push( tmpShape );\n\t\t\treturn shapes;\n\n\t\t}\n\n\t\tlet holesFirst = ! isClockWise( subPaths[ 0 ].getPoints() );\n\t\tholesFirst = isCCW ? ! holesFirst : holesFirst;\n\n\t\t// console.log(\"Holes first\", holesFirst);\n\n\t\tconst betterShapeHoles = [];\n\t\tconst newShapes = [];\n\t\tlet newShapeHoles = [];\n\t\tlet mainIdx = 0;\n\t\tlet tmpPoints;\n\n\t\tnewShapes[ mainIdx ] = undefined;\n\t\tnewShapeHoles[ mainIdx ] = [];\n\n\t\tfor ( let i = 0, l = subPaths.length; i < l; i ++ ) {\n\n\t\t\ttmpPath = subPaths[ i ];\n\t\t\ttmpPoints = tmpPath.getPoints();\n\t\t\tsolid = isClockWise( tmpPoints );\n\t\t\tsolid = isCCW ? ! solid : solid;\n\n\t\t\tif ( solid ) {\n\n\t\t\t\tif ( ( ! holesFirst ) && ( newShapes[ mainIdx ] ) )\tmainIdx ++;\n\n\t\t\t\tnewShapes[ mainIdx ] = { s: new Shape(), p: tmpPoints };\n\t\t\t\tnewShapes[ mainIdx ].s.curves = tmpPath.curves;\n\n\t\t\t\tif ( holesFirst )\tmainIdx ++;\n\t\t\t\tnewShapeHoles[ mainIdx ] = [];\n\n\t\t\t\t//console.log('cw', i);\n\n\t\t\t} else {\n\n\t\t\t\tnewShapeHoles[ mainIdx ].push( { h: tmpPath, p: tmpPoints[ 0 ] } );\n\n\t\t\t\t//console.log('ccw', i);\n\n\t\t\t}\n\n\t\t}\n\n\t\t// only Holes? -> probably all Shapes with wrong orientation\n\t\tif ( ! newShapes[ 0 ] )\treturn\ttoShapesNoHoles( subPaths );\n\n\n\t\tif ( newShapes.length > 1 ) {\n\n\t\t\tlet ambiguous = false;\n\t\t\tconst toChange = [];\n\n\t\t\tfor ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) {\n\n\t\t\t\tbetterShapeHoles[ sIdx ] = [];\n\n\t\t\t}\n\n\t\t\tfor ( let sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx ++ ) {\n\n\t\t\t\tconst sho = newShapeHoles[ sIdx ];\n\n\t\t\t\tfor ( let hIdx = 0; hIdx < sho.length; hIdx ++ ) {\n\n\t\t\t\t\tconst ho = sho[ hIdx ];\n\t\t\t\t\tlet hole_unassigned = true;\n\n\t\t\t\t\tfor ( let s2Idx = 0; s2Idx < newShapes.length; s2Idx ++ ) {\n\n\t\t\t\t\t\tif ( isPointInsidePolygon( ho.p, newShapes[ s2Idx ].p ) ) {\n\n\t\t\t\t\t\t\tif ( sIdx !== s2Idx )\ttoChange.push( { froms: sIdx, tos: s2Idx, hole: hIdx } );\n\t\t\t\t\t\t\tif ( hole_unassigned ) {\n\n\t\t\t\t\t\t\t\thole_unassigned = false;\n\t\t\t\t\t\t\t\tbetterShapeHoles[ s2Idx ].push( ho );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tambiguous = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( hole_unassigned ) {\n\n\t\t\t\t\t\tbetterShapeHoles[ sIdx ].push( ho );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// console.log(\"ambiguous: \", ambiguous);\n\n\t\t\tif ( toChange.length > 0 ) {\n\n\t\t\t\t// console.log(\"to change: \", toChange);\n\t\t\t\tif ( ! ambiguous )\tnewShapeHoles = betterShapeHoles;\n\n\t\t\t}\n\n\t\t}\n\n\t\tlet tmpHoles;\n\n\t\tfor ( let i = 0, il = newShapes.length; i < il; i ++ ) {\n\n\t\t\ttmpShape = newShapes[ i ].s;\n\t\t\tshapes.push( tmpShape );\n\t\t\ttmpHoles = newShapeHoles[ i ];\n\n\t\t\tfor ( let j = 0, jl = tmpHoles.length; j < jl; j ++ ) {\n\n\t\t\t\ttmpShape.holes.push( tmpHoles[ j ].h );\n\n\t\t\t}\n\n\t\t}\n\n\t\t//console.log(\"shape\", shapes);\n\n\t\treturn shapes;\n\n\t}\n\n}\n\nclass Font {\n\n\tconstructor( data ) {\n\n\t\tthis.type = 'Font';\n\n\t\tthis.data = data;\n\n\t}\n\n\tgenerateShapes( text, size = 100 ) {\n\n\t\tconst shapes = [];\n\t\tconst paths = createPaths( text, size, this.data );\n\n\t\tfor ( let p = 0, pl = paths.length; p < pl; p ++ ) {\n\n\t\t\tArray.prototype.push.apply( shapes, paths[ p ].toShapes() );\n\n\t\t}\n\n\t\treturn shapes;\n\n\t}\n\n}\n\nfunction createPaths( text, size, data ) {\n\n\tconst chars = Array.from( text );\n\tconst scale = size / data.resolution;\n\tconst line_height = ( data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness ) * scale;\n\n\tconst paths = [];\n\n\tlet offsetX = 0, offsetY = 0;\n\n\tfor ( let i = 0; i < chars.length; i ++ ) {\n\n\t\tconst char = chars[ i ];\n\n\t\tif ( char === '\\n' ) {\n\n\t\t\toffsetX = 0;\n\t\t\toffsetY -= line_height;\n\n\t\t} else {\n\n\t\t\tconst ret = createPath( char, scale, offsetX, offsetY, data );\n\t\t\toffsetX += ret.offsetX;\n\t\t\tpaths.push( ret.path );\n\n\t\t}\n\n\t}\n\n\treturn paths;\n\n}\n\nfunction createPath( char, scale, offsetX, offsetY, data ) {\n\n\tconst glyph = data.glyphs[ char ] || data.glyphs[ '?' ];\n\n\tif ( ! glyph ) {\n\n\t\tconsole.error( 'THREE.Font: character \"' + char + '\" does not exists in font family ' + data.familyName + '.' );\n\n\t\treturn;\n\n\t}\n\n\tconst path = new ShapePath();\n\n\tlet x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2;\n\n\tif ( glyph.o ) {\n\n\t\tconst outline = glyph._cachedOutline || ( glyph._cachedOutline = glyph.o.split( ' ' ) );\n\n\t\tfor ( let i = 0, l = outline.length; i < l; ) {\n\n\t\t\tconst action = outline[ i ++ ];\n\n\t\t\tswitch ( action ) {\n\n\t\t\t\tcase 'm': // moveTo\n\n\t\t\t\t\tx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\ty = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.moveTo( x, y );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'l': // lineTo\n\n\t\t\t\t\tx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\ty = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.lineTo( x, y );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'q': // quadraticCurveTo\n\n\t\t\t\t\tcpx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx1 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy1 = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.quadraticCurveTo( cpx1, cpy1, cpx, cpy );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'b': // bezierCurveTo\n\n\t\t\t\t\tcpx = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx1 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy1 = outline[ i ++ ] * scale + offsetY;\n\t\t\t\t\tcpx2 = outline[ i ++ ] * scale + offsetX;\n\t\t\t\t\tcpy2 = outline[ i ++ ] * scale + offsetY;\n\n\t\t\t\t\tpath.bezierCurveTo( cpx1, cpy1, cpx2, cpy2, cpx, cpy );\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\treturn { offsetX: glyph.ha * scale, path: path };\n\n}\n\nFont.prototype.isFont = true;\n\nclass FontLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( scope.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\tlet json;\n\n\t\t\ttry {\n\n\t\t\t\tjson = JSON.parse( text );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tconsole.warn( 'THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead.' );\n\t\t\t\tjson = JSON.parse( text.substring( 65, text.length - 2 ) );\n\n\t\t\t}\n\n\t\t\tconst font = scope.parse( json );\n\n\t\t\tif ( onLoad ) onLoad( font );\n\n\t\t}, onProgress, onError );\n\n\t}\n\n\tparse( json ) {\n\n\t\treturn new Font( json );\n\n\t}\n\n}\n\nlet _context;\n\nconst AudioContext = {\n\n\tgetContext: function () {\n\n\t\tif ( _context === undefined ) {\n\n\t\t\t_context = new ( window.AudioContext || window.webkitAudioContext )();\n\n\t\t}\n\n\t\treturn _context;\n\n\t},\n\n\tsetContext: function ( value ) {\n\n\t\t_context = value;\n\n\t}\n\n};\n\nclass AudioLoader extends Loader {\n\n\tconstructor( manager ) {\n\n\t\tsuper( manager );\n\n\t}\n\n\tload( url, onLoad, onProgress, onError ) {\n\n\t\tconst scope = this;\n\n\t\tconst loader = new FileLoader( this.manager );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( buffer ) {\n\n\t\t\ttry {\n\n\t\t\t\t// Create a copy of the buffer. The `decodeAudioData` method\n\t\t\t\t// detaches the buffer when complete, preventing reuse.\n\t\t\t\tconst bufferCopy = buffer.slice( 0 );\n\n\t\t\t\tconst context = AudioContext.getContext();\n\t\t\t\tcontext.decodeAudioData( bufferCopy, function ( audioBuffer ) {\n\n\t\t\t\t\tonLoad( audioBuffer );\n\n\t\t\t\t} );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t}\n\n}\n\nclass HemisphereLightProbe extends LightProbe {\n\n\tconstructor( skyColor, groundColor, intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tconst color1 = new Color().set( skyColor );\n\t\tconst color2 = new Color().set( groundColor );\n\n\t\tconst sky = new Vector3( color1.r, color1.g, color1.b );\n\t\tconst ground = new Vector3( color2.r, color2.g, color2.b );\n\n\t\t// without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI );\n\t\tconst c0 = Math.sqrt( Math.PI );\n\t\tconst c1 = c0 * Math.sqrt( 0.75 );\n\n\t\tthis.sh.coefficients[ 0 ].copy( sky ).add( ground ).multiplyScalar( c0 );\n\t\tthis.sh.coefficients[ 1 ].copy( sky ).sub( ground ).multiplyScalar( c1 );\n\n\t}\n\n}\n\nHemisphereLightProbe.prototype.isHemisphereLightProbe = true;\n\nclass AmbientLightProbe extends LightProbe {\n\n\tconstructor( color, intensity = 1 ) {\n\n\t\tsuper( undefined, intensity );\n\n\t\tconst color1 = new Color().set( color );\n\n\t\t// without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI );\n\t\tthis.sh.coefficients[ 0 ].set( color1.r, color1.g, color1.b ).multiplyScalar( 2 * Math.sqrt( Math.PI ) );\n\n\t}\n\n}\n\nAmbientLightProbe.prototype.isAmbientLightProbe = true;\n\nconst _eyeRight = /*@__PURE__*/ new Matrix4();\nconst _eyeLeft = /*@__PURE__*/ new Matrix4();\n\nclass StereoCamera {\n\n\tconstructor() {\n\n\t\tthis.type = 'StereoCamera';\n\n\t\tthis.aspect = 1;\n\n\t\tthis.eyeSep = 0.064;\n\n\t\tthis.cameraL = new PerspectiveCamera();\n\t\tthis.cameraL.layers.enable( 1 );\n\t\tthis.cameraL.matrixAutoUpdate = false;\n\n\t\tthis.cameraR = new PerspectiveCamera();\n\t\tthis.cameraR.layers.enable( 2 );\n\t\tthis.cameraR.matrixAutoUpdate = false;\n\n\t\tthis._cache = {\n\t\t\tfocus: null,\n\t\t\tfov: null,\n\t\t\taspect: null,\n\t\t\tnear: null,\n\t\t\tfar: null,\n\t\t\tzoom: null,\n\t\t\teyeSep: null\n\t\t};\n\n\t}\n\n\tupdate( camera ) {\n\n\t\tconst cache = this._cache;\n\n\t\tconst needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov ||\n\t\t\tcache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near ||\n\t\t\tcache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;\n\n\t\tif ( needsUpdate ) {\n\n\t\t\tcache.focus = camera.focus;\n\t\t\tcache.fov = camera.fov;\n\t\t\tcache.aspect = camera.aspect * this.aspect;\n\t\t\tcache.near = camera.near;\n\t\t\tcache.far = camera.far;\n\t\t\tcache.zoom = camera.zoom;\n\t\t\tcache.eyeSep = this.eyeSep;\n\n\t\t\t// Off-axis stereoscopic effect based on\n\t\t\t// http://paulbourke.net/stereographics/stereorender/\n\n\t\t\tconst projectionMatrix = camera.projectionMatrix.clone();\n\t\t\tconst eyeSepHalf = cache.eyeSep / 2;\n\t\t\tconst eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;\n\t\t\tconst ymax = ( cache.near * Math.tan( DEG2RAD * cache.fov * 0.5 ) ) / cache.zoom;\n\t\t\tlet xmin, xmax;\n\n\t\t\t// translate xOffset\n\n\t\t\t_eyeLeft.elements[ 12 ] = - eyeSepHalf;\n\t\t\t_eyeRight.elements[ 12 ] = eyeSepHalf;\n\n\t\t\t// for left eye\n\n\t\t\txmin = - ymax * cache.aspect + eyeSepOnProjection;\n\t\t\txmax = ymax * cache.aspect + eyeSepOnProjection;\n\n\t\t\tprojectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin );\n\t\t\tprojectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\tthis.cameraL.projectionMatrix.copy( projectionMatrix );\n\n\t\t\t// for right eye\n\n\t\t\txmin = - ymax * cache.aspect - eyeSepOnProjection;\n\t\t\txmax = ymax * cache.aspect - eyeSepOnProjection;\n\n\t\t\tprojectionMatrix.elements[ 0 ] = 2 * cache.near / ( xmax - xmin );\n\t\t\tprojectionMatrix.elements[ 8 ] = ( xmax + xmin ) / ( xmax - xmin );\n\n\t\t\tthis.cameraR.projectionMatrix.copy( projectionMatrix );\n\n\t\t}\n\n\t\tthis.cameraL.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeLeft );\n\t\tthis.cameraR.matrixWorld.copy( camera.matrixWorld ).multiply( _eyeRight );\n\n\t}\n\n}\n\nclass Clock {\n\n\tconstructor( autoStart = true ) {\n\n\t\tthis.autoStart = autoStart;\n\n\t\tthis.startTime = 0;\n\t\tthis.oldTime = 0;\n\t\tthis.elapsedTime = 0;\n\n\t\tthis.running = false;\n\n\t}\n\n\tstart() {\n\n\t\tthis.startTime = now();\n\n\t\tthis.oldTime = this.startTime;\n\t\tthis.elapsedTime = 0;\n\t\tthis.running = true;\n\n\t}\n\n\tstop() {\n\n\t\tthis.getElapsedTime();\n\t\tthis.running = false;\n\t\tthis.autoStart = false;\n\n\t}\n\n\tgetElapsedTime() {\n\n\t\tthis.getDelta();\n\t\treturn this.elapsedTime;\n\n\t}\n\n\tgetDelta() {\n\n\t\tlet diff = 0;\n\n\t\tif ( this.autoStart && ! this.running ) {\n\n\t\t\tthis.start();\n\t\t\treturn 0;\n\n\t\t}\n\n\t\tif ( this.running ) {\n\n\t\t\tconst newTime = now();\n\n\t\t\tdiff = ( newTime - this.oldTime ) / 1000;\n\t\t\tthis.oldTime = newTime;\n\n\t\t\tthis.elapsedTime += diff;\n\n\t\t}\n\n\t\treturn diff;\n\n\t}\n\n}\n\nfunction now() {\n\n\treturn ( typeof performance === 'undefined' ? Date : performance ).now(); // see #10732\n\n}\n\nconst _position$1 = /*@__PURE__*/ new Vector3();\nconst _quaternion$1 = /*@__PURE__*/ new Quaternion();\nconst _scale$1 = /*@__PURE__*/ new Vector3();\nconst _orientation$1 = /*@__PURE__*/ new Vector3();\n\nclass AudioListener extends Object3D {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.type = 'AudioListener';\n\n\t\tthis.context = AudioContext.getContext();\n\n\t\tthis.gain = this.context.createGain();\n\t\tthis.gain.connect( this.context.destination );\n\n\t\tthis.filter = null;\n\n\t\tthis.timeDelta = 0;\n\n\t\t// private\n\n\t\tthis._clock = new Clock();\n\n\t}\n\n\tgetInput() {\n\n\t\treturn this.gain;\n\n\t}\n\n\tremoveFilter() {\n\n\t\tif ( this.filter !== null ) {\n\n\t\t\tthis.gain.disconnect( this.filter );\n\t\t\tthis.filter.disconnect( this.context.destination );\n\t\t\tthis.gain.connect( this.context.destination );\n\t\t\tthis.filter = null;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetFilter() {\n\n\t\treturn this.filter;\n\n\t}\n\n\tsetFilter( value ) {\n\n\t\tif ( this.filter !== null ) {\n\n\t\t\tthis.gain.disconnect( this.filter );\n\t\t\tthis.filter.disconnect( this.context.destination );\n\n\t\t} else {\n\n\t\t\tthis.gain.disconnect( this.context.destination );\n\n\t\t}\n\n\t\tthis.filter = value;\n\t\tthis.gain.connect( this.filter );\n\t\tthis.filter.connect( this.context.destination );\n\n\t\treturn this;\n\n\t}\n\n\tgetMasterVolume() {\n\n\t\treturn this.gain.gain.value;\n\n\t}\n\n\tsetMasterVolume( value ) {\n\n\t\tthis.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );\n\n\t\treturn this;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tconst listener = this.context.listener;\n\t\tconst up = this.up;\n\n\t\tthis.timeDelta = this._clock.getDelta();\n\n\t\tthis.matrixWorld.decompose( _position$1, _quaternion$1, _scale$1 );\n\n\t\t_orientation$1.set( 0, 0, - 1 ).applyQuaternion( _quaternion$1 );\n\n\t\tif ( listener.positionX ) {\n\n\t\t\t// code path for Chrome (see #14393)\n\n\t\t\tconst endTime = this.context.currentTime + this.timeDelta;\n\n\t\t\tlistener.positionX.linearRampToValueAtTime( _position$1.x, endTime );\n\t\t\tlistener.positionY.linearRampToValueAtTime( _position$1.y, endTime );\n\t\t\tlistener.positionZ.linearRampToValueAtTime( _position$1.z, endTime );\n\t\t\tlistener.forwardX.linearRampToValueAtTime( _orientation$1.x, endTime );\n\t\t\tlistener.forwardY.linearRampToValueAtTime( _orientation$1.y, endTime );\n\t\t\tlistener.forwardZ.linearRampToValueAtTime( _orientation$1.z, endTime );\n\t\t\tlistener.upX.linearRampToValueAtTime( up.x, endTime );\n\t\t\tlistener.upY.linearRampToValueAtTime( up.y, endTime );\n\t\t\tlistener.upZ.linearRampToValueAtTime( up.z, endTime );\n\n\t\t} else {\n\n\t\t\tlistener.setPosition( _position$1.x, _position$1.y, _position$1.z );\n\t\t\tlistener.setOrientation( _orientation$1.x, _orientation$1.y, _orientation$1.z, up.x, up.y, up.z );\n\n\t\t}\n\n\t}\n\n}\n\nclass Audio extends Object3D {\n\n\tconstructor( listener ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'Audio';\n\n\t\tthis.listener = listener;\n\t\tthis.context = listener.context;\n\n\t\tthis.gain = this.context.createGain();\n\t\tthis.gain.connect( listener.getInput() );\n\n\t\tthis.autoplay = false;\n\n\t\tthis.buffer = null;\n\t\tthis.detune = 0;\n\t\tthis.loop = false;\n\t\tthis.loopStart = 0;\n\t\tthis.loopEnd = 0;\n\t\tthis.offset = 0;\n\t\tthis.duration = undefined;\n\t\tthis.playbackRate = 1;\n\t\tthis.isPlaying = false;\n\t\tthis.hasPlaybackControl = true;\n\t\tthis.source = null;\n\t\tthis.sourceType = 'empty';\n\n\t\tthis._startedAt = 0;\n\t\tthis._progress = 0;\n\t\tthis._connected = false;\n\n\t\tthis.filters = [];\n\n\t}\n\n\tgetOutput() {\n\n\t\treturn this.gain;\n\n\t}\n\n\tsetNodeSource( audioNode ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'audioNode';\n\t\tthis.source = audioNode;\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetMediaElementSource( mediaElement ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'mediaNode';\n\t\tthis.source = this.context.createMediaElementSource( mediaElement );\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetMediaStreamSource( mediaStream ) {\n\n\t\tthis.hasPlaybackControl = false;\n\t\tthis.sourceType = 'mediaStreamNode';\n\t\tthis.source = this.context.createMediaStreamSource( mediaStream );\n\t\tthis.connect();\n\n\t\treturn this;\n\n\t}\n\n\tsetBuffer( audioBuffer ) {\n\n\t\tthis.buffer = audioBuffer;\n\t\tthis.sourceType = 'buffer';\n\n\t\tif ( this.autoplay ) this.play();\n\n\t\treturn this;\n\n\t}\n\n\tplay( delay = 0 ) {\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: Audio is already playing.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis._startedAt = this.context.currentTime + delay;\n\n\t\tconst source = this.context.createBufferSource();\n\t\tsource.buffer = this.buffer;\n\t\tsource.loop = this.loop;\n\t\tsource.loopStart = this.loopStart;\n\t\tsource.loopEnd = this.loopEnd;\n\t\tsource.onended = this.onEnded.bind( this );\n\t\tsource.start( this._startedAt, this._progress + this.offset, this.duration );\n\n\t\tthis.isPlaying = true;\n\n\t\tthis.source = source;\n\n\t\tthis.setDetune( this.detune );\n\t\tthis.setPlaybackRate( this.playbackRate );\n\n\t\treturn this.connect();\n\n\t}\n\n\tpause() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\t// update current progress\n\n\t\t\tthis._progress += Math.max( this.context.currentTime - this._startedAt, 0 ) * this.playbackRate;\n\n\t\t\tif ( this.loop === true ) {\n\n\t\t\t\t// ensure _progress does not exceed duration with looped audios\n\n\t\t\t\tthis._progress = this._progress % ( this.duration || this.buffer.duration );\n\n\t\t\t}\n\n\t\t\tthis.source.stop();\n\t\t\tthis.source.onended = null;\n\n\t\t\tthis.isPlaying = false;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tstop() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis._progress = 0;\n\n\t\tthis.source.stop();\n\t\tthis.source.onended = null;\n\t\tthis.isPlaying = false;\n\n\t\treturn this;\n\n\t}\n\n\tconnect() {\n\n\t\tif ( this.filters.length > 0 ) {\n\n\t\t\tthis.source.connect( this.filters[ 0 ] );\n\n\t\t\tfor ( let i = 1, l = this.filters.length; i < l; i ++ ) {\n\n\t\t\t\tthis.filters[ i - 1 ].connect( this.filters[ i ] );\n\n\t\t\t}\n\n\t\t\tthis.filters[ this.filters.length - 1 ].connect( this.getOutput() );\n\n\t\t} else {\n\n\t\t\tthis.source.connect( this.getOutput() );\n\n\t\t}\n\n\t\tthis._connected = true;\n\n\t\treturn this;\n\n\t}\n\n\tdisconnect() {\n\n\t\tif ( this.filters.length > 0 ) {\n\n\t\t\tthis.source.disconnect( this.filters[ 0 ] );\n\n\t\t\tfor ( let i = 1, l = this.filters.length; i < l; i ++ ) {\n\n\t\t\t\tthis.filters[ i - 1 ].disconnect( this.filters[ i ] );\n\n\t\t\t}\n\n\t\t\tthis.filters[ this.filters.length - 1 ].disconnect( this.getOutput() );\n\n\t\t} else {\n\n\t\t\tthis.source.disconnect( this.getOutput() );\n\n\t\t}\n\n\t\tthis._connected = false;\n\n\t\treturn this;\n\n\t}\n\n\tgetFilters() {\n\n\t\treturn this.filters;\n\n\t}\n\n\tsetFilters( value ) {\n\n\t\tif ( ! value ) value = [];\n\n\t\tif ( this._connected === true ) {\n\n\t\t\tthis.disconnect();\n\t\t\tthis.filters = value.slice();\n\t\t\tthis.connect();\n\n\t\t} else {\n\n\t\t\tthis.filters = value.slice();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetDetune( value ) {\n\n\t\tthis.detune = value;\n\n\t\tif ( this.source.detune === undefined ) return; // only set detune when available\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.detune.setTargetAtTime( this.detune, this.context.currentTime, 0.01 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetDetune() {\n\n\t\treturn this.detune;\n\n\t}\n\n\tgetFilter() {\n\n\t\treturn this.getFilters()[ 0 ];\n\n\t}\n\n\tsetFilter( filter ) {\n\n\t\treturn this.setFilters( filter ? [ filter ] : [] );\n\n\t}\n\n\tsetPlaybackRate( value ) {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.playbackRate = value;\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.playbackRate.setTargetAtTime( this.playbackRate, this.context.currentTime, 0.01 );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tgetPlaybackRate() {\n\n\t\treturn this.playbackRate;\n\n\t}\n\n\tonEnded() {\n\n\t\tthis.isPlaying = false;\n\n\t}\n\n\tgetLoop() {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn false;\n\n\t\t}\n\n\t\treturn this.loop;\n\n\t}\n\n\tsetLoop( value ) {\n\n\t\tif ( this.hasPlaybackControl === false ) {\n\n\t\t\tconsole.warn( 'THREE.Audio: this Audio has no playback control.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tthis.loop = value;\n\n\t\tif ( this.isPlaying === true ) {\n\n\t\t\tthis.source.loop = this.loop;\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetLoopStart( value ) {\n\n\t\tthis.loopStart = value;\n\n\t\treturn this;\n\n\t}\n\n\tsetLoopEnd( value ) {\n\n\t\tthis.loopEnd = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetVolume() {\n\n\t\treturn this.gain.gain.value;\n\n\t}\n\n\tsetVolume( value ) {\n\n\t\tthis.gain.gain.setTargetAtTime( value, this.context.currentTime, 0.01 );\n\n\t\treturn this;\n\n\t}\n\n}\n\nconst _position = /*@__PURE__*/ new Vector3();\nconst _quaternion = /*@__PURE__*/ new Quaternion();\nconst _scale = /*@__PURE__*/ new Vector3();\nconst _orientation = /*@__PURE__*/ new Vector3();\n\nclass PositionalAudio extends Audio {\n\n\tconstructor( listener ) {\n\n\t\tsuper( listener );\n\n\t\tthis.panner = this.context.createPanner();\n\t\tthis.panner.panningModel = 'HRTF';\n\t\tthis.panner.connect( this.gain );\n\n\t}\n\n\tgetOutput() {\n\n\t\treturn this.panner;\n\n\t}\n\n\tgetRefDistance() {\n\n\t\treturn this.panner.refDistance;\n\n\t}\n\n\tsetRefDistance( value ) {\n\n\t\tthis.panner.refDistance = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetRolloffFactor() {\n\n\t\treturn this.panner.rolloffFactor;\n\n\t}\n\n\tsetRolloffFactor( value ) {\n\n\t\tthis.panner.rolloffFactor = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetDistanceModel() {\n\n\t\treturn this.panner.distanceModel;\n\n\t}\n\n\tsetDistanceModel( value ) {\n\n\t\tthis.panner.distanceModel = value;\n\n\t\treturn this;\n\n\t}\n\n\tgetMaxDistance() {\n\n\t\treturn this.panner.maxDistance;\n\n\t}\n\n\tsetMaxDistance( value ) {\n\n\t\tthis.panner.maxDistance = value;\n\n\t\treturn this;\n\n\t}\n\n\tsetDirectionalCone( coneInnerAngle, coneOuterAngle, coneOuterGain ) {\n\n\t\tthis.panner.coneInnerAngle = coneInnerAngle;\n\t\tthis.panner.coneOuterAngle = coneOuterAngle;\n\t\tthis.panner.coneOuterGain = coneOuterGain;\n\n\t\treturn this;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t\tif ( this.hasPlaybackControl === true && this.isPlaying === false ) return;\n\n\t\tthis.matrixWorld.decompose( _position, _quaternion, _scale );\n\n\t\t_orientation.set( 0, 0, 1 ).applyQuaternion( _quaternion );\n\n\t\tconst panner = this.panner;\n\n\t\tif ( panner.positionX ) {\n\n\t\t\t// code path for Chrome and Firefox (see #14393)\n\n\t\t\tconst endTime = this.context.currentTime + this.listener.timeDelta;\n\n\t\t\tpanner.positionX.linearRampToValueAtTime( _position.x, endTime );\n\t\t\tpanner.positionY.linearRampToValueAtTime( _position.y, endTime );\n\t\t\tpanner.positionZ.linearRampToValueAtTime( _position.z, endTime );\n\t\t\tpanner.orientationX.linearRampToValueAtTime( _orientation.x, endTime );\n\t\t\tpanner.orientationY.linearRampToValueAtTime( _orientation.y, endTime );\n\t\t\tpanner.orientationZ.linearRampToValueAtTime( _orientation.z, endTime );\n\n\t\t} else {\n\n\t\t\tpanner.setPosition( _position.x, _position.y, _position.z );\n\t\t\tpanner.setOrientation( _orientation.x, _orientation.y, _orientation.z );\n\n\t\t}\n\n\t}\n\n}\n\nclass AudioAnalyser {\n\n\tconstructor( audio, fftSize = 2048 ) {\n\n\t\tthis.analyser = audio.context.createAnalyser();\n\t\tthis.analyser.fftSize = fftSize;\n\n\t\tthis.data = new Uint8Array( this.analyser.frequencyBinCount );\n\n\t\taudio.getOutput().connect( this.analyser );\n\n\t}\n\n\n\tgetFrequencyData() {\n\n\t\tthis.analyser.getByteFrequencyData( this.data );\n\n\t\treturn this.data;\n\n\t}\n\n\tgetAverageFrequency() {\n\n\t\tlet value = 0;\n\t\tconst data = this.getFrequencyData();\n\n\t\tfor ( let i = 0; i < data.length; i ++ ) {\n\n\t\t\tvalue += data[ i ];\n\n\t\t}\n\n\t\treturn value / data.length;\n\n\t}\n\n}\n\nclass PropertyMixer {\n\n\tconstructor( binding, typeName, valueSize ) {\n\n\t\tthis.binding = binding;\n\t\tthis.valueSize = valueSize;\n\n\t\tlet mixFunction,\n\t\t\tmixFunctionAdditive,\n\t\t\tsetIdentity;\n\n\t\t// buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ]\n\t\t//\n\t\t// interpolators can use .buffer as their .result\n\t\t// the data then goes to 'incoming'\n\t\t//\n\t\t// 'accu0' and 'accu1' are used frame-interleaved for\n\t\t// the cumulative result and are compared to detect\n\t\t// changes\n\t\t//\n\t\t// 'orig' stores the original state of the property\n\t\t//\n\t\t// 'add' is used for additive cumulative results\n\t\t//\n\t\t// 'work' is optional and is only present for quaternion types. It is used\n\t\t// to store intermediate quaternion multiplication results\n\n\t\tswitch ( typeName ) {\n\n\t\t\tcase 'quaternion':\n\t\t\t\tmixFunction = this._slerp;\n\t\t\t\tmixFunctionAdditive = this._slerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityQuaternion;\n\n\t\t\t\tthis.buffer = new Float64Array( valueSize * 6 );\n\t\t\t\tthis._workIndex = 5;\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\tcase 'bool':\n\t\t\t\tmixFunction = this._select;\n\n\t\t\t\t// Use the regular mix function and for additive on these types,\n\t\t\t\t// additive is not relevant for non-numeric types\n\t\t\t\tmixFunctionAdditive = this._select;\n\n\t\t\t\tsetIdentity = this._setAdditiveIdentityOther;\n\n\t\t\t\tthis.buffer = new Array( valueSize * 5 );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tmixFunction = this._lerp;\n\t\t\t\tmixFunctionAdditive = this._lerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityNumeric;\n\n\t\t\t\tthis.buffer = new Float64Array( valueSize * 5 );\n\n\t\t}\n\n\t\tthis._mixBufferRegion = mixFunction;\n\t\tthis._mixBufferRegionAdditive = mixFunctionAdditive;\n\t\tthis._setIdentity = setIdentity;\n\t\tthis._origIndex = 3;\n\t\tthis._addIndex = 4;\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\tthis.useCount = 0;\n\t\tthis.referenceCount = 0;\n\n\t}\n\n\t// accumulate data in the 'incoming' region into 'accu<i>'\n\taccumulate( accuIndex, weight ) {\n\n\t\t// note: happily accumulating nothing when weight = 0, the caller knows\n\t\t// the weight and shouldn't have made the call in the first place\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = accuIndex * stride + stride;\n\n\t\tlet currentWeight = this.cumulativeWeight;\n\n\t\tif ( currentWeight === 0 ) {\n\n\t\t\t// accuN := incoming * weight\n\n\t\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\t\tbuffer[ offset + i ] = buffer[ i ];\n\n\t\t\t}\n\n\t\t\tcurrentWeight = weight;\n\n\t\t} else {\n\n\t\t\t// accuN := accuN + incoming * weight\n\n\t\t\tcurrentWeight += weight;\n\t\t\tconst mix = weight / currentWeight;\n\t\t\tthis._mixBufferRegion( buffer, offset, 0, mix, stride );\n\n\t\t}\n\n\t\tthis.cumulativeWeight = currentWeight;\n\n\t}\n\n\t// accumulate data in the 'incoming' region into 'add'\n\taccumulateAdditive( weight ) {\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\t\t\toffset = stride * this._addIndex;\n\n\t\tif ( this.cumulativeWeightAdditive === 0 ) {\n\n\t\t\t// add = identity\n\n\t\t\tthis._setIdentity();\n\n\t\t}\n\n\t\t// add := add + incoming * weight\n\n\t\tthis._mixBufferRegionAdditive( buffer, offset, 0, weight, stride );\n\t\tthis.cumulativeWeightAdditive += weight;\n\n\t}\n\n\t// apply the state of 'accu<i>' to the binding when accus differ\n\tapply( accuIndex ) {\n\n\t\tconst stride = this.valueSize,\n\t\t\tbuffer = this.buffer,\n\t\t\toffset = accuIndex * stride + stride,\n\n\t\t\tweight = this.cumulativeWeight,\n\t\t\tweightAdditive = this.cumulativeWeightAdditive,\n\n\t\t\tbinding = this.binding;\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\tif ( weight < 1 ) {\n\n\t\t\t// accuN := accuN + original * ( 1 - cumulativeWeight )\n\n\t\t\tconst originalValueOffset = stride * this._origIndex;\n\n\t\t\tthis._mixBufferRegion(\n\t\t\t\tbuffer, offset, originalValueOffset, 1 - weight, stride );\n\n\t\t}\n\n\t\tif ( weightAdditive > 0 ) {\n\n\t\t\t// accuN := accuN + additive accuN\n\n\t\t\tthis._mixBufferRegionAdditive( buffer, offset, this._addIndex * stride, 1, stride );\n\n\t\t}\n\n\t\tfor ( let i = stride, e = stride + stride; i !== e; ++ i ) {\n\n\t\t\tif ( buffer[ i ] !== buffer[ i + stride ] ) {\n\n\t\t\t\t// value has changed -> update scene graph\n\n\t\t\t\tbinding.setValue( buffer, offset );\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// remember the state of the bound property and copy it to both accus\n\tsaveOriginalState() {\n\n\t\tconst binding = this.binding;\n\n\t\tconst buffer = this.buffer,\n\t\t\tstride = this.valueSize,\n\n\t\t\toriginalValueOffset = stride * this._origIndex;\n\n\t\tbinding.getValue( buffer, originalValueOffset );\n\n\t\t// accu[0..1] := orig -- initially detect changes against the original\n\t\tfor ( let i = stride, e = originalValueOffset; i !== e; ++ i ) {\n\n\t\t\tbuffer[ i ] = buffer[ originalValueOffset + ( i % stride ) ];\n\n\t\t}\n\n\t\t// Add to identity for additive\n\t\tthis._setIdentity();\n\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\n\t}\n\n\t// apply the state previously taken via 'saveOriginalState' to the binding\n\trestoreOriginalState() {\n\n\t\tconst originalValueOffset = this.valueSize * 3;\n\t\tthis.binding.setValue( this.buffer, originalValueOffset );\n\n\t}\n\n\t_setAdditiveIdentityNumeric() {\n\n\t\tconst startIndex = this._addIndex * this.valueSize;\n\t\tconst endIndex = startIndex + this.valueSize;\n\n\t\tfor ( let i = startIndex; i < endIndex; i ++ ) {\n\n\t\t\tthis.buffer[ i ] = 0;\n\n\t\t}\n\n\t}\n\n\t_setAdditiveIdentityQuaternion() {\n\n\t\tthis._setAdditiveIdentityNumeric();\n\t\tthis.buffer[ this._addIndex * this.valueSize + 3 ] = 1;\n\n\t}\n\n\t_setAdditiveIdentityOther() {\n\n\t\tconst startIndex = this._origIndex * this.valueSize;\n\t\tconst targetIndex = this._addIndex * this.valueSize;\n\n\t\tfor ( let i = 0; i < this.valueSize; i ++ ) {\n\n\t\t\tthis.buffer[ targetIndex + i ] = this.buffer[ startIndex + i ];\n\n\t\t}\n\n\t}\n\n\n\t// mix functions\n\n\t_select( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tif ( t >= 0.5 ) {\n\n\t\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\t\tbuffer[ dstOffset + i ] = buffer[ srcOffset + i ];\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_slerp( buffer, dstOffset, srcOffset, t ) {\n\n\t\tQuaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t );\n\n\t}\n\n\t_slerpAdditive( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tconst workOffset = this._workIndex * stride;\n\n\t\t// Store result in intermediate buffer offset\n\t\tQuaternion.multiplyQuaternionsFlat( buffer, workOffset, buffer, dstOffset, buffer, srcOffset );\n\n\t\t// Slerp to the intermediate result\n\t\tQuaternion.slerpFlat( buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t );\n\n\t}\n\n\t_lerp( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tconst s = 1 - t;\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tconst j = dstOffset + i;\n\n\t\t\tbuffer[ j ] = buffer[ j ] * s + buffer[ srcOffset + i ] * t;\n\n\t\t}\n\n\t}\n\n\t_lerpAdditive( buffer, dstOffset, srcOffset, t, stride ) {\n\n\t\tfor ( let i = 0; i !== stride; ++ i ) {\n\n\t\t\tconst j = dstOffset + i;\n\n\t\t\tbuffer[ j ] = buffer[ j ] + buffer[ srcOffset + i ] * t;\n\n\t\t}\n\n\t}\n\n}\n\n// Characters [].:/ are reserved for track binding syntax.\nconst _RESERVED_CHARS_RE = '\\\\[\\\\]\\\\.:\\\\/';\nconst _reservedRe = new RegExp( '[' + _RESERVED_CHARS_RE + ']', 'g' );\n\n// Attempts to allow node names from any language. ES5's `\\w` regexp matches\n// only latin characters, and the unicode \\p{L} is not yet supported. So\n// instead, we exclude reserved characters and match everything else.\nconst _wordChar = '[^' + _RESERVED_CHARS_RE + ']';\nconst _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace( '\\\\.', '' ) + ']';\n\n// Parent directories, delimited by '/' or ':'. Currently unused, but must\n// be matched to parse the rest of the track name.\nconst _directoryRe = /((?:WC+[\\/:])*)/.source.replace( 'WC', _wordChar );\n\n// Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.\nconst _nodeRe = /(WCOD+)?/.source.replace( 'WCOD', _wordCharOrDot );\n\n// Object on target node, and accessor. May not contain reserved\n// characters. Accessor may contain any character except closing bracket.\nconst _objectRe = /(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace( 'WC', _wordChar );\n\n// Property and accessor. May not contain reserved characters. Accessor may\n// contain any non-bracket characters.\nconst _propertyRe = /\\.(WC+)(?:\\[(.+)\\])?/.source.replace( 'WC', _wordChar );\n\nconst _trackRe = new RegExp( ''\n\t+ '^'\n\t+ _directoryRe\n\t+ _nodeRe\n\t+ _objectRe\n\t+ _propertyRe\n\t+ '$'\n);\n\nconst _supportedObjectNames = [ 'material', 'materials', 'bones' ];\n\nclass Composite {\n\n\tconstructor( targetGroup, path, optionalParsedPath ) {\n\n\t\tconst parsedPath = optionalParsedPath || PropertyBinding.parseTrackName( path );\n\n\t\tthis._targetGroup = targetGroup;\n\t\tthis._bindings = targetGroup.subscribe_( path, parsedPath );\n\n\t}\n\n\tgetValue( array, offset ) {\n\n\t\tthis.bind(); // bind all binding\n\n\t\tconst firstValidIndex = this._targetGroup.nCachedObjects_,\n\t\t\tbinding = this._bindings[ firstValidIndex ];\n\n\t\t// and only call .getValue on the first\n\t\tif ( binding !== undefined ) binding.getValue( array, offset );\n\n\t}\n\n\tsetValue( array, offset ) {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].setValue( array, offset );\n\n\t\t}\n\n\t}\n\n\tbind() {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].bind();\n\n\t\t}\n\n\t}\n\n\tunbind() {\n\n\t\tconst bindings = this._bindings;\n\n\t\tfor ( let i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tbindings[ i ].unbind();\n\n\t\t}\n\n\t}\n\n}\n\n// Note: This class uses a State pattern on a per-method basis:\n// 'bind' sets 'this.getValue' / 'setValue' and shadows the\n// prototype version of these methods with one that represents\n// the bound state. When the property is not found, the methods\n// become no-ops.\nclass PropertyBinding {\n\n\tconstructor( rootNode, path, parsedPath ) {\n\n\t\tthis.path = path;\n\t\tthis.parsedPath = parsedPath || PropertyBinding.parseTrackName( path );\n\n\t\tthis.node = PropertyBinding.findNode( rootNode, this.parsedPath.nodeName ) || rootNode;\n\n\t\tthis.rootNode = rootNode;\n\n\t\t// initial state of these methods that calls 'bind'\n\t\tthis.getValue = this._getValue_unbound;\n\t\tthis.setValue = this._setValue_unbound;\n\n\t}\n\n\n\tstatic create( root, path, parsedPath ) {\n\n\t\tif ( ! ( root && root.isAnimationObjectGroup ) ) {\n\n\t\t\treturn new PropertyBinding( root, path, parsedPath );\n\n\t\t} else {\n\n\t\t\treturn new PropertyBinding.Composite( root, path, parsedPath );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Replaces spaces with underscores and removes unsupported characters from\n\t * node names, to ensure compatibility with parseTrackName().\n\t *\n\t * @param {string} name Node name to be sanitized.\n\t * @return {string}\n\t */\n\tstatic sanitizeNodeName( name ) {\n\n\t\treturn name.replace( /\\s/g, '_' ).replace( _reservedRe, '' );\n\n\t}\n\n\tstatic parseTrackName( trackName ) {\n\n\t\tconst matches = _trackRe.exec( trackName );\n\n\t\tif ( ! matches ) {\n\n\t\t\tthrow new Error( 'PropertyBinding: Cannot parse trackName: ' + trackName );\n\n\t\t}\n\n\t\tconst results = {\n\t\t\t// directoryName: matches[ 1 ], // (tschw) currently unused\n\t\t\tnodeName: matches[ 2 ],\n\t\t\tobjectName: matches[ 3 ],\n\t\t\tobjectIndex: matches[ 4 ],\n\t\t\tpropertyName: matches[ 5 ], // required\n\t\t\tpropertyIndex: matches[ 6 ]\n\t\t};\n\n\t\tconst lastDot = results.nodeName && results.nodeName.lastIndexOf( '.' );\n\n\t\tif ( lastDot !== undefined && lastDot !== - 1 ) {\n\n\t\t\tconst objectName = results.nodeName.substring( lastDot + 1 );\n\n\t\t\t// Object names must be checked against an allowlist. Otherwise, there\n\t\t\t// is no way to parse 'foo.bar.baz': 'baz' must be a property, but\n\t\t\t// 'bar' could be the objectName, or part of a nodeName (which can\n\t\t\t// include '.' characters).\n\t\t\tif ( _supportedObjectNames.indexOf( objectName ) !== - 1 ) {\n\n\t\t\t\tresults.nodeName = results.nodeName.substring( 0, lastDot );\n\t\t\t\tresults.objectName = objectName;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( results.propertyName === null || results.propertyName.length === 0 ) {\n\n\t\t\tthrow new Error( 'PropertyBinding: can not parse propertyName from trackName: ' + trackName );\n\n\t\t}\n\n\t\treturn results;\n\n\t}\n\n\tstatic findNode( root, nodeName ) {\n\n\t\tif ( ! nodeName || nodeName === '' || nodeName === '.' || nodeName === - 1 || nodeName === root.name || nodeName === root.uuid ) {\n\n\t\t\treturn root;\n\n\t\t}\n\n\t\t// search into skeleton bones.\n\t\tif ( root.skeleton ) {\n\n\t\t\tconst bone = root.skeleton.getBoneByName( nodeName );\n\n\t\t\tif ( bone !== undefined ) {\n\n\t\t\t\treturn bone;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// search into node subtree.\n\t\tif ( root.children ) {\n\n\t\t\tconst searchNodeSubtree = function ( children ) {\n\n\t\t\t\tfor ( let i = 0; i < children.length; i ++ ) {\n\n\t\t\t\t\tconst childNode = children[ i ];\n\n\t\t\t\t\tif ( childNode.name === nodeName || childNode.uuid === nodeName ) {\n\n\t\t\t\t\t\treturn childNode;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tconst result = searchNodeSubtree( childNode.children );\n\n\t\t\t\t\tif ( result ) return result;\n\n\t\t\t\t}\n\n\t\t\t\treturn null;\n\n\t\t\t};\n\n\t\t\tconst subTreeNode = searchNodeSubtree( root.children );\n\n\t\t\tif ( subTreeNode ) {\n\n\t\t\t\treturn subTreeNode;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\t// these are used to \"bind\" a nonexistent property\n\t_getValue_unavailable() {}\n\t_setValue_unavailable() {}\n\n\t// Getters\n\n\t_getValue_direct( buffer, offset ) {\n\n\t\tbuffer[ offset ] = this.node[ this.propertyName ];\n\n\t}\n\n\t_getValue_array( buffer, offset ) {\n\n\t\tconst source = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = source.length; i !== n; ++ i ) {\n\n\t\t\tbuffer[ offset ++ ] = source[ i ];\n\n\t\t}\n\n\t}\n\n\t_getValue_arrayElement( buffer, offset ) {\n\n\t\tbuffer[ offset ] = this.resolvedProperty[ this.propertyIndex ];\n\n\t}\n\n\t_getValue_toArray( buffer, offset ) {\n\n\t\tthis.resolvedProperty.toArray( buffer, offset );\n\n\t}\n\n\t// Direct\n\n\t_setValue_direct( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\n\t}\n\n\t_setValue_direct_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_direct_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.targetObject[ this.propertyName ] = buffer[ offset ];\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// EntireArray\n\n\t_setValue_array( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t}\n\n\t_setValue_array_setNeedsUpdate( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_array_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tconst dest = this.resolvedProperty;\n\n\t\tfor ( let i = 0, n = dest.length; i !== n; ++ i ) {\n\n\t\t\tdest[ i ] = buffer[ offset ++ ];\n\n\t\t}\n\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// ArrayElement\n\n\t_setValue_arrayElement( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\n\t}\n\n\t_setValue_arrayElement_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_arrayElement_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty[ this.propertyIndex ] = buffer[ offset ];\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t// HasToFromArray\n\n\t_setValue_fromArray( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\n\t}\n\n\t_setValue_fromArray_setNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\t\tthis.targetObject.needsUpdate = true;\n\n\t}\n\n\t_setValue_fromArray_setMatrixWorldNeedsUpdate( buffer, offset ) {\n\n\t\tthis.resolvedProperty.fromArray( buffer, offset );\n\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\n\t}\n\n\t_getValue_unbound( targetArray, offset ) {\n\n\t\tthis.bind();\n\t\tthis.getValue( targetArray, offset );\n\n\t}\n\n\t_setValue_unbound( sourceArray, offset ) {\n\n\t\tthis.bind();\n\t\tthis.setValue( sourceArray, offset );\n\n\t}\n\n\t// create getter / setter pair for a property in the scene graph\n\tbind() {\n\n\t\tlet targetObject = this.node;\n\t\tconst parsedPath = this.parsedPath;\n\n\t\tconst objectName = parsedPath.objectName;\n\t\tconst propertyName = parsedPath.propertyName;\n\t\tlet propertyIndex = parsedPath.propertyIndex;\n\n\t\tif ( ! targetObject ) {\n\n\t\t\ttargetObject = PropertyBinding.findNode( this.rootNode, parsedPath.nodeName ) || this.rootNode;\n\n\t\t\tthis.node = targetObject;\n\n\t\t}\n\n\t\t// set fail state so we can just 'return' on error\n\t\tthis.getValue = this._getValue_unavailable;\n\t\tthis.setValue = this._setValue_unavailable;\n\n\t\t// ensure there is a value node\n\t\tif ( ! targetObject ) {\n\n\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to update node for track: ' + this.path + ' but it wasn\\'t found.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( objectName ) {\n\n\t\t\tlet objectIndex = parsedPath.objectIndex;\n\n\t\t\t// special cases were we need to reach deeper into the hierarchy to get the face materials....\n\t\t\tswitch ( objectName ) {\n\n\t\t\t\tcase 'materials':\n\n\t\t\t\t\tif ( ! targetObject.material ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material as node does not have a material.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! targetObject.material.materials ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject.material.materials;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'bones':\n\n\t\t\t\t\tif ( ! targetObject.skeleton ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// potential future optimization: skip this if propertyIndex is already an integer\n\t\t\t\t\t// and convert the integer string to a true integer.\n\n\t\t\t\t\ttargetObject = targetObject.skeleton.bones;\n\n\t\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\t\tfor ( let i = 0; i < targetObject.length; i ++ ) {\n\n\t\t\t\t\t\tif ( targetObject[ i ].name === objectIndex ) {\n\n\t\t\t\t\t\t\tobjectIndex = i;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tif ( targetObject[ objectName ] === undefined ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to objectName of node undefined.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject[ objectName ];\n\n\t\t\t}\n\n\n\t\t\tif ( objectIndex !== undefined ) {\n\n\t\t\t\tif ( targetObject[ objectIndex ] === undefined ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\ttargetObject = targetObject[ objectIndex ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// resolve property\n\t\tconst nodeProperty = targetObject[ propertyName ];\n\n\t\tif ( nodeProperty === undefined ) {\n\n\t\t\tconst nodeName = parsedPath.nodeName;\n\n\t\t\tconsole.error( 'THREE.PropertyBinding: Trying to update property for track: ' + nodeName +\n\t\t\t\t'.' + propertyName + ' but it wasn\\'t found.', targetObject );\n\t\t\treturn;\n\n\t\t}\n\n\t\t// determine versioning scheme\n\t\tlet versioning = this.Versioning.None;\n\n\t\tthis.targetObject = targetObject;\n\n\t\tif ( targetObject.needsUpdate !== undefined ) { // material\n\n\t\t\tversioning = this.Versioning.NeedsUpdate;\n\n\t\t} else if ( targetObject.matrixWorldNeedsUpdate !== undefined ) { // node transform\n\n\t\t\tversioning = this.Versioning.MatrixWorldNeedsUpdate;\n\n\t\t}\n\n\t\t// determine how the property gets bound\n\t\tlet bindingType = this.BindingType.Direct;\n\n\t\tif ( propertyIndex !== undefined ) {\n\n\t\t\t// access a sub element of the property array (only primitives are supported right now)\n\n\t\t\tif ( propertyName === 'morphTargetInfluences' ) {\n\n\t\t\t\t// potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer.\n\n\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\tif ( ! targetObject.geometry ) {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tif ( targetObject.geometry.isBufferGeometry ) {\n\n\t\t\t\t\tif ( ! targetObject.geometry.morphAttributes ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( targetObject.morphTargetDictionary[ propertyIndex ] !== undefined ) {\n\n\t\t\t\t\t\tpropertyIndex = targetObject.morphTargetDictionary[ propertyIndex ];\n\n\t\t\t\t\t}\n\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.', this );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbindingType = this.BindingType.ArrayElement;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\tthis.propertyIndex = propertyIndex;\n\n\t\t} else if ( nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined ) {\n\n\t\t\t// must use copy for Object3D.Euler/Quaternion\n\n\t\t\tbindingType = this.BindingType.HasFromToArray;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\n\t\t} else if ( Array.isArray( nodeProperty ) ) {\n\n\t\t\tbindingType = this.BindingType.EntireArray;\n\n\t\t\tthis.resolvedProperty = nodeProperty;\n\n\t\t} else {\n\n\t\t\tthis.propertyName = propertyName;\n\n\t\t}\n\n\t\t// select getter / setter\n\t\tthis.getValue = this.GetterByBindingType[ bindingType ];\n\t\tthis.setValue = this.SetterByBindingTypeAndVersioning[ bindingType ][ versioning ];\n\n\t}\n\n\tunbind() {\n\n\t\tthis.node = null;\n\n\t\t// back to the prototype version of getValue / setValue\n\t\t// note: avoiding to mutate the shape of 'this' via 'delete'\n\t\tthis.getValue = this._getValue_unbound;\n\t\tthis.setValue = this._setValue_unbound;\n\n\t}\n\n}\n\nPropertyBinding.Composite = Composite;\n\nPropertyBinding.prototype.BindingType = {\n\tDirect: 0,\n\tEntireArray: 1,\n\tArrayElement: 2,\n\tHasFromToArray: 3\n};\n\nPropertyBinding.prototype.Versioning = {\n\tNone: 0,\n\tNeedsUpdate: 1,\n\tMatrixWorldNeedsUpdate: 2\n};\n\nPropertyBinding.prototype.GetterByBindingType = [\n\n\tPropertyBinding.prototype._getValue_direct,\n\tPropertyBinding.prototype._getValue_array,\n\tPropertyBinding.prototype._getValue_arrayElement,\n\tPropertyBinding.prototype._getValue_toArray,\n\n];\n\nPropertyBinding.prototype.SetterByBindingTypeAndVersioning = [\n\n\t[\n\t\t// Direct\n\t\tPropertyBinding.prototype._setValue_direct,\n\t\tPropertyBinding.prototype._setValue_direct_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_direct_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// EntireArray\n\n\t\tPropertyBinding.prototype._setValue_array,\n\t\tPropertyBinding.prototype._setValue_array_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_array_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// ArrayElement\n\t\tPropertyBinding.prototype._setValue_arrayElement,\n\t\tPropertyBinding.prototype._setValue_arrayElement_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate,\n\n\t], [\n\n\t\t// HasToFromArray\n\t\tPropertyBinding.prototype._setValue_fromArray,\n\t\tPropertyBinding.prototype._setValue_fromArray_setNeedsUpdate,\n\t\tPropertyBinding.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate,\n\n\t]\n\n];\n\n/**\n *\n * A group of objects that receives a shared animation state.\n *\n * Usage:\n *\n * - Add objects you would otherwise pass as 'root' to the\n * constructor or the .clipAction method of AnimationMixer.\n *\n * - Instead pass this object as 'root'.\n *\n * - You can also add and remove objects later when the mixer\n * is running.\n *\n * Note:\n *\n * Objects of this class appear as one object to the mixer,\n * so cache control of the individual objects must be done\n * on the group.\n *\n * Limitation:\n *\n * - The animated properties must be compatible among the\n * all objects in the group.\n *\n * - A single property can either be controlled through a\n * target group or directly, but not both.\n */\n\nclass AnimationObjectGroup {\n\n\tconstructor() {\n\n\t\tthis.uuid = generateUUID();\n\n\t\t// cached objects followed by the active ones\n\t\tthis._objects = Array.prototype.slice.call( arguments );\n\n\t\tthis.nCachedObjects_ = 0; // threshold\n\t\t// note: read by PropertyBinding.Composite\n\n\t\tconst indices = {};\n\t\tthis._indicesByUUID = indices; // for bookkeeping\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tindices[ arguments[ i ].uuid ] = i;\n\n\t\t}\n\n\t\tthis._paths = []; // inside: string\n\t\tthis._parsedPaths = []; // inside: { we don't care, here }\n\t\tthis._bindings = []; // inside: Array< PropertyBinding >\n\t\tthis._bindingsIndicesByPath = {}; // inside: indices in these arrays\n\n\t\tconst scope = this;\n\n\t\tthis.stats = {\n\n\t\t\tobjects: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._objects.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn this.total - scope.nCachedObjects_;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tget bindingsPerObject() {\n\n\t\t\t\treturn scope._bindings.length;\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tadd() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tpaths = this._paths,\n\t\t\tparsedPaths = this._parsedPaths,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet knownObject = undefined,\n\t\t\tnObjects = objects.length,\n\t\t\tnCachedObjects = this.nCachedObjects_;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid;\n\t\t\tlet index = indicesByUUID[ uuid ];\n\n\t\t\tif ( index === undefined ) {\n\n\t\t\t\t// unknown object -> add it to the ACTIVE region\n\n\t\t\t\tindex = nObjects ++;\n\t\t\t\tindicesByUUID[ uuid ] = index;\n\t\t\t\tobjects.push( object );\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tbindings[ j ].push( new PropertyBinding( object, paths[ j ], parsedPaths[ j ] ) );\n\n\t\t\t\t}\n\n\t\t\t} else if ( index < nCachedObjects ) {\n\n\t\t\t\tknownObject = objects[ index ];\n\n\t\t\t\t// move existing object to the ACTIVE region\n\n\t\t\t\tconst firstActiveIndex = -- nCachedObjects,\n\t\t\t\t\tlastCachedObject = objects[ firstActiveIndex ];\n\n\t\t\t\tindicesByUUID[ lastCachedObject.uuid ] = index;\n\t\t\t\tobjects[ index ] = lastCachedObject;\n\n\t\t\t\tindicesByUUID[ uuid ] = firstActiveIndex;\n\t\t\t\tobjects[ firstActiveIndex ] = object;\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\tlastCached = bindingsForPath[ firstActiveIndex ];\n\n\t\t\t\t\tlet binding = bindingsForPath[ index ];\n\n\t\t\t\t\tbindingsForPath[ index ] = lastCached;\n\n\t\t\t\t\tif ( binding === undefined ) {\n\n\t\t\t\t\t\t// since we do not bother to create new bindings\n\t\t\t\t\t\t// for objects that are cached, the binding may\n\t\t\t\t\t\t// or may not exist\n\n\t\t\t\t\t\tbinding = new PropertyBinding( object, paths[ j ], parsedPaths[ j ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbindingsForPath[ firstActiveIndex ] = binding;\n\n\t\t\t\t}\n\n\t\t\t} else if ( objects[ index ] !== knownObject ) {\n\n\t\t\t\tconsole.error( 'THREE.AnimationObjectGroup: Different objects with the same UUID ' +\n\t\t\t\t\t'detected. Clean the caches or recreate your infrastructure when reloading scenes.' );\n\n\t\t\t} // else the object is already where we want it to be\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\tremove() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet nCachedObjects = this.nCachedObjects_;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid,\n\t\t\t\tindex = indicesByUUID[ uuid ];\n\n\t\t\tif ( index !== undefined && index >= nCachedObjects ) {\n\n\t\t\t\t// move existing object into the CACHED region\n\n\t\t\t\tconst lastCachedIndex = nCachedObjects ++,\n\t\t\t\t\tfirstActiveObject = objects[ lastCachedIndex ];\n\n\t\t\t\tindicesByUUID[ firstActiveObject.uuid ] = index;\n\t\t\t\tobjects[ index ] = firstActiveObject;\n\n\t\t\t\tindicesByUUID[ uuid ] = lastCachedIndex;\n\t\t\t\tobjects[ lastCachedIndex ] = object;\n\n\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\tfirstActive = bindingsForPath[ lastCachedIndex ],\n\t\t\t\t\t\tbinding = bindingsForPath[ index ];\n\n\t\t\t\t\tbindingsForPath[ index ] = firstActive;\n\t\t\t\t\tbindingsForPath[ lastCachedIndex ] = binding;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\t// remove & forget\n\tuncache() {\n\n\t\tconst objects = this._objects,\n\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\tbindings = this._bindings,\n\t\t\tnBindings = bindings.length;\n\n\t\tlet nCachedObjects = this.nCachedObjects_,\n\t\t\tnObjects = objects.length;\n\n\t\tfor ( let i = 0, n = arguments.length; i !== n; ++ i ) {\n\n\t\t\tconst object = arguments[ i ],\n\t\t\t\tuuid = object.uuid,\n\t\t\t\tindex = indicesByUUID[ uuid ];\n\n\t\t\tif ( index !== undefined ) {\n\n\t\t\t\tdelete indicesByUUID[ uuid ];\n\n\t\t\t\tif ( index < nCachedObjects ) {\n\n\t\t\t\t\t// object is cached, shrink the CACHED region\n\n\t\t\t\t\tconst firstActiveIndex = -- nCachedObjects,\n\t\t\t\t\t\tlastCachedObject = objects[ firstActiveIndex ],\n\t\t\t\t\t\tlastIndex = -- nObjects,\n\t\t\t\t\t\tlastObject = objects[ lastIndex ];\n\n\t\t\t\t\t// last cached object takes this object's place\n\t\t\t\t\tindicesByUUID[ lastCachedObject.uuid ] = index;\n\t\t\t\t\tobjects[ index ] = lastCachedObject;\n\n\t\t\t\t\t// last object goes to the activated slot and pop\n\t\t\t\t\tindicesByUUID[ lastObject.uuid ] = firstActiveIndex;\n\t\t\t\t\tobjects[ firstActiveIndex ] = lastObject;\n\t\t\t\t\tobjects.pop();\n\n\t\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\t\tconst bindingsForPath = bindings[ j ],\n\t\t\t\t\t\t\tlastCached = bindingsForPath[ firstActiveIndex ],\n\t\t\t\t\t\t\tlast = bindingsForPath[ lastIndex ];\n\n\t\t\t\t\t\tbindingsForPath[ index ] = lastCached;\n\t\t\t\t\t\tbindingsForPath[ firstActiveIndex ] = last;\n\t\t\t\t\t\tbindingsForPath.pop();\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// object is active, just swap with the last and pop\n\n\t\t\t\t\tconst lastIndex = -- nObjects,\n\t\t\t\t\t\tlastObject = objects[ lastIndex ];\n\n\t\t\t\t\tif ( lastIndex > 0 ) {\n\n\t\t\t\t\t\tindicesByUUID[ lastObject.uuid ] = index;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tobjects[ index ] = lastObject;\n\t\t\t\t\tobjects.pop();\n\n\t\t\t\t\t// accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor ( let j = 0, m = nBindings; j !== m; ++ j ) {\n\n\t\t\t\t\t\tconst bindingsForPath = bindings[ j ];\n\n\t\t\t\t\t\tbindingsForPath[ index ] = bindingsForPath[ lastIndex ];\n\t\t\t\t\t\tbindingsForPath.pop();\n\n\t\t\t\t\t}\n\n\t\t\t\t} // cached or active\n\n\t\t\t} // if object is known\n\n\t\t} // for arguments\n\n\t\tthis.nCachedObjects_ = nCachedObjects;\n\n\t}\n\n\t// Internal interface used by befriended PropertyBinding.Composite:\n\n\tsubscribe_( path, parsedPath ) {\n\n\t\t// returns an array of bindings for the given path that is changed\n\t\t// according to the contained objects in the group\n\n\t\tconst indicesByPath = this._bindingsIndicesByPath;\n\t\tlet index = indicesByPath[ path ];\n\t\tconst bindings = this._bindings;\n\n\t\tif ( index !== undefined ) return bindings[ index ];\n\n\t\tconst paths = this._paths,\n\t\t\tparsedPaths = this._parsedPaths,\n\t\t\tobjects = this._objects,\n\t\t\tnObjects = objects.length,\n\t\t\tnCachedObjects = this.nCachedObjects_,\n\t\t\tbindingsForPath = new Array( nObjects );\n\n\t\tindex = bindings.length;\n\n\t\tindicesByPath[ path ] = index;\n\n\t\tpaths.push( path );\n\t\tparsedPaths.push( parsedPath );\n\t\tbindings.push( bindingsForPath );\n\n\t\tfor ( let i = nCachedObjects, n = objects.length; i !== n; ++ i ) {\n\n\t\t\tconst object = objects[ i ];\n\t\t\tbindingsForPath[ i ] = new PropertyBinding( object, path, parsedPath );\n\n\t\t}\n\n\t\treturn bindingsForPath;\n\n\t}\n\n\tunsubscribe_( path ) {\n\n\t\t// tells the group to forget about a property path and no longer\n\t\t// update the array previously obtained with 'subscribe_'\n\n\t\tconst indicesByPath = this._bindingsIndicesByPath,\n\t\t\tindex = indicesByPath[ path ];\n\n\t\tif ( index !== undefined ) {\n\n\t\t\tconst paths = this._paths,\n\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\tbindings = this._bindings,\n\t\t\t\tlastBindingsIndex = bindings.length - 1,\n\t\t\t\tlastBindings = bindings[ lastBindingsIndex ],\n\t\t\t\tlastBindingsPath = path[ lastBindingsIndex ];\n\n\t\t\tindicesByPath[ lastBindingsPath ] = index;\n\n\t\t\tbindings[ index ] = lastBindings;\n\t\t\tbindings.pop();\n\n\t\t\tparsedPaths[ index ] = parsedPaths[ lastBindingsIndex ];\n\t\t\tparsedPaths.pop();\n\n\t\t\tpaths[ index ] = paths[ lastBindingsIndex ];\n\t\t\tpaths.pop();\n\n\t\t}\n\n\t}\n\n}\n\nAnimationObjectGroup.prototype.isAnimationObjectGroup = true;\n\nclass AnimationAction {\n\n\tconstructor( mixer, clip, localRoot = null, blendMode = clip.blendMode ) {\n\n\t\tthis._mixer = mixer;\n\t\tthis._clip = clip;\n\t\tthis._localRoot = localRoot;\n\t\tthis.blendMode = blendMode;\n\n\t\tconst tracks = clip.tracks,\n\t\t\tnTracks = tracks.length,\n\t\t\tinterpolants = new Array( nTracks );\n\n\t\tconst interpolantSettings = {\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\t\t};\n\n\t\tfor ( let i = 0; i !== nTracks; ++ i ) {\n\n\t\t\tconst interpolant = tracks[ i ].createInterpolant( null );\n\t\t\tinterpolants[ i ] = interpolant;\n\t\t\tinterpolant.settings = interpolantSettings;\n\n\t\t}\n\n\t\tthis._interpolantSettings = interpolantSettings;\n\n\t\tthis._interpolants = interpolants; // bound by the mixer\n\n\t\t// inside: PropertyMixer (managed by the mixer)\n\t\tthis._propertyBindings = new Array( nTracks );\n\n\t\tthis._cacheIndex = null; // for the memory manager\n\t\tthis._byClipCacheIndex = null; // for the memory manager\n\n\t\tthis._timeScaleInterpolant = null;\n\t\tthis._weightInterpolant = null;\n\n\t\tthis.loop = LoopRepeat;\n\t\tthis._loopCount = - 1;\n\n\t\t// global mixer time when the action is to be started\n\t\t// it's set back to 'null' upon start of the action\n\t\tthis._startTime = null;\n\n\t\t// scaled local time of the action\n\t\t// gets clamped or wrapped to 0..clip.duration according to loop\n\t\tthis.time = 0;\n\n\t\tthis.timeScale = 1;\n\t\tthis._effectiveTimeScale = 1;\n\n\t\tthis.weight = 1;\n\t\tthis._effectiveWeight = 1;\n\n\t\tthis.repetitions = Infinity; // no. of repetitions when looping\n\n\t\tthis.paused = false; // true -> zero effective time scale\n\t\tthis.enabled = true; // false -> zero effective weight\n\n\t\tthis.clampWhenFinished = false;// keep feeding the last frame?\n\n\t\tthis.zeroSlopeAtStart = true;// for smooth interpolation w/o separate\n\t\tthis.zeroSlopeAtEnd = true;// clips for start, loop and end\n\n\t}\n\n\t// State & Scheduling\n\n\tplay() {\n\n\t\tthis._mixer._activateAction( this );\n\n\t\treturn this;\n\n\t}\n\n\tstop() {\n\n\t\tthis._mixer._deactivateAction( this );\n\n\t\treturn this.reset();\n\n\t}\n\n\treset() {\n\n\t\tthis.paused = false;\n\t\tthis.enabled = true;\n\n\t\tthis.time = 0; // restart clip\n\t\tthis._loopCount = - 1;// forget previous loops\n\t\tthis._startTime = null;// forget scheduling\n\n\t\treturn this.stopFading().stopWarping();\n\n\t}\n\n\tisRunning() {\n\n\t\treturn this.enabled && ! this.paused && this.timeScale !== 0 &&\n\t\t\tthis._startTime === null && this._mixer._isActiveAction( this );\n\n\t}\n\n\t// return true when play has been called\n\tisScheduled() {\n\n\t\treturn this._mixer._isActiveAction( this );\n\n\t}\n\n\tstartAt( time ) {\n\n\t\tthis._startTime = time;\n\n\t\treturn this;\n\n\t}\n\n\tsetLoop( mode, repetitions ) {\n\n\t\tthis.loop = mode;\n\t\tthis.repetitions = repetitions;\n\n\t\treturn this;\n\n\t}\n\n\t// Weight\n\n\t// set the weight stopping any scheduled fading\n\t// although .enabled = false yields an effective weight of zero, this\n\t// method does *not* change .enabled, because it would be confusing\n\tsetEffectiveWeight( weight ) {\n\n\t\tthis.weight = weight;\n\n\t\t// note: same logic as when updated at runtime\n\t\tthis._effectiveWeight = this.enabled ? weight : 0;\n\n\t\treturn this.stopFading();\n\n\t}\n\n\t// return the weight considering fading and .enabled\n\tgetEffectiveWeight() {\n\n\t\treturn this._effectiveWeight;\n\n\t}\n\n\tfadeIn( duration ) {\n\n\t\treturn this._scheduleFading( duration, 0, 1 );\n\n\t}\n\n\tfadeOut( duration ) {\n\n\t\treturn this._scheduleFading( duration, 1, 0 );\n\n\t}\n\n\tcrossFadeFrom( fadeOutAction, duration, warp ) {\n\n\t\tfadeOutAction.fadeOut( duration );\n\t\tthis.fadeIn( duration );\n\n\t\tif ( warp ) {\n\n\t\t\tconst fadeInDuration = this._clip.duration,\n\t\t\t\tfadeOutDuration = fadeOutAction._clip.duration,\n\n\t\t\t\tstartEndRatio = fadeOutDuration / fadeInDuration,\n\t\t\t\tendStartRatio = fadeInDuration / fadeOutDuration;\n\n\t\t\tfadeOutAction.warp( 1.0, startEndRatio, duration );\n\t\t\tthis.warp( endStartRatio, 1.0, duration );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tcrossFadeTo( fadeInAction, duration, warp ) {\n\n\t\treturn fadeInAction.crossFadeFrom( this, duration, warp );\n\n\t}\n\n\tstopFading() {\n\n\t\tconst weightInterpolant = this._weightInterpolant;\n\n\t\tif ( weightInterpolant !== null ) {\n\n\t\t\tthis._weightInterpolant = null;\n\t\t\tthis._mixer._takeBackControlInterpolant( weightInterpolant );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Time Scale Control\n\n\t// set the time scale stopping any scheduled warping\n\t// although .paused = true yields an effective time scale of zero, this\n\t// method does *not* change .paused, because it would be confusing\n\tsetEffectiveTimeScale( timeScale ) {\n\n\t\tthis.timeScale = timeScale;\n\t\tthis._effectiveTimeScale = this.paused ? 0 : timeScale;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\t// return the time scale considering warping and .paused\n\tgetEffectiveTimeScale() {\n\n\t\treturn this._effectiveTimeScale;\n\n\t}\n\n\tsetDuration( duration ) {\n\n\t\tthis.timeScale = this._clip.duration / duration;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\tsyncWith( action ) {\n\n\t\tthis.time = action.time;\n\t\tthis.timeScale = action.timeScale;\n\n\t\treturn this.stopWarping();\n\n\t}\n\n\thalt( duration ) {\n\n\t\treturn this.warp( this._effectiveTimeScale, 0, duration );\n\n\t}\n\n\twarp( startTimeScale, endTimeScale, duration ) {\n\n\t\tconst mixer = this._mixer,\n\t\t\tnow = mixer.time,\n\t\t\ttimeScale = this.timeScale;\n\n\t\tlet interpolant = this._timeScaleInterpolant;\n\n\t\tif ( interpolant === null ) {\n\n\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\tthis._timeScaleInterpolant = interpolant;\n\n\t\t}\n\n\t\tconst times = interpolant.parameterPositions,\n\t\t\tvalues = interpolant.sampleValues;\n\n\t\ttimes[ 0 ] = now;\n\t\ttimes[ 1 ] = now + duration;\n\n\t\tvalues[ 0 ] = startTimeScale / timeScale;\n\t\tvalues[ 1 ] = endTimeScale / timeScale;\n\n\t\treturn this;\n\n\t}\n\n\tstopWarping() {\n\n\t\tconst timeScaleInterpolant = this._timeScaleInterpolant;\n\n\t\tif ( timeScaleInterpolant !== null ) {\n\n\t\t\tthis._timeScaleInterpolant = null;\n\t\t\tthis._mixer._takeBackControlInterpolant( timeScaleInterpolant );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Object Accessors\n\n\tgetMixer() {\n\n\t\treturn this._mixer;\n\n\t}\n\n\tgetClip() {\n\n\t\treturn this._clip;\n\n\t}\n\n\tgetRoot() {\n\n\t\treturn this._localRoot || this._mixer._root;\n\n\t}\n\n\t// Interna\n\n\t_update( time, deltaTime, timeDirection, accuIndex ) {\n\n\t\t// called by the mixer\n\n\t\tif ( ! this.enabled ) {\n\n\t\t\t// call ._updateWeight() to update ._effectiveWeight\n\n\t\t\tthis._updateWeight( time );\n\t\t\treturn;\n\n\t\t}\n\n\t\tconst startTime = this._startTime;\n\n\t\tif ( startTime !== null ) {\n\n\t\t\t// check for scheduled start of action\n\n\t\t\tconst timeRunning = ( time - startTime ) * timeDirection;\n\t\t\tif ( timeRunning < 0 || timeDirection === 0 ) {\n\n\t\t\t\treturn; // yet to come / don't decide when delta = 0\n\n\t\t\t}\n\n\t\t\t// start\n\n\t\t\tthis._startTime = null; // unschedule\n\t\t\tdeltaTime = timeDirection * timeRunning;\n\n\t\t}\n\n\t\t// apply time scale and advance time\n\n\t\tdeltaTime *= this._updateTimeScale( time );\n\t\tconst clipTime = this._updateTime( deltaTime );\n\n\t\t// note: _updateTime may disable the action resulting in\n\t\t// an effective weight of 0\n\n\t\tconst weight = this._updateWeight( time );\n\n\t\tif ( weight > 0 ) {\n\n\t\t\tconst interpolants = this._interpolants;\n\t\t\tconst propertyMixers = this._propertyBindings;\n\n\t\t\tswitch ( this.blendMode ) {\n\n\t\t\t\tcase AdditiveAnimationBlendMode:\n\n\t\t\t\t\tfor ( let j = 0, m = interpolants.length; j !== m; ++ j ) {\n\n\t\t\t\t\t\tinterpolants[ j ].evaluate( clipTime );\n\t\t\t\t\t\tpropertyMixers[ j ].accumulateAdditive( weight );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase NormalAnimationBlendMode:\n\t\t\t\tdefault:\n\n\t\t\t\t\tfor ( let j = 0, m = interpolants.length; j !== m; ++ j ) {\n\n\t\t\t\t\t\tinterpolants[ j ].evaluate( clipTime );\n\t\t\t\t\t\tpropertyMixers[ j ].accumulate( accuIndex, weight );\n\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_updateWeight( time ) {\n\n\t\tlet weight = 0;\n\n\t\tif ( this.enabled ) {\n\n\t\t\tweight = this.weight;\n\t\t\tconst interpolant = this._weightInterpolant;\n\n\t\t\tif ( interpolant !== null ) {\n\n\t\t\t\tconst interpolantValue = interpolant.evaluate( time )[ 0 ];\n\n\t\t\t\tweight *= interpolantValue;\n\n\t\t\t\tif ( time > interpolant.parameterPositions[ 1 ] ) {\n\n\t\t\t\t\tthis.stopFading();\n\n\t\t\t\t\tif ( interpolantValue === 0 ) {\n\n\t\t\t\t\t\t// faded out, disable\n\t\t\t\t\t\tthis.enabled = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis._effectiveWeight = weight;\n\t\treturn weight;\n\n\t}\n\n\t_updateTimeScale( time ) {\n\n\t\tlet timeScale = 0;\n\n\t\tif ( ! this.paused ) {\n\n\t\t\ttimeScale = this.timeScale;\n\n\t\t\tconst interpolant = this._timeScaleInterpolant;\n\n\t\t\tif ( interpolant !== null ) {\n\n\t\t\t\tconst interpolantValue = interpolant.evaluate( time )[ 0 ];\n\n\t\t\t\ttimeScale *= interpolantValue;\n\n\t\t\t\tif ( time > interpolant.parameterPositions[ 1 ] ) {\n\n\t\t\t\t\tthis.stopWarping();\n\n\t\t\t\t\tif ( timeScale === 0 ) {\n\n\t\t\t\t\t\t// motion has halted, pause\n\t\t\t\t\t\tthis.paused = true;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// warp done - apply final time scale\n\t\t\t\t\t\tthis.timeScale = timeScale;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis._effectiveTimeScale = timeScale;\n\t\treturn timeScale;\n\n\t}\n\n\t_updateTime( deltaTime ) {\n\n\t\tconst duration = this._clip.duration;\n\t\tconst loop = this.loop;\n\n\t\tlet time = this.time + deltaTime;\n\t\tlet loopCount = this._loopCount;\n\n\t\tconst pingPong = ( loop === LoopPingPong );\n\n\t\tif ( deltaTime === 0 ) {\n\n\t\t\tif ( loopCount === - 1 ) return time;\n\n\t\t\treturn ( pingPong && ( loopCount & 1 ) === 1 ) ? duration - time : time;\n\n\t\t}\n\n\t\tif ( loop === LoopOnce ) {\n\n\t\t\tif ( loopCount === - 1 ) {\n\n\t\t\t\t// just started\n\n\t\t\t\tthis._loopCount = 0;\n\t\t\t\tthis._setEndings( true, true, false );\n\n\t\t\t}\n\n\t\t\thandle_stop: {\n\n\t\t\t\tif ( time >= duration ) {\n\n\t\t\t\t\ttime = duration;\n\n\t\t\t\t} else if ( time < 0 ) {\n\n\t\t\t\t\ttime = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tbreak handle_stop;\n\n\t\t\t\t}\n\n\t\t\t\tif ( this.clampWhenFinished ) this.paused = true;\n\t\t\t\telse this.enabled = false;\n\n\t\t\t\tthis.time = time;\n\n\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\ttype: 'finished', action: this,\n\t\t\t\t\tdirection: deltaTime < 0 ? - 1 : 1\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t} else { // repetitive Repeat or PingPong\n\n\t\t\tif ( loopCount === - 1 ) {\n\n\t\t\t\t// just started\n\n\t\t\t\tif ( deltaTime >= 0 ) {\n\n\t\t\t\t\tloopCount = 0;\n\n\t\t\t\t\tthis._setEndings( true, this.repetitions === 0, pingPong );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// when looping in reverse direction, the initial\n\t\t\t\t\t// transition through zero counts as a repetition,\n\t\t\t\t\t// so leave loopCount at -1\n\n\t\t\t\t\tthis._setEndings( this.repetitions === 0, true, pingPong );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( time >= duration || time < 0 ) {\n\n\t\t\t\t// wrap around\n\n\t\t\t\tconst loopDelta = Math.floor( time / duration ); // signed\n\t\t\t\ttime -= duration * loopDelta;\n\n\t\t\t\tloopCount += Math.abs( loopDelta );\n\n\t\t\t\tconst pending = this.repetitions - loopCount;\n\n\t\t\t\tif ( pending <= 0 ) {\n\n\t\t\t\t\t// have to stop (switch state, clamp time, fire event)\n\n\t\t\t\t\tif ( this.clampWhenFinished ) this.paused = true;\n\t\t\t\t\telse this.enabled = false;\n\n\t\t\t\t\ttime = deltaTime > 0 ? duration : 0;\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\t\ttype: 'finished', action: this,\n\t\t\t\t\t\tdirection: deltaTime > 0 ? 1 : - 1\n\t\t\t\t\t} );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// keep running\n\n\t\t\t\t\tif ( pending === 1 ) {\n\n\t\t\t\t\t\t// entering the last round\n\n\t\t\t\t\t\tconst atStart = deltaTime < 0;\n\t\t\t\t\t\tthis._setEndings( atStart, ! atStart, pingPong );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthis._setEndings( false, false, pingPong );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis._loopCount = loopCount;\n\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent( {\n\t\t\t\t\t\ttype: 'loop', action: this, loopDelta: loopDelta\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tthis.time = time;\n\n\t\t\t}\n\n\t\t\tif ( pingPong && ( loopCount & 1 ) === 1 ) {\n\n\t\t\t\t// invert time for the \"pong round\"\n\n\t\t\t\treturn duration - time;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn time;\n\n\t}\n\n\t_setEndings( atStart, atEnd, pingPong ) {\n\n\t\tconst settings = this._interpolantSettings;\n\n\t\tif ( pingPong ) {\n\n\t\t\tsettings.endingStart = ZeroSlopeEnding;\n\t\t\tsettings.endingEnd = ZeroSlopeEnding;\n\n\t\t} else {\n\n\t\t\t// assuming for LoopOnce atStart == atEnd == true\n\n\t\t\tif ( atStart ) {\n\n\t\t\t\tsettings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\n\t\t\t} else {\n\n\t\t\t\tsettings.endingStart = WrapAroundEnding;\n\n\t\t\t}\n\n\t\t\tif ( atEnd ) {\n\n\t\t\t\tsettings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\n\t\t\t} else {\n\n\t\t\t\tsettings.endingEnd \t = WrapAroundEnding;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_scheduleFading( duration, weightNow, weightThen ) {\n\n\t\tconst mixer = this._mixer, now = mixer.time;\n\t\tlet interpolant = this._weightInterpolant;\n\n\t\tif ( interpolant === null ) {\n\n\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\tthis._weightInterpolant = interpolant;\n\n\t\t}\n\n\t\tconst times = interpolant.parameterPositions,\n\t\t\tvalues = interpolant.sampleValues;\n\n\t\ttimes[ 0 ] = now;\n\t\tvalues[ 0 ] = weightNow;\n\t\ttimes[ 1 ] = now + duration;\n\t\tvalues[ 1 ] = weightThen;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass AnimationMixer extends EventDispatcher {\n\n\tconstructor( root ) {\n\n\t\tsuper();\n\n\t\tthis._root = root;\n\t\tthis._initMemoryManager();\n\t\tthis._accuIndex = 0;\n\t\tthis.time = 0;\n\t\tthis.timeScale = 1.0;\n\n\t}\n\n\t_bindAction( action, prototypeAction ) {\n\n\t\tconst root = action._localRoot || this._root,\n\t\t\ttracks = action._clip.tracks,\n\t\t\tnTracks = tracks.length,\n\t\t\tbindings = action._propertyBindings,\n\t\t\tinterpolants = action._interpolants,\n\t\t\trootUuid = root.uuid,\n\t\t\tbindingsByRoot = this._bindingsByRootAndName;\n\n\t\tlet bindingsByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingsByName === undefined ) {\n\n\t\t\tbindingsByName = {};\n\t\t\tbindingsByRoot[ rootUuid ] = bindingsByName;\n\n\t\t}\n\n\t\tfor ( let i = 0; i !== nTracks; ++ i ) {\n\n\t\t\tconst track = tracks[ i ],\n\t\t\t\ttrackName = track.name;\n\n\t\t\tlet binding = bindingsByName[ trackName ];\n\n\t\t\tif ( binding !== undefined ) {\n\n\t\t\t\tbindings[ i ] = binding;\n\n\t\t\t} else {\n\n\t\t\t\tbinding = bindings[ i ];\n\n\t\t\t\tif ( binding !== undefined ) {\n\n\t\t\t\t\t// existing binding, make sure the cache knows\n\n\t\t\t\t\tif ( binding._cacheIndex === null ) {\n\n\t\t\t\t\t\t++ binding.referenceCount;\n\t\t\t\t\t\tthis._addInactiveBinding( binding, rootUuid, trackName );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\n\t\t\t\t}\n\n\t\t\t\tconst path = prototypeAction && prototypeAction.\n\t\t\t\t\t_propertyBindings[ i ].binding.parsedPath;\n\n\t\t\t\tbinding = new PropertyMixer(\n\t\t\t\t\tPropertyBinding.create( root, trackName, path ),\n\t\t\t\t\ttrack.ValueTypeName, track.getValueSize() );\n\n\t\t\t\t++ binding.referenceCount;\n\t\t\t\tthis._addInactiveBinding( binding, rootUuid, trackName );\n\n\t\t\t\tbindings[ i ] = binding;\n\n\t\t\t}\n\n\t\t\tinterpolants[ i ].resultBuffer = binding.buffer;\n\n\t\t}\n\n\t}\n\n\t_activateAction( action ) {\n\n\t\tif ( ! this._isActiveAction( action ) ) {\n\n\t\t\tif ( action._cacheIndex === null ) {\n\n\t\t\t\t// this action has been forgotten by the cache, but the user\n\t\t\t\t// appears to be still using it -> rebind\n\n\t\t\t\tconst rootUuid = ( action._localRoot || this._root ).uuid,\n\t\t\t\t\tclipUuid = action._clip.uuid,\n\t\t\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\t\t\tthis._bindAction( action,\n\t\t\t\t\tactionsForClip && actionsForClip.knownActions[ 0 ] );\n\n\t\t\t\tthis._addInactiveAction( action, clipUuid, rootUuid );\n\n\t\t\t}\n\n\t\t\tconst bindings = action._propertyBindings;\n\n\t\t\t// increment reference counts / sort out state\n\t\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\t\tconst binding = bindings[ i ];\n\n\t\t\t\tif ( binding.useCount ++ === 0 ) {\n\n\t\t\t\t\tthis._lendBinding( binding );\n\t\t\t\t\tbinding.saveOriginalState();\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._lendAction( action );\n\n\t\t}\n\n\t}\n\n\t_deactivateAction( action ) {\n\n\t\tif ( this._isActiveAction( action ) ) {\n\n\t\t\tconst bindings = action._propertyBindings;\n\n\t\t\t// decrement reference counts / sort out state\n\t\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\t\tconst binding = bindings[ i ];\n\n\t\t\t\tif ( -- binding.useCount === 0 ) {\n\n\t\t\t\t\tbinding.restoreOriginalState();\n\t\t\t\t\tthis._takeBackBinding( binding );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis._takeBackAction( action );\n\n\t\t}\n\n\t}\n\n\t// Memory manager\n\n\t_initMemoryManager() {\n\n\t\tthis._actions = []; // 'nActiveActions' followed by inactive ones\n\t\tthis._nActiveActions = 0;\n\n\t\tthis._actionsByClip = {};\n\t\t// inside:\n\t\t// {\n\t\t// \tknownActions: Array< AnimationAction > - used as prototypes\n\t\t// \tactionByRoot: AnimationAction - lookup\n\t\t// }\n\n\n\t\tthis._bindings = []; // 'nActiveBindings' followed by inactive ones\n\t\tthis._nActiveBindings = 0;\n\n\t\tthis._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer >\n\n\n\t\tthis._controlInterpolants = []; // same game as above\n\t\tthis._nActiveControlInterpolants = 0;\n\n\t\tconst scope = this;\n\n\t\tthis.stats = {\n\n\t\t\tactions: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._actions.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveActions;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tbindings: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._bindings.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveBindings;\n\n\t\t\t\t}\n\t\t\t},\n\t\t\tcontrolInterpolants: {\n\t\t\t\tget total() {\n\n\t\t\t\t\treturn scope._controlInterpolants.length;\n\n\t\t\t\t},\n\t\t\t\tget inUse() {\n\n\t\t\t\t\treturn scope._nActiveControlInterpolants;\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t// Memory management for AnimationAction objects\n\n\t_isActiveAction( action ) {\n\n\t\tconst index = action._cacheIndex;\n\t\treturn index !== null && index < this._nActiveActions;\n\n\t}\n\n\t_addInactiveAction( action, clipUuid, rootUuid ) {\n\n\t\tconst actions = this._actions,\n\t\t\tactionsByClip = this._actionsByClip;\n\n\t\tlet actionsForClip = actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip === undefined ) {\n\n\t\t\tactionsForClip = {\n\n\t\t\t\tknownActions: [ action ],\n\t\t\t\tactionByRoot: {}\n\n\t\t\t};\n\n\t\t\taction._byClipCacheIndex = 0;\n\n\t\t\tactionsByClip[ clipUuid ] = actionsForClip;\n\n\t\t} else {\n\n\t\t\tconst knownActions = actionsForClip.knownActions;\n\n\t\t\taction._byClipCacheIndex = knownActions.length;\n\t\t\tknownActions.push( action );\n\n\t\t}\n\n\t\taction._cacheIndex = actions.length;\n\t\tactions.push( action );\n\n\t\tactionsForClip.actionByRoot[ rootUuid ] = action;\n\n\t}\n\n\t_removeInactiveAction( action ) {\n\n\t\tconst actions = this._actions,\n\t\t\tlastInactiveAction = actions[ actions.length - 1 ],\n\t\t\tcacheIndex = action._cacheIndex;\n\n\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\tactions[ cacheIndex ] = lastInactiveAction;\n\t\tactions.pop();\n\n\t\taction._cacheIndex = null;\n\n\n\t\tconst clipUuid = action._clip.uuid,\n\t\t\tactionsByClip = this._actionsByClip,\n\t\t\tactionsForClip = actionsByClip[ clipUuid ],\n\t\t\tknownActionsForClip = actionsForClip.knownActions,\n\n\t\t\tlastKnownAction =\n\t\t\t\tknownActionsForClip[ knownActionsForClip.length - 1 ],\n\n\t\t\tbyClipCacheIndex = action._byClipCacheIndex;\n\n\t\tlastKnownAction._byClipCacheIndex = byClipCacheIndex;\n\t\tknownActionsForClip[ byClipCacheIndex ] = lastKnownAction;\n\t\tknownActionsForClip.pop();\n\n\t\taction._byClipCacheIndex = null;\n\n\n\t\tconst actionByRoot = actionsForClip.actionByRoot,\n\t\t\trootUuid = ( action._localRoot || this._root ).uuid;\n\n\t\tdelete actionByRoot[ rootUuid ];\n\n\t\tif ( knownActionsForClip.length === 0 ) {\n\n\t\t\tdelete actionsByClip[ clipUuid ];\n\n\t\t}\n\n\t\tthis._removeInactiveBindingsForAction( action );\n\n\t}\n\n\t_removeInactiveBindingsForAction( action ) {\n\n\t\tconst bindings = action._propertyBindings;\n\n\t\tfor ( let i = 0, n = bindings.length; i !== n; ++ i ) {\n\n\t\t\tconst binding = bindings[ i ];\n\n\t\t\tif ( -- binding.referenceCount === 0 ) {\n\n\t\t\t\tthis._removeInactiveBinding( binding );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t_lendAction( action ) {\n\n\t\t// [ active actions | inactive actions ]\n\t\t// [ active actions >| inactive actions ]\n\t\t// s a\n\t\t// <-swap->\n\t\t// a s\n\n\t\tconst actions = this._actions,\n\t\t\tprevIndex = action._cacheIndex,\n\n\t\t\tlastActiveIndex = this._nActiveActions ++,\n\n\t\t\tfirstInactiveAction = actions[ lastActiveIndex ];\n\n\t\taction._cacheIndex = lastActiveIndex;\n\t\tactions[ lastActiveIndex ] = action;\n\n\t\tfirstInactiveAction._cacheIndex = prevIndex;\n\t\tactions[ prevIndex ] = firstInactiveAction;\n\n\t}\n\n\t_takeBackAction( action ) {\n\n\t\t// [ active actions | inactive actions ]\n\t\t// [ active actions |< inactive actions ]\n\t\t// a s\n\t\t// <-swap->\n\t\t// s a\n\n\t\tconst actions = this._actions,\n\t\t\tprevIndex = action._cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveActions,\n\n\t\t\tlastActiveAction = actions[ firstInactiveIndex ];\n\n\t\taction._cacheIndex = firstInactiveIndex;\n\t\tactions[ firstInactiveIndex ] = action;\n\n\t\tlastActiveAction._cacheIndex = prevIndex;\n\t\tactions[ prevIndex ] = lastActiveAction;\n\n\t}\n\n\t// Memory management for PropertyMixer objects\n\n\t_addInactiveBinding( binding, rootUuid, trackName ) {\n\n\t\tconst bindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindings = this._bindings;\n\n\t\tlet bindingByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingByName === undefined ) {\n\n\t\t\tbindingByName = {};\n\t\t\tbindingsByRoot[ rootUuid ] = bindingByName;\n\n\t\t}\n\n\t\tbindingByName[ trackName ] = binding;\n\n\t\tbinding._cacheIndex = bindings.length;\n\t\tbindings.push( binding );\n\n\t}\n\n\t_removeInactiveBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tpropBinding = binding.binding,\n\t\t\trootUuid = propBinding.rootNode.uuid,\n\t\t\ttrackName = propBinding.path,\n\t\t\tbindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindingByName = bindingsByRoot[ rootUuid ],\n\n\t\t\tlastInactiveBinding = bindings[ bindings.length - 1 ],\n\t\t\tcacheIndex = binding._cacheIndex;\n\n\t\tlastInactiveBinding._cacheIndex = cacheIndex;\n\t\tbindings[ cacheIndex ] = lastInactiveBinding;\n\t\tbindings.pop();\n\n\t\tdelete bindingByName[ trackName ];\n\n\t\tif ( Object.keys( bindingByName ).length === 0 ) {\n\n\t\t\tdelete bindingsByRoot[ rootUuid ];\n\n\t\t}\n\n\t}\n\n\t_lendBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tprevIndex = binding._cacheIndex,\n\n\t\t\tlastActiveIndex = this._nActiveBindings ++,\n\n\t\t\tfirstInactiveBinding = bindings[ lastActiveIndex ];\n\n\t\tbinding._cacheIndex = lastActiveIndex;\n\t\tbindings[ lastActiveIndex ] = binding;\n\n\t\tfirstInactiveBinding._cacheIndex = prevIndex;\n\t\tbindings[ prevIndex ] = firstInactiveBinding;\n\n\t}\n\n\t_takeBackBinding( binding ) {\n\n\t\tconst bindings = this._bindings,\n\t\t\tprevIndex = binding._cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveBindings,\n\n\t\t\tlastActiveBinding = bindings[ firstInactiveIndex ];\n\n\t\tbinding._cacheIndex = firstInactiveIndex;\n\t\tbindings[ firstInactiveIndex ] = binding;\n\n\t\tlastActiveBinding._cacheIndex = prevIndex;\n\t\tbindings[ prevIndex ] = lastActiveBinding;\n\n\t}\n\n\n\t// Memory management of Interpolants for weight and time scale\n\n\t_lendControlInterpolant() {\n\n\t\tconst interpolants = this._controlInterpolants,\n\t\t\tlastActiveIndex = this._nActiveControlInterpolants ++;\n\n\t\tlet interpolant = interpolants[ lastActiveIndex ];\n\n\t\tif ( interpolant === undefined ) {\n\n\t\t\tinterpolant = new LinearInterpolant(\n\t\t\t\tnew Float32Array( 2 ), new Float32Array( 2 ),\n\t\t\t\t1, this._controlInterpolantsResultBuffer );\n\n\t\t\tinterpolant.__cacheIndex = lastActiveIndex;\n\t\t\tinterpolants[ lastActiveIndex ] = interpolant;\n\n\t\t}\n\n\t\treturn interpolant;\n\n\t}\n\n\t_takeBackControlInterpolant( interpolant ) {\n\n\t\tconst interpolants = this._controlInterpolants,\n\t\t\tprevIndex = interpolant.__cacheIndex,\n\n\t\t\tfirstInactiveIndex = -- this._nActiveControlInterpolants,\n\n\t\t\tlastActiveInterpolant = interpolants[ firstInactiveIndex ];\n\n\t\tinterpolant.__cacheIndex = firstInactiveIndex;\n\t\tinterpolants[ firstInactiveIndex ] = interpolant;\n\n\t\tlastActiveInterpolant.__cacheIndex = prevIndex;\n\t\tinterpolants[ prevIndex ] = lastActiveInterpolant;\n\n\t}\n\n\t// return an action for a clip optionally using a custom root target\n\t// object (this method allocates a lot of dynamic memory in case a\n\t// previously unknown clip/root combination is specified)\n\tclipAction( clip, optionalRoot, blendMode ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid;\n\n\t\tlet clipObject = typeof clip === 'string' ? AnimationClip.findByName( root, clip ) : clip;\n\n\t\tconst clipUuid = clipObject !== null ? clipObject.uuid : clip;\n\n\t\tconst actionsForClip = this._actionsByClip[ clipUuid ];\n\t\tlet prototypeAction = null;\n\n\t\tif ( blendMode === undefined ) {\n\n\t\t\tif ( clipObject !== null ) {\n\n\t\t\t\tblendMode = clipObject.blendMode;\n\n\t\t\t} else {\n\n\t\t\t\tblendMode = NormalAnimationBlendMode;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\tconst existingAction = actionsForClip.actionByRoot[ rootUuid ];\n\n\t\t\tif ( existingAction !== undefined && existingAction.blendMode === blendMode ) {\n\n\t\t\t\treturn existingAction;\n\n\t\t\t}\n\n\t\t\t// we know the clip, so we don't have to parse all\n\t\t\t// the bindings again but can just copy\n\t\t\tprototypeAction = actionsForClip.knownActions[ 0 ];\n\n\t\t\t// also, take the clip from the prototype action\n\t\t\tif ( clipObject === null )\n\t\t\t\tclipObject = prototypeAction._clip;\n\n\t\t}\n\n\t\t// clip must be known when specified via string\n\t\tif ( clipObject === null ) return null;\n\n\t\t// allocate all resources required to run it\n\t\tconst newAction = new AnimationAction( this, clipObject, optionalRoot, blendMode );\n\n\t\tthis._bindAction( newAction, prototypeAction );\n\n\t\t// and make the action known to the memory manager\n\t\tthis._addInactiveAction( newAction, clipUuid, rootUuid );\n\n\t\treturn newAction;\n\n\t}\n\n\t// get an existing action\n\texistingAction( clip, optionalRoot ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid,\n\n\t\t\tclipObject = typeof clip === 'string' ?\n\t\t\t\tAnimationClip.findByName( root, clip ) : clip,\n\n\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\n\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\treturn actionsForClip.actionByRoot[ rootUuid ] || null;\n\n\t\t}\n\n\t\treturn null;\n\n\t}\n\n\t// deactivates all previously scheduled actions\n\tstopAllAction() {\n\n\t\tconst actions = this._actions,\n\t\t\tnActions = this._nActiveActions;\n\n\t\tfor ( let i = nActions - 1; i >= 0; -- i ) {\n\n\t\t\tactions[ i ].stop();\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// advance the time and update apply the animation\n\tupdate( deltaTime ) {\n\n\t\tdeltaTime *= this.timeScale;\n\n\t\tconst actions = this._actions,\n\t\t\tnActions = this._nActiveActions,\n\n\t\t\ttime = this.time += deltaTime,\n\t\t\ttimeDirection = Math.sign( deltaTime ),\n\n\t\t\taccuIndex = this._accuIndex ^= 1;\n\n\t\t// run active actions\n\n\t\tfor ( let i = 0; i !== nActions; ++ i ) {\n\n\t\t\tconst action = actions[ i ];\n\n\t\t\taction._update( time, deltaTime, timeDirection, accuIndex );\n\n\t\t}\n\n\t\t// update scene graph\n\n\t\tconst bindings = this._bindings,\n\t\t\tnBindings = this._nActiveBindings;\n\n\t\tfor ( let i = 0; i !== nBindings; ++ i ) {\n\n\t\t\tbindings[ i ].apply( accuIndex );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\t// Allows you to seek to a specific time in an animation.\n\tsetTime( timeInSeconds ) {\n\n\t\tthis.time = 0; // Zero out time attribute for AnimationMixer object;\n\t\tfor ( let i = 0; i < this._actions.length; i ++ ) {\n\n\t\t\tthis._actions[ i ].time = 0; // Zero out time attribute for all associated AnimationAction objects.\n\n\t\t}\n\n\t\treturn this.update( timeInSeconds ); // Update used to set exact time. Returns \"this\" AnimationMixer object.\n\n\t}\n\n\t// return this mixer's root target object\n\tgetRoot() {\n\n\t\treturn this._root;\n\n\t}\n\n\t// free all resources specific to a particular clip\n\tuncacheClip( clip ) {\n\n\t\tconst actions = this._actions,\n\t\t\tclipUuid = clip.uuid,\n\t\t\tactionsByClip = this._actionsByClip,\n\t\t\tactionsForClip = actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\t// note: just calling _removeInactiveAction would mess up the\n\t\t\t// iteration state and also require updating the state we can\n\t\t\t// just throw away\n\n\t\t\tconst actionsToRemove = actionsForClip.knownActions;\n\n\t\t\tfor ( let i = 0, n = actionsToRemove.length; i !== n; ++ i ) {\n\n\t\t\t\tconst action = actionsToRemove[ i ];\n\n\t\t\t\tthis._deactivateAction( action );\n\n\t\t\t\tconst cacheIndex = action._cacheIndex,\n\t\t\t\t\tlastInactiveAction = actions[ actions.length - 1 ];\n\n\t\t\t\taction._cacheIndex = null;\n\t\t\t\taction._byClipCacheIndex = null;\n\n\t\t\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\t\t\tactions[ cacheIndex ] = lastInactiveAction;\n\t\t\t\tactions.pop();\n\n\t\t\t\tthis._removeInactiveBindingsForAction( action );\n\n\t\t\t}\n\n\t\t\tdelete actionsByClip[ clipUuid ];\n\n\t\t}\n\n\t}\n\n\t// free all resources specific to a particular root target object\n\tuncacheRoot( root ) {\n\n\t\tconst rootUuid = root.uuid,\n\t\t\tactionsByClip = this._actionsByClip;\n\n\t\tfor ( const clipUuid in actionsByClip ) {\n\n\t\t\tconst actionByRoot = actionsByClip[ clipUuid ].actionByRoot,\n\t\t\t\taction = actionByRoot[ rootUuid ];\n\n\t\t\tif ( action !== undefined ) {\n\n\t\t\t\tthis._deactivateAction( action );\n\t\t\t\tthis._removeInactiveAction( action );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst bindingsByRoot = this._bindingsByRootAndName,\n\t\t\tbindingByName = bindingsByRoot[ rootUuid ];\n\n\t\tif ( bindingByName !== undefined ) {\n\n\t\t\tfor ( const trackName in bindingByName ) {\n\n\t\t\t\tconst binding = bindingByName[ trackName ];\n\t\t\t\tbinding.restoreOriginalState();\n\t\t\t\tthis._removeInactiveBinding( binding );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t// remove a targeted clip from the cache\n\tuncacheAction( clip, optionalRoot ) {\n\n\t\tconst action = this.existingAction( clip, optionalRoot );\n\n\t\tif ( action !== null ) {\n\n\t\t\tthis._deactivateAction( action );\n\t\t\tthis._removeInactiveAction( action );\n\n\t\t}\n\n\t}\n\n}\n\nAnimationMixer.prototype._controlInterpolantsResultBuffer = new Float32Array( 1 );\n\nclass Uniform {\n\n\tconstructor( value ) {\n\n\t\tif ( typeof value === 'string' ) {\n\n\t\t\tconsole.warn( 'THREE.Uniform: Type parameter is no longer needed.' );\n\t\t\tvalue = arguments[ 1 ];\n\n\t\t}\n\n\t\tthis.value = value;\n\n\t}\n\n\tclone() {\n\n\t\treturn new Uniform( this.value.clone === undefined ? this.value : this.value.clone() );\n\n\t}\n\n}\n\nclass InstancedInterleavedBuffer extends InterleavedBuffer {\n\n\tconstructor( array, stride, meshPerAttribute = 1 ) {\n\n\t\tsuper( array, stride );\n\n\t\tthis.meshPerAttribute = meshPerAttribute;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source );\n\n\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\n\t\treturn this;\n\n\t}\n\n\tclone( data ) {\n\n\t\tconst ib = super.clone( data );\n\n\t\tib.meshPerAttribute = this.meshPerAttribute;\n\n\t\treturn ib;\n\n\t}\n\n\ttoJSON( data ) {\n\n\t\tconst json = super.toJSON( data );\n\n\t\tjson.isInstancedInterleavedBuffer = true;\n\t\tjson.meshPerAttribute = this.meshPerAttribute;\n\n\t\treturn json;\n\n\t}\n\n}\n\nInstancedInterleavedBuffer.prototype.isInstancedInterleavedBuffer = true;\n\nclass GLBufferAttribute {\n\n\tconstructor( buffer, type, itemSize, elementSize, count ) {\n\n\t\tthis.buffer = buffer;\n\t\tthis.type = type;\n\t\tthis.itemSize = itemSize;\n\t\tthis.elementSize = elementSize;\n\t\tthis.count = count;\n\n\t\tthis.version = 0;\n\n\t}\n\n\tset needsUpdate( value ) {\n\n\t\tif ( value === true ) this.version ++;\n\n\t}\n\n\tsetBuffer( buffer ) {\n\n\t\tthis.buffer = buffer;\n\n\t\treturn this;\n\n\t}\n\n\tsetType( type, elementSize ) {\n\n\t\tthis.type = type;\n\t\tthis.elementSize = elementSize;\n\n\t\treturn this;\n\n\t}\n\n\tsetItemSize( itemSize ) {\n\n\t\tthis.itemSize = itemSize;\n\n\t\treturn this;\n\n\t}\n\n\tsetCount( count ) {\n\n\t\tthis.count = count;\n\n\t\treturn this;\n\n\t}\n\n}\n\nGLBufferAttribute.prototype.isGLBufferAttribute = true;\n\nclass Raycaster {\n\n\tconstructor( origin, direction, near = 0, far = Infinity ) {\n\n\t\tthis.ray = new Ray( origin, direction );\n\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.camera = null;\n\t\tthis.layers = new Layers();\n\n\t\tthis.params = {\n\t\t\tMesh: {},\n\t\t\tLine: { threshold: 1 },\n\t\t\tLOD: {},\n\t\t\tPoints: { threshold: 1 },\n\t\t\tSprite: {}\n\t\t};\n\n\t}\n\n\tset( origin, direction ) {\n\n\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.ray.set( origin, direction );\n\n\t}\n\n\tsetFromCamera( coords, camera ) {\n\n\t\tif ( camera && camera.isPerspectiveCamera ) {\n\n\t\t\tthis.ray.origin.setFromMatrixPosition( camera.matrixWorld );\n\t\t\tthis.ray.direction.set( coords.x, coords.y, 0.5 ).unproject( camera ).sub( this.ray.origin ).normalize();\n\t\t\tthis.camera = camera;\n\n\t\t} else if ( camera && camera.isOrthographicCamera ) {\n\n\t\t\tthis.ray.origin.set( coords.x, coords.y, ( camera.near + camera.far ) / ( camera.near - camera.far ) ).unproject( camera ); // set origin in plane of camera\n\t\t\tthis.ray.direction.set( 0, 0, - 1 ).transformDirection( camera.matrixWorld );\n\t\t\tthis.camera = camera;\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.Raycaster: Unsupported camera type: ' + camera.type );\n\n\t\t}\n\n\t}\n\n\tintersectObject( object, recursive = false, intersects = [] ) {\n\n\t\tintersectObject( object, this, intersects, recursive );\n\n\t\tintersects.sort( ascSort );\n\n\t\treturn intersects;\n\n\t}\n\n\tintersectObjects( objects, recursive = false, intersects = [] ) {\n\n\t\tfor ( let i = 0, l = objects.length; i < l; i ++ ) {\n\n\t\t\tintersectObject( objects[ i ], this, intersects, recursive );\n\n\t\t}\n\n\t\tintersects.sort( ascSort );\n\n\t\treturn intersects;\n\n\t}\n\n}\n\nfunction ascSort( a, b ) {\n\n\treturn a.distance - b.distance;\n\n}\n\nfunction intersectObject( object, raycaster, intersects, recursive ) {\n\n\tif ( object.layers.test( raycaster.layers ) ) {\n\n\t\tobject.raycast( raycaster, intersects );\n\n\t}\n\n\tif ( recursive === true ) {\n\n\t\tconst children = object.children;\n\n\t\tfor ( let i = 0, l = children.length; i < l; i ++ ) {\n\n\t\t\tintersectObject( children[ i ], raycaster, intersects, true );\n\n\t\t}\n\n\t}\n\n}\n\n/**\n * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system\n *\n * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.\n * The azimuthal angle (theta) is measured from the positive z-axis.\n */\n\nclass Spherical {\n\n\tconstructor( radius = 1, phi = 0, theta = 0 ) {\n\n\t\tthis.radius = radius;\n\t\tthis.phi = phi; // polar angle\n\t\tthis.theta = theta; // azimuthal angle\n\n\t\treturn this;\n\n\t}\n\n\tset( radius, phi, theta ) {\n\n\t\tthis.radius = radius;\n\t\tthis.phi = phi;\n\t\tthis.theta = theta;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( other ) {\n\n\t\tthis.radius = other.radius;\n\t\tthis.phi = other.phi;\n\t\tthis.theta = other.theta;\n\n\t\treturn this;\n\n\t}\n\n\t// restrict phi to be betwee EPS and PI-EPS\n\tmakeSafe() {\n\n\t\tconst EPS = 0.000001;\n\t\tthis.phi = Math.max( EPS, Math.min( Math.PI - EPS, this.phi ) );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\treturn this.setFromCartesianCoords( v.x, v.y, v.z );\n\n\t}\n\n\tsetFromCartesianCoords( x, y, z ) {\n\n\t\tthis.radius = Math.sqrt( x * x + y * y + z * z );\n\n\t\tif ( this.radius === 0 ) {\n\n\t\t\tthis.theta = 0;\n\t\t\tthis.phi = 0;\n\n\t\t} else {\n\n\t\t\tthis.theta = Math.atan2( x, z );\n\t\t\tthis.phi = Math.acos( clamp( y / this.radius, - 1, 1 ) );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\n/**\n * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system\n */\n\nclass Cylindrical {\n\n\tconstructor( radius = 1, theta = 0, y = 0 ) {\n\n\t\tthis.radius = radius; // distance from the origin to a point in the x-z plane\n\t\tthis.theta = theta; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis\n\t\tthis.y = y; // height above the x-z plane\n\n\t\treturn this;\n\n\t}\n\n\tset( radius, theta, y ) {\n\n\t\tthis.radius = radius;\n\t\tthis.theta = theta;\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tcopy( other ) {\n\n\t\tthis.radius = other.radius;\n\t\tthis.theta = other.theta;\n\t\tthis.y = other.y;\n\n\t\treturn this;\n\n\t}\n\n\tsetFromVector3( v ) {\n\n\t\treturn this.setFromCartesianCoords( v.x, v.y, v.z );\n\n\t}\n\n\tsetFromCartesianCoords( x, y, z ) {\n\n\t\tthis.radius = Math.sqrt( x * x + z * z );\n\t\tthis.theta = Math.atan2( x, z );\n\t\tthis.y = y;\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nconst _vector$4 = /*@__PURE__*/ new Vector2();\n\nclass Box2 {\n\n\tconstructor( min = new Vector2( + Infinity, + Infinity ), max = new Vector2( - Infinity, - Infinity ) ) {\n\n\t\tthis.min = min;\n\t\tthis.max = max;\n\n\t}\n\n\tset( min, max ) {\n\n\t\tthis.min.copy( min );\n\t\tthis.max.copy( max );\n\n\t\treturn this;\n\n\t}\n\n\tsetFromPoints( points ) {\n\n\t\tthis.makeEmpty();\n\n\t\tfor ( let i = 0, il = points.length; i < il; i ++ ) {\n\n\t\t\tthis.expandByPoint( points[ i ] );\n\n\t\t}\n\n\t\treturn this;\n\n\t}\n\n\tsetFromCenterAndSize( center, size ) {\n\n\t\tconst halfSize = _vector$4.copy( size ).multiplyScalar( 0.5 );\n\t\tthis.min.copy( center ).sub( halfSize );\n\t\tthis.max.copy( center ).add( halfSize );\n\n\t\treturn this;\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n\tcopy( box ) {\n\n\t\tthis.min.copy( box.min );\n\t\tthis.max.copy( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tmakeEmpty() {\n\n\t\tthis.min.x = this.min.y = + Infinity;\n\t\tthis.max.x = this.max.y = - Infinity;\n\n\t\treturn this;\n\n\t}\n\n\tisEmpty() {\n\n\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\n\t\treturn ( this.max.x < this.min.x ) || ( this.max.y < this.min.y );\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0 ) : target.addVectors( this.min, this.max ).multiplyScalar( 0.5 );\n\n\t}\n\n\tgetSize( target ) {\n\n\t\treturn this.isEmpty() ? target.set( 0, 0 ) : target.subVectors( this.max, this.min );\n\n\t}\n\n\texpandByPoint( point ) {\n\n\t\tthis.min.min( point );\n\t\tthis.max.max( point );\n\n\t\treturn this;\n\n\t}\n\n\texpandByVector( vector ) {\n\n\t\tthis.min.sub( vector );\n\t\tthis.max.add( vector );\n\n\t\treturn this;\n\n\t}\n\n\texpandByScalar( scalar ) {\n\n\t\tthis.min.addScalar( - scalar );\n\t\tthis.max.addScalar( scalar );\n\n\t\treturn this;\n\n\t}\n\n\tcontainsPoint( point ) {\n\n\t\treturn point.x < this.min.x || point.x > this.max.x ||\n\t\t\tpoint.y < this.min.y || point.y > this.max.y ? false : true;\n\n\t}\n\n\tcontainsBox( box ) {\n\n\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x &&\n\t\t\tthis.min.y <= box.min.y && box.max.y <= this.max.y;\n\n\t}\n\n\tgetParameter( point, target ) {\n\n\t\t// This can potentially have a divide by zero if the box\n\t\t// has a size dimension of 0.\n\n\t\treturn target.set(\n\t\t\t( point.x - this.min.x ) / ( this.max.x - this.min.x ),\n\t\t\t( point.y - this.min.y ) / ( this.max.y - this.min.y )\n\t\t);\n\n\t}\n\n\tintersectsBox( box ) {\n\n\t\t// using 4 splitting planes to rule out intersections\n\n\t\treturn box.max.x < this.min.x || box.min.x > this.max.x ||\n\t\t\tbox.max.y < this.min.y || box.min.y > this.max.y ? false : true;\n\n\t}\n\n\tclampPoint( point, target ) {\n\n\t\treturn target.copy( point ).clamp( this.min, this.max );\n\n\t}\n\n\tdistanceToPoint( point ) {\n\n\t\tconst clampedPoint = _vector$4.copy( point ).clamp( this.min, this.max );\n\t\treturn clampedPoint.sub( point ).length();\n\n\t}\n\n\tintersect( box ) {\n\n\t\tthis.min.max( box.min );\n\t\tthis.max.min( box.max );\n\n\t\treturn this;\n\n\t}\n\n\tunion( box ) {\n\n\t\tthis.min.min( box.min );\n\t\tthis.max.max( box.max );\n\n\t\treturn this;\n\n\t}\n\n\ttranslate( offset ) {\n\n\t\tthis.min.add( offset );\n\t\tthis.max.add( offset );\n\n\t\treturn this;\n\n\t}\n\n\tequals( box ) {\n\n\t\treturn box.min.equals( this.min ) && box.max.equals( this.max );\n\n\t}\n\n}\n\nBox2.prototype.isBox2 = true;\n\nconst _startP = /*@__PURE__*/ new Vector3();\nconst _startEnd = /*@__PURE__*/ new Vector3();\n\nclass Line3 {\n\n\tconstructor( start = new Vector3(), end = new Vector3() ) {\n\n\t\tthis.start = start;\n\t\tthis.end = end;\n\n\t}\n\n\tset( start, end ) {\n\n\t\tthis.start.copy( start );\n\t\tthis.end.copy( end );\n\n\t\treturn this;\n\n\t}\n\n\tcopy( line ) {\n\n\t\tthis.start.copy( line.start );\n\t\tthis.end.copy( line.end );\n\n\t\treturn this;\n\n\t}\n\n\tgetCenter( target ) {\n\n\t\treturn target.addVectors( this.start, this.end ).multiplyScalar( 0.5 );\n\n\t}\n\n\tdelta( target ) {\n\n\t\treturn target.subVectors( this.end, this.start );\n\n\t}\n\n\tdistanceSq() {\n\n\t\treturn this.start.distanceToSquared( this.end );\n\n\t}\n\n\tdistance() {\n\n\t\treturn this.start.distanceTo( this.end );\n\n\t}\n\n\tat( t, target ) {\n\n\t\treturn this.delta( target ).multiplyScalar( t ).add( this.start );\n\n\t}\n\n\tclosestPointToPointParameter( point, clampToLine ) {\n\n\t\t_startP.subVectors( point, this.start );\n\t\t_startEnd.subVectors( this.end, this.start );\n\n\t\tconst startEnd2 = _startEnd.dot( _startEnd );\n\t\tconst startEnd_startP = _startEnd.dot( _startP );\n\n\t\tlet t = startEnd_startP / startEnd2;\n\n\t\tif ( clampToLine ) {\n\n\t\t\tt = clamp( t, 0, 1 );\n\n\t\t}\n\n\t\treturn t;\n\n\t}\n\n\tclosestPointToPoint( point, clampToLine, target ) {\n\n\t\tconst t = this.closestPointToPointParameter( point, clampToLine );\n\n\t\treturn this.delta( target ).multiplyScalar( t ).add( this.start );\n\n\t}\n\n\tapplyMatrix4( matrix ) {\n\n\t\tthis.start.applyMatrix4( matrix );\n\t\tthis.end.applyMatrix4( matrix );\n\n\t\treturn this;\n\n\t}\n\n\tequals( line ) {\n\n\t\treturn line.start.equals( this.start ) && line.end.equals( this.end );\n\n\t}\n\n\tclone() {\n\n\t\treturn new this.constructor().copy( this );\n\n\t}\n\n}\n\nclass ImmediateRenderObject extends Object3D {\n\n\tconstructor( material ) {\n\n\t\tsuper();\n\n\t\tthis.material = material;\n\t\tthis.render = function ( /* renderCallback */ ) {};\n\n\t\tthis.hasPositions = false;\n\t\tthis.hasNormals = false;\n\t\tthis.hasColors = false;\n\t\tthis.hasUvs = false;\n\n\t\tthis.positionArray = null;\n\t\tthis.normalArray = null;\n\t\tthis.colorArray = null;\n\t\tthis.uvArray = null;\n\n\t\tthis.count = 0;\n\n\t}\n\n}\n\nImmediateRenderObject.prototype.isImmediateRenderObject = true;\n\nconst _vector$3 = /*@__PURE__*/ new Vector3();\n\nclass SpotLightHelper extends Object3D {\n\n\tconstructor( light, color ) {\n\n\t\tsuper();\n\t\tthis.light = light;\n\t\tthis.light.updateMatrixWorld();\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tconst positions = [\n\t\t\t0, 0, 0, \t0, 0, 1,\n\t\t\t0, 0, 0, \t1, 0, 1,\n\t\t\t0, 0, 0,\t- 1, 0, 1,\n\t\t\t0, 0, 0, \t0, 1, 1,\n\t\t\t0, 0, 0, \t0, - 1, 1\n\t\t];\n\n\t\tfor ( let i = 0, j = 1, l = 32; i < l; i ++, j ++ ) {\n\n\t\t\tconst p1 = ( i / l ) * Math.PI * 2;\n\t\t\tconst p2 = ( j / l ) * Math.PI * 2;\n\n\t\t\tpositions.push(\n\t\t\t\tMath.cos( p1 ), Math.sin( p1 ), 1,\n\t\t\t\tMath.cos( p2 ), Math.sin( p2 ), 1\n\t\t\t);\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { fog: false, toneMapped: false } );\n\n\t\tthis.cone = new LineSegments( geometry, material );\n\t\tthis.add( this.cone );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.cone.geometry.dispose();\n\t\tthis.cone.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tthis.light.updateMatrixWorld();\n\n\t\tconst coneLength = this.light.distance ? this.light.distance : 1000;\n\t\tconst coneWidth = coneLength * Math.tan( this.light.angle );\n\n\t\tthis.cone.scale.set( coneWidth, coneWidth, coneLength );\n\n\t\t_vector$3.setFromMatrixPosition( this.light.target.matrixWorld );\n\n\t\tthis.cone.lookAt( _vector$3 );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.cone.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.cone.material.color.copy( this.light.color );\n\n\t\t}\n\n\t}\n\n}\n\nconst _vector$2 = /*@__PURE__*/ new Vector3();\nconst _boneMatrix = /*@__PURE__*/ new Matrix4();\nconst _matrixWorldInv = /*@__PURE__*/ new Matrix4();\n\n\nclass SkeletonHelper extends LineSegments {\n\n\tconstructor( object ) {\n\n\t\tconst bones = getBoneList( object );\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\tconst color1 = new Color( 0, 0, 1 );\n\t\tconst color2 = new Color( 0, 1, 0 );\n\n\t\tfor ( let i = 0; i < bones.length; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\n\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tvertices.push( 0, 0, 0 );\n\t\t\t\tcolors.push( color1.r, color1.g, color1.b );\n\t\t\t\tcolors.push( color2.r, color2.g, color2.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, depthTest: false, depthWrite: false, toneMapped: false, transparent: true } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'SkeletonHelper';\n\t\tthis.isSkeletonHelper = true;\n\n\t\tthis.root = object;\n\t\tthis.bones = bones;\n\n\t\tthis.matrix = object.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tconst bones = this.bones;\n\n\t\tconst geometry = this.geometry;\n\t\tconst position = geometry.getAttribute( 'position' );\n\n\t\t_matrixWorldInv.copy( this.root.matrixWorld ).invert();\n\n\t\tfor ( let i = 0, j = 0; i < bones.length; i ++ ) {\n\n\t\t\tconst bone = bones[ i ];\n\n\t\t\tif ( bone.parent && bone.parent.isBone ) {\n\n\t\t\t\t_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.matrixWorld );\n\t\t\t\t_vector$2.setFromMatrixPosition( _boneMatrix );\n\t\t\t\tposition.setXYZ( j, _vector$2.x, _vector$2.y, _vector$2.z );\n\n\t\t\t\t_boneMatrix.multiplyMatrices( _matrixWorldInv, bone.parent.matrixWorld );\n\t\t\t\t_vector$2.setFromMatrixPosition( _boneMatrix );\n\t\t\t\tposition.setXYZ( j + 1, _vector$2.x, _vector$2.y, _vector$2.z );\n\n\t\t\t\tj += 2;\n\n\t\t\t}\n\n\t\t}\n\n\t\tgeometry.getAttribute( 'position' ).needsUpdate = true;\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n}\n\n\nfunction getBoneList( object ) {\n\n\tconst boneList = [];\n\n\tif ( object && object.isBone ) {\n\n\t\tboneList.push( object );\n\n\t}\n\n\tfor ( let i = 0; i < object.children.length; i ++ ) {\n\n\t\tboneList.push.apply( boneList, getBoneList( object.children[ i ] ) );\n\n\t}\n\n\treturn boneList;\n\n}\n\nclass PointLightHelper extends Mesh {\n\n\tconstructor( light, sphereSize, color ) {\n\n\t\tconst geometry = new SphereGeometry( sphereSize, 4, 2 );\n\t\tconst material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.light = light;\n\t\tthis.light.updateMatrixWorld();\n\n\t\tthis.color = color;\n\n\t\tthis.type = 'PointLightHelper';\n\n\t\tthis.matrix = this.light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.update();\n\n\n\t\t/*\n\t// TODO: delete this comment?\n\tconst distanceGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 );\n\tconst distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );\n\n\tthis.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );\n\tthis.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );\n\n\tconst d = light.distance;\n\n\tif ( d === 0.0 ) {\n\n\t\tthis.lightDistance.visible = false;\n\n\t} else {\n\n\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t}\n\n\tthis.add( this.lightDistance );\n\t*/\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.material.color.copy( this.light.color );\n\n\t\t}\n\n\t\t/*\n\t\tconst d = this.light.distance;\n\n\t\tif ( d === 0.0 ) {\n\n\t\t\tthis.lightDistance.visible = false;\n\n\t\t} else {\n\n\t\t\tthis.lightDistance.visible = true;\n\t\t\tthis.lightDistance.scale.set( d, d, d );\n\n\t\t}\n\t\t*/\n\n\t}\n\n}\n\nconst _vector$1 = /*@__PURE__*/ new Vector3();\nconst _color1 = /*@__PURE__*/ new Color();\nconst _color2 = /*@__PURE__*/ new Color();\n\nclass HemisphereLightHelper extends Object3D {\n\n\tconstructor( light, size, color ) {\n\n\t\tsuper();\n\t\tthis.light = light;\n\t\tthis.light.updateMatrixWorld();\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tconst geometry = new OctahedronGeometry( size );\n\t\tgeometry.rotateY( Math.PI * 0.5 );\n\n\t\tthis.material = new MeshBasicMaterial( { wireframe: true, fog: false, toneMapped: false } );\n\t\tif ( this.color === undefined ) this.material.vertexColors = true;\n\n\t\tconst position = geometry.getAttribute( 'position' );\n\t\tconst colors = new Float32Array( position.count * 3 );\n\n\t\tgeometry.setAttribute( 'color', new BufferAttribute( colors, 3 ) );\n\n\t\tthis.add( new Mesh( geometry, this.material ) );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.children[ 0 ].geometry.dispose();\n\t\tthis.children[ 0 ].material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\tconst mesh = this.children[ 0 ];\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tconst colors = mesh.geometry.getAttribute( 'color' );\n\n\t\t\t_color1.copy( this.light.color );\n\t\t\t_color2.copy( this.light.groundColor );\n\n\t\t\tfor ( let i = 0, l = colors.count; i < l; i ++ ) {\n\n\t\t\t\tconst color = ( i < ( l / 2 ) ) ? _color1 : _color2;\n\n\t\t\t\tcolors.setXYZ( i, color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t\tcolors.needsUpdate = true;\n\n\t\t}\n\n\t\tmesh.lookAt( _vector$1.setFromMatrixPosition( this.light.matrixWorld ).negate() );\n\n\t}\n\n}\n\nclass GridHelper extends LineSegments {\n\n\tconstructor( size = 10, divisions = 10, color1 = 0x444444, color2 = 0x888888 ) {\n\n\t\tcolor1 = new Color( color1 );\n\t\tcolor2 = new Color( color2 );\n\n\t\tconst center = divisions / 2;\n\t\tconst step = size / divisions;\n\t\tconst halfSize = size / 2;\n\n\t\tconst vertices = [], colors = [];\n\n\t\tfor ( let i = 0, j = 0, k = - halfSize; i <= divisions; i ++, k += step ) {\n\n\t\t\tvertices.push( - halfSize, 0, k, halfSize, 0, k );\n\t\t\tvertices.push( k, 0, - halfSize, k, 0, halfSize );\n\n\t\t\tconst color = i === center ? color1 : color2;\n\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\t\t\tcolor.toArray( colors, j ); j += 3;\n\n\t\t}\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'GridHelper';\n\n\t}\n\n}\n\nclass PolarGridHelper extends LineSegments {\n\n\tconstructor( radius = 10, radials = 16, circles = 8, divisions = 64, color1 = 0x444444, color2 = 0x888888 ) {\n\n\t\tcolor1 = new Color( color1 );\n\t\tcolor2 = new Color( color2 );\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\t// create the radials\n\n\t\tfor ( let i = 0; i <= radials; i ++ ) {\n\n\t\t\tconst v = ( i / radials ) * ( Math.PI * 2 );\n\n\t\t\tconst x = Math.sin( v ) * radius;\n\t\t\tconst z = Math.cos( v ) * radius;\n\n\t\t\tvertices.push( 0, 0, 0 );\n\t\t\tvertices.push( x, 0, z );\n\n\t\t\tconst color = ( i & 1 ) ? color1 : color2;\n\n\t\t\tcolors.push( color.r, color.g, color.b );\n\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t}\n\n\t\t// create the circles\n\n\t\tfor ( let i = 0; i <= circles; i ++ ) {\n\n\t\t\tconst color = ( i & 1 ) ? color1 : color2;\n\n\t\t\tconst r = radius - ( radius / circles * i );\n\n\t\t\tfor ( let j = 0; j < divisions; j ++ ) {\n\n\t\t\t\t// first vertex\n\n\t\t\t\tlet v = ( j / divisions ) * ( Math.PI * 2 );\n\n\t\t\t\tlet x = Math.sin( v ) * r;\n\t\t\t\tlet z = Math.cos( v ) * r;\n\n\t\t\t\tvertices.push( x, 0, z );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t\t// second vertex\n\n\t\t\t\tv = ( ( j + 1 ) / divisions ) * ( Math.PI * 2 );\n\n\t\t\t\tx = Math.sin( v ) * r;\n\t\t\t\tz = Math.cos( v ) * r;\n\n\t\t\t\tvertices.push( x, 0, z );\n\t\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'PolarGridHelper';\n\n\t}\n\n}\n\nconst _v1 = /*@__PURE__*/ new Vector3();\nconst _v2 = /*@__PURE__*/ new Vector3();\nconst _v3 = /*@__PURE__*/ new Vector3();\n\nclass DirectionalLightHelper extends Object3D {\n\n\tconstructor( light, size, color ) {\n\n\t\tsuper();\n\t\tthis.light = light;\n\t\tthis.light.updateMatrixWorld();\n\n\t\tthis.matrix = light.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.color = color;\n\n\t\tif ( size === undefined ) size = 1;\n\n\t\tlet geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( [\n\t\t\t- size, size, 0,\n\t\t\tsize, size, 0,\n\t\t\tsize, - size, 0,\n\t\t\t- size, - size, 0,\n\t\t\t- size, size, 0\n\t\t], 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { fog: false, toneMapped: false } );\n\n\t\tthis.lightPlane = new Line( geometry, material );\n\t\tthis.add( this.lightPlane );\n\n\t\tgeometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 0, 1 ], 3 ) );\n\n\t\tthis.targetLine = new Line( geometry, material );\n\t\tthis.add( this.targetLine );\n\n\t\tthis.update();\n\n\t}\n\n\tdispose() {\n\n\t\tthis.lightPlane.geometry.dispose();\n\t\tthis.lightPlane.material.dispose();\n\t\tthis.targetLine.geometry.dispose();\n\t\tthis.targetLine.material.dispose();\n\n\t}\n\n\tupdate() {\n\n\t\t_v1.setFromMatrixPosition( this.light.matrixWorld );\n\t\t_v2.setFromMatrixPosition( this.light.target.matrixWorld );\n\t\t_v3.subVectors( _v2, _v1 );\n\n\t\tthis.lightPlane.lookAt( _v2 );\n\n\t\tif ( this.color !== undefined ) {\n\n\t\t\tthis.lightPlane.material.color.set( this.color );\n\t\t\tthis.targetLine.material.color.set( this.color );\n\n\t\t} else {\n\n\t\t\tthis.lightPlane.material.color.copy( this.light.color );\n\t\t\tthis.targetLine.material.color.copy( this.light.color );\n\n\t\t}\n\n\t\tthis.targetLine.lookAt( _v2 );\n\t\tthis.targetLine.scale.z = _v3.length();\n\n\t}\n\n}\n\nconst _vector = /*@__PURE__*/ new Vector3();\nconst _camera = /*@__PURE__*/ new Camera();\n\n/**\n *\t- shows frustum, line of sight and up of the camera\n *\t- suitable for fast updates\n * \t- based on frustum visualization in lightgl.js shadowmap example\n *\t\thttp://evanw.github.com/lightgl.js/tests/shadowmap.html\n */\n\nclass CameraHelper extends LineSegments {\n\n\tconstructor( camera ) {\n\n\t\tconst geometry = new BufferGeometry();\n\t\tconst material = new LineBasicMaterial( { color: 0xffffff, vertexColors: true, toneMapped: false } );\n\n\t\tconst vertices = [];\n\t\tconst colors = [];\n\n\t\tconst pointMap = {};\n\n\t\t// colors\n\n\t\tconst colorFrustum = new Color( 0xffaa00 );\n\t\tconst colorCone = new Color( 0xff0000 );\n\t\tconst colorUp = new Color( 0x00aaff );\n\t\tconst colorTarget = new Color( 0xffffff );\n\t\tconst colorCross = new Color( 0x333333 );\n\n\t\t// near\n\n\t\taddLine( 'n1', 'n2', colorFrustum );\n\t\taddLine( 'n2', 'n4', colorFrustum );\n\t\taddLine( 'n4', 'n3', colorFrustum );\n\t\taddLine( 'n3', 'n1', colorFrustum );\n\n\t\t// far\n\n\t\taddLine( 'f1', 'f2', colorFrustum );\n\t\taddLine( 'f2', 'f4', colorFrustum );\n\t\taddLine( 'f4', 'f3', colorFrustum );\n\t\taddLine( 'f3', 'f1', colorFrustum );\n\n\t\t// sides\n\n\t\taddLine( 'n1', 'f1', colorFrustum );\n\t\taddLine( 'n2', 'f2', colorFrustum );\n\t\taddLine( 'n3', 'f3', colorFrustum );\n\t\taddLine( 'n4', 'f4', colorFrustum );\n\n\t\t// cone\n\n\t\taddLine( 'p', 'n1', colorCone );\n\t\taddLine( 'p', 'n2', colorCone );\n\t\taddLine( 'p', 'n3', colorCone );\n\t\taddLine( 'p', 'n4', colorCone );\n\n\t\t// up\n\n\t\taddLine( 'u1', 'u2', colorUp );\n\t\taddLine( 'u2', 'u3', colorUp );\n\t\taddLine( 'u3', 'u1', colorUp );\n\n\t\t// target\n\n\t\taddLine( 'c', 't', colorTarget );\n\t\taddLine( 'p', 'c', colorCross );\n\n\t\t// cross\n\n\t\taddLine( 'cn1', 'cn2', colorCross );\n\t\taddLine( 'cn3', 'cn4', colorCross );\n\n\t\taddLine( 'cf1', 'cf2', colorCross );\n\t\taddLine( 'cf3', 'cf4', colorCross );\n\n\t\tfunction addLine( a, b, color ) {\n\n\t\t\taddPoint( a, color );\n\t\t\taddPoint( b, color );\n\n\t\t}\n\n\t\tfunction addPoint( id, color ) {\n\n\t\t\tvertices.push( 0, 0, 0 );\n\t\t\tcolors.push( color.r, color.g, color.b );\n\n\t\t\tif ( pointMap[ id ] === undefined ) {\n\n\t\t\t\tpointMap[ id ] = [];\n\n\t\t\t}\n\n\t\t\tpointMap[ id ].push( ( vertices.length / 3 ) - 1 );\n\n\t\t}\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'CameraHelper';\n\n\t\tthis.camera = camera;\n\t\tif ( this.camera.updateProjectionMatrix ) this.camera.updateProjectionMatrix();\n\n\t\tthis.matrix = camera.matrixWorld;\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.pointMap = pointMap;\n\n\t\tthis.update();\n\n\t}\n\n\tupdate() {\n\n\t\tconst geometry = this.geometry;\n\t\tconst pointMap = this.pointMap;\n\n\t\tconst w = 1, h = 1;\n\n\t\t// we need just camera projection matrix inverse\n\t\t// world matrix must be identity\n\n\t\t_camera.projectionMatrixInverse.copy( this.camera.projectionMatrixInverse );\n\n\t\t// center / target\n\n\t\tsetPoint( 'c', pointMap, geometry, _camera, 0, 0, - 1 );\n\t\tsetPoint( 't', pointMap, geometry, _camera, 0, 0, 1 );\n\n\t\t// near\n\n\t\tsetPoint( 'n1', pointMap, geometry, _camera, - w, - h, - 1 );\n\t\tsetPoint( 'n2', pointMap, geometry, _camera, w, - h, - 1 );\n\t\tsetPoint( 'n3', pointMap, geometry, _camera, - w, h, - 1 );\n\t\tsetPoint( 'n4', pointMap, geometry, _camera, w, h, - 1 );\n\n\t\t// far\n\n\t\tsetPoint( 'f1', pointMap, geometry, _camera, - w, - h, 1 );\n\t\tsetPoint( 'f2', pointMap, geometry, _camera, w, - h, 1 );\n\t\tsetPoint( 'f3', pointMap, geometry, _camera, - w, h, 1 );\n\t\tsetPoint( 'f4', pointMap, geometry, _camera, w, h, 1 );\n\n\t\t// up\n\n\t\tsetPoint( 'u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, - 1 );\n\t\tsetPoint( 'u2', pointMap, geometry, _camera, - w * 0.7, h * 1.1, - 1 );\n\t\tsetPoint( 'u3', pointMap, geometry, _camera, 0, h * 2, - 1 );\n\n\t\t// cross\n\n\t\tsetPoint( 'cf1', pointMap, geometry, _camera, - w, 0, 1 );\n\t\tsetPoint( 'cf2', pointMap, geometry, _camera, w, 0, 1 );\n\t\tsetPoint( 'cf3', pointMap, geometry, _camera, 0, - h, 1 );\n\t\tsetPoint( 'cf4', pointMap, geometry, _camera, 0, h, 1 );\n\n\t\tsetPoint( 'cn1', pointMap, geometry, _camera, - w, 0, - 1 );\n\t\tsetPoint( 'cn2', pointMap, geometry, _camera, w, 0, - 1 );\n\t\tsetPoint( 'cn3', pointMap, geometry, _camera, 0, - h, - 1 );\n\t\tsetPoint( 'cn4', pointMap, geometry, _camera, 0, h, - 1 );\n\n\t\tgeometry.getAttribute( 'position' ).needsUpdate = true;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\n\nfunction setPoint( point, pointMap, geometry, camera, x, y, z ) {\n\n\t_vector.set( x, y, z ).unproject( camera );\n\n\tconst points = pointMap[ point ];\n\n\tif ( points !== undefined ) {\n\n\t\tconst position = geometry.getAttribute( 'position' );\n\n\t\tfor ( let i = 0, l = points.length; i < l; i ++ ) {\n\n\t\t\tposition.setXYZ( points[ i ], _vector.x, _vector.y, _vector.z );\n\n\t\t}\n\n\t}\n\n}\n\nconst _box = /*@__PURE__*/ new Box3();\n\nclass BoxHelper extends LineSegments {\n\n\tconstructor( object, color = 0xffff00 ) {\n\n\t\tconst indices = 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 ] );\n\t\tconst positions = new Float32Array( 8 * 3 );\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setIndex( new BufferAttribute( indices, 1 ) );\n\t\tgeometry.setAttribute( 'position', new BufferAttribute( positions, 3 ) );\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.object = object;\n\t\tthis.type = 'BoxHelper';\n\n\t\tthis.matrixAutoUpdate = false;\n\n\t\tthis.update();\n\n\t}\n\n\tupdate( object ) {\n\n\t\tif ( object !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.BoxHelper: .update() has no longer arguments.' );\n\n\t\t}\n\n\t\tif ( this.object !== undefined ) {\n\n\t\t\t_box.setFromObject( this.object );\n\n\t\t}\n\n\t\tif ( _box.isEmpty() ) return;\n\n\t\tconst min = _box.min;\n\t\tconst max = _box.max;\n\n\t\t/*\n\t\t\t5____4\n\t\t1/___0/|\n\t\t| 6__|_7\n\t\t2/___3/\n\n\t\t0: max.x, max.y, max.z\n\t\t1: min.x, max.y, max.z\n\t\t2: min.x, min.y, max.z\n\t\t3: max.x, min.y, max.z\n\t\t4: max.x, max.y, min.z\n\t\t5: min.x, max.y, min.z\n\t\t6: min.x, min.y, min.z\n\t\t7: max.x, min.y, min.z\n\t\t*/\n\n\t\tconst position = this.geometry.attributes.position;\n\t\tconst array = position.array;\n\n\t\tarray[ 0 ] = max.x; array[ 1 ] = max.y; array[ 2 ] = max.z;\n\t\tarray[ 3 ] = min.x; array[ 4 ] = max.y; array[ 5 ] = max.z;\n\t\tarray[ 6 ] = min.x; array[ 7 ] = min.y; array[ 8 ] = max.z;\n\t\tarray[ 9 ] = max.x; array[ 10 ] = min.y; array[ 11 ] = max.z;\n\t\tarray[ 12 ] = max.x; array[ 13 ] = max.y; array[ 14 ] = min.z;\n\t\tarray[ 15 ] = min.x; array[ 16 ] = max.y; array[ 17 ] = min.z;\n\t\tarray[ 18 ] = min.x; array[ 19 ] = min.y; array[ 20 ] = min.z;\n\t\tarray[ 21 ] = max.x; array[ 22 ] = min.y; array[ 23 ] = min.z;\n\n\t\tposition.needsUpdate = true;\n\n\t\tthis.geometry.computeBoundingSphere();\n\n\n\t}\n\n\tsetFromObject( object ) {\n\n\t\tthis.object = object;\n\t\tthis.update();\n\n\t\treturn this;\n\n\t}\n\n\tcopy( source ) {\n\n\t\tLineSegments.prototype.copy.call( this, source );\n\n\t\tthis.object = source.object;\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass Box3Helper extends LineSegments {\n\n\tconstructor( box, color = 0xffff00 ) {\n\n\t\tconst indices = 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 ] );\n\n\t\tconst positions = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, - 1, - 1, 1, - 1, - 1, - 1, - 1, 1, - 1, - 1 ];\n\n\t\tconst geometry = new BufferGeometry();\n\n\t\tgeometry.setIndex( new BufferAttribute( indices, 1 ) );\n\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.box = box;\n\n\t\tthis.type = 'Box3Helper';\n\n\t\tthis.geometry.computeBoundingSphere();\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tconst box = this.box;\n\n\t\tif ( box.isEmpty() ) return;\n\n\t\tbox.getCenter( this.position );\n\n\t\tbox.getSize( this.scale );\n\n\t\tthis.scale.multiplyScalar( 0.5 );\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n}\n\nclass PlaneHelper extends Line {\n\n\tconstructor( plane, size = 1, hex = 0xffff00 ) {\n\n\t\tconst color = hex;\n\n\t\tconst positions = [ 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 ];\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );\n\t\tgeometry.computeBoundingSphere();\n\n\t\tsuper( geometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\n\t\tthis.type = 'PlaneHelper';\n\n\t\tthis.plane = plane;\n\n\t\tthis.size = size;\n\n\t\tconst positions2 = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, - 1, 1, 1, - 1, 1 ];\n\n\t\tconst geometry2 = new BufferGeometry();\n\t\tgeometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );\n\t\tgeometry2.computeBoundingSphere();\n\n\t\tthis.add( new Mesh( geometry2, new MeshBasicMaterial( { color: color, opacity: 0.2, transparent: true, depthWrite: false, toneMapped: false } ) ) );\n\n\t}\n\n\tupdateMatrixWorld( force ) {\n\n\t\tlet scale = - this.plane.constant;\n\n\t\tif ( Math.abs( scale ) < 1e-8 ) scale = 1e-8; // sign does not matter\n\n\t\tthis.scale.set( 0.5 * this.size, 0.5 * this.size, scale );\n\n\t\tthis.children[ 0 ].material.side = ( scale < 0 ) ? BackSide : FrontSide; // renderer flips side when determinant < 0; flipping not wanted here\n\n\t\tthis.lookAt( this.plane.normal );\n\n\t\tsuper.updateMatrixWorld( force );\n\n\t}\n\n}\n\nconst _axis = /*@__PURE__*/ new Vector3();\nlet _lineGeometry, _coneGeometry;\n\nclass ArrowHelper extends Object3D {\n\n\t// dir is assumed to be normalized\n\n\tconstructor( dir = new Vector3( 0, 0, 1 ), origin = new Vector3( 0, 0, 0 ), length = 1, color = 0xffff00, headLength = length * 0.2, headWidth = headLength * 0.2 ) {\n\n\t\tsuper();\n\n\t\tthis.type = 'ArrowHelper';\n\n\t\tif ( _lineGeometry === undefined ) {\n\n\t\t\t_lineGeometry = new BufferGeometry();\n\t\t\t_lineGeometry.setAttribute( 'position', new Float32BufferAttribute( [ 0, 0, 0, 0, 1, 0 ], 3 ) );\n\n\t\t\t_coneGeometry = new CylinderGeometry( 0, 0.5, 1, 5, 1 );\n\t\t\t_coneGeometry.translate( 0, - 0.5, 0 );\n\n\t\t}\n\n\t\tthis.position.copy( origin );\n\n\t\tthis.line = new Line( _lineGeometry, new LineBasicMaterial( { color: color, toneMapped: false } ) );\n\t\tthis.line.matrixAutoUpdate = false;\n\t\tthis.add( this.line );\n\n\t\tthis.cone = new Mesh( _coneGeometry, new MeshBasicMaterial( { color: color, toneMapped: false } ) );\n\t\tthis.cone.matrixAutoUpdate = false;\n\t\tthis.add( this.cone );\n\n\t\tthis.setDirection( dir );\n\t\tthis.setLength( length, headLength, headWidth );\n\n\t}\n\n\tsetDirection( dir ) {\n\n\t\t// dir is assumed to be normalized\n\n\t\tif ( dir.y > 0.99999 ) {\n\n\t\t\tthis.quaternion.set( 0, 0, 0, 1 );\n\n\t\t} else if ( dir.y < - 0.99999 ) {\n\n\t\t\tthis.quaternion.set( 1, 0, 0, 0 );\n\n\t\t} else {\n\n\t\t\t_axis.set( dir.z, 0, - dir.x ).normalize();\n\n\t\t\tconst radians = Math.acos( dir.y );\n\n\t\t\tthis.quaternion.setFromAxisAngle( _axis, radians );\n\n\t\t}\n\n\t}\n\n\tsetLength( length, headLength = length * 0.2, headWidth = headLength * 0.2 ) {\n\n\t\tthis.line.scale.set( 1, Math.max( 0.0001, length - headLength ), 1 ); // see #17458\n\t\tthis.line.updateMatrix();\n\n\t\tthis.cone.scale.set( headWidth, headLength, headWidth );\n\t\tthis.cone.position.y = length;\n\t\tthis.cone.updateMatrix();\n\n\t}\n\n\tsetColor( color ) {\n\n\t\tthis.line.material.color.set( color );\n\t\tthis.cone.material.color.set( color );\n\n\t}\n\n\tcopy( source ) {\n\n\t\tsuper.copy( source, false );\n\n\t\tthis.line.copy( source.line );\n\t\tthis.cone.copy( source.cone );\n\n\t\treturn this;\n\n\t}\n\n}\n\nclass AxesHelper extends LineSegments {\n\n\tconstructor( size = 1 ) {\n\n\t\tconst vertices = [\n\t\t\t0, 0, 0,\tsize, 0, 0,\n\t\t\t0, 0, 0,\t0, size, 0,\n\t\t\t0, 0, 0,\t0, 0, size\n\t\t];\n\n\t\tconst colors = [\n\t\t\t1, 0, 0,\t1, 0.6, 0,\n\t\t\t0, 1, 0,\t0.6, 1, 0,\n\t\t\t0, 0, 1,\t0, 0.6, 1\n\t\t];\n\n\t\tconst geometry = new BufferGeometry();\n\t\tgeometry.setAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );\n\t\tgeometry.setAttribute( 'color', new Float32BufferAttribute( colors, 3 ) );\n\n\t\tconst material = new LineBasicMaterial( { vertexColors: true, toneMapped: false } );\n\n\t\tsuper( geometry, material );\n\n\t\tthis.type = 'AxesHelper';\n\n\t}\n\n\tsetColors( xAxisColor, yAxisColor, zAxisColor ) {\n\n\t\tconst color = new Color();\n\t\tconst array = this.geometry.attributes.color.array;\n\n\t\tcolor.set( xAxisColor );\n\t\tcolor.toArray( array, 0 );\n\t\tcolor.toArray( array, 3 );\n\n\t\tcolor.set( yAxisColor );\n\t\tcolor.toArray( array, 6 );\n\t\tcolor.toArray( array, 9 );\n\n\t\tcolor.set( zAxisColor );\n\t\tcolor.toArray( array, 12 );\n\t\tcolor.toArray( array, 15 );\n\n\t\tthis.geometry.attributes.color.needsUpdate = true;\n\n\t\treturn this;\n\n\t}\n\n\tdispose() {\n\n\t\tthis.geometry.dispose();\n\t\tthis.material.dispose();\n\n\t}\n\n}\n\nconst _floatView = new Float32Array( 1 );\nconst _int32View = new Int32Array( _floatView.buffer );\n\nclass DataUtils {\n\n\t// Converts float32 to float16 (stored as uint16 value).\n\n\tstatic toHalfFloat( val ) {\n\n\t\t// Source: http://gamedev.stackexchange.com/questions/17326/conversion-of-a-number-from-single-precision-floating-point-representation-to-a/17410#17410\n\n\t\t/* This method is faster than the OpenEXR implementation (very often\n\t\t* used, eg. in Ogre), with the additional benefit of rounding, inspired\n\t\t* by James Tursa?s half-precision code. */\n\n\t\t_floatView[ 0 ] = val;\n\t\tconst x = _int32View[ 0 ];\n\n\t\tlet bits = ( x >> 16 ) & 0x8000; /* Get the sign */\n\t\tlet m = ( x >> 12 ) & 0x07ff; /* Keep one extra bit for rounding */\n\t\tconst e = ( x >> 23 ) & 0xff; /* Using int is faster here */\n\n\t\t/* If zero, or denormal, or exponent underflows too much for a denormal\n\t\t\t* half, return signed zero. */\n\t\tif ( e < 103 ) return bits;\n\n\t\t/* If NaN, return NaN. If Inf or exponent overflow, return Inf. */\n\t\tif ( e > 142 ) {\n\n\t\t\tbits |= 0x7c00;\n\t\t\t/* If exponent was 0xff and one mantissa bit was set, it means NaN,\n\t\t\t\t\t\t* not Inf, so make sure we set one mantissa bit too. */\n\t\t\tbits |= ( ( e == 255 ) ? 0 : 1 ) && ( x & 0x007fffff );\n\t\t\treturn bits;\n\n\t\t}\n\n\t\t/* If exponent underflows but not too much, return a denormal */\n\t\tif ( e < 113 ) {\n\n\t\t\tm |= 0x0800;\n\t\t\t/* Extra rounding may overflow and set mantissa to 0 and exponent\n\t\t\t\t* to 1, which is OK. */\n\t\t\tbits |= ( m >> ( 114 - e ) ) + ( ( m >> ( 113 - e ) ) & 1 );\n\t\t\treturn bits;\n\n\t\t}\n\n\t\tbits |= ( ( e - 112 ) << 10 ) | ( m >> 1 );\n\t\t/* Extra rounding. An overflow will set mantissa to 0 and increment\n\t\t\t* the exponent, which is OK. */\n\t\tbits += m & 1;\n\t\treturn bits;\n\n\t}\n\n}\n\nconst LOD_MIN = 4;\nconst LOD_MAX = 8;\nconst SIZE_MAX = Math.pow( 2, LOD_MAX );\n\n// The standard deviations (radians) associated with the extra mips. These are\n// chosen to approximate a Trowbridge-Reitz distribution function times the\n// geometric shadowing function. These sigma values squared must match the\n// variance #defines in cube_uv_reflection_fragment.glsl.js.\nconst EXTRA_LOD_SIGMA = [ 0.125, 0.215, 0.35, 0.446, 0.526, 0.582 ];\n\nconst TOTAL_LODS = LOD_MAX - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length;\n\n// The maximum length of the blur for loop. Smaller sigmas will use fewer\n// samples and exit early, but not recompile the shader.\nconst MAX_SAMPLES = 20;\n\nconst ENCODINGS = {\n\t[ LinearEncoding ]: 0,\n\t[ sRGBEncoding ]: 1,\n\t[ RGBEEncoding ]: 2,\n\t[ RGBM7Encoding ]: 3,\n\t[ RGBM16Encoding ]: 4,\n\t[ RGBDEncoding ]: 5,\n\t[ GammaEncoding ]: 6\n};\n\nconst backgroundMaterial = new MeshBasicMaterial( {\n\tside: BackSide,\n\tdepthWrite: false,\n\tdepthTest: false,\n} );\nconst backgroundBox = new Mesh( new BoxGeometry(), backgroundMaterial );\n\nconst _flatCamera = /*@__PURE__*/ new OrthographicCamera();\nconst { _lodPlanes, _sizeLods, _sigmas } = /*@__PURE__*/ _createPlanes();\nconst _clearColor = /*@__PURE__*/ new Color();\nlet _oldTarget = null;\n\n// Golden Ratio\nconst PHI = ( 1 + Math.sqrt( 5 ) ) / 2;\nconst INV_PHI = 1 / PHI;\n\n// Vertices of a dodecahedron (except the opposites, which represent the\n// same axis), used as axis directions evenly spread on a sphere.\nconst _axisDirections = [\n\t/*@__PURE__*/ new Vector3( 1, 1, 1 ),\n\t/*@__PURE__*/ new Vector3( - 1, 1, 1 ),\n\t/*@__PURE__*/ new Vector3( 1, 1, - 1 ),\n\t/*@__PURE__*/ new Vector3( - 1, 1, - 1 ),\n\t/*@__PURE__*/ new Vector3( 0, PHI, INV_PHI ),\n\t/*@__PURE__*/ new Vector3( 0, PHI, - INV_PHI ),\n\t/*@__PURE__*/ new Vector3( INV_PHI, 0, PHI ),\n\t/*@__PURE__*/ new Vector3( - INV_PHI, 0, PHI ),\n\t/*@__PURE__*/ new Vector3( PHI, INV_PHI, 0 ),\n\t/*@__PURE__*/ new Vector3( - PHI, INV_PHI, 0 ) ];\n\n/**\n * This class generates a Prefiltered, Mipmapped Radiance Environment Map\n * (PMREM) from a cubeMap environment texture. This allows different levels of\n * blur to be quickly accessed based on material roughness. It is packed into a\n * special CubeUV format that allows us to perform custom interpolation so that\n * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap\n * chain, it only goes down to the LOD_MIN level (above), and then creates extra\n * even more filtered 'mips' at the same LOD_MIN resolution, associated with\n * higher roughness levels. In this way we maintain resolution to smoothly\n * interpolate diffuse lighting while limiting sampling computation.\n *\n * Paper: Fast, Accurate Image-Based Lighting\n * https://drive.google.com/file/d/15y8r_UpKlU9SvV4ILb0C3qCPecS8pvLz/view\n*/\n\nfunction convertLinearToRGBE( color ) {\n\n\tconst maxComponent = Math.max( color.r, color.g, color.b );\n\tconst fExp = Math.min( Math.max( Math.ceil( Math.log2( maxComponent ) ), - 128.0 ), 127.0 );\n\tcolor.multiplyScalar( Math.pow( 2.0, - fExp ) );\n\n\tconst alpha = ( fExp + 128.0 ) / 255.0;\n\treturn alpha;\n\n}\n\nclass PMREMGenerator {\n\n\tconstructor( renderer ) {\n\n\t\tthis._renderer = renderer;\n\t\tthis._pingPongRenderTarget = null;\n\n\t\tthis._blurMaterial = _getBlurShader( MAX_SAMPLES );\n\t\tthis._equirectShader = null;\n\t\tthis._cubemapShader = null;\n\n\t\tthis._compileMaterial( this._blurMaterial );\n\n\t}\n\n\t/**\n\t * Generates a PMREM from a supplied Scene, which can be faster than using an\n\t * image if networking bandwidth is low. Optional sigma specifies a blur radius\n\t * in radians to be applied to the scene before PMREM generation. Optional near\n\t * and far planes ensure the scene is rendered in its entirety (the cubeCamera\n\t * is placed at the origin).\n\t */\n\tfromScene( scene, sigma = 0, near = 0.1, far = 100 ) {\n\n\t\t_oldTarget = this._renderer.getRenderTarget();\n\t\tconst cubeUVRenderTarget = this._allocateTargets();\n\n\t\tthis._sceneToCubeUV( scene, near, far, cubeUVRenderTarget );\n\t\tif ( sigma > 0 ) {\n\n\t\t\tthis._blur( cubeUVRenderTarget, 0, 0, sigma );\n\n\t\t}\n\n\t\tthis._applyPMREM( cubeUVRenderTarget );\n\t\tthis._cleanup( cubeUVRenderTarget );\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t/**\n\t * Generates a PMREM from an equirectangular texture, which can be either LDR\n\t * (RGBFormat) or HDR (RGBEFormat). The ideal input image size is 1k (1024 x 512),\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */\n\tfromEquirectangular( equirectangular ) {\n\n\t\treturn this._fromTexture( equirectangular );\n\n\t}\n\n\t/**\n\t * Generates a PMREM from an cubemap texture, which can be either LDR\n\t * (RGBFormat) or HDR (RGBEFormat). The ideal input cube size is 256 x 256,\n\t * as this matches best with the 256 x 256 cubemap output.\n\t */\n\tfromCubemap( cubemap ) {\n\n\t\treturn this._fromTexture( cubemap );\n\n\t}\n\n\t/**\n\t * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */\n\tcompileCubemapShader() {\n\n\t\tif ( this._cubemapShader === null ) {\n\n\t\t\tthis._cubemapShader = _getCubemapShader();\n\t\t\tthis._compileMaterial( this._cubemapShader );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during\n\t * your texture's network fetch for increased concurrency.\n\t */\n\tcompileEquirectangularShader() {\n\n\t\tif ( this._equirectShader === null ) {\n\n\t\t\tthis._equirectShader = _getEquirectShader();\n\t\t\tthis._compileMaterial( this._equirectShader );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,\n\t * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on\n\t * one of them will cause any others to also become unusable.\n\t */\n\tdispose() {\n\n\t\tthis._blurMaterial.dispose();\n\n\t\tif ( this._cubemapShader !== null ) this._cubemapShader.dispose();\n\t\tif ( this._equirectShader !== null ) this._equirectShader.dispose();\n\n\t\tfor ( let i = 0; i < _lodPlanes.length; i ++ ) {\n\n\t\t\t_lodPlanes[ i ].dispose();\n\n\t\t}\n\n\t}\n\n\t// private interface\n\n\t_cleanup( outputTarget ) {\n\n\t\tthis._pingPongRenderTarget.dispose();\n\t\tthis._renderer.setRenderTarget( _oldTarget );\n\t\toutputTarget.scissorTest = false;\n\t\t_setViewport( outputTarget, 0, 0, outputTarget.width, outputTarget.height );\n\n\t}\n\n\t_fromTexture( texture ) {\n\n\t\t_oldTarget = this._renderer.getRenderTarget();\n\t\tconst cubeUVRenderTarget = this._allocateTargets( texture );\n\t\tthis._textureToCubeUV( texture, cubeUVRenderTarget );\n\t\tthis._applyPMREM( cubeUVRenderTarget );\n\t\tthis._cleanup( cubeUVRenderTarget );\n\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t_allocateTargets( texture ) { // warning: null texture is valid\n\n\t\tconst params = {\n\t\t\tmagFilter: NearestFilter,\n\t\t\tminFilter: NearestFilter,\n\t\t\tgenerateMipmaps: false,\n\t\t\ttype: UnsignedByteType,\n\t\t\tformat: RGBEFormat,\n\t\t\tencoding: _isLDR( texture ) ? texture.encoding : RGBEEncoding,\n\t\t\tdepthBuffer: false\n\t\t};\n\n\t\tconst cubeUVRenderTarget = _createRenderTarget( params );\n\t\tcubeUVRenderTarget.depthBuffer = texture ? false : true;\n\t\tthis._pingPongRenderTarget = _createRenderTarget( params );\n\t\treturn cubeUVRenderTarget;\n\n\t}\n\n\t_compileMaterial( material ) {\n\n\t\tconst tmpMesh = new Mesh( _lodPlanes[ 0 ], material );\n\t\tthis._renderer.compile( tmpMesh, _flatCamera );\n\n\t}\n\n\t_sceneToCubeUV( scene, near, far, cubeUVRenderTarget ) {\n\n\t\tconst fov = 90;\n\t\tconst aspect = 1;\n\t\tconst cubeCamera = new PerspectiveCamera( fov, aspect, near, far );\n\t\tconst upSign = [ 1, - 1, 1, 1, 1, 1 ];\n\t\tconst forwardSign = [ 1, 1, 1, - 1, - 1, - 1 ];\n\t\tconst renderer = this._renderer;\n\n\t\tconst originalAutoClear = renderer.autoClear;\n\t\tconst outputEncoding = renderer.outputEncoding;\n\t\tconst toneMapping = renderer.toneMapping;\n\t\trenderer.getClearColor( _clearColor );\n\n\t\trenderer.toneMapping = NoToneMapping;\n\t\trenderer.outputEncoding = LinearEncoding;\n\t\trenderer.autoClear = false;\n\n\t\tlet useSolidColor = false;\n\t\tconst background = scene.background;\n\t\tif ( background ) {\n\n\t\t\tif ( background.isColor ) {\n\n\t\t\t\tbackgroundMaterial.color.copy( background ).convertSRGBToLinear();\n\t\t\t\tscene.background = null;\n\n\t\t\t\tconst alpha = convertLinearToRGBE( backgroundMaterial.color );\n\t\t\t\tbackgroundMaterial.opacity = alpha;\n\t\t\t\tuseSolidColor = true;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tbackgroundMaterial.color.copy( _clearColor ).convertSRGBToLinear();\n\n\t\t\tconst alpha = convertLinearToRGBE( backgroundMaterial.color );\n\t\t\tbackgroundMaterial.opacity = alpha;\n\t\t\tuseSolidColor = true;\n\n\t\t}\n\n\n\t\tfor ( let i = 0; i < 6; i ++ ) {\n\n\t\t\tconst col = i % 3;\n\t\t\tif ( col == 0 ) {\n\n\t\t\t\tcubeCamera.up.set( 0, upSign[ i ], 0 );\n\t\t\t\tcubeCamera.lookAt( forwardSign[ i ], 0, 0 );\n\n\t\t\t} else if ( col == 1 ) {\n\n\t\t\t\tcubeCamera.up.set( 0, 0, upSign[ i ] );\n\t\t\t\tcubeCamera.lookAt( 0, forwardSign[ i ], 0 );\n\n\t\t\t} else {\n\n\t\t\t\tcubeCamera.up.set( 0, upSign[ i ], 0 );\n\t\t\t\tcubeCamera.lookAt( 0, 0, forwardSign[ i ] );\n\n\t\t\t}\n\n\t\t\t_setViewport( cubeUVRenderTarget,\n\t\t\t\tcol * SIZE_MAX, i > 2 ? SIZE_MAX : 0, SIZE_MAX, SIZE_MAX );\n\t\t\trenderer.setRenderTarget( cubeUVRenderTarget );\n\n\t\t\tif ( useSolidColor ) {\n\n\t\t\t\trenderer.render( backgroundBox, cubeCamera );\n\n\t\t\t}\n\n\t\t\trenderer.render( scene, cubeCamera );\n\n\t\t}\n\n\t\trenderer.toneMapping = toneMapping;\n\t\trenderer.outputEncoding = outputEncoding;\n\t\trenderer.autoClear = originalAutoClear;\n\n\t}\n\n\t_textureToCubeUV( texture, cubeUVRenderTarget ) {\n\n\t\tconst renderer = this._renderer;\n\n\t\tif ( texture.isCubeTexture ) {\n\n\t\t\tif ( this._cubemapShader == null ) {\n\n\t\t\t\tthis._cubemapShader = _getCubemapShader();\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( this._equirectShader == null ) {\n\n\t\t\t\tthis._equirectShader = _getEquirectShader();\n\n\t\t\t}\n\n\t\t}\n\n\t\tconst material = texture.isCubeTexture ? this._cubemapShader : this._equirectShader;\n\t\tconst mesh = new Mesh( _lodPlanes[ 0 ], material );\n\n\t\tconst uniforms = material.uniforms;\n\n\t\tuniforms[ 'envMap' ].value = texture;\n\n\t\tif ( ! texture.isCubeTexture ) {\n\n\t\t\tuniforms[ 'texelSize' ].value.set( 1.0 / texture.image.width, 1.0 / texture.image.height );\n\n\t\t}\n\n\t\tuniforms[ 'inputEncoding' ].value = ENCODINGS[ texture.encoding ];\n\t\tuniforms[ 'outputEncoding' ].value = ENCODINGS[ cubeUVRenderTarget.texture.encoding ];\n\n\t\t_setViewport( cubeUVRenderTarget, 0, 0, 3 * SIZE_MAX, 2 * SIZE_MAX );\n\n\t\trenderer.setRenderTarget( cubeUVRenderTarget );\n\t\trenderer.render( mesh, _flatCamera );\n\n\t}\n\n\t_applyPMREM( cubeUVRenderTarget ) {\n\n\t\tconst renderer = this._renderer;\n\t\tconst autoClear = renderer.autoClear;\n\t\trenderer.autoClear = false;\n\n\t\tfor ( let i = 1; i < TOTAL_LODS; i ++ ) {\n\n\t\t\tconst sigma = Math.sqrt( _sigmas[ i ] * _sigmas[ i ] - _sigmas[ i - 1 ] * _sigmas[ i - 1 ] );\n\n\t\t\tconst poleAxis = _axisDirections[ ( i - 1 ) % _axisDirections.length ];\n\n\t\t\tthis._blur( cubeUVRenderTarget, i - 1, i, sigma, poleAxis );\n\n\t\t}\n\n\t\trenderer.autoClear = autoClear;\n\n\t}\n\n\t/**\n\t * This is a two-pass Gaussian blur for a cubemap. Normally this is done\n\t * vertically and horizontally, but this breaks down on a cube. Here we apply\n\t * the blur latitudinally (around the poles), and then longitudinally (towards\n\t * the poles) to approximate the orthogonally-separable blur. It is least\n\t * accurate at the poles, but still does a decent job.\n\t */\n\t_blur( cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis ) {\n\n\t\tconst pingPongRenderTarget = this._pingPongRenderTarget;\n\n\t\tthis._halfBlur(\n\t\t\tcubeUVRenderTarget,\n\t\t\tpingPongRenderTarget,\n\t\t\tlodIn,\n\t\t\tlodOut,\n\t\t\tsigma,\n\t\t\t'latitudinal',\n\t\t\tpoleAxis );\n\n\t\tthis._halfBlur(\n\t\t\tpingPongRenderTarget,\n\t\t\tcubeUVRenderTarget,\n\t\t\tlodOut,\n\t\t\tlodOut,\n\t\t\tsigma,\n\t\t\t'longitudinal',\n\t\t\tpoleAxis );\n\n\t}\n\n\t_halfBlur( targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis ) {\n\n\t\tconst renderer = this._renderer;\n\t\tconst blurMaterial = this._blurMaterial;\n\n\t\tif ( direction !== 'latitudinal' && direction !== 'longitudinal' ) {\n\n\t\t\tconsole.error(\n\t\t\t\t'blur direction must be either latitudinal or longitudinal!' );\n\n\t\t}\n\n\t\t// Number of standard deviations at which to cut off the discrete approximation.\n\t\tconst STANDARD_DEVIATIONS = 3;\n\n\t\tconst blurMesh = new Mesh( _lodPlanes[ lodOut ], blurMaterial );\n\t\tconst blurUniforms = blurMaterial.uniforms;\n\n\t\tconst pixels = _sizeLods[ lodIn ] - 1;\n\t\tconst radiansPerPixel = isFinite( sigmaRadians ) ? Math.PI / ( 2 * pixels ) : 2 * Math.PI / ( 2 * MAX_SAMPLES - 1 );\n\t\tconst sigmaPixels = sigmaRadians / radiansPerPixel;\n\t\tconst samples = isFinite( sigmaRadians ) ? 1 + Math.floor( STANDARD_DEVIATIONS * sigmaPixels ) : MAX_SAMPLES;\n\n\t\tif ( samples > MAX_SAMPLES ) {\n\n\t\t\tconsole.warn( `sigmaRadians, ${\n\t\t\t\tsigmaRadians}, is too large and will clip, as it requested ${\n\t\t\t\tsamples} samples when the maximum is set to ${MAX_SAMPLES}` );\n\n\t\t}\n\n\t\tconst weights = [];\n\t\tlet sum = 0;\n\n\t\tfor ( let i = 0; i < MAX_SAMPLES; ++ i ) {\n\n\t\t\tconst x = i / sigmaPixels;\n\t\t\tconst weight = Math.exp( - x * x / 2 );\n\t\t\tweights.push( weight );\n\n\t\t\tif ( i == 0 ) {\n\n\t\t\t\tsum += weight;\n\n\t\t\t} else if ( i < samples ) {\n\n\t\t\t\tsum += 2 * weight;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfor ( let i = 0; i < weights.length; i ++ ) {\n\n\t\t\tweights[ i ] = weights[ i ] / sum;\n\n\t\t}\n\n\t\tblurUniforms[ 'envMap' ].value = targetIn.texture;\n\t\tblurUniforms[ 'samples' ].value = samples;\n\t\tblurUniforms[ 'weights' ].value = weights;\n\t\tblurUniforms[ 'latitudinal' ].value = direction === 'latitudinal';\n\n\t\tif ( poleAxis ) {\n\n\t\t\tblurUniforms[ 'poleAxis' ].value = poleAxis;\n\n\t\t}\n\n\t\tblurUniforms[ 'dTheta' ].value = radiansPerPixel;\n\t\tblurUniforms[ 'mipInt' ].value = LOD_MAX - lodIn;\n\t\tblurUniforms[ 'inputEncoding' ].value = ENCODINGS[ targetIn.texture.encoding ];\n\t\tblurUniforms[ 'outputEncoding' ].value = ENCODINGS[ targetIn.texture.encoding ];\n\n\t\tconst outputSize = _sizeLods[ lodOut ];\n\t\tconst x = 3 * Math.max( 0, SIZE_MAX - 2 * outputSize );\n\t\tconst y = ( lodOut === 0 ? 0 : 2 * SIZE_MAX ) + 2 * outputSize * ( lodOut > LOD_MAX - LOD_MIN ? lodOut - LOD_MAX + LOD_MIN : 0 );\n\n\t\t_setViewport( targetOut, x, y, 3 * outputSize, 2 * outputSize );\n\t\trenderer.setRenderTarget( targetOut );\n\t\trenderer.render( blurMesh, _flatCamera );\n\n\t}\n\n}\n\nfunction _isLDR( texture ) {\n\n\tif ( texture === undefined || texture.type !== UnsignedByteType ) return false;\n\n\treturn texture.encoding === LinearEncoding || texture.encoding === sRGBEncoding || texture.encoding === GammaEncoding;\n\n}\n\nfunction _createPlanes() {\n\n\tconst _lodPlanes = [];\n\tconst _sizeLods = [];\n\tconst _sigmas = [];\n\n\tlet lod = LOD_MAX;\n\n\tfor ( let i = 0; i < TOTAL_LODS; i ++ ) {\n\n\t\tconst sizeLod = Math.pow( 2, lod );\n\t\t_sizeLods.push( sizeLod );\n\t\tlet sigma = 1.0 / sizeLod;\n\n\t\tif ( i > LOD_MAX - LOD_MIN ) {\n\n\t\t\tsigma = EXTRA_LOD_SIGMA[ i - LOD_MAX + LOD_MIN - 1 ];\n\n\t\t} else if ( i == 0 ) {\n\n\t\t\tsigma = 0;\n\n\t\t}\n\n\t\t_sigmas.push( sigma );\n\n\t\tconst texelSize = 1.0 / ( sizeLod - 1 );\n\t\tconst min = - texelSize / 2;\n\t\tconst max = 1 + texelSize / 2;\n\t\tconst uv1 = [ min, min, max, min, max, max, min, min, max, max, min, max ];\n\n\t\tconst cubeFaces = 6;\n\t\tconst vertices = 6;\n\t\tconst positionSize = 3;\n\t\tconst uvSize = 2;\n\t\tconst faceIndexSize = 1;\n\n\t\tconst position = new Float32Array( positionSize * vertices * cubeFaces );\n\t\tconst uv = new Float32Array( uvSize * vertices * cubeFaces );\n\t\tconst faceIndex = new Float32Array( faceIndexSize * vertices * cubeFaces );\n\n\t\tfor ( let face = 0; face < cubeFaces; face ++ ) {\n\n\t\t\tconst x = ( face % 3 ) * 2 / 3 - 1;\n\t\t\tconst y = face > 2 ? 0 : - 1;\n\t\t\tconst coordinates = [\n\t\t\t\tx, y, 0,\n\t\t\t\tx + 2 / 3, y, 0,\n\t\t\t\tx + 2 / 3, y + 1, 0,\n\t\t\t\tx, y, 0,\n\t\t\t\tx + 2 / 3, y + 1, 0,\n\t\t\t\tx, y + 1, 0\n\t\t\t];\n\t\t\tposition.set( coordinates, positionSize * vertices * face );\n\t\t\tuv.set( uv1, uvSize * vertices * face );\n\t\t\tconst fill = [ face, face, face, face, face, face ];\n\t\t\tfaceIndex.set( fill, faceIndexSize * vertices * face );\n\n\t\t}\n\n\t\tconst planes = new BufferGeometry();\n\t\tplanes.setAttribute( 'position', new BufferAttribute( position, positionSize ) );\n\t\tplanes.setAttribute( 'uv', new BufferAttribute( uv, uvSize ) );\n\t\tplanes.setAttribute( 'faceIndex', new BufferAttribute( faceIndex, faceIndexSize ) );\n\t\t_lodPlanes.push( planes );\n\n\t\tif ( lod > LOD_MIN ) {\n\n\t\t\tlod --;\n\n\t\t}\n\n\t}\n\n\treturn { _lodPlanes, _sizeLods, _sigmas };\n\n}\n\nfunction _createRenderTarget( params ) {\n\n\tconst cubeUVRenderTarget = new WebGLRenderTarget( 3 * SIZE_MAX, 3 * SIZE_MAX, params );\n\tcubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping;\n\tcubeUVRenderTarget.texture.name = 'PMREM.cubeUv';\n\tcubeUVRenderTarget.scissorTest = true;\n\treturn cubeUVRenderTarget;\n\n}\n\nfunction _setViewport( target, x, y, width, height ) {\n\n\ttarget.viewport.set( x, y, width, height );\n\ttarget.scissor.set( x, y, width, height );\n\n}\n\nfunction _getBlurShader( maxSamples ) {\n\n\tconst weights = new Float32Array( maxSamples );\n\tconst poleAxis = new Vector3( 0, 1, 0 );\n\tconst shaderMaterial = new RawShaderMaterial( {\n\n\t\tname: 'SphericalGaussianBlur',\n\n\t\tdefines: { 'n': maxSamples },\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'samples': { value: 1 },\n\t\t\t'weights': { value: weights },\n\t\t\t'latitudinal': { value: false },\n\t\t\t'dTheta': { value: 0 },\n\t\t\t'mipInt': { value: 0 },\n\t\t\t'poleAxis': { value: poleAxis },\n\t\t\t'inputEncoding': { value: ENCODINGS[ LinearEncoding ] },\n\t\t\t'outputEncoding': { value: ENCODINGS[ LinearEncoding ] }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t${ _getEncodings() }\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n\treturn shaderMaterial;\n\n}\n\nfunction _getEquirectShader() {\n\n\tconst texelSize = new Vector2( 1, 1 );\n\tconst shaderMaterial = new RawShaderMaterial( {\n\n\t\tname: 'EquirectangularToCubeUV',\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'texelSize': { value: texelSize },\n\t\t\t'inputEncoding': { value: ENCODINGS[ LinearEncoding ] },\n\t\t\t'outputEncoding': { value: ENCODINGS[ LinearEncoding ] }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t${ _getEncodings() }\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n\treturn shaderMaterial;\n\n}\n\nfunction _getCubemapShader() {\n\n\tconst shaderMaterial = new RawShaderMaterial( {\n\n\t\tname: 'CubemapToCubeUV',\n\n\t\tuniforms: {\n\t\t\t'envMap': { value: null },\n\t\t\t'inputEncoding': { value: ENCODINGS[ LinearEncoding ] },\n\t\t\t'outputEncoding': { value: ENCODINGS[ LinearEncoding ] }\n\t\t},\n\n\t\tvertexShader: _getCommonVertexShader(),\n\n\t\tfragmentShader: /* glsl */`\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\t${ _getEncodings() }\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\n\t\t\t\tgl_FragColor = linearToOutputTexel( gl_FragColor );\n\n\t\t\t}\n\t\t`,\n\n\t\tblending: NoBlending,\n\t\tdepthTest: false,\n\t\tdepthWrite: false\n\n\t} );\n\n\treturn shaderMaterial;\n\n}\n\nfunction _getCommonVertexShader() {\n\n\treturn /* glsl */`\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t`;\n\n}\n\nfunction _getEncodings() {\n\n\treturn /* glsl */`\n\n\t\tuniform int inputEncoding;\n\t\tuniform int outputEncoding;\n\n\t\t#include <encodings_pars_fragment>\n\n\t\tvec4 inputTexelToLinear( vec4 value ) {\n\n\t\t\tif ( inputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( inputEncoding == 1 ) {\n\n\t\t\t\treturn sRGBToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 2 ) {\n\n\t\t\t\treturn RGBEToLinear( value );\n\n\t\t\t} else if ( inputEncoding == 3 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 7.0 );\n\n\t\t\t} else if ( inputEncoding == 4 ) {\n\n\t\t\t\treturn RGBMToLinear( value, 16.0 );\n\n\t\t\t} else if ( inputEncoding == 5 ) {\n\n\t\t\t\treturn RGBDToLinear( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn GammaToLinear( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 linearToOutputTexel( vec4 value ) {\n\n\t\t\tif ( outputEncoding == 0 ) {\n\n\t\t\t\treturn value;\n\n\t\t\t} else if ( outputEncoding == 1 ) {\n\n\t\t\t\treturn LinearTosRGB( value );\n\n\t\t\t} else if ( outputEncoding == 2 ) {\n\n\t\t\t\treturn LinearToRGBE( value );\n\n\t\t\t} else if ( outputEncoding == 3 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 7.0 );\n\n\t\t\t} else if ( outputEncoding == 4 ) {\n\n\t\t\t\treturn LinearToRGBM( value, 16.0 );\n\n\t\t\t} else if ( outputEncoding == 5 ) {\n\n\t\t\t\treturn LinearToRGBD( value, 256.0 );\n\n\t\t\t} else {\n\n\t\t\t\treturn LinearToGamma( value, 2.2 );\n\n\t\t\t}\n\n\t\t}\n\n\t\tvec4 envMapTexelToLinear( vec4 color ) {\n\n\t\t\treturn inputTexelToLinear( color );\n\n\t\t}\n\t`;\n\n}\n\nconst LineStrip = 0;\nconst LinePieces = 1;\nconst NoColors = 0;\nconst FaceColors = 1;\nconst VertexColors = 2;\n\nfunction MeshFaceMaterial( materials ) {\n\n\tconsole.warn( 'THREE.MeshFaceMaterial has been removed. Use an Array instead.' );\n\treturn materials;\n\n}\n\nfunction MultiMaterial( materials = [] ) {\n\n\tconsole.warn( 'THREE.MultiMaterial has been removed. Use an Array instead.' );\n\tmaterials.isMultiMaterial = true;\n\tmaterials.materials = materials;\n\tmaterials.clone = function () {\n\n\t\treturn materials.slice();\n\n\t};\n\n\treturn materials;\n\n}\n\nfunction PointCloud( geometry, material ) {\n\n\tconsole.warn( 'THREE.PointCloud has been renamed to THREE.Points.' );\n\treturn new Points( geometry, material );\n\n}\n\nfunction Particle( material ) {\n\n\tconsole.warn( 'THREE.Particle has been renamed to THREE.Sprite.' );\n\treturn new Sprite( material );\n\n}\n\nfunction ParticleSystem( geometry, material ) {\n\n\tconsole.warn( 'THREE.ParticleSystem has been renamed to THREE.Points.' );\n\treturn new Points( geometry, material );\n\n}\n\nfunction PointCloudMaterial( parameters ) {\n\n\tconsole.warn( 'THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.' );\n\treturn new PointsMaterial( parameters );\n\n}\n\nfunction ParticleBasicMaterial( parameters ) {\n\n\tconsole.warn( 'THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.' );\n\treturn new PointsMaterial( parameters );\n\n}\n\nfunction ParticleSystemMaterial( parameters ) {\n\n\tconsole.warn( 'THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.' );\n\treturn new PointsMaterial( parameters );\n\n}\n\nfunction Vertex( x, y, z ) {\n\n\tconsole.warn( 'THREE.Vertex has been removed. Use THREE.Vector3 instead.' );\n\treturn new Vector3( x, y, z );\n\n}\n\n//\n\nfunction DynamicBufferAttribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead.' );\n\treturn new BufferAttribute( array, itemSize ).setUsage( DynamicDrawUsage );\n\n}\n\nfunction Int8Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.' );\n\treturn new Int8BufferAttribute( array, itemSize );\n\n}\n\nfunction Uint8Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.' );\n\treturn new Uint8BufferAttribute( array, itemSize );\n\n}\n\nfunction Uint8ClampedAttribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.' );\n\treturn new Uint8ClampedBufferAttribute( array, itemSize );\n\n}\n\nfunction Int16Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.' );\n\treturn new Int16BufferAttribute( array, itemSize );\n\n}\n\nfunction Uint16Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.' );\n\treturn new Uint16BufferAttribute( array, itemSize );\n\n}\n\nfunction Int32Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.' );\n\treturn new Int32BufferAttribute( array, itemSize );\n\n}\n\nfunction Uint32Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.' );\n\treturn new Uint32BufferAttribute( array, itemSize );\n\n}\n\nfunction Float32Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.' );\n\treturn new Float32BufferAttribute( array, itemSize );\n\n}\n\nfunction Float64Attribute( array, itemSize ) {\n\n\tconsole.warn( 'THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.' );\n\treturn new Float64BufferAttribute( array, itemSize );\n\n}\n\n//\n\nCurve.create = function ( construct, getPoint ) {\n\n\tconsole.log( 'THREE.Curve.create() has been deprecated' );\n\n\tconstruct.prototype = Object.create( Curve.prototype );\n\tconstruct.prototype.constructor = construct;\n\tconstruct.prototype.getPoint = getPoint;\n\n\treturn construct;\n\n};\n\n//\n\nPath.prototype.fromPoints = function ( points ) {\n\n\tconsole.warn( 'THREE.Path: .fromPoints() has been renamed to .setFromPoints().' );\n\treturn this.setFromPoints( points );\n\n};\n\n//\n\nfunction AxisHelper( size ) {\n\n\tconsole.warn( 'THREE.AxisHelper has been renamed to THREE.AxesHelper.' );\n\treturn new AxesHelper( size );\n\n}\n\nfunction BoundingBoxHelper( object, color ) {\n\n\tconsole.warn( 'THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.' );\n\treturn new BoxHelper( object, color );\n\n}\n\nfunction EdgesHelper( object, hex ) {\n\n\tconsole.warn( 'THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.' );\n\treturn new LineSegments( new EdgesGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );\n\n}\n\nGridHelper.prototype.setColors = function () {\n\n\tconsole.error( 'THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.' );\n\n};\n\nSkeletonHelper.prototype.update = function () {\n\n\tconsole.error( 'THREE.SkeletonHelper: update() no longer needs to be called.' );\n\n};\n\nfunction WireframeHelper( object, hex ) {\n\n\tconsole.warn( 'THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.' );\n\treturn new LineSegments( new WireframeGeometry( object.geometry ), new LineBasicMaterial( { color: hex !== undefined ? hex : 0xffffff } ) );\n\n}\n\n//\n\nLoader.prototype.extractUrlBase = function ( url ) {\n\n\tconsole.warn( 'THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.' );\n\treturn LoaderUtils.extractUrlBase( url );\n\n};\n\nLoader.Handlers = {\n\n\tadd: function ( /* regex, loader */ ) {\n\n\t\tconsole.error( 'THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.' );\n\n\t},\n\n\tget: function ( /* file */ ) {\n\n\t\tconsole.error( 'THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.' );\n\n\t}\n\n};\n\nfunction XHRLoader( manager ) {\n\n\tconsole.warn( 'THREE.XHRLoader has been renamed to THREE.FileLoader.' );\n\treturn new FileLoader( manager );\n\n}\n\nfunction BinaryTextureLoader( manager ) {\n\n\tconsole.warn( 'THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.' );\n\treturn new DataTextureLoader( manager );\n\n}\n\n//\n\nBox2.prototype.center = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Box2: .center() has been renamed to .getCenter().' );\n\treturn this.getCenter( optionalTarget );\n\n};\n\nBox2.prototype.empty = function () {\n\n\tconsole.warn( 'THREE.Box2: .empty() has been renamed to .isEmpty().' );\n\treturn this.isEmpty();\n\n};\n\nBox2.prototype.isIntersectionBox = function ( box ) {\n\n\tconsole.warn( 'THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().' );\n\treturn this.intersectsBox( box );\n\n};\n\nBox2.prototype.size = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Box2: .size() has been renamed to .getSize().' );\n\treturn this.getSize( optionalTarget );\n\n};\n\n//\n\nBox3.prototype.center = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Box3: .center() has been renamed to .getCenter().' );\n\treturn this.getCenter( optionalTarget );\n\n};\n\nBox3.prototype.empty = function () {\n\n\tconsole.warn( 'THREE.Box3: .empty() has been renamed to .isEmpty().' );\n\treturn this.isEmpty();\n\n};\n\nBox3.prototype.isIntersectionBox = function ( box ) {\n\n\tconsole.warn( 'THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().' );\n\treturn this.intersectsBox( box );\n\n};\n\nBox3.prototype.isIntersectionSphere = function ( sphere ) {\n\n\tconsole.warn( 'THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().' );\n\treturn this.intersectsSphere( sphere );\n\n};\n\nBox3.prototype.size = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Box3: .size() has been renamed to .getSize().' );\n\treturn this.getSize( optionalTarget );\n\n};\n\n//\n\nSphere.prototype.empty = function () {\n\n\tconsole.warn( 'THREE.Sphere: .empty() has been renamed to .isEmpty().' );\n\treturn this.isEmpty();\n\n};\n\n//\n\nFrustum.prototype.setFromMatrix = function ( m ) {\n\n\tconsole.warn( 'THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().' );\n\treturn this.setFromProjectionMatrix( m );\n\n};\n\n//\n\nLine3.prototype.center = function ( optionalTarget ) {\n\n\tconsole.warn( 'THREE.Line3: .center() has been renamed to .getCenter().' );\n\treturn this.getCenter( optionalTarget );\n\n};\n\n//\n\nMatrix3.prototype.flattenToArrayOffset = function ( array, offset ) {\n\n\tconsole.warn( 'THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.' );\n\treturn this.toArray( array, offset );\n\n};\n\nMatrix3.prototype.multiplyVector3 = function ( vector ) {\n\n\tconsole.warn( 'THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.' );\n\treturn vector.applyMatrix3( this );\n\n};\n\nMatrix3.prototype.multiplyVector3Array = function ( /* a */ ) {\n\n\tconsole.error( 'THREE.Matrix3: .multiplyVector3Array() has been removed.' );\n\n};\n\nMatrix3.prototype.applyToBufferAttribute = function ( attribute ) {\n\n\tconsole.warn( 'THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.' );\n\treturn attribute.applyMatrix3( this );\n\n};\n\nMatrix3.prototype.applyToVector3Array = function ( /* array, offset, length */ ) {\n\n\tconsole.error( 'THREE.Matrix3: .applyToVector3Array() has been removed.' );\n\n};\n\nMatrix3.prototype.getInverse = function ( matrix ) {\n\n\tconsole.warn( 'THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.' );\n\treturn this.copy( matrix ).invert();\n\n};\n\n//\n\nMatrix4.prototype.extractPosition = function ( m ) {\n\n\tconsole.warn( 'THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().' );\n\treturn this.copyPosition( m );\n\n};\n\nMatrix4.prototype.flattenToArrayOffset = function ( array, offset ) {\n\n\tconsole.warn( 'THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.' );\n\treturn this.toArray( array, offset );\n\n};\n\nMatrix4.prototype.getPosition = function () {\n\n\tconsole.warn( 'THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.' );\n\treturn new Vector3().setFromMatrixColumn( this, 3 );\n\n};\n\nMatrix4.prototype.setRotationFromQuaternion = function ( q ) {\n\n\tconsole.warn( 'THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().' );\n\treturn this.makeRotationFromQuaternion( q );\n\n};\n\nMatrix4.prototype.multiplyToArray = function () {\n\n\tconsole.warn( 'THREE.Matrix4: .multiplyToArray() has been removed.' );\n\n};\n\nMatrix4.prototype.multiplyVector3 = function ( vector ) {\n\n\tconsole.warn( 'THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.' );\n\treturn vector.applyMatrix4( this );\n\n};\n\nMatrix4.prototype.multiplyVector4 = function ( vector ) {\n\n\tconsole.warn( 'THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.' );\n\treturn vector.applyMatrix4( this );\n\n};\n\nMatrix4.prototype.multiplyVector3Array = function ( /* a */ ) {\n\n\tconsole.error( 'THREE.Matrix4: .multiplyVector3Array() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateAxis = function ( v ) {\n\n\tconsole.warn( 'THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.' );\n\tv.transformDirection( this );\n\n};\n\nMatrix4.prototype.crossVector = function ( vector ) {\n\n\tconsole.warn( 'THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.' );\n\treturn vector.applyMatrix4( this );\n\n};\n\nMatrix4.prototype.translate = function () {\n\n\tconsole.error( 'THREE.Matrix4: .translate() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateX = function () {\n\n\tconsole.error( 'THREE.Matrix4: .rotateX() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateY = function () {\n\n\tconsole.error( 'THREE.Matrix4: .rotateY() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateZ = function () {\n\n\tconsole.error( 'THREE.Matrix4: .rotateZ() has been removed.' );\n\n};\n\nMatrix4.prototype.rotateByAxis = function () {\n\n\tconsole.error( 'THREE.Matrix4: .rotateByAxis() has been removed.' );\n\n};\n\nMatrix4.prototype.applyToBufferAttribute = function ( attribute ) {\n\n\tconsole.warn( 'THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.' );\n\treturn attribute.applyMatrix4( this );\n\n};\n\nMatrix4.prototype.applyToVector3Array = function ( /* array, offset, length */ ) {\n\n\tconsole.error( 'THREE.Matrix4: .applyToVector3Array() has been removed.' );\n\n};\n\nMatrix4.prototype.makeFrustum = function ( left, right, bottom, top, near, far ) {\n\n\tconsole.warn( 'THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.' );\n\treturn this.makePerspective( left, right, top, bottom, near, far );\n\n};\n\nMatrix4.prototype.getInverse = function ( matrix ) {\n\n\tconsole.warn( 'THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.' );\n\treturn this.copy( matrix ).invert();\n\n};\n\n//\n\nPlane.prototype.isIntersectionLine = function ( line ) {\n\n\tconsole.warn( 'THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().' );\n\treturn this.intersectsLine( line );\n\n};\n\n//\n\nQuaternion.prototype.multiplyVector3 = function ( vector ) {\n\n\tconsole.warn( 'THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.' );\n\treturn vector.applyQuaternion( this );\n\n};\n\nQuaternion.prototype.inverse = function ( ) {\n\n\tconsole.warn( 'THREE.Quaternion: .inverse() has been renamed to invert().' );\n\treturn this.invert();\n\n};\n\n//\n\nRay.prototype.isIntersectionBox = function ( box ) {\n\n\tconsole.warn( 'THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().' );\n\treturn this.intersectsBox( box );\n\n};\n\nRay.prototype.isIntersectionPlane = function ( plane ) {\n\n\tconsole.warn( 'THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().' );\n\treturn this.intersectsPlane( plane );\n\n};\n\nRay.prototype.isIntersectionSphere = function ( sphere ) {\n\n\tconsole.warn( 'THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().' );\n\treturn this.intersectsSphere( sphere );\n\n};\n\n//\n\nTriangle.prototype.area = function () {\n\n\tconsole.warn( 'THREE.Triangle: .area() has been renamed to .getArea().' );\n\treturn this.getArea();\n\n};\n\nTriangle.prototype.barycoordFromPoint = function ( point, target ) {\n\n\tconsole.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );\n\treturn this.getBarycoord( point, target );\n\n};\n\nTriangle.prototype.midpoint = function ( target ) {\n\n\tconsole.warn( 'THREE.Triangle: .midpoint() has been renamed to .getMidpoint().' );\n\treturn this.getMidpoint( target );\n\n};\n\nTriangle.prototypenormal = function ( target ) {\n\n\tconsole.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );\n\treturn this.getNormal( target );\n\n};\n\nTriangle.prototype.plane = function ( target ) {\n\n\tconsole.warn( 'THREE.Triangle: .plane() has been renamed to .getPlane().' );\n\treturn this.getPlane( target );\n\n};\n\nTriangle.barycoordFromPoint = function ( point, a, b, c, target ) {\n\n\tconsole.warn( 'THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().' );\n\treturn Triangle.getBarycoord( point, a, b, c, target );\n\n};\n\nTriangle.normal = function ( a, b, c, target ) {\n\n\tconsole.warn( 'THREE.Triangle: .normal() has been renamed to .getNormal().' );\n\treturn Triangle.getNormal( a, b, c, target );\n\n};\n\n//\n\nShape.prototype.extractAllPoints = function ( divisions ) {\n\n\tconsole.warn( 'THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.' );\n\treturn this.extractPoints( divisions );\n\n};\n\nShape.prototype.extrude = function ( options ) {\n\n\tconsole.warn( 'THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.' );\n\treturn new ExtrudeGeometry( this, options );\n\n};\n\nShape.prototype.makeGeometry = function ( options ) {\n\n\tconsole.warn( 'THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.' );\n\treturn new ShapeGeometry( this, options );\n\n};\n\n//\n\nVector2.prototype.fromAttribute = function ( attribute, index, offset ) {\n\n\tconsole.warn( 'THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().' );\n\treturn this.fromBufferAttribute( attribute, index, offset );\n\n};\n\nVector2.prototype.distanceToManhattan = function ( v ) {\n\n\tconsole.warn( 'THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );\n\treturn this.manhattanDistanceTo( v );\n\n};\n\nVector2.prototype.lengthManhattan = function () {\n\n\tconsole.warn( 'THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().' );\n\treturn this.manhattanLength();\n\n};\n\n//\n\nVector3.prototype.setEulerFromRotationMatrix = function () {\n\n\tconsole.error( 'THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.' );\n\n};\n\nVector3.prototype.setEulerFromQuaternion = function () {\n\n\tconsole.error( 'THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.' );\n\n};\n\nVector3.prototype.getPositionFromMatrix = function ( m ) {\n\n\tconsole.warn( 'THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().' );\n\treturn this.setFromMatrixPosition( m );\n\n};\n\nVector3.prototype.getScaleFromMatrix = function ( m ) {\n\n\tconsole.warn( 'THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().' );\n\treturn this.setFromMatrixScale( m );\n\n};\n\nVector3.prototype.getColumnFromMatrix = function ( index, matrix ) {\n\n\tconsole.warn( 'THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().' );\n\treturn this.setFromMatrixColumn( matrix, index );\n\n};\n\nVector3.prototype.applyProjection = function ( m ) {\n\n\tconsole.warn( 'THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.' );\n\treturn this.applyMatrix4( m );\n\n};\n\nVector3.prototype.fromAttribute = function ( attribute, index, offset ) {\n\n\tconsole.warn( 'THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().' );\n\treturn this.fromBufferAttribute( attribute, index, offset );\n\n};\n\nVector3.prototype.distanceToManhattan = function ( v ) {\n\n\tconsole.warn( 'THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().' );\n\treturn this.manhattanDistanceTo( v );\n\n};\n\nVector3.prototype.lengthManhattan = function () {\n\n\tconsole.warn( 'THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().' );\n\treturn this.manhattanLength();\n\n};\n\n//\n\nVector4.prototype.fromAttribute = function ( attribute, index, offset ) {\n\n\tconsole.warn( 'THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().' );\n\treturn this.fromBufferAttribute( attribute, index, offset );\n\n};\n\nVector4.prototype.lengthManhattan = function () {\n\n\tconsole.warn( 'THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().' );\n\treturn this.manhattanLength();\n\n};\n\n//\n\nObject3D.prototype.getChildByName = function ( name ) {\n\n\tconsole.warn( 'THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().' );\n\treturn this.getObjectByName( name );\n\n};\n\nObject3D.prototype.renderDepth = function () {\n\n\tconsole.warn( 'THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.' );\n\n};\n\nObject3D.prototype.translate = function ( distance, axis ) {\n\n\tconsole.warn( 'THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.' );\n\treturn this.translateOnAxis( axis, distance );\n\n};\n\nObject3D.prototype.getWorldRotation = function () {\n\n\tconsole.error( 'THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.' );\n\n};\n\nObject3D.prototype.applyMatrix = function ( matrix ) {\n\n\tconsole.warn( 'THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().' );\n\treturn this.applyMatrix4( matrix );\n\n};\n\nObject.defineProperties( Object3D.prototype, {\n\n\teulerOrder: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );\n\t\t\treturn this.rotation.order;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Object3D: .eulerOrder is now .rotation.order.' );\n\t\t\tthis.rotation.order = value;\n\n\t\t}\n\t},\n\tuseQuaternion: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.' );\n\n\t\t}\n\t}\n\n} );\n\nMesh.prototype.setDrawMode = function () {\n\n\tconsole.error( 'THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' );\n\n};\n\nObject.defineProperties( Mesh.prototype, {\n\n\tdrawMode: {\n\t\tget: function () {\n\n\t\t\tconsole.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.' );\n\t\t\treturn TrianglesDrawMode;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.error( 'THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.' );\n\n\t\t}\n\t}\n\n} );\n\nSkinnedMesh.prototype.initBones = function () {\n\n\tconsole.error( 'THREE.SkinnedMesh: initBones() has been removed.' );\n\n};\n\n//\n\nPerspectiveCamera.prototype.setLens = function ( focalLength, filmGauge ) {\n\n\tconsole.warn( 'THREE.PerspectiveCamera.setLens is deprecated. ' +\n\t\t\t'Use .setFocalLength and .filmGauge for a photographic setup.' );\n\n\tif ( filmGauge !== undefined ) this.filmGauge = filmGauge;\n\tthis.setFocalLength( focalLength );\n\n};\n\n//\n\nObject.defineProperties( Light.prototype, {\n\tonlyShadow: {\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Light: .onlyShadow has been removed.' );\n\n\t\t}\n\t},\n\tshadowCameraFov: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );\n\t\t\tthis.shadow.camera.fov = value;\n\n\t\t}\n\t},\n\tshadowCameraLeft: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );\n\t\t\tthis.shadow.camera.left = value;\n\n\t\t}\n\t},\n\tshadowCameraRight: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );\n\t\t\tthis.shadow.camera.right = value;\n\n\t\t}\n\t},\n\tshadowCameraTop: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );\n\t\t\tthis.shadow.camera.top = value;\n\n\t\t}\n\t},\n\tshadowCameraBottom: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );\n\t\t\tthis.shadow.camera.bottom = value;\n\n\t\t}\n\t},\n\tshadowCameraNear: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );\n\t\t\tthis.shadow.camera.near = value;\n\n\t\t}\n\t},\n\tshadowCameraFar: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );\n\t\t\tthis.shadow.camera.far = value;\n\n\t\t}\n\t},\n\tshadowCameraVisible: {\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.' );\n\n\t\t}\n\t},\n\tshadowBias: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );\n\t\t\tthis.shadow.bias = value;\n\n\t\t}\n\t},\n\tshadowDarkness: {\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowDarkness has been removed.' );\n\n\t\t}\n\t},\n\tshadowMapWidth: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );\n\t\t\tthis.shadow.mapSize.width = value;\n\n\t\t}\n\t},\n\tshadowMapHeight: {\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );\n\t\t\tthis.shadow.mapSize.height = value;\n\n\t\t}\n\t}\n} );\n\n//\n\nObject.defineProperties( BufferAttribute.prototype, {\n\n\tlength: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.BufferAttribute: .length has been deprecated. Use .count instead.' );\n\t\t\treturn this.array.length;\n\n\t\t}\n\t},\n\tdynamic: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );\n\t\t\treturn this.usage === DynamicDrawUsage;\n\n\t\t},\n\t\tset: function ( /* value */ ) {\n\n\t\t\tconsole.warn( 'THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.' );\n\t\t\tthis.setUsage( DynamicDrawUsage );\n\n\t\t}\n\t}\n\n} );\n\nBufferAttribute.prototype.setDynamic = function ( value ) {\n\n\tconsole.warn( 'THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.' );\n\tthis.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );\n\treturn this;\n\n};\n\nBufferAttribute.prototype.copyIndicesArray = function ( /* indices */ ) {\n\n\tconsole.error( 'THREE.BufferAttribute: .copyIndicesArray() has been removed.' );\n\n},\n\nBufferAttribute.prototype.setArray = function ( /* array */ ) {\n\n\tconsole.error( 'THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );\n\n};\n\n//\n\nBufferGeometry.prototype.addIndex = function ( index ) {\n\n\tconsole.warn( 'THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().' );\n\tthis.setIndex( index );\n\n};\n\nBufferGeometry.prototype.addAttribute = function ( name, attribute ) {\n\n\tconsole.warn( 'THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().' );\n\n\tif ( ! ( attribute && attribute.isBufferAttribute ) && ! ( attribute && attribute.isInterleavedBufferAttribute ) ) {\n\n\t\tconsole.warn( 'THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).' );\n\n\t\treturn this.setAttribute( name, new BufferAttribute( arguments[ 1 ], arguments[ 2 ] ) );\n\n\t}\n\n\tif ( name === 'index' ) {\n\n\t\tconsole.warn( 'THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.' );\n\t\tthis.setIndex( attribute );\n\n\t\treturn this;\n\n\t}\n\n\treturn this.setAttribute( name, attribute );\n\n};\n\nBufferGeometry.prototype.addDrawCall = function ( start, count, indexOffset ) {\n\n\tif ( indexOffset !== undefined ) {\n\n\t\tconsole.warn( 'THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.' );\n\n\t}\n\n\tconsole.warn( 'THREE.BufferGeometry: .addDrawCall() is now .addGroup().' );\n\tthis.addGroup( start, count );\n\n};\n\nBufferGeometry.prototype.clearDrawCalls = function () {\n\n\tconsole.warn( 'THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().' );\n\tthis.clearGroups();\n\n};\n\nBufferGeometry.prototype.computeOffsets = function () {\n\n\tconsole.warn( 'THREE.BufferGeometry: .computeOffsets() has been removed.' );\n\n};\n\nBufferGeometry.prototype.removeAttribute = function ( name ) {\n\n\tconsole.warn( 'THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute().' );\n\n\treturn this.deleteAttribute( name );\n\n};\n\nBufferGeometry.prototype.applyMatrix = function ( matrix ) {\n\n\tconsole.warn( 'THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().' );\n\treturn this.applyMatrix4( matrix );\n\n};\n\nObject.defineProperties( BufferGeometry.prototype, {\n\n\tdrawcalls: {\n\t\tget: function () {\n\n\t\t\tconsole.error( 'THREE.BufferGeometry: .drawcalls has been renamed to .groups.' );\n\t\t\treturn this.groups;\n\n\t\t}\n\t},\n\toffsets: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.BufferGeometry: .offsets has been renamed to .groups.' );\n\t\t\treturn this.groups;\n\n\t\t}\n\t}\n\n} );\n\nInterleavedBuffer.prototype.setDynamic = function ( value ) {\n\n\tconsole.warn( 'THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.' );\n\tthis.setUsage( value === true ? DynamicDrawUsage : StaticDrawUsage );\n\treturn this;\n\n};\n\nInterleavedBuffer.prototype.setArray = function ( /* array */ ) {\n\n\tconsole.error( 'THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers' );\n\n};\n\n//\n\nExtrudeGeometry.prototype.getArrays = function () {\n\n\tconsole.error( 'THREE.ExtrudeGeometry: .getArrays() has been removed.' );\n\n};\n\nExtrudeGeometry.prototype.addShapeList = function () {\n\n\tconsole.error( 'THREE.ExtrudeGeometry: .addShapeList() has been removed.' );\n\n};\n\nExtrudeGeometry.prototype.addShape = function () {\n\n\tconsole.error( 'THREE.ExtrudeGeometry: .addShape() has been removed.' );\n\n};\n\n//\n\nScene.prototype.dispose = function () {\n\n\tconsole.error( 'THREE.Scene: .dispose() has been removed.' );\n\n};\n\n//\n\nUniform.prototype.onUpdate = function () {\n\n\tconsole.warn( 'THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.' );\n\treturn this;\n\n};\n\n//\n\nObject.defineProperties( Material.prototype, {\n\n\twrapAround: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .wrapAround has been removed.' );\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .wrapAround has been removed.' );\n\n\t\t}\n\t},\n\n\toverdraw: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .overdraw has been removed.' );\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .overdraw has been removed.' );\n\n\t\t}\n\t},\n\n\twrapRGB: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.Material: .wrapRGB has been removed.' );\n\t\t\treturn new Color();\n\n\t\t}\n\t},\n\n\tshading: {\n\t\tget: function () {\n\n\t\t\tconsole.error( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );\n\t\t\tthis.flatShading = ( value === FlatShading );\n\n\t\t}\n\t},\n\n\tstencilMask: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' );\n\t\t\treturn this.stencilFuncMask;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' );\n\t\t\tthis.stencilFuncMask = value;\n\n\t\t}\n\t}\n\n} );\n\nObject.defineProperties( ShaderMaterial.prototype, {\n\n\tderivatives: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );\n\t\t\treturn this.extensions.derivatives;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.' );\n\t\t\tthis.extensions.derivatives = value;\n\n\t\t}\n\t}\n\n} );\n\n//\n\nWebGLRenderer.prototype.clearTarget = function ( renderTarget, color, depth, stencil ) {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.' );\n\tthis.setRenderTarget( renderTarget );\n\tthis.clear( color, depth, stencil );\n\n};\n\nWebGLRenderer.prototype.animate = function ( callback ) {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .animate() is now .setAnimationLoop().' );\n\tthis.setAnimationLoop( callback );\n\n};\n\nWebGLRenderer.prototype.getCurrentRenderTarget = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().' );\n\treturn this.getRenderTarget();\n\n};\n\nWebGLRenderer.prototype.getMaxAnisotropy = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().' );\n\treturn this.capabilities.getMaxAnisotropy();\n\n};\n\nWebGLRenderer.prototype.getPrecision = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.' );\n\treturn this.capabilities.precision;\n\n};\n\nWebGLRenderer.prototype.resetGLState = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .resetGLState() is now .state.reset().' );\n\treturn this.state.reset();\n\n};\n\nWebGLRenderer.prototype.supportsFloatTextures = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \\'OES_texture_float\\' ).' );\n\treturn this.extensions.get( 'OES_texture_float' );\n\n};\n\nWebGLRenderer.prototype.supportsHalfFloatTextures = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \\'OES_texture_half_float\\' ).' );\n\treturn this.extensions.get( 'OES_texture_half_float' );\n\n};\n\nWebGLRenderer.prototype.supportsStandardDerivatives = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \\'OES_standard_derivatives\\' ).' );\n\treturn this.extensions.get( 'OES_standard_derivatives' );\n\n};\n\nWebGLRenderer.prototype.supportsCompressedTextureS3TC = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \\'WEBGL_compressed_texture_s3tc\\' ).' );\n\treturn this.extensions.get( 'WEBGL_compressed_texture_s3tc' );\n\n};\n\nWebGLRenderer.prototype.supportsCompressedTexturePVRTC = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \\'WEBGL_compressed_texture_pvrtc\\' ).' );\n\treturn this.extensions.get( 'WEBGL_compressed_texture_pvrtc' );\n\n};\n\nWebGLRenderer.prototype.supportsBlendMinMax = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \\'EXT_blend_minmax\\' ).' );\n\treturn this.extensions.get( 'EXT_blend_minmax' );\n\n};\n\nWebGLRenderer.prototype.supportsVertexTextures = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.' );\n\treturn this.capabilities.vertexTextures;\n\n};\n\nWebGLRenderer.prototype.supportsInstancedArrays = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \\'ANGLE_instanced_arrays\\' ).' );\n\treturn this.extensions.get( 'ANGLE_instanced_arrays' );\n\n};\n\nWebGLRenderer.prototype.enableScissorTest = function ( boolean ) {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().' );\n\tthis.setScissorTest( boolean );\n\n};\n\nWebGLRenderer.prototype.initMaterial = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .initMaterial() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.addPrePlugin = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .addPrePlugin() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.addPostPlugin = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .addPostPlugin() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.updateShadowMap = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .updateShadowMap() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.setFaceCulling = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .setFaceCulling() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.allocTextureUnit = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .allocTextureUnit() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.setTexture = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .setTexture() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.setTexture2D = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .setTexture2D() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.setTextureCube = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .setTextureCube() has been removed.' );\n\n};\n\nWebGLRenderer.prototype.getActiveMipMapLevel = function () {\n\n\tconsole.warn( 'THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().' );\n\treturn this.getActiveMipmapLevel();\n\n};\n\nObject.defineProperties( WebGLRenderer.prototype, {\n\n\tshadowMapEnabled: {\n\t\tget: function () {\n\n\t\t\treturn this.shadowMap.enabled;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.' );\n\t\t\tthis.shadowMap.enabled = value;\n\n\t\t}\n\t},\n\tshadowMapType: {\n\t\tget: function () {\n\n\t\t\treturn this.shadowMap.type;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.' );\n\t\t\tthis.shadowMap.type = value;\n\n\t\t}\n\t},\n\tshadowMapCullFace: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' );\n\t\t\treturn undefined;\n\n\t\t},\n\t\tset: function ( /* value */ ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.' );\n\n\t\t}\n\t},\n\tcontext: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .context has been removed. Use .getContext() instead.' );\n\t\t\treturn this.getContext();\n\n\t\t}\n\t},\n\tvr: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .vr has been renamed to .xr' );\n\t\t\treturn this.xr;\n\n\t\t}\n\t},\n\tgammaInput: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.' );\n\t\t\treturn false;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.' );\n\n\t\t}\n\t},\n\tgammaOutput: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.' );\n\t\t\treturn false;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.' );\n\t\t\tthis.outputEncoding = ( value === true ) ? sRGBEncoding : LinearEncoding;\n\n\t\t}\n\t},\n\ttoneMappingWhitePoint: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.' );\n\t\t\treturn 1.0;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.' );\n\n\t\t}\n\t},\n\n} );\n\nObject.defineProperties( WebGLShadowMap.prototype, {\n\n\tcullFace: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' );\n\t\t\treturn undefined;\n\n\t\t},\n\t\tset: function ( /* cullFace */ ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.' );\n\n\t\t}\n\t},\n\trenderReverseSided: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' );\n\t\t\treturn undefined;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.' );\n\n\t\t}\n\t},\n\trenderSingleSided: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' );\n\t\t\treturn undefined;\n\n\t\t},\n\t\tset: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.' );\n\n\t\t}\n\t}\n\n} );\n\nfunction WebGLRenderTargetCube( width, height, options ) {\n\n\tconsole.warn( 'THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).' );\n\treturn new WebGLCubeRenderTarget( width, options );\n\n}\n\n//\n\nObject.defineProperties( WebGLRenderTarget.prototype, {\n\n\twrapS: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );\n\t\t\treturn this.texture.wrapS;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.' );\n\t\t\tthis.texture.wrapS = value;\n\n\t\t}\n\t},\n\twrapT: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );\n\t\t\treturn this.texture.wrapT;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.' );\n\t\t\tthis.texture.wrapT = value;\n\n\t\t}\n\t},\n\tmagFilter: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );\n\t\t\treturn this.texture.magFilter;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.' );\n\t\t\tthis.texture.magFilter = value;\n\n\t\t}\n\t},\n\tminFilter: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );\n\t\t\treturn this.texture.minFilter;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.' );\n\t\t\tthis.texture.minFilter = value;\n\n\t\t}\n\t},\n\tanisotropy: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );\n\t\t\treturn this.texture.anisotropy;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.' );\n\t\t\tthis.texture.anisotropy = value;\n\n\t\t}\n\t},\n\toffset: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );\n\t\t\treturn this.texture.offset;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .offset is now .texture.offset.' );\n\t\t\tthis.texture.offset = value;\n\n\t\t}\n\t},\n\trepeat: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );\n\t\t\treturn this.texture.repeat;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .repeat is now .texture.repeat.' );\n\t\t\tthis.texture.repeat = value;\n\n\t\t}\n\t},\n\tformat: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );\n\t\t\treturn this.texture.format;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .format is now .texture.format.' );\n\t\t\tthis.texture.format = value;\n\n\t\t}\n\t},\n\ttype: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );\n\t\t\treturn this.texture.type;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .type is now .texture.type.' );\n\t\t\tthis.texture.type = value;\n\n\t\t}\n\t},\n\tgenerateMipmaps: {\n\t\tget: function () {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );\n\t\t\treturn this.texture.generateMipmaps;\n\n\t\t},\n\t\tset: function ( value ) {\n\n\t\t\tconsole.warn( 'THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.' );\n\t\t\tthis.texture.generateMipmaps = value;\n\n\t\t}\n\t}\n\n} );\n\n//\n\nAudio.prototype.load = function ( file ) {\n\n\tconsole.warn( 'THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.' );\n\tconst scope = this;\n\tconst audioLoader = new AudioLoader();\n\taudioLoader.load( file, function ( buffer ) {\n\n\t\tscope.setBuffer( buffer );\n\n\t} );\n\treturn this;\n\n};\n\n\nAudioAnalyser.prototype.getData = function () {\n\n\tconsole.warn( 'THREE.AudioAnalyser: .getData() is now .getFrequencyData().' );\n\treturn this.getFrequencyData();\n\n};\n\n//\n\nCubeCamera.prototype.updateCubeMap = function ( renderer, scene ) {\n\n\tconsole.warn( 'THREE.CubeCamera: .updateCubeMap() is now .update().' );\n\treturn this.update( renderer, scene );\n\n};\n\nCubeCamera.prototype.clear = function ( renderer, color, depth, stencil ) {\n\n\tconsole.warn( 'THREE.CubeCamera: .clear() is now .renderTarget.clear().' );\n\treturn this.renderTarget.clear( renderer, color, depth, stencil );\n\n};\n\nImageUtils.crossOrigin = undefined;\n\nImageUtils.loadTexture = function ( url, mapping, onLoad, onError ) {\n\n\tconsole.warn( 'THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.' );\n\n\tconst loader = new TextureLoader();\n\tloader.setCrossOrigin( this.crossOrigin );\n\n\tconst texture = loader.load( url, onLoad, undefined, onError );\n\n\tif ( mapping ) texture.mapping = mapping;\n\n\treturn texture;\n\n};\n\nImageUtils.loadTextureCube = function ( urls, mapping, onLoad, onError ) {\n\n\tconsole.warn( 'THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.' );\n\n\tconst loader = new CubeTextureLoader();\n\tloader.setCrossOrigin( this.crossOrigin );\n\n\tconst texture = loader.load( urls, onLoad, undefined, onError );\n\n\tif ( mapping ) texture.mapping = mapping;\n\n\treturn texture;\n\n};\n\nImageUtils.loadCompressedTexture = function () {\n\n\tconsole.error( 'THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.' );\n\n};\n\nImageUtils.loadCompressedTextureCube = function () {\n\n\tconsole.error( 'THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.' );\n\n};\n\n//\n\nfunction CanvasRenderer() {\n\n\tconsole.error( 'THREE.CanvasRenderer has been removed' );\n\n}\n\n//\n\nfunction JSONLoader() {\n\n\tconsole.error( 'THREE.JSONLoader has been removed.' );\n\n}\n\n//\n\nconst SceneUtils = {\n\n\tcreateMultiMaterialObject: function ( /* geometry, materials */ ) {\n\n\t\tconsole.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );\n\n\t},\n\n\tdetach: function ( /* child, parent, scene */ ) {\n\n\t\tconsole.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );\n\n\t},\n\n\tattach: function ( /* child, scene, parent */ ) {\n\n\t\tconsole.error( 'THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js' );\n\n\t}\n\n};\n\n//\n\nfunction LensFlare() {\n\n\tconsole.error( 'THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js' );\n\n}\n\nif ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {\n\n\t/* eslint-disable no-undef */\n\t__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'register', { detail: {\n\t\trevision: REVISION,\n\t} } ) );\n\t/* eslint-enable no-undef */\n\n}\n\nif ( typeof window !== 'undefined' ) {\n\n\tif ( window.__THREE__ ) {\n\n\t\tconsole.warn( 'WARNING: Multiple instances of Three.js being imported.' );\n\n\t} else {\n\n\t\twindow.__THREE__ = REVISION;\n\n\t}\n\n}\n\nexport { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveAnimationBlendMode, AdditiveBlending, AlphaFormat, AlwaysDepth, AlwaysStencilFunc, AmbientLight, AmbientLightProbe, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrayCamera, ArrowHelper, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, AxisHelper, BackSide, BasicDepthPacking, BasicShadowMap, BinaryTextureLoader, Bone, BooleanKeyframeTrack, BoundingBoxHelper, Box2, Box3, Box3Helper, BoxGeometry as BoxBufferGeometry, BoxGeometry, BoxHelper, BufferAttribute, BufferGeometry, BufferGeometryLoader, ByteType, Cache, Camera, CameraHelper, CanvasRenderer, CanvasTexture, CatmullRomCurve3, CineonToneMapping, CircleGeometry as CircleBufferGeometry, CircleGeometry, ClampToEdgeWrapping, Clock, Color, ColorKeyframeTrack, CompressedTexture, CompressedTextureLoader, ConeGeometry as ConeBufferGeometry, ConeGeometry, CubeCamera, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeTextureLoader, CubeUVReflectionMapping, CubeUVRefractionMapping, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceBack, CullFaceFront, CullFaceFrontBack, CullFaceNone, Curve, CurvePath, CustomBlending, CustomToneMapping, CylinderGeometry as CylinderBufferGeometry, CylinderGeometry, Cylindrical, DataTexture, DataTexture2DArray, DataTexture3D, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry as DodecahedronBufferGeometry, DodecahedronGeometry, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicBufferAttribute, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EdgesHelper, EllipseCurve, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, Euler, EventDispatcher, ExtrudeGeometry as ExtrudeBufferGeometry, ExtrudeGeometry, FaceColors, FileLoader, FlatShading, Float16BufferAttribute, Float32Attribute, Float32BufferAttribute, Float64Attribute, Float64BufferAttribute, FloatType, Fog, FogExp2, Font, FontLoader, FrontSide, Frustum, GLBufferAttribute, GLSL1, GLSL3, GammaEncoding, GreaterDepth, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HalfFloatType, HemisphereLight, HemisphereLightHelper, HemisphereLightProbe, IcosahedronGeometry as IcosahedronBufferGeometry, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, ImmediateRenderObject, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16Attribute, Int16BufferAttribute, Int32Attribute, Int32BufferAttribute, Int8Attribute, Int8BufferAttribute, IntType, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InvertStencilOp, JSONLoader, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry as LatheBufferGeometry, LatheGeometry, Layers, LensFlare, LessDepth, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LinePieces, LineSegments, LineStrip, LinearEncoding, LinearFilter, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearToneMapping, Loader, LoaderUtils, LoadingManager, LogLuvEncoding, LoopOnce, LoopPingPong, LoopRepeat, LuminanceAlphaFormat, LuminanceFormat, MOUSE, Material, MaterialLoader, MathUtils as Math, MathUtils, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshFaceMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiMaterial, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeverDepth, NeverStencilFunc, NoBlending, NoColors, NoToneMapping, NormalAnimationBlendMode, NormalBlending, NotEqualDepth, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, ObjectSpaceNormalMap, OctahedronGeometry as OctahedronBufferGeometry, OctahedronGeometry, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PMREMGenerator, ParametricGeometry as ParametricBufferGeometry, ParametricGeometry, Particle, ParticleBasicMaterial, ParticleSystem, ParticleSystemMaterial, Path, PerspectiveCamera, Plane, PlaneGeometry as PlaneBufferGeometry, PlaneGeometry, PlaneHelper, PointCloud, PointCloudMaterial, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry as PolyhedronBufferGeometry, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, REVISION, RGBADepthPacking, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBDEncoding, RGBEEncoding, RGBEFormat, RGBFormat, RGBIntegerFormat, RGBM16Encoding, RGBM7Encoding, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, Ray, Raycaster, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, RingGeometry as RingBufferGeometry, RingGeometry, SRGB8_ALPHA8_ASTC_10x10_Format, SRGB8_ALPHA8_ASTC_10x5_Format, SRGB8_ALPHA8_ASTC_10x6_Format, SRGB8_ALPHA8_ASTC_10x8_Format, SRGB8_ALPHA8_ASTC_12x10_Format, SRGB8_ALPHA8_ASTC_12x12_Format, SRGB8_ALPHA8_ASTC_4x4_Format, SRGB8_ALPHA8_ASTC_5x4_Format, SRGB8_ALPHA8_ASTC_5x5_Format, SRGB8_ALPHA8_ASTC_6x5_Format, SRGB8_ALPHA8_ASTC_6x6_Format, SRGB8_ALPHA8_ASTC_8x5_Format, SRGB8_ALPHA8_ASTC_8x6_Format, SRGB8_ALPHA8_ASTC_8x8_Format, Scene, SceneUtils, ShaderChunk, ShaderLib, ShaderMaterial, ShadowMaterial, Shape, ShapeGeometry as ShapeBufferGeometry, ShapeGeometry, ShapePath, ShapeUtils, ShortType, Skeleton, SkeletonHelper, SkinnedMesh, SmoothShading, Sphere, SphereGeometry as SphereBufferGeometry, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, SubtractEquation, SubtractiveBlending, TOUCH, TangentSpaceNormalMap, TetrahedronGeometry as TetrahedronBufferGeometry, TetrahedronGeometry, TextGeometry as TextBufferGeometry, TextGeometry, Texture, TextureLoader, TorusGeometry as TorusBufferGeometry, TorusGeometry, TorusKnotGeometry as TorusKnotBufferGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry as TubeBufferGeometry, TubeGeometry, UVMapping, Uint16Attribute, Uint16BufferAttribute, Uint32Attribute, Uint32BufferAttribute, Uint8Attribute, Uint8BufferAttribute, Uint8ClampedAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsLib, UniformsUtils, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShort565Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, VectorKeyframeTrack, Vertex, VertexColors, VideoTexture, WebGL1Renderer, WebGLCubeRenderTarget, WebGLMultipleRenderTargets, WebGLMultisampleRenderTarget, WebGLRenderTarget, WebGLRenderTargetCube, WebGLRenderer, WebGLUtils, WireframeGeometry, WireframeHelper, WrapAroundEnding, XHRLoader, ZeroCurvatureEnding, ZeroFactor, ZeroSlopeEnding, ZeroStencilOp, sRGBEncoding };\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n'use strict';\n\nvar validateFormat = process.env.NODE_ENV !== \"production\" ? function (format) {\n if (format === undefined) {\n throw new Error('invariant(...): Second argument must be a string.');\n }\n} : function (format) {};\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments to provide\n * information about what broke and what you were expecting.\n *\n * The invariant message will be stripped in production, but the invariant will\n * remain to ensure logic does not differ in production.\n */\n\nfunction invariant(condition, format) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n validateFormat(format);\n\n if (!condition) {\n var error;\n\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return String(args[argIndex++]);\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // Skip invariant's own stack frame.\n\n throw error;\n }\n}\n\nmodule.exports = invariant;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport ReactNativePropRegistry from './ReactNativePropRegistry';\nimport flattenStyle from './flattenStyle';\nimport validate from './validate';\nvar absoluteFillObject = {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n};\nvar absoluteFill = ReactNativePropRegistry.register(absoluteFillObject);\nvar StyleSheet = {\n absoluteFill: absoluteFill,\n absoluteFillObject: absoluteFillObject,\n compose: function compose(style1, style2) {\n if (process.env.NODE_ENV !== 'production') {\n /* eslint-disable prefer-rest-params */\n var len = arguments.length;\n\n if (len > 2) {\n var readableStyles = Array.prototype.slice.call(arguments).map(function (a) {\n return flattenStyle(a);\n });\n throw new Error(\"StyleSheet.compose() only accepts 2 arguments, received \" + len + \": \" + JSON.stringify(readableStyles));\n }\n /* eslint-enable prefer-rest-params */\n\n }\n\n if (style1 && style2) {\n return [style1, style2];\n } else {\n return style1 || style2;\n }\n },\n create: function create(styles) {\n var result = {};\n Object.keys(styles).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n validate(key, styles);\n }\n\n var id = styles[key] && ReactNativePropRegistry.register(styles[key]);\n result[key] = id;\n });\n return result;\n },\n flatten: flattenStyle,\n // `hairlineWidth` is not implemented using screen density as browsers may\n // round sub-pixel values down to `0`, causing the line not to be rendered.\n hairlineWidth: 1\n};\nexport default StyleSheet;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport StyleSheet from './StyleSheet'; // allow original component styles to be inspected in React Dev Tools\n\nif (canUseDOM && window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {\n window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle = StyleSheet.flatten;\n}\n\nexport default StyleSheet;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar Platform = {\n OS: 'web',\n select: function select(obj) {\n return 'web' in obj ? obj.web : obj.default;\n },\n\n get isTesting() {\n if (process.env.NODE_ENV === 'test') {\n return true;\n }\n\n return false;\n }\n\n};\nexport default Platform;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var niceErrors = {\n 0: \"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'\",\n 1: function _(annotationType, key) {\n return \"Cannot apply '\" + annotationType + \"' to '\" + key.toString() + \"': Field not found.\";\n },\n 5: \"'keys()' can only be used on observable objects, arrays, sets and maps\",\n 6: \"'values()' can only be used on observable objects, arrays, sets and maps\",\n 7: \"'entries()' can only be used on observable objects, arrays and maps\",\n 8: \"'set()' can only be used on observable objects, arrays and maps\",\n 9: \"'remove()' can only be used on observable objects, arrays and maps\",\n 10: \"'has()' can only be used on observable objects, arrays and maps\",\n 11: \"'get()' can only be used on observable objects, arrays and maps\",\n 12: \"Invalid annotation\",\n 13: \"Dynamic observable objects cannot be frozen\",\n 14: \"Intercept handlers should return nothing or a change object\",\n 15: \"Observable arrays cannot be frozen\",\n 16: \"Modification exception: the internal structure of an observable array was changed.\",\n 17: function _(index, length) {\n return \"[mobx.array] Index out of bounds, \" + index + \" is larger than \" + length;\n },\n 18: \"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js\",\n 19: function _(other) {\n return \"Cannot initialize from classes that inherit from Map: \" + other.constructor.name;\n },\n 20: function _(other) {\n return \"Cannot initialize map from \" + other;\n },\n 21: function _(dataStructure) {\n return \"Cannot convert to map from '\" + dataStructure + \"'\";\n },\n 22: \"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js\",\n 23: \"It is not possible to get index atoms from arrays\",\n 24: function _(thing) {\n return \"Cannot obtain administration from \" + thing;\n },\n 25: function _(property, name) {\n return \"the entry '\" + property + \"' does not exist in the observable map '\" + name + \"'\";\n },\n 26: \"please specify a property\",\n 27: function _(property, name) {\n return \"no observable property '\" + property.toString() + \"' found on the observable object '\" + name + \"'\";\n },\n 28: function _(thing) {\n return \"Cannot obtain atom from \" + thing;\n },\n 29: \"Expecting some object\",\n 30: \"invalid action stack. did you forget to finish an action?\",\n 31: \"missing option for computed: get\",\n 32: function _(name, derivation) {\n return \"Cycle detected in computation \" + name + \": \" + derivation;\n },\n 33: function _(name) {\n return \"The setter of computed value '\" + name + \"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?\";\n },\n 34: function _(name) {\n return \"[ComputedValue '\" + name + \"'] It is not possible to assign a new value to a computed value.\";\n },\n 35: \"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`\",\n 36: \"isolateGlobalState should be called before MobX is running any reactions\",\n 37: function _(method) {\n return \"[mobx] `observableArray.\" + method + \"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice().\" + method + \"()` instead\";\n }\n};\nvar errors = process.env.NODE_ENV !== \"production\" ? niceErrors : {};\nfunction die(error) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n var e = typeof error === \"string\" ? error : errors[error];\n if (typeof e === \"function\") e = e.apply(null, args);\n throw new Error(\"[MobX] \" + e);\n }\n\n throw new Error(typeof error === \"number\" ? \"[MobX] minified error nr: \" + error + (args.length ? \" \" + args.map(String).join(\",\") : \"\") + \". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts\" : \"[MobX] \" + error);\n}\n\nvar mockGlobal = {};\nfunction getGlobal() {\n if (typeof globalThis !== \"undefined\") {\n return globalThis;\n }\n\n if (typeof window !== \"undefined\") {\n return window;\n }\n\n if (typeof global !== \"undefined\") {\n return global;\n }\n\n if (typeof self !== \"undefined\") {\n return self;\n }\n\n return mockGlobal;\n}\n\nvar assign = Object.assign;\nvar getDescriptor = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar objectPrototype = Object.prototype;\nvar EMPTY_ARRAY = [];\nObject.freeze(EMPTY_ARRAY);\nvar EMPTY_OBJECT = {};\nObject.freeze(EMPTY_OBJECT);\nvar hasProxy = typeof Proxy !== \"undefined\";\nvar plainObjectString = /*#__PURE__*/Object.toString();\nfunction assertProxies() {\n if (!hasProxy) {\n die(process.env.NODE_ENV !== \"production\" ? \"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`\" : \"Proxy not available\");\n }\n}\nfunction warnAboutProxyRequirement(msg) {\n if (process.env.NODE_ENV !== \"production\" && globalState.verifyProxies) {\n die(\"MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to \" + msg);\n }\n}\nfunction getNextId() {\n return ++globalState.mobxGuid;\n}\n/**\r\n * Makes sure that the provided function is invoked at most once.\r\n */\n\nfunction once(func) {\n var invoked = false;\n return function () {\n if (invoked) return;\n invoked = true;\n return func.apply(this, arguments);\n };\n}\nvar noop = function noop() {};\nfunction isFunction(fn) {\n return typeof fn === \"function\";\n}\nfunction isStringish(value) {\n var t = typeof value;\n\n switch (t) {\n case \"string\":\n case \"symbol\":\n case \"number\":\n return true;\n }\n\n return false;\n}\nfunction isObject(value) {\n return value !== null && typeof value === \"object\";\n}\nfunction isPlainObject(value) {\n var _proto$constructor;\n\n if (!isObject(value)) return false;\n var proto = Object.getPrototypeOf(value);\n if (proto == null) return true;\n return ((_proto$constructor = proto.constructor) == null ? void 0 : _proto$constructor.toString()) === plainObjectString;\n} // https://stackoverflow.com/a/37865170\n\nfunction isGenerator(obj) {\n var constructor = obj == null ? void 0 : obj.constructor;\n if (!constructor) return false;\n if (\"GeneratorFunction\" === constructor.name || \"GeneratorFunction\" === constructor.displayName) return true;\n return false;\n}\nfunction addHiddenProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\nfunction addHiddenFinalProp(object, propName, value) {\n defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\nfunction createInstanceofPredicate(name, theClass) {\n var propName = \"isMobX\" + name;\n theClass.prototype[propName] = true;\n return function (x) {\n return isObject(x) && x[propName] === true;\n };\n}\nfunction isES6Map(thing) {\n return thing instanceof Map;\n}\nfunction isES6Set(thing) {\n return thing instanceof Set;\n}\nvar hasGetOwnPropertySymbols = typeof Object.getOwnPropertySymbols !== \"undefined\";\n/**\r\n * Returns the following: own enumerable keys and symbols.\r\n */\n\nfunction getPlainObjectKeys(object) {\n var keys = Object.keys(object); // Not supported in IE, so there are not going to be symbol props anyway...\n\n if (!hasGetOwnPropertySymbols) return keys;\n var symbols = Object.getOwnPropertySymbols(object);\n if (!symbols.length) return keys;\n return [].concat(keys, symbols.filter(function (s) {\n return objectPrototype.propertyIsEnumerable.call(object, s);\n }));\n} // From Immer utils\n// Returns all own keys, including non-enumerable and symbolic\n\nvar ownKeys = typeof Reflect !== \"undefined\" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {\n return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));\n} :\n/* istanbul ignore next */\nObject.getOwnPropertyNames;\nfunction stringifyKey(key) {\n if (typeof key === \"string\") return key;\n if (typeof key === \"symbol\") return key.toString();\n return new String(key).toString();\n}\nfunction toPrimitive(value) {\n return value === null ? null : typeof value === \"object\" ? \"\" + value : value;\n}\nfunction hasProp(target, prop) {\n return objectPrototype.hasOwnProperty.call(target, prop);\n} // From Immer utils\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(target) {\n // Polyfill needed for Hermes and IE, see https://github.com/facebook/hermes/issues/274\n var res = {}; // Note: without polyfill for ownKeys, symbols won't be picked up\n\n ownKeys(target).forEach(function (key) {\n res[key] = getDescriptor(target, key);\n });\n return res;\n};\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n}\n\nvar storedAnnotationsSymbol = /*#__PURE__*/Symbol(\"mobx-stored-annotations\");\n/**\r\n * Creates a function that acts as\r\n * - decorator\r\n * - annotation object\r\n */\n\nfunction createDecoratorAnnotation(annotation) {\n function decorator(target, property) {\n storeAnnotation(target, property, annotation);\n }\n\n return Object.assign(decorator, annotation);\n}\n/**\r\n * Stores annotation to prototype,\r\n * so it can be inspected later by `makeObservable` called from constructor\r\n */\n\nfunction storeAnnotation(prototype, key, annotation) {\n if (!hasProp(prototype, storedAnnotationsSymbol)) {\n addHiddenProp(prototype, storedAnnotationsSymbol, _extends({}, prototype[storedAnnotationsSymbol]));\n } // @override must override something\n\n\n if (process.env.NODE_ENV !== \"production\" && isOverride(annotation) && !hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n die(\"'\" + fieldName + \"' is decorated with 'override', \" + \"but no such decorated member was found on prototype.\");\n } // Cannot re-decorate\n\n\n assertNotDecorated(prototype, annotation, key); // Ignore override\n\n if (!isOverride(annotation)) {\n prototype[storedAnnotationsSymbol][key] = annotation;\n }\n}\n\nfunction assertNotDecorated(prototype, annotation, key) {\n if (process.env.NODE_ENV !== \"production\" && !isOverride(annotation) && hasProp(prototype[storedAnnotationsSymbol], key)) {\n var fieldName = prototype.constructor.name + \".prototype.\" + key.toString();\n var currentAnnotationType = prototype[storedAnnotationsSymbol][key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '@\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already decorated with '@\" + currentAnnotationType + \"'.\") + \"\\nRe-decorating fields is not allowed.\" + \"\\nUse '@override' decorator for methods overriden by subclass.\");\n }\n}\n/**\r\n * Collects annotations from prototypes and stores them on target (instance)\r\n */\n\n\nfunction collectStoredAnnotations(target) {\n if (!hasProp(target, storedAnnotationsSymbol)) {\n if (process.env.NODE_ENV !== \"production\" && !target[storedAnnotationsSymbol]) {\n die(\"No annotations were passed to makeObservable, but no decorated members have been found either\");\n } // We need a copy as we will remove annotation from the list once it's applied.\n\n\n addHiddenProp(target, storedAnnotationsSymbol, _extends({}, target[storedAnnotationsSymbol]));\n }\n\n return target[storedAnnotationsSymbol];\n}\n\nvar $mobx = /*#__PURE__*/Symbol(\"mobx administration\");\nvar Atom = /*#__PURE__*/function () {\n // for effective unobserving. BaseAtom has true, for extra optimization, so its onBecomeUnobserved never gets called, because it's not needed\n\n /**\r\n * Create a new atom. For debugging purposes it is recommended to give it a name.\r\n * The onBecomeObserved and onBecomeUnobserved callbacks can be used for resource management.\r\n */\n function Atom(name_) {\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"Atom@\" + getNextId() : \"Atom\";\n }\n\n this.name_ = void 0;\n this.isPendingUnobservation_ = false;\n this.isBeingObserved_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.NOT_TRACKING_;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n this.name_ = name_;\n } // onBecomeObservedListeners\n\n\n var _proto = Atom.prototype;\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Invoke this method to notify mobx that your atom has been used somehow.\r\n * Returns true if there is currently a reactive context.\r\n */\n ;\n\n _proto.reportObserved = function reportObserved$1() {\n return reportObserved(this);\n }\n /**\r\n * Invoke this method _after_ this method has changed to signal mobx that all its observers should invalidate.\r\n */\n ;\n\n _proto.reportChanged = function reportChanged() {\n startBatch();\n propagateChanged(this);\n endBatch();\n };\n\n _proto.toString = function toString() {\n return this.name_;\n };\n\n return Atom;\n}();\nvar isAtom = /*#__PURE__*/createInstanceofPredicate(\"Atom\", Atom);\nfunction createAtom(name, onBecomeObservedHandler, onBecomeUnobservedHandler) {\n if (onBecomeObservedHandler === void 0) {\n onBecomeObservedHandler = noop;\n }\n\n if (onBecomeUnobservedHandler === void 0) {\n onBecomeUnobservedHandler = noop;\n }\n\n var atom = new Atom(name); // default `noop` listener will not initialize the hook Set\n\n if (onBecomeObservedHandler !== noop) {\n onBecomeObserved(atom, onBecomeObservedHandler);\n }\n\n if (onBecomeUnobservedHandler !== noop) {\n onBecomeUnobserved(atom, onBecomeUnobservedHandler);\n }\n\n return atom;\n}\n\nfunction identityComparer(a, b) {\n return a === b;\n}\n\nfunction structuralComparer(a, b) {\n return deepEqual(a, b);\n}\n\nfunction shallowComparer(a, b) {\n return deepEqual(a, b, 1);\n}\n\nfunction defaultComparer(a, b) {\n return Object.is(a, b);\n}\n\nvar comparer = {\n identity: identityComparer,\n structural: structuralComparer,\n \"default\": defaultComparer,\n shallow: shallowComparer\n};\n\nfunction deepEnhancer(v, _, name) {\n // it is an observable already, done\n if (isObservable(v)) return v; // something that can be converted and mutated?\n\n if (Array.isArray(v)) return observable.array(v, {\n name: name\n });\n if (isPlainObject(v)) return observable.object(v, undefined, {\n name: name\n });\n if (isES6Map(v)) return observable.map(v, {\n name: name\n });\n if (isES6Set(v)) return observable.set(v, {\n name: name\n });\n return v;\n}\nfunction shallowEnhancer(v, _, name) {\n if (v === undefined || v === null) return v;\n if (isObservableObject(v) || isObservableArray(v) || isObservableMap(v) || isObservableSet(v)) return v;\n if (Array.isArray(v)) return observable.array(v, {\n name: name,\n deep: false\n });\n if (isPlainObject(v)) return observable.object(v, undefined, {\n name: name,\n deep: false\n });\n if (isES6Map(v)) return observable.map(v, {\n name: name,\n deep: false\n });\n if (isES6Set(v)) return observable.set(v, {\n name: name,\n deep: false\n });\n if (process.env.NODE_ENV !== \"production\") die(\"The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets\");\n}\nfunction referenceEnhancer(newValue) {\n // never turn into an observable\n return newValue;\n}\nfunction refStructEnhancer(v, oldValue) {\n if (process.env.NODE_ENV !== \"production\" && isObservable(v)) die(\"observable.struct should not be used with observable values\");\n if (deepEqual(v, oldValue)) return oldValue;\n return v;\n}\n\nvar OVERRIDE = \"override\";\nvar override = /*#__PURE__*/createDecoratorAnnotation({\n annotationType_: OVERRIDE,\n make_: make_,\n extend_: extend_\n});\nfunction isOverride(annotation) {\n return annotation.annotationType_ === OVERRIDE;\n}\n\nfunction make_(adm, key) {\n // Must not be plain object\n if (process.env.NODE_ENV !== \"production\" && adm.isPlainObject_) {\n die(\"Cannot apply '\" + this.annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + this.annotationType_ + \"' cannot be used on plain objects.\"));\n } // Must override something\n\n\n if (process.env.NODE_ENV !== \"production\" && !hasProp(adm.appliedAnnotations_, key)) {\n die(\"'\" + adm.name_ + \".\" + key.toString() + \"' is annotated with '\" + this.annotationType_ + \"', \" + \"but no such annotated member was found on prototype.\");\n }\n}\n\nfunction extend_(adm, key, descriptor, proxyTrap) {\n die(\"'\" + this.annotationType_ + \"' can only be used with 'makeObservable'\");\n}\n\nfunction createActionAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$1,\n extend_: extend_$1\n };\n}\n\nfunction make_$1(adm, key) {\n var _this$options_$bound, _this$options_, _adm$target_$storedAn;\n\n var annotated = false;\n var source = adm.target_;\n var bound = (_this$options_$bound = (_this$options_ = this.options_) == null ? void 0 : _this$options_.bound) != null ? _this$options_$bound : false;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n // Instance or bound\n // Keep first because the operation can be intercepted\n // and we don't want to end up with partially annotated proto chain\n if (source === adm.target_ || bound) {\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor);\n var definePropertyOutcome = adm.defineProperty_(key, actionDescriptor);\n\n if (!definePropertyOutcome) {\n // Intercepted\n return;\n }\n\n annotated = true; // Don't annotate protos if bound\n\n if (bound) {\n break;\n }\n } // Prototype\n\n\n if (source !== adm.target_) {\n if (isAction(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n annotated = true;\n break;\n }\n\n var _actionDescriptor = createActionDescriptor(adm, this, key, descriptor, false);\n\n defineProperty(source, key, _actionDescriptor);\n annotated = true;\n }\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n if (annotated) {\n recordAnnotationApplied(adm, this, key);\n } else if (!((_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? void 0 : _adm$target_$storedAn[key])) {\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n die(1, this.annotationType_, adm.name_ + \".\" + key.toString());\n }\n}\n\nfunction extend_$1(adm, key, descriptor, proxyTrap) {\n var actionDescriptor = createActionDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, actionDescriptor, proxyTrap);\n}\n\nfunction assertActionDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if (process.env.NODE_ENV !== \"production\" && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a function value.\"));\n }\n}\n\nfunction createActionDescriptor(adm, annotation, key, descriptor, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n var _annotation$options_, _annotation$options_$, _annotation$options_2, _annotation$options_$2, _annotation$options_3;\n\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertActionDescriptor(adm, annotation, key, descriptor);\n var value = descriptor.value;\n\n if ((_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.bound) {\n var _adm$proxy_;\n\n value = value.bind((_adm$proxy_ = adm.proxy_) != null ? _adm$proxy_ : adm.target_);\n }\n\n return {\n value: createAction((_annotation$options_$ = (_annotation$options_2 = annotation.options_) == null ? void 0 : _annotation$options_2.name) != null ? _annotation$options_$ : key.toString(), value, (_annotation$options_$2 = (_annotation$options_3 = annotation.options_) == null ? void 0 : _annotation$options_3.autoAction) != null ? _annotation$options_$2 : false),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createFlowAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$2,\n extend_: extend_$2\n };\n}\n\nfunction make_$2(adm, key) {\n var _adm$target_$storedAn;\n\n var annotated = false;\n var source = adm.target_;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n if (source !== adm.target_) {\n // Prototype\n if (isFlow(descriptor.value)) {\n // A prototype could have been annotated already by other constructor,\n // rest of the proto chain must be annotated already\n annotated = true;\n break;\n }\n\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor, false);\n defineProperty(source, key, flowDescriptor);\n } else {\n var _flowDescriptor = createFlowDescriptor(adm, this, key, descriptor);\n\n var definePropertyOutcome = adm.defineProperty_(key, _flowDescriptor);\n\n if (!definePropertyOutcome) {\n // Intercepted\n return;\n }\n }\n\n annotated = true;\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n if (annotated) {\n recordAnnotationApplied(adm, this, key);\n } else if (!((_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? void 0 : _adm$target_$storedAn[key])) {\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n die(1, this.annotationType_, adm.name_ + \".\" + key.toString());\n }\n}\n\nfunction extend_$2(adm, key, descriptor, proxyTrap) {\n var flowDescriptor = createFlowDescriptor(adm, this, key, descriptor);\n return adm.defineProperty_(key, flowDescriptor, proxyTrap);\n}\n\nfunction assertFlowDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var value = _ref2.value;\n\n if (process.env.NODE_ENV !== \"production\" && !isFunction(value)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on properties with a generator function value.\"));\n }\n}\n\nfunction createFlowDescriptor(adm, annotation, key, descriptor, // provides ability to disable safeDescriptors for prototypes\nsafeDescriptors) {\n if (safeDescriptors === void 0) {\n safeDescriptors = globalState.safeDescriptors;\n }\n\n assertFlowDescriptor(adm, annotation, key, descriptor);\n return {\n value: flow(descriptor.value),\n // Non-configurable for classes\n // prevents accidental field redefinition in subclass\n configurable: safeDescriptors ? adm.isPlainObject_ : true,\n // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058\n enumerable: false,\n // Non-obsevable, therefore non-writable\n // Also prevents rewriting in subclass constructor\n writable: safeDescriptors ? false : true\n };\n}\n\nfunction createComputedAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$3,\n extend_: extend_$3\n };\n}\n\nfunction make_$3(adm, key) {\n var _adm$target_$storedAn;\n\n var source = adm.target_;\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n assertComputedDescriptor(adm, this, key, descriptor);\n var definePropertyOutcome = adm.defineComputedProperty_(key, _extends({}, this.options_, {\n get: descriptor.get,\n set: descriptor.set\n }));\n\n if (!definePropertyOutcome) {\n // Intercepted\n return;\n }\n\n recordAnnotationApplied(adm, this, key);\n return;\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n if (!((_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? void 0 : _adm$target_$storedAn[key])) {\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n die(1, this.annotationType_, adm.name_ + \".\" + key.toString());\n }\n}\n\nfunction extend_$3(adm, key, descriptor, proxyTrap) {\n assertComputedDescriptor(adm, this, key, descriptor);\n return adm.defineComputedProperty_(key, _extends({}, this.options_, {\n get: descriptor.get,\n set: descriptor.set\n }), proxyTrap);\n}\n\nfunction assertComputedDescriptor(adm, _ref, key, _ref2) {\n var annotationType_ = _ref.annotationType_;\n var get = _ref2.get;\n\n if (process.env.NODE_ENV !== \"production\" && !get) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' can only be used on getter(+setter) properties.\"));\n }\n}\n\nfunction createObservableAnnotation(name, options) {\n return {\n annotationType_: name,\n options_: options,\n make_: make_$4,\n extend_: extend_$4\n };\n}\n\nfunction make_$4(adm, key) {\n var _adm$target_$storedAn;\n\n var source = adm.target_; // Copy props from proto as well, see test:\n // \"decorate should work with Object.create\"\n\n while (source && source !== objectPrototype) {\n var descriptor = getDescriptor(source, key);\n\n if (descriptor) {\n var _this$options_$enhanc, _this$options_;\n\n assertObservableDescriptor(adm, this, key, descriptor);\n var definePropertyOutcome = adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc = (_this$options_ = this.options_) == null ? void 0 : _this$options_.enhancer) != null ? _this$options_$enhanc : deepEnhancer);\n\n if (!definePropertyOutcome) {\n // Intercepted\n return;\n }\n\n recordAnnotationApplied(adm, this, key);\n return;\n }\n\n source = Object.getPrototypeOf(source);\n }\n\n if (!((_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? void 0 : _adm$target_$storedAn[key])) {\n // Throw on missing key, except for decorators:\n // Decorator annotations are collected from whole prototype chain.\n // When called from super() some props may not exist yet.\n // However we don't have to worry about missing prop,\n // because the decorator must have been applied to something.\n die(1, this.annotationType_, adm.name_ + \".\" + key.toString());\n }\n}\n\nfunction extend_$4(adm, key, descriptor, proxyTrap) {\n var _this$options_$enhanc2, _this$options_2;\n\n assertObservableDescriptor(adm, this, key, descriptor);\n return adm.defineObservableProperty_(key, descriptor.value, (_this$options_$enhanc2 = (_this$options_2 = this.options_) == null ? void 0 : _this$options_2.enhancer) != null ? _this$options_$enhanc2 : deepEnhancer, proxyTrap);\n}\n\nfunction assertObservableDescriptor(adm, _ref, key, descriptor) {\n var annotationType_ = _ref.annotationType_;\n\n if (process.env.NODE_ENV !== \"production\" && !(\"value\" in descriptor)) {\n die(\"Cannot apply '\" + annotationType_ + \"' to '\" + adm.name_ + \".\" + key.toString() + \"':\" + (\"\\n'\" + annotationType_ + \"' cannot be used on getter/setter properties\"));\n }\n}\n\n// in the majority of cases\n\nvar defaultCreateObservableOptions = {\n deep: true,\n name: undefined,\n defaultDecorator: undefined,\n proxy: true\n};\nObject.freeze(defaultCreateObservableOptions);\nfunction asCreateObservableOptions(thing) {\n return thing || defaultCreateObservableOptions;\n}\nvar observableAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable\");\nvar observableRefAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.ref\", {\n enhancer: referenceEnhancer\n});\nvar observableShallowAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.shallow\", {\n enhancer: shallowEnhancer\n});\nvar observableStructAnnotation = /*#__PURE__*/createObservableAnnotation(\"observable.struct\", {\n enhancer: refStructEnhancer\n});\nvar observableDecoratorAnnotation = /*#__PURE__*/createDecoratorAnnotation(observableAnnotation);\nfunction getEnhancerFromOptions(options) {\n return options.deep === true ? deepEnhancer : options.deep === false ? referenceEnhancer : getEnhancerFromAnnotation(options.defaultDecorator);\n}\nfunction getAnnotationFromOptions(options) {\n return options ? options.deep === true ? observableAnnotation : options.deep === false ? observableRefAnnotation : options.defaultDecorator : undefined;\n}\nfunction getEnhancerFromAnnotation(annotation) {\n var _annotation$options_$, _annotation$options_;\n\n return !annotation ? deepEnhancer : (_annotation$options_$ = (_annotation$options_ = annotation.options_) == null ? void 0 : _annotation$options_.enhancer) != null ? _annotation$options_$ : deepEnhancer;\n}\n/**\r\n * Turns an object, array or function into a reactive structure.\r\n * @param v the value which should become observable.\r\n */\n\nfunction createObservable(v, arg2, arg3) {\n // @observable someProp;\n if (isStringish(arg2)) {\n storeAnnotation(v, arg2, observableAnnotation);\n return;\n } // already observable - ignore\n\n\n if (isObservable(v)) return v; // plain object\n\n if (isPlainObject(v)) return observable.object(v, arg2, arg3); // Array\n\n if (Array.isArray(v)) return observable.array(v, arg2); // Map\n\n if (isES6Map(v)) return observable.map(v, arg2); // Set\n\n if (isES6Set(v)) return observable.set(v, arg2); // other object - ignore\n\n if (typeof v === \"object\" && v !== null) return v; // anything else\n\n return observable.box(v, arg2);\n}\n\nObject.assign(createObservable, observableDecoratorAnnotation);\nvar observableFactories = {\n box: function box(value, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableValue(value, getEnhancerFromOptions(o), o.name, true, o.equals);\n },\n array: function array(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return (globalState.useProxies === false || o.proxy === false ? createLegacyArray : createObservableArray)(initialValues, getEnhancerFromOptions(o), o.name);\n },\n map: function map(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableMap(initialValues, getEnhancerFromOptions(o), o.name);\n },\n set: function set(initialValues, options) {\n var o = asCreateObservableOptions(options);\n return new ObservableSet(initialValues, getEnhancerFromOptions(o), o.name);\n },\n object: function object(props, decorators, options) {\n return extendObservable(globalState.useProxies === false || (options == null ? void 0 : options.proxy) === false ? asObservableObject({}, options) : asDynamicObservableObject({}, options), props, decorators);\n },\n ref: /*#__PURE__*/createDecoratorAnnotation(observableRefAnnotation),\n shallow: /*#__PURE__*/createDecoratorAnnotation(observableShallowAnnotation),\n deep: observableDecoratorAnnotation,\n struct: /*#__PURE__*/createDecoratorAnnotation(observableStructAnnotation)\n}; // eslint-disable-next-line\n\nvar observable = /*#__PURE__*/assign(createObservable, observableFactories);\n\nvar COMPUTED = \"computed\";\nvar COMPUTED_STRUCT = \"computed.struct\";\nvar computedAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED);\nvar computedStructAnnotation = /*#__PURE__*/createComputedAnnotation(COMPUTED_STRUCT, {\n equals: comparer.structural\n});\n/**\r\n * Decorator for class properties: @computed get value() { return expr; }.\r\n * For legacy purposes also invokable as ES5 observable created: `computed(() => expr)`;\r\n */\n\nvar computed = function computed(arg1, arg2) {\n if (isStringish(arg2)) {\n // @computed\n return storeAnnotation(arg1, arg2, computedAnnotation);\n }\n\n if (isPlainObject(arg1)) {\n // @computed({ options })\n return createDecoratorAnnotation(createComputedAnnotation(COMPUTED, arg1));\n } // computed(expr, options?)\n\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(arg1)) die(\"First argument to `computed` should be an expression.\");\n if (isFunction(arg2)) die(\"A setter as second argument is no longer supported, use `{ set: fn }` option instead\");\n }\n\n var opts = isPlainObject(arg2) ? arg2 : {};\n opts.get = arg1;\n opts.name || (opts.name = arg1.name || \"\");\n /* for generated name */\n\n return new ComputedValue(opts);\n};\nObject.assign(computed, computedAnnotation);\ncomputed.struct = /*#__PURE__*/createDecoratorAnnotation(computedStructAnnotation);\n\nvar _getDescriptor$config, _getDescriptor;\n// mobx versions\n\nvar currentActionId = 0;\nvar nextActionId = 1;\nvar isFunctionNameConfigurable = (_getDescriptor$config = (_getDescriptor = /*#__PURE__*/getDescriptor(function () {}, \"name\")) == null ? void 0 : _getDescriptor.configurable) != null ? _getDescriptor$config : false; // we can safely recycle this object\n\nvar tmpNameDescriptor = {\n value: \"action\",\n configurable: true,\n writable: false,\n enumerable: false\n};\nfunction createAction(actionName, fn, autoAction, ref) {\n if (autoAction === void 0) {\n autoAction = false;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(fn)) die(\"`action` can only be invoked on functions\");\n if (typeof actionName !== \"string\" || !actionName) die(\"actions should have valid names, got: '\" + actionName + \"'\");\n }\n\n function res() {\n return executeAction(actionName, autoAction, fn, ref || this, arguments);\n }\n\n res.isMobxAction = true;\n\n if (isFunctionNameConfigurable) {\n tmpNameDescriptor.value = actionName;\n Object.defineProperty(res, \"name\", tmpNameDescriptor);\n }\n\n return res;\n}\nfunction executeAction(actionName, canRunAsDerivation, fn, scope, args) {\n var runInfo = _startAction(actionName, canRunAsDerivation, scope, args);\n\n try {\n return fn.apply(scope, args);\n } catch (err) {\n runInfo.error_ = err;\n throw err;\n } finally {\n _endAction(runInfo);\n }\n}\nfunction _startAction(actionName, canRunAsDerivation, // true for autoAction\nscope, args) {\n var notifySpy_ = process.env.NODE_ENV !== \"production\" && isSpyEnabled() && !!actionName;\n var startTime_ = 0;\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy_) {\n startTime_ = Date.now();\n var flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY;\n spyReportStart({\n type: ACTION,\n name: actionName,\n object: scope,\n arguments: flattenedArgs\n });\n }\n\n var prevDerivation_ = globalState.trackingDerivation;\n var runAsAction = !canRunAsDerivation || !prevDerivation_;\n startBatch();\n var prevAllowStateChanges_ = globalState.allowStateChanges; // by default preserve previous allow\n\n if (runAsAction) {\n untrackedStart();\n prevAllowStateChanges_ = allowStateChangesStart(true);\n }\n\n var prevAllowStateReads_ = allowStateReadsStart(true);\n var runInfo = {\n runAsAction_: runAsAction,\n prevDerivation_: prevDerivation_,\n prevAllowStateChanges_: prevAllowStateChanges_,\n prevAllowStateReads_: prevAllowStateReads_,\n notifySpy_: notifySpy_,\n startTime_: startTime_,\n actionId_: nextActionId++,\n parentActionId_: currentActionId\n };\n currentActionId = runInfo.actionId_;\n return runInfo;\n}\nfunction _endAction(runInfo) {\n if (currentActionId !== runInfo.actionId_) {\n die(30);\n }\n\n currentActionId = runInfo.parentActionId_;\n\n if (runInfo.error_ !== undefined) {\n globalState.suppressReactionErrors = true;\n }\n\n allowStateChangesEnd(runInfo.prevAllowStateChanges_);\n allowStateReadsEnd(runInfo.prevAllowStateReads_);\n endBatch();\n if (runInfo.runAsAction_) untrackedEnd(runInfo.prevDerivation_);\n\n if (process.env.NODE_ENV !== \"production\" && runInfo.notifySpy_) {\n spyReportEnd({\n time: Date.now() - runInfo.startTime_\n });\n }\n\n globalState.suppressReactionErrors = false;\n}\nfunction allowStateChanges(allowStateChanges, func) {\n var prev = allowStateChangesStart(allowStateChanges);\n\n try {\n return func();\n } finally {\n allowStateChangesEnd(prev);\n }\n}\nfunction allowStateChangesStart(allowStateChanges) {\n var prev = globalState.allowStateChanges;\n globalState.allowStateChanges = allowStateChanges;\n return prev;\n}\nfunction allowStateChangesEnd(prev) {\n globalState.allowStateChanges = prev;\n}\n\nvar _Symbol$toPrimitive;\nvar CREATE = \"create\";\n_Symbol$toPrimitive = Symbol.toPrimitive;\nvar ObservableValue = /*#__PURE__*/function (_Atom) {\n _inheritsLoose(ObservableValue, _Atom);\n\n function ObservableValue(value, enhancer, name_, notifySpy, equals) {\n var _this;\n\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableValue@\" + getNextId() : \"ObservableValue\";\n }\n\n if (notifySpy === void 0) {\n notifySpy = true;\n }\n\n if (equals === void 0) {\n equals = comparer[\"default\"];\n }\n\n _this = _Atom.call(this, name_) || this;\n _this.enhancer = void 0;\n _this.name_ = void 0;\n _this.equals = void 0;\n _this.hasUnreportedChange_ = false;\n _this.interceptors_ = void 0;\n _this.changeListeners_ = void 0;\n _this.value_ = void 0;\n _this.dehancer = void 0;\n _this.enhancer = enhancer;\n _this.name_ = name_;\n _this.equals = equals;\n _this.value_ = enhancer(value, undefined, name_);\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy && isSpyEnabled()) {\n // only notify spy if this is a stand-alone observable\n spyReport({\n type: CREATE,\n object: _assertThisInitialized(_this),\n observableKind: \"value\",\n debugObjectName: _this.name_,\n newValue: \"\" + _this.value_\n });\n }\n\n return _this;\n }\n\n var _proto = ObservableValue.prototype;\n\n _proto.dehanceValue = function dehanceValue(value) {\n if (this.dehancer !== undefined) return this.dehancer(value);\n return value;\n };\n\n _proto.set = function set(newValue) {\n var oldValue = this.value_;\n newValue = this.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy) {\n spyReportStart({\n type: UPDATE,\n object: this,\n observableKind: \"value\",\n debugObjectName: this.name_,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n\n this.setNewValue_(newValue);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n };\n\n _proto.prepareNewValue_ = function prepareNewValue_(newValue) {\n checkIfStateModificationsAreAllowed(this);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this,\n type: UPDATE,\n newValue: newValue\n });\n if (!change) return globalState.UNCHANGED;\n newValue = change.newValue;\n } // apply modifier\n\n\n newValue = this.enhancer(newValue, this.value_, this.name_);\n return this.equals(this.value_, newValue) ? globalState.UNCHANGED : newValue;\n };\n\n _proto.setNewValue_ = function setNewValue_(newValue) {\n var oldValue = this.value_;\n this.value_ = newValue;\n this.reportChanged();\n\n if (hasListeners(this)) {\n notifyListeners(this, {\n type: UPDATE,\n object: this,\n newValue: newValue,\n oldValue: oldValue\n });\n }\n };\n\n _proto.get = function get() {\n this.reportObserved();\n return this.dehanceValue(this.value_);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately) listener({\n observableKind: \"value\",\n debugObjectName: this.name_,\n object: this,\n type: UPDATE,\n newValue: this.value_,\n oldValue: undefined\n });\n return registerListener(this, listener);\n };\n\n _proto.raw = function raw() {\n // used by MST ot get undehanced value\n return this.value_;\n };\n\n _proto.toJSON = function toJSON() {\n return this.get();\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.value_ + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive] = function () {\n return this.valueOf();\n };\n\n return ObservableValue;\n}(Atom);\nvar isObservableValue = /*#__PURE__*/createInstanceofPredicate(\"ObservableValue\", ObservableValue);\n\nvar _Symbol$toPrimitive$1;\n/**\r\n * A node in the state dependency root that observes other nodes, and can be observed itself.\r\n *\r\n * ComputedValue will remember the result of the computation for the duration of the batch, or\r\n * while being observed.\r\n *\r\n * During this time it will recompute only when one of its direct dependencies changed,\r\n * but only when it is being accessed with `ComputedValue.get()`.\r\n *\r\n * Implementation description:\r\n * 1. First time it's being accessed it will compute and remember result\r\n * give back remembered result until 2. happens\r\n * 2. First time any deep dependency change, propagate POSSIBLY_STALE to all observers, wait for 3.\r\n * 3. When it's being accessed, recompute if any shallow dependency changed.\r\n * if result changed: propagate STALE to all observers, that were POSSIBLY_STALE from the last step.\r\n * go to step 2. either way\r\n *\r\n * If at any point it's outside batch and it isn't observed: reset everything and go to 1.\r\n */\n\n_Symbol$toPrimitive$1 = Symbol.toPrimitive;\nvar ComputedValue = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n // during tracking it's an array with new observed observers\n // to check for cycles\n // N.B: unminified as it is used by MST\n\n /**\r\n * Create a new computed value based on a function expression.\r\n *\r\n * The `name` property is for debug purposes only.\r\n *\r\n * The `equals` property specifies the comparer function to use to determine if a newly produced\r\n * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`\r\n * compares based on identity comparison (===), and `structuralComparer` deeply compares the structure.\r\n * Structural comparison can be convenient if you always produce a new aggregated object and\r\n * don't want to notify observers if it is structurally the same.\r\n * This is useful for working with vectors, mouse coordinates etc.\r\n */\n function ComputedValue(options) {\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.observing_ = [];\n this.newObserving_ = null;\n this.isBeingObserved_ = false;\n this.isPendingUnobservation_ = false;\n this.observers_ = new Set();\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.lastAccessedBy_ = 0;\n this.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n this.unboundDepsCount_ = 0;\n this.value_ = new CaughtException(null);\n this.name_ = void 0;\n this.triggeredBy_ = void 0;\n this.isComputing_ = false;\n this.isRunningSetter_ = false;\n this.derivation = void 0;\n this.setter_ = void 0;\n this.isTracing_ = TraceMode.NONE;\n this.scope_ = void 0;\n this.equals_ = void 0;\n this.requiresReaction_ = void 0;\n this.keepAlive_ = void 0;\n this.onBOL = void 0;\n this.onBUOL = void 0;\n if (!options.get) die(31);\n this.derivation = options.get;\n this.name_ = options.name || (process.env.NODE_ENV !== \"production\" ? \"ComputedValue@\" + getNextId() : \"ComputedValue\");\n\n if (options.set) {\n this.setter_ = createAction(process.env.NODE_ENV !== \"production\" ? this.name_ + \"-setter\" : \"ComputedValue-setter\", options.set);\n }\n\n this.equals_ = options.equals || (options.compareStructural || options.struct ? comparer.structural : comparer[\"default\"]);\n this.scope_ = options.context;\n this.requiresReaction_ = !!options.requiresReaction;\n this.keepAlive_ = !!options.keepAlive;\n }\n\n var _proto = ComputedValue.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n propagateMaybeChanged(this);\n };\n\n _proto.onBO = function onBO() {\n if (this.onBOL) {\n this.onBOL.forEach(function (listener) {\n return listener();\n });\n }\n };\n\n _proto.onBUO = function onBUO() {\n if (this.onBUOL) {\n this.onBUOL.forEach(function (listener) {\n return listener();\n });\n }\n }\n /**\r\n * Returns the current value of this computed value.\r\n * Will evaluate its computation first if needed.\r\n */\n ;\n\n _proto.get = function get() {\n if (this.isComputing_) die(32, this.name_, this.derivation);\n\n if (globalState.inBatch === 0 && // !globalState.trackingDerivatpion &&\n this.observers_.size === 0 && !this.keepAlive_) {\n if (shouldCompute(this)) {\n this.warnAboutUntrackedRead_();\n startBatch(); // See perf test 'computed memoization'\n\n this.value_ = this.computeValue_(false);\n endBatch();\n }\n } else {\n reportObserved(this);\n\n if (shouldCompute(this)) {\n var prevTrackingContext = globalState.trackingContext;\n if (this.keepAlive_ && !prevTrackingContext) globalState.trackingContext = this;\n if (this.trackAndCompute()) propagateChangeConfirmed(this);\n globalState.trackingContext = prevTrackingContext;\n }\n }\n\n var result = this.value_;\n if (isCaughtException(result)) throw result.cause;\n return result;\n };\n\n _proto.set = function set(value) {\n if (this.setter_) {\n if (this.isRunningSetter_) die(33, this.name_);\n this.isRunningSetter_ = true;\n\n try {\n this.setter_.call(this.scope_, value);\n } finally {\n this.isRunningSetter_ = false;\n }\n } else die(34, this.name_);\n };\n\n _proto.trackAndCompute = function trackAndCompute() {\n // N.B: unminified as it is used by MST\n var oldValue = this.value_;\n var wasSuspended =\n /* see #1208 */\n this.dependenciesState_ === IDerivationState_.NOT_TRACKING_;\n var newValue = this.computeValue_(true);\n\n if (process.env.NODE_ENV !== \"production\" && isSpyEnabled()) {\n spyReport({\n observableKind: \"computed\",\n debugObjectName: this.name_,\n object: this.scope_,\n type: \"update\",\n oldValue: this.value_,\n newValue: newValue\n });\n }\n\n var changed = wasSuspended || isCaughtException(oldValue) || isCaughtException(newValue) || !this.equals_(oldValue, newValue);\n\n if (changed) {\n this.value_ = newValue;\n }\n\n return changed;\n };\n\n _proto.computeValue_ = function computeValue_(track) {\n this.isComputing_ = true; // don't allow state changes during computation\n\n var prev = allowStateChangesStart(false);\n var res;\n\n if (track) {\n res = trackDerivedFunction(this, this.derivation, this.scope_);\n } else {\n if (globalState.disableErrorBoundaries === true) {\n res = this.derivation.call(this.scope_);\n } else {\n try {\n res = this.derivation.call(this.scope_);\n } catch (e) {\n res = new CaughtException(e);\n }\n }\n }\n\n allowStateChangesEnd(prev);\n this.isComputing_ = false;\n return res;\n };\n\n _proto.suspend_ = function suspend_() {\n if (!this.keepAlive_) {\n clearObserving(this);\n this.value_ = undefined; // don't hold on to computed value!\n }\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n var _this = this;\n\n var firstTime = true;\n var prevValue = undefined;\n return autorun(function () {\n // TODO: why is this in a different place than the spyReport() function? in all other observables it's called in the same place\n var newValue = _this.get();\n\n if (!firstTime || fireImmediately) {\n var prevU = untrackedStart();\n listener({\n observableKind: \"computed\",\n debugObjectName: _this.name_,\n type: UPDATE,\n object: _this,\n newValue: newValue,\n oldValue: prevValue\n });\n untrackedEnd(prevU);\n }\n\n firstTime = false;\n prevValue = newValue;\n });\n };\n\n _proto.warnAboutUntrackedRead_ = function warnAboutUntrackedRead_() {\n if (!(process.env.NODE_ENV !== \"production\")) return;\n\n if (this.requiresReaction_ === true) {\n die(\"[mobx] Computed value \" + this.name_ + \" is read outside a reactive context\");\n }\n\n if (this.isTracing_ !== TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + this.name_ + \"' is being read outside a reactive context. Doing a full recompute\");\n }\n\n if (globalState.computedRequiresReaction) {\n console.warn(\"[mobx] Computed value \" + this.name_ + \" is being read outside a reactive context. Doing a full recompute\");\n }\n };\n\n _proto.toString = function toString() {\n return this.name_ + \"[\" + this.derivation.toString() + \"]\";\n };\n\n _proto.valueOf = function valueOf() {\n return toPrimitive(this.get());\n };\n\n _proto[_Symbol$toPrimitive$1] = function () {\n return this.valueOf();\n };\n\n return ComputedValue;\n}();\nvar isComputedValue = /*#__PURE__*/createInstanceofPredicate(\"ComputedValue\", ComputedValue);\n\nvar IDerivationState_;\n\n(function (IDerivationState_) {\n // before being run or (outside batch and not being observed)\n // at this point derivation is not holding any data about dependency tree\n IDerivationState_[IDerivationState_[\"NOT_TRACKING_\"] = -1] = \"NOT_TRACKING_\"; // no shallow dependency changed since last computation\n // won't recalculate derivation\n // this is what makes mobx fast\n\n IDerivationState_[IDerivationState_[\"UP_TO_DATE_\"] = 0] = \"UP_TO_DATE_\"; // some deep dependency changed, but don't know if shallow dependency changed\n // will require to check first if UP_TO_DATE or POSSIBLY_STALE\n // currently only ComputedValue will propagate POSSIBLY_STALE\n //\n // having this state is second big optimization:\n // don't have to recompute on every dependency change, but only when it's needed\n\n IDerivationState_[IDerivationState_[\"POSSIBLY_STALE_\"] = 1] = \"POSSIBLY_STALE_\"; // A shallow dependency has changed since last computation and the derivation\n // will need to recompute when it's needed next.\n\n IDerivationState_[IDerivationState_[\"STALE_\"] = 2] = \"STALE_\";\n})(IDerivationState_ || (IDerivationState_ = {}));\n\nvar TraceMode;\n\n(function (TraceMode) {\n TraceMode[TraceMode[\"NONE\"] = 0] = \"NONE\";\n TraceMode[TraceMode[\"LOG\"] = 1] = \"LOG\";\n TraceMode[TraceMode[\"BREAK\"] = 2] = \"BREAK\";\n})(TraceMode || (TraceMode = {}));\n\nvar CaughtException = function CaughtException(cause) {\n this.cause = void 0;\n this.cause = cause; // Empty\n};\nfunction isCaughtException(e) {\n return e instanceof CaughtException;\n}\n/**\r\n * Finds out whether any dependency of the derivation has actually changed.\r\n * If dependenciesState is 1 then it will recalculate dependencies,\r\n * if any dependency changed it will propagate it by changing dependenciesState to 2.\r\n *\r\n * By iterating over the dependencies in the same order that they were reported and\r\n * stopping on the first change, all the recalculations are only called for ComputedValues\r\n * that will be tracked by derivation. That is because we assume that if the first x\r\n * dependencies of the derivation doesn't change then the derivation should run the same way\r\n * up until accessing x-th dependency.\r\n */\n\nfunction shouldCompute(derivation) {\n switch (derivation.dependenciesState_) {\n case IDerivationState_.UP_TO_DATE_:\n return false;\n\n case IDerivationState_.NOT_TRACKING_:\n case IDerivationState_.STALE_:\n return true;\n\n case IDerivationState_.POSSIBLY_STALE_:\n {\n // state propagation can occur outside of action/reactive context #2195\n var prevAllowStateReads = allowStateReadsStart(true);\n var prevUntracked = untrackedStart(); // no need for those computeds to be reported, they will be picked up in trackDerivedFunction.\n\n var obs = derivation.observing_,\n l = obs.length;\n\n for (var i = 0; i < l; i++) {\n var obj = obs[i];\n\n if (isComputedValue(obj)) {\n if (globalState.disableErrorBoundaries) {\n obj.get();\n } else {\n try {\n obj.get();\n } catch (e) {\n // we are not interested in the value *or* exception at this moment, but if there is one, notify all\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n } // if ComputedValue `obj` actually changed it will be computed and propagated to its observers.\n // and `derivation` is an observer of `obj`\n // invariantShouldCompute(derivation)\n\n\n if (derivation.dependenciesState_ === IDerivationState_.STALE_) {\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return true;\n }\n }\n }\n\n changeDependenciesStateTo0(derivation);\n untrackedEnd(prevUntracked);\n allowStateReadsEnd(prevAllowStateReads);\n return false;\n }\n }\n}\nfunction isComputingDerivation() {\n return globalState.trackingDerivation !== null; // filter out actions inside computations\n}\nfunction checkIfStateModificationsAreAllowed(atom) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n return;\n }\n\n var hasObservers = atom.observers_.size > 0; // Should not be possible to change observed state outside strict mode, except during initialization, see #563\n\n if (!globalState.allowStateChanges && (hasObservers || globalState.enforceActions === \"always\")) console.warn(\"[MobX] \" + (globalState.enforceActions ? \"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: \" : \"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: \") + atom.name_);\n}\nfunction checkIfStateReadsAreAllowed(observable) {\n if (process.env.NODE_ENV !== \"production\" && !globalState.allowStateReads && globalState.observableRequiresReaction) {\n console.warn(\"[mobx] Observable \" + observable.name_ + \" being read outside a reactive context\");\n }\n}\n/**\r\n * Executes the provided function `f` and tracks which observables are being accessed.\r\n * The tracking information is stored on the `derivation` object and the derivation is registered\r\n * as observer of any of the accessed observables.\r\n */\n\nfunction trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true); // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n\n changeDependenciesStateTo0(derivation);\n derivation.newObserving_ = new Array(derivation.observing_.length + 100);\n derivation.unboundDepsCount_ = 0;\n derivation.runId_ = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n globalState.inBatch++;\n var result;\n\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n } else {\n try {\n result = f.call(context);\n } catch (e) {\n result = new CaughtException(e);\n }\n }\n\n globalState.inBatch--;\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}\n\nfunction warnAboutDerivationWithoutDependencies(derivation) {\n if (!(process.env.NODE_ENV !== \"production\")) return;\n if (derivation.observing_.length !== 0) return;\n\n if (globalState.reactionRequiresObservable || derivation.requiresObservable_) {\n console.warn(\"[mobx] Derivation \" + derivation.name_ + \" is created/updated without reading any observable value\");\n }\n}\n/**\r\n * diffs newObserving with observing.\r\n * update observing to be newObserving with unique observables\r\n * notify observers that become observed/unobserved\r\n */\n\n\nfunction bindDependencies(derivation) {\n // invariant(derivation.dependenciesState !== IDerivationState.NOT_TRACKING, \"INTERNAL ERROR bindDependencies expects derivation.dependenciesState !== -1\");\n var prevObserving = derivation.observing_;\n var observing = derivation.observing_ = derivation.newObserving_;\n var lowestNewObservingDerivationState = IDerivationState_.UP_TO_DATE_; // Go through all new observables and check diffValue: (this list can contain duplicates):\n // 0: first occurrence, change to 1 and keep it\n // 1: extra occurrence, drop it\n\n var i0 = 0,\n l = derivation.unboundDepsCount_;\n\n for (var i = 0; i < l; i++) {\n var dep = observing[i];\n\n if (dep.diffValue_ === 0) {\n dep.diffValue_ = 1;\n if (i0 !== i) observing[i0] = dep;\n i0++;\n } // Upcast is 'safe' here, because if dep is IObservable, `dependenciesState` will be undefined,\n // not hitting the condition\n\n\n if (dep.dependenciesState_ > lowestNewObservingDerivationState) {\n lowestNewObservingDerivationState = dep.dependenciesState_;\n }\n }\n\n observing.length = i0;\n derivation.newObserving_ = null; // newObserving shouldn't be needed outside tracking (statement moved down to work around FF bug, see #614)\n // Go through all old observables and check diffValue: (it is unique after last bindDependencies)\n // 0: it's not in new observables, unobserve it\n // 1: it keeps being observed, don't want to notify it. change to 0\n\n l = prevObserving.length;\n\n while (l--) {\n var _dep = prevObserving[l];\n\n if (_dep.diffValue_ === 0) {\n removeObserver(_dep, derivation);\n }\n\n _dep.diffValue_ = 0;\n } // Go through all new observables and check diffValue: (now it should be unique)\n // 0: it was set to 0 in last loop. don't need to do anything.\n // 1: it wasn't observed, let's observe it. set back to 0\n\n\n while (i0--) {\n var _dep2 = observing[i0];\n\n if (_dep2.diffValue_ === 1) {\n _dep2.diffValue_ = 0;\n addObserver(_dep2, derivation);\n }\n } // Some new observed derivations may become stale during this derivation computation\n // so they have had no chance to propagate staleness (#916)\n\n\n if (lowestNewObservingDerivationState !== IDerivationState_.UP_TO_DATE_) {\n derivation.dependenciesState_ = lowestNewObservingDerivationState;\n derivation.onBecomeStale_();\n }\n}\n\nfunction clearObserving(derivation) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR clearObserving should be called only inside batch\");\n var obs = derivation.observing_;\n derivation.observing_ = [];\n var i = obs.length;\n\n while (i--) {\n removeObserver(obs[i], derivation);\n }\n\n derivation.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n}\nfunction untracked(action) {\n var prev = untrackedStart();\n\n try {\n return action();\n } finally {\n untrackedEnd(prev);\n }\n}\nfunction untrackedStart() {\n var prev = globalState.trackingDerivation;\n globalState.trackingDerivation = null;\n return prev;\n}\nfunction untrackedEnd(prev) {\n globalState.trackingDerivation = prev;\n}\nfunction allowStateReadsStart(allowStateReads) {\n var prev = globalState.allowStateReads;\n globalState.allowStateReads = allowStateReads;\n return prev;\n}\nfunction allowStateReadsEnd(prev) {\n globalState.allowStateReads = prev;\n}\n/**\r\n * needed to keep `lowestObserverState` correct. when changing from (2 or 1) to 0\r\n *\r\n */\n\nfunction changeDependenciesStateTo0(derivation) {\n if (derivation.dependenciesState_ === IDerivationState_.UP_TO_DATE_) return;\n derivation.dependenciesState_ = IDerivationState_.UP_TO_DATE_;\n var obs = derivation.observing_;\n var i = obs.length;\n\n while (i--) {\n obs[i].lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }\n}\n\n/**\r\n * These values will persist if global state is reset\r\n */\n\nvar persistentKeys = [\"mobxGuid\", \"spyListeners\", \"enforceActions\", \"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"allowStateReads\", \"disableErrorBoundaries\", \"runId\", \"UNCHANGED\", \"useProxies\"];\nvar MobXGlobals = function MobXGlobals() {\n this.version = 6;\n this.UNCHANGED = {};\n this.trackingDerivation = null;\n this.trackingContext = null;\n this.runId = 0;\n this.mobxGuid = 0;\n this.inBatch = 0;\n this.pendingUnobservations = [];\n this.pendingReactions = [];\n this.isRunningReactions = false;\n this.allowStateChanges = false;\n this.allowStateReads = true;\n this.enforceActions = true;\n this.spyListeners = [];\n this.globalReactionErrorHandlers = [];\n this.computedRequiresReaction = false;\n this.reactionRequiresObservable = false;\n this.observableRequiresReaction = false;\n this.disableErrorBoundaries = false;\n this.suppressReactionErrors = false;\n this.useProxies = true;\n this.verifyProxies = false;\n this.safeDescriptors = true;\n};\nvar canMergeGlobalState = true;\nvar isolateCalled = false;\nvar globalState = /*#__PURE__*/function () {\n var global = /*#__PURE__*/getGlobal();\n if (global.__mobxInstanceCount > 0 && !global.__mobxGlobals) canMergeGlobalState = false;\n if (global.__mobxGlobals && global.__mobxGlobals.version !== new MobXGlobals().version) canMergeGlobalState = false;\n\n if (!canMergeGlobalState) {\n setTimeout(function () {\n if (!isolateCalled) {\n die(35);\n }\n }, 1);\n return new MobXGlobals();\n } else if (global.__mobxGlobals) {\n global.__mobxInstanceCount += 1;\n if (!global.__mobxGlobals.UNCHANGED) global.__mobxGlobals.UNCHANGED = {}; // make merge backward compatible\n\n return global.__mobxGlobals;\n } else {\n global.__mobxInstanceCount = 1;\n return global.__mobxGlobals = /*#__PURE__*/new MobXGlobals();\n }\n}();\nfunction isolateGlobalState() {\n if (globalState.pendingReactions.length || globalState.inBatch || globalState.isRunningReactions) die(36);\n isolateCalled = true;\n\n if (canMergeGlobalState) {\n var global = getGlobal();\n if (--global.__mobxInstanceCount === 0) global.__mobxGlobals = undefined;\n globalState = new MobXGlobals();\n }\n}\nfunction getGlobalState() {\n return globalState;\n}\n/**\r\n * For testing purposes only; this will break the internal state of existing observables,\r\n * but can be used to get back at a stable state after throwing errors\r\n */\n\nfunction resetGlobalState() {\n var defaultGlobals = new MobXGlobals();\n\n for (var key in defaultGlobals) {\n if (persistentKeys.indexOf(key) === -1) globalState[key] = defaultGlobals[key];\n }\n\n globalState.allowStateChanges = !globalState.enforceActions;\n}\n\nfunction hasObservers(observable) {\n return observable.observers_ && observable.observers_.size > 0;\n}\nfunction getObservers(observable) {\n return observable.observers_;\n} // function invariantObservers(observable: IObservable) {\n// const list = observable.observers\n// const map = observable.observersIndexes\n// const l = list.length\n// for (let i = 0; i < l; i++) {\n// const id = list[i].__mapid\n// if (i) {\n// invariant(map[id] === i, \"INTERNAL ERROR maps derivation.__mapid to index in list\") // for performance\n// } else {\n// invariant(!(id in map), \"INTERNAL ERROR observer on index 0 shouldn't be held in map.\") // for performance\n// }\n// }\n// invariant(\n// list.length === 0 || Object.keys(map).length === list.length - 1,\n// \"INTERNAL ERROR there is no junk in map\"\n// )\n// }\n\nfunction addObserver(observable, node) {\n // invariant(node.dependenciesState !== -1, \"INTERNAL ERROR, can add only dependenciesState !== -1\");\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR add already added node\");\n // invariantObservers(observable);\n observable.observers_.add(node);\n if (observable.lowestObserverState_ > node.dependenciesState_) observable.lowestObserverState_ = node.dependenciesState_; // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR didn't add node\");\n}\nfunction removeObserver(observable, node) {\n // invariant(globalState.inBatch > 0, \"INTERNAL ERROR, remove should be called only inside batch\");\n // invariant(observable._observers.indexOf(node) !== -1, \"INTERNAL ERROR remove already removed node\");\n // invariantObservers(observable);\n observable.observers_[\"delete\"](node);\n\n if (observable.observers_.size === 0) {\n // deleting last observer\n queueForUnobservation(observable);\n } // invariantObservers(observable);\n // invariant(observable._observers.indexOf(node) === -1, \"INTERNAL ERROR remove already removed node2\");\n\n}\nfunction queueForUnobservation(observable) {\n if (observable.isPendingUnobservation_ === false) {\n // invariant(observable._observers.length === 0, \"INTERNAL ERROR, should only queue for unobservation unobserved observables\");\n observable.isPendingUnobservation_ = true;\n globalState.pendingUnobservations.push(observable);\n }\n}\n/**\r\n * Batch starts a transaction, at least for purposes of memoizing ComputedValues when nothing else does.\r\n * During a batch `onBecomeUnobserved` will be called at most once per observable.\r\n * Avoids unnecessary recalculations.\r\n */\n\nfunction startBatch() {\n globalState.inBatch++;\n}\nfunction endBatch() {\n if (--globalState.inBatch === 0) {\n runReactions(); // the batch is actually about to finish, all unobserving should happen here.\n\n var list = globalState.pendingUnobservations;\n\n for (var i = 0; i < list.length; i++) {\n var observable = list[i];\n observable.isPendingUnobservation_ = false;\n\n if (observable.observers_.size === 0) {\n if (observable.isBeingObserved_) {\n // if this observable had reactive observers, trigger the hooks\n observable.isBeingObserved_ = false;\n observable.onBUO();\n }\n\n if (observable instanceof ComputedValue) {\n // computed values are automatically teared down when the last observer leaves\n // this process happens recursively, this computed might be the last observabe of another, etc..\n observable.suspend_();\n }\n }\n }\n\n globalState.pendingUnobservations = [];\n }\n}\nfunction reportObserved(observable) {\n checkIfStateReadsAreAllowed(observable);\n var derivation = globalState.trackingDerivation;\n\n if (derivation !== null) {\n /**\r\n * Simple optimization, give each derivation run an unique id (runId)\r\n * Check if last time this observable was accessed the same runId is used\r\n * if this is the case, the relation is already known\r\n */\n if (derivation.runId_ !== observable.lastAccessedBy_) {\n observable.lastAccessedBy_ = derivation.runId_; // Tried storing newObserving, or observing, or both as Set, but performance didn't come close...\n\n derivation.newObserving_[derivation.unboundDepsCount_++] = observable;\n\n if (!observable.isBeingObserved_ && globalState.trackingContext) {\n observable.isBeingObserved_ = true;\n observable.onBO();\n }\n }\n\n return true;\n } else if (observable.observers_.size === 0 && globalState.inBatch > 0) {\n queueForUnobservation(observable);\n }\n\n return false;\n} // function invariantLOS(observable: IObservable, msg: string) {\n// // it's expensive so better not run it in produciton. but temporarily helpful for testing\n// const min = getObservers(observable).reduce((a, b) => Math.min(a, b.dependenciesState), 2)\n// if (min >= observable.lowestObserverState) return // <- the only assumption about `lowestObserverState`\n// throw new Error(\n// \"lowestObserverState is wrong for \" +\n// msg +\n// \" because \" +\n// min +\n// \" < \" +\n// observable.lowestObserverState\n// )\n// }\n\n/**\r\n * NOTE: current propagation mechanism will in case of self reruning autoruns behave unexpectedly\r\n * It will propagate changes to observers from previous run\r\n * It's hard or maybe impossible (with reasonable perf) to get it right with current approach\r\n * Hopefully self reruning autoruns aren't a feature people should depend on\r\n * Also most basic use cases should be ok\r\n */\n// Called by Atom when its value changes\n\nfunction propagateChanged(observable) {\n // invariantLOS(observable, \"changed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) return;\n observable.lowestObserverState_ = IDerivationState_.STALE_; // Ideally we use for..of here, but the downcompiled version is really slow...\n\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n if (process.env.NODE_ENV !== \"production\" && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n\n d.onBecomeStale_();\n }\n\n d.dependenciesState_ = IDerivationState_.STALE_;\n }); // invariantLOS(observable, \"changed end\");\n} // Called by ComputedValue when it recalculate and its value changed\n\nfunction propagateChangeConfirmed(observable) {\n // invariantLOS(observable, \"confirmed start\");\n if (observable.lowestObserverState_ === IDerivationState_.STALE_) return;\n observable.lowestObserverState_ = IDerivationState_.STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.POSSIBLY_STALE_) d.dependenciesState_ = IDerivationState_.STALE_;else if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_ // this happens during computing of `d`, just keep lowestObserverState up to date.\n ) observable.lowestObserverState_ = IDerivationState_.UP_TO_DATE_;\n }); // invariantLOS(observable, \"confirmed end\");\n} // Used by computed when its dependency changed, but we don't wan't to immediately recompute.\n\nfunction propagateMaybeChanged(observable) {\n // invariantLOS(observable, \"maybe start\");\n if (observable.lowestObserverState_ !== IDerivationState_.UP_TO_DATE_) return;\n observable.lowestObserverState_ = IDerivationState_.POSSIBLY_STALE_;\n observable.observers_.forEach(function (d) {\n if (d.dependenciesState_ === IDerivationState_.UP_TO_DATE_) {\n d.dependenciesState_ = IDerivationState_.POSSIBLY_STALE_;\n\n if (process.env.NODE_ENV !== \"production\" && d.isTracing_ !== TraceMode.NONE) {\n logTraceInfo(d, observable);\n }\n\n d.onBecomeStale_();\n }\n }); // invariantLOS(observable, \"maybe end\");\n}\n\nfunction logTraceInfo(derivation, observable) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' is invalidated due to a change in: '\" + observable.name_ + \"'\");\n\n if (derivation.isTracing_ === TraceMode.BREAK) {\n var lines = [];\n printDepTree(getDependencyTree(derivation), lines, 1); // prettier-ignore\n\n new Function(\"debugger;\\n/*\\nTracing '\" + derivation.name_ + \"'\\n\\nYou are entering this break point because derivation '\" + derivation.name_ + \"' is being traced and '\" + observable.name_ + \"' is now forcing it to update.\\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\\n\\n\" + (derivation instanceof ComputedValue ? derivation.derivation.toString().replace(/[*]\\//g, \"/\") : \"\") + \"\\n\\nThe dependencies for this derivation are:\\n\\n\" + lines.join(\"\\n\") + \"\\n*/\\n \")();\n }\n}\n\nfunction printDepTree(tree, lines, depth) {\n if (lines.length >= 1000) {\n lines.push(\"(and many more)\");\n return;\n }\n\n lines.push(\"\" + new Array(depth).join(\"\\t\") + tree.name); // MWE: not the fastest, but the easiest way :)\n\n if (tree.dependencies) tree.dependencies.forEach(function (child) {\n return printDepTree(child, lines, depth + 1);\n });\n}\n\nvar Reaction = /*#__PURE__*/function () {\n // nodes we are looking at. Our value depends on these nodes\n function Reaction(name_, onInvalidate_, errorHandler_, requiresObservable_) {\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"Reaction@\" + getNextId() : \"Reaction\";\n }\n\n if (requiresObservable_ === void 0) {\n requiresObservable_ = false;\n }\n\n this.name_ = void 0;\n this.onInvalidate_ = void 0;\n this.errorHandler_ = void 0;\n this.requiresObservable_ = void 0;\n this.observing_ = [];\n this.newObserving_ = [];\n this.dependenciesState_ = IDerivationState_.NOT_TRACKING_;\n this.diffValue_ = 0;\n this.runId_ = 0;\n this.unboundDepsCount_ = 0;\n this.isDisposed_ = false;\n this.isScheduled_ = false;\n this.isTrackPending_ = false;\n this.isRunning_ = false;\n this.isTracing_ = TraceMode.NONE;\n this.name_ = name_;\n this.onInvalidate_ = onInvalidate_;\n this.errorHandler_ = errorHandler_;\n this.requiresObservable_ = requiresObservable_;\n }\n\n var _proto = Reaction.prototype;\n\n _proto.onBecomeStale_ = function onBecomeStale_() {\n this.schedule_();\n };\n\n _proto.schedule_ = function schedule_() {\n if (!this.isScheduled_) {\n this.isScheduled_ = true;\n globalState.pendingReactions.push(this);\n runReactions();\n }\n };\n\n _proto.isScheduled = function isScheduled() {\n return this.isScheduled_;\n }\n /**\r\n * internal, use schedule() if you intend to kick off a reaction\r\n */\n ;\n\n _proto.runReaction_ = function runReaction_() {\n if (!this.isDisposed_) {\n startBatch();\n this.isScheduled_ = false;\n var prev = globalState.trackingContext;\n globalState.trackingContext = this;\n\n if (shouldCompute(this)) {\n this.isTrackPending_ = true;\n\n try {\n this.onInvalidate_();\n\n if (process.env.NODE_ENV !== \"production\" && this.isTrackPending_ && isSpyEnabled()) {\n // onInvalidate didn't trigger track right away..\n spyReport({\n name: this.name_,\n type: \"scheduled-reaction\"\n });\n }\n } catch (e) {\n this.reportExceptionInDerivation_(e);\n }\n }\n\n globalState.trackingContext = prev;\n endBatch();\n }\n };\n\n _proto.track = function track(fn) {\n if (this.isDisposed_) {\n return; // console.warn(\"Reaction already disposed\") // Note: Not a warning / error in mobx 4 either\n }\n\n startBatch();\n var notify = isSpyEnabled();\n var startTime;\n\n if (process.env.NODE_ENV !== \"production\" && notify) {\n startTime = Date.now();\n spyReportStart({\n name: this.name_,\n type: \"reaction\"\n });\n }\n\n this.isRunning_ = true;\n var prevReaction = globalState.trackingContext; // reactions could create reactions...\n\n globalState.trackingContext = this;\n var result = trackDerivedFunction(this, fn, undefined);\n globalState.trackingContext = prevReaction;\n this.isRunning_ = false;\n this.isTrackPending_ = false;\n\n if (this.isDisposed_) {\n // disposed during last run. Clean up everything that was bound after the dispose call.\n clearObserving(this);\n }\n\n if (isCaughtException(result)) this.reportExceptionInDerivation_(result.cause);\n\n if (process.env.NODE_ENV !== \"production\" && notify) {\n spyReportEnd({\n time: Date.now() - startTime\n });\n }\n\n endBatch();\n };\n\n _proto.reportExceptionInDerivation_ = function reportExceptionInDerivation_(error) {\n var _this = this;\n\n if (this.errorHandler_) {\n this.errorHandler_(error, this);\n return;\n }\n\n if (globalState.disableErrorBoundaries) throw error;\n var message = process.env.NODE_ENV !== \"production\" ? \"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '\" + this + \"'\" : \"[mobx] uncaught error in '\" + this + \"'\";\n\n if (!globalState.suppressReactionErrors) {\n console.error(message, error);\n /** If debugging brought you here, please, read the above message :-). Tnx! */\n } else if (process.env.NODE_ENV !== \"production\") console.warn(\"[mobx] (error in reaction '\" + this.name_ + \"' suppressed, fix error of causing action below)\"); // prettier-ignore\n\n\n if (process.env.NODE_ENV !== \"production\" && isSpyEnabled()) {\n spyReport({\n type: \"error\",\n name: this.name_,\n message: message,\n error: \"\" + error\n });\n }\n\n globalState.globalReactionErrorHandlers.forEach(function (f) {\n return f(error, _this);\n });\n };\n\n _proto.dispose = function dispose() {\n if (!this.isDisposed_) {\n this.isDisposed_ = true;\n\n if (!this.isRunning_) {\n // if disposed while running, clean up later. Maybe not optimal, but rare case\n startBatch();\n clearObserving(this);\n endBatch();\n }\n }\n };\n\n _proto.getDisposer_ = function getDisposer_() {\n var r = this.dispose.bind(this);\n r[$mobx] = this;\n return r;\n };\n\n _proto.toString = function toString() {\n return \"Reaction[\" + this.name_ + \"]\";\n };\n\n _proto.trace = function trace$1(enterBreakPoint) {\n if (enterBreakPoint === void 0) {\n enterBreakPoint = false;\n }\n\n trace(this, enterBreakPoint);\n };\n\n return Reaction;\n}();\nfunction onReactionError(handler) {\n globalState.globalReactionErrorHandlers.push(handler);\n return function () {\n var idx = globalState.globalReactionErrorHandlers.indexOf(handler);\n if (idx >= 0) globalState.globalReactionErrorHandlers.splice(idx, 1);\n };\n}\n/**\r\n * Magic number alert!\r\n * Defines within how many times a reaction is allowed to re-trigger itself\r\n * until it is assumed that this is gonna be a never ending loop...\r\n */\n\nvar MAX_REACTION_ITERATIONS = 100;\n\nvar reactionScheduler = function reactionScheduler(f) {\n return f();\n};\n\nfunction runReactions() {\n // Trampolining, if runReactions are already running, new reactions will be picked up\n if (globalState.inBatch > 0 || globalState.isRunningReactions) return;\n reactionScheduler(runReactionsHelper);\n}\n\nfunction runReactionsHelper() {\n globalState.isRunningReactions = true;\n var allReactions = globalState.pendingReactions;\n var iterations = 0; // While running reactions, new reactions might be triggered.\n // Hence we work with two variables and check whether\n // we converge to no remaining reactions after a while.\n\n while (allReactions.length > 0) {\n if (++iterations === MAX_REACTION_ITERATIONS) {\n console.error(process.env.NODE_ENV !== \"production\" ? \"Reaction doesn't converge to a stable state after \" + MAX_REACTION_ITERATIONS + \" iterations.\" + (\" Probably there is a cycle in the reactive function: \" + allReactions[0]) : \"[mobx] cycle in reaction: \" + allReactions[0]);\n allReactions.splice(0); // clear reactions\n }\n\n var remainingReactions = allReactions.splice(0);\n\n for (var i = 0, l = remainingReactions.length; i < l; i++) {\n remainingReactions[i].runReaction_();\n }\n }\n\n globalState.isRunningReactions = false;\n}\n\nvar isReaction = /*#__PURE__*/createInstanceofPredicate(\"Reaction\", Reaction);\nfunction setReactionScheduler(fn) {\n var baseScheduler = reactionScheduler;\n\n reactionScheduler = function reactionScheduler(f) {\n return fn(function () {\n return baseScheduler(f);\n });\n };\n}\n\nfunction isSpyEnabled() {\n return process.env.NODE_ENV !== \"production\" && !!globalState.spyListeners.length;\n}\nfunction spyReport(event) {\n if (!(process.env.NODE_ENV !== \"production\")) return; // dead code elimination can do the rest\n\n if (!globalState.spyListeners.length) return;\n var listeners = globalState.spyListeners;\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](event);\n }\n}\nfunction spyReportStart(event) {\n if (!(process.env.NODE_ENV !== \"production\")) return;\n\n var change = _extends({}, event, {\n spyReportStart: true\n });\n\n spyReport(change);\n}\nvar END_EVENT = {\n type: \"report-end\",\n spyReportEnd: true\n};\nfunction spyReportEnd(change) {\n if (!(process.env.NODE_ENV !== \"production\")) return;\n if (change) spyReport(_extends({}, change, {\n type: \"report-end\",\n spyReportEnd: true\n }));else spyReport(END_EVENT);\n}\nfunction spy(listener) {\n if (!(process.env.NODE_ENV !== \"production\")) {\n console.warn(\"[mobx.spy] Is a no-op in production builds\");\n return function () {};\n } else {\n globalState.spyListeners.push(listener);\n return once(function () {\n globalState.spyListeners = globalState.spyListeners.filter(function (l) {\n return l !== listener;\n });\n });\n }\n}\n\nvar ACTION = \"action\";\nvar ACTION_BOUND = \"action.bound\";\nvar AUTOACTION = \"autoAction\";\nvar AUTOACTION_BOUND = \"autoAction.bound\";\nvar DEFAULT_ACTION_NAME = \"<unnamed action>\";\nvar actionAnnotation = /*#__PURE__*/createActionAnnotation(ACTION);\nvar actionBoundAnnotation = /*#__PURE__*/createActionAnnotation(ACTION_BOUND, {\n bound: true\n});\nvar autoActionAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION, {\n autoAction: true\n});\nvar autoActionBoundAnnotation = /*#__PURE__*/createActionAnnotation(AUTOACTION_BOUND, {\n autoAction: true,\n bound: true\n});\n\nfunction createActionFactory(autoAction) {\n var res = function action(arg1, arg2) {\n // action(fn() {})\n if (isFunction(arg1)) return createAction(arg1.name || DEFAULT_ACTION_NAME, arg1, autoAction); // action(\"name\", fn() {})\n\n if (isFunction(arg2)) return createAction(arg1, arg2, autoAction); // @action\n\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, autoAction ? autoActionAnnotation : actionAnnotation);\n } // action(\"name\") & @action(\"name\")\n\n\n if (isStringish(arg1)) {\n return createDecoratorAnnotation(createActionAnnotation(autoAction ? AUTOACTION : ACTION, {\n name: arg1,\n autoAction: autoAction\n }));\n }\n\n if (process.env.NODE_ENV !== \"production\") die(\"Invalid arguments for `action`\");\n };\n\n return res;\n}\n\nvar action = /*#__PURE__*/createActionFactory(false);\nObject.assign(action, actionAnnotation);\nvar autoAction = /*#__PURE__*/createActionFactory(true);\nObject.assign(autoAction, autoActionAnnotation);\naction.bound = /*#__PURE__*/createDecoratorAnnotation(actionBoundAnnotation);\nautoAction.bound = /*#__PURE__*/createDecoratorAnnotation(autoActionBoundAnnotation);\nfunction runInAction(fn) {\n return executeAction(fn.name || DEFAULT_ACTION_NAME, false, fn, this, undefined);\n}\nfunction isAction(thing) {\n return isFunction(thing) && thing.isMobxAction === true;\n}\n\n/**\r\n * Creates a named reactive view and keeps it alive, so that the view is always\r\n * updated if one of the dependencies changes, even when the view is not further used by something else.\r\n * @param view The reactive view\r\n * @returns disposer function, which can be used to stop the view from being updated in the future.\r\n */\n\nfunction autorun(view, opts) {\n var _opts$name, _opts;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(view)) die(\"Autorun expects a function as first argument\");\n if (isAction(view)) die(\"Autorun does not accept actions since actions are untrackable\");\n }\n\n var name = (_opts$name = (_opts = opts) == null ? void 0 : _opts.name) != null ? _opts$name : process.env.NODE_ENV !== \"production\" ? view.name || \"Autorun@\" + getNextId() : \"Autorun\";\n var runSync = !opts.scheduler && !opts.delay;\n var reaction;\n\n if (runSync) {\n // normal autorun\n reaction = new Reaction(name, function () {\n this.track(reactionRunner);\n }, opts.onError, opts.requiresObservable);\n } else {\n var scheduler = createSchedulerFromOptions(opts); // debounced autorun\n\n var isScheduled = false;\n reaction = new Reaction(name, function () {\n if (!isScheduled) {\n isScheduled = true;\n scheduler(function () {\n isScheduled = false;\n if (!reaction.isDisposed_) reaction.track(reactionRunner);\n });\n }\n }, opts.onError, opts.requiresObservable);\n }\n\n function reactionRunner() {\n view(reaction);\n }\n\n reaction.schedule_();\n return reaction.getDisposer_();\n}\n\nvar run = function run(f) {\n return f();\n};\n\nfunction createSchedulerFromOptions(opts) {\n return opts.scheduler ? opts.scheduler : opts.delay ? function (f) {\n return setTimeout(f, opts.delay);\n } : run;\n}\n\nfunction reaction(expression, effect, opts) {\n var _opts$name2;\n\n if (opts === void 0) {\n opts = EMPTY_OBJECT;\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isFunction(expression) || !isFunction(effect)) die(\"First and second argument to reaction should be functions\");\n if (!isPlainObject(opts)) die(\"Third argument of reactions should be an object\");\n }\n\n var name = (_opts$name2 = opts.name) != null ? _opts$name2 : process.env.NODE_ENV !== \"production\" ? \"Reaction@\" + getNextId() : \"Reaction\";\n var effectAction = action(name, opts.onError ? wrapErrorHandler(opts.onError, effect) : effect);\n var runSync = !opts.scheduler && !opts.delay;\n var scheduler = createSchedulerFromOptions(opts);\n var firstTime = true;\n var isScheduled = false;\n var value;\n var oldValue = undefined; // only an issue with fireImmediately\n\n var equals = opts.compareStructural ? comparer.structural : opts.equals || comparer[\"default\"];\n var r = new Reaction(name, function () {\n if (firstTime || runSync) {\n reactionRunner();\n } else if (!isScheduled) {\n isScheduled = true;\n scheduler(reactionRunner);\n }\n }, opts.onError, opts.requiresObservable);\n\n function reactionRunner() {\n isScheduled = false;\n if (r.isDisposed_) return;\n var changed = false;\n r.track(function () {\n var nextValue = allowStateChanges(false, function () {\n return expression(r);\n });\n changed = firstTime || !equals(value, nextValue);\n oldValue = value;\n value = nextValue;\n });\n if (firstTime && opts.fireImmediately) effectAction(value, oldValue, r);else if (!firstTime && changed) effectAction(value, oldValue, r);\n firstTime = false;\n }\n\n r.schedule_();\n return r.getDisposer_();\n}\n\nfunction wrapErrorHandler(errorHandler, baseFn) {\n return function () {\n try {\n return baseFn.apply(this, arguments);\n } catch (e) {\n errorHandler.call(this, e);\n }\n };\n}\n\nvar ON_BECOME_OBSERVED = \"onBO\";\nvar ON_BECOME_UNOBSERVED = \"onBUO\";\nfunction onBecomeObserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_OBSERVED, thing, arg2, arg3);\n}\nfunction onBecomeUnobserved(thing, arg2, arg3) {\n return interceptHook(ON_BECOME_UNOBSERVED, thing, arg2, arg3);\n}\n\nfunction interceptHook(hook, thing, arg2, arg3) {\n var atom = typeof arg3 === \"function\" ? getAtom(thing, arg2) : getAtom(thing);\n var cb = isFunction(arg3) ? arg3 : arg2;\n var listenersKey = hook + \"L\";\n\n if (atom[listenersKey]) {\n atom[listenersKey].add(cb);\n } else {\n atom[listenersKey] = new Set([cb]);\n }\n\n return function () {\n var hookListeners = atom[listenersKey];\n\n if (hookListeners) {\n hookListeners[\"delete\"](cb);\n\n if (hookListeners.size === 0) {\n delete atom[listenersKey];\n }\n }\n };\n}\n\nvar NEVER = \"never\";\nvar ALWAYS = \"always\";\nvar OBSERVED = \"observed\"; // const IF_AVAILABLE = \"ifavailable\"\n\nfunction configure(options) {\n if (options.isolateGlobalState === true) {\n isolateGlobalState();\n }\n\n var useProxies = options.useProxies,\n enforceActions = options.enforceActions;\n\n if (useProxies !== undefined) {\n globalState.useProxies = useProxies === ALWAYS ? true : useProxies === NEVER ? false : typeof Proxy !== \"undefined\";\n }\n\n if (useProxies === \"ifavailable\") globalState.verifyProxies = true;\n\n if (enforceActions !== undefined) {\n var ea = enforceActions === ALWAYS ? ALWAYS : enforceActions === OBSERVED;\n globalState.enforceActions = ea;\n globalState.allowStateChanges = ea === true || ea === ALWAYS ? false : true;\n }\n [\"computedRequiresReaction\", \"reactionRequiresObservable\", \"observableRequiresReaction\", \"disableErrorBoundaries\", \"safeDescriptors\"].forEach(function (key) {\n if (key in options) globalState[key] = !!options[key];\n });\n globalState.allowStateReads = !globalState.observableRequiresReaction;\n\n if (process.env.NODE_ENV !== \"production\" && globalState.disableErrorBoundaries === true) {\n console.warn(\"WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled.\");\n }\n\n if (options.reactionScheduler) {\n setReactionScheduler(options.reactionScheduler);\n }\n}\n\nfunction extendObservable(target, properties, annotations, options) {\n if (process.env.NODE_ENV !== \"production\") {\n if (arguments.length > 4) die(\"'extendObservable' expected 2-4 arguments\");\n if (typeof target !== \"object\") die(\"'extendObservable' expects an object as first argument\");\n if (isObservableMap(target)) die(\"'extendObservable' should not be used on maps, use map.merge instead\");\n if (!isPlainObject(properties)) die(\"'extendObservabe' only accepts plain objects as second argument\");\n if (isObservable(properties) || isObservable(annotations)) die(\"Extending an object with another observable (object) is not supported\");\n } // Pull descriptors first, so we don't have to deal with props added by administration ($mobx)\n\n\n var descriptors = getOwnPropertyDescriptors(properties);\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n ownKeys(descriptors).forEach(function (key) {\n adm.extend_(key, descriptors[key], // must pass \"undefined\" for { key: undefined }\n !annotations ? true : key in annotations ? annotations[key] : true);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nfunction getDependencyTree(thing, property) {\n return nodeToDependencyTree(getAtom(thing, property));\n}\n\nfunction nodeToDependencyTree(node) {\n var result = {\n name: node.name_\n };\n if (node.observing_ && node.observing_.length > 0) result.dependencies = unique(node.observing_).map(nodeToDependencyTree);\n return result;\n}\n\nfunction getObserverTree(thing, property) {\n return nodeToObserverTree(getAtom(thing, property));\n}\n\nfunction nodeToObserverTree(node) {\n var result = {\n name: node.name_\n };\n if (hasObservers(node)) result.observers = Array.from(getObservers(node)).map(nodeToObserverTree);\n return result;\n}\n\nfunction unique(list) {\n return Array.from(new Set(list));\n}\n\nvar generatorId = 0;\nfunction FlowCancellationError() {\n this.message = \"FLOW_CANCELLED\";\n}\nFlowCancellationError.prototype = /*#__PURE__*/Object.create(Error.prototype);\nfunction isFlowCancellationError(error) {\n return error instanceof FlowCancellationError;\n}\nvar flowAnnotation = /*#__PURE__*/createFlowAnnotation(\"flow\");\nvar flow = /*#__PURE__*/Object.assign(function flow(arg1, arg2) {\n // @flow\n if (isStringish(arg2)) {\n return storeAnnotation(arg1, arg2, flowAnnotation);\n } // flow(fn)\n\n\n if (process.env.NODE_ENV !== \"production\" && arguments.length !== 1) die(\"Flow expects single argument with generator function\");\n var generator = arg1;\n var name = generator.name || \"<unnamed flow>\"; // Implementation based on https://github.com/tj/co/blob/master/index.js\n\n var res = function res() {\n var ctx = this;\n var args = arguments;\n var runId = ++generatorId;\n var gen = action(name + \" - runid: \" + runId + \" - init\", generator).apply(ctx, args);\n var rejector;\n var pendingPromise = undefined;\n var promise = new Promise(function (resolve, reject) {\n var stepId = 0;\n rejector = reject;\n\n function onFulfilled(res) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen.next).call(gen, res);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function onRejected(err) {\n pendingPromise = undefined;\n var ret;\n\n try {\n ret = action(name + \" - runid: \" + runId + \" - yield \" + stepId++, gen[\"throw\"]).call(gen, err);\n } catch (e) {\n return reject(e);\n }\n\n next(ret);\n }\n\n function next(ret) {\n if (isFunction(ret == null ? void 0 : ret.then)) {\n // an async iterator\n ret.then(next, reject);\n return;\n }\n\n if (ret.done) return resolve(ret.value);\n pendingPromise = Promise.resolve(ret.value);\n return pendingPromise.then(onFulfilled, onRejected);\n }\n\n onFulfilled(undefined); // kick off the process\n });\n promise.cancel = action(name + \" - runid: \" + runId + \" - cancel\", function () {\n try {\n if (pendingPromise) cancelPromise(pendingPromise); // Finally block can return (or yield) stuff..\n\n var _res = gen[\"return\"](undefined); // eat anything that promise would do, it's cancelled!\n\n\n var yieldedPromise = Promise.resolve(_res.value);\n yieldedPromise.then(noop, noop);\n cancelPromise(yieldedPromise); // maybe it can be cancelled :)\n // reject our original promise\n\n rejector(new FlowCancellationError());\n } catch (e) {\n rejector(e); // there could be a throwing finally block\n }\n });\n return promise;\n };\n\n res.isMobXFlow = true;\n return res;\n}, flowAnnotation);\n\nfunction cancelPromise(promise) {\n if (isFunction(promise.cancel)) promise.cancel();\n}\n\nfunction flowResult(result) {\n return result; // just tricking TypeScript :)\n}\nfunction isFlow(fn) {\n return (fn == null ? void 0 : fn.isMobXFlow) === true;\n}\n\nfunction interceptReads(thing, propOrHandler, handler) {\n var target;\n\n if (isObservableMap(thing) || isObservableArray(thing) || isObservableValue(thing)) {\n target = getAdministration(thing);\n } else if (isObservableObject(thing)) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propOrHandler)) return die(\"InterceptReads can only be used with a specific property, not with an object in general\");\n target = getAdministration(thing, propOrHandler);\n } else if (process.env.NODE_ENV !== \"production\") {\n return die(\"Expected observable map, object or array as first array\");\n }\n\n if (process.env.NODE_ENV !== \"production\" && target.dehancer !== undefined) return die(\"An intercept reader was already established\");\n target.dehancer = typeof propOrHandler === \"function\" ? propOrHandler : handler;\n return function () {\n target.dehancer = undefined;\n };\n}\n\nfunction intercept(thing, propOrHandler, handler) {\n if (isFunction(handler)) return interceptProperty(thing, propOrHandler, handler);else return interceptInterceptable(thing, propOrHandler);\n}\n\nfunction interceptInterceptable(thing, handler) {\n return getAdministration(thing).intercept_(handler);\n}\n\nfunction interceptProperty(thing, property, handler) {\n return getAdministration(thing, property).intercept_(handler);\n}\n\nfunction _isComputed(value, property) {\n if (property !== undefined) {\n if (isObservableObject(value) === false) return false;\n if (!value[$mobx].values_.has(property)) return false;\n var atom = getAtom(value, property);\n return isComputedValue(atom);\n }\n\n return isComputedValue(value);\n}\nfunction isComputed(value) {\n if (process.env.NODE_ENV !== \"production\" && arguments.length > 1) return die(\"isComputed expects only 1 argument. Use isComputedProp to inspect the observability of a property\");\n return _isComputed(value);\n}\nfunction isComputedProp(value, propName) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propName)) return die(\"isComputed expected a property name as second argument\");\n return _isComputed(value, propName);\n}\n\nfunction _isObservable(value, property) {\n if (!value) return false;\n\n if (property !== undefined) {\n if (process.env.NODE_ENV !== \"production\" && (isObservableMap(value) || isObservableArray(value))) return die(\"isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.\");\n\n if (isObservableObject(value)) {\n return value[$mobx].values_.has(property);\n }\n\n return false;\n } // For first check, see #701\n\n\n return isObservableObject(value) || !!value[$mobx] || isAtom(value) || isReaction(value) || isComputedValue(value);\n}\n\nfunction isObservable(value) {\n if (process.env.NODE_ENV !== \"production\" && arguments.length !== 1) die(\"isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property\");\n return _isObservable(value);\n}\nfunction isObservableProp(value, propName) {\n if (process.env.NODE_ENV !== \"production\" && !isStringish(propName)) return die(\"expected a property name as second argument\");\n return _isObservable(value, propName);\n}\n\nfunction keys(obj) {\n if (isObservableObject(obj)) {\n return obj[$mobx].keys_();\n }\n\n if (isObservableMap(obj) || isObservableSet(obj)) {\n return Array.from(obj.keys());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (_, index) {\n return index;\n });\n }\n\n die(5);\n}\nfunction values(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return obj[key];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return obj.get(key);\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.values());\n }\n\n if (isObservableArray(obj)) {\n return obj.slice();\n }\n\n die(6);\n}\nfunction entries(obj) {\n if (isObservableObject(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj[key]];\n });\n }\n\n if (isObservableMap(obj)) {\n return keys(obj).map(function (key) {\n return [key, obj.get(key)];\n });\n }\n\n if (isObservableSet(obj)) {\n return Array.from(obj.entries());\n }\n\n if (isObservableArray(obj)) {\n return obj.map(function (key, index) {\n return [index, key];\n });\n }\n\n die(7);\n}\nfunction set(obj, key, value) {\n if (arguments.length === 2 && !isObservableSet(obj)) {\n startBatch();\n var _values = key;\n\n try {\n for (var _key in _values) {\n set(obj, _key, _values[_key]);\n }\n } finally {\n endBatch();\n }\n\n return;\n }\n\n if (isObservableObject(obj)) {\n obj[$mobx].set_(key, value);\n } else if (isObservableMap(obj)) {\n obj.set(key, value);\n } else if (isObservableSet(obj)) {\n obj.add(key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") key = parseInt(key, 10);\n if (key < 0) die(\"Invalid index: '\" + key + \"'\");\n startBatch();\n if (key >= obj.length) obj.length = key + 1;\n obj[key] = value;\n endBatch();\n } else die(8);\n}\nfunction remove(obj, key) {\n if (isObservableObject(obj)) {\n obj[$mobx].delete_(key);\n } else if (isObservableMap(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableSet(obj)) {\n obj[\"delete\"](key);\n } else if (isObservableArray(obj)) {\n if (typeof key !== \"number\") key = parseInt(key, 10);\n obj.splice(key, 1);\n } else {\n die(9);\n }\n}\nfunction has(obj, key) {\n if (isObservableObject(obj)) {\n return obj[$mobx].has_(key);\n } else if (isObservableMap(obj)) {\n return obj.has(key);\n } else if (isObservableSet(obj)) {\n return obj.has(key);\n } else if (isObservableArray(obj)) {\n return key >= 0 && key < obj.length;\n }\n\n die(10);\n}\nfunction get(obj, key) {\n if (!has(obj, key)) return undefined;\n\n if (isObservableObject(obj)) {\n return obj[$mobx].get_(key);\n } else if (isObservableMap(obj)) {\n return obj.get(key);\n } else if (isObservableArray(obj)) {\n return obj[key];\n }\n\n die(11);\n}\n\nfunction observe(thing, propOrCb, cbOrFire, fireImmediately) {\n if (isFunction(cbOrFire)) return observeObservableProperty(thing, propOrCb, cbOrFire, fireImmediately);else return observeObservable(thing, propOrCb, cbOrFire);\n}\n\nfunction observeObservable(thing, listener, fireImmediately) {\n return getAdministration(thing).observe_(listener, fireImmediately);\n}\n\nfunction observeObservableProperty(thing, property, listener, fireImmediately) {\n return getAdministration(thing, property).observe_(listener, fireImmediately);\n}\n\nfunction cache(map, key, value) {\n map.set(key, value);\n return value;\n}\n\nfunction toJSHelper(source, __alreadySeen) {\n if (source == null || typeof source !== \"object\" || source instanceof Date || !isObservable(source)) return source;\n if (isObservableValue(source)) return toJSHelper(source.get(), __alreadySeen);\n\n if (__alreadySeen.has(source)) {\n return __alreadySeen.get(source);\n }\n\n if (isObservableArray(source)) {\n var res = cache(__alreadySeen, source, new Array(source.length));\n source.forEach(function (value, idx) {\n res[idx] = toJSHelper(value, __alreadySeen);\n });\n return res;\n }\n\n if (isObservableSet(source)) {\n var _res = cache(__alreadySeen, source, new Set());\n\n source.forEach(function (value) {\n _res.add(toJSHelper(value, __alreadySeen));\n });\n return _res;\n }\n\n if (isObservableMap(source)) {\n var _res2 = cache(__alreadySeen, source, new Map());\n\n source.forEach(function (value, key) {\n _res2.set(key, toJSHelper(value, __alreadySeen));\n });\n return _res2;\n } else {\n // must be observable object\n keys(source); // make sure keys are observed\n\n var _res3 = cache(__alreadySeen, source, {});\n\n getPlainObjectKeys(source).forEach(function (key) {\n _res3[key] = toJSHelper(source[key], __alreadySeen);\n });\n return _res3;\n }\n}\n/**\r\n * Basically, a deep clone, so that no reactive property will exist anymore.\r\n */\n\n\nfunction toJS(source, options) {\n if (process.env.NODE_ENV !== \"production\" && options) die(\"toJS no longer supports options\");\n return toJSHelper(source, new Map());\n}\n\nfunction trace() {\n if (!(process.env.NODE_ENV !== \"production\")) die(\"trace() is not available in production builds\");\n var enterBreakPoint = false;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (typeof args[args.length - 1] === \"boolean\") enterBreakPoint = args.pop();\n var derivation = getAtomFromArgs(args);\n\n if (!derivation) {\n return die(\"'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly\");\n }\n\n if (derivation.isTracing_ === TraceMode.NONE) {\n console.log(\"[mobx.trace] '\" + derivation.name_ + \"' tracing enabled\");\n }\n\n derivation.isTracing_ = enterBreakPoint ? TraceMode.BREAK : TraceMode.LOG;\n}\n\nfunction getAtomFromArgs(args) {\n switch (args.length) {\n case 0:\n return globalState.trackingDerivation;\n\n case 1:\n return getAtom(args[0]);\n\n case 2:\n return getAtom(args[0], args[1]);\n }\n}\n\n/**\r\n * During a transaction no views are updated until the end of the transaction.\r\n * The transaction will be run synchronously nonetheless.\r\n *\r\n * @param action a function that updates some reactive state\r\n * @returns any value that was returned by the 'action' parameter.\r\n */\n\nfunction transaction(action, thisArg) {\n if (thisArg === void 0) {\n thisArg = undefined;\n }\n\n startBatch();\n\n try {\n return action.apply(thisArg);\n } finally {\n endBatch();\n }\n}\n\nfunction when(predicate, arg1, arg2) {\n if (arguments.length === 1 || arg1 && typeof arg1 === \"object\") return whenPromise(predicate, arg1);\n return _when(predicate, arg1, arg2 || {});\n}\n\nfunction _when(predicate, effect, opts) {\n var timeoutHandle;\n\n if (typeof opts.timeout === \"number\") {\n timeoutHandle = setTimeout(function () {\n if (!disposer[$mobx].isDisposed_) {\n disposer();\n var error = new Error(\"WHEN_TIMEOUT\");\n if (opts.onError) opts.onError(error);else throw error;\n }\n }, opts.timeout);\n }\n\n opts.name = process.env.NODE_ENV !== \"production\" ? opts.name || \"When@\" + getNextId() : \"When\";\n var effectAction = createAction(process.env.NODE_ENV !== \"production\" ? opts.name + \"-effect\" : \"When-effect\", effect); // eslint-disable-next-line\n\n var disposer = autorun(function (r) {\n // predicate should not change state\n var cond = allowStateChanges(false, predicate);\n\n if (cond) {\n r.dispose();\n if (timeoutHandle) clearTimeout(timeoutHandle);\n effectAction();\n }\n }, opts);\n return disposer;\n}\n\nfunction whenPromise(predicate, opts) {\n if (process.env.NODE_ENV !== \"production\" && opts && opts.onError) return die(\"the options 'onError' and 'promise' cannot be combined\");\n var cancel;\n var res = new Promise(function (resolve, reject) {\n var disposer = _when(predicate, resolve, _extends({}, opts, {\n onError: reject\n }));\n\n cancel = function cancel() {\n disposer();\n reject(\"WHEN_CANCELLED\");\n };\n });\n res.cancel = cancel;\n return res;\n}\n\nfunction getAdm(target) {\n return target[$mobx];\n} // Optimization: we don't need the intermediate objects and could have a completely custom administration for DynamicObjects,\n// and skip either the internal values map, or the base object with its property descriptors!\n\n\nvar objectProxyTraps = {\n has: function has(target, name) {\n if (process.env.NODE_ENV !== \"production\" && globalState.trackingDerivation) warnAboutProxyRequirement(\"detect new properties using the 'in' operator. Use 'has' from 'mobx' instead.\");\n return getAdm(target).has_(name);\n },\n get: function get(target, name) {\n return getAdm(target).get_(name);\n },\n set: function set(target, name, value) {\n var _getAdm$set_;\n\n if (!isStringish(name)) return false;\n\n if (process.env.NODE_ENV !== \"production\" && !getAdm(target).values_.has(name)) {\n warnAboutProxyRequirement(\"add a new observable property through direct assignment. Use 'set' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$set_ = getAdm(target).set_(name, value, true)) != null ? _getAdm$set_ : true;\n },\n deleteProperty: function deleteProperty(target, name) {\n var _getAdm$delete_;\n\n if (process.env.NODE_ENV !== \"production\") {\n warnAboutProxyRequirement(\"delete properties from an observable object. Use 'remove' from 'mobx' instead.\");\n }\n\n if (!isStringish(name)) return false; // null (intercepted) -> true (success)\n\n return (_getAdm$delete_ = getAdm(target).delete_(name, true)) != null ? _getAdm$delete_ : true;\n },\n defineProperty: function defineProperty(target, name, descriptor) {\n var _getAdm$definePropert;\n\n if (process.env.NODE_ENV !== \"production\") {\n warnAboutProxyRequirement(\"define property on an observable object. Use 'defineProperty' from 'mobx' instead.\");\n } // null (intercepted) -> true (success)\n\n\n return (_getAdm$definePropert = getAdm(target).defineProperty_(name, descriptor)) != null ? _getAdm$definePropert : true;\n },\n ownKeys: function ownKeys(target) {\n if (process.env.NODE_ENV !== \"production\" && globalState.trackingDerivation) warnAboutProxyRequirement(\"iterate keys to detect added / removed properties. Use `keys` from 'mobx' instead.\");\n return getAdm(target).ownKeys_();\n },\n preventExtensions: function preventExtensions(target) {\n die(13);\n }\n};\nfunction asDynamicObservableObject(target, options) {\n var _target$$mobx, _target$$mobx$proxy_;\n\n assertProxies();\n target = asObservableObject(target, options);\n return (_target$$mobx$proxy_ = (_target$$mobx = target[$mobx]).proxy_) != null ? _target$$mobx$proxy_ : _target$$mobx.proxy_ = new Proxy(target, objectProxyTraps);\n}\n\nfunction hasInterceptors(interceptable) {\n return interceptable.interceptors_ !== undefined && interceptable.interceptors_.length > 0;\n}\nfunction registerInterceptor(interceptable, handler) {\n var interceptors = interceptable.interceptors_ || (interceptable.interceptors_ = []);\n interceptors.push(handler);\n return once(function () {\n var idx = interceptors.indexOf(handler);\n if (idx !== -1) interceptors.splice(idx, 1);\n });\n}\nfunction interceptChange(interceptable, change) {\n var prevU = untrackedStart();\n\n try {\n // Interceptor can modify the array, copy it to avoid concurrent modification, see #1950\n var interceptors = [].concat(interceptable.interceptors_ || []);\n\n for (var i = 0, l = interceptors.length; i < l; i++) {\n change = interceptors[i](change);\n if (change && !change.type) die(14);\n if (!change) break;\n }\n\n return change;\n } finally {\n untrackedEnd(prevU);\n }\n}\n\nfunction hasListeners(listenable) {\n return listenable.changeListeners_ !== undefined && listenable.changeListeners_.length > 0;\n}\nfunction registerListener(listenable, handler) {\n var listeners = listenable.changeListeners_ || (listenable.changeListeners_ = []);\n listeners.push(handler);\n return once(function () {\n var idx = listeners.indexOf(handler);\n if (idx !== -1) listeners.splice(idx, 1);\n });\n}\nfunction notifyListeners(listenable, change) {\n var prevU = untrackedStart();\n var listeners = listenable.changeListeners_;\n if (!listeners) return;\n listeners = listeners.slice();\n\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i](change);\n }\n\n untrackedEnd(prevU);\n}\n\nfunction makeObservable(target, annotations, options) {\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n var _annotations;\n\n // Default to decorators\n (_annotations = annotations) != null ? _annotations : annotations = collectStoredAnnotations(target); // Annotate\n\n ownKeys(annotations).forEach(function (key) {\n return adm.make_(key, annotations[key]);\n });\n } finally {\n endBatch();\n }\n\n return target;\n}\nfunction makeAutoObservable(target, overrides, options) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!isPlainObject(target) && !isPlainObject(Object.getPrototypeOf(target))) die(\"'makeAutoObservable' can only be used for classes that don't have a superclass\");\n if (isObservableObject(target)) die(\"makeAutoObservable can only be used on objects not already made observable\");\n } // Optimization (avoids visiting protos)\n // assumes that annotation.make_/.extend_ works the same for plain objects\n\n\n if (isPlainObject(target)) {\n return extendObservable(target, target, overrides, options);\n }\n\n var adm = asObservableObject(target, options)[$mobx];\n startBatch();\n\n try {\n // Use cached inferred annotations if available (only in classes)\n if (target[inferredAnnotationsSymbol]) {\n target[inferredAnnotationsSymbol].forEach(function (value, key) {\n return adm.make_(key, value);\n }); // Overrides are not cached, unless `true`, see #2832\n\n if (overrides) {\n ownKeys(overrides).forEach(function (key) {\n var annotation = overrides[key];\n\n if (annotation !== true) {\n adm.make_(key, annotation);\n }\n });\n }\n } else {\n var _ignoreKeys;\n\n var ignoreKeys = (_ignoreKeys = {}, _ignoreKeys[$mobx] = 1, _ignoreKeys[inferredAnnotationsSymbol] = 1, _ignoreKeys.constructor = 1, _ignoreKeys);\n\n var make = function make(key) {\n if (ignoreKeys[key]) return;\n ignoreKeys[key] = 1;\n adm.make_(key, // must pass \"undefined\" for { key: undefined }\n !overrides ? true : key in overrides ? overrides[key] : true);\n };\n\n var current = target;\n\n while (current && current !== objectPrototype) {\n ownKeys(current).forEach(make);\n current = Object.getPrototypeOf(current);\n }\n }\n } finally {\n endBatch();\n }\n\n return target;\n}\n\nvar SPLICE = \"splice\";\nvar UPDATE = \"update\";\nvar MAX_SPLICE_SIZE = 10000; // See e.g. https://github.com/mobxjs/mobx/issues/859\n\nvar arrayTraps = {\n get: function get(target, name) {\n var adm = target[$mobx];\n if (name === $mobx) return adm;\n if (name === \"length\") return adm.getArrayLength_();\n\n if (typeof name === \"string\" && !isNaN(name)) {\n return adm.get_(parseInt(name));\n }\n\n if (hasProp(arrayExtensions, name)) {\n return arrayExtensions[name];\n }\n\n return target[name];\n },\n set: function set(target, name, value) {\n var adm = target[$mobx];\n\n if (name === \"length\") {\n adm.setArrayLength_(value);\n }\n\n if (typeof name === \"symbol\" || isNaN(name)) {\n target[name] = value;\n } else {\n // numeric string\n adm.set_(parseInt(name), value);\n }\n\n return true;\n },\n preventExtensions: function preventExtensions() {\n die(15);\n }\n};\nvar ObservableArrayAdministration = /*#__PURE__*/function () {\n // this is the prop that gets proxied, so can't replace it!\n function ObservableArrayAdministration(name, enhancer, owned_, legacyMode_) {\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n\n this.owned_ = void 0;\n this.legacyMode_ = void 0;\n this.atom_ = void 0;\n this.values_ = [];\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.enhancer_ = void 0;\n this.dehancer = void 0;\n this.proxy_ = void 0;\n this.lastKnownLength_ = 0;\n this.owned_ = owned_;\n this.legacyMode_ = legacyMode_;\n this.atom_ = new Atom(name);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, process.env.NODE_ENV !== \"production\" ? name + \"[..]\" : \"ObservableArray[..]\");\n };\n }\n\n var _proto = ObservableArrayAdministration.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) return this.dehancer(value);\n return value;\n };\n\n _proto.dehanceValues_ = function dehanceValues_(values) {\n if (this.dehancer !== undefined && values.length > 0) return values.map(this.dehancer);\n return values;\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (fireImmediately === void 0) {\n fireImmediately = false;\n }\n\n if (fireImmediately) {\n listener({\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: \"splice\",\n index: 0,\n added: this.values_.slice(),\n addedCount: this.values_.length,\n removed: [],\n removedCount: 0\n });\n }\n\n return registerListener(this, listener);\n };\n\n _proto.getArrayLength_ = function getArrayLength_() {\n this.atom_.reportObserved();\n return this.values_.length;\n };\n\n _proto.setArrayLength_ = function setArrayLength_(newLength) {\n if (typeof newLength !== \"number\" || newLength < 0) die(\"Out of range: \" + newLength);\n var currentLength = this.values_.length;\n if (newLength === currentLength) return;else if (newLength > currentLength) {\n var newItems = new Array(newLength - currentLength);\n\n for (var i = 0; i < newLength - currentLength; i++) {\n newItems[i] = undefined;\n } // No Array.fill everywhere...\n\n\n this.spliceWithArray_(currentLength, 0, newItems);\n } else this.spliceWithArray_(newLength, currentLength - newLength);\n };\n\n _proto.updateArrayLength_ = function updateArrayLength_(oldLength, delta) {\n if (oldLength !== this.lastKnownLength_) die(16);\n this.lastKnownLength_ += delta;\n if (this.legacyMode_ && delta > 0) reserveArrayBuffer(oldLength + delta + 1);\n };\n\n _proto.spliceWithArray_ = function spliceWithArray_(index, deleteCount, newItems) {\n var _this = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n var length = this.values_.length;\n if (index === undefined) index = 0;else if (index > length) index = length;else if (index < 0) index = Math.max(0, length + index);\n if (arguments.length === 1) deleteCount = length - index;else if (deleteCount === undefined || deleteCount === null) deleteCount = 0;else deleteCount = Math.max(0, Math.min(deleteCount, length - index));\n if (newItems === undefined) newItems = EMPTY_ARRAY;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_,\n type: SPLICE,\n index: index,\n removedCount: deleteCount,\n added: newItems\n });\n if (!change) return EMPTY_ARRAY;\n deleteCount = change.removedCount;\n newItems = change.added;\n }\n\n newItems = newItems.length === 0 ? newItems : newItems.map(function (v) {\n return _this.enhancer_(v, undefined);\n });\n\n if (this.legacyMode_ || process.env.NODE_ENV !== \"production\") {\n var lengthDelta = newItems.length - deleteCount;\n this.updateArrayLength_(length, lengthDelta); // checks if internal array wasn't modified\n }\n\n var res = this.spliceItemsIntoValues_(index, deleteCount, newItems);\n if (deleteCount !== 0 || newItems.length !== 0) this.notifyArraySplice_(index, newItems, res);\n return this.dehanceValues_(res);\n };\n\n _proto.spliceItemsIntoValues_ = function spliceItemsIntoValues_(index, deleteCount, newItems) {\n if (newItems.length < MAX_SPLICE_SIZE) {\n var _this$values_;\n\n return (_this$values_ = this.values_).splice.apply(_this$values_, [index, deleteCount].concat(newItems));\n } else {\n var res = this.values_.slice(index, index + deleteCount);\n var oldItems = this.values_.slice(index + deleteCount);\n this.values_.length = index + newItems.length - deleteCount;\n\n for (var i = 0; i < newItems.length; i++) {\n this.values_[index + i] = newItems[i];\n }\n\n for (var _i = 0; _i < oldItems.length; _i++) {\n this.values_[index + newItems.length + _i] = oldItems[_i];\n }\n\n return res;\n }\n };\n\n _proto.notifyArrayChildUpdate_ = function notifyArrayChildUpdate_(index, newValue, oldValue) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n type: UPDATE,\n debugObjectName: this.atom_.name_,\n index: index,\n newValue: newValue,\n oldValue: oldValue\n } : null; // The reason why this is on right hand side here (and not above), is this way the uglifier will drop it, but it won't\n // cause any runtime overhead in development mode without NODE_ENV set, unless spying is enabled\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n this.atom_.reportChanged();\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n };\n\n _proto.notifyArraySplice_ = function notifyArraySplice_(index, added, removed) {\n var notifySpy = !this.owned_ && isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"array\",\n object: this.proxy_,\n debugObjectName: this.atom_.name_,\n type: SPLICE,\n index: index,\n removed: removed,\n added: added,\n removedCount: removed.length,\n addedCount: added.length\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n this.atom_.reportChanged(); // conform: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/observe\n\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n };\n\n _proto.get_ = function get_(index) {\n if (index < this.values_.length) {\n this.atom_.reportObserved();\n return this.dehanceValue_(this.values_[index]);\n }\n\n console.warn(process.env.NODE_ENV !== \"production\" ? \"[mobx] Out of bounds read: \" + index : \"[mobx.array] Attempt to read an array index (\" + index + \") that is out of bounds (\" + this.values_.length + \"). Please check length first. Out of bound indices will not be tracked by MobX\");\n };\n\n _proto.set_ = function set_(index, newValue) {\n var values = this.values_;\n\n if (index < values.length) {\n // update at index in range\n checkIfStateModificationsAreAllowed(this.atom_);\n var oldValue = values[index];\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_,\n index: index,\n newValue: newValue\n });\n if (!change) return;\n newValue = change.newValue;\n }\n\n newValue = this.enhancer_(newValue, oldValue);\n var changed = newValue !== oldValue;\n\n if (changed) {\n values[index] = newValue;\n this.notifyArrayChildUpdate_(index, newValue, oldValue);\n }\n } else if (index === values.length) {\n // add a new item\n this.spliceWithArray_(index, 0, [newValue]);\n } else {\n // out of bounds\n die(17, index, values.length);\n }\n };\n\n return ObservableArrayAdministration;\n}();\nfunction createObservableArray(initialValues, enhancer, name, owned) {\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n assertProxies();\n var adm = new ObservableArrayAdministration(name, enhancer, owned, false);\n addHiddenFinalProp(adm.values_, $mobx, adm);\n var proxy = new Proxy(adm.values_, arrayTraps);\n adm.proxy_ = proxy;\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true);\n adm.spliceWithArray_(0, 0, initialValues);\n allowStateChangesEnd(prev);\n }\n\n return proxy;\n} // eslint-disable-next-line\n\nvar arrayExtensions = {\n clear: function clear() {\n return this.splice(0);\n },\n replace: function replace(newItems) {\n var adm = this[$mobx];\n return adm.spliceWithArray_(0, adm.values_.length, newItems);\n },\n // Used by JSON.stringify\n toJSON: function toJSON() {\n return this.slice();\n },\n\n /*\r\n * functions that do alter the internal structure of the array, (based on lib.es6.d.ts)\r\n * since these functions alter the inner structure of the array, the have side effects.\r\n * Because the have side effects, they should not be used in computed function,\r\n * and for that reason the do not call dependencyState.notifyObserved\r\n */\n splice: function splice(index, deleteCount) {\n for (var _len = arguments.length, newItems = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n newItems[_key - 2] = arguments[_key];\n }\n\n var adm = this[$mobx];\n\n switch (arguments.length) {\n case 0:\n return [];\n\n case 1:\n return adm.spliceWithArray_(index);\n\n case 2:\n return adm.spliceWithArray_(index, deleteCount);\n }\n\n return adm.spliceWithArray_(index, deleteCount, newItems);\n },\n spliceWithArray: function spliceWithArray(index, deleteCount, newItems) {\n return this[$mobx].spliceWithArray_(index, deleteCount, newItems);\n },\n push: function push() {\n var adm = this[$mobx];\n\n for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n items[_key2] = arguments[_key2];\n }\n\n adm.spliceWithArray_(adm.values_.length, 0, items);\n return adm.values_.length;\n },\n pop: function pop() {\n return this.splice(Math.max(this[$mobx].values_.length - 1, 0), 1)[0];\n },\n shift: function shift() {\n return this.splice(0, 1)[0];\n },\n unshift: function unshift() {\n var adm = this[$mobx];\n\n for (var _len3 = arguments.length, items = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n items[_key3] = arguments[_key3];\n }\n\n adm.spliceWithArray_(0, 0, items);\n return adm.values_.length;\n },\n reverse: function reverse() {\n // reverse by default mutates in place before returning the result\n // which makes it both a 'derivation' and a 'mutation'.\n if (globalState.trackingDerivation) {\n die(37, \"reverse\");\n }\n\n this.replace(this.slice().reverse());\n return this;\n },\n sort: function sort() {\n // sort by default mutates in place before returning the result\n // which goes against all good practices. Let's not change the array in place!\n if (globalState.trackingDerivation) {\n die(37, \"sort\");\n }\n\n var copy = this.slice();\n copy.sort.apply(copy, arguments);\n this.replace(copy);\n return this;\n },\n remove: function remove(value) {\n var adm = this[$mobx];\n var idx = adm.dehanceValues_(adm.values_).indexOf(value);\n\n if (idx > -1) {\n this.splice(idx, 1);\n return true;\n }\n\n return false;\n }\n};\n/**\r\n * Wrap function from prototype\r\n * Without this, everything works as well, but this works\r\n * faster as everything works on unproxied values\r\n */\n\naddArrayExtension(\"concat\", simpleFunc);\naddArrayExtension(\"flat\", simpleFunc);\naddArrayExtension(\"includes\", simpleFunc);\naddArrayExtension(\"indexOf\", simpleFunc);\naddArrayExtension(\"join\", simpleFunc);\naddArrayExtension(\"lastIndexOf\", simpleFunc);\naddArrayExtension(\"slice\", simpleFunc);\naddArrayExtension(\"toString\", simpleFunc);\naddArrayExtension(\"toLocaleString\", simpleFunc); // map\n\naddArrayExtension(\"every\", mapLikeFunc);\naddArrayExtension(\"filter\", mapLikeFunc);\naddArrayExtension(\"find\", mapLikeFunc);\naddArrayExtension(\"findIndex\", mapLikeFunc);\naddArrayExtension(\"flatMap\", mapLikeFunc);\naddArrayExtension(\"forEach\", mapLikeFunc);\naddArrayExtension(\"map\", mapLikeFunc);\naddArrayExtension(\"some\", mapLikeFunc); // reduce\n\naddArrayExtension(\"reduce\", reduceLikeFunc);\naddArrayExtension(\"reduceRight\", reduceLikeFunc);\n\nfunction addArrayExtension(funcName, funcFactory) {\n if (typeof Array.prototype[funcName] === \"function\") {\n arrayExtensions[funcName] = funcFactory(funcName);\n }\n} // Report and delegate to dehanced array\n\n\nfunction simpleFunc(funcName) {\n return function () {\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction mapLikeFunc(funcName) {\n return function (callback, thisArg) {\n var _this2 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_);\n return dehancedValues[funcName](function (element, index) {\n return callback.call(thisArg, element, index, _this2);\n });\n };\n} // Make sure callbacks recieve correct array arg #2326\n\n\nfunction reduceLikeFunc(funcName) {\n return function () {\n var _this3 = this;\n\n var adm = this[$mobx];\n adm.atom_.reportObserved();\n var dehancedValues = adm.dehanceValues_(adm.values_); // #2432 - reduce behavior depends on arguments.length\n\n var callback = arguments[0];\n\n arguments[0] = function (accumulator, currentValue, index) {\n return callback(accumulator, currentValue, index, _this3);\n };\n\n return dehancedValues[funcName].apply(dehancedValues, arguments);\n };\n}\n\nvar isObservableArrayAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableArrayAdministration\", ObservableArrayAdministration);\nfunction isObservableArray(thing) {\n return isObject(thing) && isObservableArrayAdministration(thing[$mobx]);\n}\n\nvar _Symbol$iterator, _Symbol$toStringTag;\nvar ObservableMapMarker = {};\nvar ADD = \"add\";\nvar DELETE = \"delete\"; // just extend Map? See also https://gist.github.com/nestharus/13b4d74f2ef4a2f4357dbd3fc23c1e54\n// But: https://github.com/mobxjs/mobx/issues/1556\n\n_Symbol$iterator = Symbol.iterator;\n_Symbol$toStringTag = Symbol.toStringTag;\nvar ObservableMap = /*#__PURE__*/function () {\n // hasMap, not hashMap >-).\n function ObservableMap(initialData, enhancer_, name_) {\n if (enhancer_ === void 0) {\n enhancer_ = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableMap@\" + getNextId() : \"ObservableMap\";\n }\n\n this.enhancer_ = void 0;\n this.name_ = void 0;\n this[$mobx] = ObservableMapMarker;\n this.data_ = void 0;\n this.hasMap_ = void 0;\n this.keysAtom_ = void 0;\n this.interceptors_ = void 0;\n this.changeListeners_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = enhancer_;\n this.name_ = name_;\n\n if (!isFunction(Map)) {\n die(18);\n }\n\n this.keysAtom_ = createAtom(process.env.NODE_ENV !== \"production\" ? this.name_ + \".keys()\" : \"ObservableMap.keys()\");\n this.data_ = new Map();\n this.hasMap_ = new Map();\n this.merge(initialData);\n }\n\n var _proto = ObservableMap.prototype;\n\n _proto.has_ = function has_(key) {\n return this.data_.has(key);\n };\n\n _proto.has = function has(key) {\n var _this = this;\n\n if (!globalState.trackingDerivation) return this.has_(key);\n var entry = this.hasMap_.get(key);\n\n if (!entry) {\n var newEntry = entry = new ObservableValue(this.has_(key), referenceEnhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + stringifyKey(key) + \"?\" : \"ObservableMap.key?\", false);\n this.hasMap_.set(key, newEntry);\n onBecomeUnobserved(newEntry, function () {\n return _this.hasMap_[\"delete\"](key);\n });\n }\n\n return entry.get();\n };\n\n _proto.set = function set(key, value) {\n var hasKey = this.has_(key);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: hasKey ? UPDATE : ADD,\n object: this,\n newValue: value,\n name: key\n });\n if (!change) return this;\n value = change.newValue;\n }\n\n if (hasKey) {\n this.updateValue_(key, value);\n } else {\n this.addValue_(key, value);\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(key) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n name: key\n });\n if (!change) return false;\n }\n\n if (this.has_(key)) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: this.data_.get(key).value_,\n name: key\n } : null;\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(_change);\n transaction(function () {\n _this2.keysAtom_.reportChanged();\n\n _this2.updateHasMapEntry_(key, false);\n\n var observable = _this2.data_.get(key);\n\n observable.setNewValue_(undefined);\n\n _this2.data_[\"delete\"](key);\n });\n if (notify) notifyListeners(this, _change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n return true;\n }\n\n return false;\n };\n\n _proto.updateHasMapEntry_ = function updateHasMapEntry_(key, value) {\n var entry = this.hasMap_.get(key);\n\n if (entry) {\n entry.setNewValue_(value);\n }\n };\n\n _proto.updateValue_ = function updateValue_(key, newValue) {\n var observable = this.data_.get(key);\n newValue = observable.prepareNewValue_(newValue);\n\n if (newValue !== globalState.UNCHANGED) {\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: UPDATE,\n object: this,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n observable.setNewValue_(newValue);\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n };\n\n _proto.addValue_ = function addValue_(key, newValue) {\n var _this3 = this;\n\n checkIfStateModificationsAreAllowed(this.keysAtom_);\n transaction(function () {\n var observable = new ObservableValue(newValue, _this3.enhancer_, process.env.NODE_ENV !== \"production\" ? _this3.name_ + \".\" + stringifyKey(key) : \"ObservableMap.key\", false);\n\n _this3.data_.set(key, observable);\n\n newValue = observable.value_; // value might have been changed\n\n _this3.updateHasMapEntry_(key, true);\n\n _this3.keysAtom_.reportChanged();\n });\n var notifySpy = isSpyEnabled();\n var notify = hasListeners(this);\n var change = notify || notifySpy ? {\n observableKind: \"map\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n name: key,\n newValue: newValue\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n };\n\n _proto.get = function get(key) {\n if (this.has(key)) return this.dehanceValue_(this.data_.get(key).get());\n return this.dehanceValue_(undefined);\n };\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.keys = function keys() {\n this.keysAtom_.reportObserved();\n return this.data_.keys();\n };\n\n _proto.values = function values() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next = keys.next(),\n done = _keys$next.done,\n value = _keys$next.value;\n\n return {\n done: done,\n value: done ? undefined : self.get(value)\n };\n }\n });\n };\n\n _proto.entries = function entries() {\n var self = this;\n var keys = this.keys();\n return makeIterable({\n next: function next() {\n var _keys$next2 = keys.next(),\n done = _keys$next2.done,\n value = _keys$next2.value;\n\n return {\n done: done,\n value: done ? undefined : [value, self.get(value)]\n };\n }\n });\n };\n\n _proto[_Symbol$iterator] = function () {\n return this.entries();\n };\n\n _proto.forEach = function forEach(callback, thisArg) {\n for (var _iterator = _createForOfIteratorHelperLoose(this), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n value = _step$value[1];\n callback.call(thisArg, value, key, this);\n }\n }\n /** Merge another object into this object, returns this. */\n ;\n\n _proto.merge = function merge(other) {\n var _this4 = this;\n\n if (isObservableMap(other)) {\n other = new Map(other);\n }\n\n transaction(function () {\n if (isPlainObject(other)) getPlainObjectKeys(other).forEach(function (key) {\n return _this4.set(key, other[key]);\n });else if (Array.isArray(other)) other.forEach(function (_ref) {\n var key = _ref[0],\n value = _ref[1];\n return _this4.set(key, value);\n });else if (isES6Map(other)) {\n if (other.constructor !== Map) die(19, other);\n other.forEach(function (value, key) {\n return _this4.set(key, value);\n });\n } else if (other !== null && other !== undefined) die(20, other);\n });\n return this;\n };\n\n _proto.clear = function clear() {\n var _this5 = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator2 = _createForOfIteratorHelperLoose(_this5.keys()), _step2; !(_step2 = _iterator2()).done;) {\n var key = _step2.value;\n\n _this5[\"delete\"](key);\n }\n });\n });\n };\n\n _proto.replace = function replace(values) {\n var _this6 = this;\n\n // Implementation requirements:\n // - respect ordering of replacement map\n // - allow interceptors to run and potentially prevent individual operations\n // - don't recreate observables that already exist in original map (so we don't destroy existing subscriptions)\n // - don't _keysAtom.reportChanged if the keys of resulting map are indentical (order matters!)\n // - note that result map may differ from replacement map due to the interceptors\n transaction(function () {\n // Convert to map so we can do quick key lookups\n var replacementMap = convertToMap(values);\n var orderedData = new Map(); // Used for optimization\n\n var keysReportChangedCalled = false; // Delete keys that don't exist in replacement map\n // if the key deletion is prevented by interceptor\n // add entry at the beginning of the result map\n\n for (var _iterator3 = _createForOfIteratorHelperLoose(_this6.data_.keys()), _step3; !(_step3 = _iterator3()).done;) {\n var key = _step3.value;\n\n // Concurrently iterating/deleting keys\n // iterator should handle this correctly\n if (!replacementMap.has(key)) {\n var deleted = _this6[\"delete\"](key); // Was the key removed?\n\n\n if (deleted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n } else {\n // Delete prevented by interceptor\n var value = _this6.data_.get(key);\n\n orderedData.set(key, value);\n }\n }\n } // Merge entries\n\n\n for (var _iterator4 = _createForOfIteratorHelperLoose(replacementMap.entries()), _step4; !(_step4 = _iterator4()).done;) {\n var _step4$value = _step4.value,\n _key = _step4$value[0],\n _value = _step4$value[1];\n\n // We will want to know whether a new key is added\n var keyExisted = _this6.data_.has(_key); // Add or update value\n\n\n _this6.set(_key, _value); // The addition could have been prevent by interceptor\n\n\n if (_this6.data_.has(_key)) {\n // The update could have been prevented by interceptor\n // and also we want to preserve existing values\n // so use value from _data map (instead of replacement map)\n var _value2 = _this6.data_.get(_key);\n\n orderedData.set(_key, _value2); // Was a new key added?\n\n if (!keyExisted) {\n // _keysAtom.reportChanged() was already called\n keysReportChangedCalled = true;\n }\n }\n } // Check for possible key order change\n\n\n if (!keysReportChangedCalled) {\n if (_this6.data_.size !== orderedData.size) {\n // If size differs, keys are definitely modified\n _this6.keysAtom_.reportChanged();\n } else {\n var iter1 = _this6.data_.keys();\n\n var iter2 = orderedData.keys();\n var next1 = iter1.next();\n var next2 = iter2.next();\n\n while (!next1.done) {\n if (next1.value !== next2.value) {\n _this6.keysAtom_.reportChanged();\n\n break;\n }\n\n next1 = iter1.next();\n next2 = iter2.next();\n }\n }\n } // Use correctly ordered map\n\n\n _this6.data_ = orderedData;\n });\n return this;\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableMap]\";\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n _proto.observe_ = function observe_(listener, fireImmediately) {\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) die(\"`observe` doesn't support fireImmediately=true in combination with maps.\");\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _createClass(ObservableMap, [{\n key: \"size\",\n get: function get() {\n this.keysAtom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag,\n get: function get() {\n return \"Map\";\n }\n }]);\n\n return ObservableMap;\n}(); // eslint-disable-next-line\n\nvar isObservableMap = /*#__PURE__*/createInstanceofPredicate(\"ObservableMap\", ObservableMap);\n\nfunction convertToMap(dataStructure) {\n if (isES6Map(dataStructure) || isObservableMap(dataStructure)) {\n return dataStructure;\n } else if (Array.isArray(dataStructure)) {\n return new Map(dataStructure);\n } else if (isPlainObject(dataStructure)) {\n var map = new Map();\n\n for (var key in dataStructure) {\n map.set(key, dataStructure[key]);\n }\n\n return map;\n } else {\n return die(21, dataStructure);\n }\n}\n\nvar _Symbol$iterator$1, _Symbol$toStringTag$1;\nvar ObservableSetMarker = {};\n_Symbol$iterator$1 = Symbol.iterator;\n_Symbol$toStringTag$1 = Symbol.toStringTag;\nvar ObservableSet = /*#__PURE__*/function () {\n function ObservableSet(initialData, enhancer, name_) {\n if (enhancer === void 0) {\n enhancer = deepEnhancer;\n }\n\n if (name_ === void 0) {\n name_ = process.env.NODE_ENV !== \"production\" ? \"ObservableSet@\" + getNextId() : \"ObservableSet\";\n }\n\n this.name_ = void 0;\n this[$mobx] = ObservableSetMarker;\n this.data_ = new Set();\n this.atom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.dehancer = void 0;\n this.enhancer_ = void 0;\n this.name_ = name_;\n\n if (!isFunction(Set)) {\n die(22);\n }\n\n this.atom_ = createAtom(this.name_);\n\n this.enhancer_ = function (newV, oldV) {\n return enhancer(newV, oldV, name_);\n };\n\n if (initialData) {\n this.replace(initialData);\n }\n }\n\n var _proto = ObservableSet.prototype;\n\n _proto.dehanceValue_ = function dehanceValue_(value) {\n if (this.dehancer !== undefined) {\n return this.dehancer(value);\n }\n\n return value;\n };\n\n _proto.clear = function clear() {\n var _this = this;\n\n transaction(function () {\n untracked(function () {\n for (var _iterator = _createForOfIteratorHelperLoose(_this.data_.values()), _step; !(_step = _iterator()).done;) {\n var value = _step.value;\n\n _this[\"delete\"](value);\n }\n });\n });\n };\n\n _proto.forEach = function forEach(callbackFn, thisArg) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this), _step2; !(_step2 = _iterator2()).done;) {\n var value = _step2.value;\n callbackFn.call(thisArg, value, value, this);\n }\n };\n\n _proto.add = function add(value) {\n var _this2 = this;\n\n checkIfStateModificationsAreAllowed(this.atom_);\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: ADD,\n object: this,\n newValue: value\n });\n if (!change) return this; // ideally, value = change.value would be done here, so that values can be\n // changed by interceptor. Same applies for other Set and Map api's.\n }\n\n if (!this.has(value)) {\n transaction(function () {\n _this2.data_.add(_this2.enhancer_(value, undefined));\n\n _this2.atom_.reportChanged();\n });\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: ADD,\n object: this,\n newValue: value\n } : null;\n\n if (notifySpy && process.env.NODE_ENV !== \"production\") spyReportStart(_change);\n if (notify) notifyListeners(this, _change);\n if (notifySpy && process.env.NODE_ENV !== \"production\") spyReportEnd();\n }\n\n return this;\n };\n\n _proto[\"delete\"] = function _delete(value) {\n var _this3 = this;\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: DELETE,\n object: this,\n oldValue: value\n });\n if (!change) return false;\n }\n\n if (this.has(value)) {\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n var notify = hasListeners(this);\n\n var _change2 = notify || notifySpy ? {\n observableKind: \"set\",\n debugObjectName: this.name_,\n type: DELETE,\n object: this,\n oldValue: value\n } : null;\n\n if (notifySpy && process.env.NODE_ENV !== \"production\") spyReportStart(_change2);\n transaction(function () {\n _this3.atom_.reportChanged();\n\n _this3.data_[\"delete\"](value);\n });\n if (notify) notifyListeners(this, _change2);\n if (notifySpy && process.env.NODE_ENV !== \"production\") spyReportEnd();\n return true;\n }\n\n return false;\n };\n\n _proto.has = function has(value) {\n this.atom_.reportObserved();\n return this.data_.has(this.dehanceValue_(value));\n };\n\n _proto.entries = function entries() {\n var nextIndex = 0;\n var keys = Array.from(this.keys());\n var values = Array.from(this.values());\n return makeIterable({\n next: function next() {\n var index = nextIndex;\n nextIndex += 1;\n return index < values.length ? {\n value: [keys[index], values[index]],\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.keys = function keys() {\n return this.values();\n };\n\n _proto.values = function values() {\n this.atom_.reportObserved();\n var self = this;\n var nextIndex = 0;\n var observableValues = Array.from(this.data_.values());\n return makeIterable({\n next: function next() {\n return nextIndex < observableValues.length ? {\n value: self.dehanceValue_(observableValues[nextIndex++]),\n done: false\n } : {\n done: true\n };\n }\n });\n };\n\n _proto.replace = function replace(other) {\n var _this4 = this;\n\n if (isObservableSet(other)) {\n other = new Set(other);\n }\n\n transaction(function () {\n if (Array.isArray(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (isES6Set(other)) {\n _this4.clear();\n\n other.forEach(function (value) {\n return _this4.add(value);\n });\n } else if (other !== null && other !== undefined) {\n die(\"Cannot initialize set from \" + other);\n }\n });\n return this;\n };\n\n _proto.observe_ = function observe_(listener, fireImmediately) {\n // ... 'fireImmediately' could also be true?\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) die(\"`observe` doesn't support fireImmediately=true in combination with sets.\");\n return registerListener(this, listener);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.toJSON = function toJSON() {\n return Array.from(this);\n };\n\n _proto.toString = function toString() {\n return \"[object ObservableSet]\";\n };\n\n _proto[_Symbol$iterator$1] = function () {\n return this.values();\n };\n\n _createClass(ObservableSet, [{\n key: \"size\",\n get: function get() {\n this.atom_.reportObserved();\n return this.data_.size;\n }\n }, {\n key: _Symbol$toStringTag$1,\n get: function get() {\n return \"Set\";\n }\n }]);\n\n return ObservableSet;\n}(); // eslint-disable-next-line\n\nvar isObservableSet = /*#__PURE__*/createInstanceofPredicate(\"ObservableSet\", ObservableSet);\n\nvar inferredAnnotationsSymbol = /*#__PURE__*/Symbol(\"mobx-inferred-annotations\");\nvar descriptorCache = /*#__PURE__*/Object.create(null);\nvar REMOVE = \"remove\";\nvar ObservableObjectAdministration = /*#__PURE__*/function () {\n function ObservableObjectAdministration(target_, values_, name_, // Used anytime annotation is not explicitely provided\n defaultAnnotation_, // Bind automatically inferred actions?\n autoBind_) {\n if (values_ === void 0) {\n values_ = new Map();\n }\n\n if (defaultAnnotation_ === void 0) {\n defaultAnnotation_ = observable;\n }\n\n if (autoBind_ === void 0) {\n autoBind_ = false;\n }\n\n this.target_ = void 0;\n this.values_ = void 0;\n this.name_ = void 0;\n this.defaultAnnotation_ = void 0;\n this.autoBind_ = void 0;\n this.keysAtom_ = void 0;\n this.changeListeners_ = void 0;\n this.interceptors_ = void 0;\n this.proxy_ = void 0;\n this.isPlainObject_ = void 0;\n this.appliedAnnotations_ = void 0;\n this.pendingKeys_ = void 0;\n this.target_ = target_;\n this.values_ = values_;\n this.name_ = name_;\n this.defaultAnnotation_ = defaultAnnotation_;\n this.autoBind_ = autoBind_;\n this.keysAtom_ = new Atom(process.env.NODE_ENV !== \"production\" ? this.name_ + \".keys\" : \"ObservableObject.keys\"); // Optimization: we use this frequently\n\n this.isPlainObject_ = isPlainObject(this.target_);\n\n if (process.env.NODE_ENV !== \"production\" && !isAnnotation(this.defaultAnnotation_)) {\n die(\"defaultAnnotation must be valid annotation\");\n }\n\n if (process.env.NODE_ENV !== \"production\" && typeof this.autoBind_ !== \"boolean\") {\n die(\"autoBind must be boolean\");\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n // Prepare structure for tracking which fields were already annotated\n this.appliedAnnotations_ = {};\n }\n }\n\n var _proto = ObservableObjectAdministration.prototype;\n\n _proto.getObservablePropValue_ = function getObservablePropValue_(key) {\n return this.values_.get(key).get();\n };\n\n _proto.setObservablePropValue_ = function setObservablePropValue_(key, newValue) {\n var observable = this.values_.get(key);\n\n if (observable instanceof ComputedValue) {\n observable.set(newValue);\n return true;\n } // intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n type: UPDATE,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: newValue\n });\n if (!change) return null;\n newValue = change.newValue;\n }\n\n newValue = observable.prepareNewValue_(newValue); // notify spy & observers\n\n if (newValue !== globalState.UNCHANGED) {\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n\n var _change = notify || notifySpy ? {\n type: UPDATE,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n oldValue: observable.value_,\n name: key,\n newValue: newValue\n } : null;\n\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(_change);\n observable.setNewValue_(newValue);\n if (notify) notifyListeners(this, _change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n\n return true;\n };\n\n _proto.get_ = function get_(key) {\n if (globalState.trackingDerivation && !hasProp(this.target_, key)) {\n // Key doesn't exist yet, subscribe for it in case it's added later\n this.has_(key);\n }\n\n return this.target_[key];\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {any} value\r\n * @param {Annotation|boolean} annotation true - infer from descriptor, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.set_ = function set_(key, value, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // Don't use .has(key) - we care about own\n if (hasProp(this.target_, key)) {\n // Existing prop\n if (this.values_.has(key)) {\n // Observable (can be intercepted)\n return this.setObservablePropValue_(key, value);\n } else if (proxyTrap) {\n // Non-observable - proxy\n return Reflect.set(this.target_, key, value);\n } else {\n // Non-observable\n this.target_[key] = value;\n return true;\n }\n } else {\n // New prop\n return this.extend_(key, {\n value: value,\n enumerable: true,\n writable: true,\n configurable: true\n }, this.defaultAnnotation_, proxyTrap);\n }\n } // Trap for \"in\"\n ;\n\n _proto.has_ = function has_(key) {\n if (!globalState.trackingDerivation) {\n // Skip key subscription outside derivation\n return key in this.target_;\n }\n\n this.pendingKeys_ || (this.pendingKeys_ = new Map());\n var entry = this.pendingKeys_.get(key);\n\n if (!entry) {\n entry = new ObservableValue(key in this.target_, referenceEnhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + stringifyKey(key) + \"?\" : \"ObservableObject.key?\", false);\n this.pendingKeys_.set(key, entry);\n }\n\n return entry.get();\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {Annotation|boolean} annotation true - infer from object or it's prototype, false - ignore\r\n */\n ;\n\n _proto.make_ = function make_(key, annotation) {\n if (annotation === true) {\n annotation = this.inferAnnotation_(key);\n }\n\n if (annotation === false) {\n return;\n }\n\n assertAnnotable(this, annotation, key);\n annotation.make_(this, key);\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {Annotation|boolean} annotation true - infer from descriptor, false - copy as is\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.extend_ = function extend_(key, descriptor, annotation, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n if (annotation === true) {\n annotation = inferAnnotationFromDescriptor(descriptor, this.defaultAnnotation_, this.autoBind_);\n }\n\n if (annotation === false) {\n return this.defineProperty_(key, descriptor, proxyTrap);\n }\n\n assertAnnotable(this, annotation, key);\n var outcome = annotation.extend_(this, key, descriptor, proxyTrap);\n\n if (outcome) {\n recordAnnotationApplied(this, annotation, key);\n }\n\n return outcome;\n };\n\n _proto.inferAnnotation_ = function inferAnnotation_(key) {\n var _this$target_$inferre;\n\n // Inherited is fine - annotation cannot differ in subclass\n var annotation = (_this$target_$inferre = this.target_[inferredAnnotationsSymbol]) == null ? void 0 : _this$target_$inferre.get(key);\n if (annotation) return annotation;\n var current = this.target_;\n\n while (current && current !== objectPrototype) {\n var descriptor = getDescriptor(current, key);\n\n if (descriptor) {\n annotation = inferAnnotationFromDescriptor(descriptor, this.defaultAnnotation_, this.autoBind_);\n break;\n }\n\n current = Object.getPrototypeOf(current);\n } // Not found (false means ignore)\n\n\n if (annotation === undefined) {\n die(1, \"true\", key);\n } // Cache the annotation.\n // Note we can do this only because annotation and field can't change.\n\n\n if (!this.isPlainObject_) {\n // We could also place it on furthest proto, shoudn't matter\n var closestProto = Object.getPrototypeOf(this.target_);\n\n if (!hasProp(closestProto, inferredAnnotationsSymbol)) {\n addHiddenProp(closestProto, inferredAnnotationsSymbol, new Map());\n }\n\n closestProto[inferredAnnotationsSymbol].set(key, annotation);\n }\n\n return annotation;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.defineProperty_ = function defineProperty_(key, descriptor, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: descriptor.value\n });\n if (!change) return null;\n var newValue = change.newValue;\n\n if (descriptor.value !== newValue) {\n descriptor = _extends({}, descriptor, {\n value: newValue\n });\n }\n } // Define\n\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n } // Notify\n\n\n this.notifyPropertyAddition_(key, descriptor.value);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineObservableProperty_ = function defineObservableProperty_(key, value, enhancer, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: value\n });\n if (!change) return null;\n value = change.newValue;\n }\n\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: true,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n var _observable = new ObservableValue(value, enhancer, process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + key.toString() : \"ObservableObject.key\", false);\n\n this.values_.set(key, _observable); // Notify (value possibly changed by ObservableValue)\n\n this.notifyPropertyAddition_(key, _observable.value_);\n } finally {\n endBatch();\n }\n\n return true;\n } // If original descriptor becomes relevant, move this to annotation directly\n ;\n\n _proto.defineComputedProperty_ = function defineComputedProperty_(key, options, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n try {\n startBatch(); // Delete\n\n var deleteOutcome = this.delete_(key);\n\n if (!deleteOutcome) {\n // Failure or intercepted\n return deleteOutcome;\n } // ADD interceptor\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: ADD,\n newValue: undefined\n });\n if (!change) return null;\n }\n\n options.name || (options.name = process.env.NODE_ENV !== \"production\" ? this.name_ + \".\" + key.toString() : \"ObservableObject.key\");\n options.context = this.proxy_ || this.target_;\n var cachedDescriptor = getCachedObservablePropDescriptor(key);\n var descriptor = {\n configurable: globalState.safeDescriptors ? this.isPlainObject_ : true,\n enumerable: false,\n get: cachedDescriptor.get,\n set: cachedDescriptor.set\n }; // Define\n\n if (proxyTrap) {\n if (!Reflect.defineProperty(this.target_, key, descriptor)) {\n return false;\n }\n } else {\n defineProperty(this.target_, key, descriptor);\n }\n\n this.values_.set(key, new ComputedValue(options)); // Notify\n\n this.notifyPropertyAddition_(key, undefined);\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * @param {PropertyKey} key\r\n * @param {PropertyDescriptor} descriptor\r\n * @param {boolean} proxyTrap whether it's called from proxy trap\r\n * @returns {boolean|null} true on success, false on failure (proxyTrap + non-configurable), null when cancelled by interceptor\r\n */\n ;\n\n _proto.delete_ = function delete_(key, proxyTrap) {\n if (proxyTrap === void 0) {\n proxyTrap = false;\n }\n\n // No such prop\n if (!hasProp(this.target_, key)) {\n return true;\n } // Intercept\n\n\n if (hasInterceptors(this)) {\n var change = interceptChange(this, {\n object: this.proxy_ || this.target_,\n name: key,\n type: REMOVE\n }); // Cancelled\n\n if (!change) return null;\n } // Delete\n\n\n try {\n var _this$pendingKeys_, _this$pendingKeys_$ge;\n\n startBatch();\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n\n var _observable2 = this.values_.get(key); // Value needed for spies/listeners\n\n\n var value = undefined; // Optimization: don't pull the value unless we will need it\n\n if (!_observable2 && (notify || notifySpy)) {\n var _getDescriptor;\n\n value = (_getDescriptor = getDescriptor(this.target_, key)) == null ? void 0 : _getDescriptor.value;\n } // delete prop (do first, may fail)\n\n\n if (proxyTrap) {\n if (!Reflect.deleteProperty(this.target_, key)) {\n return false;\n }\n } else {\n delete this.target_[key];\n } // Allow re-annotating this field\n\n\n if (process.env.NODE_ENV !== \"production\") {\n delete this.appliedAnnotations_[key];\n } // Clear observable\n\n\n if (_observable2) {\n this.values_[\"delete\"](key); // for computed, value is undefined\n\n if (_observable2 instanceof ObservableValue) {\n value = _observable2.value_;\n } // Notify: autorun(() => obj[key]), see #1796\n\n\n propagateChanged(_observable2);\n } // Notify \"keys/entries/values\" observers\n\n\n this.keysAtom_.reportChanged(); // Notify \"has\" observers\n // \"in\" as it may still exist in proto\n\n (_this$pendingKeys_ = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_$ge = _this$pendingKeys_.get(key)) == null ? void 0 : _this$pendingKeys_$ge.set(key in this.target_); // Notify spies/listeners\n\n if (notify || notifySpy) {\n var _change2 = {\n type: REMOVE,\n observableKind: \"object\",\n object: this.proxy_ || this.target_,\n debugObjectName: this.name_,\n oldValue: value,\n name: key\n };\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(_change2);\n if (notify) notifyListeners(this, _change2);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n } finally {\n endBatch();\n }\n\n return true;\n }\n /**\r\n * Observes this object. Triggers for the events 'add', 'update' and 'delete'.\r\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe\r\n * for callback details\r\n */\n ;\n\n _proto.observe_ = function observe_(callback, fireImmediately) {\n if (process.env.NODE_ENV !== \"production\" && fireImmediately === true) die(\"`observe` doesn't support the fire immediately property for observable objects.\");\n return registerListener(this, callback);\n };\n\n _proto.intercept_ = function intercept_(handler) {\n return registerInterceptor(this, handler);\n };\n\n _proto.notifyPropertyAddition_ = function notifyPropertyAddition_(key, value) {\n var _this$pendingKeys_2, _this$pendingKeys_2$g;\n\n var notify = hasListeners(this);\n var notifySpy = process.env.NODE_ENV !== \"production\" && isSpyEnabled();\n\n if (notify || notifySpy) {\n var change = notify || notifySpy ? {\n type: ADD,\n observableKind: \"object\",\n debugObjectName: this.name_,\n object: this.proxy_ || this.target_,\n name: key,\n newValue: value\n } : null;\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportStart(change);\n if (notify) notifyListeners(this, change);\n if (process.env.NODE_ENV !== \"production\" && notifySpy) spyReportEnd();\n }\n\n (_this$pendingKeys_2 = this.pendingKeys_) == null ? void 0 : (_this$pendingKeys_2$g = _this$pendingKeys_2.get(key)) == null ? void 0 : _this$pendingKeys_2$g.set(true); // Notify \"keys/entries/values\" observers\n\n this.keysAtom_.reportChanged();\n };\n\n _proto.ownKeys_ = function ownKeys_() {\n this.keysAtom_.reportObserved();\n return ownKeys(this.target_);\n };\n\n _proto.keys_ = function keys_() {\n // Returns enumerable && own, but unfortunately keysAtom will report on ANY key change.\n // There is no way to distinguish between Object.keys(object) and Reflect.ownKeys(object) - both are handled by ownKeys trap.\n // We can either over-report in Object.keys(object) or under-report in Reflect.ownKeys(object)\n // We choose to over-report in Object.keys(object), because:\n // - typically it's used with simple data objects\n // - when symbolic/non-enumerable keys are relevant Reflect.ownKeys works as expected\n this.keysAtom_.reportObserved();\n return Object.keys(this.target_);\n };\n\n return ObservableObjectAdministration;\n}();\nfunction asObservableObject(target, options) {\n var _options$name;\n\n if (process.env.NODE_ENV !== \"production\" && options && isObservableObject(target)) {\n die(\"Options can't be provided for already observable objects.\");\n }\n\n if (hasProp(target, $mobx)) {\n if (process.env.NODE_ENV !== \"production\" && !(getAdministration(target) instanceof ObservableObjectAdministration)) {\n die(\"Cannot convert '\" + getDebugName(target) + \"' into observable object:\" + \"\\nThe target is already observable of different type.\" + \"\\nExtending builtins is not supported.\");\n }\n\n return target;\n }\n\n if (process.env.NODE_ENV !== \"production\" && !Object.isExtensible(target)) die(\"Cannot make the designated object observable; it is not extensible\");\n var name = (_options$name = options == null ? void 0 : options.name) != null ? _options$name : process.env.NODE_ENV !== \"production\" ? (isPlainObject(target) ? \"ObservableObject\" : target.constructor.name) + \"@\" + getNextId() : \"ObservableObject\";\n var adm = new ObservableObjectAdministration(target, new Map(), String(name), getAnnotationFromOptions(options), options == null ? void 0 : options.autoBind);\n addHiddenProp(target, $mobx, adm);\n return target;\n}\nvar isObservableObjectAdministration = /*#__PURE__*/createInstanceofPredicate(\"ObservableObjectAdministration\", ObservableObjectAdministration);\n\nfunction getCachedObservablePropDescriptor(key) {\n return descriptorCache[key] || (descriptorCache[key] = {\n get: function get() {\n return this[$mobx].getObservablePropValue_(key);\n },\n set: function set(value) {\n return this[$mobx].setObservablePropValue_(key, value);\n }\n });\n}\n\nfunction isObservableObject(thing) {\n if (isObject(thing)) {\n return isObservableObjectAdministration(thing[$mobx]);\n }\n\n return false;\n}\nfunction recordAnnotationApplied(adm, annotation, key) {\n var _adm$target_$storedAn;\n\n if (process.env.NODE_ENV !== \"production\") {\n adm.appliedAnnotations_[key] = annotation;\n } // Remove applied decorator annotation so we don't try to apply it again in subclass constructor\n\n\n (_adm$target_$storedAn = adm.target_[storedAnnotationsSymbol]) == null ? true : delete _adm$target_$storedAn[key];\n}\n\nfunction assertAnnotable(adm, annotation, key) {\n // Valid annotation\n if (process.env.NODE_ENV !== \"production\" && !isAnnotation(annotation)) {\n die(\"Cannot annotate '\" + adm.name_ + \".\" + key.toString() + \"': Invalid annotation.\");\n }\n /*\r\n // Configurable, not sealed, not frozen\r\n // Possibly not needed, just a little better error then the one thrown by engine.\r\n // Cases where this would be useful the most (subclass field initializer) are not interceptable by this.\r\n if (__DEV__) {\r\n const configurable = getDescriptor(adm.target_, key)?.configurable\r\n const frozen = Object.isFrozen(adm.target_)\r\n const sealed = Object.isSealed(adm.target_)\r\n if (!configurable || frozen || sealed) {\r\n const fieldName = `${adm.name_}.${key.toString()}`\r\n const requestedAnnotationType = annotation.annotationType_\r\n let error = `Cannot apply '${requestedAnnotationType}' to '${fieldName}':`\r\n if (frozen) {\r\n error += `\\nObject is frozen.`\r\n }\r\n if (sealed) {\r\n error += `\\nObject is sealed.`\r\n }\r\n if (!configurable) {\r\n error += `\\nproperty is not configurable.`\r\n // Mention only if caused by us to avoid confusion\r\n if (hasProp(adm.appliedAnnotations!, key)) {\r\n error += `\\nTo prevent accidental re-definition of a field by a subclass, `\r\n error += `all annotated fields of non-plain objects (classes) are not configurable.`\r\n }\r\n }\r\n die(error)\r\n }\r\n }\r\n */\n // Not annotated\n\n\n if (process.env.NODE_ENV !== \"production\" && !isOverride(annotation) && hasProp(adm.appliedAnnotations_, key)) {\n var fieldName = adm.name_ + \".\" + key.toString();\n var currentAnnotationType = adm.appliedAnnotations_[key].annotationType_;\n var requestedAnnotationType = annotation.annotationType_;\n die(\"Cannot apply '\" + requestedAnnotationType + \"' to '\" + fieldName + \"':\" + (\"\\nThe field is already annotated with '\" + currentAnnotationType + \"'.\") + \"\\nRe-annotating fields is not allowed.\" + \"\\nUse 'override' annotation for methods overriden by subclass.\");\n }\n}\n\n/**\r\n * This array buffer contains two lists of properties, so that all arrays\r\n * can recycle their property definitions, which significantly improves performance of creating\r\n * properties on the fly.\r\n */\n\nvar OBSERVABLE_ARRAY_BUFFER_SIZE = 0; // Typescript workaround to make sure ObservableArray extends Array\n\nvar StubArray = function StubArray() {};\n\nfunction inherit(ctor, proto) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(ctor.prototype, proto);\n } else if (ctor.prototype.__proto__ !== undefined) {\n ctor.prototype.__proto__ = proto;\n } else {\n ctor.prototype = proto;\n }\n}\n\ninherit(StubArray, Array.prototype); // Weex proto freeze protection was here,\n// but it is unclear why the hack is need as MobX never changed the prototype\n// anyway, so removed it in V6\n\nvar LegacyObservableArray = /*#__PURE__*/function (_StubArray) {\n _inheritsLoose(LegacyObservableArray, _StubArray);\n\n function LegacyObservableArray(initialValues, enhancer, name, owned) {\n var _this;\n\n if (name === void 0) {\n name = process.env.NODE_ENV !== \"production\" ? \"ObservableArray@\" + getNextId() : \"ObservableArray\";\n }\n\n if (owned === void 0) {\n owned = false;\n }\n\n _this = _StubArray.call(this) || this;\n var adm = new ObservableArrayAdministration(name, enhancer, owned, true);\n adm.proxy_ = _assertThisInitialized(_this);\n addHiddenFinalProp(_assertThisInitialized(_this), $mobx, adm);\n\n if (initialValues && initialValues.length) {\n var prev = allowStateChangesStart(true); // @ts-ignore\n\n _this.spliceWithArray(0, 0, initialValues);\n\n allowStateChangesEnd(prev);\n }\n\n return _this;\n }\n\n var _proto = LegacyObservableArray.prototype;\n\n _proto.concat = function concat() {\n this[$mobx].atom_.reportObserved();\n\n for (var _len = arguments.length, arrays = new Array(_len), _key = 0; _key < _len; _key++) {\n arrays[_key] = arguments[_key];\n }\n\n return Array.prototype.concat.apply(this.slice(), //@ts-ignore\n arrays.map(function (a) {\n return isObservableArray(a) ? a.slice() : a;\n }));\n };\n\n _proto[Symbol.iterator] = function () {\n var self = this;\n var nextIndex = 0;\n return makeIterable({\n next: function next() {\n // @ts-ignore\n return nextIndex < self.length ? {\n value: self[nextIndex++],\n done: false\n } : {\n done: true,\n value: undefined\n };\n }\n });\n };\n\n _createClass(LegacyObservableArray, [{\n key: \"length\",\n get: function get() {\n return this[$mobx].getArrayLength_();\n },\n set: function set(newLength) {\n this[$mobx].setArrayLength_(newLength);\n }\n }, {\n key: Symbol.toStringTag,\n get: function get() {\n return \"Array\";\n }\n }]);\n\n return LegacyObservableArray;\n}(StubArray);\n\nObject.entries(arrayExtensions).forEach(function (_ref) {\n var prop = _ref[0],\n fn = _ref[1];\n if (prop !== \"concat\") addHiddenProp(LegacyObservableArray.prototype, prop, fn);\n});\n\nfunction createArrayEntryDescriptor(index) {\n return {\n enumerable: false,\n configurable: true,\n get: function get() {\n return this[$mobx].get_(index);\n },\n set: function set(value) {\n this[$mobx].set_(index, value);\n }\n };\n}\n\nfunction createArrayBufferItem(index) {\n defineProperty(LegacyObservableArray.prototype, \"\" + index, createArrayEntryDescriptor(index));\n}\n\nfunction reserveArrayBuffer(max) {\n if (max > OBSERVABLE_ARRAY_BUFFER_SIZE) {\n for (var index = OBSERVABLE_ARRAY_BUFFER_SIZE; index < max + 100; index++) {\n createArrayBufferItem(index);\n }\n\n OBSERVABLE_ARRAY_BUFFER_SIZE = max;\n }\n}\nreserveArrayBuffer(1000);\nfunction createLegacyArray(initialValues, enhancer, name) {\n return new LegacyObservableArray(initialValues, enhancer, name);\n}\n\nfunction getAtom(thing, property) {\n if (typeof thing === \"object\" && thing !== null) {\n if (isObservableArray(thing)) {\n if (property !== undefined) die(23);\n return thing[$mobx].atom_;\n }\n\n if (isObservableSet(thing)) {\n return thing[$mobx];\n }\n\n if (isObservableMap(thing)) {\n if (property === undefined) return thing.keysAtom_;\n var observable = thing.data_.get(property) || thing.hasMap_.get(property);\n if (!observable) die(25, property, getDebugName(thing));\n return observable;\n }\n\n if (isObservableObject(thing)) {\n if (!property) return die(26);\n\n var _observable = thing[$mobx].values_.get(property);\n\n if (!_observable) die(27, property, getDebugName(thing));\n return _observable;\n }\n\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) {\n return thing;\n }\n } else if (isFunction(thing)) {\n if (isReaction(thing[$mobx])) {\n // disposer function\n return thing[$mobx];\n }\n }\n\n die(28);\n}\nfunction getAdministration(thing, property) {\n if (!thing) die(29);\n if (property !== undefined) return getAdministration(getAtom(thing, property));\n if (isAtom(thing) || isComputedValue(thing) || isReaction(thing)) return thing;\n if (isObservableMap(thing) || isObservableSet(thing)) return thing;\n if (thing[$mobx]) return thing[$mobx];\n die(24, thing);\n}\nfunction getDebugName(thing, property) {\n var named;\n\n if (property !== undefined) {\n named = getAtom(thing, property);\n } else if (isAction(thing)) {\n return thing.name;\n } else if (isObservableObject(thing) || isObservableMap(thing) || isObservableSet(thing)) {\n named = getAdministration(thing);\n } else {\n // valid for arrays as well\n named = getAtom(thing);\n }\n\n return named.name_;\n}\n\nvar toString = objectPrototype.toString;\nfunction deepEqual(a, b, depth) {\n if (depth === void 0) {\n depth = -1;\n }\n\n return eq(a, b, depth);\n} // Copied from https://github.com/jashkenas/underscore/blob/5c237a7c682fb68fd5378203f0bf22dce1624854/underscore.js#L1186-L1289\n// Internal recursive comparison function for `isEqual`.\n\nfunction eq(a, b, depth, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b; // `null` or `undefined` only equal to itself (strict comparison).\n\n if (a == null || b == null) return false; // `NaN`s are equivalent, but non-reflexive.\n\n if (a !== a) return b !== b; // Exhaust primitive checks\n\n var type = typeof a;\n if (!isFunction(type) && type !== \"object\" && typeof b != \"object\") return false; // Compare `[[Class]]` names.\n\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case \"[object RegExp]\": // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n\n case \"[object String]\":\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return \"\" + a === \"\" + b;\n\n case \"[object Number]\":\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values.\n\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n\n case \"[object Date]\":\n case \"[object Boolean]\":\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n\n case \"[object Symbol]\":\n return typeof Symbol !== \"undefined\" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b);\n\n case \"[object Map]\":\n case \"[object Set]\":\n // Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.\n // Hide this extra level by increasing the depth.\n if (depth >= 0) {\n depth++;\n }\n\n break;\n } // Unwrap any wrapped objects.\n\n\n a = unwrap(a);\n b = unwrap(b);\n var areArrays = className === \"[object Array]\";\n\n if (!areArrays) {\n if (typeof a != \"object\" || typeof b != \"object\") return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n\n var aCtor = a.constructor,\n bCtor = b.constructor;\n\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor && isFunction(bCtor) && bCtor instanceof bCtor) && \"constructor\" in a && \"constructor\" in b) {\n return false;\n }\n }\n\n if (depth === 0) {\n return false;\n } else if (depth < 0) {\n depth = -1;\n } // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n\n\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n } // Add the first object to the stack of traversed objects.\n\n\n aStack.push(a);\n bStack.push(b); // Recursively compare objects and arrays.\n\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties.\n\n while (length--) {\n if (!eq(a[length], b[length], depth - 1, aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = Object.keys(a);\n var key;\n length = keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality.\n\n if (Object.keys(b).length !== length) return false;\n\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(hasProp(b, key) && eq(a[key], b[key], depth - 1, aStack, bStack))) return false;\n }\n } // Remove the first object from the stack of traversed objects.\n\n\n aStack.pop();\n bStack.pop();\n return true;\n}\n\nfunction unwrap(a) {\n if (isObservableArray(a)) return a.slice();\n if (isES6Map(a) || isObservableMap(a)) return Array.from(a.entries());\n if (isES6Set(a) || isObservableSet(a)) return Array.from(a.entries());\n return a;\n}\n\nfunction makeIterable(iterator) {\n iterator[Symbol.iterator] = getSelf;\n return iterator;\n}\n\nfunction getSelf() {\n return this;\n}\n\n/**\r\n * Infers the best fitting annotation from property descriptor or false if the field shoudn't be annotated\r\n * - getter(+setter) -> computed\r\n * - setter w/o getter -> false (ignore)\r\n * - flow -> false (ignore)\r\n * - generator -> flow\r\n * - action -> false (ignore)\r\n * - function -> action (optionally bound)\r\n * - other -> defaultAnnotation\r\n */\n\nfunction inferAnnotationFromDescriptor(desc, defaultAnnotation, autoBind) {\n if (desc.get) return computed;\n if (desc.set) return false; // ignore lone setter\n // If already wrapped in action/flow, don't do that another time, but assume it is already set up properly.\n\n return isFunction(desc.value) ? isGenerator(desc.value) ? isFlow(desc.value) ? false : flow : isAction(desc.value) ? false : autoBind ? autoAction.bound : autoAction : defaultAnnotation;\n}\nfunction isAnnotation(thing) {\n return (// Can be function\n thing instanceof Object && typeof thing.annotationType_ === \"string\" && isFunction(thing.make_) && isFunction(thing.extend_)\n );\n}\n\n/**\r\n * (c) Michel Weststrate 2015 - 2020\r\n * MIT Licensed\r\n *\r\n * Welcome to the mobx sources! To get an global overview of how MobX internally works,\r\n * this is a good place to start:\r\n * https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.xvbh6qd74\r\n *\r\n * Source folders:\r\n * ===============\r\n *\r\n * - api/ Most of the public static methods exposed by the module can be found here.\r\n * - core/ Implementation of the MobX algorithm; atoms, derivations, reactions, dependency trees, optimizations. Cool stuff can be found here.\r\n * - types/ All the magic that is need to have observable objects, arrays and values is in this folder. Including the modifiers like `asFlat`.\r\n * - utils/ Utility stuff.\r\n *\r\n */\n[\"Symbol\", \"Map\", \"Set\", \"Symbol\"].forEach(function (m) {\n var g = getGlobal();\n\n if (typeof g[m] === \"undefined\") {\n die(\"MobX requires global '\" + m + \"' to be available or polyfilled\");\n }\n});\n\nif (typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ === \"object\") {\n // See: https://github.com/andykog/mobx-devtools/\n __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({\n spy: spy,\n extras: {\n getDebugName: getDebugName\n },\n $mobx: $mobx\n });\n}\n\nexport { $mobx, FlowCancellationError, ObservableMap, ObservableSet, Reaction, allowStateChanges as _allowStateChanges, runInAction as _allowStateChangesInsideComputed, allowStateReadsEnd as _allowStateReadsEnd, allowStateReadsStart as _allowStateReadsStart, autoAction as _autoAction, _endAction, getAdministration as _getAdministration, getGlobalState as _getGlobalState, interceptReads as _interceptReads, isComputingDerivation as _isComputingDerivation, resetGlobalState as _resetGlobalState, _startAction, action, autorun, comparer, computed, configure, createAtom, entries, extendObservable, flow, flowResult, get, getAtom, getDebugName, getDependencyTree, getObserverTree, has, intercept, isAction, isObservableValue as isBoxedObservable, isComputed, isComputedProp, isFlowCancellationError, isObservable, isObservableArray, isObservableMap, isObservableObject, isObservableProp, isObservableSet, keys, makeAutoObservable, makeObservable, observable, observe, onBecomeObserved, onBecomeUnobserved, onReactionError, override, reaction, remove, runInAction, set, spy, toJS, trace, transaction, untracked, values, when };\n//# sourceMappingURL=mobx.esm.js.map\n","var index = (function (p) {\n return p instanceof Function ? p // fn\n : typeof p === 'string' ? function (obj) {\n return obj[p];\n } // property name\n : function (obj) {\n return p;\n };\n}); // constant\n\nexport default index;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport AnimatedValue from './nodes/AnimatedValue';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport findNodeHandle from '../../../exports/findNodeHandle';\nimport invariant from 'fbjs/lib/invariant';\nimport { shouldUseNativeDriver } from './NativeAnimatedHelper';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nexport function attachNativeEvent(viewRef, eventName, argMapping) {\n // Find animated values in `argMapping` and create an array representing their\n // key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].\n var eventMappings = [];\n\n var traverse = function traverse(value, path) {\n if (value instanceof AnimatedValue) {\n value.__makeNative();\n\n eventMappings.push({\n nativeEventPath: path,\n animatedValueTag: value.__getNativeTag()\n });\n } else if (typeof value === 'object') {\n for (var _key in value) {\n traverse(value[_key], path.concat(_key));\n }\n }\n };\n\n invariant(argMapping[0] && argMapping[0].nativeEvent, 'Native driven events only support animated values contained inside `nativeEvent`.'); // Assume that the event containing `nativeEvent` is always the first argument.\n\n traverse(argMapping[0].nativeEvent, []);\n var viewTag = findNodeHandle(viewRef);\n\n if (viewTag != null) {\n eventMappings.forEach(function (mapping) {\n NativeAnimatedHelper.API.addAnimatedEventToView(viewTag, eventName, mapping);\n });\n }\n\n return {\n detach: function detach() {\n if (viewTag != null) {\n eventMappings.forEach(function (mapping) {\n NativeAnimatedHelper.API.removeAnimatedEventFromView(viewTag, eventName, // $FlowFixMe[incompatible-call]\n mapping.animatedValueTag);\n });\n }\n }\n };\n}\n\nfunction validateMapping(argMapping, args) {\n var validate = function validate(recMapping, recEvt, key) {\n if (recMapping instanceof AnimatedValue) {\n invariant(typeof recEvt === 'number', 'Bad mapping of event key ' + key + ', should be number but got ' + typeof recEvt);\n return;\n }\n\n if (typeof recEvt === 'number') {\n invariant(recMapping instanceof AnimatedValue, 'Bad mapping of type ' + typeof recMapping + ' for key ' + key + ', event value must map to AnimatedValue');\n return;\n }\n\n invariant(typeof recMapping === 'object', 'Bad mapping of type ' + typeof recMapping + ' for key ' + key);\n invariant(typeof recEvt === 'object', 'Bad event of type ' + typeof recEvt + ' for key ' + key);\n\n for (var mappingKey in recMapping) {\n validate(recMapping[mappingKey], recEvt[mappingKey], mappingKey);\n }\n };\n\n invariant(args.length >= argMapping.length, 'Event has less arguments than mapping');\n argMapping.forEach(function (mapping, idx) {\n validate(mapping, args[idx], 'arg' + idx);\n });\n}\n\nexport var AnimatedEvent = /*#__PURE__*/function () {\n function AnimatedEvent(argMapping, config) {\n this._listeners = [];\n this._argMapping = argMapping;\n\n if (config == null) {\n console.warn('Animated.event now requires a second argument for options');\n config = {\n useNativeDriver: false\n };\n }\n\n if (config.listener) {\n this.__addListener(config.listener);\n }\n\n this._callListeners = this._callListeners.bind(this);\n this._attachedEvent = null;\n this.__isNative = shouldUseNativeDriver(config);\n }\n\n var _proto = AnimatedEvent.prototype;\n\n _proto.__addListener = function __addListener(callback) {\n this._listeners.push(callback);\n };\n\n _proto.__removeListener = function __removeListener(callback) {\n this._listeners = this._listeners.filter(function (listener) {\n return listener !== callback;\n });\n };\n\n _proto.__attach = function __attach(viewRef, eventName) {\n invariant(this.__isNative, 'Only native driven events need to be attached.');\n this._attachedEvent = attachNativeEvent(viewRef, eventName, this._argMapping);\n };\n\n _proto.__detach = function __detach(viewTag, eventName) {\n invariant(this.__isNative, 'Only native driven events need to be detached.');\n this._attachedEvent && this._attachedEvent.detach();\n };\n\n _proto.__getHandler = function __getHandler() {\n var _this = this;\n\n if (this.__isNative) {\n if (__DEV__) {\n var _validatedMapping = false;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (!_validatedMapping) {\n validateMapping(_this._argMapping, args);\n _validatedMapping = true;\n }\n\n _this._callListeners.apply(_this, args);\n };\n } else {\n return this._callListeners;\n }\n }\n\n var validatedMapping = false;\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key3 = 0; _key3 < _len2; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n if (__DEV__ && !validatedMapping) {\n validateMapping(_this._argMapping, args);\n validatedMapping = true;\n }\n\n var traverse = function traverse(recMapping, recEvt, key) {\n if (recMapping instanceof AnimatedValue) {\n if (typeof recEvt === 'number') {\n recMapping.setValue(recEvt);\n }\n } else if (typeof recMapping === 'object') {\n for (var mappingKey in recMapping) {\n /* $FlowFixMe(>=0.120.0) This comment suppresses an error found\n * when Flow v0.120 was deployed. To see the error, delete this\n * comment and run Flow. */\n traverse(recMapping[mappingKey], recEvt[mappingKey], mappingKey);\n }\n }\n };\n\n _this._argMapping.forEach(function (mapping, idx) {\n traverse(mapping, args[idx], 'arg' + idx);\n });\n\n _this._callListeners.apply(_this, args);\n };\n };\n\n _proto._callListeners = function _callListeners() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key4 = 0; _key4 < _len3; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n this._listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n };\n\n return AnimatedEvent;\n}();","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\n\nvar AnimatedTransform = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedTransform, _AnimatedWithChildren);\n\n function AnimatedTransform(transforms) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._transforms = transforms;\n return _this;\n }\n\n var _proto = AnimatedTransform.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._transforms.forEach(function (transform) {\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n });\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._transforms.map(function (transform) {\n var result = {};\n\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n result[key] = value.__getValue();\n } else {\n result[key] = value;\n }\n }\n\n return result;\n });\n };\n\n _proto.__getAnimatedValue = function __getAnimatedValue() {\n return this._transforms.map(function (transform) {\n var result = {};\n\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n result[key] = value.__getAnimatedValue();\n } else {\n // All transform components needed to recompose matrix\n result[key] = value;\n }\n }\n\n return result;\n });\n };\n\n _proto.__attach = function __attach() {\n var _this2 = this;\n\n this._transforms.forEach(function (transform) {\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n value.__addChild(_this2);\n }\n }\n });\n };\n\n _proto.__detach = function __detach() {\n var _this3 = this;\n\n this._transforms.forEach(function (transform) {\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n value.__removeChild(_this3);\n }\n }\n });\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n var transConfigs = [];\n\n this._transforms.forEach(function (transform) {\n for (var key in transform) {\n var value = transform[key];\n\n if (value instanceof AnimatedNode) {\n transConfigs.push({\n type: 'animated',\n property: key,\n nodeTag: value.__getNativeTag()\n });\n } else {\n transConfigs.push({\n type: 'static',\n property: key,\n value: NativeAnimatedHelper.transformDataType(value)\n });\n }\n }\n });\n\n NativeAnimatedHelper.validateTransform(transConfigs);\n return {\n type: 'transform',\n transforms: transConfigs\n };\n };\n\n return AnimatedTransform;\n}(AnimatedWithChildren);\n\nexport default AnimatedTransform;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedTransform from './AnimatedTransform';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport flattenStyle from '../../../../exports/StyleSheet/flattenStyle';\n\nvar AnimatedStyle = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedStyle, _AnimatedWithChildren);\n\n function AnimatedStyle(style) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n style = flattenStyle(style) || {};\n\n if (style.transform) {\n style = _objectSpread(_objectSpread({}, style), {}, {\n transform: new AnimatedTransform(style.transform)\n });\n }\n\n _this._style = style;\n return _this;\n } // Recursively get values for nested styles (like iOS's shadowOffset)\n\n\n var _proto = AnimatedStyle.prototype;\n\n _proto._walkStyleAndGetValues = function _walkStyleAndGetValues(style) {\n var updatedStyle = {};\n\n for (var key in style) {\n var value = style[key];\n\n if (value instanceof AnimatedNode) {\n if (!value.__isNative) {\n // We cannot use value of natively driven nodes this way as the value we have access from\n // JS may not be up to date.\n updatedStyle[key] = value.__getValue();\n }\n } else if (value && !Array.isArray(value) && typeof value === 'object') {\n // Support animating nested values (for example: shadowOffset.height)\n updatedStyle[key] = this._walkStyleAndGetValues(value);\n } else {\n updatedStyle[key] = value;\n }\n }\n\n return updatedStyle;\n };\n\n _proto.__getValue = function __getValue() {\n return this._walkStyleAndGetValues(this._style);\n } // Recursively get animated values for nested styles (like iOS's shadowOffset)\n ;\n\n _proto._walkStyleAndGetAnimatedValues = function _walkStyleAndGetAnimatedValues(style) {\n var updatedStyle = {};\n\n for (var key in style) {\n var value = style[key];\n\n if (value instanceof AnimatedNode) {\n updatedStyle[key] = value.__getAnimatedValue();\n } else if (value && !Array.isArray(value) && typeof value === 'object') {\n // Support animating nested values (for example: shadowOffset.height)\n updatedStyle[key] = this._walkStyleAndGetAnimatedValues(value);\n }\n }\n\n return updatedStyle;\n };\n\n _proto.__getAnimatedValue = function __getAnimatedValue() {\n return this._walkStyleAndGetAnimatedValues(this._style);\n };\n\n _proto.__attach = function __attach() {\n for (var key in this._style) {\n var value = this._style[key];\n\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n };\n\n _proto.__detach = function __detach() {\n for (var key in this._style) {\n var value = this._style[key];\n\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__makeNative = function __makeNative() {\n for (var key in this._style) {\n var value = this._style[key];\n\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n var styleConfig = {};\n\n for (var styleKey in this._style) {\n if (this._style[styleKey] instanceof AnimatedNode) {\n var style = this._style[styleKey];\n\n style.__makeNative();\n\n styleConfig[styleKey] = style.__getNativeTag();\n } // Non-animated styles are set using `setNativeProps`, no need\n // to pass those as a part of the node config\n\n }\n\n NativeAnimatedHelper.validateStyles(styleConfig);\n return {\n type: 'style',\n style: styleConfig\n };\n };\n\n return AnimatedStyle;\n}(AnimatedWithChildren);\n\nexport default AnimatedStyle;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport { AnimatedEvent } from '../AnimatedEvent';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedStyle from './AnimatedStyle';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport findNodeHandle from '../../../../exports/findNodeHandle';\nimport invariant from 'fbjs/lib/invariant';\n\nvar AnimatedProps = /*#__PURE__*/function (_AnimatedNode) {\n _inheritsLoose(AnimatedProps, _AnimatedNode);\n\n function AnimatedProps(props, callback) {\n var _this;\n\n _this = _AnimatedNode.call(this) || this;\n\n if (props.style) {\n props = _objectSpread(_objectSpread({}, props), {}, {\n style: new AnimatedStyle(props.style)\n });\n }\n\n _this._props = props;\n _this._callback = callback;\n\n _this.__attach();\n\n return _this;\n }\n\n var _proto = AnimatedProps.prototype;\n\n _proto.__getValue = function __getValue() {\n var props = {};\n\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n if (!value.__isNative || value instanceof AnimatedStyle) {\n // We cannot use value of natively driven nodes this way as the value we have access from\n // JS may not be up to date.\n props[key] = value.__getValue();\n }\n } else if (value instanceof AnimatedEvent) {\n props[key] = value.__getHandler();\n } else {\n props[key] = value;\n }\n }\n\n return props;\n };\n\n _proto.__getAnimatedValue = function __getAnimatedValue() {\n var props = {};\n\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n props[key] = value.__getAnimatedValue();\n }\n }\n\n return props;\n };\n\n _proto.__attach = function __attach() {\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n value.__addChild(this);\n }\n }\n };\n\n _proto.__detach = function __detach() {\n if (this.__isNative && this._animatedView) {\n this.__disconnectAnimatedView();\n }\n\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n value.__removeChild(this);\n }\n }\n\n _AnimatedNode.prototype.__detach.call(this);\n };\n\n _proto.update = function update() {\n this._callback();\n };\n\n _proto.__makeNative = function __makeNative() {\n if (!this.__isNative) {\n this.__isNative = true;\n\n for (var key in this._props) {\n var value = this._props[key];\n\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n }\n }\n\n if (this._animatedView) {\n this.__connectAnimatedView();\n }\n }\n };\n\n _proto.setNativeView = function setNativeView(animatedView) {\n if (this._animatedView === animatedView) {\n return;\n }\n\n this._animatedView = animatedView;\n\n if (this.__isNative) {\n this.__connectAnimatedView();\n }\n };\n\n _proto.__connectAnimatedView = function __connectAnimatedView() {\n invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n var nativeViewTag = findNodeHandle(this._animatedView);\n invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n NativeAnimatedHelper.API.connectAnimatedNodeToView(this.__getNativeTag(), nativeViewTag);\n };\n\n _proto.__disconnectAnimatedView = function __disconnectAnimatedView() {\n invariant(this.__isNative, 'Expected node to be marked as \"native\"');\n var nativeViewTag = findNodeHandle(this._animatedView);\n invariant(nativeViewTag != null, 'Unable to locate attached view in the native tree');\n NativeAnimatedHelper.API.disconnectAnimatedNodeFromView(this.__getNativeTag(), nativeViewTag);\n };\n\n _proto.__restoreDefaultValues = function __restoreDefaultValues() {\n // When using the native driver, view properties need to be restored to\n // their default values manually since react no longer tracks them. This\n // is needed to handle cases where a prop driven by native animated is removed\n // after having been changed natively by an animation.\n if (this.__isNative) {\n NativeAnimatedHelper.API.restoreDefaultValues(this.__getNativeTag());\n }\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n var propsConfig = {};\n\n for (var propKey in this._props) {\n var value = this._props[propKey];\n\n if (value instanceof AnimatedNode) {\n value.__makeNative();\n\n propsConfig[propKey] = value.__getNativeTag();\n }\n }\n\n return {\n type: 'props',\n props: propsConfig\n };\n };\n\n return AnimatedProps;\n}(AnimatedNode);\n\nexport default AnimatedProps;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\n/**\n * This is a helper function for when a component needs to be able to forward a ref\n * to a child component, but still needs to have access to that component as part of\n * its implementation.\n *\n * Its main use case is in wrappers for native components.\n *\n * Usage:\n *\n * class MyView extends React.Component {\n * _nativeRef = null;\n *\n * _setNativeRef = setAndForwardRef({\n * getForwardedRef: () => this.props.forwardedRef,\n * setLocalRef: ref => {\n * this._nativeRef = ref;\n * },\n * });\n *\n * render() {\n * return <View ref={this._setNativeRef} />;\n * }\n * }\n *\n * const MyViewWithRef = React.forwardRef((props, ref) => (\n * <MyView {...props} forwardedRef={ref} />\n * ));\n *\n * module.exports = MyViewWithRef;\n */\nfunction setAndForwardRef(_ref) {\n var getForwardedRef = _ref.getForwardedRef,\n setLocalRef = _ref.setLocalRef;\n return function forwardRef(ref) {\n var forwardedRef = getForwardedRef();\n setLocalRef(ref); // Forward to user ref prop (if one has been specified)\n\n if (typeof forwardedRef === 'function') {\n // Handle function-based refs. String-based refs are handled as functions.\n forwardedRef(ref);\n } else if (typeof forwardedRef === 'object' && forwardedRef != null) {\n // Handle createRef-based refs\n forwardedRef.current = ref;\n }\n };\n}\n\nexport default setAndForwardRef;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport View from '../../../exports/View';\nimport { AnimatedEvent } from './AnimatedEvent';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport * as React from 'react';\nimport NativeAnimatedHelper from './NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nimport setAndForwardRef from '../Utilities/setAndForwardRef';\nvar animatedComponentNextId = 1;\n\nfunction createAnimatedComponent(Component, options) {\n invariant(typeof Component !== 'function' || Component.prototype && Component.prototype.isReactComponent, '`createAnimatedComponent` does not support stateless functional components; ' + 'use a class component instead.');\n\n var AnimatedComponent = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(AnimatedComponent, _React$Component);\n\n function AnimatedComponent() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this._invokeAnimatedPropsCallbackOnMount = false;\n _this._eventDetachers = [];\n _this._animatedComponentId = animatedComponentNextId++ + \":animatedComponent\";\n\n _this._isFabric = function () {\n var _this$_component$_int, _this$_component$_int2, _this$_component$getN, _this$_component$getN2, _this$_component$getS, _this$_component$getS2;\n\n // When called during the first render, `_component` is always null.\n // Therefore, even if a component is rendered in Fabric, we can't detect\n // that until ref is set, which happens sometime after the first render.\n // In cases where this value switching between \"false\" and \"true\" on Fabric\n // causes issues, add an additional check for _component nullity.\n if (_this._component == null) {\n return false;\n }\n\n return (// eslint-disable-next-line dot-notation\n ((_this$_component$_int = _this._component['_internalInstanceHandle']) == null ? void 0 : (_this$_component$_int2 = _this$_component$_int.stateNode) == null ? void 0 : _this$_component$_int2.canonical) != null || // Some components have a setNativeProps function but aren't a host component\n // such as lists like FlatList and SectionList. These should also use\n // forceUpdate in Fabric since setNativeProps doesn't exist on the underlying\n // host component. This crazy hack is essentially special casing those lists and\n // ScrollView itself to use forceUpdate in Fabric.\n // If these components end up using forwardRef then these hacks can go away\n // as this._component would actually be the underlying host component and the above check\n // would be sufficient.\n _this._component.getNativeScrollRef != null && _this._component.getNativeScrollRef() != null && // eslint-disable-next-line dot-notation\n ((_this$_component$getN = _this._component.getNativeScrollRef()['_internalInstanceHandle']) == null ? void 0 : (_this$_component$getN2 = _this$_component$getN.stateNode) == null ? void 0 : _this$_component$getN2.canonical) != null || _this._component.getScrollResponder != null && _this._component.getScrollResponder() != null && _this._component.getScrollResponder().getNativeScrollRef != null && _this._component.getScrollResponder().getNativeScrollRef() != null && ((_this$_component$getS = _this._component.getScrollResponder().getNativeScrollRef()[// eslint-disable-next-line dot-notation\n '_internalInstanceHandle']) == null ? void 0 : (_this$_component$getS2 = _this$_component$getS.stateNode) == null ? void 0 : _this$_component$getS2.canonical) != null\n );\n };\n\n _this._waitForUpdate = function () {\n if (_this._isFabric()) {\n NativeAnimatedHelper.API.setWaitingForIdentifier(_this._animatedComponentId);\n }\n };\n\n _this._markUpdateComplete = function () {\n if (_this._isFabric()) {\n NativeAnimatedHelper.API.unsetWaitingForIdentifier(_this._animatedComponentId);\n }\n };\n\n _this._animatedPropsCallback = function () {\n if (_this._component == null) {\n // AnimatedProps is created in will-mount because it's used in render.\n // But this callback may be invoked before mount in async mode,\n // In which case we should defer the setNativeProps() call.\n // React may throw away uncommitted work in async mode,\n // So a deferred call won't always be invoked.\n _this._invokeAnimatedPropsCallbackOnMount = true;\n } else if (process.env.NODE_ENV === 'test' || // For animating properties of non-leaf/non-native components\n typeof _this._component.setNativeProps !== 'function' || // In Fabric, force animations to go through forceUpdate and skip setNativeProps\n _this._isFabric()) {\n _this.forceUpdate();\n } else if (!_this._propsAnimated.__isNative) {\n _this._component.setNativeProps(_this._propsAnimated.__getAnimatedValue());\n } else {\n throw new Error('Attempting to run JS driven animation on animated ' + 'node that has been moved to \"native\" earlier by starting an ' + 'animation with `useNativeDriver: true`');\n }\n };\n\n _this._setComponentRef = setAndForwardRef({\n getForwardedRef: function getForwardedRef() {\n return _this.props.forwardedRef;\n },\n setLocalRef: function setLocalRef(ref) {\n _this._prevComponent = _this._component;\n _this._component = ref; // TODO: Delete this in a future release.\n\n if (ref != null && ref.getNode == null) {\n ref.getNode = function () {\n var _ref$constructor$name;\n\n console.warn('%s: Calling `getNode()` on the ref of an Animated component ' + 'is no longer necessary. You can now directly use the ref ' + 'instead. This method will be removed in a future release.', (_ref$constructor$name = ref.constructor.name) !== null && _ref$constructor$name !== void 0 ? _ref$constructor$name : '<<anonymous>>');\n return ref;\n };\n }\n }\n });\n return _this;\n }\n\n var _proto = AnimatedComponent.prototype;\n\n _proto._attachNativeEvents = function _attachNativeEvents() {\n var _this$_component,\n _this2 = this;\n\n // Make sure to get the scrollable node for components that implement\n // `ScrollResponder.Mixin`.\n var scrollableNode = (_this$_component = this._component) != null && _this$_component.getScrollableNode ? this._component.getScrollableNode() : this._component;\n\n var _loop = function _loop(key) {\n var prop = _this2.props[key];\n\n if (prop instanceof AnimatedEvent && prop.__isNative) {\n prop.__attach(scrollableNode, key);\n\n _this2._eventDetachers.push(function () {\n return prop.__detach(scrollableNode, key);\n });\n }\n };\n\n for (var key in this.props) {\n _loop(key);\n }\n };\n\n _proto._detachNativeEvents = function _detachNativeEvents() {\n this._eventDetachers.forEach(function (remove) {\n return remove();\n });\n\n this._eventDetachers = [];\n };\n\n _proto._attachProps = function _attachProps(nextProps) {\n var oldPropsAnimated = this._propsAnimated;\n\n if (nextProps === oldPropsAnimated) {\n return;\n }\n\n this._propsAnimated = new AnimatedProps(nextProps, this._animatedPropsCallback); // When you call detach, it removes the element from the parent list\n // of children. If it goes to 0, then the parent also detaches itself\n // and so on.\n // An optimization is to attach the new elements and THEN detach the old\n // ones instead of detaching and THEN attaching.\n // This way the intermediate state isn't to go to 0 and trigger\n // this expensive recursive detaching to then re-attach everything on\n // the very next operation.\n\n if (oldPropsAnimated) {\n oldPropsAnimated.__restoreDefaultValues();\n\n oldPropsAnimated.__detach();\n }\n };\n\n _proto.render = function render() {\n var _props$collapsable, _props$nativeID;\n\n var _ref = this._propsAnimated.__getValue() || {},\n _ref$style = _ref.style,\n style = _ref$style === void 0 ? {} : _ref$style,\n props = _objectWithoutPropertiesLoose(_ref, [\"style\"]);\n\n var _ref2 = this.props.passthroughAnimatedPropExplicitValues || {},\n _ref2$style = _ref2.style,\n passthruStyle = _ref2$style === void 0 ? {} : _ref2$style,\n passthruProps = _objectWithoutPropertiesLoose(_ref2, [\"style\"]);\n\n var mergedStyle = _objectSpread(_objectSpread({}, style), passthruStyle); // On Fabric, we always want to ensure the container Animated View is *not*\n // flattened.\n // Because we do not get a host component ref immediately and thus cannot\n // do a proper Fabric vs non-Fabric detection immediately, we default to assuming\n // that Fabric *is* enabled until we know otherwise.\n // Thus, in Fabric, this view will never be flattened. In non-Fabric, the view will\n // not be flattened during the initial render but may be flattened in the second render\n // and onwards.\n\n\n var forceNativeIdFabric = this._component == null && ((options == null ? void 0 : options.collapsable) === false || props.collapsable !== true) || this._isFabric();\n\n var forceNativeId = (_props$collapsable = props.collapsable) !== null && _props$collapsable !== void 0 ? _props$collapsable : this._propsAnimated.__isNative || forceNativeIdFabric || (options == null ? void 0 : options.collapsable) === false; // The native driver updates views directly through the UI thread so we\n // have to make sure the view doesn't get optimized away because it cannot\n // go through the NativeViewHierarchyManager since it operates on the shadow\n // thread. TODO: T68258846\n\n var collapsableProps = forceNativeId ? {\n nativeID: (_props$nativeID = props.nativeID) !== null && _props$nativeID !== void 0 ? _props$nativeID : 'animatedComponent',\n collapsable: false\n } : {};\n return /*#__PURE__*/React.createElement(Component, _extends({}, props, passthruProps, collapsableProps, {\n style: mergedStyle,\n ref: this._setComponentRef\n }));\n };\n\n _proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {\n this._waitForUpdate();\n\n this._attachProps(this.props);\n };\n\n _proto.componentDidMount = function componentDidMount() {\n if (this._invokeAnimatedPropsCallbackOnMount) {\n this._invokeAnimatedPropsCallbackOnMount = false;\n\n this._animatedPropsCallback();\n }\n\n this._propsAnimated.setNativeView(this._component);\n\n this._attachNativeEvents();\n\n this._markUpdateComplete();\n };\n\n _proto.UNSAFE_componentWillReceiveProps = function UNSAFE_componentWillReceiveProps(newProps) {\n this._waitForUpdate();\n\n this._attachProps(newProps);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (this._component !== this._prevComponent) {\n this._propsAnimated.setNativeView(this._component);\n }\n\n if (this._component !== this._prevComponent || prevProps !== this.props) {\n this._detachNativeEvents();\n\n this._attachNativeEvents();\n }\n\n this._markUpdateComplete();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this._propsAnimated && this._propsAnimated.__detach();\n\n this._detachNativeEvents();\n\n this._markUpdateComplete();\n\n this._component = null;\n this._prevComponent = null;\n };\n\n return AnimatedComponent;\n }(React.Component);\n\n return /*#__PURE__*/React.forwardRef(function AnimatedComponentWrapper(props, ref) {\n return /*#__PURE__*/React.createElement(AnimatedComponent, _extends({}, props, ref == null ? null : {\n forwardedRef: ref\n }));\n });\n}\n\nexport default createAnimatedComponent;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport FlatList from '../../../../exports/FlatList';\nimport createAnimatedComponent from '../createAnimatedComponent';\n\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar FlatListWithEventThrottle = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(FlatList, _extends({\n scrollEventThrottle: 0.0001\n }, props, {\n ref: ref\n }));\n});\nexport default createAnimatedComponent(FlatListWithEventThrottle);","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport Image from '../../../../exports/Image';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(Image, {\n collapsable: false\n});","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport ScrollView from '../../../../exports/ScrollView';\nimport createAnimatedComponent from '../createAnimatedComponent';\n\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar ScrollViewWithEventThrottle = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(ScrollView, _extends({\n scrollEventThrottle: 0.0001\n }, props, {\n ref: ref\n }));\n});\nexport default createAnimatedComponent(ScrollViewWithEventThrottle, {\n collapsable: false\n});","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport SectionList from '../../../../exports/SectionList';\nimport createAnimatedComponent from '../createAnimatedComponent';\n\n/**\n * @see https://github.com/facebook/react-native/commit/b8c8562\n */\nvar SectionListWithEventThrottle = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(SectionList, _extends({\n scrollEventThrottle: 0.0001\n }, props, {\n ref: ref\n }));\n});\nexport default createAnimatedComponent(SectionListWithEventThrottle);","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport Text from '../../../../exports/Text';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(Text, {\n collapsable: false\n});","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport View from '../../../../exports/View';\nimport createAnimatedComponent from '../createAnimatedComponent';\nexport default createAnimatedComponent(View, {\n collapsable: true\n});","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedAddition = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedAddition, _AnimatedWithChildren);\n\n function AnimatedAddition(a, b) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n return _this;\n }\n\n var _proto = AnimatedAddition.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._a.__getValue() + this._b.__getValue();\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'addition',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n };\n\n return AnimatedAddition;\n}(AnimatedWithChildren);\n\nexport default AnimatedAddition;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedDiffClamp = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedDiffClamp, _AnimatedWithChildren);\n\n function AnimatedDiffClamp(a, min, max) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = a;\n _this._min = min;\n _this._max = max;\n _this._value = _this._lastValue = _this._a.__getValue();\n return _this;\n }\n\n var _proto = AnimatedDiffClamp.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__getValue = function __getValue() {\n var value = this._a.__getValue();\n\n var diff = value - this._lastValue;\n this._lastValue = value;\n this._value = Math.min(Math.max(this._value + diff, this._min), this._max);\n return this._value;\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'diffclamp',\n input: this._a.__getNativeTag(),\n min: this._min,\n max: this._max\n };\n };\n\n return AnimatedDiffClamp;\n}(AnimatedWithChildren);\n\nexport default AnimatedDiffClamp;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedDivision = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedDivision, _AnimatedWithChildren);\n\n function AnimatedDivision(a, b) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._warnedAboutDivideByZero = false;\n\n if (b === 0 || b instanceof AnimatedNode && b.__getValue() === 0) {\n console.error('Detected potential division by zero in AnimatedDivision');\n }\n\n _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n return _this;\n }\n\n var _proto = AnimatedDivision.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n var a = this._a.__getValue();\n\n var b = this._b.__getValue();\n\n if (b === 0) {\n // Prevent spamming the console/LogBox\n if (!this._warnedAboutDivideByZero) {\n console.error('Detected division by zero in AnimatedDivision');\n this._warnedAboutDivideByZero = true;\n } // Passing infinity/NaN to Fabric will cause a native crash\n\n\n return 0;\n }\n\n this._warnedAboutDivideByZero = false;\n return a / b;\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'division',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n };\n\n return AnimatedDivision;\n}(AnimatedWithChildren);\n\nexport default AnimatedDivision;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedModulo = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedModulo, _AnimatedWithChildren);\n\n function AnimatedModulo(a, modulus) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = a;\n _this._modulus = modulus;\n return _this;\n }\n\n var _proto = AnimatedModulo.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return (this._a.__getValue() % this._modulus + this._modulus) % this._modulus;\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'modulus',\n input: this._a.__getNativeTag(),\n modulus: this._modulus\n };\n };\n\n return AnimatedModulo;\n}(AnimatedWithChildren);\n\nexport default AnimatedModulo;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedMultiplication = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedMultiplication, _AnimatedWithChildren);\n\n function AnimatedMultiplication(a, b) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n return _this;\n }\n\n var _proto = AnimatedMultiplication.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._a.__getValue() * this._b.__getValue();\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'multiplication',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n };\n\n return AnimatedMultiplication;\n}(AnimatedWithChildren);\n\nexport default AnimatedMultiplication;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedSubtraction = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedSubtraction, _AnimatedWithChildren);\n\n function AnimatedSubtraction(a, b) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._a = typeof a === 'number' ? new AnimatedValue(a) : a;\n _this._b = typeof b === 'number' ? new AnimatedValue(b) : b;\n return _this;\n }\n\n var _proto = AnimatedSubtraction.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._a.__makeNative();\n\n this._b.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._a.__getValue() - this._b.__getValue();\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._a.__addChild(this);\n\n this._b.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._a.__removeChild(this);\n\n this._b.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'subtraction',\n input: [this._a.__getNativeTag(), this._b.__getNativeTag()]\n };\n };\n\n return AnimatedSubtraction;\n}(AnimatedWithChildren);\n\nexport default AnimatedSubtraction;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedNode from './AnimatedNode';\nimport { generateNewAnimationId, shouldUseNativeDriver } from '../NativeAnimatedHelper';\n\nvar AnimatedTracking = /*#__PURE__*/function (_AnimatedNode) {\n _inheritsLoose(AnimatedTracking, _AnimatedNode);\n\n function AnimatedTracking(value, parent, animationClass, animationConfig, callback) {\n var _this;\n\n _this = _AnimatedNode.call(this) || this;\n _this._value = value;\n _this._parent = parent;\n _this._animationClass = animationClass;\n _this._animationConfig = animationConfig;\n _this._useNativeDriver = shouldUseNativeDriver(animationConfig);\n _this._callback = callback;\n\n _this.__attach();\n\n return _this;\n }\n\n var _proto = AnimatedTracking.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this.__isNative = true;\n\n this._parent.__makeNative();\n\n _AnimatedNode.prototype.__makeNative.call(this);\n\n this._value.__makeNative();\n };\n\n _proto.__getValue = function __getValue() {\n return this._parent.__getValue();\n };\n\n _proto.__attach = function __attach() {\n this._parent.__addChild(this);\n\n if (this._useNativeDriver) {\n // when the tracking starts we need to convert this node to a \"native node\"\n // so that the parent node will be made \"native\" too. This is necessary as\n // if we don't do this `update` method will get called. At that point it\n // may be too late as it would mean the JS driver has already started\n // updating node values\n this.__makeNative();\n }\n };\n\n _proto.__detach = function __detach() {\n this._parent.__removeChild(this);\n\n _AnimatedNode.prototype.__detach.call(this);\n };\n\n _proto.update = function update() {\n this._value.animate(new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n toValue: this._animationConfig.toValue.__getValue()\n })), this._callback);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n var animation = new this._animationClass(_objectSpread(_objectSpread({}, this._animationConfig), {}, {\n // remove toValue from the config as it's a ref to Animated.Value\n toValue: undefined\n }));\n\n var animationConfig = animation.__getNativeAnimationConfig();\n\n return {\n type: 'tracking',\n animationId: generateNewAnimationId(),\n animationConfig: animationConfig,\n toValue: this._parent.__getNativeTag(),\n value: this._value.__getNativeTag()\n };\n };\n\n return AnimatedTracking;\n}(AnimatedNode);\n\nexport default AnimatedTracking;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { AnimatedEvent, attachNativeEvent } from './AnimatedEvent';\nimport AnimatedAddition from './nodes/AnimatedAddition';\nimport AnimatedDiffClamp from './nodes/AnimatedDiffClamp';\nimport AnimatedDivision from './nodes/AnimatedDivision';\nimport AnimatedInterpolation from './nodes/AnimatedInterpolation';\nimport AnimatedModulo from './nodes/AnimatedModulo';\nimport AnimatedMultiplication from './nodes/AnimatedMultiplication';\nimport AnimatedNode from './nodes/AnimatedNode';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport AnimatedSubtraction from './nodes/AnimatedSubtraction';\nimport AnimatedTracking from './nodes/AnimatedTracking';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\nimport DecayAnimation from './animations/DecayAnimation';\nimport SpringAnimation from './animations/SpringAnimation';\nimport TimingAnimation from './animations/TimingAnimation';\nimport createAnimatedComponent from './createAnimatedComponent';\n\nvar add = function add(a, b) {\n return new AnimatedAddition(a, b);\n};\n\nvar subtract = function subtract(a, b) {\n return new AnimatedSubtraction(a, b);\n};\n\nvar divide = function divide(a, b) {\n return new AnimatedDivision(a, b);\n};\n\nvar multiply = function multiply(a, b) {\n return new AnimatedMultiplication(a, b);\n};\n\nvar modulo = function modulo(a, modulus) {\n return new AnimatedModulo(a, modulus);\n};\n\nvar diffClamp = function diffClamp(a, min, max) {\n return new AnimatedDiffClamp(a, min, max);\n};\n\nvar _combineCallbacks = function _combineCallbacks(callback, config) {\n if (callback && config.onComplete) {\n return function () {\n config.onComplete && config.onComplete.apply(config, arguments);\n callback && callback.apply(void 0, arguments);\n };\n } else {\n return callback || config.onComplete;\n }\n};\n\nvar maybeVectorAnim = function maybeVectorAnim(value, config, anim) {\n if (value instanceof AnimatedValueXY) {\n var configX = _objectSpread({}, config);\n\n var configY = _objectSpread({}, config);\n\n for (var key in config) {\n var _config$key = config[key],\n x = _config$key.x,\n y = _config$key.y;\n\n if (x !== undefined && y !== undefined) {\n configX[key] = x;\n configY[key] = y;\n }\n }\n\n var aX = anim(value.x, configX);\n var aY = anim(value.y, configY); // We use `stopTogether: false` here because otherwise tracking will break\n // because the second animation will get stopped before it can update.\n\n return parallel([aX, aY], {\n stopTogether: false\n });\n }\n\n return null;\n};\n\nvar spring = function spring(value, config) {\n var _start = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n\n if (configuration.toValue instanceof AnimatedNode) {\n singleValue.track(new AnimatedTracking(singleValue, configuration.toValue, SpringAnimation, singleConfig, callback));\n } else {\n singleValue.animate(new SpringAnimation(singleConfig), callback);\n }\n };\n\n return maybeVectorAnim(value, config, spring) || {\n start: function start(callback) {\n _start(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations: iterations\n });\n\n _start(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\n\nvar timing = function timing(value, config) {\n var _start2 = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n\n if (configuration.toValue instanceof AnimatedNode) {\n singleValue.track(new AnimatedTracking(singleValue, configuration.toValue, TimingAnimation, singleConfig, callback));\n } else {\n singleValue.animate(new TimingAnimation(singleConfig), callback);\n }\n };\n\n return maybeVectorAnim(value, config, timing) || {\n start: function start(callback) {\n _start2(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations: iterations\n });\n\n _start2(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\n\nvar decay = function decay(value, config) {\n var _start3 = function start(animatedValue, configuration, callback) {\n callback = _combineCallbacks(callback, configuration);\n var singleValue = animatedValue;\n var singleConfig = configuration;\n singleValue.stopTracking();\n singleValue.animate(new DecayAnimation(singleConfig), callback);\n };\n\n return maybeVectorAnim(value, config, decay) || {\n start: function start(callback) {\n _start3(value, config, callback);\n },\n stop: function stop() {\n value.stopAnimation();\n },\n reset: function reset() {\n value.resetAnimation();\n },\n _startNativeLoop: function _startNativeLoop(iterations) {\n var singleConfig = _objectSpread(_objectSpread({}, config), {}, {\n iterations: iterations\n });\n\n _start3(value, singleConfig);\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return config.useNativeDriver || false;\n }\n };\n};\n\nvar sequence = function sequence(animations) {\n var current = 0;\n return {\n start: function start(callback) {\n var onComplete = function onComplete(result) {\n if (!result.finished) {\n callback && callback(result);\n return;\n }\n\n current++;\n\n if (current === animations.length) {\n callback && callback(result);\n return;\n }\n\n animations[current].start(onComplete);\n };\n\n if (animations.length === 0) {\n callback && callback({\n finished: true\n });\n } else {\n animations[current].start(onComplete);\n }\n },\n stop: function stop() {\n if (current < animations.length) {\n animations[current].stop();\n }\n },\n reset: function reset() {\n animations.forEach(function (animation, idx) {\n if (idx <= current) {\n animation.reset();\n }\n });\n current = 0;\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.sequence animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return false;\n }\n };\n};\n\nvar parallel = function parallel(animations, config) {\n var doneCount = 0; // Make sure we only call stop() at most once for each animation\n\n var hasEnded = {};\n var stopTogether = !(config && config.stopTogether === false);\n var result = {\n start: function start(callback) {\n if (doneCount === animations.length) {\n callback && callback({\n finished: true\n });\n return;\n }\n\n animations.forEach(function (animation, idx) {\n var cb = function cb(endResult) {\n hasEnded[idx] = true;\n doneCount++;\n\n if (doneCount === animations.length) {\n doneCount = 0;\n callback && callback(endResult);\n return;\n }\n\n if (!endResult.finished && stopTogether) {\n result.stop();\n }\n };\n\n if (!animation) {\n cb({\n finished: true\n });\n } else {\n animation.start(cb);\n }\n });\n },\n stop: function stop() {\n animations.forEach(function (animation, idx) {\n !hasEnded[idx] && animation.stop();\n hasEnded[idx] = true;\n });\n },\n reset: function reset() {\n animations.forEach(function (animation, idx) {\n animation.reset();\n hasEnded[idx] = false;\n doneCount = 0;\n });\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.parallel animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return false;\n }\n };\n return result;\n};\n\nvar delay = function delay(time) {\n // Would be nice to make a specialized implementation\n return timing(new AnimatedValue(0), {\n toValue: 0,\n delay: time,\n duration: 0,\n useNativeDriver: false\n });\n};\n\nvar stagger = function stagger(time, animations) {\n return parallel(animations.map(function (animation, i) {\n return sequence([delay(time * i), animation]);\n }));\n};\n\nvar loop = function loop(animation, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$iterations = _ref.iterations,\n iterations = _ref$iterations === void 0 ? -1 : _ref$iterations,\n _ref$resetBeforeItera = _ref.resetBeforeIteration,\n resetBeforeIteration = _ref$resetBeforeItera === void 0 ? true : _ref$resetBeforeItera;\n\n var isFinished = false;\n var iterationsSoFar = 0;\n return {\n start: function start(callback) {\n var restart = function restart(result) {\n if (result === void 0) {\n result = {\n finished: true\n };\n }\n\n if (isFinished || iterationsSoFar === iterations || result.finished === false) {\n callback && callback(result);\n } else {\n iterationsSoFar++;\n resetBeforeIteration && animation.reset();\n animation.start(restart);\n }\n };\n\n if (!animation || iterations === 0) {\n callback && callback({\n finished: true\n });\n } else {\n if (animation._isUsingNativeDriver()) {\n animation._startNativeLoop(iterations);\n } else {\n restart(); // Start looping recursively on the js thread\n }\n }\n },\n stop: function stop() {\n isFinished = true;\n animation.stop();\n },\n reset: function reset() {\n iterationsSoFar = 0;\n isFinished = false;\n animation.reset();\n },\n _startNativeLoop: function _startNativeLoop() {\n throw new Error('Loops run using the native driver cannot contain Animated.loop animations');\n },\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return animation._isUsingNativeDriver();\n }\n };\n};\n\nfunction forkEvent(event, listener) {\n if (!event) {\n return listener;\n } else if (event instanceof AnimatedEvent) {\n event.__addListener(listener);\n\n return event;\n } else {\n return function () {\n typeof event === 'function' && event.apply(void 0, arguments);\n listener.apply(void 0, arguments);\n };\n }\n}\n\nfunction unforkEvent(event, listener) {\n if (event && event instanceof AnimatedEvent) {\n event.__removeListener(listener);\n }\n}\n\nvar event = function event(argMapping, config) {\n var animatedEvent = new AnimatedEvent(argMapping, config);\n\n if (animatedEvent.__isNative) {\n return animatedEvent;\n } else {\n return animatedEvent.__getHandler();\n }\n};\n/**\n * The `Animated` library is designed to make animations fluid, powerful, and\n * easy to build and maintain. `Animated` focuses on declarative relationships\n * between inputs and outputs, with configurable transforms in between, and\n * simple `start`/`stop` methods to control time-based animation execution.\n * If additional transforms are added, be sure to include them in\n * AnimatedMock.js as well.\n *\n * See https://reactnative.dev/docs/animated.html\n */\n\n\nexport default {\n /**\n * Standard value class for driving animations. Typically initialized with\n * `new Animated.Value(0);`\n *\n * See https://reactnative.dev/docs/animated.html#value\n */\n Value: AnimatedValue,\n\n /**\n * 2D value class for driving 2D animations, such as pan gestures.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html\n */\n ValueXY: AnimatedValueXY,\n\n /**\n * Exported to use the Interpolation type in flow.\n *\n * See https://reactnative.dev/docs/animated.html#interpolation\n */\n Interpolation: AnimatedInterpolation,\n\n /**\n * Exported for ease of type checking. All animated values derive from this\n * class.\n *\n * See https://reactnative.dev/docs/animated.html#node\n */\n Node: AnimatedNode,\n\n /**\n * Animates a value from an initial velocity to zero based on a decay\n * coefficient.\n *\n * See https://reactnative.dev/docs/animated.html#decay\n */\n decay: decay,\n\n /**\n * Animates a value along a timed easing curve. The Easing module has tons of\n * predefined curves, or you can use your own function.\n *\n * See https://reactnative.dev/docs/animated.html#timing\n */\n timing: timing,\n\n /**\n * Animates a value according to an analytical spring model based on\n * damped harmonic oscillation.\n *\n * See https://reactnative.dev/docs/animated.html#spring\n */\n spring: spring,\n\n /**\n * Creates a new Animated value composed from two Animated values added\n * together.\n *\n * See https://reactnative.dev/docs/animated.html#add\n */\n add: add,\n\n /**\n * Creates a new Animated value composed by subtracting the second Animated\n * value from the first Animated value.\n *\n * See https://reactnative.dev/docs/animated.html#subtract\n */\n subtract: subtract,\n\n /**\n * Creates a new Animated value composed by dividing the first Animated value\n * by the second Animated value.\n *\n * See https://reactnative.dev/docs/animated.html#divide\n */\n divide: divide,\n\n /**\n * Creates a new Animated value composed from two Animated values multiplied\n * together.\n *\n * See https://reactnative.dev/docs/animated.html#multiply\n */\n multiply: multiply,\n\n /**\n * Creates a new Animated value that is the (non-negative) modulo of the\n * provided Animated value.\n *\n * See https://reactnative.dev/docs/animated.html#modulo\n */\n modulo: modulo,\n\n /**\n * Create a new Animated value that is limited between 2 values. It uses the\n * difference between the last value so even if the value is far from the\n * bounds it will start changing when the value starts getting closer again.\n *\n * See https://reactnative.dev/docs/animated.html#diffclamp\n */\n diffClamp: diffClamp,\n\n /**\n * Starts an animation after the given delay.\n *\n * See https://reactnative.dev/docs/animated.html#delay\n */\n delay: delay,\n\n /**\n * Starts an array of animations in order, waiting for each to complete\n * before starting the next. If the current running animation is stopped, no\n * following animations will be started.\n *\n * See https://reactnative.dev/docs/animated.html#sequence\n */\n sequence: sequence,\n\n /**\n * Starts an array of animations all at the same time. By default, if one\n * of the animations is stopped, they will all be stopped. You can override\n * this with the `stopTogether` flag.\n *\n * See https://reactnative.dev/docs/animated.html#parallel\n */\n parallel: parallel,\n\n /**\n * Array of animations may run in parallel (overlap), but are started in\n * sequence with successive delays. Nice for doing trailing effects.\n *\n * See https://reactnative.dev/docs/animated.html#stagger\n */\n stagger: stagger,\n\n /**\n * Loops a given animation continuously, so that each time it reaches the\n * end, it resets and begins again from the start.\n *\n * See https://reactnative.dev/docs/animated.html#loop\n */\n loop: loop,\n\n /**\n * Takes an array of mappings and extracts values from each arg accordingly,\n * then calls `setValue` on the mapped outputs.\n *\n * See https://reactnative.dev/docs/animated.html#event\n */\n event: event,\n\n /**\n * Make any React component Animatable. Used to create `Animated.View`, etc.\n *\n * See https://reactnative.dev/docs/animated.html#createanimatedcomponent\n */\n createAnimatedComponent: createAnimatedComponent,\n\n /**\n * Imperative API to attach an animated value to an event on a view. Prefer\n * using `Animated.event` with `useNativeDrive: true` if possible.\n *\n * See https://reactnative.dev/docs/animated.html#attachnativeevent\n */\n attachNativeEvent: attachNativeEvent,\n\n /**\n * Advanced imperative API for snooping on animated events that are passed in\n * through props. Use values directly where possible.\n *\n * See https://reactnative.dev/docs/animated.html#forkevent\n */\n forkEvent: forkEvent,\n unforkEvent: unforkEvent,\n\n /**\n * Expose Event class, so it can be used as a type for type checkers.\n */\n Event: AnimatedEvent,\n __PropsOnlyForTests: AnimatedProps\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { AnimatedEvent, attachNativeEvent } from './AnimatedEvent';\nimport AnimatedImplementation from './AnimatedImplementation';\nimport AnimatedInterpolation from './nodes/AnimatedInterpolation';\nimport AnimatedNode from './nodes/AnimatedNode';\nimport AnimatedProps from './nodes/AnimatedProps';\nimport AnimatedValue from './nodes/AnimatedValue';\nimport AnimatedValueXY from './nodes/AnimatedValueXY';\nimport createAnimatedComponent from './createAnimatedComponent';\nvar emptyAnimation = {\n start: function start() {},\n stop: function stop() {},\n reset: function reset() {},\n _startNativeLoop: function _startNativeLoop() {},\n _isUsingNativeDriver: function _isUsingNativeDriver() {\n return false;\n }\n};\n\nvar spring = function spring(value, config) {\n var anyValue = value;\n return _objectSpread(_objectSpread({}, emptyAnimation), {}, {\n start: function start(callback) {\n anyValue.setValue(config.toValue);\n callback && callback({\n finished: true\n });\n }\n });\n};\n\nvar timing = function timing(value, config) {\n var anyValue = value;\n return _objectSpread(_objectSpread({}, emptyAnimation), {}, {\n start: function start(callback) {\n anyValue.setValue(config.toValue);\n callback && callback({\n finished: true\n });\n }\n });\n};\n\nvar decay = function decay(value, config) {\n return emptyAnimation;\n};\n\nvar sequence = function sequence(animations) {\n return emptyAnimation;\n};\n\nvar parallel = function parallel(animations, config) {\n return emptyAnimation;\n};\n\nvar delay = function delay(time) {\n return emptyAnimation;\n};\n\nvar stagger = function stagger(time, animations) {\n return emptyAnimation;\n};\n\nvar loop = function loop(animation, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$iterations = _ref.iterations,\n iterations = _ref$iterations === void 0 ? -1 : _ref$iterations;\n\n return emptyAnimation;\n};\n\nvar event = function event(argMapping, config) {\n return null;\n};\n\nexport default {\n Value: AnimatedValue,\n ValueXY: AnimatedValueXY,\n Interpolation: AnimatedInterpolation,\n Node: AnimatedNode,\n decay: decay,\n timing: timing,\n spring: spring,\n add: AnimatedImplementation.add,\n subtract: AnimatedImplementation.subtract,\n divide: AnimatedImplementation.divide,\n multiply: AnimatedImplementation.multiply,\n modulo: AnimatedImplementation.modulo,\n diffClamp: AnimatedImplementation.diffClamp,\n delay: delay,\n sequence: sequence,\n parallel: parallel,\n stagger: stagger,\n loop: loop,\n event: event,\n createAnimatedComponent: createAnimatedComponent,\n attachNativeEvent: attachNativeEvent,\n forkEvent: AnimatedImplementation.forkEvent,\n unforkEvent: AnimatedImplementation.unforkEvent,\n Event: AnimatedEvent,\n __PropsOnlyForTests: AnimatedProps\n};","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport Platform from '../../../exports/Platform';\nimport FlatList from './components/AnimatedFlatList';\nimport Image from './components/AnimatedImage';\nimport ScrollView from './components/AnimatedScrollView';\nimport SectionList from './components/AnimatedSectionList';\nimport Text from './components/AnimatedText';\nimport View from './components/AnimatedView';\nimport AnimatedMock from './AnimatedMock';\nimport AnimatedImplementation from './AnimatedImplementation';\nvar Animated = Platform.isTesting ? AnimatedMock : AnimatedImplementation;\nexport default _objectSpread({\n FlatList: FlatList,\n Image: Image,\n ScrollView: ScrollView,\n SectionList: SectionList,\n Text: Text,\n View: View\n}, Animated);","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport Animated from '../../vendor/react-native/Animated/Animated';\nexport default Animated;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\n\nvar ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n canUseWorkers: typeof Worker !== 'undefined',\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n canUseViewport: canUseDOM && !!window.screen,\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\nmodule.exports = ExecutionEnvironment;","/**\n * Portions Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n\n/**\n * BezierEasing - use bezier curve for transition easing function\n * https://github.com/gre/bezier-easing\n * @copyright 2014-2015 Gaëtan Renaudeau. MIT License.\n */\n'use strict'; // These values are established by empiricism with tests (tradeoff: performance VS precision)\n\nvar NEWTON_ITERATIONS = 4;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\nvar float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n} // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\n\n\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n} // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\n\n\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, _aA, _aB, mX1, mX2) {\n var currentX,\n currentT,\n i = 0,\n aA = _aA,\n aB = _aB;\n\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n\n if (currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, _aGuessT, mX1, mX2) {\n var aGuessT = _aGuessT;\n\n for (var i = 0; i < NEWTON_ITERATIONS; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n\n if (currentSlope === 0.0) {\n return aGuessT;\n }\n\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n\n return aGuessT;\n}\n\nexport default function bezier(mX1, mY1, mX2, mY2) {\n if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n } // Precompute samples table\n\n\n var sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n\n function getTForX(aX) {\n var intervalStart = 0.0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample; // Interpolate to provide an initial guess for t\n\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n if (mX1 === mY1 && mX2 === mY2) {\n return x; // linear\n } // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n\n\n if (x === 0) {\n return 0;\n }\n\n if (x === 1) {\n return 1;\n }\n\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nimport _bezier from './bezier';\n\nvar _ease;\n/**\n * The `Easing` module implements common easing functions. This module is used\n * by [Animate.timing()](docs/animate.html#timing) to convey physically\n * believable motion in animations.\n *\n * You can find a visualization of some common easing functions at\n * http://easings.net/\n *\n * ### Predefined animations\n *\n * The `Easing` module provides several predefined animations through the\n * following methods:\n *\n * - [`back`](docs/easing.html#back) provides a simple animation where the\n * object goes slightly back before moving forward\n * - [`bounce`](docs/easing.html#bounce) provides a bouncing animation\n * - [`ease`](docs/easing.html#ease) provides a simple inertial animation\n * - [`elastic`](docs/easing.html#elastic) provides a simple spring interaction\n *\n * ### Standard functions\n *\n * Three standard easing functions are provided:\n *\n * - [`linear`](docs/easing.html#linear)\n * - [`quad`](docs/easing.html#quad)\n * - [`cubic`](docs/easing.html#cubic)\n *\n * The [`poly`](docs/easing.html#poly) function can be used to implement\n * quartic, quintic, and other higher power functions.\n *\n * ### Additional functions\n *\n * Additional mathematical functions are provided by the following methods:\n *\n * - [`bezier`](docs/easing.html#bezier) provides a cubic bezier curve\n * - [`circle`](docs/easing.html#circle) provides a circular function\n * - [`sin`](docs/easing.html#sin) provides a sinusoidal function\n * - [`exp`](docs/easing.html#exp) provides an exponential function\n *\n * The following helpers are used to modify other easing functions.\n *\n * - [`in`](docs/easing.html#in) runs an easing function forwards\n * - [`inOut`](docs/easing.html#inout) makes any easing function symmetrical\n * - [`out`](docs/easing.html#out) runs an easing function backwards\n */\n\n\nvar Easing = /*#__PURE__*/function () {\n function Easing() {}\n\n /**\n * A stepping function, returns 1 for any positive value of `n`.\n */\n Easing.step0 = function step0(n) {\n return n > 0 ? 1 : 0;\n }\n /**\n * A stepping function, returns 1 if `n` is greater than or equal to 1.\n */\n ;\n\n Easing.step1 = function step1(n) {\n return n >= 1 ? 1 : 0;\n }\n /**\n * A linear function, `f(t) = t`. Position correlates to elapsed time one to\n * one.\n *\n * http://cubic-bezier.com/#0,0,1,1\n */\n ;\n\n Easing.linear = function linear(t) {\n return t;\n }\n /**\n * A simple inertial interaction, similar to an object slowly accelerating to\n * speed.\n *\n * http://cubic-bezier.com/#.42,0,1,1\n */\n ;\n\n Easing.ease = function ease(t) {\n if (!_ease) {\n _ease = Easing.bezier(0.42, 0, 1, 1);\n }\n\n return _ease(t);\n }\n /**\n * A quadratic function, `f(t) = t * t`. Position equals the square of elapsed\n * time.\n *\n * http://easings.net/#easeInQuad\n */\n ;\n\n Easing.quad = function quad(t) {\n return t * t;\n }\n /**\n * A cubic function, `f(t) = t * t * t`. Position equals the cube of elapsed\n * time.\n *\n * http://easings.net/#easeInCubic\n */\n ;\n\n Easing.cubic = function cubic(t) {\n return t * t * t;\n }\n /**\n * A power function. Position is equal to the Nth power of elapsed time.\n *\n * n = 4: http://easings.net/#easeInQuart\n * n = 5: http://easings.net/#easeInQuint\n */\n ;\n\n Easing.poly = function poly(n) {\n return function (t) {\n return Math.pow(t, n);\n };\n }\n /**\n * A sinusoidal function.\n *\n * http://easings.net/#easeInSine\n */\n ;\n\n Easing.sin = function sin(t) {\n return 1 - Math.cos(t * Math.PI / 2);\n }\n /**\n * A circular function.\n *\n * http://easings.net/#easeInCirc\n */\n ;\n\n Easing.circle = function circle(t) {\n return 1 - Math.sqrt(1 - t * t);\n }\n /**\n * An exponential function.\n *\n * http://easings.net/#easeInExpo\n */\n ;\n\n Easing.exp = function exp(t) {\n return Math.pow(2, 10 * (t - 1));\n }\n /**\n * A simple elastic interaction, similar to a spring oscillating back and\n * forth.\n *\n * Default bounciness is 1, which overshoots a little bit once. 0 bounciness\n * doesn't overshoot at all, and bounciness of N > 1 will overshoot about N\n * times.\n *\n * http://easings.net/#easeInElastic\n */\n ;\n\n Easing.elastic = function elastic(bounciness) {\n if (bounciness === void 0) {\n bounciness = 1;\n }\n\n var p = bounciness * Math.PI;\n return function (t) {\n return 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);\n };\n }\n /**\n * Use with `Animated.parallel()` to create a simple effect where the object\n * animates back slightly as the animation starts.\n *\n * Wolfram Plot:\n *\n * - http://tiny.cc/back_default (s = 1.70158, default)\n */\n ;\n\n Easing.back = function back(s) {\n if (s === void 0) {\n s = 1.70158;\n }\n\n return function (t) {\n return t * t * ((s + 1) * t - s);\n };\n }\n /**\n * Provides a simple bouncing effect.\n *\n * http://easings.net/#easeInBounce\n */\n ;\n\n Easing.bounce = function bounce(t) {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n\n if (t < 2 / 2.75) {\n var _t = t - 1.5 / 2.75;\n\n return 7.5625 * _t * _t + 0.75;\n }\n\n if (t < 2.5 / 2.75) {\n var _t2 = t - 2.25 / 2.75;\n\n return 7.5625 * _t2 * _t2 + 0.9375;\n }\n\n var t2 = t - 2.625 / 2.75;\n return 7.5625 * t2 * t2 + 0.984375;\n }\n /**\n * Provides a cubic bezier curve, equivalent to CSS Transitions'\n * `transition-timing-function`.\n *\n * A useful tool to visualize cubic bezier curves can be found at\n * http://cubic-bezier.com/\n */\n ;\n\n Easing.bezier = function bezier(x1, y1, x2, y2) {\n return _bezier(x1, y1, x2, y2);\n }\n /**\n * Runs an easing function forwards.\n */\n ;\n\n Easing.in = function _in(easing) {\n return easing;\n }\n /**\n * Runs an easing function backwards.\n */\n ;\n\n Easing.out = function out(easing) {\n return function (t) {\n return 1 - easing(1 - t);\n };\n }\n /**\n * Makes any easing function symmetrical. The easing function will run\n * forwards for half of the duration, then backwards for the rest of the\n * duration.\n */\n ;\n\n Easing.inOut = function inOut(easing) {\n return function (t) {\n if (t < 0.5) {\n return easing(t * 2) / 2;\n }\n\n return 1 - easing((1 - t) * 2) / 2;\n };\n };\n\n return Easing;\n}();\n\nexport default Easing;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport Easing from '../../vendor/react-native/Animated/Easing';\nexport default Easing;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport NativeAnimatedNonTurboModule from './NativeAnimatedModule';\nimport NativeAnimatedTurboModule from './NativeAnimatedTurboModule';\nimport NativeEventEmitter from '../NativeEventEmitter';\nimport Platform from '../../../exports/Platform';\nimport invariant from 'fbjs/lib/invariant'; // TODO T69437152 @petetheheat - Delete this fork when Fabric ships to 100%.\n\nvar NativeAnimatedModule = Platform.OS === 'ios' && global.RN$Bridgeless ? NativeAnimatedTurboModule : NativeAnimatedNonTurboModule;\nvar __nativeAnimatedNodeTagCount = 1;\n/* used for animated nodes */\n\nvar __nativeAnimationIdCount = 1;\n/* used for started animations */\n\nvar nativeEventEmitter;\nvar waitingForQueuedOperations = new Set();\nvar queueOperations = false;\nvar queue = [];\n/**\n * Simple wrappers around NativeAnimatedModule to provide flow and autocomplete support for\n * the native module methods\n */\n\nvar API = {\n getValue: function getValue(tag, saveValueCallback) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n\n if (NativeAnimatedModule.getValue) {\n NativeAnimatedModule.getValue(tag, saveValueCallback);\n }\n },\n setWaitingForIdentifier: function setWaitingForIdentifier(id) {\n waitingForQueuedOperations.add(id);\n queueOperations = true;\n },\n unsetWaitingForIdentifier: function unsetWaitingForIdentifier(id) {\n waitingForQueuedOperations.delete(id);\n\n if (waitingForQueuedOperations.size === 0) {\n queueOperations = false;\n API.disableQueue();\n }\n },\n disableQueue: function disableQueue() {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n\n if (Platform.OS === 'android') {\n NativeAnimatedModule.startOperationBatch();\n }\n\n for (var q = 0, l = queue.length; q < l; q++) {\n queue[q]();\n }\n\n queue.length = 0;\n\n if (Platform.OS === 'android') {\n NativeAnimatedModule.finishOperationBatch();\n }\n },\n queueOperation: function queueOperation(fn) {\n if (queueOperations) {\n queue.push(fn);\n } else {\n fn();\n }\n },\n createAnimatedNode: function createAnimatedNode(tag, config) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.createAnimatedNode(tag, config);\n });\n },\n startListeningToAnimatedNodeValue: function startListeningToAnimatedNodeValue(tag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.startListeningToAnimatedNodeValue(tag);\n });\n },\n stopListeningToAnimatedNodeValue: function stopListeningToAnimatedNodeValue(tag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.stopListeningToAnimatedNodeValue(tag);\n });\n },\n connectAnimatedNodes: function connectAnimatedNodes(parentTag, childTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.connectAnimatedNodes(parentTag, childTag);\n });\n },\n disconnectAnimatedNodes: function disconnectAnimatedNodes(parentTag, childTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.disconnectAnimatedNodes(parentTag, childTag);\n });\n },\n startAnimatingNode: function startAnimatingNode(animationId, nodeTag, config, endCallback) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.startAnimatingNode(animationId, nodeTag, config, endCallback);\n });\n },\n stopAnimation: function stopAnimation(animationId) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.stopAnimation(animationId);\n });\n },\n setAnimatedNodeValue: function setAnimatedNodeValue(nodeTag, value) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.setAnimatedNodeValue(nodeTag, value);\n });\n },\n setAnimatedNodeOffset: function setAnimatedNodeOffset(nodeTag, offset) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.setAnimatedNodeOffset(nodeTag, offset);\n });\n },\n flattenAnimatedNodeOffset: function flattenAnimatedNodeOffset(nodeTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.flattenAnimatedNodeOffset(nodeTag);\n });\n },\n extractAnimatedNodeOffset: function extractAnimatedNodeOffset(nodeTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.extractAnimatedNodeOffset(nodeTag);\n });\n },\n connectAnimatedNodeToView: function connectAnimatedNodeToView(nodeTag, viewTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.connectAnimatedNodeToView(nodeTag, viewTag);\n });\n },\n disconnectAnimatedNodeFromView: function disconnectAnimatedNodeFromView(nodeTag, viewTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.disconnectAnimatedNodeFromView(nodeTag, viewTag);\n });\n },\n restoreDefaultValues: function restoreDefaultValues(nodeTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available'); // Backwards compat with older native runtimes, can be removed later.\n\n if (NativeAnimatedModule.restoreDefaultValues != null) {\n API.queueOperation(function () {\n return NativeAnimatedModule.restoreDefaultValues(nodeTag);\n });\n }\n },\n dropAnimatedNode: function dropAnimatedNode(tag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.dropAnimatedNode(tag);\n });\n },\n addAnimatedEventToView: function addAnimatedEventToView(viewTag, eventName, eventMapping) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.addAnimatedEventToView(viewTag, eventName, eventMapping);\n });\n },\n removeAnimatedEventFromView: function removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag) {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n API.queueOperation(function () {\n return NativeAnimatedModule.removeAnimatedEventFromView(viewTag, eventName, animatedNodeTag);\n });\n }\n};\n/**\n * Styles allowed by the native animated implementation.\n *\n * In general native animated implementation should support any numeric property that doesn't need\n * to be updated through the shadow view hierarchy (all non-layout properties).\n */\n\nvar SUPPORTED_STYLES = {\n opacity: true,\n transform: true,\n borderRadius: true,\n borderBottomEndRadius: true,\n borderBottomLeftRadius: true,\n borderBottomRightRadius: true,\n borderBottomStartRadius: true,\n borderTopEndRadius: true,\n borderTopLeftRadius: true,\n borderTopRightRadius: true,\n borderTopStartRadius: true,\n elevation: true,\n zIndex: true,\n\n /* ios styles */\n shadowOpacity: true,\n shadowRadius: true,\n\n /* legacy android transform properties */\n scaleX: true,\n scaleY: true,\n translateX: true,\n translateY: true\n};\nvar SUPPORTED_TRANSFORMS = {\n translateX: true,\n translateY: true,\n scale: true,\n scaleX: true,\n scaleY: true,\n rotate: true,\n rotateX: true,\n rotateY: true,\n rotateZ: true,\n perspective: true\n};\nvar SUPPORTED_INTERPOLATION_PARAMS = {\n inputRange: true,\n outputRange: true,\n extrapolate: true,\n extrapolateRight: true,\n extrapolateLeft: true\n};\n\nfunction addWhitelistedStyleProp(prop) {\n SUPPORTED_STYLES[prop] = true;\n}\n\nfunction addWhitelistedTransformProp(prop) {\n SUPPORTED_TRANSFORMS[prop] = true;\n}\n\nfunction addWhitelistedInterpolationParam(param) {\n SUPPORTED_INTERPOLATION_PARAMS[param] = true;\n}\n\nfunction validateTransform(configs) {\n configs.forEach(function (config) {\n if (!SUPPORTED_TRANSFORMS.hasOwnProperty(config.property)) {\n throw new Error(\"Property '\" + config.property + \"' is not supported by native animated module\");\n }\n });\n}\n\nfunction validateStyles(styles) {\n for (var _key in styles) {\n if (!SUPPORTED_STYLES.hasOwnProperty(_key)) {\n throw new Error(\"Style property '\" + _key + \"' is not supported by native animated module\");\n }\n }\n}\n\nfunction validateInterpolation(config) {\n for (var _key2 in config) {\n if (!SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(_key2)) {\n throw new Error(\"Interpolation property '\" + _key2 + \"' is not supported by native animated module\");\n }\n }\n}\n\nfunction generateNewNodeTag() {\n return __nativeAnimatedNodeTagCount++;\n}\n\nexport function generateNewAnimationId() {\n return __nativeAnimationIdCount++;\n}\n\nfunction assertNativeAnimatedModule() {\n invariant(NativeAnimatedModule, 'Native animated module is not available');\n}\n\nvar _warnedMissingNativeAnimated = false;\nexport function shouldUseNativeDriver(config) {\n if (config.useNativeDriver == null) {\n console.warn('Animated: `useNativeDriver` was not specified. This is a required ' + 'option and must be explicitly set to `true` or `false`');\n }\n\n if (config.useNativeDriver === true && !NativeAnimatedModule) {\n if (!_warnedMissingNativeAnimated) {\n console.warn('Animated: `useNativeDriver` is not supported because the native ' + 'animated module is missing. Falling back to JS-based animation. To ' + 'resolve this, add `RCTAnimation` module to this app, or remove ' + '`useNativeDriver`. ' + 'Make sure to run `pod install` first. Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md');\n _warnedMissingNativeAnimated = true;\n }\n\n return false;\n }\n\n return config.useNativeDriver || false;\n}\n\nfunction transformDataType(value) {\n // Change the string type to number type so we can reuse the same logic in\n // iOS and Android platform\n if (typeof value !== 'string') {\n return value;\n }\n\n if (/deg$/.test(value)) {\n var degrees = parseFloat(value) || 0;\n var radians = degrees * Math.PI / 180.0;\n return radians;\n } else {\n return value;\n }\n}\n\nexport default {\n API: API,\n addWhitelistedStyleProp: addWhitelistedStyleProp,\n addWhitelistedTransformProp: addWhitelistedTransformProp,\n addWhitelistedInterpolationParam: addWhitelistedInterpolationParam,\n validateStyles: validateStyles,\n validateTransform: validateTransform,\n validateInterpolation: validateInterpolation,\n generateNewNodeTag: generateNewNodeTag,\n generateNewAnimationId: generateNewAnimationId,\n assertNativeAnimatedModule: assertNativeAnimatedModule,\n shouldUseNativeDriver: shouldUseNativeDriver,\n transformDataType: transformDataType,\n\n // $FlowExpectedError - unsafe getter lint suppresion\n get nativeEventEmitter() {\n if (!nativeEventEmitter) {\n nativeEventEmitter = new NativeEventEmitter(NativeAnimatedModule);\n }\n\n return nativeEventEmitter;\n }\n\n};","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1; // Note(vjeux): this would be better as an interface but flow doesn't\n// support them yet\n\nvar AnimatedNode = /*#__PURE__*/function () {\n var _proto = AnimatedNode.prototype;\n\n _proto.__attach = function __attach() {};\n\n _proto.__detach = function __detach() {\n if (this.__isNative && this.__nativeTag != null) {\n NativeAnimatedHelper.API.dropAnimatedNode(this.__nativeTag);\n this.__nativeTag = undefined;\n }\n };\n\n _proto.__getValue = function __getValue() {};\n\n _proto.__getAnimatedValue = function __getAnimatedValue() {\n return this.__getValue();\n };\n\n _proto.__addChild = function __addChild(child) {};\n\n _proto.__removeChild = function __removeChild(child) {};\n\n _proto.__getChildren = function __getChildren() {\n return [];\n }\n /* Methods and props used by native Animated impl */\n ;\n\n function AnimatedNode() {\n this._listeners = {};\n }\n\n _proto.__makeNative = function __makeNative() {\n if (!this.__isNative) {\n throw new Error('This node cannot be made a \"native\" animated node');\n }\n\n if (this.hasListeners()) {\n this._startListeningToNativeValueUpdates();\n }\n }\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to\n * synchronously read the value because it might be driven natively.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#addlistener\n */\n ;\n\n _proto.addListener = function addListener(callback) {\n var id = String(_uniqueId++);\n this._listeners[id] = callback;\n\n if (this.__isNative) {\n this._startListeningToNativeValueUpdates();\n }\n\n return id;\n }\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#removelistener\n */\n ;\n\n _proto.removeListener = function removeListener(id) {\n delete this._listeners[id];\n\n if (this.__isNative && !this.hasListeners()) {\n this._stopListeningForNativeValueUpdates();\n }\n }\n /**\n * Remove all registered listeners.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#removealllisteners\n */\n ;\n\n _proto.removeAllListeners = function removeAllListeners() {\n this._listeners = {};\n\n if (this.__isNative) {\n this._stopListeningForNativeValueUpdates();\n }\n };\n\n _proto.hasListeners = function hasListeners() {\n return !!Object.keys(this._listeners).length;\n };\n\n _proto._startListeningToNativeValueUpdates = function _startListeningToNativeValueUpdates() {\n var _this = this;\n\n if (this.__nativeAnimatedValueListener && !this.__shouldUpdateListenersForNewNativeTag) {\n return;\n }\n\n if (this.__shouldUpdateListenersForNewNativeTag) {\n this.__shouldUpdateListenersForNewNativeTag = false;\n\n this._stopListeningForNativeValueUpdates();\n }\n\n NativeAnimatedAPI.startListeningToAnimatedNodeValue(this.__getNativeTag());\n this.__nativeAnimatedValueListener = NativeAnimatedHelper.nativeEventEmitter.addListener('onAnimatedValueUpdate', function (data) {\n if (data.tag !== _this.__getNativeTag()) {\n return;\n }\n\n _this._onAnimatedValueUpdateReceived(data.value);\n });\n };\n\n _proto._onAnimatedValueUpdateReceived = function _onAnimatedValueUpdateReceived(value) {\n this.__callListeners(value);\n };\n\n _proto.__callListeners = function __callListeners(value) {\n for (var _key in this._listeners) {\n this._listeners[_key]({\n value: value\n });\n }\n };\n\n _proto._stopListeningForNativeValueUpdates = function _stopListeningForNativeValueUpdates() {\n if (!this.__nativeAnimatedValueListener) {\n return;\n }\n\n this.__nativeAnimatedValueListener.remove();\n\n this.__nativeAnimatedValueListener = null;\n NativeAnimatedAPI.stopListeningToAnimatedNodeValue(this.__getNativeTag());\n };\n\n _proto.__getNativeTag = function __getNativeTag() {\n var _this$__nativeTag;\n\n NativeAnimatedHelper.assertNativeAnimatedModule();\n invariant(this.__isNative, 'Attempt to get native tag from node not marked as \"native\"');\n var nativeTag = (_this$__nativeTag = this.__nativeTag) !== null && _this$__nativeTag !== void 0 ? _this$__nativeTag : NativeAnimatedHelper.generateNewNodeTag();\n\n if (this.__nativeTag == null) {\n this.__nativeTag = nativeTag;\n NativeAnimatedHelper.API.createAnimatedNode(nativeTag, this.__getNativeConfig());\n this.__shouldUpdateListenersForNewNativeTag = true;\n }\n\n return nativeTag;\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n throw new Error('This JS animated node type cannot be used as native animated node');\n };\n\n _proto.toJSON = function toJSON() {\n return this.__getValue();\n };\n\n return AnimatedNode;\n}();\n\nexport default AnimatedNode;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var _typeof = require(\"@babel/runtime/helpers/typeof\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport InteractionManager from '../../../../exports/InteractionManager';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar NativeAnimatedAPI = NativeAnimatedHelper.API;\n/**\n * Animated works by building a directed acyclic graph of dependencies\n * transparently when you render your Animated components.\n *\n * new Animated.Value(0)\n * .interpolate() .interpolate() new Animated.Value(1)\n * opacity translateY scale\n * style transform\n * View#234 style\n * View#123\n *\n * A) Top Down phase\n * When an Animated.Value is updated, we recursively go down through this\n * graph in order to find leaf nodes: the views that we flag as needing\n * an update.\n *\n * B) Bottom Up phase\n * When a view is flagged as needing an update, we recursively go back up\n * in order to build the new value that it needs. The reason why we need\n * this two-phases process is to deal with composite props such as\n * transform which can receive values from multiple parents.\n */\n\nfunction _flush(rootNode) {\n var animatedStyles = new Set();\n\n function findAnimatedStyles(node) {\n /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.68 was deployed. To see the error delete this\n * comment and run Flow. */\n if (typeof node.update === 'function') {\n animatedStyles.add(node);\n } else {\n node.__getChildren().forEach(findAnimatedStyles);\n }\n }\n\n findAnimatedStyles(rootNode);\n /* $FlowFixMe */\n\n animatedStyles.forEach(function (animatedStyle) {\n return animatedStyle.update();\n });\n}\n/**\n * Standard value for driving animations. One `Animated.Value` can drive\n * multiple properties in a synchronized fashion, but can only be driven by one\n * mechanism at a time. Using a new mechanism (e.g. starting a new animation,\n * or calling `setValue`) will stop any previous ones.\n *\n * See https://reactnative.dev/docs/animatedvalue.html\n */\n\n\nvar AnimatedValue = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedValue, _AnimatedWithChildren);\n\n function AnimatedValue(value) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n\n if (typeof value !== 'number') {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n\n _this._startingValue = _this._value = value;\n _this._offset = 0;\n _this._animation = null;\n return _this;\n }\n\n var _proto = AnimatedValue.prototype;\n\n _proto.__detach = function __detach() {\n var _this2 = this;\n\n if (this.__isNative) {\n NativeAnimatedAPI.getValue(this.__getNativeTag(), function (value) {\n _this2._value = value;\n });\n }\n\n this.stopAnimation();\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n return this._value + this._offset;\n }\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#setvalue\n */\n ;\n\n _proto.setValue = function setValue(value) {\n if (this._animation) {\n this._animation.stop();\n\n this._animation = null;\n }\n\n this._updateValue(value, !this.__isNative\n /* don't perform a flush for natively driven values */\n );\n\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeValue(this.__getNativeTag(), value);\n }\n }\n /**\n * Sets an offset that is applied on top of whatever value is set, whether via\n * `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#setoffset\n */\n ;\n\n _proto.setOffset = function setOffset(offset) {\n this._offset = offset;\n\n if (this.__isNative) {\n NativeAnimatedAPI.setAnimatedNodeOffset(this.__getNativeTag(), offset);\n }\n }\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#flattenoffset\n */\n ;\n\n _proto.flattenOffset = function flattenOffset() {\n this._value += this._offset;\n this._offset = 0;\n\n if (this.__isNative) {\n NativeAnimatedAPI.flattenAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n /**\n * Sets the offset value to the base value, and resets the base value to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#extractoffset\n */\n ;\n\n _proto.extractOffset = function extractOffset() {\n this._offset += this._value;\n this._value = 0;\n\n if (this.__isNative) {\n NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());\n }\n }\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#stopanimation\n */\n ;\n\n _proto.stopAnimation = function stopAnimation(callback) {\n this.stopTracking();\n this._animation && this._animation.stop();\n this._animation = null;\n callback && callback(this.__getValue());\n }\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#resetanimation\n */\n ;\n\n _proto.resetAnimation = function resetAnimation(callback) {\n this.stopAnimation(callback);\n this._value = this._startingValue;\n };\n\n _proto._onAnimatedValueUpdateReceived = function _onAnimatedValueUpdateReceived(value) {\n this._updateValue(value, false\n /*flush*/\n );\n }\n /**\n * Interpolates the value before updating the property, e.g. mapping 0-1 to\n * 0-10.\n */\n ;\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n }\n /**\n * Typically only used internally, but could be used by a custom Animation\n * class.\n *\n * See https://reactnative.dev/docs/animatedvalue.html#animate\n */\n ;\n\n _proto.animate = function animate(animation, callback) {\n var _this3 = this;\n\n var handle = null;\n\n if (animation.__isInteraction) {\n handle = InteractionManager.createInteractionHandle();\n }\n\n var previousAnimation = this._animation;\n this._animation && this._animation.stop();\n this._animation = animation;\n animation.start(this._value, function (value) {\n // Natively driven animations will never call into that callback, therefore we can always\n // pass flush = true to allow the updated value to propagate to native with setNativeProps\n _this3._updateValue(value, true\n /* flush */\n );\n }, function (result) {\n _this3._animation = null;\n\n if (handle !== null) {\n InteractionManager.clearInteractionHandle(handle);\n }\n\n callback && callback(result);\n }, previousAnimation, this);\n }\n /**\n * Typically only used internally.\n */\n ;\n\n _proto.stopTracking = function stopTracking() {\n this._tracking && this._tracking.__detach();\n this._tracking = null;\n }\n /**\n * Typically only used internally.\n */\n ;\n\n _proto.track = function track(tracking) {\n this.stopTracking();\n this._tracking = tracking;\n };\n\n _proto._updateValue = function _updateValue(value, flush) {\n if (value === undefined) {\n throw new Error('AnimatedValue: Attempting to set value to undefined');\n }\n\n this._value = value;\n\n if (flush) {\n _flush(this);\n }\n\n _AnimatedWithChildren.prototype.__callListeners.call(this, this.__getValue());\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n return {\n type: 'value',\n value: this._value,\n offset: this._offset\n };\n };\n\n return AnimatedValue;\n}(AnimatedWithChildren);\n\nexport default AnimatedValue;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport var defaultProps = {\n children: true,\n dataSet: true,\n nativeID: true,\n ref: true,\n suppressHydrationWarning: true,\n testID: true\n};\nexport var accessibilityProps = {\n accessibilityActiveDescendant: true,\n accessibilityAtomic: true,\n accessibilityAutoComplete: true,\n accessibilityBusy: true,\n accessibilityChecked: true,\n accessibilityColumnCount: true,\n accessibilityColumnIndex: true,\n accessibilityColumnSpan: true,\n accessibilityControls: true,\n accessibilityCurrent: true,\n accessibilityDescribedBy: true,\n accessibilityDetails: true,\n accessibilityDisabled: true,\n accessibilityErrorMessage: true,\n accessibilityExpanded: true,\n accessibilityFlowTo: true,\n accessibilityHasPopup: true,\n accessibilityHidden: true,\n accessibilityInvalid: true,\n accessibilityKeyShortcuts: true,\n accessibilityLabel: true,\n accessibilityLabelledBy: true,\n accessibilityLevel: true,\n accessibilityLiveRegion: true,\n accessibilityModal: true,\n accessibilityMultiline: true,\n accessibilityMultiSelectable: true,\n accessibilityOrientation: true,\n accessibilityOwns: true,\n accessibilityPlaceholder: true,\n accessibilityPosInSet: true,\n accessibilityPressed: true,\n accessibilityReadOnly: true,\n accessibilityRequired: true,\n accessibilityRole: true,\n accessibilityRoleDescription: true,\n accessibilityRowCount: true,\n accessibilityRowIndex: true,\n accessibilityRowSpan: true,\n accessibilitySelected: true,\n accessibilitySetSize: true,\n accessibilitySort: true,\n accessibilityValueMax: true,\n accessibilityValueMin: true,\n accessibilityValueNow: true,\n accessibilityValueText: true,\n dir: true,\n focusable: true,\n // Deprecated\n accessible: true,\n accessibilityState: true,\n accessibilityValue: true\n};\nexport var clickProps = {\n onClick: true,\n onClickCapture: true,\n onContextMenu: true\n};\nexport var focusProps = {\n onBlur: true,\n onFocus: true\n};\nexport var keyboardProps = {\n onKeyDown: true,\n onKeyDownCapture: true,\n onKeyUp: true,\n onKeyUpCapture: true\n};\nexport var mouseProps = {\n onMouseDown: true,\n onMouseEnter: true,\n onMouseLeave: true,\n onMouseMove: true,\n onMouseOver: true,\n onMouseOut: true,\n onMouseUp: true\n};\nexport var touchProps = {\n onTouchCancel: true,\n onTouchCancelCapture: true,\n onTouchEnd: true,\n onTouchEndCapture: true,\n onTouchMove: true,\n onTouchMoveCapture: true,\n onTouchStart: true,\n onTouchStartCapture: true\n};\nexport var styleProps = {\n classList: true,\n style: true\n};","/* eslint-disable */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * From React 16.0.0\n * \n */\nimport isUnitlessNumber from '../unitlessNumbers';\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return ('' + value).trim();\n}\n\nexport default dangerousStyleValue;","/* eslint-disable */\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * From React 16.3.0\n * \n */\nimport dangerousStyleValue from './dangerousStyleValue';\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n}\n\nexport default setValueForStyles;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport getBoundingClientRect from '../../modules/getBoundingClientRect';\nimport setValueForStyles from '../../modules/setValueForStyles';\n\nvar getRect = function getRect(node) {\n // Unlike the DOM's getBoundingClientRect, React Native layout measurements\n // for \"height\" and \"width\" ignore scale transforms.\n // https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements\n var _getBoundingClientRec = getBoundingClientRect(node),\n x = _getBoundingClientRec.x,\n y = _getBoundingClientRec.y,\n top = _getBoundingClientRec.top,\n left = _getBoundingClientRec.left;\n\n var width = node.offsetWidth;\n var height = node.offsetHeight;\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n top: top,\n left: left\n };\n};\n\nvar _measureLayout = function measureLayout(node, relativeToNativeNode, callback) {\n var relativeNode = relativeToNativeNode || node && node.parentNode;\n\n if (node && relativeNode) {\n setTimeout(function () {\n var relativeRect = getBoundingClientRect(relativeNode);\n\n var _getRect = getRect(node),\n height = _getRect.height,\n left = _getRect.left,\n top = _getRect.top,\n width = _getRect.width;\n\n var x = left - relativeRect.left;\n var y = top - relativeRect.top;\n callback(x, y, width, height, left, top);\n }, 0);\n }\n};\n\nvar focusableElements = {\n A: true,\n INPUT: true,\n SELECT: true,\n TEXTAREA: true\n};\nvar UIManager = {\n blur: function blur(node) {\n try {\n node.blur();\n } catch (err) {}\n },\n focus: function focus(node) {\n try {\n var name = node.nodeName; // A tabIndex of -1 allows element to be programmatically focused but\n // prevents keyboard focus, so we don't want to set the value on elements\n // that support keyboard focus by default.\n\n if (node.getAttribute('tabIndex') == null && focusableElements[name] == null) {\n node.setAttribute('tabIndex', '-1');\n }\n\n node.focus();\n } catch (err) {}\n },\n measure: function measure(node, callback) {\n _measureLayout(node, null, callback);\n },\n measureInWindow: function measureInWindow(node, callback) {\n if (node) {\n setTimeout(function () {\n var _getRect2 = getRect(node),\n height = _getRect2.height,\n left = _getRect2.left,\n top = _getRect2.top,\n width = _getRect2.width;\n\n callback(left, top, width, height);\n }, 0);\n }\n },\n measureLayout: function measureLayout(node, relativeToNativeNode, onFail, onSuccess) {\n _measureLayout(node, relativeToNativeNode, onSuccess);\n },\n updateView: function updateView(node, props) {\n for (var prop in props) {\n if (!Object.prototype.hasOwnProperty.call(props, prop)) {\n continue;\n }\n\n var value = props[prop];\n\n switch (prop) {\n case 'style':\n {\n setValueForStyles(node, value);\n break;\n }\n\n case 'class':\n case 'className':\n {\n node.setAttribute('class', value);\n break;\n }\n\n case 'text':\n case 'value':\n // native platforms use `text` prop to replace text input value\n node.value = value;\n break;\n\n default:\n node.setAttribute(prop, value);\n }\n }\n },\n configureNextLayoutAnimation: function configureNextLayoutAnimation(config, onAnimationDidEnd) {\n onAnimationDidEnd();\n },\n // mocks\n setLayoutAnimationEnabledExperimental: function setLayoutAnimationEnabledExperimental() {}\n};\nexport default UIManager;","import React from 'react';\nimport { Animated, View, ViewProps, ImageProps, Image } from 'react-native';\nimport {\n ScreenProps,\n ScreenContainerProps,\n ScreenStackProps,\n ScreenStackHeaderConfigProps,\n HeaderSubviewTypes,\n} from './types';\n\nexport * from './types';\n\nlet ENABLE_SCREENS = true;\n\nexport function enableScreens(shouldEnableScreens = true): void {\n ENABLE_SCREENS = shouldEnableScreens;\n}\n\nexport function screensEnabled(): boolean {\n return ENABLE_SCREENS;\n}\n\nexport class NativeScreen extends React.Component<ScreenProps> {\n render(): JSX.Element {\n let { active, activityState, style, enabled = true, ...rest } = this.props;\n if (active !== undefined && activityState === undefined) {\n activityState = active !== 0 ? 2 : 0; // change taken from index.native.tsx\n }\n return (\n <View\n style={[\n style,\n ENABLE_SCREENS && enabled && activityState !== 2\n ? { display: 'none' }\n : null,\n ]}\n {...rest}\n />\n );\n }\n}\n\nexport const Screen = Animated.createAnimatedComponent(NativeScreen);\n\nexport const ScreenContainer: React.ComponentType<ScreenContainerProps> = View;\n\nexport const NativeScreenContainer: React.ComponentType<ScreenContainerProps> = View;\n\nexport const ScreenStack: React.ComponentType<ScreenStackProps> = View;\n\nexport const ScreenStackHeaderBackButtonImage = (\n props: ImageProps\n): JSX.Element => (\n <View>\n <Image resizeMode=\"center\" fadeDuration={0} {...props} />\n </View>\n);\n\nexport const ScreenStackHeaderRightView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderLeftView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderCenterView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderConfig: React.ComponentType<ScreenStackHeaderConfigProps> = View;\n\nexport const ScreenStackHeaderSubview: React.ComponentType<React.PropsWithChildren<\n ViewProps & { type?: HeaderSubviewTypes }\n>> = View;\n\nexport const shouldUseActivityState = true;\n","import { isComputedProp, isObservableProp, createAtom, action, computed, _allowStateChangesInsideComputed, reaction, runInAction, observable, values, entries, _getGlobalState, isObservableArray, ObservableMap, _interceptReads, intercept, observe, _getAdministration, set, makeObservable, getAtom } from 'mobx';\n\nvar livelinessChecking = \"warn\";\n/**\n * Defines what MST should do when running into reads / writes to objects that have died.\n * By default it will print a warning.\n * Use the `\"error\"` option to easy debugging to see where the error was thrown and when the offending read / write took place\n *\n * @param mode `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction setLivelinessChecking(mode) {\n livelinessChecking = mode;\n}\n/**\n * Returns the current liveliness checking mode.\n *\n * @returns `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction getLivelinessChecking() {\n return livelinessChecking;\n}\n/**\n * @deprecated use setLivelinessChecking instead\n * @hidden\n *\n * Defines what MST should do when running into reads / writes to objects that have died.\n * By default it will print a warning.\n * Use the `\"error\"` option to easy debugging to see where the error was thrown and when the offending read / write took place\n *\n * @param mode `\"warn\"`, `\"error\"` or `\"ignore\"`\n */\nfunction setLivelynessChecking(mode) {\n setLivelinessChecking(mode);\n}\n\n/**\n * @hidden\n */\nvar Hook;\n(function (Hook) {\n Hook[\"afterCreate\"] = \"afterCreate\";\n Hook[\"afterAttach\"] = \"afterAttach\";\n Hook[\"afterCreationFinalization\"] = \"afterCreationFinalization\";\n Hook[\"beforeDetach\"] = \"beforeDetach\";\n Hook[\"beforeDestroy\"] = \"beforeDestroy\";\n})(Hook || (Hook = {}));\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nvar __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n};\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nfunction __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nfunction __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nfunction __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\n\n/**\n * Returns the _actual_ type of the given tree node. (Or throws)\n *\n * @param object\n * @returns\n */\nfunction getType(object) {\n assertIsStateTreeNode(object, 1);\n return getStateTreeNode(object).type;\n}\n/**\n * Returns the _declared_ type of the given sub property of an object, array or map.\n * In the case of arrays and maps the property name is optional and will be ignored.\n *\n * Example:\n * ```ts\n * const Box = types.model({ x: 0, y: 0 })\n * const box = Box.create()\n *\n * console.log(getChildType(box, \"x\").name) // 'number'\n * ```\n *\n * @param object\n * @param propertyName\n * @returns\n */\nfunction getChildType(object, propertyName) {\n assertIsStateTreeNode(object, 1);\n return getStateTreeNode(object).getChildType(propertyName);\n}\n/**\n * Registers a function that will be invoked for each mutation that is applied to the provided model instance, or to any of its children.\n * See [patches](https://github.com/mobxjs/mobx-state-tree#patches) for more details. onPatch events are emitted immediately and will not await the end of a transaction.\n * Patches can be used to deep observe a model tree.\n *\n * @param target the model instance from which to receive patches\n * @param callback the callback that is invoked for each patch. The reversePatch is a patch that would actually undo the emitted patch\n * @returns function to remove the listener\n */\nfunction onPatch(target, callback) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsFunction(callback, 2);\n return getStateTreeNode(target).onPatch(callback);\n}\n/**\n * Registers a function that is invoked whenever a new snapshot for the given model instance is available.\n * The listener will only be fire at the end of the current MobX (trans)action.\n * See [snapshots](https://github.com/mobxjs/mobx-state-tree#snapshots) for more details.\n *\n * @param target\n * @param callback\n * @returns\n */\nfunction onSnapshot(target, callback) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsFunction(callback, 2);\n return getStateTreeNode(target).onSnapshot(callback);\n}\n/**\n * Applies a JSON-patch to the given model instance or bails out if the patch couldn't be applied\n * See [patches](https://github.com/mobxjs/mobx-state-tree#patches) for more details.\n *\n * Can apply a single past, or an array of patches.\n *\n * @param target\n * @param patch\n * @returns\n */\nfunction applyPatch(target, patch) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertArg(patch, function (p) { return typeof p === \"object\"; }, \"object or array\", 2);\n getStateTreeNode(target).applyPatches(asArray(patch));\n}\n/**\n * Small abstraction around `onPatch` and `applyPatch`, attaches a patch listener to a tree and records all the patches.\n * Returns an recorder object with the following signature:\n *\n * Example:\n * ```ts\n * export interface IPatchRecorder {\n * // the recorded patches\n * patches: IJsonPatch[]\n * // the inverse of the recorded patches\n * inversePatches: IJsonPatch[]\n * // true if currently recording\n * recording: boolean\n * // stop recording patches\n * stop(): void\n * // resume recording patches\n * resume(): void\n * // apply all the recorded patches on the given target (the original subject if omitted)\n * replay(target?: IAnyStateTreeNode): void\n * // reverse apply the recorded patches on the given target (the original subject if omitted)\n * // stops the recorder if not already stopped\n * undo(): void\n * }\n * ```\n *\n * The optional filter function allows to skip recording certain patches.\n *\n * @param subject\n * @param filter\n * @returns\n */\nfunction recordPatches(subject, filter) {\n // check all arguments\n assertIsStateTreeNode(subject, 1);\n var data = {\n patches: [],\n reversedInversePatches: []\n };\n // we will generate the immutable copy of patches on demand for public consumption\n var publicData = {};\n var disposer;\n var recorder = {\n get recording() {\n return !!disposer;\n },\n get patches() {\n if (!publicData.patches) {\n publicData.patches = data.patches.slice();\n }\n return publicData.patches;\n },\n get reversedInversePatches() {\n if (!publicData.reversedInversePatches) {\n publicData.reversedInversePatches = data.reversedInversePatches.slice();\n }\n return publicData.reversedInversePatches;\n },\n get inversePatches() {\n if (!publicData.inversePatches) {\n publicData.inversePatches = data.reversedInversePatches.slice().reverse();\n }\n return publicData.inversePatches;\n },\n stop: function () {\n if (disposer) {\n disposer();\n disposer = undefined;\n }\n },\n resume: function () {\n if (disposer)\n return;\n disposer = onPatch(subject, function (patch, inversePatch) {\n // skip patches that are asked to be filtered if there's a filter in place\n if (filter && !filter(patch, inversePatch, getRunningActionContext())) {\n return;\n }\n data.patches.push(patch);\n data.reversedInversePatches.unshift(inversePatch);\n // mark immutable public patches as dirty\n publicData.patches = undefined;\n publicData.inversePatches = undefined;\n publicData.reversedInversePatches = undefined;\n });\n },\n replay: function (target) {\n applyPatch(target || subject, data.patches);\n },\n undo: function (target) {\n applyPatch(target || subject, data.reversedInversePatches);\n }\n };\n recorder.resume();\n return recorder;\n}\n/**\n * The inverse of `unprotect`.\n *\n * @param target\n */\nfunction protect(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n if (!node.isRoot)\n throw fail$1(\"`protect` can only be invoked on root nodes\");\n node.isProtectionEnabled = true;\n}\n/**\n * By default it is not allowed to directly modify a model. Models can only be modified through actions.\n * However, in some cases you don't care about the advantages (like replayability, traceability, etc) this yields.\n * For example because you are building a PoC or don't have any middleware attached to your tree.\n *\n * In that case you can disable this protection by calling `unprotect` on the root of your tree.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * done: false\n * }).actions(self => ({\n * toggle() {\n * self.done = !self.done\n * }\n * }))\n *\n * const todo = Todo.create()\n * todo.done = true // throws!\n * todo.toggle() // OK\n * unprotect(todo)\n * todo.done = false // OK\n * ```\n */\nfunction unprotect(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n if (!node.isRoot)\n throw fail$1(\"`unprotect` can only be invoked on root nodes\");\n node.isProtectionEnabled = false;\n}\n/**\n * Returns true if the object is in protected mode, @see protect\n */\nfunction isProtected(target) {\n return getStateTreeNode(target).isProtected;\n}\n/**\n * Applies a snapshot to a given model instances. Patch and snapshot listeners will be invoked as usual.\n *\n * @param target\n * @param snapshot\n * @returns\n */\nfunction applySnapshot(target, snapshot) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).applySnapshot(snapshot);\n}\n/**\n * Calculates a snapshot from the given model instance. The snapshot will always reflect the latest state but use\n * structural sharing where possible. Doesn't require MobX transactions to be completed.\n *\n * @param target\n * @param applyPostProcess If true (the default) then postProcessSnapshot gets applied.\n * @returns\n */\nfunction getSnapshot(target, applyPostProcess) {\n if (applyPostProcess === void 0) { applyPostProcess = true; }\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n if (applyPostProcess)\n return node.snapshot;\n return freeze(node.type.getSnapshot(node, false));\n}\n/**\n * Given a model instance, returns `true` if the object has a parent, that is, is part of another object, map or array.\n *\n * @param target\n * @param depth How far should we look upward? 1 by default.\n * @returns\n */\nfunction hasParent(target, depth) {\n if (depth === void 0) { depth = 1; }\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsNumber(depth, 2, 0);\n var parent = getStateTreeNode(target).parent;\n while (parent) {\n if (--depth === 0)\n return true;\n parent = parent.parent;\n }\n return false;\n}\n/**\n * Returns the immediate parent of this object, or throws.\n *\n * Note that the immediate parent can be either an object, map or array, and\n * doesn't necessarily refer to the parent model.\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired.\n *\n * @param target\n * @param depth How far should we look upward? 1 by default.\n * @returns\n */\nfunction getParent(target, depth) {\n if (depth === void 0) { depth = 1; }\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsNumber(depth, 2, 0);\n var d = depth;\n var parent = getStateTreeNode(target).parent;\n while (parent) {\n if (--d === 0)\n return parent.storedValue;\n parent = parent.parent;\n }\n throw fail$1(\"Failed to find the parent of \" + getStateTreeNode(target) + \" at depth \" + depth);\n}\n/**\n * Given a model instance, returns `true` if the object has a parent of given type, that is, is part of another object, map or array\n *\n * @param target\n * @param type\n * @returns\n */\nfunction hasParentOfType(target, type) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsType(type, 2);\n var parent = getStateTreeNode(target).parent;\n while (parent) {\n if (type.is(parent.storedValue))\n return true;\n parent = parent.parent;\n }\n return false;\n}\n/**\n * Returns the target's parent of a given type, or throws.\n *\n * @param target\n * @param type\n * @returns\n */\nfunction getParentOfType(target, type) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsType(type, 2);\n var parent = getStateTreeNode(target).parent;\n while (parent) {\n if (type.is(parent.storedValue))\n return parent.storedValue;\n parent = parent.parent;\n }\n throw fail$1(\"Failed to find the parent of \" + getStateTreeNode(target) + \" of a given type\");\n}\n/**\n * Given an object in a model tree, returns the root object of that tree.\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired.\n *\n * @param target\n * @returns\n */\nfunction getRoot(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).root.storedValue;\n}\n/**\n * Returns the path of the given object in the model tree\n *\n * @param target\n * @returns\n */\nfunction getPath(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).path;\n}\n/**\n * Returns the path of the given object as unescaped string array.\n *\n * @param target\n * @returns\n */\nfunction getPathParts(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return splitJsonPath(getStateTreeNode(target).path);\n}\n/**\n * Returns true if the given object is the root of a model tree.\n *\n * @param target\n * @returns\n */\nfunction isRoot(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).isRoot;\n}\n/**\n * Resolves a path relatively to a given object.\n * Returns undefined if no value can be found.\n *\n * @param target\n * @param path escaped json path\n * @returns\n */\nfunction resolvePath(target, path) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsString(path, 2);\n var node = resolveNodeByPath(getStateTreeNode(target), path);\n return node ? node.value : undefined;\n}\n/**\n * Resolves a model instance given a root target, the type and the identifier you are searching for.\n * Returns undefined if no value can be found.\n *\n * @param type\n * @param target\n * @param identifier\n * @returns\n */\nfunction resolveIdentifier(type, target, identifier) {\n // check all arguments\n assertIsType(type, 1);\n assertIsStateTreeNode(target, 2);\n assertIsValidIdentifier(identifier, 3);\n var node = getStateTreeNode(target).root.identifierCache.resolve(type, normalizeIdentifier(identifier));\n return node ? node.value : undefined;\n}\n/**\n * Returns the identifier of the target node.\n * This is the *string normalized* identifier, which might not match the type of the identifier attribute\n *\n * @param target\n * @returns\n */\nfunction getIdentifier(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).identifier;\n}\n/**\n * Tests if a reference is valid (pointing to an existing node and optionally if alive) and returns such reference if it the check passes,\n * else it returns undefined.\n *\n * @param getter Function to access the reference.\n * @param checkIfAlive true to also make sure the referenced node is alive (default), false to skip this check.\n * @returns\n */\nfunction tryReference(getter, checkIfAlive) {\n if (checkIfAlive === void 0) { checkIfAlive = true; }\n try {\n var node = getter();\n if (node === undefined || node === null) {\n return undefined;\n }\n else if (isStateTreeNode(node)) {\n if (!checkIfAlive) {\n return node;\n }\n else {\n return isAlive(node) ? node : undefined;\n }\n }\n else {\n throw fail$1(\"The reference to be checked is not one of node, null or undefined\");\n }\n }\n catch (e) {\n if (e instanceof InvalidReferenceError) {\n return undefined;\n }\n throw e;\n }\n}\n/**\n * Tests if a reference is valid (pointing to an existing node and optionally if alive) and returns if the check passes or not.\n *\n * @param getter Function to access the reference.\n * @param checkIfAlive true to also make sure the referenced node is alive (default), false to skip this check.\n * @returns\n */\nfunction isValidReference(getter, checkIfAlive) {\n if (checkIfAlive === void 0) { checkIfAlive = true; }\n try {\n var node = getter();\n if (node === undefined || node === null) {\n return false;\n }\n else if (isStateTreeNode(node)) {\n return checkIfAlive ? isAlive(node) : true;\n }\n else {\n throw fail$1(\"The reference to be checked is not one of node, null or undefined\");\n }\n }\n catch (e) {\n if (e instanceof InvalidReferenceError) {\n return false;\n }\n throw e;\n }\n}\n/**\n * Try to resolve a given path relative to a given node.\n *\n * @param target\n * @param path\n * @returns\n */\nfunction tryResolve(target, path) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsString(path, 2);\n var node = resolveNodeByPath(getStateTreeNode(target), path, false);\n if (node === undefined)\n return undefined;\n try {\n return node.value;\n }\n catch (e) {\n // For what ever reason not resolvable (e.g. totally not existing path, or value that cannot be fetched)\n // see test / issue: 'try resolve doesn't work #686'\n return undefined;\n }\n}\n/**\n * Given two state tree nodes that are part of the same tree,\n * returns the shortest jsonpath needed to navigate from the one to the other\n *\n * @param base\n * @param target\n * @returns\n */\nfunction getRelativePath(base, target) {\n // check all arguments\n assertIsStateTreeNode(base, 1);\n assertIsStateTreeNode(target, 2);\n return getRelativePathBetweenNodes(getStateTreeNode(base), getStateTreeNode(target));\n}\n/**\n * Returns a deep copy of the given state tree node as new tree.\n * Short hand for `snapshot(x) = getType(x).create(getSnapshot(x))`\n *\n * _Tip: clone will create a literal copy, including the same identifiers. To modify identifiers etc during cloning, don't use clone but take a snapshot of the tree, modify it, and create new instance_\n *\n * @param source\n * @param keepEnvironment indicates whether the clone should inherit the same environment (`true`, the default), or not have an environment (`false`). If an object is passed in as second argument, that will act as the environment for the cloned tree.\n * @returns\n */\nfunction clone(source, keepEnvironment) {\n if (keepEnvironment === void 0) { keepEnvironment = true; }\n // check all arguments\n assertIsStateTreeNode(source, 1);\n var node = getStateTreeNode(source);\n return node.type.create(node.snapshot, keepEnvironment === true\n ? node.root.environment\n : keepEnvironment === false\n ? undefined\n : keepEnvironment); // it's an object or something else\n}\n/**\n * Removes a model element from the state tree, and let it live on as a new state tree\n */\nfunction detach(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n getStateTreeNode(target).detach();\n return target;\n}\n/**\n * Removes a model element from the state tree, and mark it as end-of-life; the element should not be used anymore\n */\nfunction destroy(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n if (node.isRoot)\n node.die();\n else\n node.parent.removeChild(node.subpath);\n}\n/**\n * Returns true if the given state tree node is not killed yet.\n * This means that the node is still a part of a tree, and that `destroy`\n * has not been called. If a node is not alive anymore, the only thing one can do with it\n * is requesting it's last path and snapshot\n *\n * @param target\n * @returns\n */\nfunction isAlive(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).observableIsAlive;\n}\n/**\n * Use this utility to register a function that should be called whenever the\n * targeted state tree node is destroyed. This is a useful alternative to managing\n * cleanup methods yourself using the `beforeDestroy` hook.\n *\n * This methods returns the same disposer that was passed as argument.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * title: types.string\n * }).actions(self => ({\n * afterCreate() {\n * const autoSaveDisposer = reaction(\n * () => getSnapshot(self),\n * snapshot => sendSnapshotToServerSomehow(snapshot)\n * )\n * // stop sending updates to server if this\n * // instance is destroyed\n * addDisposer(self, autoSaveDisposer)\n * }\n * }))\n * ```\n *\n * @param target\n * @param disposer\n * @returns The same disposer that was passed as argument\n */\nfunction addDisposer(target, disposer) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsFunction(disposer, 2);\n var node = getStateTreeNode(target);\n node.addDisposer(disposer);\n return disposer;\n}\n/**\n * Returns the environment of the current state tree. For more info on environments,\n * see [Dependency injection](https://github.com/mobxjs/mobx-state-tree#dependency-injection)\n *\n * Please note that in child nodes access to the root is only possible\n * once the `afterAttach` hook has fired\n *\n * Returns an empty environment if the tree wasn't initialized with an environment\n *\n * @param target\n * @returns\n */\nfunction getEnv(target) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n var node = getStateTreeNode(target);\n var env = node.root.environment;\n if (!env)\n return EMPTY_OBJECT;\n return env;\n}\n/**\n * Performs a depth first walk through a tree.\n */\nfunction walk(target, processor) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertIsFunction(processor, 2);\n var node = getStateTreeNode(target);\n // tslint:disable-next-line:no_unused-variable\n node.getChildren().forEach(function (child) {\n if (isStateTreeNode(child.storedValue))\n walk(child.storedValue, processor);\n });\n processor(node.storedValue);\n}\n/**\n * Returns a reflection of the model type properties and name for either a model type or model node.\n *\n * @param typeOrNode\n * @returns\n */\nfunction getPropertyMembers(typeOrNode) {\n var type;\n if (isStateTreeNode(typeOrNode)) {\n type = getType(typeOrNode);\n }\n else {\n type = typeOrNode;\n }\n assertArg(type, function (t) { return isModelType(t); }, \"model type or model instance\", 1);\n return {\n name: type.name,\n properties: __assign({}, type.properties)\n };\n}\n/**\n * Returns a reflection of the model node, including name, properties, views, volatile and actions.\n *\n * @param target\n * @returns\n */\nfunction getMembers(target) {\n var type = getStateTreeNode(target).type;\n var reflected = __assign(__assign({}, getPropertyMembers(type)), { actions: [], volatile: [], views: [] });\n var props = Object.getOwnPropertyNames(target);\n props.forEach(function (key) {\n if (key in reflected.properties)\n return;\n var descriptor = Object.getOwnPropertyDescriptor(target, key);\n if (descriptor.get) {\n if (isComputedProp(target, key))\n reflected.views.push(key);\n else\n reflected.volatile.push(key);\n return;\n }\n if (descriptor.value._isMSTAction === true)\n reflected.actions.push(key);\n else if (isObservableProp(target, key))\n reflected.volatile.push(key);\n else\n reflected.views.push(key);\n });\n return reflected;\n}\n/**\n * Casts a node snapshot or instance type to an instance type so it can be assigned to a type instance.\n * Note that this is just a cast for the type system, this is, it won't actually convert a snapshot to an instance,\n * but just fool typescript into thinking so.\n * Either way, casting when outside an assignation operation won't compile.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n * n: types.number\n * }).actions(self => ({\n * setN(aNumber: number) {\n * self.n = aNumber\n * }\n * }))\n *\n * const ModelB = types.model({\n * innerModel: ModelA\n * }).actions(self => ({\n * someAction() {\n * // this will allow the compiler to assign a snapshot to the property\n * self.innerModel = cast({ a: 5 })\n * }\n * }))\n * ```\n *\n * @param snapshotOrInstance Snapshot or instance\n * @returns The same object casted as an instance\n */\nfunction cast(snapshotOrInstance) {\n return snapshotOrInstance;\n}\n/**\n * Casts a node instance type to an snapshot type so it can be assigned to a type snapshot (e.g. to be used inside a create call).\n * Note that this is just a cast for the type system, this is, it won't actually convert an instance to a snapshot,\n * but just fool typescript into thinking so.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n * n: types.number\n * }).actions(self => ({\n * setN(aNumber: number) {\n * self.n = aNumber\n * }\n * }))\n *\n * const ModelB = types.model({\n * innerModel: ModelA\n * })\n *\n * const a = ModelA.create({ n: 5 });\n * // this will allow the compiler to use a model as if it were a snapshot\n * const b = ModelB.create({ innerModel: castToSnapshot(a)})\n * ```\n *\n * @param snapshotOrInstance Snapshot or instance\n * @returns The same object casted as an input (creation) snapshot\n */\nfunction castToSnapshot(snapshotOrInstance) {\n return snapshotOrInstance;\n}\n/**\n * Casts a node instance type to a reference snapshot type so it can be assigned to a refernence snapshot (e.g. to be used inside a create call).\n * Note that this is just a cast for the type system, this is, it won't actually convert an instance to a refererence snapshot,\n * but just fool typescript into thinking so.\n *\n * Example:\n * ```ts\n * const ModelA = types.model({\n * id: types.identifier,\n * n: types.number\n * }).actions(self => ({\n * setN(aNumber: number) {\n * self.n = aNumber\n * }\n * }))\n *\n * const ModelB = types.model({\n * refA: types.reference(ModelA)\n * })\n *\n * const a = ModelA.create({ id: 'someId', n: 5 });\n * // this will allow the compiler to use a model as if it were a reference snapshot\n * const b = ModelB.create({ refA: castToReferenceSnapshot(a)})\n * ```\n *\n * @param instance Instance\n * @returns The same object casted as an reference snapshot (string or number)\n */\nfunction castToReferenceSnapshot(instance) {\n return instance;\n}\n/**\n * Returns the unique node id (not to be confused with the instance identifier) for a\n * given instance.\n * This id is a number that is unique for each instance.\n *\n * @export\n * @param target\n * @returns\n */\nfunction getNodeId(target) {\n assertIsStateTreeNode(target, 1);\n return getStateTreeNode(target).nodeId;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar BaseNode = /** @class */ (function () {\n function BaseNode(type, parent, subpath, environment) {\n Object.defineProperty(this, \"type\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: type\n });\n Object.defineProperty(this, \"environment\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: environment\n });\n Object.defineProperty(this, \"_escapedSubpath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_subpath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_subpathUponDeath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_pathUponDeath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"storedValue\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n }); // usually the same type as the value, but not always (such as with references)\n Object.defineProperty(this, \"aliveAtom\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_state\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: NodeLifeCycle.INITIALIZING\n });\n Object.defineProperty(this, \"_hookSubscribers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"_parent\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"pathAtom\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.environment = environment;\n this.baseSetParent(parent, subpath);\n }\n Object.defineProperty(BaseNode.prototype, \"subpath\", {\n get: function () {\n return this._subpath;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"subpathUponDeath\", {\n get: function () {\n return this._subpathUponDeath;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"pathUponDeath\", {\n get: function () {\n return this._pathUponDeath;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"value\", {\n get: function () {\n return this.type.getValue(this);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"state\", {\n get: function () {\n return this._state;\n },\n set: function (val) {\n var wasAlive = this.isAlive;\n this._state = val;\n var isAlive = this.isAlive;\n if (this.aliveAtom && wasAlive !== isAlive) {\n this.aliveAtom.reportChanged();\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"fireInternalHook\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (name) {\n if (this._hookSubscribers) {\n this._hookSubscribers.emit(name, this, name);\n }\n }\n });\n Object.defineProperty(BaseNode.prototype, \"registerHook\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (hook, hookHandler) {\n if (!this._hookSubscribers) {\n this._hookSubscribers = new EventHandlers();\n }\n return this._hookSubscribers.register(hook, hookHandler);\n }\n });\n Object.defineProperty(BaseNode.prototype, \"parent\", {\n get: function () {\n return this._parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"baseSetParent\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath) {\n this._parent = parent;\n this._subpath = subpath;\n this._escapedSubpath = undefined; // regenerate when needed\n if (this.pathAtom) {\n this.pathAtom.reportChanged();\n }\n }\n });\n Object.defineProperty(BaseNode.prototype, \"path\", {\n /*\n * Returns (escaped) path representation as string\n */\n get: function () {\n return this.getEscapedPath(true);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"getEscapedPath\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (reportObserved) {\n if (reportObserved) {\n if (!this.pathAtom) {\n this.pathAtom = createAtom(\"path\");\n }\n this.pathAtom.reportObserved();\n }\n if (!this.parent)\n return \"\";\n // regenerate escaped subpath if needed\n if (this._escapedSubpath === undefined) {\n this._escapedSubpath = !this._subpath ? \"\" : escapeJsonPath(this._subpath);\n }\n return this.parent.getEscapedPath(reportObserved) + \"/\" + this._escapedSubpath;\n }\n });\n Object.defineProperty(BaseNode.prototype, \"isRoot\", {\n get: function () {\n return this.parent === null;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"isAlive\", {\n get: function () {\n return this.state !== NodeLifeCycle.DEAD;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"isDetaching\", {\n get: function () {\n return this.state === NodeLifeCycle.DETACHING;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"observableIsAlive\", {\n get: function () {\n if (!this.aliveAtom) {\n this.aliveAtom = createAtom(\"alive\");\n }\n this.aliveAtom.reportObserved();\n return this.isAlive;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseNode.prototype, \"baseFinalizeCreation\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (whenFinalized) {\n if (devMode()) {\n if (!this.isAlive) {\n // istanbul ignore next\n throw fail(\"assertion failed: cannot finalize the creation of a node that is already dead\");\n }\n }\n // goal: afterCreate hooks runs depth-first. After attach runs parent first, so on afterAttach the parent has completed already\n if (this.state === NodeLifeCycle.CREATED) {\n if (this.parent) {\n if (this.parent.state !== NodeLifeCycle.FINALIZED) {\n // parent not ready yet, postpone\n return;\n }\n this.fireHook(Hook.afterAttach);\n }\n this.state = NodeLifeCycle.FINALIZED;\n if (whenFinalized) {\n whenFinalized();\n }\n }\n }\n });\n Object.defineProperty(BaseNode.prototype, \"baseFinalizeDeath\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._hookSubscribers) {\n this._hookSubscribers.clearAll();\n }\n this._subpathUponDeath = this._subpath;\n this._pathUponDeath = this.getEscapedPath(false);\n this.baseSetParent(null, \"\");\n this.state = NodeLifeCycle.DEAD;\n }\n });\n Object.defineProperty(BaseNode.prototype, \"baseAboutToDie\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.fireHook(Hook.beforeDestroy);\n }\n });\n return BaseNode;\n}());\n\n/**\n * @internal\n * @hidden\n */\nvar ScalarNode = /** @class */ (function (_super) {\n __extends(ScalarNode, _super);\n function ScalarNode(simpleType, parent, subpath, environment, initialSnapshot) {\n var _this = _super.call(this, simpleType, parent, subpath, environment) || this;\n try {\n _this.storedValue = simpleType.createNewInstance(initialSnapshot);\n }\n catch (e) {\n // short-cut to die the instance, to avoid the snapshot computed starting to throw...\n _this.state = NodeLifeCycle.DEAD;\n throw e;\n }\n _this.state = NodeLifeCycle.CREATED;\n // for scalar nodes there's no point in firing this event since it would fire on the constructor, before\n // anybody can actually register for/listen to it\n // this.fireHook(Hook.AfterCreate)\n _this.finalizeCreation();\n return _this;\n }\n Object.defineProperty(ScalarNode.prototype, \"root\", {\n get: function () {\n // future optimization: store root ref in the node and maintain it\n if (!this.parent)\n throw fail$1(\"This scalar node is not part of a tree\");\n return this.parent.root;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ScalarNode.prototype, \"setParent\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (newParent, subpath) {\n var parentChanged = this.parent !== newParent;\n var subpathChanged = this.subpath !== subpath;\n if (!parentChanged && !subpathChanged) {\n return;\n }\n if (devMode()) {\n if (!subpath) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: subpath expected\");\n }\n if (!newParent) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: parent expected\");\n }\n if (parentChanged) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: scalar nodes cannot change their parent\");\n }\n }\n this.environment = undefined; // use parent's\n this.baseSetParent(this.parent, subpath);\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"snapshot\", {\n get: function () {\n return freeze(this.getSnapshot());\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ScalarNode.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.type.getSnapshot(this);\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"toString\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var path = (this.isAlive ? this.path : this.pathUponDeath) || \"<root>\";\n return this.type.name + \"@\" + path + (this.isAlive ? \"\" : \" [dead]\");\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"die\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.isAlive || this.state === NodeLifeCycle.DETACHING)\n return;\n this.aboutToDie();\n this.finalizeDeath();\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"finalizeCreation\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.baseFinalizeCreation();\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"aboutToDie\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.baseAboutToDie();\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"finalizeDeath\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.baseFinalizeDeath();\n }\n });\n Object.defineProperty(ScalarNode.prototype, \"fireHook\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (name) {\n this.fireInternalHook(name);\n }\n });\n return ScalarNode;\n}(BaseNode));\nScalarNode.prototype.die = action(ScalarNode.prototype.die);\n\nvar nextNodeId = 1;\nvar snapshotReactionOptions = {\n onError: function (e) {\n throw e;\n }\n};\n/**\n * @internal\n * @hidden\n */\nvar ObjectNode = /** @class */ (function (_super) {\n __extends(ObjectNode, _super);\n function ObjectNode(complexType, parent, subpath, environment, initialValue) {\n var _this = _super.call(this, complexType, parent, subpath, environment) || this;\n Object.defineProperty(_this, \"nodeId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: ++nextNodeId\n });\n Object.defineProperty(_this, \"identifierAttribute\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"identifier\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n }); // Identifier is always normalized to string, even if the identifier property isn't\n Object.defineProperty(_this, \"unnormalizedIdentifier\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"identifierCache\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"isProtectionEnabled\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n Object.defineProperty(_this, \"middlewares\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_applyPatches\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_applySnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_autoUnbox\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n }); // unboxing is disabled when reading child nodes\n Object.defineProperty(_this, \"_isRunningAction\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n }); // only relevant for root\n Object.defineProperty(_this, \"_hasSnapshotReaction\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(_this, \"_observableInstanceState\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0 /* UNINITIALIZED */\n });\n Object.defineProperty(_this, \"_childNodes\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_initialSnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_cachedInitialSnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_cachedInitialSnapshotCreated\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: false\n });\n Object.defineProperty(_this, \"_snapshotComputed\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_snapshotUponDeath\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // #region internal event handling\n Object.defineProperty(_this, \"_internalEvents\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n _this._snapshotComputed = computed(function () { return freeze(_this.getSnapshot()); });\n _this.unbox = _this.unbox.bind(_this);\n _this._initialSnapshot = freeze(initialValue);\n _this.identifierAttribute = complexType.identifierAttribute;\n if (!parent) {\n _this.identifierCache = new IdentifierCache();\n }\n _this._childNodes = complexType.initializeChildNodes(_this, _this._initialSnapshot);\n // identifier can not be changed during lifecycle of a node\n // so we safely can read it from initial snapshot\n _this.identifier = null;\n _this.unnormalizedIdentifier = null;\n if (_this.identifierAttribute && _this._initialSnapshot) {\n var id = _this._initialSnapshot[_this.identifierAttribute];\n if (id === undefined) {\n // try with the actual node if not (for optional identifiers)\n var childNode = _this._childNodes[_this.identifierAttribute];\n if (childNode) {\n id = childNode.value;\n }\n }\n if (typeof id !== \"string\" && typeof id !== \"number\") {\n throw fail$1(\"Instance identifier '\" + _this.identifierAttribute + \"' for type '\" + _this.type.name + \"' must be a string or a number\");\n }\n // normalize internal identifier to string\n _this.identifier = normalizeIdentifier(id);\n _this.unnormalizedIdentifier = id;\n }\n if (!parent) {\n _this.identifierCache.addNodeToCache(_this);\n }\n else {\n parent.root.identifierCache.addNodeToCache(_this);\n }\n return _this;\n }\n Object.defineProperty(ObjectNode.prototype, \"applyPatches\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (patches) {\n this.createObservableInstanceIfNeeded();\n this._applyPatches(patches);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"applySnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n this.createObservableInstanceIfNeeded();\n this._applySnapshot(snapshot);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"createObservableInstanceIfNeeded\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._observableInstanceState === 0 /* UNINITIALIZED */) {\n this.createObservableInstance();\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"createObservableInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var e_1, _a;\n if (devMode()) {\n if (this.state !== NodeLifeCycle.INITIALIZING) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: the creation of the observable instance must be done on the initializing phase\");\n }\n }\n this._observableInstanceState = 1 /* CREATING */;\n // make sure the parent chain is created as well\n // array with parent chain from parent to child\n var parentChain = [];\n var parent = this.parent;\n // for performance reasons we never go back further than the most direct\n // uninitialized parent\n // this is done to avoid traversing the whole tree to the root when using\n // the same reference again\n while (parent &&\n parent._observableInstanceState === 0 /* UNINITIALIZED */) {\n parentChain.unshift(parent);\n parent = parent.parent;\n }\n try {\n // initialize the uninitialized parent chain from parent to child\n for (var parentChain_1 = __values(parentChain), parentChain_1_1 = parentChain_1.next(); !parentChain_1_1.done; parentChain_1_1 = parentChain_1.next()) {\n var p = parentChain_1_1.value;\n p.createObservableInstanceIfNeeded();\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (parentChain_1_1 && !parentChain_1_1.done && (_a = parentChain_1.return)) _a.call(parentChain_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n var type = this.type;\n try {\n this.storedValue = type.createNewInstance(this._childNodes);\n this.preboot();\n this._isRunningAction = true;\n type.finalizeNewInstance(this, this.storedValue);\n }\n catch (e) {\n // short-cut to die the instance, to avoid the snapshot computed starting to throw...\n this.state = NodeLifeCycle.DEAD;\n throw e;\n }\n finally {\n this._isRunningAction = false;\n }\n this._observableInstanceState = 2 /* CREATED */;\n this._snapshotComputed.trackAndCompute();\n if (this.isRoot)\n this._addSnapshotReaction();\n this._childNodes = EMPTY_OBJECT;\n this.state = NodeLifeCycle.CREATED;\n this.fireHook(Hook.afterCreate);\n this.finalizeCreation();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"root\", {\n get: function () {\n var parent = this.parent;\n return parent ? parent.root : this;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ObjectNode.prototype, \"clearParent\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.parent)\n return;\n // detach if attached\n this.fireHook(Hook.beforeDetach);\n var previousState = this.state;\n this.state = NodeLifeCycle.DETACHING;\n var root = this.root;\n var newEnv = root.environment;\n var newIdCache = root.identifierCache.splitCache(this);\n try {\n this.parent.removeChild(this.subpath);\n this.baseSetParent(null, \"\");\n this.environment = newEnv;\n this.identifierCache = newIdCache;\n }\n finally {\n this.state = previousState;\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"setParent\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (newParent, subpath) {\n var parentChanged = newParent !== this.parent;\n var subpathChanged = subpath !== this.subpath;\n if (!parentChanged && !subpathChanged) {\n return;\n }\n if (devMode()) {\n if (!subpath) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: subpath expected\");\n }\n if (!newParent) {\n // istanbul ignore next\n throw fail$1(\"assertion failed: new parent expected\");\n }\n if (this.parent && parentChanged) {\n throw fail$1(\"A node cannot exists twice in the state tree. Failed to add \" + this + \" to path '\" + newParent.path + \"/\" + subpath + \"'.\");\n }\n if (!this.parent && newParent.root === this) {\n throw fail$1(\"A state tree is not allowed to contain itself. Cannot assign \" + this + \" to path '\" + newParent.path + \"/\" + subpath + \"'\");\n }\n if (!this.parent &&\n !!this.environment &&\n this.environment !== newParent.root.environment) {\n throw fail$1(\"A state tree cannot be made part of another state tree as long as their environments are different.\");\n }\n }\n if (parentChanged) {\n // attach to new parent\n this.environment = undefined; // will use root's\n newParent.root.identifierCache.mergeCache(this);\n this.baseSetParent(newParent, subpath);\n this.fireHook(Hook.afterAttach);\n }\n else if (subpathChanged) {\n // moving to a new subpath on the same parent\n this.baseSetParent(this.parent, subpath);\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"fireHook\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (name) {\n var _this = this;\n this.fireInternalHook(name);\n var fn = this.storedValue &&\n typeof this.storedValue === \"object\" &&\n this.storedValue[name];\n if (typeof fn === \"function\") {\n // we check for it to allow old mobx peer dependencies that don't have the method to work (even when still bugged)\n if (_allowStateChangesInsideComputed) {\n _allowStateChangesInsideComputed(function () {\n fn.apply(_this.storedValue);\n });\n }\n else {\n fn.apply(this.storedValue);\n }\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"snapshot\", {\n // advantage of using computed for a snapshot is that nicely respects transactions etc.\n get: function () {\n return this._snapshotComputed.get();\n },\n enumerable: false,\n configurable: true\n });\n // NOTE: we use this method to get snapshot without creating @computed overhead\n Object.defineProperty(ObjectNode.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.isAlive)\n return this._snapshotUponDeath;\n return this._observableInstanceState === 2 /* CREATED */\n ? this._getActualSnapshot()\n : this._getCachedInitialSnapshot();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_getActualSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.type.getSnapshot(this);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_getCachedInitialSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this._cachedInitialSnapshotCreated) {\n var type = this.type;\n var childNodes = this._childNodes;\n var snapshot = this._initialSnapshot;\n this._cachedInitialSnapshot = type.processInitialSnapshot(childNodes, snapshot);\n this._cachedInitialSnapshotCreated = true;\n }\n return this._cachedInitialSnapshot;\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"isRunningAction\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._isRunningAction)\n return true;\n if (this.isRoot)\n return false;\n return this.parent.isRunningAction();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"assertAlive\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (context) {\n var livelinessChecking = getLivelinessChecking();\n if (!this.isAlive && livelinessChecking !== \"ignore\") {\n var error = this._getAssertAliveError(context);\n switch (livelinessChecking) {\n case \"error\":\n throw fail$1(error);\n case \"warn\":\n warnError(error);\n }\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_getAssertAliveError\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (context) {\n var escapedPath = this.getEscapedPath(false) || this.pathUponDeath || \"\";\n var subpath = (context.subpath && escapeJsonPath(context.subpath)) || \"\";\n var actionContext = context.actionContext || getCurrentActionContext();\n // try to use a real action context if possible since it includes the action name\n if (actionContext && actionContext.type !== \"action\" && actionContext.parentActionEvent) {\n actionContext = actionContext.parentActionEvent;\n }\n var actionFullPath = \"\";\n if (actionContext && actionContext.name != null) {\n // try to use the context, and if it not available use the node one\n var actionPath = (actionContext && actionContext.context && getPath(actionContext.context)) ||\n escapedPath;\n actionFullPath = actionPath + \".\" + actionContext.name + \"()\";\n }\n return \"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '\" + this.type.name + \"', Path upon death: '\" + escapedPath + \"', Subpath: '\" + subpath + \"', Action: '\" + actionFullPath + \"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.\";\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"getChildNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (subpath) {\n this.assertAlive({\n subpath: subpath\n });\n this._autoUnbox = false;\n try {\n return this._observableInstanceState === 2 /* CREATED */\n ? this.type.getChildNode(this, subpath)\n : this._childNodes[subpath];\n }\n finally {\n this._autoUnbox = true;\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"getChildren\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.assertAlive(EMPTY_OBJECT);\n this._autoUnbox = false;\n try {\n return this._observableInstanceState === 2 /* CREATED */\n ? this.type.getChildren(this)\n : convertChildNodesToArray(this._childNodes);\n }\n finally {\n this._autoUnbox = true;\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"getChildType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (propertyName) {\n return this.type.getChildType(propertyName);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"isProtected\", {\n get: function () {\n return this.root.isProtectionEnabled;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ObjectNode.prototype, \"assertWritable\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (context) {\n this.assertAlive(context);\n if (!this.isRunningAction() && this.isProtected) {\n throw fail$1(\"Cannot modify '\" + this + \"', the object is protected and can only be modified by using an action.\");\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"removeChild\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (subpath) {\n this.type.removeChild(this, subpath);\n }\n });\n // bound on the constructor\n Object.defineProperty(ObjectNode.prototype, \"unbox\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNode) {\n if (!childNode)\n return childNode;\n this.assertAlive({\n subpath: childNode.subpath || childNode.subpathUponDeath\n });\n return this._autoUnbox ? childNode.value : childNode;\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"toString\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var path = (this.isAlive ? this.path : this.pathUponDeath) || \"<root>\";\n var identifier = this.identifier ? \"(id: \" + this.identifier + \")\" : \"\";\n return this.type.name + \"@\" + path + identifier + (this.isAlive ? \"\" : \" [dead]\");\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"finalizeCreation\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var _this = this;\n this.baseFinalizeCreation(function () {\n var e_2, _a;\n try {\n for (var _b = __values(_this.getChildren()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.finalizeCreation();\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n _this.fireInternalHook(Hook.afterCreationFinalization);\n });\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"detach\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.isAlive)\n throw fail$1(\"Error while detaching, node is not alive.\");\n this.clearParent();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"preboot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var self = this;\n this._applyPatches = createActionInvoker(this.storedValue, \"@APPLY_PATCHES\", function (patches) {\n patches.forEach(function (patch) {\n if (!patch.path) {\n self.type.applySnapshot(self, patch.value);\n return;\n }\n var parts = splitJsonPath(patch.path);\n var node = resolveNodeByPathParts(self, parts.slice(0, -1));\n node.applyPatchLocally(parts[parts.length - 1], patch);\n });\n });\n this._applySnapshot = createActionInvoker(this.storedValue, \"@APPLY_SNAPSHOT\", function (snapshot) {\n // if the snapshot is the same as the current one, avoid performing a reconcile\n if (snapshot === self.snapshot)\n return;\n // else, apply it by calling the type logic\n return self.type.applySnapshot(self, snapshot);\n });\n addHiddenFinalProp(this.storedValue, \"$treenode\", this);\n addHiddenFinalProp(this.storedValue, \"toJSON\", toJSON);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"die\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (!this.isAlive || this.state === NodeLifeCycle.DETACHING)\n return;\n this.aboutToDie();\n this.finalizeDeath();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"aboutToDie\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._observableInstanceState === 0 /* UNINITIALIZED */) {\n return;\n }\n this.getChildren().forEach(function (node) {\n node.aboutToDie();\n });\n // beforeDestroy should run before the disposers since else we could end up in a situation where\n // a disposer added with addDisposer at this stage (beforeDestroy) is actually never released\n this.baseAboutToDie();\n this._internalEventsEmit(\"dispose\" /* Dispose */);\n this._internalEventsClear(\"dispose\" /* Dispose */);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"finalizeDeath\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n // invariant: not called directly but from \"die\"\n this.getChildren().forEach(function (node) {\n node.finalizeDeath();\n });\n this.root.identifierCache.notifyDied(this);\n // \"kill\" the computed prop and just store the last snapshot\n var snapshot = this.snapshot;\n this._snapshotUponDeath = snapshot;\n this._internalEventsClearAll();\n this.baseFinalizeDeath();\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"onSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (onChange) {\n this._addSnapshotReaction();\n return this._internalEventsRegister(\"snapshot\" /* Snapshot */, onChange);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"emitSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n this._internalEventsEmit(\"snapshot\" /* Snapshot */, snapshot);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"onPatch\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (handler) {\n return this._internalEventsRegister(\"patch\" /* Patch */, handler);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"emitPatch\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (basePatch, source) {\n if (this._internalEventsHasSubscribers(\"patch\" /* Patch */)) {\n var localizedPatch = extend({}, basePatch, {\n path: source.path.substr(this.path.length) + \"/\" + basePatch.path // calculate the relative path of the patch\n });\n var _a = __read(splitPatch(localizedPatch), 2), patch = _a[0], reversePatch = _a[1];\n this._internalEventsEmit(\"patch\" /* Patch */, patch, reversePatch);\n }\n if (this.parent)\n this.parent.emitPatch(basePatch, source);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"hasDisposer\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (disposer) {\n return this._internalEventsHas(\"dispose\" /* Dispose */, disposer);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"addDisposer\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (disposer) {\n if (!this.hasDisposer(disposer)) {\n this._internalEventsRegister(\"dispose\" /* Dispose */, disposer, true);\n return;\n }\n throw fail$1(\"cannot add a disposer when it is already registered for execution\");\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"removeDisposer\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (disposer) {\n if (!this._internalEventsHas(\"dispose\" /* Dispose */, disposer)) {\n throw fail$1(\"cannot remove a disposer which was never registered for execution\");\n }\n this._internalEventsUnregister(\"dispose\" /* Dispose */, disposer);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"removeMiddleware\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (middleware) {\n if (this.middlewares) {\n var index = this.middlewares.indexOf(middleware);\n if (index >= 0) {\n this.middlewares.splice(index, 1);\n }\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"addMiddleWare\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (handler, includeHooks) {\n var _this = this;\n if (includeHooks === void 0) { includeHooks = true; }\n var middleware = { handler: handler, includeHooks: includeHooks };\n if (!this.middlewares)\n this.middlewares = [middleware];\n else\n this.middlewares.push(middleware);\n return function () {\n _this.removeMiddleware(middleware);\n };\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"applyPatchLocally\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (subpath, patch) {\n this.assertWritable({\n subpath: subpath\n });\n this.createObservableInstanceIfNeeded();\n this.type.applyPatchLocally(this, subpath, patch);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_addSnapshotReaction\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var _this = this;\n if (!this._hasSnapshotReaction) {\n var snapshotDisposer = reaction(function () { return _this.snapshot; }, function (snapshot) { return _this.emitSnapshot(snapshot); }, snapshotReactionOptions);\n this.addDisposer(snapshotDisposer);\n this._hasSnapshotReaction = true;\n }\n }\n });\n // we proxy the methods to avoid creating an EventHandlers instance when it is not needed\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsHasSubscribers\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n return !!this._internalEvents && this._internalEvents.hasSubscribers(event);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsRegister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, eventHandler, atTheBeginning) {\n if (atTheBeginning === void 0) { atTheBeginning = false; }\n if (!this._internalEvents) {\n this._internalEvents = new EventHandlers();\n }\n return this._internalEvents.register(event, eventHandler, atTheBeginning);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsHas\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, eventHandler) {\n return !!this._internalEvents && this._internalEvents.has(event, eventHandler);\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsUnregister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, eventHandler) {\n if (this._internalEvents) {\n this._internalEvents.unregister(event, eventHandler);\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsEmit\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (this._internalEvents) {\n (_a = this._internalEvents).emit.apply(_a, __spread([event], args));\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsClear\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n if (this._internalEvents) {\n this._internalEvents.clear(event);\n }\n }\n });\n Object.defineProperty(ObjectNode.prototype, \"_internalEventsClearAll\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this._internalEvents) {\n this._internalEvents.clearAll();\n }\n }\n });\n return ObjectNode;\n}(BaseNode));\nObjectNode.prototype.createObservableInstance = action(ObjectNode.prototype.createObservableInstance);\nObjectNode.prototype.detach = action(ObjectNode.prototype.detach);\nObjectNode.prototype.die = action(ObjectNode.prototype.die);\n\nvar _a;\n/**\n * @internal\n * @hidden\n */\nvar TypeFlags;\n(function (TypeFlags) {\n TypeFlags[TypeFlags[\"String\"] = 1] = \"String\";\n TypeFlags[TypeFlags[\"Number\"] = 2] = \"Number\";\n TypeFlags[TypeFlags[\"Boolean\"] = 4] = \"Boolean\";\n TypeFlags[TypeFlags[\"Date\"] = 8] = \"Date\";\n TypeFlags[TypeFlags[\"Literal\"] = 16] = \"Literal\";\n TypeFlags[TypeFlags[\"Array\"] = 32] = \"Array\";\n TypeFlags[TypeFlags[\"Map\"] = 64] = \"Map\";\n TypeFlags[TypeFlags[\"Object\"] = 128] = \"Object\";\n TypeFlags[TypeFlags[\"Frozen\"] = 256] = \"Frozen\";\n TypeFlags[TypeFlags[\"Optional\"] = 512] = \"Optional\";\n TypeFlags[TypeFlags[\"Reference\"] = 1024] = \"Reference\";\n TypeFlags[TypeFlags[\"Identifier\"] = 2048] = \"Identifier\";\n TypeFlags[TypeFlags[\"Late\"] = 4096] = \"Late\";\n TypeFlags[TypeFlags[\"Refinement\"] = 8192] = \"Refinement\";\n TypeFlags[TypeFlags[\"Union\"] = 16384] = \"Union\";\n TypeFlags[TypeFlags[\"Null\"] = 32768] = \"Null\";\n TypeFlags[TypeFlags[\"Undefined\"] = 65536] = \"Undefined\";\n TypeFlags[TypeFlags[\"Integer\"] = 131072] = \"Integer\";\n TypeFlags[TypeFlags[\"Custom\"] = 262144] = \"Custom\";\n TypeFlags[TypeFlags[\"SnapshotProcessor\"] = 524288] = \"SnapshotProcessor\";\n})(TypeFlags || (TypeFlags = {}));\n/**\n * @internal\n * @hidden\n */\nvar cannotDetermineSubtype = \"cannotDetermine\";\n/** @hidden */\nvar $type = Symbol(\"$type\");\n/**\n * A base type produces a MST node (Node in the state tree)\n *\n * @internal\n * @hidden\n */\nvar BaseType = /** @class */ (function () {\n function BaseType(name) {\n Object.defineProperty(this, _a, {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // these are just to make inner types avaialable to inherited classes\n Object.defineProperty(this, \"C\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"S\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"T\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"N\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"isType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = name;\n }\n Object.defineProperty(BaseType.prototype, \"create\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot, environment) {\n typecheckInternal(this, snapshot);\n return this.instantiate(null, \"\", environment, snapshot).value;\n }\n });\n Object.defineProperty(BaseType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, applyPostProcess) {\n // istanbul ignore next\n throw fail$1(\"unimplemented method\");\n }\n });\n Object.defineProperty(BaseType.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return type === this;\n }\n });\n Object.defineProperty(BaseType.prototype, \"validate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var node = getStateTreeNodeSafe(value);\n if (node) {\n var valueType = getType(value);\n return this.isAssignableFrom(valueType)\n ? typeCheckSuccess()\n : typeCheckFailure(context, value);\n // it is tempting to compare snapshots, but in that case we should always clone on assignments...\n }\n return this.isValidSnapshot(value, context);\n }\n });\n Object.defineProperty(BaseType.prototype, \"is\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (thing) {\n return this.validate(thing, [{ path: \"\", type: this }]).length === 0;\n }\n });\n Object.defineProperty(BaseType.prototype, \"Type\", {\n get: function () {\n // istanbul ignore next\n throw fail$1(\"Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`\");\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseType.prototype, \"TypeWithoutSTN\", {\n get: function () {\n // istanbul ignore next\n throw fail$1(\"Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`\");\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseType.prototype, \"SnapshotType\", {\n get: function () {\n // istanbul ignore next\n throw fail$1(\"Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`\");\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(BaseType.prototype, \"CreationType\", {\n get: function () {\n // istanbul ignore next\n throw fail$1(\"Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`\");\n },\n enumerable: false,\n configurable: true\n });\n return BaseType;\n}());\n_a = $type;\nBaseType.prototype.create = action(BaseType.prototype.create);\n/**\n * A complex type produces a MST node (Node in the state tree)\n *\n * @internal\n * @hidden\n */\nvar ComplexType = /** @class */ (function (_super) {\n __extends(ComplexType, _super);\n function ComplexType(name) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"identifierAttribute\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n return _this;\n }\n Object.defineProperty(ComplexType.prototype, \"create\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot, environment) {\n if (snapshot === void 0) { snapshot = this.getDefaultSnapshot(); }\n return _super.prototype.create.call(this, snapshot, environment);\n }\n });\n Object.defineProperty(ComplexType.prototype, \"getValue\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n node.createObservableInstanceIfNeeded();\n return node.storedValue;\n }\n });\n Object.defineProperty(ComplexType.prototype, \"tryToReconcileNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue) {\n if (current.isDetaching)\n return false;\n if (current.snapshot === newValue) {\n // newValue is the current snapshot of the node, noop\n return true;\n }\n if (isStateTreeNode(newValue) && getStateTreeNode(newValue) === current) {\n // the current node is the same as the new one\n return true;\n }\n if (current.type === this &&\n isMutable(newValue) &&\n !isStateTreeNode(newValue) &&\n (!current.identifierAttribute ||\n current.identifier ===\n normalizeIdentifier(newValue[current.identifierAttribute]))) {\n // the newValue has no node, so can be treated like a snapshot\n // we can reconcile\n current.applySnapshot(newValue);\n return true;\n }\n return false;\n }\n });\n Object.defineProperty(ComplexType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n var nodeReconciled = this.tryToReconcileNode(current, newValue);\n if (nodeReconciled) {\n current.setParent(parent, subpath);\n return current;\n }\n // current node cannot be recycled in any way\n current.die(); // noop if detaching\n // attempt to reuse the new one\n if (isStateTreeNode(newValue) && this.isAssignableFrom(getType(newValue))) {\n // newValue is a Node as well, move it here..\n var newNode = getStateTreeNode(newValue);\n newNode.setParent(parent, subpath);\n return newNode;\n }\n // nothing to do, we have to create a new node\n return this.instantiate(parent, subpath, undefined, newValue);\n }\n });\n Object.defineProperty(ComplexType.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return null;\n }\n });\n return ComplexType;\n}(BaseType));\nComplexType.prototype.create = action(ComplexType.prototype.create);\n/**\n * @internal\n * @hidden\n */\nvar SimpleType = /** @class */ (function (_super) {\n __extends(SimpleType, _super);\n function SimpleType() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(SimpleType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n return snapshot;\n }\n });\n Object.defineProperty(SimpleType.prototype, \"getValue\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n // if we ever find a case where scalar nodes can be accessed without iterating through its parent\n // uncomment this to make sure the parent chain is created when this is accessed\n // if (node.parent) {\n // node.parent.createObservableInstanceIfNeeded()\n // }\n return node.storedValue;\n }\n });\n Object.defineProperty(SimpleType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return node.storedValue;\n }\n });\n Object.defineProperty(SimpleType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n // reconcile only if type and value are still the same, and only if the node is not detaching\n if (!current.isDetaching && current.type === this && current.storedValue === newValue) {\n return current;\n }\n var res = this.instantiate(parent, subpath, undefined, newValue);\n current.die(); // noop if detaching\n return res;\n }\n });\n Object.defineProperty(SimpleType.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return null;\n }\n });\n return SimpleType;\n}(BaseType));\n/**\n * Returns if a given value represents a type.\n *\n * @param value Value to check.\n * @returns `true` if the value is a type.\n */\nfunction isType(value) {\n return typeof value === \"object\" && value && value.isType === true;\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsType(type, argNumber) {\n assertArg(type, isType, \"mobx-state-tree type\", argNumber);\n}\n\nvar runningActions = new Map();\n/**\n * Note: Consider migrating to `createActionTrackingMiddleware2`, it is easier to use.\n *\n * Convenience utility to create action based middleware that supports async processes more easily.\n * All hooks are called for both synchronous and asynchronous actions. Except that either `onSuccess` or `onFail` is called\n *\n * The create middleware tracks the process of an action (assuming it passes the `filter`).\n * `onResume` can return any value, which will be passed as second argument to any other hook. This makes it possible to keep state during a process.\n *\n * See the `atomic` middleware for an example\n *\n * @param hooks\n * @returns\n */\nfunction createActionTrackingMiddleware(hooks) {\n return function actionTrackingMiddleware(call, next, abort) {\n switch (call.type) {\n case \"action\": {\n if (!hooks.filter || hooks.filter(call) === true) {\n var context = hooks.onStart(call);\n hooks.onResume(call, context);\n runningActions.set(call.id, {\n call: call,\n context: context,\n async: false\n });\n try {\n var res = next(call);\n hooks.onSuspend(call, context);\n if (runningActions.get(call.id).async === false) {\n runningActions.delete(call.id);\n hooks.onSuccess(call, context, res);\n }\n return res;\n }\n catch (e) {\n runningActions.delete(call.id);\n hooks.onFail(call, context, e);\n throw e;\n }\n }\n else {\n return next(call);\n }\n }\n case \"flow_spawn\": {\n var root = runningActions.get(call.rootId);\n root.async = true;\n return next(call);\n }\n case \"flow_resume\":\n case \"flow_resume_error\": {\n var root = runningActions.get(call.rootId);\n hooks.onResume(call, root.context);\n try {\n return next(call);\n }\n finally {\n hooks.onSuspend(call, root.context);\n }\n }\n case \"flow_throw\": {\n var root = runningActions.get(call.rootId);\n runningActions.delete(call.rootId);\n hooks.onFail(call, root.context, call.args[0]);\n return next(call);\n }\n case \"flow_return\": {\n var root = runningActions.get(call.rootId);\n runningActions.delete(call.rootId);\n hooks.onSuccess(call, root.context, call.args[0]);\n return next(call);\n }\n }\n };\n}\n\nvar RunningAction = /** @class */ (function () {\n function RunningAction(hooks, call) {\n Object.defineProperty(this, \"hooks\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: hooks\n });\n Object.defineProperty(this, \"call\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: call\n });\n Object.defineProperty(this, \"flowsPending\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"running\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n if (hooks) {\n hooks.onStart(call);\n }\n }\n Object.defineProperty(RunningAction.prototype, \"finish\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (error) {\n if (this.running) {\n this.running = false;\n if (this.hooks) {\n this.hooks.onFinish(this.call, error);\n }\n }\n }\n });\n Object.defineProperty(RunningAction.prototype, \"incFlowsPending\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.flowsPending++;\n }\n });\n Object.defineProperty(RunningAction.prototype, \"decFlowsPending\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.flowsPending--;\n }\n });\n Object.defineProperty(RunningAction.prototype, \"hasFlowsPending\", {\n get: function () {\n return this.flowsPending > 0;\n },\n enumerable: false,\n configurable: true\n });\n return RunningAction;\n}());\n/**\n * Convenience utility to create action based middleware that supports async processes more easily.\n * The flow is like this:\n * - for each action: if filter passes -> `onStart` -> (inner actions recursively) -> `onFinish`\n *\n * Example: if we had an action `a` that called inside an action `b1`, then `b2` the flow would be:\n * - `filter(a)`\n * - `onStart(a)`\n * - `filter(b1)`\n * - `onStart(b1)`\n * - `onFinish(b1)`\n * - `filter(b2)`\n * - `onStart(b2)`\n * - `onFinish(b2)`\n * - `onFinish(a)`\n *\n * The flow is the same no matter if the actions are sync or async.\n *\n * See the `atomic` middleware for an example\n *\n * @param hooks\n * @returns\n */\nfunction createActionTrackingMiddleware2(middlewareHooks) {\n var runningActions = new WeakMap();\n return function actionTrackingMiddleware(call, next) {\n // find parentRunningAction\n var parentRunningAction = call.parentActionEvent\n ? runningActions.get(call.parentActionEvent)\n : undefined;\n if (call.type === \"action\") {\n var newCall = __assign(__assign({}, call), { \n // make a shallow copy of the parent action env\n env: parentRunningAction && parentRunningAction.call.env, parentCall: parentRunningAction && parentRunningAction.call });\n var passesFilter = !middlewareHooks.filter || middlewareHooks.filter(newCall);\n var hooks = passesFilter ? middlewareHooks : undefined;\n var runningAction = new RunningAction(hooks, newCall);\n runningActions.set(call, runningAction);\n var res = void 0;\n try {\n res = next(call);\n }\n catch (e) {\n runningAction.finish(e);\n throw e;\n }\n if (!runningAction.hasFlowsPending) {\n // sync action finished\n runningAction.finish();\n }\n return res;\n }\n else {\n if (!parentRunningAction) {\n return next(call);\n }\n switch (call.type) {\n case \"flow_spawn\": {\n parentRunningAction.incFlowsPending();\n return next(call);\n }\n case \"flow_resume\":\n case \"flow_resume_error\": {\n return next(call);\n }\n case \"flow_throw\": {\n var error = call.args[0];\n try {\n return next(call);\n }\n finally {\n parentRunningAction.decFlowsPending();\n if (!parentRunningAction.hasFlowsPending) {\n parentRunningAction.finish(error);\n }\n }\n }\n case \"flow_return\": {\n try {\n return next(call);\n }\n finally {\n parentRunningAction.decFlowsPending();\n if (!parentRunningAction.hasFlowsPending) {\n parentRunningAction.finish();\n }\n }\n }\n }\n }\n };\n}\n\nfunction serializeArgument(node, actionName, index, arg) {\n if (arg instanceof Date)\n return { $MST_DATE: arg.getTime() };\n if (isPrimitive(arg))\n return arg;\n // We should not serialize MST nodes, even if we can, because we don't know if the receiving party can handle a raw snapshot instead of an\n // MST type instance. So if one wants to serialize a MST node that was pass in, either explitly pass: 1: an id, 2: a (relative) path, 3: a snapshot\n if (isStateTreeNode(arg))\n return serializeTheUnserializable(\"[MSTNode: \" + getType(arg).name + \"]\");\n if (typeof arg === \"function\")\n return serializeTheUnserializable(\"[function]\");\n if (typeof arg === \"object\" && !isPlainObject(arg) && !isArray(arg))\n return serializeTheUnserializable(\"[object \" + ((arg && arg.constructor && arg.constructor.name) ||\n \"Complex Object\") + \"]\");\n try {\n // Check if serializable, cycle free etc...\n // MWE: there must be a better way....\n JSON.stringify(arg); // or throws\n return arg;\n }\n catch (e) {\n return serializeTheUnserializable(\"\" + e);\n }\n}\nfunction deserializeArgument(adm, value) {\n if (value && typeof value === \"object\" && \"$MST_DATE\" in value)\n return new Date(value[\"$MST_DATE\"]);\n return value;\n}\nfunction serializeTheUnserializable(baseType) {\n return {\n $MST_UNSERIALIZABLE: true,\n type: baseType\n };\n}\n/**\n * Applies an action or a series of actions in a single MobX transaction.\n * Does not return any value\n * Takes an action description as produced by the `onAction` middleware.\n *\n * @param target\n * @param actions\n */\nfunction applyAction(target, actions) {\n // check all arguments\n assertIsStateTreeNode(target, 1);\n assertArg(actions, function (a) { return typeof a === \"object\"; }, \"object or array\", 2);\n runInAction(function () {\n asArray(actions).forEach(function (action) { return baseApplyAction(target, action); });\n });\n}\nfunction baseApplyAction(target, action) {\n var resolvedTarget = tryResolve(target, action.path || \"\");\n if (!resolvedTarget)\n throw fail$1(\"Invalid action path: \" + (action.path || \"\"));\n var node = getStateTreeNode(resolvedTarget);\n // Reserved functions\n if (action.name === \"@APPLY_PATCHES\") {\n return applyPatch.call(null, resolvedTarget, action.args[0]);\n }\n if (action.name === \"@APPLY_SNAPSHOT\") {\n return applySnapshot.call(null, resolvedTarget, action.args[0]);\n }\n if (!(typeof resolvedTarget[action.name] === \"function\"))\n throw fail$1(\"Action '\" + action.name + \"' does not exist in '\" + node.path + \"'\");\n return resolvedTarget[action.name].apply(resolvedTarget, action.args ? action.args.map(function (v) { return deserializeArgument(node, v); }) : []);\n}\n/**\n * Small abstraction around `onAction` and `applyAction`, attaches an action listener to a tree and records all the actions emitted.\n * Returns an recorder object with the following signature:\n *\n * Example:\n * ```ts\n * export interface IActionRecorder {\n * // the recorded actions\n * actions: ISerializedActionCall[]\n * // true if currently recording\n * recording: boolean\n * // stop recording actions\n * stop(): void\n * // resume recording actions\n * resume(): void\n * // apply all the recorded actions on the given object\n * replay(target: IAnyStateTreeNode): void\n * }\n * ```\n *\n * The optional filter function allows to skip recording certain actions.\n *\n * @param subject\n * @returns\n */\nfunction recordActions(subject, filter) {\n // check all arguments\n assertIsStateTreeNode(subject, 1);\n var actions = [];\n var listener = function (call) {\n var recordThis = filter ? filter(call, getRunningActionContext()) : true;\n if (recordThis) {\n actions.push(call);\n }\n };\n var disposer;\n var recorder = {\n actions: actions,\n get recording() {\n return !!disposer;\n },\n stop: function () {\n if (disposer) {\n disposer();\n disposer = undefined;\n }\n },\n resume: function () {\n if (disposer)\n return;\n disposer = onAction(subject, listener);\n },\n replay: function (target) {\n applyAction(target, actions);\n }\n };\n recorder.resume();\n return recorder;\n}\n/**\n * Registers a function that will be invoked for each action that is called on the provided model instance, or to any of its children.\n * See [actions](https://github.com/mobxjs/mobx-state-tree#actions) for more details. onAction events are emitted only for the outermost called action in the stack.\n * Action can also be intercepted by middleware using addMiddleware to change the function call before it will be run.\n *\n * Not all action arguments might be serializable. For unserializable arguments, a struct like `{ $MST_UNSERIALIZABLE: true, type: \"someType\" }` will be generated.\n * MST Nodes are considered non-serializable as well (they could be serialized as there snapshot, but it is uncertain whether an replaying party will be able to handle such a non-instantiated snapshot).\n * Rather, when using `onAction` middleware, one should consider in passing arguments which are 1: an id, 2: a (relative) path, or 3: a snapshot. Instead of a real MST node.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * task: types.string\n * })\n *\n * const TodoStore = types.model({\n * todos: types.array(Todo)\n * }).actions(self => ({\n * add(todo) {\n * self.todos.push(todo);\n * }\n * }))\n *\n * const s = TodoStore.create({ todos: [] })\n *\n * let disposer = onAction(s, (call) => {\n * console.log(call);\n * })\n *\n * s.add({ task: \"Grab a coffee\" })\n * // Logs: { name: \"add\", path: \"\", args: [{ task: \"Grab a coffee\" }] }\n * ```\n *\n * @param target\n * @param listener\n * @param attachAfter (default false) fires the listener *after* the action has executed instead of before.\n * @returns\n */\nfunction onAction(target, listener, attachAfter) {\n if (attachAfter === void 0) { attachAfter = false; }\n // check all arguments\n assertIsStateTreeNode(target, 1);\n if (devMode()) {\n if (!isRoot(target))\n warnError(\"Warning: Attaching onAction listeners to non root nodes is dangerous: No events will be emitted for actions initiated higher up in the tree.\");\n if (!isProtected(target))\n warnError(\"Warning: Attaching onAction listeners to non protected nodes is dangerous: No events will be emitted for direct modifications without action.\");\n }\n return addMiddleware(target, function handler(rawCall, next) {\n if (rawCall.type === \"action\" && rawCall.id === rawCall.rootId) {\n var sourceNode_1 = getStateTreeNode(rawCall.context);\n var info = {\n name: rawCall.name,\n path: getRelativePathBetweenNodes(getStateTreeNode(target), sourceNode_1),\n args: rawCall.args.map(function (arg, index) {\n return serializeArgument(sourceNode_1, rawCall.name, index, arg);\n })\n };\n if (attachAfter) {\n var res = next(rawCall);\n listener(info);\n return res;\n }\n else {\n listener(info);\n return next(rawCall);\n }\n }\n else {\n return next(rawCall);\n }\n });\n}\n\nvar nextActionId = 1;\nvar currentActionContext;\n/**\n * @internal\n * @hidden\n */\nfunction getCurrentActionContext() {\n return currentActionContext;\n}\n/**\n * @internal\n * @hidden\n */\nfunction getNextActionId() {\n return nextActionId++;\n}\n// TODO: optimize away entire action context if there is no middleware in tree?\n/**\n * @internal\n * @hidden\n */\nfunction runWithActionContext(context, fn) {\n var node = getStateTreeNode(context.context);\n if (context.type === \"action\") {\n node.assertAlive({\n actionContext: context\n });\n }\n var baseIsRunningAction = node._isRunningAction;\n node._isRunningAction = true;\n var previousContext = currentActionContext;\n currentActionContext = context;\n try {\n return runMiddleWares(node, context, fn);\n }\n finally {\n currentActionContext = previousContext;\n node._isRunningAction = baseIsRunningAction;\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction getParentActionContext(parentContext) {\n if (!parentContext)\n return undefined;\n if (parentContext.type === \"action\")\n return parentContext;\n return parentContext.parentActionEvent;\n}\n/**\n * @internal\n * @hidden\n */\nfunction createActionInvoker(target, name, fn) {\n var res = function () {\n var id = getNextActionId();\n var parentContext = currentActionContext;\n var parentActionContext = getParentActionContext(parentContext);\n return runWithActionContext({\n type: \"action\",\n name: name,\n id: id,\n args: argsToArray(arguments),\n context: target,\n tree: getRoot(target),\n rootId: parentContext ? parentContext.rootId : id,\n parentId: parentContext ? parentContext.id : 0,\n allParentIds: parentContext\n ? __spread(parentContext.allParentIds, [parentContext.id]) : [],\n parentEvent: parentContext,\n parentActionEvent: parentActionContext\n }, fn);\n };\n res._isMSTAction = true;\n return res;\n}\n/**\n * Middleware can be used to intercept any action is invoked on the subtree where it is attached.\n * If a tree is protected (by default), this means that any mutation of the tree will pass through your middleware.\n *\n * For more details, see the [middleware docs](concepts/middleware.md)\n *\n * @param target Node to apply the middleware to.\n * @param middleware Middleware to apply.\n * @returns A callable function to dispose the middleware.\n */\nfunction addMiddleware(target, handler, includeHooks) {\n if (includeHooks === void 0) { includeHooks = true; }\n var node = getStateTreeNode(target);\n if (devMode()) {\n if (!node.isProtectionEnabled) {\n warnError(\"It is recommended to protect the state tree before attaching action middleware, as otherwise it cannot be guaranteed that all changes are passed through middleware. See `protect`\");\n }\n }\n return node.addMiddleWare(handler, includeHooks);\n}\n/**\n * Binds middleware to a specific action.\n *\n * Example:\n * ```ts\n * type.actions(self => {\n * function takeA____() {\n * self.toilet.donate()\n * self.wipe()\n * self.wipe()\n * self.toilet.flush()\n * }\n * return {\n * takeA____: decorate(atomic, takeA____)\n * }\n * })\n * ```\n *\n * @param handler\n * @param fn\n * @param includeHooks\n * @returns The original function\n */\nfunction decorate(handler, fn, includeHooks) {\n if (includeHooks === void 0) { includeHooks = true; }\n var middleware = { handler: handler, includeHooks: includeHooks };\n fn.$mst_middleware = fn.$mst_middleware || [];\n fn.$mst_middleware.push(middleware);\n return fn;\n}\nvar CollectedMiddlewares = /** @class */ (function () {\n function CollectedMiddlewares(node, fn) {\n Object.defineProperty(this, \"arrayIndex\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"inArrayIndex\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: 0\n });\n Object.defineProperty(this, \"middlewares\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n // we just push middleware arrays into an array of arrays to avoid making copies\n if (fn.$mst_middleware) {\n this.middlewares.push(fn.$mst_middleware);\n }\n var n = node;\n // Find all middlewares. Optimization: cache this?\n while (n) {\n if (n.middlewares)\n this.middlewares.push(n.middlewares);\n n = n.parent;\n }\n }\n Object.defineProperty(CollectedMiddlewares.prototype, \"isEmpty\", {\n get: function () {\n return this.middlewares.length <= 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CollectedMiddlewares.prototype, \"getNextMiddleware\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var array = this.middlewares[this.arrayIndex];\n if (!array)\n return undefined;\n var item = array[this.inArrayIndex++];\n if (!item) {\n this.arrayIndex++;\n this.inArrayIndex = 0;\n return this.getNextMiddleware();\n }\n return item;\n }\n });\n return CollectedMiddlewares;\n}());\nfunction runMiddleWares(node, baseCall, originalFn) {\n var middlewares = new CollectedMiddlewares(node, originalFn);\n // Short circuit\n if (middlewares.isEmpty)\n return action(originalFn).apply(null, baseCall.args);\n var result = null;\n function runNextMiddleware(call) {\n var middleware = middlewares.getNextMiddleware();\n var handler = middleware && middleware.handler;\n if (!handler) {\n return action(originalFn).apply(null, call.args);\n }\n // skip hooks if asked to\n if (!middleware.includeHooks && Hook[call.name]) {\n return runNextMiddleware(call);\n }\n var nextInvoked = false;\n function next(call2, callback) {\n nextInvoked = true;\n // the result can contain\n // - the non manipulated return value from an action\n // - the non manipulated abort value\n // - one of the above but manipulated through the callback function\n result = runNextMiddleware(call2);\n if (callback) {\n result = callback(result);\n }\n }\n var abortInvoked = false;\n function abort(value) {\n abortInvoked = true;\n // overwrite the result\n // can be manipulated through middlewares earlier in the queue using the callback fn\n result = value;\n }\n handler(call, next, abort);\n if (devMode()) {\n if (!nextInvoked && !abortInvoked) {\n var node2 = getStateTreeNode(call.tree);\n throw fail$1(\"Neither the next() nor the abort() callback within the middleware \" + handler.name + \" for the action: \\\"\" + call.name + \"\\\" on the node: \" + node2.type.name + \" was invoked.\");\n }\n else if (nextInvoked && abortInvoked) {\n var node2 = getStateTreeNode(call.tree);\n throw fail$1(\"The next() and abort() callback within the middleware \" + handler.name + \" for the action: \\\"\" + call.name + \"\\\" on the node: \" + node2.type.name + \" were invoked.\");\n }\n }\n return result;\n }\n return runNextMiddleware(baseCall);\n}\n\n/**\n * Returns the currently executing MST action context, or undefined if none.\n */\nfunction getRunningActionContext() {\n var current = getCurrentActionContext();\n while (current && current.type !== \"action\") {\n current = current.parentActionEvent;\n }\n return current;\n}\nfunction _isActionContextThisOrChildOf(actionContext, sameOrParent, includeSame) {\n var parentId = typeof sameOrParent === \"number\" ? sameOrParent : sameOrParent.id;\n var current = includeSame\n ? actionContext\n : actionContext.parentActionEvent;\n while (current) {\n if (current.id === parentId) {\n return true;\n }\n current = current.parentActionEvent;\n }\n return false;\n}\n/**\n * Returns if the given action context is a parent of this action context.\n */\nfunction isActionContextChildOf(actionContext, parent) {\n return _isActionContextThisOrChildOf(actionContext, parent, false);\n}\n/**\n * Returns if the given action context is this or a parent of this action context.\n */\nfunction isActionContextThisOrChildOf(actionContext, parentOrThis) {\n return _isActionContextThisOrChildOf(actionContext, parentOrThis, true);\n}\n\nfunction safeStringify(value) {\n try {\n return JSON.stringify(value);\n }\n catch (e) {\n // istanbul ignore next\n return \"<Unserializable: \" + e + \">\";\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction prettyPrintValue(value) {\n return typeof value === \"function\"\n ? \"<function\" + (value.name ? \" \" + value.name : \"\") + \">\"\n : isStateTreeNode(value)\n ? \"<\" + value + \">\"\n : \"`\" + safeStringify(value) + \"`\";\n}\nfunction shortenPrintValue(valueInString) {\n return valueInString.length < 280\n ? valueInString\n : valueInString.substring(0, 272) + \"......\" + valueInString.substring(valueInString.length - 8);\n}\nfunction toErrorString(error) {\n var value = error.value;\n var type = error.context[error.context.length - 1].type;\n var fullPath = error.context\n .map(function (_a) {\n var path = _a.path;\n return path;\n })\n .filter(function (path) { return path.length > 0; })\n .join(\"/\");\n var pathPrefix = fullPath.length > 0 ? \"at path \\\"/\" + fullPath + \"\\\" \" : \"\";\n var currentTypename = isStateTreeNode(value)\n ? \"value of type \" + getStateTreeNode(value).type.name + \":\"\n : isPrimitive(value)\n ? \"value\"\n : \"snapshot\";\n var isSnapshotCompatible = type && isStateTreeNode(value) && type.is(getStateTreeNode(value).snapshot);\n return (\"\" + pathPrefix + currentTypename + \" \" + prettyPrintValue(value) + \" is not assignable \" + (type ? \"to type: `\" + type.name + \"`\" : \"\") +\n (error.message ? \" (\" + error.message + \")\" : \"\") +\n (type\n ? isPrimitiveType(type) || isPrimitive(value)\n ? \".\"\n : \", expected an instance of `\" + type.name + \"` or a snapshot like `\" + type.describe() + \"` instead.\" +\n (isSnapshotCompatible\n ? \" (Note that a snapshot of the provided value is compatible with the targeted type)\"\n : \"\")\n : \".\"));\n}\n/**\n * @internal\n * @hidden\n */\nfunction getContextForPath(context, path, type) {\n return context.concat([{ path: path, type: type }]);\n}\n/**\n * @internal\n * @hidden\n */\nfunction typeCheckSuccess() {\n return EMPTY_ARRAY;\n}\n/**\n * @internal\n * @hidden\n */\nfunction typeCheckFailure(context, value, message) {\n return [{ context: context, value: value, message: message }];\n}\n/**\n * @internal\n * @hidden\n */\nfunction flattenTypeErrors(errors) {\n return errors.reduce(function (a, i) { return a.concat(i); }, []);\n}\n// TODO; doublecheck: typecheck should only needed to be invoked from: type.create and array / map / value.property will change\n/**\n * @internal\n * @hidden\n */\nfunction typecheckInternal(type, value) {\n // runs typeChecking if it is in dev-mode or through a process.env.ENABLE_TYPE_CHECK flag\n if (isTypeCheckingEnabled()) {\n typecheck(type, value);\n }\n}\n/**\n * Run's the typechecker for the given type on the given value, which can be a snapshot or an instance.\n * Throws if the given value is not according the provided type specification.\n * Use this if you need typechecks even in a production build (by default all automatic runtime type checks will be skipped in production builds)\n *\n * @param type Type to check against.\n * @param value Value to be checked, either a snapshot or an instance.\n */\nfunction typecheck(type, value) {\n var errors = type.validate(value, [{ path: \"\", type: type }]);\n if (errors.length > 0) {\n throw fail$1(validationErrorsToString(type, value, errors));\n }\n}\nfunction validationErrorsToString(type, value, errors) {\n if (errors.length === 0) {\n return undefined;\n }\n return (\"Error while converting \" + shortenPrintValue(prettyPrintValue(value)) + \" to `\" + type.name + \"`:\\n\\n \" + errors.map(toErrorString).join(\"\\n \"));\n}\n\nvar identifierCacheId = 0;\n/**\n * @internal\n * @hidden\n */\nvar IdentifierCache = /** @class */ (function () {\n function IdentifierCache() {\n Object.defineProperty(this, \"cacheId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: identifierCacheId++\n });\n // n.b. in cache all identifiers are normalized to strings\n Object.defineProperty(this, \"cache\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: observable.map()\n });\n // last time the cache (array) for a given time changed\n // n.b. it is not really the time, but just an integer that gets increased after each modification to the array\n Object.defineProperty(this, \"lastCacheModificationPerId\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: observable.map()\n });\n }\n Object.defineProperty(IdentifierCache.prototype, \"updateLastCacheModificationPerId\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (identifier) {\n var lcm = this.lastCacheModificationPerId.get(identifier);\n // we start at 1 since 0 means no update since cache creation\n this.lastCacheModificationPerId.set(identifier, lcm === undefined ? 1 : lcm + 1);\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"getLastCacheModificationPerId\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (identifier) {\n var modificationId = this.lastCacheModificationPerId.get(identifier) || 0;\n return this.cacheId + \"-\" + modificationId;\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"addNodeToCache\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, lastCacheUpdate) {\n if (lastCacheUpdate === void 0) { lastCacheUpdate = true; }\n if (node.identifierAttribute) {\n var identifier = node.identifier;\n if (!this.cache.has(identifier)) {\n this.cache.set(identifier, observable.array([], mobxShallow));\n }\n var set = this.cache.get(identifier);\n if (set.indexOf(node) !== -1)\n throw fail$1(\"Already registered\");\n set.push(node);\n if (lastCacheUpdate) {\n this.updateLastCacheModificationPerId(identifier);\n }\n }\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"mergeCache\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var _this = this;\n values(node.identifierCache.cache).forEach(function (nodes) {\n return nodes.forEach(function (child) {\n _this.addNodeToCache(child);\n });\n });\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"notifyDied\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n if (node.identifierAttribute) {\n var id = node.identifier;\n var set = this.cache.get(id);\n if (set) {\n set.remove(node);\n // remove empty sets from cache\n if (!set.length) {\n this.cache.delete(id);\n }\n this.updateLastCacheModificationPerId(node.identifier);\n }\n }\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"splitCache\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var _this = this;\n var res = new IdentifierCache();\n var basePath = node.path;\n entries(this.cache).forEach(function (_a) {\n var _b = __read(_a, 2), id = _b[0], nodes = _b[1];\n var modified = false;\n for (var i = nodes.length - 1; i >= 0; i--) {\n if (nodes[i].path.indexOf(basePath) === 0) {\n res.addNodeToCache(nodes[i], false); // no need to update lastUpdated since it is a whole new cache\n nodes.splice(i, 1);\n modified = true;\n }\n }\n if (modified) {\n _this.updateLastCacheModificationPerId(id);\n }\n });\n return res;\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"has\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type, identifier) {\n var set = this.cache.get(identifier);\n if (!set)\n return false;\n return set.some(function (candidate) { return type.isAssignableFrom(candidate.type); });\n }\n });\n Object.defineProperty(IdentifierCache.prototype, \"resolve\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type, identifier) {\n var set = this.cache.get(identifier);\n if (!set)\n return null;\n var matches = set.filter(function (candidate) { return type.isAssignableFrom(candidate.type); });\n switch (matches.length) {\n case 0:\n return null;\n case 1:\n return matches[0];\n default:\n throw fail$1(\"Cannot resolve a reference to type '\" + type.name + \"' with id: '\" + identifier + \"' unambigously, there are multiple candidates: \" + matches\n .map(function (n) { return n.path; })\n .join(\", \"));\n }\n }\n });\n return IdentifierCache;\n}());\n\n/**\n * @internal\n * @hidden\n */\nfunction createObjectNode(type, parent, subpath, environment, initialValue) {\n var existingNode = getStateTreeNodeSafe(initialValue);\n if (existingNode) {\n if (existingNode.parent) {\n // istanbul ignore next\n throw fail$1(\"Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '\" + (parent ? parent.path : \"\") + \"/\" + subpath + \"', but it lives already at '\" + existingNode.path + \"'\");\n }\n if (parent) {\n existingNode.setParent(parent, subpath);\n }\n // else it already has no parent since it is a pre-requisite\n return existingNode;\n }\n // not a node, a snapshot\n return new ObjectNode(type, parent, subpath, environment, initialValue);\n}\n/**\n * @internal\n * @hidden\n */\nfunction createScalarNode(type, parent, subpath, environment, initialValue) {\n return new ScalarNode(type, parent, subpath, environment, initialValue);\n}\n/**\n * @internal\n * @hidden\n */\nfunction isNode(value) {\n return value instanceof ScalarNode || value instanceof ObjectNode;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar NodeLifeCycle;\n(function (NodeLifeCycle) {\n NodeLifeCycle[NodeLifeCycle[\"INITIALIZING\"] = 0] = \"INITIALIZING\";\n NodeLifeCycle[NodeLifeCycle[\"CREATED\"] = 1] = \"CREATED\";\n NodeLifeCycle[NodeLifeCycle[\"FINALIZED\"] = 2] = \"FINALIZED\";\n NodeLifeCycle[NodeLifeCycle[\"DETACHING\"] = 3] = \"DETACHING\";\n NodeLifeCycle[NodeLifeCycle[\"DEAD\"] = 4] = \"DEAD\"; // no coming back from this one\n})(NodeLifeCycle || (NodeLifeCycle = {}));\n/**\n * Returns true if the given value is a node in a state tree.\n * More precisely, that is, if the value is an instance of a\n * `types.model`, `types.array` or `types.map`.\n *\n * @param value\n * @returns true if the value is a state tree node.\n */\nfunction isStateTreeNode(value) {\n return !!(value && value.$treenode);\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsStateTreeNode(value, argNumber) {\n assertArg(value, isStateTreeNode, \"mobx-state-tree node\", argNumber);\n}\n/**\n * @internal\n * @hidden\n */\nfunction getStateTreeNode(value) {\n if (!isStateTreeNode(value)) {\n // istanbul ignore next\n throw fail$1(\"Value \" + value + \" is no MST Node\");\n }\n return value.$treenode;\n}\n/**\n * @internal\n * @hidden\n */\nfunction getStateTreeNodeSafe(value) {\n return (value && value.$treenode) || null;\n}\n/**\n * @internal\n * @hidden\n */\nfunction toJSON() {\n return getStateTreeNode(this).snapshot;\n}\nvar doubleDot = function (_) { return \"..\"; };\n/**\n * @internal\n * @hidden\n */\nfunction getRelativePathBetweenNodes(base, target) {\n // PRE condition target is (a child of) base!\n if (base.root !== target.root) {\n throw fail$1(\"Cannot calculate relative path: objects '\" + base + \"' and '\" + target + \"' are not part of the same object tree\");\n }\n var baseParts = splitJsonPath(base.path);\n var targetParts = splitJsonPath(target.path);\n var common = 0;\n for (; common < baseParts.length; common++) {\n if (baseParts[common] !== targetParts[common])\n break;\n }\n // TODO: assert that no targetParts paths are \"..\", \".\" or \"\"!\n return (baseParts.slice(common).map(doubleDot).join(\"/\") + joinJsonPath(targetParts.slice(common)));\n}\n/**\n * @internal\n * @hidden\n */\nfunction resolveNodeByPath(base, path, failIfResolveFails) {\n if (failIfResolveFails === void 0) { failIfResolveFails = true; }\n return resolveNodeByPathParts(base, splitJsonPath(path), failIfResolveFails);\n}\n/**\n * @internal\n * @hidden\n */\nfunction resolveNodeByPathParts(base, pathParts, failIfResolveFails) {\n if (failIfResolveFails === void 0) { failIfResolveFails = true; }\n var current = base;\n for (var i = 0; i < pathParts.length; i++) {\n var part = pathParts[i];\n if (part === \"..\") {\n current = current.parent;\n if (current)\n continue; // not everything has a parent\n }\n else if (part === \".\") {\n continue;\n }\n else if (current) {\n if (current instanceof ScalarNode) {\n // check if the value of a scalar resolves to a state tree node (e.g. references)\n // then we can continue resolving...\n try {\n var value = current.value;\n if (isStateTreeNode(value)) {\n current = getStateTreeNode(value);\n // fall through\n }\n }\n catch (e) {\n if (!failIfResolveFails) {\n return undefined;\n }\n throw e;\n }\n }\n if (current instanceof ObjectNode) {\n var subType = current.getChildType(part);\n if (subType) {\n current = current.getChildNode(part);\n if (current)\n continue;\n }\n }\n }\n if (failIfResolveFails)\n throw fail$1(\"Could not resolve '\" + part + \"' in path '\" + (joinJsonPath(pathParts.slice(0, i)) || \"/\") + \"' while resolving '\" + joinJsonPath(pathParts) + \"'\");\n else\n return undefined;\n }\n return current;\n}\n/**\n * @internal\n * @hidden\n */\nfunction convertChildNodesToArray(childNodes) {\n if (!childNodes)\n return EMPTY_ARRAY;\n var keys = Object.keys(childNodes);\n if (!keys.length)\n return EMPTY_ARRAY;\n var result = new Array(keys.length);\n keys.forEach(function (key, index) {\n result[index] = childNodes[key];\n });\n return result;\n}\n\n// based on: https://github.com/mobxjs/mobx-utils/blob/master/src/async-action.ts\n/*\n All contents of this file are deprecated.\n\n The term `process` has been replaced with `flow` to avoid conflicts with the\n global `process` object.\n\n Refer to `flow.ts` for any further changes to this implementation.\n*/\nvar DEPRECATION_MESSAGE = \"See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. \" +\n \"Note that the middleware event types starting with `process` now start with `flow`.\";\n/**\n * @hidden\n *\n * @deprecated has been renamed to `flow()`.\n * See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information.\n * Note that the middleware event types starting with `process` now start with `flow`.\n *\n * @returns {Promise}\n */\nfunction process$1(asyncAction) {\n deprecated(\"process\", \"`process()` has been renamed to `flow()`. \" + DEPRECATION_MESSAGE);\n return flow(asyncAction);\n}\n\nvar plainObjectString = Object.toString();\n/**\n * @internal\n * @hidden\n */\nvar EMPTY_ARRAY = Object.freeze([]);\n/**\n * @internal\n * @hidden\n */\nvar EMPTY_OBJECT = Object.freeze({});\n/**\n * @internal\n * @hidden\n */\nvar mobxShallow = _getGlobalState().useProxies\n ? { deep: false }\n : { deep: false, proxy: false };\nObject.freeze(mobxShallow);\n/**\n * @internal\n * @hidden\n */\nfunction fail$1(message) {\n if (message === void 0) { message = \"Illegal state\"; }\n return new Error(\"[mobx-state-tree] \" + message);\n}\n/**\n * @internal\n * @hidden\n */\nfunction identity(_) {\n return _;\n}\n/**\n * pollyfill (for IE) suggested in MDN:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\n * @internal\n * @hidden\n */\nvar isInteger = Number.isInteger ||\n function (value) {\n return typeof value === \"number\" && isFinite(value) && Math.floor(value) === value;\n };\n/**\n * @internal\n * @hidden\n */\nfunction isArray(val) {\n return Array.isArray(val) || isObservableArray(val);\n}\n/**\n * @internal\n * @hidden\n */\nfunction asArray(val) {\n if (!val)\n return EMPTY_ARRAY;\n if (isArray(val))\n return val;\n return [val];\n}\n/**\n * @internal\n * @hidden\n */\nfunction extend(a) {\n var b = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n b[_i - 1] = arguments[_i];\n }\n for (var i = 0; i < b.length; i++) {\n var current = b[i];\n for (var key in current)\n a[key] = current[key];\n }\n return a;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isPlainObject(value) {\n var _a;\n if (value === null || typeof value !== \"object\")\n return false;\n var proto = Object.getPrototypeOf(value);\n if (proto == null)\n return true;\n return ((_a = proto.constructor) === null || _a === void 0 ? void 0 : _a.toString()) === plainObjectString;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isMutable(value) {\n return (value !== null &&\n typeof value === \"object\" &&\n !(value instanceof Date) &&\n !(value instanceof RegExp));\n}\n/**\n * @internal\n * @hidden\n */\nfunction isPrimitive(value, includeDate) {\n if (includeDate === void 0) { includeDate = true; }\n if (value === null || value === undefined)\n return true;\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\" ||\n (includeDate && value instanceof Date))\n return true;\n return false;\n}\n/**\n * @internal\n * @hidden\n * Freeze a value and return it (if not in production)\n */\nfunction freeze(value) {\n if (!devMode())\n return value;\n return isPrimitive(value) || isObservableArray(value) ? value : Object.freeze(value);\n}\n/**\n * @internal\n * @hidden\n * Recursively freeze a value (if not in production)\n */\nfunction deepFreeze(value) {\n if (!devMode())\n return value;\n freeze(value);\n if (isPlainObject(value)) {\n Object.keys(value).forEach(function (propKey) {\n if (!isPrimitive(value[propKey]) &&\n !Object.isFrozen(value[propKey])) {\n deepFreeze(value[propKey]);\n }\n });\n }\n return value;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isSerializable(value) {\n return typeof value !== \"function\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction addHiddenFinalProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: false,\n configurable: true,\n value: value\n });\n}\n/**\n * @internal\n * @hidden\n */\nfunction addHiddenWritableProp(object, propName, value) {\n Object.defineProperty(object, propName, {\n enumerable: false,\n writable: true,\n configurable: true,\n value: value\n });\n}\n/**\n * @internal\n * @hidden\n */\nvar EventHandler = /** @class */ (function () {\n function EventHandler() {\n Object.defineProperty(this, \"handlers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n }\n Object.defineProperty(EventHandler.prototype, \"hasSubscribers\", {\n get: function () {\n return this.handlers.length > 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EventHandler.prototype, \"register\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn, atTheBeginning) {\n var _this = this;\n if (atTheBeginning === void 0) { atTheBeginning = false; }\n if (atTheBeginning) {\n this.handlers.unshift(fn);\n }\n else {\n this.handlers.push(fn);\n }\n return function () {\n _this.unregister(fn);\n };\n }\n });\n Object.defineProperty(EventHandler.prototype, \"has\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n return this.handlers.indexOf(fn) >= 0;\n }\n });\n Object.defineProperty(EventHandler.prototype, \"unregister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var index = this.handlers.indexOf(fn);\n if (index >= 0) {\n this.handlers.splice(index, 1);\n }\n }\n });\n Object.defineProperty(EventHandler.prototype, \"clear\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.handlers.length = 0;\n }\n });\n Object.defineProperty(EventHandler.prototype, \"emit\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // make a copy just in case it changes\n var handlers = this.handlers.slice();\n handlers.forEach(function (f) { return f.apply(void 0, __spread(args)); });\n }\n });\n return EventHandler;\n}());\n/**\n * @internal\n * @hidden\n */\nvar EventHandlers = /** @class */ (function () {\n function EventHandlers() {\n Object.defineProperty(this, \"eventHandlers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n }\n Object.defineProperty(EventHandlers.prototype, \"hasSubscribers\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n var handler = this.eventHandlers && this.eventHandlers[event];\n return !!handler && handler.hasSubscribers;\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"register\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, fn, atTheBeginning) {\n if (atTheBeginning === void 0) { atTheBeginning = false; }\n if (!this.eventHandlers) {\n this.eventHandlers = {};\n }\n var handler = this.eventHandlers[event];\n if (!handler) {\n handler = this.eventHandlers[event] = new EventHandler();\n }\n return handler.register(fn, atTheBeginning);\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"has\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, fn) {\n var handler = this.eventHandlers && this.eventHandlers[event];\n return !!handler && handler.has(fn);\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"unregister\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event, fn) {\n var handler = this.eventHandlers && this.eventHandlers[event];\n if (handler) {\n handler.unregister(fn);\n }\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"clear\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n if (this.eventHandlers) {\n delete this.eventHandlers[event];\n }\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"clearAll\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n this.eventHandlers = undefined;\n }\n });\n Object.defineProperty(EventHandlers.prototype, \"emit\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (event) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var handler = this.eventHandlers && this.eventHandlers[event];\n if (handler) {\n (_a = handler).emit.apply(_a, __spread(args));\n }\n }\n });\n return EventHandlers;\n}());\n/**\n * @internal\n * @hidden\n */\nfunction argsToArray(args) {\n var res = new Array(args.length);\n for (var i = 0; i < args.length; i++)\n res[i] = args[i];\n return res;\n}\n/**\n * @internal\n * @hidden\n */\nfunction stringStartsWith(str, beginning) {\n return str.indexOf(beginning) === 0;\n}\n/**\n * @internal\n * @hidden\n */\nvar deprecated = function (id, message) {\n // skip if running production\n if (!devMode())\n return;\n // warn if hasn't been warned before\n if (deprecated.ids && !deprecated.ids.hasOwnProperty(id)) {\n warnError(\"Deprecation warning: \" + message);\n }\n // mark as warned to avoid duplicate warn message\n if (deprecated.ids)\n deprecated.ids[id] = true;\n};\ndeprecated.ids = {};\n/**\n * @internal\n * @hidden\n */\nfunction warnError(msg) {\n console.warn(new Error(\"[mobx-state-tree] \" + msg));\n}\n/**\n * @internal\n * @hidden\n */\nfunction isTypeCheckingEnabled() {\n return (devMode() ||\n (typeof process !== \"undefined\" && process.env && process.env.ENABLE_TYPE_CHECK === \"true\"));\n}\n/**\n * @internal\n * @hidden\n */\nfunction devMode() {\n return process.env.NODE_ENV !== \"production\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertArg(value, fn, typeName, argNumber) {\n if (devMode()) {\n if (!fn(value)) {\n // istanbul ignore next\n throw fail$1(\"expected \" + typeName + \" as argument \" + asArray(argNumber).join(\" or \") + \", got \" + value + \" instead\");\n }\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsFunction(value, argNumber) {\n assertArg(value, function (fn) { return typeof fn === \"function\"; }, \"function\", argNumber);\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsNumber(value, argNumber, min, max) {\n assertArg(value, function (n) { return typeof n === \"number\"; }, \"number\", argNumber);\n if (min !== undefined) {\n assertArg(value, function (n) { return n >= min; }, \"number greater than \" + min, argNumber);\n }\n if (max !== undefined) {\n assertArg(value, function (n) { return n <= max; }, \"number lesser than \" + max, argNumber);\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsString(value, argNumber, canBeEmpty) {\n if (canBeEmpty === void 0) { canBeEmpty = true; }\n assertArg(value, function (s) { return typeof s === \"string\"; }, \"string\", argNumber);\n if (!canBeEmpty) {\n assertArg(value, function (s) { return s !== \"\"; }, \"not empty string\", argNumber);\n }\n}\n/**\n * @internal\n * @hidden\n */\nfunction setImmediateWithFallback(fn) {\n if (typeof queueMicrotask === \"function\") {\n queueMicrotask(fn);\n }\n else if (typeof setImmediate === \"function\") {\n setImmediate(fn);\n }\n else {\n setTimeout(fn, 1);\n }\n}\n\n/**\n * See [asynchronous actions](concepts/async-actions.md).\n *\n * @returns The flow as a promise.\n */\nfunction flow(generator) {\n return createFlowSpawner(generator.name, generator);\n}\n/**\n * @deprecated Not needed since TS3.6.\n * Used for TypeScript to make flows that return a promise return the actual promise result.\n *\n * @param val\n * @returns\n */\nfunction castFlowReturn(val) {\n return val;\n}\n/**\n * @experimental\n * experimental api - might change on minor/patch releases\n *\n * Convert a promise-returning function to a generator-returning one.\n * This is intended to allow for usage of `yield*` in async actions to\n * retain the promise return type.\n *\n * Example:\n * ```ts\n * function getDataAsync(input: string): Promise<number> { ... }\n * const getDataGen = toGeneratorFunction(getDataAsync);\n *\n * const someModel.actions(self => ({\n * someAction: flow(function*() {\n * // value is typed as number\n * const value = yield* getDataGen(\"input value\");\n * ...\n * })\n * }))\n * ```\n */\nfunction toGeneratorFunction(p) {\n return function () {\n var _i;\n var args = [];\n for (_i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, p.apply(void 0, __spread(args))];\n case 1: return [2 /*return*/, (_a.sent())];\n }\n });\n };\n}\n/**\n * @experimental\n * experimental api - might change on minor/patch releases\n *\n * Convert a promise to a generator yielding that promise\n * This is intended to allow for usage of `yield*` in async actions to\n * retain the promise return type.\n *\n * Example:\n * ```ts\n * function getDataAsync(input: string): Promise<number> { ... }\n *\n * const someModel.actions(self => ({\n * someAction: flow(function*() {\n * // value is typed as number\n * const value = yield* toGenerator(getDataAsync(\"input value\"));\n * ...\n * })\n * }))\n * ```\n */\nfunction toGenerator(p) {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, p];\n case 1: return [2 /*return*/, (_a.sent())];\n }\n });\n}\n/**\n * @internal\n * @hidden\n */\nfunction createFlowSpawner(name, generator) {\n var spawner = function flowSpawner() {\n // Implementation based on https://github.com/tj/co/blob/master/index.js\n var runId = getNextActionId();\n var parentContext = getCurrentActionContext();\n if (!parentContext) {\n throw fail$1(\"a mst flow must always have a parent context\");\n }\n var parentActionContext = getParentActionContext(parentContext);\n if (!parentActionContext) {\n throw fail$1(\"a mst flow must always have a parent action context\");\n }\n var contextBase = {\n name: name,\n id: runId,\n tree: parentContext.tree,\n context: parentContext.context,\n parentId: parentContext.id,\n allParentIds: __spread(parentContext.allParentIds, [parentContext.id]),\n rootId: parentContext.rootId,\n parentEvent: parentContext,\n parentActionEvent: parentActionContext\n };\n var args = arguments;\n function wrap(fn, type, arg) {\n fn.$mst_middleware = spawner.$mst_middleware; // pick up any middleware attached to the flow\n runWithActionContext(__assign(__assign({}, contextBase), { type: type, args: [arg] }), fn);\n }\n return new Promise(function (resolve, reject) {\n var gen;\n var init = function asyncActionInit() {\n gen = generator.apply(null, arguments);\n onFulfilled(undefined); // kick off the flow\n };\n init.$mst_middleware = spawner.$mst_middleware;\n runWithActionContext(__assign(__assign({}, contextBase), { type: \"flow_spawn\", args: argsToArray(args) }), init);\n function onFulfilled(res) {\n var ret;\n try {\n // prettier-ignore\n wrap(function (r) { ret = gen.next(r); }, \"flow_resume\", res);\n }\n catch (e) {\n // prettier-ignore\n setImmediateWithFallback(function () {\n wrap(function (r) { reject(e); }, \"flow_throw\", e);\n });\n return;\n }\n next(ret);\n return;\n }\n function onRejected(err) {\n var ret;\n try {\n // prettier-ignore\n wrap(function (r) { ret = gen.throw(r); }, \"flow_resume_error\", err); // or yieldError?\n }\n catch (e) {\n // prettier-ignore\n setImmediateWithFallback(function () {\n wrap(function (r) { reject(e); }, \"flow_throw\", e);\n });\n return;\n }\n next(ret);\n }\n function next(ret) {\n if (ret.done) {\n // prettier-ignore\n setImmediateWithFallback(function () {\n wrap(function (r) { resolve(r); }, \"flow_return\", ret.value);\n });\n return;\n }\n // TODO: support more type of values? See https://github.com/tj/co/blob/249bbdc72da24ae44076afd716349d2089b31c4c/index.js#L100\n if (!ret.value || typeof ret.value.then !== \"function\") {\n // istanbul ignore next\n throw fail$1(\"Only promises can be yielded to `async`, got: \" + ret);\n }\n return ret.value.then(onFulfilled, onRejected);\n }\n });\n };\n return spawner;\n}\n\n/**\n * @internal\n * @hidden\n */\nfunction splitPatch(patch) {\n if (!(\"oldValue\" in patch))\n throw fail$1(\"Patches without `oldValue` field cannot be inversed\");\n return [stripPatch(patch), invertPatch(patch)];\n}\n/**\n * @internal\n * @hidden\n */\nfunction stripPatch(patch) {\n // strips `oldvalue` information from the patch, so that it becomes a patch conform the json-patch spec\n // this removes the ability to undo the patch\n switch (patch.op) {\n case \"add\":\n return { op: \"add\", path: patch.path, value: patch.value };\n case \"remove\":\n return { op: \"remove\", path: patch.path };\n case \"replace\":\n return { op: \"replace\", path: patch.path, value: patch.value };\n }\n}\nfunction invertPatch(patch) {\n switch (patch.op) {\n case \"add\":\n return {\n op: \"remove\",\n path: patch.path\n };\n case \"remove\":\n return {\n op: \"add\",\n path: patch.path,\n value: patch.oldValue\n };\n case \"replace\":\n return {\n op: \"replace\",\n path: patch.path,\n value: patch.oldValue\n };\n }\n}\n/**\n * Simple simple check to check it is a number.\n */\nfunction isNumber(x) {\n return typeof x === \"number\";\n}\n/**\n * Escape slashes and backslashes.\n *\n * http://tools.ietf.org/html/rfc6901\n */\nfunction escapeJsonPath(path) {\n if (isNumber(path) === true) {\n return \"\" + path;\n }\n if (path.indexOf(\"/\") === -1 && path.indexOf(\"~\") === -1)\n return path;\n return path.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\n/**\n * Unescape slashes and backslashes.\n */\nfunction unescapeJsonPath(path) {\n return path.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n}\n/**\n * Generates a json-path compliant json path from path parts.\n *\n * @param path\n * @returns\n */\nfunction joinJsonPath(path) {\n // `/` refers to property with an empty name, while `` refers to root itself!\n if (path.length === 0)\n return \"\";\n var getPathStr = function (p) { return p.map(escapeJsonPath).join(\"/\"); };\n if (path[0] === \".\" || path[0] === \"..\") {\n // relative\n return getPathStr(path);\n }\n else {\n // absolute\n return \"/\" + getPathStr(path);\n }\n}\n/**\n * Splits and decodes a json path into several parts.\n *\n * @param path\n * @returns\n */\nfunction splitJsonPath(path) {\n // `/` refers to property with an empty name, while `` refers to root itself!\n var parts = path.split(\"/\").map(unescapeJsonPath);\n var valid = path === \"\" ||\n path === \".\" ||\n path === \"..\" ||\n stringStartsWith(path, \"/\") ||\n stringStartsWith(path, \"./\") ||\n stringStartsWith(path, \"../\");\n if (!valid) {\n throw fail$1(\"a json path must be either rooted, empty or relative, but got '\" + path + \"'\");\n }\n // '/a/b/c' -> [\"a\", \"b\", \"c\"]\n // '../../b/c' -> [\"..\", \"..\", \"b\", \"c\"]\n // '' -> []\n // '/' -> ['']\n // './a' -> [\".\", \"a\"]\n // /./a' -> [\".\", \"a\"] equivalent to './a'\n if (parts[0] === \"\") {\n parts.shift();\n }\n return parts;\n}\n\nvar SnapshotProcessor = /** @class */ (function (_super) {\n __extends(SnapshotProcessor, _super);\n function SnapshotProcessor(_subtype, _processors, name) {\n var _this = _super.call(this, name || _subtype.name) || this;\n Object.defineProperty(_this, \"_subtype\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subtype\n });\n Object.defineProperty(_this, \"_processors\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _processors\n });\n return _this;\n }\n Object.defineProperty(SnapshotProcessor.prototype, \"flags\", {\n get: function () {\n return this._subtype.flags | TypeFlags.SnapshotProcessor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"snapshotProcessor(\" + this._subtype.describe() + \")\";\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"preProcessSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (sn) {\n if (this._processors.preProcessor) {\n return this._processors.preProcessor.call(null, sn);\n }\n return sn;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"postProcessSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (sn) {\n if (this._processors.postProcessor) {\n return this._processors.postProcessor.call(null, sn);\n }\n return sn;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"_fixNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var _this = this;\n // the node has to use these methods rather than the original type ones\n proxyNodeTypeMethods(node.type, this, \"create\");\n var oldGetSnapshot = node.getSnapshot;\n node.getSnapshot = function () {\n return _this.postProcessSnapshot(oldGetSnapshot.call(node));\n };\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var processedInitialValue = isStateTreeNode(initialValue)\n ? initialValue\n : this.preProcessSnapshot(initialValue);\n var node = this._subtype.instantiate(parent, subpath, environment, processedInitialValue);\n this._fixNode(node);\n return node;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n var node = this._subtype.reconcile(current, isStateTreeNode(newValue) ? newValue : this.preProcessSnapshot(newValue), parent, subpath);\n if (node !== current) {\n this._fixNode(node);\n }\n return node;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, applyPostProcess) {\n if (applyPostProcess === void 0) { applyPostProcess = true; }\n var sn = this._subtype.getSnapshot(node);\n return applyPostProcess ? this.postProcessSnapshot(sn) : sn;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var processedSn = this.preProcessSnapshot(value);\n return this._subtype.validate(processedSn, context);\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subtype;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"is\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (thing) {\n var value = isType(thing)\n ? this._subtype\n : isStateTreeNode(thing)\n ? getSnapshot(thing, false)\n : this.preProcessSnapshot(thing);\n return this._subtype.validate(value, [{ path: \"\", type: this._subtype }]).length === 0;\n }\n });\n Object.defineProperty(SnapshotProcessor.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this._subtype.isAssignableFrom(type);\n }\n });\n return SnapshotProcessor;\n}(BaseType));\nfunction proxyNodeTypeMethods(nodeType, snapshotProcessorType) {\n var e_1, _a;\n var methods = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n methods[_i - 2] = arguments[_i];\n }\n try {\n for (var methods_1 = __values(methods), methods_1_1 = methods_1.next(); !methods_1_1.done; methods_1_1 = methods_1.next()) {\n var method = methods_1_1.value;\n nodeType[method] = snapshotProcessorType[method].bind(snapshotProcessorType);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (methods_1_1 && !methods_1_1.done && (_a = methods_1.return)) _a.call(methods_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n}\n/**\n * `types.snapshotProcessor` - Runs a pre/post snapshot processor before/after serializing a given type.\n *\n * Example:\n * ```ts\n * const Todo1 = types.model({ text: types.string })\n * // in the backend the text type must be null when empty\n * interface BackendTodo {\n * text: string | null\n * }\n * const Todo2 = types.snapshotProcessor(Todo1, {\n * // from snapshot to instance\n * preProcessor(sn: BackendTodo) {\n * return {\n * text: sn.text || \"\";\n * }\n * },\n * // from instance to snapshot\n * postProcessor(sn): BackendTodo {\n * return {\n * text: !sn.text ? null : sn.text\n * }\n * }\n * })\n * ```\n *\n * @param type Type to run the processors over.\n * @param processors Processors to run.\n * @param name Type name, or undefined to inherit the inner type one.\n * @returns\n */\nfunction snapshotProcessor(type, processors, name) {\n assertIsType(type, 1);\n if (devMode()) {\n if (processors.postProcessor && typeof processors.postProcessor !== \"function\") {\n // istanbul ignore next\n throw fail(\"postSnapshotProcessor must be a function\");\n }\n if (processors.preProcessor && typeof processors.preProcessor !== \"function\") {\n // istanbul ignore next\n throw fail(\"preSnapshotProcessor must be a function\");\n }\n }\n return new SnapshotProcessor(type, processors, name);\n}\n\nvar needsIdentifierError = \"Map.put can only be used to store complex values that have an identifier type attribute\";\nfunction tryCollectModelTypes(type, modelTypes) {\n var e_1, _a;\n var subtypes = type.getSubTypes();\n if (subtypes === cannotDetermineSubtype) {\n return false;\n }\n if (subtypes) {\n var subtypesArray = asArray(subtypes);\n try {\n for (var subtypesArray_1 = __values(subtypesArray), subtypesArray_1_1 = subtypesArray_1.next(); !subtypesArray_1_1.done; subtypesArray_1_1 = subtypesArray_1.next()) {\n var subtype = subtypesArray_1_1.value;\n if (!tryCollectModelTypes(subtype, modelTypes))\n return false;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (subtypesArray_1_1 && !subtypesArray_1_1.done && (_a = subtypesArray_1.return)) _a.call(subtypesArray_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n if (type instanceof ModelType) {\n modelTypes.push(type);\n }\n return true;\n}\n/**\n * @internal\n * @hidden\n */\nvar MapIdentifierMode;\n(function (MapIdentifierMode) {\n MapIdentifierMode[MapIdentifierMode[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n MapIdentifierMode[MapIdentifierMode[\"YES\"] = 1] = \"YES\";\n MapIdentifierMode[MapIdentifierMode[\"NO\"] = 2] = \"NO\";\n})(MapIdentifierMode || (MapIdentifierMode = {}));\nvar MSTMap = /** @class */ (function (_super) {\n __extends(MSTMap, _super);\n function MSTMap(initialData) {\n return _super.call(this, initialData, observable.ref.enhancer) || this;\n }\n Object.defineProperty(MSTMap.prototype, \"get\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (key) {\n // maybe this is over-enthousiastic? normalize numeric keys to strings\n return _super.prototype.get.call(this, \"\" + key);\n }\n });\n Object.defineProperty(MSTMap.prototype, \"has\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (key) {\n return _super.prototype.has.call(this, \"\" + key);\n }\n });\n Object.defineProperty(MSTMap.prototype, \"delete\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (key) {\n return _super.prototype.delete.call(this, \"\" + key);\n }\n });\n Object.defineProperty(MSTMap.prototype, \"set\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (key, value) {\n return _super.prototype.set.call(this, \"\" + key, value);\n }\n });\n Object.defineProperty(MSTMap.prototype, \"put\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value) {\n if (!value)\n throw fail$1(\"Map.put cannot be used to set empty values\");\n if (isStateTreeNode(value)) {\n var node = getStateTreeNode(value);\n if (devMode()) {\n if (!node.identifierAttribute) {\n throw fail$1(needsIdentifierError);\n }\n }\n if (node.identifier === null) {\n throw fail$1(needsIdentifierError);\n }\n this.set(node.identifier, value);\n return value;\n }\n else if (!isMutable(value)) {\n throw fail$1(\"Map.put can only be used to store complex values\");\n }\n else {\n var mapNode = getStateTreeNode(this);\n var mapType = mapNode.type;\n if (mapType.identifierMode !== MapIdentifierMode.YES) {\n throw fail$1(needsIdentifierError);\n }\n var idAttr = mapType.mapIdentifierAttribute;\n var id = value[idAttr];\n if (!isValidIdentifier(id)) {\n // try again but this time after creating a node for the value\n // since it might be an optional identifier\n var newNode = this.put(mapType.getChildType().create(value, mapNode.environment));\n return this.put(getSnapshot(newNode));\n }\n var key = normalizeIdentifier(id);\n this.set(key, value);\n return this.get(key);\n }\n }\n });\n return MSTMap;\n}(ObservableMap));\n/**\n * @internal\n * @hidden\n */\nvar MapType = /** @class */ (function (_super) {\n __extends(MapType, _super);\n function MapType(name, _subType, hookInitializers) {\n if (hookInitializers === void 0) { hookInitializers = []; }\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_subType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subType\n });\n Object.defineProperty(_this, \"identifierMode\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: MapIdentifierMode.UNKNOWN\n });\n Object.defineProperty(_this, \"mapIdentifierAttribute\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: undefined\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Map\n });\n Object.defineProperty(_this, \"hookInitializers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n _this._determineIdentifierMode();\n _this.hookInitializers = hookInitializers;\n return _this;\n }\n Object.defineProperty(MapType.prototype, \"hooks\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (hooks) {\n var hookInitializers = this.hookInitializers.length > 0 ? this.hookInitializers.concat(hooks) : [hooks];\n return new MapType(this.name, this._subType, hookInitializers);\n }\n });\n Object.defineProperty(MapType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n this._determineIdentifierMode();\n return createObjectNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(MapType.prototype, \"_determineIdentifierMode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n if (this.identifierMode !== MapIdentifierMode.UNKNOWN) {\n return;\n }\n var modelTypes = [];\n if (tryCollectModelTypes(this._subType, modelTypes)) {\n var identifierAttribute_1 = undefined;\n modelTypes.forEach(function (type) {\n if (type.identifierAttribute) {\n if (identifierAttribute_1 && identifierAttribute_1 !== type.identifierAttribute) {\n throw fail$1(\"The objects in a map should all have the same identifier attribute, expected '\" + identifierAttribute_1 + \"', but child of type '\" + type.name + \"' declared attribute '\" + type.identifierAttribute + \"' as identifier\");\n }\n identifierAttribute_1 = type.identifierAttribute;\n }\n });\n if (identifierAttribute_1) {\n this.identifierMode = MapIdentifierMode.YES;\n this.mapIdentifierAttribute = identifierAttribute_1;\n }\n else {\n this.identifierMode = MapIdentifierMode.NO;\n }\n }\n }\n });\n Object.defineProperty(MapType.prototype, \"initializeChildNodes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (objNode, initialSnapshot) {\n if (initialSnapshot === void 0) { initialSnapshot = {}; }\n var subType = objNode.type._subType;\n var result = {};\n Object.keys(initialSnapshot).forEach(function (name) {\n result[name] = subType.instantiate(objNode, name, undefined, initialSnapshot[name]);\n });\n return result;\n }\n });\n Object.defineProperty(MapType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n return new MSTMap(childNodes);\n }\n });\n Object.defineProperty(MapType.prototype, \"finalizeNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, instance) {\n _interceptReads(instance, node.unbox);\n var type = node.type;\n type.hookInitializers.forEach(function (initializer) {\n var hooks = initializer(instance);\n Object.keys(hooks).forEach(function (name) {\n var hook = hooks[name];\n var actionInvoker = createActionInvoker(instance, name, hook);\n (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(instance, name, actionInvoker);\n });\n });\n intercept(instance, this.willChange);\n observe(instance, this.didChange);\n }\n });\n Object.defineProperty(MapType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"Map<string, \" + this._subType.describe() + \">\";\n }\n });\n Object.defineProperty(MapType.prototype, \"getChildren\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n // return (node.storedValue as ObservableMap<any>).values()\n return values(node.storedValue);\n }\n });\n Object.defineProperty(MapType.prototype, \"getChildNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, key) {\n var childNode = node.storedValue.get(\"\" + key);\n if (!childNode)\n throw fail$1(\"Not a child \" + key);\n return childNode;\n }\n });\n Object.defineProperty(MapType.prototype, \"willChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (change) {\n var node = getStateTreeNode(change.object);\n var key = change.name;\n node.assertWritable({ subpath: key });\n var mapType = node.type;\n var subType = mapType._subType;\n switch (change.type) {\n case \"update\":\n {\n var newValue = change.newValue;\n var oldValue = change.object.get(key);\n if (newValue === oldValue)\n return null;\n typecheckInternal(subType, newValue);\n change.newValue = subType.reconcile(node.getChildNode(key), change.newValue, node, key);\n mapType.processIdentifier(key, change.newValue);\n }\n break;\n case \"add\":\n {\n typecheckInternal(subType, change.newValue);\n change.newValue = subType.instantiate(node, key, undefined, change.newValue);\n mapType.processIdentifier(key, change.newValue);\n }\n break;\n }\n return change;\n }\n });\n Object.defineProperty(MapType.prototype, \"processIdentifier\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (expected, node) {\n if (this.identifierMode === MapIdentifierMode.YES && node instanceof ObjectNode) {\n var identifier = node.identifier;\n if (identifier !== expected)\n throw fail$1(\"A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '\" + identifier + \"', but expected: '\" + expected + \"'\");\n }\n }\n });\n Object.defineProperty(MapType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var res = {};\n node.getChildren().forEach(function (childNode) {\n res[childNode.subpath] = childNode.snapshot;\n });\n return res;\n }\n });\n Object.defineProperty(MapType.prototype, \"processInitialSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n var processed = {};\n Object.keys(childNodes).forEach(function (key) {\n processed[key] = childNodes[key].getSnapshot();\n });\n return processed;\n }\n });\n Object.defineProperty(MapType.prototype, \"didChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (change) {\n var node = getStateTreeNode(change.object);\n switch (change.type) {\n case \"update\":\n return void node.emitPatch({\n op: \"replace\",\n path: escapeJsonPath(change.name),\n value: change.newValue.snapshot,\n oldValue: change.oldValue ? change.oldValue.snapshot : undefined\n }, node);\n case \"add\":\n return void node.emitPatch({\n op: \"add\",\n path: escapeJsonPath(change.name),\n value: change.newValue.snapshot,\n oldValue: undefined\n }, node);\n case \"delete\":\n // a node got deleted, get the old snapshot and make the node die\n var oldSnapshot = change.oldValue.snapshot;\n change.oldValue.die();\n // emit the patch\n return void node.emitPatch({\n op: \"remove\",\n path: escapeJsonPath(change.name),\n oldValue: oldSnapshot\n }, node);\n }\n }\n });\n Object.defineProperty(MapType.prototype, \"applyPatchLocally\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath, patch) {\n var target = node.storedValue;\n switch (patch.op) {\n case \"add\":\n case \"replace\":\n target.set(subpath, patch.value);\n break;\n case \"remove\":\n target.delete(subpath);\n break;\n }\n }\n });\n Object.defineProperty(MapType.prototype, \"applySnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, snapshot) {\n typecheckInternal(this, snapshot);\n var target = node.storedValue;\n var currentKeys = {};\n Array.from(target.keys()).forEach(function (key) {\n currentKeys[key] = false;\n });\n if (snapshot) {\n // Don't use target.replace, as it will throw away all existing items first\n for (var key in snapshot) {\n target.set(key, snapshot[key]);\n currentKeys[\"\" + key] = true;\n }\n }\n Object.keys(currentKeys).forEach(function (key) {\n if (currentKeys[key] === false)\n target.delete(key);\n });\n }\n });\n Object.defineProperty(MapType.prototype, \"getChildType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subType;\n }\n });\n Object.defineProperty(MapType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var _this = this;\n if (!isPlainObject(value)) {\n return typeCheckFailure(context, value, \"Value is not a plain object\");\n }\n return flattenTypeErrors(Object.keys(value).map(function (path) {\n return _this._subType.validate(value[path], getContextForPath(context, path, _this._subType));\n }));\n }\n });\n Object.defineProperty(MapType.prototype, \"getDefaultSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return EMPTY_OBJECT;\n }\n });\n Object.defineProperty(MapType.prototype, \"removeChild\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath) {\n node.storedValue.delete(subpath);\n }\n });\n return MapType;\n}(ComplexType));\nMapType.prototype.applySnapshot = action(MapType.prototype.applySnapshot);\n/**\n * `types.map` - Creates a key based collection type who's children are all of a uniform declared type.\n * If the type stored in a map has an identifier, it is mandatory to store the child under that identifier in the map.\n *\n * This type will always produce [observable maps](https://mobx.js.org/refguide/map.html)\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * id: types.identifier,\n * task: types.string\n * })\n *\n * const TodoStore = types.model({\n * todos: types.map(Todo)\n * })\n *\n * const s = TodoStore.create({ todos: {} })\n * unprotect(s)\n * s.todos.set(17, { task: \"Grab coffee\", id: 17 })\n * s.todos.put({ task: \"Grab cookie\", id: 18 }) // put will infer key from the identifier\n * console.log(s.todos.get(17).task) // prints: \"Grab coffee\"\n * ```\n *\n * @param subtype\n * @returns\n */\nfunction map(subtype) {\n return new MapType(\"map<string, \" + subtype.name + \">\", subtype);\n}\n/**\n * Returns if a given value represents a map type.\n *\n * @param type\n * @returns `true` if it is a map type.\n */\nfunction isMapType(type) {\n return isType(type) && (type.flags & TypeFlags.Map) > 0;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar ArrayType = /** @class */ (function (_super) {\n __extends(ArrayType, _super);\n function ArrayType(name, _subType, hookInitializers) {\n if (hookInitializers === void 0) { hookInitializers = []; }\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_subType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subType\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Array\n });\n Object.defineProperty(_this, \"hookInitializers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n _this.hookInitializers = hookInitializers;\n return _this;\n }\n Object.defineProperty(ArrayType.prototype, \"hooks\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (hooks) {\n var hookInitializers = this.hookInitializers.length > 0 ? this.hookInitializers.concat(hooks) : [hooks];\n return new ArrayType(this.name, this._subType, hookInitializers);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n return createObjectNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"initializeChildNodes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (objNode, snapshot) {\n if (snapshot === void 0) { snapshot = []; }\n var subType = objNode.type._subType;\n var result = {};\n snapshot.forEach(function (item, index) {\n var subpath = \"\" + index;\n result[subpath] = subType.instantiate(objNode, subpath, undefined, item);\n });\n return result;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n return observable.array(convertChildNodesToArray(childNodes), mobxShallow);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"finalizeNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, instance) {\n _getAdministration(instance).dehancer = node.unbox;\n var type = node.type;\n type.hookInitializers.forEach(function (initializer) {\n var hooks = initializer(instance);\n Object.keys(hooks).forEach(function (name) {\n var hook = hooks[name];\n var actionInvoker = createActionInvoker(instance, name, hook);\n (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(instance, name, actionInvoker);\n });\n });\n intercept(instance, this.willChange);\n observe(instance, this.didChange);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subType.describe() + \"[]\";\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getChildren\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return node.storedValue.slice();\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getChildNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, key) {\n var index = Number(key);\n if (index < node.storedValue.length)\n return node.storedValue[index];\n throw fail$1(\"Not a child: \" + key);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"willChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (change) {\n var node = getStateTreeNode(change.object);\n node.assertWritable({ subpath: \"\" + change.index });\n var subType = node.type._subType;\n var childNodes = node.getChildren();\n switch (change.type) {\n case \"update\":\n {\n if (change.newValue === change.object[change.index])\n return null;\n var updatedNodes = reconcileArrayChildren(node, subType, [childNodes[change.index]], [change.newValue], [change.index]);\n if (!updatedNodes) {\n return null;\n }\n change.newValue = updatedNodes[0];\n }\n break;\n case \"splice\":\n {\n var index_1 = change.index, removedCount = change.removedCount, added = change.added;\n var addedNodes = reconcileArrayChildren(node, subType, childNodes.slice(index_1, index_1 + removedCount), added, added.map(function (_, i) { return index_1 + i; }));\n if (!addedNodes) {\n return null;\n }\n change.added = addedNodes;\n // update paths of remaining items\n for (var i = index_1 + removedCount; i < childNodes.length; i++) {\n childNodes[i].setParent(node, \"\" + (i + added.length - removedCount));\n }\n }\n break;\n }\n return change;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return node.getChildren().map(function (childNode) { return childNode.snapshot; });\n }\n });\n Object.defineProperty(ArrayType.prototype, \"processInitialSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n var processed = [];\n Object.keys(childNodes).forEach(function (key) {\n processed.push(childNodes[key].getSnapshot());\n });\n return processed;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"didChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (change) {\n var node = getStateTreeNode(change.object);\n switch (change.type) {\n case \"update\":\n return void node.emitPatch({\n op: \"replace\",\n path: \"\" + change.index,\n value: change.newValue.snapshot,\n oldValue: change.oldValue ? change.oldValue.snapshot : undefined\n }, node);\n case \"splice\":\n for (var i = change.removedCount - 1; i >= 0; i--)\n node.emitPatch({\n op: \"remove\",\n path: \"\" + (change.index + i),\n oldValue: change.removed[i].snapshot\n }, node);\n for (var i = 0; i < change.addedCount; i++)\n node.emitPatch({\n op: \"add\",\n path: \"\" + (change.index + i),\n value: node.getChildNode(\"\" + (change.index + i)).snapshot,\n oldValue: undefined\n }, node);\n return;\n }\n }\n });\n Object.defineProperty(ArrayType.prototype, \"applyPatchLocally\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath, patch) {\n var target = node.storedValue;\n var index = subpath === \"-\" ? target.length : Number(subpath);\n switch (patch.op) {\n case \"replace\":\n target[index] = patch.value;\n break;\n case \"add\":\n target.splice(index, 0, patch.value);\n break;\n case \"remove\":\n target.splice(index, 1);\n break;\n }\n }\n });\n Object.defineProperty(ArrayType.prototype, \"applySnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, snapshot) {\n typecheckInternal(this, snapshot);\n var target = node.storedValue;\n target.replace(snapshot);\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getChildType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subType;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var _this = this;\n if (!isArray(value)) {\n return typeCheckFailure(context, value, \"Value is not an array\");\n }\n return flattenTypeErrors(value.map(function (item, index) {\n return _this._subType.validate(item, getContextForPath(context, \"\" + index, _this._subType));\n }));\n }\n });\n Object.defineProperty(ArrayType.prototype, \"getDefaultSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return EMPTY_ARRAY;\n }\n });\n Object.defineProperty(ArrayType.prototype, \"removeChild\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath) {\n node.storedValue.splice(Number(subpath), 1);\n }\n });\n return ArrayType;\n}(ComplexType));\nArrayType.prototype.applySnapshot = action(ArrayType.prototype.applySnapshot);\n/**\n * `types.array` - Creates an index based collection type who's children are all of a uniform declared type.\n *\n * This type will always produce [observable arrays](https://mobx.js.org/refguide/array.html)\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * task: types.string\n * })\n *\n * const TodoStore = types.model({\n * todos: types.array(Todo)\n * })\n *\n * const s = TodoStore.create({ todos: [] })\n * unprotect(s) // needed to allow modifying outside of an action\n * s.todos.push({ task: \"Grab coffee\" })\n * console.log(s.todos[0]) // prints: \"Grab coffee\"\n * ```\n *\n * @param subtype\n * @returns\n */\nfunction array(subtype) {\n assertIsType(subtype, 1);\n return new ArrayType(subtype.name + \"[]\", subtype);\n}\nfunction reconcileArrayChildren(parent, childType, oldNodes, newValues, newPaths) {\n var nothingChanged = true;\n for (var i = 0;; i++) {\n var hasNewNode = i <= newValues.length - 1;\n var oldNode = oldNodes[i];\n var newValue = hasNewNode ? newValues[i] : undefined;\n var newPath = \"\" + newPaths[i];\n // for some reason, instead of newValue we got a node, fallback to the storedValue\n // TODO: https://github.com/mobxjs/mobx-state-tree/issues/340#issuecomment-325581681\n if (isNode(newValue))\n newValue = newValue.storedValue;\n if (!oldNode && !hasNewNode) {\n // both are empty, end\n break;\n }\n else if (!hasNewNode) {\n // new one does not exists\n nothingChanged = false;\n oldNodes.splice(i, 1);\n if (oldNode instanceof ObjectNode) {\n // since it is going to be returned by pop/splice/shift better create it before killing it\n // so it doesn't end up in an undead state\n oldNode.createObservableInstanceIfNeeded();\n }\n oldNode.die();\n i--;\n }\n else if (!oldNode) {\n // there is no old node, create it\n // check if already belongs to the same parent. if so, avoid pushing item in. only swapping can occur.\n if (isStateTreeNode(newValue) && getStateTreeNode(newValue).parent === parent) {\n // this node is owned by this parent, but not in the reconcilable set, so it must be double\n throw fail$1(\"Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '\" + parent.path + \"/\" + newPath + \"', but it lives already at '\" + getStateTreeNode(newValue).path + \"'\");\n }\n nothingChanged = false;\n var newNode = valueAsNode(childType, parent, newPath, newValue);\n oldNodes.splice(i, 0, newNode);\n }\n else if (areSame(oldNode, newValue)) {\n // both are the same, reconcile\n oldNodes[i] = valueAsNode(childType, parent, newPath, newValue, oldNode);\n }\n else {\n // nothing to do, try to reorder\n var oldMatch = undefined;\n // find a possible candidate to reuse\n for (var j = i; j < oldNodes.length; j++) {\n if (areSame(oldNodes[j], newValue)) {\n oldMatch = oldNodes.splice(j, 1)[0];\n break;\n }\n }\n nothingChanged = false;\n var newNode = valueAsNode(childType, parent, newPath, newValue, oldMatch);\n oldNodes.splice(i, 0, newNode);\n }\n }\n return nothingChanged ? null : oldNodes;\n}\n/**\n * Convert a value to a node at given parent and subpath. Attempts to reuse old node if possible and given.\n */\nfunction valueAsNode(childType, parent, subpath, newValue, oldNode) {\n // ensure the value is valid-ish\n typecheckInternal(childType, newValue);\n function getNewNode() {\n // the new value has a MST node\n if (isStateTreeNode(newValue)) {\n var childNode = getStateTreeNode(newValue);\n childNode.assertAlive(EMPTY_OBJECT);\n // the node lives here\n if (childNode.parent !== null && childNode.parent === parent) {\n childNode.setParent(parent, subpath);\n return childNode;\n }\n }\n // there is old node and new one is a value/snapshot\n if (oldNode) {\n return childType.reconcile(oldNode, newValue, parent, subpath);\n }\n // nothing to do, create from scratch\n return childType.instantiate(parent, subpath, undefined, newValue);\n }\n var newNode = getNewNode();\n if (oldNode && oldNode !== newNode) {\n if (oldNode instanceof ObjectNode) {\n // since it is going to be returned by pop/splice/shift better create it before killing it\n // so it doesn't end up in an undead state\n oldNode.createObservableInstanceIfNeeded();\n }\n oldNode.die();\n }\n return newNode;\n}\n/**\n * Check if a node holds a value.\n */\nfunction areSame(oldNode, newValue) {\n // never consider dead old nodes for reconciliation\n if (!oldNode.isAlive) {\n return false;\n }\n // the new value has the same node\n if (isStateTreeNode(newValue)) {\n var newNode = getStateTreeNode(newValue);\n return newNode.isAlive && newNode === oldNode;\n }\n // the provided value is the snapshot of the old node\n if (oldNode.snapshot === newValue) {\n return true;\n }\n // new value is a snapshot with the correct identifier\n return (oldNode instanceof ObjectNode &&\n oldNode.identifier !== null &&\n oldNode.identifierAttribute &&\n isPlainObject(newValue) &&\n oldNode.identifier === normalizeIdentifier(newValue[oldNode.identifierAttribute]) &&\n oldNode.type.is(newValue));\n}\n/**\n * Returns if a given value represents an array type.\n *\n * @param type\n * @returns `true` if the type is an array type.\n */\nfunction isArrayType(type) {\n return isType(type) && (type.flags & TypeFlags.Array) > 0;\n}\n\nvar PRE_PROCESS_SNAPSHOT = \"preProcessSnapshot\";\nvar POST_PROCESS_SNAPSHOT = \"postProcessSnapshot\";\nfunction objectTypeToString() {\n return getStateTreeNode(this).toString();\n}\nvar defaultObjectOptions = {\n name: \"AnonymousModel\",\n properties: {},\n initializers: EMPTY_ARRAY\n};\nfunction toPropertiesObject(declaredProps) {\n // loop through properties and ensures that all items are types\n return Object.keys(declaredProps).reduce(function (props, key) {\n var _a, _b, _c;\n // warn if user intended a HOOK\n if (key in Hook)\n throw fail$1(\"Hook '\" + key + \"' was defined as property. Hooks should be defined as part of the actions\");\n // the user intended to use a view\n var descriptor = Object.getOwnPropertyDescriptor(props, key);\n if (\"get\" in descriptor) {\n throw fail$1(\"Getters are not supported as properties. Please use views instead\");\n }\n // undefined and null are not valid\n var value = descriptor.value;\n if (value === null || value === undefined) {\n throw fail$1(\"The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?\");\n // its a primitive, convert to its type\n }\n else if (isPrimitive(value)) {\n return Object.assign({}, props, (_a = {},\n _a[key] = optional(getPrimitiveFactoryFromValue(value), value),\n _a));\n // map defaults to empty object automatically for models\n }\n else if (value instanceof MapType) {\n return Object.assign({}, props, (_b = {},\n _b[key] = optional(value, {}),\n _b));\n }\n else if (value instanceof ArrayType) {\n return Object.assign({}, props, (_c = {}, _c[key] = optional(value, []), _c));\n // its already a type\n }\n else if (isType(value)) {\n return props;\n // its a function, maybe the user wanted a view?\n }\n else if (devMode() && typeof value === \"function\") {\n throw fail$1(\"Invalid type definition for property '\" + key + \"', it looks like you passed a function. Did you forget to invoke it, or did you intend to declare a view / action?\");\n // no other complex values\n }\n else if (devMode() && typeof value === \"object\") {\n throw fail$1(\"Invalid type definition for property '\" + key + \"', it looks like you passed an object. Try passing another model type or a types.frozen.\");\n // WTF did you pass in mate?\n }\n else {\n throw fail$1(\"Invalid type definition for property '\" + key + \"', cannot infer a type from a value like '\" + value + \"' (\" + typeof value + \")\");\n }\n }, declaredProps);\n}\n/**\n * @internal\n * @hidden\n */\nvar ModelType = /** @class */ (function (_super) {\n __extends(ModelType, _super);\n function ModelType(opts) {\n var _this = _super.call(this, opts.name || defaultObjectOptions.name) || this;\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Object\n });\n /*\n * The original object definition\n */\n Object.defineProperty(_this, \"initializers\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"properties\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"preProcessor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"postProcessor\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"propertyNames\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"named\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (name) {\n return _this.cloneAndEnhance({ name: name });\n }\n });\n Object.defineProperty(_this, \"props\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (properties) {\n return _this.cloneAndEnhance({ properties: properties });\n }\n });\n Object.defineProperty(_this, \"preProcessSnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (preProcessor) {\n var currentPreprocessor = _this.preProcessor;\n if (!currentPreprocessor)\n return _this.cloneAndEnhance({ preProcessor: preProcessor });\n else\n return _this.cloneAndEnhance({\n preProcessor: function (snapshot) { return currentPreprocessor(preProcessor(snapshot)); }\n });\n }\n });\n Object.defineProperty(_this, \"postProcessSnapshot\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: function (postProcessor) {\n var currentPostprocessor = _this.postProcessor;\n if (!currentPostprocessor)\n return _this.cloneAndEnhance({ postProcessor: postProcessor });\n else\n return _this.cloneAndEnhance({\n postProcessor: function (snapshot) { return postProcessor(currentPostprocessor(snapshot)); }\n });\n }\n });\n Object.assign(_this, defaultObjectOptions, opts);\n // ensures that any default value gets converted to its related type\n _this.properties = toPropertiesObject(_this.properties);\n freeze(_this.properties); // make sure nobody messes with it\n _this.propertyNames = Object.keys(_this.properties);\n _this.identifierAttribute = _this._getIdentifierAttribute();\n return _this;\n }\n Object.defineProperty(ModelType.prototype, \"_getIdentifierAttribute\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var identifierAttribute = undefined;\n this.forAllProps(function (propName, propType) {\n if (propType.flags & TypeFlags.Identifier) {\n if (identifierAttribute)\n throw fail$1(\"Cannot define property '\" + propName + \"' as object identifier, property '\" + identifierAttribute + \"' is already defined as identifier property\");\n identifierAttribute = propName;\n }\n });\n return identifierAttribute;\n }\n });\n Object.defineProperty(ModelType.prototype, \"cloneAndEnhance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (opts) {\n return new ModelType({\n name: opts.name || this.name,\n properties: Object.assign({}, this.properties, opts.properties),\n initializers: this.initializers.concat(opts.initializers || []),\n preProcessor: opts.preProcessor || this.preProcessor,\n postProcessor: opts.postProcessor || this.postProcessor\n });\n }\n });\n Object.defineProperty(ModelType.prototype, \"actions\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n var actionInitializer = function (self) {\n _this.instantiateActions(self, fn(self));\n return self;\n };\n return this.cloneAndEnhance({ initializers: [actionInitializer] });\n }\n });\n Object.defineProperty(ModelType.prototype, \"instantiateActions\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (self, actions) {\n // check if return is correct\n if (!isPlainObject(actions))\n throw fail$1(\"actions initializer should return a plain object containing actions\");\n // bind actions to the object created\n Object.keys(actions).forEach(function (name) {\n // warn if preprocessor was given\n if (name === PRE_PROCESS_SNAPSHOT)\n throw fail$1(\"Cannot define action '\" + PRE_PROCESS_SNAPSHOT + \"', it should be defined using 'type.preProcessSnapshot(fn)' instead\");\n // warn if postprocessor was given\n if (name === POST_PROCESS_SNAPSHOT)\n throw fail$1(\"Cannot define action '\" + POST_PROCESS_SNAPSHOT + \"', it should be defined using 'type.postProcessSnapshot(fn)' instead\");\n var action2 = actions[name];\n // apply hook composition\n var baseAction = self[name];\n if (name in Hook && baseAction) {\n var specializedAction_1 = action2;\n action2 = function () {\n baseAction.apply(null, arguments);\n specializedAction_1.apply(null, arguments);\n };\n }\n // the goal of this is to make sure actions using \"this\" can call themselves,\n // while still allowing the middlewares to register them\n var middlewares = action2.$mst_middleware; // make sure middlewares are not lost\n var boundAction = action2.bind(actions);\n boundAction.$mst_middleware = middlewares;\n var actionInvoker = createActionInvoker(self, name, boundAction);\n actions[name] = actionInvoker;\n (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(self, name, actionInvoker);\n });\n }\n });\n Object.defineProperty(ModelType.prototype, \"volatile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n if (typeof fn !== \"function\") {\n throw fail$1(\"You passed an \" + typeof fn + \" to volatile state as an argument, when function is expected\");\n }\n var stateInitializer = function (self) {\n _this.instantiateVolatileState(self, fn(self));\n return self;\n };\n return this.cloneAndEnhance({ initializers: [stateInitializer] });\n }\n });\n Object.defineProperty(ModelType.prototype, \"instantiateVolatileState\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (self, state) {\n // check views return\n if (!isPlainObject(state))\n throw fail$1(\"volatile state initializer should return a plain object containing state\");\n set(self, state);\n }\n });\n Object.defineProperty(ModelType.prototype, \"extend\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n var initializer = function (self) {\n var _a = fn(self), actions = _a.actions, views = _a.views, state = _a.state, rest = __rest(_a, [\"actions\", \"views\", \"state\"]);\n for (var key in rest)\n throw fail$1(\"The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '\" + key + \"'\");\n if (state)\n _this.instantiateVolatileState(self, state);\n if (views)\n _this.instantiateViews(self, views);\n if (actions)\n _this.instantiateActions(self, actions);\n return self;\n };\n return this.cloneAndEnhance({ initializers: [initializer] });\n }\n });\n Object.defineProperty(ModelType.prototype, \"views\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n var viewInitializer = function (self) {\n _this.instantiateViews(self, fn(self));\n return self;\n };\n return this.cloneAndEnhance({ initializers: [viewInitializer] });\n }\n });\n Object.defineProperty(ModelType.prototype, \"instantiateViews\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (self, views) {\n // check views return\n if (!isPlainObject(views))\n throw fail$1(\"views initializer should return a plain object containing views\");\n Object.keys(views).forEach(function (key) {\n var _a;\n // is this a computed property?\n var descriptor = Object.getOwnPropertyDescriptor(views, key);\n if (\"get\" in descriptor) {\n if (isComputedProp(self, key)) {\n var computedValue = _getAdministration(self, key);\n // TODO: mobx currently does not allow redefining computes yet, pending #1121\n // FIXME: this binds to the internals of mobx!\n computedValue.derivation = descriptor.get;\n computedValue.scope = self;\n if (descriptor.set)\n computedValue.setter = action(computedValue.name + \"-setter\", descriptor.set);\n }\n else {\n Object.defineProperty(self, key, descriptor);\n makeObservable(self, (_a = {}, _a[key] = computed, _a));\n }\n }\n else if (typeof descriptor.value === \"function\") {\n (!devMode() ? addHiddenFinalProp : addHiddenWritableProp)(self, key, descriptor.value);\n }\n else {\n throw fail$1(\"A view member should either be a function or getter based property\");\n }\n });\n }\n });\n Object.defineProperty(ModelType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var value = isStateTreeNode(initialValue)\n ? initialValue\n : this.applySnapshotPreProcessor(initialValue);\n return createObjectNode(this, parent, subpath, environment, value);\n // Optimization: record all prop- view- and action names after first construction, and generate an optimal base class\n // that pre-reserves all these fields for fast object-member lookups\n }\n });\n Object.defineProperty(ModelType.prototype, \"initializeChildNodes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (objNode, initialSnapshot) {\n if (initialSnapshot === void 0) { initialSnapshot = {}; }\n var type = objNode.type;\n var result = {};\n type.forAllProps(function (name, childType) {\n result[name] = childType.instantiate(objNode, name, undefined, initialSnapshot[name]);\n });\n return result;\n }\n });\n Object.defineProperty(ModelType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n return observable.object(childNodes, EMPTY_OBJECT, mobxShallow);\n }\n });\n Object.defineProperty(ModelType.prototype, \"finalizeNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, instance) {\n addHiddenFinalProp(instance, \"toString\", objectTypeToString);\n this.forAllProps(function (name) {\n _interceptReads(instance, name, node.unbox);\n });\n this.initializers.reduce(function (self, fn) { return fn(self); }, instance);\n intercept(instance, this.willChange);\n observe(instance, this.didChange);\n }\n });\n Object.defineProperty(ModelType.prototype, \"willChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (chg) {\n // TODO: mobx typings don't seem to take into account that newValue can be set even when removing a prop\n var change = chg;\n var node = getStateTreeNode(change.object);\n var subpath = change.name;\n node.assertWritable({ subpath: subpath });\n var childType = node.type.properties[subpath];\n // only properties are typed, state are stored as-is references\n if (childType) {\n typecheckInternal(childType, change.newValue);\n change.newValue = childType.reconcile(node.getChildNode(subpath), change.newValue, node, subpath);\n }\n return change;\n }\n });\n Object.defineProperty(ModelType.prototype, \"didChange\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (chg) {\n // TODO: mobx typings don't seem to take into account that newValue can be set even when removing a prop\n var change = chg;\n var childNode = getStateTreeNode(change.object);\n var childType = childNode.type.properties[change.name];\n if (!childType) {\n // don't emit patches for volatile state\n return;\n }\n var oldChildValue = change.oldValue ? change.oldValue.snapshot : undefined;\n childNode.emitPatch({\n op: \"replace\",\n path: escapeJsonPath(change.name),\n value: change.newValue.snapshot,\n oldValue: oldChildValue\n }, childNode);\n }\n });\n Object.defineProperty(ModelType.prototype, \"getChildren\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var _this = this;\n var res = [];\n this.forAllProps(function (name) {\n res.push(_this.getChildNode(node, name));\n });\n return res;\n }\n });\n Object.defineProperty(ModelType.prototype, \"getChildNode\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, key) {\n if (!(key in this.properties))\n throw fail$1(\"Not a value property: \" + key);\n var adm = _getAdministration(node.storedValue, key);\n var childNode = adm.raw();\n if (!childNode)\n throw fail$1(\"Node not available for property \" + key);\n return childNode;\n }\n });\n Object.defineProperty(ModelType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, applyPostProcess) {\n var _this = this;\n if (applyPostProcess === void 0) { applyPostProcess = true; }\n var res = {};\n this.forAllProps(function (name, type) {\n getAtom(node.storedValue, name).reportObserved();\n res[name] = _this.getChildNode(node, name).snapshot;\n });\n if (applyPostProcess) {\n return this.applySnapshotPostProcessor(res);\n }\n return res;\n }\n });\n Object.defineProperty(ModelType.prototype, \"processInitialSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (childNodes) {\n var processed = {};\n Object.keys(childNodes).forEach(function (key) {\n processed[key] = childNodes[key].getSnapshot();\n });\n return this.applySnapshotPostProcessor(processed);\n }\n });\n Object.defineProperty(ModelType.prototype, \"applyPatchLocally\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath, patch) {\n if (!(patch.op === \"replace\" || patch.op === \"add\")) {\n throw fail$1(\"object does not support operation \" + patch.op);\n }\n node.storedValue[subpath] = patch.value;\n }\n });\n Object.defineProperty(ModelType.prototype, \"applySnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, snapshot) {\n var preProcessedSnapshot = this.applySnapshotPreProcessor(snapshot);\n typecheckInternal(this, preProcessedSnapshot);\n this.forAllProps(function (name) {\n node.storedValue[name] = preProcessedSnapshot[name];\n });\n }\n });\n Object.defineProperty(ModelType.prototype, \"applySnapshotPreProcessor\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n var processor = this.preProcessor;\n return processor ? processor.call(null, snapshot) : snapshot;\n }\n });\n Object.defineProperty(ModelType.prototype, \"applySnapshotPostProcessor\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n var postProcessor = this.postProcessor;\n if (postProcessor)\n return postProcessor.call(null, snapshot);\n return snapshot;\n }\n });\n Object.defineProperty(ModelType.prototype, \"getChildType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (propertyName) {\n assertIsString(propertyName, 1);\n return this.properties[propertyName];\n }\n });\n Object.defineProperty(ModelType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var _this = this;\n var snapshot = this.applySnapshotPreProcessor(value);\n if (!isPlainObject(snapshot)) {\n return typeCheckFailure(context, snapshot, \"Value is not a plain object\");\n }\n return flattenTypeErrors(this.propertyNames.map(function (key) {\n return _this.properties[key].validate(snapshot[key], getContextForPath(context, key, _this.properties[key]));\n }));\n }\n });\n Object.defineProperty(ModelType.prototype, \"forAllProps\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (fn) {\n var _this = this;\n this.propertyNames.forEach(function (key) { return fn(key, _this.properties[key]); });\n }\n });\n Object.defineProperty(ModelType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var _this = this;\n // optimization: cache\n return (\"{ \" +\n this.propertyNames\n .map(function (key) { return key + \": \" + _this.properties[key].describe(); })\n .join(\"; \") +\n \" }\");\n }\n });\n Object.defineProperty(ModelType.prototype, \"getDefaultSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return EMPTY_OBJECT;\n }\n });\n Object.defineProperty(ModelType.prototype, \"removeChild\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node, subpath) {\n node.storedValue[subpath] = undefined;\n }\n });\n return ModelType;\n}(ComplexType));\nModelType.prototype.applySnapshot = action(ModelType.prototype.applySnapshot);\n/**\n * `types.model` - Creates a new model type by providing a name, properties, volatile state and actions.\n *\n * See the [model type](/concepts/trees#creating-models) description or the [getting started](intro/getting-started.md#getting-started-1) tutorial.\n */\nfunction model() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var name = typeof args[0] === \"string\" ? args.shift() : \"AnonymousModel\";\n var properties = args.shift() || {};\n return new ModelType({ name: name, properties: properties });\n}\n/**\n * `types.compose` - Composes a new model from one or more existing model types.\n * This method can be invoked in two forms:\n * Given 2 or more model types, the types are composed into a new Type.\n * Given first parameter as a string and 2 or more model types,\n * the types are composed into a new Type with the given name\n */\nfunction compose() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // TODO: just join the base type names if no name is provided\n var hasTypename = typeof args[0] === \"string\";\n var typeName = hasTypename ? args[0] : \"AnonymousModel\";\n if (hasTypename) {\n args.shift();\n }\n // check all parameters\n if (devMode()) {\n args.forEach(function (type, i) {\n assertArg(type, isModelType, \"mobx-state-tree model type\", hasTypename ? i + 2 : i + 1);\n });\n }\n return args\n .reduce(function (prev, cur) {\n return prev.cloneAndEnhance({\n name: prev.name + \"_\" + cur.name,\n properties: cur.properties,\n initializers: cur.initializers,\n preProcessor: function (snapshot) {\n return cur.applySnapshotPreProcessor(prev.applySnapshotPreProcessor(snapshot));\n },\n postProcessor: function (snapshot) {\n return cur.applySnapshotPostProcessor(prev.applySnapshotPostProcessor(snapshot));\n }\n });\n })\n .named(typeName);\n}\n/**\n * Returns if a given value represents a model type.\n *\n * @param type\n * @returns\n */\nfunction isModelType(type) {\n return isType(type) && (type.flags & TypeFlags.Object) > 0;\n}\n\n// TODO: implement CoreType using types.custom ?\n/**\n * @internal\n * @hidden\n */\nvar CoreType = /** @class */ (function (_super) {\n __extends(CoreType, _super);\n function CoreType(name, flags, checker, initializer) {\n if (initializer === void 0) { initializer = identity; }\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: flags\n });\n Object.defineProperty(_this, \"checker\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: checker\n });\n Object.defineProperty(_this, \"initializer\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: initializer\n });\n _this.flags = flags;\n return _this;\n }\n Object.defineProperty(CoreType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.name;\n }\n });\n Object.defineProperty(CoreType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n return createScalarNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(CoreType.prototype, \"createNewInstance\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (snapshot) {\n return this.initializer(snapshot);\n }\n });\n Object.defineProperty(CoreType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (isPrimitive(value) && this.checker(value)) {\n return typeCheckSuccess();\n }\n var typeName = this.name === \"Date\" ? \"Date or a unix milliseconds timestamp\" : this.name;\n return typeCheckFailure(context, value, \"Value is not a \" + typeName);\n }\n });\n return CoreType;\n}(SimpleType));\n/**\n * `types.string` - Creates a type that can only contain a string value.\n * This type is used for string values by default\n *\n * Example:\n * ```ts\n * const Person = types.model({\n * firstName: types.string,\n * lastName: \"Doe\"\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nvar string = new CoreType(\"string\", TypeFlags.String, function (v) { return typeof v === \"string\"; });\n/**\n * `types.number` - Creates a type that can only contain a numeric value.\n * This type is used for numeric values by default\n *\n * Example:\n * ```ts\n * const Vector = types.model({\n * x: types.number,\n * y: 1.5\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nvar number = new CoreType(\"number\", TypeFlags.Number, function (v) { return typeof v === \"number\"; });\n/**\n * `types.integer` - Creates a type that can only contain an integer value.\n * This type is used for integer values by default\n *\n * Example:\n * ```ts\n * const Size = types.model({\n * width: types.integer,\n * height: 10\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nvar integer = new CoreType(\"integer\", TypeFlags.Integer, function (v) { return isInteger(v); });\n/**\n * `types.boolean` - Creates a type that can only contain a boolean value.\n * This type is used for boolean values by default\n *\n * Example:\n * ```ts\n * const Thing = types.model({\n * isCool: types.boolean,\n * isAwesome: false\n * })\n * ```\n */\n// tslint:disable-next-line:variable-name\nvar boolean = new CoreType(\"boolean\", TypeFlags.Boolean, function (v) { return typeof v === \"boolean\"; });\n/**\n * `types.null` - The type of the value `null`\n */\nvar nullType = new CoreType(\"null\", TypeFlags.Null, function (v) { return v === null; });\n/**\n * `types.undefined` - The type of the value `undefined`\n */\nvar undefinedType = new CoreType(\"undefined\", TypeFlags.Undefined, function (v) { return v === undefined; });\nvar _DatePrimitive = new CoreType(\"Date\", TypeFlags.Date, function (v) { return typeof v === \"number\" || v instanceof Date; }, function (v) { return (v instanceof Date ? v : new Date(v)); });\n_DatePrimitive.getSnapshot = function (node) {\n return node.storedValue.getTime();\n};\n/**\n * `types.Date` - Creates a type that can only contain a javascript Date value.\n *\n * Example:\n * ```ts\n * const LogLine = types.model({\n * timestamp: types.Date,\n * })\n *\n * LogLine.create({ timestamp: new Date() })\n * ```\n */\nvar DatePrimitive = _DatePrimitive;\n/**\n * @internal\n * @hidden\n */\nfunction getPrimitiveFactoryFromValue(value) {\n switch (typeof value) {\n case \"string\":\n return string;\n case \"number\":\n return number; // In the future, isInteger(value) ? integer : number would be interesting, but would be too breaking for now\n case \"boolean\":\n return boolean;\n case \"object\":\n if (value instanceof Date)\n return DatePrimitive;\n }\n throw fail$1(\"Cannot determine primitive type from value \" + value);\n}\n/**\n * Returns if a given value represents a primitive type.\n *\n * @param type\n * @returns\n */\nfunction isPrimitiveType(type) {\n return (isType(type) &&\n (type.flags &\n (TypeFlags.String |\n TypeFlags.Number |\n TypeFlags.Integer |\n TypeFlags.Boolean |\n TypeFlags.Date)) >\n 0);\n}\n\n/**\n * @internal\n * @hidden\n */\nvar Literal = /** @class */ (function (_super) {\n __extends(Literal, _super);\n function Literal(value) {\n var _this = _super.call(this, JSON.stringify(value)) || this;\n Object.defineProperty(_this, \"value\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Literal\n });\n _this.value = value;\n return _this;\n }\n Object.defineProperty(Literal.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n return createScalarNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(Literal.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return JSON.stringify(this.value);\n }\n });\n Object.defineProperty(Literal.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (isPrimitive(value) && value === this.value) {\n return typeCheckSuccess();\n }\n return typeCheckFailure(context, value, \"Value is not a literal \" + JSON.stringify(this.value));\n }\n });\n return Literal;\n}(SimpleType));\n/**\n * `types.literal` - The literal type will return a type that will match only the exact given type.\n * The given value must be a primitive, in order to be serialized to a snapshot correctly.\n * You can use literal to match exact strings for example the exact male or female string.\n *\n * Example:\n * ```ts\n * const Person = types.model({\n * name: types.string,\n * gender: types.union(types.literal('male'), types.literal('female'))\n * })\n * ```\n *\n * @param value The value to use in the strict equal check\n * @returns\n */\nfunction literal(value) {\n // check that the given value is a primitive\n assertArg(value, isPrimitive, \"primitive\", 1);\n return new Literal(value);\n}\n/**\n * Returns if a given value represents a literal type.\n *\n * @param type\n * @returns\n */\nfunction isLiteralType(type) {\n return isType(type) && (type.flags & TypeFlags.Literal) > 0;\n}\n\nvar Refinement = /** @class */ (function (_super) {\n __extends(Refinement, _super);\n function Refinement(name, _subtype, _predicate, _message) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_subtype\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subtype\n });\n Object.defineProperty(_this, \"_predicate\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _predicate\n });\n Object.defineProperty(_this, \"_message\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _message\n });\n return _this;\n }\n Object.defineProperty(Refinement.prototype, \"flags\", {\n get: function () {\n return this._subtype.flags | TypeFlags.Refinement;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Refinement.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.name;\n }\n });\n Object.defineProperty(Refinement.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n // create the child type\n return this._subtype.instantiate(parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(Refinement.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this._subtype.isAssignableFrom(type);\n }\n });\n Object.defineProperty(Refinement.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var subtypeErrors = this._subtype.validate(value, context);\n if (subtypeErrors.length > 0)\n return subtypeErrors;\n var snapshot = isStateTreeNode(value) ? getStateTreeNode(value).snapshot : value;\n if (!this._predicate(snapshot)) {\n return typeCheckFailure(context, value, this._message(value));\n }\n return typeCheckSuccess();\n }\n });\n Object.defineProperty(Refinement.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n return this._subtype.reconcile(current, newValue, parent, subpath);\n }\n });\n Object.defineProperty(Refinement.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subtype;\n }\n });\n return Refinement;\n}(BaseType));\n/**\n * `types.refinement` - Creates a type that is more specific than the base type, e.g. `types.refinement(types.string, value => value.length > 5)` to create a type of strings that can only be longer then 5.\n *\n * @param name\n * @param type\n * @param predicate\n * @returns\n */\nfunction refinement() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var name = typeof args[0] === \"string\" ? args.shift() : isType(args[0]) ? args[0].name : null;\n var type = args[0];\n var predicate = args[1];\n var message = args[2]\n ? args[2]\n : function (v) { return \"Value does not respect the refinement predicate\"; };\n // ensures all parameters are correct\n assertIsType(type, [1, 2]);\n assertIsString(name, 1);\n assertIsFunction(predicate, [2, 3]);\n assertIsFunction(message, [3, 4]);\n return new Refinement(name, type, predicate, message);\n}\n/**\n * Returns if a given value is a refinement type.\n *\n * @param type\n * @returns\n */\nfunction isRefinementType(type) {\n return (type.flags & TypeFlags.Refinement) > 0;\n}\n\n/**\n * `types.enumeration` - Can be used to create an string based enumeration.\n * (note: this methods is just sugar for a union of string literals)\n *\n * Example:\n * ```ts\n * const TrafficLight = types.model({\n * color: types.enumeration(\"Color\", [\"Red\", \"Orange\", \"Green\"])\n * })\n * ```\n *\n * @param name descriptive name of the enumeration (optional)\n * @param options possible values this enumeration can have\n * @returns\n */\nfunction enumeration(name, options) {\n var realOptions = typeof name === \"string\" ? options : name;\n // check all options\n if (devMode()) {\n realOptions.forEach(function (option, i) {\n assertIsString(option, i + 1);\n });\n }\n var type = union.apply(void 0, __spread(realOptions.map(function (option) { return literal(\"\" + option); })));\n if (typeof name === \"string\")\n type.name = name;\n return type;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar Union = /** @class */ (function (_super) {\n __extends(Union, _super);\n function Union(name, _types, options) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_types\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _types\n });\n Object.defineProperty(_this, \"_dispatcher\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(_this, \"_eager\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: true\n });\n options = __assign({ eager: true, dispatcher: undefined }, options);\n _this._dispatcher = options.dispatcher;\n if (!options.eager)\n _this._eager = false;\n return _this;\n }\n Object.defineProperty(Union.prototype, \"flags\", {\n get: function () {\n var result = TypeFlags.Union;\n this._types.forEach(function (type) {\n result |= type.flags;\n });\n return result;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Union.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this._types.some(function (subType) { return subType.isAssignableFrom(type); });\n }\n });\n Object.defineProperty(Union.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"(\" + this._types.map(function (factory) { return factory.describe(); }).join(\" | \") + \")\";\n }\n });\n Object.defineProperty(Union.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var type = this.determineType(initialValue, undefined);\n if (!type)\n throw fail$1(\"No matching type for union \" + this.describe()); // can happen in prod builds\n return type.instantiate(parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(Union.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n var type = this.determineType(newValue, current.type);\n if (!type)\n throw fail$1(\"No matching type for union \" + this.describe()); // can happen in prod builds\n return type.reconcile(current, newValue, parent, subpath);\n }\n });\n Object.defineProperty(Union.prototype, \"determineType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, reconcileCurrentType) {\n // try the dispatcher, if defined\n if (this._dispatcher) {\n return this._dispatcher(value);\n }\n // find the most accomodating type\n // if we are using reconciliation try the current node type first (fix for #1045)\n if (reconcileCurrentType) {\n if (reconcileCurrentType.is(value)) {\n return reconcileCurrentType;\n }\n return this._types\n .filter(function (t) { return t !== reconcileCurrentType; })\n .find(function (type) { return type.is(value); });\n }\n else {\n return this._types.find(function (type) { return type.is(value); });\n }\n }\n });\n Object.defineProperty(Union.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (this._dispatcher) {\n return this._dispatcher(value).validate(value, context);\n }\n var allErrors = [];\n var applicableTypes = 0;\n for (var i = 0; i < this._types.length; i++) {\n var type = this._types[i];\n var errors = type.validate(value, context);\n if (errors.length === 0) {\n if (this._eager)\n return typeCheckSuccess();\n else\n applicableTypes++;\n }\n else {\n allErrors.push(errors);\n }\n }\n if (applicableTypes === 1)\n return typeCheckSuccess();\n return typeCheckFailure(context, value, \"No type is applicable for the union\").concat(flattenTypeErrors(allErrors));\n }\n });\n Object.defineProperty(Union.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._types;\n }\n });\n return Union;\n}(BaseType));\n/**\n * `types.union` - Create a union of multiple types. If the correct type cannot be inferred unambiguously from a snapshot, provide a dispatcher function of the form `(snapshot) => Type`.\n *\n * @param optionsOrType\n * @param otherTypes\n * @returns\n */\nfunction union(optionsOrType) {\n var otherTypes = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n otherTypes[_i - 1] = arguments[_i];\n }\n var options = isType(optionsOrType) ? undefined : optionsOrType;\n var types = isType(optionsOrType) ? __spread([optionsOrType], otherTypes) : otherTypes;\n var name = \"(\" + types.map(function (type) { return type.name; }).join(\" | \") + \")\";\n // check all options\n if (devMode()) {\n if (options) {\n assertArg(options, function (o) { return isPlainObject(o); }, \"object { eager?: boolean, dispatcher?: Function }\", 1);\n }\n types.forEach(function (type, i) {\n assertIsType(type, options ? i + 2 : i + 1);\n });\n }\n return new Union(name, types, options);\n}\n/**\n * Returns if a given value represents a union type.\n *\n * @param type\n * @returns\n */\nfunction isUnionType(type) {\n return (type.flags & TypeFlags.Union) > 0;\n}\n\n/**\n * @hidden\n * @internal\n */\nvar OptionalValue = /** @class */ (function (_super) {\n __extends(OptionalValue, _super);\n function OptionalValue(_subtype, _defaultValue, optionalValues) {\n var _this = _super.call(this, _subtype.name) || this;\n Object.defineProperty(_this, \"_subtype\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _subtype\n });\n Object.defineProperty(_this, \"_defaultValue\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _defaultValue\n });\n Object.defineProperty(_this, \"optionalValues\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: optionalValues\n });\n return _this;\n }\n Object.defineProperty(OptionalValue.prototype, \"flags\", {\n get: function () {\n return this._subtype.flags | TypeFlags.Optional;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(OptionalValue.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subtype.describe() + \"?\";\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n if (this.optionalValues.indexOf(initialValue) >= 0) {\n var defaultInstanceOrSnapshot = this.getDefaultInstanceOrSnapshot();\n return this._subtype.instantiate(parent, subpath, environment, defaultInstanceOrSnapshot);\n }\n return this._subtype.instantiate(parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n return this._subtype.reconcile(current, this.optionalValues.indexOf(newValue) < 0 && this._subtype.is(newValue)\n ? newValue\n : this.getDefaultInstanceOrSnapshot(), parent, subpath);\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"getDefaultInstanceOrSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var defaultInstanceOrSnapshot = typeof this._defaultValue === \"function\"\n ? this._defaultValue()\n : this._defaultValue;\n // while static values are already snapshots and checked on types.optional\n // generator functions must always be rechecked just in case\n if (typeof this._defaultValue === \"function\") {\n typecheckInternal(this, defaultInstanceOrSnapshot);\n }\n return defaultInstanceOrSnapshot;\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n // defaulted values can be skipped\n if (this.optionalValues.indexOf(value) >= 0) {\n return typeCheckSuccess();\n }\n // bounce validation to the sub-type\n return this._subtype.validate(value, context);\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this._subtype.isAssignableFrom(type);\n }\n });\n Object.defineProperty(OptionalValue.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this._subtype;\n }\n });\n return OptionalValue;\n}(BaseType));\nfunction checkOptionalPreconditions(type, defaultValueOrFunction) {\n // make sure we never pass direct instances\n if (typeof defaultValueOrFunction !== \"function\" && isStateTreeNode(defaultValueOrFunction)) {\n throw fail$1(\"default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead\");\n }\n assertIsType(type, 1);\n if (devMode()) {\n // we only check default values if they are passed directly\n // if they are generator functions they will be checked once they are generated\n // we don't check generator function results here to avoid generating a node just for type-checking purposes\n // which might generate side-effects\n if (typeof defaultValueOrFunction !== \"function\") {\n typecheckInternal(type, defaultValueOrFunction);\n }\n }\n}\n/**\n * `types.optional` - Can be used to create a property with a default value.\n *\n * Depending on the third argument (`optionalValues`) there are two ways of operation:\n * - If the argument is not provided, then if a value is not provided in the snapshot (`undefined` or missing),\n * it will default to the provided `defaultValue`\n * - If the argument is provided, then if the value in the snapshot matches one of the optional values inside the array then it will\n * default to the provided `defaultValue`. Additionally, if one of the optional values inside the array is `undefined` then a missing\n * property is also valid.\n *\n * Note that it is also possible to include values of the same type as the intended subtype as optional values,\n * in this case the optional value will be transformed into the `defaultValue` (e.g. `types.optional(types.string, \"unnamed\", [undefined, \"\"])`\n * will transform the snapshot values `undefined` (and therefore missing) and empty strings into the string `\"unnamed\"` when it gets\n * instantiated).\n *\n * If `defaultValue` is a function, the function will be invoked for every new instance.\n * Applying a snapshot in which the optional value is one of the optional values (or `undefined`/_not_ present if none are provided) causes the\n * value to be reset.\n *\n * Example:\n * ```ts\n * const Todo = types.model({\n * title: types.string,\n * subtitle1: types.optional(types.string, \"\", [null]),\n * subtitle2: types.optional(types.string, \"\", [null, undefined]),\n * done: types.optional(types.boolean, false),\n * created: types.optional(types.Date, () => new Date()),\n * })\n *\n * // if done is missing / undefined it will become false\n * // if created is missing / undefined it will get a freshly generated timestamp\n * // if subtitle1 is null it will default to \"\", but it cannot be missing or undefined\n * // if subtitle2 is null or undefined it will default to \"\"; since it can be undefined it can also be missing\n * const todo = Todo.create({ title: \"Get coffee\", subtitle1: null })\n * ```\n *\n * @param type\n * @param defaultValueOrFunction\n * @param optionalValues an optional array with zero or more primitive values (string, number, boolean, null or undefined)\n * that will be converted into the default. `[ undefined ]` is assumed when none is provided\n * @returns\n */\nfunction optional(type, defaultValueOrFunction, optionalValues) {\n checkOptionalPreconditions(type, defaultValueOrFunction);\n return new OptionalValue(type, defaultValueOrFunction, optionalValues ? optionalValues : undefinedAsOptionalValues);\n}\nvar undefinedAsOptionalValues = [undefined];\n/**\n * Returns if a value represents an optional type.\n *\n * @template IT\n * @param type\n * @returns\n */\nfunction isOptionalType(type) {\n return isType(type) && (type.flags & TypeFlags.Optional) > 0;\n}\n\nvar optionalUndefinedType = optional(undefinedType, undefined);\nvar optionalNullType = optional(nullType, null);\n/**\n * `types.maybe` - Maybe will make a type nullable, and also optional.\n * The value `undefined` will be used to represent nullability.\n *\n * @param type\n * @returns\n */\nfunction maybe(type) {\n assertIsType(type, 1);\n return union(type, optionalUndefinedType);\n}\n/**\n * `types.maybeNull` - Maybe will make a type nullable, and also optional.\n * The value `null` will be used to represent no value.\n *\n * @param type\n * @returns\n */\nfunction maybeNull(type) {\n assertIsType(type, 1);\n return union(type, optionalNullType);\n}\n\nvar Late = /** @class */ (function (_super) {\n __extends(Late, _super);\n function Late(name, _definition) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"_definition\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: _definition\n });\n Object.defineProperty(_this, \"_subType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n return _this;\n }\n Object.defineProperty(Late.prototype, \"flags\", {\n get: function () {\n return (this._subType ? this._subType.flags : 0) | TypeFlags.Late;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Late.prototype, \"getSubType\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (mustSucceed) {\n if (!this._subType) {\n var t = undefined;\n try {\n t = this._definition();\n }\n catch (e) {\n if (e instanceof ReferenceError)\n // can happen in strict ES5 code when a definition is self refering\n t = undefined;\n else\n throw e;\n }\n if (mustSucceed && t === undefined)\n throw fail$1(\"Late type seems to be used too early, the definition (still) returns undefined\");\n if (t) {\n if (devMode() && !isType(t))\n throw fail$1(\"Failed to determine subtype, make sure types.late returns a type definition.\");\n this._subType = t;\n }\n }\n return this._subType;\n }\n });\n Object.defineProperty(Late.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n return this.getSubType(true).instantiate(parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(Late.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n return this.getSubType(true).reconcile(current, newValue, parent, subpath);\n }\n });\n Object.defineProperty(Late.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var t = this.getSubType(false);\n return t ? t.name : \"<uknown late type>\";\n }\n });\n Object.defineProperty(Late.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n var t = this.getSubType(false);\n if (!t) {\n // See #916; the variable the definition closure is pointing to wasn't defined yet, so can't be evaluted yet here\n return typeCheckSuccess();\n }\n return t.validate(value, context);\n }\n });\n Object.defineProperty(Late.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n var t = this.getSubType(false);\n return t ? t.isAssignableFrom(type) : false;\n }\n });\n Object.defineProperty(Late.prototype, \"getSubTypes\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n var subtype = this.getSubType(false);\n return subtype ? subtype : cannotDetermineSubtype;\n }\n });\n return Late;\n}(BaseType));\n/**\n * `types.late` - Defines a type that gets implemented later. This is useful when you have to deal with circular dependencies.\n * Please notice that when defining circular dependencies TypeScript isn't smart enough to inference them.\n *\n * Example:\n * ```ts\n * // TypeScript isn't smart enough to infer self referencing types.\n * const Node = types.model({\n * children: types.array(types.late((): IAnyModelType => Node)) // then typecast each array element to Instance<typeof Node>\n * })\n * ```\n *\n * @param name The name to use for the type that will be returned.\n * @param type A function that returns the type that will be defined.\n * @returns\n */\nfunction late(nameOrType, maybeType) {\n var name = typeof nameOrType === \"string\" ? nameOrType : \"late(\" + nameOrType.toString() + \")\";\n var type = typeof nameOrType === \"string\" ? maybeType : nameOrType;\n // checks that the type is actually a late type\n if (devMode()) {\n if (!(typeof type === \"function\" && type.length === 0))\n throw fail$1(\"Invalid late type, expected a function with zero arguments that returns a type, got: \" +\n type);\n }\n return new Late(name, type);\n}\n/**\n * Returns if a given value represents a late type.\n *\n * @param type\n * @returns\n */\nfunction isLateType(type) {\n return isType(type) && (type.flags & TypeFlags.Late) > 0;\n}\n\n/**\n * @internal\n * @hidden\n */\nvar Frozen = /** @class */ (function (_super) {\n __extends(Frozen, _super);\n function Frozen(subType) {\n var _this = _super.call(this, subType ? \"frozen(\" + subType.name + \")\" : \"frozen\") || this;\n Object.defineProperty(_this, \"subType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: subType\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Frozen\n });\n return _this;\n }\n Object.defineProperty(Frozen.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"<any immutable value>\";\n }\n });\n Object.defineProperty(Frozen.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, value) {\n // create the node\n return createScalarNode(this, parent, subpath, environment, deepFreeze(value));\n }\n });\n Object.defineProperty(Frozen.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (!isSerializable(value)) {\n return typeCheckFailure(context, value, \"Value is not serializable and cannot be frozen\");\n }\n if (this.subType)\n return this.subType.validate(value, context);\n return typeCheckSuccess();\n }\n });\n return Frozen;\n}(SimpleType));\nvar untypedFrozenInstance = new Frozen();\n/**\n * `types.frozen` - Frozen can be used to store any value that is serializable in itself (that is valid JSON).\n * Frozen values need to be immutable or treated as if immutable. They need be serializable as well.\n * Values stored in frozen will snapshotted as-is by MST, and internal changes will not be tracked.\n *\n * This is useful to store complex, but immutable values like vectors etc. It can form a powerful bridge to parts of your application that should be immutable, or that assume data to be immutable.\n *\n * Note: if you want to store free-form state that is mutable, or not serializeable, consider using volatile state instead.\n *\n * Frozen properties can be defined in three different ways\n * 1. `types.frozen(SubType)` - provide a valid MST type and frozen will check if the provided data conforms the snapshot for that type\n * 2. `types.frozen({ someDefaultValue: true})` - provide a primitive value, object or array, and MST will infer the type from that object, and also make it the default value for the field\n * 3. `types.frozen<TypeScriptType>()` - provide a typescript type, to help in strongly typing the field (design time only)\n *\n * Example:\n * ```ts\n * const GameCharacter = types.model({\n * name: string,\n * location: types.frozen({ x: 0, y: 0})\n * })\n *\n * const hero = GameCharacter.create({\n * name: \"Mario\",\n * location: { x: 7, y: 4 }\n * })\n *\n * hero.location = { x: 10, y: 2 } // OK\n * hero.location.x = 7 // Not ok!\n * ```\n *\n * ```ts\n * type Point = { x: number, y: number }\n * const Mouse = types.model({\n * loc: types.frozen<Point>()\n * })\n * ```\n *\n * @param defaultValueOrType\n * @returns\n */\nfunction frozen(arg) {\n if (arguments.length === 0)\n return untypedFrozenInstance;\n else if (isType(arg))\n return new Frozen(arg);\n else\n return optional(untypedFrozenInstance, arg);\n}\n/**\n * Returns if a given value represents a frozen type.\n *\n * @param type\n * @returns\n */\nfunction isFrozenType(type) {\n return isType(type) && (type.flags & TypeFlags.Frozen) > 0;\n}\n\nfunction getInvalidationCause(hook) {\n switch (hook) {\n case Hook.beforeDestroy:\n return \"destroy\";\n case Hook.beforeDetach:\n return \"detach\";\n default:\n return undefined;\n }\n}\nvar StoredReference = /** @class */ (function () {\n function StoredReference(value, targetType) {\n Object.defineProperty(this, \"targetType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: targetType\n });\n Object.defineProperty(this, \"identifier\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"node\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n Object.defineProperty(this, \"resolvedReference\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n if (isValidIdentifier(value)) {\n this.identifier = value;\n }\n else if (isStateTreeNode(value)) {\n var targetNode = getStateTreeNode(value);\n if (!targetNode.identifierAttribute)\n throw fail$1(\"Can only store references with a defined identifier attribute.\");\n var id = targetNode.unnormalizedIdentifier;\n if (id === null || id === undefined) {\n throw fail$1(\"Can only store references to tree nodes with a defined identifier.\");\n }\n this.identifier = id;\n }\n else {\n throw fail$1(\"Can only store references to tree nodes or identifiers, got: '\" + value + \"'\");\n }\n }\n Object.defineProperty(StoredReference.prototype, \"updateResolvedReference\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n var normalizedId = normalizeIdentifier(this.identifier);\n var root = node.root;\n var lastCacheModification = root.identifierCache.getLastCacheModificationPerId(normalizedId);\n if (!this.resolvedReference ||\n this.resolvedReference.lastCacheModification !== lastCacheModification) {\n var targetType = this.targetType;\n // reference was initialized with the identifier of the target\n var target = root.identifierCache.resolve(targetType, normalizedId);\n if (!target) {\n throw new InvalidReferenceError(\"[mobx-state-tree] Failed to resolve reference '\" + this.identifier + \"' to type '\" + this.targetType.name + \"' (from node: \" + node.path + \")\");\n }\n this.resolvedReference = {\n node: target,\n lastCacheModification: lastCacheModification\n };\n }\n }\n });\n Object.defineProperty(StoredReference.prototype, \"resolvedValue\", {\n get: function () {\n this.updateResolvedReference(this.node);\n return this.resolvedReference.node.value;\n },\n enumerable: false,\n configurable: true\n });\n return StoredReference;\n}());\n/**\n * @internal\n * @hidden\n */\nvar InvalidReferenceError = /** @class */ (function (_super) {\n __extends(InvalidReferenceError, _super);\n function InvalidReferenceError(m) {\n var _this = _super.call(this, m) || this;\n Object.setPrototypeOf(_this, InvalidReferenceError.prototype);\n return _this;\n }\n return InvalidReferenceError;\n}(Error));\n/**\n * @internal\n * @hidden\n */\nvar BaseReferenceType = /** @class */ (function (_super) {\n __extends(BaseReferenceType, _super);\n function BaseReferenceType(targetType, onInvalidated) {\n var _this = _super.call(this, \"reference(\" + targetType.name + \")\") || this;\n Object.defineProperty(_this, \"targetType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: targetType\n });\n Object.defineProperty(_this, \"onInvalidated\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: onInvalidated\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Reference\n });\n return _this;\n }\n Object.defineProperty(BaseReferenceType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.name;\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"isAssignableFrom\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (type) {\n return this.targetType.isAssignableFrom(type);\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n return isValidIdentifier(value)\n ? typeCheckSuccess()\n : typeCheckFailure(context, value, \"Value is not a valid identifier, which is a string or a number\");\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"fireInvalidated\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (cause, storedRefNode, referenceId, refTargetNode) {\n // to actually invalidate a reference we need an alive parent,\n // since it is a scalar value (immutable-ish) and we need to change it\n // from the parent\n var storedRefParentNode = storedRefNode.parent;\n if (!storedRefParentNode || !storedRefParentNode.isAlive) {\n return;\n }\n var storedRefParentValue = storedRefParentNode.storedValue;\n if (!storedRefParentValue) {\n return;\n }\n this.onInvalidated({\n cause: cause,\n parent: storedRefParentValue,\n invalidTarget: refTargetNode ? refTargetNode.storedValue : undefined,\n invalidId: referenceId,\n replaceRef: function (newRef) {\n applyPatch(storedRefNode.root.storedValue, {\n op: \"replace\",\n value: newRef,\n path: storedRefNode.path\n });\n },\n removeRef: function () {\n if (isModelType(storedRefParentNode.type)) {\n this.replaceRef(undefined);\n }\n else {\n applyPatch(storedRefNode.root.storedValue, {\n op: \"remove\",\n path: storedRefNode.path\n });\n }\n }\n });\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"addTargetNodeWatcher\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode, referenceId) {\n var _this = this;\n // this will make sure the target node becomes created\n var refTargetValue = this.getValue(storedRefNode);\n if (!refTargetValue) {\n return undefined;\n }\n var refTargetNode = getStateTreeNode(refTargetValue);\n var hookHandler = function (_, refTargetNodeHook) {\n var cause = getInvalidationCause(refTargetNodeHook);\n if (!cause) {\n return;\n }\n _this.fireInvalidated(cause, storedRefNode, referenceId, refTargetNode);\n };\n var refTargetDetachHookDisposer = refTargetNode.registerHook(Hook.beforeDetach, hookHandler);\n var refTargetDestroyHookDisposer = refTargetNode.registerHook(Hook.beforeDestroy, hookHandler);\n return function () {\n refTargetDetachHookDisposer();\n refTargetDestroyHookDisposer();\n };\n }\n });\n Object.defineProperty(BaseReferenceType.prototype, \"watchTargetNodeForInvalidations\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode, identifier, customGetSet) {\n var _this = this;\n if (!this.onInvalidated) {\n return;\n }\n var onRefTargetDestroyedHookDisposer;\n // get rid of the watcher hook when the stored ref node is destroyed\n // detached is ignored since scalar nodes (where the reference resides) cannot be detached\n storedRefNode.registerHook(Hook.beforeDestroy, function () {\n if (onRefTargetDestroyedHookDisposer) {\n onRefTargetDestroyedHookDisposer();\n }\n });\n var startWatching = function (sync) {\n // re-create hook in case the stored ref gets reattached\n if (onRefTargetDestroyedHookDisposer) {\n onRefTargetDestroyedHookDisposer();\n }\n // make sure the target node is actually there and initialized\n var storedRefParentNode = storedRefNode.parent;\n var storedRefParentValue = storedRefParentNode && storedRefParentNode.storedValue;\n if (storedRefParentNode && storedRefParentNode.isAlive && storedRefParentValue) {\n var refTargetNodeExists = void 0;\n if (customGetSet) {\n refTargetNodeExists = !!customGetSet.get(identifier, storedRefParentValue);\n }\n else {\n refTargetNodeExists = storedRefNode.root.identifierCache.has(_this.targetType, normalizeIdentifier(identifier));\n }\n if (!refTargetNodeExists) {\n // we cannot change the reference in sync mode\n // since we are in the middle of a reconciliation/instantiation and the change would be overwritten\n // for those cases just let the wrong reference be assigned and fail upon usage\n // (like current references do)\n // this means that effectively this code will only run when it is created from a snapshot\n if (!sync) {\n _this.fireInvalidated(\"invalidSnapshotReference\", storedRefNode, identifier, null);\n }\n }\n else {\n onRefTargetDestroyedHookDisposer = _this.addTargetNodeWatcher(storedRefNode, identifier);\n }\n }\n };\n if (storedRefNode.state === NodeLifeCycle.FINALIZED) {\n // already attached, so the whole tree is ready\n startWatching(true);\n }\n else {\n if (!storedRefNode.isRoot) {\n // start watching once the whole tree is ready\n storedRefNode.root.registerHook(Hook.afterCreationFinalization, function () {\n // make sure to attach it so it can start listening\n if (storedRefNode.parent) {\n storedRefNode.parent.createObservableInstanceIfNeeded();\n }\n });\n }\n // start watching once the node is attached somewhere / parent changes\n storedRefNode.registerHook(Hook.afterAttach, function () {\n startWatching(false);\n });\n }\n }\n });\n return BaseReferenceType;\n}(SimpleType));\n/**\n * @internal\n * @hidden\n */\nvar IdentifierReferenceType = /** @class */ (function (_super) {\n __extends(IdentifierReferenceType, _super);\n function IdentifierReferenceType(targetType, onInvalidated) {\n return _super.call(this, targetType, onInvalidated) || this;\n }\n Object.defineProperty(IdentifierReferenceType.prototype, \"getValue\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode) {\n if (!storedRefNode.isAlive)\n return undefined;\n var storedRef = storedRefNode.storedValue;\n return storedRef.resolvedValue;\n }\n });\n Object.defineProperty(IdentifierReferenceType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode) {\n var ref = storedRefNode.storedValue;\n return ref.identifier;\n }\n });\n Object.defineProperty(IdentifierReferenceType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var identifier = isStateTreeNode(initialValue)\n ? getIdentifier(initialValue)\n : initialValue;\n var storedRef = new StoredReference(initialValue, this.targetType);\n var storedRefNode = createScalarNode(this, parent, subpath, environment, storedRef);\n storedRef.node = storedRefNode;\n this.watchTargetNodeForInvalidations(storedRefNode, identifier, undefined);\n return storedRefNode;\n }\n });\n Object.defineProperty(IdentifierReferenceType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n if (!current.isDetaching && current.type === this) {\n var compareByValue = isStateTreeNode(newValue);\n var ref = current.storedValue;\n if ((!compareByValue && ref.identifier === newValue) ||\n (compareByValue && ref.resolvedValue === newValue)) {\n current.setParent(parent, subpath);\n return current;\n }\n }\n var newNode = this.instantiate(parent, subpath, undefined, newValue);\n current.die(); // noop if detaching\n return newNode;\n }\n });\n return IdentifierReferenceType;\n}(BaseReferenceType));\n/**\n * @internal\n * @hidden\n */\nvar CustomReferenceType = /** @class */ (function (_super) {\n __extends(CustomReferenceType, _super);\n function CustomReferenceType(targetType, options, onInvalidated) {\n var _this = _super.call(this, targetType, onInvalidated) || this;\n Object.defineProperty(_this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n return _this;\n }\n Object.defineProperty(CustomReferenceType.prototype, \"getValue\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode) {\n if (!storedRefNode.isAlive)\n return undefined;\n var referencedNode = this.options.get(storedRefNode.storedValue, storedRefNode.parent ? storedRefNode.parent.storedValue : null);\n return referencedNode;\n }\n });\n Object.defineProperty(CustomReferenceType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (storedRefNode) {\n return storedRefNode.storedValue;\n }\n });\n Object.defineProperty(CustomReferenceType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, newValue) {\n var identifier = isStateTreeNode(newValue)\n ? this.options.set(newValue, parent ? parent.storedValue : null)\n : newValue;\n var storedRefNode = createScalarNode(this, parent, subpath, environment, identifier);\n this.watchTargetNodeForInvalidations(storedRefNode, identifier, this.options);\n return storedRefNode;\n }\n });\n Object.defineProperty(CustomReferenceType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n var newIdentifier = isStateTreeNode(newValue)\n ? this.options.set(newValue, current ? current.storedValue : null)\n : newValue;\n if (!current.isDetaching &&\n current.type === this &&\n current.storedValue === newIdentifier) {\n current.setParent(parent, subpath);\n return current;\n }\n var newNode = this.instantiate(parent, subpath, undefined, newIdentifier);\n current.die(); // noop if detaching\n return newNode;\n }\n });\n return CustomReferenceType;\n}(BaseReferenceType));\n/**\n * `types.reference` - Creates a reference to another type, which should have defined an identifier.\n * See also the [reference and identifiers](https://github.com/mobxjs/mobx-state-tree#references-and-identifiers) section.\n */\nfunction reference(subType, options) {\n assertIsType(subType, 1);\n if (devMode()) {\n if (arguments.length === 2 && typeof arguments[1] === \"string\") {\n // istanbul ignore next\n throw fail$1(\"References with base path are no longer supported. Please remove the base path.\");\n }\n }\n var getSetOptions = options ? options : undefined;\n var onInvalidated = options\n ? options.onInvalidated\n : undefined;\n if (getSetOptions && (getSetOptions.get || getSetOptions.set)) {\n if (devMode()) {\n if (!getSetOptions.get || !getSetOptions.set) {\n throw fail$1(\"reference options must either contain both a 'get' and a 'set' method or none of them\");\n }\n }\n return new CustomReferenceType(subType, {\n get: getSetOptions.get,\n set: getSetOptions.set\n }, onInvalidated);\n }\n else {\n return new IdentifierReferenceType(subType, onInvalidated);\n }\n}\n/**\n * Returns if a given value represents a reference type.\n *\n * @param type\n * @returns\n */\nfunction isReferenceType(type) {\n return (type.flags & TypeFlags.Reference) > 0;\n}\n/**\n * `types.safeReference` - A safe reference is like a standard reference, except that it accepts the undefined value by default\n * and automatically sets itself to undefined (when the parent is a model) / removes itself from arrays and maps\n * when the reference it is pointing to gets detached/destroyed.\n *\n * The optional options parameter object accepts a parameter named `acceptsUndefined`, which is set to true by default, so it is suitable\n * for model properties.\n * When used inside collections (arrays/maps), it is recommended to set this option to false so it can't take undefined as value,\n * which is usually the desired in those cases.\n * Additionally, the optional options parameter object accepts a parameter named `onInvalidated`, which will be called when the reference target node that the reference is pointing to is about to be detached/destroyed\n *\n * Strictly speaking it is a `types.maybe(types.reference(X))` (when `acceptsUndefined` is set to true, the default) and\n * `types.reference(X)` (when `acceptsUndefined` is set to false), both of them with a customized `onInvalidated` option.\n *\n * @param subType\n * @param options\n * @returns\n */\nfunction safeReference(subType, options) {\n var refType = reference(subType, __assign(__assign({}, options), { onInvalidated: function (ev) {\n if (options && options.onInvalidated) {\n options.onInvalidated(ev);\n }\n ev.removeRef();\n } }));\n if (options && options.acceptsUndefined === false) {\n return refType;\n }\n else {\n return maybe(refType);\n }\n}\n\nvar BaseIdentifierType = /** @class */ (function (_super) {\n __extends(BaseIdentifierType, _super);\n function BaseIdentifierType(name, validType) {\n var _this = _super.call(this, name) || this;\n Object.defineProperty(_this, \"validType\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: validType\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Identifier\n });\n return _this;\n }\n Object.defineProperty(BaseIdentifierType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n if (!parent || !(parent.type instanceof ModelType))\n throw fail$1(\"Identifier types can only be instantiated as direct child of a model type\");\n return createScalarNode(this, parent, subpath, environment, initialValue);\n }\n });\n Object.defineProperty(BaseIdentifierType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, newValue, parent, subpath) {\n // we don't consider detaching here since identifier are scalar nodes, and scalar nodes cannot be detached\n if (current.storedValue !== newValue)\n throw fail$1(\"Tried to change identifier from '\" + current.storedValue + \"' to '\" + newValue + \"'. Changing identifiers is not allowed.\");\n current.setParent(parent, subpath);\n return current;\n }\n });\n Object.defineProperty(BaseIdentifierType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (typeof value !== this.validType) {\n return typeCheckFailure(context, value, \"Value is not a valid \" + this.describe() + \", expected a \" + this.validType);\n }\n return typeCheckSuccess();\n }\n });\n return BaseIdentifierType;\n}(SimpleType));\n/**\n * @internal\n * @hidden\n */\nvar IdentifierType = /** @class */ (function (_super) {\n __extends(IdentifierType, _super);\n function IdentifierType() {\n var _this = _super.call(this, \"identifier\", \"string\") || this;\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Identifier\n });\n return _this;\n }\n Object.defineProperty(IdentifierType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"identifier\";\n }\n });\n return IdentifierType;\n}(BaseIdentifierType));\n/**\n * @internal\n * @hidden\n */\nvar IdentifierNumberType = /** @class */ (function (_super) {\n __extends(IdentifierNumberType, _super);\n function IdentifierNumberType() {\n return _super.call(this, \"identifierNumber\", \"number\") || this;\n }\n Object.defineProperty(IdentifierNumberType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return node.storedValue;\n }\n });\n Object.defineProperty(IdentifierNumberType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return \"identifierNumber\";\n }\n });\n return IdentifierNumberType;\n}(BaseIdentifierType));\n/**\n * `types.identifier` - Identifiers are used to make references, lifecycle events and reconciling works.\n * Inside a state tree, for each type can exist only one instance for each given identifier.\n * For example there couldn't be 2 instances of user with id 1. If you need more, consider using references.\n * Identifier can be used only as type property of a model.\n * This type accepts as parameter the value type of the identifier field that can be either string or number.\n *\n * Example:\n * ```ts\n * const Todo = types.model(\"Todo\", {\n * id: types.identifier,\n * title: types.string\n * })\n * ```\n *\n * @returns\n */\nvar identifier = new IdentifierType();\n/**\n * `types.identifierNumber` - Similar to `types.identifier`. This one will serialize from / to a number when applying snapshots\n *\n * Example:\n * ```ts\n * const Todo = types.model(\"Todo\", {\n * id: types.identifierNumber,\n * title: types.string\n * })\n * ```\n *\n * @returns\n */\nvar identifierNumber = new IdentifierNumberType();\n/**\n * Returns if a given value represents an identifier type.\n *\n * @param type\n * @returns\n */\nfunction isIdentifierType(type) {\n return isType(type) && (type.flags & TypeFlags.Identifier) > 0;\n}\n/**\n * @internal\n * @hidden\n */\nfunction normalizeIdentifier(id) {\n return \"\" + id;\n}\n/**\n * @internal\n * @hidden\n */\nfunction isValidIdentifier(id) {\n return typeof id === \"string\" || typeof id === \"number\";\n}\n/**\n * @internal\n * @hidden\n */\nfunction assertIsValidIdentifier(id, argNumber) {\n assertArg(id, isValidIdentifier, \"string or number (identifier)\", argNumber);\n}\n\n/**\n * `types.custom` - Creates a custom type. Custom types can be used for arbitrary immutable values, that have a serializable representation. For example, to create your own Date representation, Decimal type etc.\n *\n * The signature of the options is:\n * ```ts\n * export interface CustomTypeOptions<S, T> {\n * // Friendly name\n * name: string\n * // given a serialized value and environment, how to turn it into the target type\n * fromSnapshot(snapshot: S, env: any): T\n * // return the serialization of the current value\n * toSnapshot(value: T): S\n * // if true, this is a converted value, if false, it's a snapshot\n * isTargetType(value: T | S): value is T\n * // a non empty string is assumed to be a validation error\n * getValidationMessage?(snapshot: S): string\n * }\n * ```\n *\n * Example:\n * ```ts\n * const DecimalPrimitive = types.custom<string, Decimal>({\n * name: \"Decimal\",\n * fromSnapshot(value: string) {\n * return new Decimal(value)\n * },\n * toSnapshot(value: Decimal) {\n * return value.toString()\n * },\n * isTargetType(value: string | Decimal): boolean {\n * return value instanceof Decimal\n * },\n * getValidationMessage(value: string): string {\n * if (/^-?\\d+\\.\\d+$/.test(value)) return \"\" // OK\n * return `'${value}' doesn't look like a valid decimal number`\n * }\n * })\n *\n * const Wallet = types.model({\n * balance: DecimalPrimitive\n * })\n * ```\n *\n * @param options\n * @returns\n */\nfunction custom(options) {\n return new CustomType(options);\n}\n/**\n * @internal\n * @hidden\n */\nvar CustomType = /** @class */ (function (_super) {\n __extends(CustomType, _super);\n function CustomType(options) {\n var _this = _super.call(this, options.name) || this;\n Object.defineProperty(_this, \"options\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: options\n });\n Object.defineProperty(_this, \"flags\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: TypeFlags.Custom\n });\n return _this;\n }\n Object.defineProperty(CustomType.prototype, \"describe\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function () {\n return this.name;\n }\n });\n Object.defineProperty(CustomType.prototype, \"isValidSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (value, context) {\n if (this.options.isTargetType(value))\n return typeCheckSuccess();\n var typeError = this.options.getValidationMessage(value);\n if (typeError) {\n return typeCheckFailure(context, value, \"Invalid value for type '\" + this.name + \"': \" + typeError);\n }\n return typeCheckSuccess();\n }\n });\n Object.defineProperty(CustomType.prototype, \"getSnapshot\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (node) {\n return this.options.toSnapshot(node.storedValue);\n }\n });\n Object.defineProperty(CustomType.prototype, \"instantiate\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (parent, subpath, environment, initialValue) {\n var valueToStore = this.options.isTargetType(initialValue)\n ? initialValue\n : this.options.fromSnapshot(initialValue, parent && parent.root.environment);\n return createScalarNode(this, parent, subpath, environment, valueToStore);\n }\n });\n Object.defineProperty(CustomType.prototype, \"reconcile\", {\n enumerable: false,\n configurable: true,\n writable: true,\n value: function (current, value, parent, subpath) {\n var isSnapshot = !this.options.isTargetType(value);\n // in theory customs use scalar nodes which cannot be detached, but still...\n if (!current.isDetaching) {\n var unchanged = current.type === this &&\n (isSnapshot ? value === current.snapshot : value === current.storedValue);\n if (unchanged) {\n current.setParent(parent, subpath);\n return current;\n }\n }\n var valueToStore = isSnapshot\n ? this.options.fromSnapshot(value, parent.root.environment)\n : value;\n var newNode = this.instantiate(parent, subpath, undefined, valueToStore);\n current.die(); // noop if detaching\n return newNode;\n }\n });\n return CustomType;\n}(SimpleType));\n\n// we import the types to re-export them inside types.\nvar types = {\n enumeration: enumeration,\n model: model,\n compose: compose,\n custom: custom,\n reference: reference,\n safeReference: safeReference,\n union: union,\n optional: optional,\n literal: literal,\n maybe: maybe,\n maybeNull: maybeNull,\n refinement: refinement,\n string: string,\n boolean: boolean,\n number: number,\n integer: integer,\n Date: DatePrimitive,\n map: map,\n array: array,\n frozen: frozen,\n identifier: identifier,\n identifierNumber: identifierNumber,\n late: late,\n undefined: undefinedType,\n null: nullType,\n snapshotProcessor: snapshotProcessor\n};\n\nexport { addDisposer, addMiddleware, applyAction, applyPatch, applySnapshot, cast, castFlowReturn, castToReferenceSnapshot, castToSnapshot, clone, createActionTrackingMiddleware, createActionTrackingMiddleware2, decorate, destroy, detach, escapeJsonPath, flow, getChildType, getEnv, getIdentifier, getLivelinessChecking, getMembers, getNodeId, getParent, getParentOfType, getPath, getPathParts, getPropertyMembers, getRelativePath, getRoot, getRunningActionContext, getSnapshot, getType, hasParent, hasParentOfType, isActionContextChildOf, isActionContextThisOrChildOf, isAlive, isArrayType, isFrozenType, isIdentifierType, isLateType, isLiteralType, isMapType, isModelType, isOptionalType, isPrimitiveType, isProtected, isReferenceType, isRefinementType, isRoot, isStateTreeNode, isType, isUnionType, isValidReference, joinJsonPath, onAction, onPatch, onSnapshot, process$1 as process, protect, recordActions, recordPatches, resolveIdentifier, resolvePath, setLivelinessChecking, setLivelynessChecking, splitJsonPath, toGenerator, toGeneratorFunction, tryReference, tryResolve, typecheck, types, unescapeJsonPath, unprotect, walk };\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport AccessibilityUtil from '../../modules/AccessibilityUtil';\nimport createDOMProps from '../../modules/createDOMProps';\nimport React from 'react';\n\nvar createElement = function createElement(component, props) {\n // Use equivalent platform elements where possible.\n var accessibilityComponent;\n\n if (component && component.constructor === String) {\n accessibilityComponent = AccessibilityUtil.propsToAccessibilityComponent(props);\n }\n\n var Component = accessibilityComponent || component;\n var domProps = createDOMProps(Component, props);\n\n for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n children[_key - 2] = arguments[_key];\n }\n\n return /*#__PURE__*/React.createElement.apply(React, [Component, domProps].concat(children));\n};\n\nexport default createElement;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedNode from './AnimatedNode';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\n\nvar AnimatedWithChildren = /*#__PURE__*/function (_AnimatedNode) {\n _inheritsLoose(AnimatedWithChildren, _AnimatedNode);\n\n function AnimatedWithChildren() {\n var _this;\n\n _this = _AnimatedNode.call(this) || this;\n _this._children = [];\n return _this;\n }\n\n var _proto = AnimatedWithChildren.prototype;\n\n _proto.__makeNative = function __makeNative() {\n if (!this.__isNative) {\n this.__isNative = true;\n\n for (var _iterator = _createForOfIteratorHelperLoose(this._children), _step; !(_step = _iterator()).done;) {\n var child = _step.value;\n\n child.__makeNative();\n\n NativeAnimatedHelper.API.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n }\n\n _AnimatedNode.prototype.__makeNative.call(this);\n };\n\n _proto.__addChild = function __addChild(child) {\n if (this._children.length === 0) {\n this.__attach();\n }\n\n this._children.push(child);\n\n if (this.__isNative) {\n // Only accept \"native\" animated nodes as children\n child.__makeNative();\n\n NativeAnimatedHelper.API.connectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n };\n\n _proto.__removeChild = function __removeChild(child) {\n var index = this._children.indexOf(child);\n\n if (index === -1) {\n console.warn(\"Trying to remove a child that doesn't exist\");\n return;\n }\n\n if (this.__isNative && child.__isNative) {\n NativeAnimatedHelper.API.disconnectAnimatedNodes(this.__getNativeTag(), child.__getNativeTag());\n }\n\n this._children.splice(index, 1);\n\n if (this._children.length === 0) {\n this.__detach();\n }\n };\n\n _proto.__getChildren = function __getChildren() {\n return this._children;\n };\n\n _proto.__callListeners = function __callListeners(value) {\n _AnimatedNode.prototype.__callListeners.call(this, value);\n\n if (!this.__isNative) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(this._children), _step2; !(_step2 = _iterator2()).done;) {\n var child = _step2.value;\n\n if (child.__getValue) {\n child.__callListeners(child.__getValue());\n }\n }\n }\n };\n\n return AnimatedWithChildren;\n}(AnimatedNode);\n\nexport default AnimatedWithChildren;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport invariant from 'fbjs/lib/invariant';\nvar dimensions = {\n window: {\n fontScale: 1,\n height: 0,\n scale: 1,\n width: 0\n },\n screen: {\n fontScale: 1,\n height: 0,\n scale: 1,\n width: 0\n }\n};\nvar listeners = {};\n\nvar Dimensions = /*#__PURE__*/function () {\n function Dimensions() {}\n\n Dimensions.get = function get(dimension) {\n invariant(dimensions[dimension], \"No dimension set for key \" + dimension);\n return dimensions[dimension];\n };\n\n Dimensions.set = function set(initialDimensions) {\n if (initialDimensions) {\n if (canUseDOM) {\n invariant(false, 'Dimensions cannot be set in the browser');\n } else {\n if (initialDimensions.screen != null) {\n dimensions.screen = initialDimensions.screen;\n }\n\n if (initialDimensions.window != null) {\n dimensions.window = initialDimensions.window;\n }\n }\n }\n };\n\n Dimensions._update = function _update() {\n if (!canUseDOM) {\n return;\n }\n\n var win = window;\n var docEl = win.document.documentElement;\n dimensions.window = {\n fontScale: 1,\n height: docEl.clientHeight,\n scale: win.devicePixelRatio || 1,\n width: docEl.clientWidth\n };\n dimensions.screen = {\n fontScale: 1,\n height: win.screen.height,\n scale: win.devicePixelRatio || 1,\n width: win.screen.width\n };\n\n if (Array.isArray(listeners['change'])) {\n listeners['change'].forEach(function (handler) {\n return handler(dimensions);\n });\n }\n };\n\n Dimensions.addEventListener = function addEventListener(type, handler) {\n listeners[type] = listeners[type] || [];\n listeners[type].push(handler);\n };\n\n Dimensions.removeEventListener = function removeEventListener(type, handler) {\n if (Array.isArray(listeners[type])) {\n listeners[type] = listeners[type].filter(function (_handler) {\n return _handler !== handler;\n });\n }\n };\n\n return Dimensions;\n}();\n\nexport { Dimensions as default };\n\nif (canUseDOM) {\n Dimensions._update();\n\n window.addEventListener('resize', Dimensions._update, false);\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n\n/* eslint no-bitwise: 0 */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nimport invariant from 'fbjs/lib/invariant';\nimport normalizeColor from 'normalize-css-color';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar linear = function linear(t) {\n return t;\n};\n/**\n * Very handy helper to map input ranges to output ranges with an easing\n * function and custom behavior outside of the ranges.\n */\n\n\nfunction createInterpolation(config) {\n if (config.outputRange && typeof config.outputRange[0] === 'string') {\n return createInterpolationFromStringOutputRange(config);\n }\n\n var outputRange = config.outputRange;\n checkInfiniteRange('outputRange', outputRange);\n var inputRange = config.inputRange;\n checkInfiniteRange('inputRange', inputRange);\n checkValidInputRange(inputRange);\n invariant(inputRange.length === outputRange.length, 'inputRange (' + inputRange.length + ') and outputRange (' + outputRange.length + ') must have the same length');\n var easing = config.easing || linear;\n var extrapolateLeft = 'extend';\n\n if (config.extrapolateLeft !== undefined) {\n extrapolateLeft = config.extrapolateLeft;\n } else if (config.extrapolate !== undefined) {\n extrapolateLeft = config.extrapolate;\n }\n\n var extrapolateRight = 'extend';\n\n if (config.extrapolateRight !== undefined) {\n extrapolateRight = config.extrapolateRight;\n } else if (config.extrapolate !== undefined) {\n extrapolateRight = config.extrapolate;\n }\n\n return function (input) {\n invariant(typeof input === 'number', 'Cannot interpolation an input which is not a number');\n var range = findRange(input, inputRange);\n return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight);\n };\n}\n\nfunction interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight) {\n var result = input; // Extrapolate\n\n if (result < inputMin) {\n if (extrapolateLeft === 'identity') {\n return result;\n } else if (extrapolateLeft === 'clamp') {\n result = inputMin;\n } else if (extrapolateLeft === 'extend') {// noop\n }\n }\n\n if (result > inputMax) {\n if (extrapolateRight === 'identity') {\n return result;\n } else if (extrapolateRight === 'clamp') {\n result = inputMax;\n } else if (extrapolateRight === 'extend') {// noop\n }\n }\n\n if (outputMin === outputMax) {\n return outputMin;\n }\n\n if (inputMin === inputMax) {\n if (input <= inputMin) {\n return outputMin;\n }\n\n return outputMax;\n } // Input Range\n\n\n if (inputMin === -Infinity) {\n result = -result;\n } else if (inputMax === Infinity) {\n result = result - inputMin;\n } else {\n result = (result - inputMin) / (inputMax - inputMin);\n } // Easing\n\n\n result = easing(result); // Output Range\n\n if (outputMin === -Infinity) {\n result = -result;\n } else if (outputMax === Infinity) {\n result = result + outputMin;\n } else {\n result = result * (outputMax - outputMin) + outputMin;\n }\n\n return result;\n}\n\nfunction colorToRgba(input) {\n var normalizedColor = normalizeColor(input);\n\n if (normalizedColor === null || typeof normalizedColor !== 'number') {\n return input;\n }\n\n normalizedColor = normalizedColor || 0;\n var r = (normalizedColor & 0xff000000) >>> 24;\n var g = (normalizedColor & 0x00ff0000) >>> 16;\n var b = (normalizedColor & 0x0000ff00) >>> 8;\n var a = (normalizedColor & 0x000000ff) / 255;\n return \"rgba(\" + r + \", \" + g + \", \" + b + \", \" + a + \")\";\n}\n\nvar stringShapeRegex = /[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:[eE][+-]?\\d+)?/g;\n/**\n * Supports string shapes by extracting numbers so new values can be computed,\n * and recombines those values into new strings of the same shape. Supports\n * things like:\n *\n * rgba(123, 42, 99, 0.36) // colors\n * -45deg // values with units\n */\n\nfunction createInterpolationFromStringOutputRange(config) {\n var outputRange = config.outputRange;\n invariant(outputRange.length >= 2, 'Bad output range');\n outputRange = outputRange.map(colorToRgba);\n checkPattern(outputRange); // ['rgba(0, 100, 200, 0)', 'rgba(50, 150, 250, 0.5)']\n // ->\n // [\n // [0, 50],\n // [100, 150],\n // [200, 250],\n // [0, 0.5],\n // ]\n\n /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to\n * guard against this possibility.\n */\n\n var outputRanges = outputRange[0].match(stringShapeRegex).map(function () {\n return [];\n });\n outputRange.forEach(function (value) {\n /* $FlowFixMe(>=0.18.0): `value.match()` can return `null`. Need to guard\n * against this possibility.\n */\n value.match(stringShapeRegex).forEach(function (number, i) {\n outputRanges[i].push(+number);\n });\n });\n var interpolations = outputRange[0].match(stringShapeRegex)\n /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need\n * to guard against this possibility. */\n .map(function (value, i) {\n return createInterpolation(_objectSpread(_objectSpread({}, config), {}, {\n outputRange: outputRanges[i]\n }));\n }); // rgba requires that the r,g,b are integers.... so we want to round them, but we *dont* want to\n // round the opacity (4th column).\n\n var shouldRound = isRgbOrRgba(outputRange[0]);\n return function (input) {\n var i = 0; // 'rgba(0, 100, 200, 0)'\n // ->\n // 'rgba(${interpolations[0](input)}, ${interpolations[1](input)}, ...'\n\n return outputRange[0].replace(stringShapeRegex, function () {\n var val = +interpolations[i++](input);\n\n if (shouldRound) {\n val = i < 4 ? Math.round(val) : Math.round(val * 1000) / 1000;\n }\n\n return String(val);\n });\n };\n}\n\nfunction isRgbOrRgba(range) {\n return typeof range === 'string' && range.startsWith('rgb');\n}\n\nfunction checkPattern(arr) {\n var pattern = arr[0].replace(stringShapeRegex, '');\n\n for (var i = 1; i < arr.length; ++i) {\n invariant(pattern === arr[i].replace(stringShapeRegex, ''), 'invalid pattern ' + arr[0] + ' and ' + arr[i]);\n }\n}\n\nfunction findRange(input, inputRange) {\n var i;\n\n for (i = 1; i < inputRange.length - 1; ++i) {\n if (inputRange[i] >= input) {\n break;\n }\n }\n\n return i - 1;\n}\n\nfunction checkValidInputRange(arr) {\n invariant(arr.length >= 2, 'inputRange must have at least 2 elements');\n\n for (var i = 1; i < arr.length; ++i) {\n invariant(arr[i] >= arr[i - 1],\n /* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,\n * one or both of the operands may be something that doesn't cleanly\n * convert to a string, like undefined, null, and object, etc. If you really\n * mean this implicit string conversion, you can do something like\n * String(myThing)\n */\n 'inputRange must be monotonically non-decreasing ' + arr);\n }\n}\n\nfunction checkInfiniteRange(name, arr) {\n invariant(arr.length >= 2, name + ' must have at least 2 elements');\n invariant(arr.length !== 2 || arr[0] !== -Infinity || arr[1] !== Infinity,\n /* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,\n * one or both of the operands may be something that doesn't cleanly convert\n * to a string, like undefined, null, and object, etc. If you really mean\n * this implicit string conversion, you can do something like\n * String(myThing)\n */\n name + 'cannot be ]-infinity;+infinity[ ' + arr);\n}\n\nvar AnimatedInterpolation = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedInterpolation, _AnimatedWithChildren);\n\n // Export for testing.\n function AnimatedInterpolation(parent, config) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n _this._parent = parent;\n _this._config = config;\n _this._interpolation = createInterpolation(config);\n return _this;\n }\n\n var _proto = AnimatedInterpolation.prototype;\n\n _proto.__makeNative = function __makeNative() {\n this._parent.__makeNative();\n\n _AnimatedWithChildren.prototype.__makeNative.call(this);\n };\n\n _proto.__getValue = function __getValue() {\n var parentValue = this._parent.__getValue();\n\n invariant(typeof parentValue === 'number', 'Cannot interpolate an input which is not a number.');\n return this._interpolation(parentValue);\n };\n\n _proto.interpolate = function interpolate(config) {\n return new AnimatedInterpolation(this, config);\n };\n\n _proto.__attach = function __attach() {\n this._parent.__addChild(this);\n };\n\n _proto.__detach = function __detach() {\n this._parent.__removeChild(this);\n\n _AnimatedWithChildren.prototype.__detach.call(this);\n };\n\n _proto.__transformDataType = function __transformDataType(range) {\n return range.map(NativeAnimatedHelper.transformDataType);\n };\n\n _proto.__getNativeConfig = function __getNativeConfig() {\n if (__DEV__) {\n NativeAnimatedHelper.validateInterpolation(this._config);\n }\n\n return {\n inputRange: this._config.inputRange,\n // Only the `outputRange` can contain strings so we don't need to transform `inputRange` here\n\n /* $FlowFixMe(>=0.38.0) - Flow error detected during the deployment of\n * v0.38.0. To see the error, remove this comment and run flow */\n outputRange: this.__transformDataType(this._config.outputRange),\n extrapolateLeft: this._config.extrapolateLeft || this._config.extrapolate || 'extend',\n extrapolateRight: this._config.extrapolateRight || this._config.extrapolate || 'extend',\n type: 'interpolation'\n };\n };\n\n return AnimatedInterpolation;\n}(AnimatedWithChildren);\n\nAnimatedInterpolation.__createInterpolation = createInterpolation;\nexport default AnimatedInterpolation;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport ExecutionEnvironment from 'fbjs/lib/ExecutionEnvironment';\nvar doLeftAndRightSwapInRTL = true;\nvar isPreferredLanguageRTL = false;\nvar isRTLAllowed = true;\nvar isRTLForced = false;\n\nvar isRTL = function isRTL() {\n if (isRTLForced) {\n return true;\n }\n\n return isRTLAllowed && isPreferredLanguageRTL;\n};\n\nvar onDirectionChange = function onDirectionChange() {\n if (ExecutionEnvironment.canUseDOM) {\n if (document.documentElement && document.documentElement.setAttribute) {\n document.documentElement.setAttribute('dir', isRTL() ? 'rtl' : 'ltr');\n }\n }\n};\n\nvar I18nManager = {\n allowRTL: function allowRTL(bool) {\n isRTLAllowed = bool;\n onDirectionChange();\n },\n forceRTL: function forceRTL(bool) {\n isRTLForced = bool;\n onDirectionChange();\n },\n getConstants: function getConstants() {\n return {\n doLeftAndRightSwapInRTL: doLeftAndRightSwapInRTL,\n isRTL: isRTL()\n };\n },\n setPreferredLanguageRTL: function setPreferredLanguageRTL(bool) {\n isPreferredLanguageRTL = bool;\n onDirectionChange();\n },\n swapLeftAndRightInRTL: function swapLeftAndRightInRTL(bool) {\n doLeftAndRightSwapInRTL = bool;\n }\n};\nexport default I18nManager;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport mergeRefs from '../mergeRefs';\nexport default function useMergeRefs() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return React.useMemo(function () {\n return mergeRefs.apply(void 0, args);\n }, // eslint-disable-next-line\n [].concat(args));\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar assets = [];\nexport function registerAsset(asset) {\n // `push` returns new array length, so the first asset will\n // get id 1 (not 0) to make the value truthy\n return assets.push(asset);\n}\nexport function getAssetByID(assetId) {\n return assets[assetId - 1];\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar dataUriPattern = /^data:/;\nexport var ImageUriCache = /*#__PURE__*/function () {\n function ImageUriCache() {}\n\n ImageUriCache.has = function has(uri) {\n var entries = ImageUriCache._entries;\n var isDataUri = dataUriPattern.test(uri);\n return isDataUri || Boolean(entries[uri]);\n };\n\n ImageUriCache.add = function add(uri) {\n var entries = ImageUriCache._entries;\n var lastUsedTimestamp = Date.now();\n\n if (entries[uri]) {\n entries[uri].lastUsedTimestamp = lastUsedTimestamp;\n entries[uri].refCount += 1;\n } else {\n entries[uri] = {\n lastUsedTimestamp: lastUsedTimestamp,\n refCount: 1\n };\n }\n };\n\n ImageUriCache.remove = function remove(uri) {\n var entries = ImageUriCache._entries;\n\n if (entries[uri]) {\n entries[uri].refCount -= 1;\n } // Free up entries when the cache is \"full\"\n\n\n ImageUriCache._cleanUpIfNeeded();\n };\n\n ImageUriCache._cleanUpIfNeeded = function _cleanUpIfNeeded() {\n var entries = ImageUriCache._entries;\n var imageUris = Object.keys(entries);\n\n if (imageUris.length + 1 > ImageUriCache._maximumEntries) {\n var leastRecentlyUsedKey;\n var leastRecentlyUsedEntry;\n imageUris.forEach(function (uri) {\n var entry = entries[uri];\n\n if ((!leastRecentlyUsedEntry || entry.lastUsedTimestamp < leastRecentlyUsedEntry.lastUsedTimestamp) && entry.refCount === 0) {\n leastRecentlyUsedKey = uri;\n leastRecentlyUsedEntry = entry;\n }\n });\n\n if (leastRecentlyUsedKey) {\n delete entries[leastRecentlyUsedKey];\n }\n }\n };\n\n return ImageUriCache;\n}();\nImageUriCache._maximumEntries = 256;\nImageUriCache._entries = {};\nvar id = 0;\nvar requests = {};\nvar ImageLoader = {\n abort: function abort(requestId) {\n var image = requests[\"\" + requestId];\n\n if (image) {\n image.onerror = null;\n image.onload = null;\n image = null;\n delete requests[\"\" + requestId];\n }\n },\n getSize: function getSize(uri, success, failure) {\n var complete = false;\n var interval = setInterval(callback, 16);\n var requestId = ImageLoader.load(uri, callback, errorCallback);\n\n function callback() {\n var image = requests[\"\" + requestId];\n\n if (image) {\n var naturalHeight = image.naturalHeight,\n naturalWidth = image.naturalWidth;\n\n if (naturalHeight && naturalWidth) {\n success(naturalWidth, naturalHeight);\n complete = true;\n }\n }\n\n if (complete) {\n ImageLoader.abort(requestId);\n clearInterval(interval);\n }\n }\n\n function errorCallback() {\n if (typeof failure === 'function') {\n failure();\n }\n\n ImageLoader.abort(requestId);\n clearInterval(interval);\n }\n },\n has: function has(uri) {\n return ImageUriCache.has(uri);\n },\n load: function load(uri, onLoad, onError) {\n id += 1;\n var image = new window.Image();\n image.onerror = onError;\n\n image.onload = function (e) {\n // avoid blocking the main thread\n var onDecode = function onDecode() {\n return onLoad({\n nativeEvent: e\n });\n };\n\n if (typeof image.decode === 'function') {\n // Safari currently throws exceptions when decoding svgs.\n // We want to catch that error and allow the load handler\n // to be forwarded to the onLoad handler in this case\n image.decode().then(onDecode, onDecode);\n } else {\n setTimeout(onDecode, 0);\n }\n };\n\n image.src = uri;\n requests[\"\" + id] = image;\n return id;\n },\n prefetch: function prefetch(uri) {\n return new Promise(function (resolve, reject) {\n ImageLoader.load(uri, function () {\n // Add the uri to the cache so it can be immediately displayed when used\n // but also immediately remove it to correctly reflect that it has no active references\n ImageUriCache.add(uri);\n ImageUriCache.remove(uri);\n resolve();\n }, reject);\n });\n },\n queryCache: function queryCache(uris) {\n var result = {};\n uris.forEach(function (u) {\n if (ImageUriCache.has(u)) {\n result[u] = 'disk/memory';\n }\n });\n return Promise.resolve(result);\n }\n};\nexport default ImageLoader;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport css from '../StyleSheet/css';\nimport { getAssetByID } from '../../modules/AssetRegistry';\nimport resolveShadowValue from '../StyleSheet/resolveShadowValue';\nimport ImageLoader from '../../modules/ImageLoader';\nimport PixelRatio from '../PixelRatio';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from '../Text/TextAncestorContext';\nimport View from '../View';\nvar ERRORED = 'ERRORED';\nvar LOADED = 'LOADED';\nvar LOADING = 'LOADING';\nvar IDLE = 'IDLE';\nvar _filterId = 0;\nvar svgDataUriPattern = /^(data:image\\/svg\\+xml;utf8,)(.*)/;\n\nfunction createTintColorSVG(tintColor, id) {\n return tintColor && id != null ? /*#__PURE__*/React.createElement(\"svg\", {\n style: {\n position: 'absolute',\n height: 0,\n visibility: 'hidden',\n width: 0\n }\n }, /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"filter\", {\n id: \"tint-\" + id,\n suppressHydrationWarning: true\n }, /*#__PURE__*/React.createElement(\"feFlood\", {\n floodColor: \"\" + tintColor,\n key: tintColor\n }), /*#__PURE__*/React.createElement(\"feComposite\", {\n in2: \"SourceAlpha\",\n operator: \"atop\"\n })))) : null;\n}\n\nfunction getFlatStyle(style, blurRadius, filterId) {\n var flatStyle = _objectSpread({}, StyleSheet.flatten(style));\n\n var filter = flatStyle.filter,\n resizeMode = flatStyle.resizeMode,\n shadowOffset = flatStyle.shadowOffset,\n tintColor = flatStyle.tintColor; // Add CSS filters\n // React Native exposes these features as props and proprietary styles\n\n var filters = [];\n var _filter = null;\n\n if (filter) {\n filters.push(filter);\n }\n\n if (blurRadius) {\n filters.push(\"blur(\" + blurRadius + \"px)\");\n }\n\n if (shadowOffset) {\n var shadowString = resolveShadowValue(flatStyle);\n\n if (shadowString) {\n filters.push(\"drop-shadow(\" + shadowString + \")\");\n }\n }\n\n if (tintColor && filterId != null) {\n filters.push(\"url(#tint-\" + filterId + \")\");\n }\n\n if (filters.length > 0) {\n _filter = filters.join(' ');\n } // These styles are converted to CSS filters applied to the\n // element displaying the background image.\n\n\n delete flatStyle.blurRadius;\n delete flatStyle.shadowColor;\n delete flatStyle.shadowOpacity;\n delete flatStyle.shadowOffset;\n delete flatStyle.shadowRadius;\n delete flatStyle.tintColor; // These styles are not supported on View\n\n delete flatStyle.overlayColor;\n delete flatStyle.resizeMode;\n return [flatStyle, resizeMode, _filter, tintColor];\n}\n\nfunction resolveAssetDimensions(source) {\n if (typeof source === 'number') {\n var _getAssetByID = getAssetByID(source),\n _height = _getAssetByID.height,\n _width = _getAssetByID.width;\n\n return {\n height: _height,\n width: _width\n };\n } else if (source != null && !Array.isArray(source) && typeof source === 'object') {\n var _height2 = source.height,\n _width2 = source.width;\n return {\n height: _height2,\n width: _width2\n };\n }\n}\n\nfunction resolveAssetUri(source) {\n var uri = null;\n\n if (typeof source === 'number') {\n // get the URI from the packager\n var asset = getAssetByID(source);\n var scale = asset.scales[0];\n\n if (asset.scales.length > 1) {\n var preferredScale = PixelRatio.get(); // Get the scale which is closest to the preferred scale\n\n scale = asset.scales.reduce(function (prev, curr) {\n return Math.abs(curr - preferredScale) < Math.abs(prev - preferredScale) ? curr : prev;\n });\n }\n\n var scaleSuffix = scale !== 1 ? \"@\" + scale + \"x\" : '';\n uri = asset ? asset.httpServerLocation + \"/\" + asset.name + scaleSuffix + \".\" + asset.type : '';\n } else if (typeof source === 'string') {\n uri = source;\n } else if (source && typeof source.uri === 'string') {\n uri = source.uri;\n }\n\n if (uri) {\n var match = uri.match(svgDataUriPattern); // inline SVG markup may contain characters (e.g., #, \") that need to be escaped\n\n if (match) {\n var prefix = match[1],\n svg = match[2];\n var encodedSvg = encodeURIComponent(svg);\n return \"\" + prefix + encodedSvg;\n }\n }\n\n return uri;\n}\n\nvar Image = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var accessibilityLabel = props.accessibilityLabel,\n blurRadius = props.blurRadius,\n defaultSource = props.defaultSource,\n draggable = props.draggable,\n onError = props.onError,\n onLayout = props.onLayout,\n onLoad = props.onLoad,\n onLoadEnd = props.onLoadEnd,\n onLoadStart = props.onLoadStart,\n pointerEvents = props.pointerEvents,\n source = props.source,\n style = props.style,\n rest = _objectWithoutPropertiesLoose(props, [\"accessibilityLabel\", \"blurRadius\", \"defaultSource\", \"draggable\", \"onError\", \"onLayout\", \"onLoad\", \"onLoadEnd\", \"onLoadStart\", \"pointerEvents\", \"source\", \"style\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.children) {\n throw new Error('The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.');\n }\n }\n\n var _React$useState = React.useState(function () {\n var uri = resolveAssetUri(source);\n\n if (uri != null) {\n var isLoaded = ImageLoader.has(uri);\n\n if (isLoaded) {\n return LOADED;\n }\n }\n\n return IDLE;\n }),\n state = _React$useState[0],\n updateState = _React$useState[1];\n\n var _React$useState2 = React.useState({}),\n layout = _React$useState2[0],\n updateLayout = _React$useState2[1];\n\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hiddenImageRef = React.useRef(null);\n var filterRef = React.useRef(_filterId++);\n var requestRef = React.useRef(null);\n var shouldDisplaySource = state === LOADED || state === LOADING && defaultSource == null;\n\n var _getFlatStyle = getFlatStyle(style, blurRadius, filterRef.current),\n flatStyle = _getFlatStyle[0],\n _resizeMode = _getFlatStyle[1],\n filter = _getFlatStyle[2],\n tintColor = _getFlatStyle[3];\n\n var resizeMode = props.resizeMode || _resizeMode || 'cover';\n var selectedSource = shouldDisplaySource ? source : defaultSource;\n var displayImageUri = resolveAssetUri(selectedSource);\n var imageSizeStyle = resolveAssetDimensions(selectedSource);\n var backgroundImage = displayImageUri ? \"url(\\\"\" + displayImageUri + \"\\\")\" : null;\n var backgroundSize = getBackgroundSize(); // Accessibility image allows users to trigger the browser's image context menu\n\n var hiddenImage = displayImageUri ? createElement('img', {\n alt: accessibilityLabel || '',\n classList: [classes.accessibilityImage],\n draggable: draggable || false,\n ref: hiddenImageRef,\n src: displayImageUri\n }) : null;\n\n function getBackgroundSize() {\n if (hiddenImageRef.current != null && (resizeMode === 'center' || resizeMode === 'repeat')) {\n var _hiddenImageRef$curre = hiddenImageRef.current,\n naturalHeight = _hiddenImageRef$curre.naturalHeight,\n naturalWidth = _hiddenImageRef$curre.naturalWidth;\n var _height3 = layout.height,\n _width3 = layout.width;\n\n if (naturalHeight && naturalWidth && _height3 && _width3) {\n var scaleFactor = Math.min(1, _width3 / naturalWidth, _height3 / naturalHeight);\n var x = Math.ceil(scaleFactor * naturalWidth);\n var y = Math.ceil(scaleFactor * naturalHeight);\n return x + \"px \" + y + \"px\";\n }\n }\n }\n\n function handleLayout(e) {\n if (resizeMode === 'center' || resizeMode === 'repeat' || onLayout) {\n var _layout = e.nativeEvent.layout;\n onLayout && onLayout(e);\n updateLayout(_layout);\n }\n } // Image loading\n\n\n var uri = resolveAssetUri(source);\n React.useEffect(function () {\n abortPendingRequest();\n\n if (uri != null) {\n updateState(LOADING);\n\n if (onLoadStart) {\n onLoadStart();\n }\n\n requestRef.current = ImageLoader.load(uri, function load(e) {\n updateState(LOADED);\n\n if (onLoad) {\n onLoad(e);\n }\n\n if (onLoadEnd) {\n onLoadEnd();\n }\n }, function error() {\n updateState(ERRORED);\n\n if (onError) {\n onError({\n nativeEvent: {\n error: \"Failed to load resource \" + uri + \" (404)\"\n }\n });\n }\n\n if (onLoadEnd) {\n onLoadEnd();\n }\n });\n }\n\n function abortPendingRequest() {\n if (requestRef.current != null) {\n ImageLoader.abort(requestRef.current);\n requestRef.current = null;\n }\n }\n\n return abortPendingRequest;\n }, [uri, requestRef, updateState, onError, onLoad, onLoadEnd, onLoadStart]);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n accessibilityLabel: accessibilityLabel,\n onLayout: handleLayout,\n pointerEvents: pointerEvents,\n ref: ref,\n style: [styles.root, hasTextAncestor && styles.inline, imageSizeStyle, flatStyle]\n }), /*#__PURE__*/React.createElement(View, {\n style: [styles.image, resizeModeStyles[resizeMode], {\n backgroundImage: backgroundImage,\n filter: filter\n }, backgroundSize != null && {\n backgroundSize: backgroundSize\n }],\n suppressHydrationWarning: true\n }), hiddenImage, createTintColorSVG(tintColor, filterRef.current));\n});\nImage.displayName = 'Image'; // $FlowIgnore: This is the correct type, but casting makes it unhappy since the variables aren't defined yet\n\nvar ImageWithStatics = Image;\n\nImageWithStatics.getSize = function (uri, success, failure) {\n ImageLoader.getSize(uri, success, failure);\n};\n\nImageWithStatics.prefetch = function (uri) {\n return ImageLoader.prefetch(uri);\n};\n\nImageWithStatics.queryCache = function (uris) {\n return ImageLoader.queryCache(uris);\n};\n\nvar classes = css.create({\n accessibilityImage: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '100%',\n opacity: 0,\n width: '100%',\n zIndex: -1\n })\n});\nvar styles = StyleSheet.create({\n root: {\n flexBasis: 'auto',\n overflow: 'hidden',\n zIndex: 0\n },\n inline: {\n display: 'inline-flex'\n },\n image: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n backgroundColor: 'transparent',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n height: '100%',\n width: '100%',\n zIndex: -1\n })\n});\nvar resizeModeStyles = StyleSheet.create({\n center: {\n backgroundSize: 'auto'\n },\n contain: {\n backgroundSize: 'contain'\n },\n cover: {\n backgroundSize: 'cover'\n },\n none: {\n backgroundPosition: '0 0',\n backgroundSize: 'auto'\n },\n repeat: {\n backgroundPosition: '0 0',\n backgroundRepeat: 'repeat',\n backgroundSize: 'auto'\n },\n stretch: {\n backgroundSize: '100% 100%'\n }\n});\nexport default ImageWithStatics;","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}\nmodule.exports = _curry2;","import * as React from 'react';\nimport type {\n NavigationAction,\n NavigationState,\n ParamListBase,\n} from '@react-navigation/routers';\nimport type { NavigationHelpers } from './types';\n\nexport type ListenerMap = {\n action: ChildActionListener;\n focus: FocusedNavigationListener;\n};\n\nexport type KeyedListenerMap = {\n getState: GetStateListener;\n beforeRemove: ChildBeforeRemoveListener;\n};\n\nexport type AddListener = <T extends keyof ListenerMap>(\n type: T,\n listener: ListenerMap[T]\n) => void;\n\nexport type AddKeyedListener = <T extends keyof KeyedListenerMap>(\n type: T,\n key: string,\n listener: KeyedListenerMap[T]\n) => void;\n\nexport type ChildActionListener = (\n action: NavigationAction,\n visitedNavigators?: Set<string>\n) => boolean;\n\nexport type FocusedNavigationCallback<T> = (\n navigation: NavigationHelpers<ParamListBase>\n) => T;\n\nexport type FocusedNavigationListener = <T>(\n callback: FocusedNavigationCallback<T>\n) => { handled: boolean; result: T };\n\nexport type GetStateListener = () => NavigationState;\n\nexport type ChildBeforeRemoveListener = (action: NavigationAction) => boolean;\n\n/**\n * Context which holds the required helpers needed to build nested navigators.\n */\nconst NavigationBuilderContext = React.createContext<{\n onAction?: (\n action: NavigationAction,\n visitedNavigators?: Set<string>\n ) => boolean;\n addListener?: AddListener;\n addKeyedListener?: AddKeyedListener;\n onRouteFocus?: (key: string) => void;\n onDispatchAction: (action: NavigationAction, noop: boolean) => void;\n onOptionsChange: (options: object) => void;\n}>({\n onDispatchAction: () => undefined,\n onOptionsChange: () => undefined,\n});\n\nexport default NavigationBuilderContext;\n","// This alphabet uses `A-Za-z0-9_-` symbols. The genetic algorithm helped\n// optimize the gzip compression for this alphabet.\nlet urlAlphabet =\n 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW'\n\nlet customAlphabet = (alphabet, size) => {\n return () => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += alphabet[(Math.random() * alphabet.length) | 0]\n }\n return id\n }\n}\n\nlet nanoid = (size = 21) => {\n let id = ''\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0]\n }\n return id\n}\n\nexport { nanoid, customAlphabet }\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport var STYLE_ELEMENT_ID = 'react-native-stylesheet';\nexport var STYLE_GROUPS = {\n reset: 0,\n modality: 0.1,\n classicReset: 0.5,\n classic: 1,\n atomic: 2.2,\n custom: {\n borderColor: 2,\n borderRadius: 2,\n borderStyle: 2,\n borderWidth: 2,\n display: 2,\n flex: 2,\n margin: 2,\n overflow: 2,\n overscrollBehavior: 2,\n padding: 2,\n marginHorizontal: 2.1,\n marginVertical: 2.1,\n paddingHorizontal: 2.1,\n paddingVertical: 2.1\n }\n};\nexport var STYLE_SHORT_FORM_EXPANSIONS = {\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n marginHorizontal: ['marginRight', 'marginLeft'],\n marginVertical: ['marginTop', 'marginBottom'],\n overflow: ['overflowX', 'overflowY'],\n overscrollBehavior: ['overscrollBehaviorX', 'overscrollBehaviorY'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n paddingHorizontal: ['paddingRight', 'paddingLeft'],\n paddingVertical: ['paddingTop', 'paddingBottom']\n};\nexport var MONOSPACE_FONT_STACK = 'monospace,monospace';\nexport var SYSTEM_FONT_STACK = '-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif';","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import * as React from 'react';\nimport type { Route } from '@react-navigation/routers';\n\n/**\n * Context which holds the route prop for a screen.\n */\nconst NavigationContext = React.createContext<Route<string> | undefined>(\n undefined\n);\n\nexport default NavigationContext;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from 'react';\nimport { useCallback, useMemo, useState, useRef } from 'react';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePressEvents from '../../modules/usePressEvents';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n\n/**\n * A wrapper for making views respond properly to touches.\n * On press down, the opacity of the wrapped view is decreased, dimming it.\n */\nfunction TouchableOpacity(props, forwardedRef) {\n var activeOpacity = props.activeOpacity,\n delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n delayLongPress = props.delayLongPress,\n disabled = props.disabled,\n focusable = props.focusable,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n rejectResponderTermination = props.rejectResponderTermination,\n style = props.style,\n rest = _objectWithoutPropertiesLoose(props, [\"activeOpacity\", \"delayPressIn\", \"delayPressOut\", \"delayLongPress\", \"disabled\", \"focusable\", \"onLongPress\", \"onPress\", \"onPressIn\", \"onPressOut\", \"rejectResponderTermination\", \"style\"]);\n\n var hostRef = useRef(null);\n var setRef = useMergeRefs(forwardedRef, hostRef);\n\n var _useState = useState('0s'),\n duration = _useState[0],\n setDuration = _useState[1];\n\n var _useState2 = useState(null),\n opacityOverride = _useState2[0],\n setOpacityOverride = _useState2[1];\n\n var setOpacityTo = useCallback(function (value, duration) {\n setOpacityOverride(value);\n setDuration(duration ? duration / 1000 + \"s\" : '0s');\n }, [setOpacityOverride, setDuration]);\n var setOpacityActive = useCallback(function (duration) {\n setOpacityTo(activeOpacity !== null && activeOpacity !== void 0 ? activeOpacity : 0.2, duration);\n }, [activeOpacity, setOpacityTo]);\n var setOpacityInactive = useCallback(function (duration) {\n setOpacityTo(null, duration);\n }, [setOpacityTo]);\n var pressConfig = useMemo(function () {\n return {\n cancelable: !rejectResponderTermination,\n disabled: disabled,\n delayLongPress: delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressStart: function onPressStart(event) {\n var isGrant = event.dispatchConfig != null ? event.dispatchConfig.registrationName === 'onResponderGrant' : event.type === 'keydown';\n setOpacityActive(isGrant ? 0 : 150);\n\n if (onPressIn != null) {\n onPressIn(event);\n }\n },\n onPressEnd: function onPressEnd(event) {\n setOpacityInactive(250);\n\n if (onPressOut != null) {\n onPressOut(event);\n }\n }\n };\n }, [delayLongPress, delayPressIn, delayPressOut, disabled, onLongPress, onPress, onPressIn, onPressOut, rejectResponderTermination, setOpacityActive, setOpacityInactive]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, pressEventHandlers, {\n accessibilityDisabled: disabled,\n focusable: !disabled && focusable !== false,\n ref: setRef,\n style: [styles.root, !disabled && styles.actionable, style, opacityOverride != null && {\n opacity: opacityOverride\n }, {\n transitionDuration: duration\n }]\n }));\n}\n\nvar styles = StyleSheet.create({\n root: {\n transitionProperty: 'opacity',\n transitionDuration: '0.15s',\n userSelect: 'none'\n },\n actionable: {\n cursor: 'pointer',\n touchAction: 'manipulation'\n }\n});\nvar MemoedTouchableOpacity = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(TouchableOpacity));\nMemoedTouchableOpacity.displayName = 'TouchableOpacity';\nexport default MemoedTouchableOpacity;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { findDOMNode } from 'react-dom';\n\nvar findNodeHandle = function findNodeHandle(component) {\n var node;\n\n try {\n node = findDOMNode(component);\n } catch (e) {}\n\n return node;\n};\n\nexport default findNodeHandle;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport unitlessNumbers from '../../modules/unitlessNumbers';\nimport normalizeColor from '../../modules/normalizeColor';\nvar colorProps = {\n backgroundColor: true,\n borderColor: true,\n borderTopColor: true,\n borderRightColor: true,\n borderBottomColor: true,\n borderLeftColor: true,\n color: true,\n shadowColor: true,\n textDecorationColor: true,\n textShadowColor: true\n};\nexport default function normalizeValueWithProperty(value, property) {\n var returnValue = value;\n\n if ((property == null || !unitlessNumbers[property]) && typeof value === 'number') {\n returnValue = value + \"px\";\n } else if (property != null && colorProps[property]) {\n returnValue = normalizeColor(value);\n }\n\n return returnValue;\n}","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport Dimensions from '../../exports/Dimensions';\nimport findNodeHandle from '../../exports/findNodeHandle';\nimport invariant from 'fbjs/lib/invariant';\nimport Platform from '../../exports/Platform';\nimport TextInputState from '../TextInputState';\nimport UIManager from '../../exports/UIManager';\nimport warning from 'fbjs/lib/warning';\n/**\n * Mixin that can be integrated in order to handle scrolling that plays well\n * with `ResponderEventPlugin`. Integrate with your platform specific scroll\n * views, or even your custom built (every-frame animating) scroll views so that\n * all of these systems play well with the `ResponderEventPlugin`.\n *\n * iOS scroll event timing nuances:\n * ===============================\n *\n *\n * Scrolling without bouncing, if you touch down:\n * -------------------------------\n *\n * 1. `onMomentumScrollBegin` (when animation begins after letting up)\n * ... physical touch starts ...\n * 2. `onTouchStartCapture` (when you press down to stop the scroll)\n * 3. `onTouchStart` (same, but bubble phase)\n * 4. `onResponderRelease` (when lifting up - you could pause forever before * lifting)\n * 5. `onMomentumScrollEnd`\n *\n *\n * Scrolling with bouncing, if you touch down:\n * -------------------------------\n *\n * 1. `onMomentumScrollBegin` (when animation begins after letting up)\n * ... bounce begins ...\n * ... some time elapses ...\n * ... physical touch during bounce ...\n * 2. `onMomentumScrollEnd` (Makes no sense why this occurs first during bounce)\n * 3. `onTouchStartCapture` (immediately after `onMomentumScrollEnd`)\n * 4. `onTouchStart` (same, but bubble phase)\n * 5. `onTouchEnd` (You could hold the touch start for a long time)\n * 6. `onMomentumScrollBegin` (When releasing the view starts bouncing back)\n *\n * So when we receive an `onTouchStart`, how can we tell if we are touching\n * *during* an animation (which then causes the animation to stop)? The only way\n * to tell is if the `touchStart` occurred immediately after the\n * `onMomentumScrollEnd`.\n *\n * This is abstracted out for you, so you can just call this.scrollResponderIsAnimating() if\n * necessary\n *\n * `ScrollResponder` also includes logic for blurring a currently focused input\n * if one is focused while scrolling. The `ScrollResponder` is a natural place\n * to put this logic since it can support not dismissing the keyboard while\n * scrolling, unless a recognized \"tap\"-like gesture has occurred.\n *\n * The public lifecycle API includes events for keyboard interaction, responder\n * interaction, and scrolling (among others). The keyboard callbacks\n * `onKeyboardWill/Did/*` are *global* events, but are invoked on scroll\n * responder's props so that you can guarantee that the scroll responder's\n * internal state has been updated accordingly (and deterministically) by\n * the time the props callbacks are invoke. Otherwise, you would always wonder\n * if the scroll responder is currently in a state where it recognizes new\n * keyboard positions etc. If coordinating scrolling with keyboard movement,\n * *always* use these hooks instead of listening to your own global keyboard\n * events.\n *\n * Public keyboard lifecycle API: (props callbacks)\n *\n * Standard Keyboard Appearance Sequence:\n *\n * this.props.onKeyboardWillShow\n * this.props.onKeyboardDidShow\n *\n * `onScrollResponderKeyboardDismissed` will be invoked if an appropriate\n * tap inside the scroll responder's scrollable region was responsible\n * for the dismissal of the keyboard. There are other reasons why the\n * keyboard could be dismissed.\n *\n * this.props.onScrollResponderKeyboardDismissed\n *\n * Standard Keyboard Hide Sequence:\n *\n * this.props.onKeyboardWillHide\n * this.props.onKeyboardDidHide\n */\n\nvar emptyObject = {};\nvar IS_ANIMATING_TOUCH_START_THRESHOLD_MS = 16;\nvar ScrollResponderMixin = {\n // mixins: [Subscribable.Mixin],\n scrollResponderMixinGetInitialState: function scrollResponderMixinGetInitialState() {\n return {\n isTouching: false,\n lastMomentumScrollBeginTime: 0,\n lastMomentumScrollEndTime: 0,\n // Reset to false every time becomes responder. This is used to:\n // - Determine if the scroll view has been scrolled and therefore should\n // refuse to give up its responder lock.\n // - Determine if releasing should dismiss the keyboard when we are in\n // tap-to-dismiss mode (!this.props.keyboardShouldPersistTaps).\n observedScrollSinceBecomingResponder: false,\n becameResponderWhileAnimating: false\n };\n },\n\n /**\n * Invoke this from an `onScroll` event.\n */\n scrollResponderHandleScrollShouldSetResponder: function scrollResponderHandleScrollShouldSetResponder() {\n return this.state.isTouching;\n },\n\n /**\n * Merely touch starting is not sufficient for a scroll view to become the\n * responder. Being the \"responder\" means that the very next touch move/end\n * event will result in an action/movement.\n *\n * Invoke this from an `onStartShouldSetResponder` event.\n *\n * `onStartShouldSetResponder` is used when the next move/end will trigger\n * some UI movement/action, but when you want to yield priority to views\n * nested inside of the view.\n *\n * There may be some cases where scroll views actually should return `true`\n * from `onStartShouldSetResponder`: Any time we are detecting a standard tap\n * that gives priority to nested views.\n *\n * - If a single tap on the scroll view triggers an action such as\n * recentering a map style view yet wants to give priority to interaction\n * views inside (such as dropped pins or labels), then we would return true\n * from this method when there is a single touch.\n *\n * - Similar to the previous case, if a two finger \"tap\" should trigger a\n * zoom, we would check the `touches` count, and if `>= 2`, we would return\n * true.\n *\n */\n scrollResponderHandleStartShouldSetResponder: function scrollResponderHandleStartShouldSetResponder() {\n return false;\n },\n\n /**\n * There are times when the scroll view wants to become the responder\n * (meaning respond to the next immediate `touchStart/touchEnd`), in a way\n * that *doesn't* give priority to nested views (hence the capture phase):\n *\n * - Currently animating.\n * - Tapping anywhere that is not the focused input, while the keyboard is\n * up (which should dismiss the keyboard).\n *\n * Invoke this from an `onStartShouldSetResponderCapture` event.\n */\n scrollResponderHandleStartShouldSetResponderCapture: function scrollResponderHandleStartShouldSetResponderCapture(e) {\n // First see if we want to eat taps while the keyboard is up\n // var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();\n // if (!this.props.keyboardShouldPersistTaps &&\n // currentlyFocusedTextInput != null &&\n // e.target !== currentlyFocusedTextInput) {\n // return true;\n // }\n return this.scrollResponderIsAnimating();\n },\n\n /**\n * Invoke this from an `onResponderReject` event.\n *\n * Some other element is not yielding its role as responder. Normally, we'd\n * just disable the `UIScrollView`, but a touch has already began on it, the\n * `UIScrollView` will not accept being disabled after that. The easiest\n * solution for now is to accept the limitation of disallowing this\n * altogether. To improve this, find a way to disable the `UIScrollView` after\n * a touch has already started.\n */\n scrollResponderHandleResponderReject: function scrollResponderHandleResponderReject() {\n warning(false, \"ScrollView doesn't take rejection well - scrolls anyway\");\n },\n\n /**\n * We will allow the scroll view to give up its lock iff it acquired the lock\n * during an animation. This is a very useful default that happens to satisfy\n * many common user experiences.\n *\n * - Stop a scroll on the left edge, then turn that into an outer view's\n * backswipe.\n * - Stop a scroll mid-bounce at the top, continue pulling to have the outer\n * view dismiss.\n * - However, without catching the scroll view mid-bounce (while it is\n * motionless), if you drag far enough for the scroll view to become\n * responder (and therefore drag the scroll view a bit), any backswipe\n * navigation of a swipe gesture higher in the view hierarchy, should be\n * rejected.\n */\n scrollResponderHandleTerminationRequest: function scrollResponderHandleTerminationRequest() {\n return !this.state.observedScrollSinceBecomingResponder;\n },\n\n /**\n * Invoke this from an `onTouchEnd` event.\n *\n * @param {SyntheticEvent} e Event.\n */\n scrollResponderHandleTouchEnd: function scrollResponderHandleTouchEnd(e) {\n var nativeEvent = e.nativeEvent;\n this.state.isTouching = nativeEvent.touches.length !== 0;\n this.props.onTouchEnd && this.props.onTouchEnd(e);\n },\n\n /**\n * Invoke this from an `onResponderRelease` event.\n */\n scrollResponderHandleResponderRelease: function scrollResponderHandleResponderRelease(e) {\n this.props.onResponderRelease && this.props.onResponderRelease(e); // By default scroll views will unfocus a textField\n // if another touch occurs outside of it\n\n var currentlyFocusedTextInput = TextInputState.currentlyFocusedField();\n\n if (!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput && !this.state.observedScrollSinceBecomingResponder && !this.state.becameResponderWhileAnimating) {\n this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e);\n TextInputState.blurTextInput(currentlyFocusedTextInput);\n }\n },\n scrollResponderHandleScroll: function scrollResponderHandleScroll(e) {\n this.state.observedScrollSinceBecomingResponder = true;\n this.props.onScroll && this.props.onScroll(e);\n },\n\n /**\n * Invoke this from an `onResponderGrant` event.\n */\n scrollResponderHandleResponderGrant: function scrollResponderHandleResponderGrant(e) {\n this.state.observedScrollSinceBecomingResponder = false;\n this.props.onResponderGrant && this.props.onResponderGrant(e);\n this.state.becameResponderWhileAnimating = this.scrollResponderIsAnimating();\n },\n\n /**\n * Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll\n * animation, and there's not an easy way to distinguish a drag vs. stopping\n * momentum.\n *\n * Invoke this from an `onScrollBeginDrag` event.\n */\n scrollResponderHandleScrollBeginDrag: function scrollResponderHandleScrollBeginDrag(e) {\n this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);\n },\n\n /**\n * Invoke this from an `onScrollEndDrag` event.\n */\n scrollResponderHandleScrollEndDrag: function scrollResponderHandleScrollEndDrag(e) {\n this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);\n },\n\n /**\n * Invoke this from an `onMomentumScrollBegin` event.\n */\n scrollResponderHandleMomentumScrollBegin: function scrollResponderHandleMomentumScrollBegin(e) {\n this.state.lastMomentumScrollBeginTime = Date.now();\n this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);\n },\n\n /**\n * Invoke this from an `onMomentumScrollEnd` event.\n */\n scrollResponderHandleMomentumScrollEnd: function scrollResponderHandleMomentumScrollEnd(e) {\n this.state.lastMomentumScrollEndTime = Date.now();\n this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);\n },\n\n /**\n * Invoke this from an `onTouchStart` event.\n *\n * Since we know that the `SimpleEventPlugin` occurs later in the plugin\n * order, after `ResponderEventPlugin`, we can detect that we were *not*\n * permitted to be the responder (presumably because a contained view became\n * responder). The `onResponderReject` won't fire in that case - it only\n * fires when a *current* responder rejects our request.\n *\n * @param {SyntheticEvent} e Touch Start event.\n */\n scrollResponderHandleTouchStart: function scrollResponderHandleTouchStart(e) {\n this.state.isTouching = true;\n this.props.onTouchStart && this.props.onTouchStart(e);\n },\n\n /**\n * Invoke this from an `onTouchMove` event.\n *\n * Since we know that the `SimpleEventPlugin` occurs later in the plugin\n * order, after `ResponderEventPlugin`, we can detect that we were *not*\n * permitted to be the responder (presumably because a contained view became\n * responder). The `onResponderReject` won't fire in that case - it only\n * fires when a *current* responder rejects our request.\n *\n * @param {SyntheticEvent} e Touch Start event.\n */\n scrollResponderHandleTouchMove: function scrollResponderHandleTouchMove(e) {\n this.props.onTouchMove && this.props.onTouchMove(e);\n },\n\n /**\n * A helper function for this class that lets us quickly determine if the\n * view is currently animating. This is particularly useful to know when\n * a touch has just started or ended.\n */\n scrollResponderIsAnimating: function scrollResponderIsAnimating() {\n var now = Date.now();\n var timeSinceLastMomentumScrollEnd = now - this.state.lastMomentumScrollEndTime;\n var isAnimating = timeSinceLastMomentumScrollEnd < IS_ANIMATING_TOUCH_START_THRESHOLD_MS || this.state.lastMomentumScrollEndTime < this.state.lastMomentumScrollBeginTime;\n return isAnimating;\n },\n\n /**\n * Returns the node that represents native view that can be scrolled.\n * Components can pass what node to use by defining a `getScrollableNode`\n * function otherwise `this` is used.\n */\n scrollResponderGetScrollableNode: function scrollResponderGetScrollableNode() {\n return this.getScrollableNode ? this.getScrollableNode() : findNodeHandle(this);\n },\n\n /**\n * A helper function to scroll to a specific point in the scrollview.\n * This is currently used to help focus on child textviews, but can also\n * be used to quickly scroll to any element we want to focus. Syntax:\n *\n * scrollResponderScrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})\n *\n * Note: The weird argument signature is due to the fact that, for historical reasons,\n * the function also accepts separate arguments as as alternative to the options object.\n * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.\n */\n scrollResponderScrollTo: function scrollResponderScrollTo(x, y, animated) {\n if (typeof x === 'number') {\n console.warn('`scrollResponderScrollTo(x, y, animated)` is deprecated. Use `scrollResponderScrollTo({x: 5, y: 5, animated: true})` instead.');\n } else {\n var _ref = x || emptyObject;\n\n x = _ref.x;\n y = _ref.y;\n animated = _ref.animated;\n }\n\n var node = this.scrollResponderGetScrollableNode();\n var left = x || 0;\n var top = y || 0;\n\n if (typeof node.scroll === 'function') {\n node.scroll({\n top: top,\n left: left,\n behavior: !animated ? 'auto' : 'smooth'\n });\n } else {\n node.scrollLeft = left;\n node.scrollTop = top;\n }\n },\n\n /**\n * A helper function to zoom to a specific rect in the scrollview. The argument has the shape\n * {x: number; y: number; width: number; height: number; animated: boolean = true}\n *\n * @platform ios\n */\n scrollResponderZoomTo: function scrollResponderZoomTo(rect, animated) // deprecated, put this inside the rect argument instead\n {\n if (Platform.OS !== 'ios') {\n invariant('zoomToRect is not implemented');\n }\n },\n\n /**\n * Displays the scroll indicators momentarily.\n */\n scrollResponderFlashScrollIndicators: function scrollResponderFlashScrollIndicators() {},\n\n /**\n * This method should be used as the callback to onFocus in a TextInputs'\n * parent view. Note that any module using this mixin needs to return\n * the parent view's ref in getScrollViewRef() in order to use this method.\n * @param {any} nodeHandle The TextInput node handle\n * @param {number} additionalOffset The scroll view's top \"contentInset\".\n * Default is 0.\n * @param {bool} preventNegativeScrolling Whether to allow pulling the content\n * down to make it meet the keyboard's top. Default is false.\n */\n scrollResponderScrollNativeHandleToKeyboard: function scrollResponderScrollNativeHandleToKeyboard(nodeHandle, additionalOffset, preventNegativeScrollOffset) {\n this.additionalScrollOffset = additionalOffset || 0;\n this.preventNegativeScrollOffset = !!preventNegativeScrollOffset;\n UIManager.measureLayout(nodeHandle, findNodeHandle(this.getInnerViewNode()), this.scrollResponderTextInputFocusError, this.scrollResponderInputMeasureAndScrollToKeyboard);\n },\n\n /**\n * The calculations performed here assume the scroll view takes up the entire\n * screen - even if has some content inset. We then measure the offsets of the\n * keyboard, and compensate both for the scroll view's \"contentInset\".\n *\n * @param {number} left Position of input w.r.t. table view.\n * @param {number} top Position of input w.r.t. table view.\n * @param {number} width Width of the text input.\n * @param {number} height Height of the text input.\n */\n scrollResponderInputMeasureAndScrollToKeyboard: function scrollResponderInputMeasureAndScrollToKeyboard(left, top, width, height) {\n var keyboardScreenY = Dimensions.get('window').height;\n\n if (this.keyboardWillOpenTo) {\n keyboardScreenY = this.keyboardWillOpenTo.endCoordinates.screenY;\n }\n\n var scrollOffsetY = top - keyboardScreenY + height + this.additionalScrollOffset; // By default, this can scroll with negative offset, pulling the content\n // down so that the target component's bottom meets the keyboard's top.\n // If requested otherwise, cap the offset at 0 minimum to avoid content\n // shifting down.\n\n if (this.preventNegativeScrollOffset) {\n scrollOffsetY = Math.max(0, scrollOffsetY);\n }\n\n this.scrollResponderScrollTo({\n x: 0,\n y: scrollOffsetY,\n animated: true\n });\n this.additionalOffset = 0;\n this.preventNegativeScrollOffset = false;\n },\n scrollResponderTextInputFocusError: function scrollResponderTextInputFocusError(e) {\n console.error('Error measuring text field: ', e);\n },\n\n /**\n * `componentWillMount` is the closest thing to a standard \"constructor\" for\n * React components.\n *\n * The `keyboardWillShow` is called before input focus.\n */\n UNSAFE_componentWillMount: function UNSAFE_componentWillMount() {\n this.keyboardWillOpenTo = null;\n this.additionalScrollOffset = 0; // this.addListenerOn(RCTDeviceEventEmitter, 'keyboardWillShow', this.scrollResponderKeyboardWillShow);\n // this.addListenerOn(RCTDeviceEventEmitter, 'keyboardWillHide', this.scrollResponderKeyboardWillHide);\n // this.addListenerOn(RCTDeviceEventEmitter, 'keyboardDidShow', this.scrollResponderKeyboardDidShow);\n // this.addListenerOn(RCTDeviceEventEmitter, 'keyboardDidHide', this.scrollResponderKeyboardDidHide);\n },\n\n /**\n * Warning, this may be called several times for a single keyboard opening.\n * It's best to store the information in this method and then take any action\n * at a later point (either in `keyboardDidShow` or other).\n *\n * Here's the order that events occur in:\n * - focus\n * - willShow {startCoordinates, endCoordinates} several times\n * - didShow several times\n * - blur\n * - willHide {startCoordinates, endCoordinates} several times\n * - didHide several times\n *\n * The `ScrollResponder` providesModule callbacks for each of these events.\n * Even though any user could have easily listened to keyboard events\n * themselves, using these `props` callbacks ensures that ordering of events\n * is consistent - and not dependent on the order that the keyboard events are\n * subscribed to. This matters when telling the scroll view to scroll to where\n * the keyboard is headed - the scroll responder better have been notified of\n * the keyboard destination before being instructed to scroll to where the\n * keyboard will be. Stick to the `ScrollResponder` callbacks, and everything\n * will work.\n *\n * WARNING: These callbacks will fire even if a keyboard is displayed in a\n * different navigation pane. Filter out the events to determine if they are\n * relevant to you. (For example, only if you receive these callbacks after\n * you had explicitly focused a node etc).\n */\n scrollResponderKeyboardWillShow: function scrollResponderKeyboardWillShow(e) {\n this.keyboardWillOpenTo = e;\n this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);\n },\n scrollResponderKeyboardWillHide: function scrollResponderKeyboardWillHide(e) {\n this.keyboardWillOpenTo = null;\n this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e);\n },\n scrollResponderKeyboardDidShow: function scrollResponderKeyboardDidShow(e) {\n // TODO(7693961): The event for DidShow is not available on iOS yet.\n // Use the one from WillShow and do not assign.\n if (e) {\n this.keyboardWillOpenTo = e;\n }\n\n this.props.onKeyboardDidShow && this.props.onKeyboardDidShow(e);\n },\n scrollResponderKeyboardDidHide: function scrollResponderKeyboardDidHide(e) {\n this.keyboardWillOpenTo = null;\n this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(e);\n }\n};\nvar ScrollResponder = {\n Mixin: ScrollResponderMixin\n};\nexport default ScrollResponder;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nimport useMergeRefs from '../../modules/useMergeRefs';\n\nfunction normalizeScrollEvent(e) {\n return {\n nativeEvent: {\n contentOffset: {\n get x() {\n return e.target.scrollLeft;\n },\n\n get y() {\n return e.target.scrollTop;\n }\n\n },\n contentSize: {\n get height() {\n return e.target.scrollHeight;\n },\n\n get width() {\n return e.target.scrollWidth;\n }\n\n },\n layoutMeasurement: {\n get height() {\n return e.target.offsetHeight;\n },\n\n get width() {\n return e.target.offsetWidth;\n }\n\n }\n },\n timeStamp: Date.now()\n };\n}\n\nfunction shouldEmitScrollEvent(lastTick, eventThrottle) {\n var timeSinceLastTick = Date.now() - lastTick;\n return eventThrottle > 0 && timeSinceLastTick >= eventThrottle;\n}\n/**\n * Encapsulates the Web-specific scroll throttling and disabling logic\n */\n\n\nvar ScrollViewBase = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var onScroll = props.onScroll,\n onTouchMove = props.onTouchMove,\n onWheel = props.onWheel,\n _props$scrollEnabled = props.scrollEnabled,\n scrollEnabled = _props$scrollEnabled === void 0 ? true : _props$scrollEnabled,\n _props$scrollEventThr = props.scrollEventThrottle,\n scrollEventThrottle = _props$scrollEventThr === void 0 ? 0 : _props$scrollEventThr,\n showsHorizontalScrollIndicator = props.showsHorizontalScrollIndicator,\n showsVerticalScrollIndicator = props.showsVerticalScrollIndicator,\n style = props.style,\n rest = _objectWithoutPropertiesLoose(props, [\"onScroll\", \"onTouchMove\", \"onWheel\", \"scrollEnabled\", \"scrollEventThrottle\", \"showsHorizontalScrollIndicator\", \"showsVerticalScrollIndicator\", \"style\"]);\n\n var scrollState = React.useRef({\n isScrolling: false,\n scrollLastTick: 0\n });\n var scrollTimeout = React.useRef(null);\n var scrollRef = React.useRef(null);\n\n function createPreventableScrollHandler(handler) {\n return function (e) {\n if (scrollEnabled) {\n if (handler) {\n handler(e);\n }\n }\n };\n }\n\n function handleScroll(e) {\n e.stopPropagation();\n\n if (e.target === scrollRef.current) {\n e.persist(); // A scroll happened, so the scroll resets the scrollend timeout.\n\n if (scrollTimeout.current != null) {\n clearTimeout(scrollTimeout.current);\n }\n\n scrollTimeout.current = setTimeout(function () {\n handleScrollEnd(e);\n }, 100);\n\n if (scrollState.current.isScrolling) {\n // Scroll last tick may have changed, check if we need to notify\n if (shouldEmitScrollEvent(scrollState.current.scrollLastTick, scrollEventThrottle)) {\n handleScrollTick(e);\n }\n } else {\n // Weren't scrolling, so we must have just started\n handleScrollStart(e);\n }\n }\n }\n\n function handleScrollStart(e) {\n scrollState.current.isScrolling = true;\n handleScrollTick(e);\n }\n\n function handleScrollTick(e) {\n scrollState.current.scrollLastTick = Date.now();\n\n if (onScroll) {\n onScroll(normalizeScrollEvent(e));\n }\n }\n\n function handleScrollEnd(e) {\n scrollState.current.isScrolling = false;\n\n if (onScroll) {\n onScroll(normalizeScrollEvent(e));\n }\n }\n\n var hideScrollbar = showsHorizontalScrollIndicator === false || showsVerticalScrollIndicator === false;\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n onScroll: handleScroll,\n onTouchMove: createPreventableScrollHandler(onTouchMove),\n onWheel: createPreventableScrollHandler(onWheel),\n ref: useMergeRefs(scrollRef, forwardedRef),\n style: [style, !scrollEnabled && styles.scrollDisabled, hideScrollbar && styles.hideScrollbar]\n }));\n}); // Chrome doesn't support e.preventDefault in this case; touch-action must be\n// used to disable scrolling.\n// https://developers.google.com/web/updates/2017/01/scrolling-intervention\n\nvar styles = StyleSheet.create({\n scrollDisabled: {\n overflowX: 'hidden',\n overflowY: 'hidden',\n touchAction: 'none'\n },\n hideScrollbar: {\n scrollbarWidth: 'none'\n }\n});\nexport default ScrollViewBase;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createReactClass from 'create-react-class';\nimport dismissKeyboard from '../../modules/dismissKeyboard';\nimport invariant from 'fbjs/lib/invariant';\nimport mergeRefs from '../../modules/mergeRefs';\nimport ScrollResponder from '../../modules/ScrollResponder';\nimport ScrollViewBase from './ScrollViewBase';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nimport React from 'react';\nvar emptyObject = {};\n/* eslint-disable react/prefer-es6-class */\n\nvar ScrollView = createReactClass({\n displayName: \"ScrollView\",\n mixins: [ScrollResponder.Mixin],\n getInitialState: function getInitialState() {\n return this.scrollResponderMixinGetInitialState();\n },\n flashScrollIndicators: function flashScrollIndicators() {\n this.scrollResponderFlashScrollIndicators();\n },\n\n /**\n * Returns a reference to the underlying scroll responder, which supports\n * operations like `scrollTo`. All ScrollView-like components should\n * implement this method so that they can be composed while providing access\n * to the underlying scroll responder's methods.\n */\n getScrollResponder: function getScrollResponder() {\n return this;\n },\n getScrollableNode: function getScrollableNode() {\n return this._scrollNodeRef;\n },\n getInnerViewRef: function getInnerViewRef() {\n return this._innerViewRef;\n },\n getInnerViewNode: function getInnerViewNode() {\n return this._innerViewRef;\n },\n getNativeScrollRef: function getNativeScrollRef() {\n return this._scrollNodeRef;\n },\n\n /**\n * Scrolls to a given x, y offset, either immediately or with a smooth animation.\n * Syntax:\n *\n * scrollTo(options: {x: number = 0; y: number = 0; animated: boolean = true})\n *\n * Note: The weird argument signature is due to the fact that, for historical reasons,\n * the function also accepts separate arguments as as alternative to the options object.\n * This is deprecated due to ambiguity (y before x), and SHOULD NOT BE USED.\n */\n scrollTo: function scrollTo(y, x, animated) {\n if (typeof y === 'number') {\n console.warn('`scrollTo(y, x, animated)` is deprecated. Use `scrollTo({x: 5, y: 5, animated: true})` instead.');\n } else {\n var _ref = y || emptyObject;\n\n x = _ref.x;\n y = _ref.y;\n animated = _ref.animated;\n }\n\n this.getScrollResponder().scrollResponderScrollTo({\n x: x || 0,\n y: y || 0,\n animated: animated !== false\n });\n },\n\n /**\n * If this is a vertical ScrollView scrolls to the bottom.\n * If this is a horizontal ScrollView scrolls to the right.\n *\n * Use `scrollToEnd({ animated: true })` for smooth animated scrolling,\n * `scrollToEnd({ animated: false })` for immediate scrolling.\n * If no options are passed, `animated` defaults to true.\n */\n scrollToEnd: function scrollToEnd(options) {\n // Default to true\n var animated = (options && options.animated) !== false;\n var horizontal = this.props.horizontal;\n var scrollResponder = this.getScrollResponder();\n var scrollResponderNode = scrollResponder.scrollResponderGetScrollableNode();\n var x = horizontal ? scrollResponderNode.scrollWidth : 0;\n var y = horizontal ? 0 : scrollResponderNode.scrollHeight;\n scrollResponder.scrollResponderScrollTo({\n x: x,\n y: y,\n animated: animated\n });\n },\n render: function render() {\n var _this$props = this.props,\n contentContainerStyle = _this$props.contentContainerStyle,\n horizontal = _this$props.horizontal,\n onContentSizeChange = _this$props.onContentSizeChange,\n refreshControl = _this$props.refreshControl,\n stickyHeaderIndices = _this$props.stickyHeaderIndices,\n pagingEnabled = _this$props.pagingEnabled,\n forwardedRef = _this$props.forwardedRef,\n keyboardDismissMode = _this$props.keyboardDismissMode,\n onScroll = _this$props.onScroll,\n other = _objectWithoutPropertiesLoose(_this$props, [\"contentContainerStyle\", \"horizontal\", \"onContentSizeChange\", \"refreshControl\", \"stickyHeaderIndices\", \"pagingEnabled\", \"forwardedRef\", \"keyboardDismissMode\", \"onScroll\"]);\n\n if (process.env.NODE_ENV !== 'production' && this.props.style) {\n var style = StyleSheet.flatten(this.props.style);\n var childLayoutProps = ['alignItems', 'justifyContent'].filter(function (prop) {\n return style && style[prop] !== undefined;\n });\n invariant(childLayoutProps.length === 0, \"ScrollView child layout (\" + JSON.stringify(childLayoutProps) + \") \" + 'must be applied through the contentContainerStyle prop.');\n }\n\n var contentSizeChangeProps = {};\n\n if (onContentSizeChange) {\n contentSizeChangeProps = {\n onLayout: this._handleContentOnLayout\n };\n }\n\n var hasStickyHeaderIndices = !horizontal && Array.isArray(stickyHeaderIndices);\n var children = hasStickyHeaderIndices || pagingEnabled ? React.Children.map(this.props.children, function (child, i) {\n var isSticky = hasStickyHeaderIndices && stickyHeaderIndices.indexOf(i) > -1;\n\n if (child != null && (isSticky || pagingEnabled)) {\n return /*#__PURE__*/React.createElement(View, {\n style: StyleSheet.compose(isSticky && styles.stickyHeader, pagingEnabled && styles.pagingEnabledChild)\n }, child);\n } else {\n return child;\n }\n }) : this.props.children;\n var contentContainer = /*#__PURE__*/React.createElement(View, _extends({}, contentSizeChangeProps, {\n children: children,\n collapsable: false,\n ref: this._setInnerViewRef,\n style: StyleSheet.compose(horizontal && styles.contentContainerHorizontal, contentContainerStyle)\n }));\n var baseStyle = horizontal ? styles.baseHorizontal : styles.baseVertical;\n var pagingEnabledStyle = horizontal ? styles.pagingEnabledHorizontal : styles.pagingEnabledVertical;\n\n var props = _objectSpread(_objectSpread({}, other), {}, {\n style: [baseStyle, pagingEnabled && pagingEnabledStyle, this.props.style],\n onTouchStart: this.scrollResponderHandleTouchStart,\n onTouchMove: this.scrollResponderHandleTouchMove,\n onTouchEnd: this.scrollResponderHandleTouchEnd,\n onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag,\n onScrollEndDrag: this.scrollResponderHandleScrollEndDrag,\n onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin,\n onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd,\n onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder,\n onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture,\n onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder,\n onScroll: this._handleScroll,\n onResponderGrant: this.scrollResponderHandleResponderGrant,\n onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest,\n onResponderTerminate: this.scrollResponderHandleTerminate,\n onResponderRelease: this.scrollResponderHandleResponderRelease,\n onResponderReject: this.scrollResponderHandleResponderReject\n });\n\n var ScrollViewClass = ScrollViewBase;\n invariant(ScrollViewClass !== undefined, 'ScrollViewClass must not be undefined');\n var scrollView = /*#__PURE__*/React.createElement(ScrollViewClass, _extends({}, props, {\n ref: this._setScrollNodeRef\n }), contentContainer);\n\n if (refreshControl) {\n return /*#__PURE__*/React.cloneElement(refreshControl, {\n style: props.style\n }, scrollView);\n }\n\n return scrollView;\n },\n _handleContentOnLayout: function _handleContentOnLayout(e) {\n var _e$nativeEvent$layout = e.nativeEvent.layout,\n width = _e$nativeEvent$layout.width,\n height = _e$nativeEvent$layout.height;\n this.props.onContentSizeChange(width, height);\n },\n _handleScroll: function _handleScroll(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (this.props.onScroll && this.props.scrollEventThrottle == null) {\n console.log('You specified `onScroll` on a <ScrollView> but not ' + '`scrollEventThrottle`. You will only receive one event. ' + 'Using `16` you get all the events but be aware that it may ' + \"cause frame drops, use a bigger number if you don't need as \" + 'much precision.');\n }\n }\n\n if (this.props.keyboardDismissMode === 'on-drag') {\n dismissKeyboard();\n }\n\n this.scrollResponderHandleScroll(e);\n },\n _setInnerViewRef: function _setInnerViewRef(node) {\n this._innerViewRef = node;\n },\n _setScrollNodeRef: function _setScrollNodeRef(node) {\n this._scrollNodeRef = node; // ScrollView needs to add more methods to the hostNode in addition to those\n // added by `usePlatformMethods`. This is temporarily until an API like\n // `ScrollView.scrollTo(hostNode, { x, y })` is added to React Native.\n\n if (node != null) {\n node.getScrollResponder = this.getScrollResponder;\n node.getInnerViewNode = this.getInnerViewNode;\n node.getInnerViewRef = this.getInnerViewRef;\n node.getNativeScrollRef = this.getNativeScrollRef;\n node.getScrollableNode = this.getScrollableNode;\n node.scrollTo = this.scrollTo;\n node.scrollToEnd = this.scrollToEnd;\n node.flashScrollIndicators = this.flashScrollIndicators;\n node.scrollResponderZoomTo = this.scrollResponderZoomTo;\n node.scrollResponderScrollNativeHandleToKeyboard = this.scrollResponderScrollNativeHandleToKeyboard;\n }\n\n var ref = mergeRefs(this.props.forwardedRef);\n ref(node);\n }\n});\nvar commonStyle = {\n flexGrow: 1,\n flexShrink: 1,\n // Enable hardware compositing in modern browsers.\n // Creates a new layer with its own backing surface that can significantly\n // improve scroll performance.\n transform: [{\n translateZ: 0\n }],\n // iOS native scrolling\n WebkitOverflowScrolling: 'touch'\n};\nvar styles = StyleSheet.create({\n baseVertical: _objectSpread(_objectSpread({}, commonStyle), {}, {\n flexDirection: 'column',\n overflowX: 'hidden',\n overflowY: 'auto'\n }),\n baseHorizontal: _objectSpread(_objectSpread({}, commonStyle), {}, {\n flexDirection: 'row',\n overflowX: 'auto',\n overflowY: 'hidden'\n }),\n contentContainerHorizontal: {\n flexDirection: 'row'\n },\n stickyHeader: {\n position: 'sticky',\n top: 0,\n zIndex: 10\n },\n pagingEnabledHorizontal: {\n scrollSnapType: 'x mandatory'\n },\n pagingEnabledVertical: {\n scrollSnapType: 'y mandatory'\n },\n pagingEnabledChild: {\n scrollSnapAlign: 'start'\n }\n});\nvar ForwardedScrollView = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n return /*#__PURE__*/React.createElement(ScrollView, _extends({}, props, {\n forwardedRef: forwardedRef\n }));\n});\nForwardedScrollView.displayName = 'ScrollView';\nexport default ForwardedScrollView;","import debounce from 'debounce';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar Prop = function Prop(name, _ref) {\n var _ref$default = _ref[\"default\"],\n defaultVal = _ref$default === void 0 ? null : _ref$default,\n _ref$triggerUpdate = _ref.triggerUpdate,\n triggerUpdate = _ref$triggerUpdate === void 0 ? true : _ref$triggerUpdate,\n _ref$onChange = _ref.onChange,\n onChange = _ref$onChange === void 0 ? function (newVal, state) {} : _ref$onChange;\n\n _classCallCheck(this, Prop);\n\n this.name = name;\n this.defaultVal = defaultVal;\n this.triggerUpdate = triggerUpdate;\n this.onChange = onChange;\n};\n\nfunction index (_ref2) {\n var _ref2$stateInit = _ref2.stateInit,\n stateInit = _ref2$stateInit === void 0 ? function () {\n return {};\n } : _ref2$stateInit,\n _ref2$props = _ref2.props,\n rawProps = _ref2$props === void 0 ? {} : _ref2$props,\n _ref2$methods = _ref2.methods,\n methods = _ref2$methods === void 0 ? {} : _ref2$methods,\n _ref2$aliases = _ref2.aliases,\n aliases = _ref2$aliases === void 0 ? {} : _ref2$aliases,\n _ref2$init = _ref2.init,\n initFn = _ref2$init === void 0 ? function () {} : _ref2$init,\n _ref2$update = _ref2.update,\n updateFn = _ref2$update === void 0 ? function () {} : _ref2$update;\n // Parse props into Prop instances\n var props = Object.keys(rawProps).map(function (propName) {\n return new Prop(propName, rawProps[propName]);\n });\n return function () {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // Holds component state\n var state = Object.assign({}, stateInit instanceof Function ? stateInit(options) : stateInit, // Support plain objects for backwards compatibility\n {\n initialised: false\n }); // keeps track of which props triggered an update\n\n var changedProps = {}; // Component constructor\n\n function comp(nodeElement) {\n initStatic(nodeElement, options);\n digest();\n return comp;\n }\n\n var initStatic = function initStatic(nodeElement, options) {\n initFn.call(comp, nodeElement, state, options);\n state.initialised = true;\n };\n\n var digest = debounce(function () {\n if (!state.initialised) {\n return;\n }\n\n updateFn.call(comp, state, changedProps);\n changedProps = {};\n }, 1); // Getter/setter methods\n\n props.forEach(function (prop) {\n comp[prop.name] = getSetProp(prop);\n\n function getSetProp(_ref3) {\n var prop = _ref3.name,\n _ref3$triggerUpdate = _ref3.triggerUpdate,\n redigest = _ref3$triggerUpdate === void 0 ? false : _ref3$triggerUpdate,\n _ref3$onChange = _ref3.onChange,\n onChange = _ref3$onChange === void 0 ? function (newVal, state) {} : _ref3$onChange,\n _ref3$defaultVal = _ref3.defaultVal,\n defaultVal = _ref3$defaultVal === void 0 ? null : _ref3$defaultVal;\n return function (_) {\n var curVal = state[prop];\n\n if (!arguments.length) {\n return curVal;\n } // Getter mode\n\n\n var val = _ === undefined ? defaultVal : _; // pick default if value passed is undefined\n\n state[prop] = val;\n onChange.call(comp, val, state, curVal); // track changed props\n\n !changedProps.hasOwnProperty(prop) && (changedProps[prop] = curVal);\n\n if (redigest) {\n digest();\n }\n\n return comp;\n };\n }\n }); // Other methods\n\n Object.keys(methods).forEach(function (methodName) {\n comp[methodName] = function () {\n var _methods$methodName;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return (_methods$methodName = methods[methodName]).call.apply(_methods$methodName, [comp, state].concat(args));\n };\n }); // Link aliases\n\n Object.entries(aliases).forEach(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n alias = _ref5[0],\n target = _ref5[1];\n\n return comp[alias] = comp[target];\n }); // Reset all component props to their default value\n\n comp.resetProps = function () {\n props.forEach(function (prop) {\n comp[prop.name](prop.defaultVal);\n });\n return comp;\n }; //\n\n\n comp.resetProps(); // Apply all prop defaults\n\n state._rerender = digest; // Expose digest method\n\n return comp;\n };\n}\n\nexport default index;\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nvar _requestIdleCallback = function _requestIdleCallback(cb, options) {\n return setTimeout(function () {\n var start = Date.now();\n cb({\n didTimeout: false,\n timeRemaining: function timeRemaining() {\n return Math.max(0, 50 - (Date.now() - start));\n }\n });\n }, 1);\n};\n\nvar _cancelIdleCallback = function _cancelIdleCallback(id) {\n clearTimeout(id);\n};\n\nvar isSupported = canUseDOM && typeof window.requestIdleCallback !== 'undefined';\nvar requestIdleCallback = isSupported ? window.requestIdleCallback : _requestIdleCallback;\nvar cancelIdleCallback = isSupported ? window.cancelIdleCallback : _cancelIdleCallback;\nexport default requestIdleCallback;\nexport { cancelIdleCallback };","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport invariant from 'fbjs/lib/invariant';\nimport requestIdleCallback, { cancelIdleCallback } from '../../modules/requestIdleCallback';\nvar InteractionManager = {\n Events: {\n interactionStart: 'interactionStart',\n interactionComplete: 'interactionComplete'\n },\n\n /**\n * Schedule a function to run after all interactions have completed.\n */\n runAfterInteractions: function runAfterInteractions(task) {\n var handle;\n var promise = new Promise(function (resolve) {\n handle = requestIdleCallback(function () {\n if (task) {\n resolve(task());\n } else {\n resolve();\n }\n });\n });\n return {\n then: promise.then.bind(promise),\n done: promise.then.bind(promise),\n cancel: function cancel() {\n cancelIdleCallback(handle);\n }\n };\n },\n\n /**\n * Notify manager that an interaction has started.\n */\n createInteractionHandle: function createInteractionHandle() {\n return 1;\n },\n\n /**\n * Notify manager that an interaction has completed.\n */\n clearInteractionHandle: function clearInteractionHandle(handle) {\n invariant(!!handle, 'Must provide a handle to clear.');\n },\n addListener: function addListener() {}\n};\nexport default InteractionManager;","var _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}\nmodule.exports = _curry1;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport css from '../StyleSheet/css';\nimport * as forwardedProps from '../../modules/forwardedProps';\nimport pick from '../../modules/pick';\nimport useElementLayout from '../../modules/useElementLayout';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport useResponderEvents from '../../modules/useResponderEvents';\nimport StyleSheet from '../StyleSheet';\nimport TextAncestorContext from './TextAncestorContext';\n\nvar forwardPropsList = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, forwardedProps.defaultProps), forwardedProps.accessibilityProps), forwardedProps.clickProps), forwardedProps.focusProps), forwardedProps.keyboardProps), forwardedProps.mouseProps), forwardedProps.touchProps), forwardedProps.styleProps), {}, {\n href: true,\n lang: true,\n pointerEvents: true\n});\n\nvar pickProps = function pickProps(props) {\n return pick(props, forwardPropsList);\n};\n\nvar Text = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var dir = props.dir,\n hrefAttrs = props.hrefAttrs,\n numberOfLines = props.numberOfLines,\n onClick = props.onClick,\n onLayout = props.onLayout,\n onPress = props.onPress,\n onMoveShouldSetResponder = props.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = props.onMoveShouldSetResponderCapture,\n onResponderEnd = props.onResponderEnd,\n onResponderGrant = props.onResponderGrant,\n onResponderMove = props.onResponderMove,\n onResponderReject = props.onResponderReject,\n onResponderRelease = props.onResponderRelease,\n onResponderStart = props.onResponderStart,\n onResponderTerminate = props.onResponderTerminate,\n onResponderTerminationRequest = props.onResponderTerminationRequest,\n onScrollShouldSetResponder = props.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = props.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = props.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = props.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = props.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture,\n selectable = props.selectable;\n var hasTextAncestor = React.useContext(TextAncestorContext);\n var hostRef = React.useRef(null);\n var classList = [classes.text, hasTextAncestor === true && classes.textHasAncestor, numberOfLines === 1 && classes.textOneLine, numberOfLines != null && numberOfLines > 1 && classes.textMultiLine];\n var style = [props.style, numberOfLines != null && numberOfLines > 1 && {\n WebkitLineClamp: numberOfLines\n }, selectable === true && styles.selectable, selectable === false && styles.notSelectable, onPress && styles.pressable];\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder: onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture,\n onResponderEnd: onResponderEnd,\n onResponderGrant: onResponderGrant,\n onResponderMove: onResponderMove,\n onResponderReject: onResponderReject,\n onResponderRelease: onResponderRelease,\n onResponderStart: onResponderStart,\n onResponderTerminate: onResponderTerminate,\n onResponderTerminationRequest: onResponderTerminationRequest,\n onScrollShouldSetResponder: onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture: onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder: onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture: onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder: onStartShouldSetResponder,\n onStartShouldSetResponderCapture: onStartShouldSetResponderCapture\n });\n\n function handleClick(e) {\n if (onClick != null) {\n onClick(e);\n }\n\n if (onClick == null && onPress != null) {\n e.stopPropagation();\n onPress(e);\n }\n }\n\n var component = hasTextAncestor ? 'span' : 'div';\n var supportedProps = pickProps(props);\n supportedProps.classList = classList;\n supportedProps.dir = dir; // 'auto' by default allows browsers to infer writing direction (root elements only)\n\n if (!hasTextAncestor) {\n supportedProps.dir = dir != null ? dir : 'auto';\n }\n\n supportedProps.onClick = handleClick;\n supportedProps.style = style;\n\n if (props.href != null && hrefAttrs != null) {\n var download = hrefAttrs.download,\n rel = hrefAttrs.rel,\n target = hrefAttrs.target;\n\n if (download != null) {\n supportedProps.download = download;\n }\n\n if (rel != null) {\n supportedProps.rel = rel;\n }\n\n if (typeof target === 'string') {\n supportedProps.target = target.charAt(0) !== '_' ? '_' + target : target;\n }\n }\n\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n supportedProps.ref = setRef;\n var element = createElement(component, supportedProps);\n return hasTextAncestor ? element : /*#__PURE__*/React.createElement(TextAncestorContext.Provider, {\n value: true\n }, element);\n});\nText.displayName = 'Text';\nvar classes = css.create({\n text: {\n border: '0 solid black',\n boxSizing: 'border-box',\n color: 'black',\n display: 'inline',\n font: '14px System',\n margin: 0,\n padding: 0,\n whiteSpace: 'pre-wrap',\n wordWrap: 'break-word'\n },\n textHasAncestor: {\n color: 'inherit',\n font: 'inherit',\n whiteSpace: 'inherit'\n },\n textOneLine: {\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n },\n // See #13\n textMultiLine: {\n display: '-webkit-box',\n maxWidth: '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical'\n }\n});\nvar styles = StyleSheet.create({\n notSelectable: {\n userSelect: 'none'\n },\n selectable: {\n userSelect: 'text'\n },\n pressable: {\n cursor: 'pointer'\n }\n});\nexport default Text;","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport type { NavigationProp } from './types';\n\n/**\n * Context which holds the navigation prop for a screen.\n */\nconst NavigationContext = React.createContext<\n NavigationProp<ParamListBase, string, any, any> | undefined\n>(undefined);\n\nexport default NavigationContext;\n","import { makeObservable } from \"mobx\";\nimport { useState } from \"react\";\nif (!useState) {\n throw new Error(\"mobx-react-lite requires React with Hooks support\");\n}\nif (!makeObservable) {\n throw new Error(\"mobx-react-lite@3 requires mobx at least version 6 to be available\");\n}\n//# sourceMappingURL=assertEnvironment.js.map","import { configure } from \"mobx\";\nexport function defaultNoopBatch(callback) {\n callback();\n}\nexport function observerBatching(reactionScheduler) {\n if (!reactionScheduler) {\n reactionScheduler = defaultNoopBatch;\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[MobX] Failed to get unstable_batched updates from react-dom / react-native\");\n }\n }\n configure({ reactionScheduler: reactionScheduler });\n}\nexport var isObserverBatched = function () {\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[MobX] Deprecated\");\n }\n return true;\n};\n//# sourceMappingURL=observerBatching.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { useCallback, useState } from \"react\";\nvar EMPTY_ARRAY = [];\nexport function useForceUpdate() {\n var _a = __read(useState(0), 2), setTick = _a[1];\n var update = useCallback(function () {\n setTick(function (tick) { return tick + 1; });\n }, EMPTY_ARRAY);\n return update;\n}\nvar deprecatedMessages = [];\nexport function useDeprecated(msg) {\n if (!deprecatedMessages.includes(msg)) {\n deprecatedMessages.push(msg);\n console.warn(msg);\n }\n}\n//# sourceMappingURL=utils.js.map","import { getDependencyTree } from \"mobx\";\nexport function printDebugValue(v) {\n return getDependencyTree(v);\n}\n//# sourceMappingURL=printDebugValue.js.map","var FinalizationRegistryLocal = typeof FinalizationRegistry === \"undefined\" ? undefined : FinalizationRegistry;\nexport { FinalizationRegistryLocal as FinalizationRegistry };\n//# sourceMappingURL=FinalizationRegistryWrapper.js.map","export function createTrackingData(reaction) {\n var trackingData = {\n reaction: reaction,\n mounted: false,\n changedBeforeMount: false,\n cleanAt: Date.now() + CLEANUP_LEAKED_REACTIONS_AFTER_MILLIS\n };\n return trackingData;\n}\n/**\n * The minimum time before we'll clean up a Reaction created in a render\n * for a component that hasn't managed to run its effects. This needs to\n * be big enough to ensure that a component won't turn up and have its\n * effects run without being re-rendered.\n */\nexport var CLEANUP_LEAKED_REACTIONS_AFTER_MILLIS = 10000;\n/**\n * The frequency with which we'll check for leaked reactions.\n */\nexport var CLEANUP_TIMER_LOOP_MILLIS = 10000;\n//# sourceMappingURL=reactionCleanupTrackingCommon.js.map","var __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nimport { CLEANUP_TIMER_LOOP_MILLIS, createTrackingData } from \"./reactionCleanupTrackingCommon\";\n/**\n * timers, gc-style, uncommitted reaction cleanup\n */\nexport function createTimerBasedReactionCleanupTracking() {\n /**\n * Reactions created by components that have yet to be fully mounted.\n */\n var uncommittedReactionRefs = new Set();\n /**\n * Latest 'uncommitted reactions' cleanup timer handle.\n */\n var reactionCleanupHandle;\n /* istanbul ignore next */\n /**\n * Only to be used by test functions; do not export outside of mobx-react-lite\n */\n function forceCleanupTimerToRunNowForTests() {\n // This allows us to control the execution of the cleanup timer\n // to force it to run at awkward times in unit tests.\n if (reactionCleanupHandle) {\n clearTimeout(reactionCleanupHandle);\n cleanUncommittedReactions();\n }\n }\n /* istanbul ignore next */\n function resetCleanupScheduleForTests() {\n var e_1, _a;\n if (uncommittedReactionRefs.size > 0) {\n try {\n for (var uncommittedReactionRefs_1 = __values(uncommittedReactionRefs), uncommittedReactionRefs_1_1 = uncommittedReactionRefs_1.next(); !uncommittedReactionRefs_1_1.done; uncommittedReactionRefs_1_1 = uncommittedReactionRefs_1.next()) {\n var ref = uncommittedReactionRefs_1_1.value;\n var tracking = ref.current;\n if (tracking) {\n tracking.reaction.dispose();\n ref.current = null;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (uncommittedReactionRefs_1_1 && !uncommittedReactionRefs_1_1.done && (_a = uncommittedReactionRefs_1.return)) _a.call(uncommittedReactionRefs_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n uncommittedReactionRefs.clear();\n }\n if (reactionCleanupHandle) {\n clearTimeout(reactionCleanupHandle);\n reactionCleanupHandle = undefined;\n }\n }\n function ensureCleanupTimerRunning() {\n if (reactionCleanupHandle === undefined) {\n reactionCleanupHandle = setTimeout(cleanUncommittedReactions, CLEANUP_TIMER_LOOP_MILLIS);\n }\n }\n function scheduleCleanupOfReactionIfLeaked(ref) {\n uncommittedReactionRefs.add(ref);\n ensureCleanupTimerRunning();\n }\n function recordReactionAsCommitted(reactionRef) {\n uncommittedReactionRefs.delete(reactionRef);\n }\n /**\n * Run by the cleanup timer to dispose any outstanding reactions\n */\n function cleanUncommittedReactions() {\n reactionCleanupHandle = undefined;\n // Loop through all the candidate leaked reactions; those older\n // than CLEANUP_LEAKED_REACTIONS_AFTER_MILLIS get tidied.\n var now = Date.now();\n uncommittedReactionRefs.forEach(function (ref) {\n var tracking = ref.current;\n if (tracking) {\n if (now >= tracking.cleanAt) {\n // It's time to tidy up this leaked reaction.\n tracking.reaction.dispose();\n ref.current = null;\n uncommittedReactionRefs.delete(ref);\n }\n }\n });\n if (uncommittedReactionRefs.size > 0) {\n // We've just finished a round of cleanups but there are still\n // some leak candidates outstanding.\n ensureCleanupTimerRunning();\n }\n }\n return {\n addReactionToTrack: function (reactionTrackingRef, reaction, \n /**\n * On timer based implementation we don't really need this object,\n * but we keep the same api\n */\n objectRetainedByReact) {\n reactionTrackingRef.current = createTrackingData(reaction);\n scheduleCleanupOfReactionIfLeaked(reactionTrackingRef);\n return reactionTrackingRef.current;\n },\n recordReactionAsCommitted: recordReactionAsCommitted,\n forceCleanupTimerToRunNowForTests: forceCleanupTimerToRunNowForTests,\n resetCleanupScheduleForTests: resetCleanupScheduleForTests\n };\n}\n//# sourceMappingURL=createTimerBasedReactionCleanupTracking.js.map","import { FinalizationRegistry as FinalizationRegistryMaybeUndefined } from \"./FinalizationRegistryWrapper\";\nimport { createReactionCleanupTrackingUsingFinalizationRegister } from \"./createReactionCleanupTrackingUsingFinalizationRegister\";\nimport { createTimerBasedReactionCleanupTracking } from \"./createTimerBasedReactionCleanupTracking\";\nvar _a = FinalizationRegistryMaybeUndefined\n ? createReactionCleanupTrackingUsingFinalizationRegister(FinalizationRegistryMaybeUndefined)\n : createTimerBasedReactionCleanupTracking(), addReactionToTrack = _a.addReactionToTrack, recordReactionAsCommitted = _a.recordReactionAsCommitted, resetCleanupScheduleForTests = _a.resetCleanupScheduleForTests, forceCleanupTimerToRunNowForTests = _a.forceCleanupTimerToRunNowForTests;\nexport { addReactionToTrack, recordReactionAsCommitted, resetCleanupScheduleForTests, forceCleanupTimerToRunNowForTests };\n//# sourceMappingURL=reactionCleanupTracking.js.map","import { createTrackingData } from \"./reactionCleanupTrackingCommon\";\n/**\n * FinalizationRegistry-based uncommitted reaction cleanup\n */\nexport function createReactionCleanupTrackingUsingFinalizationRegister(FinalizationRegistry) {\n var cleanupTokenToReactionTrackingMap = new Map();\n var globalCleanupTokensCounter = 1;\n var registry = new FinalizationRegistry(function cleanupFunction(token) {\n var trackedReaction = cleanupTokenToReactionTrackingMap.get(token);\n if (trackedReaction) {\n trackedReaction.reaction.dispose();\n cleanupTokenToReactionTrackingMap.delete(token);\n }\n });\n return {\n addReactionToTrack: function (reactionTrackingRef, reaction, objectRetainedByReact) {\n var token = globalCleanupTokensCounter++;\n registry.register(objectRetainedByReact, token, reactionTrackingRef);\n reactionTrackingRef.current = createTrackingData(reaction);\n reactionTrackingRef.current.finalizationRegistryCleanupToken = token;\n cleanupTokenToReactionTrackingMap.set(token, reactionTrackingRef.current);\n return reactionTrackingRef.current;\n },\n recordReactionAsCommitted: function (reactionRef) {\n registry.unregister(reactionRef);\n if (reactionRef.current && reactionRef.current.finalizationRegistryCleanupToken) {\n cleanupTokenToReactionTrackingMap.delete(reactionRef.current.finalizationRegistryCleanupToken);\n }\n },\n forceCleanupTimerToRunNowForTests: function () {\n // When FinalizationRegistry in use, this this is no-op\n },\n resetCleanupScheduleForTests: function () {\n // When FinalizationRegistry in use, this this is no-op\n }\n };\n}\n//# sourceMappingURL=createReactionCleanupTrackingUsingFinalizationRegister.js.map","var globalIsUsingStaticRendering = false;\nexport function enableStaticRendering(enable) {\n globalIsUsingStaticRendering = enable;\n}\nexport function isUsingStaticRendering() {\n return globalIsUsingStaticRendering;\n}\n//# sourceMappingURL=staticRendering.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { Reaction } from \"mobx\";\nimport React from \"react\";\nimport { printDebugValue } from \"./utils/printDebugValue\";\nimport { addReactionToTrack, recordReactionAsCommitted } from \"./utils/reactionCleanupTracking\";\nimport { isUsingStaticRendering } from \"./staticRendering\";\nimport { useForceUpdate } from \"./utils/utils\";\nfunction observerComponentNameFor(baseComponentName) {\n return \"observer\" + baseComponentName;\n}\n/**\n * We use class to make it easier to detect in heap snapshots by name\n */\nvar ObjectToBeRetainedByReact = /** @class */ (function () {\n function ObjectToBeRetainedByReact() {\n }\n return ObjectToBeRetainedByReact;\n}());\nexport function useObserver(fn, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if (isUsingStaticRendering()) {\n return fn();\n }\n var _a = __read(React.useState(new ObjectToBeRetainedByReact()), 1), objectRetainedByReact = _a[0];\n var forceUpdate = useForceUpdate();\n // StrictMode/ConcurrentMode/Suspense may mean that our component is\n // rendered and abandoned multiple times, so we need to track leaked\n // Reactions.\n var reactionTrackingRef = React.useRef(null);\n if (!reactionTrackingRef.current) {\n // First render for this component (or first time since a previous\n // reaction from an abandoned render was disposed).\n var newReaction = new Reaction(observerComponentNameFor(baseComponentName), function () {\n // Observable has changed, meaning we want to re-render\n // BUT if we're a component that hasn't yet got to the useEffect()\n // stage, we might be a component that _started_ to render, but\n // got dropped, and we don't want to make state changes then.\n // (It triggers warnings in StrictMode, for a start.)\n if (trackingData_1.mounted) {\n // We have reached useEffect(), so we're mounted, and can trigger an update\n forceUpdate();\n }\n else {\n // We haven't yet reached useEffect(), so we'll need to trigger a re-render\n // when (and if) useEffect() arrives.\n trackingData_1.changedBeforeMount = true;\n }\n });\n var trackingData_1 = addReactionToTrack(reactionTrackingRef, newReaction, objectRetainedByReact);\n }\n var reaction = reactionTrackingRef.current.reaction;\n React.useDebugValue(reaction, printDebugValue);\n React.useEffect(function () {\n // Called on first mount only\n recordReactionAsCommitted(reactionTrackingRef);\n if (reactionTrackingRef.current) {\n // Great. We've already got our reaction from our render;\n // all we need to do is to record that it's now mounted,\n // to allow future observable changes to trigger re-renders\n reactionTrackingRef.current.mounted = true;\n // Got a change before first mount, force an update\n if (reactionTrackingRef.current.changedBeforeMount) {\n reactionTrackingRef.current.changedBeforeMount = false;\n forceUpdate();\n }\n }\n else {\n // The reaction we set up in our render has been disposed.\n // This can be due to bad timings of renderings, e.g. our\n // component was paused for a _very_ long time, and our\n // reaction got cleaned up\n // Re-create the reaction\n reactionTrackingRef.current = {\n reaction: new Reaction(observerComponentNameFor(baseComponentName), function () {\n // We've definitely already been mounted at this point\n forceUpdate();\n }),\n mounted: true,\n changedBeforeMount: false,\n cleanAt: Infinity\n };\n forceUpdate();\n }\n return function () {\n reactionTrackingRef.current.reaction.dispose();\n reactionTrackingRef.current = null;\n };\n }, []);\n // render the original component, but have the\n // reaction track the observables, so that rendering\n // can be invalidated (see above) once a dependency changes\n var rendering;\n var exception;\n reaction.track(function () {\n try {\n rendering = fn();\n }\n catch (e) {\n exception = e;\n }\n });\n if (exception) {\n throw exception; // re-throw any exceptions caught during rendering\n }\n return rendering;\n}\n//# sourceMappingURL=useObserver.js.map","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nimport { forwardRef, memo } from \"react\";\nimport { isUsingStaticRendering } from \"./staticRendering\";\nimport { useObserver } from \"./useObserver\";\n// n.b. base case is not used for actual typings or exported in the typing files\nexport function observer(baseComponent, options) {\n // The working of observer is explained step by step in this talk: https://www.youtube.com/watch?v=cPF4iBedoF0&feature=youtu.be&t=1307\n if (isUsingStaticRendering()) {\n return baseComponent;\n }\n var realOptions = __assign({ forwardRef: false }, options);\n var baseComponentName = baseComponent.displayName || baseComponent.name;\n var wrappedComponent = function (props, ref) {\n return useObserver(function () { return baseComponent(props, ref); }, baseComponentName);\n };\n wrappedComponent.displayName = baseComponentName;\n // memo; we are not interested in deep updates\n // in props; we assume that if deep objects are changed,\n // this is in observables, which would have been tracked anyway\n var memoComponent;\n if (realOptions.forwardRef) {\n // we have to use forwardRef here because:\n // 1. it cannot go before memo, only after it\n // 2. forwardRef converts the function into an actual component, so we can't let the baseComponent do it\n // since it wouldn't be a callable function anymore\n memoComponent = memo(forwardRef(wrappedComponent));\n }\n else {\n memoComponent = memo(wrappedComponent);\n }\n copyStaticProperties(baseComponent, memoComponent);\n memoComponent.displayName = baseComponentName;\n return memoComponent;\n}\n// based on https://github.com/mridgway/hoist-non-react-statics/blob/master/src/index.js\nvar hoistBlackList = {\n $$typeof: true,\n render: true,\n compare: true,\n type: true\n};\nfunction copyStaticProperties(base, target) {\n Object.keys(base).forEach(function (key) {\n if (!hoistBlackList[key]) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(base, key));\n }\n });\n}\n//# sourceMappingURL=observer.js.map","var __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nimport { useDeprecated } from \"./utils/utils\";\nimport { observable, runInAction } from \"mobx\";\nimport { useState } from \"react\";\nexport function useAsObservableSource(current) {\n if (\"production\" !== process.env.NODE_ENV)\n useDeprecated(\"[mobx-react-lite] 'useAsObservableSource' is deprecated, please store the values directly in an observable, for example by using 'useLocalObservable', and sync future updates using 'useEffect' when needed. See the README for examples.\");\n var _a = __read(useState(function () { return observable(current, {}, { deep: false }); }), 1), res = _a[0];\n runInAction(function () {\n Object.assign(res, current);\n });\n return res;\n}\n//# sourceMappingURL=useAsObservableSource.js.map","import \"./utils/assertEnvironment\";\nimport { unstable_batchedUpdates as batch } from \"./utils/reactBatchedUpdates\";\nimport { observerBatching } from \"./utils/observerBatching\";\nimport { useDeprecated } from \"./utils/utils\";\nimport { useObserver as useObserverOriginal } from \"./useObserver\";\nimport { enableStaticRendering } from \"./staticRendering\";\nobserverBatching(batch);\nexport { isUsingStaticRendering, enableStaticRendering } from \"./staticRendering\";\nexport { observer } from \"./observer\";\nexport { Observer } from \"./ObserverComponent\";\nexport { useLocalObservable } from \"./useLocalObservable\";\nexport { useLocalStore } from \"./useLocalStore\";\nexport { useAsObservableSource } from \"./useAsObservableSource\";\nexport { resetCleanupScheduleForTests as clearTimers } from \"./utils/reactionCleanupTracking\";\nexport function useObserver(fn, baseComponentName) {\n if (baseComponentName === void 0) { baseComponentName = \"observed\"; }\n if (\"production\" !== process.env.NODE_ENV) {\n useDeprecated(\"[mobx-react-lite] 'useObserver(fn)' is deprecated. Use `<Observer>{fn}</Observer>` instead, or wrap the entire component in `observer`.\");\n }\n return useObserverOriginal(fn, baseComponentName);\n}\nexport { isObserverBatched, observerBatching } from \"./utils/observerBatching\";\nexport function useStaticRendering(enable) {\n if (\"production\" !== process.env.NODE_ENV) {\n console.warn(\"[mobx-react-lite] 'useStaticRendering' is deprecated, use 'enableStaticRendering' instead\");\n }\n enableStaticRendering(enable);\n}\n//# sourceMappingURL=index.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport css from '../StyleSheet/css';\nimport * as forwardedProps from '../../modules/forwardedProps';\nimport pick from '../../modules/pick';\nimport useElementLayout from '../../modules/useElementLayout';\nimport useLayoutEffect from '../../modules/useLayoutEffect';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport useResponderEvents from '../../modules/useResponderEvents';\nimport StyleSheet from '../StyleSheet';\nimport TextInputState from '../../modules/TextInputState';\n/**\n * Determines whether a 'selection' prop differs from a node's existing\n * selection state.\n */\n\nvar isSelectionStale = function isSelectionStale(node, selection) {\n var selectionEnd = node.selectionEnd,\n selectionStart = node.selectionStart;\n var start = selection.start,\n end = selection.end;\n return start !== selectionStart || end !== selectionEnd;\n};\n/**\n * Certain input types do no support 'selectSelectionRange' and will throw an\n * error.\n */\n\n\nvar setSelection = function setSelection(node, selection) {\n if (isSelectionStale(node, selection)) {\n var start = selection.start,\n end = selection.end;\n\n try {\n node.setSelectionRange(start, end || start);\n } catch (e) {}\n }\n};\n\nvar forwardPropsList = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, forwardedProps.defaultProps), forwardedProps.accessibilityProps), forwardedProps.clickProps), forwardedProps.focusProps), forwardedProps.keyboardProps), forwardedProps.mouseProps), forwardedProps.touchProps), forwardedProps.styleProps), {}, {\n autoCapitalize: true,\n autoComplete: true,\n autoCorrect: true,\n autoFocus: true,\n defaultValue: true,\n disabled: true,\n lang: true,\n maxLength: true,\n onChange: true,\n onScroll: true,\n placeholder: true,\n pointerEvents: true,\n readOnly: true,\n rows: true,\n spellCheck: true,\n value: true,\n type: true\n});\n\nvar pickProps = function pickProps(props) {\n return pick(props, forwardPropsList);\n}; // If an Input Method Editor is processing key input, the 'keyCode' is 229.\n// https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode\n\n\nfunction isEventComposing(nativeEvent) {\n return nativeEvent.isComposing || nativeEvent.keyCode === 229;\n}\n\nvar TextInput = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var _props$autoCapitalize = props.autoCapitalize,\n autoCapitalize = _props$autoCapitalize === void 0 ? 'sentences' : _props$autoCapitalize,\n autoComplete = props.autoComplete,\n autoCompleteType = props.autoCompleteType,\n _props$autoCorrect = props.autoCorrect,\n autoCorrect = _props$autoCorrect === void 0 ? true : _props$autoCorrect,\n blurOnSubmit = props.blurOnSubmit,\n clearTextOnFocus = props.clearTextOnFocus,\n dir = props.dir,\n _props$editable = props.editable,\n editable = _props$editable === void 0 ? true : _props$editable,\n _props$keyboardType = props.keyboardType,\n keyboardType = _props$keyboardType === void 0 ? 'default' : _props$keyboardType,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$numberOfLines = props.numberOfLines,\n numberOfLines = _props$numberOfLines === void 0 ? 1 : _props$numberOfLines,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onChangeText = props.onChangeText,\n onContentSizeChange = props.onContentSizeChange,\n onFocus = props.onFocus,\n onKeyPress = props.onKeyPress,\n onLayout = props.onLayout,\n onMoveShouldSetResponder = props.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = props.onMoveShouldSetResponderCapture,\n onResponderEnd = props.onResponderEnd,\n onResponderGrant = props.onResponderGrant,\n onResponderMove = props.onResponderMove,\n onResponderReject = props.onResponderReject,\n onResponderRelease = props.onResponderRelease,\n onResponderStart = props.onResponderStart,\n onResponderTerminate = props.onResponderTerminate,\n onResponderTerminationRequest = props.onResponderTerminationRequest,\n onScrollShouldSetResponder = props.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = props.onScrollShouldSetResponderCapture,\n onSelectionChange = props.onSelectionChange,\n onSelectionChangeShouldSetResponder = props.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = props.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = props.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = props.onStartShouldSetResponderCapture,\n onSubmitEditing = props.onSubmitEditing,\n placeholderTextColor = props.placeholderTextColor,\n returnKeyType = props.returnKeyType,\n _props$secureTextEntr = props.secureTextEntry,\n secureTextEntry = _props$secureTextEntr === void 0 ? false : _props$secureTextEntr,\n selection = props.selection,\n selectTextOnFocus = props.selectTextOnFocus,\n spellCheck = props.spellCheck;\n var type;\n var inputMode;\n\n switch (keyboardType) {\n case 'email-address':\n type = 'email';\n break;\n\n case 'number-pad':\n case 'numeric':\n inputMode = 'numeric';\n break;\n\n case 'decimal-pad':\n inputMode = 'decimal';\n break;\n\n case 'phone-pad':\n type = 'tel';\n break;\n\n case 'search':\n case 'web-search':\n type = 'search';\n break;\n\n case 'url':\n type = 'url';\n break;\n\n default:\n type = 'text';\n }\n\n if (secureTextEntry) {\n type = 'password';\n }\n\n var dimensions = React.useRef({\n height: null,\n width: null\n });\n var hostRef = React.useRef(null);\n var handleContentSizeChange = React.useCallback(function (hostNode) {\n if (multiline && onContentSizeChange && hostNode != null) {\n var newHeight = hostNode.scrollHeight;\n var newWidth = hostNode.scrollWidth;\n\n if (newHeight !== dimensions.current.height || newWidth !== dimensions.current.width) {\n dimensions.current.height = newHeight;\n dimensions.current.width = newWidth;\n onContentSizeChange({\n nativeEvent: {\n contentSize: {\n height: dimensions.current.height,\n width: dimensions.current.width\n }\n }\n });\n }\n }\n }, [multiline, onContentSizeChange]);\n var imperativeRef = React.useMemo(function () {\n return function (hostNode) {\n // TextInput needs to add more methods to the hostNode in addition to those\n // added by `usePlatformMethods`. This is temporarily until an API like\n // `TextInput.clear(hostRef)` is added to React Native.\n if (hostNode != null) {\n hostNode.clear = function () {\n if (hostNode != null) {\n hostNode.value = '';\n }\n };\n\n hostNode.isFocused = function () {\n return hostNode != null && TextInputState.currentlyFocusedField() === hostNode;\n };\n\n handleContentSizeChange(hostNode);\n }\n };\n }, [handleContentSizeChange]);\n\n function handleBlur(e) {\n TextInputState._currentlyFocusedNode = null;\n\n if (onBlur) {\n e.nativeEvent.text = e.target.value;\n onBlur(e);\n }\n }\n\n function handleChange(e) {\n var hostNode = e.target;\n var text = hostNode.value;\n e.nativeEvent.text = text;\n handleContentSizeChange(hostNode);\n\n if (onChange) {\n onChange(e);\n }\n\n if (onChangeText) {\n onChangeText(text);\n }\n }\n\n function handleFocus(e) {\n var hostNode = e.target;\n\n if (onFocus) {\n e.nativeEvent.text = hostNode.value;\n onFocus(e);\n }\n\n if (hostNode != null) {\n TextInputState._currentlyFocusedNode = hostNode;\n\n if (clearTextOnFocus) {\n hostNode.value = '';\n }\n\n if (selectTextOnFocus) {\n // Safari requires selection to occur in a setTimeout\n setTimeout(function () {\n hostNode.select();\n }, 0);\n }\n }\n }\n\n function handleKeyDown(e) {\n var hostNode = e.target; // Prevent key events bubbling (see #612)\n\n e.stopPropagation();\n var blurOnSubmitDefault = !multiline;\n var shouldBlurOnSubmit = blurOnSubmit == null ? blurOnSubmitDefault : blurOnSubmit;\n var nativeEvent = e.nativeEvent;\n var isComposing = isEventComposing(nativeEvent);\n\n if (onKeyPress) {\n onKeyPress(e);\n }\n\n if (e.key === 'Enter' && !e.shiftKey && // Do not call submit if composition is occuring.\n !isComposing && !e.isDefaultPrevented()) {\n if ((blurOnSubmit || !multiline) && onSubmitEditing) {\n // prevent \"Enter\" from inserting a newline or submitting a form\n e.preventDefault();\n nativeEvent.text = e.target.value;\n onSubmitEditing(e);\n }\n\n if (shouldBlurOnSubmit && hostNode != null) {\n hostNode.blur();\n }\n }\n }\n\n function handleSelectionChange(e) {\n if (onSelectionChange) {\n try {\n var node = e.target;\n var selectionStart = node.selectionStart,\n selectionEnd = node.selectionEnd;\n e.nativeEvent.selection = {\n start: selectionStart,\n end: selectionEnd\n };\n e.nativeEvent.text = e.target.value;\n onSelectionChange(e);\n } catch (e) {}\n }\n }\n\n useLayoutEffect(function () {\n var node = hostRef.current;\n\n if (node != null && selection != null) {\n setSelection(node, selection);\n }\n\n if (document.activeElement === node) {\n TextInputState._currentlyFocusedNode = node;\n }\n }, [hostRef, selection]);\n var component = multiline ? 'textarea' : 'input';\n var classList = [classes.textinput];\n var style = StyleSheet.compose(props.style, placeholderTextColor && {\n placeholderTextColor: placeholderTextColor\n });\n useElementLayout(hostRef, onLayout);\n useResponderEvents(hostRef, {\n onMoveShouldSetResponder: onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture: onMoveShouldSetResponderCapture,\n onResponderEnd: onResponderEnd,\n onResponderGrant: onResponderGrant,\n onResponderMove: onResponderMove,\n onResponderReject: onResponderReject,\n onResponderRelease: onResponderRelease,\n onResponderStart: onResponderStart,\n onResponderTerminate: onResponderTerminate,\n onResponderTerminationRequest: onResponderTerminationRequest,\n onScrollShouldSetResponder: onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture: onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder: onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture: onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder: onStartShouldSetResponder,\n onStartShouldSetResponderCapture: onStartShouldSetResponderCapture\n });\n var supportedProps = pickProps(props);\n supportedProps.autoCapitalize = autoCapitalize;\n supportedProps.autoComplete = autoComplete || autoCompleteType || 'on';\n supportedProps.autoCorrect = autoCorrect ? 'on' : 'off';\n supportedProps.classList = classList; // 'auto' by default allows browsers to infer writing direction\n\n supportedProps.dir = dir !== undefined ? dir : 'auto';\n supportedProps.enterKeyHint = returnKeyType;\n supportedProps.onBlur = handleBlur;\n supportedProps.onChange = handleChange;\n supportedProps.onFocus = handleFocus;\n supportedProps.onKeyDown = handleKeyDown;\n supportedProps.onSelect = handleSelectionChange;\n supportedProps.readOnly = !editable;\n supportedProps.rows = multiline ? numberOfLines : undefined;\n supportedProps.spellCheck = spellCheck != null ? spellCheck : autoCorrect;\n supportedProps.style = style;\n supportedProps.type = multiline ? undefined : type;\n supportedProps.inputMode = inputMode;\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, imperativeRef, forwardedRef);\n supportedProps.ref = setRef;\n return createElement(component, supportedProps);\n});\nTextInput.displayName = 'TextInput'; // $FlowFixMe\n\nTextInput.State = TextInputState;\nvar classes = css.create({\n textinput: {\n MozAppearance: 'textfield',\n WebkitAppearance: 'none',\n backgroundColor: 'transparent',\n border: '0 solid black',\n borderRadius: 0,\n boxSizing: 'border-box',\n font: '14px System',\n margin: 0,\n padding: 0,\n resize: 'none'\n }\n});\nexport default TextInput;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UIManager from '../../exports/UIManager';\n/**\n * This class is responsible for coordinating the \"focused\"\n * state for TextInputs. All calls relating to the keyboard\n * should be funneled through here\n */\n\nvar TextInputState = {\n /**\n * Internal state\n */\n _currentlyFocusedNode: null,\n\n /**\n * Returns the ID of the currently focused text field, if one exists\n * If no text field is focused it returns null\n */\n currentlyFocusedField: function currentlyFocusedField() {\n if (document.activeElement !== this._currentlyFocusedNode) {\n this._currentlyFocusedNode = null;\n }\n\n return this._currentlyFocusedNode;\n },\n\n /**\n * @param {Object} TextInputID id of the text field to focus\n * Focuses the specified text field\n * noop if the text field was already focused\n */\n focusTextInput: function focusTextInput(textFieldNode) {\n if (textFieldNode !== null) {\n this._currentlyFocusedNode = textFieldNode;\n\n if (document.activeElement !== textFieldNode) {\n UIManager.focus(textFieldNode);\n }\n }\n },\n\n /**\n * @param {Object} textFieldNode id of the text field to focus\n * Unfocuses the specified text field\n * noop if it wasn't focused\n */\n blurTextInput: function blurTextInput(textFieldNode) {\n if (textFieldNode !== null) {\n this._currentlyFocusedNode = null;\n\n if (document.activeElement === textFieldNode) {\n UIManager.blur(textFieldNode);\n }\n }\n }\n};\nexport default TextInputState;","export default function(x) {\n return function() {\n return x;\n };\n}\n","/**\n * The Ease class provides a collection of easing functions for use with tween.js.\n */\nvar Easing = {\n Linear: {\n None: function (amount) {\n return amount;\n },\n },\n Quadratic: {\n In: function (amount) {\n return amount * amount;\n },\n Out: function (amount) {\n return amount * (2 - amount);\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount;\n }\n return -0.5 * (--amount * (amount - 2) - 1);\n },\n },\n Cubic: {\n In: function (amount) {\n return amount * amount * amount;\n },\n Out: function (amount) {\n return --amount * amount * amount + 1;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount;\n }\n return 0.5 * ((amount -= 2) * amount * amount + 2);\n },\n },\n Quartic: {\n In: function (amount) {\n return amount * amount * amount * amount;\n },\n Out: function (amount) {\n return 1 - --amount * amount * amount * amount;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount * amount;\n }\n return -0.5 * ((amount -= 2) * amount * amount * amount - 2);\n },\n },\n Quintic: {\n In: function (amount) {\n return amount * amount * amount * amount * amount;\n },\n Out: function (amount) {\n return --amount * amount * amount * amount * amount + 1;\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return 0.5 * amount * amount * amount * amount * amount;\n }\n return 0.5 * ((amount -= 2) * amount * amount * amount * amount + 2);\n },\n },\n Sinusoidal: {\n In: function (amount) {\n return 1 - Math.cos((amount * Math.PI) / 2);\n },\n Out: function (amount) {\n return Math.sin((amount * Math.PI) / 2);\n },\n InOut: function (amount) {\n return 0.5 * (1 - Math.cos(Math.PI * amount));\n },\n },\n Exponential: {\n In: function (amount) {\n return amount === 0 ? 0 : Math.pow(1024, amount - 1);\n },\n Out: function (amount) {\n return amount === 1 ? 1 : 1 - Math.pow(2, -10 * amount);\n },\n InOut: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n if ((amount *= 2) < 1) {\n return 0.5 * Math.pow(1024, amount - 1);\n }\n return 0.5 * (-Math.pow(2, -10 * (amount - 1)) + 2);\n },\n },\n Circular: {\n In: function (amount) {\n return 1 - Math.sqrt(1 - amount * amount);\n },\n Out: function (amount) {\n return Math.sqrt(1 - --amount * amount);\n },\n InOut: function (amount) {\n if ((amount *= 2) < 1) {\n return -0.5 * (Math.sqrt(1 - amount * amount) - 1);\n }\n return 0.5 * (Math.sqrt(1 - (amount -= 2) * amount) + 1);\n },\n },\n Elastic: {\n In: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n return -Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);\n },\n Out: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n return Math.pow(2, -10 * amount) * Math.sin((amount - 0.1) * 5 * Math.PI) + 1;\n },\n InOut: function (amount) {\n if (amount === 0) {\n return 0;\n }\n if (amount === 1) {\n return 1;\n }\n amount *= 2;\n if (amount < 1) {\n return -0.5 * Math.pow(2, 10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI);\n }\n return 0.5 * Math.pow(2, -10 * (amount - 1)) * Math.sin((amount - 1.1) * 5 * Math.PI) + 1;\n },\n },\n Back: {\n In: function (amount) {\n var s = 1.70158;\n return amount * amount * ((s + 1) * amount - s);\n },\n Out: function (amount) {\n var s = 1.70158;\n return --amount * amount * ((s + 1) * amount + s) + 1;\n },\n InOut: function (amount) {\n var s = 1.70158 * 1.525;\n if ((amount *= 2) < 1) {\n return 0.5 * (amount * amount * ((s + 1) * amount - s));\n }\n return 0.5 * ((amount -= 2) * amount * ((s + 1) * amount + s) + 2);\n },\n },\n Bounce: {\n In: function (amount) {\n return 1 - Easing.Bounce.Out(1 - amount);\n },\n Out: function (amount) {\n if (amount < 1 / 2.75) {\n return 7.5625 * amount * amount;\n }\n else if (amount < 2 / 2.75) {\n return 7.5625 * (amount -= 1.5 / 2.75) * amount + 0.75;\n }\n else if (amount < 2.5 / 2.75) {\n return 7.5625 * (amount -= 2.25 / 2.75) * amount + 0.9375;\n }\n else {\n return 7.5625 * (amount -= 2.625 / 2.75) * amount + 0.984375;\n }\n },\n InOut: function (amount) {\n if (amount < 0.5) {\n return Easing.Bounce.In(amount * 2) * 0.5;\n }\n return Easing.Bounce.Out(amount * 2 - 1) * 0.5 + 0.5;\n },\n },\n};\n\nvar now;\n// Include a performance.now polyfill.\n// In node.js, use process.hrtime.\n// eslint-disable-next-line\n// @ts-ignore\nif (typeof self === 'undefined' && typeof process !== 'undefined' && process.hrtime) {\n now = function () {\n // eslint-disable-next-line\n // @ts-ignore\n var time = process.hrtime();\n // Convert [seconds, nanoseconds] to milliseconds.\n return time[0] * 1000 + time[1] / 1000000;\n };\n}\n// In a browser, use self.performance.now if it is available.\nelse if (typeof self !== 'undefined' && self.performance !== undefined && self.performance.now !== undefined) {\n // This must be bound, because directly assigning this function\n // leads to an invocation exception in Chrome.\n now = self.performance.now.bind(self.performance);\n}\n// Use Date.now if it is available.\nelse if (Date.now !== undefined) {\n now = Date.now;\n}\n// Otherwise, use 'new Date().getTime()'.\nelse {\n now = function () {\n return new Date().getTime();\n };\n}\nvar now$1 = now;\n\n/**\n * Controlling groups of tweens\n *\n * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.\n * In these cases, you may want to create your own smaller groups of tween\n */\nvar Group = /** @class */ (function () {\n function Group() {\n this._tweens = {};\n this._tweensAddedDuringUpdate = {};\n }\n Group.prototype.getAll = function () {\n var _this = this;\n return Object.keys(this._tweens).map(function (tweenId) {\n return _this._tweens[tweenId];\n });\n };\n Group.prototype.removeAll = function () {\n this._tweens = {};\n };\n Group.prototype.add = function (tween) {\n this._tweens[tween.getId()] = tween;\n this._tweensAddedDuringUpdate[tween.getId()] = tween;\n };\n Group.prototype.remove = function (tween) {\n delete this._tweens[tween.getId()];\n delete this._tweensAddedDuringUpdate[tween.getId()];\n };\n Group.prototype.update = function (time, preserve) {\n if (time === void 0) { time = now$1(); }\n if (preserve === void 0) { preserve = false; }\n var tweenIds = Object.keys(this._tweens);\n if (tweenIds.length === 0) {\n return false;\n }\n // Tweens are updated in \"batches\". If you add a new tween during an\n // update, then the new tween will be updated in the next batch.\n // If you remove a tween during an update, it may or may not be updated.\n // However, if the removed tween was added during the current batch,\n // then it will not be updated.\n while (tweenIds.length > 0) {\n this._tweensAddedDuringUpdate = {};\n for (var i = 0; i < tweenIds.length; i++) {\n var tween = this._tweens[tweenIds[i]];\n var autoStart = !preserve;\n if (tween && tween.update(time, autoStart) === false && !preserve) {\n delete this._tweens[tweenIds[i]];\n }\n }\n tweenIds = Object.keys(this._tweensAddedDuringUpdate);\n }\n return true;\n };\n return Group;\n}());\n\n/**\n *\n */\nvar Interpolation = {\n Linear: function (v, k) {\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n var fn = Interpolation.Utils.Linear;\n if (k < 0) {\n return fn(v[0], v[1], f);\n }\n if (k > 1) {\n return fn(v[m], v[m - 1], m - f);\n }\n return fn(v[i], v[i + 1 > m ? m : i + 1], f - i);\n },\n Bezier: function (v, k) {\n var b = 0;\n var n = v.length - 1;\n var pw = Math.pow;\n var bn = Interpolation.Utils.Bernstein;\n for (var i = 0; i <= n; i++) {\n b += pw(1 - k, n - i) * pw(k, i) * v[i] * bn(n, i);\n }\n return b;\n },\n CatmullRom: function (v, k) {\n var m = v.length - 1;\n var f = m * k;\n var i = Math.floor(f);\n var fn = Interpolation.Utils.CatmullRom;\n if (v[0] === v[m]) {\n if (k < 0) {\n i = Math.floor((f = m * (1 + k)));\n }\n return fn(v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m], f - i);\n }\n else {\n if (k < 0) {\n return v[0] - (fn(v[0], v[0], v[1], v[1], -f) - v[0]);\n }\n if (k > 1) {\n return v[m] - (fn(v[m], v[m], v[m - 1], v[m - 1], f - m) - v[m]);\n }\n return fn(v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2], f - i);\n }\n },\n Utils: {\n Linear: function (p0, p1, t) {\n return (p1 - p0) * t + p0;\n },\n Bernstein: function (n, i) {\n var fc = Interpolation.Utils.Factorial;\n return fc(n) / fc(i) / fc(n - i);\n },\n Factorial: (function () {\n var a = [1];\n return function (n) {\n var s = 1;\n if (a[n]) {\n return a[n];\n }\n for (var i = n; i > 1; i--) {\n s *= i;\n }\n a[n] = s;\n return s;\n };\n })(),\n CatmullRom: function (p0, p1, p2, p3, t) {\n var v0 = (p2 - p0) * 0.5;\n var v1 = (p3 - p1) * 0.5;\n var t2 = t * t;\n var t3 = t * t2;\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n },\n },\n};\n\n/**\n * Utils\n */\nvar Sequence = /** @class */ (function () {\n function Sequence() {\n }\n Sequence.nextId = function () {\n return Sequence._nextId++;\n };\n Sequence._nextId = 0;\n return Sequence;\n}());\n\nvar mainGroup = new Group();\n\n/**\n * Tween.js - Licensed under the MIT license\n * https://github.com/tweenjs/tween.js\n * ----------------------------------------------\n *\n * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.\n * Thank you all, you're awesome!\n */\nvar Tween = /** @class */ (function () {\n function Tween(_object, _group) {\n if (_group === void 0) { _group = mainGroup; }\n this._object = _object;\n this._group = _group;\n this._isPaused = false;\n this._pauseStart = 0;\n this._valuesStart = {};\n this._valuesEnd = {};\n this._valuesStartRepeat = {};\n this._duration = 1000;\n this._initialRepeat = 0;\n this._repeat = 0;\n this._yoyo = false;\n this._isPlaying = false;\n this._reversed = false;\n this._delayTime = 0;\n this._startTime = 0;\n this._easingFunction = Easing.Linear.None;\n this._interpolationFunction = Interpolation.Linear;\n this._chainedTweens = [];\n this._onStartCallbackFired = false;\n this._id = Sequence.nextId();\n this._isChainStopped = false;\n this._goToEnd = false;\n }\n Tween.prototype.getId = function () {\n return this._id;\n };\n Tween.prototype.isPlaying = function () {\n return this._isPlaying;\n };\n Tween.prototype.isPaused = function () {\n return this._isPaused;\n };\n Tween.prototype.to = function (properties, duration) {\n // TODO? restore this, then update the 07_dynamic_to example to set fox\n // tween's to on each update. That way the behavior is opt-in (there's\n // currently no opt-out).\n // for (const prop in properties) this._valuesEnd[prop] = properties[prop]\n this._valuesEnd = Object.create(properties);\n if (duration !== undefined) {\n this._duration = duration;\n }\n return this;\n };\n Tween.prototype.duration = function (d) {\n this._duration = d;\n return this;\n };\n Tween.prototype.start = function (time) {\n if (this._isPlaying) {\n return this;\n }\n // eslint-disable-next-line\n this._group && this._group.add(this);\n this._repeat = this._initialRepeat;\n if (this._reversed) {\n // If we were reversed (f.e. using the yoyo feature) then we need to\n // flip the tween direction back to forward.\n this._reversed = false;\n for (var property in this._valuesStartRepeat) {\n this._swapEndStartRepeatValues(property);\n this._valuesStart[property] = this._valuesStartRepeat[property];\n }\n }\n this._isPlaying = true;\n this._isPaused = false;\n this._onStartCallbackFired = false;\n this._isChainStopped = false;\n this._startTime = time !== undefined ? (typeof time === 'string' ? now$1() + parseFloat(time) : time) : now$1();\n this._startTime += this._delayTime;\n this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat);\n return this;\n };\n Tween.prototype._setupProperties = function (_object, _valuesStart, _valuesEnd, _valuesStartRepeat) {\n for (var property in _valuesEnd) {\n var startValue = _object[property];\n var startValueIsArray = Array.isArray(startValue);\n var propType = startValueIsArray ? 'array' : typeof startValue;\n var isInterpolationList = !startValueIsArray && Array.isArray(_valuesEnd[property]);\n // If `to()` specifies a property that doesn't exist in the source object,\n // we should not set that property in the object\n if (propType === 'undefined' || propType === 'function') {\n continue;\n }\n // Check if an Array was provided as property value\n if (isInterpolationList) {\n var endValues = _valuesEnd[property];\n if (endValues.length === 0) {\n continue;\n }\n // handle an array of relative values\n endValues = endValues.map(this._handleRelativeValue.bind(this, startValue));\n // Create a local copy of the Array with the start value at the front\n _valuesEnd[property] = [startValue].concat(endValues);\n }\n // handle the deepness of the values\n if ((propType === 'object' || startValueIsArray) && startValue && !isInterpolationList) {\n _valuesStart[property] = startValueIsArray ? [] : {};\n // eslint-disable-next-line\n for (var prop in startValue) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _valuesStart[property][prop] = startValue[prop];\n }\n _valuesStartRepeat[property] = startValueIsArray ? [] : {}; // TODO? repeat nested values? And yoyo? And array values?\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n this._setupProperties(startValue, _valuesStart[property], _valuesEnd[property], _valuesStartRepeat[property]);\n }\n else {\n // Save the starting value, but only once.\n if (typeof _valuesStart[property] === 'undefined') {\n _valuesStart[property] = startValue;\n }\n if (!startValueIsArray) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _valuesStart[property] *= 1.0; // Ensures we're using numbers, not strings\n }\n if (isInterpolationList) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _valuesStartRepeat[property] = _valuesEnd[property].slice().reverse();\n }\n else {\n _valuesStartRepeat[property] = _valuesStart[property] || 0;\n }\n }\n }\n };\n Tween.prototype.stop = function () {\n if (!this._isChainStopped) {\n this._isChainStopped = true;\n this.stopChainedTweens();\n }\n if (!this._isPlaying) {\n return this;\n }\n // eslint-disable-next-line\n this._group && this._group.remove(this);\n this._isPlaying = false;\n this._isPaused = false;\n if (this._onStopCallback) {\n this._onStopCallback(this._object);\n }\n return this;\n };\n Tween.prototype.end = function () {\n this._goToEnd = true;\n this.update(Infinity);\n return this;\n };\n Tween.prototype.pause = function (time) {\n if (time === void 0) { time = now$1(); }\n if (this._isPaused || !this._isPlaying) {\n return this;\n }\n this._isPaused = true;\n this._pauseStart = time;\n // eslint-disable-next-line\n this._group && this._group.remove(this);\n return this;\n };\n Tween.prototype.resume = function (time) {\n if (time === void 0) { time = now$1(); }\n if (!this._isPaused || !this._isPlaying) {\n return this;\n }\n this._isPaused = false;\n this._startTime += time - this._pauseStart;\n this._pauseStart = 0;\n // eslint-disable-next-line\n this._group && this._group.add(this);\n return this;\n };\n Tween.prototype.stopChainedTweens = function () {\n for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {\n this._chainedTweens[i].stop();\n }\n return this;\n };\n Tween.prototype.group = function (group) {\n this._group = group;\n return this;\n };\n Tween.prototype.delay = function (amount) {\n this._delayTime = amount;\n return this;\n };\n Tween.prototype.repeat = function (times) {\n this._initialRepeat = times;\n this._repeat = times;\n return this;\n };\n Tween.prototype.repeatDelay = function (amount) {\n this._repeatDelayTime = amount;\n return this;\n };\n Tween.prototype.yoyo = function (yoyo) {\n this._yoyo = yoyo;\n return this;\n };\n Tween.prototype.easing = function (easingFunction) {\n this._easingFunction = easingFunction;\n return this;\n };\n Tween.prototype.interpolation = function (interpolationFunction) {\n this._interpolationFunction = interpolationFunction;\n return this;\n };\n Tween.prototype.chain = function () {\n var tweens = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n tweens[_i] = arguments[_i];\n }\n this._chainedTweens = tweens;\n return this;\n };\n Tween.prototype.onStart = function (callback) {\n this._onStartCallback = callback;\n return this;\n };\n Tween.prototype.onUpdate = function (callback) {\n this._onUpdateCallback = callback;\n return this;\n };\n Tween.prototype.onRepeat = function (callback) {\n this._onRepeatCallback = callback;\n return this;\n };\n Tween.prototype.onComplete = function (callback) {\n this._onCompleteCallback = callback;\n return this;\n };\n Tween.prototype.onStop = function (callback) {\n this._onStopCallback = callback;\n return this;\n };\n /**\n * @returns true if the tween is still playing after the update, false\n * otherwise (calling update on a paused tween still returns true because\n * it is still playing, just paused).\n */\n Tween.prototype.update = function (time, autoStart) {\n if (time === void 0) { time = now$1(); }\n if (autoStart === void 0) { autoStart = true; }\n if (this._isPaused)\n return true;\n var property;\n var elapsed;\n var endTime = this._startTime + this._duration;\n if (!this._goToEnd && !this._isPlaying) {\n if (time > endTime)\n return false;\n if (autoStart)\n this.start(time);\n }\n this._goToEnd = false;\n if (time < this._startTime) {\n return true;\n }\n if (this._onStartCallbackFired === false) {\n if (this._onStartCallback) {\n this._onStartCallback(this._object);\n }\n this._onStartCallbackFired = true;\n }\n elapsed = (time - this._startTime) / this._duration;\n elapsed = this._duration === 0 || elapsed > 1 ? 1 : elapsed;\n var value = this._easingFunction(elapsed);\n // properties transformations\n this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value);\n if (this._onUpdateCallback) {\n this._onUpdateCallback(this._object, elapsed);\n }\n if (elapsed === 1) {\n if (this._repeat > 0) {\n if (isFinite(this._repeat)) {\n this._repeat--;\n }\n // Reassign starting values, restart by making startTime = now\n for (property in this._valuesStartRepeat) {\n if (!this._yoyo && typeof this._valuesEnd[property] === 'string') {\n this._valuesStartRepeat[property] =\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n this._valuesStartRepeat[property] + parseFloat(this._valuesEnd[property]);\n }\n if (this._yoyo) {\n this._swapEndStartRepeatValues(property);\n }\n this._valuesStart[property] = this._valuesStartRepeat[property];\n }\n if (this._yoyo) {\n this._reversed = !this._reversed;\n }\n if (this._repeatDelayTime !== undefined) {\n this._startTime = time + this._repeatDelayTime;\n }\n else {\n this._startTime = time + this._delayTime;\n }\n if (this._onRepeatCallback) {\n this._onRepeatCallback(this._object);\n }\n return true;\n }\n else {\n if (this._onCompleteCallback) {\n this._onCompleteCallback(this._object);\n }\n for (var i = 0, numChainedTweens = this._chainedTweens.length; i < numChainedTweens; i++) {\n // Make the chained tweens start exactly at the time they should,\n // even if the `update()` method was called way past the duration of the tween\n this._chainedTweens[i].start(this._startTime + this._duration);\n }\n this._isPlaying = false;\n return false;\n }\n }\n return true;\n };\n Tween.prototype._updateProperties = function (_object, _valuesStart, _valuesEnd, value) {\n for (var property in _valuesEnd) {\n // Don't update properties that do not exist in the source object\n if (_valuesStart[property] === undefined) {\n continue;\n }\n var start = _valuesStart[property] || 0;\n var end = _valuesEnd[property];\n var startIsArray = Array.isArray(_object[property]);\n var endIsArray = Array.isArray(end);\n var isInterpolationList = !startIsArray && endIsArray;\n if (isInterpolationList) {\n _object[property] = this._interpolationFunction(end, value);\n }\n else if (typeof end === 'object' && end) {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n this._updateProperties(_object[property], start, end, value);\n }\n else {\n // Parses relative end values with start as base (e.g.: +10, -3)\n end = this._handleRelativeValue(start, end);\n // Protect against non numeric properties.\n if (typeof end === 'number') {\n // eslint-disable-next-line\n // @ts-ignore FIXME?\n _object[property] = start + (end - start) * value;\n }\n }\n }\n };\n Tween.prototype._handleRelativeValue = function (start, end) {\n if (typeof end !== 'string') {\n return end;\n }\n if (end.charAt(0) === '+' || end.charAt(0) === '-') {\n return start + parseFloat(end);\n }\n else {\n return parseFloat(end);\n }\n };\n Tween.prototype._swapEndStartRepeatValues = function (property) {\n var tmp = this._valuesStartRepeat[property];\n var endValue = this._valuesEnd[property];\n if (typeof endValue === 'string') {\n this._valuesStartRepeat[property] = this._valuesStartRepeat[property] + parseFloat(endValue);\n }\n else {\n this._valuesStartRepeat[property] = this._valuesEnd[property];\n }\n this._valuesEnd[property] = tmp;\n };\n return Tween;\n}());\n\nvar VERSION = '18.6.4';\n\n/**\n * Tween.js - Licensed under the MIT license\n * https://github.com/tweenjs/tween.js\n * ----------------------------------------------\n *\n * See https://github.com/tweenjs/tween.js/graphs/contributors for the full list of contributors.\n * Thank you all, you're awesome!\n */\nvar nextId = Sequence.nextId;\n/**\n * Controlling groups of tweens\n *\n * Using the TWEEN singleton to manage your tweens can cause issues in large apps with many components.\n * In these cases, you may want to create your own smaller groups of tweens.\n */\nvar TWEEN = mainGroup;\n// This is the best way to export things in a way that's compatible with both ES\n// Modules and CommonJS, without build hacks, and so as not to break the\n// existing API.\n// https://github.com/rollup/rollup/issues/1961#issuecomment-423037881\nvar getAll = TWEEN.getAll.bind(TWEEN);\nvar removeAll = TWEEN.removeAll.bind(TWEEN);\nvar add = TWEEN.add.bind(TWEEN);\nvar remove = TWEEN.remove.bind(TWEEN);\nvar update = TWEEN.update.bind(TWEEN);\nvar exports = {\n Easing: Easing,\n Group: Group,\n Interpolation: Interpolation,\n now: now$1,\n Sequence: Sequence,\n nextId: nextId,\n Tween: Tween,\n VERSION: VERSION,\n getAll: getAll,\n removeAll: removeAll,\n add: add,\n remove: remove,\n update: update,\n};\n\nexport default exports;\nexport { Easing, Group, Interpolation, Sequence, Tween, VERSION, add, getAll, nextId, now$1 as now, remove, removeAll, update };\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport styleResolver from './styleResolver';\n/**\n * A simple (and dangerous) CSS system.\n * The order of CSS rule insertion is not guaranteed.\n * Avoiding combining 2 or more classes that modify the same property.\n */\n\nvar css = {\n /**\n * const classes = css.create({ base: {}, extra: {} })\n */\n create: function create(rules, group) {\n return styleResolver.createCSS(rules, group);\n }\n};\nexport default css;","function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport View from '../../exports/View';\nimport React from 'react';\n/**\n * Common implementation for a simple stubbed view.\n */\n\nvar UnimplementedView = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(UnimplementedView, _React$Component);\n\n function UnimplementedView() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = UnimplementedView.prototype;\n\n _proto.setNativeProps = function setNativeProps() {// Do nothing.\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(View, {\n style: [unimplementedViewStyles, this.props.style]\n }, this.props.children);\n };\n\n return UnimplementedView;\n}(React.Component);\n\nvar unimplementedViewStyles = process.env.NODE_ENV !== 'production' ? {\n alignSelf: 'flex-start',\n borderColor: 'red',\n borderWidth: 1\n} : {};\nexport default UnimplementedView;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\nimport merge from 'deep-assign';\n\nconst mergeLocalStorageItem = (key, value) => {\n const oldValue = window.localStorage.getItem(key);\n const oldObject = JSON.parse(oldValue);\n const newObject = JSON.parse(value);\n const nextValue = JSON.stringify(merge({}, oldObject, newObject));\n window.localStorage.setItem(key, nextValue);\n};\n\nconst createPromise = (getValue, callback): Promise<*> => {\n return new Promise((resolve, reject) => {\n try {\n const value = getValue();\n if (callback) {\n callback(null, value);\n }\n resolve(value);\n } catch (err) {\n if (callback) {\n callback(err);\n }\n reject(err);\n }\n });\n};\n\nconst createPromiseAll = (promises, callback, processResult): Promise<*> => {\n return Promise.all(promises).then(\n result => {\n const value = processResult ? processResult(result) : null;\n callback && callback(null, value);\n return Promise.resolve(value);\n },\n errors => {\n callback && callback(errors);\n return Promise.reject(errors);\n }\n );\n};\n\nexport default class AsyncStorage {\n\n /**\n * Fetches `key` value.\n */\n static getItem(key: string, callback?: Function): Promise<*> {\n return createPromise(() => {\n return window.localStorage.getItem(key);\n }, callback);\n }\n\n /**\n * Sets `value` for `key`.\n */\n static setItem(key: string, value: string, callback?: Function): Promise<*> {\n return createPromise(() => {\n window.localStorage.setItem(key, value);\n }, callback);\n }\n\n /**\n * Removes a `key`\n */\n static removeItem(key: string, callback?: Function): Promise<*> {\n return createPromise(() => {\n return window.localStorage.removeItem(key);\n }, callback);\n }\n\n /**\n * Merges existing value with input value, assuming they are stringified JSON.\n */\n static mergeItem(key: string, value: string, callback?: Function): Promise<*> {\n return createPromise(() => {\n mergeLocalStorageItem(key, value);\n }, callback);\n }\n\n /**\n * Erases *all* AsyncStorage for the domain.\n */\n static clear(callback?: Function): Promise<*> {\n return createPromise(() => {\n window.localStorage.clear();\n }, callback);\n }\n\n /**\n * Gets *all* keys known to the app, for all callers, libraries, etc.\n */\n static getAllKeys(callback?: Function): Promise<*> {\n return createPromise(() => {\n const numberOfKeys = window.localStorage.length;\n const keys = [];\n for (let i = 0; i < numberOfKeys; i += 1) {\n const key = window.localStorage.key(i);\n keys.push(key);\n }\n return keys;\n }, callback);\n }\n\n /**\n * (stub) Flushes any pending requests using a single batch call to get the data.\n */\n static flushGetRequests() {}\n\n /**\n * multiGet resolves to an array of key-value pair arrays that matches the\n * input format of multiSet.\n *\n * multiGet(['k1', 'k2']) -> [['k1', 'val1'], ['k2', 'val2']]\n */\n static multiGet(keys: Array<string>, callback?: Function): Promise<*> {\n const promises = keys.map(key => AsyncStorage.getItem(key));\n const processResult = result => result.map((value, i) => [keys[i], value]);\n return createPromiseAll(promises, callback, processResult);\n }\n\n /**\n * Takes an array of key-value array pairs.\n * multiSet([['k1', 'val1'], ['k2', 'val2']])\n */\n static multiSet(keyValuePairs: Array<Array<string>>, callback?: Function): Promise<*> {\n const promises = keyValuePairs.map(item => AsyncStorage.setItem(item[0], item[1]));\n return createPromiseAll(promises, callback);\n }\n\n /**\n * Delete all the keys in the `keys` array.\n */\n static multiRemove(keys: Array<string>, callback?: Function): Promise<*> {\n const promises = keys.map(key => AsyncStorage.removeItem(key));\n return createPromiseAll(promises, callback);\n }\n\n /**\n * Takes an array of key-value array pairs and merges them with existing\n * values, assuming they are stringified JSON.\n *\n * multiMerge([['k1', 'val1'], ['k2', 'val2']])\n */\n static multiMerge(keyValuePairs: Array<Array<string>>, callback?: Function): Promise<*> {\n const promises = keyValuePairs.map(item => AsyncStorage.mergeItem(item[0], item[1]));\n return createPromiseAll(promises, callback);\n }\n}\n","/**\n * @format\n * @flow\n */\n\nimport AsyncStorage from './AsyncStorage';\n\nexport default AsyncStorage;\nexport {useAsyncStorage} from './hooks';\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * useLayoutEffect throws an error on the server. On the few occasions where is\n * problematic, use this hook.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport { useEffect, useLayoutEffect } from 'react';\nvar useLayoutEffectImpl = canUseDOM ? useLayoutEffect : useEffect;\nexport default useLayoutEffectImpl;","import * as React from 'react';\nimport type { NavigationState, PartialState } from '@react-navigation/routers';\n\nconst MISSING_CONTEXT_ERROR =\n \"Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.\";\n\nexport default React.createContext<{\n isDefault?: true;\n state?: NavigationState | PartialState<NavigationState>;\n getKey: () => string | undefined;\n setKey: (key: string) => void;\n getState: () => NavigationState | PartialState<NavigationState> | undefined;\n setState: (\n state: NavigationState | PartialState<NavigationState> | undefined\n ) => void;\n getIsInitial: () => boolean;\n addOptionsGetter?: (\n key: string,\n getter: () => object | undefined | null\n ) => void;\n}>({\n isDefault: true,\n\n get getKey(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get setKey(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get getState(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get setState(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n get getIsInitial(): any {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n});\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport _EventSubscription from './_EventSubscription';\n\n/**\n * EmitterSubscription represents a subscription with listener and context data.\n */\nvar EmitterSubscription = /*#__PURE__*/function (_EventSubscription2) {\n _inheritsLoose(EmitterSubscription, _EventSubscription2);\n\n /**\n * @param {EventEmitter} emitter - The event emitter that registered this\n * subscription\n * @param {EventSubscriptionVendor} subscriber - The subscriber that controls\n * this subscription\n * @param {function} listener - Function to invoke when the specified event is\n * emitted\n * @param {*} context - Optional context object to use when invoking the\n * listener\n */\n function EmitterSubscription(emitter, subscriber, listener, context) {\n var _this;\n\n _this = _EventSubscription2.call(this, subscriber) || this;\n _this.emitter = emitter;\n _this.listener = listener;\n _this.context = context;\n return _this;\n }\n /**\n * Removes this subscription from the emitter that registered it.\n * Note: we're overriding the `remove()` method of _EventSubscription here\n * but deliberately not calling `super.remove()` as the responsibility\n * for removing the subscription lies with the EventEmitter.\n */\n\n\n var _proto = EmitterSubscription.prototype;\n\n _proto.remove = function remove() {\n this.emitter.removeSubscription(this);\n };\n\n return EmitterSubscription;\n}(_EventSubscription);\n\nexport default EmitterSubscription;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\n/**\n * EventSubscription represents a subscription to a particular event. It can\n * remove its own subscription.\n */\nvar _EventSubscription = /*#__PURE__*/function () {\n /**\n * @param {EventSubscriptionVendor} subscriber the subscriber that controls\n * this subscription.\n */\n function _EventSubscription(subscriber) {\n this.subscriber = subscriber;\n }\n /**\n * Removes this subscription from the subscriber that controls it.\n */\n\n\n var _proto = _EventSubscription.prototype;\n\n _proto.remove = function remove() {\n this.subscriber.removeSubscription(this);\n };\n\n return _EventSubscription;\n}();\n\nexport default _EventSubscription;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * EventSubscriptionVendor stores a set of EventSubscriptions that are\n * subscribed to a particular event type.\n */\nvar EventSubscriptionVendor = /*#__PURE__*/function () {\n function EventSubscriptionVendor() {\n this._subscriptionsForType = {};\n }\n /**\n * Adds a subscription keyed by an event type.\n *\n * @param {string} eventType\n * @param {EventSubscription} subscription\n */\n\n\n var _proto = EventSubscriptionVendor.prototype;\n\n _proto.addSubscription = function addSubscription(eventType, subscription) {\n invariant(subscription.subscriber === this, 'The subscriber of the subscription is incorrectly set.');\n\n if (!this._subscriptionsForType[eventType]) {\n this._subscriptionsForType[eventType] = [];\n }\n\n var key = this._subscriptionsForType[eventType].length;\n\n this._subscriptionsForType[eventType].push(subscription);\n\n subscription.eventType = eventType;\n subscription.key = key;\n return subscription;\n }\n /**\n * Removes a bulk set of the subscriptions.\n *\n * @param {?string} eventType - Optional name of the event type whose\n * registered supscriptions to remove, if null remove all subscriptions.\n */\n ;\n\n _proto.removeAllSubscriptions = function removeAllSubscriptions(eventType) {\n if (eventType == null) {\n this._subscriptionsForType = {};\n } else {\n delete this._subscriptionsForType[eventType];\n }\n }\n /**\n * Removes a specific subscription. Instead of calling this function, call\n * `subscription.remove()` directly.\n *\n * @param {object} subscription\n */\n ;\n\n _proto.removeSubscription = function removeSubscription(subscription) {\n var eventType = subscription.eventType;\n var key = subscription.key;\n var subscriptionsForType = this._subscriptionsForType[eventType];\n\n if (subscriptionsForType) {\n delete subscriptionsForType[key];\n }\n }\n /**\n * Returns the array of subscriptions that are currently registered for the\n * given event type.\n *\n * Note: This array can be potentially sparse as subscriptions are deleted\n * from it when they are removed.\n *\n * TODO: This returns a nullable array. wat?\n *\n * @param {string} eventType\n * @returns {?array}\n */\n ;\n\n _proto.getSubscriptionsForType = function getSubscriptionsForType(eventType) {\n return this._subscriptionsForType[eventType];\n };\n\n return EventSubscriptionVendor;\n}();\n\nexport default EventSubscriptionVendor;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n * @typecheck\n */\nimport invariant from 'fbjs/lib/invariant';\nimport EmitterSubscription from './_EmitterSubscription';\nimport EventSubscriptionVendor from './_EventSubscriptionVendor';\n\nvar sparseFilterPredicate = function sparseFilterPredicate() {\n return true;\n};\n\n/**\n * @class EventEmitter\n * @description\n * An EventEmitter is responsible for managing a set of listeners and publishing\n * events to them when it is told that such events happened. In addition to the\n * data for the given event it also sends a event control object which allows\n * the listeners/handlers to prevent the default behavior of the given event.\n *\n * The emitter is designed to be generic enough to support all the different\n * contexts in which one might want to emit events. It is a simple multicast\n * mechanism on top of which extra functionality can be composed. For example, a\n * more advanced emitter may use an EventHolder and EventFactory.\n */\nvar EventEmitter = /*#__PURE__*/function () {\n /**\n * @constructor\n *\n * @param {EventSubscriptionVendor} subscriber - Optional subscriber instance\n * to use. If omitted, a new subscriber will be created for the emitter.\n */\n function EventEmitter(subscriber) {\n this._subscriber = subscriber || new EventSubscriptionVendor();\n }\n /**\n * Adds a listener to be invoked when events of the specified type are\n * emitted. An optional calling context may be provided. The data arguments\n * emitted will be passed to the listener function.\n *\n * TODO: Annotate the listener arg's type. This is tricky because listeners\n * can be invoked with varargs.\n *\n * @param {string} eventType - Name of the event to listen to\n * @param {function} listener - Function to invoke when the specified event is\n * emitted\n * @param {*} context - Optional context object to use when invoking the\n * listener\n */\n\n\n var _proto = EventEmitter.prototype;\n\n _proto.addListener = function addListener(eventType, // FIXME: listeners should return void instead of mixed to prevent issues\n listener, context) {\n return this._subscriber.addSubscription(eventType, new EmitterSubscription(this, this._subscriber, listener, context));\n }\n /**\n * Removes all of the registered listeners, including those registered as\n * listener maps.\n *\n * @param {?string} eventType - Optional name of the event whose registered\n * listeners to remove\n */\n ;\n\n _proto.removeAllListeners = function removeAllListeners(eventType) {\n this._subscriber.removeAllSubscriptions(eventType);\n }\n /**\n * @deprecated Use `remove` on the EventSubscription from `addListener`.\n */\n ;\n\n _proto.removeSubscription = function removeSubscription(subscription) {\n invariant(subscription.emitter === this, 'Subscription does not belong to this emitter.');\n\n this._subscriber.removeSubscription(subscription);\n }\n /**\n * Returns the number of listeners that are currently registered for the given\n * event.\n *\n * @param {string} eventType - Name of the event to query\n * @returns {number}\n */\n ;\n\n _proto.listenerCount = function listenerCount(eventType) {\n var subscriptions = this._subscriber.getSubscriptionsForType(eventType);\n\n return subscriptions ? // We filter out missing entries because the array is sparse.\n // \"callbackfn is called only for elements of the array which actually\n // exist; it is not called for missing elements of the array.\"\n // https://www.ecma-international.org/ecma-262/9.0/index.html#sec-array.prototype.filter\n subscriptions.filter(sparseFilterPredicate).length : 0;\n }\n /**\n * Emits an event of the given type with the given data. All handlers of that\n * particular type will be notified.\n *\n * @param {string} eventType - Name of the event to emit\n * @param {...*} Arbitrary arguments to be passed to each registered listener\n *\n * @example\n * emitter.addListener('someEvent', function(message) {\n * console.log(message);\n * });\n *\n * emitter.emit('someEvent', 'abc'); // logs 'abc'\n */\n ;\n\n _proto.emit = function emit(eventType) {\n var subscriptions = this._subscriber.getSubscriptionsForType(eventType);\n\n if (subscriptions) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n for (var i = 0, l = subscriptions.length; i < l; i++) {\n var subscription = subscriptions[i]; // The subscription may have been removed during this event loop.\n\n if (subscription && subscription.listener) {\n subscription.listener.apply(subscription.context, args);\n }\n }\n }\n }\n /**\n * @deprecated Use `remove` on the EventSubscription from `addListener`.\n */\n ;\n\n _proto.removeListener = function removeListener(eventType, // FIXME: listeners should return void instead of mixed to prevent issues\n listener) {\n console.error(\"EventEmitter.removeListener('\" + eventType + \"', ...): Method has been \" + 'deprecated. Please instead use `remove()` on the subscription ' + 'returned by `EventEmitter.addListener`.');\n\n var subscriptions = this._subscriber.getSubscriptionsForType(eventType);\n\n if (subscriptions) {\n for (var i = 0, l = subscriptions.length; i < l; i++) {\n var subscription = subscriptions[i]; // The subscription may have been removed during this event loop.\n // its listener matches the listener in method parameters\n\n if (subscription && subscription.listener === listener) {\n subscription.remove();\n }\n }\n }\n };\n\n return EventEmitter;\n}();\n\nexport default EventEmitter;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport EventEmitter from './_EventEmitter';\nexport default EventEmitter;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport EventEmitter from '../emitter/EventEmitter'; // FIXME: use typed events\n\n/**\n * Global EventEmitter used by the native platform to emit events to JavaScript.\n * Events are identified by globally unique event names.\n *\n * NativeModules that emit events should instead subclass `NativeEventEmitter`.\n */\nexport default new EventEmitter();","'use strict';var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));var _objectWithoutProperties2=_interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));var _react=_interopRequireDefault(require(\"react\"));var _reactNative=require(\"react-native\");var _RNCSliderNativeComponent=_interopRequireDefault(require(\"./RNCSliderNativeComponent\"));var _jsxFileName=\"/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/Slider.js\";var SliderComponent=function SliderComponent(props,forwardedRef){var style=_reactNative.StyleSheet.compose(styles.slider,props.style);var onValueChange=props.onValueChange,onSlidingStart=props.onSlidingStart,onSlidingComplete=props.onSlidingComplete,localProps=(0,_objectWithoutProperties2.default)(props,[\"onValueChange\",\"onSlidingStart\",\"onSlidingComplete\"]);var onValueChangeEvent=onValueChange?function(event){var userEvent=true;if(_reactNative.Platform.OS==='android'){userEvent=event.nativeEvent.fromUser!=null&&event.nativeEvent.fromUser;}userEvent&&onValueChange(event.nativeEvent.value);}:null;var onChangeEvent=onValueChangeEvent;var onSlidingStartEvent=onSlidingStart?function(event){onSlidingStart(event.nativeEvent.value);}:null;var onSlidingCompleteEvent=onSlidingComplete?function(event){onSlidingComplete(event.nativeEvent.value);}:null;return _react.default.createElement(_RNCSliderNativeComponent.default,(0,_extends2.default)({},localProps,{thumbImage:_reactNative.Platform.OS==='web'?props.thumbImage:_reactNative.Image.resolveAssetSource(props.thumbImage),ref:forwardedRef,style:style,onChange:onChangeEvent,onRNCSliderSlidingStart:onSlidingStartEvent,onRNCSliderSlidingComplete:onSlidingCompleteEvent,onRNCSliderValueChange:onValueChangeEvent,enabled:!props.disabled,onStartShouldSetResponder:function onStartShouldSetResponder(){return true;},onResponderTerminationRequest:function onResponderTerminationRequest(){return false;},__source:{fileName:_jsxFileName,lineNumber:270}}));};var SliderWithRef=_react.default.forwardRef(SliderComponent);SliderWithRef.defaultProps={disabled:false,value:0,minimumValue:0,maximumValue:1,step:0,inverted:false};var styles;if(_reactNative.Platform.OS==='ios'){styles=_reactNative.StyleSheet.create({slider:{height:40}});}else{styles=_reactNative.StyleSheet.create({slider:{}});}var Slider=SliderWithRef;var _default=Slider;exports.default=_default;","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport NavigationContext from './NavigationContext';\nimport type { NavigationProp } from './types';\n\n/**\n * Hook to access the navigation prop of the parent screen anywhere.\n *\n * @returns Navigation prop of the parent screen.\n */\nexport default function useNavigation<\n T extends NavigationProp<ParamListBase>\n>(): T {\n const navigation = React.useContext(NavigationContext);\n\n if (navigation === undefined) {\n throw new Error(\n \"Couldn't find a navigation object. Is your component inside a screen in a navigator?\"\n );\n }\n\n return navigation as T;\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n/*\n * @returns {bool} true if different, false if equal\n */\n\nvar deepDiffer = function deepDiffer(one, two, maxDepth) {\n if (maxDepth === void 0) {\n maxDepth = -1;\n }\n\n if (maxDepth === 0) {\n return true;\n }\n\n if (one === two) {\n // Short circuit on identical object references instead of traversing them.\n return false;\n }\n\n if (typeof one === 'function' && typeof two === 'function') {\n // We consider all functions equal\n return false;\n }\n\n if (typeof one !== 'object' || one === null) {\n // Primitives can be directly compared\n return one !== two;\n }\n\n if (typeof two !== 'object' || two === null) {\n // We know they are different because the previous case would have triggered\n // otherwise.\n return true;\n }\n\n if (one.constructor !== two.constructor) {\n return true;\n }\n\n if (Array.isArray(one)) {\n // We know two is also an array because the constructors are equal\n var len = one.length;\n\n if (two.length !== len) {\n return true;\n }\n\n for (var ii = 0; ii < len; ii++) {\n if (deepDiffer(one[ii], two[ii], maxDepth - 1)) {\n return true;\n }\n }\n } else {\n for (var key in one) {\n if (deepDiffer(one[key], two[key], maxDepth - 1)) {\n return true;\n }\n }\n\n for (var twoKey in two) {\n // The only case we haven't checked yet is keys that are in two but aren't\n // in one, which means they are different.\n if (one[twoKey] === undefined && two[twoKey] !== undefined) {\n return true;\n }\n }\n }\n\n return false;\n};\n\nexport default deepDiffer;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport deepDiffer from '../deepDiffer';\nimport * as React from 'react';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport View from '../../../exports/View';\nimport ScrollView from '../../../exports/ScrollView';\nimport VirtualizedList from '../VirtualizedList';\nimport invariant from 'fbjs/lib/invariant';\n\nvar defaultProps = _objectSpread(_objectSpread({}, VirtualizedList.defaultProps), {}, {\n numColumns: 1\n});\n\n/**\n * A performant interface for rendering simple, flat lists, supporting the most handy features:\n *\n * - Fully cross-platform.\n * - Optional horizontal mode.\n * - Configurable viewability callbacks.\n * - Header support.\n * - Footer support.\n * - Separator support.\n * - Pull to Refresh.\n * - Scroll loading.\n * - ScrollToIndex support.\n *\n * If you need section support, use [`<SectionList>`](docs/sectionlist.html).\n *\n * Minimal Example:\n *\n * <FlatList\n * data={[{key: 'a'}, {key: 'b'}]}\n * renderItem={({item}) => <Text>{item.key}</Text>}\n * />\n *\n * More complex, multi-select example demonstrating `PureComponent` usage for perf optimization and avoiding bugs.\n *\n * - By binding the `onPressItem` handler, the props will remain `===` and `PureComponent` will\n * prevent wasteful re-renders unless the actual `id`, `selected`, or `title` props change, even\n * if the components rendered in `MyListItem` did not have such optimizations.\n * - By passing `extraData={this.state}` to `FlatList` we make sure `FlatList` itself will re-render\n * when the `state.selected` changes. Without setting this prop, `FlatList` would not know it\n * needs to re-render any items because it is also a `PureComponent` and the prop comparison will\n * not show any changes.\n * - `keyExtractor` tells the list to use the `id`s for the react keys instead of the default `key` property.\n *\n *\n * class MyListItem extends React.PureComponent {\n * _onPress = () => {\n * this.props.onPressItem(this.props.id);\n * };\n *\n * render() {\n * const textColor = this.props.selected ? \"red\" : \"black\";\n * return (\n * <TouchableOpacity onPress={this._onPress}>\n * <View>\n * <Text style={{ color: textColor }}>\n * {this.props.title}\n * </Text>\n * </View>\n * </TouchableOpacity>\n * );\n * }\n * }\n *\n * class MultiSelectList extends React.PureComponent {\n * state = {selected: (new Map(): Map<string, boolean>)};\n *\n * _keyExtractor = (item, index) => item.id;\n *\n * _onPressItem = (id: string) => {\n * // updater functions are preferred for transactional updates\n * this.setState((state) => {\n * // copy the map rather than modifying state.\n * const selected = new Map(state.selected);\n * selected.set(id, !selected.get(id)); // toggle\n * return {selected};\n * });\n * };\n *\n * _renderItem = ({item}) => (\n * <MyListItem\n * id={item.id}\n * onPressItem={this._onPressItem}\n * selected={!!this.state.selected.get(item.id)}\n * title={item.title}\n * />\n * );\n *\n * render() {\n * return (\n * <FlatList\n * data={this.props.data}\n * extraData={this.state}\n * keyExtractor={this._keyExtractor}\n * renderItem={this._renderItem}\n * />\n * );\n * }\n * }\n *\n * This is a convenience wrapper around [`<VirtualizedList>`](docs/virtualizedlist.html),\n * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed\n * here, along with the following caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n * Also inherits [ScrollView Props](docs/scrollview.html#props), unless it is nested in another FlatList of same orientation.\n */\nvar FlatList = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(FlatList, _React$PureComponent);\n\n var _proto = FlatList.prototype;\n\n /**\n * Scrolls to the end of the content. May be janky without `getItemLayout` prop.\n */\n _proto.scrollToEnd = function scrollToEnd(params) {\n if (this._listRef) {\n this._listRef.scrollToEnd(params);\n }\n }\n /**\n * Scrolls to the item at the specified index such that it is positioned in the viewable area\n * such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the\n * middle. `viewOffset` is a fixed number of pixels to offset the final target position.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n ;\n\n _proto.scrollToIndex = function scrollToIndex(params) {\n if (this._listRef) {\n this._listRef.scrollToIndex(params);\n }\n }\n /**\n * Requires linear scan through data - use `scrollToIndex` instead if possible.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n ;\n\n _proto.scrollToItem = function scrollToItem(params) {\n if (this._listRef) {\n this._listRef.scrollToItem(params);\n }\n }\n /**\n * Scroll to a specific content pixel offset in the list.\n *\n * Check out [scrollToOffset](docs/virtualizedlist.html#scrolltooffset) of VirtualizedList\n */\n ;\n\n _proto.scrollToOffset = function scrollToOffset(params) {\n if (this._listRef) {\n this._listRef.scrollToOffset(params);\n }\n }\n /**\n * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.\n * if `waitForInteractions` is true and the user has not scrolled. This is typically called by\n * taps on items or by navigation actions.\n */\n ;\n\n _proto.recordInteraction = function recordInteraction() {\n if (this._listRef) {\n this._listRef.recordInteraction();\n }\n }\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n ;\n\n _proto.flashScrollIndicators = function flashScrollIndicators() {\n if (this._listRef) {\n this._listRef.flashScrollIndicators();\n }\n }\n /**\n * Provides a handle to the underlying scroll responder.\n */\n ;\n\n _proto.getScrollResponder = function getScrollResponder() {\n if (this._listRef) {\n return this._listRef.getScrollResponder();\n }\n }\n /**\n * Provides a reference to the underlying host component\n */\n ;\n\n _proto.getNativeScrollRef = function getNativeScrollRef() {\n if (this._listRef) {\n /* $FlowFixMe[incompatible-return] Suppresses errors found when fixing\n * TextInput typing */\n return this._listRef.getScrollRef();\n }\n };\n\n _proto.getScrollableNode = function getScrollableNode() {\n if (this._listRef) {\n return this._listRef.getScrollableNode();\n }\n };\n\n _proto.setNativeProps = function setNativeProps(props) {\n if (this._listRef) {\n this._listRef.setNativeProps(props);\n }\n };\n\n function FlatList(_props) {\n var _this;\n\n _this = _React$PureComponent.call(this, _props) || this;\n _this._virtualizedListPairs = [];\n\n _this._captureRef = function (ref) {\n _this._listRef = ref;\n };\n\n _this._getItem = function (data, index) {\n var numColumns = _this.props.numColumns;\n\n if (numColumns > 1) {\n var ret = [];\n\n for (var kk = 0; kk < numColumns; kk++) {\n var _item = data[index * numColumns + kk];\n\n if (_item != null) {\n ret.push(_item);\n }\n }\n\n return ret;\n } else {\n return data[index];\n }\n };\n\n _this._getItemCount = function (data) {\n if (data) {\n var numColumns = _this.props.numColumns;\n return numColumns > 1 ? Math.ceil(data.length / numColumns) : data.length;\n } else {\n return 0;\n }\n };\n\n _this._keyExtractor = function (items, index) {\n var _this$props = _this.props,\n keyExtractor = _this$props.keyExtractor,\n numColumns = _this$props.numColumns;\n\n if (numColumns > 1) {\n invariant(Array.isArray(items), 'FlatList: Encountered internal consistency error, expected each item to consist of an ' + 'array with 1-%s columns; instead, received a single item.', numColumns);\n return items // $FlowFixMe[incompatible-call]\n .map(function (it, kk) {\n return keyExtractor(it, index * numColumns + kk);\n }).join(':');\n } else {\n // $FlowFixMe Can't call keyExtractor with an array\n return keyExtractor(items, index);\n }\n };\n\n _this._renderer = function () {\n var _ref;\n\n var _this$props2 = _this.props,\n ListItemComponent = _this$props2.ListItemComponent,\n renderItem = _this$props2.renderItem,\n numColumns = _this$props2.numColumns,\n columnWrapperStyle = _this$props2.columnWrapperStyle;\n var virtualizedListRenderKey = ListItemComponent ? 'ListItemComponent' : 'renderItem';\n\n var renderer = function renderer(props) {\n if (ListItemComponent) {\n // $FlowFixMe Component isn't valid\n return /*#__PURE__*/React.createElement(ListItemComponent, props);\n } else if (renderItem) {\n // $FlowFixMe[incompatible-call]\n return renderItem(props);\n } else {\n return null;\n }\n };\n\n return _ref = {}, _ref[virtualizedListRenderKey] = function (info) {\n if (numColumns > 1) {\n var _item2 = info.item,\n _index = info.index;\n invariant(Array.isArray(_item2), 'Expected array of items with numColumns > 1');\n return /*#__PURE__*/React.createElement(View, {\n style: StyleSheet.compose(styles.row, columnWrapperStyle)\n }, _item2.map(function (it, kk) {\n var element = renderer({\n item: it,\n index: _index * numColumns + kk,\n separators: info.separators\n });\n return element != null ? /*#__PURE__*/React.createElement(React.Fragment, {\n key: kk\n }, element) : null;\n }));\n } else {\n return renderer(info);\n }\n }, _ref;\n };\n\n _this._checkProps(_this.props);\n\n if (_this.props.viewabilityConfigCallbackPairs) {\n _this._virtualizedListPairs = _this.props.viewabilityConfigCallbackPairs.map(function (pair) {\n return {\n viewabilityConfig: pair.viewabilityConfig,\n onViewableItemsChanged: _this._createOnViewableItemsChanged(pair.onViewableItemsChanged)\n };\n });\n } else if (_this.props.onViewableItemsChanged) {\n _this._virtualizedListPairs.push({\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.63 was deployed. To see the error delete\n * this comment and run Flow. */\n viewabilityConfig: _this.props.viewabilityConfig,\n onViewableItemsChanged: _this._createOnViewableItemsChanged(_this.props.onViewableItemsChanged)\n });\n }\n\n return _this;\n }\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n invariant(prevProps.numColumns === this.props.numColumns, 'Changing numColumns on the fly is not supported. Change the key prop on FlatList when ' + 'changing the number of columns to force a fresh render of the component.');\n invariant(prevProps.onViewableItemsChanged === this.props.onViewableItemsChanged, 'Changing onViewableItemsChanged on the fly is not supported');\n invariant(!deepDiffer(prevProps.viewabilityConfig, this.props.viewabilityConfig), 'Changing viewabilityConfig on the fly is not supported');\n invariant(prevProps.viewabilityConfigCallbackPairs === this.props.viewabilityConfigCallbackPairs, 'Changing viewabilityConfigCallbackPairs on the fly is not supported');\n\n this._checkProps(this.props);\n };\n\n _proto._checkProps = function _checkProps(props) {\n var getItem = props.getItem,\n getItemCount = props.getItemCount,\n horizontal = props.horizontal,\n numColumns = props.numColumns,\n columnWrapperStyle = props.columnWrapperStyle,\n onViewableItemsChanged = props.onViewableItemsChanged,\n viewabilityConfigCallbackPairs = props.viewabilityConfigCallbackPairs;\n invariant(!getItem && !getItemCount, 'FlatList does not support custom data formats.');\n\n if (numColumns > 1) {\n invariant(!horizontal, 'numColumns does not support horizontal.');\n } else {\n invariant(!columnWrapperStyle, 'columnWrapperStyle not supported for single column lists');\n }\n\n invariant(!(onViewableItemsChanged && viewabilityConfigCallbackPairs), 'FlatList does not support setting both onViewableItemsChanged and ' + 'viewabilityConfigCallbackPairs.');\n };\n\n _proto._pushMultiColumnViewable = function _pushMultiColumnViewable(arr, v) {\n var _this$props3 = this.props,\n numColumns = _this$props3.numColumns,\n keyExtractor = _this$props3.keyExtractor;\n v.item.forEach(function (item, ii) {\n invariant(v.index != null, 'Missing index!');\n var index = v.index * numColumns + ii;\n arr.push(_objectSpread(_objectSpread({}, v), {}, {\n item: item,\n key: keyExtractor(item, index),\n index: index\n }));\n });\n };\n\n _proto._createOnViewableItemsChanged = function _createOnViewableItemsChanged(onViewableItemsChanged) {\n var _this2 = this;\n\n return function (info) {\n var numColumns = _this2.props.numColumns;\n\n if (onViewableItemsChanged) {\n if (numColumns > 1) {\n var changed = [];\n var viewableItems = [];\n info.viewableItems.forEach(function (v) {\n return _this2._pushMultiColumnViewable(viewableItems, v);\n });\n info.changed.forEach(function (v) {\n return _this2._pushMultiColumnViewable(changed, v);\n });\n onViewableItemsChanged({\n viewableItems: viewableItems,\n changed: changed\n });\n } else {\n onViewableItemsChanged(info);\n }\n }\n };\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n numColumns = _this$props4.numColumns,\n columnWrapperStyle = _this$props4.columnWrapperStyle,\n restProps = _objectWithoutPropertiesLoose(_this$props4, [\"numColumns\", \"columnWrapperStyle\"]);\n\n return /*#__PURE__*/React.createElement(VirtualizedList, _extends({}, restProps, {\n getItem: this._getItem,\n getItemCount: this._getItemCount,\n keyExtractor: this._keyExtractor,\n ref: this._captureRef,\n viewabilityConfigCallbackPairs: this._virtualizedListPairs\n }, this._renderer()));\n };\n\n return FlatList;\n}(React.PureComponent);\n\nFlatList.defaultProps = defaultProps;\nvar styles = StyleSheet.create({\n row: {\n flexDirection: 'row'\n }\n});\nexport default FlatList;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport FlatList from '../../vendor/react-native/FlatList';\nexport default FlatList;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport default function pick(obj, list) {\n var nextObj = {};\n\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (list[key] === true || // Temporary until ARIA is mapped to explicit props\n key.indexOf('aria-') === 0) {\n nextObj[key] = obj[key];\n }\n }\n }\n\n return nextObj;\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UIManager from '../../exports/UIManager';\nimport createDOMProps from '../createDOMProps';\nimport useStable from '../useStable';\nimport { useRef } from 'react';\nvar emptyObject = {};\n\nfunction setNativeProps(node, nativeProps, classList, pointerEvents, style, previousStyleRef) {\n if (node != null && nativeProps) {\n var domProps = createDOMProps(null, _objectSpread(_objectSpread({\n pointerEvents: pointerEvents\n }, nativeProps), {}, {\n classList: [classList, nativeProps.className],\n style: [style, nativeProps.style]\n }));\n var nextDomStyle = domProps.style;\n\n if (previousStyleRef.current != null) {\n if (domProps.style == null) {\n domProps.style = {};\n }\n\n for (var styleName in previousStyleRef.current) {\n if (domProps.style[styleName] == null) {\n domProps.style[styleName] = '';\n }\n }\n }\n\n previousStyleRef.current = nextDomStyle;\n UIManager.updateView(node, domProps);\n }\n}\n/**\n * Adds non-standard methods to the hode element. This is temporarily until an\n * API like `ReactNative.measure(hostRef, callback)` is added to React Native.\n */\n\n\nexport default function usePlatformMethods(_ref) {\n var classList = _ref.classList,\n pointerEvents = _ref.pointerEvents,\n style = _ref.style;\n var previousStyleRef = useRef(null);\n var setNativePropsArgsRef = useRef(null);\n setNativePropsArgsRef.current = {\n classList: classList,\n pointerEvents: pointerEvents,\n style: style\n }; // Avoid creating a new ref on every render. The props only need to be\n // available to 'setNativeProps' when it is called.\n\n var ref = useStable(function () {\n return function (hostNode) {\n if (hostNode != null) {\n hostNode.measure = function (callback) {\n return UIManager.measure(hostNode, callback);\n };\n\n hostNode.measureLayout = function (relativeToNode, success, failure) {\n return UIManager.measureLayout(hostNode, relativeToNode, failure, success);\n };\n\n hostNode.measureInWindow = function (callback) {\n return UIManager.measureInWindow(hostNode, callback);\n };\n\n hostNode.setNativeProps = function (nativeProps) {\n var _ref2 = setNativePropsArgsRef.current || emptyObject,\n classList = _ref2.classList,\n style = _ref2.style,\n pointerEvents = _ref2.pointerEvents;\n\n setNativeProps(hostNode, nativeProps, classList, pointerEvents, style, previousStyleRef);\n };\n }\n };\n });\n return ref;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nvar DELAY = 'DELAY';\nvar ERROR = 'ERROR';\nvar LONG_PRESS_DETECTED = 'LONG_PRESS_DETECTED';\nvar NOT_RESPONDER = 'NOT_RESPONDER';\nvar RESPONDER_ACTIVE_LONG_PRESS_START = 'RESPONDER_ACTIVE_LONG_PRESS_START';\nvar RESPONDER_ACTIVE_PRESS_START = 'RESPONDER_ACTIVE_PRESS_START';\nvar RESPONDER_INACTIVE_PRESS_START = 'RESPONDER_INACTIVE_PRESS_START';\nvar RESPONDER_GRANT = 'RESPONDER_GRANT';\nvar RESPONDER_RELEASE = 'RESPONDER_RELEASE';\nvar RESPONDER_TERMINATED = 'RESPONDER_TERMINATED';\nvar Transitions = Object.freeze({\n NOT_RESPONDER: {\n DELAY: ERROR,\n RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START,\n RESPONDER_RELEASE: ERROR,\n RESPONDER_TERMINATED: ERROR,\n LONG_PRESS_DETECTED: ERROR\n },\n RESPONDER_INACTIVE_PRESS_START: {\n DELAY: RESPONDER_ACTIVE_PRESS_START,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: ERROR\n },\n RESPONDER_ACTIVE_PRESS_START: {\n DELAY: ERROR,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: RESPONDER_ACTIVE_LONG_PRESS_START\n },\n RESPONDER_ACTIVE_LONG_PRESS_START: {\n DELAY: ERROR,\n RESPONDER_GRANT: ERROR,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: RESPONDER_ACTIVE_LONG_PRESS_START\n },\n ERROR: {\n DELAY: NOT_RESPONDER,\n RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START,\n RESPONDER_RELEASE: NOT_RESPONDER,\n RESPONDER_TERMINATED: NOT_RESPONDER,\n LONG_PRESS_DETECTED: NOT_RESPONDER\n }\n});\n\nvar isActiveSignal = function isActiveSignal(signal) {\n return signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START;\n};\n\nvar isButtonRole = function isButtonRole(element) {\n return element.getAttribute('role') === 'button';\n};\n\nvar isPressStartSignal = function isPressStartSignal(signal) {\n return signal === RESPONDER_INACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START;\n};\n\nvar isTerminalSignal = function isTerminalSignal(signal) {\n return signal === RESPONDER_TERMINATED || signal === RESPONDER_RELEASE;\n};\n\nvar isValidKeyPress = function isValidKeyPress(event) {\n var key = event.key;\n var target = event.currentTarget;\n var role = target.getAttribute('role');\n var isSpacebar = key === ' ' || key === 'Spacebar';\n return !event.repeat && (key === 'Enter' || isSpacebar && (role === 'button' || role === 'menuitem'));\n};\n\nvar DEFAULT_LONG_PRESS_DELAY_MS = 450; // 500 - 50\n\nvar DEFAULT_PRESS_DELAY_MS = 50;\n/**\n * =========================== PressResponder Tutorial ===========================\n *\n * The `PressResponder` class helps you create press interactions by analyzing the\n * geometry of elements and observing when another responder (e.g. ScrollView)\n * has stolen the touch lock. It offers hooks for your component to provide\n * interaction feedback to the user:\n *\n * - When a press has activated (e.g. highlight an element)\n * - When a press has deactivated (e.g. un-highlight an element)\n * - When a press sould trigger an action, meaning it activated and deactivated\n * while within the geometry of the element without the lock being stolen.\n *\n * A high quality interaction isn't as simple as you might think. There should\n * be a slight delay before activation. Moving your finger beyond an element's\n * bounds should trigger deactivation, but moving the same finger back within an\n * element's bounds should trigger reactivation.\n *\n * In order to use `PressResponder`, do the following:\n *\n * const pressResponder = new PressResponder(config);\n *\n * 2. Choose the rendered component who should collect the press events. On that\n * element, spread `pressability.getEventHandlers()` into its props.\n *\n * return (\n * <View {...this.state.pressResponder.getEventHandlers()} />\n * );\n *\n * 3. Reset `PressResponder` when your component unmounts.\n *\n * componentWillUnmount() {\n * this.state.pressResponder.reset();\n * }\n *\n * ==================== Implementation Details ====================\n *\n * `PressResponder` only assumes that there exists a `HitRect` node. The `PressRect`\n * is an abstract box that is extended beyond the `HitRect`.\n *\n * # Geometry\n *\n * ┌────────────────────────┐\n * │ ┌──────────────────┐ │ - Presses start anywhere within `HitRect`.\n * │ │ ┌────────────┐ │ │\n * │ │ │ VisualRect │ │ │\n * │ │ └────────────┘ │ │ - When pressed down for sufficient amount of time\n * │ │ HitRect │ │ before letting up, `VisualRect` activates.\n * │ └──────────────────┘ │\n * │ Out Region o │\n * └────────────────────│───┘\n * └────── When the press is released outside the `HitRect`,\n * the responder is NOT eligible for a \"press\".\n *\n * # State Machine\n *\n * ┌───────────────┐ ◀──── RESPONDER_RELEASE\n * │ NOT_RESPONDER │\n * └───┬───────────┘ ◀──── RESPONDER_TERMINATED\n * │\n * │ RESPONDER_GRANT (HitRect)\n * │\n * ▼\n * ┌─────────────────────┐ ┌───────────────────┐ ┌───────────────────┐\n * │ RESPONDER_INACTIVE_ │ DELAY │ RESPONDER_ACTIVE_ │ T + DELAY │ RESPONDER_ACTIVE_ │\n * │ PRESS_START ├────────▶ │ PRESS_START ├────────────▶ │ LONG_PRESS_START │\n * └─────────────────────┘ └───────────────────┘ └───────────────────┘\n *\n * T + DELAY => LONG_PRESS_DELAY + DELAY\n *\n * Not drawn are the side effects of each transition. The most important side\n * effect is the invocation of `onLongPress`. Only when the browser produces a\n * `click` event is `onPress` invoked.\n */\n\nvar PressResponder = /*#__PURE__*/function () {\n function PressResponder(config) {\n this._eventHandlers = null;\n this._isPointerTouch = false;\n this._longPressDelayTimeout = null;\n this._longPressDispatched = false;\n this._pressDelayTimeout = null;\n this._pressOutDelayTimeout = null;\n this._touchState = NOT_RESPONDER;\n this.configure(config);\n }\n\n var _proto = PressResponder.prototype;\n\n _proto.configure = function configure(config) {\n this._config = config;\n }\n /**\n * Resets any pending timers. This should be called on unmount.\n */\n ;\n\n _proto.reset = function reset() {\n this._cancelLongPressDelayTimeout();\n\n this._cancelPressDelayTimeout();\n\n this._cancelPressOutDelayTimeout();\n }\n /**\n * Returns a set of props to spread into the interactive element.\n */\n ;\n\n _proto.getEventHandlers = function getEventHandlers() {\n if (this._eventHandlers == null) {\n this._eventHandlers = this._createEventHandlers();\n }\n\n return this._eventHandlers;\n };\n\n _proto._createEventHandlers = function _createEventHandlers() {\n var _this = this;\n\n var start = function start(event, shouldDelay) {\n event.persist();\n\n _this._cancelPressOutDelayTimeout();\n\n _this._longPressDispatched = false;\n _this._selectionTerminated = false;\n _this._touchState = NOT_RESPONDER;\n _this._isPointerTouch = event.nativeEvent.type === 'touchstart';\n\n _this._receiveSignal(RESPONDER_GRANT, event);\n\n var delayPressStart = normalizeDelay(_this._config.delayPressStart, 0, DEFAULT_PRESS_DELAY_MS);\n\n if (shouldDelay !== false && delayPressStart > 0) {\n _this._pressDelayTimeout = setTimeout(function () {\n _this._receiveSignal(DELAY, event);\n }, delayPressStart);\n } else {\n _this._receiveSignal(DELAY, event);\n }\n\n var delayLongPress = normalizeDelay(_this._config.delayLongPress, 10, DEFAULT_LONG_PRESS_DELAY_MS);\n _this._longPressDelayTimeout = setTimeout(function () {\n _this._handleLongPress(event);\n }, delayLongPress + delayPressStart);\n };\n\n var end = function end(event) {\n _this._receiveSignal(RESPONDER_RELEASE, event);\n };\n\n var keyupHandler = function keyupHandler(event) {\n if (_this._touchState !== NOT_RESPONDER) {\n end(event);\n document.removeEventListener('keyup', keyupHandler);\n }\n };\n\n return {\n onStartShouldSetResponder: function onStartShouldSetResponder(event) {\n var disabled = _this._config.disabled;\n\n if (disabled && isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n\n if (disabled == null) {\n return true;\n }\n\n return !disabled;\n },\n onKeyDown: function onKeyDown(event) {\n if (isValidKeyPress(event)) {\n if (_this._touchState === NOT_RESPONDER) {\n start(event, false); // Listen to 'keyup' on document to account for situations where\n // focus is moved to another element during 'keydown'.\n\n document.addEventListener('keyup', keyupHandler);\n }\n\n event.stopPropagation();\n }\n },\n onResponderGrant: function onResponderGrant(event) {\n return start(event);\n },\n onResponderMove: function onResponderMove(event) {\n if (_this._config.onPressMove != null) {\n _this._config.onPressMove(event);\n }\n\n var touch = getTouchFromResponderEvent(event);\n\n if (_this._touchActivatePosition != null) {\n var deltaX = _this._touchActivatePosition.pageX - touch.pageX;\n var deltaY = _this._touchActivatePosition.pageY - touch.pageY;\n\n if (Math.hypot(deltaX, deltaY) > 10) {\n _this._cancelLongPressDelayTimeout();\n }\n }\n },\n onResponderRelease: function onResponderRelease(event) {\n return end(event);\n },\n onResponderTerminate: function onResponderTerminate(event) {\n if (event.nativeEvent.type === 'selectionchange') {\n _this._selectionTerminated = true;\n }\n\n _this._receiveSignal(RESPONDER_TERMINATED, event);\n },\n onResponderTerminationRequest: function onResponderTerminationRequest(event) {\n var _this$_config = _this._config,\n cancelable = _this$_config.cancelable,\n disabled = _this$_config.disabled,\n onLongPress = _this$_config.onLongPress; // If `onLongPress` is provided, don't terminate on `contextmenu` as default\n // behavior will be prevented for non-mouse pointers.\n\n if (!disabled && onLongPress != null && _this._isPointerTouch && event.nativeEvent.type === 'contextmenu') {\n return false;\n }\n\n if (cancelable == null) {\n return true;\n }\n\n return cancelable;\n },\n // NOTE: this diverges from react-native in 3 significant ways:\n // * The `onPress` callback is not connected to the responder system (the native\n // `click` event must be used but is dispatched in many scenarios where no pointers\n // are on the screen.) Therefore, it's possible for `onPress` to be called without\n // `onPress{Start,End}` being called first.\n // * The `onPress` callback is only be called on the first ancestor of the native\n // `click` target that is using the PressResponder.\n // * The event's `nativeEvent` is a `MouseEvent` not a `TouchEvent`.\n onClick: function onClick(event) {\n var _this$_config2 = _this._config,\n disabled = _this$_config2.disabled,\n onPress = _this$_config2.onPress;\n\n if (!disabled) {\n // If long press dispatched, cancel default click behavior.\n // If the responder terminated because text was selected during the gesture,\n // cancel the default click behavior.\n event.stopPropagation();\n\n if (_this._longPressDispatched || _this._selectionTerminated) {\n event.preventDefault();\n } else if (onPress != null && event.altKey === false) {\n onPress(event);\n }\n } else {\n if (isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n }\n },\n // If `onLongPress` is provided and a touch pointer is being used, prevent the\n // default context menu from opening.\n onContextMenu: function onContextMenu(event) {\n var _this$_config3 = _this._config,\n disabled = _this$_config3.disabled,\n onLongPress = _this$_config3.onLongPress;\n\n if (!disabled) {\n if (onLongPress != null && _this._isPointerTouch && !event.defaultPrevented) {\n event.preventDefault();\n event.stopPropagation();\n }\n } else {\n if (isButtonRole(event.currentTarget)) {\n event.stopPropagation();\n }\n }\n }\n };\n }\n /**\n * Receives a state machine signal, performs side effects of the transition\n * and stores the new state. Validates the transition as well.\n */\n ;\n\n _proto._receiveSignal = function _receiveSignal(signal, event) {\n var prevState = this._touchState;\n var nextState = null;\n\n if (Transitions[prevState] != null) {\n nextState = Transitions[prevState][signal];\n }\n\n if (this._touchState === NOT_RESPONDER && signal === RESPONDER_RELEASE) {\n return;\n }\n\n if (nextState == null || nextState === ERROR) {\n console.error(\"PressResponder: Invalid signal \" + signal + \" for state \" + prevState + \" on responder\");\n } else if (prevState !== nextState) {\n this._performTransitionSideEffects(prevState, nextState, signal, event);\n\n this._touchState = nextState;\n }\n }\n /**\n * Performs a transition between touchable states and identify any activations\n * or deactivations (and callback invocations).\n */\n ;\n\n _proto._performTransitionSideEffects = function _performTransitionSideEffects(prevState, nextState, signal, event) {\n if (isTerminalSignal(signal)) {\n this._isPointerTouch = false;\n this._touchActivatePosition = null;\n\n this._cancelLongPressDelayTimeout();\n }\n\n if (isPressStartSignal(prevState) && signal === LONG_PRESS_DETECTED) {\n var onLongPress = this._config.onLongPress; // Long press is not supported for keyboards because 'click' can be dispatched\n // immediately (and multiple times) after 'keydown'.\n\n if (onLongPress != null && event.nativeEvent.key == null) {\n onLongPress(event);\n this._longPressDispatched = true;\n }\n }\n\n var isPrevActive = isActiveSignal(prevState);\n var isNextActive = isActiveSignal(nextState);\n\n if (!isPrevActive && isNextActive) {\n this._activate(event);\n } else if (isPrevActive && !isNextActive) {\n this._deactivate(event);\n }\n\n if (isPressStartSignal(prevState) && signal === RESPONDER_RELEASE) {\n var _this$_config4 = this._config,\n _onLongPress = _this$_config4.onLongPress,\n onPress = _this$_config4.onPress;\n\n if (onPress != null) {\n var isPressCanceledByLongPress = _onLongPress != null && prevState === RESPONDER_ACTIVE_LONG_PRESS_START;\n\n if (!isPressCanceledByLongPress) {\n // If we never activated (due to delays), activate and deactivate now.\n if (!isNextActive && !isPrevActive) {\n this._activate(event);\n\n this._deactivate(event);\n }\n }\n }\n }\n\n this._cancelPressDelayTimeout();\n };\n\n _proto._activate = function _activate(event) {\n var _this$_config5 = this._config,\n onPressChange = _this$_config5.onPressChange,\n onPressStart = _this$_config5.onPressStart;\n var touch = getTouchFromResponderEvent(event);\n this._touchActivatePosition = {\n pageX: touch.pageX,\n pageY: touch.pageY\n };\n\n if (onPressStart != null) {\n onPressStart(event);\n }\n\n if (onPressChange != null) {\n onPressChange(true);\n }\n };\n\n _proto._deactivate = function _deactivate(event) {\n var _this$_config6 = this._config,\n onPressChange = _this$_config6.onPressChange,\n onPressEnd = _this$_config6.onPressEnd;\n\n function end() {\n if (onPressEnd != null) {\n onPressEnd(event);\n }\n\n if (onPressChange != null) {\n onPressChange(false);\n }\n }\n\n var delayPressEnd = normalizeDelay(this._config.delayPressEnd);\n\n if (delayPressEnd > 0) {\n this._pressOutDelayTimeout = setTimeout(function () {\n end();\n }, delayPressEnd);\n } else {\n end();\n }\n };\n\n _proto._handleLongPress = function _handleLongPress(event) {\n if (this._touchState === RESPONDER_ACTIVE_PRESS_START || this._touchState === RESPONDER_ACTIVE_LONG_PRESS_START) {\n this._receiveSignal(LONG_PRESS_DETECTED, event);\n }\n };\n\n _proto._cancelLongPressDelayTimeout = function _cancelLongPressDelayTimeout() {\n if (this._longPressDelayTimeout != null) {\n clearTimeout(this._longPressDelayTimeout);\n this._longPressDelayTimeout = null;\n }\n };\n\n _proto._cancelPressDelayTimeout = function _cancelPressDelayTimeout() {\n if (this._pressDelayTimeout != null) {\n clearTimeout(this._pressDelayTimeout);\n this._pressDelayTimeout = null;\n }\n };\n\n _proto._cancelPressOutDelayTimeout = function _cancelPressOutDelayTimeout() {\n if (this._pressOutDelayTimeout != null) {\n clearTimeout(this._pressOutDelayTimeout);\n this._pressOutDelayTimeout = null;\n }\n };\n\n return PressResponder;\n}();\n\nexport { PressResponder as default };\n\nfunction normalizeDelay(delay, min, fallback) {\n if (min === void 0) {\n min = 0;\n }\n\n if (fallback === void 0) {\n fallback = 0;\n }\n\n return Math.max(min, delay !== null && delay !== void 0 ? delay : fallback);\n}\n\nfunction getTouchFromResponderEvent(event) {\n var _event$nativeEvent = event.nativeEvent,\n changedTouches = _event$nativeEvent.changedTouches,\n touches = _event$nativeEvent.touches;\n\n if (touches != null && touches.length > 0) {\n return touches[0];\n }\n\n if (changedTouches != null && changedTouches.length > 0) {\n return changedTouches[0];\n }\n\n return event.nativeEvent;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport PressResponder from './PressResponder';\nimport { useDebugValue, useEffect, useRef } from 'react';\nexport default function usePressEvents(hostRef, config) {\n var pressResponderRef = useRef(null);\n\n if (pressResponderRef.current == null) {\n pressResponderRef.current = new PressResponder(config);\n }\n\n var pressResponder = pressResponderRef.current; // Re-configure to use the current node and configuration.\n\n useEffect(function () {\n pressResponder.configure(config);\n }, [config, pressResponder]); // Reset the `pressResponder` when cleanup needs to occur. This is\n // a separate effect because we do not want to rest the responder when `config` changes.\n\n useEffect(function () {\n return function () {\n pressResponder.reset();\n };\n }, [pressResponder]);\n useDebugValue(config);\n return pressResponder.getEventHandlers();\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nimport InteractionManager from '../../../exports/InteractionManager';\n/**\n * A simple class for batching up invocations of a low-pri callback. A timeout is set to run the\n * callback once after a delay, no matter how many times it's scheduled. Once the delay is reached,\n * InteractionManager.runAfterInteractions is used to invoke the callback after any hi-pri\n * interactions are done running.\n *\n * Make sure to cleanup with dispose(). Example:\n *\n * class Widget extends React.Component {\n * _batchedSave: new Batchinator(() => this._saveState, 1000);\n * _saveSate() {\n * // save this.state to disk\n * }\n * componentDidUpdate() {\n * this._batchedSave.schedule();\n * }\n * componentWillUnmount() {\n * this._batchedSave.dispose();\n * }\n * ...\n * }\n */\n\nvar Batchinator = /*#__PURE__*/function () {\n function Batchinator(callback, delayMS) {\n this._delay = delayMS;\n this._callback = callback;\n }\n /*\n * Cleanup any pending tasks.\n *\n * By default, if there is a pending task the callback is run immediately. Set the option abort to\n * true to not call the callback if it was pending.\n */\n\n\n var _proto = Batchinator.prototype;\n\n _proto.dispose = function dispose(options) {\n if (options === void 0) {\n options = {\n abort: false\n };\n }\n\n if (this._taskHandle) {\n this._taskHandle.cancel();\n\n if (!options.abort) {\n this._callback();\n }\n\n this._taskHandle = null;\n }\n };\n\n _proto.schedule = function schedule() {\n var _this = this;\n\n if (this._taskHandle) {\n return;\n }\n\n var timeoutHandle = setTimeout(function () {\n _this._taskHandle = InteractionManager.runAfterInteractions(function () {\n // Note that we clear the handle before invoking the callback so that if the callback calls\n // schedule again, it will actually schedule another task.\n _this._taskHandle = null;\n\n _this._callback();\n });\n }, this._delay);\n this._taskHandle = {\n cancel: function cancel() {\n return clearTimeout(timeoutHandle);\n }\n };\n };\n\n return Batchinator;\n}();\n\nexport default Batchinator;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * A Utility class for calculating viewable items based on current metrics like scroll position and\n * layout.\n *\n * An item is said to be in a \"viewable\" state when any of the following\n * is true for longer than `minimumViewTime` milliseconds (after an interaction if `waitForInteraction`\n * is true):\n *\n * - Occupying >= `viewAreaCoveragePercentThreshold` of the view area XOR fraction of the item\n * visible in the view area >= `itemVisiblePercentThreshold`.\n * - Entirely visible on screen\n */\nvar ViewabilityHelper = /*#__PURE__*/function () {\n function ViewabilityHelper(config) {\n if (config === void 0) {\n config = {\n viewAreaCoveragePercentThreshold: 0\n };\n }\n\n this._hasInteracted = false;\n this._timers = new Set();\n this._viewableIndices = [];\n this._viewableItems = new Map();\n this._config = config;\n }\n /**\n * Cleanup, e.g. on unmount. Clears any pending timers.\n */\n\n\n var _proto = ViewabilityHelper.prototype;\n\n _proto.dispose = function dispose() {\n this._timers.forEach(clearTimeout);\n }\n /**\n * Determines which items are viewable based on the current metrics and config.\n */\n ;\n\n _proto.computeViewableItems = function computeViewableItems(itemCount, scrollOffset, viewportHeight, getFrameMetrics, renderRange) {\n var _this$_config = this._config,\n itemVisiblePercentThreshold = _this$_config.itemVisiblePercentThreshold,\n viewAreaCoveragePercentThreshold = _this$_config.viewAreaCoveragePercentThreshold;\n var viewAreaMode = viewAreaCoveragePercentThreshold != null;\n var viewablePercentThreshold = viewAreaMode ? viewAreaCoveragePercentThreshold : itemVisiblePercentThreshold;\n invariant(viewablePercentThreshold != null && itemVisiblePercentThreshold != null !== (viewAreaCoveragePercentThreshold != null), 'Must set exactly one of itemVisiblePercentThreshold or viewAreaCoveragePercentThreshold');\n var viewableIndices = [];\n\n if (itemCount === 0) {\n return viewableIndices;\n }\n\n var firstVisible = -1;\n\n var _ref = renderRange || {\n first: 0,\n last: itemCount - 1\n },\n first = _ref.first,\n last = _ref.last;\n\n if (last >= itemCount) {\n console.warn('Invalid render range computing viewability ' + JSON.stringify({\n renderRange: renderRange,\n itemCount: itemCount\n }));\n return [];\n }\n\n for (var idx = first; idx <= last; idx++) {\n var metrics = getFrameMetrics(idx);\n\n if (!metrics) {\n continue;\n }\n\n var top = metrics.offset - scrollOffset;\n var bottom = top + metrics.length;\n\n if (top < viewportHeight && bottom > 0) {\n firstVisible = idx;\n\n if (_isViewable(viewAreaMode, viewablePercentThreshold, top, bottom, viewportHeight, metrics.length)) {\n viewableIndices.push(idx);\n }\n } else if (firstVisible >= 0) {\n break;\n }\n }\n\n return viewableIndices;\n }\n /**\n * Figures out which items are viewable and how that has changed from before and calls\n * `onViewableItemsChanged` as appropriate.\n */\n ;\n\n _proto.onUpdate = function onUpdate(itemCount, scrollOffset, viewportHeight, getFrameMetrics, createViewToken, onViewableItemsChanged, renderRange) {\n var _this = this;\n\n if (this._config.waitForInteraction && !this._hasInteracted || itemCount === 0 || !getFrameMetrics(0)) {\n return;\n }\n\n var viewableIndices = [];\n\n if (itemCount) {\n viewableIndices = this.computeViewableItems(itemCount, scrollOffset, viewportHeight, getFrameMetrics, renderRange);\n }\n\n if (this._viewableIndices.length === viewableIndices.length && this._viewableIndices.every(function (v, ii) {\n return v === viewableIndices[ii];\n })) {\n // We might get a lot of scroll events where visibility doesn't change and we don't want to do\n // extra work in those cases.\n return;\n }\n\n this._viewableIndices = viewableIndices;\n\n if (this._config.minimumViewTime) {\n var handle = setTimeout(function () {\n _this._timers.delete(handle);\n\n _this._onUpdateSync(viewableIndices, onViewableItemsChanged, createViewToken);\n }, this._config.minimumViewTime);\n\n this._timers.add(handle);\n } else {\n this._onUpdateSync(viewableIndices, onViewableItemsChanged, createViewToken);\n }\n }\n /**\n * clean-up cached _viewableIndices to evaluate changed items on next update\n */\n ;\n\n _proto.resetViewableIndices = function resetViewableIndices() {\n this._viewableIndices = [];\n }\n /**\n * Records that an interaction has happened even if there has been no scroll.\n */\n ;\n\n _proto.recordInteraction = function recordInteraction() {\n this._hasInteracted = true;\n };\n\n _proto._onUpdateSync = function _onUpdateSync( // $FlowFixMe\n viewableIndicesToCheck, // $FlowFixMe\n onViewableItemsChanged, // $FlowFixMe\n createViewToken) {\n var _this2 = this;\n\n // Filter out indices that have gone out of view since this call was scheduled.\n viewableIndicesToCheck = viewableIndicesToCheck.filter(function (ii) {\n return _this2._viewableIndices.includes(ii);\n });\n var prevItems = this._viewableItems;\n var nextItems = new Map(viewableIndicesToCheck.map(function (ii) {\n var viewable = createViewToken(ii, true);\n return [viewable.key, viewable];\n }));\n var changed = [];\n\n for (var _iterator = _createForOfIteratorHelperLoose(nextItems), _step; !(_step = _iterator()).done;) {\n var _step$value = _step.value,\n key = _step$value[0],\n viewable = _step$value[1];\n\n if (!prevItems.has(key)) {\n changed.push(viewable);\n }\n }\n\n for (var _iterator2 = _createForOfIteratorHelperLoose(prevItems), _step2; !(_step2 = _iterator2()).done;) {\n var _step2$value = _step2.value,\n _key = _step2$value[0],\n _viewable = _step2$value[1];\n\n if (!nextItems.has(_key)) {\n changed.push(_objectSpread(_objectSpread({}, _viewable), {}, {\n isViewable: false\n }));\n }\n }\n\n if (changed.length > 0) {\n this._viewableItems = nextItems;\n onViewableItemsChanged({\n viewableItems: Array.from(nextItems.values()),\n changed: changed,\n viewabilityConfig: this._config\n });\n }\n };\n\n return ViewabilityHelper;\n}();\n\nfunction _isViewable(viewAreaMode, viewablePercentThreshold, top, bottom, viewportHeight, itemLength) {\n if (_isEntirelyVisible(top, bottom, viewportHeight)) {\n return true;\n } else {\n var pixels = _getPixelsVisible(top, bottom, viewportHeight);\n\n var percent = 100 * (viewAreaMode ? pixels / viewportHeight : pixels / itemLength);\n return percent >= viewablePercentThreshold;\n }\n}\n\nfunction _getPixelsVisible(top, bottom, viewportHeight) {\n var visibleHeight = Math.min(bottom, viewportHeight) - Math.max(top, 0);\n return Math.max(0, visibleHeight);\n}\n\nfunction _isEntirelyVisible(top, bottom, viewportHeight) {\n return top >= 0 && bottom <= viewportHeight && bottom > top;\n}\n\nexport default ViewabilityHelper;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';\n/**\n * Intentional info-level logging for clear separation from ad-hoc console debug logging.\n */\n\nfunction infoLog() {\n var _console;\n\n return (_console = console).log.apply(_console, arguments);\n}\n\nexport default infoLog;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport invariant from 'fbjs/lib/invariant';\n/**\n * Used to find the indices of the frames that overlap the given offsets. Useful for finding the\n * items that bound different windows of content, such as the visible area or the buffered overscan\n * area.\n */\n\nfunction elementsThatOverlapOffsets(offsets, itemCount, getFrameMetrics) {\n var out = [];\n var outLength = 0;\n\n for (var ii = 0; ii < itemCount; ii++) {\n var frame = getFrameMetrics(ii);\n var trailingOffset = frame.offset + frame.length;\n\n for (var kk = 0; kk < offsets.length; kk++) {\n if (out[kk] == null && trailingOffset >= offsets[kk]) {\n out[kk] = ii;\n outLength++;\n\n if (kk === offsets.length - 1) {\n invariant(outLength === offsets.length, 'bad offsets input, should be in increasing order: %s', JSON.stringify(offsets));\n return out;\n }\n }\n }\n }\n\n return out;\n}\n/**\n * Computes the number of elements in the `next` range that are new compared to the `prev` range.\n * Handy for calculating how many new items will be rendered when the render window changes so we\n * can restrict the number of new items render at once so that content can appear on the screen\n * faster.\n */\n\n\nfunction newRangeCount(prev, next) {\n return next.last - next.first + 1 - Math.max(0, 1 + Math.min(next.last, prev.last) - Math.max(next.first, prev.first));\n}\n/**\n * Custom logic for determining which items should be rendered given the current frame and scroll\n * metrics, as well as the previous render state. The algorithm may evolve over time, but generally\n * prioritizes the visible area first, then expands that with overscan regions ahead and behind,\n * biased in the direction of scroll.\n */\n\n\nfunction computeWindowedRenderLimits(props, prev, getFrameMetricsApprox, scrollMetrics) {\n var data = props.data,\n getItemCount = props.getItemCount,\n maxToRenderPerBatch = props.maxToRenderPerBatch,\n windowSize = props.windowSize;\n var itemCount = getItemCount(data);\n\n if (itemCount === 0) {\n return prev;\n }\n\n var offset = scrollMetrics.offset,\n velocity = scrollMetrics.velocity,\n visibleLength = scrollMetrics.visibleLength; // Start with visible area, then compute maximum overscan region by expanding from there, biased\n // in the direction of scroll. Total overscan area is capped, which should cap memory consumption\n // too.\n\n var visibleBegin = Math.max(0, offset);\n var visibleEnd = visibleBegin + visibleLength;\n var overscanLength = (windowSize - 1) * visibleLength; // Considering velocity seems to introduce more churn than it's worth.\n\n var leadFactor = 0.5; // Math.max(0, Math.min(1, velocity / 25 + 0.5));\n\n var fillPreference = velocity > 1 ? 'after' : velocity < -1 ? 'before' : 'none';\n var overscanBegin = Math.max(0, visibleBegin - (1 - leadFactor) * overscanLength);\n var overscanEnd = Math.max(0, visibleEnd + leadFactor * overscanLength);\n var lastItemOffset = getFrameMetricsApprox(itemCount - 1).offset;\n\n if (lastItemOffset < overscanBegin) {\n // Entire list is before our overscan window\n return {\n first: Math.max(0, itemCount - 1 - maxToRenderPerBatch),\n last: itemCount - 1\n };\n } // Find the indices that correspond to the items at the render boundaries we're targeting.\n\n\n var _elementsThatOverlapO = elementsThatOverlapOffsets([overscanBegin, visibleBegin, visibleEnd, overscanEnd], props.getItemCount(props.data), getFrameMetricsApprox),\n overscanFirst = _elementsThatOverlapO[0],\n first = _elementsThatOverlapO[1],\n last = _elementsThatOverlapO[2],\n overscanLast = _elementsThatOverlapO[3];\n\n overscanFirst = overscanFirst == null ? 0 : overscanFirst;\n first = first == null ? Math.max(0, overscanFirst) : first;\n overscanLast = overscanLast == null ? itemCount - 1 : overscanLast;\n last = last == null ? Math.min(overscanLast, first + maxToRenderPerBatch - 1) : last;\n var visible = {\n first: first,\n last: last\n }; // We want to limit the number of new cells we're rendering per batch so that we can fill the\n // content on the screen quickly. If we rendered the entire overscan window at once, the user\n // could be staring at white space for a long time waiting for a bunch of offscreen content to\n // render.\n\n var newCellCount = newRangeCount(prev, visible);\n\n while (true) {\n if (first <= overscanFirst && last >= overscanLast) {\n // If we fill the entire overscan range, we're done.\n break;\n }\n\n var maxNewCells = newCellCount >= maxToRenderPerBatch;\n var firstWillAddMore = first <= prev.first || first > prev.last;\n var firstShouldIncrement = first > overscanFirst && (!maxNewCells || !firstWillAddMore);\n var lastWillAddMore = last >= prev.last || last < prev.first;\n var lastShouldIncrement = last < overscanLast && (!maxNewCells || !lastWillAddMore);\n\n if (maxNewCells && !firstShouldIncrement && !lastShouldIncrement) {\n // We only want to stop if we've hit maxNewCells AND we cannot increment first or last\n // without rendering new items. This let's us preserve as many already rendered items as\n // possible, reducing render churn and keeping the rendered overscan range as large as\n // possible.\n break;\n }\n\n if (firstShouldIncrement && !(fillPreference === 'after' && lastShouldIncrement && lastWillAddMore)) {\n if (firstWillAddMore) {\n newCellCount++;\n }\n\n first--;\n }\n\n if (lastShouldIncrement && !(fillPreference === 'before' && firstShouldIncrement && firstWillAddMore)) {\n if (lastWillAddMore) {\n newCellCount++;\n }\n\n last++;\n }\n }\n\n if (!(last >= first && first >= 0 && last < itemCount && first >= overscanFirst && last <= overscanLast && first <= visible.first && last >= visible.last)) {\n throw new Error('Bad window calculation ' + JSON.stringify({\n first: first,\n last: last,\n itemCount: itemCount,\n overscanFirst: overscanFirst,\n overscanLast: overscanLast,\n visible: visible\n }));\n }\n\n return {\n first: first,\n last: last\n };\n}\n\nvar VirtualizeUtils = {\n computeWindowedRenderLimits: computeWindowedRenderLimits,\n elementsThatOverlapOffsets: elementsThatOverlapOffsets,\n newRangeCount: newRangeCount\n};\nexport { computeWindowedRenderLimits, elementsThatOverlapOffsets, newRangeCount };\nexport default VirtualizeUtils;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as React from 'react';\nimport { useMemo, useContext } from 'react';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nexport var VirtualizedListContext = /*#__PURE__*/React.createContext(null);\n\nif (__DEV__) {\n VirtualizedListContext.displayName = 'VirtualizedListContext';\n}\n/**\n * Resets the context. Intended for use by portal-like components (e.g. Modal).\n */\n\n\nexport function VirtualizedListContextResetter(_ref) {\n var children = _ref.children;\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: null\n }, children);\n}\n/**\n * Sets the context with memoization. Intended to be used by `VirtualizedList`.\n */\n\nexport function VirtualizedListContextProvider(_ref2) {\n var children = _ref2.children,\n value = _ref2.value;\n // Avoid setting a newly created context object if the values are identical.\n var context = useMemo(function () {\n return {\n cellKey: null,\n getScrollMetrics: value.getScrollMetrics,\n horizontal: value.horizontal,\n getOutermostParentListRef: value.getOutermostParentListRef,\n getNestedChildState: value.getNestedChildState,\n registerAsNestedChild: value.registerAsNestedChild,\n unregisterAsNestedChild: value.unregisterAsNestedChild,\n debugInfo: {\n cellKey: value.debugInfo.cellKey,\n horizontal: value.debugInfo.horizontal,\n listKey: value.debugInfo.listKey,\n parent: value.debugInfo.parent\n }\n };\n }, [value.getScrollMetrics, value.horizontal, value.getOutermostParentListRef, value.getNestedChildState, value.registerAsNestedChild, value.unregisterAsNestedChild, value.debugInfo.cellKey, value.debugInfo.horizontal, value.debugInfo.listKey, value.debugInfo.parent]);\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: context\n }, children);\n}\n/**\n * Sets the `cellKey`. Intended to be used by `VirtualizedList` for each cell.\n */\n\nexport function VirtualizedListCellContextProvider(_ref3) {\n var cellKey = _ref3.cellKey,\n children = _ref3.children;\n var context = useContext(VirtualizedListContext);\n return /*#__PURE__*/React.createElement(VirtualizedListContext.Provider, {\n value: context == null ? null : _objectSpread(_objectSpread({}, context), {}, {\n cellKey: cellKey\n })\n }, children);\n}","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport Batchinator from '../Batchinator';\nimport FillRateHelper from '../FillRateHelper';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport RefreshControl from '../../../exports/RefreshControl';\nimport ScrollView from '../../../exports/ScrollView';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport UIManager from '../../../exports/UIManager';\nimport View from '../../../exports/View';\nimport ViewabilityHelper from '../ViewabilityHelper';\nimport findNodeHandle from '../../../exports/findNodeHandle';\nvar flattenStyle = StyleSheet.flatten;\nimport infoLog from '../infoLog';\nimport invariant from 'fbjs/lib/invariant';\nimport warning from 'fbjs/lib/warning';\nimport { computeWindowedRenderLimits } from '../VirtualizeUtils';\nimport { VirtualizedListCellContextProvider, VirtualizedListContext, VirtualizedListContextProvider } from './VirtualizedListContext.js';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar _usedIndexForKey = false;\nvar _keylessItemComponentName = '';\n\n/**\n * Base implementation for the more convenient [`<FlatList>`](https://reactnative.dev/docs/flatlist.html)\n * and [`<SectionList>`](https://reactnative.dev/docs/sectionlist.html) components, which are also better\n * documented. In general, this should only really be used if you need more flexibility than\n * `FlatList` provides, e.g. for use with immutable data instead of plain arrays.\n *\n * Virtualization massively improves memory consumption and performance of large lists by\n * maintaining a finite render window of active items and replacing all items outside of the render\n * window with appropriately sized blank space. The window adapts to scrolling behavior, and items\n * are rendered incrementally with low-pri (after any running interactions) if they are far from the\n * visible area, or with hi-pri otherwise to minimize the potential of seeing blank space.\n *\n * Some caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` or `id` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n */\nvar VirtualizedList = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(VirtualizedList, _React$PureComponent);\n\n var _proto = VirtualizedList.prototype;\n\n // scrollToEnd may be janky without getItemLayout prop\n _proto.scrollToEnd = function scrollToEnd(params) {\n var animated = params ? params.animated : true;\n var veryLast = this.props.getItemCount(this.props.data) - 1;\n\n var frame = this._getFrameMetricsApprox(veryLast);\n\n var offset = Math.max(0, frame.offset + frame.length + this._footerLength - this._scrollMetrics.visibleLength);\n\n if (this._scrollRef == null) {\n return;\n }\n\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n\n this._scrollRef.scrollTo(this.props.horizontal ? {\n x: offset,\n animated: animated\n } : {\n y: offset,\n animated: animated\n });\n } // scrollToIndex may be janky without getItemLayout prop\n ;\n\n _proto.scrollToIndex = function scrollToIndex(params) {\n var _this$props = this.props,\n data = _this$props.data,\n horizontal = _this$props.horizontal,\n getItemCount = _this$props.getItemCount,\n getItemLayout = _this$props.getItemLayout,\n onScrollToIndexFailed = _this$props.onScrollToIndexFailed;\n var animated = params.animated,\n index = params.index,\n viewOffset = params.viewOffset,\n viewPosition = params.viewPosition;\n invariant(index >= 0, \"scrollToIndex out of range: requested index \" + index + \" but minimum is 0\");\n invariant(getItemCount(data) >= 1, \"scrollToIndex out of range: item length \" + getItemCount(data) + \" but minimum is 1\");\n invariant(index < getItemCount(data), \"scrollToIndex out of range: requested index \" + index + \" is out of 0 to \" + (getItemCount(data) - 1));\n\n if (!getItemLayout && index > this._highestMeasuredFrameIndex) {\n invariant(!!onScrollToIndexFailed, 'scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, ' + 'otherwise there is no way to know the location of offscreen indices or handle failures.');\n onScrollToIndexFailed({\n averageItemLength: this._averageCellLength,\n highestMeasuredFrameIndex: this._highestMeasuredFrameIndex,\n index: index\n });\n return;\n }\n\n var frame = this._getFrameMetricsApprox(index);\n\n var offset = Math.max(0, frame.offset - (viewPosition || 0) * (this._scrollMetrics.visibleLength - frame.length)) - (viewOffset || 0);\n\n if (this._scrollRef == null) {\n return;\n }\n\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n\n this._scrollRef.scrollTo(horizontal ? {\n x: offset,\n animated: animated\n } : {\n y: offset,\n animated: animated\n });\n } // scrollToItem may be janky without getItemLayout prop. Required linear scan through items -\n // use scrollToIndex instead if possible.\n ;\n\n _proto.scrollToItem = function scrollToItem(params) {\n var item = params.item;\n var _this$props2 = this.props,\n data = _this$props2.data,\n getItem = _this$props2.getItem,\n getItemCount = _this$props2.getItemCount;\n var itemCount = getItemCount(data);\n\n for (var _index = 0; _index < itemCount; _index++) {\n if (getItem(data, _index) === item) {\n this.scrollToIndex(_objectSpread(_objectSpread({}, params), {}, {\n index: _index\n }));\n break;\n }\n }\n }\n /**\n * Scroll to a specific content pixel offset in the list.\n *\n * Param `offset` expects the offset to scroll to.\n * In case of `horizontal` is true, the offset is the x-value,\n * in any other case the offset is the y-value.\n *\n * Param `animated` (`true` by default) defines whether the list\n * should do an animation while scrolling.\n */\n ;\n\n _proto.scrollToOffset = function scrollToOffset(params) {\n var animated = params.animated,\n offset = params.offset;\n\n if (this._scrollRef == null) {\n return;\n }\n\n if (this._scrollRef.scrollTo == null) {\n console.warn('No scrollTo method provided. This may be because you have two nested ' + 'VirtualizedLists with the same orientation, or because you are ' + 'using a custom component that does not implement scrollTo.');\n return;\n }\n\n this._scrollRef.scrollTo(this.props.horizontal ? {\n x: offset,\n animated: animated\n } : {\n y: offset,\n animated: animated\n });\n };\n\n _proto.recordInteraction = function recordInteraction() {\n this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref.recordInteraction();\n });\n\n this._viewabilityTuples.forEach(function (t) {\n t.viewabilityHelper.recordInteraction();\n });\n\n this._updateViewableItems(this.props.data);\n };\n\n _proto.flashScrollIndicators = function flashScrollIndicators() {\n if (this._scrollRef == null) {\n return;\n }\n\n this._scrollRef.flashScrollIndicators();\n }\n /**\n * Provides a handle to the underlying scroll responder.\n * Note that `this._scrollRef` might not be a `ScrollView`, so we\n * need to check that it responds to `getScrollResponder` before calling it.\n */\n ;\n\n _proto.getScrollResponder = function getScrollResponder() {\n if (this._scrollRef && this._scrollRef.getScrollResponder) {\n return this._scrollRef.getScrollResponder();\n }\n };\n\n _proto.getScrollableNode = function getScrollableNode() {\n if (this._scrollRef && this._scrollRef.getScrollableNode) {\n return this._scrollRef.getScrollableNode();\n } else {\n return findNodeHandle(this._scrollRef);\n }\n };\n\n _proto.getScrollRef = function getScrollRef() {\n if (this._scrollRef && this._scrollRef.getScrollRef) {\n return this._scrollRef.getScrollRef();\n } else {\n return this._scrollRef;\n }\n };\n\n _proto.setNativeProps = function setNativeProps(props) {\n if (this._scrollRef) {\n this._scrollRef.setNativeProps(props);\n }\n };\n\n _proto._getCellKey = function _getCellKey() {\n var _this$context;\n\n return ((_this$context = this.context) == null ? void 0 : _this$context.cellKey) || 'rootList';\n };\n\n _proto._getListKey = function _getListKey() {\n return this.props.listKey || this._getCellKey();\n };\n\n _proto._getDebugInfo = function _getDebugInfo() {\n var _this$context2;\n\n return {\n listKey: this._getListKey(),\n cellKey: this._getCellKey(),\n horizontal: !!this.props.horizontal,\n parent: (_this$context2 = this.context) == null ? void 0 : _this$context2.debugInfo\n };\n };\n\n _proto.hasMore = function hasMore() {\n return this._hasMore;\n };\n\n function VirtualizedList(_props) {\n var _this;\n\n _this = _React$PureComponent.call(this, _props) || this;\n\n _this._getScrollMetrics = function () {\n return _this._scrollMetrics;\n };\n\n _this._getOutermostParentListRef = function () {\n if (_this._isNestedWithSameOrientation()) {\n return _this.context.getOutermostParentListRef();\n } else {\n return _assertThisInitialized(_this);\n }\n };\n\n _this._getNestedChildState = function (key) {\n var existingChildData = _this._nestedChildLists.get(key);\n\n return existingChildData && existingChildData.state;\n };\n\n _this._registerAsNestedChild = function (childList) {\n // Register the mapping between this child key and the cellKey for its cell\n var childListsInCell = _this._cellKeysToChildListKeys.get(childList.cellKey) || new Set();\n childListsInCell.add(childList.key);\n\n _this._cellKeysToChildListKeys.set(childList.cellKey, childListsInCell);\n\n var existingChildData = _this._nestedChildLists.get(childList.key);\n\n if (existingChildData && existingChildData.ref !== null) {\n console.error('A VirtualizedList contains a cell which itself contains ' + 'more than one VirtualizedList of the same orientation as the parent ' + 'list. You must pass a unique listKey prop to each sibling list.\\n\\n' + describeNestedLists(_objectSpread(_objectSpread({}, childList), {}, {\n // We're called from the child's componentDidMount, so it's safe to\n // read the child's props here (albeit weird).\n horizontal: !!childList.ref.props.horizontal\n })));\n }\n\n _this._nestedChildLists.set(childList.key, {\n ref: childList.ref,\n state: null\n });\n\n if (_this._hasInteracted) {\n childList.ref.recordInteraction();\n }\n };\n\n _this._unregisterAsNestedChild = function (childList) {\n _this._nestedChildLists.set(childList.key, {\n ref: null,\n state: childList.state\n });\n };\n\n _this._onUpdateSeparators = function (keys, newProps) {\n keys.forEach(function (key) {\n var ref = key != null && _this._cellRefs[key];\n ref && ref.updateSeparatorProps(newProps);\n });\n };\n\n _this._averageCellLength = 0;\n _this._cellKeysToChildListKeys = new Map();\n _this._cellRefs = {};\n _this._frames = {};\n _this._footerLength = 0;\n _this._hasDoneInitialScroll = false;\n _this._hasInteracted = false;\n _this._hasMore = false;\n _this._hasWarned = {};\n _this._headerLength = 0;\n _this._hiPriInProgress = false;\n _this._highestMeasuredFrameIndex = 0;\n _this._indicesToKeys = new Map();\n _this._nestedChildLists = new Map();\n _this._offsetFromParentVirtualizedList = 0;\n _this._prevParentOffset = 0;\n _this._scrollMetrics = {\n contentLength: 0,\n dOffset: 0,\n dt: 10,\n offset: 0,\n timestamp: 0,\n velocity: 0,\n visibleLength: 0\n };\n _this._scrollRef = null;\n _this._sentEndForContentLength = 0;\n _this._totalCellLength = 0;\n _this._totalCellsMeasured = 0;\n _this._viewabilityTuples = [];\n\n _this._captureScrollRef = function (ref) {\n _this._scrollRef = ref;\n };\n\n _this._defaultRenderScrollComponent = function (props) {\n var onRefresh = props.onRefresh;\n\n if (_this._isNestedWithSameOrientation()) {\n // $FlowFixMe - Typing ReactNativeComponent revealed errors\n return /*#__PURE__*/React.createElement(View, props);\n } else if (onRefresh) {\n invariant(typeof props.refreshing === 'boolean', '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' +\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n * an error found when Flow v0.111 was deployed. To see the error,\n * delete this comment and run Flow. */\n JSON.stringify(props.refreshing) + '`');\n return (\n /*#__PURE__*/\n // $FlowFixMe Invalid prop usage\n React.createElement(ScrollView, _extends({}, props, {\n refreshControl: props.refreshControl == null ? /*#__PURE__*/React.createElement(RefreshControl, {\n refreshing: props.refreshing,\n onRefresh: onRefresh,\n progressViewOffset: props.progressViewOffset\n }) : props.refreshControl\n }))\n );\n } else {\n // $FlowFixMe Invalid prop usage\n return /*#__PURE__*/React.createElement(ScrollView, props);\n }\n };\n\n _this._onCellUnmount = function (cellKey) {\n var curr = _this._frames[cellKey];\n\n if (curr) {\n _this._frames[cellKey] = _objectSpread(_objectSpread({}, curr), {}, {\n inLayout: false\n });\n }\n };\n\n _this._onLayout = function (e) {\n if (_this._isNestedWithSameOrientation()) {\n // Need to adjust our scroll metrics to be relative to our containing\n // VirtualizedList before we can make claims about list item viewability\n _this.measureLayoutRelativeToContainingList();\n } else {\n _this._scrollMetrics.visibleLength = _this._selectLength(e.nativeEvent.layout);\n }\n\n _this.props.onLayout && _this.props.onLayout(e);\n\n _this._scheduleCellsToRenderUpdate();\n\n _this._maybeCallOnEndReached();\n };\n\n _this._onLayoutEmpty = function (e) {\n _this.props.onLayout && _this.props.onLayout(e);\n };\n\n _this._onLayoutFooter = function (e) {\n _this._triggerRemeasureForChildListsInCell(_this._getFooterCellKey());\n\n _this._footerLength = _this._selectLength(e.nativeEvent.layout);\n };\n\n _this._onLayoutHeader = function (e) {\n _this._headerLength = _this._selectLength(e.nativeEvent.layout);\n };\n\n _this._onContentSizeChange = function (width, height) {\n if (width > 0 && height > 0 && _this.props.initialScrollIndex != null && _this.props.initialScrollIndex > 0 && !_this._hasDoneInitialScroll) {\n _this._hasDoneInitialScroll = true;\n }\n\n if (_this.props.onContentSizeChange) {\n _this.props.onContentSizeChange(width, height);\n }\n\n _this._scrollMetrics.contentLength = _this._selectLength({\n height: height,\n width: width\n });\n\n _this._scheduleCellsToRenderUpdate();\n\n _this._maybeCallOnEndReached();\n };\n\n _this._convertParentScrollMetrics = function (metrics) {\n // Offset of the top of the nested list relative to the top of its parent's viewport\n var offset = metrics.offset - _this._offsetFromParentVirtualizedList; // Child's visible length is the same as its parent's\n\n var visibleLength = metrics.visibleLength;\n var dOffset = offset - _this._scrollMetrics.offset;\n var contentLength = _this._scrollMetrics.contentLength;\n return {\n visibleLength: visibleLength,\n contentLength: contentLength,\n offset: offset,\n dOffset: dOffset\n };\n };\n\n _this._onScroll = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onScroll(e);\n });\n\n if (_this.props.onScroll) {\n _this.props.onScroll(e);\n }\n\n var timestamp = e.timeStamp;\n\n var visibleLength = _this._selectLength(e.nativeEvent.layoutMeasurement);\n\n var contentLength = _this._selectLength(e.nativeEvent.contentSize);\n\n var offset = _this._selectOffset(e.nativeEvent.contentOffset);\n\n var dOffset = offset - _this._scrollMetrics.offset;\n\n if (_this._isNestedWithSameOrientation()) {\n if (_this._scrollMetrics.contentLength === 0) {\n // Ignore scroll events until onLayout has been called and we\n // know our offset from our offset from our parent\n return;\n }\n\n var _this$_convertParentS = _this._convertParentScrollMetrics({\n visibleLength: visibleLength,\n offset: offset\n });\n\n visibleLength = _this$_convertParentS.visibleLength;\n contentLength = _this$_convertParentS.contentLength;\n offset = _this$_convertParentS.offset;\n dOffset = _this$_convertParentS.dOffset;\n }\n\n var dt = _this._scrollMetrics.timestamp ? Math.max(1, timestamp - _this._scrollMetrics.timestamp) : 1;\n var velocity = dOffset / dt;\n\n if (dt > 500 && _this._scrollMetrics.dt > 500 && contentLength > 5 * visibleLength && !_this._hasWarned.perf) {\n infoLog('VirtualizedList: You have a large list that is slow to update - make sure your ' + 'renderItem function renders components that follow React performance best practices ' + 'like PureComponent, shouldComponentUpdate, etc.', {\n dt: dt,\n prevDt: _this._scrollMetrics.dt,\n contentLength: contentLength\n });\n _this._hasWarned.perf = true;\n }\n\n _this._scrollMetrics = {\n contentLength: contentLength,\n dt: dt,\n dOffset: dOffset,\n offset: offset,\n timestamp: timestamp,\n velocity: velocity,\n visibleLength: visibleLength\n };\n\n _this._updateViewableItems(_this.props.data);\n\n if (!_this.props) {\n return;\n }\n\n _this._maybeCallOnEndReached();\n\n if (velocity !== 0) {\n _this._fillRateHelper.activate();\n }\n\n _this._computeBlankness();\n\n _this._scheduleCellsToRenderUpdate();\n };\n\n _this._onScrollBeginDrag = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onScrollBeginDrag(e);\n });\n\n _this._viewabilityTuples.forEach(function (tuple) {\n tuple.viewabilityHelper.recordInteraction();\n });\n\n _this._hasInteracted = true;\n _this.props.onScrollBeginDrag && _this.props.onScrollBeginDrag(e);\n };\n\n _this._onScrollEndDrag = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onScrollEndDrag(e);\n });\n\n var velocity = e.nativeEvent.velocity;\n\n if (velocity) {\n _this._scrollMetrics.velocity = _this._selectOffset(velocity);\n }\n\n _this._computeBlankness();\n\n _this.props.onScrollEndDrag && _this.props.onScrollEndDrag(e);\n };\n\n _this._onMomentumScrollBegin = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onMomentumScrollBegin(e);\n });\n\n _this.props.onMomentumScrollBegin && _this.props.onMomentumScrollBegin(e);\n };\n\n _this._onMomentumScrollEnd = function (e) {\n _this._nestedChildLists.forEach(function (childList) {\n childList.ref && childList.ref._onMomentumScrollEnd(e);\n });\n\n _this._scrollMetrics.velocity = 0;\n\n _this._computeBlankness();\n\n _this.props.onMomentumScrollEnd && _this.props.onMomentumScrollEnd(e);\n };\n\n _this._updateCellsToRender = function () {\n var _this$props3 = _this.props,\n data = _this$props3.data,\n getItemCount = _this$props3.getItemCount,\n onEndReachedThreshold = _this$props3.onEndReachedThreshold;\n\n var isVirtualizationDisabled = _this._isVirtualizationDisabled();\n\n _this._updateViewableItems(data);\n\n if (!data) {\n return;\n }\n\n _this.setState(function (state) {\n var newState;\n var _this$_scrollMetrics = _this._scrollMetrics,\n contentLength = _this$_scrollMetrics.contentLength,\n offset = _this$_scrollMetrics.offset,\n visibleLength = _this$_scrollMetrics.visibleLength;\n\n if (!isVirtualizationDisabled) {\n // If we run this with bogus data, we'll force-render window {first: 0, last: 0},\n // and wipe out the initialNumToRender rendered elements.\n // So let's wait until the scroll view metrics have been set up. And until then,\n // we will trust the initialNumToRender suggestion\n if (visibleLength > 0 && contentLength > 0) {\n // If we have a non-zero initialScrollIndex and run this before we've scrolled,\n // we'll wipe out the initialNumToRender rendered elements starting at initialScrollIndex.\n // So let's wait until we've scrolled the view to the right place. And until then,\n // we will trust the initialScrollIndex suggestion.\n if (!_this.props.initialScrollIndex || _this._scrollMetrics.offset) {\n newState = computeWindowedRenderLimits(_this.props, state, _this._getFrameMetricsApprox, _this._scrollMetrics);\n }\n }\n } else {\n var distanceFromEnd = contentLength - visibleLength - offset;\n var renderAhead =\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses\n * an error found when Flow v0.63 was deployed. To see the error\n * delete this comment and run Flow. */\n distanceFromEnd < onEndReachedThreshold * visibleLength ? _this.props.maxToRenderPerBatch : 0;\n newState = {\n first: 0,\n last: Math.min(state.last + renderAhead, getItemCount(data) - 1)\n };\n }\n\n if (newState && _this._nestedChildLists.size > 0) {\n var newFirst = newState.first;\n var newLast = newState.last; // If some cell in the new state has a child list in it, we should only render\n // up through that item, so that we give that list a chance to render.\n // Otherwise there's churn from multiple child lists mounting and un-mounting\n // their items.\n\n for (var ii = newFirst; ii <= newLast; ii++) {\n var cellKeyForIndex = _this._indicesToKeys.get(ii);\n\n var childListKeys = cellKeyForIndex && _this._cellKeysToChildListKeys.get(cellKeyForIndex);\n\n if (!childListKeys) {\n continue;\n }\n\n var someChildHasMore = false; // For each cell, need to check whether any child list in it has more elements to render\n\n for (var _iterator = _createForOfIteratorHelperLoose(childListKeys), _step; !(_step = _iterator()).done;) {\n var childKey = _step.value;\n\n var childList = _this._nestedChildLists.get(childKey);\n\n if (childList && childList.ref && childList.ref.hasMore()) {\n someChildHasMore = true;\n break;\n }\n }\n\n if (someChildHasMore && newState) {\n newState.last = ii;\n break;\n }\n }\n }\n\n if (newState != null && newState.first === state.first && newState.last === state.last) {\n newState = null;\n }\n\n return newState;\n });\n };\n\n _this._createViewToken = function (index, isViewable) {\n var _this$props4 = _this.props,\n data = _this$props4.data,\n getItem = _this$props4.getItem,\n keyExtractor = _this$props4.keyExtractor;\n var item = getItem(data, index);\n return {\n index: index,\n item: item,\n key: keyExtractor(item, index),\n isViewable: isViewable\n };\n };\n\n _this._getFrameMetricsApprox = function (index) {\n var frame = _this._getFrameMetrics(index);\n\n if (frame && frame.index === index) {\n // check for invalid frames due to row re-ordering\n return frame;\n } else {\n var getItemLayout = _this.props.getItemLayout;\n invariant(!getItemLayout, 'Should not have to estimate frames when a measurement metrics function is provided');\n return {\n length: _this._averageCellLength,\n offset: _this._averageCellLength * index\n };\n }\n };\n\n _this._getFrameMetrics = function (index) {\n var _this$props5 = _this.props,\n data = _this$props5.data,\n getItem = _this$props5.getItem,\n getItemCount = _this$props5.getItemCount,\n getItemLayout = _this$props5.getItemLayout,\n keyExtractor = _this$props5.keyExtractor;\n invariant(getItemCount(data) > index, 'Tried to get frame for out of range index ' + index);\n var item = getItem(data, index);\n\n var frame = item && _this._frames[keyExtractor(item, index)];\n\n if (!frame || frame.index !== index) {\n if (getItemLayout) {\n frame = getItemLayout(data, index);\n }\n }\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.63 was deployed. To see the error delete this\n * comment and run Flow. */\n\n\n return frame;\n };\n\n invariant( // $FlowFixMe\n !_props.onScroll || !_props.onScroll.__isNative, 'Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent ' + 'to support native onScroll events with useNativeDriver');\n invariant(_props.windowSize > 0, 'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.');\n _this._fillRateHelper = new FillRateHelper(_this._getFrameMetrics);\n _this._updateCellsToRenderBatcher = new Batchinator(_this._updateCellsToRender, _this.props.updateCellsBatchingPeriod);\n\n if (_this.props.viewabilityConfigCallbackPairs) {\n _this._viewabilityTuples = _this.props.viewabilityConfigCallbackPairs.map(function (pair) {\n return {\n viewabilityHelper: new ViewabilityHelper(pair.viewabilityConfig),\n onViewableItemsChanged: pair.onViewableItemsChanged\n };\n });\n } else if (_this.props.onViewableItemsChanged) {\n var onViewableItemsChanged = _this.props.onViewableItemsChanged;\n\n _this._viewabilityTuples.push({\n viewabilityHelper: new ViewabilityHelper(_this.props.viewabilityConfig),\n onViewableItemsChanged: onViewableItemsChanged\n });\n }\n\n var initialState = {\n first: _this.props.initialScrollIndex || 0,\n last: Math.min(_this.props.getItemCount(_this.props.data), (_this.props.initialScrollIndex || 0) + _this.props.initialNumToRender) - 1\n };\n\n if (_this._isNestedWithSameOrientation()) {\n var storedState = _this.context.getNestedChildState(_this._getListKey());\n\n if (storedState) {\n initialState = storedState;\n _this.state = storedState;\n _this._frames = storedState.frames;\n }\n }\n\n _this.state = initialState;\n return _this;\n }\n\n _proto.componentDidMount = function componentDidMount() {\n if (this._isNestedWithSameOrientation()) {\n this.context.registerAsNestedChild({\n cellKey: this._getCellKey(),\n key: this._getListKey(),\n ref: this,\n // NOTE: When the child mounts (here) it's not necessarily safe to read\n // the parent's props. This is why we explicitly propagate debugInfo\n // \"down\" via context and \"up\" again via this method call on the\n // parent.\n parentDebugInfo: this.context.debugInfo\n });\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._isNestedWithSameOrientation()) {\n this.context.unregisterAsNestedChild({\n key: this._getListKey(),\n state: {\n first: this.state.first,\n last: this.state.last,\n frames: this._frames\n }\n });\n }\n\n this._updateViewableItems(null);\n\n this._updateCellsToRenderBatcher.dispose({\n abort: true\n });\n\n this._viewabilityTuples.forEach(function (tuple) {\n tuple.viewabilityHelper.dispose();\n });\n\n this._fillRateHelper.deactivateAndFlush();\n };\n\n VirtualizedList.getDerivedStateFromProps = function getDerivedStateFromProps(newProps, prevState) {\n var data = newProps.data,\n getItemCount = newProps.getItemCount,\n maxToRenderPerBatch = newProps.maxToRenderPerBatch; // first and last could be stale (e.g. if a new, shorter items props is passed in), so we make\n // sure we're rendering a reasonable range here.\n\n return {\n first: Math.max(0, Math.min(prevState.first, getItemCount(data) - 1 - maxToRenderPerBatch)),\n last: Math.max(0, Math.min(prevState.last, getItemCount(data) - 1))\n };\n };\n\n _proto._pushCells = function _pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, first, last, inversionStyle) {\n var _this2 = this;\n\n var _this$props6 = this.props,\n CellRendererComponent = _this$props6.CellRendererComponent,\n ItemSeparatorComponent = _this$props6.ItemSeparatorComponent,\n data = _this$props6.data,\n getItem = _this$props6.getItem,\n getItemCount = _this$props6.getItemCount,\n horizontal = _this$props6.horizontal,\n keyExtractor = _this$props6.keyExtractor;\n var stickyOffset = this.props.ListHeaderComponent ? 1 : 0;\n var end = getItemCount(data) - 1;\n var prevCellKey;\n last = Math.min(end, last);\n\n var _loop = function _loop(ii) {\n var item = getItem(data, ii);\n var key = keyExtractor(item, ii);\n\n _this2._indicesToKeys.set(ii, key);\n\n if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n stickyHeaderIndices.push(cells.length);\n }\n\n cells.push( /*#__PURE__*/React.createElement(CellRenderer, {\n CellRendererComponent: CellRendererComponent,\n ItemSeparatorComponent: ii < end ? ItemSeparatorComponent : undefined,\n cellKey: key,\n fillRateHelper: _this2._fillRateHelper,\n horizontal: horizontal,\n index: ii,\n inversionStyle: inversionStyle,\n item: item,\n key: key,\n prevCellKey: prevCellKey,\n onUpdateSeparators: _this2._onUpdateSeparators,\n onLayout: function onLayout(e) {\n return _this2._onCellLayout(e, key, ii);\n },\n onUnmount: _this2._onCellUnmount,\n parentProps: _this2.props,\n ref: function ref(_ref) {\n _this2._cellRefs[key] = _ref;\n }\n }));\n prevCellKey = key;\n };\n\n for (var ii = first; ii <= last; ii++) {\n _loop(ii);\n }\n };\n\n _proto._isVirtualizationDisabled = function _isVirtualizationDisabled() {\n return this.props.disableVirtualization || false;\n };\n\n _proto._isNestedWithSameOrientation = function _isNestedWithSameOrientation() {\n var nestedContext = this.context;\n return !!(nestedContext && !!nestedContext.horizontal === !!this.props.horizontal);\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n if (__DEV__) {\n var flatStyles = flattenStyle(this.props.contentContainerStyle);\n\n if (flatStyles != null && flatStyles.flexWrap === 'wrap') {\n console.warn('`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' + 'Consider using `numColumns` with `FlatList` instead.');\n }\n }\n\n var _this$props7 = this.props,\n ListEmptyComponent = _this$props7.ListEmptyComponent,\n ListFooterComponent = _this$props7.ListFooterComponent,\n ListHeaderComponent = _this$props7.ListHeaderComponent;\n var _this$props8 = this.props,\n data = _this$props8.data,\n horizontal = _this$props8.horizontal;\n\n var isVirtualizationDisabled = this._isVirtualizationDisabled();\n\n var inversionStyle = this.props.inverted ? this.props.horizontal ? styles.horizontallyInverted : styles.verticallyInverted : null;\n var cells = [];\n var stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);\n var stickyHeaderIndices = [];\n\n if (ListHeaderComponent) {\n if (stickyIndicesFromProps.has(0)) {\n stickyHeaderIndices.push(0);\n }\n\n var element = /*#__PURE__*/React.isValidElement(ListHeaderComponent) ? ListHeaderComponent :\n /*#__PURE__*/\n // $FlowFixMe\n React.createElement(ListHeaderComponent, null);\n cells.push( /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this._getCellKey() + '-header',\n key: \"$header\"\n }, /*#__PURE__*/React.createElement(View, {\n onLayout: this._onLayoutHeader,\n style: StyleSheet.compose(inversionStyle, this.props.ListHeaderComponentStyle)\n }, // $FlowFixMe - Typing ReactNativeComponent revealed errors\n element)));\n }\n\n var itemCount = this.props.getItemCount(data);\n\n if (itemCount > 0) {\n _usedIndexForKey = false;\n _keylessItemComponentName = '';\n var spacerKey = !horizontal ? 'height' : 'width';\n var lastInitialIndex = this.props.initialScrollIndex ? -1 : this.props.initialNumToRender - 1;\n var _this$state = this.state,\n first = _this$state.first,\n last = _this$state.last;\n\n this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, 0, lastInitialIndex, inversionStyle);\n\n var firstAfterInitial = Math.max(lastInitialIndex + 1, first);\n\n if (!isVirtualizationDisabled && first > lastInitialIndex + 1) {\n var insertedStickySpacer = false;\n\n if (stickyIndicesFromProps.size > 0) {\n var stickyOffset = ListHeaderComponent ? 1 : 0; // See if there are any sticky headers in the virtualized space that we need to render.\n\n for (var ii = firstAfterInitial - 1; ii > lastInitialIndex; ii--) {\n if (stickyIndicesFromProps.has(ii + stickyOffset)) {\n var _ref2, _ref3;\n\n var initBlock = this._getFrameMetricsApprox(lastInitialIndex);\n\n var stickyBlock = this._getFrameMetricsApprox(ii);\n\n var leadSpace = stickyBlock.offset - initBlock.offset - (this.props.initialScrollIndex ? 0 : initBlock.length);\n cells.push(\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.111 was deployed. To\n * see the error, delete this comment and run Flow. */\n React.createElement(View, {\n key: \"$sticky_lead\",\n style: (_ref2 = {}, _ref2[spacerKey] = leadSpace, _ref2)\n }));\n\n this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, ii, ii, inversionStyle);\n\n var trailSpace = this._getFrameMetricsApprox(first).offset - (stickyBlock.offset + stickyBlock.length);\n cells.push(\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.111 was deployed. To\n * see the error, delete this comment and run Flow. */\n React.createElement(View, {\n key: \"$sticky_trail\",\n style: (_ref3 = {}, _ref3[spacerKey] = trailSpace, _ref3)\n }));\n insertedStickySpacer = true;\n break;\n }\n }\n }\n\n if (!insertedStickySpacer) {\n var _ref4;\n\n var _initBlock = this._getFrameMetricsApprox(lastInitialIndex);\n\n var firstSpace = this._getFrameMetricsApprox(first).offset - (_initBlock.offset + _initBlock.length);\n\n cells.push(\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment\n * suppresses an error found when Flow v0.111 was deployed. To see\n * the error, delete this comment and run Flow. */\n React.createElement(View, {\n key: \"$lead_spacer\",\n style: (_ref4 = {}, _ref4[spacerKey] = firstSpace, _ref4)\n }));\n }\n }\n\n this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, firstAfterInitial, last, inversionStyle);\n\n if (!this._hasWarned.keys && _usedIndexForKey) {\n console.warn('VirtualizedList: missing keys for items, make sure to specify a key or id property on each ' + 'item or provide a custom keyExtractor.', _keylessItemComponentName);\n this._hasWarned.keys = true;\n }\n\n if (!isVirtualizationDisabled && last < itemCount - 1) {\n var _ref5;\n\n var lastFrame = this._getFrameMetricsApprox(last); // Without getItemLayout, we limit our tail spacer to the _highestMeasuredFrameIndex to\n // prevent the user for hyperscrolling into un-measured area because otherwise content will\n // likely jump around as it renders in above the viewport.\n\n\n var end = this.props.getItemLayout ? itemCount - 1 : Math.min(itemCount - 1, this._highestMeasuredFrameIndex);\n\n var endFrame = this._getFrameMetricsApprox(end);\n\n var tailSpacerLength = endFrame.offset + endFrame.length - (lastFrame.offset + lastFrame.length);\n cells.push(\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses\n * an error found when Flow v0.111 was deployed. To see the error,\n * delete this comment and run Flow. */\n React.createElement(View, {\n key: \"$tail_spacer\",\n style: (_ref5 = {}, _ref5[spacerKey] = tailSpacerLength, _ref5)\n }));\n }\n } else if (ListEmptyComponent) {\n var _element = /*#__PURE__*/React.isValidElement(ListEmptyComponent) ? ListEmptyComponent :\n /*#__PURE__*/\n // $FlowFixMe\n React.createElement(ListEmptyComponent, null);\n\n cells.push( /*#__PURE__*/React.cloneElement(_element, {\n key: '$empty',\n onLayout: function onLayout(event) {\n _this3._onLayoutEmpty(event);\n\n if (_element.props.onLayout) {\n _element.props.onLayout(event);\n }\n },\n style: StyleSheet.compose(inversionStyle, _element.props.style)\n }));\n }\n\n if (ListFooterComponent) {\n var _element2 = /*#__PURE__*/React.isValidElement(ListFooterComponent) ? ListFooterComponent :\n /*#__PURE__*/\n // $FlowFixMe\n React.createElement(ListFooterComponent, null);\n\n cells.push( /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this._getFooterCellKey(),\n key: \"$footer\"\n }, /*#__PURE__*/React.createElement(View, {\n onLayout: this._onLayoutFooter,\n style: StyleSheet.compose(inversionStyle, this.props.ListFooterComponentStyle)\n }, // $FlowFixMe - Typing ReactNativeComponent revealed errors\n _element2)));\n }\n\n var scrollProps = _objectSpread(_objectSpread({}, this.props), {}, {\n onContentSizeChange: this._onContentSizeChange,\n onLayout: this._onLayout,\n onScroll: this._onScroll,\n onScrollBeginDrag: this._onScrollBeginDrag,\n onScrollEndDrag: this._onScrollEndDrag,\n onMomentumScrollBegin: this._onMomentumScrollBegin,\n onMomentumScrollEnd: this._onMomentumScrollEnd,\n scrollEventThrottle: this.props.scrollEventThrottle,\n // TODO: Android support\n stickyHeaderIndices: stickyHeaderIndices,\n style: inversionStyle ? [inversionStyle, this.props.style] : this.props.style\n });\n\n this._hasMore = this.state.last < this.props.getItemCount(this.props.data) - 1;\n var innerRet = /*#__PURE__*/React.createElement(VirtualizedListContextProvider, {\n value: {\n cellKey: null,\n getScrollMetrics: this._getScrollMetrics,\n horizontal: this.props.horizontal,\n getOutermostParentListRef: this._getOutermostParentListRef,\n getNestedChildState: this._getNestedChildState,\n registerAsNestedChild: this._registerAsNestedChild,\n unregisterAsNestedChild: this._unregisterAsNestedChild,\n debugInfo: this._getDebugInfo()\n }\n }, /*#__PURE__*/React.cloneElement((this.props.renderScrollComponent || this._defaultRenderScrollComponent)(scrollProps), {\n ref: this._captureScrollRef\n }, cells));\n var ret = innerRet;\n\n if (this.props.debug) {\n return /*#__PURE__*/React.createElement(View, {\n style: styles.debug\n }, ret, this._renderDebugOverlay());\n } else {\n return ret;\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var _this$props9 = this.props,\n data = _this$props9.data,\n extraData = _this$props9.extraData;\n\n if (data !== prevProps.data || extraData !== prevProps.extraData) {\n // clear the viewableIndices cache to also trigger\n // the onViewableItemsChanged callback with the new data\n this._viewabilityTuples.forEach(function (tuple) {\n tuple.viewabilityHelper.resetViewableIndices();\n });\n } // The `this._hiPriInProgress` is guaranteeing a hiPri cell update will only happen\n // once per fiber update. The `_scheduleCellsToRenderUpdate` will set it to true\n // if a hiPri update needs to perform. If `componentDidUpdate` is triggered with\n // `this._hiPriInProgress=true`, means it's triggered by the hiPri update. The\n // `_scheduleCellsToRenderUpdate` will check this condition and not perform\n // another hiPri update.\n\n\n var hiPriInProgress = this._hiPriInProgress;\n\n this._scheduleCellsToRenderUpdate(); // Make sure setting `this._hiPriInProgress` back to false after `componentDidUpdate`\n // is triggered with `this._hiPriInProgress = true`\n\n\n if (hiPriInProgress) {\n this._hiPriInProgress = false;\n }\n };\n\n _proto._computeBlankness = function _computeBlankness() {\n this._fillRateHelper.computeBlankness(this.props, this.state, this._scrollMetrics);\n };\n\n _proto._onCellLayout = function _onCellLayout(e, cellKey, index) {\n var layout = e.nativeEvent.layout;\n var next = {\n offset: this._selectOffset(layout),\n length: this._selectLength(layout),\n index: index,\n inLayout: true\n };\n var curr = this._frames[cellKey];\n\n if (!curr || next.offset !== curr.offset || next.length !== curr.length || index !== curr.index) {\n this._totalCellLength += next.length - (curr ? curr.length : 0);\n this._totalCellsMeasured += curr ? 0 : 1;\n this._averageCellLength = this._totalCellLength / this._totalCellsMeasured;\n this._frames[cellKey] = next;\n this._highestMeasuredFrameIndex = Math.max(this._highestMeasuredFrameIndex, index);\n\n this._scheduleCellsToRenderUpdate();\n } else {\n this._frames[cellKey].inLayout = true;\n }\n\n this._triggerRemeasureForChildListsInCell(cellKey);\n\n this._computeBlankness();\n\n this._updateViewableItems(this.props.data);\n };\n\n _proto._triggerRemeasureForChildListsInCell = function _triggerRemeasureForChildListsInCell(cellKey) {\n var childListKeys = this._cellKeysToChildListKeys.get(cellKey);\n\n if (childListKeys) {\n for (var _iterator2 = _createForOfIteratorHelperLoose(childListKeys), _step2; !(_step2 = _iterator2()).done;) {\n var childKey = _step2.value;\n\n var childList = this._nestedChildLists.get(childKey);\n\n childList && childList.ref && childList.ref.measureLayoutRelativeToContainingList();\n }\n }\n };\n\n _proto.measureLayoutRelativeToContainingList = function measureLayoutRelativeToContainingList() {\n var _this4 = this;\n\n // TODO (T35574538): findNodeHandle sometimes crashes with \"Unable to find\n // node on an unmounted component\" during scrolling\n try {\n if (!this._scrollRef) {\n return;\n } // We are assuming that getOutermostParentListRef().getScrollRef()\n // is a non-null reference to a ScrollView\n\n\n this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(), function (x, y, width, height) {\n _this4._offsetFromParentVirtualizedList = _this4._selectOffset({\n x: x,\n y: y\n });\n _this4._scrollMetrics.contentLength = _this4._selectLength({\n width: width,\n height: height\n });\n\n var scrollMetrics = _this4._convertParentScrollMetrics(_this4.context.getScrollMetrics());\n\n _this4._scrollMetrics.visibleLength = scrollMetrics.visibleLength;\n _this4._scrollMetrics.offset = scrollMetrics.offset;\n }, function (error) {\n console.warn(\"VirtualizedList: Encountered an error while measuring a list's\" + ' offset from its containing VirtualizedList.');\n });\n } catch (error) {\n console.warn('measureLayoutRelativeToContainingList threw an error', error.stack);\n }\n };\n\n _proto._getFooterCellKey = function _getFooterCellKey() {\n return this._getCellKey() + '-footer';\n };\n\n _proto._renderDebugOverlay = function _renderDebugOverlay() {\n var normalize = this._scrollMetrics.visibleLength / (this._scrollMetrics.contentLength || 1);\n var framesInLayout = [];\n var itemCount = this.props.getItemCount(this.props.data);\n\n for (var ii = 0; ii < itemCount; ii++) {\n var frame = this._getFrameMetricsApprox(ii);\n /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.68 was deployed. To see the error delete this\n * comment and run Flow. */\n\n\n if (frame.inLayout) {\n framesInLayout.push(frame);\n }\n }\n\n var windowTop = this._getFrameMetricsApprox(this.state.first).offset;\n\n var frameLast = this._getFrameMetricsApprox(this.state.last);\n\n var windowLen = frameLast.offset + frameLast.length - windowTop;\n var visTop = this._scrollMetrics.offset;\n var visLen = this._scrollMetrics.visibleLength;\n return /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlay]\n }, framesInLayout.map(function (f, ii) {\n return /*#__PURE__*/React.createElement(View, {\n key: 'f' + ii,\n style: [styles.debugOverlayBase, styles.debugOverlayFrame, {\n top: f.offset * normalize,\n height: f.length * normalize\n }]\n });\n }), /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlayFrameLast, {\n top: windowTop * normalize,\n height: windowLen * normalize\n }]\n }), /*#__PURE__*/React.createElement(View, {\n style: [styles.debugOverlayBase, styles.debugOverlayFrameVis, {\n top: visTop * normalize,\n height: visLen * normalize\n }]\n }));\n };\n\n _proto._selectLength = function _selectLength(metrics) {\n return !this.props.horizontal ? metrics.height : metrics.width;\n };\n\n _proto._selectOffset = function _selectOffset(metrics) {\n return !this.props.horizontal ? metrics.y : metrics.x;\n };\n\n _proto._maybeCallOnEndReached = function _maybeCallOnEndReached() {\n var _this$props10 = this.props,\n data = _this$props10.data,\n getItemCount = _this$props10.getItemCount,\n onEndReached = _this$props10.onEndReached,\n onEndReachedThreshold = _this$props10.onEndReachedThreshold;\n var _this$_scrollMetrics2 = this._scrollMetrics,\n contentLength = _this$_scrollMetrics2.contentLength,\n visibleLength = _this$_scrollMetrics2.visibleLength,\n offset = _this$_scrollMetrics2.offset;\n var distanceFromEnd = contentLength - visibleLength - offset;\n var threshold = onEndReachedThreshold ? onEndReachedThreshold * visibleLength : 2;\n\n if (onEndReached && this.state.last === getItemCount(data) - 1 && distanceFromEnd < threshold && this._scrollMetrics.contentLength !== this._sentEndForContentLength) {\n // Only call onEndReached once for a given content length\n this._sentEndForContentLength = this._scrollMetrics.contentLength;\n onEndReached({\n distanceFromEnd: distanceFromEnd\n });\n } else if (distanceFromEnd > threshold) {\n // If the user scrolls away from the end and back again cause\n // an onEndReached to be triggered again\n this._sentEndForContentLength = 0;\n }\n };\n\n _proto._scheduleCellsToRenderUpdate = function _scheduleCellsToRenderUpdate() {\n var _this$state2 = this.state,\n first = _this$state2.first,\n last = _this$state2.last;\n var _this$_scrollMetrics3 = this._scrollMetrics,\n offset = _this$_scrollMetrics3.offset,\n visibleLength = _this$_scrollMetrics3.visibleLength,\n velocity = _this$_scrollMetrics3.velocity;\n var itemCount = this.props.getItemCount(this.props.data);\n var hiPri = false;\n var scrollingThreshold =\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.63 was deployed. To see the error delete\n * this comment and run Flow. */\n this.props.onEndReachedThreshold * visibleLength / 2; // Mark as high priority if we're close to the start of the first item\n // But only if there are items before the first rendered item\n\n if (first > 0) {\n var distTop = offset - this._getFrameMetricsApprox(first).offset;\n\n hiPri = hiPri || distTop < 0 || velocity < -2 && distTop < scrollingThreshold;\n } // Mark as high priority if we're close to the end of the last item\n // But only if there are items after the last rendered item\n\n\n if (last < itemCount - 1) {\n var distBottom = this._getFrameMetricsApprox(last).offset - (offset + visibleLength);\n hiPri = hiPri || distBottom < 0 || velocity > 2 && distBottom < scrollingThreshold;\n } // Only trigger high-priority updates if we've actually rendered cells,\n // and with that size estimate, accurately compute how many cells we should render.\n // Otherwise, it would just render as many cells as it can (of zero dimension),\n // each time through attempting to render more (limited by maxToRenderPerBatch),\n // starving the renderer from actually laying out the objects and computing _averageCellLength.\n // If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate\n // We shouldn't do another hipri cellToRenderUpdate\n\n\n if (hiPri && (this._averageCellLength || this.props.getItemLayout) && !this._hiPriInProgress) {\n this._hiPriInProgress = true; // Don't worry about interactions when scrolling quickly; focus on filling content as fast\n // as possible.\n\n this._updateCellsToRenderBatcher.dispose({\n abort: true\n });\n\n this._updateCellsToRender();\n\n return;\n } else {\n this._updateCellsToRenderBatcher.schedule();\n }\n };\n\n _proto._updateViewableItems = function _updateViewableItems(data) {\n var _this5 = this;\n\n var getItemCount = this.props.getItemCount;\n\n this._viewabilityTuples.forEach(function (tuple) {\n tuple.viewabilityHelper.onUpdate(getItemCount(data), _this5._scrollMetrics.offset, _this5._scrollMetrics.visibleLength, _this5._getFrameMetrics, _this5._createViewToken, tuple.onViewableItemsChanged, _this5.state);\n });\n };\n\n return VirtualizedList;\n}(React.PureComponent);\n\nVirtualizedList.contextType = VirtualizedListContext;\nVirtualizedList.defaultProps = {\n disableVirtualization: false,\n horizontal: false,\n initialNumToRender: 10,\n keyExtractor: function keyExtractor(item, index) {\n if (item.key != null) {\n return item.key;\n }\n\n if (item.id != null) {\n return item.id;\n }\n\n _usedIndexForKey = true;\n\n if (item.type && item.type.displayName) {\n _keylessItemComponentName = item.type.displayName;\n }\n\n return String(index);\n },\n maxToRenderPerBatch: 10,\n onEndReachedThreshold: 2,\n // multiples of length\n scrollEventThrottle: 50,\n updateCellsBatchingPeriod: 50,\n windowSize: 21 // multiples of length\n\n};\n\nvar CellRenderer = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CellRenderer, _React$Component);\n\n function CellRenderer() {\n var _this6;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this6 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this6.state = {\n separatorProps: {\n highlighted: false,\n leadingItem: _this6.props.item\n }\n };\n _this6._separators = {\n highlight: function highlight() {\n var _this6$props = _this6.props,\n cellKey = _this6$props.cellKey,\n prevCellKey = _this6$props.prevCellKey;\n\n _this6.props.onUpdateSeparators([cellKey, prevCellKey], {\n highlighted: true\n });\n },\n unhighlight: function unhighlight() {\n var _this6$props2 = _this6.props,\n cellKey = _this6$props2.cellKey,\n prevCellKey = _this6$props2.prevCellKey;\n\n _this6.props.onUpdateSeparators([cellKey, prevCellKey], {\n highlighted: false\n });\n },\n updateProps: function updateProps(select, newProps) {\n var _this6$props3 = _this6.props,\n cellKey = _this6$props3.cellKey,\n prevCellKey = _this6$props3.prevCellKey;\n\n _this6.props.onUpdateSeparators([select === 'leading' ? prevCellKey : cellKey], newProps);\n }\n };\n return _this6;\n }\n\n CellRenderer.getDerivedStateFromProps = function getDerivedStateFromProps(props, prevState) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n leadingItem: props.item\n })\n };\n } // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not\n // reused by SectionList and we can keep VirtualizedList simpler.\n ;\n\n var _proto2 = CellRenderer.prototype;\n\n _proto2.updateSeparatorProps = function updateSeparatorProps(newProps) {\n this.setState(function (state) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n };\n });\n };\n\n _proto2.componentWillUnmount = function componentWillUnmount() {\n this.props.onUnmount(this.props.cellKey);\n };\n\n _proto2._renderElement = function _renderElement(renderItem, ListItemComponent, item, index) {\n if (renderItem && ListItemComponent) {\n console.warn('VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' + ' precedence over renderItem.');\n }\n\n if (ListItemComponent) {\n /* $FlowFixMe(>=0.108.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.108 was deployed. To see the error, delete\n * this comment and run Flow. */\n return /*#__PURE__*/React.createElement(ListItemComponent, {\n item: item,\n index: index,\n separators: this._separators\n });\n }\n\n if (renderItem) {\n return renderItem({\n item: item,\n index: index,\n separators: this._separators\n });\n }\n\n invariant(false, 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.');\n };\n\n _proto2.render = function render() {\n var _this$props11 = this.props,\n CellRendererComponent = _this$props11.CellRendererComponent,\n ItemSeparatorComponent = _this$props11.ItemSeparatorComponent,\n fillRateHelper = _this$props11.fillRateHelper,\n horizontal = _this$props11.horizontal,\n item = _this$props11.item,\n index = _this$props11.index,\n inversionStyle = _this$props11.inversionStyle,\n parentProps = _this$props11.parentProps;\n var renderItem = parentProps.renderItem,\n getItemLayout = parentProps.getItemLayout,\n ListItemComponent = parentProps.ListItemComponent;\n\n var element = this._renderElement(renderItem, ListItemComponent, item, index);\n\n var onLayout =\n /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.68 was deployed. To see the error delete this\n * comment and run Flow. */\n getItemLayout && !parentProps.debug && !fillRateHelper.enabled() ? undefined : this.props.onLayout; // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and\n // called explicitly by `ScrollViewStickyHeader`.\n\n var itemSeparator = ItemSeparatorComponent && /*#__PURE__*/React.createElement(ItemSeparatorComponent, this.state.separatorProps);\n var cellStyle = inversionStyle ? horizontal ? [styles.rowReverse, inversionStyle] : [styles.columnReverse, inversionStyle] : horizontal ? [styles.row, inversionStyle] : inversionStyle;\n var result = !CellRendererComponent ?\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.89 was deployed. To see the error, delete\n * this comment and run Flow. */\n React.createElement(View, {\n style: cellStyle,\n onLayout: onLayout\n }, element, itemSeparator) : /*#__PURE__*/React.createElement(CellRendererComponent, _extends({}, this.props, {\n style: cellStyle,\n onLayout: onLayout\n }), element, itemSeparator);\n return /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n cellKey: this.props.cellKey\n }, result);\n };\n\n return CellRenderer;\n}(React.Component);\n\nfunction describeNestedLists(childList) {\n var trace = 'VirtualizedList trace:\\n' + (\" Child (\" + (childList.horizontal ? 'horizontal' : 'vertical') + \"):\\n\") + (\" listKey: \" + childList.key + \"\\n\") + (\" cellKey: \" + childList.cellKey);\n var debugInfo = childList.parentDebugInfo;\n\n while (debugInfo) {\n trace += \"\\n Parent (\" + (debugInfo.horizontal ? 'horizontal' : 'vertical') + \"):\\n\" + (\" listKey: \" + debugInfo.listKey + \"\\n\") + (\" cellKey: \" + debugInfo.cellKey);\n debugInfo = debugInfo.parent;\n }\n\n return trace;\n}\n\nvar styles = StyleSheet.create({\n verticallyInverted: {\n transform: [{\n scaleY: -1\n }]\n },\n horizontallyInverted: {\n transform: [{\n scaleX: -1\n }]\n },\n row: {\n flexDirection: 'row'\n },\n rowReverse: {\n flexDirection: 'row-reverse'\n },\n columnReverse: {\n flexDirection: 'column-reverse'\n },\n debug: {\n flex: 1\n },\n debugOverlayBase: {\n position: 'absolute',\n top: 0,\n right: 0\n },\n debugOverlay: {\n bottom: 0,\n width: 20,\n borderColor: 'blue',\n borderWidth: 1\n },\n debugOverlayFrame: {\n left: 0,\n backgroundColor: 'orange'\n },\n debugOverlayFrameLast: {\n left: 0,\n borderColor: 'green',\n borderWidth: 2\n },\n debugOverlayFrameVis: {\n left: 0,\n borderColor: 'red',\n borderWidth: 2\n }\n});\nexport default VirtualizedList;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar emptyFunction = function emptyFunction() {};\n\nfunction StatusBar() {\n return null;\n}\n\nStatusBar.setBackgroundColor = emptyFunction;\nStatusBar.setBarStyle = emptyFunction;\nStatusBar.setHidden = emptyFunction;\nStatusBar.setNetworkActivityIndicatorVisible = emptyFunction;\nStatusBar.setTranslucent = emptyFunction;\nexport default StatusBar;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from './AnimatedValue';\nimport AnimatedWithChildren from './AnimatedWithChildren';\nimport invariant from 'fbjs/lib/invariant';\nvar _uniqueId = 1;\n/**\n * 2D Value for driving 2D animations, such as pan gestures. Almost identical\n * API to normal `Animated.Value`, but multiplexed.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html\n */\n\nvar AnimatedValueXY = /*#__PURE__*/function (_AnimatedWithChildren) {\n _inheritsLoose(AnimatedValueXY, _AnimatedWithChildren);\n\n function AnimatedValueXY(valueIn) {\n var _this;\n\n _this = _AnimatedWithChildren.call(this) || this;\n var value = valueIn || {\n x: 0,\n y: 0\n }; // fixme: shouldn't need `: any`\n\n if (typeof value.x === 'number' && typeof value.y === 'number') {\n _this.x = new AnimatedValue(value.x);\n _this.y = new AnimatedValue(value.y);\n } else {\n invariant(value.x instanceof AnimatedValue && value.y instanceof AnimatedValue, 'AnimatedValueXY must be initialized with an object of numbers or ' + 'AnimatedValues.');\n _this.x = value.x;\n _this.y = value.y;\n }\n\n _this._listeners = {};\n return _this;\n }\n /**\n * Directly set the value. This will stop any animations running on the value\n * and update all the bound properties.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#setvalue\n */\n\n\n var _proto = AnimatedValueXY.prototype;\n\n _proto.setValue = function setValue(value) {\n this.x.setValue(value.x);\n this.y.setValue(value.y);\n }\n /**\n * Sets an offset that is applied on top of whatever value is set, whether\n * via `setValue`, an animation, or `Animated.event`. Useful for compensating\n * things like the start of a pan gesture.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#setoffset\n */\n ;\n\n _proto.setOffset = function setOffset(offset) {\n this.x.setOffset(offset.x);\n this.y.setOffset(offset.y);\n }\n /**\n * Merges the offset value into the base value and resets the offset to zero.\n * The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#flattenoffset\n */\n ;\n\n _proto.flattenOffset = function flattenOffset() {\n this.x.flattenOffset();\n this.y.flattenOffset();\n }\n /**\n * Sets the offset value to the base value, and resets the base value to\n * zero. The final output of the value is unchanged.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#extractoffset\n */\n ;\n\n _proto.extractOffset = function extractOffset() {\n this.x.extractOffset();\n this.y.extractOffset();\n };\n\n _proto.__getValue = function __getValue() {\n return {\n x: this.x.__getValue(),\n y: this.y.__getValue()\n };\n }\n /**\n * Stops any animation and resets the value to its original.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#resetanimation\n */\n ;\n\n _proto.resetAnimation = function resetAnimation(callback) {\n this.x.resetAnimation();\n this.y.resetAnimation();\n callback && callback(this.__getValue());\n }\n /**\n * Stops any running animation or tracking. `callback` is invoked with the\n * final value after stopping the animation, which is useful for updating\n * state to match the animation position with layout.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#stopanimation\n */\n ;\n\n _proto.stopAnimation = function stopAnimation(callback) {\n this.x.stopAnimation();\n this.y.stopAnimation();\n callback && callback(this.__getValue());\n }\n /**\n * Adds an asynchronous listener to the value so you can observe updates from\n * animations. This is useful because there is no way to synchronously read\n * the value because it might be driven natively.\n *\n * Returns a string that serves as an identifier for the listener.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#addlistener\n */\n ;\n\n _proto.addListener = function addListener(callback) {\n var _this2 = this;\n\n var id = String(_uniqueId++);\n\n var jointCallback = function jointCallback(_ref) {\n var number = _ref.value;\n callback(_this2.__getValue());\n };\n\n this._listeners[id] = {\n x: this.x.addListener(jointCallback),\n y: this.y.addListener(jointCallback)\n };\n return id;\n }\n /**\n * Unregister a listener. The `id` param shall match the identifier\n * previously returned by `addListener()`.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#removelistener\n */\n ;\n\n _proto.removeListener = function removeListener(id) {\n this.x.removeListener(this._listeners[id].x);\n this.y.removeListener(this._listeners[id].y);\n delete this._listeners[id];\n }\n /**\n * Remove all registered listeners.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#removealllisteners\n */\n ;\n\n _proto.removeAllListeners = function removeAllListeners() {\n this.x.removeAllListeners();\n this.y.removeAllListeners();\n this._listeners = {};\n }\n /**\n * Converts `{x, y}` into `{left, top}` for use in style.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#getlayout\n */\n ;\n\n _proto.getLayout = function getLayout() {\n return {\n left: this.x,\n top: this.y\n };\n }\n /**\n * Converts `{x, y}` into a useable translation transform.\n *\n * See https://reactnative.dev/docs/animatedvaluexy.html#gettranslatetransform\n */\n ;\n\n _proto.getTranslateTransform = function getTranslateTransform() {\n return [{\n translateX: this.x\n }, {\n translateY: this.y\n }];\n };\n\n return AnimatedValueXY;\n}(AnimatedWithChildren);\n\nexport default AnimatedValueXY;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction emptyFunction() {}\n\nvar BackHandler = {\n exitApp: emptyFunction,\n addEventListener: function addEventListener() {\n return {\n remove: emptyFunction\n };\n },\n removeEventListener: emptyFunction\n};\nexport default BackHandler;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { createContext } from 'react';\nvar TextAncestorContext = /*#__PURE__*/createContext(false);\nexport default TextAncestorContext;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport ReactNativePropRegistry from './ReactNativePropRegistry';\nimport invariant from 'fbjs/lib/invariant';\n\nfunction getStyle(style) {\n if (typeof style === 'number') {\n return ReactNativePropRegistry.getByID(style);\n }\n\n return style;\n}\n\nfunction flattenStyle(style) {\n if (!style) {\n return undefined;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n invariant(style !== true, 'style may be false but not true');\n }\n\n if (!Array.isArray(style)) {\n return getStyle(style);\n }\n\n var result = {};\n\n for (var i = 0, styleLength = style.length; i < styleLength; ++i) {\n var computedStyle = flattenStyle(style[i]);\n\n if (computedStyle) {\n for (var key in computedStyle) {\n var value = computedStyle[key];\n result[key] = value;\n }\n }\n }\n\n return result;\n}\n\nexport default flattenStyle;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\n\nvar ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n canUseWorkers: typeof Worker !== 'undefined',\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n canUseViewport: canUseDOM && !!window.screen,\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\nmodule.exports = ExecutionEnvironment;","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nvar MAX_DIMENSIONS = 3;\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nexport function z(d) {\n return d.z;\n}\n\nvar initialRadius = 10,\n initialAngleRoll = Math.PI * (3 - Math.sqrt(5)), // Golden ratio angle\n initialAngleYaw = Math.PI * 20 / (9 + Math.sqrt(221)); // Markov irrational number\n\nexport default function(nodes, numDimensions) {\n numDimensions = numDimensions || 2;\n\n var nDim = Math.min(MAX_DIMENSIONS, Math.max(1, Math.round(numDimensions))),\n simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function (force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (nDim > 1) {\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n if (nDim > 2) {\n if (node.fz == null) node.z += node.vz *= velocityDecay;\n else node.z = node.fz, node.vz = 0;\n }\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (node.fz != null) node.z = node.fz;\n if (isNaN(node.x) || (nDim > 1 && isNaN(node.y)) || (nDim > 2 && isNaN(node.z))) {\n var radius = initialRadius * (nDim > 2 ? Math.cbrt(0.5 + i) : (nDim > 1 ? Math.sqrt(0.5 + i) : i)),\n rollAngle = i * initialAngleRoll,\n yawAngle = i * initialAngleYaw;\n\n if (nDim === 1) {\n node.x = radius;\n } else if (nDim === 2) {\n node.x = radius * Math.cos(rollAngle);\n node.y = radius * Math.sin(rollAngle);\n } else { // 3 dimensions: use spherical distribution along 2 irrational number angles\n node.x = radius * Math.sin(rollAngle) * Math.cos(yawAngle);\n node.y = radius * Math.cos(rollAngle);\n node.z = radius * Math.sin(rollAngle) * Math.sin(yawAngle);\n }\n }\n if (isNaN(node.vx) || (nDim > 1 && isNaN(node.vy)) || (nDim > 2 && isNaN(node.vz))) {\n node.vx = 0;\n if (nDim > 1) { node.vy = 0; }\n if (nDim > 2) { node.vz = 0; }\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random, nDim);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n numDimensions: function(_) {\n return arguments.length\n ? (nDim = Math.min(MAX_DIMENSIONS, Math.max(1, Math.round(_))), forces.forEach(initializeForce), simulation)\n : nDim;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function() {\n var args = Array.prototype.slice.call(arguments);\n var x = args.shift() || 0,\n y = (nDim > 1 ? args.shift() : null) || 0,\n z = (nDim > 2 ? args.shift() : null) || 0,\n radius = args.shift() || Infinity;\n\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n dz,\n d2,\n node,\n closest;\n\n radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - (node.y || 0);\n dz = z - (node.z ||0);\n d2 = dx * dx + dy * dy + dz * dz;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n","const getVariableName = require('./getVariableName');\n\nmodule.exports = function createPatternBuilder(dimension) {\n\n return pattern;\n \n function pattern(template, config) {\n let indent = (config && config.indent) || 0;\n let join = (config && config.join !== undefined) ? config.join : '\\n';\n let indentString = Array(indent + 1).join(' ');\n let buffer = [];\n for (let i = 0; i < dimension; ++i) {\n let variableName = getVariableName(i);\n let prefix = (i === 0) ? '' : indentString;\n buffer.push(prefix + template.replace(/{var}/g, variableName));\n }\n return buffer.join(join);\n }\n};\n","function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}\nmodule.exports = _arity;","import type * as React from 'react';\nimport type {\n DefaultRouterOptions,\n NavigationState,\n NavigationAction,\n InitialState,\n PartialState,\n Route,\n ParamListBase,\n} from '@react-navigation/routers';\n\nexport type DefaultNavigatorOptions<\n ScreenOptions extends {},\n ParamList extends ParamListBase = ParamListBase\n> = DefaultRouterOptions<Extract<keyof ParamList, string>> & {\n /**\n * Children React Elements to extract the route configuration from.\n * Only `Screen` components are supported as children.\n */\n children: React.ReactNode;\n /**\n * Default options for all screens under this navigator.\n */\n screenOptions?:\n | ScreenOptions\n | ((props: {\n route: RouteProp<ParamList, keyof ParamList>;\n navigation: any;\n }) => ScreenOptions);\n};\n\nexport type EventMapBase = Record<\n string,\n { data?: any; canPreventDefault?: boolean }\n>;\n\nexport type EventMapCore<State extends NavigationState> = {\n focus: { data: undefined };\n blur: { data: undefined };\n state: { data: { state: State } };\n beforeRemove: { data: { action: NavigationAction }; canPreventDefault: true };\n};\n\nexport type EventArg<\n EventName extends string,\n CanPreventDefault extends boolean | undefined = false,\n Data = undefined\n> = {\n /**\n * Type of the event (e.g. `focus`, `blur`)\n */\n readonly type: EventName;\n readonly target?: string;\n} & (CanPreventDefault extends true\n ? {\n /**\n * Whether `event.preventDefault()` was called on this event object.\n */\n readonly defaultPrevented: boolean;\n /**\n * Prevent the default action which happens on this event.\n */\n preventDefault(): void;\n }\n : {}) &\n (undefined extends Data\n ? { readonly data?: Readonly<Data> }\n : { readonly data: Readonly<Data> });\n\nexport type EventListenerCallback<\n EventMap extends EventMapBase,\n EventName extends keyof EventMap\n> = (\n e: EventArg<\n Extract<EventName, string>,\n EventMap[EventName]['canPreventDefault'],\n EventMap[EventName]['data']\n >\n) => void;\n\nexport type EventConsumer<EventMap extends EventMapBase> = {\n /**\n * Subscribe to events from the parent navigator.\n *\n * @param type Type of the event (e.g. `focus`, `blur`)\n * @param callback Callback listener which is executed upon receiving the event.\n */\n addListener<EventName extends Extract<keyof EventMap, string>>(\n type: EventName,\n callback: EventListenerCallback<EventMap, EventName>\n ): () => void;\n removeListener<EventName extends Extract<keyof EventMap, string>>(\n type: EventName,\n callback: EventListenerCallback<EventMap, EventName>\n ): void;\n};\n\nexport type EventEmitter<EventMap extends EventMapBase> = {\n /**\n * Emit an event to child screens.\n *\n * @param options.type Type of the event (e.g. `focus`, `blur`)\n * @param [options.data] Optional information regarding the event.\n * @param [options.target] Key of the target route which should receive the event.\n * If not specified, all routes receive the event.\n */\n emit<EventName extends Extract<keyof EventMap, string>>(\n options: {\n type: EventName;\n target?: string;\n } & (EventMap[EventName]['canPreventDefault'] extends true\n ? { canPreventDefault: true }\n : {}) &\n (undefined extends EventMap[EventName]['data']\n ? { data?: EventMap[EventName]['data'] }\n : { data: EventMap[EventName]['data'] })\n ): EventArg<\n EventName,\n EventMap[EventName]['canPreventDefault'],\n EventMap[EventName]['data']\n >;\n};\n\nexport class PrivateValueStore<A, B, C> {\n /**\n * UGLY HACK! DO NOT USE THE TYPE!!!\n *\n * TypeScript requires a type to be used to be able to infer it.\n * The type should exist as its own without any operations such as union.\n * So we need to figure out a way to store this type in a property.\n * The problem with a normal property is that it shows up in intelliSense.\n * Adding private keyword works, but the annotation is stripped away in declaration.\n * Turns out if we use an empty string, it doesn't show up in intelliSense.\n */\n protected ''?: { a: A; b: B; c: C };\n}\n\ntype NavigationHelpersCommon<\n ParamList extends ParamListBase,\n State extends NavigationState = NavigationState\n> = {\n /**\n * Dispatch an action or an update function to the router.\n * The update function will receive the current state,\n *\n * @param action Action object or update function.\n */\n dispatch(\n action: NavigationAction | ((state: State) => NavigationAction)\n ): void;\n\n /**\n * Navigate to a route in current navigation tree.\n *\n * @param name Name of the route to navigate to.\n * @param [params] Params object for the route.\n */\n navigate<RouteName extends keyof ParamList>(\n ...args: undefined extends ParamList[RouteName]\n ? [RouteName] | [RouteName, ParamList[RouteName]]\n : [RouteName, ParamList[RouteName]]\n ): void;\n\n /**\n * Navigate to a route in current navigation tree.\n *\n * @param route Object with `key` or `name` for the route to navigate to, and a `params` object.\n */\n navigate<RouteName extends keyof ParamList>(\n route:\n | { key: string; params?: ParamList[RouteName] }\n | { name: RouteName; key?: string; params: ParamList[RouteName] }\n ): void;\n\n /**\n * Reset the navigation state to the provided state.\n *\n * @param state Navigation state object.\n */\n reset(state: PartialState<State> | State): void;\n\n /**\n * Go back to the previous route in history.\n */\n goBack(): void;\n\n /**\n * Check if the screen is focused. The method returns `true` if focused, `false` otherwise.\n * Note that this method doesn't re-render screen when the focus changes. So don't use it in `render`.\n * To get notified of focus changes, use `addListener('focus', cb)` and `addListener('blur', cb)`.\n * To conditionally render content based on focus state, use the `useIsFocused` hook.\n */\n isFocused(): boolean;\n\n /**\n * Check if dispatching back action will be handled by navigation.\n * Note that this method doesn't re-render screen when the result changes. So don't use it in `render`.\n */\n canGoBack(): boolean;\n\n /**\n * Returns the parent navigator, if any. Reason why the function is called\n * dangerouslyGetParent is to warn developers against overusing it to eg. get parent\n * of parent and other hard-to-follow patterns.\n */\n dangerouslyGetParent<T = NavigationProp<ParamListBase> | undefined>(): T;\n\n /**\n * Returns the navigator's state. Reason why the function is called\n * dangerouslyGetState is to discourage developers to use internal navigation's state.\n * Note that this method doesn't re-render screen when the result changes. So don't use it in `render`.\n */\n dangerouslyGetState(): State;\n} & PrivateValueStore<ParamList, keyof ParamList, {}>;\n\nexport type NavigationHelpers<\n ParamList extends ParamListBase,\n EventMap extends EventMapBase = {}\n> = NavigationHelpersCommon<ParamList> &\n EventEmitter<EventMap> & {\n /**\n * Update the param object for the route.\n * The new params will be shallow merged with the old one.\n *\n * @param params Params object for the current route.\n */\n setParams<RouteName extends keyof ParamList>(\n params: Partial<ParamList[RouteName]>\n ): void;\n };\n\nexport type NavigationContainerProps = {\n /**\n * Initial navigation state for the child navigators.\n */\n initialState?: InitialState;\n /**\n * Callback which is called with the latest navigation state when it changes.\n */\n onStateChange?: (state: NavigationState | undefined) => void;\n /**\n * Callback which is called when an action is not handled.\n */\n onUnhandledAction?: (action: NavigationAction) => void;\n /**\n * Whether this navigation container should be independent of parent containers.\n * If this is not set to `true`, this container cannot be nested inside another container.\n * Setting it to `true` disconnects any children navigators from parent container.\n */\n independent?: boolean;\n /**\n * Children elements to render.\n */\n children: React.ReactNode;\n};\n\nexport type NavigationProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = string,\n State extends NavigationState = NavigationState<ParamList>,\n ScreenOptions extends {} = {},\n EventMap extends EventMapBase = {}\n> = NavigationHelpersCommon<ParamList, State> & {\n /**\n * Update the param object for the route.\n * The new params will be shallow merged with the old one.\n *\n * @param params Params object for the current route.\n */\n setParams(params: Partial<ParamList[RouteName]>): void;\n\n /**\n * Update the options for the route.\n * The options object will be shallow merged with default options object.\n *\n * @param options Options object for the route.\n */\n setOptions(options: Partial<ScreenOptions>): void;\n} & EventConsumer<EventMap & EventMapCore<State>> &\n PrivateValueStore<ParamList, RouteName, EventMap>;\n\nexport type RouteProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList\n> = Route<Extract<RouteName, string>, ParamList[RouteName]>;\n\nexport type CompositeNavigationProp<\n A extends NavigationProp<ParamListBase, string, any, any>,\n B extends NavigationHelpersCommon<ParamListBase, any>\n> = Omit<A & B, keyof NavigationProp<any>> &\n NavigationProp<\n /**\n * Param list from both navigation objects needs to be combined\n * For example, we should be able to navigate to screens in both A and B\n */\n (A extends NavigationHelpersCommon<infer T> ? T : never) &\n (B extends NavigationHelpersCommon<infer U> ? U : never),\n /**\n * The route name should refer to the route name specified in the first type\n * Ideally it should work for any of them, but it's not possible to infer that way\n */\n A extends NavigationProp<any, infer R> ? R : string,\n /**\n * The type of state should refer to the state specified in the first type\n */\n A extends NavigationProp<any, any, infer S> ? S : NavigationState,\n /**\n * Screen options from both navigation objects needs to be combined\n * This allows typechecking `setOptions`\n */\n (A extends NavigationProp<any, any, any, infer O> ? O : {}) &\n (B extends NavigationProp<any, any, any, infer P> ? P : {}),\n /**\n * Event consumer config should refer to the config specified in the first type\n * This allows typechecking `addListener`/`removeListener`\n */\n A extends NavigationProp<any, any, any, any, infer E> ? E : {}\n >;\n\nexport type Descriptor<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = string,\n State extends NavigationState = NavigationState,\n ScreenOptions extends {} = {},\n EventMap extends EventMapBase = {}\n> = {\n /**\n * Render the component associated with this route.\n */\n render(): JSX.Element;\n\n /**\n * Options for the route.\n */\n options: ScreenOptions;\n\n /**\n * Navigation object for the screen\n */\n navigation: NavigationProp<\n ParamList,\n RouteName,\n State,\n ScreenOptions,\n EventMap\n >;\n};\n\nexport type ScreenListeners<\n State extends NavigationState,\n EventMap extends EventMapBase\n> = Partial<\n {\n [EventName in keyof (EventMap &\n EventMapCore<State>)]: EventListenerCallback<EventMap, EventName>;\n }\n>;\n\nexport type RouteConfig<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList,\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n> = {\n /**\n * Route name of this screen.\n */\n name: RouteName;\n\n /**\n * Navigator options for this screen.\n */\n options?:\n | ScreenOptions\n | ((props: {\n route: RouteProp<ParamList, RouteName>;\n navigation: any;\n }) => ScreenOptions);\n\n /**\n * Event listeners for this screen.\n */\n listeners?:\n | ScreenListeners<State, EventMap>\n | ((props: {\n route: RouteProp<ParamList, RouteName>;\n navigation: any;\n }) => ScreenListeners<State, EventMap>);\n\n /**\n * Function to return an unique ID for this screen.\n * Receives an object with the route params.\n * For a given screen name, there will always be only one screen corresponding to an ID.\n * If `undefined` is returned, it acts same as no `getId` being specified.\n */\n getId?: ({ params }: { params: ParamList[RouteName] }) => string | undefined;\n\n /**\n * Initial params object for the route.\n */\n initialParams?: Partial<ParamList[RouteName]>;\n} & (\n | {\n /**\n * React component to render for this screen.\n */\n component: React.ComponentType<any>;\n getComponent?: never;\n children?: never;\n }\n | {\n /**\n * Lazily get a React component to render for this screen.\n */\n getComponent: () => React.ComponentType<any>;\n component?: never;\n children?: never;\n }\n | {\n /**\n * Render callback to render content of this screen.\n */\n children: (props: {\n route: RouteProp<ParamList, RouteName>;\n navigation: any;\n }) => React.ReactNode;\n component?: never;\n getComponent?: never;\n }\n);\n\nexport type NavigationContainerEventMap = {\n /**\n * Event which fires when the navigation state changes.\n */\n state: {\n data: {\n /**\n * The updated state object after the state change.\n */\n state: NavigationState | PartialState<NavigationState> | undefined;\n };\n };\n /**\n * Event which fires when current options changes.\n */\n options: { data: { options: object } };\n /**\n * Event which fires when an action is dispatched.\n * Only intended for debugging purposes, don't use it for app logic.\n * This event will be emitted before state changes have been applied.\n */\n __unsafe_action__: {\n data: {\n /**\n * The action object which was dispatched.\n */\n action: NavigationAction;\n /**\n * Whether the action was a no-op, i.e. resulted any state changes.\n */\n noop: boolean;\n };\n };\n};\n\nexport type NavigationContainerRef = NavigationHelpers<ParamListBase> &\n EventConsumer<NavigationContainerEventMap> & {\n /**\n * Reset the navigation state of the root navigator to the provided state.\n *\n * @param state Navigation state object.\n */\n resetRoot(state?: PartialState<NavigationState> | NavigationState): void;\n /**\n * Get the rehydrated navigation state of the navigation tree.\n */\n getRootState(): NavigationState;\n /**\n * Get the currently focused navigation route.\n */\n getCurrentRoute(): Route<string> | undefined;\n /**\n * Get the currently focused route's options.\n */\n getCurrentOptions(): object | undefined;\n };\n\nexport type TypedNavigator<\n ParamList extends ParamListBase,\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase,\n Navigator extends React.ComponentType<any>\n> = {\n /**\n * Navigator component which manages the child screens.\n */\n Navigator: React.ComponentType<\n Omit<\n React.ComponentProps<Navigator>,\n keyof DefaultNavigatorOptions<any, any>\n > &\n DefaultNavigatorOptions<ScreenOptions, ParamList>\n >;\n /**\n * Component used for specifying route configuration.\n */\n Screen: <RouteName extends keyof ParamList>(\n _: RouteConfig<ParamList, RouteName, State, ScreenOptions, EventMap>\n ) => null;\n};\n\nexport type NavigatorScreenParams<\n ParamList,\n State extends NavigationState = NavigationState\n> =\n | {\n screen?: never;\n params?: never;\n initial?: never;\n state: PartialState<State> | State | undefined;\n }\n | {\n [RouteName in keyof ParamList]: undefined extends ParamList[RouteName]\n ? {\n screen: RouteName;\n params?: ParamList[RouteName];\n initial?: boolean;\n state?: never;\n }\n : {\n screen: RouteName;\n params: ParamList[RouteName];\n initial?: boolean;\n state?: never;\n };\n }[keyof ParamList];\n\nexport type PathConfig = {\n path?: string;\n exact?: boolean;\n parse?: Record<string, (value: string) => any>;\n stringify?: Record<string, (value: any) => string>;\n screens?: PathConfigMap;\n initialRouteName?: string;\n};\n\nexport type PathConfigMap = {\n [routeName: string]: string | PathConfig;\n};\n","import type { Theme } from '../types';\n\nconst DefaultTheme: Theme = {\n dark: false,\n colors: {\n primary: 'rgb(0, 122, 255)',\n background: 'rgb(242, 242, 242)',\n card: 'rgb(255, 255, 255)',\n text: 'rgb(28, 28, 30)',\n border: 'rgb(216, 216, 216)',\n notification: 'rgb(255, 59, 48)',\n },\n};\n\nexport default DefaultTheme;\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport useLayoutEffect from '../useLayoutEffect';\nimport UIManager from '../../exports/UIManager';\nvar DOM_LAYOUT_HANDLER_NAME = '__reactLayoutHandler';\nvar didWarn = !canUseDOM;\nvar resizeObserver = null;\n\nfunction getResizeObserver() {\n if (canUseDOM && typeof window.ResizeObserver !== 'undefined') {\n if (resizeObserver == null) {\n resizeObserver = new window.ResizeObserver(function (entries) {\n entries.forEach(function (entry) {\n var node = entry.target;\n var onLayout = node[DOM_LAYOUT_HANDLER_NAME];\n\n if (typeof onLayout === 'function') {\n // We still need to measure the view because browsers don't yet provide\n // border-box dimensions in the entry\n UIManager.measure(node, function (x, y, width, height, left, top) {\n var event = {\n // $FlowFixMe\n nativeEvent: {\n layout: {\n x: x,\n y: y,\n width: width,\n height: height,\n left: left,\n top: top\n }\n },\n timeStamp: Date.now()\n };\n Object.defineProperty(event.nativeEvent, 'target', {\n enumerable: true,\n get: function get() {\n return entry.target;\n }\n });\n onLayout(event);\n });\n }\n });\n });\n }\n } else if (!didWarn) {\n if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') {\n console.warn('onLayout relies on ResizeObserver which is not supported by your browser. ' + 'Please include a polyfill, e.g., https://github.com/que-etc/resize-observer-polyfill.');\n didWarn = true;\n }\n }\n\n return resizeObserver;\n}\n\nexport default function useElementLayout(ref, onLayout) {\n var observer = getResizeObserver();\n useLayoutEffect(function () {\n var node = ref.current;\n\n if (node != null) {\n node[DOM_LAYOUT_HANDLER_NAME] = onLayout;\n }\n }, [ref, onLayout]); // Observing is done in a separate effect to avoid this effect running\n // when 'onLayout' changes.\n\n useLayoutEffect(function () {\n var node = ref.current;\n\n if (node != null && observer != null) {\n if (typeof node[DOM_LAYOUT_HANDLER_NAME] === 'function') {\n observer.observe(node);\n } else {\n observer.unobserve(node);\n }\n }\n\n return function () {\n if (node != null && observer != null) {\n observer.unobserve(node);\n }\n };\n }, [ref, observer]);\n}","/*\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\nfunction normalizeColor(color) {\n var match;\n\n if (typeof color === 'number') {\n if (color >>> 0 === color && color >= 0 && color <= 0xffffffff) {\n return color;\n }\n return null;\n }\n\n // Ordered based on occurrences on Facebook codebase\n if ((match = matchers.hex6.exec(color))) {\n return parseInt(match[1] + 'ff', 16) >>> 0;\n }\n\n if (names.hasOwnProperty(color)) {\n return names[color];\n }\n\n if ((match = matchers.rgb.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.rgba.exec(color))) {\n return (\n parse255(match[1]) << 24 | // r\n parse255(match[2]) << 16 | // g\n parse255(match[3]) << 8 | // b\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n if ((match = matchers.hex3.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n 'ff', // a\n 16\n ) >>> 0;\n }\n\n // https://drafts.csswg.org/css-color-4/#hex-notation\n if ((match = matchers.hex8.exec(color))) {\n return parseInt(match[1], 16) >>> 0;\n }\n\n if ((match = matchers.hex4.exec(color))) {\n return parseInt(\n match[1] + match[1] + // r\n match[2] + match[2] + // g\n match[3] + match[3] + // b\n match[4] + match[4], // a\n 16\n ) >>> 0;\n }\n\n if ((match = matchers.hsl.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n 0x000000ff // a\n ) >>> 0;\n }\n\n if ((match = matchers.hsla.exec(color))) {\n return (\n hslToRgb(\n parse360(match[1]), // h\n parsePercentage(match[2]), // s\n parsePercentage(match[3]) // l\n ) |\n parse1(match[4]) // a\n ) >>> 0;\n }\n\n return null;\n}\n\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\n\nfunction hslToRgb(h, s, l) {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n var r = hue2rgb(p, q, h + 1 / 3);\n var g = hue2rgb(p, q, h);\n var b = hue2rgb(p, q, h - 1 / 3);\n\n return (\n Math.round(r * 255) << 24 |\n Math.round(g * 255) << 16 |\n Math.round(b * 255) << 8\n );\n}\n\n// var INTEGER = '[-+]?\\\\d+';\nvar NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+';\nvar PERCENTAGE = NUMBER + '%';\n\nfunction toArray(arrayLike) {\n return Array.prototype.slice.call(arrayLike, 0);\n}\n\nfunction call() {\n return '\\\\(\\\\s*(' + toArray(arguments).join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nvar matchers = {\n rgb: new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER)),\n rgba: new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER)),\n hsl: new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE)),\n hsla: new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER)),\n hex3: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex4: /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#([0-9a-fA-F]{6})$/,\n hex8: /^#([0-9a-fA-F]{8})$/,\n};\n\nfunction parse255(str) {\n var int = parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\n\nfunction parse360(str) {\n var int = parseFloat(str);\n return (((int % 360) + 360) % 360) / 360;\n}\n\nfunction parse1(str) {\n var num = parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\n\nfunction parsePercentage(str) {\n // parseFloat conveniently ignores the final %\n var int = parseFloat(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\n\nvar names = {\n transparent: 0x00000000,\n\n // http://www.w3.org/TR/css3-color/#svg-color\n aliceblue: 0xf0f8ffff,\n antiquewhite: 0xfaebd7ff,\n aqua: 0x00ffffff,\n aquamarine: 0x7fffd4ff,\n azure: 0xf0ffffff,\n beige: 0xf5f5dcff,\n bisque: 0xffe4c4ff,\n black: 0x000000ff,\n blanchedalmond: 0xffebcdff,\n blue: 0x0000ffff,\n blueviolet: 0x8a2be2ff,\n brown: 0xa52a2aff,\n burlywood: 0xdeb887ff,\n burntsienna: 0xea7e5dff,\n cadetblue: 0x5f9ea0ff,\n chartreuse: 0x7fff00ff,\n chocolate: 0xd2691eff,\n coral: 0xff7f50ff,\n cornflowerblue: 0x6495edff,\n cornsilk: 0xfff8dcff,\n crimson: 0xdc143cff,\n cyan: 0x00ffffff,\n darkblue: 0x00008bff,\n darkcyan: 0x008b8bff,\n darkgoldenrod: 0xb8860bff,\n darkgray: 0xa9a9a9ff,\n darkgreen: 0x006400ff,\n darkgrey: 0xa9a9a9ff,\n darkkhaki: 0xbdb76bff,\n darkmagenta: 0x8b008bff,\n darkolivegreen: 0x556b2fff,\n darkorange: 0xff8c00ff,\n darkorchid: 0x9932ccff,\n darkred: 0x8b0000ff,\n darksalmon: 0xe9967aff,\n darkseagreen: 0x8fbc8fff,\n darkslateblue: 0x483d8bff,\n darkslategray: 0x2f4f4fff,\n darkslategrey: 0x2f4f4fff,\n darkturquoise: 0x00ced1ff,\n darkviolet: 0x9400d3ff,\n deeppink: 0xff1493ff,\n deepskyblue: 0x00bfffff,\n dimgray: 0x696969ff,\n dimgrey: 0x696969ff,\n dodgerblue: 0x1e90ffff,\n firebrick: 0xb22222ff,\n floralwhite: 0xfffaf0ff,\n forestgreen: 0x228b22ff,\n fuchsia: 0xff00ffff,\n gainsboro: 0xdcdcdcff,\n ghostwhite: 0xf8f8ffff,\n gold: 0xffd700ff,\n goldenrod: 0xdaa520ff,\n gray: 0x808080ff,\n green: 0x008000ff,\n greenyellow: 0xadff2fff,\n grey: 0x808080ff,\n honeydew: 0xf0fff0ff,\n hotpink: 0xff69b4ff,\n indianred: 0xcd5c5cff,\n indigo: 0x4b0082ff,\n ivory: 0xfffff0ff,\n khaki: 0xf0e68cff,\n lavender: 0xe6e6faff,\n lavenderblush: 0xfff0f5ff,\n lawngreen: 0x7cfc00ff,\n lemonchiffon: 0xfffacdff,\n lightblue: 0xadd8e6ff,\n lightcoral: 0xf08080ff,\n lightcyan: 0xe0ffffff,\n lightgoldenrodyellow: 0xfafad2ff,\n lightgray: 0xd3d3d3ff,\n lightgreen: 0x90ee90ff,\n lightgrey: 0xd3d3d3ff,\n lightpink: 0xffb6c1ff,\n lightsalmon: 0xffa07aff,\n lightseagreen: 0x20b2aaff,\n lightskyblue: 0x87cefaff,\n lightslategray: 0x778899ff,\n lightslategrey: 0x778899ff,\n lightsteelblue: 0xb0c4deff,\n lightyellow: 0xffffe0ff,\n lime: 0x00ff00ff,\n limegreen: 0x32cd32ff,\n linen: 0xfaf0e6ff,\n magenta: 0xff00ffff,\n maroon: 0x800000ff,\n mediumaquamarine: 0x66cdaaff,\n mediumblue: 0x0000cdff,\n mediumorchid: 0xba55d3ff,\n mediumpurple: 0x9370dbff,\n mediumseagreen: 0x3cb371ff,\n mediumslateblue: 0x7b68eeff,\n mediumspringgreen: 0x00fa9aff,\n mediumturquoise: 0x48d1ccff,\n mediumvioletred: 0xc71585ff,\n midnightblue: 0x191970ff,\n mintcream: 0xf5fffaff,\n mistyrose: 0xffe4e1ff,\n moccasin: 0xffe4b5ff,\n navajowhite: 0xffdeadff,\n navy: 0x000080ff,\n oldlace: 0xfdf5e6ff,\n olive: 0x808000ff,\n olivedrab: 0x6b8e23ff,\n orange: 0xffa500ff,\n orangered: 0xff4500ff,\n orchid: 0xda70d6ff,\n palegoldenrod: 0xeee8aaff,\n palegreen: 0x98fb98ff,\n paleturquoise: 0xafeeeeff,\n palevioletred: 0xdb7093ff,\n papayawhip: 0xffefd5ff,\n peachpuff: 0xffdab9ff,\n peru: 0xcd853fff,\n pink: 0xffc0cbff,\n plum: 0xdda0ddff,\n powderblue: 0xb0e0e6ff,\n purple: 0x800080ff,\n rebeccapurple: 0x663399ff,\n red: 0xff0000ff,\n rosybrown: 0xbc8f8fff,\n royalblue: 0x4169e1ff,\n saddlebrown: 0x8b4513ff,\n salmon: 0xfa8072ff,\n sandybrown: 0xf4a460ff,\n seagreen: 0x2e8b57ff,\n seashell: 0xfff5eeff,\n sienna: 0xa0522dff,\n silver: 0xc0c0c0ff,\n skyblue: 0x87ceebff,\n slateblue: 0x6a5acdff,\n slategray: 0x708090ff,\n slategrey: 0x708090ff,\n snow: 0xfffafaff,\n springgreen: 0x00ff7fff,\n steelblue: 0x4682b4ff,\n tan: 0xd2b48cff,\n teal: 0x008080ff,\n thistle: 0xd8bfd8ff,\n tomato: 0xff6347ff,\n turquoise: 0x40e0d0ff,\n violet: 0xee82eeff,\n wheat: 0xf5deb3ff,\n white: 0xffffffff,\n whitesmoke: 0xf5f5f5ff,\n yellow: 0xffff00ff,\n yellowgreen: 0x9acd32ff,\n};\n\nfunction rgba(colorInt) {\n var r = Math.round(((colorInt & 0xff000000) >>> 24));\n var g = Math.round(((colorInt & 0x00ff0000) >>> 16));\n var b = Math.round(((colorInt & 0x0000ff00) >>> 8));\n var a = ((colorInt & 0x000000ff) >>> 0) / 255;\n return {\n r: r,\n g: g,\n b: b,\n a: a,\n };\n};\n\nnormalizeColor.rgba = rgba;\n\nmodule.exports = normalizeColor;\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport NativeAnimatedHelper from '../NativeAnimatedHelper';\nvar startNativeAnimationNextId = 1; // Important note: start() and stop() will only be called at most once.\n// Once an animation has been stopped or finished its course, it will\n// not be reused.\n\nvar Animation = /*#__PURE__*/function () {\n function Animation() {}\n\n var _proto = Animation.prototype;\n\n _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {};\n\n _proto.stop = function stop() {\n if (this.__nativeId) {\n NativeAnimatedHelper.API.stopAnimation(this.__nativeId);\n }\n };\n\n _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n // Subclasses that have corresponding animation implementation done in native\n // should override this method\n throw new Error('This animation type cannot be offloaded to native');\n } // Helper function for subclasses to make sure onEnd is only called once.\n ;\n\n _proto.__debouncedOnEnd = function __debouncedOnEnd(result) {\n var onEnd = this.__onEnd;\n this.__onEnd = null;\n onEnd && onEnd(result);\n };\n\n _proto.__startNativeAnimation = function __startNativeAnimation(animatedValue) {\n var startNativeAnimationWaitId = startNativeAnimationNextId + \":startAnimation\";\n startNativeAnimationNextId += 1;\n NativeAnimatedHelper.API.setWaitingForIdentifier(startNativeAnimationWaitId);\n\n try {\n animatedValue.__makeNative();\n\n this.__nativeId = NativeAnimatedHelper.generateNewAnimationId();\n NativeAnimatedHelper.API.startAnimatingNode(this.__nativeId, animatedValue.__getNativeTag(), this.__getNativeAnimationConfig(), this.__debouncedOnEnd.bind(this));\n } catch (e) {\n throw e;\n } finally {\n NativeAnimatedHelper.API.unsetWaitingForIdentifier(startNativeAnimationWaitId);\n }\n };\n\n return Animation;\n}();\n\nexport default Animation;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport multiplyStyleLengthValue from '../../modules/multiplyStyleLengthValue';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar emptyObject = {};\nvar thumbDefaultBoxShadow = '0px 1px 3px rgba(0,0,0,0.5)';\nvar thumbFocusedBoxShadow = thumbDefaultBoxShadow + \", 0 0 0 10px rgba(0,0,0,0.1)\";\nvar Switch = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var accessibilityLabel = props.accessibilityLabel,\n _props$activeThumbCol = props.activeThumbColor,\n activeThumbColor = _props$activeThumbCol === void 0 ? '#009688' : _props$activeThumbCol,\n _props$activeTrackCol = props.activeTrackColor,\n activeTrackColor = _props$activeTrackCol === void 0 ? '#A3D3CF' : _props$activeTrackCol,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n onValueChange = props.onValueChange,\n _props$style = props.style,\n style = _props$style === void 0 ? emptyObject : _props$style,\n _props$thumbColor = props.thumbColor,\n thumbColor = _props$thumbColor === void 0 ? '#FAFAFA' : _props$thumbColor,\n _props$trackColor = props.trackColor,\n trackColor = _props$trackColor === void 0 ? '#939393' : _props$trackColor,\n _props$value = props.value,\n value = _props$value === void 0 ? false : _props$value,\n other = _objectWithoutPropertiesLoose(props, [\"accessibilityLabel\", \"activeThumbColor\", \"activeTrackColor\", \"disabled\", \"onValueChange\", \"style\", \"thumbColor\", \"trackColor\", \"value\"]);\n\n var thumbRef = React.useRef(null);\n\n function handleChange(event) {\n if (onValueChange != null) {\n onValueChange(event.nativeEvent.target.checked);\n }\n }\n\n function handleFocusState(event) {\n var isFocused = event.nativeEvent.type === 'focus';\n var boxShadow = isFocused ? thumbFocusedBoxShadow : thumbDefaultBoxShadow;\n\n if (thumbRef.current != null) {\n thumbRef.current.style.boxShadow = boxShadow;\n }\n }\n\n var _StyleSheet$flatten = StyleSheet.flatten(style),\n styleHeight = _StyleSheet$flatten.height,\n styleWidth = _StyleSheet$flatten.width;\n\n var height = styleHeight || '20px';\n var minWidth = multiplyStyleLengthValue(height, 2);\n var width = styleWidth > minWidth ? styleWidth : minWidth;\n var trackBorderRadius = multiplyStyleLengthValue(height, 0.5);\n\n var trackCurrentColor = function () {\n if (value === true) {\n if (trackColor != null && typeof trackColor === 'object') {\n return trackColor.true;\n } else {\n return activeTrackColor;\n }\n } else {\n if (trackColor != null && typeof trackColor === 'object') {\n return trackColor.false;\n } else {\n return trackColor;\n }\n }\n }();\n\n var thumbCurrentColor = value ? activeThumbColor : thumbColor;\n var thumbHeight = height;\n var thumbWidth = thumbHeight;\n var rootStyle = [styles.root, style, disabled && styles.cursorDefault, {\n height: height,\n width: width\n }];\n var trackStyle = [styles.track, {\n backgroundColor: disabled ? '#D5D5D5' : trackCurrentColor,\n borderRadius: trackBorderRadius\n }];\n var thumbStyle = [styles.thumb, value && styles.thumbActive, {\n backgroundColor: disabled ? '#BDBDBD' : thumbCurrentColor,\n height: thumbHeight,\n marginStart: value ? multiplyStyleLengthValue(thumbWidth, -1) : 0,\n width: thumbWidth\n }];\n var nativeControl = createElement('input', {\n accessibilityLabel: accessibilityLabel,\n checked: value,\n disabled: disabled,\n onBlur: handleFocusState,\n onChange: handleChange,\n onFocus: handleFocusState,\n ref: forwardedRef,\n style: [styles.nativeControl, styles.cursorInherit],\n type: 'checkbox',\n role: 'switch'\n });\n return /*#__PURE__*/React.createElement(View, _extends({}, other, {\n style: rootStyle\n }), /*#__PURE__*/React.createElement(View, {\n style: trackStyle\n }), /*#__PURE__*/React.createElement(View, {\n ref: thumbRef,\n style: thumbStyle\n }), nativeControl);\n});\nSwitch.displayName = 'Switch';\nvar styles = StyleSheet.create({\n root: {\n cursor: 'pointer',\n userSelect: 'none'\n },\n cursorDefault: {\n cursor: 'default'\n },\n cursorInherit: {\n cursor: 'inherit'\n },\n track: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '70%',\n margin: 'auto',\n transitionDuration: '0.1s',\n width: '100%'\n }),\n thumb: {\n alignSelf: 'flex-start',\n borderRadius: '100%',\n boxShadow: thumbDefaultBoxShadow,\n start: '0%',\n transform: [{\n translateZ: 0\n }],\n transitionDuration: '0.1s'\n },\n thumbActive: {\n start: '100%'\n },\n nativeControl: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '100%',\n margin: 0,\n opacity: 0,\n padding: 0,\n width: '100%'\n })\n});\nexport default Switch;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UnimplementedView from '../../modules/UnimplementedView';\nexport default UnimplementedView;","import * as React from 'react';\n\ntype Props = {\n children: React.ReactNode;\n};\n\nconst MULTIPLE_NAVIGATOR_ERROR = `Another navigator is already registered for this container. You likely have multiple navigators under a single \"NavigationContainer\" or \"Screen\". Make sure each navigator is under a separate \"Screen\" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.`;\n\nexport const SingleNavigatorContext = React.createContext<\n | {\n register(key: string): void;\n unregister(key: string): void;\n }\n | undefined\n>(undefined);\n\n/**\n * Component which ensures that there's only one navigator nested under it.\n */\nexport default function EnsureSingleNavigator({ children }: Props) {\n const navigatorKeyRef = React.useRef<string | undefined>();\n\n const value = React.useMemo(\n () => ({\n register(key: string) {\n const currentKey = navigatorKeyRef.current;\n\n if (currentKey !== undefined && key !== currentKey) {\n throw new Error(MULTIPLE_NAVIGATOR_ERROR);\n }\n\n navigatorKeyRef.current = key;\n },\n unregister(key: string) {\n const currentKey = navigatorKeyRef.current;\n\n if (key !== currentKey) {\n return;\n }\n\n navigatorKeyRef.current = undefined;\n },\n }),\n []\n );\n\n return (\n <SingleNavigatorContext.Provider value={value}>\n {children}\n </SingleNavigatorContext.Provider>\n );\n}\n","function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\nimport resolveShadowValue from './resolveShadowValue';\nvar defaultOffset = {\n height: 0,\n width: 0\n};\n\nfunction boxShadowReducer(resolvedStyle, style) {\n var boxShadow = style.boxShadow;\n var shadow = resolveShadowValue(style);\n\n if (shadow != null) {\n resolvedStyle.boxShadow = boxShadow ? boxShadow + \", \" + shadow : shadow;\n }\n}\n\nfunction textShadowReducer(resolvedStyle, style) {\n var textShadowColor = style.textShadowColor,\n textShadowOffset = style.textShadowOffset,\n textShadowRadius = style.textShadowRadius;\n\n var _ref = textShadowOffset || defaultOffset,\n height = _ref.height,\n width = _ref.width;\n\n var radius = textShadowRadius || 0;\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(radius);\n var color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');\n\n if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {\n resolvedStyle.textShadow = offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n}\n\nvar createCompileableStyle = function createCompileableStyle(styles) {\n var shadowColor = styles.shadowColor,\n shadowOffset = styles.shadowOffset,\n shadowOpacity = styles.shadowOpacity,\n shadowRadius = styles.shadowRadius,\n textShadowColor = styles.textShadowColor,\n textShadowOffset = styles.textShadowOffset,\n textShadowRadius = styles.textShadowRadius,\n nextStyles = _objectWithoutPropertiesLoose(styles, [\"shadowColor\", \"shadowOffset\", \"shadowOpacity\", \"shadowRadius\", \"textShadowColor\", \"textShadowOffset\", \"textShadowRadius\"]);\n\n if (shadowColor != null || shadowOffset != null || shadowOpacity != null || shadowRadius != null) {\n boxShadowReducer(nextStyles, styles);\n }\n\n if (textShadowColor != null || textShadowOffset != null || textShadowRadius != null) {\n textShadowReducer(nextStyles, styles);\n }\n\n return nextStyles;\n};\n\nexport default createCompileableStyle;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar slice = Array.prototype.slice;\n/**\n * Order-based insertion of CSS.\n *\n * Each rule is associated with a numerically defined group.\n * Groups are ordered within the style sheet according to their number, with the\n * lowest first.\n *\n * Groups are implemented using marker rules. The selector of the first rule of\n * each group is used only to encode the group number for hydration. An\n * alternative implementation could rely on CSSMediaRule, allowing groups to be\n * treated as a sub-sheet, but the Edge implementation of CSSMediaRule is\n * broken.\n * https://developer.mozilla.org/en-US/docs/Web/API/CSSMediaRule\n * https://gist.github.com/necolas/aa0c37846ad6bd3b05b727b959e82674\n */\n\nexport default function createOrderedCSSStyleSheet(sheet) {\n var groups = {};\n var selectors = {};\n /**\n * Hydrate approximate record from any existing rules in the sheet.\n */\n\n if (sheet != null) {\n var group;\n slice.call(sheet.cssRules).forEach(function (cssRule, i) {\n var cssText = cssRule.cssText; // Create record of existing selectors and rules\n\n if (cssText.indexOf('stylesheet-group') > -1) {\n group = decodeGroupRule(cssRule);\n groups[group] = {\n start: i,\n rules: [cssText]\n };\n } else {\n var selectorText = getSelectorText(cssText);\n\n if (selectorText != null) {\n selectors[selectorText] = true;\n groups[group].rules.push(cssText);\n }\n }\n });\n }\n\n function sheetInsert(sheet, group, text) {\n var orderedGroups = getOrderedGroups(groups);\n var groupIndex = orderedGroups.indexOf(group);\n var nextGroupIndex = groupIndex + 1;\n var nextGroup = orderedGroups[nextGroupIndex]; // Insert rule before the next group, or at the end of the stylesheet\n\n var position = nextGroup != null && groups[nextGroup].start != null ? groups[nextGroup].start : sheet.cssRules.length;\n var isInserted = insertRuleAt(sheet, text, position);\n\n if (isInserted) {\n // Set the starting index of the new group\n if (groups[group].start == null) {\n groups[group].start = position;\n } // Increment the starting index of all subsequent groups\n\n\n for (var i = nextGroupIndex; i < orderedGroups.length; i += 1) {\n var groupNumber = orderedGroups[i];\n var previousStart = groups[groupNumber].start || 0;\n groups[groupNumber].start = previousStart + 1;\n }\n }\n\n return isInserted;\n }\n\n var OrderedCSSStyleSheet = {\n /**\n * The textContent of the style sheet.\n */\n getTextContent: function getTextContent() {\n return getOrderedGroups(groups).map(function (group) {\n var rules = groups[group].rules;\n return rules.join('\\n');\n }).join('\\n');\n },\n\n /**\n * Insert a rule into the style sheet\n */\n insert: function insert(cssText, groupValue) {\n var group = Number(groupValue); // Create a new group.\n\n if (groups[group] == null) {\n var markerRule = encodeGroupRule(group); // Create the internal record.\n\n groups[group] = {\n start: null,\n rules: [markerRule]\n }; // Update CSSOM.\n\n if (sheet != null) {\n sheetInsert(sheet, group, markerRule);\n }\n } // selectorText is more reliable than cssText for insertion checks. The\n // browser excludes vendor-prefixed properties and rewrites certain values\n // making cssText more likely to be different from what was inserted.\n\n\n var selectorText = getSelectorText(cssText);\n\n if (selectorText != null && selectors[selectorText] == null) {\n // Update the internal records.\n selectors[selectorText] = true;\n groups[group].rules.push(cssText); // Update CSSOM.\n\n if (sheet != null) {\n var isInserted = sheetInsert(sheet, group, cssText);\n\n if (!isInserted) {\n // Revert internal record change if a rule was rejected (e.g.,\n // unrecognized pseudo-selector)\n groups[group].rules.pop();\n }\n }\n }\n }\n };\n return OrderedCSSStyleSheet;\n}\n/**\n * Helper functions\n */\n\nfunction encodeGroupRule(group) {\n return \"[stylesheet-group=\\\"\" + group + \"\\\"]{}\";\n}\n\nfunction decodeGroupRule(cssRule) {\n return Number(cssRule.selectorText.split(/[\"']/)[1]);\n}\n\nfunction getOrderedGroups(obj) {\n return Object.keys(obj).map(Number).sort(function (a, b) {\n return a > b ? 1 : -1;\n });\n}\n\nvar pattern = /\\s*([,])\\s*/g;\n\nfunction getSelectorText(cssText) {\n var selector = cssText.split('{')[0].trim();\n return selector !== '' ? selector.replace(pattern, '$1') : null;\n}\n\nfunction insertRuleAt(root, cssText, position) {\n try {\n // $FlowFixMe: Flow is missing CSSOM types needed to type 'root'.\n root.insertRule(cssText, position);\n return true;\n } catch (e) {\n // JSDOM doesn't support `CSSSMediaRule#insertRule`.\n // Also ignore errors that occur from attempting to insert vendor-prefixed selectors.\n return false;\n }\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction flattenArray(array) {\n function flattenDown(array, result) {\n for (var i = 0; i < array.length; i++) {\n var value = array[i];\n\n if (Array.isArray(value)) {\n flattenDown(value, result);\n } else if (value != null && value !== false) {\n result.push(value);\n }\n }\n\n return result;\n }\n\n return flattenDown(array, []);\n}\n\nexport default flattenArray;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport I18nManager from '../I18nManager';\nimport multiplyStyleLengthValue from '../../modules/multiplyStyleLengthValue';\nvar emptyObject = {};\nvar borderTopLeftRadius = 'borderTopLeftRadius';\nvar borderTopRightRadius = 'borderTopRightRadius';\nvar borderBottomLeftRadius = 'borderBottomLeftRadius';\nvar borderBottomRightRadius = 'borderBottomRightRadius';\nvar borderLeftColor = 'borderLeftColor';\nvar borderLeftStyle = 'borderLeftStyle';\nvar borderLeftWidth = 'borderLeftWidth';\nvar borderRightColor = 'borderRightColor';\nvar borderRightStyle = 'borderRightStyle';\nvar borderRightWidth = 'borderRightWidth';\nvar right = 'right';\nvar marginLeft = 'marginLeft';\nvar marginRight = 'marginRight';\nvar paddingLeft = 'paddingLeft';\nvar paddingRight = 'paddingRight';\nvar left = 'left'; // Map of LTR property names to their BiDi equivalent.\n\nvar PROPERTIES_FLIP = {\n borderTopLeftRadius: borderTopRightRadius,\n borderTopRightRadius: borderTopLeftRadius,\n borderBottomLeftRadius: borderBottomRightRadius,\n borderBottomRightRadius: borderBottomLeftRadius,\n borderLeftColor: borderRightColor,\n borderLeftStyle: borderRightStyle,\n borderLeftWidth: borderRightWidth,\n borderRightColor: borderLeftColor,\n borderRightStyle: borderLeftStyle,\n borderRightWidth: borderLeftWidth,\n left: right,\n marginLeft: marginRight,\n marginRight: marginLeft,\n paddingLeft: paddingRight,\n paddingRight: paddingLeft,\n right: left\n}; // Map of I18N property names to their LTR equivalent.\n\nvar PROPERTIES_I18N = {\n borderTopStartRadius: borderTopLeftRadius,\n borderTopEndRadius: borderTopRightRadius,\n borderBottomStartRadius: borderBottomLeftRadius,\n borderBottomEndRadius: borderBottomRightRadius,\n borderStartColor: borderLeftColor,\n borderStartStyle: borderLeftStyle,\n borderStartWidth: borderLeftWidth,\n borderEndColor: borderRightColor,\n borderEndStyle: borderRightStyle,\n borderEndWidth: borderRightWidth,\n end: right,\n marginStart: marginLeft,\n marginEnd: marginRight,\n paddingStart: paddingLeft,\n paddingEnd: paddingRight,\n start: left\n};\nvar PROPERTIES_VALUE = {\n clear: true,\n float: true,\n textAlign: true\n}; // Invert the sign of a numeric-like value\n\nvar additiveInverse = function additiveInverse(value) {\n return multiplyStyleLengthValue(value, -1);\n};\n\nvar i18nStyle = function i18nStyle(originalStyle) {\n var _I18nManager$getConst = I18nManager.getConstants(),\n doLeftAndRightSwapInRTL = _I18nManager$getConst.doLeftAndRightSwapInRTL,\n isRTL = _I18nManager$getConst.isRTL;\n\n var style = originalStyle || emptyObject;\n var frozenProps = {};\n var nextStyle = {};\n\n for (var originalProp in style) {\n if (!Object.prototype.hasOwnProperty.call(style, originalProp)) {\n continue;\n }\n\n var originalValue = style[originalProp];\n var prop = originalProp;\n var value = originalValue; // BiDi flip properties\n\n if (PROPERTIES_I18N.hasOwnProperty(originalProp)) {\n // convert start/end\n var convertedProp = PROPERTIES_I18N[originalProp];\n prop = isRTL ? PROPERTIES_FLIP[convertedProp] : convertedProp;\n } else if (isRTL && doLeftAndRightSwapInRTL && PROPERTIES_FLIP[originalProp]) {\n prop = PROPERTIES_FLIP[originalProp];\n } // BiDi flip values\n\n\n if (PROPERTIES_VALUE.hasOwnProperty(originalProp)) {\n if (originalValue === 'start') {\n value = isRTL ? 'right' : 'left';\n } else if (originalValue === 'end') {\n value = isRTL ? 'left' : 'right';\n } else if (isRTL && doLeftAndRightSwapInRTL) {\n if (originalValue === 'left') {\n value = 'right';\n } else if (originalValue === 'right') {\n value = 'left';\n }\n }\n } // BiDi flip transitionProperty value\n\n\n if (prop === 'transitionProperty') {\n // BiDi flip properties\n if (PROPERTIES_I18N.hasOwnProperty(value)) {\n // convert start/end\n var convertedValue = PROPERTIES_I18N[originalValue];\n value = isRTL ? PROPERTIES_FLIP[convertedValue] : convertedValue;\n } else if (isRTL && doLeftAndRightSwapInRTL) {\n var flippedValue = PROPERTIES_FLIP[originalValue];\n\n if (flippedValue != null) {\n value = flippedValue;\n }\n }\n } // Create finalized style\n\n\n if (isRTL && prop === 'textShadowOffset') {\n var invertedValue = additiveInverse(value.width);\n value.width = invertedValue;\n nextStyle[prop] = value;\n } else if (!frozenProps[prop]) {\n nextStyle[prop] = value;\n }\n\n if (PROPERTIES_I18N[originalProp]) {\n frozenProps[prop] = true;\n }\n } // $FlowIgnore\n\n\n return nextStyle;\n};\n\nexport default i18nStyle;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport { MONOSPACE_FONT_STACK, SYSTEM_FONT_STACK, STYLE_SHORT_FORM_EXPANSIONS } from './constants';\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\n/**\n * The browser implements the CSS cascade, where the order of properties is a\n * factor in determining which styles to paint. React Native is different. It\n * gives giving precedence to the more specific style property. For example,\n * the value of `paddingTop` takes precedence over that of `padding`.\n *\n * This module creates mutally exclusive style declarations by expanding all of\n * React Native's supported shortform properties (e.g. `padding`) to their\n * longfrom equivalents.\n */\n\nvar emptyObject = {};\nvar supportsCSS3TextDecoration = !canUseDOM || window.CSS != null && window.CSS.supports != null && (window.CSS.supports('text-decoration-line', 'none') || window.CSS.supports('-webkit-text-decoration-line', 'none'));\n/**\n * Transform\n */\n// { scale: 2 } => 'scale(2)'\n// { translateX: 20 } => 'translateX(20px)'\n// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'\n\nvar mapTransform = function mapTransform(transform) {\n var type = Object.keys(transform)[0];\n var value = transform[type];\n\n if (type === 'matrix' || type === 'matrix3d') {\n return type + \"(\" + value.join(',') + \")\";\n } else {\n var normalizedValue = normalizeValueWithProperty(value, type);\n return type + \"(\" + normalizedValue + \")\";\n }\n};\n\nvar resolveTransform = function resolveTransform(resolvedStyle, style) {\n var transform = style.transform;\n\n if (Array.isArray(style.transform)) {\n transform = style.transform.map(mapTransform).join(' ');\n }\n\n resolvedStyle.transform = transform;\n};\n/**\n * Reducer\n */\n\n\nvar createReactDOMStyle = function createReactDOMStyle(style) {\n if (!style) {\n return emptyObject;\n }\n\n var resolvedStyle = {};\n Object.keys(style).sort().forEach(function (prop) {\n var value = normalizeValueWithProperty(style[prop], prop); // Ignore everything else with a null value\n\n if (value == null) {\n return;\n }\n\n switch (prop) {\n // Ignore some React Native styles\n case 'elevation':\n case 'overlayColor':\n case 'resizeMode':\n case 'tintColor':\n {\n break;\n }\n\n case 'aspectRatio':\n {\n resolvedStyle[prop] = value.toString();\n break;\n }\n // TODO: remove once this issue is fixed\n // https://github.com/rofrischmann/inline-style-prefixer/issues/159\n\n case 'backgroundClip':\n {\n if (value === 'text') {\n resolvedStyle.backgroundClip = value;\n resolvedStyle.WebkitBackgroundClip = value;\n }\n\n break;\n }\n // The 'flex' property value in React Native must be a positive integer,\n // 0, or -1.\n\n case 'flex':\n {\n if (value === -1) {\n resolvedStyle.flexGrow = 0;\n resolvedStyle.flexShrink = 1;\n resolvedStyle.flexBasis = 'auto';\n } else {\n resolvedStyle.flex = value;\n }\n\n break;\n }\n\n case 'font':\n {\n resolvedStyle[prop] = value.replace('System', SYSTEM_FONT_STACK);\n break;\n }\n\n case 'fontFamily':\n {\n if (value.indexOf('System') > -1) {\n var stack = value.split(/,\\s*/);\n stack[stack.indexOf('System')] = SYSTEM_FONT_STACK;\n resolvedStyle[prop] = stack.join(',');\n } else if (value === 'monospace') {\n resolvedStyle[prop] = MONOSPACE_FONT_STACK;\n } else {\n resolvedStyle[prop] = value;\n }\n\n break;\n }\n\n case 'fontVariant':\n {\n if (Array.isArray(value) && value.length > 0) {\n resolvedStyle.fontVariant = value.join(' ');\n }\n\n break;\n }\n\n case 'textAlignVertical':\n {\n resolvedStyle.verticalAlign = value === 'center' ? 'middle' : value;\n break;\n }\n\n case 'textDecorationLine':\n {\n // use 'text-decoration' for browsers that only support CSS2\n // text-decoration (e.g., IE, Edge)\n if (!supportsCSS3TextDecoration) {\n resolvedStyle.textDecoration = value;\n } else {\n resolvedStyle.textDecorationLine = value;\n }\n\n break;\n }\n\n case 'transform':\n case 'transformMatrix':\n {\n resolveTransform(resolvedStyle, style);\n break;\n }\n\n case 'writingDirection':\n {\n resolvedStyle.direction = value;\n break;\n }\n\n default:\n {\n var longFormProperties = STYLE_SHORT_FORM_EXPANSIONS[prop];\n\n if (longFormProperties) {\n longFormProperties.forEach(function (longForm, i) {\n // The value of any longform property in the original styles takes\n // precedence over the shortform's value.\n if (typeof style[longForm] === 'undefined') {\n resolvedStyle[longForm] = value;\n }\n });\n } else {\n resolvedStyle[prop] = Array.isArray(value) ? value.join(',') : value;\n }\n }\n }\n });\n return resolvedStyle;\n};\n\nexport default createReactDOMStyle;","/* eslint-disable */\n\n/**\n * JS Implementation of MurmurHash2\n *\n * @author <a href=\"mailto:[email protected]\">Gary Court</a>\n * @see http://github.com/garycourt/murmurhash-js\n * @author <a href=\"mailto:[email protected]\">Austin Appleby</a>\n * @see http://sites.google.com/site/murmurhash/\n *\n * @param {string} str ASCII only\n * @param {number} seed Positive integer only\n * @return {number} 32-bit positive integer hash\n *\n * \n */\nfunction murmurhash2_32_gc(str, seed) {\n var l = str.length,\n h = seed ^ l,\n i = 0,\n k;\n\n while (l >= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n k ^= k >>> 24;\n k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;\n l -= 4;\n ++i;\n }\n\n switch (l) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n }\n\n h ^= h >>> 13;\n h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);\n h ^= h >>> 15;\n return h >>> 0;\n}\n\nvar hash = function hash(str) {\n return murmurhash2_32_gc(str, 1).toString(36);\n};\n\nexport default hash;","import backgroundClip from 'inline-style-prefixer/lib/plugins/backgroundClip';\nimport crossFade from 'inline-style-prefixer/lib/plugins/crossFade';\nimport cursor from 'inline-style-prefixer/lib/plugins/cursor';\nimport filter from 'inline-style-prefixer/lib/plugins/filter';\nimport flex from 'inline-style-prefixer/lib/plugins/flex';\nimport flexboxIE from 'inline-style-prefixer/lib/plugins/flexboxIE';\nimport flexboxOld from 'inline-style-prefixer/lib/plugins/flexboxOld';\nimport gradient from 'inline-style-prefixer/lib/plugins/gradient';\nimport grid from 'inline-style-prefixer/lib/plugins/grid';\nimport imageSet from 'inline-style-prefixer/lib/plugins/imageSet';\nimport logical from 'inline-style-prefixer/lib/plugins/logical';\nimport position from 'inline-style-prefixer/lib/plugins/position';\nimport sizing from 'inline-style-prefixer/lib/plugins/sizing';\nimport transition from 'inline-style-prefixer/lib/plugins/transition';\nvar w = ['Webkit'];\nvar m = ['Moz'];\nvar ms = ['ms'];\nvar wm = ['Webkit', 'Moz'];\nvar wms = ['Webkit', 'ms'];\nvar wmms = ['Webkit', 'Moz', 'ms'];\nexport default {\n plugins: [backgroundClip, crossFade, cursor, filter, flex, flexboxIE, flexboxOld, gradient, grid, imageSet, logical, position, sizing, transition],\n prefixMap: {\n animation: w,\n animationDelay: w,\n animationDirection: w,\n animationFillMode: w,\n animationDuration: w,\n animationIterationCount: w,\n animationName: w,\n animationPlayState: w,\n animationTimingFunction: w,\n appearance: wm,\n userSelect: wmms,\n textEmphasisPosition: w,\n textEmphasis: w,\n textEmphasisStyle: w,\n textEmphasisColor: w,\n boxDecorationBreak: w,\n clipPath: w,\n maskImage: w,\n maskMode: w,\n maskRepeat: w,\n maskPosition: w,\n maskClip: w,\n maskOrigin: w,\n maskSize: w,\n maskComposite: w,\n mask: w,\n maskBorderSource: w,\n maskBorderMode: w,\n maskBorderSlice: w,\n maskBorderWidth: w,\n maskBorderOutset: w,\n maskBorderRepeat: w,\n maskBorder: w,\n maskType: w,\n textDecorationStyle: w,\n textDecorationSkip: w,\n textDecorationLine: w,\n textDecorationColor: w,\n filter: w,\n fontFeatureSettings: w,\n breakAfter: wmms,\n breakBefore: wmms,\n breakInside: wmms,\n columnCount: wm,\n columnFill: wm,\n columnGap: wm,\n columnRule: wm,\n columnRuleColor: wm,\n columnRuleStyle: wm,\n columnRuleWidth: wm,\n columns: wm,\n columnSpan: wm,\n columnWidth: wm,\n writingMode: wms,\n flex: wms,\n flexBasis: w,\n flexDirection: wms,\n flexGrow: w,\n flexFlow: wms,\n flexShrink: w,\n flexWrap: wms,\n alignContent: w,\n alignItems: w,\n alignSelf: w,\n justifyContent: w,\n order: w,\n transform: w,\n transformOrigin: w,\n transformOriginX: w,\n transformOriginY: w,\n backfaceVisibility: w,\n perspective: w,\n perspectiveOrigin: w,\n transformStyle: w,\n transformOriginZ: w,\n backdropFilter: w,\n fontKerning: w,\n scrollSnapType: wms,\n scrollSnapPointsX: wms,\n scrollSnapPointsY: wms,\n scrollSnapDestination: wms,\n scrollSnapCoordinate: wms,\n shapeImageThreshold: w,\n shapeImageMargin: w,\n shapeImageOutside: w,\n hyphens: wmms,\n flowInto: wms,\n flowFrom: wms,\n regionFragment: wms,\n textOrientation: w,\n textAlignLast: m,\n tabSize: m,\n wrapFlow: ms,\n wrapThrough: ms,\n wrapMargin: ms,\n touchAction: ms,\n textSizeAdjust: ['ms', 'Webkit'],\n borderImage: w,\n borderImageOutset: w,\n borderImageRepeat: w,\n borderImageSlice: w,\n borderImageSource: w,\n borderImageWidth: w,\n transitionDelay: w,\n transitionDuration: w,\n transitionProperty: w,\n transitionTimingFunction: w\n }\n};","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createPrefixer from 'inline-style-prefixer/lib/createPrefixer';\nimport staticData from './static';\nvar prefixAll = createPrefixer(staticData);\nexport var prefixInlineStyles = function prefixInlineStyles(style) {\n var prefixedStyles = prefixAll(style); // React@15 removed undocumented support for fallback values in\n // inline-styles. Revert array values to the standard CSS value\n\n Object.keys(prefixedStyles).forEach(function (prop) {\n var value = prefixedStyles[prop];\n\n if (Array.isArray(value)) {\n prefixedStyles[prop] = value[value.length - 1];\n }\n });\n return prefixedStyles;\n};\nexport default prefixAll;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createReactDOMStyle from './createReactDOMStyle';\nimport hash from '../../vendor/hash';\nimport hyphenateStyleName from 'hyphenate-style-name';\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\nimport prefixStyles, { prefixInlineStyles } from '../../modules/prefixStyles';\nvar cache = {\n get: function get(property, value) {\n if (cache[property] != null && cache[property].hasOwnProperty(value) && cache[property][value] != null) {\n return cache[property][value];\n }\n },\n set: function set(property, value, object) {\n if (cache[property] == null) {\n cache[property] = {};\n }\n\n return cache[property][value] = object;\n }\n};\n/**\n * Compile style to atomic CSS rules.\n */\n\nexport function atomic(style) {\n return Object.keys(style).sort().reduce(function (acc, property) {\n var value = style[property];\n\n if (value != null) {\n var valueString = stringifyValueWithProperty(value, property);\n var cachedResult = cache.get(property, valueString);\n\n if (cachedResult != null) {\n var identifier = cachedResult.identifier;\n acc[identifier] = cachedResult;\n } else {\n var _identifier = createIdentifier('r', property, value);\n\n var rules = createAtomicRules(_identifier, property, value);\n\n var _cachedResult = cache.set(property, valueString, {\n property: property,\n value: stringifyValueWithProperty(value, property),\n identifier: _identifier,\n rules: rules\n });\n\n acc[_identifier] = _cachedResult;\n }\n }\n\n return acc;\n }, {});\n}\n/**\n * Compile simple style object to classic CSS rules.\n * No support for 'placeholderTextColor', 'scrollbarWidth', or 'pointerEvents'.\n */\n\nexport function classic(style, name) {\n var _ref;\n\n var identifier = createIdentifier('css', name, style);\n\n var animationKeyframes = style.animationKeyframes,\n rest = _objectWithoutPropertiesLoose(style, [\"animationKeyframes\"]);\n\n var rules = [];\n var selector = \".\" + identifier;\n var animationName;\n\n if (animationKeyframes != null) {\n var _processKeyframesValu = processKeyframesValue(animationKeyframes),\n animationNames = _processKeyframesValu.animationNames,\n keyframesRules = _processKeyframesValu.rules;\n\n animationName = animationNames.join(',');\n rules.push.apply(rules, keyframesRules);\n }\n\n var block = createDeclarationBlock(_objectSpread(_objectSpread({}, rest), {}, {\n animationName: animationName\n }));\n rules.push(\"\" + selector + block);\n return _ref = {}, _ref[identifier] = {\n identifier: identifier,\n rules: rules\n }, _ref;\n}\n/**\n * Compile simple style object to inline DOM styles.\n * No support for 'animationKeyframes', 'placeholderTextColor', 'scrollbarWidth', or 'pointerEvents'.\n */\n\nexport function inline(style) {\n return prefixInlineStyles(createReactDOMStyle(style));\n}\n/**\n * Create a value string that normalizes different input values with a common\n * output.\n */\n\nexport function stringifyValueWithProperty(value, property) {\n // e.g., 0 => '0px', 'black' => 'rgba(0,0,0,1)'\n var normalizedValue = normalizeValueWithProperty(value, property);\n return typeof normalizedValue !== 'string' ? JSON.stringify(normalizedValue || '') : normalizedValue;\n}\n/**\n * Create the Atomic CSS rules needed for a given StyleSheet rule.\n * Translates StyleSheet declarations to CSS.\n */\n\nfunction createAtomicRules(identifier, property, value) {\n var rules = [];\n var selector = \".\" + identifier; // Handle non-standard properties and object values that require multiple\n // CSS rules to be created.\n\n switch (property) {\n case 'animationKeyframes':\n {\n var _processKeyframesValu2 = processKeyframesValue(value),\n animationNames = _processKeyframesValu2.animationNames,\n keyframesRules = _processKeyframesValu2.rules;\n\n var block = createDeclarationBlock({\n animationName: animationNames.join(',')\n });\n rules.push.apply(rules, [\"\" + selector + block].concat(keyframesRules));\n break;\n }\n // Equivalent to using '::placeholder'\n\n case 'placeholderTextColor':\n {\n var _block = createDeclarationBlock({\n color: value,\n opacity: 1\n });\n\n rules.push(selector + \"::-webkit-input-placeholder\" + _block, selector + \"::-moz-placeholder\" + _block, selector + \":-ms-input-placeholder\" + _block, selector + \"::placeholder\" + _block);\n break;\n }\n // Polyfill for additional 'pointer-events' values\n // See d13f78622b233a0afc0c7a200c0a0792c8ca9e58\n\n case 'pointerEvents':\n {\n var finalValue = value;\n\n if (value === 'auto' || value === 'box-only') {\n finalValue = 'auto!important';\n\n if (value === 'box-only') {\n var _block3 = createDeclarationBlock({\n pointerEvents: 'none'\n });\n\n rules.push(selector + \">*\" + _block3);\n }\n } else if (value === 'none' || value === 'box-none') {\n finalValue = 'none!important';\n\n if (value === 'box-none') {\n var _block4 = createDeclarationBlock({\n pointerEvents: 'auto'\n });\n\n rules.push(selector + \">*\" + _block4);\n }\n }\n\n var _block2 = createDeclarationBlock({\n pointerEvents: finalValue\n });\n\n rules.push(\"\" + selector + _block2);\n break;\n }\n // Polyfill for draft spec\n // https://drafts.csswg.org/css-scrollbars-1/\n\n case 'scrollbarWidth':\n {\n if (value === 'none') {\n rules.push(selector + \"::-webkit-scrollbar{display:none}\");\n }\n\n var _block5 = createDeclarationBlock({\n scrollbarWidth: value\n });\n\n rules.push(\"\" + selector + _block5);\n break;\n }\n\n default:\n {\n var _createDeclarationBlo;\n\n var _block6 = createDeclarationBlock((_createDeclarationBlo = {}, _createDeclarationBlo[property] = value, _createDeclarationBlo));\n\n rules.push(\"\" + selector + _block6);\n break;\n }\n }\n\n return rules;\n}\n/**\n * Creates a CSS declaration block from a StyleSheet object.\n */\n\n\nfunction createDeclarationBlock(style) {\n var domStyle = prefixStyles(createReactDOMStyle(style));\n var declarationsString = Object.keys(domStyle).map(function (property) {\n var value = domStyle[property];\n var prop = hyphenateStyleName(property); // The prefixer may return an array of values:\n // { display: [ '-webkit-flex', 'flex' ] }\n // to represent \"fallback\" declarations\n // { display: -webkit-flex; display: flex; }\n\n if (Array.isArray(value)) {\n return value.map(function (v) {\n return prop + \":\" + v;\n }).join(';');\n } else {\n return prop + \":\" + value;\n }\n }) // Once properties are hyphenated, this will put the vendor\n // prefixed and short-form properties first in the list.\n .sort().join(';');\n return \"{\" + declarationsString + \";}\";\n}\n/**\n * An identifier is associated with a unique set of styles.\n */\n\n\nfunction createIdentifier(prefix, name, value) {\n var hashedString = hash(name + stringifyValueWithProperty(value, name));\n return process.env.NODE_ENV !== 'production' ? prefix + \"-\" + name + \"-\" + hashedString : prefix + \"-\" + hashedString;\n}\n/**\n * Create individual CSS keyframes rules.\n */\n\n\nfunction createKeyframes(keyframes) {\n var prefixes = ['-webkit-', ''];\n var identifier = createIdentifier('r', 'animation', keyframes);\n var steps = '{' + Object.keys(keyframes).map(function (stepName) {\n var rule = keyframes[stepName];\n var block = createDeclarationBlock(rule);\n return \"\" + stepName + block;\n }).join('') + '}';\n var rules = prefixes.map(function (prefix) {\n return \"@\" + prefix + \"keyframes \" + identifier + steps;\n });\n return {\n identifier: identifier,\n rules: rules\n };\n}\n/**\n * Create CSS keyframes rules and names from a StyleSheet keyframes object.\n */\n\n\nfunction processKeyframesValue(keyframesValue) {\n if (typeof keyframesValue === 'number') {\n throw new Error(\"Invalid CSS keyframes type: \" + typeof keyframesValue);\n }\n\n var animationNames = [];\n var rules = [];\n var value = Array.isArray(keyframesValue) ? keyframesValue : [keyframesValue];\n value.forEach(function (keyframes) {\n if (typeof keyframes === 'string') {\n // Support external animation libraries (identifiers only)\n animationNames.push(keyframes);\n } else {\n // Create rules for each of the keyframes\n var _createKeyframes = createKeyframes(keyframes),\n identifier = _createKeyframes.identifier,\n keyframesRules = _createKeyframes.rules;\n\n animationNames.push(identifier);\n rules.push.apply(rules, keyframesRules);\n }\n });\n return {\n animationNames: animationNames,\n rules: rules\n };\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar resets = [// minimal top-level reset\n'html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}', 'body{margin:0;}', // minimal form pseudo-element reset\n'button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}', 'input::-webkit-inner-spin-button,input::-webkit-outer-spin-button,' + 'input::-webkit-search-cancel-button,input::-webkit-search-decoration,' + 'input::-webkit-search-results-button,input::-webkit-search-results-decoration{display:none;}'];\nexport default resets;","/**\n * Adapts focus styles based on the user's active input modality (i.e., how\n * they are interacting with the UI right now).\n *\n * Focus styles are only relevant when using the keyboard to interact with the\n * page. If we only show the focus ring when relevant, we can avoid user\n * confusion without compromising accessibility.\n *\n * The script uses two heuristics to determine whether the keyboard is being used:\n *\n * 1. a keydown event occurred immediately before a focus event;\n * 2. a focus event happened on an element which requires keyboard interaction (e.g., a text field);\n *\n * This software or document includes material copied from or derived from https://github.com/WICG/focus-visible.\n * Copyright © 2018 W3C® (MIT, ERCIM, Keio, Beihang).\n * W3C Software Notice and License: https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nvar focusVisibleAttributeName = 'data-focusvisible-polyfill';\nvar rule = \":focus:not([\" + focusVisibleAttributeName + \"]){outline: none;}\";\n\nvar modality = function modality(insertRule) {\n insertRule(rule);\n\n if (!canUseDOM) {\n return;\n }\n\n var hadKeyboardEvent = true;\n var hadFocusVisibleRecently = false;\n var hadFocusVisibleRecentlyTimeout = null;\n var inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n };\n /**\n * Helper function for legacy browsers and iframes which sometimes focus\n * elements like document, body, and non-interactive SVG.\n */\n\n function isValidFocusTarget(el) {\n if (el && el !== document && el.nodeName !== 'HTML' && el.nodeName !== 'BODY' && 'classList' in el && 'contains' in el.classList) {\n return true;\n }\n\n return false;\n }\n /**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` attribute being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n */\n\n\n function focusTriggersKeyboardModality(el) {\n var type = el.type;\n var tagName = el.tagName;\n var isReadOnly = el.readOnly;\n\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !isReadOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !isReadOnly) {\n return true;\n }\n\n if (el.isContentEditable) {\n return true;\n }\n\n return false;\n }\n /**\n * Add the `focus-visible` attribute to the given element if it was not added by\n * the author.\n */\n\n\n function addFocusVisibleAttribute(el) {\n if (el.hasAttribute(focusVisibleAttributeName)) {\n return;\n }\n\n el.setAttribute(focusVisibleAttributeName, true);\n }\n /**\n * Remove the `focus-visible` attribute from the given element if it was not\n * originally added by the author.\n */\n\n\n function removeFocusVisibleAttribute(el) {\n el.removeAttribute(focusVisibleAttributeName);\n }\n /**\n * Remove the `focus-visible` attribute from all elements in the document.\n */\n\n\n function removeAllFocusVisibleAttributes() {\n var list = document.querySelectorAll(\"[\" + focusVisibleAttributeName + \"]\");\n\n for (var i = 0; i < list.length; i += 1) {\n removeFocusVisibleAttribute(list[i]);\n }\n }\n /**\n * Treat `keydown` as a signal that the user is in keyboard modality.\n * Apply `focus-visible` to any current active element and keep track\n * of our keyboard modality state with `hadKeyboardEvent`.\n */\n\n\n function onKeyDown(e) {\n if (e.key !== 'Tab' && (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)) {\n return;\n }\n\n if (isValidFocusTarget(document.activeElement)) {\n addFocusVisibleAttribute(document.activeElement);\n }\n\n hadKeyboardEvent = true;\n }\n /**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n * It also avoids the situation where a user presses on an element within a\n * previously keyboard-focused element (i.e., `e.target` is not the previously\n * focused element, but one of its descendants) and we need to remove the\n * focus ring because a `blur` event doesn't occur.\n */\n\n\n function onPointerDown(e) {\n if (hadKeyboardEvent === true) {\n removeAllFocusVisibleAttributes();\n }\n\n hadKeyboardEvent = false;\n }\n /**\n * On `focus`, add the `focus-visible` attribute to the target if:\n * - the target received focus as a result of keyboard navigation, or\n * - the event target is an element that will likely require interaction\n * via the keyboard (e.g. a text box)\n */\n\n\n function onFocus(e) {\n // Prevent IE from focusing the document or HTML element.\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (hadKeyboardEvent || focusTriggersKeyboardModality(e.target)) {\n addFocusVisibleAttribute(e.target);\n }\n }\n /**\n * On `blur`, remove the `focus-visible` attribute from the target.\n */\n\n\n function onBlur(e) {\n if (!isValidFocusTarget(e.target)) {\n return;\n }\n\n if (e.target.hasAttribute(focusVisibleAttributeName)) {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function () {\n hadFocusVisibleRecently = false;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n }, 100);\n removeFocusVisibleAttribute(e.target);\n }\n }\n /**\n * If the user changes tabs, keep track of whether or not the previously\n * focused element had the focus-visible attribute.\n */\n\n\n function onVisibilityChange(e) {\n if (document.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the attribute when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n\n addInitialPointerMoveListeners();\n }\n }\n /**\n * Add a group of listeners to detect usage of any pointing devices.\n * These listeners will be added when the polyfill first loads, and anytime\n * the window is blurred, so that they are active when the window regains\n * focus.\n */\n\n\n function addInitialPointerMoveListeners() {\n document.addEventListener('mousemove', onInitialPointerMove);\n document.addEventListener('mousedown', onInitialPointerMove);\n document.addEventListener('mouseup', onInitialPointerMove);\n document.addEventListener('pointermove', onInitialPointerMove);\n document.addEventListener('pointerdown', onInitialPointerMove);\n document.addEventListener('pointerup', onInitialPointerMove);\n document.addEventListener('touchmove', onInitialPointerMove);\n document.addEventListener('touchstart', onInitialPointerMove);\n document.addEventListener('touchend', onInitialPointerMove);\n }\n\n function removeInitialPointerMoveListeners() {\n document.removeEventListener('mousemove', onInitialPointerMove);\n document.removeEventListener('mousedown', onInitialPointerMove);\n document.removeEventListener('mouseup', onInitialPointerMove);\n document.removeEventListener('pointermove', onInitialPointerMove);\n document.removeEventListener('pointerdown', onInitialPointerMove);\n document.removeEventListener('pointerup', onInitialPointerMove);\n document.removeEventListener('touchmove', onInitialPointerMove);\n document.removeEventListener('touchstart', onInitialPointerMove);\n document.removeEventListener('touchend', onInitialPointerMove);\n }\n /**\n * When the polfyill first loads, assume the user is in keyboard modality.\n * If any event is received from a pointing device (e.g. mouse, pointer,\n * touch), turn off keyboard modality.\n * This accounts for situations where focus enters the page from the URL bar.\n */\n\n\n function onInitialPointerMove(e) {\n // Work around a Safari quirk that fires a mousemove on <html> whenever the\n // window blurs, even if you're tabbing out of the page. ¯\\_(ツ)_/¯\n if (e.target.nodeName === 'HTML') {\n return;\n }\n\n hadKeyboardEvent = false;\n removeInitialPointerMoveListeners();\n }\n\n document.addEventListener('keydown', onKeyDown, true);\n document.addEventListener('mousedown', onPointerDown, true);\n document.addEventListener('pointerdown', onPointerDown, true);\n document.addEventListener('touchstart', onPointerDown, true);\n document.addEventListener('focus', onFocus, true);\n document.addEventListener('blur', onBlur, true);\n document.addEventListener('visibilitychange', onVisibilityChange, true);\n addInitialPointerMoveListeners();\n};\n\nexport default modality;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n/**\n * WARNING: changes to this file in particular can cause significant changes to\n * the results of render performance benchmarks.\n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport createCSSStyleSheet from './createCSSStyleSheet';\nimport createCompileableStyle from './createCompileableStyle';\nimport createOrderedCSSStyleSheet from './createOrderedCSSStyleSheet';\nimport flattenArray from '../../modules/flattenArray';\nimport flattenStyle from './flattenStyle';\nimport I18nManager from '../I18nManager';\nimport i18nStyle from './i18nStyle';\nimport { atomic, classic, inline, stringifyValueWithProperty } from './compile';\nimport initialRules from './initialRules';\nimport modality from './modality';\nimport { STYLE_ELEMENT_ID, STYLE_GROUPS } from './constants';\nexport default function createStyleResolver() {\n var inserted, sheet, cache;\n var resolved = {\n css: {},\n ltr: {},\n rtl: {},\n rtlNoSwap: {}\n };\n\n var init = function init() {\n inserted = {\n css: {},\n ltr: {},\n rtl: {},\n rtlNoSwap: {}\n };\n sheet = createOrderedCSSStyleSheet(createCSSStyleSheet(STYLE_ELEMENT_ID));\n cache = {};\n modality(function (rule) {\n return sheet.insert(rule, STYLE_GROUPS.modality);\n });\n initialRules.forEach(function (rule) {\n sheet.insert(rule, STYLE_GROUPS.reset);\n });\n };\n\n init();\n\n function addToCache(className, prop, value) {\n if (!cache[prop]) {\n cache[prop] = {};\n }\n\n cache[prop][value] = className;\n }\n\n function getClassName(prop, value) {\n var val = stringifyValueWithProperty(value, prop);\n return cache[prop] && cache[prop].hasOwnProperty(val) && cache[prop][val];\n }\n\n function _injectRegisteredStyle(id) {\n var _I18nManager$getConst = I18nManager.getConstants(),\n doLeftAndRightSwapInRTL = _I18nManager$getConst.doLeftAndRightSwapInRTL,\n isRTL = _I18nManager$getConst.isRTL;\n\n var dir = isRTL ? doLeftAndRightSwapInRTL ? 'rtl' : 'rtlNoSwap' : 'ltr';\n\n if (!inserted[dir][id]) {\n var style = createCompileableStyle(i18nStyle(flattenStyle(id)));\n var results = atomic(style);\n Object.keys(results).forEach(function (key) {\n var _results$key = results[key],\n identifier = _results$key.identifier,\n property = _results$key.property,\n rules = _results$key.rules,\n value = _results$key.value;\n addToCache(identifier, property, value);\n rules.forEach(function (rule) {\n var group = STYLE_GROUPS.custom[property] || STYLE_GROUPS.atomic;\n sheet.insert(rule, group);\n });\n });\n inserted[dir][id] = true;\n }\n }\n /**\n * Resolves a React Native style object to DOM attributes\n */\n\n\n function resolve(style, classList) {\n var nextClassList = [];\n var props = {};\n\n if (!style && !classList) {\n return props;\n }\n\n if (Array.isArray(classList)) {\n flattenArray(classList).forEach(function (identifier) {\n if (identifier) {\n if (inserted.css[identifier] == null && resolved.css[identifier] != null) {\n var item = resolved.css[identifier];\n item.rules.forEach(function (rule) {\n sheet.insert(rule, item.group);\n });\n inserted.css[identifier] = true;\n }\n\n nextClassList.push(identifier);\n }\n });\n }\n\n if (typeof style === 'number') {\n // fast and cachable\n _injectRegisteredStyle(style);\n\n var key = createCacheKey(style);\n props = _resolveStyle(style, key);\n } else if (!Array.isArray(style)) {\n // resolve a plain RN style object\n props = _resolveStyle(style);\n } else {\n // flatten the style array\n // cache resolved props when all styles are registered\n // otherwise fallback to resolving\n var flatArray = flattenArray(style);\n var isArrayOfNumbers = true;\n var cacheKey = '';\n\n for (var i = 0; i < flatArray.length; i++) {\n var id = flatArray[i];\n\n if (typeof id !== 'number') {\n isArrayOfNumbers = false;\n } else {\n if (isArrayOfNumbers) {\n cacheKey += id + '-';\n }\n\n _injectRegisteredStyle(id);\n }\n }\n\n var _key = isArrayOfNumbers ? createCacheKey(cacheKey) : null;\n\n props = _resolveStyle(flatArray, _key);\n }\n\n nextClassList.push.apply(nextClassList, props.classList);\n var finalProps = {\n className: classListToString(nextClassList),\n classList: nextClassList\n };\n\n if (props.style) {\n finalProps.style = props.style;\n }\n\n return finalProps;\n }\n /**\n * Resolves a React Native style object\n */\n\n\n function _resolveStyle(style, key) {\n var _I18nManager$getConst2 = I18nManager.getConstants(),\n doLeftAndRightSwapInRTL = _I18nManager$getConst2.doLeftAndRightSwapInRTL,\n isRTL = _I18nManager$getConst2.isRTL;\n\n var dir = isRTL ? doLeftAndRightSwapInRTL ? 'rtl' : 'rtlNoSwap' : 'ltr'; // faster: memoized\n\n if (key != null && resolved[dir][key] != null) {\n return resolved[dir][key];\n }\n\n var flatStyle = flattenStyle(style);\n var localizedStyle = createCompileableStyle(i18nStyle(flatStyle)); // slower: convert style object to props and cache\n\n var props = Object.keys(localizedStyle).sort().reduce(function (props, styleProp) {\n var value = localizedStyle[styleProp];\n\n if (value != null) {\n var className = getClassName(styleProp, value);\n\n if (className) {\n props.classList.push(className);\n } else {\n // Certain properties and values are not transformed by 'createReactDOMStyle' as they\n // require more complex transforms into multiple CSS rules. Here we assume that StyleManager\n // can bind these styles to a className, and prevent them becoming invalid inline-styles.\n if (styleProp === 'animationKeyframes' || styleProp === 'placeholderTextColor' || styleProp === 'pointerEvents' || styleProp === 'scrollbarWidth') {\n var _atomic;\n\n var a = atomic((_atomic = {}, _atomic[styleProp] = value, _atomic));\n Object.keys(a).forEach(function (key) {\n var _a$key = a[key],\n identifier = _a$key.identifier,\n rules = _a$key.rules;\n props.classList.push(identifier);\n rules.forEach(function (rule) {\n sheet.insert(rule, STYLE_GROUPS.atomic);\n });\n });\n } else {\n if (!props.style) {\n props.style = {};\n } // 4x slower render\n\n\n props.style[styleProp] = value;\n }\n }\n }\n\n return props;\n }, {\n classList: []\n });\n\n if (props.style) {\n props.style = inline(props.style);\n }\n\n if (key != null) {\n resolved[dir][key] = props;\n }\n\n return props;\n }\n\n return {\n getStyleSheet: function getStyleSheet() {\n var textContent = sheet.getTextContent(); // Reset state on the server so critical css is always the result\n\n if (!canUseDOM) {\n init();\n }\n\n return {\n id: STYLE_ELEMENT_ID,\n textContent: textContent\n };\n },\n createCSS: function createCSS(rules, group) {\n var result = {};\n Object.keys(rules).forEach(function (name) {\n var style = rules[name];\n var compiled = classic(style, name);\n Object.keys(compiled).forEach(function (key) {\n var _compiled$key = compiled[key],\n identifier = _compiled$key.identifier,\n rules = _compiled$key.rules;\n resolved.css[identifier] = {\n group: group || STYLE_GROUPS.classic,\n rules: rules\n };\n result[name] = identifier;\n });\n });\n return result;\n },\n resolve: resolve,\n\n get sheet() {\n return sheet;\n }\n\n };\n}\n/**\n * Misc helpers\n */\n\nvar createCacheKey = function createCacheKey(id) {\n var prefix = 'rn';\n return prefix + \"-\" + id;\n};\n\nvar classListToString = function classListToString(list) {\n return list.join(' ').trim();\n};","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createStyleResolver from './createStyleResolver';\nvar styleResolver = createStyleResolver();\nexport default styleResolver;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment'; // $FlowFixMe: HTMLStyleElement is incorrectly typed - https://github.com/facebook/flow/issues/2696\n\nexport default function createCSSStyleSheet(id) {\n if (canUseDOM) {\n var element = document.getElementById(id);\n\n if (element != null) {\n // $FlowFixMe: HTMLElement is incorrectly typed\n return element.sheet;\n } else {\n var _element = document.createElement('style');\n\n _element.setAttribute('id', id);\n\n var head = document.head;\n\n if (head) {\n head.insertBefore(_element, head.firstChild);\n }\n\n return _element.sheet;\n }\n } else {\n return null;\n }\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport var BLUR = 'blur';\nexport var CONTEXT_MENU = 'contextmenu';\nexport var FOCUS_OUT = 'focusout';\nexport var MOUSE_DOWN = 'mousedown';\nexport var MOUSE_MOVE = 'mousemove';\nexport var MOUSE_UP = 'mouseup';\nexport var MOUSE_CANCEL = 'dragstart';\nexport var TOUCH_START = 'touchstart';\nexport var TOUCH_MOVE = 'touchmove';\nexport var TOUCH_END = 'touchend';\nexport var TOUCH_CANCEL = 'touchcancel';\nexport var SCROLL = 'scroll';\nexport var SELECT = 'select';\nexport var SELECTION_CHANGE = 'selectionchange';\nexport function isStartish(eventType) {\n return eventType === TOUCH_START || eventType === MOUSE_DOWN;\n}\nexport function isMoveish(eventType) {\n return eventType === TOUCH_MOVE || eventType === MOUSE_MOVE;\n}\nexport function isEndish(eventType) {\n return eventType === TOUCH_END || eventType === MOUSE_UP || isCancelish(eventType);\n}\nexport function isCancelish(eventType) {\n return eventType === TOUCH_CANCEL || eventType === MOUSE_CANCEL;\n}\nexport function isScroll(eventType) {\n return eventType === SCROLL;\n}\nexport function isSelectionChange(eventType) {\n return eventType === SELECT || eventType === SELECTION_CHANGE;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { isStartish, isMoveish, isEndish } from './ResponderEventTypes';\n\n/**\n * Tracks the position and time of each active touch by `touch.identifier`. We\n * should typically only see IDs in the range of 1-20 because IDs get recycled\n * when touches end and start again.\n */\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar MAX_TOUCH_BANK = 20;\nvar touchBank = [];\nvar touchHistory = {\n touchBank: touchBank,\n numberActiveTouches: 0,\n // If there is only one active touch, we remember its location. This prevents\n // us having to loop through all of the touches all the time in the most\n // common case.\n indexOfSingleActiveTouch: -1,\n mostRecentTimeStamp: 0\n};\n\nfunction timestampForTouch(touch) {\n // The legacy internal implementation provides \"timeStamp\", which has been\n // renamed to \"timestamp\".\n return touch.timeStamp || touch.timestamp;\n}\n/**\n * TODO: Instead of making gestures recompute filtered velocity, we could\n * include a built in velocity computation that can be reused globally.\n */\n\n\nfunction createTouchRecord(touch) {\n return {\n touchActive: true,\n startPageX: touch.pageX,\n startPageY: touch.pageY,\n startTimeStamp: timestampForTouch(touch),\n currentPageX: touch.pageX,\n currentPageY: touch.pageY,\n currentTimeStamp: timestampForTouch(touch),\n previousPageX: touch.pageX,\n previousPageY: touch.pageY,\n previousTimeStamp: timestampForTouch(touch)\n };\n}\n\nfunction resetTouchRecord(touchRecord, touch) {\n touchRecord.touchActive = true;\n touchRecord.startPageX = touch.pageX;\n touchRecord.startPageY = touch.pageY;\n touchRecord.startTimeStamp = timestampForTouch(touch);\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchRecord.previousPageX = touch.pageX;\n touchRecord.previousPageY = touch.pageY;\n touchRecord.previousTimeStamp = timestampForTouch(touch);\n}\n\nfunction getTouchIdentifier(_ref) {\n var identifier = _ref.identifier;\n\n if (identifier == null) {\n console.error('Touch object is missing identifier.');\n }\n\n if (__DEV__) {\n if (identifier > MAX_TOUCH_BANK) {\n console.error('Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK);\n }\n }\n\n return identifier;\n}\n\nfunction recordTouchStart(touch) {\n var identifier = getTouchIdentifier(touch);\n var touchRecord = touchBank[identifier];\n\n if (touchRecord) {\n resetTouchRecord(touchRecord, touch);\n } else {\n touchBank[identifier] = createTouchRecord(touch);\n }\n\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n}\n\nfunction recordTouchMove(touch) {\n var touchRecord = touchBank[getTouchIdentifier(touch)];\n\n if (touchRecord) {\n touchRecord.touchActive = true;\n touchRecord.previousPageX = touchRecord.currentPageX;\n touchRecord.previousPageY = touchRecord.currentPageY;\n touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n } else {\n console.warn('Cannot record touch move without a touch start.\\n', \"Touch Move: \" + printTouch(touch) + \"\\n\", \"Touch Bank: \" + printTouchBank());\n }\n}\n\nfunction recordTouchEnd(touch) {\n var touchRecord = touchBank[getTouchIdentifier(touch)];\n\n if (touchRecord) {\n touchRecord.touchActive = false;\n touchRecord.previousPageX = touchRecord.currentPageX;\n touchRecord.previousPageY = touchRecord.currentPageY;\n touchRecord.previousTimeStamp = touchRecord.currentTimeStamp;\n touchRecord.currentPageX = touch.pageX;\n touchRecord.currentPageY = touch.pageY;\n touchRecord.currentTimeStamp = timestampForTouch(touch);\n touchHistory.mostRecentTimeStamp = timestampForTouch(touch);\n } else {\n console.warn('Cannot record touch end without a touch start.\\n', \"Touch End: \" + printTouch(touch) + \"\\n\", \"Touch Bank: \" + printTouchBank());\n }\n}\n\nfunction printTouch(touch) {\n return JSON.stringify({\n identifier: touch.identifier,\n pageX: touch.pageX,\n pageY: touch.pageY,\n timestamp: timestampForTouch(touch)\n });\n}\n\nfunction printTouchBank() {\n var printed = JSON.stringify(touchBank.slice(0, MAX_TOUCH_BANK));\n\n if (touchBank.length > MAX_TOUCH_BANK) {\n printed += ' (original size: ' + touchBank.length + ')';\n }\n\n return printed;\n}\n\nvar ResponderTouchHistoryStore = {\n recordTouchTrack: function recordTouchTrack(topLevelType, nativeEvent) {\n if (isMoveish(topLevelType)) {\n nativeEvent.changedTouches.forEach(recordTouchMove);\n } else if (isStartish(topLevelType)) {\n nativeEvent.changedTouches.forEach(recordTouchStart);\n touchHistory.numberActiveTouches = nativeEvent.touches.length;\n\n if (touchHistory.numberActiveTouches === 1) {\n touchHistory.indexOfSingleActiveTouch = nativeEvent.touches[0].identifier;\n }\n } else if (isEndish(topLevelType)) {\n nativeEvent.changedTouches.forEach(recordTouchEnd);\n touchHistory.numberActiveTouches = nativeEvent.touches.length;\n\n if (touchHistory.numberActiveTouches === 1) {\n for (var i = 0; i < touchBank.length; i++) {\n var touchTrackToCheck = touchBank[i];\n\n if (touchTrackToCheck != null && touchTrackToCheck.touchActive) {\n touchHistory.indexOfSingleActiveTouch = i;\n break;\n }\n }\n\n if (__DEV__) {\n var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];\n\n if (!(activeRecord != null && activeRecord.touchActive)) {\n console.error('Cannot find single active touch.');\n }\n }\n }\n }\n },\n touchHistory: touchHistory\n};\nexport default ResponderTouchHistoryStore;","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport getBoundingClientRect from '../../modules/getBoundingClientRect';\nimport ResponderTouchHistoryStore from './ResponderTouchHistoryStore';\n\nvar emptyFunction = function emptyFunction() {};\n\nvar emptyObject = {};\nvar emptyArray = [];\n/**\n * Safari produces very large identifiers that would cause the `touchBank` array\n * length to be so large as to crash the browser, if not normalized like this.\n * In the future the `touchBank` should use an object/map instead.\n */\n\nfunction normalizeIdentifier(identifier) {\n return identifier > 20 ? identifier % 20 : identifier;\n}\n/**\n * Converts a native DOM event to a ResponderEvent.\n * Mouse events are transformed into fake touch events.\n */\n\n\nexport default function createResponderEvent(domEvent) {\n var rect;\n var propagationWasStopped = false;\n var changedTouches;\n var touches;\n var domEventChangedTouches = domEvent.changedTouches;\n var domEventType = domEvent.type;\n var metaKey = domEvent.metaKey === true;\n var shiftKey = domEvent.shiftKey === true;\n var force = domEventChangedTouches && domEventChangedTouches[0].force || 0;\n var identifier = normalizeIdentifier(domEventChangedTouches && domEventChangedTouches[0].identifier || 0);\n var clientX = domEventChangedTouches && domEventChangedTouches[0].clientX || domEvent.clientX;\n var clientY = domEventChangedTouches && domEventChangedTouches[0].clientY || domEvent.clientY;\n var pageX = domEventChangedTouches && domEventChangedTouches[0].pageX || domEvent.pageX;\n var pageY = domEventChangedTouches && domEventChangedTouches[0].pageY || domEvent.pageY;\n var preventDefault = typeof domEvent.preventDefault === 'function' ? domEvent.preventDefault.bind(domEvent) : emptyFunction;\n var timestamp = domEvent.timeStamp;\n\n function normalizeTouches(touches) {\n return Array.prototype.slice.call(touches).map(function (touch) {\n return {\n force: touch.force,\n identifier: normalizeIdentifier(touch.identifier),\n\n get locationX() {\n return locationX(touch.clientX);\n },\n\n get locationY() {\n return locationY(touch.clientY);\n },\n\n pageX: touch.pageX,\n pageY: touch.pageY,\n target: touch.target,\n timestamp: timestamp\n };\n });\n }\n\n if (domEventChangedTouches != null) {\n changedTouches = normalizeTouches(domEventChangedTouches);\n touches = normalizeTouches(domEvent.touches);\n } else {\n var emulatedTouches = [{\n force: force,\n identifier: identifier,\n\n get locationX() {\n return locationX(clientX);\n },\n\n get locationY() {\n return locationY(clientY);\n },\n\n pageX: pageX,\n pageY: pageY,\n target: domEvent.target,\n timestamp: timestamp\n }];\n changedTouches = emulatedTouches;\n touches = domEventType === 'mouseup' || domEventType === 'dragstart' ? emptyArray : emulatedTouches;\n }\n\n var responderEvent = {\n bubbles: true,\n cancelable: true,\n // `currentTarget` is set before dispatch\n currentTarget: null,\n defaultPrevented: domEvent.defaultPrevented,\n dispatchConfig: emptyObject,\n eventPhase: domEvent.eventPhase,\n isDefaultPrevented: function isDefaultPrevented() {\n return domEvent.defaultPrevented;\n },\n isPropagationStopped: function isPropagationStopped() {\n return propagationWasStopped;\n },\n isTrusted: domEvent.isTrusted,\n nativeEvent: {\n altKey: false,\n ctrlKey: false,\n metaKey: metaKey,\n shiftKey: shiftKey,\n changedTouches: changedTouches,\n force: force,\n identifier: identifier,\n\n get locationX() {\n return locationX(clientX);\n },\n\n get locationY() {\n return locationY(clientY);\n },\n\n pageX: pageX,\n pageY: pageY,\n target: domEvent.target,\n timestamp: timestamp,\n touches: touches,\n type: domEventType\n },\n persist: emptyFunction,\n preventDefault: preventDefault,\n stopPropagation: function stopPropagation() {\n propagationWasStopped = true;\n },\n target: domEvent.target,\n timeStamp: timestamp,\n touchHistory: ResponderTouchHistoryStore.touchHistory\n }; // Using getters and functions serves two purposes:\n // 1) The value of `currentTarget` is not initially available.\n // 2) Measuring the clientRect may cause layout jank and should only be done on-demand.\n\n function locationX(x) {\n rect = rect || getBoundingClientRect(responderEvent.currentTarget);\n\n if (rect) {\n return x - rect.left;\n }\n }\n\n function locationY(y) {\n rect = rect || getBoundingClientRect(responderEvent.currentTarget);\n\n if (rect) {\n return y - rect.top;\n }\n }\n\n return responderEvent;\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport isSelectionValid from '../../modules/isSelectionValid';\nvar keyName = '__reactResponderId';\n\nfunction getEventPath(domEvent) {\n // The 'selectionchange' event always has the 'document' as the target.\n // Use the anchor node as the initial target to reconstruct a path.\n // (We actually only need the first \"responder\" node in practice.)\n if (domEvent.type === 'selectionchange') {\n var target = window.getSelection().anchorNode;\n return composedPathFallback(target);\n } else {\n var path = domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);\n return path;\n }\n}\n\nfunction composedPathFallback(target) {\n var path = [];\n\n while (target != null && target !== document.body) {\n path.push(target);\n target = target.parentNode;\n }\n\n return path;\n}\n/**\n * Retrieve the responderId from a host node\n */\n\n\nfunction getResponderId(node) {\n if (node != null) {\n return node[keyName];\n }\n\n return null;\n}\n/**\n * Store the responderId on a host node\n */\n\n\nexport function setResponderId(node, id) {\n if (node != null) {\n node[keyName] = id;\n }\n}\n/**\n * Filter the event path to contain only the nodes attached to the responder system\n */\n\nexport function getResponderPaths(domEvent) {\n var idPath = [];\n var nodePath = [];\n var eventPath = getEventPath(domEvent);\n\n for (var i = 0; i < eventPath.length; i++) {\n var node = eventPath[i];\n var id = getResponderId(node);\n\n if (id != null) {\n idPath.push(id);\n nodePath.push(node);\n }\n }\n\n return {\n idPath: idPath,\n nodePath: nodePath\n };\n}\n/**\n * Walk the paths and find the first common ancestor\n */\n\nexport function getLowestCommonAncestor(pathA, pathB) {\n var pathALength = pathA.length;\n var pathBLength = pathB.length;\n\n if ( // If either path is empty\n pathALength === 0 || pathBLength === 0 || // If the last elements aren't the same there can't be a common ancestor\n // that is connected to the responder system\n pathA[pathALength - 1] !== pathB[pathBLength - 1]) {\n return null;\n }\n\n var itemA = pathA[0];\n var indexA = 0;\n var itemB = pathB[0];\n var indexB = 0; // If A is deeper, skip indices that can't match.\n\n if (pathALength - pathBLength > 0) {\n indexA = pathALength - pathBLength;\n itemA = pathA[indexA];\n pathALength = pathBLength;\n } // If B is deeper, skip indices that can't match\n\n\n if (pathBLength - pathALength > 0) {\n indexB = pathBLength - pathALength;\n itemB = pathB[indexB];\n pathBLength = pathALength;\n } // Walk in lockstep until a match is found\n\n\n var depth = pathALength;\n\n while (depth--) {\n if (itemA === itemB) {\n return itemA;\n }\n\n itemA = pathA[indexA++];\n itemB = pathB[indexB++];\n }\n\n return null;\n}\n/**\n * Determine whether any of the active touches are within the current responder.\n * This cannot rely on W3C `targetTouches`, as neither IE11 nor Safari implement it.\n */\n\nexport function hasTargetTouches(target, touches) {\n if (!touches || touches.length === 0) {\n return false;\n }\n\n for (var i = 0; i < touches.length; i++) {\n var node = touches[i].target;\n\n if (node != null) {\n if (target.contains(node)) {\n return true;\n }\n }\n }\n\n return false;\n}\n/**\n * Ignore 'selectionchange' events that don't correspond with a person's intent to\n * select text.\n */\n\nexport function hasValidSelection(domEvent) {\n if (domEvent.type === 'selectionchange') {\n return isSelectionValid();\n }\n\n return domEvent.type === 'select';\n}\n/**\n * Events are only valid if the primary button was used without specific modifier keys.\n */\n\nexport function isPrimaryPointerDown(domEvent) {\n var altKey = domEvent.altKey,\n button = domEvent.button,\n buttons = domEvent.buttons,\n ctrlKey = domEvent.ctrlKey,\n type = domEvent.type;\n var isTouch = type === 'touchstart' || type === 'touchmove';\n var isPrimaryMouseDown = type === 'mousedown' && (button === 0 || buttons === 1);\n var isPrimaryMouseMove = type === 'mousemove' && buttons === 1;\n var noModifiers = altKey === false && ctrlKey === false;\n\n if (isTouch || isPrimaryMouseDown && noModifiers || isPrimaryMouseMove && noModifiers) {\n return true;\n }\n\n return false;\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nexport default function isSelectionValid() {\n var selection = window.getSelection();\n var string = selection.toString();\n var anchorNode = selection.anchorNode;\n var focusNode = selection.focusNode;\n var isTextNode = anchorNode && anchorNode.nodeType === window.Node.TEXT_NODE || focusNode && focusNode.nodeType === window.Node.TEXT_NODE;\n return string.length >= 1 && string !== '\\n' && isTextNode;\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n/**\n * RESPONDER EVENT SYSTEM\n *\n * A single, global \"interaction lock\" on views. For a view to be the \"responder\" means\n * that pointer interactions are exclusive to that view and none other. The \"interaction\n * lock\" can be transferred (only) to ancestors of the current \"responder\" as long as\n * pointers continue to be active.\n *\n * Responder being granted:\n *\n * A view can become the \"responder\" after the following events:\n * * \"pointerdown\" (implemented using \"touchstart\", \"mousedown\")\n * * \"pointermove\" (implemented using \"touchmove\", \"mousemove\")\n * * \"scroll\" (while a pointer is down)\n * * \"selectionchange\" (while a pointer is down)\n *\n * If nothing is already the \"responder\", the event propagates to (capture) and from\n * (bubble) the event target until a view returns `true` for\n * `on*ShouldSetResponder(Capture)`.\n *\n * If something is already the responder, the event propagates to (capture) and from\n * (bubble) the lowest common ancestor of the event target and the current \"responder\".\n * Then negotiation happens between the current \"responder\" and a view that wants to\n * become the \"responder\": see the timing diagram below.\n *\n * (NOTE: Scrolled views either automatically become the \"responder\" or release the\n * \"interaction lock\". A native scroll view that isn't built on top of the responder\n * system must result in the current \"responder\" being notified that it no longer has\n * the \"interaction lock\" - the native system has taken over.\n *\n * Responder being released:\n *\n * As soon as there are no more active pointers that *started* inside descendants\n * of the *current* \"responder\", an `onResponderRelease` event is dispatched to the\n * current \"responder\", and the responder lock is released.\n *\n * Typical sequence of events:\n * * startShouldSetResponder\n * * responderGrant/Reject\n * * responderStart\n * * responderMove\n * * responderEnd\n * * responderRelease\n */\n\n/* Negotiation Performed\n +-----------------------+\n / \\\nProcess low level events to + Current Responder + wantsResponderID\ndetermine who to perform negot-| (if any exists at all) |\niation/transition | Otherwise just pass through|\n-------------------------------+----------------------------+------------------+\nBubble to find first ID | |\nto return true:wantsResponderID| |\n | |\n +--------------+ | |\n | onTouchStart | | |\n +------+-------+ none | |\n | return| |\n+-----------v-------------+true| +------------------------+ |\n|onStartShouldSetResponder|----->| onResponderStart (cur) |<-----------+\n+-----------+-------------+ | +------------------------+ | |\n | | | +--------+-------+\n | returned true for| false:REJECT +-------->|onResponderReject\n | wantsResponderID | | | +----------------+\n | (now attempt | +------------------+-----+ |\n | handoff) | | onResponder | |\n +------------------->| TerminationRequest | |\n | +------------------+-----+ |\n | | | +----------------+\n | true:GRANT +-------->|onResponderGrant|\n | | +--------+-------+\n | +------------------------+ | |\n | | onResponderTerminate |<-----------+\n | +------------------+-----+ |\n | | | +----------------+\n | +-------->|onResponderStart|\n | | +----------------+\nBubble to find first ID | |\nto return true:wantsResponderID| |\n | |\n +-------------+ | |\n | onTouchMove | | |\n +------+------+ none | |\n | return| |\n+-----------v-------------+true| +------------------------+ |\n|onMoveShouldSetResponder |----->| onResponderMove (cur) |<-----------+\n+-----------+-------------+ | +------------------------+ | |\n | | | +--------+-------+\n | returned true for| false:REJECT +-------->|onResponderReject\n | wantsResponderID | | | +----------------+\n | (now attempt | +------------------+-----+ |\n | handoff) | | onResponder | |\n +------------------->| TerminationRequest| |\n | +------------------+-----+ |\n | | | +----------------+\n | true:GRANT +-------->|onResponderGrant|\n | | +--------+-------+\n | +------------------------+ | |\n | | onResponderTerminate |<-----------+\n | +------------------+-----+ |\n | | | +----------------+\n | +-------->|onResponderMove |\n | | +----------------+\n | |\n | |\n Some active touch started| |\n inside current responder | +------------------------+ |\n +------------------------->| onResponderEnd | |\n | | +------------------------+ |\n +---+---------+ | |\n | onTouchEnd | | |\n +---+---------+ | |\n | | +------------------------+ |\n +------------------------->| onResponderEnd | |\n No active touches started| +-----------+------------+ |\n inside current responder | | |\n | v |\n | +------------------------+ |\n | | onResponderRelease | |\n | +------------------------+ |\n | |\n + + */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport createResponderEvent from './createResponderEvent';\nimport { isCancelish, isEndish, isMoveish, isScroll, isSelectionChange, isStartish } from './ResponderEventTypes';\nimport { getLowestCommonAncestor, getResponderPaths, hasTargetTouches, hasValidSelection, isPrimaryPointerDown, setResponderId } from './utils';\nimport ResponderTouchHistoryStore from './ResponderTouchHistoryStore';\n/* ------------ TYPES ------------ */\n\nvar emptyObject = {};\n/* ------------ IMPLEMENTATION ------------ */\n\nvar startRegistration = ['onStartShouldSetResponderCapture', 'onStartShouldSetResponder', {\n bubbles: true\n}];\nvar moveRegistration = ['onMoveShouldSetResponderCapture', 'onMoveShouldSetResponder', {\n bubbles: true\n}];\nvar scrollRegistration = ['onScrollShouldSetResponderCapture', 'onScrollShouldSetResponder', {\n bubbles: false\n}];\nvar shouldSetResponderEvents = {\n touchstart: startRegistration,\n mousedown: startRegistration,\n touchmove: moveRegistration,\n mousemove: moveRegistration,\n scroll: scrollRegistration\n};\nvar emptyResponder = {\n id: null,\n idPath: null,\n node: null\n};\nvar responderListenersMap = new Map();\nvar isEmulatingMouseEvents = false;\nvar trackedTouchCount = 0;\nvar currentResponder = {\n id: null,\n node: null,\n idPath: null\n};\n\nfunction changeCurrentResponder(responder) {\n currentResponder = responder;\n}\n\nfunction getResponderConfig(id) {\n var config = responderListenersMap.get(id);\n return config != null ? config : emptyObject;\n}\n/**\n * Process native events\n *\n * A single event listener is used to manage the responder system.\n * All pointers are tracked in the ResponderTouchHistoryStore. Native events\n * are interpreted in terms of the Responder System and checked to see if\n * the responder should be transferred. Each host node that is attached to\n * the Responder System has an ID, which is used to look up its associated\n * callbacks.\n */\n\n\nfunction eventListener(domEvent) {\n var eventType = domEvent.type;\n var eventTarget = domEvent.target;\n /**\n * Manage emulated events and early bailout.\n * Since PointerEvent is not used yet (lack of support in older Safari), it's\n * necessary to manually manage the mess of browser touch/mouse events.\n * And bailout early for termination events when there is no active responder.\n */\n // Flag when browser may produce emulated events\n\n if (eventType === 'touchstart') {\n isEmulatingMouseEvents = true;\n } // Remove flag when browser will not produce emulated events\n\n\n if (eventType === 'touchmove' || trackedTouchCount > 1) {\n isEmulatingMouseEvents = false;\n } // Ignore various events in particular circumstances\n\n\n if ( // Ignore browser emulated mouse events\n eventType === 'mousedown' && isEmulatingMouseEvents || eventType === 'mousemove' && isEmulatingMouseEvents || // Ignore mousemove if a mousedown didn't occur first\n eventType === 'mousemove' && trackedTouchCount < 1) {\n return;\n } // Remove flag after emulated events are finished\n\n\n if (isEmulatingMouseEvents && eventType === 'mouseup') {\n if (trackedTouchCount === 0) {\n isEmulatingMouseEvents = false;\n }\n\n return;\n }\n\n var isStartEvent = isStartish(eventType) && isPrimaryPointerDown(domEvent);\n var isMoveEvent = isMoveish(eventType);\n var isEndEvent = isEndish(eventType);\n var isScrollEvent = isScroll(eventType);\n var isSelectionChangeEvent = isSelectionChange(eventType);\n var responderEvent = createResponderEvent(domEvent);\n /**\n * Record the state of active pointers\n */\n\n if (isStartEvent || isMoveEvent || isEndEvent) {\n if (domEvent.touches) {\n trackedTouchCount = domEvent.touches.length;\n } else {\n if (isStartEvent) {\n trackedTouchCount = 1;\n } else if (isEndEvent) {\n trackedTouchCount = 0;\n }\n }\n\n ResponderTouchHistoryStore.recordTouchTrack(eventType, responderEvent.nativeEvent);\n }\n /**\n * Responder System logic\n */\n\n\n var eventPaths = getResponderPaths(domEvent);\n var wasNegotiated = false;\n var wantsResponder; // If an event occured that might change the current responder...\n\n if (isStartEvent || isMoveEvent || isScrollEvent && trackedTouchCount > 0) {\n // If there is already a responder, prune the event paths to the lowest common ancestor\n // of the existing responder and deepest target of the event.\n var currentResponderIdPath = currentResponder.idPath;\n var eventIdPath = eventPaths.idPath;\n\n if (currentResponderIdPath != null && eventIdPath != null) {\n var lowestCommonAncestor = getLowestCommonAncestor(currentResponderIdPath, eventIdPath);\n\n if (lowestCommonAncestor != null) {\n var indexOfLowestCommonAncestor = eventIdPath.indexOf(lowestCommonAncestor); // Skip the current responder so it doesn't receive unexpected \"shouldSet\" events.\n\n var index = indexOfLowestCommonAncestor + (lowestCommonAncestor === currentResponder.id ? 1 : 0);\n eventPaths = {\n idPath: eventIdPath.slice(index),\n nodePath: eventPaths.nodePath.slice(index)\n };\n } else {\n eventPaths = null;\n }\n }\n\n if (eventPaths != null) {\n // If a node wants to become the responder, attempt to transfer.\n wantsResponder = findWantsResponder(eventPaths, domEvent, responderEvent);\n\n if (wantsResponder != null) {\n // Sets responder if none exists, or negotates with existing responder.\n attemptTransfer(responderEvent, wantsResponder);\n wasNegotiated = true;\n }\n }\n } // If there is now a responder, invoke its callbacks for the lifecycle of the gesture.\n\n\n if (currentResponder.id != null && currentResponder.node != null) {\n var _currentResponder = currentResponder,\n id = _currentResponder.id,\n node = _currentResponder.node;\n\n var _getResponderConfig = getResponderConfig(id),\n onResponderStart = _getResponderConfig.onResponderStart,\n onResponderMove = _getResponderConfig.onResponderMove,\n onResponderEnd = _getResponderConfig.onResponderEnd,\n onResponderRelease = _getResponderConfig.onResponderRelease,\n onResponderTerminate = _getResponderConfig.onResponderTerminate,\n onResponderTerminationRequest = _getResponderConfig.onResponderTerminationRequest;\n\n responderEvent.bubbles = false;\n responderEvent.cancelable = false;\n responderEvent.currentTarget = node; // Start\n\n if (isStartEvent) {\n if (onResponderStart != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderStart';\n onResponderStart(responderEvent);\n }\n } // Move\n else if (isMoveEvent) {\n if (onResponderMove != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderMove';\n onResponderMove(responderEvent);\n }\n } else {\n var isTerminateEvent = isCancelish(eventType) || // native context menu\n eventType === 'contextmenu' || // window blur\n eventType === 'blur' && eventTarget === window || // responder (or ancestors) blur\n eventType === 'blur' && eventTarget.contains(node) && domEvent.relatedTarget !== node || // native scroll without using a pointer\n isScrollEvent && trackedTouchCount === 0 || // native scroll on node that is parent of the responder (allow siblings to scroll)\n isScrollEvent && eventTarget.contains(node) && eventTarget !== node || // native select/selectionchange on node\n isSelectionChangeEvent && hasValidSelection(domEvent);\n var isReleaseEvent = isEndEvent && !isTerminateEvent && !hasTargetTouches(node, domEvent.touches); // End\n\n if (isEndEvent) {\n if (onResponderEnd != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderEnd';\n onResponderEnd(responderEvent);\n }\n } // Release\n\n\n if (isReleaseEvent) {\n if (onResponderRelease != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderRelease';\n onResponderRelease(responderEvent);\n }\n\n changeCurrentResponder(emptyResponder);\n } // Terminate\n\n\n if (isTerminateEvent) {\n var shouldTerminate = true; // Responders can still avoid termination but only for these events.\n\n if (eventType === 'contextmenu' || eventType === 'scroll' || eventType === 'selectionchange') {\n // Only call this function is it wasn't already called during negotiation.\n if (wasNegotiated) {\n shouldTerminate = false;\n } else if (onResponderTerminationRequest != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminationRequest';\n\n if (onResponderTerminationRequest(responderEvent) === false) {\n shouldTerminate = false;\n }\n }\n }\n\n if (shouldTerminate) {\n if (onResponderTerminate != null) {\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminate';\n onResponderTerminate(responderEvent);\n }\n\n changeCurrentResponder(emptyResponder);\n isEmulatingMouseEvents = false;\n trackedTouchCount = 0;\n }\n }\n }\n }\n}\n/**\n * Walk the event path to/from the target node. At each node, stop and call the\n * relevant \"shouldSet\" functions for the given event type. If any of those functions\n * call \"stopPropagation\" on the event, stop searching for a responder.\n */\n\n\nfunction findWantsResponder(eventPaths, domEvent, responderEvent) {\n var shouldSetCallbacks = shouldSetResponderEvents[domEvent.type]; // for Flow\n\n if (shouldSetCallbacks != null) {\n var idPath = eventPaths.idPath,\n nodePath = eventPaths.nodePath;\n var shouldSetCallbackCaptureName = shouldSetCallbacks[0];\n var shouldSetCallbackBubbleName = shouldSetCallbacks[1];\n var bubbles = shouldSetCallbacks[2].bubbles;\n\n var check = function check(id, node, callbackName) {\n var config = getResponderConfig(id);\n var shouldSetCallback = config[callbackName];\n\n if (shouldSetCallback != null) {\n responderEvent.currentTarget = node;\n\n if (shouldSetCallback(responderEvent) === true) {\n // Start the path from the potential responder\n var prunedIdPath = idPath.slice(idPath.indexOf(id));\n return {\n id: id,\n node: node,\n idPath: prunedIdPath\n };\n }\n }\n }; // capture\n\n\n for (var i = idPath.length - 1; i >= 0; i--) {\n var id = idPath[i];\n var node = nodePath[i];\n var result = check(id, node, shouldSetCallbackCaptureName);\n\n if (result != null) {\n return result;\n }\n\n if (responderEvent.isPropagationStopped() === true) {\n return;\n }\n } // bubble\n\n\n if (bubbles) {\n for (var _i = 0; _i < idPath.length; _i++) {\n var _id = idPath[_i];\n var _node = nodePath[_i];\n\n var _result = check(_id, _node, shouldSetCallbackBubbleName);\n\n if (_result != null) {\n return _result;\n }\n\n if (responderEvent.isPropagationStopped() === true) {\n return;\n }\n }\n } else {\n var _id2 = idPath[0];\n var _node2 = nodePath[0];\n var target = domEvent.target;\n\n if (target === _node2) {\n return check(_id2, _node2, shouldSetCallbackBubbleName);\n }\n }\n }\n}\n/**\n * Attempt to transfer the responder.\n */\n\n\nfunction attemptTransfer(responderEvent, wantsResponder) {\n var _currentResponder2 = currentResponder,\n currentId = _currentResponder2.id,\n currentNode = _currentResponder2.node;\n var id = wantsResponder.id,\n node = wantsResponder.node;\n\n var _getResponderConfig2 = getResponderConfig(id),\n onResponderGrant = _getResponderConfig2.onResponderGrant,\n onResponderReject = _getResponderConfig2.onResponderReject;\n\n responderEvent.bubbles = false;\n responderEvent.cancelable = false;\n responderEvent.currentTarget = node; // Set responder\n\n if (currentId == null) {\n if (onResponderGrant != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderGrant';\n onResponderGrant(responderEvent);\n }\n\n changeCurrentResponder(wantsResponder);\n } // Negotiate with current responder\n else {\n var _getResponderConfig3 = getResponderConfig(currentId),\n onResponderTerminate = _getResponderConfig3.onResponderTerminate,\n onResponderTerminationRequest = _getResponderConfig3.onResponderTerminationRequest;\n\n var allowTransfer = true;\n\n if (onResponderTerminationRequest != null) {\n responderEvent.currentTarget = currentNode;\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminationRequest';\n\n if (onResponderTerminationRequest(responderEvent) === false) {\n allowTransfer = false;\n }\n }\n\n if (allowTransfer) {\n // Terminate existing responder\n if (onResponderTerminate != null) {\n responderEvent.currentTarget = currentNode;\n responderEvent.dispatchConfig.registrationName = 'onResponderTerminate';\n onResponderTerminate(responderEvent);\n } // Grant next responder\n\n\n if (onResponderGrant != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderGrant';\n onResponderGrant(responderEvent);\n }\n\n changeCurrentResponder(wantsResponder);\n } else {\n // Reject responder request\n if (onResponderReject != null) {\n responderEvent.currentTarget = node;\n responderEvent.dispatchConfig.registrationName = 'onResponderReject';\n onResponderReject(responderEvent);\n }\n }\n }\n}\n/* ------------ PUBLIC API ------------ */\n\n/**\n * Attach Listeners\n *\n * Use native events as ReactDOM doesn't have a non-plugin API to implement\n * this system.\n */\n\n\nvar documentEventsCapturePhase = ['blur', 'scroll'];\nvar documentEventsBubblePhase = [// mouse\n'mousedown', 'mousemove', 'mouseup', 'dragstart', // touch\n'touchstart', 'touchmove', 'touchend', 'touchcancel', // other\n'contextmenu', 'select', 'selectionchange'];\nexport function attachListeners() {\n if (canUseDOM && window.__reactResponderSystemActive == null) {\n window.addEventListener('blur', eventListener);\n documentEventsBubblePhase.forEach(function (eventType) {\n document.addEventListener(eventType, eventListener);\n });\n documentEventsCapturePhase.forEach(function (eventType) {\n document.addEventListener(eventType, eventListener, true);\n });\n window.__reactResponderSystemActive = true;\n }\n}\n/**\n * Register a node with the ResponderSystem.\n */\n\nexport function addNode(id, node, config) {\n setResponderId(node, id);\n responderListenersMap.set(id, config);\n}\n/**\n * Unregister a node with the ResponderSystem.\n */\n\nexport function removeNode(id) {\n if (currentResponder.id === id) {\n terminateResponder();\n }\n\n if (responderListenersMap.has(id)) {\n responderListenersMap.delete(id);\n }\n}\n/**\n * Allow the current responder to be terminated from within components to support\n * more complex requirements, such as use with other React libraries for working\n * with scroll views, input views, etc.\n */\n\nexport function terminateResponder() {\n var _currentResponder3 = currentResponder,\n id = _currentResponder3.id,\n node = _currentResponder3.node;\n\n if (id != null && node != null) {\n var _getResponderConfig4 = getResponderConfig(id),\n onResponderTerminate = _getResponderConfig4.onResponderTerminate;\n\n if (onResponderTerminate != null) {\n var event = createResponderEvent({});\n event.currentTarget = node;\n onResponderTerminate(event);\n }\n\n changeCurrentResponder(emptyResponder);\n }\n\n isEmulatingMouseEvents = false;\n trackedTouchCount = 0;\n}\n/**\n * Allow unit tests to inspect the current responder in the system.\n * FOR TESTING ONLY.\n */\n\nexport function getResponderNode() {\n return currentResponder.node;\n}","/**\n * Copyright (c) Nicolas Gallagher\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\n/**\n * Hook for integrating the Responder System into React\n *\n * function SomeComponent({ onStartShouldSetResponder }) {\n * const ref = useRef(null);\n * useResponderEvents(ref, { onStartShouldSetResponder });\n * return <div ref={ref} />\n * }\n */\nimport * as React from 'react';\nimport * as ResponderSystem from './ResponderSystem';\nvar emptyObject = {};\nvar idCounter = 0;\n\nfunction useStable(getInitialValue) {\n var ref = React.useRef(null);\n\n if (ref.current == null) {\n ref.current = getInitialValue();\n }\n\n return ref.current;\n}\n\nexport default function useResponderEvents(hostRef, config) {\n if (config === void 0) {\n config = emptyObject;\n }\n\n var id = useStable(function () {\n return idCounter++;\n });\n var isAttachedRef = React.useRef(false); // This is a separate effects so it doesn't run when the config changes.\n // On initial mount, attach global listeners if needed.\n // On unmount, remove node potentially attached to the Responder System.\n\n React.useEffect(function () {\n ResponderSystem.attachListeners();\n return function () {\n ResponderSystem.removeNode(id);\n };\n }, [id]); // Register and unregister with the Responder System as necessary\n\n React.useEffect(function () {\n var _config = config,\n onMoveShouldSetResponder = _config.onMoveShouldSetResponder,\n onMoveShouldSetResponderCapture = _config.onMoveShouldSetResponderCapture,\n onScrollShouldSetResponder = _config.onScrollShouldSetResponder,\n onScrollShouldSetResponderCapture = _config.onScrollShouldSetResponderCapture,\n onSelectionChangeShouldSetResponder = _config.onSelectionChangeShouldSetResponder,\n onSelectionChangeShouldSetResponderCapture = _config.onSelectionChangeShouldSetResponderCapture,\n onStartShouldSetResponder = _config.onStartShouldSetResponder,\n onStartShouldSetResponderCapture = _config.onStartShouldSetResponderCapture;\n var requiresResponderSystem = onMoveShouldSetResponder != null || onMoveShouldSetResponderCapture != null || onScrollShouldSetResponder != null || onScrollShouldSetResponderCapture != null || onSelectionChangeShouldSetResponder != null || onSelectionChangeShouldSetResponderCapture != null || onStartShouldSetResponder != null || onStartShouldSetResponderCapture != null;\n var node = hostRef.current;\n\n if (requiresResponderSystem) {\n ResponderSystem.addNode(id, node, config);\n isAttachedRef.current = true;\n } else if (isAttachedRef.current) {\n ResponderSystem.removeNode(id);\n isAttachedRef.current = false;\n }\n }, [config, hostRef, id]);\n React.useDebugValue({\n isResponder: hostRef.current === ResponderSystem.getResponderNode()\n });\n React.useDebugValue(config);\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar buttonLikeRoles = {\n // ARIA button behaves like native 'button' element\n button: true,\n // ARIA menuitem responds to Enter/Space like a button. Spec requires AT to\n // ignore ARIA roles of any children.\n // https://www.w3.org/WAI/GL/wiki/Using_ARIA_menus\n menuitem: true\n};\nexport default buttonLikeRoles;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar accessibilityRoleToWebRole = {\n adjustable: 'slider',\n button: 'button',\n header: 'heading',\n image: 'img',\n imagebutton: null,\n keyboardkey: null,\n label: null,\n link: 'link',\n none: 'presentation',\n search: 'search',\n summary: 'region',\n text: null\n};\n\nvar propsToAriaRole = function propsToAriaRole(_ref) {\n var accessibilityRole = _ref.accessibilityRole;\n\n if (accessibilityRole) {\n var inferredRole = accessibilityRoleToWebRole[accessibilityRole];\n\n if (inferredRole !== null) {\n // ignore roles that don't map to web\n return inferredRole || accessibilityRole;\n }\n }\n};\n\nexport default propsToAriaRole;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport propsToAriaRole from './propsToAriaRole';\nvar roleComponents = {\n article: 'article',\n banner: 'header',\n blockquote: 'blockquote',\n code: 'code',\n complementary: 'aside',\n contentinfo: 'footer',\n deletion: 'del',\n emphasis: 'em',\n figure: 'figure',\n insertion: 'ins',\n form: 'form',\n link: 'a',\n list: 'ul',\n listitem: 'li',\n main: 'main',\n navigation: 'nav',\n region: 'section',\n strong: 'strong'\n};\nvar emptyObject = {};\n\nvar propsToAccessibilityComponent = function propsToAccessibilityComponent(props) {\n if (props === void 0) {\n props = emptyObject;\n }\n\n // special-case for \"label\" role which doesn't map to an ARIA role\n if (props.accessibilityRole === 'label') {\n return 'label';\n } // special-case for \"href\" which becomes a link\n\n\n if (props.href != null) {\n return 'a';\n }\n\n var role = propsToAriaRole(props);\n\n if (role) {\n if (role === 'heading') {\n var level = props.accessibilityLevel || props['aria-level'];\n\n if (level != null) {\n return \"h\" + level;\n }\n\n return 'h1';\n }\n\n return roleComponents[role];\n }\n};\n\nexport default propsToAccessibilityComponent;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport buttonLikeRoles from './buttonLikeRoles';\nimport isDisabled from './isDisabled';\nimport propsToAccessibilityComponent from './propsToAccessibilityComponent';\nimport propsToAriaRole from './propsToAriaRole';\nvar AccessibilityUtil = {\n buttonLikeRoles: buttonLikeRoles,\n isDisabled: isDisabled,\n propsToAccessibilityComponent: propsToAccessibilityComponent,\n propsToAriaRole: propsToAriaRole\n};\nexport default AccessibilityUtil;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar isDisabled = function isDisabled(props) {\n return props.disabled || Array.isArray(props.accessibilityStates) && props.accessibilityStates.indexOf('disabled') > -1;\n};\n\nexport default isDisabled;","// I18n.js\n// =======\n//\n// This small library provides the Rails I18n API on the Javascript.\n// You don't actually have to use Rails (or even Ruby) to use I18n.js.\n// Just make sure you export all translations in an object like this:\n//\n// I18n.translations.en = {\n// hello: \"Hello World\"\n// };\n//\n// See tests for specific formatting like numbers and dates.\n//\n\n// Using UMD pattern from\n// https://github.com/umdjs/umd#regular-module\n// `returnExports.js` version\n;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(\"i18n\", function(){ return factory(root);});\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(root);\n } else {\n // Browser globals (root is window)\n root.I18n = factory(root);\n }\n}(this, function(global) {\n \"use strict\";\n\n // Use previously defined object if exists in current scope\n var I18n = global && global.I18n || {};\n\n // Just cache the Array#slice function.\n var slice = Array.prototype.slice;\n\n // Apply number padding.\n var padding = function(number) {\n return (\"0\" + number.toString()).substr(-2);\n };\n\n // Improved toFixed number rounding function with support for unprecise floating points\n // JavaScript's standard toFixed function does not round certain numbers correctly (for example 0.105 with precision 2).\n var toFixed = function(number, precision) {\n return decimalAdjust('round', number, -precision).toFixed(precision);\n };\n\n // Is a given variable an object?\n // Borrowed from Underscore.js\n var isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object'\n };\n\n var isFunction = function(func) {\n var type = typeof func;\n return type === 'function'\n };\n\n // Check if value is different than undefined and null;\n var isSet = function(value) {\n return typeof(value) !== 'undefined' && value !== null;\n };\n\n // Is a given value an array?\n // Borrowed from Underscore.js\n var isArray = function(val) {\n if (Array.isArray) {\n return Array.isArray(val);\n }\n return Object.prototype.toString.call(val) === '[object Array]';\n };\n\n var isString = function(val) {\n return typeof val === 'string' || Object.prototype.toString.call(val) === '[object String]';\n };\n\n var isNumber = function(val) {\n return typeof val === 'number' || Object.prototype.toString.call(val) === '[object Number]';\n };\n\n var isBoolean = function(val) {\n return val === true || val === false;\n };\n\n var isNull = function(val) {\n return val === null;\n };\n\n var decimalAdjust = function(type, value, exp) {\n // If the exp is undefined or zero...\n if (typeof exp === 'undefined' || +exp === 0) {\n return Math[type](value);\n }\n value = +value;\n exp = +exp;\n // If the value is not a number or the exp is not an integer...\n if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {\n return NaN;\n }\n // Shift\n value = value.toString().split('e');\n value = Math[type](+(value[0] + 'e' + (value[1] ? (+value[1] - exp) : -exp)));\n // Shift back\n value = value.toString().split('e');\n return +(value[0] + 'e' + (value[1] ? (+value[1] + exp) : exp));\n };\n\n var lazyEvaluate = function(message, scope) {\n if (isFunction(message)) {\n return message(scope);\n } else {\n return message;\n }\n };\n\n var merge = function (dest, obj) {\n var key, value;\n for (key in obj) if (obj.hasOwnProperty(key)) {\n value = obj[key];\n if (isString(value) || isNumber(value) || isBoolean(value) || isArray(value) || isNull(value)) {\n dest[key] = value;\n } else {\n if (dest[key] == null) dest[key] = {};\n merge(dest[key], value);\n }\n }\n return dest;\n };\n\n // Set default days/months translations.\n var DATE = {\n day_names: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"]\n , abbr_day_names: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\n , month_names: [null, \"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]\n , abbr_month_names: [null, \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n , meridian: [\"AM\", \"PM\"]\n };\n\n // Set default number format.\n var NUMBER_FORMAT = {\n precision: 3\n , separator: \".\"\n , delimiter: \",\"\n , strip_insignificant_zeros: false\n };\n\n // Set default currency format.\n var CURRENCY_FORMAT = {\n unit: \"$\"\n , precision: 2\n , format: \"%u%n\"\n , sign_first: true\n , delimiter: \",\"\n , separator: \".\"\n };\n\n // Set default percentage format.\n var PERCENTAGE_FORMAT = {\n unit: \"%\"\n , precision: 3\n , format: \"%n%u\"\n , separator: \".\"\n , delimiter: \"\"\n };\n\n // Set default size units.\n var SIZE_UNITS = [null, \"kb\", \"mb\", \"gb\", \"tb\"];\n\n // Other default options\n var DEFAULT_OPTIONS = {\n // Set default locale. This locale will be used when fallback is enabled and\n // the translation doesn't exist in a particular locale.\n defaultLocale: \"en\"\n // Set the current locale to `en`.\n , locale: \"en\"\n // Set the translation key separator.\n , defaultSeparator: \".\"\n // Set the placeholder format. Accepts `{{placeholder}}` and `%{placeholder}`.\n , placeholder: /(?:\\{\\{|%\\{)(.*?)(?:\\}\\}?)/gm\n // Set if engine should fallback to the default locale when a translation\n // is missing.\n , fallbacks: false\n // Set the default translation object.\n , translations: {}\n // Set missing translation behavior. 'message' will display a message\n // that the translation is missing, 'guess' will try to guess the string\n , missingBehaviour: 'message'\n // if you use missingBehaviour with 'message', but want to know that the\n // string is actually missing for testing purposes, you can prefix the\n // guessed string by setting the value here. By default, no prefix!\n , missingTranslationPrefix: ''\n };\n\n // Set default locale. This locale will be used when fallback is enabled and\n // the translation doesn't exist in a particular locale.\n I18n.reset = function() {\n var key;\n for (key in DEFAULT_OPTIONS) {\n this[key] = DEFAULT_OPTIONS[key];\n }\n };\n\n // Much like `reset`, but only assign options if not already assigned\n I18n.initializeOptions = function() {\n var key;\n for (key in DEFAULT_OPTIONS) if (!isSet(this[key])) {\n this[key] = DEFAULT_OPTIONS[key];\n }\n };\n I18n.initializeOptions();\n\n // Return a list of all locales that must be tried before returning the\n // missing translation message. By default, this will consider the inline option,\n // current locale and fallback locale.\n //\n // I18n.locales.get(\"de-DE\");\n // // [\"de-DE\", \"de\", \"en\"]\n //\n // You can define custom rules for any locale. Just make sure you return a array\n // containing all locales.\n //\n // // Default the Wookie locale to English.\n // I18n.locales[\"wk\"] = function(locale) {\n // return [\"en\"];\n // };\n //\n I18n.locales = {};\n\n // Retrieve locales based on inline locale, current locale or default to\n // I18n's detection.\n I18n.locales.get = function(locale) {\n var result = this[locale] || this[I18n.locale] || this[\"default\"];\n\n if (isFunction(result)) {\n result = result(locale);\n }\n\n if (isArray(result) === false) {\n result = [result];\n }\n\n return result;\n };\n\n // The default locale list.\n I18n.locales[\"default\"] = function(locale) {\n var locales = []\n , list = []\n ;\n\n // Handle the inline locale option that can be provided to\n // the `I18n.t` options.\n if (locale) {\n locales.push(locale);\n }\n\n // Add the current locale to the list.\n if (!locale && I18n.locale) {\n locales.push(I18n.locale);\n }\n\n // Add the default locale if fallback strategy is enabled.\n if (I18n.fallbacks && I18n.defaultLocale) {\n locales.push(I18n.defaultLocale);\n }\n\n // Locale code format 1:\n // According to RFC4646 (http://www.ietf.org/rfc/rfc4646.txt)\n // language codes for Traditional Chinese should be `zh-Hant`\n //\n // But due to backward compatibility\n // We use older version of IETF language tag\n // @see http://www.w3.org/TR/html401/struct/dirlang.html\n // @see http://en.wikipedia.org/wiki/IETF_language_tag\n //\n // Format: `language-code = primary-code ( \"-\" subcode )*`\n //\n // primary-code uses ISO639-1\n // @see http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes\n // @see http://www.iso.org/iso/home/standards/language_codes.htm\n //\n // subcode uses ISO 3166-1 alpha-2\n // @see http://en.wikipedia.org/wiki/ISO_3166\n // @see http://www.iso.org/iso/country_codes.htm\n //\n // @note\n // subcode can be in upper case or lower case\n // defining it in upper case is a convention only\n\n\n // Locale code format 2:\n // Format: `code = primary-code ( \"-\" region-code )*`\n // primary-code uses ISO 639-1\n // script-code uses ISO 15924\n // region-code uses ISO 3166-1 alpha-2\n // Example: zh-Hant-TW, en-HK, zh-Hant-CN\n //\n // It is similar to RFC4646 (or actually the same),\n // but seems to be limited to language, script, region\n\n // Compute each locale with its country code.\n // So this will return an array containing\n // `de-DE` and `de`\n // or\n // `zh-hans-tw`, `zh-hans`, `zh`\n // locales.\n locales.forEach(function(locale) {\n var localeParts = locale.split(\"-\");\n var firstFallback = null;\n var secondFallback = null;\n if (localeParts.length === 3) {\n firstFallback = [\n localeParts[0],\n localeParts[1]\n ].join(\"-\");\n secondFallback = localeParts[0];\n }\n else if (localeParts.length === 2) {\n firstFallback = localeParts[0];\n }\n\n if (list.indexOf(locale) === -1) {\n list.push(locale);\n }\n\n if (! I18n.fallbacks) {\n return;\n }\n\n [\n firstFallback,\n secondFallback\n ].forEach(function(nullableFallbackLocale) {\n // We don't want null values\n if (typeof nullableFallbackLocale === \"undefined\") { return; }\n if (nullableFallbackLocale === null) { return; }\n // We don't want duplicate values\n //\n // Comparing with `locale` first is faster than\n // checking whether value's presence in the list\n if (nullableFallbackLocale === locale) { return; }\n if (list.indexOf(nullableFallbackLocale) !== -1) { return; }\n\n list.push(nullableFallbackLocale);\n });\n });\n\n // No locales set? English it is.\n if (!locales.length) {\n locales.push(\"en\");\n }\n\n return list;\n };\n\n // Hold pluralization rules.\n I18n.pluralization = {};\n\n // Return the pluralizer for a specific locale.\n // If no specify locale is found, then I18n's default will be used.\n I18n.pluralization.get = function(locale) {\n return this[locale] || this[I18n.locale] || this[\"default\"];\n };\n\n // The default pluralizer rule.\n // It detects the `zero`, `one`, and `other` scopes.\n I18n.pluralization[\"default\"] = function(count) {\n switch (count) {\n case 0: return [\"zero\", \"other\"];\n case 1: return [\"one\"];\n default: return [\"other\"];\n }\n };\n\n // Return current locale. If no locale has been set, then\n // the current locale will be the default locale.\n I18n.currentLocale = function() {\n return this.locale || this.defaultLocale;\n };\n\n // Check if value is different than undefined and null;\n I18n.isSet = isSet;\n\n // Find and process the translation using the provided scope and options.\n // This is used internally by some functions and should not be used as an\n // public API.\n I18n.lookup = function(scope, options) {\n options = options || {};\n\n var locales = this.locales.get(options.locale).slice()\n , locale\n , scopes\n , fullScope\n , translations\n ;\n\n fullScope = this.getFullScope(scope, options);\n\n while (locales.length) {\n locale = locales.shift();\n scopes = fullScope.split(options.separator || this.defaultSeparator);\n translations = this.translations[locale];\n\n if (!translations) {\n continue;\n }\n while (scopes.length) {\n translations = translations[scopes.shift()];\n\n if (translations === undefined || translations === null) {\n break;\n }\n }\n\n if (translations !== undefined && translations !== null) {\n return translations;\n }\n }\n\n if (isSet(options.defaultValue)) {\n return lazyEvaluate(options.defaultValue, scope);\n }\n };\n\n // lookup pluralization rule key into translations\n I18n.pluralizationLookupWithoutFallback = function(count, locale, translations) {\n var pluralizer = this.pluralization.get(locale)\n , pluralizerKeys = pluralizer(count)\n , pluralizerKey\n , message;\n\n if (isObject(translations)) {\n while (pluralizerKeys.length) {\n pluralizerKey = pluralizerKeys.shift();\n if (isSet(translations[pluralizerKey])) {\n message = translations[pluralizerKey];\n break;\n }\n }\n }\n\n return message;\n };\n\n // Lookup dedicated to pluralization\n I18n.pluralizationLookup = function(count, scope, options) {\n options = options || {};\n var locales = this.locales.get(options.locale).slice()\n , locale\n , scopes\n , translations\n , message\n ;\n scope = this.getFullScope(scope, options);\n\n while (locales.length) {\n locale = locales.shift();\n scopes = scope.split(options.separator || this.defaultSeparator);\n translations = this.translations[locale];\n\n if (!translations) {\n continue;\n }\n\n while (scopes.length) {\n translations = translations[scopes.shift()];\n if (!isObject(translations)) {\n break;\n }\n if (scopes.length === 0) {\n message = this.pluralizationLookupWithoutFallback(count, locale, translations);\n }\n }\n if (typeof message !== \"undefined\" && message !== null) {\n break;\n }\n }\n\n if (typeof message === \"undefined\" || message === null) {\n if (isSet(options.defaultValue)) {\n if (isObject(options.defaultValue)) {\n message = this.pluralizationLookupWithoutFallback(count, options.locale, options.defaultValue);\n } else {\n message = options.defaultValue;\n }\n translations = options.defaultValue;\n }\n }\n\n return { message: message, translations: translations };\n };\n\n // Rails changed the way the meridian is stored.\n // It started with `date.meridian` returning an array,\n // then it switched to `time.am` and `time.pm`.\n // This function abstracts this difference and returns\n // the correct meridian or the default value when none is provided.\n I18n.meridian = function() {\n var time = this.lookup(\"time\");\n var date = this.lookup(\"date\");\n\n if (time && time.am && time.pm) {\n return [time.am, time.pm];\n } else if (date && date.meridian) {\n return date.meridian;\n } else {\n return DATE.meridian;\n }\n };\n\n // Merge serveral hash options, checking if value is set before\n // overwriting any value. The precedence is from left to right.\n //\n // I18n.prepareOptions({name: \"John Doe\"}, {name: \"Mary Doe\", role: \"user\"});\n // #=> {name: \"John Doe\", role: \"user\"}\n //\n I18n.prepareOptions = function() {\n var args = slice.call(arguments)\n , options = {}\n , subject\n ;\n\n while (args.length) {\n subject = args.shift();\n\n if (typeof(subject) != \"object\") {\n continue;\n }\n\n for (var attr in subject) {\n if (!subject.hasOwnProperty(attr)) {\n continue;\n }\n\n if (isSet(options[attr])) {\n continue;\n }\n\n options[attr] = subject[attr];\n }\n }\n\n return options;\n };\n\n // Generate a list of translation options for default fallbacks.\n // `defaultValue` is also deleted from options as it is returned as part of\n // the translationOptions array.\n I18n.createTranslationOptions = function(scope, options) {\n var translationOptions = [{scope: scope}];\n\n // Defaults should be an array of hashes containing either\n // fallback scopes or messages\n if (isSet(options.defaults)) {\n translationOptions = translationOptions.concat(options.defaults);\n }\n\n // Maintain support for defaultValue. Since it is always a message\n // insert it in to the translation options as such.\n if (isSet(options.defaultValue)) {\n translationOptions.push({ message: options.defaultValue });\n }\n\n return translationOptions;\n };\n\n // Translate the given scope with the provided options.\n I18n.translate = function(scope, options) {\n options = options || {};\n\n var translationOptions = this.createTranslationOptions(scope, options);\n\n var translation;\n var usedScope = scope;\n\n var optionsWithoutDefault = this.prepareOptions(options)\n delete optionsWithoutDefault.defaultValue\n\n // Iterate through the translation options until a translation\n // or message is found.\n var translationFound =\n translationOptions.some(function(translationOption) {\n if (isSet(translationOption.scope)) {\n usedScope = translationOption.scope;\n translation = this.lookup(usedScope, optionsWithoutDefault);\n } else if (isSet(translationOption.message)) {\n translation = lazyEvaluate(translationOption.message, scope);\n }\n\n if (translation !== undefined && translation !== null) {\n return true;\n }\n }, this);\n\n if (!translationFound) {\n return this.missingTranslation(scope, options);\n }\n\n if (typeof(translation) === \"string\") {\n translation = this.interpolate(translation, options);\n } else if (isArray(translation)) {\n translation = translation.map(function(t) {\n return (typeof(t) === \"string\" ? this.interpolate(t, options) : t);\n }, this);\n } else if (isObject(translation) && isSet(options.count)) {\n translation = this.pluralize(options.count, usedScope, options);\n }\n\n return translation;\n };\n\n // This function interpolates the all variables in the given message.\n I18n.interpolate = function(message, options) {\n if (message == null) {\n return message;\n }\n\n options = options || {};\n var matches = message.match(this.placeholder)\n , placeholder\n , value\n , name\n , regex\n ;\n\n if (!matches) {\n return message;\n }\n\n while (matches.length) {\n placeholder = matches.shift();\n name = placeholder.replace(this.placeholder, \"$1\");\n\n if (isSet(options[name])) {\n value = options[name].toString().replace(/\\$/gm, \"_#$#_\");\n } else if (name in options) {\n value = this.nullPlaceholder(placeholder, message, options);\n } else {\n value = this.missingPlaceholder(placeholder, message, options);\n }\n\n regex = new RegExp(placeholder.replace(/{/gm, \"\\\\{\").replace(/}/gm, \"\\\\}\"));\n message = message.replace(regex, value);\n }\n\n return message.replace(/_#\\$#_/g, \"$\");\n };\n\n // Pluralize the given scope using the `count` value.\n // The pluralized translation may have other placeholders,\n // which will be retrieved from `options`.\n I18n.pluralize = function(count, scope, options) {\n options = this.prepareOptions({count: String(count)}, options)\n var pluralizer, result;\n\n result = this.pluralizationLookup(count, scope, options);\n if (typeof result.translations === \"undefined\" || result.translations == null) {\n return this.missingTranslation(scope, options);\n }\n\n if (typeof result.message !== \"undefined\" && result.message != null) {\n return this.interpolate(result.message, options);\n }\n else {\n pluralizer = this.pluralization.get(options.locale);\n return this.missingTranslation(scope + '.' + pluralizer(count)[0], options);\n }\n };\n\n // Return a missing translation message for the given parameters.\n I18n.missingTranslation = function(scope, options) {\n //guess intended string\n if(this.missingBehaviour === 'guess'){\n //get only the last portion of the scope\n var s = scope.split('.').slice(-1)[0];\n //replace underscore with space && camelcase with space and lowercase letter\n return (this.missingTranslationPrefix.length > 0 ? this.missingTranslationPrefix : '') +\n s.replace(/_/g,' ').replace(/([a-z])([A-Z])/g,\n function(match, p1, p2) {return p1 + ' ' + p2.toLowerCase()} );\n }\n\n var localeForTranslation = (options != null && options.locale != null) ? options.locale : this.currentLocale();\n var fullScope = this.getFullScope(scope, options);\n var fullScopeWithLocale = [localeForTranslation, fullScope].join(options.separator || this.defaultSeparator);\n\n return '[missing \"' + fullScopeWithLocale + '\" translation]';\n };\n\n // Return a missing placeholder message for given parameters\n I18n.missingPlaceholder = function(placeholder, message, options) {\n return \"[missing \" + placeholder + \" value]\";\n };\n\n I18n.nullPlaceholder = function() {\n return I18n.missingPlaceholder.apply(I18n, arguments);\n };\n\n // Format number using localization rules.\n // The options will be retrieved from the `number.format` scope.\n // If this isn't present, then the following options will be used:\n //\n // - `precision`: `3`\n // - `separator`: `\".\"`\n // - `delimiter`: `\",\"`\n // - `strip_insignificant_zeros`: `false`\n //\n // You can also override these options by providing the `options` argument.\n //\n I18n.toNumber = function(number, options) {\n options = this.prepareOptions(\n options\n , this.lookup(\"number.format\")\n , NUMBER_FORMAT\n );\n\n var negative = number < 0\n , string = toFixed(Math.abs(number), options.precision).toString()\n , parts = string.split(\".\")\n , precision\n , buffer = []\n , formattedNumber\n , format = options.format || \"%n\"\n , sign = negative ? \"-\" : \"\"\n ;\n\n number = parts[0];\n precision = parts[1];\n\n while (number.length > 0) {\n buffer.unshift(number.substr(Math.max(0, number.length - 3), 3));\n number = number.substr(0, number.length -3);\n }\n\n formattedNumber = buffer.join(options.delimiter);\n\n if (options.strip_insignificant_zeros && precision) {\n precision = precision.replace(/0+$/, \"\");\n }\n\n if (options.precision > 0 && precision) {\n formattedNumber += options.separator + precision;\n }\n\n if (options.sign_first) {\n format = \"%s\" + format;\n }\n else {\n format = format.replace(\"%n\", \"%s%n\");\n }\n\n formattedNumber = format\n .replace(\"%u\", options.unit)\n .replace(\"%n\", formattedNumber)\n .replace(\"%s\", sign)\n ;\n\n return formattedNumber;\n };\n\n // Format currency with localization rules.\n // The options will be retrieved from the `number.currency.format` and\n // `number.format` scopes, in that order.\n //\n // Any missing option will be retrieved from the `I18n.toNumber` defaults and\n // the following options:\n //\n // - `unit`: `\"$\"`\n // - `precision`: `2`\n // - `format`: `\"%u%n\"`\n // - `delimiter`: `\",\"`\n // - `separator`: `\".\"`\n //\n // You can also override these options by providing the `options` argument.\n //\n I18n.toCurrency = function(number, options) {\n options = this.prepareOptions(\n options\n , this.lookup(\"number.currency.format\", options)\n , this.lookup(\"number.format\", options)\n , CURRENCY_FORMAT\n );\n\n return this.toNumber(number, options);\n };\n\n // Localize several values.\n // You can provide the following scopes: `currency`, `number`, or `percentage`.\n // If you provide a scope that matches the `/^(date|time)/` regular expression\n // then the `value` will be converted by using the `I18n.toTime` function.\n //\n // It will default to the value's `toString` function.\n //\n I18n.localize = function(scope, value, options) {\n options || (options = {});\n\n switch (scope) {\n case \"currency\":\n return this.toCurrency(value, options);\n case \"number\":\n scope = this.lookup(\"number.format\", options);\n return this.toNumber(value, scope);\n case \"percentage\":\n return this.toPercentage(value, options);\n default:\n var localizedValue;\n\n if (scope.match(/^(date|time)/)) {\n localizedValue = this.toTime(scope, value, options);\n } else {\n localizedValue = value.toString();\n }\n\n return this.interpolate(localizedValue, options);\n }\n };\n\n // Parse a given `date` string into a JavaScript Date object.\n // This function is time zone aware.\n //\n // The following string formats are recognized:\n //\n // yyyy-mm-dd\n // yyyy-mm-dd[ T]hh:mm::ss\n // yyyy-mm-dd[ T]hh:mm::ss\n // yyyy-mm-dd[ T]hh:mm::ssZ\n // yyyy-mm-dd[ T]hh:mm::ss+0000\n // yyyy-mm-dd[ T]hh:mm::ss+00:00\n // yyyy-mm-dd[ T]hh:mm::ss.123Z\n //\n I18n.parseDate = function(date) {\n var matches, convertedDate, fraction;\n // A date input of `null` or `undefined` will be returned as-is\n if (date == null) {\n return date;\n }\n // we have a date, so just return it.\n if (typeof(date) === \"object\") {\n return date;\n }\n\n matches = date.toString().match(/(\\d{4})-(\\d{2})-(\\d{2})(?:[ T](\\d{2}):(\\d{2}):(\\d{2})([\\.,]\\d{1,3})?)?(Z|\\+00:?00)?/);\n\n if (matches) {\n for (var i = 1; i <= 6; i++) {\n matches[i] = parseInt(matches[i], 10) || 0;\n }\n\n // month starts on 0\n matches[2] -= 1;\n\n fraction = matches[7] ? 1000 * (\"0\" + matches[7]) : null;\n\n if (matches[8]) {\n convertedDate = new Date(Date.UTC(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6], fraction));\n } else {\n convertedDate = new Date(matches[1], matches[2], matches[3], matches[4], matches[5], matches[6], fraction);\n }\n } else if (typeof(date) == \"number\") {\n // UNIX timestamp\n convertedDate = new Date();\n convertedDate.setTime(date);\n } else if (date.match(/([A-Z][a-z]{2}) ([A-Z][a-z]{2}) (\\d+) (\\d+:\\d+:\\d+) ([+-]\\d+) (\\d+)/)) {\n // This format `Wed Jul 20 13:03:39 +0000 2011` is parsed by\n // webkit/firefox, but not by IE, so we must parse it manually.\n convertedDate = new Date();\n convertedDate.setTime(Date.parse([\n RegExp.$1, RegExp.$2, RegExp.$3, RegExp.$6, RegExp.$4, RegExp.$5\n ].join(\" \")));\n } else if (date.match(/\\d+ \\d+:\\d+:\\d+ [+-]\\d+ \\d+/)) {\n // a valid javascript format with timezone info\n convertedDate = new Date();\n convertedDate.setTime(Date.parse(date));\n } else {\n // an arbitrary javascript string\n convertedDate = new Date();\n convertedDate.setTime(Date.parse(date));\n }\n\n return convertedDate;\n };\n\n // Formats time according to the directives in the given format string.\n // The directives begins with a percent (%) character. Any text not listed as a\n // directive will be passed through to the output string.\n //\n // The accepted formats are:\n //\n // %a - The abbreviated weekday name (Sun)\n // %A - The full weekday name (Sunday)\n // %b - The abbreviated month name (Jan)\n // %B - The full month name (January)\n // %c - The preferred local date and time representation\n // %d - Day of the month (01..31)\n // %-d - Day of the month (1..31)\n // %H - Hour of the day, 24-hour clock (00..23)\n // %-H/%k - Hour of the day, 24-hour clock (0..23)\n // %I - Hour of the day, 12-hour clock (01..12)\n // %-I/%l - Hour of the day, 12-hour clock (1..12)\n // %m - Month of the year (01..12)\n // %-m - Month of the year (1..12)\n // %M - Minute of the hour (00..59)\n // %-M - Minute of the hour (0..59)\n // %p - Meridian indicator (AM or PM)\n // %P - Meridian indicator (am or pm)\n // %S - Second of the minute (00..60)\n // %-S - Second of the minute (0..60)\n // %w - Day of the week (Sunday is 0, 0..6)\n // %y - Year without a century (00..99)\n // %-y - Year without a century (0..99)\n // %Y - Year with century\n // %z/%Z - Timezone offset (+0545)\n //\n I18n.strftime = function(date, format, options) {\n var options = this.lookup(\"date\", options)\n , meridianOptions = I18n.meridian()\n ;\n\n if (!options) {\n options = {};\n }\n\n options = this.prepareOptions(options, DATE);\n\n if (isNaN(date.getTime())) {\n throw new Error('I18n.strftime() requires a valid date object, but received an invalid date.');\n }\n\n var weekDay = date.getDay()\n , day = date.getDate()\n , year = date.getFullYear()\n , month = date.getMonth() + 1\n , hour = date.getHours()\n , hour12 = hour\n , meridian = hour > 11 ? 1 : 0\n , secs = date.getSeconds()\n , mins = date.getMinutes()\n , offset = date.getTimezoneOffset()\n , absOffsetHours = Math.floor(Math.abs(offset / 60))\n , absOffsetMinutes = Math.abs(offset) - (absOffsetHours * 60)\n , timezoneoffset = (offset > 0 ? \"-\" : \"+\") +\n (absOffsetHours.toString().length < 2 ? \"0\" + absOffsetHours : absOffsetHours) +\n (absOffsetMinutes.toString().length < 2 ? \"0\" + absOffsetMinutes : absOffsetMinutes)\n ;\n\n if (hour12 > 12) {\n hour12 = hour12 - 12;\n } else if (hour12 === 0) {\n hour12 = 12;\n }\n\n format = format.replace(\"%a\", options.abbr_day_names[weekDay]);\n format = format.replace(\"%A\", options.day_names[weekDay]);\n format = format.replace(\"%b\", options.abbr_month_names[month]);\n format = format.replace(\"%B\", options.month_names[month]);\n format = format.replace(\"%d\", padding(day));\n format = format.replace(\"%e\", day);\n format = format.replace(\"%-d\", day);\n format = format.replace(\"%H\", padding(hour));\n format = format.replace(\"%-H\", hour);\n format = format.replace(\"%k\", hour);\n format = format.replace(\"%I\", padding(hour12));\n format = format.replace(\"%-I\", hour12);\n format = format.replace(\"%l\", hour12);\n format = format.replace(\"%m\", padding(month));\n format = format.replace(\"%-m\", month);\n format = format.replace(\"%M\", padding(mins));\n format = format.replace(\"%-M\", mins);\n format = format.replace(\"%p\", meridianOptions[meridian]);\n format = format.replace(\"%P\", meridianOptions[meridian].toLowerCase());\n format = format.replace(\"%S\", padding(secs));\n format = format.replace(\"%-S\", secs);\n format = format.replace(\"%w\", weekDay);\n format = format.replace(\"%y\", padding(year));\n format = format.replace(\"%-y\", padding(year).replace(/^0+/, \"\"));\n format = format.replace(\"%Y\", year);\n format = format.replace(\"%z\", timezoneoffset);\n format = format.replace(\"%Z\", timezoneoffset);\n\n return format;\n };\n\n // Convert the given dateString into a formatted date.\n I18n.toTime = function(scope, dateString, options) {\n var date = this.parseDate(dateString)\n , format = this.lookup(scope, options)\n ;\n\n // A date input of `null` or `undefined` will be returned as-is\n if (date == null) {\n return date;\n }\n\n var date_string = date.toString()\n if (date_string.match(/invalid/i)) {\n return date_string;\n }\n\n if (!format) {\n return date_string;\n }\n\n return this.strftime(date, format, options);\n };\n\n // Convert a number into a formatted percentage value.\n I18n.toPercentage = function(number, options) {\n options = this.prepareOptions(\n options\n , this.lookup(\"number.percentage.format\", options)\n , this.lookup(\"number.format\", options)\n , PERCENTAGE_FORMAT\n );\n\n return this.toNumber(number, options);\n };\n\n // Convert a number into a readable size representation.\n I18n.toHumanSize = function(number, options) {\n var kb = 1024\n , size = number\n , iterations = 0\n , unit\n , precision\n , fullScope\n ;\n\n while (size >= kb && iterations < 4) {\n size = size / kb;\n iterations += 1;\n }\n\n if (iterations === 0) {\n fullScope = this.getFullScope(\"number.human.storage_units.units.byte\", options);\n unit = this.t(fullScope, {count: size});\n precision = 0;\n } else {\n fullScope = this.getFullScope(\"number.human.storage_units.units.\" + SIZE_UNITS[iterations], options);\n unit = this.t(fullScope);\n precision = (size - Math.floor(size) === 0) ? 0 : 1;\n }\n\n options = this.prepareOptions(\n options\n , {unit: unit, precision: precision, format: \"%n%u\", delimiter: \"\"}\n );\n\n return this.toNumber(size, options);\n };\n\n I18n.getFullScope = function(scope, options) {\n options = options || {};\n\n // Deal with the scope as an array.\n if (isArray(scope)) {\n scope = scope.join(options.separator || this.defaultSeparator);\n }\n\n // Deal with the scope option provided through the second argument.\n //\n // I18n.t('hello', {scope: 'greetings'});\n //\n if (options.scope) {\n scope = [options.scope, scope].join(options.separator || this.defaultSeparator);\n }\n\n return scope;\n };\n /**\n * Merge obj1 with obj2 (shallow merge), without modifying inputs\n * @param {Object} obj1\n * @param {Object} obj2\n * @returns {Object} Merged values of obj1 and obj2\n *\n * In order to support ES3, `Object.prototype.hasOwnProperty.call` is used\n * Idea is from:\n * https://stackoverflow.com/questions/8157700/object-has-no-hasownproperty-method-i-e-its-undefined-ie8\n */\n I18n.extend = function ( obj1, obj2 ) {\n if (typeof(obj1) === \"undefined\" && typeof(obj2) === \"undefined\") {\n return {};\n }\n return merge(obj1, obj2);\n };\n\n // Set aliases, so we can save some typing.\n I18n.t = I18n.translate.bind(I18n);\n I18n.l = I18n.localize.bind(I18n);\n I18n.p = I18n.pluralize.bind(I18n);\n\n return I18n;\n}));\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar getBoundingClientRect = function getBoundingClientRect(node) {\n if (node != null) {\n var isElement = node.nodeType === 1;\n /* Node.ELEMENT_NODE */\n\n if (isElement && typeof node.getBoundingClientRect === 'function') {\n return node.getBoundingClientRect();\n }\n }\n};\n\nexport default getBoundingClientRect;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar CSS_UNIT_RE = /^[+-]?\\d*(?:\\.\\d+)?(?:[Ee][+-]?\\d+)?(%|\\w*)/;\n\nvar getUnit = function getUnit(str) {\n return str.match(CSS_UNIT_RE)[1];\n};\n\nvar isNumeric = function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n};\n\nvar multiplyStyleLengthValue = function multiplyStyleLengthValue(value, multiple) {\n if (typeof value === 'string') {\n var number = parseFloat(value) * multiple;\n var unit = getUnit(value);\n return \"\" + number + unit;\n } else if (isNumeric(value)) {\n return value * multiple;\n }\n};\n\nexport default multiplyStyleLengthValue;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isPrefixedValue;\nvar regex = /-webkit-|-moz-|-ms-/;\n\nfunction isPrefixedValue(value) {\n return typeof value === 'string' && regex.test(value);\n}\nmodule.exports = exports['default'];","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport View from '../View';\n\nvar KeyboardAvoidingView = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(KeyboardAvoidingView, _React$Component);\n\n function KeyboardAvoidingView() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.frame = null;\n\n _this.onLayout = function (event) {\n _this.frame = event.nativeEvent.layout;\n };\n\n return _this;\n }\n\n var _proto = KeyboardAvoidingView.prototype;\n\n _proto.relativeKeyboardHeight = function relativeKeyboardHeight(keyboardFrame) {\n var frame = this.frame;\n\n if (!frame || !keyboardFrame) {\n return 0;\n }\n\n var keyboardY = keyboardFrame.screenY - (this.props.keyboardVerticalOffset || 0);\n return Math.max(frame.y + frame.height - keyboardY, 0);\n };\n\n _proto.onKeyboardChange = function onKeyboardChange(event) {};\n\n _proto.render = function render() {\n var _this$props = this.props,\n behavior = _this$props.behavior,\n contentContainerStyle = _this$props.contentContainerStyle,\n keyboardVerticalOffset = _this$props.keyboardVerticalOffset,\n rest = _objectWithoutPropertiesLoose(_this$props, [\"behavior\", \"contentContainerStyle\", \"keyboardVerticalOffset\"]);\n\n return /*#__PURE__*/React.createElement(View, _extends({\n onLayout: this.onLayout\n }, rest));\n };\n\n return KeyboardAvoidingView;\n}(React.Component);\n\nexport default KeyboardAvoidingView;","import { nanoid } from 'nanoid/non-secure';\nimport type {\n CommonNavigationAction,\n NavigationState,\n PartialState,\n} from './types';\n\n/**\n * Base router object that can be used when writing custom routers.\n * This provides few helper methods to handle common actions such as `RESET`.\n */\nconst BaseRouter = {\n getStateForAction<State extends NavigationState>(\n state: State,\n action: CommonNavigationAction\n ): State | PartialState<State> | null {\n switch (action.type) {\n case 'SET_PARAMS': {\n const index = action.source\n ? state.routes.findIndex((r) => r.key === action.source)\n : state.index;\n\n if (index === -1) {\n return null;\n }\n\n return {\n ...state,\n routes: state.routes.map((r, i) =>\n i === index\n ? { ...r, params: { ...r.params, ...action.payload.params } }\n : r\n ),\n };\n }\n\n case 'RESET': {\n const nextState = action.payload as State | PartialState<State>;\n\n if (\n nextState.routes.length === 0 ||\n nextState.routes.some(\n (route: { name: string }) => !state.routeNames.includes(route.name)\n )\n ) {\n return null;\n }\n\n if (nextState.stale === false) {\n if (\n state.routeNames.length !== nextState.routeNames.length ||\n nextState.routeNames.some(\n (name) => !state.routeNames.includes(name)\n )\n ) {\n return null;\n }\n\n return {\n ...nextState,\n routes: nextState.routes.map((route) =>\n route.key ? route : { ...route, key: `${route.name}-${nanoid()}` }\n ),\n };\n }\n\n return nextState;\n }\n\n default:\n return null;\n }\n },\n\n shouldActionChangeFocus(action: CommonNavigationAction) {\n return action.type === 'NAVIGATE';\n },\n};\n\nexport default BaseRouter;\n","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar RootTagContext = /*#__PURE__*/React.createContext(null);\nexport default function AppContainer(props) {\n var children = props.children,\n WrapperComponent = props.WrapperComponent;\n var innerView = /*#__PURE__*/React.createElement(View, {\n children: children,\n key: 1,\n pointerEvents: \"box-none\",\n style: styles.appContainer\n });\n\n if (WrapperComponent) {\n innerView = /*#__PURE__*/React.createElement(WrapperComponent, null, innerView);\n }\n\n return /*#__PURE__*/React.createElement(RootTagContext.Provider, {\n value: props.rootTag\n }, /*#__PURE__*/React.createElement(View, {\n pointerEvents: \"box-none\",\n style: styles.appContainer\n }, innerView));\n}\nvar styles = StyleSheet.create({\n appContainer: {\n flex: 1\n }\n});","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport AppContainer from './AppContainer';\nimport invariant from 'fbjs/lib/invariant';\nimport render, { hydrate } from '../render';\nimport styleResolver from '../StyleSheet/styleResolver';\nimport React from 'react';\nexport default function renderApplication(RootComponent, WrapperComponent, callback, options) {\n var shouldHydrate = options.hydrate,\n initialProps = options.initialProps,\n rootTag = options.rootTag;\n var renderFn = shouldHydrate ? hydrate : render;\n invariant(rootTag, 'Expect to have a valid rootTag, instead got ', rootTag);\n renderFn( /*#__PURE__*/React.createElement(AppContainer, {\n WrapperComponent: WrapperComponent,\n rootTag: rootTag\n }, /*#__PURE__*/React.createElement(RootComponent, initialProps)), rootTag, callback);\n}\nexport function getApplication(RootComponent, initialProps, WrapperComponent) {\n var element = /*#__PURE__*/React.createElement(AppContainer, {\n WrapperComponent: WrapperComponent,\n rootTag: {}\n }, /*#__PURE__*/React.createElement(RootComponent, initialProps)); // Don't escape CSS text\n\n var getStyleElement = function getStyleElement(props) {\n var sheet = styleResolver.getStyleSheet();\n return /*#__PURE__*/React.createElement(\"style\", _extends({}, props, {\n dangerouslySetInnerHTML: {\n __html: sheet.textContent\n },\n id: sheet.id\n }));\n };\n\n return {\n element: element,\n getStyleElement: getStyleElement\n };\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport invariant from 'fbjs/lib/invariant';\nimport unmountComponentAtNode from '../unmountComponentAtNode';\nimport renderApplication, { getApplication as _getApplication } from './renderApplication';\nvar emptyObject = {};\nvar runnables = {};\n\nvar componentProviderInstrumentationHook = function componentProviderInstrumentationHook(component) {\n return component();\n};\n\nvar wrapperComponentProvider;\n/**\n * `AppRegistry` is the JS entry point to running all React Native apps.\n */\n\nvar AppRegistry = /*#__PURE__*/function () {\n function AppRegistry() {}\n\n AppRegistry.getAppKeys = function getAppKeys() {\n return Object.keys(runnables);\n };\n\n AppRegistry.getApplication = function getApplication(appKey, appParameters) {\n invariant(runnables[appKey] && runnables[appKey].getApplication, \"Application \" + appKey + \" has not been registered. \" + 'This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.');\n return runnables[appKey].getApplication(appParameters);\n };\n\n AppRegistry.registerComponent = function registerComponent(appKey, componentProvider) {\n runnables[appKey] = {\n getApplication: function getApplication(appParameters) {\n return _getApplication(componentProviderInstrumentationHook(componentProvider), appParameters ? appParameters.initialProps : emptyObject, wrapperComponentProvider && wrapperComponentProvider(appParameters));\n },\n run: function run(appParameters) {\n return renderApplication(componentProviderInstrumentationHook(componentProvider), wrapperComponentProvider && wrapperComponentProvider(appParameters), appParameters.callback, {\n hydrate: appParameters.hydrate || false,\n initialProps: appParameters.initialProps || emptyObject,\n rootTag: appParameters.rootTag\n });\n }\n };\n return appKey;\n };\n\n AppRegistry.registerConfig = function registerConfig(config) {\n config.forEach(function (_ref) {\n var appKey = _ref.appKey,\n component = _ref.component,\n run = _ref.run;\n\n if (run) {\n AppRegistry.registerRunnable(appKey, run);\n } else {\n invariant(component, 'No component provider passed in');\n AppRegistry.registerComponent(appKey, component);\n }\n });\n } // TODO: fix style sheet creation when using this method\n ;\n\n AppRegistry.registerRunnable = function registerRunnable(appKey, run) {\n runnables[appKey] = {\n run: run\n };\n return appKey;\n };\n\n AppRegistry.runApplication = function runApplication(appKey, appParameters) {\n var isDevelopment = process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test';\n\n if (isDevelopment) {\n var params = _objectSpread({}, appParameters);\n\n params.rootTag = \"#\" + params.rootTag.id;\n console.log(\"Running application \\\"\" + appKey + \"\\\" with appParams:\\n\", params, \"\\nDevelopment-level warnings: \" + (isDevelopment ? 'ON' : 'OFF') + \".\" + (\"\\nPerformance optimizations: \" + (isDevelopment ? 'OFF' : 'ON') + \".\"));\n }\n\n invariant(runnables[appKey] && runnables[appKey].run, \"Application \\\"\" + appKey + \"\\\" has not been registered. \" + 'This is either due to an import error during initialization or failure to call AppRegistry.registerComponent.');\n runnables[appKey].run(appParameters);\n };\n\n AppRegistry.setComponentProviderInstrumentationHook = function setComponentProviderInstrumentationHook(hook) {\n componentProviderInstrumentationHook = hook;\n };\n\n AppRegistry.setWrapperComponentProvider = function setWrapperComponentProvider(provider) {\n wrapperComponentProvider = provider;\n };\n\n AppRegistry.unmountApplicationComponentAtRootTag = function unmountApplicationComponentAtRootTag(rootTag) {\n unmountComponentAtNode(rootTag);\n };\n\n return AppRegistry;\n}();\n\nexport { AppRegistry as default };","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar unitlessNumbers = {\n animationIterationCount: true,\n aspectRatio: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n flex: true,\n flexGrow: true,\n flexOrder: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n fontWeight: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowGap: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnGap: true,\n gridColumnStart: true,\n lineClamp: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true,\n // transform types\n scale: true,\n scaleX: true,\n scaleY: true,\n scaleZ: true,\n // RN properties\n shadowOpacity: true\n};\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\nvar prefixes = ['ms', 'Moz', 'O', 'Webkit'];\n\nvar prefixKey = function prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n};\n\nObject.keys(unitlessNumbers).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n unitlessNumbers[prefixKey(prefix, prop)] = unitlessNumbers[prop];\n });\n});\nexport default unitlessNumbers;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar emptyObject = {};\nvar objects = {};\nvar prefix = 'r';\nvar uniqueID = 1;\n\nvar createKey = function createKey(id) {\n return prefix + \"-\" + id;\n};\n\nvar ReactNativePropRegistry = /*#__PURE__*/function () {\n function ReactNativePropRegistry() {}\n\n ReactNativePropRegistry.register = function register(object) {\n var id = uniqueID++;\n\n if (process.env.NODE_ENV !== 'production') {\n Object.freeze(object);\n }\n\n var key = createKey(id);\n objects[key] = object;\n return id;\n };\n\n ReactNativePropRegistry.getByID = function getByID(id) {\n if (!id) {\n // Used in the style={[condition && id]} pattern,\n // we want it to be a no-op when the value is false or null\n return emptyObject;\n }\n\n var key = createKey(id);\n var object = objects[key];\n\n if (!object) {\n console.warn('Invalid style with id `' + id + '`. Skipping ...');\n return emptyObject;\n }\n\n return object;\n };\n\n return ReactNativePropRegistry;\n}();\n\nexport { ReactNativePropRegistry as default };","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nvar UNINITIALIZED = typeof Symbol === 'function' && typeof Symbol() === 'symbol' ? Symbol() : Object.freeze({});\nexport default function useStable(getInitialValue) {\n var ref = React.useRef(UNINITIALIZED);\n\n if (ref.current === UNINITIALIZED) {\n ref.current = getInitialValue();\n } // $FlowFixMe (#64650789) Trouble refining types where `Symbol` is concerned.\n\n\n return ref.current;\n}","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n\n return (hint === \"string\" ? String : Number)(input);\n}\n\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar index = (function () {\n var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var keyAccessors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var multiItem = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var flattenKeys = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var keys = (keyAccessors instanceof Array ? keyAccessors.length ? keyAccessors : [undefined] : [keyAccessors]).map(function (key) {\n return {\n keyAccessor: key,\n isProp: !(key instanceof Function)\n };\n });\n var indexedResult = list.reduce(function (res, item) {\n var iterObj = res;\n var itemVal = item;\n keys.forEach(function (_ref, idx) {\n var keyAccessor = _ref.keyAccessor,\n isProp = _ref.isProp;\n var key;\n\n if (isProp) {\n var _itemVal = itemVal,\n propVal = _itemVal[keyAccessor],\n rest = _objectWithoutProperties(_itemVal, [keyAccessor].map(_toPropertyKey));\n\n key = propVal;\n itemVal = rest;\n } else {\n key = keyAccessor(itemVal, idx);\n }\n\n if (idx + 1 < keys.length) {\n if (!iterObj.hasOwnProperty(key)) {\n iterObj[key] = {};\n }\n\n iterObj = iterObj[key];\n } else {\n // Leaf key\n if (multiItem) {\n if (!iterObj.hasOwnProperty(key)) {\n iterObj[key] = [];\n }\n\n iterObj[key].push(itemVal);\n } else {\n iterObj[key] = itemVal;\n }\n }\n });\n return res;\n }, {});\n\n if (multiItem instanceof Function) {\n // Reduce leaf multiple values\n (function reduce(node) {\n var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n\n if (level === keys.length) {\n Object.keys(node).forEach(function (k) {\n return node[k] = multiItem(node[k]);\n });\n } else {\n Object.values(node).forEach(function (child) {\n return reduce(child, level + 1);\n });\n }\n })(indexedResult); // IIFE\n\n }\n\n var result = indexedResult;\n\n if (flattenKeys) {\n // flatten into array\n result = [];\n\n (function flatten(node) {\n var accKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n if (accKeys.length === keys.length) {\n result.push({\n keys: accKeys,\n vals: node\n });\n } else {\n Object.entries(node).forEach(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 2),\n key = _ref3[0],\n val = _ref3[1];\n\n return flatten(val, [].concat(_toConsumableArray(accKeys), [key]));\n });\n }\n })(indexedResult); //IIFE\n\n\n if (keyAccessors instanceof Array && keyAccessors.length === 0 && result.length === 1) {\n // clear keys if there's no key accessors (single result)\n result[0].keys = [];\n }\n }\n\n return result;\n});\n\nexport default index;\n","// TinyColor v1.4.2\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\n(function(Math) {\n\nvar trimLeft = /^\\s+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n mathRound = Math.round,\n mathMin = Math.min,\n mathMax = Math.max,\n mathRandom = Math.random;\n\nfunction tinycolor (color, opts) {\n\n color = (color) ? color : '';\n opts = opts || { };\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n this._originalInput = color,\n this._r = rgb.r,\n this._g = rgb.g,\n this._b = rgb.b,\n this._a = rgb.a,\n this._roundA = mathRound(100*this._a) / 100,\n this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) { this._r = mathRound(this._r); }\n if (this._g < 1) { this._g = mathRound(this._g); }\n if (this._b < 1) { this._b = mathRound(this._b); }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n}\n\ntinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r/255;\n GsRGB = rgb.g/255;\n BsRGB = rgb.b/255;\n\n if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}\n if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}\n if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}\n return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100*this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);\n return (this._a == 1) ?\n \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" :\n \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \"+ this._roundA + \")\";\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);\n return (this._a == 1) ?\n \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" :\n \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \"+ this._roundA + \")\";\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function(allow4Char) {\n return '#' + this.toHex8(allow4Char);\n },\n toRgb: function() {\n return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };\n },\n toRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \")\" :\n \"rgba(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function() {\n return { r: mathRound(bound01(this._r, 255) * 100) + \"%\", g: mathRound(bound01(this._g, 255) * 100) + \"%\", b: mathRound(bound01(this._b, 255) * 100) + \"%\", a: this._a };\n },\n toPercentageRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%)\" :\n \"rgba(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function() {\n if (this._a === 0) {\n return \"transparent\";\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n\n return \"progid:DXImageTransform.Microsoft.gradient(\"+gradientType+\"startColorstr=\"+hex8String+\",endColorstr=\"+secondHex8String+\")\";\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n clone: function() {\n return tinycolor(this.toString());\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function(color, opts) {\n if (typeof color == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n }\n else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n// \"red\"\n// \"#f00\" or \"f00\"\n// \"#ff0000\" or \"ff0000\"\n// \"#ff000000\" or \"ff000000\"\n// \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n// \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n// \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n// \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n// \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n// \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n// \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n}\n\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>\n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// <http://www.w3.org/TR/css3-color/>\n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b){\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, l = (max + min) / 2;\n\n if(max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if(t < 0) t += 1;\n if(t > 1) t -= 1;\n if(t < 1/6) return p + (q - p) * 6 * t;\n if(t < 1/2) return q;\n if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n }\n\n if(s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if(max == min) {\n h = 0; // achromatic\n }\n else {\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n pad2(convertDecimalToHex(a))\n ];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) { return false; }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\n\ntinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n};\n\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>\n\nfunction desaturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction saturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction greyscale(color) {\n return tinycolor(color).desaturate(100);\n}\n\nfunction lighten (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\nfunction brighten(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));\n return tinycolor(rgb);\n}\n\nfunction darken (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>\n\nfunction complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n}\n\nfunction triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})\n ];\n}\n\nfunction analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n}\n\nfunction monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h, s = hsv.s, v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v}));\n v = (v + modification) % 1;\n }\n\n return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function(color1, color2, amount) {\n amount = (amount === 0) ? 0 : (amount || 50);\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n\n var rgba = {\n r: ((rgb2.r - rgb1.r) * p) + rgb1.r,\n g: ((rgb2.g - rgb1.g) * p) + rgb1.g,\n b: ((rgb2.b - rgb1.b) * p) + rgb1.b,\n a: ((rgb2.a - rgb1.a) * p) + rgb1.a\n };\n\n return tinycolor(rgba);\n};\n\n\n// Readability Functions\n// ---------------------\n// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)\n\n// `contrast`\n// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)\ntinycolor.readability = function(color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);\n};\n\n// `isReadable`\n// Ensure that foreground and background color combinations meet WCAG2 guidelines.\n// The third argument is an optional Object.\n// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';\n// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.\n// If the entire object is absent, isReadable defaults to {level:\"AA\",size:\"small\"}.\n\n// *Example*\n// tinycolor.isReadable(\"#000\", \"#111\") => false\n// tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function(color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n\n out = false;\n\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function(baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size ;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors ;\n level = args.level;\n size = args.size;\n\n for (var i= 0; i < colorList.length ; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n\n if (tinycolor.isReadable(baseColor, bestColor, {\"level\":level,\"size\":size}) || !includeFallbackColors) {\n return bestColor;\n }\n else {\n args.includeFallbackColors=false;\n return tinycolor.mostReadable(baseColor,[\"#fff\", \"#000\"],args);\n }\n};\n\n\n// Big List of Colors\n// ------------------\n// <http://www.w3.org/TR/css3-color/#svg-color>\nvar names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n var flipped = { };\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n if (isOnePointZero(n)) { n = \"100%\"; }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if ((Math.abs(n - max) < 0.000001)) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n return mathMin(1, mathMax(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\nfunction isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf('.') != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n}\n\nvar matchers = (function() {\n\n // <http://www.w3.org/TR/css3-values/#integers>\n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // <http://www.w3.org/TR/css3-values/#number-value>\n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n})();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n\n color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: \"name\" };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if ((match = matchers.hex4.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: convertHexToDecimal(match[4] + '' + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n\n return false;\n}\n\nfunction validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\"level\":\"AA\", \"size\":\"small\"};\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\"level\":level, \"size\":size};\n}\n\n// Node: Export function\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports = tinycolor;\n}\n// AMD/requirejs: Define the module\nelse if (typeof define === 'function' && define.amd) {\n define(function () {return tinycolor;});\n}\n// Browser: Expose to window\nelse {\n window.tinycolor = tinycolor;\n}\n\n})(Math);\n","import * as React from 'react';\nimport type {\n ParamListBase,\n NavigationState,\n Route,\n} from '@react-navigation/routers';\nimport type { RouteProp } from './types';\n\ntype RouteCache = Map<Route<string>, RouteProp<ParamListBase, string>>;\n\n/**\n * Utilites such as `getFocusedRouteNameFromRoute` need to access state.\n * So we need a way to suppress the warning for those use cases.\n * This is fine since they are internal utilities and this is not public API.\n */\nexport const SUPPRESS_STATE_ACCESS_WARNING = { value: false };\n\n/**\n * Hook to cache route props for each screen in the navigator.\n * This lets add warnings and modifications to the route object but keep references between renders.\n */\nexport default function useRouteCache<State extends NavigationState>(\n routes: State['routes']\n) {\n // Cache object which holds route objects for each screen\n const cache = React.useMemo(() => ({ current: new Map() as RouteCache }), []);\n\n if (process.env.NODE_ENV === 'production') {\n // We don't want the overhead of creating extra maps every render in prod\n return routes;\n }\n\n cache.current = routes.reduce((acc, route) => {\n const previous = cache.current.get(route);\n\n if (previous) {\n // If a cached route object already exists, reuse it\n acc.set(route, previous);\n } else {\n const proxy = { ...route };\n\n Object.defineProperty(proxy, 'state', {\n get() {\n if (!SUPPRESS_STATE_ACCESS_WARNING.value) {\n console.warn(\n \"Accessing the 'state' property of the 'route' object is not supported. If you want to get the focused route name, use the 'getFocusedRouteNameFromRoute' helper instead: https://reactnavigation.org/docs/screen-options-resolution/#setting-parent-screen-options-based-on-child-navigators-state\"\n );\n }\n\n return route.state;\n },\n });\n\n acc.set(route, proxy);\n }\n\n return acc;\n }, new Map() as RouteCache);\n\n return Array.from(cache.current.values());\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, props) {\n object = Object(object);\n return basePickBy(object, props, function(value, key) {\n return key in object;\n });\n}\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick from.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, props, predicate) {\n var index = -1,\n length = props.length,\n result = {};\n\n while (++index < length) {\n var key = props[index],\n value = object[key];\n\n if (predicate(value, key)) {\n result[key] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [props] The property identifiers to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = baseRest(function(object, props) {\n return object == null ? {} : basePick(object, arrayMap(baseFlatten(props, 1), toKey));\n});\n\nmodule.exports = pick;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}\nmodule.exports = _isPlaceholder;","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar _curryN = /*#__PURE__*/require('./internal/_curryN');\n\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n * var sumArgs = (...args) => R.sum(args);\n *\n * var curriedAddFourNumbers = R.curryN(4, sumArgs);\n * var f = curriedAddFourNumbers(1, 2);\n * var g = f(3);\n * g(4); //=> 10\n */\n\n\nvar curryN = /*#__PURE__*/_curry2(function curryN(length, fn) {\n if (length === 1) {\n return _curry1(fn);\n }\n return _arity(length, _curryN(length, [], fn));\n});\nmodule.exports = curryN;","function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nmodule.exports = _has;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport normalizeColor from 'normalize-css-color';\n\nvar processColor = function processColor(color) {\n if (color === undefined || color === null) {\n return color;\n } // convert number and hex\n\n\n var int32Color = normalizeColor(color);\n\n if (int32Color === undefined || int32Color === null) {\n return undefined;\n }\n\n int32Color = (int32Color << 24 | int32Color >>> 8) >>> 0;\n return int32Color;\n};\n\nexport default processColor;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport Dimensions from '../Dimensions';\n/**\n * PixelRatio gives access to the device pixel density.\n */\n\nvar PixelRatio = /*#__PURE__*/function () {\n function PixelRatio() {}\n\n /**\n * Returns the device pixel density.\n */\n PixelRatio.get = function get() {\n return Dimensions.get('window').scale;\n }\n /**\n * No equivalent for Web\n */\n ;\n\n PixelRatio.getFontScale = function getFontScale() {\n return Dimensions.get('window').fontScale || PixelRatio.get();\n }\n /**\n * Converts a layout size (dp) to pixel size (px).\n * Guaranteed to return an integer number.\n */\n ;\n\n PixelRatio.getPixelSizeForLayoutSize = function getPixelSizeForLayoutSize(layoutSize) {\n return Math.round(layoutSize * PixelRatio.get());\n }\n /**\n * Rounds a layout size (dp) to the nearest layout size that corresponds to\n * an integer number of pixels. For example, on a device with a PixelRatio\n * of 3, `PixelRatio.roundToNearestPixel(8.4) = 8.33`, which corresponds to\n * exactly (8.33 * 3) = 25 pixels.\n */\n ;\n\n PixelRatio.roundToNearestPixel = function roundToNearestPixel(layoutSize) {\n var ratio = PixelRatio.get();\n return Math.round(layoutSize * ratio) / ratio;\n };\n\n return PixelRatio;\n}();\n\nexport { PixelRatio as default };","function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport View from '../View';\nimport React from 'react';\n\nfunction RefreshControl(props) {\n var colors = props.colors,\n enabled = props.enabled,\n onRefresh = props.onRefresh,\n progressBackgroundColor = props.progressBackgroundColor,\n progressViewOffset = props.progressViewOffset,\n refreshing = props.refreshing,\n size = props.size,\n tintColor = props.tintColor,\n title = props.title,\n titleColor = props.titleColor,\n rest = _objectWithoutPropertiesLoose(props, [\"colors\", \"enabled\", \"onRefresh\", \"progressBackgroundColor\", \"progressViewOffset\", \"refreshing\", \"size\", \"tintColor\", \"title\", \"titleColor\"]);\n\n return /*#__PURE__*/React.createElement(View, rest);\n}\n\nexport default RefreshControl;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport * as React from 'react';\nimport { useMemo, useRef } from 'react';\nimport pick from '../../modules/pick';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePressEvents from '../../modules/usePressEvents';\nvar forwardPropsList = {\n accessibilityDisabled: true,\n accessibilityLabel: true,\n accessibilityLiveRegion: true,\n accessibilityRole: true,\n accessibilityState: true,\n accessibilityValue: true,\n children: true,\n disabled: true,\n focusable: true,\n nativeID: true,\n onBlur: true,\n onFocus: true,\n onLayout: true,\n testID: true\n};\n\nvar pickProps = function pickProps(props) {\n return pick(props, forwardPropsList);\n};\n\nfunction TouchableWithoutFeedback(props, forwardedRef) {\n var delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n delayLongPress = props.delayLongPress,\n disabled = props.disabled,\n focusable = props.focusable,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n rejectResponderTermination = props.rejectResponderTermination;\n var hostRef = useRef(null);\n var pressConfig = useMemo(function () {\n return {\n cancelable: !rejectResponderTermination,\n disabled: disabled,\n delayLongPress: delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressStart: onPressIn,\n onPressEnd: onPressOut\n };\n }, [disabled, delayPressIn, delayPressOut, delayLongPress, onLongPress, onPress, onPressIn, onPressOut, rejectResponderTermination]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n var element = React.Children.only(props.children);\n var children = [element.props.children];\n var supportedProps = pickProps(props);\n supportedProps.accessibilityDisabled = disabled;\n supportedProps.focusable = !disabled && focusable !== false;\n supportedProps.ref = useMergeRefs(forwardedRef, hostRef, element.ref);\n var elementProps = Object.assign(supportedProps, pressEventHandlers);\n return /*#__PURE__*/React.cloneElement.apply(React, [element, elementProps].concat(children));\n}\n\nvar MemoedTouchableWithoutFeedback = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(TouchableWithoutFeedback));\nMemoedTouchableWithoutFeedback.displayName = 'TouchableWithoutFeedback';\nexport default MemoedTouchableWithoutFeedback;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { hydrate, render } from 'react-dom';\nexport { hydrate };\nexport default render;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { unmountComponentAtNode } from 'react-dom';\nexport default unmountComponentAtNode;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport dismissKeyboard from '../../modules/dismissKeyboard';\nvar Keyboard = {\n addListener: function addListener() {\n return {\n remove: function remove() {}\n };\n },\n dismiss: function dismiss() {\n dismissKeyboard();\n },\n removeAllListeners: function removeAllListeners() {},\n removeListener: function removeListener() {}\n};\nexport default Keyboard;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n\nvar cssFunction = function () {\n if (canUseDOM && window.CSS && window.CSS.supports && window.CSS.supports('top: constant(safe-area-inset-top)')) {\n return 'constant';\n }\n\n return 'env';\n}();\n\nvar SafeAreaView = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var style = props.style,\n rest = _objectWithoutPropertiesLoose(props, [\"style\"]);\n\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, {\n ref: ref,\n style: StyleSheet.compose(styles.root, style)\n }));\n});\nSafeAreaView.displayName = 'SafeAreaView';\nvar styles = StyleSheet.create({\n root: {\n paddingTop: cssFunction + \"(safe-area-inset-top)\",\n paddingRight: cssFunction + \"(safe-area-inset-right)\",\n paddingBottom: cssFunction + \"(safe-area-inset-bottom)\",\n paddingLeft: cssFunction + \"(safe-area-inset-left)\"\n }\n});\nexport default SafeAreaView;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from 'react';\nimport { useCallback, useMemo, useState, useRef } from 'react';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePressEvents from '../../modules/usePressEvents';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n\nfunction createExtraStyles(activeOpacity, underlayColor) {\n return {\n child: {\n opacity: activeOpacity !== null && activeOpacity !== void 0 ? activeOpacity : 0.85\n },\n underlay: {\n backgroundColor: underlayColor === undefined ? 'black' : underlayColor\n }\n };\n}\n\nfunction hasPressHandler(props) {\n return props.onPress != null || props.onPressIn != null || props.onPressOut != null || props.onLongPress != null;\n}\n/**\n * A wrapper for making views respond properly to touches.\n * On press down, the opacity of the wrapped view is decreased, which allows\n * the underlay color to show through, darkening or tinting the view.\n *\n * The underlay comes from wrapping the child in a new View, which can affect\n * layout, and sometimes cause unwanted visual artifacts if not used correctly,\n * for example if the backgroundColor of the wrapped view isn't explicitly set\n * to an opaque color.\n *\n * TouchableHighlight must have one child (not zero or more than one).\n * If you wish to have several child components, wrap them in a View.\n */\n\n\nfunction TouchableHighlight(props, forwardedRef) {\n var activeOpacity = props.activeOpacity,\n children = props.children,\n delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n delayLongPress = props.delayLongPress,\n disabled = props.disabled,\n focusable = props.focusable,\n onHideUnderlay = props.onHideUnderlay,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n onShowUnderlay = props.onShowUnderlay,\n rejectResponderTermination = props.rejectResponderTermination,\n style = props.style,\n testOnly_pressed = props.testOnly_pressed,\n underlayColor = props.underlayColor,\n rest = _objectWithoutPropertiesLoose(props, [\"activeOpacity\", \"children\", \"delayPressIn\", \"delayPressOut\", \"delayLongPress\", \"disabled\", \"focusable\", \"onHideUnderlay\", \"onLongPress\", \"onPress\", \"onPressIn\", \"onPressOut\", \"onShowUnderlay\", \"rejectResponderTermination\", \"style\", \"testOnly_pressed\", \"underlayColor\"]);\n\n var hostRef = useRef(null);\n var setRef = useMergeRefs(forwardedRef, hostRef);\n\n var _useState = useState(testOnly_pressed === true ? createExtraStyles(activeOpacity, underlayColor) : null),\n extraStyles = _useState[0],\n setExtraStyles = _useState[1];\n\n var showUnderlay = useCallback(function () {\n if (!hasPressHandler(props)) {\n return;\n }\n\n setExtraStyles(createExtraStyles(activeOpacity, underlayColor));\n\n if (onShowUnderlay != null) {\n onShowUnderlay();\n }\n }, [activeOpacity, onShowUnderlay, props, underlayColor]);\n var hideUnderlay = useCallback(function () {\n if (testOnly_pressed === true) {\n return;\n }\n\n if (hasPressHandler(props)) {\n setExtraStyles(null);\n\n if (onHideUnderlay != null) {\n onHideUnderlay();\n }\n }\n }, [onHideUnderlay, props, testOnly_pressed]);\n var pressConfig = useMemo(function () {\n return {\n cancelable: !rejectResponderTermination,\n disabled: disabled,\n delayLongPress: delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressStart: function onPressStart(event) {\n showUnderlay();\n\n if (onPressIn != null) {\n onPressIn(event);\n }\n },\n onPressEnd: function onPressEnd(event) {\n hideUnderlay();\n\n if (onPressOut != null) {\n onPressOut(event);\n }\n }\n };\n }, [delayLongPress, delayPressIn, delayPressOut, disabled, onLongPress, onPress, onPressIn, onPressOut, rejectResponderTermination, showUnderlay, hideUnderlay]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n var child = React.Children.only(children);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, pressEventHandlers, {\n accessibilityDisabled: disabled,\n focusable: !disabled && focusable !== false,\n ref: setRef,\n style: [styles.root, style, !disabled && styles.actionable, extraStyles && extraStyles.underlay]\n }), /*#__PURE__*/React.cloneElement(child, {\n style: StyleSheet.compose(child.props.style, extraStyles && extraStyles.child)\n }));\n}\n\nvar styles = StyleSheet.create({\n root: {\n userSelect: 'none'\n },\n actionable: {\n cursor: 'pointer',\n touchAction: 'manipulation'\n }\n});\nvar MemoedTouchableHighlight = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(TouchableHighlight));\nMemoedTouchableHighlight.displayName = 'TouchableHighlight';\nexport default MemoedTouchableHighlight;","import * as React from 'react';\n\n/**\n * Context which holds the values for the current navigation tree.\n * Intended for use in SSR. This is not safe to use on the client.\n */\nconst CurrentRenderContext = React.createContext<\n { options?: object } | undefined\n>(undefined);\n\nexport default CurrentRenderContext;\n","import * as React from 'react';\nimport { BackHandler } from 'react-native';\nimport type { NavigationContainerRef } from '@react-navigation/core';\n\nexport default function useBackButton(\n ref: React.RefObject<NavigationContainerRef>\n) {\n React.useEffect(() => {\n const subscription = BackHandler.addEventListener(\n 'hardwareBackPress',\n () => {\n const navigation = ref.current;\n\n if (navigation == null) {\n return false;\n }\n\n if (navigation.canGoBack()) {\n navigation.goBack();\n\n return true;\n }\n\n return false;\n }\n );\n\n return () => subscription.remove();\n }, [ref]);\n}\n","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\nimport type { Theme } from '../types';\n\ntype Props = {\n value: Theme;\n children: React.ReactNode;\n};\n\nexport default function ThemeProvider({ value, children }: Props) {\n return (\n <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n );\n}\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport View from '../../../exports/View';\nimport VirtualizedList from '../VirtualizedList';\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * Right now this just flattens everything into one list and uses VirtualizedList under the\n * hood. The only operation that might not scale well is concatting the data arrays of all the\n * sections when new props are received, which should be plenty fast for up to ~10,000 items.\n */\nvar VirtualizedSectionList = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(VirtualizedSectionList, _React$PureComponent);\n\n function VirtualizedSectionList() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n _this._getItem = function (props, sections, index) {\n if (!sections) {\n return null;\n }\n\n var itemIdx = index - 1;\n\n for (var i = 0; i < sections.length; i++) {\n var section = sections[i];\n var sectionData = section.data;\n var itemCount = props.getItemCount(sectionData);\n\n if (itemIdx === -1 || itemIdx === itemCount) {\n // We intend for there to be overflow by one on both ends of the list.\n // This will be for headers and footers. When returning a header or footer\n // item the section itself is the item.\n return section;\n } else if (itemIdx < itemCount) {\n // If we are in the bounds of the list's data then return the item.\n return props.getItem(sectionData, itemIdx);\n } else {\n itemIdx -= itemCount + 2; // Add two for the header and footer\n }\n }\n\n return null;\n };\n\n _this._keyExtractor = function (item, index) {\n var info = _this._subExtractor(index);\n\n return info && info.key || String(index);\n };\n\n _this._convertViewable = function (viewable) {\n invariant(viewable.index != null, 'Received a broken ViewToken');\n\n var info = _this._subExtractor(viewable.index);\n\n if (!info) {\n return null;\n }\n\n var keyExtractor = info.section.keyExtractor || _this.props.keyExtractor;\n return _objectSpread(_objectSpread({}, viewable), {}, {\n index: info.index,\n\n /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.63 was deployed. To see the error delete this\n * comment and run Flow. */\n key: keyExtractor(viewable.item, info.index),\n section: info.section\n });\n };\n\n _this._onViewableItemsChanged = function (_ref) {\n var viewableItems = _ref.viewableItems,\n changed = _ref.changed;\n var onViewableItemsChanged = _this.props.onViewableItemsChanged;\n\n if (onViewableItemsChanged != null) {\n onViewableItemsChanged({\n viewableItems: viewableItems.map(_this._convertViewable, _assertThisInitialized(_this)).filter(Boolean),\n changed: changed.map(_this._convertViewable, _assertThisInitialized(_this)).filter(Boolean)\n });\n }\n };\n\n _this._renderItem = function (listItemCount) {\n return function (_ref2) {\n var item = _ref2.item,\n index = _ref2.index;\n\n var info = _this._subExtractor(index);\n\n if (!info) {\n return null;\n }\n\n var infoIndex = info.index;\n\n if (infoIndex == null) {\n var section = info.section;\n\n if (info.header === true) {\n var renderSectionHeader = _this.props.renderSectionHeader;\n return renderSectionHeader ? renderSectionHeader({\n section: section\n }) : null;\n } else {\n var renderSectionFooter = _this.props.renderSectionFooter;\n return renderSectionFooter ? renderSectionFooter({\n section: section\n }) : null;\n }\n } else {\n var renderItem = info.section.renderItem || _this.props.renderItem;\n\n var SeparatorComponent = _this._getSeparatorComponent(index, info, listItemCount);\n\n invariant(renderItem, 'no renderItem!');\n return /*#__PURE__*/React.createElement(ItemWithSeparator, {\n SeparatorComponent: SeparatorComponent,\n LeadingSeparatorComponent: infoIndex === 0 ? _this.props.SectionSeparatorComponent : undefined,\n cellKey: info.key,\n index: infoIndex,\n item: item,\n leadingItem: info.leadingItem,\n leadingSection: info.leadingSection,\n onUpdateSeparator: _this._onUpdateSeparator,\n prevCellKey: (_this._subExtractor(index - 1) || {}).key,\n ref: function ref(_ref3) {\n _this._cellRefs[info.key] = _ref3;\n },\n renderItem: renderItem,\n section: info.section,\n trailingItem: info.trailingItem,\n trailingSection: info.trailingSection,\n inverted: !!_this.props.inverted\n });\n }\n };\n };\n\n _this._onUpdateSeparator = function (key, newProps) {\n var ref = _this._cellRefs[key];\n ref && ref.updateSeparatorProps(newProps);\n };\n\n _this._cellRefs = {};\n\n _this._captureRef = function (ref) {\n _this._listRef = ref;\n };\n\n return _this;\n }\n\n var _proto = VirtualizedSectionList.prototype;\n\n _proto.scrollToLocation = function scrollToLocation(params) {\n var index = params.itemIndex;\n\n for (var i = 0; i < params.sectionIndex; i++) {\n index += this.props.getItemCount(this.props.sections[i].data) + 2;\n }\n\n var viewOffset = params.viewOffset || 0;\n\n if (this._listRef == null) {\n return;\n }\n\n if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) {\n // $FlowFixMe[prop-missing] Cannot access private property\n var frame = this._listRef._getFrameMetricsApprox(index - params.itemIndex);\n\n viewOffset += frame.length;\n }\n\n var toIndexParams = _objectSpread(_objectSpread({}, params), {}, {\n viewOffset: viewOffset,\n index: index\n });\n\n this._listRef.scrollToIndex(toIndexParams);\n };\n\n _proto.getListRef = function getListRef() {\n return this._listRef;\n };\n\n _proto.render = function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n ItemSeparatorComponent = _this$props.ItemSeparatorComponent,\n SectionSeparatorComponent = _this$props.SectionSeparatorComponent,\n _renderItem = _this$props.renderItem,\n renderSectionFooter = _this$props.renderSectionFooter,\n renderSectionHeader = _this$props.renderSectionHeader,\n _sections = _this$props.sections,\n stickySectionHeadersEnabled = _this$props.stickySectionHeadersEnabled,\n passThroughProps = _objectWithoutPropertiesLoose(_this$props, [\"ItemSeparatorComponent\", \"SectionSeparatorComponent\", \"renderItem\", \"renderSectionFooter\", \"renderSectionHeader\", \"sections\", \"stickySectionHeadersEnabled\"]);\n\n var listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0;\n var stickyHeaderIndices = this.props.stickySectionHeadersEnabled ? [] : undefined;\n var itemCount = 0;\n\n for (var _iterator = _createForOfIteratorHelperLoose(this.props.sections), _step; !(_step = _iterator()).done;) {\n var section = _step.value;\n\n // Track the section header indices\n if (stickyHeaderIndices != null) {\n stickyHeaderIndices.push(itemCount + listHeaderOffset);\n } // Add two for the section header and footer.\n\n\n itemCount += 2;\n itemCount += this.props.getItemCount(section.data);\n }\n\n var renderItem = this._renderItem(itemCount);\n\n return /*#__PURE__*/React.createElement(VirtualizedList, _extends({}, passThroughProps, {\n keyExtractor: this._keyExtractor,\n stickyHeaderIndices: stickyHeaderIndices,\n renderItem: renderItem,\n data: this.props.sections,\n getItem: function getItem(sections, index) {\n return _this2._getItem(_this2.props, sections, index);\n },\n getItemCount: function getItemCount() {\n return itemCount;\n },\n onViewableItemsChanged: this.props.onViewableItemsChanged ? this._onViewableItemsChanged : undefined,\n ref: this._captureRef\n }));\n };\n\n _proto._subExtractor = function _subExtractor(index) {\n var itemIndex = index;\n var _this$props2 = this.props,\n getItem = _this$props2.getItem,\n getItemCount = _this$props2.getItemCount,\n keyExtractor = _this$props2.keyExtractor,\n sections = _this$props2.sections;\n\n for (var i = 0; i < sections.length; i++) {\n var section = sections[i];\n var sectionData = section.data;\n var key = section.key || String(i);\n itemIndex -= 1; // The section adds an item for the header\n\n if (itemIndex >= getItemCount(sectionData) + 1) {\n itemIndex -= getItemCount(sectionData) + 1; // The section adds an item for the footer.\n } else if (itemIndex === -1) {\n return {\n section: section,\n key: key + ':header',\n index: null,\n header: true,\n trailingSection: sections[i + 1]\n };\n } else if (itemIndex === getItemCount(sectionData)) {\n return {\n section: section,\n key: key + ':footer',\n index: null,\n header: false,\n trailingSection: sections[i + 1]\n };\n } else {\n var extractor = section.keyExtractor || keyExtractor;\n return {\n section: section,\n key: key + ':' + extractor(getItem(sectionData, itemIndex), itemIndex),\n index: itemIndex,\n leadingItem: getItem(sectionData, itemIndex - 1),\n leadingSection: sections[i - 1],\n trailingItem: getItem(sectionData, itemIndex + 1),\n trailingSection: sections[i + 1]\n };\n }\n }\n };\n\n _proto._getSeparatorComponent = function _getSeparatorComponent(index, info, listItemCount) {\n info = info || this._subExtractor(index);\n\n if (!info) {\n return null;\n }\n\n var ItemSeparatorComponent = info.section.ItemSeparatorComponent || this.props.ItemSeparatorComponent;\n var SectionSeparatorComponent = this.props.SectionSeparatorComponent;\n var isLastItemInList = index === listItemCount - 1;\n var isLastItemInSection = info.index === this.props.getItemCount(info.section.data) - 1;\n\n if (SectionSeparatorComponent && isLastItemInSection) {\n return SectionSeparatorComponent;\n }\n\n if (ItemSeparatorComponent && !isLastItemInSection && !isLastItemInList) {\n return ItemSeparatorComponent;\n }\n\n return null;\n };\n\n return VirtualizedSectionList;\n}(React.PureComponent);\n\nVirtualizedSectionList.defaultProps = _objectSpread(_objectSpread({}, VirtualizedList.defaultProps), {}, {\n data: []\n});\n\nvar ItemWithSeparator = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ItemWithSeparator, _React$Component);\n\n function ItemWithSeparator() {\n var _this3;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n _this3 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this3.state = {\n separatorProps: {\n highlighted: false,\n leadingItem: _this3.props.item,\n leadingSection: _this3.props.leadingSection,\n section: _this3.props.section,\n trailingItem: _this3.props.trailingItem,\n trailingSection: _this3.props.trailingSection\n },\n leadingSeparatorProps: {\n highlighted: false,\n leadingItem: _this3.props.leadingItem,\n leadingSection: _this3.props.leadingSection,\n section: _this3.props.section,\n trailingItem: _this3.props.item,\n trailingSection: _this3.props.trailingSection\n }\n };\n _this3._separators = {\n highlight: function highlight() {\n ['leading', 'trailing'].forEach(function (s) {\n return _this3._separators.updateProps(s, {\n highlighted: true\n });\n });\n },\n unhighlight: function unhighlight() {\n ['leading', 'trailing'].forEach(function (s) {\n return _this3._separators.updateProps(s, {\n highlighted: false\n });\n });\n },\n updateProps: function updateProps(select, newProps) {\n var _this3$props = _this3.props,\n LeadingSeparatorComponent = _this3$props.LeadingSeparatorComponent,\n cellKey = _this3$props.cellKey,\n prevCellKey = _this3$props.prevCellKey;\n\n if (select === 'leading' && LeadingSeparatorComponent != null) {\n _this3.setState(function (state) {\n return {\n leadingSeparatorProps: _objectSpread(_objectSpread({}, state.leadingSeparatorProps), newProps)\n };\n });\n } else {\n _this3.props.onUpdateSeparator(select === 'leading' && prevCellKey || cellKey, newProps);\n }\n }\n };\n return _this3;\n }\n\n ItemWithSeparator.getDerivedStateFromProps = function getDerivedStateFromProps(props, prevState) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n leadingItem: props.item,\n leadingSection: props.leadingSection,\n section: props.section,\n trailingItem: props.trailingItem,\n trailingSection: props.trailingSection\n }),\n leadingSeparatorProps: _objectSpread(_objectSpread({}, prevState.leadingSeparatorProps), {}, {\n leadingItem: props.leadingItem,\n leadingSection: props.leadingSection,\n section: props.section,\n trailingItem: props.item,\n trailingSection: props.trailingSection\n })\n };\n };\n\n var _proto2 = ItemWithSeparator.prototype;\n\n _proto2.updateSeparatorProps = function updateSeparatorProps(newProps) {\n this.setState(function (state) {\n return {\n separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n };\n });\n };\n\n _proto2.render = function render() {\n var _this$props3 = this.props,\n LeadingSeparatorComponent = _this$props3.LeadingSeparatorComponent,\n SeparatorComponent = _this$props3.SeparatorComponent,\n item = _this$props3.item,\n index = _this$props3.index,\n section = _this$props3.section,\n inverted = _this$props3.inverted;\n var element = this.props.renderItem({\n item: item,\n index: index,\n section: section,\n separators: this._separators\n });\n var leadingSeparator = LeadingSeparatorComponent != null && /*#__PURE__*/React.createElement(LeadingSeparatorComponent, this.state.leadingSeparatorProps);\n var separator = SeparatorComponent != null && /*#__PURE__*/React.createElement(SeparatorComponent, this.state.separatorProps);\n return leadingSeparator || separator ? /*#__PURE__*/React.createElement(View, null, inverted === false ? leadingSeparator : separator, element, inverted === false ? separator : leadingSeparator) : element;\n };\n\n return ItemWithSeparator;\n}(React.Component);\n\nexport default VirtualizedSectionList;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport Platform from '../../../exports/Platform';\nimport * as React from 'react';\nimport ScrollView from '../../../exports/ScrollView';\nimport VirtualizedSectionList from '../VirtualizedSectionList';\n\nvar defaultProps = _objectSpread(_objectSpread({}, VirtualizedSectionList.defaultProps), {}, {\n stickySectionHeadersEnabled: Platform.OS === 'ios'\n});\n\n/**\n * A performant interface for rendering sectioned lists, supporting the most handy features:\n *\n * - Fully cross-platform.\n * - Configurable viewability callbacks.\n * - List header support.\n * - List footer support.\n * - Item separator support.\n * - Section header support.\n * - Section separator support.\n * - Heterogeneous data and item rendering support.\n * - Pull to Refresh.\n * - Scroll loading.\n *\n * If you don't need section support and want a simpler interface, use\n * [`<FlatList>`](/react-native/docs/flatlist.html).\n *\n * Simple Examples:\n *\n * <SectionList\n * renderItem={({item}) => <ListItem title={item} />}\n * renderSectionHeader={({section}) => <Header title={section.title} />}\n * sections={[ // homogeneous rendering between sections\n * {data: [...], title: ...},\n * {data: [...], title: ...},\n * {data: [...], title: ...},\n * ]}\n * />\n *\n * <SectionList\n * sections={[ // heterogeneous rendering between sections\n * {data: [...], renderItem: ...},\n * {data: [...], renderItem: ...},\n * {data: [...], renderItem: ...},\n * ]}\n * />\n *\n * This is a convenience wrapper around [`<VirtualizedList>`](docs/virtualizedlist.html),\n * and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed\n * here, along with the following caveats:\n *\n * - Internal state is not preserved when content scrolls out of the render window. Make sure all\n * your data is captured in the item data or external stores like Flux, Redux, or Relay.\n * - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-\n * equal. Make sure that everything your `renderItem` function depends on is passed as a prop\n * (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on\n * changes. This includes the `data` prop and parent component state.\n * - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously\n * offscreen. This means it's possible to scroll faster than the fill rate and momentarily see\n * blank content. This is a tradeoff that can be adjusted to suit the needs of each application,\n * and we are working on improving it behind the scenes.\n * - By default, the list looks for a `key` prop on each item and uses that for the React key.\n * Alternatively, you can provide a custom `keyExtractor` prop.\n *\n */\nvar SectionList = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(SectionList, _React$PureComponent);\n\n function SectionList() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n _this._captureRef = function (ref) {\n // $FlowFixMe\n _this._wrapperListRef = ref;\n };\n\n return _this;\n }\n\n var _proto = SectionList.prototype;\n\n /**\n * Scrolls to the item at the specified `sectionIndex` and `itemIndex` (within the section)\n * positioned in the viewable area such that `viewPosition` 0 places it at the top (and may be\n * covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle. `viewOffset` is a\n * fixed number of pixels to offset the final target position, e.g. to compensate for sticky\n * headers.\n *\n * Note: cannot scroll to locations outside the render window without specifying the\n * `getItemLayout` prop.\n */\n _proto.scrollToLocation = function scrollToLocation(params) {\n if (this._wrapperListRef != null) {\n this._wrapperListRef.scrollToLocation(params);\n }\n }\n /**\n * Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.\n * if `waitForInteractions` is true and the user has not scrolled. This is typically called by\n * taps on items or by navigation actions.\n */\n ;\n\n _proto.recordInteraction = function recordInteraction() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n listRef && listRef.recordInteraction();\n }\n /**\n * Displays the scroll indicators momentarily.\n *\n * @platform ios\n */\n ;\n\n _proto.flashScrollIndicators = function flashScrollIndicators() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n listRef && listRef.flashScrollIndicators();\n }\n /**\n * Provides a handle to the underlying scroll responder.\n */\n ;\n\n _proto.getScrollResponder = function getScrollResponder() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n if (listRef) {\n return listRef.getScrollResponder();\n }\n };\n\n _proto.getScrollableNode = function getScrollableNode() {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n if (listRef) {\n return listRef.getScrollableNode();\n }\n };\n\n _proto.setNativeProps = function setNativeProps(props) {\n var listRef = this._wrapperListRef && this._wrapperListRef.getListRef();\n\n if (listRef) {\n listRef.setNativeProps(props);\n }\n };\n\n _proto.render = function render() {\n return (\n /*#__PURE__*/\n\n /* $FlowFixMe(>=0.66.0 site=react_native_fb) This comment suppresses an\n * error found when Flow v0.66 was deployed. To see the error delete this\n * comment and run Flow. */\n React.createElement(VirtualizedSectionList, _extends({}, this.props, {\n ref: this._captureRef,\n getItemCount: function getItemCount(items) {\n return items.length;\n },\n getItem: function getItem(items, index) {\n return items[index];\n }\n }))\n );\n };\n\n return SectionList;\n}(React.PureComponent);\n\nSectionList.defaultProps = defaultProps;\nexport default SectionList;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport SectionList from '../../vendor/react-native/SectionList';\nexport default SectionList;","import * as React from 'react';\n\nexport type ServerContextType = {\n location?: {\n pathname: string;\n search: string;\n };\n};\n\nconst ServerContext = React.createContext<ServerContextType | undefined>(\n undefined\n);\n\nexport default ServerContext;\n","import * as React from 'react';\nimport {\n getStateFromPath as getStateFromPathDefault,\n getPathFromState as getPathFromStateDefault,\n getActionFromState as getActionFromStateDefault,\n NavigationContainerRef,\n NavigationState,\n} from '@react-navigation/core';\nimport { nanoid } from 'nanoid/non-secure';\nimport ServerContext from './ServerContext';\nimport type { LinkingOptions } from './types';\n\ntype ResultState = ReturnType<typeof getStateFromPathDefault>;\n\ntype HistoryRecord = {\n // Unique identifier for this record to match it with window.history.state\n id: string;\n // Navigation state object for the history entry\n state: NavigationState;\n // Path of the history entry\n path: string;\n};\n\nconst createMemoryHistory = () => {\n let index = 0;\n let items: HistoryRecord[] = [];\n\n // Pending callbacks for `history.go(n)`\n // We might modify the callback stored if it was interrupted, so we have a ref to identify it\n const pending: { ref: unknown; cb: (interrupted?: boolean) => void }[] = [];\n\n const interrupt = () => {\n // If another history operation was performed we need to interrupt existing ones\n // This makes sure that calls such as `history.replace` after `history.go` don't happen\n // Since otherwise it won't be correct if something else has changed\n pending.forEach((it) => {\n const cb = it.cb;\n it.cb = () => cb(true);\n });\n };\n\n const history = {\n get index(): number {\n // We store an id in the state instead of an index\n // Index could get out of sync with in-memory values if page reloads\n const id = window.history.state?.id;\n\n if (id) {\n const index = items.findIndex((item) => item.id === id);\n\n return index > -1 ? index : 0;\n }\n\n return 0;\n },\n\n get(index: number) {\n return items[index];\n },\n\n backIndex({ path }: { path: string }) {\n // We need to find the index from the element before current to get closest path to go back to\n for (let i = index - 1; i >= 0; i--) {\n const item = items[i];\n\n if (item.path === path) {\n return i;\n }\n }\n\n return -1;\n },\n\n push({ path, state }: { path: string; state: NavigationState }) {\n interrupt();\n\n const id = nanoid();\n\n // When a new entry is pushed, all the existing entries after index will be inaccessible\n // So we remove any existing entries after the current index to clean them up\n items = items.slice(0, index + 1);\n\n items.push({ path, state, id });\n index = items.length - 1;\n\n // We pass empty string for title because it's ignored in all browsers except safari\n // We don't store state object in history.state because:\n // - browsers have limits on how big it can be, and we don't control the size\n // - while not recommended, there could be non-serializable data in state\n window.history.pushState({ id }, '', path);\n },\n\n replace({ path, state }: { path: string; state: NavigationState }) {\n interrupt();\n\n const id = window.history.state?.id ?? nanoid();\n\n if (items.length) {\n items[index] = { path, state, id };\n } else {\n // This is the first time any state modifications are done\n // So we need to push the entry as there's nothing to replace\n items.push({ path, state, id });\n }\n\n window.history.replaceState({ id }, '', path);\n },\n\n // `history.go(n)` is asynchronous, there are couple of things to keep in mind:\n // - it won't do anything if we can't go `n` steps, the `popstate` event won't fire.\n // - each `history.go(n)` call will trigger a separate `popstate` event with correct location.\n // - the `popstate` event fires before the next frame after calling `history.go(n)`.\n // This method differs from `history.go(n)` in the sense that it'll go back as many steps it can.\n go(n: number) {\n interrupt();\n\n if (n > 0) {\n // We shouldn't go forward more than available index\n n = Math.min(n, items.length - 1);\n } else if (n < 0) {\n // We shouldn't go back more than the 0 index\n // Otherwise we'll exit the page\n n = index + n < 0 ? -index : n;\n }\n\n if (n === 0) {\n return;\n }\n\n index += n;\n\n // When we call `history.go`, `popstate` will fire when there's history to go back to\n // So we need to somehow handle following cases:\n // - There's history to go back, `history.go` is called, and `popstate` fires\n // - `history.go` is called multiple times, we need to resolve on respective `popstate`\n // - No history to go back, but `history.go` was called, browser has no API to detect it\n return new Promise<void>((resolve, reject) => {\n const done = (interrupted?: boolean) => {\n clearTimeout(timer);\n\n if (interrupted) {\n reject(new Error('History was changed during navigation.'));\n return;\n }\n\n // There seems to be a bug in Chrome regarding updating the title\n // If we set a title just before calling `history.go`, the title gets lost\n // However the value of `document.title` is still what we set it to\n // It's just not displayed in the tab bar\n // To update the tab bar, we need to reset the title to something else first (e.g. '')\n // And set the title to what it was before so it gets applied\n // It won't work without setting it to empty string coz otherwise title isn't changing\n // Which means that the browser won't do anything after setting the title\n const { title } = window.document;\n\n window.document.title = '';\n window.document.title = title;\n\n resolve();\n };\n\n pending.push({ ref: done, cb: done });\n\n // If navigation didn't happen within 100ms, assume that it won't happen\n // This may not be accurate, but hopefully it won't take so much time\n // In Chrome, navigation seems to happen instantly in next microtask\n // But on Firefox, it seems to take much longer, around 50ms from our testing\n // We're using a hacky timeout since there doesn't seem to be way to know for sure\n const timer = setTimeout(() => {\n const index = pending.findIndex((it) => it.ref === done);\n\n if (index > -1) {\n pending[index].cb();\n pending.splice(index, 1);\n }\n }, 100);\n\n const onPopState = () => {\n const last = pending.pop();\n\n window.removeEventListener('popstate', onPopState);\n last?.cb();\n };\n\n window.addEventListener('popstate', onPopState);\n window.history.go(n);\n });\n },\n\n // The `popstate` event is triggered when history changes, except `pushState` and `replaceState`\n // If we call `history.go(n)` ourselves, we don't want it to trigger the listener\n // Here we normalize it so that only external changes (e.g. user pressing back/forward) trigger the listener\n listen(listener: () => void) {\n const onPopState = () => {\n if (pending.length) {\n // This was triggered by `history.go(n)`, we shouldn't call the listener\n return;\n }\n\n listener();\n };\n\n window.addEventListener('popstate', onPopState);\n\n return () => window.removeEventListener('popstate', onPopState);\n },\n };\n\n return history;\n};\n\n/**\n * Find the matching navigation state that changed between 2 navigation states\n * e.g.: a -> b -> c -> d and a -> b -> c -> e -> f, if history in b changed, b is the matching state\n */\nconst findMatchingState = <T extends NavigationState>(\n a: T | undefined,\n b: T | undefined\n): [T | undefined, T | undefined] => {\n if (a === undefined || b === undefined || a.key !== b.key) {\n return [undefined, undefined];\n }\n\n // Tab and drawer will have `history` property, but stack will have history in `routes`\n const aHistoryLength = a.history ? a.history.length : a.routes.length;\n const bHistoryLength = b.history ? b.history.length : b.routes.length;\n\n const aRoute = a.routes[a.index];\n const bRoute = b.routes[b.index];\n\n const aChildState = aRoute.state as T | undefined;\n const bChildState = bRoute.state as T | undefined;\n\n // Stop here if this is the state object that changed:\n // - history length is different\n // - focused routes are different\n // - one of them doesn't have child state\n // - child state keys are different\n if (\n aHistoryLength !== bHistoryLength ||\n aRoute.key !== bRoute.key ||\n aChildState === undefined ||\n bChildState === undefined ||\n aChildState.key !== bChildState.key\n ) {\n return [a, b];\n }\n\n return findMatchingState(aChildState, bChildState);\n};\n\n/**\n * Run async function in series as it's called.\n */\nconst series = (cb: () => Promise<void>) => {\n // Whether we're currently handling a callback\n let handling = false;\n let queue: (() => Promise<void>)[] = [];\n\n const callback = async () => {\n try {\n if (handling) {\n // If we're currently handling a previous event, wait before handling this one\n // Add the callback to the beginning of the queue\n queue.unshift(callback);\n return;\n }\n\n handling = true;\n\n await cb();\n } finally {\n handling = false;\n\n if (queue.length) {\n // If we have queued items, handle the last one\n const last = queue.pop();\n\n last?.();\n }\n }\n };\n\n return callback;\n};\n\nlet isUsingLinking = false;\n\nexport default function useLinking(\n ref: React.RefObject<NavigationContainerRef>,\n {\n enabled = true,\n config,\n getStateFromPath = getStateFromPathDefault,\n getPathFromState = getPathFromStateDefault,\n getActionFromState = getActionFromStateDefault,\n }: LinkingOptions\n) {\n React.useEffect(() => {\n if (enabled !== false && isUsingLinking) {\n throw new Error(\n [\n 'Looks like you have configured linking in multiple places. This is likely an error since URL integration should only be handled in one place to avoid conflicts. Make sure that:',\n \"- You are not using both 'linking' prop and 'useLinking'\",\n \"- You don't have 'useLinking' in multiple components\",\n ]\n .join('\\n')\n .trim()\n );\n } else {\n isUsingLinking = enabled !== false;\n }\n\n return () => {\n isUsingLinking = false;\n };\n });\n\n const [history] = React.useState(createMemoryHistory);\n\n // We store these options in ref to avoid re-creating getInitialState and re-subscribing listeners\n // This lets user avoid wrapping the items in `React.useCallback` or `React.useMemo`\n // Not re-creating `getInitialState` is important coz it makes it easier for the user to use in an effect\n const enabledRef = React.useRef(enabled);\n const configRef = React.useRef(config);\n const getStateFromPathRef = React.useRef(getStateFromPath);\n const getActionFromStateRef = React.useRef(getActionFromState);\n const getPathFromStateRef = React.useRef(getPathFromState);\n\n React.useEffect(() => {\n enabledRef.current = enabled;\n configRef.current = config;\n getStateFromPathRef.current = getStateFromPath;\n getActionFromStateRef.current = getActionFromState;\n getPathFromStateRef.current = getPathFromState;\n });\n\n const server = React.useContext(ServerContext);\n\n const getInitialState = React.useCallback(() => {\n let value: ResultState | undefined;\n\n if (enabledRef.current) {\n const location =\n server?.location ??\n (typeof window !== 'undefined' ? window.location : undefined);\n\n const path = location ? location.pathname + location.search : undefined;\n\n if (path) {\n value = getStateFromPathRef.current(path, configRef.current);\n }\n }\n\n const thenable = {\n then(onfulfilled?: (state: ResultState | undefined) => void) {\n return Promise.resolve(onfulfilled ? onfulfilled(value) : value);\n },\n catch() {\n return thenable;\n },\n };\n\n return thenable as PromiseLike<ResultState | undefined>;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const previousIndexRef = React.useRef<number | undefined>(undefined);\n const previousStateRef = React.useRef<NavigationState | undefined>(undefined);\n const pendingPopStatePathRef = React.useRef<string | undefined>(undefined);\n\n React.useEffect(() => {\n previousIndexRef.current = history.index;\n\n return history.listen(() => {\n const navigation = ref.current;\n\n if (!navigation || !enabled) {\n return;\n }\n\n const path = location.pathname + location.search;\n const index = history.index;\n\n const previousIndex = previousIndexRef.current ?? 0;\n\n previousIndexRef.current = index;\n pendingPopStatePathRef.current = path;\n\n // When browser back/forward is clicked, we first need to check if state object for this index exists\n // If it does we'll reset to that state object\n // Otherwise, we'll handle it like a regular deep link\n const record = history.get(index);\n\n if (record?.path === path && record?.state) {\n navigation.resetRoot(record.state);\n return;\n }\n\n const state = getStateFromPathRef.current(path, configRef.current);\n\n // We should only dispatch an action when going forward\n // Otherwise the action will likely add items to history, which would mess things up\n if (state) {\n // Make sure that the routes in the state exist in the root navigator\n // Otherwise there's an error in the linking configuration\n const rootState = navigation.getRootState();\n\n if (state.routes.some((r) => !rootState?.routeNames.includes(r.name))) {\n console.warn(\n \"The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.\"\n );\n return;\n }\n\n if (index > previousIndex) {\n const action = getActionFromStateRef.current(\n state,\n configRef.current\n );\n\n if (action !== undefined) {\n try {\n navigation.dispatch(action);\n } catch (e) {\n // Ignore any errors from deep linking.\n // This could happen in case of malformed links, navigation object not being initialized etc.\n console.warn(\n `An error occurred when trying to handle the link '${path}': ${e.message}`\n );\n }\n } else {\n navigation.resetRoot(state);\n }\n } else {\n navigation.resetRoot(state);\n }\n } else {\n // if current path didn't return any state, we should revert to initial state\n navigation.resetRoot(state);\n }\n });\n }, [enabled, history, ref]);\n\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n\n if (ref.current) {\n // We need to record the current metadata on the first render if they aren't set\n // This will allow the initial state to be in the history entry\n const state = ref.current.getRootState();\n\n if (state) {\n const path = getPathFromStateRef.current(state, configRef.current);\n\n if (previousStateRef.current === undefined) {\n previousStateRef.current = state;\n }\n\n history.replace({ path, state });\n }\n }\n\n const onStateChange = async () => {\n const navigation = ref.current;\n\n if (!navigation || !enabled) {\n return;\n }\n\n const previousState = previousStateRef.current;\n const state = navigation.getRootState();\n\n const pendingPath = pendingPopStatePathRef.current;\n const path = getPathFromStateRef.current(state, configRef.current);\n\n previousStateRef.current = state;\n pendingPopStatePathRef.current = undefined;\n\n // To detect the kind of state change, we need to:\n // - Find the common focused navigation state in previous and current state\n // - If only the route keys changed, compare history/routes.length to check if we go back/forward/replace\n // - If no common focused navigation state found, it's a replace\n const [previousFocusedState, focusedState] = findMatchingState(\n previousState,\n state\n );\n\n if (\n previousFocusedState &&\n focusedState &&\n // We should only handle push/pop if path changed from what was in last `popstate`\n // Otherwise it's likely a change triggered by `popstate`\n path !== pendingPath\n ) {\n const historyDelta =\n (focusedState.history\n ? focusedState.history.length\n : focusedState.routes.length) -\n (previousFocusedState.history\n ? previousFocusedState.history.length\n : previousFocusedState.routes.length);\n\n if (historyDelta > 0) {\n // If history length is increased, we should pushState\n // Note that path might not actually change here, for example, drawer open should pushState\n history.push({ path, state });\n } else if (historyDelta < 0) {\n // If history length is decreased, i.e. entries were removed, we want to go back\n\n const nextIndex = history.backIndex({ path });\n const currentIndex = history.index;\n\n try {\n if (nextIndex !== -1 && nextIndex < currentIndex) {\n // An existing entry for this path exists and it's less than current index, go back to that\n await history.go(nextIndex - currentIndex);\n } else {\n // We couldn't find an existing entry to go back to, so we'll go back by the delta\n // This won't be correct if multiple routes were pushed in one go before\n // Usually this shouldn't happen and this is a fallback for that\n await history.go(historyDelta);\n }\n\n // Store the updated state as well as fix the path if incorrect\n history.replace({ path, state });\n } catch (e) {\n // The navigation was interrupted\n }\n } else {\n // If history length is unchanged, we want to replaceState\n history.replace({ path, state });\n }\n } else {\n // If no common navigation state was found, assume it's a replace\n // This would happen if the user did a reset/conditionally changed navigators\n history.replace({ path, state });\n }\n };\n\n // We debounce onStateChange coz we don't want multiple state changes to be handled at one time\n // This could happen since `history.go(n)` is asynchronous\n // If `pushState` or `replaceState` were called before `history.go(n)` completes, it'll mess stuff up\n return ref.current?.addListener('state', series(onStateChange));\n });\n\n return {\n getInitialState,\n };\n}\n","function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport AccessibilityUtil from '../AccessibilityUtil';\nimport css from '../../exports/StyleSheet/css';\nimport StyleSheet from '../../exports/StyleSheet';\nimport styleResolver from '../../exports/StyleSheet/styleResolver';\nimport { STYLE_GROUPS } from '../../exports/StyleSheet/constants';\nvar emptyObject = {};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\nvar uppercasePattern = /[A-Z]/g;\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase();\n}\n\nfunction hyphenateString(str) {\n return str.replace(uppercasePattern, toHyphenLower);\n}\n\nfunction processIDRefList(idRefList) {\n return isArray(idRefList) ? idRefList.join(' ') : idRefList;\n} // Reset styles for heading, link, and list DOM elements\n\n\nvar classes = css.create({\n reset: {\n backgroundColor: 'transparent',\n color: 'inherit',\n font: 'inherit',\n listStyle: 'none',\n margin: 0,\n textAlign: 'inherit',\n textDecoration: 'none'\n },\n cursor: {\n cursor: 'pointer'\n }\n}, STYLE_GROUPS.classicReset);\nvar pointerEventsStyles = StyleSheet.create({\n auto: {\n pointerEvents: 'auto'\n },\n 'box-none': {\n pointerEvents: 'box-none'\n },\n 'box-only': {\n pointerEvents: 'box-only'\n },\n none: {\n pointerEvents: 'none'\n }\n});\n\nvar createDOMProps = function createDOMProps(elementType, props) {\n if (!props) {\n props = emptyObject;\n }\n\n var _props = props,\n accessibilityActiveDescendant = _props.accessibilityActiveDescendant,\n accessibilityAtomic = _props.accessibilityAtomic,\n accessibilityAutoComplete = _props.accessibilityAutoComplete,\n accessibilityBusy = _props.accessibilityBusy,\n accessibilityChecked = _props.accessibilityChecked,\n accessibilityColumnCount = _props.accessibilityColumnCount,\n accessibilityColumnIndex = _props.accessibilityColumnIndex,\n accessibilityColumnSpan = _props.accessibilityColumnSpan,\n accessibilityControls = _props.accessibilityControls,\n accessibilityCurrent = _props.accessibilityCurrent,\n accessibilityDescribedBy = _props.accessibilityDescribedBy,\n accessibilityDetails = _props.accessibilityDetails,\n accessibilityDisabled = _props.accessibilityDisabled,\n accessibilityErrorMessage = _props.accessibilityErrorMessage,\n accessibilityExpanded = _props.accessibilityExpanded,\n accessibilityFlowTo = _props.accessibilityFlowTo,\n accessibilityHasPopup = _props.accessibilityHasPopup,\n accessibilityHidden = _props.accessibilityHidden,\n accessibilityInvalid = _props.accessibilityInvalid,\n accessibilityKeyShortcuts = _props.accessibilityKeyShortcuts,\n accessibilityLabel = _props.accessibilityLabel,\n accessibilityLabelledBy = _props.accessibilityLabelledBy,\n accessibilityLevel = _props.accessibilityLevel,\n accessibilityLiveRegion = _props.accessibilityLiveRegion,\n accessibilityModal = _props.accessibilityModal,\n accessibilityMultiline = _props.accessibilityMultiline,\n accessibilityMultiSelectable = _props.accessibilityMultiSelectable,\n accessibilityOrientation = _props.accessibilityOrientation,\n accessibilityOwns = _props.accessibilityOwns,\n accessibilityPlaceholder = _props.accessibilityPlaceholder,\n accessibilityPosInSet = _props.accessibilityPosInSet,\n accessibilityPressed = _props.accessibilityPressed,\n accessibilityReadOnly = _props.accessibilityReadOnly,\n accessibilityRequired = _props.accessibilityRequired,\n accessibilityRole = _props.accessibilityRole,\n accessibilityRoleDescription = _props.accessibilityRoleDescription,\n accessibilityRowCount = _props.accessibilityRowCount,\n accessibilityRowIndex = _props.accessibilityRowIndex,\n accessibilityRowSpan = _props.accessibilityRowSpan,\n accessibilitySelected = _props.accessibilitySelected,\n accessibilitySetSize = _props.accessibilitySetSize,\n accessibilitySort = _props.accessibilitySort,\n accessibilityValueMax = _props.accessibilityValueMax,\n accessibilityValueMin = _props.accessibilityValueMin,\n accessibilityValueNow = _props.accessibilityValueNow,\n accessibilityValueText = _props.accessibilityValueText,\n classList = _props.classList,\n dataSet = _props.dataSet,\n focusable = _props.focusable,\n nativeID = _props.nativeID,\n pointerEvents = _props.pointerEvents,\n providedStyle = _props.style,\n testID = _props.testID,\n accessible = _props.accessible,\n accessibilityState = _props.accessibilityState,\n accessibilityValue = _props.accessibilityValue,\n domProps = _objectWithoutPropertiesLoose(_props, [\"accessibilityActiveDescendant\", \"accessibilityAtomic\", \"accessibilityAutoComplete\", \"accessibilityBusy\", \"accessibilityChecked\", \"accessibilityColumnCount\", \"accessibilityColumnIndex\", \"accessibilityColumnSpan\", \"accessibilityControls\", \"accessibilityCurrent\", \"accessibilityDescribedBy\", \"accessibilityDetails\", \"accessibilityDisabled\", \"accessibilityErrorMessage\", \"accessibilityExpanded\", \"accessibilityFlowTo\", \"accessibilityHasPopup\", \"accessibilityHidden\", \"accessibilityInvalid\", \"accessibilityKeyShortcuts\", \"accessibilityLabel\", \"accessibilityLabelledBy\", \"accessibilityLevel\", \"accessibilityLiveRegion\", \"accessibilityModal\", \"accessibilityMultiline\", \"accessibilityMultiSelectable\", \"accessibilityOrientation\", \"accessibilityOwns\", \"accessibilityPlaceholder\", \"accessibilityPosInSet\", \"accessibilityPressed\", \"accessibilityReadOnly\", \"accessibilityRequired\", \"accessibilityRole\", \"accessibilityRoleDescription\", \"accessibilityRowCount\", \"accessibilityRowIndex\", \"accessibilityRowSpan\", \"accessibilitySelected\", \"accessibilitySetSize\", \"accessibilitySort\", \"accessibilityValueMax\", \"accessibilityValueMin\", \"accessibilityValueNow\", \"accessibilityValueText\", \"classList\", \"dataSet\", \"focusable\", \"nativeID\", \"pointerEvents\", \"style\", \"testID\", \"accessible\", \"accessibilityState\", \"accessibilityValue\"]);\n\n var disabled = accessibilityState != null && accessibilityState.disabled === true || accessibilityDisabled;\n var role = AccessibilityUtil.propsToAriaRole(props);\n var isNativeInteractiveElement = role === 'link' || elementType === 'a' || elementType === 'button' || elementType === 'input' || elementType === 'select' || elementType === 'textarea' || domProps.contentEditable != null; // DEPRECATED\n\n if (accessibilityState != null) {\n for (var prop in accessibilityState) {\n var value = accessibilityState[prop];\n\n if (value != null) {\n if (prop === 'disabled' || prop === 'hidden') {\n if (value === true) {\n domProps[\"aria-\" + prop] = value; // also set prop directly to pick up host elementType behaviour\n\n domProps[prop] = value;\n }\n } else {\n domProps[\"aria-\" + prop] = value;\n }\n }\n }\n }\n\n if (accessibilityValue != null) {\n for (var _prop in accessibilityValue) {\n var _value = accessibilityValue[_prop];\n\n if (_value != null) {\n domProps[\"aria-value\" + _prop] = _value;\n }\n }\n } // ACCESSIBILITY\n\n\n if (accessibilityActiveDescendant != null) {\n domProps['aria-activedescendant'] = accessibilityActiveDescendant;\n }\n\n if (accessibilityAtomic != null) {\n domProps['aria-atomic'] = accessibilityAtomic;\n }\n\n if (accessibilityAutoComplete != null) {\n domProps['aria-autocomplete'] = accessibilityAutoComplete;\n }\n\n if (accessibilityBusy != null) {\n domProps['aria-busy'] = accessibilityBusy;\n }\n\n if (accessibilityChecked != null) {\n domProps['aria-checked'] = accessibilityChecked;\n }\n\n if (accessibilityColumnCount != null) {\n domProps['aria-colcount'] = accessibilityColumnCount;\n }\n\n if (accessibilityColumnIndex != null) {\n domProps['aria-colindex'] = accessibilityColumnIndex;\n }\n\n if (accessibilityColumnSpan != null) {\n domProps['aria-colspan'] = accessibilityColumnSpan;\n }\n\n if (accessibilityControls != null) {\n domProps['aria-controls'] = processIDRefList(accessibilityControls);\n }\n\n if (accessibilityCurrent != null) {\n domProps['aria-current'] = accessibilityCurrent;\n }\n\n if (accessibilityDescribedBy != null) {\n domProps['aria-describedby'] = processIDRefList(accessibilityDescribedBy);\n }\n\n if (accessibilityDetails != null) {\n domProps['aria-details'] = accessibilityDetails;\n }\n\n if (disabled === true) {\n domProps['aria-disabled'] = true; // Enhance with native semantics\n\n if (elementType === 'button' || elementType === 'form' || elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.disabled = true;\n }\n }\n\n if (accessibilityErrorMessage != null) {\n domProps['aria-errormessage'] = accessibilityErrorMessage;\n }\n\n if (accessibilityExpanded != null) {\n domProps['aria-expanded'] = accessibilityExpanded;\n }\n\n if (accessibilityFlowTo != null) {\n domProps['aria-flowto'] = processIDRefList(accessibilityFlowTo);\n }\n\n if (accessibilityHasPopup != null) {\n domProps['aria-haspopup'] = accessibilityHasPopup;\n }\n\n if (accessibilityHidden === true) {\n domProps['aria-hidden'] = accessibilityHidden;\n }\n\n if (accessibilityInvalid != null) {\n domProps['aria-invalid'] = accessibilityInvalid;\n }\n\n if (accessibilityKeyShortcuts != null && Array.isArray(accessibilityKeyShortcuts)) {\n domProps['aria-keyshortcuts'] = accessibilityKeyShortcuts.join(' ');\n }\n\n if (accessibilityLabel != null) {\n domProps['aria-label'] = accessibilityLabel;\n }\n\n if (accessibilityLabelledBy != null) {\n domProps['aria-labelledby'] = processIDRefList(accessibilityLabelledBy);\n }\n\n if (accessibilityLevel != null) {\n domProps['aria-level'] = accessibilityLevel;\n }\n\n if (accessibilityLiveRegion != null) {\n domProps['aria-live'] = accessibilityLiveRegion === 'none' ? 'off' : accessibilityLiveRegion;\n }\n\n if (accessibilityModal != null) {\n domProps['aria-modal'] = accessibilityModal;\n }\n\n if (accessibilityMultiline != null) {\n domProps['aria-multiline'] = accessibilityMultiline;\n }\n\n if (accessibilityMultiSelectable != null) {\n domProps['aria-multiselectable'] = accessibilityMultiSelectable;\n }\n\n if (accessibilityOrientation != null) {\n domProps['aria-orientation'] = accessibilityOrientation;\n }\n\n if (accessibilityOwns != null) {\n domProps['aria-owns'] = processIDRefList(accessibilityOwns);\n }\n\n if (accessibilityPlaceholder != null) {\n domProps['aria-placeholder'] = accessibilityPlaceholder;\n }\n\n if (accessibilityPosInSet != null) {\n domProps['aria-posinset'] = accessibilityPosInSet;\n }\n\n if (accessibilityPressed != null) {\n domProps['aria-pressed'] = accessibilityPressed;\n }\n\n if (accessibilityReadOnly != null) {\n domProps['aria-readonly'] = accessibilityReadOnly; // Enhance with native semantics\n\n if (elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.readOnly = true;\n }\n }\n\n if (accessibilityRequired != null) {\n domProps['aria-required'] = accessibilityRequired; // Enhance with native semantics\n\n if (elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n domProps.required = true;\n }\n }\n\n if (role != null) {\n // 'presentation' synonym has wider browser support\n domProps['role'] = role === 'none' ? 'presentation' : role;\n }\n\n if (accessibilityRoleDescription != null) {\n domProps['aria-roledescription'] = accessibilityRoleDescription;\n }\n\n if (accessibilityRowCount != null) {\n domProps['aria-rowcount'] = accessibilityRowCount;\n }\n\n if (accessibilityRowIndex != null) {\n domProps['aria-rowindex'] = accessibilityRowIndex;\n }\n\n if (accessibilityRowSpan != null) {\n domProps['aria-rowspan'] = accessibilityRowSpan;\n }\n\n if (accessibilitySelected != null) {\n domProps['aria-selected'] = accessibilitySelected;\n }\n\n if (accessibilitySetSize != null) {\n domProps['aria-setsize'] = accessibilitySetSize;\n }\n\n if (accessibilitySort != null) {\n domProps['aria-sort'] = accessibilitySort;\n }\n\n if (accessibilityValueMax != null) {\n domProps['aria-valuemax'] = accessibilityValueMax;\n }\n\n if (accessibilityValueMin != null) {\n domProps['aria-valuemin'] = accessibilityValueMin;\n }\n\n if (accessibilityValueNow != null) {\n domProps['aria-valuenow'] = accessibilityValueNow;\n }\n\n if (accessibilityValueText != null) {\n domProps['aria-valuetext'] = accessibilityValueText;\n } // \"dataSet\" replaced with \"data-*\"\n\n\n if (dataSet != null) {\n for (var dataProp in dataSet) {\n if (hasOwnProperty.call(dataSet, dataProp)) {\n var dataName = hyphenateString(dataProp);\n var dataValue = dataSet[dataProp];\n\n if (dataValue != null) {\n domProps[\"data-\" + dataName] = dataValue;\n }\n }\n }\n } // FOCUS\n // \"focusable\" indicates that an element may be a keyboard tab-stop.\n\n\n var _focusable = focusable != null ? focusable : accessible;\n\n if (_focusable === false) {\n domProps.tabIndex = '-1';\n }\n\n if ( // These native elements are focusable by default\n elementType === 'a' || elementType === 'button' || elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n if (_focusable === false || accessibilityDisabled === true) {\n domProps.tabIndex = '-1';\n }\n } else if ( // These roles are made focusable by default\n role === 'button' || role === 'checkbox' || role === 'link' || role === 'menuitem' || role === 'radio' || role === 'textbox' || role === 'switch') {\n if (_focusable !== false) {\n domProps.tabIndex = '0';\n }\n } else {\n // Everything else must explicitly set the prop\n if (_focusable === true) {\n domProps.tabIndex = '0';\n }\n } // STYLE\n\n\n var reactNativeStyle = StyleSheet.compose(pointerEvents && pointerEventsStyles[pointerEvents], providedStyle); // Additional style resets for interactive elements\n\n var needsCursor = (role === 'button' || role === 'link') && !disabled;\n var needsReset = elementType === 'a' || elementType === 'button' || elementType === 'li' || elementType === 'ul' || role === 'heading'; // Classic CSS styles\n\n var finalClassList = [needsReset && classes.reset, needsCursor && classes.cursor, classList]; // Resolve styles\n\n var _styleResolver$resolv = styleResolver.resolve(reactNativeStyle, finalClassList),\n className = _styleResolver$resolv.className,\n style = _styleResolver$resolv.style;\n\n if (className != null && className !== '') {\n domProps.className = className;\n }\n\n if (style) {\n domProps.style = style;\n } // OTHER\n // Native element ID\n\n\n if (nativeID != null) {\n domProps.id = nativeID;\n } // Automated test IDs\n\n\n if (testID != null) {\n domProps['data-testid'] = testID;\n } // Keyboard accessibility\n // Button-like roles should trigger 'onClick' if SPACE key is pressed.\n // Button-like roles should not trigger 'onClick' if they are disabled.\n\n\n if (isNativeInteractiveElement || role === 'button' || role === 'menuitem' || _focusable === true && !disabled) {\n var onClick = domProps.onClick;\n\n if (onClick != null) {\n if (disabled) {\n // Prevent click propagating if the element is disabled. See #1757\n domProps.onClick = function (e) {\n e.stopPropagation();\n };\n } else if (!isNativeInteractiveElement) {\n // For native elements that are focusable but don't dispatch 'click' events\n // for keyboards.\n var onKeyDown = domProps.onKeyDown;\n\n domProps.onKeyDown = function (e) {\n var key = e.key,\n repeat = e.repeat;\n var isSpacebarKey = key === ' ' || key === 'Spacebar';\n var isButtonRole = role === 'button' || role === 'menuitem';\n\n if (onKeyDown != null) {\n onKeyDown(e);\n }\n\n if (!repeat && key === 'Enter') {\n onClick(e);\n } else if (isSpacebarKey && isButtonRole) {\n if (!repeat) {\n onClick(e);\n } // Prevent spacebar scrolling the window\n\n\n e.preventDefault();\n }\n };\n }\n }\n }\n\n return domProps;\n};\n\nexport default createDOMProps;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport normalizeColor from '../../modules/normalizeColor';\nimport normalizeValueWithProperty from './normalizeValueWithProperty';\nvar defaultOffset = {\n height: 0,\n width: 0\n};\n\nvar resolveShadowValue = function resolveShadowValue(style) {\n var shadowColor = style.shadowColor,\n shadowOffset = style.shadowOffset,\n shadowOpacity = style.shadowOpacity,\n shadowRadius = style.shadowRadius;\n\n var _ref = shadowOffset || defaultOffset,\n height = _ref.height,\n width = _ref.width;\n\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(shadowRadius || 0);\n var color = normalizeColor(shadowColor || 'black', shadowOpacity);\n\n if (color != null && offsetX != null && offsetY != null && blurRadius != null) {\n return offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n};\n\nexport default resolveShadowValue;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nexport default function mergeRefs() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return function forwardRef(node) {\n args.forEach(function (ref) {\n if (ref == null) {\n return;\n }\n\n if (typeof ref === 'function') {\n ref(node);\n return;\n }\n\n if (typeof ref === 'object') {\n ref.current = node;\n return;\n }\n\n console.error(\"mergeRefs cannot handle Refs of type boolean, number or string, received ref \" + String(ref));\n });\n };\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport TextInputState from '../TextInputState';\n\nvar dismissKeyboard = function dismissKeyboard() {\n TextInputState.blurTextInput(TextInputState.currentlyFocusedField());\n};\n\nexport default dismissKeyboard;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport invariant from 'fbjs/lib/invariant';\nexport function get(name) {\n return null;\n}\nexport function getEnforcing(name) {\n var module = get(name);\n invariant(module != null, \"TurboModuleRegistry.getEnforcing(...): '\" + name + \"' could not be found. \" + 'Verify that a module by this name is registered in the native binary.');\n return module;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport Platform from '../../../exports/Platform';\nimport RCTDeviceEventEmitter from './RCTDeviceEventEmitter';\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * `NativeEventEmitter` is intended for use by Native Modules to emit events to\n * JavaScript listeners. If a `NativeModule` is supplied to the constructor, it\n * will be notified (via `addListener` and `removeListeners`) when the listener\n * count changes to manage \"native memory\".\n *\n * Currently, all native events are fired via a global `RCTDeviceEventEmitter`.\n * This means event names must be globally unique, and it means that call sites\n * can theoretically listen to `RCTDeviceEventEmitter` (although discouraged).\n */\nvar NativeEventEmitter = /*#__PURE__*/function () {\n function NativeEventEmitter(nativeModule) {\n if (Platform.OS === 'ios') {\n invariant(nativeModule != null, '`new NativeEventEmitter()` requires a non-null argument.');\n this._nativeModule = nativeModule;\n }\n }\n\n var _proto = NativeEventEmitter.prototype;\n\n _proto.addListener = function addListener(eventType, listener, context) {\n var _this$_nativeModule,\n _this = this;\n\n (_this$_nativeModule = this._nativeModule) == null ? void 0 : _this$_nativeModule.addListener(eventType);\n var subscription = RCTDeviceEventEmitter.addListener(eventType, listener, context);\n return {\n remove: function remove() {\n if (subscription != null) {\n var _this$_nativeModule2;\n\n (_this$_nativeModule2 = _this._nativeModule) == null ? void 0 : _this$_nativeModule2.removeListeners(1); // $FlowFixMe[incompatible-use]\n\n subscription.remove();\n subscription = null;\n }\n }\n };\n }\n /**\n * @deprecated Use `remove` on the EventSubscription from `addListener`.\n */\n ;\n\n _proto.removeListener = function removeListener(eventType, listener) {\n var _this$_nativeModule3;\n\n (_this$_nativeModule3 = this._nativeModule) == null ? void 0 : _this$_nativeModule3.removeListeners(1); // NOTE: This will report a deprecation notice via `console.error`.\n // $FlowFixMe[prop-missing] - `removeListener` exists but is deprecated.\n\n RCTDeviceEventEmitter.removeListener(eventType, listener);\n };\n\n _proto.emit = function emit(eventType) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n // Generally, `RCTDeviceEventEmitter` is directly invoked. But this is\n // included for completeness.\n RCTDeviceEventEmitter.emit.apply(RCTDeviceEventEmitter, [eventType].concat(args));\n };\n\n _proto.removeAllListeners = function removeAllListeners(eventType) {\n var _this$_nativeModule4;\n\n invariant(eventType != null, '`NativeEventEmitter.removeAllListener()` requires a non-null argument.');\n (_this$_nativeModule4 = this._nativeModule) == null ? void 0 : _this$_nativeModule4.removeListeners(this.listenerCount(eventType));\n RCTDeviceEventEmitter.removeAllListeners(eventType);\n };\n\n _proto.listenerCount = function listenerCount(eventType) {\n return RCTDeviceEventEmitter.listenerCount(eventType);\n };\n\n return NativeEventEmitter;\n}();\n\nexport { NativeEventEmitter as default };","import * as React from 'react';\nimport type { NavigationAction } from '@react-navigation/routers';\n\nconst UnhandledActionContext = React.createContext<\n ((action: NavigationAction) => void) | undefined\n>(undefined);\n\nexport default UnhandledActionContext;\n","import * as React from 'react';\n\nconst MISSING_CONTEXT_ERROR = \"Couldn't find a schedule context.\";\n\nexport const ScheduleUpdateContext = React.createContext<{\n scheduleUpdate: (callback: () => void) => void;\n flushUpdates: () => void;\n}>({\n scheduleUpdate() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n flushUpdates() {\n throw new Error(MISSING_CONTEXT_ERROR);\n },\n});\n\n/**\n * When screen config changes, we want to update the navigator in the same update phase.\n * However, navigation state is in the root component and React won't let us update it from a child.\n * This is a workaround for that, the scheduled update is stored in the ref without actually calling setState.\n * It lets all subsequent updates access the latest state so it stays correct.\n * Then we call setState during after the component updates.\n */\nexport default function useScheduleUpdate(callback: () => void) {\n const { scheduleUpdate, flushUpdates } = React.useContext(\n ScheduleUpdateContext\n );\n\n scheduleUpdate(callback);\n\n React.useEffect(flushUpdates);\n}\n","import * as React from 'react';\nimport type { ListenerMap } from './NavigationBuilderContext';\n\n/**\n * Hook which lets child navigators add action listeners.\n */\nexport default function useChildListeners() {\n const { current: listeners } = React.useRef<\n {\n [K in keyof ListenerMap]: ListenerMap[K][];\n }\n >({\n action: [],\n focus: [],\n });\n\n const addListener = React.useCallback(\n <T extends keyof ListenerMap>(type: T, listener: ListenerMap[T]) => {\n // @ts-expect-error: listener should be correct type according to `type`\n listeners[type].push(listener);\n\n return () => {\n // @ts-expect-error: listener should be correct type according to `type`\n const index = listeners[type].indexOf(listener);\n\n listeners[type].splice(index, 1);\n };\n },\n [listeners]\n );\n\n return {\n listeners,\n addListener,\n };\n}\n","import * as React from 'react';\nimport type { KeyedListenerMap } from './NavigationBuilderContext';\n\n/**\n * Hook which lets child navigators add getters to be called for obtaining rehydrated state.\n */\n\nexport default function useKeyedChildListeners() {\n const { current: keyedListeners } = React.useRef<\n {\n [K in keyof KeyedListenerMap]: Record<\n string,\n KeyedListenerMap[K] | undefined\n >;\n }\n >({\n getState: {},\n beforeRemove: {},\n });\n\n const addKeyedListener = React.useCallback(\n <T extends keyof KeyedListenerMap>(\n type: T,\n key: string,\n listener: KeyedListenerMap[T]\n ) => {\n // @ts-expect-error: listener should be correct type according to `type`\n keyedListeners[type][key] = listener;\n\n return () => {\n // @ts-expect-error: listener should be correct type according to `type`\n keyedListeners[type][key] = undefined;\n };\n },\n [keyedListeners]\n );\n\n return {\n keyedListeners,\n addKeyedListener,\n };\n}\n","import * as React from 'react';\nimport type { ParamListBase, NavigationState } from '@react-navigation/routers';\nimport NavigationStateContext from './NavigationStateContext';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport type { NavigationProp } from './types';\n\ntype Options = {\n key?: string;\n navigation?: NavigationProp<ParamListBase, string, NavigationState, object>;\n options?: object | undefined;\n};\n\nexport default function useOptionsGetters({\n key,\n options,\n navigation,\n}: Options) {\n const optionsRef = React.useRef<object | undefined>(options);\n const optionsGettersFromChildRef = React.useRef<\n Record<string, () => object | undefined | null>\n >({});\n\n const { onOptionsChange } = React.useContext(NavigationBuilderContext);\n const { addOptionsGetter: parentAddOptionsGetter } = React.useContext(\n NavigationStateContext\n );\n\n const optionsChangeListener = React.useCallback(() => {\n const isFocused = navigation?.isFocused() ?? true;\n const hasChildren = Object.keys(optionsGettersFromChildRef.current).length;\n\n if (isFocused && !hasChildren) {\n onOptionsChange(optionsRef.current ?? {});\n }\n }, [navigation, onOptionsChange]);\n\n React.useEffect(() => {\n optionsRef.current = options;\n optionsChangeListener();\n\n return navigation?.addListener('focus', optionsChangeListener);\n }, [navigation, options, optionsChangeListener]);\n\n const getOptionsFromListener = React.useCallback(() => {\n for (let key in optionsGettersFromChildRef.current) {\n if (optionsGettersFromChildRef.current.hasOwnProperty(key)) {\n const result = optionsGettersFromChildRef.current[key]?.();\n\n // null means unfocused route\n if (result !== null) {\n return result;\n }\n }\n }\n\n return null;\n }, []);\n\n const getCurrentOptions = React.useCallback(() => {\n const isFocused = navigation?.isFocused() ?? true;\n\n if (!isFocused) {\n return null;\n }\n\n const optionsFromListener = getOptionsFromListener();\n\n if (optionsFromListener !== null) {\n return optionsFromListener;\n }\n\n return optionsRef.current;\n }, [navigation, getOptionsFromListener]);\n\n React.useEffect(() => {\n return parentAddOptionsGetter?.(key!, getCurrentOptions);\n }, [getCurrentOptions, parentAddOptionsGetter, key]);\n\n const addOptionsGetter = React.useCallback(\n (key: string, getter: () => object | undefined | null) => {\n optionsGettersFromChildRef.current[key] = getter;\n optionsChangeListener();\n\n return () => {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete optionsGettersFromChildRef.current[key];\n optionsChangeListener();\n };\n },\n [optionsChangeListener]\n );\n\n return {\n addOptionsGetter,\n getCurrentOptions,\n };\n}\n","import * as React from 'react';\nimport type { EventEmitter, EventConsumer, EventArg } from './types';\n\nexport type NavigationEventEmitter<\n T extends Record<string, any>\n> = EventEmitter<T> & {\n create: (target: string) => EventConsumer<T>;\n};\n\ntype Listeners = ((e: any) => void)[];\n\n/**\n * Hook to manage the event system used by the navigator to notify screens of various events.\n */\nexport default function useEventEmitter<T extends Record<string, any>>(\n listen?: (e: any) => void\n): NavigationEventEmitter<T> {\n const listenRef = React.useRef(listen);\n\n React.useEffect(() => {\n listenRef.current = listen;\n });\n\n const listeners = React.useRef<Record<string, Record<string, Listeners>>>({});\n\n const create = React.useCallback((target: string) => {\n const removeListener = (type: string, callback: (data: any) => void) => {\n const callbacks = listeners.current[type]\n ? listeners.current[type][target]\n : undefined;\n\n if (!callbacks) {\n return;\n }\n\n const index = callbacks.indexOf(callback);\n\n callbacks.splice(index, 1);\n };\n\n const addListener = (type: string, callback: (data: any) => void) => {\n listeners.current[type] = listeners.current[type] || {};\n listeners.current[type][target] = listeners.current[type][target] || [];\n listeners.current[type][target].push(callback);\n\n return () => removeListener(type, callback);\n };\n\n return {\n addListener,\n removeListener,\n };\n }, []);\n\n const emit = React.useCallback(\n ({\n type,\n data,\n target,\n canPreventDefault,\n }: {\n type: string;\n data?: any;\n target?: string;\n canPreventDefault?: boolean;\n }) => {\n const items = listeners.current[type] || {};\n\n // Copy the current list of callbacks in case they are mutated during execution\n const callbacks =\n target !== undefined\n ? items[target]?.slice()\n : ([] as Listeners)\n .concat(...Object.keys(items).map((t) => items[t]))\n .filter((cb, i, self) => self.lastIndexOf(cb) === i);\n\n const event: EventArg<any, any, any> = {\n get type() {\n return type;\n },\n };\n\n if (target !== undefined) {\n Object.defineProperty(event, 'target', {\n enumerable: true,\n get() {\n return target;\n },\n });\n }\n\n if (data !== undefined) {\n Object.defineProperty(event, 'data', {\n enumerable: true,\n get() {\n return data;\n },\n });\n }\n\n if (canPreventDefault) {\n let defaultPrevented = false;\n\n Object.defineProperties(event, {\n defaultPrevented: {\n enumerable: true,\n get() {\n return defaultPrevented;\n },\n },\n preventDefault: {\n enumerable: true,\n value() {\n defaultPrevented = true;\n },\n },\n });\n }\n\n listenRef.current?.(event);\n\n callbacks?.forEach((cb) => cb(event));\n\n return event as any;\n },\n []\n );\n\n return React.useMemo(() => ({ create, emit }), [create, emit]);\n}\n","import type { ParamListBase, NavigationState } from '@react-navigation/routers';\nimport type { RouteConfig, EventMapBase } from './types';\n\n/**\n * Empty component used for specifying route configuration.\n */\nexport default function Screen<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList,\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n>(_: RouteConfig<ParamList, RouteName, State, ScreenOptions, EventMap>) {\n /* istanbul ignore next */\n return null;\n}\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (value === null || value === undefined || value.length === 0) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${encode(object.fragmentIdentifier, options)}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","import type { PathConfigMap } from './types';\n\ntype Options = {\n initialRouteName?: string;\n screens: PathConfigMap;\n};\n\nexport default function checkLegacyPathConfig(\n config?: Options\n): [boolean, Options | undefined] {\n let legacy = false;\n\n if (config) {\n // Assume legacy configuration if config has any other keys except `screens` and `initialRouteName`\n legacy = Object.keys(config).some(\n (key) => key !== 'screens' && key !== 'initialRouteName'\n );\n\n if (\n legacy &&\n (config.hasOwnProperty('screens') ||\n config.hasOwnProperty('initialRouteName'))\n ) {\n throw new Error(\n 'Found invalid keys in the configuration object. See https://reactnavigation.org/docs/configuring-links/ for more details on the shape of the configuration object.'\n );\n }\n }\n\n if (legacy) {\n // @ts-expect-error: we have incorrect type for config since we don't type legacy config\n return [legacy, { screens: config }];\n }\n\n return [legacy, config];\n}\n","import * as React from 'react';\nimport DefaultTheme from './DefaultTheme';\nimport type { Theme } from '../types';\n\nconst ThemeContext = React.createContext<Theme>(DefaultTheme);\n\nThemeContext.displayName = 'ThemeContext';\n\nexport default ThemeContext;\n","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar isWebColor = function isWebColor(color) {\n return color === 'currentcolor' || color === 'currentColor' || color === 'inherit' || color.indexOf('var(') === 0;\n};\n\nexport default isWebColor;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport isWebColor from '../isWebColor';\nimport processColor from '../../exports/processColor';\n\nvar normalizeColor = function normalizeColor(color, opacity) {\n if (opacity === void 0) {\n opacity = 1;\n }\n\n if (color == null) return;\n\n if (typeof color === 'string' && isWebColor(color)) {\n return color;\n }\n\n var colorInt = processColor(color);\n\n if (colorInt != null) {\n var r = colorInt >> 16 & 255;\n var g = colorInt >> 8 & 255;\n var b = colorInt & 255;\n var a = (colorInt >> 24 & 255) / 255;\n var alpha = (a * opacity).toFixed(2);\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + alpha + \")\";\n }\n};\n\nexport default normalizeColor;","import indexBy from 'index-array-by';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction diffArrays(prev, next, idAccessor) {\n var result = {\n enter: [],\n update: [],\n exit: []\n };\n\n if (!idAccessor) {\n // use object references for comparison\n var prevSet = new Set(prev);\n var nextSet = new Set(next);\n new Set([].concat(_toConsumableArray(prevSet), _toConsumableArray(nextSet))).forEach(function (item) {\n var type = !prevSet.has(item) ? 'enter' : !nextSet.has(item) ? 'exit' : 'update';\n result[type].push(type === 'update' ? [item, item] : item);\n });\n } else {\n // compare by id (duplicate keys are ignored)\n var prevById = indexBy(prev, idAccessor, false);\n var nextById = indexBy(next, idAccessor, false);\n var byId = Object.assign({}, prevById, nextById);\n Object.entries(byId).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n id = _ref2[0],\n item = _ref2[1];\n\n var type = !prevById.hasOwnProperty(id) ? 'enter' : !nextById.hasOwnProperty(id) ? 'exit' : 'update';\n result[type].push(type === 'update' ? [prevById[id], nextById[id]] : item);\n });\n }\n\n return result;\n}\n\nfunction dataBindDiff(data, existingObjs, _ref3) {\n var _ref3$objBindAttr = _ref3.objBindAttr,\n objBindAttr = _ref3$objBindAttr === void 0 ? '__obj' : _ref3$objBindAttr,\n _ref3$dataBindAttr = _ref3.dataBindAttr,\n dataBindAttr = _ref3$dataBindAttr === void 0 ? '__data' : _ref3$dataBindAttr,\n idAccessor = _ref3.idAccessor,\n _ref3$purge = _ref3.purge,\n purge = _ref3$purge === void 0 ? false : _ref3$purge;\n\n var isObjValid = function isObjValid(obj) {\n return obj.hasOwnProperty(dataBindAttr);\n };\n\n var removeObjs = existingObjs.filter(function (obj) {\n return !isObjValid(obj);\n });\n var prevD = existingObjs.filter(isObjValid).map(function (obj) {\n return obj[dataBindAttr];\n });\n var nextD = data;\n var diff = purge ? {\n enter: nextD,\n exit: prevD,\n update: []\n } // don't diff data in purge mode\n : diffArrays(prevD, nextD, idAccessor);\n diff.update = diff.update.map(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n prevD = _ref5[0],\n nextD = _ref5[1];\n\n if (prevD !== nextD) {\n // transfer obj to new data point (if different)\n nextD[objBindAttr] = prevD[objBindAttr];\n nextD[objBindAttr][dataBindAttr] = nextD;\n }\n\n return nextD;\n });\n diff.exit = diff.exit.concat(removeObjs.map(function (obj) {\n return _defineProperty({}, objBindAttr, obj);\n }));\n return diff;\n}\n\nfunction viewDigest(data, existingObjs, // list\nappendObj, // item => {...} function\nremoveObj, // item => {...} function\n_ref7) {\n var _ref7$createObj = _ref7.createObj,\n createObj = _ref7$createObj === void 0 ? function (d) {\n return {};\n } : _ref7$createObj,\n _ref7$updateObj = _ref7.updateObj,\n updateObj = _ref7$updateObj === void 0 ? function (obj, d) {} : _ref7$updateObj,\n _ref7$exitObj = _ref7.exitObj,\n exitObj = _ref7$exitObj === void 0 ? function (obj) {} : _ref7$exitObj,\n _ref7$objBindAttr = _ref7.objBindAttr,\n objBindAttr = _ref7$objBindAttr === void 0 ? '__obj' : _ref7$objBindAttr,\n _ref7$dataBindAttr = _ref7.dataBindAttr,\n dataBindAttr = _ref7$dataBindAttr === void 0 ? '__data' : _ref7$dataBindAttr,\n dataDiffOptions = _objectWithoutProperties(_ref7, [\"createObj\", \"updateObj\", \"exitObj\", \"objBindAttr\", \"dataBindAttr\"]);\n\n var _dataBindDiff = dataBindDiff(data, existingObjs, _objectSpread2({\n objBindAttr: objBindAttr,\n dataBindAttr: dataBindAttr\n }, dataDiffOptions)),\n enter = _dataBindDiff.enter,\n update = _dataBindDiff.update,\n exit = _dataBindDiff.exit; // Remove exiting points\n\n\n exit.forEach(function (d) {\n var obj = d[objBindAttr];\n delete d[objBindAttr]; // unbind obj\n\n exitObj(obj);\n removeObj(obj);\n });\n var newObjs = createObjs(enter);\n var pointsData = [].concat(_toConsumableArray(enter), _toConsumableArray(update));\n updateObjs(pointsData); // Add new points\n\n newObjs.forEach(appendObj); //\n\n function createObjs(data) {\n var newObjs = [];\n data.forEach(function (d) {\n var obj = createObj(d);\n\n if (obj) {\n obj[dataBindAttr] = d;\n d[objBindAttr] = obj;\n newObjs.push(obj);\n }\n });\n return newObjs;\n }\n\n function updateObjs(data) {\n data.forEach(function (d) {\n var obj = d[objBindAttr];\n\n if (obj) {\n obj[dataBindAttr] = d;\n updateObj(obj, d);\n }\n });\n }\n}\n\nexport default viewDigest;\n","import { Group, Mesh, MeshLambertMaterial, Color, BufferGeometry, BufferAttribute, Matrix4, Vector3, SphereBufferGeometry, CylinderBufferGeometry, TubeBufferGeometry, ConeBufferGeometry, Line, LineBasicMaterial, QuadraticBezierCurve3, CubicBezierCurve3, Box3 } from 'three';\nimport { forceSimulation, forceLink, forceManyBody, forceCenter, forceRadial } from 'd3-force-3d';\nimport graph from 'ngraph.graph';\nimport forcelayout from 'ngraph.forcelayout';\nimport Kapsule from 'kapsule';\nimport accessorFn from 'accessor-fn';\nimport { min, max } from 'd3-array';\nimport dataJoint from 'data-joint';\nimport { scaleOrdinal } from 'd3-scale';\nimport { schemePaired } from 'd3-scale-chromatic';\nimport tinyColor from 'tinycolor2';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar materialDispose = function materialDispose(material) {\n if (material instanceof Array) {\n material.forEach(materialDispose);\n } else {\n if (material.map) {\n material.map.dispose();\n }\n\n material.dispose();\n }\n};\n\nvar deallocate = function deallocate(obj) {\n if (obj.geometry) {\n obj.geometry.dispose();\n }\n\n if (obj.material) {\n materialDispose(obj.material);\n }\n\n if (obj.texture) {\n obj.texture.dispose();\n }\n\n if (obj.children) {\n obj.children.forEach(deallocate);\n }\n};\n\nvar emptyObject = function emptyObject(obj) {\n while (obj.children.length) {\n var childObj = obj.children[0];\n obj.remove(childObj);\n deallocate(childObj);\n }\n};\n\nvar _excluded = [\"objFilter\"];\n\nfunction threeDigest(data, scene) {\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var _ref$objFilter = _ref.objFilter,\n objFilter = _ref$objFilter === void 0 ? function () {\n return true;\n } : _ref$objFilter,\n options = _objectWithoutProperties(_ref, _excluded);\n\n return dataJoint(data, scene.children.filter(objFilter), function (obj) {\n return scene.add(obj);\n }, function (obj) {\n scene.remove(obj);\n emptyObject(obj);\n }, _objectSpread2({\n objBindAttr: '__threeObj'\n }, options));\n}\n\nvar colorStr2Hex = function colorStr2Hex(str) {\n return isNaN(str) ? parseInt(tinyColor(str).toHex(), 16) : str;\n};\n\nvar colorAlpha = function colorAlpha(str) {\n return isNaN(str) ? tinyColor(str).getAlpha() : 1;\n};\n\nvar autoColorScale = scaleOrdinal(schemePaired); // Autoset attribute colorField by colorByAccessor property\n// If an object has already a color, don't set it\n// Objects can be nodes or links\n\nfunction autoColorObjects(objects, colorByAccessor, colorField) {\n if (!colorByAccessor || typeof colorField !== 'string') return;\n objects.filter(function (obj) {\n return !obj[colorField];\n }).forEach(function (obj) {\n obj[colorField] = autoColorScale(colorByAccessor(obj));\n });\n}\n\nfunction getDagDepths (_ref, idAccessor) {\n var nodes = _ref.nodes,\n links = _ref.links;\n\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$nodeFilter = _ref2.nodeFilter,\n nodeFilter = _ref2$nodeFilter === void 0 ? function () {\n return true;\n } : _ref2$nodeFilter,\n _ref2$onLoopError = _ref2.onLoopError,\n onLoopError = _ref2$onLoopError === void 0 ? function (loopIds) {\n throw \"Invalid DAG structure! Found cycle in node path: \".concat(loopIds.join(' -> '), \".\");\n } : _ref2$onLoopError;\n\n // linked graph\n var graph = {};\n nodes.forEach(function (node) {\n return graph[idAccessor(node)] = {\n data: node,\n out: [],\n depth: -1,\n skip: !nodeFilter(node)\n };\n });\n links.forEach(function (_ref3) {\n var source = _ref3.source,\n target = _ref3.target;\n var sourceId = getNodeId(source);\n var targetId = getNodeId(target);\n if (!graph.hasOwnProperty(sourceId)) throw \"Missing source node with id: \".concat(sourceId);\n if (!graph.hasOwnProperty(targetId)) throw \"Missing target node with id: \".concat(targetId);\n var sourceNode = graph[sourceId];\n var targetNode = graph[targetId];\n sourceNode.out.push(targetNode);\n\n function getNodeId(node) {\n return _typeof(node) === 'object' ? idAccessor(node) : node;\n }\n });\n var foundLoops = [];\n traverse(Object.values(graph));\n var nodeDepths = Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(graph).filter(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n node = _ref5[1];\n\n return !node.skip;\n }).map(function (_ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n id = _ref7[0],\n node = _ref7[1];\n\n return _defineProperty({}, id, node.depth);\n }))));\n return nodeDepths;\n\n function traverse(nodes) {\n var nodeStack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var currentDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n\n if (nodeStack.indexOf(node) !== -1) {\n var _ret = function () {\n var loop = [].concat(_toConsumableArray(nodeStack.slice(nodeStack.indexOf(node))), [node]).map(function (d) {\n return idAccessor(d.data);\n });\n\n if (!foundLoops.some(function (foundLoop) {\n return foundLoop.length === loop.length && foundLoop.every(function (id, idx) {\n return id === loop[idx];\n });\n })) {\n foundLoops.push(loop);\n onLoopError(loop);\n }\n\n return \"continue\";\n }();\n\n if (_ret === \"continue\") continue;\n }\n\n if (currentDepth > node.depth) {\n // Don't unnecessarily revisit chunks of the graph\n node.depth = currentDepth;\n traverse(node.out, [].concat(_toConsumableArray(nodeStack), [node]), currentDepth + (node.skip ? 0 : 1));\n }\n }\n }\n}\n\nvar three$1 = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists\n: {\n Group: Group,\n Mesh: Mesh,\n MeshLambertMaterial: MeshLambertMaterial,\n Color: Color,\n BufferGeometry: BufferGeometry,\n BufferAttribute: BufferAttribute,\n Matrix4: Matrix4,\n Vector3: Vector3,\n SphereBufferGeometry: SphereBufferGeometry,\n CylinderBufferGeometry: CylinderBufferGeometry,\n TubeBufferGeometry: TubeBufferGeometry,\n ConeBufferGeometry: ConeBufferGeometry,\n Line: Line,\n LineBasicMaterial: LineBasicMaterial,\n QuadraticBezierCurve3: QuadraticBezierCurve3,\n CubicBezierCurve3: CubicBezierCurve3,\n Box3: Box3\n};\nvar ngraph = {\n graph: graph,\n forcelayout: forcelayout\n};\n\nvar DAG_LEVEL_NODE_RATIO = 2; // support multiple method names for backwards threejs compatibility\n\nvar setAttributeFn = new three$1.BufferGeometry().setAttribute ? 'setAttribute' : 'addAttribute';\nvar applyMatrix4Fn = new three$1.BufferGeometry().applyMatrix4 ? 'applyMatrix4' : 'applyMatrix';\nvar ForceGraph = Kapsule({\n props: {\n jsonUrl: {\n onChange: function onChange(jsonUrl, state) {\n var _this = this;\n\n if (jsonUrl && !state.fetchingJson) {\n // Load data asynchronously\n state.fetchingJson = true;\n state.onLoading();\n fetch(jsonUrl).then(function (r) {\n return r.json();\n }).then(function (json) {\n state.fetchingJson = false;\n state.onFinishLoading(json);\n\n _this.graphData(json);\n });\n }\n },\n triggerUpdate: false\n },\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n },\n onChange: function onChange(graphData, state) {\n state.engineRunning = false; // Pause simulation immediately\n }\n },\n numDimensions: {\n \"default\": 3,\n onChange: function onChange(numDim, state) {\n var chargeForce = state.d3ForceLayout.force('charge'); // Increase repulsion on 3D mode for improved spatial separation\n\n if (chargeForce) {\n chargeForce.strength(numDim > 2 ? -60 : -30);\n }\n\n if (numDim < 3) {\n eraseDimension(state.graphData.nodes, 'z');\n }\n\n if (numDim < 2) {\n eraseDimension(state.graphData.nodes, 'y');\n }\n\n function eraseDimension(nodes, dim) {\n nodes.forEach(function (d) {\n delete d[dim]; // position\n\n delete d[\"v\".concat(dim)]; // velocity\n });\n }\n }\n },\n dagMode: {\n onChange: function onChange(dagMode, state) {\n // td, bu, lr, rl, zin, zout, radialin, radialout\n !dagMode && state.forceEngine === 'd3' && (state.graphData.nodes || []).forEach(function (n) {\n return n.fx = n.fy = n.fz = undefined;\n }); // unfix nodes when disabling dag mode\n }\n },\n dagLevelDistance: {},\n dagNodeFilter: {\n \"default\": function _default(node) {\n return true;\n }\n },\n onDagError: {\n triggerUpdate: false\n },\n nodeRelSize: {\n \"default\": 4\n },\n // volume per val unit\n nodeId: {\n \"default\": 'id'\n },\n nodeVal: {\n \"default\": 'val'\n },\n nodeResolution: {\n \"default\": 8\n },\n // how many slice segments in the sphere's circumference\n nodeColor: {\n \"default\": 'color'\n },\n nodeAutoColorBy: {},\n nodeOpacity: {\n \"default\": 0.75\n },\n nodeVisibility: {\n \"default\": true\n },\n nodeThreeObject: {},\n nodeThreeObjectExtend: {\n \"default\": false\n },\n linkSource: {\n \"default\": 'source'\n },\n linkTarget: {\n \"default\": 'target'\n },\n linkVisibility: {\n \"default\": true\n },\n linkColor: {\n \"default\": 'color'\n },\n linkAutoColorBy: {},\n linkOpacity: {\n \"default\": 0.2\n },\n linkWidth: {},\n // Rounded to nearest decimal. For falsy values use dimensionless line with 1px regardless of distance.\n linkResolution: {\n \"default\": 6\n },\n // how many radial segments in each line tube's geometry\n linkCurvature: {\n \"default\": 0,\n triggerUpdate: false\n },\n // line curvature radius (0: straight, 1: semi-circle)\n linkCurveRotation: {\n \"default\": 0,\n triggerUpdate: false\n },\n // line curve rotation along the line axis (0: interection with XY plane, PI: upside down)\n linkMaterial: {},\n linkThreeObject: {},\n linkThreeObjectExtend: {\n \"default\": false\n },\n linkPositionUpdate: {\n triggerUpdate: false\n },\n // custom function to call for updating the link's position. Signature: (threeObj, { start: { x, y, z}, end: { x, y, z }}, link). If the function returns a truthy value, the regular link position update will not run.\n linkDirectionalArrowLength: {\n \"default\": 0\n },\n linkDirectionalArrowColor: {},\n linkDirectionalArrowRelPos: {\n \"default\": 0.5,\n triggerUpdate: false\n },\n // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalArrowResolution: {\n \"default\": 8\n },\n // how many slice segments in the arrow's conic circumference\n linkDirectionalParticles: {\n \"default\": 0\n },\n // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: {\n \"default\": 0.01,\n triggerUpdate: false\n },\n // in link length ratio per frame\n linkDirectionalParticleWidth: {\n \"default\": 0.5\n },\n linkDirectionalParticleColor: {},\n linkDirectionalParticleResolution: {\n \"default\": 4\n },\n // how many slice segments in the particle sphere's circumference\n forceEngine: {\n \"default\": 'd3'\n },\n // d3 or ngraph\n d3AlphaMin: {\n \"default\": 0\n },\n d3AlphaDecay: {\n \"default\": 0.0228,\n triggerUpdate: false,\n onChange: function onChange(alphaDecay, state) {\n state.d3ForceLayout.alphaDecay(alphaDecay);\n }\n },\n d3AlphaTarget: {\n \"default\": 0,\n triggerUpdate: false,\n onChange: function onChange(alphaTarget, state) {\n state.d3ForceLayout.alphaTarget(alphaTarget);\n }\n },\n d3VelocityDecay: {\n \"default\": 0.4,\n triggerUpdate: false,\n onChange: function onChange(velocityDecay, state) {\n state.d3ForceLayout.velocityDecay(velocityDecay);\n }\n },\n ngraphPhysics: {\n \"default\": {\n // defaults from https://github.com/anvaka/ngraph.physics.simulator/blob/master/index.js\n timeStep: 20,\n gravity: -1.2,\n theta: 0.8,\n springLength: 30,\n springCoefficient: 0.0008,\n dragCoefficient: 0.02\n }\n },\n warmupTicks: {\n \"default\": 0,\n triggerUpdate: false\n },\n // how many times to tick the force engine at init before starting to render\n cooldownTicks: {\n \"default\": Infinity,\n triggerUpdate: false\n },\n cooldownTime: {\n \"default\": 15000,\n triggerUpdate: false\n },\n // ms\n onLoading: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onFinishLoading: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onUpdate: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onFinishUpdate: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onEngineTick: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onEngineStop: {\n \"default\": function _default() {},\n triggerUpdate: false\n }\n },\n methods: {\n refresh: function refresh(state) {\n state._flushObjects = true;\n\n state._rerender();\n\n return this;\n },\n // Expose d3 forces for external manipulation\n d3Force: function d3Force(state, forceName, forceFn) {\n if (forceFn === undefined) {\n return state.d3ForceLayout.force(forceName); // Force getter\n }\n\n state.d3ForceLayout.force(forceName, forceFn); // Force setter\n\n return this;\n },\n d3ReheatSimulation: function d3ReheatSimulation(state) {\n state.d3ForceLayout.alpha(1);\n this.resetCountdown();\n return this;\n },\n // reset cooldown state\n resetCountdown: function resetCountdown(state) {\n state.cntTicks = 0;\n state.startTickTime = new Date();\n state.engineRunning = true;\n return this;\n },\n tickFrame: function tickFrame(state) {\n var isD3Sim = state.forceEngine !== 'ngraph';\n\n if (state.engineRunning) {\n layoutTick();\n }\n\n updateArrows();\n updatePhotons();\n return this; //\n\n function layoutTick() {\n if (++state.cntTicks > state.cooldownTicks || new Date() - state.startTickTime > state.cooldownTime || isD3Sim && state.d3AlphaMin > 0 && state.d3ForceLayout.alpha() < state.d3AlphaMin) {\n state.engineRunning = false; // Stop ticking graph\n\n state.onEngineStop();\n } else {\n state.layout[isD3Sim ? 'tick' : 'step'](); // Tick it\n\n state.onEngineTick();\n } // Update nodes position\n\n\n state.graphData.nodes.forEach(function (node) {\n var obj = node.__threeObj;\n if (!obj) return;\n var pos = isD3Sim ? node : state.layout.getNodePosition(node[state.nodeId]);\n obj.position.x = pos.x;\n obj.position.y = pos.y || 0;\n obj.position.z = pos.z || 0;\n }); // Update links position\n\n var linkWidthAccessor = accessorFn(state.linkWidth);\n var linkCurvatureAccessor = accessorFn(state.linkCurvature);\n var linkCurveRotationAccessor = accessorFn(state.linkCurveRotation);\n var linkThreeObjectExtendAccessor = accessorFn(state.linkThreeObjectExtend);\n state.graphData.links.forEach(function (link) {\n var lineObj = link.__lineObj;\n if (!lineObj) return;\n var pos = isD3Sim ? link : state.layout.getLinkPosition(state.layout.graph.getLink(link.source, link.target).id);\n var start = pos[isD3Sim ? 'source' : 'from'];\n var end = pos[isD3Sim ? 'target' : 'to'];\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n calcLinkCurve(link); // calculate link curve for all links, including custom replaced, so it can be used in directional functionality\n\n var extendedObj = linkThreeObjectExtendAccessor(link);\n\n if (state.linkPositionUpdate && state.linkPositionUpdate(extendedObj ? lineObj.children[1] : lineObj, // pass child custom object if extending the default\n {\n start: {\n x: start.x,\n y: start.y,\n z: start.z\n },\n end: {\n x: end.x,\n y: end.y,\n z: end.z\n }\n }, link) && !extendedObj) {\n // exit if successfully custom updated position of non-extended obj\n return;\n }\n\n var curveResolution = 30; // # line segments\n\n var curve = link.__curve; // select default line obj if it's an extended group\n\n var line = lineObj.children.length ? lineObj.children[0] : lineObj;\n\n if (line.type === 'Line') {\n // Update line geometry\n if (!curve) {\n // straight line\n var linePos = line.geometry.getAttribute('position');\n\n if (!linePos || !linePos.array || linePos.array.length !== 6) {\n line.geometry[setAttributeFn]('position', linePos = new three$1.BufferAttribute(new Float32Array(2 * 3), 3));\n }\n\n linePos.array[0] = start.x;\n linePos.array[1] = start.y || 0;\n linePos.array[2] = start.z || 0;\n linePos.array[3] = end.x;\n linePos.array[4] = end.y || 0;\n linePos.array[5] = end.z || 0;\n linePos.needsUpdate = true;\n } else {\n // bezier curve line\n line.geometry.setFromPoints(curve.getPoints(curveResolution));\n }\n\n line.geometry.computeBoundingSphere();\n } else if (line.type === 'Mesh') {\n // Update cylinder geometry\n if (!curve) {\n // straight tube\n if (!line.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)) {\n var linkWidth = Math.ceil(linkWidthAccessor(link) * 10) / 10;\n var r = linkWidth / 2;\n var geometry = new three$1.CylinderBufferGeometry(r, r, 1, state.linkResolution, 1, false);\n geometry[applyMatrix4Fn](new three$1.Matrix4().makeTranslation(0, 1 / 2, 0));\n geometry[applyMatrix4Fn](new three$1.Matrix4().makeRotationX(Math.PI / 2));\n line.geometry.dispose();\n line.geometry = geometry;\n }\n\n var vStart = new three$1.Vector3(start.x, start.y || 0, start.z || 0);\n var vEnd = new three$1.Vector3(end.x, end.y || 0, end.z || 0);\n var distance = vStart.distanceTo(vEnd);\n line.position.x = vStart.x;\n line.position.y = vStart.y;\n line.position.z = vStart.z;\n line.scale.z = distance;\n line.parent.localToWorld(vEnd); // lookAt requires world coords\n\n line.lookAt(vEnd);\n } else {\n // curved tube\n if (!line.geometry.type.match(/^Tube(Buffer)?Geometry$/)) {\n // reset object positioning\n line.position.set(0, 0, 0);\n line.rotation.set(0, 0, 0);\n line.scale.set(1, 1, 1);\n }\n\n var _linkWidth = Math.ceil(linkWidthAccessor(link) * 10) / 10;\n\n var _r = _linkWidth / 2;\n\n var _geometry = new three$1.TubeBufferGeometry(curve, curveResolution, _r, state.linkResolution, false);\n\n line.geometry.dispose();\n line.geometry = _geometry;\n }\n }\n }); //\n\n function calcLinkCurve(link) {\n var pos = isD3Sim ? link : state.layout.getLinkPosition(state.layout.graph.getLink(link.source, link.target).id);\n var start = pos[isD3Sim ? 'source' : 'from'];\n var end = pos[isD3Sim ? 'target' : 'to'];\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var curvature = linkCurvatureAccessor(link);\n\n if (!curvature) {\n link.__curve = null; // Straight line\n } else {\n // bezier curve line (only for line types)\n var vStart = new three$1.Vector3(start.x, start.y || 0, start.z || 0);\n var vEnd = new three$1.Vector3(end.x, end.y || 0, end.z || 0);\n var l = vStart.distanceTo(vEnd); // line length\n\n var curve;\n var curveRotation = linkCurveRotationAccessor(link);\n\n if (l > 0) {\n var dx = end.x - start.x;\n var dy = end.y - start.y || 0;\n var vLine = new three$1.Vector3().subVectors(vEnd, vStart);\n var cp = vLine.clone().multiplyScalar(curvature).cross(dx !== 0 || dy !== 0 ? new three$1.Vector3(0, 0, 1) : new three$1.Vector3(0, 1, 0)) // avoid cross-product of parallel vectors (prefer Z, fallback to Y)\n .applyAxisAngle(vLine.normalize(), curveRotation) // rotate along line axis according to linkCurveRotation\n .add(new three$1.Vector3().addVectors(vStart, vEnd).divideScalar(2));\n curve = new three$1.QuadraticBezierCurve3(vStart, cp, vEnd);\n } else {\n // Same point, draw a loop\n var d = curvature * 70;\n var endAngle = -curveRotation; // Rotate clockwise (from Z angle perspective)\n\n var startAngle = endAngle + Math.PI / 2;\n curve = new three$1.CubicBezierCurve3(vStart, new three$1.Vector3(d * Math.cos(startAngle), d * Math.sin(startAngle), 0).add(vStart), new three$1.Vector3(d * Math.cos(endAngle), d * Math.sin(endAngle), 0).add(vStart), vEnd);\n }\n\n link.__curve = curve;\n }\n }\n }\n\n function updateArrows() {\n // update link arrow position\n var arrowRelPosAccessor = accessorFn(state.linkDirectionalArrowRelPos);\n var arrowLengthAccessor = accessorFn(state.linkDirectionalArrowLength);\n var nodeValAccessor = accessorFn(state.nodeVal);\n state.graphData.links.forEach(function (link) {\n var arrowObj = link.__arrowObj;\n if (!arrowObj) return;\n var pos = isD3Sim ? link : state.layout.getLinkPosition(state.layout.graph.getLink(link.source, link.target).id);\n var start = pos[isD3Sim ? 'source' : 'from'];\n var end = pos[isD3Sim ? 'target' : 'to'];\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var startR = Math.sqrt(Math.max(0, nodeValAccessor(start) || 1)) * state.nodeRelSize;\n var endR = Math.sqrt(Math.max(0, nodeValAccessor(end) || 1)) * state.nodeRelSize;\n var arrowLength = arrowLengthAccessor(link);\n var arrowRelPos = arrowRelPosAccessor(link);\n var getPosAlongLine = link.__curve ? function (t) {\n return link.__curve.getPoint(t);\n } // interpolate along bezier curve\n : function (t) {\n // straight line: interpolate linearly\n var iplt = function iplt(dim, start, end, t) {\n return start[dim] + (end[dim] - start[dim]) * t || 0;\n };\n\n return {\n x: iplt('x', start, end, t),\n y: iplt('y', start, end, t),\n z: iplt('z', start, end, t)\n };\n };\n var lineLen = link.__curve ? link.__curve.getLength() : Math.sqrt(['x', 'y', 'z'].map(function (dim) {\n return Math.pow((end[dim] || 0) - (start[dim] || 0), 2);\n }).reduce(function (acc, v) {\n return acc + v;\n }, 0));\n var posAlongLine = startR + arrowLength + (lineLen - startR - endR - arrowLength) * arrowRelPos;\n var arrowHead = getPosAlongLine(posAlongLine / lineLen);\n var arrowTail = getPosAlongLine((posAlongLine - arrowLength) / lineLen);\n ['x', 'y', 'z'].forEach(function (dim) {\n return arrowObj.position[dim] = arrowTail[dim];\n });\n\n var headVec = _construct(three$1.Vector3, _toConsumableArray(['x', 'y', 'z'].map(function (c) {\n return arrowHead[c];\n })));\n\n arrowObj.parent.localToWorld(headVec); // lookAt requires world coords\n\n arrowObj.lookAt(headVec);\n });\n }\n\n function updatePhotons() {\n // update link particle positions\n var particleSpeedAccessor = accessorFn(state.linkDirectionalParticleSpeed);\n state.graphData.links.forEach(function (link) {\n var cyclePhotons = link.__photonsObj && link.__photonsObj.children;\n var singleHopPhotons = link.__singleHopPhotonsObj && link.__singleHopPhotonsObj.children;\n if ((!singleHopPhotons || !singleHopPhotons.length) && (!cyclePhotons || !cyclePhotons.length)) return;\n var pos = isD3Sim ? link : state.layout.getLinkPosition(state.layout.graph.getLink(link.source, link.target).id);\n var start = pos[isD3Sim ? 'source' : 'from'];\n var end = pos[isD3Sim ? 'target' : 'to'];\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var particleSpeed = particleSpeedAccessor(link);\n var getPhotonPos = link.__curve ? function (t) {\n return link.__curve.getPoint(t);\n } // interpolate along bezier curve\n : function (t) {\n // straight line: interpolate linearly\n var iplt = function iplt(dim, start, end, t) {\n return start[dim] + (end[dim] - start[dim]) * t || 0;\n };\n\n return {\n x: iplt('x', start, end, t),\n y: iplt('y', start, end, t),\n z: iplt('z', start, end, t)\n };\n };\n var photons = [].concat(_toConsumableArray(cyclePhotons || []), _toConsumableArray(singleHopPhotons || []));\n photons.forEach(function (photon, idx) {\n var singleHop = photon.parent.__linkThreeObjType === 'singleHopPhotons';\n\n if (!photon.hasOwnProperty('__progressRatio')) {\n photon.__progressRatio = singleHop ? 0 : idx / cyclePhotons.length;\n }\n\n photon.__progressRatio += particleSpeed;\n\n if (photon.__progressRatio >= 1) {\n if (!singleHop) {\n photon.__progressRatio = photon.__progressRatio % 1;\n } else {\n // remove particle\n photon.parent.remove(photon);\n emptyObject(photon);\n return;\n }\n }\n\n var photonPosRatio = photon.__progressRatio;\n var pos = getPhotonPos(photonPosRatio);\n ['x', 'y', 'z'].forEach(function (dim) {\n return photon.position[dim] = pos[dim];\n });\n });\n });\n }\n },\n emitParticle: function emitParticle(state, link) {\n if (link) {\n if (!link.__singleHopPhotonsObj) {\n var obj = new three$1.Group();\n obj.__linkThreeObjType = 'singleHopPhotons';\n link.__singleHopPhotonsObj = obj;\n state.graphScene.add(obj);\n }\n\n var particleWidthAccessor = accessorFn(state.linkDirectionalParticleWidth);\n var photonR = Math.ceil(particleWidthAccessor(link) * 10) / 10 / 2;\n var numSegments = state.linkDirectionalParticleResolution;\n var particleGeometry = new three$1.SphereBufferGeometry(photonR, numSegments, numSegments);\n var linkColorAccessor = accessorFn(state.linkColor);\n var particleColorAccessor = accessorFn(state.linkDirectionalParticleColor);\n var photonColor = particleColorAccessor(link) || linkColorAccessor(link) || '#f0f0f0';\n var materialColor = new three$1.Color(colorStr2Hex(photonColor));\n var opacity = state.linkOpacity * 3;\n var particleMaterial = new three$1.MeshLambertMaterial({\n color: materialColor,\n transparent: true,\n opacity: opacity\n }); // add a single hop particle\n\n link.__singleHopPhotonsObj.add(new three$1.Mesh(particleGeometry, particleMaterial));\n }\n\n return this;\n },\n getGraphBbox: function getGraphBbox(state) {\n var nodeFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {\n return true;\n };\n if (!state.initialised) return null; // recursively collect all nested geometries bboxes\n\n var bboxes = function getBboxes(obj) {\n var bboxes = [];\n\n if (obj.geometry) {\n obj.geometry.computeBoundingBox();\n var box = new three$1.Box3();\n box.copy(obj.geometry.boundingBox).applyMatrix4(obj.matrixWorld);\n bboxes.push(box);\n }\n\n return bboxes.concat.apply(bboxes, _toConsumableArray((obj.children || []).filter(function (obj) {\n return !obj.hasOwnProperty('__graphObjType') || obj.__graphObjType === 'node' && nodeFilter(obj.__data);\n } // exclude filtered out nodes\n ).map(getBboxes)));\n }(state.graphScene);\n\n if (!bboxes.length) return null; // extract global x,y,z min/max\n\n return Object.assign.apply(Object, _toConsumableArray(['x', 'y', 'z'].map(function (c) {\n return _defineProperty({}, c, [min(bboxes, function (bb) {\n return bb.min[c];\n }), max(bboxes, function (bb) {\n return bb.max[c];\n })]);\n })));\n }\n },\n stateInit: function stateInit() {\n return {\n d3ForceLayout: forceSimulation().force('link', forceLink()).force('charge', forceManyBody()).force('center', forceCenter()).force('dagRadial', null).stop(),\n engineRunning: false\n };\n },\n init: function init(threeObj, state) {\n // Main three object to manipulate\n state.graphScene = threeObj;\n },\n update: function update(state, changedProps) {\n var hasAnyPropChanged = function hasAnyPropChanged(propList) {\n return propList.some(function (p) {\n return changedProps.hasOwnProperty(p);\n });\n };\n\n state.engineRunning = false; // pause simulation\n\n state.onUpdate();\n\n if (state.nodeAutoColorBy !== null && hasAnyPropChanged(['nodeAutoColorBy', 'graphData', 'nodeColor'])) {\n // Auto add color to uncolored nodes\n autoColorObjects(state.graphData.nodes, accessorFn(state.nodeAutoColorBy), state.nodeColor);\n }\n\n if (state.linkAutoColorBy !== null && hasAnyPropChanged(['linkAutoColorBy', 'graphData', 'linkColor'])) {\n // Auto add color to uncolored links\n autoColorObjects(state.graphData.links, accessorFn(state.linkAutoColorBy), state.linkColor);\n } // Digest nodes WebGL objects\n\n\n if (state._flushObjects || hasAnyPropChanged(['graphData', 'nodeThreeObject', 'nodeThreeObjectExtend', 'nodeVal', 'nodeColor', 'nodeVisibility', 'nodeRelSize', 'nodeResolution', 'nodeOpacity'])) {\n var customObjectAccessor = accessorFn(state.nodeThreeObject);\n var customObjectExtendAccessor = accessorFn(state.nodeThreeObjectExtend);\n var valAccessor = accessorFn(state.nodeVal);\n var colorAccessor = accessorFn(state.nodeColor);\n var visibilityAccessor = accessorFn(state.nodeVisibility);\n var sphereGeometries = {}; // indexed by node value\n\n var sphereMaterials = {}; // indexed by color\n\n threeDigest(state.graphData.nodes.filter(visibilityAccessor), state.graphScene, {\n purge: state._flushObjects || hasAnyPropChanged([// recreate objects if any of these props have changed\n 'nodeThreeObject', 'nodeThreeObjectExtend']),\n objFilter: function objFilter(obj) {\n return obj.__graphObjType === 'node';\n },\n createObj: function createObj(node) {\n var customObj = customObjectAccessor(node);\n var extendObj = customObjectExtendAccessor(node);\n\n if (customObj && state.nodeThreeObject === customObj) {\n // clone object if it's a shared object among all nodes\n customObj = customObj.clone();\n }\n\n var obj;\n\n if (customObj && !extendObj) {\n obj = customObj;\n } else {\n // Add default object (sphere mesh)\n obj = new three$1.Mesh();\n obj.__graphDefaultObj = true;\n\n if (customObj && extendObj) {\n obj.add(customObj); // extend default with custom\n }\n }\n\n obj.__graphObjType = 'node'; // Add object type\n\n return obj;\n },\n updateObj: function updateObj(obj, node) {\n if (obj.__graphDefaultObj) {\n // bypass internal updates for custom node objects\n var val = valAccessor(node) || 1;\n var radius = Math.cbrt(val) * state.nodeRelSize;\n var numSegments = state.nodeResolution;\n\n if (!obj.geometry.type.match(/^Sphere(Buffer)?Geometry$/) || obj.geometry.parameters.radius !== radius || obj.geometry.parameters.widthSegments !== numSegments) {\n if (!sphereGeometries.hasOwnProperty(val)) {\n sphereGeometries[val] = new three$1.SphereBufferGeometry(radius, numSegments, numSegments);\n }\n\n obj.geometry.dispose();\n obj.geometry = sphereGeometries[val];\n }\n\n var color = colorAccessor(node);\n var materialColor = new three$1.Color(colorStr2Hex(color || '#ffffaa'));\n var opacity = state.nodeOpacity * colorAlpha(color);\n\n if (obj.material.type !== 'MeshLambertMaterial' || !obj.material.color.equals(materialColor) || obj.material.opacity !== opacity) {\n if (!sphereMaterials.hasOwnProperty(color)) {\n sphereMaterials[color] = new three$1.MeshLambertMaterial({\n color: materialColor,\n transparent: true,\n opacity: opacity\n });\n }\n\n obj.material.dispose();\n obj.material = sphereMaterials[color];\n }\n }\n }\n });\n } // Digest links WebGL objects\n\n\n if (state._flushObjects || hasAnyPropChanged(['graphData', 'linkThreeObject', 'linkThreeObjectExtend', 'linkMaterial', 'linkColor', 'linkWidth', 'linkVisibility', 'linkResolution', 'linkOpacity', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowResolution', 'linkDirectionalParticles', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'linkDirectionalParticleResolution'])) {\n var _customObjectAccessor = accessorFn(state.linkThreeObject);\n\n var _customObjectExtendAccessor = accessorFn(state.linkThreeObjectExtend);\n\n var customMaterialAccessor = accessorFn(state.linkMaterial);\n\n var _visibilityAccessor = accessorFn(state.linkVisibility);\n\n var _colorAccessor = accessorFn(state.linkColor);\n\n var widthAccessor = accessorFn(state.linkWidth);\n var cylinderGeometries = {}; // indexed by link width\n\n var lambertLineMaterials = {}; // for cylinder objects, indexed by link color\n\n var basicLineMaterials = {}; // for line objects, indexed by link color\n\n var visibleLinks = state.graphData.links.filter(_visibilityAccessor); // lines digest cycle\n\n threeDigest(visibleLinks, state.graphScene, {\n objBindAttr: '__lineObj',\n purge: state._flushObjects || hasAnyPropChanged([// recreate objects if any of these props have changed\n 'linkThreeObject', 'linkThreeObjectExtend', 'linkWidth']),\n objFilter: function objFilter(obj) {\n return obj.__graphObjType === 'link';\n },\n createObj: function createObj(link) {\n var customObj = _customObjectAccessor(link);\n\n var extendObj = _customObjectExtendAccessor(link);\n\n if (customObj && state.linkThreeObject === customObj) {\n // clone object if it's a shared object among all links\n customObj = customObj.clone();\n }\n\n var defaultObj;\n\n if (!customObj || extendObj) {\n // construct default line obj\n var useCylinder = !!widthAccessor(link);\n\n if (useCylinder) {\n defaultObj = new three$1.Mesh();\n } else {\n // Use plain line (constant width)\n var lineGeometry = new three$1.BufferGeometry();\n lineGeometry[setAttributeFn]('position', new three$1.BufferAttribute(new Float32Array(2 * 3), 3));\n defaultObj = new three$1.Line(lineGeometry);\n }\n }\n\n var obj;\n\n if (!customObj) {\n obj = defaultObj;\n obj.__graphDefaultObj = true;\n } else {\n if (!extendObj) {\n // use custom object\n obj = customObj;\n } else {\n // extend default with custom in a group\n obj = new three$1.Group();\n obj.__graphDefaultObj = true;\n obj.add(defaultObj);\n obj.add(customObj);\n }\n }\n\n obj.renderOrder = 10; // Prevent visual glitches of dark lines on top of nodes by rendering them last\n\n obj.__graphObjType = 'link'; // Add object type\n\n return obj;\n },\n updateObj: function updateObj(updObj, link) {\n if (updObj.__graphDefaultObj) {\n // bypass internal updates for custom link objects\n // select default object if it's an extended group\n var obj = updObj.children.length ? updObj.children[0] : updObj;\n var linkWidth = Math.ceil(widthAccessor(link) * 10) / 10;\n var useCylinder = !!linkWidth;\n\n if (useCylinder) {\n var r = linkWidth / 2;\n var numSegments = state.linkResolution;\n\n if (!obj.geometry.type.match(/^Cylinder(Buffer)?Geometry$/) || obj.geometry.parameters.radiusTop !== r || obj.geometry.parameters.radialSegments !== numSegments) {\n if (!cylinderGeometries.hasOwnProperty(linkWidth)) {\n var geometry = new three$1.CylinderBufferGeometry(r, r, 1, numSegments, 1, false);\n geometry[applyMatrix4Fn](new three$1.Matrix4().makeTranslation(0, 1 / 2, 0));\n geometry[applyMatrix4Fn](new three$1.Matrix4().makeRotationX(Math.PI / 2));\n cylinderGeometries[linkWidth] = geometry;\n }\n\n obj.geometry.dispose();\n obj.geometry = cylinderGeometries[linkWidth];\n }\n }\n\n var customMaterial = customMaterialAccessor(link);\n\n if (customMaterial) {\n obj.material = customMaterial;\n } else {\n var color = _colorAccessor(link);\n\n var materialColor = new three$1.Color(colorStr2Hex(color || '#f0f0f0'));\n var opacity = state.linkOpacity * colorAlpha(color);\n var materialType = useCylinder ? 'MeshLambertMaterial' : 'LineBasicMaterial';\n\n if (obj.material.type !== materialType || !obj.material.color.equals(materialColor) || obj.material.opacity !== opacity) {\n var lineMaterials = useCylinder ? lambertLineMaterials : basicLineMaterials;\n\n if (!lineMaterials.hasOwnProperty(color)) {\n lineMaterials[color] = new three$1[materialType]({\n color: materialColor,\n transparent: opacity < 1,\n opacity: opacity,\n depthWrite: opacity >= 1 // Prevent transparency issues\n\n });\n }\n\n obj.material.dispose();\n obj.material = lineMaterials[color];\n }\n }\n }\n }\n }); // Arrows digest cycle\n\n if (state.linkDirectionalArrowLength || changedProps.hasOwnProperty('linkDirectionalArrowLength')) {\n var arrowLengthAccessor = accessorFn(state.linkDirectionalArrowLength);\n var arrowColorAccessor = accessorFn(state.linkDirectionalArrowColor);\n threeDigest(visibleLinks.filter(arrowLengthAccessor), state.graphScene, {\n objBindAttr: '__arrowObj',\n objFilter: function objFilter(obj) {\n return obj.__linkThreeObjType === 'arrow';\n },\n createObj: function createObj() {\n var obj = new three$1.Mesh(undefined, new three$1.MeshLambertMaterial({\n transparent: true\n }));\n obj.__linkThreeObjType = 'arrow'; // Add object type\n\n return obj;\n },\n updateObj: function updateObj(obj, link) {\n var arrowLength = arrowLengthAccessor(link);\n var numSegments = state.linkDirectionalArrowResolution;\n\n if (!obj.geometry.type.match(/^Cone(Buffer)?Geometry$/) || obj.geometry.parameters.height !== arrowLength || obj.geometry.parameters.radialSegments !== numSegments) {\n var coneGeometry = new three$1.ConeBufferGeometry(arrowLength * 0.25, arrowLength, numSegments); // Correct orientation\n\n coneGeometry.translate(0, arrowLength / 2, 0);\n coneGeometry.rotateX(Math.PI / 2);\n obj.geometry.dispose();\n obj.geometry = coneGeometry;\n }\n\n obj.material.color = new three$1.Color(arrowColorAccessor(link) || _colorAccessor(link) || '#f0f0f0');\n obj.material.opacity = state.linkOpacity * 3;\n }\n });\n } // Photon particles digest cycle\n\n\n if (state.linkDirectionalParticles || changedProps.hasOwnProperty('linkDirectionalParticles')) {\n var particlesAccessor = accessorFn(state.linkDirectionalParticles);\n var particleWidthAccessor = accessorFn(state.linkDirectionalParticleWidth);\n var particleColorAccessor = accessorFn(state.linkDirectionalParticleColor);\n var particleMaterials = {}; // indexed by link color\n\n var particleGeometries = {}; // indexed by particle width\n\n threeDigest(visibleLinks.filter(particlesAccessor), state.graphScene, {\n objBindAttr: '__photonsObj',\n objFilter: function objFilter(obj) {\n return obj.__linkThreeObjType === 'photons';\n },\n createObj: function createObj() {\n var obj = new three$1.Group();\n obj.__linkThreeObjType = 'photons'; // Add object type\n\n return obj;\n },\n updateObj: function updateObj(obj, link) {\n var numPhotons = Math.round(Math.abs(particlesAccessor(link)));\n var curPhoton = !!obj.children.length && obj.children[0];\n var photonR = Math.ceil(particleWidthAccessor(link) * 10) / 10 / 2;\n var numSegments = state.linkDirectionalParticleResolution;\n var particleGeometry;\n\n if (curPhoton && curPhoton.geometry.parameters.radius === photonR && curPhoton.geometry.parameters.widthSegments === numSegments) {\n particleGeometry = curPhoton.geometry;\n } else {\n if (!particleGeometries.hasOwnProperty(photonR)) {\n particleGeometries[photonR] = new three$1.SphereBufferGeometry(photonR, numSegments, numSegments);\n }\n\n particleGeometry = particleGeometries[photonR];\n curPhoton && curPhoton.geometry.dispose();\n }\n\n var photonColor = particleColorAccessor(link) || _colorAccessor(link) || '#f0f0f0';\n var materialColor = new three$1.Color(colorStr2Hex(photonColor));\n var opacity = state.linkOpacity * 3;\n var particleMaterial;\n\n if (curPhoton && curPhoton.material.color.equals(materialColor) && curPhoton.material.opacity === opacity) {\n particleMaterial = curPhoton.material;\n } else {\n if (!particleMaterials.hasOwnProperty(photonColor)) {\n particleMaterials[photonColor] = new three$1.MeshLambertMaterial({\n color: materialColor,\n transparent: true,\n opacity: opacity\n });\n }\n\n particleMaterial = particleMaterials[photonColor];\n curPhoton && curPhoton.material.dispose();\n } // digest cycle for each photon\n\n\n threeDigest(_toConsumableArray(new Array(numPhotons)).map(function (_, idx) {\n return {\n idx: idx\n };\n }), obj, {\n idAccessor: function idAccessor(d) {\n return d.idx;\n },\n createObj: function createObj() {\n return new three$1.Mesh(particleGeometry, particleMaterial);\n },\n updateObj: function updateObj(obj) {\n obj.geometry = particleGeometry;\n obj.material = particleMaterial;\n }\n });\n }\n });\n }\n }\n\n state._flushObjects = false; // reset objects refresh flag\n // simulation engine\n\n if (hasAnyPropChanged(['graphData', 'nodeId', 'linkSource', 'linkTarget', 'numDimensions', 'forceEngine', 'dagMode', 'dagNodeFilter', 'dagLevelDistance'])) {\n state.engineRunning = false; // Pause simulation\n // parse links\n\n state.graphData.links.forEach(function (link) {\n link.source = link[state.linkSource];\n link.target = link[state.linkTarget];\n }); // Feed data to force-directed layout\n\n var isD3Sim = state.forceEngine !== 'ngraph';\n var layout;\n\n if (isD3Sim) {\n // D3-force\n (layout = state.d3ForceLayout).stop().alpha(1) // re-heat the simulation\n .numDimensions(state.numDimensions).nodes(state.graphData.nodes); // add links (if link force is still active)\n\n var linkForce = state.d3ForceLayout.force('link');\n\n if (linkForce) {\n linkForce.id(function (d) {\n return d[state.nodeId];\n }).links(state.graphData.links);\n } // setup dag force constraints\n\n\n var nodeDepths = state.dagMode && getDagDepths(state.graphData, function (node) {\n return node[state.nodeId];\n }, {\n nodeFilter: state.dagNodeFilter,\n onLoopError: state.onDagError || undefined\n });\n var maxDepth = Math.max.apply(Math, _toConsumableArray(Object.values(nodeDepths || [])));\n var dagLevelDistance = state.dagLevelDistance || state.graphData.nodes.length / (maxDepth || 1) * DAG_LEVEL_NODE_RATIO * (['radialin', 'radialout'].indexOf(state.dagMode) !== -1 ? 0.7 : 1); // Fix nodes to x,y,z for dag mode\n\n if (state.dagMode) {\n var getFFn = function getFFn(fix, invert) {\n return function (node) {\n return !fix ? undefined : (nodeDepths[node[state.nodeId]] - maxDepth / 2) * dagLevelDistance * (invert ? -1 : 1);\n };\n };\n\n var fxFn = getFFn(['lr', 'rl'].indexOf(state.dagMode) !== -1, state.dagMode === 'rl');\n var fyFn = getFFn(['td', 'bu'].indexOf(state.dagMode) !== -1, state.dagMode === 'td');\n var fzFn = getFFn(['zin', 'zout'].indexOf(state.dagMode) !== -1, state.dagMode === 'zout');\n state.graphData.nodes.filter(state.dagNodeFilter).forEach(function (node) {\n node.fx = fxFn(node);\n node.fy = fyFn(node);\n node.fz = fzFn(node);\n });\n } // Use radial force for radial dags\n\n\n state.d3ForceLayout.force('dagRadial', ['radialin', 'radialout'].indexOf(state.dagMode) !== -1 ? forceRadial(function (node) {\n var nodeDepth = nodeDepths[node[state.nodeId]] || -1;\n return (state.dagMode === 'radialin' ? maxDepth - nodeDepth : nodeDepth) * dagLevelDistance;\n }).strength(function (node) {\n return state.dagNodeFilter(node) ? 1 : 0;\n }) : null);\n } else {\n // ngraph\n var _graph = ngraph.graph();\n\n state.graphData.nodes.forEach(function (node) {\n _graph.addNode(node[state.nodeId]);\n });\n state.graphData.links.forEach(function (link) {\n _graph.addLink(link.source, link.target);\n });\n layout = ngraph.forcelayout(_graph, _objectSpread2({\n dimensions: state.numDimensions\n }, state.ngraphPhysics));\n layout.graph = _graph; // Attach graph reference to layout\n }\n\n for (var i = 0; i < state.warmupTicks && !(isD3Sim && state.d3AlphaMin > 0 && state.d3ForceLayout.alpha() < state.d3AlphaMin); i++) {\n layout[isD3Sim ? \"tick\" : \"step\"]();\n } // Initial ticks before starting to render\n\n\n state.layout = layout;\n this.resetCountdown();\n }\n\n state.engineRunning = true; // resume simulation\n\n state.onFinishUpdate();\n }\n});\n\nfunction fromKapsule (kapsule) {\n var baseClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Object;\n var initKapsuleWithSelf = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var FromKapsule = /*#__PURE__*/function (_baseClass) {\n _inherits(FromKapsule, _baseClass);\n\n var _super = _createSuper(FromKapsule);\n\n function FromKapsule() {\n var _this;\n\n _classCallCheck(this, FromKapsule);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.__kapsuleInstance = kapsule().apply(void 0, [].concat(_toConsumableArray(initKapsuleWithSelf ? [_assertThisInitialized(_this)] : []), args));\n return _this;\n }\n\n return FromKapsule;\n }(baseClass); // attach kapsule props/methods to class prototype\n\n\n Object.keys(kapsule()).forEach(function (m) {\n return FromKapsule.prototype[m] = function () {\n var _this$__kapsuleInstan;\n\n var returnVal = (_this$__kapsuleInstan = this.__kapsuleInstance)[m].apply(_this$__kapsuleInstan, arguments);\n\n return returnVal === this.__kapsuleInstance ? this // chain based on this class, not the kapsule obj\n : returnVal;\n };\n });\n return FromKapsule;\n}\n\nvar three = window.THREE ? window.THREE : {\n Group: Group\n}; // Prefer consumption from global THREE, if exists\nvar threeForcegraph = fromKapsule(ForceGraph, three.Group, true);\n\nexport default threeForcegraph;\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","module.exports = function eventify(subject) {\n validateSubject(subject);\n\n var eventsStorage = createEventsStorage(subject);\n subject.on = eventsStorage.on;\n subject.off = eventsStorage.off;\n subject.fire = eventsStorage.fire;\n return subject;\n};\n\nfunction createEventsStorage(subject) {\n // Store all event listeners to this hash. Key is event name, value is array\n // of callback records.\n //\n // A callback record consists of callback function and its optional context:\n // { 'eventName' => [{callback: function, ctx: object}] }\n var registeredEvents = Object.create(null);\n\n return {\n on: function (eventName, callback, ctx) {\n if (typeof callback !== 'function') {\n throw new Error('callback is expected to be a function');\n }\n var handlers = registeredEvents[eventName];\n if (!handlers) {\n handlers = registeredEvents[eventName] = [];\n }\n handlers.push({callback: callback, ctx: ctx});\n\n return subject;\n },\n\n off: function (eventName, callback) {\n var wantToRemoveAll = (typeof eventName === 'undefined');\n if (wantToRemoveAll) {\n // Killing old events storage should be enough in this case:\n registeredEvents = Object.create(null);\n return subject;\n }\n\n if (registeredEvents[eventName]) {\n var deleteAllCallbacksForEvent = (typeof callback !== 'function');\n if (deleteAllCallbacksForEvent) {\n delete registeredEvents[eventName];\n } else {\n var callbacks = registeredEvents[eventName];\n for (var i = 0; i < callbacks.length; ++i) {\n if (callbacks[i].callback === callback) {\n callbacks.splice(i, 1);\n }\n }\n }\n }\n\n return subject;\n },\n\n fire: function (eventName) {\n var callbacks = registeredEvents[eventName];\n if (!callbacks) {\n return subject;\n }\n\n var fireArguments;\n if (arguments.length > 1) {\n fireArguments = Array.prototype.splice.call(arguments, 1);\n }\n for(var i = 0; i < callbacks.length; ++i) {\n var callbackInfo = callbacks[i];\n callbackInfo.callback.apply(callbackInfo.ctx, fireArguments);\n }\n\n return subject;\n }\n };\n}\n\nfunction validateSubject(subject) {\n if (!subject) {\n throw new Error('Eventify cannot use falsy object as events subject');\n }\n var reservedWords = ['on', 'fire', 'off'];\n for (var i = 0; i < reservedWords.length; ++i) {\n if (subject.hasOwnProperty(reservedWords[i])) {\n throw new Error(\"Subject cannot be eventified, since it already has property '\" + reservedWords[i] + \"'\");\n }\n }\n}\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import { nanoid } from 'nanoid/non-secure';\nimport BaseRouter from './BaseRouter';\nimport type {\n NavigationState,\n CommonNavigationAction,\n Router,\n DefaultRouterOptions,\n Route,\n ParamListBase,\n} from './types';\n\nexport type StackActionType =\n | {\n type: 'REPLACE';\n payload: { name: string; key?: string | undefined; params?: object };\n source?: string;\n target?: string;\n }\n | {\n type: 'PUSH';\n payload: { name: string; key?: string | undefined; params?: object };\n source?: string;\n target?: string;\n }\n | {\n type: 'POP';\n payload: { count: number };\n source?: string;\n target?: string;\n }\n | {\n type: 'POP_TO_TOP';\n source?: string;\n target?: string;\n };\n\nexport type StackRouterOptions = DefaultRouterOptions;\n\nexport type StackNavigationState<\n ParamList extends ParamListBase\n> = NavigationState<ParamList> & {\n /**\n * Type of the router, in this case, it's stack.\n */\n type: 'stack';\n};\n\nexport type StackActionHelpers<ParamList extends ParamListBase> = {\n /**\n * Replace the current route with a new one.\n *\n * @param name Route name of the new route.\n * @param [params] Params object for the new route.\n */\n replace<RouteName extends keyof ParamList>(\n ...args: undefined extends ParamList[RouteName]\n ? [RouteName] | [RouteName, ParamList[RouteName]]\n : [RouteName, ParamList[RouteName]]\n ): void;\n\n /**\n * Push a new screen onto the stack.\n *\n * @param name Name of the route for the tab.\n * @param [params] Params object for the route.\n */\n push<RouteName extends keyof ParamList>(\n ...args: undefined extends ParamList[RouteName]\n ? [RouteName] | [RouteName, ParamList[RouteName]]\n : [RouteName, ParamList[RouteName]]\n ): void;\n\n /**\n * Pop a screen from the stack.\n */\n pop(count?: number): void;\n\n /**\n * Pop to the first route in the stack, dismissing all other screens.\n */\n popToTop(): void;\n};\n\nexport const StackActions = {\n replace(name: string, params?: object): StackActionType {\n return { type: 'REPLACE', payload: { name, params } };\n },\n push(name: string, params?: object): StackActionType {\n return { type: 'PUSH', payload: { name, params } };\n },\n pop(count: number = 1): StackActionType {\n return { type: 'POP', payload: { count } };\n },\n popToTop(): StackActionType {\n return { type: 'POP_TO_TOP' };\n },\n};\n\nexport default function StackRouter(options: StackRouterOptions) {\n const router: Router<\n StackNavigationState<ParamListBase>,\n CommonNavigationAction | StackActionType\n > = {\n ...BaseRouter,\n\n type: 'stack',\n\n getInitialState({ routeNames, routeParamList }) {\n const initialRouteName =\n options.initialRouteName !== undefined &&\n routeNames.includes(options.initialRouteName)\n ? options.initialRouteName\n : routeNames[0];\n\n return {\n stale: false,\n type: 'stack',\n key: `stack-${nanoid()}`,\n index: 0,\n routeNames,\n routes: [\n {\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName],\n },\n ],\n };\n },\n\n getRehydratedState(partialState, { routeNames, routeParamList }) {\n let state = partialState;\n\n if (state.stale === false) {\n return state;\n }\n\n const routes = state.routes\n .filter((route) => routeNames.includes(route.name))\n .map(\n (route) =>\n ({\n ...route,\n key: route.key || `${route.name}-${nanoid()}`,\n params:\n routeParamList[route.name] !== undefined\n ? {\n ...routeParamList[route.name],\n ...route.params,\n }\n : route.params,\n } as Route<string>)\n );\n\n if (routes.length === 0) {\n const initialRouteName =\n options.initialRouteName !== undefined\n ? options.initialRouteName\n : routeNames[0];\n\n routes.push({\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName],\n });\n }\n\n return {\n stale: false,\n type: 'stack',\n key: `stack-${nanoid()}`,\n index: routes.length - 1,\n routeNames,\n routes,\n };\n },\n\n getStateForRouteNamesChange(state, { routeNames, routeParamList }) {\n const routes = state.routes.filter((route) =>\n routeNames.includes(route.name)\n );\n\n if (routes.length === 0) {\n const initialRouteName =\n options.initialRouteName !== undefined &&\n routeNames.includes(options.initialRouteName)\n ? options.initialRouteName\n : routeNames[0];\n\n routes.push({\n key: `${initialRouteName}-${nanoid()}`,\n name: initialRouteName,\n params: routeParamList[initialRouteName],\n });\n }\n\n return {\n ...state,\n routeNames,\n routes,\n index: Math.min(state.index, routes.length - 1),\n };\n },\n\n getStateForRouteFocus(state, key) {\n const index = state.routes.findIndex((r) => r.key === key);\n\n if (index === -1 || index === state.index) {\n return state;\n }\n\n return {\n ...state,\n index,\n routes: state.routes.slice(0, index + 1),\n };\n },\n\n getStateForAction(state, action, options) {\n const { routeParamList } = options;\n\n switch (action.type) {\n case 'REPLACE': {\n const index =\n action.target === state.key && action.source\n ? state.routes.findIndex((r) => r.key === action.source)\n : state.index;\n\n if (index === -1) {\n return null;\n }\n\n const { name, key, params } = action.payload;\n\n if (!state.routeNames.includes(name)) {\n return null;\n }\n\n return {\n ...state,\n routes: state.routes.map((route, i) =>\n i === index\n ? {\n key: key !== undefined ? key : `${name}-${nanoid()}`,\n name,\n params:\n routeParamList[name] !== undefined\n ? {\n ...routeParamList[name],\n ...params,\n }\n : params,\n }\n : route\n ),\n };\n }\n\n case 'PUSH':\n if (state.routeNames.includes(action.payload.name)) {\n const getId = options.routeGetIdList[action.payload.name];\n const id = getId?.({ params: action.payload.params });\n\n const route =\n action.payload.name && action.payload.key\n ? state.routes.find(\n (route) =>\n route.name === action.payload.name &&\n route.key === action.payload.key\n )\n : id\n ? state.routes.find(\n (route) =>\n route.name === action.payload.name &&\n id === getId?.({ params: route.params })\n )\n : undefined;\n\n let routes: Route<string>[];\n\n if (route) {\n routes = state.routes.filter((r) => r.key !== route.key);\n routes.push({\n ...route,\n params:\n action.payload.params !== undefined\n ? {\n ...route.params,\n ...action.payload.params,\n }\n : route.params,\n });\n } else {\n routes = [\n ...state.routes,\n {\n key:\n action.payload.key ?? `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n params:\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params,\n },\n ];\n }\n\n return {\n ...state,\n index: routes.length - 1,\n routes,\n };\n }\n\n return null;\n\n case 'POP': {\n const index =\n action.target === state.key && action.source\n ? state.routes.findIndex((r) => r.key === action.source)\n : state.index;\n\n if (index > 0) {\n const count = Math.max(index - action.payload.count + 1, 1);\n const routes = state.routes\n .slice(0, count)\n .concat(state.routes.slice(index + 1));\n\n return {\n ...state,\n index: routes.length - 1,\n routes,\n };\n }\n\n return null;\n }\n\n case 'POP_TO_TOP':\n return router.getStateForAction(\n state,\n {\n type: 'POP',\n payload: { count: state.routes.length - 1 },\n },\n options\n );\n\n case 'NAVIGATE':\n if (\n action.payload.name !== undefined &&\n !state.routeNames.includes(action.payload.name)\n ) {\n return null;\n }\n\n if (action.payload.key || action.payload.name) {\n // If the route already exists, navigate to that\n let index = -1;\n\n const getId =\n // `getId` and `key` can't be used together\n action.payload.key === undefined &&\n action.payload.name !== undefined\n ? options.routeGetIdList[action.payload.name]\n : undefined;\n const id = getId?.({ params: action.payload.params });\n\n if (id) {\n index = state.routes.findIndex(\n (route) =>\n route.name === action.payload.name &&\n id === getId?.({ params: route.params })\n );\n } else if (\n (state.routes[state.index].name === action.payload.name &&\n action.payload.key === undefined) ||\n state.routes[state.index].key === action.payload.key\n ) {\n index = state.index;\n } else {\n for (let i = state.routes.length - 1; i >= 0; i--) {\n if (\n (state.routes[i].name === action.payload.name &&\n action.payload.key === undefined) ||\n state.routes[i].key === action.payload.key\n ) {\n index = i;\n break;\n }\n }\n }\n\n if (\n index === -1 &&\n action.payload.key &&\n action.payload.name === undefined\n ) {\n return null;\n }\n\n if (index === -1 && action.payload.name !== undefined) {\n const routes = [\n ...state.routes,\n {\n key:\n action.payload.key ?? `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n params:\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params,\n },\n ];\n\n return {\n ...state,\n routes,\n index: routes.length - 1,\n };\n }\n\n const route = state.routes[index];\n\n let params;\n\n if (action.payload.merge === false) {\n params =\n routeParamList[route.name] !== undefined\n ? {\n ...routeParamList[route.name],\n ...action.payload.params,\n }\n : action.payload.params;\n } else {\n params = action.payload.params\n ? {\n ...route.params,\n ...action.payload.params,\n }\n : route.params;\n }\n\n return {\n ...state,\n index,\n routes: [\n ...state.routes.slice(0, index),\n params !== route.params\n ? { ...route, params }\n : state.routes[index],\n ],\n };\n }\n\n return null;\n\n case 'GO_BACK':\n if (state.index > 0) {\n return router.getStateForAction(\n state,\n {\n type: 'POP',\n payload: { count: 1 },\n target: action.target,\n source: action.source,\n },\n options\n );\n }\n\n return null;\n\n default:\n return BaseRouter.getStateForAction(state, action);\n }\n },\n\n actionCreators: StackActions,\n };\n\n return router;\n}\n","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _curry2 = /*#__PURE__*/require('./_curry2');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}\nmodule.exports = _curry3;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nmodule.exports = Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","var _isArray = /*#__PURE__*/require('./_isArray');\n\n/**\n * This checks whether a function has a [methodname] function. If it isn't an\n * array it will execute that function otherwise it will default to the ramda\n * implementation.\n *\n * @private\n * @param {Function} fn ramda implemtation\n * @param {String} methodname property to check for a custom implementation\n * @return {Object} Whatever the return value of the method is.\n */\n\n\nfunction _checkForMethod(methodname, fn) {\n return function () {\n var length = arguments.length;\n if (length === 0) {\n return fn();\n }\n var obj = arguments[length - 1];\n return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));\n };\n}\nmodule.exports = _checkForMethod;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar _has = /*#__PURE__*/require('./internal/_has');\n\nvar _isArguments = /*#__PURE__*/require('./internal/_isArguments');\n\n// cover IE < 9 keys issues\n\n\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar _keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n} : function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n};\nvar keys = /*#__PURE__*/_curry1(_keys);\nmodule.exports = keys;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nfunction isScreenReaderEnabled() {\n return new Promise(function (resolve, reject) {\n resolve(true);\n });\n}\n\nvar prefersReducedMotionMedia = canUseDOM && typeof window.matchMedia === 'function' ? window.matchMedia('(prefers-reduced-motion: reduce)') : null;\n\nfunction isReduceMotionEnabled() {\n return new Promise(function (resolve, reject) {\n resolve(prefersReducedMotionMedia ? prefersReducedMotionMedia.matches : true);\n });\n}\n\nfunction addChangeListener(fn) {\n if (prefersReducedMotionMedia != null) {\n prefersReducedMotionMedia.addEventListener != null ? prefersReducedMotionMedia.addEventListener('change', fn) : prefersReducedMotionMedia.addListener(fn);\n }\n}\n\nfunction removeChangeListener(fn) {\n if (prefersReducedMotionMedia != null) {\n prefersReducedMotionMedia.removeEventListener != null ? prefersReducedMotionMedia.removeEventListener('change', fn) : prefersReducedMotionMedia.removeListener(fn);\n }\n}\n\nvar handlers = {};\nvar AccessibilityInfo = {\n /**\n * Query whether a screen reader is currently enabled.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when a screen reader is enabled and `false` otherwise.\n */\n isScreenReaderEnabled: isScreenReaderEnabled,\n\n /**\n * Query whether the user prefers reduced motion.\n *\n * Returns a promise which resolves to a boolean.\n * The result is `true` when a screen reader is enabled and `false` otherwise.\n */\n isReduceMotionEnabled: isReduceMotionEnabled,\n\n /**\n * Deprecated\n */\n fetch: isScreenReaderEnabled,\n\n /**\n * Add an event handler. Supported events: reduceMotionChanged\n */\n addEventListener: function addEventListener(eventName, handler) {\n if (eventName === 'reduceMotionChanged') {\n if (!prefersReducedMotionMedia) {\n return;\n }\n\n var listener = function listener(event) {\n handler(event.matches);\n };\n\n addChangeListener(listener);\n handlers[handler] = listener;\n }\n\n return {\n remove: function remove() {\n return AccessibilityInfo.removeEventListener(eventName, handler);\n }\n };\n },\n\n /**\n * Set accessibility focus to a react component.\n */\n setAccessibilityFocus: function setAccessibilityFocus(reactTag) {},\n\n /**\n * Post a string to be announced by the screen reader.\n */\n announceForAccessibility: function announceForAccessibility(announcement) {},\n\n /**\n * Remove an event handler.\n */\n removeEventListener: function removeEventListener(eventName, handler) {\n if (eventName === 'reduceMotionChanged') {\n var listener = handlers[handler];\n\n if (!listener || !prefersReducedMotionMedia) {\n return;\n }\n\n removeChangeListener(listener);\n }\n\n return;\n }\n};\nexport default AccessibilityInfo;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar Alert = /*#__PURE__*/function () {\n function Alert() {}\n\n Alert.alert = function alert() {};\n\n return Alert;\n}();\n\nexport default Alert;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nfunction getQuery() {\n return canUseDOM && window.matchMedia != null ? window.matchMedia('(prefers-color-scheme: dark)') : null;\n}\n\nvar query = getQuery();\nvar listenerMapping = new WeakMap();\nvar Appearance = {\n getColorScheme: function getColorScheme() {\n return query && query.matches ? 'dark' : 'light';\n },\n addChangeListener: function addChangeListener(listener) {\n var mappedListener = listenerMapping.get(listener);\n\n if (!mappedListener) {\n mappedListener = function mappedListener(_ref) {\n var matches = _ref.matches;\n listener({\n colorScheme: matches ? 'dark' : 'light'\n });\n };\n\n listenerMapping.set(listener, mappedListener);\n }\n\n if (query) {\n query.addListener(mappedListener);\n }\n },\n removeChangeListener: function removeChangeListener(listener) {\n var mappedListener = listenerMapping.get(listener);\n\n if (mappedListener) {\n if (query) {\n query.removeListener(mappedListener);\n }\n\n listenerMapping.delete(listener);\n }\n }\n};\nexport default Appearance;","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport findIndex from 'array-find-index';\nimport invariant from 'fbjs/lib/invariant'; // Android 4.4 browser\n\nvar isPrefixed = canUseDOM && !document.hasOwnProperty('hidden') && document.hasOwnProperty('webkitHidden');\nvar EVENT_TYPES = ['change', 'memoryWarning'];\nvar VISIBILITY_CHANGE_EVENT = isPrefixed ? 'webkitvisibilitychange' : 'visibilitychange';\nvar VISIBILITY_STATE_PROPERTY = isPrefixed ? 'webkitVisibilityState' : 'visibilityState';\nvar AppStates = {\n BACKGROUND: 'background',\n ACTIVE: 'active'\n};\nvar listeners = [];\n\nvar AppState = /*#__PURE__*/function () {\n function AppState() {}\n\n AppState.addEventListener = function addEventListener(type, handler) {\n if (AppState.isAvailable) {\n invariant(EVENT_TYPES.indexOf(type) !== -1, 'Trying to subscribe to unknown event: \"%s\"', type);\n\n if (type === 'change') {\n var callback = function callback() {\n return handler(AppState.currentState);\n };\n\n listeners.push([handler, callback]);\n document.addEventListener(VISIBILITY_CHANGE_EVENT, callback, false);\n }\n }\n };\n\n AppState.removeEventListener = function removeEventListener(type, handler) {\n if (AppState.isAvailable) {\n invariant(EVENT_TYPES.indexOf(type) !== -1, 'Trying to remove listener for unknown event: \"%s\"', type);\n\n if (type === 'change') {\n var listenerIndex = findIndex(listeners, function (pair) {\n return pair[0] === handler;\n });\n invariant(listenerIndex !== -1, 'Trying to remove AppState listener for unregistered handler');\n var callback = listeners[listenerIndex][1];\n document.removeEventListener(VISIBILITY_CHANGE_EVENT, callback, false);\n listeners.splice(listenerIndex, 1);\n }\n }\n };\n\n _createClass(AppState, null, [{\n key: \"currentState\",\n get: function get() {\n if (!AppState.isAvailable) {\n return AppStates.ACTIVE;\n }\n\n switch (document[VISIBILITY_STATE_PROPERTY]) {\n case 'hidden':\n case 'prerender':\n case 'unloaded':\n return AppStates.BACKGROUND;\n\n default:\n return AppStates.ACTIVE;\n }\n }\n }]);\n\n return AppState;\n}();\n\nAppState.isAvailable = canUseDOM && document[VISIBILITY_STATE_PROPERTY];\nexport { AppState as default };","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar clipboardAvailable;\n\nvar Clipboard = /*#__PURE__*/function () {\n function Clipboard() {}\n\n Clipboard.isAvailable = function isAvailable() {\n if (clipboardAvailable === undefined) {\n clipboardAvailable = typeof document.queryCommandSupported === 'function' && document.queryCommandSupported('copy');\n }\n\n return clipboardAvailable;\n };\n\n Clipboard.getString = function getString() {\n return Promise.resolve('');\n };\n\n Clipboard.setString = function setString(text) {\n var success = false;\n var body = document.body;\n\n if (body) {\n // add the text to a hidden node\n var node = document.createElement('span');\n node.textContent = text;\n node.style.opacity = '0';\n node.style.position = 'absolute';\n node.style.whiteSpace = 'pre-wrap';\n node.style.userSelect = 'auto';\n body.appendChild(node); // select the text\n\n var selection = window.getSelection();\n selection.removeAllRanges();\n var range = document.createRange();\n range.selectNodeContents(node);\n selection.addRange(range); // attempt to copy\n\n try {\n document.execCommand('copy');\n success = true;\n } catch (e) {} // remove selection and node\n\n\n selection.removeAllRanges();\n body.removeChild(node);\n }\n\n return success;\n };\n\n return Clipboard;\n}();\n\nexport { Clipboard as default };","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport Dimensions from '../Dimensions';\nvar DeviceInfo = {\n Dimensions: {\n get windowPhysicalPixels() {\n var _Dimensions$get = Dimensions.get('window'),\n width = _Dimensions$get.width,\n height = _Dimensions$get.height,\n fontScale = _Dimensions$get.fontScale,\n scale = _Dimensions$get.scale;\n\n return {\n width: width * scale,\n height: height * scale,\n scale: scale,\n fontScale: fontScale\n };\n },\n\n get screenPhysicalPixels() {\n var _Dimensions$get2 = Dimensions.get('screen'),\n width = _Dimensions$get2.width,\n height = _Dimensions$get2.height,\n fontScale = _Dimensions$get2.fontScale,\n scale = _Dimensions$get2.scale;\n\n return {\n width: width * scale,\n height: height * scale,\n scale: scale,\n fontScale: fontScale\n };\n }\n\n },\n\n get locale() {\n if (canUseDOM) {\n if (navigator.languages) {\n return navigator.languages[0];\n } else {\n return navigator.language;\n }\n }\n },\n\n get totalMemory() {\n // $FlowIssue deviceMemory not defined in navigator\n return canUseDOM ? navigator.deviceMemory : undefined;\n },\n\n get userAgent() {\n return canUseDOM ? navigator.userAgent : '';\n }\n\n};\nexport default DeviceInfo;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport Platform from '../../../exports/Platform';\nimport UIManager from '../../../exports/UIManager';\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nfunction configureNext(config, onAnimationDidEnd) {\n if (!Platform.isTesting) {\n UIManager.configureNextLayoutAnimation(config, onAnimationDidEnd !== null && onAnimationDidEnd !== void 0 ? onAnimationDidEnd : function () {}, function () {}\n /* unused onError */\n );\n }\n}\n\nfunction create(duration, type, property) {\n return {\n duration: duration,\n create: {\n type: type,\n property: property\n },\n update: {\n type: type\n },\n delete: {\n type: type,\n property: property\n }\n };\n}\n\nvar Presets = {\n easeInEaseOut: create(300, 'easeInEaseOut', 'opacity'),\n linear: create(500, 'linear', 'opacity'),\n spring: {\n duration: 700,\n create: {\n type: 'linear',\n property: 'opacity'\n },\n update: {\n type: 'spring',\n springDamping: 0.4\n },\n delete: {\n type: 'linear',\n property: 'opacity'\n }\n }\n};\n/**\n * Automatically animates views to their new positions when the\n * next layout happens.\n *\n * A common way to use this API is to call it before calling `setState`.\n *\n * Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:\n *\n * UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);\n */\n\nvar LayoutAnimation = {\n /**\n * Schedules an animation to happen on the next layout.\n *\n * @param config Specifies animation properties:\n *\n * - `duration` in milliseconds\n * - `create`, `AnimationConfig` for animating in new views\n * - `update`, `AnimationConfig` for animating views that have been updated\n *\n * @param onAnimationDidEnd Called when the animation finished.\n * Only supported on iOS.\n * @param onError Called on error. Only supported on iOS.\n */\n configureNext: configureNext,\n\n /**\n * Helper for creating a config for `configureNext`.\n */\n create: create,\n Types: Object.freeze({\n spring: 'spring',\n linear: 'linear',\n easeInEaseOut: 'easeInEaseOut',\n easeIn: 'easeIn',\n easeOut: 'easeOut',\n keyboard: 'keyboard'\n }),\n Properties: Object.freeze({\n opacity: 'opacity',\n scaleX: 'scaleX',\n scaleY: 'scaleY',\n scaleXY: 'scaleXY'\n }),\n checkConfig: function checkConfig() {\n console.error('LayoutAnimation.checkConfig(...) has been disabled.');\n },\n Presets: Presets,\n easeInEaseOut: configureNext.bind(null, Presets.easeInEaseOut),\n linear: configureNext.bind(null, Presets.linear),\n spring: configureNext.bind(null, Presets.spring)\n};\nexport default LayoutAnimation;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport LayoutAnimation from '../../vendor/react-native/LayoutAnimation';\nexport default LayoutAnimation;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport invariant from 'fbjs/lib/invariant';\nvar initialURL = canUseDOM ? window.location.href : '';\n\nvar Linking = /*#__PURE__*/function () {\n function Linking() {\n var _this = this;\n\n this._eventCallbacks = {};\n\n this.addEventListener = function (event, callback) {\n if (!_this._eventCallbacks[event]) {\n _this._eventCallbacks[event] = [callback];\n return;\n }\n\n _this._eventCallbacks[event].push(callback);\n };\n\n this.removeEventListener = function (event, callback) {\n var callbacks = _this._eventCallbacks[event];\n var filteredCallbacks = callbacks.filter(function (c) {\n return c.toString() !== callback.toString();\n });\n _this._eventCallbacks[event] = filteredCallbacks;\n };\n }\n\n var _proto = Linking.prototype;\n\n _proto._dispatchEvent = function _dispatchEvent(event) {\n for (var _len = arguments.length, data = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n data[_key - 1] = arguments[_key];\n }\n\n var listeners = this._eventCallbacks[event];\n\n if (listeners != null && Array.isArray(listeners)) {\n listeners.map(function (listener) {\n listener.apply(void 0, data);\n });\n }\n }\n /**\n * Adds a event listener for the specified event. The callback will be called when the\n * said event is dispatched.\n */\n ;\n\n _proto.canOpenURL = function canOpenURL() {\n return Promise.resolve(true);\n };\n\n _proto.getInitialURL = function getInitialURL() {\n return Promise.resolve(initialURL);\n }\n /**\n * Try to open the given url in a secure fashion. The method returns a Promise object.\n * If the url opens, the promise is resolved. If not, the promise is rejected.\n * Dispatches the `onOpen` event if `url` is opened successfully\n */\n ;\n\n _proto.openURL = function openURL(url) {\n try {\n open(url);\n\n this._dispatchEvent('onOpen', url);\n\n return Promise.resolve();\n } catch (e) {\n return Promise.reject(e);\n }\n };\n\n _proto._validateURL = function _validateURL(url) {\n invariant(typeof url === 'string', 'Invalid URL: should be a string. Was: ' + url);\n invariant(url, 'Invalid URL: cannot be empty');\n };\n\n return Linking;\n}();\n\nvar open = function open(url) {\n if (canUseDOM) {\n var urlToOpen = new URL(url, window.location).toString();\n window.open(urlToOpen, '_blank', 'noopener');\n }\n};\n\nexport default new Linking();","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport NativeEventEmitter from '../../vendor/react-native/NativeEventEmitter';\nexport default NativeEventEmitter;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n */\nvar TouchHistoryMath = {\n /**\n * This code is optimized and not intended to look beautiful. This allows\n * computing of touch centroids that have moved after `touchesChangedAfter`\n * timeStamp. You can compute the current centroid involving all touches\n * moves after `touchesChangedAfter`, or you can compute the previous\n * centroid of all touches that were moved after `touchesChangedAfter`.\n *\n * @param {TouchHistoryMath} touchHistory Standard Responder touch track\n * data.\n * @param {number} touchesChangedAfter timeStamp after which moved touches\n * are considered \"actively moving\" - not just \"active\".\n * @param {boolean} isXAxis Consider `x` dimension vs. `y` dimension.\n * @param {boolean} ofCurrent Compute current centroid for actively moving\n * touches vs. previous centroid of now actively moving touches.\n * @return {number} value of centroid in specified dimension.\n */\n centroidDimension: function centroidDimension(touchHistory, touchesChangedAfter, isXAxis, ofCurrent) {\n var touchBank = touchHistory.touchBank;\n var total = 0;\n var count = 0;\n var oneTouchData = touchHistory.numberActiveTouches === 1 ? touchHistory.touchBank[touchHistory.indexOfSingleActiveTouch] : null;\n\n if (oneTouchData !== null) {\n if (oneTouchData.touchActive && oneTouchData.currentTimeStamp > touchesChangedAfter) {\n total += ofCurrent && isXAxis ? oneTouchData.currentPageX : ofCurrent && !isXAxis ? oneTouchData.currentPageY : !ofCurrent && isXAxis ? oneTouchData.previousPageX : oneTouchData.previousPageY;\n count = 1;\n }\n } else {\n for (var i = 0; i < touchBank.length; i++) {\n var touchTrack = touchBank[i];\n\n if (touchTrack !== null && touchTrack !== undefined && touchTrack.touchActive && touchTrack.currentTimeStamp >= touchesChangedAfter) {\n var toAdd = void 0; // Yuck, program temporarily in invalid state.\n\n if (ofCurrent && isXAxis) {\n toAdd = touchTrack.currentPageX;\n } else if (ofCurrent && !isXAxis) {\n toAdd = touchTrack.currentPageY;\n } else if (!ofCurrent && isXAxis) {\n toAdd = touchTrack.previousPageX;\n } else {\n toAdd = touchTrack.previousPageY;\n }\n\n total += toAdd;\n count++;\n }\n }\n }\n\n return count > 0 ? total / count : TouchHistoryMath.noCentroid;\n },\n currentCentroidXOfTouchesChangedAfter: function currentCentroidXOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {\n return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, true, // isXAxis\n true // ofCurrent\n );\n },\n currentCentroidYOfTouchesChangedAfter: function currentCentroidYOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {\n return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, false, // isXAxis\n true // ofCurrent\n );\n },\n previousCentroidXOfTouchesChangedAfter: function previousCentroidXOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {\n return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, true, // isXAxis\n false // ofCurrent\n );\n },\n previousCentroidYOfTouchesChangedAfter: function previousCentroidYOfTouchesChangedAfter(touchHistory, touchesChangedAfter) {\n return TouchHistoryMath.centroidDimension(touchHistory, touchesChangedAfter, false, // isXAxis\n false // ofCurrent\n );\n },\n currentCentroidX: function currentCentroidX(touchHistory) {\n return TouchHistoryMath.centroidDimension(touchHistory, 0, // touchesChangedAfter\n true, // isXAxis\n true // ofCurrent\n );\n },\n currentCentroidY: function currentCentroidY(touchHistory) {\n return TouchHistoryMath.centroidDimension(touchHistory, 0, // touchesChangedAfter\n false, // isXAxis\n true // ofCurrent\n );\n },\n noCentroid: -1\n};\nexport default TouchHistoryMath;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nimport InteractionManager from '../../../exports/InteractionManager';\nimport TouchHistoryMath from '../TouchHistoryMath';\nvar currentCentroidXOfTouchesChangedAfter = TouchHistoryMath.currentCentroidXOfTouchesChangedAfter;\nvar currentCentroidYOfTouchesChangedAfter = TouchHistoryMath.currentCentroidYOfTouchesChangedAfter;\nvar previousCentroidXOfTouchesChangedAfter = TouchHistoryMath.previousCentroidXOfTouchesChangedAfter;\nvar previousCentroidYOfTouchesChangedAfter = TouchHistoryMath.previousCentroidYOfTouchesChangedAfter;\nvar currentCentroidX = TouchHistoryMath.currentCentroidX;\nvar currentCentroidY = TouchHistoryMath.currentCentroidY;\n/**\n * `PanResponder` reconciles several touches into a single gesture. It makes\n * single-touch gestures resilient to extra touches, and can be used to\n * recognize simple multi-touch gestures.\n *\n * By default, `PanResponder` holds an `InteractionManager` handle to block\n * long-running JS events from interrupting active gestures.\n *\n * It provides a predictable wrapper of the responder handlers provided by the\n * [gesture responder system](docs/gesture-responder-system.html).\n * For each handler, it provides a new `gestureState` object alongside the\n * native event object:\n *\n * ```\n * onPanResponderMove: (event, gestureState) => {}\n * ```\n *\n * A native event is a synthetic touch event with the following form:\n *\n * - `nativeEvent`\n * + `changedTouches` - Array of all touch events that have changed since the last event\n * + `identifier` - The ID of the touch\n * + `locationX` - The X position of the touch, relative to the element\n * + `locationY` - The Y position of the touch, relative to the element\n * + `pageX` - The X position of the touch, relative to the root element\n * + `pageY` - The Y position of the touch, relative to the root element\n * + `target` - The node id of the element receiving the touch event\n * + `timestamp` - A time identifier for the touch, useful for velocity calculation\n * + `touches` - Array of all current touches on the screen\n *\n * A `gestureState` object has the following:\n *\n * - `stateID` - ID of the gestureState- persisted as long as there at least\n * one touch on screen\n * - `moveX` - the latest screen coordinates of the recently-moved touch\n * - `moveY` - the latest screen coordinates of the recently-moved touch\n * - `x0` - the screen coordinates of the responder grant\n * - `y0` - the screen coordinates of the responder grant\n * - `dx` - accumulated distance of the gesture since the touch started\n * - `dy` - accumulated distance of the gesture since the touch started\n * - `vx` - current velocity of the gesture\n * - `vy` - current velocity of the gesture\n * - `numberActiveTouches` - Number of touches currently on screen\n *\n * ### Basic Usage\n *\n * ```\n * componentWillMount: function() {\n * this._panResponder = PanResponder.create({\n * // Ask to be the responder:\n * onStartShouldSetPanResponder: (evt, gestureState) => true,\n * onStartShouldSetPanResponderCapture: (evt, gestureState) => true,\n * onMoveShouldSetPanResponder: (evt, gestureState) => true,\n * onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,\n *\n * onPanResponderGrant: (evt, gestureState) => {\n * // The gesture has started. Show visual feedback so the user knows\n * // what is happening!\n *\n * // gestureState.d{x,y} will be set to zero now\n * },\n * onPanResponderMove: (evt, gestureState) => {\n * // The most recent move distance is gestureState.move{X,Y}\n *\n * // The accumulated gesture distance since becoming responder is\n * // gestureState.d{x,y}\n * },\n * onPanResponderTerminationRequest: (evt, gestureState) => true,\n * onPanResponderRelease: (evt, gestureState) => {\n * // The user has released all touches while this view is the\n * // responder. This typically means a gesture has succeeded\n * },\n * onPanResponderTerminate: (evt, gestureState) => {\n * // Another component has become the responder, so this gesture\n * // should be cancelled\n * },\n * onShouldBlockNativeResponder: (evt, gestureState) => {\n * // Returns whether this component should block native components from becoming the JS\n * // responder. Returns true by default. Is currently only supported on android.\n * return true;\n * },\n * });\n * },\n *\n * render: function() {\n * return (\n * <View {...this._panResponder.panHandlers} />\n * );\n * },\n *\n * ```\n *\n * ### Working Example\n *\n * To see it in action, try the\n * [PanResponder example in RNTester](https://github.com/facebook/react-native/blob/master/RNTester/js/PanResponderExample.js)\n */\n\nvar PanResponder = {\n /**\n *\n * A graphical explanation of the touch data flow:\n *\n * +----------------------------+ +--------------------------------+\n * | ResponderTouchHistoryStore | |TouchHistoryMath |\n * +----------------------------+ +----------+---------------------+\n * |Global store of touchHistory| |Allocation-less math util |\n * |including activeness, start | |on touch history (centroids |\n * |position, prev/cur position.| |and multitouch movement etc) |\n * | | | |\n * +----^-----------------------+ +----^---------------------------+\n * | |\n * | (records relevant history |\n * | of touches relevant for |\n * | implementing higher level |\n * | gestures) |\n * | |\n * +----+-----------------------+ +----|---------------------------+\n * | ResponderEventPlugin | | | Your App/Component |\n * +----------------------------+ +----|---------------------------+\n * |Negotiates which view gets | Low level | | High level |\n * |onResponderMove events. | events w/ | +-+-------+ events w/ |\n * |Also records history into | touchHistory| | Pan | multitouch + |\n * |ResponderTouchHistoryStore. +---------------->Responder+-----> accumulative|\n * +----------------------------+ attached to | | | distance and |\n * each event | +---------+ velocity. |\n * | |\n * | |\n * +--------------------------------+\n *\n *\n *\n * Gesture that calculates cumulative movement over time in a way that just\n * \"does the right thing\" for multiple touches. The \"right thing\" is very\n * nuanced. When moving two touches in opposite directions, the cumulative\n * distance is zero in each dimension. When two touches move in parallel five\n * pixels in the same direction, the cumulative distance is five, not ten. If\n * two touches start, one moves five in a direction, then stops and the other\n * touch moves fives in the same direction, the cumulative distance is ten.\n *\n * This logic requires a kind of processing of time \"clusters\" of touch events\n * so that two touch moves that essentially occur in parallel but move every\n * other frame respectively, are considered part of the same movement.\n *\n * Explanation of some of the non-obvious fields:\n *\n * - moveX/moveY: If no move event has been observed, then `(moveX, moveY)` is\n * invalid. If a move event has been observed, `(moveX, moveY)` is the\n * centroid of the most recently moved \"cluster\" of active touches.\n * (Currently all move have the same timeStamp, but later we should add some\n * threshold for what is considered to be \"moving\"). If a palm is\n * accidentally counted as a touch, but a finger is moving greatly, the palm\n * will move slightly, but we only want to count the single moving touch.\n * - x0/y0: Centroid location (non-cumulative) at the time of becoming\n * responder.\n * - dx/dy: Cumulative touch distance - not the same thing as sum of each touch\n * distance. Accounts for touch moves that are clustered together in time,\n * moving the same direction. Only valid when currently responder (otherwise,\n * it only represents the drag distance below the threshold).\n * - vx/vy: Velocity.\n */\n _initializeGestureState: function _initializeGestureState(gestureState) {\n gestureState.moveX = 0;\n gestureState.moveY = 0;\n gestureState.x0 = 0;\n gestureState.y0 = 0;\n gestureState.dx = 0;\n gestureState.dy = 0;\n gestureState.vx = 0;\n gestureState.vy = 0;\n gestureState.numberActiveTouches = 0; // All `gestureState` accounts for timeStamps up until:\n\n gestureState._accountsForMovesUpTo = 0;\n },\n\n /**\n * This is nuanced and is necessary. It is incorrect to continuously take all\n * active *and* recently moved touches, find the centroid, and track how that\n * result changes over time. Instead, we must take all recently moved\n * touches, and calculate how the centroid has changed just for those\n * recently moved touches, and append that change to an accumulator. This is\n * to (at least) handle the case where the user is moving three fingers, and\n * then one of the fingers stops but the other two continue.\n *\n * This is very different than taking all of the recently moved touches and\n * storing their centroid as `dx/dy`. For correctness, we must *accumulate\n * changes* in the centroid of recently moved touches.\n *\n * There is also some nuance with how we handle multiple moved touches in a\n * single event. With the way `ReactNativeEventEmitter` dispatches touches as\n * individual events, multiple touches generate two 'move' events, each of\n * them triggering `onResponderMove`. But with the way `PanResponder` works,\n * all of the gesture inference is performed on the first dispatch, since it\n * looks at all of the touches (even the ones for which there hasn't been a\n * native dispatch yet). Therefore, `PanResponder` does not call\n * `onResponderMove` passed the first dispatch. This diverges from the\n * typical responder callback pattern (without using `PanResponder`), but\n * avoids more dispatches than necessary.\n */\n _updateGestureStateOnMove: function _updateGestureStateOnMove(gestureState, touchHistory) {\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n gestureState.moveX = currentCentroidXOfTouchesChangedAfter(touchHistory, gestureState._accountsForMovesUpTo);\n gestureState.moveY = currentCentroidYOfTouchesChangedAfter(touchHistory, gestureState._accountsForMovesUpTo);\n var movedAfter = gestureState._accountsForMovesUpTo;\n var prevX = previousCentroidXOfTouchesChangedAfter(touchHistory, movedAfter);\n var x = currentCentroidXOfTouchesChangedAfter(touchHistory, movedAfter);\n var prevY = previousCentroidYOfTouchesChangedAfter(touchHistory, movedAfter);\n var y = currentCentroidYOfTouchesChangedAfter(touchHistory, movedAfter);\n var nextDX = gestureState.dx + (x - prevX);\n var nextDY = gestureState.dy + (y - prevY); // TODO: This must be filtered intelligently.\n\n var dt = touchHistory.mostRecentTimeStamp - gestureState._accountsForMovesUpTo;\n gestureState.vx = (nextDX - gestureState.dx) / dt;\n gestureState.vy = (nextDY - gestureState.dy) / dt;\n gestureState.dx = nextDX;\n gestureState.dy = nextDY;\n gestureState._accountsForMovesUpTo = touchHistory.mostRecentTimeStamp;\n },\n\n /**\n * @param {object} config Enhanced versions of all of the responder callbacks\n * that provide not only the typical `ResponderSyntheticEvent`, but also the\n * `PanResponder` gesture state. Simply replace the word `Responder` with\n * `PanResponder` in each of the typical `onResponder*` callbacks. For\n * example, the `config` object would look like:\n *\n * - `onMoveShouldSetPanResponder: (e, gestureState) => {...}`\n * - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}`\n * - `onStartShouldSetPanResponder: (e, gestureState) => {...}`\n * - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}`\n * - `onPanResponderReject: (e, gestureState) => {...}`\n * - `onPanResponderGrant: (e, gestureState) => {...}`\n * - `onPanResponderStart: (e, gestureState) => {...}`\n * - `onPanResponderEnd: (e, gestureState) => {...}`\n * - `onPanResponderRelease: (e, gestureState) => {...}`\n * - `onPanResponderMove: (e, gestureState) => {...}`\n * - `onPanResponderTerminate: (e, gestureState) => {...}`\n * - `onPanResponderTerminationRequest: (e, gestureState) => {...}`\n * - `onShouldBlockNativeResponder: (e, gestureState) => {...}`\n *\n * In general, for events that have capture equivalents, we update the\n * gestureState once in the capture phase and can use it in the bubble phase\n * as well.\n *\n * Be careful with onStartShould* callbacks. They only reflect updated\n * `gestureState` for start/end events that bubble/capture to the Node.\n * Once the node is the responder, you can rely on every start/end event\n * being processed by the gesture and `gestureState` being updated\n * accordingly. (numberActiveTouches) may not be totally accurate unless you\n * are the responder.\n */\n create: function create(config) {\n var interactionState = {\n handle: null,\n shouldCancelClick: false,\n timeout: null\n };\n var gestureState = {\n // Useful for debugging\n stateID: Math.random(),\n moveX: 0,\n moveY: 0,\n x0: 0,\n y0: 0,\n dx: 0,\n dy: 0,\n vx: 0,\n vy: 0,\n numberActiveTouches: 0,\n _accountsForMovesUpTo: 0\n };\n var panHandlers = {\n onStartShouldSetResponder: function onStartShouldSetResponder(event) {\n return config.onStartShouldSetPanResponder == null ? false : config.onStartShouldSetPanResponder(event, gestureState);\n },\n onMoveShouldSetResponder: function onMoveShouldSetResponder(event) {\n return config.onMoveShouldSetPanResponder == null ? false : config.onMoveShouldSetPanResponder(event, gestureState);\n },\n onStartShouldSetResponderCapture: function onStartShouldSetResponderCapture(event) {\n // TODO: Actually, we should reinitialize the state any time\n // touches.length increases from 0 active to > 0 active.\n if (event.nativeEvent.touches.length === 1) {\n PanResponder._initializeGestureState(gestureState);\n }\n\n gestureState.numberActiveTouches = event.touchHistory.numberActiveTouches;\n return config.onStartShouldSetPanResponderCapture != null ? config.onStartShouldSetPanResponderCapture(event, gestureState) : false;\n },\n onMoveShouldSetResponderCapture: function onMoveShouldSetResponderCapture(event) {\n var touchHistory = event.touchHistory; // Responder system incorrectly dispatches should* to current responder\n // Filter out any touch moves past the first one - we would have\n // already processed multi-touch geometry during the first event.\n\n if (gestureState._accountsForMovesUpTo === touchHistory.mostRecentTimeStamp) {\n return false;\n }\n\n PanResponder._updateGestureStateOnMove(gestureState, touchHistory);\n\n return config.onMoveShouldSetPanResponderCapture ? config.onMoveShouldSetPanResponderCapture(event, gestureState) : false;\n },\n onResponderGrant: function onResponderGrant(event) {\n if (!interactionState.handle) {\n interactionState.handle = InteractionManager.createInteractionHandle();\n }\n\n if (interactionState.timeout) {\n clearInteractionTimeout(interactionState);\n }\n\n interactionState.shouldCancelClick = true;\n gestureState.x0 = currentCentroidX(event.touchHistory);\n gestureState.y0 = currentCentroidY(event.touchHistory);\n gestureState.dx = 0;\n gestureState.dy = 0;\n\n if (config.onPanResponderGrant) {\n config.onPanResponderGrant(event, gestureState);\n } // TODO: t7467124 investigate if this can be removed\n\n\n return config.onShouldBlockNativeResponder == null ? true : config.onShouldBlockNativeResponder(event, gestureState);\n },\n onResponderReject: function onResponderReject(event) {\n clearInteractionHandle(interactionState, config.onPanResponderReject, event, gestureState);\n },\n onResponderRelease: function onResponderRelease(event) {\n clearInteractionHandle(interactionState, config.onPanResponderRelease, event, gestureState);\n setInteractionTimeout(interactionState);\n\n PanResponder._initializeGestureState(gestureState);\n },\n onResponderStart: function onResponderStart(event) {\n var touchHistory = event.touchHistory;\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n\n if (config.onPanResponderStart) {\n config.onPanResponderStart(event, gestureState);\n }\n },\n onResponderMove: function onResponderMove(event) {\n var touchHistory = event.touchHistory; // Guard against the dispatch of two touch moves when there are two\n // simultaneously changed touches.\n\n if (gestureState._accountsForMovesUpTo === touchHistory.mostRecentTimeStamp) {\n return;\n } // Filter out any touch moves past the first one - we would have\n // already processed multi-touch geometry during the first event.\n\n\n PanResponder._updateGestureStateOnMove(gestureState, touchHistory);\n\n if (config.onPanResponderMove) {\n config.onPanResponderMove(event, gestureState);\n }\n },\n onResponderEnd: function onResponderEnd(event) {\n var touchHistory = event.touchHistory;\n gestureState.numberActiveTouches = touchHistory.numberActiveTouches;\n clearInteractionHandle(interactionState, config.onPanResponderEnd, event, gestureState);\n },\n onResponderTerminate: function onResponderTerminate(event) {\n clearInteractionHandle(interactionState, config.onPanResponderTerminate, event, gestureState);\n setInteractionTimeout(interactionState);\n\n PanResponder._initializeGestureState(gestureState);\n },\n onResponderTerminationRequest: function onResponderTerminationRequest(event) {\n return config.onPanResponderTerminationRequest == null ? true : config.onPanResponderTerminationRequest(event, gestureState);\n },\n // We do not want to trigger 'click' activated gestures or native behaviors\n // on any pan target that is under a mouse cursor when it is released.\n // Browsers will natively cancel 'click' events on a target if a non-mouse\n // active pointer moves.\n onClickCapture: function onClickCapture(event) {\n if (interactionState.shouldCancelClick === true) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n };\n return {\n panHandlers: panHandlers,\n getInteractionHandle: function getInteractionHandle() {\n return interactionState.handle;\n }\n };\n }\n};\n\nfunction clearInteractionHandle(interactionState, callback, event, gestureState) {\n if (interactionState.handle) {\n InteractionManager.clearInteractionHandle(interactionState.handle);\n interactionState.handle = null;\n }\n\n if (callback) {\n callback(event, gestureState);\n }\n}\n\nfunction clearInteractionTimeout(interactionState) {\n clearTimeout(interactionState.timeout);\n}\n\nfunction setInteractionTimeout(interactionState) {\n interactionState.timeout = setTimeout(function () {\n interactionState.shouldCancelClick = false;\n }, 250);\n}\n\nexport default PanResponder;","import PanResponder from '../../vendor/react-native/PanResponder';\nexport default PanResponder;","function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport invariant from 'fbjs/lib/invariant';\n\nvar Share = /*#__PURE__*/function () {\n function Share() {}\n\n Share.share = function share(content, options) {\n if (options === void 0) {\n options = {};\n }\n\n invariant(typeof content === 'object' && content !== null, 'Content to share must be a valid object');\n invariant(typeof content.url === 'string' || typeof content.message === 'string', 'At least one of URL and message is required');\n invariant(typeof options === 'object' && options !== null, 'Options must be a valid object');\n invariant(!content.title || typeof content.title === 'string', 'Invalid title: title should be a string.');\n\n if (window.navigator.share !== undefined) {\n return window.navigator.share({\n title: content.title,\n text: content.message,\n url: content.url\n });\n } else {\n return Promise.reject(new Error('Share is not supported in this browser'));\n }\n }\n /**\n * The content was successfully shared.\n */\n ;\n\n _createClass(Share, null, [{\n key: \"sharedAction\",\n get: function get() {\n return 'sharedAction';\n }\n /**\n * The dialog has been dismissed.\n * @platform ios\n */\n\n }, {\n key: \"dismissedAction\",\n get: function get() {\n return 'dismissedAction';\n }\n }]);\n\n return Share;\n}();\n\nexport default Share;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar _vibrate = function vibrate(pattern) {\n if ('vibrate' in window.navigator) {\n window.navigator.vibrate(pattern);\n }\n};\n\nvar Vibration = {\n cancel: function cancel() {\n _vibrate(0);\n },\n vibrate: function vibrate(pattern) {\n if (pattern === void 0) {\n pattern = 400;\n }\n\n _vibrate(pattern);\n }\n};\nexport default Vibration;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar accessibilityValue = {\n max: 1,\n min: 0\n};\n\nvar createSvgCircle = function createSvgCircle(style) {\n return /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"16\",\n cy: \"16\",\n fill: \"none\",\n r: \"14\",\n strokeWidth: \"4\",\n style: style\n });\n};\n\nvar ActivityIndicator = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var _props$animating = props.animating,\n animating = _props$animating === void 0 ? true : _props$animating,\n _props$color = props.color,\n color = _props$color === void 0 ? '#1976D2' : _props$color,\n _props$hidesWhenStopp = props.hidesWhenStopped,\n hidesWhenStopped = _props$hidesWhenStopp === void 0 ? true : _props$hidesWhenStopp,\n _props$size = props.size,\n size = _props$size === void 0 ? 'small' : _props$size,\n style = props.style,\n other = _objectWithoutPropertiesLoose(props, [\"animating\", \"color\", \"hidesWhenStopped\", \"size\", \"style\"]);\n\n var svg = /*#__PURE__*/React.createElement(\"svg\", {\n height: \"100%\",\n viewBox: \"0 0 32 32\",\n width: \"100%\"\n }, createSvgCircle({\n stroke: color,\n opacity: 0.2\n }), createSvgCircle({\n stroke: color,\n strokeDasharray: 80,\n strokeDashoffset: 60\n }));\n return /*#__PURE__*/React.createElement(View, _extends({}, other, {\n accessibilityRole: \"progressbar\",\n accessibilityValue: accessibilityValue,\n ref: forwardedRef,\n style: [styles.container, style]\n }), /*#__PURE__*/React.createElement(View, {\n children: svg,\n style: [typeof size === 'number' ? {\n height: size,\n width: size\n } : indicatorSizes[size], styles.animation, !animating && styles.animationPause, !animating && hidesWhenStopped && styles.hidesWhenStopped]\n }));\n});\nActivityIndicator.displayName = 'ActivityIndicator';\nvar styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n justifyContent: 'center'\n },\n hidesWhenStopped: {\n visibility: 'hidden'\n },\n animation: {\n animationDuration: '0.75s',\n animationKeyframes: [{\n '0%': {\n transform: [{\n rotate: '0deg'\n }]\n },\n '100%': {\n transform: [{\n rotate: '360deg'\n }]\n }\n }],\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite'\n },\n animationPause: {\n animationPlayState: 'paused'\n }\n});\nvar indicatorSizes = StyleSheet.create({\n small: {\n width: 20,\n height: 20\n },\n large: {\n width: 36,\n height: 36\n }\n});\nexport default ActivityIndicator;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport TouchableOpacity from '../TouchableOpacity';\nimport Text from '../Text';\nvar Button = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var accessibilityLabel = props.accessibilityLabel,\n color = props.color,\n disabled = props.disabled,\n onPress = props.onPress,\n testID = props.testID,\n title = props.title;\n return /*#__PURE__*/React.createElement(TouchableOpacity, {\n accessibilityLabel: accessibilityLabel,\n accessibilityRole: \"button\",\n disabled: disabled,\n focusable: !disabled,\n onPress: onPress,\n ref: forwardedRef,\n style: [styles.button, color && {\n backgroundColor: color\n }, disabled && styles.buttonDisabled],\n testID: testID\n }, /*#__PURE__*/React.createElement(Text, {\n style: [styles.text, disabled && styles.textDisabled]\n }, title));\n});\nButton.displayName = 'Button';\nvar styles = StyleSheet.create({\n button: {\n backgroundColor: '#2196F3',\n borderRadius: 2\n },\n text: {\n color: '#fff',\n fontWeight: '500',\n padding: 8,\n textAlign: 'center',\n textTransform: 'uppercase'\n },\n buttonDisabled: {\n backgroundColor: '#dfdfdf'\n },\n textDisabled: {\n color: '#a1a1a1'\n }\n});\nexport default Button;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar CheckBox = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var color = props.color,\n disabled = props.disabled,\n onChange = props.onChange,\n onValueChange = props.onValueChange,\n style = props.style,\n value = props.value,\n other = _objectWithoutPropertiesLoose(props, [\"color\", \"disabled\", \"onChange\", \"onValueChange\", \"style\", \"value\"]);\n\n function handleChange(event) {\n var value = event.nativeEvent.target.checked;\n event.nativeEvent.value = value;\n onChange && onChange(event);\n onValueChange && onValueChange(value);\n }\n\n var fakeControl = /*#__PURE__*/React.createElement(View, {\n style: [styles.fakeControl, value && styles.fakeControlChecked, // custom color\n value && color && {\n backgroundColor: color,\n borderColor: color\n }, disabled && styles.fakeControlDisabled, value && disabled && styles.fakeControlCheckedAndDisabled]\n });\n var nativeControl = createElement('input', {\n checked: value,\n disabled: disabled,\n onChange: handleChange,\n ref: forwardedRef,\n style: [styles.nativeControl, styles.cursorInherit],\n type: 'checkbox'\n });\n return /*#__PURE__*/React.createElement(View, _extends({}, other, {\n accessibilityDisabled: disabled,\n style: [styles.root, style, disabled && styles.cursorDefault]\n }), fakeControl, nativeControl);\n});\nCheckBox.displayName = 'CheckBox';\nvar styles = StyleSheet.create({\n root: {\n cursor: 'pointer',\n height: 16,\n userSelect: 'none',\n width: 16\n },\n cursorDefault: {\n cursor: 'default'\n },\n cursorInherit: {\n cursor: 'inherit'\n },\n fakeControl: {\n alignItems: 'center',\n backgroundColor: '#fff',\n borderColor: '#657786',\n borderRadius: 2,\n borderStyle: 'solid',\n borderWidth: 2,\n height: '100%',\n justifyContent: 'center',\n width: '100%'\n },\n fakeControlChecked: {\n backgroundColor: '#009688',\n backgroundImage: 'url(\"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K\")',\n backgroundRepeat: 'no-repeat',\n borderColor: '#009688'\n },\n fakeControlDisabled: {\n borderColor: '#CCD6DD'\n },\n fakeControlCheckedAndDisabled: {\n backgroundColor: '#AAB8C2',\n borderColor: '#AAB8C2'\n },\n nativeControl: _objectSpread(_objectSpread({}, StyleSheet.absoluteFillObject), {}, {\n height: '100%',\n margin: 0,\n opacity: 0,\n padding: 0,\n width: '100%'\n })\n});\nexport default CheckBox;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { forwardRef } from 'react';\nimport Image from '../Image';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar emptyObject = {};\n/**\n * Very simple drop-in replacement for <Image> which supports nesting views.\n */\n\nvar ImageBackground = /*#__PURE__*/forwardRef(function (props, forwardedRef) {\n var children = props.children,\n _props$style = props.style,\n style = _props$style === void 0 ? emptyObject : _props$style,\n imageStyle = props.imageStyle,\n imageRef = props.imageRef,\n rest = _objectWithoutPropertiesLoose(props, [\"children\", \"style\", \"imageStyle\", \"imageRef\"]);\n\n var _StyleSheet$flatten = StyleSheet.flatten(style),\n height = _StyleSheet$flatten.height,\n width = _StyleSheet$flatten.width;\n\n return /*#__PURE__*/React.createElement(View, {\n ref: forwardedRef,\n style: style\n }, /*#__PURE__*/React.createElement(Image, _extends({}, rest, {\n ref: imageRef,\n style: [StyleSheet.absoluteFill, {\n // Temporary Workaround:\n // Current (imperfect yet) implementation of <Image> overwrites width and height styles\n // (which is not quite correct), and these styles conflict with explicitly set styles\n // of <ImageBackground> and with our internal layout model here.\n // So, we have to proxy/reapply these styles explicitly for actual <Image> component.\n // This workaround should be removed after implementing proper support of\n // intrinsic content size of the <Image>.\n width: width,\n height: height,\n zIndex: -1\n }, imageStyle]\n })), children);\n});\nImageBackground.displayName = 'ImageBackground';\nexport default ImageBackground;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport ReactDOM from 'react-dom';\n\nfunction ModalPortal(props) {\n var children = props.children;\n var elementRef = React.useRef(null);\n\n if (canUseDOM && !elementRef.current) {\n var element = document.createElement('div');\n\n if (element && document.body) {\n document.body.appendChild(element);\n elementRef.current = element;\n }\n }\n\n React.useEffect(function () {\n if (canUseDOM) {\n return function () {\n if (document.body && elementRef.current) {\n document.body.removeChild(elementRef.current);\n elementRef.current = null;\n }\n };\n }\n }, []);\n return elementRef.current && canUseDOM ? /*#__PURE__*/ReactDOM.createPortal(children, elementRef.current) : null;\n}\n\nexport default ModalPortal;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport createElement from '../createElement';\nvar ANIMATION_DURATION = 300;\n\nfunction getAnimationStyle(animationType, visible) {\n if (animationType === 'slide') {\n return visible ? animatedSlideInStyles : animatedSlideOutStyles;\n }\n\n if (animationType === 'fade') {\n return visible ? animatedFadeInStyles : animatedFadeOutStyles;\n }\n\n return visible ? styles.container : styles.hidden;\n}\n\nfunction ModalAnimation(props) {\n var animationType = props.animationType,\n children = props.children,\n onDismiss = props.onDismiss,\n onShow = props.onShow,\n visible = props.visible;\n\n var _React$useState = React.useState(false),\n isRendering = _React$useState[0],\n setIsRendering = _React$useState[1];\n\n var wasVisible = React.useRef(false);\n var isAnimated = animationType && animationType !== 'none';\n var animationEndCallback = React.useCallback(function (e) {\n if (e && e.currentTarget !== e.target) {\n // If the event was generated for something NOT this element we\n // should ignore it as it's not relevant to us\n return;\n }\n\n if (visible) {\n if (onShow) {\n onShow();\n }\n } else {\n setIsRendering(false);\n\n if (onDismiss) {\n onDismiss();\n }\n }\n }, [onDismiss, onShow, visible]);\n React.useEffect(function () {\n if (visible) {\n setIsRendering(true);\n }\n\n if (visible !== wasVisible.current && !isAnimated) {\n // Manually call `animationEndCallback` if no animation is used\n animationEndCallback();\n }\n\n wasVisible.current = visible;\n }, [isAnimated, visible, animationEndCallback]);\n return isRendering || visible ? createElement('div', {\n style: isRendering ? getAnimationStyle(animationType, visible) : styles.hidden,\n onAnimationEnd: animationEndCallback,\n children: children\n }) : null;\n}\n\nvar styles = StyleSheet.create({\n container: {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n zIndex: 9999\n },\n animatedIn: {\n animationDuration: ANIMATION_DURATION + \"ms\",\n animationTimingFunction: 'ease-in'\n },\n animatedOut: {\n pointerEvents: 'none',\n animationDuration: ANIMATION_DURATION + \"ms\",\n animationTimingFunction: 'ease-out'\n },\n fadeIn: {\n opacity: 1,\n animationKeyframes: {\n '0%': {\n opacity: 0\n },\n '100%': {\n opacity: 1\n }\n }\n },\n fadeOut: {\n opacity: 0,\n animationKeyframes: {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n }\n },\n slideIn: {\n transform: [{\n translateY: '0%'\n }],\n animationKeyframes: {\n '0%': {\n transform: [{\n translateY: '100%'\n }]\n },\n '100%': {\n transform: [{\n translateY: '0%'\n }]\n }\n }\n },\n slideOut: {\n transform: [{\n translateY: '100%'\n }],\n animationKeyframes: {\n '0%': {\n transform: [{\n translateY: '0%'\n }]\n },\n '100%': {\n transform: [{\n translateY: '100%'\n }]\n }\n }\n },\n hidden: {\n opacity: 0\n }\n});\nvar animatedSlideInStyles = [styles.container, styles.animatedIn, styles.slideIn];\nvar animatedSlideOutStyles = [styles.container, styles.animatedOut, styles.slideOut];\nvar animatedFadeInStyles = [styles.container, styles.animatedIn, styles.fadeIn];\nvar animatedFadeOutStyles = [styles.container, styles.animatedOut, styles.fadeOut];\nexport default ModalAnimation;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport View from '../View';\nimport StyleSheet from '../StyleSheet';\nvar ModalContent = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var active = props.active,\n children = props.children,\n onRequestClose = props.onRequestClose,\n transparent = props.transparent;\n React.useEffect(function () {\n if (canUseDOM) {\n var closeOnEscape = function closeOnEscape(e) {\n if (active && e.key === 'Escape') {\n e.stopPropagation();\n\n if (onRequestClose) {\n onRequestClose();\n }\n }\n };\n\n document.addEventListener('keyup', closeOnEscape, false);\n return function () {\n return document.removeEventListener('keyup', closeOnEscape, false);\n };\n }\n }, [active, onRequestClose]);\n var style = React.useMemo(function () {\n return [styles.modal, transparent ? styles.modalTransparent : styles.modalOpaque];\n }, [transparent]);\n return /*#__PURE__*/React.createElement(View, {\n accessibilityRole: active ? 'dialog' : null,\n \"aria-modal\": true,\n ref: forwardedRef,\n style: style\n }, /*#__PURE__*/React.createElement(View, {\n style: styles.container\n }, children));\n});\nvar styles = StyleSheet.create({\n modal: {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n modalTransparent: {\n backgroundColor: 'transparent'\n },\n modalOpaque: {\n backgroundColor: 'white'\n },\n container: {\n top: 0,\n flex: 1\n }\n});\nexport default ModalContent;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport View from '../View';\nimport createElement from '../createElement';\nimport StyleSheet from '../StyleSheet';\nimport UIManager from '../UIManager';\n/**\n * This Component is used to \"wrap\" the modal we're opening\n * so that changing focus via tab will never leave the document.\n *\n * This allows us to properly trap the focus within a modal\n * even if the modal is at the start or end of a document.\n */\n\nvar FocusBracket = function FocusBracket() {\n return createElement('div', {\n accessibilityRole: 'none',\n tabIndex: 0,\n style: styles.focusBracket\n });\n};\n\nfunction attemptFocus(element) {\n if (!canUseDOM) {\n return false;\n }\n\n try {\n element.focus();\n } catch (e) {// Do nothing\n }\n\n return document.activeElement === element;\n}\n\nfunction focusFirstDescendant(element) {\n for (var i = 0; i < element.childNodes.length; i++) {\n var child = element.childNodes[i];\n\n if (attemptFocus(child) || focusFirstDescendant(child)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction focusLastDescendant(element) {\n for (var i = element.childNodes.length - 1; i >= 0; i--) {\n var child = element.childNodes[i];\n\n if (attemptFocus(child) || focusLastDescendant(child)) {\n return true;\n }\n }\n\n return false;\n}\n\nvar ModalFocusTrap = function ModalFocusTrap(_ref) {\n var active = _ref.active,\n children = _ref.children;\n var trapElementRef = React.useRef();\n var focusRef = React.useRef({\n trapFocusInProgress: false,\n lastFocusedElement: null\n });\n React.useEffect(function () {\n if (canUseDOM) {\n var trapFocus = function trapFocus() {\n // We should not trap focus if:\n // - The modal hasn't fully initialized with an HTMLElement ref\n // - Focus is already in the process of being trapped (e.g., we're refocusing)\n // - isTrapActive prop being falsey tells us to do nothing\n if (trapElementRef.current == null || focusRef.current.trapFocusInProgress || !active) {\n return;\n }\n\n try {\n focusRef.current.trapFocusInProgress = true;\n\n if (document.activeElement instanceof Node && !trapElementRef.current.contains(document.activeElement)) {\n // To handle keyboard focusing we can make an assumption here.\n // If you're tabbing through the focusable elements, the previously\n // active element will either be the first or the last.\n // If the previously selected element is the \"first\" descendant\n // and we're leaving it - this means that we should be looping\n // around to the other side of the modal.\n var hasFocused = focusFirstDescendant(trapElementRef.current);\n\n if (focusRef.current.lastFocusedElement === document.activeElement) {\n hasFocused = focusLastDescendant(trapElementRef.current);\n } // If we couldn't focus a new element then we need to focus onto the trap target\n\n\n if (!hasFocused && trapElementRef.current != null && document.activeElement) {\n UIManager.focus(trapElementRef.current);\n }\n }\n } finally {\n focusRef.current.trapFocusInProgress = false;\n }\n\n focusRef.current.lastFocusedElement = document.activeElement;\n }; // Call the trapFocus callback at least once when this modal has been activated.\n\n\n trapFocus();\n document.addEventListener('focus', trapFocus, true);\n return function () {\n return document.removeEventListener('focus', trapFocus, true);\n };\n }\n }, [active]); // To be fully compliant with WCAG we need to refocus element that triggered opening modal\n // after closing it\n\n React.useEffect(function () {\n if (canUseDOM) {\n var lastFocusedElementOutsideTrap = document.activeElement;\n return function () {\n if (lastFocusedElementOutsideTrap && document.contains(lastFocusedElementOutsideTrap)) {\n UIManager.focus(lastFocusedElementOutsideTrap);\n }\n };\n }\n }, []);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FocusBracket, null), /*#__PURE__*/React.createElement(View, {\n ref: trapElementRef\n }, children), /*#__PURE__*/React.createElement(FocusBracket, null));\n};\n\nexport default ModalFocusTrap;\nvar styles = StyleSheet.create({\n focusBracket: {\n outlineStyle: 'none'\n }\n});","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport ModalPortal from './ModalPortal';\nimport ModalAnimation from './ModalAnimation';\nimport ModalContent from './ModalContent';\nimport ModalFocusTrap from './ModalFocusTrap';\nvar uniqueModalIdentifier = 0;\nvar activeModalStack = [];\nvar activeModalListeners = {};\n\nfunction notifyActiveModalListeners() {\n if (activeModalStack.length === 0) {\n return;\n }\n\n var activeModalId = activeModalStack[activeModalStack.length - 1];\n activeModalStack.forEach(function (modalId) {\n if (modalId in activeModalListeners) {\n activeModalListeners[modalId](modalId === activeModalId);\n }\n });\n}\n\nfunction removeActiveModal(modalId) {\n if (modalId in activeModalListeners) {\n // Before removing this listener we should probably tell it\n // that it's no longer the active modal for sure.\n activeModalListeners[modalId](false);\n delete activeModalListeners[modalId];\n }\n\n var index = activeModalStack.indexOf(modalId);\n\n if (index !== -1) {\n activeModalStack.splice(index, 1);\n notifyActiveModalListeners();\n }\n}\n\nfunction addActiveModal(modalId, listener) {\n removeActiveModal(modalId);\n activeModalStack.push(modalId);\n activeModalListeners[modalId] = listener;\n notifyActiveModalListeners();\n}\n\nvar Modal = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var animationType = props.animationType,\n children = props.children,\n onDismiss = props.onDismiss,\n onRequestClose = props.onRequestClose,\n onShow = props.onShow,\n transparent = props.transparent,\n _props$visible = props.visible,\n visible = _props$visible === void 0 ? true : _props$visible; // Set a unique model identifier so we can correctly route\n // dismissals and check the layering of modals.\n\n var modalId = React.useMemo(function () {\n return uniqueModalIdentifier++;\n }, []);\n\n var _React$useState = React.useState(false),\n isActive = _React$useState[0],\n setIsActive = _React$useState[1];\n\n var onDismissCallback = React.useCallback(function () {\n removeActiveModal(modalId);\n\n if (onDismiss) {\n onDismiss();\n }\n }, [modalId, onDismiss]);\n var onShowCallback = React.useCallback(function () {\n addActiveModal(modalId, setIsActive);\n\n if (onShow) {\n onShow();\n }\n }, [modalId, onShow]);\n React.useEffect(function () {\n return function () {\n return removeActiveModal(modalId);\n };\n }, [modalId]);\n return /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(ModalAnimation, {\n animationType: animationType,\n onDismiss: onDismissCallback,\n onShow: onShowCallback,\n visible: visible\n }, /*#__PURE__*/React.createElement(ModalFocusTrap, {\n active: isActive\n }, /*#__PURE__*/React.createElement(ModalContent, {\n active: isActive,\n onRequestClose: onRequestClose,\n ref: forwardedRef,\n transparent: transparent\n }, children))));\n});\nexport default Modal;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport createElement from '../createElement';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport usePlatformMethods from '../../modules/usePlatformMethods';\nimport PickerItem from './PickerItem';\nimport StyleSheet from '../StyleSheet';\nvar Picker = /*#__PURE__*/React.forwardRef(function (props, forwardedRef) {\n var children = props.children,\n enabled = props.enabled,\n onValueChange = props.onValueChange,\n selectedValue = props.selectedValue,\n style = props.style,\n testID = props.testID,\n itemStyle = props.itemStyle,\n mode = props.mode,\n prompt = props.prompt,\n other = _objectWithoutPropertiesLoose(props, [\"children\", \"enabled\", \"onValueChange\", \"selectedValue\", \"style\", \"testID\", \"itemStyle\", \"mode\", \"prompt\"]);\n\n var hostRef = React.useRef(null);\n\n function handleChange(e) {\n var _e$target = e.target,\n selectedIndex = _e$target.selectedIndex,\n value = _e$target.value;\n\n if (onValueChange) {\n onValueChange(value, selectedIndex);\n }\n } // $FlowFixMe\n\n\n var supportedProps = _objectSpread({\n children: children,\n disabled: enabled === false ? true : undefined,\n onChange: handleChange,\n style: [styles.initial, style],\n testID: testID,\n value: selectedValue\n }, other);\n\n var platformMethodsRef = usePlatformMethods(supportedProps);\n var setRef = useMergeRefs(hostRef, platformMethodsRef, forwardedRef);\n supportedProps.ref = setRef;\n return createElement('select', supportedProps);\n}); // $FlowFixMe\n\nPicker.Item = PickerItem;\nvar styles = StyleSheet.create({\n initial: {\n fontFamily: 'System',\n fontSize: 'inherit',\n margin: 0\n }\n});\nexport default Picker;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createElement from '../createElement';\nexport default function PickerItem(props) {\n var color = props.color,\n label = props.label,\n testID = props.testID,\n value = props.value;\n var style = {\n color: color\n };\n return createElement('option', {\n style: style,\n testID: testID,\n value: value\n }, label);\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n'use strict';\n\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\n\nvar emptyFunction = function emptyFunction() {};\n\nfunction supportsPassiveEvents() {\n var supported = false; // Check if browser supports event with passive listeners\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n\n if (canUseDOM) {\n try {\n var options = {};\n Object.defineProperty(options, 'passive', {\n get: function get() {\n supported = true;\n return false;\n }\n });\n window.addEventListener('test', null, options);\n window.removeEventListener('test', null, options);\n } catch (e) {}\n }\n\n return supported;\n}\n\nvar canUsePassiveEvents = supportsPassiveEvents();\n\nfunction getOptions(options) {\n if (options == null) {\n return false;\n }\n\n return canUsePassiveEvents ? options : Boolean(options.capture);\n}\n/**\n * Shim generic API compatibility with ReactDOM's synthetic events, without needing the\n * large amount of code ReactDOM uses to do this. Ideally we wouldn't use a synthetic\n * event wrapper at all.\n */\n\n\nfunction isPropagationStopped() {\n return this.cancelBubble;\n}\n\nfunction isDefaultPrevented() {\n return this.defaultPrevented;\n}\n\nfunction normalizeEvent(event) {\n event.nativeEvent = event;\n event.persist = emptyFunction;\n event.isDefaultPrevented = isDefaultPrevented;\n event.isPropagationStopped = isPropagationStopped;\n return event;\n}\n/**\n *\n */\n\n\nexport default function createEventHandle(type, options) {\n var opts = getOptions(options);\n return function (target, listener) {\n if (target == null || typeof target.addEventListener !== 'function') {\n throw new Error('createEventHandle: called on an invalid target.');\n }\n\n var element = target;\n\n if (listener != null) {\n var compatListener = function compatListener(e) {\n return listener(normalizeEvent(e));\n };\n\n element.addEventListener(type, compatListener, opts);\n return function removeListener() {\n if (element != null) {\n element.removeEventListener(type, compatListener, opts);\n }\n };\n } else {\n return emptyFunction;\n }\n };\n}","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport createEventHandle from '../createEventHandle';\n\nvar supportsPointerEvent = function supportsPointerEvent() {\n return !!(typeof window !== 'undefined' && window.PointerEvent != null);\n};\n\nvar activeModality = 'keyboard';\nvar modality = 'keyboard';\nvar previousModality;\nvar previousActiveModality;\nvar isEmulatingMouseEvents = false;\nvar listeners = new Set();\nvar KEYBOARD = 'keyboard';\nvar MOUSE = 'mouse';\nvar TOUCH = 'touch';\nvar BLUR = 'blur';\nvar CONTEXTMENU = 'contextmenu';\nvar FOCUS = 'focus';\nvar KEYDOWN = 'keydown';\nvar MOUSEDOWN = 'mousedown';\nvar MOUSEMOVE = 'mousemove';\nvar MOUSEUP = 'mouseup';\nvar POINTERDOWN = 'pointerdown';\nvar POINTERMOVE = 'pointermove';\nvar SCROLL = 'scroll';\nvar SELECTIONCHANGE = 'selectionchange';\nvar TOUCHCANCEL = 'touchcancel';\nvar TOUCHMOVE = 'touchmove';\nvar TOUCHSTART = 'touchstart';\nvar VISIBILITYCHANGE = 'visibilitychange';\nvar bubbleOptions = {\n passive: true\n};\nvar captureOptions = {\n capture: true,\n passive: true\n}; // Window events\n\nvar addBlurListener = createEventHandle(BLUR, bubbleOptions);\nvar addFocusListener = createEventHandle(FOCUS, bubbleOptions); // Must be capture phase because 'stopPropagation' might prevent these\n// events bubbling to the document.\n\nvar addVisibilityChangeListener = createEventHandle(VISIBILITYCHANGE, captureOptions);\nvar addKeyDownListener = createEventHandle(KEYDOWN, captureOptions);\nvar addPointerDownListener = createEventHandle(POINTERDOWN, captureOptions);\nvar addPointerMoveListener = createEventHandle(POINTERMOVE, captureOptions); // Fallback events\n\nvar addContextMenuListener = createEventHandle(CONTEXTMENU, captureOptions);\nvar addMouseDownListener = createEventHandle(MOUSEDOWN, captureOptions);\nvar addMouseMoveListener = createEventHandle(MOUSEMOVE, captureOptions);\nvar addMouseUpListener = createEventHandle(MOUSEUP, captureOptions);\nvar addScrollListener = createEventHandle(SCROLL, captureOptions);\nvar addSelectiomChangeListener = createEventHandle(SELECTIONCHANGE, captureOptions);\nvar addTouchCancelListener = createEventHandle(TOUCHCANCEL, captureOptions);\nvar addTouchMoveListener = createEventHandle(TOUCHMOVE, captureOptions);\nvar addTouchStartListener = createEventHandle(TOUCHSTART, captureOptions);\n\nfunction restoreModality() {\n if (previousModality != null || previousActiveModality != null) {\n if (previousModality != null) {\n modality = previousModality;\n previousModality = null;\n }\n\n if (previousActiveModality != null) {\n activeModality = previousActiveModality;\n previousActiveModality = null;\n }\n\n callListeners();\n }\n}\n\nfunction onBlurWindow() {\n previousModality = modality;\n previousActiveModality = activeModality;\n activeModality = KEYBOARD;\n modality = KEYBOARD;\n callListeners(); // for fallback events\n\n isEmulatingMouseEvents = false;\n}\n\nfunction onFocusWindow() {\n restoreModality();\n}\n\nfunction onKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n\n if (modality !== KEYBOARD) {\n modality = KEYBOARD;\n activeModality = KEYBOARD;\n callListeners();\n }\n}\n\nfunction onVisibilityChange() {\n if (document.visibilityState !== 'hidden') {\n restoreModality();\n }\n}\n\nfunction onPointerish(event) {\n var eventType = event.type;\n\n if (supportsPointerEvent()) {\n if (eventType === POINTERDOWN) {\n if (activeModality !== event.pointerType) {\n modality = event.pointerType;\n activeModality = event.pointerType;\n callListeners();\n }\n\n return;\n }\n\n if (eventType === POINTERMOVE) {\n if (modality !== event.pointerType) {\n modality = event.pointerType;\n callListeners();\n }\n\n return;\n }\n } // Fallback for non-PointerEvent environment\n else {\n if (!isEmulatingMouseEvents) {\n if (eventType === MOUSEDOWN) {\n if (activeModality !== MOUSE) {\n modality = MOUSE;\n activeModality = MOUSE;\n callListeners();\n }\n }\n\n if (eventType === MOUSEMOVE) {\n if (modality !== MOUSE) {\n modality = MOUSE;\n callListeners();\n }\n }\n } // Flag when browser may produce emulated events\n\n\n if (eventType === TOUCHSTART) {\n isEmulatingMouseEvents = true;\n\n if (event.touches && event.touches.length > 1) {\n isEmulatingMouseEvents = false;\n }\n\n if (activeModality !== TOUCH) {\n modality = TOUCH;\n activeModality = TOUCH;\n callListeners();\n }\n\n return;\n } // Remove flag after emulated events are finished or cancelled, and if an\n // event occurs that cuts short a touch event sequence.\n\n\n if (eventType === CONTEXTMENU || eventType === MOUSEUP || eventType === SELECTIONCHANGE || eventType === SCROLL || eventType === TOUCHCANCEL || eventType === TOUCHMOVE) {\n isEmulatingMouseEvents = false;\n }\n }\n}\n\nif (canUseDOM) {\n addBlurListener(window, onBlurWindow);\n addFocusListener(window, onFocusWindow);\n addKeyDownListener(document, onKeyDown);\n addPointerDownListener(document, onPointerish);\n addPointerMoveListener(document, onPointerish);\n addVisibilityChangeListener(document, onVisibilityChange); // fallbacks\n\n addContextMenuListener(document, onPointerish);\n addMouseDownListener(document, onPointerish);\n addMouseMoveListener(document, onPointerish);\n addMouseUpListener(document, onPointerish);\n addTouchCancelListener(document, onPointerish);\n addTouchMoveListener(document, onPointerish);\n addTouchStartListener(document, onPointerish);\n addSelectiomChangeListener(document, onPointerish);\n addScrollListener(document, onPointerish);\n}\n\nfunction callListeners() {\n var value = {\n activeModality: activeModality,\n modality: modality\n };\n listeners.forEach(function (listener) {\n listener(value);\n });\n}\n\nexport function getActiveModality() {\n return activeModality;\n}\nexport function getModality() {\n return modality;\n}\nexport function addModalityListener(listener) {\n listeners.add(listener);\n return function () {\n listeners.delete(listener);\n };\n}\nexport function testOnly_resetActiveModality() {\n isEmulatingMouseEvents = false;\n activeModality = KEYBOARD;\n modality = KEYBOARD;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport createEventHandle from '../createEventHandle';\nimport useLayoutEffect from '../useLayoutEffect';\nimport useStable from '../useStable';\n\n/**\n * This can be used with any event type include custom events.\n *\n * const click = useEvent('click', options);\n * useEffect(() => {\n * click.setListener(target, onClick);\n * return () => click.clear();\n * }).\n */\nexport default function useEvent(event, options) {\n var targetListeners = useStable(function () {\n return new Map();\n });\n var addListener = useStable(function () {\n var addEventListener = createEventHandle(event, options);\n return function (target, callback) {\n var removeTargetListener = targetListeners.get(target);\n\n if (removeTargetListener != null) {\n removeTargetListener();\n }\n\n if (callback == null) {\n targetListeners.delete(target);\n }\n\n var removeEventListener = addEventListener(target, callback);\n targetListeners.set(target, removeEventListener);\n return removeEventListener;\n };\n });\n useLayoutEffect(function () {\n return function () {\n targetListeners.forEach(function (removeListener) {\n removeListener();\n });\n targetListeners.clear();\n };\n }, []);\n return addListener;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { getModality } from '../modality';\nimport useEvent from '../useEvent';\nimport useLayoutEffect from '../useLayoutEffect';\n/**\n * Types\n */\n\n/**\n * Implementation\n */\nvar emptyObject = {};\nvar opts = {\n passive: true\n};\nvar lockEventType = 'react-gui:hover:lock';\nvar unlockEventType = 'react-gui:hover:unlock';\n\nvar supportsPointerEvent = function supportsPointerEvent() {\n return !!(typeof window !== 'undefined' && window.PointerEvent != null);\n};\n\nfunction dispatchCustomEvent(target, type, payload) {\n var event = document.createEvent('CustomEvent');\n\n var _ref = payload || emptyObject,\n _ref$bubbles = _ref.bubbles,\n bubbles = _ref$bubbles === void 0 ? true : _ref$bubbles,\n _ref$cancelable = _ref.cancelable,\n cancelable = _ref$cancelable === void 0 ? true : _ref$cancelable,\n detail = _ref.detail;\n\n event.initCustomEvent(type, bubbles, cancelable, detail);\n target.dispatchEvent(event);\n} // This accounts for the non-PointerEvent fallback events.\n\n\nfunction getPointerType(event) {\n var pointerType = event.pointerType;\n return pointerType != null ? pointerType : getModality();\n}\n\nexport default function useHover(targetRef, config) {\n var contain = config.contain,\n disabled = config.disabled,\n onHoverStart = config.onHoverStart,\n onHoverChange = config.onHoverChange,\n onHoverUpdate = config.onHoverUpdate,\n onHoverEnd = config.onHoverEnd;\n var canUsePE = supportsPointerEvent();\n var addMoveListener = useEvent(canUsePE ? 'pointermove' : 'mousemove', opts);\n var addEnterListener = useEvent(canUsePE ? 'pointerenter' : 'mouseenter', opts);\n var addLeaveListener = useEvent(canUsePE ? 'pointerleave' : 'mouseleave', opts); // These custom events are used to implement the \"contain\" prop.\n\n var addLockListener = useEvent(lockEventType, opts);\n var addUnlockListener = useEvent(unlockEventType, opts);\n useLayoutEffect(function () {\n var target = targetRef.current;\n\n if (target !== null) {\n /**\n * End the hover gesture\n */\n var hoverEnd = function hoverEnd(e) {\n if (onHoverEnd != null) {\n onHoverEnd(e);\n }\n\n if (onHoverChange != null) {\n onHoverChange(false);\n } // Remove the listeners once finished.\n\n\n addMoveListener(target, null);\n addLeaveListener(target, null);\n };\n /**\n * Leave element\n */\n\n\n var leaveListener = function leaveListener(e) {\n var target = targetRef.current;\n\n if (target != null && getPointerType(e) !== 'touch') {\n if (contain) {\n dispatchCustomEvent(target, unlockEventType);\n }\n\n hoverEnd(e);\n }\n };\n /**\n * Move within element\n */\n\n\n var moveListener = function moveListener(e) {\n if (getPointerType(e) !== 'touch') {\n if (onHoverUpdate != null) {\n // Not all browsers have these properties\n if (e.x == null) {\n e.x = e.clientX;\n }\n\n if (e.y == null) {\n e.y = e.clientY;\n }\n\n onHoverUpdate(e);\n }\n }\n };\n /**\n * Start the hover gesture\n */\n\n\n var hoverStart = function hoverStart(e) {\n if (onHoverStart != null) {\n onHoverStart(e);\n }\n\n if (onHoverChange != null) {\n onHoverChange(true);\n } // Set the listeners needed for the rest of the hover gesture.\n\n\n if (onHoverUpdate != null) {\n addMoveListener(target, !disabled ? moveListener : null);\n }\n\n addLeaveListener(target, !disabled ? leaveListener : null);\n };\n /**\n * Enter element\n */\n\n\n var enterListener = function enterListener(e) {\n var target = targetRef.current;\n\n if (target != null && getPointerType(e) !== 'touch') {\n if (contain) {\n dispatchCustomEvent(target, lockEventType);\n }\n\n hoverStart(e);\n\n var lockListener = function lockListener(lockEvent) {\n if (lockEvent.target !== target) {\n hoverEnd(e);\n }\n };\n\n var unlockListener = function unlockListener(lockEvent) {\n if (lockEvent.target !== target) {\n hoverStart(e);\n }\n };\n\n addLockListener(target, !disabled ? lockListener : null);\n addUnlockListener(target, !disabled ? unlockListener : null);\n }\n };\n\n addEnterListener(target, !disabled ? enterListener : null);\n }\n }, [addEnterListener, addMoveListener, addLeaveListener, addLockListener, addUnlockListener, contain, disabled, onHoverStart, onHoverChange, onHoverUpdate, onHoverEnd, targetRef]);\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport * as React from 'react';\nimport { forwardRef, memo, useMemo, useState, useRef } from 'react';\nimport useMergeRefs from '../../modules/useMergeRefs';\nimport useHover from '../../modules/useHover';\nimport usePressEvents from '../../modules/usePressEvents';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\n\n/**\n * Component used to build display components that should respond to whether the\n * component is currently pressed or not.\n */\nfunction Pressable(props, forwardedRef) {\n var children = props.children,\n delayLongPress = props.delayLongPress,\n delayPressIn = props.delayPressIn,\n delayPressOut = props.delayPressOut,\n disabled = props.disabled,\n focusable = props.focusable,\n onBlur = props.onBlur,\n onContextMenu = props.onContextMenu,\n onFocus = props.onFocus,\n onHoverIn = props.onHoverIn,\n onHoverOut = props.onHoverOut,\n onKeyDown = props.onKeyDown,\n onLongPress = props.onLongPress,\n onPress = props.onPress,\n onPressMove = props.onPressMove,\n onPressIn = props.onPressIn,\n onPressOut = props.onPressOut,\n style = props.style,\n testOnly_hovered = props.testOnly_hovered,\n testOnly_pressed = props.testOnly_pressed,\n rest = _objectWithoutPropertiesLoose(props, [\"children\", \"delayLongPress\", \"delayPressIn\", \"delayPressOut\", \"disabled\", \"focusable\", \"onBlur\", \"onContextMenu\", \"onFocus\", \"onHoverIn\", \"onHoverOut\", \"onKeyDown\", \"onLongPress\", \"onPress\", \"onPressMove\", \"onPressIn\", \"onPressOut\", \"style\", \"testOnly_hovered\", \"testOnly_pressed\"]);\n\n var _useForceableState = useForceableState(testOnly_hovered === true),\n hovered = _useForceableState[0],\n setHovered = _useForceableState[1];\n\n var _useForceableState2 = useForceableState(false),\n focused = _useForceableState2[0],\n setFocused = _useForceableState2[1];\n\n var _useForceableState3 = useForceableState(testOnly_pressed === true),\n pressed = _useForceableState3[0],\n setPressed = _useForceableState3[1];\n\n var hostRef = useRef(null);\n var setRef = useMergeRefs(forwardedRef, hostRef);\n var pressConfig = useMemo(function () {\n return {\n delayLongPress: delayLongPress,\n delayPressStart: delayPressIn,\n delayPressEnd: delayPressOut,\n disabled: disabled,\n onLongPress: onLongPress,\n onPress: onPress,\n onPressChange: setPressed,\n onPressStart: onPressIn,\n onPressMove: onPressMove,\n onPressEnd: onPressOut\n };\n }, [delayLongPress, delayPressIn, delayPressOut, disabled, onLongPress, onPress, onPressIn, onPressMove, onPressOut, setPressed]);\n var pressEventHandlers = usePressEvents(hostRef, pressConfig);\n var onContextMenuPress = pressEventHandlers.onContextMenu,\n onKeyDownPress = pressEventHandlers.onKeyDown;\n useHover(hostRef, {\n contain: true,\n disabled: disabled,\n onHoverChange: setHovered,\n onHoverStart: onHoverIn,\n onHoverEnd: onHoverOut\n });\n var interactionState = {\n hovered: hovered,\n focused: focused,\n pressed: pressed\n };\n var blurHandler = React.useCallback(function (e) {\n if (e.nativeEvent.target === hostRef.current) {\n setFocused(false);\n\n if (onBlur != null) {\n onBlur(e);\n }\n }\n }, [hostRef, setFocused, onBlur]);\n var focusHandler = React.useCallback(function (e) {\n if (e.nativeEvent.target === hostRef.current) {\n setFocused(true);\n\n if (onFocus != null) {\n onFocus(e);\n }\n }\n }, [hostRef, setFocused, onFocus]);\n var contextMenuHandler = React.useCallback(function (e) {\n if (onContextMenuPress != null) {\n onContextMenuPress(e);\n }\n\n if (onContextMenu != null) {\n onContextMenu(e);\n }\n }, [onContextMenu, onContextMenuPress]);\n var keyDownHandler = React.useCallback(function (e) {\n if (onKeyDownPress != null) {\n onKeyDownPress(e);\n }\n\n if (onKeyDown != null) {\n onKeyDown(e);\n }\n }, [onKeyDown, onKeyDownPress]);\n return /*#__PURE__*/React.createElement(View, _extends({}, rest, pressEventHandlers, {\n accessibilityDisabled: disabled,\n focusable: !disabled && focusable !== false,\n onBlur: blurHandler,\n onContextMenu: contextMenuHandler,\n onFocus: focusHandler,\n onKeyDown: keyDownHandler,\n ref: setRef,\n style: [!disabled && styles.root, typeof style === 'function' ? style(interactionState) : style]\n }), typeof children === 'function' ? children(interactionState) : children);\n}\n\nfunction useForceableState(forced) {\n var _useState = useState(false),\n bool = _useState[0],\n setBool = _useState[1];\n\n return [bool || forced, setBool];\n}\n\nvar styles = StyleSheet.create({\n root: {\n cursor: 'pointer',\n touchAction: 'manipulation'\n }\n});\nvar MemoedPressable = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(Pressable));\nMemoedPressable.displayName = 'Pressable';\nexport default MemoedPressable;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nvar ProgressBar = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var _props$color = props.color,\n color = _props$color === void 0 ? '#1976D2' : _props$color,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$progress = props.progress,\n progress = _props$progress === void 0 ? 0 : _props$progress,\n _props$trackColor = props.trackColor,\n trackColor = _props$trackColor === void 0 ? 'transparent' : _props$trackColor,\n style = props.style,\n other = _objectWithoutPropertiesLoose(props, [\"color\", \"indeterminate\", \"progress\", \"trackColor\", \"style\"]);\n\n var percentageProgress = progress * 100;\n var progressRef = React.useRef(null);\n React.useEffect(function () {\n var width = indeterminate ? '25%' : percentageProgress + \"%\";\n\n if (progressRef.current != null) {\n progressRef.current.setNativeProps({\n style: {\n width: width\n }\n });\n }\n }, [indeterminate, percentageProgress, progressRef]);\n return /*#__PURE__*/React.createElement(View, _extends({}, other, {\n accessibilityRole: \"progressbar\",\n accessibilityValue: {\n max: 100,\n min: 0,\n now: indeterminate ? null : percentageProgress\n },\n ref: ref,\n style: [styles.track, style, {\n backgroundColor: trackColor\n }]\n }), /*#__PURE__*/React.createElement(View, {\n ref: progressRef,\n style: [styles.progress, indeterminate && styles.animation, {\n backgroundColor: color\n }]\n }));\n});\nProgressBar.displayName = 'ProgressBar';\nvar styles = StyleSheet.create({\n track: {\n height: 5,\n overflow: 'hidden',\n userSelect: 'none',\n zIndex: 0\n },\n progress: {\n height: '100%',\n zIndex: -1\n },\n animation: {\n animationDuration: '1s',\n animationKeyframes: [{\n '0%': {\n transform: [{\n translateX: '-100%'\n }]\n },\n '100%': {\n transform: [{\n translateX: '400%'\n }]\n }\n }],\n animationTimingFunction: 'linear',\n animationIterationCount: 'infinite'\n }\n});\nexport default ProgressBar;","/* eslint-disable */\n\n/**\n * Copyright 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * From React 16.0.0\n */\nimport invariant from 'fbjs/lib/invariant';\n\nvar twoArgumentPooler = function twoArgumentPooler(a1, a2) {\n var Klass = this;\n\n if (Klass.instancePool.length) {\n var instance = Klass.instancePool.pop();\n Klass.call(instance, a1, a2);\n return instance;\n } else {\n return new Klass(a1, a2);\n }\n};\n\nvar standardReleaser = function standardReleaser(instance) {\n var Klass = this;\n instance.destructor();\n\n if (Klass.instancePool.length < Klass.poolSize) {\n Klass.instancePool.push(instance);\n }\n};\n\nvar DEFAULT_POOL_SIZE = 10;\nvar DEFAULT_POOLER = twoArgumentPooler;\n/**\n * Augments `CopyConstructor` to be a poolable class, augmenting only the class\n * itself (statically) not adding any prototypical fields. Any CopyConstructor\n * you give this may have a `poolSize` property, and will look for a\n * prototypical `destructor` on instances.\n *\n * @param {Function} CopyConstructor Constructor that can be used to reset.\n * @param {Function} pooler Customizable pooler.\n */\n\nvar addPoolingTo = function addPoolingTo(CopyConstructor, pooler) {\n // Casting as any so that flow ignores the actual implementation and trusts\n // it to match the type we declared\n var NewKlass = CopyConstructor;\n NewKlass.instancePool = [];\n NewKlass.getPooled = pooler || DEFAULT_POOLER;\n\n if (!NewKlass.poolSize) {\n NewKlass.poolSize = DEFAULT_POOL_SIZE;\n }\n\n NewKlass.release = standardReleaser;\n return NewKlass;\n};\n\nvar PooledClass = {\n addPoolingTo: addPoolingTo,\n twoArgumentPooler: twoArgumentPooler\n};\nexport default PooledClass;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport PooledClass from '../../vendor/react-native/PooledClass';\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\n/**\n * PooledClass representing the bounding rectangle of a region.\n */\n\nfunction BoundingDimensions(width, height) {\n this.width = width;\n this.height = height;\n}\n\nBoundingDimensions.prototype.destructor = function () {\n this.width = null;\n this.height = null;\n};\n\nBoundingDimensions.getPooledFromElement = function (element) {\n return BoundingDimensions.getPooled(element.offsetWidth, element.offsetHeight);\n};\n\nPooledClass.addPoolingTo(BoundingDimensions, twoArgumentPooler);\nexport default BoundingDimensions;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport PooledClass from '../../vendor/react-native/PooledClass';\nvar twoArgumentPooler = PooledClass.twoArgumentPooler;\n\nfunction Position(left, top) {\n this.left = left;\n this.top = top;\n}\n\nPosition.prototype.destructor = function () {\n this.left = null;\n this.top = null;\n};\n\nPooledClass.addPoolingTo(Position, twoArgumentPooler);\nexport default Position;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport AccessibilityUtil from '../../modules/AccessibilityUtil';\nimport BoundingDimensions from './BoundingDimensions';\nimport findNodeHandle from '../findNodeHandle';\nimport normalizeColor from 'normalize-css-color';\nimport Position from './Position';\nimport React from 'react';\nimport UIManager from '../UIManager';\nimport View from '../View';\n\nvar extractSingleTouch = function extractSingleTouch(nativeEvent) {\n var touches = nativeEvent.touches;\n var changedTouches = nativeEvent.changedTouches;\n var hasTouches = touches && touches.length > 0;\n var hasChangedTouches = changedTouches && changedTouches.length > 0;\n return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent;\n};\n/**\n * `Touchable`: Taps done right.\n *\n * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable`\n * will measure time/geometry and tells you when to give feedback to the user.\n *\n * ====================== Touchable Tutorial ===============================\n * The `Touchable` mixin helps you handle the \"press\" interaction. It analyzes\n * the geometry of elements, and observes when another responder (scroll view\n * etc) has stolen the touch lock. It notifies your component when it should\n * give feedback to the user. (bouncing/highlighting/unhighlighting).\n *\n * - When a touch was activated (typically you highlight)\n * - When a touch was deactivated (typically you unhighlight)\n * - When a touch was \"pressed\" - a touch ended while still within the geometry\n * of the element, and no other element (like scroller) has \"stolen\" touch\n * lock (\"responder\") (Typically you bounce the element).\n *\n * A good tap interaction isn't as simple as you might think. There should be a\n * slight delay before showing a highlight when starting a touch. If a\n * subsequent touch move exceeds the boundary of the element, it should\n * unhighlight, but if that same touch is brought back within the boundary, it\n * should rehighlight again. A touch can move in and out of that boundary\n * several times, each time toggling highlighting, but a \"press\" is only\n * triggered if that touch ends while within the element's boundary and no\n * scroller (or anything else) has stolen the lock on touches.\n *\n * To create a new type of component that handles interaction using the\n * `Touchable` mixin, do the following:\n *\n * - Initialize the `Touchable` state.\n *\n * getInitialState: function() {\n * return merge(this.touchableGetInitialState(), yourComponentState);\n * }\n *\n * - Choose the rendered component who's touches should start the interactive\n * sequence. On that rendered node, forward all `Touchable` responder\n * handlers. You can choose any rendered node you like. Choose a node whose\n * hit target you'd like to instigate the interaction sequence:\n *\n * // In render function:\n * return (\n * <View\n * onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}\n * onResponderTerminationRequest={this.touchableHandleResponderTerminationRequest}\n * onResponderGrant={this.touchableHandleResponderGrant}\n * onResponderMove={this.touchableHandleResponderMove}\n * onResponderRelease={this.touchableHandleResponderRelease}\n * onResponderTerminate={this.touchableHandleResponderTerminate}>\n * <View>\n * Even though the hit detection/interactions are triggered by the\n * wrapping (typically larger) node, we usually end up implementing\n * custom logic that highlights this inner one.\n * </View>\n * </View>\n * );\n *\n * - You may set up your own handlers for each of these events, so long as you\n * also invoke the `touchable*` handlers inside of your custom handler.\n *\n * - Implement the handlers on your component class in order to provide\n * feedback to the user. See documentation for each of these class methods\n * that you should implement.\n *\n * touchableHandlePress: function() {\n * this.performBounceAnimation(); // or whatever you want to do.\n * },\n * touchableHandleActivePressIn: function() {\n * this.beginHighlighting(...); // Whatever you like to convey activation\n * },\n * touchableHandleActivePressOut: function() {\n * this.endHighlighting(...); // Whatever you like to convey deactivation\n * },\n *\n * - There are more advanced methods you can implement (see documentation below):\n * touchableGetHighlightDelayMS: function() {\n * return 20;\n * }\n * // In practice, *always* use a predeclared constant (conserve memory).\n * touchableGetPressRectOffset: function() {\n * return {top: 20, left: 20, right: 20, bottom: 100};\n * }\n */\n\n/**\n * Touchable states.\n */\n\n\nvar States = {\n NOT_RESPONDER: 'NOT_RESPONDER',\n // Not the responder\n RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN',\n // Responder, inactive, in the `PressRect`\n RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT',\n // Responder, inactive, out of `PressRect`\n RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN',\n // Responder, active, in the `PressRect`\n RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT',\n // Responder, active, out of `PressRect`\n RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN',\n // Responder, active, in the `PressRect`, after long press threshold\n RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT',\n // Responder, active, out of `PressRect`, after long press threshold\n ERROR: 'ERROR'\n};\n\n/*\n * Quick lookup map for states that are considered to be \"active\"\n */\nvar baseStatesConditions = {\n NOT_RESPONDER: false,\n RESPONDER_INACTIVE_PRESS_IN: false,\n RESPONDER_INACTIVE_PRESS_OUT: false,\n RESPONDER_ACTIVE_PRESS_IN: false,\n RESPONDER_ACTIVE_PRESS_OUT: false,\n RESPONDER_ACTIVE_LONG_PRESS_IN: false,\n RESPONDER_ACTIVE_LONG_PRESS_OUT: false,\n ERROR: false\n};\n\nvar IsActive = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_ACTIVE_PRESS_OUT: true,\n RESPONDER_ACTIVE_PRESS_IN: true\n});\n/**\n * Quick lookup for states that are considered to be \"pressing\" and are\n * therefore eligible to result in a \"selection\" if the press stops.\n */\n\n\nvar IsPressingIn = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_INACTIVE_PRESS_IN: true,\n RESPONDER_ACTIVE_PRESS_IN: true,\n RESPONDER_ACTIVE_LONG_PRESS_IN: true\n});\n\nvar IsLongPressingIn = _objectSpread(_objectSpread({}, baseStatesConditions), {}, {\n RESPONDER_ACTIVE_LONG_PRESS_IN: true\n});\n/**\n * Inputs to the state machine.\n */\n\n\nvar Signals = {\n DELAY: 'DELAY',\n RESPONDER_GRANT: 'RESPONDER_GRANT',\n RESPONDER_RELEASE: 'RESPONDER_RELEASE',\n RESPONDER_TERMINATED: 'RESPONDER_TERMINATED',\n ENTER_PRESS_RECT: 'ENTER_PRESS_RECT',\n LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT',\n LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED'\n};\n\n/**\n * Mapping from States x Signals => States\n */\nvar Transitions = {\n NOT_RESPONDER: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,\n RESPONDER_RELEASE: States.ERROR,\n RESPONDER_TERMINATED: States.ERROR,\n ENTER_PRESS_RECT: States.ERROR,\n LEAVE_PRESS_RECT: States.ERROR,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_INACTIVE_PRESS_IN: {\n DELAY: States.RESPONDER_ACTIVE_PRESS_IN,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_INACTIVE_PRESS_OUT: {\n DELAY: States.RESPONDER_ACTIVE_PRESS_OUT,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_ACTIVE_PRESS_IN: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN\n },\n RESPONDER_ACTIVE_PRESS_OUT: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n RESPONDER_ACTIVE_LONG_PRESS_IN: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,\n LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN\n },\n RESPONDER_ACTIVE_LONG_PRESS_OUT: {\n DELAY: States.ERROR,\n RESPONDER_GRANT: States.ERROR,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN,\n LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT,\n LONG_PRESS_DETECTED: States.ERROR\n },\n error: {\n DELAY: States.NOT_RESPONDER,\n RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN,\n RESPONDER_RELEASE: States.NOT_RESPONDER,\n RESPONDER_TERMINATED: States.NOT_RESPONDER,\n ENTER_PRESS_RECT: States.NOT_RESPONDER,\n LEAVE_PRESS_RECT: States.NOT_RESPONDER,\n LONG_PRESS_DETECTED: States.NOT_RESPONDER\n }\n}; // ==== Typical Constants for integrating into UI components ====\n// var HIT_EXPAND_PX = 20;\n// var HIT_VERT_OFFSET_PX = 10;\n\nvar HIGHLIGHT_DELAY_MS = 130;\nvar PRESS_EXPAND_PX = 20;\nvar LONG_PRESS_THRESHOLD = 500;\nvar LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS;\nvar LONG_PRESS_ALLOWED_MOVEMENT = 10; // Default amount \"active\" region protrudes beyond box\n\n/**\n * By convention, methods prefixed with underscores are meant to be @private,\n * and not @protected. Mixers shouldn't access them - not even to provide them\n * as callback handlers.\n *\n *\n * ========== Geometry =========\n * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect`\n * is an abstract box that is extended beyond the `HitRect`.\n *\n * +--------------------------+\n * | | - \"Start\" events in `HitRect` cause `HitRect`\n * | +--------------------+ | to become the responder.\n * | | +--------------+ | | - `HitRect` is typically expanded around\n * | | | | | | the `VisualRect`, but shifted downward.\n * | | | VisualRect | | | - After pressing down, after some delay,\n * | | | | | | and before letting up, the Visual React\n * | | +--------------+ | | will become \"active\". This makes it eligible\n * | | HitRect | | for being highlighted (so long as the\n * | +--------------------+ | press remains in the `PressRect`).\n * | PressRect o |\n * +----------------------|---+\n * Out Region |\n * +-----+ This gap between the `HitRect` and\n * `PressRect` allows a touch to move far away\n * from the original hit rect, and remain\n * highlighted, and eligible for a \"Press\".\n * Customize this via\n * `touchableGetPressRectOffset()`.\n *\n *\n *\n * ======= State Machine =======\n *\n * +-------------+ <---+ RESPONDER_RELEASE\n * |NOT_RESPONDER|\n * +-------------+ <---+ RESPONDER_TERMINATED\n * +\n * | RESPONDER_GRANT (HitRect)\n * v\n * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+\n * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN|\n * +---------------------------+ +-------------------------+ +------------------------------+\n * + ^ + ^ + ^\n * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_\n * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT\n * | | | | | |\n * v + v + v +\n * +----------------------------+ DELAY +--------------------------+ +-------------------------------+\n * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT|\n * +----------------------------+ +--------------------------+ +-------------------------------+\n *\n * T + DELAY => LONG_PRESS_DELAY_MS + DELAY\n *\n * Not drawn are the side effects of each transition. The most important side\n * effect is the `touchableHandlePress` abstract method invocation that occurs\n * when a responder is released while in either of the \"Press\" states.\n *\n * The other important side effects are the highlight abstract method\n * invocations (internal callbacks) to be implemented by the mixer.\n *\n *\n * @lends Touchable.prototype\n */\n\nvar TouchableMixin = {\n // HACK (part 1): basic support for touchable interactions using a keyboard\n componentDidMount: function componentDidMount() {\n var _this = this;\n\n this._touchableNode = findNodeHandle(this);\n\n if (this._touchableNode && this._touchableNode.addEventListener) {\n this._touchableBlurListener = function (e) {\n if (_this._isTouchableKeyboardActive) {\n if (_this.state.touchable.touchState && _this.state.touchable.touchState !== States.NOT_RESPONDER) {\n _this.touchableHandleResponderTerminate({\n nativeEvent: e\n });\n }\n\n _this._isTouchableKeyboardActive = false;\n }\n };\n\n this._touchableNode.addEventListener('blur', this._touchableBlurListener);\n }\n },\n\n /**\n * Clear all timeouts on unmount\n */\n componentWillUnmount: function componentWillUnmount() {\n if (this._touchableNode && this._touchableNode.addEventListener) {\n this._touchableNode.removeEventListener('blur', this._touchableBlurListener);\n }\n\n this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);\n this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);\n this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); // Clear DOM nodes\n\n this.pressInLocation = null;\n this.state.touchable.responderID = null;\n this._touchableNode = null;\n },\n\n /**\n * It's prefer that mixins determine state in this way, having the class\n * explicitly mix the state in the one and only `getInitialState` method.\n *\n * @return {object} State object to be placed inside of\n * `this.state.touchable`.\n */\n touchableGetInitialState: function touchableGetInitialState() {\n return {\n touchable: {\n touchState: undefined,\n responderID: null\n }\n };\n },\n // ==== Hooks to Gesture Responder system ====\n\n /**\n * Must return true if embedded in a native platform scroll view.\n */\n touchableHandleResponderTerminationRequest: function touchableHandleResponderTerminationRequest() {\n return !this.props.rejectResponderTermination;\n },\n\n /**\n * Must return true to start the process of `Touchable`.\n */\n touchableHandleStartShouldSetResponder: function touchableHandleStartShouldSetResponder() {\n return !this.props.disabled;\n },\n\n /**\n * Return true to cancel press on long press.\n */\n touchableLongPressCancelsPress: function touchableLongPressCancelsPress() {\n return true;\n },\n\n /**\n * Place as callback for a DOM element's `onResponderGrant` event.\n * @param {SyntheticEvent} e Synthetic event from event system.\n *\n */\n touchableHandleResponderGrant: function touchableHandleResponderGrant(e) {\n var dispatchID = e.currentTarget; // Since e is used in a callback invoked on another event loop\n // (as in setTimeout etc), we need to call e.persist() on the\n // event to make sure it doesn't get reused in the event object pool.\n\n e.persist();\n this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);\n this.pressOutDelayTimeout = null;\n this.state.touchable.touchState = States.NOT_RESPONDER;\n this.state.touchable.responderID = dispatchID;\n\n this._receiveSignal(Signals.RESPONDER_GRANT, e);\n\n var delayMS = this.touchableGetHighlightDelayMS !== undefined ? Math.max(this.touchableGetHighlightDelayMS(), 0) : HIGHLIGHT_DELAY_MS;\n delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS;\n\n if (delayMS !== 0) {\n this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS);\n } else {\n this._handleDelay(e);\n }\n\n var longDelayMS = this.touchableGetLongPressDelayMS !== undefined ? Math.max(this.touchableGetLongPressDelayMS(), 10) : LONG_PRESS_DELAY_MS;\n longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS;\n this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), longDelayMS + delayMS);\n },\n\n /**\n * Place as callback for a DOM element's `onResponderRelease` event.\n */\n touchableHandleResponderRelease: function touchableHandleResponderRelease(e) {\n this.pressInLocation = null;\n\n this._receiveSignal(Signals.RESPONDER_RELEASE, e);\n },\n\n /**\n * Place as callback for a DOM element's `onResponderTerminate` event.\n */\n touchableHandleResponderTerminate: function touchableHandleResponderTerminate(e) {\n this.pressInLocation = null;\n\n this._receiveSignal(Signals.RESPONDER_TERMINATED, e);\n },\n\n /**\n * Place as callback for a DOM element's `onResponderMove` event.\n */\n touchableHandleResponderMove: function touchableHandleResponderMove(e) {\n // Measurement may not have returned yet.\n if (!this.state.touchable.positionOnActivate) {\n return;\n }\n\n var positionOnActivate = this.state.touchable.positionOnActivate;\n var dimensionsOnActivate = this.state.touchable.dimensionsOnActivate;\n var pressRectOffset = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : {\n left: PRESS_EXPAND_PX,\n right: PRESS_EXPAND_PX,\n top: PRESS_EXPAND_PX,\n bottom: PRESS_EXPAND_PX\n };\n var pressExpandLeft = pressRectOffset.left;\n var pressExpandTop = pressRectOffset.top;\n var pressExpandRight = pressRectOffset.right;\n var pressExpandBottom = pressRectOffset.bottom;\n var hitSlop = this.touchableGetHitSlop ? this.touchableGetHitSlop() : null;\n\n if (hitSlop) {\n pressExpandLeft += hitSlop.left || 0;\n pressExpandTop += hitSlop.top || 0;\n pressExpandRight += hitSlop.right || 0;\n pressExpandBottom += hitSlop.bottom || 0;\n }\n\n var touch = extractSingleTouch(e.nativeEvent);\n var pageX = touch && touch.pageX;\n var pageY = touch && touch.pageY;\n\n if (this.pressInLocation) {\n var movedDistance = this._getDistanceBetweenPoints(pageX, pageY, this.pressInLocation.pageX, this.pressInLocation.pageY);\n\n if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) {\n this._cancelLongPressDelayTimeout();\n }\n }\n\n var isTouchWithinActive = pageX > positionOnActivate.left - pressExpandLeft && pageY > positionOnActivate.top - pressExpandTop && pageX < positionOnActivate.left + dimensionsOnActivate.width + pressExpandRight && pageY < positionOnActivate.top + dimensionsOnActivate.height + pressExpandBottom;\n\n if (isTouchWithinActive) {\n var prevState = this.state.touchable.touchState;\n\n this._receiveSignal(Signals.ENTER_PRESS_RECT, e);\n\n var curState = this.state.touchable.touchState;\n\n if (curState === States.RESPONDER_INACTIVE_PRESS_IN && prevState !== States.RESPONDER_INACTIVE_PRESS_IN) {\n // fix for t7967420\n this._cancelLongPressDelayTimeout();\n }\n } else {\n this._cancelLongPressDelayTimeout();\n\n this._receiveSignal(Signals.LEAVE_PRESS_RECT, e);\n }\n },\n\n /**\n * Invoked when the item receives focus. Mixers might override this to\n * visually distinguish the `VisualRect` so that the user knows that it\n * currently has the focus. Most platforms only support a single element being\n * focused at a time, in which case there may have been a previously focused\n * element that was blurred just prior to this. This can be overridden when\n * using `Touchable.Mixin.withoutDefaultFocusAndBlur`.\n */\n touchableHandleFocus: function touchableHandleFocus(e) {\n this.props.onFocus && this.props.onFocus(e);\n },\n\n /**\n * Invoked when the item loses focus. Mixers might override this to\n * visually distinguish the `VisualRect` so that the user knows that it\n * no longer has focus. Most platforms only support a single element being\n * focused at a time, in which case the focus may have moved to another.\n * This can be overridden when using\n * `Touchable.Mixin.withoutDefaultFocusAndBlur`.\n */\n touchableHandleBlur: function touchableHandleBlur(e) {\n this.props.onBlur && this.props.onBlur(e);\n },\n // ==== Abstract Application Callbacks ====\n\n /**\n * Invoked when the item should be highlighted. Mixers should implement this\n * to visually distinguish the `VisualRect` so that the user knows that\n * releasing a touch will result in a \"selection\" (analog to click).\n *\n * @abstract\n * touchableHandleActivePressIn: function,\n */\n\n /**\n * Invoked when the item is \"active\" (in that it is still eligible to become\n * a \"select\") but the touch has left the `PressRect`. Usually the mixer will\n * want to unhighlight the `VisualRect`. If the user (while pressing) moves\n * back into the `PressRect` `touchableHandleActivePressIn` will be invoked\n * again and the mixer should probably highlight the `VisualRect` again. This\n * event will not fire on an `touchEnd/mouseUp` event, only move events while\n * the user is depressing the mouse/touch.\n *\n * @abstract\n * touchableHandleActivePressOut: function\n */\n\n /**\n * Invoked when the item is \"selected\" - meaning the interaction ended by\n * letting up while the item was either in the state\n * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`.\n *\n * @abstract\n * touchableHandlePress: function\n */\n\n /**\n * Invoked when the item is long pressed - meaning the interaction ended by\n * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If\n * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will\n * be called as it normally is. If `touchableHandleLongPress` is provided, by\n * default any `touchableHandlePress` callback will not be invoked. To\n * override this default behavior, override `touchableLongPressCancelsPress`\n * to return false. As a result, `touchableHandlePress` will be called when\n * lifting up, even if `touchableHandleLongPress` has also been called.\n *\n * @abstract\n * touchableHandleLongPress: function\n */\n\n /**\n * Returns the number of millis to wait before triggering a highlight.\n *\n * @abstract\n * touchableGetHighlightDelayMS: function\n */\n\n /**\n * Returns the amount to extend the `HitRect` into the `PressRect`. Positive\n * numbers mean the size expands outwards.\n *\n * @abstract\n * touchableGetPressRectOffset: function\n */\n // ==== Internal Logic ====\n\n /**\n * Measures the `HitRect` node on activation. The Bounding rectangle is with\n * respect to viewport - not page, so adding the `pageXOffset/pageYOffset`\n * should result in points that are in the same coordinate system as an\n * event's `globalX/globalY` data values.\n *\n * - Consider caching this for the lifetime of the component, or possibly\n * being able to share this cache between any `ScrollMap` view.\n *\n * @sideeffects\n * @private\n */\n _remeasureMetricsOnActivation: function _remeasureMetricsOnActivation() {\n var tag = this.state.touchable.responderID;\n\n if (tag == null) {\n return;\n }\n\n UIManager.measure(tag, this._handleQueryLayout);\n },\n _handleQueryLayout: function _handleQueryLayout(l, t, w, h, globalX, globalY) {\n //don't do anything UIManager failed to measure node\n if (!l && !t && !w && !h && !globalX && !globalY) {\n return;\n }\n\n this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate);\n this.state.touchable.dimensionsOnActivate && // $FlowFixMe\n BoundingDimensions.release(this.state.touchable.dimensionsOnActivate);\n this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY); // $FlowFixMe\n\n this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h);\n },\n _handleDelay: function _handleDelay(e) {\n this.touchableDelayTimeout = null;\n\n this._receiveSignal(Signals.DELAY, e);\n },\n _handleLongDelay: function _handleLongDelay(e) {\n this.longPressDelayTimeout = null;\n var curState = this.state.touchable.touchState;\n\n if (curState !== States.RESPONDER_ACTIVE_PRESS_IN && curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) {\n console.error('Attempted to transition from state `' + curState + '` to `' + States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' + 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.');\n } else {\n this._receiveSignal(Signals.LONG_PRESS_DETECTED, e);\n }\n },\n\n /**\n * Receives a state machine signal, performs side effects of the transition\n * and stores the new state. Validates the transition as well.\n *\n * @param {Signals} signal State machine signal.\n * @throws Error if invalid state transition or unrecognized signal.\n * @sideeffects\n */\n _receiveSignal: function _receiveSignal(signal, e) {\n var responderID = this.state.touchable.responderID;\n var curState = this.state.touchable.touchState;\n var nextState = Transitions[curState] && Transitions[curState][signal];\n\n if (!responderID && signal === Signals.RESPONDER_RELEASE) {\n return;\n }\n\n if (!nextState) {\n throw new Error('Unrecognized signal `' + signal + '` or state `' + curState + '` for Touchable responder `' + responderID + '`');\n }\n\n if (nextState === States.ERROR) {\n throw new Error('Touchable cannot transition from `' + curState + '` to `' + signal + '` for responder `' + responderID + '`');\n }\n\n if (curState !== nextState) {\n this._performSideEffectsForTransition(curState, nextState, signal, e);\n\n this.state.touchable.touchState = nextState;\n }\n },\n _cancelLongPressDelayTimeout: function _cancelLongPressDelayTimeout() {\n this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);\n this.longPressDelayTimeout = null;\n },\n _isHighlight: function _isHighlight(state) {\n return state === States.RESPONDER_ACTIVE_PRESS_IN || state === States.RESPONDER_ACTIVE_LONG_PRESS_IN;\n },\n _savePressInLocation: function _savePressInLocation(e) {\n var touch = extractSingleTouch(e.nativeEvent);\n var pageX = touch && touch.pageX;\n var pageY = touch && touch.pageY;\n var locationX = touch && touch.locationX;\n var locationY = touch && touch.locationY;\n this.pressInLocation = {\n pageX: pageX,\n pageY: pageY,\n locationX: locationX,\n locationY: locationY\n };\n },\n _getDistanceBetweenPoints: function _getDistanceBetweenPoints(aX, aY, bX, bY) {\n var deltaX = aX - bX;\n var deltaY = aY - bY;\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n },\n\n /**\n * Will perform a transition between touchable states, and identify any\n * highlighting or unhighlighting that must be performed for this particular\n * transition.\n *\n * @param {States} curState Current Touchable state.\n * @param {States} nextState Next Touchable state.\n * @param {Signal} signal Signal that triggered the transition.\n * @param {Event} e Native event.\n * @sideeffects\n */\n _performSideEffectsForTransition: function _performSideEffectsForTransition(curState, nextState, signal, e) {\n var curIsHighlight = this._isHighlight(curState);\n\n var newIsHighlight = this._isHighlight(nextState);\n\n var isFinalSignal = signal === Signals.RESPONDER_TERMINATED || signal === Signals.RESPONDER_RELEASE;\n\n if (isFinalSignal) {\n this._cancelLongPressDelayTimeout();\n }\n\n var isInitialTransition = curState === States.NOT_RESPONDER && nextState === States.RESPONDER_INACTIVE_PRESS_IN;\n var isActiveTransition = !IsActive[curState] && IsActive[nextState];\n\n if (isInitialTransition || isActiveTransition) {\n this._remeasureMetricsOnActivation();\n }\n\n if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) {\n this.touchableHandleLongPress && this.touchableHandleLongPress(e);\n }\n\n if (newIsHighlight && !curIsHighlight) {\n this._startHighlight(e);\n } else if (!newIsHighlight && curIsHighlight) {\n this._endHighlight(e);\n }\n\n if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) {\n var hasLongPressHandler = !!this.props.onLongPress;\n var pressIsLongButStillCallOnPress = IsLongPressingIn[curState] && ( // We *are* long pressing.. // But either has no long handler\n !hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it.\n\n var shouldInvokePress = !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress;\n\n if (shouldInvokePress && this.touchableHandlePress) {\n if (!newIsHighlight && !curIsHighlight) {\n // we never highlighted because of delay, but we should highlight now\n this._startHighlight(e);\n\n this._endHighlight(e);\n }\n\n this.touchableHandlePress(e);\n }\n }\n\n this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);\n this.touchableDelayTimeout = null;\n },\n _playTouchSound: function _playTouchSound() {\n UIManager.playTouchSound();\n },\n _startHighlight: function _startHighlight(e) {\n this._savePressInLocation(e);\n\n this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);\n },\n _endHighlight: function _endHighlight(e) {\n var _this2 = this;\n\n if (this.touchableHandleActivePressOut) {\n if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) {\n this.pressOutDelayTimeout = setTimeout(function () {\n _this2.touchableHandleActivePressOut(e);\n }, this.touchableGetPressOutDelayMS());\n } else {\n this.touchableHandleActivePressOut(e);\n }\n }\n },\n // HACK (part 2): basic support for touchable interactions using a keyboard (including\n // delays and longPress)\n touchableHandleKeyEvent: function touchableHandleKeyEvent(e) {\n var type = e.type,\n key = e.key;\n\n if (key === 'Enter' || key === ' ') {\n if (type === 'keydown') {\n if (!this._isTouchableKeyboardActive) {\n if (!this.state.touchable.touchState || this.state.touchable.touchState === States.NOT_RESPONDER) {\n this.touchableHandleResponderGrant(e);\n this._isTouchableKeyboardActive = true;\n }\n }\n } else if (type === 'keyup') {\n if (this._isTouchableKeyboardActive) {\n if (this.state.touchable.touchState && this.state.touchable.touchState !== States.NOT_RESPONDER) {\n this.touchableHandleResponderRelease(e);\n this._isTouchableKeyboardActive = false;\n }\n }\n }\n\n e.stopPropagation(); // prevent the default behaviour unless the Touchable functions as a link\n // and Enter is pressed\n\n if (!(key === 'Enter' && AccessibilityUtil.propsToAriaRole(this.props) === 'link')) {\n e.preventDefault();\n }\n }\n },\n withoutDefaultFocusAndBlur: {}\n};\n/**\n * Provide an optional version of the mixin where `touchableHandleFocus` and\n * `touchableHandleBlur` can be overridden. This allows appropriate defaults to\n * be set on TV platforms, without breaking existing implementations of\n * `Touchable`.\n */\n\nvar touchableHandleFocus = TouchableMixin.touchableHandleFocus,\n touchableHandleBlur = TouchableMixin.touchableHandleBlur,\n TouchableMixinWithoutDefaultFocusAndBlur = _objectWithoutPropertiesLoose(TouchableMixin, [\"touchableHandleFocus\", \"touchableHandleBlur\"]);\n\nTouchableMixin.withoutDefaultFocusAndBlur = TouchableMixinWithoutDefaultFocusAndBlur;\nvar Touchable = {\n Mixin: TouchableMixin,\n TOUCH_TARGET_DEBUG: false,\n // Highlights all touchable targets. Toggle with Inspector.\n\n /**\n * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android).\n */\n renderDebugView: function renderDebugView(_ref) {\n var color = _ref.color,\n hitSlop = _ref.hitSlop;\n\n if (!Touchable.TOUCH_TARGET_DEBUG) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n throw Error('Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!');\n }\n\n var debugHitSlopStyle = {};\n hitSlop = hitSlop || {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n };\n\n for (var key in hitSlop) {\n debugHitSlopStyle[key] = -hitSlop[key];\n }\n\n var normalizedColor = normalizeColor(color);\n\n if (typeof normalizedColor !== 'number') {\n return null;\n }\n\n var hexColor = '#' + ('00000000' + normalizedColor.toString(16)).substr(-8);\n return /*#__PURE__*/React.createElement(View, {\n pointerEvents: \"none\",\n style: _objectSpread({\n position: 'absolute',\n borderColor: hexColor.slice(0, -2) + '55',\n // More opaque\n borderWidth: 1,\n borderStyle: 'dashed',\n backgroundColor: hexColor.slice(0, -2) + '0F'\n }, debugHitSlopStyle)\n });\n }\n};\nexport default Touchable;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport VirtualizedList from '../../vendor/react-native/VirtualizedList';\nexport default VirtualizedList;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport React from 'react';\nimport UnimplementedView from '../../modules/UnimplementedView';\n\nfunction YellowBox(props) {\n return /*#__PURE__*/React.createElement(UnimplementedView, props);\n}\n\nYellowBox.ignoreWarnings = function () {};\n\nexport default YellowBox;","import UnimplementedView from '../../modules/UnimplementedView';\nexport default UnimplementedView;","import UnimplementedView from '../../modules/UnimplementedView';\nexport default UnimplementedView;","import UnimplementedView from '../../modules/UnimplementedView';\nexport default UnimplementedView;","var promiseMock = function promiseMock() {\n return Promise.resolve(false);\n};\n\nexport default {\n PERMISSIONS: {},\n RESULTS: {},\n checkPermission: promiseMock,\n check: promiseMock,\n requestPermission: promiseMock,\n request: promiseMock,\n requestMultiple: promiseMock\n};","export default {};","export default {};","export default {};","import RCTDeviceEventEmitter from '../../vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter';\nexport default RCTDeviceEventEmitter;","/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport * as React from 'react';\nimport Appearance from '../Appearance';\nexport default function useColorScheme() {\n var _React$useState = React.useState(Appearance.getColorScheme()),\n colorScheme = _React$useState[0],\n setColorScheme = _React$useState[1];\n\n React.useEffect(function () {\n function listener(appearance) {\n setColorScheme(appearance.colorScheme);\n }\n\n Appearance.addChangeListener(listener);\n return function () {\n return Appearance.removeChangeListener(listener);\n };\n });\n return colorScheme;\n}","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nimport Dimensions from '../Dimensions';\nimport { useEffect, useState } from 'react';\nexport default function useWindowDimensions() {\n var _useState = useState(function () {\n return Dimensions.get('window');\n }),\n dims = _useState[0],\n setDims = _useState[1];\n\n useEffect(function () {\n function handleChange(_ref) {\n var window = _ref.window;\n\n if (window != null) {\n setDims(window);\n }\n }\n\n Dimensions.addEventListener('change', handleChange); // We might have missed an update between calling `get` in render and\n // `addEventListener` in this handler, so we set it here. If there was\n // no change, React will filter out this update as a no-op.\n\n setDims(Dimensions.get('window'));\n return function () {\n Dimensions.removeEventListener('change', handleChange);\n };\n }, []);\n return dims;\n}","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n'use strict';\n\nvar emptyFunction = require(\"./emptyFunction\");\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\n\nfunction printWarning(format) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n}\n\nvar warning = process.env.NODE_ENV !== \"production\" ? function (condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(void 0, [format].concat(args));\n }\n} : emptyFunction;\nmodule.exports = warning;","module.exports = require('./lib/axios');","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from '../nodes/AnimatedValue';\nimport AnimatedValueXY from '../nodes/AnimatedValueXY';\nimport AnimatedInterpolation from '../nodes/AnimatedInterpolation';\nimport Animation from './Animation';\nimport SpringConfig from '../SpringConfig';\nimport invariant from 'fbjs/lib/invariant';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\n\nvar SpringAnimation = /*#__PURE__*/function (_Animation) {\n _inheritsLoose(SpringAnimation, _Animation);\n\n function SpringAnimation(config) {\n var _config$overshootClam, _config$restDisplacem, _config$restSpeedThre, _config$velocity, _config$velocity2, _config$delay, _config$isInteraction, _config$iterations;\n\n var _this;\n\n _this = _Animation.call(this) || this;\n _this._overshootClamping = (_config$overshootClam = config.overshootClamping) !== null && _config$overshootClam !== void 0 ? _config$overshootClam : false;\n _this._restDisplacementThreshold = (_config$restDisplacem = config.restDisplacementThreshold) !== null && _config$restDisplacem !== void 0 ? _config$restDisplacem : 0.001;\n _this._restSpeedThreshold = (_config$restSpeedThre = config.restSpeedThreshold) !== null && _config$restSpeedThre !== void 0 ? _config$restSpeedThre : 0.001;\n _this._initialVelocity = (_config$velocity = config.velocity) !== null && _config$velocity !== void 0 ? _config$velocity : 0;\n _this._lastVelocity = (_config$velocity2 = config.velocity) !== null && _config$velocity2 !== void 0 ? _config$velocity2 : 0;\n _this._toValue = config.toValue;\n _this._delay = (_config$delay = config.delay) !== null && _config$delay !== void 0 ? _config$delay : 0;\n _this._useNativeDriver = shouldUseNativeDriver(config);\n _this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !_this._useNativeDriver;\n _this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n\n if (config.stiffness !== undefined || config.damping !== undefined || config.mass !== undefined) {\n var _config$stiffness, _config$damping, _config$mass;\n\n invariant(config.bounciness === undefined && config.speed === undefined && config.tension === undefined && config.friction === undefined, 'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one');\n _this._stiffness = (_config$stiffness = config.stiffness) !== null && _config$stiffness !== void 0 ? _config$stiffness : 100;\n _this._damping = (_config$damping = config.damping) !== null && _config$damping !== void 0 ? _config$damping : 10;\n _this._mass = (_config$mass = config.mass) !== null && _config$mass !== void 0 ? _config$mass : 1;\n } else if (config.bounciness !== undefined || config.speed !== undefined) {\n var _config$bounciness, _config$speed;\n\n // Convert the origami bounciness/speed values to stiffness/damping\n // We assume mass is 1.\n invariant(config.tension === undefined && config.friction === undefined && config.stiffness === undefined && config.damping === undefined && config.mass === undefined, 'You can define one of bounciness/speed, tension/friction, or stiffness/damping/mass, but not more than one');\n var springConfig = SpringConfig.fromBouncinessAndSpeed((_config$bounciness = config.bounciness) !== null && _config$bounciness !== void 0 ? _config$bounciness : 8, (_config$speed = config.speed) !== null && _config$speed !== void 0 ? _config$speed : 12);\n _this._stiffness = springConfig.stiffness;\n _this._damping = springConfig.damping;\n _this._mass = 1;\n } else {\n var _config$tension, _config$friction;\n\n // Convert the origami tension/friction values to stiffness/damping\n // We assume mass is 1.\n var _springConfig = SpringConfig.fromOrigamiTensionAndFriction((_config$tension = config.tension) !== null && _config$tension !== void 0 ? _config$tension : 40, (_config$friction = config.friction) !== null && _config$friction !== void 0 ? _config$friction : 7);\n\n _this._stiffness = _springConfig.stiffness;\n _this._damping = _springConfig.damping;\n _this._mass = 1;\n }\n\n invariant(_this._stiffness > 0, 'Stiffness value must be greater than 0');\n invariant(_this._damping > 0, 'Damping value must be greater than 0');\n invariant(_this._mass > 0, 'Mass value must be greater than 0');\n return _this;\n }\n\n var _proto = SpringAnimation.prototype;\n\n _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n var _this$_initialVelocit;\n\n return {\n type: 'spring',\n overshootClamping: this._overshootClamping,\n restDisplacementThreshold: this._restDisplacementThreshold,\n restSpeedThreshold: this._restSpeedThreshold,\n stiffness: this._stiffness,\n damping: this._damping,\n mass: this._mass,\n initialVelocity: (_this$_initialVelocit = this._initialVelocity) !== null && _this$_initialVelocit !== void 0 ? _this$_initialVelocit : this._lastVelocity,\n toValue: this._toValue,\n iterations: this.__iterations\n };\n };\n\n _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n var _this2 = this;\n\n this.__active = true;\n this._startPosition = fromValue;\n this._lastPosition = this._startPosition;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n this._lastTime = Date.now();\n this._frameTime = 0.0;\n\n if (previousAnimation instanceof SpringAnimation) {\n var internalState = previousAnimation.getInternalState();\n this._lastPosition = internalState.lastPosition;\n this._lastVelocity = internalState.lastVelocity; // Set the initial velocity to the last velocity\n\n this._initialVelocity = this._lastVelocity;\n this._lastTime = internalState.lastTime;\n }\n\n var start = function start() {\n if (_this2._useNativeDriver) {\n _this2.__startNativeAnimation(animatedValue);\n } else {\n _this2.onUpdate();\n }\n }; // If this._delay is more than 0, we start after the timeout.\n\n\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n };\n\n _proto.getInternalState = function getInternalState() {\n return {\n lastPosition: this._lastPosition,\n lastVelocity: this._lastVelocity,\n lastTime: this._lastTime\n };\n }\n /**\n * This spring model is based off of a damped harmonic oscillator\n * (https://en.wikipedia.org/wiki/Harmonic_oscillator#Damped_harmonic_oscillator).\n *\n * We use the closed form of the second order differential equation:\n *\n * x'' + (2ζ⍵_0)x' + ⍵^2x = 0\n *\n * where\n * ⍵_0 = √(k / m) (undamped angular frequency of the oscillator),\n * ζ = c / 2√mk (damping ratio),\n * c = damping constant\n * k = stiffness\n * m = mass\n *\n * The derivation of the closed form is described in detail here:\n * http://planetmath.org/sites/default/files/texpdf/39745.pdf\n *\n * This algorithm happens to match the algorithm used by CASpringAnimation,\n * a QuartzCore (iOS) API that creates spring animations.\n */\n ;\n\n _proto.onUpdate = function onUpdate() {\n // If for some reason we lost a lot of frames (e.g. process large payload or\n // stopped in the debugger), we only advance by 4 frames worth of\n // computation and will continue on the next frame. It's better to have it\n // running at faster speed than jumping to the end.\n var MAX_STEPS = 64;\n var now = Date.now();\n\n if (now > this._lastTime + MAX_STEPS) {\n now = this._lastTime + MAX_STEPS;\n }\n\n var deltaTime = (now - this._lastTime) / 1000;\n this._frameTime += deltaTime;\n var c = this._damping;\n var m = this._mass;\n var k = this._stiffness;\n var v0 = -this._initialVelocity;\n var zeta = c / (2 * Math.sqrt(k * m)); // damping ratio\n\n var omega0 = Math.sqrt(k / m); // undamped angular frequency of the oscillator (rad/ms)\n\n var omega1 = omega0 * Math.sqrt(1.0 - zeta * zeta); // exponential decay\n\n var x0 = this._toValue - this._startPosition; // calculate the oscillation from x0 = 1 to x = 0\n\n var position = 0.0;\n var velocity = 0.0;\n var t = this._frameTime;\n\n if (zeta < 1) {\n // Under damped\n var envelope = Math.exp(-zeta * omega0 * t);\n position = this._toValue - envelope * ((v0 + zeta * omega0 * x0) / omega1 * Math.sin(omega1 * t) + x0 * Math.cos(omega1 * t)); // This looks crazy -- it's actually just the derivative of the\n // oscillation function\n\n velocity = zeta * omega0 * envelope * (Math.sin(omega1 * t) * (v0 + zeta * omega0 * x0) / omega1 + x0 * Math.cos(omega1 * t)) - envelope * (Math.cos(omega1 * t) * (v0 + zeta * omega0 * x0) - omega1 * x0 * Math.sin(omega1 * t));\n } else {\n // Critically damped\n var _envelope = Math.exp(-omega0 * t);\n\n position = this._toValue - _envelope * (x0 + (v0 + omega0 * x0) * t);\n velocity = _envelope * (v0 * (t * omega0 - 1) + t * x0 * (omega0 * omega0));\n }\n\n this._lastTime = now;\n this._lastPosition = position;\n this._lastVelocity = velocity;\n\n this._onUpdate(position);\n\n if (!this.__active) {\n // a listener might have stopped us in _onUpdate\n return;\n } // Conditions for stopping the spring animation\n\n\n var isOvershooting = false;\n\n if (this._overshootClamping && this._stiffness !== 0) {\n if (this._startPosition < this._toValue) {\n isOvershooting = position > this._toValue;\n } else {\n isOvershooting = position < this._toValue;\n }\n }\n\n var isVelocity = Math.abs(velocity) <= this._restSpeedThreshold;\n\n var isDisplacement = true;\n\n if (this._stiffness !== 0) {\n isDisplacement = Math.abs(this._toValue - position) <= this._restDisplacementThreshold;\n }\n\n if (isOvershooting || isVelocity && isDisplacement) {\n if (this._stiffness !== 0) {\n // Ensure that we end up with a round value\n this._lastPosition = this._toValue;\n this._lastVelocity = 0;\n\n this._onUpdate(this._toValue);\n }\n\n this.__debouncedOnEnd({\n finished: true\n });\n\n return;\n }\n\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n };\n\n _proto.stop = function stop() {\n _Animation.prototype.stop.call(this);\n\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n\n this.__debouncedOnEnd({\n finished: false\n });\n };\n\n return SpringAnimation;\n}(Animation);\n\nexport default SpringAnimation;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * \n */\n'use strict';\n\nfunction stiffnessFromOrigamiValue(oValue) {\n return (oValue - 30) * 3.62 + 194;\n}\n\nfunction dampingFromOrigamiValue(oValue) {\n return (oValue - 8) * 3 + 25;\n}\n\nfunction fromOrigamiTensionAndFriction(tension, friction) {\n return {\n stiffness: stiffnessFromOrigamiValue(tension),\n damping: dampingFromOrigamiValue(friction)\n };\n}\n\nfunction fromBouncinessAndSpeed(bounciness, speed) {\n function normalize(value, startValue, endValue) {\n return (value - startValue) / (endValue - startValue);\n }\n\n function projectNormal(n, start, end) {\n return start + n * (end - start);\n }\n\n function linearInterpolation(t, start, end) {\n return t * end + (1 - t) * start;\n }\n\n function quadraticOutInterpolation(t, start, end) {\n return linearInterpolation(2 * t - t * t, start, end);\n }\n\n function b3Friction1(x) {\n return 0.0007 * Math.pow(x, 3) - 0.031 * Math.pow(x, 2) + 0.64 * x + 1.28;\n }\n\n function b3Friction2(x) {\n return 0.000044 * Math.pow(x, 3) - 0.006 * Math.pow(x, 2) + 0.36 * x + 2;\n }\n\n function b3Friction3(x) {\n return 0.00000045 * Math.pow(x, 3) - 0.000332 * Math.pow(x, 2) + 0.1078 * x + 5.84;\n }\n\n function b3Nobounce(tension) {\n if (tension <= 18) {\n return b3Friction1(tension);\n } else if (tension > 18 && tension <= 44) {\n return b3Friction2(tension);\n } else {\n return b3Friction3(tension);\n }\n }\n\n var b = normalize(bounciness / 1.7, 0, 20);\n b = projectNormal(b, 0, 0.8);\n var s = normalize(speed / 1.7, 0, 20);\n var bouncyTension = projectNormal(s, 0.5, 200);\n var bouncyFriction = quadraticOutInterpolation(b, b3Nobounce(bouncyTension), 0.01);\n return {\n stiffness: stiffnessFromOrigamiValue(bouncyTension),\n damping: dampingFromOrigamiValue(bouncyFriction)\n };\n}\n\nexport default {\n fromOrigamiTensionAndFriction: fromOrigamiTensionAndFriction,\n fromBouncinessAndSpeed: fromBouncinessAndSpeed\n};","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport AnimatedValue from '../nodes/AnimatedValue';\nimport AnimatedValueXY from '../nodes/AnimatedValueXY';\nimport AnimatedInterpolation from '../nodes/AnimatedInterpolation';\nimport Animation from './Animation';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\nimport Easing from '../../../../exports/Easing';\n\nvar _easeInOut;\n\nfunction easeInOut() {\n if (!_easeInOut) {\n _easeInOut = Easing.inOut(Easing.ease);\n }\n\n return _easeInOut;\n}\n\nvar TimingAnimation = /*#__PURE__*/function (_Animation) {\n _inheritsLoose(TimingAnimation, _Animation);\n\n function TimingAnimation(config) {\n var _config$easing, _config$duration, _config$delay, _config$iterations, _config$isInteraction;\n\n var _this;\n\n _this = _Animation.call(this) || this;\n _this._toValue = config.toValue;\n _this._easing = (_config$easing = config.easing) !== null && _config$easing !== void 0 ? _config$easing : easeInOut();\n _this._duration = (_config$duration = config.duration) !== null && _config$duration !== void 0 ? _config$duration : 500;\n _this._delay = (_config$delay = config.delay) !== null && _config$delay !== void 0 ? _config$delay : 0;\n _this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n _this._useNativeDriver = shouldUseNativeDriver(config);\n _this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !_this._useNativeDriver;\n return _this;\n }\n\n var _proto = TimingAnimation.prototype;\n\n _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n var frameDuration = 1000.0 / 60.0;\n var frames = [];\n var numFrames = Math.round(this._duration / frameDuration);\n\n for (var frame = 0; frame < numFrames; frame++) {\n frames.push(this._easing(frame / numFrames));\n }\n\n frames.push(this._easing(1));\n return {\n type: 'frames',\n frames: frames,\n toValue: this._toValue,\n iterations: this.__iterations\n };\n };\n\n _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n var _this2 = this;\n\n this.__active = true;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n\n var start = function start() {\n // Animations that sometimes have 0 duration and sometimes do not\n // still need to use the native driver when duration is 0 so as to\n // not cause intermixed JS and native animations.\n if (_this2._duration === 0 && !_this2._useNativeDriver) {\n _this2._onUpdate(_this2._toValue);\n\n _this2.__debouncedOnEnd({\n finished: true\n });\n } else {\n _this2._startTime = Date.now();\n\n if (_this2._useNativeDriver) {\n _this2.__startNativeAnimation(animatedValue);\n } else {\n _this2._animationFrame = requestAnimationFrame(_this2.onUpdate.bind(_this2));\n }\n }\n };\n\n if (this._delay) {\n this._timeout = setTimeout(start, this._delay);\n } else {\n start();\n }\n };\n\n _proto.onUpdate = function onUpdate() {\n var now = Date.now();\n\n if (now >= this._startTime + this._duration) {\n if (this._duration === 0) {\n this._onUpdate(this._toValue);\n } else {\n this._onUpdate(this._fromValue + this._easing(1) * (this._toValue - this._fromValue));\n }\n\n this.__debouncedOnEnd({\n finished: true\n });\n\n return;\n }\n\n this._onUpdate(this._fromValue + this._easing((now - this._startTime) / this._duration) * (this._toValue - this._fromValue));\n\n if (this.__active) {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n };\n\n _proto.stop = function stop() {\n _Animation.prototype.stop.call(this);\n\n this.__active = false;\n clearTimeout(this._timeout);\n global.cancelAnimationFrame(this._animationFrame);\n\n this.__debouncedOnEnd({\n finished: false\n });\n };\n\n return TimingAnimation;\n}(Animation);\n\nexport default TimingAnimation;","/*! fromentries. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nmodule.exports = function fromEntries (iterable) {\n return [...iterable].reduce((obj, [key, val]) => {\n obj[key] = val\n return obj\n }, {})\n}\n","module.exports = __webpack_public_path__ + \"static/media/bezier.799a5c8c.cjs\";","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar pluck = function pluck(obj, keys) {\n return Object.assign.apply(Object, [{}].concat(_toConsumableArray(keys.map(function (key) {\n return _defineProperty({}, key, obj[key]);\n }))));\n};\n\nvar omit = function omit(obj, keys) {\n var keySet = new Set(keys);\n return Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(obj).filter(function (_ref2) {\n var _ref3 = _slicedToArray(_ref2, 1),\n key = _ref3[0];\n\n return !keySet.has(key);\n }).map(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n key = _ref5[0],\n val = _ref5[1];\n\n return _defineProperty({}, key, val);\n }))));\n};\n\nexport { omit, pluck };\n","import React, { forwardRef, useRef, useState, useEffect, useMemo, useLayoutEffect, useCallback, useImperativeHandle } from 'react';\nimport { omit } from 'jerrypick';\nimport fromEntries from 'fromentries';\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]);\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction index (kapsuleComponent, comboParam) {\n var _ref = _typeof(comboParam) === 'object' ? comboParam : {\n // support old schema for backwards compatibility\n wrapperElementType: comboParam,\n methodNames: (arguments.length <= 2 ? undefined : arguments[2]) || undefined,\n initPropNames: (arguments.length <= 3 ? undefined : arguments[3]) || undefined\n },\n _ref$wrapperElementTy = _ref.wrapperElementType,\n wrapperElementType = _ref$wrapperElementTy === void 0 ? 'div' : _ref$wrapperElementTy,\n _ref$nodeMapper = _ref.nodeMapper,\n nodeMapper = _ref$nodeMapper === void 0 ? function (node) {\n return node;\n } : _ref$nodeMapper,\n _ref$methodNames = _ref.methodNames,\n methodNames = _ref$methodNames === void 0 ? [] : _ref$methodNames,\n _ref$initPropNames = _ref.initPropNames,\n initPropNames = _ref$initPropNames === void 0 ? [] : _ref$initPropNames;\n\n return /*#__PURE__*/forwardRef(function (props, ref) {\n var domEl = useRef();\n\n var _useState = useState({}),\n _useState2 = _slicedToArray(_useState, 2),\n prevProps = _useState2[0],\n setPrevProps = _useState2[1];\n\n useEffect(function () {\n return setPrevProps(props);\n }); // remember previous props\n // instantiate the inner kapsule component with the defined initPropNames\n\n var comp = useMemo(function () {\n var configOptions = fromEntries(initPropNames.filter(function (p) {\n return props.hasOwnProperty(p);\n }).map(function (prop) {\n return [prop, props[prop]];\n }));\n return kapsuleComponent(configOptions);\n }, []);\n useLayoutEffect(function () {\n comp(nodeMapper(domEl.current)); // mount kapsule synchronously on this element ref, optionally mapped into an object that the kapsule understands\n }, []);\n useEffect(function () {\n // invoke destructor on unmount, if it exists\n return comp._destructor instanceof Function ? comp._destructor : undefined;\n }, []); // Call a component method\n\n var _call = useCallback(function (method) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return comp[method] instanceof Function ? comp[method].apply(comp, args) : undefined;\n } // method not found\n , [comp]); // propagate component props that have changed\n\n\n var dynamicProps = omit(props, [].concat(_toConsumableArray(methodNames), _toConsumableArray(initPropNames))); // initPropNames or methodNames should not be called\n\n Object.keys(dynamicProps).filter(function (p) {\n return prevProps[p] !== props[p];\n }).forEach(function (p) {\n return _call(p, props[p]);\n }); // bind external methods to parent ref\n\n useImperativeHandle(ref, function () {\n return fromEntries(methodNames.map(function (method) {\n return [method, function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return _call.apply(void 0, [method].concat(args));\n }];\n }));\n });\n return /*#__PURE__*/React.createElement(wrapperElementType, {\n ref: domEl\n });\n });\n}\n\nexport default index;\n","import 'aframe';\nimport 'aframe-extras';\nimport 'aframe-forcegraph-component';\nimport Kapsule from 'kapsule';\nimport accessorFn from 'accessor-fn';\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".graph-nav-info {\\n position: absolute;\\n bottom: 5px;\\n width: 100%;\\n text-align: center;\\n color: slategrey;\\n opacity: 0.7;\\n font-size: 10px;\\n font-family: Sans-serif;\\n z-index: 1000;\\n}\";\nstyleInject(css_248z);\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar _3dForceGraphVr = Kapsule({\n props: {\n width: {\n \"default\": window.innerWidth,\n triggerUpdate: false,\n onChange: function onChange(width, state) {\n if (state.container) state.container.style.width = width;\n }\n },\n height: {\n \"default\": window.innerHeight,\n triggerUpdate: false,\n onChange: function onChange(height, state) {\n if (state.container) state.container.style.height = height;\n }\n },\n jsonUrl: {},\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n }\n },\n numDimensions: {\n \"default\": 3\n },\n dagMode: {},\n dagLevelDistance: {},\n dagNodeFilter: {\n \"default\": function _default() {\n return true;\n }\n },\n onDagError: {\n \"default\": undefined\n },\n backgroundColor: {\n \"default\": '#002'\n },\n showNavInfo: {\n \"default\": true\n },\n nodeRelSize: {\n \"default\": 4\n },\n // volume per val unit\n nodeId: {\n \"default\": 'id'\n },\n nodeLabel: {\n \"default\": 'name'\n },\n nodeDesc: {\n \"default\": 'desc'\n },\n onNodeHover: {},\n onNodeClick: {},\n nodeVal: {\n \"default\": 'val'\n },\n nodeResolution: {\n \"default\": 8\n },\n // how many slice segments in the sphere's circumference\n nodeVisibility: {\n \"default\": true\n },\n nodeColor: {\n \"default\": 'color'\n },\n nodeAutoColorBy: {},\n nodeOpacity: {\n \"default\": 0.75\n },\n nodeThreeObject: {},\n nodeThreeObjectExtend: {\n \"default\": false\n },\n linkSource: {\n \"default\": 'source'\n },\n linkTarget: {\n \"default\": 'target'\n },\n linkLabel: {\n \"default\": 'name'\n },\n linkDesc: {\n \"default\": 'desc'\n },\n onLinkHover: {},\n onLinkClick: {},\n linkVisibility: {\n \"default\": true\n },\n linkColor: {\n \"default\": 'color'\n },\n linkAutoColorBy: {},\n linkOpacity: {\n \"default\": 0.2\n },\n linkWidth: {\n \"default\": 0\n },\n linkResolution: {\n \"default\": 6\n },\n // how many radial segments in each line cylinder's geometry\n linkCurvature: {\n \"default\": 0\n },\n linkCurveRotation: {\n \"default\": 0\n },\n linkMaterial: {},\n linkThreeObject: {},\n linkThreeObjectExtend: {\n \"default\": false\n },\n linkPositionUpdate: {},\n linkDirectionalArrowLength: {\n \"default\": 0\n },\n linkDirectionalArrowColor: {},\n linkDirectionalArrowRelPos: {\n \"default\": 0.5\n },\n // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalArrowResolution: {\n \"default\": 8\n },\n // how many slice segments in the arrow's conic circumference\n linkDirectionalParticles: {\n \"default\": 0\n },\n // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: {\n \"default\": 0.01\n },\n // in link length ratio per frame\n linkDirectionalParticleWidth: {\n \"default\": 0.5\n },\n linkDirectionalParticleColor: {},\n linkDirectionalParticleResolution: {\n \"default\": 4\n },\n // how many slice segments in the particle sphere's circumference\n forceEngine: {\n \"default\": 'd3'\n },\n // d3 or ngraph\n d3AlphaMin: {\n \"default\": 0\n },\n d3AlphaDecay: {\n \"default\": 0.0228\n },\n d3VelocityDecay: {\n \"default\": 0.4\n },\n ngraphPhysics: {},\n warmupTicks: {\n \"default\": 0\n },\n // how many times to tick the force engine at init before starting to render\n cooldownTicks: {},\n cooldownTime: {\n \"default\": 15000\n },\n // ms\n onEngineTick: {},\n onEngineStop: {}\n },\n methods: _objectSpread2(_objectSpread2({}, Object.assign.apply(Object, [{}].concat(_toConsumableArray(['getGraphBbox', 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'refresh'].map(function (method) {\n return _defineProperty({}, method, function (state) {\n var aframeComp = state.forcegraph.components.forcegraph;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var returnVal = aframeComp[method].apply(aframeComp, args);\n return returnVal === aframeComp ? this // chain based on this object, not the inner aframe component\n : returnVal;\n });\n }))))), {}, {\n _destructor: function _destructor() {\n this.graphData({\n nodes: [],\n links: []\n });\n }\n }),\n init: function init(domNode, state) {\n // Wipe DOM\n domNode.innerHTML = '';\n state.container = document.createElement('div');\n domNode.appendChild(state.container);\n state.container.style.position = 'relative';\n state.container.style.width = state.width;\n state.container.style.height = state.height; // Add nav info section\n\n state.container.appendChild(state.navInfo = document.createElement('div'));\n state.navInfo.className = 'graph-nav-info';\n state.navInfo.textContent = 'Mouse drag: look, gamepad/arrow/wasd keys: move'; // Create scene\n\n var scene = document.createElement('a-scene');\n scene.setAttribute('embedded', ''); //scene.setAttribute('stats', null);\n\n scene.appendChild(state.sky = document.createElement('a-sky'));\n state.sky.setAttribute('radius', 3000); // Add camera\n\n var cameraG;\n scene.appendChild(cameraG = document.createElement('a-entity'));\n cameraG.setAttribute('position', '0 0 300');\n cameraG.setAttribute('movement-controls', 'fly: true; speed: 7');\n var camera;\n cameraG.appendChild(camera = document.createElement('a-entity'));\n camera.setAttribute('camera', '');\n camera.setAttribute('position', '0 0 0');\n camera.setAttribute('look-controls', 'reverseMouseDrag: false; pointerLockEnabled: false'); // display cursor in middle of screen\n // let cursor;\n // camera.appendChild(cursor = document.createElement('a-cursor'));\n // cursor.setAttribute('color', 'lavender');\n // cursor.setAttribute('opacity', 0.5);\n // cursor.setAttribute('raycaster', 'objects: ----none----'); // disable cursor raycaster\n // Setup tooltip\n\n var tooltipEl;\n camera.appendChild(tooltipEl = document.createElement('a-text'));\n tooltipEl.setAttribute('position', '0 -0.3 -1');\n tooltipEl.setAttribute('width', 2);\n tooltipEl.setAttribute('align', 'center');\n tooltipEl.setAttribute('color', 'lavender');\n tooltipEl.setAttribute('value', ''); // Setup sub-tooltip\n\n var subTooltipEl;\n camera.appendChild(subTooltipEl = document.createElement('a-text'));\n subTooltipEl.setAttribute('position', '0 -0.4 -1');\n subTooltipEl.setAttribute('width', 1.3);\n subTooltipEl.setAttribute('align', 'center');\n subTooltipEl.setAttribute('color', 'lavender');\n subTooltipEl.setAttribute('value', ''); // Setup mouse cursor and laser raycasting controls\n\n var mouseCursor;\n scene.appendChild(mouseCursor = document.createElement('a-entity'));\n mouseCursor.setAttribute('cursor', 'rayOrigin: mouse; mouseCursorStylesEnabled: true');\n mouseCursor.setAttribute('raycaster', 'objects: [forcegraph]; interval: 100');\n ['left', 'right'].forEach(function (hand) {\n var laser;\n cameraG.appendChild(laser = document.createElement('a-entity'));\n laser.setAttribute('laser-controls', \"hand: \".concat(hand));\n laser.setAttribute('raycaster', 'objects: [forcegraph]; interval: 100; lineColor: steelblue; lineOpacity: 0.85');\n }); // Add forcegraph entity\n\n scene.appendChild(state.forcegraph = document.createElement('a-entity'));\n state.forcegraph.setAttribute('forcegraph', null); // attach scene\n\n state.container.appendChild(scene); // update tooltips\n\n state.forcegraph.setAttribute('forcegraph', Object.assign.apply(Object, _toConsumableArray(['node', 'link'].map(function (t) {\n var cct = {\n node: 'Node',\n link: 'Link'\n }[t]; // camel-case version\n\n return _defineProperty({}, \"on\".concat(cct, \"Hover\"), function onHover(obj, prevObj) {\n var label = obj ? accessorFn(state[\"\".concat(t, \"Label\")])(obj) || '' : '';\n var subLabel = obj ? accessorFn(state[\"\".concat(t, \"Desc\")])(obj) || '' : '';\n tooltipEl.setAttribute('value', label);\n subTooltipEl.setAttribute('value', subLabel);\n state[\"on\".concat(cct, \"Hover\")] && state[\"on\".concat(cct, \"Hover\")](obj, prevObj);\n });\n }))));\n },\n update: function update(state, changedProps) {\n changedProps.hasOwnProperty('backgroundColor') && state.sky.setAttribute('color', state.backgroundColor);\n changedProps.hasOwnProperty('showNavInfo') && (state.navInfo.style.display = state.showNavInfo ? null : 'none');\n var passThroughProps = ['jsonUrl', 'numDimensions', 'dagMode', 'dagLevelDistance', 'dagNodeFilter', 'onDagError', 'nodeRelSize', 'nodeId', 'onNodeClick', 'nodeVal', 'nodeResolution', 'nodeVisibility', 'nodeColor', 'nodeAutoColorBy', 'nodeOpacity', 'nodeThreeObject', 'nodeThreeObjectExtend', 'linkSource', 'linkTarget', 'onLinkClick', 'linkVisibility', 'linkColor', 'linkAutoColorBy', 'linkOpacity', 'linkWidth', 'linkResolution', 'linkCurvature', 'linkCurveRotation', 'linkMaterial', 'linkThreeObject', 'linkThreeObjectExtend', 'linkPositionUpdate', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowRelPos', 'linkDirectionalArrowResolution', 'linkDirectionalParticles', 'linkDirectionalParticleSpeed', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'linkDirectionalParticleResolution', 'forceEngine', 'd3AlphaMin', 'd3AlphaDecay', 'd3VelocityDecay', 'ngraphPhysics', 'warmupTicks', 'cooldownTicks', 'cooldownTime', 'onEngineTick', 'onEngineStop'];\n var newProps = Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(state).filter(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n prop = _ref4[0],\n val = _ref4[1];\n\n return changedProps.hasOwnProperty(prop) && passThroughProps.indexOf(prop) !== -1 && val !== undefined && val !== null;\n }).map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n key = _ref6[0],\n val = _ref6[1];\n\n return _defineProperty({}, key, val);\n })), _toConsumableArray(Object.entries(state.graphData).map(function (_ref8) {\n var _ref9 = _slicedToArray(_ref8, 2),\n key = _ref9[0],\n val = _ref9[1];\n\n return _defineProperty({}, key, val);\n }))));\n state.forcegraph.setAttribute('forcegraph', newProps);\n }\n});\n\nexport default _3dForceGraphVr;\n","import 'aframe-forcegraph-component';\nimport Kapsule from 'kapsule';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar _3dForceGraphAr = Kapsule({\n props: {\n width: {},\n height: {},\n yOffset: {\n \"default\": 1.5\n },\n // marker size units\n glScale: {\n \"default\": 200\n },\n // gl units per marker width\n jsonUrl: {},\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n }\n },\n numDimensions: {\n \"default\": 3\n },\n dagMode: {},\n dagLevelDistance: {},\n dagNodeFilter: {\n \"default\": function _default() {\n return true;\n }\n },\n onDagError: {\n \"default\": undefined\n },\n nodeRelSize: {\n \"default\": 4\n },\n // volume per val unit\n nodeId: {\n \"default\": 'id'\n },\n nodeVal: {\n \"default\": 'val'\n },\n nodeResolution: {\n \"default\": 8\n },\n // how many slice segments in the sphere's circumference\n nodeVisibility: {\n \"default\": true\n },\n nodeColor: {\n \"default\": 'color'\n },\n nodeAutoColorBy: {},\n nodeOpacity: {\n \"default\": 0.75\n },\n nodeThreeObject: {},\n nodeThreeObjectExtend: {\n \"default\": false\n },\n linkSource: {\n \"default\": 'source'\n },\n linkTarget: {\n \"default\": 'target'\n },\n linkVisibility: {\n \"default\": true\n },\n linkColor: {\n \"default\": 'color'\n },\n linkAutoColorBy: {},\n linkOpacity: {\n \"default\": 0.2\n },\n linkWidth: {\n \"default\": 0\n },\n linkResolution: {\n \"default\": 6\n },\n // how many radial segments in each line cylinder's geometry\n linkCurvature: {\n \"default\": 0\n },\n linkCurveRotation: {\n \"default\": 0\n },\n linkMaterial: {},\n linkThreeObject: {},\n linkThreeObjectExtend: {\n \"default\": false\n },\n linkPositionUpdate: {},\n linkDirectionalArrowLength: {\n \"default\": 0\n },\n linkDirectionalArrowColor: {},\n linkDirectionalArrowRelPos: {\n \"default\": 0.5\n },\n // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalArrowResolution: {\n \"default\": 8\n },\n // how many slice segments in the arrow's conic circumference\n linkDirectionalParticles: {\n \"default\": 0\n },\n // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: {\n \"default\": 0.01\n },\n // in link length ratio per frame\n linkDirectionalParticleWidth: {\n \"default\": 0.5\n },\n linkDirectionalParticleColor: {},\n linkDirectionalParticleResolution: {\n \"default\": 4\n },\n // how many slice segments in the particle sphere's circumference\n onNodeHover: {},\n onNodeClick: {},\n onLinkHover: {},\n onLinkClick: {},\n forceEngine: {\n \"default\": 'd3'\n },\n // d3 or ngraph\n d3AlphaMin: {\n \"default\": 0\n },\n d3AlphaDecay: {\n \"default\": 0.0228\n },\n d3VelocityDecay: {\n \"default\": 0.4\n },\n ngraphPhysics: {},\n warmupTicks: {\n \"default\": 0\n },\n // how many times to tick the force engine at init before starting to render\n cooldownTicks: {},\n cooldownTime: {\n \"default\": 15000\n },\n // ms\n onEngineTick: {},\n onEngineStop: {}\n },\n methods: _objectSpread2(_objectSpread2({}, Object.assign.apply(Object, [{}].concat(_toConsumableArray(['getGraphBbox', 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'refresh'].map(function (method) {\n return _defineProperty({}, method, function (state) {\n var aframeComp = state.forcegraph.components.forcegraph;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var returnVal = aframeComp[method].apply(aframeComp, args);\n return returnVal === aframeComp ? this // chain based on this object, not the inner aframe component\n : returnVal;\n });\n }))))), {}, {\n _destructor: function _destructor() {\n this.graphData({\n nodes: [],\n links: []\n });\n }\n }),\n init: function init(domNode, state) {\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$markerAttrs = _ref2.markerAttrs,\n markerAttrs = _ref2$markerAttrs === void 0 ? {\n preset: 'hiro'\n } : _ref2$markerAttrs;\n\n // Wipe DOM\n domNode.innerHTML = '';\n state.container = document.createElement('div');\n domNode.appendChild(state.container); // Create scene\n\n var scene = document.createElement('a-scene');\n scene.setAttribute('embedded', '');\n scene.setAttribute('arjs', 'debugUIEnabled: false;');\n var arMarker = document.createElement('a-marker'); // add marker attributes\n\n Object.entries(markerAttrs).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n attr = _ref4[0],\n val = _ref4[1];\n\n return arMarker.setAttribute(attr, val);\n });\n scene.appendChild(arMarker); // Setup raycaster cursor\n\n var mouseCursor;\n scene.appendChild(mouseCursor = document.createElement('a-entity'));\n mouseCursor.setAttribute('cursor'\n /*, 'rayOrigin: mouse'*/\n ); // mouse raycaster has accuracy issues in ar.js: https://github.com/AR-js-org/AR.js/issues/40\n\n mouseCursor.setAttribute('raycaster', 'objects: [forcegraph]'); // Add forcegraph entity\n\n state.forcegraph = document.createElement('a-entity');\n state.forcegraph.setAttribute('forcegraph', null);\n arMarker.appendChild(state.forcegraph);\n var cameraEntity = document.createElement('a-entity');\n cameraEntity.setAttribute('camera', '');\n scene.appendChild(cameraEntity); // attach scene\n\n state.container.appendChild(scene); //domNode.appendChild(scene);\n },\n update: function update(state, changedProps) {\n changedProps.hasOwnProperty('width') && state.width && (state.container.style.width = state.width);\n changedProps.hasOwnProperty('height') && state.height && (state.container.style.height = state.height);\n changedProps.hasOwnProperty('glScale') && state.forcegraph.setAttribute('scale', _toConsumableArray(new Array(3)).map(function () {\n return 1 / state.glScale;\n }).join(' '));\n changedProps.hasOwnProperty('yOffset') && state.forcegraph.setAttribute('position', \"0 \".concat(state.yOffset, \" 0\"));\n var passThroughProps = ['jsonUrl', 'numDimensions', 'dagMode', 'dagLevelDistance', 'dagNodeFilter', 'onDagError', 'nodeRelSize', 'nodeId', 'nodeVal', 'nodeResolution', 'nodeVisibility', 'nodeColor', 'nodeAutoColorBy', 'nodeOpacity', 'nodeThreeObject', 'nodeThreeObjectExtend', 'linkSource', 'linkTarget', 'linkVisibility', 'linkColor', 'linkAutoColorBy', 'linkOpacity', 'linkWidth', 'linkResolution', 'linkCurvature', 'linkCurveRotation', 'linkMaterial', 'linkThreeObject', 'linkThreeObjectExtend', 'linkPositionUpdate', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowRelPos', 'linkDirectionalArrowResolution', 'linkDirectionalParticles', 'linkDirectionalParticleSpeed', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'linkDirectionalParticleResolution', 'onNodeHover', 'onNodeClick', 'onLinkHover', 'onLinkClick', 'forceEngine', 'd3AlphaMin', 'd3AlphaDecay', 'd3VelocityDecay', 'ngraphPhysics', 'warmupTicks', 'cooldownTicks', 'cooldownTime', 'onEngineTick', 'onEngineStop'];\n var newProps = Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(state).filter(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n prop = _ref6[0],\n val = _ref6[1];\n\n return changedProps.hasOwnProperty(prop) && passThroughProps.indexOf(prop) !== -1 && val !== undefined && val !== null;\n }).map(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n key = _ref8[0],\n val = _ref8[1];\n\n return _defineProperty({}, key, val);\n })), _toConsumableArray(Object.entries(state.graphData).map(function (_ref10) {\n var _ref11 = _slicedToArray(_ref10, 2),\n key = _ref11[0],\n val = _ref11[1];\n\n return _defineProperty({}, key, val);\n }))));\n state.forcegraph.setAttribute('forcegraph', newProps);\n }\n});\n\nexport default _3dForceGraphAr;\n","import {\n\tEventDispatcher,\n\tMatrix4,\n\tPlane,\n\tRaycaster,\n\tVector2,\n\tVector3\n} from 'three';\n\nconst _plane = new Plane();\nconst _raycaster = new Raycaster();\n\nconst _pointer = new Vector2();\nconst _offset = new Vector3();\nconst _intersection = new Vector3();\nconst _worldPosition = new Vector3();\nconst _inverseMatrix = new Matrix4();\n\nclass DragControls extends EventDispatcher {\n\n\tconstructor( _objects, _camera, _domElement ) {\n\n\t\tsuper();\n\n\t\t_domElement.style.touchAction = 'none'; // disable touch scroll\n\n\t\tlet _selected = null, _hovered = null;\n\n\t\tconst _intersections = [];\n\n\t\t//\n\n\t\tconst scope = this;\n\n\t\tfunction activate() {\n\n\t\t\t_domElement.addEventListener( 'pointermove', onPointerMove );\n\t\t\t_domElement.addEventListener( 'pointerdown', onPointerDown );\n\t\t\t_domElement.addEventListener( 'pointerup', onPointerCancel );\n\t\t\t_domElement.addEventListener( 'pointerleave', onPointerCancel );\n\n\t\t}\n\n\t\tfunction deactivate() {\n\n\t\t\t_domElement.removeEventListener( 'pointermove', onPointerMove );\n\t\t\t_domElement.removeEventListener( 'pointerdown', onPointerDown );\n\t\t\t_domElement.removeEventListener( 'pointerup', onPointerCancel );\n\t\t\t_domElement.removeEventListener( 'pointerleave', onPointerCancel );\n\n\t\t\t_domElement.style.cursor = '';\n\n\t\t}\n\n\t\tfunction dispose() {\n\n\t\t\tdeactivate();\n\n\t\t}\n\n\t\tfunction getObjects() {\n\n\t\t\treturn _objects;\n\n\t\t}\n\n\t\tfunction onPointerMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tupdatePointer( event );\n\n\t\t\t_raycaster.setFromCamera( _pointer, _camera );\n\n\t\t\tif ( _selected ) {\n\n\t\t\t\tif ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) {\n\n\t\t\t\t\t_selected.position.copy( _intersection.sub( _offset ).applyMatrix4( _inverseMatrix ) );\n\n\t\t\t\t}\n\n\t\t\t\tscope.dispatchEvent( { type: 'drag', object: _selected } );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t// hover support\n\n\t\t\tif ( event.pointerType === 'mouse' || event.pointerType === 'pen' ) {\n\n\t\t\t\t_intersections.length = 0;\n\n\t\t\t\t_raycaster.setFromCamera( _pointer, _camera );\n\t\t\t\t_raycaster.intersectObjects( _objects, true, _intersections );\n\n\t\t\t\tif ( _intersections.length > 0 ) {\n\n\t\t\t\t\tconst object = _intersections[ 0 ].object;\n\n\t\t\t\t\t_plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _worldPosition.setFromMatrixPosition( object.matrixWorld ) );\n\n\t\t\t\t\tif ( _hovered !== object && _hovered !== null ) {\n\n\t\t\t\t\t\tscope.dispatchEvent( { type: 'hoveroff', object: _hovered } );\n\n\t\t\t\t\t\t_domElement.style.cursor = 'auto';\n\t\t\t\t\t\t_hovered = null;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( _hovered !== object ) {\n\n\t\t\t\t\t\tscope.dispatchEvent( { type: 'hoveron', object: object } );\n\n\t\t\t\t\t\t_domElement.style.cursor = 'pointer';\n\t\t\t\t\t\t_hovered = object;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif ( _hovered !== null ) {\n\n\t\t\t\t\t\tscope.dispatchEvent( { type: 'hoveroff', object: _hovered } );\n\n\t\t\t\t\t\t_domElement.style.cursor = 'auto';\n\t\t\t\t\t\t_hovered = null;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerDown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tupdatePointer( event );\n\n\t\t\t_intersections.length = 0;\n\n\t\t\t_raycaster.setFromCamera( _pointer, _camera );\n\t\t\t_raycaster.intersectObjects( _objects, true, _intersections );\n\n\t\t\tif ( _intersections.length > 0 ) {\n\n\t\t\t\t_selected = ( scope.transformGroup === true ) ? _objects[ 0 ] : _intersections[ 0 ].object;\n\n\t\t\t\t_plane.setFromNormalAndCoplanarPoint( _camera.getWorldDirection( _plane.normal ), _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) );\n\n\t\t\t\tif ( _raycaster.ray.intersectPlane( _plane, _intersection ) ) {\n\n\t\t\t\t\t_inverseMatrix.copy( _selected.parent.matrixWorld ).invert();\n\t\t\t\t\t_offset.copy( _intersection ).sub( _worldPosition.setFromMatrixPosition( _selected.matrixWorld ) );\n\n\t\t\t\t}\n\n\t\t\t\t_domElement.style.cursor = 'move';\n\n\t\t\t\tscope.dispatchEvent( { type: 'dragstart', object: _selected } );\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tfunction onPointerCancel() {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( _selected ) {\n\n\t\t\t\tscope.dispatchEvent( { type: 'dragend', object: _selected } );\n\n\t\t\t\t_selected = null;\n\n\t\t\t}\n\n\t\t\t_domElement.style.cursor = _hovered ? 'pointer' : 'auto';\n\n\t\t}\n\n\t\tfunction updatePointer( event ) {\n\n\t\t\tconst rect = _domElement.getBoundingClientRect();\n\n\t\t\t_pointer.x = ( event.clientX - rect.left ) / rect.width * 2 - 1;\n\t\t\t_pointer.y = - ( event.clientY - rect.top ) / rect.height * 2 + 1;\n\n\t\t}\n\n\t\tactivate();\n\n\t\t// API\n\n\t\tthis.enabled = true;\n\t\tthis.transformGroup = false;\n\n\t\tthis.activate = activate;\n\t\tthis.deactivate = deactivate;\n\t\tthis.dispose = dispose;\n\t\tthis.getObjects = getObjects;\n\n\t}\n\n}\n\nexport { DragControls };\n","import {\n\tEventDispatcher,\n\tMOUSE,\n\tQuaternion,\n\tVector2,\n\tVector3\n} from 'three';\n\nconst _changeEvent = { type: 'change' };\nconst _startEvent = { type: 'start' };\nconst _endEvent = { type: 'end' };\n\nclass TrackballControls extends EventDispatcher {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper();\n\n\t\tif ( domElement === undefined ) console.warn( 'THREE.TrackballControls: The second parameter \"domElement\" is now mandatory.' );\n\t\tif ( domElement === document ) console.error( 'THREE.TrackballControls: \"document\" should not be used as the target \"domElement\". Please use \"renderer.domElement\" instead.' );\n\n\t\tconst scope = this;\n\t\tconst STATE = { NONE: - 1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM_PAN: 4 };\n\n\t\tthis.object = object;\n\t\tthis.domElement = domElement;\n\t\tthis.domElement.style.touchAction = 'none'; // disable touch scroll\n\n\t\t// API\n\n\t\tthis.enabled = true;\n\n\t\tthis.screen = { left: 0, top: 0, width: 0, height: 0 };\n\n\t\tthis.rotateSpeed = 1.0;\n\t\tthis.zoomSpeed = 1.2;\n\t\tthis.panSpeed = 0.3;\n\n\t\tthis.noRotate = false;\n\t\tthis.noZoom = false;\n\t\tthis.noPan = false;\n\n\t\tthis.staticMoving = false;\n\t\tthis.dynamicDampingFactor = 0.2;\n\n\t\tthis.minDistance = 0;\n\t\tthis.maxDistance = Infinity;\n\n\t\tthis.keys = [ 'KeyA' /*A*/, 'KeyS' /*S*/, 'KeyD' /*D*/ ];\n\n\t\tthis.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN };\n\n\t\t// internals\n\n\t\tthis.target = new Vector3();\n\n\t\tconst EPS = 0.000001;\n\n\t\tconst lastPosition = new Vector3();\n\t\tlet lastZoom = 1;\n\n\t\tlet _state = STATE.NONE,\n\t\t\t_keyState = STATE.NONE,\n\n\t\t\t_touchZoomDistanceStart = 0,\n\t\t\t_touchZoomDistanceEnd = 0,\n\n\t\t\t_lastAngle = 0;\n\n\t\tconst _eye = new Vector3(),\n\n\t\t\t_movePrev = new Vector2(),\n\t\t\t_moveCurr = new Vector2(),\n\n\t\t\t_lastAxis = new Vector3(),\n\n\t\t\t_zoomStart = new Vector2(),\n\t\t\t_zoomEnd = new Vector2(),\n\n\t\t\t_panStart = new Vector2(),\n\t\t\t_panEnd = new Vector2(),\n\n\t\t\t_pointers = [],\n\t\t\t_pointerPositions = {};\n\n\t\t// for reset\n\n\t\tthis.target0 = this.target.clone();\n\t\tthis.position0 = this.object.position.clone();\n\t\tthis.up0 = this.object.up.clone();\n\t\tthis.zoom0 = this.object.zoom;\n\n\t\t// methods\n\n\t\tthis.handleResize = function () {\n\n\t\t\tconst box = scope.domElement.getBoundingClientRect();\n\t\t\t// adjustments come from similar code in the jquery offset() function\n\t\t\tconst d = scope.domElement.ownerDocument.documentElement;\n\t\t\tscope.screen.left = box.left + window.pageXOffset - d.clientLeft;\n\t\t\tscope.screen.top = box.top + window.pageYOffset - d.clientTop;\n\t\t\tscope.screen.width = box.width;\n\t\t\tscope.screen.height = box.height;\n\n\t\t};\n\n\t\tconst getMouseOnScreen = ( function () {\n\n\t\t\tconst vector = new Vector2();\n\n\t\t\treturn function getMouseOnScreen( pageX, pageY ) {\n\n\t\t\t\tvector.set(\n\t\t\t\t\t( pageX - scope.screen.left ) / scope.screen.width,\n\t\t\t\t\t( pageY - scope.screen.top ) / scope.screen.height\n\t\t\t\t);\n\n\t\t\t\treturn vector;\n\n\t\t\t};\n\n\t\t}() );\n\n\t\tconst getMouseOnCircle = ( function () {\n\n\t\t\tconst vector = new Vector2();\n\n\t\t\treturn function getMouseOnCircle( pageX, pageY ) {\n\n\t\t\t\tvector.set(\n\t\t\t\t\t( ( pageX - scope.screen.width * 0.5 - scope.screen.left ) / ( scope.screen.width * 0.5 ) ),\n\t\t\t\t\t( ( scope.screen.height + 2 * ( scope.screen.top - pageY ) ) / scope.screen.width ) // screen.width intentional\n\t\t\t\t);\n\n\t\t\t\treturn vector;\n\n\t\t\t};\n\n\t\t}() );\n\n\t\tthis.rotateCamera = ( function () {\n\n\t\t\tconst axis = new Vector3(),\n\t\t\t\tquaternion = new Quaternion(),\n\t\t\t\teyeDirection = new Vector3(),\n\t\t\t\tobjectUpDirection = new Vector3(),\n\t\t\t\tobjectSidewaysDirection = new Vector3(),\n\t\t\t\tmoveDirection = new Vector3();\n\n\t\t\treturn function rotateCamera() {\n\n\t\t\t\tmoveDirection.set( _moveCurr.x - _movePrev.x, _moveCurr.y - _movePrev.y, 0 );\n\t\t\t\tlet angle = moveDirection.length();\n\n\t\t\t\tif ( angle ) {\n\n\t\t\t\t\t_eye.copy( scope.object.position ).sub( scope.target );\n\n\t\t\t\t\teyeDirection.copy( _eye ).normalize();\n\t\t\t\t\tobjectUpDirection.copy( scope.object.up ).normalize();\n\t\t\t\t\tobjectSidewaysDirection.crossVectors( objectUpDirection, eyeDirection ).normalize();\n\n\t\t\t\t\tobjectUpDirection.setLength( _moveCurr.y - _movePrev.y );\n\t\t\t\t\tobjectSidewaysDirection.setLength( _moveCurr.x - _movePrev.x );\n\n\t\t\t\t\tmoveDirection.copy( objectUpDirection.add( objectSidewaysDirection ) );\n\n\t\t\t\t\taxis.crossVectors( moveDirection, _eye ).normalize();\n\n\t\t\t\t\tangle *= scope.rotateSpeed;\n\t\t\t\t\tquaternion.setFromAxisAngle( axis, angle );\n\n\t\t\t\t\t_eye.applyQuaternion( quaternion );\n\t\t\t\t\tscope.object.up.applyQuaternion( quaternion );\n\n\t\t\t\t\t_lastAxis.copy( axis );\n\t\t\t\t\t_lastAngle = angle;\n\n\t\t\t\t} else if ( ! scope.staticMoving && _lastAngle ) {\n\n\t\t\t\t\t_lastAngle *= Math.sqrt( 1.0 - scope.dynamicDampingFactor );\n\t\t\t\t\t_eye.copy( scope.object.position ).sub( scope.target );\n\t\t\t\t\tquaternion.setFromAxisAngle( _lastAxis, _lastAngle );\n\t\t\t\t\t_eye.applyQuaternion( quaternion );\n\t\t\t\t\tscope.object.up.applyQuaternion( quaternion );\n\n\t\t\t\t}\n\n\t\t\t\t_movePrev.copy( _moveCurr );\n\n\t\t\t};\n\n\t\t}() );\n\n\n\t\tthis.zoomCamera = function () {\n\n\t\t\tlet factor;\n\n\t\t\tif ( _state === STATE.TOUCH_ZOOM_PAN ) {\n\n\t\t\t\tfactor = _touchZoomDistanceStart / _touchZoomDistanceEnd;\n\t\t\t\t_touchZoomDistanceStart = _touchZoomDistanceEnd;\n\n\t\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\t\t_eye.multiplyScalar( factor );\n\n\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\tscope.object.zoom *= factor;\n\t\t\t\t\tscope.object.updateProjectionMatrix();\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.warn( 'THREE.TrackballControls: Unsupported camera type' );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tfactor = 1.0 + ( _zoomEnd.y - _zoomStart.y ) * scope.zoomSpeed;\n\n\t\t\t\tif ( factor !== 1.0 && factor > 0.0 ) {\n\n\t\t\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\t\t\t_eye.multiplyScalar( factor );\n\n\t\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\t\tscope.object.zoom /= factor;\n\t\t\t\t\t\tscope.object.updateProjectionMatrix();\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.TrackballControls: Unsupported camera type' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( scope.staticMoving ) {\n\n\t\t\t\t\t_zoomStart.copy( _zoomEnd );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t_zoomStart.y += ( _zoomEnd.y - _zoomStart.y ) * this.dynamicDampingFactor;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.panCamera = ( function () {\n\n\t\t\tconst mouseChange = new Vector2(),\n\t\t\t\tobjectUp = new Vector3(),\n\t\t\t\tpan = new Vector3();\n\n\t\t\treturn function panCamera() {\n\n\t\t\t\tmouseChange.copy( _panEnd ).sub( _panStart );\n\n\t\t\t\tif ( mouseChange.lengthSq() ) {\n\n\t\t\t\t\tif ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\t\tconst scale_x = ( scope.object.right - scope.object.left ) / scope.object.zoom / scope.domElement.clientWidth;\n\t\t\t\t\t\tconst scale_y = ( scope.object.top - scope.object.bottom ) / scope.object.zoom / scope.domElement.clientWidth;\n\n\t\t\t\t\t\tmouseChange.x *= scale_x;\n\t\t\t\t\t\tmouseChange.y *= scale_y;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmouseChange.multiplyScalar( _eye.length() * scope.panSpeed );\n\n\t\t\t\t\tpan.copy( _eye ).cross( scope.object.up ).setLength( mouseChange.x );\n\t\t\t\t\tpan.add( objectUp.copy( scope.object.up ).setLength( mouseChange.y ) );\n\n\t\t\t\t\tscope.object.position.add( pan );\n\t\t\t\t\tscope.target.add( pan );\n\n\t\t\t\t\tif ( scope.staticMoving ) {\n\n\t\t\t\t\t\t_panStart.copy( _panEnd );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_panStart.add( mouseChange.subVectors( _panEnd, _panStart ).multiplyScalar( scope.dynamicDampingFactor ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t}() );\n\n\t\tthis.checkDistances = function () {\n\n\t\t\tif ( ! scope.noZoom || ! scope.noPan ) {\n\n\t\t\t\tif ( _eye.lengthSq() > scope.maxDistance * scope.maxDistance ) {\n\n\t\t\t\t\tscope.object.position.addVectors( scope.target, _eye.setLength( scope.maxDistance ) );\n\t\t\t\t\t_zoomStart.copy( _zoomEnd );\n\n\t\t\t\t}\n\n\t\t\t\tif ( _eye.lengthSq() < scope.minDistance * scope.minDistance ) {\n\n\t\t\t\t\tscope.object.position.addVectors( scope.target, _eye.setLength( scope.minDistance ) );\n\t\t\t\t\t_zoomStart.copy( _zoomEnd );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.update = function () {\n\n\t\t\t_eye.subVectors( scope.object.position, scope.target );\n\n\t\t\tif ( ! scope.noRotate ) {\n\n\t\t\t\tscope.rotateCamera();\n\n\t\t\t}\n\n\t\t\tif ( ! scope.noZoom ) {\n\n\t\t\t\tscope.zoomCamera();\n\n\t\t\t}\n\n\t\t\tif ( ! scope.noPan ) {\n\n\t\t\t\tscope.panCamera();\n\n\t\t\t}\n\n\t\t\tscope.object.position.addVectors( scope.target, _eye );\n\n\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\tscope.checkDistances();\n\n\t\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\t\tif ( lastPosition.distanceToSquared( scope.object.position ) > EPS ) {\n\n\t\t\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\t\t\tlastPosition.copy( scope.object.position );\n\n\t\t\t\t}\n\n\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\t\tif ( lastPosition.distanceToSquared( scope.object.position ) > EPS || lastZoom !== scope.object.zoom ) {\n\n\t\t\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\t\t\tlastPosition.copy( scope.object.position );\n\t\t\t\t\tlastZoom = scope.object.zoom;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.TrackballControls: Unsupported camera type' );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.reset = function () {\n\n\t\t\t_state = STATE.NONE;\n\t\t\t_keyState = STATE.NONE;\n\n\t\t\tscope.target.copy( scope.target0 );\n\t\t\tscope.object.position.copy( scope.position0 );\n\t\t\tscope.object.up.copy( scope.up0 );\n\t\t\tscope.object.zoom = scope.zoom0;\n\n\t\t\tscope.object.updateProjectionMatrix();\n\n\t\t\t_eye.subVectors( scope.object.position, scope.target );\n\n\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\tlastPosition.copy( scope.object.position );\n\t\t\tlastZoom = scope.object.zoom;\n\n\t\t};\n\n\t\t// listeners\n\n\t\tfunction onPointerDown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( _pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\taddPointer( event );\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchStart( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseDown( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchMove( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseMove( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerUp( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchEnd( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseUp();\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tremovePointer( event );\n\n\t\t\tif ( _pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tfunction onPointerCancel( event ) {\n\n\t\t\tremovePointer( event );\n\n\t\t}\n\n\t\tfunction keydown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\twindow.removeEventListener( 'keydown', keydown );\n\n\t\t\tif ( _keyState !== STATE.NONE ) {\n\n\t\t\t\treturn;\n\n\t\t\t} else if ( event.code === scope.keys[ STATE.ROTATE ] && ! scope.noRotate ) {\n\n\t\t\t\t_keyState = STATE.ROTATE;\n\n\t\t\t} else if ( event.code === scope.keys[ STATE.ZOOM ] && ! scope.noZoom ) {\n\n\t\t\t\t_keyState = STATE.ZOOM;\n\n\t\t\t} else if ( event.code === scope.keys[ STATE.PAN ] && ! scope.noPan ) {\n\n\t\t\t\t_keyState = STATE.PAN;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction keyup() {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\t_keyState = STATE.NONE;\n\n\t\t\twindow.addEventListener( 'keydown', keydown );\n\n\t\t}\n\n\t\tfunction onMouseDown( event ) {\n\n\t\t\tif ( _state === STATE.NONE ) {\n\n\t\t\t\tswitch ( event.button ) {\n\n\t\t\t\t\tcase scope.mouseButtons.LEFT:\n\t\t\t\t\t\t_state = STATE.ROTATE;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase scope.mouseButtons.MIDDLE:\n\t\t\t\t\t\t_state = STATE.ZOOM;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase scope.mouseButtons.RIGHT:\n\t\t\t\t\t\t_state = STATE.PAN;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t_state = STATE.NONE;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tconst state = ( _keyState !== STATE.NONE ) ? _keyState : _state;\n\n\t\t\tif ( state === STATE.ROTATE && ! scope.noRotate ) {\n\n\t\t\t\t_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );\n\t\t\t\t_movePrev.copy( _moveCurr );\n\n\t\t\t} else if ( state === STATE.ZOOM && ! scope.noZoom ) {\n\n\t\t\t\t_zoomStart.copy( getMouseOnScreen( event.pageX, event.pageY ) );\n\t\t\t\t_zoomEnd.copy( _zoomStart );\n\n\t\t\t} else if ( state === STATE.PAN && ! scope.noPan ) {\n\n\t\t\t\t_panStart.copy( getMouseOnScreen( event.pageX, event.pageY ) );\n\t\t\t\t_panEnd.copy( _panStart );\n\n\t\t\t}\n\n\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointermove', onPointerMove );\n\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointerup', onPointerUp );\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t}\n\n\t\tfunction onMouseMove( event ) {\n\n\t\t\tconst state = ( _keyState !== STATE.NONE ) ? _keyState : _state;\n\n\t\t\tif ( state === STATE.ROTATE && ! scope.noRotate ) {\n\n\t\t\t\t_movePrev.copy( _moveCurr );\n\t\t\t\t_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );\n\n\t\t\t} else if ( state === STATE.ZOOM && ! scope.noZoom ) {\n\n\t\t\t\t_zoomEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) );\n\n\t\t\t} else if ( state === STATE.PAN && ! scope.noPan ) {\n\n\t\t\t\t_panEnd.copy( getMouseOnScreen( event.pageX, event.pageY ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onMouseUp() {\n\n\t\t\t_state = STATE.NONE;\n\n\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointermove', onPointerMove );\n\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointerup', onPointerUp );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction onMouseWheel( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( scope.noZoom === true ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t\tswitch ( event.deltaMode ) {\n\n\t\t\t\tcase 2:\n\t\t\t\t\t// Zoom in pages\n\t\t\t\t\t_zoomStart.y -= event.deltaY * 0.025;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\t// Zoom in lines\n\t\t\t\t\t_zoomStart.y -= event.deltaY * 0.01;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// undefined, 0, assume pixels\n\t\t\t\t\t_zoomStart.y -= event.deltaY * 0.00025;\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction onTouchStart( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( _pointers.length ) {\n\n\t\t\t\tcase 1:\n\t\t\t\t\t_state = STATE.TOUCH_ROTATE;\n\t\t\t\t\t_moveCurr.copy( getMouseOnCircle( _pointers[ 0 ].pageX, _pointers[ 0 ].pageY ) );\n\t\t\t\t\t_movePrev.copy( _moveCurr );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // 2 or more\n\t\t\t\t\t_state = STATE.TOUCH_ZOOM_PAN;\n\t\t\t\t\tconst dx = _pointers[ 0 ].pageX - _pointers[ 1 ].pageX;\n\t\t\t\t\tconst dy = _pointers[ 0 ].pageY - _pointers[ 1 ].pageY;\n\t\t\t\t\t_touchZoomDistanceEnd = _touchZoomDistanceStart = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\t\t\tconst x = ( _pointers[ 0 ].pageX + _pointers[ 1 ].pageX ) / 2;\n\t\t\t\t\tconst y = ( _pointers[ 0 ].pageY + _pointers[ 1 ].pageY ) / 2;\n\t\t\t\t\t_panStart.copy( getMouseOnScreen( x, y ) );\n\t\t\t\t\t_panEnd.copy( _panStart );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t}\n\n\t\tfunction onTouchMove( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( _pointers.length ) {\n\n\t\t\t\tcase 1:\n\t\t\t\t\t_movePrev.copy( _moveCurr );\n\t\t\t\t\t_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: // 2 or more\n\n\t\t\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\t\t\tconst dx = event.pageX - position.x;\n\t\t\t\t\tconst dy = event.pageY - position.y;\n\t\t\t\t\t_touchZoomDistanceEnd = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\t\t\tconst x = ( event.pageX + position.x ) / 2;\n\t\t\t\t\tconst y = ( event.pageY + position.y ) / 2;\n\t\t\t\t\t_panEnd.copy( getMouseOnScreen( x, y ) );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onTouchEnd( event ) {\n\n\t\t\tswitch ( _pointers.length ) {\n\n\t\t\t\tcase 0:\n\t\t\t\t\t_state = STATE.NONE;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\t_state = STATE.TOUCH_ROTATE;\n\t\t\t\t\t_moveCurr.copy( getMouseOnCircle( event.pageX, event.pageY ) );\n\t\t\t\t\t_movePrev.copy( _moveCurr );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction contextmenu( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t}\n\n\t\tfunction addPointer( event ) {\n\n\t\t\t_pointers.push( event );\n\n\t\t}\n\n\t\tfunction removePointer( event ) {\n\n\t\t\tdelete _pointerPositions[ event.pointerId ];\n\n\t\t\tfor ( let i = 0; i < _pointers.length; i ++ ) {\n\n\t\t\t\tif ( _pointers[ i ].pointerId == event.pointerId ) {\n\n\t\t\t\t\t_pointers.splice( i, 1 );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction trackPointer( event ) {\n\n\t\t\tlet position = _pointerPositions[ event.pointerId ];\n\n\t\t\tif ( position === undefined ) {\n\n\t\t\t\tposition = new Vector2();\n\t\t\t\t_pointerPositions[ event.pointerId ] = position;\n\n\t\t\t}\n\n\t\t\tposition.set( event.pageX, event.pageY );\n\n\t\t}\n\n\t\tfunction getSecondPointerPosition( event ) {\n\n\t\t\tconst pointer = ( event.pointerId === _pointers[ 0 ].pointerId ) ? _pointers[ 1 ] : _pointers[ 0 ];\n\n\t\t\treturn _pointerPositions[ pointer.pointerId ];\n\n\t\t}\n\n\t\tthis.dispose = function () {\n\n\t\t\tscope.domElement.removeEventListener( 'contextmenu', contextmenu );\n\n\t\t\tscope.domElement.removeEventListener( 'pointerdown', onPointerDown );\n\t\t\tscope.domElement.removeEventListener( 'pointercancel', onPointerCancel );\n\t\t\tscope.domElement.removeEventListener( 'wheel', onMouseWheel );\n\n\t\t\twindow.removeEventListener( 'keydown', keydown );\n\t\t\twindow.removeEventListener( 'keyup', keyup );\n\n\t\t};\n\n\t\tthis.domElement.addEventListener( 'contextmenu', contextmenu );\n\n\t\tthis.domElement.addEventListener( 'pointerdown', onPointerDown );\n\t\tthis.domElement.addEventListener( 'pointercancel', onPointerCancel );\n\t\tthis.domElement.addEventListener( 'wheel', onMouseWheel, { passive: false } );\n\n\n\t\twindow.addEventListener( 'keydown', keydown );\n\t\twindow.addEventListener( 'keyup', keyup );\n\n\t\tthis.handleResize();\n\n\t\t// force an update at start\n\t\tthis.update();\n\n\t}\n\n}\n\nexport { TrackballControls };\n","import {\n\tEventDispatcher,\n\tMOUSE,\n\tQuaternion,\n\tSpherical,\n\tTOUCH,\n\tVector2,\n\tVector3\n} from 'three';\n\n// This set of controls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n//\n// Orbit - left mouse / touch: one-finger move\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move\n\nconst _changeEvent = { type: 'change' };\nconst _startEvent = { type: 'start' };\nconst _endEvent = { type: 'end' };\n\nclass OrbitControls extends EventDispatcher {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper();\n\n\t\tif ( domElement === undefined ) console.warn( 'THREE.OrbitControls: The second parameter \"domElement\" is now mandatory.' );\n\t\tif ( domElement === document ) console.error( 'THREE.OrbitControls: \"document\" should not be used as the target \"domElement\". Please use \"renderer.domElement\" instead.' );\n\n\t\tthis.object = object;\n\t\tthis.domElement = domElement;\n\t\tthis.domElement.style.touchAction = 'none'; // disable touch scroll\n\n\t\t// Set to false to disable this control\n\t\tthis.enabled = true;\n\n\t\t// \"target\" sets the location of focus, where the object orbits around\n\t\tthis.target = new Vector3();\n\n\t\t// How far you can dolly in and out ( PerspectiveCamera only )\n\t\tthis.minDistance = 0;\n\t\tthis.maxDistance = Infinity;\n\n\t\t// How far you can zoom in and out ( OrthographicCamera only )\n\t\tthis.minZoom = 0;\n\t\tthis.maxZoom = Infinity;\n\n\t\t// How far you can orbit vertically, upper and lower limits.\n\t\t// Range is 0 to Math.PI radians.\n\t\tthis.minPolarAngle = 0; // radians\n\t\tthis.maxPolarAngle = Math.PI; // radians\n\n\t\t// How far you can orbit horizontally, upper and lower limits.\n\t\t// If set, the interval [ min, max ] must be a sub-interval of [ - 2 PI, 2 PI ], with ( max - min < 2 PI )\n\t\tthis.minAzimuthAngle = - Infinity; // radians\n\t\tthis.maxAzimuthAngle = Infinity; // radians\n\n\t\t// Set to true to enable damping (inertia)\n\t\t// If damping is enabled, you must call controls.update() in your animation loop\n\t\tthis.enableDamping = false;\n\t\tthis.dampingFactor = 0.05;\n\n\t\t// This option actually enables dollying in and out; left as \"zoom\" for backwards compatibility.\n\t\t// Set to false to disable zooming\n\t\tthis.enableZoom = true;\n\t\tthis.zoomSpeed = 1.0;\n\n\t\t// Set to false to disable rotating\n\t\tthis.enableRotate = true;\n\t\tthis.rotateSpeed = 1.0;\n\n\t\t// Set to false to disable panning\n\t\tthis.enablePan = true;\n\t\tthis.panSpeed = 1.0;\n\t\tthis.screenSpacePanning = true; // if false, pan orthogonal to world-space direction camera.up\n\t\tthis.keyPanSpeed = 7.0;\t// pixels moved per arrow key push\n\n\t\t// Set to true to automatically rotate around the target\n\t\t// If auto-rotate is enabled, you must call controls.update() in your animation loop\n\t\tthis.autoRotate = false;\n\t\tthis.autoRotateSpeed = 2.0; // 30 seconds per orbit when fps is 60\n\n\t\t// The four arrow keys\n\t\tthis.keys = { LEFT: 'ArrowLeft', UP: 'ArrowUp', RIGHT: 'ArrowRight', BOTTOM: 'ArrowDown' };\n\n\t\t// Mouse buttons\n\t\tthis.mouseButtons = { LEFT: MOUSE.ROTATE, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.PAN };\n\n\t\t// Touch fingers\n\t\tthis.touches = { ONE: TOUCH.ROTATE, TWO: TOUCH.DOLLY_PAN };\n\n\t\t// for reset\n\t\tthis.target0 = this.target.clone();\n\t\tthis.position0 = this.object.position.clone();\n\t\tthis.zoom0 = this.object.zoom;\n\n\t\t// the target DOM element for key events\n\t\tthis._domElementKeyEvents = null;\n\n\t\t//\n\t\t// public methods\n\t\t//\n\n\t\tthis.getPolarAngle = function () {\n\n\t\t\treturn spherical.phi;\n\n\t\t};\n\n\t\tthis.getAzimuthalAngle = function () {\n\n\t\t\treturn spherical.theta;\n\n\t\t};\n\n\t\tthis.listenToKeyEvents = function ( domElement ) {\n\n\t\t\tdomElement.addEventListener( 'keydown', onKeyDown );\n\t\t\tthis._domElementKeyEvents = domElement;\n\n\t\t};\n\n\t\tthis.saveState = function () {\n\n\t\t\tscope.target0.copy( scope.target );\n\t\t\tscope.position0.copy( scope.object.position );\n\t\t\tscope.zoom0 = scope.object.zoom;\n\n\t\t};\n\n\t\tthis.reset = function () {\n\n\t\t\tscope.target.copy( scope.target0 );\n\t\t\tscope.object.position.copy( scope.position0 );\n\t\t\tscope.object.zoom = scope.zoom0;\n\n\t\t\tscope.object.updateProjectionMatrix();\n\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\tscope.update();\n\n\t\t\tstate = STATE.NONE;\n\n\t\t};\n\n\t\t// this method is exposed, but perhaps it would be better if we can make it private...\n\t\tthis.update = function () {\n\n\t\t\tconst offset = new Vector3();\n\n\t\t\t// so camera.up is the orbit axis\n\t\t\tconst quat = new Quaternion().setFromUnitVectors( object.up, new Vector3( 0, 1, 0 ) );\n\t\t\tconst quatInverse = quat.clone().invert();\n\n\t\t\tconst lastPosition = new Vector3();\n\t\t\tconst lastQuaternion = new Quaternion();\n\n\t\t\tconst twoPI = 2 * Math.PI;\n\n\t\t\treturn function update() {\n\n\t\t\t\tconst position = scope.object.position;\n\n\t\t\t\toffset.copy( position ).sub( scope.target );\n\n\t\t\t\t// rotate offset to \"y-axis-is-up\" space\n\t\t\t\toffset.applyQuaternion( quat );\n\n\t\t\t\t// angle from z-axis around y-axis\n\t\t\t\tspherical.setFromVector3( offset );\n\n\t\t\t\tif ( scope.autoRotate && state === STATE.NONE ) {\n\n\t\t\t\t\trotateLeft( getAutoRotationAngle() );\n\n\t\t\t\t}\n\n\t\t\t\tif ( scope.enableDamping ) {\n\n\t\t\t\t\tspherical.theta += sphericalDelta.theta * scope.dampingFactor;\n\t\t\t\t\tspherical.phi += sphericalDelta.phi * scope.dampingFactor;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tspherical.theta += sphericalDelta.theta;\n\t\t\t\t\tspherical.phi += sphericalDelta.phi;\n\n\t\t\t\t}\n\n\t\t\t\t// restrict theta to be between desired limits\n\n\t\t\t\tlet min = scope.minAzimuthAngle;\n\t\t\t\tlet max = scope.maxAzimuthAngle;\n\n\t\t\t\tif ( isFinite( min ) && isFinite( max ) ) {\n\n\t\t\t\t\tif ( min < - Math.PI ) min += twoPI; else if ( min > Math.PI ) min -= twoPI;\n\n\t\t\t\t\tif ( max < - Math.PI ) max += twoPI; else if ( max > Math.PI ) max -= twoPI;\n\n\t\t\t\t\tif ( min <= max ) {\n\n\t\t\t\t\t\tspherical.theta = Math.max( min, Math.min( max, spherical.theta ) );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tspherical.theta = ( spherical.theta > ( min + max ) / 2 ) ?\n\t\t\t\t\t\t\tMath.max( min, spherical.theta ) :\n\t\t\t\t\t\t\tMath.min( max, spherical.theta );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// restrict phi to be between desired limits\n\t\t\t\tspherical.phi = Math.max( scope.minPolarAngle, Math.min( scope.maxPolarAngle, spherical.phi ) );\n\n\t\t\t\tspherical.makeSafe();\n\n\n\t\t\t\tspherical.radius *= scale;\n\n\t\t\t\t// restrict radius to be between desired limits\n\t\t\t\tspherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) );\n\n\t\t\t\t// move target to panned location\n\n\t\t\t\tif ( scope.enableDamping === true ) {\n\n\t\t\t\t\tscope.target.addScaledVector( panOffset, scope.dampingFactor );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tscope.target.add( panOffset );\n\n\t\t\t\t}\n\n\t\t\t\toffset.setFromSpherical( spherical );\n\n\t\t\t\t// rotate offset back to \"camera-up-vector-is-up\" space\n\t\t\t\toffset.applyQuaternion( quatInverse );\n\n\t\t\t\tposition.copy( scope.target ).add( offset );\n\n\t\t\t\tscope.object.lookAt( scope.target );\n\n\t\t\t\tif ( scope.enableDamping === true ) {\n\n\t\t\t\t\tsphericalDelta.theta *= ( 1 - scope.dampingFactor );\n\t\t\t\t\tsphericalDelta.phi *= ( 1 - scope.dampingFactor );\n\n\t\t\t\t\tpanOffset.multiplyScalar( 1 - scope.dampingFactor );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tsphericalDelta.set( 0, 0, 0 );\n\n\t\t\t\t\tpanOffset.set( 0, 0, 0 );\n\n\t\t\t\t}\n\n\t\t\t\tscale = 1;\n\n\t\t\t\t// update condition is:\n\t\t\t\t// min(camera displacement, camera rotation in radians)^2 > EPS\n\t\t\t\t// using small-angle approximation cos(x/2) = 1 - x^2 / 8\n\n\t\t\t\tif ( zoomChanged ||\n\t\t\t\t\tlastPosition.distanceToSquared( scope.object.position ) > EPS ||\n\t\t\t\t\t8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ) {\n\n\t\t\t\t\tscope.dispatchEvent( _changeEvent );\n\n\t\t\t\t\tlastPosition.copy( scope.object.position );\n\t\t\t\t\tlastQuaternion.copy( scope.object.quaternion );\n\t\t\t\t\tzoomChanged = false;\n\n\t\t\t\t\treturn true;\n\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\n\t\t\t};\n\n\t\t}();\n\n\t\tthis.dispose = function () {\n\n\t\t\tscope.domElement.removeEventListener( 'contextmenu', onContextMenu );\n\n\t\t\tscope.domElement.removeEventListener( 'pointerdown', onPointerDown );\n\t\t\tscope.domElement.removeEventListener( 'pointercancel', onPointerCancel );\n\t\t\tscope.domElement.removeEventListener( 'wheel', onMouseWheel );\n\n\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointermove', onPointerMove );\n\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointerup', onPointerUp );\n\n\n\t\t\tif ( scope._domElementKeyEvents !== null ) {\n\n\t\t\t\tscope._domElementKeyEvents.removeEventListener( 'keydown', onKeyDown );\n\n\t\t\t}\n\n\t\t\t//scope.dispatchEvent( { type: 'dispose' } ); // should this be added here?\n\n\t\t};\n\n\t\t//\n\t\t// internals\n\t\t//\n\n\t\tconst scope = this;\n\n\t\tconst STATE = {\n\t\t\tNONE: - 1,\n\t\t\tROTATE: 0,\n\t\t\tDOLLY: 1,\n\t\t\tPAN: 2,\n\t\t\tTOUCH_ROTATE: 3,\n\t\t\tTOUCH_PAN: 4,\n\t\t\tTOUCH_DOLLY_PAN: 5,\n\t\t\tTOUCH_DOLLY_ROTATE: 6\n\t\t};\n\n\t\tlet state = STATE.NONE;\n\n\t\tconst EPS = 0.000001;\n\n\t\t// current position in spherical coordinates\n\t\tconst spherical = new Spherical();\n\t\tconst sphericalDelta = new Spherical();\n\n\t\tlet scale = 1;\n\t\tconst panOffset = new Vector3();\n\t\tlet zoomChanged = false;\n\n\t\tconst rotateStart = new Vector2();\n\t\tconst rotateEnd = new Vector2();\n\t\tconst rotateDelta = new Vector2();\n\n\t\tconst panStart = new Vector2();\n\t\tconst panEnd = new Vector2();\n\t\tconst panDelta = new Vector2();\n\n\t\tconst dollyStart = new Vector2();\n\t\tconst dollyEnd = new Vector2();\n\t\tconst dollyDelta = new Vector2();\n\n\t\tconst pointers = [];\n\t\tconst pointerPositions = {};\n\n\t\tfunction getAutoRotationAngle() {\n\n\t\t\treturn 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed;\n\n\t\t}\n\n\t\tfunction getZoomScale() {\n\n\t\t\treturn Math.pow( 0.95, scope.zoomSpeed );\n\n\t\t}\n\n\t\tfunction rotateLeft( angle ) {\n\n\t\t\tsphericalDelta.theta -= angle;\n\n\t\t}\n\n\t\tfunction rotateUp( angle ) {\n\n\t\t\tsphericalDelta.phi -= angle;\n\n\t\t}\n\n\t\tconst panLeft = function () {\n\n\t\t\tconst v = new Vector3();\n\n\t\t\treturn function panLeft( distance, objectMatrix ) {\n\n\t\t\t\tv.setFromMatrixColumn( objectMatrix, 0 ); // get X column of objectMatrix\n\t\t\t\tv.multiplyScalar( - distance );\n\n\t\t\t\tpanOffset.add( v );\n\n\t\t\t};\n\n\t\t}();\n\n\t\tconst panUp = function () {\n\n\t\t\tconst v = new Vector3();\n\n\t\t\treturn function panUp( distance, objectMatrix ) {\n\n\t\t\t\tif ( scope.screenSpacePanning === true ) {\n\n\t\t\t\t\tv.setFromMatrixColumn( objectMatrix, 1 );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tv.setFromMatrixColumn( objectMatrix, 0 );\n\t\t\t\t\tv.crossVectors( scope.object.up, v );\n\n\t\t\t\t}\n\n\t\t\t\tv.multiplyScalar( distance );\n\n\t\t\t\tpanOffset.add( v );\n\n\t\t\t};\n\n\t\t}();\n\n\t\t// deltaX and deltaY are in pixels; right and down are positive\n\t\tconst pan = function () {\n\n\t\t\tconst offset = new Vector3();\n\n\t\t\treturn function pan( deltaX, deltaY ) {\n\n\t\t\t\tconst element = scope.domElement;\n\n\t\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\t\t// perspective\n\t\t\t\t\tconst position = scope.object.position;\n\t\t\t\t\toffset.copy( position ).sub( scope.target );\n\t\t\t\t\tlet targetDistance = offset.length();\n\n\t\t\t\t\t// half of the fov is center to top of screen\n\t\t\t\t\ttargetDistance *= Math.tan( ( scope.object.fov / 2 ) * Math.PI / 180.0 );\n\n\t\t\t\t\t// we use only clientHeight here so aspect ratio does not distort speed\n\t\t\t\t\tpanLeft( 2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix );\n\t\t\t\t\tpanUp( 2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix );\n\n\t\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\t\t// orthographic\n\t\t\t\t\tpanLeft( deltaX * ( scope.object.right - scope.object.left ) / scope.object.zoom / element.clientWidth, scope.object.matrix );\n\t\t\t\t\tpanUp( deltaY * ( scope.object.top - scope.object.bottom ) / scope.object.zoom / element.clientHeight, scope.object.matrix );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// camera neither orthographic nor perspective\n\t\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' );\n\t\t\t\t\tscope.enablePan = false;\n\n\t\t\t\t}\n\n\t\t\t};\n\n\t\t}();\n\n\t\tfunction dollyOut( dollyScale ) {\n\n\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\tscale /= dollyScale;\n\n\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\tscope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom * dollyScale ) );\n\t\t\t\tscope.object.updateProjectionMatrix();\n\t\t\t\tzoomChanged = true;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );\n\t\t\t\tscope.enableZoom = false;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction dollyIn( dollyScale ) {\n\n\t\t\tif ( scope.object.isPerspectiveCamera ) {\n\n\t\t\t\tscale *= dollyScale;\n\n\t\t\t} else if ( scope.object.isOrthographicCamera ) {\n\n\t\t\t\tscope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / dollyScale ) );\n\t\t\t\tscope.object.updateProjectionMatrix();\n\t\t\t\tzoomChanged = true;\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );\n\t\t\t\tscope.enableZoom = false;\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\t\t// event callbacks - update the object state\n\t\t//\n\n\t\tfunction handleMouseDownRotate( event ) {\n\n\t\t\trotateStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseDownDolly( event ) {\n\n\t\t\tdollyStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseDownPan( event ) {\n\n\t\t\tpanStart.set( event.clientX, event.clientY );\n\n\t\t}\n\n\t\tfunction handleMouseMoveRotate( event ) {\n\n\t\t\trotateEnd.set( event.clientX, event.clientY );\n\n\t\t\trotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );\n\n\t\t\tconst element = scope.domElement;\n\n\t\t\trotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height\n\n\t\t\trotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );\n\n\t\t\trotateStart.copy( rotateEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseMoveDolly( event ) {\n\n\t\t\tdollyEnd.set( event.clientX, event.clientY );\n\n\t\t\tdollyDelta.subVectors( dollyEnd, dollyStart );\n\n\t\t\tif ( dollyDelta.y > 0 ) {\n\n\t\t\t\tdollyOut( getZoomScale() );\n\n\t\t\t} else if ( dollyDelta.y < 0 ) {\n\n\t\t\t\tdollyIn( getZoomScale() );\n\n\t\t\t}\n\n\t\t\tdollyStart.copy( dollyEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseMovePan( event ) {\n\n\t\t\tpanEnd.set( event.clientX, event.clientY );\n\n\t\t\tpanDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );\n\n\t\t\tpan( panDelta.x, panDelta.y );\n\n\t\t\tpanStart.copy( panEnd );\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleMouseUp( /*event*/ ) {\n\n\t\t\t// no-op\n\n\t\t}\n\n\t\tfunction handleMouseWheel( event ) {\n\n\t\t\tif ( event.deltaY < 0 ) {\n\n\t\t\t\tdollyIn( getZoomScale() );\n\n\t\t\t} else if ( event.deltaY > 0 ) {\n\n\t\t\t\tdollyOut( getZoomScale() );\n\n\t\t\t}\n\n\t\t\tscope.update();\n\n\t\t}\n\n\t\tfunction handleKeyDown( event ) {\n\n\t\t\tlet needsUpdate = false;\n\n\t\t\tswitch ( event.code ) {\n\n\t\t\t\tcase scope.keys.UP:\n\t\t\t\t\tpan( 0, scope.keyPanSpeed );\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.BOTTOM:\n\t\t\t\t\tpan( 0, - scope.keyPanSpeed );\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.LEFT:\n\t\t\t\t\tpan( scope.keyPanSpeed, 0 );\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase scope.keys.RIGHT:\n\t\t\t\t\tpan( - scope.keyPanSpeed, 0 );\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif ( needsUpdate ) {\n\n\t\t\t\t// prevent the browser from scrolling on cursor keys\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tscope.update();\n\n\t\t\t}\n\n\n\t\t}\n\n\t\tfunction handleTouchStartRotate() {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\trotateStart.set( pointers[ 0 ].pageX, pointers[ 0 ].pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst x = 0.5 * ( pointers[ 0 ].pageX + pointers[ 1 ].pageX );\n\t\t\t\tconst y = 0.5 * ( pointers[ 0 ].pageY + pointers[ 1 ].pageY );\n\n\t\t\t\trotateStart.set( x, y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction handleTouchStartPan() {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\tpanStart.set( pointers[ 0 ].pageX, pointers[ 0 ].pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst x = 0.5 * ( pointers[ 0 ].pageX + pointers[ 1 ].pageX );\n\t\t\t\tconst y = 0.5 * ( pointers[ 0 ].pageY + pointers[ 1 ].pageY );\n\n\t\t\t\tpanStart.set( x, y );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction handleTouchStartDolly() {\n\n\t\t\tconst dx = pointers[ 0 ].pageX - pointers[ 1 ].pageX;\n\t\t\tconst dy = pointers[ 0 ].pageY - pointers[ 1 ].pageY;\n\n\t\t\tconst distance = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\tdollyStart.set( 0, distance );\n\n\t\t}\n\n\t\tfunction handleTouchStartDollyPan() {\n\n\t\t\tif ( scope.enableZoom ) handleTouchStartDolly();\n\n\t\t\tif ( scope.enablePan ) handleTouchStartPan();\n\n\t\t}\n\n\t\tfunction handleTouchStartDollyRotate() {\n\n\t\t\tif ( scope.enableZoom ) handleTouchStartDolly();\n\n\t\t\tif ( scope.enableRotate ) handleTouchStartRotate();\n\n\t\t}\n\n\t\tfunction handleTouchMoveRotate( event ) {\n\n\t\t\tif ( pointers.length == 1 ) {\n\n\t\t\t\trotateEnd.set( event.pageX, event.pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\t\tconst x = 0.5 * ( event.pageX + position.x );\n\t\t\t\tconst y = 0.5 * ( event.pageY + position.y );\n\n\t\t\t\trotateEnd.set( x, y );\n\n\t\t\t}\n\n\t\t\trotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed );\n\n\t\t\tconst element = scope.domElement;\n\n\t\t\trotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height\n\n\t\t\trotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight );\n\n\t\t\trotateStart.copy( rotateEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMovePan( event ) {\n\n\t\t\tif ( pointers.length === 1 ) {\n\n\t\t\t\tpanEnd.set( event.pageX, event.pageY );\n\n\t\t\t} else {\n\n\t\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\t\tconst x = 0.5 * ( event.pageX + position.x );\n\t\t\t\tconst y = 0.5 * ( event.pageY + position.y );\n\n\t\t\t\tpanEnd.set( x, y );\n\n\t\t\t}\n\n\t\t\tpanDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed );\n\n\t\t\tpan( panDelta.x, panDelta.y );\n\n\t\t\tpanStart.copy( panEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDolly( event ) {\n\n\t\t\tconst position = getSecondPointerPosition( event );\n\n\t\t\tconst dx = event.pageX - position.x;\n\t\t\tconst dy = event.pageY - position.y;\n\n\t\t\tconst distance = Math.sqrt( dx * dx + dy * dy );\n\n\t\t\tdollyEnd.set( 0, distance );\n\n\t\t\tdollyDelta.set( 0, Math.pow( dollyEnd.y / dollyStart.y, scope.zoomSpeed ) );\n\n\t\t\tdollyOut( dollyDelta.y );\n\n\t\t\tdollyStart.copy( dollyEnd );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDollyPan( event ) {\n\n\t\t\tif ( scope.enableZoom ) handleTouchMoveDolly( event );\n\n\t\t\tif ( scope.enablePan ) handleTouchMovePan( event );\n\n\t\t}\n\n\t\tfunction handleTouchMoveDollyRotate( event ) {\n\n\t\t\tif ( scope.enableZoom ) handleTouchMoveDolly( event );\n\n\t\t\tif ( scope.enableRotate ) handleTouchMoveRotate( event );\n\n\t\t}\n\n\t\tfunction handleTouchEnd( /*event*/ ) {\n\n\t\t\t// no-op\n\n\t\t}\n\n\t\t//\n\t\t// event handlers - FSM: listen for events and reset state\n\t\t//\n\n\t\tfunction onPointerDown( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.ownerDocument.addEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\taddPointer( event );\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchStart( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseDown( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchMove( event );\n\n\t\t\t} else {\n\n\t\t\t\tonMouseMove( event );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerUp( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tif ( event.pointerType === 'touch' ) {\n\n\t\t\t\tonTouchEnd();\n\n\t\t\t} else {\n\n\t\t\t\tonMouseUp( event );\n\n\t\t\t}\n\n\t\t\tremovePointer( event );\n\n\t\t\t//\n\n\t\t\tif ( pointers.length === 0 ) {\n\n\t\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointermove', onPointerMove );\n\t\t\t\tscope.domElement.ownerDocument.removeEventListener( 'pointerup', onPointerUp );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onPointerCancel( event ) {\n\n\t\t\tremovePointer( event );\n\n\t\t}\n\n\t\tfunction onMouseDown( event ) {\n\n\t\t\tlet mouseAction;\n\n\t\t\tswitch ( event.button ) {\n\n\t\t\t\tcase 0:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.LEFT;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.MIDDLE;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\n\t\t\t\t\tmouseAction = scope.mouseButtons.RIGHT;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tmouseAction = - 1;\n\n\t\t\t}\n\n\t\t\tswitch ( mouseAction ) {\n\n\t\t\t\tcase MOUSE.DOLLY:\n\n\t\t\t\t\tif ( scope.enableZoom === false ) return;\n\n\t\t\t\t\thandleMouseDownDolly( event );\n\n\t\t\t\t\tstate = STATE.DOLLY;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MOUSE.ROTATE:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\thandleMouseDownPan( event );\n\n\t\t\t\t\t\tstate = STATE.PAN;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\thandleMouseDownRotate( event );\n\n\t\t\t\t\t\tstate = STATE.ROTATE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MOUSE.PAN:\n\n\t\t\t\t\tif ( event.ctrlKey || event.metaKey || event.shiftKey ) {\n\n\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\thandleMouseDownRotate( event );\n\n\t\t\t\t\t\tstate = STATE.ROTATE;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\thandleMouseDownPan( event );\n\n\t\t\t\t\t\tstate = STATE.PAN;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t\tif ( state !== STATE.NONE ) {\n\n\t\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onMouseMove( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tswitch ( state ) {\n\n\t\t\t\tcase STATE.ROTATE:\n\n\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleMouseMoveRotate( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.DOLLY:\n\n\t\t\t\t\tif ( scope.enableZoom === false ) return;\n\n\t\t\t\t\thandleMouseMoveDolly( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.PAN:\n\n\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\thandleMouseMovePan( event );\n\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onMouseUp( event ) {\n\n\t\t\thandleMouseUp( event );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t\tstate = STATE.NONE;\n\n\t\t}\n\n\t\tfunction onMouseWheel( event ) {\n\n\t\t\tif ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\thandleMouseWheel( event );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t}\n\n\t\tfunction onKeyDown( event ) {\n\n\t\t\tif ( scope.enabled === false || scope.enablePan === false ) return;\n\n\t\t\thandleKeyDown( event );\n\n\t\t}\n\n\t\tfunction onTouchStart( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( pointers.length ) {\n\n\t\t\t\tcase 1:\n\n\t\t\t\t\tswitch ( scope.touches.ONE ) {\n\n\t\t\t\t\t\tcase TOUCH.ROTATE:\n\n\t\t\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartRotate();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_ROTATE;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase TOUCH.PAN:\n\n\t\t\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartPan();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_PAN;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\n\t\t\t\t\tswitch ( scope.touches.TWO ) {\n\n\t\t\t\t\t\tcase TOUCH.DOLLY_PAN:\n\n\t\t\t\t\t\t\tif ( scope.enableZoom === false && scope.enablePan === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartDollyPan();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_DOLLY_PAN;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase TOUCH.DOLLY_ROTATE:\n\n\t\t\t\t\t\t\tif ( scope.enableZoom === false && scope.enableRotate === false ) return;\n\n\t\t\t\t\t\t\thandleTouchStartDollyRotate();\n\n\t\t\t\t\t\t\tstate = STATE.TOUCH_DOLLY_ROTATE;\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t\tif ( state !== STATE.NONE ) {\n\n\t\t\t\tscope.dispatchEvent( _startEvent );\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onTouchMove( event ) {\n\n\t\t\ttrackPointer( event );\n\n\t\t\tswitch ( state ) {\n\n\t\t\t\tcase STATE.TOUCH_ROTATE:\n\n\t\t\t\t\tif ( scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleTouchMoveRotate( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_PAN:\n\n\t\t\t\t\tif ( scope.enablePan === false ) return;\n\n\t\t\t\t\thandleTouchMovePan( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_DOLLY_PAN:\n\n\t\t\t\t\tif ( scope.enableZoom === false && scope.enablePan === false ) return;\n\n\t\t\t\t\thandleTouchMoveDollyPan( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase STATE.TOUCH_DOLLY_ROTATE:\n\n\t\t\t\t\tif ( scope.enableZoom === false && scope.enableRotate === false ) return;\n\n\t\t\t\t\thandleTouchMoveDollyRotate( event );\n\n\t\t\t\t\tscope.update();\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstate = STATE.NONE;\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction onTouchEnd( event ) {\n\n\t\t\thandleTouchEnd( event );\n\n\t\t\tscope.dispatchEvent( _endEvent );\n\n\t\t\tstate = STATE.NONE;\n\n\t\t}\n\n\t\tfunction onContextMenu( event ) {\n\n\t\t\tif ( scope.enabled === false ) return;\n\n\t\t\tevent.preventDefault();\n\n\t\t}\n\n\t\tfunction addPointer( event ) {\n\n\t\t\tpointers.push( event );\n\n\t\t}\n\n\t\tfunction removePointer( event ) {\n\n\t\t\tdelete pointerPositions[ event.pointerId ];\n\n\t\t\tfor ( let i = 0; i < pointers.length; i ++ ) {\n\n\t\t\t\tif ( pointers[ i ].pointerId == event.pointerId ) {\n\n\t\t\t\t\tpointers.splice( i, 1 );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tfunction trackPointer( event ) {\n\n\t\t\tlet position = pointerPositions[ event.pointerId ];\n\n\t\t\tif ( position === undefined ) {\n\n\t\t\t\tposition = new Vector2();\n\t\t\t\tpointerPositions[ event.pointerId ] = position;\n\n\t\t\t}\n\n\t\t\tposition.set( event.pageX, event.pageY );\n\n\t\t}\n\n\t\tfunction getSecondPointerPosition( event ) {\n\n\t\t\tconst pointer = ( event.pointerId === pointers[ 0 ].pointerId ) ? pointers[ 1 ] : pointers[ 0 ];\n\n\t\t\treturn pointerPositions[ pointer.pointerId ];\n\n\t\t}\n\n\t\t//\n\n\t\tscope.domElement.addEventListener( 'contextmenu', onContextMenu );\n\n\t\tscope.domElement.addEventListener( 'pointerdown', onPointerDown );\n\t\tscope.domElement.addEventListener( 'pointercancel', onPointerCancel );\n\t\tscope.domElement.addEventListener( 'wheel', onMouseWheel, { passive: false } );\n\n\t\t// force an update at start\n\n\t\tthis.update();\n\n\t}\n\n}\n\n\n// This set of controls performs orbiting, dollying (zooming), and panning.\n// Unlike TrackballControls, it maintains the \"up\" direction object.up (+Y by default).\n// This is very similar to OrbitControls, another set of touch behavior\n//\n// Orbit - right mouse, or left mouse + ctrl/meta/shiftKey / touch: two-finger rotate\n// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish\n// Pan - left mouse, or arrow keys / touch: one-finger move\n\nclass MapControls extends OrbitControls {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper( object, domElement );\n\n\t\tthis.screenSpacePanning = false; // pan orthogonal to world-space direction camera.up\n\n\t\tthis.mouseButtons.LEFT = MOUSE.PAN;\n\t\tthis.mouseButtons.RIGHT = MOUSE.ROTATE;\n\n\t\tthis.touches.ONE = TOUCH.PAN;\n\t\tthis.touches.TWO = TOUCH.DOLLY_ROTATE;\n\n\t}\n\n}\n\nexport { OrbitControls, MapControls };\n","import {\n\tEventDispatcher,\n\tQuaternion,\n\tVector3\n} from 'three';\n\nconst _changeEvent = { type: 'change' };\n\nclass FlyControls extends EventDispatcher {\n\n\tconstructor( object, domElement ) {\n\n\t\tsuper();\n\n\t\tif ( domElement === undefined ) {\n\n\t\t\tconsole.warn( 'THREE.FlyControls: The second parameter \"domElement\" is now mandatory.' );\n\t\t\tdomElement = document;\n\n\t\t}\n\n\t\tthis.object = object;\n\t\tthis.domElement = domElement;\n\n\t\t// API\n\n\t\tthis.movementSpeed = 1.0;\n\t\tthis.rollSpeed = 0.005;\n\n\t\tthis.dragToLook = false;\n\t\tthis.autoForward = false;\n\n\t\t// disable default target object behavior\n\n\t\t// internals\n\n\t\tconst scope = this;\n\n\t\tconst EPS = 0.000001;\n\n\t\tconst lastQuaternion = new Quaternion();\n\t\tconst lastPosition = new Vector3();\n\n\t\tthis.tmpQuaternion = new Quaternion();\n\n\t\tthis.mouseStatus = 0;\n\n\t\tthis.moveState = { up: 0, down: 0, left: 0, right: 0, forward: 0, back: 0, pitchUp: 0, pitchDown: 0, yawLeft: 0, yawRight: 0, rollLeft: 0, rollRight: 0 };\n\t\tthis.moveVector = new Vector3( 0, 0, 0 );\n\t\tthis.rotationVector = new Vector3( 0, 0, 0 );\n\n\t\tthis.keydown = function ( event ) {\n\n\t\t\tif ( event.altKey ) {\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tswitch ( event.code ) {\n\n\t\t\t\tcase 'ShiftLeft':\n\t\t\t\tcase 'ShiftRight': this.movementSpeedMultiplier = .1; break;\n\n\t\t\t\tcase 'KeyW': this.moveState.forward = 1; break;\n\t\t\t\tcase 'KeyS': this.moveState.back = 1; break;\n\n\t\t\t\tcase 'KeyA': this.moveState.left = 1; break;\n\t\t\t\tcase 'KeyD': this.moveState.right = 1; break;\n\n\t\t\t\tcase 'KeyR': this.moveState.up = 1; break;\n\t\t\t\tcase 'KeyF': this.moveState.down = 1; break;\n\n\t\t\t\tcase 'ArrowUp': this.moveState.pitchUp = 1; break;\n\t\t\t\tcase 'ArrowDown': this.moveState.pitchDown = 1; break;\n\n\t\t\t\tcase 'ArrowLeft': this.moveState.yawLeft = 1; break;\n\t\t\t\tcase 'ArrowRight': this.moveState.yawRight = 1; break;\n\n\t\t\t\tcase 'KeyQ': this.moveState.rollLeft = 1; break;\n\t\t\t\tcase 'KeyE': this.moveState.rollRight = 1; break;\n\n\t\t\t}\n\n\t\t\tthis.updateMovementVector();\n\t\t\tthis.updateRotationVector();\n\n\t\t};\n\n\t\tthis.keyup = function ( event ) {\n\n\t\t\tswitch ( event.code ) {\n\n\t\t\t\tcase 'ShiftLeft':\n\t\t\t\tcase 'ShiftRight': this.movementSpeedMultiplier = 1; break;\n\n\t\t\t\tcase 'KeyW': this.moveState.forward = 0; break;\n\t\t\t\tcase 'KeyS': this.moveState.back = 0; break;\n\n\t\t\t\tcase 'KeyA': this.moveState.left = 0; break;\n\t\t\t\tcase 'KeyD': this.moveState.right = 0; break;\n\n\t\t\t\tcase 'KeyR': this.moveState.up = 0; break;\n\t\t\t\tcase 'KeyF': this.moveState.down = 0; break;\n\n\t\t\t\tcase 'ArrowUp': this.moveState.pitchUp = 0; break;\n\t\t\t\tcase 'ArrowDown': this.moveState.pitchDown = 0; break;\n\n\t\t\t\tcase 'ArrowLeft': this.moveState.yawLeft = 0; break;\n\t\t\t\tcase 'ArrowRight': this.moveState.yawRight = 0; break;\n\n\t\t\t\tcase 'KeyQ': this.moveState.rollLeft = 0; break;\n\t\t\t\tcase 'KeyE': this.moveState.rollRight = 0; break;\n\n\t\t\t}\n\n\t\t\tthis.updateMovementVector();\n\t\t\tthis.updateRotationVector();\n\n\t\t};\n\n\t\tthis.mousedown = function ( event ) {\n\n\t\t\tif ( this.dragToLook ) {\n\n\t\t\t\tthis.mouseStatus ++;\n\n\t\t\t} else {\n\n\t\t\t\tswitch ( event.button ) {\n\n\t\t\t\t\tcase 0: this.moveState.forward = 1; break;\n\t\t\t\t\tcase 2: this.moveState.back = 1; break;\n\n\t\t\t\t}\n\n\t\t\t\tthis.updateMovementVector();\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.mousemove = function ( event ) {\n\n\t\t\tif ( ! this.dragToLook || this.mouseStatus > 0 ) {\n\n\t\t\t\tconst container = this.getContainerDimensions();\n\t\t\t\tconst halfWidth = container.size[ 0 ] / 2;\n\t\t\t\tconst halfHeight = container.size[ 1 ] / 2;\n\n\t\t\t\tthis.moveState.yawLeft = - ( ( event.pageX - container.offset[ 0 ] ) - halfWidth ) / halfWidth;\n\t\t\t\tthis.moveState.pitchDown = ( ( event.pageY - container.offset[ 1 ] ) - halfHeight ) / halfHeight;\n\n\t\t\t\tthis.updateRotationVector();\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.mouseup = function ( event ) {\n\n\t\t\tif ( this.dragToLook ) {\n\n\t\t\t\tthis.mouseStatus --;\n\n\t\t\t\tthis.moveState.yawLeft = this.moveState.pitchDown = 0;\n\n\t\t\t} else {\n\n\t\t\t\tswitch ( event.button ) {\n\n\t\t\t\t\tcase 0: this.moveState.forward = 0; break;\n\t\t\t\t\tcase 2: this.moveState.back = 0; break;\n\n\t\t\t\t}\n\n\t\t\t\tthis.updateMovementVector();\n\n\t\t\t}\n\n\t\t\tthis.updateRotationVector();\n\n\t\t};\n\n\t\tthis.update = function ( delta ) {\n\n\t\t\tconst moveMult = delta * scope.movementSpeed;\n\t\t\tconst rotMult = delta * scope.rollSpeed;\n\n\t\t\tscope.object.translateX( scope.moveVector.x * moveMult );\n\t\t\tscope.object.translateY( scope.moveVector.y * moveMult );\n\t\t\tscope.object.translateZ( scope.moveVector.z * moveMult );\n\n\t\t\tscope.tmpQuaternion.set( scope.rotationVector.x * rotMult, scope.rotationVector.y * rotMult, scope.rotationVector.z * rotMult, 1 ).normalize();\n\t\t\tscope.object.quaternion.multiply( scope.tmpQuaternion );\n\n\t\t\tif (\n\t\t\t\tlastPosition.distanceToSquared( scope.object.position ) > EPS ||\n\t\t\t\t8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS\n\t\t\t) {\n\n\t\t\t\tscope.dispatchEvent( _changeEvent );\n\t\t\t\tlastQuaternion.copy( scope.object.quaternion );\n\t\t\t\tlastPosition.copy( scope.object.position );\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.updateMovementVector = function () {\n\n\t\t\tconst forward = ( this.moveState.forward || ( this.autoForward && ! this.moveState.back ) ) ? 1 : 0;\n\n\t\t\tthis.moveVector.x = ( - this.moveState.left + this.moveState.right );\n\t\t\tthis.moveVector.y = ( - this.moveState.down + this.moveState.up );\n\t\t\tthis.moveVector.z = ( - forward + this.moveState.back );\n\n\t\t\t//console.log( 'move:', [ this.moveVector.x, this.moveVector.y, this.moveVector.z ] );\n\n\t\t};\n\n\t\tthis.updateRotationVector = function () {\n\n\t\t\tthis.rotationVector.x = ( - this.moveState.pitchDown + this.moveState.pitchUp );\n\t\t\tthis.rotationVector.y = ( - this.moveState.yawRight + this.moveState.yawLeft );\n\t\t\tthis.rotationVector.z = ( - this.moveState.rollRight + this.moveState.rollLeft );\n\n\t\t\t//console.log( 'rotate:', [ this.rotationVector.x, this.rotationVector.y, this.rotationVector.z ] );\n\n\t\t};\n\n\t\tthis.getContainerDimensions = function () {\n\n\t\t\tif ( this.domElement != document ) {\n\n\t\t\t\treturn {\n\t\t\t\t\tsize: [ this.domElement.offsetWidth, this.domElement.offsetHeight ],\n\t\t\t\t\toffset: [ this.domElement.offsetLeft, this.domElement.offsetTop ]\n\t\t\t\t};\n\n\t\t\t} else {\n\n\t\t\t\treturn {\n\t\t\t\t\tsize: [ window.innerWidth, window.innerHeight ],\n\t\t\t\t\toffset: [ 0, 0 ]\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t};\n\n\t\tthis.dispose = function () {\n\n\t\t\tthis.domElement.removeEventListener( 'contextmenu', contextmenu );\n\t\t\tthis.domElement.removeEventListener( 'mousedown', _mousedown );\n\t\t\tthis.domElement.removeEventListener( 'mousemove', _mousemove );\n\t\t\tthis.domElement.removeEventListener( 'mouseup', _mouseup );\n\n\t\t\twindow.removeEventListener( 'keydown', _keydown );\n\t\t\twindow.removeEventListener( 'keyup', _keyup );\n\n\t\t};\n\n\t\tconst _mousemove = this.mousemove.bind( this );\n\t\tconst _mousedown = this.mousedown.bind( this );\n\t\tconst _mouseup = this.mouseup.bind( this );\n\t\tconst _keydown = this.keydown.bind( this );\n\t\tconst _keyup = this.keyup.bind( this );\n\n\t\tthis.domElement.addEventListener( 'contextmenu', contextmenu );\n\n\t\tthis.domElement.addEventListener( 'mousemove', _mousemove );\n\t\tthis.domElement.addEventListener( 'mousedown', _mousedown );\n\t\tthis.domElement.addEventListener( 'mouseup', _mouseup );\n\n\t\twindow.addEventListener( 'keydown', _keydown );\n\t\twindow.addEventListener( 'keyup', _keyup );\n\n\t\tthis.updateMovementVector();\n\t\tthis.updateRotationVector();\n\n\t}\n\n}\n\nfunction contextmenu( event ) {\n\n\tevent.preventDefault();\n\n}\n\nexport { FlyControls };\n","/**\n * Full-screen textured quad shader\n */\n\nvar CopyShader = {\n\n\tuniforms: {\n\n\t\t'tDiffuse': { value: null },\n\t\t'opacity': { value: 1.0 }\n\n\t},\n\n\tvertexShader: /* glsl */`\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}`,\n\n\tfragmentShader: /* glsl */`\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\t\t}`\n\n};\n\nexport { CopyShader };\n","import {\n\tBufferGeometry,\n\tFloat32BufferAttribute,\n\tOrthographicCamera,\n\tMesh\n} from 'three';\n\nclass Pass {\n\n\tconstructor() {\n\n\t\t// if set to true, the pass is processed by the composer\n\t\tthis.enabled = true;\n\n\t\t// if set to true, the pass indicates to swap read and write buffer after rendering\n\t\tthis.needsSwap = true;\n\n\t\t// if set to true, the pass clears its buffer before rendering\n\t\tthis.clear = false;\n\n\t\t// if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer.\n\t\tthis.renderToScreen = false;\n\n\t}\n\n\tsetSize( /* width, height */ ) {}\n\n\trender( /* renderer, writeBuffer, readBuffer, deltaTime, maskActive */ ) {\n\n\t\tconsole.error( 'THREE.Pass: .render() must be implemented in derived pass.' );\n\n\t}\n\n}\n\n// Helper for passes that need to fill the viewport with a single quad.\n\nconst _camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );\n\n// https://github.com/mrdoob/three.js/pull/21358\n\nconst _geometry = new BufferGeometry();\n_geometry.setAttribute( 'position', new Float32BufferAttribute( [ - 1, 3, 0, - 1, - 1, 0, 3, - 1, 0 ], 3 ) );\n_geometry.setAttribute( 'uv', new Float32BufferAttribute( [ 0, 2, 0, 0, 2, 0 ], 2 ) );\n\nclass FullScreenQuad {\n\n\tconstructor( material ) {\n\n\t\tthis._mesh = new Mesh( _geometry, material );\n\n\t}\n\n\tdispose() {\n\n\t\tthis._mesh.geometry.dispose();\n\n\t}\n\n\trender( renderer ) {\n\n\t\trenderer.render( this._mesh, _camera );\n\n\t}\n\n\tget material() {\n\n\t\treturn this._mesh.material;\n\n\t}\n\n\tset material( value ) {\n\n\t\tthis._mesh.material = value;\n\n\t}\n\n}\n\nexport { Pass, FullScreenQuad };\n","import {\n\tShaderMaterial,\n\tUniformsUtils\n} from 'three';\nimport { Pass, FullScreenQuad } from '../postprocessing/Pass.js';\n\nclass ShaderPass extends Pass {\n\n\tconstructor( shader, textureID ) {\n\n\t\tsuper();\n\n\t\tthis.textureID = ( textureID !== undefined ) ? textureID : 'tDiffuse';\n\n\t\tif ( shader instanceof ShaderMaterial ) {\n\n\t\t\tthis.uniforms = shader.uniforms;\n\n\t\t\tthis.material = shader;\n\n\t\t} else if ( shader ) {\n\n\t\t\tthis.uniforms = UniformsUtils.clone( shader.uniforms );\n\n\t\t\tthis.material = new ShaderMaterial( {\n\n\t\t\t\tdefines: Object.assign( {}, shader.defines ),\n\t\t\t\tuniforms: this.uniforms,\n\t\t\t\tvertexShader: shader.vertexShader,\n\t\t\t\tfragmentShader: shader.fragmentShader\n\n\t\t\t} );\n\n\t\t}\n\n\t\tthis.fsQuad = new FullScreenQuad( this.material );\n\n\t}\n\n\trender( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {\n\n\t\tif ( this.uniforms[ this.textureID ] ) {\n\n\t\t\tthis.uniforms[ this.textureID ].value = readBuffer.texture;\n\n\t\t}\n\n\t\tthis.fsQuad.material = this.material;\n\n\t\tif ( this.renderToScreen ) {\n\n\t\t\trenderer.setRenderTarget( null );\n\t\t\tthis.fsQuad.render( renderer );\n\n\t\t} else {\n\n\t\t\trenderer.setRenderTarget( writeBuffer );\n\t\t\t// TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600\n\t\t\tif ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\t\t\tthis.fsQuad.render( renderer );\n\n\t\t}\n\n\t}\n\n}\n\nexport { ShaderPass };\n","import { Pass } from '../postprocessing/Pass.js';\n\nclass MaskPass extends Pass {\n\n\tconstructor( scene, camera ) {\n\n\t\tsuper();\n\n\t\tthis.scene = scene;\n\t\tthis.camera = camera;\n\n\t\tthis.clear = true;\n\t\tthis.needsSwap = false;\n\n\t\tthis.inverse = false;\n\n\t}\n\n\trender( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {\n\n\t\tconst context = renderer.getContext();\n\t\tconst state = renderer.state;\n\n\t\t// don't update color or depth\n\n\t\tstate.buffers.color.setMask( false );\n\t\tstate.buffers.depth.setMask( false );\n\n\t\t// lock buffers\n\n\t\tstate.buffers.color.setLocked( true );\n\t\tstate.buffers.depth.setLocked( true );\n\n\t\t// set up stencil\n\n\t\tlet writeValue, clearValue;\n\n\t\tif ( this.inverse ) {\n\n\t\t\twriteValue = 0;\n\t\t\tclearValue = 1;\n\n\t\t} else {\n\n\t\t\twriteValue = 1;\n\t\t\tclearValue = 0;\n\n\t\t}\n\n\t\tstate.buffers.stencil.setTest( true );\n\t\tstate.buffers.stencil.setOp( context.REPLACE, context.REPLACE, context.REPLACE );\n\t\tstate.buffers.stencil.setFunc( context.ALWAYS, writeValue, 0xffffffff );\n\t\tstate.buffers.stencil.setClear( clearValue );\n\t\tstate.buffers.stencil.setLocked( true );\n\n\t\t// draw into the stencil buffer\n\n\t\trenderer.setRenderTarget( readBuffer );\n\t\tif ( this.clear ) renderer.clear();\n\t\trenderer.render( this.scene, this.camera );\n\n\t\trenderer.setRenderTarget( writeBuffer );\n\t\tif ( this.clear ) renderer.clear();\n\t\trenderer.render( this.scene, this.camera );\n\n\t\t// unlock color and depth buffer for subsequent rendering\n\n\t\tstate.buffers.color.setLocked( false );\n\t\tstate.buffers.depth.setLocked( false );\n\n\t\t// only render where stencil is set to 1\n\n\t\tstate.buffers.stencil.setLocked( false );\n\t\tstate.buffers.stencil.setFunc( context.EQUAL, 1, 0xffffffff ); // draw if == 1\n\t\tstate.buffers.stencil.setOp( context.KEEP, context.KEEP, context.KEEP );\n\t\tstate.buffers.stencil.setLocked( true );\n\n\t}\n\n}\n\nclass ClearMaskPass extends Pass {\n\n\tconstructor() {\n\n\t\tsuper();\n\n\t\tthis.needsSwap = false;\n\n\t}\n\n\trender( renderer /*, writeBuffer, readBuffer, deltaTime, maskActive */ ) {\n\n\t\trenderer.state.buffers.stencil.setLocked( false );\n\t\trenderer.state.buffers.stencil.setTest( false );\n\n\t}\n\n}\n\nexport { MaskPass, ClearMaskPass };\n","import {\n\tBufferGeometry,\n\tClock,\n\tFloat32BufferAttribute,\n\tLinearFilter,\n\tMesh,\n\tOrthographicCamera,\n\tRGBAFormat,\n\tVector2,\n\tWebGLRenderTarget\n} from 'three';\nimport { CopyShader } from '../shaders/CopyShader.js';\nimport { ShaderPass } from '../postprocessing/ShaderPass.js';\nimport { MaskPass } from '../postprocessing/MaskPass.js';\nimport { ClearMaskPass } from '../postprocessing/MaskPass.js';\n\nclass EffectComposer {\n\n\tconstructor( renderer, renderTarget ) {\n\n\t\tthis.renderer = renderer;\n\n\t\tif ( renderTarget === undefined ) {\n\n\t\t\tconst parameters = {\n\t\t\t\tminFilter: LinearFilter,\n\t\t\t\tmagFilter: LinearFilter,\n\t\t\t\tformat: RGBAFormat\n\t\t\t};\n\n\t\t\tconst size = renderer.getSize( new Vector2() );\n\t\t\tthis._pixelRatio = renderer.getPixelRatio();\n\t\t\tthis._width = size.width;\n\t\t\tthis._height = size.height;\n\n\t\t\trenderTarget = new WebGLRenderTarget( this._width * this._pixelRatio, this._height * this._pixelRatio, parameters );\n\t\t\trenderTarget.texture.name = 'EffectComposer.rt1';\n\n\t\t} else {\n\n\t\t\tthis._pixelRatio = 1;\n\t\t\tthis._width = renderTarget.width;\n\t\t\tthis._height = renderTarget.height;\n\n\t\t}\n\n\t\tthis.renderTarget1 = renderTarget;\n\t\tthis.renderTarget2 = renderTarget.clone();\n\t\tthis.renderTarget2.texture.name = 'EffectComposer.rt2';\n\n\t\tthis.writeBuffer = this.renderTarget1;\n\t\tthis.readBuffer = this.renderTarget2;\n\n\t\tthis.renderToScreen = true;\n\n\t\tthis.passes = [];\n\n\t\t// dependencies\n\n\t\tif ( CopyShader === undefined ) {\n\n\t\t\tconsole.error( 'THREE.EffectComposer relies on CopyShader' );\n\n\t\t}\n\n\t\tif ( ShaderPass === undefined ) {\n\n\t\t\tconsole.error( 'THREE.EffectComposer relies on ShaderPass' );\n\n\t\t}\n\n\t\tthis.copyPass = new ShaderPass( CopyShader );\n\n\t\tthis.clock = new Clock();\n\n\t}\n\n\tswapBuffers() {\n\n\t\tconst tmp = this.readBuffer;\n\t\tthis.readBuffer = this.writeBuffer;\n\t\tthis.writeBuffer = tmp;\n\n\t}\n\n\taddPass( pass ) {\n\n\t\tthis.passes.push( pass );\n\t\tpass.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );\n\n\t}\n\n\tinsertPass( pass, index ) {\n\n\t\tthis.passes.splice( index, 0, pass );\n\t\tpass.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );\n\n\t}\n\n\tremovePass( pass ) {\n\n\t\tconst index = this.passes.indexOf( pass );\n\n\t\tif ( index !== - 1 ) {\n\n\t\t\tthis.passes.splice( index, 1 );\n\n\t\t}\n\n\t}\n\n\tisLastEnabledPass( passIndex ) {\n\n\t\tfor ( let i = passIndex + 1; i < this.passes.length; i ++ ) {\n\n\t\t\tif ( this.passes[ i ].enabled ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\trender( deltaTime ) {\n\n\t\t// deltaTime value is in seconds\n\n\t\tif ( deltaTime === undefined ) {\n\n\t\t\tdeltaTime = this.clock.getDelta();\n\n\t\t}\n\n\t\tconst currentRenderTarget = this.renderer.getRenderTarget();\n\n\t\tlet maskActive = false;\n\n\t\tfor ( let i = 0, il = this.passes.length; i < il; i ++ ) {\n\n\t\t\tconst pass = this.passes[ i ];\n\n\t\t\tif ( pass.enabled === false ) continue;\n\n\t\t\tpass.renderToScreen = ( this.renderToScreen && this.isLastEnabledPass( i ) );\n\t\t\tpass.render( this.renderer, this.writeBuffer, this.readBuffer, deltaTime, maskActive );\n\n\t\t\tif ( pass.needsSwap ) {\n\n\t\t\t\tif ( maskActive ) {\n\n\t\t\t\t\tconst context = this.renderer.getContext();\n\t\t\t\t\tconst stencil = this.renderer.state.buffers.stencil;\n\n\t\t\t\t\t//context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff );\n\t\t\t\t\tstencil.setFunc( context.NOTEQUAL, 1, 0xffffffff );\n\n\t\t\t\t\tthis.copyPass.render( this.renderer, this.writeBuffer, this.readBuffer, deltaTime );\n\n\t\t\t\t\t//context.stencilFunc( context.EQUAL, 1, 0xffffffff );\n\t\t\t\t\tstencil.setFunc( context.EQUAL, 1, 0xffffffff );\n\n\t\t\t\t}\n\n\t\t\t\tthis.swapBuffers();\n\n\t\t\t}\n\n\t\t\tif ( MaskPass !== undefined ) {\n\n\t\t\t\tif ( pass instanceof MaskPass ) {\n\n\t\t\t\t\tmaskActive = true;\n\n\t\t\t\t} else if ( pass instanceof ClearMaskPass ) {\n\n\t\t\t\t\tmaskActive = false;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.renderer.setRenderTarget( currentRenderTarget );\n\n\t}\n\n\treset( renderTarget ) {\n\n\t\tif ( renderTarget === undefined ) {\n\n\t\t\tconst size = this.renderer.getSize( new Vector2() );\n\t\t\tthis._pixelRatio = this.renderer.getPixelRatio();\n\t\t\tthis._width = size.width;\n\t\t\tthis._height = size.height;\n\n\t\t\trenderTarget = this.renderTarget1.clone();\n\t\t\trenderTarget.setSize( this._width * this._pixelRatio, this._height * this._pixelRatio );\n\n\t\t}\n\n\t\tthis.renderTarget1.dispose();\n\t\tthis.renderTarget2.dispose();\n\t\tthis.renderTarget1 = renderTarget;\n\t\tthis.renderTarget2 = renderTarget.clone();\n\n\t\tthis.writeBuffer = this.renderTarget1;\n\t\tthis.readBuffer = this.renderTarget2;\n\n\t}\n\n\tsetSize( width, height ) {\n\n\t\tthis._width = width;\n\t\tthis._height = height;\n\n\t\tconst effectiveWidth = this._width * this._pixelRatio;\n\t\tconst effectiveHeight = this._height * this._pixelRatio;\n\n\t\tthis.renderTarget1.setSize( effectiveWidth, effectiveHeight );\n\t\tthis.renderTarget2.setSize( effectiveWidth, effectiveHeight );\n\n\t\tfor ( let i = 0; i < this.passes.length; i ++ ) {\n\n\t\t\tthis.passes[ i ].setSize( effectiveWidth, effectiveHeight );\n\n\t\t}\n\n\t}\n\n\tsetPixelRatio( pixelRatio ) {\n\n\t\tthis._pixelRatio = pixelRatio;\n\n\t\tthis.setSize( this._width, this._height );\n\n\t}\n\n}\n\n\nclass Pass {\n\n\tconstructor() {\n\n\t\t// if set to true, the pass is processed by the composer\n\t\tthis.enabled = true;\n\n\t\t// if set to true, the pass indicates to swap read and write buffer after rendering\n\t\tthis.needsSwap = true;\n\n\t\t// if set to true, the pass clears its buffer before rendering\n\t\tthis.clear = false;\n\n\t\t// if set to true, the result of the pass is rendered to screen. This is set automatically by EffectComposer.\n\t\tthis.renderToScreen = false;\n\n\t}\n\n\tsetSize( /* width, height */ ) {}\n\n\trender( /* renderer, writeBuffer, readBuffer, deltaTime, maskActive */ ) {\n\n\t\tconsole.error( 'THREE.Pass: .render() must be implemented in derived pass.' );\n\n\t}\n\n}\n\n// Helper for passes that need to fill the viewport with a single quad.\n\nconst _camera = new OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );\n\n// https://github.com/mrdoob/three.js/pull/21358\n\nconst _geometry = new BufferGeometry();\n_geometry.setAttribute( 'position', new Float32BufferAttribute( [ - 1, 3, 0, - 1, - 1, 0, 3, - 1, 0 ], 3 ) );\n_geometry.setAttribute( 'uv', new Float32BufferAttribute( [ 0, 2, 0, 0, 2, 0 ], 2 ) );\n\nclass FullScreenQuad {\n\n\tconstructor( material ) {\n\n\t\tthis._mesh = new Mesh( _geometry, material );\n\n\t}\n\n\tdispose() {\n\n\t\tthis._mesh.geometry.dispose();\n\n\t}\n\n\trender( renderer ) {\n\n\t\trenderer.render( this._mesh, _camera );\n\n\t}\n\n\tget material() {\n\n\t\treturn this._mesh.material;\n\n\t}\n\n\tset material( value ) {\n\n\t\tthis._mesh.material = value;\n\n\t}\n\n}\n\nexport { EffectComposer, Pass, FullScreenQuad };\n","import {\n\tColor\n} from 'three';\nimport { Pass } from '../postprocessing/Pass.js';\n\nclass RenderPass extends Pass {\n\n\tconstructor( scene, camera, overrideMaterial, clearColor, clearAlpha ) {\n\n\t\tsuper();\n\n\t\tthis.scene = scene;\n\t\tthis.camera = camera;\n\n\t\tthis.overrideMaterial = overrideMaterial;\n\n\t\tthis.clearColor = clearColor;\n\t\tthis.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0;\n\n\t\tthis.clear = true;\n\t\tthis.clearDepth = false;\n\t\tthis.needsSwap = false;\n\t\tthis._oldClearColor = new Color();\n\n\t}\n\n\trender( renderer, writeBuffer, readBuffer /*, deltaTime, maskActive */ ) {\n\n\t\tconst oldAutoClear = renderer.autoClear;\n\t\trenderer.autoClear = false;\n\n\t\tlet oldClearAlpha, oldOverrideMaterial;\n\n\t\tif ( this.overrideMaterial !== undefined ) {\n\n\t\t\toldOverrideMaterial = this.scene.overrideMaterial;\n\n\t\t\tthis.scene.overrideMaterial = this.overrideMaterial;\n\n\t\t}\n\n\t\tif ( this.clearColor ) {\n\n\t\t\trenderer.getClearColor( this._oldClearColor );\n\t\t\toldClearAlpha = renderer.getClearAlpha();\n\n\t\t\trenderer.setClearColor( this.clearColor, this.clearAlpha );\n\n\t\t}\n\n\t\tif ( this.clearDepth ) {\n\n\t\t\trenderer.clearDepth();\n\n\t\t}\n\n\t\trenderer.setRenderTarget( this.renderToScreen ? null : readBuffer );\n\n\t\t// TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600\n\t\tif ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );\n\t\trenderer.render( this.scene, this.camera );\n\n\t\tif ( this.clearColor ) {\n\n\t\t\trenderer.setClearColor( this._oldClearColor, oldClearAlpha );\n\n\t\t}\n\n\t\tif ( this.overrideMaterial !== undefined ) {\n\n\t\t\tthis.scene.overrideMaterial = oldOverrideMaterial;\n\n\t\t}\n\n\t\trenderer.autoClear = oldAutoClear;\n\n\t}\n\n}\n\nexport { RenderPass };\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _wrapNativeSuper from '@babel/runtime/helpers/esm/wrapNativeSuper';\nimport _taggedTemplateLiteralLoose from '@babel/runtime/helpers/esm/taggedTemplateLiteralLoose';\n\nfunction last() {\n var _ref;\n\n return _ref = arguments.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref];\n}\n\nfunction negation(a) {\n return -a;\n}\n\nfunction addition(a, b) {\n return a + b;\n}\n\nfunction subtraction(a, b) {\n return a - b;\n}\n\nfunction multiplication(a, b) {\n return a * b;\n}\n\nfunction division(a, b) {\n return a / b;\n}\n\nfunction max() {\n return Math.max.apply(Math, arguments);\n}\n\nfunction min() {\n return Math.min.apply(Math, arguments);\n}\n\nfunction comma() {\n return Array.of.apply(Array, arguments);\n}\n\nvar defaultSymbols = {\n symbols: {\n '*': {\n infix: {\n symbol: '*',\n f: multiplication,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '*',\n regSymbol: '\\\\*'\n },\n '/': {\n infix: {\n symbol: '/',\n f: division,\n notation: 'infix',\n precedence: 4,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: '/',\n regSymbol: '/'\n },\n '+': {\n infix: {\n symbol: '+',\n f: addition,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '+',\n f: last,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '+',\n regSymbol: '\\\\+'\n },\n '-': {\n infix: {\n symbol: '-',\n f: subtraction,\n notation: 'infix',\n precedence: 2,\n rightToLeft: 0,\n argCount: 2\n },\n prefix: {\n symbol: '-',\n f: negation,\n notation: 'prefix',\n precedence: 3,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '-',\n regSymbol: '-'\n },\n ',': {\n infix: {\n symbol: ',',\n f: comma,\n notation: 'infix',\n precedence: 1,\n rightToLeft: 0,\n argCount: 2\n },\n symbol: ',',\n regSymbol: ','\n },\n '(': {\n prefix: {\n symbol: '(',\n f: last,\n notation: 'prefix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: '(',\n regSymbol: '\\\\('\n },\n ')': {\n postfix: {\n symbol: ')',\n f: undefined,\n notation: 'postfix',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: ')',\n regSymbol: '\\\\)'\n },\n min: {\n func: {\n symbol: 'min',\n f: min,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'min',\n regSymbol: 'min\\\\b'\n },\n max: {\n func: {\n symbol: 'max',\n f: max,\n notation: 'func',\n precedence: 0,\n rightToLeft: 0,\n argCount: 1\n },\n symbol: 'max',\n regSymbol: 'max\\\\b'\n }\n }\n};\n\n// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js\n\n/**\n * Parse errors.md and turn it into a simple hash of code: message\n * @private\n */\nvar ERRORS = {\n \"1\": \"Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\\n\\n\",\n \"2\": \"Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\\n\\n\",\n \"3\": \"Passed an incorrect argument to a color function, please pass a string representation of a color.\\n\\n\",\n \"4\": \"Couldn't generate valid rgb string from %s, it returned %s.\\n\\n\",\n \"5\": \"Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\\n\\n\",\n \"6\": \"Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\\n\\n\",\n \"7\": \"Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\\n\\n\",\n \"8\": \"Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\\n\\n\",\n \"9\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"10\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"11\": \"Invalid value passed as base to modularScale, expected number or em string but got \\\"%s\\\"\\n\\n\",\n \"12\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"13\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got \\\"%s\\\" instead.\\n\\n\",\n \"14\": \"Passed invalid pixel value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"15\": \"Passed invalid base value (\\\"%s\\\") to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"16\": \"You must provide a template to this method.\\n\\n\",\n \"17\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"18\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"19\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"20\": \"expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"21\": \"expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"22\": \"expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\\n\\n\",\n \"23\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"24\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"25\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"26\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"27\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"28\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"29\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"30\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"31\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"32\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\\n\\n\",\n \"33\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\\n\\n\",\n \"34\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"35\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"36\": \"Property must be a string value.\\n\\n\",\n \"37\": \"Syntax Error at %s.\\n\\n\",\n \"38\": \"Formula contains a function that needs parentheses at %s.\\n\\n\",\n \"39\": \"Formula is missing closing parenthesis at %s.\\n\\n\",\n \"40\": \"Formula has too many closing parentheses at %s.\\n\\n\",\n \"41\": \"All values in a formula must have the same unit or be unitless.\\n\\n\",\n \"42\": \"Please provide a number of steps to the modularScale helper.\\n\\n\",\n \"43\": \"Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\\n\\n\",\n \"44\": \"Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\\n\\n\",\n \"45\": \"Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\\n\\n\",\n \"46\": \"Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\\n\\n\",\n \"47\": \"minScreen and maxScreen must be provided as stringified numbers with the same units.\\n\\n\",\n \"48\": \"fromSize and toSize must be provided as stringified numbers with the same units.\\n\\n\",\n \"49\": \"Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\\n\\n\",\n \"50\": \"Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"51\": \"Expects the first argument object to have the properties prop, fromSize, and toSize.\\n\\n\",\n \"52\": \"fontFace expects either the path to the font file(s) or a name of a local copy.\\n\\n\",\n \"53\": \"fontFace expects localFonts to be an array.\\n\\n\",\n \"54\": \"fontFace expects fileFormats to be an array.\\n\\n\",\n \"55\": \"fontFace expects a name of a font-family.\\n\\n\",\n \"56\": \"linearGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"57\": \"radialGradient requries at least 2 color-stops to properly render.\\n\\n\",\n \"58\": \"Please supply a filename to retinaImage() as the first argument.\\n\\n\",\n \"59\": \"Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\\n\\n\",\n \"60\": \"Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\\n\\n\",\n \"61\": \"Property must be a string value.\\n\\n\",\n \"62\": \"borderRadius expects a radius value as a string or number as the second argument.\\n\\n\",\n \"63\": \"borderRadius expects one of \\\"top\\\", \\\"bottom\\\", \\\"left\\\" or \\\"right\\\" as the first argument.\\n\\n\",\n \"64\": \"The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"65\": \"To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\\n\\n\",\n \"66\": \"The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\\n\\n\",\n \"67\": \"You must provide a template to this method.\\n\\n\",\n \"68\": \"You passed an unsupported selector state to this method.\\n\\n\",\n \"69\": \"Expected a string ending in \\\"px\\\" or a number passed as the first argument to %s(), got %s instead.\\n\\n\",\n \"70\": \"Expected a string ending in \\\"px\\\" or a number passed as the second argument to %s(), got %s instead.\\n\\n\",\n \"71\": \"Passed invalid pixel value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"72\": \"Passed invalid base value %s to %s(), please pass a value like \\\"12px\\\" or 12.\\n\\n\",\n \"73\": \"Please provide a valid CSS variable.\\n\\n\",\n \"74\": \"CSS variable not found and no default was provided.\\n\\n\",\n \"75\": \"important requires a valid style object, got a %s instead.\\n\\n\",\n \"76\": \"fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\\n\\n\",\n \"77\": \"remToPx expects a value in \\\"rem\\\" but you provided it in \\\"%s\\\".\\n\\n\",\n \"78\": \"base must be set in \\\"px\\\" or \\\"%\\\" but you set it in \\\"%s\\\".\\n\"\n};\n/**\n * super basic version of sprintf\n * @private\n */\n\nfunction format() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var a = args[0];\n var b = [];\n var c;\n\n for (c = 1; c < args.length; c += 1) {\n b.push(args[c]);\n }\n\n b.forEach(function (d) {\n a = a.replace(/%[a-z]/, d);\n });\n return a;\n}\n/**\n * Create an error file out of errors.md for development and a simple web link to the full errors\n * in production mode.\n * @private\n */\n\n\nvar PolishedError = /*#__PURE__*/function (_Error) {\n _inheritsLoose(PolishedError, _Error);\n\n function PolishedError(code) {\n var _this;\n\n if (process.env.NODE_ENV === 'production') {\n _this = _Error.call(this, \"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#\" + code + \" for more information.\") || this;\n } else {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;\n }\n\n return _assertThisInitialized(_this);\n }\n\n return PolishedError;\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nvar unitRegExp = /((?!\\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\\D|$)|ged|darg?|nrut)/g; // Merges additional math functionality into the defaults.\n\nfunction mergeSymbolMaps(additionalSymbols) {\n var symbolMap = {};\n symbolMap.symbols = additionalSymbols ? _extends({}, defaultSymbols.symbols, additionalSymbols.symbols) : _extends({}, defaultSymbols.symbols);\n return symbolMap;\n}\n\nfunction exec(operators, values) {\n var _ref;\n\n var op = operators.pop();\n values.push(op.f.apply(op, (_ref = []).concat.apply(_ref, values.splice(-op.argCount))));\n return op.precedence;\n}\n\nfunction calculate(expression, additionalSymbols) {\n var symbolMap = mergeSymbolMaps(additionalSymbols);\n var match;\n var operators = [symbolMap.symbols['('].prefix];\n var values = [];\n var pattern = new RegExp( // Pattern for numbers\n \"\\\\d+(?:\\\\.\\\\d+)?|\" + // ...and patterns for individual operators/function names\n Object.keys(symbolMap.symbols).map(function (key) {\n return symbolMap.symbols[key];\n }) // longer symbols should be listed first\n // $FlowFixMe\n .sort(function (a, b) {\n return b.symbol.length - a.symbol.length;\n }) // $FlowFixMe\n .map(function (val) {\n return val.regSymbol;\n }).join('|') + \"|(\\\\S)\", 'g');\n pattern.lastIndex = 0; // Reset regular expression object\n\n var afterValue = false;\n\n do {\n match = pattern.exec(expression);\n\n var _ref2 = match || [')', undefined],\n token = _ref2[0],\n bad = _ref2[1];\n\n var notNumber = symbolMap.symbols[token];\n var notNewValue = notNumber && !notNumber.prefix && !notNumber.func;\n var notAfterValue = !notNumber || !notNumber.postfix && !notNumber.infix; // Check for syntax errors:\n\n if (bad || (afterValue ? notAfterValue : notNewValue)) {\n throw new PolishedError(37, match ? match.index : expression.length, expression);\n }\n\n if (afterValue) {\n // We either have an infix or postfix operator (they should be mutually exclusive)\n var curr = notNumber.postfix || notNumber.infix;\n\n do {\n var prev = operators[operators.length - 1];\n if ((curr.precedence - prev.precedence || prev.rightToLeft) > 0) break; // Apply previous operator, since it has precedence over current one\n } while (exec(operators, values)); // Exit loop after executing an opening parenthesis or function\n\n\n afterValue = curr.notation === 'postfix';\n\n if (curr.symbol !== ')') {\n operators.push(curr); // Postfix always has precedence over any operator that follows after it\n\n if (afterValue) exec(operators, values);\n }\n } else if (notNumber) {\n // prefix operator or function\n operators.push(notNumber.prefix || notNumber.func);\n\n if (notNumber.func) {\n // Require an opening parenthesis\n match = pattern.exec(expression);\n\n if (!match || match[0] !== '(') {\n throw new PolishedError(38, match ? match.index : expression.length, expression);\n }\n }\n } else {\n // number\n values.push(+token);\n afterValue = true;\n }\n } while (match && operators.length);\n\n if (operators.length) {\n throw new PolishedError(39, match ? match.index : expression.length, expression);\n } else if (match) {\n throw new PolishedError(40, match ? match.index : expression.length, expression);\n } else {\n return values.pop();\n }\n}\n\nfunction reverseString(str) {\n return str.split('').reverse().join('');\n}\n/**\n * Helper for doing math with CSS Units. Accepts a formula as a string. All values in the formula must have the same unit (or be unitless). Supports complex formulas utliziing addition, subtraction, multiplication, division, square root, powers, factorial, min, max, as well as parentheses for order of operation.\n *\n *In cases where you need to do calculations with mixed units where one unit is a [relative length unit](https://developer.mozilla.org/en-US/docs/Web/CSS/length#Relative_length_units), you will want to use [CSS Calc](https://developer.mozilla.org/en-US/docs/Web/CSS/calc).\n *\n * *warning* While we've done everything possible to ensure math safely evalutes formulas expressed as strings, you should always use extreme caution when passing `math` user provided values.\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: math('12rem + 8rem'),\n * fontSize: math('(12px + 2px) * 3'),\n * fontSize: math('3px^2 + sqrt(4)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${math('12rem + 8rem')};\n * fontSize: ${math('(12px + 2px) * 3')};\n * fontSize: ${math('3px^2 + sqrt(4)')};\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * fontSize: '20rem',\n * fontSize: '42px',\n * fontSize: '11px',\n * }\n */\n\n\nfunction math(formula, additionalSymbols) {\n var reversedFormula = reverseString(formula);\n var formulaMatch = reversedFormula.match(unitRegExp); // Check that all units are the same\n\n if (formulaMatch && !formulaMatch.every(function (unit) {\n return unit === formulaMatch[0];\n })) {\n throw new PolishedError(41);\n }\n\n var cleanFormula = reverseString(reversedFormula.replace(unitRegExp, ''));\n return \"\" + calculate(cleanFormula, additionalSymbols) + (formulaMatch ? reverseString(formulaMatch[0]) : '');\n}\n\nvar cssVariableRegex = /--[\\S]*/g;\n/**\n * Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'background': cssVar('--background-color'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${cssVar('--background-color')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'background': 'red'\n * }\n */\n\nfunction cssVar(cssVariable, defaultValue) {\n if (!cssVariable || !cssVariable.match(cssVariableRegex)) {\n throw new PolishedError(73);\n }\n\n var variableValue;\n /* eslint-disable */\n\n /* istanbul ignore next */\n\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);\n }\n /* eslint-enable */\n\n\n if (variableValue) {\n return variableValue.trim();\n } else if (defaultValue) {\n return defaultValue;\n }\n\n throw new PolishedError(74);\n}\n\n// @private\nfunction capitalizeString(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar positionMap$1 = ['Top', 'Right', 'Bottom', 'Left'];\n\nfunction generateProperty(property, position) {\n if (!property) return position.toLowerCase();\n var splitProperty = property.split('-');\n\n if (splitProperty.length > 1) {\n splitProperty.splice(1, 0, position);\n return splitProperty.reduce(function (acc, val) {\n return \"\" + acc + capitalizeString(val);\n });\n }\n\n var joinedProperty = property.replace(/([a-z])([A-Z])/g, \"$1\" + position + \"$2\");\n return property === joinedProperty ? \"\" + property + position : joinedProperty;\n}\n\nfunction generateStyles(property, valuesWithDefaults) {\n var styles = {};\n\n for (var i = 0; i < valuesWithDefaults.length; i += 1) {\n if (valuesWithDefaults[i] || valuesWithDefaults[i] === 0) {\n styles[generateProperty(property, positionMap$1[i])] = valuesWithDefaults[i];\n }\n }\n\n return styles;\n}\n/**\n * Enables shorthand for direction-based properties. It accepts a property (hyphenated or camelCased) and up to four values that map to top, right, bottom, and left, respectively. You can optionally pass an empty string to get only the directional values as properties. You can also optionally pass a null argument for a directional value to ignore it.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...directionalProperty('padding', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${directionalProperty('padding', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\n\n\nfunction directionalProperty(property) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n // prettier-ignore\n var firstValue = values[0],\n _values$ = values[1],\n secondValue = _values$ === void 0 ? firstValue : _values$,\n _values$2 = values[2],\n thirdValue = _values$2 === void 0 ? firstValue : _values$2,\n _values$3 = values[3],\n fourthValue = _values$3 === void 0 ? secondValue : _values$3;\n var valuesWithDefaults = [firstValue, secondValue, thirdValue, fourthValue];\n return generateStyles(property, valuesWithDefaults);\n}\n\n/**\n * Check if a string ends with something\n * @private\n */\nfunction endsWith(string, suffix) {\n return string.substr(-suffix.length) === suffix;\n}\n\nvar cssRegex$1 = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value minus its unit of measure.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': stripUnit('100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${stripUnit('100px')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100\n * }\n */\n\nfunction stripUnit(value) {\n if (typeof value !== 'string') return value;\n var matchedValue = value.match(cssRegex$1);\n return matchedValue ? parseFloat(value) : value;\n}\n\n/**\n * Factory function that creates pixel-to-x converters\n * @private\n */\n\nvar pxtoFactory = function pxtoFactory(to) {\n return function (pxval, base) {\n if (base === void 0) {\n base = '16px';\n }\n\n var newPxval = pxval;\n var newBase = base;\n\n if (typeof pxval === 'string') {\n if (!endsWith(pxval, 'px')) {\n throw new PolishedError(69, to, pxval);\n }\n\n newPxval = stripUnit(pxval);\n }\n\n if (typeof base === 'string') {\n if (!endsWith(base, 'px')) {\n throw new PolishedError(70, to, base);\n }\n\n newBase = stripUnit(base);\n }\n\n if (typeof newPxval === 'string') {\n throw new PolishedError(71, pxval, to);\n }\n\n if (typeof newBase === 'string') {\n throw new PolishedError(72, base, to);\n }\n\n return \"\" + newPxval / newBase + to;\n };\n};\n\n/**\n * Convert pixel value to ems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': em('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${em('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1em'\n * }\n */\n\nvar em = /*#__PURE__*/pxtoFactory('em');\n\nvar cssRegex = /^([+-]?(?:\\d+|\\d*\\.\\d+))([a-z]*|%)$/;\n/**\n * Returns a given CSS value and its unit as elements of an array.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * '--dimension': getValueAndUnit('100px')[0],\n * '--unit': getValueAndUnit('100px')[1],\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * --dimension: ${getValueAndUnit('100px')[0]};\n * --unit: ${getValueAndUnit('100px')[1]};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * '--dimension': 100,\n * '--unit': 'px',\n * }\n */\n\nfunction getValueAndUnit(value) {\n if (typeof value !== 'string') return [value, ''];\n var matchedValue = value.match(cssRegex);\n if (matchedValue) return [parseFloat(value), matchedValue[2]];\n return [value, undefined];\n}\n\n/**\n * Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...important(cover())\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${important(cover())}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute !important',\n * 'top': '0 !important',\n * 'right: '0 !important',\n * 'bottom': '0 !important',\n * 'left: '0 !important'\n * }\n */\n\nfunction important(styleBlock, rules) {\n if (typeof styleBlock !== 'object' || styleBlock === null) {\n throw new PolishedError(75, typeof styleBlock);\n }\n\n var newStyleBlock = {};\n Object.keys(styleBlock).forEach(function (key) {\n if (typeof styleBlock[key] === 'object' && styleBlock[key] !== null) {\n newStyleBlock[key] = important(styleBlock[key], rules);\n } else if (!rules || rules && (rules === key || rules.indexOf(key) >= 0)) {\n newStyleBlock[key] = styleBlock[key] + \" !important\";\n } else {\n newStyleBlock[key] = styleBlock[key];\n }\n });\n return newStyleBlock;\n}\n\nvar ratioNames = {\n minorSecond: 1.067,\n majorSecond: 1.125,\n minorThird: 1.2,\n majorThird: 1.25,\n perfectFourth: 1.333,\n augFourth: 1.414,\n perfectFifth: 1.5,\n minorSixth: 1.6,\n goldenSection: 1.618,\n majorSixth: 1.667,\n minorSeventh: 1.778,\n majorSeventh: 1.875,\n octave: 2,\n majorTenth: 2.5,\n majorEleventh: 2.667,\n majorTwelfth: 3,\n doubleOctave: 4\n};\n\nfunction getRatio(ratioName) {\n return ratioNames[ratioName];\n}\n/**\n * Establish consistent measurements and spacial relationships throughout your projects by incrementing an em or rem value up or down a defined scale. We provide a list of commonly used scales as pre-defined variables.\n * @example\n * // Styles as object usage\n * const styles = {\n * // Increment two steps up the default scale\n * 'fontSize': modularScale(2)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * // Increment two steps up the default scale\n * fontSize: ${modularScale(2)}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'fontSize': '1.77689em'\n * }\n */\n\n\nfunction modularScale(steps, base, ratio) {\n if (base === void 0) {\n base = '1em';\n }\n\n if (ratio === void 0) {\n ratio = 1.333;\n }\n\n if (typeof steps !== 'number') {\n throw new PolishedError(42);\n }\n\n if (typeof ratio === 'string' && !ratioNames[ratio]) {\n throw new PolishedError(43);\n }\n\n var _ref = typeof base === 'string' ? getValueAndUnit(base) : [base, ''],\n realBase = _ref[0],\n unit = _ref[1];\n\n var realRatio = typeof ratio === 'string' ? getRatio(ratio) : ratio;\n\n if (typeof realBase === 'string') {\n throw new PolishedError(44, base);\n }\n\n return \"\" + realBase * Math.pow(realRatio, steps) + (unit || '');\n}\n\n/**\n * Convert pixel value to rems. The default base value is 16px, but can be changed by passing a\n * second argument to the function.\n * @function\n * @param {string|number} pxval\n * @param {string|number} [base='16px']\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': rem('16px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${rem('16px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '1rem'\n * }\n */\n\nvar rem = /*#__PURE__*/pxtoFactory('rem');\n\nvar defaultFontSize = 16;\n\nfunction convertBase(base) {\n var deconstructedValue = getValueAndUnit(base);\n\n if (deconstructedValue[1] === 'px') {\n return parseFloat(base);\n }\n\n if (deconstructedValue[1] === '%') {\n return parseFloat(base) / 100 * defaultFontSize;\n }\n\n throw new PolishedError(78, deconstructedValue[1]);\n}\n\nfunction getBaseFromDoc() {\n /* eslint-disable */\n\n /* istanbul ignore next */\n if (typeof document !== 'undefined' && document.documentElement !== null) {\n var rootFontSize = getComputedStyle(document.documentElement).fontSize;\n return rootFontSize ? convertBase(rootFontSize) : defaultFontSize;\n }\n /* eslint-enable */\n\n /* istanbul ignore next */\n\n\n return defaultFontSize;\n}\n/**\n * Convert rem values to px. By default, the base value is pulled from the font-size property on the root element (if it is set in % or px). It defaults to 16px if not found on the root. You can also override the base value by providing your own base in % or px.\n * @example\n * // Styles as object usage\n * const styles = {\n * 'height': remToPx('1.6rem')\n * 'height': remToPx('1.6rem', '10px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * height: ${remToPx('1.6rem')}\n * height: ${remToPx('1.6rem', '10px')}\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * 'height': '25.6px',\n * 'height': '16px',\n * }\n */\n\n\nfunction remToPx(value, base) {\n var deconstructedValue = getValueAndUnit(value);\n\n if (deconstructedValue[1] !== 'rem' && deconstructedValue[1] !== '') {\n throw new PolishedError(77, deconstructedValue[1]);\n }\n\n var newBase = base ? convertBase(base) : getBaseFromDoc();\n return deconstructedValue[0] * newBase + \"px\";\n}\n\nvar functionsMap$3 = {\n back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeIn('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeIn('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\nfunction easeIn(functionName) {\n return functionsMap$3[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$2 = {\n back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeInOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeInOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n * }\n */\n\nfunction easeInOut(functionName) {\n return functionsMap$2[functionName.toLowerCase().trim()];\n}\n\nvar functionsMap$1 = {\n back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'\n};\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': easeOut('quad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${easeOut('quad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n * }\n */\n\nfunction easeOut(functionName) {\n return functionsMap$1[functionName.toLowerCase().trim()];\n}\n\n/**\n * Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * fontSize: between('20px', '100px', '400px', '1000px'),\n * fontSize: between('20px', '100px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * fontSize: ${between('20px', '100px', '400px', '1000px')};\n * fontSize: ${between('20px', '100px')}\n * `\n *\n * // CSS as JS Output\n *\n * h1: {\n * 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',\n * 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'\n * }\n */\n\nfunction between(fromSize, toSize, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n var _getValueAndUnit = getValueAndUnit(fromSize),\n unitlessFromSize = _getValueAndUnit[0],\n fromSizeUnit = _getValueAndUnit[1];\n\n var _getValueAndUnit2 = getValueAndUnit(toSize),\n unitlessToSize = _getValueAndUnit2[0],\n toSizeUnit = _getValueAndUnit2[1];\n\n var _getValueAndUnit3 = getValueAndUnit(minScreen),\n unitlessMinScreen = _getValueAndUnit3[0],\n minScreenUnit = _getValueAndUnit3[1];\n\n var _getValueAndUnit4 = getValueAndUnit(maxScreen),\n unitlessMaxScreen = _getValueAndUnit4[0],\n maxScreenUnit = _getValueAndUnit4[1];\n\n if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {\n throw new PolishedError(47);\n }\n\n if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {\n throw new PolishedError(48);\n }\n\n if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {\n throw new PolishedError(76);\n }\n\n var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);\n var base = unitlessToSize - slope * unitlessMaxScreen;\n return \"calc(\" + base.toFixed(2) + (fromSizeUnit || '') + \" + \" + (100 * slope).toFixed(2) + \"vw)\";\n}\n\n/**\n * CSS to contain a float (credit to CSSMojo).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...clearFix(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${clearFix()}\n * `\n *\n * // CSS as JS Output\n *\n * '&::after': {\n * 'clear': 'both',\n * 'content': '\"\"',\n * 'display': 'table'\n * }\n */\nfunction clearFix(parent) {\n var _ref;\n\n if (parent === void 0) {\n parent = '&';\n }\n\n var pseudoSelector = parent + \"::after\";\n return _ref = {}, _ref[pseudoSelector] = {\n clear: 'both',\n content: '\"\"',\n display: 'table'\n }, _ref;\n}\n\n/**\n * CSS to fully cover an area. Can optionally be passed an offset to act as a \"padding\".\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...cover()\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${cover()}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'position': 'absolute',\n * 'top': '0',\n * 'right: '0',\n * 'bottom': '0',\n * 'left: '0'\n * }\n */\nfunction cover(offset) {\n if (offset === void 0) {\n offset = 0;\n }\n\n return {\n position: 'absolute',\n top: offset,\n right: offset,\n bottom: offset,\n left: offset\n };\n}\n\n/**\n * CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...ellipsis('250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${ellipsis('250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * 'display': 'inline-block',\n * 'maxWidth': '250px',\n * 'overflow': 'hidden',\n * 'textOverflow': 'ellipsis',\n * 'whiteSpace': 'nowrap',\n * 'wordWrap': 'normal'\n * }\n */\nfunction ellipsis(width, lines) {\n if (lines === void 0) {\n lines = 1;\n }\n\n var styles = {\n display: 'inline-block',\n maxWidth: width || '100%',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n wordWrap: 'normal'\n };\n return lines > 1 ? _extends({}, styles, {\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: lines,\n display: '-webkit-box',\n whiteSpace: 'normal'\n }) : styles;\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\n * Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${fluidRange(\n * {\n * prop: 'padding',\n * fromSize: '20px',\n * toSize: '100px',\n * },\n * '400px',\n * '1000px',\n * )}\n * `\n *\n * // CSS as JS Output\n *\n * div: {\n * \"@media (min-width: 1000px)\": Object {\n * \"padding\": \"100px\",\n * },\n * \"@media (min-width: 400px)\": Object {\n * \"padding\": \"calc(-33.33333333333334px + 13.333333333333334vw)\",\n * },\n * \"padding\": \"20px\",\n * }\n */\nfunction fluidRange(cssProp, minScreen, maxScreen) {\n if (minScreen === void 0) {\n minScreen = '320px';\n }\n\n if (maxScreen === void 0) {\n maxScreen = '1200px';\n }\n\n if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {\n throw new PolishedError(49);\n }\n\n if (Array.isArray(cssProp)) {\n var mediaQueries = {};\n var fallbacks = {};\n\n for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {\n var _extends2, _extends3;\n\n var obj = _step.value;\n\n if (!obj.prop || !obj.fromSize || !obj.toSize) {\n throw new PolishedError(50);\n }\n\n fallbacks[obj.prop] = obj.fromSize;\n mediaQueries[\"@media (min-width: \" + minScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + minScreen + \")\"], (_extends2 = {}, _extends2[obj.prop] = between(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));\n mediaQueries[\"@media (min-width: \" + maxScreen + \")\"] = _extends({}, mediaQueries[\"@media (min-width: \" + maxScreen + \")\"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));\n }\n\n return _extends({}, fallbacks, mediaQueries);\n } else {\n var _ref, _ref2, _ref3;\n\n if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {\n throw new PolishedError(51);\n }\n\n return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3[\"@media (min-width: \" + minScreen + \")\"] = (_ref = {}, _ref[cssProp.prop] = between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3[\"@media (min-width: \" + maxScreen + \")\"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;\n }\n}\n\nvar dataURIRegex = /^\\s*data:([a-z]+\\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\\-._~:@/?%\\s]*\\s*$/i;\nvar formatHintMap = {\n woff: 'woff',\n woff2: 'woff2',\n ttf: 'truetype',\n otf: 'opentype',\n eot: 'embedded-opentype',\n svg: 'svg',\n svgz: 'svg'\n};\n\nfunction generateFormatHint(format, formatHint) {\n if (!formatHint) return '';\n return \" format(\\\"\" + formatHintMap[format] + \"\\\")\";\n}\n\nfunction isDataURI(fontFilePath) {\n return !!fontFilePath.replace(/\\s+/g, ' ').match(dataURIRegex);\n}\n\nfunction generateFileReferences(fontFilePath, fileFormats, formatHint) {\n if (isDataURI(fontFilePath)) {\n return \"url(\\\"\" + fontFilePath + \"\\\")\" + generateFormatHint(fileFormats[0], formatHint);\n }\n\n var fileFontReferences = fileFormats.map(function (format) {\n return \"url(\\\"\" + fontFilePath + \".\" + format + \"\\\")\" + generateFormatHint(format, formatHint);\n });\n return fileFontReferences.join(', ');\n}\n\nfunction generateLocalReferences(localFonts) {\n var localFontReferences = localFonts.map(function (font) {\n return \"local(\\\"\" + font + \"\\\")\";\n });\n return localFontReferences.join(', ');\n}\n\nfunction generateSources(fontFilePath, localFonts, fileFormats, formatHint) {\n var fontReferences = [];\n if (localFonts) fontReferences.push(generateLocalReferences(localFonts));\n\n if (fontFilePath) {\n fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));\n }\n\n return fontReferences.join(', ');\n}\n/**\n * CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.\n *\n * @example\n * // Styles as object basic usage\n * const styles = {\n * ...fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * })\n * }\n *\n * // styled-components basic usage\n * const GlobalStyle = createGlobalStyle`${\n * fontFace({\n * 'fontFamily': 'Sans-Pro',\n * 'fontFilePath': 'path/to/file'\n * }\n * )}`\n *\n * // CSS as JS Output\n *\n * '@font-face': {\n * 'fontFamily': 'Sans-Pro',\n * 'src': 'url(\"path/to/file.eot\"), url(\"path/to/file.woff2\"), url(\"path/to/file.woff\"), url(\"path/to/file.ttf\"), url(\"path/to/file.svg\")',\n * }\n */\n\n\nfunction fontFace(_ref) {\n var fontFamily = _ref.fontFamily,\n fontFilePath = _ref.fontFilePath,\n fontStretch = _ref.fontStretch,\n fontStyle = _ref.fontStyle,\n fontVariant = _ref.fontVariant,\n fontWeight = _ref.fontWeight,\n _ref$fileFormats = _ref.fileFormats,\n fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,\n _ref$formatHint = _ref.formatHint,\n formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,\n _ref$localFonts = _ref.localFonts,\n localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,\n unicodeRange = _ref.unicodeRange,\n fontDisplay = _ref.fontDisplay,\n fontVariationSettings = _ref.fontVariationSettings,\n fontFeatureSettings = _ref.fontFeatureSettings;\n // Error Handling\n if (!fontFamily) throw new PolishedError(55);\n\n if (!fontFilePath && !localFonts) {\n throw new PolishedError(52);\n }\n\n if (localFonts && !Array.isArray(localFonts)) {\n throw new PolishedError(53);\n }\n\n if (!Array.isArray(fileFormats)) {\n throw new PolishedError(54);\n }\n\n var fontFaceDeclaration = {\n '@font-face': {\n fontFamily: fontFamily,\n src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),\n unicodeRange: unicodeRange,\n fontStretch: fontStretch,\n fontStyle: fontStyle,\n fontVariant: fontVariant,\n fontWeight: fontWeight,\n fontDisplay: fontDisplay,\n fontVariationSettings: fontVariationSettings,\n fontFeatureSettings: fontFeatureSettings\n }\n }; // Removes undefined fields for cleaner css object.\n\n return JSON.parse(JSON.stringify(fontFaceDeclaration));\n}\n\n/**\n * CSS to hide text to show a background image in a SEO-friendly way.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'backgroundImage': 'url(logo.png)',\n * ...hideText(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * backgroundImage: url(logo.png);\n * ${hideText()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'backgroundImage': 'url(logo.png)',\n * 'textIndent': '101%',\n * 'overflow': 'hidden',\n * 'whiteSpace': 'nowrap',\n * }\n */\nfunction hideText() {\n return {\n textIndent: '101%',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n };\n}\n\n/**\n * CSS to hide content visually but remain accessible to screen readers.\n * from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...hideVisually(),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hideVisually()};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'border': '0',\n * 'clip': 'rect(0 0 0 0)',\n * 'height': '1px',\n * 'margin': '-1px',\n * 'overflow': 'hidden',\n * 'padding': '0',\n * 'position': 'absolute',\n * 'whiteSpace': 'nowrap',\n * 'width': '1px',\n * }\n */\nfunction hideVisually() {\n return {\n border: '0',\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0',\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n };\n}\n\n/**\n * Generates a media query to target HiDPI devices.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * [hiDPI(1.5)]: {\n * width: 200px;\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${hiDPI(1.5)} {\n * width: 200px;\n * }\n * `\n *\n * // CSS as JS Output\n *\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),\n * only screen and (min--moz-device-pixel-ratio: 1.5),\n * only screen and (-o-min-device-pixel-ratio: 1.5/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * 'width': '200px',\n * }\n */\nfunction hiDPI(ratio) {\n if (ratio === void 0) {\n ratio = 1.3;\n }\n\n return \"\\n @media only screen and (-webkit-min-device-pixel-ratio: \" + ratio + \"),\\n only screen and (min--moz-device-pixel-ratio: \" + ratio + \"),\\n only screen and (-o-min-device-pixel-ratio: \" + ratio + \"/1),\\n only screen and (min-resolution: \" + Math.round(ratio * 96) + \"dpi),\\n only screen and (min-resolution: \" + ratio + \"dppx)\\n \";\n}\n\nfunction constructGradientValue(literals) {\n var template = '';\n\n for (var _len = arguments.length, substitutions = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n substitutions[_key - 1] = arguments[_key];\n }\n\n for (var i = 0; i < literals.length; i += 1) {\n template += literals[i];\n\n if (i === substitutions.length - 1 && substitutions[i]) {\n var definedValues = substitutions.filter(function (substitute) {\n return !!substitute;\n }); // Adds leading coma if properties preceed color-stops\n\n if (definedValues.length > 1) {\n template = template.slice(0, -1);\n template += \", \" + substitutions[i]; // No trailing space if color-stops is the only param provided\n } else if (definedValues.length === 1) {\n template += \"\" + substitutions[i];\n }\n } else if (substitutions[i]) {\n template += substitutions[i] + \" \";\n }\n }\n\n return template.trim();\n}\n\nvar _templateObject$1;\n\n/**\n * CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${linearGradient({\n colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n toDirection: 'to top right',\n fallback: '#FFF',\n })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#FFF',\n * 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction linearGradient(_ref) {\n var colorStops = _ref.colorStops,\n fallback = _ref.fallback,\n _ref$toDirection = _ref.toDirection,\n toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(56);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].replace(/,\\s+/g, ',').split(' ')[0].replace(/,(?=\\S)/g, ', '),\n backgroundImage: constructGradientValue(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose([\"linear-gradient(\", \"\", \")\"])), toDirection, colorStops.join(', ').replace(/,(?=\\S)/g, ', '))\n };\n}\n\n/**\n * CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...normalize(),\n * }\n *\n * // styled-components usage\n * const GlobalStyle = createGlobalStyle`${normalize()}`\n *\n * // CSS as JS Output\n *\n * html {\n * lineHeight: 1.15,\n * textSizeAdjust: 100%,\n * } ...\n */\nfunction normalize() {\n var _ref;\n\n return [(_ref = {\n html: {\n lineHeight: '1.15',\n textSizeAdjust: '100%'\n },\n body: {\n margin: '0'\n },\n main: {\n display: 'block'\n },\n h1: {\n fontSize: '2em',\n margin: '0.67em 0'\n },\n hr: {\n boxSizing: 'content-box',\n height: '0',\n overflow: 'visible'\n },\n pre: {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n },\n a: {\n backgroundColor: 'transparent'\n },\n 'abbr[title]': {\n borderBottom: 'none',\n textDecoration: 'underline'\n }\n }, _ref[\"b,\\n strong\"] = {\n fontWeight: 'bolder'\n }, _ref[\"code,\\n kbd,\\n samp\"] = {\n fontFamily: 'monospace, monospace',\n fontSize: '1em'\n }, _ref.small = {\n fontSize: '80%'\n }, _ref[\"sub,\\n sup\"] = {\n fontSize: '75%',\n lineHeight: '0',\n position: 'relative',\n verticalAlign: 'baseline'\n }, _ref.sub = {\n bottom: '-0.25em'\n }, _ref.sup = {\n top: '-0.5em'\n }, _ref.img = {\n borderStyle: 'none'\n }, _ref[\"button,\\n input,\\n optgroup,\\n select,\\n textarea\"] = {\n fontFamily: 'inherit',\n fontSize: '100%',\n lineHeight: '1.15',\n margin: '0'\n }, _ref[\"button,\\n input\"] = {\n overflow: 'visible'\n }, _ref[\"button,\\n select\"] = {\n textTransform: 'none'\n }, _ref[\"button,\\n html [type=\\\"button\\\"],\\n [type=\\\"reset\\\"],\\n [type=\\\"submit\\\"]\"] = {\n WebkitAppearance: 'button'\n }, _ref[\"button::-moz-focus-inner,\\n [type=\\\"button\\\"]::-moz-focus-inner,\\n [type=\\\"reset\\\"]::-moz-focus-inner,\\n [type=\\\"submit\\\"]::-moz-focus-inner\"] = {\n borderStyle: 'none',\n padding: '0'\n }, _ref[\"button:-moz-focusring,\\n [type=\\\"button\\\"]:-moz-focusring,\\n [type=\\\"reset\\\"]:-moz-focusring,\\n [type=\\\"submit\\\"]:-moz-focusring\"] = {\n outline: '1px dotted ButtonText'\n }, _ref.fieldset = {\n padding: '0.35em 0.625em 0.75em'\n }, _ref.legend = {\n boxSizing: 'border-box',\n color: 'inherit',\n display: 'table',\n maxWidth: '100%',\n padding: '0',\n whiteSpace: 'normal'\n }, _ref.progress = {\n verticalAlign: 'baseline'\n }, _ref.textarea = {\n overflow: 'auto'\n }, _ref[\"[type=\\\"checkbox\\\"],\\n [type=\\\"radio\\\"]\"] = {\n boxSizing: 'border-box',\n padding: '0'\n }, _ref[\"[type=\\\"number\\\"]::-webkit-inner-spin-button,\\n [type=\\\"number\\\"]::-webkit-outer-spin-button\"] = {\n height: 'auto'\n }, _ref['[type=\"search\"]'] = {\n WebkitAppearance: 'textfield',\n outlineOffset: '-2px'\n }, _ref['[type=\"search\"]::-webkit-search-decoration'] = {\n WebkitAppearance: 'none'\n }, _ref['::-webkit-file-upload-button'] = {\n WebkitAppearance: 'button',\n font: 'inherit'\n }, _ref.details = {\n display: 'block'\n }, _ref.summary = {\n display: 'list-item'\n }, _ref.template = {\n display: 'none'\n }, _ref['[hidden]'] = {\n display: 'none'\n }, _ref), {\n 'abbr[title]': {\n textDecoration: 'underline dotted'\n }\n }];\n}\n\nvar _templateObject;\n\n/**\n * CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${radialGradient({\n * colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],\n * extent: 'farthest-corner at 45px 45px',\n * position: 'center',\n * shape: 'ellipse',\n * })}\n *`\n *\n * // CSS as JS Output\n *\n * div: {\n * 'backgroundColor': '#00FFFF',\n * 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',\n * }\n */\nfunction radialGradient(_ref) {\n var colorStops = _ref.colorStops,\n _ref$extent = _ref.extent,\n extent = _ref$extent === void 0 ? '' : _ref$extent,\n fallback = _ref.fallback,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? '' : _ref$position,\n _ref$shape = _ref.shape,\n shape = _ref$shape === void 0 ? '' : _ref$shape;\n\n if (!colorStops || colorStops.length < 2) {\n throw new PolishedError(57);\n }\n\n return {\n backgroundColor: fallback || colorStops[0].split(' ')[0],\n backgroundImage: constructGradientValue(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([\"radial-gradient(\", \"\", \"\", \"\", \")\"])), position, shape, extent, colorStops.join(', '))\n };\n}\n\n/**\n * A helper to generate a retina background image and non-retina\n * background image. The retina background image will output to a HiDPI media query. The mixin uses\n * a _2x.png filename suffix by default.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...retinaImage('my-img')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${retinaImage('my-img')}\n * `\n *\n * // CSS as JS Output\n * div {\n * backgroundImage: 'url(my-img.png)',\n * '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),\n * only screen and (min--moz-device-pixel-ratio: 1.3),\n * only screen and (-o-min-device-pixel-ratio: 1.3/1),\n * only screen and (min-resolution: 144dpi),\n * only screen and (min-resolution: 1.5dppx)': {\n * backgroundImage: 'url(my-img_2x.png)',\n * }\n * }\n */\nfunction retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {\n var _ref;\n\n if (extension === void 0) {\n extension = 'png';\n }\n\n if (retinaSuffix === void 0) {\n retinaSuffix = '_2x';\n }\n\n if (!filename) {\n throw new PolishedError(58);\n } // Replace the dot at the beginning of the passed extension if one exists\n\n\n var ext = extension.replace(/^\\./, '');\n var rFilename = retinaFilename ? retinaFilename + \".\" + ext : \"\" + filename + retinaSuffix + \".\" + ext;\n return _ref = {\n backgroundImage: \"url(\" + filename + \".\" + ext + \")\"\n }, _ref[hiDPI()] = _extends({\n backgroundImage: \"url(\" + rFilename + \")\"\n }, backgroundSize ? {\n backgroundSize: backgroundSize\n } : {}), _ref;\n}\n\n/* eslint-disable key-spacing */\nvar functionsMap = {\n easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'\n};\n/* eslint-enable key-spacing */\n\nfunction getTimingFunction(functionName) {\n return functionsMap[functionName];\n}\n/**\n * String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).\n *\n * @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * 'transitionTimingFunction': timingFunctions('easeInQuad')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * transitionTimingFunction: ${timingFunctions('easeInQuad')};\n * `\n *\n * // CSS as JS Output\n *\n * 'div': {\n * 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n * }\n */\n\n\nfunction timingFunctions(timingFunction) {\n return getTimingFunction(timingFunction);\n}\n\nvar getBorderWidth = function getBorderWidth(pointingDirection, height, width) {\n var fullWidth = \"\" + width[0] + (width[1] || '');\n var halfWidth = \"\" + width[0] / 2 + (width[1] || '');\n var fullHeight = \"\" + height[0] + (height[1] || '');\n var halfHeight = \"\" + height[0] / 2 + (height[1] || '');\n\n switch (pointingDirection) {\n case 'top':\n return \"0 \" + halfWidth + \" \" + fullHeight + \" \" + halfWidth;\n\n case 'topLeft':\n return fullWidth + \" \" + fullHeight + \" 0 0\";\n\n case 'left':\n return halfHeight + \" \" + fullWidth + \" \" + halfHeight + \" 0\";\n\n case 'bottomLeft':\n return fullWidth + \" 0 0 \" + fullHeight;\n\n case 'bottom':\n return fullHeight + \" \" + halfWidth + \" 0 \" + halfWidth;\n\n case 'bottomRight':\n return \"0 0 \" + fullWidth + \" \" + fullHeight;\n\n case 'right':\n return halfHeight + \" 0 \" + halfHeight + \" \" + fullWidth;\n\n case 'topRight':\n default:\n return \"0 \" + fullWidth + \" \" + fullHeight + \" 0\";\n }\n};\n\nvar getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {\n switch (pointingDirection) {\n case 'top':\n case 'bottomRight':\n return {\n borderBottomColor: foregroundColor\n };\n\n case 'right':\n case 'bottomLeft':\n return {\n borderLeftColor: foregroundColor\n };\n\n case 'bottom':\n case 'topLeft':\n return {\n borderTopColor: foregroundColor\n };\n\n case 'left':\n case 'topRight':\n return {\n borderRightColor: foregroundColor\n };\n\n default:\n throw new PolishedError(59);\n }\n};\n/**\n * CSS to represent triangle with any pointing direction with an optional background color.\n *\n * @example\n * // Styles as object usage\n *\n * const styles = {\n * ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })\n * }\n *\n *\n * // styled-components usage\n * const div = styled.div`\n * ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}\n *\n *\n * // CSS as JS Output\n *\n * div: {\n * 'borderColor': 'transparent transparent transparent red',\n * 'borderStyle': 'solid',\n * 'borderWidth': '50px 0 50px 100px',\n * 'height': '0',\n * 'width': '0',\n * }\n */\n\n\nfunction triangle(_ref) {\n var pointingDirection = _ref.pointingDirection,\n height = _ref.height,\n width = _ref.width,\n foregroundColor = _ref.foregroundColor,\n _ref$backgroundColor = _ref.backgroundColor,\n backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;\n var widthAndUnit = getValueAndUnit(width);\n var heightAndUnit = getValueAndUnit(height);\n\n if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {\n throw new PolishedError(60);\n }\n\n return _extends({\n width: '0',\n height: '0',\n borderColor: backgroundColor\n }, getBorderColor(pointingDirection, foregroundColor), {\n borderStyle: 'solid',\n borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)\n });\n}\n\n/**\n * Provides an easy way to change the `wordWrap` property.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...wordWrap('break-word')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${wordWrap('break-word')}\n * `\n *\n * // CSS as JS Output\n *\n * const styles = {\n * overflowWrap: 'break-word',\n * wordWrap: 'break-word',\n * wordBreak: 'break-all',\n * }\n */\nfunction wordWrap(wrap) {\n if (wrap === void 0) {\n wrap = 'break-word';\n }\n\n var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;\n return {\n overflowWrap: wrap,\n wordWrap: wrap,\n wordBreak: wordBreak\n };\n}\n\nfunction colorToInt(color) {\n return Math.round(color * 255);\n}\n\nfunction convertToInt(red, green, blue) {\n return colorToInt(red) + \",\" + colorToInt(green) + \",\" + colorToInt(blue);\n}\n\nfunction hslToRgb(hue, saturation, lightness, convert) {\n if (convert === void 0) {\n convert = convertToInt;\n }\n\n if (saturation === 0) {\n // achromatic\n return convert(lightness, lightness, lightness);\n } // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n\n\n var huePrime = (hue % 360 + 360) % 360 / 60;\n var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;\n var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n var red = 0;\n var green = 0;\n var blue = 0;\n\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n\n var lightnessModification = lightness - chroma / 2;\n var finalRed = red + lightnessModification;\n var finalGreen = green + lightnessModification;\n var finalBlue = blue + lightnessModification;\n return convert(finalRed, finalGreen, finalBlue);\n}\n\nvar namedColorMap = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '639',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32'\n};\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n * @private\n */\n\nfunction nameToHex(color) {\n if (typeof color !== 'string') return color;\n var normalizedColorName = color.toLowerCase();\n return namedColorMap[normalizedColorName] ? \"#\" + namedColorMap[normalizedColorName] : color;\n}\n\nvar hexRegex = /^#[a-fA-F0-9]{6}$/;\nvar hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;\nvar reducedHexRegex = /^#[a-fA-F0-9]{3}$/;\nvar reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;\nvar rgbRegex = /^rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*\\)$/i;\nvar rgbaRegex = /^rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\nvar hslRegex = /^hsl\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*\\)$/i;\nvar hslaRegex = /^hsla\\(\\s*(\\d{0,3}[.]?[0-9]+)\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*(\\d{1,3}[.]?[0-9]?)%\\s*,\\s*([-+]?[0-9]*[.]?[0-9]+)\\s*\\)$/i;\n/**\n * Returns an RgbColor or RgbaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a RgbColor or RgbaColor object back to a string.\n *\n * @example\n * // Assigns `{ red: 255, green: 0, blue: 0 }` to color1\n * const color1 = parseToRgb('rgb(255, 0, 0)');\n * // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2\n * const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');\n */\n\nfunction parseToRgb(color) {\n if (typeof color !== 'string') {\n throw new PolishedError(3);\n }\n\n var normalizedColor = nameToHex(color);\n\n if (normalizedColor.match(hexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16)\n };\n }\n\n if (normalizedColor.match(hexRgbaRegex)) {\n var alpha = parseFloat((parseInt(\"\" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[2], 16),\n green: parseInt(\"\" + normalizedColor[3] + normalizedColor[4], 16),\n blue: parseInt(\"\" + normalizedColor[5] + normalizedColor[6], 16),\n alpha: alpha\n };\n }\n\n if (normalizedColor.match(reducedHexRegex)) {\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16)\n };\n }\n\n if (normalizedColor.match(reducedRgbaHexRegex)) {\n var _alpha = parseFloat((parseInt(\"\" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));\n\n return {\n red: parseInt(\"\" + normalizedColor[1] + normalizedColor[1], 16),\n green: parseInt(\"\" + normalizedColor[2] + normalizedColor[2], 16),\n blue: parseInt(\"\" + normalizedColor[3] + normalizedColor[3], 16),\n alpha: _alpha\n };\n }\n\n var rgbMatched = rgbRegex.exec(normalizedColor);\n\n if (rgbMatched) {\n return {\n red: parseInt(\"\" + rgbMatched[1], 10),\n green: parseInt(\"\" + rgbMatched[2], 10),\n blue: parseInt(\"\" + rgbMatched[3], 10)\n };\n }\n\n var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));\n\n if (rgbaMatched) {\n return {\n red: parseInt(\"\" + rgbaMatched[1], 10),\n green: parseInt(\"\" + rgbaMatched[2], 10),\n blue: parseInt(\"\" + rgbaMatched[3], 10),\n alpha: parseFloat(\"\" + rgbaMatched[4])\n };\n }\n\n var hslMatched = hslRegex.exec(normalizedColor);\n\n if (hslMatched) {\n var hue = parseInt(\"\" + hslMatched[1], 10);\n var saturation = parseInt(\"\" + hslMatched[2], 10) / 100;\n var lightness = parseInt(\"\" + hslMatched[3], 10) / 100;\n var rgbColorString = \"rgb(\" + hslToRgb(hue, saturation, lightness) + \")\";\n var hslRgbMatched = rgbRegex.exec(rgbColorString);\n\n if (!hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + hslRgbMatched[1], 10),\n green: parseInt(\"\" + hslRgbMatched[2], 10),\n blue: parseInt(\"\" + hslRgbMatched[3], 10)\n };\n }\n\n var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));\n\n if (hslaMatched) {\n var _hue = parseInt(\"\" + hslaMatched[1], 10);\n\n var _saturation = parseInt(\"\" + hslaMatched[2], 10) / 100;\n\n var _lightness = parseInt(\"\" + hslaMatched[3], 10) / 100;\n\n var _rgbColorString = \"rgb(\" + hslToRgb(_hue, _saturation, _lightness) + \")\";\n\n var _hslRgbMatched = rgbRegex.exec(_rgbColorString);\n\n if (!_hslRgbMatched) {\n throw new PolishedError(4, normalizedColor, _rgbColorString);\n }\n\n return {\n red: parseInt(\"\" + _hslRgbMatched[1], 10),\n green: parseInt(\"\" + _hslRgbMatched[2], 10),\n blue: parseInt(\"\" + _hslRgbMatched[3], 10),\n alpha: parseFloat(\"\" + hslaMatched[4])\n };\n }\n\n throw new PolishedError(5);\n}\n\nfunction rgbToHsl(color) {\n // make sure rgb are contained in a set of [0, 255]\n var red = color.red / 255;\n var green = color.green / 255;\n var blue = color.blue / 255;\n var max = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var lightness = (max + min) / 2;\n\n if (max === min) {\n // achromatic\n if (color.alpha !== undefined) {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness,\n alpha: color.alpha\n };\n } else {\n return {\n hue: 0,\n saturation: 0,\n lightness: lightness\n };\n }\n }\n\n var hue;\n var delta = max - min;\n var saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n\n switch (max) {\n case red:\n hue = (green - blue) / delta + (green < blue ? 6 : 0);\n break;\n\n case green:\n hue = (blue - red) / delta + 2;\n break;\n\n default:\n // blue case\n hue = (red - green) / delta + 4;\n break;\n }\n\n hue *= 60;\n\n if (color.alpha !== undefined) {\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness,\n alpha: color.alpha\n };\n }\n\n return {\n hue: hue,\n saturation: saturation,\n lightness: lightness\n };\n}\n\n/**\n * Returns an HslColor or HslaColor object. This utility function is only useful\n * if want to extract a color component. With the color util `toColorString` you\n * can convert a HslColor or HslaColor object back to a string.\n *\n * @example\n * // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1\n * const color1 = parseToHsl('rgb(255, 0, 0)');\n * // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2\n * const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');\n */\nfunction parseToHsl(color) {\n // Note: At a later stage we can optimize this function as right now a hsl\n // color would be parsed converted to rgb values and converted back to hsl.\n return rgbToHsl(parseToRgb(color));\n}\n\n/**\n * Reduces hex values if possible e.g. #ff8866 to #f86\n * @private\n */\nvar reduceHexValue = function reduceHexValue(value) {\n if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {\n return \"#\" + value[1] + value[3] + value[5];\n }\n\n return value;\n};\n\nfunction numberToHex(value) {\n var hex = value.toString(16);\n return hex.length === 1 ? \"0\" + hex : hex;\n}\n\nfunction colorToHex(color) {\n return numberToHex(Math.round(color * 255));\n}\n\nfunction convertToHex(red, green, blue) {\n return reduceHexValue(\"#\" + colorToHex(red) + colorToHex(green) + colorToHex(blue));\n}\n\nfunction hslToHex(hue, saturation, lightness) {\n return hslToRgb(hue, saturation, lightness, convertToHex);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsl(359, 0.75, 0.4),\n * background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsl(359, 0.75, 0.4)};\n * background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#b3191c\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsl(value, saturation, lightness) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {\n return hslToHex(value, saturation, lightness);\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {\n return hslToHex(value.hue, value.saturation, value.lightness);\n }\n\n throw new PolishedError(1);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hsla(359, 0.75, 0.4, 0.7),\n * background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),\n * background: hsla(359, 0.75, 0.4, 1),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hsla(359, 0.75, 0.4, 0.7)};\n * background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};\n * background: ${hsla(359, 0.75, 0.4, 1)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"rgba(179,25,28,0.7)\";\n * background: \"#b3191c\";\n * }\n */\nfunction hsla(value, saturation, lightness, alpha) {\n if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {\n return alpha >= 1 ? hslToHex(value, saturation, lightness) : \"rgba(\" + hslToRgb(value, saturation, lightness) + \",\" + alpha + \")\";\n } else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {\n return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : \"rgba(\" + hslToRgb(value.hue, value.saturation, value.lightness) + \",\" + value.alpha + \")\";\n }\n\n throw new PolishedError(2);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible hex notation.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgb(255, 205, 100),\n * background: rgb({ red: 255, green: 205, blue: 100 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgb(255, 205, 100)};\n * background: ${rgb({ red: 255, green: 205, blue: 100 })};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffcd64\";\n * background: \"#ffcd64\";\n * }\n */\nfunction rgb(value, green, blue) {\n if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {\n return reduceHexValue(\"#\" + numberToHex(value) + numberToHex(green) + numberToHex(blue));\n } else if (typeof value === 'object' && green === undefined && blue === undefined) {\n return reduceHexValue(\"#\" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));\n }\n\n throw new PolishedError(6);\n}\n\n/**\n * Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.\n *\n * Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgba(255, 205, 100, 0.7),\n * background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),\n * background: rgba(255, 205, 100, 1),\n * background: rgba('#ffffff', 0.4),\n * background: rgba('black', 0.7),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgba(255, 205, 100, 0.7)};\n * background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};\n * background: ${rgba(255, 205, 100, 1)};\n * background: ${rgba('#ffffff', 0.4)};\n * background: ${rgba('black', 0.7)};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"rgba(255,205,100,0.7)\";\n * background: \"#ffcd64\";\n * background: \"rgba(255,255,255,0.4)\";\n * background: \"rgba(0,0,0,0.7)\";\n * }\n */\nfunction rgba(firstValue, secondValue, thirdValue, fourthValue) {\n if (typeof firstValue === 'string' && typeof secondValue === 'number') {\n var rgbValue = parseToRgb(firstValue);\n return \"rgba(\" + rgbValue.red + \",\" + rgbValue.green + \",\" + rgbValue.blue + \",\" + secondValue + \")\";\n } else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {\n return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : \"rgba(\" + firstValue + \",\" + secondValue + \",\" + thirdValue + \",\" + fourthValue + \")\";\n } else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {\n return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : \"rgba(\" + firstValue.red + \",\" + firstValue.green + \",\" + firstValue.blue + \",\" + firstValue.alpha + \")\";\n }\n\n throw new PolishedError(7);\n}\n\nvar isRgb = function isRgb(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isRgba = function isRgba(color) {\n return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';\n};\n\nvar isHsl = function isHsl(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');\n};\n\nvar isHsla = function isHsla(color) {\n return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';\n};\n/**\n * Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: toColorString({ red: 255, green: 205, blue: 100 }),\n * background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${toColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\n\n\nfunction toColorString(color) {\n if (typeof color !== 'object') throw new PolishedError(8);\n if (isRgba(color)) return rgba(color);\n if (isRgb(color)) return rgb(color);\n if (isHsla(color)) return hsla(color);\n if (isHsl(color)) return hsl(color);\n throw new PolishedError(8);\n}\n\n// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-unused-vars\n// eslint-disable-next-line no-redeclare\nfunction curried(f, length, acc) {\n return function fn() {\n // eslint-disable-next-line prefer-rest-params\n var combined = acc.concat(Array.prototype.slice.call(arguments));\n return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);\n };\n} // eslint-disable-next-line no-redeclare\n\n\nfunction curry(f) {\n // eslint-disable-line no-redeclare\n return curried(f, f.length, []);\n}\n\n/**\n * Changes the hue of the color. Hue is a number between 0 to 360. The first\n * argument for adjustHue is the amount of degrees the color is rotated around\n * the color wheel, always producing a positive hue value.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: adjustHue(180, '#448'),\n * background: adjustHue('180', 'rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${adjustHue(180, '#448')};\n * background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#888844\";\n * background: \"rgba(136,136,68,0.7)\";\n * }\n */\n\nfunction adjustHue(degree, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: hslColor.hue + parseFloat(degree)\n }));\n} // prettier-ignore\n\n\nvar curriedAdjustHue = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(adjustHue);\n\n/**\n * Returns the complement of the provided color. This is identical to adjustHue(180, <color>).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: complement('#448'),\n * background: complement('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${complement('#448')};\n * background: ${complement('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#884\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction complement(color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n hue: (hslColor.hue + 180) % 360\n }));\n}\n\nfunction guard(lowerBoundary, upperBoundary, value) {\n return Math.max(lowerBoundary, Math.min(upperBoundary, value));\n}\n\n/**\n * Returns a string value for the darkened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: darken(0.2, '#FFCD64'),\n * background: darken('0.2', 'rgba(255,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${darken(0.2, '#FFCD64')};\n * background: ${darken('0.2', 'rgba(255,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#ffbd31\";\n * background: \"rgba(255,189,49,0.7)\";\n * }\n */\n\nfunction darken(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDarken = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(darken);\n\n/**\n * Decreases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the desaturate function is the amount by how much the color\n * intensity should be decreased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: desaturate(0.2, '#CCCD64'),\n * background: desaturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${desaturate(0.2, '#CCCD64')};\n * background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#b8b979\";\n * background: \"rgba(184,185,121,0.7)\";\n * }\n */\n\nfunction desaturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation - parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedDesaturate = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(desaturate);\n\n/**\n * Returns a number (float) representing the luminance of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',\n * background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)',\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};\n * background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?\n * 'rgba(58, 133, 255, 1)' :\n * 'rgba(255, 57, 149, 1)'};\n *\n * // CSS in JS Output\n *\n * div {\n * background: \"#CCCD64\";\n * background: \"rgba(58, 133, 255, 1)\";\n * }\n */\n\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n var rgbColor = parseToRgb(color);\n\n var _Object$keys$map = Object.keys(rgbColor).map(function (key) {\n var channel = rgbColor[key] / 255;\n return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }),\n r = _Object$keys$map[0],\n g = _Object$keys$map[1],\n b = _Object$keys$map[2];\n\n return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));\n}\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n *\n * @example\n * const contrastRatio = getContrast('#444', '#fff');\n */\n\nfunction getContrast(color1, color2) {\n var luminance1 = getLuminance(color1);\n var luminance2 = getLuminance(color2);\n return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));\n}\n\n/**\n * Converts the color to a grayscale, by reducing its saturation to 0.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: grayscale('#CCCD64'),\n * background: grayscale('rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${grayscale('#CCCD64')};\n * background: ${grayscale('rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#999\";\n * background: \"rgba(153,153,153,0.7)\";\n * }\n */\n\nfunction grayscale(color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: 0\n }));\n}\n\n/**\n * Converts a HslColor or HslaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `hsl` or `hsla`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),\n * background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};\n * background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#00f\";\n * background: \"rgba(179,25,25,0.72)\";\n * }\n */\nfunction hslToColorString(color) {\n if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {\n if (color.alpha && typeof color.alpha === 'number') {\n return hsla({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness,\n alpha: color.alpha\n });\n }\n\n return hsl({\n hue: color.hue,\n saturation: color.saturation,\n lightness: color.lightness\n });\n }\n\n throw new PolishedError(45);\n}\n\n/**\n * Inverts the red, green and blue values of a color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: invert('#CCCD64'),\n * background: invert('rgba(101,100,205,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${invert('#CCCD64')};\n * background: ${invert('rgba(101,100,205,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#33329b\";\n * background: \"rgba(154,155,50,0.7)\";\n * }\n */\n\nfunction invert(color) {\n if (color === 'transparent') return color; // parse color string to rgb\n\n var value = parseToRgb(color);\n return toColorString(_extends({}, value, {\n red: 255 - value.red,\n green: 255 - value.green,\n blue: 255 - value.blue\n }));\n}\n\n/**\n * Returns a string value for the lightened color.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: lighten(0.2, '#CCCD64'),\n * background: lighten('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${lighten(0.2, '#FFCD64')};\n * background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e5e6b1\";\n * background: \"rgba(229,230,177,0.7)\";\n * }\n */\n\nfunction lighten(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n lightness: guard(0, 1, hslColor.lightness + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedLighten = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(lighten);\n\n/**\n * Determines which contrast guidelines have been met for two colors.\n * Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).\n *\n * @example\n * const scores = meetsContrastGuidelines('#444', '#fff');\n */\nfunction meetsContrastGuidelines(color1, color2) {\n var contrastRatio = getContrast(color1, color2);\n return {\n AA: contrastRatio >= 4.5,\n AALarge: contrastRatio >= 3,\n AAA: contrastRatio >= 7,\n AAALarge: contrastRatio >= 4.5\n };\n}\n\n/**\n * Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: mix(0.5, '#f00', '#00f')\n * background: mix(0.25, '#f00', '#00f')\n * background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${mix(0.5, '#f00', '#00f')};\n * background: ${mix(0.25, '#f00', '#00f')};\n * background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#7f007f\";\n * background: \"#3f00bf\";\n * background: \"rgba(63, 0, 191, 0.75)\";\n * }\n */\n\nfunction mix(weight, color, otherColor) {\n if (color === 'transparent') return otherColor;\n if (otherColor === 'transparent') return color;\n if (weight === 0) return otherColor;\n var parsedColor1 = parseToRgb(color);\n\n var color1 = _extends({}, parsedColor1, {\n alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1\n });\n\n var parsedColor2 = parseToRgb(otherColor);\n\n var color2 = _extends({}, parsedColor2, {\n alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1\n }); // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n\n\n var alphaDelta = color1.alpha - color2.alpha;\n var x = parseFloat(weight) * 2 - 1;\n var y = x * alphaDelta === -1 ? x : x + alphaDelta;\n var z = 1 + x * alphaDelta;\n var weight1 = (y / z + 1) / 2.0;\n var weight2 = 1 - weight1;\n var mixedColor = {\n red: Math.floor(color1.red * weight1 + color2.red * weight2),\n green: Math.floor(color1.green * weight1 + color2.green * weight2),\n blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),\n alpha: color1.alpha * (parseFloat(weight) / 1.0) + color2.alpha * (1 - parseFloat(weight) / 1.0)\n };\n return rgba(mixedColor);\n} // prettier-ignore\n\n\nvar curriedMix = /*#__PURE__*/curry\n/* ::<number | string, string, string, string> */\n(mix);\n\n/**\n * Increases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');\n * background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),\n * background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};\n * background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},\n * background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#fff\";\n * background: \"rgba(255,255,255,0.7)\";\n * background: \"rgba(255,0,0,0.7)\";\n * }\n */\n\nfunction opacify(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedOpacify = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(opacify);\n\nvar defaultReturnIfLightColor = '#000';\nvar defaultReturnIfDarkColor = '#fff';\n/**\n * Returns black or white (or optional passed colors) for best\n * contrast depending on the luminosity of the given color.\n * When passing custom return colors, strict mode ensures that the\n * return color always meets or exceeds WCAG level AA or greater. If this test\n * fails, the default return color (black or white) is returned in place of the\n * custom return color. You can optionally turn off strict mode.\n *\n * Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * color: readableColor('#000'),\n * color: readableColor('black', '#001', '#ff8'),\n * color: readableColor('white', '#001', '#ff8'),\n * color: readableColor('red', '#333', '#ddd', true)\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * color: ${readableColor('#000')};\n * color: ${readableColor('black', '#001', '#ff8')};\n * color: ${readableColor('white', '#001', '#ff8')};\n * color: ${readableColor('red', '#333', '#ddd', true)};\n * `\n *\n * // CSS in JS Output\n * element {\n * color: \"#fff\";\n * color: \"#ff8\";\n * color: \"#001\";\n * color: \"#000\";\n * }\n */\n\nfunction readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {\n if (returnIfLightColor === void 0) {\n returnIfLightColor = defaultReturnIfLightColor;\n }\n\n if (returnIfDarkColor === void 0) {\n returnIfDarkColor = defaultReturnIfDarkColor;\n }\n\n if (strict === void 0) {\n strict = true;\n }\n\n var isColorLight = getLuminance(color) > 0.179;\n var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;\n\n if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {\n return preferredReturnColor;\n }\n\n return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;\n}\n\n/**\n * Converts a RgbColor or RgbaColor object to a color string.\n * This util is useful in case you only know on runtime which color object is\n * used. Otherwise we recommend to rely on `rgb` or `rgba`.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: rgbToColorString({ red: 255, green: 205, blue: 100 }),\n * background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};\n * background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#ffcd64\";\n * background: \"rgba(255,205,100,0.72)\";\n * }\n */\nfunction rgbToColorString(color) {\n if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {\n if (typeof color.alpha === 'number') {\n return rgba({\n red: color.red,\n green: color.green,\n blue: color.blue,\n alpha: color.alpha\n });\n }\n\n return rgb({\n red: color.red,\n green: color.green,\n blue: color.blue\n });\n }\n\n throw new PolishedError(46);\n}\n\n/**\n * Increases the intensity of a color. Its range is between 0 to 1. The first\n * argument of the saturate function is the amount by how much the color\n * intensity should be increased.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: saturate(0.2, '#CCCD64'),\n * background: saturate('0.2', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${saturate(0.2, '#FFCD64')};\n * background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#e0e250\";\n * background: \"rgba(224,226,80,0.7)\";\n * }\n */\n\nfunction saturate(amount, color) {\n if (color === 'transparent') return color;\n var hslColor = parseToHsl(color);\n return toColorString(_extends({}, hslColor, {\n saturation: guard(0, 1, hslColor.saturation + parseFloat(amount))\n }));\n} // prettier-ignore\n\n\nvar curriedSaturate = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(saturate);\n\n/**\n * Sets the hue of a color to the provided value. The hue range can be\n * from 0 and 359.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setHue(42, '#CCCD64'),\n * background: setHue('244', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setHue(42, '#CCCD64')};\n * background: ${setHue('244', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#cdae64\";\n * background: \"rgba(107,100,205,0.7)\";\n * }\n */\n\nfunction setHue(hue, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n hue: parseFloat(hue)\n }));\n} // prettier-ignore\n\n\nvar curriedSetHue = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setHue);\n\n/**\n * Sets the lightness of a color to the provided value. The lightness range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setLightness(0.2, '#CCCD64'),\n * background: setLightness('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setLightness(0.2, '#CCCD64')};\n * background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#4d4d19\";\n * background: \"rgba(223,224,159,0.7)\";\n * }\n */\n\nfunction setLightness(lightness, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n lightness: parseFloat(lightness)\n }));\n} // prettier-ignore\n\n\nvar curriedSetLightness = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setLightness);\n\n/**\n * Sets the saturation of a color to the provided value. The saturation range can be\n * from 0 and 1.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: setSaturation(0.2, '#CCCD64'),\n * background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${setSaturation(0.2, '#CCCD64')};\n * background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};\n * `\n *\n * // CSS in JS Output\n * element {\n * background: \"#adad84\";\n * background: \"rgba(228,229,76,0.7)\";\n * }\n */\n\nfunction setSaturation(saturation, color) {\n if (color === 'transparent') return color;\n return toColorString(_extends({}, parseToHsl(color), {\n saturation: parseFloat(saturation)\n }));\n} // prettier-ignore\n\n\nvar curriedSetSaturation = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(setSaturation);\n\n/**\n * Shades a color by mixing it with black. `shade` can produce\n * hue shifts, where as `darken` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: shade(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${shade(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#00003f\";\n * }\n */\n\nfunction shade(percentage, color) {\n if (color === 'transparent') return color;\n return curriedMix(parseFloat(percentage), 'rgb(0, 0, 0)', color);\n} // prettier-ignore\n\n\nvar curriedShade = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(shade);\n\n/**\n * Tints a color by mixing it with white. `tint` can produce\n * hue shifts, where as `lighten` manipulates the luminance channel and therefore\n * doesn't produce hue shifts.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: tint(0.25, '#00f')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${tint(0.25, '#00f')};\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"#bfbfff\";\n * }\n */\n\nfunction tint(percentage, color) {\n if (color === 'transparent') return color;\n return curriedMix(parseFloat(percentage), 'rgb(255, 255, 255)', color);\n} // prettier-ignore\n\n\nvar curriedTint = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(tint);\n\n/**\n * Decreases the opacity of a color. Its range for the amount is between 0 to 1.\n *\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * background: transparentize(0.1, '#fff');\n * background: transparentize(0.2, 'hsl(0, 0%, 100%)'),\n * background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * background: ${transparentize(0.1, '#fff')};\n * background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')},\n * background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')},\n * `\n *\n * // CSS in JS Output\n *\n * element {\n * background: \"rgba(255,255,255,0.9)\";\n * background: \"rgba(255,255,255,0.8)\";\n * background: \"rgba(255,0,0,0.3)\";\n * }\n */\n\nfunction transparentize(amount, color) {\n if (color === 'transparent') return color;\n var parsedColor = parseToRgb(color);\n var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;\n\n var colorWithAlpha = _extends({}, parsedColor, {\n alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)\n });\n\n return rgba(colorWithAlpha);\n} // prettier-ignore\n\n\nvar curriedTransparentize = /*#__PURE__*/curry\n/* ::<number | string, string, string> */\n(transparentize);\n\n/**\n * Shorthand for easily setting the animation property. Allows either multiple arrays with animations\n * or a single animation spread over the arguments.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation(['rotate', '1s', 'ease-in-out'], ['colorchange', '2s'])}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out, colorchange 2s'\n * }\n * @example\n * // Styles as object usage\n * const styles = {\n * ...animation('rotate', '1s', 'ease-in-out')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${animation('rotate', '1s', 'ease-in-out')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'animation': 'rotate 1s ease-in-out'\n * }\n */\nfunction animation() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // Allow single or multiple animations passed\n var multiMode = Array.isArray(args[0]);\n\n if (!multiMode && args.length > 8) {\n throw new PolishedError(64);\n }\n\n var code = args.map(function (arg) {\n if (multiMode && !Array.isArray(arg) || !multiMode && Array.isArray(arg)) {\n throw new PolishedError(65);\n }\n\n if (Array.isArray(arg) && arg.length > 8) {\n throw new PolishedError(66);\n }\n\n return Array.isArray(arg) ? arg.join(' ') : arg;\n }).join(', ');\n return {\n animation: code\n };\n}\n\n/**\n * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgroundImages('url(\"/image/background.jpg\")', 'linear-gradient(red, green)')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'backgroundImage': 'url(\"/image/background.jpg\"), linear-gradient(red, green)'\n * }\n */\nfunction backgroundImages() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n backgroundImage: properties.join(', ')\n };\n}\n\n/**\n * Shorthand that accepts any number of background values as parameters for creating a single background statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${backgrounds('url(\"/image/background.jpg\")', 'linear-gradient(red, green)', 'center no-repeat')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'background': 'url(\"/image/background.jpg\"), linear-gradient(red, green), center no-repeat'\n * }\n */\nfunction backgrounds() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n return {\n background: properties.join(', ')\n };\n}\n\nvar sideMap = ['top', 'right', 'bottom', 'left'];\n/**\n * Shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron. A side keyword can optionally be passed to target only one side's border properties.\n *\n * @example\n * // Styles as object usage\n * const styles = {\n * ...border('1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderColor': 'red',\n * 'borderStyle': 'solid',\n * 'borderWidth': `1px`,\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...border('top', '1px', 'solid', 'red')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${border('top', '1px', 'solid', 'red')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderTopStyle': 'solid',\n * 'borderTopWidth': `1px`,\n * }\n */\n\nfunction border(sideKeyword) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + capitalizeString(sideKeyword) + \"Width\"] = values[0], _ref[\"border\" + capitalizeString(sideKeyword) + \"Style\"] = values[1], _ref[\"border\" + capitalizeString(sideKeyword) + \"Color\"] = values[2], _ref;\n } else {\n values.unshift(sideKeyword);\n return {\n borderWidth: values[0],\n borderStyle: values[1],\n borderColor: values[2]\n };\n }\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderColor('red', 'green', 'blue', 'yellow')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderColor('red', 'green', 'blue', 'yellow')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopColor': 'red',\n * 'borderRightColor': 'green',\n * 'borderBottomColor': 'blue',\n * 'borderLeftColor': 'yellow'\n * }\n */\nfunction borderColor() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderColor'].concat(values));\n}\n\n/**\n * Shorthand that accepts a value for side and a value for radius and applies the radius value to both corners of the side.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderRadius('top', '5px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderRadius('top', '5px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopRightRadius': '5px',\n * 'borderTopLeftRadius': '5px',\n * }\n */\nfunction borderRadius(side, radius) {\n var uppercaseSide = capitalizeString(side);\n\n if (!radius && radius !== 0) {\n throw new PolishedError(62);\n }\n\n if (uppercaseSide === 'Top' || uppercaseSide === 'Bottom') {\n var _ref;\n\n return _ref = {}, _ref[\"border\" + uppercaseSide + \"RightRadius\"] = radius, _ref[\"border\" + uppercaseSide + \"LeftRadius\"] = radius, _ref;\n }\n\n if (uppercaseSide === 'Left' || uppercaseSide === 'Right') {\n var _ref2;\n\n return _ref2 = {}, _ref2[\"borderTop\" + uppercaseSide + \"Radius\"] = radius, _ref2[\"borderBottom\" + uppercaseSide + \"Radius\"] = radius, _ref2;\n }\n\n throw new PolishedError(63);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderStyle('solid', 'dashed', 'dotted', 'double')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderStyle('solid', 'dashed', 'dotted', 'double')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopStyle': 'solid',\n * 'borderRightStyle': 'dashed',\n * 'borderBottomStyle': 'dotted',\n * 'borderLeftStyle': 'double'\n * }\n */\nfunction borderStyle() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderStyle'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...borderWidth('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${borderWidth('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'borderTopWidth': '12px',\n * 'borderRightWidth': '24px',\n * 'borderBottomWidth': '36px',\n * 'borderLeftWidth': '48px'\n * }\n */\nfunction borderWidth() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['borderWidth'].concat(values));\n}\n\nfunction generateSelectors(template, state) {\n var stateSuffix = state ? \":\" + state : '';\n return template(stateSuffix);\n}\n/**\n * Function helper that adds an array of states to a template of selectors. Used in textInputs and buttons.\n * @private\n */\n\n\nfunction statefulSelectors(states, template, stateMap) {\n if (!template) throw new PolishedError(67);\n if (states.length === 0) return generateSelectors(template, null);\n var selectors = [];\n\n for (var i = 0; i < states.length; i += 1) {\n if (stateMap && stateMap.indexOf(states[i]) < 0) {\n throw new PolishedError(68);\n }\n\n selectors.push(generateSelectors(template, states[i]));\n }\n\n selectors = selectors.join(',');\n return selectors;\n}\n\nvar stateMap$1 = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template$1(state) {\n return \"button\" + state + \",\\n input[type=\\\"button\\\"]\" + state + \",\\n input[type=\\\"reset\\\"]\" + state + \",\\n input[type=\\\"submit\\\"]\" + state;\n}\n/**\n * Populates selectors that target all buttons. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [buttons('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${buttons('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'button:active,\n * 'input[type=\"button\"]:active,\n * 'input[type=\\\"reset\\\"]:active,\n * 'input[type=\\\"submit\\\"]:active: {\n * 'border': 'none'\n * }\n */\n\n\nfunction buttons() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template$1, stateMap$1);\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...margin('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${margin('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'marginTop': '12px',\n * 'marginRight': '24px',\n * 'marginBottom': '36px',\n * 'marginLeft': '48px'\n * }\n */\nfunction margin() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['margin'].concat(values));\n}\n\n/**\n * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...padding('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${padding('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'paddingTop': '12px',\n * 'paddingRight': '24px',\n * 'paddingBottom': '36px',\n * 'paddingLeft': '48px'\n * }\n */\nfunction padding() {\n for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n values[_key] = arguments[_key];\n }\n\n return directionalProperty.apply(void 0, ['padding'].concat(values));\n}\n\nvar positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];\n/**\n * Shorthand accepts up to five values, including null to skip a value, and maps them to their respective directions. The first value can optionally be a position keyword.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...position('12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n *\n * // Styles as object usage\n * const styles = {\n * ...position('absolute', '12px', '24px', '36px', '48px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${position('absolute', '12px', '24px', '36px', '48px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'position': 'absolute',\n * 'top': '12px',\n * 'right': '24px',\n * 'bottom': '36px',\n * 'left': '48px'\n * }\n */\n\nfunction position(firstValue) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n\n if (positionMap.indexOf(firstValue) >= 0 && firstValue) {\n return _extends({}, directionalProperty.apply(void 0, [''].concat(values)), {\n position: firstValue\n });\n } else {\n return directionalProperty.apply(void 0, ['', firstValue].concat(values));\n }\n}\n\n/**\n * Shorthand to set the height and width properties in a single statement.\n * @example\n * // Styles as object usage\n * const styles = {\n * ...size('300px', '250px')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${size('300px', '250px')}\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'height': '300px',\n * 'width': '250px',\n * }\n */\nfunction size(height, width) {\n if (width === void 0) {\n width = height;\n }\n\n return {\n height: height,\n width: width\n };\n}\n\nvar stateMap = [undefined, null, 'active', 'focus', 'hover'];\n\nfunction template(state) {\n return \"input[type=\\\"color\\\"]\" + state + \",\\n input[type=\\\"date\\\"]\" + state + \",\\n input[type=\\\"datetime\\\"]\" + state + \",\\n input[type=\\\"datetime-local\\\"]\" + state + \",\\n input[type=\\\"email\\\"]\" + state + \",\\n input[type=\\\"month\\\"]\" + state + \",\\n input[type=\\\"number\\\"]\" + state + \",\\n input[type=\\\"password\\\"]\" + state + \",\\n input[type=\\\"search\\\"]\" + state + \",\\n input[type=\\\"tel\\\"]\" + state + \",\\n input[type=\\\"text\\\"]\" + state + \",\\n input[type=\\\"time\\\"]\" + state + \",\\n input[type=\\\"url\\\"]\" + state + \",\\n input[type=\\\"week\\\"]\" + state + \",\\n input:not([type])\" + state + \",\\n textarea\" + state;\n}\n/**\n * Populates selectors that target all text inputs. You can pass optional states to append to the selectors.\n * @example\n * // Styles as object usage\n * const styles = {\n * [textInputs('active')]: {\n * 'border': 'none'\n * }\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * > ${textInputs('active')} {\n * border: none;\n * }\n * `\n *\n * // CSS in JS Output\n *\n * 'input[type=\"color\"]:active,\n * input[type=\"date\"]:active,\n * input[type=\"datetime\"]:active,\n * input[type=\"datetime-local\"]:active,\n * input[type=\"email\"]:active,\n * input[type=\"month\"]:active,\n * input[type=\"number\"]:active,\n * input[type=\"password\"]:active,\n * input[type=\"search\"]:active,\n * input[type=\"tel\"]:active,\n * input[type=\"text\"]:active,\n * input[type=\"time\"]:active,\n * input[type=\"url\"]:active,\n * input[type=\"week\"]:active,\n * input:not([type]):active,\n * textarea:active': {\n * 'border': 'none'\n * }\n */\n\n\nfunction textInputs() {\n for (var _len = arguments.length, states = new Array(_len), _key = 0; _key < _len; _key++) {\n states[_key] = arguments[_key];\n }\n\n return statefulSelectors(states, template, stateMap);\n}\n\n/**\n * Accepts any number of transition values as parameters for creating a single transition statement. You may also pass an array of properties as the first parameter that you would like to apply the same transition values to (second parameter).\n * @example\n * // Styles as object usage\n * const styles = {\n * ...transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s'),\n * ...transitions(['color', 'background-color'], '2.0s ease-in 2s')\n * }\n *\n * // styled-components usage\n * const div = styled.div`\n * ${transitions('opacity 1.0s ease-in 0s', 'width 2.0s ease-in 2s')};\n * ${transitions(['color', 'background-color'], '2.0s ease-in 2s'),};\n * `\n *\n * // CSS as JS Output\n *\n * div {\n * 'transition': 'opacity 1.0s ease-in 0s, width 2.0s ease-in 2s'\n * 'transition': 'color 2.0s ease-in 2s, background-color 2.0s ease-in 2s',\n * }\n */\n\nfunction transitions() {\n for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {\n properties[_key] = arguments[_key];\n }\n\n if (Array.isArray(properties[0]) && properties.length === 2) {\n var value = properties[1];\n\n if (typeof value !== 'string') {\n throw new PolishedError(61);\n }\n\n var transitionsString = properties[0].map(function (property) {\n return property + \" \" + value;\n }).join(', ');\n return {\n transition: transitionsString\n };\n } else {\n return {\n transition: properties.join(', ')\n };\n }\n}\n\nexport { curriedAdjustHue as adjustHue, animation, backgroundImages, backgrounds, between, border, borderColor, borderRadius, borderStyle, borderWidth, buttons, clearFix, complement, cover, cssVar, curriedDarken as darken, curriedDesaturate as desaturate, directionalProperty, easeIn, easeInOut, easeOut, ellipsis, em, fluidRange, fontFace, getContrast, getLuminance, getValueAndUnit, grayscale, hiDPI, hideText, hideVisually, hsl, hslToColorString, hsla, important, invert, curriedLighten as lighten, linearGradient, margin, math, meetsContrastGuidelines, curriedMix as mix, modularScale, normalize, curriedOpacify as opacify, padding, parseToHsl, parseToRgb, position, radialGradient, readableColor, rem, remToPx, retinaImage, rgb, rgbToColorString, rgba, curriedSaturate as saturate, curriedSetHue as setHue, curriedSetLightness as setLightness, curriedSetSaturation as setSaturation, curriedShade as shade, size, stripUnit, textInputs, timingFunctions, curriedTint as tint, toColorString, transitions, curriedTransparentize as transparentize, triangle, wordWrap };\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import { WebGLRenderer, Scene, PerspectiveCamera, Raycaster, TextureLoader, Vector2, Vector3, Box3, Color, Mesh, SphereGeometry, MeshBasicMaterial, BackSide, EventDispatcher, MOUSE, Quaternion, Spherical, Clock } from 'three';\nimport { TrackballControls } from 'three/examples/jsm/controls/TrackballControls.js';\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\nimport { FlyControls } from 'three/examples/jsm/controls/FlyControls.js';\nimport { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\nimport { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\nimport { parseToRgb, opacify } from 'polished';\nimport TWEEN from '@tweenjs/tween.js';\nimport accessorFn from 'accessor-fn';\nimport Kapsule from 'kapsule';\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".scene-nav-info {\\n bottom: 5px;\\n width: 100%;\\n text-align: center;\\n color: slategrey;\\n opacity: 0.7;\\n font-size: 10px;\\n}\\n\\n.scene-tooltip {\\n color: lavender;\\n font-size: 15px;\\n}\\n\\n.scene-nav-info, .scene-tooltip {\\n position: absolute;\\n font-family: sans-serif;\\n pointer-events: none;\\n}\\n\\n.scene-container canvas:focus {\\n outline: none;\\n}\";\nstyleInject(css_248z);\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar three = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists\n: {\n WebGLRenderer: WebGLRenderer,\n Scene: Scene,\n PerspectiveCamera: PerspectiveCamera,\n Raycaster: Raycaster,\n TextureLoader: TextureLoader,\n Vector2: Vector2,\n Vector3: Vector3,\n Box3: Box3,\n Color: Color,\n Mesh: Mesh,\n SphereGeometry: SphereGeometry,\n MeshBasicMaterial: MeshBasicMaterial,\n BackSide: BackSide,\n EventDispatcher: EventDispatcher,\n MOUSE: MOUSE,\n Quaternion: Quaternion,\n Spherical: Spherical,\n Clock: Clock\n};\nvar threeRenderObjects = Kapsule({\n props: {\n width: {\n \"default\": window.innerWidth,\n onChange: function onChange(width, state, prevWidth) {\n isNaN(width) && (state.width = prevWidth);\n }\n },\n height: {\n \"default\": window.innerHeight,\n onChange: function onChange(height, state, prevHeight) {\n isNaN(height) && (state.height = prevHeight);\n }\n },\n backgroundColor: {\n \"default\": '#000011'\n },\n backgroundImageUrl: {},\n onBackgroundImageLoaded: {},\n showNavInfo: {\n \"default\": true\n },\n skyRadius: {\n \"default\": 50000\n },\n objects: {\n \"default\": []\n },\n enablePointerInteraction: {\n \"default\": true,\n onChange: function onChange(_, state) {\n // Reset hover state\n state.hoverObj = null;\n if (state.toolTipElem) state.toolTipElem.innerHTML = '';\n },\n triggerUpdate: false\n },\n lineHoverPrecision: {\n \"default\": 1,\n triggerUpdate: false\n },\n hoverOrderComparator: {\n \"default\": function _default() {\n return -1;\n },\n triggerUpdate: false\n },\n // keep existing order by default\n hoverFilter: {\n \"default\": function _default() {\n return true;\n },\n triggerUpdate: false\n },\n // exclude objects from interaction\n tooltipContent: {\n triggerUpdate: false\n },\n hoverDuringDrag: {\n \"default\": false,\n triggerUpdate: false\n },\n clickAfterDrag: {\n \"default\": false,\n triggerUpdate: false\n },\n onHover: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onClick: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onRightClick: {\n triggerUpdate: false\n }\n },\n methods: {\n tick: function tick(state) {\n if (state.initialised) {\n state.controls.update && state.controls.update(state.clock.getDelta()); // timedelta is required for fly controls\n\n state.postProcessingComposer ? state.postProcessingComposer.render() // if using postprocessing, switch the output to it\n : state.renderer.render(state.scene, state.camera);\n state.extraRenderers.forEach(function (r) {\n return r.render(state.scene, state.camera);\n });\n\n if (state.enablePointerInteraction) {\n // Update tooltip and trigger onHover events\n var topObject = null;\n\n if (state.hoverDuringDrag || !state.isPointerDragging) {\n var intersects = this.intersectingObjects(state.pointerPos.x, state.pointerPos.y).filter(function (d) {\n return state.hoverFilter(d.object);\n }).sort(function (a, b) {\n return state.hoverOrderComparator(a.object, b.object);\n });\n var topIntersect = intersects.length ? intersects[0] : null;\n topObject = topIntersect ? topIntersect.object : null;\n state.intersectionPoint = topIntersect ? topIntersect.point : null;\n }\n\n if (topObject !== state.hoverObj) {\n state.onHover(topObject, state.hoverObj);\n state.toolTipElem.innerHTML = topObject ? accessorFn(state.tooltipContent)(topObject) || '' : '';\n state.hoverObj = topObject;\n }\n }\n\n TWEEN.update(); // update camera animation tweens\n }\n\n return this;\n },\n getPointerPos: function getPointerPos(state) {\n var _state$pointerPos = state.pointerPos,\n x = _state$pointerPos.x,\n y = _state$pointerPos.y;\n return {\n x: x,\n y: y\n };\n },\n cameraPosition: function cameraPosition(state, position, lookAt, transitionDuration) {\n var camera = state.camera; // Setter\n\n if (position && state.initialised) {\n var finalPos = position;\n var finalLookAt = lookAt || {\n x: 0,\n y: 0,\n z: 0\n };\n\n if (!transitionDuration) {\n // no animation\n setCameraPos(finalPos);\n setLookAt(finalLookAt);\n } else {\n var camPos = Object.assign({}, camera.position);\n var camLookAt = getLookAt();\n new TWEEN.Tween(camPos).to(finalPos, transitionDuration).easing(TWEEN.Easing.Quadratic.Out).onUpdate(setCameraPos).start(); // Face direction in 1/3rd of time\n\n new TWEEN.Tween(camLookAt).to(finalLookAt, transitionDuration / 3).easing(TWEEN.Easing.Quadratic.Out).onUpdate(setLookAt).start();\n }\n\n return this;\n } // Getter\n\n\n return Object.assign({}, camera.position, {\n lookAt: getLookAt()\n }); //\n\n function setCameraPos(pos) {\n var x = pos.x,\n y = pos.y,\n z = pos.z;\n if (x !== undefined) camera.position.x = x;\n if (y !== undefined) camera.position.y = y;\n if (z !== undefined) camera.position.z = z;\n }\n\n function setLookAt(lookAt) {\n state.controls.target = new three.Vector3(lookAt.x, lookAt.y, lookAt.z);\n }\n\n function getLookAt() {\n return Object.assign(new three.Vector3(0, 0, -1000).applyQuaternion(camera.quaternion).add(camera.position));\n }\n },\n zoomToFit: function zoomToFit(state) {\n var transitionDuration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;\n\n for (var _len = arguments.length, bboxArgs = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n bboxArgs[_key - 3] = arguments[_key];\n }\n\n return this.fitToBbox(this.getBbox.apply(this, bboxArgs), transitionDuration, padding);\n },\n fitToBbox: function fitToBbox(state, bbox) {\n var transitionDuration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var padding = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;\n // based on https://discourse.threejs.org/t/camera-zoom-to-fit-object/936/24\n var camera = state.camera;\n\n if (bbox) {\n var center = new three.Vector3(0, 0, 0); // reset camera aim to center\n\n var maxBoxSide = Math.max.apply(Math, _toConsumableArray(Object.entries(bbox).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n coordType = _ref2[0],\n coords = _ref2[1];\n\n return Math.max.apply(Math, _toConsumableArray(coords.map(function (c) {\n return Math.abs(center[coordType] - c);\n })));\n }))) * 2; // find distance that fits whole bbox within padded fov\n\n var paddedFov = (1 - padding * 2 / state.height) * camera.fov;\n var fitHeightDistance = maxBoxSide / Math.atan(paddedFov * Math.PI / 180);\n var fitWidthDistance = fitHeightDistance / camera.aspect;\n var distance = Math.max(fitHeightDistance, fitWidthDistance);\n\n if (distance > 0) {\n var newCameraPosition = center.clone().sub(camera.position).normalize().multiplyScalar(-distance);\n this.cameraPosition(newCameraPosition, center, transitionDuration);\n }\n }\n\n return this;\n },\n getBbox: function getBbox(state) {\n var objFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {\n return true;\n };\n var box = new three.Box3(new three.Vector3(0, 0, 0), new three.Vector3(0, 0, 0));\n var objs = state.objects.filter(objFilter);\n if (!objs.length) return null;\n objs.forEach(function (obj) {\n return box.expandByObject(obj);\n }); // extract global x,y,z min/max\n\n return Object.assign.apply(Object, _toConsumableArray(['x', 'y', 'z'].map(function (c) {\n return _defineProperty({}, c, [box.min[c], box.max[c]]);\n })));\n },\n getScreenCoords: function getScreenCoords(state, x, y, z) {\n var vec = new three.Vector3(x, y, z);\n vec.project(this.camera()); // project to the camera plane\n\n return {\n // align relative pos to canvas dimensions\n x: (vec.x + 1) * state.width / 2,\n y: -(vec.y - 1) * state.height / 2\n };\n },\n getSceneCoords: function getSceneCoords(state, screenX, screenY) {\n var distance = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var relCoords = new three.Vector2(screenX / state.width * 2 - 1, -(screenY / state.height) * 2 + 1);\n var raycaster = new three.Raycaster();\n raycaster.setFromCamera(relCoords, state.camera);\n return Object.assign({}, raycaster.ray.at(distance, new three.Vector3()));\n },\n intersectingObjects: function intersectingObjects(state, x, y) {\n var relCoords = new three.Vector2(x / state.width * 2 - 1, -(y / state.height) * 2 + 1);\n var raycaster = new three.Raycaster();\n raycaster.params.Line.threshold = state.lineHoverPrecision; // set linePrecision\n\n raycaster.setFromCamera(relCoords, state.camera);\n return raycaster.intersectObjects(state.objects, true);\n },\n renderer: function renderer(state) {\n return state.renderer;\n },\n scene: function scene(state) {\n return state.scene;\n },\n camera: function camera(state) {\n return state.camera;\n },\n postProcessingComposer: function postProcessingComposer(state) {\n return state.postProcessingComposer;\n },\n controls: function controls(state) {\n return state.controls;\n },\n tbControls: function tbControls(state) {\n return state.controls;\n } // to be deprecated\n\n },\n stateInit: function stateInit() {\n return {\n scene: new three.Scene(),\n camera: new three.PerspectiveCamera(),\n clock: new three.Clock()\n };\n },\n init: function init(domNode, state) {\n var _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref4$controlType = _ref4.controlType,\n controlType = _ref4$controlType === void 0 ? 'trackball' : _ref4$controlType,\n _ref4$rendererConfig = _ref4.rendererConfig,\n rendererConfig = _ref4$rendererConfig === void 0 ? {} : _ref4$rendererConfig,\n _ref4$extraRenderers = _ref4.extraRenderers,\n extraRenderers = _ref4$extraRenderers === void 0 ? [] : _ref4$extraRenderers,\n _ref4$waitForLoadComp = _ref4.waitForLoadComplete,\n waitForLoadComplete = _ref4$waitForLoadComp === void 0 ? true : _ref4$waitForLoadComp;\n\n // Wipe DOM\n domNode.innerHTML = ''; // Add relative container\n\n domNode.appendChild(state.container = document.createElement('div'));\n state.container.className = 'scene-container';\n state.container.style.position = 'relative'; // Add nav info section\n\n state.container.appendChild(state.navInfo = document.createElement('div'));\n state.navInfo.className = 'scene-nav-info';\n state.navInfo.textContent = {\n orbit: 'Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan',\n trackball: 'Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan',\n fly: 'WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw'\n }[controlType] || '';\n state.navInfo.style.display = state.showNavInfo ? null : 'none'; // Setup tooltip\n\n state.toolTipElem = document.createElement('div');\n state.toolTipElem.classList.add('scene-tooltip');\n state.container.appendChild(state.toolTipElem); // Capture pointer coords on move or touchstart\n\n state.pointerPos = new three.Vector2();\n state.pointerPos.x = -2; // Initialize off canvas\n\n state.pointerPos.y = -2;\n ['pointermove', 'pointerdown'].forEach(function (evType) {\n return state.container.addEventListener(evType, function (ev) {\n // track click state\n evType === 'pointerdown' && (state.isPointerPressed = true); // detect point drag\n\n !state.isPointerDragging && ev.type === 'pointermove' && (ev.pressure > 0 || state.isPointerPressed) // ev.pressure always 0 on Safari, so we used the isPointerPressed tracker\n && (ev.pointerType !== 'touch' || ev.movementX === undefined || [ev.movementX, ev.movementY].some(function (m) {\n return Math.abs(m) > 1;\n })) // relax drag trigger sensitivity on touch events\n && (state.isPointerDragging = true);\n\n if (state.enablePointerInteraction) {\n // update the pointer pos\n var offset = getOffset(state.container);\n state.pointerPos.x = ev.pageX - offset.left;\n state.pointerPos.y = ev.pageY - offset.top; // Move tooltip\n\n state.toolTipElem.style.top = \"\".concat(state.pointerPos.y, \"px\");\n state.toolTipElem.style.left = \"\".concat(state.pointerPos.x, \"px\");\n state.toolTipElem.style.transform = \"translate(-\".concat(state.pointerPos.x / state.width * 100, \"%, 21px)\"); // adjust horizontal position to not exceed canvas boundaries\n }\n\n function getOffset(el) {\n var rect = el.getBoundingClientRect(),\n scrollLeft = window.pageXOffset || document.documentElement.scrollLeft,\n scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n return {\n top: rect.top + scrollTop,\n left: rect.left + scrollLeft\n };\n }\n }, {\n passive: true\n });\n }); // Handle click events on objs\n\n state.container.addEventListener('pointerup', function (ev) {\n state.isPointerPressed = false;\n\n if (state.isPointerDragging) {\n state.isPointerDragging = false;\n if (!state.clickAfterDrag) return; // don't trigger onClick after pointer drag (camera motion via controls)\n }\n\n requestAnimationFrame(function () {\n // trigger click events asynchronously, to allow hoverObj to be set (on frame)\n if (ev.button === 0) {\n // left-click\n state.onClick(state.hoverObj || null, ev, state.intersectionPoint); // trigger background clicks with null\n }\n\n if (ev.button === 2 && state.onRightClick) {\n // right-click\n state.onRightClick(state.hoverObj || null, ev, state.intersectionPoint);\n }\n });\n }, {\n passive: true,\n capture: true\n }); // use capture phase to prevent propagation blocking from controls (specifically for fly)\n\n state.container.addEventListener('contextmenu', function (ev) {\n if (state.onRightClick) ev.preventDefault(); // prevent default contextmenu behavior and allow pointerup to fire instead\n }); // Setup renderer, camera and controls\n\n state.renderer = new three.WebGLRenderer(Object.assign({\n antialias: true,\n alpha: true\n }, rendererConfig));\n state.renderer.setPixelRatio(Math.min(2, window.devicePixelRatio)); // clamp device pixel ratio\n\n state.container.appendChild(state.renderer.domElement); // Setup extra renderers\n\n state.extraRenderers = extraRenderers;\n state.extraRenderers.forEach(function (r) {\n // overlay them on top of main renderer\n r.domElement.style.position = 'absolute';\n r.domElement.style.top = '0px';\n r.domElement.style.pointerEvents = 'none';\n state.container.appendChild(r.domElement);\n }); // configure post-processing composer\n\n state.postProcessingComposer = new EffectComposer(state.renderer);\n state.postProcessingComposer.addPass(new RenderPass(state.scene, state.camera)); // render scene as first pass\n // configure controls\n\n state.controls = new {\n trackball: TrackballControls,\n orbit: OrbitControls,\n fly: FlyControls\n }[controlType](state.camera, state.renderer.domElement);\n\n if (controlType === 'fly') {\n state.controls.movementSpeed = 300;\n state.controls.rollSpeed = Math.PI / 6;\n state.controls.dragToLook = true;\n }\n\n if (controlType === 'trackball' || controlType === 'orbit') {\n state.controls.minDistance = 0.1;\n state.controls.maxDistance = state.skyRadius;\n state.controls.addEventListener('start', function () {\n state.controlsEngaged = true;\n });\n state.controls.addEventListener('change', function () {\n if (state.controlsEngaged) {\n state.controlsDragging = true;\n }\n });\n state.controls.addEventListener('end', function () {\n state.controlsEngaged = false;\n state.controlsDragging = false;\n });\n }\n\n [state.renderer, state.postProcessingComposer].concat(_toConsumableArray(state.extraRenderers)).forEach(function (r) {\n return r.setSize(state.width, state.height);\n });\n state.camera.aspect = state.width / state.height;\n state.camera.updateProjectionMatrix();\n state.camera.position.z = 1000; // add sky\n\n state.scene.add(state.skysphere = new three.Mesh());\n state.skysphere.visible = false;\n state.loadComplete = state.scene.visible = !waitForLoadComplete;\n window.scene = state.scene;\n },\n update: function update(state, changedProps) {\n // resize canvas\n if (state.width && state.height && (changedProps.hasOwnProperty('width') || changedProps.hasOwnProperty('height'))) {\n state.container.style.width = state.width;\n state.container.style.height = state.height;\n [state.renderer, state.postProcessingComposer].concat(_toConsumableArray(state.extraRenderers)).forEach(function (r) {\n return r.setSize(state.width, state.height);\n });\n state.camera.aspect = state.width / state.height;\n state.camera.updateProjectionMatrix();\n }\n\n if (changedProps.hasOwnProperty('skyRadius') && state.skyRadius) {\n state.controls.hasOwnProperty('maxDistance') && changedProps.skyRadius && (state.controls.maxDistance = state.skyRadius);\n state.camera.far = state.skyRadius * 2.5;\n state.camera.updateProjectionMatrix();\n state.skysphere.geometry = new three.SphereGeometry(state.skyRadius);\n }\n\n if (changedProps.hasOwnProperty('backgroundColor')) {\n var alpha = parseToRgb(state.backgroundColor).alpha;\n if (alpha === undefined) alpha = 1;\n state.renderer.setClearColor(new three.Color(opacify(1, state.backgroundColor)), alpha);\n }\n\n if (changedProps.hasOwnProperty('backgroundImageUrl')) {\n if (!state.backgroundImageUrl) {\n state.skysphere.visible = false;\n state.skysphere.material.map = null;\n !state.loadComplete && finishLoad();\n } else {\n new three.TextureLoader().load(state.backgroundImageUrl, function (texture) {\n state.skysphere.material = new three.MeshBasicMaterial({\n map: texture,\n side: three.BackSide\n });\n state.skysphere.visible = true; // triggered when background image finishes loading (asynchronously to allow 1 frame to load texture)\n\n state.onBackgroundImageLoaded && setTimeout(state.onBackgroundImageLoaded);\n !state.loadComplete && finishLoad();\n });\n }\n }\n\n changedProps.hasOwnProperty('showNavInfo') && (state.navInfo.style.display = state.showNavInfo ? null : 'none');\n\n if (changedProps.hasOwnProperty('objects')) {\n (changedProps.objects || []).forEach(function (obj) {\n return state.scene.remove(obj);\n }); // Clear the place\n\n state.objects.forEach(function (obj) {\n return state.scene.add(obj);\n }); // Add to scene\n } //\n\n\n function finishLoad() {\n state.loadComplete = state.scene.visible = true;\n }\n }\n});\n\nexport default threeRenderObjects;\n","import { AmbientLight, DirectionalLight, Vector3 } from 'three';\nimport { DragControls } from 'three/examples/jsm/controls/DragControls.js';\nimport ThreeForceGraph from 'three-forcegraph';\nimport ThreeRenderObjects from 'three-render-objects';\nimport accessorFn from 'accessor-fn';\nimport Kapsule from 'kapsule';\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".graph-info-msg {\\n top: 50%;\\n width: 100%;\\n text-align: center;\\n color: lavender;\\n opacity: 0.7;\\n font-size: 22px;\\n position: absolute;\\n font-family: Sans-serif;\\n}\\n\\n.scene-container .clickable {\\n cursor: pointer;\\n}\\n\\n.scene-container .grabbable {\\n cursor: move;\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n}\\n\\n.scene-container .grabbable:active {\\n cursor: grabbing;\\n cursor: -moz-grabbing;\\n cursor: -webkit-grabbing;\\n}\";\nstyleInject(css_248z);\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction linkKapsule (kapsulePropName, kapsuleType) {\n var dummyK = new kapsuleType(); // To extract defaults\n\n return {\n linkProp: function linkProp(prop) {\n // link property config\n return {\n \"default\": dummyK[prop](),\n onChange: function onChange(v, state) {\n state[kapsulePropName][prop](v);\n },\n triggerUpdate: false\n };\n },\n linkMethod: function linkMethod(method) {\n // link method pass-through\n return function (state) {\n var kapsuleInstance = state[kapsulePropName];\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var returnVal = kapsuleInstance[method].apply(kapsuleInstance, args);\n return returnVal === kapsuleInstance ? this // chain based on the parent object, not the inner kapsule\n : returnVal;\n };\n }\n };\n}\n\nvar three = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists\n: {\n AmbientLight: AmbientLight,\n DirectionalLight: DirectionalLight,\n Vector3: Vector3\n};\n\nvar CAMERA_DISTANCE2NODES_FACTOR = 170; //\n// Expose config from forceGraph\n\nvar bindFG = linkKapsule('forceGraph', ThreeForceGraph);\nvar linkedFGProps = Object.assign.apply(Object, _toConsumableArray(['jsonUrl', 'graphData', 'numDimensions', 'dagMode', 'dagLevelDistance', 'dagNodeFilter', 'onDagError', 'nodeRelSize', 'nodeId', 'nodeVal', 'nodeResolution', 'nodeColor', 'nodeAutoColorBy', 'nodeOpacity', 'nodeVisibility', 'nodeThreeObject', 'nodeThreeObjectExtend', 'linkSource', 'linkTarget', 'linkVisibility', 'linkColor', 'linkAutoColorBy', 'linkOpacity', 'linkWidth', 'linkResolution', 'linkCurvature', 'linkCurveRotation', 'linkMaterial', 'linkThreeObject', 'linkThreeObjectExtend', 'linkPositionUpdate', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowRelPos', 'linkDirectionalArrowResolution', 'linkDirectionalParticles', 'linkDirectionalParticleSpeed', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'linkDirectionalParticleResolution', 'forceEngine', 'd3AlphaDecay', 'd3VelocityDecay', 'd3AlphaMin', 'ngraphPhysics', 'warmupTicks', 'cooldownTicks', 'cooldownTime', 'onEngineTick', 'onEngineStop'].map(function (p) {\n return _defineProperty({}, p, bindFG.linkProp(p));\n})));\nvar linkedFGMethods = Object.assign.apply(Object, _toConsumableArray(['refresh', 'getGraphBbox', 'd3Force', 'd3ReheatSimulation', 'emitParticle'].map(function (p) {\n return _defineProperty({}, p, bindFG.linkMethod(p));\n}))); // Expose config from renderObjs\n\nvar bindRenderObjs = linkKapsule('renderObjs', ThreeRenderObjects);\nvar linkedRenderObjsProps = Object.assign.apply(Object, _toConsumableArray(['width', 'height', 'backgroundColor', 'showNavInfo', 'enablePointerInteraction'].map(function (p) {\n return _defineProperty({}, p, bindRenderObjs.linkProp(p));\n})));\nvar linkedRenderObjsMethods = Object.assign.apply(Object, _toConsumableArray(['cameraPosition', 'postProcessingComposer'].map(function (p) {\n return _defineProperty({}, p, bindRenderObjs.linkMethod(p));\n})).concat([{\n graph2ScreenCoords: bindRenderObjs.linkMethod('getScreenCoords'),\n screen2GraphCoords: bindRenderObjs.linkMethod('getSceneCoords')\n}])); //\n\nvar _3dForceGraph = Kapsule({\n props: _objectSpread2(_objectSpread2({\n nodeLabel: {\n \"default\": 'name',\n triggerUpdate: false\n },\n linkLabel: {\n \"default\": 'name',\n triggerUpdate: false\n },\n linkHoverPrecision: {\n \"default\": 1,\n onChange: function onChange(p, state) {\n return state.renderObjs.lineHoverPrecision(p);\n },\n triggerUpdate: false\n },\n enableNavigationControls: {\n \"default\": true,\n onChange: function onChange(enable, state) {\n var controls = state.renderObjs.controls();\n\n if (controls) {\n controls.enabled = enable;\n }\n },\n triggerUpdate: false\n },\n enableNodeDrag: {\n \"default\": true,\n triggerUpdate: false\n },\n onNodeDrag: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNodeDragEnd: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNodeClick: {\n triggerUpdate: false\n },\n onNodeRightClick: {\n triggerUpdate: false\n },\n onNodeHover: {\n triggerUpdate: false\n },\n onLinkClick: {\n triggerUpdate: false\n },\n onLinkRightClick: {\n triggerUpdate: false\n },\n onLinkHover: {\n triggerUpdate: false\n },\n onBackgroundClick: {\n triggerUpdate: false\n },\n onBackgroundRightClick: {\n triggerUpdate: false\n }\n }, linkedFGProps), linkedRenderObjsProps),\n methods: _objectSpread2(_objectSpread2({\n zoomToFit: function zoomToFit(state, transitionDuration, padding) {\n var _state$forceGraph;\n\n for (var _len = arguments.length, bboxArgs = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n bboxArgs[_key - 3] = arguments[_key];\n }\n\n state.renderObjs.fitToBbox((_state$forceGraph = state.forceGraph).getGraphBbox.apply(_state$forceGraph, bboxArgs), transitionDuration, padding);\n return this;\n },\n pauseAnimation: function pauseAnimation(state) {\n if (state.animationFrameRequestId !== null) {\n cancelAnimationFrame(state.animationFrameRequestId);\n state.animationFrameRequestId = null;\n }\n\n return this;\n },\n resumeAnimation: function resumeAnimation(state) {\n if (state.animationFrameRequestId === null) {\n this._animationCycle();\n }\n\n return this;\n },\n _animationCycle: function _animationCycle(state) {\n if (state.enablePointerInteraction) {\n // reset canvas cursor (override dragControls cursor)\n this.renderer().domElement.style.cursor = null;\n } // Frame cycle\n\n\n state.forceGraph.tickFrame();\n state.renderObjs.tick();\n state.animationFrameRequestId = requestAnimationFrame(this._animationCycle);\n },\n scene: function scene(state) {\n return state.renderObjs.scene();\n },\n // Expose scene\n camera: function camera(state) {\n return state.renderObjs.camera();\n },\n // Expose camera\n renderer: function renderer(state) {\n return state.renderObjs.renderer();\n },\n // Expose renderer\n controls: function controls(state) {\n return state.renderObjs.controls();\n },\n // Expose controls\n tbControls: function tbControls(state) {\n return state.renderObjs.tbControls();\n },\n // To be deprecated\n _destructor: function _destructor() {\n this.pauseAnimation();\n this.graphData({\n nodes: [],\n links: []\n });\n }\n }, linkedFGMethods), linkedRenderObjsMethods),\n stateInit: function stateInit(_ref5) {\n var controlType = _ref5.controlType,\n rendererConfig = _ref5.rendererConfig,\n extraRenderers = _ref5.extraRenderers;\n return {\n forceGraph: new ThreeForceGraph(),\n renderObjs: ThreeRenderObjects({\n controlType: controlType,\n rendererConfig: rendererConfig,\n extraRenderers: extraRenderers\n })\n };\n },\n init: function init(domNode, state) {\n // Wipe DOM\n domNode.innerHTML = ''; // Add relative container\n\n domNode.appendChild(state.container = document.createElement('div'));\n state.container.style.position = 'relative'; // Add renderObjs\n\n var roDomNode = document.createElement('div');\n state.container.appendChild(roDomNode);\n state.renderObjs(roDomNode);\n var camera = state.renderObjs.camera();\n var renderer = state.renderObjs.renderer();\n var controls = state.renderObjs.controls();\n controls.enabled = !!state.enableNavigationControls;\n state.lastSetCameraZ = camera.position.z; // Add info space\n\n var infoElem;\n state.container.appendChild(infoElem = document.createElement('div'));\n infoElem.className = 'graph-info-msg';\n infoElem.textContent = ''; // config forcegraph\n\n state.forceGraph.onLoading(function () {\n infoElem.textContent = 'Loading...';\n }).onFinishLoading(function () {\n infoElem.textContent = '';\n }).onUpdate(function () {\n // sync graph data structures\n state.graphData = state.forceGraph.graphData(); // re-aim camera, if still in default position (not user modified)\n\n if (camera.position.x === 0 && camera.position.y === 0 && camera.position.z === state.lastSetCameraZ && state.graphData.nodes.length) {\n camera.lookAt(state.forceGraph.position);\n state.lastSetCameraZ = camera.position.z = Math.cbrt(state.graphData.nodes.length) * CAMERA_DISTANCE2NODES_FACTOR;\n }\n }).onFinishUpdate(function () {\n // Setup node drag interaction\n if (state._dragControls) {\n var curNodeDrag = state.graphData.nodes.find(function (node) {\n return node.__initialFixedPos && !node.__disposeControlsAfterDrag;\n }); // detect if there's a node being dragged using the existing drag controls\n\n if (curNodeDrag) {\n curNodeDrag.__disposeControlsAfterDrag = true; // postpone previous controls disposal until drag ends\n } else {\n state._dragControls.dispose(); // cancel previous drag controls\n\n }\n\n state._dragControls = undefined;\n }\n\n if (state.enableNodeDrag && state.enablePointerInteraction && state.forceEngine === 'd3') {\n // Can't access node positions programatically in ngraph\n var dragControls = state._dragControls = new DragControls(state.graphData.nodes.map(function (node) {\n return node.__threeObj;\n }).filter(function (obj) {\n return obj;\n }), camera, renderer.domElement);\n dragControls.addEventListener('dragstart', function (event) {\n controls.enabled = false; // Disable controls while dragging\n // track drag object movement\n\n event.object.__initialPos = event.object.position.clone();\n event.object.__prevPos = event.object.position.clone();\n\n var node = getGraphObj(event.object).__data;\n\n !node.__initialFixedPos && (node.__initialFixedPos = {\n fx: node.fx,\n fy: node.fy,\n fz: node.fz\n });\n !node.__initialPos && (node.__initialPos = {\n x: node.x,\n y: node.y,\n z: node.z\n }); // lock node\n\n ['x', 'y', 'z'].forEach(function (c) {\n return node[\"f\".concat(c)] = node[c];\n }); // drag cursor\n\n renderer.domElement.classList.add('grabbable');\n });\n dragControls.addEventListener('drag', function (event) {\n var nodeObj = getGraphObj(event.object);\n\n if (!event.object.hasOwnProperty('__graphObjType')) {\n // If dragging a child of the node, update the node object instead\n var initPos = event.object.__initialPos;\n var prevPos = event.object.__prevPos;\n var _newPos = event.object.position;\n nodeObj.position.add(_newPos.clone().sub(prevPos)); // translate node object by the motion delta\n\n prevPos.copy(_newPos);\n\n _newPos.copy(initPos); // reset child back to its initial position\n\n }\n\n var node = nodeObj.__data;\n var newPos = nodeObj.position;\n var translate = {\n x: newPos.x - node.x,\n y: newPos.y - node.y,\n z: newPos.z - node.z\n }; // Move fx/fy/fz (and x/y/z) of nodes based on object new position\n\n ['x', 'y', 'z'].forEach(function (c) {\n return node[\"f\".concat(c)] = node[c] = newPos[c];\n });\n state.forceGraph.d3AlphaTarget(0.3) // keep engine running at low intensity throughout drag\n .resetCountdown(); // prevent freeze while dragging\n\n node.__dragged = true;\n state.onNodeDrag(node, translate);\n });\n dragControls.addEventListener('dragend', function (event) {\n delete event.object.__initialPos; // remove tracking attributes\n\n delete event.object.__prevPos;\n\n var node = getGraphObj(event.object).__data; // dispose previous controls if needed\n\n\n if (node.__disposeControlsAfterDrag) {\n dragControls.dispose();\n delete node.__disposeControlsAfterDrag;\n }\n\n var initFixedPos = node.__initialFixedPos;\n var initPos = node.__initialPos;\n var translate = {\n x: initPos.x - node.x,\n y: initPos.y - node.y,\n z: initPos.z - node.z\n };\n\n if (initFixedPos) {\n ['x', 'y', 'z'].forEach(function (c) {\n var fc = \"f\".concat(c);\n\n if (initFixedPos[fc] === undefined) {\n delete node[fc];\n }\n });\n delete node.__initialFixedPos;\n delete node.__initialPos;\n\n if (node.__dragged) {\n delete node.__dragged;\n state.onNodeDragEnd(node, translate);\n }\n }\n\n state.forceGraph.d3AlphaTarget(0) // release engine low intensity\n .resetCountdown(); // let the engine readjust after releasing fixed nodes\n\n if (state.enableNavigationControls) {\n controls.enabled = true; // Re-enable controls\n\n controls.domElement && controls.domElement.ownerDocument && controls.domElement.ownerDocument.dispatchEvent( // simulate mouseup to ensure the controls don't take over after dragend\n new PointerEvent('pointerup', {\n pointerType: 'touch'\n }));\n } // clear cursor\n\n\n renderer.domElement.classList.remove('grabbable');\n });\n }\n }); // config renderObjs\n\n state.renderObjs.objects([// Populate scene\n new three.AmbientLight(0xbbbbbb), new three.DirectionalLight(0xffffff, 0.6), state.forceGraph]).hoverOrderComparator(function (a, b) {\n // Prioritize graph objects\n var aObj = getGraphObj(a);\n if (!aObj) return 1;\n var bObj = getGraphObj(b);\n if (!bObj) return -1; // Prioritize nodes over links\n\n var isNode = function isNode(o) {\n return o.__graphObjType === 'node';\n };\n\n return isNode(bObj) - isNode(aObj);\n }).tooltipContent(function (obj) {\n var graphObj = getGraphObj(obj);\n return graphObj ? accessorFn(state[\"\".concat(graphObj.__graphObjType, \"Label\")])(graphObj.__data) || '' : '';\n }).hoverDuringDrag(false).onHover(function (obj) {\n // Update tooltip and trigger onHover events\n var hoverObj = getGraphObj(obj);\n\n if (hoverObj !== state.hoverObj) {\n var prevObjType = state.hoverObj ? state.hoverObj.__graphObjType : null;\n var prevObjData = state.hoverObj ? state.hoverObj.__data : null;\n var objType = hoverObj ? hoverObj.__graphObjType : null;\n var objData = hoverObj ? hoverObj.__data : null;\n\n if (prevObjType && prevObjType !== objType) {\n // Hover out\n var fn = state[\"on\".concat(prevObjType === 'node' ? 'Node' : 'Link', \"Hover\")];\n fn && fn(null, prevObjData);\n }\n\n if (objType) {\n // Hover in\n var _fn = state[\"on\".concat(objType === 'node' ? 'Node' : 'Link', \"Hover\")];\n _fn && _fn(objData, prevObjType === objType ? prevObjData : null);\n } // set pointer if hovered object is clickable\n\n\n renderer.domElement.classList[hoverObj && state[\"on\".concat(objType === 'node' ? 'Node' : 'Link', \"Click\")] || !hoverObj && state.onBackgroundClick ? 'add' : 'remove']('clickable');\n state.hoverObj = hoverObj;\n }\n }).clickAfterDrag(false).onClick(function (obj, ev) {\n var graphObj = getGraphObj(obj);\n\n if (graphObj) {\n var fn = state[\"on\".concat(graphObj.__graphObjType === 'node' ? 'Node' : 'Link', \"Click\")];\n fn && fn(graphObj.__data, ev);\n } else {\n state.onBackgroundClick && state.onBackgroundClick(ev);\n }\n }).onRightClick(function (obj, ev) {\n // Handle right-click events\n var graphObj = getGraphObj(obj);\n\n if (graphObj) {\n var fn = state[\"on\".concat(graphObj.__graphObjType === 'node' ? 'Node' : 'Link', \"RightClick\")];\n fn && fn(graphObj.__data, ev);\n } else {\n state.onBackgroundRightClick && state.onBackgroundRightClick(ev);\n }\n }); //\n // Kick-off renderer\n\n this._animationCycle();\n }\n}); //\n\nfunction getGraphObj(object) {\n var obj = object; // recurse up object chain until finding the graph object\n\n while (obj && !obj.hasOwnProperty('__graphObjType')) {\n obj = obj.parent;\n }\n\n return obj;\n}\n\nexport default _3dForceGraph;\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n","import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n","export default function() {\n return !this.node();\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n","import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nexport const nonpassive = {passive: false};\nexport const nonpassivecapture = {capture: true, passive: false};\n\nexport function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {select} from \"d3-selection\";\nimport noevent, {nonpassivecapture} from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, nonpassivecapture);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, nonpassivecapture);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, nonpassivecapture);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","var epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n","import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\n","export default function(event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}\n","import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n","import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n","function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n","function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n","import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n","import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n","import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n","import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n","export default x => () => x;\n","export default function ZoomEvent(type, {\n sourceEvent,\n target,\n transform,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n transform: {value: transform, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p, event) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = pointer(event);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won’t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n","export default x => () => x;\n","export default function DragEvent(type, {\n sourceEvent,\n subject,\n target,\n identifier,\n active,\n x, y, dx, dy,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n subject: {value: subject, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n identifier: {value: identifier, enumerable: true, configurable: true},\n active: {value: active, enumerable: true, configurable: true},\n x: {value: x, enumerable: true, configurable: true},\n y: {value: y, enumerable: true, configurable: true},\n dx: {value: dx, enumerable: true, configurable: true},\n dy: {value: dy, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n","import {dispatch} from \"d3-dispatch\";\nimport {select, pointer} from \"d3-selection\";\nimport nodrag, {yesdrag} from \"./nodrag.js\";\nimport noevent, {nonpassive, nonpassivecapture, nopropagation} from \"./noevent.js\";\nimport constant from \"./constant.js\";\nimport DragEvent from \"./event.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nexport default function() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved, nonpassive)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned(event, d) {\n if (touchending || !filter.call(this, event, d)) return;\n var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n if (!gesture) return;\n select(event.view)\n .on(\"mousemove.drag\", mousemoved, nonpassivecapture)\n .on(\"mouseup.drag\", mouseupped, nonpassivecapture);\n nodrag(event.view);\n nopropagation(event);\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\", event);\n }\n\n function mousemoved(event) {\n noevent(event);\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\", event);\n }\n\n function mouseupped(event) {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent(event);\n gestures.mouse(\"end\", event);\n }\n\n function touchstarted(event, d) {\n if (!filter.call(this, event, d)) return;\n var touches = event.changedTouches,\n c = container.call(this, event, d),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n nopropagation(event);\n gesture(\"start\", event, touches[i]);\n }\n }\n }\n\n function touchmoved(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent(event);\n gesture(\"drag\", event, touches[i]);\n }\n }\n }\n\n function touchended(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation(event);\n gesture(\"end\", event, touches[i]);\n }\n }\n }\n\n function beforestart(that, container, event, d, identifier, touch) {\n var dispatch = listeners.copy(),\n p = pointer(touch || event, container), dx, dy,\n s;\n\n if ((s = subject.call(that, new DragEvent(\"beforestart\", {\n sourceEvent: event,\n target: drag,\n identifier,\n active,\n x: p[0],\n y: p[1],\n dx: 0,\n dy: 0,\n dispatch\n }), d)) == null) return;\n\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n\n return function gesture(type, event, touch) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[identifier] = gesture, n = active++; break;\n case \"end\": delete gestures[identifier], --active; // falls through\n case \"drag\": p = pointer(touch || event, container), n = active; break;\n }\n dispatch.call(\n type,\n that,\n new DragEvent(type, {\n sourceEvent: event,\n subject: s,\n target: drag,\n identifier,\n active: n,\n x: p[0] + dx,\n y: p[1] + dy,\n dx: p[0] - p0[0],\n dy: p[1] - p0[1],\n dispatch\n }),\n d\n );\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}\n","import tinyColor from 'tinycolor2';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar ENTROPY = 123; // Raise numbers to prevent collisions in lower indexes\n\nvar int2HexColor = function int2HexColor(num) {\n return \"#\".concat(Math.min(num, Math.pow(2, 24)).toString(16).padStart(6, '0'));\n};\n\nvar rgb2Int = function rgb2Int(r, g, b) {\n return (r << 16) + (g << 8) + b;\n};\n\nvar colorStr2Int = function colorStr2Int(str) {\n var _tinyColor$toRgb = tinyColor(str).toRgb(),\n r = _tinyColor$toRgb.r,\n g = _tinyColor$toRgb.g,\n b = _tinyColor$toRgb.b;\n\n return rgb2Int(r, g, b);\n};\n\nvar checksum = function checksum(n, csBits) {\n return n * ENTROPY % Math.pow(2, csBits);\n};\n\nvar _default = /*#__PURE__*/function () {\n function _default() {\n var csBits = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6;\n\n _classCallCheck(this, _default);\n\n this.csBits = csBits; // How many bits to reserve for checksum. Will eat away into the usable size of the registry.\n\n this.registry = ['__reserved for background__']; // indexed objects for rgb lookup;\n }\n\n _createClass(_default, [{\n key: \"register\",\n value: function register(obj) {\n if (this.registry.length >= Math.pow(2, 24 - this.csBits)) {\n // color has 24 bits (-checksum)\n return null; // Registry is full\n }\n\n var idx = this.registry.length;\n var cs = checksum(idx, this.csBits);\n var color = int2HexColor(idx + (cs << 24 - this.csBits));\n this.registry.push(obj);\n return color;\n }\n }, {\n key: \"lookup\",\n value: function lookup(color) {\n var n = typeof color === 'string' ? colorStr2Int(color) : rgb2Int.apply(void 0, _toConsumableArray(color));\n if (!n) return null; // 0 index is reserved for background\n\n var idx = n & Math.pow(2, 24 - this.csBits) - 1; // registry index\n\n var cs = n >> 24 - this.csBits & Math.pow(2, this.csBits) - 1; // extract bits reserved for checksum\n\n if (checksum(idx, this.csBits) !== cs || idx >= this.registry.length) return null; // failed checksum or registry out of bounds\n\n return this.registry[idx];\n }\n }]);\n\n return _default;\n}();\n\nexport default _default;\n","import { select } from 'd3-selection';\nimport { zoomTransform, zoom } from 'd3-zoom';\nimport { drag } from 'd3-drag';\nimport { min, max } from 'd3-array';\nimport throttle from 'lodash.throttle';\nimport TWEEN from '@tweenjs/tween.js';\nimport Kapsule from 'kapsule';\nimport accessorFn from 'accessor-fn';\nimport ColorTracker from 'canvas-color-tracker';\nimport { forceSimulation, forceLink, forceManyBody, forceCenter, forceRadial } from 'd3-force-3d';\nimport { Bezier } from 'bezier-js';\nimport indexBy from 'index-array-by';\nimport { scaleOrdinal } from 'd3-scale';\nimport { schemePaired } from 'd3-scale-chromatic';\n\nfunction styleInject(css, ref) {\n if (ref === void 0) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') {\n return;\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar css_248z = \".force-graph-container canvas {\\n display: block;\\n user-select: none;\\n outline: none;\\n -webkit-tap-highlight-color: transparent;\\n}\\n\\n.force-graph-container .graph-tooltip {\\n position: absolute;\\n transform: translate(-50%, 25px);\\n font-family: sans-serif;\\n font-size: 16px;\\n padding: 4px;\\n border-radius: 3px;\\n color: #eee;\\n background: rgba(0,0,0,0.65);\\n visibility: hidden; /* by default */\\n}\\n\\n.force-graph-container .clickable {\\n cursor: pointer;\\n}\\n\\n.force-graph-container .grabbable {\\n cursor: move;\\n cursor: grab;\\n cursor: -moz-grab;\\n cursor: -webkit-grab;\\n}\\n\\n.force-graph-container .grabbable:active {\\n cursor: grabbing;\\n cursor: -moz-grabbing;\\n cursor: -webkit-grabbing;\\n}\\n\";\nstyleInject(css_248z);\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nvar autoColorScale = scaleOrdinal(schemePaired); // Autoset attribute colorField by colorByAccessor property\n// If an object has already a color, don't set it\n// Objects can be nodes or links\n\nfunction autoColorObjects(objects, colorByAccessor, colorField) {\n if (!colorByAccessor || typeof colorField !== 'string') return;\n objects.filter(function (obj) {\n return !obj[colorField];\n }).forEach(function (obj) {\n obj[colorField] = autoColorScale(colorByAccessor(obj));\n });\n}\n\nfunction getDagDepths (_ref, idAccessor) {\n var nodes = _ref.nodes,\n links = _ref.links;\n\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n _ref2$nodeFilter = _ref2.nodeFilter,\n nodeFilter = _ref2$nodeFilter === void 0 ? function () {\n return true;\n } : _ref2$nodeFilter,\n _ref2$onLoopError = _ref2.onLoopError,\n onLoopError = _ref2$onLoopError === void 0 ? function (loopIds) {\n throw \"Invalid DAG structure! Found cycle in node path: \".concat(loopIds.join(' -> '), \".\");\n } : _ref2$onLoopError;\n\n // linked graph\n var graph = {};\n nodes.forEach(function (node) {\n return graph[idAccessor(node)] = {\n data: node,\n out: [],\n depth: -1,\n skip: !nodeFilter(node)\n };\n });\n links.forEach(function (_ref3) {\n var source = _ref3.source,\n target = _ref3.target;\n var sourceId = getNodeId(source);\n var targetId = getNodeId(target);\n if (!graph.hasOwnProperty(sourceId)) throw \"Missing source node with id: \".concat(sourceId);\n if (!graph.hasOwnProperty(targetId)) throw \"Missing target node with id: \".concat(targetId);\n var sourceNode = graph[sourceId];\n var targetNode = graph[targetId];\n sourceNode.out.push(targetNode);\n\n function getNodeId(node) {\n return _typeof(node) === 'object' ? idAccessor(node) : node;\n }\n });\n var foundLoops = [];\n traverse(Object.values(graph));\n var nodeDepths = Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.entries(graph).filter(function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 2),\n node = _ref5[1];\n\n return !node.skip;\n }).map(function (_ref6) {\n var _ref7 = _slicedToArray(_ref6, 2),\n id = _ref7[0],\n node = _ref7[1];\n\n return _defineProperty({}, id, node.depth);\n }))));\n return nodeDepths;\n\n function traverse(nodes) {\n var nodeStack = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var currentDepth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n\n if (nodeStack.indexOf(node) !== -1) {\n var _ret = function () {\n var loop = [].concat(_toConsumableArray(nodeStack.slice(nodeStack.indexOf(node))), [node]).map(function (d) {\n return idAccessor(d.data);\n });\n\n if (!foundLoops.some(function (foundLoop) {\n return foundLoop.length === loop.length && foundLoop.every(function (id, idx) {\n return id === loop[idx];\n });\n })) {\n foundLoops.push(loop);\n onLoopError(loop);\n }\n\n return \"continue\";\n }();\n\n if (_ret === \"continue\") continue;\n }\n\n if (currentDepth > node.depth) {\n // Don't unnecessarily revisit chunks of the graph\n node.depth = currentDepth;\n traverse(node.out, [].concat(_toConsumableArray(nodeStack), [node]), currentDepth + (node.skip ? 0 : 1));\n }\n }\n }\n}\n\nvar DAG_LEVEL_NODE_RATIO = 2; // whenever styling props are changed that require a canvas redraw\n\nvar notifyRedraw = function notifyRedraw(_, state) {\n return state.onNeedsRedraw && state.onNeedsRedraw();\n};\n\nvar CanvasForceGraph = Kapsule({\n props: {\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n },\n onChange: function onChange(_, state) {\n state.engineRunning = false;\n } // Pause simulation\n\n },\n dagMode: {\n onChange: function onChange(dagMode, state) {\n // td, bu, lr, rl, radialin, radialout\n !dagMode && (state.graphData.nodes || []).forEach(function (n) {\n return n.fx = n.fy = undefined;\n }); // unfix nodes when disabling dag mode\n }\n },\n dagLevelDistance: {},\n dagNodeFilter: {\n \"default\": function _default(node) {\n return true;\n }\n },\n onDagError: {\n triggerUpdate: false\n },\n nodeRelSize: {\n \"default\": 4,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n // area per val unit\n nodeId: {\n \"default\": 'id'\n },\n nodeVal: {\n \"default\": 'val',\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n nodeColor: {\n \"default\": 'color',\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n nodeAutoColorBy: {},\n nodeCanvasObject: {\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n nodeCanvasObjectMode: {\n \"default\": function _default() {\n return 'replace';\n },\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n nodeVisibility: {\n \"default\": true,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkSource: {\n \"default\": 'source'\n },\n linkTarget: {\n \"default\": 'target'\n },\n linkVisibility: {\n \"default\": true,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkColor: {\n \"default\": 'color',\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkAutoColorBy: {},\n linkLineDash: {\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkWidth: {\n \"default\": 1,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkCurvature: {\n \"default\": 0,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkCanvasObject: {\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkCanvasObjectMode: {\n \"default\": function _default() {\n return 'replace';\n },\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkDirectionalArrowLength: {\n \"default\": 0,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkDirectionalArrowColor: {\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n linkDirectionalArrowRelPos: {\n \"default\": 0.5,\n triggerUpdate: false,\n onChange: notifyRedraw\n },\n // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalParticles: {\n \"default\": 0\n },\n // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: {\n \"default\": 0.01,\n triggerUpdate: false\n },\n // in link length ratio per frame\n linkDirectionalParticleWidth: {\n \"default\": 4,\n triggerUpdate: false\n },\n linkDirectionalParticleColor: {\n triggerUpdate: false\n },\n globalScale: {\n \"default\": 1,\n triggerUpdate: false\n },\n d3AlphaMin: {\n \"default\": 0,\n triggerUpdate: false\n },\n d3AlphaDecay: {\n \"default\": 0.0228,\n triggerUpdate: false,\n onChange: function onChange(alphaDecay, state) {\n state.forceLayout.alphaDecay(alphaDecay);\n }\n },\n d3AlphaTarget: {\n \"default\": 0,\n triggerUpdate: false,\n onChange: function onChange(alphaTarget, state) {\n state.forceLayout.alphaTarget(alphaTarget);\n }\n },\n d3VelocityDecay: {\n \"default\": 0.4,\n triggerUpdate: false,\n onChange: function onChange(velocityDecay, state) {\n state.forceLayout.velocityDecay(velocityDecay);\n }\n },\n warmupTicks: {\n \"default\": 0,\n triggerUpdate: false\n },\n // how many times to tick the force engine at init before starting to render\n cooldownTicks: {\n \"default\": Infinity,\n triggerUpdate: false\n },\n cooldownTime: {\n \"default\": 15000,\n triggerUpdate: false\n },\n // ms\n onUpdate: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onFinishUpdate: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onEngineTick: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onEngineStop: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNeedsRedraw: {\n triggerUpdate: false\n },\n isShadow: {\n \"default\": false,\n triggerUpdate: false\n }\n },\n methods: {\n // Expose d3 forces for external manipulation\n d3Force: function d3Force(state, forceName, forceFn) {\n if (forceFn === undefined) {\n return state.forceLayout.force(forceName); // Force getter\n }\n\n state.forceLayout.force(forceName, forceFn); // Force setter\n\n return this;\n },\n d3ReheatSimulation: function d3ReheatSimulation(state) {\n state.forceLayout.alpha(1);\n this.resetCountdown();\n return this;\n },\n // reset cooldown state\n resetCountdown: function resetCountdown(state) {\n state.cntTicks = 0;\n state.startTickTime = new Date();\n state.engineRunning = true;\n return this;\n },\n isEngineRunning: function isEngineRunning(state) {\n return !!state.engineRunning;\n },\n tickFrame: function tickFrame(state) {\n !state.isShadow && layoutTick();\n paintLinks();\n !state.isShadow && paintArrows();\n !state.isShadow && paintPhotons();\n paintNodes();\n return this; //\n\n function layoutTick() {\n if (state.engineRunning) {\n if (++state.cntTicks > state.cooldownTicks || new Date() - state.startTickTime > state.cooldownTime || state.d3AlphaMin > 0 && state.forceLayout.alpha() < state.d3AlphaMin) {\n state.engineRunning = false; // Stop ticking graph\n\n state.onEngineStop();\n } else {\n state.forceLayout.tick(); // Tick it\n\n state.onEngineTick();\n }\n }\n }\n\n function paintNodes() {\n var getVisibility = accessorFn(state.nodeVisibility);\n var getVal = accessorFn(state.nodeVal);\n var getColor = accessorFn(state.nodeColor);\n var getNodeCanvasObjectMode = accessorFn(state.nodeCanvasObjectMode);\n var ctx = state.ctx; // Draw wider nodes by 1px on shadow canvas for more precise hovering (due to boundary anti-aliasing)\n\n var padAmount = state.isShadow / state.globalScale;\n var visibleNodes = state.graphData.nodes.filter(getVisibility);\n ctx.save();\n visibleNodes.forEach(function (node) {\n var nodeCanvasObjectMode = getNodeCanvasObjectMode(node);\n\n if (state.nodeCanvasObject && (nodeCanvasObjectMode === 'before' || nodeCanvasObjectMode === 'replace')) {\n // Custom node before/replace paint\n state.nodeCanvasObject(node, ctx, state.globalScale);\n\n if (nodeCanvasObjectMode === 'replace') {\n ctx.restore();\n return;\n }\n } // Draw wider nodes by 1px on shadow canvas for more precise hovering (due to boundary anti-aliasing)\n\n\n var r = Math.sqrt(Math.max(0, getVal(node) || 1)) * state.nodeRelSize + padAmount;\n ctx.beginPath();\n ctx.arc(node.x, node.y, r, 0, 2 * Math.PI, false);\n ctx.fillStyle = getColor(node) || 'rgba(31, 120, 180, 0.92)';\n ctx.fill();\n\n if (state.nodeCanvasObject && nodeCanvasObjectMode === 'after') {\n // Custom node after paint\n state.nodeCanvasObject(node, state.ctx, state.globalScale);\n }\n });\n ctx.restore();\n }\n\n function paintLinks() {\n var getVisibility = accessorFn(state.linkVisibility);\n var getColor = accessorFn(state.linkColor);\n var getWidth = accessorFn(state.linkWidth);\n var getLineDash = accessorFn(state.linkLineDash);\n var getCurvature = accessorFn(state.linkCurvature);\n var getLinkCanvasObjectMode = accessorFn(state.linkCanvasObjectMode);\n var ctx = state.ctx; // Draw wider lines by 2px on shadow canvas for more precise hovering (due to boundary anti-aliasing)\n\n var padAmount = state.isShadow * 2;\n var visibleLinks = state.graphData.links.filter(getVisibility);\n visibleLinks.forEach(calcLinkControlPoints); // calculate curvature control points for all visible links\n\n var beforeCustomLinks = [],\n afterCustomLinks = [],\n defaultPaintLinks = visibleLinks;\n\n if (state.linkCanvasObject) {\n var replaceCustomLinks = [],\n otherCustomLinks = [];\n visibleLinks.forEach(function (d) {\n return ({\n before: beforeCustomLinks,\n after: afterCustomLinks,\n replace: replaceCustomLinks\n }[getLinkCanvasObjectMode(d)] || otherCustomLinks).push(d);\n });\n defaultPaintLinks = [].concat(_toConsumableArray(beforeCustomLinks), afterCustomLinks, otherCustomLinks);\n beforeCustomLinks = beforeCustomLinks.concat(replaceCustomLinks);\n } // Custom link before paints\n\n\n ctx.save();\n beforeCustomLinks.forEach(function (link) {\n return state.linkCanvasObject(link, ctx, state.globalScale);\n });\n ctx.restore(); // Bundle strokes per unique color/width/dash for performance optimization\n\n var linksPerColor = indexBy(defaultPaintLinks, [getColor, getWidth, getLineDash]);\n ctx.save();\n Object.entries(linksPerColor).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n color = _ref2[0],\n linksPerWidth = _ref2[1];\n\n var lineColor = !color || color === 'undefined' ? 'rgba(0,0,0,0.15)' : color;\n Object.entries(linksPerWidth).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n width = _ref4[0],\n linesPerLineDash = _ref4[1];\n\n var lineWidth = (width || 1) / state.globalScale + padAmount;\n Object.entries(linesPerLineDash).forEach(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2);\n _ref6[0];\n var links = _ref6[1];\n\n var lineDashSegments = getLineDash(links[0]);\n ctx.beginPath();\n links.forEach(function (link) {\n var start = link.source;\n var end = link.target;\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n ctx.moveTo(start.x, start.y);\n var controlPoints = link.__controlPoints;\n\n if (!controlPoints) {\n // Straight line\n ctx.lineTo(end.x, end.y);\n } else {\n // Use quadratic curves for regular lines and bezier for loops\n ctx[controlPoints.length === 2 ? 'quadraticCurveTo' : 'bezierCurveTo'].apply(ctx, _toConsumableArray(controlPoints).concat([end.x, end.y]));\n }\n });\n ctx.strokeStyle = lineColor;\n ctx.lineWidth = lineWidth;\n ctx.setLineDash(lineDashSegments || []);\n ctx.stroke();\n });\n });\n });\n ctx.restore(); // Custom link after paints\n\n ctx.save();\n afterCustomLinks.forEach(function (link) {\n return state.linkCanvasObject(link, ctx, state.globalScale);\n });\n ctx.restore(); //\n\n function calcLinkControlPoints(link) {\n var curvature = getCurvature(link);\n\n if (!curvature) {\n // straight line\n link.__controlPoints = null;\n return;\n }\n\n var start = link.source;\n var end = link.target;\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var l = Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2)); // line length\n\n if (l > 0) {\n var a = Math.atan2(end.y - start.y, end.x - start.x); // line angle\n\n var d = l * curvature; // control point distance\n\n var cp = {\n // control point\n x: (start.x + end.x) / 2 + d * Math.cos(a - Math.PI / 2),\n y: (start.y + end.y) / 2 + d * Math.sin(a - Math.PI / 2)\n };\n link.__controlPoints = [cp.x, cp.y];\n } else {\n // Same point, draw a loop\n var _d = curvature * 70;\n\n link.__controlPoints = [end.x, end.y - _d, end.x + _d, end.y];\n }\n }\n }\n\n function paintArrows() {\n var ARROW_WH_RATIO = 1.6;\n var ARROW_VLEN_RATIO = 0.2;\n var getLength = accessorFn(state.linkDirectionalArrowLength);\n var getRelPos = accessorFn(state.linkDirectionalArrowRelPos);\n var getVisibility = accessorFn(state.linkVisibility);\n var getColor = accessorFn(state.linkDirectionalArrowColor || state.linkColor);\n var getNodeVal = accessorFn(state.nodeVal);\n var ctx = state.ctx;\n ctx.save();\n state.graphData.links.filter(getVisibility).forEach(function (link) {\n var arrowLength = getLength(link);\n if (!arrowLength || arrowLength < 0) return;\n var start = link.source;\n var end = link.target;\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var startR = Math.sqrt(Math.max(0, getNodeVal(start) || 1)) * state.nodeRelSize;\n var endR = Math.sqrt(Math.max(0, getNodeVal(end) || 1)) * state.nodeRelSize;\n var arrowRelPos = Math.min(1, Math.max(0, getRelPos(link)));\n var arrowColor = getColor(link) || 'rgba(0,0,0,0.28)';\n var arrowHalfWidth = arrowLength / ARROW_WH_RATIO / 2; // Construct bezier for curved lines\n\n var bzLine = link.__controlPoints && _construct(Bezier, [start.x, start.y].concat(_toConsumableArray(link.__controlPoints), [end.x, end.y]));\n\n var getCoordsAlongLine = bzLine ? function (t) {\n return bzLine.get(t);\n } // get position along bezier line\n : function (t) {\n return {\n // straight line: interpolate linearly\n x: start.x + (end.x - start.x) * t || 0,\n y: start.y + (end.y - start.y) * t || 0\n };\n };\n var lineLen = bzLine ? bzLine.length() : Math.sqrt(Math.pow(end.x - start.x, 2) + Math.pow(end.y - start.y, 2));\n var posAlongLine = startR + arrowLength + (lineLen - startR - endR - arrowLength) * arrowRelPos;\n var arrowHead = getCoordsAlongLine(posAlongLine / lineLen);\n var arrowTail = getCoordsAlongLine((posAlongLine - arrowLength) / lineLen);\n var arrowTailVertex = getCoordsAlongLine((posAlongLine - arrowLength * (1 - ARROW_VLEN_RATIO)) / lineLen);\n var arrowTailAngle = Math.atan2(arrowHead.y - arrowTail.y, arrowHead.x - arrowTail.x) - Math.PI / 2;\n ctx.beginPath();\n ctx.moveTo(arrowHead.x, arrowHead.y);\n ctx.lineTo(arrowTail.x + arrowHalfWidth * Math.cos(arrowTailAngle), arrowTail.y + arrowHalfWidth * Math.sin(arrowTailAngle));\n ctx.lineTo(arrowTailVertex.x, arrowTailVertex.y);\n ctx.lineTo(arrowTail.x - arrowHalfWidth * Math.cos(arrowTailAngle), arrowTail.y - arrowHalfWidth * Math.sin(arrowTailAngle));\n ctx.fillStyle = arrowColor;\n ctx.fill();\n });\n ctx.restore();\n }\n\n function paintPhotons() {\n var getNumPhotons = accessorFn(state.linkDirectionalParticles);\n var getSpeed = accessorFn(state.linkDirectionalParticleSpeed);\n var getDiameter = accessorFn(state.linkDirectionalParticleWidth);\n var getVisibility = accessorFn(state.linkVisibility);\n var getColor = accessorFn(state.linkDirectionalParticleColor || state.linkColor);\n var ctx = state.ctx;\n ctx.save();\n state.graphData.links.filter(getVisibility).forEach(function (link) {\n var numCyclePhotons = getNumPhotons(link);\n if (!link.hasOwnProperty('__photons') || !link.__photons.length) return;\n var start = link.source;\n var end = link.target;\n if (!start || !end || !start.hasOwnProperty('x') || !end.hasOwnProperty('x')) return; // skip invalid link\n\n var particleSpeed = getSpeed(link);\n var photons = link.__photons || [];\n var photonR = Math.max(0, getDiameter(link) / 2) / Math.sqrt(state.globalScale);\n var photonColor = getColor(link) || 'rgba(0,0,0,0.28)';\n ctx.fillStyle = photonColor; // Construct bezier for curved lines\n\n var bzLine = link.__controlPoints ? _construct(Bezier, [start.x, start.y].concat(_toConsumableArray(link.__controlPoints), [end.x, end.y])) : null;\n var cyclePhotonIdx = 0;\n var needsCleanup = false; // whether some photons need to be removed from list\n\n photons.forEach(function (photon) {\n var singleHop = !!photon.__singleHop;\n\n if (!photon.hasOwnProperty('__progressRatio')) {\n photon.__progressRatio = singleHop ? 0 : cyclePhotonIdx / numCyclePhotons;\n }\n\n !singleHop && cyclePhotonIdx++; // increase regular photon index\n\n photon.__progressRatio += particleSpeed;\n\n if (photon.__progressRatio >= 1) {\n if (!singleHop) {\n photon.__progressRatio = photon.__progressRatio % 1;\n } else {\n needsCleanup = true;\n return;\n }\n }\n\n var photonPosRatio = photon.__progressRatio;\n var coords = bzLine ? bzLine.get(photonPosRatio) // get position along bezier line\n : {\n // straight line: interpolate linearly\n x: start.x + (end.x - start.x) * photonPosRatio || 0,\n y: start.y + (end.y - start.y) * photonPosRatio || 0\n };\n ctx.beginPath();\n ctx.arc(coords.x, coords.y, photonR, 0, 2 * Math.PI, false);\n ctx.fill();\n });\n\n if (needsCleanup) {\n // remove expired single hop photons\n link.__photons = link.__photons.filter(function (photon) {\n return !photon.__singleHop || photon.__progressRatio <= 1;\n });\n }\n });\n ctx.restore();\n }\n },\n emitParticle: function emitParticle(state, link) {\n if (link) {\n !link.__photons && (link.__photons = []);\n\n link.__photons.push({\n __singleHop: true\n }); // add a single hop particle\n\n }\n\n return this;\n }\n },\n stateInit: function stateInit() {\n return {\n forceLayout: forceSimulation().force('link', forceLink()).force('charge', forceManyBody()).force('center', forceCenter()).force('dagRadial', null).stop(),\n engineRunning: false\n };\n },\n init: function init(canvasCtx, state) {\n // Main canvas object to manipulate\n state.ctx = canvasCtx;\n },\n update: function update(state) {\n state.engineRunning = false; // Pause simulation\n\n state.onUpdate();\n\n if (state.nodeAutoColorBy !== null) {\n // Auto add color to uncolored nodes\n autoColorObjects(state.graphData.nodes, accessorFn(state.nodeAutoColorBy), state.nodeColor);\n }\n\n if (state.linkAutoColorBy !== null) {\n // Auto add color to uncolored links\n autoColorObjects(state.graphData.links, accessorFn(state.linkAutoColorBy), state.linkColor);\n } // parse links\n\n\n state.graphData.links.forEach(function (link) {\n link.source = link[state.linkSource];\n link.target = link[state.linkTarget];\n });\n\n if (!state.isShadow) {\n // Add photon particles\n var linkParticlesAccessor = accessorFn(state.linkDirectionalParticles);\n state.graphData.links.forEach(function (link) {\n var numPhotons = Math.round(Math.abs(linkParticlesAccessor(link)));\n\n if (numPhotons) {\n link.__photons = _toConsumableArray(Array(numPhotons)).map(function () {\n return {};\n });\n } else {\n delete link.__photons;\n }\n });\n } // Feed data to force-directed layout\n\n\n state.forceLayout.stop().alpha(1) // re-heat the simulation\n .nodes(state.graphData.nodes); // add links (if link force is still active)\n\n var linkForce = state.forceLayout.force('link');\n\n if (linkForce) {\n linkForce.id(function (d) {\n return d[state.nodeId];\n }).links(state.graphData.links);\n } // setup dag force constraints\n\n\n var nodeDepths = state.dagMode && getDagDepths(state.graphData, function (node) {\n return node[state.nodeId];\n }, {\n nodeFilter: state.dagNodeFilter,\n onLoopError: state.onDagError || undefined\n });\n var maxDepth = Math.max.apply(Math, _toConsumableArray(Object.values(nodeDepths || [])));\n var dagLevelDistance = state.dagLevelDistance || state.graphData.nodes.length / (maxDepth || 1) * DAG_LEVEL_NODE_RATIO * (['radialin', 'radialout'].indexOf(state.dagMode) !== -1 ? 0.7 : 1); // Fix nodes to x,y for dag mode\n\n if (state.dagMode) {\n var getFFn = function getFFn(fix, invert) {\n return function (node) {\n return !fix ? undefined : (nodeDepths[node[state.nodeId]] - maxDepth / 2) * dagLevelDistance * (invert ? -1 : 1);\n };\n };\n\n var fxFn = getFFn(['lr', 'rl'].indexOf(state.dagMode) !== -1, state.dagMode === 'rl');\n var fyFn = getFFn(['td', 'bu'].indexOf(state.dagMode) !== -1, state.dagMode === 'bu');\n state.graphData.nodes.filter(state.dagNodeFilter).forEach(function (node) {\n node.fx = fxFn(node);\n node.fy = fyFn(node);\n });\n } // Use radial force for radial dags\n\n\n state.forceLayout.force('dagRadial', ['radialin', 'radialout'].indexOf(state.dagMode) !== -1 ? forceRadial(function (node) {\n var nodeDepth = nodeDepths[node[state.nodeId]] || -1;\n return (state.dagMode === 'radialin' ? maxDepth - nodeDepth : nodeDepth) * dagLevelDistance;\n }).strength(function (node) {\n return state.dagNodeFilter(node) ? 1 : 0;\n }) : null);\n\n for (var i = 0; i < state.warmupTicks && !(state.d3AlphaMin > 0 && state.forceLayout.alpha() < state.d3AlphaMin); i++) {\n state.forceLayout.tick();\n } // Initial ticks before starting to render\n\n\n this.resetCountdown();\n state.onFinishUpdate();\n }\n});\n\nfunction linkKapsule (kapsulePropNames, kapsuleType) {\n var propNames = kapsulePropNames instanceof Array ? kapsulePropNames : [kapsulePropNames];\n var dummyK = new kapsuleType(); // To extract defaults\n\n return {\n linkProp: function linkProp(prop) {\n // link property config\n return {\n \"default\": dummyK[prop](),\n onChange: function onChange(v, state) {\n propNames.forEach(function (propName) {\n return state[propName][prop](v);\n });\n },\n triggerUpdate: false\n };\n },\n linkMethod: function linkMethod(method) {\n // link method pass-through\n return function (state) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var returnVals = [];\n propNames.forEach(function (propName) {\n var kapsuleInstance = state[propName];\n var returnVal = kapsuleInstance[method].apply(kapsuleInstance, args);\n\n if (returnVal !== kapsuleInstance) {\n returnVals.push(returnVal);\n }\n });\n return returnVals.length ? returnVals[0] : this; // chain based on the parent object, not the inner kapsule\n };\n }\n };\n}\n\nvar HOVER_CANVAS_THROTTLE_DELAY = 800; // ms to throttle shadow canvas updates for perf improvement\n\nvar ZOOM2NODES_FACTOR = 4; // Expose config from forceGraph\n\nvar bindFG = linkKapsule('forceGraph', CanvasForceGraph);\nvar bindBoth = linkKapsule(['forceGraph', 'shadowGraph'], CanvasForceGraph);\nvar linkedProps = Object.assign.apply(Object, _toConsumableArray(['nodeColor', 'nodeAutoColorBy', 'nodeCanvasObject', 'nodeCanvasObjectMode', 'linkColor', 'linkAutoColorBy', 'linkLineDash', 'linkWidth', 'linkCanvasObject', 'linkCanvasObjectMode', 'linkDirectionalArrowLength', 'linkDirectionalArrowColor', 'linkDirectionalArrowRelPos', 'linkDirectionalParticles', 'linkDirectionalParticleSpeed', 'linkDirectionalParticleWidth', 'linkDirectionalParticleColor', 'dagMode', 'dagLevelDistance', 'dagNodeFilter', 'onDagError', 'd3AlphaMin', 'd3AlphaDecay', 'd3VelocityDecay', 'warmupTicks', 'cooldownTicks', 'cooldownTime', 'onEngineTick', 'onEngineStop'].map(function (p) {\n return _defineProperty({}, p, bindFG.linkProp(p));\n})).concat(_toConsumableArray(['nodeRelSize', 'nodeId', 'nodeVal', 'nodeVisibility', 'linkSource', 'linkTarget', 'linkVisibility', 'linkCurvature'].map(function (p) {\n return _defineProperty({}, p, bindBoth.linkProp(p));\n}))));\nvar linkedMethods = Object.assign.apply(Object, _toConsumableArray(['d3Force', 'd3ReheatSimulation', 'emitParticle'].map(function (p) {\n return _defineProperty({}, p, bindFG.linkMethod(p));\n})));\n\nfunction adjustCanvasSize(state) {\n if (state.canvas) {\n var curWidth = state.canvas.width;\n var curHeight = state.canvas.height;\n\n if (curWidth === 300 && curHeight === 150) {\n // Default canvas dimensions\n curWidth = curHeight = 0;\n }\n\n var pxScale = window.devicePixelRatio; // 2 on retina displays\n\n curWidth /= pxScale;\n curHeight /= pxScale; // Resize canvases\n\n [state.canvas, state.shadowCanvas].forEach(function (canvas) {\n // Element size\n canvas.style.width = \"\".concat(state.width, \"px\");\n canvas.style.height = \"\".concat(state.height, \"px\"); // Memory size (scaled to avoid blurriness)\n\n canvas.width = state.width * pxScale;\n canvas.height = state.height * pxScale; // Normalize coordinate system to use css pixels (on init only)\n\n if (!curWidth && !curHeight) {\n canvas.getContext('2d').scale(pxScale, pxScale);\n }\n }); // Relative center panning based on 0,0\n\n var k = zoomTransform(state.canvas).k;\n state.zoom.translateBy(state.zoom.__baseElem, (state.width - curWidth) / 2 / k, (state.height - curHeight) / 2 / k);\n state.needsRedraw = true;\n }\n}\n\nfunction resetTransform(ctx) {\n var pxRatio = window.devicePixelRatio;\n ctx.setTransform(pxRatio, 0, 0, pxRatio, 0, 0);\n}\n\nfunction clearCanvas(ctx, width, height) {\n ctx.save();\n resetTransform(ctx); // reset transform\n\n ctx.clearRect(0, 0, width, height);\n ctx.restore(); //restore transforms\n} //\n\n\nvar forceGraph = Kapsule({\n props: _objectSpread2({\n width: {\n \"default\": window.innerWidth,\n onChange: function onChange(_, state) {\n return adjustCanvasSize(state);\n },\n triggerUpdate: false\n },\n height: {\n \"default\": window.innerHeight,\n onChange: function onChange(_, state) {\n return adjustCanvasSize(state);\n },\n triggerUpdate: false\n },\n graphData: {\n \"default\": {\n nodes: [],\n links: []\n },\n onChange: function onChange(d, state) {\n [{\n type: 'Node',\n objs: d.nodes\n }, {\n type: 'Link',\n objs: d.links\n }].forEach(hexIndex);\n state.forceGraph.graphData(d);\n state.shadowGraph.graphData(d);\n\n function hexIndex(_ref4) {\n var type = _ref4.type,\n objs = _ref4.objs;\n objs.filter(function (d) {\n if (!d.hasOwnProperty('__indexColor')) return true;\n var cur = state.colorTracker.lookup(d.__indexColor);\n return !cur || !cur.hasOwnProperty('d') || cur.d !== d;\n }).forEach(function (d) {\n // store object lookup color\n d.__indexColor = state.colorTracker.register({\n type: type,\n d: d\n });\n });\n }\n },\n triggerUpdate: false\n },\n backgroundColor: {\n onChange: function onChange(color, state) {\n state.canvas && color && (state.canvas.style.background = color);\n },\n triggerUpdate: false\n },\n nodeLabel: {\n \"default\": 'name',\n triggerUpdate: false\n },\n nodePointerAreaPaint: {\n onChange: function onChange(paintFn, state) {\n state.shadowGraph.nodeCanvasObject(!paintFn ? null : function (node, ctx, globalScale) {\n return paintFn(node, node.__indexColor, ctx, globalScale);\n });\n },\n triggerUpdate: false\n },\n linkPointerAreaPaint: {\n onChange: function onChange(paintFn, state) {\n state.shadowGraph.linkCanvasObject(!paintFn ? null : function (link, ctx, globalScale) {\n return paintFn(link, link.__indexColor, ctx, globalScale);\n });\n },\n triggerUpdate: false\n },\n linkLabel: {\n \"default\": 'name',\n triggerUpdate: false\n },\n linkHoverPrecision: {\n \"default\": 4,\n triggerUpdate: false\n },\n minZoom: {\n \"default\": 0.01,\n onChange: function onChange(minZoom, state) {\n state.zoom.scaleExtent([minZoom, state.zoom.scaleExtent()[1]]);\n },\n triggerUpdate: false\n },\n maxZoom: {\n \"default\": 1000,\n onChange: function onChange(maxZoom, state) {\n state.zoom.scaleExtent([state.zoom.scaleExtent()[0], maxZoom]);\n },\n triggerUpdate: false\n },\n enableNodeDrag: {\n \"default\": true,\n triggerUpdate: false\n },\n enableZoomInteraction: {\n \"default\": true,\n triggerUpdate: false\n },\n enablePanInteraction: {\n \"default\": true,\n triggerUpdate: false\n },\n enableZoomPanInteraction: {\n \"default\": true,\n triggerUpdate: false\n },\n // to be deprecated\n enablePointerInteraction: {\n \"default\": true,\n onChange: function onChange(_, state) {\n state.hoverObj = null;\n },\n triggerUpdate: false\n },\n autoPauseRedraw: {\n \"default\": true,\n triggerUpdate: false\n },\n onNodeDrag: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNodeDragEnd: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onNodeClick: {\n triggerUpdate: false\n },\n onNodeRightClick: {\n triggerUpdate: false\n },\n onNodeHover: {\n triggerUpdate: false\n },\n onLinkClick: {\n triggerUpdate: false\n },\n onLinkRightClick: {\n triggerUpdate: false\n },\n onLinkHover: {\n triggerUpdate: false\n },\n onBackgroundClick: {\n triggerUpdate: false\n },\n onBackgroundRightClick: {\n triggerUpdate: false\n },\n onZoom: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onZoomEnd: {\n \"default\": function _default() {},\n triggerUpdate: false\n },\n onRenderFramePre: {\n triggerUpdate: false\n },\n onRenderFramePost: {\n triggerUpdate: false\n }\n }, linkedProps),\n aliases: {\n // Prop names supported for backwards compatibility\n stopAnimation: 'pauseAnimation'\n },\n methods: _objectSpread2({\n graph2ScreenCoords: function graph2ScreenCoords(state, x, y) {\n var t = zoomTransform(state.canvas);\n return {\n x: x * t.k + t.x,\n y: y * t.k + t.y\n };\n },\n screen2GraphCoords: function screen2GraphCoords(state, x, y) {\n var t = zoomTransform(state.canvas);\n return {\n x: (x - t.x) / t.k,\n y: (y - t.y) / t.k\n };\n },\n centerAt: function centerAt(state, x, y, transitionDuration) {\n if (!state.canvas) return null; // no canvas yet\n // setter\n\n if (x !== undefined || y !== undefined) {\n var finalPos = Object.assign({}, x !== undefined ? {\n x: x\n } : {}, y !== undefined ? {\n y: y\n } : {});\n\n if (!transitionDuration) {\n // no animation\n setCenter(finalPos);\n } else {\n new TWEEN.Tween(getCenter()).to(finalPos, transitionDuration).easing(TWEEN.Easing.Quadratic.Out).onUpdate(setCenter).start();\n }\n\n return this;\n } // getter\n\n\n return getCenter(); //\n\n function getCenter() {\n var t = zoomTransform(state.canvas);\n return {\n x: (state.width / 2 - t.x) / t.k,\n y: (state.height / 2 - t.y) / t.k\n };\n }\n\n function setCenter(_ref5) {\n var x = _ref5.x,\n y = _ref5.y;\n state.zoom.translateTo(state.zoom.__baseElem, x === undefined ? getCenter().x : x, y === undefined ? getCenter().y : y);\n state.needsRedraw = true;\n }\n },\n zoom: function zoom(state, k, transitionDuration) {\n if (!state.canvas) return null; // no canvas yet\n // setter\n\n if (k !== undefined) {\n if (!transitionDuration) {\n // no animation\n setZoom(k);\n } else {\n new TWEEN.Tween({\n k: getZoom()\n }).to({\n k: k\n }, transitionDuration).easing(TWEEN.Easing.Quadratic.Out).onUpdate(function (_ref6) {\n var k = _ref6.k;\n return setZoom(k);\n }).start();\n }\n\n return this;\n } // getter\n\n\n return getZoom(); //\n\n function getZoom() {\n return zoomTransform(state.canvas).k;\n }\n\n function setZoom(k) {\n state.zoom.scaleTo(state.zoom.__baseElem, k);\n state.needsRedraw = true;\n }\n },\n zoomToFit: function zoomToFit(state) {\n var transitionDuration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;\n\n for (var _len = arguments.length, bboxArgs = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n bboxArgs[_key - 3] = arguments[_key];\n }\n\n var bbox = this.getGraphBbox.apply(this, bboxArgs);\n\n if (bbox) {\n var center = {\n x: (bbox.x[0] + bbox.x[1]) / 2,\n y: (bbox.y[0] + bbox.y[1]) / 2\n };\n var zoomK = Math.max(1e-12, Math.min(1e12, (state.width - padding * 2) / (bbox.x[1] - bbox.x[0]), (state.height - padding * 2) / (bbox.y[1] - bbox.y[0])));\n this.centerAt(center.x, center.y, transitionDuration);\n this.zoom(zoomK, transitionDuration);\n }\n\n return this;\n },\n getGraphBbox: function getGraphBbox(state) {\n var nodeFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {\n return true;\n };\n var getVal = accessorFn(state.nodeVal);\n\n var getR = function getR(node) {\n return Math.sqrt(Math.max(0, getVal(node) || 1)) * state.nodeRelSize;\n };\n\n var nodesPos = state.graphData.nodes.filter(nodeFilter).map(function (node) {\n return {\n x: node.x,\n y: node.y,\n r: getR(node)\n };\n });\n return !nodesPos.length ? null : {\n x: [min(nodesPos, function (node) {\n return node.x - node.r;\n }), max(nodesPos, function (node) {\n return node.x + node.r;\n })],\n y: [min(nodesPos, function (node) {\n return node.y - node.r;\n }), max(nodesPos, function (node) {\n return node.y + node.r;\n })]\n };\n },\n pauseAnimation: function pauseAnimation(state) {\n if (state.animationFrameRequestId) {\n cancelAnimationFrame(state.animationFrameRequestId);\n state.animationFrameRequestId = null;\n }\n\n return this;\n },\n resumeAnimation: function resumeAnimation(state) {\n if (!state.animationFrameRequestId) {\n this._animationCycle();\n }\n\n return this;\n },\n _destructor: function _destructor() {\n this.pauseAnimation();\n this.graphData({\n nodes: [],\n links: []\n });\n }\n }, linkedMethods),\n stateInit: function stateInit() {\n return {\n lastSetZoom: 1,\n zoom: zoom(),\n forceGraph: new CanvasForceGraph(),\n shadowGraph: new CanvasForceGraph().cooldownTicks(0).nodeColor('__indexColor').linkColor('__indexColor').isShadow(true),\n colorTracker: new ColorTracker() // indexed objects for rgb lookup\n\n };\n },\n init: function init(domNode, state) {\n // Wipe DOM\n domNode.innerHTML = ''; // Container anchor for canvas and tooltip\n\n var container = document.createElement('div');\n container.classList.add('force-graph-container');\n container.style.position = 'relative';\n domNode.appendChild(container);\n state.canvas = document.createElement('canvas');\n if (state.backgroundColor) state.canvas.style.background = state.backgroundColor;\n container.appendChild(state.canvas);\n state.shadowCanvas = document.createElement('canvas'); // Show shadow canvas\n //state.shadowCanvas.style.position = 'absolute';\n //state.shadowCanvas.style.top = '0';\n //state.shadowCanvas.style.left = '0';\n //container.appendChild(state.shadowCanvas);\n\n var ctx = state.canvas.getContext('2d');\n var shadowCtx = state.shadowCanvas.getContext('2d');\n var pointerPos = {\n x: -1e12,\n y: -1e12\n };\n\n var getObjUnderPointer = function getObjUnderPointer() {\n var obj = null;\n var pxScale = window.devicePixelRatio;\n var px = pointerPos.x > 0 && pointerPos.y > 0 ? shadowCtx.getImageData(pointerPos.x * pxScale, pointerPos.y * pxScale, 1, 1) : null; // Lookup object per pixel color\n\n px && (obj = state.colorTracker.lookup(px.data));\n return obj;\n }; // Setup node drag interaction\n\n\n select(state.canvas).call(drag().subject(function () {\n if (!state.enableNodeDrag) {\n return null;\n }\n\n var obj = getObjUnderPointer();\n return obj && obj.type === 'Node' ? obj.d : null; // Only drag nodes\n }).on('start', function (ev) {\n var obj = ev.subject;\n obj.__initialDragPos = {\n x: obj.x,\n y: obj.y,\n fx: obj.fx,\n fy: obj.fy\n }; // keep engine running at low intensity throughout drag\n\n if (!ev.active) {\n obj.fx = obj.x;\n obj.fy = obj.y; // Fix points\n } // drag cursor\n\n\n state.canvas.classList.add('grabbable');\n }).on('drag', function (ev) {\n var obj = ev.subject;\n var initPos = obj.__initialDragPos;\n var dragPos = ev;\n var k = zoomTransform(state.canvas).k;\n var translate = {\n x: initPos.x + (dragPos.x - initPos.x) / k - obj.x,\n y: initPos.y + (dragPos.y - initPos.y) / k - obj.y\n }; // Move fx/fy (and x/y) of nodes based on the scaled drag distance since the drag start\n\n ['x', 'y'].forEach(function (c) {\n return obj[\"f\".concat(c)] = obj[c] = initPos[c] + (dragPos[c] - initPos[c]) / k;\n }); // prevent freeze while dragging\n\n state.forceGraph.d3AlphaTarget(0.3) // keep engine running at low intensity throughout drag\n .resetCountdown(); // prevent freeze while dragging\n\n state.isPointerDragging = true;\n obj.__dragged = true;\n state.onNodeDrag(obj, translate);\n }).on('end', function (ev) {\n var obj = ev.subject;\n var initPos = obj.__initialDragPos;\n var translate = {\n x: obj.x - initPos.x,\n y: obj.y - initPos.y\n };\n\n if (initPos.fx === undefined) {\n obj.fx = undefined;\n }\n\n if (initPos.fy === undefined) {\n obj.fy = undefined;\n }\n\n delete obj.__initialDragPos;\n state.forceGraph.d3AlphaTarget(0) // release engine low intensity\n .resetCountdown(); // let the engine readjust after releasing fixed nodes\n // drag cursor\n\n state.canvas.classList.remove('grabbable');\n state.isPointerDragging = false;\n\n if (obj.__dragged) {\n delete obj.__dragged;\n state.onNodeDragEnd(obj, translate);\n }\n })); // Setup zoom / pan interaction\n\n state.zoom(state.zoom.__baseElem = select(state.canvas)); // Attach controlling elem for easy access\n\n state.zoom.__baseElem.on('dblclick.zoom', null); // Disable double-click to zoom\n\n\n state.zoom.filter(function (ev) {\n return (// disable zoom interaction\n !ev.button && state.enableZoomPanInteraction && (state.enableZoomInteraction || ev.type !== 'wheel') && (state.enablePanInteraction || ev.type === 'wheel')\n );\n }).on('zoom', function (ev) {\n var t = ev.transform;\n [ctx, shadowCtx].forEach(function (c) {\n resetTransform(c);\n c.translate(t.x, t.y);\n c.scale(t.k, t.k);\n });\n state.onZoom(_objectSpread2({}, t));\n state.needsRedraw = true;\n }).on('end', function (ev) {\n return state.onZoomEnd(_objectSpread2({}, ev.transform));\n });\n adjustCanvasSize(state);\n state.forceGraph.onNeedsRedraw(function () {\n return state.needsRedraw = true;\n }).onFinishUpdate(function () {\n // re-zoom, if still in default position (not user modified)\n if (zoomTransform(state.canvas).k === state.lastSetZoom && state.graphData.nodes.length) {\n state.zoom.scaleTo(state.zoom.__baseElem, state.lastSetZoom = ZOOM2NODES_FACTOR / Math.cbrt(state.graphData.nodes.length));\n state.needsRedraw = true;\n }\n }); // Setup tooltip\n\n var toolTipElem = document.createElement('div');\n toolTipElem.classList.add('graph-tooltip');\n container.appendChild(toolTipElem); // Capture pointer coords on move or touchstart\n\n ['pointermove', 'pointerdown'].forEach(function (evType) {\n return container.addEventListener(evType, function (ev) {\n if (evType === 'pointerdown') {\n state.isPointerPressed = true; // track click state\n\n state.pointerDownEvent = ev;\n } // detect pointer drag on canvas pan\n\n\n !state.isPointerDragging && ev.type === 'pointermove' && state.onBackgroundClick // only bother detecting drags this way if background clicks are enabled (so they don't trigger accidentally on canvas panning)\n && (ev.pressure > 0 || state.isPointerPressed) // ev.pressure always 0 on Safari, so we use the isPointerPressed tracker\n && (ev.pointerType !== 'touch' || ev.movementX === undefined || [ev.movementX, ev.movementY].some(function (m) {\n return Math.abs(m) > 1;\n })) // relax drag trigger sensitivity on touch events\n && (state.isPointerDragging = true); // update the pointer pos\n\n var offset = getOffset(container);\n pointerPos.x = ev.pageX - offset.left;\n pointerPos.y = ev.pageY - offset.top; // Move tooltip\n\n toolTipElem.style.top = \"\".concat(pointerPos.y, \"px\");\n toolTipElem.style.left = \"\".concat(pointerPos.x, \"px\"); //\n\n function getOffset(el) {\n var rect = el.getBoundingClientRect(),\n scrollLeft = window.pageXOffset || document.documentElement.scrollLeft,\n scrollTop = window.pageYOffset || document.documentElement.scrollTop;\n return {\n top: rect.top + scrollTop,\n left: rect.left + scrollLeft\n };\n }\n }, {\n passive: true\n });\n }); // Handle click/touch events on nodes/links\n\n container.addEventListener('pointerup', function (ev) {\n state.isPointerPressed = false;\n\n if (state.isPointerDragging) {\n state.isPointerDragging = false;\n return; // don't trigger click events after pointer drag (pan / node drag functionality)\n }\n\n var cbEvents = [ev, state.pointerDownEvent];\n requestAnimationFrame(function () {\n // trigger click events asynchronously, to allow hoverObj to be set (on frame)\n if (ev.button === 0) {\n // mouse left-click or touch\n if (state.hoverObj) {\n var fn = state[\"on\".concat(state.hoverObj.type, \"Click\")];\n fn && fn.apply(void 0, [state.hoverObj.d].concat(cbEvents));\n } else {\n state.onBackgroundClick && state.onBackgroundClick.apply(state, cbEvents);\n }\n }\n\n if (ev.button === 2) {\n // mouse right-click\n if (state.hoverObj) {\n var _fn = state[\"on\".concat(state.hoverObj.type, \"RightClick\")];\n _fn && _fn.apply(void 0, [state.hoverObj.d].concat(cbEvents));\n } else {\n state.onBackgroundRightClick && state.onBackgroundRightClick.apply(state, cbEvents);\n }\n }\n });\n }, {\n passive: true\n });\n container.addEventListener('contextmenu', function (ev) {\n if (!state.onBackgroundRightClick && !state.onNodeRightClick && !state.onLinkRightClick) return true; // default contextmenu behavior\n\n ev.preventDefault();\n return false;\n });\n state.forceGraph(ctx);\n state.shadowGraph(shadowCtx); //\n\n var refreshShadowCanvas = throttle(function () {\n // wipe canvas\n clearCanvas(shadowCtx, state.width, state.height); // Adjust link hover area\n\n state.shadowGraph.linkWidth(function (l) {\n return accessorFn(state.linkWidth)(l) + state.linkHoverPrecision;\n }); // redraw\n\n var t = zoomTransform(state.canvas);\n state.shadowGraph.globalScale(t.k).tickFrame();\n }, HOVER_CANVAS_THROTTLE_DELAY); // Kick-off renderer\n\n (this._animationCycle = function animate() {\n // IIFE\n var doRedraw = !state.autoPauseRedraw || !!state.needsRedraw || state.forceGraph.isEngineRunning() || state.graphData.links.some(function (d) {\n return d.__photons && d.__photons.length;\n });\n state.needsRedraw = false;\n\n if (state.enablePointerInteraction) {\n // Update tooltip and trigger onHover events\n var obj = !state.isPointerDragging ? getObjUnderPointer() : null; // don't hover during drag\n\n if (obj !== state.hoverObj) {\n var prevObj = state.hoverObj;\n var prevObjType = prevObj ? prevObj.type : null;\n var objType = obj ? obj.type : null;\n\n if (prevObjType && prevObjType !== objType) {\n // Hover out\n var fn = state[\"on\".concat(prevObjType, \"Hover\")];\n fn && fn(null, prevObj.d);\n }\n\n if (objType) {\n // Hover in\n var _fn2 = state[\"on\".concat(objType, \"Hover\")];\n _fn2 && _fn2(obj.d, prevObjType === objType ? prevObj.d : null);\n }\n\n var tooltipContent = obj ? accessorFn(state[\"\".concat(obj.type.toLowerCase(), \"Label\")])(obj.d) || '' : '';\n toolTipElem.style.visibility = tooltipContent ? 'visible' : 'hidden';\n toolTipElem.innerHTML = tooltipContent; // set pointer if hovered object is clickable\n\n state.canvas.classList[obj && state[\"on\".concat(objType, \"Click\")] || !obj && state.onBackgroundClick ? 'add' : 'remove']('clickable');\n state.hoverObj = obj;\n }\n\n doRedraw && refreshShadowCanvas();\n }\n\n if (doRedraw) {\n // Wipe canvas\n clearCanvas(ctx, state.width, state.height); // Frame cycle\n\n var globalScale = zoomTransform(state.canvas).k;\n state.onRenderFramePre && state.onRenderFramePre(ctx, globalScale);\n state.forceGraph.globalScale(globalScale).tickFrame();\n state.onRenderFramePost && state.onRenderFramePost(ctx, globalScale);\n }\n\n TWEEN.update(); // update canvas animation tweens\n\n state.animationFrameRequestId = requestAnimationFrame(animate);\n })();\n },\n update: function updateFn(state) {}\n});\n\nexport default forceGraph;\n","import fromKapsule from 'react-kapsule';\nimport ForceGraphVRKapsule from '3d-force-graph-vr';\nimport PropTypes from 'prop-types';\nimport ForceGraphARKapsule from '3d-force-graph-ar';\nimport ForceGraph3DKapsule from '3d-force-graph';\nimport ForceGraph2DKapsule from 'force-graph';\n\nvar commonPropTypes = {\n width: PropTypes.number,\n height: PropTypes.number,\n graphData: PropTypes.shape({\n nodes: PropTypes.arrayOf(PropTypes.object).isRequired,\n links: PropTypes.arrayOf(PropTypes.object).isRequired\n }),\n backgroundColor: PropTypes.string,\n nodeRelSize: PropTypes.number,\n nodeId: PropTypes.string,\n nodeLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n nodeVal: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n nodeVisibility: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),\n nodeColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n nodeAutoColorBy: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n onNodeHover: PropTypes.func,\n onNodeClick: PropTypes.func,\n linkSource: PropTypes.string,\n linkTarget: PropTypes.string,\n linkLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkVisibility: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),\n linkColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkAutoColorBy: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkCurvature: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalArrowLength: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalArrowColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkDirectionalArrowRelPos: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalParticles: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalParticleSpeed: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalParticleWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkDirectionalParticleColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n onLinkHover: PropTypes.func,\n onLinkClick: PropTypes.func,\n dagMode: PropTypes.oneOf(['td', 'bu', 'lr', 'rl', 'zin', 'zout', 'radialin', 'radialout']),\n dagLevelDistance: PropTypes.number,\n dagNodeFilter: PropTypes.func,\n onDagError: PropTypes.func,\n d3AlphaMin: PropTypes.number,\n d3AlphaDecay: PropTypes.number,\n d3VelocityDecay: PropTypes.number,\n warmupTicks: PropTypes.number,\n cooldownTicks: PropTypes.number,\n cooldownTime: PropTypes.number,\n onEngineTick: PropTypes.func,\n onEngineStop: PropTypes.func,\n getGraphBbox: PropTypes.func\n};\nvar pointerBasedPropTypes = {\n zoomToFit: PropTypes.func,\n onNodeRightClick: PropTypes.func,\n onNodeDrag: PropTypes.func,\n onNodeDragEnd: PropTypes.func,\n onLinkRightClick: PropTypes.func,\n linkHoverPrecision: PropTypes.number,\n onBackgroundClick: PropTypes.func,\n onBackgroundRightClick: PropTypes.func,\n enablePointerInteraction: PropTypes.bool,\n enableNodeDrag: PropTypes.bool\n};\nvar threeBasedPropTypes = {\n showNavInfo: PropTypes.bool,\n nodeOpacity: PropTypes.number,\n nodeResolution: PropTypes.number,\n nodeThreeObject: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),\n nodeThreeObjectExtend: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),\n linkOpacity: PropTypes.number,\n linkResolution: PropTypes.number,\n linkCurveRotation: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),\n linkMaterial: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),\n linkThreeObject: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),\n linkThreeObjectExtend: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),\n linkPositionUpdate: PropTypes.func,\n linkDirectionalArrowResolution: PropTypes.number,\n linkDirectionalParticleResolution: PropTypes.number,\n forceEngine: PropTypes.oneOf(['d3', 'ngraph']),\n ngraphPhysics: PropTypes.object,\n numDimensions: PropTypes.oneOf([1, 2, 3])\n};\nvar ForceGraph2DPropTypes = Object.assign({}, commonPropTypes, pointerBasedPropTypes, {\n linkLineDash: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.string, PropTypes.func]),\n nodeCanvasObjectMode: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n nodeCanvasObject: PropTypes.func,\n nodePointerAreaPaint: PropTypes.func,\n linkCanvasObjectMode: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkCanvasObject: PropTypes.func,\n linkPointerAreaPaint: PropTypes.func,\n autoPauseRedraw: PropTypes.bool,\n minZoom: PropTypes.number,\n maxZoom: PropTypes.number,\n enableZoomInteraction: PropTypes.bool,\n enablePanInteraction: PropTypes.bool,\n onZoom: PropTypes.func,\n onZoomEnd: PropTypes.func,\n onRenderFramePre: PropTypes.func,\n onRenderFramePost: PropTypes.func\n});\nvar ForceGraph3DPropTypes = Object.assign({}, commonPropTypes, pointerBasedPropTypes, threeBasedPropTypes, {\n enableNavigationControls: PropTypes.bool,\n controlType: PropTypes.oneOf(['trackball', 'orbit', 'fly']),\n rendererConfig: PropTypes.object,\n extraRenderers: PropTypes.arrayOf(PropTypes.shape({\n render: PropTypes.func.isRequired\n }))\n});\nvar ForceGraphVRPropTypes = Object.assign({}, commonPropTypes, threeBasedPropTypes, {\n nodeDesc: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n linkDesc: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n});\nvar ForceGraphARPropTypes = Object.assign({}, commonPropTypes, threeBasedPropTypes, {\n markerAttrs: PropTypes.object,\n yOffset: PropTypes.number,\n glScale: PropTypes.number\n});\n\nconst ForceGraphVR = fromKapsule(ForceGraphVRKapsule, {\n methodNames: [// bind methods\n 'getGraphBbox', 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'refresh']\n});\nForceGraphVR.displayName = 'ForceGraphVR';\nForceGraphVR.propTypes = ForceGraphVRPropTypes;\n\nconst ForceGraphAR = fromKapsule(ForceGraphARKapsule, {\n methodNames: [// bind methods\n 'getGraphBbox', 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'refresh'],\n initPropNames: ['markerAttrs']\n});\nForceGraphAR.displayName = 'ForceGraphAR';\nForceGraphAR.propTypes = ForceGraphARPropTypes;\n\nconst ForceGraph3D = fromKapsule(ForceGraph3DKapsule, {\n methodNames: [// bind methods\n 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'stopAnimation', 'pauseAnimation', 'resumeAnimation', 'cameraPosition', 'zoomToFit', 'getGraphBbox', 'screen2GraphCoords', 'graph2ScreenCoords', 'postProcessingComposer', 'scene', 'camera', 'renderer', 'controls', 'refresh'],\n initPropNames: ['controlType', 'rendererConfig', 'extraRenderers']\n});\nForceGraph3D.displayName = 'ForceGraph3D';\nForceGraph3D.propTypes = ForceGraph3DPropTypes;\n\nconst ForceGraph2D = fromKapsule(ForceGraph2DKapsule, {\n methodNames: [// bind methods\n 'emitParticle', 'd3Force', 'd3ReheatSimulation', 'stopAnimation', 'pauseAnimation', 'resumeAnimation', 'centerAt', 'zoom', 'zoomToFit', 'getGraphBbox', 'screen2GraphCoords', 'graph2ScreenCoords']\n});\nForceGraph2D.displayName = 'ForceGraph2D';\nForceGraph2D.propTypes = ForceGraph2DPropTypes;\n\nexport { ForceGraph2D, ForceGraph3D, ForceGraphAR, ForceGraphVR };\n","// These styles need to be nested in a transform array\nconst TRANSFORM_STYLE_PROPERTIES = [\n 'perspective',\n 'rotate',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'scale',\n 'scaleX',\n 'scaleY',\n 'skewX',\n 'skewY',\n 'translateX',\n 'translateY',\n];\n\n// Transforms { translateX: 1 } to { transform: [{ translateX: 1 }]}\nexport default function wrapStyleTransforms(style) {\n const wrapped = {};\n Object.keys(style).forEach(key => {\n if (TRANSFORM_STYLE_PROPERTIES.indexOf(key) !== -1) {\n if (!wrapped.transform) {\n wrapped.transform = [];\n }\n wrapped.transform.push({\n [key]: style[key],\n });\n } else {\n wrapped[key] = style[key];\n }\n });\n return wrapped;\n}\n","import { StyleSheet } from 'react-native';\n\nexport default function flattenStyle(style) {\n const flatStyle = Object.assign({}, StyleSheet.flatten(style));\n if (flatStyle.transform) {\n flatStyle.transform.forEach(transform => {\n const key = Object.keys(transform)[0];\n flatStyle[key] = transform[key];\n });\n delete flatStyle.transform;\n }\n return flatStyle;\n}\n","/* eslint-disable no-plusplus */\n\nconst DIRECTIONAL_FALLBACKS = {\n Top: ['Vertical', ''],\n Bottom: ['Vertical', ''],\n Vertical: [''],\n Left: ['Horizontal', ''],\n Right: ['Horizontal', ''],\n Horizontal: [''],\n};\n\nconst DIRECTIONAL_SUFFICES = Object.keys(DIRECTIONAL_FALLBACKS);\n\nexport default function getDefaultStyleValue(key, flatStyle) {\n if (key === 'backgroundColor') {\n return 'rgba(0,0,0,0)';\n }\n if (key === 'color' || key.indexOf('Color') !== -1) {\n return 'rgba(0,0,0,1)';\n }\n if (key.indexOf('rotate') === 0 || key.indexOf('skew') === 0) {\n return '0deg';\n }\n if (key === 'opacity' || key.indexOf('scale') === 0) {\n return 1;\n }\n if (key === 'fontSize') {\n return 14;\n }\n if (key.indexOf('margin') === 0 || key.indexOf('padding') === 0) {\n for (let suffix, i = 0; i < DIRECTIONAL_SUFFICES.length; i++) {\n suffix = DIRECTIONAL_SUFFICES[i];\n if (key.substr(-suffix.length) === suffix) {\n const prefix = key.substr(0, key.length - suffix.length);\n const fallbacks = DIRECTIONAL_FALLBACKS[suffix];\n for (let fallback, j = 0; j < fallbacks.length; j++) {\n fallback = prefix + fallbacks[j];\n if (fallback in flatStyle) {\n return flatStyle[fallback];\n }\n }\n break;\n }\n }\n }\n return 0;\n}\n","import flattenStyle from './flattenStyle';\nimport getDefaultStyleValue from './getDefaultStyleValue';\n\n// Returns a flattened version of style with only `keys` values.\nexport default function getStyleValues(keys, style) {\n const values = {};\n const flatStyle = flattenStyle(style);\n\n (typeof keys === 'string' ? [keys] : keys).forEach(key => {\n values[key] =\n key in flatStyle ? flatStyle[key] : getDefaultStyleValue(key, flatStyle);\n });\n return values;\n}\n","import flattenStyle from './flattenStyle';\n\nfunction compareNumbers(a, b) {\n return a - b;\n}\n\nfunction notNull(value) {\n return value !== null;\n}\n\nfunction parsePosition(value) {\n if (value === 'from') {\n return 0;\n }\n if (value === 'to') {\n return 1;\n }\n const parsed = parseFloat(value, 10);\n if (Number.isNaN(parsed) || parsed < 0 || parsed > 1) {\n return null;\n }\n return parsed;\n}\n\nconst cache = {};\n\nexport default function createAnimation(definition) {\n const cacheKey = JSON.stringify(definition);\n if (cache[cacheKey]) {\n return cache[cacheKey];\n }\n\n const positions = Object.keys(definition)\n .map(parsePosition)\n .filter(notNull);\n positions.sort(compareNumbers);\n\n if (positions.length < 2) {\n throw new Error('Animation definitions must have at least two values.');\n }\n\n const compiled = {};\n if (definition.easing) {\n compiled.easing = definition.easing;\n }\n if (definition.style) {\n compiled.style = definition.style;\n }\n\n for (let i = 0; i < positions.length; i += 1) {\n const position = positions[i];\n let keyframe = definition[position];\n if (!keyframe) {\n if (position === 0) {\n keyframe = definition.from;\n } else if (position === 1) {\n keyframe = definition.to;\n }\n }\n if (!keyframe) {\n throw new Error('Missing animation keyframe, this should not happen');\n }\n\n keyframe = flattenStyle(keyframe);\n Object.keys(keyframe).forEach(key => {\n if (!(key in compiled)) {\n compiled[key] = {\n inputRange: [],\n outputRange: [],\n };\n }\n compiled[key].inputRange.push(position);\n compiled[key].outputRange.push(keyframe[key]);\n });\n }\n\n cache[cacheKey] = compiled;\n\n return compiled;\n}\n","import createAnimation from './createAnimation';\n\nconst animationRegistry = {};\n\nexport function registerAnimation(animationName, animation) {\n animationRegistry[animationName] = animation;\n}\n\nexport function getAnimationByName(animationName) {\n return animationRegistry[animationName];\n}\n\nexport function getAnimationNames() {\n return Object.keys(animationRegistry);\n}\n\nexport function initializeRegistryWithDefinitions(definitions) {\n Object.keys(definitions).forEach(animationName => {\n registerAnimation(\n animationName,\n createAnimation(definitions[animationName]),\n );\n });\n}\n","import { Easing } from 'react-native';\n\nconst EASING_FUNCTIONS = {\n // Standard CSS easings\n\n linear: Easing.linear,\n ease: Easing.bezier(0.25, 0.1, 0.25, 1),\n 'ease-in': Easing.bezier(0.42, 0, 1, 1),\n 'ease-out': Easing.bezier(0, 0, 0.58, 1),\n 'ease-in-out': Easing.bezier(0.42, 0, 0.58, 1),\n\n // Penner Equations - http://matthewlein.com/ceaser/ & http://easings.net\n\n 'ease-in-cubic': Easing.bezier(0.55, 0.055, 0.675, 0.19),\n 'ease-out-cubic': Easing.bezier(0.215, 0.61, 0.355, 1.0),\n 'ease-in-out-cubic': Easing.bezier(0.645, 0.045, 0.355, 1.0),\n\n 'ease-in-circ': Easing.bezier(0.6, 0.04, 0.98, 0.335),\n 'ease-out-circ': Easing.bezier(0.075, 0.82, 0.165, 1.0),\n 'ease-in-out-circ': Easing.bezier(0.785, 0.135, 0.15, 0.86),\n\n 'ease-in-expo': Easing.bezier(0.95, 0.05, 0.795, 0.035),\n 'ease-out-expo': Easing.bezier(0.19, 1.0, 0.22, 1.0),\n 'ease-in-out-expo': Easing.bezier(1.0, 0.0, 0.0, 1.0),\n\n 'ease-in-quad': Easing.bezier(0.55, 0.085, 0.68, 0.53),\n 'ease-out-quad': Easing.bezier(0.25, 0.46, 0.45, 0.94),\n 'ease-in-out-quad': Easing.bezier(0.455, 0.03, 0.515, 0.955),\n\n 'ease-in-quart': Easing.bezier(0.895, 0.03, 0.685, 0.22),\n 'ease-out-quart': Easing.bezier(0.165, 0.84, 0.44, 1.0),\n 'ease-in-out-quart': Easing.bezier(0.77, 0.0, 0.175, 1.0),\n\n 'ease-in-quint': Easing.bezier(0.755, 0.05, 0.855, 0.06),\n 'ease-out-quint': Easing.bezier(0.23, 1.0, 0.32, 1.0),\n 'ease-in-out-quint': Easing.bezier(0.86, 0.0, 0.07, 1.0),\n\n 'ease-in-sine': Easing.bezier(0.47, 0.0, 0.745, 0.715),\n 'ease-out-sine': Easing.bezier(0.39, 0.575, 0.565, 1.0),\n 'ease-in-out-sine': Easing.bezier(0.445, 0.05, 0.55, 0.95),\n\n 'ease-in-back': Easing.bezier(0.6, -0.28, 0.735, 0.045),\n 'ease-out-back': Easing.bezier(0.175, 0.885, 0.32, 1.275),\n 'ease-in-out-back': Easing.bezier(0.68, -0.55, 0.265, 1.55),\n};\n\nexport default EASING_FUNCTIONS;\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Animated, Easing } from 'react-native';\nimport wrapStyleTransforms from './wrapStyleTransforms';\nimport getStyleValues from './getStyleValues';\nimport flattenStyle from './flattenStyle';\nimport createAnimation from './createAnimation';\nimport { getAnimationByName, getAnimationNames } from './registry';\nimport EASING_FUNCTIONS from './easing';\n\n// These styles are not number based and thus needs to be interpolated\nconst INTERPOLATION_STYLE_PROPERTIES = [\n // Transform styles\n 'rotate',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'skewX',\n 'skewY',\n 'transformMatrix',\n // View styles\n 'backgroundColor',\n 'borderColor',\n 'borderTopColor',\n 'borderRightColor',\n 'borderBottomColor',\n 'borderLeftColor',\n 'shadowColor',\n // Text styles\n 'color',\n 'textDecorationColor',\n // Image styles\n 'tintColor',\n];\n\nconst ZERO_CLAMPED_STYLE_PROPERTIES = ['width', 'height'];\n\n// Create a copy of `source` without `keys`\nfunction omit(keys, source) {\n const filtered = {};\n Object.keys(source).forEach(key => {\n if (keys.indexOf(key) === -1) {\n filtered[key] = source[key];\n }\n });\n return filtered;\n}\n\n// Yes it's absurd, but actually fast\nfunction deepEquals(a, b) {\n return a === b || JSON.stringify(a) === JSON.stringify(b);\n}\n\n// Determine to what value the animation should tween to\nfunction getAnimationTarget(iteration, direction) {\n switch (direction) {\n case 'reverse':\n return 0;\n case 'alternate':\n return iteration % 2 ? 0 : 1;\n case 'alternate-reverse':\n return iteration % 2 ? 1 : 0;\n case 'normal':\n default:\n return 1;\n }\n}\n\n// Like getAnimationTarget but opposite\nfunction getAnimationOrigin(iteration, direction) {\n return getAnimationTarget(iteration, direction) ? 0 : 1;\n}\n\nfunction getCompiledAnimation(animation) {\n if (typeof animation === 'string') {\n const compiledAnimation = getAnimationByName(animation);\n if (!compiledAnimation) {\n throw new Error(`No animation registred by the name of ${animation}`);\n }\n return compiledAnimation;\n }\n return createAnimation(animation);\n}\n\nfunction makeInterpolatedStyle(compiledAnimation, animationValue) {\n const style = {};\n Object.keys(compiledAnimation).forEach(key => {\n if (key === 'style') {\n Object.assign(style, compiledAnimation.style);\n } else if (key !== 'easing') {\n style[key] = animationValue.interpolate(compiledAnimation[key]);\n }\n });\n return wrapStyleTransforms(style);\n}\n\nfunction transitionToValue(\n property,\n transitionValue,\n toValue,\n duration,\n easing,\n useNativeDriver = false,\n delay,\n onTransitionBegin,\n onTransitionEnd,\n) {\n const animation =\n duration || easing || delay\n ? Animated.timing(transitionValue, {\n toValue,\n delay,\n duration: duration || 1000,\n easing:\n typeof easing === 'function'\n ? easing\n : EASING_FUNCTIONS[easing || 'ease'],\n useNativeDriver,\n })\n : Animated.spring(transitionValue, { toValue, useNativeDriver });\n setTimeout(() => onTransitionBegin(property), delay);\n animation.start(() => onTransitionEnd(property));\n}\n\n// Make (almost) any component animatable, similar to Animated.createAnimatedComponent\nexport default function createAnimatableComponent(WrappedComponent) {\n const wrappedComponentName =\n WrappedComponent.displayName || WrappedComponent.name || 'Component';\n\n const Animatable = Animated.createAnimatedComponent(WrappedComponent);\n\n return class AnimatableComponent extends Component {\n static displayName = `withAnimatable(${wrappedComponentName})`;\n\n static propTypes = {\n animation: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n duration: PropTypes.number,\n direction: PropTypes.oneOf([\n 'normal',\n 'reverse',\n 'alternate',\n 'alternate-reverse',\n ]),\n delay: PropTypes.number,\n easing: PropTypes.oneOfType([\n PropTypes.oneOf(Object.keys(EASING_FUNCTIONS)),\n PropTypes.func,\n ]),\n iterationCount(props, propName) {\n const val = props[propName];\n if (val !== 'infinite' && !(typeof val === 'number' && val >= 1)) {\n return new Error(\n 'iterationCount must be a positive number or \"infinite\"',\n );\n }\n return null;\n },\n iterationDelay: PropTypes.number,\n onAnimationBegin: PropTypes.func,\n onAnimationEnd: PropTypes.func,\n onTransitionBegin: PropTypes.func,\n onTransitionEnd: PropTypes.func,\n style: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.array,\n PropTypes.object,\n ]),\n transition: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n ]),\n useNativeDriver: PropTypes.bool,\n };\n\n static defaultProps = {\n animation: undefined,\n delay: 0,\n direction: 'normal',\n duration: undefined,\n easing: undefined,\n iterationCount: 1,\n iterationDelay: 0,\n onAnimationBegin() {},\n onAnimationEnd() {},\n onTransitionBegin() {},\n onTransitionEnd() {},\n style: undefined,\n transition: undefined,\n useNativeDriver: false,\n };\n\n constructor(props) {\n super(props);\n\n const animationValue = new Animated.Value(\n getAnimationOrigin(0, this.props.direction),\n );\n let animationStyle = {};\n let compiledAnimation = {};\n if (props.animation) {\n compiledAnimation = getCompiledAnimation(props.animation);\n animationStyle = makeInterpolatedStyle(\n compiledAnimation,\n animationValue,\n );\n }\n this.state = {\n animationValue,\n animationStyle,\n compiledAnimation,\n transitionStyle: {},\n transitionValues: {},\n currentTransitionValues: {},\n };\n\n if (props.transition) {\n this.state = {\n ...this.state,\n ...this.initializeTransitionState(props.transition),\n };\n }\n this.delayTimer = null;\n\n // Alias registered animations for backwards compatibility\n getAnimationNames().forEach(animationName => {\n if (!(animationName in this)) {\n this[animationName] = this.animate.bind(this, animationName);\n }\n });\n }\n\n initializeTransitionState(transitionKeys) {\n const transitionValues = {};\n const styleValues = {};\n\n const currentTransitionValues = getStyleValues(\n transitionKeys,\n this.props.style,\n );\n Object.keys(currentTransitionValues).forEach(key => {\n const value = currentTransitionValues[key];\n if (\n INTERPOLATION_STYLE_PROPERTIES.indexOf(key) !== -1 ||\n typeof value !== 'number'\n ) {\n transitionValues[key] = new Animated.Value(0);\n styleValues[key] = value;\n } else {\n const animationValue = new Animated.Value(value);\n transitionValues[key] = animationValue;\n styleValues[key] = animationValue;\n }\n });\n\n return {\n currentTransitionValues,\n transitionStyle: styleValues,\n transitionValues,\n };\n }\n\n getTransitionState(keys) {\n const transitionKeys = typeof keys === 'string' ? [keys] : keys;\n let {\n transitionValues,\n currentTransitionValues,\n transitionStyle,\n } = this.state;\n const missingKeys = transitionKeys.filter(\n key => !this.state.transitionValues[key],\n );\n if (missingKeys.length) {\n const transitionState = this.initializeTransitionState(missingKeys);\n transitionValues = {\n ...transitionValues,\n ...transitionState.transitionValues,\n };\n currentTransitionValues = {\n ...currentTransitionValues,\n ...transitionState.currentTransitionValues,\n };\n transitionStyle = {\n ...transitionStyle,\n ...transitionState.transitionStyle,\n };\n }\n return { transitionValues, currentTransitionValues, transitionStyle };\n }\n\n ref = null;\n\n handleRef = ref => {\n this.ref = ref;\n };\n\n setNativeProps(nativeProps) {\n if (this.ref) {\n this.ref.setNativeProps(nativeProps);\n }\n }\n\n componentDidMount() {\n const {\n animation,\n duration,\n delay,\n onAnimationBegin,\n iterationDelay,\n } = this.props;\n if (animation) {\n const startAnimation = () => {\n onAnimationBegin();\n this.startAnimation(duration, 0, iterationDelay, endState =>\n this.props.onAnimationEnd(endState),\n );\n this.delayTimer = null;\n };\n if (delay) {\n this.delayTimer = setTimeout(startAnimation, delay);\n } else {\n startAnimation();\n }\n }\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillReceiveProps(props) {\n const {\n animation,\n delay,\n duration,\n easing,\n iterationDelay,\n transition,\n onAnimationBegin,\n } = props;\n\n if (transition) {\n const values = getStyleValues(transition, props.style);\n this.transitionTo(values, duration, easing, delay);\n } else if (!deepEquals(animation, this.props.animation)) {\n if (animation) {\n if (this.delayTimer) {\n this.setAnimation(animation);\n } else {\n onAnimationBegin();\n this.animate(animation, duration, iterationDelay).then(endState =>\n this.props.onAnimationEnd(endState),\n );\n }\n } else {\n this.stopAnimation();\n }\n }\n }\n\n componentWillUnmount() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n }\n }\n\n setAnimation(animation, callback) {\n const compiledAnimation = getCompiledAnimation(animation);\n this.setState(\n state => ({\n animationStyle: makeInterpolatedStyle(\n compiledAnimation,\n state.animationValue,\n ),\n compiledAnimation,\n }),\n callback,\n );\n }\n\n animate(animation, duration, iterationDelay) {\n return new Promise(resolve => {\n this.setAnimation(animation, () => {\n this.startAnimation(duration, 0, iterationDelay, resolve);\n });\n });\n }\n\n stopAnimation() {\n this.setState({\n scheduledAnimation: false,\n animationStyle: {},\n });\n this.state.animationValue.stopAnimation();\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n\n startAnimation(duration, iteration, iterationDelay, callback) {\n const { animationValue, compiledAnimation } = this.state;\n const { direction, iterationCount, useNativeDriver } = this.props;\n let easing = this.props.easing || compiledAnimation.easing || 'ease';\n let currentIteration = iteration || 0;\n const fromValue = getAnimationOrigin(currentIteration, direction);\n const toValue = getAnimationTarget(currentIteration, direction);\n animationValue.setValue(fromValue);\n\n if (typeof easing === 'string') {\n easing = EASING_FUNCTIONS[easing];\n }\n // Reverse easing if on the way back\n const reversed =\n direction === 'reverse' ||\n (direction === 'alternate' && !toValue) ||\n (direction === 'alternate-reverse' && !toValue);\n if (reversed) {\n easing = Easing.out(easing);\n }\n const config = {\n toValue,\n easing,\n isInteraction: iterationCount <= 1,\n duration: duration || this.props.duration || 1000,\n useNativeDriver,\n delay: iterationDelay || 0,\n };\n\n Animated.timing(animationValue, config).start(endState => {\n currentIteration += 1;\n if (\n endState.finished &&\n this.props.animation &&\n (iterationCount === 'infinite' || currentIteration < iterationCount)\n ) {\n this.startAnimation(\n duration,\n currentIteration,\n iterationDelay,\n callback,\n );\n } else if (callback) {\n callback(endState);\n }\n });\n }\n\n transition(fromValues, toValues, duration, easing) {\n const fromValuesFlat = flattenStyle(fromValues);\n const toValuesFlat = flattenStyle(toValues);\n const transitionKeys = Object.keys(toValuesFlat);\n const {\n transitionValues,\n currentTransitionValues,\n transitionStyle,\n } = this.getTransitionState(transitionKeys);\n\n transitionKeys.forEach(property => {\n const fromValue = fromValuesFlat[property];\n const toValue = toValuesFlat[property];\n let transitionValue = transitionValues[property];\n if (!transitionValue) {\n transitionValue = new Animated.Value(0);\n }\n const needsInterpolation =\n INTERPOLATION_STYLE_PROPERTIES.indexOf(property) !== -1 ||\n typeof value !== 'number';\n const needsZeroClamping =\n ZERO_CLAMPED_STYLE_PROPERTIES.indexOf(property) !== -1;\n if (needsInterpolation) {\n transitionValue.setValue(0);\n transitionStyle[property] = transitionValue.interpolate({\n inputRange: [0, 1],\n outputRange: [fromValue, toValue],\n });\n currentTransitionValues[property] = toValue;\n toValuesFlat[property] = 1;\n } else {\n if (needsZeroClamping) {\n transitionStyle[property] = transitionValue.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolateLeft: 'clamp',\n });\n currentTransitionValues[property] = toValue;\n } else {\n transitionStyle[property] = transitionValue;\n }\n transitionValue.setValue(fromValue);\n }\n });\n this.setState(\n { transitionValues, transitionStyle, currentTransitionValues },\n () => {\n this.transitionToValues(\n toValuesFlat,\n duration || this.props.duration,\n easing,\n this.props.delay,\n );\n },\n );\n }\n\n transitionTo(toValues, duration, easing, delay) {\n const { currentTransitionValues } = this.state;\n const toValuesFlat = flattenStyle(toValues);\n const transitions = {\n from: {},\n to: {},\n };\n\n Object.keys(toValuesFlat).forEach(property => {\n const toValue = toValuesFlat[property];\n const needsInterpolation =\n INTERPOLATION_STYLE_PROPERTIES.indexOf(property) !== -1 ||\n typeof value !== 'number';\n const needsZeroClamping =\n ZERO_CLAMPED_STYLE_PROPERTIES.indexOf(property) !== -1;\n const transitionStyle = this.state.transitionStyle[property];\n const transitionValue = this.state.transitionValues[property];\n if (\n !needsInterpolation &&\n !needsZeroClamping &&\n transitionStyle &&\n transitionStyle === transitionValue\n ) {\n transitionToValue(\n property,\n transitionValue,\n toValue,\n duration,\n easing,\n this.props.useNativeDriver,\n delay,\n prop => this.props.onTransitionBegin(prop),\n prop => this.props.onTransitionEnd(prop),\n );\n } else {\n let currentTransitionValue = currentTransitionValues[property];\n if (\n typeof currentTransitionValue === 'undefined' &&\n this.props.style\n ) {\n const style = getStyleValues(property, this.props.style);\n currentTransitionValue = style[property];\n }\n transitions.from[property] = currentTransitionValue;\n transitions.to[property] = toValue;\n }\n });\n\n if (Object.keys(transitions.from).length) {\n this.transition(transitions.from, transitions.to, duration, easing);\n }\n }\n\n transitionToValues(toValues, duration, easing, delay) {\n Object.keys(toValues).forEach(property => {\n const transitionValue = this.state.transitionValues[property];\n const toValue = toValues[property];\n transitionToValue(\n property,\n transitionValue,\n toValue,\n duration,\n easing,\n this.props.useNativeDriver,\n delay,\n prop => this.props.onTransitionBegin(prop),\n prop => this.props.onTransitionEnd(prop),\n );\n });\n }\n\n render() {\n const { style, animation, transition } = this.props;\n if (animation && transition) {\n throw new Error('You cannot combine animation and transition props');\n }\n const restProps = omit(\n [\n 'animation',\n 'duration',\n 'direction',\n 'delay',\n 'easing',\n 'iterationCount',\n 'iterationDelay',\n 'onAnimationBegin',\n 'onAnimationEnd',\n 'onTransitionBegin',\n 'onTransitionEnd',\n 'style',\n 'transition',\n 'useNativeDriver',\n ],\n this.props,\n );\n\n return (\n <Animatable\n ref={this.handleRef}\n style={[\n style,\n this.state.animationStyle,\n wrapStyleTransforms(this.state.transitionStyle),\n ]}\n {...restProps}\n />\n );\n }\n };\n}\n","export const bounce = {\n 0: {\n translateY: 0,\n },\n 0.2: {\n translateY: 0,\n },\n 0.4: {\n translateY: -30,\n },\n 0.43: {\n translateY: -30,\n },\n 0.53: {\n translateY: 0,\n },\n 0.7: {\n translateY: -15,\n },\n 0.8: {\n translateY: 0,\n },\n 0.9: {\n translateY: -4,\n },\n 1: {\n translateY: 0,\n },\n};\n\nexport const flash = {\n 0: {\n opacity: 1,\n },\n 0.25: {\n opacity: 0,\n },\n 0.5: {\n opacity: 1,\n },\n 0.75: {\n opacity: 0,\n },\n 1: {\n opacity: 1,\n },\n};\n\nexport const jello = {\n 0: {\n skewX: '0deg',\n skewY: '0deg',\n },\n 0.111: {\n skewX: '0deg',\n skewY: '0deg',\n },\n 0.222: {\n skewX: '-12.5deg',\n skewY: '-12.5deg',\n },\n 0.333: {\n skewX: '6.25deg',\n skewY: '6.25deg',\n },\n 0.444: {\n skewX: '-3.125deg',\n skewY: '-3.125deg',\n },\n 0.555: {\n skewX: '1.5625deg',\n skewY: '1.5625deg',\n },\n 0.666: {\n skewX: '-0.78125deg',\n skewY: '-0.78125deg',\n },\n 0.777: {\n skewX: '0.390625deg',\n skewY: '0.390625deg',\n },\n 0.888: {\n skewX: '-0.1953125deg',\n skewY: '-0.1953125deg',\n },\n 1: {\n skewX: '0deg',\n skewY: '0deg',\n },\n};\n\nexport const pulse = {\n 0: {\n scale: 1,\n },\n 0.5: {\n scale: 1.05,\n },\n 1: {\n scale: 1,\n },\n};\n\nexport const rotate = {\n 0: {\n rotate: '0deg',\n },\n 0.25: {\n rotate: '90deg',\n },\n 0.5: {\n rotate: '180deg',\n },\n 0.75: {\n rotate: '270deg',\n },\n 1: {\n rotate: '360deg',\n },\n};\n\nexport const shake = {\n 0: {\n translateX: 0,\n },\n 0.1: {\n translateX: -10,\n },\n 0.2: {\n translateX: 10,\n },\n 0.3: {\n translateX: -10,\n },\n 0.4: {\n translateX: 10,\n },\n 0.5: {\n translateX: -10,\n },\n 0.6: {\n translateX: 10,\n },\n 0.7: {\n translateX: -10,\n },\n 0.8: {\n translateX: 10,\n },\n 0.9: {\n translateX: -10,\n },\n 1: {\n translateX: 0,\n },\n};\n\nexport const swing = {\n 0: {\n rotate: '0deg',\n },\n 0.2: {\n rotate: '15deg',\n },\n 0.4: {\n rotate: '-10deg',\n },\n 0.6: {\n rotate: '5deg',\n },\n 0.8: {\n rotate: '-5deg',\n },\n 1: {\n rotate: '0deg',\n },\n};\n\nexport const rubberBand = {\n 0: {\n scaleX: 1,\n scaleY: 1,\n },\n 0.3: {\n scaleX: 1.25,\n scaleY: 0.75,\n },\n 0.4: {\n scaleX: 0.75,\n scaleY: 1.25,\n },\n 0.5: {\n scaleX: 1.15,\n scaleY: 0.85,\n },\n 0.65: {\n scaleX: 0.95,\n scaleY: 1.05,\n },\n 0.75: {\n scaleX: 1.05,\n scaleY: 0.95,\n },\n 1: {\n scaleX: 1,\n scaleY: 1,\n },\n};\n\nexport const tada = {\n 0: {\n scale: 1,\n rotate: '0deg',\n },\n 0.1: {\n scale: 0.9,\n rotate: '-3deg',\n },\n 0.2: {\n scale: 0.9,\n rotate: '-3deg',\n },\n 0.3: {\n scale: 1.1,\n rotate: '-3deg',\n },\n 0.4: {\n rotate: '3deg',\n },\n 0.5: {\n rotate: '-3deg',\n },\n 0.6: {\n rotate: '3deg',\n },\n 0.7: {\n rotate: '-3deg',\n },\n 0.8: {\n rotate: '3deg',\n },\n 0.9: {\n scale: 1.1,\n rotate: '3deg',\n },\n 1: {\n scale: 1,\n rotate: '0deg',\n },\n};\n\nexport const wobble = {\n 0: {\n translateX: 0,\n rotate: '0deg',\n },\n 0.15: {\n translateX: -25,\n rotate: '-5deg',\n },\n 0.3: {\n translateX: 20,\n rotate: '3deg',\n },\n 0.45: {\n translateX: -15,\n rotate: '-3deg',\n },\n 0.6: {\n translateX: 10,\n rotate: '2deg',\n },\n 0.75: {\n translateX: -5,\n rotate: '-1deg',\n },\n 1: {\n translateX: 0,\n rotate: '0deg',\n },\n};\n","export const bounceIn = {\n 0: {\n opacity: 0,\n scale: 0.3,\n },\n 0.2: {\n scale: 1.1,\n },\n 0.4: {\n scale: 0.9,\n },\n 0.6: {\n opacity: 1,\n scale: 1.03,\n },\n 0.8: {\n scale: 0.97,\n },\n 1: {\n opacity: 1,\n scale: 1,\n },\n};\n\nexport const bounceInUp = {\n 0: {\n opacity: 0,\n translateY: 800,\n },\n 0.6: {\n opacity: 1,\n translateY: -25,\n },\n 0.75: {\n translateY: 10,\n },\n 0.9: {\n translateY: -5,\n },\n 1: {\n translateY: 0,\n },\n};\n\nexport const bounceInDown = {\n 0: {\n opacity: 0,\n translateY: -800,\n },\n 0.6: {\n opacity: 1,\n translateY: 25,\n },\n 0.75: {\n translateY: -10,\n },\n 0.9: {\n translateY: 5,\n },\n 1: {\n translateY: 0,\n },\n};\n\nexport const bounceInRight = {\n 0: {\n opacity: 0,\n translateX: 600,\n },\n 0.6: {\n opacity: 1,\n translateX: -20,\n },\n 0.75: {\n translateX: 8,\n },\n 0.9: {\n translateX: -4,\n },\n 1: {\n translateX: 0,\n },\n};\n\nexport const bounceInLeft = {\n 0: {\n opacity: 0,\n translateX: -600,\n },\n 0.6: {\n opacity: 1,\n translateX: 20,\n },\n 0.75: {\n translateX: -8,\n },\n 0.9: {\n translateX: 4,\n },\n 1: {\n translateX: 0,\n },\n};\n","export const bounceOut = {\n 0: {\n opacity: 1,\n scale: 1,\n },\n 0.2: {\n scale: 0.9,\n },\n 0.5: {\n opacity: 1,\n scale: 1.11,\n },\n 0.55: {\n scale: 1.11,\n },\n 1: {\n opacity: 0,\n scale: 0.3,\n },\n};\n\nexport const bounceOutUp = {\n 0: {\n opacity: 1,\n translateY: 0,\n },\n 0.2: {\n opacity: 1,\n translateY: -10,\n },\n 0.4: {\n translateY: 20,\n },\n 0.45: {\n translateY: 20,\n },\n 0.55: {\n opacity: 1,\n },\n 1: {\n opacity: 0,\n translateY: -800,\n },\n};\n\nexport const bounceOutDown = {\n 0: {\n opacity: 1,\n translateY: 0,\n },\n 0.2: {\n opacity: 1,\n translateY: 10,\n },\n 0.4: {\n translateY: -20,\n },\n 0.45: {\n translateY: -20,\n },\n 0.55: {\n opacity: 1,\n },\n 1: {\n opacity: 0,\n translateY: 800,\n },\n};\n\nexport const bounceOutRight = {\n 0: {\n opacity: 1,\n translateX: 0,\n },\n 0.2: {\n opacity: 1,\n translateX: 10,\n },\n 0.4: {\n translateX: -20,\n },\n 0.45: {\n translateX: -20,\n },\n 0.55: {\n opacity: 1,\n },\n 1: {\n opacity: 0,\n translateX: 600,\n },\n};\n\nexport const bounceOutLeft = {\n 0: {\n opacity: 1,\n translateX: 0,\n },\n 0.2: {\n opacity: 1,\n translateX: -10,\n },\n 0.4: {\n translateX: 20,\n },\n 0.45: {\n translateX: 20,\n },\n 0.55: {\n opacity: 1,\n },\n 1: {\n opacity: 0,\n translateX: -600,\n },\n};\n","function makeFadeInTranslation(translationType, fromValue) {\n return {\n from: {\n opacity: 0,\n [translationType]: fromValue,\n },\n to: {\n opacity: 1,\n [translationType]: 0,\n },\n };\n}\n\nexport const fadeIn = {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 1,\n },\n};\n\nexport const fadeInDown = makeFadeInTranslation('translateY', -100);\n\nexport const fadeInUp = makeFadeInTranslation('translateY', 100);\n\nexport const fadeInLeft = makeFadeInTranslation('translateX', -100);\n\nexport const fadeInRight = makeFadeInTranslation('translateX', 100);\n\nexport const fadeInDownBig = makeFadeInTranslation('translateY', -500);\n\nexport const fadeInUpBig = makeFadeInTranslation('translateY', 500);\n\nexport const fadeInLeftBig = makeFadeInTranslation('translateX', -500);\n\nexport const fadeInRightBig = makeFadeInTranslation('translateX', 500);\n","function makeFadeOutTranslation(translationType, toValue) {\n return {\n from: {\n opacity: 1,\n [translationType]: 0,\n },\n to: {\n opacity: 0,\n [translationType]: toValue,\n },\n };\n}\n\nexport const fadeOut = {\n from: {\n opacity: 1,\n },\n to: {\n opacity: 0,\n },\n};\n\nexport const fadeOutDown = makeFadeOutTranslation('translateY', 100);\n\nexport const fadeOutUp = makeFadeOutTranslation('translateY', -100);\n\nexport const fadeOutLeft = makeFadeOutTranslation('translateX', -100);\n\nexport const fadeOutRight = makeFadeOutTranslation('translateX', 100);\n\nexport const fadeOutDownBig = makeFadeOutTranslation('translateY', 500);\n\nexport const fadeOutUpBig = makeFadeOutTranslation('translateY', -500);\n\nexport const fadeOutLeftBig = makeFadeOutTranslation('translateX', -500);\n\nexport const fadeOutRightBig = makeFadeOutTranslation('translateX', 500);\n","export const flipInX = {\n easing: 'ease-in',\n style: {\n backfaceVisibility: 'visible',\n perspective: 400,\n },\n 0: {\n opacity: 0,\n rotateX: '90deg',\n },\n 0.4: {\n rotateX: '-20deg',\n },\n 0.6: {\n opacity: 1,\n rotateX: '10deg',\n },\n 0.8: {\n rotateX: '-5deg',\n },\n 1: {\n opacity: 1,\n rotateX: '0deg',\n },\n};\n\nexport const flipInY = {\n easing: 'ease-in',\n style: {\n backfaceVisibility: 'visible',\n perspective: 400,\n },\n 0: {\n opacity: 0,\n rotateY: '90deg',\n },\n 0.4: {\n rotateY: '-20deg',\n },\n 0.6: {\n opacity: 1,\n rotateY: '10deg',\n },\n 0.8: {\n rotateY: '-5deg',\n },\n 1: {\n opacity: 1,\n rotateY: '0deg',\n },\n};\n\nexport const flipOutX = {\n style: {\n backfaceVisibility: 'visible',\n perspective: 400,\n },\n 0: {\n opacity: 1,\n rotateX: '0deg',\n },\n 0.3: {\n opacity: 1,\n rotateX: '-20deg',\n },\n 1: {\n opacity: 0,\n rotateX: '90deg',\n },\n};\n\nexport const flipOutY = {\n style: {\n backfaceVisibility: 'visible',\n perspective: 400,\n },\n 0: {\n opacity: 1,\n rotateY: '0deg',\n },\n 0.3: {\n opacity: 1,\n rotateY: '-20deg',\n },\n 1: {\n opacity: 0,\n rotateY: '90deg',\n },\n};\n","export const lightSpeedIn = {\n easing: 'ease-out',\n 0: {\n opacity: 0,\n translateX: 200,\n skewX: '-30deg',\n },\n 0.6: {\n opacity: 1,\n translateX: 0,\n skewX: '20deg',\n },\n 0.8: {\n skewX: '-5deg',\n },\n 1: {\n opacity: 1,\n translateX: 0,\n skewX: '0deg',\n },\n};\n\nexport const lightSpeedOut = {\n easing: 'ease-in',\n 0: {\n opacity: 1,\n translateX: 0,\n skewX: '0deg',\n },\n 1: {\n opacity: 0,\n translateX: 200,\n skewX: '30deg',\n },\n};\n","function makeSlideInTranslation(translationType, fromValue) {\n return {\n from: {\n [translationType]: fromValue,\n },\n to: {\n [translationType]: 0,\n },\n };\n}\n\nexport const slideInDown = makeSlideInTranslation('translateY', -100);\n\nexport const slideInUp = makeSlideInTranslation('translateY', 100);\n\nexport const slideInLeft = makeSlideInTranslation('translateX', -100);\n\nexport const slideInRight = makeSlideInTranslation('translateX', 100);\n","function makeSlideOutTranslation(translationType, fromValue) {\n return {\n from: {\n [translationType]: 0,\n },\n to: {\n [translationType]: fromValue,\n },\n };\n}\n\nexport const slideOutDown = makeSlideOutTranslation('translateY', 100);\n\nexport const slideOutUp = makeSlideOutTranslation('translateY', -100);\n\nexport const slideOutLeft = makeSlideOutTranslation('translateX', -100);\n\nexport const slideOutRight = makeSlideOutTranslation('translateX', 100);\n","import { Easing } from 'react-native';\n\nfunction makeZoomInTranslation(translationType, pivotPoint) {\n const modifier = Math.min(1, Math.max(-1, pivotPoint));\n return {\n easing: Easing.bezier(0.175, 0.885, 0.32, 1),\n 0: {\n opacity: 0,\n scale: 0.1,\n [translationType]: modifier * -1000,\n },\n 0.6: {\n opacity: 1,\n scale: 0.457,\n [translationType]: pivotPoint,\n },\n 1: {\n scale: 1,\n [translationType]: 0,\n },\n };\n}\n\nexport const zoomIn = {\n from: {\n opacity: 0,\n scale: 0.3,\n },\n 0.5: {\n opacity: 1,\n },\n to: {\n opacity: 1,\n scale: 1,\n },\n};\n\nexport const zoomInDown = makeZoomInTranslation('translateY', 60);\n\nexport const zoomInUp = makeZoomInTranslation('translateY', -60);\n\nexport const zoomInLeft = makeZoomInTranslation('translateX', 10);\n\nexport const zoomInRight = makeZoomInTranslation('translateX', -10);\n","import { Easing } from 'react-native';\n\nfunction makeZoomOutTranslation(translationType, pivotPoint) {\n const modifier = Math.min(1, Math.max(-1, pivotPoint));\n return {\n easing: Easing.bezier(0.175, 0.885, 0.32, 1),\n 0: {\n opacity: 1,\n scale: 1,\n [translationType]: 0,\n },\n 0.4: {\n opacity: 1,\n scale: 0.457,\n [translationType]: pivotPoint,\n },\n 1: {\n opacity: 0,\n scale: 0.1,\n [translationType]: modifier * -1000,\n },\n };\n}\n\nexport const zoomOut = {\n from: {\n opacity: 1,\n scale: 1,\n },\n 0.5: {\n opacity: 1,\n scale: 0.3,\n },\n to: {\n opacity: 0,\n scale: 0,\n },\n};\n\nexport const zoomOutDown = makeZoomOutTranslation('translateY', 60);\n\nexport const zoomOutUp = makeZoomOutTranslation('translateY', -60);\n\nexport const zoomOutLeft = makeZoomOutTranslation('translateX', 10);\n\nexport const zoomOutRight = makeZoomOutTranslation('translateX', -10);\n","import {\n View as CoreView,\n Text as CoreText,\n Image as CoreImage,\n} from 'react-native';\nimport createComponent from './createAnimatableComponent';\nimport { initializeRegistryWithDefinitions } from './registry';\nimport * as ANIMATION_DEFINITIONS from './definitions';\n\ninitializeRegistryWithDefinitions(ANIMATION_DEFINITIONS);\n\nexport const createAnimatableComponent = createComponent;\nexport const View = createComponent(CoreView);\nexport const Text = createComponent(CoreText);\nexport const Image = createComponent(CoreImage);\nexport { default as createAnimation } from './createAnimation';\nexport {\n registerAnimation,\n initializeRegistryWithDefinitions,\n} from './registry';\n","import { Asset } from 'expo-asset';\n\n/**\n * The different types of assets you can provide to the [`loadAsync()`](#loadAsync) function.\n * A font source can be a URI, a module ID, or an Expo Asset.\n */\nexport type FontSource = string | number | Asset | FontResource;\n\n/**\n * Used to dictate the resource that is loaded into the provided font namespace when used with [`loadAsync`](#loadasync).\n * Optionally on web you can define a `display` value which sets the [`font-display`](#FontDisplay) property for a given typeface in the browser.\n */\nexport type FontResource = {\n uri: string | number;\n display?: FontDisplay;\n};\n\n/**\n * Sets the [font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display) for a given typeface.\n * This currently **only works on web**. The default font value on web is `FontDisplay.AUTO`.\n * Even though setting the `fontDisplay` does nothing on native platforms, the default behavior emulates `FontDisplay.SWAP`\n * on flagship devices like iOS, Samsung, Pixel, etc. Default functionality varies on One Plus devices.\n * In the browser this value is set in the generated `@font-face` CSS block and not as a style property meaning you cannot dynamically\n * change this value based on the element it's used in.\n */\nexport enum FontDisplay {\n /**\n * (Default on web) The font display strategy is defined by the user agent or platform.\n * This generally defaults to the text being invisible until the font is loaded.\n * Good for buttons or banners that require a specific treatment.\n */\n AUTO = 'auto',\n /**\n * Fallback text is rendered immediately with a default font while the desired font is loaded.\n * This is good for making the content appear to load instantly and is usally preferred.\n */\n SWAP = 'swap',\n /**\n * The text will be invisible until the font has loaded.\n * If the font fails to load, nothing will appear.\n */\n BLOCK = 'block',\n /**\n * Splits the behavior between `SWAP` and `BLOCK`.\n * There will be a [100ms timeout](https://developers.google.com/web/updates/2016/02/font-display?hl=en) where the text with a custom font is invisible,\n * after that the text will either swap to the styled text or it'll show the unstyled text and continue to load the custom font.\n * This is good for buttons that need a custom font but should also be quickly available to screen-readers.\n */\n FALLBACK = 'fallback',\n /**\n * This works almost identically to `FALLBACK`,\n * the only difference is that the browser will decide to load the font based on slow connection speed or critical resource demand.\n */\n OPTIONAL = 'optional',\n}\n\n/**\n * Used to query fonts for unloading\n */\nexport type UnloadFontOptions = Pick<FontResource, 'display'>;\n","import { CodedError } from '@unimodules/core';\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport FontObserver from 'fontfaceobserver';\n\nimport { UnloadFontOptions } from './Font';\nimport { FontDisplay, FontResource } from './Font.types';\n\nfunction getFontFaceStyleSheet(): CSSStyleSheet | null {\n if (!canUseDOM) {\n return null;\n }\n const styleSheet = getStyleElement();\n return styleSheet.sheet ? (styleSheet.sheet as CSSStyleSheet) : null;\n}\n\ntype RuleItem = { rule: CSSFontFaceRule; index: number };\n\nfunction getFontFaceRules(): RuleItem[] {\n const sheet = getFontFaceStyleSheet();\n if (sheet) {\n // @ts-ignore: rule iterator\n const rules = [...sheet.cssRules];\n\n const items: RuleItem[] = [];\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n if (rule instanceof CSSFontFaceRule) {\n items.push({ rule, index: i });\n }\n }\n return items;\n }\n return [];\n}\n\nfunction getFontFaceRulesMatchingResource(\n fontFamilyName: string,\n options?: UnloadFontOptions\n): RuleItem[] {\n const rules = getFontFaceRules();\n return rules.filter(({ rule }) => {\n return (\n rule.style.fontFamily === fontFamilyName &&\n (options && options.display ? options.display === (rule.style as any).fontDisplay : true)\n );\n });\n}\n\nexport default {\n get name(): string {\n return 'ExpoFontLoader';\n },\n\n async unloadAllAsync(): Promise<void> {\n if (!canUseDOM) return;\n\n const element = document.getElementById(ID);\n if (element && element instanceof HTMLStyleElement) {\n document.removeChild(element);\n }\n },\n\n async unloadAsync(fontFamilyName: string, options?: UnloadFontOptions): Promise<void> {\n const sheet = getFontFaceStyleSheet();\n if (!sheet) return;\n const items = getFontFaceRulesMatchingResource(fontFamilyName, options);\n for (const item of items) {\n sheet.deleteRule(item.index);\n }\n },\n\n async loadAsync(fontFamilyName: string, resource: FontResource): Promise<void> {\n if (!canUseDOM) {\n return;\n }\n\n const canInjectStyle = document.head && typeof document.head.appendChild === 'function';\n if (!canInjectStyle) {\n throw new CodedError(\n 'ERR_WEB_ENVIRONMENT',\n `The browser's \\`document.head\\` element doesn't support injecting fonts.`\n );\n }\n\n const style = _createWebStyle(fontFamilyName, resource);\n document.head!.appendChild(style);\n\n if (!isFontLoadingListenerSupported()) {\n return;\n }\n\n return new FontObserver(fontFamilyName, { display: resource.display }).load();\n },\n};\n\nconst ID = 'expo-generated-fonts';\n\nfunction getStyleElement(): HTMLStyleElement {\n const element = document.getElementById(ID);\n if (element && element instanceof HTMLStyleElement) {\n return element;\n }\n const styleElement = document.createElement('style');\n styleElement.id = ID;\n styleElement.type = 'text/css';\n return styleElement;\n}\n\nfunction _createWebStyle(fontFamily: string, resource: FontResource): HTMLStyleElement {\n const fontStyle = `@font-face {\n font-family: ${fontFamily};\n src: url(${resource.uri});\n font-display: ${resource.display || FontDisplay.AUTO};\n }`;\n\n const styleElement = getStyleElement();\n // @ts-ignore: TypeScript does not define HTMLStyleElement::styleSheet. This is just for IE and\n // possibly can be removed if it's unnecessary on IE 11.\n if (styleElement.styleSheet) {\n const styleElementIE = styleElement as any;\n styleElementIE.styleSheet.cssText = styleElementIE.styleSheet.cssText\n ? styleElementIE.styleSheet.cssText + fontStyle\n : fontStyle;\n } else {\n const textNode = document.createTextNode(fontStyle);\n styleElement.appendChild(textNode);\n }\n return styleElement;\n}\n\nfunction isFontLoadingListenerSupported(): boolean {\n const { userAgent } = window.navigator;\n // WebKit is broken https://github.com/bramstein/fontfaceobserver/issues/95\n const isIOS = !!userAgent.match(/iPad|iPhone/i);\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n // Edge is broken https://github.com/bramstein/fontfaceobserver/issues/109#issuecomment-333356795\n const isEdge = userAgent.includes('Edge');\n // Internet Explorer\n const isIE = userAgent.includes('Trident');\n // Firefox\n const isFirefox = userAgent.includes('Firefox');\n return !isSafari && !isIOS && !isEdge && !isIE && !isFirefox;\n}\n","import { CodedError } from '@unimodules/core';\nimport { Asset } from 'expo-asset';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontDisplay } from './Font';\nimport { FontResource, FontSource } from './Font.types';\n\nfunction uriFromFontSource(asset: any): string | null {\n if (typeof asset === 'string') {\n return asset || null;\n } else if (typeof asset === 'object') {\n return asset.uri || asset.localUri || null;\n }\n return null;\n}\n\nfunction displayFromFontSource(asset: any): FontDisplay | undefined {\n return asset.display || FontDisplay.AUTO;\n}\n\nexport function fontFamilyNeedsScoping(name: string): boolean {\n return false;\n}\n\nexport function getAssetForSource(source: FontSource): Asset | FontResource {\n const uri = uriFromFontSource(source);\n const display = displayFromFontSource(source);\n\n if (!uri || typeof uri !== 'string') {\n throwInvalidSourceError(uri);\n }\n\n return {\n uri: uri!,\n display,\n };\n}\n\nfunction throwInvalidSourceError(source: any): never {\n let type: string = typeof source;\n if (type === 'object') type = JSON.stringify(source, null, 2);\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n `Expected font asset of type \\`string | FontResource | Asset\\` (number is not supported on web) instead got: ${type}`\n );\n}\n\nexport async function loadSingleFontAsync(\n name: string,\n input: Asset | FontResource\n): Promise<void> {\n if (typeof input !== 'object' || typeof input.uri !== 'string' || (input as any).downloadAsync) {\n throwInvalidSourceError(input);\n }\n\n await ExpoFontLoader.loadAsync(name, input);\n}\n\nexport function getNativeFontName(name: string): string {\n return name;\n}\n","import { CodedError, UnavailabilityError } from '@unimodules/core';\n\nimport ExpoFontLoader from './ExpoFontLoader';\nimport { FontDisplay, FontSource, FontResource, UnloadFontOptions } from './Font.types';\nimport {\n getAssetForSource,\n loadSingleFontAsync,\n fontFamilyNeedsScoping,\n getNativeFontName,\n} from './FontLoader';\n\nconst loaded: { [name: string]: boolean } = {};\nconst loadPromises: { [name: string]: Promise<void> } = {};\n\n/**\n * Used to transform font family names to the scoped name. This does not need to\n * be called in standalone or bare apps but it will return unscoped font family\n * names if it is called in those contexts.\n * note(brentvatne): at some point we may want to warn if this is called\n * outside of a managed app.\n *\n * @param fontFamily name to process\n * @returns a name processed for use with the [current workflow](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/)\n */\nexport function processFontFamily(fontFamily: string | null): string | null {\n if (!fontFamily || !fontFamilyNeedsScoping(fontFamily)) {\n return fontFamily;\n }\n\n if (!isLoaded(fontFamily)) {\n if (__DEV__) {\n if (isLoading(fontFamily)) {\n console.error(\n `You started loading the font \"${fontFamily}\", but used it before it finished loading.\\n\n- You need to wait for Font.loadAsync to complete before using the font.\\n\n- We recommend loading all fonts before rendering the app, and rendering only Expo.AppLoading while waiting for loading to complete.`\n );\n } else {\n console.error(\n `fontFamily \"${fontFamily}\" is not a system font and has not been loaded through Font.loadAsync.\\n\n- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.\\n\n- If this is a custom font, be sure to load it with Font.loadAsync.`\n );\n }\n }\n\n return 'System';\n }\n\n return `ExpoFont-${getNativeFontName(fontFamily)}`;\n}\n\n/**\n * Synchronously detect if the font for `fontFamily` has finished loading\n *\n * @param fontFamily the name used to load the `FontResource`.\n * @returns `true` if the the font has fully loaded.\n */\nexport function isLoaded(fontFamily: string): boolean {\n return fontFamily in loaded;\n}\n\n/**\n * Synchronously detect if the font for `fontFamily` is still being loaded\n *\n * @param fontFamily the name used to load the `FontResource`.\n * @returns `true` if the the font is still loading.\n */\nexport function isLoading(fontFamily: string): boolean {\n return fontFamily in loadPromises;\n}\n\n/**\n * Natively load a font for use with Text elements.\n * @param fontFamilyOrFontMap string or map of values that can be used as the [`fontFamily`](https://reactnative.dev/docs/text#style) style prop with React Native Text elements.\n * @param source the font asset that should be loaded into the `fontFamily` namespace.\n */\nexport async function loadAsync(\n fontFamilyOrFontMap: string | { [fontFamily: string]: FontSource },\n source?: FontSource\n): Promise<void> {\n if (typeof fontFamilyOrFontMap === 'object') {\n if (source) {\n throw new CodedError(\n `ERR_FONT_API`,\n `No fontFamily can be used for the provided source: ${source}. The second argument of \\`loadAsync()\\` can only be used with a \\`string\\` value as the first argument.`\n );\n }\n const fontMap = fontFamilyOrFontMap;\n const names = Object.keys(fontMap);\n await Promise.all(names.map(name => loadFontInNamespaceAsync(name, fontMap[name])));\n return;\n }\n\n return await loadFontInNamespaceAsync(fontFamilyOrFontMap, source);\n}\n\nasync function loadFontInNamespaceAsync(\n fontFamily: string,\n source?: FontSource | null\n): Promise<void> {\n if (!source) {\n throw new CodedError(\n `ERR_FONT_SOURCE`,\n `Cannot load null or undefined font source: { \"${fontFamily}\": ${source} }. Expected asset of type \\`FontSource\\` for fontFamily of name: \"${fontFamily}\"`\n );\n }\n\n if (loaded[fontFamily]) {\n return;\n }\n\n if (loadPromises[fontFamily]) {\n return loadPromises[fontFamily];\n }\n\n // Important: we want all callers that concurrently try to load the same font to await the same\n // promise. If we're here, we haven't created the promise yet. To ensure we create only one\n // promise in the program, we need to create the promise synchronously without yielding the event\n // loop from this point.\n\n const asset = getAssetForSource(source);\n loadPromises[fontFamily] = (async () => {\n try {\n await loadSingleFontAsync(fontFamily, asset);\n loaded[fontFamily] = true;\n } finally {\n delete loadPromises[fontFamily];\n }\n })();\n\n await loadPromises[fontFamily];\n}\n\n/**\n * Unloads all of the custom fonts. This is used for testing.\n */\nexport async function unloadAllAsync(): Promise<void> {\n if (!ExpoFontLoader.unloadAllAsync) {\n throw new UnavailabilityError('expo-font', 'unloadAllAsync');\n }\n\n if (Object.keys(loadPromises).length) {\n throw new CodedError(\n `ERR_UNLOAD`,\n `Cannot unload fonts while they're still loading: ${Object.keys(loadPromises).join(', ')}`\n );\n }\n\n for (const fontFamily of Object.keys(loaded)) {\n delete loaded[fontFamily];\n }\n\n await ExpoFontLoader.unloadAllAsync();\n}\n\n/**\n * Unload custom fonts matching the `fontFamily`s and display values provided.\n * Because fonts are automatically unloaded on every platform this is mostly used for testing.\n *\n * @param fontFamilyOrFontMap the names of the custom fonts that will be unloaded.\n * @param source when `fontFamilyOrFontMap` is a string, this should be the font source used to load the custom font originally.\n */\nexport async function unloadAsync(\n fontFamilyOrFontMap: string | { [fontFamily: string]: UnloadFontOptions },\n options?: UnloadFontOptions\n): Promise<void> {\n if (!ExpoFontLoader.unloadAsync) {\n throw new UnavailabilityError('expo-font', 'unloadAsync');\n }\n if (typeof fontFamilyOrFontMap === 'object') {\n if (options) {\n throw new CodedError(\n `ERR_FONT_API`,\n `No fontFamily can be used for the provided options: ${options}. The second argument of \\`unloadAsync()\\` can only be used with a \\`string\\` value as the first argument.`\n );\n }\n const fontMap = fontFamilyOrFontMap;\n const names = Object.keys(fontMap);\n await Promise.all(names.map(name => unloadFontInNamespaceAsync(name, fontMap[name])));\n return;\n }\n\n return await unloadFontInNamespaceAsync(fontFamilyOrFontMap, options);\n}\n\nasync function unloadFontInNamespaceAsync(\n fontFamily: string,\n options?: UnloadFontOptions | null\n): Promise<void> {\n if (!loaded[fontFamily]) {\n return;\n } else {\n delete loaded[fontFamily];\n }\n\n // Important: we want all callers that concurrently try to load the same font to await the same\n // promise. If we're here, we haven't created the promise yet. To ensure we create only one\n // promise in the program, we need to create the promise synchronously without yielding the event\n // loop from this point.\n\n const nativeFontName = getNativeFontName(fontFamily);\n\n if (!nativeFontName) {\n throw new CodedError(`ERR_FONT_FAMILY`, `Cannot unload an empty name`);\n }\n\n await ExpoFontLoader.unloadAsync(nativeFontName, options);\n}\n\nexport { FontDisplay, FontSource, FontResource, UnloadFontOptions };\n","import { Platform, NativeModules } from './react-native';\n\nconst NativeIconAPI =\n NativeModules.RNVectorIconsManager || NativeModules.RNVectorIconsModule;\n\nexport default function ensureNativeModuleAvailable() {\n if (!NativeIconAPI) {\n if (Platform.OS === 'android') {\n throw new Error(\n 'RNVectorIconsModule not available, did you properly integrate the module? Try running `react-native link react-native-vector-icons` and recompiling.'\n );\n }\n throw new Error(\n 'RNVectorIconsManager not available, did you add the library to your project and link with libRNVectorIcons.a? Try running `react-native link react-native-vector-icons` and recompiling.'\n );\n }\n}\n","import isString from 'lodash.isstring';\nimport omit from 'lodash.omit';\nimport pick from 'lodash.pick';\nimport React, { PureComponent } from 'react';\nimport { StyleSheet, Text, TouchableHighlight, View } from './react-native';\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'center',\n padding: 8,\n },\n touchable: {\n overflow: 'hidden',\n },\n icon: {\n marginRight: 10,\n },\n text: {\n fontWeight: '600',\n backgroundColor: 'transparent',\n },\n});\n\nconst IOS7_BLUE = '#007AFF';\n\nconst TEXT_PROP_NAMES = [\n 'ellipsizeMode',\n 'numberOfLines',\n 'textBreakStrategy',\n 'selectable',\n 'suppressHighlighting',\n 'allowFontScaling',\n 'adjustsFontSizeToFit',\n 'minimumFontScale',\n];\n\nconst TOUCHABLE_PROP_NAMES = [\n 'accessible',\n 'accessibilityLabel',\n 'accessibilityHint',\n 'accessibilityComponentType',\n 'accessibilityRole',\n 'accessibilityStates',\n 'accessibilityTraits',\n 'onFocus',\n 'onBlur',\n 'disabled',\n 'onPress',\n 'onPressIn',\n 'onPressOut',\n 'onLayout',\n 'onLongPress',\n 'nativeID',\n 'testID',\n 'delayPressIn',\n 'delayPressOut',\n 'delayLongPress',\n 'activeOpacity',\n 'underlayColor',\n 'selectionColor',\n 'onShowUnderlay',\n 'onHideUnderlay',\n 'hasTVPreferredFocus',\n 'tvParallaxProperties',\n];\n\nexport default function createIconButtonComponent(Icon) {\n return class IconButton extends PureComponent {\n static defaultProps = {\n backgroundColor: IOS7_BLUE,\n borderRadius: 5,\n color: 'white',\n size: 20,\n };\n\n render() {\n const { style, iconStyle, children, ...restProps } = this.props;\n\n const iconProps = pick(\n restProps,\n TEXT_PROP_NAMES,\n 'style',\n 'name',\n 'size',\n 'color'\n );\n const touchableProps = pick(restProps, TOUCHABLE_PROP_NAMES);\n const props = omit(\n restProps,\n Object.keys(iconProps),\n Object.keys(touchableProps),\n 'iconStyle',\n 'borderRadius',\n 'backgroundColor'\n );\n iconProps.style = iconStyle ? [styles.icon, iconStyle] : styles.icon;\n\n const colorStyle = pick(this.props, 'color');\n const blockStyle = pick(this.props, 'backgroundColor', 'borderRadius');\n\n return (\n <TouchableHighlight\n style={[styles.touchable, blockStyle]}\n {...touchableProps}\n >\n <View style={[styles.container, blockStyle, style]} {...props}>\n <Icon {...iconProps} />\n {isString(children) ? (\n <Text style={[styles.text, colorStyle]}>{children}</Text>\n ) : (\n children\n )}\n </View>\n </TouchableHighlight>\n );\n }\n };\n}\n","import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NativeModules,\n Platform,\n PixelRatio,\n processColor,\n Text,\n} from './react-native';\n\nimport ensureNativeModuleAvailable from './ensure-native-module-available';\nimport createIconSourceCache from './create-icon-source-cache';\nimport createIconButtonComponent from './icon-button';\nimport createTabBarItemIOSComponent from './tab-bar-item-ios';\n\nexport const NativeIconAPI =\n NativeModules.RNVectorIconsManager || NativeModules.RNVectorIconsModule;\n\nexport const DEFAULT_ICON_SIZE = 12;\nexport const DEFAULT_ICON_COLOR = 'black';\n\nexport default function createIconSet(\n glyphMap,\n fontFamily,\n fontFile,\n fontStyle\n) {\n // Android doesn't care about actual fontFamily name, it will only look in fonts folder.\n const fontBasename = fontFile\n ? fontFile.replace(/\\.(otf|ttf)$/, '')\n : fontFamily;\n\n const fontReference = Platform.select({\n windows: `/Assets/${fontFile}#${fontFamily}`,\n android: fontBasename,\n web: fontBasename,\n default: fontFamily,\n });\n\n class Icon extends PureComponent {\n root = null;\n\n static defaultProps = {\n size: DEFAULT_ICON_SIZE,\n allowFontScaling: false,\n };\n\n setNativeProps(nativeProps) {\n if (this.root) {\n this.root.setNativeProps(nativeProps);\n }\n }\n\n handleRef = ref => {\n this.root = ref;\n };\n\n render() {\n const { name, size, color, style, children, ...props } = this.props;\n\n let glyph = name ? glyphMap[name] || '?' : '';\n if (typeof glyph === 'number') {\n glyph = String.fromCodePoint(glyph);\n }\n\n const styleDefaults = {\n fontSize: size,\n color,\n };\n\n const styleOverrides = {\n fontFamily: fontReference,\n fontWeight: 'normal',\n fontStyle: 'normal',\n };\n\n props.style = [styleDefaults, style, styleOverrides, fontStyle || {}];\n props.ref = this.handleRef;\n\n return (\n <Text {...props}>\n {glyph}\n {children}\n </Text>\n );\n }\n }\n\n const imageSourceCache = createIconSourceCache();\n\n function resolveGlyph(name) {\n const glyph = glyphMap[name] || '?';\n if (typeof glyph === 'number') {\n return String.fromCodePoint(glyph);\n }\n return glyph;\n }\n\n function getImageSourceSync(\n name,\n size = DEFAULT_ICON_SIZE,\n color = DEFAULT_ICON_COLOR\n ) {\n ensureNativeModuleAvailable();\n\n const glyph = resolveGlyph(name);\n const processedColor = processColor(color);\n const cacheKey = `${glyph}:${size}:${processedColor}`;\n\n if (imageSourceCache.has(cacheKey)) {\n return imageSourceCache.get(cacheKey);\n }\n try {\n const imagePath = NativeIconAPI.getImageForFontSync(\n fontReference,\n glyph,\n size,\n processedColor\n );\n const value = { uri: imagePath, scale: PixelRatio.get() };\n imageSourceCache.setValue(cacheKey, value);\n return value;\n } catch (error) {\n imageSourceCache.setError(cacheKey, error);\n throw error;\n }\n }\n\n async function getImageSource(\n name,\n size = DEFAULT_ICON_SIZE,\n color = DEFAULT_ICON_COLOR\n ) {\n ensureNativeModuleAvailable();\n\n const glyph = resolveGlyph(name);\n const processedColor = processColor(color);\n const cacheKey = `${glyph}:${size}:${processedColor}`;\n\n if (imageSourceCache.has(cacheKey)) {\n return imageSourceCache.get(cacheKey);\n }\n try {\n const imagePath = await NativeIconAPI.getImageForFont(\n fontReference,\n glyph,\n size,\n processedColor\n );\n const value = { uri: imagePath, scale: PixelRatio.get() };\n imageSourceCache.setValue(cacheKey, value);\n return value;\n } catch (error) {\n imageSourceCache.setError(cacheKey, error);\n throw error;\n }\n }\n\n async function loadFont(file = fontFile) {\n if (Platform.OS === 'ios') {\n ensureNativeModuleAvailable();\n if (!file) {\n throw new Error('Unable to load font, because no file was specified. ');\n }\n await NativeIconAPI.loadFontWithFileName(...file.split('.'));\n }\n }\n\n function hasIcon(name) {\n return Object.prototype.hasOwnProperty.call(glyphMap, name);\n }\n\n function getRawGlyphMap() {\n return glyphMap;\n }\n\n function getFontFamily() {\n return fontReference;\n }\n\n Icon.Button = createIconButtonComponent(Icon);\n Icon.TabBarItemIOS = Icon.TabBarItem;\n Icon.getImageSource = getImageSource;\n Icon.getImageSourceSync = getImageSourceSync;\n Icon.loadFont = loadFont;\n Icon.hasIcon = hasIcon;\n Icon.getRawGlyphMap = getRawGlyphMap;\n Icon.getFontFamily = getFontFamily;\n\n return Icon;\n}\n","const TYPE_VALUE = 'value';\nconst TYPE_ERROR = 'error';\n\nexport default function createIconSourceCache() {\n const cache = new Map();\n\n const setValue = (key, value) =>\n cache.set(key, { type: TYPE_VALUE, data: value });\n\n const setError = (key, error) =>\n cache.set(key, { type: TYPE_ERROR, data: error });\n\n const has = key => cache.has(key);\n\n const get = key => {\n if (!cache.has(key)) {\n return undefined;\n }\n const { type, data } = cache.get(key);\n if (type === TYPE_ERROR) {\n throw data;\n }\n return data;\n };\n\n return { setValue, setError, has, get };\n}\n","import * as Font from \"expo-font\";\nimport React, { ComponentClass } from \"react\";\nimport {\n Text,\n TextProps,\n TouchableHighlightProps,\n ViewProps,\n OpaqueColorValue,\n TextStyle,\n ViewStyle,\n} from \"react-native\";\n\nimport createIconSet from \"./vendor/react-native-vector-icons/lib/create-icon-set\";\nimport createIconButtonComponent from \"./vendor/react-native-vector-icons/lib/icon-button\";\n\nexport {\n DEFAULT_ICON_COLOR,\n DEFAULT_ICON_SIZE,\n} from \"./vendor/react-native-vector-icons/lib/create-icon-set\";\n\nexport interface IconProps<GLYPHS extends string> extends TextProps {\n /**\n * Size of the icon, can also be passed as fontSize in the style object.\n *\n * @default 12\n */\n size?: number;\n\n /**\n * Name of the icon to show\n *\n * See Icon Explorer app\n * {@link https://expo.github.io/vector-icons/}\n */\n name: GLYPHS;\n\n /**\n * Color of the icon. Can be a string or OpaqueColorValue (returned from\n * PlatformColor(..))\n *\n */\n color?: string | OpaqueColorValue;\n}\n\nexport interface IconButtonProps<GLYPHS extends string>\n extends IconProps<GLYPHS>,\n ViewProps,\n TouchableHighlightProps {\n /**\n * Text and icon color\n * Use iconStyle or nest a Text component if you need different colors.\n * Can be a string or OpaqueColorValue (returned from PlatformColor(..))\n *\n * @default 'white'\n */\n color?: string | OpaqueColorValue;\n\n /**\n * Border radius of the button\n * Set to 0 to disable.\n *\n * @default 5\n */\n borderRadius?: number;\n\n /**\n * Styles applied to the icon only\n * Good for setting margins or a different color.\n *\n * @default {marginRight: 10}\n */\n iconStyle?: TextStyle;\n\n /**\n * Style prop inherited from TextProps and TouchableWithoutFeedbackProperties\n * Only exist here so we can have ViewStyle or TextStyle\n *\n */\n style?: ViewStyle | TextStyle;\n\n /**\n * Background color of the button. Can be a string or OpaqueColorValue (returned from\n * PlatformColor(..))\n *\n * @default '#007AFF'\n */\n backgroundColor?: string | OpaqueColorValue;\n}\n\nexport type GlyphMap<G extends string> = { [K in G]: number | string };\n\nexport interface Icon<G extends string, FN extends string> {\n defaultProps: any;\n Button: ComponentClass<IconButtonProps<G>>;\n glyphMap: GlyphMap<G>;\n getRawGlyphMap: () => GlyphMap<G>;\n getFontFamily: () => FN;\n loadFont: () => Promise<void>;\n font: { [x: string]: any };\n new (props: IconProps<G>): React.Component<IconProps<G>>;\n}\n\nexport default function <G extends string, FN extends string>(\n glyphMap: GlyphMap<G>,\n fontName: FN,\n expoAssetId,\n fontStyle?: any\n): Icon<G, FN> {\n const font = { [fontName]: expoAssetId };\n const RNVIconComponent = createIconSet(glyphMap, fontName, null, fontStyle);\n\n return class Icon extends React.Component<IconProps<G>> {\n static defaultProps = RNVIconComponent.defaultProps;\n static Button = createIconButtonComponent(Icon);\n static glyphMap = glyphMap;\n static getRawGlyphMap = () => glyphMap;\n static getFontFamily = () => fontName;\n static loadFont = () => Font.loadAsync(font);\n static font = font;\n\n _mounted = false;\n _icon?: any;\n\n state = {\n fontIsLoaded: Font.isLoaded(fontName),\n };\n\n async componentDidMount() {\n this._mounted = true;\n if (!this.state.fontIsLoaded) {\n await Font.loadAsync(font);\n this._mounted && this.setState({ fontIsLoaded: true });\n }\n }\n\n componentWillUnmount() {\n this._mounted = false;\n }\n\n setNativeProps(props) {\n if (this._icon) {\n this._icon.setNativeProps(props);\n }\n }\n\n render() {\n if (__DEV__ && this.props.name && !(this.props.name in glyphMap)) {\n console.warn(\n `\"${this.props.name}\" is not a valid icon name for family \"${fontName}\"`\n );\n }\n\n if (!this.state.fontIsLoaded) {\n return <Text />;\n }\n\n return (\n <RNVIconComponent\n ref={(view) => {\n this._icon = view;\n }}\n {...this.props}\n />\n );\n }\n };\n}\n","import createIconSet from './createIconSet';\nimport font from './vendor/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf';\nimport glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json';\n\nexport default createIconSet(glyphMap, 'material-community', font);\n","import MaterialCommunityIcons from './build/MaterialCommunityIcons';\nexport default MaterialCommunityIcons;\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) 2016-present, Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nvar LogBox = {\n ignoreLogs: function ignoreLogs() {},\n ignoreAllLogs: function ignoreAllLogs() {},\n uninstall: function uninstall() {},\n install: function install() {}\n};\nexport default LogBox;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = capitalizeString;\nfunction capitalizeString(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}","/* global AFRAME */\n\nif (typeof AFRAME === 'undefined') {\n throw new Error('Component attempted to register before AFRAME was available.');\n}\n\nlet accessorFn = require('accessor-fn');\nif ('default' in accessorFn) {\n // unwrap default export\n accessorFn = accessorFn.default;\n}\n\nlet ThreeForceGraph = require('three-forcegraph');\nif ('default' in ThreeForceGraph) {\n // unwrap default export\n ThreeForceGraph = ThreeForceGraph.default;\n}\n\nconst parseJson = function (prop) {\n return (typeof prop === 'string')\n ? JSON.parse(prop)\n : prop; // already parsed\n};\n\nconst parseFn = function (prop) {\n if (typeof prop === 'function') return prop; // already a function\n const geval = eval; // Avoid using eval directly https://github.com/rollup/rollup/wiki/Troubleshooting#avoiding-eval\n try {\n const evalled = geval('(' + prop + ')');\n return evalled;\n } catch (e) {} // Can't eval, not a function\n return null;\n};\n\nconst parseAccessor = function (prop) {\n if (!isNaN(parseFloat(prop))) { return parseFloat(prop); } // parse numbers\n if (parseFn(prop)) { return parseFn(prop); } // parse functions\n return prop; // strings\n};\n\n/**\n * 3D Force-Directed Graph component for A-Frame.\n */\nAFRAME.registerComponent('forcegraph', {\n schema: {\n jsonUrl: { type: 'string', default: '' },\n nodes: { parse: parseJson, default: [] },\n links: { parse: parseJson, default: [] },\n numDimensions: { type: 'number', default: 3 },\n dagMode: { type: 'string', default: '' },\n dagLevelDistance: { type: 'number', default: 0 },\n dagNodeFilter: { parse: parseFn, function() { return true; }},\n onDagError: { parse: parseFn, default: undefined },\n nodeRelSize: { type: 'number', default: 4 }, // volume per val unit\n nodeId: { type: 'string', default: 'id' },\n nodeVal: { parse: parseAccessor, default: 'val' },\n nodeResolution: { type: 'number', default: 8 }, // how many slice segments in the sphere's circumference\n nodeVisibility: { parse: parseAccessor, default: true },\n nodeColor: { parse: parseAccessor, default: 'color' },\n nodeAutoColorBy: { parse: parseAccessor, default: '' }, // color nodes with the same field equally\n nodeOpacity: { type: 'number', default: 0.75 },\n nodeThreeObject: { parse: parseAccessor, default: null },\n nodeThreeObjectExtend: { parse: parseAccessor, default: false },\n linkSource: { type: 'string', default: 'source' },\n linkTarget: { type: 'string', default: 'target' },\n linkVisibility: { parse: parseAccessor, default: true },\n linkColor: { parse: parseAccessor, default: 'color' },\n linkAutoColorBy: { parse: parseAccessor, default: '' }, // color links with the same field equally\n linkOpacity: { type: 'number', default: 0.2 },\n linkWidth: { parse: parseAccessor, default: 0 },\n linkResolution: { type: 'number', default: 6 }, // how many radial segments in each line cylinder's geometry\n linkCurvature: { parse: parseAccessor, default: 0 },\n linkCurveRotation: { parse: parseAccessor, default: 0 },\n linkMaterial: { parse: parseAccessor, default: null },\n linkThreeObject: { parse: parseAccessor, default: null },\n linkThreeObjectExtend: { parse: parseAccessor, default: false },\n linkPositionUpdate: { parse: parseFn, default: null },\n linkDirectionalArrowLength: { parse: parseAccessor, default: 0 },\n linkDirectionalArrowColor: { parse: parseAccessor, default: null },\n linkDirectionalArrowRelPos: { parse: parseAccessor, default: 0.5 }, // value between 0<>1 indicating the relative pos along the (exposed) line\n linkDirectionalArrowResolution: { type: 'number', default: 8 }, // how many slice segments in the arrow's conic circumference\n linkDirectionalParticles: { parse: parseAccessor, default: 0 }, // animate photons travelling in the link direction\n linkDirectionalParticleSpeed: { parse: parseAccessor, default: 0.01 }, // in link length ratio per frame\n linkDirectionalParticleWidth: { parse: parseAccessor, default: 0.5 },\n linkDirectionalParticleColor: { parse: parseAccessor, default: null },\n linkDirectionalParticleResolution: { type: 'number', default: 4 }, // how many slice segments in the particle sphere's circumference\n onNodeHover: { parse: parseFn, default: () => {} },\n onLinkHover: { parse: parseFn, default: () => {} },\n onNodeClick: { parse: parseFn, default: () => {} },\n onLinkClick: { parse: parseFn, default: () => {} },\n forceEngine: { type: 'string', default: 'd3' }, // 'd3' or 'ngraph'\n d3AlphaMin: { type: 'number', default: 0 },\n d3AlphaDecay: { type: 'number', default: 0.0228 },\n d3VelocityDecay: { type: 'number', default: 0.4 },\n ngraphPhysics: { parse: parseJson, default: null },\n warmupTicks: { type: 'int', default: 0 }, // how many times to tick the force engine at init before starting to render\n cooldownTicks: { type: 'int', default: 1e18 }, // Simulate infinity (int parser doesn't accept Infinity object)\n cooldownTime: { type: 'int', default: 15000 }, // ms\n onEngineTick: { parse: parseFn, default: function () {} },\n onEngineStop: { parse: parseFn, default: function () {} }\n },\n\n // Bind component methods\n getGraphBbox: function() {\n if (!this.forceGraph) {\n // Got here before component init -> initialize forceGraph\n this.forceGraph = new ThreeForceGraph();\n }\n\n return this.forceGraph.getGraphBbox();\n },\n emitParticle: function () {\n if (!this.forceGraph) {\n // Got here before component init -> initialize forceGraph\n this.forceGraph = new ThreeForceGraph();\n }\n\n const forceGraph = this.forceGraph;\n const returnVal = forceGraph.emitParticle.apply(forceGraph, arguments);\n\n return returnVal === forceGraph\n ? this // return self, not the inner forcegraph component\n : returnVal;\n },\n\n d3Force: function () {\n if (!this.forceGraph) {\n // Got here before component init -> initialize forceGraph\n this.forceGraph = new ThreeForceGraph();\n }\n\n const forceGraph = this.forceGraph;\n const returnVal = forceGraph.d3Force.apply(forceGraph, arguments);\n\n return returnVal === forceGraph\n ? this // return self, not the inner forcegraph component\n : returnVal;\n },\n\n d3ReheatSimulation: function () {\n this.forceGraph && this.forceGraph.d3ReheatSimulation();\n return this;\n },\n\n refresh: function () {\n this.forceGraph && this.forceGraph.refresh();\n return this;\n },\n\n init: function () {\n const state = this.state = {}; // Internal state\n\n // Add info msg\n state.infoEl = document.createElement('a-text');\n state.infoEl.setAttribute('position', '0 -0.1 -1'); // Canvas center\n state.infoEl.setAttribute('width', 1);\n state.infoEl.setAttribute('align', 'center');\n state.infoEl.setAttribute('color', 'lavender');\n\n // Get camera dom element and attach fixed view elements to camera\n const cameraEl = document.querySelector('a-entity[camera], a-camera');\n cameraEl.appendChild(state.infoEl);\n\n // Keep reference to Three camera object\n state.cameraObj = cameraEl.object3D.children\n .filter(function (child) { return child.type === 'PerspectiveCamera'; })[0];\n\n // On camera switch\n this.el.sceneEl.addEventListener('camera-set-active', function (evt) {\n // Switch camera reference\n state.cameraObj = evt.detail.cameraEl.components.camera.camera;\n });\n\n // setup FG object\n if (!this.forceGraph) this.forceGraph = new ThreeForceGraph(); // initialize forceGraph if it doesn't exist yet\n this.forceGraph\n .onFinishUpdate(() => this.el.setObject3D('forcegraphGroup', this.forceGraph)) // Bind forcegraph to elem\n .onLoading(() => state.infoEl.setAttribute('value', 'Loading...')) // Add loading msg\n .onFinishLoading(() => state.infoEl.setAttribute('value', ''));\n\n // prefer raycaster events over mouseenter/mouseleave because they expose immediately available intersection data via detail.getIntersection()\n this.el.addEventListener('raycaster-intersected', ev => state.hoverDetail = ev.detail);\n this.el.addEventListener('raycaster-intersected-cleared', ev => state.hoverDetail = ev.detail);\n\n this.el.addEventListener('click', () =>\n state.hoverObj && this.data['on' + (state.hoverObj.__graphObjType === 'node' ? 'Node' : 'Link') + 'Click'](state.hoverObj.__data)\n );\n },\n\n remove: function () {\n // Clean-up elems\n this.state.infoEl.remove();\n this.el.removeObject3D('forcegraphGroup');\n },\n\n update: function (oldData) {\n const comp = this;\n const elData = this.data;\n const diff = AFRAME.utils.diff(elData, oldData);\n\n const fgProps = [\n 'jsonUrl',\n 'numDimensions',\n 'dagMode',\n 'dagLevelDistance',\n 'dagNodeFilter',\n 'onDagError',\n 'nodeRelSize',\n 'nodeId',\n 'nodeVal',\n 'nodeResolution',\n 'nodeVisibility',\n 'nodeColor',\n 'nodeAutoColorBy',\n 'nodeOpacity',\n 'nodeThreeObject',\n 'nodeThreeObjectExtend',\n 'linkSource',\n 'linkTarget',\n 'linkVisibility',\n 'linkColor',\n 'linkAutoColorBy',\n 'linkOpacity',\n 'linkWidth',\n 'linkResolution',\n 'linkCurvature',\n 'linkCurveRotation',\n 'linkMaterial',\n 'linkThreeObject',\n 'linkThreeObjectExtend',\n 'linkPositionUpdate',\n 'linkDirectionalArrowLength',\n 'linkDirectionalArrowColor',\n 'linkDirectionalArrowRelPos',\n 'linkDirectionalArrowResolution',\n 'linkDirectionalParticles',\n 'linkDirectionalParticleSpeed',\n 'linkDirectionalParticleWidth',\n 'linkDirectionalParticleColor',\n 'linkDirectionalParticleResolution',\n 'forceEngine',\n 'd3AlphaMin',\n 'd3AphaDecay',\n 'd3VelocityDecay',\n 'ngraphPhysics',\n 'warmupTicks',\n 'cooldownTicks',\n 'cooldownTime',\n 'onEngineTick',\n 'onEngineStop'\n ];\n\n fgProps\n .filter(function (p) { return p in diff; })\n .forEach(function (p) { comp.forceGraph[p](elData[p] !== '' ? elData[p] : null); }); // Convert blank values into nulls\n\n if ('nodes' in diff || 'links' in diff) {\n comp.forceGraph.graphData({\n nodes: elData.nodes,\n links: elData.links\n });\n }\n },\n\n tick: function (t, td) {\n const state = this.state;\n const props = this.data;\n\n // Update hover (intersected) object\n const intersection = state.hoverDetail\n ? state.hoverDetail.getIntersection\n ? state.hoverDetail.getIntersection(this.el) // available in raycaster-intersected events\n : state.hoverDetail.intersection || undefined // available in mouseenter/mouseleave events (with delayed update)\n : undefined;\n\n // Note:\n // Unfortunately we only have access to the intersected object closer to the camera (1st element in the raycaster intersectObjects result),\n // there is no \".getIntersections()\" method available in the event details. Therefore, we can't prioritize hover on nodes over links, or even exclude\n // objects that are neither nodes or links. This makes the interaction a bit erratic if nodes have a lot of links in front.\n // Configuring the raycaster.params.Line.threshold might help with this somewhat, but that config is also not available via the a-frame raycaster component.\n\n // recurse up until forcegraph obj is found\n let topObject = intersection ? intersection.object : undefined;\n while (topObject && !topObject.hasOwnProperty('__graphObjType'))\n topObject = topObject.parent;\n\n if (topObject !== state.hoverObj) {\n const prevObjType = state.hoverObj ? state.hoverObj.__graphObjType : null;\n const prevObjData = state.hoverObj ? state.hoverObj.__data : null;\n const objType = topObject ? topObject.__graphObjType : null;\n const objData = topObject ? topObject.__data : null;\n\n if (prevObjType && prevObjType !== objType) {\n // Hover out\n props['on' + (prevObjType === 'node' ? 'Node' : 'Link') + 'Hover'](null, prevObjData);\n }\n if (objType) {\n // Hover in\n props['on' + (objType === 'node' ? 'Node' : 'Link') + 'Hover'](objData, prevObjType === objType ? prevObjData : null);\n }\n\n state.hoverObj = topObject;\n }\n\n // Run force-graph ticker\n this.forceGraph.tickFrame();\n }\n});\n","/**\n * Manages a simulation of physical forces acting on bodies and springs.\n */\nmodule.exports = createPhysicsSimulator;\n\nvar generateCreateBodyFunction = require('./codeGenerators/generateCreateBody');\nvar generateQuadTreeFunction = require('./codeGenerators/generateQuadTree');\nvar generateBoundsFunction = require('./codeGenerators/generateBounds');\nvar generateCreateDragForceFunction = require('./codeGenerators/generateCreateDragForce');\nvar generateCreateSpringForceFunction = require('./codeGenerators/generateCreateSpringForce');\nvar generateIntegratorFunction = require('./codeGenerators/generateIntegrator');\n\nvar dimensionalCache = {};\n\nfunction createPhysicsSimulator(settings) {\n var Spring = require('./spring');\n var merge = require('ngraph.merge');\n var eventify = require('ngraph.events');\n if (settings) {\n // Check for names from older versions of the layout\n if (settings.springCoeff !== undefined) throw new Error('springCoeff was renamed to springCoefficient');\n if (settings.dragCoeff !== undefined) throw new Error('dragCoeff was renamed to dragCoefficient');\n }\n\n settings = merge(settings, {\n /**\n * Ideal length for links (springs in physical model).\n */\n springLength: 10,\n\n /**\n * Hook's law coefficient. 1 - solid spring.\n */\n springCoefficient: 0.8, \n\n /**\n * Coulomb's law coefficient. It's used to repel nodes thus should be negative\n * if you make it positive nodes start attract each other :).\n */\n gravity: -12,\n\n /**\n * Theta coefficient from Barnes Hut simulation. Ranged between (0, 1).\n * The closer it's to 1 the more nodes algorithm will have to go through.\n * Setting it to one makes Barnes Hut simulation no different from\n * brute-force forces calculation (each node is considered).\n */\n theta: 0.8,\n\n /**\n * Drag force coefficient. Used to slow down system, thus should be less than 1.\n * The closer it is to 0 the less tight system will be.\n */\n dragCoefficient: 0.9, // TODO: Need to rename this to something better. E.g. `dragCoefficient`\n\n /**\n * Default time step (dt) for forces integration\n */\n timeStep : 0.5,\n\n /**\n * Adaptive time step uses average spring length to compute actual time step:\n * See: https://twitter.com/anvaka/status/1293067160755957760\n */\n adaptiveTimeStepWeight: 0,\n\n /**\n * This parameter defines number of dimensions of the space where simulation\n * is performed. \n */\n dimensions: 2,\n\n /**\n * In debug mode more checks are performed, this will help you catch errors\n * quickly, however for production build it is recommended to turn off this flag\n * to speed up computation.\n */\n debug: false\n });\n\n var factory = dimensionalCache[settings.dimensions];\n if (!factory) {\n var dimensions = settings.dimensions;\n factory = {\n Body: generateCreateBodyFunction(dimensions, settings.debug),\n createQuadTree: generateQuadTreeFunction(dimensions),\n createBounds: generateBoundsFunction(dimensions),\n createDragForce: generateCreateDragForceFunction(dimensions),\n createSpringForce: generateCreateSpringForceFunction(dimensions),\n integrate: generateIntegratorFunction(dimensions),\n };\n dimensionalCache[dimensions] = factory;\n }\n\n var Body = factory.Body;\n var createQuadTree = factory.createQuadTree;\n var createBounds = factory.createBounds;\n var createDragForce = factory.createDragForce;\n var createSpringForce = factory.createSpringForce;\n var integrate = factory.integrate;\n var createBody = pos => new Body(pos);\n\n var random = require('ngraph.random').random(42);\n var bodies = []; // Bodies in this simulation.\n var springs = []; // Springs in this simulation.\n\n var quadTree = createQuadTree(settings, random);\n var bounds = createBounds(bodies, settings, random);\n var springForce = createSpringForce(settings, random);\n var dragForce = createDragForce(settings);\n\n var totalMovement = 0; // how much movement we made on last step\n var forces = [];\n var forceMap = new Map();\n var iterationNumber = 0;\n \n addForce('nbody', nbodyForce);\n addForce('spring', updateSpringForce);\n\n var publicApi = {\n /**\n * Array of bodies, registered with current simulator\n *\n * Note: To add new body, use addBody() method. This property is only\n * exposed for testing/performance purposes.\n */\n bodies: bodies,\n \n quadTree: quadTree,\n\n /**\n * Array of springs, registered with current simulator\n *\n * Note: To add new spring, use addSpring() method. This property is only\n * exposed for testing/performance purposes.\n */\n springs: springs,\n\n /**\n * Returns settings with which current simulator was initialized\n */\n settings: settings,\n\n /**\n * Adds a new force to simulation\n */\n addForce: addForce,\n \n /**\n * Removes a force from the simulation.\n */\n removeForce: removeForce,\n\n /**\n * Returns a map of all registered forces.\n */\n getForces: getForces,\n\n /**\n * Performs one step of force simulation.\n *\n * @returns {boolean} true if system is considered stable; False otherwise.\n */\n step: function () {\n for (var i = 0; i < forces.length; ++i) {\n forces[i](iterationNumber);\n }\n var movement = integrate(bodies, settings.timeStep, settings.adaptiveTimeStepWeight);\n iterationNumber += 1;\n return movement;\n },\n\n /**\n * Adds body to the system\n *\n * @param {ngraph.physics.primitives.Body} body physical body\n *\n * @returns {ngraph.physics.primitives.Body} added body\n */\n addBody: function (body) {\n if (!body) {\n throw new Error('Body is required');\n }\n bodies.push(body);\n\n return body;\n },\n\n /**\n * Adds body to the system at given position\n *\n * @param {Object} pos position of a body\n *\n * @returns {ngraph.physics.primitives.Body} added body\n */\n addBodyAt: function (pos) {\n if (!pos) {\n throw new Error('Body position is required');\n }\n var body = createBody(pos);\n bodies.push(body);\n\n return body;\n },\n\n /**\n * Removes body from the system\n *\n * @param {ngraph.physics.primitives.Body} body to remove\n *\n * @returns {Boolean} true if body found and removed. falsy otherwise;\n */\n removeBody: function (body) {\n if (!body) { return; }\n\n var idx = bodies.indexOf(body);\n if (idx < 0) { return; }\n\n bodies.splice(idx, 1);\n if (bodies.length === 0) {\n bounds.reset();\n }\n return true;\n },\n\n /**\n * Adds a spring to this simulation.\n *\n * @returns {Object} - a handle for a spring. If you want to later remove\n * spring pass it to removeSpring() method.\n */\n addSpring: function (body1, body2, springLength, springCoefficient) {\n if (!body1 || !body2) {\n throw new Error('Cannot add null spring to force simulator');\n }\n\n if (typeof springLength !== 'number') {\n springLength = -1; // assume global configuration\n }\n\n var spring = new Spring(body1, body2, springLength, springCoefficient >= 0 ? springCoefficient : -1);\n springs.push(spring);\n\n // TODO: could mark simulator as dirty.\n return spring;\n },\n\n /**\n * Returns amount of movement performed on last step() call\n */\n getTotalMovement: function () {\n return totalMovement;\n },\n\n /**\n * Removes spring from the system\n *\n * @param {Object} spring to remove. Spring is an object returned by addSpring\n *\n * @returns {Boolean} true if spring found and removed. falsy otherwise;\n */\n removeSpring: function (spring) {\n if (!spring) { return; }\n var idx = springs.indexOf(spring);\n if (idx > -1) {\n springs.splice(idx, 1);\n return true;\n }\n },\n\n getBestNewBodyPosition: function (neighbors) {\n return bounds.getBestNewPosition(neighbors);\n },\n\n /**\n * Returns bounding box which covers all bodies\n */\n getBBox: getBoundingBox, \n getBoundingBox: getBoundingBox, \n\n invalidateBBox: function () {\n console.warn('invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call');\n },\n\n // TODO: Move the force specific stuff to force\n gravity: function (value) {\n if (value !== undefined) {\n settings.gravity = value;\n quadTree.options({gravity: value});\n return this;\n } else {\n return settings.gravity;\n }\n },\n\n theta: function (value) {\n if (value !== undefined) {\n settings.theta = value;\n quadTree.options({theta: value});\n return this;\n } else {\n return settings.theta;\n }\n },\n\n /**\n * Returns pseudo-random number generator instance.\n */\n random: random\n };\n\n // allow settings modification via public API:\n expose(settings, publicApi);\n\n eventify(publicApi);\n\n return publicApi;\n\n function getBoundingBox() {\n bounds.update();\n return bounds.box;\n }\n\n function addForce(forceName, forceFunction) {\n if (forceMap.has(forceName)) throw new Error('Force ' + forceName + ' is already added');\n\n forceMap.set(forceName, forceFunction);\n forces.push(forceFunction);\n }\n\n function removeForce(forceName) {\n var forceIndex = forces.indexOf(forceMap.get(forceName));\n if (forceIndex < 0) return;\n forces.splice(forceIndex, 1);\n forceMap.delete(forceName);\n }\n\n function getForces() {\n // TODO: Should I trust them or clone the forces?\n return forceMap;\n }\n\n function nbodyForce(/* iterationUmber */) {\n if (bodies.length === 0) return;\n\n quadTree.insertBodies(bodies);\n var i = bodies.length;\n while (i--) {\n var body = bodies[i];\n if (!body.isPinned) {\n body.reset();\n quadTree.updateBodyForce(body);\n dragForce.update(body);\n }\n }\n }\n\n function updateSpringForce() {\n var i = springs.length;\n while (i--) {\n springForce.update(springs[i]);\n }\n }\n\n}\n\nfunction expose(settings, target) {\n for (var key in settings) {\n augment(settings, target, key);\n }\n}\n\nfunction augment(source, target, key) {\n if (!source.hasOwnProperty(key)) return;\n if (typeof target[key] === 'function') {\n // this accessor is already defined. Ignore it\n return;\n }\n var sourceIsNumber = Number.isFinite(source[key]);\n\n if (sourceIsNumber) {\n target[key] = function (value) {\n if (value !== undefined) {\n if (!Number.isFinite(value)) throw new Error('Value of ' + key + ' should be a valid number.');\n source[key] = value;\n return target;\n }\n return source[key];\n };\n } else {\n target[key] = function (value) {\n if (value !== undefined) {\n source[key] = value;\n return target;\n }\n return source[key];\n };\n }\n}\n","module.exports = function getVariableName(index) {\n if (index === 0) return 'x';\n if (index === 1) return 'y';\n if (index === 2) return 'z';\n return 'c' + (index + 1);\n};","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UIManager from '../UIManager'; // NativeModules shim\n\nvar NativeModules = {\n UIManager: UIManager\n};\nexport default NativeModules;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import type { NavigationState, PartialState, Route } from './types';\n\ntype ResetState =\n | PartialState<NavigationState>\n | NavigationState\n | (Omit<NavigationState, 'routes'> & {\n routes: Omit<Route<string>, 'key'>[];\n });\n\nexport type Action =\n | {\n type: 'GO_BACK';\n source?: string;\n target?: string;\n }\n | {\n type: 'NAVIGATE';\n payload:\n | { key: string; name?: undefined; params?: object; merge?: boolean }\n | { name: string; key?: string; params?: object; merge?: boolean };\n source?: string;\n target?: string;\n }\n | {\n type: 'RESET';\n payload: ResetState | undefined;\n source?: string;\n target?: string;\n }\n | {\n type: 'SET_PARAMS';\n payload: { params?: object };\n source?: string;\n target?: string;\n };\n\nexport function goBack(): Action {\n return { type: 'GO_BACK' };\n}\n\nexport function navigate(\n route:\n | { key: string; params?: object }\n | { name: string; key?: string; params?: object }\n): Action;\n// eslint-disable-next-line no-redeclare\nexport function navigate(name: string, params?: object): Action;\n// eslint-disable-next-line no-redeclare\nexport function navigate(...args: any): Action {\n if (typeof args[0] === 'string') {\n return { type: 'NAVIGATE', payload: { name: args[0], params: args[1] } };\n } else {\n const payload = args[0] || {};\n\n if (!payload.hasOwnProperty('key') && !payload.hasOwnProperty('name')) {\n throw new Error(\n 'You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.'\n );\n }\n\n return { type: 'NAVIGATE', payload };\n }\n}\n\nexport function reset(state: ResetState | undefined): Action {\n return { type: 'RESET', payload: state };\n}\n\nexport function setParams(params: object): Action {\n return { type: 'SET_PARAMS', payload: { params } };\n}\n","import * as React from 'react';\nimport {\n CommonActions,\n Route,\n NavigationState,\n InitialState,\n PartialState,\n NavigationAction,\n} from '@react-navigation/routers';\nimport EnsureSingleNavigator from './EnsureSingleNavigator';\nimport UnhandledActionContext from './UnhandledActionContext';\nimport NavigationBuilderContext from './NavigationBuilderContext';\nimport NavigationStateContext from './NavigationStateContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport NavigationContext from './NavigationContext';\nimport { ScheduleUpdateContext } from './useScheduleUpdate';\nimport useChildListeners from './useChildListeners';\nimport useKeyedChildListeners from './useKeyedChildListeners';\nimport useOptionsGetters from './useOptionsGetters';\nimport useEventEmitter from './useEventEmitter';\nimport useSyncState from './useSyncState';\nimport checkSerializable from './checkSerializable';\nimport type {\n NavigationContainerEventMap,\n NavigationContainerRef,\n NavigationContainerProps,\n} from './types';\n\ntype State = NavigationState | PartialState<NavigationState> | undefined;\n\nconst NOT_INITIALIZED_ERROR =\n \"The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.\";\n\nconst serializableWarnings: string[] = [];\n\ntry {\n /**\n * Migration instructions for removal of devtools from core\n */\n Object.defineProperty(\n global,\n 'REACT_NAVIGATION_REDUX_DEVTOOLS_EXTENSION_INTEGRATION_ENABLED',\n {\n set(_) {\n console.warn(\n \"Redux devtools extension integration can be enabled with the '@react-navigation/devtools' package. For more details, see https://reactnavigation.org/docs/devtools\"\n );\n },\n }\n );\n} catch (e) {\n // Ignore\n}\n\n/**\n * Remove `key` and `routeNames` from the state objects recursively to get partial state.\n *\n * @param state Initial state object.\n */\nconst getPartialState = (\n state: InitialState | undefined\n): PartialState<NavigationState> | undefined => {\n if (state === undefined) {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { key, routeNames, ...partialState } = state;\n\n return {\n ...partialState,\n stale: true,\n routes: state.routes.map((route) => {\n if (route.state === undefined) {\n return route as Route<string> & {\n state?: PartialState<NavigationState>;\n };\n }\n\n return { ...route, state: getPartialState(route.state) };\n }),\n };\n};\n\n/**\n * Container component which holds the navigation state.\n * This should be rendered at the root wrapping the whole app.\n *\n * @param props.initialState Initial state object for the navigation tree.\n * @param props.onStateChange Callback which is called with the latest navigation state when it changes.\n * @param props.children Child elements to render the content.\n * @param props.ref Ref object which refers to the navigation object containing helper methods.\n */\nconst BaseNavigationContainer = React.forwardRef(\n function BaseNavigationContainer(\n {\n initialState,\n onStateChange,\n onUnhandledAction,\n independent,\n children,\n }: NavigationContainerProps,\n ref?: React.Ref<NavigationContainerRef>\n ) {\n const parent = React.useContext(NavigationStateContext);\n\n if (!parent.isDefault && !independent) {\n throw new Error(\n \"Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitely. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.\"\n );\n }\n\n const [\n state,\n getState,\n setState,\n scheduleUpdate,\n flushUpdates,\n ] = useSyncState<State>(() =>\n getPartialState(initialState == null ? undefined : initialState)\n );\n\n const isFirstMountRef = React.useRef<boolean>(true);\n\n const navigatorKeyRef = React.useRef<string | undefined>();\n\n const getKey = React.useCallback(() => navigatorKeyRef.current, []);\n\n const setKey = React.useCallback((key: string) => {\n navigatorKeyRef.current = key;\n }, []);\n\n const { listeners, addListener } = useChildListeners();\n\n const { keyedListeners, addKeyedListener } = useKeyedChildListeners();\n\n const dispatch = (\n action: NavigationAction | ((state: NavigationState) => NavigationAction)\n ) => {\n if (listeners.focus[0] == null) {\n throw new Error(NOT_INITIALIZED_ERROR);\n }\n\n listeners.focus[0]((navigation) => navigation.dispatch(action));\n };\n\n const canGoBack = () => {\n if (listeners.focus[0] == null) {\n return false;\n }\n\n const { result, handled } = listeners.focus[0]((navigation) =>\n navigation.canGoBack()\n );\n\n if (handled) {\n return result;\n } else {\n return false;\n }\n };\n\n const resetRoot = React.useCallback(\n (state?: PartialState<NavigationState> | NavigationState) => {\n const target = state?.key ?? keyedListeners.getState.root?.().key;\n\n if (target == null) {\n throw new Error(NOT_INITIALIZED_ERROR);\n }\n\n listeners.focus[0]((navigation) =>\n navigation.dispatch({\n ...CommonActions.reset(state),\n target,\n })\n );\n },\n [keyedListeners.getState, listeners.focus]\n );\n\n const getRootState = React.useCallback(() => {\n return keyedListeners.getState.root?.();\n }, [keyedListeners.getState]);\n\n const getCurrentRoute = React.useCallback(() => {\n let state = getRootState();\n if (state === undefined) {\n return undefined;\n }\n while (state.routes[state.index].state !== undefined) {\n state = state.routes[state.index].state as NavigationState;\n }\n return state.routes[state.index];\n }, [getRootState]);\n\n const emitter = useEventEmitter<NavigationContainerEventMap>();\n\n const { addOptionsGetter, getCurrentOptions } = useOptionsGetters({});\n\n React.useImperativeHandle(ref, () => ({\n ...(Object.keys(CommonActions) as (keyof typeof CommonActions)[]).reduce<\n any\n >((acc, name) => {\n acc[name] = (...args: any[]) =>\n dispatch(\n CommonActions[name](\n // @ts-expect-error: we can't know the type statically\n ...args\n )\n );\n return acc;\n }, {}),\n ...emitter.create('root'),\n resetRoot,\n dispatch,\n canGoBack,\n getRootState,\n dangerouslyGetState: () => state,\n dangerouslyGetParent: () => undefined,\n getCurrentRoute,\n getCurrentOptions,\n }));\n\n const onDispatchAction = React.useCallback(\n (action: NavigationAction, noop: boolean) => {\n emitter.emit({ type: '__unsafe_action__', data: { action, noop } });\n },\n [emitter]\n );\n\n const lastEmittedOptionsRef = React.useRef<object | undefined>();\n\n const onOptionsChange = React.useCallback(\n (options) => {\n if (lastEmittedOptionsRef.current === options) {\n return;\n }\n\n lastEmittedOptionsRef.current = options;\n\n emitter.emit({\n type: 'options',\n data: { options },\n });\n },\n [emitter]\n );\n\n const builderContext = React.useMemo(\n () => ({\n addListener,\n addKeyedListener,\n onDispatchAction,\n onOptionsChange,\n }),\n [addListener, addKeyedListener, onDispatchAction, onOptionsChange]\n );\n\n const scheduleContext = React.useMemo(\n () => ({ scheduleUpdate, flushUpdates }),\n [scheduleUpdate, flushUpdates]\n );\n\n const isInitialRef = React.useRef(true);\n\n const getIsInitial = React.useCallback(() => isInitialRef.current, []);\n\n const context = React.useMemo(\n () => ({\n state,\n getState,\n setState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter,\n }),\n [\n state,\n getState,\n setState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter,\n ]\n );\n\n const onStateChangeRef = React.useRef(onStateChange);\n\n React.useEffect(() => {\n isInitialRef.current = false;\n onStateChangeRef.current = onStateChange;\n });\n\n React.useEffect(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (state !== undefined) {\n const result = checkSerializable(state);\n\n if (!result.serializable) {\n const { location, reason } = result;\n\n let path = '';\n let pointer: Record<any, any> = state;\n let params = false;\n\n for (let i = 0; i < location.length; i++) {\n const curr = location[i];\n const prev = location[i - 1];\n\n pointer = pointer[curr];\n\n if (!params && curr === 'state') {\n continue;\n } else if (!params && curr === 'routes') {\n if (path) {\n path += ' > ';\n }\n } else if (\n !params &&\n typeof curr === 'number' &&\n prev === 'routes'\n ) {\n path += pointer?.name;\n } else if (!params) {\n path += ` > ${curr}`;\n params = true;\n } else {\n if (typeof curr === 'number' || /^[0-9]+$/.test(curr)) {\n path += `[${curr}]`;\n } else if (/^[a-z$_]+$/i.test(curr)) {\n path += `.${curr}`;\n } else {\n path += `[${JSON.stringify(curr)}]`;\n }\n }\n }\n\n const message = `Non-serializable values were found in the navigation state. Check:\\n\\n${path} (${reason})\\n\\nThis can break usage such as persisting and restoring state. This might happen if you passed non-serializable values such as function, class instances etc. in params. If you need to use components with callbacks in your options, you can use 'navigation.setOptions' instead. See https://reactnavigation.org/docs/troubleshooting#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state for more details.`;\n\n if (!serializableWarnings.includes(message)) {\n serializableWarnings.push(message);\n console.warn(message);\n }\n }\n }\n }\n\n emitter.emit({ type: 'state', data: { state } });\n\n if (!isFirstMountRef.current && onStateChangeRef.current) {\n onStateChangeRef.current(getRootState());\n }\n\n isFirstMountRef.current = false;\n }, [getRootState, emitter, state]);\n\n const defaultOnUnhandledAction = React.useCallback(\n (action: NavigationAction) => {\n if (process.env.NODE_ENV === 'production') {\n return;\n }\n\n const payload: Record<string, any> | undefined = action.payload;\n\n let message = `The action '${action.type}'${\n payload ? ` with payload ${JSON.stringify(action.payload)}` : ''\n } was not handled by any navigator.`;\n\n switch (action.type) {\n case 'NAVIGATE':\n case 'PUSH':\n case 'REPLACE':\n case 'JUMP_TO':\n if (payload?.name) {\n message += `\\n\\nDo you have a screen named '${payload.name}'?\\n\\nIf you're trying to navigate to a screen in a nested navigator, see https://reactnavigation.org/docs/nesting-navigators#navigating-to-a-screen-in-a-nested-navigator.`;\n } else {\n message += `\\n\\nYou need to pass the name of the screen to navigate to.\\n\\nSee https://reactnavigation.org/docs/navigation-actions for usage.`;\n }\n\n break;\n case 'GO_BACK':\n case 'POP':\n case 'POP_TO_TOP':\n message += `\\n\\nIs there any screen to go back to?`;\n break;\n case 'OPEN_DRAWER':\n case 'CLOSE_DRAWER':\n case 'TOGGLE_DRAWER':\n message += `\\n\\nIs your screen inside a Drawer navigator?`;\n break;\n }\n\n message += `\\n\\nThis is a development-only warning and won't be shown in production.`;\n\n console.error(message);\n },\n []\n );\n\n let element = (\n <ScheduleUpdateContext.Provider value={scheduleContext}>\n <NavigationBuilderContext.Provider value={builderContext}>\n <NavigationStateContext.Provider value={context}>\n <UnhandledActionContext.Provider\n value={onUnhandledAction ?? defaultOnUnhandledAction}\n >\n <EnsureSingleNavigator>{children}</EnsureSingleNavigator>\n </UnhandledActionContext.Provider>\n </NavigationStateContext.Provider>\n </NavigationBuilderContext.Provider>\n </ScheduleUpdateContext.Provider>\n );\n\n if (independent) {\n // We need to clear any existing contexts for nested independent container to work correctly\n element = (\n <NavigationRouteContext.Provider value={undefined}>\n <NavigationContext.Provider value={undefined}>\n {element}\n </NavigationContext.Provider>\n </NavigationRouteContext.Provider>\n );\n }\n\n return element;\n }\n);\n\nexport default BaseNavigationContainer;\n","import type * as React from 'react';\nimport type { ParamListBase, NavigationState } from '@react-navigation/routers';\nimport Screen from './Screen';\nimport type { TypedNavigator, EventMapBase } from './types';\n\n/**\n * Higher order component to create a `Navigator` and `Screen` pair.\n * Custom navigators should wrap the navigator component in `createNavigator` before exporting.\n *\n * @param Navigator The navigtor component to wrap.\n * @returns Factory method to create a `Navigator` and `Screen` pair.\n */\nexport default function createNavigatorFactory<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase,\n NavigatorComponent extends React.ComponentType<any>\n>(Navigator: NavigatorComponent) {\n return function <ParamList extends ParamListBase>(): TypedNavigator<\n ParamList,\n State,\n ScreenOptions,\n EventMap,\n typeof Navigator\n > {\n if (arguments[0] !== undefined) {\n throw new Error(\n \"Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API with React Navigation 5? See https://reactnavigation.org/docs/upgrading-from-4.x for migration guide.\"\n );\n }\n\n return {\n Navigator,\n Screen,\n };\n };\n}\n","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport type { NavigationHelpers } from './types';\n\n/**\n * Context which holds the navigation helpers of the parent navigator.\n * Navigators should use this context in their view component.\n */\nconst NavigationHelpersContext = React.createContext<\n NavigationHelpers<ParamListBase> | undefined\n>(undefined);\n\nexport default NavigationHelpersContext;\n","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport type { RouteProp } from './types';\n\n/**\n * Hook to access the route prop of the parent screen anywhere.\n *\n * @returns Route prop of the parent screen.\n */\nexport default function useRoute<\n T extends RouteProp<ParamListBase, string>\n>(): T {\n const route = React.useContext(NavigationRouteContext);\n\n if (route === undefined) {\n throw new Error(\n \"Couldn't find a route object. Is your component inside a screen in a navigator?\"\n );\n }\n\n return route as T;\n}\n","import * as React from 'react';\nimport useNavigation from './useNavigation';\n\ntype EffectCallback = () => undefined | void | (() => void);\n\n/**\n * Hook to run an effect in a focused screen, similar to `React.useEffect`.\n * This can be used to perform side-effects such as fetching data or subscribing to events.\n * The passed callback should be wrapped in `React.useCallback` to avoid running the effect too often.\n *\n * @param callback Memoized callback containing the effect, should optionally return a cleanup function.\n */\nexport default function useFocusEffect(effect: EffectCallback) {\n const navigation = useNavigation();\n\n if (arguments[1] !== undefined) {\n const message =\n \"You passed a second argument to 'useFocusEffect', but it only accepts one argument. \" +\n \"If you want to pass a dependency array, you can use 'React.useCallback':\\n\\n\" +\n 'useFocusEffect(\\n' +\n ' React.useCallback(() => {\\n' +\n ' // Your code here\\n' +\n ' }, [depA, depB])\\n' +\n ');\\n\\n' +\n 'See usage guide: https://reactnavigation.org/docs/use-focus-effect';\n\n console.error(message);\n }\n\n React.useEffect(() => {\n let isFocused = false;\n let cleanup: undefined | void | (() => void);\n\n const callback = () => {\n const destroy = effect();\n\n if (destroy === undefined || typeof destroy === 'function') {\n return destroy;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n let message =\n 'An effect function must not return anything besides a function, which is used for clean-up.';\n\n if (destroy === null) {\n message +=\n \" You returned 'null'. If your effect does not require clean-up, return 'undefined' (or nothing).\";\n } else if (typeof (destroy as any).then === 'function') {\n message +=\n \"\\n\\nIt looks like you wrote 'useFocusEffect(async () => ...)' or returned a Promise. \" +\n 'Instead, write the async function inside your effect ' +\n 'and call it immediately:\\n\\n' +\n 'useFocusEffect(\\n' +\n ' React.useCallback() => {\\n' +\n ' async function fetchData() {\\n' +\n ' // You can await here\\n' +\n ' const response = await MyAPI.getData(someId);\\n' +\n ' // ...\\n' +\n ' }\\n\\n' +\n ' fetchData();\\n' +\n ' }, [someId])\\n' +\n ');\\n\\n' +\n 'See usage guide: https://reactnavigation.org/docs/use-focus-effect';\n } else {\n message += ` You returned '${JSON.stringify(destroy)}'.`;\n }\n\n console.error(message);\n }\n };\n\n // We need to run the effect on intial render/dep changes if the screen is focused\n if (navigation.isFocused()) {\n cleanup = callback();\n isFocused = true;\n }\n\n const unsubscribeFocus = navigation.addListener('focus', () => {\n // If callback was already called for focus, avoid calling it again\n // The focus event may also fire on intial render, so we guard against runing the effect twice\n if (isFocused) {\n return;\n }\n\n if (cleanup !== undefined) {\n cleanup();\n }\n\n cleanup = callback();\n isFocused = true;\n });\n\n const unsubscribeBlur = navigation.addListener('blur', () => {\n if (cleanup !== undefined) {\n cleanup();\n }\n\n cleanup = undefined;\n isFocused = false;\n });\n\n return () => {\n if (cleanup !== undefined) {\n cleanup();\n }\n\n unsubscribeFocus();\n unsubscribeBlur();\n };\n }, [effect, navigation]);\n}\n","import escape from 'escape-string-regexp';\nimport * as queryString from 'query-string';\nimport type {\n NavigationState,\n PartialState,\n InitialState,\n} from '@react-navigation/routers';\nimport checkLegacyPathConfig from './checkLegacyPathConfig';\nimport type { PathConfigMap } from './types';\n\ntype Options = {\n initialRouteName?: string;\n screens: PathConfigMap;\n};\n\ntype ParseConfig = Record<string, (value: string) => any>;\n\ntype RouteConfig = {\n screen: string;\n regex?: RegExp;\n path: string;\n pattern: string;\n routeNames: string[];\n parse?: ParseConfig;\n};\n\ntype InitialRouteConfig = {\n initialRouteName: string;\n parentScreens: string[];\n};\n\ntype ResultState = PartialState<NavigationState> & {\n state?: ResultState;\n};\n\ntype ParsedRoute = {\n name: string;\n params?: Record<string, any> | undefined;\n};\n\n/**\n * Utility to parse a path string to initial state object accepted by the container.\n * This is useful for deep linking when we need to handle the incoming URL.\n *\n * @example\n * ```js\n * getStateFromPath(\n * '/chat/jane/42',\n * {\n * screens: {\n * Chat: {\n * path: 'chat/:author/:id',\n * parse: { id: Number }\n * }\n * }\n * }\n * )\n * ```\n * @param path Path string to parse and convert, e.g. /foo/bar?count=42.\n * @param options Extra options to fine-tune how to parse the path.\n */\nexport default function getStateFromPath(\n path: string,\n options?: Options\n): ResultState | undefined {\n const [legacy, compatOptions] = checkLegacyPathConfig(options);\n\n let initialRoutes: InitialRouteConfig[] = [];\n\n if (compatOptions?.initialRouteName) {\n initialRoutes.push({\n initialRouteName: compatOptions.initialRouteName,\n parentScreens: [],\n });\n }\n\n const screens = compatOptions?.screens;\n\n let remaining = path\n .replace(/\\/+/g, '/') // Replace multiple slash (//) with single ones\n .replace(/^\\//, '') // Remove extra leading slash\n .replace(/\\?.*$/, ''); // Remove query params which we will handle later\n\n // Make sure there is a trailing slash\n remaining = remaining.endsWith('/') ? remaining : `${remaining}/`;\n\n if (screens === undefined) {\n // When no config is specified, use the path segments as route names\n const routes = remaining\n .split('/')\n .filter(Boolean)\n .map((segment, i, self) => {\n const name = decodeURIComponent(segment);\n\n if (i === self.length - 1) {\n return { name, params: parseQueryParams(path) };\n }\n\n return { name };\n });\n\n if (routes.length) {\n return createNestedStateObject(routes, initialRoutes);\n }\n\n return undefined;\n }\n\n // Create a normalized configs array which will be easier to use\n const configs = ([] as RouteConfig[])\n .concat(\n ...Object.keys(screens).map((key) =>\n createNormalizedConfigs(\n legacy,\n key,\n screens as PathConfigMap,\n [],\n initialRoutes,\n []\n )\n )\n )\n .sort((a, b) => {\n // Sort config so that:\n // - the most exhaustive ones are always at the beginning\n // - patterns with wildcard are always at the end\n\n // If 2 patterns are same, move the one with less route names up\n // This is an error state, so it's only useful for consistent error messages\n if (a.pattern === b.pattern) {\n return b.routeNames.join('>').localeCompare(a.routeNames.join('>'));\n }\n\n // If one of the patterns starts with the other, it's more exhaustive\n // So move it up\n if (a.pattern.startsWith(b.pattern)) {\n return -1;\n }\n\n if (b.pattern.startsWith(a.pattern)) {\n return 1;\n }\n\n const aParts = a.pattern.split('/');\n const bParts = b.pattern.split('/');\n\n const aWildcardIndex = aParts.indexOf('*');\n const bWildcardIndex = bParts.indexOf('*');\n\n // If only one of the patterns has a wildcard, move it down in the list\n if (aWildcardIndex === -1 && bWildcardIndex !== -1) {\n return -1;\n }\n\n if (aWildcardIndex !== -1 && bWildcardIndex === -1) {\n return 1;\n }\n\n if (aWildcardIndex === bWildcardIndex) {\n // If `b` has more `/`, it's more exhaustive\n // So we move it up in the list\n return bParts.length - aParts.length;\n }\n\n // If the wildcard appears later in the pattern (has higher index), it's more specific\n // So we move it up in the list\n return bWildcardIndex - aWildcardIndex;\n });\n\n // Check for duplicate patterns in the config\n configs.reduce<Record<string, RouteConfig>>((acc, config) => {\n if (acc[config.pattern]) {\n const a = acc[config.pattern].routeNames;\n const b = config.routeNames;\n\n // It's not a problem if the path string omitted from a inner most screen\n // For example, it's ok if a path resolves to `A > B > C` or `A > B`\n const intersects =\n a.length > b.length\n ? b.every((it, i) => a[i] === it)\n : a.every((it, i) => b[i] === it);\n\n if (!intersects) {\n throw new Error(\n `Found conflicting screens with the same pattern. The pattern '${\n config.pattern\n }' resolves to both '${a.join(' > ')}' and '${b.join(\n ' > '\n )}'. Patterns must be unique and cannot resolve to more than one screen.`\n );\n }\n }\n\n return Object.assign(acc, {\n [config.pattern]: config,\n });\n }, {});\n\n if (remaining === '/') {\n // We need to add special handling of empty path so navigation to empty path also works\n // When handling empty path, we should only look at the root level config\n const match = configs.find(\n (config) =>\n config.path === '' &&\n config.routeNames.every(\n // Make sure that none of the parent configs have a non-empty path defined\n (name) => !configs.find((c) => c.screen === name)?.path\n )\n );\n\n if (match) {\n return createNestedStateObject(\n match.routeNames.map((name, i, self) => {\n if (i === self.length - 1) {\n return { name, params: parseQueryParams(path, match.parse) };\n }\n\n return { name };\n }),\n initialRoutes\n );\n }\n\n return undefined;\n }\n\n let result: PartialState<NavigationState> | undefined;\n let current: PartialState<NavigationState> | undefined;\n\n if (legacy === false) {\n // If we're not in legacy mode,, we match the whole path against the regex instead of segments\n // This makes sure matches such as wildcard will catch any unmatched routes, even if nested\n const { routes, remainingPath } = matchAgainstConfigs(\n remaining,\n configs.map((c) => ({\n ...c,\n // Add `$` to the regex to make sure it matches till end of the path and not just beginning\n regex: c.regex ? new RegExp(c.regex.source + '$') : undefined,\n }))\n );\n\n if (routes !== undefined) {\n // This will always be empty if full path matched\n current = createNestedStateObject(routes, initialRoutes);\n remaining = remainingPath;\n result = current;\n }\n } else {\n // In legacy mode, we divide the path into segments and match piece by piece\n // This preserves the legacy behaviour, but we should remove it in next major\n while (remaining) {\n let { routes, remainingPath } = matchAgainstConfigs(remaining, configs);\n\n remaining = remainingPath;\n\n // If we hadn't matched any segments earlier, use the path as route name\n if (routes === undefined) {\n const segments = remaining.split('/');\n\n routes = [{ name: decodeURIComponent(segments[0]) }];\n segments.shift();\n remaining = segments.join('/');\n }\n\n const state = createNestedStateObject(routes, initialRoutes);\n\n if (current) {\n // The state should be nested inside the deepest route we parsed before\n while (current?.routes[current.index || 0].state) {\n current = current.routes[current.index || 0].state;\n }\n\n (current as PartialState<NavigationState>).routes[\n current?.index || 0\n ].state = state;\n } else {\n result = state;\n }\n\n current = state;\n }\n }\n\n if (current == null || result == null) {\n return undefined;\n }\n\n const route = findFocusedRoute(current);\n const params = parseQueryParams(\n path,\n findParseConfigForRoute(route.name, configs)\n );\n\n if (params) {\n // @ts-expect-error: params should be treated as read-only, but we're creating the state here so it doesn't matter\n route.params = { ...route.params, ...params };\n }\n\n return result;\n}\n\nconst joinPaths = (...paths: string[]): string =>\n ([] as string[])\n .concat(...paths.map((p) => p.split('/')))\n .filter(Boolean)\n .join('/');\n\nconst matchAgainstConfigs = (remaining: string, configs: RouteConfig[]) => {\n let routes: ParsedRoute[] | undefined;\n let remainingPath = remaining;\n\n // Go through all configs, and see if the next path segment matches our regex\n for (const config of configs) {\n if (!config.regex) {\n continue;\n }\n\n const match = remainingPath.match(config.regex);\n\n // If our regex matches, we need to extract params from the path\n if (match) {\n const matchedParams = config.pattern\n ?.split('/')\n .filter((p) => p.startsWith(':'))\n .reduce<Record<string, any>>(\n (acc, p, i) =>\n Object.assign(acc, {\n // The param segments appear every second item starting from 2 in the regex match result\n [p]: match![(i + 1) * 2].replace(/\\//, ''),\n }),\n {}\n );\n\n routes = config.routeNames.map((name) => {\n const config = configs.find((c) => c.screen === name);\n const params = config?.path\n ?.split('/')\n .filter((p) => p.startsWith(':'))\n .reduce<Record<string, any>>((acc, p) => {\n const value = matchedParams[p];\n\n if (value) {\n const key = p.replace(/^:/, '').replace(/\\?$/, '');\n acc[key] = config.parse?.[key] ? config.parse[key](value) : value;\n }\n\n return acc;\n }, {});\n\n if (params && Object.keys(params).length) {\n return { name, params };\n }\n\n return { name };\n });\n\n remainingPath = remainingPath.replace(match[1], '');\n\n break;\n }\n }\n\n return { routes, remainingPath };\n};\n\nconst createNormalizedConfigs = (\n legacy: boolean,\n screen: string,\n routeConfig: PathConfigMap,\n routeNames: string[] = [],\n initials: InitialRouteConfig[],\n parentScreens: string[],\n parentPattern?: string\n): RouteConfig[] => {\n const configs: RouteConfig[] = [];\n\n routeNames.push(screen);\n\n parentScreens.push(screen);\n\n const config = routeConfig[screen];\n\n if (typeof config === 'string') {\n // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern\n const pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n\n configs.push(createConfigItem(legacy, screen, routeNames, pattern, config));\n } else if (typeof config === 'object') {\n let pattern: string | undefined;\n\n // if an object is specified as the value (e.g. Foo: { ... }),\n // it can have `path` property and\n // it could have `screens` prop which has nested configs\n if (typeof config.path === 'string') {\n if (legacy) {\n pattern =\n config.exact !== true && parentPattern\n ? joinPaths(parentPattern, config.path)\n : config.path;\n } else {\n if (config.exact && config.path === undefined) {\n throw new Error(\n \"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\"\n );\n }\n\n pattern =\n config.exact !== true\n ? joinPaths(parentPattern || '', config.path || '')\n : config.path || '';\n }\n\n configs.push(\n createConfigItem(\n legacy,\n screen,\n routeNames,\n pattern,\n config.path,\n config.parse\n )\n );\n }\n\n if (config.screens) {\n // property `initialRouteName` without `screens` has no purpose\n if (config.initialRouteName) {\n initials.push({\n initialRouteName: config.initialRouteName,\n parentScreens,\n });\n }\n\n Object.keys(config.screens).forEach((nestedConfig) => {\n const result = createNormalizedConfigs(\n legacy,\n nestedConfig,\n config.screens as PathConfigMap,\n routeNames,\n initials,\n [...parentScreens],\n pattern ?? parentPattern\n );\n\n configs.push(...result);\n });\n }\n }\n\n routeNames.pop();\n\n return configs;\n};\n\nconst createConfigItem = (\n legacy: boolean,\n screen: string,\n routeNames: string[],\n pattern: string,\n path: string,\n parse?: ParseConfig\n): RouteConfig => {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern = pattern.split('/').filter(Boolean).join('/');\n\n const regex = pattern\n ? new RegExp(\n `^(${pattern\n .split('/')\n .map((it) => {\n if (legacy && it === '*') {\n throw new Error(\n \"Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config\"\n );\n }\n\n if (it.startsWith(':')) {\n return `(([^/]+\\\\/)${it.endsWith('?') ? '?' : ''})`;\n }\n\n return `${it === '*' ? '.*' : escape(it)}\\\\/`;\n })\n .join('')})`\n )\n : undefined;\n\n return {\n screen,\n regex,\n pattern,\n path,\n // The routeNames array is mutated, so copy it to keep the current state\n routeNames: [...routeNames],\n parse,\n };\n};\n\nconst findParseConfigForRoute = (\n routeName: string,\n flatConfig: RouteConfig[]\n): ParseConfig | undefined => {\n for (const config of flatConfig) {\n if (routeName === config.routeNames[config.routeNames.length - 1]) {\n return config.parse;\n }\n }\n\n return undefined;\n};\n\n// Try to find an initial route connected with the one passed\nconst findInitialRoute = (\n routeName: string,\n parentScreens: string[],\n initialRoutes: InitialRouteConfig[]\n): string | undefined => {\n for (const config of initialRoutes) {\n if (parentScreens.length === config.parentScreens.length) {\n let sameParents = true;\n for (let i = 0; i < parentScreens.length; i++) {\n if (parentScreens[i].localeCompare(config.parentScreens[i]) !== 0) {\n sameParents = false;\n break;\n }\n }\n if (sameParents) {\n return routeName !== config.initialRouteName\n ? config.initialRouteName\n : undefined;\n }\n }\n }\n return undefined;\n};\n\n// returns state object with values depending on whether\n// it is the end of state and if there is initialRoute for this level\nconst createStateObject = (\n initialRoute: string | undefined,\n route: ParsedRoute,\n isEmpty: boolean\n): InitialState => {\n if (isEmpty) {\n if (initialRoute) {\n return {\n index: 1,\n routes: [{ name: initialRoute }, route],\n };\n } else {\n return {\n routes: [route],\n };\n }\n } else {\n if (initialRoute) {\n return {\n index: 1,\n routes: [{ name: initialRoute }, { ...route, state: { routes: [] } }],\n };\n } else {\n return {\n routes: [{ ...route, state: { routes: [] } }],\n };\n }\n }\n};\n\nconst createNestedStateObject = (\n routes: ParsedRoute[],\n initialRoutes: InitialRouteConfig[]\n) => {\n let state: InitialState;\n let route = routes.shift() as ParsedRoute;\n const parentScreens: string[] = [];\n\n let initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);\n\n parentScreens.push(route.name);\n\n state = createStateObject(initialRoute, route, routes.length === 0);\n\n if (routes.length > 0) {\n let nestedState = state;\n\n while ((route = routes.shift() as ParsedRoute)) {\n initialRoute = findInitialRoute(route.name, parentScreens, initialRoutes);\n\n const nestedStateIndex =\n nestedState.index || nestedState.routes.length - 1;\n\n nestedState.routes[nestedStateIndex].state = createStateObject(\n initialRoute,\n route,\n routes.length === 0\n );\n\n if (routes.length > 0) {\n nestedState = nestedState.routes[nestedStateIndex]\n .state as InitialState;\n }\n\n parentScreens.push(route.name);\n }\n }\n\n return state;\n};\n\nconst findFocusedRoute = (state: InitialState) => {\n let current: InitialState | undefined = state;\n\n while (current?.routes[current.index || 0].state) {\n // The query params apply to the deepest route\n current = current.routes[current.index || 0].state;\n }\n\n const route = (current as PartialState<NavigationState>).routes[\n current?.index || 0\n ];\n\n return route;\n};\n\nconst parseQueryParams = (\n path: string,\n parseConfig?: Record<string, (value: string) => any>\n) => {\n const query = path.split('?')[1];\n const params = queryString.parse(query);\n\n if (parseConfig) {\n Object.keys(params).forEach((name) => {\n if (parseConfig[name] && typeof params[name] === 'string') {\n params[name] = parseConfig[name](params[name] as string);\n }\n });\n }\n\n return Object.keys(params).length ? params : undefined;\n};\n","'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n","'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp(token, 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn decodeURIComponent(components.join(''));\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher);\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher);\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n","'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n","'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n","import * as queryString from 'query-string';\nimport type {\n NavigationState,\n PartialState,\n Route,\n} from '@react-navigation/routers';\nimport checkLegacyPathConfig from './checkLegacyPathConfig';\nimport type { PathConfig, PathConfigMap } from './types';\n\ntype Options = { initialRouteName?: string; screens: PathConfigMap };\n\ntype State = NavigationState | Omit<PartialState<NavigationState>, 'stale'>;\n\ntype StringifyConfig = Record<string, (value: any) => string>;\n\ntype ConfigItem = {\n pattern?: string;\n stringify?: StringifyConfig;\n screens?: Record<string, ConfigItem>;\n};\n\nconst getActiveRoute = (state: State): { name: string; params?: object } => {\n const route =\n typeof state.index === 'number'\n ? state.routes[state.index]\n : state.routes[state.routes.length - 1];\n\n if (route.state) {\n return getActiveRoute(route.state);\n }\n\n return route;\n};\n\n/**\n * Utility to serialize a navigation state object to a path string.\n *\n * @example\n * ```js\n * getPathFromState(\n * {\n * routes: [\n * {\n * name: 'Chat',\n * params: { author: 'Jane', id: 42 },\n * },\n * ],\n * },\n * {\n * screens: {\n * Chat: {\n * path: 'chat/:author/:id',\n * stringify: { author: author => author.toLowerCase() }\n * }\n * }\n * }\n * )\n * ```\n *\n * @param state Navigation state to serialize.\n * @param options Extra options to fine-tune how to serialize the path.\n * @returns Path representing the state, e.g. /foo/bar?count=42.\n */\nexport default function getPathFromState(\n state: State,\n options?: Options\n): string {\n if (state == null) {\n throw Error(\n \"Got 'undefined' for the navigation state. You must pass a valid state object.\"\n );\n }\n\n const [legacy, compatOptions] = checkLegacyPathConfig(options);\n\n // Create a normalized configs object which will be easier to use\n const configs: Record<string, ConfigItem> = compatOptions\n ? createNormalizedConfigs(legacy, compatOptions.screens)\n : {};\n\n let path = '/';\n let current: State | undefined = state;\n\n const allParams: Record<string, any> = {};\n\n while (current) {\n let index = typeof current.index === 'number' ? current.index : 0;\n let route = current.routes[index] as Route<string> & {\n state?: State;\n };\n\n let pattern: string | undefined;\n\n let focusedParams: Record<string, any> | undefined;\n let focusedRoute = getActiveRoute(state);\n let currentOptions = configs;\n\n // Keep all the route names that appeared during going deeper in config in case the pattern is resolved to undefined\n let nestedRouteNames = [];\n\n let hasNext = true;\n\n while (route.name in currentOptions && hasNext) {\n pattern = currentOptions[route.name].pattern;\n\n nestedRouteNames.push(route.name);\n\n if (route.params) {\n const stringify = currentOptions[route.name]?.stringify;\n\n const currentParams = fromEntries(\n Object.entries(route.params).map(([key, value]) => [\n key,\n stringify?.[key] ? stringify[key](value) : String(value),\n ])\n );\n\n if (pattern) {\n Object.assign(allParams, currentParams);\n }\n\n if (focusedRoute === route) {\n // If this is the focused route, keep the params for later use\n // We save it here since it's been stringified already\n focusedParams = { ...currentParams };\n\n pattern\n ?.split('/')\n .filter((p) => p.startsWith(':'))\n // eslint-disable-next-line no-loop-func\n .forEach((p) => {\n const name = getParamName(p);\n\n // Remove the params present in the pattern since we'll only use the rest for query string\n if (focusedParams) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[name];\n }\n });\n }\n }\n\n // If there is no `screens` property or no nested state, we return pattern\n if (!currentOptions[route.name].screens || route.state === undefined) {\n hasNext = false;\n } else {\n index =\n typeof route.state.index === 'number'\n ? route.state.index\n : route.state.routes.length - 1;\n\n const nextRoute = route.state.routes[index];\n const nestedConfig = currentOptions[route.name].screens;\n\n // if there is config for next route name, we go deeper\n if (nestedConfig && nextRoute.name in nestedConfig) {\n route = nextRoute as Route<string> & { state?: State };\n currentOptions = nestedConfig;\n } else {\n // If not, there is no sense in going deeper in config\n hasNext = false;\n }\n }\n }\n\n if (pattern === undefined) {\n pattern = nestedRouteNames.join('/');\n }\n\n if (currentOptions[route.name] !== undefined) {\n path += pattern\n .split('/')\n .map((p) => {\n const name = getParamName(p);\n\n // We don't know what to show for wildcard patterns\n // Showing the route name seems ok, though whatever we show here will be incorrect\n // Since the page doesn't actually exist\n if (p === '*') {\n if (legacy) {\n throw new Error(\n \"Please update your config to the new format to use wildcard pattern ('*'). https://reactnavigation.org/docs/configuring-links/#updating-config\"\n );\n }\n\n return route.name;\n }\n\n // If the path has a pattern for a param, put the param in the path\n if (p.startsWith(':')) {\n const value = allParams[name];\n\n if (value === undefined && p.endsWith('?')) {\n // Optional params without value assigned in route.params should be ignored\n return '';\n }\n\n return encodeURIComponent(value);\n }\n\n return encodeURIComponent(p);\n })\n .join('/');\n } else {\n path += encodeURIComponent(route.name);\n }\n\n if (!focusedParams) {\n focusedParams = focusedRoute.params;\n }\n\n if (route.state) {\n path += '/';\n } else if (focusedParams) {\n for (let param in focusedParams) {\n if (focusedParams[param] === 'undefined') {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete focusedParams[param];\n }\n }\n\n const query = queryString.stringify(focusedParams);\n\n if (query) {\n path += `?${query}`;\n }\n }\n\n current = route.state;\n }\n\n // Remove multiple as well as trailing slashes\n path = path.replace(/\\/+/g, '/');\n path = path.length > 1 ? path.replace(/\\/$/, '') : path;\n\n return path;\n}\n\n// Object.fromEntries is not available in older iOS versions\nconst fromEntries = <K extends string, V>(entries: (readonly [K, V])[]) =>\n entries.reduce((acc, [k, v]) => {\n if (acc.hasOwnProperty(k)) {\n throw new Error(`A value for key '${k}' already exists in the object.`);\n }\n\n acc[k] = v;\n return acc;\n }, {} as Record<K, V>);\n\nconst getParamName = (pattern: string) =>\n pattern.replace(/^:/, '').replace(/\\?$/, '');\n\nconst joinPaths = (...paths: string[]): string =>\n ([] as string[])\n .concat(...paths.map((p) => p.split('/')))\n .filter(Boolean)\n .join('/');\n\nconst createConfigItem = (\n legacy: boolean,\n config: PathConfig | string,\n parentPattern?: string\n): ConfigItem => {\n if (typeof config === 'string') {\n // If a string is specified as the value of the key(e.g. Foo: '/path'), use it as the pattern\n const pattern = parentPattern ? joinPaths(parentPattern, config) : config;\n\n return { pattern };\n }\n\n // If an object is specified as the value (e.g. Foo: { ... }),\n // It can have `path` property and `screens` prop which has nested configs\n let pattern: string | undefined;\n\n if (legacy) {\n pattern =\n config.exact !== true && parentPattern && config.path\n ? joinPaths(parentPattern, config.path)\n : config.path;\n } else {\n if (config.exact && config.path === undefined) {\n throw new Error(\n \"A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.\"\n );\n }\n\n pattern =\n config.exact !== true\n ? joinPaths(parentPattern || '', config.path || '')\n : config.path || '';\n }\n\n const screens = config.screens\n ? createNormalizedConfigs(legacy, config.screens, pattern)\n : undefined;\n\n return {\n // Normalize pattern to remove any leading, trailing slashes, duplicate slashes etc.\n pattern: pattern?.split('/').filter(Boolean).join('/'),\n stringify: config.stringify,\n screens,\n };\n};\n\nconst createNormalizedConfigs = (\n legacy: boolean,\n options: PathConfigMap,\n pattern?: string\n): Record<string, ConfigItem> =>\n fromEntries(\n Object.entries(options).map(([name, c]) => {\n const result = createConfigItem(legacy, c, pattern);\n\n return [name, result];\n })\n );\n","import type {\n Route,\n PartialRoute,\n ParamListBase,\n NavigationState,\n PartialState,\n CommonActions,\n} from '@react-navigation/routers';\nimport type { PathConfig, PathConfigMap, NavigatorScreenParams } from './types';\n\ntype ConfigItem = {\n initialRouteName?: string;\n screens?: Record<string, ConfigItem>;\n};\n\ntype Options = { initialRouteName?: string; screens: PathConfigMap };\n\ntype NavigateAction<State extends NavigationState> = {\n type: 'NAVIGATE';\n payload: {\n name: string;\n params?: NavigatorScreenParams<State>;\n };\n};\n\nexport default function getActionFromState(\n state: PartialState<NavigationState>,\n options?: Options\n): NavigateAction<NavigationState> | CommonActions.Action | undefined {\n // Create a normalized configs object which will be easier to use\n const normalizedConfig = options ? createNormalizedConfigItem(options) : {};\n\n const routes =\n state.index != null ? state.routes.slice(0, state.index + 1) : state.routes;\n\n if (routes.length === 0) {\n return undefined;\n }\n\n if (\n !(\n (routes.length === 1 && routes[0].key === undefined) ||\n (routes.length === 2 &&\n routes[0].key === undefined &&\n routes[0].name === normalizedConfig?.initialRouteName &&\n routes[1].key === undefined)\n )\n ) {\n return {\n type: 'RESET',\n payload: state,\n };\n }\n\n const route = state.routes[state.index ?? state.routes.length - 1];\n\n let current: PartialState<NavigationState> | undefined = route?.state;\n let config: ConfigItem | undefined = normalizedConfig?.screens?.[route?.name];\n let params = { ...route.params } as NavigatorScreenParams<\n ParamListBase,\n NavigationState\n >;\n\n let payload = route ? { name: route.name, params } : undefined;\n\n while (current) {\n if (current.routes.length === 0) {\n return undefined;\n }\n\n const routes =\n current.index != null\n ? current.routes.slice(0, current.index + 1)\n : current.routes;\n\n const route: Route<string> | PartialRoute<Route<string>> =\n routes[routes.length - 1];\n\n // Explicitly set to override existing value when merging params\n Object.assign(params, {\n initial: undefined,\n screen: undefined,\n params: undefined,\n state: undefined,\n });\n\n if (routes.length === 1 && routes[0].key === undefined) {\n params.initial = true;\n params.screen = route.name;\n } else if (\n routes.length === 2 &&\n routes[0].key === undefined &&\n routes[0].name === config?.initialRouteName &&\n routes[1].key === undefined\n ) {\n params.initial = false;\n params.screen = route.name;\n } else {\n params.state = current;\n break;\n }\n\n if (route.state) {\n params.params = { ...route.params };\n params = params.params as NavigatorScreenParams<\n ParamListBase,\n NavigationState\n >;\n } else {\n params.params = route.params;\n }\n\n current = route.state;\n config = config?.screens?.[route.name];\n }\n\n if (!payload) {\n return;\n }\n\n // Try to construct payload for a `NAVIGATE` action from the state\n // This lets us preserve the navigation state and not lose it\n return {\n type: 'NAVIGATE',\n payload,\n };\n}\n\nconst createNormalizedConfigItem = (config: PathConfig | string) =>\n typeof config === 'object' && config != null\n ? {\n initialRouteName: config.initialRouteName,\n screens:\n config.screens != null\n ? createNormalizedConfigs(config.screens)\n : undefined,\n }\n : {};\n\nconst createNormalizedConfigs = (options: PathConfigMap) =>\n Object.entries(options).reduce<Record<string, ConfigItem>>((acc, [k, v]) => {\n acc[k] = createNormalizedConfigItem(v);\n return acc;\n }, {});\n","import type {\n Route,\n PartialState,\n NavigationState,\n} from '@react-navigation/routers';\nimport { SUPPRESS_STATE_ACCESS_WARNING } from './useRouteCache';\n\nexport default function getFocusedRouteNameFromRoute(\n route: Partial<Route<string>> & { state?: PartialState<NavigationState> }\n): string | undefined {\n SUPPRESS_STATE_ACCESS_WARNING.value = true;\n\n const state = route.state;\n\n SUPPRESS_STATE_ACCESS_WARNING.value = false;\n\n const params = route.params as { screen?: unknown } | undefined;\n\n const routeName = state\n ? // Get the currently active route name in the nested navigator\n state.routes[\n // If we have a partial state without index, for tab/drawer, first screen will be focused one, and last for stack\n // The type property will only exist for rehydrated state and not for state from deep link\n state.index ??\n (typeof state.type === 'string' && state.type !== 'stack'\n ? 0\n : state.routes.length - 1)\n ].name\n : // If state doesn't exist, we need to default to `screen` param if available\n typeof params?.screen === 'string'\n ? params.screen\n : undefined;\n\n return routeName;\n}\n","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar _reduce = /*#__PURE__*/require('./internal/_reduce');\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\n\n\nvar reduce = /*#__PURE__*/_curry3(_reduce);\nmodule.exports = reduce;","var _isArrayLike = /*#__PURE__*/require('./_isArrayLike');\n\nvar _xwrap = /*#__PURE__*/require('./_xwrap');\n\nvar bind = /*#__PURE__*/require('../bind');\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n idx += 1;\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n step = iter.next();\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\n\nfunction _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}\nmodule.exports = _reduce;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Returns a function that always returns the given value. Note that for\n * non-primitives the value returned is a reference to the original value.\n *\n * This function is known as `const`, `constant`, or `K` (for K combinator) in\n * other languages and libraries.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> (* -> a)\n * @param {*} val The value to wrap in a function\n * @return {Function} A Function :: * -> val.\n * @example\n *\n * var t = R.always('Tee');\n * t(); //=> 'Tee'\n */\n\n\nvar always = /*#__PURE__*/_curry1(function always(val) {\n return function () {\n return val;\n };\n});\nmodule.exports = always;","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","import * as React from 'react';\nimport ThemeContext from './ThemeContext';\n\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n\n return theme;\n}\n","/* MIT license */\nvar cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in cssKeywords) {\n\tif (cssKeywords.hasOwnProperty(key)) {\n\t\treverseKeywords[cssKeywords[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in cssKeywords) {\n\t\tif (cssKeywords.hasOwnProperty(keyword)) {\n\t\t\tvar value = cssKeywords[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","import * as React from 'react';\n\n/**\n * Component which prevents updates for children if no props changed\n */\nfunction StaticContainer(props: any) {\n return props.children;\n}\n\nexport default React.memo(StaticContainer, (prevProps: any, nextProps: any) => {\n const prevPropKeys = Object.keys(prevProps);\n const nextPropKeys = Object.keys(nextProps);\n\n if (prevPropKeys.length !== nextPropKeys.length) {\n return false;\n }\n\n for (const key of prevPropKeys) {\n if (key === 'children') {\n continue;\n }\n\n if (prevProps[key] !== nextProps[key]) {\n return false;\n }\n }\n\n return true;\n});\n","import * as React from 'react';\nimport type {\n Route,\n ParamListBase,\n NavigationState,\n PartialState,\n} from '@react-navigation/routers';\nimport NavigationStateContext from './NavigationStateContext';\nimport StaticContainer from './StaticContainer';\nimport EnsureSingleNavigator from './EnsureSingleNavigator';\nimport useOptionsGetters from './useOptionsGetters';\nimport type { NavigationProp, RouteConfig, EventMapBase } from './types';\n\ntype Props<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n> = {\n screen: RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>;\n navigation: NavigationProp<ParamListBase, string, State, ScreenOptions>;\n route: Route<string>;\n routeState: NavigationState | PartialState<NavigationState> | undefined;\n getState: () => State;\n setState: (state: State) => void;\n options: object;\n};\n\n/**\n * Component which takes care of rendering the screen for a route.\n * It provides all required contexts and applies optimizations when applicable.\n */\nexport default function SceneView<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n>({\n screen,\n route,\n navigation,\n routeState,\n getState,\n setState,\n options,\n}: Props<State, ScreenOptions, EventMap>) {\n const navigatorKeyRef = React.useRef<string | undefined>();\n const getKey = React.useCallback(() => navigatorKeyRef.current, []);\n\n const { addOptionsGetter } = useOptionsGetters({\n key: route.key,\n options,\n navigation,\n });\n\n const setKey = React.useCallback((key: string) => {\n navigatorKeyRef.current = key;\n }, []);\n\n const getCurrentState = React.useCallback(() => {\n const state = getState();\n const currentRoute = state.routes.find((r) => r.key === route.key);\n\n return currentRoute ? currentRoute.state : undefined;\n }, [getState, route.key]);\n\n const setCurrentState = React.useCallback(\n (child: NavigationState | PartialState<NavigationState> | undefined) => {\n const state = getState();\n\n setState({\n ...state,\n routes: state.routes.map((r) =>\n r.key === route.key ? { ...r, state: child } : r\n ),\n });\n },\n [getState, route.key, setState]\n );\n\n const isInitialRef = React.useRef(true);\n\n React.useEffect(() => {\n isInitialRef.current = false;\n });\n\n const getIsInitial = React.useCallback(() => isInitialRef.current, []);\n\n const context = React.useMemo(\n () => ({\n state: routeState,\n getState: getCurrentState,\n setState: setCurrentState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter,\n }),\n [\n routeState,\n getCurrentState,\n setCurrentState,\n getKey,\n setKey,\n getIsInitial,\n addOptionsGetter,\n ]\n );\n\n const ScreenComponent = screen.getComponent\n ? screen.getComponent()\n : screen.component;\n\n return (\n <NavigationStateContext.Provider value={context}>\n <EnsureSingleNavigator>\n <StaticContainer\n name={screen.name}\n render={ScreenComponent || screen.children}\n navigation={navigation}\n route={route}\n >\n {ScreenComponent !== undefined ? (\n <ScreenComponent navigation={navigation} route={route} />\n ) : screen.children !== undefined ? (\n screen.children({ navigation, route })\n ) : null}\n </StaticContainer>\n </EnsureSingleNavigator>\n </NavigationStateContext.Provider>\n );\n}\n","import * as React from 'react';\nimport type {\n NavigationAction,\n NavigationState,\n ParamListBase,\n Router,\n} from '@react-navigation/routers';\nimport SceneView from './SceneView';\nimport NavigationBuilderContext, {\n AddListener,\n AddKeyedListener,\n} from './NavigationBuilderContext';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport useNavigationCache from './useNavigationCache';\nimport useRouteCache from './useRouteCache';\nimport NavigationContext from './NavigationContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport type {\n Descriptor,\n NavigationHelpers,\n RouteConfig,\n RouteProp,\n EventMapBase,\n} from './types';\n\ntype Options<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n> = {\n state: State;\n screens: Record<\n string,\n RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>\n >;\n navigation: NavigationHelpers<ParamListBase>;\n screenOptions?:\n | ScreenOptions\n | ((props: {\n route: RouteProp<ParamListBase, string>;\n navigation: any;\n }) => ScreenOptions);\n onAction: (\n action: NavigationAction,\n visitedNavigators?: Set<string>\n ) => boolean;\n getState: () => State;\n setState: (state: State) => void;\n addListener: AddListener;\n addKeyedListener: AddKeyedListener;\n onRouteFocus: (key: string) => void;\n router: Router<State, NavigationAction>;\n emitter: NavigationEventEmitter<any>;\n};\n\n/**\n * Hook to create descriptor objects for the child routes.\n *\n * A descriptor object provides 3 things:\n * - Helper method to render a screen\n * - Options specified by the screen for the navigator\n * - Navigation object intended for the route\n */\nexport default function useDescriptors<\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n>({\n state,\n screens,\n navigation,\n screenOptions,\n onAction,\n getState,\n setState,\n addListener,\n addKeyedListener,\n onRouteFocus,\n router,\n emitter,\n}: Options<State, ScreenOptions, EventMap>) {\n const [options, setOptions] = React.useState<Record<string, object>>({});\n const { onDispatchAction, onOptionsChange } = React.useContext(\n NavigationBuilderContext\n );\n\n const context = React.useMemo(\n () => ({\n navigation,\n onAction,\n addListener,\n addKeyedListener,\n onRouteFocus,\n onDispatchAction,\n onOptionsChange,\n }),\n [\n navigation,\n onAction,\n addListener,\n addKeyedListener,\n onRouteFocus,\n onDispatchAction,\n onOptionsChange,\n ]\n );\n\n const navigations = useNavigationCache<State, ScreenOptions>({\n state,\n getState,\n navigation,\n setOptions,\n router,\n emitter,\n });\n\n const routes = useRouteCache(state.routes);\n\n return routes.reduce<\n Record<string, Descriptor<ParamListBase, string, State, ScreenOptions>>\n >((acc, route, i) => {\n const screen = screens[route.name];\n const navigation = navigations[route.key];\n\n const routeOptions = {\n // The default `screenOptions` passed to the navigator\n ...(typeof screenOptions === 'object' || screenOptions == null\n ? screenOptions\n : // @ts-expect-error: this is a function, but typescript doesn't think so\n screenOptions({\n route,\n navigation,\n })),\n // The `options` prop passed to `Screen` elements\n ...(typeof screen.options === 'object' || screen.options == null\n ? screen.options\n : // @ts-expect-error: this is a function, but typescript doesn't think so\n screen.options({\n route,\n navigation,\n })),\n // The options set via `navigation.setOptions`\n ...options[route.key],\n };\n\n acc[route.key] = {\n navigation,\n render() {\n return (\n <NavigationBuilderContext.Provider key={route.key} value={context}>\n <NavigationContext.Provider value={navigation}>\n <NavigationRouteContext.Provider value={route}>\n <SceneView\n navigation={navigation}\n route={route}\n screen={screen}\n routeState={state.routes[i].state}\n getState={getState}\n setState={setState}\n options={routeOptions}\n />\n </NavigationRouteContext.Provider>\n </NavigationContext.Provider>\n </NavigationBuilderContext.Provider>\n );\n },\n options: routeOptions as ScreenOptions,\n };\n\n return acc;\n }, {});\n}\n","import * as React from 'react';\nimport {\n CommonActions,\n NavigationAction,\n ParamListBase,\n NavigationState,\n Router,\n} from '@react-navigation/routers';\nimport type { NavigationEventEmitter } from './useEventEmitter';\n\nimport type { EventMapBase, NavigationHelpers, NavigationProp } from './types';\n\ntype Options<State extends NavigationState> = {\n state: State;\n getState: () => State;\n navigation: NavigationHelpers<ParamListBase> &\n Partial<NavigationProp<ParamListBase, string, any, any, any>>;\n setOptions: (\n cb: (options: Record<string, object>) => Record<string, object>\n ) => void;\n router: Router<State, NavigationAction>;\n emitter: NavigationEventEmitter<EventMapBase>;\n};\n\ntype NavigationCache<\n State extends NavigationState,\n ScreenOptions extends {}\n> = {\n [key: string]: NavigationProp<ParamListBase, string, State, ScreenOptions>;\n};\n\n/**\n * Hook to cache navigation objects for each screen in the navigator.\n * It's important to cache them to make sure navigation objects don't change between renders.\n * This lets us apply optimizations like `React.memo` to minimize re-rendering screens.\n */\nexport default function useNavigationCache<\n State extends NavigationState,\n ScreenOptions extends {}\n>({\n state,\n getState,\n navigation,\n setOptions,\n router,\n emitter,\n}: Options<State>) {\n // Cache object which holds navigation objects for each screen\n // We use `React.useMemo` instead of `React.useRef` coz we want to invalidate it when deps change\n // In reality, these deps will rarely change, if ever\n const cache = React.useMemo(\n () => ({ current: {} as NavigationCache<State, ScreenOptions> }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [getState, navigation, setOptions, router, emitter]\n );\n\n const actions = {\n ...router.actionCreators,\n ...CommonActions,\n };\n\n cache.current = state.routes.reduce<NavigationCache<State, ScreenOptions>>(\n (acc, route) => {\n const previous = cache.current[route.key];\n\n if (previous) {\n // If a cached navigation object already exists, reuse it\n acc[route.key] = previous;\n } else {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { emit, ...rest } = navigation;\n\n const dispatch = (\n action: NavigationAction | ((state: State) => NavigationAction)\n ) => {\n const payload =\n typeof action === 'function' ? action(getState()) : action;\n\n navigation.dispatch(\n typeof payload === 'object' && payload != null\n ? { source: route.key, ...payload }\n : payload\n );\n };\n\n const helpers = Object.keys(actions).reduce<Record<string, () => void>>(\n (acc, name) => {\n // @ts-expect-error: name is a valid key, but TypeScript is dumb\n acc[name] = (...args: any) => dispatch(actions[name](...args));\n return acc;\n },\n {}\n );\n\n acc[route.key] = {\n ...rest,\n ...helpers,\n ...emitter.create(route.key),\n dispatch,\n setOptions: (options: object) =>\n setOptions((o) => ({\n ...o,\n [route.key]: { ...o[route.key], ...options },\n })),\n isFocused: () => {\n const state = getState();\n\n if (state.routes[state.index].key !== route.key) {\n return false;\n }\n\n // If the current screen is focused, we also need to check if parent navigator is focused\n // This makes sure that we return the focus state in the whole tree, not just this navigator\n return navigation ? navigation.isFocused() : true;\n },\n };\n }\n\n return acc;\n },\n {}\n );\n\n return cache.current;\n}\n","import * as React from 'react';\nimport {\n CommonActions,\n NavigationAction,\n NavigationState,\n ParamListBase,\n Router,\n} from '@react-navigation/routers';\nimport NavigationContext from './NavigationContext';\nimport UnhandledActionContext from './UnhandledActionContext';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport { NavigationHelpers, NavigationProp, PrivateValueStore } from './types';\n\n// This is to make TypeScript compiler happy\n// eslint-disable-next-line babel/no-unused-expressions\nPrivateValueStore;\n\ntype Options<State extends NavigationState, Action extends NavigationAction> = {\n onAction: (\n action: NavigationAction,\n visitedNavigators?: Set<string>\n ) => boolean;\n getState: () => State;\n emitter: NavigationEventEmitter<any>;\n router: Router<State, Action>;\n};\n\n/**\n * Navigation object with helper methods to be used by a navigator.\n * This object includes methods for common actions as well as methods the parent screen's navigation object.\n */\nexport default function useNavigationHelpers<\n State extends NavigationState,\n ActionHelpers extends Record<string, () => void>,\n Action extends NavigationAction,\n EventMap extends Record<string, any>\n>({ onAction, getState, emitter, router }: Options<State, Action>) {\n const onUnhandledAction = React.useContext(UnhandledActionContext);\n const parentNavigationHelpers = React.useContext(NavigationContext);\n\n return React.useMemo(() => {\n const dispatch = (op: Action | ((state: State) => Action)) => {\n const action = typeof op === 'function' ? op(getState()) : op;\n\n const handled = onAction(action);\n\n if (!handled) {\n onUnhandledAction?.(action);\n }\n };\n\n const actions = {\n ...router.actionCreators,\n ...CommonActions,\n };\n\n const helpers = Object.keys(actions).reduce<Record<string, () => void>>(\n (acc, name) => {\n // @ts-expect-error: name is a valid key, but TypeScript is dumb\n acc[name] = (...args: any) => dispatch(actions[name](...args));\n return acc;\n },\n {}\n );\n\n return {\n ...parentNavigationHelpers,\n ...helpers,\n dispatch,\n emit: emitter.emit,\n isFocused: parentNavigationHelpers\n ? parentNavigationHelpers.isFocused\n : () => true,\n canGoBack: () => {\n const state = getState();\n\n return (\n router.getStateForAction(state, CommonActions.goBack() as Action, {\n routeNames: state.routeNames,\n routeParamList: {},\n routeGetIdList: {},\n }) !== null ||\n parentNavigationHelpers?.canGoBack() ||\n false\n );\n },\n dangerouslyGetParent: () => parentNavigationHelpers as any,\n dangerouslyGetState: getState,\n } as NavigationHelpers<ParamListBase, EventMap> &\n (NavigationProp<ParamListBase, string, any, any, any> | undefined) &\n ActionHelpers;\n }, [\n emitter.emit,\n getState,\n onAction,\n onUnhandledAction,\n parentNavigationHelpers,\n router,\n ]);\n}\n","import * as React from 'react';\nimport type {\n NavigationState,\n NavigationAction,\n} from '@react-navigation/routers';\nimport NavigationBuilderContext, {\n ChildBeforeRemoveListener,\n} from './NavigationBuilderContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport type { EventMapCore } from './types';\n\ntype Options = {\n getState: () => NavigationState;\n emitter: NavigationEventEmitter<EventMapCore<any>>;\n beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;\n};\n\nconst VISITED_ROUTE_KEYS = Symbol('VISITED_ROUTE_KEYS');\n\nexport const shouldPreventRemove = (\n emitter: NavigationEventEmitter<EventMapCore<any>>,\n beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>,\n currentRoutes: { key: string }[],\n nextRoutes: { key?: string | undefined }[],\n action: NavigationAction\n) => {\n const nextRouteKeys = nextRoutes.map((route) => route.key);\n\n // Call these in reverse order so last screens handle the event first\n const removedRoutes = currentRoutes\n .filter((route) => !nextRouteKeys.includes(route.key))\n .reverse();\n\n const visitedRouteKeys: Set<string> =\n // @ts-expect-error: add this property to mark that we've already emitted this action\n action[VISITED_ROUTE_KEYS] ?? new Set<string>();\n\n const beforeRemoveAction = {\n ...action,\n [VISITED_ROUTE_KEYS]: visitedRouteKeys,\n };\n\n for (const route of removedRoutes) {\n if (visitedRouteKeys.has(route.key)) {\n // Skip if we've already emitted this action for this screen\n continue;\n }\n\n // First, we need to check if any child screens want to prevent it\n const isPrevented = beforeRemoveListeners[route.key]?.(beforeRemoveAction);\n\n if (isPrevented) {\n return true;\n }\n\n visitedRouteKeys.add(route.key);\n\n const event = emitter.emit({\n type: 'beforeRemove',\n target: route.key,\n data: { action: beforeRemoveAction },\n canPreventDefault: true,\n });\n\n if (event.defaultPrevented) {\n return true;\n }\n }\n\n return false;\n};\n\nexport default function useOnPreventRemove({\n getState,\n emitter,\n beforeRemoveListeners,\n}: Options) {\n const { addKeyedListener } = React.useContext(NavigationBuilderContext);\n const route = React.useContext(NavigationRouteContext);\n const routeKey = route?.key;\n\n React.useEffect(() => {\n if (routeKey) {\n return addKeyedListener?.('beforeRemove', routeKey, (action) => {\n const state = getState();\n\n return shouldPreventRemove(\n emitter,\n beforeRemoveListeners,\n state.routes,\n [],\n action\n );\n });\n }\n }, [addKeyedListener, beforeRemoveListeners, emitter, getState, routeKey]);\n}\n","import * as React from 'react';\nimport type {\n NavigationAction,\n NavigationState,\n PartialState,\n Router,\n RouterConfigOptions,\n} from '@react-navigation/routers';\nimport NavigationBuilderContext, {\n ChildActionListener,\n ChildBeforeRemoveListener,\n} from './NavigationBuilderContext';\nimport useOnPreventRemove, { shouldPreventRemove } from './useOnPreventRemove';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport type { EventMapCore } from './types';\n\ntype Options = {\n router: Router<NavigationState, NavigationAction>;\n key?: string;\n getState: () => NavigationState;\n setState: (state: NavigationState | PartialState<NavigationState>) => void;\n actionListeners: ChildActionListener[];\n beforeRemoveListeners: Record<string, ChildBeforeRemoveListener | undefined>;\n routerConfigOptions: RouterConfigOptions;\n emitter: NavigationEventEmitter<EventMapCore<any>>;\n};\n\n/**\n * Hook to handle actions for a navigator, including state updates and bubbling.\n *\n * Bubbling an action is achieved in 2 ways:\n * 1. To bubble action to parent, we expose the action handler in context and then access the parent context\n * 2. To bubble action to child, child adds event listeners subscribing to actions from parent\n *\n * When the action handler handles as action, it returns `true`, otherwise `false`.\n */\nexport default function useOnAction({\n router,\n getState,\n setState,\n key,\n actionListeners,\n beforeRemoveListeners,\n routerConfigOptions,\n emitter,\n}: Options) {\n const {\n onAction: onActionParent,\n onRouteFocus: onRouteFocusParent,\n addListener: addListenerParent,\n onDispatchAction,\n } = React.useContext(NavigationBuilderContext);\n\n const routerConfigOptionsRef = React.useRef<RouterConfigOptions>(\n routerConfigOptions\n );\n\n React.useEffect(() => {\n routerConfigOptionsRef.current = routerConfigOptions;\n });\n\n const onAction = React.useCallback(\n (\n action: NavigationAction,\n visitedNavigators: Set<string> = new Set<string>()\n ) => {\n const state = getState();\n\n // Since actions can bubble both up and down, they could come to the same navigator again\n // We keep track of navigators which have already tried to handle the action and return if it's already visited\n if (visitedNavigators.has(state.key)) {\n return false;\n }\n\n visitedNavigators.add(state.key);\n\n if (typeof action.target !== 'string' || action.target === state.key) {\n let result = router.getStateForAction(\n state,\n action,\n routerConfigOptionsRef.current\n );\n\n // If a target is specified and set to current navigator, the action shouldn't bubble\n // So instead of `null`, we use the state object for such cases to signal that action was handled\n result =\n result === null && action.target === state.key ? state : result;\n\n if (result !== null) {\n onDispatchAction(action, state === result);\n\n if (state !== result) {\n const isPrevented = shouldPreventRemove(\n emitter,\n beforeRemoveListeners,\n state.routes,\n result.routes,\n action\n );\n\n if (isPrevented) {\n return true;\n }\n\n setState(result);\n }\n\n if (onRouteFocusParent !== undefined) {\n // Some actions such as `NAVIGATE` also want to bring the navigated route to focus in the whole tree\n // This means we need to focus all of the parent navigators of this navigator as well\n const shouldFocus = router.shouldActionChangeFocus(action);\n\n if (shouldFocus && key !== undefined) {\n onRouteFocusParent(key);\n }\n }\n\n return true;\n }\n }\n\n if (onActionParent !== undefined) {\n // Bubble action to the parent if the current navigator didn't handle it\n if (onActionParent(action, visitedNavigators)) {\n return true;\n }\n }\n\n // If the action wasn't handled by current navigator or a parent navigator, let children handle it\n for (let i = actionListeners.length - 1; i >= 0; i--) {\n const listener = actionListeners[i];\n\n if (listener(action, visitedNavigators)) {\n return true;\n }\n }\n\n return false;\n },\n [\n actionListeners,\n beforeRemoveListeners,\n emitter,\n getState,\n key,\n onActionParent,\n onDispatchAction,\n onRouteFocusParent,\n router,\n setState,\n ]\n );\n\n useOnPreventRemove({\n getState,\n emitter,\n beforeRemoveListeners,\n });\n\n React.useEffect(() => addListenerParent?.('action', onAction), [\n addListenerParent,\n onAction,\n ]);\n\n return onAction;\n}\n","/**\n * Compare two arrays with primitive values as the content.\n * We need to make sure that both values and order match.\n */\nexport default function isArrayEqual(a: any[], b: any[]) {\n return a.length === b.length && a.every((it, index) => it === b[index]);\n}\n","import * as React from 'react';\nimport { isValidElementType } from 'react-is';\nimport {\n CommonActions,\n DefaultRouterOptions,\n NavigationState,\n ParamListBase,\n Router,\n RouterFactory,\n RouterConfigOptions,\n PartialState,\n NavigationAction,\n Route,\n} from '@react-navigation/routers';\nimport NavigationStateContext from './NavigationStateContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport Screen from './Screen';\nimport useEventEmitter from './useEventEmitter';\nimport useRegisterNavigator from './useRegisterNavigator';\nimport useDescriptors from './useDescriptors';\nimport useNavigationHelpers from './useNavigationHelpers';\nimport useOnAction from './useOnAction';\nimport useFocusEvents from './useFocusEvents';\nimport useOnRouteFocus from './useOnRouteFocus';\nimport useChildListeners from './useChildListeners';\nimport useFocusedListenersChildrenAdapter from './useFocusedListenersChildrenAdapter';\nimport useKeyedChildListeners from './useKeyedChildListeners';\nimport useOnGetState from './useOnGetState';\nimport useScheduleUpdate from './useScheduleUpdate';\nimport useCurrentRender from './useCurrentRender';\nimport isArrayEqual from './isArrayEqual';\nimport {\n DefaultNavigatorOptions,\n RouteConfig,\n PrivateValueStore,\n EventMapBase,\n EventMapCore,\n NavigatorScreenParams,\n} from './types';\n\n// This is to make TypeScript compiler happy\n// eslint-disable-next-line babel/no-unused-expressions\nPrivateValueStore;\n\ntype NavigatorRoute<State extends NavigationState> = {\n key: string;\n params?: NavigatorScreenParams<ParamListBase, State>;\n};\n\n/**\n * Extract route config object from React children elements.\n *\n * @param children React Elements to extract the config from.\n */\nconst getRouteConfigsFromChildren = <\n State extends NavigationState,\n ScreenOptions extends {},\n EventMap extends EventMapBase\n>(\n children: React.ReactNode\n) => {\n const configs = React.Children.toArray(children).reduce<\n RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>[]\n >((acc, child) => {\n if (React.isValidElement(child)) {\n if (child.type === Screen) {\n // We can only extract the config from `Screen` elements\n // If something else was rendered, it's probably a bug\n acc.push(\n child.props as RouteConfig<\n ParamListBase,\n string,\n State,\n ScreenOptions,\n EventMap\n >\n );\n return acc;\n }\n\n if (child.type === React.Fragment) {\n // When we encounter a fragment, we need to dive into its children to extract the configs\n // This is handy to conditionally define a group of screens\n acc.push(\n ...getRouteConfigsFromChildren<State, ScreenOptions, EventMap>(\n child.props.children\n )\n );\n return acc;\n }\n }\n\n throw new Error(\n `A navigator can only contain 'Screen' components as its direct children (found ${\n React.isValidElement(child)\n ? `'${\n typeof child.type === 'string' ? child.type : child.type?.name\n }'${\n child.props?.name ? ` for the screen '${child.props.name}'` : ''\n }`\n : typeof child === 'object'\n ? JSON.stringify(child)\n : `'${String(child)}'`\n }). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.`\n );\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n configs.forEach((config) => {\n const { name, children, component, getComponent } = config;\n\n if (typeof name !== 'string' || !name) {\n throw new Error(\n `Got an invalid name (${JSON.stringify(\n name\n )}) for the screen. It must be a non-empty string.`\n );\n }\n\n if (\n children != null ||\n component !== undefined ||\n getComponent !== undefined\n ) {\n if (children != null && component !== undefined) {\n throw new Error(\n `Got both 'component' and 'children' props for the screen '${name}'. You must pass only one of them.`\n );\n }\n\n if (children != null && getComponent !== undefined) {\n throw new Error(\n `Got both 'getComponent' and 'children' props for the screen '${name}'. You must pass only one of them.`\n );\n }\n\n if (component !== undefined && getComponent !== undefined) {\n throw new Error(\n `Got both 'component' and 'getComponent' props for the screen '${name}'. You must pass only one of them.`\n );\n }\n\n if (children != null && typeof children !== 'function') {\n throw new Error(\n `Got an invalid value for 'children' prop for the screen '${name}'. It must be a function returning a React Element.`\n );\n }\n\n if (component !== undefined && !isValidElementType(component)) {\n throw new Error(\n `Got an invalid value for 'component' prop for the screen '${name}'. It must be a valid React Component.`\n );\n }\n\n if (getComponent !== undefined && typeof getComponent !== 'function') {\n throw new Error(\n `Got an invalid value for 'getComponent' prop for the screen '${name}'. It must be a function returning a React Component.`\n );\n }\n\n if (typeof component === 'function' && component.name === 'component') {\n // Inline anonymous functions passed in the `component` prop will have the name of the prop\n // It's relatively safe to assume that it's not a component since it should also have PascalCase name\n // We won't catch all scenarios here, but this should catch a good chunk of incorrect use.\n console.warn(\n `Looks like you're passing an inline function for 'component' prop for the screen '${name}' (e.g. component={() => <SomeComponent />}). Passing an inline function will cause the component state to be lost on re-render and cause perf issues since it's re-created every render. You can pass the function as children to 'Screen' instead to achieve the desired behaviour.`\n );\n }\n } else {\n throw new Error(\n `Couldn't find a 'component', 'getComponent' or 'children' prop for the screen '${name}'. This can happen if you passed 'undefined'. You likely forgot to export your component from the file it's defined in, or mixed up default import and named import when importing.`\n );\n }\n });\n }\n\n return configs;\n};\n\n/**\n * Hook for building navigators.\n *\n * @param createRouter Factory method which returns router object.\n * @param options Options object containing `children` and additional options for the router.\n * @returns An object containing `state`, `navigation`, `descriptors` objects.\n */\nexport default function useNavigationBuilder<\n State extends NavigationState,\n RouterOptions extends DefaultRouterOptions,\n ActionHelpers extends Record<string, () => void>,\n ScreenOptions extends {},\n EventMap extends Record<string, any>\n>(\n createRouter: RouterFactory<State, any, RouterOptions>,\n options: DefaultNavigatorOptions<ScreenOptions> & RouterOptions\n) {\n const navigatorKey = useRegisterNavigator();\n\n const route = React.useContext(NavigationRouteContext) as\n | NavigatorRoute<State>\n | undefined;\n\n const { children, ...rest } = options;\n const { current: router } = React.useRef<Router<State, any>>(\n createRouter({\n ...((rest as unknown) as RouterOptions),\n ...(route?.params &&\n route.params.state == null &&\n route.params.initial !== false &&\n typeof route.params.screen === 'string'\n ? { initialRouteName: route.params.screen }\n : null),\n })\n );\n\n const routeConfigs = getRouteConfigsFromChildren<\n State,\n ScreenOptions,\n EventMap\n >(children);\n\n const screens = routeConfigs.reduce<\n Record<\n string,\n RouteConfig<ParamListBase, string, State, ScreenOptions, EventMap>\n >\n >((acc, config) => {\n if (config.name in acc) {\n throw new Error(\n `A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${config.name}')`\n );\n }\n\n acc[config.name] = config;\n return acc;\n }, {});\n\n const routeNames = routeConfigs.map((config) => config.name);\n const routeParamList = routeNames.reduce<Record<string, object | undefined>>(\n (acc, curr) => {\n const { initialParams } = screens[curr];\n const initialParamsFromParams =\n route?.params?.state == null &&\n route?.params?.initial !== false &&\n route?.params?.screen === curr\n ? route.params.params\n : undefined;\n\n acc[curr] =\n initialParams !== undefined || initialParamsFromParams !== undefined\n ? {\n ...initialParams,\n ...initialParamsFromParams,\n }\n : undefined;\n\n return acc;\n },\n {}\n );\n const routeGetIdList = routeNames.reduce<\n RouterConfigOptions['routeGetIdList']\n >(\n (acc, curr) =>\n Object.assign(acc, {\n [curr]: screens[curr].getId,\n }),\n {}\n );\n\n if (!routeNames.length) {\n throw new Error(\n \"Couldn't find any screens for the navigator. Have you defined any screens as its children?\"\n );\n }\n\n const isStateValid = React.useCallback(\n (state) => state.type === undefined || state.type === router.type,\n [router.type]\n );\n\n const isStateInitialized = React.useCallback(\n (state) =>\n state !== undefined && state.stale === false && isStateValid(state),\n [isStateValid]\n );\n\n const {\n state: currentState,\n getState: getCurrentState,\n setState,\n setKey,\n getKey,\n getIsInitial,\n } = React.useContext(NavigationStateContext);\n\n const [initializedState, isFirstStateInitialization] = React.useMemo(() => {\n // If the current state isn't initialized on first render, we initialize it\n // We also need to re-initialize it if the state passed from parent was changed (maybe due to reset)\n // Otherwise assume that the state was provided as initial state\n // So we need to rehydrate it to make it usable\n if (\n (currentState === undefined || !isStateValid(currentState)) &&\n route?.params?.state == null\n ) {\n return [\n router.getInitialState({\n routeNames,\n routeParamList,\n routeGetIdList,\n }),\n true,\n ];\n } else {\n return [\n router.getRehydratedState(\n route?.params?.state ?? (currentState as PartialState<State>),\n {\n routeNames,\n routeParamList,\n routeGetIdList,\n }\n ),\n false,\n ];\n }\n // We explicitly don't include routeNames/routeParamList in the dep list\n // below. We want to avoid forcing a new state to be calculated in cases\n // where routeConfigs change without affecting routeNames/routeParamList.\n // Instead, we handle changes to these in the nextState code below. Note\n // that some changes to routeConfigs are explicitly ignored, such as changes\n // to initialParams\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentState, router, isStateValid]);\n\n let state =\n // If the state isn't initialized, or stale, use the state we initialized instead\n // The state won't update until there's a change needed in the state we have initalized locally\n // So it'll be `undefined` or stale until the first navigation event happens\n isStateInitialized(currentState)\n ? (currentState as State)\n : (initializedState as State);\n\n let nextState: State = state;\n\n if (!isArrayEqual(state.routeNames, routeNames)) {\n // When the list of route names change, the router should handle it to remove invalid routes\n nextState = router.getStateForRouteNamesChange(state, {\n routeNames,\n routeParamList,\n routeGetIdList,\n });\n }\n\n const previousNestedParamsRef = React.useRef(route?.params);\n\n React.useEffect(() => {\n previousNestedParamsRef.current = route?.params;\n }, [route?.params]);\n\n if (route?.params) {\n const previousParams = previousNestedParamsRef.current;\n\n let action: CommonActions.Action | undefined;\n\n if (\n typeof route.params.state === 'object' &&\n route.params.state != null &&\n route.params.state !== previousParams?.state\n ) {\n // If the route was updated with new state, we should reset to it\n action = CommonActions.reset(route.params.state);\n } else if (\n typeof route.params.screen === 'string' &&\n ((route.params.initial === false && isFirstStateInitialization) ||\n route.params !== previousParams)\n ) {\n // FIXME: Since params are merged, `route.params.params` might contain params from an older route\n // If the route was updated with new screen name and/or params, we should navigate there\n action = CommonActions.navigate(route.params.screen, route.params.params);\n }\n\n // The update should be limited to current navigator only, so we call the router manually\n const updatedState = action\n ? router.getStateForAction(nextState, action, {\n routeNames,\n routeParamList,\n routeGetIdList,\n })\n : null;\n\n nextState =\n updatedState !== null\n ? router.getRehydratedState(updatedState, {\n routeNames,\n routeParamList,\n routeGetIdList,\n })\n : nextState;\n }\n\n const shouldUpdate = state !== nextState;\n\n useScheduleUpdate(() => {\n if (shouldUpdate) {\n // If the state needs to be updated, we'll schedule an update\n setState(nextState);\n }\n });\n\n // The up-to-date state will come in next render, but we don't need to wait for it\n // We can't use the outdated state since the screens have changed, which will cause error due to mismatched config\n // So we override the state object we return to use the latest state as soon as possible\n state = nextState;\n\n React.useEffect(() => {\n setKey(navigatorKey);\n\n if (!getIsInitial()) {\n // If it's not initial render, we need to update the state\n // This will make sure that our container gets notifier of state changes due to new mounts\n // This is necessary for proper screen tracking, URL updates etc.\n setState(nextState);\n }\n\n return () => {\n // We need to clean up state for this navigator on unmount\n // We do it in a timeout because we need to detect if another navigator mounted in the meantime\n // For example, if another navigator has started rendering, we should skip cleanup\n // Otherwise, our cleanup step will cleanup state for the other navigator and re-initialize it\n setTimeout(() => {\n if (getCurrentState() !== undefined && getKey() === navigatorKey) {\n setState(undefined);\n }\n }, 0);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // We initialize this ref here to avoid a new getState getting initialized\n // whenever initializedState changes. We want getState to have access to the\n // latest initializedState, but don't need it to change when that happens\n const initializedStateRef = React.useRef<State>();\n initializedStateRef.current = initializedState;\n\n const getState = React.useCallback((): State => {\n const currentState = getCurrentState();\n\n return isStateInitialized(currentState)\n ? (currentState as State)\n : (initializedStateRef.current as State);\n }, [getCurrentState, isStateInitialized]);\n\n const emitter = useEventEmitter<EventMapCore<State>>((e) => {\n let routeNames = [];\n\n let route: Route<string> | undefined;\n\n if (e.target) {\n route = state.routes.find((route) => route.key === e.target);\n\n if (route?.name) {\n routeNames.push(route.name);\n }\n } else {\n route = state.routes[state.index];\n routeNames.push(\n ...Object.keys(screens).filter((name) => route?.name === name)\n );\n }\n\n if (route == null) {\n return;\n }\n\n const navigation = descriptors[route.key].navigation;\n\n const listeners = ([] as (((e: any) => void) | undefined)[])\n .concat(\n ...routeNames.map((name) => {\n const { listeners } = screens[name];\n const map =\n typeof listeners === 'function'\n ? listeners({ route: route as any, navigation })\n : listeners;\n\n return map\n ? Object.keys(map)\n .filter((type) => type === e.type)\n .map((type) => map?.[type])\n : undefined;\n })\n )\n .filter((cb, i, self) => cb && self.lastIndexOf(cb) === i);\n\n listeners.forEach((listener) => listener?.(e));\n });\n\n useFocusEvents({ state, emitter });\n\n React.useEffect(() => {\n emitter.emit({ type: 'state', data: { state } });\n }, [emitter, state]);\n\n const { listeners: childListeners, addListener } = useChildListeners();\n\n const { keyedListeners, addKeyedListener } = useKeyedChildListeners();\n\n const onAction = useOnAction({\n router,\n getState,\n setState,\n key: route?.key,\n actionListeners: childListeners.action,\n beforeRemoveListeners: keyedListeners.beforeRemove,\n routerConfigOptions: {\n routeNames,\n routeParamList,\n routeGetIdList,\n },\n emitter,\n });\n\n const onRouteFocus = useOnRouteFocus({\n router,\n key: route?.key,\n getState,\n setState,\n });\n\n const navigation = useNavigationHelpers<\n State,\n ActionHelpers,\n NavigationAction,\n EventMap\n >({\n onAction,\n getState,\n emitter,\n router,\n });\n\n useFocusedListenersChildrenAdapter({\n navigation,\n focusedListeners: childListeners.focus,\n });\n\n useOnGetState({\n getState,\n getStateListeners: keyedListeners.getState,\n });\n\n const descriptors = useDescriptors<State, ScreenOptions, EventMap>({\n state,\n screens,\n navigation,\n screenOptions: options.screenOptions,\n onAction,\n getState,\n setState,\n onRouteFocus,\n addListener,\n addKeyedListener,\n router,\n emitter,\n });\n\n useCurrentRender({\n state,\n navigation,\n descriptors,\n });\n\n return {\n state,\n navigation,\n descriptors,\n };\n}\n","import * as React from 'react';\nimport { nanoid } from 'nanoid/non-secure';\nimport { SingleNavigatorContext } from './EnsureSingleNavigator';\n\n/**\n * Register a navigator in the parent context (either a navigation container or a screen).\n * This is used to prevent multiple navigators under a single container or screen.\n */\nexport default function useRegisterNavigator() {\n const [key] = React.useState(() => nanoid());\n const container = React.useContext(SingleNavigatorContext);\n\n if (container === undefined) {\n throw new Error(\n \"Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?\"\n );\n }\n\n React.useEffect(() => {\n const { register, unregister } = container;\n\n register(key);\n\n return () => unregister(key);\n }, [container, key]);\n\n return key;\n}\n","import * as React from 'react';\nimport type { NavigationState } from '@react-navigation/routers';\nimport NavigationContext from './NavigationContext';\nimport type { NavigationEventEmitter } from './useEventEmitter';\nimport type { EventMapCore } from './types';\n\ntype Options<State extends NavigationState> = {\n state: State;\n emitter: NavigationEventEmitter<EventMapCore<State>>;\n};\n\n/**\n * Hook to take care of emitting `focus` and `blur` events.\n */\nexport default function useFocusEvents<State extends NavigationState>({\n state,\n emitter,\n}: Options<State>) {\n const navigation = React.useContext(NavigationContext);\n const lastFocusedKeyRef = React.useRef<string | undefined>();\n\n const currentFocusedKey = state.routes[state.index].key;\n\n // When the parent screen changes its focus state, we also need to change child's focus\n // Coz the child screen can't be focused if the parent screen is out of focus\n React.useEffect(\n () =>\n navigation?.addListener('focus', () => {\n lastFocusedKeyRef.current = currentFocusedKey;\n emitter.emit({ type: 'focus', target: currentFocusedKey });\n }),\n [currentFocusedKey, emitter, navigation]\n );\n\n React.useEffect(\n () =>\n navigation?.addListener('blur', () => {\n lastFocusedKeyRef.current = undefined;\n emitter.emit({ type: 'blur', target: currentFocusedKey });\n }),\n [currentFocusedKey, emitter, navigation]\n );\n\n React.useEffect(() => {\n const lastFocusedKey = lastFocusedKeyRef.current;\n\n lastFocusedKeyRef.current = currentFocusedKey;\n\n // We wouldn't have `lastFocusedKey` on initial mount\n // Fire focus event for the current route on mount if there's no parent navigator\n if (lastFocusedKey === undefined && !navigation) {\n emitter.emit({ type: 'focus', target: currentFocusedKey });\n }\n\n // We should only emit events when the focused key changed and navigator is focused\n // When navigator is not focused, screens inside shouldn't receive focused status either\n if (\n lastFocusedKey === currentFocusedKey ||\n !(navigation ? navigation.isFocused() : true)\n ) {\n return;\n }\n\n if (lastFocusedKey === undefined) {\n // Only fire events after initial mount\n return;\n }\n\n emitter.emit({ type: 'blur', target: lastFocusedKey });\n emitter.emit({ type: 'focus', target: currentFocusedKey });\n }, [currentFocusedKey, emitter, navigation]);\n}\n","import * as React from 'react';\nimport type {\n NavigationAction,\n NavigationState,\n Router,\n} from '@react-navigation/routers';\nimport NavigationBuilderContext from './NavigationBuilderContext';\n\ntype Options<Action extends NavigationAction> = {\n router: Router<NavigationState, Action>;\n getState: () => NavigationState;\n setState: (state: NavigationState) => void;\n key?: string;\n};\n\n/**\n * Hook to handle focus actions for a route.\n * Focus action needs to be treated specially, coz when a nested route is focused,\n * the parent navigators also needs to be focused.\n */\nexport default function useOnRouteFocus<Action extends NavigationAction>({\n router,\n getState,\n key: sourceRouteKey,\n setState,\n}: Options<Action>) {\n const { onRouteFocus: onRouteFocusParent } = React.useContext(\n NavigationBuilderContext\n );\n\n return React.useCallback(\n (key: string) => {\n const state = getState();\n const result = router.getStateForRouteFocus(state, key);\n\n if (result !== state) {\n setState(result);\n }\n\n if (onRouteFocusParent !== undefined && sourceRouteKey !== undefined) {\n onRouteFocusParent(sourceRouteKey);\n }\n },\n [getState, onRouteFocusParent, router, setState, sourceRouteKey]\n );\n}\n","import * as React from 'react';\nimport type { ParamListBase } from '@react-navigation/routers';\nimport NavigationBuilderContext, {\n FocusedNavigationCallback,\n FocusedNavigationListener,\n} from './NavigationBuilderContext';\nimport type { NavigationHelpers } from './types';\n\ntype Options = {\n navigation: NavigationHelpers<ParamListBase>;\n focusedListeners: FocusedNavigationListener[];\n};\n\n/**\n * Hook for passing focus callback to children\n */\nexport default function useFocusedListenersChildrenAdapter({\n navigation,\n focusedListeners,\n}: Options) {\n const { addListener } = React.useContext(NavigationBuilderContext);\n\n const listener = React.useCallback(\n (callback: FocusedNavigationCallback<any>) => {\n if (navigation.isFocused()) {\n for (const listener of focusedListeners) {\n const { handled, result } = listener(callback);\n\n if (handled) {\n return { handled, result };\n }\n }\n\n return { handled: true, result: callback(navigation) };\n } else {\n return { handled: false, result: null };\n }\n },\n [focusedListeners, navigation]\n );\n\n React.useEffect(() => addListener?.('focus', listener), [\n addListener,\n listener,\n ]);\n}\n","import * as React from 'react';\nimport type { NavigationState } from '@react-navigation/routers';\nimport NavigationBuilderContext, {\n GetStateListener,\n} from './NavigationBuilderContext';\nimport NavigationRouteContext from './NavigationRouteContext';\nimport isArrayEqual from './isArrayEqual';\n\ntype Options = {\n getState: () => NavigationState;\n getStateListeners: Record<string, GetStateListener | undefined>;\n};\n\nexport default function useOnGetState({\n getState,\n getStateListeners,\n}: Options) {\n const { addKeyedListener } = React.useContext(NavigationBuilderContext);\n const route = React.useContext(NavigationRouteContext);\n const key = route ? route.key : 'root';\n\n const getRehydratedState = React.useCallback(() => {\n const state = getState();\n\n // Avoid returning new route objects if we don't need to\n const routes = state.routes.map((route) => {\n const childState = getStateListeners[route.key]?.();\n\n if (route.state === childState) {\n return route;\n }\n\n return { ...route, state: childState };\n });\n\n if (isArrayEqual(state.routes, routes)) {\n return state;\n }\n\n return { ...state, routes };\n }, [getState, getStateListeners]);\n\n React.useEffect(() => {\n return addKeyedListener?.('getState', key, getRehydratedState);\n }, [addKeyedListener, getRehydratedState, key]);\n}\n","import * as React from 'react';\nimport type { NavigationState, ParamListBase } from '@react-navigation/routers';\nimport CurrentRenderContext from './CurrentRenderContext';\nimport type { Descriptor, NavigationHelpers } from './types';\n\ntype Options = {\n state: NavigationState;\n navigation: NavigationHelpers<ParamListBase>;\n descriptors: {\n [key: string]: Descriptor<ParamListBase, string, NavigationState, object>;\n };\n};\n\n/**\n * Write the current options, so that server renderer can get current values\n * Mutating values like this is not safe in async mode, but it doesn't apply to SSR\n */\nexport default function useCurrentRender({\n state,\n navigation,\n descriptors,\n}: Options) {\n const current = React.useContext(CurrentRenderContext);\n\n if (current && navigation.isFocused()) {\n current.options = descriptors[state.routes[state.index].key].options;\n }\n}\n","import * as React from 'react';\nimport type { LinkingOptions } from './types';\n\nconst LinkingContext = React.createContext<{\n options: LinkingOptions | undefined;\n}>({ options: undefined });\n\nLinkingContext.displayName = 'LinkingContext';\n\nexport default LinkingContext;\n","import * as React from 'react';\nimport {\n BaseNavigationContainer,\n NavigationContainerProps,\n NavigationContainerRef,\n} from '@react-navigation/core';\nimport ThemeProvider from './theming/ThemeProvider';\nimport DefaultTheme from './theming/DefaultTheme';\nimport LinkingContext from './LinkingContext';\nimport useThenable from './useThenable';\nimport useLinking from './useLinking';\nimport useDocumentTitle from './useDocumentTitle';\nimport useBackButton from './useBackButton';\nimport type { Theme, LinkingOptions, DocumentTitleOptions } from './types';\n\ntype Props = NavigationContainerProps & {\n theme?: Theme;\n linking?: LinkingOptions;\n fallback?: React.ReactNode;\n documentTitle?: DocumentTitleOptions;\n onReady?: () => void;\n};\n\n/**\n * Container component which holds the navigation state designed for React Native apps.\n * This should be rendered at the root wrapping the whole app.\n *\n * @param props.initialState Initial state object for the navigation tree. When deep link handling is enabled, this will override deep links when specified. Make sure that you don't specify an `initialState` when there's a deep link (`Linking.getInitialURL()`).\n * @param props.onReady Callback which is called after the navigation tree mounts.\n * @param props.onStateChange Callback which is called with the latest navigation state when it changes.\n * @param props.theme Theme object for the navigators.\n * @param props.linking Options for deep linking. Deep link handling is enabled when this prop is provided, unless `linking.enabled` is `false`.\n * @param props.fallback Fallback component to render until we have finished getting initial state when linking is enabled. Defaults to `null`.\n * @param props.documentTitle Options to configure the document title on Web. Updating document title is handled by default unless `documentTitle.enabled` is `false`.\n * @param props.children Child elements to render the content.\n * @param props.ref Ref object which refers to the navigation object containing helper methods.\n */\nconst NavigationContainer = React.forwardRef(function NavigationContainer(\n {\n theme = DefaultTheme,\n linking,\n fallback = null,\n documentTitle,\n onReady,\n ...rest\n }: Props,\n ref?: React.Ref<NavigationContainerRef | null>\n) {\n const isLinkingEnabled = linking ? linking.enabled !== false : false;\n\n const refContainer = React.useRef<NavigationContainerRef>(null);\n\n useBackButton(refContainer);\n useDocumentTitle(refContainer, documentTitle);\n\n const { getInitialState } = useLinking(refContainer, {\n enabled: isLinkingEnabled,\n prefixes: [],\n ...linking,\n });\n\n const [isResolved, initialState] = useThenable(getInitialState);\n\n React.useImperativeHandle(ref, () => refContainer.current);\n\n const linkingContext = React.useMemo(() => ({ options: linking }), [linking]);\n\n const isReady = rest.initialState != null || !isLinkingEnabled || isResolved;\n\n const onReadyRef = React.useRef(onReady);\n\n React.useEffect(() => {\n onReadyRef.current = onReady;\n });\n\n React.useEffect(() => {\n if (isReady) {\n onReadyRef.current?.();\n }\n }, [isReady]);\n\n if (!isReady) {\n // This is temporary until we have Suspense for data-fetching\n // Then the fallback will be handled by a parent `Suspense` component\n return fallback as React.ReactElement;\n }\n\n return (\n <LinkingContext.Provider value={linkingContext}>\n <ThemeProvider value={theme}>\n <BaseNavigationContainer\n {...rest}\n initialState={\n rest.initialState == null ? initialState : rest.initialState\n }\n ref={refContainer}\n />\n </ThemeProvider>\n </LinkingContext.Provider>\n );\n});\n\nexport default NavigationContainer;\n","import * as React from 'react';\nimport type { NavigationContainerRef } from '@react-navigation/core';\nimport type { DocumentTitleOptions } from './types';\n\n/**\n * Set the document title for the active screen\n */\nexport default function useDocumentTitle(\n ref: React.RefObject<NavigationContainerRef>,\n {\n enabled = true,\n formatter = (options, route) => options?.title ?? route?.name,\n }: DocumentTitleOptions = {}\n) {\n React.useEffect(() => {\n if (!enabled) {\n return;\n }\n\n const navigation = ref.current;\n\n if (navigation) {\n const title = formatter(\n navigation.getCurrentOptions(),\n navigation.getCurrentRoute()\n );\n\n document.title = title;\n }\n\n return navigation?.addListener('options', (e) => {\n const title = formatter(e.data.options, navigation?.getCurrentRoute());\n\n document.title = title;\n });\n });\n}\n","import * as React from 'react';\n\nexport default function useThenable<T>(create: () => PromiseLike<T>) {\n const [promise] = React.useState(create);\n\n let initialState: [boolean, T | undefined] = [false, undefined];\n\n // Check if our thenable is synchronous\n promise.then((result) => {\n initialState = [true, result];\n });\n\n const [state, setState] = React.useState(initialState);\n const [resolved] = state;\n\n React.useEffect(() => {\n let cancelled = false;\n\n const resolve = async () => {\n let result;\n\n try {\n result = await promise;\n } finally {\n if (!cancelled) {\n setState([true, result]);\n }\n }\n };\n\n if (!resolved) {\n resolve();\n }\n\n return () => {\n cancelled = true;\n };\n }, [promise, resolved]);\n\n return state;\n}\n","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\nvar rtlDetect = require('./lib/rtl-detect');\n\nmodule.exports = {\n\n isRtlLang: rtlDetect.isRtlLang,\n\n getLangDir: rtlDetect.getLangDir\n\n};\n","'use strict';\nvar isObj = require('is-obj');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Sources cannot be null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction assignKey(to, from, key) {\n\tvar val = from[key];\n\n\tif (val === undefined || val === null) {\n\t\treturn;\n\t}\n\n\tif (hasOwnProperty.call(to, key)) {\n\t\tif (to[key] === undefined || to[key] === null) {\n\t\t\tthrow new TypeError('Cannot convert undefined or null to object (' + key + ')');\n\t\t}\n\t}\n\n\tif (!hasOwnProperty.call(to, key) || !isObj(val)) {\n\t\tto[key] = val;\n\t} else {\n\t\tto[key] = assign(Object(to[key]), from[key]);\n\t}\n}\n\nfunction assign(to, from) {\n\tif (to === from) {\n\t\treturn to;\n\t}\n\n\tfrom = Object(from);\n\n\tfor (var key in from) {\n\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\tassignKey(to, from, key);\n\t\t}\n\t}\n\n\tif (Object.getOwnPropertySymbols) {\n\t\tvar symbols = Object.getOwnPropertySymbols(from);\n\n\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\tassignKey(to, from, symbols[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n}\n\nmodule.exports = function deepAssign(target) {\n\ttarget = toObject(target);\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tassign(target, arguments[s]);\n\t}\n\n\treturn target;\n};\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = createPrefixer;\n\nvar _prefixProperty = require('./utils/prefixProperty');\n\nvar _prefixProperty2 = _interopRequireDefault(_prefixProperty);\n\nvar _prefixValue = require('./utils/prefixValue');\n\nvar _prefixValue2 = _interopRequireDefault(_prefixValue);\n\nvar _addNewValuesOnly = require('./utils/addNewValuesOnly');\n\nvar _addNewValuesOnly2 = _interopRequireDefault(_addNewValuesOnly);\n\nvar _isObject = require('./utils/isObject');\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction createPrefixer(_ref) {\n var prefixMap = _ref.prefixMap,\n plugins = _ref.plugins;\n\n return function prefix(style) {\n for (var property in style) {\n var value = style[property];\n\n // handle nested objects\n if ((0, _isObject2.default)(value)) {\n style[property] = prefix(value);\n // handle array values\n } else if (Array.isArray(value)) {\n var combinedValue = [];\n\n for (var i = 0, len = value.length; i < len; ++i) {\n var processedValue = (0, _prefixValue2.default)(plugins, property, value[i], style, prefixMap);\n (0, _addNewValuesOnly2.default)(combinedValue, processedValue || value[i]);\n }\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (combinedValue.length > 0) {\n style[property] = combinedValue;\n }\n } else {\n var _processedValue = (0, _prefixValue2.default)(plugins, property, value, style, prefixMap);\n\n // only modify the value if it was touched\n // by any plugin to prevent unnecessary mutations\n if (_processedValue) {\n style[property] = _processedValue;\n }\n\n style = (0, _prefixProperty2.default)(prefixMap, property, style);\n }\n }\n\n return style;\n };\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = backgroundClip;\n\n// https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip#Browser_compatibility\nfunction backgroundClip(property, value) {\n if (typeof value === 'string' && value === 'text') {\n return ['-webkit-text', 'text'];\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = crossFade;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#search=cross-fade\nvar prefixes = ['-webkit-', ''];\nfunction crossFade(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('cross-fade(') > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/cross-fade\\(/g, prefix + 'cross-fade(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = cursor;\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar values = {\n 'zoom-in': true,\n 'zoom-out': true,\n grab: true,\n grabbing: true\n};\n\nfunction cursor(property, value) {\n if (property === 'cursor' && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = filter;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#feat=css-filter-function\nvar prefixes = ['-webkit-', ''];\nfunction filter(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('filter(') > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/filter\\(/g, prefix + 'filter(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flex;\nvar values = {\n flex: ['-webkit-box', '-moz-box', '-ms-flexbox', '-webkit-flex', 'flex'],\n 'inline-flex': ['-webkit-inline-box', '-moz-inline-box', '-ms-inline-flexbox', '-webkit-inline-flex', 'inline-flex']\n};\n\nfunction flex(property, value) {\n if (property === 'display' && values.hasOwnProperty(value)) {\n return values[value];\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flexboxIE;\nvar alternativeValues = {\n 'space-around': 'distribute',\n 'space-between': 'justify',\n 'flex-start': 'start',\n 'flex-end': 'end'\n};\nvar alternativeProps = {\n alignContent: 'msFlexLinePack',\n alignSelf: 'msFlexItemAlign',\n alignItems: 'msFlexAlign',\n justifyContent: 'msFlexPack',\n order: 'msFlexOrder',\n flexGrow: 'msFlexPositive',\n flexShrink: 'msFlexNegative',\n flexBasis: 'msFlexPreferredSize'\n // Full expanded syntax is flex-grow | flex-shrink | flex-basis.\n};var flexShorthandMappings = {\n auto: '1 1 auto',\n inherit: 'inherit',\n initial: '0 1 auto',\n none: '0 0 auto',\n unset: 'unset'\n};\nvar isUnitlessNumber = /^\\d+(\\.\\d+)?$/;\n\nfunction flexboxIE(property, value, style) {\n if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) {\n style[alternativeProps[property]] = alternativeValues[value] || value;\n }\n if (property === 'flex') {\n // For certain values we can do straight mappings based on the spec\n // for the expansions.\n if (Object.prototype.hasOwnProperty.call(flexShorthandMappings, value)) {\n style.msFlex = flexShorthandMappings[value];\n return;\n }\n // Here we have no direct mapping, so we favor looking for a\n // unitless positive number as that will be the most common use-case.\n if (isUnitlessNumber.test(value)) {\n style.msFlex = value + ' 1 0%';\n return;\n }\n\n // The next thing we can look for is if there are multiple values.\n var flexValues = value.split(/\\s/);\n // If we only have a single value that wasn't a positive unitless\n // or a pre-mapped value, then we can assume it is a unit value.\n switch (flexValues.length) {\n case 1:\n style.msFlex = '1 1 ' + value;\n return;\n case 2:\n // If we have 2 units, then we expect that the first will\n // always be a unitless number and represents flex-grow.\n // The second unit will represent flex-shrink for a unitless\n // value, or flex-basis otherwise.\n if (isUnitlessNumber.test(flexValues[1])) {\n style.msFlex = flexValues[0] + ' ' + flexValues[1] + ' 0%';\n } else {\n style.msFlex = flexValues[0] + ' 1 ' + flexValues[1];\n }\n return;\n default:\n style.msFlex = value;\n }\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = flexboxOld;\nvar alternativeValues = {\n 'space-around': 'justify',\n 'space-between': 'justify',\n 'flex-start': 'start',\n 'flex-end': 'end',\n 'wrap-reverse': 'multiple',\n wrap: 'multiple'\n};\n\nvar alternativeProps = {\n alignItems: 'WebkitBoxAlign',\n justifyContent: 'WebkitBoxPack',\n flexWrap: 'WebkitBoxLines',\n flexGrow: 'WebkitBoxFlex'\n};\n\nfunction flexboxOld(property, value, style) {\n if (property === 'flexDirection' && typeof value === 'string') {\n if (value.indexOf('column') > -1) {\n style.WebkitBoxOrient = 'vertical';\n } else {\n style.WebkitBoxOrient = 'horizontal';\n }\n if (value.indexOf('reverse') > -1) {\n style.WebkitBoxDirection = 'reverse';\n } else {\n style.WebkitBoxDirection = 'normal';\n }\n }\n if (alternativeProps.hasOwnProperty(property)) {\n style[alternativeProps[property]] = alternativeValues[value] || value;\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = gradient;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar values = /linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;\n\nfunction gradient(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && values.test(value)) {\n return prefixes.map(function (prefix) {\n return value.replace(values, function (grad) {\n return prefix + grad;\n });\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nexports.default = grid;\nfunction isSimplePositionValue(value) {\n return typeof value === 'number' && !isNaN(value);\n}\n\nfunction isComplexSpanValue(value) {\n return typeof value === 'string' && value.includes('/');\n}\n\nvar alignmentValues = ['center', 'end', 'start', 'stretch'];\n\nvar displayValues = {\n 'inline-grid': ['-ms-inline-grid', 'inline-grid'],\n grid: ['-ms-grid', 'grid']\n};\n\nvar propertyConverters = {\n alignSelf: function alignSelf(value, style) {\n if (alignmentValues.indexOf(value) > -1) {\n style.msGridRowAlign = value;\n }\n },\n\n gridColumn: function gridColumn(value, style) {\n if (isSimplePositionValue(value)) {\n style.msGridColumn = value;\n } else if (isComplexSpanValue(value)) {\n var _value$split = value.split('/'),\n _value$split2 = _slicedToArray(_value$split, 2),\n start = _value$split2[0],\n end = _value$split2[1];\n\n propertyConverters.gridColumnStart(+start, style);\n\n var _end$split = end.split(/ ?span /),\n _end$split2 = _slicedToArray(_end$split, 2),\n maybeSpan = _end$split2[0],\n maybeNumber = _end$split2[1];\n\n if (maybeSpan === '') {\n propertyConverters.gridColumnEnd(+start + +maybeNumber, style);\n } else {\n propertyConverters.gridColumnEnd(+end, style);\n }\n } else {\n propertyConverters.gridColumnStart(value, style);\n }\n },\n\n gridColumnEnd: function gridColumnEnd(value, style) {\n var msGridColumn = style.msGridColumn;\n\n if (isSimplePositionValue(value) && isSimplePositionValue(msGridColumn)) {\n style.msGridColumnSpan = value - msGridColumn;\n }\n },\n\n gridColumnStart: function gridColumnStart(value, style) {\n if (isSimplePositionValue(value)) {\n style.msGridColumn = value;\n }\n },\n\n gridRow: function gridRow(value, style) {\n if (isSimplePositionValue(value)) {\n style.msGridRow = value;\n } else if (isComplexSpanValue(value)) {\n var _value$split3 = value.split('/'),\n _value$split4 = _slicedToArray(_value$split3, 2),\n start = _value$split4[0],\n end = _value$split4[1];\n\n propertyConverters.gridRowStart(+start, style);\n\n var _end$split3 = end.split(/ ?span /),\n _end$split4 = _slicedToArray(_end$split3, 2),\n maybeSpan = _end$split4[0],\n maybeNumber = _end$split4[1];\n\n if (maybeSpan === '') {\n propertyConverters.gridRowEnd(+start + +maybeNumber, style);\n } else {\n propertyConverters.gridRowEnd(+end, style);\n }\n } else {\n propertyConverters.gridRowStart(value, style);\n }\n },\n\n gridRowEnd: function gridRowEnd(value, style) {\n var msGridRow = style.msGridRow;\n\n if (isSimplePositionValue(value) && isSimplePositionValue(msGridRow)) {\n style.msGridRowSpan = value - msGridRow;\n }\n },\n\n gridRowStart: function gridRowStart(value, style) {\n if (isSimplePositionValue(value)) {\n style.msGridRow = value;\n }\n },\n\n gridTemplateColumns: function gridTemplateColumns(value, style) {\n style.msGridColumns = value;\n },\n\n gridTemplateRows: function gridTemplateRows(value, style) {\n style.msGridRows = value;\n },\n\n justifySelf: function justifySelf(value, style) {\n if (alignmentValues.indexOf(value) > -1) {\n style.msGridColumnAlign = value;\n }\n }\n};\n\nfunction grid(property, value, style) {\n if (property === 'display' && value in displayValues) {\n return displayValues[value];\n }\n\n if (property in propertyConverters) {\n var propertyConverter = propertyConverters[property];\n propertyConverter(value, style);\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = imageSet;\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// http://caniuse.com/#feat=css-image-set\nvar prefixes = ['-webkit-', ''];\nfunction imageSet(property, value) {\n if (typeof value === 'string' && !(0, _isPrefixedValue2.default)(value) && value.indexOf('image-set(') > -1) {\n return prefixes.map(function (prefix) {\n return value.replace(/image-set\\(/g, prefix + 'image-set(');\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = logical;\nvar alternativeProps = {\n marginBlockStart: ['WebkitMarginBefore'],\n marginBlockEnd: ['WebkitMarginAfter'],\n marginInlineStart: ['WebkitMarginStart', 'MozMarginStart'],\n marginInlineEnd: ['WebkitMarginEnd', 'MozMarginEnd'],\n paddingBlockStart: ['WebkitPaddingBefore'],\n paddingBlockEnd: ['WebkitPaddingAfter'],\n paddingInlineStart: ['WebkitPaddingStart', 'MozPaddingStart'],\n paddingInlineEnd: ['WebkitPaddingEnd', 'MozPaddingEnd'],\n borderBlockStart: ['WebkitBorderBefore'],\n borderBlockStartColor: ['WebkitBorderBeforeColor'],\n borderBlockStartStyle: ['WebkitBorderBeforeStyle'],\n borderBlockStartWidth: ['WebkitBorderBeforeWidth'],\n borderBlockEnd: ['WebkitBorderAfter'],\n borderBlockEndColor: ['WebkitBorderAfterColor'],\n borderBlockEndStyle: ['WebkitBorderAfterStyle'],\n borderBlockEndWidth: ['WebkitBorderAfterWidth'],\n borderInlineStart: ['WebkitBorderStart', 'MozBorderStart'],\n borderInlineStartColor: ['WebkitBorderStartColor', 'MozBorderStartColor'],\n borderInlineStartStyle: ['WebkitBorderStartStyle', 'MozBorderStartStyle'],\n borderInlineStartWidth: ['WebkitBorderStartWidth', 'MozBorderStartWidth'],\n borderInlineEnd: ['WebkitBorderEnd', 'MozBorderEnd'],\n borderInlineEndColor: ['WebkitBorderEndColor', 'MozBorderEndColor'],\n borderInlineEndStyle: ['WebkitBorderEndStyle', 'MozBorderEndStyle'],\n borderInlineEndWidth: ['WebkitBorderEndWidth', 'MozBorderEndWidth']\n};\n\nfunction logical(property, value, style) {\n if (Object.prototype.hasOwnProperty.call(alternativeProps, property)) {\n var alternativePropList = alternativeProps[property];\n for (var i = 0, len = alternativePropList.length; i < len; ++i) {\n style[alternativePropList[i]] = value;\n }\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = position;\nfunction position(property, value) {\n if (property === 'position' && value === 'sticky') {\n return ['-webkit-sticky', 'sticky'];\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = sizing;\nvar prefixes = ['-webkit-', '-moz-', ''];\n\nvar properties = {\n maxHeight: true,\n maxWidth: true,\n width: true,\n height: true,\n columnWidth: true,\n minWidth: true,\n minHeight: true\n};\nvar values = {\n 'min-content': true,\n 'max-content': true,\n 'fill-available': true,\n 'fit-content': true,\n 'contain-floats': true\n};\n\nfunction sizing(property, value) {\n if (properties.hasOwnProperty(property) && values.hasOwnProperty(value)) {\n return prefixes.map(function (prefix) {\n return prefix + value;\n });\n }\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n\nvar _hyphenateProperty = require('css-in-js-utils/lib/hyphenateProperty');\n\nvar _hyphenateProperty2 = _interopRequireDefault(_hyphenateProperty);\n\nvar _isPrefixedValue = require('css-in-js-utils/lib/isPrefixedValue');\n\nvar _isPrefixedValue2 = _interopRequireDefault(_isPrefixedValue);\n\nvar _capitalizeString = require('../utils/capitalizeString');\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar properties = {\n transition: true,\n transitionProperty: true,\n WebkitTransition: true,\n WebkitTransitionProperty: true,\n MozTransition: true,\n MozTransitionProperty: true\n};\n\n\nvar prefixMapping = {\n Webkit: '-webkit-',\n Moz: '-moz-',\n ms: '-ms-'\n};\n\nfunction prefixValue(value, propertyPrefixMap) {\n if ((0, _isPrefixedValue2.default)(value)) {\n return value;\n }\n\n // only split multi values, not cubic beziers\n var multipleValues = value.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g);\n\n for (var i = 0, len = multipleValues.length; i < len; ++i) {\n var singleValue = multipleValues[i];\n var values = [singleValue];\n for (var property in propertyPrefixMap) {\n var dashCaseProperty = (0, _hyphenateProperty2.default)(property);\n\n if (singleValue.indexOf(dashCaseProperty) > -1 && dashCaseProperty !== 'order') {\n var prefixes = propertyPrefixMap[property];\n for (var j = 0, pLen = prefixes.length; j < pLen; ++j) {\n // join all prefixes and create a new value\n values.unshift(singleValue.replace(dashCaseProperty, prefixMapping[prefixes[j]] + dashCaseProperty));\n }\n }\n }\n\n multipleValues[i] = values.join(',');\n }\n\n return multipleValues.join(',');\n}\n\nfunction transition(property, value, style, propertyPrefixMap) {\n // also check for already prefixed transitions\n if (typeof value === 'string' && properties.hasOwnProperty(property)) {\n var outputValue = prefixValue(value, propertyPrefixMap);\n // if the property is already prefixed\n var webkitOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-moz-|-ms-/.test(val);\n }).join(',');\n\n if (property.indexOf('Webkit') > -1) {\n return webkitOutput;\n }\n\n var mozOutput = outputValue.split(/,(?![^()]*(?:\\([^()]*\\))?\\))/g).filter(function (val) {\n return !/-webkit-|-ms-/.test(val);\n }).join(',');\n\n if (property.indexOf('Moz') > -1) {\n return mozOutput;\n }\n\n style['Webkit' + (0, _capitalizeString2.default)(property)] = webkitOutput;\n style['Moz' + (0, _capitalizeString2.default)(property)] = mozOutput;\n return outputValue;\n }\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar React = require('react');\nvar factory = require('./factory');\n\nif (typeof React === 'undefined') {\n throw Error(\n 'create-react-class could not find the React object. If you are using script tags, ' +\n 'make sure that React is being loaded before create-react-class.'\n );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n React.Component,\n React.isValidElement,\n ReactNoopUpdateQueue\n);\n","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';\nexport default TurboModuleRegistry.get('NativeAnimatedTurboModule');","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\nimport * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';\nexport default TurboModuleRegistry.get('NativeAnimatedModule');","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport Animation from './Animation';\nimport { shouldUseNativeDriver } from '../NativeAnimatedHelper';\n\nvar DecayAnimation = /*#__PURE__*/function (_Animation) {\n _inheritsLoose(DecayAnimation, _Animation);\n\n function DecayAnimation(config) {\n var _config$deceleration, _config$isInteraction, _config$iterations;\n\n var _this;\n\n _this = _Animation.call(this) || this;\n _this._deceleration = (_config$deceleration = config.deceleration) !== null && _config$deceleration !== void 0 ? _config$deceleration : 0.998;\n _this._velocity = config.velocity;\n _this._useNativeDriver = shouldUseNativeDriver(config);\n _this.__isInteraction = (_config$isInteraction = config.isInteraction) !== null && _config$isInteraction !== void 0 ? _config$isInteraction : !_this._useNativeDriver;\n _this.__iterations = (_config$iterations = config.iterations) !== null && _config$iterations !== void 0 ? _config$iterations : 1;\n return _this;\n }\n\n var _proto = DecayAnimation.prototype;\n\n _proto.__getNativeAnimationConfig = function __getNativeAnimationConfig() {\n return {\n type: 'decay',\n deceleration: this._deceleration,\n velocity: this._velocity,\n iterations: this.__iterations\n };\n };\n\n _proto.start = function start(fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {\n this.__active = true;\n this._lastValue = fromValue;\n this._fromValue = fromValue;\n this._onUpdate = onUpdate;\n this.__onEnd = onEnd;\n this._startTime = Date.now();\n\n if (this._useNativeDriver) {\n this.__startNativeAnimation(animatedValue);\n } else {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n };\n\n _proto.onUpdate = function onUpdate() {\n var now = Date.now();\n var value = this._fromValue + this._velocity / (1 - this._deceleration) * (1 - Math.exp(-(1 - this._deceleration) * (now - this._startTime)));\n\n this._onUpdate(value);\n\n if (Math.abs(this._lastValue - value) < 0.1) {\n this.__debouncedOnEnd({\n finished: true\n });\n\n return;\n }\n\n this._lastValue = value;\n\n if (this.__active) {\n this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));\n }\n };\n\n _proto.stop = function stop() {\n _Animation.prototype.stop.call(this);\n\n this.__active = false;\n global.cancelAnimationFrame(this._animationFrame);\n\n this.__debouncedOnEnd({\n finished: false\n });\n };\n\n return DecayAnimation;\n}(Animation);\n\nexport default DecayAnimation;","/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Info = function Info() {\n this.any_blank_count = 0;\n this.any_blank_ms = 0;\n this.any_blank_speed_sum = 0;\n this.mostly_blank_count = 0;\n this.mostly_blank_ms = 0;\n this.pixels_blank = 0;\n this.pixels_sampled = 0;\n this.pixels_scrolled = 0;\n this.total_time_spent = 0;\n this.sample_count = 0;\n};\n\nvar DEBUG = false;\nvar _listeners = [];\nvar _minSampleCount = 10;\n\nvar _sampleRate = DEBUG ? 1 : null;\n/**\n * A helper class for detecting when the maximem fill rate of `VirtualizedList` is exceeded.\n * By default the sampling rate is set to zero and this will do nothing. If you want to collect\n * samples (e.g. to log them), make sure to call `FillRateHelper.setSampleRate(0.0-1.0)`.\n *\n * Listeners and sample rate are global for all `VirtualizedList`s - typical usage will combine with\n * `SceneTracker.getActiveScene` to determine the context of the events.\n */\n\n\nvar FillRateHelper = /*#__PURE__*/function () {\n FillRateHelper.addListener = function addListener(callback) {\n if (_sampleRate === null) {\n console.warn('Call `FillRateHelper.setSampleRate` before `addListener`.');\n }\n\n _listeners.push(callback);\n\n return {\n remove: function remove() {\n _listeners = _listeners.filter(function (listener) {\n return callback !== listener;\n });\n }\n };\n };\n\n FillRateHelper.setSampleRate = function setSampleRate(sampleRate) {\n _sampleRate = sampleRate;\n };\n\n FillRateHelper.setMinSampleCount = function setMinSampleCount(minSampleCount) {\n _minSampleCount = minSampleCount;\n };\n\n function FillRateHelper(getFrameMetrics) {\n this._anyBlankStartTime = null;\n this._enabled = false;\n this._info = new Info();\n this._mostlyBlankStartTime = null;\n this._samplesStartTime = null;\n this._getFrameMetrics = getFrameMetrics;\n this._enabled = (_sampleRate || 0) > Math.random();\n\n this._resetData();\n }\n\n var _proto = FillRateHelper.prototype;\n\n _proto.activate = function activate() {\n if (this._enabled && this._samplesStartTime == null) {\n DEBUG && console.debug('FillRateHelper: activate');\n this._samplesStartTime = global.performance.now();\n }\n };\n\n _proto.deactivateAndFlush = function deactivateAndFlush() {\n if (!this._enabled) {\n return;\n }\n\n var start = this._samplesStartTime; // const for flow\n\n if (start == null) {\n DEBUG && console.debug('FillRateHelper: bail on deactivate with no start time');\n return;\n }\n\n if (this._info.sample_count < _minSampleCount) {\n // Don't bother with under-sampled events.\n this._resetData();\n\n return;\n }\n\n var total_time_spent = global.performance.now() - start;\n\n var info = _objectSpread(_objectSpread({}, this._info), {}, {\n total_time_spent: total_time_spent\n });\n\n if (DEBUG) {\n var derived = {\n avg_blankness: this._info.pixels_blank / this._info.pixels_sampled,\n avg_speed: this._info.pixels_scrolled / (total_time_spent / 1000),\n avg_speed_when_any_blank: this._info.any_blank_speed_sum / this._info.any_blank_count,\n any_blank_per_min: this._info.any_blank_count / (total_time_spent / 1000 / 60),\n any_blank_time_frac: this._info.any_blank_ms / total_time_spent,\n mostly_blank_per_min: this._info.mostly_blank_count / (total_time_spent / 1000 / 60),\n mostly_blank_time_frac: this._info.mostly_blank_ms / total_time_spent\n };\n\n for (var key in derived) {\n derived[key] = Math.round(1000 * derived[key]) / 1000;\n }\n\n console.debug('FillRateHelper deactivateAndFlush: ', {\n derived: derived,\n info: info\n });\n }\n\n _listeners.forEach(function (listener) {\n return listener(info);\n });\n\n this._resetData();\n };\n\n _proto.computeBlankness = function computeBlankness(props, state, scrollMetrics) {\n if (!this._enabled || props.getItemCount(props.data) === 0 || this._samplesStartTime == null) {\n return 0;\n }\n\n var dOffset = scrollMetrics.dOffset,\n offset = scrollMetrics.offset,\n velocity = scrollMetrics.velocity,\n visibleLength = scrollMetrics.visibleLength; // Denominator metrics that we track for all events - most of the time there is no blankness and\n // we want to capture that.\n\n this._info.sample_count++;\n this._info.pixels_sampled += Math.round(visibleLength);\n this._info.pixels_scrolled += Math.round(Math.abs(dOffset));\n var scrollSpeed = Math.round(Math.abs(velocity) * 1000); // px / sec\n // Whether blank now or not, record the elapsed time blank if we were blank last time.\n\n var now = global.performance.now();\n\n if (this._anyBlankStartTime != null) {\n this._info.any_blank_ms += now - this._anyBlankStartTime;\n }\n\n this._anyBlankStartTime = null;\n\n if (this._mostlyBlankStartTime != null) {\n this._info.mostly_blank_ms += now - this._mostlyBlankStartTime;\n }\n\n this._mostlyBlankStartTime = null;\n var blankTop = 0;\n var first = state.first;\n\n var firstFrame = this._getFrameMetrics(first);\n\n while (first <= state.last && (!firstFrame || !firstFrame.inLayout)) {\n firstFrame = this._getFrameMetrics(first);\n first++;\n } // Only count blankTop if we aren't rendering the first item, otherwise we will count the header\n // as blank.\n\n\n if (firstFrame && first > 0) {\n blankTop = Math.min(visibleLength, Math.max(0, firstFrame.offset - offset));\n }\n\n var blankBottom = 0;\n var last = state.last;\n\n var lastFrame = this._getFrameMetrics(last);\n\n while (last >= state.first && (!lastFrame || !lastFrame.inLayout)) {\n lastFrame = this._getFrameMetrics(last);\n last--;\n } // Only count blankBottom if we aren't rendering the last item, otherwise we will count the\n // footer as blank.\n\n\n if (lastFrame && last < props.getItemCount(props.data) - 1) {\n var bottomEdge = lastFrame.offset + lastFrame.length;\n blankBottom = Math.min(visibleLength, Math.max(0, offset + visibleLength - bottomEdge));\n }\n\n var pixels_blank = Math.round(blankTop + blankBottom);\n var blankness = pixels_blank / visibleLength;\n\n if (blankness > 0) {\n this._anyBlankStartTime = now;\n this._info.any_blank_speed_sum += scrollSpeed;\n this._info.any_blank_count++;\n this._info.pixels_blank += pixels_blank;\n\n if (blankness > 0.5) {\n this._mostlyBlankStartTime = now;\n this._info.mostly_blank_count++;\n }\n } else if (scrollSpeed < 0.01 || Math.abs(dOffset) < 1) {\n this.deactivateAndFlush();\n }\n\n return blankness;\n };\n\n _proto.enabled = function enabled() {\n return this._enabled;\n };\n\n _proto._resetData = function _resetData() {\n this._anyBlankStartTime = null;\n this._info = new Info();\n this._mostlyBlankStartTime = null;\n this._samplesStartTime = null;\n };\n\n return FillRateHelper;\n}();\n\nexport default FillRateHelper;","/**\n * @fileOverview Contains definition of the core graph object.\n */\n\n// TODO: need to change storage layer:\n// 1. Be able to get all nodes O(1)\n// 2. Be able to get number of links O(1)\n\n/**\n * @example\n * var graph = require('ngraph.graph')();\n * graph.addNode(1); // graph has one node.\n * graph.addLink(2, 3); // now graph contains three nodes and one link.\n *\n */\nmodule.exports = createGraph;\n\nvar eventify = require('ngraph.events');\n\n/**\n * Creates a new graph\n */\nfunction createGraph(options) {\n // Graph structure is maintained as dictionary of nodes\n // and array of links. Each node has 'links' property which\n // hold all links related to that node. And general links\n // array is used to speed up all links enumeration. This is inefficient\n // in terms of memory, but simplifies coding.\n options = options || {};\n if ('uniqueLinkId' in options) {\n console.warn(\n 'ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\\n' +\n 'Use `multigraph` option instead\\n',\n '\\n',\n 'Note: there is also change in default behavior: From now on each graph\\n'+\n 'is considered to be not a multigraph by default (each edge is unique).'\n );\n\n options.multigraph = options.uniqueLinkId;\n }\n\n // Dear reader, the non-multigraphs do not guarantee that there is only\n // one link for a given pair of node. When this option is set to false\n // we can save some memory and CPU (18% faster for non-multigraph);\n if (options.multigraph === undefined) options.multigraph = false;\n\n if (typeof Map !== 'function') {\n // TODO: Should we polyfill it ourselves? We don't use much operations there..\n throw new Error('ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph');\n } \n\n var nodes = new Map();\n var links = [],\n // Hash of multi-edges. Used to track ids of edges between same nodes\n multiEdges = {},\n suspendEvents = 0,\n\n createLink = options.multigraph ? createUniqueLink : createSingleLink,\n\n // Our graph API provides means to listen to graph changes. Users can subscribe\n // to be notified about changes in the graph by using `on` method. However\n // in some cases they don't use it. To avoid unnecessary memory consumption\n // we will not record graph changes until we have at least one subscriber.\n // Code below supports this optimization.\n //\n // Accumulates all changes made during graph updates.\n // Each change element contains:\n // changeType - one of the strings: 'add', 'remove' or 'update';\n // node - if change is related to node this property is set to changed graph's node;\n // link - if change is related to link this property is set to changed graph's link;\n changes = [],\n recordLinkChange = noop,\n recordNodeChange = noop,\n enterModification = noop,\n exitModification = noop;\n\n // this is our public API:\n var graphPart = {\n /**\n * Adds node to the graph. If node with given id already exists in the graph\n * its data is extended with whatever comes in 'data' argument.\n *\n * @param nodeId the node's identifier. A string or number is preferred.\n * @param [data] additional data for the node being added. If node already\n * exists its data object is augmented with the new one.\n *\n * @return {node} The newly added node or node with given id if it already exists.\n */\n addNode: addNode,\n\n /**\n * Adds a link to the graph. The function always create a new\n * link between two nodes. If one of the nodes does not exists\n * a new node is created.\n *\n * @param fromId link start node id;\n * @param toId link end node id;\n * @param [data] additional data to be set on the new link;\n *\n * @return {link} The newly created link\n */\n addLink: addLink,\n\n /**\n * Removes link from the graph. If link does not exist does nothing.\n *\n * @param link - object returned by addLink() or getLinks() methods.\n *\n * @returns true if link was removed; false otherwise.\n */\n removeLink: removeLink,\n\n /**\n * Removes node with given id from the graph. If node does not exist in the graph\n * does nothing.\n *\n * @param nodeId node's identifier passed to addNode() function.\n *\n * @returns true if node was removed; false otherwise.\n */\n removeNode: removeNode,\n\n /**\n * Gets node with given identifier. If node does not exist undefined value is returned.\n *\n * @param nodeId requested node identifier;\n *\n * @return {node} in with requested identifier or undefined if no such node exists.\n */\n getNode: getNode,\n\n /**\n * Gets number of nodes in this graph.\n *\n * @return number of nodes in the graph.\n */\n getNodeCount: getNodeCount,\n\n /**\n * Gets total number of links in the graph.\n */\n getLinkCount: getLinkCount,\n\n /**\n * Synonym for `getLinkCount()`\n */\n getLinksCount: getLinkCount,\n \n /**\n * Synonym for `getNodeCount()`\n */\n getNodesCount: getNodeCount,\n\n /**\n * Gets all links (inbound and outbound) from the node with given id.\n * If node with given id is not found null is returned.\n *\n * @param nodeId requested node identifier.\n *\n * @return Array of links from and to requested node if such node exists;\n * otherwise null is returned.\n */\n getLinks: getLinks,\n\n /**\n * Invokes callback on each node of the graph.\n *\n * @param {Function(node)} callback Function to be invoked. The function\n * is passed one argument: visited node.\n */\n forEachNode: forEachNode,\n\n /**\n * Invokes callback on every linked (adjacent) node to the given one.\n *\n * @param nodeId Identifier of the requested node.\n * @param {Function(node, link)} callback Function to be called on all linked nodes.\n * The function is passed two parameters: adjacent node and link object itself.\n * @param oriented if true graph treated as oriented.\n */\n forEachLinkedNode: forEachLinkedNode,\n\n /**\n * Enumerates all links in the graph\n *\n * @param {Function(link)} callback Function to be called on all links in the graph.\n * The function is passed one parameter: graph's link object.\n *\n * Link object contains at least the following fields:\n * fromId - node id where link starts;\n * toId - node id where link ends,\n * data - additional data passed to graph.addLink() method.\n */\n forEachLink: forEachLink,\n\n /**\n * Suspend all notifications about graph changes until\n * endUpdate is called.\n */\n beginUpdate: enterModification,\n\n /**\n * Resumes all notifications about graph changes and fires\n * graph 'changed' event in case there are any pending changes.\n */\n endUpdate: exitModification,\n\n /**\n * Removes all nodes and links from the graph.\n */\n clear: clear,\n\n /**\n * Detects whether there is a link between two nodes.\n * Operation complexity is O(n) where n - number of links of a node.\n * NOTE: this function is synonim for getLink()\n *\n * @returns link if there is one. null otherwise.\n */\n hasLink: getLink,\n\n /**\n * Detects whether there is a node with given id\n * \n * Operation complexity is O(1)\n * NOTE: this function is synonim for getNode()\n *\n * @returns node if there is one; Falsy value otherwise.\n */\n hasNode: getNode,\n\n /**\n * Gets an edge between two nodes.\n * Operation complexity is O(n) where n - number of links of a node.\n *\n * @param {string} fromId link start identifier\n * @param {string} toId link end identifier\n *\n * @returns link if there is one. null otherwise.\n */\n getLink: getLink\n };\n\n // this will add `on()` and `fire()` methods.\n eventify(graphPart);\n\n monitorSubscribers();\n\n return graphPart;\n\n function monitorSubscribers() {\n var realOn = graphPart.on;\n\n // replace real `on` with our temporary on, which will trigger change\n // modification monitoring:\n graphPart.on = on;\n\n function on() {\n // now it's time to start tracking stuff:\n graphPart.beginUpdate = enterModification = enterModificationReal;\n graphPart.endUpdate = exitModification = exitModificationReal;\n recordLinkChange = recordLinkChangeReal;\n recordNodeChange = recordNodeChangeReal;\n\n // this will replace current `on` method with real pub/sub from `eventify`.\n graphPart.on = realOn;\n // delegate to real `on` handler:\n return realOn.apply(graphPart, arguments);\n }\n }\n\n function recordLinkChangeReal(link, changeType) {\n changes.push({\n link: link,\n changeType: changeType\n });\n }\n\n function recordNodeChangeReal(node, changeType) {\n changes.push({\n node: node,\n changeType: changeType\n });\n }\n\n function addNode(nodeId, data) {\n if (nodeId === undefined) {\n throw new Error('Invalid node identifier');\n }\n\n enterModification();\n\n var node = getNode(nodeId);\n if (!node) {\n node = new Node(nodeId, data);\n recordNodeChange(node, 'add');\n } else {\n node.data = data;\n recordNodeChange(node, 'update');\n }\n\n nodes.set(nodeId, node);\n\n exitModification();\n return node;\n }\n\n function getNode(nodeId) {\n return nodes.get(nodeId);\n }\n\n function removeNode(nodeId) {\n var node = getNode(nodeId);\n if (!node) {\n return false;\n }\n\n enterModification();\n\n var prevLinks = node.links;\n if (prevLinks) {\n node.links = null;\n for(var i = 0; i < prevLinks.length; ++i) {\n removeLink(prevLinks[i]);\n }\n }\n\n nodes.delete(nodeId)\n\n recordNodeChange(node, 'remove');\n\n exitModification();\n\n return true;\n }\n\n\n function addLink(fromId, toId, data) {\n enterModification();\n\n var fromNode = getNode(fromId) || addNode(fromId);\n var toNode = getNode(toId) || addNode(toId);\n\n var link = createLink(fromId, toId, data);\n\n links.push(link);\n\n // TODO: this is not cool. On large graphs potentially would consume more memory.\n addLinkToNode(fromNode, link);\n if (fromId !== toId) {\n // make sure we are not duplicating links for self-loops\n addLinkToNode(toNode, link);\n }\n\n recordLinkChange(link, 'add');\n\n exitModification();\n\n return link;\n }\n\n function createSingleLink(fromId, toId, data) {\n var linkId = makeLinkId(fromId, toId);\n return new Link(fromId, toId, data, linkId);\n }\n\n function createUniqueLink(fromId, toId, data) {\n // TODO: Get rid of this method.\n var linkId = makeLinkId(fromId, toId);\n var isMultiEdge = multiEdges.hasOwnProperty(linkId);\n if (isMultiEdge || getLink(fromId, toId)) {\n if (!isMultiEdge) {\n multiEdges[linkId] = 0;\n }\n var suffix = '@' + (++multiEdges[linkId]);\n linkId = makeLinkId(fromId + suffix, toId + suffix);\n }\n\n return new Link(fromId, toId, data, linkId);\n }\n\n function getNodeCount() {\n return nodes.size;\n }\n\n function getLinkCount() {\n return links.length;\n }\n\n function getLinks(nodeId) {\n var node = getNode(nodeId);\n return node ? node.links : null;\n }\n\n function removeLink(link) {\n if (!link) {\n return false;\n }\n var idx = indexOfElementInArray(link, links);\n if (idx < 0) {\n return false;\n }\n\n enterModification();\n\n links.splice(idx, 1);\n\n var fromNode = getNode(link.fromId);\n var toNode = getNode(link.toId);\n\n if (fromNode) {\n idx = indexOfElementInArray(link, fromNode.links);\n if (idx >= 0) {\n fromNode.links.splice(idx, 1);\n }\n }\n\n if (toNode) {\n idx = indexOfElementInArray(link, toNode.links);\n if (idx >= 0) {\n toNode.links.splice(idx, 1);\n }\n }\n\n recordLinkChange(link, 'remove');\n\n exitModification();\n\n return true;\n }\n\n function getLink(fromNodeId, toNodeId) {\n // TODO: Use sorted links to speed this up\n var node = getNode(fromNodeId),\n i;\n if (!node || !node.links) {\n return null;\n }\n\n for (i = 0; i < node.links.length; ++i) {\n var link = node.links[i];\n if (link.fromId === fromNodeId && link.toId === toNodeId) {\n return link;\n }\n }\n\n return null; // no link.\n }\n\n function clear() {\n enterModification();\n forEachNode(function(node) {\n removeNode(node.id);\n });\n exitModification();\n }\n\n function forEachLink(callback) {\n var i, length;\n if (typeof callback === 'function') {\n for (i = 0, length = links.length; i < length; ++i) {\n callback(links[i]);\n }\n }\n }\n\n function forEachLinkedNode(nodeId, callback, oriented) {\n var node = getNode(nodeId);\n\n if (node && node.links && typeof callback === 'function') {\n if (oriented) {\n return forEachOrientedLink(node.links, nodeId, callback);\n } else {\n return forEachNonOrientedLink(node.links, nodeId, callback);\n }\n }\n }\n\n function forEachNonOrientedLink(links, nodeId, callback) {\n var quitFast;\n for (var i = 0; i < links.length; ++i) {\n var link = links[i];\n var linkedNodeId = link.fromId === nodeId ? link.toId : link.fromId;\n\n quitFast = callback(nodes.get(linkedNodeId), link);\n if (quitFast) {\n return true; // Client does not need more iterations. Break now.\n }\n }\n }\n\n function forEachOrientedLink(links, nodeId, callback) {\n var quitFast;\n for (var i = 0; i < links.length; ++i) {\n var link = links[i];\n if (link.fromId === nodeId) {\n quitFast = callback(nodes.get(link.toId), link)\n if (quitFast) {\n return true; // Client does not need more iterations. Break now.\n }\n }\n }\n }\n\n // we will not fire anything until users of this library explicitly call `on()`\n // method.\n function noop() {}\n\n // Enter, Exit modification allows bulk graph updates without firing events.\n function enterModificationReal() {\n suspendEvents += 1;\n }\n\n function exitModificationReal() {\n suspendEvents -= 1;\n if (suspendEvents === 0 && changes.length > 0) {\n graphPart.fire('changed', changes);\n changes.length = 0;\n }\n }\n\n function forEachNode(callback) {\n if (typeof callback !== 'function') {\n throw new Error('Function is expected to iterate over graph nodes. You passed ' + callback);\n }\n\n var valuesIterator = nodes.values();\n var nextValue = valuesIterator.next();\n while (!nextValue.done) {\n if (callback(nextValue.value)) {\n return true; // client doesn't want to proceed. Return.\n }\n nextValue = valuesIterator.next();\n }\n }\n}\n\n// need this for old browsers. Should this be a separate module?\nfunction indexOfElementInArray(element, array) {\n if (!array) return -1;\n\n if (array.indexOf) {\n return array.indexOf(element);\n }\n\n var len = array.length,\n i;\n\n for (i = 0; i < len; i += 1) {\n if (array[i] === element) {\n return i;\n }\n }\n\n return -1;\n}\n\n/**\n * Internal structure to represent node;\n */\nfunction Node(id, data) {\n this.id = id;\n this.links = null;\n this.data = data;\n}\n\nfunction addLinkToNode(node, link) {\n if (node.links) {\n node.links.push(link);\n } else {\n node.links = [link];\n }\n}\n\n/**\n * Internal structure to represent links;\n */\nfunction Link(fromId, toId, data, id) {\n this.fromId = fromId;\n this.toId = toId;\n this.data = data;\n this.id = id;\n}\n\nfunction makeLinkId(fromId, toId) {\n return fromId.toString() + '👉 ' + toId.toString();\n}\n","module.exports = createLayout;\nmodule.exports.simulator = require('./lib/createPhysicsSimulator');\n\nvar eventify = require('ngraph.events');\n\n/**\n * Creates force based layout for a given graph.\n *\n * @param {ngraph.graph} graph which needs to be laid out\n * @param {object} physicsSettings if you need custom settings\n * for physics simulator you can pass your own settings here. If it's not passed\n * a default one will be created.\n */\nfunction createLayout(graph, physicsSettings) {\n if (!graph) {\n throw new Error('Graph structure cannot be undefined');\n }\n\n var createSimulator = (physicsSettings && physicsSettings.createSimulator) || require('./lib/createPhysicsSimulator');\n var physicsSimulator = createSimulator(physicsSettings);\n if (Array.isArray(physicsSettings)) throw new Error('Physics settings is expected to be an object');\n\n var nodeMass = defaultNodeMass;\n if (physicsSettings && typeof physicsSettings.nodeMass === 'function') {\n nodeMass = physicsSettings.nodeMass;\n }\n\n var nodeBodies = new Map();\n var springs = {};\n var bodiesCount = 0;\n\n var springTransform = physicsSimulator.settings.springTransform || noop;\n\n // Initialize physics with what we have in the graph:\n initPhysics();\n listenToEvents();\n\n var wasStable = false;\n\n var api = {\n /**\n * Performs one step of iterative layout algorithm\n *\n * @returns {boolean} true if the system should be considered stable; False otherwise.\n * The system is stable if no further call to `step()` can improve the layout.\n */\n step: function() {\n if (bodiesCount === 0) {\n updateStableStatus(true);\n return true;\n }\n\n var lastMove = physicsSimulator.step();\n\n // Save the movement in case if someone wants to query it in the step\n // callback.\n api.lastMove = lastMove;\n\n // Allow listeners to perform low-level actions after nodes are updated.\n api.fire('step');\n\n var ratio = lastMove/bodiesCount;\n var isStableNow = ratio <= 0.01; // TODO: The number is somewhat arbitrary...\n updateStableStatus(isStableNow);\n\n\n return isStableNow;\n },\n\n /**\n * For a given `nodeId` returns position\n */\n getNodePosition: function (nodeId) {\n return getInitializedBody(nodeId).pos;\n },\n\n /**\n * Sets position of a node to a given coordinates\n * @param {string} nodeId node identifier\n * @param {number} x position of a node\n * @param {number} y position of a node\n * @param {number=} z position of node (only if applicable to body)\n */\n setNodePosition: function (nodeId) {\n var body = getInitializedBody(nodeId);\n body.setPosition.apply(body, Array.prototype.slice.call(arguments, 1));\n },\n\n /**\n * @returns {Object} Link position by link id\n * @returns {Object.from} {x, y} coordinates of link start\n * @returns {Object.to} {x, y} coordinates of link end\n */\n getLinkPosition: function (linkId) {\n var spring = springs[linkId];\n if (spring) {\n return {\n from: spring.from.pos,\n to: spring.to.pos\n };\n }\n },\n\n /**\n * @returns {Object} area required to fit in the graph. Object contains\n * `x1`, `y1` - top left coordinates\n * `x2`, `y2` - bottom right coordinates\n */\n getGraphRect: function () {\n return physicsSimulator.getBBox();\n },\n\n /**\n * Iterates over each body in the layout simulator and performs a callback(body, nodeId)\n */\n forEachBody: forEachBody,\n\n /*\n * Requests layout algorithm to pin/unpin node to its current position\n * Pinned nodes should not be affected by layout algorithm and always\n * remain at their position\n */\n pinNode: function (node, isPinned) {\n var body = getInitializedBody(node.id);\n body.isPinned = !!isPinned;\n },\n\n /**\n * Checks whether given graph's node is currently pinned\n */\n isNodePinned: function (node) {\n return getInitializedBody(node.id).isPinned;\n },\n\n /**\n * Request to release all resources\n */\n dispose: function() {\n graph.off('changed', onGraphChanged);\n api.fire('disposed');\n },\n\n /**\n * Gets physical body for a given node id. If node is not found undefined\n * value is returned.\n */\n getBody: getBody,\n\n /**\n * Gets spring for a given edge.\n *\n * @param {string} linkId link identifer. If two arguments are passed then\n * this argument is treated as formNodeId\n * @param {string=} toId when defined this parameter denotes head of the link\n * and first argument is treated as tail of the link (fromId)\n */\n getSpring: getSpring,\n\n /**\n * Returns length of cumulative force vector. The closer this to zero - the more stable the system is\n */\n getForceVectorLength: getForceVectorLength,\n\n /**\n * [Read only] Gets current physics simulator\n */\n simulator: physicsSimulator,\n\n /**\n * Gets the graph that was used for layout\n */\n graph: graph,\n\n /**\n * Gets amount of movement performed during last step operation\n */\n lastMove: 0\n };\n\n eventify(api);\n\n return api;\n\n function updateStableStatus(isStableNow) {\n if (wasStable !== isStableNow) {\n wasStable = isStableNow;\n onStableChanged(isStableNow);\n }\n }\n\n function forEachBody(cb) {\n nodeBodies.forEach(cb);\n }\n\n function getForceVectorLength() {\n var fx = 0, fy = 0;\n forEachBody(function(body) {\n fx += Math.abs(body.force.x);\n fy += Math.abs(body.force.y);\n });\n return Math.sqrt(fx * fx + fy * fy);\n }\n\n function getSpring(fromId, toId) {\n var linkId;\n if (toId === undefined) {\n if (typeof fromId !== 'object') {\n // assume fromId as a linkId:\n linkId = fromId;\n } else {\n // assume fromId to be a link object:\n linkId = fromId.id;\n }\n } else {\n // toId is defined, should grab link:\n var link = graph.hasLink(fromId, toId);\n if (!link) return;\n linkId = link.id;\n }\n\n return springs[linkId];\n }\n\n function getBody(nodeId) {\n return nodeBodies.get(nodeId);\n }\n\n function listenToEvents() {\n graph.on('changed', onGraphChanged);\n }\n\n function onStableChanged(isStable) {\n api.fire('stable', isStable);\n }\n\n function onGraphChanged(changes) {\n for (var i = 0; i < changes.length; ++i) {\n var change = changes[i];\n if (change.changeType === 'add') {\n if (change.node) {\n initBody(change.node.id);\n }\n if (change.link) {\n initLink(change.link);\n }\n } else if (change.changeType === 'remove') {\n if (change.node) {\n releaseNode(change.node);\n }\n if (change.link) {\n releaseLink(change.link);\n }\n }\n }\n bodiesCount = graph.getNodesCount();\n }\n\n function initPhysics() {\n bodiesCount = 0;\n\n graph.forEachNode(function (node) {\n initBody(node.id);\n bodiesCount += 1;\n });\n\n graph.forEachLink(initLink);\n }\n\n function initBody(nodeId) {\n var body = nodeBodies.get(nodeId);\n if (!body) {\n var node = graph.getNode(nodeId);\n if (!node) {\n throw new Error('initBody() was called with unknown node id');\n }\n\n var pos = node.position;\n if (!pos) {\n var neighbors = getNeighborBodies(node);\n pos = physicsSimulator.getBestNewBodyPosition(neighbors);\n }\n\n body = physicsSimulator.addBodyAt(pos);\n body.id = nodeId;\n\n nodeBodies.set(nodeId, body);\n updateBodyMass(nodeId);\n\n if (isNodeOriginallyPinned(node)) {\n body.isPinned = true;\n }\n }\n }\n\n function releaseNode(node) {\n var nodeId = node.id;\n var body = nodeBodies.get(nodeId);\n if (body) {\n nodeBodies.delete(nodeId);\n physicsSimulator.removeBody(body);\n }\n }\n\n function initLink(link) {\n updateBodyMass(link.fromId);\n updateBodyMass(link.toId);\n\n var fromBody = nodeBodies.get(link.fromId),\n toBody = nodeBodies.get(link.toId),\n spring = physicsSimulator.addSpring(fromBody, toBody, link.length);\n\n springTransform(link, spring);\n\n springs[link.id] = spring;\n }\n\n function releaseLink(link) {\n var spring = springs[link.id];\n if (spring) {\n var from = graph.getNode(link.fromId),\n to = graph.getNode(link.toId);\n\n if (from) updateBodyMass(from.id);\n if (to) updateBodyMass(to.id);\n\n delete springs[link.id];\n\n physicsSimulator.removeSpring(spring);\n }\n }\n\n function getNeighborBodies(node) {\n // TODO: Could probably be done better on memory\n var neighbors = [];\n if (!node.links) {\n return neighbors;\n }\n var maxNeighbors = Math.min(node.links.length, 2);\n for (var i = 0; i < maxNeighbors; ++i) {\n var link = node.links[i];\n var otherBody = link.fromId !== node.id ? nodeBodies.get(link.fromId) : nodeBodies.get(link.toId);\n if (otherBody && otherBody.pos) {\n neighbors.push(otherBody);\n }\n }\n\n return neighbors;\n }\n\n function updateBodyMass(nodeId) {\n var body = nodeBodies.get(nodeId);\n body.mass = nodeMass(nodeId);\n if (Number.isNaN(body.mass)) {\n throw new Error('Node mass should be a number');\n }\n }\n\n /**\n * Checks whether graph node has in its settings pinned attribute,\n * which means layout algorithm cannot move it. Node can be marked\n * as pinned, if it has \"isPinned\" attribute, or when node.data has it.\n *\n * @param {Object} node a graph node to check\n * @return {Boolean} true if node should be treated as pinned; false otherwise.\n */\n function isNodeOriginallyPinned(node) {\n return (node && (node.isPinned || (node.data && node.data.isPinned)));\n }\n\n function getInitializedBody(nodeId) {\n var body = nodeBodies.get(nodeId);\n if (!body) {\n initBody(nodeId);\n body = nodeBodies.get(nodeId);\n }\n return body;\n }\n\n /**\n * Calculates mass of a body, which corresponds to node with given id.\n *\n * @param {String|Number} nodeId identifier of a node, for which body mass needs to be calculated\n * @returns {Number} recommended mass of the body;\n */\n function defaultNodeMass(nodeId) {\n var links = graph.getLinks(nodeId);\n if (!links) return 1;\n return 1 + links.length / 3.0;\n }\n}\n\nfunction noop() { }\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","'use strict';\nmodule.exports = function (arr, predicate, ctx) {\n\tif (typeof Array.prototype.findIndex === 'function') {\n\t\treturn arr.findIndex(predicate, ctx);\n\t}\n\n\tif (typeof predicate !== 'function') {\n\t\tthrow new TypeError('predicate must be a function');\n\t}\n\n\tvar list = Object(arr);\n\tvar len = list.length;\n\n\tif (len === 0) {\n\t\treturn -1;\n\t}\n\n\tfor (var i = 0; i < len; i++) {\n\t\tif (predicate.call(ctx, list[i], i, list)) {\n\t\t\treturn i;\n\t\t}\n\t}\n\n\treturn -1;\n};\n","/**\n * lodash 4.0.1 (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n * Available under MIT license <https://lodash.com/license>\n */\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @type Function\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);\n}\n\nmodule.exports = isString;\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array ? array.length : 0;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\n/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n if (value !== value) {\n return baseFindIndex(array, baseIsNaN, fromIndex);\n }\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a cache value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeMax = Math.max;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, props) {\n object = Object(object);\n return basePickBy(object, props, function(value, key) {\n return key in object;\n });\n}\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} props The property identifiers to pick from.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, props, predicate) {\n var index = -1,\n length = props.length,\n result = {};\n\n while (++index < length) {\n var key = props[index],\n value = object[key];\n\n if (predicate(value, key)) {\n result[key] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Creates an array of the own and inherited enumerable symbol properties\n * of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * The opposite of `_.pick`; this method creates an object composed of the\n * own and inherited enumerable string keyed properties of `object` that are\n * not omitted.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [props] The property identifiers to omit.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.omit(object, ['a', 'c']);\n * // => { 'b': '2' }\n */\nvar omit = baseRest(function(object, props) {\n if (object == null) {\n return {};\n }\n props = arrayMap(baseFlatten(props, 1), toKey);\n return basePick(object, baseDifference(getAllKeysIn(object), props));\n});\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = omit;\n","/**\n * A general error class that should be used for all errors in Expo modules.\n * Guarantees a `code` field that can be used to differentiate between different\n * types of errors without further subclassing Error.\n */\nexport class CodedError extends Error {\n code: string;\n info?: any;\n\n constructor(code: string, message: string) {\n super(message);\n this.code = code;\n }\n}\n","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nvar setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nvar isNativeFunction = require(\"./isNativeFunction.js\");\n\nvar construct = require(\"./construct.js\");\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _wrapNativeSuper(Class);\n}\n\nmodule.exports = _wrapNativeSuper;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/* Font Face Observer v2.1.0 - © Bram Stein. License: BSD-3-Clause */(function(){function l(a,b){document.addEventListener?a.addEventListener(\"scroll\",b,!1):a.attachEvent(\"scroll\",b)}function m(a){document.body?a():document.addEventListener?document.addEventListener(\"DOMContentLoaded\",function c(){document.removeEventListener(\"DOMContentLoaded\",c);a()}):document.attachEvent(\"onreadystatechange\",function k(){if(\"interactive\"==document.readyState||\"complete\"==document.readyState)document.detachEvent(\"onreadystatechange\",k),a()})};function t(a){this.a=document.createElement(\"div\");this.a.setAttribute(\"aria-hidden\",\"true\");this.a.appendChild(document.createTextNode(a));this.b=document.createElement(\"span\");this.c=document.createElement(\"span\");this.h=document.createElement(\"span\");this.f=document.createElement(\"span\");this.g=-1;this.b.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";this.c.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";\nthis.f.style.cssText=\"max-width:none;display:inline-block;position:absolute;height:100%;width:100%;overflow:scroll;font-size:16px;\";this.h.style.cssText=\"display:inline-block;width:200%;height:200%;font-size:16px;max-width:none;\";this.b.appendChild(this.h);this.c.appendChild(this.f);this.a.appendChild(this.b);this.a.appendChild(this.c)}\nfunction u(a,b){a.a.style.cssText=\"max-width:none;min-width:20px;min-height:20px;display:inline-block;overflow:hidden;position:absolute;width:auto;margin:0;padding:0;top:-999px;white-space:nowrap;font-synthesis:none;font:\"+b+\";\"}function z(a){var b=a.a.offsetWidth,c=b+100;a.f.style.width=c+\"px\";a.c.scrollLeft=c;a.b.scrollLeft=a.b.scrollWidth+100;return a.g!==b?(a.g=b,!0):!1}function A(a,b){function c(){var a=k;z(a)&&a.a.parentNode&&b(a.g)}var k=a;l(a.b,c);l(a.c,c);z(a)};function B(a,b){var c=b||{};this.family=a;this.style=c.style||\"normal\";this.weight=c.weight||\"normal\";this.stretch=c.stretch||\"normal\"}var C=null,D=null,E=null,F=null;function G(){if(null===D)if(J()&&/Apple/.test(window.navigator.vendor)){var a=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))(?:\\.([0-9]+))/.exec(window.navigator.userAgent);D=!!a&&603>parseInt(a[1],10)}else D=!1;return D}function J(){null===F&&(F=!!document.fonts);return F}\nfunction K(){if(null===E){var a=document.createElement(\"div\");try{a.style.font=\"condensed 100px sans-serif\"}catch(b){}E=\"\"!==a.style.font}return E}function L(a,b){return[a.style,a.weight,K()?a.stretch:\"\",\"100px\",b].join(\" \")}\nB.prototype.load=function(a,b){var c=this,k=a||\"BESbswy\",r=0,n=b||3E3,H=(new Date).getTime();return new Promise(function(a,b){if(J()&&!G()){var M=new Promise(function(a,b){function e(){(new Date).getTime()-H>=n?b(Error(\"\"+n+\"ms timeout exceeded\")):document.fonts.load(L(c,'\"'+c.family+'\"'),k).then(function(c){1<=c.length?a():setTimeout(e,25)},b)}e()}),N=new Promise(function(a,c){r=setTimeout(function(){c(Error(\"\"+n+\"ms timeout exceeded\"))},n)});Promise.race([N,M]).then(function(){clearTimeout(r);a(c)},\nb)}else m(function(){function v(){var b;if(b=-1!=f&&-1!=g||-1!=f&&-1!=h||-1!=g&&-1!=h)(b=f!=g&&f!=h&&g!=h)||(null===C&&(b=/AppleWebKit\\/([0-9]+)(?:\\.([0-9]+))/.exec(window.navigator.userAgent),C=!!b&&(536>parseInt(b[1],10)||536===parseInt(b[1],10)&&11>=parseInt(b[2],10))),b=C&&(f==w&&g==w&&h==w||f==x&&g==x&&h==x||f==y&&g==y&&h==y)),b=!b;b&&(d.parentNode&&d.parentNode.removeChild(d),clearTimeout(r),a(c))}function I(){if((new Date).getTime()-H>=n)d.parentNode&&d.parentNode.removeChild(d),b(Error(\"\"+\nn+\"ms timeout exceeded\"));else{var a=document.hidden;if(!0===a||void 0===a)f=e.a.offsetWidth,g=p.a.offsetWidth,h=q.a.offsetWidth,v();r=setTimeout(I,50)}}var e=new t(k),p=new t(k),q=new t(k),f=-1,g=-1,h=-1,w=-1,x=-1,y=-1,d=document.createElement(\"div\");d.dir=\"ltr\";u(e,L(c,\"sans-serif\"));u(p,L(c,\"serif\"));u(q,L(c,\"monospace\"));d.appendChild(e.a);d.appendChild(p.a);d.appendChild(q.a);document.body.appendChild(d);w=e.a.offsetWidth;x=p.a.offsetWidth;y=q.a.offsetWidth;I();A(e,function(a){f=a;v()});u(e,\nL(c,'\"'+c.family+'\",sans-serif'));A(p,function(a){g=a;v()});u(p,L(c,'\"'+c.family+'\",serif'));A(q,function(a){h=a;v()});u(q,L(c,'\"'+c.family+'\",monospace'))})})};\"object\"===typeof module?module.exports=B:(window.FontFaceObserver=B,window.FontFaceObserver.prototype.load=B.prototype.load);}());\n","module.exports = __webpack_public_path__ + \"./fonts/MaterialCommunityIcons.ttf\";","import * as React from 'react';\n\nconst UNINTIALIZED_STATE = {};\n\n/**\n * This is definitely not compatible with concurrent mode, but we don't have a solution for sync state yet.\n */\nexport default function useSyncState<T>(initialState?: (() => T) | T) {\n const stateRef = React.useRef<T>(UNINTIALIZED_STATE as any);\n const isSchedulingRef = React.useRef(false);\n const isMountedRef = React.useRef(true);\n\n React.useEffect(() => {\n isMountedRef.current = true;\n\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n\n if (stateRef.current === UNINTIALIZED_STATE) {\n stateRef.current =\n // @ts-expect-error: initialState is a function, but TypeScript doesn't think so\n typeof initialState === 'function' ? initialState() : initialState;\n }\n\n const [trackingState, setTrackingState] = React.useState(stateRef.current);\n\n const getState = React.useCallback(() => stateRef.current, []);\n\n const setState = React.useCallback((state: T) => {\n if (state === stateRef.current || !isMountedRef.current) {\n return;\n }\n\n stateRef.current = state;\n\n if (!isSchedulingRef.current) {\n setTrackingState(state);\n }\n }, []);\n\n const scheduleUpdate = React.useCallback((callback: () => void) => {\n isSchedulingRef.current = true;\n\n try {\n callback();\n } finally {\n isSchedulingRef.current = false;\n }\n }, []);\n\n const flushUpdates = React.useCallback(() => {\n if (!isMountedRef.current) {\n return;\n }\n\n // Make sure that the tracking state is up-to-date.\n // We call it unconditionally, but React should skip the update if state is unchanged.\n setTrackingState(stateRef.current);\n }, []);\n\n // If we're rendering and the tracking state is out of date, update it immediately\n // This will make sure that our updates are applied as early as possible.\n if (trackingState !== stateRef.current) {\n setTrackingState(stateRef.current);\n }\n\n const state = stateRef.current;\n\n React.useDebugValue(state);\n\n return [state, getState, setState, scheduleUpdate, flushUpdates] as const;\n}\n","'use strict';\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a \\unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n};\n","\"use strict\";function _interopDefault(e){return e&&\"object\"==typeof e&&\"default\"in e?e.default:e}Object.defineProperty(exports,\"__esModule\",{value:!0});var _partial=_interopDefault(require(\"ramda/src/partial\")),_curry=_interopDefault(require(\"ramda/src/curry\")),_pipeP=_interopDefault(require(\"ramda/src/pipeP\")),_keys=_interopDefault(require(\"ramda/src/keys\")),_forEach=_interopDefault(require(\"ramda/src/forEach\")),_dissoc=_interopDefault(require(\"ramda/src/dissoc\")),_merge=_interopDefault(require(\"ramda/src/merge\")),_prop=_interopDefault(require(\"ramda/src/prop\")),_always=_interopDefault(require(\"ramda/src/always\")),_ifElse=_interopDefault(require(\"ramda/src/ifElse\")),_contains=_interopDefault(require(\"ramda/src/contains\")),_gte=_interopDefault(require(\"ramda/src/gte\")),_curryN=_interopDefault(require(\"ramda/src/curryN\")),_T=_interopDefault(require(\"ramda/src/T\")),_is=_interopDefault(require(\"ramda/src/is\")),_identity=_interopDefault(require(\"ramda/src/identity\")),_isNil=_interopDefault(require(\"ramda/src/isNil\")),_cond=_interopDefault(require(\"ramda/src/cond\")),axios=_interopDefault(require(\"axios\")),__assign=function(){return(__assign=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e}).apply(this,arguments)},__awaiter=function(e,r,t,n){return new(t||(t=Promise))(function(a,i){function s(e){try{u(n.next(e))}catch(e){i(e)}}function o(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){e.done?a(e.value):new t(function(r){r(e.value)}).then(s,o)}u((n=n.apply(e,r||[])).next())})},__generator=function(e,r){var t,n,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},\"function\"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(i){return function(o){return function(i){if(t)throw new TypeError(\"Generator is already executing.\");for(;s;)try{if(t=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(a=(a=s.trys).length>0&&a[a.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=r.call(e,s)}catch(e){i=[6,e],n=0}finally{t=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,o])}}},_this=void 0,toNumber=_cond([[_isNil,_identity],[_is(Number),_identity],[_T,function(e){return Number(e)}]]),isWithin=_curryN(3,function(e,r,t){var n=_is(Number);return n(e)&&n(r)&&n(t)&&_gte(t,e)&&_gte(r,t)}),containsText=_curryN(2,function(e,r){return _contains(r,e)}),isPromise=function(e){return!!e&&(\"object\"==typeof e||\"function\"==typeof e)&&\"function\"==typeof e.then},DEFAULT_HEADERS={Accept:\"application/json\",\"Content-Type\":\"application/json\"},DEFAULT_CONFIG={timeout:0},NONE=null,CLIENT_ERROR=\"CLIENT_ERROR\",SERVER_ERROR=\"SERVER_ERROR\",TIMEOUT_ERROR=\"TIMEOUT_ERROR\",CONNECTION_ERROR=\"CONNECTION_ERROR\",NETWORK_ERROR=\"NETWORK_ERROR\",UNKNOWN_ERROR=\"UNKNOWN_ERROR\",CANCEL_ERROR=\"CANCEL_ERROR\",TIMEOUT_ERROR_CODES=[\"ECONNABORTED\"],NODEJS_CONNECTION_ERROR_CODES=[\"ENOTFOUND\",\"ECONNREFUSED\",\"ECONNRESET\"],in200s=isWithin(200,299),in400s=isWithin(400,499),in500s=isWithin(500,599),statusNil=_ifElse(_isNil,_always(void 0),_prop(\"status\")),getProblemFromError=function(e){return\"Network Error\"===e.message?NETWORK_ERROR:axios.isCancel(e)?CANCEL_ERROR:_cond([[_isNil,function(){return getProblemFromStatus(statusNil(e.response))}],[containsText(TIMEOUT_ERROR_CODES),_always(TIMEOUT_ERROR)],[containsText(NODEJS_CONNECTION_ERROR_CODES),_always(CONNECTION_ERROR)],[_T,_always(UNKNOWN_ERROR)]])(e.code)},getProblemFromStatus=function(e){return _cond([[_isNil,_always(UNKNOWN_ERROR)],[in200s,_always(NONE)],[in400s,_always(CLIENT_ERROR)],[in500s,_always(SERVER_ERROR)],[_T,_always(UNKNOWN_ERROR)]])(e)},create=function(e){var r,t=_merge(DEFAULT_HEADERS,e.headers||{});if(e.axiosInstance)r=e.axiosInstance;else{var n=_merge(DEFAULT_CONFIG,_dissoc(\"headers\",e));r=axios.create(n)}var a=[],i=[],s=[],o=[],u=[],R=function(e,n){return t[e]=n,r},c=function(e,r,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),l(_merge({url:r,params:t,method:e},n))},_=function(e,r,t,n){return void 0===t&&(t=null),void 0===n&&(n={}),l(_merge({url:r,method:e,data:t},n))},l=function(e){return __awaiter(_this,void 0,void 0,function(){var n,a,o;return __generator(this,function(u){switch(u.label){case 0:if(e.headers=__assign({},t,e.headers),i.length>0&&_forEach(function(r){return r(e)},i),!(s.length>0))return[3,6];n=0,u.label=1;case 1:return n<s.length?(a=s[n](e),isPromise(a)?[4,a]:[3,3]):[3,6];case 2:return u.sent(),[3,5];case 3:return[4,a(e)];case 4:u.sent(),u.label=5;case 5:return n++,[3,1];case 6:return o=_pipeP(O(toNumber(new Date)),E),[2,r.request(e).then(o).catch(o)]}})})},E=function(e){return a.forEach(function(r){try{r(e)}catch(e){}}),e},O=_curry(function(e,r){return __awaiter(_this,void 0,void 0,function(){var t,n,a,i,s,R,c,_,l,E,O,f,N,p,d,T;return __generator(this,function(m){switch(m.label){case 0:if(t=toNumber(new Date),n=t-e,a=r instanceof Error||axios.isCancel(r),i=r,s=r,R=a?s.response:i,c=R&&R.status||null,_=a?getProblemFromError(r):getProblemFromStatus(c),l=a?s:null,E=in200s(c),O=r.config||null,f=R&&R.headers||null,N=R&&R.data||null,p={duration:n,problem:_,originalError:l,ok:E,status:c,headers:f,config:O,data:N},o.length>0&&_forEach(function(e){return e(p)},o),!(u.length>0))return[3,6];d=0,m.label=1;case 1:return d<u.length?(T=u[d](p),isPromise(T)?[4,T]:[3,3]):[3,6];case 2:return m.sent(),[3,5];case 3:return[4,T(p)];case 4:m.sent(),m.label=5;case 5:return d++,[3,1];case 6:return[2,p]}})})});return{axiosInstance:r,monitors:a,addMonitor:function(e){a.push(e)},requestTransforms:i,asyncRequestTransforms:s,responseTransforms:o,asyncResponseTransforms:u,addRequestTransform:function(e){return i.push(e)},addAsyncRequestTransform:function(e){return s.push(e)},addResponseTransform:function(e){return o.push(e)},addAsyncResponseTransform:function(e){return u.push(e)},setHeader:R,setHeaders:function(e){return _forEach(function(r){return R(r,e[r])},_keys(e)),r},deleteHeader:function(e){return delete t[e],r},headers:t,setBaseURL:function(e){return r.defaults.baseURL=e,r},getBaseURL:function(){return r.defaults.baseURL},any:l,get:_partial(c,[\"get\"]),delete:_partial(c,[\"delete\"]),head:_partial(c,[\"head\"]),post:_partial(_,[\"post\"]),put:_partial(_,[\"put\"]),patch:_partial(_,[\"patch\"]),link:_partial(c,[\"link\"]),unlink:_partial(c,[\"unlink\"])}},isCancel=axios.isCancel,CancelToken=axios.CancelToken,apisauce={DEFAULT_HEADERS:DEFAULT_HEADERS,NONE:NONE,CLIENT_ERROR:CLIENT_ERROR,SERVER_ERROR:SERVER_ERROR,TIMEOUT_ERROR:TIMEOUT_ERROR,CONNECTION_ERROR:CONNECTION_ERROR,NETWORK_ERROR:NETWORK_ERROR,UNKNOWN_ERROR:UNKNOWN_ERROR,create:create,isCancel:isCancel,CancelToken:CancelToken};exports.DEFAULT_HEADERS=DEFAULT_HEADERS,exports.NONE=NONE,exports.CLIENT_ERROR=CLIENT_ERROR,exports.SERVER_ERROR=SERVER_ERROR,exports.TIMEOUT_ERROR=TIMEOUT_ERROR,exports.CONNECTION_ERROR=CONNECTION_ERROR,exports.NETWORK_ERROR=NETWORK_ERROR,exports.UNKNOWN_ERROR=UNKNOWN_ERROR,exports.CANCEL_ERROR=CANCEL_ERROR,exports.getProblemFromError=getProblemFromError,exports.getProblemFromStatus=getProblemFromStatus,exports.create=create,exports.isCancel=isCancel,exports.CancelToken=CancelToken,exports.default=apisauce;\n","'use strict';\n\nvar colorString = require('color-string');\nvar convert = require('color-convert');\n\nvar _slice = [].slice;\n\nvar skippedModels = [\n\t// to be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// shouldn't really be in color-convert either...\n\t'hex'\n];\n\nvar hashedModelKeys = {};\nObject.keys(convert).forEach(function (model) {\n\thashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model;\n});\n\nvar limiters = {};\n\nfunction Color(obj, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tvar i;\n\tvar channels;\n\n\tif (obj == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (obj instanceof Color) {\n\t\tthis.model = obj.model;\n\t\tthis.color = obj.color.slice();\n\t\tthis.valpha = obj.valpha;\n\t} else if (typeof obj === 'string') {\n\t\tvar result = colorString.get(obj);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + obj);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (obj.length) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tvar newArr = _slice.call(obj, 0, channels);\n\t\tthis.color = zeroArray(newArr, channels);\n\t\tthis.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1;\n\t} else if (typeof obj === 'number') {\n\t\t// this is always RGB - can be converted later on.\n\t\tobj &= 0xFFFFFF;\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(obj >> 16) & 0xFF,\n\t\t\t(obj >> 8) & 0xFF,\n\t\t\tobj & 0xFF\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tvar keys = Object.keys(obj);\n\t\tif ('alpha' in obj) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0;\n\t\t}\n\n\t\tvar hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(obj));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tvar labels = convert[this.model].labels;\n\t\tvar color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(obj[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tvar limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString: function () {\n\t\treturn this.string();\n\t},\n\n\ttoJSON: function () {\n\t\treturn this[this.model]();\n\t},\n\n\tstring: function (places) {\n\t\tvar self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString: function (places) {\n\t\tvar self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tvar args = self.valpha === 1 ? self.color : self.color.concat(this.valpha);\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray: function () {\n\t\treturn this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);\n\t},\n\n\tobject: function () {\n\t\tvar result = {};\n\t\tvar channels = convert[this.model].channels;\n\t\tvar labels = convert[this.model].labels;\n\n\t\tfor (var i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray: function () {\n\t\tvar rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject: function () {\n\t\tvar rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround: function (places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);\n\t},\n\n\talpha: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(100)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(100)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex: function (val) {\n\t\tif (arguments.length) {\n\t\t\treturn new Color(val);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.rgb().color;\n\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.rgb().color;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight: function () {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = this.rgb();\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\t\treturn rgb;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale: function () {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar rgb = this.rgb().color;\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(val, val, val);\n\t},\n\n\tfade: function (ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer: function (ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.hsl();\n\t\tvar hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix: function (mixinColor, weight) {\n\t\t// ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\t\tvar color1 = mixinColor.rgb();\n\t\tvar color2 = this.rgb();\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t}\n};\n\n// model conversion methods and static constructors\nObject.keys(convert).forEach(function (model) {\n\tif (skippedModels.indexOf(model) !== -1) {\n\t\treturn;\n\t}\n\n\tvar channels = convert[model].channels;\n\n\t// conversion methods\n\tColor.prototype[model] = function () {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (arguments.length) {\n\t\t\treturn new Color(arguments, model);\n\t\t}\n\n\t\tvar newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;\n\t\treturn new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (color) {\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(_slice.call(arguments), channels);\n\t\t}\n\t\treturn new Color(color, model);\n\t};\n});\n\nfunction roundTo(num, places) {\n\treturn Number(num.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (num) {\n\t\treturn roundTo(num, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tmodel.forEach(function (m) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t});\n\n\tmodel = model[0];\n\n\treturn function (val) {\n\t\tvar result;\n\n\t\tif (arguments.length) {\n\t\t\tif (modifier) {\n\t\t\t\tval = modifier(val);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = val;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(val) {\n\treturn Array.isArray(val) ? val : [val];\n}\n\nfunction zeroArray(arr, length) {\n\tfor (var i = 0; i < length; i++) {\n\t\tif (typeof arr[i] !== 'number') {\n\t\t\tarr[i] = 0;\n\t\t}\n\t}\n\n\treturn arr;\n}\n\nmodule.exports = Color;\n","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from './_isPlaceholder';\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _concat from './internal/_concat';\nimport _curry3 from './internal/_curry3';\n\n/**\n * Applies a function to the value at the given index of an array, returning a\n * new copy of the array with the element at the given index replaced with the\n * result of the function application.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig (a -> a) -> Number -> [a] -> [a]\n * @param {Function} fn The function to apply.\n * @param {Number} idx The index.\n * @param {Array|Arguments} list An array-like object whose value\n * at the supplied index will be replaced.\n * @return {Array} A copy of the supplied array-like object with\n * the element at index `idx` replaced with the value\n * returned by applying `fn` to the existing element.\n * @see R.update\n * @example\n *\n * R.adjust(R.add(10), 1, [1, 2, 3]); //=> [1, 12, 3]\n * R.adjust(R.add(10))(1)([1, 2, 3]); //=> [1, 12, 3]\n * @symb R.adjust(f, -1, [a, b]) = [a, f(b)]\n * @symb R.adjust(f, 0, [a, b]) = [f(a), b]\n */\nvar adjust = /*#__PURE__*/_curry3(function adjust(fn, idx, list) {\n if (idx >= list.length || idx < -list.length) {\n return list;\n }\n var start = idx < 0 ? list.length : 0;\n var _idx = start + idx;\n var _list = _concat(list);\n _list[_idx] = fn(list[_idx]);\n return _list;\n});\nexport default adjust;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _curry1 from './_curry1';\nimport _isArray from './_isArray';\nimport _isString from './_isString';\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n */\nvar _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n if (!x) {\n return false;\n }\n if (typeof x !== 'object') {\n return false;\n }\n if (_isString(x)) {\n return false;\n }\n if (x.nodeType === 1) {\n return !!x.length;\n }\n if (x.length === 0) {\n return true;\n }\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n return false;\n});\nexport default _isArrayLike;","import _isArrayLike from './_isArrayLike';\nimport _xwrap from './_xwrap';\nimport bind from '../bind';\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n idx += 1;\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n step = iter.next();\n }\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\n\nexport default function _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _has from './_has';\n\nvar toString = Object.prototype.toString;\nvar _isArguments = function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n};\n\nexport default _isArguments;","import _curry1 from './internal/_curry1';\nimport _has from './internal/_has';\nimport _isArguments from './internal/_isArguments';\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar _keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n} : function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n};\nvar keys = /*#__PURE__*/_curry1(_keys);\nexport default keys;","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","import _isArrayLike from './_isArrayLike';\n\n/**\n * `_makeFlat` is a helper function that returns a one-level or fully recursive\n * function based on the flag passed in.\n *\n * @private\n */\nexport default function _makeFlat(recursive) {\n return function flatt(list) {\n var value, jlen, j;\n var result = [];\n var idx = 0;\n var ilen = list.length;\n\n while (idx < ilen) {\n if (_isArrayLike(list[idx])) {\n value = recursive ? flatt(list[idx]) : list[idx];\n j = 0;\n jlen = value.length;\n while (j < jlen) {\n result[result.length] = value[j];\n j += 1;\n }\n } else {\n result[result.length] = list[idx];\n }\n idx += 1;\n }\n return result;\n };\n}","/**\n * Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\nexport default _toISOString;","import _curry2 from './_curry2';\nimport _reduce from './_reduce';\nimport _xfBase from './_xfBase';\n\nvar XDropLastWhile = /*#__PURE__*/function () {\n function XDropLastWhile(fn, xf) {\n this.f = fn;\n this.retained = [];\n this.xf = xf;\n }\n XDropLastWhile.prototype['@@transducer/init'] = _xfBase.init;\n XDropLastWhile.prototype['@@transducer/result'] = function (result) {\n this.retained = null;\n return this.xf['@@transducer/result'](result);\n };\n XDropLastWhile.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.retain(result, input) : this.flush(result, input);\n };\n XDropLastWhile.prototype.flush = function (result, input) {\n result = _reduce(this.xf['@@transducer/step'], result, this.retained);\n this.retained = [];\n return this.xf['@@transducer/step'](result, input);\n };\n XDropLastWhile.prototype.retain = function (result, input) {\n this.retained.push(input);\n return result;\n };\n\n return XDropLastWhile;\n}();\n\nvar _xdropLastWhile = /*#__PURE__*/_curry2(function _xdropLastWhile(fn, xf) {\n return new XDropLastWhile(fn, xf);\n});\nexport default _xdropLastWhile;","import _curry1 from './internal/_curry1';\nimport _makeFlat from './internal/_makeFlat';\n\n/**\n * Returns a new list by pulling every item out of it (and all its sub-arrays)\n * and putting them in a new array, depth-first.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b]\n * @param {Array} list The array to consider.\n * @return {Array} The flattened list.\n * @see R.unnest\n * @example\n *\n * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]);\n * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n */\nvar flatten = /*#__PURE__*/_curry1( /*#__PURE__*/_makeFlat(true));\nexport default flatten;","import _objectAssign from './_objectAssign';\n\nexport default typeof Object.assign === 'function' ? Object.assign : _objectAssign;","import _cloneRegExp from './internal/_cloneRegExp';\nimport _curry2 from './internal/_curry2';\nimport _isRegExp from './internal/_isRegExp';\nimport toString from './toString';\n\n/**\n * Determines whether a given string matches a given regular expression.\n *\n * @func\n * @memberOf R\n * @since v0.12.0\n * @category String\n * @sig RegExp -> String -> Boolean\n * @param {RegExp} pattern\n * @param {String} str\n * @return {Boolean}\n * @see R.match\n * @example\n *\n * R.test(/^x/, 'xyz'); //=> true\n * R.test(/^y/, 'xyz'); //=> false\n */\nvar test = /*#__PURE__*/_curry2(function test(pattern, str) {\n if (!_isRegExp(pattern)) {\n throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern));\n }\n return _cloneRegExp(pattern).test(str);\n});\nexport default test;","import _curry1 from './internal/_curry1';\n\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\nvar _trim = !hasProtoTrim || /*#__PURE__*/ws.trim() || ! /*#__PURE__*/zeroWidth.trim() ? function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n} : function trim(str) {\n return str.trim();\n};\nvar trim = /*#__PURE__*/_curry1(_trim);\nexport default trim;","import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nconst LOCAL_STORAGE_KEY = 'EXPO_ERROR_RECOVERY_STORAGE';\n\nfunction _consumeRecoveryProps(): string | null {\n if (!canUseDOM) return null;\n try {\n const props = localStorage.getItem(LOCAL_STORAGE_KEY);\n localStorage.removeItem(LOCAL_STORAGE_KEY);\n return props;\n } catch (e) {\n // Catches localStorage SecurityError https://github.com/expo/expo/issues/8355\n }\n return null;\n}\n\nexport default {\n get name(): string {\n return 'ExpoErrorRecovery';\n },\n\n saveRecoveryProps(props: string): void {\n if (!canUseDOM) return;\n try {\n localStorage.setItem(LOCAL_STORAGE_KEY, props);\n } catch (e) {\n // Catches localStorage SecurityError https://github.com/expo/expo/issues/8355\n }\n },\n\n recoveredProps: _consumeRecoveryProps(),\n};\n","import { setRecoveryPropsToSave } from './ErroRecoveryStore';\nimport ExpoErrorRecovery from './ExpoErrorRecovery';\nimport './ErrorRecovery.fx';\n\nexport const recoveredProps = _getRecoveredProps();\n\nexport type ErrorRecoveryProps = Record<string, any>;\n\nexport function setRecoveryProps(props: ErrorRecoveryProps): void {\n setRecoveryPropsToSave(props);\n}\n\nfunction _getRecoveredProps(): ErrorRecoveryProps | null {\n if (ExpoErrorRecovery.recoveredProps) {\n return JSON.parse(ExpoErrorRecovery.recoveredProps);\n }\n return null;\n}\n","import * as React from 'react';\nimport { AppRegistry } from 'react-native';\n\nimport withExpoRoot from './withExpoRoot';\nimport { InitialProps } from './withExpoRoot.types';\n\nexport default function registerRootComponent<P extends InitialProps>(\n component: React.ComponentType<P>\n): void {\n const App = withExpoRoot(component);\n const RootComponent: React.FC<P> = props => <App {...props} />;\n AppRegistry.registerComponent('main', () => RootComponent);\n const rootTag = document.getElementById('root') ?? document.getElementById('main');\n AppRegistry.runApplication('main', { rootTag });\n}\n","import * as ErrorRecovery from 'expo-error-recovery';\nimport * as React from 'react';\n\nimport { InitialProps } from './withExpoRoot.types';\n\nexport default function withExpoRoot<P extends InitialProps>(\n AppRootComponent: React.ComponentType<P>\n): React.ComponentClass<P> {\n return class ExpoRootComponent extends React.Component<P> {\n render() {\n const props = {\n ...this.props,\n exp: { ...this.props.exp, errorRecovery: ErrorRecovery.recoveredProps },\n };\n\n return <AppRootComponent {...props} />;\n }\n };\n}\n","/* eslint-env browser */\nimport { Platform } from '@unimodules/core';\nimport * as rtlDetect from 'rtl-detect';\n\nimport { Localization } from './Localization.types';\n\nexport default {\n get isRTL(): boolean {\n return rtlDetect.isRtlLang(this.locale) ?? false;\n },\n get locale(): string {\n if (!Platform.isDOMAvailable) {\n return '';\n }\n\n const locale =\n navigator.language ||\n navigator['systemLanguage'] ||\n navigator['browserLanguage'] ||\n navigator['userLanguage'] ||\n this.locales[0];\n return locale;\n },\n get locales(): string[] {\n if (!Platform.isDOMAvailable) {\n return [];\n }\n const { languages = [] } = navigator;\n return Array.from(languages);\n },\n get timezone(): string {\n const defaultTimeZone = 'Etc/UTC';\n if (typeof Intl === 'undefined') {\n return defaultTimeZone;\n }\n return Intl.DateTimeFormat().resolvedOptions().timeZone || defaultTimeZone;\n },\n get isoCurrencyCodes(): string[] {\n // TODO(Bacon): Add this - very low priority\n return [];\n },\n get region(): string | null {\n const { locale } = this;\n if (typeof locale === 'string') {\n const [, iso] = locale.split('-');\n return iso ? iso.toUpperCase() : null;\n }\n return null;\n },\n async getLocalizationAsync(): Promise<Localization> {\n const { region, isoCurrencyCodes, timezone, locales, locale, isRTL } = this;\n return {\n region,\n isoCurrencyCodes,\n timezone,\n locales,\n locale,\n isRTL,\n };\n },\n};\n","import ExpoLocalization from './ExpoLocalization';\nimport { Localization } from './Localization.types';\n\nexport { Localization };\n\n// Web, Android, and some iOS values use `-`. This will convert the iOS values that use `_`\n// https://github.com/expo/expo/blob/21ae94bae2e8369992050c433a00699d425b35bd/packages/expo/src/Localization.ts#L112-L114\nconst parseLocale = (locale: string): string => locale.replace('_', '-');\n\n/**\n * Native device language, returned in standard format.\n *\n * @example `en`, `en-US`, `es-US`\n */\nexport const locale = parseLocale(ExpoLocalization.locale);\n/**\n * List of all the native languages provided by the user settings.\n * These are returned in the order the user defines in their native settings.\n */\nexport const locales = ExpoLocalization.locales.map(parseLocale);\n/**\n * The current timezone in display format.\n * On Web timezone is calculated with Intl.DateTimeFormat().resolvedOptions().timeZone. For a better estimation you could use the moment-timezone package but it will add significant bloat to your website's bundle size.\n *\n * @example `America/Los_Angeles`\n */\nexport const timezone = ExpoLocalization.timezone;\n/**\n * A list of all the supported language ISO codes.\n */\nexport const isoCurrencyCodes = ExpoLocalization.isoCurrencyCodes;\n/**\n * **Available on iOS and web**: Region code for your device which came from Region setting in Language & Region.\n *\n * @example `US`, `NZ`\n */\nexport const region = ExpoLocalization.region;\n/**\n * Returns if the system's language is written from Right-to-Left.\n * This can be used to build features like [bidirectional icons](https://material.io/design/usability/bidirectionality.html).\n *\n * Returns `false` in Server Side Rendering (SSR) environments.\n */\nexport const isRTL = ExpoLocalization.isRTL;\n\n/**\n * Get the latest native values from the device.\n * Locale can be changed on some Android devices without resetting the app.\n * On iOS, changing the locale will cause the device to reset meaning the constants will always be correct.\n */\nexport async function getLocalizationAsync(): Promise<Localization> {\n const { locale, locales, ...localization } = await ExpoLocalization.getLocalizationAsync();\n return {\n locale: parseLocale(locale),\n locales: ExpoLocalization.locales.map(parseLocale),\n ...localization,\n };\n}\n","// Used for delegating node actions when browser APIs aren't available\n// like in SSR websites.\nexport const isDOMAvailable = typeof window !== 'undefined' && !!window.document?.createElement;\n","import { Platform as ReactNativePlatform, PlatformOSType } from 'react-native';\n\nimport { isDOMAvailable } from './environment/browser';\n\nexport type PlatformSelectOSType = PlatformOSType | 'native' | 'electron' | 'default';\n\nexport type PlatformSelect = <T>(specifics: { [platform in PlatformSelectOSType]?: T }) => T;\n\nconst Platform = {\n /**\n * Denotes the currently running platform.\n * Can be one of ios, android, web.\n */\n OS: ReactNativePlatform.OS,\n /**\n * Returns the value with the matching platform.\n * Object keys can be any of ios, android, native, web, default.\n *\n * @ios ios, native, default\n * @android android, native, default\n * @web web, default\n */\n select: ReactNativePlatform.select as PlatformSelect,\n /**\n * Denotes if the DOM API is available in the current environment.\n * The DOM is not available in native React runtimes and Node.js.\n */\n isDOMAvailable,\n};\n\nexport default Platform;\n","import React, { Component } from 'react';\nimport { Animated, Easing } from 'react-native';\n\nconst ANIMATED_EASING_PREFIXES = ['easeInOut', 'easeOut', 'easeIn'];\n\nexport default class Collapsible extends Component {\n static defaultProps = {\n align: 'top',\n collapsed: true,\n collapsedHeight: 0,\n enablePointerEvents: false,\n duration: 300,\n easing: 'easeOutCubic',\n onAnimationEnd: () => null,\n renderChildrenCollapsed: true,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n measuring: false,\n measured: false,\n height: new Animated.Value(props.collapsedHeight),\n contentHeight: 0,\n animating: false,\n };\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.collapsed !== this.props.collapsed) {\n this.setState({ measured: false }, () =>\n this._componentDidUpdate(prevProps)\n );\n } else {\n this._componentDidUpdate(prevProps);\n }\n }\n\n componentWillUnmount() {\n this.unmounted = true;\n }\n\n _componentDidUpdate(prevProps) {\n if (prevProps.collapsed !== this.props.collapsed) {\n this._toggleCollapsed(this.props.collapsed);\n } else if (\n this.props.collapsed &&\n prevProps.collapsedHeight !== this.props.collapsedHeight\n ) {\n this.state.height.setValue(this.props.collapsedHeight);\n }\n }\n\n contentHandle = null;\n\n _handleRef = (ref) => {\n this.contentHandle = ref;\n };\n\n _measureContent(callback) {\n this.setState(\n {\n measuring: true,\n },\n () => {\n requestAnimationFrame(() => {\n if (!this.contentHandle) {\n this.setState(\n {\n measuring: false,\n },\n () => callback(this.props.collapsedHeight)\n );\n } else {\n let ref;\n if (typeof this.contentHandle.measure === 'function') {\n ref = this.contentHandle;\n } else {\n ref = this.contentHandle.getNode();\n }\n ref.measure((x, y, width, height) => {\n this.setState(\n {\n measuring: false,\n measured: true,\n contentHeight: height,\n },\n () => callback(height)\n );\n });\n }\n });\n }\n );\n }\n\n _toggleCollapsed(collapsed) {\n if (collapsed) {\n this._transitionToHeight(this.props.collapsedHeight);\n } else if (!this.contentHandle) {\n if (this.state.measured) {\n this._transitionToHeight(this.state.contentHeight);\n }\n return;\n } else {\n this._measureContent((contentHeight) => {\n this._transitionToHeight(contentHeight);\n });\n }\n }\n\n _transitionToHeight(height) {\n const { duration } = this.props;\n let easing = this.props.easing;\n if (typeof easing === 'string') {\n let prefix;\n let found = false;\n for (let i = 0; i < ANIMATED_EASING_PREFIXES.length; i++) {\n prefix = ANIMATED_EASING_PREFIXES[i];\n if (easing.substr(0, prefix.length) === prefix) {\n easing =\n easing.substr(prefix.length, 1).toLowerCase() +\n easing.substr(prefix.length + 1);\n prefix = prefix.substr(4, 1).toLowerCase() + prefix.substr(5);\n easing = Easing[prefix](Easing[easing || 'ease']);\n found = true;\n break;\n }\n }\n if (!found) {\n easing = Easing[easing];\n }\n if (!easing) {\n throw new Error('Invalid easing type \"' + this.props.easing + '\"');\n }\n }\n\n if (this._animation) {\n this._animation.stop();\n }\n this.setState({ animating: true });\n this._animation = Animated.timing(this.state.height, {\n useNativeDriver: false,\n toValue: height ? height : 0,\n duration,\n easing,\n }).start(() => {\n if (this.unmounted) {\n return;\n }\n this.setState({ animating: false }, () => {\n if (this.unmounted) {\n return;\n }\n this.props.onAnimationEnd();\n });\n });\n }\n\n _handleLayoutChange = (event) => {\n const contentHeight = event.nativeEvent.layout.height;\n if (\n this.state.animating ||\n this.props.collapsed ||\n this.state.measuring ||\n this.state.contentHeight === contentHeight\n ) {\n return;\n }\n\n this.state.height.setValue(contentHeight);\n this.setState({ contentHeight });\n };\n\n render() {\n const {\n collapsed,\n enablePointerEvents,\n renderChildrenCollapsed,\n } = this.props;\n const {\n height,\n contentHeight,\n measuring,\n measured,\n animating,\n } = this.state;\n const hasKnownHeight = !measuring && (measured || collapsed);\n const style = hasKnownHeight && {\n overflow: 'hidden',\n height: height,\n };\n const contentStyle = {};\n if (measuring) {\n contentStyle.position = 'absolute';\n contentStyle.opacity = 0;\n } else if (this.props.align === 'center') {\n contentStyle.transform = [\n {\n translateY: height.interpolate({\n inputRange: [0, contentHeight],\n outputRange: [contentHeight / -2, 0],\n }),\n },\n ];\n } else if (this.props.align === 'bottom') {\n contentStyle.transform = [\n {\n translateY: height.interpolate({\n inputRange: [0, contentHeight],\n outputRange: [-contentHeight, 0],\n }),\n },\n ];\n }\n if (animating) {\n contentStyle.height = contentHeight;\n }\n const shouldRenderChildren =\n renderChildrenCollapsed ||\n ((!collapsed || (collapsed && animating)) &&\n (animating || measuring || measured));\n\n return (\n <Animated.View\n style={style}\n pointerEvents={!enablePointerEvents && collapsed ? 'none' : 'auto'}\n >\n <Animated.View\n ref={this._handleRef}\n style={[this.props.style, contentStyle]}\n onLayout={this.state.animating ? undefined : this._handleLayoutChange}\n >\n {shouldRenderChildren && this.props.children}\n </Animated.View>\n </Animated.View>\n );\n }\n}\n","import React, { Component } from 'react';\nimport { View, TouchableHighlight, FlatList } from 'react-native';\nimport Collapsible from './Collapsible';\n\nconst COLLAPSIBLE_PROPS = [\n 'align',\n 'collapsed',\n 'collapsedHeight',\n 'renderChildrenCollapsed',\n 'enablePointerEvents',\n 'duration',\n 'easing',\n 'style',\n 'onAnimationEnd',\n];\n\nexport default class Accordion extends Component {\n static defaultProps = {\n underlayColor: 'black',\n disabled: false,\n expandFromBottom: false,\n expandMultiple: false,\n touchableComponent: TouchableHighlight,\n keyExtractor: (item, index) => index,\n renderSectionTitle: () => null,\n onAnimationEnd: () => null,\n sectionContainerStyle: {},\n renderAsFlatList: false,\n };\n\n _toggleSection(section) {\n if (!this.props.disabled) {\n const { activeSections, expandMultiple, onChange } = this.props;\n\n let updatedSections = [];\n\n if (activeSections.includes(section)) {\n updatedSections = activeSections.filter((a) => a !== section);\n } else if (expandMultiple) {\n updatedSections = [...activeSections, section];\n } else {\n updatedSections = [section];\n }\n\n if (onChange) {\n onChange(updatedSections);\n }\n }\n }\n\n _renderContainer = (section, key, renderCollapsible) => {\n const {\n activeSections,\n sectionContainerStyle,\n expandFromBottom,\n sections,\n underlayColor,\n touchableProps,\n touchableComponent: Touchable,\n renderHeader,\n renderFooter,\n renderSectionTitle,\n } = this.props;\n return (\n <View key={key} style={sectionContainerStyle}>\n {renderSectionTitle(section, key, activeSections.includes(key))}\n\n {expandFromBottom && renderCollapsible(section, key)}\n\n <Touchable\n onPress={() => this._toggleSection(key)}\n underlayColor={underlayColor}\n {...touchableProps}\n accessibilityState={{\n expanded: activeSections.includes(key),\n }}\n >\n {renderHeader(section, key, activeSections.includes(key), sections)}\n </Touchable>\n\n {!expandFromBottom && renderCollapsible(section, key)}\n\n {renderFooter &&\n renderFooter(section, key, activeSections.includes(key), sections)}\n </View>\n );\n };\n\n render() {\n const {\n activeSections,\n expandMultiple,\n onChange,\n containerStyle,\n sectionContainerStyle,\n expandFromBottom,\n sections,\n underlayColor,\n touchableProps,\n touchableComponent: Touchable,\n onAnimationEnd,\n renderContent,\n renderHeader,\n renderFooter,\n renderSectionTitle,\n disabled,\n renderAsFlatList,\n keyExtractor,\n ...restProps\n } = this.props;\n\n const viewProps = {};\n const collapsibleProps = {};\n\n Object.keys(restProps).forEach((key) => {\n if (COLLAPSIBLE_PROPS.includes(key)) {\n collapsibleProps[key] = restProps[key];\n } else {\n viewProps[key] = restProps[key];\n }\n });\n\n const renderCollapsible = (section, key) => (\n <Collapsible\n collapsed={!activeSections.includes(key)}\n {...collapsibleProps}\n onAnimationEnd={() => onAnimationEnd(section, key)}\n >\n {renderContent(section, key, activeSections.includes(key), sections)}\n </Collapsible>\n );\n\n if (renderAsFlatList) {\n return (\n <FlatList\n style={containerStyle}\n data={sections}\n extraData={activeSections}\n nestedScrollEnabled={true}\n keyExtractor={keyExtractor}\n renderItem={({ item, index }) => {\n const section = item;\n const key = keyExtractor(item, index);\n return this._renderContainer(section, key, renderCollapsible);\n }}\n {...viewProps}\n />\n );\n }\n\n return (\n <View style={containerStyle} {...viewProps}>\n {sections.map((section, index) => {\n const key = keyExtractor(section, index);\n return this._renderContainer(section, key, renderCollapsible);\n })}\n </View>\n );\n }\n}\n","(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n typeof define === 'function' && define.amd ? define(factory) :\r\n (global.ResizeObserver = factory());\r\n}(this, (function () { 'use strict';\r\n\r\n/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n\r\n return result;\r\n }\r\n\r\n return (function () {\r\n function anonymous() {\r\n this.__entries__ = [];\r\n }\r\n\r\n var prototypeAccessors = { size: { configurable: true } };\r\n\r\n /**\r\n * @returns {boolean}\r\n */\r\n prototypeAccessors.size.get = function () {\r\n return this.__entries__.length;\r\n };\r\n\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n anonymous.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n\r\n return entry && entry[1];\r\n };\r\n\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n anonymous.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n } else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n anonymous.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n anonymous.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n\r\n /**\r\n * @returns {void}\r\n */\r\n anonymous.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n anonymous.prototype.forEach = function (callback, ctx) {\r\n var this$1 = this;\r\n if ( ctx === void 0 ) ctx = null;\r\n\r\n for (var i = 0, list = this$1.__entries__; i < list.length; i += 1) {\r\n var entry = list[i];\r\n\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n\r\n Object.defineProperties( anonymous.prototype, prototypeAccessors );\r\n\r\n return anonymous;\r\n }());\r\n})();\r\n\r\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\r\n\r\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\r\n\r\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\r\n\r\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nvar throttle = function (callback, delay) {\r\n var leadingCall = false,\r\n trailingCall = false,\r\n lastCallTime = 0;\r\n\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n\r\n callback();\r\n }\r\n\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n } else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n\r\n lastCallTime = timeStamp;\r\n }\r\n\r\n return proxy;\r\n};\r\n\r\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = function() {\r\n this.connected_ = false;\r\n this.mutationEventsAdded_ = false;\r\n this.mutationsObserver_ = null;\r\n this.observers_ = [];\r\n\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n};\r\n\r\n/**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n\r\n\r\n/**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n\r\n\r\n/**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n\r\n/**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\nResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n};\r\n\r\n/**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n};\r\n\r\n/**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n};\r\n\r\n/**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\nResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n\r\n return activeObservers.length > 0;\r\n};\r\n\r\n/**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n\r\n window.addEventListener('resize', this.refresh);\r\n\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n } else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n\r\n this.mutationEventsAdded_ = true;\r\n }\r\n\r\n this.connected_ = true;\r\n};\r\n\r\n/**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n};\r\n\r\n/**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\nResizeObserverController.prototype.onTransitionEnd_ = function (ref) {\r\n var propertyName = ref.propertyName; if ( propertyName === void 0 ) propertyName = '';\r\n\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n};\r\n\r\n/**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\nResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n\r\n return this.instance_;\r\n};\r\n\r\nResizeObserverController.instance_ = null;\r\n\r\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var i = 0, list = Object.keys(props); i < list.length; i += 1) {\r\n var key = list[i];\r\n\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n\r\n return target;\r\n});\r\n\r\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\r\n\r\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [], len = arguments.length - 1;\r\n while ( len-- > 0 ) positions[ len ] = arguments[ len + 1 ];\r\n\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n\r\n for (var i = 0, list = positions; i < list.length; i += 1) {\r\n var position = list[i];\r\n\r\n var value = styles['padding-' + position];\r\n\r\n paddings[position] = toFloat(value);\r\n }\r\n\r\n return paddings;\r\n}\r\n\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth;\r\n var clientHeight = target.clientHeight;\r\n\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width),\r\n height = toFloat(styles.height);\r\n\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'; };\r\n})();\r\n\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n\r\n return getHTMLElementContentRect(target);\r\n}\r\n\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(ref) {\r\n var x = ref.x;\r\n var y = ref.y;\r\n var width = ref.width;\r\n var height = ref.height;\r\n\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n\r\n return rect;\r\n}\r\n\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\r\n\r\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = function(target) {\r\n this.broadcastWidth = 0;\r\n this.broadcastHeight = 0;\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n\r\n this.target = target;\r\n};\r\n\r\n/**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n\r\n\r\n/**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n\r\n\r\n/**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\nResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n\r\n this.contentRect_ = rect;\r\n\r\n return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\r\n};\r\n\r\n/**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\nResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n\r\n return rect;\r\n};\r\n\r\nvar ResizeObserverEntry = function(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n};\r\n\r\nvar ResizeObserverSPI = function(callback, controller, callbackCtx) {\r\n this.activeObservations_ = [];\r\n this.observations_ = new MapShim();\r\n\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n};\r\n\r\n/**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n\r\n\r\n/**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n\r\n\r\n/**\r\n * Public ResizeObserver instance which will be passed to the callback\r\n * function and used as a value of it's \"this\" binding.\r\n *\r\n * @private {ResizeObserver}\r\n */\r\n\r\n/**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\nResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n\r\n var observations = this.observations_;\r\n\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n\r\n observations.set(target, new ResizeObservation(target));\r\n\r\n this.controller_.addObserver(this);\r\n\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n};\r\n\r\n/**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n\r\n var observations = this.observations_;\r\n\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n\r\n observations.delete(target);\r\n\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n};\r\n\r\n/**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n};\r\n\r\n/**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.gatherActive = function () {\r\n var this$1 = this;\r\n\r\n this.clearActive();\r\n\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n this$1.activeObservations_.push(observation);\r\n }\r\n });\r\n};\r\n\r\n/**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n\r\n var ctx = this.callbackCtx_;\r\n\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n};\r\n\r\n/**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\nResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n};\r\n\r\n/**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\nResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n};\r\n\r\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = function(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n\r\n observers.set(this, observer);\r\n};\r\n\r\n// Expose public methods of ResizeObserver.\r\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n return (ref = observers.get(this))[method].apply(ref, arguments);\r\n var ref;\r\n };\r\n});\r\n\r\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n\r\n global$1.ResizeObserver = ResizeObserver;\r\n\r\n return ResizeObserver;\r\n})();\r\n\r\nreturn index;\r\n\r\n})));\r\n","import registerRootComponent from 'expo/build/launch/registerRootComponent';\n\nimport App from '../../App';\n\nregisterRootComponent(App);\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\n'use strict';\n\n\nvar self;\nvar RtlDetectLib = self = { // eslint-disable-line consistent-this\n // Private vars - star\n _regexEscape: /([\\.\\*\\+\\^\\$\\[\\]\\\\\\(\\)\\|\\{\\}\\,\\-\\:\\?])/g, // eslint-disable-line no-useless-escape\n _regexParseLocale: /^([a-zA-Z]*)([_\\-a-zA-Z]*)$/,\n // Private vars - end\n\n // Private functions - star\n _escapeRegExpPattern: function (str) {\n if (typeof str !== 'string') {\n return str;\n }\n return str.replace(self._regexEscape, '\\\\$1');\n },\n\n _toLowerCase: function (str, reserveReturnValue) {\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n return str.toLowerCase();\n },\n\n _toUpperCase: function (str, reserveReturnValue) {\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n return str.toUpperCase();\n },\n\n _trim: function (str, delimiter, reserveReturnValue) {\n var patterns = [];\n var regexp;\n var addPatterns = function (pattern) {\n // Build trim RegExp pattern and push it to patterns array\n patterns.push('^' + pattern + '+|' + pattern + '+$');\n };\n\n // fix reserveReturnValue value\n if (typeof delimiter === 'boolean') {\n reserveReturnValue = delimiter;\n delimiter = null;\n }\n\n if (typeof str !== 'string') {\n return reserveReturnValue && str;\n }\n\n // Trim based on delimiter array values\n if (Array.isArray(delimiter)) {\n // Loop through delimiter array\n delimiter.map(function (item) {\n // Escape delimiter to be valid RegExp Pattern\n var pattern = self._escapeRegExpPattern(item);\n // Push pattern to patterns array\n addPatterns(pattern);\n });\n }\n\n // Trim based on delimiter string value\n if (typeof delimiter === 'string') {\n // Escape delimiter to be valid RegExp Pattern\n var patternDelimiter = self._escapeRegExpPattern(delimiter);\n // push pattern to patterns array\n addPatterns(patternDelimiter);\n }\n\n // If delimiter is not defined, Trim white spaces\n if (!delimiter) {\n // Push white space pattern to patterns array\n addPatterns('\\\\s');\n }\n\n // Build RegExp pattern\n var pattern = '(' + patterns.join('|') + ')';\n // Build RegExp object\n regexp = new RegExp(pattern, 'g');\n\n // trim string for all patterns\n while (str.match(regexp)) {\n str = str.replace(regexp, '');\n }\n\n // Return trim string\n return str;\n },\n\n _parseLocale : function (strLocale) {\n var matches = self._regexParseLocale.exec(strLocale); // exec regex\n var parsedLocale;\n var lang;\n var countryCode;\n\n if (!strLocale || !matches) {\n return;\n }\n\n // fix countryCode string by trimming '-' and '_'\n matches[2] = self._trim(matches[2], ['-', '_']);\n\n lang = self._toLowerCase(matches[1]);\n countryCode = self._toUpperCase(matches[2]) || countryCode;\n\n // object with lang, countryCode properties\n parsedLocale = {\n lang: lang,\n countryCode: countryCode\n };\n\n // return parsed locale object\n return parsedLocale;\n },\n // Private functions - End\n\n // Public functions - star\n isRtlLang: function (strLocale) {\n var objLocale = self._parseLocale(strLocale);\n if (!objLocale) {\n return;\n }\n // return true if the intel string lang exists in the BID RTL LANGS array else return false\n return (self._BIDI_RTL_LANGS.indexOf(objLocale.lang) >= 0);\n },\n\n getLangDir: function (strLocale) {\n // return 'rtl' if the intel string lang exists in the BID RTL LANGS array else return 'ltr'\n return self.isRtlLang(strLocale) ? 'rtl' : 'ltr';\n }\n\n // Public functions - End\n};\n\n// Const BIDI_RTL_LANGS Array\n// BIDI_RTL_LANGS ref: http://en.wikipedia.org/wiki/Right-to-left\n// Table of scripts in Unicode: https://en.wikipedia.org/wiki/Script_(Unicode)\nObject.defineProperty(self, '_BIDI_RTL_LANGS', {\n value: [\n 'ae',\t/* Avestan */\n 'ar', /* 'العربية', Arabic */\n 'arc', /* Aramaic */\n 'bcc', /* 'بلوچی مکرانی', Southern Balochi */\n 'bqi', /* 'بختياري', Bakthiari */\n 'ckb', /* 'Soranî / کوردی', Sorani */\n 'dv', /* Dhivehi */\n 'fa', /* 'فارسی', Persian */\n 'glk', /* 'گیلکی', Gilaki */\n 'ku', /* 'Kurdî / كوردی', Kurdish */\n 'mzn', /* 'مازِرونی', Mazanderani */\n 'nqo', /* N'Ko */\n 'pnb', /* 'پنجابی', Western Punjabi */\n 'ps', /* 'پښتو', Pashto, */\n 'sd', /* 'سنڌي', Sindhi */\n 'ug', /* 'Uyghurche / ئۇيغۇرچە', Uyghur */\n 'ur' /* 'اردو', Urdu */\n ],\n writable: false,\n enumerable: true,\n configurable: false\n});\n\n\nmodule.exports = RtlDetectLib;\n","/** @license React v16.13.1\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var l=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}\nvar D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,\"setState\")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};\nfunction G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}var I=H.prototype=new G;I.constructor=H;l(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=\"\"+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}}\nfunction N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}}\nfunction S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)}\nfunction T(a,b,c,e){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e)}else if(null===a||\"object\"!==typeof a?f=null:(f=B&&a[B]||a[\"@@iterator\"],f=\"function\"===typeof f?f:null),\"function\"===typeof f)for(a=f.call(a),k=\n0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if(\"object\"===d)throw c=\"\"+a,Error(C(31,\"[object Object]\"===c?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":c,\"\"));return g}function V(a,b,c){return null==a?0:T(a,\"\",b,c)}function U(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++)}\nfunction aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?\"\":(\"\"+a.key).replace(P,\"$&/\")+\"/\")+c)),e.push(a))}function X(a,b,c,e,d){var g=\"\";null!=c&&(g=(\"\"+c).replace(P,\"$&/\")+\"/\");b=R(b,g,e,d);V(a,aa,b);S(b)}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a}\nvar ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}};\nexports.Component=F;exports.Fragment=r;exports.Profiler=u;exports.PureComponent=H;exports.StrictMode=t;exports.Suspense=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba;\nexports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=l({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=\"\"+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type,\nkey:d,ref:g,props:e,_owner:k}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:x,render:a}};exports.isValidElement=O;\nexports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};\nexports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version=\"16.13.1\";\n","'use strict';\nmodule.exports = function (x) {\n\tvar type = typeof x;\n\treturn x !== null && (type === 'object' || type === 'function');\n};\n","/** @license React v17.0.2\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),m=require(\"object-assign\"),r=require(\"scheduler\");function y(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}if(!aa)throw Error(y(227));var ba=new Set,ca={};function da(a,b){ea(a,b);ea(a+\"Capture\",b)}\nfunction ea(a,b){ca[a]=b;for(a=0;a<b.length;a++)ba.add(b[a])}\nvar fa=!(\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement),ha=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,ia=Object.prototype.hasOwnProperty,\nja={},ka={};function la(a){if(ia.call(ka,a))return!0;if(ia.call(ja,a))return!1;if(ha.test(a))return ka[a]=!0;ja[a]=!0;return!1}function ma(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case \"function\":case \"symbol\":return!0;case \"boolean\":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return\"data-\"!==a&&\"aria-\"!==a;default:return!1}}\nfunction na(a,b,c,d){if(null===b||\"undefined\"===typeof b||ma(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(oa,\npa);D[b]=new B(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});\nD.xlinkHref=new B(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||\"o\"!==b[0]&&\"O\"!==b[0]||\"n\"!==b[1]&&\"N\"!==b[1]?!1:!0;f||(na(b,c,e,d)&&(c=null),d||null===e?la(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,\"\"+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:\"\":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?\"\":\"\"+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}\nvar ra=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sa=60103,ta=60106,ua=60107,wa=60108,xa=60114,ya=60109,za=60110,Aa=60112,Ba=60113,Ca=60120,Da=60115,Ea=60116,Fa=60121,Ga=60128,Ha=60129,Ia=60130,Ja=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var E=Symbol.for;sa=E(\"react.element\");ta=E(\"react.portal\");ua=E(\"react.fragment\");wa=E(\"react.strict_mode\");xa=E(\"react.profiler\");ya=E(\"react.provider\");za=E(\"react.context\");Aa=E(\"react.forward_ref\");Ba=E(\"react.suspense\");Ca=E(\"react.suspense_list\");Da=E(\"react.memo\");Ea=E(\"react.lazy\");Fa=E(\"react.block\");E(\"react.scope\");Ga=E(\"react.opaque.id\");Ha=E(\"react.debug_trace_mode\");Ia=E(\"react.offscreen\");Ja=E(\"react.legacy_hidden\")}\nvar Ka=\"function\"===typeof Symbol&&Symbol.iterator;function La(a){if(null===a||\"object\"!==typeof a)return null;a=Ka&&a[Ka]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}var Ma;function Na(a){if(void 0===Ma)try{throw Error();}catch(c){var b=c.stack.trim().match(/\\n( *(at )?)/);Ma=b&&b[1]||\"\"}return\"\\n\"+Ma+a}var Oa=!1;\nfunction Pa(a,b){if(!a||Oa)return\"\";Oa=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,\"props\",{set:function(){throw Error();}}),\"object\"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();}catch(k){d=k}a()}}catch(k){if(k&&d&&\"string\"===typeof k.stack){for(var e=k.stack.split(\"\\n\"),\nf=d.stack.split(\"\\n\"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return\"\\n\"+e[g].replace(\" at new \",\" at \");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Na(a):\"\"}\nfunction Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na(\"Lazy\");case 13:return Na(\"Suspense\");case 19:return Na(\"SuspenseList\");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return\"\"}}\nfunction Ra(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ua:return\"Fragment\";case ta:return\"Portal\";case xa:return\"Profiler\";case wa:return\"StrictMode\";case Ba:return\"Suspense\";case Ca:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case za:return(a.displayName||\"Context\")+\".Consumer\";case ya:return(a._context.displayName||\"Context\")+\".Provider\";case Aa:var b=a.render;b=b.displayName||b.name||\"\";\nreturn a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\"ForwardRef\");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,\"checked\",b,!1)}\nfunction ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?bb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction cb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction bb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function db(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b[\"$\"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty(\"$\"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=\"\"+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}\nfunction gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(y(91));return m({},b,{value:void 0,defaultValue:void 0,children:\"\"+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(y(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:Sa(c)}}\nfunction ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var kb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction lb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function mb(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?lb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar nb,ob=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||\"innerHTML\"in a)a.innerHTML=b;else{nb=nb||document.createElement(\"div\");nb.innerHTML=\"<svg>\"+b.valueOf().toString()+\"</svg>\";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(\"\"+b).trim():b+\"px\"}\nfunction tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=sb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(y(62));}}\nfunction wb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a])}}function Gb(a,b){return a(b)}function Hb(a,b,c,d,e){return a(b,c,d,e)}function Ib(){}var Jb=Gb,Kb=!1,Lb=!1;function Mb(){if(null!==zb||null!==Ab)Ib(),Fb()}\nfunction Nb(a,b,c){if(Lb)return a(b,c);Lb=!0;try{return Jb(a,b,c)}finally{Lb=!1,Mb()}}\nfunction Ob(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==\ntypeof c)throw Error(y(231,b,typeof c));return c}var Pb=!1;if(fa)try{var Qb={};Object.defineProperty(Qb,\"passive\",{get:function(){Pb=!0}});window.addEventListener(\"test\",Qb,Qb);window.removeEventListener(\"test\",Qb,Qb)}catch(a){Pb=!1}function Rb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(n){this.onError(n)}}var Sb=!1,Tb=null,Ub=!1,Vb=null,Wb={onError:function(a){Sb=!0;Tb=a}};function Xb(a,b,c,d,e,f,g,h,k){Sb=!1;Tb=null;Rb.apply(Wb,arguments)}\nfunction Yb(a,b,c,d,e,f,g,h,k){Xb.apply(this,arguments);if(Sb){if(Sb){var l=Tb;Sb=!1;Tb=null}else throw Error(y(198));Ub||(Ub=!0,Vb=l)}}function Zb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function $b(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function ac(a){if(Zb(a)!==a)throw Error(y(188));}\nfunction bc(a){var b=a.alternate;if(!b){b=Zb(a);if(null===b)throw Error(y(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return ac(e),a;if(f===d)return ac(e),b;f=f.sibling}throw Error(y(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===\nc){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(y(189));}}if(c.alternate!==d)throw Error(y(190));}if(3!==c.tag)throw Error(y(188));return c.stateNode.current===c?a:b}function cc(a){a=bc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}\nfunction dc(a,b){for(var c=a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}var ec,fc,gc,hc,ic=!1,jc=[],kc=null,lc=null,mc=null,nc=new Map,oc=new Map,pc=[],qc=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");\nfunction rc(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function sc(a,b){switch(a){case \"focusin\":case \"focusout\":kc=null;break;case \"dragenter\":case \"dragleave\":lc=null;break;case \"mouseover\":case \"mouseout\":mc=null;break;case \"pointerover\":case \"pointerout\":nc.delete(b.pointerId);break;case \"gotpointercapture\":case \"lostpointercapture\":oc.delete(b.pointerId)}}\nfunction tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=rc(b,c,d,e,f),null!==b&&(b=Cb(b),null!==b&&fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}\nfunction uc(a,b,c,d,e){switch(b){case \"focusin\":return kc=tc(kc,a,b,c,d,e),!0;case \"dragenter\":return lc=tc(lc,a,b,c,d,e),!0;case \"mouseover\":return mc=tc(mc,a,b,c,d,e),!0;case \"pointerover\":var f=e.pointerId;nc.set(f,tc(nc.get(f)||null,a,b,c,d,e));return!0;case \"gotpointercapture\":return f=e.pointerId,oc.set(f,tc(oc.get(f)||null,a,b,c,d,e)),!0}return!1}\nfunction vc(a){var b=wc(a.target);if(null!==b){var c=Zb(b);if(null!==c)if(b=c.tag,13===b){if(b=$b(c),null!==b){a.blockedOn=b;hc(a.lanePriority,function(){r.unstable_runWithPriority(a.priority,function(){gc(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}\nfunction xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c)return b=Cb(c),null!==b&&fc(b),a.blockedOn=c,!1;b.shift()}return!0}function zc(a,b,c){xc(a)&&c.delete(b)}\nfunction Ac(){for(ic=!1;0<jc.length;){var a=jc[0];if(null!==a.blockedOn){a=Cb(a.blockedOn);null!==a&&ec(a);break}for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&jc.shift()}null!==kc&&xc(kc)&&(kc=null);null!==lc&&xc(lc)&&(lc=null);null!==mc&&xc(mc)&&(mc=null);nc.forEach(zc);oc.forEach(zc)}\nfunction Bc(a,b){a.blockedOn===b&&(a.blockedOn=null,ic||(ic=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ac)))}\nfunction Cc(a){function b(b){return Bc(b,a)}if(0<jc.length){Bc(jc[0],a);for(var c=1;c<jc.length;c++){var d=jc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==kc&&Bc(kc,a);null!==lc&&Bc(lc,a);null!==mc&&Bc(mc,a);nc.forEach(b);oc.forEach(b);for(c=0;c<pc.length;c++)d=pc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<pc.length&&(c=pc[0],null===c.blockedOn);)vc(c),null===c.blockedOn&&pc.shift()}\nfunction Dc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;return c}var Ec={animationend:Dc(\"Animation\",\"AnimationEnd\"),animationiteration:Dc(\"Animation\",\"AnimationIteration\"),animationstart:Dc(\"Animation\",\"AnimationStart\"),transitionend:Dc(\"Transition\",\"TransitionEnd\")},Fc={},Gc={};\nfa&&(Gc=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),\"TransitionEvent\"in window||delete Ec.transitionend.transition);function Hc(a){if(Fc[a])return Fc[a];if(!Ec[a])return a;var b=Ec[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Gc)return Fc[a]=b[c];return a}\nvar Ic=Hc(\"animationend\"),Jc=Hc(\"animationiteration\"),Kc=Hc(\"animationstart\"),Lc=Hc(\"transitionend\"),Mc=new Map,Nc=new Map,Oc=[\"abort\",\"abort\",Ic,\"animationEnd\",Jc,\"animationIteration\",Kc,\"animationStart\",\"canplay\",\"canPlay\",\"canplaythrough\",\"canPlayThrough\",\"durationchange\",\"durationChange\",\"emptied\",\"emptied\",\"encrypted\",\"encrypted\",\"ended\",\"ended\",\"error\",\"error\",\"gotpointercapture\",\"gotPointerCapture\",\"load\",\"load\",\"loadeddata\",\"loadedData\",\"loadedmetadata\",\"loadedMetadata\",\"loadstart\",\"loadStart\",\n\"lostpointercapture\",\"lostPointerCapture\",\"playing\",\"playing\",\"progress\",\"progress\",\"seeking\",\"seeking\",\"stalled\",\"stalled\",\"suspend\",\"suspend\",\"timeupdate\",\"timeUpdate\",Lc,\"transitionEnd\",\"waiting\",\"waiting\"];function Pc(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e=\"on\"+(e[0].toUpperCase()+e.slice(1));Nc.set(d,b);Mc.set(d,e);da(e,[d])}}var Qc=r.unstable_now;Qc();var F=8;\nfunction Rc(a){if(0!==(1&a))return F=15,1;if(0!==(2&a))return F=14,2;if(0!==(4&a))return F=13,4;var b=24&a;if(0!==b)return F=12,b;if(0!==(a&32))return F=11,32;b=192&a;if(0!==b)return F=10,b;if(0!==(a&256))return F=9,256;b=3584&a;if(0!==b)return F=8,b;if(0!==(a&4096))return F=7,4096;b=4186112&a;if(0!==b)return F=6,b;b=62914560&a;if(0!==b)return F=5,b;if(a&67108864)return F=4,67108864;if(0!==(a&134217728))return F=3,134217728;b=805306368&a;if(0!==b)return F=2,b;if(0!==(1073741824&a))return F=1,1073741824;\nF=8;return a}function Sc(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Tc(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(y(358,a));}}\nfunction Uc(a,b){var c=a.pendingLanes;if(0===c)return F=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=F=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=Rc(k),e=F):(h&=f,0!==h&&(d=Rc(h),e=F))}else f=c&~g,0!==f?(d=Rc(f),e=F):0!==h&&(d=Rc(h),e=F);if(0===d)return 0;d=31-Vc(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){Rc(b);if(e<=F)return b;F=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Vc(b),e=1<<c,d|=a[c],b&=~e;return d}\nfunction Wc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Xc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=Yc(24&~b),0===a?Xc(10,b):a;case 10:return a=Yc(192&~b),0===a?Xc(8,b):a;case 8:return a=Yc(3584&~b),0===a&&(a=Yc(4186112&~b),0===a&&(a=512)),a;case 2:return b=Yc(805306368&~b),0===b&&(b=268435456),b}throw Error(y(358,a));}function Yc(a){return a&-a}function Zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}\nfunction $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}\nfunction hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0<jc.length&&-1<qc.indexOf(a))a=rc(null,a,b,c,d),jc.push(a);else{var f=yc(a,b,c,d);if(null===f)e&&sc(a,d);else{if(e){if(-1<qc.indexOf(a)){a=rc(f,a,b,c,d);jc.push(a);return}if(uc(f,a,b,c,d))return;sc(a,d)}jd(a,b,d,null,c)}}}}\nfunction yc(a,b,c,d){var e=xb(d);e=wc(e);if(null!==e){var f=Zb(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=$b(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==e&&(e=null)}}jd(a,b,d,e,c);return null}var kd=null,ld=null,md=null;\nfunction nd(){if(md)return md;var a,b=ld,c=b.length,d,e=\"value\"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)}function od(a){var b=a.keyCode;\"charCode\"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return!0}function qd(){return!1}\nfunction rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}m(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():\"unknown\"!==typeof a.returnValue&&\n(a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():\"unknown\"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd});return b}\nvar sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=m({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=m({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if(\"movementX\"in\na)return a.movementX;a!==yd&&(yd&&\"mousemove\"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return\"movementY\"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=m({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=m({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=m({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=m({},sd,{clipboardData:function(a){return\"clipboardData\"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=m({},sd,{data:0}),Ld=rd(Kd),Md={Esc:\"Escape\",\nSpacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},Nd={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",\n119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},Od={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:!1}function zd(){return Pd}\nvar Qd=m({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if(\"Unidentified\"!==b)return b}return\"keypress\"===a.type?(a=od(a),13===a?\"Enter\":String.fromCharCode(a)):\"keydown\"===a.type||\"keyup\"===a.type?Nd[a.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return\"keypress\"===a.type?od(a):0},keyCode:function(a){return\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0},which:function(a){return\"keypress\"===\na.type?od(a):\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=m({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=m({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=m({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=m({},Ad,{deltaX:function(a){return\"deltaX\"in a?a.deltaX:\"wheelDeltaX\"in a?-a.wheelDeltaX:0},\ndeltaY:function(a){return\"deltaY\"in a?a.deltaY:\"wheelDeltaY\"in a?-a.wheelDeltaY:\"wheelDelta\"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=fa&&\"CompositionEvent\"in window,be=null;fa&&\"documentMode\"in document&&(be=document.documentMode);var ce=fa&&\"TextEvent\"in window&&!be,de=fa&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case \"compositionend\":return de&&\"ko\"!==b.locale?null:b.data;default:return null}}\nvar le={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return\"input\"===b?!!le[a.type]:\"textarea\"===b?!0:!1}function ne(a,b,c,d){Eb(d);b=oe(b,\"onChange\");0<b.length&&(c=new td(\"onChange\",\"change\",null,c,d),a.push({event:c,listeners:b}))}var pe=null,qe=null;function re(a){se(a,0)}function te(a){var b=ue(a);if(Wa(b))return a}\nfunction ve(a,b){if(\"change\"===a)return b}var we=!1;if(fa){var xe;if(fa){var ye=\"oninput\"in document;if(!ye){var ze=document.createElement(\"div\");ze.setAttribute(\"oninput\",\"return;\");ye=\"function\"===typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent(\"onpropertychange\",Be),qe=pe=null)}function Be(a){if(\"value\"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));a=re;if(Kb)a(b);else{Kb=!0;try{Gb(a,b)}finally{Kb=!1,Mb()}}}}\nfunction Ce(a,b,c){\"focusin\"===a?(Ae(),pe=b,qe=c,pe.attachEvent(\"onpropertychange\",Be)):\"focusout\"===a&&Ae()}function De(a){if(\"selectionchange\"===a||\"keyup\"===a||\"keydown\"===a)return te(qe)}function Ee(a,b){if(\"click\"===a)return te(b)}function Fe(a,b){if(\"input\"===a||\"change\"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He=\"function\"===typeof Object.is?Object.is:Ge,Ie=Object.prototype.hasOwnProperty;\nfunction Je(a,b){if(He(a,b))return!0;if(\"object\"!==typeof a||null===a||\"object\"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Ie.call(b,c[d])||!He(a[c[d]],b[c[d]]))return!1;return!0}function Ke(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Le(a,b){var c=Ke(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Pe=fa&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0<d.length&&(b=new td(\"onSelect\",\"select\",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)))}\nPc(\"cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange\".split(\" \"),\n0);Pc(\"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel\".split(\" \"),1);Pc(Oc,2);for(var Ve=\"change selectionchange textInput compositionstart compositionend compositionupdate\".split(\" \"),We=0;We<Ve.length;We++)Nc.set(Ve[We],0);ea(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]);\nea(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]);ea(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]);ea(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]);da(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \"));da(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \"));da(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]);da(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \"));\nda(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \"));da(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var Xe=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),Ye=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(Xe));\nfunction Ze(a,b,c){var d=a.type||\"unknown-event\";a.currentTarget=c;Yb(d,b,void 0,a);a.currentTarget=null}\nfunction se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}}}if(Ub)throw a=Vb,Ub=!1,Vb=null,a;}\nfunction G(a,b){var c=$e(b),d=a+\"__bubble\";c.has(d)||(af(b,a,2,!1),c.add(d))}var bf=\"_reactListening\"+Math.random().toString(36).slice(2);function cf(a){a[bf]||(a[bf]=!0,ba.forEach(function(b){Ye.has(b)||df(b,!1,a,null);df(b,!0,a,null)}))}\nfunction df(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;\"selectionchange\"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Ye.has(a)){if(\"scroll\"!==a)return;e|=2;f=d}var g=$e(f),h=a+\"__\"+(b?\"capture\":\"bubble\");g.has(h)||(b&&(e|=4),af(f,a,e,b),g.add(h))}\nfunction af(a,b,c,d){var e=Nc.get(b);switch(void 0===e?2:e){case 0:e=gd;break;case 1:e=id;break;default:e=hd}c=e.bind(null,b,c,a);e=void 0;!Pb||\"touchstart\"!==b&&\"touchmove\"!==b&&\"wheel\"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}\nfunction jd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Nb(function(){var d=f,e=xb(c),g=[];\na:{var h=Mc.get(a);if(void 0!==h){var k=td,x=a;switch(a){case \"keypress\":if(0===od(c))break a;case \"keydown\":case \"keyup\":k=Rd;break;case \"focusin\":x=\"focus\";k=Fd;break;case \"focusout\":x=\"blur\";k=Fd;break;case \"beforeblur\":case \"afterblur\":k=Fd;break;case \"click\":if(2===c.button)break a;case \"auxclick\":case \"dblclick\":case \"mousedown\":case \"mousemove\":case \"mouseup\":case \"mouseout\":case \"mouseover\":case \"contextmenu\":k=Bd;break;case \"drag\":case \"dragend\":case \"dragenter\":case \"dragexit\":case \"dragleave\":case \"dragover\":case \"dragstart\":case \"drop\":k=\nDd;break;case \"touchcancel\":case \"touchend\":case \"touchmove\":case \"touchstart\":k=Vd;break;case Ic:case Jc:case Kc:k=Hd;break;case Lc:k=Xd;break;case \"scroll\":k=vd;break;case \"wheel\":k=Zd;break;case \"copy\":case \"cut\":case \"paste\":k=Jd;break;case \"gotpointercapture\":case \"lostpointercapture\":case \"pointercancel\":case \"pointerdown\":case \"pointermove\":case \"pointerout\":case \"pointerover\":case \"pointerup\":k=Td}var w=0!==(b&4),z=!w&&\"scroll\"===a,u=w?null!==h?h+\"Capture\":null:h;w=[];for(var t=d,q;null!==\nt;){q=t;var v=q.stateNode;5===q.tag&&null!==v&&(q=v,null!==u&&(v=Ob(t,u),null!=v&&w.push(ef(t,v,q))));if(z)break;t=t.return}0<w.length&&(h=new k(h,x,null,c,e),g.push({event:h,listeners:w}))}}if(0===(b&7)){a:{h=\"mouseover\"===a||\"pointerover\"===a;k=\"mouseout\"===a||\"pointerout\"===a;if(h&&0===(b&16)&&(x=c.relatedTarget||c.fromElement)&&(wc(x)||x[ff]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(x=c.relatedTarget||c.toElement,k=d,x=x?wc(x):null,null!==\nx&&(z=Zb(x),x!==z||5!==x.tag&&6!==x.tag))x=null}else k=null,x=d;if(k!==x){w=Bd;v=\"onMouseLeave\";u=\"onMouseEnter\";t=\"mouse\";if(\"pointerout\"===a||\"pointerover\"===a)w=Td,v=\"onPointerLeave\",u=\"onPointerEnter\",t=\"pointer\";z=null==k?h:ue(k);q=null==x?h:ue(x);h=new w(v,t+\"leave\",k,c,e);h.target=z;h.relatedTarget=q;v=null;wc(e)===d&&(w=new w(u,t+\"enter\",x,c,e),w.target=q,w.relatedTarget=z,v=w);z=v;if(k&&x)b:{w=k;u=x;t=0;for(q=w;q;q=gf(q))t++;q=0;for(v=u;v;v=gf(v))q++;for(;0<t-q;)w=gf(w),t--;for(;0<q-t;)u=\ngf(u),q--;for(;t--;){if(w===u||null!==u&&w===u.alternate)break b;w=gf(w);u=gf(u)}w=null}else w=null;null!==k&&hf(g,h,k,w,!1);null!==x&&null!==z&&hf(g,z,x,w,!0)}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if(\"select\"===k||\"input\"===k&&\"file\"===h.type)var J=ve;else if(me(h))if(we)J=Fe;else{J=De;var K=Ce}else(k=h.nodeName)&&\"input\"===k.toLowerCase()&&(\"checkbox\"===h.type||\"radio\"===h.type)&&(J=Ee);if(J&&(J=J(a,d))){ne(g,J,c,e);break a}K&&K(a,h,d);\"focusout\"===a&&(K=h._wrapperState)&&\nK.controlled&&\"number\"===h.type&&bb(h,\"number\",h.value)}K=d?ue(d):window;switch(a){case \"focusin\":if(me(K)||\"true\"===K.contentEditable)Qe=K,Re=d,Se=null;break;case \"focusout\":Se=Re=Qe=null;break;case \"mousedown\":Te=!0;break;case \"contextmenu\":case \"mouseup\":case \"dragend\":Te=!1;Ue(g,c,e);break;case \"selectionchange\":if(Pe)break;case \"keydown\":case \"keyup\":Ue(g,c,e)}var Q;if(ae)b:{switch(a){case \"compositionstart\":var L=\"onCompositionStart\";break b;case \"compositionend\":L=\"onCompositionEnd\";break b;\ncase \"compositionupdate\":L=\"onCompositionUpdate\";break b}L=void 0}else ie?ge(a,c)&&(L=\"onCompositionEnd\"):\"keydown\"===a&&229===c.keyCode&&(L=\"onCompositionStart\");L&&(de&&\"ko\"!==c.locale&&(ie||\"onCompositionStart\"!==L?\"onCompositionEnd\"===L&&ie&&(Q=nd()):(kd=e,ld=\"value\"in kd?kd.value:kd.textContent,ie=!0)),K=oe(d,L),0<K.length&&(L=new Ld(L,a,null,c,e),g.push({event:L,listeners:K}),Q?L.data=Q:(Q=he(c),null!==Q&&(L.data=Q))));if(Q=ce?je(a,c):ke(a,c))d=oe(d,\"onBeforeInput\"),0<d.length&&(e=new Ld(\"onBeforeInput\",\n\"beforeinput\",null,c,e),g.push({event:e,listeners:d}),e.data=Q)}se(g,b)})}function ef(a,b,c){return{instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+\"Capture\",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Ob(a,c),null!=f&&d.unshift(ef(a,f,e)),f=Ob(a,b),null!=f&&d.push(ef(a,f,e)));a=a.return}return d}function gf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}\nfunction hf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Ob(c,f),null!=k&&g.unshift(ef(c,k,h))):e||(k=Ob(c,f),null!=k&&g.push(ef(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function jf(){}var kf=null,lf=null;function mf(a,b){switch(a){case \"button\":case \"input\":case \"select\":case \"textarea\":return!!b.autoFocus}return!1}\nfunction nf(a,b){return\"textarea\"===a||\"option\"===a||\"noscript\"===a||\"string\"===typeof b.children||\"number\"===typeof b.children||\"object\"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var of=\"function\"===typeof setTimeout?setTimeout:void 0,pf=\"function\"===typeof clearTimeout?clearTimeout:void 0;function qf(a){1===a.nodeType?a.textContent=\"\":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=\"\"))}\nfunction rf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function sf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(\"$\"===c||\"$!\"===c||\"$?\"===c){if(0===b)return a;b--}else\"/$\"===c&&b++}a=a.previousSibling}return null}var tf=0;function uf(a){return{$$typeof:Ga,toString:a,valueOf:a}}var vf=Math.random().toString(36).slice(2),wf=\"__reactFiber$\"+vf,xf=\"__reactProps$\"+vf,ff=\"__reactContainer$\"+vf,yf=\"__reactEvents$\"+vf;\nfunction wc(a){var b=a[wf];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ff]||c[wf]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=sf(a);null!==a;){if(c=a[wf])return c;a=sf(a)}return b}a=c;c=a.parentNode}return null}function Cb(a){a=a[wf]||a[ff];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(y(33));}function Db(a){return a[xf]||null}\nfunction $e(a){var b=a[yf];void 0===b&&(b=a[yf]=new Set);return b}var zf=[],Af=-1;function Bf(a){return{current:a}}function H(a){0>Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;\nfunction Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}\nfunction If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||\"Unknown\",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}\nvar Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};\nfunction eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}\nfunction jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});ag=null}catch(c){throw null!==ag&&(ag=ag.slice(a+1)),Of(Uf,ig),c;}finally{cg=!1}}}var kg=ra.ReactCurrentBatchConfig;function lg(a,b){if(a&&a.defaultProps){b=m({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var mg=Bf(null),ng=null,og=null,pg=null;function qg(){pg=og=ng=null}\nfunction rg(a){var b=mg.current;H(mg);a.type._context._currentValue=b}function sg(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function tg(a,b){ng=a;pg=og=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ug=!0),a.firstContext=null)}\nfunction vg(a,b){if(pg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)pg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===og){if(null===ng)throw Error(y(308));og=b;ng.dependencies={lanes:0,firstContext:b,responders:null}}else og=og.next=b}return a._currentValue}var wg=!1;function xg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}\nfunction yg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function zg(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}function Ag(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}\nfunction Bg(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=\nb;c.lastBaseUpdate=b}\nfunction Cg(a,b,c,d){var e=a.updateQueue;wg=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var n=a.alternate;if(null!==n){n=n.updateQueue;var A=n.lastBaseUpdate;A!==g&&(null===A?n.firstBaseUpdate=l:A.next=l,n.lastBaseUpdate=k)}}if(null!==f){A=e.baseState;g=0;n=l=k=null;do{h=f.lane;var p=f.eventTime;if((d&h)===h){null!==n&&(n=n.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,\nnext:null});a:{var C=a,x=f;h=b;p=c;switch(x.tag){case 1:C=x.payload;if(\"function\"===typeof C){A=C.call(p,A,h);break a}A=C;break a;case 3:C.flags=C.flags&-4097|64;case 0:C=x.payload;h=\"function\"===typeof C?C.call(p,A,h):C;if(null===h||void 0===h)break a;A=m({},A,h);break a;case 2:wg=!0}}null!==f.callback&&(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else p={eventTime:p,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===n?(l=n=p,k=A):n=n.next=p,g|=h;f=f.next;if(null===\nf)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===n&&(k=A);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=n;Dg|=g;a.lanes=g;a.memoizedState=A}}function Eg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if(\"function\"!==typeof e)throw Error(y(191,e));e.call(d)}}}var Fg=(new aa.Component).refs;\nfunction Gg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:m({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}\nvar Kg={isMounted:function(a){return(a=a._reactInternals)?Zb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Hg(),d=Ig(a),e=zg(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=\nb);Ag(a,e);Jg(a,d,c)}};function Lg(a,b,c,d,e,f,g){a=a.stateNode;return\"function\"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Je(c,d)||!Je(e,f):!0}\nfunction Mg(a,b,c){var d=!1,e=Cf;var f=b.contextType;\"object\"===typeof f&&null!==f?f=vg(f):(e=Ff(b)?Df:M.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Ef(a,e):Cf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Kg;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}\nfunction Ng(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Kg.enqueueReplaceState(b,b.state,null)}\nfunction Og(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Fg;xg(a);var f=b.contextType;\"object\"===typeof f&&null!==f?e.context=vg(f):(f=Ff(b)?Df:M.current,e.context=Ef(a,f));Cg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;\"function\"===typeof f&&(Gg(a,b,f,c),e.state=a.memoizedState);\"function\"===typeof b.getDerivedStateFromProps||\"function\"===typeof e.getSnapshotBeforeUpdate||\"function\"!==typeof e.UNSAFE_componentWillMount&&\"function\"!==typeof e.componentWillMount||\n(b=e.state,\"function\"===typeof e.componentWillMount&&e.componentWillMount(),\"function\"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Kg.enqueueReplaceState(e,e.state,null),Cg(a,c,e,d),e.state=a.memoizedState);\"function\"===typeof e.componentDidMount&&(a.flags|=4)}var Pg=Array.isArray;\nfunction Qg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(y(309));var d=c.stateNode}if(!d)throw Error(y(147,a));var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Fg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if(\"string\"!==typeof a)throw Error(y(284));if(!c._owner)throw Error(y(290,a));}return a}\nfunction Rg(a,b){if(\"textarea\"!==a.type)throw Error(y(31,\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b));}\nfunction Sg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Tg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=2,\nc):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Ug(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Qg(a,b,c),d.return=a,d;d=Vg(c.type,c.key,c.props,null,a.mode,d);d.ref=Qg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=\nWg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function n(a,b,c,d,f){if(null===b||7!==b.tag)return b=Xg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function A(a,b,c){if(\"string\"===typeof b||\"number\"===typeof b)return b=Ug(\"\"+b,a.mode,c),b.return=a,b;if(\"object\"===typeof b&&null!==b){switch(b.$$typeof){case sa:return c=Vg(b.type,b.key,b.props,null,a.mode,c),c.ref=Qg(a,null,b),c.return=a,c;case ta:return b=Wg(b,a.mode,c),b.return=a,b}if(Pg(b)||La(b))return b=Xg(b,\na.mode,c,null),b.return=a,b;Rg(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if(\"string\"===typeof c||\"number\"===typeof c)return null!==e?null:h(a,b,\"\"+c,d);if(\"object\"===typeof c&&null!==c){switch(c.$$typeof){case sa:return c.key===e?c.type===ua?n(a,b,c.props.children,d,e):k(a,b,c,d):null;case ta:return c.key===e?l(a,b,c,d):null}if(Pg(c)||La(c))return null!==e?null:n(a,b,c,d,null);Rg(a,c)}return null}function C(a,b,c,d,e){if(\"string\"===typeof d||\"number\"===typeof d)return a=a.get(c)||\nnull,h(b,a,\"\"+d,e);if(\"object\"===typeof d&&null!==d){switch(d.$$typeof){case sa:return a=a.get(null===d.key?c:d.key)||null,d.type===ua?n(b,a,d.props.children,e,d.key):k(b,a,d,e);case ta:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Pg(d)||La(d))return a=a.get(c)||null,n(b,a,d,e,null);Rg(b,d)}return null}function x(e,g,h,k){for(var l=null,t=null,u=g,z=g=0,q=null;null!==u&&z<h.length;z++){u.index>z?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===\nn.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;z<h.length;z++)u=A(e,h[z],k),null!==u&&(g=f(u,g,z),null===t?l=u:t.sibling=u,t=u);return l}for(u=d(e,u);z<h.length;z++)q=C(u,e,z,h[z],k),null!==q&&(a&&null!==q.alternate&&u.delete(null===q.key?z:q.key),g=f(q,g,z),null===t?l=q:t.sibling=q,t=q);a&&u.forEach(function(a){return b(e,a)});return l}function w(e,g,h,k){var l=La(h);if(\"function\"!==typeof l)throw Error(y(150));h=l.call(h);if(null==\nh)throw Error(y(151));for(var t=l=null,u=g,z=g=0,q=null,n=h.next();null!==u&&!n.done;z++,n=h.next()){u.index>z?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&\nu.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);\nd=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=\nWg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||\"Component\"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);\nfunction dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);\nfunction ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;\nfunction mh(a,b){var c=nh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}\nfunction rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(\"/$\"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else\"$\"!==c&&\"$!\"!==c&&\"$?\"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}\nfunction sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;a<th.length;a++)th[a]._workInProgressVersionPrimary=null;th.length=0}var vh=ra.ReactCurrentDispatcher,wh=ra.ReactCurrentBatchConfig,xh=0,R=null,S=null,T=null,yh=!1,zh=!1;function Ah(){throw Error(y(321));}function Bh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return!1;return!0}\nfunction Ch(a,b,c,d,e,f){xh=f;R=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;vh.current=null===a||null===a.memoizedState?Dh:Eh;a=c(d,e);if(zh){f=0;do{zh=!1;if(!(25>f))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}\nfunction Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return\"function\"===typeof b?b(a):b}\nfunction Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,\neagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}\nfunction Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=\ne.entanglements,h=a;0<h;){var k=31-Vc(h),v=1<<k;d[k]|=a;h&=~v}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=p.getSnapshot,c=p.setSnapshot;try{c(a(b._source));var d=Ig(w);e.mutableReadLanes|=d&e.pendingLanes}catch(q){c(function(){throw q;})}})},[b,d]);He(C,c)&&He(x,b)&&He(A,d)||(a={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:n},a.dispatch=l=Oh.bind(null,R,a),k.queue=a,k.baseQueue=null,n=Mh(e,b,c),k.memoizedState=k.baseState=n);return n}\nfunction Ph(a,b,c){var d=Ih();return Nh(d,a,b,c)}function Qh(a){var b=Hh();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:a};a=a.dispatch=Oh.bind(null,R,a);return[b.memoizedState,a]}\nfunction Rh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=R.updateQueue;null===b?(b={lastEffect:null},R.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Sh(a){var b=Hh();a={current:a};return b.memoizedState=a}function Th(){return Ih().memoizedState}function Uh(a,b,c,d){var e=Hh();R.flags|=a;e.memoizedState=Rh(1|b,c,void 0,void 0===d?null:d)}\nfunction Vh(a,b,c,d){var e=Ih();d=void 0===d?null:d;var f=void 0;if(null!==S){var g=S.memoizedState;f=g.destroy;if(null!==d&&Bh(d,g.deps)){Rh(b,c,f,d);return}}R.flags|=a;e.memoizedState=Rh(1|b,c,f,d)}function Wh(a,b){return Uh(516,4,a,b)}function Xh(a,b){return Vh(516,4,a,b)}function Yh(a,b){return Vh(4,2,a,b)}function Zh(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}\nfunction $h(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Vh(4,2,Zh.bind(null,b,a),c)}function ai(){}function bi(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function ci(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}\nfunction di(a,b){var c=eg();gg(98>c?98:c,function(){a(!0)});gg(97<c?97:c,function(){var c=wh.transition;wh.transition=1;try{a(!1),b()}finally{wh.transition=c}})}\nfunction Oh(a,b,c){var d=Hg(),e=Ig(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);b.pending=f;g=a.alternate;if(a===R||null!==g&&g===R)zh=yh=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(He(k,h))return}catch(l){}finally{}Jg(a,e,d)}}\nvar Gh={readContext:vg,useCallback:Ah,useContext:Ah,useEffect:Ah,useImperativeHandle:Ah,useLayoutEffect:Ah,useMemo:Ah,useReducer:Ah,useRef:Ah,useState:Ah,useDebugValue:Ah,useDeferredValue:Ah,useTransition:Ah,useMutableSource:Ah,useOpaqueIdentifier:Ah,unstable_isNewReconciler:!1},Dh={readContext:vg,useCallback:function(a,b){Hh().memoizedState=[a,void 0===b?null:b];return a},useContext:vg,useEffect:Wh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Uh(4,2,Zh.bind(null,\nb,a),c)},useLayoutEffect:function(a,b){return Uh(4,2,a,b)},useMemo:function(a,b){var c=Hh();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Hh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Oh.bind(null,R,a);return[d.memoizedState,a]},useRef:Sh,useState:Qh,useDebugValue:ai,useDeferredValue:function(a){var b=Qh(a),c=b[0],d=b[1];Wh(function(){var b=wh.transition;\nwh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Qh(!1),b=a[0];a=di.bind(null,a[1]);Sh(a);return[a,b]},useMutableSource:function(a,b,c){var d=Hh();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Nh(d,a,b,c)},useOpaqueIdentifier:function(){if(lh){var a=!1,b=uf(function(){a||(a=!0,c(\"r:\"+(tf++).toString(36)));throw Error(y(355));}),c=Qh(b)[1];0===(R.mode&2)&&(R.flags|=516,Rh(5,function(){c(\"r:\"+(tf++).toString(36))},\nvoid 0,null));return b}b=\"r:\"+(tf++).toString(36);Qh(b);return b},unstable_isNewReconciler:!1},Eh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Kh,useRef:Th,useState:function(){return Kh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Kh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Kh(Jh)[0];return[Th().current,\na]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Kh(Jh)[0]},unstable_isNewReconciler:!1},Fh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Lh,useRef:Th,useState:function(){return Lh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Lh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Lh(Jh)[0];return[Th().current,\na]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Lh(Jh)[0]},unstable_isNewReconciler:!1},ei=ra.ReactCurrentOwner,ug=!1;function fi(a,b,c,d){b.child=null===a?Zg(b,null,c,d):Yg(b,a.child,c,d)}function gi(a,b,c,d,e){c=c.render;var f=b.ref;tg(b,e);d=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,d,e);return b.child}\nfunction ii(a,b,c,d,e,f){if(null===a){var g=c.type;if(\"function\"===typeof g&&!ji(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ki(a,b,g,d,e,f);a=Vg(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Je,c(e,d)&&a.ref===b.ref))return hi(a,b,f);b.flags|=1;a=Tg(g,d);a.ref=b.ref;a.return=b;return b.child=a}\nfunction ki(a,b,c,d,e,f){if(null!==a&&Je(a.memoizedProps,d)&&a.ref===b.ref)if(ug=!1,0!==(f&e))0!==(a.flags&16384)&&(ug=!0);else return b.lanes=a.lanes,hi(a,b,f);return li(a,b,c,d,f)}\nfunction mi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if(\"hidden\"===d.mode||\"unstable-defer-without-hiding\"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},ni(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},ni(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},ni(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,ni(b,d);fi(a,b,e,c);return b.child}\nfunction oi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function li(a,b,c,d,e){var f=Ff(c)?Df:M.current;f=Ef(b,f);tg(b,e);c=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,c,e);return b.child}\nfunction pi(a,b,c,d,e){if(Ff(c)){var f=!0;Jf(b)}else f=!1;tg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),Mg(b,c,d),Og(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;\"object\"===typeof l&&null!==l?l=vg(l):(l=Ff(c)?Df:M.current,l=Ef(b,l));var n=c.getDerivedStateFromProps,A=\"function\"===typeof n||\"function\"===typeof g.getSnapshotBeforeUpdate;A||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\n\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Ng(b,g,d,l);wg=!1;var p=b.memoizedState;g.state=p;Cg(b,d,g,e);k=b.memoizedState;h!==d||p!==k||N.current||wg?(\"function\"===typeof n&&(Gg(b,c,n,d),k=b.memoizedState),(h=wg||Lg(b,c,h,d,p,k,l))?(A||\"function\"!==typeof g.UNSAFE_componentWillMount&&\"function\"!==typeof g.componentWillMount||(\"function\"===typeof g.componentWillMount&&g.componentWillMount(),\"function\"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),\"function\"===\ntypeof g.componentDidMount&&(b.flags|=4)):(\"function\"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):(\"function\"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;yg(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:lg(b.type,h);g.props=l;A=b.pendingProps;p=g.context;k=c.contextType;\"object\"===typeof k&&null!==k?k=vg(k):(k=Ff(c)?Df:M.current,k=Ef(b,k));var C=c.getDerivedStateFromProps;(n=\"function\"===typeof C||\n\"function\"===typeof g.getSnapshotBeforeUpdate)||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof g.componentWillReceiveProps||(h!==A||p!==k)&&Ng(b,g,d,k);wg=!1;p=b.memoizedState;g.state=p;Cg(b,d,g,e);var x=b.memoizedState;h!==A||p!==x||N.current||wg?(\"function\"===typeof C&&(Gg(b,c,C,d),x=b.memoizedState),(l=wg||Lg(b,c,l,d,p,x,k))?(n||\"function\"!==typeof g.UNSAFE_componentWillUpdate&&\"function\"!==typeof g.componentWillUpdate||(\"function\"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,\nx,k),\"function\"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,k)),\"function\"===typeof g.componentDidUpdate&&(b.flags|=4),\"function\"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=k,d=l):(\"function\"!==typeof g.componentDidUpdate||\nh===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),d=!1)}return qi(a,b,c,d,f,e)}\nfunction qi(a,b,c,d,e,f){oi(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Kf(b,c,!1),hi(a,b,f);d=b.stateNode;ei.current=b;var h=g&&\"function\"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Yg(b,a.child,null,f),b.child=Yg(b,null,h,f)):fi(a,b,h,f);b.memoizedState=d.state;e&&Kf(b,c,!0);return b.child}function ri(a){var b=a.stateNode;b.pendingContext?Hf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Hf(a,b.context,!1);eh(a,b.containerInfo)}\nvar si={dehydrated:null,retryLane:0};\nfunction ti(a,b,c){var d=b.pendingProps,e=P.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);I(P,e&1);if(null===a){void 0!==d.fallback&&ph(b);a=d.children;e=d.fallback;if(f)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=si,a;if(\"number\"===typeof d.unstable_expectedLoadTime)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},\nb.memoizedState=si,b.lanes=33554432,a;c=vi({mode:\"visible\",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:\n{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}function ui(a,b,c,d){var e=a.mode,f=a.child;b={mode:\"hidden\",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b):f=vi(b,e,0,null);c=Xg(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}\nfunction xi(a,b,c,d){var e=a.child;a=e.sibling;c=Tg(e,{mode:\"visible\",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}\nfunction wi(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:\"hidden\",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Tg(g,h);null!==a?d=Tg(a,d):(d=Xg(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function yi(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);sg(a.return,b)}\nfunction zi(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}\nfunction Ai(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;fi(a,b,d.children,c);d=P.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&yi(a,c);else if(19===a.tag)yi(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(P,d);if(0===(b.mode&2))b.memoizedState=\nnull;else switch(e){case \"forwards\":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===ih(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);zi(b,!1,e,c,f,b.lastEffect);break;case \"backwards\":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===ih(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}zi(b,!0,c,null,f,b.lastEffect);break;case \"together\":zi(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}\nfunction hi(a,b,c){null!==a&&(b.dependencies=a.dependencies);Dg|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(y(153));if(null!==b.child){a=b.child;c=Tg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Tg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}var Bi,Ci,Di,Ei;\nBi=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Ci=function(){};\nDi=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;dh(ah.current);var f=null;switch(c){case \"input\":e=Ya(a,e);d=Ya(a,d);f=[];break;case \"option\":e=eb(a,e);d=eb(a,d);f=[];break;case \"select\":e=m({},e,{value:void 0});d=m({},d,{value:void 0});f=[];break;case \"textarea\":e=gb(a,e);d=gb(a,d);f=[];break;default:\"function\"!==typeof e.onClick&&\"function\"===typeof d.onClick&&(a.onclick=jf)}vb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if(\"style\"===\nl){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]=\"\")}else\"dangerouslySetInnerHTML\"!==l&&\"children\"!==l&&\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&\"autoFocus\"!==l&&(ca.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if(\"style\"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]=\"\");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||\n(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else\"dangerouslySetInnerHTML\"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):\"children\"===l?\"string\"!==typeof k&&\"number\"!==typeof k||(f=f||[]).push(l,\"\"+k):\"suppressContentEditableWarning\"!==l&&\"suppressHydrationWarning\"!==l&&(ca.hasOwnProperty(l)?(null!=k&&\"onScroll\"===l&&G(\"scroll\",a),f||h===k||(f=[])):\"object\"===typeof k&&null!==k&&k.$$typeof===Ga?k.toString():(f=f||[]).push(l,k))}c&&(f=f||[]).push(\"style\",\nc);var l=f;if(b.updateQueue=l)b.flags|=4}};Ei=function(a,b,c,d){c!==d&&(b.flags|=4)};function Fi(a,b){if(!lh)switch(a.tailMode){case \"hidden\":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case \"collapsed\":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}\nfunction Gi(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ff(b.type)&&Gf(),null;case 3:fh();H(N);H(M);uh();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)rh(b)?b.flags|=4:d.hydrate||(b.flags|=256);Ci(b);return null;case 5:hh(b);var e=dh(ch.current);c=b.type;if(null!==a&&null!=b.stateNode)Di(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===\nb.stateNode)throw Error(y(166));return null}a=dh(ah.current);if(rh(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[wf]=b;d[xf]=f;switch(c){case \"dialog\":G(\"cancel\",d);G(\"close\",d);break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",d);break;case \"video\":case \"audio\":for(a=0;a<Xe.length;a++)G(Xe[a],d);break;case \"source\":G(\"error\",d);break;case \"img\":case \"image\":case \"link\":G(\"error\",d);G(\"load\",d);break;case \"details\":G(\"toggle\",d);break;case \"input\":Za(d,f);G(\"invalid\",d);break;case \"select\":d._wrapperState=\n{wasMultiple:!!f.multiple};G(\"invalid\",d);break;case \"textarea\":hb(d,f),G(\"invalid\",d)}vb(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],\"children\"===g?\"string\"===typeof e?d.textContent!==e&&(a=[\"children\",e]):\"number\"===typeof e&&d.textContent!==\"\"+e&&(a=[\"children\",\"\"+e]):ca.hasOwnProperty(g)&&null!=e&&\"onScroll\"===g&&G(\"scroll\",d));switch(c){case \"input\":Va(d);cb(d,f,!0);break;case \"textarea\":Va(d);jb(d);break;case \"select\":case \"option\":break;default:\"function\"===typeof f.onClick&&(d.onclick=\njf)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;a===kb.html&&(a=lb(c));a===kb.html?\"script\"===c?(a=g.createElement(\"div\"),a.innerHTML=\"<script>\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case \"dialog\":G(\"cancel\",a);G(\"close\",a);\ne=d;break;case \"iframe\":case \"object\":case \"embed\":G(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;e<Xe.length;e++)G(Xe[e],a);e=d;break;case \"source\":G(\"error\",a);e=d;break;case \"img\":case \"image\":case \"link\":G(\"error\",a);G(\"load\",a);e=d;break;case \"details\":G(\"toggle\",a);e=d;break;case \"input\":Za(a,d);e=Ya(a,d);G(\"invalid\",a);break;case \"option\":e=eb(a,d);break;case \"select\":a._wrapperState={wasMultiple:!!d.multiple};e=m({},d,{value:void 0});G(\"invalid\",a);break;case \"textarea\":hb(a,d);e=\ngb(a,d);G(\"invalid\",a);break;default:e=d}vb(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];\"style\"===f?tb(a,k):\"dangerouslySetInnerHTML\"===f?(k=k?k.__html:void 0,null!=k&&ob(a,k)):\"children\"===f?\"string\"===typeof k?(\"textarea\"!==c||\"\"!==k)&&pb(a,k):\"number\"===typeof k&&pb(a,\"\"+k):\"suppressContentEditableWarning\"!==f&&\"suppressHydrationWarning\"!==f&&\"autoFocus\"!==f&&(ca.hasOwnProperty(f)?null!=k&&\"onScroll\"===f&&G(\"scroll\",a):null!=k&&qa(a,f,k,g))}switch(c){case \"input\":Va(a);cb(a,d,!1);\nbreak;case \"textarea\":Va(a);jb(a);break;case \"option\":null!=d.value&&a.setAttribute(\"value\",\"\"+Sa(d.value));break;case \"select\":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,!1):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue,!0);break;default:\"function\"===typeof e.onClick&&(a.onclick=jf)}mf(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Ei(a,b,a.memoizedProps,d);else{if(\"string\"!==typeof d&&null===b.stateNode)throw Error(y(166));\nc=dh(ch.current);dh(ah.current);rh(b)?(d=b.stateNode,c=b.memoizedProps,d[wf]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[wf]=b,b.stateNode=d)}return null;case 13:H(P);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&rh(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(P.current&1))0===V&&(V=3);else{if(0===V||3===V)V=\n4;null===U||0===(Dg&134217727)&&0===(Hi&134217727)||Ii(U,W)}if(d||c)b.flags|=4;return null;case 4:return fh(),Ci(b),null===a&&cf(b.stateNode.containerInfo),null;case 10:return rg(b),null;case 17:return Ff(b.type)&&Gf(),null;case 19:H(P);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)Fi(d,!1);else{if(0!==V||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=ih(a);if(null!==g){b.flags|=64;Fi(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);\nnull===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,\nf.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;I(P,P.current&1|2);return b.child}a=a.sibling}null!==d.tail&&O()>Ji&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=\n64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&\"unstable-defer-without-hiding\"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}\nfunction Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}\nfunction Mi(a,b){try{var c=\"\",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e=\"\\nError generating stack: \"+f.message+\"\\n\"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi=\"function\"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}\nfunction Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}var Ui=\"function\"===typeof WeakSet?WeakSet:Set;\nfunction Vi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}\nfunction Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,\nb.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));\nreturn;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}\nfunction aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,\"function\"===typeof d.setProperty?d.setProperty(\"display\",\"none\",\"important\"):d.display=\"none\";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null;d.style.display=sb(\"display\",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?\"\":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===\na)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}\nfunction bj(a,b){if(Mf&&\"function\"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if(\"function\"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,\nf)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,\"\"),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===\nc.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}\nfunction gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}\nfunction hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}\nfunction cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,\n8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}\nfunction ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;e<f.length;e+=\n2){var g=f[e],h=f[e+1];\"style\"===g?tb(c,h):\"dangerouslySetInnerHTML\"===g?ob(c,h):\"children\"===g?pb(c,h):qa(c,g,h,b)}switch(a){case \"input\":ab(c,d);break;case \"textarea\":ib(c,d);break;case \"select\":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?fb(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?fb(c,!!d.multiple,d.defaultValue,!0):fb(c,!!d.multiple,d.multiple?[]:\"\",!1))}}}return;case 6:if(null===b.stateNode)throw Error(y(162));b.stateNode.nodeValue=\nb.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,Cc(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(jj=O(),aj(b.child,!0));kj(b);return;case 19:kj(b);return;case 17:return;case 23:case 24:aj(b,null!==b.memoizedState);return}throw Error(y(163));}function kj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ui);b.forEach(function(b){var d=lj.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction mj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}var nj=Math.ceil,oj=ra.ReactCurrentDispatcher,pj=ra.ReactCurrentOwner,X=0,U=null,Y=null,W=0,qj=0,rj=Bf(0),V=0,sj=null,tj=0,Dg=0,Hi=0,uj=0,vj=null,jj=0,Ji=Infinity;function wj(){Ji=O()+500}var Z=null,Qi=!1,Ri=null,Ti=null,xj=!1,yj=null,zj=90,Aj=[],Bj=[],Cj=null,Dj=0,Ej=null,Fj=-1,Gj=0,Hj=0,Ij=null,Jj=!1;function Hg(){return 0!==(X&48)?O():-1!==Fj?Fj:Fj=O()}\nfunction Ig(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===eg()?1:2;0===Gj&&(Gj=tj);if(0!==kg.transition){0!==Hj&&(Hj=null!==vj?vj.pendingLanes:0);a=Gj;var b=4186112&~Hj;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=eg();0!==(X&4)&&98===a?a=Xc(12,Gj):(a=Sc(a),a=Xc(a,Gj));return a}\nfunction Jg(a,b,c){if(50<Dj)throw Dj=0,Ej=null,Error(y(185));a=Kj(a,b);if(null===a)return null;$c(a,b,c);a===U&&(Hi|=b,4===V&&Ii(a,W));var d=eg();1===b?0!==(X&8)&&0===(X&48)?Lj(a):(Mj(a,c),0===X&&(wj(),ig())):(0===(X&4)||98!==d&&99!==d||(null===Cj?Cj=new Set([a]):Cj.add(a)),Mj(a,c));vj=a}function Kj(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}\nfunction Mj(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Vc(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;Rc(k);var n=F;f[h]=10<=n?l+250:6<=n?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Uc(a,a===U?W:0);b=F;if(0===d)null!==c&&(c!==Zf&&Pf(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==Zf&&Pf(c)}15===b?(c=Lj.bind(null,a),null===ag?(ag=[c],bg=Of(Uf,jg)):ag.push(c),\nc=Zf):14===b?c=hg(99,Lj.bind(null,a)):(c=Tc(b),c=hg(c,Nj.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}\nfunction Nj(a){Fj=-1;Hj=Gj=0;if(0!==(X&48))throw Error(y(327));var b=a.callbackNode;if(Oj()&&a.callbackNode!==b)return null;var c=Uc(a,a===U?W:0);if(0===c)return null;var d=c;var e=X;X|=16;var f=Pj();if(U!==a||W!==d)wj(),Qj(a,d);do try{Rj();break}catch(h){Sj(a,h)}while(1);qg();oj.current=f;X=e;null!==Y?d=0:(U=null,W=0,d=V);if(0!==(tj&Hi))Qj(a,0);else if(0!==d){2===d&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),c=Wc(a),0!==c&&(d=Tj(a,c)));if(1===d)throw b=sj,Qj(a,0),Ii(a,c),Mj(a,O()),b;a.finishedWork=\na.current.alternate;a.finishedLanes=c;switch(d){case 0:case 1:throw Error(y(345));case 2:Uj(a);break;case 3:Ii(a,c);if((c&62914560)===c&&(d=jj+500-O(),10<d)){if(0!==Uc(a,0))break;e=a.suspendedLanes;if((e&c)!==c){Hg();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=of(Uj.bind(null,a),d);break}Uj(a);break;case 4:Ii(a,c);if((c&4186112)===c)break;d=a.eventTimes;for(e=-1;0<c;){var g=31-Vc(c);f=1<<g;g=d[g];g>e&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>\nc?4320:1960*nj(c/1960))-c;if(10<c){a.timeoutHandle=of(Uj.bind(null,a),c);break}Uj(a);break;case 5:Uj(a);break;default:throw Error(y(329));}}Mj(a,O());return a.callbackNode===b?Nj.bind(null,a):null}function Ii(a,b){b&=~uj;b&=~Hi;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Vc(b),d=1<<c;a[c]=-1;b&=~d}}\nfunction Lj(a){if(0!==(X&48))throw Error(y(327));Oj();if(a===U&&0!==(a.expiredLanes&W)){var b=W;var c=Tj(a,b);0!==(tj&Hi)&&(b=Uc(a,b),c=Tj(a,b))}else b=Uc(a,0),c=Tj(a,b);0!==a.tag&&2===c&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),b=Wc(a),0!==b&&(c=Tj(a,b)));if(1===c)throw c=sj,Qj(a,0),Ii(a,b),Mj(a,O()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;Uj(a);Mj(a,O());return null}\nfunction Vj(){if(null!==Cj){var a=Cj;Cj=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;Mj(a,O())})}ig()}function Wj(a,b){var c=X;X|=1;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function Xj(a,b){var c=X;X&=-2;X|=8;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function ni(a,b){I(rj,qj);qj|=b;tj|=b}function Ki(){qj=rj.current;H(rj)}\nfunction Qj(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,pf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Gf();break;case 3:fh();H(N);H(M);uh();break;case 5:hh(d);break;case 4:fh();break;case 13:H(P);break;case 19:H(P);break;case 10:rg(d);break;case 23:case 24:Ki()}c=c.return}U=a;Y=Tg(a.current,null);W=qj=tj=b;V=0;sj=null;uj=Hi=Dg=0}\nfunction Sj(a,b){do{var c=Y;try{qg();vh.current=Gh;if(yh){for(var d=R.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}yh=!1}xh=0;T=S=R=null;zh=!1;pj.current=null;if(null===c||null===c.return){V=1;sj=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=W;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&\"object\"===typeof k&&\"function\"===typeof k.then){var l=k;if(0===(h.mode&2)){var n=h.alternate;n?(h.updateQueue=n.updateQueue,h.memoizedState=n.memoizedState,h.lanes=n.lanes):\n(h.updateQueue=null,h.memoizedState=null)}var A=0!==(P.current&1),p=g;do{var C;if(C=13===p.tag){var x=p.memoizedState;if(null!==x)C=null!==x.dehydrated?!0:!1;else{var w=p.memoizedProps;C=void 0===w.fallback?!1:!0!==w.unstable_avoidThisFallback?!0:A?!1:!0}}if(C){var z=p.updateQueue;if(null===z){var u=new Set;u.add(l);p.updateQueue=u}else z.add(l);if(0===(p.mode&2)){p.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var t=zg(-1,1);t.tag=2;Ag(h,t)}h.lanes|=1;break a}k=\nvoid 0;h=b;var q=f.pingCache;null===q?(q=f.pingCache=new Oi,k=new Set,q.set(l,k)):(k=q.get(l),void 0===k&&(k=new Set,q.set(l,k)));if(!k.has(h)){k.add(h);var v=Yj.bind(null,f,l,h);l.then(v,v)}p.flags|=4096;p.lanes=b;break a}p=p.return}while(null!==p);k=Error((Ra(h.type)||\"A React component\")+\" suspended while rendering, but no fallback UI was specified.\\n\\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.\")}5!==V&&(V=2);k=Mi(k,h);p=\ng;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&(\"function\"===typeof K.getDerivedStateFromError||null!==Q&&\"function\"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}\nfunction Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}\nfunction Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==\na.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=Li(b);if(null!==c){c.flags&=2047;Y=c;return}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===V&&(V=5)}function Uj(a){var b=eg();gg(99,dk.bind(null,a,b));return null}\nfunction dk(a,b){do Oj();while(null!==yj);if(0!==(X&48))throw Error(y(327));var c=a.finishedWork;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(y(177));a.callbackNode=null;var d=c.lanes|c.childLanes,e=d,f=a.pendingLanes&~e;a.pendingLanes=e;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=e;a.mutableReadLanes&=e;a.entangledLanes&=e;e=a.entanglements;for(var g=a.eventTimes,h=a.expirationTimes;0<f;){var k=31-Vc(f),l=1<<k;e[k]=0;g[k]=-1;h[k]=-1;f&=~l}null!==\nCj&&0===(d&24)&&Cj.has(a)&&Cj.delete(a);a===U&&(Y=U=null,W=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,d=c.firstEffect):d=c:d=c.firstEffect;if(null!==d){e=X;X|=32;pj.current=null;kf=fd;g=Ne();if(Oe(g)){if(\"selectionStart\"in g)h={start:g.selectionStart,end:g.selectionEnd};else a:if(h=(h=g.ownerDocument)&&h.defaultView||window,(l=h.getSelection&&h.getSelection())&&0!==l.rangeCount){h=l.anchorNode;f=l.anchorOffset;k=l.focusNode;l=l.focusOffset;try{h.nodeType,k.nodeType}catch(va){h=null;\nbreak a}var n=0,A=-1,p=-1,C=0,x=0,w=g,z=null;b:for(;;){for(var u;;){w!==h||0!==f&&3!==w.nodeType||(A=n+f);w!==k||0!==l&&3!==w.nodeType||(p=n+l);3===w.nodeType&&(n+=w.nodeValue.length);if(null===(u=w.firstChild))break;z=w;w=u}for(;;){if(w===g)break b;z===h&&++C===f&&(A=n);z===k&&++x===l&&(p=n);if(null!==(u=w.nextSibling))break;w=z;z=w.parentNode}w=u}h=-1===A||-1===p?null:{start:A,end:p}}else h=null;h=h||{start:0,end:0}}else h=null;lf={focusedElem:g,selectionRange:h};fd=!1;Ij=null;Jj=!1;Z=d;do try{ek()}catch(va){if(null===\nZ)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Ij=null;Z=d;do try{for(g=a;null!==Z;){var t=Z.flags;t&16&&pb(Z.stateNode,\"\");if(t&128){var q=Z.alternate;if(null!==q){var v=q.ref;null!==v&&(\"function\"===typeof v?v(null):v.current=null)}}switch(t&1038){case 2:fj(Z);Z.flags&=-3;break;case 6:fj(Z);Z.flags&=-3;ij(Z.alternate,Z);break;case 1024:Z.flags&=-1025;break;case 1028:Z.flags&=-1025;ij(Z.alternate,Z);break;case 4:ij(Z.alternate,Z);break;case 8:h=Z;cj(g,h);var J=h.alternate;dj(h);null!==\nJ&&dj(J)}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);v=lf;q=Ne();t=v.focusedElem;g=v.selectionRange;if(q!==t&&t&&t.ownerDocument&&Me(t.ownerDocument.documentElement,t)){null!==g&&Oe(t)&&(q=g.start,v=g.end,void 0===v&&(v=q),\"selectionStart\"in t?(t.selectionStart=q,t.selectionEnd=Math.min(v,t.value.length)):(v=(q=t.ownerDocument||document)&&q.defaultView||window,v.getSelection&&(v=v.getSelection(),h=t.textContent.length,J=Math.min(g.start,h),g=void 0===\ng.end?J:Math.min(g.end,h),!v.extend&&J>g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});\"function\"===typeof t.focus&&t.focus();for(t=\n0;t<q.length;t++)v=q[t],v.element.scrollLeft=v.left,v.element.scrollTop=v.top}fd=!!kf;lf=kf=null;a.current=c;Z=d;do try{for(t=a;null!==Z;){var K=Z.flags;K&36&&Yi(t,Z.alternate,Z);if(K&128){q=void 0;var Q=Z.ref;if(null!==Q){var L=Z.stateNode;switch(Z.tag){case 5:q=L;break;default:q=L}\"function\"===typeof Q?Q(q):Q.current=q}}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Z=null;$f();X=e}else a.current=c;if(xj)xj=!1,yj=a,zj=b;else for(Z=d;null!==Z;)b=\nZ.nextEffect,Z.nextEffect=null,Z.flags&8&&(K=Z,K.sibling=null,K.stateNode=null),Z=b;d=a.pendingLanes;0===d&&(Ti=null);1===d?a===Ej?Dj++:(Dj=0,Ej=a):Dj=0;c=c.stateNode;if(Mf&&\"function\"===typeof Mf.onCommitFiberRoot)try{Mf.onCommitFiberRoot(Lf,c,void 0,64===(c.current.flags&64))}catch(va){}Mj(a,O());if(Qi)throw Qi=!1,a=Ri,Ri=null,a;if(0!==(X&8))return null;ig();return null}\nfunction ek(){for(;null!==Z;){var a=Z.alternate;Jj||null===Ij||(0!==(Z.flags&8)?dc(Z,Ij)&&(Jj=!0):13===Z.tag&&mj(a,Z)&&dc(Z,Ij)&&(Jj=!0));var b=Z.flags;0!==(b&256)&&Xi(a,Z);0===(b&512)||xj||(xj=!0,hg(97,function(){Oj();return null}));Z=Z.nextEffect}}function Oj(){if(90!==zj){var a=97<zj?97:zj;zj=90;return gg(a,fk)}return!1}function $i(a,b){Aj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}function Zi(a,b){Bj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}\nfunction fk(){if(null===yj)return!1;var a=yj;yj=null;if(0!==(X&48))throw Error(y(331));var b=X;X|=32;var c=Bj;Bj=[];for(var d=0;d<c.length;d+=2){var e=c[d],f=c[d+1],g=e.destroy;e.destroy=void 0;if(\"function\"===typeof g)try{g()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}c=Aj;Aj=[];for(d=0;d<c.length;d+=2){e=c[d];f=c[d+1];try{var h=e.create;e.destroy=h()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}for(h=a.current.firstEffect;null!==h;)a=h.nextEffect,h.nextEffect=null,h.flags&8&&(h.sibling=\nnull,h.stateNode=null),h=a;X=b;ig();return!0}function gk(a,b,c){b=Mi(c,b);b=Pi(a,b,1);Ag(a,b);b=Hg();a=Kj(a,1);null!==a&&($c(a,1,b),Mj(a,b))}\nfunction Wi(a,b){if(3===a.tag)gk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){gk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if(\"function\"===typeof c.type.getDerivedStateFromError||\"function\"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d))){a=Mi(b,a);var e=Si(c,a,1);Ag(c,e);e=Hg();c=Kj(c,1);if(null!==c)$c(c,1,e),Mj(c,e);else if(\"function\"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}\nfunction Yj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Hg();a.pingedLanes|=a.suspendedLanes&c;U===a&&(W&c)===c&&(4===V||3===V&&(W&62914560)===W&&500>O()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;\nck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==\nb?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if(\"object\"===\ntypeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);\na=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));\nd=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],th.push(f);c=Zg(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else fi(a,b,d,c),sh();b=b.child}return b;case 5:return gh(b),null===a&&\nph(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,nf(d,e)?g=null:null!==f&&nf(d,f)&&(b.flags|=16),oi(a,b),fi(a,b,g,c),b.child;case 6:return null===a&&ph(b),null;case 13:return ti(a,b,c);case 4:return eh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Yg(b,null,d,c):fi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),gi(a,b,d,e,c);case 7:return fi(a,b,b.pendingProps,c),b.child;case 8:return fi(a,b,b.pendingProps.children,\nc),b.child;case 12:return fi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(mg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=He(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!N.current){b=hi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=\nk.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=zg(-1,c&-c),l.tag=2,Ag(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);sg(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}fi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,tg(b,c),e=vg(e,\nf.unstable_observedBits),d=d(e),b.flags|=1,fi(a,b,d,c),b.child;case 14:return e=b.type,f=lg(e,b.pendingProps),f=lg(e.type,f),ii(a,b,e,f,d,c);case 15:return ki(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),b.tag=1,Ff(d)?(a=!0,Jf(b)):a=!1,tg(b,c),Mg(b,d,e),Og(b,d,e,c),qi(null,b,d,!0,a,c);case 19:return Ai(a,b,c);case 23:return mi(a,b,c);case 24:return mi(a,b,c)}throw Error(y(156,b.tag));\n};function ik(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null}function nh(a,b,c,d){return new ik(a,b,c,d)}function ji(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction hk(a){if(\"function\"===typeof a)return ji(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Aa)return 11;if(a===Da)return 14}return 2}\nfunction Tg(a,b){var c=a.alternate;null===c?(c=nh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Vg(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)ji(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ua:return Xg(c.children,e,f,b);case Ha:g=8;e|=16;break;case wa:g=8;e|=1;break;case xa:return a=nh(12,c,b,e|8),a.elementType=xa,a.type=xa,a.lanes=f,a;case Ba:return a=nh(13,c,b,e),a.type=Ba,a.elementType=Ba,a.lanes=f,a;case Ca:return a=nh(19,c,b,e),a.elementType=Ca,a.lanes=f,a;case Ia:return vi(c,e,f,b);case Ja:return a=nh(24,c,b,e),a.elementType=Ja,a.lanes=f,a;default:if(\"object\"===\ntypeof a&&null!==a)switch(a.$$typeof){case ya:g=10;break a;case za:g=9;break a;case Aa:g=11;break a;case Da:g=14;break a;case Ea:g=16;d=null;break a;case Fa:g=22;break a}throw Error(y(130,null==a?a:typeof a,\"\"));}b=nh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Xg(a,b,c,d){a=nh(7,a,d,b);a.lanes=c;return a}function vi(a,b,c,d){a=nh(23,a,d,b);a.elementType=Ia;a.lanes=c;return a}function Ug(a,b,c){a=nh(6,a,null,b);a.lanes=c;return a}\nfunction Wg(a,b,c){b=nh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction jk(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=Zc(0);this.expirationTimes=Zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Zc(0);this.mutableSourceEagerHydrationData=null}\nfunction kk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ta,key:null==d?null:\"\"+d,children:a,containerInfo:b,implementation:c}}\nfunction lk(a,b,c,d){var e=b.current,f=Hg(),g=Ig(e);a:if(c){c=c._reactInternals;b:{if(Zb(c)!==c||1!==c.tag)throw Error(y(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(Ff(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(y(171));}if(1===c.tag){var k=c.type;if(Ff(k)){c=If(c,k,h);break a}}c=h}else c=Cf;null===b.context?b.context=c:b.pendingContext=c;b=zg(f,g);b.payload={element:a};d=void 0===d?null:d;null!==\nd&&(b.callback=d);Ag(e,b);Jg(e,g,f);return g}function mk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function nk(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function ok(a,b){nk(a,b);(a=a.alternate)&&nk(a,b)}function pk(){return null}\nfunction qk(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new jk(a,b,null!=c&&!0===c.hydrate);b=nh(3,null,null,2===b?7:1===b?3:0);c.current=b;b.stateNode=c;xg(b);a[ff]=c.current;cf(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}\nqk.prototype.render=function(a){lk(a,this._internalRoot,null,null)};qk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;lk(null,a,null,function(){b[ff]=null})};function rk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||\" react-mount-point-unstable \"!==a.nodeValue))}\nfunction sk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute(\"data-reactroot\")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new qk(a,0,b?{hydrate:!0}:void 0)}\nfunction tk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if(\"function\"===typeof e){var h=e;e=function(){var a=mk(g);h.call(a)}}lk(b,g,a,e)}else{f=c._reactRootContainer=sk(c,d);g=f._internalRoot;if(\"function\"===typeof e){var k=e;e=function(){var a=mk(g);k.call(a)}}Xj(function(){lk(b,g,a,e)})}return mk(g)}ec=function(a){if(13===a.tag){var b=Hg();Jg(a,4,b);ok(a,4)}};fc=function(a){if(13===a.tag){var b=Hg();Jg(a,67108864,b);ok(a,67108864)}};\ngc=function(a){if(13===a.tag){var b=Hg(),c=Ig(a);Jg(a,c,b);ok(a,c)}};hc=function(a,b){return b()};\nyb=function(a,b,c){switch(b){case \"input\":ab(a,c);b=c.name;if(\"radio\"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+b)+'][type=\"radio\"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(y(90));Wa(d);ab(d,e)}}}break;case \"textarea\":ib(a,c);break;case \"select\":b=c.value,null!=b&&fb(a,!!c.multiple,b,!1)}};Gb=Wj;\nHb=function(a,b,c,d,e){var f=X;X|=4;try{return gg(98,a.bind(null,b,c,d,e))}finally{X=f,0===X&&(wj(),ig())}};Ib=function(){0===(X&49)&&(Vj(),Oj())};Jb=function(a,b){var c=X;X|=2;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}};function uk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!rk(b))throw Error(y(200));return kk(a,b,null,c)}var vk={Events:[Cb,ue,Db,Eb,Fb,Oj,{current:!1}]},wk={findFiberByHostInstance:wc,bundleType:0,version:\"17.0.2\",rendererPackageName:\"react-dom\"};\nvar xk={bundleType:wk.bundleType,version:wk.version,rendererPackageName:wk.rendererPackageName,rendererConfig:wk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ra.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=cc(a);return null===a?null:a.stateNode},findFiberByHostInstance:wk.findFiberByHostInstance||\npk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(\"undefined\"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var yk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yk.isDisabled&&yk.supportsFiber)try{Lf=yk.inject(xk),Mf=yk}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;exports.createPortal=uk;\nexports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if(\"function\"===typeof a.render)throw Error(y(188));throw Error(y(268,Object.keys(a)));}a=cc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a,b){var c=X;if(0!==(c&48))return a(b);X|=1;try{if(a)return gg(99,a.bind(null,b))}finally{X=c,ig()}};exports.hydrate=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!0,c)};\nexports.render=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!rk(a))throw Error(y(40));return a._reactRootContainer?(Xj(function(){tk(null,null,a,!1,function(){a._reactRootContainer=null;a[ff]=null})}),!0):!1};exports.unstable_batchedUpdates=Wj;exports.unstable_createPortal=function(a,b){return uk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};\nexports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!rk(c))throw Error(y(200));if(null==a||void 0===a._reactInternals)throw Error(y(38));return tk(a,b,c,!1,d)};exports.version=\"17.0.2\";\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/** @license React v0.20.2\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f,g,h,k;if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}\nif(\"undefined\"===typeof window||\"function\"!==typeof MessageChannel){var t=null,u=null,w=function(){if(null!==t)try{var a=exports.unstable_now();t(!0,a);t=null}catch(b){throw setTimeout(w,0),b;}};f=function(a){null!==t?setTimeout(f,0,a):(t=a,setTimeout(w,0))};g=function(a,b){u=setTimeout(a,b)};h=function(){clearTimeout(u)};exports.unstable_shouldYield=function(){return!1};k=exports.unstable_forceFrameRate=function(){}}else{var x=window.setTimeout,y=window.clearTimeout;if(\"undefined\"!==typeof console){var z=\nwindow.cancelAnimationFrame;\"function\"!==typeof window.requestAnimationFrame&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\");\"function\"!==typeof z&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\")}var A=!1,B=null,C=-1,D=5,E=0;exports.unstable_shouldYield=function(){return exports.unstable_now()>=\nE};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):D=0<a?Math.floor(1E3/a):5};var F=new MessageChannel,G=F.port2;F.port1.onmessage=function(){if(null!==B){var a=exports.unstable_now();E=a+D;try{B(!0,a)?G.postMessage(null):(A=!1,B=null)}catch(b){throw G.postMessage(null),b;}}else A=!1};f=function(a){B=a;A||(A=!0,G.postMessage(null))};g=function(a,b){C=\nx(function(){a(exports.unstable_now())},b)};h=function(){y(C);C=-1}}function H(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<I(e,b))a[d]=b,a[c]=e,c=d;else break a}}function J(a){a=a[0];return void 0===a?null:a}\nfunction K(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;\nfunction T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}\nfunction V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if(\"function\"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;\nexports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};\nexports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();\"object\"===typeof c&&null!==c?(c=c.delay,c=\"number\"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:N++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};\nexports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixProperty;\n\nvar _capitalizeString = require('./capitalizeString');\n\nvar _capitalizeString2 = _interopRequireDefault(_capitalizeString);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction prefixProperty(prefixProperties, property, style) {\n if (prefixProperties.hasOwnProperty(property)) {\n var newStyle = {};\n var requiredPrefixes = prefixProperties[property];\n var capitalizedProperty = (0, _capitalizeString2.default)(property);\n var keys = Object.keys(style);\n for (var i = 0; i < keys.length; i++) {\n var styleProperty = keys[i];\n if (styleProperty === property) {\n for (var j = 0; j < requiredPrefixes.length; j++) {\n newStyle[requiredPrefixes[j] + capitalizedProperty] = style[property];\n }\n }\n newStyle[styleProperty] = style[styleProperty];\n }\n return newStyle;\n }\n return style;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = prefixValue;\nfunction prefixValue(plugins, property, value, style, metaData) {\n for (var i = 0, len = plugins.length; i < len; ++i) {\n var processedValue = plugins[i](property, value, style, metaData);\n\n // we can stop processing if a value is returned\n // as all plugin criteria are unique\n if (processedValue) {\n return processedValue;\n }\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = addNewValuesOnly;\nfunction addIfNew(list, value) {\n if (list.indexOf(value) === -1) {\n list.push(value);\n }\n}\n\nfunction addNewValuesOnly(list, values) {\n if (Array.isArray(values)) {\n for (var i = 0, len = values.length; i < len; ++i) {\n addIfNew(list, values[i]);\n }\n } else {\n addIfNew(list, values);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = isObject;\nfunction isObject(value) {\n return value instanceof Object && !Array.isArray(value);\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = hyphenateProperty;\n\nvar _hyphenateStyleName = require('hyphenate-style-name');\n\nvar _hyphenateStyleName2 = _interopRequireDefault(_hyphenateStyleName);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction hyphenateProperty(property) {\n return (0, _hyphenateStyleName2.default)(property);\n}\nmodule.exports = exports['default'];","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\n// -- Inlined from fbjs --\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction _invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nvar warning = function(){};\n\nif (process.env.NODE_ENV !== 'production') {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n}\n\n// /-- Inlined from fbjs --\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return <div>Hello World</div>;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return <div>Hello, {name}!</div>;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillMount`.\n *\n * @optional\n */\n UNSAFE_componentWillMount: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillReceiveProps`.\n *\n * @optional\n */\n UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Replacement for (deprecated) `componentWillUpdate`.\n *\n * @optional\n */\n UNSAFE_componentWillUpdate: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n\n /**\n * Similar to ReactClassInterface but for static methods.\n */\n var ReactClassStaticInterface = {\n /**\n * This method is invoked after a component is instantiated and when it\n * receives new props. Return an object to update state in response to\n * prop changes. Return null to indicate no change to state.\n *\n * If an object is returned, its keys will be merged into the existing state.\n *\n * @return {object || null}\n * @optional\n */\n getDerivedStateFromProps: 'DEFINE_MANY_MERGED'\n };\n\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n var RESERVED_SPEC_KEYS = {\n displayName: function(Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function(Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function(Constructor, childContextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign(\n {},\n Constructor.childContextTypes,\n childContextTypes\n );\n },\n contextTypes: function(Constructor, contextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign(\n {},\n Constructor.contextTypes,\n contextTypes\n );\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function(Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(\n Constructor.getDefaultProps,\n getDefaultProps\n );\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function(Constructor, propTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function(Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function() {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (process.env.NODE_ENV !== 'production') {\n warning(\n typeof typeDef[propName] === 'function',\n '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n 'React.PropTypes.',\n Constructor.displayName || 'ReactClass',\n ReactPropTypeLocationNames[location],\n propName\n );\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name)\n ? ReactClassInterface[name]\n : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(\n specPolicy === 'OVERRIDE_BASE',\n 'ReactClassInterface: You are attempting to override ' +\n '`%s` from your class specification. Ensure that your method names ' +\n 'do not overlap with React methods.',\n name\n );\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n _invariant(\n specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClassInterface: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be due ' +\n 'to a mixin.',\n name\n );\n }\n }\n\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (process.env.NODE_ENV !== 'production') {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n isMixinValid,\n \"%s: You're attempting to include a mixin that is either null \" +\n 'or not an object. Check the mixins included by the component, ' +\n 'as well as any mixins they include themselves. ' +\n 'Expected object but got %s.',\n Constructor.displayName || 'ReactClass',\n spec === null ? null : typeofSpec\n );\n }\n }\n\n return;\n }\n\n _invariant(\n typeof spec !== 'function',\n \"ReactClass: You're attempting to \" +\n 'use a component class or function as a mixin. Instead, just use a ' +\n 'regular object.'\n );\n _invariant(\n !isValidElement(spec),\n \"ReactClass: You're attempting to \" +\n 'use a component as a mixin. Instead, just use a regular object.'\n );\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isReactClassMethod &&\n !isAlreadyDefined &&\n spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n _invariant(\n isReactClassMethod &&\n (specPolicy === 'DEFINE_MANY_MERGED' ||\n specPolicy === 'DEFINE_MANY'),\n 'ReactClass: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n );\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (process.env.NODE_ENV !== 'production') {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n _invariant(\n !isReserved,\n 'ReactClass: You are attempting to define a reserved ' +\n 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n 'as an instance property instead; it will still be accessible on the ' +\n 'constructor.',\n name\n );\n\n var isAlreadyDefined = name in Constructor;\n if (isAlreadyDefined) {\n var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)\n ? ReactClassStaticInterface[name]\n : null;\n\n _invariant(\n specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClass: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be ' +\n 'due to a mixin.',\n name\n );\n\n Constructor[name] = createMergedResultFunction(Constructor[name], property);\n\n return;\n }\n\n Constructor[name] = property;\n }\n }\n\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(\n one && two && typeof one === 'object' && typeof two === 'object',\n 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'\n );\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(\n one[key] === undefined,\n 'mergeIntoWithNoDuplicateKeys(): ' +\n 'Tried to merge two objects with the same key: `%s`. This conflict ' +\n 'may be due to a mixin; in particular, this may be caused by two ' +\n 'getInitialState() or getDefaultProps() methods returning objects ' +\n 'with clashing keys.',\n key\n );\n one[key] = two[key];\n }\n }\n return one;\n }\n\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (process.env.NODE_ENV !== 'production') {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function(newThis) {\n for (\n var _len = arguments.length,\n args = Array(_len > 1 ? _len - 1 : 0),\n _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): React component methods may only be bound to the ' +\n 'component instance. See %s',\n componentName\n );\n }\n } else if (!args.length) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): You are binding a component method to the component. ' +\n 'React does this for you automatically in a high-performance ' +\n 'way, so you can safely remove this call. See %s',\n componentName\n );\n }\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function() {\n this.__isMounted = true;\n }\n };\n\n var IsMountedPostMixin = {\n componentWillUnmount: function() {\n this.__isMounted = false;\n }\n };\n\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function(newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function() {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n this.__didWarnIsMounted,\n '%s: isMounted is deprecated. Instead, make sure to clean up ' +\n 'subscriptions and pending requests in componentWillUnmount to ' +\n 'prevent memory leaks.',\n (this.constructor && this.constructor.displayName) ||\n this.name ||\n 'Component'\n );\n this.__didWarnIsMounted = true;\n }\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function() {};\n _assign(\n ReactClassComponent.prototype,\n ReactComponent.prototype,\n ReactClassMixin\n );\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function(props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n this instanceof Constructor,\n 'Something is calling a React component directly. Use a factory or ' +\n 'JSX instead. See: https://fb.me/react-legacyfactory'\n );\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (\n initialState === undefined &&\n this.getInitialState._isMockFunction\n ) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n _invariant(\n typeof initialState === 'object' && !Array.isArray(initialState),\n '%s.getInitialState(): must return an object or null',\n Constructor.displayName || 'ReactCompositeComponent'\n );\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(\n Constructor.prototype.render,\n 'createClass(...): Class specification must implement a `render` method.'\n );\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n !Constructor.prototype.componentShouldUpdate,\n '%s has a method called ' +\n 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n 'The name is phrased as a question because the function is ' +\n 'expected to return a value.',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.componentWillRecieveProps,\n '%s has a method called ' +\n 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.UNSAFE_componentWillRecieveProps,\n '%s has a method called UNSAFE_componentWillRecieveProps(). ' +\n 'Did you mean UNSAFE_componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;\n","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\n\n\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\n\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.AFRAME = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){\nvar str = Object.prototype.toString\n\nmodule.exports = anArray\n\nfunction anArray(arr) {\n return (\n arr.BYTES_PER_ELEMENT\n && str.call(arr.buffer) === '[object ArrayBuffer]'\n || Array.isArray(arr)\n )\n}\n\n},{}],2:[function(_dereq_,module,exports){\nmodule.exports = function numtype(num, def) {\n\treturn typeof num === 'number'\n\t\t? num \n\t\t: (typeof def === 'number' ? def : 0)\n}\n},{}],3:[function(_dereq_,module,exports){\n'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n},{}],4:[function(_dereq_,module,exports){\n'use strict';\n// For more information about browser field, check out the browser field at https://github.com/substack/browserify-handbook#browser-field.\n\nmodule.exports = {\n // Create a <link> tag with optional data attributes\n createLink: function(href, attributes) {\n var head = document.head || document.getElementsByTagName('head')[0];\n var link = document.createElement('link');\n\n link.href = href;\n link.rel = 'stylesheet';\n\n for (var key in attributes) {\n if ( ! attributes.hasOwnProperty(key)) {\n continue;\n }\n var value = attributes[key];\n link.setAttribute('data-' + key, value);\n }\n\n head.appendChild(link);\n },\n // Create a <style> tag with optional data attributes\n createStyle: function(cssText, attributes) {\n var head = document.head || document.getElementsByTagName('head')[0],\n style = document.createElement('style');\n\n style.type = 'text/css';\n\n for (var key in attributes) {\n if ( ! attributes.hasOwnProperty(key)) {\n continue;\n }\n var value = attributes[key];\n style.setAttribute('data-' + key, value);\n }\n \n if (style.sheet) { // for jsdom and IE9+\n style.innerHTML = cssText;\n style.sheet.cssText = cssText;\n head.appendChild(style);\n } else if (style.styleSheet) { // for IE8 and below\n head.appendChild(style);\n style.styleSheet.cssText = cssText;\n } else { // for Chrome, Firefox, and Safari\n style.appendChild(document.createTextNode(cssText));\n head.appendChild(style);\n }\n }\n};\n\n},{}],5:[function(_dereq_,module,exports){\nvar Buffer = _dereq_('buffer').Buffer; // for use with browserify\n\nmodule.exports = function (a, b) {\n if (!Buffer.isBuffer(a)) return undefined;\n if (!Buffer.isBuffer(b)) return undefined;\n if (typeof a.equals === 'function') return a.equals(b);\n if (a.length !== b.length) return false;\n \n for (var i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false;\n }\n \n return true;\n};\n\n},{\"buffer\":6}],6:[function(_dereq_,module,exports){\n(function (global,Buffer){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <[email protected]> <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = _dereq_('base64-js')\nvar ieee754 = _dereq_('ieee754')\nvar isArray = _dereq_('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {},_dereq_(\"buffer\").Buffer)\n\n},{\"base64-js\":3,\"buffer\":6,\"ieee754\":29,\"isarray\":35}],7:[function(_dereq_,module,exports){\n// Polyfill for creating CustomEvents on IE9/10/11\n\n// code pulled from:\n// https://github.com/d4tocchini/customevent-polyfill\n// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill\n\n(function() {\n if (typeof window === 'undefined') {\n return;\n }\n\n try {\n var ce = new window.CustomEvent('test', { cancelable: true });\n ce.preventDefault();\n if (ce.defaultPrevented !== true) {\n // IE has problems with .preventDefault() on custom events\n // http://stackoverflow.com/questions/23349191\n throw new Error('Could not prevent default');\n }\n } catch (e) {\n var CustomEvent = function(event, params) {\n var evt, origPrevent;\n params = params || {};\n params.bubbles = !!params.bubbles;\n params.cancelable = !!params.cancelable;\n\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(\n event,\n params.bubbles,\n params.cancelable,\n params.detail\n );\n origPrevent = evt.preventDefault;\n evt.preventDefault = function() {\n origPrevent.call(this);\n try {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function() {\n return true;\n }\n });\n } catch (e) {\n this.defaultPrevented = true;\n }\n };\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n window.CustomEvent = CustomEvent; // expose definition to window\n }\n})();\n\n},{}],8:[function(_dereq_,module,exports){\n\n/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = _dereq_('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // is webkit? http://stackoverflow.com/a/16459606/376773\n return ('WebkitAppearance' in document.documentElement.style) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (window.console && (console.firebug || (console.exception && console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31);\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n return JSON.stringify(v);\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs() {\n var args = arguments;\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ');\n\n if (!useColors) return args;\n\n var c = 'color: ' + this.color;\n args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1));\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n return args;\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage(){\n try {\n return window.localStorage;\n } catch (e) {}\n}\n\n},{\"./debug\":9}],9:[function(_dereq_,module,exports){\n\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = debug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lowercased letter, i.e. \"n\".\n */\n\nexports.formatters = {};\n\n/**\n * Previously assigned color.\n */\n\nvar prevColor = 0;\n\n/**\n * Select a color.\n *\n * @return {Number}\n * @api private\n */\n\nfunction selectColor() {\n return exports.colors[prevColor++ % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction debug(namespace) {\n\n // define the `disabled` version\n function disabled() {\n }\n disabled.enabled = false;\n\n // define the `enabled` version\n function enabled() {\n\n var self = enabled;\n\n // add the `color` if not set\n if (null == self.useColors) self.useColors = exports.useColors();\n if (null == self.color && self.useColors) self.color = selectColor();\n\n var args = Array.prototype.slice.call(arguments);\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %o\n args = ['%o'].concat(args);\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n if ('function' === typeof exports.formatArgs) {\n args = exports.formatArgs.apply(self, args);\n }\n var logFn = enabled.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n enabled.enabled = true;\n\n var fn = exports.enabled(namespace) ? enabled : disabled;\n\n fn.namespace = namespace;\n\n return fn;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n var split = (namespaces || '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n\n},{}],10:[function(_dereq_,module,exports){\n'use strict';\nvar isObj = _dereq_('is-obj');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Sources cannot be null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction assignKey(to, from, key) {\n\tvar val = from[key];\n\n\tif (val === undefined || val === null) {\n\t\treturn;\n\t}\n\n\tif (hasOwnProperty.call(to, key)) {\n\t\tif (to[key] === undefined || to[key] === null) {\n\t\t\tthrow new TypeError('Cannot convert undefined or null to object (' + key + ')');\n\t\t}\n\t}\n\n\tif (!hasOwnProperty.call(to, key) || !isObj(val)) {\n\t\tto[key] = val;\n\t} else {\n\t\tto[key] = assign(Object(to[key]), from[key]);\n\t}\n}\n\nfunction assign(to, from) {\n\tif (to === from) {\n\t\treturn to;\n\t}\n\n\tfrom = Object(from);\n\n\tfor (var key in from) {\n\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\tassignKey(to, from, key);\n\t\t}\n\t}\n\n\tif (Object.getOwnPropertySymbols) {\n\t\tvar symbols = Object.getOwnPropertySymbols(from);\n\n\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\tassignKey(to, from, symbols[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n}\n\nmodule.exports = function deepAssign(target) {\n\ttarget = toObject(target);\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tassign(target, arguments[s]);\n\t}\n\n\treturn target;\n};\n\n},{\"is-obj\":34}],11:[function(_dereq_,module,exports){\n'use strict';\n\nvar keys = _dereq_('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\torigDefineProperty(obj, 'x', { enumerable: false, value: obj });\n\t\t// eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\t\tfor (var _ in obj) { // jscs:ignore disallowUnusedVariables\n\t\t\treturn false;\n\t\t}\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n\n},{\"object-keys\":41}],12:[function(_dereq_,module,exports){\n/*! (C) WebReflection Mit Style License */\n(function(t,n,r,i){\"use strict\";function st(e,t){for(var n=0,r=e.length;n<r;n++)gt(e[n],t)}function ot(e){for(var t=0,n=e.length,r;t<n;t++)r=e[t],it(r,w[at(r)])}function ut(e){return function(t){F(t)&&(gt(t,e),st(t.querySelectorAll(E),e))}}function at(e){var t=R.call(e,\"is\"),n=e.nodeName.toUpperCase(),r=x.call(b,t?m+t.toUpperCase():v+n);return t&&-1<r&&!ft(n,t)?-1:r}function ft(e,t){return-1<E.indexOf(e+'[is=\"'+t+'\"]')}function lt(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,i=e.target;Y&&(!i||i===t)&&t.attributeChangedCallback&&r!==\"style\"&&e.prevValue!==e.newValue&&t.attributeChangedCallback(r,n===e[f]?null:e.prevValue,n===e[c]?null:e.newValue)}function ct(e){var t=ut(e);return function(e){$.push(t,e.target)}}function ht(e){G&&(G=!1,e.currentTarget.removeEventListener(p,ht)),st((e.target||n).querySelectorAll(E),e.detail===u?u:o),j&&vt()}function pt(e,t){var n=this;U.call(n,e,t),Z.call(n,{target:n})}function dt(e,t){P(e,t),nt?nt.observe(e,X):(Q&&(e.setAttribute=pt,e[s]=tt(e),e.addEventListener(d,Z)),e.addEventListener(h,lt)),e.createdCallback&&Y&&(e.created=!0,e.createdCallback(),e.created=!1)}function vt(){for(var e,t=0,n=I.length;t<n;t++)e=I[t],S.contains(e)||(n--,I.splice(t--,1),gt(e,u))}function mt(e){throw new Error(\"A \"+e+\" type is already registered\")}function gt(e,t){var n,r=at(e);-1<r&&(rt(e,w[r]),r=0,t===o&&!e[o]?(e[u]=!1,e[o]=!0,r=1,j&&x.call(I,e)<0&&I.push(e)):t===u&&!e[u]&&(e[o]=!1,e[u]=!0,r=1),r&&(n=e[t+\"Callback\"])&&n.call(e))}if(i in n)return;var s=\"__\"+i+(Math.random()*1e5>>0),o=\"attached\",u=\"detached\",a=\"extends\",f=\"ADDITION\",l=\"MODIFICATION\",c=\"REMOVAL\",h=\"DOMAttrModified\",p=\"DOMContentLoaded\",d=\"DOMSubtreeModified\",v=\"<\",m=\"=\",g=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,y=[\"ANNOTATION-XML\",\"COLOR-PROFILE\",\"FONT-FACE\",\"FONT-FACE-SRC\",\"FONT-FACE-URI\",\"FONT-FACE-FORMAT\",\"FONT-FACE-NAME\",\"MISSING-GLYPH\"],b=[],w=[],E=\"\",S=n.documentElement,x=b.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},T=r.prototype,N=T.hasOwnProperty,C=T.isPrototypeOf,k=r.defineProperty,L=r.getOwnPropertyDescriptor,A=r.getOwnPropertyNames,O=r.getPrototypeOf,M=r.setPrototypeOf,_=!!r.__proto__,D=r.create||function yt(e){return e?(yt.prototype=e,new yt):this},P=M||(_?function(e,t){return e.__proto__=t,e}:A&&L?function(){function e(e,t){for(var n,r=A(t),i=0,s=r.length;i<s;i++)n=r[i],N.call(e,n)||k(e,n,L(t,n))}return function(t,n){do e(t,n);while((n=O(n))&&!C.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),H=t.MutationObserver||t.WebKitMutationObserver,B=(t.HTMLElement||t.Element||t.Node).prototype,j=!C.call(B,S),F=j?function(e){return e.nodeType===1}:function(e){return C.call(B,e)},I=j&&[],q=B.cloneNode,R=B.getAttribute,U=B.setAttribute,z=B.removeAttribute,W=n.createElement,X=H&&{attributes:!0,characterData:!0,attributeOldValue:!0},V=H||function(e){Q=!1,S.removeEventListener(h,V)},$,J=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,10)},K=!1,Q=!0,G=!0,Y=!0,Z,et,tt,nt,rt,it;M||_?(rt=function(e,t){C.call(t,e)||dt(e,t)},it=dt):(rt=function(e,t){e[s]||(e[s]=r(!0),dt(e,t))},it=rt),j?(Q=!1,function(){var t=L(B,\"addEventListener\"),n=t.value,r=function(e){var t=new CustomEvent(h,{bubbles:!0});t.attrName=e,t.prevValue=R.call(this,e),t.newValue=null,t[c]=t.attrChange=2,z.call(this,e),this.dispatchEvent(t)},i=function(t,n){var r=this.hasAttribute(t),i=r&&R.call(this,t);e=new CustomEvent(h,{bubbles:!0}),U.call(this,t,n),e.attrName=t,e.prevValue=r?i:null,e.newValue=n,r?e[l]=e.attrChange=1:e[f]=e.attrChange=0,this.dispatchEvent(e)},o=function(e){var t=e.currentTarget,n=t[s],r=e.propertyName,i;n.hasOwnProperty(r)&&(n=n[r],i=new CustomEvent(h,{bubbles:!0}),i.attrName=n.name,i.prevValue=n.value||null,i.newValue=n.value=t[r]||null,i.prevValue==null?i[f]=i.attrChange=0:i[l]=i.attrChange=1,t.dispatchEvent(i))};t.value=function(e,t,u){e===h&&this.attributeChangedCallback&&this.setAttribute!==i&&(this[s]={className:{name:\"class\",value:this.className}},this.setAttribute=i,this.removeAttribute=r,n.call(this,\"propertychange\",o)),n.call(this,e,t,u)},k(B,\"addEventListener\",t)}()):H||(S.addEventListener(h,V),S.setAttribute(s,1),S.removeAttribute(s),Q&&(Z=function(e){var t=this,n,r,i;if(t===e.target){n=t[s],t[s]=r=tt(t);for(i in r){if(!(i in n))return et(0,t,i,n[i],r[i],f);if(r[i]!==n[i])return et(1,t,i,n[i],r[i],l)}for(i in n)if(!(i in r))return et(2,t,i,n[i],r[i],c)}},et=function(e,t,n,r,i,s){var o={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:i};o[s]=e,lt(o)},tt=function(e){for(var t,n,r={},i=e.attributes,s=0,o=i.length;s<o;s++)t=i[s],n=t.name,n!==\"setAttribute\"&&(r[n]=t.value);return r})),n[i]=function(t,r){c=t.toUpperCase(),K||(K=!0,H?(nt=function(e,t){function n(e,t){for(var n=0,r=e.length;n<r;t(e[n++]));}return new H(function(r){for(var i,s,o,u=0,a=r.length;u<a;u++)i=r[u],i.type===\"childList\"?(n(i.addedNodes,e),n(i.removedNodes,t)):(s=i.target,Y&&s.attributeChangedCallback&&i.attributeName!==\"style\"&&(o=R.call(s,i.attributeName),o!==i.oldValue&&s.attributeChangedCallback(i.attributeName,i.oldValue,o)))})}(ut(o),ut(u)),nt.observe(n,{childList:!0,subtree:!0})):($=[],J(function d(){while($.length)$.shift().call(null,$.shift());J(d)}),n.addEventListener(\"DOMNodeInserted\",ct(o)),n.addEventListener(\"DOMNodeRemoved\",ct(u))),n.addEventListener(p,ht),n.addEventListener(\"readystatechange\",ht),n.createElement=function(e,t){var r=W.apply(n,arguments),i=\"\"+e,s=x.call(b,(t?m:v)+(t||i).toUpperCase()),o=-1<s;return t&&(r.setAttribute(\"is\",t=t.toLowerCase()),o&&(o=ft(i.toUpperCase(),t))),Y=!n.createElement.innerHTMLHelper,o&&it(r,w[s]),r},B.cloneNode=function(e){var t=q.call(this,!!e),n=at(t);return-1<n&&it(t,w[n]),e&&ot(t.querySelectorAll(E)),t}),-2<x.call(b,m+c)+x.call(b,v+c)&&mt(t);if(!g.test(c)||-1<x.call(y,c))throw new Error(\"The type \"+t+\" is invalid\");var i=function(){return f?n.createElement(l,c):n.createElement(l)},s=r||T,f=N.call(s,a),l=f?r[a].toUpperCase():c,c,h;return f&&-1<x.call(b,v+l)&&mt(l),h=b.push((f?m:v)+c)-1,E=E.concat(E.length?\",\":\"\",f?l+'[is=\"'+t.toLowerCase()+'\"]':l),i.prototype=w[h]=N.call(s,\"prototype\")?s.prototype:D(B),st(n.querySelectorAll(E),o),i}})(window,document,Object,\"registerElement\");\n},{}],13:[function(_dereq_,module,exports){\nmodule.exports = function(dtype) {\n switch (dtype) {\n case 'int8':\n return Int8Array\n case 'int16':\n return Int16Array\n case 'int32':\n return Int32Array\n case 'uint8':\n return Uint8Array\n case 'uint16':\n return Uint16Array\n case 'uint32':\n return Uint32Array\n case 'float32':\n return Float32Array\n case 'float64':\n return Float64Array\n case 'array':\n return Array\n case 'uint8_clamped':\n return Uint8ClampedArray\n }\n}\n\n},{}],14:[function(_dereq_,module,exports){\n'use strict';\n\n/* globals\n\tSet,\n\tMap,\n\tWeakSet,\n\tWeakMap,\n\n\tPromise,\n\n\tSymbol,\n\tProxy,\n\n\tAtomics,\n\tSharedArrayBuffer,\n\n\tArrayBuffer,\n\tDataView,\n\tUint8Array,\n\tFloat32Array,\n\tFloat64Array,\n\tInt8Array,\n\tInt16Array,\n\tInt32Array,\n\tUint8ClampedArray,\n\tUint16Array,\n\tUint32Array,\n*/\n\nvar undefined; // eslint-disable-line no-shadow-restricted-names\n\nvar ThrowTypeError = Object.getOwnPropertyDescriptor\n\t? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }())\n\t: function () { throw new TypeError(); };\n\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar generator; // = function * () {};\nvar generatorFunction = generator ? getProto(generator) : undefined;\nvar asyncFn; // async function() {};\nvar asyncFunction = asyncFn ? asyncFn.constructor : undefined;\nvar asyncGen; // async function * () {};\nvar asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;\nvar asyncGenIterator = asyncGen ? asyncGen() : undefined;\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'$ %Array%': Array,\n\t'$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,\n\t'$ %ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'$ %ArrayPrototype%': Array.prototype,\n\t'$ %ArrayProto_entries%': Array.prototype.entries,\n\t'$ %ArrayProto_forEach%': Array.prototype.forEach,\n\t'$ %ArrayProto_keys%': Array.prototype.keys,\n\t'$ %ArrayProto_values%': Array.prototype.values,\n\t'$ %AsyncFromSyncIteratorPrototype%': undefined,\n\t'$ %AsyncFunction%': asyncFunction,\n\t'$ %AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,\n\t'$ %AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,\n\t'$ %AsyncGeneratorFunction%': asyncGenFunction,\n\t'$ %AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,\n\t'$ %AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,\n\t'$ %Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'$ %Boolean%': Boolean,\n\t'$ %BooleanPrototype%': Boolean.prototype,\n\t'$ %DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,\n\t'$ %Date%': Date,\n\t'$ %DatePrototype%': Date.prototype,\n\t'$ %decodeURI%': decodeURI,\n\t'$ %decodeURIComponent%': decodeURIComponent,\n\t'$ %encodeURI%': encodeURI,\n\t'$ %encodeURIComponent%': encodeURIComponent,\n\t'$ %Error%': Error,\n\t'$ %ErrorPrototype%': Error.prototype,\n\t'$ %eval%': eval, // eslint-disable-line no-eval\n\t'$ %EvalError%': EvalError,\n\t'$ %EvalErrorPrototype%': EvalError.prototype,\n\t'$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,\n\t'$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,\n\t'$ %Function%': Function,\n\t'$ %FunctionPrototype%': Function.prototype,\n\t'$ %Generator%': generator ? getProto(generator()) : undefined,\n\t'$ %GeneratorFunction%': generatorFunction,\n\t'$ %GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,\n\t'$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,\n\t'$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,\n\t'$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,\n\t'$ %isFinite%': isFinite,\n\t'$ %isNaN%': isNaN,\n\t'$ %IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'$ %JSON%': JSON,\n\t'$ %JSONParse%': JSON.parse,\n\t'$ %Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'$ %MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,\n\t'$ %Math%': Math,\n\t'$ %Number%': Number,\n\t'$ %NumberPrototype%': Number.prototype,\n\t'$ %Object%': Object,\n\t'$ %ObjectPrototype%': Object.prototype,\n\t'$ %ObjProto_toString%': Object.prototype.toString,\n\t'$ %ObjProto_valueOf%': Object.prototype.valueOf,\n\t'$ %parseFloat%': parseFloat,\n\t'$ %parseInt%': parseInt,\n\t'$ %Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,\n\t'$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,\n\t'$ %Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,\n\t'$ %Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,\n\t'$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,\n\t'$ %Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'$ %RangeError%': RangeError,\n\t'$ %RangeErrorPrototype%': RangeError.prototype,\n\t'$ %ReferenceError%': ReferenceError,\n\t'$ %ReferenceErrorPrototype%': ReferenceError.prototype,\n\t'$ %Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'$ %RegExp%': RegExp,\n\t'$ %RegExpPrototype%': RegExp.prototype,\n\t'$ %Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'$ %SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,\n\t'$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,\n\t'$ %String%': String,\n\t'$ %StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'$ %StringPrototype%': String.prototype,\n\t'$ %Symbol%': hasSymbols ? Symbol : undefined,\n\t'$ %SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,\n\t'$ %SyntaxError%': SyntaxError,\n\t'$ %SyntaxErrorPrototype%': SyntaxError.prototype,\n\t'$ %ThrowTypeError%': ThrowTypeError,\n\t'$ %TypedArray%': TypedArray,\n\t'$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,\n\t'$ %TypeError%': TypeError,\n\t'$ %TypeErrorPrototype%': TypeError.prototype,\n\t'$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,\n\t'$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,\n\t'$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,\n\t'$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,\n\t'$ %URIError%': URIError,\n\t'$ %URIErrorPrototype%': URIError.prototype,\n\t'$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,\n\t'$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\t'$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar key = '$ ' + name;\n\tif (!(key in INTRINSICS)) {\n\t\tthrow new SyntaxError('intrinsic ' + name + ' does not exist!');\n\t}\n\n\t// istanbul ignore if // hopefully this is impossible to test :-)\n\tif (typeof INTRINSICS[key] === 'undefined' && !allowMissing) {\n\t\tthrow new TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t}\n\treturn INTRINSICS[key];\n};\n\n},{}],15:[function(_dereq_,module,exports){\n'use strict';\n\nvar GetIntrinsic = _dereq_('./GetIntrinsic');\n\nvar $Object = GetIntrinsic('%Object%');\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $String = GetIntrinsic('%String%');\n\nvar assertRecord = _dereq_('./helpers/assertRecord');\nvar $isNaN = _dereq_('./helpers/isNaN');\nvar $isFinite = _dereq_('./helpers/isFinite');\n\nvar sign = _dereq_('./helpers/sign');\nvar mod = _dereq_('./helpers/mod');\n\nvar IsCallable = _dereq_('is-callable');\nvar toPrimitive = _dereq_('es-to-primitive/es5');\n\nvar has = _dereq_('has');\n\n// https://es5.github.io/#x9\nvar ES5 = {\n\tToPrimitive: toPrimitive,\n\n\tToBoolean: function ToBoolean(value) {\n\t\treturn !!value;\n\t},\n\tToNumber: function ToNumber(value) {\n\t\treturn +value; // eslint-disable-line no-implicit-coercion\n\t},\n\tToInteger: function ToInteger(value) {\n\t\tvar number = this.ToNumber(value);\n\t\tif ($isNaN(number)) { return 0; }\n\t\tif (number === 0 || !$isFinite(number)) { return number; }\n\t\treturn sign(number) * Math.floor(Math.abs(number));\n\t},\n\tToInt32: function ToInt32(x) {\n\t\treturn this.ToNumber(x) >> 0;\n\t},\n\tToUint32: function ToUint32(x) {\n\t\treturn this.ToNumber(x) >>> 0;\n\t},\n\tToUint16: function ToUint16(value) {\n\t\tvar number = this.ToNumber(value);\n\t\tif ($isNaN(number) || number === 0 || !$isFinite(number)) { return 0; }\n\t\tvar posInt = sign(number) * Math.floor(Math.abs(number));\n\t\treturn mod(posInt, 0x10000);\n\t},\n\tToString: function ToString(value) {\n\t\treturn $String(value);\n\t},\n\tToObject: function ToObject(value) {\n\t\tthis.CheckObjectCoercible(value);\n\t\treturn $Object(value);\n\t},\n\tCheckObjectCoercible: function CheckObjectCoercible(value, optMessage) {\n\t\t/* jshint eqnull:true */\n\t\tif (value == null) {\n\t\t\tthrow new $TypeError(optMessage || 'Cannot call method on ' + value);\n\t\t}\n\t\treturn value;\n\t},\n\tIsCallable: IsCallable,\n\tSameValue: function SameValue(x, y) {\n\t\tif (x === y) { // 0 === -0, but they are not identical.\n\t\t\tif (x === 0) { return 1 / x === 1 / y; }\n\t\t\treturn true;\n\t\t}\n\t\treturn $isNaN(x) && $isNaN(y);\n\t},\n\n\t// https://www.ecma-international.org/ecma-262/5.1/#sec-8\n\tType: function Type(x) {\n\t\tif (x === null) {\n\t\t\treturn 'Null';\n\t\t}\n\t\tif (typeof x === 'undefined') {\n\t\t\treturn 'Undefined';\n\t\t}\n\t\tif (typeof x === 'function' || typeof x === 'object') {\n\t\t\treturn 'Object';\n\t\t}\n\t\tif (typeof x === 'number') {\n\t\t\treturn 'Number';\n\t\t}\n\t\tif (typeof x === 'boolean') {\n\t\t\treturn 'Boolean';\n\t\t}\n\t\tif (typeof x === 'string') {\n\t\t\treturn 'String';\n\t\t}\n\t},\n\n\t// https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type\n\tIsPropertyDescriptor: function IsPropertyDescriptor(Desc) {\n\t\tif (this.Type(Desc) !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\tvar allowed = {\n\t\t\t'[[Configurable]]': true,\n\t\t\t'[[Enumerable]]': true,\n\t\t\t'[[Get]]': true,\n\t\t\t'[[Set]]': true,\n\t\t\t'[[Value]]': true,\n\t\t\t'[[Writable]]': true\n\t\t};\n\n\t\tfor (var key in Desc) { // eslint-disable-line\n\t\t\tif (has(Desc, key) && !allowed[key]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tvar isData = has(Desc, '[[Value]]');\n\t\tvar IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n\t\tif (isData && IsAccessor) {\n\t\t\tthrow new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n\t\t}\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.1\n\tIsAccessorDescriptor: function IsAccessorDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tassertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n\t\tif (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.2\n\tIsDataDescriptor: function IsDataDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tassertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n\t\tif (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.3\n\tIsGenericDescriptor: function IsGenericDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn false;\n\t\t}\n\n\t\tassertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n\t\tif (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.4\n\tFromPropertyDescriptor: function FromPropertyDescriptor(Desc) {\n\t\tif (typeof Desc === 'undefined') {\n\t\t\treturn Desc;\n\t\t}\n\n\t\tassertRecord(this, 'Property Descriptor', 'Desc', Desc);\n\n\t\tif (this.IsDataDescriptor(Desc)) {\n\t\t\treturn {\n\t\t\t\tvalue: Desc['[[Value]]'],\n\t\t\t\twritable: !!Desc['[[Writable]]'],\n\t\t\t\tenumerable: !!Desc['[[Enumerable]]'],\n\t\t\t\tconfigurable: !!Desc['[[Configurable]]']\n\t\t\t};\n\t\t} else if (this.IsAccessorDescriptor(Desc)) {\n\t\t\treturn {\n\t\t\t\tget: Desc['[[Get]]'],\n\t\t\t\tset: Desc['[[Set]]'],\n\t\t\t\tenumerable: !!Desc['[[Enumerable]]'],\n\t\t\t\tconfigurable: !!Desc['[[Configurable]]']\n\t\t\t};\n\t\t} else {\n\t\t\tthrow new $TypeError('FromPropertyDescriptor must be called with a fully populated Property Descriptor');\n\t\t}\n\t},\n\n\t// https://ecma-international.org/ecma-262/5.1/#sec-8.10.5\n\tToPropertyDescriptor: function ToPropertyDescriptor(Obj) {\n\t\tif (this.Type(Obj) !== 'Object') {\n\t\t\tthrow new $TypeError('ToPropertyDescriptor requires an object');\n\t\t}\n\n\t\tvar desc = {};\n\t\tif (has(Obj, 'enumerable')) {\n\t\t\tdesc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable);\n\t\t}\n\t\tif (has(Obj, 'configurable')) {\n\t\t\tdesc['[[Configurable]]'] = this.ToBoolean(Obj.configurable);\n\t\t}\n\t\tif (has(Obj, 'value')) {\n\t\t\tdesc['[[Value]]'] = Obj.value;\n\t\t}\n\t\tif (has(Obj, 'writable')) {\n\t\t\tdesc['[[Writable]]'] = this.ToBoolean(Obj.writable);\n\t\t}\n\t\tif (has(Obj, 'get')) {\n\t\t\tvar getter = Obj.get;\n\t\t\tif (typeof getter !== 'undefined' && !this.IsCallable(getter)) {\n\t\t\t\tthrow new TypeError('getter must be a function');\n\t\t\t}\n\t\t\tdesc['[[Get]]'] = getter;\n\t\t}\n\t\tif (has(Obj, 'set')) {\n\t\t\tvar setter = Obj.set;\n\t\t\tif (typeof setter !== 'undefined' && !this.IsCallable(setter)) {\n\t\t\t\tthrow new $TypeError('setter must be a function');\n\t\t\t}\n\t\t\tdesc['[[Set]]'] = setter;\n\t\t}\n\n\t\tif ((has(desc, '[[Get]]') || has(desc, '[[Set]]')) && (has(desc, '[[Value]]') || has(desc, '[[Writable]]'))) {\n\t\t\tthrow new $TypeError('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');\n\t\t}\n\t\treturn desc;\n\t}\n};\n\nmodule.exports = ES5;\n\n},{\"./GetIntrinsic\":14,\"./helpers/assertRecord\":16,\"./helpers/isFinite\":17,\"./helpers/isNaN\":18,\"./helpers/mod\":19,\"./helpers/sign\":20,\"es-to-primitive/es5\":21,\"has\":28,\"is-callable\":32}],16:[function(_dereq_,module,exports){\n'use strict';\n\nvar GetIntrinsic = _dereq_('../GetIntrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $SyntaxError = GetIntrinsic('%SyntaxError%');\n\nvar has = _dereq_('has');\n\nvar predicates = {\n // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type\n 'Property Descriptor': function isPropertyDescriptor(ES, Desc) {\n if (ES.Type(Desc) !== 'Object') {\n return false;\n }\n var allowed = {\n '[[Configurable]]': true,\n '[[Enumerable]]': true,\n '[[Get]]': true,\n '[[Set]]': true,\n '[[Value]]': true,\n '[[Writable]]': true\n };\n\n for (var key in Desc) { // eslint-disable-line\n if (has(Desc, key) && !allowed[key]) {\n return false;\n }\n }\n\n var isData = has(Desc, '[[Value]]');\n var IsAccessor = has(Desc, '[[Get]]') || has(Desc, '[[Set]]');\n if (isData && IsAccessor) {\n throw new $TypeError('Property Descriptors may not be both accessor and data descriptors');\n }\n return true;\n }\n};\n\nmodule.exports = function assertRecord(ES, recordType, argumentName, value) {\n var predicate = predicates[recordType];\n if (typeof predicate !== 'function') {\n throw new $SyntaxError('unknown record type: ' + recordType);\n }\n if (!predicate(ES, value)) {\n throw new $TypeError(argumentName + ' must be a ' + recordType);\n }\n console.log(predicate(ES, value), value);\n};\n\n},{\"../GetIntrinsic\":14,\"has\":28}],17:[function(_dereq_,module,exports){\nvar $isNaN = Number.isNaN || function (a) { return a !== a; };\n\nmodule.exports = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };\n\n},{}],18:[function(_dereq_,module,exports){\nmodule.exports = Number.isNaN || function isNaN(a) {\n\treturn a !== a;\n};\n\n},{}],19:[function(_dereq_,module,exports){\nmodule.exports = function mod(number, modulo) {\n\tvar remain = number % modulo;\n\treturn Math.floor(remain >= 0 ? remain : remain + modulo);\n};\n\n},{}],20:[function(_dereq_,module,exports){\nmodule.exports = function sign(number) {\n\treturn number >= 0 ? 1 : -1;\n};\n\n},{}],21:[function(_dereq_,module,exports){\n'use strict';\n\nvar toStr = Object.prototype.toString;\n\nvar isPrimitive = _dereq_('./helpers/isPrimitive');\n\nvar isCallable = _dereq_('is-callable');\n\n// http://ecma-international.org/ecma-262/5.1/#sec-8.12.8\nvar ES5internalSlots = {\n\t'[[DefaultValue]]': function (O) {\n\t\tvar actualHint;\n\t\tif (arguments.length > 1) {\n\t\t\tactualHint = arguments[1];\n\t\t} else {\n\t\t\tactualHint = toStr.call(O) === '[object Date]' ? String : Number;\n\t\t}\n\n\t\tif (actualHint === String || actualHint === Number) {\n\t\t\tvar methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];\n\t\t\tvar value, i;\n\t\t\tfor (i = 0; i < methods.length; ++i) {\n\t\t\t\tif (isCallable(O[methods[i]])) {\n\t\t\t\t\tvalue = O[methods[i]]();\n\t\t\t\t\tif (isPrimitive(value)) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new TypeError('No default value');\n\t\t}\n\t\tthrow new TypeError('invalid [[DefaultValue]] hint supplied');\n\t}\n};\n\n// http://ecma-international.org/ecma-262/5.1/#sec-9.1\nmodule.exports = function ToPrimitive(input) {\n\tif (isPrimitive(input)) {\n\t\treturn input;\n\t}\n\tif (arguments.length > 1) {\n\t\treturn ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);\n\t}\n\treturn ES5internalSlots['[[DefaultValue]]'](input);\n};\n\n},{\"./helpers/isPrimitive\":22,\"is-callable\":32}],22:[function(_dereq_,module,exports){\nmodule.exports = function isPrimitive(value) {\n\treturn value === null || (typeof value !== 'function' && typeof value !== 'object');\n};\n\n},{}],23:[function(_dereq_,module,exports){\n/*eslint new-cap:0*/\nvar dtype = _dereq_('dtype')\n\nmodule.exports = flattenVertexData\n\nfunction flattenVertexData (data, output, offset) {\n if (!data) throw new TypeError('must specify data as first parameter')\n offset = +(offset || 0) | 0\n\n if (Array.isArray(data) && (data[0] && typeof data[0][0] === 'number')) {\n var dim = data[0].length\n var length = data.length * dim\n var i, j, k, l\n\n // no output specified, create a new typed array\n if (!output || typeof output === 'string') {\n output = new (dtype(output || 'float32'))(length + offset)\n }\n\n var dstLength = output.length - offset\n if (length !== dstLength) {\n throw new Error('source length ' + length + ' (' + dim + 'x' + data.length + ')' +\n ' does not match destination length ' + dstLength)\n }\n\n for (i = 0, k = offset; i < data.length; i++) {\n for (j = 0; j < dim; j++) {\n output[k++] = data[i][j] === null ? NaN : data[i][j]\n }\n }\n } else {\n if (!output || typeof output === 'string') {\n // no output, create a new one\n var Ctor = dtype(output || 'float32')\n\n // handle arrays separately due to possible nulls\n if (Array.isArray(data) || output === 'array') {\n output = new Ctor(data.length + offset)\n for (i = 0, k = offset, l = output.length; k < l; k++, i++) {\n output[k] = data[i] === null ? NaN : data[i]\n }\n } else {\n if (offset === 0) {\n output = new Ctor(data)\n } else {\n output = new Ctor(data.length + offset)\n\n output.set(data, offset)\n }\n }\n } else {\n // store output in existing array\n output.set(data, offset)\n }\n }\n\n return output\n}\n\n},{\"dtype\":13}],24:[function(_dereq_,module,exports){\n'use strict';\n\nvar isCallable = _dereq_('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n\n},{\"is-callable\":32}],25:[function(_dereq_,module,exports){\n'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n\n},{}],26:[function(_dereq_,module,exports){\n'use strict';\n\nvar implementation = _dereq_('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n\n},{\"./implementation\":25}],27:[function(_dereq_,module,exports){\n(function (global){\nvar win;\n\nif (typeof window !== \"undefined\") {\n win = window;\n} else if (typeof global !== \"undefined\") {\n win = global;\n} else if (typeof self !== \"undefined\"){\n win = self;\n} else {\n win = {};\n}\n\nmodule.exports = win;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],28:[function(_dereq_,module,exports){\n'use strict';\n\nvar bind = _dereq_('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n\n},{\"function-bind\":26}],29:[function(_dereq_,module,exports){\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n},{}],30:[function(_dereq_,module,exports){\nif (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n\n},{}],31:[function(_dereq_,module,exports){\n/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n},{}],32:[function(_dereq_,module,exports){\n'use strict';\n\nvar fnToStr = Function.prototype.toString;\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nmodule.exports = function isCallable(value) {\n\tif (!value) { return false; }\n\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\tif (typeof value === 'function' && !value.prototype) { return true; }\n\tif (hasToStringTag) { return tryFunctionObject(value); }\n\tif (isES6ClassFn(value)) { return false; }\n\tvar strClass = toStr.call(value);\n\treturn strClass === fnClass || strClass === genClass;\n};\n\n},{}],33:[function(_dereq_,module,exports){\nmodule.exports = isFunction\n\nvar toString = Object.prototype.toString\n\nfunction isFunction (fn) {\n var string = toString.call(fn)\n return string === '[object Function]' ||\n (typeof fn === 'function' && string !== '[object RegExp]') ||\n (typeof window !== 'undefined' &&\n // IE8 and below\n (fn === window.setTimeout ||\n fn === window.alert ||\n fn === window.confirm ||\n fn === window.prompt))\n};\n\n},{}],34:[function(_dereq_,module,exports){\n'use strict';\nmodule.exports = function (x) {\n\tvar type = typeof x;\n\treturn x !== null && (type === 'object' || type === 'function');\n};\n\n},{}],35:[function(_dereq_,module,exports){\nvar toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n\n},{}],36:[function(_dereq_,module,exports){\nvar wordWrap = _dereq_('word-wrapper')\nvar xtend = _dereq_('xtend')\nvar number = _dereq_('as-number')\n\nvar X_HEIGHTS = ['x', 'e', 'a', 'o', 'n', 's', 'r', 'c', 'u', 'm', 'v', 'w', 'z']\nvar M_WIDTHS = ['m', 'w']\nvar CAP_HEIGHTS = ['H', 'I', 'N', 'E', 'F', 'K', 'L', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']\n\n\nvar TAB_ID = '\\t'.charCodeAt(0)\nvar SPACE_ID = ' '.charCodeAt(0)\nvar ALIGN_LEFT = 0, \n ALIGN_CENTER = 1, \n ALIGN_RIGHT = 2\n\nmodule.exports = function createLayout(opt) {\n return new TextLayout(opt)\n}\n\nfunction TextLayout(opt) {\n this.glyphs = []\n this._measure = this.computeMetrics.bind(this)\n this.update(opt)\n}\n\nTextLayout.prototype.update = function(opt) {\n opt = xtend({\n measure: this._measure\n }, opt)\n this._opt = opt\n this._opt.tabSize = number(this._opt.tabSize, 4)\n\n if (!opt.font)\n throw new Error('must provide a valid bitmap font')\n\n var glyphs = this.glyphs\n var text = opt.text||'' \n var font = opt.font\n this._setupSpaceGlyphs(font)\n \n var lines = wordWrap.lines(text, opt)\n var minWidth = opt.width || 0\n\n //clear glyphs\n glyphs.length = 0\n\n //get max line width\n var maxLineWidth = lines.reduce(function(prev, line) {\n return Math.max(prev, line.width, minWidth)\n }, 0)\n\n //the pen position\n var x = 0\n var y = 0\n var lineHeight = number(opt.lineHeight, font.common.lineHeight)\n var baseline = font.common.base\n var descender = lineHeight-baseline\n var letterSpacing = opt.letterSpacing || 0\n var height = lineHeight * lines.length - descender\n var align = getAlignType(this._opt.align)\n\n //draw text along baseline\n y -= height\n \n //the metrics for this text layout\n this._width = maxLineWidth\n this._height = height\n this._descender = lineHeight - baseline\n this._baseline = baseline\n this._xHeight = getXHeight(font)\n this._capHeight = getCapHeight(font)\n this._lineHeight = lineHeight\n this._ascender = lineHeight - descender - this._xHeight\n \n //layout each glyph\n var self = this\n lines.forEach(function(line, lineIndex) {\n var start = line.start\n var end = line.end\n var lineWidth = line.width\n var lastGlyph\n \n //for each glyph in that line...\n for (var i=start; i<end; i++) {\n var id = text.charCodeAt(i)\n var glyph = self.getGlyph(font, id)\n if (glyph) {\n if (lastGlyph) \n x += getKerning(font, lastGlyph.id, glyph.id)\n\n var tx = x\n if (align === ALIGN_CENTER) \n tx += (maxLineWidth-lineWidth)/2\n else if (align === ALIGN_RIGHT)\n tx += (maxLineWidth-lineWidth)\n\n glyphs.push({\n position: [tx, y],\n data: glyph,\n index: i,\n line: lineIndex\n }) \n\n //move pen forward\n x += glyph.xadvance + letterSpacing\n lastGlyph = glyph\n }\n }\n\n //next line down\n y += lineHeight\n x = 0\n })\n this._linesTotal = lines.length;\n}\n\nTextLayout.prototype._setupSpaceGlyphs = function(font) {\n //These are fallbacks, when the font doesn't include\n //' ' or '\\t' glyphs\n this._fallbackSpaceGlyph = null\n this._fallbackTabGlyph = null\n\n if (!font.chars || font.chars.length === 0)\n return\n\n //try to get space glyph\n //then fall back to the 'm' or 'w' glyphs\n //then fall back to the first glyph available\n var space = getGlyphById(font, SPACE_ID) \n || getMGlyph(font) \n || font.chars[0]\n\n //and create a fallback for tab\n var tabWidth = this._opt.tabSize * space.xadvance\n this._fallbackSpaceGlyph = space\n this._fallbackTabGlyph = xtend(space, {\n x: 0, y: 0, xadvance: tabWidth, id: TAB_ID, \n xoffset: 0, yoffset: 0, width: 0, height: 0\n })\n}\n\nTextLayout.prototype.getGlyph = function(font, id) {\n var glyph = getGlyphById(font, id)\n if (glyph)\n return glyph\n else if (id === TAB_ID) \n return this._fallbackTabGlyph\n else if (id === SPACE_ID) \n return this._fallbackSpaceGlyph\n return null\n}\n\nTextLayout.prototype.computeMetrics = function(text, start, end, width) {\n var letterSpacing = this._opt.letterSpacing || 0\n var font = this._opt.font\n var curPen = 0\n var curWidth = 0\n var count = 0\n var glyph\n var lastGlyph\n\n if (!font.chars || font.chars.length === 0) {\n return {\n start: start,\n end: start,\n width: 0\n }\n }\n\n end = Math.min(text.length, end)\n for (var i=start; i < end; i++) {\n var id = text.charCodeAt(i)\n var glyph = this.getGlyph(font, id)\n\n if (glyph) {\n //move pen forward\n var xoff = glyph.xoffset\n var kern = lastGlyph ? getKerning(font, lastGlyph.id, glyph.id) : 0\n curPen += kern\n\n var nextPen = curPen + glyph.xadvance + letterSpacing\n var nextWidth = curPen + glyph.width\n\n //we've hit our limit; we can't move onto the next glyph\n if (nextWidth >= width || nextPen >= width)\n break\n\n //otherwise continue along our line\n curPen = nextPen\n curWidth = nextWidth\n lastGlyph = glyph\n }\n count++\n }\n \n //make sure rightmost edge lines up with rendered glyphs\n if (lastGlyph)\n curWidth += lastGlyph.xoffset\n\n return {\n start: start,\n end: start + count,\n width: curWidth\n }\n}\n\n//getters for the private vars\n;['width', 'height', \n 'descender', 'ascender',\n 'xHeight', 'baseline',\n 'capHeight',\n 'lineHeight' ].forEach(addGetter)\n\nfunction addGetter(name) {\n Object.defineProperty(TextLayout.prototype, name, {\n get: wrapper(name),\n configurable: true\n })\n}\n\n//create lookups for private vars\nfunction wrapper(name) {\n return (new Function([\n 'return function '+name+'() {',\n ' return this._'+name,\n '}'\n ].join('\\n')))()\n}\n\nfunction getGlyphById(font, id) {\n if (!font.chars || font.chars.length === 0)\n return null\n\n var glyphIdx = findChar(font.chars, id)\n if (glyphIdx >= 0)\n return font.chars[glyphIdx]\n return null\n}\n\nfunction getXHeight(font) {\n for (var i=0; i<X_HEIGHTS.length; i++) {\n var id = X_HEIGHTS[i].charCodeAt(0)\n var idx = findChar(font.chars, id)\n if (idx >= 0) \n return font.chars[idx].height\n }\n return 0\n}\n\nfunction getMGlyph(font) {\n for (var i=0; i<M_WIDTHS.length; i++) {\n var id = M_WIDTHS[i].charCodeAt(0)\n var idx = findChar(font.chars, id)\n if (idx >= 0) \n return font.chars[idx]\n }\n return 0\n}\n\nfunction getCapHeight(font) {\n for (var i=0; i<CAP_HEIGHTS.length; i++) {\n var id = CAP_HEIGHTS[i].charCodeAt(0)\n var idx = findChar(font.chars, id)\n if (idx >= 0) \n return font.chars[idx].height\n }\n return 0\n}\n\nfunction getKerning(font, left, right) {\n if (!font.kernings || font.kernings.length === 0)\n return 0\n\n var table = font.kernings\n for (var i=0; i<table.length; i++) {\n var kern = table[i]\n if (kern.first === left && kern.second === right)\n return kern.amount\n }\n return 0\n}\n\nfunction getAlignType(align) {\n if (align === 'center')\n return ALIGN_CENTER\n else if (align === 'right')\n return ALIGN_RIGHT\n return ALIGN_LEFT\n}\n\nfunction findChar (array, value, start) {\n start = start || 0\n for (var i = start; i < array.length; i++) {\n if (array[i].id === value) {\n return i\n }\n }\n return -1\n}\n},{\"as-number\":2,\"word-wrapper\":69,\"xtend\":72}],37:[function(_dereq_,module,exports){\n(function (Buffer){\nvar xhr = _dereq_('xhr')\nvar noop = function(){}\nvar parseASCII = _dereq_('parse-bmfont-ascii')\nvar parseXML = _dereq_('parse-bmfont-xml')\nvar readBinary = _dereq_('parse-bmfont-binary')\nvar isBinaryFormat = _dereq_('./lib/is-binary')\nvar xtend = _dereq_('xtend')\n\nvar xml2 = (function hasXML2() {\n return self.XMLHttpRequest && \"withCredentials\" in new XMLHttpRequest\n})()\n\nmodule.exports = function(opt, cb) {\n cb = typeof cb === 'function' ? cb : noop\n\n if (typeof opt === 'string')\n opt = { uri: opt }\n else if (!opt)\n opt = {}\n\n var expectBinary = opt.binary\n if (expectBinary)\n opt = getBinaryOpts(opt)\n\n xhr(opt, function(err, res, body) {\n if (err)\n return cb(err)\n if (!/^2/.test(res.statusCode))\n return cb(new Error('http status code: '+res.statusCode))\n if (!body)\n return cb(new Error('no body result'))\n\n var binary = false \n\n //if the response type is an array buffer,\n //we need to convert it into a regular Buffer object\n if (isArrayBuffer(body)) {\n var array = new Uint8Array(body)\n body = new Buffer(array, 'binary')\n }\n\n //now check the string/Buffer response\n //and see if it has a binary BMF header\n if (isBinaryFormat(body)) {\n binary = true\n //if we have a string, turn it into a Buffer\n if (typeof body === 'string') \n body = new Buffer(body, 'binary')\n } \n\n //we are not parsing a binary format, just ASCII/XML/etc\n if (!binary) {\n //might still be a buffer if responseType is 'arraybuffer'\n if (Buffer.isBuffer(body))\n body = body.toString(opt.encoding)\n body = body.trim()\n }\n\n var result\n try {\n var type = res.headers['content-type']\n if (binary)\n result = readBinary(body)\n else if (/json/.test(type) || body.charAt(0) === '{')\n result = JSON.parse(body)\n else if (/xml/.test(type) || body.charAt(0) === '<')\n result = parseXML(body)\n else\n result = parseASCII(body)\n } catch (e) {\n cb(new Error('error parsing font '+e.message))\n cb = noop\n }\n cb(null, result)\n })\n}\n\nfunction isArrayBuffer(arr) {\n var str = Object.prototype.toString\n return str.call(arr) === '[object ArrayBuffer]'\n}\n\nfunction getBinaryOpts(opt) {\n //IE10+ and other modern browsers support array buffers\n if (xml2)\n return xtend(opt, { responseType: 'arraybuffer' })\n \n if (typeof self.XMLHttpRequest === 'undefined')\n throw new Error('your browser does not support XHR loading')\n\n //IE9 and XML1 browsers could still use an override\n var req = new self.XMLHttpRequest()\n req.overrideMimeType('text/plain; charset=x-user-defined')\n return xtend({\n xhr: req\n }, opt)\n}\n\n}).call(this,_dereq_(\"buffer\").Buffer)\n\n},{\"./lib/is-binary\":38,\"buffer\":6,\"parse-bmfont-ascii\":43,\"parse-bmfont-binary\":44,\"parse-bmfont-xml\":45,\"xhr\":70,\"xtend\":72}],38:[function(_dereq_,module,exports){\n(function (Buffer){\nvar equal = _dereq_('buffer-equal')\nvar HEADER = new Buffer([66, 77, 70, 3])\n\nmodule.exports = function(buf) {\n if (typeof buf === 'string')\n return buf.substring(0, 3) === 'BMF'\n return buf.length > 4 && equal(buf.slice(0, 4), HEADER)\n}\n}).call(this,_dereq_(\"buffer\").Buffer)\n\n},{\"buffer\":6,\"buffer-equal\":5}],39:[function(_dereq_,module,exports){\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n},{}],40:[function(_dereq_,module,exports){\n'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = _dereq_('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n\n},{\"./isArguments\":42}],41:[function(_dereq_,module,exports){\n'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = _dereq_('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : _dereq_('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n\n},{\"./implementation\":40,\"./isArguments\":42}],42:[function(_dereq_,module,exports){\n'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n\n},{}],43:[function(_dereq_,module,exports){\nmodule.exports = function parseBMFontAscii(data) {\n if (!data)\n throw new Error('no data provided')\n data = data.toString().trim()\n\n var output = {\n pages: [],\n chars: [],\n kernings: []\n }\n\n var lines = data.split(/\\r\\n?|\\n/g)\n\n if (lines.length === 0)\n throw new Error('no data in BMFont file')\n\n for (var i = 0; i < lines.length; i++) {\n var lineData = splitLine(lines[i], i)\n if (!lineData) //skip empty lines\n continue\n\n if (lineData.key === 'page') {\n if (typeof lineData.data.id !== 'number')\n throw new Error('malformed file at line ' + i + ' -- needs page id=N')\n if (typeof lineData.data.file !== 'string')\n throw new Error('malformed file at line ' + i + ' -- needs page file=\"path\"')\n output.pages[lineData.data.id] = lineData.data.file\n } else if (lineData.key === 'chars' || lineData.key === 'kernings') {\n //... do nothing for these two ...\n } else if (lineData.key === 'char') {\n output.chars.push(lineData.data)\n } else if (lineData.key === 'kerning') {\n output.kernings.push(lineData.data)\n } else {\n output[lineData.key] = lineData.data\n }\n }\n\n return output\n}\n\nfunction splitLine(line, idx) {\n line = line.replace(/\\t+/g, ' ').trim()\n if (!line)\n return null\n\n var space = line.indexOf(' ')\n if (space === -1) \n throw new Error(\"no named row at line \" + idx)\n\n var key = line.substring(0, space)\n\n line = line.substring(space + 1)\n //clear \"letter\" field as it is non-standard and\n //requires additional complexity to parse \" / = symbols\n line = line.replace(/letter=[\\'\\\"]\\S+[\\'\\\"]/gi, '') \n line = line.split(\"=\")\n line = line.map(function(str) {\n return str.trim().match((/(\".*?\"|[^\"\\s]+)+(?=\\s*|\\s*$)/g))\n })\n\n var data = []\n for (var i = 0; i < line.length; i++) {\n var dt = line[i]\n if (i === 0) {\n data.push({\n key: dt[0],\n data: \"\"\n })\n } else if (i === line.length - 1) {\n data[data.length - 1].data = parseData(dt[0])\n } else {\n data[data.length - 1].data = parseData(dt[0])\n data.push({\n key: dt[1],\n data: \"\"\n })\n }\n }\n\n var out = {\n key: key,\n data: {}\n }\n\n data.forEach(function(v) {\n out.data[v.key] = v.data;\n })\n\n return out\n}\n\nfunction parseData(data) {\n if (!data || data.length === 0)\n return \"\"\n\n if (data.indexOf('\"') === 0 || data.indexOf(\"'\") === 0)\n return data.substring(1, data.length - 1)\n if (data.indexOf(',') !== -1)\n return parseIntList(data)\n return parseInt(data, 10)\n}\n\nfunction parseIntList(data) {\n return data.split(',').map(function(val) {\n return parseInt(val, 10)\n })\n}\n},{}],44:[function(_dereq_,module,exports){\nvar HEADER = [66, 77, 70]\n\nmodule.exports = function readBMFontBinary(buf) {\n if (buf.length < 6)\n throw new Error('invalid buffer length for BMFont')\n\n var header = HEADER.every(function(byte, i) {\n return buf.readUInt8(i) === byte\n })\n\n if (!header)\n throw new Error('BMFont missing BMF byte header')\n\n var i = 3\n var vers = buf.readUInt8(i++)\n if (vers > 3)\n throw new Error('Only supports BMFont Binary v3 (BMFont App v1.10)')\n \n var target = { kernings: [], chars: [] }\n for (var b=0; b<5; b++)\n i += readBlock(target, buf, i)\n return target\n}\n\nfunction readBlock(target, buf, i) {\n if (i > buf.length-1)\n return 0\n\n var blockID = buf.readUInt8(i++)\n var blockSize = buf.readInt32LE(i)\n i += 4\n\n switch(blockID) {\n case 1: \n target.info = readInfo(buf, i)\n break\n case 2:\n target.common = readCommon(buf, i)\n break\n case 3:\n target.pages = readPages(buf, i, blockSize)\n break\n case 4:\n target.chars = readChars(buf, i, blockSize)\n break\n case 5:\n target.kernings = readKernings(buf, i, blockSize)\n break\n }\n return 5 + blockSize\n}\n\nfunction readInfo(buf, i) {\n var info = {}\n info.size = buf.readInt16LE(i)\n\n var bitField = buf.readUInt8(i+2)\n info.smooth = (bitField >> 7) & 1\n info.unicode = (bitField >> 6) & 1\n info.italic = (bitField >> 5) & 1\n info.bold = (bitField >> 4) & 1\n \n //fixedHeight is only mentioned in binary spec \n if ((bitField >> 3) & 1)\n info.fixedHeight = 1\n \n info.charset = buf.readUInt8(i+3) || ''\n info.stretchH = buf.readUInt16LE(i+4)\n info.aa = buf.readUInt8(i+6)\n info.padding = [\n buf.readInt8(i+7),\n buf.readInt8(i+8),\n buf.readInt8(i+9),\n buf.readInt8(i+10)\n ]\n info.spacing = [\n buf.readInt8(i+11),\n buf.readInt8(i+12)\n ]\n info.outline = buf.readUInt8(i+13)\n info.face = readStringNT(buf, i+14)\n return info\n}\n\nfunction readCommon(buf, i) {\n var common = {}\n common.lineHeight = buf.readUInt16LE(i)\n common.base = buf.readUInt16LE(i+2)\n common.scaleW = buf.readUInt16LE(i+4)\n common.scaleH = buf.readUInt16LE(i+6)\n common.pages = buf.readUInt16LE(i+8)\n var bitField = buf.readUInt8(i+10)\n common.packed = 0\n common.alphaChnl = buf.readUInt8(i+11)\n common.redChnl = buf.readUInt8(i+12)\n common.greenChnl = buf.readUInt8(i+13)\n common.blueChnl = buf.readUInt8(i+14)\n return common\n}\n\nfunction readPages(buf, i, size) {\n var pages = []\n var text = readNameNT(buf, i)\n var len = text.length+1\n var count = size / len\n for (var c=0; c<count; c++) {\n pages[c] = buf.slice(i, i+text.length).toString('utf8')\n i += len\n }\n return pages\n}\n\nfunction readChars(buf, i, blockSize) {\n var chars = []\n\n var count = blockSize / 20\n for (var c=0; c<count; c++) {\n var char = {}\n var off = c*20\n char.id = buf.readUInt32LE(i + 0 + off)\n char.x = buf.readUInt16LE(i + 4 + off)\n char.y = buf.readUInt16LE(i + 6 + off)\n char.width = buf.readUInt16LE(i + 8 + off)\n char.height = buf.readUInt16LE(i + 10 + off)\n char.xoffset = buf.readInt16LE(i + 12 + off)\n char.yoffset = buf.readInt16LE(i + 14 + off)\n char.xadvance = buf.readInt16LE(i + 16 + off)\n char.page = buf.readUInt8(i + 18 + off)\n char.chnl = buf.readUInt8(i + 19 + off)\n chars[c] = char\n }\n return chars\n}\n\nfunction readKernings(buf, i, blockSize) {\n var kernings = []\n var count = blockSize / 10\n for (var c=0; c<count; c++) {\n var kern = {}\n var off = c*10\n kern.first = buf.readUInt32LE(i + 0 + off)\n kern.second = buf.readUInt32LE(i + 4 + off)\n kern.amount = buf.readInt16LE(i + 8 + off)\n kernings[c] = kern\n }\n return kernings\n}\n\nfunction readNameNT(buf, offset) {\n var pos=offset\n for (; pos<buf.length; pos++) {\n if (buf[pos] === 0x00) \n break\n }\n return buf.slice(offset, pos)\n}\n\nfunction readStringNT(buf, offset) {\n return readNameNT(buf, offset).toString('utf8')\n}\n},{}],45:[function(_dereq_,module,exports){\nvar parseAttributes = _dereq_('./parse-attribs')\nvar parseFromString = _dereq_('xml-parse-from-string')\n\n//In some cases element.attribute.nodeName can return\n//all lowercase values.. so we need to map them to the correct \n//case\nvar NAME_MAP = {\n scaleh: 'scaleH',\n scalew: 'scaleW',\n stretchh: 'stretchH',\n lineheight: 'lineHeight',\n alphachnl: 'alphaChnl',\n redchnl: 'redChnl',\n greenchnl: 'greenChnl',\n bluechnl: 'blueChnl'\n}\n\nmodule.exports = function parse(data) {\n data = data.toString()\n \n var xmlRoot = parseFromString(data)\n var output = {\n pages: [],\n chars: [],\n kernings: []\n }\n\n //get config settings\n ;['info', 'common'].forEach(function(key) {\n var element = xmlRoot.getElementsByTagName(key)[0]\n if (element)\n output[key] = parseAttributes(getAttribs(element))\n })\n\n //get page info\n var pageRoot = xmlRoot.getElementsByTagName('pages')[0]\n if (!pageRoot)\n throw new Error('malformed file -- no <pages> element')\n var pages = pageRoot.getElementsByTagName('page')\n for (var i=0; i<pages.length; i++) {\n var p = pages[i]\n var id = parseInt(p.getAttribute('id'), 10)\n var file = p.getAttribute('file')\n if (isNaN(id))\n throw new Error('malformed file -- page \"id\" attribute is NaN')\n if (!file)\n throw new Error('malformed file -- needs page \"file\" attribute')\n output.pages[parseInt(id, 10)] = file\n }\n\n //get kernings / chars\n ;['chars', 'kernings'].forEach(function(key) {\n var element = xmlRoot.getElementsByTagName(key)[0]\n if (!element)\n return\n var childTag = key.substring(0, key.length-1)\n var children = element.getElementsByTagName(childTag)\n for (var i=0; i<children.length; i++) { \n var child = children[i]\n output[key].push(parseAttributes(getAttribs(child)))\n }\n })\n return output\n}\n\nfunction getAttribs(element) {\n var attribs = getAttribList(element)\n return attribs.reduce(function(dict, attrib) {\n var key = mapName(attrib.nodeName)\n dict[key] = attrib.nodeValue\n return dict\n }, {})\n}\n\nfunction getAttribList(element) {\n //IE8+ and modern browsers\n var attribs = []\n for (var i=0; i<element.attributes.length; i++)\n attribs.push(element.attributes[i])\n return attribs\n}\n\nfunction mapName(nodeName) {\n return NAME_MAP[nodeName.toLowerCase()] || nodeName\n}\n},{\"./parse-attribs\":46,\"xml-parse-from-string\":71}],46:[function(_dereq_,module,exports){\n//Some versions of GlyphDesigner have a typo\n//that causes some bugs with parsing. \n//Need to confirm with recent version of the software\n//to see whether this is still an issue or not.\nvar GLYPH_DESIGNER_ERROR = 'chasrset'\n\nmodule.exports = function parseAttributes(obj) {\n if (GLYPH_DESIGNER_ERROR in obj) {\n obj['charset'] = obj[GLYPH_DESIGNER_ERROR]\n delete obj[GLYPH_DESIGNER_ERROR]\n }\n\n for (var k in obj) {\n if (k === 'face' || k === 'charset') \n continue\n else if (k === 'padding' || k === 'spacing')\n obj[k] = parseIntList(obj[k])\n else\n obj[k] = parseInt(obj[k], 10) \n }\n return obj\n}\n\nfunction parseIntList(data) {\n return data.split(',').map(function(val) {\n return parseInt(val, 10)\n })\n}\n},{}],47:[function(_dereq_,module,exports){\nvar trim = _dereq_('string.prototype.trim')\n , forEach = _dereq_('for-each')\n , isArray = function(arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n }\n\nmodule.exports = function (headers) {\n if (!headers)\n return {}\n\n var result = {}\n\n forEach(\n trim(headers).split('\\n')\n , function (row) {\n var index = row.indexOf(':')\n , key = trim(row.slice(0, index)).toLowerCase()\n , value = trim(row.slice(index + 1))\n\n if (typeof(result[key]) === 'undefined') {\n result[key] = value\n } else if (isArray(result[key])) {\n result[key].push(value)\n } else {\n result[key] = [ result[key], value ]\n }\n }\n )\n\n return result\n}\n\n},{\"for-each\":24,\"string.prototype.trim\":53}],48:[function(_dereq_,module,exports){\n(function (global){\nvar performance = global.performance || {};\n\nvar present = (function () {\n var names = ['now', 'webkitNow', 'msNow', 'mozNow', 'oNow'];\n while (names.length) {\n var name = names.shift();\n if (name in performance) {\n return performance[name].bind(performance);\n }\n }\n\n var dateNow = Date.now || function () { return new Date().getTime(); };\n var navigationStart = (performance.timing || {}).navigationStart || dateNow();\n return function () {\n return dateNow() - navigationStart;\n };\n}());\n\npresent.performanceNow = performance.now;\npresent.noConflict = function () {\n performance.now = present.performanceNow;\n};\npresent.conflict = function () {\n performance.now = present;\n};\npresent.conflict();\n\nmodule.exports = present;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],49:[function(_dereq_,module,exports){\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],50:[function(_dereq_,module,exports){\n(function (setImmediate){\n(function(root) {\n\n\t// Store setTimeout reference so promise-polyfill will be unaffected by\n\t// other code modifying setTimeout (like sinon.useFakeTimers())\n\tvar setTimeoutFunc = setTimeout;\n\n\t// Use polyfill for setImmediate for performance gains\n\tvar asap = (typeof setImmediate === 'function' && setImmediate) ||\n\t\tfunction(fn) { setTimeoutFunc(fn, 1); };\n\n\t// Polyfill for Function.prototype.bind\n\tfunction bind(fn, thisArg) {\n\t\treturn function() {\n\t\t\tfn.apply(thisArg, arguments);\n\t\t}\n\t}\n\n\tvar isArray = Array.isArray || function(value) { return Object.prototype.toString.call(value) === \"[object Array]\" };\n\n\tfunction Promise(fn) {\n\t\tif (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n\t\tif (typeof fn !== 'function') throw new TypeError('not a function');\n\t\tthis._state = null;\n\t\tthis._value = null;\n\t\tthis._deferreds = []\n\n\t\tdoResolve(fn, bind(resolve, this), bind(reject, this))\n\t}\n\n\tfunction handle(deferred) {\n\t\tvar me = this;\n\t\tif (this._state === null) {\n\t\t\tthis._deferreds.push(deferred);\n\t\t\treturn\n\t\t}\n\t\tasap(function() {\n\t\t\tvar cb = me._state ? deferred.onFulfilled : deferred.onRejected\n\t\t\tif (cb === null) {\n\t\t\t\t(me._state ? deferred.resolve : deferred.reject)(me._value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar ret;\n\t\t\ttry {\n\t\t\t\tret = cb(me._value);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdeferred.resolve(ret);\n\t\t})\n\t}\n\n\tfunction resolve(newValue) {\n\t\ttry { //Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n\t\t\tif (newValue === this) throw new TypeError('A promise cannot be resolved with itself.');\n\t\t\tif (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n\t\t\t\tvar then = newValue.then;\n\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\tdoResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._state = true;\n\t\t\tthis._value = newValue;\n\t\t\tfinale.call(this);\n\t\t} catch (e) { reject.call(this, e); }\n\t}\n\n\tfunction reject(newValue) {\n\t\tthis._state = false;\n\t\tthis._value = newValue;\n\t\tfinale.call(this);\n\t}\n\n\tfunction finale() {\n\t\tfor (var i = 0, len = this._deferreds.length; i < len; i++) {\n\t\t\thandle.call(this, this._deferreds[i]);\n\t\t}\n\t\tthis._deferreds = null;\n\t}\n\n\tfunction Handler(onFulfilled, onRejected, resolve, reject){\n\t\tthis.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n\t\tthis.onRejected = typeof onRejected === 'function' ? onRejected : null;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t}\n\n\t/**\n\t * Take a potentially misbehaving resolver function and make sure\n\t * onFulfilled and onRejected are only called once.\n\t *\n\t * Makes no guarantees about asynchrony.\n\t */\n\tfunction doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}\n\n\tPromise.prototype['catch'] = function (onRejected) {\n\t\treturn this.then(null, onRejected);\n\t};\n\n\tPromise.prototype.then = function(onFulfilled, onRejected) {\n\t\tvar me = this;\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\thandle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));\n\t\t})\n\t};\n\n\tPromise.all = function () {\n\t\tvar args = Array.prototype.slice.call(arguments.length === 1 && isArray(arguments[0]) ? arguments[0] : arguments);\n\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tif (args.length === 0) return resolve([]);\n\t\t\tvar remaining = args.length;\n\t\t\tfunction res(i, val) {\n\t\t\t\ttry {\n\t\t\t\t\tif (val && (typeof val === 'object' || typeof val === 'function')) {\n\t\t\t\t\t\tvar then = val.then;\n\t\t\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\t\t\tthen.call(val, function (val) { res(i, val) }, reject);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\targs[i] = val;\n\t\t\t\t\tif (--remaining === 0) {\n\t\t\t\t\t\tresolve(args);\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\treject(ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t\tres(i, args[i]);\n\t\t\t}\n\t\t});\n\t};\n\n\tPromise.resolve = function (value) {\n\t\tif (value && typeof value === 'object' && value.constructor === Promise) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Promise(function (resolve) {\n\t\t\tresolve(value);\n\t\t});\n\t};\n\n\tPromise.reject = function (value) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\treject(value);\n\t\t});\n\t};\n\n\tPromise.race = function (values) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tfor(var i = 0, len = values.length; i < len; i++) {\n\t\t\t\tvalues[i].then(resolve, reject);\n\t\t\t}\n\t\t});\n\t};\n\n\t/**\n\t * Set the immediate function to execute callbacks\n\t * @param fn {function} Function to execute\n\t * @private\n\t */\n\tPromise._setImmediateFn = function _setImmediateFn(fn) {\n\t\tasap = fn;\n\t};\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = Promise;\n\t} else if (!root.Promise) {\n\t\troot.Promise = Promise;\n\t}\n\n})(this);\n\n}).call(this,_dereq_(\"timers\").setImmediate)\n\n},{\"timers\":67}],51:[function(_dereq_,module,exports){\nvar dtype = _dereq_('dtype')\nvar anArray = _dereq_('an-array')\nvar isBuffer = _dereq_('is-buffer')\n\nvar CW = [0, 2, 3]\nvar CCW = [2, 1, 3]\n\nmodule.exports = function createQuadElements(array, opt) {\n //if user didn't specify an output array\n if (!array || !(anArray(array) || isBuffer(array))) {\n opt = array || {}\n array = null\n }\n\n if (typeof opt === 'number') //backwards-compatible\n opt = { count: opt }\n else\n opt = opt || {}\n\n var type = typeof opt.type === 'string' ? opt.type : 'uint16'\n var count = typeof opt.count === 'number' ? opt.count : 1\n var start = (opt.start || 0) \n\n var dir = opt.clockwise !== false ? CW : CCW,\n a = dir[0], \n b = dir[1],\n c = dir[2]\n\n var numIndices = count * 6\n\n var indices = array || new (dtype(type))(numIndices)\n for (var i = 0, j = 0; i < numIndices; i += 6, j += 4) {\n var x = i + start\n indices[x + 0] = j + 0\n indices[x + 1] = j + 1\n indices[x + 2] = j + 2\n indices[x + 3] = j + a\n indices[x + 4] = j + b\n indices[x + 5] = j + c\n }\n return indices\n}\n},{\"an-array\":1,\"dtype\":13,\"is-buffer\":31}],52:[function(_dereq_,module,exports){\n'use strict';\n\nvar bind = _dereq_('function-bind');\nvar ES = _dereq_('es-abstract/es5');\nvar replace = bind.call(Function.call, String.prototype.replace);\n\n/* eslint-disable no-control-regex */\nvar leftWhitespace = /^[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+/;\nvar rightWhitespace = /[\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF]+$/;\n/* eslint-enable no-control-regex */\n\nmodule.exports = function trim() {\n\tvar S = ES.ToString(ES.CheckObjectCoercible(this));\n\treturn replace(replace(S, leftWhitespace, ''), rightWhitespace, '');\n};\n\n},{\"es-abstract/es5\":15,\"function-bind\":26}],53:[function(_dereq_,module,exports){\n'use strict';\n\nvar bind = _dereq_('function-bind');\nvar define = _dereq_('define-properties');\n\nvar implementation = _dereq_('./implementation');\nvar getPolyfill = _dereq_('./polyfill');\nvar shim = _dereq_('./shim');\n\nvar boundTrim = bind.call(Function.call, getPolyfill());\n\ndefine(boundTrim, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = boundTrim;\n\n},{\"./implementation\":52,\"./polyfill\":54,\"./shim\":55,\"define-properties\":11,\"function-bind\":26}],54:[function(_dereq_,module,exports){\n'use strict';\n\nvar implementation = _dereq_('./implementation');\n\nvar zeroWidthSpace = '\\u200b';\n\nmodule.exports = function getPolyfill() {\n\tif (String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace) {\n\t\treturn String.prototype.trim;\n\t}\n\treturn implementation;\n};\n\n},{\"./implementation\":52}],55:[function(_dereq_,module,exports){\n'use strict';\n\nvar define = _dereq_('define-properties');\nvar getPolyfill = _dereq_('./polyfill');\n\nmodule.exports = function shimStringTrim() {\n\tvar polyfill = getPolyfill();\n\tdefine(String.prototype, { trim: polyfill }, {\n\t\ttrim: function testTrim() {\n\t\t\treturn String.prototype.trim !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n\n},{\"./polyfill\":54,\"define-properties\":11}],56:[function(_dereq_,module,exports){\n/*\n * anime.js v3.0.0\n * (c) 2019 Julian Garnier\n * Released under the MIT license\n * animejs.com\n */\n\n'use strict';\n\n// Defaults\n\nvar defaultInstanceSettings = {\n update: null,\n begin: null,\n loopBegin: null,\n changeBegin: null,\n change: null,\n changeComplete: null,\n loopComplete: null,\n complete: null,\n loop: 1,\n direction: 'normal',\n autoplay: true,\n timelineOffset: 0\n};\n\nvar defaultTweenSettings = {\n duration: 1000,\n delay: 0,\n endDelay: 0,\n easing: 'easeOutElastic(1, .5)',\n round: 0\n};\n\nvar validTransforms = ['translateX', 'translateY', 'translateZ', 'rotate', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'perspective'];\n\n// Caching\n\nvar cache = {\n CSS: {},\n springs: {}\n};\n\n// Utils\n\nfunction minMax(val, min, max) {\n return Math.min(Math.max(val, min), max);\n}\n\nfunction stringContains(str, text) {\n return str.indexOf(text) > -1;\n}\n\nfunction applyArguments(func, args) {\n return func.apply(null, args);\n}\n\nvar hexRegex = /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i;\nvar rgbPrefixRegex = /^rgb/;\nvar hslRegex = /^hsl/;\n\nvar is = {\n arr: function (a) { return Array.isArray(a); },\n obj: function (a) { return stringContains(Object.prototype.toString.call(a), 'Object'); },\n pth: function (a) { return is.obj(a) && a.hasOwnProperty('totalLength'); },\n svg: function (a) { return a instanceof SVGElement; },\n inp: function (a) { return a instanceof HTMLInputElement; },\n dom: function (a) { return a.nodeType || is.svg(a); },\n str: function (a) { return typeof a === 'string'; },\n fnc: function (a) { return typeof a === 'function'; },\n und: function (a) { return typeof a === 'undefined'; },\n hex: function (a) { return hexRegex.test(a); },\n rgb: function (a) { return rgbPrefixRegex.test(a); },\n hsl: function (a) { return hslRegex.test(a); },\n col: function (a) { return (is.hex(a) || is.rgb(a) || is.hsl(a)); },\n key: function (a) { return !defaultInstanceSettings.hasOwnProperty(a) && !defaultTweenSettings.hasOwnProperty(a) && a !== 'targets' && a !== 'keyframes'; }\n};\n\n// Easings\n\nvar easingFunctionRegex = /\\(([^)]+)\\)/;\n\nfunction parseEasingParameters(string) {\n var match = easingFunctionRegex.exec(string);\n return match ? match[1].split(',').map(function (p) { return parseFloat(p); }) : [];\n}\n\n// Spring solver inspired by Webkit Copyright © 2016 Apple Inc. All rights reserved. https://webkit.org/demos/spring/spring.js\n\nfunction spring(string, duration) {\n\n var params = parseEasingParameters(string);\n var mass = minMax(is.und(params[0]) ? 1 : params[0], .1, 100);\n var stiffness = minMax(is.und(params[1]) ? 100 : params[1], .1, 100);\n var damping = minMax(is.und(params[2]) ? 10 : params[2], .1, 100);\n var velocity = minMax(is.und(params[3]) ? 0 : params[3], .1, 100);\n var w0 = Math.sqrt(stiffness / mass);\n var zeta = damping / (2 * Math.sqrt(stiffness * mass));\n var wd = zeta < 1 ? w0 * Math.sqrt(1 - zeta * zeta) : 0;\n var a = 1;\n var b = zeta < 1 ? (zeta * w0 + -velocity) / wd : -velocity + w0;\n\n function solver(t) {\n var progress = duration ? (duration * t) / 1000 : t;\n if (zeta < 1) {\n progress = Math.exp(-progress * zeta * w0) * (a * Math.cos(wd * progress) + b * Math.sin(wd * progress));\n } else {\n progress = (a + b * progress) * Math.exp(-progress * w0);\n }\n if (t === 0 || t === 1) { return t; }\n return 1 - progress;\n }\n\n function getDuration() {\n var cached = cache.springs[string];\n if (cached) { return cached; }\n var frame = 1/6;\n var elapsed = 0;\n var rest = 0;\n while(true) {\n elapsed += frame;\n if (solver(elapsed) === 1) {\n rest++;\n if (rest >= 16) { break; }\n } else {\n rest = 0;\n }\n }\n var duration = elapsed * frame * 1000;\n cache.springs[string] = duration;\n return duration;\n }\n\n return duration ? solver : getDuration;\n\n}\n\n// Elastic easing adapted from jQueryUI http://api.jqueryui.com/easings/\n\nfunction elastic(amplitude, period) {\n if ( amplitude === void 0 ) amplitude = 1;\n if ( period === void 0 ) period = .5;\n\n var a = minMax(amplitude, 1, 10);\n var p = minMax(period, .1, 2);\n return function (t) {\n return (t === 0 || t === 1) ? t :\n -a * Math.pow(2, 10 * (t - 1)) * Math.sin((((t - 1) - (p / (Math.PI * 2) * Math.asin(1 / a))) * (Math.PI * 2)) / p);\n }\n}\n\n// Basic steps easing implementation https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function\n\nfunction steps(steps) {\n if ( steps === void 0 ) steps = 10;\n\n return function (t) { return Math.round(t * steps) * (1 / steps); };\n}\n\n// BezierEasing https://github.com/gre/bezier-easing\n\nvar bezier = (function () {\n\n var kSplineTableSize = 11;\n var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\n function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1 }\n function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1 }\n function C(aA1) { return 3.0 * aA1 }\n\n function calcBezier(aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT }\n function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1) }\n\n function binarySubdivide(aX, aA, aB, mX1, mX2) {\n var currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0.0) { aB = currentT; } else { aA = currentT; }\n } while (Math.abs(currentX) > 0.0000001 && ++i < 10);\n return currentT;\n }\n\n function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for (var i = 0; i < 4; ++i) {\n var currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0.0) { return aGuessT; }\n var currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n }\n\n function bezier(mX1, mY1, mX2, mY2) {\n\n if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) { return; }\n var sampleValues = new Float32Array(kSplineTableSize);\n\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (var i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n\n function getTForX(aX) {\n\n var intervalStart = 0;\n var currentSample = 1;\n var lastSample = kSplineTableSize - 1;\n\n for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n\n --currentSample;\n\n var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n var guessForT = intervalStart + dist * kSampleStepSize;\n var initialSlope = getSlope(guessForT, mX1, mX2);\n\n if (initialSlope >= 0.001) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if (initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n\n }\n\n return function (x) {\n if (mX1 === mY1 && mX2 === mY2) { return x; }\n if (x === 0 || x === 1) { return x; }\n return calcBezier(getTForX(x), mY1, mY2);\n }\n\n }\n\n return bezier;\n\n})();\n\nvar penner = (function () {\n\n var names = ['Quad', 'Cubic', 'Quart', 'Quint', 'Sine', 'Expo', 'Circ', 'Back', 'Elastic'];\n\n // Approximated Penner equations http://matthewlein.com/ceaser/\n\n var curves = {\n In: [\n [0.550, 0.085, 0.680, 0.530], /* inQuad */\n [0.550, 0.055, 0.675, 0.190], /* inCubic */\n [0.895, 0.030, 0.685, 0.220], /* inQuart */\n [0.755, 0.050, 0.855, 0.060], /* inQuint */\n [0.470, 0.000, 0.745, 0.715], /* inSine */\n [0.950, 0.050, 0.795, 0.035], /* inExpo */\n [0.600, 0.040, 0.980, 0.335], /* inCirc */\n [0.600,-0.280, 0.735, 0.045], /* inBack */\n elastic /* inElastic */\n ],\n Out: [\n [0.250, 0.460, 0.450, 0.940], /* outQuad */\n [0.215, 0.610, 0.355, 1.000], /* outCubic */\n [0.165, 0.840, 0.440, 1.000], /* outQuart */\n [0.230, 1.000, 0.320, 1.000], /* outQuint */\n [0.390, 0.575, 0.565, 1.000], /* outSine */\n [0.190, 1.000, 0.220, 1.000], /* outExpo */\n [0.075, 0.820, 0.165, 1.000], /* outCirc */\n [0.175, 0.885, 0.320, 1.275], /* outBack */\n function (a, p) { return function (t) { return 1 - elastic(a, p)(1 - t); }; } /* outElastic */\n ],\n InOut: [\n [0.455, 0.030, 0.515, 0.955], /* inOutQuad */\n [0.645, 0.045, 0.355, 1.000], /* inOutCubic */\n [0.770, 0.000, 0.175, 1.000], /* inOutQuart */\n [0.860, 0.000, 0.070, 1.000], /* inOutQuint */\n [0.445, 0.050, 0.550, 0.950], /* inOutSine */\n [1.000, 0.000, 0.000, 1.000], /* inOutExpo */\n [0.785, 0.135, 0.150, 0.860], /* inOutCirc */\n [0.680,-0.550, 0.265, 1.550], /* inOutBack */\n function (a, p) { return function (t) { return t < .5 ? elastic(a, p)(t * 2) / 2 : 1 - elastic(a, p)(t * -2 + 2) / 2; }; } /* inOutElastic */\n ]\n };\n\n var eases = {\n linear: [0.250, 0.250, 0.750, 0.750]\n };\n\n for (var coords in curves) {\n for (var i = 0, len = curves[coords].length; i < len; i++) {\n eases['ease'+coords+names[i]] = curves[coords][i];\n }\n }\n\n return eases;\n\n})();\n\nfunction parseEasings(easing, duration) {\n if (is.fnc(easing)) { return easing; }\n var name = easing.split('(')[0];\n var ease = penner[name];\n var args = parseEasingParameters(easing);\n switch (name) {\n case 'spring' : return spring(easing, duration);\n case 'cubicBezier' : return applyArguments(bezier, args);\n case 'steps' : return applyArguments(steps, args);\n default : return is.fnc(ease) ? applyArguments(ease, args) : applyArguments(bezier, ease);\n }\n}\n\n// Strings\n\nfunction selectString(str) {\n try {\n var nodes = document.querySelectorAll(str);\n return nodes;\n } catch(e) {\n return;\n }\n}\n\n// Arrays\n\nvar auxArrayFilter = [];\n\nfunction filterArray(arr, callback) {\n var result = auxArrayFilter;\n\n var len = arr.length;\n var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n for (var i = 0; i < len; i++) {\n if (i in arr) {\n var val = arr[i];\n if (callback.call(thisArg, val, i, arr)) {\n result.push(val);\n }\n }\n }\n\n // arr turns into the auxArray and we return the previously aux array.\n auxArrayFilter = arr;\n auxArrayFilter.length = 0;\n return result;\n}\n\nfunction flattenArray (arr, result) {\n if (!result) { result = []; }\n for (var i = 0, length = arr.length; i < length; i++) {\n var value = arr[i];\n if (Array.isArray(value)) {\n flattenArray(value, result);\n } else {\n result.push(value);\n }\n }\n return result;\n}\n\nfunction toArray(o) {\n if (is.arr(o)) { return o; }\n if (is.str(o)) { o = selectString(o) || o; }\n if (o instanceof NodeList || o instanceof HTMLCollection) { return [].slice.call(o); }\n return [o];\n}\n\nfunction arrayContains(arr, val) {\n return arr.some(function (a) { return a === val; });\n}\n\n// Objects\n\nfunction cloneObject(o) {\n var clone = {};\n for (var p in o) { clone[p] = o[p]; }\n return clone;\n}\n\nfunction replaceObjectProps(o1, o2) {\n var o = cloneObject(o1);\n for (var p in o1) { o[p] = o2.hasOwnProperty(p) ? o2[p] : o1[p]; }\n return o;\n}\n\nfunction mergeObjects(o1, o2) {\n var o = cloneObject(o1);\n for (var p in o2) { o[p] = is.und(o1[p]) ? o2[p] : o1[p]; }\n return o;\n}\n\n// Colors\n\nvar rgbRegex = /rgb\\((\\d+,\\s*[\\d]+,\\s*[\\d]+)\\)/g;\n\nfunction rgbToRgba(rgbValue) {\n var rgb = rgbRegex.exec(rgbValue);\n return rgb ? (\"rgba(\" + (rgb[1]) + \",1)\") : rgbValue;\n}\n\nvar hexToRgbaHexRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nvar hexToRgbaRgbRegex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n\nfunction hexToRgba(hexValue) {\n var hex = hexValue.replace(hexToRgbaHexRegex, function (m, r, g, b) { return r + r + g + g + b + b; } );\n var rgb = hexToRgbaRgbRegex.exec(hex);\n var r = parseInt(rgb[1], 16);\n var g = parseInt(rgb[2], 16);\n var b = parseInt(rgb[3], 16);\n return (\"rgba(\" + r + \",\" + g + \",\" + b + \",1)\");\n}\n\nvar hslToRgbaHsl1Regex = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g;\nvar hslToRgbaHsl2Regex = /hsla\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%,\\s*([\\d.]+)\\)/g;\n\nfunction hslToRgba(hslValue) {\n var hsl = hslToRgbaHsl1Regex.exec(hslValue) || hslToRgbaHsl2Regex.exec(hslValue);\n var h = parseInt(hsl[1], 10) / 360;\n var s = parseInt(hsl[2], 10) / 100;\n var l = parseInt(hsl[3], 10) / 100;\n var a = hsl[4] || 1;\n function hue2rgb(p, q, t) {\n if (t < 0) { t += 1; }\n if (t > 1) { t -= 1; }\n if (t < 1/6) { return p + (q - p) * 6 * t; }\n if (t < 1/2) { return q; }\n if (t < 2/3) { return p + (q - p) * (2/3 - t) * 6; }\n return p;\n }\n var r, g, b;\n if (s == 0) {\n r = g = b = l;\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n return (\"rgba(\" + (r * 255) + \",\" + (g * 255) + \",\" + (b * 255) + \",\" + a + \")\");\n}\n\nfunction colorToRgb(val) {\n if (is.rgb(val)) { return rgbToRgba(val); }\n if (is.hex(val)) { return hexToRgba(val); }\n if (is.hsl(val)) { return hslToRgba(val); }\n}\n\n// Units\n\nvar unitRegex = /([\\+\\-]?[0-9#\\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/;\n\nfunction getUnit(val) {\n var split = unitRegex.exec(val);\n if (split) { return split[2]; }\n}\n\nfunction getTransformUnit(propName) {\n if (stringContains(propName, 'translate') || propName === 'perspective') { return 'px'; }\n if (stringContains(propName, 'rotate') || stringContains(propName, 'skew')) { return 'deg'; }\n}\n\n// Values\n\nfunction getFunctionValue(val, animatable) {\n if (!is.fnc(val)) { return val; }\n return val(animatable.target, animatable.id, animatable.total);\n}\n\nfunction getAttribute(el, prop) {\n return el.getAttribute(prop);\n}\n\nfunction convertPxToUnit(el, value, unit) {\n var valueUnit = getUnit(value);\n if (arrayContains([unit, 'deg', 'rad', 'turn'], valueUnit)) { return value; }\n var cached = cache.CSS[value + unit];\n if (!is.und(cached)) { return cached; }\n var baseline = 100;\n var tempEl = document.createElement(el.tagName);\n var parentEl = (el.parentNode && (el.parentNode !== document)) ? el.parentNode : document.body;\n parentEl.appendChild(tempEl);\n tempEl.style.position = 'absolute';\n tempEl.style.width = baseline + unit;\n var factor = baseline / tempEl.offsetWidth;\n parentEl.removeChild(tempEl);\n var convertedUnit = factor * parseFloat(value);\n cache.CSS[value + unit] = convertedUnit;\n return convertedUnit;\n}\n\nfunction getCSSValue(el, prop, unit) {\n if (prop in el.style) {\n var uppercasePropName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n var value = el.style[prop] || getComputedStyle(el).getPropertyValue(uppercasePropName) || '0';\n return unit ? convertPxToUnit(el, value, unit) : value;\n }\n}\n\nfunction getAnimationType(el, prop) {\n if (is.dom(el) && !is.inp(el) && (getAttribute(el, prop) || (is.svg(el) && el[prop]))) { return 'attribute'; }\n if (is.dom(el) && arrayContains(validTransforms, prop)) { return 'transform'; }\n if (is.dom(el) && (prop !== 'transform' && getCSSValue(el, prop))) { return 'css'; }\n if (el[prop] != null) { return 'object'; }\n}\n\nvar transformRegex = /(\\w+)\\(([^)]*)\\)/g;\n\nfunction getElementTransforms(el) {\n if (!is.dom(el)) { return; }\n var str = el.style.transform || '';\n var transforms = new Map();\n var m; while (m = transformRegex.exec(str)) { transforms.set(m[1], m[2]); }\n return transforms;\n}\n\nfunction getTransformValue(el, propName, animatable, unit) {\n var defaultVal = stringContains(propName, 'scale') ? 1 : 0 + getTransformUnit(propName);\n var value = getElementTransforms(el).get(propName) || defaultVal;\n if (animatable) {\n animatable.transforms.list.set(propName, value);\n animatable.transforms['last'] = propName;\n }\n return unit ? convertPxToUnit(el, value, unit) : value;\n}\n\nfunction getOriginalTargetValue(target, propName, unit, animatable) {\n switch (getAnimationType(target, propName)) {\n case 'transform': return getTransformValue(target, propName, animatable, unit);\n case 'css': return getCSSValue(target, propName, unit);\n case 'attribute': return getAttribute(target, propName);\n default: return target[propName] || 0;\n }\n}\n\nvar operatorRegex = /^(\\*=|\\+=|-=)/;\n\nfunction getRelativeValue(to, from) {\n var operator = operatorRegex.exec(to);\n if (!operator) { return to; }\n var u = getUnit(to) || 0;\n var x = parseFloat(from);\n var y = parseFloat(to.replace(operator[0], ''));\n switch (operator[0][0]) {\n case '+': return x + y + u;\n case '-': return x - y + u;\n case '*': return x * y + u;\n }\n}\n\nvar whitespaceRegex = /\\s/g;\n\nfunction validateValue(val, unit) {\n if (is.col(val)) { return colorToRgb(val); }\n var originalUnit = getUnit(val);\n var unitLess = originalUnit ? val.substr(0, val.length - originalUnit.length) : val;\n return unit && !whitespaceRegex.test(val) ? unitLess + unit : unitLess;\n}\n\n// getTotalLength() equivalent for circle, rect, polyline, polygon and line shapes\n// adapted from https://gist.github.com/SebLambla/3e0550c496c236709744\n\nfunction getDistance(p1, p2) {\n return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n\nfunction getCircleLength(el) {\n return Math.PI * 2 * getAttribute(el, 'r');\n}\n\nfunction getRectLength(el) {\n return (getAttribute(el, 'width') * 2) + (getAttribute(el, 'height') * 2);\n}\n\nfunction getLineLength(el) {\n return getDistance(\n {x: getAttribute(el, 'x1'), y: getAttribute(el, 'y1')},\n {x: getAttribute(el, 'x2'), y: getAttribute(el, 'y2')}\n );\n}\n\nfunction getPolylineLength(el) {\n var points = el.points;\n var totalLength = 0;\n var previousPos;\n for (var i = 0 ; i < points.numberOfItems; i++) {\n var currentPos = points.getItem(i);\n if (i > 0) { totalLength += getDistance(previousPos, currentPos); }\n previousPos = currentPos;\n }\n return totalLength;\n}\n\nfunction getPolygonLength(el) {\n var points = el.points;\n return getPolylineLength(el) + getDistance(points.getItem(points.numberOfItems - 1), points.getItem(0));\n}\n\n// Path animation\n\nfunction getTotalLength(el) {\n if (el.getTotalLength) { return el.getTotalLength(); }\n switch(el.tagName.toLowerCase()) {\n case 'circle': return getCircleLength(el);\n case 'rect': return getRectLength(el);\n case 'line': return getLineLength(el);\n case 'polyline': return getPolylineLength(el);\n case 'polygon': return getPolygonLength(el);\n }\n}\n\nfunction setDashoffset(el) {\n var pathLength = getTotalLength(el);\n el.setAttribute('stroke-dasharray', pathLength);\n return pathLength;\n}\n\n// Motion path\n\nfunction getParentSvgEl(el) {\n var parentEl = el.parentNode;\n while (is.svg(parentEl)) {\n parentEl = parentEl.parentNode;\n if (!is.svg(parentEl.parentNode)) { break; }\n }\n return parentEl;\n}\n\nfunction getParentSvg(pathEl, svgData) {\n var svg = svgData || {};\n var parentSvgEl = svg.el || getParentSvgEl(pathEl);\n var rect = parentSvgEl.getBoundingClientRect();\n var viewBoxAttr = getAttribute(parentSvgEl, 'viewBox');\n var width = rect.width;\n var height = rect.height;\n var viewBox = svg.viewBox || (viewBoxAttr ? viewBoxAttr.split(' ') : [0, 0, width, height]);\n return {\n el: parentSvgEl,\n viewBox: viewBox,\n x: viewBox[0] / 1,\n y: viewBox[1] / 1,\n w: width / viewBox[2],\n h: height / viewBox[3]\n }\n}\n\nfunction getPath(path, percent) {\n var pathEl = is.str(path) ? selectString(path)[0] : path;\n var p = percent || 100;\n return function(property) {\n return {\n property: property,\n el: pathEl,\n svg: getParentSvg(pathEl),\n totalLength: getTotalLength(pathEl) * (p / 100)\n }\n }\n}\n\nfunction getPathProgress(path, progress) {\n function point(offset) {\n if ( offset === void 0 ) offset = 0;\n\n var l = progress + offset >= 1 ? progress + offset : 0;\n return path.el.getPointAtLength(l);\n }\n var svg = getParentSvg(path.el, path.svg);\n var p = point();\n var p0 = point(-1);\n var p1 = point(+1);\n switch (path.property) {\n case 'x': return (p.x - svg.x) * svg.w;\n case 'y': return (p.y - svg.y) * svg.h;\n case 'angle': return Math.atan2(p1.y - p0.y, p1.x - p0.x) * 180 / Math.PI;\n }\n}\n\n// Decompose value\n\nvar valueRegex = /-?\\d*\\.?\\d+/g;\n\nfunction decomposeValue(val, unit) {\n var value = validateValue((is.pth(val) ? val.totalLength : val), unit) + '';\n return {\n original: value,\n numbers: value.match(valueRegex) ? value.match(valueRegex).map(Number) : [0],\n strings: (is.str(val) || unit) ? value.split(valueRegex) : []\n }\n}\n\n// Animatables\n\nfunction parseTargets(targets) {\n var targetsArray = targets ? (flattenArray(is.arr(targets) ? targets.map(toArray) : toArray(targets))) : [];\n return filterArray(targetsArray, function (item, pos, self) { return self.indexOf(item) === pos; });\n}\n\nfunction getAnimatables(targets) {\n var parsed = parseTargets(targets);\n return parsed.map(function (t, i) {\n return {target: t, id: i, total: parsed.length, transforms: { list: getElementTransforms(t) } };\n });\n}\n\n// Properties\n\nvar springRegex = /^spring/;\n\nfunction normalizePropertyTweens(prop, tweenSettings) {\n var settings = cloneObject(tweenSettings);\n // Override duration if easing is a spring\n if (springRegex.test(settings.easing)) { settings.duration = spring(settings.easing); }\n if (is.arr(prop)) {\n var l = prop.length;\n var isFromTo = (l === 2 && !is.obj(prop[0]));\n if (!isFromTo) {\n // Duration divided by the number of tweens\n if (!is.fnc(tweenSettings.duration)) { settings.duration = tweenSettings.duration / l; }\n } else {\n // Transform [from, to] values shorthand to a valid tween value\n prop = {value: prop};\n }\n }\n var propArray = is.arr(prop) ? prop : [prop];\n return propArray.map(function (v, i) {\n var obj = (is.obj(v) && !is.pth(v)) ? v : {value: v};\n // Default delay value should only be applied to the first tween\n if (is.und(obj.delay)) { obj.delay = !i ? tweenSettings.delay : 0; }\n // Default endDelay value should only be applied to the last tween\n if (is.und(obj.endDelay)) { obj.endDelay = i === propArray.length - 1 ? tweenSettings.endDelay : 0; }\n return obj;\n }).map(function (k) { return mergeObjects(k, settings); });\n}\n\n\nfunction flattenKeyframes(keyframes) {\n var propertyNames = filterArray(flattenArray(keyframes.map(function (key) { return Object.keys(key); })), function (p) { return is.key(p); })\n .reduce(function (a,b) { if (a.indexOf(b) < 0) { a.push(b); } return a; }, []);\n var properties = {};\n var loop = function ( i ) {\n var propName = propertyNames[i];\n properties[propName] = keyframes.map(function (key) {\n var newKey = {};\n for (var p in key) {\n if (is.key(p)) {\n if (p == propName) { newKey.value = key[p]; }\n } else {\n newKey[p] = key[p];\n }\n }\n return newKey;\n });\n };\n\n for (var i = 0; i < propertyNames.length; i++) loop( i );\n return properties;\n}\n\nfunction getProperties(tweenSettings, params) {\n var properties = [];\n var keyframes = params.keyframes;\n if (keyframes) { params = mergeObjects(flattenKeyframes(keyframes), params); }\n for (var p in params) {\n if (is.key(p)) {\n properties.push({\n name: p,\n tweens: normalizePropertyTweens(params[p], tweenSettings)\n });\n }\n }\n return properties;\n}\n\n// Tweens\n\nfunction normalizeTweenValues(tween, animatable) {\n var t = {};\n for (var p in tween) {\n var value = getFunctionValue(tween[p], animatable);\n if (is.arr(value)) {\n value = value.map(function (v) { return getFunctionValue(v, animatable); });\n if (value.length === 1) { value = value[0]; }\n }\n t[p] = value;\n }\n t.duration = parseFloat(t.duration);\n t.delay = parseFloat(t.delay);\n return t;\n}\n\nfunction normalizeTweens(prop, animatable) {\n var previousTween;\n return prop.tweens.map(function (t) {\n var tween = normalizeTweenValues(t, animatable);\n var tweenValue = tween.value;\n var to = is.arr(tweenValue) ? tweenValue[1] : tweenValue;\n var toUnit = getUnit(to);\n var originalValue = getOriginalTargetValue(animatable.target, prop.name, toUnit, animatable);\n var previousValue = previousTween ? previousTween.to.original : originalValue;\n var from = is.arr(tweenValue) ? tweenValue[0] : previousValue;\n var fromUnit = getUnit(from) || getUnit(originalValue);\n var unit = toUnit || fromUnit;\n if (is.und(to)) { to = previousValue; }\n tween.from = decomposeValue(from, unit);\n tween.to = decomposeValue(getRelativeValue(to, from), unit);\n tween.start = previousTween ? previousTween.end : 0;\n tween.end = tween.start + tween.delay + tween.duration + tween.endDelay;\n tween.easing = parseEasings(tween.easing, tween.duration);\n tween.isPath = is.pth(tweenValue);\n tween.isColor = is.col(tween.from.original);\n if (tween.isColor) { tween.round = 1; }\n previousTween = tween;\n return tween;\n });\n}\n\n// Tween progress\n\nvar setProgressValue = {\n css: function (t, p, v) { return t.style[p] = v; },\n attribute: function (t, p, v) { return t.setAttribute(p, v); },\n object: function (t, p, v) { return t[p] = v; },\n transform: function (t, p, v, transforms, manual) {\n transforms.list.set(p, v);\n if (p === transforms.last || manual) {\n var str = '';\n transforms.list.forEach(function (value, prop) { str += prop + \"(\" + value + \") \"; });\n t.style.transform = str;\n }\n }\n};\n\n// Set Value helper\n\nfunction setTargetsValue(targets, properties) {\n var animatables = getAnimatables(targets);\n\n for (var i = 0, len = animatables.length; i < len; i++) {\n var animatable = animatables[i];\n\n for (var property in properties) {\n var value = getFunctionValue(properties[property], animatable);\n var target = animatable.target;\n var valueUnit = getUnit(value);\n var originalValue = getOriginalTargetValue(target, property, valueUnit, animatable);\n var unit = valueUnit || getUnit(originalValue);\n var to = getRelativeValue(validateValue(value, unit), originalValue);\n var animType = getAnimationType(target, property);\n setProgressValue[animType](target, property, to, animatable.transforms, true);\n }\n }\n}\n\n// Animations\n\nfunction createAnimation(animatable, prop) {\n var animType = getAnimationType(animatable.target, prop.name);\n if (animType) {\n var tweens = normalizeTweens(prop, animatable);\n var lastTween = tweens[tweens.length - 1];\n return {\n type: animType,\n property: prop.name,\n animatable: animatable,\n tweens: tweens,\n duration: lastTween.end,\n delay: tweens[0].delay,\n endDelay: lastTween.endDelay\n }\n }\n}\n\nfunction getAnimations(animatables, properties) {\n return filterArray(flattenArray(animatables.map(function (animatable) {\n return properties.map(function (prop) {\n return createAnimation(animatable, prop);\n });\n })), function (a) { return !is.und(a); });\n}\n\n// Create Instance\n\nfunction getInstanceTimings(animations, tweenSettings) {\n var animLength = animations.length;\n var getTlOffset = function (anim) { return anim.timelineOffset ? anim.timelineOffset : 0; };\n var timings = {};\n timings.duration = animLength ? Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration; })) : tweenSettings.duration;\n timings.delay = animLength ? Math.min.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.delay; })) : tweenSettings.delay;\n timings.endDelay = animLength ? timings.duration - Math.max.apply(Math, animations.map(function (anim) { return getTlOffset(anim) + anim.duration - anim.endDelay; })) : tweenSettings.endDelay;\n return timings;\n}\n\nvar instanceID = 0;\n\nfunction createNewInstance(params) {\n var instanceSettings = replaceObjectProps(defaultInstanceSettings, params);\n var tweenSettings = replaceObjectProps(defaultTweenSettings, params);\n var properties = getProperties(tweenSettings, params);\n var animatables = getAnimatables(params.targets);\n var animations = getAnimations(animatables, properties);\n var timings = getInstanceTimings(animations, tweenSettings);\n var id = instanceID;\n instanceID++;\n return mergeObjects(instanceSettings, {\n id: id,\n children: [],\n animatables: animatables,\n animations: animations,\n duration: timings.duration,\n delay: timings.delay,\n endDelay: timings.endDelay\n });\n}\n\n// Core\n\nvar activeInstances = [];\nvar pausedInstances = [];\nvar raf;\n\nvar engine = (function () {\n function play() {\n raf = requestAnimationFrame(step);\n }\n function step(t) {\n var activeInstancesLength = activeInstances.length;\n if (activeInstancesLength) {\n var i = 0;\n while (i < activeInstancesLength) {\n var activeInstance = activeInstances[i];\n if (!activeInstance.paused) {\n activeInstance.tick(t);\n } else {\n var instanceIndex = activeInstances.indexOf(activeInstance);\n if (instanceIndex > -1) {\n activeInstances.splice(instanceIndex, 1);\n activeInstancesLength = activeInstances.length;\n }\n }\n i++;\n }\n play();\n } else {\n raf = cancelAnimationFrame(raf);\n }\n }\n return play;\n})();\n\nfunction handleVisibilityChange() {\n if (document.hidden) {\n for (var i = 0, len = activeInstances.length; i < len; i++) {\n activeInstance[i].pause();\n }\n pausedInstances = activeInstances.slice(0);\n activeInstances = [];\n } else {\n for (var i$1 = 0, len$1 = pausedInstances.length; i$1 < len$1; i$1++) {\n pausedInstances[i$1].play();\n }\n }\n}\n\ndocument.addEventListener('visibilitychange', handleVisibilityChange);\n\n// Public Instance\n\nfunction anime(params) {\n if ( params === void 0 ) params = {};\n\n\n var startTime = 0, lastTime = 0, now = 0;\n var children, childrenLength = 0;\n var resolve = null;\n\n function makePromise() {\n return window.Promise && new Promise(function (_resolve) { return resolve = _resolve; });\n }\n\n var promise = makePromise();\n\n var instance = createNewInstance(params);\n\n function toggleInstanceDirection() {\n instance.reversed = !instance.reversed;\n for (var i = 0, len = children.length; i < len; i++) {\n children[i].reversed = instance.reversed;\n }\n }\n\n function adjustTime(time) {\n return instance.reversed ? instance.duration - time : time;\n }\n\n function resetTime() {\n startTime = 0;\n lastTime = adjustTime(instance.currentTime) * (1 / anime.speed);\n }\n\n function seekCild(time, child) {\n if (child) { child.seek(time - child.timelineOffset); }\n }\n\n function syncInstanceChildren(time) {\n if (!instance.reversePlayback) {\n for (var i = 0; i < childrenLength; i++) { seekCild(time, children[i]); }\n } else {\n for (var i$1 = childrenLength; i$1--;) { seekCild(time, children[i$1]); }\n }\n }\n\n function setAnimationsProgress(insTime) {\n var i = 0;\n var animations = instance.animations;\n var animationsLength = animations.length;\n while (i < animationsLength) {\n var anim = animations[i];\n var animatable = anim.animatable;\n var tweens = anim.tweens;\n var tweenLength = tweens.length - 1;\n var tween = tweens[tweenLength];\n // Only check for keyframes if there is more than one tween\n if (tweenLength) { tween = filterArray(tweens, function (t) { return (insTime < t.end); })[0] || tween; }\n var elapsed = minMax(insTime - tween.start - tween.delay, 0, tween.duration) / tween.duration;\n var eased = isNaN(elapsed) ? 1 : tween.easing(elapsed);\n var strings = tween.to.strings;\n var round = tween.round;\n var numbers = [];\n var toNumbersLength = tween.to.numbers.length;\n var progress = (void 0);\n for (var n = 0; n < toNumbersLength; n++) {\n var value = (void 0);\n var toNumber = tween.to.numbers[n];\n var fromNumber = tween.from.numbers[n] || 0;\n if (!tween.isPath) {\n value = fromNumber + (eased * (toNumber - fromNumber));\n } else {\n value = getPathProgress(tween.value, eased * toNumber);\n }\n if (round) {\n if (!(tween.isColor && n > 2)) {\n value = Math.round(value * round) / round;\n }\n }\n numbers.push(value);\n }\n // Manual Array.reduce for better performances\n var stringsLength = strings.length;\n if (!stringsLength) {\n progress = numbers[0];\n } else {\n progress = strings[0];\n for (var s = 0; s < stringsLength; s++) {\n var a = strings[s];\n var b = strings[s + 1];\n var n$1 = numbers[s];\n if (!isNaN(n$1)) {\n if (!b) {\n progress += n$1 + ' ';\n } else {\n progress += n$1 + b;\n }\n }\n }\n }\n setProgressValue[anim.type](animatable.target, anim.property, progress, animatable.transforms);\n anim.currentValue = progress;\n i++;\n }\n }\n\n function setCallback(cb) {\n if (instance[cb] && !instance.passThrough) { instance[cb](instance); }\n }\n\n function countIteration() {\n if (instance.remaining && instance.remaining !== true) {\n instance.remaining--;\n }\n }\n\n function setInstanceProgress(engineTime) {\n var insDuration = instance.duration;\n var insDelay = instance.delay;\n var insEndDelay = insDuration - instance.endDelay;\n var insTime = adjustTime(engineTime);\n instance.progress = minMax((insTime / insDuration) * 100, 0, 100);\n instance.reversePlayback = insTime < instance.currentTime;\n if (children) { syncInstanceChildren(insTime); }\n if (!instance.began && instance.currentTime > 0) {\n instance.began = true;\n setCallback('begin');\n setCallback('loopBegin');\n }\n if (insTime <= insDelay && instance.currentTime !== 0) {\n setAnimationsProgress(0);\n }\n if ((insTime >= insEndDelay && instance.currentTime !== insDuration) || !insDuration) {\n setAnimationsProgress(insDuration);\n }\n if (insTime > insDelay && insTime < insEndDelay) {\n if (!instance.changeBegan) {\n instance.changeBegan = true;\n instance.changeCompleted = false;\n setCallback('changeBegin');\n }\n setCallback('change');\n setAnimationsProgress(insTime);\n } else {\n if (instance.changeBegan) {\n instance.changeCompleted = true;\n instance.changeBegan = false;\n setCallback('changeComplete');\n }\n }\n instance.currentTime = minMax(insTime, 0, insDuration);\n if (instance.began) { setCallback('update'); }\n if (engineTime >= insDuration) {\n lastTime = 0;\n countIteration();\n if (instance.remaining) {\n startTime = now;\n setCallback('loopComplete');\n setCallback('loopBegin');\n if (instance.direction === 'alternate') { toggleInstanceDirection(); }\n } else {\n instance.paused = true;\n if (!instance.completed) {\n instance.completed = true;\n setCallback('loopComplete');\n setCallback('complete');\n if ('Promise' in window) {\n resolve();\n promise = makePromise();\n }\n }\n }\n }\n }\n\n instance.reset = function() {\n var direction = instance.direction;\n instance.passThrough = false;\n instance.currentTime = 0;\n instance.progress = 0;\n instance.paused = true;\n instance.began = false;\n instance.changeBegan = false;\n instance.completed = false;\n instance.changeCompleted = false;\n instance.reversePlayback = false;\n instance.reversed = direction === 'reverse';\n instance.remaining = instance.loop;\n children = instance.children;\n childrenLength = children.length;\n for (var i = childrenLength; i--;) { instance.children[i].reset(); }\n if (instance.reversed && instance.loop !== true || (direction === 'alternate' && instance.loop === 1)) { instance.remaining++; }\n setAnimationsProgress(0);\n };\n\n // Set Value helper\n\n instance.set = function(targets, properties) {\n setTargetsValue(targets, properties);\n return instance;\n };\n\n instance.tick = function(t) {\n now = t;\n if (!startTime) { startTime = now; }\n setInstanceProgress((now + (lastTime - startTime)) * anime.speed);\n };\n\n instance.seek = function(time) {\n setInstanceProgress(adjustTime(time));\n };\n\n instance.pause = function() {\n instance.paused = true;\n resetTime();\n };\n\n instance.play = function() {\n if (!instance.paused) { return; }\n instance.paused = false;\n activeInstances.push(instance);\n resetTime();\n if (!raf) { engine(); }\n };\n\n instance.reverse = function() {\n toggleInstanceDirection();\n resetTime();\n };\n\n instance.restart = function() {\n instance.reset();\n instance.play();\n };\n\n instance.finished = promise;\n instance.reset();\n\n if (instance.autoplay) { instance.play(); }\n\n return instance;\n\n}\n\n// Remove targets from animation\n\nfunction removeTargetsFromAnimations(targetsArray, animations) {\n for (var a = animations.length; a--;) {\n if (arrayContains(targetsArray, animations[a].animatable.target)) {\n animations.splice(a, 1);\n }\n }\n}\n\nfunction removeTargets(targets) {\n var targetsArray = parseTargets(targets);\n for (var i = activeInstances.length; i--;) {\n var instance = activeInstances[i];\n var animations = instance.animations;\n var children = instance.children;\n removeTargetsFromAnimations(targetsArray, animations);\n for (var c = children.length; c--;) {\n var child = children[c];\n var childAnimations = child.animations;\n removeTargetsFromAnimations(targetsArray, childAnimations);\n if (!childAnimations.length && !child.children.length) { children.splice(c, 1); }\n }\n if (!animations.length && !children.length) { instance.pause(); }\n }\n}\n\n// Stagger helpers\n\nfunction stagger(val, params) {\n if ( params === void 0 ) params = {};\n\n var direction = params.direction || 'normal';\n var easing = params.easing ? parseEasings(params.easing) : null;\n var grid = params.grid;\n var axis = params.axis;\n var fromIndex = params.from || 0;\n var fromFirst = fromIndex === 'first';\n var fromCenter = fromIndex === 'center';\n var fromLast = fromIndex === 'last';\n var isRange = is.arr(val);\n var val1 = isRange ? parseFloat(val[0]) : parseFloat(val);\n var val2 = isRange ? parseFloat(val[1]) : 0;\n var unit = getUnit(isRange ? val[1] : val) || 0;\n var start = params.start || 0 + (isRange ? val1 : 0);\n var values = [];\n var maxValue = 0;\n return function (el, i, t) {\n if (fromFirst) { fromIndex = 0; }\n if (fromCenter) { fromIndex = (t - 1) / 2; }\n if (fromLast) { fromIndex = t - 1; }\n if (!values.length) {\n for (var index = 0; index < t; index++) {\n if (!grid) {\n values.push(Math.abs(fromIndex - index));\n } else {\n var fromX = !fromCenter ? fromIndex%grid[0] : (grid[0]-1)/2;\n var fromY = !fromCenter ? Math.floor(fromIndex/grid[0]) : (grid[1]-1)/2;\n var toX = index%grid[0];\n var toY = Math.floor(index/grid[0]);\n var distanceX = fromX - toX;\n var distanceY = fromY - toY;\n var value = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n if (axis === 'x') { value = -distanceX; }\n if (axis === 'y') { value = -distanceY; }\n values.push(value);\n }\n maxValue = Math.max.apply(Math, values);\n }\n if (easing) { values = values.map(function (val) { return easing(val / maxValue) * maxValue; }); }\n if (direction === 'reverse') { values = values.map(function (val) { return axis ? (val < 0) ? val * -1 : -val : Math.abs(maxValue - val); }); }\n }\n var spacing = isRange ? (val2 - val1) / maxValue : val1;\n return start + (spacing * (Math.round(values[i] * 100) / 100)) + unit;\n }\n}\n\n// Timeline\n\nfunction timeline(params) {\n if ( params === void 0 ) params = {};\n\n var tl = anime(params);\n tl.duration = 0;\n tl.add = function(instanceParams, timelineOffset) {\n var tlIndex = activeInstances.indexOf(tl);\n var children = tl.children;\n if (tlIndex > -1) { activeInstances.splice(tlIndex, 1); }\n function passThrough(ins) { ins.passThrough = true; }\n for (var i = 0; i < children.length; i++) { passThrough(children[i]); }\n var insParams = mergeObjects(instanceParams, replaceObjectProps(defaultTweenSettings, params));\n insParams.targets = insParams.targets || params.targets;\n var tlDuration = tl.duration;\n insParams.autoplay = false;\n insParams.direction = tl.direction;\n insParams.timelineOffset = is.und(timelineOffset) ? tlDuration : getRelativeValue(timelineOffset, tlDuration);\n passThrough(tl);\n tl.seek(insParams.timelineOffset);\n var ins = anime(insParams);\n passThrough(ins);\n children.push(ins);\n var timings = getInstanceTimings(children, params);\n tl.delay = timings.delay;\n tl.endDelay = timings.endDelay;\n tl.duration = timings.duration;\n tl.seek(0);\n tl.reset();\n if (tl.autoplay) { tl.play(); }\n return tl;\n };\n return tl;\n}\n\nanime.version = '3.0.0';\nanime.speed = 1;\nanime.running = activeInstances;\nanime.remove = removeTargets;\nanime.get = getOriginalTargetValue;\nanime.set = setTargetsValue;\nanime.convertPx = convertPxToUnit;\nanime.path = getPath;\nanime.setDashoffset = setDashoffset;\nanime.stagger = stagger;\nanime.timeline = timeline;\nanime.easing = parseEasings;\nanime.penner = penner;\nanime.random = function (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; };\n\nmodule.exports = anime;\n\n},{}],57:[function(_dereq_,module,exports){\n// threejs.org/license\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));\n}(this, (function (exports) { 'use strict';\n\n\t// Polyfills\n\tif (Number.EPSILON === undefined) {\n\t\tNumber.EPSILON = Math.pow(2, -52);\n\t}\n\n\tif (Number.isInteger === undefined) {\n\t\t// Missing in IE\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger\n\t\tNumber.isInteger = function (value) {\n\t\t\treturn typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n\t\t};\n\t} //\n\n\n\tif (Math.sign === undefined) {\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign\n\t\tMath.sign = function (x) {\n\t\t\treturn x < 0 ? -1 : x > 0 ? 1 : +x;\n\t\t};\n\t}\n\n\tif ('name' in Function.prototype === false) {\n\t\t// Missing in IE\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name\n\t\tObject.defineProperty(Function.prototype, 'name', {\n\t\t\tget: function get() {\n\t\t\t\treturn this.toString().match(/^\\s*function\\s*([^\\(\\s]*)/)[1];\n\t\t\t}\n\t\t});\n\t}\n\n\tif (Object.assign === undefined) {\n\t\t// Missing in IE\n\t\t// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\t\tObject.assign = function (target) {\n\n\t\t\tif (target === undefined || target === null) {\n\t\t\t\tthrow new TypeError('Cannot convert undefined or null to object');\n\t\t\t}\n\n\t\t\tvar output = Object(target);\n\n\t\t\tfor (var index = 1; index < arguments.length; index++) {\n\t\t\t\tvar source = arguments[index];\n\n\t\t\t\tif (source !== undefined && source !== null) {\n\t\t\t\t\tfor (var nextKey in source) {\n\t\t\t\t\t\tif (Object.prototype.hasOwnProperty.call(source, nextKey)) {\n\t\t\t\t\t\t\toutput[nextKey] = source[nextKey];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn output;\n\t\t};\n\t}\n\n\t/**\n\t * Copyright (c) 2014-present, Facebook, Inc.\n\t *\n\t * This source code is licensed under the MIT license found in the\n\t * LICENSE file in the root directory of this source tree.\n\t */\n\tvar runtime = function (exports) {\n\n\t\tvar Op = Object.prototype;\n\t\tvar hasOwn = Op.hasOwnProperty;\n\t\tvar undefined$1; // More compressible than void 0.\n\n\t\tvar $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n\t\tvar iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n\t\tvar asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n\t\tvar toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n\t\tfunction define(obj, key, value) {\n\t\t\tObject.defineProperty(obj, key, {\n\t\t\t\tvalue: value,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true\n\t\t\t});\n\t\t\treturn obj[key];\n\t\t}\n\n\t\ttry {\n\t\t\t// IE 8 has a broken Object.defineProperty that only works on DOM objects.\n\t\t\tdefine({}, \"\");\n\t\t} catch (err) {\n\t\t\tdefine = function define(obj, key, value) {\n\t\t\t\treturn obj[key] = value;\n\t\t\t};\n\t\t}\n\n\t\tfunction wrap(innerFn, outerFn, self, tryLocsList) {\n\t\t\t// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n\t\t\tvar protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n\t\t\tvar generator = Object.create(protoGenerator.prototype);\n\t\t\tvar context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,\n\t\t\t// .throw, and .return methods.\n\n\t\t\tgenerator._invoke = makeInvokeMethod(innerFn, self, context);\n\t\t\treturn generator;\n\t\t}\n\n\t\texports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion\n\t\t// record like context.tryEntries[i].completion. This interface could\n\t\t// have been (and was previously) designed to take a closure to be\n\t\t// invoked without arguments, but in all the cases we care about we\n\t\t// already have an existing method we want to call, so there's no need\n\t\t// to create a new function object. We can even get away with assuming\n\t\t// the method takes exactly one argument, since that happens to be true\n\t\t// in every case, so we don't have to touch the arguments object. The\n\t\t// only additional allocation required is the completion record, which\n\t\t// has a stable shape and so hopefully should be cheap to allocate.\n\n\t\tfunction tryCatch(fn, obj, arg) {\n\t\t\ttry {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"normal\",\n\t\t\t\t\targ: fn.call(obj, arg)\n\t\t\t\t};\n\t\t\t} catch (err) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"throw\",\n\t\t\t\t\targ: err\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tvar GenStateSuspendedStart = \"suspendedStart\";\n\t\tvar GenStateSuspendedYield = \"suspendedYield\";\n\t\tvar GenStateExecuting = \"executing\";\n\t\tvar GenStateCompleted = \"completed\"; // Returning this object from the innerFn has the same effect as\n\t\t// breaking out of the dispatch switch statement.\n\n\t\tvar ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and\n\t\t// .constructor.prototype properties for functions that return Generator\n\t\t// objects. For full spec compliance, you may wish to configure your\n\t\t// minifier not to mangle the names of these two functions.\n\n\t\tfunction Generator() {}\n\n\t\tfunction GeneratorFunction() {}\n\n\t\tfunction GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that\n\t\t// don't natively support it.\n\n\n\t\tvar IteratorPrototype = {};\n\n\t\tIteratorPrototype[iteratorSymbol] = function () {\n\t\t\treturn this;\n\t\t};\n\n\t\tvar getProto = Object.getPrototypeOf;\n\t\tvar NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n\n\t\tif (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n\t\t\t// This environment has a native %IteratorPrototype%; use it instead\n\t\t\t// of the polyfill.\n\t\t\tIteratorPrototype = NativeIteratorPrototype;\n\t\t}\n\n\t\tvar Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n\t\tGeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n\t\tGeneratorFunctionPrototype.constructor = GeneratorFunction;\n\t\tGeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"); // Helper for defining the .next, .throw, and .return methods of the\n\t\t// Iterator interface in terms of a single ._invoke method.\n\n\t\tfunction defineIteratorMethods(prototype) {\n\t\t\t[\"next\", \"throw\", \"return\"].forEach(function (method) {\n\t\t\t\tdefine(prototype, method, function (arg) {\n\t\t\t\t\treturn this._invoke(method, arg);\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\texports.isGeneratorFunction = function (genFun) {\n\t\t\tvar ctor = typeof genFun === \"function\" && genFun.constructor;\n\t\t\treturn ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can\n\t\t\t// do is to check its .name property.\n\t\t\t(ctor.displayName || ctor.name) === \"GeneratorFunction\" : false;\n\t\t};\n\n\t\texports.mark = function (genFun) {\n\t\t\tif (Object.setPrototypeOf) {\n\t\t\t\tObject.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n\t\t\t} else {\n\t\t\t\tgenFun.__proto__ = GeneratorFunctionPrototype;\n\t\t\t\tdefine(genFun, toStringTagSymbol, \"GeneratorFunction\");\n\t\t\t}\n\n\t\t\tgenFun.prototype = Object.create(Gp);\n\t\t\treturn genFun;\n\t\t}; // Within the body of any async function, `await x` is transformed to\n\t\t// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n\t\t// `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n\t\t// meant to be awaited.\n\n\n\t\texports.awrap = function (arg) {\n\t\t\treturn {\n\t\t\t\t__await: arg\n\t\t\t};\n\t\t};\n\n\t\tfunction AsyncIterator(generator, PromiseImpl) {\n\t\t\tfunction invoke(method, arg, resolve, reject) {\n\t\t\t\tvar record = tryCatch(generator[method], generator, arg);\n\n\t\t\t\tif (record.type === \"throw\") {\n\t\t\t\t\treject(record.arg);\n\t\t\t\t} else {\n\t\t\t\t\tvar result = record.arg;\n\t\t\t\t\tvar value = result.value;\n\n\t\t\t\t\tif (value && typeof value === \"object\" && hasOwn.call(value, \"__await\")) {\n\t\t\t\t\t\treturn PromiseImpl.resolve(value.__await).then(function (value) {\n\t\t\t\t\t\t\tinvoke(\"next\", value, resolve, reject);\n\t\t\t\t\t\t}, function (err) {\n\t\t\t\t\t\t\tinvoke(\"throw\", err, resolve, reject);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\treturn PromiseImpl.resolve(value).then(function (unwrapped) {\n\t\t\t\t\t\t// When a yielded Promise is resolved, its final value becomes\n\t\t\t\t\t\t// the .value of the Promise<{value,done}> result for the\n\t\t\t\t\t\t// current iteration.\n\t\t\t\t\t\tresult.value = unwrapped;\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}, function (error) {\n\t\t\t\t\t\t// If a rejected Promise was yielded, throw the rejection back\n\t\t\t\t\t\t// into the async generator function so it can be handled there.\n\t\t\t\t\t\treturn invoke(\"throw\", error, resolve, reject);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar previousPromise;\n\n\t\t\tfunction enqueue(method, arg) {\n\t\t\t\tfunction callInvokeWithMethodAndArg() {\n\t\t\t\t\treturn new PromiseImpl(function (resolve, reject) {\n\t\t\t\t\t\tinvoke(method, arg, resolve, reject);\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn previousPromise = // If enqueue has been called before, then we want to wait until\n\t\t\t\t// all previous Promises have been resolved before calling invoke,\n\t\t\t\t// so that results are always delivered in the correct order. If\n\t\t\t\t// enqueue has not been called before, then it is important to\n\t\t\t\t// call invoke immediately, without waiting on a callback to fire,\n\t\t\t\t// so that the async generator function has the opportunity to do\n\t\t\t\t// any necessary setup in a predictable way. This predictability\n\t\t\t\t// is why the Promise constructor synchronously invokes its\n\t\t\t\t// executor callback, and why async functions synchronously\n\t\t\t\t// execute code before the first await. Since we implement simple\n\t\t\t\t// async functions in terms of async generators, it is especially\n\t\t\t\t// important to get this right, even though it requires care.\n\t\t\t\tpreviousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later\n\t\t\t\t// invocations of the iterator.\n\t\t\t\tcallInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n\t\t\t} // Define the unified helper method that is used to implement .next,\n\t\t\t// .throw, and .return (see defineIteratorMethods).\n\n\n\t\t\tthis._invoke = enqueue;\n\t\t}\n\n\t\tdefineIteratorMethods(AsyncIterator.prototype);\n\n\t\tAsyncIterator.prototype[asyncIteratorSymbol] = function () {\n\t\t\treturn this;\n\t\t};\n\n\t\texports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of\n\t\t// AsyncIterator objects; they just return a Promise for the value of\n\t\t// the final result produced by the iterator.\n\n\t\texports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n\t\t\tif (PromiseImpl === void 0) PromiseImpl = Promise;\n\t\t\tvar iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n\t\t\treturn exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.\n\t\t\t: iter.next().then(function (result) {\n\t\t\t\treturn result.done ? result.value : iter.next();\n\t\t\t});\n\t\t};\n\n\t\tfunction makeInvokeMethod(innerFn, self, context) {\n\t\t\tvar state = GenStateSuspendedStart;\n\t\t\treturn function invoke(method, arg) {\n\t\t\t\tif (state === GenStateExecuting) {\n\t\t\t\t\tthrow new Error(\"Generator is already running\");\n\t\t\t\t}\n\n\t\t\t\tif (state === GenStateCompleted) {\n\t\t\t\t\tif (method === \"throw\") {\n\t\t\t\t\t\tthrow arg;\n\t\t\t\t\t} // Be forgiving, per 25.3.3.3.3 of the spec:\n\t\t\t\t\t// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n\n\n\t\t\t\t\treturn doneResult();\n\t\t\t\t}\n\n\t\t\t\tcontext.method = method;\n\t\t\t\tcontext.arg = arg;\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tvar delegate = context.delegate;\n\n\t\t\t\t\tif (delegate) {\n\t\t\t\t\t\tvar delegateResult = maybeInvokeDelegate(delegate, context);\n\n\t\t\t\t\t\tif (delegateResult) {\n\t\t\t\t\t\t\tif (delegateResult === ContinueSentinel) continue;\n\t\t\t\t\t\t\treturn delegateResult;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (context.method === \"next\") {\n\t\t\t\t\t\t// Setting context._sent for legacy support of Babel's\n\t\t\t\t\t\t// function.sent implementation.\n\t\t\t\t\t\tcontext.sent = context._sent = context.arg;\n\t\t\t\t\t} else if (context.method === \"throw\") {\n\t\t\t\t\t\tif (state === GenStateSuspendedStart) {\n\t\t\t\t\t\t\tstate = GenStateCompleted;\n\t\t\t\t\t\t\tthrow context.arg;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontext.dispatchException(context.arg);\n\t\t\t\t\t} else if (context.method === \"return\") {\n\t\t\t\t\t\tcontext.abrupt(\"return\", context.arg);\n\t\t\t\t\t}\n\n\t\t\t\t\tstate = GenStateExecuting;\n\t\t\t\t\tvar record = tryCatch(innerFn, self, context);\n\n\t\t\t\t\tif (record.type === \"normal\") {\n\t\t\t\t\t\t// If an exception is thrown from innerFn, we leave state ===\n\t\t\t\t\t\t// GenStateExecuting and loop back for another invocation.\n\t\t\t\t\t\tstate = context.done ? GenStateCompleted : GenStateSuspendedYield;\n\n\t\t\t\t\t\tif (record.arg === ContinueSentinel) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tvalue: record.arg,\n\t\t\t\t\t\t\tdone: context.done\n\t\t\t\t\t\t};\n\t\t\t\t\t} else if (record.type === \"throw\") {\n\t\t\t\t\t\tstate = GenStateCompleted; // Dispatch the exception by looping back around to the\n\t\t\t\t\t\t// context.dispatchException(context.arg) call above.\n\n\t\t\t\t\t\tcontext.method = \"throw\";\n\t\t\t\t\t\tcontext.arg = record.arg;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t} // Call delegate.iterator[context.method](context.arg) and handle the\n\t\t// result, either by returning a { value, done } result from the\n\t\t// delegate iterator, or by modifying context.method and context.arg,\n\t\t// setting context.delegate to null, and returning the ContinueSentinel.\n\n\n\t\tfunction maybeInvokeDelegate(delegate, context) {\n\t\t\tvar method = delegate.iterator[context.method];\n\n\t\t\tif (method === undefined$1) {\n\t\t\t\t// A .throw or .return when the delegate iterator has no .throw\n\t\t\t\t// method always terminates the yield* loop.\n\t\t\t\tcontext.delegate = null;\n\n\t\t\t\tif (context.method === \"throw\") {\n\t\t\t\t\t// Note: [\"return\"] must be used for ES3 parsing compatibility.\n\t\t\t\t\tif (delegate.iterator[\"return\"]) {\n\t\t\t\t\t\t// If the delegate iterator has a return method, give it a\n\t\t\t\t\t\t// chance to clean up.\n\t\t\t\t\t\tcontext.method = \"return\";\n\t\t\t\t\t\tcontext.arg = undefined$1;\n\t\t\t\t\t\tmaybeInvokeDelegate(delegate, context);\n\n\t\t\t\t\t\tif (context.method === \"throw\") {\n\t\t\t\t\t\t\t// If maybeInvokeDelegate(context) changed context.method from\n\t\t\t\t\t\t\t// \"return\" to \"throw\", let that override the TypeError below.\n\t\t\t\t\t\t\treturn ContinueSentinel;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcontext.method = \"throw\";\n\t\t\t\t\tcontext.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n\t\t\t\t}\n\n\t\t\t\treturn ContinueSentinel;\n\t\t\t}\n\n\t\t\tvar record = tryCatch(method, delegate.iterator, context.arg);\n\n\t\t\tif (record.type === \"throw\") {\n\t\t\t\tcontext.method = \"throw\";\n\t\t\t\tcontext.arg = record.arg;\n\t\t\t\tcontext.delegate = null;\n\t\t\t\treturn ContinueSentinel;\n\t\t\t}\n\n\t\t\tvar info = record.arg;\n\n\t\t\tif (!info) {\n\t\t\t\tcontext.method = \"throw\";\n\t\t\t\tcontext.arg = new TypeError(\"iterator result is not an object\");\n\t\t\t\tcontext.delegate = null;\n\t\t\t\treturn ContinueSentinel;\n\t\t\t}\n\n\t\t\tif (info.done) {\n\t\t\t\t// Assign the result of the finished delegate to the temporary\n\t\t\t\t// variable specified by delegate.resultName (see delegateYield).\n\t\t\t\tcontext[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).\n\n\t\t\t\tcontext.next = delegate.nextLoc; // If context.method was \"throw\" but the delegate handled the\n\t\t\t\t// exception, let the outer generator proceed normally. If\n\t\t\t\t// context.method was \"next\", forget context.arg since it has been\n\t\t\t\t// \"consumed\" by the delegate iterator. If context.method was\n\t\t\t\t// \"return\", allow the original .return call to continue in the\n\t\t\t\t// outer generator.\n\n\t\t\t\tif (context.method !== \"return\") {\n\t\t\t\t\tcontext.method = \"next\";\n\t\t\t\t\tcontext.arg = undefined$1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Re-yield the result returned by the delegate method.\n\t\t\t\treturn info;\n\t\t\t} // The delegate iterator is finished, so forget it and continue with\n\t\t\t// the outer generator.\n\n\n\t\t\tcontext.delegate = null;\n\t\t\treturn ContinueSentinel;\n\t\t} // Define Generator.prototype.{next,throw,return} in terms of the\n\t\t// unified ._invoke helper method.\n\n\n\t\tdefineIteratorMethods(Gp);\n\t\tdefine(Gp, toStringTagSymbol, \"Generator\"); // A Generator should always return itself as the iterator object when the\n\t\t// @@iterator function is called on it. Some browsers' implementations of the\n\t\t// iterator prototype chain incorrectly implement this, causing the Generator\n\t\t// object to not be returned from this call. This ensures that doesn't happen.\n\t\t// See https://github.com/facebook/regenerator/issues/274 for more details.\n\n\t\tGp[iteratorSymbol] = function () {\n\t\t\treturn this;\n\t\t};\n\n\t\tGp.toString = function () {\n\t\t\treturn \"[object Generator]\";\n\t\t};\n\n\t\tfunction pushTryEntry(locs) {\n\t\t\tvar entry = {\n\t\t\t\ttryLoc: locs[0]\n\t\t\t};\n\n\t\t\tif (1 in locs) {\n\t\t\t\tentry.catchLoc = locs[1];\n\t\t\t}\n\n\t\t\tif (2 in locs) {\n\t\t\t\tentry.finallyLoc = locs[2];\n\t\t\t\tentry.afterLoc = locs[3];\n\t\t\t}\n\n\t\t\tthis.tryEntries.push(entry);\n\t\t}\n\n\t\tfunction resetTryEntry(entry) {\n\t\t\tvar record = entry.completion || {};\n\t\t\trecord.type = \"normal\";\n\t\t\tdelete record.arg;\n\t\t\tentry.completion = record;\n\t\t}\n\n\t\tfunction Context(tryLocsList) {\n\t\t\t// The root entry object (effectively a try statement without a catch\n\t\t\t// or a finally block) gives us a place to store values thrown from\n\t\t\t// locations where there is no enclosing try statement.\n\t\t\tthis.tryEntries = [{\n\t\t\t\ttryLoc: \"root\"\n\t\t\t}];\n\t\t\ttryLocsList.forEach(pushTryEntry, this);\n\t\t\tthis.reset(true);\n\t\t}\n\n\t\texports.keys = function (object) {\n\t\t\tvar keys = [];\n\n\t\t\tfor (var key in object) {\n\t\t\t\tkeys.push(key);\n\t\t\t}\n\n\t\t\tkeys.reverse(); // Rather than returning an object with a next method, we keep\n\t\t\t// things simple and return the next function itself.\n\n\t\t\treturn function next() {\n\t\t\t\twhile (keys.length) {\n\t\t\t\t\tvar key = keys.pop();\n\n\t\t\t\t\tif (key in object) {\n\t\t\t\t\t\tnext.value = key;\n\t\t\t\t\t\tnext.done = false;\n\t\t\t\t\t\treturn next;\n\t\t\t\t\t}\n\t\t\t\t} // To avoid creating an additional object, we just hang the .value\n\t\t\t\t// and .done properties off the next function object itself. This\n\t\t\t\t// also ensures that the minifier will not anonymize the function.\n\n\n\t\t\t\tnext.done = true;\n\t\t\t\treturn next;\n\t\t\t};\n\t\t};\n\n\t\tfunction values(iterable) {\n\t\t\tif (iterable) {\n\t\t\t\tvar iteratorMethod = iterable[iteratorSymbol];\n\n\t\t\t\tif (iteratorMethod) {\n\t\t\t\t\treturn iteratorMethod.call(iterable);\n\t\t\t\t}\n\n\t\t\t\tif (typeof iterable.next === \"function\") {\n\t\t\t\t\treturn iterable;\n\t\t\t\t}\n\n\t\t\t\tif (!isNaN(iterable.length)) {\n\t\t\t\t\tvar i = -1,\n\t\t\t\t\t\t\tnext = function next() {\n\t\t\t\t\t\twhile (++i < iterable.length) {\n\t\t\t\t\t\t\tif (hasOwn.call(iterable, i)) {\n\t\t\t\t\t\t\t\tnext.value = iterable[i];\n\t\t\t\t\t\t\t\tnext.done = false;\n\t\t\t\t\t\t\t\treturn next;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnext.value = undefined$1;\n\t\t\t\t\t\tnext.done = true;\n\t\t\t\t\t\treturn next;\n\t\t\t\t\t};\n\n\t\t\t\t\treturn next.next = next;\n\t\t\t\t}\n\t\t\t} // Return an iterator with no values.\n\n\n\t\t\treturn {\n\t\t\t\tnext: doneResult\n\t\t\t};\n\t\t}\n\n\t\texports.values = values;\n\n\t\tfunction doneResult() {\n\t\t\treturn {\n\t\t\t\tvalue: undefined$1,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tContext.prototype = {\n\t\t\tconstructor: Context,\n\t\t\treset: function reset(skipTempReset) {\n\t\t\t\tthis.prev = 0;\n\t\t\t\tthis.next = 0; // Resetting context._sent for legacy support of Babel's\n\t\t\t\t// function.sent implementation.\n\n\t\t\t\tthis.sent = this._sent = undefined$1;\n\t\t\t\tthis.done = false;\n\t\t\t\tthis.delegate = null;\n\t\t\t\tthis.method = \"next\";\n\t\t\t\tthis.arg = undefined$1;\n\t\t\t\tthis.tryEntries.forEach(resetTryEntry);\n\n\t\t\t\tif (!skipTempReset) {\n\t\t\t\t\tfor (var name in this) {\n\t\t\t\t\t\t// Not sure about the optimal order of these conditions:\n\t\t\t\t\t\tif (name.charAt(0) === \"t\" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {\n\t\t\t\t\t\t\tthis[name] = undefined$1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tstop: function stop() {\n\t\t\t\tthis.done = true;\n\t\t\t\tvar rootEntry = this.tryEntries[0];\n\t\t\t\tvar rootRecord = rootEntry.completion;\n\n\t\t\t\tif (rootRecord.type === \"throw\") {\n\t\t\t\t\tthrow rootRecord.arg;\n\t\t\t\t}\n\n\t\t\t\treturn this.rval;\n\t\t\t},\n\t\t\tdispatchException: function dispatchException(exception) {\n\t\t\t\tif (this.done) {\n\t\t\t\t\tthrow exception;\n\t\t\t\t}\n\n\t\t\t\tvar context = this;\n\n\t\t\t\tfunction handle(loc, caught) {\n\t\t\t\t\trecord.type = \"throw\";\n\t\t\t\t\trecord.arg = exception;\n\t\t\t\t\tcontext.next = loc;\n\n\t\t\t\t\tif (caught) {\n\t\t\t\t\t\t// If the dispatched exception was caught by a catch block,\n\t\t\t\t\t\t// then let that catch block handle the exception normally.\n\t\t\t\t\t\tcontext.method = \"next\";\n\t\t\t\t\t\tcontext.arg = undefined$1;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn !!caught;\n\t\t\t\t}\n\n\t\t\t\tfor (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t\t\t\t\tvar entry = this.tryEntries[i];\n\t\t\t\t\tvar record = entry.completion;\n\n\t\t\t\t\tif (entry.tryLoc === \"root\") {\n\t\t\t\t\t\t// Exception thrown outside of any try block that could handle\n\t\t\t\t\t\t// it, so set the completion value of the entire function to\n\t\t\t\t\t\t// throw the exception.\n\t\t\t\t\t\treturn handle(\"end\");\n\t\t\t\t\t}\n\n\t\t\t\t\tif (entry.tryLoc <= this.prev) {\n\t\t\t\t\t\tvar hasCatch = hasOwn.call(entry, \"catchLoc\");\n\t\t\t\t\t\tvar hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n\t\t\t\t\t\tif (hasCatch && hasFinally) {\n\t\t\t\t\t\t\tif (this.prev < entry.catchLoc) {\n\t\t\t\t\t\t\t\treturn handle(entry.catchLoc, true);\n\t\t\t\t\t\t\t} else if (this.prev < entry.finallyLoc) {\n\t\t\t\t\t\t\t\treturn handle(entry.finallyLoc);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (hasCatch) {\n\t\t\t\t\t\t\tif (this.prev < entry.catchLoc) {\n\t\t\t\t\t\t\t\treturn handle(entry.catchLoc, true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (hasFinally) {\n\t\t\t\t\t\t\tif (this.prev < entry.finallyLoc) {\n\t\t\t\t\t\t\t\treturn handle(entry.finallyLoc);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new Error(\"try statement without catch or finally\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tabrupt: function abrupt(type, arg) {\n\t\t\t\tfor (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t\t\t\t\tvar entry = this.tryEntries[i];\n\n\t\t\t\t\tif (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n\t\t\t\t\t\tvar finallyEntry = entry;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (finallyEntry && (type === \"break\" || type === \"continue\") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {\n\t\t\t\t\t// Ignore the finally entry if control is not jumping to a\n\t\t\t\t\t// location outside the try/catch block.\n\t\t\t\t\tfinallyEntry = null;\n\t\t\t\t}\n\n\t\t\t\tvar record = finallyEntry ? finallyEntry.completion : {};\n\t\t\t\trecord.type = type;\n\t\t\t\trecord.arg = arg;\n\n\t\t\t\tif (finallyEntry) {\n\t\t\t\t\tthis.method = \"next\";\n\t\t\t\t\tthis.next = finallyEntry.finallyLoc;\n\t\t\t\t\treturn ContinueSentinel;\n\t\t\t\t}\n\n\t\t\t\treturn this.complete(record);\n\t\t\t},\n\t\t\tcomplete: function complete(record, afterLoc) {\n\t\t\t\tif (record.type === \"throw\") {\n\t\t\t\t\tthrow record.arg;\n\t\t\t\t}\n\n\t\t\t\tif (record.type === \"break\" || record.type === \"continue\") {\n\t\t\t\t\tthis.next = record.arg;\n\t\t\t\t} else if (record.type === \"return\") {\n\t\t\t\t\tthis.rval = this.arg = record.arg;\n\t\t\t\t\tthis.method = \"return\";\n\t\t\t\t\tthis.next = \"end\";\n\t\t\t\t} else if (record.type === \"normal\" && afterLoc) {\n\t\t\t\t\tthis.next = afterLoc;\n\t\t\t\t}\n\n\t\t\t\treturn ContinueSentinel;\n\t\t\t},\n\t\t\tfinish: function finish(finallyLoc) {\n\t\t\t\tfor (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t\t\t\t\tvar entry = this.tryEntries[i];\n\n\t\t\t\t\tif (entry.finallyLoc === finallyLoc) {\n\t\t\t\t\t\tthis.complete(entry.completion, entry.afterLoc);\n\t\t\t\t\t\tresetTryEntry(entry);\n\t\t\t\t\t\treturn ContinueSentinel;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"catch\": function _catch(tryLoc) {\n\t\t\t\tfor (var i = this.tryEntries.length - 1; i >= 0; --i) {\n\t\t\t\t\tvar entry = this.tryEntries[i];\n\n\t\t\t\t\tif (entry.tryLoc === tryLoc) {\n\t\t\t\t\t\tvar record = entry.completion;\n\n\t\t\t\t\t\tif (record.type === \"throw\") {\n\t\t\t\t\t\t\tvar thrown = record.arg;\n\t\t\t\t\t\t\tresetTryEntry(entry);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn thrown;\n\t\t\t\t\t}\n\t\t\t\t} // The context.catch method must only be called with a location\n\t\t\t\t// argument that corresponds to a known catch block.\n\n\n\t\t\t\tthrow new Error(\"illegal catch attempt\");\n\t\t\t},\n\t\t\tdelegateYield: function delegateYield(iterable, resultName, nextLoc) {\n\t\t\t\tthis.delegate = {\n\t\t\t\t\titerator: values(iterable),\n\t\t\t\t\tresultName: resultName,\n\t\t\t\t\tnextLoc: nextLoc\n\t\t\t\t};\n\n\t\t\t\tif (this.method === \"next\") {\n\t\t\t\t\t// Deliberately forget the last sent value so that we don't\n\t\t\t\t\t// accidentally pass it on to the delegate.\n\t\t\t\t\tthis.arg = undefined$1;\n\t\t\t\t}\n\n\t\t\t\treturn ContinueSentinel;\n\t\t\t}\n\t\t}; // Regardless of whether this script is executing as a CommonJS module\n\t\t// or not, return the runtime object so that we can declare the variable\n\t\t// regeneratorRuntime in the outer scope, which allows this module to be\n\t\t// injected easily by `bin/regenerator --include-runtime script.js`.\n\n\t\treturn exports;\n\t}( // If this script is executing as a CommonJS module, use module.exports\n\t// as the regeneratorRuntime namespace. Otherwise create a new empty\n\t// object. Either way, the resulting object will be used to initialize\n\t// the regeneratorRuntime variable at the top of this file.\n\ttypeof module === \"object\" ? module.exports : {});\n\n\ttry {\n\t\tregeneratorRuntime = runtime;\n\t} catch (accidentalStrictMode) {\n\t\t// This module should not be running in strict mode, so the above\n\t\t// assignment should always work unless something is misconfigured. Just\n\t\t// in case runtime.js accidentally runs in strict mode, we can escape\n\t\t// strict mode using a global Function call. This could conceivably fail\n\t\t// if a Content Security Policy forbids using Function, but in that case\n\t\t// the proper solution is to fix the accidental strict mode problem. If\n\t\t// you've misconfigured your bundler to force strict mode and applied a\n\t\t// CSP to forbid Function, and you're not willing to fix either of those\n\t\t// problems, please detail your unique predicament in a GitHub issue.\n\t\tFunction(\"r\", \"regeneratorRuntime = r\")(runtime);\n\t}\n\n\tvar REVISION = '125';\n\tvar MOUSE = {\n\t\tLEFT: 0,\n\t\tMIDDLE: 1,\n\t\tRIGHT: 2,\n\t\tROTATE: 0,\n\t\tDOLLY: 1,\n\t\tPAN: 2\n\t};\n\tvar TOUCH = {\n\t\tROTATE: 0,\n\t\tPAN: 1,\n\t\tDOLLY_PAN: 2,\n\t\tDOLLY_ROTATE: 3\n\t};\n\tvar CullFaceNone = 0;\n\tvar CullFaceBack = 1;\n\tvar CullFaceFront = 2;\n\tvar CullFaceFrontBack = 3;\n\tvar BasicShadowMap = 0;\n\tvar PCFShadowMap = 1;\n\tvar PCFSoftShadowMap = 2;\n\tvar VSMShadowMap = 3;\n\tvar FrontSide = 0;\n\tvar BackSide = 1;\n\tvar DoubleSide = 2;\n\tvar FlatShading = 1;\n\tvar SmoothShading = 2;\n\tvar NoBlending = 0;\n\tvar NormalBlending = 1;\n\tvar AdditiveBlending = 2;\n\tvar SubtractiveBlending = 3;\n\tvar MultiplyBlending = 4;\n\tvar CustomBlending = 5;\n\tvar AddEquation = 100;\n\tvar SubtractEquation = 101;\n\tvar ReverseSubtractEquation = 102;\n\tvar MinEquation = 103;\n\tvar MaxEquation = 104;\n\tvar ZeroFactor = 200;\n\tvar OneFactor = 201;\n\tvar SrcColorFactor = 202;\n\tvar OneMinusSrcColorFactor = 203;\n\tvar SrcAlphaFactor = 204;\n\tvar OneMinusSrcAlphaFactor = 205;\n\tvar DstAlphaFactor = 206;\n\tvar OneMinusDstAlphaFactor = 207;\n\tvar DstColorFactor = 208;\n\tvar OneMinusDstColorFactor = 209;\n\tvar SrcAlphaSaturateFactor = 210;\n\tvar NeverDepth = 0;\n\tvar AlwaysDepth = 1;\n\tvar LessDepth = 2;\n\tvar LessEqualDepth = 3;\n\tvar EqualDepth = 4;\n\tvar GreaterEqualDepth = 5;\n\tvar GreaterDepth = 6;\n\tvar NotEqualDepth = 7;\n\tvar MultiplyOperation = 0;\n\tvar MixOperation = 1;\n\tvar AddOperation = 2;\n\tvar NoToneMapping = 0;\n\tvar LinearToneMapping = 1;\n\tvar ReinhardToneMapping = 2;\n\tvar CineonToneMapping = 3;\n\tvar ACESFilmicToneMapping = 4;\n\tvar CustomToneMapping = 5;\n\tvar UVMapping = 300;\n\tvar CubeReflectionMapping = 301;\n\tvar CubeRefractionMapping = 302;\n\tvar EquirectangularReflectionMapping = 303;\n\tvar EquirectangularRefractionMapping = 304;\n\tvar CubeUVReflectionMapping = 306;\n\tvar CubeUVRefractionMapping = 307;\n\tvar RepeatWrapping = 1000;\n\tvar ClampToEdgeWrapping = 1001;\n\tvar MirroredRepeatWrapping = 1002;\n\tvar NearestFilter = 1003;\n\tvar NearestMipmapNearestFilter = 1004;\n\tvar NearestMipMapNearestFilter = 1004;\n\tvar NearestMipmapLinearFilter = 1005;\n\tvar NearestMipMapLinearFilter = 1005;\n\tvar LinearFilter = 1006;\n\tvar LinearMipmapNearestFilter = 1007;\n\tvar LinearMipMapNearestFilter = 1007;\n\tvar LinearMipmapLinearFilter = 1008;\n\tvar LinearMipMapLinearFilter = 1008;\n\tvar UnsignedByteType = 1009;\n\tvar ByteType = 1010;\n\tvar ShortType = 1011;\n\tvar UnsignedShortType = 1012;\n\tvar IntType = 1013;\n\tvar UnsignedIntType = 1014;\n\tvar FloatType = 1015;\n\tvar HalfFloatType = 1016;\n\tvar UnsignedShort4444Type = 1017;\n\tvar UnsignedShort5551Type = 1018;\n\tvar UnsignedShort565Type = 1019;\n\tvar UnsignedInt248Type = 1020;\n\tvar AlphaFormat = 1021;\n\tvar RGBFormat = 1022;\n\tvar RGBAFormat = 1023;\n\tvar LuminanceFormat = 1024;\n\tvar LuminanceAlphaFormat = 1025;\n\tvar RGBEFormat = RGBAFormat;\n\tvar DepthFormat = 1026;\n\tvar DepthStencilFormat = 1027;\n\tvar RedFormat = 1028;\n\tvar RedIntegerFormat = 1029;\n\tvar RGFormat = 1030;\n\tvar RGIntegerFormat = 1031;\n\tvar RGBIntegerFormat = 1032;\n\tvar RGBAIntegerFormat = 1033;\n\tvar RGB_S3TC_DXT1_Format = 33776;\n\tvar RGBA_S3TC_DXT1_Format = 33777;\n\tvar RGBA_S3TC_DXT3_Format = 33778;\n\tvar RGBA_S3TC_DXT5_Format = 33779;\n\tvar RGB_PVRTC_4BPPV1_Format = 35840;\n\tvar RGB_PVRTC_2BPPV1_Format = 35841;\n\tvar RGBA_PVRTC_4BPPV1_Format = 35842;\n\tvar RGBA_PVRTC_2BPPV1_Format = 35843;\n\tvar RGB_ETC1_Format = 36196;\n\tvar RGB_ETC2_Format = 37492;\n\tvar RGBA_ETC2_EAC_Format = 37496;\n\tvar RGBA_ASTC_4x4_Format = 37808;\n\tvar RGBA_ASTC_5x4_Format = 37809;\n\tvar RGBA_ASTC_5x5_Format = 37810;\n\tvar RGBA_ASTC_6x5_Format = 37811;\n\tvar RGBA_ASTC_6x6_Format = 37812;\n\tvar RGBA_ASTC_8x5_Format = 37813;\n\tvar RGBA_ASTC_8x6_Format = 37814;\n\tvar RGBA_ASTC_8x8_Format = 37815;\n\tvar RGBA_ASTC_10x5_Format = 37816;\n\tvar RGBA_ASTC_10x6_Format = 37817;\n\tvar RGBA_ASTC_10x8_Format = 37818;\n\tvar RGBA_ASTC_10x10_Format = 37819;\n\tvar RGBA_ASTC_12x10_Format = 37820;\n\tvar RGBA_ASTC_12x12_Format = 37821;\n\tvar RGBA_BPTC_Format = 36492;\n\tvar SRGB8_ALPHA8_ASTC_4x4_Format = 37840;\n\tvar SRGB8_ALPHA8_ASTC_5x4_Format = 37841;\n\tvar SRGB8_ALPHA8_ASTC_5x5_Format = 37842;\n\tvar SRGB8_ALPHA8_ASTC_6x5_Format = 37843;\n\tvar SRGB8_ALPHA8_ASTC_6x6_Format = 37844;\n\tvar SRGB8_ALPHA8_ASTC_8x5_Format = 37845;\n\tvar SRGB8_ALPHA8_ASTC_8x6_Format = 37846;\n\tvar SRGB8_ALPHA8_ASTC_8x8_Format = 37847;\n\tvar SRGB8_ALPHA8_ASTC_10x5_Format = 37848;\n\tvar SRGB8_ALPHA8_ASTC_10x6_Format = 37849;\n\tvar SRGB8_ALPHA8_ASTC_10x8_Format = 37850;\n\tvar SRGB8_ALPHA8_ASTC_10x10_Format = 37851;\n\tvar SRGB8_ALPHA8_ASTC_12x10_Format = 37852;\n\tvar SRGB8_ALPHA8_ASTC_12x12_Format = 37853;\n\tvar LoopOnce = 2200;\n\tvar LoopRepeat = 2201;\n\tvar LoopPingPong = 2202;\n\tvar InterpolateDiscrete = 2300;\n\tvar InterpolateLinear = 2301;\n\tvar InterpolateSmooth = 2302;\n\tvar ZeroCurvatureEnding = 2400;\n\tvar ZeroSlopeEnding = 2401;\n\tvar WrapAroundEnding = 2402;\n\tvar NormalAnimationBlendMode = 2500;\n\tvar AdditiveAnimationBlendMode = 2501;\n\tvar TrianglesDrawMode = 0;\n\tvar TriangleStripDrawMode = 1;\n\tvar TriangleFanDrawMode = 2;\n\tvar LinearEncoding = 3000;\n\tvar sRGBEncoding = 3001;\n\tvar GammaEncoding = 3007;\n\tvar RGBEEncoding = 3002;\n\tvar LogLuvEncoding = 3003;\n\tvar RGBM7Encoding = 3004;\n\tvar RGBM16Encoding = 3005;\n\tvar RGBDEncoding = 3006;\n\tvar BasicDepthPacking = 3200;\n\tvar RGBADepthPacking = 3201;\n\tvar TangentSpaceNormalMap = 0;\n\tvar ObjectSpaceNormalMap = 1;\n\tvar ZeroStencilOp = 0;\n\tvar KeepStencilOp = 7680;\n\tvar ReplaceStencilOp = 7681;\n\tvar IncrementStencilOp = 7682;\n\tvar DecrementStencilOp = 7683;\n\tvar IncrementWrapStencilOp = 34055;\n\tvar DecrementWrapStencilOp = 34056;\n\tvar InvertStencilOp = 5386;\n\tvar NeverStencilFunc = 512;\n\tvar LessStencilFunc = 513;\n\tvar EqualStencilFunc = 514;\n\tvar LessEqualStencilFunc = 515;\n\tvar GreaterStencilFunc = 516;\n\tvar NotEqualStencilFunc = 517;\n\tvar GreaterEqualStencilFunc = 518;\n\tvar AlwaysStencilFunc = 519;\n\tvar StaticDrawUsage = 35044;\n\tvar DynamicDrawUsage = 35048;\n\tvar StreamDrawUsage = 35040;\n\tvar StaticReadUsage = 35045;\n\tvar DynamicReadUsage = 35049;\n\tvar StreamReadUsage = 35041;\n\tvar StaticCopyUsage = 35046;\n\tvar DynamicCopyUsage = 35050;\n\tvar StreamCopyUsage = 35042;\n\tvar GLSL1 = '100';\n\tvar GLSL3 = '300 es';\n\n\tfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n\t\ttry {\n\t\t\tvar info = gen[key](arg);\n\t\t\tvar value = info.value;\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t\treturn;\n\t\t}\n\n\t\tif (info.done) {\n\t\t\tresolve(value);\n\t\t} else {\n\t\t\tPromise.resolve(value).then(_next, _throw);\n\t\t}\n\t}\n\n\tfunction _asyncToGenerator(fn) {\n\t\treturn function () {\n\t\t\tvar self = this,\n\t\t\t\t\targs = arguments;\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tvar gen = fn.apply(self, args);\n\n\t\t\t\tfunction _next(value) {\n\t\t\t\t\tasyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n\t\t\t\t}\n\n\t\t\t\tfunction _throw(err) {\n\t\t\t\t\tasyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n\t\t\t\t}\n\n\t\t\t\t_next(undefined);\n\t\t\t});\n\t\t};\n\t}\n\n\tfunction _defineProperties(target, props) {\n\t\tfor (var i = 0; i < props.length; i++) {\n\t\t\tvar descriptor = props[i];\n\t\t\tdescriptor.enumerable = descriptor.enumerable || false;\n\t\t\tdescriptor.configurable = true;\n\t\t\tif (\"value\" in descriptor) descriptor.writable = true;\n\t\t\tObject.defineProperty(target, descriptor.key, descriptor);\n\t\t}\n\t}\n\n\tfunction _createClass(Constructor, protoProps, staticProps) {\n\t\tif (protoProps) _defineProperties(Constructor.prototype, protoProps);\n\t\tif (staticProps) _defineProperties(Constructor, staticProps);\n\t\treturn Constructor;\n\t}\n\n\tfunction _inheritsLoose(subClass, superClass) {\n\t\tsubClass.prototype = Object.create(superClass.prototype);\n\t\tsubClass.prototype.constructor = subClass;\n\t\tsubClass.__proto__ = superClass;\n\t}\n\n\tfunction _assertThisInitialized(self) {\n\t\tif (self === void 0) {\n\t\t\tthrow new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n\t\t}\n\n\t\treturn self;\n\t}\n\n\tfunction _unsupportedIterableToArray(o, minLen) {\n\t\tif (!o) return;\n\t\tif (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n\t\tvar n = Object.prototype.toString.call(o).slice(8, -1);\n\t\tif (n === \"Object\" && o.constructor) n = o.constructor.name;\n\t\tif (n === \"Map\" || n === \"Set\") return Array.from(o);\n\t\tif (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n\t}\n\n\tfunction _arrayLikeToArray(arr, len) {\n\t\tif (len == null || len > arr.length) len = arr.length;\n\n\t\tfor (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n\t\treturn arr2;\n\t}\n\n\tfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n\t\tvar it;\n\n\t\tif (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n\t\t\tif (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n\t\t\t\tif (it) o = it;\n\t\t\t\tvar i = 0;\n\t\t\t\treturn function () {\n\t\t\t\t\tif (i >= o.length) return {\n\t\t\t\t\t\tdone: true\n\t\t\t\t\t};\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdone: false,\n\t\t\t\t\t\tvalue: o[i++]\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthrow new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t\t}\n\n\t\tit = o[Symbol.iterator]();\n\t\treturn it.next.bind(it);\n\t}\n\n\t/**\n\t * https://github.com/mrdoob/eventdispatcher.js/\n\t */\n\tfunction EventDispatcher() {}\n\n\tObject.assign(EventDispatcher.prototype, {\n\t\taddEventListener: function addEventListener(type, listener) {\n\t\t\tif (this._listeners === undefined) this._listeners = {};\n\t\t\tvar listeners = this._listeners;\n\n\t\t\tif (listeners[type] === undefined) {\n\t\t\t\tlisteners[type] = [];\n\t\t\t}\n\n\t\t\tif (listeners[type].indexOf(listener) === -1) {\n\t\t\t\tlisteners[type].push(listener);\n\t\t\t}\n\t\t},\n\t\thasEventListener: function hasEventListener(type, listener) {\n\t\t\tif (this._listeners === undefined) return false;\n\t\t\tvar listeners = this._listeners;\n\t\t\treturn listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1;\n\t\t},\n\t\tremoveEventListener: function removeEventListener(type, listener) {\n\t\t\tif (this._listeners === undefined) return;\n\t\t\tvar listeners = this._listeners;\n\t\t\tvar listenerArray = listeners[type];\n\n\t\t\tif (listenerArray !== undefined) {\n\t\t\t\tvar index = listenerArray.indexOf(listener);\n\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\tlistenerArray.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdispatchEvent: function dispatchEvent(event) {\n\t\t\tif (this._listeners === undefined) return;\n\t\t\tvar listeners = this._listeners;\n\t\t\tvar listenerArray = listeners[event.type];\n\n\t\t\tif (listenerArray !== undefined) {\n\t\t\t\tevent.target = this; // Make a copy, in case listeners are removed while iterating.\n\n\t\t\t\tvar array = listenerArray.slice(0);\n\n\t\t\t\tfor (var i = 0, l = array.length; i < l; i++) {\n\t\t\t\t\tarray[i].call(this, event);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tvar _lut = [];\n\n\tfor (var i = 0; i < 256; i++) {\n\t\t_lut[i] = (i < 16 ? '0' : '') + i.toString(16);\n\t}\n\n\tvar _seed = 1234567;\n\tvar MathUtils = {\n\t\tDEG2RAD: Math.PI / 180,\n\t\tRAD2DEG: 180 / Math.PI,\n\t\tgenerateUUID: function generateUUID() {\n\t\t\t// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136\n\t\t\tvar d0 = Math.random() * 0xffffffff | 0;\n\t\t\tvar d1 = Math.random() * 0xffffffff | 0;\n\t\t\tvar d2 = Math.random() * 0xffffffff | 0;\n\t\t\tvar d3 = Math.random() * 0xffffffff | 0;\n\t\t\tvar uuid = _lut[d0 & 0xff] + _lut[d0 >> 8 & 0xff] + _lut[d0 >> 16 & 0xff] + _lut[d0 >> 24 & 0xff] + '-' + _lut[d1 & 0xff] + _lut[d1 >> 8 & 0xff] + '-' + _lut[d1 >> 16 & 0x0f | 0x40] + _lut[d1 >> 24 & 0xff] + '-' + _lut[d2 & 0x3f | 0x80] + _lut[d2 >> 8 & 0xff] + '-' + _lut[d2 >> 16 & 0xff] + _lut[d2 >> 24 & 0xff] + _lut[d3 & 0xff] + _lut[d3 >> 8 & 0xff] + _lut[d3 >> 16 & 0xff] + _lut[d3 >> 24 & 0xff]; // .toUpperCase() here flattens concatenated strings to save heap memory space.\n\n\t\t\treturn uuid.toUpperCase();\n\t\t},\n\t\tclamp: function clamp(value, min, max) {\n\t\t\treturn Math.max(min, Math.min(max, value));\n\t\t},\n\t\t// compute euclidian modulo of m % n\n\t\t// https://en.wikipedia.org/wiki/Modulo_operation\n\t\teuclideanModulo: function euclideanModulo(n, m) {\n\t\t\treturn (n % m + m) % m;\n\t\t},\n\t\t// Linear mapping from range <a1, a2> to range <b1, b2>\n\t\tmapLinear: function mapLinear(x, a1, a2, b1, b2) {\n\t\t\treturn b1 + (x - a1) * (b2 - b1) / (a2 - a1);\n\t\t},\n\t\t// https://en.wikipedia.org/wiki/Linear_interpolation\n\t\tlerp: function lerp(x, y, t) {\n\t\t\treturn (1 - t) * x + t * y;\n\t\t},\n\t\t// http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/\n\t\tdamp: function damp(x, y, lambda, dt) {\n\t\t\treturn MathUtils.lerp(x, y, 1 - Math.exp(-lambda * dt));\n\t\t},\n\t\t// https://www.desmos.com/calculator/vcsjnyz7x4\n\t\tpingpong: function pingpong(x, length) {\n\t\t\tif (length === void 0) {\n\t\t\t\tlength = 1;\n\t\t\t}\n\n\t\t\treturn length - Math.abs(MathUtils.euclideanModulo(x, length * 2) - length);\n\t\t},\n\t\t// http://en.wikipedia.org/wiki/Smoothstep\n\t\tsmoothstep: function smoothstep(x, min, max) {\n\t\t\tif (x <= min) return 0;\n\t\t\tif (x >= max) return 1;\n\t\t\tx = (x - min) / (max - min);\n\t\t\treturn x * x * (3 - 2 * x);\n\t\t},\n\t\tsmootherstep: function smootherstep(x, min, max) {\n\t\t\tif (x <= min) return 0;\n\t\t\tif (x >= max) return 1;\n\t\t\tx = (x - min) / (max - min);\n\t\t\treturn x * x * x * (x * (x * 6 - 15) + 10);\n\t\t},\n\t\t// Random integer from <low, high> interval\n\t\trandInt: function randInt(low, high) {\n\t\t\treturn low + Math.floor(Math.random() * (high - low + 1));\n\t\t},\n\t\t// Random float from <low, high> interval\n\t\trandFloat: function randFloat(low, high) {\n\t\t\treturn low + Math.random() * (high - low);\n\t\t},\n\t\t// Random float from <-range/2, range/2> interval\n\t\trandFloatSpread: function randFloatSpread(range) {\n\t\t\treturn range * (0.5 - Math.random());\n\t\t},\n\t\t// Deterministic pseudo-random float in the interval [ 0, 1 ]\n\t\tseededRandom: function seededRandom(s) {\n\t\t\tif (s !== undefined) _seed = s % 2147483647; // Park-Miller algorithm\n\n\t\t\t_seed = _seed * 16807 % 2147483647;\n\t\t\treturn (_seed - 1) / 2147483646;\n\t\t},\n\t\tdegToRad: function degToRad(degrees) {\n\t\t\treturn degrees * MathUtils.DEG2RAD;\n\t\t},\n\t\tradToDeg: function radToDeg(radians) {\n\t\t\treturn radians * MathUtils.RAD2DEG;\n\t\t},\n\t\tisPowerOfTwo: function isPowerOfTwo(value) {\n\t\t\treturn (value & value - 1) === 0 && value !== 0;\n\t\t},\n\t\tceilPowerOfTwo: function ceilPowerOfTwo(value) {\n\t\t\treturn Math.pow(2, Math.ceil(Math.log(value) / Math.LN2));\n\t\t},\n\t\tfloorPowerOfTwo: function floorPowerOfTwo(value) {\n\t\t\treturn Math.pow(2, Math.floor(Math.log(value) / Math.LN2));\n\t\t},\n\t\tsetQuaternionFromProperEuler: function setQuaternionFromProperEuler(q, a, b, c, order) {\n\t\t\t// Intrinsic Proper Euler Angles - see https://en.wikipedia.org/wiki/Euler_angles\n\t\t\t// rotations are applied to the axes in the order specified by 'order'\n\t\t\t// rotation by angle 'a' is applied first, then by angle 'b', then by angle 'c'\n\t\t\t// angles are in radians\n\t\t\tvar cos = Math.cos;\n\t\t\tvar sin = Math.sin;\n\t\t\tvar c2 = cos(b / 2);\n\t\t\tvar s2 = sin(b / 2);\n\t\t\tvar c13 = cos((a + c) / 2);\n\t\t\tvar s13 = sin((a + c) / 2);\n\t\t\tvar c1_3 = cos((a - c) / 2);\n\t\t\tvar s1_3 = sin((a - c) / 2);\n\t\t\tvar c3_1 = cos((c - a) / 2);\n\t\t\tvar s3_1 = sin((c - a) / 2);\n\n\t\t\tswitch (order) {\n\t\t\t\tcase 'XYX':\n\t\t\t\t\tq.set(c2 * s13, s2 * c1_3, s2 * s1_3, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YZY':\n\t\t\t\t\tq.set(s2 * s1_3, c2 * s13, s2 * c1_3, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZXZ':\n\t\t\t\t\tq.set(s2 * c1_3, s2 * s1_3, c2 * s13, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'XZX':\n\t\t\t\t\tq.set(c2 * s13, s2 * s3_1, s2 * c3_1, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YXY':\n\t\t\t\t\tq.set(s2 * c3_1, c2 * s13, s2 * s3_1, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZYZ':\n\t\t\t\t\tq.set(s2 * s3_1, s2 * c3_1, c2 * s13, c2 * c13);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.warn('THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: ' + order);\n\t\t\t}\n\t\t}\n\t};\n\n\tvar Vector2 = /*#__PURE__*/function () {\n\t\tfunction Vector2(x, y) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isVector2', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}\n\n\t\tvar _proto = Vector2.prototype;\n\n\t\t_proto.set = function set(x, y) {\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setScalar = function setScalar(scalar) {\n\t\t\tthis.x = scalar;\n\t\t\tthis.y = scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setX = function setX(x) {\n\t\t\tthis.x = x;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setY = function setY(y) {\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setComponent = function setComponent(index, value) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.x = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.y = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getComponent = function getComponent(index) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\treturn this.x;\n\n\t\t\t\tcase 1:\n\t\t\t\t\treturn this.y;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this.x, this.y);\n\t\t};\n\n\t\t_proto.copy = function copy(v) {\n\t\t\tthis.x = v.x;\n\t\t\tthis.y = v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.add = function add(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');\n\t\t\t\treturn this.addVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x += v.x;\n\t\t\tthis.y += v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScalar = function addScalar(s) {\n\t\t\tthis.x += s;\n\t\t\tthis.y += s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addVectors = function addVectors(a, b) {\n\t\t\tthis.x = a.x + b.x;\n\t\t\tthis.y = a.y + b.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScaledVector = function addScaledVector(v, s) {\n\t\t\tthis.x += v.x * s;\n\t\t\tthis.y += v.y * s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.sub = function sub(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');\n\t\t\t\treturn this.subVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x -= v.x;\n\t\t\tthis.y -= v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subScalar = function subScalar(s) {\n\t\t\tthis.x -= s;\n\t\t\tthis.y -= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subVectors = function subVectors(a, b) {\n\t\t\tthis.x = a.x - b.x;\n\t\t\tthis.y = a.y - b.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(v) {\n\t\t\tthis.x *= v.x;\n\t\t\tthis.y *= v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(scalar) {\n\t\t\tthis.x *= scalar;\n\t\t\tthis.y *= scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.divide = function divide(v) {\n\t\t\tthis.x /= v.x;\n\t\t\tthis.y /= v.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.divideScalar = function divideScalar(scalar) {\n\t\t\treturn this.multiplyScalar(1 / scalar);\n\t\t};\n\n\t\t_proto.applyMatrix3 = function applyMatrix3(m) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y;\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[0] * x + e[3] * y + e[6];\n\t\t\tthis.y = e[1] * x + e[4] * y + e[7];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.min = function min(v) {\n\t\t\tthis.x = Math.min(this.x, v.x);\n\t\t\tthis.y = Math.min(this.y, v.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.max = function max(v) {\n\t\t\tthis.x = Math.max(this.x, v.x);\n\t\t\tthis.y = Math.max(this.y, v.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clamp = function clamp(min, max) {\n\t\t\t// assumes min < max, componentwise\n\t\t\tthis.x = Math.max(min.x, Math.min(max.x, this.x));\n\t\t\tthis.y = Math.max(min.y, Math.min(max.y, this.y));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampScalar = function clampScalar(minVal, maxVal) {\n\t\t\tthis.x = Math.max(minVal, Math.min(maxVal, this.x));\n\t\t\tthis.y = Math.max(minVal, Math.min(maxVal, this.y));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampLength = function clampLength(min, max) {\n\t\t\tvar length = this.length();\n\t\t\treturn this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n\t\t};\n\n\t\t_proto.floor = function floor() {\n\t\t\tthis.x = Math.floor(this.x);\n\t\t\tthis.y = Math.floor(this.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.ceil = function ceil() {\n\t\t\tthis.x = Math.ceil(this.x);\n\t\t\tthis.y = Math.ceil(this.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.round = function round() {\n\t\t\tthis.x = Math.round(this.x);\n\t\t\tthis.y = Math.round(this.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.roundToZero = function roundToZero() {\n\t\t\tthis.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n\t\t\tthis.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.negate = function negate() {\n\t\t\tthis.x = -this.x;\n\t\t\tthis.y = -this.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dot = function dot(v) {\n\t\t\treturn this.x * v.x + this.y * v.y;\n\t\t};\n\n\t\t_proto.cross = function cross(v) {\n\t\t\treturn this.x * v.y - this.y * v.x;\n\t\t};\n\n\t\t_proto.lengthSq = function lengthSq() {\n\t\t\treturn this.x * this.x + this.y * this.y;\n\t\t};\n\n\t\t_proto.length = function length() {\n\t\t\treturn Math.sqrt(this.x * this.x + this.y * this.y);\n\t\t};\n\n\t\t_proto.manhattanLength = function manhattanLength() {\n\t\t\treturn Math.abs(this.x) + Math.abs(this.y);\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\treturn this.divideScalar(this.length() || 1);\n\t\t};\n\n\t\t_proto.angle = function angle() {\n\t\t\t// computes the angle in radians with respect to the positive x-axis\n\t\t\tvar angle = Math.atan2(-this.y, -this.x) + Math.PI;\n\t\t\treturn angle;\n\t\t};\n\n\t\t_proto.distanceTo = function distanceTo(v) {\n\t\t\treturn Math.sqrt(this.distanceToSquared(v));\n\t\t};\n\n\t\t_proto.distanceToSquared = function distanceToSquared(v) {\n\t\t\tvar dx = this.x - v.x,\n\t\t\t\t\tdy = this.y - v.y;\n\t\t\treturn dx * dx + dy * dy;\n\t\t};\n\n\t\t_proto.manhattanDistanceTo = function manhattanDistanceTo(v) {\n\t\t\treturn Math.abs(this.x - v.x) + Math.abs(this.y - v.y);\n\t\t};\n\n\t\t_proto.setLength = function setLength(length) {\n\t\t\treturn this.normalize().multiplyScalar(length);\n\t\t};\n\n\t\t_proto.lerp = function lerp(v, alpha) {\n\t\t\tthis.x += (v.x - this.x) * alpha;\n\t\t\tthis.y += (v.y - this.y) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpVectors = function lerpVectors(v1, v2, alpha) {\n\t\t\tthis.x = v1.x + (v2.x - v1.x) * alpha;\n\t\t\tthis.y = v1.y + (v2.y - v1.y) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(v) {\n\t\t\treturn v.x === this.x && v.y === this.y;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.x = array[offset];\n\t\t\tthis.y = array[offset + 1];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this.x;\n\t\t\tarray[offset + 1] = this.y;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index, offset) {\n\t\t\tif (offset !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector2: offset has been removed from .fromBufferAttribute().');\n\t\t\t}\n\n\t\t\tthis.x = attribute.getX(index);\n\t\t\tthis.y = attribute.getY(index);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.rotateAround = function rotateAround(center, angle) {\n\t\t\tvar c = Math.cos(angle),\n\t\t\t\t\ts = Math.sin(angle);\n\t\t\tvar x = this.x - center.x;\n\t\t\tvar y = this.y - center.y;\n\t\t\tthis.x = x * c - y * s + center.x;\n\t\t\tthis.y = x * s + y * c + center.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.random = function random() {\n\t\t\tthis.x = Math.random();\n\t\t\tthis.y = Math.random();\n\t\t\treturn this;\n\t\t};\n\n\t\t_createClass(Vector2, [{\n\t\t\tkey: \"width\",\n\t\t\tget: function get() {\n\t\t\t\treturn this.x;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis.x = value;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"height\",\n\t\t\tget: function get() {\n\t\t\t\treturn this.y;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis.y = value;\n\t\t\t}\n\t\t}]);\n\n\t\treturn Vector2;\n\t}();\n\n\tvar Matrix3 = /*#__PURE__*/function () {\n\t\tfunction Matrix3() {\n\t\t\tObject.defineProperty(this, 'isMatrix3', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tconsole.error('THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.');\n\t\t\t}\n\t\t}\n\n\t\tvar _proto = Matrix3.prototype;\n\n\t\t_proto.set = function set(n11, n12, n13, n21, n22, n23, n31, n32, n33) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] = n11;\n\t\t\tte[1] = n21;\n\t\t\tte[2] = n31;\n\t\t\tte[3] = n12;\n\t\t\tte[4] = n22;\n\t\t\tte[5] = n32;\n\t\t\tte[6] = n13;\n\t\t\tte[7] = n23;\n\t\t\tte[8] = n33;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.identity = function identity() {\n\t\t\tthis.set(1, 0, 0, 0, 1, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().fromArray(this.elements);\n\t\t};\n\n\t\t_proto.copy = function copy(m) {\n\t\t\tvar te = this.elements;\n\t\t\tvar me = m.elements;\n\t\t\tte[0] = me[0];\n\t\t\tte[1] = me[1];\n\t\t\tte[2] = me[2];\n\t\t\tte[3] = me[3];\n\t\t\tte[4] = me[4];\n\t\t\tte[5] = me[5];\n\t\t\tte[6] = me[6];\n\t\t\tte[7] = me[7];\n\t\t\tte[8] = me[8];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.extractBasis = function extractBasis(xAxis, yAxis, zAxis) {\n\t\t\txAxis.setFromMatrix3Column(this, 0);\n\t\t\tyAxis.setFromMatrix3Column(this, 1);\n\t\t\tzAxis.setFromMatrix3Column(this, 2);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrix4 = function setFromMatrix4(m) {\n\t\t\tvar me = m.elements;\n\t\t\tthis.set(me[0], me[4], me[8], me[1], me[5], me[9], me[2], me[6], me[10]);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(m) {\n\t\t\treturn this.multiplyMatrices(this, m);\n\t\t};\n\n\t\t_proto.premultiply = function premultiply(m) {\n\t\t\treturn this.multiplyMatrices(m, this);\n\t\t};\n\n\t\t_proto.multiplyMatrices = function multiplyMatrices(a, b) {\n\t\t\tvar ae = a.elements;\n\t\t\tvar be = b.elements;\n\t\t\tvar te = this.elements;\n\t\t\tvar a11 = ae[0],\n\t\t\t\t\ta12 = ae[3],\n\t\t\t\t\ta13 = ae[6];\n\t\t\tvar a21 = ae[1],\n\t\t\t\t\ta22 = ae[4],\n\t\t\t\t\ta23 = ae[7];\n\t\t\tvar a31 = ae[2],\n\t\t\t\t\ta32 = ae[5],\n\t\t\t\t\ta33 = ae[8];\n\t\t\tvar b11 = be[0],\n\t\t\t\t\tb12 = be[3],\n\t\t\t\t\tb13 = be[6];\n\t\t\tvar b21 = be[1],\n\t\t\t\t\tb22 = be[4],\n\t\t\t\t\tb23 = be[7];\n\t\t\tvar b31 = be[2],\n\t\t\t\t\tb32 = be[5],\n\t\t\t\t\tb33 = be[8];\n\t\t\tte[0] = a11 * b11 + a12 * b21 + a13 * b31;\n\t\t\tte[3] = a11 * b12 + a12 * b22 + a13 * b32;\n\t\t\tte[6] = a11 * b13 + a12 * b23 + a13 * b33;\n\t\t\tte[1] = a21 * b11 + a22 * b21 + a23 * b31;\n\t\t\tte[4] = a21 * b12 + a22 * b22 + a23 * b32;\n\t\t\tte[7] = a21 * b13 + a22 * b23 + a23 * b33;\n\t\t\tte[2] = a31 * b11 + a32 * b21 + a33 * b31;\n\t\t\tte[5] = a31 * b12 + a32 * b22 + a33 * b32;\n\t\t\tte[8] = a31 * b13 + a32 * b23 + a33 * b33;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(s) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] *= s;\n\t\t\tte[3] *= s;\n\t\t\tte[6] *= s;\n\t\t\tte[1] *= s;\n\t\t\tte[4] *= s;\n\t\t\tte[7] *= s;\n\t\t\tte[2] *= s;\n\t\t\tte[5] *= s;\n\t\t\tte[8] *= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.determinant = function determinant() {\n\t\t\tvar te = this.elements;\n\t\t\tvar a = te[0],\n\t\t\t\t\tb = te[1],\n\t\t\t\t\tc = te[2],\n\t\t\t\t\td = te[3],\n\t\t\t\t\te = te[4],\n\t\t\t\t\tf = te[5],\n\t\t\t\t\tg = te[6],\n\t\t\t\t\th = te[7],\n\t\t\t\t\ti = te[8];\n\t\t\treturn a * e * i - a * f * h - b * d * i + b * f * g + c * d * h - c * e * g;\n\t\t};\n\n\t\t_proto.invert = function invert() {\n\t\t\tvar te = this.elements,\n\t\t\t\t\tn11 = te[0],\n\t\t\t\t\tn21 = te[1],\n\t\t\t\t\tn31 = te[2],\n\t\t\t\t\tn12 = te[3],\n\t\t\t\t\tn22 = te[4],\n\t\t\t\t\tn32 = te[5],\n\t\t\t\t\tn13 = te[6],\n\t\t\t\t\tn23 = te[7],\n\t\t\t\t\tn33 = te[8],\n\t\t\t\t\tt11 = n33 * n22 - n32 * n23,\n\t\t\t\t\tt12 = n32 * n13 - n33 * n12,\n\t\t\t\t\tt13 = n23 * n12 - n22 * n13,\n\t\t\t\t\tdet = n11 * t11 + n21 * t12 + n31 * t13;\n\t\t\tif (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);\n\t\t\tvar detInv = 1 / det;\n\t\t\tte[0] = t11 * detInv;\n\t\t\tte[1] = (n31 * n23 - n33 * n21) * detInv;\n\t\t\tte[2] = (n32 * n21 - n31 * n22) * detInv;\n\t\t\tte[3] = t12 * detInv;\n\t\t\tte[4] = (n33 * n11 - n31 * n13) * detInv;\n\t\t\tte[5] = (n31 * n12 - n32 * n11) * detInv;\n\t\t\tte[6] = t13 * detInv;\n\t\t\tte[7] = (n21 * n13 - n23 * n11) * detInv;\n\t\t\tte[8] = (n22 * n11 - n21 * n12) * detInv;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.transpose = function transpose() {\n\t\t\tvar tmp;\n\t\t\tvar m = this.elements;\n\t\t\ttmp = m[1];\n\t\t\tm[1] = m[3];\n\t\t\tm[3] = tmp;\n\t\t\ttmp = m[2];\n\t\t\tm[2] = m[6];\n\t\t\tm[6] = tmp;\n\t\t\ttmp = m[5];\n\t\t\tm[5] = m[7];\n\t\t\tm[7] = tmp;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getNormalMatrix = function getNormalMatrix(matrix4) {\n\t\t\treturn this.setFromMatrix4(matrix4).copy(this).invert().transpose();\n\t\t};\n\n\t\t_proto.transposeIntoArray = function transposeIntoArray(r) {\n\t\t\tvar m = this.elements;\n\t\t\tr[0] = m[0];\n\t\t\tr[1] = m[3];\n\t\t\tr[2] = m[6];\n\t\t\tr[3] = m[1];\n\t\t\tr[4] = m[4];\n\t\t\tr[5] = m[7];\n\t\t\tr[6] = m[2];\n\t\t\tr[7] = m[5];\n\t\t\tr[8] = m[8];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setUvTransform = function setUvTransform(tx, ty, sx, sy, rotation, cx, cy) {\n\t\t\tvar c = Math.cos(rotation);\n\t\t\tvar s = Math.sin(rotation);\n\t\t\tthis.set(sx * c, sx * s, -sx * (c * cx + s * cy) + cx + tx, -sy * s, sy * c, -sy * (-s * cx + c * cy) + cy + ty, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.scale = function scale(sx, sy) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] *= sx;\n\t\t\tte[3] *= sx;\n\t\t\tte[6] *= sx;\n\t\t\tte[1] *= sy;\n\t\t\tte[4] *= sy;\n\t\t\tte[7] *= sy;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.rotate = function rotate(theta) {\n\t\t\tvar c = Math.cos(theta);\n\t\t\tvar s = Math.sin(theta);\n\t\t\tvar te = this.elements;\n\t\t\tvar a11 = te[0],\n\t\t\t\t\ta12 = te[3],\n\t\t\t\t\ta13 = te[6];\n\t\t\tvar a21 = te[1],\n\t\t\t\t\ta22 = te[4],\n\t\t\t\t\ta23 = te[7];\n\t\t\tte[0] = c * a11 + s * a21;\n\t\t\tte[3] = c * a12 + s * a22;\n\t\t\tte[6] = c * a13 + s * a23;\n\t\t\tte[1] = -s * a11 + c * a21;\n\t\t\tte[4] = -s * a12 + c * a22;\n\t\t\tte[7] = -s * a13 + c * a23;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(tx, ty) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] += tx * te[2];\n\t\t\tte[3] += tx * te[5];\n\t\t\tte[6] += tx * te[8];\n\t\t\tte[1] += ty * te[2];\n\t\t\tte[4] += ty * te[5];\n\t\t\tte[7] += ty * te[8];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(matrix) {\n\t\t\tvar te = this.elements;\n\t\t\tvar me = matrix.elements;\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tif (te[i] !== me[i]) return false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.elements[i] = array[i + offset];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tvar te = this.elements;\n\t\t\tarray[offset] = te[0];\n\t\t\tarray[offset + 1] = te[1];\n\t\t\tarray[offset + 2] = te[2];\n\t\t\tarray[offset + 3] = te[3];\n\t\t\tarray[offset + 4] = te[4];\n\t\t\tarray[offset + 5] = te[5];\n\t\t\tarray[offset + 6] = te[6];\n\t\t\tarray[offset + 7] = te[7];\n\t\t\tarray[offset + 8] = te[8];\n\t\t\treturn array;\n\t\t};\n\n\t\treturn Matrix3;\n\t}();\n\n\tvar _canvas;\n\n\tvar ImageUtils = {\n\t\tgetDataURL: function getDataURL(image) {\n\t\t\tif (/^data:/i.test(image.src)) {\n\t\t\t\treturn image.src;\n\t\t\t}\n\n\t\t\tif (typeof HTMLCanvasElement == 'undefined') {\n\t\t\t\treturn image.src;\n\t\t\t}\n\n\t\t\tvar canvas;\n\n\t\t\tif (image instanceof HTMLCanvasElement) {\n\t\t\t\tcanvas = image;\n\t\t\t} else {\n\t\t\t\tif (_canvas === undefined) _canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');\n\t\t\t\t_canvas.width = image.width;\n\t\t\t\t_canvas.height = image.height;\n\n\t\t\t\tvar context = _canvas.getContext('2d');\n\n\t\t\t\tif (image instanceof ImageData) {\n\t\t\t\t\tcontext.putImageData(image, 0, 0);\n\t\t\t\t} else {\n\t\t\t\t\tcontext.drawImage(image, 0, 0, image.width, image.height);\n\t\t\t\t}\n\n\t\t\t\tcanvas = _canvas;\n\t\t\t}\n\n\t\t\tif (canvas.width > 2048 || canvas.height > 2048) {\n\t\t\t\treturn canvas.toDataURL('image/jpeg', 0.6);\n\t\t\t} else {\n\t\t\t\treturn canvas.toDataURL('image/png');\n\t\t\t}\n\t\t}\n\t};\n\n\tvar textureId = 0;\n\n\tfunction Texture(image, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding) {\n\t\tif (image === void 0) {\n\t\t\timage = Texture.DEFAULT_IMAGE;\n\t\t}\n\n\t\tif (mapping === void 0) {\n\t\t\tmapping = Texture.DEFAULT_MAPPING;\n\t\t}\n\n\t\tif (wrapS === void 0) {\n\t\t\twrapS = ClampToEdgeWrapping;\n\t\t}\n\n\t\tif (wrapT === void 0) {\n\t\t\twrapT = ClampToEdgeWrapping;\n\t\t}\n\n\t\tif (magFilter === void 0) {\n\t\t\tmagFilter = LinearFilter;\n\t\t}\n\n\t\tif (minFilter === void 0) {\n\t\t\tminFilter = LinearMipmapLinearFilter;\n\t\t}\n\n\t\tif (format === void 0) {\n\t\t\tformat = RGBAFormat;\n\t\t}\n\n\t\tif (type === void 0) {\n\t\t\ttype = UnsignedByteType;\n\t\t}\n\n\t\tif (anisotropy === void 0) {\n\t\t\tanisotropy = 1;\n\t\t}\n\n\t\tif (encoding === void 0) {\n\t\t\tencoding = LinearEncoding;\n\t\t}\n\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tvalue: textureId++\n\t\t});\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.name = '';\n\t\tthis.image = image;\n\t\tthis.mipmaps = [];\n\t\tthis.mapping = mapping;\n\t\tthis.wrapS = wrapS;\n\t\tthis.wrapT = wrapT;\n\t\tthis.magFilter = magFilter;\n\t\tthis.minFilter = minFilter;\n\t\tthis.anisotropy = anisotropy;\n\t\tthis.format = format;\n\t\tthis.internalFormat = null;\n\t\tthis.type = type;\n\t\tthis.offset = new Vector2(0, 0);\n\t\tthis.repeat = new Vector2(1, 1);\n\t\tthis.center = new Vector2(0, 0);\n\t\tthis.rotation = 0;\n\t\tthis.matrixAutoUpdate = true;\n\t\tthis.matrix = new Matrix3();\n\t\tthis.generateMipmaps = true;\n\t\tthis.premultiplyAlpha = false;\n\t\tthis.flipY = true;\n\t\tthis.unpackAlignment = 4; // valid values: 1, 2, 4, 8 (see http://www.khronos.org/opengles/sdk/docs/man/xhtml/glPixelStorei.xml)\n\t\t// Values of encoding !== THREE.LinearEncoding only supported on map, envMap and emissiveMap.\n\t\t//\n\t\t// Also changing the encoding after already used by a Material will not automatically make the Material\n\t\t// update. You need to explicitly call Material.needsUpdate to trigger it to recompile.\n\n\t\tthis.encoding = encoding;\n\t\tthis.version = 0;\n\t\tthis.onUpdate = null;\n\t}\n\n\tTexture.DEFAULT_IMAGE = undefined;\n\tTexture.DEFAULT_MAPPING = UVMapping;\n\tTexture.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: Texture,\n\t\tisTexture: true,\n\t\tupdateMatrix: function updateMatrix() {\n\t\t\tthis.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y);\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.name = source.name;\n\t\t\tthis.image = source.image;\n\t\t\tthis.mipmaps = source.mipmaps.slice(0);\n\t\t\tthis.mapping = source.mapping;\n\t\t\tthis.wrapS = source.wrapS;\n\t\t\tthis.wrapT = source.wrapT;\n\t\t\tthis.magFilter = source.magFilter;\n\t\t\tthis.minFilter = source.minFilter;\n\t\t\tthis.anisotropy = source.anisotropy;\n\t\t\tthis.format = source.format;\n\t\t\tthis.internalFormat = source.internalFormat;\n\t\t\tthis.type = source.type;\n\t\t\tthis.offset.copy(source.offset);\n\t\t\tthis.repeat.copy(source.repeat);\n\t\t\tthis.center.copy(source.center);\n\t\t\tthis.rotation = source.rotation;\n\t\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\t\tthis.matrix.copy(source.matrix);\n\t\t\tthis.generateMipmaps = source.generateMipmaps;\n\t\t\tthis.premultiplyAlpha = source.premultiplyAlpha;\n\t\t\tthis.flipY = source.flipY;\n\t\t\tthis.unpackAlignment = source.unpackAlignment;\n\t\t\tthis.encoding = source.encoding;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar isRootObject = meta === undefined || typeof meta === 'string';\n\n\t\t\tif (!isRootObject && meta.textures[this.uuid] !== undefined) {\n\t\t\t\treturn meta.textures[this.uuid];\n\t\t\t}\n\n\t\t\tvar output = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Texture',\n\t\t\t\t\tgenerator: 'Texture.toJSON'\n\t\t\t\t},\n\t\t\t\tuuid: this.uuid,\n\t\t\t\tname: this.name,\n\t\t\t\tmapping: this.mapping,\n\t\t\t\trepeat: [this.repeat.x, this.repeat.y],\n\t\t\t\toffset: [this.offset.x, this.offset.y],\n\t\t\t\tcenter: [this.center.x, this.center.y],\n\t\t\t\trotation: this.rotation,\n\t\t\t\twrap: [this.wrapS, this.wrapT],\n\t\t\t\tformat: this.format,\n\t\t\t\ttype: this.type,\n\t\t\t\tencoding: this.encoding,\n\t\t\t\tminFilter: this.minFilter,\n\t\t\t\tmagFilter: this.magFilter,\n\t\t\t\tanisotropy: this.anisotropy,\n\t\t\t\tflipY: this.flipY,\n\t\t\t\tpremultiplyAlpha: this.premultiplyAlpha,\n\t\t\t\tunpackAlignment: this.unpackAlignment\n\t\t\t};\n\n\t\t\tif (this.image !== undefined) {\n\t\t\t\t// TODO: Move to THREE.Image\n\t\t\t\tvar image = this.image;\n\n\t\t\t\tif (image.uuid === undefined) {\n\t\t\t\t\timage.uuid = MathUtils.generateUUID(); // UGH\n\t\t\t\t}\n\n\t\t\t\tif (!isRootObject && meta.images[image.uuid] === undefined) {\n\t\t\t\t\tvar url;\n\n\t\t\t\t\tif (Array.isArray(image)) {\n\t\t\t\t\t\t// process array of images e.g. CubeTexture\n\t\t\t\t\t\turl = [];\n\n\t\t\t\t\t\tfor (var i = 0, l = image.length; i < l; i++) {\n\t\t\t\t\t\t\t// check cube texture with data textures\n\t\t\t\t\t\t\tif (image[i].isDataTexture) {\n\t\t\t\t\t\t\t\turl.push(serializeImage(image[i].image));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\turl.push(serializeImage(image[i]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// process single image\n\t\t\t\t\t\turl = serializeImage(image);\n\t\t\t\t\t}\n\n\t\t\t\t\tmeta.images[image.uuid] = {\n\t\t\t\t\t\tuuid: image.uuid,\n\t\t\t\t\t\turl: url\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\toutput.image = image.uuid;\n\t\t\t}\n\n\t\t\tif (!isRootObject) {\n\t\t\t\tmeta.textures[this.uuid] = output;\n\t\t\t}\n\n\t\t\treturn output;\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t},\n\t\ttransformUv: function transformUv(uv) {\n\t\t\tif (this.mapping !== UVMapping) return uv;\n\t\t\tuv.applyMatrix3(this.matrix);\n\n\t\t\tif (uv.x < 0 || uv.x > 1) {\n\t\t\t\tswitch (this.wrapS) {\n\t\t\t\t\tcase RepeatWrapping:\n\t\t\t\t\t\tuv.x = uv.x - Math.floor(uv.x);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ClampToEdgeWrapping:\n\t\t\t\t\t\tuv.x = uv.x < 0 ? 0 : 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase MirroredRepeatWrapping:\n\t\t\t\t\t\tif (Math.abs(Math.floor(uv.x) % 2) === 1) {\n\t\t\t\t\t\t\tuv.x = Math.ceil(uv.x) - uv.x;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tuv.x = uv.x - Math.floor(uv.x);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (uv.y < 0 || uv.y > 1) {\n\t\t\t\tswitch (this.wrapT) {\n\t\t\t\t\tcase RepeatWrapping:\n\t\t\t\t\t\tuv.y = uv.y - Math.floor(uv.y);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase ClampToEdgeWrapping:\n\t\t\t\t\t\tuv.y = uv.y < 0 ? 0 : 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase MirroredRepeatWrapping:\n\t\t\t\t\t\tif (Math.abs(Math.floor(uv.y) % 2) === 1) {\n\t\t\t\t\t\t\tuv.y = Math.ceil(uv.y) - uv.y;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tuv.y = uv.y - Math.floor(uv.y);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.flipY) {\n\t\t\t\tuv.y = 1 - uv.y;\n\t\t\t}\n\n\t\t\treturn uv;\n\t\t}\n\t});\n\tObject.defineProperty(Texture.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\n\tfunction serializeImage(image) {\n\t\tif (typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement || typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap) {\n\t\t\t// default images\n\t\t\treturn ImageUtils.getDataURL(image);\n\t\t} else {\n\t\t\tif (image.data) {\n\t\t\t\t// images of DataTexture\n\t\t\t\treturn {\n\t\t\t\t\tdata: Array.prototype.slice.call(image.data),\n\t\t\t\t\twidth: image.width,\n\t\t\t\t\theight: image.height,\n\t\t\t\t\ttype: image.data.constructor.name\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconsole.warn('THREE.Texture: Unable to serialize Texture.');\n\t\t\t\treturn {};\n\t\t\t}\n\t\t}\n\t}\n\n\tvar Vector4 = /*#__PURE__*/function () {\n\t\tfunction Vector4(x, y, z, w) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tif (z === void 0) {\n\t\t\t\tz = 0;\n\t\t\t}\n\n\t\t\tif (w === void 0) {\n\t\t\t\tw = 1;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isVector4', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.z = z;\n\t\t\tthis.w = w;\n\t\t}\n\n\t\tvar _proto = Vector4.prototype;\n\n\t\t_proto.set = function set(x, y, z, w) {\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.z = z;\n\t\t\tthis.w = w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setScalar = function setScalar(scalar) {\n\t\t\tthis.x = scalar;\n\t\t\tthis.y = scalar;\n\t\t\tthis.z = scalar;\n\t\t\tthis.w = scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setX = function setX(x) {\n\t\t\tthis.x = x;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setY = function setY(y) {\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setZ = function setZ(z) {\n\t\t\tthis.z = z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setW = function setW(w) {\n\t\t\tthis.w = w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setComponent = function setComponent(index, value) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.x = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.y = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.z = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.w = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getComponent = function getComponent(index) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\treturn this.x;\n\n\t\t\t\tcase 1:\n\t\t\t\t\treturn this.y;\n\n\t\t\t\tcase 2:\n\t\t\t\t\treturn this.z;\n\n\t\t\t\tcase 3:\n\t\t\t\t\treturn this.w;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this.x, this.y, this.z, this.w);\n\t\t};\n\n\t\t_proto.copy = function copy(v) {\n\t\t\tthis.x = v.x;\n\t\t\tthis.y = v.y;\n\t\t\tthis.z = v.z;\n\t\t\tthis.w = v.w !== undefined ? v.w : 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.add = function add(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');\n\t\t\t\treturn this.addVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x += v.x;\n\t\t\tthis.y += v.y;\n\t\t\tthis.z += v.z;\n\t\t\tthis.w += v.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScalar = function addScalar(s) {\n\t\t\tthis.x += s;\n\t\t\tthis.y += s;\n\t\t\tthis.z += s;\n\t\t\tthis.w += s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addVectors = function addVectors(a, b) {\n\t\t\tthis.x = a.x + b.x;\n\t\t\tthis.y = a.y + b.y;\n\t\t\tthis.z = a.z + b.z;\n\t\t\tthis.w = a.w + b.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScaledVector = function addScaledVector(v, s) {\n\t\t\tthis.x += v.x * s;\n\t\t\tthis.y += v.y * s;\n\t\t\tthis.z += v.z * s;\n\t\t\tthis.w += v.w * s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.sub = function sub(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');\n\t\t\t\treturn this.subVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x -= v.x;\n\t\t\tthis.y -= v.y;\n\t\t\tthis.z -= v.z;\n\t\t\tthis.w -= v.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subScalar = function subScalar(s) {\n\t\t\tthis.x -= s;\n\t\t\tthis.y -= s;\n\t\t\tthis.z -= s;\n\t\t\tthis.w -= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subVectors = function subVectors(a, b) {\n\t\t\tthis.x = a.x - b.x;\n\t\t\tthis.y = a.y - b.y;\n\t\t\tthis.z = a.z - b.z;\n\t\t\tthis.w = a.w - b.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(v) {\n\t\t\tthis.x *= v.x;\n\t\t\tthis.y *= v.y;\n\t\t\tthis.z *= v.z;\n\t\t\tthis.w *= v.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(scalar) {\n\t\t\tthis.x *= scalar;\n\t\t\tthis.y *= scalar;\n\t\t\tthis.z *= scalar;\n\t\t\tthis.w *= scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(m) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z,\n\t\t\t\t\tw = this.w;\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[0] * x + e[4] * y + e[8] * z + e[12] * w;\n\t\t\tthis.y = e[1] * x + e[5] * y + e[9] * z + e[13] * w;\n\t\t\tthis.z = e[2] * x + e[6] * y + e[10] * z + e[14] * w;\n\t\t\tthis.w = e[3] * x + e[7] * y + e[11] * z + e[15] * w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.divideScalar = function divideScalar(scalar) {\n\t\t\treturn this.multiplyScalar(1 / scalar);\n\t\t};\n\n\t\t_proto.setAxisAngleFromQuaternion = function setAxisAngleFromQuaternion(q) {\n\t\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/quaternionToAngle/index.htm\n\t\t\t// q is assumed to be normalized\n\t\t\tthis.w = 2 * Math.acos(q.w);\n\t\t\tvar s = Math.sqrt(1 - q.w * q.w);\n\n\t\t\tif (s < 0.0001) {\n\t\t\t\tthis.x = 1;\n\t\t\t\tthis.y = 0;\n\t\t\t\tthis.z = 0;\n\t\t\t} else {\n\t\t\t\tthis.x = q.x / s;\n\t\t\t\tthis.y = q.y / s;\n\t\t\t\tthis.z = q.z / s;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setAxisAngleFromRotationMatrix = function setAxisAngleFromRotationMatrix(m) {\n\t\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToAngle/index.htm\n\t\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\t\t\tvar angle, x, y, z; // variables for result\n\n\t\t\tvar epsilon = 0.01,\n\t\t\t\t\t// margin to allow for rounding errors\n\t\t\tepsilon2 = 0.1,\n\t\t\t\t\t// margin to distinguish between 0 and 180 degrees\n\t\t\tte = m.elements,\n\t\t\t\t\tm11 = te[0],\n\t\t\t\t\tm12 = te[4],\n\t\t\t\t\tm13 = te[8],\n\t\t\t\t\tm21 = te[1],\n\t\t\t\t\tm22 = te[5],\n\t\t\t\t\tm23 = te[9],\n\t\t\t\t\tm31 = te[2],\n\t\t\t\t\tm32 = te[6],\n\t\t\t\t\tm33 = te[10];\n\n\t\t\tif (Math.abs(m12 - m21) < epsilon && Math.abs(m13 - m31) < epsilon && Math.abs(m23 - m32) < epsilon) {\n\t\t\t\t// singularity found\n\t\t\t\t// first check for identity matrix which must have +1 for all terms\n\t\t\t\t// in leading diagonal and zero in other terms\n\t\t\t\tif (Math.abs(m12 + m21) < epsilon2 && Math.abs(m13 + m31) < epsilon2 && Math.abs(m23 + m32) < epsilon2 && Math.abs(m11 + m22 + m33 - 3) < epsilon2) {\n\t\t\t\t\t// this singularity is identity matrix so angle = 0\n\t\t\t\t\tthis.set(1, 0, 0, 0);\n\t\t\t\t\treturn this; // zero angle, arbitrary axis\n\t\t\t\t} // otherwise this singularity is angle = 180\n\n\n\t\t\t\tangle = Math.PI;\n\t\t\t\tvar xx = (m11 + 1) / 2;\n\t\t\t\tvar yy = (m22 + 1) / 2;\n\t\t\t\tvar zz = (m33 + 1) / 2;\n\t\t\t\tvar xy = (m12 + m21) / 4;\n\t\t\t\tvar xz = (m13 + m31) / 4;\n\t\t\t\tvar yz = (m23 + m32) / 4;\n\n\t\t\t\tif (xx > yy && xx > zz) {\n\t\t\t\t\t// m11 is the largest diagonal term\n\t\t\t\t\tif (xx < epsilon) {\n\t\t\t\t\t\tx = 0;\n\t\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\t\tz = 0.707106781;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tx = Math.sqrt(xx);\n\t\t\t\t\t\ty = xy / x;\n\t\t\t\t\t\tz = xz / x;\n\t\t\t\t\t}\n\t\t\t\t} else if (yy > zz) {\n\t\t\t\t\t// m22 is the largest diagonal term\n\t\t\t\t\tif (yy < epsilon) {\n\t\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\t\ty = 0;\n\t\t\t\t\t\tz = 0.707106781;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ty = Math.sqrt(yy);\n\t\t\t\t\t\tx = xy / y;\n\t\t\t\t\t\tz = yz / y;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// m33 is the largest diagonal term so base result on this\n\t\t\t\t\tif (zz < epsilon) {\n\t\t\t\t\t\tx = 0.707106781;\n\t\t\t\t\t\ty = 0.707106781;\n\t\t\t\t\t\tz = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tz = Math.sqrt(zz);\n\t\t\t\t\t\tx = xz / z;\n\t\t\t\t\t\ty = yz / z;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.set(x, y, z, angle);\n\t\t\t\treturn this; // return 180 deg rotation\n\t\t\t} // as we have reached here there are no singularities so we can handle normally\n\n\n\t\t\tvar s = Math.sqrt((m32 - m23) * (m32 - m23) + (m13 - m31) * (m13 - m31) + (m21 - m12) * (m21 - m12)); // used to normalize\n\n\t\t\tif (Math.abs(s) < 0.001) s = 1; // prevent divide by zero, should not happen if matrix is orthogonal and should be\n\t\t\t// caught by singularity test above, but I've left it in just in case\n\n\t\t\tthis.x = (m32 - m23) / s;\n\t\t\tthis.y = (m13 - m31) / s;\n\t\t\tthis.z = (m21 - m12) / s;\n\t\t\tthis.w = Math.acos((m11 + m22 + m33 - 1) / 2);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.min = function min(v) {\n\t\t\tthis.x = Math.min(this.x, v.x);\n\t\t\tthis.y = Math.min(this.y, v.y);\n\t\t\tthis.z = Math.min(this.z, v.z);\n\t\t\tthis.w = Math.min(this.w, v.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.max = function max(v) {\n\t\t\tthis.x = Math.max(this.x, v.x);\n\t\t\tthis.y = Math.max(this.y, v.y);\n\t\t\tthis.z = Math.max(this.z, v.z);\n\t\t\tthis.w = Math.max(this.w, v.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clamp = function clamp(min, max) {\n\t\t\t// assumes min < max, componentwise\n\t\t\tthis.x = Math.max(min.x, Math.min(max.x, this.x));\n\t\t\tthis.y = Math.max(min.y, Math.min(max.y, this.y));\n\t\t\tthis.z = Math.max(min.z, Math.min(max.z, this.z));\n\t\t\tthis.w = Math.max(min.w, Math.min(max.w, this.w));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampScalar = function clampScalar(minVal, maxVal) {\n\t\t\tthis.x = Math.max(minVal, Math.min(maxVal, this.x));\n\t\t\tthis.y = Math.max(minVal, Math.min(maxVal, this.y));\n\t\t\tthis.z = Math.max(minVal, Math.min(maxVal, this.z));\n\t\t\tthis.w = Math.max(minVal, Math.min(maxVal, this.w));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampLength = function clampLength(min, max) {\n\t\t\tvar length = this.length();\n\t\t\treturn this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n\t\t};\n\n\t\t_proto.floor = function floor() {\n\t\t\tthis.x = Math.floor(this.x);\n\t\t\tthis.y = Math.floor(this.y);\n\t\t\tthis.z = Math.floor(this.z);\n\t\t\tthis.w = Math.floor(this.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.ceil = function ceil() {\n\t\t\tthis.x = Math.ceil(this.x);\n\t\t\tthis.y = Math.ceil(this.y);\n\t\t\tthis.z = Math.ceil(this.z);\n\t\t\tthis.w = Math.ceil(this.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.round = function round() {\n\t\t\tthis.x = Math.round(this.x);\n\t\t\tthis.y = Math.round(this.y);\n\t\t\tthis.z = Math.round(this.z);\n\t\t\tthis.w = Math.round(this.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.roundToZero = function roundToZero() {\n\t\t\tthis.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n\t\t\tthis.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n\t\t\tthis.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z);\n\t\t\tthis.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.negate = function negate() {\n\t\t\tthis.x = -this.x;\n\t\t\tthis.y = -this.y;\n\t\t\tthis.z = -this.z;\n\t\t\tthis.w = -this.w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dot = function dot(v) {\n\t\t\treturn this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n\t\t};\n\n\t\t_proto.lengthSq = function lengthSq() {\n\t\t\treturn this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w;\n\t\t};\n\n\t\t_proto.length = function length() {\n\t\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n\t\t};\n\n\t\t_proto.manhattanLength = function manhattanLength() {\n\t\t\treturn Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w);\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\treturn this.divideScalar(this.length() || 1);\n\t\t};\n\n\t\t_proto.setLength = function setLength(length) {\n\t\t\treturn this.normalize().multiplyScalar(length);\n\t\t};\n\n\t\t_proto.lerp = function lerp(v, alpha) {\n\t\t\tthis.x += (v.x - this.x) * alpha;\n\t\t\tthis.y += (v.y - this.y) * alpha;\n\t\t\tthis.z += (v.z - this.z) * alpha;\n\t\t\tthis.w += (v.w - this.w) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpVectors = function lerpVectors(v1, v2, alpha) {\n\t\t\tthis.x = v1.x + (v2.x - v1.x) * alpha;\n\t\t\tthis.y = v1.y + (v2.y - v1.y) * alpha;\n\t\t\tthis.z = v1.z + (v2.z - v1.z) * alpha;\n\t\t\tthis.w = v1.w + (v2.w - v1.w) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(v) {\n\t\t\treturn v.x === this.x && v.y === this.y && v.z === this.z && v.w === this.w;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.x = array[offset];\n\t\t\tthis.y = array[offset + 1];\n\t\t\tthis.z = array[offset + 2];\n\t\t\tthis.w = array[offset + 3];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this.x;\n\t\t\tarray[offset + 1] = this.y;\n\t\t\tarray[offset + 2] = this.z;\n\t\t\tarray[offset + 3] = this.w;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index, offset) {\n\t\t\tif (offset !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector4: offset has been removed from .fromBufferAttribute().');\n\t\t\t}\n\n\t\t\tthis.x = attribute.getX(index);\n\t\t\tthis.y = attribute.getY(index);\n\t\t\tthis.z = attribute.getZ(index);\n\t\t\tthis.w = attribute.getW(index);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.random = function random() {\n\t\t\tthis.x = Math.random();\n\t\t\tthis.y = Math.random();\n\t\t\tthis.z = Math.random();\n\t\t\tthis.w = Math.random();\n\t\t\treturn this;\n\t\t};\n\n\t\t_createClass(Vector4, [{\n\t\t\tkey: \"width\",\n\t\t\tget: function get() {\n\t\t\t\treturn this.z;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis.z = value;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"height\",\n\t\t\tget: function get() {\n\t\t\t\treturn this.w;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis.w = value;\n\t\t\t}\n\t\t}]);\n\n\t\treturn Vector4;\n\t}();\n\n\t/*\n\t In options, we can specify:\n\t * Texture parameters for an auto-generated target texture\n\t * depthBuffer/stencilBuffer: Booleans to indicate if we should generate these buffers\n\t*/\n\n\tvar WebGLRenderTarget = /*#__PURE__*/function (_EventDispatcher) {\n\t\t_inheritsLoose(WebGLRenderTarget, _EventDispatcher);\n\n\t\tfunction WebGLRenderTarget(width, height, options) {\n\t\t\tvar _this;\n\n\t\t\t_this = _EventDispatcher.call(this) || this;\n\t\t\tObject.defineProperty(_assertThisInitialized(_this), 'isWebGLRenderTarget', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\t_this.width = width;\n\t\t\t_this.height = height;\n\t\t\t_this.scissor = new Vector4(0, 0, width, height);\n\t\t\t_this.scissorTest = false;\n\t\t\t_this.viewport = new Vector4(0, 0, width, height);\n\t\t\toptions = options || {};\n\t\t\t_this.texture = new Texture(undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding);\n\t\t\t_this.texture.image = {};\n\t\t\t_this.texture.image.width = width;\n\t\t\t_this.texture.image.height = height;\n\t\t\t_this.texture.generateMipmaps = options.generateMipmaps !== undefined ? options.generateMipmaps : false;\n\t\t\t_this.texture.minFilter = options.minFilter !== undefined ? options.minFilter : LinearFilter;\n\t\t\t_this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;\n\t\t\t_this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false;\n\t\t\t_this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = WebGLRenderTarget.prototype;\n\n\t\t_proto.setSize = function setSize(width, height) {\n\t\t\tif (this.width !== width || this.height !== height) {\n\t\t\t\tthis.width = width;\n\t\t\t\tthis.height = height;\n\t\t\t\tthis.texture.image.width = width;\n\t\t\t\tthis.texture.image.height = height;\n\t\t\t\tthis.dispose();\n\t\t\t}\n\n\t\t\tthis.viewport.set(0, 0, width, height);\n\t\t\tthis.scissor.set(0, 0, width, height);\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(source) {\n\t\t\tthis.width = source.width;\n\t\t\tthis.height = source.height;\n\t\t\tthis.viewport.copy(source.viewport);\n\t\t\tthis.texture = source.texture.clone();\n\t\t\tthis.depthBuffer = source.depthBuffer;\n\t\t\tthis.stencilBuffer = source.stencilBuffer;\n\t\t\tthis.depthTexture = source.depthTexture;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t};\n\n\t\treturn WebGLRenderTarget;\n\t}(EventDispatcher);\n\n\tvar WebGLMultisampleRenderTarget = /*#__PURE__*/function (_WebGLRenderTarget) {\n\t\t_inheritsLoose(WebGLMultisampleRenderTarget, _WebGLRenderTarget);\n\n\t\tfunction WebGLMultisampleRenderTarget(width, height, options) {\n\t\t\tvar _this;\n\n\t\t\t_this = _WebGLRenderTarget.call(this, width, height, options) || this;\n\t\t\tObject.defineProperty(_assertThisInitialized(_this), 'isWebGLMultisampleRenderTarget', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\t_this.samples = 4;\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = WebGLMultisampleRenderTarget.prototype;\n\n\t\t_proto.copy = function copy(source) {\n\t\t\t_WebGLRenderTarget.prototype.copy.call(this, source);\n\n\t\t\tthis.samples = source.samples;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn WebGLMultisampleRenderTarget;\n\t}(WebGLRenderTarget);\n\n\tvar Quaternion = /*#__PURE__*/function () {\n\t\tfunction Quaternion(x, y, z, w) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tif (z === void 0) {\n\t\t\t\tz = 0;\n\t\t\t}\n\n\t\t\tif (w === void 0) {\n\t\t\t\tw = 1;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isQuaternion', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\t\t\tthis._w = w;\n\t\t}\n\n\t\tQuaternion.slerp = function slerp(qa, qb, qm, t) {\n\t\t\treturn qm.copy(qa).slerp(qb, t);\n\t\t};\n\n\t\tQuaternion.slerpFlat = function slerpFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1, t) {\n\t\t\t// fuzz-free, array-based Quaternion SLERP operation\n\t\t\tvar x0 = src0[srcOffset0 + 0],\n\t\t\t\t\ty0 = src0[srcOffset0 + 1],\n\t\t\t\t\tz0 = src0[srcOffset0 + 2],\n\t\t\t\t\tw0 = src0[srcOffset0 + 3];\n\t\t\tvar x1 = src1[srcOffset1 + 0],\n\t\t\t\t\ty1 = src1[srcOffset1 + 1],\n\t\t\t\t\tz1 = src1[srcOffset1 + 2],\n\t\t\t\t\tw1 = src1[srcOffset1 + 3];\n\n\t\t\tif (w0 !== w1 || x0 !== x1 || y0 !== y1 || z0 !== z1) {\n\t\t\t\tvar s = 1 - t;\n\t\t\t\tvar cos = x0 * x1 + y0 * y1 + z0 * z1 + w0 * w1,\n\t\t\t\t\t\tdir = cos >= 0 ? 1 : -1,\n\t\t\t\t\t\tsqrSin = 1 - cos * cos; // Skip the Slerp for tiny steps to avoid numeric problems:\n\n\t\t\t\tif (sqrSin > Number.EPSILON) {\n\t\t\t\t\tvar sin = Math.sqrt(sqrSin),\n\t\t\t\t\t\t\tlen = Math.atan2(sin, cos * dir);\n\t\t\t\t\ts = Math.sin(s * len) / sin;\n\t\t\t\t\tt = Math.sin(t * len) / sin;\n\t\t\t\t}\n\n\t\t\t\tvar tDir = t * dir;\n\t\t\t\tx0 = x0 * s + x1 * tDir;\n\t\t\t\ty0 = y0 * s + y1 * tDir;\n\t\t\t\tz0 = z0 * s + z1 * tDir;\n\t\t\t\tw0 = w0 * s + w1 * tDir; // Normalize in case we just did a lerp:\n\n\t\t\t\tif (s === 1 - t) {\n\t\t\t\t\tvar f = 1 / Math.sqrt(x0 * x0 + y0 * y0 + z0 * z0 + w0 * w0);\n\t\t\t\t\tx0 *= f;\n\t\t\t\t\ty0 *= f;\n\t\t\t\t\tz0 *= f;\n\t\t\t\t\tw0 *= f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdst[dstOffset] = x0;\n\t\t\tdst[dstOffset + 1] = y0;\n\t\t\tdst[dstOffset + 2] = z0;\n\t\t\tdst[dstOffset + 3] = w0;\n\t\t};\n\n\t\tQuaternion.multiplyQuaternionsFlat = function multiplyQuaternionsFlat(dst, dstOffset, src0, srcOffset0, src1, srcOffset1) {\n\t\t\tvar x0 = src0[srcOffset0];\n\t\t\tvar y0 = src0[srcOffset0 + 1];\n\t\t\tvar z0 = src0[srcOffset0 + 2];\n\t\t\tvar w0 = src0[srcOffset0 + 3];\n\t\t\tvar x1 = src1[srcOffset1];\n\t\t\tvar y1 = src1[srcOffset1 + 1];\n\t\t\tvar z1 = src1[srcOffset1 + 2];\n\t\t\tvar w1 = src1[srcOffset1 + 3];\n\t\t\tdst[dstOffset] = x0 * w1 + w0 * x1 + y0 * z1 - z0 * y1;\n\t\t\tdst[dstOffset + 1] = y0 * w1 + w0 * y1 + z0 * x1 - x0 * z1;\n\t\t\tdst[dstOffset + 2] = z0 * w1 + w0 * z1 + x0 * y1 - y0 * x1;\n\t\t\tdst[dstOffset + 3] = w0 * w1 - x0 * x1 - y0 * y1 - z0 * z1;\n\t\t\treturn dst;\n\t\t};\n\n\t\tvar _proto = Quaternion.prototype;\n\n\t\t_proto.set = function set(x, y, z, w) {\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\t\t\tthis._w = w;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this._x, this._y, this._z, this._w);\n\t\t};\n\n\t\t_proto.copy = function copy(quaternion) {\n\t\t\tthis._x = quaternion.x;\n\t\t\tthis._y = quaternion.y;\n\t\t\tthis._z = quaternion.z;\n\t\t\tthis._w = quaternion.w;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromEuler = function setFromEuler(euler, update) {\n\t\t\tif (!(euler && euler.isEuler)) {\n\t\t\t\tthrow new Error('THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.');\n\t\t\t}\n\n\t\t\tvar x = euler._x,\n\t\t\t\t\ty = euler._y,\n\t\t\t\t\tz = euler._z,\n\t\t\t\t\torder = euler._order; // http://www.mathworks.com/matlabcentral/fileexchange/\n\t\t\t// \t20696-function-to-convert-between-dcm-euler-angles-quaternions-and-euler-vectors/\n\t\t\t//\tcontent/SpinCalc.m\n\n\t\t\tvar cos = Math.cos;\n\t\t\tvar sin = Math.sin;\n\t\t\tvar c1 = cos(x / 2);\n\t\t\tvar c2 = cos(y / 2);\n\t\t\tvar c3 = cos(z / 2);\n\t\t\tvar s1 = sin(x / 2);\n\t\t\tvar s2 = sin(y / 2);\n\t\t\tvar s3 = sin(z / 2);\n\n\t\t\tswitch (order) {\n\t\t\t\tcase 'XYZ':\n\t\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YXZ':\n\t\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZXY':\n\t\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZYX':\n\t\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YZX':\n\t\t\t\t\tthis._x = s1 * c2 * c3 + c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 + s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 - s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 - s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'XZY':\n\t\t\t\t\tthis._x = s1 * c2 * c3 - c1 * s2 * s3;\n\t\t\t\t\tthis._y = c1 * s2 * c3 - s1 * c2 * s3;\n\t\t\t\t\tthis._z = c1 * c2 * s3 + s1 * s2 * c3;\n\t\t\t\t\tthis._w = c1 * c2 * c3 + s1 * s2 * s3;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.warn('THREE.Quaternion: .setFromEuler() encountered an unknown order: ' + order);\n\t\t\t}\n\n\t\t\tif (update !== false) this._onChangeCallback();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromAxisAngle = function setFromAxisAngle(axis, angle) {\n\t\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/angleToQuaternion/index.htm\n\t\t\t// assumes axis is normalized\n\t\t\tvar halfAngle = angle / 2,\n\t\t\t\t\ts = Math.sin(halfAngle);\n\t\t\tthis._x = axis.x * s;\n\t\t\tthis._y = axis.y * s;\n\t\t\tthis._z = axis.z * s;\n\t\t\tthis._w = Math.cos(halfAngle);\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromRotationMatrix = function setFromRotationMatrix(m) {\n\t\t\t// http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm\n\t\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\t\t\tvar te = m.elements,\n\t\t\t\t\tm11 = te[0],\n\t\t\t\t\tm12 = te[4],\n\t\t\t\t\tm13 = te[8],\n\t\t\t\t\tm21 = te[1],\n\t\t\t\t\tm22 = te[5],\n\t\t\t\t\tm23 = te[9],\n\t\t\t\t\tm31 = te[2],\n\t\t\t\t\tm32 = te[6],\n\t\t\t\t\tm33 = te[10],\n\t\t\t\t\ttrace = m11 + m22 + m33;\n\n\t\t\tif (trace > 0) {\n\t\t\t\tvar s = 0.5 / Math.sqrt(trace + 1.0);\n\t\t\t\tthis._w = 0.25 / s;\n\t\t\t\tthis._x = (m32 - m23) * s;\n\t\t\t\tthis._y = (m13 - m31) * s;\n\t\t\t\tthis._z = (m21 - m12) * s;\n\t\t\t} else if (m11 > m22 && m11 > m33) {\n\t\t\t\tvar _s = 2.0 * Math.sqrt(1.0 + m11 - m22 - m33);\n\n\t\t\t\tthis._w = (m32 - m23) / _s;\n\t\t\t\tthis._x = 0.25 * _s;\n\t\t\t\tthis._y = (m12 + m21) / _s;\n\t\t\t\tthis._z = (m13 + m31) / _s;\n\t\t\t} else if (m22 > m33) {\n\t\t\t\tvar _s2 = 2.0 * Math.sqrt(1.0 + m22 - m11 - m33);\n\n\t\t\t\tthis._w = (m13 - m31) / _s2;\n\t\t\t\tthis._x = (m12 + m21) / _s2;\n\t\t\t\tthis._y = 0.25 * _s2;\n\t\t\t\tthis._z = (m23 + m32) / _s2;\n\t\t\t} else {\n\t\t\t\tvar _s3 = 2.0 * Math.sqrt(1.0 + m33 - m11 - m22);\n\n\t\t\t\tthis._w = (m21 - m12) / _s3;\n\t\t\t\tthis._x = (m13 + m31) / _s3;\n\t\t\t\tthis._y = (m23 + m32) / _s3;\n\t\t\t\tthis._z = 0.25 * _s3;\n\t\t\t}\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromUnitVectors = function setFromUnitVectors(vFrom, vTo) {\n\t\t\t// assumes direction vectors vFrom and vTo are normalized\n\t\t\tvar EPS = 0.000001;\n\t\t\tvar r = vFrom.dot(vTo) + 1;\n\n\t\t\tif (r < EPS) {\n\t\t\t\tr = 0;\n\n\t\t\t\tif (Math.abs(vFrom.x) > Math.abs(vFrom.z)) {\n\t\t\t\t\tthis._x = -vFrom.y;\n\t\t\t\t\tthis._y = vFrom.x;\n\t\t\t\t\tthis._z = 0;\n\t\t\t\t\tthis._w = r;\n\t\t\t\t} else {\n\t\t\t\t\tthis._x = 0;\n\t\t\t\t\tthis._y = -vFrom.z;\n\t\t\t\t\tthis._z = vFrom.y;\n\t\t\t\t\tthis._w = r;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// crossVectors( vFrom, vTo ); // inlined to avoid cyclic dependency on Vector3\n\t\t\t\tthis._x = vFrom.y * vTo.z - vFrom.z * vTo.y;\n\t\t\t\tthis._y = vFrom.z * vTo.x - vFrom.x * vTo.z;\n\t\t\t\tthis._z = vFrom.x * vTo.y - vFrom.y * vTo.x;\n\t\t\t\tthis._w = r;\n\t\t\t}\n\n\t\t\treturn this.normalize();\n\t\t};\n\n\t\t_proto.angleTo = function angleTo(q) {\n\t\t\treturn 2 * Math.acos(Math.abs(MathUtils.clamp(this.dot(q), -1, 1)));\n\t\t};\n\n\t\t_proto.rotateTowards = function rotateTowards(q, step) {\n\t\t\tvar angle = this.angleTo(q);\n\t\t\tif (angle === 0) return this;\n\t\t\tvar t = Math.min(1, step / angle);\n\t\t\tthis.slerp(q, t);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.identity = function identity() {\n\t\t\treturn this.set(0, 0, 0, 1);\n\t\t};\n\n\t\t_proto.invert = function invert() {\n\t\t\t// quaternion is assumed to have unit length\n\t\t\treturn this.conjugate();\n\t\t};\n\n\t\t_proto.conjugate = function conjugate() {\n\t\t\tthis._x *= -1;\n\t\t\tthis._y *= -1;\n\t\t\tthis._z *= -1;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dot = function dot(v) {\n\t\t\treturn this._x * v._x + this._y * v._y + this._z * v._z + this._w * v._w;\n\t\t};\n\n\t\t_proto.lengthSq = function lengthSq() {\n\t\t\treturn this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w;\n\t\t};\n\n\t\t_proto.length = function length() {\n\t\t\treturn Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w);\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\tvar l = this.length();\n\n\t\t\tif (l === 0) {\n\t\t\t\tthis._x = 0;\n\t\t\t\tthis._y = 0;\n\t\t\t\tthis._z = 0;\n\t\t\t\tthis._w = 1;\n\t\t\t} else {\n\t\t\t\tl = 1 / l;\n\t\t\t\tthis._x = this._x * l;\n\t\t\t\tthis._y = this._y * l;\n\t\t\t\tthis._z = this._z * l;\n\t\t\t\tthis._w = this._w * l;\n\t\t\t}\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(q, p) {\n\t\t\tif (p !== undefined) {\n\t\t\t\tconsole.warn('THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead.');\n\t\t\t\treturn this.multiplyQuaternions(q, p);\n\t\t\t}\n\n\t\t\treturn this.multiplyQuaternions(this, q);\n\t\t};\n\n\t\t_proto.premultiply = function premultiply(q) {\n\t\t\treturn this.multiplyQuaternions(q, this);\n\t\t};\n\n\t\t_proto.multiplyQuaternions = function multiplyQuaternions(a, b) {\n\t\t\t// from http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n\t\t\tvar qax = a._x,\n\t\t\t\t\tqay = a._y,\n\t\t\t\t\tqaz = a._z,\n\t\t\t\t\tqaw = a._w;\n\t\t\tvar qbx = b._x,\n\t\t\t\t\tqby = b._y,\n\t\t\t\t\tqbz = b._z,\n\t\t\t\t\tqbw = b._w;\n\t\t\tthis._x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n\t\t\tthis._y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n\t\t\tthis._z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n\t\t\tthis._w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.slerp = function slerp(qb, t) {\n\t\t\tif (t === 0) return this;\n\t\t\tif (t === 1) return this.copy(qb);\n\t\t\tvar x = this._x,\n\t\t\t\t\ty = this._y,\n\t\t\t\t\tz = this._z,\n\t\t\t\t\tw = this._w; // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/slerp/\n\n\t\t\tvar cosHalfTheta = w * qb._w + x * qb._x + y * qb._y + z * qb._z;\n\n\t\t\tif (cosHalfTheta < 0) {\n\t\t\t\tthis._w = -qb._w;\n\t\t\t\tthis._x = -qb._x;\n\t\t\t\tthis._y = -qb._y;\n\t\t\t\tthis._z = -qb._z;\n\t\t\t\tcosHalfTheta = -cosHalfTheta;\n\t\t\t} else {\n\t\t\t\tthis.copy(qb);\n\t\t\t}\n\n\t\t\tif (cosHalfTheta >= 1.0) {\n\t\t\t\tthis._w = w;\n\t\t\t\tthis._x = x;\n\t\t\t\tthis._y = y;\n\t\t\t\tthis._z = z;\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar sqrSinHalfTheta = 1.0 - cosHalfTheta * cosHalfTheta;\n\n\t\t\tif (sqrSinHalfTheta <= Number.EPSILON) {\n\t\t\t\tvar s = 1 - t;\n\t\t\t\tthis._w = s * w + t * this._w;\n\t\t\t\tthis._x = s * x + t * this._x;\n\t\t\t\tthis._y = s * y + t * this._y;\n\t\t\t\tthis._z = s * z + t * this._z;\n\t\t\t\tthis.normalize();\n\n\t\t\t\tthis._onChangeCallback();\n\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar sinHalfTheta = Math.sqrt(sqrSinHalfTheta);\n\t\t\tvar halfTheta = Math.atan2(sinHalfTheta, cosHalfTheta);\n\t\t\tvar ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta,\n\t\t\t\t\tratioB = Math.sin(t * halfTheta) / sinHalfTheta;\n\t\t\tthis._w = w * ratioA + this._w * ratioB;\n\t\t\tthis._x = x * ratioA + this._x * ratioB;\n\t\t\tthis._y = y * ratioA + this._y * ratioB;\n\t\t\tthis._z = z * ratioA + this._z * ratioB;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(quaternion) {\n\t\t\treturn quaternion._x === this._x && quaternion._y === this._y && quaternion._z === this._z && quaternion._w === this._w;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis._x = array[offset];\n\t\t\tthis._y = array[offset + 1];\n\t\t\tthis._z = array[offset + 2];\n\t\t\tthis._w = array[offset + 3];\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this._x;\n\t\t\tarray[offset + 1] = this._y;\n\t\t\tarray[offset + 2] = this._z;\n\t\t\tarray[offset + 3] = this._w;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index) {\n\t\t\tthis._x = attribute.getX(index);\n\t\t\tthis._y = attribute.getY(index);\n\t\t\tthis._z = attribute.getZ(index);\n\t\t\tthis._w = attribute.getW(index);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto._onChange = function _onChange(callback) {\n\t\t\tthis._onChangeCallback = callback;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto._onChangeCallback = function _onChangeCallback() {};\n\n\t\t_createClass(Quaternion, [{\n\t\t\tkey: \"x\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._x;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._x = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"y\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._y;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._y = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"z\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._z;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._z = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"w\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._w;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._w = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}]);\n\n\t\treturn Quaternion;\n\t}();\n\n\tvar Vector3 = /*#__PURE__*/function () {\n\t\tfunction Vector3(x, y, z) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tif (z === void 0) {\n\t\t\t\tz = 0;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isVector3', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.z = z;\n\t\t}\n\n\t\tvar _proto = Vector3.prototype;\n\n\t\t_proto.set = function set(x, y, z) {\n\t\t\tif (z === undefined) z = this.z; // sprite.scale.set(x,y)\n\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t\tthis.z = z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setScalar = function setScalar(scalar) {\n\t\t\tthis.x = scalar;\n\t\t\tthis.y = scalar;\n\t\t\tthis.z = scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setX = function setX(x) {\n\t\t\tthis.x = x;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setY = function setY(y) {\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setZ = function setZ(z) {\n\t\t\tthis.z = z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setComponent = function setComponent(index, value) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.x = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.y = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.z = value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getComponent = function getComponent(index) {\n\t\t\tswitch (index) {\n\t\t\t\tcase 0:\n\t\t\t\t\treturn this.x;\n\n\t\t\t\tcase 1:\n\t\t\t\t\treturn this.y;\n\n\t\t\t\tcase 2:\n\t\t\t\t\treturn this.z;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error('index is out of range: ' + index);\n\t\t\t}\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this.x, this.y, this.z);\n\t\t};\n\n\t\t_proto.copy = function copy(v) {\n\t\t\tthis.x = v.x;\n\t\t\tthis.y = v.y;\n\t\t\tthis.z = v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.add = function add(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead.');\n\t\t\t\treturn this.addVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x += v.x;\n\t\t\tthis.y += v.y;\n\t\t\tthis.z += v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScalar = function addScalar(s) {\n\t\t\tthis.x += s;\n\t\t\tthis.y += s;\n\t\t\tthis.z += s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addVectors = function addVectors(a, b) {\n\t\t\tthis.x = a.x + b.x;\n\t\t\tthis.y = a.y + b.y;\n\t\t\tthis.z = a.z + b.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScaledVector = function addScaledVector(v, s) {\n\t\t\tthis.x += v.x * s;\n\t\t\tthis.y += v.y * s;\n\t\t\tthis.z += v.z * s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.sub = function sub(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead.');\n\t\t\t\treturn this.subVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x -= v.x;\n\t\t\tthis.y -= v.y;\n\t\t\tthis.z -= v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subScalar = function subScalar(s) {\n\t\t\tthis.x -= s;\n\t\t\tthis.y -= s;\n\t\t\tthis.z -= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.subVectors = function subVectors(a, b) {\n\t\t\tthis.x = a.x - b.x;\n\t\t\tthis.y = a.y - b.y;\n\t\t\tthis.z = a.z - b.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead.');\n\t\t\t\treturn this.multiplyVectors(v, w);\n\t\t\t}\n\n\t\t\tthis.x *= v.x;\n\t\t\tthis.y *= v.y;\n\t\t\tthis.z *= v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(scalar) {\n\t\t\tthis.x *= scalar;\n\t\t\tthis.y *= scalar;\n\t\t\tthis.z *= scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyVectors = function multiplyVectors(a, b) {\n\t\t\tthis.x = a.x * b.x;\n\t\t\tthis.y = a.y * b.y;\n\t\t\tthis.z = a.z * b.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyEuler = function applyEuler(euler) {\n\t\t\tif (!(euler && euler.isEuler)) {\n\t\t\t\tconsole.error('THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order.');\n\t\t\t}\n\n\t\t\treturn this.applyQuaternion(_quaternion.setFromEuler(euler));\n\t\t};\n\n\t\t_proto.applyAxisAngle = function applyAxisAngle(axis, angle) {\n\t\t\treturn this.applyQuaternion(_quaternion.setFromAxisAngle(axis, angle));\n\t\t};\n\n\t\t_proto.applyMatrix3 = function applyMatrix3(m) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z;\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[0] * x + e[3] * y + e[6] * z;\n\t\t\tthis.y = e[1] * x + e[4] * y + e[7] * z;\n\t\t\tthis.z = e[2] * x + e[5] * y + e[8] * z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyNormalMatrix = function applyNormalMatrix(m) {\n\t\t\treturn this.applyMatrix3(m).normalize();\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(m) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z;\n\t\t\tvar e = m.elements;\n\t\t\tvar w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]);\n\t\t\tthis.x = (e[0] * x + e[4] * y + e[8] * z + e[12]) * w;\n\t\t\tthis.y = (e[1] * x + e[5] * y + e[9] * z + e[13]) * w;\n\t\t\tthis.z = (e[2] * x + e[6] * y + e[10] * z + e[14]) * w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyQuaternion = function applyQuaternion(q) {\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z;\n\t\t\tvar qx = q.x,\n\t\t\t\t\tqy = q.y,\n\t\t\t\t\tqz = q.z,\n\t\t\t\t\tqw = q.w; // calculate quat * vector\n\n\t\t\tvar ix = qw * x + qy * z - qz * y;\n\t\t\tvar iy = qw * y + qz * x - qx * z;\n\t\t\tvar iz = qw * z + qx * y - qy * x;\n\t\t\tvar iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n\t\t\tthis.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n\t\t\tthis.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n\t\t\tthis.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.project = function project(camera) {\n\t\t\treturn this.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix);\n\t\t};\n\n\t\t_proto.unproject = function unproject(camera) {\n\t\t\treturn this.applyMatrix4(camera.projectionMatrixInverse).applyMatrix4(camera.matrixWorld);\n\t\t};\n\n\t\t_proto.transformDirection = function transformDirection(m) {\n\t\t\t// input: THREE.Matrix4 affine matrix\n\t\t\t// vector interpreted as a direction\n\t\t\tvar x = this.x,\n\t\t\t\t\ty = this.y,\n\t\t\t\t\tz = this.z;\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[0] * x + e[4] * y + e[8] * z;\n\t\t\tthis.y = e[1] * x + e[5] * y + e[9] * z;\n\t\t\tthis.z = e[2] * x + e[6] * y + e[10] * z;\n\t\t\treturn this.normalize();\n\t\t};\n\n\t\t_proto.divide = function divide(v) {\n\t\t\tthis.x /= v.x;\n\t\t\tthis.y /= v.y;\n\t\t\tthis.z /= v.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.divideScalar = function divideScalar(scalar) {\n\t\t\treturn this.multiplyScalar(1 / scalar);\n\t\t};\n\n\t\t_proto.min = function min(v) {\n\t\t\tthis.x = Math.min(this.x, v.x);\n\t\t\tthis.y = Math.min(this.y, v.y);\n\t\t\tthis.z = Math.min(this.z, v.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.max = function max(v) {\n\t\t\tthis.x = Math.max(this.x, v.x);\n\t\t\tthis.y = Math.max(this.y, v.y);\n\t\t\tthis.z = Math.max(this.z, v.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clamp = function clamp(min, max) {\n\t\t\t// assumes min < max, componentwise\n\t\t\tthis.x = Math.max(min.x, Math.min(max.x, this.x));\n\t\t\tthis.y = Math.max(min.y, Math.min(max.y, this.y));\n\t\t\tthis.z = Math.max(min.z, Math.min(max.z, this.z));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampScalar = function clampScalar(minVal, maxVal) {\n\t\t\tthis.x = Math.max(minVal, Math.min(maxVal, this.x));\n\t\t\tthis.y = Math.max(minVal, Math.min(maxVal, this.y));\n\t\t\tthis.z = Math.max(minVal, Math.min(maxVal, this.z));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clampLength = function clampLength(min, max) {\n\t\t\tvar length = this.length();\n\t\t\treturn this.divideScalar(length || 1).multiplyScalar(Math.max(min, Math.min(max, length)));\n\t\t};\n\n\t\t_proto.floor = function floor() {\n\t\t\tthis.x = Math.floor(this.x);\n\t\t\tthis.y = Math.floor(this.y);\n\t\t\tthis.z = Math.floor(this.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.ceil = function ceil() {\n\t\t\tthis.x = Math.ceil(this.x);\n\t\t\tthis.y = Math.ceil(this.y);\n\t\t\tthis.z = Math.ceil(this.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.round = function round() {\n\t\t\tthis.x = Math.round(this.x);\n\t\t\tthis.y = Math.round(this.y);\n\t\t\tthis.z = Math.round(this.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.roundToZero = function roundToZero() {\n\t\t\tthis.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x);\n\t\t\tthis.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y);\n\t\t\tthis.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.negate = function negate() {\n\t\t\tthis.x = -this.x;\n\t\t\tthis.y = -this.y;\n\t\t\tthis.z = -this.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.dot = function dot(v) {\n\t\t\treturn this.x * v.x + this.y * v.y + this.z * v.z;\n\t\t} // TODO lengthSquared?\n\t\t;\n\n\t\t_proto.lengthSq = function lengthSq() {\n\t\t\treturn this.x * this.x + this.y * this.y + this.z * this.z;\n\t\t};\n\n\t\t_proto.length = function length() {\n\t\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n\t\t};\n\n\t\t_proto.manhattanLength = function manhattanLength() {\n\t\t\treturn Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z);\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\treturn this.divideScalar(this.length() || 1);\n\t\t};\n\n\t\t_proto.setLength = function setLength(length) {\n\t\t\treturn this.normalize().multiplyScalar(length);\n\t\t};\n\n\t\t_proto.lerp = function lerp(v, alpha) {\n\t\t\tthis.x += (v.x - this.x) * alpha;\n\t\t\tthis.y += (v.y - this.y) * alpha;\n\t\t\tthis.z += (v.z - this.z) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpVectors = function lerpVectors(v1, v2, alpha) {\n\t\t\tthis.x = v1.x + (v2.x - v1.x) * alpha;\n\t\t\tthis.y = v1.y + (v2.y - v1.y) * alpha;\n\t\t\tthis.z = v1.z + (v2.z - v1.z) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.cross = function cross(v, w) {\n\t\t\tif (w !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead.');\n\t\t\t\treturn this.crossVectors(v, w);\n\t\t\t}\n\n\t\t\treturn this.crossVectors(this, v);\n\t\t};\n\n\t\t_proto.crossVectors = function crossVectors(a, b) {\n\t\t\tvar ax = a.x,\n\t\t\t\t\tay = a.y,\n\t\t\t\t\taz = a.z;\n\t\t\tvar bx = b.x,\n\t\t\t\t\tby = b.y,\n\t\t\t\t\tbz = b.z;\n\t\t\tthis.x = ay * bz - az * by;\n\t\t\tthis.y = az * bx - ax * bz;\n\t\t\tthis.z = ax * by - ay * bx;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.projectOnVector = function projectOnVector(v) {\n\t\t\tvar denominator = v.lengthSq();\n\t\t\tif (denominator === 0) return this.set(0, 0, 0);\n\t\t\tvar scalar = v.dot(this) / denominator;\n\t\t\treturn this.copy(v).multiplyScalar(scalar);\n\t\t};\n\n\t\t_proto.projectOnPlane = function projectOnPlane(planeNormal) {\n\t\t\t_vector.copy(this).projectOnVector(planeNormal);\n\n\t\t\treturn this.sub(_vector);\n\t\t};\n\n\t\t_proto.reflect = function reflect(normal) {\n\t\t\t// reflect incident vector off plane orthogonal to normal\n\t\t\t// normal is assumed to have unit length\n\t\t\treturn this.sub(_vector.copy(normal).multiplyScalar(2 * this.dot(normal)));\n\t\t};\n\n\t\t_proto.angleTo = function angleTo(v) {\n\t\t\tvar denominator = Math.sqrt(this.lengthSq() * v.lengthSq());\n\t\t\tif (denominator === 0) return Math.PI / 2;\n\t\t\tvar theta = this.dot(v) / denominator; // clamp, to handle numerical problems\n\n\t\t\treturn Math.acos(MathUtils.clamp(theta, -1, 1));\n\t\t};\n\n\t\t_proto.distanceTo = function distanceTo(v) {\n\t\t\treturn Math.sqrt(this.distanceToSquared(v));\n\t\t};\n\n\t\t_proto.distanceToSquared = function distanceToSquared(v) {\n\t\t\tvar dx = this.x - v.x,\n\t\t\t\t\tdy = this.y - v.y,\n\t\t\t\t\tdz = this.z - v.z;\n\t\t\treturn dx * dx + dy * dy + dz * dz;\n\t\t};\n\n\t\t_proto.manhattanDistanceTo = function manhattanDistanceTo(v) {\n\t\t\treturn Math.abs(this.x - v.x) + Math.abs(this.y - v.y) + Math.abs(this.z - v.z);\n\t\t};\n\n\t\t_proto.setFromSpherical = function setFromSpherical(s) {\n\t\t\treturn this.setFromSphericalCoords(s.radius, s.phi, s.theta);\n\t\t};\n\n\t\t_proto.setFromSphericalCoords = function setFromSphericalCoords(radius, phi, theta) {\n\t\t\tvar sinPhiRadius = Math.sin(phi) * radius;\n\t\t\tthis.x = sinPhiRadius * Math.sin(theta);\n\t\t\tthis.y = Math.cos(phi) * radius;\n\t\t\tthis.z = sinPhiRadius * Math.cos(theta);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromCylindrical = function setFromCylindrical(c) {\n\t\t\treturn this.setFromCylindricalCoords(c.radius, c.theta, c.y);\n\t\t};\n\n\t\t_proto.setFromCylindricalCoords = function setFromCylindricalCoords(radius, theta, y) {\n\t\t\tthis.x = radius * Math.sin(theta);\n\t\t\tthis.y = y;\n\t\t\tthis.z = radius * Math.cos(theta);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrixPosition = function setFromMatrixPosition(m) {\n\t\t\tvar e = m.elements;\n\t\t\tthis.x = e[12];\n\t\t\tthis.y = e[13];\n\t\t\tthis.z = e[14];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrixScale = function setFromMatrixScale(m) {\n\t\t\tvar sx = this.setFromMatrixColumn(m, 0).length();\n\t\t\tvar sy = this.setFromMatrixColumn(m, 1).length();\n\t\t\tvar sz = this.setFromMatrixColumn(m, 2).length();\n\t\t\tthis.x = sx;\n\t\t\tthis.y = sy;\n\t\t\tthis.z = sz;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrixColumn = function setFromMatrixColumn(m, index) {\n\t\t\treturn this.fromArray(m.elements, index * 4);\n\t\t};\n\n\t\t_proto.setFromMatrix3Column = function setFromMatrix3Column(m, index) {\n\t\t\treturn this.fromArray(m.elements, index * 3);\n\t\t};\n\n\t\t_proto.equals = function equals(v) {\n\t\t\treturn v.x === this.x && v.y === this.y && v.z === this.z;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.x = array[offset];\n\t\t\tthis.y = array[offset + 1];\n\t\t\tthis.z = array[offset + 2];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this.x;\n\t\t\tarray[offset + 1] = this.y;\n\t\t\tarray[offset + 2] = this.z;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index, offset) {\n\t\t\tif (offset !== undefined) {\n\t\t\t\tconsole.warn('THREE.Vector3: offset has been removed from .fromBufferAttribute().');\n\t\t\t}\n\n\t\t\tthis.x = attribute.getX(index);\n\t\t\tthis.y = attribute.getY(index);\n\t\t\tthis.z = attribute.getZ(index);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.random = function random() {\n\t\t\tthis.x = Math.random();\n\t\t\tthis.y = Math.random();\n\t\t\tthis.z = Math.random();\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Vector3;\n\t}();\n\n\tvar _vector = /*@__PURE__*/new Vector3();\n\n\tvar _quaternion = /*@__PURE__*/new Quaternion();\n\n\tvar Box3 = /*#__PURE__*/function () {\n\t\tfunction Box3(min, max) {\n\t\t\tObject.defineProperty(this, 'isBox3', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.min = min !== undefined ? min : new Vector3(+Infinity, +Infinity, +Infinity);\n\t\t\tthis.max = max !== undefined ? max : new Vector3(-Infinity, -Infinity, -Infinity);\n\t\t}\n\n\t\tvar _proto = Box3.prototype;\n\n\t\t_proto.set = function set(min, max) {\n\t\t\tthis.min.copy(min);\n\t\t\tthis.max.copy(max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromArray = function setFromArray(array) {\n\t\t\tvar minX = +Infinity;\n\t\t\tvar minY = +Infinity;\n\t\t\tvar minZ = +Infinity;\n\t\t\tvar maxX = -Infinity;\n\t\t\tvar maxY = -Infinity;\n\t\t\tvar maxZ = -Infinity;\n\n\t\t\tfor (var i = 0, l = array.length; i < l; i += 3) {\n\t\t\t\tvar x = array[i];\n\t\t\t\tvar y = array[i + 1];\n\t\t\t\tvar z = array[i + 2];\n\t\t\t\tif (x < minX) minX = x;\n\t\t\t\tif (y < minY) minY = y;\n\t\t\t\tif (z < minZ) minZ = z;\n\t\t\t\tif (x > maxX) maxX = x;\n\t\t\t\tif (y > maxY) maxY = y;\n\t\t\t\tif (z > maxZ) maxZ = z;\n\t\t\t}\n\n\t\t\tthis.min.set(minX, minY, minZ);\n\t\t\tthis.max.set(maxX, maxY, maxZ);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromBufferAttribute = function setFromBufferAttribute(attribute) {\n\t\t\tvar minX = +Infinity;\n\t\t\tvar minY = +Infinity;\n\t\t\tvar minZ = +Infinity;\n\t\t\tvar maxX = -Infinity;\n\t\t\tvar maxY = -Infinity;\n\t\t\tvar maxZ = -Infinity;\n\n\t\t\tfor (var i = 0, l = attribute.count; i < l; i++) {\n\t\t\t\tvar x = attribute.getX(i);\n\t\t\t\tvar y = attribute.getY(i);\n\t\t\t\tvar z = attribute.getZ(i);\n\t\t\t\tif (x < minX) minX = x;\n\t\t\t\tif (y < minY) minY = y;\n\t\t\t\tif (z < minZ) minZ = z;\n\t\t\t\tif (x > maxX) maxX = x;\n\t\t\t\tif (y > maxY) maxY = y;\n\t\t\t\tif (z > maxZ) maxZ = z;\n\t\t\t}\n\n\t\t\tthis.min.set(minX, minY, minZ);\n\t\t\tthis.max.set(maxX, maxY, maxZ);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromPoints = function setFromPoints(points) {\n\t\t\tthis.makeEmpty();\n\n\t\t\tfor (var i = 0, il = points.length; i < il; i++) {\n\t\t\t\tthis.expandByPoint(points[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromCenterAndSize = function setFromCenterAndSize(center, size) {\n\t\t\tvar halfSize = _vector$1.copy(size).multiplyScalar(0.5);\n\n\t\t\tthis.min.copy(center).sub(halfSize);\n\t\t\tthis.max.copy(center).add(halfSize);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromObject = function setFromObject(object) {\n\t\t\tthis.makeEmpty();\n\t\t\treturn this.expandByObject(object);\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(box) {\n\t\t\tthis.min.copy(box.min);\n\t\t\tthis.max.copy(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeEmpty = function makeEmpty() {\n\t\t\tthis.min.x = this.min.y = this.min.z = +Infinity;\n\t\t\tthis.max.x = this.max.y = this.max.z = -Infinity;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.isEmpty = function isEmpty() {\n\t\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\t\t\treturn this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z;\n\t\t};\n\n\t\t_proto.getCenter = function getCenter(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box3: .getCenter() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn this.isEmpty() ? target.set(0, 0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);\n\t\t};\n\n\t\t_proto.getSize = function getSize(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box3: .getSize() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn this.isEmpty() ? target.set(0, 0, 0) : target.subVectors(this.max, this.min);\n\t\t};\n\n\t\t_proto.expandByPoint = function expandByPoint(point) {\n\t\t\tthis.min.min(point);\n\t\t\tthis.max.max(point);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByVector = function expandByVector(vector) {\n\t\t\tthis.min.sub(vector);\n\t\t\tthis.max.add(vector);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByScalar = function expandByScalar(scalar) {\n\t\t\tthis.min.addScalar(-scalar);\n\t\t\tthis.max.addScalar(scalar);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByObject = function expandByObject(object) {\n\t\t\t// Computes the world-axis-aligned bounding box of an object (including its children),\n\t\t\t// accounting for both the object's, and children's, world transforms\n\t\t\tobject.updateWorldMatrix(false, false);\n\t\t\tvar geometry = object.geometry;\n\n\t\t\tif (geometry !== undefined) {\n\t\t\t\tif (geometry.boundingBox === null) {\n\t\t\t\t\tgeometry.computeBoundingBox();\n\t\t\t\t}\n\n\t\t\t\t_box.copy(geometry.boundingBox);\n\n\t\t\t\t_box.applyMatrix4(object.matrixWorld);\n\n\t\t\t\tthis.union(_box);\n\t\t\t}\n\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tthis.expandByObject(children[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\treturn point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y || point.z < this.min.z || point.z > this.max.z ? false : true;\n\t\t};\n\n\t\t_proto.containsBox = function containsBox(box) {\n\t\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y && this.min.z <= box.min.z && box.max.z <= this.max.z;\n\t\t};\n\n\t\t_proto.getParameter = function getParameter(point, target) {\n\t\t\t// This can potentially have a divide by zero if the box\n\t\t\t// has a size dimension of 0.\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box3: .getParameter() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y), (point.z - this.min.z) / (this.max.z - this.min.z));\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\t// using 6 splitting planes to rule out intersections.\n\t\t\treturn box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y || box.max.z < this.min.z || box.min.z > this.max.z ? false : true;\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\t// Find the point on the AABB closest to the sphere center.\n\t\t\tthis.clampPoint(sphere.center, _vector$1); // If that point is inside the sphere, the AABB and sphere intersect.\n\n\t\t\treturn _vector$1.distanceToSquared(sphere.center) <= sphere.radius * sphere.radius;\n\t\t};\n\n\t\t_proto.intersectsPlane = function intersectsPlane(plane) {\n\t\t\t// We compute the minimum and maximum dot product values. If those values\n\t\t\t// are on the same side (back or front) of the plane, then there is no intersection.\n\t\t\tvar min, max;\n\n\t\t\tif (plane.normal.x > 0) {\n\t\t\t\tmin = plane.normal.x * this.min.x;\n\t\t\t\tmax = plane.normal.x * this.max.x;\n\t\t\t} else {\n\t\t\t\tmin = plane.normal.x * this.max.x;\n\t\t\t\tmax = plane.normal.x * this.min.x;\n\t\t\t}\n\n\t\t\tif (plane.normal.y > 0) {\n\t\t\t\tmin += plane.normal.y * this.min.y;\n\t\t\t\tmax += plane.normal.y * this.max.y;\n\t\t\t} else {\n\t\t\t\tmin += plane.normal.y * this.max.y;\n\t\t\t\tmax += plane.normal.y * this.min.y;\n\t\t\t}\n\n\t\t\tif (plane.normal.z > 0) {\n\t\t\t\tmin += plane.normal.z * this.min.z;\n\t\t\t\tmax += plane.normal.z * this.max.z;\n\t\t\t} else {\n\t\t\t\tmin += plane.normal.z * this.max.z;\n\t\t\t\tmax += plane.normal.z * this.min.z;\n\t\t\t}\n\n\t\t\treturn min <= -plane.constant && max >= -plane.constant;\n\t\t};\n\n\t\t_proto.intersectsTriangle = function intersectsTriangle(triangle) {\n\t\t\tif (this.isEmpty()) {\n\t\t\t\treturn false;\n\t\t\t} // compute box center and extents\n\n\n\t\t\tthis.getCenter(_center);\n\n\t\t\t_extents.subVectors(this.max, _center); // translate triangle to aabb origin\n\n\n\t\t\t_v0.subVectors(triangle.a, _center);\n\n\t\t\t_v1.subVectors(triangle.b, _center);\n\n\t\t\t_v2.subVectors(triangle.c, _center); // compute edge vectors for triangle\n\n\n\t\t\t_f0.subVectors(_v1, _v0);\n\n\t\t\t_f1.subVectors(_v2, _v1);\n\n\t\t\t_f2.subVectors(_v0, _v2); // test against axes that are given by cross product combinations of the edges of the triangle and the edges of the aabb\n\t\t\t// make an axis testing of each of the 3 sides of the aabb against each of the 3 sides of the triangle = 9 axis of separation\n\t\t\t// axis_ij = u_i x f_j (u0, u1, u2 = face normals of aabb = x,y,z axes vectors since aabb is axis aligned)\n\n\n\t\t\tvar axes = [0, -_f0.z, _f0.y, 0, -_f1.z, _f1.y, 0, -_f2.z, _f2.y, _f0.z, 0, -_f0.x, _f1.z, 0, -_f1.x, _f2.z, 0, -_f2.x, -_f0.y, _f0.x, 0, -_f1.y, _f1.x, 0, -_f2.y, _f2.x, 0];\n\n\t\t\tif (!satForAxes(axes, _v0, _v1, _v2, _extents)) {\n\t\t\t\treturn false;\n\t\t\t} // test 3 face normals from the aabb\n\n\n\t\t\taxes = [1, 0, 0, 0, 1, 0, 0, 0, 1];\n\n\t\t\tif (!satForAxes(axes, _v0, _v1, _v2, _extents)) {\n\t\t\t\treturn false;\n\t\t\t} // finally testing the face normal of the triangle\n\t\t\t// use already existing triangle edge vectors here\n\n\n\t\t\t_triangleNormal.crossVectors(_f0, _f1);\n\n\t\t\taxes = [_triangleNormal.x, _triangleNormal.y, _triangleNormal.z];\n\t\t\treturn satForAxes(axes, _v0, _v1, _v2, _extents);\n\t\t};\n\n\t\t_proto.clampPoint = function clampPoint(point, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box3: .clampPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.copy(point).clamp(this.min, this.max);\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\tvar clampedPoint = _vector$1.copy(point).clamp(this.min, this.max);\n\n\t\t\treturn clampedPoint.sub(point).length();\n\t\t};\n\n\t\t_proto.getBoundingSphere = function getBoundingSphere(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.error('THREE.Box3: .getBoundingSphere() target is now required'); //target = new Sphere(); // removed to avoid cyclic dependency\n\t\t\t}\n\n\t\t\tthis.getCenter(target.center);\n\t\t\ttarget.radius = this.getSize(_vector$1).length() * 0.5;\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.intersect = function intersect(box) {\n\t\t\tthis.min.max(box.min);\n\t\t\tthis.max.min(box.max); // ensure that if there is no overlap, the result is fully empty, not slightly empty with non-inf/+inf values that will cause subsequence intersects to erroneously return valid values.\n\n\t\t\tif (this.isEmpty()) this.makeEmpty();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.union = function union(box) {\n\t\t\tthis.min.min(box.min);\n\t\t\tthis.max.max(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix) {\n\t\t\t// transform of empty box is an empty box.\n\t\t\tif (this.isEmpty()) return this; // NOTE: I am using a binary pattern to specify all 2^3 combinations below\n\n\t\t\t_points[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(matrix); // 000\n\n\n\t\t\t_points[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(matrix); // 001\n\n\n\t\t\t_points[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(matrix); // 010\n\n\n\t\t\t_points[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(matrix); // 011\n\n\n\t\t\t_points[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(matrix); // 100\n\n\n\t\t\t_points[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(matrix); // 101\n\n\n\t\t\t_points[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(matrix); // 110\n\n\n\t\t\t_points[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(matrix); // 111\n\n\n\t\t\tthis.setFromPoints(_points);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(offset) {\n\t\t\tthis.min.add(offset);\n\t\t\tthis.max.add(offset);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(box) {\n\t\t\treturn box.min.equals(this.min) && box.max.equals(this.max);\n\t\t};\n\n\t\treturn Box3;\n\t}();\n\n\tfunction satForAxes(axes, v0, v1, v2, extents) {\n\t\tfor (var i = 0, j = axes.length - 3; i <= j; i += 3) {\n\t\t\t_testAxis.fromArray(axes, i); // project the aabb onto the seperating axis\n\n\n\t\t\tvar r = extents.x * Math.abs(_testAxis.x) + extents.y * Math.abs(_testAxis.y) + extents.z * Math.abs(_testAxis.z); // project all 3 vertices of the triangle onto the seperating axis\n\n\t\t\tvar p0 = v0.dot(_testAxis);\n\t\t\tvar p1 = v1.dot(_testAxis);\n\t\t\tvar p2 = v2.dot(_testAxis); // actual test, basically see if either of the most extreme of the triangle points intersects r\n\n\t\t\tif (Math.max(-Math.max(p0, p1, p2), Math.min(p0, p1, p2)) > r) {\n\t\t\t\t// points of the projected triangle are outside the projected half-length of the aabb\n\t\t\t\t// the axis is seperating and we can exit\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tvar _points = [/*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3(), /*@__PURE__*/new Vector3()];\n\n\tvar _vector$1 = /*@__PURE__*/new Vector3();\n\n\tvar _box = /*@__PURE__*/new Box3(); // triangle centered vertices\n\n\n\tvar _v0 = /*@__PURE__*/new Vector3();\n\n\tvar _v1 = /*@__PURE__*/new Vector3();\n\n\tvar _v2 = /*@__PURE__*/new Vector3(); // triangle edge vectors\n\n\n\tvar _f0 = /*@__PURE__*/new Vector3();\n\n\tvar _f1 = /*@__PURE__*/new Vector3();\n\n\tvar _f2 = /*@__PURE__*/new Vector3();\n\n\tvar _center = /*@__PURE__*/new Vector3();\n\n\tvar _extents = /*@__PURE__*/new Vector3();\n\n\tvar _triangleNormal = /*@__PURE__*/new Vector3();\n\n\tvar _testAxis = /*@__PURE__*/new Vector3();\n\n\tvar _box$1 = /*@__PURE__*/new Box3();\n\n\tvar Sphere = /*#__PURE__*/function () {\n\t\tfunction Sphere(center, radius) {\n\t\t\tthis.center = center !== undefined ? center : new Vector3();\n\t\t\tthis.radius = radius !== undefined ? radius : -1;\n\t\t}\n\n\t\tvar _proto = Sphere.prototype;\n\n\t\t_proto.set = function set(center, radius) {\n\t\t\tthis.center.copy(center);\n\t\t\tthis.radius = radius;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromPoints = function setFromPoints(points, optionalCenter) {\n\t\t\tvar center = this.center;\n\n\t\t\tif (optionalCenter !== undefined) {\n\t\t\t\tcenter.copy(optionalCenter);\n\t\t\t} else {\n\t\t\t\t_box$1.setFromPoints(points).getCenter(center);\n\t\t\t}\n\n\t\t\tvar maxRadiusSq = 0;\n\n\t\t\tfor (var i = 0, il = points.length; i < il; i++) {\n\t\t\t\tmaxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(points[i]));\n\t\t\t}\n\n\t\t\tthis.radius = Math.sqrt(maxRadiusSq);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(sphere) {\n\t\t\tthis.center.copy(sphere.center);\n\t\t\tthis.radius = sphere.radius;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.isEmpty = function isEmpty() {\n\t\t\treturn this.radius < 0;\n\t\t};\n\n\t\t_proto.makeEmpty = function makeEmpty() {\n\t\t\tthis.center.set(0, 0, 0);\n\t\t\tthis.radius = -1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\treturn point.distanceToSquared(this.center) <= this.radius * this.radius;\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\treturn point.distanceTo(this.center) - this.radius;\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\tvar radiusSum = this.radius + sphere.radius;\n\t\t\treturn sphere.center.distanceToSquared(this.center) <= radiusSum * radiusSum;\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\treturn box.intersectsSphere(this);\n\t\t};\n\n\t\t_proto.intersectsPlane = function intersectsPlane(plane) {\n\t\t\treturn Math.abs(plane.distanceToPoint(this.center)) <= this.radius;\n\t\t};\n\n\t\t_proto.clampPoint = function clampPoint(point, target) {\n\t\t\tvar deltaLengthSq = this.center.distanceToSquared(point);\n\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Sphere: .clampPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\ttarget.copy(point);\n\n\t\t\tif (deltaLengthSq > this.radius * this.radius) {\n\t\t\t\ttarget.sub(this.center).normalize();\n\t\t\t\ttarget.multiplyScalar(this.radius).add(this.center);\n\t\t\t}\n\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.getBoundingBox = function getBoundingBox(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Sphere: .getBoundingBox() target is now required');\n\t\t\t\ttarget = new Box3();\n\t\t\t}\n\n\t\t\tif (this.isEmpty()) {\n\t\t\t\t// Empty sphere produces empty bounding box\n\t\t\t\ttarget.makeEmpty();\n\t\t\t\treturn target;\n\t\t\t}\n\n\t\t\ttarget.set(this.center, this.center);\n\t\t\ttarget.expandByScalar(this.radius);\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix) {\n\t\t\tthis.center.applyMatrix4(matrix);\n\t\t\tthis.radius = this.radius * matrix.getMaxScaleOnAxis();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(offset) {\n\t\t\tthis.center.add(offset);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(sphere) {\n\t\t\treturn sphere.center.equals(this.center) && sphere.radius === this.radius;\n\t\t};\n\n\t\treturn Sphere;\n\t}();\n\n\tvar _vector$2 = /*@__PURE__*/new Vector3();\n\n\tvar _segCenter = /*@__PURE__*/new Vector3();\n\n\tvar _segDir = /*@__PURE__*/new Vector3();\n\n\tvar _diff = /*@__PURE__*/new Vector3();\n\n\tvar _edge1 = /*@__PURE__*/new Vector3();\n\n\tvar _edge2 = /*@__PURE__*/new Vector3();\n\n\tvar _normal = /*@__PURE__*/new Vector3();\n\n\tvar Ray = /*#__PURE__*/function () {\n\t\tfunction Ray(origin, direction) {\n\t\t\tthis.origin = origin !== undefined ? origin : new Vector3();\n\t\t\tthis.direction = direction !== undefined ? direction : new Vector3(0, 0, -1);\n\t\t}\n\n\t\tvar _proto = Ray.prototype;\n\n\t\t_proto.set = function set(origin, direction) {\n\t\t\tthis.origin.copy(origin);\n\t\t\tthis.direction.copy(direction);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(ray) {\n\t\t\tthis.origin.copy(ray.origin);\n\t\t\tthis.direction.copy(ray.direction);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.at = function at(t, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Ray: .at() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.copy(this.direction).multiplyScalar(t).add(this.origin);\n\t\t};\n\n\t\t_proto.lookAt = function lookAt(v) {\n\t\t\tthis.direction.copy(v).sub(this.origin).normalize();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.recast = function recast(t) {\n\t\t\tthis.origin.copy(this.at(t, _vector$2));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.closestPointToPoint = function closestPointToPoint(point, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Ray: .closestPointToPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\ttarget.subVectors(point, this.origin);\n\t\t\tvar directionDistance = target.dot(this.direction);\n\n\t\t\tif (directionDistance < 0) {\n\t\t\t\treturn target.copy(this.origin);\n\t\t\t}\n\n\t\t\treturn target.copy(this.direction).multiplyScalar(directionDistance).add(this.origin);\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\treturn Math.sqrt(this.distanceSqToPoint(point));\n\t\t};\n\n\t\t_proto.distanceSqToPoint = function distanceSqToPoint(point) {\n\t\t\tvar directionDistance = _vector$2.subVectors(point, this.origin).dot(this.direction); // point behind the ray\n\n\n\t\t\tif (directionDistance < 0) {\n\t\t\t\treturn this.origin.distanceToSquared(point);\n\t\t\t}\n\n\t\t\t_vector$2.copy(this.direction).multiplyScalar(directionDistance).add(this.origin);\n\n\t\t\treturn _vector$2.distanceToSquared(point);\n\t\t};\n\n\t\t_proto.distanceSqToSegment = function distanceSqToSegment(v0, v1, optionalPointOnRay, optionalPointOnSegment) {\n\t\t\t// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteDistRaySegment.h\n\t\t\t// It returns the min distance between the ray and the segment\n\t\t\t// defined by v0 and v1\n\t\t\t// It can also set two optional targets :\n\t\t\t// - The closest point on the ray\n\t\t\t// - The closest point on the segment\n\t\t\t_segCenter.copy(v0).add(v1).multiplyScalar(0.5);\n\n\t\t\t_segDir.copy(v1).sub(v0).normalize();\n\n\t\t\t_diff.copy(this.origin).sub(_segCenter);\n\n\t\t\tvar segExtent = v0.distanceTo(v1) * 0.5;\n\t\t\tvar a01 = -this.direction.dot(_segDir);\n\n\t\t\tvar b0 = _diff.dot(this.direction);\n\n\t\t\tvar b1 = -_diff.dot(_segDir);\n\n\t\t\tvar c = _diff.lengthSq();\n\n\t\t\tvar det = Math.abs(1 - a01 * a01);\n\t\t\tvar s0, s1, sqrDist, extDet;\n\n\t\t\tif (det > 0) {\n\t\t\t\t// The ray and segment are not parallel.\n\t\t\t\ts0 = a01 * b1 - b0;\n\t\t\t\ts1 = a01 * b0 - b1;\n\t\t\t\textDet = segExtent * det;\n\n\t\t\t\tif (s0 >= 0) {\n\t\t\t\t\tif (s1 >= -extDet) {\n\t\t\t\t\t\tif (s1 <= extDet) {\n\t\t\t\t\t\t\t// region 0\n\t\t\t\t\t\t\t// Minimum at interior points of ray and segment.\n\t\t\t\t\t\t\tvar invDet = 1 / det;\n\t\t\t\t\t\t\ts0 *= invDet;\n\t\t\t\t\t\t\ts1 *= invDet;\n\t\t\t\t\t\t\tsqrDist = s0 * (s0 + a01 * s1 + 2 * b0) + s1 * (a01 * s0 + s1 + 2 * b1) + c;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// region 1\n\t\t\t\t\t\t\ts1 = segExtent;\n\t\t\t\t\t\t\ts0 = Math.max(0, -(a01 * s1 + b0));\n\t\t\t\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// region 5\n\t\t\t\t\t\ts1 = -segExtent;\n\t\t\t\t\t\ts0 = Math.max(0, -(a01 * s1 + b0));\n\t\t\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (s1 <= -extDet) {\n\t\t\t\t\t\t// region 4\n\t\t\t\t\t\ts0 = Math.max(0, -(-a01 * segExtent + b0));\n\t\t\t\t\t\ts1 = s0 > 0 ? -segExtent : Math.min(Math.max(-segExtent, -b1), segExtent);\n\t\t\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t} else if (s1 <= extDet) {\n\t\t\t\t\t\t// region 3\n\t\t\t\t\t\ts0 = 0;\n\t\t\t\t\t\ts1 = Math.min(Math.max(-segExtent, -b1), segExtent);\n\t\t\t\t\t\tsqrDist = s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// region 2\n\t\t\t\t\t\ts0 = Math.max(0, -(a01 * segExtent + b0));\n\t\t\t\t\t\ts1 = s0 > 0 ? segExtent : Math.min(Math.max(-segExtent, -b1), segExtent);\n\t\t\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Ray and segment are parallel.\n\t\t\t\ts1 = a01 > 0 ? -segExtent : segExtent;\n\t\t\t\ts0 = Math.max(0, -(a01 * s1 + b0));\n\t\t\t\tsqrDist = -s0 * s0 + s1 * (s1 + 2 * b1) + c;\n\t\t\t}\n\n\t\t\tif (optionalPointOnRay) {\n\t\t\t\toptionalPointOnRay.copy(this.direction).multiplyScalar(s0).add(this.origin);\n\t\t\t}\n\n\t\t\tif (optionalPointOnSegment) {\n\t\t\t\toptionalPointOnSegment.copy(_segDir).multiplyScalar(s1).add(_segCenter);\n\t\t\t}\n\n\t\t\treturn sqrDist;\n\t\t};\n\n\t\t_proto.intersectSphere = function intersectSphere(sphere, target) {\n\t\t\t_vector$2.subVectors(sphere.center, this.origin);\n\n\t\t\tvar tca = _vector$2.dot(this.direction);\n\n\t\t\tvar d2 = _vector$2.dot(_vector$2) - tca * tca;\n\t\t\tvar radius2 = sphere.radius * sphere.radius;\n\t\t\tif (d2 > radius2) return null;\n\t\t\tvar thc = Math.sqrt(radius2 - d2); // t0 = first intersect point - entrance on front of sphere\n\n\t\t\tvar t0 = tca - thc; // t1 = second intersect point - exit point on back of sphere\n\n\t\t\tvar t1 = tca + thc; // test to see if both t0 and t1 are behind the ray - if so, return null\n\n\t\t\tif (t0 < 0 && t1 < 0) return null; // test to see if t0 is behind the ray:\n\t\t\t// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,\n\t\t\t// in order to always return an intersect point that is in front of the ray.\n\n\t\t\tif (t0 < 0) return this.at(t1, target); // else t0 is in front of the ray, so return the first collision point scaled by t0\n\n\t\t\treturn this.at(t0, target);\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\treturn this.distanceSqToPoint(sphere.center) <= sphere.radius * sphere.radius;\n\t\t};\n\n\t\t_proto.distanceToPlane = function distanceToPlane(plane) {\n\t\t\tvar denominator = plane.normal.dot(this.direction);\n\n\t\t\tif (denominator === 0) {\n\t\t\t\t// line is coplanar, return origin\n\t\t\t\tif (plane.distanceToPoint(this.origin) === 0) {\n\t\t\t\t\treturn 0;\n\t\t\t\t} // Null is preferable to undefined since undefined means.... it is undefined\n\n\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar t = -(this.origin.dot(plane.normal) + plane.constant) / denominator; // Return if the ray never intersects the plane\n\n\t\t\treturn t >= 0 ? t : null;\n\t\t};\n\n\t\t_proto.intersectPlane = function intersectPlane(plane, target) {\n\t\t\tvar t = this.distanceToPlane(plane);\n\n\t\t\tif (t === null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn this.at(t, target);\n\t\t};\n\n\t\t_proto.intersectsPlane = function intersectsPlane(plane) {\n\t\t\t// check if the ray lies on the plane first\n\t\t\tvar distToPoint = plane.distanceToPoint(this.origin);\n\n\t\t\tif (distToPoint === 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tvar denominator = plane.normal.dot(this.direction);\n\n\t\t\tif (denominator * distToPoint < 0) {\n\t\t\t\treturn true;\n\t\t\t} // ray origin is behind the plane (and is pointing behind it)\n\n\n\t\t\treturn false;\n\t\t};\n\n\t\t_proto.intersectBox = function intersectBox(box, target) {\n\t\t\tvar tmin, tmax, tymin, tymax, tzmin, tzmax;\n\t\t\tvar invdirx = 1 / this.direction.x,\n\t\t\t\t\tinvdiry = 1 / this.direction.y,\n\t\t\t\t\tinvdirz = 1 / this.direction.z;\n\t\t\tvar origin = this.origin;\n\n\t\t\tif (invdirx >= 0) {\n\t\t\t\ttmin = (box.min.x - origin.x) * invdirx;\n\t\t\t\ttmax = (box.max.x - origin.x) * invdirx;\n\t\t\t} else {\n\t\t\t\ttmin = (box.max.x - origin.x) * invdirx;\n\t\t\t\ttmax = (box.min.x - origin.x) * invdirx;\n\t\t\t}\n\n\t\t\tif (invdiry >= 0) {\n\t\t\t\ttymin = (box.min.y - origin.y) * invdiry;\n\t\t\t\ttymax = (box.max.y - origin.y) * invdiry;\n\t\t\t} else {\n\t\t\t\ttymin = (box.max.y - origin.y) * invdiry;\n\t\t\t\ttymax = (box.min.y - origin.y) * invdiry;\n\t\t\t}\n\n\t\t\tif (tmin > tymax || tymin > tmax) return null; // These lines also handle the case where tmin or tmax is NaN\n\t\t\t// (result of 0 * Infinity). x !== x returns true if x is NaN\n\n\t\t\tif (tymin > tmin || tmin !== tmin) tmin = tymin;\n\t\t\tif (tymax < tmax || tmax !== tmax) tmax = tymax;\n\n\t\t\tif (invdirz >= 0) {\n\t\t\t\ttzmin = (box.min.z - origin.z) * invdirz;\n\t\t\t\ttzmax = (box.max.z - origin.z) * invdirz;\n\t\t\t} else {\n\t\t\t\ttzmin = (box.max.z - origin.z) * invdirz;\n\t\t\t\ttzmax = (box.min.z - origin.z) * invdirz;\n\t\t\t}\n\n\t\t\tif (tmin > tzmax || tzmin > tmax) return null;\n\t\t\tif (tzmin > tmin || tmin !== tmin) tmin = tzmin;\n\t\t\tif (tzmax < tmax || tmax !== tmax) tmax = tzmax; //return point closest to the ray (positive side)\n\n\t\t\tif (tmax < 0) return null;\n\t\t\treturn this.at(tmin >= 0 ? tmin : tmax, target);\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\treturn this.intersectBox(box, _vector$2) !== null;\n\t\t};\n\n\t\t_proto.intersectTriangle = function intersectTriangle(a, b, c, backfaceCulling, target) {\n\t\t\t// Compute the offset origin, edges, and normal.\n\t\t\t// from http://www.geometrictools.com/GTEngine/Include/Mathematics/GteIntrRay3Triangle3.h\n\t\t\t_edge1.subVectors(b, a);\n\n\t\t\t_edge2.subVectors(c, a);\n\n\t\t\t_normal.crossVectors(_edge1, _edge2); // Solve Q + t*D = b1*E1 + b2*E2 (Q = kDiff, D = ray direction,\n\t\t\t// E1 = kEdge1, E2 = kEdge2, N = Cross(E1,E2)) by\n\t\t\t//\t |Dot(D,N)|*b1 = sign(Dot(D,N))*Dot(D,Cross(Q,E2))\n\t\t\t//\t |Dot(D,N)|*b2 = sign(Dot(D,N))*Dot(D,Cross(E1,Q))\n\t\t\t//\t |Dot(D,N)|*t = -sign(Dot(D,N))*Dot(Q,N)\n\n\n\t\t\tvar DdN = this.direction.dot(_normal);\n\t\t\tvar sign;\n\n\t\t\tif (DdN > 0) {\n\t\t\t\tif (backfaceCulling) return null;\n\t\t\t\tsign = 1;\n\t\t\t} else if (DdN < 0) {\n\t\t\t\tsign = -1;\n\t\t\t\tDdN = -DdN;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t_diff.subVectors(this.origin, a);\n\n\t\t\tvar DdQxE2 = sign * this.direction.dot(_edge2.crossVectors(_diff, _edge2)); // b1 < 0, no intersection\n\n\t\t\tif (DdQxE2 < 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar DdE1xQ = sign * this.direction.dot(_edge1.cross(_diff)); // b2 < 0, no intersection\n\n\t\t\tif (DdE1xQ < 0) {\n\t\t\t\treturn null;\n\t\t\t} // b1+b2 > 1, no intersection\n\n\n\t\t\tif (DdQxE2 + DdE1xQ > DdN) {\n\t\t\t\treturn null;\n\t\t\t} // Line intersects triangle, check if ray does.\n\n\n\t\t\tvar QdN = -sign * _diff.dot(_normal); // t < 0, no intersection\n\n\n\t\t\tif (QdN < 0) {\n\t\t\t\treturn null;\n\t\t\t} // Ray intersects triangle.\n\n\n\t\t\treturn this.at(QdN / DdN, target);\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix4) {\n\t\t\tthis.origin.applyMatrix4(matrix4);\n\t\t\tthis.direction.transformDirection(matrix4);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(ray) {\n\t\t\treturn ray.origin.equals(this.origin) && ray.direction.equals(this.direction);\n\t\t};\n\n\t\treturn Ray;\n\t}();\n\n\tvar Matrix4 = /*#__PURE__*/function () {\n\t\tfunction Matrix4() {\n\t\t\tObject.defineProperty(this, 'isMatrix4', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n\n\t\t\tif (arguments.length > 0) {\n\t\t\t\tconsole.error('THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.');\n\t\t\t}\n\t\t}\n\n\t\tvar _proto = Matrix4.prototype;\n\n\t\t_proto.set = function set(n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] = n11;\n\t\t\tte[4] = n12;\n\t\t\tte[8] = n13;\n\t\t\tte[12] = n14;\n\t\t\tte[1] = n21;\n\t\t\tte[5] = n22;\n\t\t\tte[9] = n23;\n\t\t\tte[13] = n24;\n\t\t\tte[2] = n31;\n\t\t\tte[6] = n32;\n\t\t\tte[10] = n33;\n\t\t\tte[14] = n34;\n\t\t\tte[3] = n41;\n\t\t\tte[7] = n42;\n\t\t\tte[11] = n43;\n\t\t\tte[15] = n44;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.identity = function identity() {\n\t\t\tthis.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new Matrix4().fromArray(this.elements);\n\t\t};\n\n\t\t_proto.copy = function copy(m) {\n\t\t\tvar te = this.elements;\n\t\t\tvar me = m.elements;\n\t\t\tte[0] = me[0];\n\t\t\tte[1] = me[1];\n\t\t\tte[2] = me[2];\n\t\t\tte[3] = me[3];\n\t\t\tte[4] = me[4];\n\t\t\tte[5] = me[5];\n\t\t\tte[6] = me[6];\n\t\t\tte[7] = me[7];\n\t\t\tte[8] = me[8];\n\t\t\tte[9] = me[9];\n\t\t\tte[10] = me[10];\n\t\t\tte[11] = me[11];\n\t\t\tte[12] = me[12];\n\t\t\tte[13] = me[13];\n\t\t\tte[14] = me[14];\n\t\t\tte[15] = me[15];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copyPosition = function copyPosition(m) {\n\t\t\tvar te = this.elements,\n\t\t\t\t\tme = m.elements;\n\t\t\tte[12] = me[12];\n\t\t\tte[13] = me[13];\n\t\t\tte[14] = me[14];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromMatrix3 = function setFromMatrix3(m) {\n\t\t\tvar me = m.elements;\n\t\t\tthis.set(me[0], me[3], me[6], 0, me[1], me[4], me[7], 0, me[2], me[5], me[8], 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.extractBasis = function extractBasis(xAxis, yAxis, zAxis) {\n\t\t\txAxis.setFromMatrixColumn(this, 0);\n\t\t\tyAxis.setFromMatrixColumn(this, 1);\n\t\t\tzAxis.setFromMatrixColumn(this, 2);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeBasis = function makeBasis(xAxis, yAxis, zAxis) {\n\t\t\tthis.set(xAxis.x, yAxis.x, zAxis.x, 0, xAxis.y, yAxis.y, zAxis.y, 0, xAxis.z, yAxis.z, zAxis.z, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.extractRotation = function extractRotation(m) {\n\t\t\t// this method does not support reflection matrices\n\t\t\tvar te = this.elements;\n\t\t\tvar me = m.elements;\n\n\t\t\tvar scaleX = 1 / _v1$1.setFromMatrixColumn(m, 0).length();\n\n\t\t\tvar scaleY = 1 / _v1$1.setFromMatrixColumn(m, 1).length();\n\n\t\t\tvar scaleZ = 1 / _v1$1.setFromMatrixColumn(m, 2).length();\n\n\t\t\tte[0] = me[0] * scaleX;\n\t\t\tte[1] = me[1] * scaleX;\n\t\t\tte[2] = me[2] * scaleX;\n\t\t\tte[3] = 0;\n\t\t\tte[4] = me[4] * scaleY;\n\t\t\tte[5] = me[5] * scaleY;\n\t\t\tte[6] = me[6] * scaleY;\n\t\t\tte[7] = 0;\n\t\t\tte[8] = me[8] * scaleZ;\n\t\t\tte[9] = me[9] * scaleZ;\n\t\t\tte[10] = me[10] * scaleZ;\n\t\t\tte[11] = 0;\n\t\t\tte[12] = 0;\n\t\t\tte[13] = 0;\n\t\t\tte[14] = 0;\n\t\t\tte[15] = 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationFromEuler = function makeRotationFromEuler(euler) {\n\t\t\tif (!(euler && euler.isEuler)) {\n\t\t\t\tconsole.error('THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.');\n\t\t\t}\n\n\t\t\tvar te = this.elements;\n\t\t\tvar x = euler.x,\n\t\t\t\t\ty = euler.y,\n\t\t\t\t\tz = euler.z;\n\t\t\tvar a = Math.cos(x),\n\t\t\t\t\tb = Math.sin(x);\n\t\t\tvar c = Math.cos(y),\n\t\t\t\t\td = Math.sin(y);\n\t\t\tvar e = Math.cos(z),\n\t\t\t\t\tf = Math.sin(z);\n\n\t\t\tif (euler.order === 'XYZ') {\n\t\t\t\tvar ae = a * e,\n\t\t\t\t\t\taf = a * f,\n\t\t\t\t\t\tbe = b * e,\n\t\t\t\t\t\tbf = b * f;\n\t\t\t\tte[0] = c * e;\n\t\t\t\tte[4] = -c * f;\n\t\t\t\tte[8] = d;\n\t\t\t\tte[1] = af + be * d;\n\t\t\t\tte[5] = ae - bf * d;\n\t\t\t\tte[9] = -b * c;\n\t\t\t\tte[2] = bf - ae * d;\n\t\t\t\tte[6] = be + af * d;\n\t\t\t\tte[10] = a * c;\n\t\t\t} else if (euler.order === 'YXZ') {\n\t\t\t\tvar ce = c * e,\n\t\t\t\t\t\tcf = c * f,\n\t\t\t\t\t\tde = d * e,\n\t\t\t\t\t\tdf = d * f;\n\t\t\t\tte[0] = ce + df * b;\n\t\t\t\tte[4] = de * b - cf;\n\t\t\t\tte[8] = a * d;\n\t\t\t\tte[1] = a * f;\n\t\t\t\tte[5] = a * e;\n\t\t\t\tte[9] = -b;\n\t\t\t\tte[2] = cf * b - de;\n\t\t\t\tte[6] = df + ce * b;\n\t\t\t\tte[10] = a * c;\n\t\t\t} else if (euler.order === 'ZXY') {\n\t\t\t\tvar _ce = c * e,\n\t\t\t\t\t\t_cf = c * f,\n\t\t\t\t\t\t_de = d * e,\n\t\t\t\t\t\t_df = d * f;\n\n\t\t\t\tte[0] = _ce - _df * b;\n\t\t\t\tte[4] = -a * f;\n\t\t\t\tte[8] = _de + _cf * b;\n\t\t\t\tte[1] = _cf + _de * b;\n\t\t\t\tte[5] = a * e;\n\t\t\t\tte[9] = _df - _ce * b;\n\t\t\t\tte[2] = -a * d;\n\t\t\t\tte[6] = b;\n\t\t\t\tte[10] = a * c;\n\t\t\t} else if (euler.order === 'ZYX') {\n\t\t\t\tvar _ae = a * e,\n\t\t\t\t\t\t_af = a * f,\n\t\t\t\t\t\t_be = b * e,\n\t\t\t\t\t\t_bf = b * f;\n\n\t\t\t\tte[0] = c * e;\n\t\t\t\tte[4] = _be * d - _af;\n\t\t\t\tte[8] = _ae * d + _bf;\n\t\t\t\tte[1] = c * f;\n\t\t\t\tte[5] = _bf * d + _ae;\n\t\t\t\tte[9] = _af * d - _be;\n\t\t\t\tte[2] = -d;\n\t\t\t\tte[6] = b * c;\n\t\t\t\tte[10] = a * c;\n\t\t\t} else if (euler.order === 'YZX') {\n\t\t\t\tvar ac = a * c,\n\t\t\t\t\t\tad = a * d,\n\t\t\t\t\t\tbc = b * c,\n\t\t\t\t\t\tbd = b * d;\n\t\t\t\tte[0] = c * e;\n\t\t\t\tte[4] = bd - ac * f;\n\t\t\t\tte[8] = bc * f + ad;\n\t\t\t\tte[1] = f;\n\t\t\t\tte[5] = a * e;\n\t\t\t\tte[9] = -b * e;\n\t\t\t\tte[2] = -d * e;\n\t\t\t\tte[6] = ad * f + bc;\n\t\t\t\tte[10] = ac - bd * f;\n\t\t\t} else if (euler.order === 'XZY') {\n\t\t\t\tvar _ac = a * c,\n\t\t\t\t\t\t_ad = a * d,\n\t\t\t\t\t\t_bc = b * c,\n\t\t\t\t\t\t_bd = b * d;\n\n\t\t\t\tte[0] = c * e;\n\t\t\t\tte[4] = -f;\n\t\t\t\tte[8] = d * e;\n\t\t\t\tte[1] = _ac * f + _bd;\n\t\t\t\tte[5] = a * e;\n\t\t\t\tte[9] = _ad * f - _bc;\n\t\t\t\tte[2] = _bc * f - _ad;\n\t\t\t\tte[6] = b * e;\n\t\t\t\tte[10] = _bd * f + _ac;\n\t\t\t} // bottom row\n\n\n\t\t\tte[3] = 0;\n\t\t\tte[7] = 0;\n\t\t\tte[11] = 0; // last column\n\n\t\t\tte[12] = 0;\n\t\t\tte[13] = 0;\n\t\t\tte[14] = 0;\n\t\t\tte[15] = 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationFromQuaternion = function makeRotationFromQuaternion(q) {\n\t\t\treturn this.compose(_zero, q, _one);\n\t\t};\n\n\t\t_proto.lookAt = function lookAt(eye, target, up) {\n\t\t\tvar te = this.elements;\n\n\t\t\t_z.subVectors(eye, target);\n\n\t\t\tif (_z.lengthSq() === 0) {\n\t\t\t\t// eye and target are in the same position\n\t\t\t\t_z.z = 1;\n\t\t\t}\n\n\t\t\t_z.normalize();\n\n\t\t\t_x.crossVectors(up, _z);\n\n\t\t\tif (_x.lengthSq() === 0) {\n\t\t\t\t// up and z are parallel\n\t\t\t\tif (Math.abs(up.z) === 1) {\n\t\t\t\t\t_z.x += 0.0001;\n\t\t\t\t} else {\n\t\t\t\t\t_z.z += 0.0001;\n\t\t\t\t}\n\n\t\t\t\t_z.normalize();\n\n\t\t\t\t_x.crossVectors(up, _z);\n\t\t\t}\n\n\t\t\t_x.normalize();\n\n\t\t\t_y.crossVectors(_z, _x);\n\n\t\t\tte[0] = _x.x;\n\t\t\tte[4] = _y.x;\n\t\t\tte[8] = _z.x;\n\t\t\tte[1] = _x.y;\n\t\t\tte[5] = _y.y;\n\t\t\tte[9] = _z.y;\n\t\t\tte[2] = _x.z;\n\t\t\tte[6] = _y.z;\n\t\t\tte[10] = _z.z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(m, n) {\n\t\t\tif (n !== undefined) {\n\t\t\t\tconsole.warn('THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead.');\n\t\t\t\treturn this.multiplyMatrices(m, n);\n\t\t\t}\n\n\t\t\treturn this.multiplyMatrices(this, m);\n\t\t};\n\n\t\t_proto.premultiply = function premultiply(m) {\n\t\t\treturn this.multiplyMatrices(m, this);\n\t\t};\n\n\t\t_proto.multiplyMatrices = function multiplyMatrices(a, b) {\n\t\t\tvar ae = a.elements;\n\t\t\tvar be = b.elements;\n\t\t\tvar te = this.elements;\n\t\t\tvar a11 = ae[0],\n\t\t\t\t\ta12 = ae[4],\n\t\t\t\t\ta13 = ae[8],\n\t\t\t\t\ta14 = ae[12];\n\t\t\tvar a21 = ae[1],\n\t\t\t\t\ta22 = ae[5],\n\t\t\t\t\ta23 = ae[9],\n\t\t\t\t\ta24 = ae[13];\n\t\t\tvar a31 = ae[2],\n\t\t\t\t\ta32 = ae[6],\n\t\t\t\t\ta33 = ae[10],\n\t\t\t\t\ta34 = ae[14];\n\t\t\tvar a41 = ae[3],\n\t\t\t\t\ta42 = ae[7],\n\t\t\t\t\ta43 = ae[11],\n\t\t\t\t\ta44 = ae[15];\n\t\t\tvar b11 = be[0],\n\t\t\t\t\tb12 = be[4],\n\t\t\t\t\tb13 = be[8],\n\t\t\t\t\tb14 = be[12];\n\t\t\tvar b21 = be[1],\n\t\t\t\t\tb22 = be[5],\n\t\t\t\t\tb23 = be[9],\n\t\t\t\t\tb24 = be[13];\n\t\t\tvar b31 = be[2],\n\t\t\t\t\tb32 = be[6],\n\t\t\t\t\tb33 = be[10],\n\t\t\t\t\tb34 = be[14];\n\t\t\tvar b41 = be[3],\n\t\t\t\t\tb42 = be[7],\n\t\t\t\t\tb43 = be[11],\n\t\t\t\t\tb44 = be[15];\n\t\t\tte[0] = a11 * b11 + a12 * b21 + a13 * b31 + a14 * b41;\n\t\t\tte[4] = a11 * b12 + a12 * b22 + a13 * b32 + a14 * b42;\n\t\t\tte[8] = a11 * b13 + a12 * b23 + a13 * b33 + a14 * b43;\n\t\t\tte[12] = a11 * b14 + a12 * b24 + a13 * b34 + a14 * b44;\n\t\t\tte[1] = a21 * b11 + a22 * b21 + a23 * b31 + a24 * b41;\n\t\t\tte[5] = a21 * b12 + a22 * b22 + a23 * b32 + a24 * b42;\n\t\t\tte[9] = a21 * b13 + a22 * b23 + a23 * b33 + a24 * b43;\n\t\t\tte[13] = a21 * b14 + a22 * b24 + a23 * b34 + a24 * b44;\n\t\t\tte[2] = a31 * b11 + a32 * b21 + a33 * b31 + a34 * b41;\n\t\t\tte[6] = a31 * b12 + a32 * b22 + a33 * b32 + a34 * b42;\n\t\t\tte[10] = a31 * b13 + a32 * b23 + a33 * b33 + a34 * b43;\n\t\t\tte[14] = a31 * b14 + a32 * b24 + a33 * b34 + a34 * b44;\n\t\t\tte[3] = a41 * b11 + a42 * b21 + a43 * b31 + a44 * b41;\n\t\t\tte[7] = a41 * b12 + a42 * b22 + a43 * b32 + a44 * b42;\n\t\t\tte[11] = a41 * b13 + a42 * b23 + a43 * b33 + a44 * b43;\n\t\t\tte[15] = a41 * b14 + a42 * b24 + a43 * b34 + a44 * b44;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(s) {\n\t\t\tvar te = this.elements;\n\t\t\tte[0] *= s;\n\t\t\tte[4] *= s;\n\t\t\tte[8] *= s;\n\t\t\tte[12] *= s;\n\t\t\tte[1] *= s;\n\t\t\tte[5] *= s;\n\t\t\tte[9] *= s;\n\t\t\tte[13] *= s;\n\t\t\tte[2] *= s;\n\t\t\tte[6] *= s;\n\t\t\tte[10] *= s;\n\t\t\tte[14] *= s;\n\t\t\tte[3] *= s;\n\t\t\tte[7] *= s;\n\t\t\tte[11] *= s;\n\t\t\tte[15] *= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.determinant = function determinant() {\n\t\t\tvar te = this.elements;\n\t\t\tvar n11 = te[0],\n\t\t\t\t\tn12 = te[4],\n\t\t\t\t\tn13 = te[8],\n\t\t\t\t\tn14 = te[12];\n\t\t\tvar n21 = te[1],\n\t\t\t\t\tn22 = te[5],\n\t\t\t\t\tn23 = te[9],\n\t\t\t\t\tn24 = te[13];\n\t\t\tvar n31 = te[2],\n\t\t\t\t\tn32 = te[6],\n\t\t\t\t\tn33 = te[10],\n\t\t\t\t\tn34 = te[14];\n\t\t\tvar n41 = te[3],\n\t\t\t\t\tn42 = te[7],\n\t\t\t\t\tn43 = te[11],\n\t\t\t\t\tn44 = te[15]; //TODO: make this more efficient\n\t\t\t//( based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm )\n\n\t\t\treturn n41 * (+n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34) + n42 * (+n11 * n23 * n34 - n11 * n24 * n33 + n14 * n21 * n33 - n13 * n21 * n34 + n13 * n24 * n31 - n14 * n23 * n31) + n43 * (+n11 * n24 * n32 - n11 * n22 * n34 - n14 * n21 * n32 + n12 * n21 * n34 + n14 * n22 * n31 - n12 * n24 * n31) + n44 * (-n13 * n22 * n31 - n11 * n23 * n32 + n11 * n22 * n33 + n13 * n21 * n32 - n12 * n21 * n33 + n12 * n23 * n31);\n\t\t};\n\n\t\t_proto.transpose = function transpose() {\n\t\t\tvar te = this.elements;\n\t\t\tvar tmp;\n\t\t\ttmp = te[1];\n\t\t\tte[1] = te[4];\n\t\t\tte[4] = tmp;\n\t\t\ttmp = te[2];\n\t\t\tte[2] = te[8];\n\t\t\tte[8] = tmp;\n\t\t\ttmp = te[6];\n\t\t\tte[6] = te[9];\n\t\t\tte[9] = tmp;\n\t\t\ttmp = te[3];\n\t\t\tte[3] = te[12];\n\t\t\tte[12] = tmp;\n\t\t\ttmp = te[7];\n\t\t\tte[7] = te[13];\n\t\t\tte[13] = tmp;\n\t\t\ttmp = te[11];\n\t\t\tte[11] = te[14];\n\t\t\tte[14] = tmp;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setPosition = function setPosition(x, y, z) {\n\t\t\tvar te = this.elements;\n\n\t\t\tif (x.isVector3) {\n\t\t\t\tte[12] = x.x;\n\t\t\t\tte[13] = x.y;\n\t\t\t\tte[14] = x.z;\n\t\t\t} else {\n\t\t\t\tte[12] = x;\n\t\t\t\tte[13] = y;\n\t\t\t\tte[14] = z;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.invert = function invert() {\n\t\t\t// based on http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm\n\t\t\tvar te = this.elements,\n\t\t\t\t\tn11 = te[0],\n\t\t\t\t\tn21 = te[1],\n\t\t\t\t\tn31 = te[2],\n\t\t\t\t\tn41 = te[3],\n\t\t\t\t\tn12 = te[4],\n\t\t\t\t\tn22 = te[5],\n\t\t\t\t\tn32 = te[6],\n\t\t\t\t\tn42 = te[7],\n\t\t\t\t\tn13 = te[8],\n\t\t\t\t\tn23 = te[9],\n\t\t\t\t\tn33 = te[10],\n\t\t\t\t\tn43 = te[11],\n\t\t\t\t\tn14 = te[12],\n\t\t\t\t\tn24 = te[13],\n\t\t\t\t\tn34 = te[14],\n\t\t\t\t\tn44 = te[15],\n\t\t\t\t\tt11 = n23 * n34 * n42 - n24 * n33 * n42 + n24 * n32 * n43 - n22 * n34 * n43 - n23 * n32 * n44 + n22 * n33 * n44,\n\t\t\t\t\tt12 = n14 * n33 * n42 - n13 * n34 * n42 - n14 * n32 * n43 + n12 * n34 * n43 + n13 * n32 * n44 - n12 * n33 * n44,\n\t\t\t\t\tt13 = n13 * n24 * n42 - n14 * n23 * n42 + n14 * n22 * n43 - n12 * n24 * n43 - n13 * n22 * n44 + n12 * n23 * n44,\n\t\t\t\t\tt14 = n14 * n23 * n32 - n13 * n24 * n32 - n14 * n22 * n33 + n12 * n24 * n33 + n13 * n22 * n34 - n12 * n23 * n34;\n\t\t\tvar det = n11 * t11 + n21 * t12 + n31 * t13 + n41 * t14;\n\t\t\tif (det === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n\t\t\tvar detInv = 1 / det;\n\t\t\tte[0] = t11 * detInv;\n\t\t\tte[1] = (n24 * n33 * n41 - n23 * n34 * n41 - n24 * n31 * n43 + n21 * n34 * n43 + n23 * n31 * n44 - n21 * n33 * n44) * detInv;\n\t\t\tte[2] = (n22 * n34 * n41 - n24 * n32 * n41 + n24 * n31 * n42 - n21 * n34 * n42 - n22 * n31 * n44 + n21 * n32 * n44) * detInv;\n\t\t\tte[3] = (n23 * n32 * n41 - n22 * n33 * n41 - n23 * n31 * n42 + n21 * n33 * n42 + n22 * n31 * n43 - n21 * n32 * n43) * detInv;\n\t\t\tte[4] = t12 * detInv;\n\t\t\tte[5] = (n13 * n34 * n41 - n14 * n33 * n41 + n14 * n31 * n43 - n11 * n34 * n43 - n13 * n31 * n44 + n11 * n33 * n44) * detInv;\n\t\t\tte[6] = (n14 * n32 * n41 - n12 * n34 * n41 - n14 * n31 * n42 + n11 * n34 * n42 + n12 * n31 * n44 - n11 * n32 * n44) * detInv;\n\t\t\tte[7] = (n12 * n33 * n41 - n13 * n32 * n41 + n13 * n31 * n42 - n11 * n33 * n42 - n12 * n31 * n43 + n11 * n32 * n43) * detInv;\n\t\t\tte[8] = t13 * detInv;\n\t\t\tte[9] = (n14 * n23 * n41 - n13 * n24 * n41 - n14 * n21 * n43 + n11 * n24 * n43 + n13 * n21 * n44 - n11 * n23 * n44) * detInv;\n\t\t\tte[10] = (n12 * n24 * n41 - n14 * n22 * n41 + n14 * n21 * n42 - n11 * n24 * n42 - n12 * n21 * n44 + n11 * n22 * n44) * detInv;\n\t\t\tte[11] = (n13 * n22 * n41 - n12 * n23 * n41 - n13 * n21 * n42 + n11 * n23 * n42 + n12 * n21 * n43 - n11 * n22 * n43) * detInv;\n\t\t\tte[12] = t14 * detInv;\n\t\t\tte[13] = (n13 * n24 * n31 - n14 * n23 * n31 + n14 * n21 * n33 - n11 * n24 * n33 - n13 * n21 * n34 + n11 * n23 * n34) * detInv;\n\t\t\tte[14] = (n14 * n22 * n31 - n12 * n24 * n31 - n14 * n21 * n32 + n11 * n24 * n32 + n12 * n21 * n34 - n11 * n22 * n34) * detInv;\n\t\t\tte[15] = (n12 * n23 * n31 - n13 * n22 * n31 + n13 * n21 * n32 - n11 * n23 * n32 - n12 * n21 * n33 + n11 * n22 * n33) * detInv;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.scale = function scale(v) {\n\t\t\tvar te = this.elements;\n\t\t\tvar x = v.x,\n\t\t\t\t\ty = v.y,\n\t\t\t\t\tz = v.z;\n\t\t\tte[0] *= x;\n\t\t\tte[4] *= y;\n\t\t\tte[8] *= z;\n\t\t\tte[1] *= x;\n\t\t\tte[5] *= y;\n\t\t\tte[9] *= z;\n\t\t\tte[2] *= x;\n\t\t\tte[6] *= y;\n\t\t\tte[10] *= z;\n\t\t\tte[3] *= x;\n\t\t\tte[7] *= y;\n\t\t\tte[11] *= z;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getMaxScaleOnAxis = function getMaxScaleOnAxis() {\n\t\t\tvar te = this.elements;\n\t\t\tvar scaleXSq = te[0] * te[0] + te[1] * te[1] + te[2] * te[2];\n\t\t\tvar scaleYSq = te[4] * te[4] + te[5] * te[5] + te[6] * te[6];\n\t\t\tvar scaleZSq = te[8] * te[8] + te[9] * te[9] + te[10] * te[10];\n\t\t\treturn Math.sqrt(Math.max(scaleXSq, scaleYSq, scaleZSq));\n\t\t};\n\n\t\t_proto.makeTranslation = function makeTranslation(x, y, z) {\n\t\t\tthis.set(1, 0, 0, x, 0, 1, 0, y, 0, 0, 1, z, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationX = function makeRotationX(theta) {\n\t\t\tvar c = Math.cos(theta),\n\t\t\t\t\ts = Math.sin(theta);\n\t\t\tthis.set(1, 0, 0, 0, 0, c, -s, 0, 0, s, c, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationY = function makeRotationY(theta) {\n\t\t\tvar c = Math.cos(theta),\n\t\t\t\t\ts = Math.sin(theta);\n\t\t\tthis.set(c, 0, s, 0, 0, 1, 0, 0, -s, 0, c, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationZ = function makeRotationZ(theta) {\n\t\t\tvar c = Math.cos(theta),\n\t\t\t\t\ts = Math.sin(theta);\n\t\t\tthis.set(c, -s, 0, 0, s, c, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeRotationAxis = function makeRotationAxis(axis, angle) {\n\t\t\t// Based on http://www.gamedev.net/reference/articles/article1199.asp\n\t\t\tvar c = Math.cos(angle);\n\t\t\tvar s = Math.sin(angle);\n\t\t\tvar t = 1 - c;\n\t\t\tvar x = axis.x,\n\t\t\t\t\ty = axis.y,\n\t\t\t\t\tz = axis.z;\n\t\t\tvar tx = t * x,\n\t\t\t\t\tty = t * y;\n\t\t\tthis.set(tx * x + c, tx * y - s * z, tx * z + s * y, 0, tx * y + s * z, ty * y + c, ty * z - s * x, 0, tx * z - s * y, ty * z + s * x, t * z * z + c, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeScale = function makeScale(x, y, z) {\n\t\t\tthis.set(x, 0, 0, 0, 0, y, 0, 0, 0, 0, z, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeShear = function makeShear(x, y, z) {\n\t\t\tthis.set(1, y, z, 0, x, 1, z, 0, x, y, 1, 0, 0, 0, 0, 1);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.compose = function compose(position, quaternion, scale) {\n\t\t\tvar te = this.elements;\n\t\t\tvar x = quaternion._x,\n\t\t\t\t\ty = quaternion._y,\n\t\t\t\t\tz = quaternion._z,\n\t\t\t\t\tw = quaternion._w;\n\t\t\tvar x2 = x + x,\n\t\t\t\t\ty2 = y + y,\n\t\t\t\t\tz2 = z + z;\n\t\t\tvar xx = x * x2,\n\t\t\t\t\txy = x * y2,\n\t\t\t\t\txz = x * z2;\n\t\t\tvar yy = y * y2,\n\t\t\t\t\tyz = y * z2,\n\t\t\t\t\tzz = z * z2;\n\t\t\tvar wx = w * x2,\n\t\t\t\t\twy = w * y2,\n\t\t\t\t\twz = w * z2;\n\t\t\tvar sx = scale.x,\n\t\t\t\t\tsy = scale.y,\n\t\t\t\t\tsz = scale.z;\n\t\t\tte[0] = (1 - (yy + zz)) * sx;\n\t\t\tte[1] = (xy + wz) * sx;\n\t\t\tte[2] = (xz - wy) * sx;\n\t\t\tte[3] = 0;\n\t\t\tte[4] = (xy - wz) * sy;\n\t\t\tte[5] = (1 - (xx + zz)) * sy;\n\t\t\tte[6] = (yz + wx) * sy;\n\t\t\tte[7] = 0;\n\t\t\tte[8] = (xz + wy) * sz;\n\t\t\tte[9] = (yz - wx) * sz;\n\t\t\tte[10] = (1 - (xx + yy)) * sz;\n\t\t\tte[11] = 0;\n\t\t\tte[12] = position.x;\n\t\t\tte[13] = position.y;\n\t\t\tte[14] = position.z;\n\t\t\tte[15] = 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.decompose = function decompose(position, quaternion, scale) {\n\t\t\tvar te = this.elements;\n\n\t\t\tvar sx = _v1$1.set(te[0], te[1], te[2]).length();\n\n\t\t\tvar sy = _v1$1.set(te[4], te[5], te[6]).length();\n\n\t\t\tvar sz = _v1$1.set(te[8], te[9], te[10]).length(); // if determine is negative, we need to invert one scale\n\n\n\t\t\tvar det = this.determinant();\n\t\t\tif (det < 0) sx = -sx;\n\t\t\tposition.x = te[12];\n\t\t\tposition.y = te[13];\n\t\t\tposition.z = te[14]; // scale the rotation part\n\n\t\t\t_m1.copy(this);\n\n\t\t\tvar invSX = 1 / sx;\n\t\t\tvar invSY = 1 / sy;\n\t\t\tvar invSZ = 1 / sz;\n\t\t\t_m1.elements[0] *= invSX;\n\t\t\t_m1.elements[1] *= invSX;\n\t\t\t_m1.elements[2] *= invSX;\n\t\t\t_m1.elements[4] *= invSY;\n\t\t\t_m1.elements[5] *= invSY;\n\t\t\t_m1.elements[6] *= invSY;\n\t\t\t_m1.elements[8] *= invSZ;\n\t\t\t_m1.elements[9] *= invSZ;\n\t\t\t_m1.elements[10] *= invSZ;\n\t\t\tquaternion.setFromRotationMatrix(_m1);\n\t\t\tscale.x = sx;\n\t\t\tscale.y = sy;\n\t\t\tscale.z = sz;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makePerspective = function makePerspective(left, right, top, bottom, near, far) {\n\t\t\tif (far === undefined) {\n\t\t\t\tconsole.warn('THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.');\n\t\t\t}\n\n\t\t\tvar te = this.elements;\n\t\t\tvar x = 2 * near / (right - left);\n\t\t\tvar y = 2 * near / (top - bottom);\n\t\t\tvar a = (right + left) / (right - left);\n\t\t\tvar b = (top + bottom) / (top - bottom);\n\t\t\tvar c = -(far + near) / (far - near);\n\t\t\tvar d = -2 * far * near / (far - near);\n\t\t\tte[0] = x;\n\t\t\tte[4] = 0;\n\t\t\tte[8] = a;\n\t\t\tte[12] = 0;\n\t\t\tte[1] = 0;\n\t\t\tte[5] = y;\n\t\t\tte[9] = b;\n\t\t\tte[13] = 0;\n\t\t\tte[2] = 0;\n\t\t\tte[6] = 0;\n\t\t\tte[10] = c;\n\t\t\tte[14] = d;\n\t\t\tte[3] = 0;\n\t\t\tte[7] = 0;\n\t\t\tte[11] = -1;\n\t\t\tte[15] = 0;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeOrthographic = function makeOrthographic(left, right, top, bottom, near, far) {\n\t\t\tvar te = this.elements;\n\t\t\tvar w = 1.0 / (right - left);\n\t\t\tvar h = 1.0 / (top - bottom);\n\t\t\tvar p = 1.0 / (far - near);\n\t\t\tvar x = (right + left) * w;\n\t\t\tvar y = (top + bottom) * h;\n\t\t\tvar z = (far + near) * p;\n\t\t\tte[0] = 2 * w;\n\t\t\tte[4] = 0;\n\t\t\tte[8] = 0;\n\t\t\tte[12] = -x;\n\t\t\tte[1] = 0;\n\t\t\tte[5] = 2 * h;\n\t\t\tte[9] = 0;\n\t\t\tte[13] = -y;\n\t\t\tte[2] = 0;\n\t\t\tte[6] = 0;\n\t\t\tte[10] = -2 * p;\n\t\t\tte[14] = -z;\n\t\t\tte[3] = 0;\n\t\t\tte[7] = 0;\n\t\t\tte[11] = 0;\n\t\t\tte[15] = 1;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(matrix) {\n\t\t\tvar te = this.elements;\n\t\t\tvar me = matrix.elements;\n\n\t\t\tfor (var i = 0; i < 16; i++) {\n\t\t\t\tif (te[i] !== me[i]) return false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < 16; i++) {\n\t\t\t\tthis.elements[i] = array[i + offset];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tvar te = this.elements;\n\t\t\tarray[offset] = te[0];\n\t\t\tarray[offset + 1] = te[1];\n\t\t\tarray[offset + 2] = te[2];\n\t\t\tarray[offset + 3] = te[3];\n\t\t\tarray[offset + 4] = te[4];\n\t\t\tarray[offset + 5] = te[5];\n\t\t\tarray[offset + 6] = te[6];\n\t\t\tarray[offset + 7] = te[7];\n\t\t\tarray[offset + 8] = te[8];\n\t\t\tarray[offset + 9] = te[9];\n\t\t\tarray[offset + 10] = te[10];\n\t\t\tarray[offset + 11] = te[11];\n\t\t\tarray[offset + 12] = te[12];\n\t\t\tarray[offset + 13] = te[13];\n\t\t\tarray[offset + 14] = te[14];\n\t\t\tarray[offset + 15] = te[15];\n\t\t\treturn array;\n\t\t};\n\n\t\treturn Matrix4;\n\t}();\n\n\tvar _v1$1 = /*@__PURE__*/new Vector3();\n\n\tvar _m1 = /*@__PURE__*/new Matrix4();\n\n\tvar _zero = /*@__PURE__*/new Vector3(0, 0, 0);\n\n\tvar _one = /*@__PURE__*/new Vector3(1, 1, 1);\n\n\tvar _x = /*@__PURE__*/new Vector3();\n\n\tvar _y = /*@__PURE__*/new Vector3();\n\n\tvar _z = /*@__PURE__*/new Vector3();\n\n\tvar Euler = /*#__PURE__*/function () {\n\t\tfunction Euler(x, y, z, order) {\n\t\t\tif (x === void 0) {\n\t\t\t\tx = 0;\n\t\t\t}\n\n\t\t\tif (y === void 0) {\n\t\t\t\ty = 0;\n\t\t\t}\n\n\t\t\tif (z === void 0) {\n\t\t\t\tz = 0;\n\t\t\t}\n\n\t\t\tif (order === void 0) {\n\t\t\t\torder = Euler.DefaultOrder;\n\t\t\t}\n\n\t\t\tObject.defineProperty(this, 'isEuler', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\t\t\tthis._order = order;\n\t\t}\n\n\t\tvar _proto = Euler.prototype;\n\n\t\t_proto.set = function set(x, y, z, order) {\n\t\t\tthis._x = x;\n\t\t\tthis._y = y;\n\t\t\tthis._z = z;\n\t\t\tthis._order = order || this._order;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this._x, this._y, this._z, this._order);\n\t\t};\n\n\t\t_proto.copy = function copy(euler) {\n\t\t\tthis._x = euler._x;\n\t\t\tthis._y = euler._y;\n\t\t\tthis._z = euler._z;\n\t\t\tthis._order = euler._order;\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromRotationMatrix = function setFromRotationMatrix(m, order, update) {\n\t\t\tvar clamp = MathUtils.clamp; // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n\t\t\tvar te = m.elements;\n\t\t\tvar m11 = te[0],\n\t\t\t\t\tm12 = te[4],\n\t\t\t\t\tm13 = te[8];\n\t\t\tvar m21 = te[1],\n\t\t\t\t\tm22 = te[5],\n\t\t\t\t\tm23 = te[9];\n\t\t\tvar m31 = te[2],\n\t\t\t\t\tm32 = te[6],\n\t\t\t\t\tm33 = te[10];\n\t\t\torder = order || this._order;\n\n\t\t\tswitch (order) {\n\t\t\t\tcase 'XYZ':\n\t\t\t\t\tthis._y = Math.asin(clamp(m13, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m13) < 0.9999999) {\n\t\t\t\t\t\tthis._x = Math.atan2(-m23, m33);\n\t\t\t\t\t\tthis._z = Math.atan2(-m12, m11);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._x = Math.atan2(m32, m22);\n\t\t\t\t\t\tthis._z = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YXZ':\n\t\t\t\t\tthis._x = Math.asin(-clamp(m23, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m23) < 0.9999999) {\n\t\t\t\t\t\tthis._y = Math.atan2(m13, m33);\n\t\t\t\t\t\tthis._z = Math.atan2(m21, m22);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._y = Math.atan2(-m31, m11);\n\t\t\t\t\t\tthis._z = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZXY':\n\t\t\t\t\tthis._x = Math.asin(clamp(m32, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m32) < 0.9999999) {\n\t\t\t\t\t\tthis._y = Math.atan2(-m31, m33);\n\t\t\t\t\t\tthis._z = Math.atan2(-m12, m22);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._y = 0;\n\t\t\t\t\t\tthis._z = Math.atan2(m21, m11);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ZYX':\n\t\t\t\t\tthis._y = Math.asin(-clamp(m31, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m31) < 0.9999999) {\n\t\t\t\t\t\tthis._x = Math.atan2(m32, m33);\n\t\t\t\t\t\tthis._z = Math.atan2(m21, m11);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._x = 0;\n\t\t\t\t\t\tthis._z = Math.atan2(-m12, m22);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'YZX':\n\t\t\t\t\tthis._z = Math.asin(clamp(m21, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m21) < 0.9999999) {\n\t\t\t\t\t\tthis._x = Math.atan2(-m23, m22);\n\t\t\t\t\t\tthis._y = Math.atan2(-m31, m11);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._x = 0;\n\t\t\t\t\t\tthis._y = Math.atan2(m13, m33);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'XZY':\n\t\t\t\t\tthis._z = Math.asin(-clamp(m12, -1, 1));\n\n\t\t\t\t\tif (Math.abs(m12) < 0.9999999) {\n\t\t\t\t\t\tthis._x = Math.atan2(m32, m22);\n\t\t\t\t\t\tthis._y = Math.atan2(m13, m11);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._x = Math.atan2(-m23, m33);\n\t\t\t\t\t\tthis._y = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.warn('THREE.Euler: .setFromRotationMatrix() encountered an unknown order: ' + order);\n\t\t\t}\n\n\t\t\tthis._order = order;\n\t\t\tif (update !== false) this._onChangeCallback();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromQuaternion = function setFromQuaternion(q, order, update) {\n\t\t\t_matrix.makeRotationFromQuaternion(q);\n\n\t\t\treturn this.setFromRotationMatrix(_matrix, order, update);\n\t\t};\n\n\t\t_proto.setFromVector3 = function setFromVector3(v, order) {\n\t\t\treturn this.set(v.x, v.y, v.z, order || this._order);\n\t\t};\n\n\t\t_proto.reorder = function reorder(newOrder) {\n\t\t\t// WARNING: this discards revolution information -bhouston\n\t\t\t_quaternion$1.setFromEuler(this);\n\n\t\t\treturn this.setFromQuaternion(_quaternion$1, newOrder);\n\t\t};\n\n\t\t_proto.equals = function equals(euler) {\n\t\t\treturn euler._x === this._x && euler._y === this._y && euler._z === this._z && euler._order === this._order;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array) {\n\t\t\tthis._x = array[0];\n\t\t\tthis._y = array[1];\n\t\t\tthis._z = array[2];\n\t\t\tif (array[3] !== undefined) this._order = array[3];\n\n\t\t\tthis._onChangeCallback();\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this._x;\n\t\t\tarray[offset + 1] = this._y;\n\t\t\tarray[offset + 2] = this._z;\n\t\t\tarray[offset + 3] = this._order;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.toVector3 = function toVector3(optionalResult) {\n\t\t\tif (optionalResult) {\n\t\t\t\treturn optionalResult.set(this._x, this._y, this._z);\n\t\t\t} else {\n\t\t\t\treturn new Vector3(this._x, this._y, this._z);\n\t\t\t}\n\t\t};\n\n\t\t_proto._onChange = function _onChange(callback) {\n\t\t\tthis._onChangeCallback = callback;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto._onChangeCallback = function _onChangeCallback() {};\n\n\t\t_createClass(Euler, [{\n\t\t\tkey: \"x\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._x;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._x = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"y\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._y;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._y = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"z\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._z;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._z = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: \"order\",\n\t\t\tget: function get() {\n\t\t\t\treturn this._order;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tthis._order = value;\n\n\t\t\t\tthis._onChangeCallback();\n\t\t\t}\n\t\t}]);\n\n\t\treturn Euler;\n\t}();\n\n\tEuler.DefaultOrder = 'XYZ';\n\tEuler.RotationOrders = ['XYZ', 'YZX', 'ZXY', 'XZY', 'YXZ', 'ZYX'];\n\n\tvar _matrix = /*@__PURE__*/new Matrix4();\n\n\tvar _quaternion$1 = /*@__PURE__*/new Quaternion();\n\n\tvar Layers = /*#__PURE__*/function () {\n\t\tfunction Layers() {\n\t\t\tthis.mask = 1 | 0;\n\t\t}\n\n\t\tvar _proto = Layers.prototype;\n\n\t\t_proto.set = function set(channel) {\n\t\t\tthis.mask = 1 << channel | 0;\n\t\t};\n\n\t\t_proto.enable = function enable(channel) {\n\t\t\tthis.mask |= 1 << channel | 0;\n\t\t};\n\n\t\t_proto.enableAll = function enableAll() {\n\t\t\tthis.mask = 0xffffffff | 0;\n\t\t};\n\n\t\t_proto.toggle = function toggle(channel) {\n\t\t\tthis.mask ^= 1 << channel | 0;\n\t\t};\n\n\t\t_proto.disable = function disable(channel) {\n\t\t\tthis.mask &= ~(1 << channel | 0);\n\t\t};\n\n\t\t_proto.disableAll = function disableAll() {\n\t\t\tthis.mask = 0;\n\t\t};\n\n\t\t_proto.test = function test(layers) {\n\t\t\treturn (this.mask & layers.mask) !== 0;\n\t\t};\n\n\t\treturn Layers;\n\t}();\n\n\tvar _object3DId = 0;\n\n\tvar _v1$2 = new Vector3();\n\n\tvar _q1 = new Quaternion();\n\n\tvar _m1$1 = new Matrix4();\n\n\tvar _target = new Vector3();\n\n\tvar _position = new Vector3();\n\n\tvar _scale = new Vector3();\n\n\tvar _quaternion$2 = new Quaternion();\n\n\tvar _xAxis = new Vector3(1, 0, 0);\n\n\tvar _yAxis = new Vector3(0, 1, 0);\n\n\tvar _zAxis = new Vector3(0, 0, 1);\n\n\tvar _addedEvent = {\n\t\ttype: 'added'\n\t};\n\tvar _removedEvent = {\n\t\ttype: 'removed'\n\t};\n\n\tfunction Object3D() {\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tvalue: _object3DId++\n\t\t});\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.name = '';\n\t\tthis.type = 'Object3D';\n\t\tthis.parent = null;\n\t\tthis.children = [];\n\t\tthis.up = Object3D.DefaultUp.clone();\n\t\tvar position = new Vector3();\n\t\tvar rotation = new Euler();\n\t\tvar quaternion = new Quaternion();\n\t\tvar scale = new Vector3(1, 1, 1);\n\n\t\tfunction onRotationChange() {\n\t\t\tquaternion.setFromEuler(rotation, false);\n\t\t}\n\n\t\tfunction onQuaternionChange() {\n\t\t\trotation.setFromQuaternion(quaternion, undefined, false);\n\t\t}\n\n\t\trotation._onChange(onRotationChange);\n\n\t\tquaternion._onChange(onQuaternionChange);\n\n\t\tObject.defineProperties(this, {\n\t\t\tposition: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: position\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: rotation\n\t\t\t},\n\t\t\tquaternion: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: quaternion\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: scale\n\t\t\t},\n\t\t\tmodelViewMatrix: {\n\t\t\t\tvalue: new Matrix4()\n\t\t\t},\n\t\t\tnormalMatrix: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t});\n\t\tthis.matrix = new Matrix4();\n\t\tthis.matrixWorld = new Matrix4();\n\t\tthis.matrixAutoUpdate = Object3D.DefaultMatrixAutoUpdate;\n\t\tthis.matrixWorldNeedsUpdate = false;\n\t\tthis.layers = new Layers();\n\t\tthis.visible = true;\n\t\tthis.castShadow = false;\n\t\tthis.receiveShadow = false;\n\t\tthis.frustumCulled = true;\n\t\tthis.renderOrder = 0;\n\t\tthis.animations = [];\n\t\tthis.userData = {};\n\t}\n\n\tObject3D.DefaultUp = new Vector3(0, 1, 0);\n\tObject3D.DefaultMatrixAutoUpdate = true;\n\tObject3D.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: Object3D,\n\t\tisObject3D: true,\n\t\tonBeforeRender: function onBeforeRender() {},\n\t\tonAfterRender: function onAfterRender() {},\n\t\tapplyMatrix4: function applyMatrix4(matrix) {\n\t\t\tif (this.matrixAutoUpdate) this.updateMatrix();\n\t\t\tthis.matrix.premultiply(matrix);\n\t\t\tthis.matrix.decompose(this.position, this.quaternion, this.scale);\n\t\t},\n\t\tapplyQuaternion: function applyQuaternion(q) {\n\t\t\tthis.quaternion.premultiply(q);\n\t\t\treturn this;\n\t\t},\n\t\tsetRotationFromAxisAngle: function setRotationFromAxisAngle(axis, angle) {\n\t\t\t// assumes axis is normalized\n\t\t\tthis.quaternion.setFromAxisAngle(axis, angle);\n\t\t},\n\t\tsetRotationFromEuler: function setRotationFromEuler(euler) {\n\t\t\tthis.quaternion.setFromEuler(euler, true);\n\t\t},\n\t\tsetRotationFromMatrix: function setRotationFromMatrix(m) {\n\t\t\t// assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\t\t\tthis.quaternion.setFromRotationMatrix(m);\n\t\t},\n\t\tsetRotationFromQuaternion: function setRotationFromQuaternion(q) {\n\t\t\t// assumes q is normalized\n\t\t\tthis.quaternion.copy(q);\n\t\t},\n\t\trotateOnAxis: function rotateOnAxis(axis, angle) {\n\t\t\t// rotate object on axis in object space\n\t\t\t// axis is assumed to be normalized\n\t\t\t_q1.setFromAxisAngle(axis, angle);\n\n\t\t\tthis.quaternion.multiply(_q1);\n\t\t\treturn this;\n\t\t},\n\t\trotateOnWorldAxis: function rotateOnWorldAxis(axis, angle) {\n\t\t\t// rotate object on axis in world space\n\t\t\t// axis is assumed to be normalized\n\t\t\t// method assumes no rotated parent\n\t\t\t_q1.setFromAxisAngle(axis, angle);\n\n\t\t\tthis.quaternion.premultiply(_q1);\n\t\t\treturn this;\n\t\t},\n\t\trotateX: function rotateX(angle) {\n\t\t\treturn this.rotateOnAxis(_xAxis, angle);\n\t\t},\n\t\trotateY: function rotateY(angle) {\n\t\t\treturn this.rotateOnAxis(_yAxis, angle);\n\t\t},\n\t\trotateZ: function rotateZ(angle) {\n\t\t\treturn this.rotateOnAxis(_zAxis, angle);\n\t\t},\n\t\ttranslateOnAxis: function translateOnAxis(axis, distance) {\n\t\t\t// translate object by distance along axis in object space\n\t\t\t// axis is assumed to be normalized\n\t\t\t_v1$2.copy(axis).applyQuaternion(this.quaternion);\n\n\t\t\tthis.position.add(_v1$2.multiplyScalar(distance));\n\t\t\treturn this;\n\t\t},\n\t\ttranslateX: function translateX(distance) {\n\t\t\treturn this.translateOnAxis(_xAxis, distance);\n\t\t},\n\t\ttranslateY: function translateY(distance) {\n\t\t\treturn this.translateOnAxis(_yAxis, distance);\n\t\t},\n\t\ttranslateZ: function translateZ(distance) {\n\t\t\treturn this.translateOnAxis(_zAxis, distance);\n\t\t},\n\t\tlocalToWorld: function localToWorld(vector) {\n\t\t\treturn vector.applyMatrix4(this.matrixWorld);\n\t\t},\n\t\tworldToLocal: function worldToLocal(vector) {\n\t\t\treturn vector.applyMatrix4(_m1$1.copy(this.matrixWorld).invert());\n\t\t},\n\t\tlookAt: function lookAt(x, y, z) {\n\t\t\t// This method does not support objects having non-uniformly-scaled parent(s)\n\t\t\tif (x.isVector3) {\n\t\t\t\t_target.copy(x);\n\t\t\t} else {\n\t\t\t\t_target.set(x, y, z);\n\t\t\t}\n\n\t\t\tvar parent = this.parent;\n\t\t\tthis.updateWorldMatrix(true, false);\n\n\t\t\t_position.setFromMatrixPosition(this.matrixWorld);\n\n\t\t\tif (this.isCamera || this.isLight) {\n\t\t\t\t_m1$1.lookAt(_position, _target, this.up);\n\t\t\t} else {\n\t\t\t\t_m1$1.lookAt(_target, _position, this.up);\n\t\t\t}\n\n\t\t\tthis.quaternion.setFromRotationMatrix(_m1$1);\n\n\t\t\tif (parent) {\n\t\t\t\t_m1$1.extractRotation(parent.matrixWorld);\n\n\t\t\t\t_q1.setFromRotationMatrix(_m1$1);\n\n\t\t\t\tthis.quaternion.premultiply(_q1.invert());\n\t\t\t}\n\t\t},\n\t\tadd: function add(object) {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\t\t\tthis.add(arguments[i]);\n\t\t\t\t}\n\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (object === this) {\n\t\t\t\tconsole.error('THREE.Object3D.add: object can\\'t be added as a child of itself.', object);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tif (object && object.isObject3D) {\n\t\t\t\tif (object.parent !== null) {\n\t\t\t\t\tobject.parent.remove(object);\n\t\t\t\t}\n\n\t\t\t\tobject.parent = this;\n\t\t\t\tthis.children.push(object);\n\t\t\t\tobject.dispatchEvent(_addedEvent);\n\t\t\t} else {\n\t\t\t\tconsole.error('THREE.Object3D.add: object not an instance of THREE.Object3D.', object);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tremove: function remove(object) {\n\t\t\tif (arguments.length > 1) {\n\t\t\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\t\t\tthis.remove(arguments[i]);\n\t\t\t\t}\n\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar index = this.children.indexOf(object);\n\n\t\t\tif (index !== -1) {\n\t\t\t\tobject.parent = null;\n\t\t\t\tthis.children.splice(index, 1);\n\t\t\t\tobject.dispatchEvent(_removedEvent);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tclear: function clear() {\n\t\t\tfor (var i = 0; i < this.children.length; i++) {\n\t\t\t\tvar object = this.children[i];\n\t\t\t\tobject.parent = null;\n\t\t\t\tobject.dispatchEvent(_removedEvent);\n\t\t\t}\n\n\t\t\tthis.children.length = 0;\n\t\t\treturn this;\n\t\t},\n\t\tattach: function attach(object) {\n\t\t\t// adds object as a child of this, while maintaining the object's world transform\n\t\t\tthis.updateWorldMatrix(true, false);\n\n\t\t\t_m1$1.copy(this.matrixWorld).invert();\n\n\t\t\tif (object.parent !== null) {\n\t\t\t\tobject.parent.updateWorldMatrix(true, false);\n\n\t\t\t\t_m1$1.multiply(object.parent.matrixWorld);\n\t\t\t}\n\n\t\t\tobject.applyMatrix4(_m1$1);\n\t\t\tobject.updateWorldMatrix(false, false);\n\t\t\tthis.add(object);\n\t\t\treturn this;\n\t\t},\n\t\tgetObjectById: function getObjectById(id) {\n\t\t\treturn this.getObjectByProperty('id', id);\n\t\t},\n\t\tgetObjectByName: function getObjectByName(name) {\n\t\t\treturn this.getObjectByProperty('name', name);\n\t\t},\n\t\tgetObjectByProperty: function getObjectByProperty(name, value) {\n\t\t\tif (this[name] === value) return this;\n\n\t\t\tfor (var i = 0, l = this.children.length; i < l; i++) {\n\t\t\t\tvar child = this.children[i];\n\t\t\t\tvar object = child.getObjectByProperty(name, value);\n\n\t\t\t\tif (object !== undefined) {\n\t\t\t\t\treturn object;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t},\n\t\tgetWorldPosition: function getWorldPosition(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Object3D: .getWorldPosition() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\treturn target.setFromMatrixPosition(this.matrixWorld);\n\t\t},\n\t\tgetWorldQuaternion: function getWorldQuaternion(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Object3D: .getWorldQuaternion() target is now required');\n\t\t\t\ttarget = new Quaternion();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\tthis.matrixWorld.decompose(_position, target, _scale);\n\t\t\treturn target;\n\t\t},\n\t\tgetWorldScale: function getWorldScale(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Object3D: .getWorldScale() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\tthis.matrixWorld.decompose(_position, _quaternion$2, target);\n\t\t\treturn target;\n\t\t},\n\t\tgetWorldDirection: function getWorldDirection(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Object3D: .getWorldDirection() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\tvar e = this.matrixWorld.elements;\n\t\t\treturn target.set(e[8], e[9], e[10]).normalize();\n\t\t},\n\t\traycast: function raycast() {},\n\t\ttraverse: function traverse(callback) {\n\t\t\tcallback(this);\n\t\t\tvar children = this.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tchildren[i].traverse(callback);\n\t\t\t}\n\t\t},\n\t\ttraverseVisible: function traverseVisible(callback) {\n\t\t\tif (this.visible === false) return;\n\t\t\tcallback(this);\n\t\t\tvar children = this.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tchildren[i].traverseVisible(callback);\n\t\t\t}\n\t\t},\n\t\ttraverseAncestors: function traverseAncestors(callback) {\n\t\t\tvar parent = this.parent;\n\n\t\t\tif (parent !== null) {\n\t\t\t\tcallback(parent);\n\t\t\t\tparent.traverseAncestors(callback);\n\t\t\t}\n\t\t},\n\t\tupdateMatrix: function updateMatrix() {\n\t\t\tthis.matrix.compose(this.position, this.quaternion, this.scale);\n\t\t\tthis.matrixWorldNeedsUpdate = true;\n\t\t},\n\t\tupdateMatrixWorld: function updateMatrixWorld(force) {\n\t\t\tif (this.matrixAutoUpdate) this.updateMatrix();\n\n\t\t\tif (this.matrixWorldNeedsUpdate || force) {\n\t\t\t\tif (this.parent === null) {\n\t\t\t\t\tthis.matrixWorld.copy(this.matrix);\n\t\t\t\t} else {\n\t\t\t\t\tthis.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix);\n\t\t\t\t}\n\n\t\t\t\tthis.matrixWorldNeedsUpdate = false;\n\t\t\t\tforce = true;\n\t\t\t} // update children\n\n\n\t\t\tvar children = this.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tchildren[i].updateMatrixWorld(force);\n\t\t\t}\n\t\t},\n\t\tupdateWorldMatrix: function updateWorldMatrix(updateParents, updateChildren) {\n\t\t\tvar parent = this.parent;\n\n\t\t\tif (updateParents === true && parent !== null) {\n\t\t\t\tparent.updateWorldMatrix(true, false);\n\t\t\t}\n\n\t\t\tif (this.matrixAutoUpdate) this.updateMatrix();\n\n\t\t\tif (this.parent === null) {\n\t\t\t\tthis.matrixWorld.copy(this.matrix);\n\t\t\t} else {\n\t\t\t\tthis.matrixWorld.multiplyMatrices(this.parent.matrixWorld, this.matrix);\n\t\t\t} // update children\n\n\n\t\t\tif (updateChildren === true) {\n\t\t\t\tvar children = this.children;\n\n\t\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\t\tchildren[i].updateWorldMatrix(false, true);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\t// meta is a string when called from JSON.stringify\n\t\t\tvar isRootObject = meta === undefined || typeof meta === 'string';\n\t\t\tvar output = {}; // meta is a hash used to collect geometries, materials.\n\t\t\t// not providing it implies that this is the root object\n\t\t\t// being serialized.\n\n\t\t\tif (isRootObject) {\n\t\t\t\t// initialize meta obj\n\t\t\t\tmeta = {\n\t\t\t\t\tgeometries: {},\n\t\t\t\t\tmaterials: {},\n\t\t\t\t\ttextures: {},\n\t\t\t\t\timages: {},\n\t\t\t\t\tshapes: {},\n\t\t\t\t\tskeletons: {},\n\t\t\t\t\tanimations: {}\n\t\t\t\t};\n\t\t\t\toutput.metadata = {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Object',\n\t\t\t\t\tgenerator: 'Object3D.toJSON'\n\t\t\t\t};\n\t\t\t} // standard Object3D serialization\n\n\n\t\t\tvar object = {};\n\t\t\tobject.uuid = this.uuid;\n\t\t\tobject.type = this.type;\n\t\t\tif (this.name !== '') object.name = this.name;\n\t\t\tif (this.castShadow === true) object.castShadow = true;\n\t\t\tif (this.receiveShadow === true) object.receiveShadow = true;\n\t\t\tif (this.visible === false) object.visible = false;\n\t\t\tif (this.frustumCulled === false) object.frustumCulled = false;\n\t\t\tif (this.renderOrder !== 0) object.renderOrder = this.renderOrder;\n\t\t\tif (JSON.stringify(this.userData) !== '{}') object.userData = this.userData;\n\t\t\tobject.layers = this.layers.mask;\n\t\t\tobject.matrix = this.matrix.toArray();\n\t\t\tif (this.matrixAutoUpdate === false) object.matrixAutoUpdate = false; // object specific properties\n\n\t\t\tif (this.isInstancedMesh) {\n\t\t\t\tobject.type = 'InstancedMesh';\n\t\t\t\tobject.count = this.count;\n\t\t\t\tobject.instanceMatrix = this.instanceMatrix.toJSON();\n\t\t\t} //\n\n\n\t\t\tfunction serialize(library, element) {\n\t\t\t\tif (library[element.uuid] === undefined) {\n\t\t\t\t\tlibrary[element.uuid] = element.toJSON(meta);\n\t\t\t\t}\n\n\t\t\t\treturn element.uuid;\n\t\t\t}\n\n\t\t\tif (this.isMesh || this.isLine || this.isPoints) {\n\t\t\t\tobject.geometry = serialize(meta.geometries, this.geometry);\n\t\t\t\tvar parameters = this.geometry.parameters;\n\n\t\t\t\tif (parameters !== undefined && parameters.shapes !== undefined) {\n\t\t\t\t\tvar shapes = parameters.shapes;\n\n\t\t\t\t\tif (Array.isArray(shapes)) {\n\t\t\t\t\t\tfor (var i = 0, l = shapes.length; i < l; i++) {\n\t\t\t\t\t\t\tvar shape = shapes[i];\n\t\t\t\t\t\t\tserialize(meta.shapes, shape);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tserialize(meta.shapes, shapes);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.isSkinnedMesh) {\n\t\t\t\tobject.bindMode = this.bindMode;\n\t\t\t\tobject.bindMatrix = this.bindMatrix.toArray();\n\n\t\t\t\tif (this.skeleton !== undefined) {\n\t\t\t\t\tserialize(meta.skeletons, this.skeleton);\n\t\t\t\t\tobject.skeleton = this.skeleton.uuid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.material !== undefined) {\n\t\t\t\tif (Array.isArray(this.material)) {\n\t\t\t\t\tvar uuids = [];\n\n\t\t\t\t\tfor (var _i = 0, _l = this.material.length; _i < _l; _i++) {\n\t\t\t\t\t\tuuids.push(serialize(meta.materials, this.material[_i]));\n\t\t\t\t\t}\n\n\t\t\t\t\tobject.material = uuids;\n\t\t\t\t} else {\n\t\t\t\t\tobject.material = serialize(meta.materials, this.material);\n\t\t\t\t}\n\t\t\t} //\n\n\n\t\t\tif (this.children.length > 0) {\n\t\t\t\tobject.children = [];\n\n\t\t\t\tfor (var _i2 = 0; _i2 < this.children.length; _i2++) {\n\t\t\t\t\tobject.children.push(this.children[_i2].toJSON(meta).object);\n\t\t\t\t}\n\t\t\t} //\n\n\n\t\t\tif (this.animations.length > 0) {\n\t\t\t\tobject.animations = [];\n\n\t\t\t\tfor (var _i3 = 0; _i3 < this.animations.length; _i3++) {\n\t\t\t\t\tvar animation = this.animations[_i3];\n\t\t\t\t\tobject.animations.push(serialize(meta.animations, animation));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isRootObject) {\n\t\t\t\tvar geometries = extractFromCache(meta.geometries);\n\t\t\t\tvar materials = extractFromCache(meta.materials);\n\t\t\t\tvar textures = extractFromCache(meta.textures);\n\t\t\t\tvar images = extractFromCache(meta.images);\n\n\t\t\t\tvar _shapes = extractFromCache(meta.shapes);\n\n\t\t\t\tvar skeletons = extractFromCache(meta.skeletons);\n\t\t\t\tvar animations = extractFromCache(meta.animations);\n\t\t\t\tif (geometries.length > 0) output.geometries = geometries;\n\t\t\t\tif (materials.length > 0) output.materials = materials;\n\t\t\t\tif (textures.length > 0) output.textures = textures;\n\t\t\t\tif (images.length > 0) output.images = images;\n\t\t\t\tif (_shapes.length > 0) output.shapes = _shapes;\n\t\t\t\tif (skeletons.length > 0) output.skeletons = skeletons;\n\t\t\t\tif (animations.length > 0) output.animations = animations;\n\t\t\t}\n\n\t\t\toutput.object = object;\n\t\t\treturn output; // extract data from the cache hash\n\t\t\t// remove metadata on each item\n\t\t\t// and return as array\n\n\t\t\tfunction extractFromCache(cache) {\n\t\t\t\tvar values = [];\n\n\t\t\t\tfor (var key in cache) {\n\t\t\t\t\tvar data = cache[key];\n\t\t\t\t\tdelete data.metadata;\n\t\t\t\t\tvalues.push(data);\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t}\n\t\t},\n\t\tclone: function clone(recursive) {\n\t\t\treturn new this.constructor().copy(this, recursive);\n\t\t},\n\t\tcopy: function copy(source, recursive) {\n\t\t\tif (recursive === void 0) {\n\t\t\t\trecursive = true;\n\t\t\t}\n\n\t\t\tthis.name = source.name;\n\t\t\tthis.up.copy(source.up);\n\t\t\tthis.position.copy(source.position);\n\t\t\tthis.rotation.order = source.rotation.order;\n\t\t\tthis.quaternion.copy(source.quaternion);\n\t\t\tthis.scale.copy(source.scale);\n\t\t\tthis.matrix.copy(source.matrix);\n\t\t\tthis.matrixWorld.copy(source.matrixWorld);\n\t\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\t\tthis.matrixWorldNeedsUpdate = source.matrixWorldNeedsUpdate;\n\t\t\tthis.layers.mask = source.layers.mask;\n\t\t\tthis.visible = source.visible;\n\t\t\tthis.castShadow = source.castShadow;\n\t\t\tthis.receiveShadow = source.receiveShadow;\n\t\t\tthis.frustumCulled = source.frustumCulled;\n\t\t\tthis.renderOrder = source.renderOrder;\n\t\t\tthis.userData = JSON.parse(JSON.stringify(source.userData));\n\n\t\t\tif (recursive === true) {\n\t\t\t\tfor (var i = 0; i < source.children.length; i++) {\n\t\t\t\t\tvar child = source.children[i];\n\t\t\t\t\tthis.add(child.clone());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tvar _vector1 = /*@__PURE__*/new Vector3();\n\n\tvar _vector2 = /*@__PURE__*/new Vector3();\n\n\tvar _normalMatrix = /*@__PURE__*/new Matrix3();\n\n\tvar Plane = /*#__PURE__*/function () {\n\t\tfunction Plane(normal, constant) {\n\t\t\tObject.defineProperty(this, 'isPlane', {\n\t\t\t\tvalue: true\n\t\t\t}); // normal is assumed to be normalized\n\n\t\t\tthis.normal = normal !== undefined ? normal : new Vector3(1, 0, 0);\n\t\t\tthis.constant = constant !== undefined ? constant : 0;\n\t\t}\n\n\t\tvar _proto = Plane.prototype;\n\n\t\t_proto.set = function set(normal, constant) {\n\t\t\tthis.normal.copy(normal);\n\t\t\tthis.constant = constant;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setComponents = function setComponents(x, y, z, w) {\n\t\t\tthis.normal.set(x, y, z);\n\t\t\tthis.constant = w;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromNormalAndCoplanarPoint = function setFromNormalAndCoplanarPoint(normal, point) {\n\t\t\tthis.normal.copy(normal);\n\t\t\tthis.constant = -point.dot(this.normal);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromCoplanarPoints = function setFromCoplanarPoints(a, b, c) {\n\t\t\tvar normal = _vector1.subVectors(c, b).cross(_vector2.subVectors(a, b)).normalize(); // Q: should an error be thrown if normal is zero (e.g. degenerate plane)?\n\n\n\t\t\tthis.setFromNormalAndCoplanarPoint(normal, a);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(plane) {\n\t\t\tthis.normal.copy(plane.normal);\n\t\t\tthis.constant = plane.constant;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.normalize = function normalize() {\n\t\t\t// Note: will lead to a divide by zero if the plane is invalid.\n\t\t\tvar inverseNormalLength = 1.0 / this.normal.length();\n\t\t\tthis.normal.multiplyScalar(inverseNormalLength);\n\t\t\tthis.constant *= inverseNormalLength;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.negate = function negate() {\n\t\t\tthis.constant *= -1;\n\t\t\tthis.normal.negate();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\treturn this.normal.dot(point) + this.constant;\n\t\t};\n\n\t\t_proto.distanceToSphere = function distanceToSphere(sphere) {\n\t\t\treturn this.distanceToPoint(sphere.center) - sphere.radius;\n\t\t};\n\n\t\t_proto.projectPoint = function projectPoint(point, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Plane: .projectPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.copy(this.normal).multiplyScalar(-this.distanceToPoint(point)).add(point);\n\t\t};\n\n\t\t_proto.intersectLine = function intersectLine(line, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Plane: .intersectLine() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tvar direction = line.delta(_vector1);\n\t\t\tvar denominator = this.normal.dot(direction);\n\n\t\t\tif (denominator === 0) {\n\t\t\t\t// line is coplanar, return origin\n\t\t\t\tif (this.distanceToPoint(line.start) === 0) {\n\t\t\t\t\treturn target.copy(line.start);\n\t\t\t\t} // Unsure if this is the correct method to handle this case.\n\n\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tvar t = -(line.start.dot(this.normal) + this.constant) / denominator;\n\n\t\t\tif (t < 0 || t > 1) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\treturn target.copy(direction).multiplyScalar(t).add(line.start);\n\t\t};\n\n\t\t_proto.intersectsLine = function intersectsLine(line) {\n\t\t\t// Note: this tests if a line intersects the plane, not whether it (or its end-points) are coplanar with it.\n\t\t\tvar startSign = this.distanceToPoint(line.start);\n\t\t\tvar endSign = this.distanceToPoint(line.end);\n\t\t\treturn startSign < 0 && endSign > 0 || endSign < 0 && startSign > 0;\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\treturn box.intersectsPlane(this);\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\treturn sphere.intersectsPlane(this);\n\t\t};\n\n\t\t_proto.coplanarPoint = function coplanarPoint(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Plane: .coplanarPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.copy(this.normal).multiplyScalar(-this.constant);\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix, optionalNormalMatrix) {\n\t\t\tvar normalMatrix = optionalNormalMatrix || _normalMatrix.getNormalMatrix(matrix);\n\n\t\t\tvar referencePoint = this.coplanarPoint(_vector1).applyMatrix4(matrix);\n\t\t\tvar normal = this.normal.applyMatrix3(normalMatrix).normalize();\n\t\t\tthis.constant = -referencePoint.dot(normal);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(offset) {\n\t\t\tthis.constant -= offset.dot(this.normal);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(plane) {\n\t\t\treturn plane.normal.equals(this.normal) && plane.constant === this.constant;\n\t\t};\n\n\t\treturn Plane;\n\t}();\n\n\tvar _v0$1 = /*@__PURE__*/new Vector3();\n\n\tvar _v1$3 = /*@__PURE__*/new Vector3();\n\n\tvar _v2$1 = /*@__PURE__*/new Vector3();\n\n\tvar _v3 = /*@__PURE__*/new Vector3();\n\n\tvar _vab = /*@__PURE__*/new Vector3();\n\n\tvar _vac = /*@__PURE__*/new Vector3();\n\n\tvar _vbc = /*@__PURE__*/new Vector3();\n\n\tvar _vap = /*@__PURE__*/new Vector3();\n\n\tvar _vbp = /*@__PURE__*/new Vector3();\n\n\tvar _vcp = /*@__PURE__*/new Vector3();\n\n\tvar Triangle = /*#__PURE__*/function () {\n\t\tfunction Triangle(a, b, c) {\n\t\t\tthis.a = a !== undefined ? a : new Vector3();\n\t\t\tthis.b = b !== undefined ? b : new Vector3();\n\t\t\tthis.c = c !== undefined ? c : new Vector3();\n\t\t}\n\n\t\tTriangle.getNormal = function getNormal(a, b, c, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .getNormal() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\ttarget.subVectors(c, b);\n\n\t\t\t_v0$1.subVectors(a, b);\n\n\t\t\ttarget.cross(_v0$1);\n\t\t\tvar targetLengthSq = target.lengthSq();\n\n\t\t\tif (targetLengthSq > 0) {\n\t\t\t\treturn target.multiplyScalar(1 / Math.sqrt(targetLengthSq));\n\t\t\t}\n\n\t\t\treturn target.set(0, 0, 0);\n\t\t} // static/instance method to calculate barycentric coordinates\n\t\t// based on: http://www.blackpawn.com/texts/pointinpoly/default.html\n\t\t;\n\n\t\tTriangle.getBarycoord = function getBarycoord(point, a, b, c, target) {\n\t\t\t_v0$1.subVectors(c, a);\n\n\t\t\t_v1$3.subVectors(b, a);\n\n\t\t\t_v2$1.subVectors(point, a);\n\n\t\t\tvar dot00 = _v0$1.dot(_v0$1);\n\n\t\t\tvar dot01 = _v0$1.dot(_v1$3);\n\n\t\t\tvar dot02 = _v0$1.dot(_v2$1);\n\n\t\t\tvar dot11 = _v1$3.dot(_v1$3);\n\n\t\t\tvar dot12 = _v1$3.dot(_v2$1);\n\n\t\t\tvar denom = dot00 * dot11 - dot01 * dot01;\n\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .getBarycoord() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t} // collinear or singular triangle\n\n\n\t\t\tif (denom === 0) {\n\t\t\t\t// arbitrary location outside of triangle?\n\t\t\t\t// not sure if this is the best idea, maybe should be returning undefined\n\t\t\t\treturn target.set(-2, -1, -1);\n\t\t\t}\n\n\t\t\tvar invDenom = 1 / denom;\n\t\t\tvar u = (dot11 * dot02 - dot01 * dot12) * invDenom;\n\t\t\tvar v = (dot00 * dot12 - dot01 * dot02) * invDenom; // barycentric coordinates must always sum to 1\n\n\t\t\treturn target.set(1 - u - v, v, u);\n\t\t};\n\n\t\tTriangle.containsPoint = function containsPoint(point, a, b, c) {\n\t\t\tthis.getBarycoord(point, a, b, c, _v3);\n\t\t\treturn _v3.x >= 0 && _v3.y >= 0 && _v3.x + _v3.y <= 1;\n\t\t};\n\n\t\tTriangle.getUV = function getUV(point, p1, p2, p3, uv1, uv2, uv3, target) {\n\t\t\tthis.getBarycoord(point, p1, p2, p3, _v3);\n\t\t\ttarget.set(0, 0);\n\t\t\ttarget.addScaledVector(uv1, _v3.x);\n\t\t\ttarget.addScaledVector(uv2, _v3.y);\n\t\t\ttarget.addScaledVector(uv3, _v3.z);\n\t\t\treturn target;\n\t\t};\n\n\t\tTriangle.isFrontFacing = function isFrontFacing(a, b, c, direction) {\n\t\t\t_v0$1.subVectors(c, b);\n\n\t\t\t_v1$3.subVectors(a, b); // strictly front facing\n\n\n\t\t\treturn _v0$1.cross(_v1$3).dot(direction) < 0 ? true : false;\n\t\t};\n\n\t\tvar _proto = Triangle.prototype;\n\n\t\t_proto.set = function set(a, b, c) {\n\t\t\tthis.a.copy(a);\n\t\t\tthis.b.copy(b);\n\t\t\tthis.c.copy(c);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromPointsAndIndices = function setFromPointsAndIndices(points, i0, i1, i2) {\n\t\t\tthis.a.copy(points[i0]);\n\t\t\tthis.b.copy(points[i1]);\n\t\t\tthis.c.copy(points[i2]);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(triangle) {\n\t\t\tthis.a.copy(triangle.a);\n\t\t\tthis.b.copy(triangle.b);\n\t\t\tthis.c.copy(triangle.c);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getArea = function getArea() {\n\t\t\t_v0$1.subVectors(this.c, this.b);\n\n\t\t\t_v1$3.subVectors(this.a, this.b);\n\n\t\t\treturn _v0$1.cross(_v1$3).length() * 0.5;\n\t\t};\n\n\t\t_proto.getMidpoint = function getMidpoint(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .getMidpoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);\n\t\t};\n\n\t\t_proto.getNormal = function getNormal(target) {\n\t\t\treturn Triangle.getNormal(this.a, this.b, this.c, target);\n\t\t};\n\n\t\t_proto.getPlane = function getPlane(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .getPlane() target is now required');\n\t\t\t\ttarget = new Plane();\n\t\t\t}\n\n\t\t\treturn target.setFromCoplanarPoints(this.a, this.b, this.c);\n\t\t};\n\n\t\t_proto.getBarycoord = function getBarycoord(point, target) {\n\t\t\treturn Triangle.getBarycoord(point, this.a, this.b, this.c, target);\n\t\t};\n\n\t\t_proto.getUV = function getUV(point, uv1, uv2, uv3, target) {\n\t\t\treturn Triangle.getUV(point, this.a, this.b, this.c, uv1, uv2, uv3, target);\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\treturn Triangle.containsPoint(point, this.a, this.b, this.c);\n\t\t};\n\n\t\t_proto.isFrontFacing = function isFrontFacing(direction) {\n\t\t\treturn Triangle.isFrontFacing(this.a, this.b, this.c, direction);\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\treturn box.intersectsTriangle(this);\n\t\t};\n\n\t\t_proto.closestPointToPoint = function closestPointToPoint(p, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Triangle: .closestPointToPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tvar a = this.a,\n\t\t\t\t\tb = this.b,\n\t\t\t\t\tc = this.c;\n\t\t\tvar v, w; // algorithm thanks to Real-Time Collision Detection by Christer Ericson,\n\t\t\t// published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc.,\n\t\t\t// under the accompanying license; see chapter 5.1.5 for detailed explanation.\n\t\t\t// basically, we're distinguishing which of the voronoi regions of the triangle\n\t\t\t// the point lies in with the minimum amount of redundant computation.\n\n\t\t\t_vab.subVectors(b, a);\n\n\t\t\t_vac.subVectors(c, a);\n\n\t\t\t_vap.subVectors(p, a);\n\n\t\t\tvar d1 = _vab.dot(_vap);\n\n\t\t\tvar d2 = _vac.dot(_vap);\n\n\t\t\tif (d1 <= 0 && d2 <= 0) {\n\t\t\t\t// vertex region of A; barycentric coords (1, 0, 0)\n\t\t\t\treturn target.copy(a);\n\t\t\t}\n\n\t\t\t_vbp.subVectors(p, b);\n\n\t\t\tvar d3 = _vab.dot(_vbp);\n\n\t\t\tvar d4 = _vac.dot(_vbp);\n\n\t\t\tif (d3 >= 0 && d4 <= d3) {\n\t\t\t\t// vertex region of B; barycentric coords (0, 1, 0)\n\t\t\t\treturn target.copy(b);\n\t\t\t}\n\n\t\t\tvar vc = d1 * d4 - d3 * d2;\n\n\t\t\tif (vc <= 0 && d1 >= 0 && d3 <= 0) {\n\t\t\t\tv = d1 / (d1 - d3); // edge region of AB; barycentric coords (1-v, v, 0)\n\n\t\t\t\treturn target.copy(a).addScaledVector(_vab, v);\n\t\t\t}\n\n\t\t\t_vcp.subVectors(p, c);\n\n\t\t\tvar d5 = _vab.dot(_vcp);\n\n\t\t\tvar d6 = _vac.dot(_vcp);\n\n\t\t\tif (d6 >= 0 && d5 <= d6) {\n\t\t\t\t// vertex region of C; barycentric coords (0, 0, 1)\n\t\t\t\treturn target.copy(c);\n\t\t\t}\n\n\t\t\tvar vb = d5 * d2 - d1 * d6;\n\n\t\t\tif (vb <= 0 && d2 >= 0 && d6 <= 0) {\n\t\t\t\tw = d2 / (d2 - d6); // edge region of AC; barycentric coords (1-w, 0, w)\n\n\t\t\t\treturn target.copy(a).addScaledVector(_vac, w);\n\t\t\t}\n\n\t\t\tvar va = d3 * d6 - d5 * d4;\n\n\t\t\tif (va <= 0 && d4 - d3 >= 0 && d5 - d6 >= 0) {\n\t\t\t\t_vbc.subVectors(c, b);\n\n\t\t\t\tw = (d4 - d3) / (d4 - d3 + (d5 - d6)); // edge region of BC; barycentric coords (0, 1-w, w)\n\n\t\t\t\treturn target.copy(b).addScaledVector(_vbc, w); // edge region of BC\n\t\t\t} // face region\n\n\n\t\t\tvar denom = 1 / (va + vb + vc); // u = va * denom\n\n\t\t\tv = vb * denom;\n\t\t\tw = vc * denom;\n\t\t\treturn target.copy(a).addScaledVector(_vab, v).addScaledVector(_vac, w);\n\t\t};\n\n\t\t_proto.equals = function equals(triangle) {\n\t\t\treturn triangle.a.equals(this.a) && triangle.b.equals(this.b) && triangle.c.equals(this.c);\n\t\t};\n\n\t\treturn Triangle;\n\t}();\n\n\tvar _colorKeywords = {\n\t\t'aliceblue': 0xF0F8FF,\n\t\t'antiquewhite': 0xFAEBD7,\n\t\t'aqua': 0x00FFFF,\n\t\t'aquamarine': 0x7FFFD4,\n\t\t'azure': 0xF0FFFF,\n\t\t'beige': 0xF5F5DC,\n\t\t'bisque': 0xFFE4C4,\n\t\t'black': 0x000000,\n\t\t'blanchedalmond': 0xFFEBCD,\n\t\t'blue': 0x0000FF,\n\t\t'blueviolet': 0x8A2BE2,\n\t\t'brown': 0xA52A2A,\n\t\t'burlywood': 0xDEB887,\n\t\t'cadetblue': 0x5F9EA0,\n\t\t'chartreuse': 0x7FFF00,\n\t\t'chocolate': 0xD2691E,\n\t\t'coral': 0xFF7F50,\n\t\t'cornflowerblue': 0x6495ED,\n\t\t'cornsilk': 0xFFF8DC,\n\t\t'crimson': 0xDC143C,\n\t\t'cyan': 0x00FFFF,\n\t\t'darkblue': 0x00008B,\n\t\t'darkcyan': 0x008B8B,\n\t\t'darkgoldenrod': 0xB8860B,\n\t\t'darkgray': 0xA9A9A9,\n\t\t'darkgreen': 0x006400,\n\t\t'darkgrey': 0xA9A9A9,\n\t\t'darkkhaki': 0xBDB76B,\n\t\t'darkmagenta': 0x8B008B,\n\t\t'darkolivegreen': 0x556B2F,\n\t\t'darkorange': 0xFF8C00,\n\t\t'darkorchid': 0x9932CC,\n\t\t'darkred': 0x8B0000,\n\t\t'darksalmon': 0xE9967A,\n\t\t'darkseagreen': 0x8FBC8F,\n\t\t'darkslateblue': 0x483D8B,\n\t\t'darkslategray': 0x2F4F4F,\n\t\t'darkslategrey': 0x2F4F4F,\n\t\t'darkturquoise': 0x00CED1,\n\t\t'darkviolet': 0x9400D3,\n\t\t'deeppink': 0xFF1493,\n\t\t'deepskyblue': 0x00BFFF,\n\t\t'dimgray': 0x696969,\n\t\t'dimgrey': 0x696969,\n\t\t'dodgerblue': 0x1E90FF,\n\t\t'firebrick': 0xB22222,\n\t\t'floralwhite': 0xFFFAF0,\n\t\t'forestgreen': 0x228B22,\n\t\t'fuchsia': 0xFF00FF,\n\t\t'gainsboro': 0xDCDCDC,\n\t\t'ghostwhite': 0xF8F8FF,\n\t\t'gold': 0xFFD700,\n\t\t'goldenrod': 0xDAA520,\n\t\t'gray': 0x808080,\n\t\t'green': 0x008000,\n\t\t'greenyellow': 0xADFF2F,\n\t\t'grey': 0x808080,\n\t\t'honeydew': 0xF0FFF0,\n\t\t'hotpink': 0xFF69B4,\n\t\t'indianred': 0xCD5C5C,\n\t\t'indigo': 0x4B0082,\n\t\t'ivory': 0xFFFFF0,\n\t\t'khaki': 0xF0E68C,\n\t\t'lavender': 0xE6E6FA,\n\t\t'lavenderblush': 0xFFF0F5,\n\t\t'lawngreen': 0x7CFC00,\n\t\t'lemonchiffon': 0xFFFACD,\n\t\t'lightblue': 0xADD8E6,\n\t\t'lightcoral': 0xF08080,\n\t\t'lightcyan': 0xE0FFFF,\n\t\t'lightgoldenrodyellow': 0xFAFAD2,\n\t\t'lightgray': 0xD3D3D3,\n\t\t'lightgreen': 0x90EE90,\n\t\t'lightgrey': 0xD3D3D3,\n\t\t'lightpink': 0xFFB6C1,\n\t\t'lightsalmon': 0xFFA07A,\n\t\t'lightseagreen': 0x20B2AA,\n\t\t'lightskyblue': 0x87CEFA,\n\t\t'lightslategray': 0x778899,\n\t\t'lightslategrey': 0x778899,\n\t\t'lightsteelblue': 0xB0C4DE,\n\t\t'lightyellow': 0xFFFFE0,\n\t\t'lime': 0x00FF00,\n\t\t'limegreen': 0x32CD32,\n\t\t'linen': 0xFAF0E6,\n\t\t'magenta': 0xFF00FF,\n\t\t'maroon': 0x800000,\n\t\t'mediumaquamarine': 0x66CDAA,\n\t\t'mediumblue': 0x0000CD,\n\t\t'mediumorchid': 0xBA55D3,\n\t\t'mediumpurple': 0x9370DB,\n\t\t'mediumseagreen': 0x3CB371,\n\t\t'mediumslateblue': 0x7B68EE,\n\t\t'mediumspringgreen': 0x00FA9A,\n\t\t'mediumturquoise': 0x48D1CC,\n\t\t'mediumvioletred': 0xC71585,\n\t\t'midnightblue': 0x191970,\n\t\t'mintcream': 0xF5FFFA,\n\t\t'mistyrose': 0xFFE4E1,\n\t\t'moccasin': 0xFFE4B5,\n\t\t'navajowhite': 0xFFDEAD,\n\t\t'navy': 0x000080,\n\t\t'oldlace': 0xFDF5E6,\n\t\t'olive': 0x808000,\n\t\t'olivedrab': 0x6B8E23,\n\t\t'orange': 0xFFA500,\n\t\t'orangered': 0xFF4500,\n\t\t'orchid': 0xDA70D6,\n\t\t'palegoldenrod': 0xEEE8AA,\n\t\t'palegreen': 0x98FB98,\n\t\t'paleturquoise': 0xAFEEEE,\n\t\t'palevioletred': 0xDB7093,\n\t\t'papayawhip': 0xFFEFD5,\n\t\t'peachpuff': 0xFFDAB9,\n\t\t'peru': 0xCD853F,\n\t\t'pink': 0xFFC0CB,\n\t\t'plum': 0xDDA0DD,\n\t\t'powderblue': 0xB0E0E6,\n\t\t'purple': 0x800080,\n\t\t'rebeccapurple': 0x663399,\n\t\t'red': 0xFF0000,\n\t\t'rosybrown': 0xBC8F8F,\n\t\t'royalblue': 0x4169E1,\n\t\t'saddlebrown': 0x8B4513,\n\t\t'salmon': 0xFA8072,\n\t\t'sandybrown': 0xF4A460,\n\t\t'seagreen': 0x2E8B57,\n\t\t'seashell': 0xFFF5EE,\n\t\t'sienna': 0xA0522D,\n\t\t'silver': 0xC0C0C0,\n\t\t'skyblue': 0x87CEEB,\n\t\t'slateblue': 0x6A5ACD,\n\t\t'slategray': 0x708090,\n\t\t'slategrey': 0x708090,\n\t\t'snow': 0xFFFAFA,\n\t\t'springgreen': 0x00FF7F,\n\t\t'steelblue': 0x4682B4,\n\t\t'tan': 0xD2B48C,\n\t\t'teal': 0x008080,\n\t\t'thistle': 0xD8BFD8,\n\t\t'tomato': 0xFF6347,\n\t\t'turquoise': 0x40E0D0,\n\t\t'violet': 0xEE82EE,\n\t\t'wheat': 0xF5DEB3,\n\t\t'white': 0xFFFFFF,\n\t\t'whitesmoke': 0xF5F5F5,\n\t\t'yellow': 0xFFFF00,\n\t\t'yellowgreen': 0x9ACD32\n\t};\n\tvar _hslA = {\n\t\th: 0,\n\t\ts: 0,\n\t\tl: 0\n\t};\n\tvar _hslB = {\n\t\th: 0,\n\t\ts: 0,\n\t\tl: 0\n\t};\n\n\tfunction hue2rgb(p, q, t) {\n\t\tif (t < 0) t += 1;\n\t\tif (t > 1) t -= 1;\n\t\tif (t < 1 / 6) return p + (q - p) * 6 * t;\n\t\tif (t < 1 / 2) return q;\n\t\tif (t < 2 / 3) return p + (q - p) * 6 * (2 / 3 - t);\n\t\treturn p;\n\t}\n\n\tfunction SRGBToLinear(c) {\n\t\treturn c < 0.04045 ? c * 0.0773993808 : Math.pow(c * 0.9478672986 + 0.0521327014, 2.4);\n\t}\n\n\tfunction LinearToSRGB(c) {\n\t\treturn c < 0.0031308 ? c * 12.92 : 1.055 * Math.pow(c, 0.41666) - 0.055;\n\t}\n\n\tvar Color = /*#__PURE__*/function () {\n\t\tfunction Color(r, g, b) {\n\t\t\tObject.defineProperty(this, 'isColor', {\n\t\t\t\tvalue: true\n\t\t\t});\n\n\t\t\tif (g === undefined && b === undefined) {\n\t\t\t\t// r is THREE.Color, hex or string\n\t\t\t\treturn this.set(r);\n\t\t\t}\n\n\t\t\treturn this.setRGB(r, g, b);\n\t\t}\n\n\t\tvar _proto = Color.prototype;\n\n\t\t_proto.set = function set(value) {\n\t\t\tif (value && value.isColor) {\n\t\t\t\tthis.copy(value);\n\t\t\t} else if (typeof value === 'number') {\n\t\t\t\tthis.setHex(value);\n\t\t\t} else if (typeof value === 'string') {\n\t\t\t\tthis.setStyle(value);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setScalar = function setScalar(scalar) {\n\t\t\tthis.r = scalar;\n\t\t\tthis.g = scalar;\n\t\t\tthis.b = scalar;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setHex = function setHex(hex) {\n\t\t\thex = Math.floor(hex);\n\t\t\tthis.r = (hex >> 16 & 255) / 255;\n\t\t\tthis.g = (hex >> 8 & 255) / 255;\n\t\t\tthis.b = (hex & 255) / 255;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setRGB = function setRGB(r, g, b) {\n\t\t\tthis.r = r;\n\t\t\tthis.g = g;\n\t\t\tthis.b = b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setHSL = function setHSL(h, s, l) {\n\t\t\t// h,s,l ranges are in 0.0 - 1.0\n\t\t\th = MathUtils.euclideanModulo(h, 1);\n\t\t\ts = MathUtils.clamp(s, 0, 1);\n\t\t\tl = MathUtils.clamp(l, 0, 1);\n\n\t\t\tif (s === 0) {\n\t\t\t\tthis.r = this.g = this.b = l;\n\t\t\t} else {\n\t\t\t\tvar p = l <= 0.5 ? l * (1 + s) : l + s - l * s;\n\t\t\t\tvar q = 2 * l - p;\n\t\t\t\tthis.r = hue2rgb(q, p, h + 1 / 3);\n\t\t\t\tthis.g = hue2rgb(q, p, h);\n\t\t\t\tthis.b = hue2rgb(q, p, h - 1 / 3);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setStyle = function setStyle(style) {\n\t\t\tfunction handleAlpha(string) {\n\t\t\t\tif (string === undefined) return;\n\n\t\t\t\tif (parseFloat(string) < 1) {\n\t\t\t\t\tconsole.warn('THREE.Color: Alpha component of ' + style + ' will be ignored.');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar m;\n\n\t\t\tif (m = /^((?:rgb|hsl)a?)\\(([^\\)]*)\\)/.exec(style)) {\n\t\t\t\t// rgb / hsl\n\t\t\t\tvar color;\n\t\t\t\tvar name = m[1];\n\t\t\t\tvar components = m[2];\n\n\t\t\t\tswitch (name) {\n\t\t\t\t\tcase 'rgb':\n\t\t\t\t\tcase 'rgba':\n\t\t\t\t\t\tif (color = /^\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n\t\t\t\t\t\t\t// rgb(255,0,0) rgba(255,0,0,0.5)\n\t\t\t\t\t\t\tthis.r = Math.min(255, parseInt(color[1], 10)) / 255;\n\t\t\t\t\t\t\tthis.g = Math.min(255, parseInt(color[2], 10)) / 255;\n\t\t\t\t\t\t\tthis.b = Math.min(255, parseInt(color[3], 10)) / 255;\n\t\t\t\t\t\t\thandleAlpha(color[4]);\n\t\t\t\t\t\t\treturn this;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (color = /^\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n\t\t\t\t\t\t\t// rgb(100%,0%,0%) rgba(100%,0%,0%,0.5)\n\t\t\t\t\t\t\tthis.r = Math.min(100, parseInt(color[1], 10)) / 100;\n\t\t\t\t\t\t\tthis.g = Math.min(100, parseInt(color[2], 10)) / 100;\n\t\t\t\t\t\t\tthis.b = Math.min(100, parseInt(color[3], 10)) / 100;\n\t\t\t\t\t\t\thandleAlpha(color[4]);\n\t\t\t\t\t\t\treturn this;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'hsl':\n\t\t\t\t\tcase 'hsla':\n\t\t\t\t\t\tif (color = /^\\s*(\\d*\\.?\\d+)\\s*,\\s*(\\d+)\\%\\s*,\\s*(\\d+)\\%\\s*(?:,\\s*(\\d*\\.?\\d+)\\s*)?$/.exec(components)) {\n\t\t\t\t\t\t\t// hsl(120,50%,50%) hsla(120,50%,50%,0.5)\n\t\t\t\t\t\t\tvar h = parseFloat(color[1]) / 360;\n\t\t\t\t\t\t\tvar s = parseInt(color[2], 10) / 100;\n\t\t\t\t\t\t\tvar l = parseInt(color[3], 10) / 100;\n\t\t\t\t\t\t\thandleAlpha(color[4]);\n\t\t\t\t\t\t\treturn this.setHSL(h, s, l);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if (m = /^\\#([A-Fa-f\\d]+)$/.exec(style)) {\n\t\t\t\t// hex color\n\t\t\t\tvar hex = m[1];\n\t\t\t\tvar size = hex.length;\n\n\t\t\t\tif (size === 3) {\n\t\t\t\t\t// #ff0\n\t\t\t\t\tthis.r = parseInt(hex.charAt(0) + hex.charAt(0), 16) / 255;\n\t\t\t\t\tthis.g = parseInt(hex.charAt(1) + hex.charAt(1), 16) / 255;\n\t\t\t\t\tthis.b = parseInt(hex.charAt(2) + hex.charAt(2), 16) / 255;\n\t\t\t\t\treturn this;\n\t\t\t\t} else if (size === 6) {\n\t\t\t\t\t// #ff0000\n\t\t\t\t\tthis.r = parseInt(hex.charAt(0) + hex.charAt(1), 16) / 255;\n\t\t\t\t\tthis.g = parseInt(hex.charAt(2) + hex.charAt(3), 16) / 255;\n\t\t\t\t\tthis.b = parseInt(hex.charAt(4) + hex.charAt(5), 16) / 255;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (style && style.length > 0) {\n\t\t\t\treturn this.setColorName(style);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setColorName = function setColorName(style) {\n\t\t\t// color keywords\n\t\t\tvar hex = _colorKeywords[style];\n\n\t\t\tif (hex !== undefined) {\n\t\t\t\t// red\n\t\t\t\tthis.setHex(hex);\n\t\t\t} else {\n\t\t\t\t// unknown color\n\t\t\t\tconsole.warn('THREE.Color: Unknown color ' + style);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor(this.r, this.g, this.b);\n\t\t};\n\n\t\t_proto.copy = function copy(color) {\n\t\t\tthis.r = color.r;\n\t\t\tthis.g = color.g;\n\t\t\tthis.b = color.b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copyGammaToLinear = function copyGammaToLinear(color, gammaFactor) {\n\t\t\tif (gammaFactor === void 0) {\n\t\t\t\tgammaFactor = 2.0;\n\t\t\t}\n\n\t\t\tthis.r = Math.pow(color.r, gammaFactor);\n\t\t\tthis.g = Math.pow(color.g, gammaFactor);\n\t\t\tthis.b = Math.pow(color.b, gammaFactor);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copyLinearToGamma = function copyLinearToGamma(color, gammaFactor) {\n\t\t\tif (gammaFactor === void 0) {\n\t\t\t\tgammaFactor = 2.0;\n\t\t\t}\n\n\t\t\tvar safeInverse = gammaFactor > 0 ? 1.0 / gammaFactor : 1.0;\n\t\t\tthis.r = Math.pow(color.r, safeInverse);\n\t\t\tthis.g = Math.pow(color.g, safeInverse);\n\t\t\tthis.b = Math.pow(color.b, safeInverse);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.convertGammaToLinear = function convertGammaToLinear(gammaFactor) {\n\t\t\tthis.copyGammaToLinear(this, gammaFactor);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.convertLinearToGamma = function convertLinearToGamma(gammaFactor) {\n\t\t\tthis.copyLinearToGamma(this, gammaFactor);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copySRGBToLinear = function copySRGBToLinear(color) {\n\t\t\tthis.r = SRGBToLinear(color.r);\n\t\t\tthis.g = SRGBToLinear(color.g);\n\t\t\tthis.b = SRGBToLinear(color.b);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copyLinearToSRGB = function copyLinearToSRGB(color) {\n\t\t\tthis.r = LinearToSRGB(color.r);\n\t\t\tthis.g = LinearToSRGB(color.g);\n\t\t\tthis.b = LinearToSRGB(color.b);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.convertSRGBToLinear = function convertSRGBToLinear() {\n\t\t\tthis.copySRGBToLinear(this);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.convertLinearToSRGB = function convertLinearToSRGB() {\n\t\t\tthis.copyLinearToSRGB(this);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getHex = function getHex() {\n\t\t\treturn this.r * 255 << 16 ^ this.g * 255 << 8 ^ this.b * 255 << 0;\n\t\t};\n\n\t\t_proto.getHexString = function getHexString() {\n\t\t\treturn ('000000' + this.getHex().toString(16)).slice(-6);\n\t\t};\n\n\t\t_proto.getHSL = function getHSL(target) {\n\t\t\t// h,s,l ranges are in 0.0 - 1.0\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Color: .getHSL() target is now required');\n\t\t\t\ttarget = {\n\t\t\t\t\th: 0,\n\t\t\t\t\ts: 0,\n\t\t\t\t\tl: 0\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar r = this.r,\n\t\t\t\t\tg = this.g,\n\t\t\t\t\tb = this.b;\n\t\t\tvar max = Math.max(r, g, b);\n\t\t\tvar min = Math.min(r, g, b);\n\t\t\tvar hue, saturation;\n\t\t\tvar lightness = (min + max) / 2.0;\n\n\t\t\tif (min === max) {\n\t\t\t\thue = 0;\n\t\t\t\tsaturation = 0;\n\t\t\t} else {\n\t\t\t\tvar delta = max - min;\n\t\t\t\tsaturation = lightness <= 0.5 ? delta / (max + min) : delta / (2 - max - min);\n\n\t\t\t\tswitch (max) {\n\t\t\t\t\tcase r:\n\t\t\t\t\t\thue = (g - b) / delta + (g < b ? 6 : 0);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase g:\n\t\t\t\t\t\thue = (b - r) / delta + 2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase b:\n\t\t\t\t\t\thue = (r - g) / delta + 4;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\thue /= 6;\n\t\t\t}\n\n\t\t\ttarget.h = hue;\n\t\t\ttarget.s = saturation;\n\t\t\ttarget.l = lightness;\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.getStyle = function getStyle() {\n\t\t\treturn 'rgb(' + (this.r * 255 | 0) + ',' + (this.g * 255 | 0) + ',' + (this.b * 255 | 0) + ')';\n\t\t};\n\n\t\t_proto.offsetHSL = function offsetHSL(h, s, l) {\n\t\t\tthis.getHSL(_hslA);\n\t\t\t_hslA.h += h;\n\t\t\t_hslA.s += s;\n\t\t\t_hslA.l += l;\n\t\t\tthis.setHSL(_hslA.h, _hslA.s, _hslA.l);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.add = function add(color) {\n\t\t\tthis.r += color.r;\n\t\t\tthis.g += color.g;\n\t\t\tthis.b += color.b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addColors = function addColors(color1, color2) {\n\t\t\tthis.r = color1.r + color2.r;\n\t\t\tthis.g = color1.g + color2.g;\n\t\t\tthis.b = color1.b + color2.b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScalar = function addScalar(s) {\n\t\t\tthis.r += s;\n\t\t\tthis.g += s;\n\t\t\tthis.b += s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.sub = function sub(color) {\n\t\t\tthis.r = Math.max(0, this.r - color.r);\n\t\t\tthis.g = Math.max(0, this.g - color.g);\n\t\t\tthis.b = Math.max(0, this.b - color.b);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiply = function multiply(color) {\n\t\t\tthis.r *= color.r;\n\t\t\tthis.g *= color.g;\n\t\t\tthis.b *= color.b;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.multiplyScalar = function multiplyScalar(s) {\n\t\t\tthis.r *= s;\n\t\t\tthis.g *= s;\n\t\t\tthis.b *= s;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerp = function lerp(color, alpha) {\n\t\t\tthis.r += (color.r - this.r) * alpha;\n\t\t\tthis.g += (color.g - this.g) * alpha;\n\t\t\tthis.b += (color.b - this.b) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpColors = function lerpColors(color1, color2, alpha) {\n\t\t\tthis.r = color1.r + (color2.r - color1.r) * alpha;\n\t\t\tthis.g = color1.g + (color2.g - color1.g) * alpha;\n\t\t\tthis.b = color1.b + (color2.b - color1.b) * alpha;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerpHSL = function lerpHSL(color, alpha) {\n\t\t\tthis.getHSL(_hslA);\n\t\t\tcolor.getHSL(_hslB);\n\t\t\tvar h = MathUtils.lerp(_hslA.h, _hslB.h, alpha);\n\t\t\tvar s = MathUtils.lerp(_hslA.s, _hslB.s, alpha);\n\t\t\tvar l = MathUtils.lerp(_hslA.l, _hslB.l, alpha);\n\t\t\tthis.setHSL(h, s, l);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(c) {\n\t\t\treturn c.r === this.r && c.g === this.g && c.b === this.b;\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.r = array[offset];\n\t\t\tthis.g = array[offset + 1];\n\t\t\tthis.b = array[offset + 2];\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tarray[offset] = this.r;\n\t\t\tarray[offset + 1] = this.g;\n\t\t\tarray[offset + 2] = this.b;\n\t\t\treturn array;\n\t\t};\n\n\t\t_proto.fromBufferAttribute = function fromBufferAttribute(attribute, index) {\n\t\t\tthis.r = attribute.getX(index);\n\t\t\tthis.g = attribute.getY(index);\n\t\t\tthis.b = attribute.getZ(index);\n\n\t\t\tif (attribute.normalized === true) {\n\t\t\t\t// assuming Uint8Array\n\t\t\t\tthis.r /= 255;\n\t\t\t\tthis.g /= 255;\n\t\t\t\tthis.b /= 255;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toJSON = function toJSON() {\n\t\t\treturn this.getHex();\n\t\t};\n\n\t\treturn Color;\n\t}();\n\n\tColor.NAMES = _colorKeywords;\n\tColor.prototype.r = 1;\n\tColor.prototype.g = 1;\n\tColor.prototype.b = 1;\n\n\tvar Face3 = /*#__PURE__*/function () {\n\t\tfunction Face3(a, b, c, normal, color, materialIndex) {\n\t\t\tif (materialIndex === void 0) {\n\t\t\t\tmaterialIndex = 0;\n\t\t\t}\n\n\t\t\tthis.a = a;\n\t\t\tthis.b = b;\n\t\t\tthis.c = c;\n\t\t\tthis.normal = normal && normal.isVector3 ? normal : new Vector3();\n\t\t\tthis.vertexNormals = Array.isArray(normal) ? normal : [];\n\t\t\tthis.color = color && color.isColor ? color : new Color();\n\t\t\tthis.vertexColors = Array.isArray(color) ? color : [];\n\t\t\tthis.materialIndex = materialIndex;\n\t\t}\n\n\t\tvar _proto = Face3.prototype;\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(source) {\n\t\t\tthis.a = source.a;\n\t\t\tthis.b = source.b;\n\t\t\tthis.c = source.c;\n\t\t\tthis.normal.copy(source.normal);\n\t\t\tthis.color.copy(source.color);\n\t\t\tthis.materialIndex = source.materialIndex;\n\n\t\t\tfor (var i = 0, il = source.vertexNormals.length; i < il; i++) {\n\t\t\t\tthis.vertexNormals[i] = source.vertexNormals[i].clone();\n\t\t\t}\n\n\t\t\tfor (var _i = 0, _il = source.vertexColors.length; _i < _il; _i++) {\n\t\t\t\tthis.vertexColors[_i] = source.vertexColors[_i].clone();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Face3;\n\t}();\n\n\tvar materialId = 0;\n\n\tfunction Material() {\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tvalue: materialId++\n\t\t});\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.name = '';\n\t\tthis.type = 'Material';\n\t\tthis.fog = true;\n\t\tthis.blending = NormalBlending;\n\t\tthis.side = FrontSide;\n\t\tthis.flatShading = false;\n\t\tthis.vertexColors = false;\n\t\tthis.opacity = 1;\n\t\tthis.transparent = false;\n\t\tthis.blendSrc = SrcAlphaFactor;\n\t\tthis.blendDst = OneMinusSrcAlphaFactor;\n\t\tthis.blendEquation = AddEquation;\n\t\tthis.blendSrcAlpha = null;\n\t\tthis.blendDstAlpha = null;\n\t\tthis.blendEquationAlpha = null;\n\t\tthis.depthFunc = LessEqualDepth;\n\t\tthis.depthTest = true;\n\t\tthis.depthWrite = true;\n\t\tthis.stencilWriteMask = 0xff;\n\t\tthis.stencilFunc = AlwaysStencilFunc;\n\t\tthis.stencilRef = 0;\n\t\tthis.stencilFuncMask = 0xff;\n\t\tthis.stencilFail = KeepStencilOp;\n\t\tthis.stencilZFail = KeepStencilOp;\n\t\tthis.stencilZPass = KeepStencilOp;\n\t\tthis.stencilWrite = false;\n\t\tthis.clippingPlanes = null;\n\t\tthis.clipIntersection = false;\n\t\tthis.clipShadows = false;\n\t\tthis.shadowSide = null;\n\t\tthis.colorWrite = true;\n\t\tthis.precision = null; // override the renderer's default precision for this material\n\n\t\tthis.polygonOffset = false;\n\t\tthis.polygonOffsetFactor = 0;\n\t\tthis.polygonOffsetUnits = 0;\n\t\tthis.dithering = false;\n\t\tthis.alphaTest = 0;\n\t\tthis.premultipliedAlpha = false;\n\t\tthis.visible = true;\n\t\tthis.toneMapped = true;\n\t\tthis.userData = {};\n\t\tthis.version = 0;\n\t}\n\n\tMaterial.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: Material,\n\t\tisMaterial: true,\n\t\tonBeforeCompile: function onBeforeCompile()\n\t\t/* shaderobject, renderer */\n\t\t{},\n\t\tcustomProgramCacheKey: function customProgramCacheKey() {\n\t\t\treturn this.onBeforeCompile.toString();\n\t\t},\n\t\tsetValues: function setValues(values) {\n\t\t\tif (values === undefined) return;\n\n\t\t\tfor (var key in values) {\n\t\t\t\tvar newValue = values[key];\n\n\t\t\t\tif (newValue === undefined) {\n\t\t\t\t\tconsole.warn('THREE.Material: \\'' + key + '\\' parameter is undefined.');\n\t\t\t\t\tcontinue;\n\t\t\t\t} // for backward compatability if shading is set in the constructor\n\n\n\t\t\t\tif (key === 'shading') {\n\t\t\t\t\tconsole.warn('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.');\n\t\t\t\t\tthis.flatShading = newValue === FlatShading ? true : false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tvar currentValue = this[key];\n\n\t\t\t\tif (currentValue === undefined) {\n\t\t\t\t\tconsole.warn('THREE.' + this.type + ': \\'' + key + '\\' is not a property of this material.');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (currentValue && currentValue.isColor) {\n\t\t\t\t\tcurrentValue.set(newValue);\n\t\t\t\t} else if (currentValue && currentValue.isVector3 && newValue && newValue.isVector3) {\n\t\t\t\t\tcurrentValue.copy(newValue);\n\t\t\t\t} else {\n\t\t\t\t\tthis[key] = newValue;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar isRoot = meta === undefined || typeof meta === 'string';\n\n\t\t\tif (isRoot) {\n\t\t\t\tmeta = {\n\t\t\t\t\ttextures: {},\n\t\t\t\t\timages: {}\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar data = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Material',\n\t\t\t\t\tgenerator: 'Material.toJSON'\n\t\t\t\t}\n\t\t\t}; // standard Material serialization\n\n\t\t\tdata.uuid = this.uuid;\n\t\t\tdata.type = this.type;\n\t\t\tif (this.name !== '') data.name = this.name;\n\t\t\tif (this.color && this.color.isColor) data.color = this.color.getHex();\n\t\t\tif (this.roughness !== undefined) data.roughness = this.roughness;\n\t\t\tif (this.metalness !== undefined) data.metalness = this.metalness;\n\t\t\tif (this.sheen && this.sheen.isColor) data.sheen = this.sheen.getHex();\n\t\t\tif (this.emissive && this.emissive.isColor) data.emissive = this.emissive.getHex();\n\t\t\tif (this.emissiveIntensity && this.emissiveIntensity !== 1) data.emissiveIntensity = this.emissiveIntensity;\n\t\t\tif (this.specular && this.specular.isColor) data.specular = this.specular.getHex();\n\t\t\tif (this.shininess !== undefined) data.shininess = this.shininess;\n\t\t\tif (this.clearcoat !== undefined) data.clearcoat = this.clearcoat;\n\t\t\tif (this.clearcoatRoughness !== undefined) data.clearcoatRoughness = this.clearcoatRoughness;\n\n\t\t\tif (this.clearcoatMap && this.clearcoatMap.isTexture) {\n\t\t\t\tdata.clearcoatMap = this.clearcoatMap.toJSON(meta).uuid;\n\t\t\t}\n\n\t\t\tif (this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture) {\n\t\t\t\tdata.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(meta).uuid;\n\t\t\t}\n\n\t\t\tif (this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture) {\n\t\t\t\tdata.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(meta).uuid;\n\t\t\t\tdata.clearcoatNormalScale = this.clearcoatNormalScale.toArray();\n\t\t\t}\n\n\t\t\tif (this.map && this.map.isTexture) data.map = this.map.toJSON(meta).uuid;\n\t\t\tif (this.matcap && this.matcap.isTexture) data.matcap = this.matcap.toJSON(meta).uuid;\n\t\t\tif (this.alphaMap && this.alphaMap.isTexture) data.alphaMap = this.alphaMap.toJSON(meta).uuid;\n\t\t\tif (this.lightMap && this.lightMap.isTexture) data.lightMap = this.lightMap.toJSON(meta).uuid;\n\n\t\t\tif (this.aoMap && this.aoMap.isTexture) {\n\t\t\t\tdata.aoMap = this.aoMap.toJSON(meta).uuid;\n\t\t\t\tdata.aoMapIntensity = this.aoMapIntensity;\n\t\t\t}\n\n\t\t\tif (this.bumpMap && this.bumpMap.isTexture) {\n\t\t\t\tdata.bumpMap = this.bumpMap.toJSON(meta).uuid;\n\t\t\t\tdata.bumpScale = this.bumpScale;\n\t\t\t}\n\n\t\t\tif (this.normalMap && this.normalMap.isTexture) {\n\t\t\t\tdata.normalMap = this.normalMap.toJSON(meta).uuid;\n\t\t\t\tdata.normalMapType = this.normalMapType;\n\t\t\t\tdata.normalScale = this.normalScale.toArray();\n\t\t\t}\n\n\t\t\tif (this.displacementMap && this.displacementMap.isTexture) {\n\t\t\t\tdata.displacementMap = this.displacementMap.toJSON(meta).uuid;\n\t\t\t\tdata.displacementScale = this.displacementScale;\n\t\t\t\tdata.displacementBias = this.displacementBias;\n\t\t\t}\n\n\t\t\tif (this.roughnessMap && this.roughnessMap.isTexture) data.roughnessMap = this.roughnessMap.toJSON(meta).uuid;\n\t\t\tif (this.metalnessMap && this.metalnessMap.isTexture) data.metalnessMap = this.metalnessMap.toJSON(meta).uuid;\n\t\t\tif (this.emissiveMap && this.emissiveMap.isTexture) data.emissiveMap = this.emissiveMap.toJSON(meta).uuid;\n\t\t\tif (this.specularMap && this.specularMap.isTexture) data.specularMap = this.specularMap.toJSON(meta).uuid;\n\n\t\t\tif (this.envMap && this.envMap.isTexture) {\n\t\t\t\tdata.envMap = this.envMap.toJSON(meta).uuid;\n\t\t\t\tdata.reflectivity = this.reflectivity; // Scale behind envMap\n\n\t\t\t\tdata.refractionRatio = this.refractionRatio;\n\t\t\t\tif (this.combine !== undefined) data.combine = this.combine;\n\t\t\t\tif (this.envMapIntensity !== undefined) data.envMapIntensity = this.envMapIntensity;\n\t\t\t}\n\n\t\t\tif (this.gradientMap && this.gradientMap.isTexture) {\n\t\t\t\tdata.gradientMap = this.gradientMap.toJSON(meta).uuid;\n\t\t\t}\n\n\t\t\tif (this.size !== undefined) data.size = this.size;\n\t\t\tif (this.sizeAttenuation !== undefined) data.sizeAttenuation = this.sizeAttenuation;\n\t\t\tif (this.blending !== NormalBlending) data.blending = this.blending;\n\t\t\tif (this.flatShading === true) data.flatShading = this.flatShading;\n\t\t\tif (this.side !== FrontSide) data.side = this.side;\n\t\t\tif (this.vertexColors) data.vertexColors = true;\n\t\t\tif (this.opacity < 1) data.opacity = this.opacity;\n\t\t\tif (this.transparent === true) data.transparent = this.transparent;\n\t\t\tdata.depthFunc = this.depthFunc;\n\t\t\tdata.depthTest = this.depthTest;\n\t\t\tdata.depthWrite = this.depthWrite;\n\t\t\tdata.stencilWrite = this.stencilWrite;\n\t\t\tdata.stencilWriteMask = this.stencilWriteMask;\n\t\t\tdata.stencilFunc = this.stencilFunc;\n\t\t\tdata.stencilRef = this.stencilRef;\n\t\t\tdata.stencilFuncMask = this.stencilFuncMask;\n\t\t\tdata.stencilFail = this.stencilFail;\n\t\t\tdata.stencilZFail = this.stencilZFail;\n\t\t\tdata.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial)\n\n\t\t\tif (this.rotation && this.rotation !== 0) data.rotation = this.rotation;\n\t\t\tif (this.polygonOffset === true) data.polygonOffset = true;\n\t\t\tif (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;\n\t\t\tif (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;\n\t\t\tif (this.linewidth && this.linewidth !== 1) data.linewidth = this.linewidth;\n\t\t\tif (this.dashSize !== undefined) data.dashSize = this.dashSize;\n\t\t\tif (this.gapSize !== undefined) data.gapSize = this.gapSize;\n\t\t\tif (this.scale !== undefined) data.scale = this.scale;\n\t\t\tif (this.dithering === true) data.dithering = true;\n\t\t\tif (this.alphaTest > 0) data.alphaTest = this.alphaTest;\n\t\t\tif (this.premultipliedAlpha === true) data.premultipliedAlpha = this.premultipliedAlpha;\n\t\t\tif (this.wireframe === true) data.wireframe = this.wireframe;\n\t\t\tif (this.wireframeLinewidth > 1) data.wireframeLinewidth = this.wireframeLinewidth;\n\t\t\tif (this.wireframeLinecap !== 'round') data.wireframeLinecap = this.wireframeLinecap;\n\t\t\tif (this.wireframeLinejoin !== 'round') data.wireframeLinejoin = this.wireframeLinejoin;\n\t\t\tif (this.morphTargets === true) data.morphTargets = true;\n\t\t\tif (this.morphNormals === true) data.morphNormals = true;\n\t\t\tif (this.skinning === true) data.skinning = true;\n\t\t\tif (this.visible === false) data.visible = false;\n\t\t\tif (this.toneMapped === false) data.toneMapped = false;\n\t\t\tif (JSON.stringify(this.userData) !== '{}') data.userData = this.userData; // TODO: Copied from Object3D.toJSON\n\n\t\t\tfunction extractFromCache(cache) {\n\t\t\t\tvar values = [];\n\n\t\t\t\tfor (var key in cache) {\n\t\t\t\t\tvar _data = cache[key];\n\t\t\t\t\tdelete _data.metadata;\n\t\t\t\t\tvalues.push(_data);\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t}\n\n\t\t\tif (isRoot) {\n\t\t\t\tvar textures = extractFromCache(meta.textures);\n\t\t\t\tvar images = extractFromCache(meta.images);\n\t\t\t\tif (textures.length > 0) data.textures = textures;\n\t\t\t\tif (images.length > 0) data.images = images;\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.name = source.name;\n\t\t\tthis.fog = source.fog;\n\t\t\tthis.blending = source.blending;\n\t\t\tthis.side = source.side;\n\t\t\tthis.flatShading = source.flatShading;\n\t\t\tthis.vertexColors = source.vertexColors;\n\t\t\tthis.opacity = source.opacity;\n\t\t\tthis.transparent = source.transparent;\n\t\t\tthis.blendSrc = source.blendSrc;\n\t\t\tthis.blendDst = source.blendDst;\n\t\t\tthis.blendEquation = source.blendEquation;\n\t\t\tthis.blendSrcAlpha = source.blendSrcAlpha;\n\t\t\tthis.blendDstAlpha = source.blendDstAlpha;\n\t\t\tthis.blendEquationAlpha = source.blendEquationAlpha;\n\t\t\tthis.depthFunc = source.depthFunc;\n\t\t\tthis.depthTest = source.depthTest;\n\t\t\tthis.depthWrite = source.depthWrite;\n\t\t\tthis.stencilWriteMask = source.stencilWriteMask;\n\t\t\tthis.stencilFunc = source.stencilFunc;\n\t\t\tthis.stencilRef = source.stencilRef;\n\t\t\tthis.stencilFuncMask = source.stencilFuncMask;\n\t\t\tthis.stencilFail = source.stencilFail;\n\t\t\tthis.stencilZFail = source.stencilZFail;\n\t\t\tthis.stencilZPass = source.stencilZPass;\n\t\t\tthis.stencilWrite = source.stencilWrite;\n\t\t\tvar srcPlanes = source.clippingPlanes;\n\t\t\tvar dstPlanes = null;\n\n\t\t\tif (srcPlanes !== null) {\n\t\t\t\tvar n = srcPlanes.length;\n\t\t\t\tdstPlanes = new Array(n);\n\n\t\t\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\t\t\tdstPlanes[i] = srcPlanes[i].clone();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.clippingPlanes = dstPlanes;\n\t\t\tthis.clipIntersection = source.clipIntersection;\n\t\t\tthis.clipShadows = source.clipShadows;\n\t\t\tthis.shadowSide = source.shadowSide;\n\t\t\tthis.colorWrite = source.colorWrite;\n\t\t\tthis.precision = source.precision;\n\t\t\tthis.polygonOffset = source.polygonOffset;\n\t\t\tthis.polygonOffsetFactor = source.polygonOffsetFactor;\n\t\t\tthis.polygonOffsetUnits = source.polygonOffsetUnits;\n\t\t\tthis.dithering = source.dithering;\n\t\t\tthis.alphaTest = source.alphaTest;\n\t\t\tthis.premultipliedAlpha = source.premultipliedAlpha;\n\t\t\tthis.visible = source.visible;\n\t\t\tthis.toneMapped = source.toneMapped;\n\t\t\tthis.userData = JSON.parse(JSON.stringify(source.userData));\n\t\t\treturn this;\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t}\n\t});\n\tObject.defineProperty(Material.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\tspecularMap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tenvMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n\t *\tcombine: THREE.Multiply,\n\t *\treflectivity: <float>,\n\t *\trefractionRatio: <float>,\n\t *\n\t *\tdepthTest: <bool>,\n\t *\tdepthWrite: <bool>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>\n\t * }\n\t */\n\n\tfunction MeshBasicMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshBasicMaterial';\n\t\tthis.color = new Color(0xffffff); // emissive\n\n\t\tthis.map = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.specularMap = null;\n\t\tthis.alphaMap = null;\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshBasicMaterial.prototype = Object.create(Material.prototype);\n\tMeshBasicMaterial.prototype.constructor = MeshBasicMaterial;\n\tMeshBasicMaterial.prototype.isMeshBasicMaterial = true;\n\n\tMeshBasicMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.specularMap = source.specularMap;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\treturn this;\n\t};\n\n\tvar _vector$3 = new Vector3();\n\n\tvar _vector2$1 = new Vector2();\n\n\tfunction BufferAttribute(array, itemSize, normalized) {\n\t\tif (Array.isArray(array)) {\n\t\t\tthrow new TypeError('THREE.BufferAttribute: array should be a Typed Array.');\n\t\t}\n\n\t\tthis.name = '';\n\t\tthis.array = array;\n\t\tthis.itemSize = itemSize;\n\t\tthis.count = array !== undefined ? array.length / itemSize : 0;\n\t\tthis.normalized = normalized === true;\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = {\n\t\t\toffset: 0,\n\t\t\tcount: -1\n\t\t};\n\t\tthis.version = 0;\n\t}\n\n\tObject.defineProperty(BufferAttribute.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\tObject.assign(BufferAttribute.prototype, {\n\t\tisBufferAttribute: true,\n\t\tonUploadCallback: function onUploadCallback() {},\n\t\tsetUsage: function setUsage(value) {\n\t\t\tthis.usage = value;\n\t\t\treturn this;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.name = source.name;\n\t\t\tthis.array = new source.array.constructor(source.array);\n\t\t\tthis.itemSize = source.itemSize;\n\t\t\tthis.count = source.count;\n\t\t\tthis.normalized = source.normalized;\n\t\t\tthis.usage = source.usage;\n\t\t\treturn this;\n\t\t},\n\t\tcopyAt: function copyAt(index1, attribute, index2) {\n\t\t\tindex1 *= this.itemSize;\n\t\t\tindex2 *= attribute.itemSize;\n\n\t\t\tfor (var i = 0, l = this.itemSize; i < l; i++) {\n\t\t\t\tthis.array[index1 + i] = attribute.array[index2 + i];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tcopyArray: function copyArray(array) {\n\t\t\tthis.array.set(array);\n\t\t\treturn this;\n\t\t},\n\t\tcopyColorsArray: function copyColorsArray(colors) {\n\t\t\tvar array = this.array;\n\t\t\tvar offset = 0;\n\n\t\t\tfor (var i = 0, l = colors.length; i < l; i++) {\n\t\t\t\tvar color = colors[i];\n\n\t\t\t\tif (color === undefined) {\n\t\t\t\t\tconsole.warn('THREE.BufferAttribute.copyColorsArray(): color is undefined', i);\n\t\t\t\t\tcolor = new Color();\n\t\t\t\t}\n\n\t\t\t\tarray[offset++] = color.r;\n\t\t\t\tarray[offset++] = color.g;\n\t\t\t\tarray[offset++] = color.b;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tcopyVector2sArray: function copyVector2sArray(vectors) {\n\t\t\tvar array = this.array;\n\t\t\tvar offset = 0;\n\n\t\t\tfor (var i = 0, l = vectors.length; i < l; i++) {\n\t\t\t\tvar vector = vectors[i];\n\n\t\t\t\tif (vector === undefined) {\n\t\t\t\t\tconsole.warn('THREE.BufferAttribute.copyVector2sArray(): vector is undefined', i);\n\t\t\t\t\tvector = new Vector2();\n\t\t\t\t}\n\n\t\t\t\tarray[offset++] = vector.x;\n\t\t\t\tarray[offset++] = vector.y;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tcopyVector3sArray: function copyVector3sArray(vectors) {\n\t\t\tvar array = this.array;\n\t\t\tvar offset = 0;\n\n\t\t\tfor (var i = 0, l = vectors.length; i < l; i++) {\n\t\t\t\tvar vector = vectors[i];\n\n\t\t\t\tif (vector === undefined) {\n\t\t\t\t\tconsole.warn('THREE.BufferAttribute.copyVector3sArray(): vector is undefined', i);\n\t\t\t\t\tvector = new Vector3();\n\t\t\t\t}\n\n\t\t\t\tarray[offset++] = vector.x;\n\t\t\t\tarray[offset++] = vector.y;\n\t\t\t\tarray[offset++] = vector.z;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tcopyVector4sArray: function copyVector4sArray(vectors) {\n\t\t\tvar array = this.array;\n\t\t\tvar offset = 0;\n\n\t\t\tfor (var i = 0, l = vectors.length; i < l; i++) {\n\t\t\t\tvar vector = vectors[i];\n\n\t\t\t\tif (vector === undefined) {\n\t\t\t\t\tconsole.warn('THREE.BufferAttribute.copyVector4sArray(): vector is undefined', i);\n\t\t\t\t\tvector = new Vector4();\n\t\t\t\t}\n\n\t\t\t\tarray[offset++] = vector.x;\n\t\t\t\tarray[offset++] = vector.y;\n\t\t\t\tarray[offset++] = vector.z;\n\t\t\t\tarray[offset++] = vector.w;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tapplyMatrix3: function applyMatrix3(m) {\n\t\t\tif (this.itemSize === 2) {\n\t\t\t\tfor (var i = 0, l = this.count; i < l; i++) {\n\t\t\t\t\t_vector2$1.fromBufferAttribute(this, i);\n\n\t\t\t\t\t_vector2$1.applyMatrix3(m);\n\n\t\t\t\t\tthis.setXY(i, _vector2$1.x, _vector2$1.y);\n\t\t\t\t}\n\t\t\t} else if (this.itemSize === 3) {\n\t\t\t\tfor (var _i = 0, _l = this.count; _i < _l; _i++) {\n\t\t\t\t\t_vector$3.fromBufferAttribute(this, _i);\n\n\t\t\t\t\t_vector$3.applyMatrix3(m);\n\n\t\t\t\t\tthis.setXYZ(_i, _vector$3.x, _vector$3.y, _vector$3.z);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tapplyMatrix4: function applyMatrix4(m) {\n\t\t\tfor (var i = 0, l = this.count; i < l; i++) {\n\t\t\t\t_vector$3.x = this.getX(i);\n\t\t\t\t_vector$3.y = this.getY(i);\n\t\t\t\t_vector$3.z = this.getZ(i);\n\n\t\t\t\t_vector$3.applyMatrix4(m);\n\n\t\t\t\tthis.setXYZ(i, _vector$3.x, _vector$3.y, _vector$3.z);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tapplyNormalMatrix: function applyNormalMatrix(m) {\n\t\t\tfor (var i = 0, l = this.count; i < l; i++) {\n\t\t\t\t_vector$3.x = this.getX(i);\n\t\t\t\t_vector$3.y = this.getY(i);\n\t\t\t\t_vector$3.z = this.getZ(i);\n\n\t\t\t\t_vector$3.applyNormalMatrix(m);\n\n\t\t\t\tthis.setXYZ(i, _vector$3.x, _vector$3.y, _vector$3.z);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\ttransformDirection: function transformDirection(m) {\n\t\t\tfor (var i = 0, l = this.count; i < l; i++) {\n\t\t\t\t_vector$3.x = this.getX(i);\n\t\t\t\t_vector$3.y = this.getY(i);\n\t\t\t\t_vector$3.z = this.getZ(i);\n\n\t\t\t\t_vector$3.transformDirection(m);\n\n\t\t\t\tthis.setXYZ(i, _vector$3.x, _vector$3.y, _vector$3.z);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tset: function set(value, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.array.set(value, offset);\n\t\t\treturn this;\n\t\t},\n\t\tgetX: function getX(index) {\n\t\t\treturn this.array[index * this.itemSize];\n\t\t},\n\t\tsetX: function setX(index, x) {\n\t\t\tthis.array[index * this.itemSize] = x;\n\t\t\treturn this;\n\t\t},\n\t\tgetY: function getY(index) {\n\t\t\treturn this.array[index * this.itemSize + 1];\n\t\t},\n\t\tsetY: function setY(index, y) {\n\t\t\tthis.array[index * this.itemSize + 1] = y;\n\t\t\treturn this;\n\t\t},\n\t\tgetZ: function getZ(index) {\n\t\t\treturn this.array[index * this.itemSize + 2];\n\t\t},\n\t\tsetZ: function setZ(index, z) {\n\t\t\tthis.array[index * this.itemSize + 2] = z;\n\t\t\treturn this;\n\t\t},\n\t\tgetW: function getW(index) {\n\t\t\treturn this.array[index * this.itemSize + 3];\n\t\t},\n\t\tsetW: function setW(index, w) {\n\t\t\tthis.array[index * this.itemSize + 3] = w;\n\t\t\treturn this;\n\t\t},\n\t\tsetXY: function setXY(index, x, y) {\n\t\t\tindex *= this.itemSize;\n\t\t\tthis.array[index + 0] = x;\n\t\t\tthis.array[index + 1] = y;\n\t\t\treturn this;\n\t\t},\n\t\tsetXYZ: function setXYZ(index, x, y, z) {\n\t\t\tindex *= this.itemSize;\n\t\t\tthis.array[index + 0] = x;\n\t\t\tthis.array[index + 1] = y;\n\t\t\tthis.array[index + 2] = z;\n\t\t\treturn this;\n\t\t},\n\t\tsetXYZW: function setXYZW(index, x, y, z, w) {\n\t\t\tindex *= this.itemSize;\n\t\t\tthis.array[index + 0] = x;\n\t\t\tthis.array[index + 1] = y;\n\t\t\tthis.array[index + 2] = z;\n\t\t\tthis.array[index + 3] = w;\n\t\t\treturn this;\n\t\t},\n\t\tonUpload: function onUpload(callback) {\n\t\t\tthis.onUploadCallback = callback;\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor(this.array, this.itemSize).copy(this);\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\treturn {\n\t\t\t\titemSize: this.itemSize,\n\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\tarray: Array.prototype.slice.call(this.array),\n\t\t\t\tnormalized: this.normalized\n\t\t\t};\n\t\t}\n\t}); //\n\n\tfunction Int8BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Int8Array(array), itemSize, normalized);\n\t}\n\n\tInt8BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tInt8BufferAttribute.prototype.constructor = Int8BufferAttribute;\n\n\tfunction Uint8BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint8Array(array), itemSize, normalized);\n\t}\n\n\tUint8BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tUint8BufferAttribute.prototype.constructor = Uint8BufferAttribute;\n\n\tfunction Uint8ClampedBufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint8ClampedArray(array), itemSize, normalized);\n\t}\n\n\tUint8ClampedBufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tUint8ClampedBufferAttribute.prototype.constructor = Uint8ClampedBufferAttribute;\n\n\tfunction Int16BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Int16Array(array), itemSize, normalized);\n\t}\n\n\tInt16BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tInt16BufferAttribute.prototype.constructor = Int16BufferAttribute;\n\n\tfunction Uint16BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint16Array(array), itemSize, normalized);\n\t}\n\n\tUint16BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tUint16BufferAttribute.prototype.constructor = Uint16BufferAttribute;\n\n\tfunction Int32BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Int32Array(array), itemSize, normalized);\n\t}\n\n\tInt32BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tInt32BufferAttribute.prototype.constructor = Int32BufferAttribute;\n\n\tfunction Uint32BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint32Array(array), itemSize, normalized);\n\t}\n\n\tUint32BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tUint32BufferAttribute.prototype.constructor = Uint32BufferAttribute;\n\n\tfunction Float16BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Uint16Array(array), itemSize, normalized);\n\t}\n\n\tFloat16BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tFloat16BufferAttribute.prototype.constructor = Float16BufferAttribute;\n\tFloat16BufferAttribute.prototype.isFloat16BufferAttribute = true;\n\n\tfunction Float32BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Float32Array(array), itemSize, normalized);\n\t}\n\n\tFloat32BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tFloat32BufferAttribute.prototype.constructor = Float32BufferAttribute;\n\n\tfunction Float64BufferAttribute(array, itemSize, normalized) {\n\t\tBufferAttribute.call(this, new Float64Array(array), itemSize, normalized);\n\t}\n\n\tFloat64BufferAttribute.prototype = Object.create(BufferAttribute.prototype);\n\tFloat64BufferAttribute.prototype.constructor = Float64BufferAttribute; //\n\n\tfunction arrayMax(array) {\n\t\tif (array.length === 0) return -Infinity;\n\t\tvar max = array[0];\n\n\t\tfor (var i = 1, l = array.length; i < l; ++i) {\n\t\t\tif (array[i] > max) max = array[i];\n\t\t}\n\n\t\treturn max;\n\t}\n\n\tvar TYPED_ARRAYS = {\n\t\tInt8Array: Int8Array,\n\t\tUint8Array: Uint8Array,\n\t\t// Workaround for IE11 pre KB2929437. See #11440\n\t\tUint8ClampedArray: typeof Uint8ClampedArray !== 'undefined' ? Uint8ClampedArray : Uint8Array,\n\t\tInt16Array: Int16Array,\n\t\tUint16Array: Uint16Array,\n\t\tInt32Array: Int32Array,\n\t\tUint32Array: Uint32Array,\n\t\tFloat32Array: Float32Array,\n\t\tFloat64Array: Float64Array\n\t};\n\n\tfunction getTypedArray(type, buffer) {\n\t\treturn new TYPED_ARRAYS[type](buffer);\n\t}\n\n\tvar _id = 0;\n\n\tvar _m1$2 = new Matrix4();\n\n\tvar _obj = new Object3D();\n\n\tvar _offset = new Vector3();\n\n\tvar _box$2 = new Box3();\n\n\tvar _boxMorphTargets = new Box3();\n\n\tvar _vector$4 = new Vector3();\n\n\tfunction BufferGeometry() {\n\t\tObject.defineProperty(this, 'id', {\n\t\t\tvalue: _id++\n\t\t});\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.name = '';\n\t\tthis.type = 'BufferGeometry';\n\t\tthis.index = null;\n\t\tthis.attributes = {};\n\t\tthis.morphAttributes = {};\n\t\tthis.morphTargetsRelative = false;\n\t\tthis.groups = [];\n\t\tthis.boundingBox = null;\n\t\tthis.boundingSphere = null;\n\t\tthis.drawRange = {\n\t\t\tstart: 0,\n\t\t\tcount: Infinity\n\t\t};\n\t\tthis.userData = {};\n\t}\n\n\tBufferGeometry.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: BufferGeometry,\n\t\tisBufferGeometry: true,\n\t\tgetIndex: function getIndex() {\n\t\t\treturn this.index;\n\t\t},\n\t\tsetIndex: function setIndex(index) {\n\t\t\tif (Array.isArray(index)) {\n\t\t\t\tthis.index = new (arrayMax(index) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute)(index, 1);\n\t\t\t} else {\n\t\t\t\tthis.index = index;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tgetAttribute: function getAttribute(name) {\n\t\t\treturn this.attributes[name];\n\t\t},\n\t\tsetAttribute: function setAttribute(name, attribute) {\n\t\t\tthis.attributes[name] = attribute;\n\t\t\treturn this;\n\t\t},\n\t\tdeleteAttribute: function deleteAttribute(name) {\n\t\t\tdelete this.attributes[name];\n\t\t\treturn this;\n\t\t},\n\t\thasAttribute: function hasAttribute(name) {\n\t\t\treturn this.attributes[name] !== undefined;\n\t\t},\n\t\taddGroup: function addGroup(start, count, materialIndex) {\n\t\t\tif (materialIndex === void 0) {\n\t\t\t\tmaterialIndex = 0;\n\t\t\t}\n\n\t\t\tthis.groups.push({\n\t\t\t\tstart: start,\n\t\t\t\tcount: count,\n\t\t\t\tmaterialIndex: materialIndex\n\t\t\t});\n\t\t},\n\t\tclearGroups: function clearGroups() {\n\t\t\tthis.groups = [];\n\t\t},\n\t\tsetDrawRange: function setDrawRange(start, count) {\n\t\t\tthis.drawRange.start = start;\n\t\t\tthis.drawRange.count = count;\n\t\t},\n\t\tapplyMatrix4: function applyMatrix4(matrix) {\n\t\t\tvar position = this.attributes.position;\n\n\t\t\tif (position !== undefined) {\n\t\t\t\tposition.applyMatrix4(matrix);\n\t\t\t\tposition.needsUpdate = true;\n\t\t\t}\n\n\t\t\tvar normal = this.attributes.normal;\n\n\t\t\tif (normal !== undefined) {\n\t\t\t\tvar normalMatrix = new Matrix3().getNormalMatrix(matrix);\n\t\t\t\tnormal.applyNormalMatrix(normalMatrix);\n\t\t\t\tnormal.needsUpdate = true;\n\t\t\t}\n\n\t\t\tvar tangent = this.attributes.tangent;\n\n\t\t\tif (tangent !== undefined) {\n\t\t\t\ttangent.transformDirection(matrix);\n\t\t\t\ttangent.needsUpdate = true;\n\t\t\t}\n\n\t\t\tif (this.boundingBox !== null) {\n\t\t\t\tthis.computeBoundingBox();\n\t\t\t}\n\n\t\t\tif (this.boundingSphere !== null) {\n\t\t\t\tthis.computeBoundingSphere();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\trotateX: function rotateX(angle) {\n\t\t\t// rotate geometry around world x-axis\n\t\t\t_m1$2.makeRotationX(angle);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\trotateY: function rotateY(angle) {\n\t\t\t// rotate geometry around world y-axis\n\t\t\t_m1$2.makeRotationY(angle);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\trotateZ: function rotateZ(angle) {\n\t\t\t// rotate geometry around world z-axis\n\t\t\t_m1$2.makeRotationZ(angle);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\ttranslate: function translate(x, y, z) {\n\t\t\t// translate geometry\n\t\t\t_m1$2.makeTranslation(x, y, z);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\tscale: function scale(x, y, z) {\n\t\t\t// scale geometry\n\t\t\t_m1$2.makeScale(x, y, z);\n\n\t\t\tthis.applyMatrix4(_m1$2);\n\t\t\treturn this;\n\t\t},\n\t\tlookAt: function lookAt(vector) {\n\t\t\t_obj.lookAt(vector);\n\n\t\t\t_obj.updateMatrix();\n\n\t\t\tthis.applyMatrix4(_obj.matrix);\n\t\t\treturn this;\n\t\t},\n\t\tcenter: function center() {\n\t\t\tthis.computeBoundingBox();\n\t\t\tthis.boundingBox.getCenter(_offset).negate();\n\t\t\tthis.translate(_offset.x, _offset.y, _offset.z);\n\t\t\treturn this;\n\t\t},\n\t\tsetFromPoints: function setFromPoints(points) {\n\t\t\tvar position = [];\n\n\t\t\tfor (var i = 0, l = points.length; i < l; i++) {\n\t\t\t\tvar point = points[i];\n\t\t\t\tposition.push(point.x, point.y, point.z || 0);\n\t\t\t}\n\n\t\t\tthis.setAttribute('position', new Float32BufferAttribute(position, 3));\n\t\t\treturn this;\n\t\t},\n\t\tcomputeBoundingBox: function computeBoundingBox() {\n\t\t\tif (this.boundingBox === null) {\n\t\t\t\tthis.boundingBox = new Box3();\n\t\t\t}\n\n\t\t\tvar position = this.attributes.position;\n\t\t\tvar morphAttributesPosition = this.morphAttributes.position;\n\n\t\t\tif (position && position.isGLBufferAttribute) {\n\t\t\t\tconsole.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set \"mesh.frustumCulled\" to \"false\".', this);\n\t\t\t\tthis.boundingBox.set(new Vector3(-Infinity, -Infinity, -Infinity), new Vector3(+Infinity, +Infinity, +Infinity));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (position !== undefined) {\n\t\t\t\tthis.boundingBox.setFromBufferAttribute(position); // process morph attributes if present\n\n\t\t\t\tif (morphAttributesPosition) {\n\t\t\t\t\tfor (var i = 0, il = morphAttributesPosition.length; i < il; i++) {\n\t\t\t\t\t\tvar morphAttribute = morphAttributesPosition[i];\n\n\t\t\t\t\t\t_box$2.setFromBufferAttribute(morphAttribute);\n\n\t\t\t\t\t\tif (this.morphTargetsRelative) {\n\t\t\t\t\t\t\t_vector$4.addVectors(this.boundingBox.min, _box$2.min);\n\n\t\t\t\t\t\t\tthis.boundingBox.expandByPoint(_vector$4);\n\n\t\t\t\t\t\t\t_vector$4.addVectors(this.boundingBox.max, _box$2.max);\n\n\t\t\t\t\t\t\tthis.boundingBox.expandByPoint(_vector$4);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.boundingBox.expandByPoint(_box$2.min);\n\t\t\t\t\t\t\tthis.boundingBox.expandByPoint(_box$2.max);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.boundingBox.makeEmpty();\n\t\t\t}\n\n\t\t\tif (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) {\n\t\t\t\tconsole.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.', this);\n\t\t\t}\n\t\t},\n\t\tcomputeBoundingSphere: function computeBoundingSphere() {\n\t\t\tif (this.boundingSphere === null) {\n\t\t\t\tthis.boundingSphere = new Sphere();\n\t\t\t}\n\n\t\t\tvar position = this.attributes.position;\n\t\t\tvar morphAttributesPosition = this.morphAttributes.position;\n\n\t\t\tif (position && position.isGLBufferAttribute) {\n\t\t\t\tconsole.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set \"mesh.frustumCulled\" to \"false\".', this);\n\t\t\t\tthis.boundingSphere.set(new Vector3(), Infinity);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (position) {\n\t\t\t\t// first, find the center of the bounding sphere\n\t\t\t\tvar center = this.boundingSphere.center;\n\n\t\t\t\t_box$2.setFromBufferAttribute(position); // process morph attributes if present\n\n\n\t\t\t\tif (morphAttributesPosition) {\n\t\t\t\t\tfor (var i = 0, il = morphAttributesPosition.length; i < il; i++) {\n\t\t\t\t\t\tvar morphAttribute = morphAttributesPosition[i];\n\n\t\t\t\t\t\t_boxMorphTargets.setFromBufferAttribute(morphAttribute);\n\n\t\t\t\t\t\tif (this.morphTargetsRelative) {\n\t\t\t\t\t\t\t_vector$4.addVectors(_box$2.min, _boxMorphTargets.min);\n\n\t\t\t\t\t\t\t_box$2.expandByPoint(_vector$4);\n\n\t\t\t\t\t\t\t_vector$4.addVectors(_box$2.max, _boxMorphTargets.max);\n\n\t\t\t\t\t\t\t_box$2.expandByPoint(_vector$4);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t_box$2.expandByPoint(_boxMorphTargets.min);\n\n\t\t\t\t\t\t\t_box$2.expandByPoint(_boxMorphTargets.max);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t_box$2.getCenter(center); // second, try to find a boundingSphere with a radius smaller than the\n\t\t\t\t// boundingSphere of the boundingBox: sqrt(3) smaller in the best case\n\n\n\t\t\t\tvar maxRadiusSq = 0;\n\n\t\t\t\tfor (var _i = 0, _il = position.count; _i < _il; _i++) {\n\t\t\t\t\t_vector$4.fromBufferAttribute(position, _i);\n\n\t\t\t\t\tmaxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector$4));\n\t\t\t\t} // process morph attributes if present\n\n\n\t\t\t\tif (morphAttributesPosition) {\n\t\t\t\t\tfor (var _i2 = 0, _il2 = morphAttributesPosition.length; _i2 < _il2; _i2++) {\n\t\t\t\t\t\tvar _morphAttribute = morphAttributesPosition[_i2];\n\t\t\t\t\t\tvar morphTargetsRelative = this.morphTargetsRelative;\n\n\t\t\t\t\t\tfor (var j = 0, jl = _morphAttribute.count; j < jl; j++) {\n\t\t\t\t\t\t\t_vector$4.fromBufferAttribute(_morphAttribute, j);\n\n\t\t\t\t\t\t\tif (morphTargetsRelative) {\n\t\t\t\t\t\t\t\t_offset.fromBufferAttribute(position, j);\n\n\t\t\t\t\t\t\t\t_vector$4.add(_offset);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmaxRadiusSq = Math.max(maxRadiusSq, center.distanceToSquared(_vector$4));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.boundingSphere.radius = Math.sqrt(maxRadiusSq);\n\n\t\t\t\tif (isNaN(this.boundingSphere.radius)) {\n\t\t\t\t\tconsole.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.', this);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcomputeFaceNormals: function computeFaceNormals() {// backwards compatibility\n\t\t},\n\t\tcomputeTangents: function computeTangents() {\n\t\t\tvar index = this.index;\n\t\t\tvar attributes = this.attributes; // based on http://www.terathon.com/code/tangent.html\n\t\t\t// (per vertex tangents)\n\n\t\t\tif (index === null || attributes.position === undefined || attributes.normal === undefined || attributes.uv === undefined) {\n\t\t\t\tconsole.error('THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar indices = index.array;\n\t\t\tvar positions = attributes.position.array;\n\t\t\tvar normals = attributes.normal.array;\n\t\t\tvar uvs = attributes.uv.array;\n\t\t\tvar nVertices = positions.length / 3;\n\n\t\t\tif (attributes.tangent === undefined) {\n\t\t\t\tthis.setAttribute('tangent', new BufferAttribute(new Float32Array(4 * nVertices), 4));\n\t\t\t}\n\n\t\t\tvar tangents = attributes.tangent.array;\n\t\t\tvar tan1 = [],\n\t\t\t\t\ttan2 = [];\n\n\t\t\tfor (var i = 0; i < nVertices; i++) {\n\t\t\t\ttan1[i] = new Vector3();\n\t\t\t\ttan2[i] = new Vector3();\n\t\t\t}\n\n\t\t\tvar vA = new Vector3(),\n\t\t\t\t\tvB = new Vector3(),\n\t\t\t\t\tvC = new Vector3(),\n\t\t\t\t\tuvA = new Vector2(),\n\t\t\t\t\tuvB = new Vector2(),\n\t\t\t\t\tuvC = new Vector2(),\n\t\t\t\t\tsdir = new Vector3(),\n\t\t\t\t\ttdir = new Vector3();\n\n\t\t\tfunction handleTriangle(a, b, c) {\n\t\t\t\tvA.fromArray(positions, a * 3);\n\t\t\t\tvB.fromArray(positions, b * 3);\n\t\t\t\tvC.fromArray(positions, c * 3);\n\t\t\t\tuvA.fromArray(uvs, a * 2);\n\t\t\t\tuvB.fromArray(uvs, b * 2);\n\t\t\t\tuvC.fromArray(uvs, c * 2);\n\t\t\t\tvB.sub(vA);\n\t\t\t\tvC.sub(vA);\n\t\t\t\tuvB.sub(uvA);\n\t\t\t\tuvC.sub(uvA);\n\t\t\t\tvar r = 1.0 / (uvB.x * uvC.y - uvC.x * uvB.y); // silently ignore degenerate uv triangles having coincident or colinear vertices\n\n\t\t\t\tif (!isFinite(r)) return;\n\t\t\t\tsdir.copy(vB).multiplyScalar(uvC.y).addScaledVector(vC, -uvB.y).multiplyScalar(r);\n\t\t\t\ttdir.copy(vC).multiplyScalar(uvB.x).addScaledVector(vB, -uvC.x).multiplyScalar(r);\n\t\t\t\ttan1[a].add(sdir);\n\t\t\t\ttan1[b].add(sdir);\n\t\t\t\ttan1[c].add(sdir);\n\t\t\t\ttan2[a].add(tdir);\n\t\t\t\ttan2[b].add(tdir);\n\t\t\t\ttan2[c].add(tdir);\n\t\t\t}\n\n\t\t\tvar groups = this.groups;\n\n\t\t\tif (groups.length === 0) {\n\t\t\t\tgroups = [{\n\t\t\t\t\tstart: 0,\n\t\t\t\t\tcount: indices.length\n\t\t\t\t}];\n\t\t\t}\n\n\t\t\tfor (var _i3 = 0, il = groups.length; _i3 < il; ++_i3) {\n\t\t\t\tvar group = groups[_i3];\n\t\t\t\tvar start = group.start;\n\t\t\t\tvar count = group.count;\n\n\t\t\t\tfor (var j = start, jl = start + count; j < jl; j += 3) {\n\t\t\t\t\thandleTriangle(indices[j + 0], indices[j + 1], indices[j + 2]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar tmp = new Vector3(),\n\t\t\t\t\ttmp2 = new Vector3();\n\t\t\tvar n = new Vector3(),\n\t\t\t\t\tn2 = new Vector3();\n\n\t\t\tfunction handleVertex(v) {\n\t\t\t\tn.fromArray(normals, v * 3);\n\t\t\t\tn2.copy(n);\n\t\t\t\tvar t = tan1[v]; // Gram-Schmidt orthogonalize\n\n\t\t\t\ttmp.copy(t);\n\t\t\t\ttmp.sub(n.multiplyScalar(n.dot(t))).normalize(); // Calculate handedness\n\n\t\t\t\ttmp2.crossVectors(n2, t);\n\t\t\t\tvar test = tmp2.dot(tan2[v]);\n\t\t\t\tvar w = test < 0.0 ? -1.0 : 1.0;\n\t\t\t\ttangents[v * 4] = tmp.x;\n\t\t\t\ttangents[v * 4 + 1] = tmp.y;\n\t\t\t\ttangents[v * 4 + 2] = tmp.z;\n\t\t\t\ttangents[v * 4 + 3] = w;\n\t\t\t}\n\n\t\t\tfor (var _i4 = 0, _il3 = groups.length; _i4 < _il3; ++_i4) {\n\t\t\t\tvar _group = groups[_i4];\n\t\t\t\tvar _start = _group.start;\n\t\t\t\tvar _count = _group.count;\n\n\t\t\t\tfor (var _j = _start, _jl = _start + _count; _j < _jl; _j += 3) {\n\t\t\t\t\thandleVertex(indices[_j + 0]);\n\t\t\t\t\thandleVertex(indices[_j + 1]);\n\t\t\t\t\thandleVertex(indices[_j + 2]);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcomputeVertexNormals: function computeVertexNormals() {\n\t\t\tvar index = this.index;\n\t\t\tvar positionAttribute = this.getAttribute('position');\n\n\t\t\tif (positionAttribute !== undefined) {\n\t\t\t\tvar normalAttribute = this.getAttribute('normal');\n\n\t\t\t\tif (normalAttribute === undefined) {\n\t\t\t\t\tnormalAttribute = new BufferAttribute(new Float32Array(positionAttribute.count * 3), 3);\n\t\t\t\t\tthis.setAttribute('normal', normalAttribute);\n\t\t\t\t} else {\n\t\t\t\t\t// reset existing normals to zero\n\t\t\t\t\tfor (var i = 0, il = normalAttribute.count; i < il; i++) {\n\t\t\t\t\t\tnormalAttribute.setXYZ(i, 0, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar pA = new Vector3(),\n\t\t\t\t\t\tpB = new Vector3(),\n\t\t\t\t\t\tpC = new Vector3();\n\t\t\t\tvar nA = new Vector3(),\n\t\t\t\t\t\tnB = new Vector3(),\n\t\t\t\t\t\tnC = new Vector3();\n\t\t\t\tvar cb = new Vector3(),\n\t\t\t\t\t\tab = new Vector3(); // indexed elements\n\n\t\t\t\tif (index) {\n\t\t\t\t\tfor (var _i5 = 0, _il4 = index.count; _i5 < _il4; _i5 += 3) {\n\t\t\t\t\t\tvar vA = index.getX(_i5 + 0);\n\t\t\t\t\t\tvar vB = index.getX(_i5 + 1);\n\t\t\t\t\t\tvar vC = index.getX(_i5 + 2);\n\t\t\t\t\t\tpA.fromBufferAttribute(positionAttribute, vA);\n\t\t\t\t\t\tpB.fromBufferAttribute(positionAttribute, vB);\n\t\t\t\t\t\tpC.fromBufferAttribute(positionAttribute, vC);\n\t\t\t\t\t\tcb.subVectors(pC, pB);\n\t\t\t\t\t\tab.subVectors(pA, pB);\n\t\t\t\t\t\tcb.cross(ab);\n\t\t\t\t\t\tnA.fromBufferAttribute(normalAttribute, vA);\n\t\t\t\t\t\tnB.fromBufferAttribute(normalAttribute, vB);\n\t\t\t\t\t\tnC.fromBufferAttribute(normalAttribute, vC);\n\t\t\t\t\t\tnA.add(cb);\n\t\t\t\t\t\tnB.add(cb);\n\t\t\t\t\t\tnC.add(cb);\n\t\t\t\t\t\tnormalAttribute.setXYZ(vA, nA.x, nA.y, nA.z);\n\t\t\t\t\t\tnormalAttribute.setXYZ(vB, nB.x, nB.y, nB.z);\n\t\t\t\t\t\tnormalAttribute.setXYZ(vC, nC.x, nC.y, nC.z);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// non-indexed elements (unconnected triangle soup)\n\t\t\t\t\tfor (var _i6 = 0, _il5 = positionAttribute.count; _i6 < _il5; _i6 += 3) {\n\t\t\t\t\t\tpA.fromBufferAttribute(positionAttribute, _i6 + 0);\n\t\t\t\t\t\tpB.fromBufferAttribute(positionAttribute, _i6 + 1);\n\t\t\t\t\t\tpC.fromBufferAttribute(positionAttribute, _i6 + 2);\n\t\t\t\t\t\tcb.subVectors(pC, pB);\n\t\t\t\t\t\tab.subVectors(pA, pB);\n\t\t\t\t\t\tcb.cross(ab);\n\t\t\t\t\t\tnormalAttribute.setXYZ(_i6 + 0, cb.x, cb.y, cb.z);\n\t\t\t\t\t\tnormalAttribute.setXYZ(_i6 + 1, cb.x, cb.y, cb.z);\n\t\t\t\t\t\tnormalAttribute.setXYZ(_i6 + 2, cb.x, cb.y, cb.z);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.normalizeNormals();\n\t\t\t\tnormalAttribute.needsUpdate = true;\n\t\t\t}\n\t\t},\n\t\tmerge: function merge(geometry, offset) {\n\t\t\tif (!(geometry && geometry.isBufferGeometry)) {\n\t\t\t\tconsole.error('THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.', geometry);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (offset === undefined) {\n\t\t\t\toffset = 0;\n\t\t\t\tconsole.warn('THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. ' + 'Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge.');\n\t\t\t}\n\n\t\t\tvar attributes = this.attributes;\n\n\t\t\tfor (var key in attributes) {\n\t\t\t\tif (geometry.attributes[key] === undefined) continue;\n\t\t\t\tvar attribute1 = attributes[key];\n\t\t\t\tvar attributeArray1 = attribute1.array;\n\t\t\t\tvar attribute2 = geometry.attributes[key];\n\t\t\t\tvar attributeArray2 = attribute2.array;\n\t\t\t\tvar attributeOffset = attribute2.itemSize * offset;\n\t\t\t\tvar length = Math.min(attributeArray2.length, attributeArray1.length - attributeOffset);\n\n\t\t\t\tfor (var i = 0, j = attributeOffset; i < length; i++, j++) {\n\t\t\t\t\tattributeArray1[j] = attributeArray2[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tnormalizeNormals: function normalizeNormals() {\n\t\t\tvar normals = this.attributes.normal;\n\n\t\t\tfor (var i = 0, il = normals.count; i < il; i++) {\n\t\t\t\t_vector$4.fromBufferAttribute(normals, i);\n\n\t\t\t\t_vector$4.normalize();\n\n\t\t\t\tnormals.setXYZ(i, _vector$4.x, _vector$4.y, _vector$4.z);\n\t\t\t}\n\t\t},\n\t\ttoNonIndexed: function toNonIndexed() {\n\t\t\tfunction convertBufferAttribute(attribute, indices) {\n\t\t\t\tvar array = attribute.array;\n\t\t\t\tvar itemSize = attribute.itemSize;\n\t\t\t\tvar normalized = attribute.normalized;\n\t\t\t\tvar array2 = new array.constructor(indices.length * itemSize);\n\t\t\t\tvar index = 0,\n\t\t\t\t\t\tindex2 = 0;\n\n\t\t\t\tfor (var i = 0, l = indices.length; i < l; i++) {\n\t\t\t\t\tindex = indices[i] * itemSize;\n\n\t\t\t\t\tfor (var j = 0; j < itemSize; j++) {\n\t\t\t\t\t\tarray2[index2++] = array[index++];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new BufferAttribute(array2, itemSize, normalized);\n\t\t\t} //\n\n\n\t\t\tif (this.index === null) {\n\t\t\t\tconsole.warn('THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed.');\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar geometry2 = new BufferGeometry();\n\t\t\tvar indices = this.index.array;\n\t\t\tvar attributes = this.attributes; // attributes\n\n\t\t\tfor (var name in attributes) {\n\t\t\t\tvar attribute = attributes[name];\n\t\t\t\tvar newAttribute = convertBufferAttribute(attribute, indices);\n\t\t\t\tgeometry2.setAttribute(name, newAttribute);\n\t\t\t} // morph attributes\n\n\n\t\t\tvar morphAttributes = this.morphAttributes;\n\n\t\t\tfor (var _name in morphAttributes) {\n\t\t\t\tvar morphArray = [];\n\t\t\t\tvar morphAttribute = morphAttributes[_name]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\t\tfor (var i = 0, il = morphAttribute.length; i < il; i++) {\n\t\t\t\t\tvar _attribute = morphAttribute[i];\n\n\t\t\t\t\tvar _newAttribute = convertBufferAttribute(_attribute, indices);\n\n\t\t\t\t\tmorphArray.push(_newAttribute);\n\t\t\t\t}\n\n\t\t\t\tgeometry2.morphAttributes[_name] = morphArray;\n\t\t\t}\n\n\t\t\tgeometry2.morphTargetsRelative = this.morphTargetsRelative; // groups\n\n\t\t\tvar groups = this.groups;\n\n\t\t\tfor (var _i7 = 0, l = groups.length; _i7 < l; _i7++) {\n\t\t\t\tvar group = groups[_i7];\n\t\t\t\tgeometry2.addGroup(group.start, group.count, group.materialIndex);\n\t\t\t}\n\n\t\t\treturn geometry2;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'BufferGeometry',\n\t\t\t\t\tgenerator: 'BufferGeometry.toJSON'\n\t\t\t\t}\n\t\t\t}; // standard BufferGeometry serialization\n\n\t\t\tdata.uuid = this.uuid;\n\t\t\tdata.type = this.type;\n\t\t\tif (this.name !== '') data.name = this.name;\n\t\t\tif (Object.keys(this.userData).length > 0) data.userData = this.userData;\n\n\t\t\tif (this.parameters !== undefined) {\n\t\t\t\tvar parameters = this.parameters;\n\n\t\t\t\tfor (var key in parameters) {\n\t\t\t\t\tif (parameters[key] !== undefined) data[key] = parameters[key];\n\t\t\t\t}\n\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tdata.data = {\n\t\t\t\tattributes: {}\n\t\t\t};\n\t\t\tvar index = this.index;\n\n\t\t\tif (index !== null) {\n\t\t\t\tdata.data.index = {\n\t\t\t\t\ttype: index.array.constructor.name,\n\t\t\t\t\tarray: Array.prototype.slice.call(index.array)\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tvar attributes = this.attributes;\n\n\t\t\tfor (var _key in attributes) {\n\t\t\t\tvar attribute = attributes[_key];\n\t\t\t\tvar attributeData = attribute.toJSON(data.data);\n\t\t\t\tif (attribute.name !== '') attributeData.name = attribute.name;\n\t\t\t\tdata.data.attributes[_key] = attributeData;\n\t\t\t}\n\n\t\t\tvar morphAttributes = {};\n\t\t\tvar hasMorphAttributes = false;\n\n\t\t\tfor (var _key2 in this.morphAttributes) {\n\t\t\t\tvar attributeArray = this.morphAttributes[_key2];\n\t\t\t\tvar array = [];\n\n\t\t\t\tfor (var i = 0, il = attributeArray.length; i < il; i++) {\n\t\t\t\t\tvar _attribute2 = attributeArray[i];\n\n\t\t\t\t\tvar _attributeData = _attribute2.toJSON(data.data);\n\n\t\t\t\t\tif (_attribute2.name !== '') _attributeData.name = _attribute2.name;\n\t\t\t\t\tarray.push(_attributeData);\n\t\t\t\t}\n\n\t\t\t\tif (array.length > 0) {\n\t\t\t\t\tmorphAttributes[_key2] = array;\n\t\t\t\t\thasMorphAttributes = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (hasMorphAttributes) {\n\t\t\t\tdata.data.morphAttributes = morphAttributes;\n\t\t\t\tdata.data.morphTargetsRelative = this.morphTargetsRelative;\n\t\t\t}\n\n\t\t\tvar groups = this.groups;\n\n\t\t\tif (groups.length > 0) {\n\t\t\t\tdata.data.groups = JSON.parse(JSON.stringify(groups));\n\t\t\t}\n\n\t\t\tvar boundingSphere = this.boundingSphere;\n\n\t\t\tif (boundingSphere !== null) {\n\t\t\t\tdata.data.boundingSphere = {\n\t\t\t\t\tcenter: boundingSphere.center.toArray(),\n\t\t\t\t\tradius: boundingSphere.radius\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t\tclone: function clone() {\n\t\t\t/*\n\t\t\t // Handle primitives\n\t\t\t\t\t const parameters = this.parameters;\n\t\t\t\t\t if ( parameters !== undefined ) {\n\t\t\t\t\t const values = [];\n\t\t\t\t\t for ( const key in parameters ) {\n\t\t\t\t\t values.push( parameters[ key ] );\n\t\t\t\t\t }\n\t\t\t\t\t const geometry = Object.create( this.constructor.prototype );\n\t\t\t this.constructor.apply( geometry, values );\n\t\t\t return geometry;\n\t\t\t\t\t }\n\t\t\t\t\t return new this.constructor().copy( this );\n\t\t\t */\n\t\t\treturn new BufferGeometry().copy(this);\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\t// reset\n\t\t\tthis.index = null;\n\t\t\tthis.attributes = {};\n\t\t\tthis.morphAttributes = {};\n\t\t\tthis.groups = [];\n\t\t\tthis.boundingBox = null;\n\t\t\tthis.boundingSphere = null; // used for storing cloned, shared data\n\n\t\t\tvar data = {}; // name\n\n\t\t\tthis.name = source.name; // index\n\n\t\t\tvar index = source.index;\n\n\t\t\tif (index !== null) {\n\t\t\t\tthis.setIndex(index.clone(data));\n\t\t\t} // attributes\n\n\n\t\t\tvar attributes = source.attributes;\n\n\t\t\tfor (var name in attributes) {\n\t\t\t\tvar attribute = attributes[name];\n\t\t\t\tthis.setAttribute(name, attribute.clone(data));\n\t\t\t} // morph attributes\n\n\n\t\t\tvar morphAttributes = source.morphAttributes;\n\n\t\t\tfor (var _name2 in morphAttributes) {\n\t\t\t\tvar array = [];\n\t\t\t\tvar morphAttribute = morphAttributes[_name2]; // morphAttribute: array of Float32BufferAttributes\n\n\t\t\t\tfor (var i = 0, l = morphAttribute.length; i < l; i++) {\n\t\t\t\t\tarray.push(morphAttribute[i].clone(data));\n\t\t\t\t}\n\n\t\t\t\tthis.morphAttributes[_name2] = array;\n\t\t\t}\n\n\t\t\tthis.morphTargetsRelative = source.morphTargetsRelative; // groups\n\n\t\t\tvar groups = source.groups;\n\n\t\t\tfor (var _i8 = 0, _l = groups.length; _i8 < _l; _i8++) {\n\t\t\t\tvar group = groups[_i8];\n\t\t\t\tthis.addGroup(group.start, group.count, group.materialIndex);\n\t\t\t} // bounding box\n\n\n\t\t\tvar boundingBox = source.boundingBox;\n\n\t\t\tif (boundingBox !== null) {\n\t\t\t\tthis.boundingBox = boundingBox.clone();\n\t\t\t} // bounding sphere\n\n\n\t\t\tvar boundingSphere = source.boundingSphere;\n\n\t\t\tif (boundingSphere !== null) {\n\t\t\t\tthis.boundingSphere = boundingSphere.clone();\n\t\t\t} // draw range\n\n\n\t\t\tthis.drawRange.start = source.drawRange.start;\n\t\t\tthis.drawRange.count = source.drawRange.count; // user data\n\n\t\t\tthis.userData = source.userData;\n\t\t\treturn this;\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t}\n\t});\n\n\tvar _inverseMatrix = new Matrix4();\n\n\tvar _ray = new Ray();\n\n\tvar _sphere = new Sphere();\n\n\tvar _vA = new Vector3();\n\n\tvar _vB = new Vector3();\n\n\tvar _vC = new Vector3();\n\n\tvar _tempA = new Vector3();\n\n\tvar _tempB = new Vector3();\n\n\tvar _tempC = new Vector3();\n\n\tvar _morphA = new Vector3();\n\n\tvar _morphB = new Vector3();\n\n\tvar _morphC = new Vector3();\n\n\tvar _uvA = new Vector2();\n\n\tvar _uvB = new Vector2();\n\n\tvar _uvC = new Vector2();\n\n\tvar _intersectionPoint = new Vector3();\n\n\tvar _intersectionPointWorld = new Vector3();\n\n\tfunction Mesh(geometry, material) {\n\t\tif (geometry === void 0) {\n\t\t\tgeometry = new BufferGeometry();\n\t\t}\n\n\t\tif (material === void 0) {\n\t\t\tmaterial = new MeshBasicMaterial();\n\t\t}\n\n\t\tObject3D.call(this);\n\t\tthis.type = 'Mesh';\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\t\tthis.updateMorphTargets();\n\t}\n\n\tMesh.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Mesh,\n\t\tisMesh: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\n\t\t\tif (source.morphTargetInfluences !== undefined) {\n\t\t\t\tthis.morphTargetInfluences = source.morphTargetInfluences.slice();\n\t\t\t}\n\n\t\t\tif (source.morphTargetDictionary !== undefined) {\n\t\t\t\tthis.morphTargetDictionary = Object.assign({}, source.morphTargetDictionary);\n\t\t\t}\n\n\t\t\tthis.material = source.material;\n\t\t\tthis.geometry = source.geometry;\n\t\t\treturn this;\n\t\t},\n\t\tupdateMorphTargets: function updateMorphTargets() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar morphAttributes = geometry.morphAttributes;\n\t\t\t\tvar keys = Object.keys(morphAttributes);\n\n\t\t\t\tif (keys.length > 0) {\n\t\t\t\t\tvar morphAttribute = morphAttributes[keys[0]];\n\n\t\t\t\t\tif (morphAttribute !== undefined) {\n\t\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\t\tfor (var m = 0, ml = morphAttribute.length; m < ml; m++) {\n\t\t\t\t\t\t\tvar name = morphAttribute[m].name || String(m);\n\t\t\t\t\t\t\tthis.morphTargetInfluences.push(0);\n\t\t\t\t\t\t\tthis.morphTargetDictionary[name] = m;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar morphTargets = geometry.morphTargets;\n\n\t\t\t\tif (morphTargets !== undefined && morphTargets.length > 0) {\n\t\t\t\t\tconsole.error('THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar material = this.material;\n\t\t\tvar matrixWorld = this.matrixWorld;\n\t\t\tif (material === undefined) return; // Checking boundingSphere distance to ray\n\n\t\t\tif (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n\n\t\t\t_sphere.copy(geometry.boundingSphere);\n\n\t\t\t_sphere.applyMatrix4(matrixWorld);\n\n\t\t\tif (raycaster.ray.intersectsSphere(_sphere) === false) return; //\n\n\t\t\t_inverseMatrix.copy(matrixWorld).invert();\n\n\t\t\t_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix); // Check boundingBox before continuing\n\n\n\t\t\tif (geometry.boundingBox !== null) {\n\t\t\t\tif (_ray.intersectsBox(geometry.boundingBox) === false) return;\n\t\t\t}\n\n\t\t\tvar intersection;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar index = geometry.index;\n\t\t\t\tvar position = geometry.attributes.position;\n\t\t\t\tvar morphPosition = geometry.morphAttributes.position;\n\t\t\t\tvar morphTargetsRelative = geometry.morphTargetsRelative;\n\t\t\t\tvar uv = geometry.attributes.uv;\n\t\t\t\tvar uv2 = geometry.attributes.uv2;\n\t\t\t\tvar groups = geometry.groups;\n\t\t\t\tvar drawRange = geometry.drawRange;\n\n\t\t\t\tif (index !== null) {\n\t\t\t\t\t// indexed buffer geometry\n\t\t\t\t\tif (Array.isArray(material)) {\n\t\t\t\t\t\tfor (var i = 0, il = groups.length; i < il; i++) {\n\t\t\t\t\t\t\tvar group = groups[i];\n\t\t\t\t\t\t\tvar groupMaterial = material[group.materialIndex];\n\t\t\t\t\t\t\tvar start = Math.max(group.start, drawRange.start);\n\t\t\t\t\t\t\tvar end = Math.min(group.start + group.count, drawRange.start + drawRange.count);\n\n\t\t\t\t\t\t\tfor (var j = start, jl = end; j < jl; j += 3) {\n\t\t\t\t\t\t\t\tvar a = index.getX(j);\n\t\t\t\t\t\t\t\tvar b = index.getX(j + 1);\n\t\t\t\t\t\t\t\tvar c = index.getX(j + 2);\n\t\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection(this, groupMaterial, raycaster, _ray, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c);\n\n\t\t\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor(j / 3); // triangle number in indexed buffer semantics\n\n\t\t\t\t\t\t\t\t\tintersection.face.materialIndex = group.materialIndex;\n\t\t\t\t\t\t\t\t\tintersects.push(intersection);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar _start = Math.max(0, drawRange.start);\n\n\t\t\t\t\t\tvar _end = Math.min(index.count, drawRange.start + drawRange.count);\n\n\t\t\t\t\t\tfor (var _i = _start, _il = _end; _i < _il; _i += 3) {\n\t\t\t\t\t\t\tvar _a = index.getX(_i);\n\n\t\t\t\t\t\t\tvar _b = index.getX(_i + 1);\n\n\t\t\t\t\t\t\tvar _c = index.getX(_i + 2);\n\n\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection(this, material, raycaster, _ray, position, morphPosition, morphTargetsRelative, uv, uv2, _a, _b, _c);\n\n\t\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor(_i / 3); // triangle number in indexed buffer semantics\n\n\t\t\t\t\t\t\t\tintersects.push(intersection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (position !== undefined) {\n\t\t\t\t\t// non-indexed buffer geometry\n\t\t\t\t\tif (Array.isArray(material)) {\n\t\t\t\t\t\tfor (var _i2 = 0, _il2 = groups.length; _i2 < _il2; _i2++) {\n\t\t\t\t\t\t\tvar _group = groups[_i2];\n\t\t\t\t\t\t\tvar _groupMaterial = material[_group.materialIndex];\n\n\t\t\t\t\t\t\tvar _start2 = Math.max(_group.start, drawRange.start);\n\n\t\t\t\t\t\t\tvar _end2 = Math.min(_group.start + _group.count, drawRange.start + drawRange.count);\n\n\t\t\t\t\t\t\tfor (var _j = _start2, _jl = _end2; _j < _jl; _j += 3) {\n\t\t\t\t\t\t\t\tvar _a2 = _j;\n\n\t\t\t\t\t\t\t\tvar _b2 = _j + 1;\n\n\t\t\t\t\t\t\t\tvar _c2 = _j + 2;\n\n\t\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection(this, _groupMaterial, raycaster, _ray, position, morphPosition, morphTargetsRelative, uv, uv2, _a2, _b2, _c2);\n\n\t\t\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor(_j / 3); // triangle number in non-indexed buffer semantics\n\n\t\t\t\t\t\t\t\t\tintersection.face.materialIndex = _group.materialIndex;\n\t\t\t\t\t\t\t\t\tintersects.push(intersection);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar _start3 = Math.max(0, drawRange.start);\n\n\t\t\t\t\t\tvar _end3 = Math.min(position.count, drawRange.start + drawRange.count);\n\n\t\t\t\t\t\tfor (var _i3 = _start3, _il3 = _end3; _i3 < _il3; _i3 += 3) {\n\t\t\t\t\t\t\tvar _a3 = _i3;\n\n\t\t\t\t\t\t\tvar _b3 = _i3 + 1;\n\n\t\t\t\t\t\t\tvar _c3 = _i3 + 2;\n\n\t\t\t\t\t\t\tintersection = checkBufferGeometryIntersection(this, material, raycaster, _ray, position, morphPosition, morphTargetsRelative, uv, uv2, _a3, _b3, _c3);\n\n\t\t\t\t\t\t\tif (intersection) {\n\t\t\t\t\t\t\t\tintersection.faceIndex = Math.floor(_i3 / 3); // triangle number in non-indexed buffer semantics\n\n\t\t\t\t\t\t\t\tintersects.push(intersection);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (geometry.isGeometry) {\n\t\t\t\tconsole.error('THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction checkIntersection(object, material, raycaster, ray, pA, pB, pC, point) {\n\t\tvar intersect;\n\n\t\tif (material.side === BackSide) {\n\t\t\tintersect = ray.intersectTriangle(pC, pB, pA, true, point);\n\t\t} else {\n\t\t\tintersect = ray.intersectTriangle(pA, pB, pC, material.side !== DoubleSide, point);\n\t\t}\n\n\t\tif (intersect === null) return null;\n\n\t\t_intersectionPointWorld.copy(point);\n\n\t\t_intersectionPointWorld.applyMatrix4(object.matrixWorld);\n\n\t\tvar distance = raycaster.ray.origin.distanceTo(_intersectionPointWorld);\n\t\tif (distance < raycaster.near || distance > raycaster.far) return null;\n\t\treturn {\n\t\t\tdistance: distance,\n\t\t\tpoint: _intersectionPointWorld.clone(),\n\t\t\tobject: object\n\t\t};\n\t}\n\n\tfunction checkBufferGeometryIntersection(object, material, raycaster, ray, position, morphPosition, morphTargetsRelative, uv, uv2, a, b, c) {\n\t\t_vA.fromBufferAttribute(position, a);\n\n\t\t_vB.fromBufferAttribute(position, b);\n\n\t\t_vC.fromBufferAttribute(position, c);\n\n\t\tvar morphInfluences = object.morphTargetInfluences;\n\n\t\tif (material.morphTargets && morphPosition && morphInfluences) {\n\t\t\t_morphA.set(0, 0, 0);\n\n\t\t\t_morphB.set(0, 0, 0);\n\n\t\t\t_morphC.set(0, 0, 0);\n\n\t\t\tfor (var i = 0, il = morphPosition.length; i < il; i++) {\n\t\t\t\tvar influence = morphInfluences[i];\n\t\t\t\tvar morphAttribute = morphPosition[i];\n\t\t\t\tif (influence === 0) continue;\n\n\t\t\t\t_tempA.fromBufferAttribute(morphAttribute, a);\n\n\t\t\t\t_tempB.fromBufferAttribute(morphAttribute, b);\n\n\t\t\t\t_tempC.fromBufferAttribute(morphAttribute, c);\n\n\t\t\t\tif (morphTargetsRelative) {\n\t\t\t\t\t_morphA.addScaledVector(_tempA, influence);\n\n\t\t\t\t\t_morphB.addScaledVector(_tempB, influence);\n\n\t\t\t\t\t_morphC.addScaledVector(_tempC, influence);\n\t\t\t\t} else {\n\t\t\t\t\t_morphA.addScaledVector(_tempA.sub(_vA), influence);\n\n\t\t\t\t\t_morphB.addScaledVector(_tempB.sub(_vB), influence);\n\n\t\t\t\t\t_morphC.addScaledVector(_tempC.sub(_vC), influence);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_vA.add(_morphA);\n\n\t\t\t_vB.add(_morphB);\n\n\t\t\t_vC.add(_morphC);\n\t\t}\n\n\t\tif (object.isSkinnedMesh) {\n\t\t\tobject.boneTransform(a, _vA);\n\t\t\tobject.boneTransform(b, _vB);\n\t\t\tobject.boneTransform(c, _vC);\n\t\t}\n\n\t\tvar intersection = checkIntersection(object, material, raycaster, ray, _vA, _vB, _vC, _intersectionPoint);\n\n\t\tif (intersection) {\n\t\t\tif (uv) {\n\t\t\t\t_uvA.fromBufferAttribute(uv, a);\n\n\t\t\t\t_uvB.fromBufferAttribute(uv, b);\n\n\t\t\t\t_uvC.fromBufferAttribute(uv, c);\n\n\t\t\t\tintersection.uv = Triangle.getUV(_intersectionPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2());\n\t\t\t}\n\n\t\t\tif (uv2) {\n\t\t\t\t_uvA.fromBufferAttribute(uv2, a);\n\n\t\t\t\t_uvB.fromBufferAttribute(uv2, b);\n\n\t\t\t\t_uvC.fromBufferAttribute(uv2, c);\n\n\t\t\t\tintersection.uv2 = Triangle.getUV(_intersectionPoint, _vA, _vB, _vC, _uvA, _uvB, _uvC, new Vector2());\n\t\t\t}\n\n\t\t\tvar face = new Face3(a, b, c);\n\t\t\tTriangle.getNormal(_vA, _vB, _vC, face.normal);\n\t\t\tintersection.face = face;\n\t\t}\n\n\t\treturn intersection;\n\t}\n\n\tvar BoxGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(BoxGeometry, _BufferGeometry);\n\n\t\tfunction BoxGeometry(width, height, depth, widthSegments, heightSegments, depthSegments) {\n\t\t\tvar _this;\n\n\t\t\tif (width === void 0) {\n\t\t\t\twidth = 1;\n\t\t\t}\n\n\t\t\tif (height === void 0) {\n\t\t\t\theight = 1;\n\t\t\t}\n\n\t\t\tif (depth === void 0) {\n\t\t\t\tdepth = 1;\n\t\t\t}\n\n\t\t\tif (widthSegments === void 0) {\n\t\t\t\twidthSegments = 1;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 1;\n\t\t\t}\n\n\t\t\tif (depthSegments === void 0) {\n\t\t\t\tdepthSegments = 1;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'BoxGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\twidth: width,\n\t\t\t\theight: height,\n\t\t\t\tdepth: depth,\n\t\t\t\twidthSegments: widthSegments,\n\t\t\t\theightSegments: heightSegments,\n\t\t\t\tdepthSegments: depthSegments\n\t\t\t};\n\n\t\t\tvar scope = _assertThisInitialized(_this); // segments\n\n\n\t\t\twidthSegments = Math.floor(widthSegments);\n\t\t\theightSegments = Math.floor(heightSegments);\n\t\t\tdepthSegments = Math.floor(depthSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar numberOfVertices = 0;\n\t\t\tvar groupStart = 0; // build each side of the box geometry\n\n\t\t\tbuildPlane('z', 'y', 'x', -1, -1, depth, height, width, depthSegments, heightSegments, 0); // px\n\n\t\t\tbuildPlane('z', 'y', 'x', 1, -1, depth, height, -width, depthSegments, heightSegments, 1); // nx\n\n\t\t\tbuildPlane('x', 'z', 'y', 1, 1, width, depth, height, widthSegments, depthSegments, 2); // py\n\n\t\t\tbuildPlane('x', 'z', 'y', 1, -1, width, depth, -height, widthSegments, depthSegments, 3); // ny\n\n\t\t\tbuildPlane('x', 'y', 'z', 1, -1, width, height, depth, widthSegments, heightSegments, 4); // pz\n\n\t\t\tbuildPlane('x', 'y', 'z', -1, -1, width, height, -depth, widthSegments, heightSegments, 5); // nz\n\t\t\t// build geometry\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\tfunction buildPlane(u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex) {\n\t\t\t\tvar segmentWidth = width / gridX;\n\t\t\t\tvar segmentHeight = height / gridY;\n\t\t\t\tvar widthHalf = width / 2;\n\t\t\t\tvar heightHalf = height / 2;\n\t\t\t\tvar depthHalf = depth / 2;\n\t\t\t\tvar gridX1 = gridX + 1;\n\t\t\t\tvar gridY1 = gridY + 1;\n\t\t\t\tvar vertexCounter = 0;\n\t\t\t\tvar groupCount = 0;\n\t\t\t\tvar vector = new Vector3(); // generate vertices, normals and uvs\n\n\t\t\t\tfor (var iy = 0; iy < gridY1; iy++) {\n\t\t\t\t\tvar y = iy * segmentHeight - heightHalf;\n\n\t\t\t\t\tfor (var ix = 0; ix < gridX1; ix++) {\n\t\t\t\t\t\tvar x = ix * segmentWidth - widthHalf; // set values to correct vector component\n\n\t\t\t\t\t\tvector[u] = x * udir;\n\t\t\t\t\t\tvector[v] = y * vdir;\n\t\t\t\t\t\tvector[w] = depthHalf; // now apply vector to vertex buffer\n\n\t\t\t\t\t\tvertices.push(vector.x, vector.y, vector.z); // set values to correct vector component\n\n\t\t\t\t\t\tvector[u] = 0;\n\t\t\t\t\t\tvector[v] = 0;\n\t\t\t\t\t\tvector[w] = depth > 0 ? 1 : -1; // now apply vector to normal buffer\n\n\t\t\t\t\t\tnormals.push(vector.x, vector.y, vector.z); // uvs\n\n\t\t\t\t\t\tuvs.push(ix / gridX);\n\t\t\t\t\t\tuvs.push(1 - iy / gridY); // counters\n\n\t\t\t\t\t\tvertexCounter += 1;\n\t\t\t\t\t}\n\t\t\t\t} // indices\n\t\t\t\t// 1. you need three indices to draw a single face\n\t\t\t\t// 2. a single segment consists of two faces\n\t\t\t\t// 3. so we need to generate six (2*3) indices per segment\n\n\n\t\t\t\tfor (var _iy = 0; _iy < gridY; _iy++) {\n\t\t\t\t\tfor (var _ix = 0; _ix < gridX; _ix++) {\n\t\t\t\t\t\tvar a = numberOfVertices + _ix + gridX1 * _iy;\n\t\t\t\t\t\tvar b = numberOfVertices + _ix + gridX1 * (_iy + 1);\n\t\t\t\t\t\tvar c = numberOfVertices + (_ix + 1) + gridX1 * (_iy + 1);\n\t\t\t\t\t\tvar d = numberOfVertices + (_ix + 1) + gridX1 * _iy; // faces\n\n\t\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\t\tindices.push(b, c, d); // increase counter\n\n\t\t\t\t\t\tgroupCount += 6;\n\t\t\t\t\t}\n\t\t\t\t} // add a group to the geometry. this will ensure multi material support\n\n\n\t\t\t\tscope.addGroup(groupStart, groupCount, materialIndex); // calculate new start value for groups\n\n\t\t\t\tgroupStart += groupCount; // update total number of vertices\n\n\t\t\t\tnumberOfVertices += vertexCounter;\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn BoxGeometry;\n\t}(BufferGeometry);\n\n\t/**\n\t * Uniform Utilities\n\t */\n\tfunction cloneUniforms(src) {\n\t\tvar dst = {};\n\n\t\tfor (var u in src) {\n\t\t\tdst[u] = {};\n\n\t\t\tfor (var p in src[u]) {\n\t\t\t\tvar property = src[u][p];\n\n\t\t\t\tif (property && (property.isColor || property.isMatrix3 || property.isMatrix4 || property.isVector2 || property.isVector3 || property.isVector4 || property.isTexture)) {\n\t\t\t\t\tdst[u][p] = property.clone();\n\t\t\t\t} else if (Array.isArray(property)) {\n\t\t\t\t\tdst[u][p] = property.slice();\n\t\t\t\t} else {\n\t\t\t\t\tdst[u][p] = property;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn dst;\n\t}\n\tfunction mergeUniforms(uniforms) {\n\t\tvar merged = {};\n\n\t\tfor (var u = 0; u < uniforms.length; u++) {\n\t\t\tvar tmp = cloneUniforms(uniforms[u]);\n\n\t\t\tfor (var p in tmp) {\n\t\t\t\tmerged[p] = tmp[p];\n\t\t\t}\n\t\t}\n\n\t\treturn merged;\n\t} // Legacy\n\n\tvar UniformsUtils = {\n\t\tclone: cloneUniforms,\n\t\tmerge: mergeUniforms\n\t};\n\n\tvar default_vertex = \"void main() {\\n\\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\\n}\";\n\n\tvar default_fragment = \"void main() {\\n\\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\\n}\";\n\n\t/**\n\t * parameters = {\n\t *\tdefines: { \"label\" : \"value\" },\n\t *\tuniforms: { \"parameter1\": { value: 1.0 }, \"parameter2\": { value2: 2 } },\n\t *\n\t *\tfragmentShader: <string>,\n\t *\tvertexShader: <string>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tlights: <bool>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction ShaderMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'ShaderMaterial';\n\t\tthis.defines = {};\n\t\tthis.uniforms = {};\n\t\tthis.vertexShader = default_vertex;\n\t\tthis.fragmentShader = default_fragment;\n\t\tthis.linewidth = 1;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.fog = false; // set to use scene fog\n\n\t\tthis.lights = false; // set to use scene lights\n\n\t\tthis.clipping = false; // set to use user-defined clipping planes\n\n\t\tthis.skinning = false; // set to use skinning attribute streams\n\n\t\tthis.morphTargets = false; // set to use morph targets\n\n\t\tthis.morphNormals = false; // set to use morph normals\n\n\t\tthis.extensions = {\n\t\t\tderivatives: false,\n\t\t\t// set to use derivatives\n\t\t\tfragDepth: false,\n\t\t\t// set to use fragment depth values\n\t\t\tdrawBuffers: false,\n\t\t\t// set to use draw buffers\n\t\t\tshaderTextureLOD: false // set to use shader texture LOD\n\n\t\t}; // When rendered geometry doesn't include these attributes but the material does,\n\t\t// use these default values in WebGL. This avoids errors when buffer data is missing.\n\n\t\tthis.defaultAttributeValues = {\n\t\t\t'color': [1, 1, 1],\n\t\t\t'uv': [0, 0],\n\t\t\t'uv2': [0, 0]\n\t\t};\n\t\tthis.index0AttributeName = undefined;\n\t\tthis.uniformsNeedUpdate = false;\n\t\tthis.glslVersion = null;\n\n\t\tif (parameters !== undefined) {\n\t\t\tif (parameters.attributes !== undefined) {\n\t\t\t\tconsole.error('THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead.');\n\t\t\t}\n\n\t\t\tthis.setValues(parameters);\n\t\t}\n\t}\n\n\tShaderMaterial.prototype = Object.create(Material.prototype);\n\tShaderMaterial.prototype.constructor = ShaderMaterial;\n\tShaderMaterial.prototype.isShaderMaterial = true;\n\n\tShaderMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.fragmentShader = source.fragmentShader;\n\t\tthis.vertexShader = source.vertexShader;\n\t\tthis.uniforms = cloneUniforms(source.uniforms);\n\t\tthis.defines = Object.assign({}, source.defines);\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.lights = source.lights;\n\t\tthis.clipping = source.clipping;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\tthis.extensions = Object.assign({}, source.extensions);\n\t\tthis.glslVersion = source.glslVersion;\n\t\treturn this;\n\t};\n\n\tShaderMaterial.prototype.toJSON = function (meta) {\n\t\tvar data = Material.prototype.toJSON.call(this, meta);\n\t\tdata.glslVersion = this.glslVersion;\n\t\tdata.uniforms = {};\n\n\t\tfor (var name in this.uniforms) {\n\t\t\tvar uniform = this.uniforms[name];\n\t\t\tvar value = uniform.value;\n\n\t\t\tif (value && value.isTexture) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 't',\n\t\t\t\t\tvalue: value.toJSON(meta).uuid\n\t\t\t\t};\n\t\t\t} else if (value && value.isColor) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'c',\n\t\t\t\t\tvalue: value.getHex()\n\t\t\t\t};\n\t\t\t} else if (value && value.isVector2) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'v2',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else if (value && value.isVector3) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'v3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else if (value && value.isVector4) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'v4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else if (value && value.isMatrix3) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'm3',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else if (value && value.isMatrix4) {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\ttype: 'm4',\n\t\t\t\t\tvalue: value.toArray()\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tdata.uniforms[name] = {\n\t\t\t\t\tvalue: value\n\t\t\t\t}; // note: the array variants v2v, v3v, v4v, m4v and tv are not supported so far\n\t\t\t}\n\t\t}\n\n\t\tif (Object.keys(this.defines).length > 0) data.defines = this.defines;\n\t\tdata.vertexShader = this.vertexShader;\n\t\tdata.fragmentShader = this.fragmentShader;\n\t\tvar extensions = {};\n\n\t\tfor (var key in this.extensions) {\n\t\t\tif (this.extensions[key] === true) extensions[key] = true;\n\t\t}\n\n\t\tif (Object.keys(extensions).length > 0) data.extensions = extensions;\n\t\treturn data;\n\t};\n\n\tfunction Camera() {\n\t\tObject3D.call(this);\n\t\tthis.type = 'Camera';\n\t\tthis.matrixWorldInverse = new Matrix4();\n\t\tthis.projectionMatrix = new Matrix4();\n\t\tthis.projectionMatrixInverse = new Matrix4();\n\t}\n\n\tCamera.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Camera,\n\t\tisCamera: true,\n\t\tcopy: function copy(source, recursive) {\n\t\t\tObject3D.prototype.copy.call(this, source, recursive);\n\t\t\tthis.matrixWorldInverse.copy(source.matrixWorldInverse);\n\t\t\tthis.projectionMatrix.copy(source.projectionMatrix);\n\t\t\tthis.projectionMatrixInverse.copy(source.projectionMatrixInverse);\n\t\t\treturn this;\n\t\t},\n\t\tgetWorldDirection: function getWorldDirection(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Camera: .getWorldDirection() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\tthis.updateWorldMatrix(true, false);\n\t\t\tvar e = this.matrixWorld.elements;\n\t\t\treturn target.set(-e[8], -e[9], -e[10]).normalize();\n\t\t},\n\t\tupdateMatrixWorld: function updateMatrixWorld(force) {\n\t\t\tObject3D.prototype.updateMatrixWorld.call(this, force);\n\t\t\tthis.matrixWorldInverse.copy(this.matrixWorld).invert();\n\t\t},\n\t\tupdateWorldMatrix: function updateWorldMatrix(updateParents, updateChildren) {\n\t\t\tObject3D.prototype.updateWorldMatrix.call(this, updateParents, updateChildren);\n\t\t\tthis.matrixWorldInverse.copy(this.matrixWorld).invert();\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t}\n\t});\n\n\tfunction PerspectiveCamera(fov, aspect, near, far) {\n\t\tif (fov === void 0) {\n\t\t\tfov = 50;\n\t\t}\n\n\t\tif (aspect === void 0) {\n\t\t\taspect = 1;\n\t\t}\n\n\t\tif (near === void 0) {\n\t\t\tnear = 0.1;\n\t\t}\n\n\t\tif (far === void 0) {\n\t\t\tfar = 2000;\n\t\t}\n\n\t\tCamera.call(this);\n\t\tthis.type = 'PerspectiveCamera';\n\t\tthis.fov = fov;\n\t\tthis.zoom = 1;\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.focus = 10;\n\t\tthis.aspect = aspect;\n\t\tthis.view = null;\n\t\tthis.filmGauge = 35; // width of the film (default in millimeters)\n\n\t\tthis.filmOffset = 0; // horizontal film offset (same unit as gauge)\n\n\t\tthis.updateProjectionMatrix();\n\t}\n\n\tPerspectiveCamera.prototype = Object.assign(Object.create(Camera.prototype), {\n\t\tconstructor: PerspectiveCamera,\n\t\tisPerspectiveCamera: true,\n\t\tcopy: function copy(source, recursive) {\n\t\t\tCamera.prototype.copy.call(this, source, recursive);\n\t\t\tthis.fov = source.fov;\n\t\t\tthis.zoom = source.zoom;\n\t\t\tthis.near = source.near;\n\t\t\tthis.far = source.far;\n\t\t\tthis.focus = source.focus;\n\t\t\tthis.aspect = source.aspect;\n\t\t\tthis.view = source.view === null ? null : Object.assign({}, source.view);\n\t\t\tthis.filmGauge = source.filmGauge;\n\t\t\tthis.filmOffset = source.filmOffset;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the FOV by focal length in respect to the current .filmGauge.\n\t\t *\n\t\t * The default film gauge is 35, so that the focal length can be specified for\n\t\t * a 35mm (full frame) camera.\n\t\t *\n\t\t * Values for focal length and film gauge must have the same unit.\n\t\t */\n\t\tsetFocalLength: function setFocalLength(focalLength) {\n\t\t\t/** see {@link http://www.bobatkins.com/photography/technical/field_of_view.html} */\n\t\t\tvar vExtentSlope = 0.5 * this.getFilmHeight() / focalLength;\n\t\t\tthis.fov = MathUtils.RAD2DEG * 2 * Math.atan(vExtentSlope);\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\n\t\t/**\n\t\t * Calculates the focal length from the current .fov and .filmGauge.\n\t\t */\n\t\tgetFocalLength: function getFocalLength() {\n\t\t\tvar vExtentSlope = Math.tan(MathUtils.DEG2RAD * 0.5 * this.fov);\n\t\t\treturn 0.5 * this.getFilmHeight() / vExtentSlope;\n\t\t},\n\t\tgetEffectiveFOV: function getEffectiveFOV() {\n\t\t\treturn MathUtils.RAD2DEG * 2 * Math.atan(Math.tan(MathUtils.DEG2RAD * 0.5 * this.fov) / this.zoom);\n\t\t},\n\t\tgetFilmWidth: function getFilmWidth() {\n\t\t\t// film not completely covered in portrait format (aspect < 1)\n\t\t\treturn this.filmGauge * Math.min(this.aspect, 1);\n\t\t},\n\t\tgetFilmHeight: function getFilmHeight() {\n\t\t\t// film not completely covered in landscape format (aspect > 1)\n\t\t\treturn this.filmGauge / Math.max(this.aspect, 1);\n\t\t},\n\n\t\t/**\n\t\t * Sets an offset in a larger frustum. This is useful for multi-window or\n\t\t * multi-monitor/multi-machine setups.\n\t\t *\n\t\t * For example, if you have 3x2 monitors and each monitor is 1920x1080 and\n\t\t * the monitors are in grid like this\n\t\t *\n\t\t *\t +---+---+---+\n\t\t *\t | A | B | C |\n\t\t *\t +---+---+---+\n\t\t *\t | D | E | F |\n\t\t *\t +---+---+---+\n\t\t *\n\t\t * then for each monitor you would call it like this\n\t\t *\n\t\t *\t const w = 1920;\n\t\t *\t const h = 1080;\n\t\t *\t const fullWidth = w * 3;\n\t\t *\t const fullHeight = h * 2;\n\t\t *\n\t\t *\t --A--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h );\n\t\t *\t --B--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h );\n\t\t *\t --C--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h );\n\t\t *\t --D--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h );\n\t\t *\t --E--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h );\n\t\t *\t --F--\n\t\t *\t camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );\n\t\t *\n\t\t *\t Note there is no reason monitors have to be the same size or in a grid.\n\t\t */\n\t\tsetViewOffset: function setViewOffset(fullWidth, fullHeight, x, y, width, height) {\n\t\t\tthis.aspect = fullWidth / fullHeight;\n\n\t\t\tif (this.view === null) {\n\t\t\t\tthis.view = {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tfullWidth: 1,\n\t\t\t\t\tfullHeight: 1,\n\t\t\t\t\toffsetX: 0,\n\t\t\t\t\toffsetY: 0,\n\t\t\t\t\twidth: 1,\n\t\t\t\t\theight: 1\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.view.enabled = true;\n\t\t\tthis.view.fullWidth = fullWidth;\n\t\t\tthis.view.fullHeight = fullHeight;\n\t\t\tthis.view.offsetX = x;\n\t\t\tthis.view.offsetY = y;\n\t\t\tthis.view.width = width;\n\t\t\tthis.view.height = height;\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\t\tclearViewOffset: function clearViewOffset() {\n\t\t\tif (this.view !== null) {\n\t\t\t\tthis.view.enabled = false;\n\t\t\t}\n\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\t\tupdateProjectionMatrix: function updateProjectionMatrix() {\n\t\t\tvar near = this.near;\n\t\t\tvar top = near * Math.tan(MathUtils.DEG2RAD * 0.5 * this.fov) / this.zoom;\n\t\t\tvar height = 2 * top;\n\t\t\tvar width = this.aspect * height;\n\t\t\tvar left = -0.5 * width;\n\t\t\tvar view = this.view;\n\n\t\t\tif (this.view !== null && this.view.enabled) {\n\t\t\t\tvar fullWidth = view.fullWidth,\n\t\t\t\t\t\tfullHeight = view.fullHeight;\n\t\t\t\tleft += view.offsetX * width / fullWidth;\n\t\t\t\ttop -= view.offsetY * height / fullHeight;\n\t\t\t\twidth *= view.width / fullWidth;\n\t\t\t\theight *= view.height / fullHeight;\n\t\t\t}\n\n\t\t\tvar skew = this.filmOffset;\n\t\t\tif (skew !== 0) left += near * skew / this.getFilmWidth();\n\t\t\tthis.projectionMatrix.makePerspective(left, left + width, top, top - height, near, this.far);\n\t\t\tthis.projectionMatrixInverse.copy(this.projectionMatrix).invert();\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Object3D.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.fov = this.fov;\n\t\t\tdata.object.zoom = this.zoom;\n\t\t\tdata.object.near = this.near;\n\t\t\tdata.object.far = this.far;\n\t\t\tdata.object.focus = this.focus;\n\t\t\tdata.object.aspect = this.aspect;\n\t\t\tif (this.view !== null) data.object.view = Object.assign({}, this.view);\n\t\t\tdata.object.filmGauge = this.filmGauge;\n\t\t\tdata.object.filmOffset = this.filmOffset;\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tvar fov = 90,\n\t\t\taspect = 1;\n\n\tfunction CubeCamera(near, far, renderTarget) {\n\t\tObject3D.call(this);\n\t\tthis.type = 'CubeCamera';\n\n\t\tif (renderTarget.isWebGLCubeRenderTarget !== true) {\n\t\t\tconsole.error('THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.renderTarget = renderTarget;\n\t\tvar cameraPX = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraPX.layers = this.layers;\n\t\tcameraPX.up.set(0, -1, 0);\n\t\tcameraPX.lookAt(new Vector3(1, 0, 0));\n\t\tthis.add(cameraPX);\n\t\tvar cameraNX = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraNX.layers = this.layers;\n\t\tcameraNX.up.set(0, -1, 0);\n\t\tcameraNX.lookAt(new Vector3(-1, 0, 0));\n\t\tthis.add(cameraNX);\n\t\tvar cameraPY = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraPY.layers = this.layers;\n\t\tcameraPY.up.set(0, 0, 1);\n\t\tcameraPY.lookAt(new Vector3(0, 1, 0));\n\t\tthis.add(cameraPY);\n\t\tvar cameraNY = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraNY.layers = this.layers;\n\t\tcameraNY.up.set(0, 0, -1);\n\t\tcameraNY.lookAt(new Vector3(0, -1, 0));\n\t\tthis.add(cameraNY);\n\t\tvar cameraPZ = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraPZ.layers = this.layers;\n\t\tcameraPZ.up.set(0, -1, 0);\n\t\tcameraPZ.lookAt(new Vector3(0, 0, 1));\n\t\tthis.add(cameraPZ);\n\t\tvar cameraNZ = new PerspectiveCamera(fov, aspect, near, far);\n\t\tcameraNZ.layers = this.layers;\n\t\tcameraNZ.up.set(0, -1, 0);\n\t\tcameraNZ.lookAt(new Vector3(0, 0, -1));\n\t\tthis.add(cameraNZ);\n\n\t\tthis.update = function (renderer, scene) {\n\t\t\tif (this.parent === null) this.updateMatrixWorld();\n\t\t\tvar currentXrEnabled = renderer.xr.enabled;\n\t\t\tvar currentRenderTarget = renderer.getRenderTarget();\n\t\t\trenderer.xr.enabled = false;\n\t\t\tvar generateMipmaps = renderTarget.texture.generateMipmaps;\n\t\t\trenderTarget.texture.generateMipmaps = false;\n\t\t\trenderer.setRenderTarget(renderTarget, 0);\n\t\t\trenderer.render(scene, cameraPX);\n\t\t\trenderer.setRenderTarget(renderTarget, 1);\n\t\t\trenderer.render(scene, cameraNX);\n\t\t\trenderer.setRenderTarget(renderTarget, 2);\n\t\t\trenderer.render(scene, cameraPY);\n\t\t\trenderer.setRenderTarget(renderTarget, 3);\n\t\t\trenderer.render(scene, cameraNY);\n\t\t\trenderer.setRenderTarget(renderTarget, 4);\n\t\t\trenderer.render(scene, cameraPZ);\n\t\t\trenderTarget.texture.generateMipmaps = generateMipmaps;\n\t\t\trenderer.setRenderTarget(renderTarget, 5);\n\t\t\trenderer.render(scene, cameraNZ);\n\t\t\trenderer.setRenderTarget(currentRenderTarget);\n\t\t\trenderer.xr.enabled = currentXrEnabled;\n\t\t};\n\t}\n\n\tCubeCamera.prototype = Object.create(Object3D.prototype);\n\tCubeCamera.prototype.constructor = CubeCamera;\n\n\tfunction CubeTexture(images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding) {\n\t\timages = images !== undefined ? images : [];\n\t\tmapping = mapping !== undefined ? mapping : CubeReflectionMapping;\n\t\tformat = format !== undefined ? format : RGBFormat;\n\t\tTexture.call(this, images, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);\n\t\tthis.flipY = false; // Why CubeTexture._needsFlipEnvMap is necessary:\n\t\t//\n\t\t// By convention -- likely based on the RenderMan spec from the 1990's -- cube maps are specified by WebGL (and three.js)\n\t\t// in a coordinate system in which positive-x is to the right when looking up the positive-z axis -- in other words,\n\t\t// in a left-handed coordinate system. By continuing this convention, preexisting cube maps continued to render correctly.\n\t\t// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped\n\t\t// and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false)\n\t\t// when using WebGLCubeRenderTarget.texture as a cube texture.\n\n\t\tthis._needsFlipEnvMap = true;\n\t}\n\n\tCubeTexture.prototype = Object.create(Texture.prototype);\n\tCubeTexture.prototype.constructor = CubeTexture;\n\tCubeTexture.prototype.isCubeTexture = true;\n\tObject.defineProperty(CubeTexture.prototype, 'images', {\n\t\tget: function get() {\n\t\t\treturn this.image;\n\t\t},\n\t\tset: function set(value) {\n\t\t\tthis.image = value;\n\t\t}\n\t});\n\n\tvar WebGLCubeRenderTarget = /*#__PURE__*/function (_WebGLRenderTarget) {\n\t\t_inheritsLoose(WebGLCubeRenderTarget, _WebGLRenderTarget);\n\n\t\tfunction WebGLCubeRenderTarget(size, options, dummy) {\n\t\t\tvar _this;\n\n\t\t\tif (Number.isInteger(options)) {\n\t\t\t\tconsole.warn('THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )');\n\t\t\t\toptions = dummy;\n\t\t\t}\n\n\t\t\t_this = _WebGLRenderTarget.call(this, size, size, options) || this;\n\t\t\tObject.defineProperty(_assertThisInitialized(_this), 'isWebGLCubeRenderTarget', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\toptions = options || {};\n\t\t\t_this.texture = new CubeTexture(undefined, options.mapping, options.wrapS, options.wrapT, options.magFilter, options.minFilter, options.format, options.type, options.anisotropy, options.encoding);\n\t\t\t_this.texture._needsFlipEnvMap = false;\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = WebGLCubeRenderTarget.prototype;\n\n\t\t_proto.fromEquirectangularTexture = function fromEquirectangularTexture(renderer, texture) {\n\t\t\tthis.texture.type = texture.type;\n\t\t\tthis.texture.format = RGBAFormat; // see #18859\n\n\t\t\tthis.texture.encoding = texture.encoding;\n\t\t\tthis.texture.generateMipmaps = texture.generateMipmaps;\n\t\t\tthis.texture.minFilter = texture.minFilter;\n\t\t\tthis.texture.magFilter = texture.magFilter;\n\t\t\tvar shader = {\n\t\t\t\tuniforms: {\n\t\t\t\t\ttEquirect: {\n\t\t\t\t\t\tvalue: null\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tvertexShader:\n\t\t\t\t/* glsl */\n\t\t\t\t\"\\n\\n\\t\\t\\t\\tvarying vec3 vWorldDirection;\\n\\n\\t\\t\\t\\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\n\\t\\t\\t\\t\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\t\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\n\\t\\t\\t\\t\\t#include <begin_vertex>\\n\\t\\t\\t\\t\\t#include <project_vertex>\\n\\n\\t\\t\\t\\t}\\n\\t\\t\\t\",\n\t\t\t\tfragmentShader:\n\t\t\t\t/* glsl */\n\t\t\t\t\"\\n\\n\\t\\t\\t\\tuniform sampler2D tEquirect;\\n\\n\\t\\t\\t\\tvarying vec3 vWorldDirection;\\n\\n\\t\\t\\t\\t#include <common>\\n\\n\\t\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\t\\tvec3 direction = normalize( vWorldDirection );\\n\\n\\t\\t\\t\\t\\tvec2 sampleUV = equirectUv( direction );\\n\\n\\t\\t\\t\\t\\tgl_FragColor = texture2D( tEquirect, sampleUV );\\n\\n\\t\\t\\t\\t}\\n\\t\\t\\t\"\n\t\t\t};\n\t\t\tvar geometry = new BoxGeometry(5, 5, 5);\n\t\t\tvar material = new ShaderMaterial({\n\t\t\t\tname: 'CubemapFromEquirect',\n\t\t\t\tuniforms: cloneUniforms(shader.uniforms),\n\t\t\t\tvertexShader: shader.vertexShader,\n\t\t\t\tfragmentShader: shader.fragmentShader,\n\t\t\t\tside: BackSide,\n\t\t\t\tblending: NoBlending\n\t\t\t});\n\t\t\tmaterial.uniforms.tEquirect.value = texture;\n\t\t\tvar mesh = new Mesh(geometry, material);\n\t\t\tvar currentMinFilter = texture.minFilter; // Avoid blurred poles\n\n\t\t\tif (texture.minFilter === LinearMipmapLinearFilter) texture.minFilter = LinearFilter;\n\t\t\tvar camera = new CubeCamera(1, 10, this);\n\t\t\tcamera.update(renderer, mesh);\n\t\t\ttexture.minFilter = currentMinFilter;\n\t\t\tmesh.geometry.dispose();\n\t\t\tmesh.material.dispose();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clear = function clear(renderer, color, depth, stencil) {\n\t\t\tvar currentRenderTarget = renderer.getRenderTarget();\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\trenderer.setRenderTarget(this, i);\n\t\t\t\trenderer.clear(color, depth, stencil);\n\t\t\t}\n\n\t\t\trenderer.setRenderTarget(currentRenderTarget);\n\t\t};\n\n\t\treturn WebGLCubeRenderTarget;\n\t}(WebGLRenderTarget);\n\n\tfunction DataTexture(data, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding) {\n\t\tTexture.call(this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);\n\t\tthis.image = {\n\t\t\tdata: data || null,\n\t\t\twidth: width || 1,\n\t\t\theight: height || 1\n\t\t};\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : NearestFilter;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : NearestFilter;\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.unpackAlignment = 1;\n\t\tthis.needsUpdate = true;\n\t}\n\n\tDataTexture.prototype = Object.create(Texture.prototype);\n\tDataTexture.prototype.constructor = DataTexture;\n\tDataTexture.prototype.isDataTexture = true;\n\n\tvar _sphere$1 = /*@__PURE__*/new Sphere();\n\n\tvar _vector$5 = /*@__PURE__*/new Vector3();\n\n\tvar Frustum = /*#__PURE__*/function () {\n\t\tfunction Frustum(p0, p1, p2, p3, p4, p5) {\n\t\t\tthis.planes = [p0 !== undefined ? p0 : new Plane(), p1 !== undefined ? p1 : new Plane(), p2 !== undefined ? p2 : new Plane(), p3 !== undefined ? p3 : new Plane(), p4 !== undefined ? p4 : new Plane(), p5 !== undefined ? p5 : new Plane()];\n\t\t}\n\n\t\tvar _proto = Frustum.prototype;\n\n\t\t_proto.set = function set(p0, p1, p2, p3, p4, p5) {\n\t\t\tvar planes = this.planes;\n\t\t\tplanes[0].copy(p0);\n\t\t\tplanes[1].copy(p1);\n\t\t\tplanes[2].copy(p2);\n\t\t\tplanes[3].copy(p3);\n\t\t\tplanes[4].copy(p4);\n\t\t\tplanes[5].copy(p5);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(frustum) {\n\t\t\tvar planes = this.planes;\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tplanes[i].copy(frustum.planes[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromProjectionMatrix = function setFromProjectionMatrix(m) {\n\t\t\tvar planes = this.planes;\n\t\t\tvar me = m.elements;\n\t\t\tvar me0 = me[0],\n\t\t\t\t\tme1 = me[1],\n\t\t\t\t\tme2 = me[2],\n\t\t\t\t\tme3 = me[3];\n\t\t\tvar me4 = me[4],\n\t\t\t\t\tme5 = me[5],\n\t\t\t\t\tme6 = me[6],\n\t\t\t\t\tme7 = me[7];\n\t\t\tvar me8 = me[8],\n\t\t\t\t\tme9 = me[9],\n\t\t\t\t\tme10 = me[10],\n\t\t\t\t\tme11 = me[11];\n\t\t\tvar me12 = me[12],\n\t\t\t\t\tme13 = me[13],\n\t\t\t\t\tme14 = me[14],\n\t\t\t\t\tme15 = me[15];\n\t\t\tplanes[0].setComponents(me3 - me0, me7 - me4, me11 - me8, me15 - me12).normalize();\n\t\t\tplanes[1].setComponents(me3 + me0, me7 + me4, me11 + me8, me15 + me12).normalize();\n\t\t\tplanes[2].setComponents(me3 + me1, me7 + me5, me11 + me9, me15 + me13).normalize();\n\t\t\tplanes[3].setComponents(me3 - me1, me7 - me5, me11 - me9, me15 - me13).normalize();\n\t\t\tplanes[4].setComponents(me3 - me2, me7 - me6, me11 - me10, me15 - me14).normalize();\n\t\t\tplanes[5].setComponents(me3 + me2, me7 + me6, me11 + me10, me15 + me14).normalize();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.intersectsObject = function intersectsObject(object) {\n\t\t\tvar geometry = object.geometry;\n\t\t\tif (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n\n\t\t\t_sphere$1.copy(geometry.boundingSphere).applyMatrix4(object.matrixWorld);\n\n\t\t\treturn this.intersectsSphere(_sphere$1);\n\t\t};\n\n\t\t_proto.intersectsSprite = function intersectsSprite(sprite) {\n\t\t\t_sphere$1.center.set(0, 0, 0);\n\n\t\t\t_sphere$1.radius = 0.7071067811865476;\n\n\t\t\t_sphere$1.applyMatrix4(sprite.matrixWorld);\n\n\t\t\treturn this.intersectsSphere(_sphere$1);\n\t\t};\n\n\t\t_proto.intersectsSphere = function intersectsSphere(sphere) {\n\t\t\tvar planes = this.planes;\n\t\t\tvar center = sphere.center;\n\t\t\tvar negRadius = -sphere.radius;\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tvar distance = planes[i].distanceToPoint(center);\n\n\t\t\t\tif (distance < negRadius) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\tvar planes = this.planes;\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tvar plane = planes[i]; // corner at max distance\n\n\t\t\t\t_vector$5.x = plane.normal.x > 0 ? box.max.x : box.min.x;\n\t\t\t\t_vector$5.y = plane.normal.y > 0 ? box.max.y : box.min.y;\n\t\t\t\t_vector$5.z = plane.normal.z > 0 ? box.max.z : box.min.z;\n\n\t\t\t\tif (plane.distanceToPoint(_vector$5) < 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\tvar planes = this.planes;\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tif (planes[i].distanceToPoint(point) < 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\treturn Frustum;\n\t}();\n\n\tfunction WebGLAnimation() {\n\t\tvar context = null;\n\t\tvar isAnimating = false;\n\t\tvar animationLoop = null;\n\t\tvar requestId = null;\n\n\t\tfunction onAnimationFrame(time, frame) {\n\t\t\tanimationLoop(time, frame);\n\t\t\trequestId = context.requestAnimationFrame(onAnimationFrame);\n\t\t}\n\n\t\treturn {\n\t\t\tstart: function start() {\n\t\t\t\tif (isAnimating === true) return;\n\t\t\t\tif (animationLoop === null) return;\n\t\t\t\trequestId = context.requestAnimationFrame(onAnimationFrame);\n\t\t\t\tisAnimating = true;\n\t\t\t},\n\t\t\tstop: function stop() {\n\t\t\t\tcontext.cancelAnimationFrame(requestId);\n\t\t\t\tisAnimating = false;\n\t\t\t},\n\t\t\tsetAnimationLoop: function setAnimationLoop(callback) {\n\t\t\t\tanimationLoop = callback;\n\t\t\t},\n\t\t\tsetContext: function setContext(value) {\n\t\t\t\tcontext = value;\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction WebGLAttributes(gl, capabilities) {\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar buffers = new WeakMap();\n\n\t\tfunction createBuffer(attribute, bufferType) {\n\t\t\tvar array = attribute.array;\n\t\t\tvar usage = attribute.usage;\n\t\t\tvar buffer = gl.createBuffer();\n\t\t\tgl.bindBuffer(bufferType, buffer);\n\t\t\tgl.bufferData(bufferType, array, usage);\n\t\t\tattribute.onUploadCallback();\n\t\t\tvar type = 5126;\n\n\t\t\tif (array instanceof Float32Array) {\n\t\t\t\ttype = 5126;\n\t\t\t} else if (array instanceof Float64Array) {\n\t\t\t\tconsole.warn('THREE.WebGLAttributes: Unsupported data buffer format: Float64Array.');\n\t\t\t} else if (array instanceof Uint16Array) {\n\t\t\t\tif (attribute.isFloat16BufferAttribute) {\n\t\t\t\t\tif (isWebGL2) {\n\t\t\t\t\t\ttype = 5131;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttype = 5123;\n\t\t\t\t}\n\t\t\t} else if (array instanceof Int16Array) {\n\t\t\t\ttype = 5122;\n\t\t\t} else if (array instanceof Uint32Array) {\n\t\t\t\ttype = 5125;\n\t\t\t} else if (array instanceof Int32Array) {\n\t\t\t\ttype = 5124;\n\t\t\t} else if (array instanceof Int8Array) {\n\t\t\t\ttype = 5120;\n\t\t\t} else if (array instanceof Uint8Array) {\n\t\t\t\ttype = 5121;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tbuffer: buffer,\n\t\t\t\ttype: type,\n\t\t\t\tbytesPerElement: array.BYTES_PER_ELEMENT,\n\t\t\t\tversion: attribute.version\n\t\t\t};\n\t\t}\n\n\t\tfunction updateBuffer(buffer, attribute, bufferType) {\n\t\t\tvar array = attribute.array;\n\t\t\tvar updateRange = attribute.updateRange;\n\t\t\tgl.bindBuffer(bufferType, buffer);\n\n\t\t\tif (updateRange.count === -1) {\n\t\t\t\t// Not using update ranges\n\t\t\t\tgl.bufferSubData(bufferType, 0, array);\n\t\t\t} else {\n\t\t\t\tif (isWebGL2) {\n\t\t\t\t\tgl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array, updateRange.offset, updateRange.count);\n\t\t\t\t} else {\n\t\t\t\t\tgl.bufferSubData(bufferType, updateRange.offset * array.BYTES_PER_ELEMENT, array.subarray(updateRange.offset, updateRange.offset + updateRange.count));\n\t\t\t\t}\n\n\t\t\t\tupdateRange.count = -1; // reset range\n\t\t\t}\n\t\t} //\n\n\n\t\tfunction get(attribute) {\n\t\t\tif (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n\t\t\treturn buffers.get(attribute);\n\t\t}\n\n\t\tfunction remove(attribute) {\n\t\t\tif (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n\t\t\tvar data = buffers.get(attribute);\n\n\t\t\tif (data) {\n\t\t\t\tgl.deleteBuffer(data.buffer);\n\t\t\t\tbuffers.delete(attribute);\n\t\t\t}\n\t\t}\n\n\t\tfunction update(attribute, bufferType) {\n\t\t\tif (attribute.isGLBufferAttribute) {\n\t\t\t\tvar cached = buffers.get(attribute);\n\n\t\t\t\tif (!cached || cached.version < attribute.version) {\n\t\t\t\t\tbuffers.set(attribute, {\n\t\t\t\t\t\tbuffer: attribute.buffer,\n\t\t\t\t\t\ttype: attribute.type,\n\t\t\t\t\t\tbytesPerElement: attribute.elementSize,\n\t\t\t\t\t\tversion: attribute.version\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (attribute.isInterleavedBufferAttribute) attribute = attribute.data;\n\t\t\tvar data = buffers.get(attribute);\n\n\t\t\tif (data === undefined) {\n\t\t\t\tbuffers.set(attribute, createBuffer(attribute, bufferType));\n\t\t\t} else if (data.version < attribute.version) {\n\t\t\t\tupdateBuffer(data.buffer, attribute, bufferType);\n\t\t\t\tdata.version = attribute.version;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tremove: remove,\n\t\t\tupdate: update\n\t\t};\n\t}\n\n\tvar PlaneGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(PlaneGeometry, _BufferGeometry);\n\n\t\tfunction PlaneGeometry(width, height, widthSegments, heightSegments) {\n\t\t\tvar _this;\n\n\t\t\tif (width === void 0) {\n\t\t\t\twidth = 1;\n\t\t\t}\n\n\t\t\tif (height === void 0) {\n\t\t\t\theight = 1;\n\t\t\t}\n\n\t\t\tif (widthSegments === void 0) {\n\t\t\t\twidthSegments = 1;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 1;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'PlaneGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\twidth: width,\n\t\t\t\theight: height,\n\t\t\t\twidthSegments: widthSegments,\n\t\t\t\theightSegments: heightSegments\n\t\t\t};\n\t\t\tvar width_half = width / 2;\n\t\t\tvar height_half = height / 2;\n\t\t\tvar gridX = Math.floor(widthSegments);\n\t\t\tvar gridY = Math.floor(heightSegments);\n\t\t\tvar gridX1 = gridX + 1;\n\t\t\tvar gridY1 = gridY + 1;\n\t\t\tvar segment_width = width / gridX;\n\t\t\tvar segment_height = height / gridY; //\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = [];\n\n\t\t\tfor (var iy = 0; iy < gridY1; iy++) {\n\t\t\t\tvar y = iy * segment_height - height_half;\n\n\t\t\t\tfor (var ix = 0; ix < gridX1; ix++) {\n\t\t\t\t\tvar x = ix * segment_width - width_half;\n\t\t\t\t\tvertices.push(x, -y, 0);\n\t\t\t\t\tnormals.push(0, 0, 1);\n\t\t\t\t\tuvs.push(ix / gridX);\n\t\t\t\t\tuvs.push(1 - iy / gridY);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var _iy = 0; _iy < gridY; _iy++) {\n\t\t\t\tfor (var _ix = 0; _ix < gridX; _ix++) {\n\t\t\t\t\tvar a = _ix + gridX1 * _iy;\n\t\t\t\t\tvar b = _ix + gridX1 * (_iy + 1);\n\t\t\t\t\tvar c = _ix + 1 + gridX1 * (_iy + 1);\n\t\t\t\t\tvar d = _ix + 1 + gridX1 * _iy;\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn PlaneGeometry;\n\t}(BufferGeometry);\n\n\tvar alphamap_fragment = \"#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\\n#endif\";\n\n\tvar alphamap_pars_fragment = \"#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\n\tvar alphatest_fragment = \"#ifdef ALPHATEST\\n\\tif ( diffuseColor.a < ALPHATEST ) discard;\\n#endif\";\n\n\tvar aomap_fragment = \"#ifdef USE_AOMAP\\n\\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\\n\\treflectedLight.indirectDiffuse *= ambientOcclusion;\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD )\\n\\t\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\\n\\t#endif\\n#endif\";\n\n\tvar aomap_pars_fragment = \"#ifdef USE_AOMAP\\n\\tuniform sampler2D aoMap;\\n\\tuniform float aoMapIntensity;\\n#endif\";\n\n\tvar begin_vertex = \"vec3 transformed = vec3( position );\";\n\n\tvar beginnormal_vertex = \"vec3 objectNormal = vec3( normal );\\n#ifdef USE_TANGENT\\n\\tvec3 objectTangent = vec3( tangent.xyz );\\n#endif\";\n\n\tvar bsdfs = \"vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\\n\\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\\n\\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\\n\\tvec4 r = roughness * c0 + c1;\\n\\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\\n\\treturn vec2( -1.04, 1.04 ) * a004 + r.zw;\\n}\\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\\n\\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\\n\\tif( cutoffDistance > 0.0 ) {\\n\\t\\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\\n\\t}\\n\\treturn distanceFalloff;\\n#else\\n\\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\\n\\t\\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\\n\\t}\\n\\treturn 1.0;\\n#endif\\n}\\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\\n\\treturn RECIPROCAL_PI * diffuseColor;\\n}\\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\\n\\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\\n}\\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\\n\\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\\n\\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\\n\\treturn Fr * fresnel + F0;\\n}\\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\treturn 1.0 / ( gl * gv );\\n}\\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\\n\\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\\n\\treturn 0.5 / max( gv + gl, EPSILON );\\n}\\nfloat D_GGX( const in float alpha, const in float dotNH ) {\\n\\tfloat a2 = pow2( alpha );\\n\\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\\n\\treturn RECIPROCAL_PI * a2 / pow2( denom );\\n}\\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat alpha = pow2( roughness );\\n\\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\\n\\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tfloat dotNH = saturate( dot( normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\\n\\tfloat D = D_GGX( alpha, dotNH );\\n\\treturn F * ( G * D );\\n}\\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\\n\\tconst float LUT_SIZE = 64.0;\\n\\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\\n\\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\\n\\tfloat dotNV = saturate( dot( N, V ) );\\n\\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\\n\\tuv = uv * LUT_SCALE + LUT_BIAS;\\n\\treturn uv;\\n}\\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\\n\\tfloat l = length( f );\\n\\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\\n}\\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\\n\\tfloat x = dot( v1, v2 );\\n\\tfloat y = abs( x );\\n\\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\\n\\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\\n\\tfloat v = a / b;\\n\\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\\n\\treturn cross( v1, v2 ) * theta_sintheta;\\n}\\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\\n\\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\\n\\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\\n\\tvec3 lightNormal = cross( v1, v2 );\\n\\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\\n\\tvec3 T1, T2;\\n\\tT1 = normalize( V - N * dot( V, N ) );\\n\\tT2 = - cross( N, T1 );\\n\\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\\n\\tvec3 coords[ 4 ];\\n\\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\\n\\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\\n\\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\\n\\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\\n\\tcoords[ 0 ] = normalize( coords[ 0 ] );\\n\\tcoords[ 1 ] = normalize( coords[ 1 ] );\\n\\tcoords[ 2 ] = normalize( coords[ 2 ] );\\n\\tcoords[ 3 ] = normalize( coords[ 3 ] );\\n\\tvec3 vectorFormFactor = vec3( 0.0 );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\\n\\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\\n\\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\\n\\treturn vec3( result );\\n}\\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\\n\\tfloat dotNV = saturate( dot( normal, viewDir ) );\\n\\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\\n\\treturn specularColor * brdf.x + brdf.y;\\n}\\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\\n\\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\\n\\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\\n\\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\\n\\tvec3 FssEss = F * brdf.x + brdf.y;\\n\\tfloat Ess = brdf.x + brdf.y;\\n\\tfloat Ems = 1.0 - Ess;\\n\\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\\n\\tsingleScatter += FssEss;\\n\\tmultiScatter += Fms * Ems;\\n}\\nfloat G_BlinnPhong_Implicit( ) {\\n\\treturn 0.25;\\n}\\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\\n\\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\\n}\\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\\n\\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\\n\\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\\n\\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\\n\\tvec3 F = F_Schlick( specularColor, dotLH );\\n\\tfloat G = G_BlinnPhong_Implicit( );\\n\\tfloat D = D_BlinnPhong( shininess, dotNH );\\n\\treturn F * ( G * D );\\n}\\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\\n\\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\\n}\\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\\n\\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\\n}\\n#if defined( USE_SHEEN )\\nfloat D_Charlie(float roughness, float NoH) {\\n\\tfloat invAlpha = 1.0 / roughness;\\n\\tfloat cos2h = NoH * NoH;\\n\\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\\n}\\nfloat V_Neubelt(float NoV, float NoL) {\\n\\treturn saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\\n}\\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\\n\\tvec3 N = geometry.normal;\\n\\tvec3 V = geometry.viewDir;\\n\\tvec3 H = normalize( V + L );\\n\\tfloat dotNH = saturate( dot( N, H ) );\\n\\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\\n}\\n#endif\";\n\n\tvar bumpmap_pars_fragment = \"#ifdef USE_BUMPMAP\\n\\tuniform sampler2D bumpMap;\\n\\tuniform float bumpScale;\\n\\tvec2 dHdxy_fwd() {\\n\\t\\tvec2 dSTdx = dFdx( vUv );\\n\\t\\tvec2 dSTdy = dFdy( vUv );\\n\\t\\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\\n\\t\\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\\n\\t\\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\\n\\t\\treturn vec2( dBx, dBy );\\n\\t}\\n\\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\\n\\t\\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\\n\\t\\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\\n\\t\\tvec3 vN = surf_norm;\\n\\t\\tvec3 R1 = cross( vSigmaY, vN );\\n\\t\\tvec3 R2 = cross( vN, vSigmaX );\\n\\t\\tfloat fDet = dot( vSigmaX, R1 );\\n\\t\\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\\n\\t\\treturn normalize( abs( fDet ) * surf_norm - vGrad );\\n\\t}\\n#endif\";\n\n\tvar clipping_planes_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvec4 plane;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\\n\\t\\tplane = clippingPlanes[ i ];\\n\\t\\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\\n\\t\\tbool clipped = true;\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\\n\\t\\t\\tplane = clippingPlanes[ i ];\\n\\t\\t\\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t\\tif ( clipped ) discard;\\n\\t#endif\\n#endif\";\n\n\tvar clipping_planes_pars_fragment = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n\\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\\n#endif\";\n\n\tvar clipping_planes_pars_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvarying vec3 vClipPosition;\\n#endif\";\n\n\tvar clipping_planes_vertex = \"#if NUM_CLIPPING_PLANES > 0\\n\\tvClipPosition = - mvPosition.xyz;\\n#endif\";\n\n\tvar color_fragment = \"#ifdef USE_COLOR\\n\\tdiffuseColor.rgb *= vColor;\\n#endif\";\n\n\tvar color_pars_fragment = \"#ifdef USE_COLOR\\n\\tvarying vec3 vColor;\\n#endif\";\n\n\tvar color_pars_vertex = \"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvarying vec3 vColor;\\n#endif\";\n\n\tvar color_vertex = \"#if defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\\n\\tvColor = vec3( 1.0 );\\n#endif\\n#ifdef USE_COLOR\\n\\tvColor.xyz *= color.xyz;\\n#endif\\n#ifdef USE_INSTANCING_COLOR\\n\\tvColor.xyz *= instanceColor.xyz;\\n#endif\";\n\n\tvar common = \"#define PI 3.141592653589793\\n#define PI2 6.283185307179586\\n#define PI_HALF 1.5707963267948966\\n#define RECIPROCAL_PI 0.3183098861837907\\n#define RECIPROCAL_PI2 0.15915494309189535\\n#define EPSILON 1e-6\\n#ifndef saturate\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\\nfloat pow2( const in float x ) { return x*x; }\\nfloat pow3( const in float x ) { return x*x*x; }\\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\\nhighp float rand( const in vec2 uv ) {\\n\\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\\n\\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\\n\\treturn fract(sin(sn) * c);\\n}\\n#ifdef HIGH_PRECISION\\n\\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\\n#else\\n\\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\\n\\tfloat precisionSafeLength( vec3 v ) {\\n\\t\\tfloat maxComponent = max3( abs( v ) );\\n\\t\\treturn length( v / maxComponent ) * maxComponent;\\n\\t}\\n#endif\\nstruct IncidentLight {\\n\\tvec3 color;\\n\\tvec3 direction;\\n\\tbool visible;\\n};\\nstruct ReflectedLight {\\n\\tvec3 directDiffuse;\\n\\tvec3 directSpecular;\\n\\tvec3 indirectDiffuse;\\n\\tvec3 indirectSpecular;\\n};\\nstruct GeometricContext {\\n\\tvec3 position;\\n\\tvec3 normal;\\n\\tvec3 viewDir;\\n#ifdef CLEARCOAT\\n\\tvec3 clearcoatNormal;\\n#endif\\n};\\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\\n}\\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\\n\\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\\n}\\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\tfloat distance = dot( planeNormal, point - pointOnPlane );\\n\\treturn - distance * planeNormal + point;\\n}\\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn sign( dot( point - pointOnPlane, planeNormal ) );\\n}\\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\\n\\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\\n}\\nmat3 transposeMat3( const in mat3 m ) {\\n\\tmat3 tmp;\\n\\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\\n\\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\\n\\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\\n\\treturn tmp;\\n}\\nfloat linearToRelativeLuminance( const in vec3 color ) {\\n\\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\\n\\treturn dot( weights, color.rgb );\\n}\\nbool isPerspectiveMatrix( mat4 m ) {\\n\\treturn m[ 2 ][ 3 ] == - 1.0;\\n}\\nvec2 equirectUv( in vec3 dir ) {\\n\\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\\n\\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\\n\\treturn vec2( u, v );\\n}\";\n\n\tvar cube_uv_reflection_fragment = \"#ifdef ENVMAP_TYPE_CUBE_UV\\n\\t#define cubeUV_maxMipLevel 8.0\\n\\t#define cubeUV_minMipLevel 4.0\\n\\t#define cubeUV_maxTileSize 256.0\\n\\t#define cubeUV_minTileSize 16.0\\n\\tfloat getFace( vec3 direction ) {\\n\\t\\tvec3 absDirection = abs( direction );\\n\\t\\tfloat face = - 1.0;\\n\\t\\tif ( absDirection.x > absDirection.z ) {\\n\\t\\t\\tif ( absDirection.x > absDirection.y )\\n\\t\\t\\t\\tface = direction.x > 0.0 ? 0.0 : 3.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t} else {\\n\\t\\t\\tif ( absDirection.z > absDirection.y )\\n\\t\\t\\t\\tface = direction.z > 0.0 ? 2.0 : 5.0;\\n\\t\\t\\telse\\n\\t\\t\\t\\tface = direction.y > 0.0 ? 1.0 : 4.0;\\n\\t\\t}\\n\\t\\treturn face;\\n\\t}\\n\\tvec2 getUV( vec3 direction, float face ) {\\n\\t\\tvec2 uv;\\n\\t\\tif ( face == 0.0 ) {\\n\\t\\t\\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 1.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\\n\\t\\t} else if ( face == 2.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\\n\\t\\t} else if ( face == 3.0 ) {\\n\\t\\t\\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\\n\\t\\t} else if ( face == 4.0 ) {\\n\\t\\t\\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\\n\\t\\t} else {\\n\\t\\t\\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\\n\\t\\t}\\n\\t\\treturn 0.5 * ( uv + 1.0 );\\n\\t}\\n\\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\\n\\t\\tfloat face = getFace( direction );\\n\\t\\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\\n\\t\\tmipInt = max( mipInt, cubeUV_minMipLevel );\\n\\t\\tfloat faceSize = exp2( mipInt );\\n\\t\\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\\n\\t\\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\\n\\t\\tvec2 f = fract( uv );\\n\\t\\tuv += 0.5 - f;\\n\\t\\tif ( face > 2.0 ) {\\n\\t\\t\\tuv.y += faceSize;\\n\\t\\t\\tface -= 3.0;\\n\\t\\t}\\n\\t\\tuv.x += face * faceSize;\\n\\t\\tif ( mipInt < cubeUV_maxMipLevel ) {\\n\\t\\t\\tuv.y += 2.0 * cubeUV_maxTileSize;\\n\\t\\t}\\n\\t\\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\\n\\t\\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\\n\\t\\tuv *= texelSize;\\n\\t\\tvec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.x += texelSize;\\n\\t\\tvec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.y += texelSize;\\n\\t\\tvec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tuv.x -= texelSize;\\n\\t\\tvec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\\n\\t\\tvec3 tm = mix( tl, tr, f.x );\\n\\t\\tvec3 bm = mix( bl, br, f.x );\\n\\t\\treturn mix( tm, bm, f.y );\\n\\t}\\n\\t#define r0 1.0\\n\\t#define v0 0.339\\n\\t#define m0 - 2.0\\n\\t#define r1 0.8\\n\\t#define v1 0.276\\n\\t#define m1 - 1.0\\n\\t#define r4 0.4\\n\\t#define v4 0.046\\n\\t#define m4 2.0\\n\\t#define r5 0.305\\n\\t#define v5 0.016\\n\\t#define m5 3.0\\n\\t#define r6 0.21\\n\\t#define v6 0.0038\\n\\t#define m6 4.0\\n\\tfloat roughnessToMip( float roughness ) {\\n\\t\\tfloat mip = 0.0;\\n\\t\\tif ( roughness >= r1 ) {\\n\\t\\t\\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\\n\\t\\t} else if ( roughness >= r4 ) {\\n\\t\\t\\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\\n\\t\\t} else if ( roughness >= r5 ) {\\n\\t\\t\\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\\n\\t\\t} else if ( roughness >= r6 ) {\\n\\t\\t\\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\\n\\t\\t} else {\\n\\t\\t\\tmip = - 2.0 * log2( 1.16 * roughness );\\t\\t}\\n\\t\\treturn mip;\\n\\t}\\n\\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\\n\\t\\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\\n\\t\\tfloat mipF = fract( mip );\\n\\t\\tfloat mipInt = floor( mip );\\n\\t\\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\\n\\t\\tif ( mipF == 0.0 ) {\\n\\t\\t\\treturn vec4( color0, 1.0 );\\n\\t\\t} else {\\n\\t\\t\\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\\n\\t\\t\\treturn vec4( mix( color0, color1, mipF ), 1.0 );\\n\\t\\t}\\n\\t}\\n#endif\";\n\n\tvar defaultnormal_vertex = \"vec3 transformedNormal = objectNormal;\\n#ifdef USE_INSTANCING\\n\\tmat3 m = mat3( instanceMatrix );\\n\\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\\n\\ttransformedNormal = m * transformedNormal;\\n#endif\\ntransformedNormal = normalMatrix * transformedNormal;\\n#ifdef FLIP_SIDED\\n\\ttransformedNormal = - transformedNormal;\\n#endif\\n#ifdef USE_TANGENT\\n\\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#ifdef FLIP_SIDED\\n\\t\\ttransformedTangent = - transformedTangent;\\n\\t#endif\\n#endif\";\n\n\tvar displacementmap_pars_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\tuniform sampler2D displacementMap;\\n\\tuniform float displacementScale;\\n\\tuniform float displacementBias;\\n#endif\";\n\n\tvar displacementmap_vertex = \"#ifdef USE_DISPLACEMENTMAP\\n\\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\\n#endif\";\n\n\tvar emissivemap_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\\n\\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\\n\\ttotalEmissiveRadiance *= emissiveColor.rgb;\\n#endif\";\n\n\tvar emissivemap_pars_fragment = \"#ifdef USE_EMISSIVEMAP\\n\\tuniform sampler2D emissiveMap;\\n#endif\";\n\n\tvar encodings_fragment = \"gl_FragColor = linearToOutputTexel( gl_FragColor );\";\n\n\tvar encodings_pars_fragment = \"\\nvec4 LinearToLinear( in vec4 value ) {\\n\\treturn value;\\n}\\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\\n}\\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\\n\\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\\n}\\nvec4 sRGBToLinear( in vec4 value ) {\\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.a );\\n}\\nvec4 LinearTosRGB( in vec4 value ) {\\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.a );\\n}\\nvec4 RGBEToLinear( in vec4 value ) {\\n\\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\\n}\\nvec4 LinearToRGBE( in vec4 value ) {\\n\\tfloat maxComponent = max( max( value.r, value.g ), value.b );\\n\\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\\n\\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\\n}\\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\\n}\\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\\n\\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\\n\\tM = ceil( M * 255.0 ) / 255.0;\\n\\treturn vec4( value.rgb / ( M * maxRange ), M );\\n}\\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\\n\\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\\n}\\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\\n\\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\\n\\tfloat D = max( maxRange / maxRGB, 1.0 );\\n\\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\\n\\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\\n}\\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\\nvec4 LinearToLogLuv( in vec4 value ) {\\n\\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\\n\\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\\n\\tvec4 vResult;\\n\\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\\n\\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\\n\\tvResult.w = fract( Le );\\n\\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\\n\\treturn vResult;\\n}\\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\\nvec4 LogLuvToLinear( in vec4 value ) {\\n\\tfloat Le = value.z * 255.0 + value.w;\\n\\tvec3 Xp_Y_XYZp;\\n\\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\\n\\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\\n\\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\\n\\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\\n\\treturn vec4( max( vRGB, 0.0 ), 1.0 );\\n}\";\n\n\tvar envmap_fragment = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvec3 cameraToFrag;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#else\\n\\t\\tvec3 reflectVec = vReflect;\\n\\t#endif\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\\n\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\\n\\t#else\\n\\t\\tvec4 envColor = vec4( 0.0 );\\n\\t#endif\\n\\t#ifndef ENVMAP_TYPE_CUBE_UV\\n\\t\\tenvColor = envMapTexelToLinear( envColor );\\n\\t#endif\\n\\t#ifdef ENVMAP_BLENDING_MULTIPLY\\n\\t\\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_MIX )\\n\\t\\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\\n\\t#elif defined( ENVMAP_BLENDING_ADD )\\n\\t\\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\\n\\t#endif\\n#endif\";\n\n\tvar envmap_common_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float envMapIntensity;\\n\\tuniform float flipEnvMap;\\n\\tuniform int maxMipLevel;\\n\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\tuniform samplerCube envMap;\\n\\t#else\\n\\t\\tuniform sampler2D envMap;\\n\\t#endif\\n\\t\\n#endif\";\n\n\tvar envmap_pars_fragment = \"#ifdef USE_ENVMAP\\n\\tuniform float reflectivity;\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t\\tuniform float refractionRatio;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t#endif\\n#endif\";\n\n\tvar envmap_pars_vertex = \"#ifdef USE_ENVMAP\\n\\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\\n\\t\\t#define ENV_WORLDPOS\\n\\t#endif\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\t\\n\\t\\tvarying vec3 vWorldPosition;\\n\\t#else\\n\\t\\tvarying vec3 vReflect;\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n#endif\";\n\n\tvar envmap_vertex = \"#ifdef USE_ENVMAP\\n\\t#ifdef ENV_WORLDPOS\\n\\t\\tvWorldPosition = worldPosition.xyz;\\n\\t#else\\n\\t\\tvec3 cameraToVertex;\\n\\t\\tif ( isOrthographic ) {\\n\\t\\t\\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\\n\\t\\t} else {\\n\\t\\t\\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\\n\\t\\t}\\n\\t\\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvReflect = reflect( cameraToVertex, worldNormal );\\n\\t\\t#else\\n\\t\\t\\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\\n\\t\\t#endif\\n\\t#endif\\n#endif\";\n\n\tvar fog_vertex = \"#ifdef USE_FOG\\n\\tfogDepth = - mvPosition.z;\\n#endif\";\n\n\tvar fog_pars_vertex = \"#ifdef USE_FOG\\n\\tvarying float fogDepth;\\n#endif\";\n\n\tvar fog_fragment = \"#ifdef USE_FOG\\n\\t#ifdef FOG_EXP2\\n\\t\\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\\n\\t#else\\n\\t\\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\\n\\t#endif\\n\\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\\n#endif\";\n\n\tvar fog_pars_fragment = \"#ifdef USE_FOG\\n\\tuniform vec3 fogColor;\\n\\tvarying float fogDepth;\\n\\t#ifdef FOG_EXP2\\n\\t\\tuniform float fogDensity;\\n\\t#else\\n\\t\\tuniform float fogNear;\\n\\t\\tuniform float fogFar;\\n\\t#endif\\n#endif\";\n\n\tvar gradientmap_pars_fragment = \"#ifdef USE_GRADIENTMAP\\n\\tuniform sampler2D gradientMap;\\n#endif\\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\\n\\tfloat dotNL = dot( normal, lightDirection );\\n\\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\\n\\t#ifdef USE_GRADIENTMAP\\n\\t\\treturn texture2D( gradientMap, coord ).rgb;\\n\\t#else\\n\\t\\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\\n\\t#endif\\n}\";\n\n\tvar lightmap_fragment = \"#ifdef USE_LIGHTMAP\\n\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n#endif\";\n\n\tvar lightmap_pars_fragment = \"#ifdef USE_LIGHTMAP\\n\\tuniform sampler2D lightMap;\\n\\tuniform float lightMapIntensity;\\n#endif\";\n\n\tvar lights_lambert_vertex = \"vec3 diffuse = vec3( 1.0 );\\nGeometricContext geometry;\\ngeometry.position = mvPosition.xyz;\\ngeometry.normal = normalize( transformedNormal );\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\\nGeometricContext backGeometry;\\nbackGeometry.position = geometry.position;\\nbackGeometry.normal = -geometry.normal;\\nbackGeometry.viewDir = geometry.viewDir;\\nvLightFront = vec3( 0.0 );\\nvIndirectFront = vec3( 0.0 );\\n#ifdef DOUBLE_SIDED\\n\\tvLightBack = vec3( 0.0 );\\n\\tvIndirectBack = vec3( 0.0 );\\n#endif\\nIncidentLight directLight;\\nfloat dotNL;\\nvec3 directLightColor_Diffuse;\\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\\n#ifdef DOUBLE_SIDED\\n\\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\\n\\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_DIR_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\\n\\t\\tdotNL = dot( geometry.normal, directLight.direction );\\n\\t\\tdirectLightColor_Diffuse = PI * directLight.color;\\n\\t\\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\\n\\t\\t#endif\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\";\n\n\tvar lights_pars_begin = \"uniform bool receiveShadow;\\nuniform vec3 ambientLightColor;\\nuniform vec3 lightProbe[ 9 ];\\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\\n\\tfloat x = normal.x, y = normal.y, z = normal.z;\\n\\tvec3 result = shCoefficients[ 0 ] * 0.886227;\\n\\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\\n\\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\\n\\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\\n\\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\\n\\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\\n\\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\\n\\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\\n\\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\\n\\treturn result;\\n}\\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\\n\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\\n\\treturn irradiance;\\n}\\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\\n\\tvec3 irradiance = ambientLightColor;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treturn irradiance;\\n}\\n#if NUM_DIR_LIGHTS > 0\\n\\tstruct DirectionalLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t};\\n\\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\\n\\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tdirectLight.color = directionalLight.color;\\n\\t\\tdirectLight.direction = directionalLight.direction;\\n\\t\\tdirectLight.visible = true;\\n\\t}\\n#endif\\n#if NUM_POINT_LIGHTS > 0\\n\\tstruct PointLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t};\\n\\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\\n\\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = pointLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tdirectLight.color = pointLight.color;\\n\\t\\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\\n\\t\\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\\n\\t}\\n#endif\\n#if NUM_SPOT_LIGHTS > 0\\n\\tstruct SpotLight {\\n\\t\\tvec3 position;\\n\\t\\tvec3 direction;\\n\\t\\tvec3 color;\\n\\t\\tfloat distance;\\n\\t\\tfloat decay;\\n\\t\\tfloat coneCos;\\n\\t\\tfloat penumbraCos;\\n\\t};\\n\\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\\n\\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\\n\\t\\tvec3 lVector = spotLight.position - geometry.position;\\n\\t\\tdirectLight.direction = normalize( lVector );\\n\\t\\tfloat lightDistance = length( lVector );\\n\\t\\tfloat angleCos = dot( directLight.direction, spotLight.direction );\\n\\t\\tif ( angleCos > spotLight.coneCos ) {\\n\\t\\t\\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\\n\\t\\t\\tdirectLight.color = spotLight.color;\\n\\t\\t\\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\\n\\t\\t\\tdirectLight.visible = true;\\n\\t\\t} else {\\n\\t\\t\\tdirectLight.color = vec3( 0.0 );\\n\\t\\t\\tdirectLight.visible = false;\\n\\t\\t}\\n\\t}\\n#endif\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tstruct RectAreaLight {\\n\\t\\tvec3 color;\\n\\t\\tvec3 position;\\n\\t\\tvec3 halfWidth;\\n\\t\\tvec3 halfHeight;\\n\\t};\\n\\tuniform sampler2D ltc_1;\\tuniform sampler2D ltc_2;\\n\\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\\n#endif\\n#if NUM_HEMI_LIGHTS > 0\\n\\tstruct HemisphereLight {\\n\\t\\tvec3 direction;\\n\\t\\tvec3 skyColor;\\n\\t\\tvec3 groundColor;\\n\\t};\\n\\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\\n\\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\\n\\t\\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\\n\\t\\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\\n\\t\\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tirradiance *= PI;\\n\\t\\t#endif\\n\\t\\treturn irradiance;\\n\\t}\\n#endif\";\n\n\tvar envmap_physical_pars_fragment = \"#if defined( USE_ENVMAP )\\n\\t#ifdef ENVMAP_MODE_REFRACTION\\n\\t\\tuniform float refractionRatio;\\n\\t#endif\\n\\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\\n\\t\\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\\n\\t\\t#else\\n\\t\\t\\tvec4 envMapColor = vec4( 0.0 );\\n\\t\\t#endif\\n\\t\\treturn PI * envMapColor.rgb * envMapIntensity;\\n\\t}\\n\\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\\n\\t\\tfloat maxMIPLevelScalar = float( maxMIPLevel );\\n\\t\\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\\n\\t\\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\\n\\t\\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\\n\\t}\\n\\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\\n\\t\\t#ifdef ENVMAP_MODE_REFLECTION\\n\\t\\t\\tvec3 reflectVec = reflect( -viewDir, normal );\\n\\t\\t\\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\\n\\t\\t#else\\n\\t\\t\\tvec3 reflectVec = refract( -viewDir, normal, refractionRatio );\\n\\t\\t#endif\\n\\t\\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\\n\\t\\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\\n\\t\\t#ifdef ENVMAP_TYPE_CUBE\\n\\t\\t\\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\\n\\t\\t\\t#ifdef TEXTURE_LOD_EXT\\n\\t\\t\\t\\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#else\\n\\t\\t\\t\\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\\n\\t\\t\\t#endif\\n\\t\\t\\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\\n\\t\\t#elif defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\t\\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\\n\\t\\t#endif\\n\\t\\treturn envMapColor.rgb * envMapIntensity;\\n\\t}\\n#endif\";\n\n\tvar lights_toon_fragment = \"ToonMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\";\n\n\tvar lights_toon_pars_fragment = \"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct ToonMaterial {\\n\\tvec3 diffuseColor;\\n};\\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Toon\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Toon\\n#define Material_LightProbeLOD( material )\\t(0)\";\n\n\tvar lights_phong_fragment = \"BlinnPhongMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb;\\nmaterial.specularColor = specular;\\nmaterial.specularShininess = shininess;\\nmaterial.specularStrength = specularStrength;\";\n\n\tvar lights_phong_pars_fragment = \"varying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\nstruct BlinnPhongMaterial {\\n\\tvec3 diffuseColor;\\n\\tvec3 specularColor;\\n\\tfloat specularShininess;\\n\\tfloat specularStrength;\\n};\\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n\\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\\n}\\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_BlinnPhong\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_BlinnPhong\\n#define Material_LightProbeLOD( material )\\t(0)\";\n\n\tvar lights_physical_fragment = \"PhysicalMaterial material;\\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\\n#ifdef REFLECTIVITY\\n\\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\\n#else\\n\\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\\n#endif\\n#ifdef CLEARCOAT\\n\\tmaterial.clearcoat = clearcoat;\\n\\tmaterial.clearcoatRoughness = clearcoatRoughness;\\n\\t#ifdef USE_CLEARCOATMAP\\n\\t\\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\\n\\t#endif\\n\\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\t\\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\\n\\t#endif\\n\\tmaterial.clearcoat = saturate( material.clearcoat );\\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\\n\\tmaterial.clearcoatRoughness += geometryRoughness;\\n\\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\\n#endif\\n#ifdef USE_SHEEN\\n\\tmaterial.sheenColor = sheen;\\n#endif\";\n\n\tvar lights_physical_pars_fragment = \"struct PhysicalMaterial {\\n\\tvec3 diffuseColor;\\n\\tfloat specularRoughness;\\n\\tvec3 specularColor;\\n#ifdef CLEARCOAT\\n\\tfloat clearcoat;\\n\\tfloat clearcoatRoughness;\\n#endif\\n#ifdef USE_SHEEN\\n\\tvec3 sheenColor;\\n#endif\\n};\\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\\n\\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\\n}\\n#if NUM_RECT_AREA_LIGHTS > 0\\n\\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\t\\tvec3 normal = geometry.normal;\\n\\t\\tvec3 viewDir = geometry.viewDir;\\n\\t\\tvec3 position = geometry.position;\\n\\t\\tvec3 lightPos = rectAreaLight.position;\\n\\t\\tvec3 halfWidth = rectAreaLight.halfWidth;\\n\\t\\tvec3 halfHeight = rectAreaLight.halfHeight;\\n\\t\\tvec3 lightColor = rectAreaLight.color;\\n\\t\\tfloat roughness = material.specularRoughness;\\n\\t\\tvec3 rectCoords[ 4 ];\\n\\t\\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\\t\\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\\n\\t\\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\\n\\t\\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\\n\\t\\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\\n\\t\\tvec4 t1 = texture2D( ltc_1, uv );\\n\\t\\tvec4 t2 = texture2D( ltc_2, uv );\\n\\t\\tmat3 mInv = mat3(\\n\\t\\t\\tvec3( t1.x, 0, t1.y ),\\n\\t\\t\\tvec3(\t\t0, 1,\t\t0 ),\\n\\t\\t\\tvec3( t1.z, 0, t1.w )\\n\\t\\t);\\n\\t\\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\\n\\t\\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\\n\\t\\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\\n\\t}\\n#endif\\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\\n\\tvec3 irradiance = dotNL * directLight.color;\\n\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\tirradiance *= PI;\\n\\t#endif\\n\\t#ifdef CLEARCOAT\\n\\t\\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\\n\\t\\tvec3 ccIrradiance = ccDotNL * directLight.color;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tccIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\\n\\t\\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\\n\\t#else\\n\\t\\tfloat clearcoatDHR = 0.0;\\n\\t#endif\\n\\t#ifdef USE_SHEEN\\n\\t\\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\\n\\t\\t\\tmaterial.specularRoughness,\\n\\t\\t\\tdirectLight.direction,\\n\\t\\t\\tgeometry,\\n\\t\\t\\tmaterial.sheenColor\\n\\t\\t);\\n\\t#else\\n\\t\\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\\n\\t#endif\\n\\treflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\\n\\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\\n}\\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\\n\\t#ifdef CLEARCOAT\\n\\t\\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\\n\\t\\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\\n\\t\\tfloat ccDotNL = ccDotNV;\\n\\t\\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\\n\\t#else\\n\\t\\tfloat clearcoatDHR = 0.0;\\n\\t#endif\\n\\tfloat clearcoatInv = 1.0 - clearcoatDHR;\\n\\tvec3 singleScattering = vec3( 0.0 );\\n\\tvec3 multiScattering = vec3( 0.0 );\\n\\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\\n\\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\\n\\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\\n\\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\\n\\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\\n\\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\\n}\\n#define RE_Direct\\t\\t\\t\\tRE_Direct_Physical\\n#define RE_Direct_RectArea\\t\\tRE_Direct_RectArea_Physical\\n#define RE_IndirectDiffuse\\t\\tRE_IndirectDiffuse_Physical\\n#define RE_IndirectSpecular\\t\\tRE_IndirectSpecular_Physical\\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\\n\\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\\n}\";\n\n\tvar lights_fragment_begin = \"\\nGeometricContext geometry;\\ngeometry.position = - vViewPosition;\\ngeometry.normal = normal;\\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\\n#ifdef CLEARCOAT\\n\\tgeometry.clearcoatNormal = clearcoatNormal;\\n#endif\\nIncidentLight directLight;\\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tPointLight pointLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\\n\\t\\tpointLight = pointLights[ i ];\\n\\t\\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\\n\\t\\tpointLightShadow = pointLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tSpotLight spotLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\\n\\t\\tspotLight = spotLights[ i ];\\n\\t\\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\\n\\t\\tspotLightShadow = spotLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\\n\\tDirectionalLight directionalLight;\\n\\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLightShadow;\\n\\t#endif\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLights[ i ];\\n\\t\\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\\n\\t\\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\\n\\t\\tdirectionalLightShadow = directionalLightShadows[ i ];\\n\\t\\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t\\t#endif\\n\\t\\tRE_Direct( directLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\\n\\tRectAreaLight rectAreaLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\\n\\t\\trectAreaLight = rectAreaLights[ i ];\\n\\t\\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\\n\\t}\\n\\t#pragma unroll_loop_end\\n#endif\\n#if defined( RE_IndirectDiffuse )\\n\\tvec3 iblIrradiance = vec3( 0.0 );\\n\\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\\n\\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\\n\\t#if ( NUM_HEMI_LIGHTS > 0 )\\n\\t\\t#pragma unroll_loop_start\\n\\t\\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\\n\\t\\t\\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\\n\\t\\t}\\n\\t\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tvec3 radiance = vec3( 0.0 );\\n\\tvec3 clearcoatRadiance = vec3( 0.0 );\\n#endif\";\n\n\tvar lights_fragment_maps = \"#if defined( RE_IndirectDiffuse )\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\t\\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n\\t\\t#ifndef PHYSICALLY_CORRECT_LIGHTS\\n\\t\\t\\tlightMapIrradiance *= PI;\\n\\t\\t#endif\\n\\t\\tirradiance += lightMapIrradiance;\\n\\t#endif\\n\\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\\n\\t\\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\\n\\t#endif\\n#endif\\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\\n\\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\\n\\t#ifdef CLEARCOAT\\n\\t\\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\\n\\t#endif\\n#endif\";\n\n\tvar lights_fragment_end = \"#if defined( RE_IndirectDiffuse )\\n\\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\\n#endif\\n#if defined( RE_IndirectSpecular )\\n\\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\\n#endif\";\n\n\tvar logdepthbuf_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\\n#endif\";\n\n\tvar logdepthbuf_pars_fragment = \"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\\n\\tuniform float logDepthBufFC;\\n\\tvarying float vFragDepth;\\n\\tvarying float vIsPerspective;\\n#endif\";\n\n\tvar logdepthbuf_pars_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvarying float vFragDepth;\\n\\t\\tvarying float vIsPerspective;\\n\\t#else\\n\\t\\tuniform float logDepthBufFC;\\n\\t#endif\\n#endif\";\n\n\tvar logdepthbuf_vertex = \"#ifdef USE_LOGDEPTHBUF\\n\\t#ifdef USE_LOGDEPTHBUF_EXT\\n\\t\\tvFragDepth = 1.0 + gl_Position.w;\\n\\t\\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\\n\\t#else\\n\\t\\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\\n\\t\\t\\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\\n\\t\\t\\tgl_Position.z *= gl_Position.w;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\n\tvar map_fragment = \"#ifdef USE_MAP\\n\\tvec4 texelColor = texture2D( map, vUv );\\n\\ttexelColor = mapTexelToLinear( texelColor );\\n\\tdiffuseColor *= texelColor;\\n#endif\";\n\n\tvar map_pars_fragment = \"#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\";\n\n\tvar map_particle_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\\n#endif\\n#ifdef USE_MAP\\n\\tvec4 mapTexel = texture2D( map, uv );\\n\\tdiffuseColor *= mapTexelToLinear( mapTexel );\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\\n#endif\";\n\n\tvar map_particle_pars_fragment = \"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\\n\\tuniform mat3 uvTransform;\\n#endif\\n#ifdef USE_MAP\\n\\tuniform sampler2D map;\\n#endif\\n#ifdef USE_ALPHAMAP\\n\\tuniform sampler2D alphaMap;\\n#endif\";\n\n\tvar metalnessmap_fragment = \"float metalnessFactor = metalness;\\n#ifdef USE_METALNESSMAP\\n\\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\\n\\tmetalnessFactor *= texelMetalness.b;\\n#endif\";\n\n\tvar metalnessmap_pars_fragment = \"#ifdef USE_METALNESSMAP\\n\\tuniform sampler2D metalnessMap;\\n#endif\";\n\n\tvar morphnormal_vertex = \"#ifdef USE_MORPHNORMALS\\n\\tobjectNormal *= morphTargetBaseInfluence;\\n\\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\\n\\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\\n\\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\\n\\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\\n#endif\";\n\n\tvar morphtarget_pars_vertex = \"#ifdef USE_MORPHTARGETS\\n\\tuniform float morphTargetBaseInfluence;\\n\\t#ifndef USE_MORPHNORMALS\\n\\t\\tuniform float morphTargetInfluences[ 8 ];\\n\\t#else\\n\\t\\tuniform float morphTargetInfluences[ 4 ];\\n\\t#endif\\n#endif\";\n\n\tvar morphtarget_vertex = \"#ifdef USE_MORPHTARGETS\\n\\ttransformed *= morphTargetBaseInfluence;\\n\\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\\n\\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\\n\\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\\n\\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\\n\\t#ifndef USE_MORPHNORMALS\\n\\t\\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\\n\\t\\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\\n\\t\\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\\n\\t\\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\\n\\t#endif\\n#endif\";\n\n\tvar normal_fragment_begin = \"#ifdef FLAT_SHADED\\n\\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\\n\\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\\n\\tvec3 normal = normalize( cross( fdx, fdy ) );\\n#else\\n\\tvec3 normal = normalize( vNormal );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n\\t#ifdef USE_TANGENT\\n\\t\\tvec3 tangent = normalize( vTangent );\\n\\t\\tvec3 bitangent = normalize( vBitangent );\\n\\t\\t#ifdef DOUBLE_SIDED\\n\\t\\t\\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\t\\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\t#endif\\n\\t\\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\\n\\t\\t\\tmat3 vTBN = mat3( tangent, bitangent, normal );\\n\\t\\t#endif\\n\\t#endif\\n#endif\\nvec3 geometryNormal = normal;\";\n\n\tvar normal_fragment_maps = \"#ifdef OBJECTSPACE_NORMALMAP\\n\\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\t#ifdef FLIP_SIDED\\n\\t\\tnormal = - normal;\\n\\t#endif\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t#endif\\n\\tnormal = normalize( normalMatrix * normal );\\n#elif defined( TANGENTSPACE_NORMALMAP )\\n\\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tmapN.xy *= normalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tnormal = normalize( vTBN * mapN );\\n\\t#else\\n\\t\\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\\n\\t#endif\\n#elif defined( USE_BUMPMAP )\\n\\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\\n#endif\";\n\n\tvar normalmap_pars_fragment = \"#ifdef USE_NORMALMAP\\n\\tuniform sampler2D normalMap;\\n\\tuniform vec2 normalScale;\\n#endif\\n#ifdef OBJECTSPACE_NORMALMAP\\n\\tuniform mat3 normalMatrix;\\n#endif\\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\\n\\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\\n\\t\\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\\n\\t\\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\\n\\t\\tvec2 st0 = dFdx( vUv.st );\\n\\t\\tvec2 st1 = dFdy( vUv.st );\\n\\t\\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\\n\\t\\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\\n\\t\\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\\n\\t\\tvec3 N = normalize( surf_norm );\\n\\t\\tmat3 tsn = mat3( S, T, N );\\n\\t\\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\\n\\t\\treturn normalize( tsn * mapN );\\n\\t}\\n#endif\";\n\n\tvar clearcoat_normal_fragment_begin = \"#ifdef CLEARCOAT\\n\\tvec3 clearcoatNormal = geometryNormal;\\n#endif\";\n\n\tvar clearcoat_normal_fragment_maps = \"#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\\n\\tclearcoatMapN.xy *= clearcoatNormalScale;\\n\\t#ifdef USE_TANGENT\\n\\t\\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\\n\\t#else\\n\\t\\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\\n\\t#endif\\n#endif\";\n\n\tvar clearcoat_pars_fragment = \"#ifdef USE_CLEARCOATMAP\\n\\tuniform sampler2D clearcoatMap;\\n#endif\\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\\n\\tuniform sampler2D clearcoatRoughnessMap;\\n#endif\\n#ifdef USE_CLEARCOAT_NORMALMAP\\n\\tuniform sampler2D clearcoatNormalMap;\\n\\tuniform vec2 clearcoatNormalScale;\\n#endif\";\n\n\tvar packing = \"vec3 packNormalToRGB( const in vec3 normal ) {\\n\\treturn normalize( normal ) * 0.5 + 0.5;\\n}\\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\\n\\treturn 2.0 * rgb.xyz - 1.0;\\n}\\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\\nconst float ShiftRight8 = 1. / 256.;\\nvec4 packDepthToRGBA( const in float v ) {\\n\\tvec4 r = vec4( fract( v * PackFactors ), v );\\n\\tr.yzw -= r.xyz * ShiftRight8;\\treturn r * PackUpscale;\\n}\\nfloat unpackRGBAToDepth( const in vec4 v ) {\\n\\treturn dot( v, UnpackFactors );\\n}\\nvec4 pack2HalfToRGBA( vec2 v ) {\\n\\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\\n\\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\\n}\\nvec2 unpackRGBATo2Half( vec4 v ) {\\n\\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\\n}\\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn ( viewZ + near ) / ( near - far );\\n}\\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\\n\\treturn linearClipZ * ( near - far ) - near;\\n}\\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\\n\\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\\n}\\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\\n\\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\\n}\";\n\n\tvar premultiplied_alpha_fragment = \"#ifdef PREMULTIPLIED_ALPHA\\n\\tgl_FragColor.rgb *= gl_FragColor.a;\\n#endif\";\n\n\tvar project_vertex = \"vec4 mvPosition = vec4( transformed, 1.0 );\\n#ifdef USE_INSTANCING\\n\\tmvPosition = instanceMatrix * mvPosition;\\n#endif\\nmvPosition = modelViewMatrix * mvPosition;\\ngl_Position = projectionMatrix * mvPosition;\";\n\n\tvar dithering_fragment = \"#ifdef DITHERING\\n\\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\\n#endif\";\n\n\tvar dithering_pars_fragment = \"#ifdef DITHERING\\n\\tvec3 dithering( vec3 color ) {\\n\\t\\tfloat grid_position = rand( gl_FragCoord.xy );\\n\\t\\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\\n\\t\\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\\n\\t\\treturn color + dither_shift_RGB;\\n\\t}\\n#endif\";\n\n\tvar roughnessmap_fragment = \"float roughnessFactor = roughness;\\n#ifdef USE_ROUGHNESSMAP\\n\\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\\n\\troughnessFactor *= texelRoughness.g;\\n#endif\";\n\n\tvar roughnessmap_pars_fragment = \"#ifdef USE_ROUGHNESSMAP\\n\\tuniform sampler2D roughnessMap;\\n#endif\";\n\n\tvar shadowmap_pars_fragment = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\\n\\t\\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\\n\\t}\\n\\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\\n\\t\\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\\n\\t}\\n\\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\\n\\t\\tfloat occlusion = 1.0;\\n\\t\\tvec2 distribution = texture2DDistribution( shadow, uv );\\n\\t\\tfloat hard_shadow = step( compare , distribution.x );\\n\\t\\tif (hard_shadow != 1.0 ) {\\n\\t\\t\\tfloat distance = compare - distribution.x ;\\n\\t\\t\\tfloat variance = max( 0.00000, distribution.y * distribution.y );\\n\\t\\t\\tfloat softness_probability = variance / (variance + distance * distance );\\t\\t\\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\\t\\t\\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\\n\\t\\t}\\n\\t\\treturn occlusion;\\n\\t}\\n\\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\\n\\t\\tfloat shadow = 1.0;\\n\\t\\tshadowCoord.xyz /= shadowCoord.w;\\n\\t\\tshadowCoord.z += shadowBias;\\n\\t\\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\\n\\t\\tbool inFrustum = all( inFrustumVec );\\n\\t\\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\\n\\t\\tbool frustumTest = all( frustumTestVec );\\n\\t\\tif ( frustumTest ) {\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx0 = - texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy0 = - texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx1 = + texelSize.x * shadowRadius;\\n\\t\\t\\tfloat dy1 = + texelSize.y * shadowRadius;\\n\\t\\t\\tfloat dx2 = dx0 / 2.0;\\n\\t\\t\\tfloat dy2 = dy0 / 2.0;\\n\\t\\t\\tfloat dx3 = dx1 / 2.0;\\n\\t\\t\\tfloat dy3 = dy1 / 2.0;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\\n\\t\\t\\t) * ( 1.0 / 17.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\\n\\t\\t\\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\\n\\t\\t\\tfloat dx = texelSize.x;\\n\\t\\t\\tfloat dy = texelSize.y;\\n\\t\\t\\tvec2 uv = shadowCoord.xy;\\n\\t\\t\\tvec2 f = fract( uv * shadowMapSize + 0.5 );\\n\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\tshadow = (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.x ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t f.y ) +\\n\\t\\t\\t\\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t\\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t\tf.x ),\\n\\t\\t\\t\\t\\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \\n\\t\\t\\t\\t\\t\\t\ttexture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\\n\\t\\t\\t\\t\\t\\t\tf.x ),\\n\\t\\t\\t\\t\\t f.y )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#elif defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#else\\n\\t\\t\\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\\n\\t\\t#endif\\n\\t\\t}\\n\\t\\treturn shadow;\\n\\t}\\n\\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\\n\\t\\tvec3 absV = abs( v );\\n\\t\\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\\n\\t\\tabsV *= scaleToCube;\\n\\t\\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\\n\\t\\tvec2 planar = v.xy;\\n\\t\\tfloat almostATexel = 1.5 * texelSizeY;\\n\\t\\tfloat almostOne = 1.0 - almostATexel;\\n\\t\\tif ( absV.z >= almostOne ) {\\n\\t\\t\\tif ( v.z > 0.0 )\\n\\t\\t\\t\\tplanar.x = 4.0 - v.x;\\n\\t\\t} else if ( absV.x >= almostOne ) {\\n\\t\\t\\tfloat signX = sign( v.x );\\n\\t\\t\\tplanar.x = v.z * signX + 2.0 * signX;\\n\\t\\t} else if ( absV.y >= almostOne ) {\\n\\t\\t\\tfloat signY = sign( v.y );\\n\\t\\t\\tplanar.x = v.x + 2.0 * signY + 2.0;\\n\\t\\t\\tplanar.y = v.z * signY - 2.0;\\n\\t\\t}\\n\\t\\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\\n\\t}\\n\\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\\n\\t\\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\\n\\t\\tvec3 lightToPosition = shadowCoord.xyz;\\n\\t\\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\\t\\tdp += shadowBias;\\n\\t\\tvec3 bd3D = normalize( lightToPosition );\\n\\t\\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\\n\\t\\t\\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\\n\\t\\t\\treturn (\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\\n\\t\\t\\t\\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\\n\\t\\t\\t) * ( 1.0 / 9.0 );\\n\\t\\t#else\\n\\t\\t\\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\\n\\t\\t#endif\\n\\t}\\n#endif\";\n\n\tvar shadowmap_pars_vertex = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t\\tstruct DirectionalLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t\\tstruct SpotLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t};\\n\\t\\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t\\tstruct PointLightShadow {\\n\\t\\t\\tfloat shadowBias;\\n\\t\\t\\tfloat shadowNormalBias;\\n\\t\\t\\tfloat shadowRadius;\\n\\t\\t\\tvec2 shadowMapSize;\\n\\t\\t\\tfloat shadowCameraNear;\\n\\t\\t\\tfloat shadowCameraFar;\\n\\t\\t};\\n\\t\\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\\n\\t#endif\\n#endif\";\n\n\tvar shadowmap_vertex = \"#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\\n\\t\\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\\n\\t\\tvec4 shadowWorldPosition;\\n\\t#endif\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\\n\\t\\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n#endif\";\n\n\tvar shadowmask_pars_fragment = \"float getShadowMask() {\\n\\tfloat shadow = 1.0;\\n\\t#ifdef USE_SHADOWMAP\\n\\t#if NUM_DIR_LIGHT_SHADOWS > 0\\n\\tDirectionalLightShadow directionalLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tdirectionalLight = directionalLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_SPOT_LIGHT_SHADOWS > 0\\n\\tSpotLightShadow spotLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tspotLight = spotLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#if NUM_POINT_LIGHT_SHADOWS > 0\\n\\tPointLightShadow pointLight;\\n\\t#pragma unroll_loop_start\\n\\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\\n\\t\\tpointLight = pointLightShadows[ i ];\\n\\t\\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\\n\\t}\\n\\t#pragma unroll_loop_end\\n\\t#endif\\n\\t#endif\\n\\treturn shadow;\\n}\";\n\n\tvar skinbase_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\\n\\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\\n\\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\\n\\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\\n#endif\";\n\n\tvar skinning_pars_vertex = \"#ifdef USE_SKINNING\\n\\tuniform mat4 bindMatrix;\\n\\tuniform mat4 bindMatrixInverse;\\n\\t#ifdef BONE_TEXTURE\\n\\t\\tuniform highp sampler2D boneTexture;\\n\\t\\tuniform int boneTextureSize;\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tfloat j = i * 4.0;\\n\\t\\t\\tfloat x = mod( j, float( boneTextureSize ) );\\n\\t\\t\\tfloat y = floor( j / float( boneTextureSize ) );\\n\\t\\t\\tfloat dx = 1.0 / float( boneTextureSize );\\n\\t\\t\\tfloat dy = 1.0 / float( boneTextureSize );\\n\\t\\t\\ty = dy * ( y + 0.5 );\\n\\t\\t\\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\\n\\t\\t\\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\\n\\t\\t\\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\\n\\t\\t\\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\\n\\t\\t\\tmat4 bone = mat4( v1, v2, v3, v4 );\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#else\\n\\t\\tuniform mat4 boneMatrices[ MAX_BONES ];\\n\\t\\tmat4 getBoneMatrix( const in float i ) {\\n\\t\\t\\tmat4 bone = boneMatrices[ int(i) ];\\n\\t\\t\\treturn bone;\\n\\t\\t}\\n\\t#endif\\n#endif\";\n\n\tvar skinning_vertex = \"#ifdef USE_SKINNING\\n\\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\\n\\tvec4 skinned = vec4( 0.0 );\\n\\tskinned += boneMatX * skinVertex * skinWeight.x;\\n\\tskinned += boneMatY * skinVertex * skinWeight.y;\\n\\tskinned += boneMatZ * skinVertex * skinWeight.z;\\n\\tskinned += boneMatW * skinVertex * skinWeight.w;\\n\\ttransformed = ( bindMatrixInverse * skinned ).xyz;\\n#endif\";\n\n\tvar skinnormal_vertex = \"#ifdef USE_SKINNING\\n\\tmat4 skinMatrix = mat4( 0.0 );\\n\\tskinMatrix += skinWeight.x * boneMatX;\\n\\tskinMatrix += skinWeight.y * boneMatY;\\n\\tskinMatrix += skinWeight.z * boneMatZ;\\n\\tskinMatrix += skinWeight.w * boneMatW;\\n\\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\\n\\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\\n\\t#ifdef USE_TANGENT\\n\\t\\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\\n\\t#endif\\n#endif\";\n\n\tvar specularmap_fragment = \"float specularStrength;\\n#ifdef USE_SPECULARMAP\\n\\tvec4 texelSpecular = texture2D( specularMap, vUv );\\n\\tspecularStrength = texelSpecular.r;\\n#else\\n\\tspecularStrength = 1.0;\\n#endif\";\n\n\tvar specularmap_pars_fragment = \"#ifdef USE_SPECULARMAP\\n\\tuniform sampler2D specularMap;\\n#endif\";\n\n\tvar tonemapping_fragment = \"#if defined( TONE_MAPPING )\\n\\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\\n#endif\";\n\n\tvar tonemapping_pars_fragment = \"#ifndef saturate\\n#define saturate(a) clamp( a, 0.0, 1.0 )\\n#endif\\nuniform float toneMappingExposure;\\nvec3 LinearToneMapping( vec3 color ) {\\n\\treturn toneMappingExposure * color;\\n}\\nvec3 ReinhardToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\treturn saturate( color / ( vec3( 1.0 ) + color ) );\\n}\\nvec3 OptimizedCineonToneMapping( vec3 color ) {\\n\\tcolor *= toneMappingExposure;\\n\\tcolor = max( vec3( 0.0 ), color - 0.004 );\\n\\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\\n}\\nvec3 RRTAndODTFit( vec3 v ) {\\n\\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\\n\\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\\n\\treturn a / b;\\n}\\nvec3 ACESFilmicToneMapping( vec3 color ) {\\n\\tconst mat3 ACESInputMat = mat3(\\n\\t\\tvec3( 0.59719, 0.07600, 0.02840 ),\\t\\tvec3( 0.35458, 0.90834, 0.13383 ),\\n\\t\\tvec3( 0.04823, 0.01566, 0.83777 )\\n\\t);\\n\\tconst mat3 ACESOutputMat = mat3(\\n\\t\\tvec3(\t1.60475, -0.10208, -0.00327 ),\\t\\tvec3( -0.53108,\t1.10813, -0.07276 ),\\n\\t\\tvec3( -0.07367, -0.00605,\t1.07602 )\\n\\t);\\n\\tcolor *= toneMappingExposure / 0.6;\\n\\tcolor = ACESInputMat * color;\\n\\tcolor = RRTAndODTFit( color );\\n\\tcolor = ACESOutputMat * color;\\n\\treturn saturate( color );\\n}\\nvec3 CustomToneMapping( vec3 color ) { return color; }\";\n\n\tvar transmissionmap_fragment = \"#ifdef USE_TRANSMISSIONMAP\\n\\ttotalTransmission *= texture2D( transmissionMap, vUv ).r;\\n#endif\";\n\n\tvar transmissionmap_pars_fragment = \"#ifdef USE_TRANSMISSIONMAP\\n\\tuniform sampler2D transmissionMap;\\n#endif\";\n\n\tvar uv_pars_fragment = \"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\\n\\tvarying vec2 vUv;\\n#endif\";\n\n\tvar uv_pars_vertex = \"#ifdef USE_UV\\n\\t#ifdef UVS_VERTEX_ONLY\\n\\t\\tvec2 vUv;\\n\\t#else\\n\\t\\tvarying vec2 vUv;\\n\\t#endif\\n\\tuniform mat3 uvTransform;\\n#endif\";\n\n\tvar uv_vertex = \"#ifdef USE_UV\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n#endif\";\n\n\tvar uv2_pars_fragment = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvarying vec2 vUv2;\\n#endif\";\n\n\tvar uv2_pars_vertex = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tattribute vec2 uv2;\\n\\tvarying vec2 vUv2;\\n\\tuniform mat3 uv2Transform;\\n#endif\";\n\n\tvar uv2_vertex = \"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\\n\\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\\n#endif\";\n\n\tvar worldpos_vertex = \"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\\n\\tvec4 worldPosition = vec4( transformed, 1.0 );\\n\\t#ifdef USE_INSTANCING\\n\\t\\tworldPosition = instanceMatrix * worldPosition;\\n\\t#endif\\n\\tworldPosition = modelMatrix * worldPosition;\\n#endif\";\n\n\tvar background_frag = \"uniform sampler2D t2D;\\nvarying vec2 vUv;\\nvoid main() {\\n\\tvec4 texColor = texture2D( t2D, vUv );\\n\\tgl_FragColor = mapTexelToLinear( texColor );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\n\tvar background_vert = \"varying vec2 vUv;\\nuniform mat3 uvTransform;\\nvoid main() {\\n\\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\\n\\tgl_Position = vec4( position.xy, 1.0, 1.0 );\\n}\";\n\n\tvar cube_frag = \"#include <envmap_common_pars_fragment>\\nuniform float opacity;\\nvarying vec3 vWorldDirection;\\n#include <cube_uv_reflection_fragment>\\nvoid main() {\\n\\tvec3 vReflect = vWorldDirection;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = envColor;\\n\\tgl_FragColor.a *= opacity;\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\n\tvar cube_vert = \"varying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\tgl_Position.z = gl_Position.w;\\n}\";\n\n\tvar depth_frag = \"#if DEPTH_PACKING == 3200\\n\\tuniform float opacity;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tdiffuseColor.a = opacity;\\n\\t#endif\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\\n\\t#if DEPTH_PACKING == 3200\\n\\t\\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\\n\\t#elif DEPTH_PACKING == 3201\\n\\t\\tgl_FragColor = packDepthToRGBA( fragCoordZ );\\n\\t#endif\\n}\";\n\n\tvar depth_vert = \"#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvarying vec2 vHighPrecisionZW;\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvHighPrecisionZW = gl_Position.zw;\\n}\";\n\n\tvar distanceRGBA_frag = \"#define DISTANCE\\nuniform vec3 referencePosition;\\nuniform float nearDistance;\\nuniform float farDistance;\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main () {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( 1.0 );\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\tfloat dist = length( vWorldPosition - referencePosition );\\n\\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\\n\\tdist = saturate( dist );\\n\\tgl_FragColor = packDepthToRGBA( dist );\\n}\";\n\n\tvar distanceRGBA_vert = \"#define DISTANCE\\nvarying vec3 vWorldPosition;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_DISPLACEMENTMAP\\n\\t\\t#include <beginnormal_vertex>\\n\\t\\t#include <morphnormal_vertex>\\n\\t\\t#include <skinnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvWorldPosition = worldPosition.xyz;\\n}\";\n\n\tvar equirect_frag = \"uniform sampler2D tEquirect;\\nvarying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvec3 direction = normalize( vWorldDirection );\\n\\tvec2 sampleUV = equirectUv( direction );\\n\\tvec4 texColor = texture2D( tEquirect, sampleUV );\\n\\tgl_FragColor = mapTexelToLinear( texColor );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n}\";\n\n\tvar equirect_vert = \"varying vec3 vWorldDirection;\\n#include <common>\\nvoid main() {\\n\\tvWorldDirection = transformDirection( position, modelMatrix );\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n}\";\n\n\tvar linedashed_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\nuniform float dashSize;\\nuniform float totalSize;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\\n\\t\\tdiscard;\\n\\t}\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <color_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n}\";\n\n\tvar linedashed_vert = \"uniform float scale;\\nattribute float lineDistance;\\nvarying float vLineDistance;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\tvLineDistance = scale * lineDistance;\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshbasic_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <fog_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\t#ifdef USE_LIGHTMAP\\n\\t\\n\\t\\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\\n\\t\\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vec3( 1.0 );\\n\\t#endif\\n\\t#include <aomap_fragment>\\n\\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\\n\\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshbasic_vert = \"#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#ifdef USE_ENVMAP\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshlambert_frag = \"uniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\nvarying vec3 vLightFront;\\nvarying vec3 vIndirectFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n\\tvarying vec3 vIndirectBack;\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <fog_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <emissivemap_fragment>\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\\n\\t#else\\n\\t\\treflectedLight.indirectDiffuse += vIndirectFront;\\n\\t#endif\\n\\t#include <lightmap_fragment>\\n\\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\\n\\t#ifdef DOUBLE_SIDED\\n\\t\\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\\n\\t#else\\n\\t\\treflectedLight.directDiffuse = vLightFront;\\n\\t#endif\\n\\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshlambert_vert = \"#define LAMBERT\\nvarying vec3 vLightFront;\\nvarying vec3 vIndirectFront;\\n#ifdef DOUBLE_SIDED\\n\\tvarying vec3 vLightBack;\\n\\tvarying vec3 vIndirectBack;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <lights_lambert_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshmatcap_frag = \"#define MATCAP\\nuniform vec3 diffuse;\\nuniform float opacity;\\nuniform sampler2D matcap;\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tvec3 viewDir = normalize( vViewPosition );\\n\\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\\n\\tvec3 y = cross( viewDir, x );\\n\\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\\n\\t#ifdef USE_MATCAP\\n\\t\\tvec4 matcapColor = texture2D( matcap, uv );\\n\\t\\tmatcapColor = matcapTexelToLinear( matcapColor );\\n\\t#else\\n\\t\\tvec4 matcapColor = vec4( 1.0 );\\n\\t#endif\\n\\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshmatcap_vert = \"#define MATCAP\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <color_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#ifndef FLAT_SHADED\\n\\t\\tvNormal = normalize( transformedNormal );\\n\\t#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n}\";\n\n\tvar meshtoon_frag = \"#define TOON\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <gradientmap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_toon_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_toon_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshtoon_vert = \"#define TOON\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshphong_frag = \"#define PHONG\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform vec3 specular;\\nuniform float shininess;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_pars_fragment>\\n#include <cube_uv_reflection_fragment>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <lights_phong_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <specularmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <specularmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <lights_phong_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#include <envmap_fragment>\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshphong_vert = \"#define PHONG\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <envmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <envmap_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar meshphysical_frag = \"#define STANDARD\\n#ifdef PHYSICAL\\n\\t#define REFLECTIVITY\\n\\t#define CLEARCOAT\\n\\t#define TRANSMISSION\\n#endif\\nuniform vec3 diffuse;\\nuniform vec3 emissive;\\nuniform float roughness;\\nuniform float metalness;\\nuniform float opacity;\\n#ifdef TRANSMISSION\\n\\tuniform float transmission;\\n#endif\\n#ifdef REFLECTIVITY\\n\\tuniform float reflectivity;\\n#endif\\n#ifdef CLEARCOAT\\n\\tuniform float clearcoat;\\n\\tuniform float clearcoatRoughness;\\n#endif\\n#ifdef USE_SHEEN\\n\\tuniform vec3 sheen;\\n#endif\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <packing>\\n#include <dithering_pars_fragment>\\n#include <color_pars_fragment>\\n#include <uv_pars_fragment>\\n#include <uv2_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <aomap_pars_fragment>\\n#include <lightmap_pars_fragment>\\n#include <emissivemap_pars_fragment>\\n#include <transmissionmap_pars_fragment>\\n#include <bsdfs>\\n#include <cube_uv_reflection_fragment>\\n#include <envmap_common_pars_fragment>\\n#include <envmap_physical_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <lights_pars_begin>\\n#include <lights_physical_pars_fragment>\\n#include <shadowmap_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <clearcoat_pars_fragment>\\n#include <roughnessmap_pars_fragment>\\n#include <metalnessmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\\n\\tvec3 totalEmissiveRadiance = emissive;\\n\\t#ifdef TRANSMISSION\\n\\t\\tfloat totalTransmission = transmission;\\n\\t#endif\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\t#include <roughnessmap_fragment>\\n\\t#include <metalnessmap_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\t#include <clearcoat_normal_fragment_begin>\\n\\t#include <clearcoat_normal_fragment_maps>\\n\\t#include <emissivemap_fragment>\\n\\t#include <transmissionmap_fragment>\\n\\t#include <lights_physical_fragment>\\n\\t#include <lights_fragment_begin>\\n\\t#include <lights_fragment_maps>\\n\\t#include <lights_fragment_end>\\n\\t#include <aomap_fragment>\\n\\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\\n\\t#ifdef TRANSMISSION\\n\\t\\tdiffuseColor.a *= mix( saturate( 1. - totalTransmission + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) ), 1.0, metalness );\\n\\t#endif\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n\\t#include <dithering_fragment>\\n}\";\n\n\tvar meshphysical_vert = \"#define STANDARD\\nvarying vec3 vViewPosition;\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <uv2_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <shadowmap_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <uv2_vertex>\\n\\t#include <color_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\tvViewPosition = - mvPosition.xyz;\\n\\t#include <worldpos_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar normal_frag = \"#define NORMAL\\nuniform float opacity;\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <packing>\\n#include <uv_pars_fragment>\\n#include <bumpmap_pars_fragment>\\n#include <normalmap_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <normal_fragment_begin>\\n\\t#include <normal_fragment_maps>\\n\\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\\n}\";\n\n\tvar normal_vert = \"#define NORMAL\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvarying vec3 vViewPosition;\\n#endif\\n#ifndef FLAT_SHADED\\n\\tvarying vec3 vNormal;\\n\\t#ifdef USE_TANGENT\\n\\t\\tvarying vec3 vTangent;\\n\\t\\tvarying vec3 vBitangent;\\n\\t#endif\\n#endif\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <displacementmap_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <skinning_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n#ifndef FLAT_SHADED\\n\\tvNormal = normalize( transformedNormal );\\n\\t#ifdef USE_TANGENT\\n\\t\\tvTangent = normalize( transformedTangent );\\n\\t\\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\\n\\t#endif\\n#endif\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <skinning_vertex>\\n\\t#include <displacementmap_vertex>\\n\\t#include <project_vertex>\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\\n\\tvViewPosition = - mvPosition.xyz;\\n#endif\\n}\";\n\n\tvar points_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <color_pars_fragment>\\n#include <map_particle_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_particle_fragment>\\n\\t#include <color_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n\\t#include <premultiplied_alpha_fragment>\\n}\";\n\n\tvar points_vert = \"uniform float size;\\nuniform float scale;\\n#include <common>\\n#include <color_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <morphtarget_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <color_vertex>\\n\\t#include <begin_vertex>\\n\\t#include <morphtarget_vertex>\\n\\t#include <project_vertex>\\n\\tgl_PointSize = size;\\n\\t#ifdef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\\n\\t#endif\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar shadow_frag = \"uniform vec3 color;\\nuniform float opacity;\\n#include <common>\\n#include <packing>\\n#include <fog_pars_fragment>\\n#include <bsdfs>\\n#include <lights_pars_begin>\\n#include <shadowmap_pars_fragment>\\n#include <shadowmask_pars_fragment>\\nvoid main() {\\n\\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\";\n\n\tvar shadow_vert = \"#include <common>\\n#include <fog_pars_vertex>\\n#include <shadowmap_pars_vertex>\\nvoid main() {\\n\\t#include <begin_vertex>\\n\\t#include <project_vertex>\\n\\t#include <worldpos_vertex>\\n\\t#include <beginnormal_vertex>\\n\\t#include <morphnormal_vertex>\\n\\t#include <skinbase_vertex>\\n\\t#include <skinnormal_vertex>\\n\\t#include <defaultnormal_vertex>\\n\\t#include <shadowmap_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar sprite_frag = \"uniform vec3 diffuse;\\nuniform float opacity;\\n#include <common>\\n#include <uv_pars_fragment>\\n#include <map_pars_fragment>\\n#include <alphamap_pars_fragment>\\n#include <fog_pars_fragment>\\n#include <logdepthbuf_pars_fragment>\\n#include <clipping_planes_pars_fragment>\\nvoid main() {\\n\\t#include <clipping_planes_fragment>\\n\\tvec3 outgoingLight = vec3( 0.0 );\\n\\tvec4 diffuseColor = vec4( diffuse, opacity );\\n\\t#include <logdepthbuf_fragment>\\n\\t#include <map_fragment>\\n\\t#include <alphamap_fragment>\\n\\t#include <alphatest_fragment>\\n\\toutgoingLight = diffuseColor.rgb;\\n\\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\\n\\t#include <tonemapping_fragment>\\n\\t#include <encodings_fragment>\\n\\t#include <fog_fragment>\\n}\";\n\n\tvar sprite_vert = \"uniform float rotation;\\nuniform vec2 center;\\n#include <common>\\n#include <uv_pars_vertex>\\n#include <fog_pars_vertex>\\n#include <logdepthbuf_pars_vertex>\\n#include <clipping_planes_pars_vertex>\\nvoid main() {\\n\\t#include <uv_vertex>\\n\\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\tvec2 scale;\\n\\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\\n\\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\\n\\t#ifndef USE_SIZEATTENUATION\\n\\t\\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\\n\\t\\tif ( isPerspective ) scale *= - mvPosition.z;\\n\\t#endif\\n\\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\\n\\tvec2 rotatedPosition;\\n\\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\\n\\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\\n\\tmvPosition.xy += rotatedPosition;\\n\\tgl_Position = projectionMatrix * mvPosition;\\n\\t#include <logdepthbuf_vertex>\\n\\t#include <clipping_planes_vertex>\\n\\t#include <fog_vertex>\\n}\";\n\n\tvar ShaderChunk = {\n\t\talphamap_fragment: alphamap_fragment,\n\t\talphamap_pars_fragment: alphamap_pars_fragment,\n\t\talphatest_fragment: alphatest_fragment,\n\t\taomap_fragment: aomap_fragment,\n\t\taomap_pars_fragment: aomap_pars_fragment,\n\t\tbegin_vertex: begin_vertex,\n\t\tbeginnormal_vertex: beginnormal_vertex,\n\t\tbsdfs: bsdfs,\n\t\tbumpmap_pars_fragment: bumpmap_pars_fragment,\n\t\tclipping_planes_fragment: clipping_planes_fragment,\n\t\tclipping_planes_pars_fragment: clipping_planes_pars_fragment,\n\t\tclipping_planes_pars_vertex: clipping_planes_pars_vertex,\n\t\tclipping_planes_vertex: clipping_planes_vertex,\n\t\tcolor_fragment: color_fragment,\n\t\tcolor_pars_fragment: color_pars_fragment,\n\t\tcolor_pars_vertex: color_pars_vertex,\n\t\tcolor_vertex: color_vertex,\n\t\tcommon: common,\n\t\tcube_uv_reflection_fragment: cube_uv_reflection_fragment,\n\t\tdefaultnormal_vertex: defaultnormal_vertex,\n\t\tdisplacementmap_pars_vertex: displacementmap_pars_vertex,\n\t\tdisplacementmap_vertex: displacementmap_vertex,\n\t\temissivemap_fragment: emissivemap_fragment,\n\t\temissivemap_pars_fragment: emissivemap_pars_fragment,\n\t\tencodings_fragment: encodings_fragment,\n\t\tencodings_pars_fragment: encodings_pars_fragment,\n\t\tenvmap_fragment: envmap_fragment,\n\t\tenvmap_common_pars_fragment: envmap_common_pars_fragment,\n\t\tenvmap_pars_fragment: envmap_pars_fragment,\n\t\tenvmap_pars_vertex: envmap_pars_vertex,\n\t\tenvmap_physical_pars_fragment: envmap_physical_pars_fragment,\n\t\tenvmap_vertex: envmap_vertex,\n\t\tfog_vertex: fog_vertex,\n\t\tfog_pars_vertex: fog_pars_vertex,\n\t\tfog_fragment: fog_fragment,\n\t\tfog_pars_fragment: fog_pars_fragment,\n\t\tgradientmap_pars_fragment: gradientmap_pars_fragment,\n\t\tlightmap_fragment: lightmap_fragment,\n\t\tlightmap_pars_fragment: lightmap_pars_fragment,\n\t\tlights_lambert_vertex: lights_lambert_vertex,\n\t\tlights_pars_begin: lights_pars_begin,\n\t\tlights_toon_fragment: lights_toon_fragment,\n\t\tlights_toon_pars_fragment: lights_toon_pars_fragment,\n\t\tlights_phong_fragment: lights_phong_fragment,\n\t\tlights_phong_pars_fragment: lights_phong_pars_fragment,\n\t\tlights_physical_fragment: lights_physical_fragment,\n\t\tlights_physical_pars_fragment: lights_physical_pars_fragment,\n\t\tlights_fragment_begin: lights_fragment_begin,\n\t\tlights_fragment_maps: lights_fragment_maps,\n\t\tlights_fragment_end: lights_fragment_end,\n\t\tlogdepthbuf_fragment: logdepthbuf_fragment,\n\t\tlogdepthbuf_pars_fragment: logdepthbuf_pars_fragment,\n\t\tlogdepthbuf_pars_vertex: logdepthbuf_pars_vertex,\n\t\tlogdepthbuf_vertex: logdepthbuf_vertex,\n\t\tmap_fragment: map_fragment,\n\t\tmap_pars_fragment: map_pars_fragment,\n\t\tmap_particle_fragment: map_particle_fragment,\n\t\tmap_particle_pars_fragment: map_particle_pars_fragment,\n\t\tmetalnessmap_fragment: metalnessmap_fragment,\n\t\tmetalnessmap_pars_fragment: metalnessmap_pars_fragment,\n\t\tmorphnormal_vertex: morphnormal_vertex,\n\t\tmorphtarget_pars_vertex: morphtarget_pars_vertex,\n\t\tmorphtarget_vertex: morphtarget_vertex,\n\t\tnormal_fragment_begin: normal_fragment_begin,\n\t\tnormal_fragment_maps: normal_fragment_maps,\n\t\tnormalmap_pars_fragment: normalmap_pars_fragment,\n\t\tclearcoat_normal_fragment_begin: clearcoat_normal_fragment_begin,\n\t\tclearcoat_normal_fragment_maps: clearcoat_normal_fragment_maps,\n\t\tclearcoat_pars_fragment: clearcoat_pars_fragment,\n\t\tpacking: packing,\n\t\tpremultiplied_alpha_fragment: premultiplied_alpha_fragment,\n\t\tproject_vertex: project_vertex,\n\t\tdithering_fragment: dithering_fragment,\n\t\tdithering_pars_fragment: dithering_pars_fragment,\n\t\troughnessmap_fragment: roughnessmap_fragment,\n\t\troughnessmap_pars_fragment: roughnessmap_pars_fragment,\n\t\tshadowmap_pars_fragment: shadowmap_pars_fragment,\n\t\tshadowmap_pars_vertex: shadowmap_pars_vertex,\n\t\tshadowmap_vertex: shadowmap_vertex,\n\t\tshadowmask_pars_fragment: shadowmask_pars_fragment,\n\t\tskinbase_vertex: skinbase_vertex,\n\t\tskinning_pars_vertex: skinning_pars_vertex,\n\t\tskinning_vertex: skinning_vertex,\n\t\tskinnormal_vertex: skinnormal_vertex,\n\t\tspecularmap_fragment: specularmap_fragment,\n\t\tspecularmap_pars_fragment: specularmap_pars_fragment,\n\t\ttonemapping_fragment: tonemapping_fragment,\n\t\ttonemapping_pars_fragment: tonemapping_pars_fragment,\n\t\ttransmissionmap_fragment: transmissionmap_fragment,\n\t\ttransmissionmap_pars_fragment: transmissionmap_pars_fragment,\n\t\tuv_pars_fragment: uv_pars_fragment,\n\t\tuv_pars_vertex: uv_pars_vertex,\n\t\tuv_vertex: uv_vertex,\n\t\tuv2_pars_fragment: uv2_pars_fragment,\n\t\tuv2_pars_vertex: uv2_pars_vertex,\n\t\tuv2_vertex: uv2_vertex,\n\t\tworldpos_vertex: worldpos_vertex,\n\t\tbackground_frag: background_frag,\n\t\tbackground_vert: background_vert,\n\t\tcube_frag: cube_frag,\n\t\tcube_vert: cube_vert,\n\t\tdepth_frag: depth_frag,\n\t\tdepth_vert: depth_vert,\n\t\tdistanceRGBA_frag: distanceRGBA_frag,\n\t\tdistanceRGBA_vert: distanceRGBA_vert,\n\t\tequirect_frag: equirect_frag,\n\t\tequirect_vert: equirect_vert,\n\t\tlinedashed_frag: linedashed_frag,\n\t\tlinedashed_vert: linedashed_vert,\n\t\tmeshbasic_frag: meshbasic_frag,\n\t\tmeshbasic_vert: meshbasic_vert,\n\t\tmeshlambert_frag: meshlambert_frag,\n\t\tmeshlambert_vert: meshlambert_vert,\n\t\tmeshmatcap_frag: meshmatcap_frag,\n\t\tmeshmatcap_vert: meshmatcap_vert,\n\t\tmeshtoon_frag: meshtoon_frag,\n\t\tmeshtoon_vert: meshtoon_vert,\n\t\tmeshphong_frag: meshphong_frag,\n\t\tmeshphong_vert: meshphong_vert,\n\t\tmeshphysical_frag: meshphysical_frag,\n\t\tmeshphysical_vert: meshphysical_vert,\n\t\tnormal_frag: normal_frag,\n\t\tnormal_vert: normal_vert,\n\t\tpoints_frag: points_frag,\n\t\tpoints_vert: points_vert,\n\t\tshadow_frag: shadow_frag,\n\t\tshadow_vert: shadow_vert,\n\t\tsprite_frag: sprite_frag,\n\t\tsprite_vert: sprite_vert\n\t};\n\n\t/**\n\t * Uniforms library for shared webgl shaders\n\t */\n\n\tvar UniformsLib = {\n\t\tcommon: {\n\t\t\tdiffuse: {\n\t\t\t\tvalue: new Color(0xeeeeee)\n\t\t\t},\n\t\t\topacity: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tuvTransform: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t},\n\t\t\tuv2Transform: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t},\n\t\t\talphaMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tspecularmap: {\n\t\t\tspecularMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tenvmap: {\n\t\t\tenvMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tflipEnvMap: {\n\t\t\t\tvalue: -1\n\t\t\t},\n\t\t\treflectivity: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\trefractionRatio: {\n\t\t\t\tvalue: 0.98\n\t\t\t},\n\t\t\tmaxMipLevel: {\n\t\t\t\tvalue: 0\n\t\t\t}\n\t\t},\n\t\taomap: {\n\t\t\taoMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\taoMapIntensity: {\n\t\t\t\tvalue: 1\n\t\t\t}\n\t\t},\n\t\tlightmap: {\n\t\t\tlightMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tlightMapIntensity: {\n\t\t\t\tvalue: 1\n\t\t\t}\n\t\t},\n\t\temissivemap: {\n\t\t\temissiveMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tbumpmap: {\n\t\t\tbumpMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tbumpScale: {\n\t\t\t\tvalue: 1\n\t\t\t}\n\t\t},\n\t\tnormalmap: {\n\t\t\tnormalMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tnormalScale: {\n\t\t\t\tvalue: new Vector2(1, 1)\n\t\t\t}\n\t\t},\n\t\tdisplacementmap: {\n\t\t\tdisplacementMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tdisplacementScale: {\n\t\t\t\tvalue: 1\n\t\t\t},\n\t\t\tdisplacementBias: {\n\t\t\t\tvalue: 0\n\t\t\t}\n\t\t},\n\t\troughnessmap: {\n\t\t\troughnessMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tmetalnessmap: {\n\t\t\tmetalnessMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tgradientmap: {\n\t\t\tgradientMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tfog: {\n\t\t\tfogDensity: {\n\t\t\t\tvalue: 0.00025\n\t\t\t},\n\t\t\tfogNear: {\n\t\t\t\tvalue: 1\n\t\t\t},\n\t\t\tfogFar: {\n\t\t\t\tvalue: 2000\n\t\t\t},\n\t\t\tfogColor: {\n\t\t\t\tvalue: new Color(0xffffff)\n\t\t\t}\n\t\t},\n\t\tlights: {\n\t\t\tambientLightColor: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tlightProbe: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tdirectionalLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tdirection: {},\n\t\t\t\t\tcolor: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdirectionalLightShadows: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tshadowBias: {},\n\t\t\t\t\tshadowNormalBias: {},\n\t\t\t\t\tshadowRadius: {},\n\t\t\t\t\tshadowMapSize: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tdirectionalShadowMap: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tdirectionalShadowMatrix: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tspotLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tcolor: {},\n\t\t\t\t\tposition: {},\n\t\t\t\t\tdirection: {},\n\t\t\t\t\tdistance: {},\n\t\t\t\t\tconeCos: {},\n\t\t\t\t\tpenumbraCos: {},\n\t\t\t\t\tdecay: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tspotLightShadows: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tshadowBias: {},\n\t\t\t\t\tshadowNormalBias: {},\n\t\t\t\t\tshadowRadius: {},\n\t\t\t\t\tshadowMapSize: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tspotShadowMap: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tspotShadowMatrix: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tpointLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tcolor: {},\n\t\t\t\t\tposition: {},\n\t\t\t\t\tdecay: {},\n\t\t\t\t\tdistance: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tpointLightShadows: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tshadowBias: {},\n\t\t\t\t\tshadowNormalBias: {},\n\t\t\t\t\tshadowRadius: {},\n\t\t\t\t\tshadowMapSize: {},\n\t\t\t\t\tshadowCameraNear: {},\n\t\t\t\t\tshadowCameraFar: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tpointShadowMap: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\tpointShadowMatrix: {\n\t\t\t\tvalue: []\n\t\t\t},\n\t\t\themisphereLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tdirection: {},\n\t\t\t\t\tskyColor: {},\n\t\t\t\t\tgroundColor: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\t// TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src\n\t\t\trectAreaLights: {\n\t\t\t\tvalue: [],\n\t\t\t\tproperties: {\n\t\t\t\t\tcolor: {},\n\t\t\t\t\tposition: {},\n\t\t\t\t\twidth: {},\n\t\t\t\t\theight: {}\n\t\t\t\t}\n\t\t\t},\n\t\t\tltc_1: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tltc_2: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t},\n\t\tpoints: {\n\t\t\tdiffuse: {\n\t\t\t\tvalue: new Color(0xeeeeee)\n\t\t\t},\n\t\t\topacity: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tscale: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\talphaMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tuvTransform: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t},\n\t\tsprite: {\n\t\t\tdiffuse: {\n\t\t\t\tvalue: new Color(0xeeeeee)\n\t\t\t},\n\t\t\topacity: {\n\t\t\t\tvalue: 1.0\n\t\t\t},\n\t\t\tcenter: {\n\t\t\t\tvalue: new Vector2(0.5, 0.5)\n\t\t\t},\n\t\t\trotation: {\n\t\t\t\tvalue: 0.0\n\t\t\t},\n\t\t\tmap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\talphaMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tuvTransform: {\n\t\t\t\tvalue: new Matrix3()\n\t\t\t}\n\t\t}\n\t};\n\n\tvar ShaderLib = {\n\t\tbasic: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.fog]),\n\t\t\tvertexShader: ShaderChunk.meshbasic_vert,\n\t\t\tfragmentShader: ShaderChunk.meshbasic_frag\n\t\t},\n\t\tlambert: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.fog, UniformsLib.lights, {\n\t\t\t\temissive: {\n\t\t\t\t\tvalue: new Color(0x000000)\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshlambert_vert,\n\t\t\tfragmentShader: ShaderChunk.meshlambert_frag\n\t\t},\n\t\tphong: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.specularmap, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.fog, UniformsLib.lights, {\n\t\t\t\temissive: {\n\t\t\t\t\tvalue: new Color(0x000000)\n\t\t\t\t},\n\t\t\t\tspecular: {\n\t\t\t\t\tvalue: new Color(0x111111)\n\t\t\t\t},\n\t\t\t\tshininess: {\n\t\t\t\t\tvalue: 30\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshphong_vert,\n\t\t\tfragmentShader: ShaderChunk.meshphong_frag\n\t\t},\n\t\tstandard: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.envmap, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.roughnessmap, UniformsLib.metalnessmap, UniformsLib.fog, UniformsLib.lights, {\n\t\t\t\temissive: {\n\t\t\t\t\tvalue: new Color(0x000000)\n\t\t\t\t},\n\t\t\t\troughness: {\n\t\t\t\t\tvalue: 1.0\n\t\t\t\t},\n\t\t\t\tmetalness: {\n\t\t\t\t\tvalue: 0.0\n\t\t\t\t},\n\t\t\t\tenvMapIntensity: {\n\t\t\t\t\tvalue: 1\n\t\t\t\t} // temporary\n\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshphysical_vert,\n\t\t\tfragmentShader: ShaderChunk.meshphysical_frag\n\t\t},\n\t\ttoon: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.aomap, UniformsLib.lightmap, UniformsLib.emissivemap, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.gradientmap, UniformsLib.fog, UniformsLib.lights, {\n\t\t\t\temissive: {\n\t\t\t\t\tvalue: new Color(0x000000)\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshtoon_vert,\n\t\t\tfragmentShader: ShaderChunk.meshtoon_frag\n\t\t},\n\t\tmatcap: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, UniformsLib.fog, {\n\t\t\t\tmatcap: {\n\t\t\t\t\tvalue: null\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.meshmatcap_vert,\n\t\t\tfragmentShader: ShaderChunk.meshmatcap_frag\n\t\t},\n\t\tpoints: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.points, UniformsLib.fog]),\n\t\t\tvertexShader: ShaderChunk.points_vert,\n\t\t\tfragmentShader: ShaderChunk.points_frag\n\t\t},\n\t\tdashed: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.fog, {\n\t\t\t\tscale: {\n\t\t\t\t\tvalue: 1\n\t\t\t\t},\n\t\t\t\tdashSize: {\n\t\t\t\t\tvalue: 1\n\t\t\t\t},\n\t\t\t\ttotalSize: {\n\t\t\t\t\tvalue: 2\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.linedashed_vert,\n\t\t\tfragmentShader: ShaderChunk.linedashed_frag\n\t\t},\n\t\tdepth: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.displacementmap]),\n\t\t\tvertexShader: ShaderChunk.depth_vert,\n\t\t\tfragmentShader: ShaderChunk.depth_frag\n\t\t},\n\t\tnormal: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.bumpmap, UniformsLib.normalmap, UniformsLib.displacementmap, {\n\t\t\t\topacity: {\n\t\t\t\t\tvalue: 1.0\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.normal_vert,\n\t\t\tfragmentShader: ShaderChunk.normal_frag\n\t\t},\n\t\tsprite: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.sprite, UniformsLib.fog]),\n\t\t\tvertexShader: ShaderChunk.sprite_vert,\n\t\t\tfragmentShader: ShaderChunk.sprite_frag\n\t\t},\n\t\tbackground: {\n\t\t\tuniforms: {\n\t\t\t\tuvTransform: {\n\t\t\t\t\tvalue: new Matrix3()\n\t\t\t\t},\n\t\t\t\tt2D: {\n\t\t\t\t\tvalue: null\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: ShaderChunk.background_vert,\n\t\t\tfragmentShader: ShaderChunk.background_frag\n\t\t},\n\n\t\t/* -------------------------------------------------------------------------\n\t\t//\tCube map shader\n\t\t ------------------------------------------------------------------------- */\n\t\tcube: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.envmap, {\n\t\t\t\topacity: {\n\t\t\t\t\tvalue: 1.0\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.cube_vert,\n\t\t\tfragmentShader: ShaderChunk.cube_frag\n\t\t},\n\t\tequirect: {\n\t\t\tuniforms: {\n\t\t\t\ttEquirect: {\n\t\t\t\t\tvalue: null\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: ShaderChunk.equirect_vert,\n\t\t\tfragmentShader: ShaderChunk.equirect_frag\n\t\t},\n\t\tdistanceRGBA: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.common, UniformsLib.displacementmap, {\n\t\t\t\treferencePosition: {\n\t\t\t\t\tvalue: new Vector3()\n\t\t\t\t},\n\t\t\t\tnearDistance: {\n\t\t\t\t\tvalue: 1\n\t\t\t\t},\n\t\t\t\tfarDistance: {\n\t\t\t\t\tvalue: 1000\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.distanceRGBA_vert,\n\t\t\tfragmentShader: ShaderChunk.distanceRGBA_frag\n\t\t},\n\t\tshadow: {\n\t\t\tuniforms: mergeUniforms([UniformsLib.lights, UniformsLib.fog, {\n\t\t\t\tcolor: {\n\t\t\t\t\tvalue: new Color(0x00000)\n\t\t\t\t},\n\t\t\t\topacity: {\n\t\t\t\t\tvalue: 1.0\n\t\t\t\t}\n\t\t\t}]),\n\t\t\tvertexShader: ShaderChunk.shadow_vert,\n\t\t\tfragmentShader: ShaderChunk.shadow_frag\n\t\t}\n\t};\n\tShaderLib.physical = {\n\t\tuniforms: mergeUniforms([ShaderLib.standard.uniforms, {\n\t\t\tclearcoat: {\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\tclearcoatMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tclearcoatRoughness: {\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\tclearcoatRoughnessMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tclearcoatNormalScale: {\n\t\t\t\tvalue: new Vector2(1, 1)\n\t\t\t},\n\t\t\tclearcoatNormalMap: {\n\t\t\t\tvalue: null\n\t\t\t},\n\t\t\tsheen: {\n\t\t\t\tvalue: new Color(0x000000)\n\t\t\t},\n\t\t\ttransmission: {\n\t\t\t\tvalue: 0\n\t\t\t},\n\t\t\ttransmissionMap: {\n\t\t\t\tvalue: null\n\t\t\t}\n\t\t}]),\n\t\tvertexShader: ShaderChunk.meshphysical_vert,\n\t\tfragmentShader: ShaderChunk.meshphysical_frag\n\t};\n\n\tfunction WebGLBackground(renderer, cubemaps, state, objects, premultipliedAlpha) {\n\t\tvar clearColor = new Color(0x000000);\n\t\tvar clearAlpha = 0;\n\t\tvar planeMesh;\n\t\tvar boxMesh;\n\t\tvar currentBackground = null;\n\t\tvar currentBackgroundVersion = 0;\n\t\tvar currentTonemapping = null;\n\n\t\tfunction render(renderList, scene, camera, forceClear) {\n\t\t\tvar background = scene.isScene === true ? scene.background : null;\n\n\t\t\tif (background && background.isTexture) {\n\t\t\t\tbackground = cubemaps.get(background);\n\t\t\t} // Ignore background in AR\n\t\t\t// TODO: Reconsider this.\n\n\n\t\t\tvar xr = renderer.xr;\n\t\t\tvar session = xr.getSession && xr.getSession();\n\n\t\t\tif (session && session.environmentBlendMode === 'additive') {\n\t\t\t\tbackground = null;\n\t\t\t}\n\n\t\t\tif (background === null) {\n\t\t\t\tsetClear(clearColor, clearAlpha);\n\t\t\t} else if (background && background.isColor) {\n\t\t\t\tsetClear(background, 1);\n\t\t\t\tforceClear = true;\n\t\t\t}\n\n\t\t\tif (renderer.autoClear || forceClear) {\n\t\t\t\trenderer.clear(renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil);\n\t\t\t}\n\n\t\t\tif (background && (background.isCubeTexture || background.isWebGLCubeRenderTarget || background.mapping === CubeUVReflectionMapping)) {\n\t\t\t\tif (boxMesh === undefined) {\n\t\t\t\t\tboxMesh = new Mesh(new BoxGeometry(1, 1, 1), new ShaderMaterial({\n\t\t\t\t\t\tname: 'BackgroundCubeMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms(ShaderLib.cube.uniforms),\n\t\t\t\t\t\tvertexShader: ShaderLib.cube.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.cube.fragmentShader,\n\t\t\t\t\t\tside: BackSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t}));\n\t\t\t\t\tboxMesh.geometry.deleteAttribute('normal');\n\t\t\t\t\tboxMesh.geometry.deleteAttribute('uv');\n\n\t\t\t\t\tboxMesh.onBeforeRender = function (renderer, scene, camera) {\n\t\t\t\t\t\tthis.matrixWorld.copyPosition(camera.matrixWorld);\n\t\t\t\t\t}; // enable code injection for non-built-in material\n\n\n\t\t\t\t\tObject.defineProperty(boxMesh.material, 'envMap', {\n\t\t\t\t\t\tget: function get() {\n\t\t\t\t\t\t\treturn this.uniforms.envMap.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tobjects.update(boxMesh);\n\t\t\t\t}\n\n\t\t\t\tif (background.isWebGLCubeRenderTarget) {\n\t\t\t\t\t// TODO Deprecate\n\t\t\t\t\tbackground = background.texture;\n\t\t\t\t}\n\n\t\t\t\tboxMesh.material.uniforms.envMap.value = background;\n\t\t\t\tboxMesh.material.uniforms.flipEnvMap.value = background.isCubeTexture && background._needsFlipEnvMap ? -1 : 1;\n\n\t\t\t\tif (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) {\n\t\t\t\t\tboxMesh.material.needsUpdate = true;\n\t\t\t\t\tcurrentBackground = background;\n\t\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\t\t\t\t} // push to the pre-sorted opaque render list\n\n\n\t\t\t\trenderList.unshift(boxMesh, boxMesh.geometry, boxMesh.material, 0, 0, null);\n\t\t\t} else if (background && background.isTexture) {\n\t\t\t\tif (planeMesh === undefined) {\n\t\t\t\t\tplaneMesh = new Mesh(new PlaneGeometry(2, 2), new ShaderMaterial({\n\t\t\t\t\t\tname: 'BackgroundMaterial',\n\t\t\t\t\t\tuniforms: cloneUniforms(ShaderLib.background.uniforms),\n\t\t\t\t\t\tvertexShader: ShaderLib.background.vertexShader,\n\t\t\t\t\t\tfragmentShader: ShaderLib.background.fragmentShader,\n\t\t\t\t\t\tside: FrontSide,\n\t\t\t\t\t\tdepthTest: false,\n\t\t\t\t\t\tdepthWrite: false,\n\t\t\t\t\t\tfog: false\n\t\t\t\t\t}));\n\t\t\t\t\tplaneMesh.geometry.deleteAttribute('normal'); // enable code injection for non-built-in material\n\n\t\t\t\t\tObject.defineProperty(planeMesh.material, 'map', {\n\t\t\t\t\t\tget: function get() {\n\t\t\t\t\t\t\treturn this.uniforms.t2D.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tobjects.update(planeMesh);\n\t\t\t\t}\n\n\t\t\t\tplaneMesh.material.uniforms.t2D.value = background;\n\n\t\t\t\tif (background.matrixAutoUpdate === true) {\n\t\t\t\t\tbackground.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tplaneMesh.material.uniforms.uvTransform.value.copy(background.matrix);\n\n\t\t\t\tif (currentBackground !== background || currentBackgroundVersion !== background.version || currentTonemapping !== renderer.toneMapping) {\n\t\t\t\t\tplaneMesh.material.needsUpdate = true;\n\t\t\t\t\tcurrentBackground = background;\n\t\t\t\t\tcurrentBackgroundVersion = background.version;\n\t\t\t\t\tcurrentTonemapping = renderer.toneMapping;\n\t\t\t\t} // push to the pre-sorted opaque render list\n\n\n\t\t\t\trenderList.unshift(planeMesh, planeMesh.geometry, planeMesh.material, 0, 0, null);\n\t\t\t}\n\t\t}\n\n\t\tfunction setClear(color, alpha) {\n\t\t\tstate.buffers.color.setClear(color.r, color.g, color.b, alpha, premultipliedAlpha);\n\t\t}\n\n\t\treturn {\n\t\t\tgetClearColor: function getClearColor() {\n\t\t\t\treturn clearColor;\n\t\t\t},\n\t\t\tsetClearColor: function setClearColor(color, alpha) {\n\t\t\t\tif (alpha === void 0) {\n\t\t\t\t\talpha = 1;\n\t\t\t\t}\n\n\t\t\t\tclearColor.set(color);\n\t\t\t\tclearAlpha = alpha;\n\t\t\t\tsetClear(clearColor, clearAlpha);\n\t\t\t},\n\t\t\tgetClearAlpha: function getClearAlpha() {\n\t\t\t\treturn clearAlpha;\n\t\t\t},\n\t\t\tsetClearAlpha: function setClearAlpha(alpha) {\n\t\t\t\tclearAlpha = alpha;\n\t\t\t\tsetClear(clearColor, clearAlpha);\n\t\t\t},\n\t\t\trender: render\n\t\t};\n\t}\n\n\tfunction WebGLBindingStates(gl, extensions, attributes, capabilities) {\n\t\tvar maxVertexAttributes = gl.getParameter(34921);\n\t\tvar extension = capabilities.isWebGL2 ? null : extensions.get('OES_vertex_array_object');\n\t\tvar vaoAvailable = capabilities.isWebGL2 || extension !== null;\n\t\tvar bindingStates = {};\n\t\tvar defaultState = createBindingState(null);\n\t\tvar currentState = defaultState;\n\n\t\tfunction setup(object, material, program, geometry, index) {\n\t\t\tvar updateBuffers = false;\n\n\t\t\tif (vaoAvailable) {\n\t\t\t\tvar state = getBindingState(geometry, program, material);\n\n\t\t\t\tif (currentState !== state) {\n\t\t\t\t\tcurrentState = state;\n\t\t\t\t\tbindVertexArrayObject(currentState.object);\n\t\t\t\t}\n\n\t\t\t\tupdateBuffers = needsUpdate(geometry, index);\n\t\t\t\tif (updateBuffers) saveCache(geometry, index);\n\t\t\t} else {\n\t\t\t\tvar wireframe = material.wireframe === true;\n\n\t\t\t\tif (currentState.geometry !== geometry.id || currentState.program !== program.id || currentState.wireframe !== wireframe) {\n\t\t\t\t\tcurrentState.geometry = geometry.id;\n\t\t\t\t\tcurrentState.program = program.id;\n\t\t\t\t\tcurrentState.wireframe = wireframe;\n\t\t\t\t\tupdateBuffers = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (object.isInstancedMesh === true) {\n\t\t\t\tupdateBuffers = true;\n\t\t\t}\n\n\t\t\tif (index !== null) {\n\t\t\t\tattributes.update(index, 34963);\n\t\t\t}\n\n\t\t\tif (updateBuffers) {\n\t\t\t\tsetupVertexAttributes(object, material, program, geometry);\n\n\t\t\t\tif (index !== null) {\n\t\t\t\t\tgl.bindBuffer(34963, attributes.get(index).buffer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction createVertexArrayObject() {\n\t\t\tif (capabilities.isWebGL2) return gl.createVertexArray();\n\t\t\treturn extension.createVertexArrayOES();\n\t\t}\n\n\t\tfunction bindVertexArrayObject(vao) {\n\t\t\tif (capabilities.isWebGL2) return gl.bindVertexArray(vao);\n\t\t\treturn extension.bindVertexArrayOES(vao);\n\t\t}\n\n\t\tfunction deleteVertexArrayObject(vao) {\n\t\t\tif (capabilities.isWebGL2) return gl.deleteVertexArray(vao);\n\t\t\treturn extension.deleteVertexArrayOES(vao);\n\t\t}\n\n\t\tfunction getBindingState(geometry, program, material) {\n\t\t\tvar wireframe = material.wireframe === true;\n\t\t\tvar programMap = bindingStates[geometry.id];\n\n\t\t\tif (programMap === undefined) {\n\t\t\t\tprogramMap = {};\n\t\t\t\tbindingStates[geometry.id] = programMap;\n\t\t\t}\n\n\t\t\tvar stateMap = programMap[program.id];\n\n\t\t\tif (stateMap === undefined) {\n\t\t\t\tstateMap = {};\n\t\t\t\tprogramMap[program.id] = stateMap;\n\t\t\t}\n\n\t\t\tvar state = stateMap[wireframe];\n\n\t\t\tif (state === undefined) {\n\t\t\t\tstate = createBindingState(createVertexArrayObject());\n\t\t\t\tstateMap[wireframe] = state;\n\t\t\t}\n\n\t\t\treturn state;\n\t\t}\n\n\t\tfunction createBindingState(vao) {\n\t\t\tvar newAttributes = [];\n\t\t\tvar enabledAttributes = [];\n\t\t\tvar attributeDivisors = [];\n\n\t\t\tfor (var i = 0; i < maxVertexAttributes; i++) {\n\t\t\t\tnewAttributes[i] = 0;\n\t\t\t\tenabledAttributes[i] = 0;\n\t\t\t\tattributeDivisors[i] = 0;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t// for backward compatibility on non-VAO support browser\n\t\t\t\tgeometry: null,\n\t\t\t\tprogram: null,\n\t\t\t\twireframe: false,\n\t\t\t\tnewAttributes: newAttributes,\n\t\t\t\tenabledAttributes: enabledAttributes,\n\t\t\t\tattributeDivisors: attributeDivisors,\n\t\t\t\tobject: vao,\n\t\t\t\tattributes: {},\n\t\t\t\tindex: null\n\t\t\t};\n\t\t}\n\n\t\tfunction needsUpdate(geometry, index) {\n\t\t\tvar cachedAttributes = currentState.attributes;\n\t\t\tvar geometryAttributes = geometry.attributes;\n\t\t\tvar attributesNum = 0;\n\n\t\t\tfor (var key in geometryAttributes) {\n\t\t\t\tvar cachedAttribute = cachedAttributes[key];\n\t\t\t\tvar geometryAttribute = geometryAttributes[key];\n\t\t\t\tif (cachedAttribute === undefined) return true;\n\t\t\t\tif (cachedAttribute.attribute !== geometryAttribute) return true;\n\t\t\t\tif (cachedAttribute.data !== geometryAttribute.data) return true;\n\t\t\t\tattributesNum++;\n\t\t\t}\n\n\t\t\tif (currentState.attributesNum !== attributesNum) return true;\n\t\t\tif (currentState.index !== index) return true;\n\t\t\treturn false;\n\t\t}\n\n\t\tfunction saveCache(geometry, index) {\n\t\t\tvar cache = {};\n\t\t\tvar attributes = geometry.attributes;\n\t\t\tvar attributesNum = 0;\n\n\t\t\tfor (var key in attributes) {\n\t\t\t\tvar attribute = attributes[key];\n\t\t\t\tvar data = {};\n\t\t\t\tdata.attribute = attribute;\n\n\t\t\t\tif (attribute.data) {\n\t\t\t\t\tdata.data = attribute.data;\n\t\t\t\t}\n\n\t\t\t\tcache[key] = data;\n\t\t\t\tattributesNum++;\n\t\t\t}\n\n\t\t\tcurrentState.attributes = cache;\n\t\t\tcurrentState.attributesNum = attributesNum;\n\t\t\tcurrentState.index = index;\n\t\t}\n\n\t\tfunction initAttributes() {\n\t\t\tvar newAttributes = currentState.newAttributes;\n\n\t\t\tfor (var i = 0, il = newAttributes.length; i < il; i++) {\n\t\t\t\tnewAttributes[i] = 0;\n\t\t\t}\n\t\t}\n\n\t\tfunction enableAttribute(attribute) {\n\t\t\tenableAttributeAndDivisor(attribute, 0);\n\t\t}\n\n\t\tfunction enableAttributeAndDivisor(attribute, meshPerAttribute) {\n\t\t\tvar newAttributes = currentState.newAttributes;\n\t\t\tvar enabledAttributes = currentState.enabledAttributes;\n\t\t\tvar attributeDivisors = currentState.attributeDivisors;\n\t\t\tnewAttributes[attribute] = 1;\n\n\t\t\tif (enabledAttributes[attribute] === 0) {\n\t\t\t\tgl.enableVertexAttribArray(attribute);\n\t\t\t\tenabledAttributes[attribute] = 1;\n\t\t\t}\n\n\t\t\tif (attributeDivisors[attribute] !== meshPerAttribute) {\n\t\t\t\tvar _extension = capabilities.isWebGL2 ? gl : extensions.get('ANGLE_instanced_arrays');\n\n\t\t\t\t_extension[capabilities.isWebGL2 ? 'vertexAttribDivisor' : 'vertexAttribDivisorANGLE'](attribute, meshPerAttribute);\n\n\t\t\t\tattributeDivisors[attribute] = meshPerAttribute;\n\t\t\t}\n\t\t}\n\n\t\tfunction disableUnusedAttributes() {\n\t\t\tvar newAttributes = currentState.newAttributes;\n\t\t\tvar enabledAttributes = currentState.enabledAttributes;\n\n\t\t\tfor (var i = 0, il = enabledAttributes.length; i < il; i++) {\n\t\t\t\tif (enabledAttributes[i] !== newAttributes[i]) {\n\t\t\t\t\tgl.disableVertexAttribArray(i);\n\t\t\t\t\tenabledAttributes[i] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction vertexAttribPointer(index, size, type, normalized, stride, offset) {\n\t\t\tif (capabilities.isWebGL2 === true && (type === 5124 || type === 5125)) {\n\t\t\t\tgl.vertexAttribIPointer(index, size, type, stride, offset);\n\t\t\t} else {\n\t\t\t\tgl.vertexAttribPointer(index, size, type, normalized, stride, offset);\n\t\t\t}\n\t\t}\n\n\t\tfunction setupVertexAttributes(object, material, program, geometry) {\n\t\t\tif (capabilities.isWebGL2 === false && (object.isInstancedMesh || geometry.isInstancedBufferGeometry)) {\n\t\t\t\tif (extensions.get('ANGLE_instanced_arrays') === null) return;\n\t\t\t}\n\n\t\t\tinitAttributes();\n\t\t\tvar geometryAttributes = geometry.attributes;\n\t\t\tvar programAttributes = program.getAttributes();\n\t\t\tvar materialDefaultAttributeValues = material.defaultAttributeValues;\n\n\t\t\tfor (var name in programAttributes) {\n\t\t\t\tvar programAttribute = programAttributes[name];\n\n\t\t\t\tif (programAttribute >= 0) {\n\t\t\t\t\tvar geometryAttribute = geometryAttributes[name];\n\n\t\t\t\t\tif (geometryAttribute !== undefined) {\n\t\t\t\t\t\tvar normalized = geometryAttribute.normalized;\n\t\t\t\t\t\tvar size = geometryAttribute.itemSize;\n\t\t\t\t\t\tvar attribute = attributes.get(geometryAttribute); // TODO Attribute may not be available on context restore\n\n\t\t\t\t\t\tif (attribute === undefined) continue;\n\t\t\t\t\t\tvar buffer = attribute.buffer;\n\t\t\t\t\t\tvar type = attribute.type;\n\t\t\t\t\t\tvar bytesPerElement = attribute.bytesPerElement;\n\n\t\t\t\t\t\tif (geometryAttribute.isInterleavedBufferAttribute) {\n\t\t\t\t\t\t\tvar data = geometryAttribute.data;\n\t\t\t\t\t\t\tvar stride = data.stride;\n\t\t\t\t\t\t\tvar offset = geometryAttribute.offset;\n\n\t\t\t\t\t\t\tif (data && data.isInstancedInterleavedBuffer) {\n\t\t\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute, data.meshPerAttribute);\n\n\t\t\t\t\t\t\t\tif (geometry._maxInstanceCount === undefined) {\n\t\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = data.meshPerAttribute * data.count;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tenableAttribute(programAttribute);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgl.bindBuffer(34962, buffer);\n\t\t\t\t\t\t\tvertexAttribPointer(programAttribute, size, type, normalized, stride * bytesPerElement, offset * bytesPerElement);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (geometryAttribute.isInstancedBufferAttribute) {\n\t\t\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute, geometryAttribute.meshPerAttribute);\n\n\t\t\t\t\t\t\t\tif (geometry._maxInstanceCount === undefined) {\n\t\t\t\t\t\t\t\t\tgeometry._maxInstanceCount = geometryAttribute.meshPerAttribute * geometryAttribute.count;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tenableAttribute(programAttribute);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgl.bindBuffer(34962, buffer);\n\t\t\t\t\t\t\tvertexAttribPointer(programAttribute, size, type, normalized, 0, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (name === 'instanceMatrix') {\n\t\t\t\t\t\tvar _attribute = attributes.get(object.instanceMatrix); // TODO Attribute may not be available on context restore\n\n\n\t\t\t\t\t\tif (_attribute === undefined) continue;\n\t\t\t\t\t\tvar _buffer = _attribute.buffer;\n\t\t\t\t\t\tvar _type = _attribute.type;\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute + 0, 1);\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute + 1, 1);\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute + 2, 1);\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute + 3, 1);\n\t\t\t\t\t\tgl.bindBuffer(34962, _buffer);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute + 0, 4, _type, false, 64, 0);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute + 1, 4, _type, false, 64, 16);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute + 2, 4, _type, false, 64, 32);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute + 3, 4, _type, false, 64, 48);\n\t\t\t\t\t} else if (name === 'instanceColor') {\n\t\t\t\t\t\tvar _attribute2 = attributes.get(object.instanceColor); // TODO Attribute may not be available on context restore\n\n\n\t\t\t\t\t\tif (_attribute2 === undefined) continue;\n\t\t\t\t\t\tvar _buffer2 = _attribute2.buffer;\n\t\t\t\t\t\tvar _type2 = _attribute2.type;\n\t\t\t\t\t\tenableAttributeAndDivisor(programAttribute, 1);\n\t\t\t\t\t\tgl.bindBuffer(34962, _buffer2);\n\t\t\t\t\t\tgl.vertexAttribPointer(programAttribute, 3, _type2, false, 12, 0);\n\t\t\t\t\t} else if (materialDefaultAttributeValues !== undefined) {\n\t\t\t\t\t\tvar value = materialDefaultAttributeValues[name];\n\n\t\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\t\tswitch (value.length) {\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\tgl.vertexAttrib2fv(programAttribute, value);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\tgl.vertexAttrib3fv(programAttribute, value);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\tgl.vertexAttrib4fv(programAttribute, value);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tgl.vertexAttrib1fv(programAttribute, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdisableUnusedAttributes();\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\treset();\n\n\t\t\tfor (var geometryId in bindingStates) {\n\t\t\t\tvar programMap = bindingStates[geometryId];\n\n\t\t\t\tfor (var programId in programMap) {\n\t\t\t\t\tvar stateMap = programMap[programId];\n\n\t\t\t\t\tfor (var wireframe in stateMap) {\n\t\t\t\t\t\tdeleteVertexArrayObject(stateMap[wireframe].object);\n\t\t\t\t\t\tdelete stateMap[wireframe];\n\t\t\t\t\t}\n\n\t\t\t\t\tdelete programMap[programId];\n\t\t\t\t}\n\n\t\t\t\tdelete bindingStates[geometryId];\n\t\t\t}\n\t\t}\n\n\t\tfunction releaseStatesOfGeometry(geometry) {\n\t\t\tif (bindingStates[geometry.id] === undefined) return;\n\t\t\tvar programMap = bindingStates[geometry.id];\n\n\t\t\tfor (var programId in programMap) {\n\t\t\t\tvar stateMap = programMap[programId];\n\n\t\t\t\tfor (var wireframe in stateMap) {\n\t\t\t\t\tdeleteVertexArrayObject(stateMap[wireframe].object);\n\t\t\t\t\tdelete stateMap[wireframe];\n\t\t\t\t}\n\n\t\t\t\tdelete programMap[programId];\n\t\t\t}\n\n\t\t\tdelete bindingStates[geometry.id];\n\t\t}\n\n\t\tfunction releaseStatesOfProgram(program) {\n\t\t\tfor (var geometryId in bindingStates) {\n\t\t\t\tvar programMap = bindingStates[geometryId];\n\t\t\t\tif (programMap[program.id] === undefined) continue;\n\t\t\t\tvar stateMap = programMap[program.id];\n\n\t\t\t\tfor (var wireframe in stateMap) {\n\t\t\t\t\tdeleteVertexArrayObject(stateMap[wireframe].object);\n\t\t\t\t\tdelete stateMap[wireframe];\n\t\t\t\t}\n\n\t\t\t\tdelete programMap[program.id];\n\t\t\t}\n\t\t}\n\n\t\tfunction reset() {\n\t\t\tresetDefaultState();\n\t\t\tif (currentState === defaultState) return;\n\t\t\tcurrentState = defaultState;\n\t\t\tbindVertexArrayObject(currentState.object);\n\t\t} // for backward-compatilibity\n\n\n\t\tfunction resetDefaultState() {\n\t\t\tdefaultState.geometry = null;\n\t\t\tdefaultState.program = null;\n\t\t\tdefaultState.wireframe = false;\n\t\t}\n\n\t\treturn {\n\t\t\tsetup: setup,\n\t\t\treset: reset,\n\t\t\tresetDefaultState: resetDefaultState,\n\t\t\tdispose: dispose,\n\t\t\treleaseStatesOfGeometry: releaseStatesOfGeometry,\n\t\t\treleaseStatesOfProgram: releaseStatesOfProgram,\n\t\t\tinitAttributes: initAttributes,\n\t\t\tenableAttribute: enableAttribute,\n\t\t\tdisableUnusedAttributes: disableUnusedAttributes\n\t\t};\n\t}\n\n\tfunction WebGLBufferRenderer(gl, extensions, info, capabilities) {\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar mode;\n\n\t\tfunction setMode(value) {\n\t\t\tmode = value;\n\t\t}\n\n\t\tfunction render(start, count) {\n\t\t\tgl.drawArrays(mode, start, count);\n\t\t\tinfo.update(count, mode, 1);\n\t\t}\n\n\t\tfunction renderInstances(start, count, primcount) {\n\t\t\tif (primcount === 0) return;\n\t\t\tvar extension, methodName;\n\n\t\t\tif (isWebGL2) {\n\t\t\t\textension = gl;\n\t\t\t\tmethodName = 'drawArraysInstanced';\n\t\t\t} else {\n\t\t\t\textension = extensions.get('ANGLE_instanced_arrays');\n\t\t\t\tmethodName = 'drawArraysInstancedANGLE';\n\n\t\t\t\tif (extension === null) {\n\t\t\t\t\tconsole.error('THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\textension[methodName](mode, start, count, primcount);\n\t\t\tinfo.update(count, mode, primcount);\n\t\t} //\n\n\n\t\tthis.setMode = setMode;\n\t\tthis.render = render;\n\t\tthis.renderInstances = renderInstances;\n\t}\n\n\tfunction WebGLCapabilities(gl, extensions, parameters) {\n\t\tvar maxAnisotropy;\n\n\t\tfunction getMaxAnisotropy() {\n\t\t\tif (maxAnisotropy !== undefined) return maxAnisotropy;\n\t\t\tvar extension = extensions.get('EXT_texture_filter_anisotropic');\n\n\t\t\tif (extension !== null) {\n\t\t\t\tmaxAnisotropy = gl.getParameter(extension.MAX_TEXTURE_MAX_ANISOTROPY_EXT);\n\t\t\t} else {\n\t\t\t\tmaxAnisotropy = 0;\n\t\t\t}\n\n\t\t\treturn maxAnisotropy;\n\t\t}\n\n\t\tfunction getMaxPrecision(precision) {\n\t\t\tif (precision === 'highp') {\n\t\t\t\tif (gl.getShaderPrecisionFormat(35633, 36338).precision > 0 && gl.getShaderPrecisionFormat(35632, 36338).precision > 0) {\n\t\t\t\t\treturn 'highp';\n\t\t\t\t}\n\n\t\t\t\tprecision = 'mediump';\n\t\t\t}\n\n\t\t\tif (precision === 'mediump') {\n\t\t\t\tif (gl.getShaderPrecisionFormat(35633, 36337).precision > 0 && gl.getShaderPrecisionFormat(35632, 36337).precision > 0) {\n\t\t\t\t\treturn 'mediump';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn 'lowp';\n\t\t}\n\t\t/* eslint-disable no-undef */\n\n\n\t\tvar isWebGL2 = typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext || typeof WebGL2ComputeRenderingContext !== 'undefined' && gl instanceof WebGL2ComputeRenderingContext;\n\t\t/* eslint-enable no-undef */\n\n\t\tvar precision = parameters.precision !== undefined ? parameters.precision : 'highp';\n\t\tvar maxPrecision = getMaxPrecision(precision);\n\n\t\tif (maxPrecision !== precision) {\n\t\t\tconsole.warn('THREE.WebGLRenderer:', precision, 'not supported, using', maxPrecision, 'instead.');\n\t\t\tprecision = maxPrecision;\n\t\t}\n\n\t\tvar logarithmicDepthBuffer = parameters.logarithmicDepthBuffer === true;\n\t\tvar maxTextures = gl.getParameter(34930);\n\t\tvar maxVertexTextures = gl.getParameter(35660);\n\t\tvar maxTextureSize = gl.getParameter(3379);\n\t\tvar maxCubemapSize = gl.getParameter(34076);\n\t\tvar maxAttributes = gl.getParameter(34921);\n\t\tvar maxVertexUniforms = gl.getParameter(36347);\n\t\tvar maxVaryings = gl.getParameter(36348);\n\t\tvar maxFragmentUniforms = gl.getParameter(36349);\n\t\tvar vertexTextures = maxVertexTextures > 0;\n\t\tvar floatFragmentTextures = isWebGL2 || !!extensions.get('OES_texture_float');\n\t\tvar floatVertexTextures = vertexTextures && floatFragmentTextures;\n\t\tvar maxSamples = isWebGL2 ? gl.getParameter(36183) : 0;\n\t\treturn {\n\t\t\tisWebGL2: isWebGL2,\n\t\t\tgetMaxAnisotropy: getMaxAnisotropy,\n\t\t\tgetMaxPrecision: getMaxPrecision,\n\t\t\tprecision: precision,\n\t\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\t\t\tmaxTextures: maxTextures,\n\t\t\tmaxVertexTextures: maxVertexTextures,\n\t\t\tmaxTextureSize: maxTextureSize,\n\t\t\tmaxCubemapSize: maxCubemapSize,\n\t\t\tmaxAttributes: maxAttributes,\n\t\t\tmaxVertexUniforms: maxVertexUniforms,\n\t\t\tmaxVaryings: maxVaryings,\n\t\t\tmaxFragmentUniforms: maxFragmentUniforms,\n\t\t\tvertexTextures: vertexTextures,\n\t\t\tfloatFragmentTextures: floatFragmentTextures,\n\t\t\tfloatVertexTextures: floatVertexTextures,\n\t\t\tmaxSamples: maxSamples\n\t\t};\n\t}\n\n\tfunction WebGLClipping(properties) {\n\t\tvar scope = this;\n\t\tvar globalState = null,\n\t\t\t\tnumGlobalPlanes = 0,\n\t\t\t\tlocalClippingEnabled = false,\n\t\t\t\trenderingShadows = false;\n\t\tvar plane = new Plane(),\n\t\t\t\tviewNormalMatrix = new Matrix3(),\n\t\t\t\tuniform = {\n\t\t\tvalue: null,\n\t\t\tneedsUpdate: false\n\t\t};\n\t\tthis.uniform = uniform;\n\t\tthis.numPlanes = 0;\n\t\tthis.numIntersection = 0;\n\n\t\tthis.init = function (planes, enableLocalClipping, camera) {\n\t\t\tvar enabled = planes.length !== 0 || enableLocalClipping || // enable state of previous frame - the clipping code has to\n\t\t\t// run another frame in order to reset the state:\n\t\t\tnumGlobalPlanes !== 0 || localClippingEnabled;\n\t\t\tlocalClippingEnabled = enableLocalClipping;\n\t\t\tglobalState = projectPlanes(planes, camera, 0);\n\t\t\tnumGlobalPlanes = planes.length;\n\t\t\treturn enabled;\n\t\t};\n\n\t\tthis.beginShadows = function () {\n\t\t\trenderingShadows = true;\n\t\t\tprojectPlanes(null);\n\t\t};\n\n\t\tthis.endShadows = function () {\n\t\t\trenderingShadows = false;\n\t\t\tresetGlobalState();\n\t\t};\n\n\t\tthis.setState = function (material, camera, useCache) {\n\t\t\tvar planes = material.clippingPlanes,\n\t\t\t\t\tclipIntersection = material.clipIntersection,\n\t\t\t\t\tclipShadows = material.clipShadows;\n\t\t\tvar materialProperties = properties.get(material);\n\n\t\t\tif (!localClippingEnabled || planes === null || planes.length === 0 || renderingShadows && !clipShadows) {\n\t\t\t\t// there's no local clipping\n\t\t\t\tif (renderingShadows) {\n\t\t\t\t\t// there's no global clipping\n\t\t\t\t\tprojectPlanes(null);\n\t\t\t\t} else {\n\t\t\t\t\tresetGlobalState();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar nGlobal = renderingShadows ? 0 : numGlobalPlanes,\n\t\t\t\t\t\tlGlobal = nGlobal * 4;\n\t\t\t\tvar dstArray = materialProperties.clippingState || null;\n\t\t\t\tuniform.value = dstArray; // ensure unique state\n\n\t\t\t\tdstArray = projectPlanes(planes, camera, lGlobal, useCache);\n\n\t\t\t\tfor (var i = 0; i !== lGlobal; ++i) {\n\t\t\t\t\tdstArray[i] = globalState[i];\n\t\t\t\t}\n\n\t\t\t\tmaterialProperties.clippingState = dstArray;\n\t\t\t\tthis.numIntersection = clipIntersection ? this.numPlanes : 0;\n\t\t\t\tthis.numPlanes += nGlobal;\n\t\t\t}\n\t\t};\n\n\t\tfunction resetGlobalState() {\n\t\t\tif (uniform.value !== globalState) {\n\t\t\t\tuniform.value = globalState;\n\t\t\t\tuniform.needsUpdate = numGlobalPlanes > 0;\n\t\t\t}\n\n\t\t\tscope.numPlanes = numGlobalPlanes;\n\t\t\tscope.numIntersection = 0;\n\t\t}\n\n\t\tfunction projectPlanes(planes, camera, dstOffset, skipTransform) {\n\t\t\tvar nPlanes = planes !== null ? planes.length : 0;\n\t\t\tvar dstArray = null;\n\n\t\t\tif (nPlanes !== 0) {\n\t\t\t\tdstArray = uniform.value;\n\n\t\t\t\tif (skipTransform !== true || dstArray === null) {\n\t\t\t\t\tvar flatSize = dstOffset + nPlanes * 4,\n\t\t\t\t\t\t\tviewMatrix = camera.matrixWorldInverse;\n\t\t\t\t\tviewNormalMatrix.getNormalMatrix(viewMatrix);\n\n\t\t\t\t\tif (dstArray === null || dstArray.length < flatSize) {\n\t\t\t\t\t\tdstArray = new Float32Array(flatSize);\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (var i = 0, i4 = dstOffset; i !== nPlanes; ++i, i4 += 4) {\n\t\t\t\t\t\tplane.copy(planes[i]).applyMatrix4(viewMatrix, viewNormalMatrix);\n\t\t\t\t\t\tplane.normal.toArray(dstArray, i4);\n\t\t\t\t\t\tdstArray[i4 + 3] = plane.constant;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tuniform.value = dstArray;\n\t\t\t\tuniform.needsUpdate = true;\n\t\t\t}\n\n\t\t\tscope.numPlanes = nPlanes;\n\t\t\tscope.numIntersection = 0;\n\t\t\treturn dstArray;\n\t\t}\n\t}\n\n\tfunction WebGLCubeMaps(renderer) {\n\t\tvar cubemaps = new WeakMap();\n\n\t\tfunction mapTextureMapping(texture, mapping) {\n\t\t\tif (mapping === EquirectangularReflectionMapping) {\n\t\t\t\ttexture.mapping = CubeReflectionMapping;\n\t\t\t} else if (mapping === EquirectangularRefractionMapping) {\n\t\t\t\ttexture.mapping = CubeRefractionMapping;\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\n\t\tfunction get(texture) {\n\t\t\tif (texture && texture.isTexture) {\n\t\t\t\tvar mapping = texture.mapping;\n\n\t\t\t\tif (mapping === EquirectangularReflectionMapping || mapping === EquirectangularRefractionMapping) {\n\t\t\t\t\tif (cubemaps.has(texture)) {\n\t\t\t\t\t\tvar cubemap = cubemaps.get(texture).texture;\n\t\t\t\t\t\treturn mapTextureMapping(cubemap, texture.mapping);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar image = texture.image;\n\n\t\t\t\t\t\tif (image && image.height > 0) {\n\t\t\t\t\t\t\tvar currentRenderList = renderer.getRenderList();\n\t\t\t\t\t\t\tvar currentRenderTarget = renderer.getRenderTarget();\n\t\t\t\t\t\t\tvar renderTarget = new WebGLCubeRenderTarget(image.height / 2);\n\t\t\t\t\t\t\trenderTarget.fromEquirectangularTexture(renderer, texture);\n\t\t\t\t\t\t\tcubemaps.set(texture, renderTarget);\n\t\t\t\t\t\t\trenderer.setRenderTarget(currentRenderTarget);\n\t\t\t\t\t\t\trenderer.setRenderList(currentRenderList);\n\t\t\t\t\t\t\ttexture.addEventListener('dispose', onTextureDispose);\n\t\t\t\t\t\t\treturn mapTextureMapping(renderTarget.texture, texture.mapping);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// image not yet ready. try the conversion next frame\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\n\t\tfunction onTextureDispose(event) {\n\t\t\tvar texture = event.target;\n\t\t\ttexture.removeEventListener('dispose', onTextureDispose);\n\t\t\tvar cubemap = cubemaps.get(texture);\n\n\t\t\tif (cubemap !== undefined) {\n\t\t\t\tcubemaps.delete(texture);\n\t\t\t\tcubemap.dispose();\n\t\t\t}\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\tcubemaps = new WeakMap();\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\tfunction WebGLExtensions(gl) {\n\t\tvar extensions = {};\n\n\t\tfunction getExtension(name) {\n\t\t\tif (extensions[name] !== undefined) {\n\t\t\t\treturn extensions[name];\n\t\t\t}\n\n\t\t\tvar extension;\n\n\t\t\tswitch (name) {\n\t\t\t\tcase 'WEBGL_depth_texture':\n\t\t\t\t\textension = gl.getExtension('WEBGL_depth_texture') || gl.getExtension('MOZ_WEBGL_depth_texture') || gl.getExtension('WEBKIT_WEBGL_depth_texture');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'EXT_texture_filter_anisotropic':\n\t\t\t\t\textension = gl.getExtension('EXT_texture_filter_anisotropic') || gl.getExtension('MOZ_EXT_texture_filter_anisotropic') || gl.getExtension('WEBKIT_EXT_texture_filter_anisotropic');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'WEBGL_compressed_texture_s3tc':\n\t\t\t\t\textension = gl.getExtension('WEBGL_compressed_texture_s3tc') || gl.getExtension('MOZ_WEBGL_compressed_texture_s3tc') || gl.getExtension('WEBKIT_WEBGL_compressed_texture_s3tc');\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'WEBGL_compressed_texture_pvrtc':\n\t\t\t\t\textension = gl.getExtension('WEBGL_compressed_texture_pvrtc') || gl.getExtension('WEBKIT_WEBGL_compressed_texture_pvrtc');\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\textension = gl.getExtension(name);\n\t\t\t}\n\n\t\t\textensions[name] = extension;\n\t\t\treturn extension;\n\t\t}\n\n\t\treturn {\n\t\t\thas: function has(name) {\n\t\t\t\treturn getExtension(name) !== null;\n\t\t\t},\n\t\t\tinit: function init(capabilities) {\n\t\t\t\tif (capabilities.isWebGL2) {\n\t\t\t\t\tgetExtension('EXT_color_buffer_float');\n\t\t\t\t} else {\n\t\t\t\t\tgetExtension('WEBGL_depth_texture');\n\t\t\t\t\tgetExtension('OES_texture_float');\n\t\t\t\t\tgetExtension('OES_texture_half_float');\n\t\t\t\t\tgetExtension('OES_texture_half_float_linear');\n\t\t\t\t\tgetExtension('OES_standard_derivatives');\n\t\t\t\t\tgetExtension('OES_element_index_uint');\n\t\t\t\t\tgetExtension('OES_vertex_array_object');\n\t\t\t\t\tgetExtension('ANGLE_instanced_arrays');\n\t\t\t\t}\n\n\t\t\t\tgetExtension('OES_texture_float_linear');\n\t\t\t\tgetExtension('EXT_color_buffer_half_float');\n\t\t\t},\n\t\t\tget: function get(name) {\n\t\t\t\tvar extension = getExtension(name);\n\n\t\t\t\tif (extension === null) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: ' + name + ' extension not supported.');\n\t\t\t\t}\n\n\t\t\t\treturn extension;\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction WebGLGeometries(gl, attributes, info, bindingStates) {\n\t\tvar geometries = {};\n\t\tvar wireframeAttributes = new WeakMap();\n\n\t\tfunction onGeometryDispose(event) {\n\t\t\tvar geometry = event.target;\n\n\t\t\tif (geometry.index !== null) {\n\t\t\t\tattributes.remove(geometry.index);\n\t\t\t}\n\n\t\t\tfor (var name in geometry.attributes) {\n\t\t\t\tattributes.remove(geometry.attributes[name]);\n\t\t\t}\n\n\t\t\tgeometry.removeEventListener('dispose', onGeometryDispose);\n\t\t\tdelete geometries[geometry.id];\n\t\t\tvar attribute = wireframeAttributes.get(geometry);\n\n\t\t\tif (attribute) {\n\t\t\t\tattributes.remove(attribute);\n\t\t\t\twireframeAttributes.delete(geometry);\n\t\t\t}\n\n\t\t\tbindingStates.releaseStatesOfGeometry(geometry);\n\n\t\t\tif (geometry.isInstancedBufferGeometry === true) {\n\t\t\t\tdelete geometry._maxInstanceCount;\n\t\t\t} //\n\n\n\t\t\tinfo.memory.geometries--;\n\t\t}\n\n\t\tfunction get(object, geometry) {\n\t\t\tif (geometries[geometry.id] === true) return geometry;\n\t\t\tgeometry.addEventListener('dispose', onGeometryDispose);\n\t\t\tgeometries[geometry.id] = true;\n\t\t\tinfo.memory.geometries++;\n\t\t\treturn geometry;\n\t\t}\n\n\t\tfunction update(geometry) {\n\t\t\tvar geometryAttributes = geometry.attributes; // Updating index buffer in VAO now. See WebGLBindingStates.\n\n\t\t\tfor (var name in geometryAttributes) {\n\t\t\t\tattributes.update(geometryAttributes[name], 34962);\n\t\t\t} // morph targets\n\n\n\t\t\tvar morphAttributes = geometry.morphAttributes;\n\n\t\t\tfor (var _name in morphAttributes) {\n\t\t\t\tvar array = morphAttributes[_name];\n\n\t\t\t\tfor (var i = 0, l = array.length; i < l; i++) {\n\t\t\t\t\tattributes.update(array[i], 34962);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction updateWireframeAttribute(geometry) {\n\t\t\tvar indices = [];\n\t\t\tvar geometryIndex = geometry.index;\n\t\t\tvar geometryPosition = geometry.attributes.position;\n\t\t\tvar version = 0;\n\n\t\t\tif (geometryIndex !== null) {\n\t\t\t\tvar array = geometryIndex.array;\n\t\t\t\tversion = geometryIndex.version;\n\n\t\t\t\tfor (var i = 0, l = array.length; i < l; i += 3) {\n\t\t\t\t\tvar a = array[i + 0];\n\t\t\t\t\tvar b = array[i + 1];\n\t\t\t\t\tvar c = array[i + 2];\n\t\t\t\t\tindices.push(a, b, b, c, c, a);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar _array = geometryPosition.array;\n\t\t\t\tversion = geometryPosition.version;\n\n\t\t\t\tfor (var _i = 0, _l = _array.length / 3 - 1; _i < _l; _i += 3) {\n\t\t\t\t\tvar _a = _i + 0;\n\n\t\t\t\t\tvar _b = _i + 1;\n\n\t\t\t\t\tvar _c = _i + 2;\n\n\t\t\t\t\tindices.push(_a, _b, _b, _c, _c, _a);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar attribute = new (arrayMax(indices) > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute)(indices, 1);\n\t\t\tattribute.version = version; // Updating index buffer in VAO now. See WebGLBindingStates\n\t\t\t//\n\n\t\t\tvar previousAttribute = wireframeAttributes.get(geometry);\n\t\t\tif (previousAttribute) attributes.remove(previousAttribute); //\n\n\t\t\twireframeAttributes.set(geometry, attribute);\n\t\t}\n\n\t\tfunction getWireframeAttribute(geometry) {\n\t\t\tvar currentAttribute = wireframeAttributes.get(geometry);\n\n\t\t\tif (currentAttribute) {\n\t\t\t\tvar geometryIndex = geometry.index;\n\n\t\t\t\tif (geometryIndex !== null) {\n\t\t\t\t\t// if the attribute is obsolete, create a new one\n\t\t\t\t\tif (currentAttribute.version < geometryIndex.version) {\n\t\t\t\t\t\tupdateWireframeAttribute(geometry);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tupdateWireframeAttribute(geometry);\n\t\t\t}\n\n\t\t\treturn wireframeAttributes.get(geometry);\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tupdate: update,\n\t\t\tgetWireframeAttribute: getWireframeAttribute\n\t\t};\n\t}\n\n\tfunction WebGLIndexedBufferRenderer(gl, extensions, info, capabilities) {\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar mode;\n\n\t\tfunction setMode(value) {\n\t\t\tmode = value;\n\t\t}\n\n\t\tvar type, bytesPerElement;\n\n\t\tfunction setIndex(value) {\n\t\t\ttype = value.type;\n\t\t\tbytesPerElement = value.bytesPerElement;\n\t\t}\n\n\t\tfunction render(start, count) {\n\t\t\tgl.drawElements(mode, count, type, start * bytesPerElement);\n\t\t\tinfo.update(count, mode, 1);\n\t\t}\n\n\t\tfunction renderInstances(start, count, primcount) {\n\t\t\tif (primcount === 0) return;\n\t\t\tvar extension, methodName;\n\n\t\t\tif (isWebGL2) {\n\t\t\t\textension = gl;\n\t\t\t\tmethodName = 'drawElementsInstanced';\n\t\t\t} else {\n\t\t\t\textension = extensions.get('ANGLE_instanced_arrays');\n\t\t\t\tmethodName = 'drawElementsInstancedANGLE';\n\n\t\t\t\tif (extension === null) {\n\t\t\t\t\tconsole.error('THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\textension[methodName](mode, count, type, start * bytesPerElement, primcount);\n\t\t\tinfo.update(count, mode, primcount);\n\t\t} //\n\n\n\t\tthis.setMode = setMode;\n\t\tthis.setIndex = setIndex;\n\t\tthis.render = render;\n\t\tthis.renderInstances = renderInstances;\n\t}\n\n\tfunction WebGLInfo(gl) {\n\t\tvar memory = {\n\t\t\tgeometries: 0,\n\t\t\ttextures: 0\n\t\t};\n\t\tvar render = {\n\t\t\tframe: 0,\n\t\t\tcalls: 0,\n\t\t\ttriangles: 0,\n\t\t\tpoints: 0,\n\t\t\tlines: 0\n\t\t};\n\n\t\tfunction update(count, mode, instanceCount) {\n\t\t\trender.calls++;\n\n\t\t\tswitch (mode) {\n\t\t\t\tcase 4:\n\t\t\t\t\trender.triangles += instanceCount * (count / 3);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\trender.lines += instanceCount * (count / 2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\trender.lines += instanceCount * (count - 1);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\trender.lines += instanceCount * count;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 0:\n\t\t\t\t\trender.points += instanceCount * count;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.error('THREE.WebGLInfo: Unknown draw mode:', mode);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tfunction reset() {\n\t\t\trender.frame++;\n\t\t\trender.calls = 0;\n\t\t\trender.triangles = 0;\n\t\t\trender.points = 0;\n\t\t\trender.lines = 0;\n\t\t}\n\n\t\treturn {\n\t\t\tmemory: memory,\n\t\t\trender: render,\n\t\t\tprograms: null,\n\t\t\tautoReset: true,\n\t\t\treset: reset,\n\t\t\tupdate: update\n\t\t};\n\t}\n\n\tfunction numericalSort(a, b) {\n\t\treturn a[0] - b[0];\n\t}\n\n\tfunction absNumericalSort(a, b) {\n\t\treturn Math.abs(b[1]) - Math.abs(a[1]);\n\t}\n\n\tfunction WebGLMorphtargets(gl) {\n\t\tvar influencesList = {};\n\t\tvar morphInfluences = new Float32Array(8);\n\t\tvar workInfluences = [];\n\n\t\tfor (var i = 0; i < 8; i++) {\n\t\t\tworkInfluences[i] = [i, 0];\n\t\t}\n\n\t\tfunction update(object, geometry, material, program) {\n\t\t\tvar objectInfluences = object.morphTargetInfluences; // When object doesn't have morph target influences defined, we treat it as a 0-length array\n\t\t\t// This is important to make sure we set up morphTargetBaseInfluence / morphTargetInfluences\n\n\t\t\tvar length = objectInfluences === undefined ? 0 : objectInfluences.length;\n\t\t\tvar influences = influencesList[geometry.id];\n\n\t\t\tif (influences === undefined) {\n\t\t\t\t// initialise list\n\t\t\t\tinfluences = [];\n\n\t\t\t\tfor (var _i = 0; _i < length; _i++) {\n\t\t\t\t\tinfluences[_i] = [_i, 0];\n\t\t\t\t}\n\n\t\t\t\tinfluencesList[geometry.id] = influences;\n\t\t\t} // Collect influences\n\n\n\t\t\tfor (var _i2 = 0; _i2 < length; _i2++) {\n\t\t\t\tvar influence = influences[_i2];\n\t\t\t\tinfluence[0] = _i2;\n\t\t\t\tinfluence[1] = objectInfluences[_i2];\n\t\t\t}\n\n\t\t\tinfluences.sort(absNumericalSort);\n\n\t\t\tfor (var _i3 = 0; _i3 < 8; _i3++) {\n\t\t\t\tif (_i3 < length && influences[_i3][1]) {\n\t\t\t\t\tworkInfluences[_i3][0] = influences[_i3][0];\n\t\t\t\t\tworkInfluences[_i3][1] = influences[_i3][1];\n\t\t\t\t} else {\n\t\t\t\t\tworkInfluences[_i3][0] = Number.MAX_SAFE_INTEGER;\n\t\t\t\t\tworkInfluences[_i3][1] = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tworkInfluences.sort(numericalSort);\n\t\t\tvar morphTargets = material.morphTargets && geometry.morphAttributes.position;\n\t\t\tvar morphNormals = material.morphNormals && geometry.morphAttributes.normal;\n\t\t\tvar morphInfluencesSum = 0;\n\n\t\t\tfor (var _i4 = 0; _i4 < 8; _i4++) {\n\t\t\t\tvar _influence = workInfluences[_i4];\n\t\t\t\tvar index = _influence[0];\n\t\t\t\tvar value = _influence[1];\n\n\t\t\t\tif (index !== Number.MAX_SAFE_INTEGER && value) {\n\t\t\t\t\tif (morphTargets && geometry.getAttribute('morphTarget' + _i4) !== morphTargets[index]) {\n\t\t\t\t\t\tgeometry.setAttribute('morphTarget' + _i4, morphTargets[index]);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (morphNormals && geometry.getAttribute('morphNormal' + _i4) !== morphNormals[index]) {\n\t\t\t\t\t\tgeometry.setAttribute('morphNormal' + _i4, morphNormals[index]);\n\t\t\t\t\t}\n\n\t\t\t\t\tmorphInfluences[_i4] = value;\n\t\t\t\t\tmorphInfluencesSum += value;\n\t\t\t\t} else {\n\t\t\t\t\tif (morphTargets && geometry.hasAttribute('morphTarget' + _i4) === true) {\n\t\t\t\t\t\tgeometry.deleteAttribute('morphTarget' + _i4);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (morphNormals && geometry.hasAttribute('morphNormal' + _i4) === true) {\n\t\t\t\t\t\tgeometry.deleteAttribute('morphNormal' + _i4);\n\t\t\t\t\t}\n\n\t\t\t\t\tmorphInfluences[_i4] = 0;\n\t\t\t\t}\n\t\t\t} // GLSL shader uses formula baseinfluence * base + sum(target * influence)\n\t\t\t// This allows us to switch between absolute morphs and relative morphs without changing shader code\n\t\t\t// When baseinfluence = 1 - sum(influence), the above is equivalent to sum((target - base) * influence)\n\n\n\t\t\tvar morphBaseInfluence = geometry.morphTargetsRelative ? 1 : 1 - morphInfluencesSum;\n\t\t\tprogram.getUniforms().setValue(gl, 'morphTargetBaseInfluence', morphBaseInfluence);\n\t\t\tprogram.getUniforms().setValue(gl, 'morphTargetInfluences', morphInfluences);\n\t\t}\n\n\t\treturn {\n\t\t\tupdate: update\n\t\t};\n\t}\n\n\tfunction WebGLObjects(gl, geometries, attributes, info) {\n\t\tvar updateMap = new WeakMap();\n\n\t\tfunction update(object) {\n\t\t\tvar frame = info.render.frame;\n\t\t\tvar geometry = object.geometry;\n\t\t\tvar buffergeometry = geometries.get(object, geometry); // Update once per frame\n\n\t\t\tif (updateMap.get(buffergeometry) !== frame) {\n\t\t\t\tgeometries.update(buffergeometry);\n\t\t\t\tupdateMap.set(buffergeometry, frame);\n\t\t\t}\n\n\t\t\tif (object.isInstancedMesh) {\n\t\t\t\tif (object.hasEventListener('dispose', onInstancedMeshDispose) === false) {\n\t\t\t\t\tobject.addEventListener('dispose', onInstancedMeshDispose);\n\t\t\t\t}\n\n\t\t\t\tattributes.update(object.instanceMatrix, 34962);\n\n\t\t\t\tif (object.instanceColor !== null) {\n\t\t\t\t\tattributes.update(object.instanceColor, 34962);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn buffergeometry;\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\tupdateMap = new WeakMap();\n\t\t}\n\n\t\tfunction onInstancedMeshDispose(event) {\n\t\t\tvar instancedMesh = event.target;\n\t\t\tinstancedMesh.removeEventListener('dispose', onInstancedMeshDispose);\n\t\t\tattributes.remove(instancedMesh.instanceMatrix);\n\t\t\tif (instancedMesh.instanceColor !== null) attributes.remove(instancedMesh.instanceColor);\n\t\t}\n\n\t\treturn {\n\t\t\tupdate: update,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\tfunction DataTexture2DArray(data, width, height, depth) {\n\t\tif (data === void 0) {\n\t\t\tdata = null;\n\t\t}\n\n\t\tif (width === void 0) {\n\t\t\twidth = 1;\n\t\t}\n\n\t\tif (height === void 0) {\n\t\t\theight = 1;\n\t\t}\n\n\t\tif (depth === void 0) {\n\t\t\tdepth = 1;\n\t\t}\n\n\t\tTexture.call(this, null);\n\t\tthis.image = {\n\t\t\tdata: data,\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tdepth: depth\n\t\t};\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.needsUpdate = true;\n\t}\n\n\tDataTexture2DArray.prototype = Object.create(Texture.prototype);\n\tDataTexture2DArray.prototype.constructor = DataTexture2DArray;\n\tDataTexture2DArray.prototype.isDataTexture2DArray = true;\n\n\tfunction DataTexture3D(data, width, height, depth) {\n\t\tif (data === void 0) {\n\t\t\tdata = null;\n\t\t}\n\n\t\tif (width === void 0) {\n\t\t\twidth = 1;\n\t\t}\n\n\t\tif (height === void 0) {\n\t\t\theight = 1;\n\t\t}\n\n\t\tif (depth === void 0) {\n\t\t\tdepth = 1;\n\t\t}\n\n\t\t// We're going to add .setXXX() methods for setting properties later.\n\t\t// Users can still set in DataTexture3D directly.\n\t\t//\n\t\t//\tconst texture = new THREE.DataTexture3D( data, width, height, depth );\n\t\t// \ttexture.anisotropy = 16;\n\t\t//\n\t\t// See #14839\n\t\tTexture.call(this, null);\n\t\tthis.image = {\n\t\t\tdata: data,\n\t\t\twidth: width,\n\t\t\theight: height,\n\t\t\tdepth: depth\n\t\t};\n\t\tthis.magFilter = NearestFilter;\n\t\tthis.minFilter = NearestFilter;\n\t\tthis.wrapR = ClampToEdgeWrapping;\n\t\tthis.generateMipmaps = false;\n\t\tthis.flipY = false;\n\t\tthis.needsUpdate = true;\n\t}\n\n\tDataTexture3D.prototype = Object.create(Texture.prototype);\n\tDataTexture3D.prototype.constructor = DataTexture3D;\n\tDataTexture3D.prototype.isDataTexture3D = true;\n\n\t/**\n\t * Uniforms of a program.\n\t * Those form a tree structure with a special top-level container for the root,\n\t * which you get by calling 'new WebGLUniforms( gl, program )'.\n\t *\n\t *\n\t * Properties of inner nodes including the top-level container:\n\t *\n\t * .seq - array of nested uniforms\n\t * .map - nested uniforms by name\n\t *\n\t *\n\t * Methods of all nodes except the top-level container:\n\t *\n\t * .setValue( gl, value, [textures] )\n\t *\n\t * \t\tuploads a uniform value(s)\n\t *\t\tthe 'textures' parameter is needed for sampler uniforms\n\t *\n\t *\n\t * Static methods of the top-level container (textures factorizations):\n\t *\n\t * .upload( gl, seq, values, textures )\n\t *\n\t * \t\tsets uniforms in 'seq' to 'values[id].value'\n\t *\n\t * .seqWithValue( seq, values ) : filteredSeq\n\t *\n\t * \t\tfilters 'seq' entries with corresponding entry in values\n\t *\n\t *\n\t * Methods of the top-level container (textures factorizations):\n\t *\n\t * .setValue( gl, name, value, textures )\n\t *\n\t * \t\tsets uniform with\tname 'name' to 'value'\n\t *\n\t * .setOptional( gl, obj, prop )\n\t *\n\t * \t\tlike .set for an optional property of the object\n\t *\n\t */\n\tvar emptyTexture = new Texture();\n\tvar emptyTexture2dArray = new DataTexture2DArray();\n\tvar emptyTexture3d = new DataTexture3D();\n\tvar emptyCubeTexture = new CubeTexture(); // --- Utilities ---\n\t// Array Caches (provide typed arrays for temporary by size)\n\n\tvar arrayCacheF32 = [];\n\tvar arrayCacheI32 = []; // Float32Array caches used for uploading Matrix uniforms\n\n\tvar mat4array = new Float32Array(16);\n\tvar mat3array = new Float32Array(9);\n\tvar mat2array = new Float32Array(4); // Flattening for arrays of vectors and matrices\n\n\tfunction flatten(array, nBlocks, blockSize) {\n\t\tvar firstElem = array[0];\n\t\tif (firstElem <= 0 || firstElem > 0) return array; // unoptimized: ! isNaN( firstElem )\n\t\t// see http://jacksondunstan.com/articles/983\n\n\t\tvar n = nBlocks * blockSize;\n\t\tvar r = arrayCacheF32[n];\n\n\t\tif (r === undefined) {\n\t\t\tr = new Float32Array(n);\n\t\t\tarrayCacheF32[n] = r;\n\t\t}\n\n\t\tif (nBlocks !== 0) {\n\t\t\tfirstElem.toArray(r, 0);\n\n\t\t\tfor (var i = 1, offset = 0; i !== nBlocks; ++i) {\n\t\t\t\toffset += blockSize;\n\t\t\t\tarray[i].toArray(r, offset);\n\t\t\t}\n\t\t}\n\n\t\treturn r;\n\t}\n\n\tfunction arraysEqual(a, b) {\n\t\tif (a.length !== b.length) return false;\n\n\t\tfor (var i = 0, l = a.length; i < l; i++) {\n\t\t\tif (a[i] !== b[i]) return false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction copyArray(a, b) {\n\t\tfor (var i = 0, l = b.length; i < l; i++) {\n\t\t\ta[i] = b[i];\n\t\t}\n\t} // Texture unit allocation\n\n\n\tfunction allocTexUnits(textures, n) {\n\t\tvar r = arrayCacheI32[n];\n\n\t\tif (r === undefined) {\n\t\t\tr = new Int32Array(n);\n\t\t\tarrayCacheI32[n] = r;\n\t\t}\n\n\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\tr[i] = textures.allocateTextureUnit();\n\t\t}\n\n\t\treturn r;\n\t} // --- Setters ---\n\t// Note: Defining these methods externally, because they come in a bunch\n\t// and this way their names minify.\n\t// Single scalar\n\n\n\tfunction setValueV1f(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (cache[0] === v) return;\n\t\tgl.uniform1f(this.addr, v);\n\t\tcache[0] = v;\n\t} // Single float vector (from flat array or THREE.VectorN)\n\n\n\tfunction setValueV2f(gl, v) {\n\t\tvar cache = this.cache;\n\n\t\tif (v.x !== undefined) {\n\t\t\tif (cache[0] !== v.x || cache[1] !== v.y) {\n\t\t\t\tgl.uniform2f(this.addr, v.x, v.y);\n\t\t\t\tcache[0] = v.x;\n\t\t\t\tcache[1] = v.y;\n\t\t\t}\n\t\t} else {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniform2fv(this.addr, v);\n\t\t\tcopyArray(cache, v);\n\t\t}\n\t}\n\n\tfunction setValueV3f(gl, v) {\n\t\tvar cache = this.cache;\n\n\t\tif (v.x !== undefined) {\n\t\t\tif (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z) {\n\t\t\t\tgl.uniform3f(this.addr, v.x, v.y, v.z);\n\t\t\t\tcache[0] = v.x;\n\t\t\t\tcache[1] = v.y;\n\t\t\t\tcache[2] = v.z;\n\t\t\t}\n\t\t} else if (v.r !== undefined) {\n\t\t\tif (cache[0] !== v.r || cache[1] !== v.g || cache[2] !== v.b) {\n\t\t\t\tgl.uniform3f(this.addr, v.r, v.g, v.b);\n\t\t\t\tcache[0] = v.r;\n\t\t\t\tcache[1] = v.g;\n\t\t\t\tcache[2] = v.b;\n\t\t\t}\n\t\t} else {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniform3fv(this.addr, v);\n\t\t\tcopyArray(cache, v);\n\t\t}\n\t}\n\n\tfunction setValueV4f(gl, v) {\n\t\tvar cache = this.cache;\n\n\t\tif (v.x !== undefined) {\n\t\t\tif (cache[0] !== v.x || cache[1] !== v.y || cache[2] !== v.z || cache[3] !== v.w) {\n\t\t\t\tgl.uniform4f(this.addr, v.x, v.y, v.z, v.w);\n\t\t\t\tcache[0] = v.x;\n\t\t\t\tcache[1] = v.y;\n\t\t\t\tcache[2] = v.z;\n\t\t\t\tcache[3] = v.w;\n\t\t\t}\n\t\t} else {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniform4fv(this.addr, v);\n\t\t\tcopyArray(cache, v);\n\t\t}\n\t} // Single matrix (from flat array or MatrixN)\n\n\n\tfunction setValueM2(gl, v) {\n\t\tvar cache = this.cache;\n\t\tvar elements = v.elements;\n\n\t\tif (elements === undefined) {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniformMatrix2fv(this.addr, false, v);\n\t\t\tcopyArray(cache, v);\n\t\t} else {\n\t\t\tif (arraysEqual(cache, elements)) return;\n\t\t\tmat2array.set(elements);\n\t\t\tgl.uniformMatrix2fv(this.addr, false, mat2array);\n\t\t\tcopyArray(cache, elements);\n\t\t}\n\t}\n\n\tfunction setValueM3(gl, v) {\n\t\tvar cache = this.cache;\n\t\tvar elements = v.elements;\n\n\t\tif (elements === undefined) {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniformMatrix3fv(this.addr, false, v);\n\t\t\tcopyArray(cache, v);\n\t\t} else {\n\t\t\tif (arraysEqual(cache, elements)) return;\n\t\t\tmat3array.set(elements);\n\t\t\tgl.uniformMatrix3fv(this.addr, false, mat3array);\n\t\t\tcopyArray(cache, elements);\n\t\t}\n\t}\n\n\tfunction setValueM4(gl, v) {\n\t\tvar cache = this.cache;\n\t\tvar elements = v.elements;\n\n\t\tif (elements === undefined) {\n\t\t\tif (arraysEqual(cache, v)) return;\n\t\t\tgl.uniformMatrix4fv(this.addr, false, v);\n\t\t\tcopyArray(cache, v);\n\t\t} else {\n\t\t\tif (arraysEqual(cache, elements)) return;\n\t\t\tmat4array.set(elements);\n\t\t\tgl.uniformMatrix4fv(this.addr, false, mat4array);\n\t\t\tcopyArray(cache, elements);\n\t\t}\n\t} // Single texture (2D / Cube)\n\n\n\tfunction setValueT1(gl, v, textures) {\n\t\tvar cache = this.cache;\n\t\tvar unit = textures.allocateTextureUnit();\n\n\t\tif (cache[0] !== unit) {\n\t\t\tgl.uniform1i(this.addr, unit);\n\t\t\tcache[0] = unit;\n\t\t}\n\n\t\ttextures.safeSetTexture2D(v || emptyTexture, unit);\n\t}\n\n\tfunction setValueT2DArray1(gl, v, textures) {\n\t\tvar cache = this.cache;\n\t\tvar unit = textures.allocateTextureUnit();\n\n\t\tif (cache[0] !== unit) {\n\t\t\tgl.uniform1i(this.addr, unit);\n\t\t\tcache[0] = unit;\n\t\t}\n\n\t\ttextures.setTexture2DArray(v || emptyTexture2dArray, unit);\n\t}\n\n\tfunction setValueT3D1(gl, v, textures) {\n\t\tvar cache = this.cache;\n\t\tvar unit = textures.allocateTextureUnit();\n\n\t\tif (cache[0] !== unit) {\n\t\t\tgl.uniform1i(this.addr, unit);\n\t\t\tcache[0] = unit;\n\t\t}\n\n\t\ttextures.setTexture3D(v || emptyTexture3d, unit);\n\t}\n\n\tfunction setValueT6(gl, v, textures) {\n\t\tvar cache = this.cache;\n\t\tvar unit = textures.allocateTextureUnit();\n\n\t\tif (cache[0] !== unit) {\n\t\t\tgl.uniform1i(this.addr, unit);\n\t\t\tcache[0] = unit;\n\t\t}\n\n\t\ttextures.safeSetTextureCube(v || emptyCubeTexture, unit);\n\t} // Integer / Boolean vectors or arrays thereof (always flat arrays)\n\n\n\tfunction setValueV1i(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (cache[0] === v) return;\n\t\tgl.uniform1i(this.addr, v);\n\t\tcache[0] = v;\n\t}\n\n\tfunction setValueV2i(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (arraysEqual(cache, v)) return;\n\t\tgl.uniform2iv(this.addr, v);\n\t\tcopyArray(cache, v);\n\t}\n\n\tfunction setValueV3i(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (arraysEqual(cache, v)) return;\n\t\tgl.uniform3iv(this.addr, v);\n\t\tcopyArray(cache, v);\n\t}\n\n\tfunction setValueV4i(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (arraysEqual(cache, v)) return;\n\t\tgl.uniform4iv(this.addr, v);\n\t\tcopyArray(cache, v);\n\t} // uint\n\n\n\tfunction setValueV1ui(gl, v) {\n\t\tvar cache = this.cache;\n\t\tif (cache[0] === v) return;\n\t\tgl.uniform1ui(this.addr, v);\n\t\tcache[0] = v;\n\t} // Helper to pick the right setter for the singular case\n\n\n\tfunction getSingularSetter(type) {\n\t\tswitch (type) {\n\t\t\tcase 0x1406:\n\t\t\t\treturn setValueV1f;\n\t\t\t// FLOAT\n\n\t\t\tcase 0x8b50:\n\t\t\t\treturn setValueV2f;\n\t\t\t// _VEC2\n\n\t\t\tcase 0x8b51:\n\t\t\t\treturn setValueV3f;\n\t\t\t// _VEC3\n\n\t\t\tcase 0x8b52:\n\t\t\t\treturn setValueV4f;\n\t\t\t// _VEC4\n\n\t\t\tcase 0x8b5a:\n\t\t\t\treturn setValueM2;\n\t\t\t// _MAT2\n\n\t\t\tcase 0x8b5b:\n\t\t\t\treturn setValueM3;\n\t\t\t// _MAT3\n\n\t\t\tcase 0x8b5c:\n\t\t\t\treturn setValueM4;\n\t\t\t// _MAT4\n\n\t\t\tcase 0x1404:\n\t\t\tcase 0x8b56:\n\t\t\t\treturn setValueV1i;\n\t\t\t// INT, BOOL\n\n\t\t\tcase 0x8b53:\n\t\t\tcase 0x8b57:\n\t\t\t\treturn setValueV2i;\n\t\t\t// _VEC2\n\n\t\t\tcase 0x8b54:\n\t\t\tcase 0x8b58:\n\t\t\t\treturn setValueV3i;\n\t\t\t// _VEC3\n\n\t\t\tcase 0x8b55:\n\t\t\tcase 0x8b59:\n\t\t\t\treturn setValueV4i;\n\t\t\t// _VEC4\n\n\t\t\tcase 0x1405:\n\t\t\t\treturn setValueV1ui;\n\t\t\t// UINT\n\n\t\t\tcase 0x8b5e: // SAMPLER_2D\n\n\t\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\n\t\t\tcase 0x8dca: // INT_SAMPLER_2D\n\n\t\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\n\t\t\tcase 0x8b62:\n\t\t\t\t// SAMPLER_2D_SHADOW\n\t\t\t\treturn setValueT1;\n\n\t\t\tcase 0x8b5f: // SAMPLER_3D\n\n\t\t\tcase 0x8dcb: // INT_SAMPLER_3D\n\n\t\t\tcase 0x8dd3:\n\t\t\t\t// UNSIGNED_INT_SAMPLER_3D\n\t\t\t\treturn setValueT3D1;\n\n\t\t\tcase 0x8b60: // SAMPLER_CUBE\n\n\t\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\n\t\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\n\t\t\tcase 0x8dc5:\n\t\t\t\t// SAMPLER_CUBE_SHADOW\n\t\t\t\treturn setValueT6;\n\n\t\t\tcase 0x8dc1: // SAMPLER_2D_ARRAY\n\n\t\t\tcase 0x8dcf: // INT_SAMPLER_2D_ARRAY\n\n\t\t\tcase 0x8dd7: // UNSIGNED_INT_SAMPLER_2D_ARRAY\n\n\t\t\tcase 0x8dc4:\n\t\t\t\t// SAMPLER_2D_ARRAY_SHADOW\n\t\t\t\treturn setValueT2DArray1;\n\t\t}\n\t} // Array of scalars\n\n\n\tfunction setValueV1fArray(gl, v) {\n\t\tgl.uniform1fv(this.addr, v);\n\t} // Integer / Boolean vectors or arrays thereof (always flat arrays)\n\n\n\tfunction setValueV1iArray(gl, v) {\n\t\tgl.uniform1iv(this.addr, v);\n\t}\n\n\tfunction setValueV2iArray(gl, v) {\n\t\tgl.uniform2iv(this.addr, v);\n\t}\n\n\tfunction setValueV3iArray(gl, v) {\n\t\tgl.uniform3iv(this.addr, v);\n\t}\n\n\tfunction setValueV4iArray(gl, v) {\n\t\tgl.uniform4iv(this.addr, v);\n\t} // Array of vectors (flat or from THREE classes)\n\n\n\tfunction setValueV2fArray(gl, v) {\n\t\tvar data = flatten(v, this.size, 2);\n\t\tgl.uniform2fv(this.addr, data);\n\t}\n\n\tfunction setValueV3fArray(gl, v) {\n\t\tvar data = flatten(v, this.size, 3);\n\t\tgl.uniform3fv(this.addr, data);\n\t}\n\n\tfunction setValueV4fArray(gl, v) {\n\t\tvar data = flatten(v, this.size, 4);\n\t\tgl.uniform4fv(this.addr, data);\n\t} // Array of matrices (flat or from THREE clases)\n\n\n\tfunction setValueM2Array(gl, v) {\n\t\tvar data = flatten(v, this.size, 4);\n\t\tgl.uniformMatrix2fv(this.addr, false, data);\n\t}\n\n\tfunction setValueM3Array(gl, v) {\n\t\tvar data = flatten(v, this.size, 9);\n\t\tgl.uniformMatrix3fv(this.addr, false, data);\n\t}\n\n\tfunction setValueM4Array(gl, v) {\n\t\tvar data = flatten(v, this.size, 16);\n\t\tgl.uniformMatrix4fv(this.addr, false, data);\n\t} // Array of textures (2D / Cube)\n\n\n\tfunction setValueT1Array(gl, v, textures) {\n\t\tvar n = v.length;\n\t\tvar units = allocTexUnits(textures, n);\n\t\tgl.uniform1iv(this.addr, units);\n\n\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\ttextures.safeSetTexture2D(v[i] || emptyTexture, units[i]);\n\t\t}\n\t}\n\n\tfunction setValueT6Array(gl, v, textures) {\n\t\tvar n = v.length;\n\t\tvar units = allocTexUnits(textures, n);\n\t\tgl.uniform1iv(this.addr, units);\n\n\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\ttextures.safeSetTextureCube(v[i] || emptyCubeTexture, units[i]);\n\t\t}\n\t} // Helper to pick the right setter for a pure (bottom-level) array\n\n\n\tfunction getPureArraySetter(type) {\n\t\tswitch (type) {\n\t\t\tcase 0x1406:\n\t\t\t\treturn setValueV1fArray;\n\t\t\t// FLOAT\n\n\t\t\tcase 0x8b50:\n\t\t\t\treturn setValueV2fArray;\n\t\t\t// _VEC2\n\n\t\t\tcase 0x8b51:\n\t\t\t\treturn setValueV3fArray;\n\t\t\t// _VEC3\n\n\t\t\tcase 0x8b52:\n\t\t\t\treturn setValueV4fArray;\n\t\t\t// _VEC4\n\n\t\t\tcase 0x8b5a:\n\t\t\t\treturn setValueM2Array;\n\t\t\t// _MAT2\n\n\t\t\tcase 0x8b5b:\n\t\t\t\treturn setValueM3Array;\n\t\t\t// _MAT3\n\n\t\t\tcase 0x8b5c:\n\t\t\t\treturn setValueM4Array;\n\t\t\t// _MAT4\n\n\t\t\tcase 0x1404:\n\t\t\tcase 0x8b56:\n\t\t\t\treturn setValueV1iArray;\n\t\t\t// INT, BOOL\n\n\t\t\tcase 0x8b53:\n\t\t\tcase 0x8b57:\n\t\t\t\treturn setValueV2iArray;\n\t\t\t// _VEC2\n\n\t\t\tcase 0x8b54:\n\t\t\tcase 0x8b58:\n\t\t\t\treturn setValueV3iArray;\n\t\t\t// _VEC3\n\n\t\t\tcase 0x8b55:\n\t\t\tcase 0x8b59:\n\t\t\t\treturn setValueV4iArray;\n\t\t\t// _VEC4\n\n\t\t\tcase 0x8b5e: // SAMPLER_2D\n\n\t\t\tcase 0x8d66: // SAMPLER_EXTERNAL_OES\n\n\t\t\tcase 0x8dca: // INT_SAMPLER_2D\n\n\t\t\tcase 0x8dd2: // UNSIGNED_INT_SAMPLER_2D\n\n\t\t\tcase 0x8b62:\n\t\t\t\t// SAMPLER_2D_SHADOW\n\t\t\t\treturn setValueT1Array;\n\n\t\t\tcase 0x8b60: // SAMPLER_CUBE\n\n\t\t\tcase 0x8dcc: // INT_SAMPLER_CUBE\n\n\t\t\tcase 0x8dd4: // UNSIGNED_INT_SAMPLER_CUBE\n\n\t\t\tcase 0x8dc5:\n\t\t\t\t// SAMPLER_CUBE_SHADOW\n\t\t\t\treturn setValueT6Array;\n\t\t}\n\t} // --- Uniform Classes ---\n\n\n\tfunction SingleUniform(id, activeInfo, addr) {\n\t\tthis.id = id;\n\t\tthis.addr = addr;\n\t\tthis.cache = [];\n\t\tthis.setValue = getSingularSetter(activeInfo.type); // this.path = activeInfo.name; // DEBUG\n\t}\n\n\tfunction PureArrayUniform(id, activeInfo, addr) {\n\t\tthis.id = id;\n\t\tthis.addr = addr;\n\t\tthis.cache = [];\n\t\tthis.size = activeInfo.size;\n\t\tthis.setValue = getPureArraySetter(activeInfo.type); // this.path = activeInfo.name; // DEBUG\n\t}\n\n\tPureArrayUniform.prototype.updateCache = function (data) {\n\t\tvar cache = this.cache;\n\n\t\tif (data instanceof Float32Array && cache.length !== data.length) {\n\t\t\tthis.cache = new Float32Array(data.length);\n\t\t}\n\n\t\tcopyArray(cache, data);\n\t};\n\n\tfunction StructuredUniform(id) {\n\t\tthis.id = id;\n\t\tthis.seq = [];\n\t\tthis.map = {};\n\t}\n\n\tStructuredUniform.prototype.setValue = function (gl, value, textures) {\n\t\tvar seq = this.seq;\n\n\t\tfor (var i = 0, n = seq.length; i !== n; ++i) {\n\t\t\tvar u = seq[i];\n\t\t\tu.setValue(gl, value[u.id], textures);\n\t\t}\n\t}; // --- Top-level ---\n\t// Parser - builds up the property tree from the path strings\n\n\n\tvar RePathPart = /(\\w+)(\\])?(\\[|\\.)?/g; // extracts\n\t// \t- the identifier (member name or array index)\n\t//\t- followed by an optional right bracket (found when array index)\n\t//\t- followed by an optional left bracket or dot (type of subscript)\n\t//\n\t// Note: These portions can be read in a non-overlapping fashion and\n\t// allow straightforward parsing of the hierarchy that WebGL encodes\n\t// in the uniform names.\n\n\tfunction addUniform(container, uniformObject) {\n\t\tcontainer.seq.push(uniformObject);\n\t\tcontainer.map[uniformObject.id] = uniformObject;\n\t}\n\n\tfunction parseUniform(activeInfo, addr, container) {\n\t\tvar path = activeInfo.name,\n\t\t\t\tpathLength = path.length; // reset RegExp object, because of the early exit of a previous run\n\n\t\tRePathPart.lastIndex = 0;\n\n\t\twhile (true) {\n\t\t\tvar match = RePathPart.exec(path),\n\t\t\t\t\tmatchEnd = RePathPart.lastIndex;\n\t\t\tvar id = match[1];\n\t\t\tvar idIsIndex = match[2] === ']',\n\t\t\t\t\tsubscript = match[3];\n\t\t\tif (idIsIndex) id = id | 0; // convert to integer\n\n\t\t\tif (subscript === undefined || subscript === '[' && matchEnd + 2 === pathLength) {\n\t\t\t\t// bare name or \"pure\" bottom-level array \"[0]\" suffix\n\t\t\t\taddUniform(container, subscript === undefined ? new SingleUniform(id, activeInfo, addr) : new PureArrayUniform(id, activeInfo, addr));\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// step into inner node / create it in case it doesn't exist\n\t\t\t\tvar map = container.map;\n\t\t\t\tvar next = map[id];\n\n\t\t\t\tif (next === undefined) {\n\t\t\t\t\tnext = new StructuredUniform(id);\n\t\t\t\t\taddUniform(container, next);\n\t\t\t\t}\n\n\t\t\t\tcontainer = next;\n\t\t\t}\n\t\t}\n\t} // Root Container\n\n\n\tfunction WebGLUniforms(gl, program) {\n\t\tthis.seq = [];\n\t\tthis.map = {};\n\t\tvar n = gl.getProgramParameter(program, 35718);\n\n\t\tfor (var i = 0; i < n; ++i) {\n\t\t\tvar info = gl.getActiveUniform(program, i),\n\t\t\t\t\taddr = gl.getUniformLocation(program, info.name);\n\t\t\tparseUniform(info, addr, this);\n\t\t}\n\t}\n\n\tWebGLUniforms.prototype.setValue = function (gl, name, value, textures) {\n\t\tvar u = this.map[name];\n\t\tif (u !== undefined) u.setValue(gl, value, textures);\n\t};\n\n\tWebGLUniforms.prototype.setOptional = function (gl, object, name) {\n\t\tvar v = object[name];\n\t\tif (v !== undefined) this.setValue(gl, name, v);\n\t}; // Static interface\n\n\n\tWebGLUniforms.upload = function (gl, seq, values, textures) {\n\t\tfor (var i = 0, n = seq.length; i !== n; ++i) {\n\t\t\tvar u = seq[i],\n\t\t\t\t\tv = values[u.id];\n\n\t\t\tif (v.needsUpdate !== false) {\n\t\t\t\t// note: always updating when .needsUpdate is undefined\n\t\t\t\tu.setValue(gl, v.value, textures);\n\t\t\t}\n\t\t}\n\t};\n\n\tWebGLUniforms.seqWithValue = function (seq, values) {\n\t\tvar r = [];\n\n\t\tfor (var i = 0, n = seq.length; i !== n; ++i) {\n\t\t\tvar u = seq[i];\n\t\t\tif (u.id in values) r.push(u);\n\t\t}\n\n\t\treturn r;\n\t};\n\n\tfunction WebGLShader(gl, type, string) {\n\t\tvar shader = gl.createShader(type);\n\t\tgl.shaderSource(shader, string);\n\t\tgl.compileShader(shader);\n\t\treturn shader;\n\t}\n\n\tvar programIdCount = 0;\n\n\tfunction addLineNumbers(string) {\n\t\tvar lines = string.split('\\n');\n\n\t\tfor (var i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = i + 1 + ': ' + lines[i];\n\t\t}\n\n\t\treturn lines.join('\\n');\n\t}\n\n\tfunction getEncodingComponents(encoding) {\n\t\tswitch (encoding) {\n\t\t\tcase LinearEncoding:\n\t\t\t\treturn ['Linear', '( value )'];\n\n\t\t\tcase sRGBEncoding:\n\t\t\t\treturn ['sRGB', '( value )'];\n\n\t\t\tcase RGBEEncoding:\n\t\t\t\treturn ['RGBE', '( value )'];\n\n\t\t\tcase RGBM7Encoding:\n\t\t\t\treturn ['RGBM', '( value, 7.0 )'];\n\n\t\t\tcase RGBM16Encoding:\n\t\t\t\treturn ['RGBM', '( value, 16.0 )'];\n\n\t\t\tcase RGBDEncoding:\n\t\t\t\treturn ['RGBD', '( value, 256.0 )'];\n\n\t\t\tcase GammaEncoding:\n\t\t\t\treturn ['Gamma', '( value, float( GAMMA_FACTOR ) )'];\n\n\t\t\tcase LogLuvEncoding:\n\t\t\t\treturn ['LogLuv', '( value )'];\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn('THREE.WebGLProgram: Unsupported encoding:', encoding);\n\t\t\t\treturn ['Linear', '( value )'];\n\t\t}\n\t}\n\n\tfunction getShaderErrors(gl, shader, type) {\n\t\tvar status = gl.getShaderParameter(shader, 35713);\n\t\tvar log = gl.getShaderInfoLog(shader).trim();\n\t\tif (status && log === '') return ''; // --enable-privileged-webgl-extension\n\t\t// console.log( '**' + type + '**', gl.getExtension( 'WEBGL_debug_shaders' ).getTranslatedShaderSource( shader ) );\n\n\t\tvar source = gl.getShaderSource(shader);\n\t\treturn 'THREE.WebGLShader: gl.getShaderInfoLog() ' + type + '\\n' + log + addLineNumbers(source);\n\t}\n\n\tfunction getTexelDecodingFunction(functionName, encoding) {\n\t\tvar components = getEncodingComponents(encoding);\n\t\treturn 'vec4 ' + functionName + '( vec4 value ) { return ' + components[0] + 'ToLinear' + components[1] + '; }';\n\t}\n\n\tfunction getTexelEncodingFunction(functionName, encoding) {\n\t\tvar components = getEncodingComponents(encoding);\n\t\treturn 'vec4 ' + functionName + '( vec4 value ) { return LinearTo' + components[0] + components[1] + '; }';\n\t}\n\n\tfunction getToneMappingFunction(functionName, toneMapping) {\n\t\tvar toneMappingName;\n\n\t\tswitch (toneMapping) {\n\t\t\tcase LinearToneMapping:\n\t\t\t\ttoneMappingName = 'Linear';\n\t\t\t\tbreak;\n\n\t\t\tcase ReinhardToneMapping:\n\t\t\t\ttoneMappingName = 'Reinhard';\n\t\t\t\tbreak;\n\n\t\t\tcase CineonToneMapping:\n\t\t\t\ttoneMappingName = 'OptimizedCineon';\n\t\t\t\tbreak;\n\n\t\t\tcase ACESFilmicToneMapping:\n\t\t\t\ttoneMappingName = 'ACESFilmic';\n\t\t\t\tbreak;\n\n\t\t\tcase CustomToneMapping:\n\t\t\t\ttoneMappingName = 'Custom';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tconsole.warn('THREE.WebGLProgram: Unsupported toneMapping:', toneMapping);\n\t\t\t\ttoneMappingName = 'Linear';\n\t\t}\n\n\t\treturn 'vec3 ' + functionName + '( vec3 color ) { return ' + toneMappingName + 'ToneMapping( color ); }';\n\t}\n\n\tfunction generateExtensions(parameters) {\n\t\tvar chunks = [parameters.extensionDerivatives || parameters.envMapCubeUV || parameters.bumpMap || parameters.tangentSpaceNormalMap || parameters.clearcoatNormalMap || parameters.flatShading || parameters.shaderID === 'physical' ? '#extension GL_OES_standard_derivatives : enable' : '', (parameters.extensionFragDepth || parameters.logarithmicDepthBuffer) && parameters.rendererExtensionFragDepth ? '#extension GL_EXT_frag_depth : enable' : '', parameters.extensionDrawBuffers && parameters.rendererExtensionDrawBuffers ? '#extension GL_EXT_draw_buffers : require' : '', (parameters.extensionShaderTextureLOD || parameters.envMap) && parameters.rendererExtensionShaderTextureLod ? '#extension GL_EXT_shader_texture_lod : enable' : ''];\n\t\treturn chunks.filter(filterEmptyLine).join('\\n');\n\t}\n\n\tfunction generateDefines(defines) {\n\t\tvar chunks = [];\n\n\t\tfor (var name in defines) {\n\t\t\tvar value = defines[name];\n\t\t\tif (value === false) continue;\n\t\t\tchunks.push('#define ' + name + ' ' + value);\n\t\t}\n\n\t\treturn chunks.join('\\n');\n\t}\n\n\tfunction fetchAttributeLocations(gl, program) {\n\t\tvar attributes = {};\n\t\tvar n = gl.getProgramParameter(program, 35721);\n\n\t\tfor (var i = 0; i < n; i++) {\n\t\t\tvar info = gl.getActiveAttrib(program, i);\n\t\t\tvar name = info.name; // console.log( 'THREE.WebGLProgram: ACTIVE VERTEX ATTRIBUTE:', name, i );\n\n\t\t\tattributes[name] = gl.getAttribLocation(program, name);\n\t\t}\n\n\t\treturn attributes;\n\t}\n\n\tfunction filterEmptyLine(string) {\n\t\treturn string !== '';\n\t}\n\n\tfunction replaceLightNums(string, parameters) {\n\t\treturn string.replace(/NUM_DIR_LIGHTS/g, parameters.numDirLights).replace(/NUM_SPOT_LIGHTS/g, parameters.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g, parameters.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, parameters.numPointLights).replace(/NUM_HEMI_LIGHTS/g, parameters.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g, parameters.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g, parameters.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g, parameters.numPointLightShadows);\n\t}\n\n\tfunction replaceClippingPlaneNums(string, parameters) {\n\t\treturn string.replace(/NUM_CLIPPING_PLANES/g, parameters.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, parameters.numClippingPlanes - parameters.numClipIntersection);\n\t} // Resolve Includes\n\n\n\tvar includePattern = /^[ \\t]*#include +<([\\w\\d./]+)>/gm;\n\n\tfunction resolveIncludes(string) {\n\t\treturn string.replace(includePattern, includeReplacer);\n\t}\n\n\tfunction includeReplacer(match, include) {\n\t\tvar string = ShaderChunk[include];\n\n\t\tif (string === undefined) {\n\t\t\tthrow new Error('Can not resolve #include <' + include + '>');\n\t\t}\n\n\t\treturn resolveIncludes(string);\n\t} // Unroll Loops\n\n\n\tvar deprecatedUnrollLoopPattern = /#pragma unroll_loop[\\s]+?for \\( int i \\= (\\d+)\\; i < (\\d+)\\; i \\+\\+ \\) \\{([\\s\\S]+?)(?=\\})\\}/g;\n\tvar unrollLoopPattern = /#pragma unroll_loop_start\\s+for\\s*\\(\\s*int\\s+i\\s*=\\s*(\\d+)\\s*;\\s*i\\s*<\\s*(\\d+)\\s*;\\s*i\\s*\\+\\+\\s*\\)\\s*{([\\s\\S]+?)}\\s+#pragma unroll_loop_end/g;\n\n\tfunction unrollLoops(string) {\n\t\treturn string.replace(unrollLoopPattern, loopReplacer).replace(deprecatedUnrollLoopPattern, deprecatedLoopReplacer);\n\t}\n\n\tfunction deprecatedLoopReplacer(match, start, end, snippet) {\n\t\tconsole.warn('WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead.');\n\t\treturn loopReplacer(match, start, end, snippet);\n\t}\n\n\tfunction loopReplacer(match, start, end, snippet) {\n\t\tvar string = '';\n\n\t\tfor (var i = parseInt(start); i < parseInt(end); i++) {\n\t\t\tstring += snippet.replace(/\\[\\s*i\\s*\\]/g, '[ ' + i + ' ]').replace(/UNROLLED_LOOP_INDEX/g, i);\n\t\t}\n\n\t\treturn string;\n\t} //\n\n\n\tfunction generatePrecision(parameters) {\n\t\tvar precisionstring = 'precision ' + parameters.precision + ' float;\\nprecision ' + parameters.precision + ' int;';\n\n\t\tif (parameters.precision === 'highp') {\n\t\t\tprecisionstring += '\\n#define HIGH_PRECISION';\n\t\t} else if (parameters.precision === 'mediump') {\n\t\t\tprecisionstring += '\\n#define MEDIUM_PRECISION';\n\t\t} else if (parameters.precision === 'lowp') {\n\t\t\tprecisionstring += '\\n#define LOW_PRECISION';\n\t\t}\n\n\t\treturn precisionstring;\n\t}\n\n\tfunction generateShadowMapTypeDefine(parameters) {\n\t\tvar shadowMapTypeDefine = 'SHADOWMAP_TYPE_BASIC';\n\n\t\tif (parameters.shadowMapType === PCFShadowMap) {\n\t\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF';\n\t\t} else if (parameters.shadowMapType === PCFSoftShadowMap) {\n\t\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_PCF_SOFT';\n\t\t} else if (parameters.shadowMapType === VSMShadowMap) {\n\t\t\tshadowMapTypeDefine = 'SHADOWMAP_TYPE_VSM';\n\t\t}\n\n\t\treturn shadowMapTypeDefine;\n\t}\n\n\tfunction generateEnvMapTypeDefine(parameters) {\n\t\tvar envMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\n\t\tif (parameters.envMap) {\n\t\t\tswitch (parameters.envMapMode) {\n\t\t\t\tcase CubeReflectionMapping:\n\t\t\t\tcase CubeRefractionMapping:\n\t\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase CubeUVReflectionMapping:\n\t\t\t\tcase CubeUVRefractionMapping:\n\t\t\t\t\tenvMapTypeDefine = 'ENVMAP_TYPE_CUBE_UV';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn envMapTypeDefine;\n\t}\n\n\tfunction generateEnvMapModeDefine(parameters) {\n\t\tvar envMapModeDefine = 'ENVMAP_MODE_REFLECTION';\n\n\t\tif (parameters.envMap) {\n\t\t\tswitch (parameters.envMapMode) {\n\t\t\t\tcase CubeRefractionMapping:\n\t\t\t\tcase CubeUVRefractionMapping:\n\t\t\t\t\tenvMapModeDefine = 'ENVMAP_MODE_REFRACTION';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn envMapModeDefine;\n\t}\n\n\tfunction generateEnvMapBlendingDefine(parameters) {\n\t\tvar envMapBlendingDefine = 'ENVMAP_BLENDING_NONE';\n\n\t\tif (parameters.envMap) {\n\t\t\tswitch (parameters.combine) {\n\t\t\t\tcase MultiplyOperation:\n\t\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MULTIPLY';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase MixOperation:\n\t\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_MIX';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase AddOperation:\n\t\t\t\t\tenvMapBlendingDefine = 'ENVMAP_BLENDING_ADD';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn envMapBlendingDefine;\n\t}\n\n\tfunction WebGLProgram(renderer, cacheKey, parameters, bindingStates) {\n\t\tvar gl = renderer.getContext();\n\t\tvar defines = parameters.defines;\n\t\tvar vertexShader = parameters.vertexShader;\n\t\tvar fragmentShader = parameters.fragmentShader;\n\t\tvar shadowMapTypeDefine = generateShadowMapTypeDefine(parameters);\n\t\tvar envMapTypeDefine = generateEnvMapTypeDefine(parameters);\n\t\tvar envMapModeDefine = generateEnvMapModeDefine(parameters);\n\t\tvar envMapBlendingDefine = generateEnvMapBlendingDefine(parameters);\n\t\tvar gammaFactorDefine = renderer.gammaFactor > 0 ? renderer.gammaFactor : 1.0;\n\t\tvar customExtensions = parameters.isWebGL2 ? '' : generateExtensions(parameters);\n\t\tvar customDefines = generateDefines(defines);\n\t\tvar program = gl.createProgram();\n\t\tvar prefixVertex, prefixFragment;\n\t\tvar versionString = parameters.glslVersion ? '#version ' + parameters.glslVersion + '\\n' : '';\n\n\t\tif (parameters.isRawShaderMaterial) {\n\t\t\tprefixVertex = [customDefines].filter(filterEmptyLine).join('\\n');\n\n\t\t\tif (prefixVertex.length > 0) {\n\t\t\t\tprefixVertex += '\\n';\n\t\t\t}\n\n\t\t\tprefixFragment = [customExtensions, customDefines].filter(filterEmptyLine).join('\\n');\n\n\t\t\tif (prefixFragment.length > 0) {\n\t\t\t\tprefixFragment += '\\n';\n\t\t\t}\n\t\t} else {\n\t\t\tprefixVertex = [generatePrecision(parameters), '#define SHADER_NAME ' + parameters.shaderName, customDefines, parameters.instancing ? '#define USE_INSTANCING' : '', parameters.instancingColor ? '#define USE_INSTANCING_COLOR' : '', parameters.supportsVertexTextures ? '#define VERTEX_TEXTURES' : '', '#define GAMMA_FACTOR ' + gammaFactorDefine, '#define MAX_BONES ' + parameters.maxBones, parameters.useFog && parameters.fog ? '#define USE_FOG' : '', parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', parameters.map ? '#define USE_MAP' : '', parameters.envMap ? '#define USE_ENVMAP' : '', parameters.envMap ? '#define ' + envMapModeDefine : '', parameters.lightMap ? '#define USE_LIGHTMAP' : '', parameters.aoMap ? '#define USE_AOMAP' : '', parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', parameters.bumpMap ? '#define USE_BUMPMAP' : '', parameters.normalMap ? '#define USE_NORMALMAP' : '', parameters.normalMap && parameters.objectSpaceNormalMap ? '#define OBJECTSPACE_NORMALMAP' : '', parameters.normalMap && parameters.tangentSpaceNormalMap ? '#define TANGENTSPACE_NORMALMAP' : '', parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', parameters.displacementMap && parameters.supportsVertexTextures ? '#define USE_DISPLACEMENTMAP' : '', parameters.specularMap ? '#define USE_SPECULARMAP' : '', parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', parameters.alphaMap ? '#define USE_ALPHAMAP' : '', parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', parameters.vertexTangents ? '#define USE_TANGENT' : '', parameters.vertexColors ? '#define USE_COLOR' : '', parameters.vertexUvs ? '#define USE_UV' : '', parameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', parameters.flatShading ? '#define FLAT_SHADED' : '', parameters.skinning ? '#define USE_SKINNING' : '', parameters.useVertexTexture ? '#define BONE_TEXTURE' : '', parameters.morphTargets ? '#define USE_MORPHTARGETS' : '', parameters.morphNormals && parameters.flatShading === false ? '#define USE_MORPHNORMALS' : '', parameters.doubleSided ? '#define DOUBLE_SIDED' : '', parameters.flipSided ? '#define FLIP_SIDED' : '', parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', parameters.sizeAttenuation ? '#define USE_SIZEATTENUATION' : '', parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '', 'uniform mat4 modelMatrix;', 'uniform mat4 modelViewMatrix;', 'uniform mat4 projectionMatrix;', 'uniform mat4 viewMatrix;', 'uniform mat3 normalMatrix;', 'uniform vec3 cameraPosition;', 'uniform bool isOrthographic;', '#ifdef USE_INSTANCING', '\tattribute mat4 instanceMatrix;', '#endif', '#ifdef USE_INSTANCING_COLOR', '\tattribute vec3 instanceColor;', '#endif', 'attribute vec3 position;', 'attribute vec3 normal;', 'attribute vec2 uv;', '#ifdef USE_TANGENT', '\tattribute vec4 tangent;', '#endif', '#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(filterEmptyLine).join('\\n');\n\t\t\tprefixFragment = [customExtensions, generatePrecision(parameters), '#define SHADER_NAME ' + parameters.shaderName, customDefines, parameters.alphaTest ? '#define ALPHATEST ' + parameters.alphaTest + (parameters.alphaTest % 1 ? '' : '.0') : '', // add '.0' if integer\n\t\t\t'#define GAMMA_FACTOR ' + gammaFactorDefine, parameters.useFog && parameters.fog ? '#define USE_FOG' : '', parameters.useFog && parameters.fogExp2 ? '#define FOG_EXP2' : '', parameters.map ? '#define USE_MAP' : '', parameters.matcap ? '#define USE_MATCAP' : '', parameters.envMap ? '#define USE_ENVMAP' : '', parameters.envMap ? '#define ' + envMapTypeDefine : '', parameters.envMap ? '#define ' + envMapModeDefine : '', parameters.envMap ? '#define ' + envMapBlendingDefine : '', parameters.lightMap ? '#define USE_LIGHTMAP' : '', parameters.aoMap ? '#define USE_AOMAP' : '', parameters.emissiveMap ? '#define USE_EMISSIVEMAP' : '', parameters.bumpMap ? '#define USE_BUMPMAP' : '', parameters.normalMap ? '#define USE_NORMALMAP' : '', parameters.normalMap && parameters.objectSpaceNormalMap ? '#define OBJECTSPACE_NORMALMAP' : '', parameters.normalMap && parameters.tangentSpaceNormalMap ? '#define TANGENTSPACE_NORMALMAP' : '', parameters.clearcoatMap ? '#define USE_CLEARCOATMAP' : '', parameters.clearcoatRoughnessMap ? '#define USE_CLEARCOAT_ROUGHNESSMAP' : '', parameters.clearcoatNormalMap ? '#define USE_CLEARCOAT_NORMALMAP' : '', parameters.specularMap ? '#define USE_SPECULARMAP' : '', parameters.roughnessMap ? '#define USE_ROUGHNESSMAP' : '', parameters.metalnessMap ? '#define USE_METALNESSMAP' : '', parameters.alphaMap ? '#define USE_ALPHAMAP' : '', parameters.sheen ? '#define USE_SHEEN' : '', parameters.transmissionMap ? '#define USE_TRANSMISSIONMAP' : '', parameters.vertexTangents ? '#define USE_TANGENT' : '', parameters.vertexColors || parameters.instancingColor ? '#define USE_COLOR' : '', parameters.vertexUvs ? '#define USE_UV' : '', parameters.uvsVertexOnly ? '#define UVS_VERTEX_ONLY' : '', parameters.gradientMap ? '#define USE_GRADIENTMAP' : '', parameters.flatShading ? '#define FLAT_SHADED' : '', parameters.doubleSided ? '#define DOUBLE_SIDED' : '', parameters.flipSided ? '#define FLIP_SIDED' : '', parameters.shadowMapEnabled ? '#define USE_SHADOWMAP' : '', parameters.shadowMapEnabled ? '#define ' + shadowMapTypeDefine : '', parameters.premultipliedAlpha ? '#define PREMULTIPLIED_ALPHA' : '', parameters.physicallyCorrectLights ? '#define PHYSICALLY_CORRECT_LIGHTS' : '', parameters.logarithmicDepthBuffer ? '#define USE_LOGDEPTHBUF' : '', parameters.logarithmicDepthBuffer && parameters.rendererExtensionFragDepth ? '#define USE_LOGDEPTHBUF_EXT' : '', (parameters.extensionShaderTextureLOD || parameters.envMap) && parameters.rendererExtensionShaderTextureLod ? '#define TEXTURE_LOD_EXT' : '', 'uniform mat4 viewMatrix;', 'uniform vec3 cameraPosition;', 'uniform bool isOrthographic;', parameters.toneMapping !== NoToneMapping ? '#define TONE_MAPPING' : '', parameters.toneMapping !== NoToneMapping ? ShaderChunk['tonemapping_pars_fragment'] : '', // this code is required here because it is used by the toneMapping() function defined below\n\t\t\tparameters.toneMapping !== NoToneMapping ? getToneMappingFunction('toneMapping', parameters.toneMapping) : '', parameters.dithering ? '#define DITHERING' : '', ShaderChunk['encodings_pars_fragment'], // this code is required here because it is used by the various encoding/decoding function defined below\n\t\t\tparameters.map ? getTexelDecodingFunction('mapTexelToLinear', parameters.mapEncoding) : '', parameters.matcap ? getTexelDecodingFunction('matcapTexelToLinear', parameters.matcapEncoding) : '', parameters.envMap ? getTexelDecodingFunction('envMapTexelToLinear', parameters.envMapEncoding) : '', parameters.emissiveMap ? getTexelDecodingFunction('emissiveMapTexelToLinear', parameters.emissiveMapEncoding) : '', parameters.lightMap ? getTexelDecodingFunction('lightMapTexelToLinear', parameters.lightMapEncoding) : '', getTexelEncodingFunction('linearToOutputTexel', parameters.outputEncoding), parameters.depthPacking ? '#define DEPTH_PACKING ' + parameters.depthPacking : '', '\\n'].filter(filterEmptyLine).join('\\n');\n\t\t}\n\n\t\tvertexShader = resolveIncludes(vertexShader);\n\t\tvertexShader = replaceLightNums(vertexShader, parameters);\n\t\tvertexShader = replaceClippingPlaneNums(vertexShader, parameters);\n\t\tfragmentShader = resolveIncludes(fragmentShader);\n\t\tfragmentShader = replaceLightNums(fragmentShader, parameters);\n\t\tfragmentShader = replaceClippingPlaneNums(fragmentShader, parameters);\n\t\tvertexShader = unrollLoops(vertexShader);\n\t\tfragmentShader = unrollLoops(fragmentShader);\n\n\t\tif (parameters.isWebGL2 && parameters.isRawShaderMaterial !== true) {\n\t\t\t// GLSL 3.0 conversion for built-in materials and ShaderMaterial\n\t\t\tversionString = '#version 300 es\\n';\n\t\t\tprefixVertex = ['#define attribute in', '#define varying out', '#define texture2D texture'].join('\\n') + '\\n' + prefixVertex;\n\t\t\tprefixFragment = ['#define varying in', parameters.glslVersion === GLSL3 ? '' : 'out highp vec4 pc_fragColor;', parameters.glslVersion === GLSL3 ? '' : '#define gl_FragColor pc_fragColor', '#define gl_FragDepthEXT gl_FragDepth', '#define texture2D texture', '#define textureCube texture', '#define texture2DProj textureProj', '#define texture2DLodEXT textureLod', '#define texture2DProjLodEXT textureProjLod', '#define textureCubeLodEXT textureLod', '#define texture2DGradEXT textureGrad', '#define texture2DProjGradEXT textureProjGrad', '#define textureCubeGradEXT textureGrad'].join('\\n') + '\\n' + prefixFragment;\n\t\t}\n\n\t\tvar vertexGlsl = versionString + prefixVertex + vertexShader;\n\t\tvar fragmentGlsl = versionString + prefixFragment + fragmentShader; // console.log( '*VERTEX*', vertexGlsl );\n\t\t// console.log( '*FRAGMENT*', fragmentGlsl );\n\n\t\tvar glVertexShader = WebGLShader(gl, 35633, vertexGlsl);\n\t\tvar glFragmentShader = WebGLShader(gl, 35632, fragmentGlsl);\n\t\tgl.attachShader(program, glVertexShader);\n\t\tgl.attachShader(program, glFragmentShader); // Force a particular attribute to index 0.\n\n\t\tif (parameters.index0AttributeName !== undefined) {\n\t\t\tgl.bindAttribLocation(program, 0, parameters.index0AttributeName);\n\t\t} else if (parameters.morphTargets === true) {\n\t\t\t// programs with morphTargets displace position out of attribute 0\n\t\t\tgl.bindAttribLocation(program, 0, 'position');\n\t\t}\n\n\t\tgl.linkProgram(program); // check for link errors\n\n\t\tif (renderer.debug.checkShaderErrors) {\n\t\t\tvar programLog = gl.getProgramInfoLog(program).trim();\n\t\t\tvar vertexLog = gl.getShaderInfoLog(glVertexShader).trim();\n\t\t\tvar fragmentLog = gl.getShaderInfoLog(glFragmentShader).trim();\n\t\t\tvar runnable = true;\n\t\t\tvar haveDiagnostics = true;\n\n\t\t\tif (gl.getProgramParameter(program, 35714) === false) {\n\t\t\t\trunnable = false;\n\t\t\t\tvar vertexErrors = getShaderErrors(gl, glVertexShader, 'vertex');\n\t\t\t\tvar fragmentErrors = getShaderErrors(gl, glFragmentShader, 'fragment');\n\t\t\t\tconsole.error('THREE.WebGLProgram: shader error: ', gl.getError(), '35715', gl.getProgramParameter(program, 35715), 'gl.getProgramInfoLog', programLog, vertexErrors, fragmentErrors);\n\t\t\t} else if (programLog !== '') {\n\t\t\t\tconsole.warn('THREE.WebGLProgram: gl.getProgramInfoLog()', programLog);\n\t\t\t} else if (vertexLog === '' || fragmentLog === '') {\n\t\t\t\thaveDiagnostics = false;\n\t\t\t}\n\n\t\t\tif (haveDiagnostics) {\n\t\t\t\tthis.diagnostics = {\n\t\t\t\t\trunnable: runnable,\n\t\t\t\t\tprogramLog: programLog,\n\t\t\t\t\tvertexShader: {\n\t\t\t\t\t\tlog: vertexLog,\n\t\t\t\t\t\tprefix: prefixVertex\n\t\t\t\t\t},\n\t\t\t\t\tfragmentShader: {\n\t\t\t\t\t\tlog: fragmentLog,\n\t\t\t\t\t\tprefix: prefixFragment\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t} // Clean up\n\t\t// Crashes in iOS9 and iOS10. #18402\n\t\t// gl.detachShader( program, glVertexShader );\n\t\t// gl.detachShader( program, glFragmentShader );\n\n\n\t\tgl.deleteShader(glVertexShader);\n\t\tgl.deleteShader(glFragmentShader); // set up caching for uniform locations\n\n\t\tvar cachedUniforms;\n\n\t\tthis.getUniforms = function () {\n\t\t\tif (cachedUniforms === undefined) {\n\t\t\t\tcachedUniforms = new WebGLUniforms(gl, program);\n\t\t\t}\n\n\t\t\treturn cachedUniforms;\n\t\t}; // set up caching for attribute locations\n\n\n\t\tvar cachedAttributes;\n\n\t\tthis.getAttributes = function () {\n\t\t\tif (cachedAttributes === undefined) {\n\t\t\t\tcachedAttributes = fetchAttributeLocations(gl, program);\n\t\t\t}\n\n\t\t\treturn cachedAttributes;\n\t\t}; // free resource\n\n\n\t\tthis.destroy = function () {\n\t\t\tbindingStates.releaseStatesOfProgram(this);\n\t\t\tgl.deleteProgram(program);\n\t\t\tthis.program = undefined;\n\t\t}; //\n\n\n\t\tthis.name = parameters.shaderName;\n\t\tthis.id = programIdCount++;\n\t\tthis.cacheKey = cacheKey;\n\t\tthis.usedTimes = 1;\n\t\tthis.program = program;\n\t\tthis.vertexShader = glVertexShader;\n\t\tthis.fragmentShader = glFragmentShader;\n\t\treturn this;\n\t}\n\n\tfunction WebGLPrograms(renderer, cubemaps, extensions, capabilities, bindingStates, clipping) {\n\t\tvar programs = [];\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar logarithmicDepthBuffer = capabilities.logarithmicDepthBuffer;\n\t\tvar floatVertexTextures = capabilities.floatVertexTextures;\n\t\tvar maxVertexUniforms = capabilities.maxVertexUniforms;\n\t\tvar vertexTextures = capabilities.vertexTextures;\n\t\tvar precision = capabilities.precision;\n\t\tvar shaderIDs = {\n\t\t\tMeshDepthMaterial: 'depth',\n\t\t\tMeshDistanceMaterial: 'distanceRGBA',\n\t\t\tMeshNormalMaterial: 'normal',\n\t\t\tMeshBasicMaterial: 'basic',\n\t\t\tMeshLambertMaterial: 'lambert',\n\t\t\tMeshPhongMaterial: 'phong',\n\t\t\tMeshToonMaterial: 'toon',\n\t\t\tMeshStandardMaterial: 'physical',\n\t\t\tMeshPhysicalMaterial: 'physical',\n\t\t\tMeshMatcapMaterial: 'matcap',\n\t\t\tLineBasicMaterial: 'basic',\n\t\t\tLineDashedMaterial: 'dashed',\n\t\t\tPointsMaterial: 'points',\n\t\t\tShadowMaterial: 'shadow',\n\t\t\tSpriteMaterial: 'sprite'\n\t\t};\n\t\tvar parameterNames = ['precision', 'isWebGL2', 'supportsVertexTextures', 'outputEncoding', 'instancing', 'instancingColor', 'map', 'mapEncoding', 'matcap', 'matcapEncoding', 'envMap', 'envMapMode', 'envMapEncoding', 'envMapCubeUV', 'lightMap', 'lightMapEncoding', 'aoMap', 'emissiveMap', 'emissiveMapEncoding', 'bumpMap', 'normalMap', 'objectSpaceNormalMap', 'tangentSpaceNormalMap', 'clearcoatMap', 'clearcoatRoughnessMap', 'clearcoatNormalMap', 'displacementMap', 'specularMap', 'roughnessMap', 'metalnessMap', 'gradientMap', 'alphaMap', 'combine', 'vertexColors', 'vertexTangents', 'vertexUvs', 'uvsVertexOnly', 'fog', 'useFog', 'fogExp2', 'flatShading', 'sizeAttenuation', 'logarithmicDepthBuffer', 'skinning', 'maxBones', 'useVertexTexture', 'morphTargets', 'morphNormals', 'maxMorphTargets', 'maxMorphNormals', 'premultipliedAlpha', 'numDirLights', 'numPointLights', 'numSpotLights', 'numHemiLights', 'numRectAreaLights', 'numDirLightShadows', 'numPointLightShadows', 'numSpotLightShadows', 'shadowMapEnabled', 'shadowMapType', 'toneMapping', 'physicallyCorrectLights', 'alphaTest', 'doubleSided', 'flipSided', 'numClippingPlanes', 'numClipIntersection', 'depthPacking', 'dithering', 'sheen', 'transmissionMap'];\n\n\t\tfunction getMaxBones(object) {\n\t\t\tvar skeleton = object.skeleton;\n\t\t\tvar bones = skeleton.bones;\n\n\t\t\tif (floatVertexTextures) {\n\t\t\t\treturn 1024;\n\t\t\t} else {\n\t\t\t\t// default for when object is not specified\n\t\t\t\t// ( for example when prebuilding shader to be used with multiple objects )\n\t\t\t\t//\n\t\t\t\t//\t- leave some extra space for other uniforms\n\t\t\t\t//\t- limit here is ANGLE's 254 max uniform vectors\n\t\t\t\t//\t\t(up to 54 should be safe)\n\t\t\t\tvar nVertexUniforms = maxVertexUniforms;\n\t\t\t\tvar nVertexMatrices = Math.floor((nVertexUniforms - 20) / 4);\n\t\t\t\tvar maxBones = Math.min(nVertexMatrices, bones.length);\n\n\t\t\t\tif (maxBones < bones.length) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Skeleton has ' + bones.length + ' bones. This GPU supports ' + maxBones + '.');\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn maxBones;\n\t\t\t}\n\t\t}\n\n\t\tfunction getTextureEncodingFromMap(map) {\n\t\t\tvar encoding;\n\n\t\t\tif (map && map.isTexture) {\n\t\t\t\tencoding = map.encoding;\n\t\t\t} else if (map && map.isWebGLRenderTarget) {\n\t\t\t\tconsole.warn('THREE.WebGLPrograms.getTextureEncodingFromMap: don\\'t use render targets as textures. Use their .texture property instead.');\n\t\t\t\tencoding = map.texture.encoding;\n\t\t\t} else {\n\t\t\t\tencoding = LinearEncoding;\n\t\t\t}\n\n\t\t\treturn encoding;\n\t\t}\n\n\t\tfunction getParameters(material, lights, shadows, scene, object) {\n\t\t\tvar fog = scene.fog;\n\t\t\tvar environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tvar envMap = cubemaps.get(material.envMap || environment);\n\t\t\tvar shaderID = shaderIDs[material.type]; // heuristics to create shader parameters according to lights in the scene\n\t\t\t// (not to blow over maxLights budget)\n\n\t\t\tvar maxBones = object.isSkinnedMesh ? getMaxBones(object) : 0;\n\n\t\t\tif (material.precision !== null) {\n\t\t\t\tprecision = capabilities.getMaxPrecision(material.precision);\n\n\t\t\t\tif (precision !== material.precision) {\n\t\t\t\t\tconsole.warn('THREE.WebGLProgram.getParameters:', material.precision, 'not supported, using', precision, 'instead.');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar vertexShader, fragmentShader;\n\n\t\t\tif (shaderID) {\n\t\t\t\tvar shader = ShaderLib[shaderID];\n\t\t\t\tvertexShader = shader.vertexShader;\n\t\t\t\tfragmentShader = shader.fragmentShader;\n\t\t\t} else {\n\t\t\t\tvertexShader = material.vertexShader;\n\t\t\t\tfragmentShader = material.fragmentShader;\n\t\t\t}\n\n\t\t\tvar currentRenderTarget = renderer.getRenderTarget();\n\t\t\tvar parameters = {\n\t\t\t\tisWebGL2: isWebGL2,\n\t\t\t\tshaderID: shaderID,\n\t\t\t\tshaderName: material.type,\n\t\t\t\tvertexShader: vertexShader,\n\t\t\t\tfragmentShader: fragmentShader,\n\t\t\t\tdefines: material.defines,\n\t\t\t\tisRawShaderMaterial: material.isRawShaderMaterial === true,\n\t\t\t\tglslVersion: material.glslVersion,\n\t\t\t\tprecision: precision,\n\t\t\t\tinstancing: object.isInstancedMesh === true,\n\t\t\t\tinstancingColor: object.isInstancedMesh === true && object.instanceColor !== null,\n\t\t\t\tsupportsVertexTextures: vertexTextures,\n\t\t\t\toutputEncoding: currentRenderTarget !== null ? getTextureEncodingFromMap(currentRenderTarget.texture) : renderer.outputEncoding,\n\t\t\t\tmap: !!material.map,\n\t\t\t\tmapEncoding: getTextureEncodingFromMap(material.map),\n\t\t\t\tmatcap: !!material.matcap,\n\t\t\t\tmatcapEncoding: getTextureEncodingFromMap(material.matcap),\n\t\t\t\tenvMap: !!envMap,\n\t\t\t\tenvMapMode: envMap && envMap.mapping,\n\t\t\t\tenvMapEncoding: getTextureEncodingFromMap(envMap),\n\t\t\t\tenvMapCubeUV: !!envMap && (envMap.mapping === CubeUVReflectionMapping || envMap.mapping === CubeUVRefractionMapping),\n\t\t\t\tlightMap: !!material.lightMap,\n\t\t\t\tlightMapEncoding: getTextureEncodingFromMap(material.lightMap),\n\t\t\t\taoMap: !!material.aoMap,\n\t\t\t\temissiveMap: !!material.emissiveMap,\n\t\t\t\temissiveMapEncoding: getTextureEncodingFromMap(material.emissiveMap),\n\t\t\t\tbumpMap: !!material.bumpMap,\n\t\t\t\tnormalMap: !!material.normalMap,\n\t\t\t\tobjectSpaceNormalMap: material.normalMapType === ObjectSpaceNormalMap,\n\t\t\t\ttangentSpaceNormalMap: material.normalMapType === TangentSpaceNormalMap,\n\t\t\t\tclearcoatMap: !!material.clearcoatMap,\n\t\t\t\tclearcoatRoughnessMap: !!material.clearcoatRoughnessMap,\n\t\t\t\tclearcoatNormalMap: !!material.clearcoatNormalMap,\n\t\t\t\tdisplacementMap: !!material.displacementMap,\n\t\t\t\troughnessMap: !!material.roughnessMap,\n\t\t\t\tmetalnessMap: !!material.metalnessMap,\n\t\t\t\tspecularMap: !!material.specularMap,\n\t\t\t\talphaMap: !!material.alphaMap,\n\t\t\t\tgradientMap: !!material.gradientMap,\n\t\t\t\tsheen: !!material.sheen,\n\t\t\t\ttransmissionMap: !!material.transmissionMap,\n\t\t\t\tcombine: material.combine,\n\t\t\t\tvertexTangents: material.normalMap && material.vertexTangents,\n\t\t\t\tvertexColors: material.vertexColors,\n\t\t\t\tvertexUvs: !!material.map || !!material.bumpMap || !!material.normalMap || !!material.specularMap || !!material.alphaMap || !!material.emissiveMap || !!material.roughnessMap || !!material.metalnessMap || !!material.clearcoatMap || !!material.clearcoatRoughnessMap || !!material.clearcoatNormalMap || !!material.displacementMap || !!material.transmissionMap,\n\t\t\t\tuvsVertexOnly: !(!!material.map || !!material.bumpMap || !!material.normalMap || !!material.specularMap || !!material.alphaMap || !!material.emissiveMap || !!material.roughnessMap || !!material.metalnessMap || !!material.clearcoatNormalMap || !!material.transmissionMap) && !!material.displacementMap,\n\t\t\t\tfog: !!fog,\n\t\t\t\tuseFog: material.fog,\n\t\t\t\tfogExp2: fog && fog.isFogExp2,\n\t\t\t\tflatShading: material.flatShading,\n\t\t\t\tsizeAttenuation: material.sizeAttenuation,\n\t\t\t\tlogarithmicDepthBuffer: logarithmicDepthBuffer,\n\t\t\t\tskinning: material.skinning && maxBones > 0,\n\t\t\t\tmaxBones: maxBones,\n\t\t\t\tuseVertexTexture: floatVertexTextures,\n\t\t\t\tmorphTargets: material.morphTargets,\n\t\t\t\tmorphNormals: material.morphNormals,\n\t\t\t\tmaxMorphTargets: renderer.maxMorphTargets,\n\t\t\t\tmaxMorphNormals: renderer.maxMorphNormals,\n\t\t\t\tnumDirLights: lights.directional.length,\n\t\t\t\tnumPointLights: lights.point.length,\n\t\t\t\tnumSpotLights: lights.spot.length,\n\t\t\t\tnumRectAreaLights: lights.rectArea.length,\n\t\t\t\tnumHemiLights: lights.hemi.length,\n\t\t\t\tnumDirLightShadows: lights.directionalShadowMap.length,\n\t\t\t\tnumPointLightShadows: lights.pointShadowMap.length,\n\t\t\t\tnumSpotLightShadows: lights.spotShadowMap.length,\n\t\t\t\tnumClippingPlanes: clipping.numPlanes,\n\t\t\t\tnumClipIntersection: clipping.numIntersection,\n\t\t\t\tdithering: material.dithering,\n\t\t\t\tshadowMapEnabled: renderer.shadowMap.enabled && shadows.length > 0,\n\t\t\t\tshadowMapType: renderer.shadowMap.type,\n\t\t\t\ttoneMapping: material.toneMapped ? renderer.toneMapping : NoToneMapping,\n\t\t\t\tphysicallyCorrectLights: renderer.physicallyCorrectLights,\n\t\t\t\tpremultipliedAlpha: material.premultipliedAlpha,\n\t\t\t\talphaTest: material.alphaTest,\n\t\t\t\tdoubleSided: material.side === DoubleSide,\n\t\t\t\tflipSided: material.side === BackSide,\n\t\t\t\tdepthPacking: material.depthPacking !== undefined ? material.depthPacking : false,\n\t\t\t\tindex0AttributeName: material.index0AttributeName,\n\t\t\t\textensionDerivatives: material.extensions && material.extensions.derivatives,\n\t\t\t\textensionFragDepth: material.extensions && material.extensions.fragDepth,\n\t\t\t\textensionDrawBuffers: material.extensions && material.extensions.drawBuffers,\n\t\t\t\textensionShaderTextureLOD: material.extensions && material.extensions.shaderTextureLOD,\n\t\t\t\trendererExtensionFragDepth: isWebGL2 || extensions.has('EXT_frag_depth'),\n\t\t\t\trendererExtensionDrawBuffers: isWebGL2 || extensions.has('WEBGL_draw_buffers'),\n\t\t\t\trendererExtensionShaderTextureLod: isWebGL2 || extensions.has('EXT_shader_texture_lod'),\n\t\t\t\tcustomProgramCacheKey: material.customProgramCacheKey()\n\t\t\t};\n\t\t\treturn parameters;\n\t\t}\n\n\t\tfunction getProgramCacheKey(parameters) {\n\t\t\tvar array = [];\n\n\t\t\tif (parameters.shaderID) {\n\t\t\t\tarray.push(parameters.shaderID);\n\t\t\t} else {\n\t\t\t\tarray.push(parameters.fragmentShader);\n\t\t\t\tarray.push(parameters.vertexShader);\n\t\t\t}\n\n\t\t\tif (parameters.defines !== undefined) {\n\t\t\t\tfor (var name in parameters.defines) {\n\t\t\t\t\tarray.push(name);\n\t\t\t\t\tarray.push(parameters.defines[name]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (parameters.isRawShaderMaterial === false) {\n\t\t\t\tfor (var i = 0; i < parameterNames.length; i++) {\n\t\t\t\t\tarray.push(parameters[parameterNames[i]]);\n\t\t\t\t}\n\n\t\t\t\tarray.push(renderer.outputEncoding);\n\t\t\t\tarray.push(renderer.gammaFactor);\n\t\t\t}\n\n\t\t\tarray.push(parameters.customProgramCacheKey);\n\t\t\treturn array.join();\n\t\t}\n\n\t\tfunction getUniforms(material) {\n\t\t\tvar shaderID = shaderIDs[material.type];\n\t\t\tvar uniforms;\n\n\t\t\tif (shaderID) {\n\t\t\t\tvar shader = ShaderLib[shaderID];\n\t\t\t\tuniforms = UniformsUtils.clone(shader.uniforms);\n\t\t\t} else {\n\t\t\t\tuniforms = material.uniforms;\n\t\t\t}\n\n\t\t\treturn uniforms;\n\t\t}\n\n\t\tfunction acquireProgram(parameters, cacheKey) {\n\t\t\tvar program; // Check if code has been already compiled\n\n\t\t\tfor (var p = 0, pl = programs.length; p < pl; p++) {\n\t\t\t\tvar preexistingProgram = programs[p];\n\n\t\t\t\tif (preexistingProgram.cacheKey === cacheKey) {\n\t\t\t\t\tprogram = preexistingProgram;\n\t\t\t\t\t++program.usedTimes;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (program === undefined) {\n\t\t\t\tprogram = new WebGLProgram(renderer, cacheKey, parameters, bindingStates);\n\t\t\t\tprograms.push(program);\n\t\t\t}\n\n\t\t\treturn program;\n\t\t}\n\n\t\tfunction releaseProgram(program) {\n\t\t\tif (--program.usedTimes === 0) {\n\t\t\t\t// Remove from unordered set\n\t\t\t\tvar i = programs.indexOf(program);\n\t\t\t\tprograms[i] = programs[programs.length - 1];\n\t\t\t\tprograms.pop(); // Free WebGL resources\n\n\t\t\t\tprogram.destroy();\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tgetParameters: getParameters,\n\t\t\tgetProgramCacheKey: getProgramCacheKey,\n\t\t\tgetUniforms: getUniforms,\n\t\t\tacquireProgram: acquireProgram,\n\t\t\treleaseProgram: releaseProgram,\n\t\t\t// Exposed for resource monitoring & error feedback via renderer.info:\n\t\t\tprograms: programs\n\t\t};\n\t}\n\n\tfunction WebGLProperties() {\n\t\tvar properties = new WeakMap();\n\n\t\tfunction get(object) {\n\t\t\tvar map = properties.get(object);\n\n\t\t\tif (map === undefined) {\n\t\t\t\tmap = {};\n\t\t\t\tproperties.set(object, map);\n\t\t\t}\n\n\t\t\treturn map;\n\t\t}\n\n\t\tfunction remove(object) {\n\t\t\tproperties.delete(object);\n\t\t}\n\n\t\tfunction update(object, key, value) {\n\t\t\tproperties.get(object)[key] = value;\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\tproperties = new WeakMap();\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tremove: remove,\n\t\t\tupdate: update,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\tfunction painterSortStable(a, b) {\n\t\tif (a.groupOrder !== b.groupOrder) {\n\t\t\treturn a.groupOrder - b.groupOrder;\n\t\t} else if (a.renderOrder !== b.renderOrder) {\n\t\t\treturn a.renderOrder - b.renderOrder;\n\t\t} else if (a.program !== b.program) {\n\t\t\treturn a.program.id - b.program.id;\n\t\t} else if (a.material.id !== b.material.id) {\n\t\t\treturn a.material.id - b.material.id;\n\t\t} else if (a.z !== b.z) {\n\t\t\treturn a.z - b.z;\n\t\t} else {\n\t\t\treturn a.id - b.id;\n\t\t}\n\t}\n\n\tfunction reversePainterSortStable(a, b) {\n\t\tif (a.groupOrder !== b.groupOrder) {\n\t\t\treturn a.groupOrder - b.groupOrder;\n\t\t} else if (a.renderOrder !== b.renderOrder) {\n\t\t\treturn a.renderOrder - b.renderOrder;\n\t\t} else if (a.z !== b.z) {\n\t\t\treturn b.z - a.z;\n\t\t} else {\n\t\t\treturn a.id - b.id;\n\t\t}\n\t}\n\n\tfunction WebGLRenderList(properties) {\n\t\tvar renderItems = [];\n\t\tvar renderItemsIndex = 0;\n\t\tvar opaque = [];\n\t\tvar transparent = [];\n\t\tvar defaultProgram = {\n\t\t\tid: -1\n\t\t};\n\n\t\tfunction init() {\n\t\t\trenderItemsIndex = 0;\n\t\t\topaque.length = 0;\n\t\t\ttransparent.length = 0;\n\t\t}\n\n\t\tfunction getNextRenderItem(object, geometry, material, groupOrder, z, group) {\n\t\t\tvar renderItem = renderItems[renderItemsIndex];\n\t\t\tvar materialProperties = properties.get(material);\n\n\t\t\tif (renderItem === undefined) {\n\t\t\t\trenderItem = {\n\t\t\t\t\tid: object.id,\n\t\t\t\t\tobject: object,\n\t\t\t\t\tgeometry: geometry,\n\t\t\t\t\tmaterial: material,\n\t\t\t\t\tprogram: materialProperties.program || defaultProgram,\n\t\t\t\t\tgroupOrder: groupOrder,\n\t\t\t\t\trenderOrder: object.renderOrder,\n\t\t\t\t\tz: z,\n\t\t\t\t\tgroup: group\n\t\t\t\t};\n\t\t\t\trenderItems[renderItemsIndex] = renderItem;\n\t\t\t} else {\n\t\t\t\trenderItem.id = object.id;\n\t\t\t\trenderItem.object = object;\n\t\t\t\trenderItem.geometry = geometry;\n\t\t\t\trenderItem.material = material;\n\t\t\t\trenderItem.program = materialProperties.program || defaultProgram;\n\t\t\t\trenderItem.groupOrder = groupOrder;\n\t\t\t\trenderItem.renderOrder = object.renderOrder;\n\t\t\t\trenderItem.z = z;\n\t\t\t\trenderItem.group = group;\n\t\t\t}\n\n\t\t\trenderItemsIndex++;\n\t\t\treturn renderItem;\n\t\t}\n\n\t\tfunction push(object, geometry, material, groupOrder, z, group) {\n\t\t\tvar renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);\n\t\t\t(material.transparent === true ? transparent : opaque).push(renderItem);\n\t\t}\n\n\t\tfunction unshift(object, geometry, material, groupOrder, z, group) {\n\t\t\tvar renderItem = getNextRenderItem(object, geometry, material, groupOrder, z, group);\n\t\t\t(material.transparent === true ? transparent : opaque).unshift(renderItem);\n\t\t}\n\n\t\tfunction sort(customOpaqueSort, customTransparentSort) {\n\t\t\tif (opaque.length > 1) opaque.sort(customOpaqueSort || painterSortStable);\n\t\t\tif (transparent.length > 1) transparent.sort(customTransparentSort || reversePainterSortStable);\n\t\t}\n\n\t\tfunction finish() {\n\t\t\t// Clear references from inactive renderItems in the list\n\t\t\tfor (var i = renderItemsIndex, il = renderItems.length; i < il; i++) {\n\t\t\t\tvar renderItem = renderItems[i];\n\t\t\t\tif (renderItem.id === null) break;\n\t\t\t\trenderItem.id = null;\n\t\t\t\trenderItem.object = null;\n\t\t\t\trenderItem.geometry = null;\n\t\t\t\trenderItem.material = null;\n\t\t\t\trenderItem.program = null;\n\t\t\t\trenderItem.group = null;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\topaque: opaque,\n\t\t\ttransparent: transparent,\n\t\t\tinit: init,\n\t\t\tpush: push,\n\t\t\tunshift: unshift,\n\t\t\tfinish: finish,\n\t\t\tsort: sort\n\t\t};\n\t}\n\n\tfunction WebGLRenderLists(properties) {\n\t\tvar lists = new WeakMap();\n\n\t\tfunction get(scene, camera) {\n\t\t\tvar cameras = lists.get(scene);\n\t\t\tvar list;\n\n\t\t\tif (cameras === undefined) {\n\t\t\t\tlist = new WebGLRenderList(properties);\n\t\t\t\tlists.set(scene, new WeakMap());\n\t\t\t\tlists.get(scene).set(camera, list);\n\t\t\t} else {\n\t\t\t\tlist = cameras.get(camera);\n\n\t\t\t\tif (list === undefined) {\n\t\t\t\t\tlist = new WebGLRenderList(properties);\n\t\t\t\t\tcameras.set(camera, list);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn list;\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\tlists = new WeakMap();\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\tfunction UniformsCache() {\n\t\tvar lights = {};\n\t\treturn {\n\t\t\tget: function get(light) {\n\t\t\t\tif (lights[light.id] !== undefined) {\n\t\t\t\t\treturn lights[light.id];\n\t\t\t\t}\n\n\t\t\t\tvar uniforms;\n\n\t\t\t\tswitch (light.type) {\n\t\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\t\tcolor: new Color()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'SpotLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\t\tconeCos: 0,\n\t\t\t\t\t\t\tpenumbraCos: 0,\n\t\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'PointLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\t\tdistance: 0,\n\t\t\t\t\t\t\tdecay: 0\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'HemisphereLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tdirection: new Vector3(),\n\t\t\t\t\t\t\tskyColor: new Color(),\n\t\t\t\t\t\t\tgroundColor: new Color()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'RectAreaLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tcolor: new Color(),\n\t\t\t\t\t\t\tposition: new Vector3(),\n\t\t\t\t\t\t\thalfWidth: new Vector3(),\n\t\t\t\t\t\t\thalfHeight: new Vector3()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tlights[light.id] = uniforms;\n\t\t\t\treturn uniforms;\n\t\t\t}\n\t\t};\n\t}\n\n\tfunction ShadowUniformsCache() {\n\t\tvar lights = {};\n\t\treturn {\n\t\t\tget: function get(light) {\n\t\t\t\tif (lights[light.id] !== undefined) {\n\t\t\t\t\treturn lights[light.id];\n\t\t\t\t}\n\n\t\t\t\tvar uniforms;\n\n\t\t\t\tswitch (light.type) {\n\t\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'SpotLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\t\tshadowMapSize: new Vector2()\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'PointLight':\n\t\t\t\t\t\tuniforms = {\n\t\t\t\t\t\t\tshadowBias: 0,\n\t\t\t\t\t\t\tshadowNormalBias: 0,\n\t\t\t\t\t\t\tshadowRadius: 1,\n\t\t\t\t\t\t\tshadowMapSize: new Vector2(),\n\t\t\t\t\t\t\tshadowCameraNear: 1,\n\t\t\t\t\t\t\tshadowCameraFar: 1000\n\t\t\t\t\t\t};\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// TODO (abelnation): set RectAreaLight shadow uniforms\n\t\t\t\t}\n\n\t\t\t\tlights[light.id] = uniforms;\n\t\t\t\treturn uniforms;\n\t\t\t}\n\t\t};\n\t}\n\n\tvar nextVersion = 0;\n\n\tfunction shadowCastingLightsFirst(lightA, lightB) {\n\t\treturn (lightB.castShadow ? 1 : 0) - (lightA.castShadow ? 1 : 0);\n\t}\n\n\tfunction WebGLLights(extensions, capabilities) {\n\t\tvar cache = new UniformsCache();\n\t\tvar shadowCache = ShadowUniformsCache();\n\t\tvar state = {\n\t\t\tversion: 0,\n\t\t\thash: {\n\t\t\t\tdirectionalLength: -1,\n\t\t\t\tpointLength: -1,\n\t\t\t\tspotLength: -1,\n\t\t\t\trectAreaLength: -1,\n\t\t\t\themiLength: -1,\n\t\t\t\tnumDirectionalShadows: -1,\n\t\t\t\tnumPointShadows: -1,\n\t\t\t\tnumSpotShadows: -1\n\t\t\t},\n\t\t\tambient: [0, 0, 0],\n\t\t\tprobe: [],\n\t\t\tdirectional: [],\n\t\t\tdirectionalShadow: [],\n\t\t\tdirectionalShadowMap: [],\n\t\t\tdirectionalShadowMatrix: [],\n\t\t\tspot: [],\n\t\t\tspotShadow: [],\n\t\t\tspotShadowMap: [],\n\t\t\tspotShadowMatrix: [],\n\t\t\trectArea: [],\n\t\t\trectAreaLTC1: null,\n\t\t\trectAreaLTC2: null,\n\t\t\tpoint: [],\n\t\t\tpointShadow: [],\n\t\t\tpointShadowMap: [],\n\t\t\tpointShadowMatrix: [],\n\t\t\themi: []\n\t\t};\n\n\t\tfor (var i = 0; i < 9; i++) {\n\t\t\tstate.probe.push(new Vector3());\n\t\t}\n\n\t\tvar vector3 = new Vector3();\n\t\tvar matrix4 = new Matrix4();\n\t\tvar matrix42 = new Matrix4();\n\n\t\tfunction setup(lights) {\n\t\t\tvar r = 0,\n\t\t\t\t\tg = 0,\n\t\t\t\t\tb = 0;\n\n\t\t\tfor (var _i = 0; _i < 9; _i++) {\n\t\t\t\tstate.probe[_i].set(0, 0, 0);\n\t\t\t}\n\n\t\t\tvar directionalLength = 0;\n\t\t\tvar pointLength = 0;\n\t\t\tvar spotLength = 0;\n\t\t\tvar rectAreaLength = 0;\n\t\t\tvar hemiLength = 0;\n\t\t\tvar numDirectionalShadows = 0;\n\t\t\tvar numPointShadows = 0;\n\t\t\tvar numSpotShadows = 0;\n\t\t\tlights.sort(shadowCastingLightsFirst);\n\n\t\t\tfor (var _i2 = 0, l = lights.length; _i2 < l; _i2++) {\n\t\t\t\tvar light = lights[_i2];\n\t\t\t\tvar color = light.color;\n\t\t\t\tvar intensity = light.intensity;\n\t\t\t\tvar distance = light.distance;\n\t\t\t\tvar shadowMap = light.shadow && light.shadow.map ? light.shadow.map.texture : null;\n\n\t\t\t\tif (light.isAmbientLight) {\n\t\t\t\t\tr += color.r * intensity;\n\t\t\t\t\tg += color.g * intensity;\n\t\t\t\t\tb += color.b * intensity;\n\t\t\t\t} else if (light.isLightProbe) {\n\t\t\t\t\tfor (var j = 0; j < 9; j++) {\n\t\t\t\t\t\tstate.probe[j].addScaledVector(light.sh.coefficients[j], intensity);\n\t\t\t\t\t}\n\t\t\t\t} else if (light.isDirectionalLight) {\n\t\t\t\t\tvar uniforms = cache.get(light);\n\t\t\t\t\tuniforms.color.copy(light.color).multiplyScalar(light.intensity);\n\n\t\t\t\t\tif (light.castShadow) {\n\t\t\t\t\t\tvar shadow = light.shadow;\n\t\t\t\t\t\tvar shadowUniforms = shadowCache.get(light);\n\t\t\t\t\t\tshadowUniforms.shadowBias = shadow.bias;\n\t\t\t\t\t\tshadowUniforms.shadowNormalBias = shadow.normalBias;\n\t\t\t\t\t\tshadowUniforms.shadowRadius = shadow.radius;\n\t\t\t\t\t\tshadowUniforms.shadowMapSize = shadow.mapSize;\n\t\t\t\t\t\tstate.directionalShadow[directionalLength] = shadowUniforms;\n\t\t\t\t\t\tstate.directionalShadowMap[directionalLength] = shadowMap;\n\t\t\t\t\t\tstate.directionalShadowMatrix[directionalLength] = light.shadow.matrix;\n\t\t\t\t\t\tnumDirectionalShadows++;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.directional[directionalLength] = uniforms;\n\t\t\t\t\tdirectionalLength++;\n\t\t\t\t} else if (light.isSpotLight) {\n\t\t\t\t\tvar _uniforms = cache.get(light);\n\n\t\t\t\t\t_uniforms.position.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms.color.copy(color).multiplyScalar(intensity);\n\n\t\t\t\t\t_uniforms.distance = distance;\n\t\t\t\t\t_uniforms.coneCos = Math.cos(light.angle);\n\t\t\t\t\t_uniforms.penumbraCos = Math.cos(light.angle * (1 - light.penumbra));\n\t\t\t\t\t_uniforms.decay = light.decay;\n\n\t\t\t\t\tif (light.castShadow) {\n\t\t\t\t\t\tvar _shadow = light.shadow;\n\n\t\t\t\t\t\tvar _shadowUniforms = shadowCache.get(light);\n\n\t\t\t\t\t\t_shadowUniforms.shadowBias = _shadow.bias;\n\t\t\t\t\t\t_shadowUniforms.shadowNormalBias = _shadow.normalBias;\n\t\t\t\t\t\t_shadowUniforms.shadowRadius = _shadow.radius;\n\t\t\t\t\t\t_shadowUniforms.shadowMapSize = _shadow.mapSize;\n\t\t\t\t\t\tstate.spotShadow[spotLength] = _shadowUniforms;\n\t\t\t\t\t\tstate.spotShadowMap[spotLength] = shadowMap;\n\t\t\t\t\t\tstate.spotShadowMatrix[spotLength] = light.shadow.matrix;\n\t\t\t\t\t\tnumSpotShadows++;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.spot[spotLength] = _uniforms;\n\t\t\t\t\tspotLength++;\n\t\t\t\t} else if (light.isRectAreaLight) {\n\t\t\t\t\tvar _uniforms2 = cache.get(light); // (a) intensity is the total visible light emitted\n\t\t\t\t\t//uniforms.color.copy( color ).multiplyScalar( intensity / ( light.width * light.height * Math.PI ) );\n\t\t\t\t\t// (b) intensity is the brightness of the light\n\n\n\t\t\t\t\t_uniforms2.color.copy(color).multiplyScalar(intensity);\n\n\t\t\t\t\t_uniforms2.halfWidth.set(light.width * 0.5, 0.0, 0.0);\n\n\t\t\t\t\t_uniforms2.halfHeight.set(0.0, light.height * 0.5, 0.0);\n\n\t\t\t\t\tstate.rectArea[rectAreaLength] = _uniforms2;\n\t\t\t\t\trectAreaLength++;\n\t\t\t\t} else if (light.isPointLight) {\n\t\t\t\t\tvar _uniforms3 = cache.get(light);\n\n\t\t\t\t\t_uniforms3.color.copy(light.color).multiplyScalar(light.intensity);\n\n\t\t\t\t\t_uniforms3.distance = light.distance;\n\t\t\t\t\t_uniforms3.decay = light.decay;\n\n\t\t\t\t\tif (light.castShadow) {\n\t\t\t\t\t\tvar _shadow2 = light.shadow;\n\n\t\t\t\t\t\tvar _shadowUniforms2 = shadowCache.get(light);\n\n\t\t\t\t\t\t_shadowUniforms2.shadowBias = _shadow2.bias;\n\t\t\t\t\t\t_shadowUniforms2.shadowNormalBias = _shadow2.normalBias;\n\t\t\t\t\t\t_shadowUniforms2.shadowRadius = _shadow2.radius;\n\t\t\t\t\t\t_shadowUniforms2.shadowMapSize = _shadow2.mapSize;\n\t\t\t\t\t\t_shadowUniforms2.shadowCameraNear = _shadow2.camera.near;\n\t\t\t\t\t\t_shadowUniforms2.shadowCameraFar = _shadow2.camera.far;\n\t\t\t\t\t\tstate.pointShadow[pointLength] = _shadowUniforms2;\n\t\t\t\t\t\tstate.pointShadowMap[pointLength] = shadowMap;\n\t\t\t\t\t\tstate.pointShadowMatrix[pointLength] = light.shadow.matrix;\n\t\t\t\t\t\tnumPointShadows++;\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.point[pointLength] = _uniforms3;\n\t\t\t\t\tpointLength++;\n\t\t\t\t} else if (light.isHemisphereLight) {\n\t\t\t\t\tvar _uniforms4 = cache.get(light);\n\n\t\t\t\t\t_uniforms4.skyColor.copy(light.color).multiplyScalar(intensity);\n\n\t\t\t\t\t_uniforms4.groundColor.copy(light.groundColor).multiplyScalar(intensity);\n\n\t\t\t\t\tstate.hemi[hemiLength] = _uniforms4;\n\t\t\t\t\themiLength++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (rectAreaLength > 0) {\n\t\t\t\tif (capabilities.isWebGL2) {\n\t\t\t\t\t// WebGL 2\n\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\t\t\t\t} else {\n\t\t\t\t\t// WebGL 1\n\t\t\t\t\tif (extensions.has('OES_texture_float_linear') === true) {\n\t\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_FLOAT_1;\n\t\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_FLOAT_2;\n\t\t\t\t\t} else if (extensions.has('OES_texture_half_float_linear') === true) {\n\t\t\t\t\t\tstate.rectAreaLTC1 = UniformsLib.LTC_HALF_1;\n\t\t\t\t\t\tstate.rectAreaLTC2 = UniformsLib.LTC_HALF_2;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error('THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstate.ambient[0] = r;\n\t\t\tstate.ambient[1] = g;\n\t\t\tstate.ambient[2] = b;\n\t\t\tvar hash = state.hash;\n\n\t\t\tif (hash.directionalLength !== directionalLength || hash.pointLength !== pointLength || hash.spotLength !== spotLength || hash.rectAreaLength !== rectAreaLength || hash.hemiLength !== hemiLength || hash.numDirectionalShadows !== numDirectionalShadows || hash.numPointShadows !== numPointShadows || hash.numSpotShadows !== numSpotShadows) {\n\t\t\t\tstate.directional.length = directionalLength;\n\t\t\t\tstate.spot.length = spotLength;\n\t\t\t\tstate.rectArea.length = rectAreaLength;\n\t\t\t\tstate.point.length = pointLength;\n\t\t\t\tstate.hemi.length = hemiLength;\n\t\t\t\tstate.directionalShadow.length = numDirectionalShadows;\n\t\t\t\tstate.directionalShadowMap.length = numDirectionalShadows;\n\t\t\t\tstate.pointShadow.length = numPointShadows;\n\t\t\t\tstate.pointShadowMap.length = numPointShadows;\n\t\t\t\tstate.spotShadow.length = numSpotShadows;\n\t\t\t\tstate.spotShadowMap.length = numSpotShadows;\n\t\t\t\tstate.directionalShadowMatrix.length = numDirectionalShadows;\n\t\t\t\tstate.pointShadowMatrix.length = numPointShadows;\n\t\t\t\tstate.spotShadowMatrix.length = numSpotShadows;\n\t\t\t\thash.directionalLength = directionalLength;\n\t\t\t\thash.pointLength = pointLength;\n\t\t\t\thash.spotLength = spotLength;\n\t\t\t\thash.rectAreaLength = rectAreaLength;\n\t\t\t\thash.hemiLength = hemiLength;\n\t\t\t\thash.numDirectionalShadows = numDirectionalShadows;\n\t\t\t\thash.numPointShadows = numPointShadows;\n\t\t\t\thash.numSpotShadows = numSpotShadows;\n\t\t\t\tstate.version = nextVersion++;\n\t\t\t}\n\t\t}\n\n\t\tfunction setupView(lights, camera) {\n\t\t\tvar directionalLength = 0;\n\t\t\tvar pointLength = 0;\n\t\t\tvar spotLength = 0;\n\t\t\tvar rectAreaLength = 0;\n\t\t\tvar hemiLength = 0;\n\t\t\tvar viewMatrix = camera.matrixWorldInverse;\n\n\t\t\tfor (var _i3 = 0, l = lights.length; _i3 < l; _i3++) {\n\t\t\t\tvar light = lights[_i3];\n\n\t\t\t\tif (light.isDirectionalLight) {\n\t\t\t\t\tvar uniforms = state.directional[directionalLength];\n\t\t\t\t\tuniforms.direction.setFromMatrixPosition(light.matrixWorld);\n\t\t\t\t\tvector3.setFromMatrixPosition(light.target.matrixWorld);\n\t\t\t\t\tuniforms.direction.sub(vector3);\n\t\t\t\t\tuniforms.direction.transformDirection(viewMatrix);\n\t\t\t\t\tdirectionalLength++;\n\t\t\t\t} else if (light.isSpotLight) {\n\t\t\t\t\tvar _uniforms5 = state.spot[spotLength];\n\n\t\t\t\t\t_uniforms5.position.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms5.position.applyMatrix4(viewMatrix);\n\n\t\t\t\t\t_uniforms5.direction.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\tvector3.setFromMatrixPosition(light.target.matrixWorld);\n\n\t\t\t\t\t_uniforms5.direction.sub(vector3);\n\n\t\t\t\t\t_uniforms5.direction.transformDirection(viewMatrix);\n\n\t\t\t\t\tspotLength++;\n\t\t\t\t} else if (light.isRectAreaLight) {\n\t\t\t\t\tvar _uniforms6 = state.rectArea[rectAreaLength];\n\n\t\t\t\t\t_uniforms6.position.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms6.position.applyMatrix4(viewMatrix); // extract local rotation of light to derive width/height half vectors\n\n\n\t\t\t\t\tmatrix42.identity();\n\t\t\t\t\tmatrix4.copy(light.matrixWorld);\n\t\t\t\t\tmatrix4.premultiply(viewMatrix);\n\t\t\t\t\tmatrix42.extractRotation(matrix4);\n\n\t\t\t\t\t_uniforms6.halfWidth.set(light.width * 0.5, 0.0, 0.0);\n\n\t\t\t\t\t_uniforms6.halfHeight.set(0.0, light.height * 0.5, 0.0);\n\n\t\t\t\t\t_uniforms6.halfWidth.applyMatrix4(matrix42);\n\n\t\t\t\t\t_uniforms6.halfHeight.applyMatrix4(matrix42);\n\n\t\t\t\t\trectAreaLength++;\n\t\t\t\t} else if (light.isPointLight) {\n\t\t\t\t\tvar _uniforms7 = state.point[pointLength];\n\n\t\t\t\t\t_uniforms7.position.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms7.position.applyMatrix4(viewMatrix);\n\n\t\t\t\t\tpointLength++;\n\t\t\t\t} else if (light.isHemisphereLight) {\n\t\t\t\t\tvar _uniforms8 = state.hemi[hemiLength];\n\n\t\t\t\t\t_uniforms8.direction.setFromMatrixPosition(light.matrixWorld);\n\n\t\t\t\t\t_uniforms8.direction.transformDirection(viewMatrix);\n\n\t\t\t\t\t_uniforms8.direction.normalize();\n\n\t\t\t\t\themiLength++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tsetup: setup,\n\t\t\tsetupView: setupView,\n\t\t\tstate: state\n\t\t};\n\t}\n\n\tfunction WebGLRenderState(extensions, capabilities) {\n\t\tvar lights = new WebGLLights(extensions, capabilities);\n\t\tvar lightsArray = [];\n\t\tvar shadowsArray = [];\n\n\t\tfunction init() {\n\t\t\tlightsArray.length = 0;\n\t\t\tshadowsArray.length = 0;\n\t\t}\n\n\t\tfunction pushLight(light) {\n\t\t\tlightsArray.push(light);\n\t\t}\n\n\t\tfunction pushShadow(shadowLight) {\n\t\t\tshadowsArray.push(shadowLight);\n\t\t}\n\n\t\tfunction setupLights() {\n\t\t\tlights.setup(lightsArray);\n\t\t}\n\n\t\tfunction setupLightsView(camera) {\n\t\t\tlights.setupView(lightsArray, camera);\n\t\t}\n\n\t\tvar state = {\n\t\t\tlightsArray: lightsArray,\n\t\t\tshadowsArray: shadowsArray,\n\t\t\tlights: lights\n\t\t};\n\t\treturn {\n\t\t\tinit: init,\n\t\t\tstate: state,\n\t\t\tsetupLights: setupLights,\n\t\t\tsetupLightsView: setupLightsView,\n\t\t\tpushLight: pushLight,\n\t\t\tpushShadow: pushShadow\n\t\t};\n\t}\n\n\tfunction WebGLRenderStates(extensions, capabilities) {\n\t\tvar renderStates = new WeakMap();\n\n\t\tfunction get(scene, renderCallDepth) {\n\t\t\tif (renderCallDepth === void 0) {\n\t\t\t\trenderCallDepth = 0;\n\t\t\t}\n\n\t\t\tvar renderState;\n\n\t\t\tif (renderStates.has(scene) === false) {\n\t\t\t\trenderState = new WebGLRenderState(extensions, capabilities);\n\t\t\t\trenderStates.set(scene, []);\n\t\t\t\trenderStates.get(scene).push(renderState);\n\t\t\t} else {\n\t\t\t\tif (renderCallDepth >= renderStates.get(scene).length) {\n\t\t\t\t\trenderState = new WebGLRenderState(extensions, capabilities);\n\t\t\t\t\trenderStates.get(scene).push(renderState);\n\t\t\t\t} else {\n\t\t\t\t\trenderState = renderStates.get(scene)[renderCallDepth];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn renderState;\n\t\t}\n\n\t\tfunction dispose() {\n\t\t\trenderStates = new WeakMap();\n\t\t}\n\n\t\treturn {\n\t\t\tget: get,\n\t\t\tdispose: dispose\n\t\t};\n\t}\n\n\t/**\n\t * parameters = {\n\t *\n\t *\topacity: <float>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>\n\t * }\n\t */\n\n\tfunction MeshDepthMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshDepthMaterial';\n\t\tthis.depthPacking = BasicDepthPacking;\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.map = null;\n\t\tthis.alphaMap = null;\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.fog = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshDepthMaterial.prototype = Object.create(Material.prototype);\n\tMeshDepthMaterial.prototype.constructor = MeshDepthMaterial;\n\tMeshDepthMaterial.prototype.isMeshDepthMaterial = true;\n\n\tMeshDepthMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.depthPacking = source.depthPacking;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.map = source.map;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\n\t *\treferencePosition: <float>,\n\t *\tnearDistance: <float>,\n\t *\tfarDistance: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>\n\t *\n\t * }\n\t */\n\n\tfunction MeshDistanceMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshDistanceMaterial';\n\t\tthis.referencePosition = new Vector3();\n\t\tthis.nearDistance = 1;\n\t\tthis.farDistance = 1000;\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.map = null;\n\t\tthis.alphaMap = null;\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.fog = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshDistanceMaterial.prototype = Object.create(Material.prototype);\n\tMeshDistanceMaterial.prototype.constructor = MeshDistanceMaterial;\n\tMeshDistanceMaterial.prototype.isMeshDistanceMaterial = true;\n\n\tMeshDistanceMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.referencePosition.copy(source.referencePosition);\n\t\tthis.nearDistance = source.nearDistance;\n\t\tthis.farDistance = source.farDistance;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.map = source.map;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\treturn this;\n\t};\n\n\tvar vsm_frag = \"uniform sampler2D shadow_pass;\\nuniform vec2 resolution;\\nuniform float radius;\\n#include <packing>\\nvoid main() {\\n\\tfloat mean = 0.0;\\n\\tfloat squared_mean = 0.0;\\n\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\\n\\tfor ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\\n\\t\\t#ifdef HORIZONTAL_PASS\\n\\t\\t\\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\\n\\t\\t\\tmean += distribution.x;\\n\\t\\t\\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\\n\\t\\t#else\\n\\t\\t\\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\\n\\t\\t\\tmean += depth;\\n\\t\\t\\tsquared_mean += depth * depth;\\n\\t\\t#endif\\n\\t}\\n\\tmean = mean * HALF_SAMPLE_RATE;\\n\\tsquared_mean = squared_mean * HALF_SAMPLE_RATE;\\n\\tfloat std_dev = sqrt( squared_mean - mean * mean );\\n\\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\\n}\";\n\n\tvar vsm_vert = \"void main() {\\n\\tgl_Position = vec4( position, 1.0 );\\n}\";\n\n\tfunction WebGLShadowMap(_renderer, _objects, maxTextureSize) {\n\t\tvar _frustum = new Frustum();\n\n\t\tvar _shadowMapSize = new Vector2(),\n\t\t\t\t_viewportSize = new Vector2(),\n\t\t\t\t_viewport = new Vector4(),\n\t\t\t\t_depthMaterials = [],\n\t\t\t\t_distanceMaterials = [],\n\t\t\t\t_materialCache = {};\n\n\t\tvar shadowSide = {\n\t\t\t0: BackSide,\n\t\t\t1: FrontSide,\n\t\t\t2: DoubleSide\n\t\t};\n\t\tvar shadowMaterialVertical = new ShaderMaterial({\n\t\t\tdefines: {\n\t\t\t\tSAMPLE_RATE: 2.0 / 8.0,\n\t\t\t\tHALF_SAMPLE_RATE: 1.0 / 8.0\n\t\t\t},\n\t\t\tuniforms: {\n\t\t\t\tshadow_pass: {\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\tresolution: {\n\t\t\t\t\tvalue: new Vector2()\n\t\t\t\t},\n\t\t\t\tradius: {\n\t\t\t\t\tvalue: 4.0\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: vsm_vert,\n\t\t\tfragmentShader: vsm_frag\n\t\t});\n\t\tvar shadowMaterialHorizontal = shadowMaterialVertical.clone();\n\t\tshadowMaterialHorizontal.defines.HORIZONTAL_PASS = 1;\n\t\tvar fullScreenTri = new BufferGeometry();\n\t\tfullScreenTri.setAttribute('position', new BufferAttribute(new Float32Array([-1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5]), 3));\n\t\tvar fullScreenMesh = new Mesh(fullScreenTri, shadowMaterialVertical);\n\t\tvar scope = this;\n\t\tthis.enabled = false;\n\t\tthis.autoUpdate = true;\n\t\tthis.needsUpdate = false;\n\t\tthis.type = PCFShadowMap;\n\n\t\tthis.render = function (lights, scene, camera) {\n\t\t\tif (scope.enabled === false) return;\n\t\t\tif (scope.autoUpdate === false && scope.needsUpdate === false) return;\n\t\t\tif (lights.length === 0) return;\n\n\t\t\tvar currentRenderTarget = _renderer.getRenderTarget();\n\n\t\t\tvar activeCubeFace = _renderer.getActiveCubeFace();\n\n\t\t\tvar activeMipmapLevel = _renderer.getActiveMipmapLevel();\n\n\t\t\tvar _state = _renderer.state; // Set GL state for depth map.\n\n\t\t\t_state.setBlending(NoBlending);\n\n\t\t\t_state.buffers.color.setClear(1, 1, 1, 1);\n\n\t\t\t_state.buffers.depth.setTest(true);\n\n\t\t\t_state.setScissorTest(false); // render depth map\n\n\n\t\t\tfor (var i = 0, il = lights.length; i < il; i++) {\n\t\t\t\tvar light = lights[i];\n\t\t\t\tvar shadow = light.shadow;\n\n\t\t\t\tif (shadow === undefined) {\n\t\t\t\t\tconsole.warn('THREE.WebGLShadowMap:', light, 'has no shadow.');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (shadow.autoUpdate === false && shadow.needsUpdate === false) continue;\n\n\t\t\t\t_shadowMapSize.copy(shadow.mapSize);\n\n\t\t\t\tvar shadowFrameExtents = shadow.getFrameExtents();\n\n\t\t\t\t_shadowMapSize.multiply(shadowFrameExtents);\n\n\t\t\t\t_viewportSize.copy(shadow.mapSize);\n\n\t\t\t\tif (_shadowMapSize.x > maxTextureSize || _shadowMapSize.y > maxTextureSize) {\n\t\t\t\t\tif (_shadowMapSize.x > maxTextureSize) {\n\t\t\t\t\t\t_viewportSize.x = Math.floor(maxTextureSize / shadowFrameExtents.x);\n\t\t\t\t\t\t_shadowMapSize.x = _viewportSize.x * shadowFrameExtents.x;\n\t\t\t\t\t\tshadow.mapSize.x = _viewportSize.x;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (_shadowMapSize.y > maxTextureSize) {\n\t\t\t\t\t\t_viewportSize.y = Math.floor(maxTextureSize / shadowFrameExtents.y);\n\t\t\t\t\t\t_shadowMapSize.y = _viewportSize.y * shadowFrameExtents.y;\n\t\t\t\t\t\tshadow.mapSize.y = _viewportSize.y;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (shadow.map === null && !shadow.isPointLightShadow && this.type === VSMShadowMap) {\n\t\t\t\t\tvar pars = {\n\t\t\t\t\t\tminFilter: LinearFilter,\n\t\t\t\t\t\tmagFilter: LinearFilter,\n\t\t\t\t\t\tformat: RGBAFormat\n\t\t\t\t\t};\n\t\t\t\t\tshadow.map = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, pars);\n\t\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\t\t\t\t\tshadow.mapPass = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, pars);\n\t\t\t\t\tshadow.camera.updateProjectionMatrix();\n\t\t\t\t}\n\n\t\t\t\tif (shadow.map === null) {\n\t\t\t\t\tvar _pars = {\n\t\t\t\t\t\tminFilter: NearestFilter,\n\t\t\t\t\t\tmagFilter: NearestFilter,\n\t\t\t\t\t\tformat: RGBAFormat\n\t\t\t\t\t};\n\t\t\t\t\tshadow.map = new WebGLRenderTarget(_shadowMapSize.x, _shadowMapSize.y, _pars);\n\t\t\t\t\tshadow.map.texture.name = light.name + '.shadowMap';\n\t\t\t\t\tshadow.camera.updateProjectionMatrix();\n\t\t\t\t}\n\n\t\t\t\t_renderer.setRenderTarget(shadow.map);\n\n\t\t\t\t_renderer.clear();\n\n\t\t\t\tvar viewportCount = shadow.getViewportCount();\n\n\t\t\t\tfor (var vp = 0; vp < viewportCount; vp++) {\n\t\t\t\t\tvar viewport = shadow.getViewport(vp);\n\n\t\t\t\t\t_viewport.set(_viewportSize.x * viewport.x, _viewportSize.y * viewport.y, _viewportSize.x * viewport.z, _viewportSize.y * viewport.w);\n\n\t\t\t\t\t_state.viewport(_viewport);\n\n\t\t\t\t\tshadow.updateMatrices(light, vp);\n\t\t\t\t\t_frustum = shadow.getFrustum();\n\t\t\t\t\trenderObject(scene, camera, shadow.camera, light, this.type);\n\t\t\t\t} // do blur pass for VSM\n\n\n\t\t\t\tif (!shadow.isPointLightShadow && this.type === VSMShadowMap) {\n\t\t\t\t\tVSMPass(shadow, camera);\n\t\t\t\t}\n\n\t\t\t\tshadow.needsUpdate = false;\n\t\t\t}\n\n\t\t\tscope.needsUpdate = false;\n\n\t\t\t_renderer.setRenderTarget(currentRenderTarget, activeCubeFace, activeMipmapLevel);\n\t\t};\n\n\t\tfunction VSMPass(shadow, camera) {\n\t\t\tvar geometry = _objects.update(fullScreenMesh); // vertical pass\n\n\n\t\t\tshadowMaterialVertical.uniforms.shadow_pass.value = shadow.map.texture;\n\t\t\tshadowMaterialVertical.uniforms.resolution.value = shadow.mapSize;\n\t\t\tshadowMaterialVertical.uniforms.radius.value = shadow.radius;\n\n\t\t\t_renderer.setRenderTarget(shadow.mapPass);\n\n\t\t\t_renderer.clear();\n\n\t\t\t_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialVertical, fullScreenMesh, null); // horizontal pass\n\n\n\t\t\tshadowMaterialHorizontal.uniforms.shadow_pass.value = shadow.mapPass.texture;\n\t\t\tshadowMaterialHorizontal.uniforms.resolution.value = shadow.mapSize;\n\t\t\tshadowMaterialHorizontal.uniforms.radius.value = shadow.radius;\n\n\t\t\t_renderer.setRenderTarget(shadow.map);\n\n\t\t\t_renderer.clear();\n\n\t\t\t_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);\n\t\t}\n\n\t\tfunction getDepthMaterialVariant(useMorphing, useSkinning, useInstancing) {\n\t\t\tvar index = useMorphing << 0 | useSkinning << 1 | useInstancing << 2;\n\t\t\tvar material = _depthMaterials[index];\n\n\t\t\tif (material === undefined) {\n\t\t\t\tmaterial = new MeshDepthMaterial({\n\t\t\t\t\tdepthPacking: RGBADepthPacking,\n\t\t\t\t\tmorphTargets: useMorphing,\n\t\t\t\t\tskinning: useSkinning\n\t\t\t\t});\n\t\t\t\t_depthMaterials[index] = material;\n\t\t\t}\n\n\t\t\treturn material;\n\t\t}\n\n\t\tfunction getDistanceMaterialVariant(useMorphing, useSkinning, useInstancing) {\n\t\t\tvar index = useMorphing << 0 | useSkinning << 1 | useInstancing << 2;\n\t\t\tvar material = _distanceMaterials[index];\n\n\t\t\tif (material === undefined) {\n\t\t\t\tmaterial = new MeshDistanceMaterial({\n\t\t\t\t\tmorphTargets: useMorphing,\n\t\t\t\t\tskinning: useSkinning\n\t\t\t\t});\n\t\t\t\t_distanceMaterials[index] = material;\n\t\t\t}\n\n\t\t\treturn material;\n\t\t}\n\n\t\tfunction getDepthMaterial(object, geometry, material, light, shadowCameraNear, shadowCameraFar, type) {\n\t\t\tvar result = null;\n\t\t\tvar getMaterialVariant = getDepthMaterialVariant;\n\t\t\tvar customMaterial = object.customDepthMaterial;\n\n\t\t\tif (light.isPointLight === true) {\n\t\t\t\tgetMaterialVariant = getDistanceMaterialVariant;\n\t\t\t\tcustomMaterial = object.customDistanceMaterial;\n\t\t\t}\n\n\t\t\tif (customMaterial === undefined) {\n\t\t\t\tvar useMorphing = false;\n\n\t\t\t\tif (material.morphTargets === true) {\n\t\t\t\t\tuseMorphing = geometry.morphAttributes && geometry.morphAttributes.position && geometry.morphAttributes.position.length > 0;\n\t\t\t\t}\n\n\t\t\t\tvar useSkinning = false;\n\n\t\t\t\tif (object.isSkinnedMesh === true) {\n\t\t\t\t\tif (material.skinning === true) {\n\t\t\t\t\t\tuseSkinning = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:', object);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar useInstancing = object.isInstancedMesh === true;\n\t\t\t\tresult = getMaterialVariant(useMorphing, useSkinning, useInstancing);\n\t\t\t} else {\n\t\t\t\tresult = customMaterial;\n\t\t\t}\n\n\t\t\tif (_renderer.localClippingEnabled && material.clipShadows === true && material.clippingPlanes.length !== 0) {\n\t\t\t\t// in this case we need a unique material instance reflecting the\n\t\t\t\t// appropriate state\n\t\t\t\tvar keyA = result.uuid,\n\t\t\t\t\t\tkeyB = material.uuid;\n\t\t\t\tvar materialsForVariant = _materialCache[keyA];\n\n\t\t\t\tif (materialsForVariant === undefined) {\n\t\t\t\t\tmaterialsForVariant = {};\n\t\t\t\t\t_materialCache[keyA] = materialsForVariant;\n\t\t\t\t}\n\n\t\t\t\tvar cachedMaterial = materialsForVariant[keyB];\n\n\t\t\t\tif (cachedMaterial === undefined) {\n\t\t\t\t\tcachedMaterial = result.clone();\n\t\t\t\t\tmaterialsForVariant[keyB] = cachedMaterial;\n\t\t\t\t}\n\n\t\t\t\tresult = cachedMaterial;\n\t\t\t}\n\n\t\t\tresult.visible = material.visible;\n\t\t\tresult.wireframe = material.wireframe;\n\n\t\t\tif (type === VSMShadowMap) {\n\t\t\t\tresult.side = material.shadowSide !== null ? material.shadowSide : material.side;\n\t\t\t} else {\n\t\t\t\tresult.side = material.shadowSide !== null ? material.shadowSide : shadowSide[material.side];\n\t\t\t}\n\n\t\t\tresult.clipShadows = material.clipShadows;\n\t\t\tresult.clippingPlanes = material.clippingPlanes;\n\t\t\tresult.clipIntersection = material.clipIntersection;\n\t\t\tresult.wireframeLinewidth = material.wireframeLinewidth;\n\t\t\tresult.linewidth = material.linewidth;\n\n\t\t\tif (light.isPointLight === true && result.isMeshDistanceMaterial === true) {\n\t\t\t\tresult.referencePosition.setFromMatrixPosition(light.matrixWorld);\n\t\t\t\tresult.nearDistance = shadowCameraNear;\n\t\t\t\tresult.farDistance = shadowCameraFar;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tfunction renderObject(object, camera, shadowCamera, light, type) {\n\t\t\tif (object.visible === false) return;\n\t\t\tvar visible = object.layers.test(camera.layers);\n\n\t\t\tif (visible && (object.isMesh || object.isLine || object.isPoints)) {\n\t\t\t\tif ((object.castShadow || object.receiveShadow && type === VSMShadowMap) && (!object.frustumCulled || _frustum.intersectsObject(object))) {\n\t\t\t\t\tobject.modelViewMatrix.multiplyMatrices(shadowCamera.matrixWorldInverse, object.matrixWorld);\n\n\t\t\t\t\tvar geometry = _objects.update(object);\n\n\t\t\t\t\tvar material = object.material;\n\n\t\t\t\t\tif (Array.isArray(material)) {\n\t\t\t\t\t\tvar groups = geometry.groups;\n\n\t\t\t\t\t\tfor (var k = 0, kl = groups.length; k < kl; k++) {\n\t\t\t\t\t\t\tvar group = groups[k];\n\t\t\t\t\t\t\tvar groupMaterial = material[group.materialIndex];\n\n\t\t\t\t\t\t\tif (groupMaterial && groupMaterial.visible) {\n\t\t\t\t\t\t\t\tvar depthMaterial = getDepthMaterial(object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type);\n\n\t\t\t\t\t\t\t\t_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (material.visible) {\n\t\t\t\t\t\tvar _depthMaterial = getDepthMaterial(object, geometry, material, light, shadowCamera.near, shadowCamera.far, type);\n\n\t\t\t\t\t\t_renderer.renderBufferDirect(shadowCamera, null, geometry, _depthMaterial, object, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\trenderObject(children[i], camera, shadowCamera, light, type);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction WebGLState(gl, extensions, capabilities) {\n\t\tvar _equationToGL, _factorToGL;\n\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\n\t\tfunction ColorBuffer() {\n\t\t\tvar locked = false;\n\t\t\tvar color = new Vector4();\n\t\t\tvar currentColorMask = null;\n\t\t\tvar currentColorClear = new Vector4(0, 0, 0, 0);\n\t\t\treturn {\n\t\t\t\tsetMask: function setMask(colorMask) {\n\t\t\t\t\tif (currentColorMask !== colorMask && !locked) {\n\t\t\t\t\t\tgl.colorMask(colorMask, colorMask, colorMask, colorMask);\n\t\t\t\t\t\tcurrentColorMask = colorMask;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetLocked: function setLocked(lock) {\n\t\t\t\t\tlocked = lock;\n\t\t\t\t},\n\t\t\t\tsetClear: function setClear(r, g, b, a, premultipliedAlpha) {\n\t\t\t\t\tif (premultipliedAlpha === true) {\n\t\t\t\t\t\tr *= a;\n\t\t\t\t\t\tg *= a;\n\t\t\t\t\t\tb *= a;\n\t\t\t\t\t}\n\n\t\t\t\t\tcolor.set(r, g, b, a);\n\n\t\t\t\t\tif (currentColorClear.equals(color) === false) {\n\t\t\t\t\t\tgl.clearColor(r, g, b, a);\n\t\t\t\t\t\tcurrentColorClear.copy(color);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\treset: function reset() {\n\t\t\t\t\tlocked = false;\n\t\t\t\t\tcurrentColorMask = null;\n\t\t\t\t\tcurrentColorClear.set(-1, 0, 0, 0); // set to invalid state\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tfunction DepthBuffer() {\n\t\t\tvar locked = false;\n\t\t\tvar currentDepthMask = null;\n\t\t\tvar currentDepthFunc = null;\n\t\t\tvar currentDepthClear = null;\n\t\t\treturn {\n\t\t\t\tsetTest: function setTest(depthTest) {\n\t\t\t\t\tif (depthTest) {\n\t\t\t\t\t\tenable(2929);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdisable(2929);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetMask: function setMask(depthMask) {\n\t\t\t\t\tif (currentDepthMask !== depthMask && !locked) {\n\t\t\t\t\t\tgl.depthMask(depthMask);\n\t\t\t\t\t\tcurrentDepthMask = depthMask;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetFunc: function setFunc(depthFunc) {\n\t\t\t\t\tif (currentDepthFunc !== depthFunc) {\n\t\t\t\t\t\tif (depthFunc) {\n\t\t\t\t\t\t\tswitch (depthFunc) {\n\t\t\t\t\t\t\t\tcase NeverDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(512);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase AlwaysDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(519);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase LessDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(513);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase LessEqualDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(515);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase EqualDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(514);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase GreaterEqualDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(518);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase GreaterDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(516);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase NotEqualDepth:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(517);\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tgl.depthFunc(515);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tgl.depthFunc(515);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrentDepthFunc = depthFunc;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetLocked: function setLocked(lock) {\n\t\t\t\t\tlocked = lock;\n\t\t\t\t},\n\t\t\t\tsetClear: function setClear(depth) {\n\t\t\t\t\tif (currentDepthClear !== depth) {\n\t\t\t\t\t\tgl.clearDepth(depth);\n\t\t\t\t\t\tcurrentDepthClear = depth;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\treset: function reset() {\n\t\t\t\t\tlocked = false;\n\t\t\t\t\tcurrentDepthMask = null;\n\t\t\t\t\tcurrentDepthFunc = null;\n\t\t\t\t\tcurrentDepthClear = null;\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tfunction StencilBuffer() {\n\t\t\tvar locked = false;\n\t\t\tvar currentStencilMask = null;\n\t\t\tvar currentStencilFunc = null;\n\t\t\tvar currentStencilRef = null;\n\t\t\tvar currentStencilFuncMask = null;\n\t\t\tvar currentStencilFail = null;\n\t\t\tvar currentStencilZFail = null;\n\t\t\tvar currentStencilZPass = null;\n\t\t\tvar currentStencilClear = null;\n\t\t\treturn {\n\t\t\t\tsetTest: function setTest(stencilTest) {\n\t\t\t\t\tif (!locked) {\n\t\t\t\t\t\tif (stencilTest) {\n\t\t\t\t\t\t\tenable(2960);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdisable(2960);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetMask: function setMask(stencilMask) {\n\t\t\t\t\tif (currentStencilMask !== stencilMask && !locked) {\n\t\t\t\t\t\tgl.stencilMask(stencilMask);\n\t\t\t\t\t\tcurrentStencilMask = stencilMask;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetFunc: function setFunc(stencilFunc, stencilRef, stencilMask) {\n\t\t\t\t\tif (currentStencilFunc !== stencilFunc || currentStencilRef !== stencilRef || currentStencilFuncMask !== stencilMask) {\n\t\t\t\t\t\tgl.stencilFunc(stencilFunc, stencilRef, stencilMask);\n\t\t\t\t\t\tcurrentStencilFunc = stencilFunc;\n\t\t\t\t\t\tcurrentStencilRef = stencilRef;\n\t\t\t\t\t\tcurrentStencilFuncMask = stencilMask;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetOp: function setOp(stencilFail, stencilZFail, stencilZPass) {\n\t\t\t\t\tif (currentStencilFail !== stencilFail || currentStencilZFail !== stencilZFail || currentStencilZPass !== stencilZPass) {\n\t\t\t\t\t\tgl.stencilOp(stencilFail, stencilZFail, stencilZPass);\n\t\t\t\t\t\tcurrentStencilFail = stencilFail;\n\t\t\t\t\t\tcurrentStencilZFail = stencilZFail;\n\t\t\t\t\t\tcurrentStencilZPass = stencilZPass;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tsetLocked: function setLocked(lock) {\n\t\t\t\t\tlocked = lock;\n\t\t\t\t},\n\t\t\t\tsetClear: function setClear(stencil) {\n\t\t\t\t\tif (currentStencilClear !== stencil) {\n\t\t\t\t\t\tgl.clearStencil(stencil);\n\t\t\t\t\t\tcurrentStencilClear = stencil;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\treset: function reset() {\n\t\t\t\t\tlocked = false;\n\t\t\t\t\tcurrentStencilMask = null;\n\t\t\t\t\tcurrentStencilFunc = null;\n\t\t\t\t\tcurrentStencilRef = null;\n\t\t\t\t\tcurrentStencilFuncMask = null;\n\t\t\t\t\tcurrentStencilFail = null;\n\t\t\t\t\tcurrentStencilZFail = null;\n\t\t\t\t\tcurrentStencilZPass = null;\n\t\t\t\t\tcurrentStencilClear = null;\n\t\t\t\t}\n\t\t\t};\n\t\t} //\n\n\n\t\tvar colorBuffer = new ColorBuffer();\n\t\tvar depthBuffer = new DepthBuffer();\n\t\tvar stencilBuffer = new StencilBuffer();\n\t\tvar enabledCapabilities = {};\n\t\tvar currentProgram = null;\n\t\tvar currentBlendingEnabled = null;\n\t\tvar currentBlending = null;\n\t\tvar currentBlendEquation = null;\n\t\tvar currentBlendSrc = null;\n\t\tvar currentBlendDst = null;\n\t\tvar currentBlendEquationAlpha = null;\n\t\tvar currentBlendSrcAlpha = null;\n\t\tvar currentBlendDstAlpha = null;\n\t\tvar currentPremultipledAlpha = false;\n\t\tvar currentFlipSided = null;\n\t\tvar currentCullFace = null;\n\t\tvar currentLineWidth = null;\n\t\tvar currentPolygonOffsetFactor = null;\n\t\tvar currentPolygonOffsetUnits = null;\n\t\tvar maxTextures = gl.getParameter(35661);\n\t\tvar lineWidthAvailable = false;\n\t\tvar version = 0;\n\t\tvar glVersion = gl.getParameter(7938);\n\n\t\tif (glVersion.indexOf('WebGL') !== -1) {\n\t\t\tversion = parseFloat(/^WebGL (\\d)/.exec(glVersion)[1]);\n\t\t\tlineWidthAvailable = version >= 1.0;\n\t\t} else if (glVersion.indexOf('OpenGL ES') !== -1) {\n\t\t\tversion = parseFloat(/^OpenGL ES (\\d)/.exec(glVersion)[1]);\n\t\t\tlineWidthAvailable = version >= 2.0;\n\t\t}\n\n\t\tvar currentTextureSlot = null;\n\t\tvar currentBoundTextures = {};\n\t\tvar currentScissor = new Vector4();\n\t\tvar currentViewport = new Vector4();\n\n\t\tfunction createTexture(type, target, count) {\n\t\t\tvar data = new Uint8Array(4); // 4 is required to match default unpack alignment of 4.\n\n\t\t\tvar texture = gl.createTexture();\n\t\t\tgl.bindTexture(type, texture);\n\t\t\tgl.texParameteri(type, 10241, 9728);\n\t\t\tgl.texParameteri(type, 10240, 9728);\n\n\t\t\tfor (var i = 0; i < count; i++) {\n\t\t\t\tgl.texImage2D(target + i, 0, 6408, 1, 1, 0, 6408, 5121, data);\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\n\t\tvar emptyTextures = {};\n\t\temptyTextures[3553] = createTexture(3553, 3553, 1);\n\t\temptyTextures[34067] = createTexture(34067, 34069, 6); // init\n\n\t\tcolorBuffer.setClear(0, 0, 0, 1);\n\t\tdepthBuffer.setClear(1);\n\t\tstencilBuffer.setClear(0);\n\t\tenable(2929);\n\t\tdepthBuffer.setFunc(LessEqualDepth);\n\t\tsetFlipSided(false);\n\t\tsetCullFace(CullFaceBack);\n\t\tenable(2884);\n\t\tsetBlending(NoBlending); //\n\n\t\tfunction enable(id) {\n\t\t\tif (enabledCapabilities[id] !== true) {\n\t\t\t\tgl.enable(id);\n\t\t\t\tenabledCapabilities[id] = true;\n\t\t\t}\n\t\t}\n\n\t\tfunction disable(id) {\n\t\t\tif (enabledCapabilities[id] !== false) {\n\t\t\t\tgl.disable(id);\n\t\t\t\tenabledCapabilities[id] = false;\n\t\t\t}\n\t\t}\n\n\t\tfunction useProgram(program) {\n\t\t\tif (currentProgram !== program) {\n\t\t\t\tgl.useProgram(program);\n\t\t\t\tcurrentProgram = program;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tvar equationToGL = (_equationToGL = {}, _equationToGL[AddEquation] = 32774, _equationToGL[SubtractEquation] = 32778, _equationToGL[ReverseSubtractEquation] = 32779, _equationToGL);\n\n\t\tif (isWebGL2) {\n\t\t\tequationToGL[MinEquation] = 32775;\n\t\t\tequationToGL[MaxEquation] = 32776;\n\t\t} else {\n\t\t\tvar extension = extensions.get('EXT_blend_minmax');\n\n\t\t\tif (extension !== null) {\n\t\t\t\tequationToGL[MinEquation] = extension.MIN_EXT;\n\t\t\t\tequationToGL[MaxEquation] = extension.MAX_EXT;\n\t\t\t}\n\t\t}\n\n\t\tvar factorToGL = (_factorToGL = {}, _factorToGL[ZeroFactor] = 0, _factorToGL[OneFactor] = 1, _factorToGL[SrcColorFactor] = 768, _factorToGL[SrcAlphaFactor] = 770, _factorToGL[SrcAlphaSaturateFactor] = 776, _factorToGL[DstColorFactor] = 774, _factorToGL[DstAlphaFactor] = 772, _factorToGL[OneMinusSrcColorFactor] = 769, _factorToGL[OneMinusSrcAlphaFactor] = 771, _factorToGL[OneMinusDstColorFactor] = 775, _factorToGL[OneMinusDstAlphaFactor] = 773, _factorToGL);\n\n\t\tfunction setBlending(blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha) {\n\t\t\tif (blending === NoBlending) {\n\t\t\t\tif (currentBlendingEnabled) {\n\t\t\t\t\tdisable(3042);\n\t\t\t\t\tcurrentBlendingEnabled = false;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!currentBlendingEnabled) {\n\t\t\t\tenable(3042);\n\t\t\t\tcurrentBlendingEnabled = true;\n\t\t\t}\n\n\t\t\tif (blending !== CustomBlending) {\n\t\t\t\tif (blending !== currentBlending || premultipliedAlpha !== currentPremultipledAlpha) {\n\t\t\t\t\tif (currentBlendEquation !== AddEquation || currentBlendEquationAlpha !== AddEquation) {\n\t\t\t\t\t\tgl.blendEquation(32774);\n\t\t\t\t\t\tcurrentBlendEquation = AddEquation;\n\t\t\t\t\t\tcurrentBlendEquationAlpha = AddEquation;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (premultipliedAlpha) {\n\t\t\t\t\t\tswitch (blending) {\n\t\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\t\tgl.blendFuncSeparate(1, 771, 1, 771);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\t\tgl.blendFunc(1, 1);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\t\tgl.blendFuncSeparate(0, 0, 769, 771);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\t\tgl.blendFuncSeparate(0, 768, 0, 770);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tconsole.error('THREE.WebGLState: Invalid blending: ', blending);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tswitch (blending) {\n\t\t\t\t\t\t\tcase NormalBlending:\n\t\t\t\t\t\t\t\tgl.blendFuncSeparate(770, 771, 1, 771);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase AdditiveBlending:\n\t\t\t\t\t\t\t\tgl.blendFunc(770, 1);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase SubtractiveBlending:\n\t\t\t\t\t\t\t\tgl.blendFunc(0, 769);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase MultiplyBlending:\n\t\t\t\t\t\t\t\tgl.blendFunc(0, 768);\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tconsole.error('THREE.WebGLState: Invalid blending: ', blending);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentBlendSrc = null;\n\t\t\t\t\tcurrentBlendDst = null;\n\t\t\t\t\tcurrentBlendSrcAlpha = null;\n\t\t\t\t\tcurrentBlendDstAlpha = null;\n\t\t\t\t\tcurrentBlending = blending;\n\t\t\t\t\tcurrentPremultipledAlpha = premultipliedAlpha;\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t} // custom blending\n\n\n\t\t\tblendEquationAlpha = blendEquationAlpha || blendEquation;\n\t\t\tblendSrcAlpha = blendSrcAlpha || blendSrc;\n\t\t\tblendDstAlpha = blendDstAlpha || blendDst;\n\n\t\t\tif (blendEquation !== currentBlendEquation || blendEquationAlpha !== currentBlendEquationAlpha) {\n\t\t\t\tgl.blendEquationSeparate(equationToGL[blendEquation], equationToGL[blendEquationAlpha]);\n\t\t\t\tcurrentBlendEquation = blendEquation;\n\t\t\t\tcurrentBlendEquationAlpha = blendEquationAlpha;\n\t\t\t}\n\n\t\t\tif (blendSrc !== currentBlendSrc || blendDst !== currentBlendDst || blendSrcAlpha !== currentBlendSrcAlpha || blendDstAlpha !== currentBlendDstAlpha) {\n\t\t\t\tgl.blendFuncSeparate(factorToGL[blendSrc], factorToGL[blendDst], factorToGL[blendSrcAlpha], factorToGL[blendDstAlpha]);\n\t\t\t\tcurrentBlendSrc = blendSrc;\n\t\t\t\tcurrentBlendDst = blendDst;\n\t\t\t\tcurrentBlendSrcAlpha = blendSrcAlpha;\n\t\t\t\tcurrentBlendDstAlpha = blendDstAlpha;\n\t\t\t}\n\n\t\t\tcurrentBlending = blending;\n\t\t\tcurrentPremultipledAlpha = null;\n\t\t}\n\n\t\tfunction setMaterial(material, frontFaceCW) {\n\t\t\tmaterial.side === DoubleSide ? disable(2884) : enable(2884);\n\t\t\tvar flipSided = material.side === BackSide;\n\t\t\tif (frontFaceCW) flipSided = !flipSided;\n\t\t\tsetFlipSided(flipSided);\n\t\t\tmaterial.blending === NormalBlending && material.transparent === false ? setBlending(NoBlending) : setBlending(material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha);\n\t\t\tdepthBuffer.setFunc(material.depthFunc);\n\t\t\tdepthBuffer.setTest(material.depthTest);\n\t\t\tdepthBuffer.setMask(material.depthWrite);\n\t\t\tcolorBuffer.setMask(material.colorWrite);\n\t\t\tvar stencilWrite = material.stencilWrite;\n\t\t\tstencilBuffer.setTest(stencilWrite);\n\n\t\t\tif (stencilWrite) {\n\t\t\t\tstencilBuffer.setMask(material.stencilWriteMask);\n\t\t\t\tstencilBuffer.setFunc(material.stencilFunc, material.stencilRef, material.stencilFuncMask);\n\t\t\t\tstencilBuffer.setOp(material.stencilFail, material.stencilZFail, material.stencilZPass);\n\t\t\t}\n\n\t\t\tsetPolygonOffset(material.polygonOffset, material.polygonOffsetFactor, material.polygonOffsetUnits);\n\t\t} //\n\n\n\t\tfunction setFlipSided(flipSided) {\n\t\t\tif (currentFlipSided !== flipSided) {\n\t\t\t\tif (flipSided) {\n\t\t\t\t\tgl.frontFace(2304);\n\t\t\t\t} else {\n\t\t\t\t\tgl.frontFace(2305);\n\t\t\t\t}\n\n\t\t\t\tcurrentFlipSided = flipSided;\n\t\t\t}\n\t\t}\n\n\t\tfunction setCullFace(cullFace) {\n\t\t\tif (cullFace !== CullFaceNone) {\n\t\t\t\tenable(2884);\n\n\t\t\t\tif (cullFace !== currentCullFace) {\n\t\t\t\t\tif (cullFace === CullFaceBack) {\n\t\t\t\t\t\tgl.cullFace(1029);\n\t\t\t\t\t} else if (cullFace === CullFaceFront) {\n\t\t\t\t\t\tgl.cullFace(1028);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgl.cullFace(1032);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdisable(2884);\n\t\t\t}\n\n\t\t\tcurrentCullFace = cullFace;\n\t\t}\n\n\t\tfunction setLineWidth(width) {\n\t\t\tif (width !== currentLineWidth) {\n\t\t\t\tif (lineWidthAvailable) gl.lineWidth(width);\n\t\t\t\tcurrentLineWidth = width;\n\t\t\t}\n\t\t}\n\n\t\tfunction setPolygonOffset(polygonOffset, factor, units) {\n\t\t\tif (polygonOffset) {\n\t\t\t\tenable(32823);\n\n\t\t\t\tif (currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units) {\n\t\t\t\t\tgl.polygonOffset(factor, units);\n\t\t\t\t\tcurrentPolygonOffsetFactor = factor;\n\t\t\t\t\tcurrentPolygonOffsetUnits = units;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdisable(32823);\n\t\t\t}\n\t\t}\n\n\t\tfunction setScissorTest(scissorTest) {\n\t\t\tif (scissorTest) {\n\t\t\t\tenable(3089);\n\t\t\t} else {\n\t\t\t\tdisable(3089);\n\t\t\t}\n\t\t} // texture\n\n\n\t\tfunction activeTexture(webglSlot) {\n\t\t\tif (webglSlot === undefined) webglSlot = 33984 + maxTextures - 1;\n\n\t\t\tif (currentTextureSlot !== webglSlot) {\n\t\t\t\tgl.activeTexture(webglSlot);\n\t\t\t\tcurrentTextureSlot = webglSlot;\n\t\t\t}\n\t\t}\n\n\t\tfunction bindTexture(webglType, webglTexture) {\n\t\t\tif (currentTextureSlot === null) {\n\t\t\t\tactiveTexture();\n\t\t\t}\n\n\t\t\tvar boundTexture = currentBoundTextures[currentTextureSlot];\n\n\t\t\tif (boundTexture === undefined) {\n\t\t\t\tboundTexture = {\n\t\t\t\t\ttype: undefined,\n\t\t\t\t\ttexture: undefined\n\t\t\t\t};\n\t\t\t\tcurrentBoundTextures[currentTextureSlot] = boundTexture;\n\t\t\t}\n\n\t\t\tif (boundTexture.type !== webglType || boundTexture.texture !== webglTexture) {\n\t\t\t\tgl.bindTexture(webglType, webglTexture || emptyTextures[webglType]);\n\t\t\t\tboundTexture.type = webglType;\n\t\t\t\tboundTexture.texture = webglTexture;\n\t\t\t}\n\t\t}\n\n\t\tfunction unbindTexture() {\n\t\t\tvar boundTexture = currentBoundTextures[currentTextureSlot];\n\n\t\t\tif (boundTexture !== undefined && boundTexture.type !== undefined) {\n\t\t\t\tgl.bindTexture(boundTexture.type, null);\n\t\t\t\tboundTexture.type = undefined;\n\t\t\t\tboundTexture.texture = undefined;\n\t\t\t}\n\t\t}\n\n\t\tfunction compressedTexImage2D() {\n\t\t\ttry {\n\t\t\t\tgl.compressedTexImage2D.apply(gl, arguments);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('THREE.WebGLState:', error);\n\t\t\t}\n\t\t}\n\n\t\tfunction texImage2D() {\n\t\t\ttry {\n\t\t\t\tgl.texImage2D.apply(gl, arguments);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('THREE.WebGLState:', error);\n\t\t\t}\n\t\t}\n\n\t\tfunction texImage3D() {\n\t\t\ttry {\n\t\t\t\tgl.texImage3D.apply(gl, arguments);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('THREE.WebGLState:', error);\n\t\t\t}\n\t\t} //\n\n\n\t\tfunction scissor(scissor) {\n\t\t\tif (currentScissor.equals(scissor) === false) {\n\t\t\t\tgl.scissor(scissor.x, scissor.y, scissor.z, scissor.w);\n\t\t\t\tcurrentScissor.copy(scissor);\n\t\t\t}\n\t\t}\n\n\t\tfunction viewport(viewport) {\n\t\t\tif (currentViewport.equals(viewport) === false) {\n\t\t\t\tgl.viewport(viewport.x, viewport.y, viewport.z, viewport.w);\n\t\t\t\tcurrentViewport.copy(viewport);\n\t\t\t}\n\t\t} //\n\n\n\t\tfunction reset() {\n\t\t\tenabledCapabilities = {};\n\t\t\tcurrentTextureSlot = null;\n\t\t\tcurrentBoundTextures = {};\n\t\t\tcurrentProgram = null;\n\t\t\tcurrentBlendingEnabled = null;\n\t\t\tcurrentBlending = null;\n\t\t\tcurrentBlendEquation = null;\n\t\t\tcurrentBlendSrc = null;\n\t\t\tcurrentBlendDst = null;\n\t\t\tcurrentBlendEquationAlpha = null;\n\t\t\tcurrentBlendSrcAlpha = null;\n\t\t\tcurrentBlendDstAlpha = null;\n\t\t\tcurrentPremultipledAlpha = false;\n\t\t\tcurrentFlipSided = null;\n\t\t\tcurrentCullFace = null;\n\t\t\tcurrentLineWidth = null;\n\t\t\tcurrentPolygonOffsetFactor = null;\n\t\t\tcurrentPolygonOffsetUnits = null;\n\t\t\tcolorBuffer.reset();\n\t\t\tdepthBuffer.reset();\n\t\t\tstencilBuffer.reset();\n\t\t}\n\n\t\treturn {\n\t\t\tbuffers: {\n\t\t\t\tcolor: colorBuffer,\n\t\t\t\tdepth: depthBuffer,\n\t\t\t\tstencil: stencilBuffer\n\t\t\t},\n\t\t\tenable: enable,\n\t\t\tdisable: disable,\n\t\t\tuseProgram: useProgram,\n\t\t\tsetBlending: setBlending,\n\t\t\tsetMaterial: setMaterial,\n\t\t\tsetFlipSided: setFlipSided,\n\t\t\tsetCullFace: setCullFace,\n\t\t\tsetLineWidth: setLineWidth,\n\t\t\tsetPolygonOffset: setPolygonOffset,\n\t\t\tsetScissorTest: setScissorTest,\n\t\t\tactiveTexture: activeTexture,\n\t\t\tbindTexture: bindTexture,\n\t\t\tunbindTexture: unbindTexture,\n\t\t\tcompressedTexImage2D: compressedTexImage2D,\n\t\t\ttexImage2D: texImage2D,\n\t\t\ttexImage3D: texImage3D,\n\t\t\tscissor: scissor,\n\t\t\tviewport: viewport,\n\t\t\treset: reset\n\t\t};\n\t}\n\n\tfunction WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info) {\n\t\tvar _wrappingToGL, _filterToGL;\n\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\t\tvar maxTextures = capabilities.maxTextures;\n\t\tvar maxCubemapSize = capabilities.maxCubemapSize;\n\t\tvar maxTextureSize = capabilities.maxTextureSize;\n\t\tvar maxSamples = capabilities.maxSamples;\n\n\t\tvar _videoTextures = new WeakMap();\n\n\t\tvar _canvas; // cordova iOS (as of 5.0) still uses UIWebView, which provides OffscreenCanvas,\n\t\t// also OffscreenCanvas.getContext(\"webgl\"), but not OffscreenCanvas.getContext(\"2d\")!\n\t\t// Some implementations may only implement OffscreenCanvas partially (e.g. lacking 2d).\n\n\n\t\tvar useOffscreenCanvas = false;\n\n\t\ttry {\n\t\t\tuseOffscreenCanvas = typeof OffscreenCanvas !== 'undefined' && new OffscreenCanvas(1, 1).getContext('2d') !== null;\n\t\t} catch (err) {// Ignore any errors\n\t\t}\n\n\t\tfunction createCanvas(width, height) {\n\t\t\t// Use OffscreenCanvas when available. Specially needed in web workers\n\t\t\treturn useOffscreenCanvas ? new OffscreenCanvas(width, height) : document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');\n\t\t}\n\n\t\tfunction resizeImage(image, needsPowerOfTwo, needsNewCanvas, maxSize) {\n\t\t\tvar scale = 1; // handle case if texture exceeds max size\n\n\t\t\tif (image.width > maxSize || image.height > maxSize) {\n\t\t\t\tscale = maxSize / Math.max(image.width, image.height);\n\t\t\t} // only perform resize if necessary\n\n\n\t\t\tif (scale < 1 || needsPowerOfTwo === true) {\n\t\t\t\t// only perform resize for certain image types\n\t\t\t\tif (typeof HTMLImageElement !== 'undefined' && image instanceof HTMLImageElement || typeof HTMLCanvasElement !== 'undefined' && image instanceof HTMLCanvasElement || typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap) {\n\t\t\t\t\tvar floor = needsPowerOfTwo ? MathUtils.floorPowerOfTwo : Math.floor;\n\t\t\t\t\tvar width = floor(scale * image.width);\n\t\t\t\t\tvar height = floor(scale * image.height);\n\t\t\t\t\tif (_canvas === undefined) _canvas = createCanvas(width, height); // cube textures can't reuse the same canvas\n\n\t\t\t\t\tvar canvas = needsNewCanvas ? createCanvas(width, height) : _canvas;\n\t\t\t\t\tcanvas.width = width;\n\t\t\t\t\tcanvas.height = height;\n\t\t\t\t\tvar context = canvas.getContext('2d');\n\t\t\t\t\tcontext.drawImage(image, 0, 0, width, height);\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').');\n\t\t\t\t\treturn canvas;\n\t\t\t\t} else {\n\t\t\t\t\tif ('data' in image) {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Image in DataTexture is too big (' + image.width + 'x' + image.height + ').');\n\t\t\t\t\t}\n\n\t\t\t\t\treturn image;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn image;\n\t\t}\n\n\t\tfunction isPowerOfTwo(image) {\n\t\t\treturn MathUtils.isPowerOfTwo(image.width) && MathUtils.isPowerOfTwo(image.height);\n\t\t}\n\n\t\tfunction textureNeedsPowerOfTwo(texture) {\n\t\t\tif (isWebGL2) return false;\n\t\t\treturn texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping || texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;\n\t\t}\n\n\t\tfunction textureNeedsGenerateMipmaps(texture, supportsMips) {\n\t\t\treturn texture.generateMipmaps && supportsMips && texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter;\n\t\t}\n\n\t\tfunction generateMipmap(target, texture, width, height) {\n\t\t\t_gl.generateMipmap(target);\n\n\t\t\tvar textureProperties = properties.get(texture); // Note: Math.log( x ) * Math.LOG2E used instead of Math.log2( x ) which is not supported by IE11\n\n\t\t\ttextureProperties.__maxMipLevel = Math.log(Math.max(width, height)) * Math.LOG2E;\n\t\t}\n\n\t\tfunction getInternalFormat(internalFormatName, glFormat, glType) {\n\t\t\tif (isWebGL2 === false) return glFormat;\n\n\t\t\tif (internalFormatName !== null) {\n\t\t\t\tif (_gl[internalFormatName] !== undefined) return _gl[internalFormatName];\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format \\'' + internalFormatName + '\\'');\n\t\t\t}\n\n\t\t\tvar internalFormat = glFormat;\n\n\t\t\tif (glFormat === 6403) {\n\t\t\t\tif (glType === 5126) internalFormat = 33326;\n\t\t\t\tif (glType === 5131) internalFormat = 33325;\n\t\t\t\tif (glType === 5121) internalFormat = 33321;\n\t\t\t}\n\n\t\t\tif (glFormat === 6407) {\n\t\t\t\tif (glType === 5126) internalFormat = 34837;\n\t\t\t\tif (glType === 5131) internalFormat = 34843;\n\t\t\t\tif (glType === 5121) internalFormat = 32849;\n\t\t\t}\n\n\t\t\tif (glFormat === 6408) {\n\t\t\t\tif (glType === 5126) internalFormat = 34836;\n\t\t\t\tif (glType === 5131) internalFormat = 34842;\n\t\t\t\tif (glType === 5121) internalFormat = 32856;\n\t\t\t}\n\n\t\t\tif (internalFormat === 33325 || internalFormat === 33326 || internalFormat === 34842 || internalFormat === 34836) {\n\t\t\t\textensions.get('EXT_color_buffer_float');\n\t\t\t}\n\n\t\t\treturn internalFormat;\n\t\t} // Fallback filters for non-power-of-2 textures\n\n\n\t\tfunction filterFallback(f) {\n\t\t\tif (f === NearestFilter || f === NearestMipmapNearestFilter || f === NearestMipmapLinearFilter) {\n\t\t\t\treturn 9728;\n\t\t\t}\n\n\t\t\treturn 9729;\n\t\t} //\n\n\n\t\tfunction onTextureDispose(event) {\n\t\t\tvar texture = event.target;\n\t\t\ttexture.removeEventListener('dispose', onTextureDispose);\n\t\t\tdeallocateTexture(texture);\n\n\t\t\tif (texture.isVideoTexture) {\n\t\t\t\t_videoTextures.delete(texture);\n\t\t\t}\n\n\t\t\tinfo.memory.textures--;\n\t\t}\n\n\t\tfunction onRenderTargetDispose(event) {\n\t\t\tvar renderTarget = event.target;\n\t\t\trenderTarget.removeEventListener('dispose', onRenderTargetDispose);\n\t\t\tdeallocateRenderTarget(renderTarget);\n\t\t\tinfo.memory.textures--;\n\t\t} //\n\n\n\t\tfunction deallocateTexture(texture) {\n\t\t\tvar textureProperties = properties.get(texture);\n\t\t\tif (textureProperties.__webglInit === undefined) return;\n\n\t\t\t_gl.deleteTexture(textureProperties.__webglTexture);\n\n\t\t\tproperties.remove(texture);\n\t\t}\n\n\t\tfunction deallocateRenderTarget(renderTarget) {\n\t\t\tvar renderTargetProperties = properties.get(renderTarget);\n\t\t\tvar textureProperties = properties.get(renderTarget.texture);\n\t\t\tif (!renderTarget) return;\n\n\t\t\tif (textureProperties.__webglTexture !== undefined) {\n\t\t\t\t_gl.deleteTexture(textureProperties.__webglTexture);\n\t\t\t}\n\n\t\t\tif (renderTarget.depthTexture) {\n\t\t\t\trenderTarget.depthTexture.dispose();\n\t\t\t}\n\n\t\t\tif (renderTarget.isWebGLCubeRenderTarget) {\n\t\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\t\t_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer[i]);\n\n\t\t\t\t\tif (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t_gl.deleteFramebuffer(renderTargetProperties.__webglFramebuffer);\n\n\t\t\t\tif (renderTargetProperties.__webglDepthbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthbuffer);\n\t\t\t\tif (renderTargetProperties.__webglMultisampledFramebuffer) _gl.deleteFramebuffer(renderTargetProperties.__webglMultisampledFramebuffer);\n\t\t\t\tif (renderTargetProperties.__webglColorRenderbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglColorRenderbuffer);\n\t\t\t\tif (renderTargetProperties.__webglDepthRenderbuffer) _gl.deleteRenderbuffer(renderTargetProperties.__webglDepthRenderbuffer);\n\t\t\t}\n\n\t\t\tproperties.remove(renderTarget.texture);\n\t\t\tproperties.remove(renderTarget);\n\t\t} //\n\n\n\t\tvar textureUnits = 0;\n\n\t\tfunction resetTextureUnits() {\n\t\t\ttextureUnits = 0;\n\t\t}\n\n\t\tfunction allocateTextureUnit() {\n\t\t\tvar textureUnit = textureUnits;\n\n\t\t\tif (textureUnit >= maxTextures) {\n\t\t\t\tconsole.warn('THREE.WebGLTextures: Trying to use ' + textureUnit + ' texture units while this GPU supports only ' + maxTextures);\n\t\t\t}\n\n\t\t\ttextureUnits += 1;\n\t\t\treturn textureUnit;\n\t\t} //\n\n\n\t\tfunction setTexture2D(texture, slot) {\n\t\t\tvar textureProperties = properties.get(texture);\n\t\t\tif (texture.isVideoTexture) updateVideoTexture(texture);\n\n\t\t\tif (texture.version > 0 && textureProperties.__version !== texture.version) {\n\t\t\t\tvar image = texture.image;\n\n\t\t\t\tif (image === undefined) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture marked for update but image is undefined');\n\t\t\t\t} else if (image.complete === false) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture marked for update but image is incomplete');\n\t\t\t\t} else {\n\t\t\t\t\tuploadTexture(textureProperties, texture, slot);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(3553, textureProperties.__webglTexture);\n\t\t}\n\n\t\tfunction setTexture2DArray(texture, slot) {\n\t\t\tvar textureProperties = properties.get(texture);\n\n\t\t\tif (texture.version > 0 && textureProperties.__version !== texture.version) {\n\t\t\t\tuploadTexture(textureProperties, texture, slot);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(35866, textureProperties.__webglTexture);\n\t\t}\n\n\t\tfunction setTexture3D(texture, slot) {\n\t\t\tvar textureProperties = properties.get(texture);\n\n\t\t\tif (texture.version > 0 && textureProperties.__version !== texture.version) {\n\t\t\t\tuploadTexture(textureProperties, texture, slot);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(32879, textureProperties.__webglTexture);\n\t\t}\n\n\t\tfunction setTextureCube(texture, slot) {\n\t\t\tvar textureProperties = properties.get(texture);\n\n\t\t\tif (texture.version > 0 && textureProperties.__version !== texture.version) {\n\t\t\t\tuploadCubeTexture(textureProperties, texture, slot);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(34067, textureProperties.__webglTexture);\n\t\t}\n\n\t\tvar wrappingToGL = (_wrappingToGL = {}, _wrappingToGL[RepeatWrapping] = 10497, _wrappingToGL[ClampToEdgeWrapping] = 33071, _wrappingToGL[MirroredRepeatWrapping] = 33648, _wrappingToGL);\n\t\tvar filterToGL = (_filterToGL = {}, _filterToGL[NearestFilter] = 9728, _filterToGL[NearestMipmapNearestFilter] = 9984, _filterToGL[NearestMipmapLinearFilter] = 9986, _filterToGL[LinearFilter] = 9729, _filterToGL[LinearMipmapNearestFilter] = 9985, _filterToGL[LinearMipmapLinearFilter] = 9987, _filterToGL);\n\n\t\tfunction setTextureParameters(textureType, texture, supportsMips) {\n\t\t\tif (supportsMips) {\n\t\t\t\t_gl.texParameteri(textureType, 10242, wrappingToGL[texture.wrapS]);\n\n\t\t\t\t_gl.texParameteri(textureType, 10243, wrappingToGL[texture.wrapT]);\n\n\t\t\t\tif (textureType === 32879 || textureType === 35866) {\n\t\t\t\t\t_gl.texParameteri(textureType, 32882, wrappingToGL[texture.wrapR]);\n\t\t\t\t}\n\n\t\t\t\t_gl.texParameteri(textureType, 10240, filterToGL[texture.magFilter]);\n\n\t\t\t\t_gl.texParameteri(textureType, 10241, filterToGL[texture.minFilter]);\n\t\t\t} else {\n\t\t\t\t_gl.texParameteri(textureType, 10242, 33071);\n\n\t\t\t\t_gl.texParameteri(textureType, 10243, 33071);\n\n\t\t\t\tif (textureType === 32879 || textureType === 35866) {\n\t\t\t\t\t_gl.texParameteri(textureType, 32882, 33071);\n\t\t\t\t}\n\n\t\t\t\tif (texture.wrapS !== ClampToEdgeWrapping || texture.wrapT !== ClampToEdgeWrapping) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.');\n\t\t\t\t}\n\n\t\t\t\t_gl.texParameteri(textureType, 10240, filterFallback(texture.magFilter));\n\n\t\t\t\t_gl.texParameteri(textureType, 10241, filterFallback(texture.minFilter));\n\n\t\t\t\tif (texture.minFilter !== NearestFilter && texture.minFilter !== LinearFilter) {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar extension = extensions.get('EXT_texture_filter_anisotropic');\n\n\t\t\tif (extension) {\n\t\t\t\tif (texture.type === FloatType && extensions.get('OES_texture_float_linear') === null) return;\n\t\t\t\tif (texture.type === HalfFloatType && (isWebGL2 || extensions.get('OES_texture_half_float_linear')) === null) return;\n\n\t\t\t\tif (texture.anisotropy > 1 || properties.get(texture).__currentAnisotropy) {\n\t\t\t\t\t_gl.texParameterf(textureType, extension.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(texture.anisotropy, capabilities.getMaxAnisotropy()));\n\n\t\t\t\t\tproperties.get(texture).__currentAnisotropy = texture.anisotropy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction initTexture(textureProperties, texture) {\n\t\t\tif (textureProperties.__webglInit === undefined) {\n\t\t\t\ttextureProperties.__webglInit = true;\n\t\t\t\ttexture.addEventListener('dispose', onTextureDispose);\n\t\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\t\t\t\tinfo.memory.textures++;\n\t\t\t}\n\t\t}\n\n\t\tfunction uploadTexture(textureProperties, texture, slot) {\n\t\t\tvar textureType = 3553;\n\t\t\tif (texture.isDataTexture2DArray) textureType = 35866;\n\t\t\tif (texture.isDataTexture3D) textureType = 32879;\n\t\t\tinitTexture(textureProperties, texture);\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(textureType, textureProperties.__webglTexture);\n\n\t\t\t_gl.pixelStorei(37440, texture.flipY);\n\n\t\t\t_gl.pixelStorei(37441, texture.premultiplyAlpha);\n\n\t\t\t_gl.pixelStorei(3317, texture.unpackAlignment);\n\n\t\t\tvar needsPowerOfTwo = textureNeedsPowerOfTwo(texture) && isPowerOfTwo(texture.image) === false;\n\t\t\tvar image = resizeImage(texture.image, needsPowerOfTwo, false, maxTextureSize);\n\t\t\tvar supportsMips = isPowerOfTwo(image) || isWebGL2,\n\t\t\t\t\tglFormat = utils.convert(texture.format);\n\t\t\tvar glType = utils.convert(texture.type),\n\t\t\t\t\tglInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType);\n\t\t\tsetTextureParameters(textureType, texture, supportsMips);\n\t\t\tvar mipmap;\n\t\t\tvar mipmaps = texture.mipmaps;\n\n\t\t\tif (texture.isDepthTexture) {\n\t\t\t\t// populate depth texture with dummy data\n\t\t\t\tglInternalFormat = 6402;\n\n\t\t\t\tif (isWebGL2) {\n\t\t\t\t\tif (texture.type === FloatType) {\n\t\t\t\t\t\tglInternalFormat = 36012;\n\t\t\t\t\t} else if (texture.type === UnsignedIntType) {\n\t\t\t\t\t\tglInternalFormat = 33190;\n\t\t\t\t\t} else if (texture.type === UnsignedInt248Type) {\n\t\t\t\t\t\tglInternalFormat = 35056;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tglInternalFormat = 33189; // WebGL2 requires sized internalformat for glTexImage2D\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (texture.type === FloatType) {\n\t\t\t\t\t\tconsole.error('WebGLRenderer: Floating point depth texture requires WebGL2.');\n\t\t\t\t\t}\n\t\t\t\t} // validation checks for WebGL 1\n\n\n\t\t\t\tif (texture.format === DepthFormat && glInternalFormat === 6402) {\n\t\t\t\t\t// The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t\t// DEPTH_COMPONENT and type is not UNSIGNED_SHORT or UNSIGNED_INT\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tif (texture.type !== UnsignedShortType && texture.type !== UnsignedIntType) {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture.');\n\t\t\t\t\t\ttexture.type = UnsignedShortType;\n\t\t\t\t\t\tglType = utils.convert(texture.type);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (texture.format === DepthStencilFormat && glInternalFormat === 6402) {\n\t\t\t\t\t// Depth stencil textures need the DEPTH_STENCIL internal format\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\t\t\t\t\tglInternalFormat = 34041; // The error INVALID_OPERATION is generated by texImage2D if format and internalformat are\n\t\t\t\t\t// DEPTH_STENCIL and type is not UNSIGNED_INT_24_8_WEBGL.\n\t\t\t\t\t// (https://www.khronos.org/registry/webgl/extensions/WEBGL_depth_texture/)\n\n\t\t\t\t\tif (texture.type !== UnsignedInt248Type) {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture.');\n\t\t\t\t\t\ttexture.type = UnsignedInt248Type;\n\t\t\t\t\t\tglType = utils.convert(texture.type);\n\t\t\t\t\t}\n\t\t\t\t} //\n\n\n\t\t\t\tstate.texImage2D(3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, null);\n\t\t\t} else if (texture.isDataTexture) {\n\t\t\t\t// use manually created mipmaps if available\n\t\t\t\t// if there are no manual mipmaps\n\t\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\t\t\t\tif (mipmaps.length > 0 && supportsMips) {\n\t\t\t\t\tfor (var i = 0, il = mipmaps.length; i < il; i++) {\n\t\t\t\t\t\tmipmap = mipmaps[i];\n\t\t\t\t\t\tstate.texImage2D(3553, i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.generateMipmaps = false;\n\t\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\t\t\t\t} else {\n\t\t\t\t\tstate.texImage2D(3553, 0, glInternalFormat, image.width, image.height, 0, glFormat, glType, image.data);\n\t\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\t\t\t\t}\n\t\t\t} else if (texture.isCompressedTexture) {\n\t\t\t\tfor (var _i = 0, _il = mipmaps.length; _i < _il; _i++) {\n\t\t\t\t\tmipmap = mipmaps[_i];\n\n\t\t\t\t\tif (texture.format !== RGBAFormat && texture.format !== RGBFormat) {\n\t\t\t\t\t\tif (glFormat !== null) {\n\t\t\t\t\t\t\tstate.compressedTexImage2D(3553, _i, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.texImage2D(3553, _i, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\t\t\t} else if (texture.isDataTexture2DArray) {\n\t\t\t\tstate.texImage3D(35866, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data);\n\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\t\t\t} else if (texture.isDataTexture3D) {\n\t\t\t\tstate.texImage3D(32879, 0, glInternalFormat, image.width, image.height, image.depth, 0, glFormat, glType, image.data);\n\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\t\t\t} else {\n\t\t\t\t// regular Texture (image, video, canvas)\n\t\t\t\t// use manually created mipmaps if available\n\t\t\t\t// if there are no manual mipmaps\n\t\t\t\t// set 0 level mipmap and then use GL to generate other mipmap levels\n\t\t\t\tif (mipmaps.length > 0 && supportsMips) {\n\t\t\t\t\tfor (var _i2 = 0, _il2 = mipmaps.length; _i2 < _il2; _i2++) {\n\t\t\t\t\t\tmipmap = mipmaps[_i2];\n\t\t\t\t\t\tstate.texImage2D(3553, _i2, glInternalFormat, glFormat, glType, mipmap);\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.generateMipmaps = false;\n\t\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\t\t\t\t} else {\n\t\t\t\t\tstate.texImage2D(3553, 0, glInternalFormat, glFormat, glType, image);\n\t\t\t\t\ttextureProperties.__maxMipLevel = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (textureNeedsGenerateMipmaps(texture, supportsMips)) {\n\t\t\t\tgenerateMipmap(textureType, texture, image.width, image.height);\n\t\t\t}\n\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tif (texture.onUpdate) texture.onUpdate(texture);\n\t\t}\n\n\t\tfunction uploadCubeTexture(textureProperties, texture, slot) {\n\t\t\tif (texture.image.length !== 6) return;\n\t\t\tinitTexture(textureProperties, texture);\n\t\t\tstate.activeTexture(33984 + slot);\n\t\t\tstate.bindTexture(34067, textureProperties.__webglTexture);\n\n\t\t\t_gl.pixelStorei(37440, texture.flipY);\n\n\t\t\t_gl.pixelStorei(37441, texture.premultiplyAlpha);\n\n\t\t\t_gl.pixelStorei(3317, texture.unpackAlignment);\n\n\t\t\tvar isCompressed = texture && (texture.isCompressedTexture || texture.image[0].isCompressedTexture);\n\t\t\tvar isDataTexture = texture.image[0] && texture.image[0].isDataTexture;\n\t\t\tvar cubeImage = [];\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tif (!isCompressed && !isDataTexture) {\n\t\t\t\t\tcubeImage[i] = resizeImage(texture.image[i], false, true, maxCubemapSize);\n\t\t\t\t} else {\n\t\t\t\t\tcubeImage[i] = isDataTexture ? texture.image[i].image : texture.image[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar image = cubeImage[0],\n\t\t\t\t\tsupportsMips = isPowerOfTwo(image) || isWebGL2,\n\t\t\t\t\tglFormat = utils.convert(texture.format),\n\t\t\t\t\tglType = utils.convert(texture.type),\n\t\t\t\t\tglInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType);\n\t\t\tsetTextureParameters(34067, texture, supportsMips);\n\t\t\tvar mipmaps;\n\n\t\t\tif (isCompressed) {\n\t\t\t\tfor (var _i3 = 0; _i3 < 6; _i3++) {\n\t\t\t\t\tmipmaps = cubeImage[_i3].mipmaps;\n\n\t\t\t\t\tfor (var j = 0; j < mipmaps.length; j++) {\n\t\t\t\t\t\tvar mipmap = mipmaps[j];\n\n\t\t\t\t\t\tif (texture.format !== RGBAFormat && texture.format !== RGBFormat) {\n\t\t\t\t\t\t\tif (glFormat !== null) {\n\t\t\t\t\t\t\t\tstate.compressedTexImage2D(34069 + _i3, j, glInternalFormat, mipmap.width, mipmap.height, 0, mipmap.data);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstate.texImage2D(34069 + _i3, j, glInternalFormat, mipmap.width, mipmap.height, 0, glFormat, glType, mipmap.data);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length - 1;\n\t\t\t} else {\n\t\t\t\tmipmaps = texture.mipmaps;\n\n\t\t\t\tfor (var _i4 = 0; _i4 < 6; _i4++) {\n\t\t\t\t\tif (isDataTexture) {\n\t\t\t\t\t\tstate.texImage2D(34069 + _i4, 0, glInternalFormat, cubeImage[_i4].width, cubeImage[_i4].height, 0, glFormat, glType, cubeImage[_i4].data);\n\n\t\t\t\t\t\tfor (var _j = 0; _j < mipmaps.length; _j++) {\n\t\t\t\t\t\t\tvar _mipmap = mipmaps[_j];\n\t\t\t\t\t\t\tvar mipmapImage = _mipmap.image[_i4].image;\n\t\t\t\t\t\t\tstate.texImage2D(34069 + _i4, _j + 1, glInternalFormat, mipmapImage.width, mipmapImage.height, 0, glFormat, glType, mipmapImage.data);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate.texImage2D(34069 + _i4, 0, glInternalFormat, glFormat, glType, cubeImage[_i4]);\n\n\t\t\t\t\t\tfor (var _j2 = 0; _j2 < mipmaps.length; _j2++) {\n\t\t\t\t\t\t\tvar _mipmap2 = mipmaps[_j2];\n\t\t\t\t\t\t\tstate.texImage2D(34069 + _i4, _j2 + 1, glInternalFormat, glFormat, glType, _mipmap2.image[_i4]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttextureProperties.__maxMipLevel = mipmaps.length;\n\t\t\t}\n\n\t\t\tif (textureNeedsGenerateMipmaps(texture, supportsMips)) {\n\t\t\t\t// We assume images for cube map have the same size.\n\t\t\t\tgenerateMipmap(34067, texture, image.width, image.height);\n\t\t\t}\n\n\t\t\ttextureProperties.__version = texture.version;\n\t\t\tif (texture.onUpdate) texture.onUpdate(texture);\n\t\t} // Render targets\n\t\t// Setup storage for target texture and bind it to correct framebuffer\n\n\n\t\tfunction setupFrameBufferTexture(framebuffer, renderTarget, attachment, textureTarget) {\n\t\t\tvar glFormat = utils.convert(renderTarget.texture.format);\n\t\t\tvar glType = utils.convert(renderTarget.texture.type);\n\t\t\tvar glInternalFormat = getInternalFormat(renderTarget.texture.internalFormat, glFormat, glType);\n\t\t\tstate.texImage2D(textureTarget, 0, glInternalFormat, renderTarget.width, renderTarget.height, 0, glFormat, glType, null);\n\n\t\t\t_gl.bindFramebuffer(36160, framebuffer);\n\n\t\t\t_gl.framebufferTexture2D(36160, attachment, textureTarget, properties.get(renderTarget.texture).__webglTexture, 0);\n\n\t\t\t_gl.bindFramebuffer(36160, null);\n\t\t} // Setup storage for internal depth/stencil buffers and bind to correct framebuffer\n\n\n\t\tfunction setupRenderBufferStorage(renderbuffer, renderTarget, isMultisample) {\n\t\t\t_gl.bindRenderbuffer(36161, renderbuffer);\n\n\t\t\tif (renderTarget.depthBuffer && !renderTarget.stencilBuffer) {\n\t\t\t\tvar glInternalFormat = 33189;\n\n\t\t\t\tif (isMultisample) {\n\t\t\t\t\tvar depthTexture = renderTarget.depthTexture;\n\n\t\t\t\t\tif (depthTexture && depthTexture.isDepthTexture) {\n\t\t\t\t\t\tif (depthTexture.type === FloatType) {\n\t\t\t\t\t\t\tglInternalFormat = 36012;\n\t\t\t\t\t\t} else if (depthTexture.type === UnsignedIntType) {\n\t\t\t\t\t\t\tglInternalFormat = 33190;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tvar samples = getRenderTargetSamples(renderTarget);\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample(36161, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n\t\t\t\t} else {\n\t\t\t\t\t_gl.renderbufferStorage(36161, glInternalFormat, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\n\t\t\t\t_gl.framebufferRenderbuffer(36160, 36096, 36161, renderbuffer);\n\t\t\t} else if (renderTarget.depthBuffer && renderTarget.stencilBuffer) {\n\t\t\t\tif (isMultisample) {\n\t\t\t\t\tvar _samples = getRenderTargetSamples(renderTarget);\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample(36161, _samples, 35056, renderTarget.width, renderTarget.height);\n\t\t\t\t} else {\n\t\t\t\t\t_gl.renderbufferStorage(36161, 34041, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\n\t\t\t\t_gl.framebufferRenderbuffer(36160, 33306, 36161, renderbuffer);\n\t\t\t} else {\n\t\t\t\tvar glFormat = utils.convert(renderTarget.texture.format);\n\t\t\t\tvar glType = utils.convert(renderTarget.texture.type);\n\n\t\t\t\tvar _glInternalFormat = getInternalFormat(renderTarget.texture.internalFormat, glFormat, glType);\n\n\t\t\t\tif (isMultisample) {\n\t\t\t\t\tvar _samples2 = getRenderTargetSamples(renderTarget);\n\n\t\t\t\t\t_gl.renderbufferStorageMultisample(36161, _samples2, _glInternalFormat, renderTarget.width, renderTarget.height);\n\t\t\t\t} else {\n\t\t\t\t\t_gl.renderbufferStorage(36161, _glInternalFormat, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_gl.bindRenderbuffer(36161, null);\n\t\t} // Setup resources for a Depth Texture for a FBO (needs an extension)\n\n\n\t\tfunction setupDepthTexture(framebuffer, renderTarget) {\n\t\t\tvar isCube = renderTarget && renderTarget.isWebGLCubeRenderTarget;\n\t\t\tif (isCube) throw new Error('Depth Texture with cube render targets is not supported');\n\n\t\t\t_gl.bindFramebuffer(36160, framebuffer);\n\n\t\t\tif (!(renderTarget.depthTexture && renderTarget.depthTexture.isDepthTexture)) {\n\t\t\t\tthrow new Error('renderTarget.depthTexture must be an instance of THREE.DepthTexture');\n\t\t\t} // upload an empty depth texture with framebuffer size\n\n\n\t\t\tif (!properties.get(renderTarget.depthTexture).__webglTexture || renderTarget.depthTexture.image.width !== renderTarget.width || renderTarget.depthTexture.image.height !== renderTarget.height) {\n\t\t\t\trenderTarget.depthTexture.image.width = renderTarget.width;\n\t\t\t\trenderTarget.depthTexture.image.height = renderTarget.height;\n\t\t\t\trenderTarget.depthTexture.needsUpdate = true;\n\t\t\t}\n\n\t\t\tsetTexture2D(renderTarget.depthTexture, 0);\n\n\t\t\tvar webglDepthTexture = properties.get(renderTarget.depthTexture).__webglTexture;\n\n\t\t\tif (renderTarget.depthTexture.format === DepthFormat) {\n\t\t\t\t_gl.framebufferTexture2D(36160, 36096, 3553, webglDepthTexture, 0);\n\t\t\t} else if (renderTarget.depthTexture.format === DepthStencilFormat) {\n\t\t\t\t_gl.framebufferTexture2D(36160, 33306, 3553, webglDepthTexture, 0);\n\t\t\t} else {\n\t\t\t\tthrow new Error('Unknown depthTexture format');\n\t\t\t}\n\t\t} // Setup GL resources for a non-texture depth buffer\n\n\n\t\tfunction setupDepthRenderbuffer(renderTarget) {\n\t\t\tvar renderTargetProperties = properties.get(renderTarget);\n\t\t\tvar isCube = renderTarget.isWebGLCubeRenderTarget === true;\n\n\t\t\tif (renderTarget.depthTexture) {\n\t\t\t\tif (isCube) throw new Error('target.depthTexture not supported in Cube render targets');\n\t\t\t\tsetupDepthTexture(renderTargetProperties.__webglFramebuffer, renderTarget);\n\t\t\t} else {\n\t\t\t\tif (isCube) {\n\t\t\t\t\trenderTargetProperties.__webglDepthbuffer = [];\n\n\t\t\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\t\t\t_gl.bindFramebuffer(36160, renderTargetProperties.__webglFramebuffer[i]);\n\n\t\t\t\t\t\trenderTargetProperties.__webglDepthbuffer[i] = _gl.createRenderbuffer();\n\t\t\t\t\t\tsetupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer[i], renderTarget, false);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t_gl.bindFramebuffer(36160, renderTargetProperties.__webglFramebuffer);\n\n\t\t\t\t\trenderTargetProperties.__webglDepthbuffer = _gl.createRenderbuffer();\n\t\t\t\t\tsetupRenderBufferStorage(renderTargetProperties.__webglDepthbuffer, renderTarget, false);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_gl.bindFramebuffer(36160, null);\n\t\t} // Set up GL resources for the render target\n\n\n\t\tfunction setupRenderTarget(renderTarget) {\n\t\t\tvar renderTargetProperties = properties.get(renderTarget);\n\t\t\tvar textureProperties = properties.get(renderTarget.texture);\n\t\t\trenderTarget.addEventListener('dispose', onRenderTargetDispose);\n\t\t\ttextureProperties.__webglTexture = _gl.createTexture();\n\t\t\tinfo.memory.textures++;\n\t\t\tvar isCube = renderTarget.isWebGLCubeRenderTarget === true;\n\t\t\tvar isMultisample = renderTarget.isWebGLMultisampleRenderTarget === true;\n\t\t\tvar supportsMips = isPowerOfTwo(renderTarget) || isWebGL2; // Handles WebGL2 RGBFormat fallback - #18858\n\n\t\t\tif (isWebGL2 && renderTarget.texture.format === RGBFormat && (renderTarget.texture.type === FloatType || renderTarget.texture.type === HalfFloatType)) {\n\t\t\t\trenderTarget.texture.format = RGBAFormat;\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.');\n\t\t\t} // Setup framebuffer\n\n\n\t\t\tif (isCube) {\n\t\t\t\trenderTargetProperties.__webglFramebuffer = [];\n\n\t\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\t\trenderTargetProperties.__webglFramebuffer[i] = _gl.createFramebuffer();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\trenderTargetProperties.__webglFramebuffer = _gl.createFramebuffer();\n\n\t\t\t\tif (isMultisample) {\n\t\t\t\t\tif (isWebGL2) {\n\t\t\t\t\t\trenderTargetProperties.__webglMultisampledFramebuffer = _gl.createFramebuffer();\n\t\t\t\t\t\trenderTargetProperties.__webglColorRenderbuffer = _gl.createRenderbuffer();\n\n\t\t\t\t\t\t_gl.bindRenderbuffer(36161, renderTargetProperties.__webglColorRenderbuffer);\n\n\t\t\t\t\t\tvar glFormat = utils.convert(renderTarget.texture.format);\n\t\t\t\t\t\tvar glType = utils.convert(renderTarget.texture.type);\n\t\t\t\t\t\tvar glInternalFormat = getInternalFormat(renderTarget.texture.internalFormat, glFormat, glType);\n\t\t\t\t\t\tvar samples = getRenderTargetSamples(renderTarget);\n\n\t\t\t\t\t\t_gl.renderbufferStorageMultisample(36161, samples, glInternalFormat, renderTarget.width, renderTarget.height);\n\n\t\t\t\t\t\t_gl.bindFramebuffer(36160, renderTargetProperties.__webglMultisampledFramebuffer);\n\n\t\t\t\t\t\t_gl.framebufferRenderbuffer(36160, 36064, 36161, renderTargetProperties.__webglColorRenderbuffer);\n\n\t\t\t\t\t\t_gl.bindRenderbuffer(36161, null);\n\n\t\t\t\t\t\tif (renderTarget.depthBuffer) {\n\t\t\t\t\t\t\trenderTargetProperties.__webglDepthRenderbuffer = _gl.createRenderbuffer();\n\t\t\t\t\t\t\tsetupRenderBufferStorage(renderTargetProperties.__webglDepthRenderbuffer, renderTarget, true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_gl.bindFramebuffer(36160, null);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // Setup color buffer\n\n\n\t\t\tif (isCube) {\n\t\t\t\tstate.bindTexture(34067, textureProperties.__webglTexture);\n\t\t\t\tsetTextureParameters(34067, renderTarget.texture, supportsMips);\n\n\t\t\t\tfor (var _i5 = 0; _i5 < 6; _i5++) {\n\t\t\t\t\tsetupFrameBufferTexture(renderTargetProperties.__webglFramebuffer[_i5], renderTarget, 36064, 34069 + _i5);\n\t\t\t\t}\n\n\t\t\t\tif (textureNeedsGenerateMipmaps(renderTarget.texture, supportsMips)) {\n\t\t\t\t\tgenerateMipmap(34067, renderTarget.texture, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture(34067, null);\n\t\t\t} else {\n\t\t\t\tstate.bindTexture(3553, textureProperties.__webglTexture);\n\t\t\t\tsetTextureParameters(3553, renderTarget.texture, supportsMips);\n\t\t\t\tsetupFrameBufferTexture(renderTargetProperties.__webglFramebuffer, renderTarget, 36064, 3553);\n\n\t\t\t\tif (textureNeedsGenerateMipmaps(renderTarget.texture, supportsMips)) {\n\t\t\t\t\tgenerateMipmap(3553, renderTarget.texture, renderTarget.width, renderTarget.height);\n\t\t\t\t}\n\n\t\t\t\tstate.bindTexture(3553, null);\n\t\t\t} // Setup depth and stencil buffers\n\n\n\t\t\tif (renderTarget.depthBuffer) {\n\t\t\t\tsetupDepthRenderbuffer(renderTarget);\n\t\t\t}\n\t\t}\n\n\t\tfunction updateRenderTargetMipmap(renderTarget) {\n\t\t\tvar texture = renderTarget.texture;\n\t\t\tvar supportsMips = isPowerOfTwo(renderTarget) || isWebGL2;\n\n\t\t\tif (textureNeedsGenerateMipmaps(texture, supportsMips)) {\n\t\t\t\tvar target = renderTarget.isWebGLCubeRenderTarget ? 34067 : 3553;\n\n\t\t\t\tvar webglTexture = properties.get(texture).__webglTexture;\n\n\t\t\t\tstate.bindTexture(target, webglTexture);\n\t\t\t\tgenerateMipmap(target, texture, renderTarget.width, renderTarget.height);\n\t\t\t\tstate.bindTexture(target, null);\n\t\t\t}\n\t\t}\n\n\t\tfunction updateMultisampleRenderTarget(renderTarget) {\n\t\t\tif (renderTarget.isWebGLMultisampleRenderTarget) {\n\t\t\t\tif (isWebGL2) {\n\t\t\t\t\tvar renderTargetProperties = properties.get(renderTarget);\n\n\t\t\t\t\t_gl.bindFramebuffer(36008, renderTargetProperties.__webglMultisampledFramebuffer);\n\n\t\t\t\t\t_gl.bindFramebuffer(36009, renderTargetProperties.__webglFramebuffer);\n\n\t\t\t\t\tvar width = renderTarget.width;\n\t\t\t\t\tvar height = renderTarget.height;\n\t\t\t\t\tvar mask = 16384;\n\t\t\t\t\tif (renderTarget.depthBuffer) mask |= 256;\n\t\t\t\t\tif (renderTarget.stencilBuffer) mask |= 1024;\n\n\t\t\t\t\t_gl.blitFramebuffer(0, 0, width, height, 0, 0, width, height, mask, 9728);\n\n\t\t\t\t\t_gl.bindFramebuffer(36160, renderTargetProperties.__webglMultisampledFramebuffer); // see #18905\n\n\t\t\t\t} else {\n\t\t\t\t\tconsole.warn('THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction getRenderTargetSamples(renderTarget) {\n\t\t\treturn isWebGL2 && renderTarget.isWebGLMultisampleRenderTarget ? Math.min(maxSamples, renderTarget.samples) : 0;\n\t\t}\n\n\t\tfunction updateVideoTexture(texture) {\n\t\t\tvar frame = info.render.frame; // Check the last frame we updated the VideoTexture\n\n\t\t\tif (_videoTextures.get(texture) !== frame) {\n\t\t\t\t_videoTextures.set(texture, frame);\n\n\t\t\t\ttexture.update();\n\t\t\t}\n\t\t} // backwards compatibility\n\n\n\t\tvar warnedTexture2D = false;\n\t\tvar warnedTextureCube = false;\n\n\t\tfunction safeSetTexture2D(texture, slot) {\n\t\t\tif (texture && texture.isWebGLRenderTarget) {\n\t\t\t\tif (warnedTexture2D === false) {\n\t\t\t\t\tconsole.warn('THREE.WebGLTextures.safeSetTexture2D: don\\'t use render targets as textures. Use their .texture property instead.');\n\t\t\t\t\twarnedTexture2D = true;\n\t\t\t\t}\n\n\t\t\t\ttexture = texture.texture;\n\t\t\t}\n\n\t\t\tsetTexture2D(texture, slot);\n\t\t}\n\n\t\tfunction safeSetTextureCube(texture, slot) {\n\t\t\tif (texture && texture.isWebGLCubeRenderTarget) {\n\t\t\t\tif (warnedTextureCube === false) {\n\t\t\t\t\tconsole.warn('THREE.WebGLTextures.safeSetTextureCube: don\\'t use cube render targets as textures. Use their .texture property instead.');\n\t\t\t\t\twarnedTextureCube = true;\n\t\t\t\t}\n\n\t\t\t\ttexture = texture.texture;\n\t\t\t}\n\n\t\t\tsetTextureCube(texture, slot);\n\t\t} //\n\n\n\t\tthis.allocateTextureUnit = allocateTextureUnit;\n\t\tthis.resetTextureUnits = resetTextureUnits;\n\t\tthis.setTexture2D = setTexture2D;\n\t\tthis.setTexture2DArray = setTexture2DArray;\n\t\tthis.setTexture3D = setTexture3D;\n\t\tthis.setTextureCube = setTextureCube;\n\t\tthis.setupRenderTarget = setupRenderTarget;\n\t\tthis.updateRenderTargetMipmap = updateRenderTargetMipmap;\n\t\tthis.updateMultisampleRenderTarget = updateMultisampleRenderTarget;\n\t\tthis.safeSetTexture2D = safeSetTexture2D;\n\t\tthis.safeSetTextureCube = safeSetTextureCube;\n\t}\n\n\tfunction WebGLUtils(gl, extensions, capabilities) {\n\t\tvar isWebGL2 = capabilities.isWebGL2;\n\n\t\tfunction convert(p) {\n\t\t\tvar extension;\n\t\t\tif (p === UnsignedByteType) return 5121;\n\t\t\tif (p === UnsignedShort4444Type) return 32819;\n\t\t\tif (p === UnsignedShort5551Type) return 32820;\n\t\t\tif (p === UnsignedShort565Type) return 33635;\n\t\t\tif (p === ByteType) return 5120;\n\t\t\tif (p === ShortType) return 5122;\n\t\t\tif (p === UnsignedShortType) return 5123;\n\t\t\tif (p === IntType) return 5124;\n\t\t\tif (p === UnsignedIntType) return 5125;\n\t\t\tif (p === FloatType) return 5126;\n\n\t\t\tif (p === HalfFloatType) {\n\t\t\t\tif (isWebGL2) return 5131;\n\t\t\t\textension = extensions.get('OES_texture_half_float');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\treturn extension.HALF_FLOAT_OES;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === AlphaFormat) return 6406;\n\t\t\tif (p === RGBFormat) return 6407;\n\t\t\tif (p === RGBAFormat) return 6408;\n\t\t\tif (p === LuminanceFormat) return 6409;\n\t\t\tif (p === LuminanceAlphaFormat) return 6410;\n\t\t\tif (p === DepthFormat) return 6402;\n\t\t\tif (p === DepthStencilFormat) return 34041;\n\t\t\tif (p === RedFormat) return 6403; // WebGL2 formats.\n\n\t\t\tif (p === RedIntegerFormat) return 36244;\n\t\t\tif (p === RGFormat) return 33319;\n\t\t\tif (p === RGIntegerFormat) return 33320;\n\t\t\tif (p === RGBIntegerFormat) return 36248;\n\t\t\tif (p === RGBAIntegerFormat) return 36249;\n\n\t\t\tif (p === RGB_S3TC_DXT1_Format || p === RGBA_S3TC_DXT1_Format || p === RGBA_S3TC_DXT3_Format || p === RGBA_S3TC_DXT5_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_s3tc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\tif (p === RGB_S3TC_DXT1_Format) return extension.COMPRESSED_RGB_S3TC_DXT1_EXT;\n\t\t\t\t\tif (p === RGBA_S3TC_DXT1_Format) return extension.COMPRESSED_RGBA_S3TC_DXT1_EXT;\n\t\t\t\t\tif (p === RGBA_S3TC_DXT3_Format) return extension.COMPRESSED_RGBA_S3TC_DXT3_EXT;\n\t\t\t\t\tif (p === RGBA_S3TC_DXT5_Format) return extension.COMPRESSED_RGBA_S3TC_DXT5_EXT;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGB_PVRTC_4BPPV1_Format || p === RGB_PVRTC_2BPPV1_Format || p === RGBA_PVRTC_4BPPV1_Format || p === RGBA_PVRTC_2BPPV1_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_pvrtc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\tif (p === RGB_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif (p === RGB_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;\n\t\t\t\t\tif (p === RGBA_PVRTC_4BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;\n\t\t\t\t\tif (p === RGBA_PVRTC_2BPPV1_Format) return extension.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGB_ETC1_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_etc1');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\treturn extension.COMPRESSED_RGB_ETC1_WEBGL;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGB_ETC2_Format || p === RGBA_ETC2_EAC_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_etc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\tif (p === RGB_ETC2_Format) return extension.COMPRESSED_RGB8_ETC2;\n\t\t\t\t\tif (p === RGBA_ETC2_EAC_Format) return extension.COMPRESSED_RGBA8_ETC2_EAC;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGBA_ASTC_4x4_Format || p === RGBA_ASTC_5x4_Format || p === RGBA_ASTC_5x5_Format || p === RGBA_ASTC_6x5_Format || p === RGBA_ASTC_6x6_Format || p === RGBA_ASTC_8x5_Format || p === RGBA_ASTC_8x6_Format || p === RGBA_ASTC_8x8_Format || p === RGBA_ASTC_10x5_Format || p === RGBA_ASTC_10x6_Format || p === RGBA_ASTC_10x8_Format || p === RGBA_ASTC_10x10_Format || p === RGBA_ASTC_12x10_Format || p === RGBA_ASTC_12x12_Format || p === SRGB8_ALPHA8_ASTC_4x4_Format || p === SRGB8_ALPHA8_ASTC_5x4_Format || p === SRGB8_ALPHA8_ASTC_5x5_Format || p === SRGB8_ALPHA8_ASTC_6x5_Format || p === SRGB8_ALPHA8_ASTC_6x6_Format || p === SRGB8_ALPHA8_ASTC_8x5_Format || p === SRGB8_ALPHA8_ASTC_8x6_Format || p === SRGB8_ALPHA8_ASTC_8x8_Format || p === SRGB8_ALPHA8_ASTC_10x5_Format || p === SRGB8_ALPHA8_ASTC_10x6_Format || p === SRGB8_ALPHA8_ASTC_10x8_Format || p === SRGB8_ALPHA8_ASTC_10x10_Format || p === SRGB8_ALPHA8_ASTC_12x10_Format || p === SRGB8_ALPHA8_ASTC_12x12_Format) {\n\t\t\t\textension = extensions.get('WEBGL_compressed_texture_astc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\t// TODO Complete?\n\t\t\t\t\treturn p;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === RGBA_BPTC_Format) {\n\t\t\t\textension = extensions.get('EXT_texture_compression_bptc');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\t// TODO Complete?\n\t\t\t\t\treturn p;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (p === UnsignedInt248Type) {\n\t\t\t\tif (isWebGL2) return 34042;\n\t\t\t\textension = extensions.get('WEBGL_depth_texture');\n\n\t\t\t\tif (extension !== null) {\n\t\t\t\t\treturn extension.UNSIGNED_INT_24_8_WEBGL;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tconvert: convert\n\t\t};\n\t}\n\n\tfunction Group() {\n\t\tObject3D.call(this);\n\t\tthis.type = 'Group';\n\t}\n\n\tGroup.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Group,\n\t\tisGroup: true\n\t});\n\n\tfunction ArrayCamera(array) {\n\t\tif (array === void 0) {\n\t\t\tarray = [];\n\t\t}\n\n\t\tPerspectiveCamera.call(this);\n\t\tthis.cameras = array;\n\t}\n\n\tArrayCamera.prototype = Object.assign(Object.create(PerspectiveCamera.prototype), {\n\t\tconstructor: ArrayCamera,\n\t\tisArrayCamera: true\n\t});\n\n\t/**\n\t * @author jsantell / https://www.jsantell.com/\n\t * @author mrdoob / http://mrdoob.com/\n\t */\n\tvar cameraLPos = new Vector3();\n\tvar cameraRPos = new Vector3();\n\t/**\n\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t * the cameras' projection and world matrices have already been set.\n\t * And that near and far planes are identical for both cameras.\n\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t */\n\n\tfunction setProjectionFromUnion(camera, cameraL, cameraR) {\n\t\tcameraLPos.setFromMatrixPosition(cameraL.matrixWorld);\n\t\tcameraRPos.setFromMatrixPosition(cameraR.matrixWorld);\n\t\tvar ipd = cameraLPos.distanceTo(cameraRPos);\n\t\tvar projL = cameraL.projectionMatrix.elements;\n\t\tvar projR = cameraR.projectionMatrix.elements; // VR systems will have identical far and near planes, and\n\t\t// most likely identical top and bottom frustum extents.\n\t\t// Use the left camera for these values.\n\n\t\tvar near = projL[14] / (projL[10] - 1);\n\t\tvar far = projL[14] / (projL[10] + 1);\n\t\tvar topFov = (projL[9] + 1) / projL[5];\n\t\tvar bottomFov = (projL[9] - 1) / projL[5];\n\t\tvar leftFov = (projL[8] - 1) / projL[0];\n\t\tvar rightFov = (projR[8] + 1) / projR[0];\n\t\tvar left = near * leftFov;\n\t\tvar right = near * rightFov; // Calculate the new camera's position offset from the\n\t\t// left camera. xOffset should be roughly half `ipd`.\n\n\t\tvar zOffset = ipd / (-leftFov + rightFov);\n\t\tvar xOffset = zOffset * -leftFov; // TODO: Better way to apply this offset?\n\n\t\tcameraL.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);\n\t\tcamera.translateX(xOffset);\n\t\tcamera.translateZ(zOffset);\n\t\tcamera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale);\n\t\tcamera.matrixWorldInverse.getInverse(camera.matrixWorld); // Find the union of the frustum values of the cameras and scale\n\t\t// the values so that the near plane's position does not change in world space,\n\t\t// although must now be relative to the new union camera.\n\n\t\tvar near2 = near + zOffset;\n\t\tvar far2 = far + zOffset;\n\t\tvar left2 = left - xOffset;\n\t\tvar right2 = right + (ipd - xOffset);\n\t\tvar top2 = topFov * far / far2 * near2;\n\t\tvar bottom2 = bottomFov * far / far2 * near2;\n\t\tcamera.projectionMatrix.makePerspective(left2, right2, top2, bottom2, near2, far2);\n\t}\n\n\t/**\n\t * @author mrdoob / http://mrdoob.com/\n\t */\n\n\tfunction WebVRManager(renderer) {\n\t\tvar renderWidth, renderHeight;\n\t\tvar scope = this;\n\t\tvar device = null;\n\t\tvar frameData = null;\n\t\tvar poseTarget = null;\n\t\tvar controllers = [];\n\t\tvar standingMatrix = new Matrix4();\n\t\tvar standingMatrixInverse = new Matrix4();\n\t\tvar framebufferScaleFactor = 1.0;\n\t\tvar referenceSpaceType = 'local-floor';\n\n\t\tif (typeof window !== 'undefined' && 'VRFrameData' in window) {\n\t\t\tframeData = new window.VRFrameData();\n\t\t\twindow.addEventListener('vrdisplaypresentchange', onVRDisplayPresentChange, false);\n\t\t}\n\n\t\tvar matrixWorldInverse = new Matrix4();\n\t\tvar tempQuaternion = new Quaternion();\n\t\tvar tempPosition = new Vector3();\n\t\tvar cameraL = new PerspectiveCamera();\n\t\tcameraL.viewport = new Vector4();\n\t\tcameraL.layers.enable(1);\n\t\tvar cameraR = new PerspectiveCamera();\n\t\tcameraR.viewport = new Vector4();\n\t\tcameraR.layers.enable(2);\n\t\tvar cameraVR = new ArrayCamera([cameraL, cameraR]);\n\t\tcameraVR.layers.enable(1);\n\t\tcameraVR.layers.enable(2);\n\t\tvar currentSize = new Vector2(),\n\t\t\t\tcurrentPixelRatio;\n\n\t\tfunction onVRDisplayPresentChange() {\n\t\t\tvar isPresenting = scope.isPresenting = device !== null && device.isPresenting === true;\n\n\t\t\tif (isPresenting) {\n\t\t\t\tvar eyeParameters = device.getEyeParameters('left');\n\t\t\t\trenderWidth = 2 * eyeParameters.renderWidth * framebufferScaleFactor;\n\t\t\t\trenderHeight = eyeParameters.renderHeight * framebufferScaleFactor;\n\t\t\t\tcurrentPixelRatio = renderer.getPixelRatio();\n\t\t\t\trenderer.getSize(currentSize);\n\t\t\t\trenderer.setDrawingBufferSize(renderWidth, renderHeight, 1);\n\t\t\t\tcameraL.viewport.set(0, 0, renderWidth / 2, renderHeight);\n\t\t\t\tcameraR.viewport.set(renderWidth / 2, 0, renderWidth / 2, renderHeight);\n\t\t\t\tanimation.start();\n\t\t\t\tscope.dispatchEvent({\n\t\t\t\t\ttype: 'sessionstart'\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (scope.enabled) {\n\t\t\t\t\trenderer.setDrawingBufferSize(currentSize.width, currentSize.height, currentPixelRatio);\n\t\t\t\t}\n\n\t\t\t\tanimation.stop();\n\t\t\t\tscope.dispatchEvent({\n\t\t\t\t\ttype: 'sessionend'\n\t\t\t\t});\n\t\t\t}\n\t\t} //\n\n\n\t\tvar triggers = [];\n\t\tvar grips = [];\n\n\t\tfunction findGamepad(id) {\n\t\t\tvar gamepads = navigator.getGamepads && navigator.getGamepads();\n\n\t\t\tfor (var i = 0, l = gamepads.length; i < l; i++) {\n\t\t\t\tvar gamepad = gamepads[i];\n\n\t\t\t\tif (gamepad && (gamepad.id === 'Daydream Controller' || gamepad.id === 'Gear VR Controller' || gamepad.id === 'Oculus Go Controller' || gamepad.id === 'OpenVR Gamepad' || gamepad.id.startsWith('Oculus Touch') || gamepad.id.startsWith('HTC Vive Focus') || gamepad.id.startsWith('Spatial Controller'))) {\n\t\t\t\t\tvar hand = gamepad.hand;\n\t\t\t\t\tif (id === 0 && (hand === '' || hand === 'right')) return gamepad;\n\t\t\t\t\tif (id === 1 && hand === 'left') return gamepad;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction updateControllers() {\n\t\t\tfor (var i = 0; i < controllers.length; i++) {\n\t\t\t\tvar controller = controllers[i];\n\t\t\t\tvar gamepad = findGamepad(i);\n\n\t\t\t\tif (gamepad !== undefined && gamepad.pose !== undefined) {\n\t\t\t\t\tif (gamepad.pose === null) return; // Pose\n\n\t\t\t\t\tvar pose = gamepad.pose;\n\t\t\t\t\tif (pose.hasPosition === false) controller.position.set(0.2, -0.6, -0.05);\n\t\t\t\t\tif (pose.position !== null) controller.position.fromArray(pose.position);\n\t\t\t\t\tif (pose.orientation !== null) controller.quaternion.fromArray(pose.orientation);\n\t\t\t\t\tcontroller.matrix.compose(controller.position, controller.quaternion, controller.scale);\n\t\t\t\t\tcontroller.matrix.premultiply(standingMatrix);\n\t\t\t\t\tcontroller.matrix.decompose(controller.position, controller.quaternion, controller.scale);\n\t\t\t\t\tcontroller.matrixWorldNeedsUpdate = true;\n\t\t\t\t\tcontroller.visible = true; // Trigger\n\n\t\t\t\t\tvar buttonId = gamepad.id === 'Daydream Controller' ? 0 : 1;\n\t\t\t\t\tif (triggers[i] === undefined) triggers[i] = false;\n\n\t\t\t\t\tif (triggers[i] !== gamepad.buttons[buttonId].pressed) {\n\t\t\t\t\t\ttriggers[i] = gamepad.buttons[buttonId].pressed;\n\n\t\t\t\t\t\tif (triggers[i] === true) {\n\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\ttype: 'selectstart'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\ttype: 'selectend'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\ttype: 'select'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} // Grip\n\n\n\t\t\t\t\tbuttonId = 2;\n\t\t\t\t\tif (grips[i] === undefined) grips[i] = false; // Skip if the grip button doesn't exist on this controller\n\n\t\t\t\t\tif (gamepad.buttons[buttonId] !== undefined) {\n\t\t\t\t\t\tif (grips[i] !== gamepad.buttons[buttonId].pressed) {\n\t\t\t\t\t\t\tgrips[i] = gamepad.buttons[buttonId].pressed;\n\n\t\t\t\t\t\t\tif (grips[i] === true) {\n\t\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\t\ttype: 'squeezestart'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\t\ttype: 'squeezeend'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\t\t\t\ttype: 'squeeze'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcontroller.visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction updateViewportFromBounds(viewport, bounds) {\n\t\t\tif (bounds !== null && bounds.length === 4) {\n\t\t\t\tviewport.set(bounds[0] * renderWidth, bounds[1] * renderHeight, bounds[2] * renderWidth, bounds[3] * renderHeight);\n\t\t\t}\n\t\t} //\n\n\n\t\tthis.enabled = false;\n\n\t\tthis.getController = function (id) {\n\t\t\tvar controller = controllers[id];\n\n\t\t\tif (controller === undefined) {\n\t\t\t\tcontroller = new Group();\n\t\t\t\tcontroller.matrixAutoUpdate = false;\n\t\t\t\tcontroller.visible = false;\n\t\t\t\tcontrollers[id] = controller;\n\t\t\t}\n\n\t\t\treturn controller;\n\t\t};\n\n\t\tthis.getDevice = function () {\n\t\t\treturn device;\n\t\t};\n\n\t\tthis.setDevice = function (value) {\n\t\t\tif (value !== undefined) device = value;\n\t\t\tanimation.setContext(value);\n\t\t};\n\n\t\tthis.setFramebufferScaleFactor = function (value) {\n\t\t\tframebufferScaleFactor = value;\n\t\t};\n\n\t\tthis.setReferenceSpaceType = function (value) {\n\t\t\treferenceSpaceType = value;\n\t\t};\n\n\t\tthis.setPoseTarget = function (object) {\n\t\t\tif (object !== undefined) poseTarget = object;\n\t\t};\n\n\t\tthis.getCamera = function (camera) {\n\t\t\tvar userHeight = referenceSpaceType === 'local-floor' ? 1.6 : 0;\n\t\t\tdevice.depthNear = camera.near;\n\t\t\tdevice.depthFar = camera.far;\n\t\t\tdevice.getFrameData(frameData); //\n\n\t\t\tif (referenceSpaceType === 'local-floor') {\n\t\t\t\tvar stageParameters = device.stageParameters;\n\n\t\t\t\tif (stageParameters) {\n\t\t\t\t\tstandingMatrix.fromArray(stageParameters.sittingToStandingTransform);\n\t\t\t\t} else {\n\t\t\t\t\tstandingMatrix.makeTranslation(0, userHeight, 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar pose = frameData.pose;\n\t\t\tvar poseObject = poseTarget !== null ? poseTarget : camera; // We want to manipulate poseObject by its position and quaternion components since users may rely on them.\n\n\t\t\tposeObject.matrix.copy(standingMatrix);\n\t\t\tposeObject.matrix.decompose(poseObject.position, poseObject.quaternion, poseObject.scale);\n\n\t\t\tif (pose.orientation !== null) {\n\t\t\t\ttempQuaternion.fromArray(pose.orientation);\n\t\t\t\tposeObject.quaternion.multiply(tempQuaternion);\n\t\t\t}\n\n\t\t\tif (pose.position !== null) {\n\t\t\t\ttempQuaternion.setFromRotationMatrix(standingMatrix);\n\t\t\t\ttempPosition.fromArray(pose.position);\n\t\t\t\ttempPosition.applyQuaternion(tempQuaternion);\n\t\t\t\tposeObject.position.add(tempPosition);\n\t\t\t}\n\n\t\t\tposeObject.updateMatrixWorld();\n\t\t\tvar children = poseObject.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\tchildren[i].updateMatrixWorld(true);\n\t\t\t} //\n\n\n\t\t\tcameraL.near = camera.near;\n\t\t\tcameraR.near = camera.near;\n\t\t\tcameraL.far = camera.far;\n\t\t\tcameraR.far = camera.far;\n\t\t\tcameraL.matrixWorldInverse.fromArray(frameData.leftViewMatrix);\n\t\t\tcameraR.matrixWorldInverse.fromArray(frameData.rightViewMatrix); // TODO (mrdoob) Double check this code\n\n\t\t\tstandingMatrixInverse.getInverse(standingMatrix);\n\n\t\t\tif (referenceSpaceType === 'local-floor') {\n\t\t\t\tcameraL.matrixWorldInverse.multiply(standingMatrixInverse);\n\t\t\t\tcameraR.matrixWorldInverse.multiply(standingMatrixInverse);\n\t\t\t}\n\n\t\t\tvar parent = poseObject.parent;\n\n\t\t\tif (parent !== null) {\n\t\t\t\tmatrixWorldInverse.getInverse(parent.matrixWorld);\n\t\t\t\tcameraL.matrixWorldInverse.multiply(matrixWorldInverse);\n\t\t\t\tcameraR.matrixWorldInverse.multiply(matrixWorldInverse);\n\t\t\t} // envMap and Mirror needs camera.matrixWorld\n\n\n\t\t\tcameraL.matrixWorld.getInverse(cameraL.matrixWorldInverse);\n\t\t\tcameraR.matrixWorld.getInverse(cameraR.matrixWorldInverse);\n\t\t\tcameraL.projectionMatrix.fromArray(frameData.leftProjectionMatrix);\n\t\t\tcameraR.projectionMatrix.fromArray(frameData.rightProjectionMatrix);\n\t\t\tsetProjectionFromUnion(cameraVR, cameraL, cameraR); //\n\n\t\t\tvar layers = device.getLayers();\n\n\t\t\tif (layers.length) {\n\t\t\t\tvar layer = layers[0];\n\t\t\t\tupdateViewportFromBounds(cameraL.viewport, layer.leftBounds);\n\t\t\t\tupdateViewportFromBounds(cameraR.viewport, layer.rightBounds);\n\t\t\t}\n\n\t\t\tupdateControllers();\n\t\t\treturn cameraVR;\n\t\t};\n\n\t\tthis.getStandingMatrix = function () {\n\t\t\treturn standingMatrix;\n\t\t};\n\n\t\tthis.isPresenting = false; // Animation Loop\n\n\t\tvar animation = new WebGLAnimation();\n\n\t\tthis.setAnimationLoop = function (callback) {\n\t\t\tanimation.setAnimationLoop(callback);\n\t\t\tif (this.isPresenting) animation.start();\n\t\t};\n\n\t\tthis.submitFrame = function () {\n\t\t\tif (this.isPresenting) device.submitFrame();\n\t\t};\n\n\t\tthis.dispose = function () {\n\t\t\tif (typeof window !== 'undefined') {\n\t\t\t\twindow.removeEventListener('vrdisplaypresentchange', onVRDisplayPresentChange);\n\t\t\t}\n\t\t}; // DEPRECATED\n\n\n\t\tthis.setFrameOfReferenceType = function () {\n\t\t\tconsole.warn('THREE.WebVRManager: setFrameOfReferenceType() has been deprecated.');\n\t\t};\n\t}\n\n\tObject.assign(WebVRManager.prototype, EventDispatcher.prototype);\n\n\tfunction WebXRController() {\n\t\tthis._targetRay = null;\n\t\tthis._grip = null;\n\t\tthis._hand = null;\n\t}\n\n\tObject.assign(WebXRController.prototype, {\n\t\tconstructor: WebXRController,\n\t\tgetHandSpace: function getHandSpace() {\n\t\t\tif (this._hand === null) {\n\t\t\t\tthis._hand = new Group();\n\t\t\t\tthis._hand.matrixAutoUpdate = false;\n\t\t\t\tthis._hand.visible = false;\n\t\t\t\tthis._hand.joints = {};\n\t\t\t\tthis._hand.inputState = {\n\t\t\t\t\tpinching: false\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn this._hand;\n\t\t},\n\t\tgetTargetRaySpace: function getTargetRaySpace() {\n\t\t\tif (this._targetRay === null) {\n\t\t\t\tthis._targetRay = new Group();\n\t\t\t\tthis._targetRay.matrixAutoUpdate = false;\n\t\t\t\tthis._targetRay.visible = false;\n\t\t\t}\n\n\t\t\treturn this._targetRay;\n\t\t},\n\t\tgetGripSpace: function getGripSpace() {\n\t\t\tif (this._grip === null) {\n\t\t\t\tthis._grip = new Group();\n\t\t\t\tthis._grip.matrixAutoUpdate = false;\n\t\t\t\tthis._grip.visible = false;\n\t\t\t}\n\n\t\t\treturn this._grip;\n\t\t},\n\t\tdispatchEvent: function dispatchEvent(event) {\n\t\t\tif (this._targetRay !== null) {\n\t\t\t\tthis._targetRay.dispatchEvent(event);\n\t\t\t}\n\n\t\t\tif (this._grip !== null) {\n\t\t\t\tthis._grip.dispatchEvent(event);\n\t\t\t}\n\n\t\t\tif (this._hand !== null) {\n\t\t\t\tthis._hand.dispatchEvent(event);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tdisconnect: function disconnect(inputSource) {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'disconnected',\n\t\t\t\tdata: inputSource\n\t\t\t});\n\n\t\t\tif (this._targetRay !== null) {\n\t\t\t\tthis._targetRay.visible = false;\n\t\t\t}\n\n\t\t\tif (this._grip !== null) {\n\t\t\t\tthis._grip.visible = false;\n\t\t\t}\n\n\t\t\tif (this._hand !== null) {\n\t\t\t\tthis._hand.visible = false;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tupdate: function update(inputSource, frame, referenceSpace) {\n\t\t\tvar inputPose = null;\n\t\t\tvar gripPose = null;\n\t\t\tvar handPose = null;\n\t\t\tvar targetRay = this._targetRay;\n\t\t\tvar grip = this._grip;\n\t\t\tvar hand = this._hand;\n\n\t\t\tif (inputSource && frame.session.visibilityState !== 'visible-blurred') {\n\t\t\t\tif (hand && inputSource.hand) {\n\t\t\t\t\thandPose = true;\n\n\t\t\t\t\tfor (var _iterator = _createForOfIteratorHelperLoose(inputSource.hand.values()), _step; !(_step = _iterator()).done;) {\n\t\t\t\t\t\tvar inputjoint = _step.value;\n\t\t\t\t\t\t// Update the joints groups with the XRJoint poses\n\t\t\t\t\t\tvar jointPose = frame.getJointPose(inputjoint, referenceSpace);\n\n\t\t\t\t\t\tif (hand.joints[inputjoint.jointName] === undefined) {\n\t\t\t\t\t\t\t// The transform of this joint will be updated with the joint pose on each frame\n\t\t\t\t\t\t\tvar _joint = new Group();\n\n\t\t\t\t\t\t\t_joint.matrixAutoUpdate = false;\n\t\t\t\t\t\t\t_joint.visible = false;\n\t\t\t\t\t\t\thand.joints[inputjoint.jointName] = _joint; // ??\n\n\t\t\t\t\t\t\thand.add(_joint);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar joint = hand.joints[inputjoint.jointName];\n\n\t\t\t\t\t\tif (jointPose !== null) {\n\t\t\t\t\t\t\tjoint.matrix.fromArray(jointPose.transform.matrix);\n\t\t\t\t\t\t\tjoint.matrix.decompose(joint.position, joint.rotation, joint.scale);\n\t\t\t\t\t\t\tjoint.jointRadius = jointPose.radius;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tjoint.visible = jointPose !== null;\n\t\t\t\t\t} // Custom events\n\t\t\t\t\t// Check pinchz\n\n\n\t\t\t\t\tvar indexTip = hand.joints['index-finger-tip'];\n\t\t\t\t\tvar thumbTip = hand.joints['thumb-tip'];\n\t\t\t\t\tvar distance = indexTip.position.distanceTo(thumbTip.position);\n\t\t\t\t\tvar distanceToPinch = 0.02;\n\t\t\t\t\tvar threshold = 0.005;\n\n\t\t\t\t\tif (hand.inputState.pinching && distance > distanceToPinch + threshold) {\n\t\t\t\t\t\thand.inputState.pinching = false;\n\t\t\t\t\t\tthis.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'pinchend',\n\t\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\t\ttarget: this\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if (!hand.inputState.pinching && distance <= distanceToPinch - threshold) {\n\t\t\t\t\t\thand.inputState.pinching = true;\n\t\t\t\t\t\tthis.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'pinchstart',\n\t\t\t\t\t\t\thandedness: inputSource.handedness,\n\t\t\t\t\t\t\ttarget: this\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (targetRay !== null) {\n\t\t\t\t\t\tinputPose = frame.getPose(inputSource.targetRaySpace, referenceSpace);\n\n\t\t\t\t\t\tif (inputPose !== null) {\n\t\t\t\t\t\t\ttargetRay.matrix.fromArray(inputPose.transform.matrix);\n\t\t\t\t\t\t\ttargetRay.matrix.decompose(targetRay.position, targetRay.rotation, targetRay.scale);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (grip !== null && inputSource.gripSpace) {\n\t\t\t\t\t\tgripPose = frame.getPose(inputSource.gripSpace, referenceSpace);\n\n\t\t\t\t\t\tif (gripPose !== null) {\n\t\t\t\t\t\t\tgrip.matrix.fromArray(gripPose.transform.matrix);\n\t\t\t\t\t\t\tgrip.matrix.decompose(grip.position, grip.rotation, grip.scale);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (targetRay !== null) {\n\t\t\t\ttargetRay.visible = inputPose !== null;\n\t\t\t}\n\n\t\t\tif (grip !== null) {\n\t\t\t\tgrip.visible = gripPose !== null;\n\t\t\t}\n\n\t\t\tif (hand !== null) {\n\t\t\t\thand.visible = handPose !== null;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction WebXRManager(renderer, gl) {\n\t\tvar scope = this;\n\t\tvar session = null;\n\t\tvar framebufferScaleFactor = 1.0;\n\t\tvar referenceSpace = null;\n\t\tvar referenceSpaceType = 'local-floor';\n\t\tvar pose = null;\n\t\tvar poseTarget = null;\n\t\tvar controllers = [];\n\t\tvar inputSourcesMap = new Map();\n\t\tvar layers = [];\n\t\tvar baseLayer; //\n\n\t\tvar cameraL = new PerspectiveCamera();\n\t\tcameraL.layers.enable(1);\n\t\tcameraL.viewport = new Vector4();\n\t\tvar cameraR = new PerspectiveCamera();\n\t\tcameraR.layers.enable(2);\n\t\tcameraR.viewport = new Vector4();\n\t\tvar cameras = [cameraL, cameraR];\n\t\tvar cameraVR = new ArrayCamera();\n\t\tcameraVR.layers.enable(1);\n\t\tcameraVR.layers.enable(2);\n\t\tvar _currentDepthNear = null;\n\t\tvar _currentDepthFar = null; //\n\n\t\tthis.layersEnabled = false;\n\t\tthis.enabled = false;\n\t\tthis.isPresenting = false;\n\n\t\tthis.getCameraPose = function () {\n\t\t\treturn pose;\n\t\t};\n\n\t\tthis.getController = function (index) {\n\t\t\tvar controller = controllers[index];\n\n\t\t\tif (controller === undefined) {\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[index] = controller;\n\t\t\t}\n\n\t\t\treturn controller.getTargetRaySpace();\n\t\t};\n\n\t\tthis.getControllerGrip = function (index) {\n\t\t\tvar controller = controllers[index];\n\n\t\t\tif (controller === undefined) {\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[index] = controller;\n\t\t\t}\n\n\t\t\treturn controller.getGripSpace();\n\t\t};\n\n\t\tthis.getHand = function (index) {\n\t\t\tvar controller = controllers[index];\n\n\t\t\tif (controller === undefined) {\n\t\t\t\tcontroller = new WebXRController();\n\t\t\t\tcontrollers[index] = controller;\n\t\t\t}\n\n\t\t\treturn controller.getHandSpace();\n\t\t}; //\n\n\n\t\tfunction onSessionEvent(event) {\n\t\t\tvar controller = inputSourcesMap.get(event.inputSource);\n\n\t\t\tif (controller) {\n\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\ttype: event.type,\n\t\t\t\t\tdata: event.inputSource\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfunction onSessionEnd() {\n\t\t\tinputSourcesMap.forEach(function (controller, inputSource) {\n\t\t\t\tcontroller.disconnect(inputSource);\n\t\t\t});\n\t\t\tinputSourcesMap.clear();\n\t\t\t_currentDepthNear = null;\n\t\t\t_currentDepthFar = null; //\n\n\t\t\trenderer.setFramebuffer(null);\n\t\t\trenderer.setRenderTarget(renderer.getRenderTarget()); // Hack #15830\n\n\t\t\tanimation.stop();\n\t\t\tscope.isPresenting = false;\n\t\t\tscope.dispatchEvent({\n\t\t\t\ttype: 'sessionend'\n\t\t\t});\n\t\t}\n\n\t\tthis.setFramebufferScaleFactor = function (value) {\n\t\t\tframebufferScaleFactor = value;\n\n\t\t\tif (scope.isPresenting === true) {\n\t\t\t\tconsole.warn('THREE.WebXRManager: Cannot change framebuffer scale while presenting.');\n\t\t\t}\n\t\t};\n\n\t\tthis.setReferenceSpaceType = function (value) {\n\t\t\treferenceSpaceType = value;\n\n\t\t\tif (scope.isPresenting === true) {\n\t\t\t\tconsole.warn('THREE.WebXRManager: Cannot change reference space type while presenting.');\n\t\t\t}\n\t\t};\n\n\t\tthis.getReferenceSpace = function () {\n\t\t\treturn referenceSpace;\n\t\t};\n\n\t\tthis.getSession = function () {\n\t\t\treturn session;\n\t\t};\n\n\t\tthis.setSession = /*#__PURE__*/function () {\n\t\t\tvar _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(value) {\n\t\t\t\tvar attributes, layerInit;\n\t\t\t\treturn regeneratorRuntime.wrap(function _callee$(_context) {\n\t\t\t\t\twhile (1) {\n\t\t\t\t\t\tswitch (_context.prev = _context.next) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tsession = value;\n\n\t\t\t\t\t\t\t\tif (!(session !== null)) {\n\t\t\t\t\t\t\t\t\t_context.next = 24;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsession.addEventListener('select', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('selectstart', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('selectend', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('squeeze', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('squeezestart', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('squeezeend', onSessionEvent);\n\t\t\t\t\t\t\t\tsession.addEventListener('end', onSessionEnd);\n\t\t\t\t\t\t\t\tsession.addEventListener('inputsourceschange', onInputSourcesChange);\n\t\t\t\t\t\t\t\tattributes = gl.getContextAttributes();\n\n\t\t\t\t\t\t\t\tif (!(attributes.xrCompatible !== true)) {\n\t\t\t\t\t\t\t\t\t_context.next = 14;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t_context.next = 14;\n\t\t\t\t\t\t\t\treturn gl.makeXRCompatible();\n\n\t\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\t\tlayerInit = {\n\t\t\t\t\t\t\t\t\tantialias: attributes.antialias,\n\t\t\t\t\t\t\t\t\talpha: attributes.alpha,\n\t\t\t\t\t\t\t\t\tdepth: attributes.depth,\n\t\t\t\t\t\t\t\t\tstencil: attributes.stencil,\n\t\t\t\t\t\t\t\t\tframebufferScaleFactor: framebufferScaleFactor\n\t\t\t\t\t\t\t\t}; // eslint-disable-next-line no-undef\n\n\t\t\t\t\t\t\t\tbaseLayer = new XRWebGLLayer(session, gl, layerInit);\n\n\t\t\t\t\t\t\t\tif (window.XRWebGLBinding && this.layersEnabled) {\n\t\t\t\t\t\t\t\t\tthis.addLayer(baseLayer);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsession.updateRenderState({\n\t\t\t\t\t\t\t\t\t\tbaseLayer: baseLayer\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t_context.next = 19;\n\t\t\t\t\t\t\t\treturn session.requestReferenceSpace(referenceSpaceType);\n\n\t\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\t\treferenceSpace = _context.sent;\n\t\t\t\t\t\t\t\tanimation.setContext(session);\n\t\t\t\t\t\t\t\tanimation.start();\n\t\t\t\t\t\t\t\tscope.isPresenting = true;\n\t\t\t\t\t\t\t\tscope.dispatchEvent({\n\t\t\t\t\t\t\t\t\ttype: 'sessionstart'\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\tcase \"end\":\n\t\t\t\t\t\t\t\treturn _context.stop();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, _callee, this);\n\t\t\t}));\n\n\t\t\treturn function (_x) {\n\t\t\t\treturn _ref.apply(this, arguments);\n\t\t\t};\n\t\t}();\n\n\t\tthis.addLayer = function (layer) {\n\t\t\tif (!window.XRWebGLBinding || !this.layersEnabled || !session) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlayers.push(layer);\n\t\t\tsession.updateRenderState({\n\t\t\t\tlayers: layers\n\t\t\t});\n\t\t};\n\n\t\tthis.removeLayer = function (layer) {\n\t\t\tif (!window.XRWebGLBinding || !this.layersEnabled || !session) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlayers.splice(layers.indexOf(layer), 1);\n\t\t\tsession.updateRenderState({\n\t\t\t\tlayers: layers\n\t\t\t});\n\t\t};\n\n\t\tfunction onInputSourcesChange(event) {\n\t\t\tvar inputSources = session.inputSources; // Assign inputSources to available controllers\n\n\t\t\tfor (var i = 0; i < controllers.length; i++) {\n\t\t\t\tinputSourcesMap.set(inputSources[i], controllers[i]);\n\t\t\t} // Notify disconnected\n\n\n\t\t\tfor (var _i = 0; _i < event.removed.length; _i++) {\n\t\t\t\tvar inputSource = event.removed[_i];\n\t\t\t\tvar controller = inputSourcesMap.get(inputSource);\n\n\t\t\t\tif (controller) {\n\t\t\t\t\tcontroller.dispatchEvent({\n\t\t\t\t\t\ttype: 'disconnected',\n\t\t\t\t\t\tdata: inputSource\n\t\t\t\t\t});\n\t\t\t\t\tinputSourcesMap.delete(inputSource);\n\t\t\t\t}\n\t\t\t} // Notify connected\n\n\n\t\t\tfor (var _i2 = 0; _i2 < event.added.length; _i2++) {\n\t\t\t\tvar _inputSource = event.added[_i2];\n\n\t\t\t\tvar _controller = inputSourcesMap.get(_inputSource);\n\n\t\t\t\tif (_controller) {\n\t\t\t\t\t_controller.dispatchEvent({\n\t\t\t\t\t\ttype: 'connected',\n\t\t\t\t\t\tdata: _inputSource\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t} //\n\n\n\t\tvar cameraLPos = new Vector3();\n\t\tvar cameraRPos = new Vector3();\n\t\t/**\n\t\t * Assumes 2 cameras that are parallel and share an X-axis, and that\n\t\t * the cameras' projection and world matrices have already been set.\n\t\t * And that near and far planes are identical for both cameras.\n\t\t * Visualization of this technique: https://computergraphics.stackexchange.com/a/4765\n\t\t */\n\n\t\tfunction setProjectionFromUnion(camera, cameraL, cameraR) {\n\t\t\tcameraLPos.setFromMatrixPosition(cameraL.matrixWorld);\n\t\t\tcameraRPos.setFromMatrixPosition(cameraR.matrixWorld);\n\t\t\tvar ipd = cameraLPos.distanceTo(cameraRPos);\n\t\t\tvar projL = cameraL.projectionMatrix.elements;\n\t\t\tvar projR = cameraR.projectionMatrix.elements; // VR systems will have identical far and near planes, and\n\t\t\t// most likely identical top and bottom frustum extents.\n\t\t\t// Use the left camera for these values.\n\n\t\t\tvar near = projL[14] / (projL[10] - 1);\n\t\t\tvar far = projL[14] / (projL[10] + 1);\n\t\t\tvar topFov = (projL[9] + 1) / projL[5];\n\t\t\tvar bottomFov = (projL[9] - 1) / projL[5];\n\t\t\tvar leftFov = (projL[8] - 1) / projL[0];\n\t\t\tvar rightFov = (projR[8] + 1) / projR[0];\n\t\t\tvar left = near * leftFov;\n\t\t\tvar right = near * rightFov; // Calculate the new camera's position offset from the\n\t\t\t// left camera. xOffset should be roughly half `ipd`.\n\n\t\t\tvar zOffset = ipd / (-leftFov + rightFov);\n\t\t\tvar xOffset = zOffset * -leftFov; // TODO: Better way to apply this offset?\n\n\t\t\tcameraL.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale);\n\t\t\tcamera.translateX(xOffset);\n\t\t\tcamera.translateZ(zOffset);\n\t\t\tcamera.matrixWorld.compose(camera.position, camera.quaternion, camera.scale);\n\t\t\tcamera.matrixWorldInverse.copy(camera.matrixWorld).invert(); // Find the union of the frustum values of the cameras and scale\n\t\t\t// the values so that the near plane's position does not change in world space,\n\t\t\t// although must now be relative to the new union camera.\n\n\t\t\tvar near2 = near + zOffset;\n\t\t\tvar far2 = far + zOffset;\n\t\t\tvar left2 = left - xOffset;\n\t\t\tvar right2 = right + (ipd - xOffset);\n\t\t\tvar top2 = topFov * far / far2 * near2;\n\t\t\tvar bottom2 = bottomFov * far / far2 * near2;\n\t\t\tcamera.projectionMatrix.makePerspective(left2, right2, top2, bottom2, near2, far2);\n\t\t}\n\n\t\tfunction updateCamera(camera, parent) {\n\t\t\tif (parent === null) {\n\t\t\t\tcamera.matrixWorld.copy(camera.matrix);\n\t\t\t} else {\n\t\t\t\tcamera.matrixWorld.multiplyMatrices(parent.matrixWorld, camera.matrix);\n\t\t\t}\n\n\t\t\tcamera.matrixWorldInverse.copy(camera.matrixWorld).invert();\n\t\t}\n\n\t\tthis.setPoseTarget = function (object) {\n\t\t\tif (object !== undefined) poseTarget = object;\n\t\t};\n\n\t\tthis.getCamera = function (camera) {\n\t\t\tcameraVR.near = cameraR.near = cameraL.near = camera.near;\n\t\t\tcameraVR.far = cameraR.far = cameraL.far = camera.far;\n\n\t\t\tif (_currentDepthNear !== cameraVR.near || _currentDepthFar !== cameraVR.far) {\n\t\t\t\t// Note that the new renderState won't apply until the next frame. See #18320\n\t\t\t\tsession.updateRenderState({\n\t\t\t\t\tdepthNear: cameraVR.near,\n\t\t\t\t\tdepthFar: cameraVR.far\n\t\t\t\t});\n\t\t\t\t_currentDepthNear = cameraVR.near;\n\t\t\t\t_currentDepthFar = cameraVR.far;\n\t\t\t}\n\n\t\t\tvar parent = camera.parent;\n\t\t\tvar cameras = cameraVR.cameras;\n\t\t\tvar object = poseTarget || camera;\n\t\t\tupdateCamera(cameraVR, parent);\n\n\t\t\tfor (var i = 0; i < cameras.length; i++) {\n\t\t\t\tupdateCamera(cameras[i], parent);\n\t\t\t} // update camera and its children\n\n\n\t\t\tobject.matrixWorld.copy(cameraVR.matrixWorld);\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var _i3 = 0, l = children.length; _i3 < l; _i3++) {\n\t\t\t\tchildren[_i3].updateMatrixWorld(true);\n\t\t\t} // update projection matrix for proper view frustum culling\n\n\n\t\t\tif (cameras.length === 2) {\n\t\t\t\tsetProjectionFromUnion(cameraVR, cameraL, cameraR);\n\t\t\t} else {\n\t\t\t\t// assume single camera setup (AR)\n\t\t\t\tcameraVR.projectionMatrix.copy(cameraL.projectionMatrix);\n\t\t\t}\n\n\t\t\treturn cameraVR;\n\t\t}; // Animation Loop\n\n\n\t\tvar onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame(time, frame) {\n\t\t\tpose = frame.getViewerPose(referenceSpace);\n\n\t\t\tif (pose !== null) {\n\t\t\t\tvar views = pose.views;\n\t\t\t\trenderer.setFramebuffer(baseLayer.framebuffer);\n\t\t\t\tvar cameraVRNeedsUpdate = false; // check if it's necessary to rebuild cameraVR's camera list\n\n\t\t\t\tif (views.length !== cameraVR.cameras.length) {\n\t\t\t\t\tcameraVR.cameras.length = 0;\n\t\t\t\t\tcameraVRNeedsUpdate = true;\n\t\t\t\t}\n\n\t\t\t\tfor (var i = 0; i < views.length; i++) {\n\t\t\t\t\tvar view = views[i];\n\t\t\t\t\tvar viewport = baseLayer.getViewport(view);\n\t\t\t\t\tvar camera = cameras[i];\n\t\t\t\t\tcamera.matrix.fromArray(view.transform.matrix);\n\t\t\t\t\tcamera.projectionMatrix.fromArray(view.projectionMatrix);\n\t\t\t\t\tcamera.viewport.set(viewport.x, viewport.y, viewport.width, viewport.height);\n\n\t\t\t\t\tif (i === 0) {\n\t\t\t\t\t\tcameraVR.matrix.copy(camera.matrix);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cameraVRNeedsUpdate === true) {\n\t\t\t\t\t\tcameraVR.cameras.push(camera);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} //\n\n\n\t\t\tvar inputSources = session.inputSources;\n\n\t\t\tfor (var _i4 = 0; _i4 < controllers.length; _i4++) {\n\t\t\t\tvar controller = controllers[_i4];\n\t\t\t\tvar inputSource = inputSources[_i4];\n\t\t\t\tcontroller.update(inputSource, frame, referenceSpace);\n\t\t\t}\n\n\t\t\tif (onAnimationFrameCallback) onAnimationFrameCallback(time, frame);\n\t\t}\n\n\t\tvar animation = new WebGLAnimation();\n\t\tanimation.setAnimationLoop(onAnimationFrame);\n\n\t\tthis.setAnimationLoop = function (callback) {\n\t\t\tonAnimationFrameCallback = callback;\n\t\t};\n\n\t\tthis.dispose = function () {};\n\t}\n\n\tObject.assign(WebXRManager.prototype, EventDispatcher.prototype);\n\n\tfunction WebGLMaterials(properties) {\n\t\tfunction refreshFogUniforms(uniforms, fog) {\n\t\t\tuniforms.fogColor.value.copy(fog.color);\n\n\t\t\tif (fog.isFog) {\n\t\t\t\tuniforms.fogNear.value = fog.near;\n\t\t\t\tuniforms.fogFar.value = fog.far;\n\t\t\t} else if (fog.isFogExp2) {\n\t\t\t\tuniforms.fogDensity.value = fog.density;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshMaterialUniforms(uniforms, material, pixelRatio, height) {\n\t\t\tif (material.isMeshBasicMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t} else if (material.isMeshLambertMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsLambert(uniforms, material);\n\t\t\t} else if (material.isMeshToonMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsToon(uniforms, material);\n\t\t\t} else if (material.isMeshPhongMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsPhong(uniforms, material);\n\t\t\t} else if (material.isMeshStandardMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\n\t\t\t\tif (material.isMeshPhysicalMaterial) {\n\t\t\t\t\trefreshUniformsPhysical(uniforms, material);\n\t\t\t\t} else {\n\t\t\t\t\trefreshUniformsStandard(uniforms, material);\n\t\t\t\t}\n\t\t\t} else if (material.isMeshMatcapMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsMatcap(uniforms, material);\n\t\t\t} else if (material.isMeshDepthMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsDepth(uniforms, material);\n\t\t\t} else if (material.isMeshDistanceMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsDistance(uniforms, material);\n\t\t\t} else if (material.isMeshNormalMaterial) {\n\t\t\t\trefreshUniformsCommon(uniforms, material);\n\t\t\t\trefreshUniformsNormal(uniforms, material);\n\t\t\t} else if (material.isLineBasicMaterial) {\n\t\t\t\trefreshUniformsLine(uniforms, material);\n\n\t\t\t\tif (material.isLineDashedMaterial) {\n\t\t\t\t\trefreshUniformsDash(uniforms, material);\n\t\t\t\t}\n\t\t\t} else if (material.isPointsMaterial) {\n\t\t\t\trefreshUniformsPoints(uniforms, material, pixelRatio, height);\n\t\t\t} else if (material.isSpriteMaterial) {\n\t\t\t\trefreshUniformsSprites(uniforms, material);\n\t\t\t} else if (material.isShadowMaterial) {\n\t\t\t\tuniforms.color.value.copy(material.color);\n\t\t\t\tuniforms.opacity.value = material.opacity;\n\t\t\t} else if (material.isShaderMaterial) {\n\t\t\t\tmaterial.uniformsNeedUpdate = false; // #15581\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsCommon(uniforms, material) {\n\t\t\tuniforms.opacity.value = material.opacity;\n\n\t\t\tif (material.color) {\n\t\t\t\tuniforms.diffuse.value.copy(material.color);\n\t\t\t}\n\n\t\t\tif (material.emissive) {\n\t\t\t\tuniforms.emissive.value.copy(material.emissive).multiplyScalar(material.emissiveIntensity);\n\t\t\t}\n\n\t\t\tif (material.map) {\n\t\t\t\tuniforms.map.value = material.map;\n\t\t\t}\n\n\t\t\tif (material.alphaMap) {\n\t\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\t\t\t}\n\n\t\t\tif (material.specularMap) {\n\t\t\t\tuniforms.specularMap.value = material.specularMap;\n\t\t\t}\n\n\t\t\tvar envMap = properties.get(material).envMap;\n\n\t\t\tif (envMap) {\n\t\t\t\tuniforms.envMap.value = envMap;\n\t\t\t\tuniforms.flipEnvMap.value = envMap.isCubeTexture && envMap._needsFlipEnvMap ? -1 : 1;\n\t\t\t\tuniforms.reflectivity.value = material.reflectivity;\n\t\t\t\tuniforms.refractionRatio.value = material.refractionRatio;\n\n\t\t\t\tvar maxMipLevel = properties.get(envMap).__maxMipLevel;\n\n\t\t\t\tif (maxMipLevel !== undefined) {\n\t\t\t\t\tuniforms.maxMipLevel.value = maxMipLevel;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (material.lightMap) {\n\t\t\t\tuniforms.lightMap.value = material.lightMap;\n\t\t\t\tuniforms.lightMapIntensity.value = material.lightMapIntensity;\n\t\t\t}\n\n\t\t\tif (material.aoMap) {\n\t\t\t\tuniforms.aoMap.value = material.aoMap;\n\t\t\t\tuniforms.aoMapIntensity.value = material.aoMapIntensity;\n\t\t\t} // uv repeat and offset setting priorities\n\t\t\t// 1. color map\n\t\t\t// 2. specular map\n\t\t\t// 3. displacementMap map\n\t\t\t// 4. normal map\n\t\t\t// 5. bump map\n\t\t\t// 6. roughnessMap map\n\t\t\t// 7. metalnessMap map\n\t\t\t// 8. alphaMap map\n\t\t\t// 9. emissiveMap map\n\t\t\t// 10. clearcoat map\n\t\t\t// 11. clearcoat normal map\n\t\t\t// 12. clearcoat roughnessMap map\n\n\n\t\t\tvar uvScaleMap;\n\n\t\t\tif (material.map) {\n\t\t\t\tuvScaleMap = material.map;\n\t\t\t} else if (material.specularMap) {\n\t\t\t\tuvScaleMap = material.specularMap;\n\t\t\t} else if (material.displacementMap) {\n\t\t\t\tuvScaleMap = material.displacementMap;\n\t\t\t} else if (material.normalMap) {\n\t\t\t\tuvScaleMap = material.normalMap;\n\t\t\t} else if (material.bumpMap) {\n\t\t\t\tuvScaleMap = material.bumpMap;\n\t\t\t} else if (material.roughnessMap) {\n\t\t\t\tuvScaleMap = material.roughnessMap;\n\t\t\t} else if (material.metalnessMap) {\n\t\t\t\tuvScaleMap = material.metalnessMap;\n\t\t\t} else if (material.alphaMap) {\n\t\t\t\tuvScaleMap = material.alphaMap;\n\t\t\t} else if (material.emissiveMap) {\n\t\t\t\tuvScaleMap = material.emissiveMap;\n\t\t\t} else if (material.clearcoatMap) {\n\t\t\t\tuvScaleMap = material.clearcoatMap;\n\t\t\t} else if (material.clearcoatNormalMap) {\n\t\t\t\tuvScaleMap = material.clearcoatNormalMap;\n\t\t\t} else if (material.clearcoatRoughnessMap) {\n\t\t\t\tuvScaleMap = material.clearcoatRoughnessMap;\n\t\t\t}\n\n\t\t\tif (uvScaleMap !== undefined) {\n\t\t\t\t// backwards compatibility\n\t\t\t\tif (uvScaleMap.isWebGLRenderTarget) {\n\t\t\t\t\tuvScaleMap = uvScaleMap.texture;\n\t\t\t\t}\n\n\t\t\t\tif (uvScaleMap.matrixAutoUpdate === true) {\n\t\t\t\t\tuvScaleMap.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tuniforms.uvTransform.value.copy(uvScaleMap.matrix);\n\t\t\t} // uv repeat and offset setting priorities for uv2\n\t\t\t// 1. ao map\n\t\t\t// 2. light map\n\n\n\t\t\tvar uv2ScaleMap;\n\n\t\t\tif (material.aoMap) {\n\t\t\t\tuv2ScaleMap = material.aoMap;\n\t\t\t} else if (material.lightMap) {\n\t\t\t\tuv2ScaleMap = material.lightMap;\n\t\t\t}\n\n\t\t\tif (uv2ScaleMap !== undefined) {\n\t\t\t\t// backwards compatibility\n\t\t\t\tif (uv2ScaleMap.isWebGLRenderTarget) {\n\t\t\t\t\tuv2ScaleMap = uv2ScaleMap.texture;\n\t\t\t\t}\n\n\t\t\t\tif (uv2ScaleMap.matrixAutoUpdate === true) {\n\t\t\t\t\tuv2ScaleMap.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tuniforms.uv2Transform.value.copy(uv2ScaleMap.matrix);\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsLine(uniforms, material) {\n\t\t\tuniforms.diffuse.value.copy(material.color);\n\t\t\tuniforms.opacity.value = material.opacity;\n\t\t}\n\n\t\tfunction refreshUniformsDash(uniforms, material) {\n\t\t\tuniforms.dashSize.value = material.dashSize;\n\t\t\tuniforms.totalSize.value = material.dashSize + material.gapSize;\n\t\t\tuniforms.scale.value = material.scale;\n\t\t}\n\n\t\tfunction refreshUniformsPoints(uniforms, material, pixelRatio, height) {\n\t\t\tuniforms.diffuse.value.copy(material.color);\n\t\t\tuniforms.opacity.value = material.opacity;\n\t\t\tuniforms.size.value = material.size * pixelRatio;\n\t\t\tuniforms.scale.value = height * 0.5;\n\n\t\t\tif (material.map) {\n\t\t\t\tuniforms.map.value = material.map;\n\t\t\t}\n\n\t\t\tif (material.alphaMap) {\n\t\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\t\t\t} // uv repeat and offset setting priorities\n\t\t\t// 1. color map\n\t\t\t// 2. alpha map\n\n\n\t\t\tvar uvScaleMap;\n\n\t\t\tif (material.map) {\n\t\t\t\tuvScaleMap = material.map;\n\t\t\t} else if (material.alphaMap) {\n\t\t\t\tuvScaleMap = material.alphaMap;\n\t\t\t}\n\n\t\t\tif (uvScaleMap !== undefined) {\n\t\t\t\tif (uvScaleMap.matrixAutoUpdate === true) {\n\t\t\t\t\tuvScaleMap.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tuniforms.uvTransform.value.copy(uvScaleMap.matrix);\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsSprites(uniforms, material) {\n\t\t\tuniforms.diffuse.value.copy(material.color);\n\t\t\tuniforms.opacity.value = material.opacity;\n\t\t\tuniforms.rotation.value = material.rotation;\n\n\t\t\tif (material.map) {\n\t\t\t\tuniforms.map.value = material.map;\n\t\t\t}\n\n\t\t\tif (material.alphaMap) {\n\t\t\t\tuniforms.alphaMap.value = material.alphaMap;\n\t\t\t} // uv repeat and offset setting priorities\n\t\t\t// 1. color map\n\t\t\t// 2. alpha map\n\n\n\t\t\tvar uvScaleMap;\n\n\t\t\tif (material.map) {\n\t\t\t\tuvScaleMap = material.map;\n\t\t\t} else if (material.alphaMap) {\n\t\t\t\tuvScaleMap = material.alphaMap;\n\t\t\t}\n\n\t\t\tif (uvScaleMap !== undefined) {\n\t\t\t\tif (uvScaleMap.matrixAutoUpdate === true) {\n\t\t\t\t\tuvScaleMap.updateMatrix();\n\t\t\t\t}\n\n\t\t\t\tuniforms.uvTransform.value.copy(uvScaleMap.matrix);\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsLambert(uniforms, material) {\n\t\t\tif (material.emissiveMap) {\n\t\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsPhong(uniforms, material) {\n\t\t\tuniforms.specular.value.copy(material.specular);\n\t\t\tuniforms.shininess.value = Math.max(material.shininess, 1e-4); // to prevent pow( 0.0, 0.0 )\n\n\t\t\tif (material.emissiveMap) {\n\t\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\t\t\t}\n\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsToon(uniforms, material) {\n\t\t\tif (material.gradientMap) {\n\t\t\t\tuniforms.gradientMap.value = material.gradientMap;\n\t\t\t}\n\n\t\t\tif (material.emissiveMap) {\n\t\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\t\t\t}\n\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsStandard(uniforms, material) {\n\t\t\tuniforms.roughness.value = material.roughness;\n\t\t\tuniforms.metalness.value = material.metalness;\n\n\t\t\tif (material.roughnessMap) {\n\t\t\t\tuniforms.roughnessMap.value = material.roughnessMap;\n\t\t\t}\n\n\t\t\tif (material.metalnessMap) {\n\t\t\t\tuniforms.metalnessMap.value = material.metalnessMap;\n\t\t\t}\n\n\t\t\tif (material.emissiveMap) {\n\t\t\t\tuniforms.emissiveMap.value = material.emissiveMap;\n\t\t\t}\n\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\n\t\t\tvar envMap = properties.get(material).envMap;\n\n\t\t\tif (envMap) {\n\t\t\t\t//uniforms.envMap.value = material.envMap; // part of uniforms common\n\t\t\t\tuniforms.envMapIntensity.value = material.envMapIntensity;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsPhysical(uniforms, material) {\n\t\t\trefreshUniformsStandard(uniforms, material);\n\t\t\tuniforms.reflectivity.value = material.reflectivity; // also part of uniforms common\n\n\t\t\tuniforms.clearcoat.value = material.clearcoat;\n\t\t\tuniforms.clearcoatRoughness.value = material.clearcoatRoughness;\n\t\t\tif (material.sheen) uniforms.sheen.value.copy(material.sheen);\n\n\t\t\tif (material.clearcoatMap) {\n\t\t\t\tuniforms.clearcoatMap.value = material.clearcoatMap;\n\t\t\t}\n\n\t\t\tif (material.clearcoatRoughnessMap) {\n\t\t\t\tuniforms.clearcoatRoughnessMap.value = material.clearcoatRoughnessMap;\n\t\t\t}\n\n\t\t\tif (material.clearcoatNormalMap) {\n\t\t\t\tuniforms.clearcoatNormalScale.value.copy(material.clearcoatNormalScale);\n\t\t\t\tuniforms.clearcoatNormalMap.value = material.clearcoatNormalMap;\n\n\t\t\t\tif (material.side === BackSide) {\n\t\t\t\t\tuniforms.clearcoatNormalScale.value.negate();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tuniforms.transmission.value = material.transmission;\n\n\t\t\tif (material.transmissionMap) {\n\t\t\t\tuniforms.transmissionMap.value = material.transmissionMap;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsMatcap(uniforms, material) {\n\t\t\tif (material.matcap) {\n\t\t\t\tuniforms.matcap.value = material.matcap;\n\t\t\t}\n\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsDepth(uniforms, material) {\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\tfunction refreshUniformsDistance(uniforms, material) {\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\n\t\t\tuniforms.referencePosition.value.copy(material.referencePosition);\n\t\t\tuniforms.nearDistance.value = material.nearDistance;\n\t\t\tuniforms.farDistance.value = material.farDistance;\n\t\t}\n\n\t\tfunction refreshUniformsNormal(uniforms, material) {\n\t\t\tif (material.bumpMap) {\n\t\t\t\tuniforms.bumpMap.value = material.bumpMap;\n\t\t\t\tuniforms.bumpScale.value = material.bumpScale;\n\t\t\t\tif (material.side === BackSide) uniforms.bumpScale.value *= -1;\n\t\t\t}\n\n\t\t\tif (material.normalMap) {\n\t\t\t\tuniforms.normalMap.value = material.normalMap;\n\t\t\t\tuniforms.normalScale.value.copy(material.normalScale);\n\t\t\t\tif (material.side === BackSide) uniforms.normalScale.value.negate();\n\t\t\t}\n\n\t\t\tif (material.displacementMap) {\n\t\t\t\tuniforms.displacementMap.value = material.displacementMap;\n\t\t\t\tuniforms.displacementScale.value = material.displacementScale;\n\t\t\t\tuniforms.displacementBias.value = material.displacementBias;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trefreshFogUniforms: refreshFogUniforms,\n\t\t\trefreshMaterialUniforms: refreshMaterialUniforms\n\t\t};\n\t}\n\n\tfunction createCanvasElement() {\n\t\tvar canvas = document.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');\n\t\tcanvas.style.display = 'block';\n\t\treturn canvas;\n\t}\n\n\tfunction WebGLRenderer(parameters) {\n\t\tparameters = parameters || {};\n\n\t\tvar _canvas = parameters.canvas !== undefined ? parameters.canvas : createCanvasElement(),\n\t\t\t\t_context = parameters.context !== undefined ? parameters.context : null,\n\t\t\t\t_alpha = parameters.alpha !== undefined ? parameters.alpha : false,\n\t\t\t\t_depth = parameters.depth !== undefined ? parameters.depth : true,\n\t\t\t\t_stencil = parameters.stencil !== undefined ? parameters.stencil : true,\n\t\t\t\t_antialias = parameters.antialias !== undefined ? parameters.antialias : false,\n\t\t\t\t_premultipliedAlpha = parameters.premultipliedAlpha !== undefined ? parameters.premultipliedAlpha : true,\n\t\t\t\t_preserveDrawingBuffer = parameters.preserveDrawingBuffer !== undefined ? parameters.preserveDrawingBuffer : false,\n\t\t\t\t_powerPreference = parameters.powerPreference !== undefined ? parameters.powerPreference : 'default',\n\t\t\t\t_failIfMajorPerformanceCaveat = parameters.failIfMajorPerformanceCaveat !== undefined ? parameters.failIfMajorPerformanceCaveat : false;\n\n\t\tvar currentRenderList = null;\n\t\tvar currentRenderState = null; // render() can be called from within a callback triggered by another render.\n\t\t// We track this so that the nested render call gets its state isolated from the parent render call.\n\n\t\tvar renderStateStack = []; // public properties\n\n\t\tthis.domElement = _canvas; // Debug configuration container\n\n\t\tthis.debug = {\n\t\t\t/**\n\t\t\t * Enables error checking and reporting when shader programs are being compiled\n\t\t\t * @type {boolean}\n\t\t\t */\n\t\t\tcheckShaderErrors: true\n\t\t}; // clearing\n\n\t\tthis.autoClear = true;\n\t\tthis.autoClearColor = true;\n\t\tthis.autoClearDepth = true;\n\t\tthis.autoClearStencil = true; // scene graph\n\n\t\tthis.sortObjects = true; // user-defined clipping\n\n\t\tthis.clippingPlanes = [];\n\t\tthis.localClippingEnabled = false; // physically based shading\n\n\t\tthis.gammaFactor = 2.0; // for backwards compatibility\n\n\t\tthis.outputEncoding = LinearEncoding; // physical lights\n\n\t\tthis.physicallyCorrectLights = false; // tone mapping\n\n\t\tthis.toneMapping = NoToneMapping;\n\t\tthis.toneMappingExposure = 1.0; // morphs\n\n\t\tthis.maxMorphTargets = 8;\n\t\tthis.maxMorphNormals = 4; // internal properties\n\n\t\tvar _this = this;\n\n\t\tvar _isContextLost = false; // internal state cache\n\n\t\tvar _framebuffer = null;\n\t\tvar _currentActiveCubeFace = 0;\n\t\tvar _currentActiveMipmapLevel = 0;\n\t\tvar _currentRenderTarget = null;\n\t\tvar _currentFramebuffer = null;\n\n\t\tvar _currentMaterialId = -1;\n\n\t\tvar _currentCamera = null;\n\n\t\tvar _currentViewport = new Vector4();\n\n\t\tvar _currentScissor = new Vector4();\n\n\t\tvar _currentScissorTest = null; //\n\n\t\tvar _width = _canvas.width;\n\t\tvar _height = _canvas.height;\n\t\tvar _pixelRatio = 1;\n\t\tvar _opaqueSort = null;\n\t\tvar _transparentSort = null;\n\n\t\tvar _viewport = new Vector4(0, 0, _width, _height);\n\n\t\tvar _scissor = new Vector4(0, 0, _width, _height);\n\n\t\tvar _scissorTest = false; // frustum\n\n\t\tvar _frustum = new Frustum(); // clipping\n\n\n\t\tvar _clippingEnabled = false;\n\t\tvar _localClippingEnabled = false; // camera matrices cache\n\n\t\tvar _projScreenMatrix = new Matrix4();\n\n\t\tvar _vector3 = new Vector3();\n\n\t\tvar _emptyScene = {\n\t\t\tbackground: null,\n\t\t\tfog: null,\n\t\t\tenvironment: null,\n\t\t\toverrideMaterial: null,\n\t\t\tisScene: true\n\t\t};\n\n\t\tfunction getTargetPixelRatio() {\n\t\t\treturn _currentRenderTarget === null ? _pixelRatio : 1;\n\t\t} // initialize\n\n\n\t\tvar _gl = _context;\n\n\t\tfunction getContext(contextNames, contextAttributes) {\n\t\t\tfor (var i = 0; i < contextNames.length; i++) {\n\t\t\t\tvar contextName = contextNames[i];\n\n\t\t\t\tvar context = _canvas.getContext(contextName, contextAttributes);\n\n\t\t\t\tif (context !== null) return context;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\tvar contextAttributes = {\n\t\t\t\talpha: _alpha,\n\t\t\t\tdepth: _depth,\n\t\t\t\tstencil: _stencil,\n\t\t\t\tantialias: _antialias,\n\t\t\t\tpremultipliedAlpha: _premultipliedAlpha,\n\t\t\t\tpreserveDrawingBuffer: _preserveDrawingBuffer,\n\t\t\t\tpowerPreference: _powerPreference,\n\t\t\t\tfailIfMajorPerformanceCaveat: _failIfMajorPerformanceCaveat\n\t\t\t}; // event listeners must be registered before WebGL context is created, see #12753\n\n\t\t\t_canvas.addEventListener('webglcontextlost', onContextLost, false);\n\n\t\t\t_canvas.addEventListener('webglcontextrestored', onContextRestore, false);\n\n\t\t\tif (_gl === null) {\n\t\t\t\tvar contextNames = ['webgl2', 'webgl', 'experimental-webgl'];\n\n\t\t\t\tif (_this.isWebGL1Renderer === true) {\n\t\t\t\t\tcontextNames.shift();\n\t\t\t\t}\n\n\t\t\t\t_gl = getContext(contextNames, contextAttributes);\n\n\t\t\t\tif (_gl === null) {\n\t\t\t\t\tif (getContext(contextNames)) {\n\t\t\t\t\t\tthrow new Error('Error creating WebGL context with your selected attributes.');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error('Error creating WebGL context.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // Some experimental-webgl implementations do not have getShaderPrecisionFormat\n\n\n\t\t\tif (_gl.getShaderPrecisionFormat === undefined) {\n\t\t\t\t_gl.getShaderPrecisionFormat = function () {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t'rangeMin': 1,\n\t\t\t\t\t\t'rangeMax': 1,\n\t\t\t\t\t\t'precision': 1\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error('THREE.WebGLRenderer: ' + error.message);\n\t\t\tthrow error;\n\t\t}\n\n\t\tvar extensions, capabilities, state, info;\n\t\tvar properties, textures, cubemaps, attributes, geometries, objects;\n\t\tvar programCache, materials, renderLists, renderStates, clipping;\n\t\tvar background, morphtargets, bufferRenderer, indexedBufferRenderer;\n\t\tvar utils, bindingStates;\n\n\t\tfunction initGLContext() {\n\t\t\textensions = new WebGLExtensions(_gl);\n\t\t\tcapabilities = new WebGLCapabilities(_gl, extensions, parameters);\n\t\t\textensions.init(capabilities);\n\t\t\tutils = new WebGLUtils(_gl, extensions, capabilities);\n\t\t\tstate = new WebGLState(_gl, extensions, capabilities);\n\t\t\tstate.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor());\n\t\t\tstate.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor());\n\t\t\tinfo = new WebGLInfo(_gl);\n\t\t\tproperties = new WebGLProperties();\n\t\t\ttextures = new WebGLTextures(_gl, extensions, state, properties, capabilities, utils, info);\n\t\t\tcubemaps = new WebGLCubeMaps(_this);\n\t\t\tattributes = new WebGLAttributes(_gl, capabilities);\n\t\t\tbindingStates = new WebGLBindingStates(_gl, extensions, attributes, capabilities);\n\t\t\tgeometries = new WebGLGeometries(_gl, attributes, info, bindingStates);\n\t\t\tobjects = new WebGLObjects(_gl, geometries, attributes, info);\n\t\t\tmorphtargets = new WebGLMorphtargets(_gl);\n\t\t\tclipping = new WebGLClipping(properties);\n\t\t\tprogramCache = new WebGLPrograms(_this, cubemaps, extensions, capabilities, bindingStates, clipping);\n\t\t\tmaterials = new WebGLMaterials(properties);\n\t\t\trenderLists = new WebGLRenderLists(properties);\n\t\t\trenderStates = new WebGLRenderStates(extensions, capabilities);\n\t\t\tbackground = new WebGLBackground(_this, cubemaps, state, objects, _premultipliedAlpha);\n\t\t\tbufferRenderer = new WebGLBufferRenderer(_gl, extensions, info, capabilities);\n\t\t\tindexedBufferRenderer = new WebGLIndexedBufferRenderer(_gl, extensions, info, capabilities);\n\t\t\tinfo.programs = programCache.programs;\n\t\t\t_this.capabilities = capabilities;\n\t\t\t_this.extensions = extensions;\n\t\t\t_this.properties = properties;\n\t\t\t_this.renderLists = renderLists;\n\t\t\t_this.state = state;\n\t\t\t_this.info = info;\n\t\t}\n\n\t\tinitGLContext();\n\t\tvar xr = typeof navigator !== 'undefined' && 'xr' in navigator ? new WebXRManager(_this, _gl) : new WebVRManager(_this);\n\t\tthis.xr = xr; // shadow map\n\n\t\tvar shadowMap = new WebGLShadowMap(_this, objects, capabilities.maxTextureSize);\n\t\tthis.shadowMap = shadowMap; // API\n\n\t\tthis.getContext = function () {\n\t\t\treturn _gl;\n\t\t};\n\n\t\tthis.getContextAttributes = function () {\n\t\t\treturn _gl.getContextAttributes();\n\t\t};\n\n\t\tthis.forceContextLoss = function () {\n\t\t\tvar extension = extensions.get('WEBGL_lose_context');\n\t\t\tif (extension) extension.loseContext();\n\t\t};\n\n\t\tthis.forceContextRestore = function () {\n\t\t\tvar extension = extensions.get('WEBGL_lose_context');\n\t\t\tif (extension) extension.restoreContext();\n\t\t};\n\n\t\tthis.getPixelRatio = function () {\n\t\t\treturn _pixelRatio;\n\t\t};\n\n\t\tthis.setPixelRatio = function (value) {\n\t\t\tif (value === undefined) return;\n\t\t\t_pixelRatio = value;\n\t\t\tthis.setSize(_width, _height, false);\n\t\t};\n\n\t\tthis.getSize = function (target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('WebGLRenderer: .getsize() now requires a Vector2 as an argument');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn target.set(_width, _height);\n\t\t};\n\n\t\tthis.setSize = function (width, height, updateStyle) {\n\t\t\tif (xr.isPresenting) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: Can\\'t change size while VR device is presenting.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t_width = width;\n\t\t\t_height = height;\n\t\t\t_canvas.width = Math.floor(width * _pixelRatio);\n\t\t\t_canvas.height = Math.floor(height * _pixelRatio);\n\n\t\t\tif (updateStyle !== false) {\n\t\t\t\t_canvas.style.width = width + 'px';\n\t\t\t\t_canvas.style.height = height + 'px';\n\t\t\t}\n\n\t\t\tthis.setViewport(0, 0, width, height);\n\t\t};\n\n\t\tthis.getDrawingBufferSize = function (target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn target.set(_width * _pixelRatio, _height * _pixelRatio).floor();\n\t\t};\n\n\t\tthis.setDrawingBufferSize = function (width, height, pixelRatio) {\n\t\t\t_width = width;\n\t\t\t_height = height;\n\t\t\t_pixelRatio = pixelRatio;\n\t\t\t_canvas.width = Math.floor(width * pixelRatio);\n\t\t\t_canvas.height = Math.floor(height * pixelRatio);\n\t\t\tthis.setViewport(0, 0, width, height);\n\t\t};\n\n\t\tthis.getCurrentViewport = function (target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument');\n\t\t\t\ttarget = new Vector4();\n\t\t\t}\n\n\t\t\treturn target.copy(_currentViewport);\n\t\t};\n\n\t\tthis.getViewport = function (target) {\n\t\t\treturn target.copy(_viewport);\n\t\t};\n\n\t\tthis.setViewport = function (x, y, width, height) {\n\t\t\tif (x.isVector4) {\n\t\t\t\t_viewport.set(x.x, x.y, x.z, x.w);\n\t\t\t} else {\n\t\t\t\t_viewport.set(x, y, width, height);\n\t\t\t}\n\n\t\t\tstate.viewport(_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor());\n\t\t};\n\n\t\tthis.getScissor = function (target) {\n\t\t\treturn target.copy(_scissor);\n\t\t};\n\n\t\tthis.setScissor = function (x, y, width, height) {\n\t\t\tif (x.isVector4) {\n\t\t\t\t_scissor.set(x.x, x.y, x.z, x.w);\n\t\t\t} else {\n\t\t\t\t_scissor.set(x, y, width, height);\n\t\t\t}\n\n\t\t\tstate.scissor(_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor());\n\t\t};\n\n\t\tthis.getScissorTest = function () {\n\t\t\treturn _scissorTest;\n\t\t};\n\n\t\tthis.setScissorTest = function (boolean) {\n\t\t\tstate.setScissorTest(_scissorTest = boolean);\n\t\t};\n\n\t\tthis.setOpaqueSort = function (method) {\n\t\t\t_opaqueSort = method;\n\t\t};\n\n\t\tthis.setTransparentSort = function (method) {\n\t\t\t_transparentSort = method;\n\t\t}; // Clearing\n\n\n\t\tthis.getClearColor = function (target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('WebGLRenderer: .getClearColor() now requires a Color as an argument');\n\t\t\t\ttarget = new Color();\n\t\t\t}\n\n\t\t\treturn target.copy(background.getClearColor());\n\t\t};\n\n\t\tthis.setClearColor = function () {\n\t\t\tbackground.setClearColor.apply(background, arguments);\n\t\t};\n\n\t\tthis.getClearAlpha = function () {\n\t\t\treturn background.getClearAlpha();\n\t\t};\n\n\t\tthis.setClearAlpha = function () {\n\t\t\tbackground.setClearAlpha.apply(background, arguments);\n\t\t};\n\n\t\tthis.clear = function (color, depth, stencil) {\n\t\t\tvar bits = 0;\n\t\t\tif (color === undefined || color) bits |= 16384;\n\t\t\tif (depth === undefined || depth) bits |= 256;\n\t\t\tif (stencil === undefined || stencil) bits |= 1024;\n\n\t\t\t_gl.clear(bits);\n\t\t};\n\n\t\tthis.clearColor = function () {\n\t\t\tthis.clear(true, false, false);\n\t\t};\n\n\t\tthis.clearDepth = function () {\n\t\t\tthis.clear(false, true, false);\n\t\t};\n\n\t\tthis.clearStencil = function () {\n\t\t\tthis.clear(false, false, true);\n\t\t}; //\n\n\n\t\tthis.dispose = function () {\n\t\t\t_canvas.removeEventListener('webglcontextlost', onContextLost, false);\n\n\t\t\t_canvas.removeEventListener('webglcontextrestored', onContextRestore, false);\n\n\t\t\trenderLists.dispose();\n\t\t\trenderStates.dispose();\n\t\t\tproperties.dispose();\n\t\t\tcubemaps.dispose();\n\t\t\tobjects.dispose();\n\t\t\tbindingStates.dispose();\n\t\t\txr.dispose();\n\t\t\tanimation.stop();\n\t\t}; // Events\n\n\n\t\tfunction onContextLost(event) {\n\t\t\tevent.preventDefault();\n\t\t\tconsole.log('THREE.WebGLRenderer: Context Lost.');\n\t\t\t_isContextLost = true;\n\t\t}\n\n\t\tfunction onContextRestore()\n\t\t/* event */\n\t\t{\n\t\t\tconsole.log('THREE.WebGLRenderer: Context Restored.');\n\t\t\t_isContextLost = false;\n\t\t\tinitGLContext();\n\t\t}\n\n\t\tfunction onMaterialDispose(event) {\n\t\t\tvar material = event.target;\n\t\t\tmaterial.removeEventListener('dispose', onMaterialDispose);\n\t\t\tdeallocateMaterial(material);\n\t\t} // Buffer deallocation\n\n\n\t\tfunction deallocateMaterial(material) {\n\t\t\treleaseMaterialProgramReference(material);\n\t\t\tproperties.remove(material);\n\t\t}\n\n\t\tfunction releaseMaterialProgramReference(material) {\n\t\t\tvar programInfo = properties.get(material).program;\n\n\t\t\tif (programInfo !== undefined) {\n\t\t\t\tprogramCache.releaseProgram(programInfo);\n\t\t\t}\n\t\t} // Buffer rendering\n\n\n\t\tfunction renderObjectImmediate(object, program) {\n\t\t\tobject.render(function (object) {\n\t\t\t\t_this.renderBufferImmediate(object, program);\n\t\t\t});\n\t\t}\n\n\t\tthis.renderBufferImmediate = function (object, program) {\n\t\t\tbindingStates.initAttributes();\n\t\t\tvar buffers = properties.get(object);\n\t\t\tif (object.hasPositions && !buffers.position) buffers.position = _gl.createBuffer();\n\t\t\tif (object.hasNormals && !buffers.normal) buffers.normal = _gl.createBuffer();\n\t\t\tif (object.hasUvs && !buffers.uv) buffers.uv = _gl.createBuffer();\n\t\t\tif (object.hasColors && !buffers.color) buffers.color = _gl.createBuffer();\n\t\t\tvar programAttributes = program.getAttributes();\n\n\t\t\tif (object.hasPositions) {\n\t\t\t\t_gl.bindBuffer(34962, buffers.position);\n\n\t\t\t\t_gl.bufferData(34962, object.positionArray, 35048);\n\n\t\t\t\tbindingStates.enableAttribute(programAttributes.position);\n\n\t\t\t\t_gl.vertexAttribPointer(programAttributes.position, 3, 5126, false, 0, 0);\n\t\t\t}\n\n\t\t\tif (object.hasNormals) {\n\t\t\t\t_gl.bindBuffer(34962, buffers.normal);\n\n\t\t\t\t_gl.bufferData(34962, object.normalArray, 35048);\n\n\t\t\t\tbindingStates.enableAttribute(programAttributes.normal);\n\n\t\t\t\t_gl.vertexAttribPointer(programAttributes.normal, 3, 5126, false, 0, 0);\n\t\t\t}\n\n\t\t\tif (object.hasUvs) {\n\t\t\t\t_gl.bindBuffer(34962, buffers.uv);\n\n\t\t\t\t_gl.bufferData(34962, object.uvArray, 35048);\n\n\t\t\t\tbindingStates.enableAttribute(programAttributes.uv);\n\n\t\t\t\t_gl.vertexAttribPointer(programAttributes.uv, 2, 5126, false, 0, 0);\n\t\t\t}\n\n\t\t\tif (object.hasColors) {\n\t\t\t\t_gl.bindBuffer(34962, buffers.color);\n\n\t\t\t\t_gl.bufferData(34962, object.colorArray, 35048);\n\n\t\t\t\tbindingStates.enableAttribute(programAttributes.color);\n\n\t\t\t\t_gl.vertexAttribPointer(programAttributes.color, 3, 5126, false, 0, 0);\n\t\t\t}\n\n\t\t\tbindingStates.disableUnusedAttributes();\n\n\t\t\t_gl.drawArrays(4, 0, object.count);\n\n\t\t\tobject.count = 0;\n\t\t};\n\n\t\tthis.renderBufferDirect = function (camera, scene, geometry, material, object, group) {\n\t\t\tif (scene === null) scene = _emptyScene; // renderBufferDirect second parameter used to be fog (could be null)\n\n\t\t\tvar frontFaceCW = object.isMesh && object.matrixWorld.determinant() < 0;\n\t\t\tvar program = setProgram(camera, scene, material, object);\n\t\t\tstate.setMaterial(material, frontFaceCW); //\n\n\t\t\tvar index = geometry.index;\n\t\t\tvar position = geometry.attributes.position; //\n\n\t\t\tif (index === null) {\n\t\t\t\tif (position === undefined || position.count === 0) return;\n\t\t\t} else if (index.count === 0) {\n\t\t\t\treturn;\n\t\t\t} //\n\n\n\t\t\tvar rangeFactor = 1;\n\n\t\t\tif (material.wireframe === true) {\n\t\t\t\tindex = geometries.getWireframeAttribute(geometry);\n\t\t\t\trangeFactor = 2;\n\t\t\t}\n\n\t\t\tif (material.morphTargets || material.morphNormals) {\n\t\t\t\tmorphtargets.update(object, geometry, material, program);\n\t\t\t}\n\n\t\t\tbindingStates.setup(object, material, program, geometry, index);\n\t\t\tvar attribute;\n\t\t\tvar renderer = bufferRenderer;\n\n\t\t\tif (index !== null) {\n\t\t\t\tattribute = attributes.get(index);\n\t\t\t\trenderer = indexedBufferRenderer;\n\t\t\t\trenderer.setIndex(attribute);\n\t\t\t} //\n\n\n\t\t\tvar dataCount = index !== null ? index.count : position.count;\n\t\t\tvar rangeStart = geometry.drawRange.start * rangeFactor;\n\t\t\tvar rangeCount = geometry.drawRange.count * rangeFactor;\n\t\t\tvar groupStart = group !== null ? group.start * rangeFactor : 0;\n\t\t\tvar groupCount = group !== null ? group.count * rangeFactor : Infinity;\n\t\t\tvar drawStart = Math.max(rangeStart, groupStart);\n\t\t\tvar drawEnd = Math.min(dataCount, rangeStart + rangeCount, groupStart + groupCount) - 1;\n\t\t\tvar drawCount = Math.max(0, drawEnd - drawStart + 1);\n\t\t\tif (drawCount === 0) return; //\n\n\t\t\tif (object.isMesh) {\n\t\t\t\tif (material.wireframe === true) {\n\t\t\t\t\tstate.setLineWidth(material.wireframeLinewidth * getTargetPixelRatio());\n\t\t\t\t\trenderer.setMode(1);\n\t\t\t\t} else {\n\t\t\t\t\trenderer.setMode(4);\n\t\t\t\t}\n\t\t\t} else if (object.isLine) {\n\t\t\t\tvar lineWidth = material.linewidth;\n\t\t\t\tif (lineWidth === undefined) lineWidth = 1; // Not using Line*Material\n\n\t\t\t\tstate.setLineWidth(lineWidth * getTargetPixelRatio());\n\n\t\t\t\tif (object.isLineSegments) {\n\t\t\t\t\trenderer.setMode(1);\n\t\t\t\t} else if (object.isLineLoop) {\n\t\t\t\t\trenderer.setMode(2);\n\t\t\t\t} else {\n\t\t\t\t\trenderer.setMode(3);\n\t\t\t\t}\n\t\t\t} else if (object.isPoints) {\n\t\t\t\trenderer.setMode(0);\n\t\t\t} else if (object.isSprite) {\n\t\t\t\trenderer.setMode(4);\n\t\t\t}\n\n\t\t\tif (object.isInstancedMesh) {\n\t\t\t\trenderer.renderInstances(drawStart, drawCount, object.count);\n\t\t\t} else if (geometry.isInstancedBufferGeometry) {\n\t\t\t\tvar instanceCount = Math.min(geometry.instanceCount, geometry._maxInstanceCount);\n\t\t\t\trenderer.renderInstances(drawStart, drawCount, instanceCount);\n\t\t\t} else {\n\t\t\t\trenderer.render(drawStart, drawCount);\n\t\t\t}\n\t\t}; // Compile\n\n\n\t\tthis.compile = function (scene, camera) {\n\t\t\tcurrentRenderState = renderStates.get(scene);\n\t\t\tcurrentRenderState.init();\n\t\t\tscene.traverseVisible(function (object) {\n\t\t\t\tif (object.isLight && object.layers.test(camera.layers)) {\n\t\t\t\t\tcurrentRenderState.pushLight(object);\n\n\t\t\t\t\tif (object.castShadow) {\n\t\t\t\t\t\tcurrentRenderState.pushShadow(object);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tcurrentRenderState.setupLights();\n\t\t\tvar compiled = new WeakMap();\n\t\t\tscene.traverse(function (object) {\n\t\t\t\tvar material = object.material;\n\n\t\t\t\tif (material) {\n\t\t\t\t\tif (Array.isArray(material)) {\n\t\t\t\t\t\tfor (var i = 0; i < material.length; i++) {\n\t\t\t\t\t\t\tvar material2 = material[i];\n\n\t\t\t\t\t\t\tif (compiled.has(material2) === false) {\n\t\t\t\t\t\t\t\tinitMaterial(material2, scene, object);\n\t\t\t\t\t\t\t\tcompiled.set(material2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (compiled.has(material) === false) {\n\t\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t\t\tcompiled.set(material);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}; // Animation Loop\n\n\n\t\tvar onAnimationFrameCallback = null;\n\n\t\tfunction onAnimationFrame(time) {\n\t\t\tif (xr.isPresenting) return;\n\t\t\tif (onAnimationFrameCallback) onAnimationFrameCallback(time);\n\t\t}\n\n\t\tvar animation = new WebGLAnimation();\n\t\tanimation.setAnimationLoop(onAnimationFrame);\n\t\tif (typeof window !== 'undefined') animation.setContext(window);\n\n\t\tthis.setAnimationLoop = function (callback) {\n\t\t\tonAnimationFrameCallback = callback;\n\t\t\txr.setAnimationLoop(callback);\n\t\t\tcallback === null ? animation.stop() : animation.start();\n\t\t}; // Rendering\n\n\n\t\tthis.render = function (scene, camera) {\n\t\t\tvar renderTarget, forceClear;\n\n\t\t\tif (arguments[2] !== undefined) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead.');\n\t\t\t\trenderTarget = arguments[2];\n\t\t\t}\n\n\t\t\tif (arguments[3] !== undefined) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead.');\n\t\t\t\tforceClear = arguments[3];\n\t\t\t}\n\n\t\t\tif (camera !== undefined && camera.isCamera !== true) {\n\t\t\t\tconsole.error('THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_isContextLost === true) return; // reset caching for this frame\n\n\t\t\tbindingStates.resetDefaultState();\n\t\t\t_currentMaterialId = -1;\n\t\t\t_currentCamera = null; // update scene graph\n\n\t\t\tif (scene.autoUpdate === true) scene.updateMatrixWorld(); // update camera matrices and frustum\n\n\t\t\tif (camera.parent === null) camera.updateMatrixWorld();\n\n\t\t\tif (xr.enabled === true && xr.isPresenting === true) {\n\t\t\t\tcamera = xr.getCamera(camera);\n\t\t\t} //\n\n\n\t\t\tif (scene.isScene === true) scene.onBeforeRender(_this, scene, camera, renderTarget || _currentRenderTarget);\n\t\t\tcurrentRenderState = renderStates.get(scene, renderStateStack.length);\n\t\t\tcurrentRenderState.init();\n\t\t\trenderStateStack.push(currentRenderState);\n\n\t\t\t_projScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);\n\n\t\t\t_frustum.setFromProjectionMatrix(_projScreenMatrix);\n\n\t\t\t_localClippingEnabled = this.localClippingEnabled;\n\t\t\t_clippingEnabled = clipping.init(this.clippingPlanes, _localClippingEnabled, camera);\n\t\t\tcurrentRenderList = renderLists.get(scene, camera);\n\t\t\tcurrentRenderList.init();\n\t\t\tprojectObject(scene, camera, 0, _this.sortObjects);\n\t\t\tcurrentRenderList.finish();\n\n\t\t\tif (_this.sortObjects === true) {\n\t\t\t\tcurrentRenderList.sort(_opaqueSort, _transparentSort);\n\t\t\t} //\n\n\n\t\t\tif (_clippingEnabled === true) clipping.beginShadows();\n\t\t\tvar shadowsArray = currentRenderState.state.shadowsArray;\n\t\t\tshadowMap.render(shadowsArray, scene, camera);\n\t\t\tcurrentRenderState.setupLights();\n\t\t\tcurrentRenderState.setupLightsView(camera);\n\t\t\tif (_clippingEnabled === true) clipping.endShadows(); //\n\n\t\t\tif (this.info.autoReset === true) this.info.reset();\n\n\t\t\tif (renderTarget !== undefined) {\n\t\t\t\tthis.setRenderTarget(renderTarget);\n\t\t\t} //\n\n\n\t\t\tbackground.render(currentRenderList, scene, camera, forceClear); // render scene\n\n\t\t\tvar opaqueObjects = currentRenderList.opaque;\n\t\t\tvar transparentObjects = currentRenderList.transparent;\n\t\t\tif (opaqueObjects.length > 0) renderObjects(opaqueObjects, scene, camera);\n\t\t\tif (transparentObjects.length > 0) renderObjects(transparentObjects, scene, camera); //\n\n\t\t\tif (scene.isScene === true) scene.onAfterRender(_this, scene, camera); //\n\n\t\t\tif (_currentRenderTarget !== null) {\n\t\t\t\t// Generate mipmap if we're using any kind of mipmap filtering\n\t\t\t\ttextures.updateRenderTargetMipmap(_currentRenderTarget); // resolve multisample renderbuffers to a single-sample texture if necessary\n\n\t\t\t\ttextures.updateMultisampleRenderTarget(_currentRenderTarget);\n\t\t\t} // Ensure depth buffer writing is enabled so it can be cleared on next render\n\n\n\t\t\tstate.buffers.depth.setTest(true);\n\t\t\tstate.buffers.depth.setMask(true);\n\t\t\tstate.buffers.color.setMask(true);\n\t\t\tstate.setPolygonOffset(false);\n\n\t\t\tif (xr.enabled && xr.submitFrame) {\n\t\t\t\txr.submitFrame();\n\t\t\t} // _gl.finish();\n\n\n\t\t\trenderStateStack.pop();\n\n\t\t\tif (renderStateStack.length > 0) {\n\t\t\t\tcurrentRenderState = renderStateStack[renderStateStack.length - 1];\n\t\t\t} else {\n\t\t\t\tcurrentRenderState = null;\n\t\t\t}\n\n\t\t\tcurrentRenderList = null;\n\t\t};\n\n\t\tfunction projectObject(object, camera, groupOrder, sortObjects) {\n\t\t\tif (object.visible === false) return;\n\t\t\tvar visible = object.layers.test(camera.layers);\n\n\t\t\tif (visible) {\n\t\t\t\tif (object.isGroup) {\n\t\t\t\t\tgroupOrder = object.renderOrder;\n\t\t\t\t} else if (object.isLOD) {\n\t\t\t\t\tif (object.autoUpdate === true) object.update(camera);\n\t\t\t\t} else if (object.isLight) {\n\t\t\t\t\tcurrentRenderState.pushLight(object);\n\n\t\t\t\t\tif (object.castShadow) {\n\t\t\t\t\t\tcurrentRenderState.pushShadow(object);\n\t\t\t\t\t}\n\t\t\t\t} else if (object.isSprite) {\n\t\t\t\t\tif (!object.frustumCulled || _frustum.intersectsSprite(object)) {\n\t\t\t\t\t\tif (sortObjects) {\n\t\t\t\t\t\t\t_vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar geometry = objects.update(object);\n\t\t\t\t\t\tvar material = object.material;\n\n\t\t\t\t\t\tif (material.visible) {\n\t\t\t\t\t\t\tcurrentRenderList.push(object, geometry, material, groupOrder, _vector3.z, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (object.isImmediateRenderObject) {\n\t\t\t\t\tif (sortObjects) {\n\t\t\t\t\t\t_vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n\t\t\t\t\t}\n\n\t\t\t\t\tcurrentRenderList.push(object, null, object.material, groupOrder, _vector3.z, null);\n\t\t\t\t} else if (object.isMesh || object.isLine || object.isPoints) {\n\t\t\t\t\tif (object.isSkinnedMesh) {\n\t\t\t\t\t\t// update skeleton only once in a frame\n\t\t\t\t\t\tif (object.skeleton.frame !== info.render.frame) {\n\t\t\t\t\t\t\tobject.skeleton.update();\n\t\t\t\t\t\t\tobject.skeleton.frame = info.render.frame;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!object.frustumCulled || _frustum.intersectsObject(object)) {\n\t\t\t\t\t\tif (sortObjects) {\n\t\t\t\t\t\t\t_vector3.setFromMatrixPosition(object.matrixWorld).applyMatrix4(_projScreenMatrix);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar _geometry = objects.update(object);\n\n\t\t\t\t\t\tvar _material = object.material;\n\n\t\t\t\t\t\tif (Array.isArray(_material)) {\n\t\t\t\t\t\t\tvar groups = _geometry.groups;\n\n\t\t\t\t\t\t\tfor (var i = 0, l = groups.length; i < l; i++) {\n\t\t\t\t\t\t\t\tvar group = groups[i];\n\t\t\t\t\t\t\t\tvar groupMaterial = _material[group.materialIndex];\n\n\t\t\t\t\t\t\t\tif (groupMaterial && groupMaterial.visible) {\n\t\t\t\t\t\t\t\t\tcurrentRenderList.push(object, _geometry, groupMaterial, groupOrder, _vector3.z, group);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (_material.visible) {\n\t\t\t\t\t\t\tcurrentRenderList.push(object, _geometry, _material, groupOrder, _vector3.z, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var _i = 0, _l = children.length; _i < _l; _i++) {\n\t\t\t\tprojectObject(children[_i], camera, groupOrder, sortObjects);\n\t\t\t}\n\t\t}\n\n\t\tfunction renderObjects(renderList, scene, camera) {\n\t\t\tvar overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;\n\n\t\t\tfor (var i = 0, l = renderList.length; i < l; i++) {\n\t\t\t\tvar renderItem = renderList[i];\n\t\t\t\tvar object = renderItem.object;\n\t\t\t\tvar geometry = renderItem.geometry;\n\t\t\t\tvar material = overrideMaterial === null ? renderItem.material : overrideMaterial;\n\t\t\t\tvar group = renderItem.group;\n\n\t\t\t\tif (camera.isArrayCamera) {\n\t\t\t\t\tvar cameras = camera.cameras;\n\n\t\t\t\t\tfor (var j = 0, jl = cameras.length; j < jl; j++) {\n\t\t\t\t\t\tvar camera2 = cameras[j];\n\n\t\t\t\t\t\tif (object.layers.test(camera2.layers)) {\n\t\t\t\t\t\t\tstate.viewport(_currentViewport.copy(camera2.viewport));\n\t\t\t\t\t\t\tcurrentRenderState.setupLightsView(camera2);\n\t\t\t\t\t\t\trenderObject(object, scene, camera2, geometry, material, group);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trenderObject(object, scene, camera, geometry, material, group);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction renderObject(object, scene, camera, geometry, material, group) {\n\t\t\tobject.onBeforeRender(_this, scene, camera, geometry, material, group);\n\t\t\tobject.modelViewMatrix.multiplyMatrices(camera.matrixWorldInverse, object.matrixWorld);\n\t\t\tobject.normalMatrix.getNormalMatrix(object.modelViewMatrix);\n\n\t\t\tif (object.isImmediateRenderObject) {\n\t\t\t\tvar program = setProgram(camera, scene, material, object);\n\t\t\t\tstate.setMaterial(material);\n\t\t\t\tbindingStates.reset();\n\t\t\t\trenderObjectImmediate(object, program);\n\t\t\t} else {\n\t\t\t\t_this.renderBufferDirect(camera, scene, geometry, material, object, group);\n\t\t\t}\n\n\t\t\tobject.onAfterRender(_this, scene, camera, geometry, material, group);\n\t\t}\n\n\t\tfunction initMaterial(material, scene, object) {\n\t\t\tif (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\t\tvar materialProperties = properties.get(material);\n\t\t\tvar lights = currentRenderState.state.lights;\n\t\t\tvar shadowsArray = currentRenderState.state.shadowsArray;\n\t\t\tvar lightsStateVersion = lights.state.version;\n\t\t\tvar parameters = programCache.getParameters(material, lights.state, shadowsArray, scene, object);\n\t\t\tvar programCacheKey = programCache.getProgramCacheKey(parameters);\n\t\t\tvar program = materialProperties.program;\n\t\t\tvar programChange = true; // always update environment and fog - changing these trigger an initMaterial call, but it's possible that the program doesn't change\n\n\t\t\tmaterialProperties.environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tmaterialProperties.fog = scene.fog;\n\t\t\tmaterialProperties.envMap = cubemaps.get(material.envMap || materialProperties.environment);\n\n\t\t\tif (program === undefined) {\n\t\t\t\t// new material\n\t\t\t\tmaterial.addEventListener('dispose', onMaterialDispose);\n\t\t\t} else if (program.cacheKey !== programCacheKey) {\n\t\t\t\t// changed glsl or parameters\n\t\t\t\treleaseMaterialProgramReference(material);\n\t\t\t} else if (materialProperties.lightsStateVersion !== lightsStateVersion) {\n\t\t\t\tprogramChange = false;\n\t\t\t} else if (parameters.shaderID !== undefined) {\n\t\t\t\t// same glsl and uniform list\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t// only rebuild uniform list\n\t\t\t\tprogramChange = false;\n\t\t\t}\n\n\t\t\tif (programChange) {\n\t\t\t\tparameters.uniforms = programCache.getUniforms(material);\n\t\t\t\tmaterial.onBeforeCompile(parameters, _this);\n\t\t\t\tprogram = programCache.acquireProgram(parameters, programCacheKey);\n\t\t\t\tmaterialProperties.program = program;\n\t\t\t\tmaterialProperties.uniforms = parameters.uniforms;\n\t\t\t\tmaterialProperties.outputEncoding = parameters.outputEncoding;\n\t\t\t}\n\n\t\t\tvar uniforms = materialProperties.uniforms;\n\n\t\t\tif (!material.isShaderMaterial && !material.isRawShaderMaterial || material.clipping === true) {\n\t\t\t\tmaterialProperties.numClippingPlanes = clipping.numPlanes;\n\t\t\t\tmaterialProperties.numIntersection = clipping.numIntersection;\n\t\t\t\tuniforms.clippingPlanes = clipping.uniform;\n\t\t\t} // store the light setup it was created for\n\n\n\t\t\tmaterialProperties.needsLights = materialNeedsLights(material);\n\t\t\tmaterialProperties.lightsStateVersion = lightsStateVersion;\n\n\t\t\tif (materialProperties.needsLights) {\n\t\t\t\t// wire up the material to this renderer's lighting state\n\t\t\t\tuniforms.ambientLightColor.value = lights.state.ambient;\n\t\t\t\tuniforms.lightProbe.value = lights.state.probe;\n\t\t\t\tuniforms.directionalLights.value = lights.state.directional;\n\t\t\t\tuniforms.directionalLightShadows.value = lights.state.directionalShadow;\n\t\t\t\tuniforms.spotLights.value = lights.state.spot;\n\t\t\t\tuniforms.spotLightShadows.value = lights.state.spotShadow;\n\t\t\t\tuniforms.rectAreaLights.value = lights.state.rectArea;\n\t\t\t\tuniforms.ltc_1.value = lights.state.rectAreaLTC1;\n\t\t\t\tuniforms.ltc_2.value = lights.state.rectAreaLTC2;\n\t\t\t\tuniforms.pointLights.value = lights.state.point;\n\t\t\t\tuniforms.pointLightShadows.value = lights.state.pointShadow;\n\t\t\t\tuniforms.hemisphereLights.value = lights.state.hemi;\n\t\t\t\tuniforms.directionalShadowMap.value = lights.state.directionalShadowMap;\n\t\t\t\tuniforms.directionalShadowMatrix.value = lights.state.directionalShadowMatrix;\n\t\t\t\tuniforms.spotShadowMap.value = lights.state.spotShadowMap;\n\t\t\t\tuniforms.spotShadowMatrix.value = lights.state.spotShadowMatrix;\n\t\t\t\tuniforms.pointShadowMap.value = lights.state.pointShadowMap;\n\t\t\t\tuniforms.pointShadowMatrix.value = lights.state.pointShadowMatrix; // TODO (abelnation): add area lights shadow info to uniforms\n\t\t\t}\n\n\t\t\tvar progUniforms = materialProperties.program.getUniforms();\n\t\t\tvar uniformsList = WebGLUniforms.seqWithValue(progUniforms.seq, uniforms);\n\t\t\tmaterialProperties.uniformsList = uniformsList;\n\t\t}\n\n\t\tfunction setProgram(camera, scene, material, object) {\n\t\t\tif (scene.isScene !== true) scene = _emptyScene; // scene could be a Mesh, Line, Points, ...\n\n\t\t\ttextures.resetTextureUnits();\n\t\t\tvar fog = scene.fog;\n\t\t\tvar environment = material.isMeshStandardMaterial ? scene.environment : null;\n\t\t\tvar encoding = _currentRenderTarget === null ? _this.outputEncoding : _currentRenderTarget.texture.encoding;\n\t\t\tvar envMap = cubemaps.get(material.envMap || environment);\n\t\t\tvar materialProperties = properties.get(material);\n\t\t\tvar lights = currentRenderState.state.lights;\n\n\t\t\tif (_clippingEnabled === true) {\n\t\t\t\tif (_localClippingEnabled === true || camera !== _currentCamera) {\n\t\t\t\t\tvar useCache = camera === _currentCamera && material.id === _currentMaterialId; // we might want to call this function with some ClippingGroup\n\t\t\t\t\t// object instead of the material, once it becomes feasible\n\t\t\t\t\t// (#8465, #8379)\n\n\t\t\t\t\tclipping.setState(material, camera, useCache);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (material.version === materialProperties.__version) {\n\t\t\t\tif (material.fog && materialProperties.fog !== fog) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.environment !== environment) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.needsLights && materialProperties.lightsStateVersion !== lights.state.version) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.numClippingPlanes !== undefined && (materialProperties.numClippingPlanes !== clipping.numPlanes || materialProperties.numIntersection !== clipping.numIntersection)) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.outputEncoding !== encoding) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t} else if (materialProperties.envMap !== envMap) {\n\t\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tinitMaterial(material, scene, object);\n\t\t\t\tmaterialProperties.__version = material.version;\n\t\t\t}\n\n\t\t\tvar refreshProgram = false;\n\t\t\tvar refreshMaterial = false;\n\t\t\tvar refreshLights = false;\n\t\t\tvar program = materialProperties.program,\n\t\t\t\t\tp_uniforms = program.getUniforms(),\n\t\t\t\t\tm_uniforms = materialProperties.uniforms;\n\n\t\t\tif (state.useProgram(program.program)) {\n\t\t\t\trefreshProgram = true;\n\t\t\t\trefreshMaterial = true;\n\t\t\t\trefreshLights = true;\n\t\t\t}\n\n\t\t\tif (material.id !== _currentMaterialId) {\n\t\t\t\t_currentMaterialId = material.id;\n\t\t\t\trefreshMaterial = true;\n\t\t\t}\n\n\t\t\tif (refreshProgram || _currentCamera !== camera) {\n\t\t\t\tp_uniforms.setValue(_gl, 'projectionMatrix', camera.projectionMatrix);\n\n\t\t\t\tif (capabilities.logarithmicDepthBuffer) {\n\t\t\t\t\tp_uniforms.setValue(_gl, 'logDepthBufFC', 2.0 / (Math.log(camera.far + 1.0) / Math.LN2));\n\t\t\t\t}\n\n\t\t\t\tif (_currentCamera !== camera) {\n\t\t\t\t\t_currentCamera = camera; // lighting uniforms depend on the camera so enforce an update\n\t\t\t\t\t// now, in case this material supports lights - or later, when\n\t\t\t\t\t// the next material that does gets activated:\n\n\t\t\t\t\trefreshMaterial = true; // set to true on material change\n\n\t\t\t\t\trefreshLights = true; // remains set until update done\n\t\t\t\t} // load material specific uniforms\n\t\t\t\t// (shader material also gets them for the sake of genericity)\n\n\n\t\t\t\tif (material.isShaderMaterial || material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshStandardMaterial || material.envMap) {\n\t\t\t\t\tvar uCamPos = p_uniforms.map.cameraPosition;\n\n\t\t\t\t\tif (uCamPos !== undefined) {\n\t\t\t\t\t\tuCamPos.setValue(_gl, _vector3.setFromMatrixPosition(camera.matrixWorld));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial) {\n\t\t\t\t\tp_uniforms.setValue(_gl, 'isOrthographic', camera.isOrthographicCamera === true);\n\t\t\t\t}\n\n\t\t\t\tif (material.isMeshPhongMaterial || material.isMeshToonMaterial || material.isMeshLambertMaterial || material.isMeshBasicMaterial || material.isMeshStandardMaterial || material.isShaderMaterial || material.isShadowMaterial || material.skinning) {\n\t\t\t\t\tp_uniforms.setValue(_gl, 'viewMatrix', camera.matrixWorldInverse);\n\t\t\t\t}\n\t\t\t} // skinning uniforms must be set even if material didn't change\n\t\t\t// auto-setting of texture unit for bone texture must go before other textures\n\t\t\t// otherwise textures used for skinning can take over texture units reserved for other material textures\n\n\n\t\t\tif (material.skinning) {\n\t\t\t\tp_uniforms.setOptional(_gl, object, 'bindMatrix');\n\t\t\t\tp_uniforms.setOptional(_gl, object, 'bindMatrixInverse');\n\t\t\t\tvar skeleton = object.skeleton;\n\n\t\t\t\tif (skeleton) {\n\t\t\t\t\tvar bones = skeleton.bones;\n\n\t\t\t\t\tif (capabilities.floatVertexTextures) {\n\t\t\t\t\t\tif (skeleton.boneTexture === null) {\n\t\t\t\t\t\t\t// layout (1 matrix = 4 pixels)\n\t\t\t\t\t\t\t//\t\t\tRGBA RGBA RGBA RGBA (=> column1, column2, column3, column4)\n\t\t\t\t\t\t\t//\twith\t8x8\tpixel texture max\t 16 bones * 4 pixels =\t(8 * 8)\n\t\t\t\t\t\t\t//\t\t\t 16x16 pixel texture max\t 64 bones * 4 pixels = (16 * 16)\n\t\t\t\t\t\t\t//\t\t\t 32x32 pixel texture max\t256 bones * 4 pixels = (32 * 32)\n\t\t\t\t\t\t\t//\t\t\t 64x64 pixel texture max 1024 bones * 4 pixels = (64 * 64)\n\t\t\t\t\t\t\tvar size = Math.sqrt(bones.length * 4); // 4 pixels needed for 1 matrix\n\n\t\t\t\t\t\t\tsize = MathUtils.ceilPowerOfTwo(size);\n\t\t\t\t\t\t\tsize = Math.max(size, 4);\n\t\t\t\t\t\t\tvar boneMatrices = new Float32Array(size * size * 4); // 4 floats per RGBA pixel\n\n\t\t\t\t\t\t\tboneMatrices.set(skeleton.boneMatrices); // copy current values\n\n\t\t\t\t\t\t\tvar boneTexture = new DataTexture(boneMatrices, size, size, RGBAFormat, FloatType);\n\t\t\t\t\t\t\tskeleton.boneMatrices = boneMatrices;\n\t\t\t\t\t\t\tskeleton.boneTexture = boneTexture;\n\t\t\t\t\t\t\tskeleton.boneTextureSize = size;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tp_uniforms.setValue(_gl, 'boneTexture', skeleton.boneTexture, textures);\n\t\t\t\t\t\tp_uniforms.setValue(_gl, 'boneTextureSize', skeleton.boneTextureSize);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tp_uniforms.setOptional(_gl, skeleton, 'boneMatrices');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (refreshMaterial || materialProperties.receiveShadow !== object.receiveShadow) {\n\t\t\t\tmaterialProperties.receiveShadow = object.receiveShadow;\n\t\t\t\tp_uniforms.setValue(_gl, 'receiveShadow', object.receiveShadow);\n\t\t\t}\n\n\t\t\tif (refreshMaterial) {\n\t\t\t\tp_uniforms.setValue(_gl, 'toneMappingExposure', _this.toneMappingExposure);\n\n\t\t\t\tif (materialProperties.needsLights) {\n\t\t\t\t\t// the current material requires lighting info\n\t\t\t\t\t// note: all lighting uniforms are always set correctly\n\t\t\t\t\t// they simply reference the renderer's state for their\n\t\t\t\t\t// values\n\t\t\t\t\t//\n\t\t\t\t\t// use the current material's .needsUpdate flags to set\n\t\t\t\t\t// the GL state when required\n\t\t\t\t\tmarkUniformsLightsNeedsUpdate(m_uniforms, refreshLights);\n\t\t\t\t} // refresh uniforms common to several materials\n\n\n\t\t\t\tif (fog && material.fog) {\n\t\t\t\t\tmaterials.refreshFogUniforms(m_uniforms, fog);\n\t\t\t\t}\n\n\t\t\t\tmaterials.refreshMaterialUniforms(m_uniforms, material, _pixelRatio, _height);\n\t\t\t\tWebGLUniforms.upload(_gl, materialProperties.uniformsList, m_uniforms, textures);\n\t\t\t}\n\n\t\t\tif (material.isShaderMaterial && material.uniformsNeedUpdate === true) {\n\t\t\t\tWebGLUniforms.upload(_gl, materialProperties.uniformsList, m_uniforms, textures);\n\t\t\t\tmaterial.uniformsNeedUpdate = false;\n\t\t\t}\n\n\t\t\tif (material.isSpriteMaterial) {\n\t\t\t\tp_uniforms.setValue(_gl, 'center', object.center);\n\t\t\t} // common matrices\n\n\n\t\t\tp_uniforms.setValue(_gl, 'modelViewMatrix', object.modelViewMatrix);\n\t\t\tp_uniforms.setValue(_gl, 'normalMatrix', object.normalMatrix);\n\t\t\tp_uniforms.setValue(_gl, 'modelMatrix', object.matrixWorld);\n\t\t\treturn program;\n\t\t} // If uniforms are marked as clean, they don't need to be loaded to the GPU.\n\n\n\t\tfunction markUniformsLightsNeedsUpdate(uniforms, value) {\n\t\t\tuniforms.ambientLightColor.needsUpdate = value;\n\t\t\tuniforms.lightProbe.needsUpdate = value;\n\t\t\tuniforms.directionalLights.needsUpdate = value;\n\t\t\tuniforms.directionalLightShadows.needsUpdate = value;\n\t\t\tuniforms.pointLights.needsUpdate = value;\n\t\t\tuniforms.pointLightShadows.needsUpdate = value;\n\t\t\tuniforms.spotLights.needsUpdate = value;\n\t\t\tuniforms.spotLightShadows.needsUpdate = value;\n\t\t\tuniforms.rectAreaLights.needsUpdate = value;\n\t\t\tuniforms.hemisphereLights.needsUpdate = value;\n\t\t}\n\n\t\tfunction materialNeedsLights(material) {\n\t\t\treturn material.isMeshLambertMaterial || material.isMeshToonMaterial || material.isMeshPhongMaterial || material.isMeshStandardMaterial || material.isShadowMaterial || material.isShaderMaterial && material.lights === true;\n\t\t} // this.setTexture2D = setTexture2D;\n\n\n\t\tthis.setTexture2D = function () {\n\t\t\tvar warned = false; // backwards compatibility: peel texture.texture\n\n\t\t\treturn function setTexture2D(texture, slot) {\n\t\t\t\tif (texture && texture.isWebGLRenderTarget) {\n\t\t\t\t\tif (!warned) {\n\t\t\t\t\t\tconsole.warn(\"THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead.\");\n\t\t\t\t\t\twarned = true;\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture = texture.texture;\n\t\t\t\t}\n\n\t\t\t\ttextures.setTexture2D(texture, slot);\n\t\t\t};\n\t\t}(); //\n\n\n\t\tthis.setFramebuffer = function (value) {\n\t\t\tif (_framebuffer !== value && _currentRenderTarget === null) _gl.bindFramebuffer(36160, value);\n\t\t\t_framebuffer = value;\n\t\t};\n\n\t\tthis.getActiveCubeFace = function () {\n\t\t\treturn _currentActiveCubeFace;\n\t\t};\n\n\t\tthis.getActiveMipmapLevel = function () {\n\t\t\treturn _currentActiveMipmapLevel;\n\t\t};\n\n\t\tthis.getRenderList = function () {\n\t\t\treturn currentRenderList;\n\t\t};\n\n\t\tthis.setRenderList = function (renderList) {\n\t\t\tcurrentRenderList = renderList;\n\t\t};\n\n\t\tthis.getRenderTarget = function () {\n\t\t\treturn _currentRenderTarget;\n\t\t};\n\n\t\tthis.setRenderTarget = function (renderTarget, activeCubeFace, activeMipmapLevel) {\n\t\t\tif (activeCubeFace === void 0) {\n\t\t\t\tactiveCubeFace = 0;\n\t\t\t}\n\n\t\t\tif (activeMipmapLevel === void 0) {\n\t\t\t\tactiveMipmapLevel = 0;\n\t\t\t}\n\n\t\t\t_currentRenderTarget = renderTarget;\n\t\t\t_currentActiveCubeFace = activeCubeFace;\n\t\t\t_currentActiveMipmapLevel = activeMipmapLevel;\n\n\t\t\tif (renderTarget && properties.get(renderTarget).__webglFramebuffer === undefined) {\n\t\t\t\ttextures.setupRenderTarget(renderTarget);\n\t\t\t}\n\n\t\t\tvar framebuffer = _framebuffer;\n\t\t\tvar isCube = false;\n\n\t\t\tif (renderTarget) {\n\t\t\t\tvar __webglFramebuffer = properties.get(renderTarget).__webglFramebuffer;\n\n\t\t\t\tif (renderTarget.isWebGLCubeRenderTarget) {\n\t\t\t\t\tframebuffer = __webglFramebuffer[activeCubeFace];\n\t\t\t\t\tisCube = true;\n\t\t\t\t} else if (renderTarget.isWebGLMultisampleRenderTarget) {\n\t\t\t\t\tframebuffer = properties.get(renderTarget).__webglMultisampledFramebuffer;\n\t\t\t\t} else {\n\t\t\t\t\tframebuffer = __webglFramebuffer;\n\t\t\t\t}\n\n\t\t\t\t_currentViewport.copy(renderTarget.viewport);\n\n\t\t\t\t_currentScissor.copy(renderTarget.scissor);\n\n\t\t\t\t_currentScissorTest = renderTarget.scissorTest;\n\t\t\t} else {\n\t\t\t\t_currentViewport.copy(_viewport).multiplyScalar(_pixelRatio).floor();\n\n\t\t\t\t_currentScissor.copy(_scissor).multiplyScalar(_pixelRatio).floor();\n\n\t\t\t\t_currentScissorTest = _scissorTest;\n\t\t\t}\n\n\t\t\tif (_currentFramebuffer !== framebuffer) {\n\t\t\t\t_gl.bindFramebuffer(36160, framebuffer);\n\n\t\t\t\t_currentFramebuffer = framebuffer;\n\t\t\t}\n\n\t\t\tstate.viewport(_currentViewport);\n\t\t\tstate.scissor(_currentScissor);\n\t\t\tstate.setScissorTest(_currentScissorTest);\n\n\t\t\tif (isCube) {\n\t\t\t\tvar textureProperties = properties.get(renderTarget.texture);\n\n\t\t\t\t_gl.framebufferTexture2D(36160, 36064, 34069 + activeCubeFace, textureProperties.__webglTexture, activeMipmapLevel);\n\t\t\t}\n\t\t};\n\n\t\tthis.readRenderTargetPixels = function (renderTarget, x, y, width, height, buffer, activeCubeFaceIndex) {\n\t\t\tif (!(renderTarget && renderTarget.isWebGLRenderTarget)) {\n\t\t\t\tconsole.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar framebuffer = properties.get(renderTarget).__webglFramebuffer;\n\n\t\t\tif (renderTarget.isWebGLCubeRenderTarget && activeCubeFaceIndex !== undefined) {\n\t\t\t\tframebuffer = framebuffer[activeCubeFaceIndex];\n\t\t\t}\n\n\t\t\tif (framebuffer) {\n\t\t\t\tvar restore = false;\n\n\t\t\t\tif (framebuffer !== _currentFramebuffer) {\n\t\t\t\t\t_gl.bindFramebuffer(36160, framebuffer);\n\n\t\t\t\t\trestore = true;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar texture = renderTarget.texture;\n\t\t\t\t\tvar textureFormat = texture.format;\n\t\t\t\t\tvar textureType = texture.type;\n\n\t\t\t\t\tif (textureFormat !== RGBAFormat && utils.convert(textureFormat) !== _gl.getParameter(35739)) {\n\t\t\t\t\t\tconsole.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar halfFloatSupportedByExt = textureType === HalfFloatType && (extensions.has('EXT_color_buffer_half_float') || capabilities.isWebGL2 && extensions.has('EXT_color_buffer_float'));\n\n\t\t\t\t\tif (textureType !== UnsignedByteType && utils.convert(textureType) !== _gl.getParameter(35738) && // IE11, Edge and Chrome Mac < 52 (#9513)\n\t\t\t\t\t!(textureType === FloatType && (capabilities.isWebGL2 || extensions.has('OES_texture_float') || extensions.has('WEBGL_color_buffer_float'))) && // Chrome Mac >= 52 and Firefox\n\t\t\t\t\t!halfFloatSupportedByExt) {\n\t\t\t\t\t\tconsole.error('THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (_gl.checkFramebufferStatus(36160) === 36053) {\n\t\t\t\t\t\t// the following if statement ensures valid read requests (no out-of-bounds pixels, see #8604)\n\t\t\t\t\t\tif (x >= 0 && x <= renderTarget.width - width && y >= 0 && y <= renderTarget.height - height) {\n\t\t\t\t\t\t\t_gl.readPixels(x, y, width, height, utils.convert(textureFormat), utils.convert(textureType), buffer);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error('THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.');\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tif (restore) {\n\t\t\t\t\t\t_gl.bindFramebuffer(36160, _currentFramebuffer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.copyFramebufferToTexture = function (position, texture, level) {\n\t\t\tif (level === void 0) {\n\t\t\t\tlevel = 0;\n\t\t\t}\n\n\t\t\tvar levelScale = Math.pow(2, -level);\n\t\t\tvar width = Math.floor(texture.image.width * levelScale);\n\t\t\tvar height = Math.floor(texture.image.height * levelScale);\n\t\t\tvar glFormat = utils.convert(texture.format);\n\t\t\ttextures.setTexture2D(texture, 0);\n\n\t\t\t_gl.copyTexImage2D(3553, level, glFormat, position.x, position.y, width, height, 0);\n\n\t\t\tstate.unbindTexture();\n\t\t};\n\n\t\tthis.copyTextureToTexture = function (position, srcTexture, dstTexture, level) {\n\t\t\tif (level === void 0) {\n\t\t\t\tlevel = 0;\n\t\t\t}\n\n\t\t\tvar width = srcTexture.image.width;\n\t\t\tvar height = srcTexture.image.height;\n\t\t\tvar glFormat = utils.convert(dstTexture.format);\n\t\t\tvar glType = utils.convert(dstTexture.type);\n\t\t\ttextures.setTexture2D(dstTexture, 0); // As another texture upload may have changed pixelStorei\n\t\t\t// parameters, make sure they are correct for the dstTexture\n\n\t\t\t_gl.pixelStorei(37440, dstTexture.flipY);\n\n\t\t\t_gl.pixelStorei(37441, dstTexture.premultiplyAlpha);\n\n\t\t\t_gl.pixelStorei(3317, dstTexture.unpackAlignment);\n\n\t\t\tif (srcTexture.isDataTexture) {\n\t\t\t\t_gl.texSubImage2D(3553, level, position.x, position.y, width, height, glFormat, glType, srcTexture.image.data);\n\t\t\t} else {\n\t\t\t\tif (srcTexture.isCompressedTexture) {\n\t\t\t\t\t_gl.compressedTexSubImage2D(3553, level, position.x, position.y, srcTexture.mipmaps[0].width, srcTexture.mipmaps[0].height, glFormat, srcTexture.mipmaps[0].data);\n\t\t\t\t} else {\n\t\t\t\t\t_gl.texSubImage2D(3553, level, position.x, position.y, glFormat, glType, srcTexture.image);\n\t\t\t\t}\n\t\t\t} // Generate mipmaps only when copying level 0\n\n\n\t\t\tif (level === 0 && dstTexture.generateMipmaps) _gl.generateMipmap(3553);\n\t\t\tstate.unbindTexture();\n\t\t};\n\n\t\tthis.initTexture = function (texture) {\n\t\t\ttextures.setTexture2D(texture, 0);\n\t\t\tstate.unbindTexture();\n\t\t};\n\n\t\tthis.resetState = function () {\n\t\t\tstate.reset();\n\t\t\tbindingStates.reset();\n\t\t};\n\n\t\tif (typeof __THREE_DEVTOOLS__ !== 'undefined') {\n\t\t\t__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', {\n\t\t\t\tdetail: this\n\t\t\t})); // eslint-disable-line no-undef\n\n\t\t}\n\t}\n\n\tfunction WebGL1Renderer(parameters) {\n\t\tWebGLRenderer.call(this, parameters);\n\t}\n\n\tWebGL1Renderer.prototype = Object.assign(Object.create(WebGLRenderer.prototype), {\n\t\tconstructor: WebGL1Renderer,\n\t\tisWebGL1Renderer: true\n\t});\n\n\tvar FogExp2 = /*#__PURE__*/function () {\n\t\tfunction FogExp2(color, density) {\n\t\t\tObject.defineProperty(this, 'isFogExp2', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.name = '';\n\t\t\tthis.color = new Color(color);\n\t\t\tthis.density = density !== undefined ? density : 0.00025;\n\t\t}\n\n\t\tvar _proto = FogExp2.prototype;\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new FogExp2(this.color, this.density);\n\t\t};\n\n\t\t_proto.toJSON = function toJSON()\n\t\t/* meta */\n\t\t{\n\t\t\treturn {\n\t\t\t\ttype: 'FogExp2',\n\t\t\t\tcolor: this.color.getHex(),\n\t\t\t\tdensity: this.density\n\t\t\t};\n\t\t};\n\n\t\treturn FogExp2;\n\t}();\n\n\tvar Fog = /*#__PURE__*/function () {\n\t\tfunction Fog(color, near, far) {\n\t\t\tObject.defineProperty(this, 'isFog', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.name = '';\n\t\t\tthis.color = new Color(color);\n\t\t\tthis.near = near !== undefined ? near : 1;\n\t\t\tthis.far = far !== undefined ? far : 1000;\n\t\t}\n\n\t\tvar _proto = Fog.prototype;\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new Fog(this.color, this.near, this.far);\n\t\t};\n\n\t\t_proto.toJSON = function toJSON()\n\t\t/* meta */\n\t\t{\n\t\t\treturn {\n\t\t\t\ttype: 'Fog',\n\t\t\t\tcolor: this.color.getHex(),\n\t\t\t\tnear: this.near,\n\t\t\t\tfar: this.far\n\t\t\t};\n\t\t};\n\n\t\treturn Fog;\n\t}();\n\n\tvar Scene = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(Scene, _Object3D);\n\n\t\tfunction Scene() {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\tObject.defineProperty(_assertThisInitialized(_this), 'isScene', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\t_this.type = 'Scene';\n\t\t\t_this.background = null;\n\t\t\t_this.environment = null;\n\t\t\t_this.fog = null;\n\t\t\t_this.overrideMaterial = null;\n\t\t\t_this.autoUpdate = true; // checked by the renderer\n\n\t\t\tif (typeof __THREE_DEVTOOLS__ !== 'undefined') {\n\t\t\t\t__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('observe', {\n\t\t\t\t\tdetail: _assertThisInitialized(_this)\n\t\t\t\t})); // eslint-disable-line no-undef\n\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = Scene.prototype;\n\n\t\t_proto.copy = function copy(source, recursive) {\n\t\t\t_Object3D.prototype.copy.call(this, source, recursive);\n\n\t\t\tif (source.background !== null) this.background = source.background.clone();\n\t\t\tif (source.environment !== null) this.environment = source.environment.clone();\n\t\t\tif (source.fog !== null) this.fog = source.fog.clone();\n\t\t\tif (source.overrideMaterial !== null) this.overrideMaterial = source.overrideMaterial.clone();\n\t\t\tthis.autoUpdate = source.autoUpdate;\n\t\t\tthis.matrixAutoUpdate = source.matrixAutoUpdate;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toJSON = function toJSON(meta) {\n\t\t\tvar data = _Object3D.prototype.toJSON.call(this, meta);\n\n\t\t\tif (this.background !== null) data.object.background = this.background.toJSON(meta);\n\t\t\tif (this.environment !== null) data.object.environment = this.environment.toJSON(meta);\n\t\t\tif (this.fog !== null) data.object.fog = this.fog.toJSON();\n\t\t\treturn data;\n\t\t};\n\n\t\treturn Scene;\n\t}(Object3D);\n\n\tfunction InterleavedBuffer(array, stride) {\n\t\tthis.array = array;\n\t\tthis.stride = stride;\n\t\tthis.count = array !== undefined ? array.length / stride : 0;\n\t\tthis.usage = StaticDrawUsage;\n\t\tthis.updateRange = {\n\t\t\toffset: 0,\n\t\t\tcount: -1\n\t\t};\n\t\tthis.version = 0;\n\t\tthis.uuid = MathUtils.generateUUID();\n\t}\n\n\tObject.defineProperty(InterleavedBuffer.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\tObject.assign(InterleavedBuffer.prototype, {\n\t\tisInterleavedBuffer: true,\n\t\tonUploadCallback: function onUploadCallback() {},\n\t\tsetUsage: function setUsage(value) {\n\t\t\tthis.usage = value;\n\t\t\treturn this;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.array = new source.array.constructor(source.array);\n\t\t\tthis.count = source.count;\n\t\t\tthis.stride = source.stride;\n\t\t\tthis.usage = source.usage;\n\t\t\treturn this;\n\t\t},\n\t\tcopyAt: function copyAt(index1, attribute, index2) {\n\t\t\tindex1 *= this.stride;\n\t\t\tindex2 *= attribute.stride;\n\n\t\t\tfor (var i = 0, l = this.stride; i < l; i++) {\n\t\t\t\tthis.array[index1 + i] = attribute.array[index2 + i];\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tset: function set(value, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tthis.array.set(value, offset);\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone(data) {\n\t\t\tif (data.arrayBuffers === undefined) {\n\t\t\t\tdata.arrayBuffers = {};\n\t\t\t}\n\n\t\t\tif (this.array.buffer._uuid === undefined) {\n\t\t\t\tthis.array.buffer._uuid = MathUtils.generateUUID();\n\t\t\t}\n\n\t\t\tif (data.arrayBuffers[this.array.buffer._uuid] === undefined) {\n\t\t\t\tdata.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer;\n\t\t\t}\n\n\t\t\tvar array = new this.array.constructor(data.arrayBuffers[this.array.buffer._uuid]);\n\t\t\tvar ib = new InterleavedBuffer(array, this.stride);\n\t\t\tib.setUsage(this.usage);\n\t\t\treturn ib;\n\t\t},\n\t\tonUpload: function onUpload(callback) {\n\t\t\tthis.onUploadCallback = callback;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(data) {\n\t\t\tif (data.arrayBuffers === undefined) {\n\t\t\t\tdata.arrayBuffers = {};\n\t\t\t} // generate UUID for array buffer if necessary\n\n\n\t\t\tif (this.array.buffer._uuid === undefined) {\n\t\t\t\tthis.array.buffer._uuid = MathUtils.generateUUID();\n\t\t\t}\n\n\t\t\tif (data.arrayBuffers[this.array.buffer._uuid] === undefined) {\n\t\t\t\tdata.arrayBuffers[this.array.buffer._uuid] = Array.prototype.slice.call(new Uint32Array(this.array.buffer));\n\t\t\t} //\n\n\n\t\t\treturn {\n\t\t\t\tuuid: this.uuid,\n\t\t\t\tbuffer: this.array.buffer._uuid,\n\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\tstride: this.stride\n\t\t\t};\n\t\t}\n\t});\n\n\tvar _vector$6 = new Vector3();\n\n\tfunction InterleavedBufferAttribute(interleavedBuffer, itemSize, offset, normalized) {\n\t\tthis.name = '';\n\t\tthis.data = interleavedBuffer;\n\t\tthis.itemSize = itemSize;\n\t\tthis.offset = offset;\n\t\tthis.normalized = normalized === true;\n\t}\n\n\tObject.defineProperties(InterleavedBufferAttribute.prototype, {\n\t\tcount: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.data.count;\n\t\t\t}\n\t\t},\n\t\tarray: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.data.array;\n\t\t\t}\n\t\t},\n\t\tneedsUpdate: {\n\t\t\tset: function set(value) {\n\t\t\t\tthis.data.needsUpdate = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.assign(InterleavedBufferAttribute.prototype, {\n\t\tisInterleavedBufferAttribute: true,\n\t\tapplyMatrix4: function applyMatrix4(m) {\n\t\t\tfor (var i = 0, l = this.data.count; i < l; i++) {\n\t\t\t\t_vector$6.x = this.getX(i);\n\t\t\t\t_vector$6.y = this.getY(i);\n\t\t\t\t_vector$6.z = this.getZ(i);\n\n\t\t\t\t_vector$6.applyMatrix4(m);\n\n\t\t\t\tthis.setXYZ(i, _vector$6.x, _vector$6.y, _vector$6.z);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tsetX: function setX(index, x) {\n\t\t\tthis.data.array[index * this.data.stride + this.offset] = x;\n\t\t\treturn this;\n\t\t},\n\t\tsetY: function setY(index, y) {\n\t\t\tthis.data.array[index * this.data.stride + this.offset + 1] = y;\n\t\t\treturn this;\n\t\t},\n\t\tsetZ: function setZ(index, z) {\n\t\t\tthis.data.array[index * this.data.stride + this.offset + 2] = z;\n\t\t\treturn this;\n\t\t},\n\t\tsetW: function setW(index, w) {\n\t\t\tthis.data.array[index * this.data.stride + this.offset + 3] = w;\n\t\t\treturn this;\n\t\t},\n\t\tgetX: function getX(index) {\n\t\t\treturn this.data.array[index * this.data.stride + this.offset];\n\t\t},\n\t\tgetY: function getY(index) {\n\t\t\treturn this.data.array[index * this.data.stride + this.offset + 1];\n\t\t},\n\t\tgetZ: function getZ(index) {\n\t\t\treturn this.data.array[index * this.data.stride + this.offset + 2];\n\t\t},\n\t\tgetW: function getW(index) {\n\t\t\treturn this.data.array[index * this.data.stride + this.offset + 3];\n\t\t},\n\t\tsetXY: function setXY(index, x, y) {\n\t\t\tindex = index * this.data.stride + this.offset;\n\t\t\tthis.data.array[index + 0] = x;\n\t\t\tthis.data.array[index + 1] = y;\n\t\t\treturn this;\n\t\t},\n\t\tsetXYZ: function setXYZ(index, x, y, z) {\n\t\t\tindex = index * this.data.stride + this.offset;\n\t\t\tthis.data.array[index + 0] = x;\n\t\t\tthis.data.array[index + 1] = y;\n\t\t\tthis.data.array[index + 2] = z;\n\t\t\treturn this;\n\t\t},\n\t\tsetXYZW: function setXYZW(index, x, y, z, w) {\n\t\t\tindex = index * this.data.stride + this.offset;\n\t\t\tthis.data.array[index + 0] = x;\n\t\t\tthis.data.array[index + 1] = y;\n\t\t\tthis.data.array[index + 2] = z;\n\t\t\tthis.data.array[index + 3] = w;\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone(data) {\n\t\t\tif (data === undefined) {\n\t\t\t\tconsole.log('THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.');\n\t\t\t\tvar array = [];\n\n\t\t\t\tfor (var i = 0; i < this.count; i++) {\n\t\t\t\t\tvar index = i * this.data.stride + this.offset;\n\n\t\t\t\t\tfor (var j = 0; j < this.itemSize; j++) {\n\t\t\t\t\t\tarray.push(this.data.array[index + j]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new BufferAttribute(new this.array.constructor(array), this.itemSize, this.normalized);\n\t\t\t} else {\n\t\t\t\tif (data.interleavedBuffers === undefined) {\n\t\t\t\t\tdata.interleavedBuffers = {};\n\t\t\t\t}\n\n\t\t\t\tif (data.interleavedBuffers[this.data.uuid] === undefined) {\n\t\t\t\t\tdata.interleavedBuffers[this.data.uuid] = this.data.clone(data);\n\t\t\t\t}\n\n\t\t\t\treturn new InterleavedBufferAttribute(data.interleavedBuffers[this.data.uuid], this.itemSize, this.offset, this.normalized);\n\t\t\t}\n\t\t},\n\t\ttoJSON: function toJSON(data) {\n\t\t\tif (data === undefined) {\n\t\t\t\tconsole.log('THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.');\n\t\t\t\tvar array = [];\n\n\t\t\t\tfor (var i = 0; i < this.count; i++) {\n\t\t\t\t\tvar index = i * this.data.stride + this.offset;\n\n\t\t\t\t\tfor (var j = 0; j < this.itemSize; j++) {\n\t\t\t\t\t\tarray.push(this.data.array[index + j]);\n\t\t\t\t\t}\n\t\t\t\t} // deinterleave data and save it as an ordinary buffer attribute for now\n\n\n\t\t\t\treturn {\n\t\t\t\t\titemSize: this.itemSize,\n\t\t\t\t\ttype: this.array.constructor.name,\n\t\t\t\t\tarray: array,\n\t\t\t\t\tnormalized: this.normalized\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// save as true interlaved attribtue\n\t\t\t\tif (data.interleavedBuffers === undefined) {\n\t\t\t\t\tdata.interleavedBuffers = {};\n\t\t\t\t}\n\n\t\t\t\tif (data.interleavedBuffers[this.data.uuid] === undefined) {\n\t\t\t\t\tdata.interleavedBuffers[this.data.uuid] = this.data.toJSON(data);\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tisInterleavedBufferAttribute: true,\n\t\t\t\t\titemSize: this.itemSize,\n\t\t\t\t\tdata: this.data.uuid,\n\t\t\t\t\toffset: this.offset,\n\t\t\t\t\tnormalized: this.normalized\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\trotation: <float>,\n\t *\tsizeAttenuation: <bool>\n\t * }\n\t */\n\n\tfunction SpriteMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'SpriteMaterial';\n\t\tthis.color = new Color(0xffffff);\n\t\tthis.map = null;\n\t\tthis.alphaMap = null;\n\t\tthis.rotation = 0;\n\t\tthis.sizeAttenuation = true;\n\t\tthis.transparent = true;\n\t\tthis.setValues(parameters);\n\t}\n\n\tSpriteMaterial.prototype = Object.create(Material.prototype);\n\tSpriteMaterial.prototype.constructor = SpriteMaterial;\n\tSpriteMaterial.prototype.isSpriteMaterial = true;\n\n\tSpriteMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.rotation = source.rotation;\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\t\treturn this;\n\t};\n\n\tvar _geometry;\n\n\tvar _intersectPoint = new Vector3();\n\n\tvar _worldScale = new Vector3();\n\n\tvar _mvPosition = new Vector3();\n\n\tvar _alignedPosition = new Vector2();\n\n\tvar _rotatedPosition = new Vector2();\n\n\tvar _viewWorldMatrix = new Matrix4();\n\n\tvar _vA$1 = new Vector3();\n\n\tvar _vB$1 = new Vector3();\n\n\tvar _vC$1 = new Vector3();\n\n\tvar _uvA$1 = new Vector2();\n\n\tvar _uvB$1 = new Vector2();\n\n\tvar _uvC$1 = new Vector2();\n\n\tfunction Sprite(material) {\n\t\tObject3D.call(this);\n\t\tthis.type = 'Sprite';\n\n\t\tif (_geometry === undefined) {\n\t\t\t_geometry = new BufferGeometry();\n\t\t\tvar float32Array = new Float32Array([-0.5, -0.5, 0, 0, 0, 0.5, -0.5, 0, 1, 0, 0.5, 0.5, 0, 1, 1, -0.5, 0.5, 0, 0, 1]);\n\t\t\tvar interleavedBuffer = new InterleavedBuffer(float32Array, 5);\n\n\t\t\t_geometry.setIndex([0, 1, 2, 0, 2, 3]);\n\n\t\t\t_geometry.setAttribute('position', new InterleavedBufferAttribute(interleavedBuffer, 3, 0, false));\n\n\t\t\t_geometry.setAttribute('uv', new InterleavedBufferAttribute(interleavedBuffer, 2, 3, false));\n\t\t}\n\n\t\tthis.geometry = _geometry;\n\t\tthis.material = material !== undefined ? material : new SpriteMaterial();\n\t\tthis.center = new Vector2(0.5, 0.5);\n\t}\n\n\tSprite.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Sprite,\n\t\tisSprite: true,\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tif (raycaster.camera === null) {\n\t\t\t\tconsole.error('THREE.Sprite: \"Raycaster.camera\" needs to be set in order to raycast against sprites.');\n\t\t\t}\n\n\t\t\t_worldScale.setFromMatrixScale(this.matrixWorld);\n\n\t\t\t_viewWorldMatrix.copy(raycaster.camera.matrixWorld);\n\n\t\t\tthis.modelViewMatrix.multiplyMatrices(raycaster.camera.matrixWorldInverse, this.matrixWorld);\n\n\t\t\t_mvPosition.setFromMatrixPosition(this.modelViewMatrix);\n\n\t\t\tif (raycaster.camera.isPerspectiveCamera && this.material.sizeAttenuation === false) {\n\t\t\t\t_worldScale.multiplyScalar(-_mvPosition.z);\n\t\t\t}\n\n\t\t\tvar rotation = this.material.rotation;\n\t\t\tvar sin, cos;\n\n\t\t\tif (rotation !== 0) {\n\t\t\t\tcos = Math.cos(rotation);\n\t\t\t\tsin = Math.sin(rotation);\n\t\t\t}\n\n\t\t\tvar center = this.center;\n\t\t\ttransformVertex(_vA$1.set(-0.5, -0.5, 0), _mvPosition, center, _worldScale, sin, cos);\n\t\t\ttransformVertex(_vB$1.set(0.5, -0.5, 0), _mvPosition, center, _worldScale, sin, cos);\n\t\t\ttransformVertex(_vC$1.set(0.5, 0.5, 0), _mvPosition, center, _worldScale, sin, cos);\n\n\t\t\t_uvA$1.set(0, 0);\n\n\t\t\t_uvB$1.set(1, 0);\n\n\t\t\t_uvC$1.set(1, 1); // check first triangle\n\n\n\t\t\tvar intersect = raycaster.ray.intersectTriangle(_vA$1, _vB$1, _vC$1, false, _intersectPoint);\n\n\t\t\tif (intersect === null) {\n\t\t\t\t// check second triangle\n\t\t\t\ttransformVertex(_vB$1.set(-0.5, 0.5, 0), _mvPosition, center, _worldScale, sin, cos);\n\n\t\t\t\t_uvB$1.set(0, 1);\n\n\t\t\t\tintersect = raycaster.ray.intersectTriangle(_vA$1, _vC$1, _vB$1, false, _intersectPoint);\n\n\t\t\t\tif (intersect === null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar distance = raycaster.ray.origin.distanceTo(_intersectPoint);\n\t\t\tif (distance < raycaster.near || distance > raycaster.far) return;\n\t\t\tintersects.push({\n\t\t\t\tdistance: distance,\n\t\t\t\tpoint: _intersectPoint.clone(),\n\t\t\t\tuv: Triangle.getUV(_intersectPoint, _vA$1, _vB$1, _vC$1, _uvA$1, _uvB$1, _uvC$1, new Vector2()),\n\t\t\t\tface: null,\n\t\t\t\tobject: this\n\t\t\t});\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\t\t\tif (source.center !== undefined) this.center.copy(source.center);\n\t\t\tthis.material = source.material;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction transformVertex(vertexPosition, mvPosition, center, scale, sin, cos) {\n\t\t// compute position in camera space\n\t\t_alignedPosition.subVectors(vertexPosition, center).addScalar(0.5).multiply(scale); // to check if rotation is not zero\n\n\n\t\tif (sin !== undefined) {\n\t\t\t_rotatedPosition.x = cos * _alignedPosition.x - sin * _alignedPosition.y;\n\t\t\t_rotatedPosition.y = sin * _alignedPosition.x + cos * _alignedPosition.y;\n\t\t} else {\n\t\t\t_rotatedPosition.copy(_alignedPosition);\n\t\t}\n\n\t\tvertexPosition.copy(mvPosition);\n\t\tvertexPosition.x += _rotatedPosition.x;\n\t\tvertexPosition.y += _rotatedPosition.y; // transform to world space\n\n\t\tvertexPosition.applyMatrix4(_viewWorldMatrix);\n\t}\n\n\tvar _v1$4 = new Vector3();\n\n\tvar _v2$2 = new Vector3();\n\n\tfunction LOD() {\n\t\tObject3D.call(this);\n\t\tthis._currentLevel = 0;\n\t\tthis.type = 'LOD';\n\t\tObject.defineProperties(this, {\n\t\t\tlevels: {\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: []\n\t\t\t}\n\t\t});\n\t\tthis.autoUpdate = true;\n\t}\n\n\tLOD.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: LOD,\n\t\tisLOD: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source, false);\n\t\t\tvar levels = source.levels;\n\n\t\t\tfor (var i = 0, l = levels.length; i < l; i++) {\n\t\t\t\tvar level = levels[i];\n\t\t\t\tthis.addLevel(level.object.clone(), level.distance);\n\t\t\t}\n\n\t\t\tthis.autoUpdate = source.autoUpdate;\n\t\t\treturn this;\n\t\t},\n\t\taddLevel: function addLevel(object, distance) {\n\t\t\tif (distance === void 0) {\n\t\t\t\tdistance = 0;\n\t\t\t}\n\n\t\t\tdistance = Math.abs(distance);\n\t\t\tvar levels = this.levels;\n\t\t\tvar l;\n\n\t\t\tfor (l = 0; l < levels.length; l++) {\n\t\t\t\tif (distance < levels[l].distance) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlevels.splice(l, 0, {\n\t\t\t\tdistance: distance,\n\t\t\t\tobject: object\n\t\t\t});\n\t\t\tthis.add(object);\n\t\t\treturn this;\n\t\t},\n\t\tgetCurrentLevel: function getCurrentLevel() {\n\t\t\treturn this._currentLevel;\n\t\t},\n\t\tgetObjectForDistance: function getObjectForDistance(distance) {\n\t\t\tvar levels = this.levels;\n\n\t\t\tif (levels.length > 0) {\n\t\t\t\tvar i, l;\n\n\t\t\t\tfor (i = 1, l = levels.length; i < l; i++) {\n\t\t\t\t\tif (distance < levels[i].distance) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn levels[i - 1].object;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar levels = this.levels;\n\n\t\t\tif (levels.length > 0) {\n\t\t\t\t_v1$4.setFromMatrixPosition(this.matrixWorld);\n\n\t\t\t\tvar distance = raycaster.ray.origin.distanceTo(_v1$4);\n\t\t\t\tthis.getObjectForDistance(distance).raycast(raycaster, intersects);\n\t\t\t}\n\t\t},\n\t\tupdate: function update(camera) {\n\t\t\tvar levels = this.levels;\n\n\t\t\tif (levels.length > 1) {\n\t\t\t\t_v1$4.setFromMatrixPosition(camera.matrixWorld);\n\n\t\t\t\t_v2$2.setFromMatrixPosition(this.matrixWorld);\n\n\t\t\t\tvar distance = _v1$4.distanceTo(_v2$2) / camera.zoom;\n\t\t\t\tlevels[0].object.visible = true;\n\t\t\t\tvar i, l;\n\n\t\t\t\tfor (i = 1, l = levels.length; i < l; i++) {\n\t\t\t\t\tif (distance >= levels[i].distance) {\n\t\t\t\t\t\tlevels[i - 1].object.visible = false;\n\t\t\t\t\t\tlevels[i].object.visible = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._currentLevel = i - 1;\n\n\t\t\t\tfor (; i < l; i++) {\n\t\t\t\t\tlevels[i].object.visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Object3D.prototype.toJSON.call(this, meta);\n\t\t\tif (this.autoUpdate === false) data.object.autoUpdate = false;\n\t\t\tdata.object.levels = [];\n\t\t\tvar levels = this.levels;\n\n\t\t\tfor (var i = 0, l = levels.length; i < l; i++) {\n\t\t\t\tvar level = levels[i];\n\t\t\t\tdata.object.levels.push({\n\t\t\t\t\tobject: level.object.uuid,\n\t\t\t\t\tdistance: level.distance\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tvar _basePosition = new Vector3();\n\n\tvar _skinIndex = new Vector4();\n\n\tvar _skinWeight = new Vector4();\n\n\tvar _vector$7 = new Vector3();\n\n\tvar _matrix$1 = new Matrix4();\n\n\tfunction SkinnedMesh(geometry, material) {\n\t\tif (geometry && geometry.isGeometry) {\n\t\t\tconsole.error('THREE.SkinnedMesh no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t}\n\n\t\tMesh.call(this, geometry, material);\n\t\tthis.type = 'SkinnedMesh';\n\t\tthis.bindMode = 'attached';\n\t\tthis.bindMatrix = new Matrix4();\n\t\tthis.bindMatrixInverse = new Matrix4();\n\t}\n\n\tSkinnedMesh.prototype = Object.assign(Object.create(Mesh.prototype), {\n\t\tconstructor: SkinnedMesh,\n\t\tisSkinnedMesh: true,\n\t\tcopy: function copy(source) {\n\t\t\tMesh.prototype.copy.call(this, source);\n\t\t\tthis.bindMode = source.bindMode;\n\t\t\tthis.bindMatrix.copy(source.bindMatrix);\n\t\t\tthis.bindMatrixInverse.copy(source.bindMatrixInverse);\n\t\t\tthis.skeleton = source.skeleton;\n\t\t\treturn this;\n\t\t},\n\t\tbind: function bind(skeleton, bindMatrix) {\n\t\t\tthis.skeleton = skeleton;\n\n\t\t\tif (bindMatrix === undefined) {\n\t\t\t\tthis.updateMatrixWorld(true);\n\t\t\t\tthis.skeleton.calculateInverses();\n\t\t\t\tbindMatrix = this.matrixWorld;\n\t\t\t}\n\n\t\t\tthis.bindMatrix.copy(bindMatrix);\n\t\t\tthis.bindMatrixInverse.copy(bindMatrix).invert();\n\t\t},\n\t\tpose: function pose() {\n\t\t\tthis.skeleton.pose();\n\t\t},\n\t\tnormalizeSkinWeights: function normalizeSkinWeights() {\n\t\t\tvar vector = new Vector4();\n\t\t\tvar skinWeight = this.geometry.attributes.skinWeight;\n\n\t\t\tfor (var i = 0, l = skinWeight.count; i < l; i++) {\n\t\t\t\tvector.x = skinWeight.getX(i);\n\t\t\t\tvector.y = skinWeight.getY(i);\n\t\t\t\tvector.z = skinWeight.getZ(i);\n\t\t\t\tvector.w = skinWeight.getW(i);\n\t\t\t\tvar scale = 1.0 / vector.manhattanLength();\n\n\t\t\t\tif (scale !== Infinity) {\n\t\t\t\t\tvector.multiplyScalar(scale);\n\t\t\t\t} else {\n\t\t\t\t\tvector.set(1, 0, 0, 0); // do something reasonable\n\t\t\t\t}\n\n\t\t\t\tskinWeight.setXYZW(i, vector.x, vector.y, vector.z, vector.w);\n\t\t\t}\n\t\t},\n\t\tupdateMatrixWorld: function updateMatrixWorld(force) {\n\t\t\tMesh.prototype.updateMatrixWorld.call(this, force);\n\n\t\t\tif (this.bindMode === 'attached') {\n\t\t\t\tthis.bindMatrixInverse.copy(this.matrixWorld).invert();\n\t\t\t} else if (this.bindMode === 'detached') {\n\t\t\t\tthis.bindMatrixInverse.copy(this.bindMatrix).invert();\n\t\t\t} else {\n\t\t\t\tconsole.warn('THREE.SkinnedMesh: Unrecognized bindMode: ' + this.bindMode);\n\t\t\t}\n\t\t},\n\t\tboneTransform: function boneTransform(index, target) {\n\t\t\tvar skeleton = this.skeleton;\n\t\t\tvar geometry = this.geometry;\n\n\t\t\t_skinIndex.fromBufferAttribute(geometry.attributes.skinIndex, index);\n\n\t\t\t_skinWeight.fromBufferAttribute(geometry.attributes.skinWeight, index);\n\n\t\t\t_basePosition.fromBufferAttribute(geometry.attributes.position, index).applyMatrix4(this.bindMatrix);\n\n\t\t\ttarget.set(0, 0, 0);\n\n\t\t\tfor (var i = 0; i < 4; i++) {\n\t\t\t\tvar weight = _skinWeight.getComponent(i);\n\n\t\t\t\tif (weight !== 0) {\n\t\t\t\t\tvar boneIndex = _skinIndex.getComponent(i);\n\n\t\t\t\t\t_matrix$1.multiplyMatrices(skeleton.bones[boneIndex].matrixWorld, skeleton.boneInverses[boneIndex]);\n\n\t\t\t\t\ttarget.addScaledVector(_vector$7.copy(_basePosition).applyMatrix4(_matrix$1), weight);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn target.applyMatrix4(this.bindMatrixInverse);\n\t\t}\n\t});\n\n\tfunction Bone() {\n\t\tObject3D.call(this);\n\t\tthis.type = 'Bone';\n\t}\n\n\tBone.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Bone,\n\t\tisBone: true\n\t});\n\n\tvar _offsetMatrix = new Matrix4();\n\n\tvar _identityMatrix = new Matrix4();\n\n\tfunction Skeleton(bones, boneInverses) {\n\t\tif (bones === void 0) {\n\t\t\tbones = [];\n\t\t}\n\n\t\tif (boneInverses === void 0) {\n\t\t\tboneInverses = [];\n\t\t}\n\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.bones = bones.slice(0);\n\t\tthis.boneInverses = boneInverses;\n\t\tthis.boneMatrices = null;\n\t\tthis.boneTexture = null;\n\t\tthis.boneTextureSize = 0;\n\t\tthis.frame = -1;\n\t\tthis.init();\n\t}\n\n\tObject.assign(Skeleton.prototype, {\n\t\tinit: function init() {\n\t\t\tvar bones = this.bones;\n\t\t\tvar boneInverses = this.boneInverses;\n\t\t\tthis.boneMatrices = new Float32Array(bones.length * 16); // calculate inverse bone matrices if necessary\n\n\t\t\tif (boneInverses.length === 0) {\n\t\t\t\tthis.calculateInverses();\n\t\t\t} else {\n\t\t\t\t// handle special case\n\t\t\t\tif (bones.length !== boneInverses.length) {\n\t\t\t\t\tconsole.warn('THREE.Skeleton: Number of inverse bone matrices does not match amount of bones.');\n\t\t\t\t\tthis.boneInverses = [];\n\n\t\t\t\t\tfor (var i = 0, il = this.bones.length; i < il; i++) {\n\t\t\t\t\t\tthis.boneInverses.push(new Matrix4());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcalculateInverses: function calculateInverses() {\n\t\t\tthis.boneInverses.length = 0;\n\n\t\t\tfor (var i = 0, il = this.bones.length; i < il; i++) {\n\t\t\t\tvar inverse = new Matrix4();\n\n\t\t\t\tif (this.bones[i]) {\n\t\t\t\t\tinverse.copy(this.bones[i].matrixWorld).invert();\n\t\t\t\t}\n\n\t\t\t\tthis.boneInverses.push(inverse);\n\t\t\t}\n\t\t},\n\t\tpose: function pose() {\n\t\t\t// recover the bind-time world matrices\n\t\t\tfor (var i = 0, il = this.bones.length; i < il; i++) {\n\t\t\t\tvar bone = this.bones[i];\n\n\t\t\t\tif (bone) {\n\t\t\t\t\tbone.matrixWorld.copy(this.boneInverses[i]).invert();\n\t\t\t\t}\n\t\t\t} // compute the local matrices, positions, rotations and scales\n\n\n\t\t\tfor (var _i = 0, _il = this.bones.length; _i < _il; _i++) {\n\t\t\t\tvar _bone = this.bones[_i];\n\n\t\t\t\tif (_bone) {\n\t\t\t\t\tif (_bone.parent && _bone.parent.isBone) {\n\t\t\t\t\t\t_bone.matrix.copy(_bone.parent.matrixWorld).invert();\n\n\t\t\t\t\t\t_bone.matrix.multiply(_bone.matrixWorld);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t_bone.matrix.copy(_bone.matrixWorld);\n\t\t\t\t\t}\n\n\t\t\t\t\t_bone.matrix.decompose(_bone.position, _bone.quaternion, _bone.scale);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tupdate: function update() {\n\t\t\tvar bones = this.bones;\n\t\t\tvar boneInverses = this.boneInverses;\n\t\t\tvar boneMatrices = this.boneMatrices;\n\t\t\tvar boneTexture = this.boneTexture; // flatten bone matrices to array\n\n\t\t\tfor (var i = 0, il = bones.length; i < il; i++) {\n\t\t\t\t// compute the offset between the current and the original transform\n\t\t\t\tvar matrix = bones[i] ? bones[i].matrixWorld : _identityMatrix;\n\n\t\t\t\t_offsetMatrix.multiplyMatrices(matrix, boneInverses[i]);\n\n\t\t\t\t_offsetMatrix.toArray(boneMatrices, i * 16);\n\t\t\t}\n\n\t\t\tif (boneTexture !== null) {\n\t\t\t\tboneTexture.needsUpdate = true;\n\t\t\t}\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new Skeleton(this.bones, this.boneInverses);\n\t\t},\n\t\tgetBoneByName: function getBoneByName(name) {\n\t\t\tfor (var i = 0, il = this.bones.length; i < il; i++) {\n\t\t\t\tvar bone = this.bones[i];\n\n\t\t\t\tif (bone.name === name) {\n\t\t\t\t\treturn bone;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t},\n\t\tdispose: function dispose() {\n\t\t\tif (this.boneTexture !== null) {\n\t\t\t\tthis.boneTexture.dispose();\n\t\t\t\tthis.boneTexture = null;\n\t\t\t}\n\t\t},\n\t\tfromJSON: function fromJSON(json, bones) {\n\t\t\tthis.uuid = json.uuid;\n\n\t\t\tfor (var i = 0, l = json.bones.length; i < l; i++) {\n\t\t\t\tvar uuid = json.bones[i];\n\t\t\t\tvar bone = bones[uuid];\n\n\t\t\t\tif (bone === undefined) {\n\t\t\t\t\tconsole.warn('THREE.Skeleton: No bone found with UUID:', uuid);\n\t\t\t\t\tbone = new Bone();\n\t\t\t\t}\n\n\t\t\t\tthis.bones.push(bone);\n\t\t\t\tthis.boneInverses.push(new Matrix4().fromArray(json.boneInverses[i]));\n\t\t\t}\n\n\t\t\tthis.init();\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Skeleton',\n\t\t\t\t\tgenerator: 'Skeleton.toJSON'\n\t\t\t\t},\n\t\t\t\tbones: [],\n\t\t\t\tboneInverses: []\n\t\t\t};\n\t\t\tdata.uuid = this.uuid;\n\t\t\tvar bones = this.bones;\n\t\t\tvar boneInverses = this.boneInverses;\n\n\t\t\tfor (var i = 0, l = bones.length; i < l; i++) {\n\t\t\t\tvar bone = bones[i];\n\t\t\t\tdata.bones.push(bone.uuid);\n\t\t\t\tvar boneInverse = boneInverses[i];\n\t\t\t\tdata.boneInverses.push(boneInverse.toArray());\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tvar _instanceLocalMatrix = new Matrix4();\n\n\tvar _instanceWorldMatrix = new Matrix4();\n\n\tvar _instanceIntersects = [];\n\n\tvar _mesh = new Mesh();\n\n\tfunction InstancedMesh(geometry, material, count) {\n\t\tMesh.call(this, geometry, material);\n\t\tthis.instanceMatrix = new BufferAttribute(new Float32Array(count * 16), 16);\n\t\tthis.instanceColor = null;\n\t\tthis.count = count;\n\t\tthis.frustumCulled = false;\n\t}\n\n\tInstancedMesh.prototype = Object.assign(Object.create(Mesh.prototype), {\n\t\tconstructor: InstancedMesh,\n\t\tisInstancedMesh: true,\n\t\tcopy: function copy(source) {\n\t\t\tMesh.prototype.copy.call(this, source);\n\t\t\tthis.instanceMatrix.copy(source.instanceMatrix);\n\t\t\tif (source.instanceColor !== null) this.instanceColor = source.instanceColor.clone();\n\t\t\tthis.count = source.count;\n\t\t\treturn this;\n\t\t},\n\t\tgetColorAt: function getColorAt(index, color) {\n\t\t\tcolor.fromArray(this.instanceColor.array, index * 3);\n\t\t},\n\t\tgetMatrixAt: function getMatrixAt(index, matrix) {\n\t\t\tmatrix.fromArray(this.instanceMatrix.array, index * 16);\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar matrixWorld = this.matrixWorld;\n\t\t\tvar raycastTimes = this.count;\n\t\t\t_mesh.geometry = this.geometry;\n\t\t\t_mesh.material = this.material;\n\t\t\tif (_mesh.material === undefined) return;\n\n\t\t\tfor (var instanceId = 0; instanceId < raycastTimes; instanceId++) {\n\t\t\t\t// calculate the world matrix for each instance\n\t\t\t\tthis.getMatrixAt(instanceId, _instanceLocalMatrix);\n\n\t\t\t\t_instanceWorldMatrix.multiplyMatrices(matrixWorld, _instanceLocalMatrix); // the mesh represents this single instance\n\n\n\t\t\t\t_mesh.matrixWorld = _instanceWorldMatrix;\n\n\t\t\t\t_mesh.raycast(raycaster, _instanceIntersects); // process the result of raycast\n\n\n\t\t\t\tfor (var i = 0, l = _instanceIntersects.length; i < l; i++) {\n\t\t\t\t\tvar intersect = _instanceIntersects[i];\n\t\t\t\t\tintersect.instanceId = instanceId;\n\t\t\t\t\tintersect.object = this;\n\t\t\t\t\tintersects.push(intersect);\n\t\t\t\t}\n\n\t\t\t\t_instanceIntersects.length = 0;\n\t\t\t}\n\t\t},\n\t\tsetColorAt: function setColorAt(index, color) {\n\t\t\tif (this.instanceColor === null) {\n\t\t\t\tthis.instanceColor = new BufferAttribute(new Float32Array(this.count * 3), 3);\n\t\t\t}\n\n\t\t\tcolor.toArray(this.instanceColor.array, index * 3);\n\t\t},\n\t\tsetMatrixAt: function setMatrixAt(index, matrix) {\n\t\t\tmatrix.toArray(this.instanceMatrix.array, index * 16);\n\t\t},\n\t\tupdateMorphTargets: function updateMorphTargets() {},\n\t\tdispose: function dispose() {\n\t\t\tthis.dispatchEvent({\n\t\t\t\ttype: 'dispose'\n\t\t\t});\n\t\t}\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\n\t *\tlinewidth: <float>,\n\t *\tlinecap: \"round\",\n\t *\tlinejoin: \"round\"\n\t * }\n\t */\n\n\tfunction LineBasicMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'LineBasicMaterial';\n\t\tthis.color = new Color(0xffffff);\n\t\tthis.linewidth = 1;\n\t\tthis.linecap = 'round';\n\t\tthis.linejoin = 'round';\n\t\tthis.morphTargets = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tLineBasicMaterial.prototype = Object.create(Material.prototype);\n\tLineBasicMaterial.prototype.constructor = LineBasicMaterial;\n\tLineBasicMaterial.prototype.isLineBasicMaterial = true;\n\n\tLineBasicMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.linewidth = source.linewidth;\n\t\tthis.linecap = source.linecap;\n\t\tthis.linejoin = source.linejoin;\n\t\tthis.morphTargets = source.morphTargets;\n\t\treturn this;\n\t};\n\n\tvar _start = new Vector3();\n\n\tvar _end = new Vector3();\n\n\tvar _inverseMatrix$1 = new Matrix4();\n\n\tvar _ray$1 = new Ray();\n\n\tvar _sphere$2 = new Sphere();\n\n\tfunction Line(geometry, material) {\n\t\tif (geometry === void 0) {\n\t\t\tgeometry = new BufferGeometry();\n\t\t}\n\n\t\tif (material === void 0) {\n\t\t\tmaterial = new LineBasicMaterial();\n\t\t}\n\n\t\tObject3D.call(this);\n\t\tthis.type = 'Line';\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\t\tthis.updateMorphTargets();\n\t}\n\n\tLine.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Line,\n\t\tisLine: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\t\t\tthis.material = source.material;\n\t\t\tthis.geometry = source.geometry;\n\t\t\treturn this;\n\t\t},\n\t\tcomputeLineDistances: function computeLineDistances() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\t// we assume non-indexed geometry\n\t\t\t\tif (geometry.index === null) {\n\t\t\t\t\tvar positionAttribute = geometry.attributes.position;\n\t\t\t\t\tvar lineDistances = [0];\n\n\t\t\t\t\tfor (var i = 1, l = positionAttribute.count; i < l; i++) {\n\t\t\t\t\t\t_start.fromBufferAttribute(positionAttribute, i - 1);\n\n\t\t\t\t\t\t_end.fromBufferAttribute(positionAttribute, i);\n\n\t\t\t\t\t\tlineDistances[i] = lineDistances[i - 1];\n\t\t\t\t\t\tlineDistances[i] += _start.distanceTo(_end);\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.setAttribute('lineDistance', new Float32BufferAttribute(lineDistances, 1));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.warn('THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.');\n\t\t\t\t}\n\t\t\t} else if (geometry.isGeometry) {\n\t\t\t\tconsole.error('THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar matrixWorld = this.matrixWorld;\n\t\t\tvar threshold = raycaster.params.Line.threshold; // Checking boundingSphere distance to ray\n\n\t\t\tif (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n\n\t\t\t_sphere$2.copy(geometry.boundingSphere);\n\n\t\t\t_sphere$2.applyMatrix4(matrixWorld);\n\n\t\t\t_sphere$2.radius += threshold;\n\t\t\tif (raycaster.ray.intersectsSphere(_sphere$2) === false) return; //\n\n\t\t\t_inverseMatrix$1.copy(matrixWorld).invert();\n\n\t\t\t_ray$1.copy(raycaster.ray).applyMatrix4(_inverseMatrix$1);\n\n\t\t\tvar localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3);\n\t\t\tvar localThresholdSq = localThreshold * localThreshold;\n\t\t\tvar vStart = new Vector3();\n\t\t\tvar vEnd = new Vector3();\n\t\t\tvar interSegment = new Vector3();\n\t\t\tvar interRay = new Vector3();\n\t\t\tvar step = this.isLineSegments ? 2 : 1;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar index = geometry.index;\n\t\t\t\tvar attributes = geometry.attributes;\n\t\t\t\tvar positionAttribute = attributes.position;\n\n\t\t\t\tif (index !== null) {\n\t\t\t\t\tvar indices = index.array;\n\n\t\t\t\t\tfor (var i = 0, l = indices.length - 1; i < l; i += step) {\n\t\t\t\t\t\tvar a = indices[i];\n\t\t\t\t\t\tvar b = indices[i + 1];\n\t\t\t\t\t\tvStart.fromBufferAttribute(positionAttribute, a);\n\t\t\t\t\t\tvEnd.fromBufferAttribute(positionAttribute, b);\n\n\t\t\t\t\t\tvar distSq = _ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment);\n\n\t\t\t\t\t\tif (distSq > localThresholdSq) continue;\n\t\t\t\t\t\tinterRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation\n\n\t\t\t\t\t\tvar distance = raycaster.ray.origin.distanceTo(interRay);\n\t\t\t\t\t\tif (distance < raycaster.near || distance > raycaster.far) continue;\n\t\t\t\t\t\tintersects.push({\n\t\t\t\t\t\t\tdistance: distance,\n\t\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4(this.matrixWorld),\n\t\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\t\tface: null,\n\t\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\t\tobject: this\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (var _i = 0, _l = positionAttribute.count - 1; _i < _l; _i += step) {\n\t\t\t\t\t\tvStart.fromBufferAttribute(positionAttribute, _i);\n\t\t\t\t\t\tvEnd.fromBufferAttribute(positionAttribute, _i + 1);\n\n\t\t\t\t\t\tvar _distSq = _ray$1.distanceSqToSegment(vStart, vEnd, interRay, interSegment);\n\n\t\t\t\t\t\tif (_distSq > localThresholdSq) continue;\n\t\t\t\t\t\tinterRay.applyMatrix4(this.matrixWorld); //Move back to world space for distance calculation\n\n\t\t\t\t\t\tvar _distance = raycaster.ray.origin.distanceTo(interRay);\n\n\t\t\t\t\t\tif (_distance < raycaster.near || _distance > raycaster.far) continue;\n\t\t\t\t\t\tintersects.push({\n\t\t\t\t\t\t\tdistance: _distance,\n\t\t\t\t\t\t\t// What do we want? intersection point on the ray or on the segment??\n\t\t\t\t\t\t\t// point: raycaster.ray.at( distance ),\n\t\t\t\t\t\t\tpoint: interSegment.clone().applyMatrix4(this.matrixWorld),\n\t\t\t\t\t\t\tindex: _i,\n\t\t\t\t\t\t\tface: null,\n\t\t\t\t\t\t\tfaceIndex: null,\n\t\t\t\t\t\t\tobject: this\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (geometry.isGeometry) {\n\t\t\t\tconsole.error('THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\t\t},\n\t\tupdateMorphTargets: function updateMorphTargets() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar morphAttributes = geometry.morphAttributes;\n\t\t\t\tvar keys = Object.keys(morphAttributes);\n\n\t\t\t\tif (keys.length > 0) {\n\t\t\t\t\tvar morphAttribute = morphAttributes[keys[0]];\n\n\t\t\t\t\tif (morphAttribute !== undefined) {\n\t\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\t\tfor (var m = 0, ml = morphAttribute.length; m < ml; m++) {\n\t\t\t\t\t\t\tvar name = morphAttribute[m].name || String(m);\n\t\t\t\t\t\t\tthis.morphTargetInfluences.push(0);\n\t\t\t\t\t\t\tthis.morphTargetDictionary[name] = m;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar morphTargets = geometry.morphTargets;\n\n\t\t\t\tif (morphTargets !== undefined && morphTargets.length > 0) {\n\t\t\t\t\tconsole.error('THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tvar _start$1 = new Vector3();\n\n\tvar _end$1 = new Vector3();\n\n\tfunction LineSegments(geometry, material) {\n\t\tLine.call(this, geometry, material);\n\t\tthis.type = 'LineSegments';\n\t}\n\n\tLineSegments.prototype = Object.assign(Object.create(Line.prototype), {\n\t\tconstructor: LineSegments,\n\t\tisLineSegments: true,\n\t\tcomputeLineDistances: function computeLineDistances() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\t// we assume non-indexed geometry\n\t\t\t\tif (geometry.index === null) {\n\t\t\t\t\tvar positionAttribute = geometry.attributes.position;\n\t\t\t\t\tvar lineDistances = [];\n\n\t\t\t\t\tfor (var i = 0, l = positionAttribute.count; i < l; i += 2) {\n\t\t\t\t\t\t_start$1.fromBufferAttribute(positionAttribute, i);\n\n\t\t\t\t\t\t_end$1.fromBufferAttribute(positionAttribute, i + 1);\n\n\t\t\t\t\t\tlineDistances[i] = i === 0 ? 0 : lineDistances[i - 1];\n\t\t\t\t\t\tlineDistances[i + 1] = lineDistances[i] + _start$1.distanceTo(_end$1);\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.setAttribute('lineDistance', new Float32BufferAttribute(lineDistances, 1));\n\t\t\t\t} else {\n\t\t\t\t\tconsole.warn('THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.');\n\t\t\t\t}\n\t\t\t} else if (geometry.isGeometry) {\n\t\t\t\tconsole.error('THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction LineLoop(geometry, material) {\n\t\tLine.call(this, geometry, material);\n\t\tthis.type = 'LineLoop';\n\t}\n\n\tLineLoop.prototype = Object.assign(Object.create(Line.prototype), {\n\t\tconstructor: LineLoop,\n\t\tisLineLoop: true\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tsize: <float>,\n\t *\tsizeAttenuation: <bool>\n\t *\n\t *\tmorphTargets: <bool>\n\t * }\n\t */\n\n\tfunction PointsMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'PointsMaterial';\n\t\tthis.color = new Color(0xffffff);\n\t\tthis.map = null;\n\t\tthis.alphaMap = null;\n\t\tthis.size = 1;\n\t\tthis.sizeAttenuation = true;\n\t\tthis.morphTargets = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tPointsMaterial.prototype = Object.create(Material.prototype);\n\tPointsMaterial.prototype.constructor = PointsMaterial;\n\tPointsMaterial.prototype.isPointsMaterial = true;\n\n\tPointsMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.size = source.size;\n\t\tthis.sizeAttenuation = source.sizeAttenuation;\n\t\tthis.morphTargets = source.morphTargets;\n\t\treturn this;\n\t};\n\n\tvar _inverseMatrix$2 = new Matrix4();\n\n\tvar _ray$2 = new Ray();\n\n\tvar _sphere$3 = new Sphere();\n\n\tvar _position$1 = new Vector3();\n\n\tfunction Points(geometry, material) {\n\t\tif (geometry === void 0) {\n\t\t\tgeometry = new BufferGeometry();\n\t\t}\n\n\t\tif (material === void 0) {\n\t\t\tmaterial = new PointsMaterial();\n\t\t}\n\n\t\tObject3D.call(this);\n\t\tthis.type = 'Points';\n\t\tthis.geometry = geometry;\n\t\tthis.material = material;\n\t\tthis.updateMorphTargets();\n\t}\n\n\tPoints.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Points,\n\t\tisPoints: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\t\t\tthis.material = source.material;\n\t\t\tthis.geometry = source.geometry;\n\t\t\treturn this;\n\t\t},\n\t\traycast: function raycast(raycaster, intersects) {\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar matrixWorld = this.matrixWorld;\n\t\t\tvar threshold = raycaster.params.Points.threshold; // Checking boundingSphere distance to ray\n\n\t\t\tif (geometry.boundingSphere === null) geometry.computeBoundingSphere();\n\n\t\t\t_sphere$3.copy(geometry.boundingSphere);\n\n\t\t\t_sphere$3.applyMatrix4(matrixWorld);\n\n\t\t\t_sphere$3.radius += threshold;\n\t\t\tif (raycaster.ray.intersectsSphere(_sphere$3) === false) return; //\n\n\t\t\t_inverseMatrix$2.copy(matrixWorld).invert();\n\n\t\t\t_ray$2.copy(raycaster.ray).applyMatrix4(_inverseMatrix$2);\n\n\t\t\tvar localThreshold = threshold / ((this.scale.x + this.scale.y + this.scale.z) / 3);\n\t\t\tvar localThresholdSq = localThreshold * localThreshold;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar index = geometry.index;\n\t\t\t\tvar attributes = geometry.attributes;\n\t\t\t\tvar positionAttribute = attributes.position;\n\n\t\t\t\tif (index !== null) {\n\t\t\t\t\tvar indices = index.array;\n\n\t\t\t\t\tfor (var i = 0, il = indices.length; i < il; i++) {\n\t\t\t\t\t\tvar a = indices[i];\n\n\t\t\t\t\t\t_position$1.fromBufferAttribute(positionAttribute, a);\n\n\t\t\t\t\t\ttestPoint(_position$1, a, localThresholdSq, matrixWorld, raycaster, intersects, this);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (var _i = 0, l = positionAttribute.count; _i < l; _i++) {\n\t\t\t\t\t\t_position$1.fromBufferAttribute(positionAttribute, _i);\n\n\t\t\t\t\t\ttestPoint(_position$1, _i, localThresholdSq, matrixWorld, raycaster, intersects, this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error('THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t}\n\t\t},\n\t\tupdateMorphTargets: function updateMorphTargets() {\n\t\t\tvar geometry = this.geometry;\n\n\t\t\tif (geometry.isBufferGeometry) {\n\t\t\t\tvar morphAttributes = geometry.morphAttributes;\n\t\t\t\tvar keys = Object.keys(morphAttributes);\n\n\t\t\t\tif (keys.length > 0) {\n\t\t\t\t\tvar morphAttribute = morphAttributes[keys[0]];\n\n\t\t\t\t\tif (morphAttribute !== undefined) {\n\t\t\t\t\t\tthis.morphTargetInfluences = [];\n\t\t\t\t\t\tthis.morphTargetDictionary = {};\n\n\t\t\t\t\t\tfor (var m = 0, ml = morphAttribute.length; m < ml; m++) {\n\t\t\t\t\t\t\tvar name = morphAttribute[m].name || String(m);\n\t\t\t\t\t\t\tthis.morphTargetInfluences.push(0);\n\t\t\t\t\t\t\tthis.morphTargetDictionary[name] = m;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar morphTargets = geometry.morphTargets;\n\n\t\t\t\tif (morphTargets !== undefined && morphTargets.length > 0) {\n\t\t\t\t\tconsole.error('THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction testPoint(point, index, localThresholdSq, matrixWorld, raycaster, intersects, object) {\n\t\tvar rayPointDistanceSq = _ray$2.distanceSqToPoint(point);\n\n\t\tif (rayPointDistanceSq < localThresholdSq) {\n\t\t\tvar intersectPoint = new Vector3();\n\n\t\t\t_ray$2.closestPointToPoint(point, intersectPoint);\n\n\t\t\tintersectPoint.applyMatrix4(matrixWorld);\n\t\t\tvar distance = raycaster.ray.origin.distanceTo(intersectPoint);\n\t\t\tif (distance < raycaster.near || distance > raycaster.far) return;\n\t\t\tintersects.push({\n\t\t\t\tdistance: distance,\n\t\t\t\tdistanceToRay: Math.sqrt(rayPointDistanceSq),\n\t\t\t\tpoint: intersectPoint,\n\t\t\t\tindex: index,\n\t\t\t\tface: null,\n\t\t\t\tobject: object\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction VideoTexture(video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy) {\n\t\tTexture.call(this, video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n\t\tthis.format = format !== undefined ? format : RGBFormat;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : LinearFilter;\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : LinearFilter;\n\t\tthis.generateMipmaps = false;\n\t\tvar scope = this;\n\n\t\tfunction updateVideo() {\n\t\t\tscope.needsUpdate = true;\n\t\t\tvideo.requestVideoFrameCallback(updateVideo);\n\t\t}\n\n\t\tif ('requestVideoFrameCallback' in video) {\n\t\t\tvideo.requestVideoFrameCallback(updateVideo);\n\t\t}\n\t}\n\n\tVideoTexture.prototype = Object.assign(Object.create(Texture.prototype), {\n\t\tconstructor: VideoTexture,\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor(this.image).copy(this);\n\t\t},\n\t\tisVideoTexture: true,\n\t\tupdate: function update() {\n\t\t\tvar video = this.image;\n\t\t\tvar hasVideoFrameCallback = ('requestVideoFrameCallback' in video);\n\n\t\t\tif (hasVideoFrameCallback === false && video.readyState >= video.HAVE_CURRENT_DATA) {\n\t\t\t\tthis.needsUpdate = true;\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction CompressedTexture(mipmaps, width, height, format, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, encoding) {\n\t\tTexture.call(this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy, encoding);\n\t\tthis.image = {\n\t\t\twidth: width,\n\t\t\theight: height\n\t\t};\n\t\tthis.mipmaps = mipmaps; // no flipping for cube textures\n\t\t// (also flipping doesn't work for compressed textures )\n\n\t\tthis.flipY = false; // can't generate mipmaps for compressed textures\n\t\t// mips must be embedded in DDS files\n\n\t\tthis.generateMipmaps = false;\n\t}\n\n\tCompressedTexture.prototype = Object.create(Texture.prototype);\n\tCompressedTexture.prototype.constructor = CompressedTexture;\n\tCompressedTexture.prototype.isCompressedTexture = true;\n\n\tfunction CanvasTexture(canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy) {\n\t\tTexture.call(this, canvas, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n\t\tthis.needsUpdate = true;\n\t}\n\n\tCanvasTexture.prototype = Object.create(Texture.prototype);\n\tCanvasTexture.prototype.constructor = CanvasTexture;\n\tCanvasTexture.prototype.isCanvasTexture = true;\n\n\tfunction DepthTexture(width, height, type, mapping, wrapS, wrapT, magFilter, minFilter, anisotropy, format) {\n\t\tformat = format !== undefined ? format : DepthFormat;\n\n\t\tif (format !== DepthFormat && format !== DepthStencilFormat) {\n\t\t\tthrow new Error('DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat');\n\t\t}\n\n\t\tif (type === undefined && format === DepthFormat) type = UnsignedShortType;\n\t\tif (type === undefined && format === DepthStencilFormat) type = UnsignedInt248Type;\n\t\tTexture.call(this, null, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy);\n\t\tthis.image = {\n\t\t\twidth: width,\n\t\t\theight: height\n\t\t};\n\t\tthis.magFilter = magFilter !== undefined ? magFilter : NearestFilter;\n\t\tthis.minFilter = minFilter !== undefined ? minFilter : NearestFilter;\n\t\tthis.flipY = false;\n\t\tthis.generateMipmaps = false;\n\t}\n\n\tDepthTexture.prototype = Object.create(Texture.prototype);\n\tDepthTexture.prototype.constructor = DepthTexture;\n\tDepthTexture.prototype.isDepthTexture = true;\n\n\tvar CircleGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(CircleGeometry, _BufferGeometry);\n\n\t\tfunction CircleGeometry(radius, segments, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (segments === void 0) {\n\t\t\t\tsegments = 8;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'CircleGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tsegments: segments,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\t\t\tsegments = Math.max(3, segments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar uv = new Vector2(); // center point\n\n\t\t\tvertices.push(0, 0, 0);\n\t\t\tnormals.push(0, 0, 1);\n\t\t\tuvs.push(0.5, 0.5);\n\n\t\t\tfor (var s = 0, i = 3; s <= segments; s++, i += 3) {\n\t\t\t\tvar segment = thetaStart + s / segments * thetaLength; // vertex\n\n\t\t\t\tvertex.x = radius * Math.cos(segment);\n\t\t\t\tvertex.y = radius * Math.sin(segment);\n\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\tnormals.push(0, 0, 1); // uvs\n\n\t\t\t\tuv.x = (vertices[i] / radius + 1) / 2;\n\t\t\t\tuv.y = (vertices[i + 1] / radius + 1) / 2;\n\t\t\t\tuvs.push(uv.x, uv.y);\n\t\t\t} // indices\n\n\n\t\t\tfor (var _i = 1; _i <= segments; _i++) {\n\t\t\t\tindices.push(_i, _i + 1, 0);\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn CircleGeometry;\n\t}(BufferGeometry);\n\n\tvar CylinderGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(CylinderGeometry, _BufferGeometry);\n\n\t\tfunction CylinderGeometry(radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (radiusTop === void 0) {\n\t\t\t\tradiusTop = 1;\n\t\t\t}\n\n\t\t\tif (radiusBottom === void 0) {\n\t\t\t\tradiusBottom = 1;\n\t\t\t}\n\n\t\t\tif (height === void 0) {\n\t\t\t\theight = 1;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 1;\n\t\t\t}\n\n\t\t\tif (openEnded === void 0) {\n\t\t\t\topenEnded = false;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'CylinderGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradiusTop: radiusTop,\n\t\t\t\tradiusBottom: radiusBottom,\n\t\t\t\theight: height,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\theightSegments: heightSegments,\n\t\t\t\topenEnded: openEnded,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\n\t\t\tvar scope = _assertThisInitialized(_this);\n\n\t\t\tradialSegments = Math.floor(radialSegments);\n\t\t\theightSegments = Math.floor(heightSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar index = 0;\n\t\t\tvar indexArray = [];\n\t\t\tvar halfHeight = height / 2;\n\t\t\tvar groupStart = 0; // generate geometry\n\n\t\t\tgenerateTorso();\n\n\t\t\tif (openEnded === false) {\n\t\t\t\tif (radiusTop > 0) generateCap(true);\n\t\t\t\tif (radiusBottom > 0) generateCap(false);\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\tfunction generateTorso() {\n\t\t\t\tvar normal = new Vector3();\n\t\t\t\tvar vertex = new Vector3();\n\t\t\t\tvar groupCount = 0; // this will be used to calculate the normal\n\n\t\t\t\tvar slope = (radiusBottom - radiusTop) / height; // generate vertices, normals and uvs\n\n\t\t\t\tfor (var y = 0; y <= heightSegments; y++) {\n\t\t\t\t\tvar indexRow = [];\n\t\t\t\t\tvar v = y / heightSegments; // calculate the radius of the current row\n\n\t\t\t\t\tvar radius = v * (radiusBottom - radiusTop) + radiusTop;\n\n\t\t\t\t\tfor (var x = 0; x <= radialSegments; x++) {\n\t\t\t\t\t\tvar u = x / radialSegments;\n\t\t\t\t\t\tvar theta = u * thetaLength + thetaStart;\n\t\t\t\t\t\tvar sinTheta = Math.sin(theta);\n\t\t\t\t\t\tvar cosTheta = Math.cos(theta); // vertex\n\n\t\t\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\t\t\tvertex.y = -v * height + halfHeight;\n\t\t\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\t\tnormal.set(sinTheta, slope, cosTheta).normalize();\n\t\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\t\t\tuvs.push(u, 1 - v); // save index of vertex in respective row\n\n\t\t\t\t\t\tindexRow.push(index++);\n\t\t\t\t\t} // now save vertices of the row in our index array\n\n\n\t\t\t\t\tindexArray.push(indexRow);\n\t\t\t\t} // generate indices\n\n\n\t\t\t\tfor (var _x = 0; _x < radialSegments; _x++) {\n\t\t\t\t\tfor (var _y = 0; _y < heightSegments; _y++) {\n\t\t\t\t\t\t// we use the index array to access the correct indices\n\t\t\t\t\t\tvar a = indexArray[_y][_x];\n\t\t\t\t\t\tvar b = indexArray[_y + 1][_x];\n\t\t\t\t\t\tvar c = indexArray[_y + 1][_x + 1];\n\t\t\t\t\t\tvar d = indexArray[_y][_x + 1]; // faces\n\n\t\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\t\tindices.push(b, c, d); // update group counter\n\n\t\t\t\t\t\tgroupCount += 6;\n\t\t\t\t\t}\n\t\t\t\t} // add a group to the geometry. this will ensure multi material support\n\n\n\t\t\t\tscope.addGroup(groupStart, groupCount, 0); // calculate new start value for groups\n\n\t\t\t\tgroupStart += groupCount;\n\t\t\t}\n\n\t\t\tfunction generateCap(top) {\n\t\t\t\t// save the index of the first center vertex\n\t\t\t\tvar centerIndexStart = index;\n\t\t\t\tvar uv = new Vector2();\n\t\t\t\tvar vertex = new Vector3();\n\t\t\t\tvar groupCount = 0;\n\t\t\t\tvar radius = top === true ? radiusTop : radiusBottom;\n\t\t\t\tvar sign = top === true ? 1 : -1; // first we generate the center vertex data of the cap.\n\t\t\t\t// because the geometry needs one set of uvs per face,\n\t\t\t\t// we must generate a center vertex per face/segment\n\n\t\t\t\tfor (var x = 1; x <= radialSegments; x++) {\n\t\t\t\t\t// vertex\n\t\t\t\t\tvertices.push(0, halfHeight * sign, 0); // normal\n\n\t\t\t\t\tnormals.push(0, sign, 0); // uv\n\n\t\t\t\t\tuvs.push(0.5, 0.5); // increase index\n\n\t\t\t\t\tindex++;\n\t\t\t\t} // save the index of the last center vertex\n\n\n\t\t\t\tvar centerIndexEnd = index; // now we generate the surrounding vertices, normals and uvs\n\n\t\t\t\tfor (var _x2 = 0; _x2 <= radialSegments; _x2++) {\n\t\t\t\t\tvar u = _x2 / radialSegments;\n\t\t\t\t\tvar theta = u * thetaLength + thetaStart;\n\t\t\t\t\tvar cosTheta = Math.cos(theta);\n\t\t\t\t\tvar sinTheta = Math.sin(theta); // vertex\n\n\t\t\t\t\tvertex.x = radius * sinTheta;\n\t\t\t\t\tvertex.y = halfHeight * sign;\n\t\t\t\t\tvertex.z = radius * cosTheta;\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\tnormals.push(0, sign, 0); // uv\n\n\t\t\t\t\tuv.x = cosTheta * 0.5 + 0.5;\n\t\t\t\t\tuv.y = sinTheta * 0.5 * sign + 0.5;\n\t\t\t\t\tuvs.push(uv.x, uv.y); // increase index\n\n\t\t\t\t\tindex++;\n\t\t\t\t} // generate indices\n\n\n\t\t\t\tfor (var _x3 = 0; _x3 < radialSegments; _x3++) {\n\t\t\t\t\tvar c = centerIndexStart + _x3;\n\t\t\t\t\tvar i = centerIndexEnd + _x3;\n\n\t\t\t\t\tif (top === true) {\n\t\t\t\t\t\t// face top\n\t\t\t\t\t\tindices.push(i, i + 1, c);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// face bottom\n\t\t\t\t\t\tindices.push(i + 1, i, c);\n\t\t\t\t\t}\n\n\t\t\t\t\tgroupCount += 3;\n\t\t\t\t} // add a group to the geometry. this will ensure multi material support\n\n\n\t\t\t\tscope.addGroup(groupStart, groupCount, top === true ? 1 : 2); // calculate new start value for groups\n\n\t\t\t\tgroupStart += groupCount;\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn CylinderGeometry;\n\t}(BufferGeometry);\n\n\tvar ConeGeometry = /*#__PURE__*/function (_CylinderGeometry) {\n\t\t_inheritsLoose(ConeGeometry, _CylinderGeometry);\n\n\t\tfunction ConeGeometry(radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (height === void 0) {\n\t\t\t\theight = 1;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 1;\n\t\t\t}\n\n\t\t\tif (openEnded === void 0) {\n\t\t\t\topenEnded = false;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _CylinderGeometry.call(this, 0, radius, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength) || this;\n\t\t\t_this.type = 'ConeGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\theight: height,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\theightSegments: heightSegments,\n\t\t\t\topenEnded: openEnded,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn ConeGeometry;\n\t}(CylinderGeometry);\n\n\tvar PolyhedronGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(PolyhedronGeometry, _BufferGeometry);\n\n\t\tfunction PolyhedronGeometry(vertices, indices, radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'PolyhedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tvertices: vertices,\n\t\t\t\tindices: indices,\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t}; // default buffer data\n\n\t\t\tvar vertexBuffer = [];\n\t\t\tvar uvBuffer = []; // the subdivision creates the vertex buffer data\n\n\t\t\tsubdivide(detail); // all vertices should lie on a conceptual sphere with a given radius\n\n\t\t\tapplyRadius(radius); // finally, create the uv data\n\n\t\t\tgenerateUVs(); // build non-indexed geometry\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertexBuffer, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(vertexBuffer.slice(), 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvBuffer, 2));\n\n\t\t\tif (detail === 0) {\n\t\t\t\t_this.computeVertexNormals(); // flat normals\n\n\t\t\t} else {\n\t\t\t\t_this.normalizeNormals(); // smooth normals\n\n\t\t\t} // helper functions\n\n\n\t\t\tfunction subdivide(detail) {\n\t\t\t\tvar a = new Vector3();\n\t\t\t\tvar b = new Vector3();\n\t\t\t\tvar c = new Vector3(); // iterate over all faces and apply a subdivison with the given detail value\n\n\t\t\t\tfor (var i = 0; i < indices.length; i += 3) {\n\t\t\t\t\t// get the vertices of the face\n\t\t\t\t\tgetVertexByIndex(indices[i + 0], a);\n\t\t\t\t\tgetVertexByIndex(indices[i + 1], b);\n\t\t\t\t\tgetVertexByIndex(indices[i + 2], c); // perform subdivision\n\n\t\t\t\t\tsubdivideFace(a, b, c, detail);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction subdivideFace(a, b, c, detail) {\n\t\t\t\tvar cols = detail + 1; // we use this multidimensional array as a data structure for creating the subdivision\n\n\t\t\t\tvar v = []; // construct all of the vertices for this subdivision\n\n\t\t\t\tfor (var i = 0; i <= cols; i++) {\n\t\t\t\t\tv[i] = [];\n\t\t\t\t\tvar aj = a.clone().lerp(c, i / cols);\n\t\t\t\t\tvar bj = b.clone().lerp(c, i / cols);\n\t\t\t\t\tvar rows = cols - i;\n\n\t\t\t\t\tfor (var j = 0; j <= rows; j++) {\n\t\t\t\t\t\tif (j === 0 && i === cols) {\n\t\t\t\t\t\t\tv[i][j] = aj;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tv[i][j] = aj.clone().lerp(bj, j / rows);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // construct all of the faces\n\n\n\t\t\t\tfor (var _i = 0; _i < cols; _i++) {\n\t\t\t\t\tfor (var _j = 0; _j < 2 * (cols - _i) - 1; _j++) {\n\t\t\t\t\t\tvar k = Math.floor(_j / 2);\n\n\t\t\t\t\t\tif (_j % 2 === 0) {\n\t\t\t\t\t\t\tpushVertex(v[_i][k + 1]);\n\t\t\t\t\t\t\tpushVertex(v[_i + 1][k]);\n\t\t\t\t\t\t\tpushVertex(v[_i][k]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpushVertex(v[_i][k + 1]);\n\t\t\t\t\t\t\tpushVertex(v[_i + 1][k + 1]);\n\t\t\t\t\t\t\tpushVertex(v[_i + 1][k]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction applyRadius(radius) {\n\t\t\t\tvar vertex = new Vector3(); // iterate over the entire buffer and apply the radius to each vertex\n\n\t\t\t\tfor (var i = 0; i < vertexBuffer.length; i += 3) {\n\t\t\t\t\tvertex.x = vertexBuffer[i + 0];\n\t\t\t\t\tvertex.y = vertexBuffer[i + 1];\n\t\t\t\t\tvertex.z = vertexBuffer[i + 2];\n\t\t\t\t\tvertex.normalize().multiplyScalar(radius);\n\t\t\t\t\tvertexBuffer[i + 0] = vertex.x;\n\t\t\t\t\tvertexBuffer[i + 1] = vertex.y;\n\t\t\t\t\tvertexBuffer[i + 2] = vertex.z;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction generateUVs() {\n\t\t\t\tvar vertex = new Vector3();\n\n\t\t\t\tfor (var i = 0; i < vertexBuffer.length; i += 3) {\n\t\t\t\t\tvertex.x = vertexBuffer[i + 0];\n\t\t\t\t\tvertex.y = vertexBuffer[i + 1];\n\t\t\t\t\tvertex.z = vertexBuffer[i + 2];\n\t\t\t\t\tvar u = azimuth(vertex) / 2 / Math.PI + 0.5;\n\t\t\t\t\tvar v = inclination(vertex) / Math.PI + 0.5;\n\t\t\t\t\tuvBuffer.push(u, 1 - v);\n\t\t\t\t}\n\n\t\t\t\tcorrectUVs();\n\t\t\t\tcorrectSeam();\n\t\t\t}\n\n\t\t\tfunction correctSeam() {\n\t\t\t\t// handle case when face straddles the seam, see #3269\n\t\t\t\tfor (var i = 0; i < uvBuffer.length; i += 6) {\n\t\t\t\t\t// uv data of a single face\n\t\t\t\t\tvar x0 = uvBuffer[i + 0];\n\t\t\t\t\tvar x1 = uvBuffer[i + 2];\n\t\t\t\t\tvar x2 = uvBuffer[i + 4];\n\t\t\t\t\tvar max = Math.max(x0, x1, x2);\n\t\t\t\t\tvar min = Math.min(x0, x1, x2); // 0.9 is somewhat arbitrary\n\n\t\t\t\t\tif (max > 0.9 && min < 0.1) {\n\t\t\t\t\t\tif (x0 < 0.2) uvBuffer[i + 0] += 1;\n\t\t\t\t\t\tif (x1 < 0.2) uvBuffer[i + 2] += 1;\n\t\t\t\t\t\tif (x2 < 0.2) uvBuffer[i + 4] += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction pushVertex(vertex) {\n\t\t\t\tvertexBuffer.push(vertex.x, vertex.y, vertex.z);\n\t\t\t}\n\n\t\t\tfunction getVertexByIndex(index, vertex) {\n\t\t\t\tvar stride = index * 3;\n\t\t\t\tvertex.x = vertices[stride + 0];\n\t\t\t\tvertex.y = vertices[stride + 1];\n\t\t\t\tvertex.z = vertices[stride + 2];\n\t\t\t}\n\n\t\t\tfunction correctUVs() {\n\t\t\t\tvar a = new Vector3();\n\t\t\t\tvar b = new Vector3();\n\t\t\t\tvar c = new Vector3();\n\t\t\t\tvar centroid = new Vector3();\n\t\t\t\tvar uvA = new Vector2();\n\t\t\t\tvar uvB = new Vector2();\n\t\t\t\tvar uvC = new Vector2();\n\n\t\t\t\tfor (var i = 0, j = 0; i < vertexBuffer.length; i += 9, j += 6) {\n\t\t\t\t\ta.set(vertexBuffer[i + 0], vertexBuffer[i + 1], vertexBuffer[i + 2]);\n\t\t\t\t\tb.set(vertexBuffer[i + 3], vertexBuffer[i + 4], vertexBuffer[i + 5]);\n\t\t\t\t\tc.set(vertexBuffer[i + 6], vertexBuffer[i + 7], vertexBuffer[i + 8]);\n\t\t\t\t\tuvA.set(uvBuffer[j + 0], uvBuffer[j + 1]);\n\t\t\t\t\tuvB.set(uvBuffer[j + 2], uvBuffer[j + 3]);\n\t\t\t\t\tuvC.set(uvBuffer[j + 4], uvBuffer[j + 5]);\n\t\t\t\t\tcentroid.copy(a).add(b).add(c).divideScalar(3);\n\t\t\t\t\tvar azi = azimuth(centroid);\n\t\t\t\t\tcorrectUV(uvA, j + 0, a, azi);\n\t\t\t\t\tcorrectUV(uvB, j + 2, b, azi);\n\t\t\t\t\tcorrectUV(uvC, j + 4, c, azi);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction correctUV(uv, stride, vector, azimuth) {\n\t\t\t\tif (azimuth < 0 && uv.x === 1) {\n\t\t\t\t\tuvBuffer[stride] = uv.x - 1;\n\t\t\t\t}\n\n\t\t\t\tif (vector.x === 0 && vector.z === 0) {\n\t\t\t\t\tuvBuffer[stride] = azimuth / 2 / Math.PI + 0.5;\n\t\t\t\t}\n\t\t\t} // Angle around the Y axis, counter-clockwise when looking from above.\n\n\n\t\t\tfunction azimuth(vector) {\n\t\t\t\treturn Math.atan2(vector.z, -vector.x);\n\t\t\t} // Angle above the XZ plane.\n\n\n\t\t\tfunction inclination(vector) {\n\t\t\t\treturn Math.atan2(-vector.y, Math.sqrt(vector.x * vector.x + vector.z * vector.z));\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn PolyhedronGeometry;\n\t}(BufferGeometry);\n\n\tvar DodecahedronGeometry = /*#__PURE__*/function (_PolyhedronGeometry) {\n\t\t_inheritsLoose(DodecahedronGeometry, _PolyhedronGeometry);\n\n\t\tfunction DodecahedronGeometry(radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\tvar t = (1 + Math.sqrt(5)) / 2;\n\t\t\tvar r = 1 / t;\n\t\t\tvar vertices = [// (±1, ±1, ±1)\n\t\t\t-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, ±1/φ, ±φ)\n\t\t\t0, -r, -t, 0, -r, t, 0, r, -t, 0, r, t, // (±1/φ, ±φ, 0)\n\t\t\t-r, -t, 0, -r, t, 0, r, -t, 0, r, t, 0, // (±φ, 0, ±1/φ)\n\t\t\t-t, 0, -r, t, 0, -r, -t, 0, r, t, 0, r];\n\t\t\tvar indices = [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];\n\t\t\t_this = _PolyhedronGeometry.call(this, vertices, indices, radius, detail) || this;\n\t\t\t_this.type = 'DodecahedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn DodecahedronGeometry;\n\t}(PolyhedronGeometry);\n\n\tvar _v0$2 = new Vector3();\n\n\tvar _v1$5 = new Vector3();\n\n\tvar _normal$1 = new Vector3();\n\n\tvar _triangle = new Triangle();\n\n\tvar EdgesGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(EdgesGeometry, _BufferGeometry);\n\n\t\tfunction EdgesGeometry(geometry, thresholdAngle) {\n\t\t\tvar _this;\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'EdgesGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tthresholdAngle: thresholdAngle\n\t\t\t};\n\t\t\tthresholdAngle = thresholdAngle !== undefined ? thresholdAngle : 1;\n\n\t\t\tif (geometry.isGeometry === true) {\n\t\t\t\tconsole.error('THREE.EdgesGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\treturn _assertThisInitialized(_this);\n\t\t\t}\n\n\t\t\tvar precisionPoints = 4;\n\t\t\tvar precision = Math.pow(10, precisionPoints);\n\t\t\tvar thresholdDot = Math.cos(MathUtils.DEG2RAD * thresholdAngle);\n\t\t\tvar indexAttr = geometry.getIndex();\n\t\t\tvar positionAttr = geometry.getAttribute('position');\n\t\t\tvar indexCount = indexAttr ? indexAttr.count : positionAttr.count;\n\t\t\tvar indexArr = [0, 0, 0];\n\t\t\tvar vertKeys = ['a', 'b', 'c'];\n\t\t\tvar hashes = new Array(3);\n\t\t\tvar edgeData = {};\n\t\t\tvar vertices = [];\n\n\t\t\tfor (var i = 0; i < indexCount; i += 3) {\n\t\t\t\tif (indexAttr) {\n\t\t\t\t\tindexArr[0] = indexAttr.getX(i);\n\t\t\t\t\tindexArr[1] = indexAttr.getX(i + 1);\n\t\t\t\t\tindexArr[2] = indexAttr.getX(i + 2);\n\t\t\t\t} else {\n\t\t\t\t\tindexArr[0] = i;\n\t\t\t\t\tindexArr[1] = i + 1;\n\t\t\t\t\tindexArr[2] = i + 2;\n\t\t\t\t}\n\n\t\t\t\tvar a = _triangle.a,\n\t\t\t\t\t\tb = _triangle.b,\n\t\t\t\t\t\tc = _triangle.c;\n\t\t\t\ta.fromBufferAttribute(positionAttr, indexArr[0]);\n\t\t\t\tb.fromBufferAttribute(positionAttr, indexArr[1]);\n\t\t\t\tc.fromBufferAttribute(positionAttr, indexArr[2]);\n\n\t\t\t\t_triangle.getNormal(_normal$1); // create hashes for the edge from the vertices\n\n\n\t\t\t\thashes[0] = Math.round(a.x * precision) + \",\" + Math.round(a.y * precision) + \",\" + Math.round(a.z * precision);\n\t\t\t\thashes[1] = Math.round(b.x * precision) + \",\" + Math.round(b.y * precision) + \",\" + Math.round(b.z * precision);\n\t\t\t\thashes[2] = Math.round(c.x * precision) + \",\" + Math.round(c.y * precision) + \",\" + Math.round(c.z * precision); // skip degenerate triangles\n\n\t\t\t\tif (hashes[0] === hashes[1] || hashes[1] === hashes[2] || hashes[2] === hashes[0]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} // iterate over every edge\n\n\n\t\t\t\tfor (var j = 0; j < 3; j++) {\n\t\t\t\t\t// get the first and next vertex making up the edge\n\t\t\t\t\tvar jNext = (j + 1) % 3;\n\t\t\t\t\tvar vecHash0 = hashes[j];\n\t\t\t\t\tvar vecHash1 = hashes[jNext];\n\t\t\t\t\tvar v0 = _triangle[vertKeys[j]];\n\t\t\t\t\tvar v1 = _triangle[vertKeys[jNext]];\n\t\t\t\t\tvar hash = vecHash0 + \"_\" + vecHash1;\n\t\t\t\t\tvar reverseHash = vecHash1 + \"_\" + vecHash0;\n\n\t\t\t\t\tif (reverseHash in edgeData && edgeData[reverseHash]) {\n\t\t\t\t\t\t// if we found a sibling edge add it into the vertex array if\n\t\t\t\t\t\t// it meets the angle threshold and delete the edge from the map.\n\t\t\t\t\t\tif (_normal$1.dot(edgeData[reverseHash].normal) <= thresholdDot) {\n\t\t\t\t\t\t\tvertices.push(v0.x, v0.y, v0.z);\n\t\t\t\t\t\t\tvertices.push(v1.x, v1.y, v1.z);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tedgeData[reverseHash] = null;\n\t\t\t\t\t} else if (!(hash in edgeData)) {\n\t\t\t\t\t\t// if we've already got an edge here then skip adding a new one\n\t\t\t\t\t\tedgeData[hash] = {\n\t\t\t\t\t\t\tindex0: indexArr[j],\n\t\t\t\t\t\t\tindex1: indexArr[jNext],\n\t\t\t\t\t\t\tnormal: _normal$1.clone()\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // iterate over all remaining, unmatched edges and add them to the vertex array\n\n\n\t\t\tfor (var key in edgeData) {\n\t\t\t\tif (edgeData[key]) {\n\t\t\t\t\tvar _edgeData$key = edgeData[key],\n\t\t\t\t\t\t\tindex0 = _edgeData$key.index0,\n\t\t\t\t\t\t\tindex1 = _edgeData$key.index1;\n\n\t\t\t\t\t_v0$2.fromBufferAttribute(positionAttr, index0);\n\n\t\t\t\t\t_v1$5.fromBufferAttribute(positionAttr, index1);\n\n\t\t\t\t\tvertices.push(_v0$2.x, _v0$2.y, _v0$2.z);\n\t\t\t\t\tvertices.push(_v1$5.x, _v1$5.y, _v1$5.z);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn EdgesGeometry;\n\t}(BufferGeometry);\n\n\t/**\n\t * Port from https://github.com/mapbox/earcut (v2.2.2)\n\t */\n\tvar Earcut = {\n\t\ttriangulate: function triangulate(data, holeIndices, dim) {\n\t\t\tdim = dim || 2;\n\t\t\tvar hasHoles = holeIndices && holeIndices.length;\n\t\t\tvar outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\t\t\tvar outerNode = linkedList(data, 0, outerLen, dim, true);\n\t\t\tvar triangles = [];\n\t\t\tif (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\t\t\tvar minX, minY, maxX, maxY, x, y, invSize;\n\t\t\tif (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim); // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n\n\t\t\tif (data.length > 80 * dim) {\n\t\t\t\tminX = maxX = data[0];\n\t\t\t\tminY = maxY = data[1];\n\n\t\t\t\tfor (var i = dim; i < outerLen; i += dim) {\n\t\t\t\t\tx = data[i];\n\t\t\t\t\ty = data[i + 1];\n\t\t\t\t\tif (x < minX) minX = x;\n\t\t\t\t\tif (y < minY) minY = y;\n\t\t\t\t\tif (x > maxX) maxX = x;\n\t\t\t\t\tif (y > maxY) maxY = y;\n\t\t\t\t} // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n\n\n\t\t\t\tinvSize = Math.max(maxX - minX, maxY - minY);\n\t\t\t\tinvSize = invSize !== 0 ? 1 / invSize : 0;\n\t\t\t}\n\n\t\t\tearcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\t\t\treturn triangles;\n\t\t}\n\t}; // create a circular doubly linked list from polygon points in the specified winding order\n\n\tfunction linkedList(data, start, end, dim, clockwise) {\n\t\tvar i, last;\n\n\t\tif (clockwise === signedArea(data, start, end, dim) > 0) {\n\t\t\tfor (i = start; i < end; i += dim) {\n\t\t\t\tlast = insertNode(i, data[i], data[i + 1], last);\n\t\t\t}\n\t\t} else {\n\t\t\tfor (i = end - dim; i >= start; i -= dim) {\n\t\t\t\tlast = insertNode(i, data[i], data[i + 1], last);\n\t\t\t}\n\t\t}\n\n\t\tif (last && equals(last, last.next)) {\n\t\t\tremoveNode(last);\n\t\t\tlast = last.next;\n\t\t}\n\n\t\treturn last;\n\t} // eliminate colinear or duplicate points\n\n\n\tfunction filterPoints(start, end) {\n\t\tif (!start) return start;\n\t\tif (!end) end = start;\n\t\tvar p = start,\n\t\t\t\tagain;\n\n\t\tdo {\n\t\t\tagain = false;\n\n\t\t\tif (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n\t\t\t\tremoveNode(p);\n\t\t\t\tp = end = p.prev;\n\t\t\t\tif (p === p.next) break;\n\t\t\t\tagain = true;\n\t\t\t} else {\n\t\t\t\tp = p.next;\n\t\t\t}\n\t\t} while (again || p !== end);\n\n\t\treturn end;\n\t} // main ear slicing loop which triangulates a polygon (given as a linked list)\n\n\n\tfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n\t\tif (!ear) return; // interlink polygon nodes in z-order\n\n\t\tif (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\t\tvar stop = ear,\n\t\t\t\tprev,\n\t\t\t\tnext; // iterate through ears, slicing them one by one\n\n\t\twhile (ear.prev !== ear.next) {\n\t\t\tprev = ear.prev;\n\t\t\tnext = ear.next;\n\n\t\t\tif (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n\t\t\t\t// cut off the triangle\n\t\t\t\ttriangles.push(prev.i / dim);\n\t\t\t\ttriangles.push(ear.i / dim);\n\t\t\t\ttriangles.push(next.i / dim);\n\t\t\t\tremoveNode(ear); // skipping the next vertex leads to less sliver triangles\n\n\t\t\t\tear = next.next;\n\t\t\t\tstop = next.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tear = next; // if we looped through the whole remaining polygon and can't find any more ears\n\n\t\t\tif (ear === stop) {\n\t\t\t\t// try filtering points and slicing again\n\t\t\t\tif (!pass) {\n\t\t\t\t\tearcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1); // if this didn't work, try curing all small self-intersections locally\n\t\t\t\t} else if (pass === 1) {\n\t\t\t\t\tear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n\t\t\t\t\tearcutLinked(ear, triangles, dim, minX, minY, invSize, 2); // as a last resort, try splitting the remaining polygon into two\n\t\t\t\t} else if (pass === 2) {\n\t\t\t\t\tsplitEarcut(ear, triangles, dim, minX, minY, invSize);\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} // check whether a polygon node forms a valid ear with adjacent nodes\n\n\n\tfunction isEar(ear) {\n\t\tvar a = ear.prev,\n\t\t\t\tb = ear,\n\t\t\t\tc = ear.next;\n\t\tif (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\t\t// now make sure we don't have other points inside the potential ear\n\n\t\tvar p = ear.next.next;\n\n\t\twhile (p !== ear.prev) {\n\t\t\tif (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tfunction isEarHashed(ear, minX, minY, invSize) {\n\t\tvar a = ear.prev,\n\t\t\t\tb = ear,\n\t\t\t\tc = ear.next;\n\t\tif (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\t\t// triangle bbox; min & max are calculated like this for speed\n\n\t\tvar minTX = a.x < b.x ? a.x < c.x ? a.x : c.x : b.x < c.x ? b.x : c.x,\n\t\t\t\tminTY = a.y < b.y ? a.y < c.y ? a.y : c.y : b.y < c.y ? b.y : c.y,\n\t\t\t\tmaxTX = a.x > b.x ? a.x > c.x ? a.x : c.x : b.x > c.x ? b.x : c.x,\n\t\t\t\tmaxTY = a.y > b.y ? a.y > c.y ? a.y : c.y : b.y > c.y ? b.y : c.y; // z-order range for the current triangle bbox;\n\n\t\tvar minZ = zOrder(minTX, minTY, minX, minY, invSize),\n\t\t\t\tmaxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\t\tvar p = ear.prevZ,\n\t\t\t\tn = ear.nextZ; // look for points inside the triangle in both directions\n\n\t\twhile (p && p.z >= minZ && n && n.z <= maxZ) {\n\t\t\tif (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n\t\t\tp = p.prevZ;\n\t\t\tif (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n\t\t\tn = n.nextZ;\n\t\t} // look for remaining points in decreasing z-order\n\n\n\t\twhile (p && p.z >= minZ) {\n\t\t\tif (p !== ear.prev && p !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0) return false;\n\t\t\tp = p.prevZ;\n\t\t} // look for remaining points in increasing z-order\n\n\n\t\twhile (n && n.z <= maxZ) {\n\t\t\tif (n !== ear.prev && n !== ear.next && pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) && area(n.prev, n, n.next) >= 0) return false;\n\t\t\tn = n.nextZ;\n\t\t}\n\n\t\treturn true;\n\t} // go through all polygon nodes and cure small local self-intersections\n\n\n\tfunction cureLocalIntersections(start, triangles, dim) {\n\t\tvar p = start;\n\n\t\tdo {\n\t\t\tvar a = p.prev,\n\t\t\t\t\tb = p.next.next;\n\n\t\t\tif (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\t\t\t\ttriangles.push(a.i / dim);\n\t\t\t\ttriangles.push(p.i / dim);\n\t\t\t\ttriangles.push(b.i / dim); // remove two nodes involved\n\n\t\t\t\tremoveNode(p);\n\t\t\t\tremoveNode(p.next);\n\t\t\t\tp = start = b;\n\t\t\t}\n\n\t\t\tp = p.next;\n\t\t} while (p !== start);\n\n\t\treturn filterPoints(p);\n\t} // try splitting polygon into two and triangulate them independently\n\n\n\tfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n\t\t// look for a valid diagonal that divides the polygon into two\n\t\tvar a = start;\n\n\t\tdo {\n\t\t\tvar b = a.next.next;\n\n\t\t\twhile (b !== a.prev) {\n\t\t\t\tif (a.i !== b.i && isValidDiagonal(a, b)) {\n\t\t\t\t\t// split the polygon in two by the diagonal\n\t\t\t\t\tvar c = splitPolygon(a, b); // filter colinear points around the cuts\n\n\t\t\t\t\ta = filterPoints(a, a.next);\n\t\t\t\t\tc = filterPoints(c, c.next); // run earcut on each half\n\n\t\t\t\t\tearcutLinked(a, triangles, dim, minX, minY, invSize);\n\t\t\t\t\tearcutLinked(c, triangles, dim, minX, minY, invSize);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tb = b.next;\n\t\t\t}\n\n\t\t\ta = a.next;\n\t\t} while (a !== start);\n\t} // link every hole into the outer loop, producing a single-ring polygon without holes\n\n\n\tfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n\t\tvar queue = [];\n\t\tvar i, len, start, end, list;\n\n\t\tfor (i = 0, len = holeIndices.length; i < len; i++) {\n\t\t\tstart = holeIndices[i] * dim;\n\t\t\tend = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n\t\t\tlist = linkedList(data, start, end, dim, false);\n\t\t\tif (list === list.next) list.steiner = true;\n\t\t\tqueue.push(getLeftmost(list));\n\t\t}\n\n\t\tqueue.sort(compareX); // process holes from left to right\n\n\t\tfor (i = 0; i < queue.length; i++) {\n\t\t\teliminateHole(queue[i], outerNode);\n\t\t\touterNode = filterPoints(outerNode, outerNode.next);\n\t\t}\n\n\t\treturn outerNode;\n\t}\n\n\tfunction compareX(a, b) {\n\t\treturn a.x - b.x;\n\t} // find a bridge between vertices that connects hole with an outer ring and and link it\n\n\n\tfunction eliminateHole(hole, outerNode) {\n\t\touterNode = findHoleBridge(hole, outerNode);\n\n\t\tif (outerNode) {\n\t\t\tvar b = splitPolygon(outerNode, hole); // filter collinear points around the cuts\n\n\t\t\tfilterPoints(outerNode, outerNode.next);\n\t\t\tfilterPoints(b, b.next);\n\t\t}\n\t} // David Eberly's algorithm for finding a bridge between hole and outer polygon\n\n\n\tfunction findHoleBridge(hole, outerNode) {\n\t\tvar p = outerNode;\n\t\tvar hx = hole.x;\n\t\tvar hy = hole.y;\n\t\tvar qx = -Infinity,\n\t\t\t\tm; // find a segment intersected by a ray from the hole's leftmost point to the left;\n\t\t// segment's endpoint with lesser x will be potential connection point\n\n\t\tdo {\n\t\t\tif (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n\t\t\t\tvar x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n\n\t\t\t\tif (x <= hx && x > qx) {\n\t\t\t\t\tqx = x;\n\n\t\t\t\t\tif (x === hx) {\n\t\t\t\t\t\tif (hy === p.y) return p;\n\t\t\t\t\t\tif (hy === p.next.y) return p.next;\n\t\t\t\t\t}\n\n\t\t\t\t\tm = p.x < p.next.x ? p : p.next;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tp = p.next;\n\t\t} while (p !== outerNode);\n\n\t\tif (!m) return null;\n\t\tif (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint\n\t\t// look for points inside the triangle of hole point, segment intersection and endpoint;\n\t\t// if there are no points found, we have a valid connection;\n\t\t// otherwise choose the point of the minimum angle with the ray as connection point\n\n\t\tvar stop = m,\n\t\t\t\tmx = m.x,\n\t\t\t\tmy = m.y;\n\t\tvar tanMin = Infinity,\n\t\t\t\ttan;\n\t\tp = m;\n\n\t\tdo {\n\t\t\tif (hx >= p.x && p.x >= mx && hx !== p.x && pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\t\t\t\ttan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n\t\t\t\tif (locallyInside(p, hole) && (tan < tanMin || tan === tanMin && (p.x > m.x || p.x === m.x && sectorContainsSector(m, p)))) {\n\t\t\t\t\tm = p;\n\t\t\t\t\ttanMin = tan;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tp = p.next;\n\t\t} while (p !== stop);\n\n\t\treturn m;\n\t} // whether sector in vertex m contains sector in vertex p in the same coordinates\n\n\n\tfunction sectorContainsSector(m, p) {\n\t\treturn area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n\t} // interlink polygon nodes in z-order\n\n\n\tfunction indexCurve(start, minX, minY, invSize) {\n\t\tvar p = start;\n\n\t\tdo {\n\t\t\tif (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n\t\t\tp.prevZ = p.prev;\n\t\t\tp.nextZ = p.next;\n\t\t\tp = p.next;\n\t\t} while (p !== start);\n\n\t\tp.prevZ.nextZ = null;\n\t\tp.prevZ = null;\n\t\tsortLinked(p);\n\t} // Simon Tatham's linked list merge sort algorithm\n\t// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\n\n\n\tfunction sortLinked(list) {\n\t\tvar i,\n\t\t\t\tp,\n\t\t\t\tq,\n\t\t\t\te,\n\t\t\t\ttail,\n\t\t\t\tnumMerges,\n\t\t\t\tpSize,\n\t\t\t\tqSize,\n\t\t\t\tinSize = 1;\n\n\t\tdo {\n\t\t\tp = list;\n\t\t\tlist = null;\n\t\t\ttail = null;\n\t\t\tnumMerges = 0;\n\n\t\t\twhile (p) {\n\t\t\t\tnumMerges++;\n\t\t\t\tq = p;\n\t\t\t\tpSize = 0;\n\n\t\t\t\tfor (i = 0; i < inSize; i++) {\n\t\t\t\t\tpSize++;\n\t\t\t\t\tq = q.nextZ;\n\t\t\t\t\tif (!q) break;\n\t\t\t\t}\n\n\t\t\t\tqSize = inSize;\n\n\t\t\t\twhile (pSize > 0 || qSize > 0 && q) {\n\t\t\t\t\tif (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n\t\t\t\t\t\te = p;\n\t\t\t\t\t\tp = p.nextZ;\n\t\t\t\t\t\tpSize--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\te = q;\n\t\t\t\t\t\tq = q.nextZ;\n\t\t\t\t\t\tqSize--;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (tail) tail.nextZ = e;else list = e;\n\t\t\t\t\te.prevZ = tail;\n\t\t\t\t\ttail = e;\n\t\t\t\t}\n\n\t\t\t\tp = q;\n\t\t\t}\n\n\t\t\ttail.nextZ = null;\n\t\t\tinSize *= 2;\n\t\t} while (numMerges > 1);\n\n\t\treturn list;\n\t} // z-order of a point given coords and inverse of the longer side of data bbox\n\n\n\tfunction zOrder(x, y, minX, minY, invSize) {\n\t\t// coords are transformed into non-negative 15-bit integer range\n\t\tx = 32767 * (x - minX) * invSize;\n\t\ty = 32767 * (y - minY) * invSize;\n\t\tx = (x | x << 8) & 0x00FF00FF;\n\t\tx = (x | x << 4) & 0x0F0F0F0F;\n\t\tx = (x | x << 2) & 0x33333333;\n\t\tx = (x | x << 1) & 0x55555555;\n\t\ty = (y | y << 8) & 0x00FF00FF;\n\t\ty = (y | y << 4) & 0x0F0F0F0F;\n\t\ty = (y | y << 2) & 0x33333333;\n\t\ty = (y | y << 1) & 0x55555555;\n\t\treturn x | y << 1;\n\t} // find the leftmost node of a polygon ring\n\n\n\tfunction getLeftmost(start) {\n\t\tvar p = start,\n\t\t\t\tleftmost = start;\n\n\t\tdo {\n\t\t\tif (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;\n\t\t\tp = p.next;\n\t\t} while (p !== start);\n\n\t\treturn leftmost;\n\t} // check if a point lies within a convex triangle\n\n\n\tfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n\t\treturn (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n\t} // check if a diagonal between two polygon nodes is valid (lies in polygon interior)\n\n\n\tfunction isValidDiagonal(a, b) {\n\t\treturn a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && ( // dones't intersect other edges\n\t\tlocallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && ( // locally visible\n\t\tarea(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n\t\tequals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n\t} // signed area of a triangle\n\n\n\tfunction area(p, q, r) {\n\t\treturn (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n\t} // check if two points are equal\n\n\n\tfunction equals(p1, p2) {\n\t\treturn p1.x === p2.x && p1.y === p2.y;\n\t} // check if two segments intersect\n\n\n\tfunction intersects(p1, q1, p2, q2) {\n\t\tvar o1 = sign(area(p1, q1, p2));\n\t\tvar o2 = sign(area(p1, q1, q2));\n\t\tvar o3 = sign(area(p2, q2, p1));\n\t\tvar o4 = sign(area(p2, q2, q1));\n\t\tif (o1 !== o2 && o3 !== o4) return true; // general case\n\n\t\tif (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n\n\t\tif (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n\n\t\tif (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n\n\t\tif (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n\t\treturn false;\n\t} // for collinear points p, q, r, check if point q lies on segment pr\n\n\n\tfunction onSegment(p, q, r) {\n\t\treturn q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n\t}\n\n\tfunction sign(num) {\n\t\treturn num > 0 ? 1 : num < 0 ? -1 : 0;\n\t} // check if a polygon diagonal intersects any polygon segments\n\n\n\tfunction intersectsPolygon(a, b) {\n\t\tvar p = a;\n\n\t\tdo {\n\t\t\tif (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i && intersects(p, p.next, a, b)) return true;\n\t\t\tp = p.next;\n\t\t} while (p !== a);\n\n\t\treturn false;\n\t} // check if a polygon diagonal is locally inside the polygon\n\n\n\tfunction locallyInside(a, b) {\n\t\treturn area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n\t} // check if the middle point of a polygon diagonal is inside the polygon\n\n\n\tfunction middleInside(a, b) {\n\t\tvar p = a,\n\t\t\t\tinside = false;\n\t\tvar px = (a.x + b.x) / 2,\n\t\t\t\tpy = (a.y + b.y) / 2;\n\n\t\tdo {\n\t\t\tif (p.y > py !== p.next.y > py && p.next.y !== p.y && px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x) inside = !inside;\n\t\t\tp = p.next;\n\t\t} while (p !== a);\n\n\t\treturn inside;\n\t} // link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n\t// if one belongs to the outer ring and another to a hole, it merges it into a single ring\n\n\n\tfunction splitPolygon(a, b) {\n\t\tvar a2 = new Node(a.i, a.x, a.y),\n\t\t\t\tb2 = new Node(b.i, b.x, b.y),\n\t\t\t\tan = a.next,\n\t\t\t\tbp = b.prev;\n\t\ta.next = b;\n\t\tb.prev = a;\n\t\ta2.next = an;\n\t\tan.prev = a2;\n\t\tb2.next = a2;\n\t\ta2.prev = b2;\n\t\tbp.next = b2;\n\t\tb2.prev = bp;\n\t\treturn b2;\n\t} // create a node and optionally link it with previous one (in a circular doubly linked list)\n\n\n\tfunction insertNode(i, x, y, last) {\n\t\tvar p = new Node(i, x, y);\n\n\t\tif (!last) {\n\t\t\tp.prev = p;\n\t\t\tp.next = p;\n\t\t} else {\n\t\t\tp.next = last.next;\n\t\t\tp.prev = last;\n\t\t\tlast.next.prev = p;\n\t\t\tlast.next = p;\n\t\t}\n\n\t\treturn p;\n\t}\n\n\tfunction removeNode(p) {\n\t\tp.next.prev = p.prev;\n\t\tp.prev.next = p.next;\n\t\tif (p.prevZ) p.prevZ.nextZ = p.nextZ;\n\t\tif (p.nextZ) p.nextZ.prevZ = p.prevZ;\n\t}\n\n\tfunction Node(i, x, y) {\n\t\t// vertex index in coordinates array\n\t\tthis.i = i; // vertex coordinates\n\n\t\tthis.x = x;\n\t\tthis.y = y; // previous and next vertex nodes in a polygon ring\n\n\t\tthis.prev = null;\n\t\tthis.next = null; // z-order curve value\n\n\t\tthis.z = null; // previous and next nodes in z-order\n\n\t\tthis.prevZ = null;\n\t\tthis.nextZ = null; // indicates whether this is a steiner point\n\n\t\tthis.steiner = false;\n\t}\n\n\tfunction signedArea(data, start, end, dim) {\n\t\tvar sum = 0;\n\n\t\tfor (var i = start, j = end - dim; i < end; i += dim) {\n\t\t\tsum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n\t\t\tj = i;\n\t\t}\n\n\t\treturn sum;\n\t}\n\n\tvar ShapeUtils = {\n\t\t// calculate area of the contour polygon\n\t\tarea: function area(contour) {\n\t\t\tvar n = contour.length;\n\t\t\tvar a = 0.0;\n\n\t\t\tfor (var p = n - 1, q = 0; q < n; p = q++) {\n\t\t\t\ta += contour[p].x * contour[q].y - contour[q].x * contour[p].y;\n\t\t\t}\n\n\t\t\treturn a * 0.5;\n\t\t},\n\t\tisClockWise: function isClockWise(pts) {\n\t\t\treturn ShapeUtils.area(pts) < 0;\n\t\t},\n\t\ttriangulateShape: function triangulateShape(contour, holes) {\n\t\t\tvar vertices = []; // flat array of vertices like [ x0,y0, x1,y1, x2,y2, ... ]\n\n\t\t\tvar holeIndices = []; // array of hole indices\n\n\t\t\tvar faces = []; // final array of vertex indices like [ [ a,b,d ], [ b,c,d ] ]\n\n\t\t\tremoveDupEndPts(contour);\n\t\t\taddContour(vertices, contour); //\n\n\t\t\tvar holeIndex = contour.length;\n\t\t\tholes.forEach(removeDupEndPts);\n\n\t\t\tfor (var i = 0; i < holes.length; i++) {\n\t\t\t\tholeIndices.push(holeIndex);\n\t\t\t\tholeIndex += holes[i].length;\n\t\t\t\taddContour(vertices, holes[i]);\n\t\t\t} //\n\n\n\t\t\tvar triangles = Earcut.triangulate(vertices, holeIndices); //\n\n\t\t\tfor (var _i = 0; _i < triangles.length; _i += 3) {\n\t\t\t\tfaces.push(triangles.slice(_i, _i + 3));\n\t\t\t}\n\n\t\t\treturn faces;\n\t\t}\n\t};\n\n\tfunction removeDupEndPts(points) {\n\t\tvar l = points.length;\n\n\t\tif (l > 2 && points[l - 1].equals(points[0])) {\n\t\t\tpoints.pop();\n\t\t}\n\t}\n\n\tfunction addContour(vertices, contour) {\n\t\tfor (var i = 0; i < contour.length; i++) {\n\t\t\tvertices.push(contour[i].x);\n\t\t\tvertices.push(contour[i].y);\n\t\t}\n\t}\n\n\tvar ExtrudeGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(ExtrudeGeometry, _BufferGeometry);\n\n\t\tfunction ExtrudeGeometry(shapes, options) {\n\t\t\tvar _this;\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'ExtrudeGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tshapes: shapes,\n\t\t\t\toptions: options\n\t\t\t};\n\t\t\tshapes = Array.isArray(shapes) ? shapes : [shapes];\n\n\t\t\tvar scope = _assertThisInitialized(_this);\n\n\t\t\tvar verticesArray = [];\n\t\t\tvar uvArray = [];\n\n\t\t\tfor (var i = 0, l = shapes.length; i < l; i++) {\n\t\t\t\tvar shape = shapes[i];\n\t\t\t\taddShape(shape);\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(verticesArray, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvArray, 2));\n\n\t\t\t_this.computeVertexNormals(); // functions\n\n\n\t\t\tfunction addShape(shape) {\n\t\t\t\tvar placeholder = []; // options\n\n\t\t\t\tvar curveSegments = options.curveSegments !== undefined ? options.curveSegments : 12;\n\t\t\t\tvar steps = options.steps !== undefined ? options.steps : 1;\n\t\t\t\tvar depth = options.depth !== undefined ? options.depth : 100;\n\t\t\t\tvar bevelEnabled = options.bevelEnabled !== undefined ? options.bevelEnabled : true;\n\t\t\t\tvar bevelThickness = options.bevelThickness !== undefined ? options.bevelThickness : 6;\n\t\t\t\tvar bevelSize = options.bevelSize !== undefined ? options.bevelSize : bevelThickness - 2;\n\t\t\t\tvar bevelOffset = options.bevelOffset !== undefined ? options.bevelOffset : 0;\n\t\t\t\tvar bevelSegments = options.bevelSegments !== undefined ? options.bevelSegments : 3;\n\t\t\t\tvar extrudePath = options.extrudePath;\n\t\t\t\tvar uvgen = options.UVGenerator !== undefined ? options.UVGenerator : WorldUVGenerator; // deprecated options\n\n\t\t\t\tif (options.amount !== undefined) {\n\t\t\t\t\tconsole.warn('THREE.ExtrudeBufferGeometry: amount has been renamed to depth.');\n\t\t\t\t\tdepth = options.amount;\n\t\t\t\t} //\n\n\n\t\t\t\tvar extrudePts,\n\t\t\t\t\t\textrudeByPath = false;\n\t\t\t\tvar splineTube, binormal, normal, position2;\n\n\t\t\t\tif (extrudePath) {\n\t\t\t\t\textrudePts = extrudePath.getSpacedPoints(steps);\n\t\t\t\t\textrudeByPath = true;\n\t\t\t\t\tbevelEnabled = false; // bevels not supported for path extrusion\n\t\t\t\t\t// SETUP TNB variables\n\t\t\t\t\t// TODO1 - have a .isClosed in spline?\n\n\t\t\t\t\tsplineTube = extrudePath.computeFrenetFrames(steps, false); // console.log(splineTube, 'splineTube', splineTube.normals.length, 'steps', steps, 'extrudePts', extrudePts.length);\n\n\t\t\t\t\tbinormal = new Vector3();\n\t\t\t\t\tnormal = new Vector3();\n\t\t\t\t\tposition2 = new Vector3();\n\t\t\t\t} // Safeguards if bevels are not enabled\n\n\n\t\t\t\tif (!bevelEnabled) {\n\t\t\t\t\tbevelSegments = 0;\n\t\t\t\t\tbevelThickness = 0;\n\t\t\t\t\tbevelSize = 0;\n\t\t\t\t\tbevelOffset = 0;\n\t\t\t\t} // Variables initialization\n\n\n\t\t\t\tvar shapePoints = shape.extractPoints(curveSegments);\n\t\t\t\tvar vertices = shapePoints.shape;\n\t\t\t\tvar holes = shapePoints.holes;\n\t\t\t\tvar reverse = !ShapeUtils.isClockWise(vertices);\n\n\t\t\t\tif (reverse) {\n\t\t\t\t\tvertices = vertices.reverse(); // Maybe we should also check if holes are in the opposite direction, just to be safe ...\n\n\t\t\t\t\tfor (var h = 0, hl = holes.length; h < hl; h++) {\n\t\t\t\t\t\tvar ahole = holes[h];\n\n\t\t\t\t\t\tif (ShapeUtils.isClockWise(ahole)) {\n\t\t\t\t\t\t\tholes[h] = ahole.reverse();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar faces = ShapeUtils.triangulateShape(vertices, holes);\n\t\t\t\t/* Vertices */\n\n\t\t\t\tvar contour = vertices; // vertices has all points but contour has only points of circumference\n\n\t\t\t\tfor (var _h = 0, _hl = holes.length; _h < _hl; _h++) {\n\t\t\t\t\tvar _ahole = holes[_h];\n\t\t\t\t\tvertices = vertices.concat(_ahole);\n\t\t\t\t}\n\n\t\t\t\tfunction scalePt2(pt, vec, size) {\n\t\t\t\t\tif (!vec) console.error('THREE.ExtrudeGeometry: vec does not exist');\n\t\t\t\t\treturn vec.clone().multiplyScalar(size).add(pt);\n\t\t\t\t}\n\n\t\t\t\tvar vlen = vertices.length,\n\t\t\t\t\t\tflen = faces.length; // Find directions for point movement\n\n\t\t\t\tfunction getBevelVec(inPt, inPrev, inNext) {\n\t\t\t\t\t// computes for inPt the corresponding point inPt' on a new contour\n\t\t\t\t\t//\t shifted by 1 unit (length of normalized vector) to the left\n\t\t\t\t\t// if we walk along contour clockwise, this new contour is outside the old one\n\t\t\t\t\t//\n\t\t\t\t\t// inPt' is the intersection of the two lines parallel to the two\n\t\t\t\t\t//\tadjacent edges of inPt at a distance of 1 unit on the left side.\n\t\t\t\t\tvar v_trans_x, v_trans_y, shrink_by; // resulting translation vector for inPt\n\t\t\t\t\t// good reading for geometry algorithms (here: line-line intersection)\n\t\t\t\t\t// http://geomalgorithms.com/a05-_intersect-1.html\n\n\t\t\t\t\tvar v_prev_x = inPt.x - inPrev.x,\n\t\t\t\t\t\t\tv_prev_y = inPt.y - inPrev.y;\n\t\t\t\t\tvar v_next_x = inNext.x - inPt.x,\n\t\t\t\t\t\t\tv_next_y = inNext.y - inPt.y;\n\t\t\t\t\tvar v_prev_lensq = v_prev_x * v_prev_x + v_prev_y * v_prev_y; // check for collinear edges\n\n\t\t\t\t\tvar collinear0 = v_prev_x * v_next_y - v_prev_y * v_next_x;\n\n\t\t\t\t\tif (Math.abs(collinear0) > Number.EPSILON) {\n\t\t\t\t\t\t// not collinear\n\t\t\t\t\t\t// length of vectors for normalizing\n\t\t\t\t\t\tvar v_prev_len = Math.sqrt(v_prev_lensq);\n\t\t\t\t\t\tvar v_next_len = Math.sqrt(v_next_x * v_next_x + v_next_y * v_next_y); // shift adjacent points by unit vectors to the left\n\n\t\t\t\t\t\tvar ptPrevShift_x = inPrev.x - v_prev_y / v_prev_len;\n\t\t\t\t\t\tvar ptPrevShift_y = inPrev.y + v_prev_x / v_prev_len;\n\t\t\t\t\t\tvar ptNextShift_x = inNext.x - v_next_y / v_next_len;\n\t\t\t\t\t\tvar ptNextShift_y = inNext.y + v_next_x / v_next_len; // scaling factor for v_prev to intersection point\n\n\t\t\t\t\t\tvar sf = ((ptNextShift_x - ptPrevShift_x) * v_next_y - (ptNextShift_y - ptPrevShift_y) * v_next_x) / (v_prev_x * v_next_y - v_prev_y * v_next_x); // vector from inPt to intersection point\n\n\t\t\t\t\t\tv_trans_x = ptPrevShift_x + v_prev_x * sf - inPt.x;\n\t\t\t\t\t\tv_trans_y = ptPrevShift_y + v_prev_y * sf - inPt.y; // Don't normalize!, otherwise sharp corners become ugly\n\t\t\t\t\t\t//\tbut prevent crazy spikes\n\n\t\t\t\t\t\tvar v_trans_lensq = v_trans_x * v_trans_x + v_trans_y * v_trans_y;\n\n\t\t\t\t\t\tif (v_trans_lensq <= 2) {\n\t\t\t\t\t\t\treturn new Vector2(v_trans_x, v_trans_y);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tshrink_by = Math.sqrt(v_trans_lensq / 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// handle special case of collinear edges\n\t\t\t\t\t\tvar direction_eq = false; // assumes: opposite\n\n\t\t\t\t\t\tif (v_prev_x > Number.EPSILON) {\n\t\t\t\t\t\t\tif (v_next_x > Number.EPSILON) {\n\t\t\t\t\t\t\t\tdirection_eq = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (v_prev_x < -Number.EPSILON) {\n\t\t\t\t\t\t\t\tif (v_next_x < -Number.EPSILON) {\n\t\t\t\t\t\t\t\t\tdirection_eq = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (Math.sign(v_prev_y) === Math.sign(v_next_y)) {\n\t\t\t\t\t\t\t\t\tdirection_eq = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (direction_eq) {\n\t\t\t\t\t\t\t// console.log(\"Warning: lines are a straight sequence\");\n\t\t\t\t\t\t\tv_trans_x = -v_prev_y;\n\t\t\t\t\t\t\tv_trans_y = v_prev_x;\n\t\t\t\t\t\t\tshrink_by = Math.sqrt(v_prev_lensq);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// console.log(\"Warning: lines are a straight spike\");\n\t\t\t\t\t\t\tv_trans_x = v_prev_x;\n\t\t\t\t\t\t\tv_trans_y = v_prev_y;\n\t\t\t\t\t\t\tshrink_by = Math.sqrt(v_prev_lensq / 2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn new Vector2(v_trans_x / shrink_by, v_trans_y / shrink_by);\n\t\t\t\t}\n\n\t\t\t\tvar contourMovements = [];\n\n\t\t\t\tfor (var _i = 0, il = contour.length, j = il - 1, k = _i + 1; _i < il; _i++, j++, k++) {\n\t\t\t\t\tif (j === il) j = 0;\n\t\t\t\t\tif (k === il) k = 0; //\t(j)---(i)---(k)\n\t\t\t\t\t// console.log('i,j,k', i, j , k)\n\n\t\t\t\t\tcontourMovements[_i] = getBevelVec(contour[_i], contour[j], contour[k]);\n\t\t\t\t}\n\n\t\t\t\tvar holesMovements = [];\n\t\t\t\tvar oneHoleMovements,\n\t\t\t\t\t\tverticesMovements = contourMovements.concat();\n\n\t\t\t\tfor (var _h2 = 0, _hl2 = holes.length; _h2 < _hl2; _h2++) {\n\t\t\t\t\tvar _ahole2 = holes[_h2];\n\t\t\t\t\toneHoleMovements = [];\n\n\t\t\t\t\tfor (var _i2 = 0, _il = _ahole2.length, _j = _il - 1, _k = _i2 + 1; _i2 < _il; _i2++, _j++, _k++) {\n\t\t\t\t\t\tif (_j === _il) _j = 0;\n\t\t\t\t\t\tif (_k === _il) _k = 0; //\t(j)---(i)---(k)\n\n\t\t\t\t\t\toneHoleMovements[_i2] = getBevelVec(_ahole2[_i2], _ahole2[_j], _ahole2[_k]);\n\t\t\t\t\t}\n\n\t\t\t\t\tholesMovements.push(oneHoleMovements);\n\t\t\t\t\tverticesMovements = verticesMovements.concat(oneHoleMovements);\n\t\t\t\t} // Loop bevelSegments, 1 for the front, 1 for the back\n\n\n\t\t\t\tfor (var b = 0; b < bevelSegments; b++) {\n\t\t\t\t\t//for ( b = bevelSegments; b > 0; b -- ) {\n\t\t\t\t\tvar t = b / bevelSegments;\n\t\t\t\t\tvar z = bevelThickness * Math.cos(t * Math.PI / 2);\n\n\t\t\t\t\tvar _bs = bevelSize * Math.sin(t * Math.PI / 2) + bevelOffset; // contract shape\n\n\n\t\t\t\t\tfor (var _i3 = 0, _il2 = contour.length; _i3 < _il2; _i3++) {\n\t\t\t\t\t\tvar vert = scalePt2(contour[_i3], contourMovements[_i3], _bs);\n\t\t\t\t\t\tv(vert.x, vert.y, -z);\n\t\t\t\t\t} // expand holes\n\n\n\t\t\t\t\tfor (var _h3 = 0, _hl3 = holes.length; _h3 < _hl3; _h3++) {\n\t\t\t\t\t\tvar _ahole3 = holes[_h3];\n\t\t\t\t\t\toneHoleMovements = holesMovements[_h3];\n\n\t\t\t\t\t\tfor (var _i4 = 0, _il3 = _ahole3.length; _i4 < _il3; _i4++) {\n\t\t\t\t\t\t\tvar _vert = scalePt2(_ahole3[_i4], oneHoleMovements[_i4], _bs);\n\n\t\t\t\t\t\t\tv(_vert.x, _vert.y, -z);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar bs = bevelSize + bevelOffset; // Back facing vertices\n\n\t\t\t\tfor (var _i5 = 0; _i5 < vlen; _i5++) {\n\t\t\t\t\tvar _vert2 = bevelEnabled ? scalePt2(vertices[_i5], verticesMovements[_i5], bs) : vertices[_i5];\n\n\t\t\t\t\tif (!extrudeByPath) {\n\t\t\t\t\t\tv(_vert2.x, _vert2.y, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ 0 ].y, extrudePts[ 0 ].x );\n\t\t\t\t\t\tnormal.copy(splineTube.normals[0]).multiplyScalar(_vert2.x);\n\t\t\t\t\t\tbinormal.copy(splineTube.binormals[0]).multiplyScalar(_vert2.y);\n\t\t\t\t\t\tposition2.copy(extrudePts[0]).add(normal).add(binormal);\n\t\t\t\t\t\tv(position2.x, position2.y, position2.z);\n\t\t\t\t\t}\n\t\t\t\t} // Add stepped vertices...\n\t\t\t\t// Including front facing vertices\n\n\n\t\t\t\tfor (var s = 1; s <= steps; s++) {\n\t\t\t\t\tfor (var _i6 = 0; _i6 < vlen; _i6++) {\n\t\t\t\t\t\tvar _vert3 = bevelEnabled ? scalePt2(vertices[_i6], verticesMovements[_i6], bs) : vertices[_i6];\n\n\t\t\t\t\t\tif (!extrudeByPath) {\n\t\t\t\t\t\t\tv(_vert3.x, _vert3.y, depth / steps * s);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// v( vert.x, vert.y + extrudePts[ s - 1 ].y, extrudePts[ s - 1 ].x );\n\t\t\t\t\t\t\tnormal.copy(splineTube.normals[s]).multiplyScalar(_vert3.x);\n\t\t\t\t\t\t\tbinormal.copy(splineTube.binormals[s]).multiplyScalar(_vert3.y);\n\t\t\t\t\t\t\tposition2.copy(extrudePts[s]).add(normal).add(binormal);\n\t\t\t\t\t\t\tv(position2.x, position2.y, position2.z);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // Add bevel segments planes\n\t\t\t\t//for ( b = 1; b <= bevelSegments; b ++ ) {\n\n\n\t\t\t\tfor (var _b = bevelSegments - 1; _b >= 0; _b--) {\n\t\t\t\t\tvar _t = _b / bevelSegments;\n\n\t\t\t\t\tvar _z = bevelThickness * Math.cos(_t * Math.PI / 2);\n\n\t\t\t\t\tvar _bs2 = bevelSize * Math.sin(_t * Math.PI / 2) + bevelOffset; // contract shape\n\n\n\t\t\t\t\tfor (var _i7 = 0, _il4 = contour.length; _i7 < _il4; _i7++) {\n\t\t\t\t\t\tvar _vert4 = scalePt2(contour[_i7], contourMovements[_i7], _bs2);\n\n\t\t\t\t\t\tv(_vert4.x, _vert4.y, depth + _z);\n\t\t\t\t\t} // expand holes\n\n\n\t\t\t\t\tfor (var _h4 = 0, _hl4 = holes.length; _h4 < _hl4; _h4++) {\n\t\t\t\t\t\tvar _ahole4 = holes[_h4];\n\t\t\t\t\t\toneHoleMovements = holesMovements[_h4];\n\n\t\t\t\t\t\tfor (var _i8 = 0, _il5 = _ahole4.length; _i8 < _il5; _i8++) {\n\t\t\t\t\t\t\tvar _vert5 = scalePt2(_ahole4[_i8], oneHoleMovements[_i8], _bs2);\n\n\t\t\t\t\t\t\tif (!extrudeByPath) {\n\t\t\t\t\t\t\t\tv(_vert5.x, _vert5.y, depth + _z);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tv(_vert5.x, _vert5.y + extrudePts[steps - 1].y, extrudePts[steps - 1].x + _z);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/* Faces */\n\t\t\t\t// Top and bottom faces\n\n\n\t\t\t\tbuildLidFaces(); // Sides faces\n\n\t\t\t\tbuildSideFaces(); /////\tInternal functions\n\n\t\t\t\tfunction buildLidFaces() {\n\t\t\t\t\tvar start = verticesArray.length / 3;\n\n\t\t\t\t\tif (bevelEnabled) {\n\t\t\t\t\t\tvar layer = 0; // steps + 1\n\n\t\t\t\t\t\tvar offset = vlen * layer; // Bottom faces\n\n\t\t\t\t\t\tfor (var _i9 = 0; _i9 < flen; _i9++) {\n\t\t\t\t\t\t\tvar face = faces[_i9];\n\t\t\t\t\t\t\tf3(face[2] + offset, face[1] + offset, face[0] + offset);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlayer = steps + bevelSegments * 2;\n\t\t\t\t\t\toffset = vlen * layer; // Top faces\n\n\t\t\t\t\t\tfor (var _i10 = 0; _i10 < flen; _i10++) {\n\t\t\t\t\t\t\tvar _face = faces[_i10];\n\t\t\t\t\t\t\tf3(_face[0] + offset, _face[1] + offset, _face[2] + offset);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Bottom faces\n\t\t\t\t\t\tfor (var _i11 = 0; _i11 < flen; _i11++) {\n\t\t\t\t\t\t\tvar _face2 = faces[_i11];\n\t\t\t\t\t\t\tf3(_face2[2], _face2[1], _face2[0]);\n\t\t\t\t\t\t} // Top faces\n\n\n\t\t\t\t\t\tfor (var _i12 = 0; _i12 < flen; _i12++) {\n\t\t\t\t\t\t\tvar _face3 = faces[_i12];\n\t\t\t\t\t\t\tf3(_face3[0] + vlen * steps, _face3[1] + vlen * steps, _face3[2] + vlen * steps);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.addGroup(start, verticesArray.length / 3 - start, 0);\n\t\t\t\t} // Create faces for the z-sides of the shape\n\n\n\t\t\t\tfunction buildSideFaces() {\n\t\t\t\t\tvar start = verticesArray.length / 3;\n\t\t\t\t\tvar layeroffset = 0;\n\t\t\t\t\tsidewalls(contour, layeroffset);\n\t\t\t\t\tlayeroffset += contour.length;\n\n\t\t\t\t\tfor (var _h5 = 0, _hl5 = holes.length; _h5 < _hl5; _h5++) {\n\t\t\t\t\t\tvar _ahole5 = holes[_h5];\n\t\t\t\t\t\tsidewalls(_ahole5, layeroffset); //, true\n\n\t\t\t\t\t\tlayeroffset += _ahole5.length;\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.addGroup(start, verticesArray.length / 3 - start, 1);\n\t\t\t\t}\n\n\t\t\t\tfunction sidewalls(contour, layeroffset) {\n\t\t\t\t\tvar i = contour.length;\n\n\t\t\t\t\twhile (--i >= 0) {\n\t\t\t\t\t\tvar _j2 = i;\n\n\t\t\t\t\t\tvar _k2 = i - 1;\n\n\t\t\t\t\t\tif (_k2 < 0) _k2 = contour.length - 1; //console.log('b', i,j, i-1, k,vertices.length);\n\n\t\t\t\t\t\tfor (var _s = 0, sl = steps + bevelSegments * 2; _s < sl; _s++) {\n\t\t\t\t\t\t\tvar slen1 = vlen * _s;\n\t\t\t\t\t\t\tvar slen2 = vlen * (_s + 1);\n\n\t\t\t\t\t\t\tvar a = layeroffset + _j2 + slen1,\n\t\t\t\t\t\t\t\t\t_b2 = layeroffset + _k2 + slen1,\n\t\t\t\t\t\t\t\t\tc = layeroffset + _k2 + slen2,\n\t\t\t\t\t\t\t\t\td = layeroffset + _j2 + slen2;\n\n\t\t\t\t\t\t\tf4(a, _b2, c, d);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction v(x, y, z) {\n\t\t\t\t\tplaceholder.push(x);\n\t\t\t\t\tplaceholder.push(y);\n\t\t\t\t\tplaceholder.push(z);\n\t\t\t\t}\n\n\t\t\t\tfunction f3(a, b, c) {\n\t\t\t\t\taddVertex(a);\n\t\t\t\t\taddVertex(b);\n\t\t\t\t\taddVertex(c);\n\t\t\t\t\tvar nextIndex = verticesArray.length / 3;\n\t\t\t\t\tvar uvs = uvgen.generateTopUV(scope, verticesArray, nextIndex - 3, nextIndex - 2, nextIndex - 1);\n\t\t\t\t\taddUV(uvs[0]);\n\t\t\t\t\taddUV(uvs[1]);\n\t\t\t\t\taddUV(uvs[2]);\n\t\t\t\t}\n\n\t\t\t\tfunction f4(a, b, c, d) {\n\t\t\t\t\taddVertex(a);\n\t\t\t\t\taddVertex(b);\n\t\t\t\t\taddVertex(d);\n\t\t\t\t\taddVertex(b);\n\t\t\t\t\taddVertex(c);\n\t\t\t\t\taddVertex(d);\n\t\t\t\t\tvar nextIndex = verticesArray.length / 3;\n\t\t\t\t\tvar uvs = uvgen.generateSideWallUV(scope, verticesArray, nextIndex - 6, nextIndex - 3, nextIndex - 2, nextIndex - 1);\n\t\t\t\t\taddUV(uvs[0]);\n\t\t\t\t\taddUV(uvs[1]);\n\t\t\t\t\taddUV(uvs[3]);\n\t\t\t\t\taddUV(uvs[1]);\n\t\t\t\t\taddUV(uvs[2]);\n\t\t\t\t\taddUV(uvs[3]);\n\t\t\t\t}\n\n\t\t\t\tfunction addVertex(index) {\n\t\t\t\t\tverticesArray.push(placeholder[index * 3 + 0]);\n\t\t\t\t\tverticesArray.push(placeholder[index * 3 + 1]);\n\t\t\t\t\tverticesArray.push(placeholder[index * 3 + 2]);\n\t\t\t\t}\n\n\t\t\t\tfunction addUV(vector2) {\n\t\t\t\t\tuvArray.push(vector2.x);\n\t\t\t\t\tuvArray.push(vector2.y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = ExtrudeGeometry.prototype;\n\n\t\t_proto.toJSON = function toJSON() {\n\t\t\tvar data = BufferGeometry.prototype.toJSON.call(this);\n\t\t\tvar shapes = this.parameters.shapes;\n\t\t\tvar options = this.parameters.options;\n\t\t\treturn _toJSON(shapes, options, data);\n\t\t};\n\n\t\treturn ExtrudeGeometry;\n\t}(BufferGeometry);\n\n\tvar WorldUVGenerator = {\n\t\tgenerateTopUV: function generateTopUV(geometry, vertices, indexA, indexB, indexC) {\n\t\t\tvar a_x = vertices[indexA * 3];\n\t\t\tvar a_y = vertices[indexA * 3 + 1];\n\t\t\tvar b_x = vertices[indexB * 3];\n\t\t\tvar b_y = vertices[indexB * 3 + 1];\n\t\t\tvar c_x = vertices[indexC * 3];\n\t\t\tvar c_y = vertices[indexC * 3 + 1];\n\t\t\treturn [new Vector2(a_x, a_y), new Vector2(b_x, b_y), new Vector2(c_x, c_y)];\n\t\t},\n\t\tgenerateSideWallUV: function generateSideWallUV(geometry, vertices, indexA, indexB, indexC, indexD) {\n\t\t\tvar a_x = vertices[indexA * 3];\n\t\t\tvar a_y = vertices[indexA * 3 + 1];\n\t\t\tvar a_z = vertices[indexA * 3 + 2];\n\t\t\tvar b_x = vertices[indexB * 3];\n\t\t\tvar b_y = vertices[indexB * 3 + 1];\n\t\t\tvar b_z = vertices[indexB * 3 + 2];\n\t\t\tvar c_x = vertices[indexC * 3];\n\t\t\tvar c_y = vertices[indexC * 3 + 1];\n\t\t\tvar c_z = vertices[indexC * 3 + 2];\n\t\t\tvar d_x = vertices[indexD * 3];\n\t\t\tvar d_y = vertices[indexD * 3 + 1];\n\t\t\tvar d_z = vertices[indexD * 3 + 2];\n\n\t\t\tif (Math.abs(a_y - b_y) < 0.01) {\n\t\t\t\treturn [new Vector2(a_x, 1 - a_z), new Vector2(b_x, 1 - b_z), new Vector2(c_x, 1 - c_z), new Vector2(d_x, 1 - d_z)];\n\t\t\t} else {\n\t\t\t\treturn [new Vector2(a_y, 1 - a_z), new Vector2(b_y, 1 - b_z), new Vector2(c_y, 1 - c_z), new Vector2(d_y, 1 - d_z)];\n\t\t\t}\n\t\t}\n\t};\n\n\tfunction _toJSON(shapes, options, data) {\n\t\tdata.shapes = [];\n\n\t\tif (Array.isArray(shapes)) {\n\t\t\tfor (var i = 0, l = shapes.length; i < l; i++) {\n\t\t\t\tvar shape = shapes[i];\n\t\t\t\tdata.shapes.push(shape.uuid);\n\t\t\t}\n\t\t} else {\n\t\t\tdata.shapes.push(shapes.uuid);\n\t\t}\n\n\t\tif (options.extrudePath !== undefined) data.options.extrudePath = options.extrudePath.toJSON();\n\t\treturn data;\n\t}\n\n\tvar IcosahedronGeometry = /*#__PURE__*/function (_PolyhedronGeometry) {\n\t\t_inheritsLoose(IcosahedronGeometry, _PolyhedronGeometry);\n\n\t\tfunction IcosahedronGeometry(radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\tvar t = (1 + Math.sqrt(5)) / 2;\n\t\t\tvar vertices = [-1, t, 0, 1, t, 0, -1, -t, 0, 1, -t, 0, 0, -1, t, 0, 1, t, 0, -1, -t, 0, 1, -t, t, 0, -1, t, 0, 1, -t, 0, -1, -t, 0, 1];\n\t\t\tvar indices = [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];\n\t\t\t_this = _PolyhedronGeometry.call(this, vertices, indices, radius, detail) || this;\n\t\t\t_this.type = 'IcosahedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn IcosahedronGeometry;\n\t}(PolyhedronGeometry);\n\n\tvar LatheGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(LatheGeometry, _BufferGeometry);\n\n\t\tfunction LatheGeometry(points, segments, phiStart, phiLength) {\n\t\t\tvar _this;\n\n\t\t\tif (segments === void 0) {\n\t\t\t\tsegments = 12;\n\t\t\t}\n\n\t\t\tif (phiStart === void 0) {\n\t\t\t\tphiStart = 0;\n\t\t\t}\n\n\t\t\tif (phiLength === void 0) {\n\t\t\t\tphiLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'LatheGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tpoints: points,\n\t\t\t\tsegments: segments,\n\t\t\t\tphiStart: phiStart,\n\t\t\t\tphiLength: phiLength\n\t\t\t};\n\t\t\tsegments = Math.floor(segments); // clamp phiLength so it's in range of [ 0, 2PI ]\n\n\t\t\tphiLength = MathUtils.clamp(phiLength, 0, Math.PI * 2); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar inverseSegments = 1.0 / segments;\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar uv = new Vector2(); // generate vertices and uvs\n\n\t\t\tfor (var i = 0; i <= segments; i++) {\n\t\t\t\tvar phi = phiStart + i * inverseSegments * phiLength;\n\t\t\t\tvar sin = Math.sin(phi);\n\t\t\t\tvar cos = Math.cos(phi);\n\n\t\t\t\tfor (var j = 0; j <= points.length - 1; j++) {\n\t\t\t\t\t// vertex\n\t\t\t\t\tvertex.x = points[j].x * sin;\n\t\t\t\t\tvertex.y = points[j].y;\n\t\t\t\t\tvertex.z = points[j].x * cos;\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // uv\n\n\t\t\t\t\tuv.x = i / segments;\n\t\t\t\t\tuv.y = j / (points.length - 1);\n\t\t\t\t\tuvs.push(uv.x, uv.y);\n\t\t\t\t}\n\t\t\t} // indices\n\n\n\t\t\tfor (var _i = 0; _i < segments; _i++) {\n\t\t\t\tfor (var _j = 0; _j < points.length - 1; _j++) {\n\t\t\t\t\tvar base = _j + _i * points.length;\n\t\t\t\t\tvar a = base;\n\t\t\t\t\tvar b = base + points.length;\n\t\t\t\t\tvar c = base + points.length + 1;\n\t\t\t\t\tvar d = base + 1; // faces\n\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // generate normals\n\n\n\t\t\t_this.computeVertexNormals(); // if the geometry is closed, we need to average the normals along the seam.\n\t\t\t// because the corresponding vertices are identical (but still have different UVs).\n\n\n\t\t\tif (phiLength === Math.PI * 2) {\n\t\t\t\tvar normals = _this.attributes.normal.array;\n\t\t\t\tvar n1 = new Vector3();\n\t\t\t\tvar n2 = new Vector3();\n\t\t\t\tvar n = new Vector3(); // this is the buffer offset for the last line of vertices\n\n\t\t\t\tvar _base = segments * points.length * 3;\n\n\t\t\t\tfor (var _i2 = 0, _j2 = 0; _i2 < points.length; _i2++, _j2 += 3) {\n\t\t\t\t\t// select the normal of the vertex in the first line\n\t\t\t\t\tn1.x = normals[_j2 + 0];\n\t\t\t\t\tn1.y = normals[_j2 + 1];\n\t\t\t\t\tn1.z = normals[_j2 + 2]; // select the normal of the vertex in the last line\n\n\t\t\t\t\tn2.x = normals[_base + _j2 + 0];\n\t\t\t\t\tn2.y = normals[_base + _j2 + 1];\n\t\t\t\t\tn2.z = normals[_base + _j2 + 2]; // average normals\n\n\t\t\t\t\tn.addVectors(n1, n2).normalize(); // assign the new values to both normals\n\n\t\t\t\t\tnormals[_j2 + 0] = normals[_base + _j2 + 0] = n.x;\n\t\t\t\t\tnormals[_j2 + 1] = normals[_base + _j2 + 1] = n.y;\n\t\t\t\t\tnormals[_j2 + 2] = normals[_base + _j2 + 2] = n.z;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn LatheGeometry;\n\t}(BufferGeometry);\n\n\tvar OctahedronGeometry = /*#__PURE__*/function (_PolyhedronGeometry) {\n\t\t_inheritsLoose(OctahedronGeometry, _PolyhedronGeometry);\n\n\t\tfunction OctahedronGeometry(radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\tvar vertices = [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1];\n\t\t\tvar indices = [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2];\n\t\t\t_this = _PolyhedronGeometry.call(this, vertices, indices, radius, detail) || this;\n\t\t\t_this.type = 'OctahedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn OctahedronGeometry;\n\t}(PolyhedronGeometry);\n\n\t/**\n\t * Parametric Surfaces Geometry\n\t * based on the brilliant article by @prideout https://prideout.net/blog/old/blog/index.html@p=44.html\n\t */\n\n\tfunction ParametricGeometry(func, slices, stacks) {\n\t\tBufferGeometry.call(this);\n\t\tthis.type = 'ParametricGeometry';\n\t\tthis.parameters = {\n\t\t\tfunc: func,\n\t\t\tslices: slices,\n\t\t\tstacks: stacks\n\t\t}; // buffers\n\n\t\tvar indices = [];\n\t\tvar vertices = [];\n\t\tvar normals = [];\n\t\tvar uvs = [];\n\t\tvar EPS = 0.00001;\n\t\tvar normal = new Vector3();\n\t\tvar p0 = new Vector3(),\n\t\t\t\tp1 = new Vector3();\n\t\tvar pu = new Vector3(),\n\t\t\t\tpv = new Vector3();\n\n\t\tif (func.length < 3) {\n\t\t\tconsole.error('THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.');\n\t\t} // generate vertices, normals and uvs\n\n\n\t\tvar sliceCount = slices + 1;\n\n\t\tfor (var i = 0; i <= stacks; i++) {\n\t\t\tvar v = i / stacks;\n\n\t\t\tfor (var j = 0; j <= slices; j++) {\n\t\t\t\tvar u = j / slices; // vertex\n\n\t\t\t\tfunc(u, v, p0);\n\t\t\t\tvertices.push(p0.x, p0.y, p0.z); // normal\n\t\t\t\t// approximate tangent vectors via finite differences\n\n\t\t\t\tif (u - EPS >= 0) {\n\t\t\t\t\tfunc(u - EPS, v, p1);\n\t\t\t\t\tpu.subVectors(p0, p1);\n\t\t\t\t} else {\n\t\t\t\t\tfunc(u + EPS, v, p1);\n\t\t\t\t\tpu.subVectors(p1, p0);\n\t\t\t\t}\n\n\t\t\t\tif (v - EPS >= 0) {\n\t\t\t\t\tfunc(u, v - EPS, p1);\n\t\t\t\t\tpv.subVectors(p0, p1);\n\t\t\t\t} else {\n\t\t\t\t\tfunc(u, v + EPS, p1);\n\t\t\t\t\tpv.subVectors(p1, p0);\n\t\t\t\t} // cross product of tangent vectors returns surface normal\n\n\n\t\t\t\tnormal.crossVectors(pu, pv).normalize();\n\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\tuvs.push(u, v);\n\t\t\t}\n\t\t} // generate indices\n\n\n\t\tfor (var _i = 0; _i < stacks; _i++) {\n\t\t\tfor (var _j = 0; _j < slices; _j++) {\n\t\t\t\tvar a = _i * sliceCount + _j;\n\t\t\t\tvar b = _i * sliceCount + _j + 1;\n\t\t\t\tvar c = (_i + 1) * sliceCount + _j + 1;\n\t\t\t\tvar d = (_i + 1) * sliceCount + _j; // faces one and two\n\n\t\t\t\tindices.push(a, b, d);\n\t\t\t\tindices.push(b, c, d);\n\t\t\t}\n\t\t} // build geometry\n\n\n\t\tthis.setIndex(indices);\n\t\tthis.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\tthis.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\t\tthis.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\t}\n\n\tParametricGeometry.prototype = Object.create(BufferGeometry.prototype);\n\tParametricGeometry.prototype.constructor = ParametricGeometry;\n\n\tvar RingGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(RingGeometry, _BufferGeometry);\n\n\t\tfunction RingGeometry(innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (innerRadius === void 0) {\n\t\t\t\tinnerRadius = 0.5;\n\t\t\t}\n\n\t\t\tif (outerRadius === void 0) {\n\t\t\t\touterRadius = 1;\n\t\t\t}\n\n\t\t\tif (thetaSegments === void 0) {\n\t\t\t\tthetaSegments = 8;\n\t\t\t}\n\n\t\t\tif (phiSegments === void 0) {\n\t\t\t\tphiSegments = 1;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'RingGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tinnerRadius: innerRadius,\n\t\t\t\touterRadius: outerRadius,\n\t\t\t\tthetaSegments: thetaSegments,\n\t\t\t\tphiSegments: phiSegments,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\t\t\tthetaSegments = Math.max(3, thetaSegments);\n\t\t\tphiSegments = Math.max(1, phiSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // some helper variables\n\n\t\t\tvar radius = innerRadius;\n\t\t\tvar radiusStep = (outerRadius - innerRadius) / phiSegments;\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar uv = new Vector2(); // generate vertices, normals and uvs\n\n\t\t\tfor (var j = 0; j <= phiSegments; j++) {\n\t\t\t\tfor (var i = 0; i <= thetaSegments; i++) {\n\t\t\t\t\t// values are generate from the inside of the ring to the outside\n\t\t\t\t\tvar segment = thetaStart + i / thetaSegments * thetaLength; // vertex\n\n\t\t\t\t\tvertex.x = radius * Math.cos(segment);\n\t\t\t\t\tvertex.y = radius * Math.sin(segment);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\tnormals.push(0, 0, 1); // uv\n\n\t\t\t\t\tuv.x = (vertex.x / outerRadius + 1) / 2;\n\t\t\t\t\tuv.y = (vertex.y / outerRadius + 1) / 2;\n\t\t\t\t\tuvs.push(uv.x, uv.y);\n\t\t\t\t} // increase the radius for next row of vertices\n\n\n\t\t\t\tradius += radiusStep;\n\t\t\t} // indices\n\n\n\t\t\tfor (var _j = 0; _j < phiSegments; _j++) {\n\t\t\t\tvar thetaSegmentLevel = _j * (thetaSegments + 1);\n\n\t\t\t\tfor (var _i = 0; _i < thetaSegments; _i++) {\n\t\t\t\t\tvar _segment = _i + thetaSegmentLevel;\n\n\t\t\t\t\tvar a = _segment;\n\t\t\t\t\tvar b = _segment + thetaSegments + 1;\n\t\t\t\t\tvar c = _segment + thetaSegments + 2;\n\t\t\t\t\tvar d = _segment + 1; // faces\n\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn RingGeometry;\n\t}(BufferGeometry);\n\n\tvar ShapeGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(ShapeGeometry, _BufferGeometry);\n\n\t\tfunction ShapeGeometry(shapes, curveSegments) {\n\t\t\tvar _this;\n\n\t\t\tif (curveSegments === void 0) {\n\t\t\t\tcurveSegments = 12;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'ShapeGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tshapes: shapes,\n\t\t\t\tcurveSegments: curveSegments\n\t\t\t}; // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar groupStart = 0;\n\t\t\tvar groupCount = 0; // allow single and array values for \"shapes\" parameter\n\n\t\t\tif (Array.isArray(shapes) === false) {\n\t\t\t\taddShape(shapes);\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < shapes.length; i++) {\n\t\t\t\t\taddShape(shapes[i]);\n\n\t\t\t\t\t_this.addGroup(groupStart, groupCount, i); // enables MultiMaterial support\n\n\n\t\t\t\t\tgroupStart += groupCount;\n\t\t\t\t\tgroupCount = 0;\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // helper functions\n\n\n\t\t\tfunction addShape(shape) {\n\t\t\t\tvar indexOffset = vertices.length / 3;\n\t\t\t\tvar points = shape.extractPoints(curveSegments);\n\t\t\t\tvar shapeVertices = points.shape;\n\t\t\t\tvar shapeHoles = points.holes; // check direction of vertices\n\n\t\t\t\tif (ShapeUtils.isClockWise(shapeVertices) === false) {\n\t\t\t\t\tshapeVertices = shapeVertices.reverse();\n\t\t\t\t}\n\n\t\t\t\tfor (var _i = 0, l = shapeHoles.length; _i < l; _i++) {\n\t\t\t\t\tvar shapeHole = shapeHoles[_i];\n\n\t\t\t\t\tif (ShapeUtils.isClockWise(shapeHole) === true) {\n\t\t\t\t\t\tshapeHoles[_i] = shapeHole.reverse();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar faces = ShapeUtils.triangulateShape(shapeVertices, shapeHoles); // join vertices of inner and outer paths to a single array\n\n\t\t\t\tfor (var _i2 = 0, _l = shapeHoles.length; _i2 < _l; _i2++) {\n\t\t\t\t\tvar _shapeHole = shapeHoles[_i2];\n\t\t\t\t\tshapeVertices = shapeVertices.concat(_shapeHole);\n\t\t\t\t} // vertices, normals, uvs\n\n\n\t\t\t\tfor (var _i3 = 0, _l2 = shapeVertices.length; _i3 < _l2; _i3++) {\n\t\t\t\t\tvar vertex = shapeVertices[_i3];\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, 0);\n\t\t\t\t\tnormals.push(0, 0, 1);\n\t\t\t\t\tuvs.push(vertex.x, vertex.y); // world uvs\n\t\t\t\t} // incides\n\n\n\t\t\t\tfor (var _i4 = 0, _l3 = faces.length; _i4 < _l3; _i4++) {\n\t\t\t\t\tvar face = faces[_i4];\n\t\t\t\t\tvar a = face[0] + indexOffset;\n\t\t\t\t\tvar b = face[1] + indexOffset;\n\t\t\t\t\tvar c = face[2] + indexOffset;\n\t\t\t\t\tindices.push(a, b, c);\n\t\t\t\t\tgroupCount += 3;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = ShapeGeometry.prototype;\n\n\t\t_proto.toJSON = function toJSON() {\n\t\t\tvar data = BufferGeometry.prototype.toJSON.call(this);\n\t\t\tvar shapes = this.parameters.shapes;\n\t\t\treturn _toJSON$1(shapes, data);\n\t\t};\n\n\t\treturn ShapeGeometry;\n\t}(BufferGeometry);\n\n\tfunction _toJSON$1(shapes, data) {\n\t\tdata.shapes = [];\n\n\t\tif (Array.isArray(shapes)) {\n\t\t\tfor (var i = 0, l = shapes.length; i < l; i++) {\n\t\t\t\tvar shape = shapes[i];\n\t\t\t\tdata.shapes.push(shape.uuid);\n\t\t\t}\n\t\t} else {\n\t\t\tdata.shapes.push(shapes.uuid);\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tvar SphereGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(SphereGeometry, _BufferGeometry);\n\n\t\tfunction SphereGeometry(radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (widthSegments === void 0) {\n\t\t\t\twidthSegments = 8;\n\t\t\t}\n\n\t\t\tif (heightSegments === void 0) {\n\t\t\t\theightSegments = 6;\n\t\t\t}\n\n\t\t\tif (phiStart === void 0) {\n\t\t\t\tphiStart = 0;\n\t\t\t}\n\n\t\t\tif (phiLength === void 0) {\n\t\t\t\tphiLength = Math.PI * 2;\n\t\t\t}\n\n\t\t\tif (thetaStart === void 0) {\n\t\t\t\tthetaStart = 0;\n\t\t\t}\n\n\t\t\tif (thetaLength === void 0) {\n\t\t\t\tthetaLength = Math.PI;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'SphereGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\twidthSegments: widthSegments,\n\t\t\t\theightSegments: heightSegments,\n\t\t\t\tphiStart: phiStart,\n\t\t\t\tphiLength: phiLength,\n\t\t\t\tthetaStart: thetaStart,\n\t\t\t\tthetaLength: thetaLength\n\t\t\t};\n\t\t\twidthSegments = Math.max(3, Math.floor(widthSegments));\n\t\t\theightSegments = Math.max(2, Math.floor(heightSegments));\n\t\t\tvar thetaEnd = Math.min(thetaStart + thetaLength, Math.PI);\n\t\t\tvar index = 0;\n\t\t\tvar grid = [];\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar normal = new Vector3(); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // generate vertices, normals and uvs\n\n\t\t\tfor (var iy = 0; iy <= heightSegments; iy++) {\n\t\t\t\tvar verticesRow = [];\n\t\t\t\tvar v = iy / heightSegments; // special case for the poles\n\n\t\t\t\tvar uOffset = 0;\n\n\t\t\t\tif (iy == 0 && thetaStart == 0) {\n\t\t\t\t\tuOffset = 0.5 / widthSegments;\n\t\t\t\t} else if (iy == heightSegments && thetaEnd == Math.PI) {\n\t\t\t\t\tuOffset = -0.5 / widthSegments;\n\t\t\t\t}\n\n\t\t\t\tfor (var ix = 0; ix <= widthSegments; ix++) {\n\t\t\t\t\tvar u = ix / widthSegments; // vertex\n\n\t\t\t\t\tvertex.x = -radius * Math.cos(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);\n\t\t\t\t\tvertex.y = radius * Math.cos(thetaStart + v * thetaLength);\n\t\t\t\t\tvertex.z = radius * Math.sin(phiStart + u * phiLength) * Math.sin(thetaStart + v * thetaLength);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\tnormal.copy(vertex).normalize();\n\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\t\tuvs.push(u + uOffset, 1 - v);\n\t\t\t\t\tverticesRow.push(index++);\n\t\t\t\t}\n\n\t\t\t\tgrid.push(verticesRow);\n\t\t\t} // indices\n\n\n\t\t\tfor (var _iy = 0; _iy < heightSegments; _iy++) {\n\t\t\t\tfor (var _ix = 0; _ix < widthSegments; _ix++) {\n\t\t\t\t\tvar a = grid[_iy][_ix + 1];\n\t\t\t\t\tvar b = grid[_iy][_ix];\n\t\t\t\t\tvar c = grid[_iy + 1][_ix];\n\t\t\t\t\tvar d = grid[_iy + 1][_ix + 1];\n\t\t\t\t\tif (_iy !== 0 || thetaStart > 0) indices.push(a, b, d);\n\t\t\t\t\tif (_iy !== heightSegments - 1 || thetaEnd < Math.PI) indices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn SphereGeometry;\n\t}(BufferGeometry);\n\n\tvar TetrahedronGeometry = /*#__PURE__*/function (_PolyhedronGeometry) {\n\t\t_inheritsLoose(TetrahedronGeometry, _PolyhedronGeometry);\n\n\t\tfunction TetrahedronGeometry(radius, detail) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (detail === void 0) {\n\t\t\t\tdetail = 0;\n\t\t\t}\n\n\t\t\tvar vertices = [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1];\n\t\t\tvar indices = [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1];\n\t\t\t_this = _PolyhedronGeometry.call(this, vertices, indices, radius, detail) || this;\n\t\t\t_this.type = 'TetrahedronGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\tdetail: detail\n\t\t\t};\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn TetrahedronGeometry;\n\t}(PolyhedronGeometry);\n\n\tvar TextGeometry = /*#__PURE__*/function (_ExtrudeGeometry) {\n\t\t_inheritsLoose(TextGeometry, _ExtrudeGeometry);\n\n\t\tfunction TextGeometry(text, parameters) {\n\t\t\tvar _this;\n\n\t\t\tif (parameters === void 0) {\n\t\t\t\tparameters = {};\n\t\t\t}\n\n\t\t\tvar font = parameters.font;\n\n\t\t\tif (!(font && font.isFont)) {\n\t\t\t\tconsole.error('THREE.TextGeometry: font parameter is not an instance of THREE.Font.');\n\t\t\t\treturn new BufferGeometry() || _assertThisInitialized(_this);\n\t\t\t}\n\n\t\t\tvar shapes = font.generateShapes(text, parameters.size); // translate parameters to ExtrudeGeometry API\n\n\t\t\tparameters.depth = parameters.height !== undefined ? parameters.height : 50; // defaults\n\n\t\t\tif (parameters.bevelThickness === undefined) parameters.bevelThickness = 10;\n\t\t\tif (parameters.bevelSize === undefined) parameters.bevelSize = 8;\n\t\t\tif (parameters.bevelEnabled === undefined) parameters.bevelEnabled = false;\n\t\t\t_this = _ExtrudeGeometry.call(this, shapes, parameters) || this;\n\t\t\t_this.type = 'TextGeometry';\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn TextGeometry;\n\t}(ExtrudeGeometry);\n\n\tvar TorusGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(TorusGeometry, _BufferGeometry);\n\n\t\tfunction TorusGeometry(radius, tube, radialSegments, tubularSegments, arc) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (tube === void 0) {\n\t\t\t\ttube = 0.4;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (tubularSegments === void 0) {\n\t\t\t\ttubularSegments = 6;\n\t\t\t}\n\n\t\t\tif (arc === void 0) {\n\t\t\t\tarc = Math.PI * 2;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'TorusGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\ttube: tube,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\ttubularSegments: tubularSegments,\n\t\t\t\tarc: arc\n\t\t\t};\n\t\t\tradialSegments = Math.floor(radialSegments);\n\t\t\ttubularSegments = Math.floor(tubularSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar center = new Vector3();\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar normal = new Vector3(); // generate vertices, normals and uvs\n\n\t\t\tfor (var j = 0; j <= radialSegments; j++) {\n\t\t\t\tfor (var i = 0; i <= tubularSegments; i++) {\n\t\t\t\t\tvar u = i / tubularSegments * arc;\n\t\t\t\t\tvar v = j / radialSegments * Math.PI * 2; // vertex\n\n\t\t\t\t\tvertex.x = (radius + tube * Math.cos(v)) * Math.cos(u);\n\t\t\t\t\tvertex.y = (radius + tube * Math.cos(v)) * Math.sin(u);\n\t\t\t\t\tvertex.z = tube * Math.sin(v);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal\n\n\t\t\t\t\tcenter.x = radius * Math.cos(u);\n\t\t\t\t\tcenter.y = radius * Math.sin(u);\n\t\t\t\t\tnormal.subVectors(vertex, center).normalize();\n\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\t\tuvs.push(i / tubularSegments);\n\t\t\t\t\tuvs.push(j / radialSegments);\n\t\t\t\t}\n\t\t\t} // generate indices\n\n\n\t\t\tfor (var _j = 1; _j <= radialSegments; _j++) {\n\t\t\t\tfor (var _i = 1; _i <= tubularSegments; _i++) {\n\t\t\t\t\t// indices\n\t\t\t\t\tvar a = (tubularSegments + 1) * _j + _i - 1;\n\t\t\t\t\tvar b = (tubularSegments + 1) * (_j - 1) + _i - 1;\n\t\t\t\t\tvar c = (tubularSegments + 1) * (_j - 1) + _i;\n\t\t\t\t\tvar d = (tubularSegments + 1) * _j + _i; // faces\n\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn TorusGeometry;\n\t}(BufferGeometry);\n\n\tvar TorusKnotGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(TorusKnotGeometry, _BufferGeometry);\n\n\t\tfunction TorusKnotGeometry(radius, tube, tubularSegments, radialSegments, p, q) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (tube === void 0) {\n\t\t\t\ttube = 0.4;\n\t\t\t}\n\n\t\t\tif (tubularSegments === void 0) {\n\t\t\t\ttubularSegments = 64;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (p === void 0) {\n\t\t\t\tp = 2;\n\t\t\t}\n\n\t\t\tif (q === void 0) {\n\t\t\t\tq = 3;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'TorusKnotGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tradius: radius,\n\t\t\t\ttube: tube,\n\t\t\t\ttubularSegments: tubularSegments,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\tp: p,\n\t\t\t\tq: q\n\t\t\t};\n\t\t\ttubularSegments = Math.floor(tubularSegments);\n\t\t\tradialSegments = Math.floor(radialSegments); // buffers\n\n\t\t\tvar indices = [];\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = []; // helper variables\n\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar normal = new Vector3();\n\t\t\tvar P1 = new Vector3();\n\t\t\tvar P2 = new Vector3();\n\t\t\tvar B = new Vector3();\n\t\t\tvar T = new Vector3();\n\t\t\tvar N = new Vector3(); // generate vertices, normals and uvs\n\n\t\t\tfor (var i = 0; i <= tubularSegments; ++i) {\n\t\t\t\t// the radian \"u\" is used to calculate the position on the torus curve of the current tubular segement\n\t\t\t\tvar u = i / tubularSegments * p * Math.PI * 2; // now we calculate two points. P1 is our current position on the curve, P2 is a little farther ahead.\n\t\t\t\t// these points are used to create a special \"coordinate space\", which is necessary to calculate the correct vertex positions\n\n\t\t\t\tcalculatePositionOnCurve(u, p, q, radius, P1);\n\t\t\t\tcalculatePositionOnCurve(u + 0.01, p, q, radius, P2); // calculate orthonormal basis\n\n\t\t\t\tT.subVectors(P2, P1);\n\t\t\t\tN.addVectors(P2, P1);\n\t\t\t\tB.crossVectors(T, N);\n\t\t\t\tN.crossVectors(B, T); // normalize B, N. T can be ignored, we don't use it\n\n\t\t\t\tB.normalize();\n\t\t\t\tN.normalize();\n\n\t\t\t\tfor (var j = 0; j <= radialSegments; ++j) {\n\t\t\t\t\t// now calculate the vertices. they are nothing more than an extrusion of the torus curve.\n\t\t\t\t\t// because we extrude a shape in the xy-plane, there is no need to calculate a z-value.\n\t\t\t\t\tvar v = j / radialSegments * Math.PI * 2;\n\t\t\t\t\tvar cx = -tube * Math.cos(v);\n\t\t\t\t\tvar cy = tube * Math.sin(v); // now calculate the final vertex position.\n\t\t\t\t\t// first we orient the extrusion with our basis vectos, then we add it to the current position on the curve\n\n\t\t\t\t\tvertex.x = P1.x + (cx * N.x + cy * B.x);\n\t\t\t\t\tvertex.y = P1.y + (cx * N.y + cy * B.y);\n\t\t\t\t\tvertex.z = P1.z + (cx * N.z + cy * B.z);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z); // normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)\n\n\t\t\t\t\tnormal.subVectors(vertex, P1).normalize();\n\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // uv\n\n\t\t\t\t\tuvs.push(i / tubularSegments);\n\t\t\t\t\tuvs.push(j / radialSegments);\n\t\t\t\t}\n\t\t\t} // generate indices\n\n\n\t\t\tfor (var _j = 1; _j <= tubularSegments; _j++) {\n\t\t\t\tfor (var _i = 1; _i <= radialSegments; _i++) {\n\t\t\t\t\t// indices\n\t\t\t\t\tvar a = (radialSegments + 1) * (_j - 1) + (_i - 1);\n\t\t\t\t\tvar b = (radialSegments + 1) * _j + (_i - 1);\n\t\t\t\t\tvar c = (radialSegments + 1) * _j + _i;\n\t\t\t\t\tvar d = (radialSegments + 1) * (_j - 1) + _i; // faces\n\n\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // this function calculates the current position on the torus curve\n\n\n\t\t\tfunction calculatePositionOnCurve(u, p, q, radius, position) {\n\t\t\t\tvar cu = Math.cos(u);\n\t\t\t\tvar su = Math.sin(u);\n\t\t\t\tvar quOverP = q / p * u;\n\t\t\t\tvar cs = Math.cos(quOverP);\n\t\t\t\tposition.x = radius * (2 + cs) * 0.5 * cu;\n\t\t\t\tposition.y = radius * (2 + cs) * su * 0.5;\n\t\t\t\tposition.z = radius * Math.sin(quOverP) * 0.5;\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn TorusKnotGeometry;\n\t}(BufferGeometry);\n\n\tvar TubeGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(TubeGeometry, _BufferGeometry);\n\n\t\tfunction TubeGeometry(path, tubularSegments, radius, radialSegments, closed) {\n\t\t\tvar _this;\n\n\t\t\tif (tubularSegments === void 0) {\n\t\t\t\ttubularSegments = 64;\n\t\t\t}\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (radialSegments === void 0) {\n\t\t\t\tradialSegments = 8;\n\t\t\t}\n\n\t\t\tif (closed === void 0) {\n\t\t\t\tclosed = false;\n\t\t\t}\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'TubeGeometry';\n\t\t\t_this.parameters = {\n\t\t\t\tpath: path,\n\t\t\t\ttubularSegments: tubularSegments,\n\t\t\t\tradius: radius,\n\t\t\t\tradialSegments: radialSegments,\n\t\t\t\tclosed: closed\n\t\t\t};\n\t\t\tvar frames = path.computeFrenetFrames(tubularSegments, closed); // expose internals\n\n\t\t\t_this.tangents = frames.tangents;\n\t\t\t_this.normals = frames.normals;\n\t\t\t_this.binormals = frames.binormals; // helper variables\n\n\t\t\tvar vertex = new Vector3();\n\t\t\tvar normal = new Vector3();\n\t\t\tvar uv = new Vector2();\n\t\t\tvar P = new Vector3(); // buffer\n\n\t\t\tvar vertices = [];\n\t\t\tvar normals = [];\n\t\t\tvar uvs = [];\n\t\t\tvar indices = []; // create buffer data\n\n\t\t\tgenerateBufferData(); // build geometry\n\n\t\t\t_this.setIndex(indices);\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\t_this.setAttribute('normal', new Float32BufferAttribute(normals, 3));\n\n\t\t\t_this.setAttribute('uv', new Float32BufferAttribute(uvs, 2)); // functions\n\n\n\t\t\tfunction generateBufferData() {\n\t\t\t\tfor (var i = 0; i < tubularSegments; i++) {\n\t\t\t\t\tgenerateSegment(i);\n\t\t\t\t} // if the geometry is not closed, generate the last row of vertices and normals\n\t\t\t\t// at the regular position on the given path\n\t\t\t\t//\n\t\t\t\t// if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)\n\n\n\t\t\t\tgenerateSegment(closed === false ? tubularSegments : 0); // uvs are generated in a separate function.\n\t\t\t\t// this makes it easy compute correct values for closed geometries\n\n\t\t\t\tgenerateUVs(); // finally create faces\n\n\t\t\t\tgenerateIndices();\n\t\t\t}\n\n\t\t\tfunction generateSegment(i) {\n\t\t\t\t// we use getPointAt to sample evenly distributed points from the given path\n\t\t\t\tP = path.getPointAt(i / tubularSegments, P); // retrieve corresponding normal and binormal\n\n\t\t\t\tvar N = frames.normals[i];\n\t\t\t\tvar B = frames.binormals[i]; // generate normals and vertices for the current segment\n\n\t\t\t\tfor (var j = 0; j <= radialSegments; j++) {\n\t\t\t\t\tvar v = j / radialSegments * Math.PI * 2;\n\t\t\t\t\tvar sin = Math.sin(v);\n\t\t\t\t\tvar cos = -Math.cos(v); // normal\n\n\t\t\t\t\tnormal.x = cos * N.x + sin * B.x;\n\t\t\t\t\tnormal.y = cos * N.y + sin * B.y;\n\t\t\t\t\tnormal.z = cos * N.z + sin * B.z;\n\t\t\t\t\tnormal.normalize();\n\t\t\t\t\tnormals.push(normal.x, normal.y, normal.z); // vertex\n\n\t\t\t\t\tvertex.x = P.x + radius * normal.x;\n\t\t\t\t\tvertex.y = P.y + radius * normal.y;\n\t\t\t\t\tvertex.z = P.z + radius * normal.z;\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction generateIndices() {\n\t\t\t\tfor (var j = 1; j <= tubularSegments; j++) {\n\t\t\t\t\tfor (var i = 1; i <= radialSegments; i++) {\n\t\t\t\t\t\tvar a = (radialSegments + 1) * (j - 1) + (i - 1);\n\t\t\t\t\t\tvar b = (radialSegments + 1) * j + (i - 1);\n\t\t\t\t\t\tvar c = (radialSegments + 1) * j + i;\n\t\t\t\t\t\tvar d = (radialSegments + 1) * (j - 1) + i; // faces\n\n\t\t\t\t\t\tindices.push(a, b, d);\n\t\t\t\t\t\tindices.push(b, c, d);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction generateUVs() {\n\t\t\t\tfor (var i = 0; i <= tubularSegments; i++) {\n\t\t\t\t\tfor (var j = 0; j <= radialSegments; j++) {\n\t\t\t\t\t\tuv.x = i / tubularSegments;\n\t\t\t\t\t\tuv.y = j / radialSegments;\n\t\t\t\t\t\tuvs.push(uv.x, uv.y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = TubeGeometry.prototype;\n\n\t\t_proto.toJSON = function toJSON() {\n\t\t\tvar data = BufferGeometry.prototype.toJSON.call(this);\n\t\t\tdata.path = this.parameters.path.toJSON();\n\t\t\treturn data;\n\t\t};\n\n\t\treturn TubeGeometry;\n\t}(BufferGeometry);\n\n\tvar WireframeGeometry = /*#__PURE__*/function (_BufferGeometry) {\n\t\t_inheritsLoose(WireframeGeometry, _BufferGeometry);\n\n\t\tfunction WireframeGeometry(geometry) {\n\t\t\tvar _this;\n\n\t\t\t_this = _BufferGeometry.call(this) || this;\n\t\t\t_this.type = 'WireframeGeometry';\n\n\t\t\tif (geometry.isGeometry === true) {\n\t\t\t\tconsole.error('THREE.WireframeGeometry no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.');\n\t\t\t\treturn _assertThisInitialized(_this);\n\t\t\t} // buffer\n\n\n\t\t\tvar vertices = []; // helper variables\n\n\t\t\tvar edge = [0, 0],\n\t\t\t\t\tedges = {};\n\t\t\tvar vertex = new Vector3();\n\n\t\t\tif (geometry.index !== null) {\n\t\t\t\t// indexed BufferGeometry\n\t\t\t\tvar position = geometry.attributes.position;\n\t\t\t\tvar indices = geometry.index;\n\t\t\t\tvar groups = geometry.groups;\n\n\t\t\t\tif (groups.length === 0) {\n\t\t\t\t\tgroups = [{\n\t\t\t\t\t\tstart: 0,\n\t\t\t\t\t\tcount: indices.count,\n\t\t\t\t\t\tmaterialIndex: 0\n\t\t\t\t\t}];\n\t\t\t\t} // create a data structure that contains all eges without duplicates\n\n\n\t\t\t\tfor (var o = 0, ol = groups.length; o < ol; ++o) {\n\t\t\t\t\tvar group = groups[o];\n\t\t\t\t\tvar start = group.start;\n\t\t\t\t\tvar count = group.count;\n\n\t\t\t\t\tfor (var i = start, l = start + count; i < l; i += 3) {\n\t\t\t\t\t\tfor (var j = 0; j < 3; j++) {\n\t\t\t\t\t\t\tvar edge1 = indices.getX(i + j);\n\t\t\t\t\t\t\tvar edge2 = indices.getX(i + (j + 1) % 3);\n\t\t\t\t\t\t\tedge[0] = Math.min(edge1, edge2); // sorting prevents duplicates\n\n\t\t\t\t\t\t\tedge[1] = Math.max(edge1, edge2);\n\t\t\t\t\t\t\tvar key = edge[0] + ',' + edge[1];\n\n\t\t\t\t\t\t\tif (edges[key] === undefined) {\n\t\t\t\t\t\t\t\tedges[key] = {\n\t\t\t\t\t\t\t\t\tindex1: edge[0],\n\t\t\t\t\t\t\t\t\tindex2: edge[1]\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // generate vertices\n\n\n\t\t\t\tfor (var _key in edges) {\n\t\t\t\t\tvar e = edges[_key];\n\t\t\t\t\tvertex.fromBufferAttribute(position, e.index1);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t\tvertex.fromBufferAttribute(position, e.index2);\n\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// non-indexed BufferGeometry\n\t\t\t\tvar _position = geometry.attributes.position;\n\n\t\t\t\tfor (var _i = 0, _l = _position.count / 3; _i < _l; _i++) {\n\t\t\t\t\tfor (var _j = 0; _j < 3; _j++) {\n\t\t\t\t\t\t// three edges per triangle, an edge is represented as (index1, index2)\n\t\t\t\t\t\t// e.g. the first triangle has the following edges: (0,1),(1,2),(2,0)\n\t\t\t\t\t\tvar index1 = 3 * _i + _j;\n\t\t\t\t\t\tvertex.fromBufferAttribute(_position, index1);\n\t\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t\t\tvar index2 = 3 * _i + (_j + 1) % 3;\n\t\t\t\t\t\tvertex.fromBufferAttribute(_position, index2);\n\t\t\t\t\t\tvertices.push(vertex.x, vertex.y, vertex.z);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // build geometry\n\n\n\t\t\t_this.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn WireframeGeometry;\n\t}(BufferGeometry);\n\n\tvar Geometries = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tBoxGeometry: BoxGeometry,\n\t\tBoxBufferGeometry: BoxGeometry,\n\t\tCircleGeometry: CircleGeometry,\n\t\tCircleBufferGeometry: CircleGeometry,\n\t\tConeGeometry: ConeGeometry,\n\t\tConeBufferGeometry: ConeGeometry,\n\t\tCylinderGeometry: CylinderGeometry,\n\t\tCylinderBufferGeometry: CylinderGeometry,\n\t\tDodecahedronGeometry: DodecahedronGeometry,\n\t\tDodecahedronBufferGeometry: DodecahedronGeometry,\n\t\tEdgesGeometry: EdgesGeometry,\n\t\tExtrudeGeometry: ExtrudeGeometry,\n\t\tExtrudeBufferGeometry: ExtrudeGeometry,\n\t\tIcosahedronGeometry: IcosahedronGeometry,\n\t\tIcosahedronBufferGeometry: IcosahedronGeometry,\n\t\tLatheGeometry: LatheGeometry,\n\t\tLatheBufferGeometry: LatheGeometry,\n\t\tOctahedronGeometry: OctahedronGeometry,\n\t\tOctahedronBufferGeometry: OctahedronGeometry,\n\t\tParametricGeometry: ParametricGeometry,\n\t\tParametricBufferGeometry: ParametricGeometry,\n\t\tPlaneGeometry: PlaneGeometry,\n\t\tPlaneBufferGeometry: PlaneGeometry,\n\t\tPolyhedronGeometry: PolyhedronGeometry,\n\t\tPolyhedronBufferGeometry: PolyhedronGeometry,\n\t\tRingGeometry: RingGeometry,\n\t\tRingBufferGeometry: RingGeometry,\n\t\tShapeGeometry: ShapeGeometry,\n\t\tShapeBufferGeometry: ShapeGeometry,\n\t\tSphereGeometry: SphereGeometry,\n\t\tSphereBufferGeometry: SphereGeometry,\n\t\tTetrahedronGeometry: TetrahedronGeometry,\n\t\tTetrahedronBufferGeometry: TetrahedronGeometry,\n\t\tTextGeometry: TextGeometry,\n\t\tTextBufferGeometry: TextGeometry,\n\t\tTorusGeometry: TorusGeometry,\n\t\tTorusBufferGeometry: TorusGeometry,\n\t\tTorusKnotGeometry: TorusKnotGeometry,\n\t\tTorusKnotBufferGeometry: TorusKnotGeometry,\n\t\tTubeGeometry: TubeGeometry,\n\t\tTubeBufferGeometry: TubeGeometry,\n\t\tWireframeGeometry: WireframeGeometry\n\t});\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <THREE.Color>\n\t * }\n\t */\n\n\tfunction ShadowMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'ShadowMaterial';\n\t\tthis.color = new Color(0x000000);\n\t\tthis.transparent = true;\n\t\tthis.setValues(parameters);\n\t}\n\n\tShadowMaterial.prototype = Object.create(Material.prototype);\n\tShadowMaterial.prototype.constructor = ShadowMaterial;\n\tShadowMaterial.prototype.isShadowMaterial = true;\n\n\tShadowMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\treturn this;\n\t};\n\n\tfunction RawShaderMaterial(parameters) {\n\t\tShaderMaterial.call(this, parameters);\n\t\tthis.type = 'RawShaderMaterial';\n\t}\n\n\tRawShaderMaterial.prototype = Object.create(ShaderMaterial.prototype);\n\tRawShaderMaterial.prototype.constructor = RawShaderMaterial;\n\tRawShaderMaterial.prototype.isRawShaderMaterial = true;\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\troughness: <float>,\n\t *\tmetalness: <float>,\n\t *\topacity: <float>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\temissive: <hex>,\n\t *\temissiveIntensity: <float>\n\t *\temissiveMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\troughnessMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tmetalnessMap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tenvMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n\t *\tenvMapIntensity: <float>\n\t *\n\t *\trefractionRatio: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshStandardMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.defines = {\n\t\t\t'STANDARD': ''\n\t\t};\n\t\tthis.type = 'MeshStandardMaterial';\n\t\tthis.color = new Color(0xffffff); // diffuse\n\n\t\tthis.roughness = 1.0;\n\t\tthis.metalness = 0.0;\n\t\tthis.map = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.emissive = new Color(0x000000);\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.roughnessMap = null;\n\t\tthis.metalnessMap = null;\n\t\tthis.alphaMap = null;\n\t\tthis.envMap = null;\n\t\tthis.envMapIntensity = 1.0;\n\t\tthis.refractionRatio = 0.98;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.vertexTangents = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshStandardMaterial.prototype = Object.create(Material.prototype);\n\tMeshStandardMaterial.prototype.constructor = MeshStandardMaterial;\n\tMeshStandardMaterial.prototype.isMeshStandardMaterial = true;\n\n\tMeshStandardMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.defines = {\n\t\t\t'STANDARD': ''\n\t\t};\n\t\tthis.color.copy(source.color);\n\t\tthis.roughness = source.roughness;\n\t\tthis.metalness = source.metalness;\n\t\tthis.map = source.map;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.emissive.copy(source.emissive);\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.roughnessMap = source.roughnessMap;\n\t\tthis.metalnessMap = source.metalnessMap;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.envMap = source.envMap;\n\t\tthis.envMapIntensity = source.envMapIntensity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\tthis.vertexTangents = source.vertexTangents;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tclearcoat: <float>,\n\t *\tclearcoatMap: new THREE.Texture( <Image> ),\n\t *\tclearcoatRoughness: <float>,\n\t *\tclearcoatRoughnessMap: new THREE.Texture( <Image> ),\n\t *\tclearcoatNormalScale: <Vector2>,\n\t *\tclearcoatNormalMap: new THREE.Texture( <Image> ),\n\t *\n\t *\treflectivity: <float>,\n\t *\tior: <float>,\n\t *\n\t *\tsheen: <Color>,\n\t *\n\t *\ttransmission: <float>,\n\t *\ttransmissionMap: new THREE.Texture( <Image> )\n\t * }\n\t */\n\n\tfunction MeshPhysicalMaterial(parameters) {\n\t\tMeshStandardMaterial.call(this);\n\t\tthis.defines = {\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\t\t};\n\t\tthis.type = 'MeshPhysicalMaterial';\n\t\tthis.clearcoat = 0.0;\n\t\tthis.clearcoatMap = null;\n\t\tthis.clearcoatRoughness = 0.0;\n\t\tthis.clearcoatRoughnessMap = null;\n\t\tthis.clearcoatNormalScale = new Vector2(1, 1);\n\t\tthis.clearcoatNormalMap = null;\n\t\tthis.reflectivity = 0.5; // maps to F0 = 0.04\n\n\t\tObject.defineProperty(this, 'ior', {\n\t\t\tget: function get() {\n\t\t\t\treturn (1 + 0.4 * this.reflectivity) / (1 - 0.4 * this.reflectivity);\n\t\t\t},\n\t\t\tset: function set(ior) {\n\t\t\t\tthis.reflectivity = MathUtils.clamp(2.5 * (ior - 1) / (ior + 1), 0, 1);\n\t\t\t}\n\t\t});\n\t\tthis.sheen = null; // null will disable sheen bsdf\n\n\t\tthis.transmission = 0.0;\n\t\tthis.transmissionMap = null;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshPhysicalMaterial.prototype = Object.create(MeshStandardMaterial.prototype);\n\tMeshPhysicalMaterial.prototype.constructor = MeshPhysicalMaterial;\n\tMeshPhysicalMaterial.prototype.isMeshPhysicalMaterial = true;\n\n\tMeshPhysicalMaterial.prototype.copy = function (source) {\n\t\tMeshStandardMaterial.prototype.copy.call(this, source);\n\t\tthis.defines = {\n\t\t\t'STANDARD': '',\n\t\t\t'PHYSICAL': ''\n\t\t};\n\t\tthis.clearcoat = source.clearcoat;\n\t\tthis.clearcoatMap = source.clearcoatMap;\n\t\tthis.clearcoatRoughness = source.clearcoatRoughness;\n\t\tthis.clearcoatRoughnessMap = source.clearcoatRoughnessMap;\n\t\tthis.clearcoatNormalMap = source.clearcoatNormalMap;\n\t\tthis.clearcoatNormalScale.copy(source.clearcoatNormalScale);\n\t\tthis.reflectivity = source.reflectivity;\n\n\t\tif (source.sheen) {\n\t\t\tthis.sheen = (this.sheen || new Color()).copy(source.sheen);\n\t\t} else {\n\t\t\tthis.sheen = null;\n\t\t}\n\n\t\tthis.transmission = source.transmission;\n\t\tthis.transmissionMap = source.transmissionMap;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\tspecular: <hex>,\n\t *\tshininess: <float>,\n\t *\topacity: <float>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\temissive: <hex>,\n\t *\temissiveIntensity: <float>\n\t *\temissiveMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\tspecularMap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tenvMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n\t *\tcombine: THREE.MultiplyOperation,\n\t *\treflectivity: <float>,\n\t *\trefractionRatio: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshPhongMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshPhongMaterial';\n\t\tthis.color = new Color(0xffffff); // diffuse\n\n\t\tthis.specular = new Color(0x111111);\n\t\tthis.shininess = 30;\n\t\tthis.map = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.emissive = new Color(0x000000);\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.specularMap = null;\n\t\tthis.alphaMap = null;\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshPhongMaterial.prototype = Object.create(Material.prototype);\n\tMeshPhongMaterial.prototype.constructor = MeshPhongMaterial;\n\tMeshPhongMaterial.prototype.isMeshPhongMaterial = true;\n\n\tMeshPhongMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.specular.copy(source.specular);\n\t\tthis.shininess = source.shininess;\n\t\tthis.map = source.map;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.emissive.copy(source.emissive);\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.specularMap = source.specularMap;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\tgradientMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\temissive: <hex>,\n\t *\temissiveIntensity: <float>\n\t *\temissiveMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshToonMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.defines = {\n\t\t\t'TOON': ''\n\t\t};\n\t\tthis.type = 'MeshToonMaterial';\n\t\tthis.color = new Color(0xffffff);\n\t\tthis.map = null;\n\t\tthis.gradientMap = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.emissive = new Color(0x000000);\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.alphaMap = null;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshToonMaterial.prototype = Object.create(Material.prototype);\n\tMeshToonMaterial.prototype.constructor = MeshToonMaterial;\n\tMeshToonMaterial.prototype.isMeshToonMaterial = true;\n\n\tMeshToonMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.gradientMap = source.gradientMap;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.emissive.copy(source.emissive);\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\topacity: <float>,\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshNormalMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshNormalMaterial';\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.fog = false;\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshNormalMaterial.prototype = Object.create(Material.prototype);\n\tMeshNormalMaterial.prototype.constructor = MeshNormalMaterial;\n\tMeshNormalMaterial.prototype.isMeshNormalMaterial = true;\n\n\tMeshNormalMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tlightMap: new THREE.Texture( <Image> ),\n\t *\tlightMapIntensity: <float>\n\t *\n\t *\taoMap: new THREE.Texture( <Image> ),\n\t *\taoMapIntensity: <float>\n\t *\n\t *\temissive: <hex>,\n\t *\temissiveIntensity: <float>\n\t *\temissiveMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tspecularMap: new THREE.Texture( <Image> ),\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tenvMap: new THREE.CubeTexture( [posx, negx, posy, negy, posz, negz] ),\n\t *\tcombine: THREE.Multiply,\n\t *\treflectivity: <float>,\n\t *\trefractionRatio: <float>,\n\t *\n\t *\twireframe: <boolean>,\n\t *\twireframeLinewidth: <float>,\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshLambertMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.type = 'MeshLambertMaterial';\n\t\tthis.color = new Color(0xffffff); // diffuse\n\n\t\tthis.map = null;\n\t\tthis.lightMap = null;\n\t\tthis.lightMapIntensity = 1.0;\n\t\tthis.aoMap = null;\n\t\tthis.aoMapIntensity = 1.0;\n\t\tthis.emissive = new Color(0x000000);\n\t\tthis.emissiveIntensity = 1.0;\n\t\tthis.emissiveMap = null;\n\t\tthis.specularMap = null;\n\t\tthis.alphaMap = null;\n\t\tthis.envMap = null;\n\t\tthis.combine = MultiplyOperation;\n\t\tthis.reflectivity = 1;\n\t\tthis.refractionRatio = 0.98;\n\t\tthis.wireframe = false;\n\t\tthis.wireframeLinewidth = 1;\n\t\tthis.wireframeLinecap = 'round';\n\t\tthis.wireframeLinejoin = 'round';\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshLambertMaterial.prototype = Object.create(Material.prototype);\n\tMeshLambertMaterial.prototype.constructor = MeshLambertMaterial;\n\tMeshLambertMaterial.prototype.isMeshLambertMaterial = true;\n\n\tMeshLambertMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.color.copy(source.color);\n\t\tthis.map = source.map;\n\t\tthis.lightMap = source.lightMap;\n\t\tthis.lightMapIntensity = source.lightMapIntensity;\n\t\tthis.aoMap = source.aoMap;\n\t\tthis.aoMapIntensity = source.aoMapIntensity;\n\t\tthis.emissive.copy(source.emissive);\n\t\tthis.emissiveMap = source.emissiveMap;\n\t\tthis.emissiveIntensity = source.emissiveIntensity;\n\t\tthis.specularMap = source.specularMap;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.envMap = source.envMap;\n\t\tthis.combine = source.combine;\n\t\tthis.reflectivity = source.reflectivity;\n\t\tthis.refractionRatio = source.refractionRatio;\n\t\tthis.wireframe = source.wireframe;\n\t\tthis.wireframeLinewidth = source.wireframeLinewidth;\n\t\tthis.wireframeLinecap = source.wireframeLinecap;\n\t\tthis.wireframeLinejoin = source.wireframeLinejoin;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\n\t *\tmatcap: new THREE.Texture( <Image> ),\n\t *\n\t *\tmap: new THREE.Texture( <Image> ),\n\t *\n\t *\tbumpMap: new THREE.Texture( <Image> ),\n\t *\tbumpScale: <float>,\n\t *\n\t *\tnormalMap: new THREE.Texture( <Image> ),\n\t *\tnormalMapType: THREE.TangentSpaceNormalMap,\n\t *\tnormalScale: <Vector2>,\n\t *\n\t *\tdisplacementMap: new THREE.Texture( <Image> ),\n\t *\tdisplacementScale: <float>,\n\t *\tdisplacementBias: <float>,\n\t *\n\t *\talphaMap: new THREE.Texture( <Image> ),\n\t *\n\t *\tskinning: <bool>,\n\t *\tmorphTargets: <bool>,\n\t *\tmorphNormals: <bool>\n\t * }\n\t */\n\n\tfunction MeshMatcapMaterial(parameters) {\n\t\tMaterial.call(this);\n\t\tthis.defines = {\n\t\t\t'MATCAP': ''\n\t\t};\n\t\tthis.type = 'MeshMatcapMaterial';\n\t\tthis.color = new Color(0xffffff); // diffuse\n\n\t\tthis.matcap = null;\n\t\tthis.map = null;\n\t\tthis.bumpMap = null;\n\t\tthis.bumpScale = 1;\n\t\tthis.normalMap = null;\n\t\tthis.normalMapType = TangentSpaceNormalMap;\n\t\tthis.normalScale = new Vector2(1, 1);\n\t\tthis.displacementMap = null;\n\t\tthis.displacementScale = 1;\n\t\tthis.displacementBias = 0;\n\t\tthis.alphaMap = null;\n\t\tthis.skinning = false;\n\t\tthis.morphTargets = false;\n\t\tthis.morphNormals = false;\n\t\tthis.setValues(parameters);\n\t}\n\n\tMeshMatcapMaterial.prototype = Object.create(Material.prototype);\n\tMeshMatcapMaterial.prototype.constructor = MeshMatcapMaterial;\n\tMeshMatcapMaterial.prototype.isMeshMatcapMaterial = true;\n\n\tMeshMatcapMaterial.prototype.copy = function (source) {\n\t\tMaterial.prototype.copy.call(this, source);\n\t\tthis.defines = {\n\t\t\t'MATCAP': ''\n\t\t};\n\t\tthis.color.copy(source.color);\n\t\tthis.matcap = source.matcap;\n\t\tthis.map = source.map;\n\t\tthis.bumpMap = source.bumpMap;\n\t\tthis.bumpScale = source.bumpScale;\n\t\tthis.normalMap = source.normalMap;\n\t\tthis.normalMapType = source.normalMapType;\n\t\tthis.normalScale.copy(source.normalScale);\n\t\tthis.displacementMap = source.displacementMap;\n\t\tthis.displacementScale = source.displacementScale;\n\t\tthis.displacementBias = source.displacementBias;\n\t\tthis.alphaMap = source.alphaMap;\n\t\tthis.skinning = source.skinning;\n\t\tthis.morphTargets = source.morphTargets;\n\t\tthis.morphNormals = source.morphNormals;\n\t\treturn this;\n\t};\n\n\t/**\n\t * parameters = {\n\t *\tcolor: <hex>,\n\t *\topacity: <float>,\n\t *\n\t *\tlinewidth: <float>,\n\t *\n\t *\tscale: <float>,\n\t *\tdashSize: <float>,\n\t *\tgapSize: <float>\n\t * }\n\t */\n\n\tfunction LineDashedMaterial(parameters) {\n\t\tLineBasicMaterial.call(this);\n\t\tthis.type = 'LineDashedMaterial';\n\t\tthis.scale = 1;\n\t\tthis.dashSize = 3;\n\t\tthis.gapSize = 1;\n\t\tthis.setValues(parameters);\n\t}\n\n\tLineDashedMaterial.prototype = Object.create(LineBasicMaterial.prototype);\n\tLineDashedMaterial.prototype.constructor = LineDashedMaterial;\n\tLineDashedMaterial.prototype.isLineDashedMaterial = true;\n\n\tLineDashedMaterial.prototype.copy = function (source) {\n\t\tLineBasicMaterial.prototype.copy.call(this, source);\n\t\tthis.scale = source.scale;\n\t\tthis.dashSize = source.dashSize;\n\t\tthis.gapSize = source.gapSize;\n\t\treturn this;\n\t};\n\n\tvar Materials = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tShadowMaterial: ShadowMaterial,\n\t\tSpriteMaterial: SpriteMaterial,\n\t\tRawShaderMaterial: RawShaderMaterial,\n\t\tShaderMaterial: ShaderMaterial,\n\t\tPointsMaterial: PointsMaterial,\n\t\tMeshPhysicalMaterial: MeshPhysicalMaterial,\n\t\tMeshStandardMaterial: MeshStandardMaterial,\n\t\tMeshPhongMaterial: MeshPhongMaterial,\n\t\tMeshToonMaterial: MeshToonMaterial,\n\t\tMeshNormalMaterial: MeshNormalMaterial,\n\t\tMeshLambertMaterial: MeshLambertMaterial,\n\t\tMeshDepthMaterial: MeshDepthMaterial,\n\t\tMeshDistanceMaterial: MeshDistanceMaterial,\n\t\tMeshBasicMaterial: MeshBasicMaterial,\n\t\tMeshMatcapMaterial: MeshMatcapMaterial,\n\t\tLineDashedMaterial: LineDashedMaterial,\n\t\tLineBasicMaterial: LineBasicMaterial,\n\t\tMaterial: Material\n\t});\n\n\tvar AnimationUtils = {\n\t\t// same as Array.prototype.slice, but also works on typed arrays\n\t\tarraySlice: function arraySlice(array, from, to) {\n\t\t\tif (AnimationUtils.isTypedArray(array)) {\n\t\t\t\t// in ios9 array.subarray(from, undefined) will return empty array\n\t\t\t\t// but array.subarray(from) or array.subarray(from, len) is correct\n\t\t\t\treturn new array.constructor(array.subarray(from, to !== undefined ? to : array.length));\n\t\t\t}\n\n\t\t\treturn array.slice(from, to);\n\t\t},\n\t\t// converts an array to a specific type\n\t\tconvertArray: function convertArray(array, type, forceClone) {\n\t\t\tif (!array || // let 'undefined' and 'null' pass\n\t\t\t!forceClone && array.constructor === type) return array;\n\n\t\t\tif (typeof type.BYTES_PER_ELEMENT === 'number') {\n\t\t\t\treturn new type(array); // create typed array\n\t\t\t}\n\n\t\t\treturn Array.prototype.slice.call(array); // create Array\n\t\t},\n\t\tisTypedArray: function isTypedArray(object) {\n\t\t\treturn ArrayBuffer.isView(object) && !(object instanceof DataView);\n\t\t},\n\t\t// returns an array by which times and values can be sorted\n\t\tgetKeyframeOrder: function getKeyframeOrder(times) {\n\t\t\tfunction compareTime(i, j) {\n\t\t\t\treturn times[i] - times[j];\n\t\t\t}\n\n\t\t\tvar n = times.length;\n\t\t\tvar result = new Array(n);\n\n\t\t\tfor (var i = 0; i !== n; ++i) {\n\t\t\t\tresult[i] = i;\n\t\t\t}\n\n\t\t\tresult.sort(compareTime);\n\t\t\treturn result;\n\t\t},\n\t\t// uses the array previously returned by 'getKeyframeOrder' to sort data\n\t\tsortedArray: function sortedArray(values, stride, order) {\n\t\t\tvar nValues = values.length;\n\t\t\tvar result = new values.constructor(nValues);\n\n\t\t\tfor (var i = 0, dstOffset = 0; dstOffset !== nValues; ++i) {\n\t\t\t\tvar srcOffset = order[i] * stride;\n\n\t\t\t\tfor (var j = 0; j !== stride; ++j) {\n\t\t\t\t\tresult[dstOffset++] = values[srcOffset + j];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t},\n\t\t// function for parsing AOS keyframe formats\n\t\tflattenJSON: function flattenJSON(jsonKeys, times, values, valuePropertyName) {\n\t\t\tvar i = 1,\n\t\t\t\t\tkey = jsonKeys[0];\n\n\t\t\twhile (key !== undefined && key[valuePropertyName] === undefined) {\n\t\t\t\tkey = jsonKeys[i++];\n\t\t\t}\n\n\t\t\tif (key === undefined) return; // no data\n\n\t\t\tvar value = key[valuePropertyName];\n\t\t\tif (value === undefined) return; // no data\n\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tdo {\n\t\t\t\t\tvalue = key[valuePropertyName];\n\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\ttimes.push(key.time);\n\t\t\t\t\t\tvalues.push.apply(values, value); // push all elements\n\t\t\t\t\t}\n\n\t\t\t\t\tkey = jsonKeys[i++];\n\t\t\t\t} while (key !== undefined);\n\t\t\t} else if (value.toArray !== undefined) {\n\t\t\t\t// ...assume THREE.Math-ish\n\t\t\t\tdo {\n\t\t\t\t\tvalue = key[valuePropertyName];\n\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\ttimes.push(key.time);\n\t\t\t\t\t\tvalue.toArray(values, values.length);\n\t\t\t\t\t}\n\n\t\t\t\t\tkey = jsonKeys[i++];\n\t\t\t\t} while (key !== undefined);\n\t\t\t} else {\n\t\t\t\t// otherwise push as-is\n\t\t\t\tdo {\n\t\t\t\t\tvalue = key[valuePropertyName];\n\n\t\t\t\t\tif (value !== undefined) {\n\t\t\t\t\t\ttimes.push(key.time);\n\t\t\t\t\t\tvalues.push(value);\n\t\t\t\t\t}\n\n\t\t\t\t\tkey = jsonKeys[i++];\n\t\t\t\t} while (key !== undefined);\n\t\t\t}\n\t\t},\n\t\tsubclip: function subclip(sourceClip, name, startFrame, endFrame, fps) {\n\t\t\tif (fps === void 0) {\n\t\t\t\tfps = 30;\n\t\t\t}\n\n\t\t\tvar clip = sourceClip.clone();\n\t\t\tclip.name = name;\n\t\t\tvar tracks = [];\n\n\t\t\tfor (var i = 0; i < clip.tracks.length; ++i) {\n\t\t\t\tvar track = clip.tracks[i];\n\t\t\t\tvar valueSize = track.getValueSize();\n\t\t\t\tvar times = [];\n\t\t\t\tvar values = [];\n\n\t\t\t\tfor (var j = 0; j < track.times.length; ++j) {\n\t\t\t\t\tvar frame = track.times[j] * fps;\n\t\t\t\t\tif (frame < startFrame || frame >= endFrame) continue;\n\t\t\t\t\ttimes.push(track.times[j]);\n\n\t\t\t\t\tfor (var k = 0; k < valueSize; ++k) {\n\t\t\t\t\t\tvalues.push(track.values[j * valueSize + k]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (times.length === 0) continue;\n\t\t\t\ttrack.times = AnimationUtils.convertArray(times, track.times.constructor);\n\t\t\t\ttrack.values = AnimationUtils.convertArray(values, track.values.constructor);\n\t\t\t\ttracks.push(track);\n\t\t\t}\n\n\t\t\tclip.tracks = tracks; // find minimum .times value across all tracks in the trimmed clip\n\n\t\t\tvar minStartTime = Infinity;\n\n\t\t\tfor (var _i = 0; _i < clip.tracks.length; ++_i) {\n\t\t\t\tif (minStartTime > clip.tracks[_i].times[0]) {\n\t\t\t\t\tminStartTime = clip.tracks[_i].times[0];\n\t\t\t\t}\n\t\t\t} // shift all tracks such that clip begins at t=0\n\n\n\t\t\tfor (var _i2 = 0; _i2 < clip.tracks.length; ++_i2) {\n\t\t\t\tclip.tracks[_i2].shift(-1 * minStartTime);\n\t\t\t}\n\n\t\t\tclip.resetDuration();\n\t\t\treturn clip;\n\t\t},\n\t\tmakeClipAdditive: function makeClipAdditive(targetClip, referenceFrame, referenceClip, fps) {\n\t\t\tif (referenceFrame === void 0) {\n\t\t\t\treferenceFrame = 0;\n\t\t\t}\n\n\t\t\tif (referenceClip === void 0) {\n\t\t\t\treferenceClip = targetClip;\n\t\t\t}\n\n\t\t\tif (fps === void 0) {\n\t\t\t\tfps = 30;\n\t\t\t}\n\n\t\t\tif (fps <= 0) fps = 30;\n\t\t\tvar numTracks = referenceClip.tracks.length;\n\t\t\tvar referenceTime = referenceFrame / fps; // Make each track's values relative to the values at the reference frame\n\n\t\t\tvar _loop = function _loop(i) {\n\t\t\t\tvar referenceTrack = referenceClip.tracks[i];\n\t\t\t\tvar referenceTrackType = referenceTrack.ValueTypeName; // Skip this track if it's non-numeric\n\n\t\t\t\tif (referenceTrackType === 'bool' || referenceTrackType === 'string') return \"continue\"; // Find the track in the target clip whose name and type matches the reference track\n\n\t\t\t\tvar targetTrack = targetClip.tracks.find(function (track) {\n\t\t\t\t\treturn track.name === referenceTrack.name && track.ValueTypeName === referenceTrackType;\n\t\t\t\t});\n\t\t\t\tif (targetTrack === undefined) return \"continue\";\n\t\t\t\tvar referenceOffset = 0;\n\t\t\t\tvar referenceValueSize = referenceTrack.getValueSize();\n\n\t\t\t\tif (referenceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) {\n\t\t\t\t\treferenceOffset = referenceValueSize / 3;\n\t\t\t\t}\n\n\t\t\t\tvar targetOffset = 0;\n\t\t\t\tvar targetValueSize = targetTrack.getValueSize();\n\n\t\t\t\tif (targetTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline) {\n\t\t\t\t\ttargetOffset = targetValueSize / 3;\n\t\t\t\t}\n\n\t\t\t\tvar lastIndex = referenceTrack.times.length - 1;\n\t\t\t\tvar referenceValue = void 0; // Find the value to subtract out of the track\n\n\t\t\t\tif (referenceTime <= referenceTrack.times[0]) {\n\t\t\t\t\t// Reference frame is earlier than the first keyframe, so just use the first keyframe\n\t\t\t\t\tvar startIndex = referenceOffset;\n\t\t\t\t\tvar endIndex = referenceValueSize - referenceOffset;\n\t\t\t\t\treferenceValue = AnimationUtils.arraySlice(referenceTrack.values, startIndex, endIndex);\n\t\t\t\t} else if (referenceTime >= referenceTrack.times[lastIndex]) {\n\t\t\t\t\t// Reference frame is after the last keyframe, so just use the last keyframe\n\t\t\t\t\tvar _startIndex = lastIndex * referenceValueSize + referenceOffset;\n\n\t\t\t\t\tvar _endIndex = _startIndex + referenceValueSize - referenceOffset;\n\n\t\t\t\t\treferenceValue = AnimationUtils.arraySlice(referenceTrack.values, _startIndex, _endIndex);\n\t\t\t\t} else {\n\t\t\t\t\t// Interpolate to the reference value\n\t\t\t\t\tvar interpolant = referenceTrack.createInterpolant();\n\t\t\t\t\tvar _startIndex2 = referenceOffset;\n\n\t\t\t\t\tvar _endIndex2 = referenceValueSize - referenceOffset;\n\n\t\t\t\t\tinterpolant.evaluate(referenceTime);\n\t\t\t\t\treferenceValue = AnimationUtils.arraySlice(interpolant.resultBuffer, _startIndex2, _endIndex2);\n\t\t\t\t} // Conjugate the quaternion\n\n\n\t\t\t\tif (referenceTrackType === 'quaternion') {\n\t\t\t\t\tvar referenceQuat = new Quaternion().fromArray(referenceValue).normalize().conjugate();\n\t\t\t\t\treferenceQuat.toArray(referenceValue);\n\t\t\t\t} // Subtract the reference value from all of the track values\n\n\n\t\t\t\tvar numTimes = targetTrack.times.length;\n\n\t\t\t\tfor (var j = 0; j < numTimes; ++j) {\n\t\t\t\t\tvar valueStart = j * targetValueSize + targetOffset;\n\n\t\t\t\t\tif (referenceTrackType === 'quaternion') {\n\t\t\t\t\t\t// Multiply the conjugate for quaternion track types\n\t\t\t\t\t\tQuaternion.multiplyQuaternionsFlat(targetTrack.values, valueStart, referenceValue, 0, targetTrack.values, valueStart);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar valueEnd = targetValueSize - targetOffset * 2; // Subtract each value for all other numeric track types\n\n\t\t\t\t\t\tfor (var k = 0; k < valueEnd; ++k) {\n\t\t\t\t\t\t\ttargetTrack.values[valueStart + k] -= referenceValue[k];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tfor (var i = 0; i < numTracks; ++i) {\n\t\t\t\tvar _ret = _loop(i);\n\n\t\t\t\tif (_ret === \"continue\") continue;\n\t\t\t}\n\n\t\t\ttargetClip.blendMode = AdditiveAnimationBlendMode;\n\t\t\treturn targetClip;\n\t\t}\n\t};\n\n\t/**\n\t * Abstract base class of interpolants over parametric samples.\n\t *\n\t * The parameter domain is one dimensional, typically the time or a path\n\t * along a curve defined by the data.\n\t *\n\t * The sample values can have any dimensionality and derived classes may\n\t * apply special interpretations to the data.\n\t *\n\t * This class provides the interval seek in a Template Method, deferring\n\t * the actual interpolation to derived classes.\n\t *\n\t * Time complexity is O(1) for linear access crossing at most two points\n\t * and O(log N) for random access, where N is the number of positions.\n\t *\n\t * References:\n\t *\n\t * \t\thttp://www.oodesign.com/template-method-pattern.html\n\t *\n\t */\n\tfunction Interpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tthis.parameterPositions = parameterPositions;\n\t\tthis._cachedIndex = 0;\n\t\tthis.resultBuffer = resultBuffer !== undefined ? resultBuffer : new sampleValues.constructor(sampleSize);\n\t\tthis.sampleValues = sampleValues;\n\t\tthis.valueSize = sampleSize;\n\t}\n\n\tObject.assign(Interpolant.prototype, {\n\t\tevaluate: function evaluate(t) {\n\t\t\tvar pp = this.parameterPositions;\n\t\t\tvar i1 = this._cachedIndex,\n\t\t\t\t\tt1 = pp[i1],\n\t\t\t\t\tt0 = pp[i1 - 1];\n\n\t\t\tvalidate_interval: {\n\t\t\t\tseek: {\n\t\t\t\t\tvar right;\n\n\t\t\t\t\tlinear_scan: {\n\t\t\t\t\t\t//- See http://jsperf.com/comparison-to-undefined/3\n\t\t\t\t\t\t//- slower code:\n\t\t\t\t\t\t//-\n\t\t\t\t\t\t//- \t\t\t\tif ( t >= t1 || t1 === undefined ) {\n\t\t\t\t\t\tforward_scan: if (!(t < t1)) {\n\t\t\t\t\t\t\tfor (var giveUpAt = i1 + 2;;) {\n\t\t\t\t\t\t\t\tif (t1 === undefined) {\n\t\t\t\t\t\t\t\t\tif (t < t0) break forward_scan; // after end\n\n\t\t\t\t\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\t\t\t\t\treturn this.afterEnd_(i1 - 1, t, t0);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (i1 === giveUpAt) break; // this loop\n\n\t\t\t\t\t\t\t\tt0 = t1;\n\t\t\t\t\t\t\t\tt1 = pp[++i1];\n\n\t\t\t\t\t\t\t\tif (t < t1) {\n\t\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\t\tbreak seek;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} // prepare binary search on the right side of the index\n\n\n\t\t\t\t\t\t\tright = pp.length;\n\t\t\t\t\t\t\tbreak linear_scan;\n\t\t\t\t\t\t} //- slower code:\n\t\t\t\t\t\t//-\t\t\t\t\tif ( t < t0 || t0 === undefined ) {\n\n\n\t\t\t\t\t\tif (!(t >= t0)) {\n\t\t\t\t\t\t\t// looping?\n\t\t\t\t\t\t\tvar t1global = pp[1];\n\n\t\t\t\t\t\t\tif (t < t1global) {\n\t\t\t\t\t\t\t\ti1 = 2; // + 1, using the scan for the details\n\n\t\t\t\t\t\t\t\tt0 = t1global;\n\t\t\t\t\t\t\t} // linear reverse scan\n\n\n\t\t\t\t\t\t\tfor (var _giveUpAt = i1 - 2;;) {\n\t\t\t\t\t\t\t\tif (t0 === undefined) {\n\t\t\t\t\t\t\t\t\t// before start\n\t\t\t\t\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\t\t\t\t\treturn this.beforeStart_(0, t, t1);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (i1 === _giveUpAt) break; // this loop\n\n\t\t\t\t\t\t\t\tt1 = t0;\n\t\t\t\t\t\t\t\tt0 = pp[--i1 - 1];\n\n\t\t\t\t\t\t\t\tif (t >= t0) {\n\t\t\t\t\t\t\t\t\t// we have arrived at the sought interval\n\t\t\t\t\t\t\t\t\tbreak seek;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} // prepare binary search on the left side of the index\n\n\n\t\t\t\t\t\t\tright = i1;\n\t\t\t\t\t\t\ti1 = 0;\n\t\t\t\t\t\t\tbreak linear_scan;\n\t\t\t\t\t\t} // the interval is valid\n\n\n\t\t\t\t\t\tbreak validate_interval;\n\t\t\t\t\t} // linear scan\n\t\t\t\t\t// binary search\n\n\n\t\t\t\t\twhile (i1 < right) {\n\t\t\t\t\t\tvar mid = i1 + right >>> 1;\n\n\t\t\t\t\t\tif (t < pp[mid]) {\n\t\t\t\t\t\t\tright = mid;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ti1 = mid + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tt1 = pp[i1];\n\t\t\t\t\tt0 = pp[i1 - 1]; // check boundary cases, again\n\n\t\t\t\t\tif (t0 === undefined) {\n\t\t\t\t\t\tthis._cachedIndex = 0;\n\t\t\t\t\t\treturn this.beforeStart_(0, t, t1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (t1 === undefined) {\n\t\t\t\t\t\ti1 = pp.length;\n\t\t\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\t\t\treturn this.afterEnd_(i1 - 1, t0, t);\n\t\t\t\t\t}\n\t\t\t\t} // seek\n\n\n\t\t\t\tthis._cachedIndex = i1;\n\t\t\t\tthis.intervalChanged_(i1, t0, t1);\n\t\t\t} // validate_interval\n\n\n\t\t\treturn this.interpolate_(i1, t0, t, t1);\n\t\t},\n\t\tsettings: null,\n\t\t// optional, subclass-specific settings structure\n\t\t// Note: The indirection allows central control of many interpolants.\n\t\t// --- Protected interface\n\t\tDefaultSettings_: {},\n\t\tgetSettings_: function getSettings_() {\n\t\t\treturn this.settings || this.DefaultSettings_;\n\t\t},\n\t\tcopySampleValue_: function copySampleValue_(index) {\n\t\t\t// copies a sample value to the result buffer\n\t\t\tvar result = this.resultBuffer,\n\t\t\t\t\tvalues = this.sampleValues,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toffset = index * stride;\n\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tresult[i] = values[offset + i];\n\t\t\t}\n\n\t\t\treturn result;\n\t\t},\n\t\t// Template methods for derived classes:\n\t\tinterpolate_: function interpolate_()\n\t\t/* i1, t0, t, t1 */\n\t\t{\n\t\t\tthrow new Error('call to abstract method'); // implementations shall return this.resultBuffer\n\t\t},\n\t\tintervalChanged_: function intervalChanged_()\n\t\t/* i1, t0, t1 */\n\t\t{// empty\n\t\t}\n\t}); // DECLARE ALIAS AFTER assign prototype\n\n\tObject.assign(Interpolant.prototype, {\n\t\t//( 0, t, t0 ), returns this.resultBuffer\n\t\tbeforeStart_: Interpolant.prototype.copySampleValue_,\n\t\t//( N-1, tN-1, t ), returns this.resultBuffer\n\t\tafterEnd_: Interpolant.prototype.copySampleValue_\n\t});\n\n\t/**\n\t * Fast and simple cubic spline interpolant.\n\t *\n\t * It was derived from a Hermitian construction setting the first derivative\n\t * at each sample position to the linear slope between neighboring positions\n\t * over their parameter interval.\n\t */\n\n\tfunction CubicInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tInterpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer);\n\t\tthis._weightPrev = -0;\n\t\tthis._offsetPrev = -0;\n\t\tthis._weightNext = -0;\n\t\tthis._offsetNext = -0;\n\t}\n\n\tCubicInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), {\n\t\tconstructor: CubicInterpolant,\n\t\tDefaultSettings_: {\n\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\tendingEnd: ZeroCurvatureEnding\n\t\t},\n\t\tintervalChanged_: function intervalChanged_(i1, t0, t1) {\n\t\t\tvar pp = this.parameterPositions;\n\t\t\tvar iPrev = i1 - 2,\n\t\t\t\t\tiNext = i1 + 1,\n\t\t\t\t\ttPrev = pp[iPrev],\n\t\t\t\t\ttNext = pp[iNext];\n\n\t\t\tif (tPrev === undefined) {\n\t\t\t\tswitch (this.getSettings_().endingStart) {\n\t\t\t\t\tcase ZeroSlopeEnding:\n\t\t\t\t\t\t// f'(t0) = 0\n\t\t\t\t\t\tiPrev = i1;\n\t\t\t\t\t\ttPrev = 2 * t0 - t1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase WrapAroundEnding:\n\t\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\t\tiPrev = pp.length - 2;\n\t\t\t\t\t\ttPrev = t0 + pp[iPrev] - pp[iPrev + 1];\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ZeroCurvatureEnding\n\t\t\t\t\t\t// f''(t0) = 0 a.k.a. Natural Spline\n\t\t\t\t\t\tiPrev = i1;\n\t\t\t\t\t\ttPrev = t1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tNext === undefined) {\n\t\t\t\tswitch (this.getSettings_().endingEnd) {\n\t\t\t\t\tcase ZeroSlopeEnding:\n\t\t\t\t\t\t// f'(tN) = 0\n\t\t\t\t\t\tiNext = i1;\n\t\t\t\t\t\ttNext = 2 * t1 - t0;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase WrapAroundEnding:\n\t\t\t\t\t\t// use the other end of the curve\n\t\t\t\t\t\tiNext = 1;\n\t\t\t\t\t\ttNext = t1 + pp[1] - pp[0];\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ZeroCurvatureEnding\n\t\t\t\t\t\t// f''(tN) = 0, a.k.a. Natural Spline\n\t\t\t\t\t\tiNext = i1 - 1;\n\t\t\t\t\t\ttNext = t0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar halfDt = (t1 - t0) * 0.5,\n\t\t\t\t\tstride = this.valueSize;\n\t\t\tthis._weightPrev = halfDt / (t0 - tPrev);\n\t\t\tthis._weightNext = halfDt / (tNext - t1);\n\t\t\tthis._offsetPrev = iPrev * stride;\n\t\t\tthis._offsetNext = iNext * stride;\n\t\t},\n\t\tinterpolate_: function interpolate_(i1, t0, t, t1) {\n\t\t\tvar result = this.resultBuffer,\n\t\t\t\t\tvalues = this.sampleValues,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\to1 = i1 * stride,\n\t\t\t\t\to0 = o1 - stride,\n\t\t\t\t\toP = this._offsetPrev,\n\t\t\t\t\toN = this._offsetNext,\n\t\t\t\t\twP = this._weightPrev,\n\t\t\t\t\twN = this._weightNext,\n\t\t\t\t\tp = (t - t0) / (t1 - t0),\n\t\t\t\t\tpp = p * p,\n\t\t\t\t\tppp = pp * p; // evaluate polynomials\n\n\t\t\tvar sP = -wP * ppp + 2 * wP * pp - wP * p;\n\t\t\tvar s0 = (1 + wP) * ppp + (-1.5 - 2 * wP) * pp + (-0.5 + wP) * p + 1;\n\t\t\tvar s1 = (-1 - wN) * ppp + (1.5 + wN) * pp + 0.5 * p;\n\t\t\tvar sN = wN * ppp - wN * pp; // combine data linearly\n\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tresult[i] = sP * values[oP + i] + s0 * values[o0 + i] + s1 * values[o1 + i] + sN * values[oN + i];\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t});\n\n\tfunction LinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tInterpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer);\n\t}\n\n\tLinearInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), {\n\t\tconstructor: LinearInterpolant,\n\t\tinterpolate_: function interpolate_(i1, t0, t, t1) {\n\t\t\tvar result = this.resultBuffer,\n\t\t\t\t\tvalues = this.sampleValues,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toffset1 = i1 * stride,\n\t\t\t\t\toffset0 = offset1 - stride,\n\t\t\t\t\tweight1 = (t - t0) / (t1 - t0),\n\t\t\t\t\tweight0 = 1 - weight1;\n\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tresult[i] = values[offset0 + i] * weight0 + values[offset1 + i] * weight1;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t});\n\n\t/**\n\t *\n\t * Interpolant that evaluates to the sample value at the position preceeding\n\t * the parameter.\n\t */\n\n\tfunction DiscreteInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tInterpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer);\n\t}\n\n\tDiscreteInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), {\n\t\tconstructor: DiscreteInterpolant,\n\t\tinterpolate_: function interpolate_(i1\n\t\t/*, t0, t, t1 */\n\t\t) {\n\t\t\treturn this.copySampleValue_(i1 - 1);\n\t\t}\n\t});\n\n\tfunction KeyframeTrack(name, times, values, interpolation) {\n\t\tif (name === undefined) throw new Error('THREE.KeyframeTrack: track name is undefined');\n\t\tif (times === undefined || times.length === 0) throw new Error('THREE.KeyframeTrack: no keyframes in track named ' + name);\n\t\tthis.name = name;\n\t\tthis.times = AnimationUtils.convertArray(times, this.TimeBufferType);\n\t\tthis.values = AnimationUtils.convertArray(values, this.ValueBufferType);\n\t\tthis.setInterpolation(interpolation || this.DefaultInterpolation);\n\t} // Static methods\n\n\n\tObject.assign(KeyframeTrack, {\n\t\t// Serialization (in static context, because of constructor invocation\n\t\t// and automatic invocation of .toJSON):\n\t\ttoJSON: function toJSON(track) {\n\t\t\tvar trackType = track.constructor;\n\t\t\tvar json; // derived classes can define a static toJSON method\n\n\t\t\tif (trackType.toJSON !== undefined) {\n\t\t\t\tjson = trackType.toJSON(track);\n\t\t\t} else {\n\t\t\t\t// by default, we assume the data can be serialized as-is\n\t\t\t\tjson = {\n\t\t\t\t\t'name': track.name,\n\t\t\t\t\t'times': AnimationUtils.convertArray(track.times, Array),\n\t\t\t\t\t'values': AnimationUtils.convertArray(track.values, Array)\n\t\t\t\t};\n\t\t\t\tvar interpolation = track.getInterpolation();\n\n\t\t\t\tif (interpolation !== track.DefaultInterpolation) {\n\t\t\t\t\tjson.interpolation = interpolation;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tjson.type = track.ValueTypeName; // mandatory\n\n\t\t\treturn json;\n\t\t}\n\t});\n\tObject.assign(KeyframeTrack.prototype, {\n\t\tconstructor: KeyframeTrack,\n\t\tTimeBufferType: Float32Array,\n\t\tValueBufferType: Float32Array,\n\t\tDefaultInterpolation: InterpolateLinear,\n\t\tInterpolantFactoryMethodDiscrete: function InterpolantFactoryMethodDiscrete(result) {\n\t\t\treturn new DiscreteInterpolant(this.times, this.values, this.getValueSize(), result);\n\t\t},\n\t\tInterpolantFactoryMethodLinear: function InterpolantFactoryMethodLinear(result) {\n\t\t\treturn new LinearInterpolant(this.times, this.values, this.getValueSize(), result);\n\t\t},\n\t\tInterpolantFactoryMethodSmooth: function InterpolantFactoryMethodSmooth(result) {\n\t\t\treturn new CubicInterpolant(this.times, this.values, this.getValueSize(), result);\n\t\t},\n\t\tsetInterpolation: function setInterpolation(interpolation) {\n\t\t\tvar factoryMethod;\n\n\t\t\tswitch (interpolation) {\n\t\t\t\tcase InterpolateDiscrete:\n\t\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodDiscrete;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase InterpolateLinear:\n\t\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodLinear;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase InterpolateSmooth:\n\t\t\t\t\tfactoryMethod = this.InterpolantFactoryMethodSmooth;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (factoryMethod === undefined) {\n\t\t\t\tvar message = 'unsupported interpolation for ' + this.ValueTypeName + ' keyframe track named ' + this.name;\n\n\t\t\t\tif (this.createInterpolant === undefined) {\n\t\t\t\t\t// fall back to default, unless the default itself is messed up\n\t\t\t\t\tif (interpolation !== this.DefaultInterpolation) {\n\t\t\t\t\t\tthis.setInterpolation(this.DefaultInterpolation);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error(message); // fatal, in this case\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconsole.warn('THREE.KeyframeTrack:', message);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tthis.createInterpolant = factoryMethod;\n\t\t\treturn this;\n\t\t},\n\t\tgetInterpolation: function getInterpolation() {\n\t\t\tswitch (this.createInterpolant) {\n\t\t\t\tcase this.InterpolantFactoryMethodDiscrete:\n\t\t\t\t\treturn InterpolateDiscrete;\n\n\t\t\t\tcase this.InterpolantFactoryMethodLinear:\n\t\t\t\t\treturn InterpolateLinear;\n\n\t\t\t\tcase this.InterpolantFactoryMethodSmooth:\n\t\t\t\t\treturn InterpolateSmooth;\n\t\t\t}\n\t\t},\n\t\tgetValueSize: function getValueSize() {\n\t\t\treturn this.values.length / this.times.length;\n\t\t},\n\t\t// move all keyframes either forwards or backwards in time\n\t\tshift: function shift(timeOffset) {\n\t\t\tif (timeOffset !== 0.0) {\n\t\t\t\tvar times = this.times;\n\n\t\t\t\tfor (var i = 0, n = times.length; i !== n; ++i) {\n\t\t\t\t\ttimes[i] += timeOffset;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// scale all keyframe times by a factor (useful for frame <-> seconds conversions)\n\t\tscale: function scale(timeScale) {\n\t\t\tif (timeScale !== 1.0) {\n\t\t\t\tvar times = this.times;\n\n\t\t\t\tfor (var i = 0, n = times.length; i !== n; ++i) {\n\t\t\t\t\ttimes[i] *= timeScale;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// removes keyframes before and after animation without changing any values within the range [startTime, endTime].\n\t\t// IMPORTANT: We do not shift around keys to the start of the track time, because for interpolated keys this will change their values\n\t\ttrim: function trim(startTime, endTime) {\n\t\t\tvar times = this.times,\n\t\t\t\t\tnKeys = times.length;\n\t\t\tvar from = 0,\n\t\t\t\t\tto = nKeys - 1;\n\n\t\t\twhile (from !== nKeys && times[from] < startTime) {\n\t\t\t\t++from;\n\t\t\t}\n\n\t\t\twhile (to !== -1 && times[to] > endTime) {\n\t\t\t\t--to;\n\t\t\t}\n\n\t\t\t++to; // inclusive -> exclusive bound\n\n\t\t\tif (from !== 0 || to !== nKeys) {\n\t\t\t\t// empty tracks are forbidden, so keep at least one keyframe\n\t\t\t\tif (from >= to) {\n\t\t\t\t\tto = Math.max(to, 1);\n\t\t\t\t\tfrom = to - 1;\n\t\t\t\t}\n\n\t\t\t\tvar stride = this.getValueSize();\n\t\t\t\tthis.times = AnimationUtils.arraySlice(times, from, to);\n\t\t\t\tthis.values = AnimationUtils.arraySlice(this.values, from * stride, to * stride);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// ensure we do not get a GarbageInGarbageOut situation, make sure tracks are at least minimally viable\n\t\tvalidate: function validate() {\n\t\t\tvar valid = true;\n\t\t\tvar valueSize = this.getValueSize();\n\n\t\t\tif (valueSize - Math.floor(valueSize) !== 0) {\n\t\t\t\tconsole.error('THREE.KeyframeTrack: Invalid value size in track.', this);\n\t\t\t\tvalid = false;\n\t\t\t}\n\n\t\t\tvar times = this.times,\n\t\t\t\t\tvalues = this.values,\n\t\t\t\t\tnKeys = times.length;\n\n\t\t\tif (nKeys === 0) {\n\t\t\t\tconsole.error('THREE.KeyframeTrack: Track is empty.', this);\n\t\t\t\tvalid = false;\n\t\t\t}\n\n\t\t\tvar prevTime = null;\n\n\t\t\tfor (var i = 0; i !== nKeys; i++) {\n\t\t\t\tvar currTime = times[i];\n\n\t\t\t\tif (typeof currTime === 'number' && isNaN(currTime)) {\n\t\t\t\t\tconsole.error('THREE.KeyframeTrack: Time is not a valid number.', this, i, currTime);\n\t\t\t\t\tvalid = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (prevTime !== null && prevTime > currTime) {\n\t\t\t\t\tconsole.error('THREE.KeyframeTrack: Out of order keys.', this, i, currTime, prevTime);\n\t\t\t\t\tvalid = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tprevTime = currTime;\n\t\t\t}\n\n\t\t\tif (values !== undefined) {\n\t\t\t\tif (AnimationUtils.isTypedArray(values)) {\n\t\t\t\t\tfor (var _i = 0, n = values.length; _i !== n; ++_i) {\n\t\t\t\t\t\tvar value = values[_i];\n\n\t\t\t\t\t\tif (isNaN(value)) {\n\t\t\t\t\t\t\tconsole.error('THREE.KeyframeTrack: Value is not a valid number.', this, _i, value);\n\t\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn valid;\n\t\t},\n\t\t// removes equivalent sequential keys as common in morph target sequences\n\t\t// (0,0,0,0,1,1,1,0,0,0,0,0,0,0) --> (0,0,1,1,0,0)\n\t\toptimize: function optimize() {\n\t\t\t// times or values may be shared with other tracks, so overwriting is unsafe\n\t\t\tvar times = AnimationUtils.arraySlice(this.times),\n\t\t\t\t\tvalues = AnimationUtils.arraySlice(this.values),\n\t\t\t\t\tstride = this.getValueSize(),\n\t\t\t\t\tsmoothInterpolation = this.getInterpolation() === InterpolateSmooth,\n\t\t\t\t\tlastIndex = times.length - 1;\n\t\t\tvar writeIndex = 1;\n\n\t\t\tfor (var i = 1; i < lastIndex; ++i) {\n\t\t\t\tvar keep = false;\n\t\t\t\tvar time = times[i];\n\t\t\t\tvar timeNext = times[i + 1]; // remove adjacent keyframes scheduled at the same time\n\n\t\t\t\tif (time !== timeNext && (i !== 1 || time !== times[0])) {\n\t\t\t\t\tif (!smoothInterpolation) {\n\t\t\t\t\t\t// remove unnecessary keyframes same as their neighbors\n\t\t\t\t\t\tvar offset = i * stride,\n\t\t\t\t\t\t\t\toffsetP = offset - stride,\n\t\t\t\t\t\t\t\toffsetN = offset + stride;\n\n\t\t\t\t\t\tfor (var j = 0; j !== stride; ++j) {\n\t\t\t\t\t\t\tvar value = values[offset + j];\n\n\t\t\t\t\t\t\tif (value !== values[offsetP + j] || value !== values[offsetN + j]) {\n\t\t\t\t\t\t\t\tkeep = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tkeep = true;\n\t\t\t\t\t}\n\t\t\t\t} // in-place compaction\n\n\n\t\t\t\tif (keep) {\n\t\t\t\t\tif (i !== writeIndex) {\n\t\t\t\t\t\ttimes[writeIndex] = times[i];\n\t\t\t\t\t\tvar readOffset = i * stride,\n\t\t\t\t\t\t\t\twriteOffset = writeIndex * stride;\n\n\t\t\t\t\t\tfor (var _j = 0; _j !== stride; ++_j) {\n\t\t\t\t\t\t\tvalues[writeOffset + _j] = values[readOffset + _j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t++writeIndex;\n\t\t\t\t}\n\t\t\t} // flush last keyframe (compaction looks ahead)\n\n\n\t\t\tif (lastIndex > 0) {\n\t\t\t\ttimes[writeIndex] = times[lastIndex];\n\n\t\t\t\tfor (var _readOffset = lastIndex * stride, _writeOffset = writeIndex * stride, _j2 = 0; _j2 !== stride; ++_j2) {\n\t\t\t\t\tvalues[_writeOffset + _j2] = values[_readOffset + _j2];\n\t\t\t\t}\n\n\t\t\t\t++writeIndex;\n\t\t\t}\n\n\t\t\tif (writeIndex !== times.length) {\n\t\t\t\tthis.times = AnimationUtils.arraySlice(times, 0, writeIndex);\n\t\t\t\tthis.values = AnimationUtils.arraySlice(values, 0, writeIndex * stride);\n\t\t\t} else {\n\t\t\t\tthis.times = times;\n\t\t\t\tthis.values = values;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\tvar times = AnimationUtils.arraySlice(this.times, 0);\n\t\t\tvar values = AnimationUtils.arraySlice(this.values, 0);\n\t\t\tvar TypedKeyframeTrack = this.constructor;\n\t\t\tvar track = new TypedKeyframeTrack(this.name, times, values); // Interpolant argument to constructor is not saved, so copy the factory method directly.\n\n\t\t\ttrack.createInterpolant = this.createInterpolant;\n\t\t\treturn track;\n\t\t}\n\t});\n\n\t/**\n\t * A Track of Boolean keyframe values.\n\t */\n\n\tfunction BooleanKeyframeTrack(name, times, values) {\n\t\tKeyframeTrack.call(this, name, times, values);\n\t}\n\n\tBooleanKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: BooleanKeyframeTrack,\n\t\tValueTypeName: 'bool',\n\t\tValueBufferType: Array,\n\t\tDefaultInterpolation: InterpolateDiscrete,\n\t\tInterpolantFactoryMethodLinear: undefined,\n\t\tInterpolantFactoryMethodSmooth: undefined // Note: Actually this track could have a optimized / compressed\n\t\t// representation of a single value and a custom interpolant that\n\t\t// computes \"firstValue ^ isOdd( index )\".\n\n\t});\n\n\t/**\n\t * A Track of keyframe values that represent color.\n\t */\n\n\tfunction ColorKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tColorKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: ColorKeyframeTrack,\n\t\tValueTypeName: 'color' // ValueBufferType is inherited\n\t\t// DefaultInterpolation is inherited\n\t\t// Note: Very basic implementation and nothing special yet.\n\t\t// However, this is the place for color space parameterization.\n\n\t});\n\n\t/**\n\t * A Track of numeric keyframe values.\n\t */\n\n\tfunction NumberKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tNumberKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: NumberKeyframeTrack,\n\t\tValueTypeName: 'number' // ValueBufferType is inherited\n\t\t// DefaultInterpolation is inherited\n\n\t});\n\n\t/**\n\t * Spherical linear unit quaternion interpolant.\n\t */\n\n\tfunction QuaternionLinearInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer) {\n\t\tInterpolant.call(this, parameterPositions, sampleValues, sampleSize, resultBuffer);\n\t}\n\n\tQuaternionLinearInterpolant.prototype = Object.assign(Object.create(Interpolant.prototype), {\n\t\tconstructor: QuaternionLinearInterpolant,\n\t\tinterpolate_: function interpolate_(i1, t0, t, t1) {\n\t\t\tvar result = this.resultBuffer,\n\t\t\t\t\tvalues = this.sampleValues,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\talpha = (t - t0) / (t1 - t0);\n\t\t\tvar offset = i1 * stride;\n\n\t\t\tfor (var end = offset + stride; offset !== end; offset += 4) {\n\t\t\t\tQuaternion.slerpFlat(result, 0, values, offset - stride, values, offset, alpha);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t});\n\n\t/**\n\t * A Track of quaternion keyframe values.\n\t */\n\n\tfunction QuaternionKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tQuaternionKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: QuaternionKeyframeTrack,\n\t\tValueTypeName: 'quaternion',\n\t\t// ValueBufferType is inherited\n\t\tDefaultInterpolation: InterpolateLinear,\n\t\tInterpolantFactoryMethodLinear: function InterpolantFactoryMethodLinear(result) {\n\t\t\treturn new QuaternionLinearInterpolant(this.times, this.values, this.getValueSize(), result);\n\t\t},\n\t\tInterpolantFactoryMethodSmooth: undefined // not yet implemented\n\n\t});\n\n\t/**\n\t * A Track that interpolates Strings\n\t */\n\n\tfunction StringKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tStringKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: StringKeyframeTrack,\n\t\tValueTypeName: 'string',\n\t\tValueBufferType: Array,\n\t\tDefaultInterpolation: InterpolateDiscrete,\n\t\tInterpolantFactoryMethodLinear: undefined,\n\t\tInterpolantFactoryMethodSmooth: undefined\n\t});\n\n\t/**\n\t * A Track of vectored keyframe values.\n\t */\n\n\tfunction VectorKeyframeTrack(name, times, values, interpolation) {\n\t\tKeyframeTrack.call(this, name, times, values, interpolation);\n\t}\n\n\tVectorKeyframeTrack.prototype = Object.assign(Object.create(KeyframeTrack.prototype), {\n\t\tconstructor: VectorKeyframeTrack,\n\t\tValueTypeName: 'vector' // ValueBufferType is inherited\n\t\t// DefaultInterpolation is inherited\n\n\t});\n\n\tfunction AnimationClip(name, duration, tracks, blendMode) {\n\t\tif (duration === void 0) {\n\t\t\tduration = -1;\n\t\t}\n\n\t\tif (blendMode === void 0) {\n\t\t\tblendMode = NormalAnimationBlendMode;\n\t\t}\n\n\t\tthis.name = name;\n\t\tthis.tracks = tracks;\n\t\tthis.duration = duration;\n\t\tthis.blendMode = blendMode;\n\t\tthis.uuid = MathUtils.generateUUID(); // this means it should figure out its duration by scanning the tracks\n\n\t\tif (this.duration < 0) {\n\t\t\tthis.resetDuration();\n\t\t}\n\t}\n\n\tfunction getTrackTypeForValueTypeName(typeName) {\n\t\tswitch (typeName.toLowerCase()) {\n\t\t\tcase 'scalar':\n\t\t\tcase 'double':\n\t\t\tcase 'float':\n\t\t\tcase 'number':\n\t\t\tcase 'integer':\n\t\t\t\treturn NumberKeyframeTrack;\n\n\t\t\tcase 'vector':\n\t\t\tcase 'vector2':\n\t\t\tcase 'vector3':\n\t\t\tcase 'vector4':\n\t\t\t\treturn VectorKeyframeTrack;\n\n\t\t\tcase 'color':\n\t\t\t\treturn ColorKeyframeTrack;\n\n\t\t\tcase 'quaternion':\n\t\t\t\treturn QuaternionKeyframeTrack;\n\n\t\t\tcase 'bool':\n\t\t\tcase 'boolean':\n\t\t\t\treturn BooleanKeyframeTrack;\n\n\t\t\tcase 'string':\n\t\t\t\treturn StringKeyframeTrack;\n\t\t}\n\n\t\tthrow new Error('THREE.KeyframeTrack: Unsupported typeName: ' + typeName);\n\t}\n\n\tfunction parseKeyframeTrack(json) {\n\t\tif (json.type === undefined) {\n\t\t\tthrow new Error('THREE.KeyframeTrack: track type undefined, can not parse');\n\t\t}\n\n\t\tvar trackType = getTrackTypeForValueTypeName(json.type);\n\n\t\tif (json.times === undefined) {\n\t\t\tvar times = [],\n\t\t\t\t\tvalues = [];\n\t\t\tAnimationUtils.flattenJSON(json.keys, times, values, 'value');\n\t\t\tjson.times = times;\n\t\t\tjson.values = values;\n\t\t} // derived classes can define a static parse method\n\n\n\t\tif (trackType.parse !== undefined) {\n\t\t\treturn trackType.parse(json);\n\t\t} else {\n\t\t\t// by default, we assume a constructor compatible with the base\n\t\t\treturn new trackType(json.name, json.times, json.values, json.interpolation);\n\t\t}\n\t}\n\n\tObject.assign(AnimationClip, {\n\t\tparse: function parse(json) {\n\t\t\tvar tracks = [],\n\t\t\t\t\tjsonTracks = json.tracks,\n\t\t\t\t\tframeTime = 1.0 / (json.fps || 1.0);\n\n\t\t\tfor (var i = 0, n = jsonTracks.length; i !== n; ++i) {\n\t\t\t\ttracks.push(parseKeyframeTrack(jsonTracks[i]).scale(frameTime));\n\t\t\t}\n\n\t\t\tvar clip = new AnimationClip(json.name, json.duration, tracks, json.blendMode);\n\t\t\tclip.uuid = json.uuid;\n\t\t\treturn clip;\n\t\t},\n\t\ttoJSON: function toJSON(clip) {\n\t\t\tvar tracks = [],\n\t\t\t\t\tclipTracks = clip.tracks;\n\t\t\tvar json = {\n\t\t\t\t'name': clip.name,\n\t\t\t\t'duration': clip.duration,\n\t\t\t\t'tracks': tracks,\n\t\t\t\t'uuid': clip.uuid,\n\t\t\t\t'blendMode': clip.blendMode\n\t\t\t};\n\n\t\t\tfor (var i = 0, n = clipTracks.length; i !== n; ++i) {\n\t\t\t\ttracks.push(KeyframeTrack.toJSON(clipTracks[i]));\n\t\t\t}\n\n\t\t\treturn json;\n\t\t},\n\t\tCreateFromMorphTargetSequence: function CreateFromMorphTargetSequence(name, morphTargetSequence, fps, noLoop) {\n\t\t\tvar numMorphTargets = morphTargetSequence.length;\n\t\t\tvar tracks = [];\n\n\t\t\tfor (var i = 0; i < numMorphTargets; i++) {\n\t\t\t\tvar times = [];\n\t\t\t\tvar values = [];\n\t\t\t\ttimes.push((i + numMorphTargets - 1) % numMorphTargets, i, (i + 1) % numMorphTargets);\n\t\t\t\tvalues.push(0, 1, 0);\n\t\t\t\tvar order = AnimationUtils.getKeyframeOrder(times);\n\t\t\t\ttimes = AnimationUtils.sortedArray(times, 1, order);\n\t\t\t\tvalues = AnimationUtils.sortedArray(values, 1, order); // if there is a key at the first frame, duplicate it as the\n\t\t\t\t// last frame as well for perfect loop.\n\n\t\t\t\tif (!noLoop && times[0] === 0) {\n\t\t\t\t\ttimes.push(numMorphTargets);\n\t\t\t\t\tvalues.push(values[0]);\n\t\t\t\t}\n\n\t\t\t\ttracks.push(new NumberKeyframeTrack('.morphTargetInfluences[' + morphTargetSequence[i].name + ']', times, values).scale(1.0 / fps));\n\t\t\t}\n\n\t\t\treturn new AnimationClip(name, -1, tracks);\n\t\t},\n\t\tfindByName: function findByName(objectOrClipArray, name) {\n\t\t\tvar clipArray = objectOrClipArray;\n\n\t\t\tif (!Array.isArray(objectOrClipArray)) {\n\t\t\t\tvar o = objectOrClipArray;\n\t\t\t\tclipArray = o.geometry && o.geometry.animations || o.animations;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < clipArray.length; i++) {\n\t\t\t\tif (clipArray[i].name === name) {\n\t\t\t\t\treturn clipArray[i];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\tCreateClipsFromMorphTargetSequences: function CreateClipsFromMorphTargetSequences(morphTargets, fps, noLoop) {\n\t\t\tvar animationToMorphTargets = {}; // tested with https://regex101.com/ on trick sequences\n\t\t\t// such flamingo_flyA_003, flamingo_run1_003, crdeath0059\n\n\t\t\tvar pattern = /^([\\w-]*?)([\\d]+)$/; // sort morph target names into animation groups based\n\t\t\t// patterns like Walk_001, Walk_002, Run_001, Run_002\n\n\t\t\tfor (var i = 0, il = morphTargets.length; i < il; i++) {\n\t\t\t\tvar morphTarget = morphTargets[i];\n\t\t\t\tvar parts = morphTarget.name.match(pattern);\n\n\t\t\t\tif (parts && parts.length > 1) {\n\t\t\t\t\tvar name = parts[1];\n\t\t\t\t\tvar animationMorphTargets = animationToMorphTargets[name];\n\n\t\t\t\t\tif (!animationMorphTargets) {\n\t\t\t\t\t\tanimationToMorphTargets[name] = animationMorphTargets = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tanimationMorphTargets.push(morphTarget);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar clips = [];\n\n\t\t\tfor (var _name in animationToMorphTargets) {\n\t\t\t\tclips.push(AnimationClip.CreateFromMorphTargetSequence(_name, animationToMorphTargets[_name], fps, noLoop));\n\t\t\t}\n\n\t\t\treturn clips;\n\t\t},\n\t\t// parse the animation.hierarchy format\n\t\tparseAnimation: function parseAnimation(animation, bones) {\n\t\t\tif (!animation) {\n\t\t\t\tconsole.error('THREE.AnimationClip: No animation in JSONLoader data.');\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar addNonemptyTrack = function addNonemptyTrack(trackType, trackName, animationKeys, propertyName, destTracks) {\n\t\t\t\t// only return track if there are actually keys.\n\t\t\t\tif (animationKeys.length !== 0) {\n\t\t\t\t\tvar times = [];\n\t\t\t\t\tvar values = [];\n\t\t\t\t\tAnimationUtils.flattenJSON(animationKeys, times, values, propertyName); // empty keys are filtered out, so check again\n\n\t\t\t\t\tif (times.length !== 0) {\n\t\t\t\t\t\tdestTracks.push(new trackType(trackName, times, values));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tvar tracks = [];\n\t\t\tvar clipName = animation.name || 'default';\n\t\t\tvar fps = animation.fps || 30;\n\t\t\tvar blendMode = animation.blendMode; // automatic length determination in AnimationClip.\n\n\t\t\tvar duration = animation.length || -1;\n\t\t\tvar hierarchyTracks = animation.hierarchy || [];\n\n\t\t\tfor (var h = 0; h < hierarchyTracks.length; h++) {\n\t\t\t\tvar animationKeys = hierarchyTracks[h].keys; // skip empty tracks\n\n\t\t\t\tif (!animationKeys || animationKeys.length === 0) continue; // process morph targets\n\n\t\t\t\tif (animationKeys[0].morphTargets) {\n\t\t\t\t\t// figure out all morph targets used in this track\n\t\t\t\t\tvar morphTargetNames = {};\n\t\t\t\t\tvar k = void 0;\n\n\t\t\t\t\tfor (k = 0; k < animationKeys.length; k++) {\n\t\t\t\t\t\tif (animationKeys[k].morphTargets) {\n\t\t\t\t\t\t\tfor (var m = 0; m < animationKeys[k].morphTargets.length; m++) {\n\t\t\t\t\t\t\t\tmorphTargetNames[animationKeys[k].morphTargets[m]] = -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} // create a track for each morph target with all zero\n\t\t\t\t\t// morphTargetInfluences except for the keys in which\n\t\t\t\t\t// the morphTarget is named.\n\n\n\t\t\t\t\tfor (var morphTargetName in morphTargetNames) {\n\t\t\t\t\t\tvar times = [];\n\t\t\t\t\t\tvar values = [];\n\n\t\t\t\t\t\tfor (var _m = 0; _m !== animationKeys[k].morphTargets.length; ++_m) {\n\t\t\t\t\t\t\tvar animationKey = animationKeys[k];\n\t\t\t\t\t\t\ttimes.push(animationKey.time);\n\t\t\t\t\t\t\tvalues.push(animationKey.morphTarget === morphTargetName ? 1 : 0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttracks.push(new NumberKeyframeTrack('.morphTargetInfluence[' + morphTargetName + ']', times, values));\n\t\t\t\t\t}\n\n\t\t\t\t\tduration = morphTargetNames.length * (fps || 1.0);\n\t\t\t\t} else {\n\t\t\t\t\t// ...assume skeletal animation\n\t\t\t\t\tvar boneName = '.bones[' + bones[h].name + ']';\n\t\t\t\t\taddNonemptyTrack(VectorKeyframeTrack, boneName + '.position', animationKeys, 'pos', tracks);\n\t\t\t\t\taddNonemptyTrack(QuaternionKeyframeTrack, boneName + '.quaternion', animationKeys, 'rot', tracks);\n\t\t\t\t\taddNonemptyTrack(VectorKeyframeTrack, boneName + '.scale', animationKeys, 'scl', tracks);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (tracks.length === 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tvar clip = new AnimationClip(clipName, duration, tracks, blendMode);\n\t\t\treturn clip;\n\t\t}\n\t});\n\tObject.assign(AnimationClip.prototype, {\n\t\tresetDuration: function resetDuration() {\n\t\t\tvar tracks = this.tracks;\n\t\t\tvar duration = 0;\n\n\t\t\tfor (var i = 0, n = tracks.length; i !== n; ++i) {\n\t\t\t\tvar track = this.tracks[i];\n\t\t\t\tduration = Math.max(duration, track.times[track.times.length - 1]);\n\t\t\t}\n\n\t\t\tthis.duration = duration;\n\t\t\treturn this;\n\t\t},\n\t\ttrim: function trim() {\n\t\t\tfor (var i = 0; i < this.tracks.length; i++) {\n\t\t\t\tthis.tracks[i].trim(0, this.duration);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tvalidate: function validate() {\n\t\t\tvar valid = true;\n\n\t\t\tfor (var i = 0; i < this.tracks.length; i++) {\n\t\t\t\tvalid = valid && this.tracks[i].validate();\n\t\t\t}\n\n\t\t\treturn valid;\n\t\t},\n\t\toptimize: function optimize() {\n\t\t\tfor (var i = 0; i < this.tracks.length; i++) {\n\t\t\t\tthis.tracks[i].optimize();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\tvar tracks = [];\n\n\t\t\tfor (var i = 0; i < this.tracks.length; i++) {\n\t\t\t\ttracks.push(this.tracks[i].clone());\n\t\t\t}\n\n\t\t\treturn new AnimationClip(this.name, this.duration, tracks, this.blendMode);\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\treturn AnimationClip.toJSON(this);\n\t\t}\n\t});\n\n\tvar Cache = {\n\t\tenabled: false,\n\t\tfiles: {},\n\t\tadd: function add(key, file) {\n\t\t\tif (this.enabled === false) return; // console.log( 'THREE.Cache', 'Adding key:', key );\n\n\t\t\tthis.files[key] = file;\n\t\t},\n\t\tget: function get(key) {\n\t\t\tif (this.enabled === false) return; // console.log( 'THREE.Cache', 'Checking key:', key );\n\n\t\t\treturn this.files[key];\n\t\t},\n\t\tremove: function remove(key) {\n\t\t\tdelete this.files[key];\n\t\t},\n\t\tclear: function clear() {\n\t\t\tthis.files = {};\n\t\t}\n\t};\n\n\tfunction LoadingManager(onLoad, onProgress, onError) {\n\t\tvar scope = this;\n\t\tvar isLoading = false;\n\t\tvar itemsLoaded = 0;\n\t\tvar itemsTotal = 0;\n\t\tvar urlModifier = undefined;\n\t\tvar handlers = []; // Refer to #5689 for the reason why we don't set .onStart\n\t\t// in the constructor\n\n\t\tthis.onStart = undefined;\n\t\tthis.onLoad = onLoad;\n\t\tthis.onProgress = onProgress;\n\t\tthis.onError = onError;\n\n\t\tthis.itemStart = function (url) {\n\t\t\titemsTotal++;\n\n\t\t\tif (isLoading === false) {\n\t\t\t\tif (scope.onStart !== undefined) {\n\t\t\t\t\tscope.onStart(url, itemsLoaded, itemsTotal);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tisLoading = true;\n\t\t};\n\n\t\tthis.itemEnd = function (url) {\n\t\t\titemsLoaded++;\n\n\t\t\tif (scope.onProgress !== undefined) {\n\t\t\t\tscope.onProgress(url, itemsLoaded, itemsTotal);\n\t\t\t}\n\n\t\t\tif (itemsLoaded === itemsTotal) {\n\t\t\t\tisLoading = false;\n\n\t\t\t\tif (scope.onLoad !== undefined) {\n\t\t\t\t\tscope.onLoad();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.itemError = function (url) {\n\t\t\tif (scope.onError !== undefined) {\n\t\t\t\tscope.onError(url);\n\t\t\t}\n\t\t};\n\n\t\tthis.resolveURL = function (url) {\n\t\t\tif (urlModifier) {\n\t\t\t\treturn urlModifier(url);\n\t\t\t}\n\n\t\t\treturn url;\n\t\t};\n\n\t\tthis.setURLModifier = function (transform) {\n\t\t\turlModifier = transform;\n\t\t\treturn this;\n\t\t};\n\n\t\tthis.addHandler = function (regex, loader) {\n\t\t\thandlers.push(regex, loader);\n\t\t\treturn this;\n\t\t};\n\n\t\tthis.removeHandler = function (regex) {\n\t\t\tvar index = handlers.indexOf(regex);\n\n\t\t\tif (index !== -1) {\n\t\t\t\thandlers.splice(index, 2);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\tthis.getHandler = function (file) {\n\t\t\tfor (var i = 0, l = handlers.length; i < l; i += 2) {\n\t\t\t\tvar regex = handlers[i];\n\t\t\t\tvar loader = handlers[i + 1];\n\t\t\t\tif (regex.global) regex.lastIndex = 0; // see #17920\n\n\t\t\t\tif (regex.test(file)) {\n\t\t\t\t\treturn loader;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t};\n\t}\n\n\tvar DefaultLoadingManager = new LoadingManager();\n\n\tfunction Loader(manager) {\n\t\tthis.manager = manager !== undefined ? manager : DefaultLoadingManager;\n\t\tthis.crossOrigin = 'anonymous';\n\t\tthis.withCredentials = false;\n\t\tthis.path = '';\n\t\tthis.resourcePath = '';\n\t\tthis.requestHeader = {};\n\t}\n\n\tObject.assign(Loader.prototype, {\n\t\tload: function load()\n\t\t/* url, onLoad, onProgress, onError */\n\t\t{},\n\t\tloadAsync: function loadAsync(url, onProgress) {\n\t\t\tvar scope = this;\n\t\t\treturn new Promise(function (resolve, reject) {\n\t\t\t\tscope.load(url, resolve, onProgress, reject);\n\t\t\t});\n\t\t},\n\t\tparse: function parse()\n\t\t/* data */\n\t\t{},\n\t\tsetCrossOrigin: function setCrossOrigin(crossOrigin) {\n\t\t\tthis.crossOrigin = crossOrigin;\n\t\t\treturn this;\n\t\t},\n\t\tsetWithCredentials: function setWithCredentials(value) {\n\t\t\tthis.withCredentials = value;\n\t\t\treturn this;\n\t\t},\n\t\tsetPath: function setPath(path) {\n\t\t\tthis.path = path;\n\t\t\treturn this;\n\t\t},\n\t\tsetResourcePath: function setResourcePath(resourcePath) {\n\t\t\tthis.resourcePath = resourcePath;\n\t\t\treturn this;\n\t\t},\n\t\tsetRequestHeader: function setRequestHeader(requestHeader) {\n\t\t\tthis.requestHeader = requestHeader;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tvar loading = {};\n\n\tfunction FileLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tFileLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: FileLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tif (url === undefined) url = '';\n\t\t\tif (this.path !== undefined) url = this.path + url;\n\t\t\turl = this.manager.resolveURL(url);\n\t\t\tvar scope = this;\n\t\t\tvar cached = Cache.get(url);\n\n\t\t\tif (cached !== undefined) {\n\t\t\t\tscope.manager.itemStart(url);\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (onLoad) onLoad(cached);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, 0);\n\t\t\t\treturn cached;\n\t\t\t} // Check if request is duplicate\n\n\n\t\t\tif (loading[url] !== undefined) {\n\t\t\t\tloading[url].push({\n\t\t\t\t\tonLoad: onLoad,\n\t\t\t\t\tonProgress: onProgress,\n\t\t\t\t\tonError: onError\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t} // Check for data: URI\n\n\n\t\t\tvar dataUriRegex = /^data:(.*?)(;base64)?,(.*)$/;\n\t\t\tvar dataUriRegexResult = url.match(dataUriRegex);\n\t\t\tvar request; // Safari can not handle Data URIs through XMLHttpRequest so process manually\n\n\t\t\tif (dataUriRegexResult) {\n\t\t\t\tvar mimeType = dataUriRegexResult[1];\n\t\t\t\tvar isBase64 = !!dataUriRegexResult[2];\n\t\t\t\tvar data = dataUriRegexResult[3];\n\t\t\t\tdata = decodeURIComponent(data);\n\t\t\t\tif (isBase64) data = atob(data);\n\n\t\t\t\ttry {\n\t\t\t\t\tvar response;\n\t\t\t\t\tvar responseType = (this.responseType || '').toLowerCase();\n\n\t\t\t\t\tswitch (responseType) {\n\t\t\t\t\t\tcase 'arraybuffer':\n\t\t\t\t\t\tcase 'blob':\n\t\t\t\t\t\t\tvar view = new Uint8Array(data.length);\n\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tview[i] = data.charCodeAt(i);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (responseType === 'blob') {\n\t\t\t\t\t\t\t\tresponse = new Blob([view.buffer], {\n\t\t\t\t\t\t\t\t\ttype: mimeType\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tresponse = view.buffer;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'document':\n\t\t\t\t\t\t\tvar parser = new DOMParser();\n\t\t\t\t\t\t\tresponse = parser.parseFromString(data, mimeType);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'json':\n\t\t\t\t\t\t\tresponse = JSON.parse(data);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t// 'text' or other\n\t\t\t\t\t\t\tresponse = data;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t} // Wait for next browser tick like standard XMLHttpRequest event dispatching does\n\n\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tif (onLoad) onLoad(response);\n\t\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t\t}, 0);\n\t\t\t\t} catch (error) {\n\t\t\t\t\t// Wait for next browser tick like standard XMLHttpRequest event dispatching does\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tif (onError) onError(error);\n\t\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t\t}, 0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Initialise array for duplicate requests\n\t\t\t\tloading[url] = [];\n\t\t\t\tloading[url].push({\n\t\t\t\t\tonLoad: onLoad,\n\t\t\t\t\tonProgress: onProgress,\n\t\t\t\t\tonError: onError\n\t\t\t\t});\n\t\t\t\trequest = new XMLHttpRequest();\n\t\t\t\trequest.open('GET', url, true);\n\t\t\t\trequest.addEventListener('load', function (event) {\n\t\t\t\t\tvar response = this.response;\n\t\t\t\t\tvar callbacks = loading[url];\n\t\t\t\t\tdelete loading[url];\n\n\t\t\t\t\tif (this.status === 200 || this.status === 0) {\n\t\t\t\t\t\t// Some browsers return HTTP Status 0 when using non-http protocol\n\t\t\t\t\t\t// e.g. 'file://' or 'data://'. Handle as success.\n\t\t\t\t\t\tif (this.status === 0) console.warn('THREE.FileLoader: HTTP Status 0 received.'); // Add to cache only on HTTP success, so that we do not cache\n\t\t\t\t\t\t// error response bodies as proper responses to requests.\n\n\t\t\t\t\t\tCache.add(url, response);\n\n\t\t\t\t\t\tfor (var _i = 0, il = callbacks.length; _i < il; _i++) {\n\t\t\t\t\t\t\tvar callback = callbacks[_i];\n\t\t\t\t\t\t\tif (callback.onLoad) callback.onLoad(response);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (var _i2 = 0, _il = callbacks.length; _i2 < _il; _i2++) {\n\t\t\t\t\t\t\tvar _callback = callbacks[_i2];\n\t\t\t\t\t\t\tif (_callback.onError) _callback.onError(event);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\t\t\t\trequest.addEventListener('progress', function (event) {\n\t\t\t\t\tvar callbacks = loading[url];\n\n\t\t\t\t\tfor (var _i3 = 0, il = callbacks.length; _i3 < il; _i3++) {\n\t\t\t\t\t\tvar callback = callbacks[_i3];\n\t\t\t\t\t\tif (callback.onProgress) callback.onProgress(event);\n\t\t\t\t\t}\n\t\t\t\t}, false);\n\t\t\t\trequest.addEventListener('error', function (event) {\n\t\t\t\t\tvar callbacks = loading[url];\n\t\t\t\t\tdelete loading[url];\n\n\t\t\t\t\tfor (var _i4 = 0, il = callbacks.length; _i4 < il; _i4++) {\n\t\t\t\t\t\tvar callback = callbacks[_i4];\n\t\t\t\t\t\tif (callback.onError) callback.onError(event);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, false);\n\t\t\t\trequest.addEventListener('abort', function (event) {\n\t\t\t\t\tvar callbacks = loading[url];\n\t\t\t\t\tdelete loading[url];\n\n\t\t\t\t\tfor (var _i5 = 0, il = callbacks.length; _i5 < il; _i5++) {\n\t\t\t\t\t\tvar callback = callbacks[_i5];\n\t\t\t\t\t\tif (callback.onError) callback.onError(event);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, false);\n\t\t\t\tif (this.responseType !== undefined) request.responseType = this.responseType;\n\t\t\t\tif (this.withCredentials !== undefined) request.withCredentials = this.withCredentials;\n\t\t\t\tif (request.overrideMimeType) request.overrideMimeType(this.mimeType !== undefined ? this.mimeType : 'text/plain');\n\n\t\t\t\tfor (var header in this.requestHeader) {\n\t\t\t\t\trequest.setRequestHeader(header, this.requestHeader[header]);\n\t\t\t\t}\n\n\t\t\t\trequest.send(null);\n\t\t\t}\n\n\t\t\tscope.manager.itemStart(url);\n\t\t\treturn request;\n\t\t},\n\t\tsetResponseType: function setResponseType(value) {\n\t\t\tthis.responseType = value;\n\t\t\treturn this;\n\t\t},\n\t\tsetMimeType: function setMimeType(value) {\n\t\t\tthis.mimeType = value;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction AnimationLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tAnimationLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: AnimationLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(scope.manager);\n\t\t\tloader.setPath(scope.path);\n\t\t\tloader.setRequestHeader(scope.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\ttry {\n\t\t\t\t\tonLoad(scope.parse(JSON.parse(text)));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (onError) {\n\t\t\t\t\t\tonError(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t},\n\t\tparse: function parse(json) {\n\t\t\tvar animations = [];\n\n\t\t\tfor (var i = 0; i < json.length; i++) {\n\t\t\t\tvar clip = AnimationClip.parse(json[i]);\n\t\t\t\tanimations.push(clip);\n\t\t\t}\n\n\t\t\treturn animations;\n\t\t}\n\t});\n\n\t/**\n\t * Abstract Base class to block based textures loader (dds, pvr, ...)\n\t *\n\t * Sub classes have to implement the parse() method which will be used in load().\n\t */\n\n\tfunction CompressedTextureLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tCompressedTextureLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: CompressedTextureLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar images = [];\n\t\t\tvar texture = new CompressedTexture();\n\t\t\tvar loader = new FileLoader(this.manager);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.setResponseType('arraybuffer');\n\t\t\tloader.setRequestHeader(this.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tvar loaded = 0;\n\n\t\t\tfunction loadTexture(i) {\n\t\t\t\tloader.load(url[i], function (buffer) {\n\t\t\t\t\tvar texDatas = scope.parse(buffer, true);\n\t\t\t\t\timages[i] = {\n\t\t\t\t\t\twidth: texDatas.width,\n\t\t\t\t\t\theight: texDatas.height,\n\t\t\t\t\t\tformat: texDatas.format,\n\t\t\t\t\t\tmipmaps: texDatas.mipmaps\n\t\t\t\t\t};\n\t\t\t\t\tloaded += 1;\n\n\t\t\t\t\tif (loaded === 6) {\n\t\t\t\t\t\tif (texDatas.mipmapCount === 1) texture.minFilter = LinearFilter;\n\t\t\t\t\t\ttexture.image = images;\n\t\t\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\t\t\ttexture.needsUpdate = true;\n\t\t\t\t\t\tif (onLoad) onLoad(texture);\n\t\t\t\t\t}\n\t\t\t\t}, onProgress, onError);\n\t\t\t}\n\n\t\t\tif (Array.isArray(url)) {\n\t\t\t\tfor (var i = 0, il = url.length; i < il; ++i) {\n\t\t\t\t\tloadTexture(i);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// compressed cubemap texture stored in a single DDS file\n\t\t\t\tloader.load(url, function (buffer) {\n\t\t\t\t\tvar texDatas = scope.parse(buffer, true);\n\n\t\t\t\t\tif (texDatas.isCubemap) {\n\t\t\t\t\t\tvar faces = texDatas.mipmaps.length / texDatas.mipmapCount;\n\n\t\t\t\t\t\tfor (var f = 0; f < faces; f++) {\n\t\t\t\t\t\t\timages[f] = {\n\t\t\t\t\t\t\t\tmipmaps: []\n\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\tfor (var _i = 0; _i < texDatas.mipmapCount; _i++) {\n\t\t\t\t\t\t\t\timages[f].mipmaps.push(texDatas.mipmaps[f * texDatas.mipmapCount + _i]);\n\t\t\t\t\t\t\t\timages[f].format = texDatas.format;\n\t\t\t\t\t\t\t\timages[f].width = texDatas.width;\n\t\t\t\t\t\t\t\timages[f].height = texDatas.height;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttexture.image = images;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttexture.image.width = texDatas.width;\n\t\t\t\t\t\ttexture.image.height = texDatas.height;\n\t\t\t\t\t\ttexture.mipmaps = texDatas.mipmaps;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (texDatas.mipmapCount === 1) {\n\t\t\t\t\t\ttexture.minFilter = LinearFilter;\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.format = texDatas.format;\n\t\t\t\t\ttexture.needsUpdate = true;\n\t\t\t\t\tif (onLoad) onLoad(texture);\n\t\t\t\t}, onProgress, onError);\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\t});\n\n\tfunction ImageLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tImageLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: ImageLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tif (this.path !== undefined) url = this.path + url;\n\t\t\turl = this.manager.resolveURL(url);\n\t\t\tvar scope = this;\n\t\t\tvar cached = Cache.get(url);\n\n\t\t\tif (cached !== undefined) {\n\t\t\t\tscope.manager.itemStart(url);\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (onLoad) onLoad(cached);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, 0);\n\t\t\t\treturn cached;\n\t\t\t}\n\n\t\t\tvar image = document.createElementNS('http://www.w3.org/1999/xhtml', 'img');\n\n\t\t\tfunction onImageLoad() {\n\t\t\t\timage.removeEventListener('load', onImageLoad, false);\n\t\t\t\timage.removeEventListener('error', onImageError, false);\n\t\t\t\tCache.add(url, this);\n\t\t\t\tif (onLoad) onLoad(this);\n\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t}\n\n\t\t\tfunction onImageError(event) {\n\t\t\t\timage.removeEventListener('load', onImageLoad, false);\n\t\t\t\timage.removeEventListener('error', onImageError, false);\n\t\t\t\tif (onError) onError(event);\n\t\t\t\tscope.manager.itemError(url);\n\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t}\n\n\t\t\timage.addEventListener('load', onImageLoad, false);\n\t\t\timage.addEventListener('error', onImageError, false);\n\n\t\t\tif (url.substr(0, 5) !== 'data:') {\n\t\t\t\tif (this.crossOrigin !== undefined) image.crossOrigin = this.crossOrigin;\n\t\t\t}\n\n\t\t\tscope.manager.itemStart(url);\n\t\t\timage.src = url;\n\t\t\treturn image;\n\t\t}\n\t});\n\n\tfunction CubeTextureLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tCubeTextureLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: CubeTextureLoader,\n\t\tload: function load(urls, onLoad, onProgress, onError) {\n\t\t\tvar texture = new CubeTexture();\n\t\t\tvar loader = new ImageLoader(this.manager);\n\t\t\tloader.setCrossOrigin(this.crossOrigin);\n\t\t\tloader.setPath(this.path);\n\t\t\tvar loaded = 0;\n\n\t\t\tfunction loadTexture(i) {\n\t\t\t\tloader.load(urls[i], function (image) {\n\t\t\t\t\ttexture.images[i] = image;\n\t\t\t\t\tloaded++;\n\n\t\t\t\t\tif (loaded === 6) {\n\t\t\t\t\t\ttexture.needsUpdate = true;\n\t\t\t\t\t\tif (onLoad) onLoad(texture);\n\t\t\t\t\t}\n\t\t\t\t}, undefined, onError);\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < urls.length; ++i) {\n\t\t\t\tloadTexture(i);\n\t\t\t}\n\n\t\t\treturn texture;\n\t\t}\n\t});\n\n\t/**\n\t * Abstract Base class to load generic binary textures formats (rgbe, hdr, ...)\n\t *\n\t * Sub classes have to implement the parse() method which will be used in load().\n\t */\n\n\tfunction DataTextureLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tDataTextureLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: DataTextureLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar texture = new DataTexture();\n\t\t\tvar loader = new FileLoader(this.manager);\n\t\t\tloader.setResponseType('arraybuffer');\n\t\t\tloader.setRequestHeader(this.requestHeader);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (buffer) {\n\t\t\t\tvar texData = scope.parse(buffer);\n\t\t\t\tif (!texData) return;\n\n\t\t\t\tif (texData.image !== undefined) {\n\t\t\t\t\ttexture.image = texData.image;\n\t\t\t\t} else if (texData.data !== undefined) {\n\t\t\t\t\ttexture.image.width = texData.width;\n\t\t\t\t\ttexture.image.height = texData.height;\n\t\t\t\t\ttexture.image.data = texData.data;\n\t\t\t\t}\n\n\t\t\t\ttexture.wrapS = texData.wrapS !== undefined ? texData.wrapS : ClampToEdgeWrapping;\n\t\t\t\ttexture.wrapT = texData.wrapT !== undefined ? texData.wrapT : ClampToEdgeWrapping;\n\t\t\t\ttexture.magFilter = texData.magFilter !== undefined ? texData.magFilter : LinearFilter;\n\t\t\t\ttexture.minFilter = texData.minFilter !== undefined ? texData.minFilter : LinearFilter;\n\t\t\t\ttexture.anisotropy = texData.anisotropy !== undefined ? texData.anisotropy : 1;\n\n\t\t\t\tif (texData.encoding !== undefined) {\n\t\t\t\t\ttexture.encoding = texData.encoding;\n\t\t\t\t}\n\n\t\t\t\tif (texData.flipY !== undefined) {\n\t\t\t\t\ttexture.flipY = texData.flipY;\n\t\t\t\t}\n\n\t\t\t\tif (texData.format !== undefined) {\n\t\t\t\t\ttexture.format = texData.format;\n\t\t\t\t}\n\n\t\t\t\tif (texData.type !== undefined) {\n\t\t\t\t\ttexture.type = texData.type;\n\t\t\t\t}\n\n\t\t\t\tif (texData.mipmaps !== undefined) {\n\t\t\t\t\ttexture.mipmaps = texData.mipmaps;\n\t\t\t\t\ttexture.minFilter = LinearMipmapLinearFilter; // presumably...\n\t\t\t\t}\n\n\t\t\t\tif (texData.mipmapCount === 1) {\n\t\t\t\t\ttexture.minFilter = LinearFilter;\n\t\t\t\t}\n\n\t\t\t\ttexture.needsUpdate = true;\n\t\t\t\tif (onLoad) onLoad(texture, texData);\n\t\t\t}, onProgress, onError);\n\t\t\treturn texture;\n\t\t}\n\t});\n\n\tfunction TextureLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tTextureLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: TextureLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar texture = new Texture();\n\t\t\tvar loader = new ImageLoader(this.manager);\n\t\t\tloader.setCrossOrigin(this.crossOrigin);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.load(url, function (image) {\n\t\t\t\ttexture.image = image; // JPEGs can't have an alpha channel, so memory can be saved by storing them as RGB.\n\n\t\t\t\tvar isJPEG = url.search(/\\.jpe?g($|\\?)/i) > 0 || url.search(/^data\\:image\\/jpeg/) === 0;\n\t\t\t\ttexture.format = isJPEG ? RGBFormat : RGBAFormat;\n\t\t\t\ttexture.needsUpdate = true;\n\n\t\t\t\tif (onLoad !== undefined) {\n\t\t\t\t\tonLoad(texture);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t\treturn texture;\n\t\t}\n\t});\n\n\t/**\n\t * Extensible curve object.\n\t *\n\t * Some common of curve methods:\n\t * .getPoint( t, optionalTarget ), .getTangent( t, optionalTarget )\n\t * .getPointAt( u, optionalTarget ), .getTangentAt( u, optionalTarget )\n\t * .getPoints(), .getSpacedPoints()\n\t * .getLength()\n\t * .updateArcLengths()\n\t *\n\t * This following curves inherit from THREE.Curve:\n\t *\n\t * -- 2D curves --\n\t * THREE.ArcCurve\n\t * THREE.CubicBezierCurve\n\t * THREE.EllipseCurve\n\t * THREE.LineCurve\n\t * THREE.QuadraticBezierCurve\n\t * THREE.SplineCurve\n\t *\n\t * -- 3D curves --\n\t * THREE.CatmullRomCurve3\n\t * THREE.CubicBezierCurve3\n\t * THREE.LineCurve3\n\t * THREE.QuadraticBezierCurve3\n\t *\n\t * A series of curves can be represented as a THREE.CurvePath.\n\t *\n\t **/\n\n\tfunction Curve() {\n\t\tthis.type = 'Curve';\n\t\tthis.arcLengthDivisions = 200;\n\t}\n\n\tObject.assign(Curve.prototype, {\n\t\t// Virtual base class method to overwrite and implement in subclasses\n\t\t//\t- t [0 .. 1]\n\t\tgetPoint: function getPoint()\n\t\t/* t, optionalTarget */\n\t\t{\n\t\t\tconsole.warn('THREE.Curve: .getPoint() not implemented.');\n\t\t\treturn null;\n\t\t},\n\t\t// Get point at relative position in curve according to arc length\n\t\t// - u [0 .. 1]\n\t\tgetPointAt: function getPointAt(u, optionalTarget) {\n\t\t\tvar t = this.getUtoTmapping(u);\n\t\t\treturn this.getPoint(t, optionalTarget);\n\t\t},\n\t\t// Get sequence of points using getPoint( t )\n\t\tgetPoints: function getPoints(divisions) {\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 5;\n\t\t\t}\n\n\t\t\tvar points = [];\n\n\t\t\tfor (var d = 0; d <= divisions; d++) {\n\t\t\t\tpoints.push(this.getPoint(d / divisions));\n\t\t\t}\n\n\t\t\treturn points;\n\t\t},\n\t\t// Get sequence of points using getPointAt( u )\n\t\tgetSpacedPoints: function getSpacedPoints(divisions) {\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 5;\n\t\t\t}\n\n\t\t\tvar points = [];\n\n\t\t\tfor (var d = 0; d <= divisions; d++) {\n\t\t\t\tpoints.push(this.getPointAt(d / divisions));\n\t\t\t}\n\n\t\t\treturn points;\n\t\t},\n\t\t// Get total curve arc length\n\t\tgetLength: function getLength() {\n\t\t\tvar lengths = this.getLengths();\n\t\t\treturn lengths[lengths.length - 1];\n\t\t},\n\t\t// Get list of cumulative segment lengths\n\t\tgetLengths: function getLengths(divisions) {\n\t\t\tif (divisions === undefined) divisions = this.arcLengthDivisions;\n\n\t\t\tif (this.cacheArcLengths && this.cacheArcLengths.length === divisions + 1 && !this.needsUpdate) {\n\t\t\t\treturn this.cacheArcLengths;\n\t\t\t}\n\n\t\t\tthis.needsUpdate = false;\n\t\t\tvar cache = [];\n\t\t\tvar current,\n\t\t\t\t\tlast = this.getPoint(0);\n\t\t\tvar sum = 0;\n\t\t\tcache.push(0);\n\n\t\t\tfor (var p = 1; p <= divisions; p++) {\n\t\t\t\tcurrent = this.getPoint(p / divisions);\n\t\t\t\tsum += current.distanceTo(last);\n\t\t\t\tcache.push(sum);\n\t\t\t\tlast = current;\n\t\t\t}\n\n\t\t\tthis.cacheArcLengths = cache;\n\t\t\treturn cache; // { sums: cache, sum: sum }; Sum is in the last element.\n\t\t},\n\t\tupdateArcLengths: function updateArcLengths() {\n\t\t\tthis.needsUpdate = true;\n\t\t\tthis.getLengths();\n\t\t},\n\t\t// Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\n\t\tgetUtoTmapping: function getUtoTmapping(u, distance) {\n\t\t\tvar arcLengths = this.getLengths();\n\t\t\tvar i = 0;\n\t\t\tvar il = arcLengths.length;\n\t\t\tvar targetArcLength; // The targeted u distance value to get\n\n\t\t\tif (distance) {\n\t\t\t\ttargetArcLength = distance;\n\t\t\t} else {\n\t\t\t\ttargetArcLength = u * arcLengths[il - 1];\n\t\t\t} // binary search for the index with largest value smaller than target u distance\n\n\n\t\t\tvar low = 0,\n\t\t\t\t\thigh = il - 1,\n\t\t\t\t\tcomparison;\n\n\t\t\twhile (low <= high) {\n\t\t\t\ti = Math.floor(low + (high - low) / 2); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\n\n\t\t\t\tcomparison = arcLengths[i] - targetArcLength;\n\n\t\t\t\tif (comparison < 0) {\n\t\t\t\t\tlow = i + 1;\n\t\t\t\t} else if (comparison > 0) {\n\t\t\t\t\thigh = i - 1;\n\t\t\t\t} else {\n\t\t\t\t\thigh = i;\n\t\t\t\t\tbreak; // DONE\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ti = high;\n\n\t\t\tif (arcLengths[i] === targetArcLength) {\n\t\t\t\treturn i / (il - 1);\n\t\t\t} // we could get finer grain at lengths, or use simple interpolation between two points\n\n\n\t\t\tvar lengthBefore = arcLengths[i];\n\t\t\tvar lengthAfter = arcLengths[i + 1];\n\t\t\tvar segmentLength = lengthAfter - lengthBefore; // determine where we are between the 'before' and 'after' points\n\n\t\t\tvar segmentFraction = (targetArcLength - lengthBefore) / segmentLength; // add that fractional amount to t\n\n\t\t\tvar t = (i + segmentFraction) / (il - 1);\n\t\t\treturn t;\n\t\t},\n\t\t// Returns a unit vector tangent at t\n\t\t// In case any sub curve does not implement its tangent derivation,\n\t\t// 2 points a small delta apart will be used to find its gradient\n\t\t// which seems to give a reasonable approximation\n\t\tgetTangent: function getTangent(t, optionalTarget) {\n\t\t\tvar delta = 0.0001;\n\t\t\tvar t1 = t - delta;\n\t\t\tvar t2 = t + delta; // Capping in case of danger\n\n\t\t\tif (t1 < 0) t1 = 0;\n\t\t\tif (t2 > 1) t2 = 1;\n\t\t\tvar pt1 = this.getPoint(t1);\n\t\t\tvar pt2 = this.getPoint(t2);\n\t\t\tvar tangent = optionalTarget || (pt1.isVector2 ? new Vector2() : new Vector3());\n\t\t\ttangent.copy(pt2).sub(pt1).normalize();\n\t\t\treturn tangent;\n\t\t},\n\t\tgetTangentAt: function getTangentAt(u, optionalTarget) {\n\t\t\tvar t = this.getUtoTmapping(u);\n\t\t\treturn this.getTangent(t, optionalTarget);\n\t\t},\n\t\tcomputeFrenetFrames: function computeFrenetFrames(segments, closed) {\n\t\t\t// see http://www.cs.indiana.edu/pub/techreports/TR425.pdf\n\t\t\tvar normal = new Vector3();\n\t\t\tvar tangents = [];\n\t\t\tvar normals = [];\n\t\t\tvar binormals = [];\n\t\t\tvar vec = new Vector3();\n\t\t\tvar mat = new Matrix4(); // compute the tangent vectors for each segment on the curve\n\n\t\t\tfor (var i = 0; i <= segments; i++) {\n\t\t\t\tvar u = i / segments;\n\t\t\t\ttangents[i] = this.getTangentAt(u, new Vector3());\n\t\t\t\ttangents[i].normalize();\n\t\t\t} // select an initial normal vector perpendicular to the first tangent vector,\n\t\t\t// and in the direction of the minimum tangent xyz component\n\n\n\t\t\tnormals[0] = new Vector3();\n\t\t\tbinormals[0] = new Vector3();\n\t\t\tvar min = Number.MAX_VALUE;\n\t\t\tvar tx = Math.abs(tangents[0].x);\n\t\t\tvar ty = Math.abs(tangents[0].y);\n\t\t\tvar tz = Math.abs(tangents[0].z);\n\n\t\t\tif (tx <= min) {\n\t\t\t\tmin = tx;\n\t\t\t\tnormal.set(1, 0, 0);\n\t\t\t}\n\n\t\t\tif (ty <= min) {\n\t\t\t\tmin = ty;\n\t\t\t\tnormal.set(0, 1, 0);\n\t\t\t}\n\n\t\t\tif (tz <= min) {\n\t\t\t\tnormal.set(0, 0, 1);\n\t\t\t}\n\n\t\t\tvec.crossVectors(tangents[0], normal).normalize();\n\t\t\tnormals[0].crossVectors(tangents[0], vec);\n\t\t\tbinormals[0].crossVectors(tangents[0], normals[0]); // compute the slowly-varying normal and binormal vectors for each segment on the curve\n\n\t\t\tfor (var _i = 1; _i <= segments; _i++) {\n\t\t\t\tnormals[_i] = normals[_i - 1].clone();\n\t\t\t\tbinormals[_i] = binormals[_i - 1].clone();\n\t\t\t\tvec.crossVectors(tangents[_i - 1], tangents[_i]);\n\n\t\t\t\tif (vec.length() > Number.EPSILON) {\n\t\t\t\t\tvec.normalize();\n\t\t\t\t\tvar theta = Math.acos(MathUtils.clamp(tangents[_i - 1].dot(tangents[_i]), -1, 1)); // clamp for floating pt errors\n\n\t\t\t\t\tnormals[_i].applyMatrix4(mat.makeRotationAxis(vec, theta));\n\t\t\t\t}\n\n\t\t\t\tbinormals[_i].crossVectors(tangents[_i], normals[_i]);\n\t\t\t} // if the curve is closed, postprocess the vectors so the first and last normal vectors are the same\n\n\n\t\t\tif (closed === true) {\n\t\t\t\tvar _theta = Math.acos(MathUtils.clamp(normals[0].dot(normals[segments]), -1, 1));\n\n\t\t\t\t_theta /= segments;\n\n\t\t\t\tif (tangents[0].dot(vec.crossVectors(normals[0], normals[segments])) > 0) {\n\t\t\t\t\t_theta = -_theta;\n\t\t\t\t}\n\n\t\t\t\tfor (var _i2 = 1; _i2 <= segments; _i2++) {\n\t\t\t\t\t// twist a little...\n\t\t\t\t\tnormals[_i2].applyMatrix4(mat.makeRotationAxis(tangents[_i2], _theta * _i2));\n\n\t\t\t\t\tbinormals[_i2].crossVectors(tangents[_i2], normals[_i2]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttangents: tangents,\n\t\t\t\tnormals: normals,\n\t\t\t\tbinormals: binormals\n\t\t\t};\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.arcLengthDivisions = source.arcLengthDivisions;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = {\n\t\t\t\tmetadata: {\n\t\t\t\t\tversion: 4.5,\n\t\t\t\t\ttype: 'Curve',\n\t\t\t\t\tgenerator: 'Curve.toJSON'\n\t\t\t\t}\n\t\t\t};\n\t\t\tdata.arcLengthDivisions = this.arcLengthDivisions;\n\t\t\tdata.type = this.type;\n\t\t\treturn data;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tthis.arcLengthDivisions = json.arcLengthDivisions;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction EllipseCurve(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n\t\tCurve.call(this);\n\t\tthis.type = 'EllipseCurve';\n\t\tthis.aX = aX || 0;\n\t\tthis.aY = aY || 0;\n\t\tthis.xRadius = xRadius || 1;\n\t\tthis.yRadius = yRadius || 1;\n\t\tthis.aStartAngle = aStartAngle || 0;\n\t\tthis.aEndAngle = aEndAngle || 2 * Math.PI;\n\t\tthis.aClockwise = aClockwise || false;\n\t\tthis.aRotation = aRotation || 0;\n\t}\n\n\tEllipseCurve.prototype = Object.create(Curve.prototype);\n\tEllipseCurve.prototype.constructor = EllipseCurve;\n\tEllipseCurve.prototype.isEllipseCurve = true;\n\n\tEllipseCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tvar point = optionalTarget || new Vector2();\n\t\tvar twoPi = Math.PI * 2;\n\t\tvar deltaAngle = this.aEndAngle - this.aStartAngle;\n\t\tvar samePoints = Math.abs(deltaAngle) < Number.EPSILON; // ensures that deltaAngle is 0 .. 2 PI\n\n\t\twhile (deltaAngle < 0) {\n\t\t\tdeltaAngle += twoPi;\n\t\t}\n\n\t\twhile (deltaAngle > twoPi) {\n\t\t\tdeltaAngle -= twoPi;\n\t\t}\n\n\t\tif (deltaAngle < Number.EPSILON) {\n\t\t\tif (samePoints) {\n\t\t\t\tdeltaAngle = 0;\n\t\t\t} else {\n\t\t\t\tdeltaAngle = twoPi;\n\t\t\t}\n\t\t}\n\n\t\tif (this.aClockwise === true && !samePoints) {\n\t\t\tif (deltaAngle === twoPi) {\n\t\t\t\tdeltaAngle = -twoPi;\n\t\t\t} else {\n\t\t\t\tdeltaAngle = deltaAngle - twoPi;\n\t\t\t}\n\t\t}\n\n\t\tvar angle = this.aStartAngle + t * deltaAngle;\n\t\tvar x = this.aX + this.xRadius * Math.cos(angle);\n\t\tvar y = this.aY + this.yRadius * Math.sin(angle);\n\n\t\tif (this.aRotation !== 0) {\n\t\t\tvar cos = Math.cos(this.aRotation);\n\t\t\tvar sin = Math.sin(this.aRotation);\n\t\t\tvar tx = x - this.aX;\n\t\t\tvar ty = y - this.aY; // Rotate the point about the center of the ellipse.\n\n\t\t\tx = tx * cos - ty * sin + this.aX;\n\t\t\ty = tx * sin + ty * cos + this.aY;\n\t\t}\n\n\t\treturn point.set(x, y);\n\t};\n\n\tEllipseCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.aX = source.aX;\n\t\tthis.aY = source.aY;\n\t\tthis.xRadius = source.xRadius;\n\t\tthis.yRadius = source.yRadius;\n\t\tthis.aStartAngle = source.aStartAngle;\n\t\tthis.aEndAngle = source.aEndAngle;\n\t\tthis.aClockwise = source.aClockwise;\n\t\tthis.aRotation = source.aRotation;\n\t\treturn this;\n\t};\n\n\tEllipseCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.aX = this.aX;\n\t\tdata.aY = this.aY;\n\t\tdata.xRadius = this.xRadius;\n\t\tdata.yRadius = this.yRadius;\n\t\tdata.aStartAngle = this.aStartAngle;\n\t\tdata.aEndAngle = this.aEndAngle;\n\t\tdata.aClockwise = this.aClockwise;\n\t\tdata.aRotation = this.aRotation;\n\t\treturn data;\n\t};\n\n\tEllipseCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.aX = json.aX;\n\t\tthis.aY = json.aY;\n\t\tthis.xRadius = json.xRadius;\n\t\tthis.yRadius = json.yRadius;\n\t\tthis.aStartAngle = json.aStartAngle;\n\t\tthis.aEndAngle = json.aEndAngle;\n\t\tthis.aClockwise = json.aClockwise;\n\t\tthis.aRotation = json.aRotation;\n\t\treturn this;\n\t};\n\n\tfunction ArcCurve(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n\t\tEllipseCurve.call(this, aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);\n\t\tthis.type = 'ArcCurve';\n\t}\n\n\tArcCurve.prototype = Object.create(EllipseCurve.prototype);\n\tArcCurve.prototype.constructor = ArcCurve;\n\tArcCurve.prototype.isArcCurve = true;\n\n\t/**\n\t * Centripetal CatmullRom Curve - which is useful for avoiding\n\t * cusps and self-intersections in non-uniform catmull rom curves.\n\t * http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf\n\t *\n\t * curve.type accepts centripetal(default), chordal and catmullrom\n\t * curve.tension is used for catmullrom which defaults to 0.5\n\t */\n\n\t/*\n\tBased on an optimized c++ solution in\n\t - http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/\n\t - http://ideone.com/NoEbVM\n\n\tThis CubicPoly class could be used for reusing some variables and calculations,\n\tbut for three.js curve use, it could be possible inlined and flatten into a single function call\n\twhich can be placed in CurveUtils.\n\t*/\n\n\tfunction CubicPoly() {\n\t\tvar c0 = 0,\n\t\t\t\tc1 = 0,\n\t\t\t\tc2 = 0,\n\t\t\t\tc3 = 0;\n\t\t/*\n\t\t * Compute coefficients for a cubic polynomial\n\t\t *\t p(s) = c0 + c1*s + c2*s^2 + c3*s^3\n\t\t * such that\n\t\t *\t p(0) = x0, p(1) = x1\n\t\t *\tand\n\t\t *\t p'(0) = t0, p'(1) = t1.\n\t\t */\n\n\t\tfunction init(x0, x1, t0, t1) {\n\t\t\tc0 = x0;\n\t\t\tc1 = t0;\n\t\t\tc2 = -3 * x0 + 3 * x1 - 2 * t0 - t1;\n\t\t\tc3 = 2 * x0 - 2 * x1 + t0 + t1;\n\t\t}\n\n\t\treturn {\n\t\t\tinitCatmullRom: function initCatmullRom(x0, x1, x2, x3, tension) {\n\t\t\t\tinit(x1, x2, tension * (x2 - x0), tension * (x3 - x1));\n\t\t\t},\n\t\t\tinitNonuniformCatmullRom: function initNonuniformCatmullRom(x0, x1, x2, x3, dt0, dt1, dt2) {\n\t\t\t\t// compute tangents when parameterized in [t1,t2]\n\t\t\t\tvar t1 = (x1 - x0) / dt0 - (x2 - x0) / (dt0 + dt1) + (x2 - x1) / dt1;\n\t\t\t\tvar t2 = (x2 - x1) / dt1 - (x3 - x1) / (dt1 + dt2) + (x3 - x2) / dt2; // rescale tangents for parametrization in [0,1]\n\n\t\t\t\tt1 *= dt1;\n\t\t\t\tt2 *= dt1;\n\t\t\t\tinit(x1, x2, t1, t2);\n\t\t\t},\n\t\t\tcalc: function calc(t) {\n\t\t\t\tvar t2 = t * t;\n\t\t\t\tvar t3 = t2 * t;\n\t\t\t\treturn c0 + c1 * t + c2 * t2 + c3 * t3;\n\t\t\t}\n\t\t};\n\t} //\n\n\n\tvar tmp = new Vector3();\n\tvar px = new CubicPoly(),\n\t\t\tpy = new CubicPoly(),\n\t\t\tpz = new CubicPoly();\n\n\tfunction CatmullRomCurve3(points, closed, curveType, tension) {\n\t\tif (points === void 0) {\n\t\t\tpoints = [];\n\t\t}\n\n\t\tif (closed === void 0) {\n\t\t\tclosed = false;\n\t\t}\n\n\t\tif (curveType === void 0) {\n\t\t\tcurveType = 'centripetal';\n\t\t}\n\n\t\tif (tension === void 0) {\n\t\t\ttension = 0.5;\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'CatmullRomCurve3';\n\t\tthis.points = points;\n\t\tthis.closed = closed;\n\t\tthis.curveType = curveType;\n\t\tthis.tension = tension;\n\t}\n\n\tCatmullRomCurve3.prototype = Object.create(Curve.prototype);\n\tCatmullRomCurve3.prototype.constructor = CatmullRomCurve3;\n\tCatmullRomCurve3.prototype.isCatmullRomCurve3 = true;\n\n\tCatmullRomCurve3.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector3();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar points = this.points;\n\t\tvar l = points.length;\n\t\tvar p = (l - (this.closed ? 0 : 1)) * t;\n\t\tvar intPoint = Math.floor(p);\n\t\tvar weight = p - intPoint;\n\n\t\tif (this.closed) {\n\t\t\tintPoint += intPoint > 0 ? 0 : (Math.floor(Math.abs(intPoint) / l) + 1) * l;\n\t\t} else if (weight === 0 && intPoint === l - 1) {\n\t\t\tintPoint = l - 2;\n\t\t\tweight = 1;\n\t\t}\n\n\t\tvar p0, p3; // 4 points (p1 & p2 defined below)\n\n\t\tif (this.closed || intPoint > 0) {\n\t\t\tp0 = points[(intPoint - 1) % l];\n\t\t} else {\n\t\t\t// extrapolate first point\n\t\t\ttmp.subVectors(points[0], points[1]).add(points[0]);\n\t\t\tp0 = tmp;\n\t\t}\n\n\t\tvar p1 = points[intPoint % l];\n\t\tvar p2 = points[(intPoint + 1) % l];\n\n\t\tif (this.closed || intPoint + 2 < l) {\n\t\t\tp3 = points[(intPoint + 2) % l];\n\t\t} else {\n\t\t\t// extrapolate last point\n\t\t\ttmp.subVectors(points[l - 1], points[l - 2]).add(points[l - 1]);\n\t\t\tp3 = tmp;\n\t\t}\n\n\t\tif (this.curveType === 'centripetal' || this.curveType === 'chordal') {\n\t\t\t// init Centripetal / Chordal Catmull-Rom\n\t\t\tvar pow = this.curveType === 'chordal' ? 0.5 : 0.25;\n\t\t\tvar dt0 = Math.pow(p0.distanceToSquared(p1), pow);\n\t\t\tvar dt1 = Math.pow(p1.distanceToSquared(p2), pow);\n\t\t\tvar dt2 = Math.pow(p2.distanceToSquared(p3), pow); // safety check for repeated points\n\n\t\t\tif (dt1 < 1e-4) dt1 = 1.0;\n\t\t\tif (dt0 < 1e-4) dt0 = dt1;\n\t\t\tif (dt2 < 1e-4) dt2 = dt1;\n\t\t\tpx.initNonuniformCatmullRom(p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2);\n\t\t\tpy.initNonuniformCatmullRom(p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2);\n\t\t\tpz.initNonuniformCatmullRom(p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2);\n\t\t} else if (this.curveType === 'catmullrom') {\n\t\t\tpx.initCatmullRom(p0.x, p1.x, p2.x, p3.x, this.tension);\n\t\t\tpy.initCatmullRom(p0.y, p1.y, p2.y, p3.y, this.tension);\n\t\t\tpz.initCatmullRom(p0.z, p1.z, p2.z, p3.z, this.tension);\n\t\t}\n\n\t\tpoint.set(px.calc(weight), py.calc(weight), pz.calc(weight));\n\t\treturn point;\n\t};\n\n\tCatmullRomCurve3.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.points = [];\n\n\t\tfor (var i = 0, l = source.points.length; i < l; i++) {\n\t\t\tvar point = source.points[i];\n\t\t\tthis.points.push(point.clone());\n\t\t}\n\n\t\tthis.closed = source.closed;\n\t\tthis.curveType = source.curveType;\n\t\tthis.tension = source.tension;\n\t\treturn this;\n\t};\n\n\tCatmullRomCurve3.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.points = [];\n\n\t\tfor (var i = 0, l = this.points.length; i < l; i++) {\n\t\t\tvar point = this.points[i];\n\t\t\tdata.points.push(point.toArray());\n\t\t}\n\n\t\tdata.closed = this.closed;\n\t\tdata.curveType = this.curveType;\n\t\tdata.tension = this.tension;\n\t\treturn data;\n\t};\n\n\tCatmullRomCurve3.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.points = [];\n\n\t\tfor (var i = 0, l = json.points.length; i < l; i++) {\n\t\t\tvar point = json.points[i];\n\t\t\tthis.points.push(new Vector3().fromArray(point));\n\t\t}\n\n\t\tthis.closed = json.closed;\n\t\tthis.curveType = json.curveType;\n\t\tthis.tension = json.tension;\n\t\treturn this;\n\t};\n\n\t/**\n\t * Bezier Curves formulas obtained from\n\t * http://en.wikipedia.org/wiki/Bézier_curve\n\t */\n\tfunction CatmullRom(t, p0, p1, p2, p3) {\n\t\tvar v0 = (p2 - p0) * 0.5;\n\t\tvar v1 = (p3 - p1) * 0.5;\n\t\tvar t2 = t * t;\n\t\tvar t3 = t * t2;\n\t\treturn (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\n\t} //\n\n\n\tfunction QuadraticBezierP0(t, p) {\n\t\tvar k = 1 - t;\n\t\treturn k * k * p;\n\t}\n\n\tfunction QuadraticBezierP1(t, p) {\n\t\treturn 2 * (1 - t) * t * p;\n\t}\n\n\tfunction QuadraticBezierP2(t, p) {\n\t\treturn t * t * p;\n\t}\n\n\tfunction QuadraticBezier(t, p0, p1, p2) {\n\t\treturn QuadraticBezierP0(t, p0) + QuadraticBezierP1(t, p1) + QuadraticBezierP2(t, p2);\n\t} //\n\n\n\tfunction CubicBezierP0(t, p) {\n\t\tvar k = 1 - t;\n\t\treturn k * k * k * p;\n\t}\n\n\tfunction CubicBezierP1(t, p) {\n\t\tvar k = 1 - t;\n\t\treturn 3 * k * k * t * p;\n\t}\n\n\tfunction CubicBezierP2(t, p) {\n\t\treturn 3 * (1 - t) * t * t * p;\n\t}\n\n\tfunction CubicBezierP3(t, p) {\n\t\treturn t * t * t * p;\n\t}\n\n\tfunction CubicBezier(t, p0, p1, p2, p3) {\n\t\treturn CubicBezierP0(t, p0) + CubicBezierP1(t, p1) + CubicBezierP2(t, p2) + CubicBezierP3(t, p3);\n\t}\n\n\tfunction CubicBezierCurve(v0, v1, v2, v3) {\n\t\tif (v0 === void 0) {\n\t\t\tv0 = new Vector2();\n\t\t}\n\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector2();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector2();\n\t\t}\n\n\t\tif (v3 === void 0) {\n\t\t\tv3 = new Vector2();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'CubicBezierCurve';\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\t}\n\n\tCubicBezierCurve.prototype = Object.create(Curve.prototype);\n\tCubicBezierCurve.prototype.constructor = CubicBezierCurve;\n\tCubicBezierCurve.prototype.isCubicBezierCurve = true;\n\n\tCubicBezierCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector2();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar v0 = this.v0,\n\t\t\t\tv1 = this.v1,\n\t\t\t\tv2 = this.v2,\n\t\t\t\tv3 = this.v3;\n\t\tpoint.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y));\n\t\treturn point;\n\t};\n\n\tCubicBezierCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v0.copy(source.v0);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\tthis.v3.copy(source.v3);\n\t\treturn this;\n\t};\n\n\tCubicBezierCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\t\treturn data;\n\t};\n\n\tCubicBezierCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v0.fromArray(json.v0);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\tthis.v3.fromArray(json.v3);\n\t\treturn this;\n\t};\n\n\tfunction CubicBezierCurve3(v0, v1, v2, v3) {\n\t\tif (v0 === void 0) {\n\t\t\tv0 = new Vector3();\n\t\t}\n\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector3();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector3();\n\t\t}\n\n\t\tif (v3 === void 0) {\n\t\t\tv3 = new Vector3();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'CubicBezierCurve3';\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t\tthis.v3 = v3;\n\t}\n\n\tCubicBezierCurve3.prototype = Object.create(Curve.prototype);\n\tCubicBezierCurve3.prototype.constructor = CubicBezierCurve3;\n\tCubicBezierCurve3.prototype.isCubicBezierCurve3 = true;\n\n\tCubicBezierCurve3.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector3();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar v0 = this.v0,\n\t\t\t\tv1 = this.v1,\n\t\t\t\tv2 = this.v2,\n\t\t\t\tv3 = this.v3;\n\t\tpoint.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y), CubicBezier(t, v0.z, v1.z, v2.z, v3.z));\n\t\treturn point;\n\t};\n\n\tCubicBezierCurve3.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v0.copy(source.v0);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\tthis.v3.copy(source.v3);\n\t\treturn this;\n\t};\n\n\tCubicBezierCurve3.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\tdata.v3 = this.v3.toArray();\n\t\treturn data;\n\t};\n\n\tCubicBezierCurve3.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v0.fromArray(json.v0);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\tthis.v3.fromArray(json.v3);\n\t\treturn this;\n\t};\n\n\tfunction LineCurve(v1, v2) {\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector2();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector2();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'LineCurve';\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t}\n\n\tLineCurve.prototype = Object.create(Curve.prototype);\n\tLineCurve.prototype.constructor = LineCurve;\n\tLineCurve.prototype.isLineCurve = true;\n\n\tLineCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector2();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\n\t\tif (t === 1) {\n\t\t\tpoint.copy(this.v2);\n\t\t} else {\n\t\t\tpoint.copy(this.v2).sub(this.v1);\n\t\t\tpoint.multiplyScalar(t).add(this.v1);\n\t\t}\n\n\t\treturn point;\n\t}; // Line curve is linear, so we can overwrite default getPointAt\n\n\n\tLineCurve.prototype.getPointAt = function (u, optionalTarget) {\n\t\treturn this.getPoint(u, optionalTarget);\n\t};\n\n\tLineCurve.prototype.getTangent = function (t, optionalTarget) {\n\t\tvar tangent = optionalTarget || new Vector2();\n\t\ttangent.copy(this.v2).sub(this.v1).normalize();\n\t\treturn tangent;\n\t};\n\n\tLineCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\treturn this;\n\t};\n\n\tLineCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\treturn data;\n\t};\n\n\tLineCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\treturn this;\n\t};\n\n\tfunction LineCurve3(v1, v2) {\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector3();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector3();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'LineCurve3';\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t}\n\n\tLineCurve3.prototype = Object.create(Curve.prototype);\n\tLineCurve3.prototype.constructor = LineCurve3;\n\tLineCurve3.prototype.isLineCurve3 = true;\n\n\tLineCurve3.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector3();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\n\t\tif (t === 1) {\n\t\t\tpoint.copy(this.v2);\n\t\t} else {\n\t\t\tpoint.copy(this.v2).sub(this.v1);\n\t\t\tpoint.multiplyScalar(t).add(this.v1);\n\t\t}\n\n\t\treturn point;\n\t}; // Line curve is linear, so we can overwrite default getPointAt\n\n\n\tLineCurve3.prototype.getPointAt = function (u, optionalTarget) {\n\t\treturn this.getPoint(u, optionalTarget);\n\t};\n\n\tLineCurve3.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\treturn this;\n\t};\n\n\tLineCurve3.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\treturn data;\n\t};\n\n\tLineCurve3.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\treturn this;\n\t};\n\n\tfunction QuadraticBezierCurve(v0, v1, v2) {\n\t\tif (v0 === void 0) {\n\t\t\tv0 = new Vector2();\n\t\t}\n\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector2();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector2();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'QuadraticBezierCurve';\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t}\n\n\tQuadraticBezierCurve.prototype = Object.create(Curve.prototype);\n\tQuadraticBezierCurve.prototype.constructor = QuadraticBezierCurve;\n\tQuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;\n\n\tQuadraticBezierCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector2();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar v0 = this.v0,\n\t\t\t\tv1 = this.v1,\n\t\t\t\tv2 = this.v2;\n\t\tpoint.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y));\n\t\treturn point;\n\t};\n\n\tQuadraticBezierCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v0.copy(source.v0);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\treturn this;\n\t};\n\n\tQuadraticBezierCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\treturn data;\n\t};\n\n\tQuadraticBezierCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v0.fromArray(json.v0);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\treturn this;\n\t};\n\n\tfunction QuadraticBezierCurve3(v0, v1, v2) {\n\t\tif (v0 === void 0) {\n\t\t\tv0 = new Vector3();\n\t\t}\n\n\t\tif (v1 === void 0) {\n\t\t\tv1 = new Vector3();\n\t\t}\n\n\t\tif (v2 === void 0) {\n\t\t\tv2 = new Vector3();\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'QuadraticBezierCurve3';\n\t\tthis.v0 = v0;\n\t\tthis.v1 = v1;\n\t\tthis.v2 = v2;\n\t}\n\n\tQuadraticBezierCurve3.prototype = Object.create(Curve.prototype);\n\tQuadraticBezierCurve3.prototype.constructor = QuadraticBezierCurve3;\n\tQuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;\n\n\tQuadraticBezierCurve3.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector3();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar v0 = this.v0,\n\t\t\t\tv1 = this.v1,\n\t\t\t\tv2 = this.v2;\n\t\tpoint.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y), QuadraticBezier(t, v0.z, v1.z, v2.z));\n\t\treturn point;\n\t};\n\n\tQuadraticBezierCurve3.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.v0.copy(source.v0);\n\t\tthis.v1.copy(source.v1);\n\t\tthis.v2.copy(source.v2);\n\t\treturn this;\n\t};\n\n\tQuadraticBezierCurve3.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.v0 = this.v0.toArray();\n\t\tdata.v1 = this.v1.toArray();\n\t\tdata.v2 = this.v2.toArray();\n\t\treturn data;\n\t};\n\n\tQuadraticBezierCurve3.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.v0.fromArray(json.v0);\n\t\tthis.v1.fromArray(json.v1);\n\t\tthis.v2.fromArray(json.v2);\n\t\treturn this;\n\t};\n\n\tfunction SplineCurve(points) {\n\t\tif (points === void 0) {\n\t\t\tpoints = [];\n\t\t}\n\n\t\tCurve.call(this);\n\t\tthis.type = 'SplineCurve';\n\t\tthis.points = points;\n\t}\n\n\tSplineCurve.prototype = Object.create(Curve.prototype);\n\tSplineCurve.prototype.constructor = SplineCurve;\n\tSplineCurve.prototype.isSplineCurve = true;\n\n\tSplineCurve.prototype.getPoint = function (t, optionalTarget) {\n\t\tif (optionalTarget === void 0) {\n\t\t\toptionalTarget = new Vector2();\n\t\t}\n\n\t\tvar point = optionalTarget;\n\t\tvar points = this.points;\n\t\tvar p = (points.length - 1) * t;\n\t\tvar intPoint = Math.floor(p);\n\t\tvar weight = p - intPoint;\n\t\tvar p0 = points[intPoint === 0 ? intPoint : intPoint - 1];\n\t\tvar p1 = points[intPoint];\n\t\tvar p2 = points[intPoint > points.length - 2 ? points.length - 1 : intPoint + 1];\n\t\tvar p3 = points[intPoint > points.length - 3 ? points.length - 1 : intPoint + 2];\n\t\tpoint.set(CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));\n\t\treturn point;\n\t};\n\n\tSplineCurve.prototype.copy = function (source) {\n\t\tCurve.prototype.copy.call(this, source);\n\t\tthis.points = [];\n\n\t\tfor (var i = 0, l = source.points.length; i < l; i++) {\n\t\t\tvar point = source.points[i];\n\t\t\tthis.points.push(point.clone());\n\t\t}\n\n\t\treturn this;\n\t};\n\n\tSplineCurve.prototype.toJSON = function () {\n\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\tdata.points = [];\n\n\t\tfor (var i = 0, l = this.points.length; i < l; i++) {\n\t\t\tvar point = this.points[i];\n\t\t\tdata.points.push(point.toArray());\n\t\t}\n\n\t\treturn data;\n\t};\n\n\tSplineCurve.prototype.fromJSON = function (json) {\n\t\tCurve.prototype.fromJSON.call(this, json);\n\t\tthis.points = [];\n\n\t\tfor (var i = 0, l = json.points.length; i < l; i++) {\n\t\t\tvar point = json.points[i];\n\t\t\tthis.points.push(new Vector2().fromArray(point));\n\t\t}\n\n\t\treturn this;\n\t};\n\n\tvar Curves = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tArcCurve: ArcCurve,\n\t\tCatmullRomCurve3: CatmullRomCurve3,\n\t\tCubicBezierCurve: CubicBezierCurve,\n\t\tCubicBezierCurve3: CubicBezierCurve3,\n\t\tEllipseCurve: EllipseCurve,\n\t\tLineCurve: LineCurve,\n\t\tLineCurve3: LineCurve3,\n\t\tQuadraticBezierCurve: QuadraticBezierCurve,\n\t\tQuadraticBezierCurve3: QuadraticBezierCurve3,\n\t\tSplineCurve: SplineCurve\n\t});\n\n\t/**************************************************************\n\t *\tCurved Path - a curve path is simply a array of connected\n\t *\tcurves, but retains the api of a curve\n\t **************************************************************/\n\n\tfunction CurvePath() {\n\t\tCurve.call(this);\n\t\tthis.type = 'CurvePath';\n\t\tthis.curves = [];\n\t\tthis.autoClose = false; // Automatically closes the path\n\t}\n\n\tCurvePath.prototype = Object.assign(Object.create(Curve.prototype), {\n\t\tconstructor: CurvePath,\n\t\tadd: function add(curve) {\n\t\t\tthis.curves.push(curve);\n\t\t},\n\t\tclosePath: function closePath() {\n\t\t\t// Add a line curve if start and end of lines are not connected\n\t\t\tvar startPoint = this.curves[0].getPoint(0);\n\t\t\tvar endPoint = this.curves[this.curves.length - 1].getPoint(1);\n\n\t\t\tif (!startPoint.equals(endPoint)) {\n\t\t\t\tthis.curves.push(new LineCurve(endPoint, startPoint));\n\t\t\t}\n\t\t},\n\t\t// To get accurate point with reference to\n\t\t// entire path distance at time t,\n\t\t// following has to be done:\n\t\t// 1. Length of each sub path have to be known\n\t\t// 2. Locate and identify type of curve\n\t\t// 3. Get t for the curve\n\t\t// 4. Return curve.getPointAt(t')\n\t\tgetPoint: function getPoint(t) {\n\t\t\tvar d = t * this.getLength();\n\t\t\tvar curveLengths = this.getCurveLengths();\n\t\t\tvar i = 0; // To think about boundaries points.\n\n\t\t\twhile (i < curveLengths.length) {\n\t\t\t\tif (curveLengths[i] >= d) {\n\t\t\t\t\tvar diff = curveLengths[i] - d;\n\t\t\t\t\tvar curve = this.curves[i];\n\t\t\t\t\tvar segmentLength = curve.getLength();\n\t\t\t\t\tvar u = segmentLength === 0 ? 0 : 1 - diff / segmentLength;\n\t\t\t\t\treturn curve.getPointAt(u);\n\t\t\t\t}\n\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\treturn null; // loop where sum != 0, sum > d , sum+1 <d\n\t\t},\n\t\t// We cannot use the default THREE.Curve getPoint() with getLength() because in\n\t\t// THREE.Curve, getLength() depends on getPoint() but in THREE.CurvePath\n\t\t// getPoint() depends on getLength\n\t\tgetLength: function getLength() {\n\t\t\tvar lens = this.getCurveLengths();\n\t\t\treturn lens[lens.length - 1];\n\t\t},\n\t\t// cacheLengths must be recalculated.\n\t\tupdateArcLengths: function updateArcLengths() {\n\t\t\tthis.needsUpdate = true;\n\t\t\tthis.cacheLengths = null;\n\t\t\tthis.getCurveLengths();\n\t\t},\n\t\t// Compute lengths and cache them\n\t\t// We cannot overwrite getLengths() because UtoT mapping uses it.\n\t\tgetCurveLengths: function getCurveLengths() {\n\t\t\t// We use cache values if curves and cache array are same length\n\t\t\tif (this.cacheLengths && this.cacheLengths.length === this.curves.length) {\n\t\t\t\treturn this.cacheLengths;\n\t\t\t} // Get length of sub-curve\n\t\t\t// Push sums into cached array\n\n\n\t\t\tvar lengths = [];\n\t\t\tvar sums = 0;\n\n\t\t\tfor (var i = 0, l = this.curves.length; i < l; i++) {\n\t\t\t\tsums += this.curves[i].getLength();\n\t\t\t\tlengths.push(sums);\n\t\t\t}\n\n\t\t\tthis.cacheLengths = lengths;\n\t\t\treturn lengths;\n\t\t},\n\t\tgetSpacedPoints: function getSpacedPoints(divisions) {\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 40;\n\t\t\t}\n\n\t\t\tvar points = [];\n\n\t\t\tfor (var i = 0; i <= divisions; i++) {\n\t\t\t\tpoints.push(this.getPoint(i / divisions));\n\t\t\t}\n\n\t\t\tif (this.autoClose) {\n\t\t\t\tpoints.push(points[0]);\n\t\t\t}\n\n\t\t\treturn points;\n\t\t},\n\t\tgetPoints: function getPoints(divisions) {\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 12;\n\t\t\t}\n\n\t\t\tvar points = [];\n\t\t\tvar last;\n\n\t\t\tfor (var i = 0, curves = this.curves; i < curves.length; i++) {\n\t\t\t\tvar curve = curves[i];\n\t\t\t\tvar resolution = curve && curve.isEllipseCurve ? divisions * 2 : curve && (curve.isLineCurve || curve.isLineCurve3) ? 1 : curve && curve.isSplineCurve ? divisions * curve.points.length : divisions;\n\t\t\t\tvar pts = curve.getPoints(resolution);\n\n\t\t\t\tfor (var j = 0; j < pts.length; j++) {\n\t\t\t\t\tvar point = pts[j];\n\t\t\t\t\tif (last && last.equals(point)) continue; // ensures no consecutive points are duplicates\n\n\t\t\t\t\tpoints.push(point);\n\t\t\t\t\tlast = point;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.autoClose && points.length > 1 && !points[points.length - 1].equals(points[0])) {\n\t\t\t\tpoints.push(points[0]);\n\t\t\t}\n\n\t\t\treturn points;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tCurve.prototype.copy.call(this, source);\n\t\t\tthis.curves = [];\n\n\t\t\tfor (var i = 0, l = source.curves.length; i < l; i++) {\n\t\t\t\tvar curve = source.curves[i];\n\t\t\t\tthis.curves.push(curve.clone());\n\t\t\t}\n\n\t\t\tthis.autoClose = source.autoClose;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = Curve.prototype.toJSON.call(this);\n\t\t\tdata.autoClose = this.autoClose;\n\t\t\tdata.curves = [];\n\n\t\t\tfor (var i = 0, l = this.curves.length; i < l; i++) {\n\t\t\t\tvar curve = this.curves[i];\n\t\t\t\tdata.curves.push(curve.toJSON());\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tCurve.prototype.fromJSON.call(this, json);\n\t\t\tthis.autoClose = json.autoClose;\n\t\t\tthis.curves = [];\n\n\t\t\tfor (var i = 0, l = json.curves.length; i < l; i++) {\n\t\t\t\tvar curve = json.curves[i];\n\t\t\t\tthis.curves.push(new Curves[curve.type]().fromJSON(curve));\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction Path(points) {\n\t\tCurvePath.call(this);\n\t\tthis.type = 'Path';\n\t\tthis.currentPoint = new Vector2();\n\n\t\tif (points) {\n\t\t\tthis.setFromPoints(points);\n\t\t}\n\t}\n\n\tPath.prototype = Object.assign(Object.create(CurvePath.prototype), {\n\t\tconstructor: Path,\n\t\tsetFromPoints: function setFromPoints(points) {\n\t\t\tthis.moveTo(points[0].x, points[0].y);\n\n\t\t\tfor (var i = 1, l = points.length; i < l; i++) {\n\t\t\t\tthis.lineTo(points[i].x, points[i].y);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\tmoveTo: function moveTo(x, y) {\n\t\t\tthis.currentPoint.set(x, y); // TODO consider referencing vectors instead of copying?\n\n\t\t\treturn this;\n\t\t},\n\t\tlineTo: function lineTo(x, y) {\n\t\t\tvar curve = new LineCurve(this.currentPoint.clone(), new Vector2(x, y));\n\t\t\tthis.curves.push(curve);\n\t\t\tthis.currentPoint.set(x, y);\n\t\t\treturn this;\n\t\t},\n\t\tquadraticCurveTo: function quadraticCurveTo(aCPx, aCPy, aX, aY) {\n\t\t\tvar curve = new QuadraticBezierCurve(this.currentPoint.clone(), new Vector2(aCPx, aCPy), new Vector2(aX, aY));\n\t\t\tthis.curves.push(curve);\n\t\t\tthis.currentPoint.set(aX, aY);\n\t\t\treturn this;\n\t\t},\n\t\tbezierCurveTo: function bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {\n\t\t\tvar curve = new CubicBezierCurve(this.currentPoint.clone(), new Vector2(aCP1x, aCP1y), new Vector2(aCP2x, aCP2y), new Vector2(aX, aY));\n\t\t\tthis.curves.push(curve);\n\t\t\tthis.currentPoint.set(aX, aY);\n\t\t\treturn this;\n\t\t},\n\t\tsplineThru: function splineThru(pts\n\t\t/*Array of Vector*/\n\t\t) {\n\t\t\tvar npts = [this.currentPoint.clone()].concat(pts);\n\t\t\tvar curve = new SplineCurve(npts);\n\t\t\tthis.curves.push(curve);\n\t\t\tthis.currentPoint.copy(pts[pts.length - 1]);\n\t\t\treturn this;\n\t\t},\n\t\tarc: function arc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n\t\t\tvar x0 = this.currentPoint.x;\n\t\t\tvar y0 = this.currentPoint.y;\n\t\t\tthis.absarc(aX + x0, aY + y0, aRadius, aStartAngle, aEndAngle, aClockwise);\n\t\t\treturn this;\n\t\t},\n\t\tabsarc: function absarc(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {\n\t\t\tthis.absellipse(aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);\n\t\t\treturn this;\n\t\t},\n\t\tellipse: function ellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n\t\t\tvar x0 = this.currentPoint.x;\n\t\t\tvar y0 = this.currentPoint.y;\n\t\t\tthis.absellipse(aX + x0, aY + y0, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation);\n\t\t\treturn this;\n\t\t},\n\t\tabsellipse: function absellipse(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {\n\t\t\tvar curve = new EllipseCurve(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation);\n\n\t\t\tif (this.curves.length > 0) {\n\t\t\t\t// if a previous curve is present, attempt to join\n\t\t\t\tvar firstPoint = curve.getPoint(0);\n\n\t\t\t\tif (!firstPoint.equals(this.currentPoint)) {\n\t\t\t\t\tthis.lineTo(firstPoint.x, firstPoint.y);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.curves.push(curve);\n\t\t\tvar lastPoint = curve.getPoint(1);\n\t\t\tthis.currentPoint.copy(lastPoint);\n\t\t\treturn this;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tCurvePath.prototype.copy.call(this, source);\n\t\t\tthis.currentPoint.copy(source.currentPoint);\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = CurvePath.prototype.toJSON.call(this);\n\t\t\tdata.currentPoint = this.currentPoint.toArray();\n\t\t\treturn data;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tCurvePath.prototype.fromJSON.call(this, json);\n\t\t\tthis.currentPoint.fromArray(json.currentPoint);\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction Shape(points) {\n\t\tPath.call(this, points);\n\t\tthis.uuid = MathUtils.generateUUID();\n\t\tthis.type = 'Shape';\n\t\tthis.holes = [];\n\t}\n\n\tShape.prototype = Object.assign(Object.create(Path.prototype), {\n\t\tconstructor: Shape,\n\t\tgetPointsHoles: function getPointsHoles(divisions) {\n\t\t\tvar holesPts = [];\n\n\t\t\tfor (var i = 0, l = this.holes.length; i < l; i++) {\n\t\t\t\tholesPts[i] = this.holes[i].getPoints(divisions);\n\t\t\t}\n\n\t\t\treturn holesPts;\n\t\t},\n\t\t// get points of shape and holes (keypoints based on segments parameter)\n\t\textractPoints: function extractPoints(divisions) {\n\t\t\treturn {\n\t\t\t\tshape: this.getPoints(divisions),\n\t\t\t\tholes: this.getPointsHoles(divisions)\n\t\t\t};\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tPath.prototype.copy.call(this, source);\n\t\t\tthis.holes = [];\n\n\t\t\tfor (var i = 0, l = source.holes.length; i < l; i++) {\n\t\t\t\tvar hole = source.holes[i];\n\t\t\t\tthis.holes.push(hole.clone());\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = Path.prototype.toJSON.call(this);\n\t\t\tdata.uuid = this.uuid;\n\t\t\tdata.holes = [];\n\n\t\t\tfor (var i = 0, l = this.holes.length; i < l; i++) {\n\t\t\t\tvar hole = this.holes[i];\n\t\t\t\tdata.holes.push(hole.toJSON());\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tPath.prototype.fromJSON.call(this, json);\n\t\t\tthis.uuid = json.uuid;\n\t\t\tthis.holes = [];\n\n\t\t\tfor (var i = 0, l = json.holes.length; i < l; i++) {\n\t\t\t\tvar hole = json.holes[i];\n\t\t\t\tthis.holes.push(new Path().fromJSON(hole));\n\t\t\t}\n\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction Light(color, intensity) {\n\t\tif (intensity === void 0) {\n\t\t\tintensity = 1;\n\t\t}\n\n\t\tObject3D.call(this);\n\t\tthis.type = 'Light';\n\t\tthis.color = new Color(color);\n\t\tthis.intensity = intensity;\n\t}\n\n\tLight.prototype = Object.assign(Object.create(Object3D.prototype), {\n\t\tconstructor: Light,\n\t\tisLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tObject3D.prototype.copy.call(this, source);\n\t\t\tthis.color.copy(source.color);\n\t\t\tthis.intensity = source.intensity;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Object3D.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.color = this.color.getHex();\n\t\t\tdata.object.intensity = this.intensity;\n\t\t\tif (this.groundColor !== undefined) data.object.groundColor = this.groundColor.getHex();\n\t\t\tif (this.distance !== undefined) data.object.distance = this.distance;\n\t\t\tif (this.angle !== undefined) data.object.angle = this.angle;\n\t\t\tif (this.decay !== undefined) data.object.decay = this.decay;\n\t\t\tif (this.penumbra !== undefined) data.object.penumbra = this.penumbra;\n\t\t\tif (this.shadow !== undefined) data.object.shadow = this.shadow.toJSON();\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction HemisphereLight(skyColor, groundColor, intensity) {\n\t\tLight.call(this, skyColor, intensity);\n\t\tthis.type = 'HemisphereLight';\n\t\tthis.position.copy(Object3D.DefaultUp);\n\t\tthis.updateMatrix();\n\t\tthis.groundColor = new Color(groundColor);\n\t}\n\n\tHemisphereLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: HemisphereLight,\n\t\tisHemisphereLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.groundColor.copy(source.groundColor);\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction LightShadow(camera) {\n\t\tthis.camera = camera;\n\t\tthis.bias = 0;\n\t\tthis.normalBias = 0;\n\t\tthis.radius = 1;\n\t\tthis.mapSize = new Vector2(512, 512);\n\t\tthis.map = null;\n\t\tthis.mapPass = null;\n\t\tthis.matrix = new Matrix4();\n\t\tthis.autoUpdate = true;\n\t\tthis.needsUpdate = false;\n\t\tthis._frustum = new Frustum();\n\t\tthis._frameExtents = new Vector2(1, 1);\n\t\tthis._viewportCount = 1;\n\t\tthis._viewports = [new Vector4(0, 0, 1, 1)];\n\t}\n\n\tObject.assign(LightShadow.prototype, {\n\t\t_projScreenMatrix: new Matrix4(),\n\t\t_lightPositionWorld: new Vector3(),\n\t\t_lookTarget: new Vector3(),\n\t\tgetViewportCount: function getViewportCount() {\n\t\t\treturn this._viewportCount;\n\t\t},\n\t\tgetFrustum: function getFrustum() {\n\t\t\treturn this._frustum;\n\t\t},\n\t\tupdateMatrices: function updateMatrices(light) {\n\t\t\tvar shadowCamera = this.camera,\n\t\t\t\t\tshadowMatrix = this.matrix,\n\t\t\t\t\tprojScreenMatrix = this._projScreenMatrix,\n\t\t\t\t\tlookTarget = this._lookTarget,\n\t\t\t\t\tlightPositionWorld = this._lightPositionWorld;\n\t\t\tlightPositionWorld.setFromMatrixPosition(light.matrixWorld);\n\t\t\tshadowCamera.position.copy(lightPositionWorld);\n\t\t\tlookTarget.setFromMatrixPosition(light.target.matrixWorld);\n\t\t\tshadowCamera.lookAt(lookTarget);\n\t\t\tshadowCamera.updateMatrixWorld();\n\t\t\tprojScreenMatrix.multiplyMatrices(shadowCamera.projectionMatrix, shadowCamera.matrixWorldInverse);\n\n\t\t\tthis._frustum.setFromProjectionMatrix(projScreenMatrix);\n\n\t\t\tshadowMatrix.set(0.5, 0.0, 0.0, 0.5, 0.0, 0.5, 0.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 1.0);\n\t\t\tshadowMatrix.multiply(shadowCamera.projectionMatrix);\n\t\t\tshadowMatrix.multiply(shadowCamera.matrixWorldInverse);\n\t\t},\n\t\tgetViewport: function getViewport(viewportIndex) {\n\t\t\treturn this._viewports[viewportIndex];\n\t\t},\n\t\tgetFrameExtents: function getFrameExtents() {\n\t\t\treturn this._frameExtents;\n\t\t},\n\t\tcopy: function copy(source) {\n\t\t\tthis.camera = source.camera.clone();\n\t\t\tthis.bias = source.bias;\n\t\t\tthis.radius = source.radius;\n\t\t\tthis.mapSize.copy(source.mapSize);\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar object = {};\n\t\t\tif (this.bias !== 0) object.bias = this.bias;\n\t\t\tif (this.normalBias !== 0) object.normalBias = this.normalBias;\n\t\t\tif (this.radius !== 1) object.radius = this.radius;\n\t\t\tif (this.mapSize.x !== 512 || this.mapSize.y !== 512) object.mapSize = this.mapSize.toArray();\n\t\t\tobject.camera = this.camera.toJSON(false).object;\n\t\t\tdelete object.camera.matrix;\n\t\t\treturn object;\n\t\t}\n\t});\n\n\tfunction SpotLightShadow() {\n\t\tLightShadow.call(this, new PerspectiveCamera(50, 1, 0.5, 500));\n\t\tthis.focus = 1;\n\t}\n\n\tSpotLightShadow.prototype = Object.assign(Object.create(LightShadow.prototype), {\n\t\tconstructor: SpotLightShadow,\n\t\tisSpotLightShadow: true,\n\t\tupdateMatrices: function updateMatrices(light) {\n\t\t\tvar camera = this.camera;\n\t\t\tvar fov = MathUtils.RAD2DEG * 2 * light.angle * this.focus;\n\t\t\tvar aspect = this.mapSize.width / this.mapSize.height;\n\t\t\tvar far = light.distance || camera.far;\n\n\t\t\tif (fov !== camera.fov || aspect !== camera.aspect || far !== camera.far) {\n\t\t\t\tcamera.fov = fov;\n\t\t\t\tcamera.aspect = aspect;\n\t\t\t\tcamera.far = far;\n\t\t\t\tcamera.updateProjectionMatrix();\n\t\t\t}\n\n\t\t\tLightShadow.prototype.updateMatrices.call(this, light);\n\t\t}\n\t});\n\n\tfunction SpotLight(color, intensity, distance, angle, penumbra, decay) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'SpotLight';\n\t\tthis.position.copy(Object3D.DefaultUp);\n\t\tthis.updateMatrix();\n\t\tthis.target = new Object3D();\n\t\tObject.defineProperty(this, 'power', {\n\t\t\tget: function get() {\n\t\t\t\t// intensity = power per solid angle.\n\t\t\t\t// ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\t\t\treturn this.intensity * Math.PI;\n\t\t\t},\n\t\t\tset: function set(power) {\n\t\t\t\t// intensity = power per solid angle.\n\t\t\t\t// ref: equation (17) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\t\t\tthis.intensity = power / Math.PI;\n\t\t\t}\n\t\t});\n\t\tthis.distance = distance !== undefined ? distance : 0;\n\t\tthis.angle = angle !== undefined ? angle : Math.PI / 3;\n\t\tthis.penumbra = penumbra !== undefined ? penumbra : 0;\n\t\tthis.decay = decay !== undefined ? decay : 1; // for physically correct lights, should be 2.\n\n\t\tthis.shadow = new SpotLightShadow();\n\t}\n\n\tSpotLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: SpotLight,\n\t\tisSpotLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.distance = source.distance;\n\t\t\tthis.angle = source.angle;\n\t\t\tthis.penumbra = source.penumbra;\n\t\t\tthis.decay = source.decay;\n\t\t\tthis.target = source.target.clone();\n\t\t\tthis.shadow = source.shadow.clone();\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction PointLightShadow() {\n\t\tLightShadow.call(this, new PerspectiveCamera(90, 1, 0.5, 500));\n\t\tthis._frameExtents = new Vector2(4, 2);\n\t\tthis._viewportCount = 6;\n\t\tthis._viewports = [// These viewports map a cube-map onto a 2D texture with the\n\t\t// following orientation:\n\t\t//\n\t\t//\txzXZ\n\t\t//\t y Y\n\t\t//\n\t\t// X - Positive x direction\n\t\t// x - Negative x direction\n\t\t// Y - Positive y direction\n\t\t// y - Negative y direction\n\t\t// Z - Positive z direction\n\t\t// z - Negative z direction\n\t\t// positive X\n\t\tnew Vector4(2, 1, 1, 1), // negative X\n\t\tnew Vector4(0, 1, 1, 1), // positive Z\n\t\tnew Vector4(3, 1, 1, 1), // negative Z\n\t\tnew Vector4(1, 1, 1, 1), // positive Y\n\t\tnew Vector4(3, 0, 1, 1), // negative Y\n\t\tnew Vector4(1, 0, 1, 1)];\n\t\tthis._cubeDirections = [new Vector3(1, 0, 0), new Vector3(-1, 0, 0), new Vector3(0, 0, 1), new Vector3(0, 0, -1), new Vector3(0, 1, 0), new Vector3(0, -1, 0)];\n\t\tthis._cubeUps = [new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 1, 0), new Vector3(0, 0, 1), new Vector3(0, 0, -1)];\n\t}\n\n\tPointLightShadow.prototype = Object.assign(Object.create(LightShadow.prototype), {\n\t\tconstructor: PointLightShadow,\n\t\tisPointLightShadow: true,\n\t\tupdateMatrices: function updateMatrices(light, viewportIndex) {\n\t\t\tif (viewportIndex === void 0) {\n\t\t\t\tviewportIndex = 0;\n\t\t\t}\n\n\t\t\tvar camera = this.camera,\n\t\t\t\t\tshadowMatrix = this.matrix,\n\t\t\t\t\tlightPositionWorld = this._lightPositionWorld,\n\t\t\t\t\tlookTarget = this._lookTarget,\n\t\t\t\t\tprojScreenMatrix = this._projScreenMatrix;\n\t\t\tlightPositionWorld.setFromMatrixPosition(light.matrixWorld);\n\t\t\tcamera.position.copy(lightPositionWorld);\n\t\t\tlookTarget.copy(camera.position);\n\t\t\tlookTarget.add(this._cubeDirections[viewportIndex]);\n\t\t\tcamera.up.copy(this._cubeUps[viewportIndex]);\n\t\t\tcamera.lookAt(lookTarget);\n\t\t\tcamera.updateMatrixWorld();\n\t\t\tshadowMatrix.makeTranslation(-lightPositionWorld.x, -lightPositionWorld.y, -lightPositionWorld.z);\n\t\t\tprojScreenMatrix.multiplyMatrices(camera.projectionMatrix, camera.matrixWorldInverse);\n\n\t\t\tthis._frustum.setFromProjectionMatrix(projScreenMatrix);\n\t\t}\n\t});\n\n\tfunction PointLight(color, intensity, distance, decay) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'PointLight';\n\t\tObject.defineProperty(this, 'power', {\n\t\t\tget: function get() {\n\t\t\t\t// intensity = power per solid angle.\n\t\t\t\t// ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\t\t\treturn this.intensity * 4 * Math.PI;\n\t\t\t},\n\t\t\tset: function set(power) {\n\t\t\t\t// intensity = power per solid angle.\n\t\t\t\t// ref: equation (15) from https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\t\t\t\tthis.intensity = power / (4 * Math.PI);\n\t\t\t}\n\t\t});\n\t\tthis.distance = distance !== undefined ? distance : 0;\n\t\tthis.decay = decay !== undefined ? decay : 1; // for physically correct lights, should be 2.\n\n\t\tthis.shadow = new PointLightShadow();\n\t}\n\n\tPointLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: PointLight,\n\t\tisPointLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.distance = source.distance;\n\t\t\tthis.decay = source.decay;\n\t\t\tthis.shadow = source.shadow.clone();\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction OrthographicCamera(left, right, top, bottom, near, far) {\n\t\tif (left === void 0) {\n\t\t\tleft = -1;\n\t\t}\n\n\t\tif (right === void 0) {\n\t\t\tright = 1;\n\t\t}\n\n\t\tif (top === void 0) {\n\t\t\ttop = 1;\n\t\t}\n\n\t\tif (bottom === void 0) {\n\t\t\tbottom = -1;\n\t\t}\n\n\t\tif (near === void 0) {\n\t\t\tnear = 0.1;\n\t\t}\n\n\t\tif (far === void 0) {\n\t\t\tfar = 2000;\n\t\t}\n\n\t\tCamera.call(this);\n\t\tthis.type = 'OrthographicCamera';\n\t\tthis.zoom = 1;\n\t\tthis.view = null;\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.top = top;\n\t\tthis.bottom = bottom;\n\t\tthis.near = near;\n\t\tthis.far = far;\n\t\tthis.updateProjectionMatrix();\n\t}\n\n\tOrthographicCamera.prototype = Object.assign(Object.create(Camera.prototype), {\n\t\tconstructor: OrthographicCamera,\n\t\tisOrthographicCamera: true,\n\t\tcopy: function copy(source, recursive) {\n\t\t\tCamera.prototype.copy.call(this, source, recursive);\n\t\t\tthis.left = source.left;\n\t\t\tthis.right = source.right;\n\t\t\tthis.top = source.top;\n\t\t\tthis.bottom = source.bottom;\n\t\t\tthis.near = source.near;\n\t\t\tthis.far = source.far;\n\t\t\tthis.zoom = source.zoom;\n\t\t\tthis.view = source.view === null ? null : Object.assign({}, source.view);\n\t\t\treturn this;\n\t\t},\n\t\tsetViewOffset: function setViewOffset(fullWidth, fullHeight, x, y, width, height) {\n\t\t\tif (this.view === null) {\n\t\t\t\tthis.view = {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tfullWidth: 1,\n\t\t\t\t\tfullHeight: 1,\n\t\t\t\t\toffsetX: 0,\n\t\t\t\t\toffsetY: 0,\n\t\t\t\t\twidth: 1,\n\t\t\t\t\theight: 1\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tthis.view.enabled = true;\n\t\t\tthis.view.fullWidth = fullWidth;\n\t\t\tthis.view.fullHeight = fullHeight;\n\t\t\tthis.view.offsetX = x;\n\t\t\tthis.view.offsetY = y;\n\t\t\tthis.view.width = width;\n\t\t\tthis.view.height = height;\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\t\tclearViewOffset: function clearViewOffset() {\n\t\t\tif (this.view !== null) {\n\t\t\t\tthis.view.enabled = false;\n\t\t\t}\n\n\t\t\tthis.updateProjectionMatrix();\n\t\t},\n\t\tupdateProjectionMatrix: function updateProjectionMatrix() {\n\t\t\tvar dx = (this.right - this.left) / (2 * this.zoom);\n\t\t\tvar dy = (this.top - this.bottom) / (2 * this.zoom);\n\t\t\tvar cx = (this.right + this.left) / 2;\n\t\t\tvar cy = (this.top + this.bottom) / 2;\n\t\t\tvar left = cx - dx;\n\t\t\tvar right = cx + dx;\n\t\t\tvar top = cy + dy;\n\t\t\tvar bottom = cy - dy;\n\n\t\t\tif (this.view !== null && this.view.enabled) {\n\t\t\t\tvar scaleW = (this.right - this.left) / this.view.fullWidth / this.zoom;\n\t\t\t\tvar scaleH = (this.top - this.bottom) / this.view.fullHeight / this.zoom;\n\t\t\t\tleft += scaleW * this.view.offsetX;\n\t\t\t\tright = left + scaleW * this.view.width;\n\t\t\t\ttop -= scaleH * this.view.offsetY;\n\t\t\t\tbottom = top - scaleH * this.view.height;\n\t\t\t}\n\n\t\t\tthis.projectionMatrix.makeOrthographic(left, right, top, bottom, this.near, this.far);\n\t\t\tthis.projectionMatrixInverse.copy(this.projectionMatrix).invert();\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Object3D.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.zoom = this.zoom;\n\t\t\tdata.object.left = this.left;\n\t\t\tdata.object.right = this.right;\n\t\t\tdata.object.top = this.top;\n\t\t\tdata.object.bottom = this.bottom;\n\t\t\tdata.object.near = this.near;\n\t\t\tdata.object.far = this.far;\n\t\t\tif (this.view !== null) data.object.view = Object.assign({}, this.view);\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction DirectionalLightShadow() {\n\t\tLightShadow.call(this, new OrthographicCamera(-5, 5, 5, -5, 0.5, 500));\n\t}\n\n\tDirectionalLightShadow.prototype = Object.assign(Object.create(LightShadow.prototype), {\n\t\tconstructor: DirectionalLightShadow,\n\t\tisDirectionalLightShadow: true,\n\t\tupdateMatrices: function updateMatrices(light) {\n\t\t\tLightShadow.prototype.updateMatrices.call(this, light);\n\t\t}\n\t});\n\n\tfunction DirectionalLight(color, intensity) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'DirectionalLight';\n\t\tthis.position.copy(Object3D.DefaultUp);\n\t\tthis.updateMatrix();\n\t\tthis.target = new Object3D();\n\t\tthis.shadow = new DirectionalLightShadow();\n\t}\n\n\tDirectionalLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: DirectionalLight,\n\t\tisDirectionalLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.target = source.target.clone();\n\t\t\tthis.shadow = source.shadow.clone();\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction AmbientLight(color, intensity) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'AmbientLight';\n\t}\n\n\tAmbientLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: AmbientLight,\n\t\tisAmbientLight: true\n\t});\n\n\tfunction RectAreaLight(color, intensity, width, height) {\n\t\tLight.call(this, color, intensity);\n\t\tthis.type = 'RectAreaLight';\n\t\tthis.width = width !== undefined ? width : 10;\n\t\tthis.height = height !== undefined ? height : 10;\n\t}\n\n\tRectAreaLight.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: RectAreaLight,\n\t\tisRectAreaLight: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.width = source.width;\n\t\t\tthis.height = source.height;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Light.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.width = this.width;\n\t\t\tdata.object.height = this.height;\n\t\t\treturn data;\n\t\t}\n\t});\n\n\t/**\n\t * Primary reference:\n\t *\t https://graphics.stanford.edu/papers/envmap/envmap.pdf\n\t *\n\t * Secondary reference:\n\t *\t https://www.ppsloan.org/publications/StupidSH36.pdf\n\t */\n\t// 3-band SH defined by 9 coefficients\n\n\tvar SphericalHarmonics3 = /*#__PURE__*/function () {\n\t\tfunction SphericalHarmonics3() {\n\t\t\tObject.defineProperty(this, 'isSphericalHarmonics3', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.coefficients = [];\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients.push(new Vector3());\n\t\t\t}\n\t\t}\n\n\t\tvar _proto = SphericalHarmonics3.prototype;\n\n\t\t_proto.set = function set(coefficients) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].copy(coefficients[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.zero = function zero() {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].set(0, 0, 0);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t} // get the radiance in the direction of the normal\n\t\t// target is a Vector3\n\t\t;\n\n\t\t_proto.getAt = function getAt(normal, target) {\n\t\t\t// normal is assumed to be unit length\n\t\t\tvar x = normal.x,\n\t\t\t\t\ty = normal.y,\n\t\t\t\t\tz = normal.z;\n\t\t\tvar coeff = this.coefficients; // band 0\n\n\t\t\ttarget.copy(coeff[0]).multiplyScalar(0.282095); // band 1\n\n\t\t\ttarget.addScaledVector(coeff[1], 0.488603 * y);\n\t\t\ttarget.addScaledVector(coeff[2], 0.488603 * z);\n\t\t\ttarget.addScaledVector(coeff[3], 0.488603 * x); // band 2\n\n\t\t\ttarget.addScaledVector(coeff[4], 1.092548 * (x * y));\n\t\t\ttarget.addScaledVector(coeff[5], 1.092548 * (y * z));\n\t\t\ttarget.addScaledVector(coeff[6], 0.315392 * (3.0 * z * z - 1.0));\n\t\t\ttarget.addScaledVector(coeff[7], 1.092548 * (x * z));\n\t\t\ttarget.addScaledVector(coeff[8], 0.546274 * (x * x - y * y));\n\t\t\treturn target;\n\t\t} // get the irradiance (radiance convolved with cosine lobe) in the direction of the normal\n\t\t// target is a Vector3\n\t\t// https://graphics.stanford.edu/papers/envmap/envmap.pdf\n\t\t;\n\n\t\t_proto.getIrradianceAt = function getIrradianceAt(normal, target) {\n\t\t\t// normal is assumed to be unit length\n\t\t\tvar x = normal.x,\n\t\t\t\t\ty = normal.y,\n\t\t\t\t\tz = normal.z;\n\t\t\tvar coeff = this.coefficients; // band 0\n\n\t\t\ttarget.copy(coeff[0]).multiplyScalar(0.886227); // π * 0.282095\n\t\t\t// band 1\n\n\t\t\ttarget.addScaledVector(coeff[1], 2.0 * 0.511664 * y); // ( 2 * π / 3 ) * 0.488603\n\n\t\t\ttarget.addScaledVector(coeff[2], 2.0 * 0.511664 * z);\n\t\t\ttarget.addScaledVector(coeff[3], 2.0 * 0.511664 * x); // band 2\n\n\t\t\ttarget.addScaledVector(coeff[4], 2.0 * 0.429043 * x * y); // ( π / 4 ) * 1.092548\n\n\t\t\ttarget.addScaledVector(coeff[5], 2.0 * 0.429043 * y * z);\n\t\t\ttarget.addScaledVector(coeff[6], 0.743125 * z * z - 0.247708); // ( π / 4 ) * 0.315392 * 3\n\n\t\t\ttarget.addScaledVector(coeff[7], 2.0 * 0.429043 * x * z);\n\t\t\ttarget.addScaledVector(coeff[8], 0.429043 * (x * x - y * y)); // ( π / 4 ) * 0.546274\n\n\t\t\treturn target;\n\t\t};\n\n\t\t_proto.add = function add(sh) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].add(sh.coefficients[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.addScaledSH = function addScaledSH(sh, s) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].addScaledVector(sh.coefficients[i], s);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.scale = function scale(s) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].multiplyScalar(s);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.lerp = function lerp(sh, alpha) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tthis.coefficients[i].lerp(sh.coefficients[i], alpha);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(sh) {\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tif (!this.coefficients[i].equals(sh.coefficients[i])) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t};\n\n\t\t_proto.copy = function copy(sh) {\n\t\t\treturn this.set(sh.coefficients);\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.fromArray = function fromArray(array, offset) {\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tvar coefficients = this.coefficients;\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tcoefficients[i].fromArray(array, offset + i * 3);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.toArray = function toArray(array, offset) {\n\t\t\tif (array === void 0) {\n\t\t\t\tarray = [];\n\t\t\t}\n\n\t\t\tif (offset === void 0) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\tvar coefficients = this.coefficients;\n\n\t\t\tfor (var i = 0; i < 9; i++) {\n\t\t\t\tcoefficients[i].toArray(array, offset + i * 3);\n\t\t\t}\n\n\t\t\treturn array;\n\t\t} // evaluate the basis functions\n\t\t// shBasis is an Array[ 9 ]\n\t\t;\n\n\t\tSphericalHarmonics3.getBasisAt = function getBasisAt(normal, shBasis) {\n\t\t\t// normal is assumed to be unit length\n\t\t\tvar x = normal.x,\n\t\t\t\t\ty = normal.y,\n\t\t\t\t\tz = normal.z; // band 0\n\n\t\t\tshBasis[0] = 0.282095; // band 1\n\n\t\t\tshBasis[1] = 0.488603 * y;\n\t\t\tshBasis[2] = 0.488603 * z;\n\t\t\tshBasis[3] = 0.488603 * x; // band 2\n\n\t\t\tshBasis[4] = 1.092548 * x * y;\n\t\t\tshBasis[5] = 1.092548 * y * z;\n\t\t\tshBasis[6] = 0.315392 * (3 * z * z - 1);\n\t\t\tshBasis[7] = 1.092548 * x * z;\n\t\t\tshBasis[8] = 0.546274 * (x * x - y * y);\n\t\t};\n\n\t\treturn SphericalHarmonics3;\n\t}();\n\n\tfunction LightProbe(sh, intensity) {\n\t\tLight.call(this, undefined, intensity);\n\t\tthis.type = 'LightProbe';\n\t\tthis.sh = sh !== undefined ? sh : new SphericalHarmonics3();\n\t}\n\n\tLightProbe.prototype = Object.assign(Object.create(Light.prototype), {\n\t\tconstructor: LightProbe,\n\t\tisLightProbe: true,\n\t\tcopy: function copy(source) {\n\t\t\tLight.prototype.copy.call(this, source);\n\t\t\tthis.sh.copy(source.sh);\n\t\t\treturn this;\n\t\t},\n\t\tfromJSON: function fromJSON(json) {\n\t\t\tthis.intensity = json.intensity; // TODO: Move this bit to Light.fromJSON();\n\n\t\t\tthis.sh.fromArray(json.sh);\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = Light.prototype.toJSON.call(this, meta);\n\t\t\tdata.object.sh = this.sh.toArray();\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction MaterialLoader(manager) {\n\t\tLoader.call(this, manager);\n\t\tthis.textures = {};\n\t}\n\n\tMaterialLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: MaterialLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(scope.manager);\n\t\t\tloader.setPath(scope.path);\n\t\t\tloader.setRequestHeader(scope.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\ttry {\n\t\t\t\t\tonLoad(scope.parse(JSON.parse(text)));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (onError) {\n\t\t\t\t\t\tonError(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t},\n\t\tparse: function parse(json) {\n\t\t\tvar textures = this.textures;\n\n\t\t\tfunction getTexture(name) {\n\t\t\t\tif (textures[name] === undefined) {\n\t\t\t\t\tconsole.warn('THREE.MaterialLoader: Undefined texture', name);\n\t\t\t\t}\n\n\t\t\t\treturn textures[name];\n\t\t\t}\n\n\t\t\tvar material = new Materials[json.type]();\n\t\t\tif (json.uuid !== undefined) material.uuid = json.uuid;\n\t\t\tif (json.name !== undefined) material.name = json.name;\n\t\t\tif (json.color !== undefined && material.color !== undefined) material.color.setHex(json.color);\n\t\t\tif (json.roughness !== undefined) material.roughness = json.roughness;\n\t\t\tif (json.metalness !== undefined) material.metalness = json.metalness;\n\t\t\tif (json.sheen !== undefined) material.sheen = new Color().setHex(json.sheen);\n\t\t\tif (json.emissive !== undefined && material.emissive !== undefined) material.emissive.setHex(json.emissive);\n\t\t\tif (json.specular !== undefined && material.specular !== undefined) material.specular.setHex(json.specular);\n\t\t\tif (json.shininess !== undefined) material.shininess = json.shininess;\n\t\t\tif (json.clearcoat !== undefined) material.clearcoat = json.clearcoat;\n\t\t\tif (json.clearcoatRoughness !== undefined) material.clearcoatRoughness = json.clearcoatRoughness;\n\t\t\tif (json.fog !== undefined) material.fog = json.fog;\n\t\t\tif (json.flatShading !== undefined) material.flatShading = json.flatShading;\n\t\t\tif (json.blending !== undefined) material.blending = json.blending;\n\t\t\tif (json.combine !== undefined) material.combine = json.combine;\n\t\t\tif (json.side !== undefined) material.side = json.side;\n\t\t\tif (json.opacity !== undefined) material.opacity = json.opacity;\n\t\t\tif (json.transparent !== undefined) material.transparent = json.transparent;\n\t\t\tif (json.alphaTest !== undefined) material.alphaTest = json.alphaTest;\n\t\t\tif (json.depthTest !== undefined) material.depthTest = json.depthTest;\n\t\t\tif (json.depthWrite !== undefined) material.depthWrite = json.depthWrite;\n\t\t\tif (json.colorWrite !== undefined) material.colorWrite = json.colorWrite;\n\t\t\tif (json.stencilWrite !== undefined) material.stencilWrite = json.stencilWrite;\n\t\t\tif (json.stencilWriteMask !== undefined) material.stencilWriteMask = json.stencilWriteMask;\n\t\t\tif (json.stencilFunc !== undefined) material.stencilFunc = json.stencilFunc;\n\t\t\tif (json.stencilRef !== undefined) material.stencilRef = json.stencilRef;\n\t\t\tif (json.stencilFuncMask !== undefined) material.stencilFuncMask = json.stencilFuncMask;\n\t\t\tif (json.stencilFail !== undefined) material.stencilFail = json.stencilFail;\n\t\t\tif (json.stencilZFail !== undefined) material.stencilZFail = json.stencilZFail;\n\t\t\tif (json.stencilZPass !== undefined) material.stencilZPass = json.stencilZPass;\n\t\t\tif (json.wireframe !== undefined) material.wireframe = json.wireframe;\n\t\t\tif (json.wireframeLinewidth !== undefined) material.wireframeLinewidth = json.wireframeLinewidth;\n\t\t\tif (json.wireframeLinecap !== undefined) material.wireframeLinecap = json.wireframeLinecap;\n\t\t\tif (json.wireframeLinejoin !== undefined) material.wireframeLinejoin = json.wireframeLinejoin;\n\t\t\tif (json.rotation !== undefined) material.rotation = json.rotation;\n\t\t\tif (json.linewidth !== 1) material.linewidth = json.linewidth;\n\t\t\tif (json.dashSize !== undefined) material.dashSize = json.dashSize;\n\t\t\tif (json.gapSize !== undefined) material.gapSize = json.gapSize;\n\t\t\tif (json.scale !== undefined) material.scale = json.scale;\n\t\t\tif (json.polygonOffset !== undefined) material.polygonOffset = json.polygonOffset;\n\t\t\tif (json.polygonOffsetFactor !== undefined) material.polygonOffsetFactor = json.polygonOffsetFactor;\n\t\t\tif (json.polygonOffsetUnits !== undefined) material.polygonOffsetUnits = json.polygonOffsetUnits;\n\t\t\tif (json.skinning !== undefined) material.skinning = json.skinning;\n\t\t\tif (json.morphTargets !== undefined) material.morphTargets = json.morphTargets;\n\t\t\tif (json.morphNormals !== undefined) material.morphNormals = json.morphNormals;\n\t\t\tif (json.dithering !== undefined) material.dithering = json.dithering;\n\t\t\tif (json.vertexTangents !== undefined) material.vertexTangents = json.vertexTangents;\n\t\t\tif (json.visible !== undefined) material.visible = json.visible;\n\t\t\tif (json.toneMapped !== undefined) material.toneMapped = json.toneMapped;\n\t\t\tif (json.userData !== undefined) material.userData = json.userData;\n\n\t\t\tif (json.vertexColors !== undefined) {\n\t\t\t\tif (typeof json.vertexColors === 'number') {\n\t\t\t\t\tmaterial.vertexColors = json.vertexColors > 0 ? true : false;\n\t\t\t\t} else {\n\t\t\t\t\tmaterial.vertexColors = json.vertexColors;\n\t\t\t\t}\n\t\t\t} // Shader Material\n\n\n\t\t\tif (json.uniforms !== undefined) {\n\t\t\t\tfor (var name in json.uniforms) {\n\t\t\t\t\tvar uniform = json.uniforms[name];\n\t\t\t\t\tmaterial.uniforms[name] = {};\n\n\t\t\t\t\tswitch (uniform.type) {\n\t\t\t\t\t\tcase 't':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = getTexture(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Color().setHex(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'v2':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Vector2().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'v3':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Vector3().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'v4':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Vector4().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'm3':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Matrix3().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'm4':\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = new Matrix4().fromArray(uniform.value);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tmaterial.uniforms[name].value = uniform.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (json.defines !== undefined) material.defines = json.defines;\n\t\t\tif (json.vertexShader !== undefined) material.vertexShader = json.vertexShader;\n\t\t\tif (json.fragmentShader !== undefined) material.fragmentShader = json.fragmentShader;\n\n\t\t\tif (json.extensions !== undefined) {\n\t\t\t\tfor (var key in json.extensions) {\n\t\t\t\t\tmaterial.extensions[key] = json.extensions[key];\n\t\t\t\t}\n\t\t\t} // Deprecated\n\n\n\t\t\tif (json.shading !== undefined) material.flatShading = json.shading === 1; // THREE.FlatShading\n\t\t\t// for PointsMaterial\n\n\t\t\tif (json.size !== undefined) material.size = json.size;\n\t\t\tif (json.sizeAttenuation !== undefined) material.sizeAttenuation = json.sizeAttenuation; // maps\n\n\t\t\tif (json.map !== undefined) material.map = getTexture(json.map);\n\t\t\tif (json.matcap !== undefined) material.matcap = getTexture(json.matcap);\n\t\t\tif (json.alphaMap !== undefined) material.alphaMap = getTexture(json.alphaMap);\n\t\t\tif (json.bumpMap !== undefined) material.bumpMap = getTexture(json.bumpMap);\n\t\t\tif (json.bumpScale !== undefined) material.bumpScale = json.bumpScale;\n\t\t\tif (json.normalMap !== undefined) material.normalMap = getTexture(json.normalMap);\n\t\t\tif (json.normalMapType !== undefined) material.normalMapType = json.normalMapType;\n\n\t\t\tif (json.normalScale !== undefined) {\n\t\t\t\tvar normalScale = json.normalScale;\n\n\t\t\t\tif (Array.isArray(normalScale) === false) {\n\t\t\t\t\t// Blender exporter used to export a scalar. See #7459\n\t\t\t\t\tnormalScale = [normalScale, normalScale];\n\t\t\t\t}\n\n\t\t\t\tmaterial.normalScale = new Vector2().fromArray(normalScale);\n\t\t\t}\n\n\t\t\tif (json.displacementMap !== undefined) material.displacementMap = getTexture(json.displacementMap);\n\t\t\tif (json.displacementScale !== undefined) material.displacementScale = json.displacementScale;\n\t\t\tif (json.displacementBias !== undefined) material.displacementBias = json.displacementBias;\n\t\t\tif (json.roughnessMap !== undefined) material.roughnessMap = getTexture(json.roughnessMap);\n\t\t\tif (json.metalnessMap !== undefined) material.metalnessMap = getTexture(json.metalnessMap);\n\t\t\tif (json.emissiveMap !== undefined) material.emissiveMap = getTexture(json.emissiveMap);\n\t\t\tif (json.emissiveIntensity !== undefined) material.emissiveIntensity = json.emissiveIntensity;\n\t\t\tif (json.specularMap !== undefined) material.specularMap = getTexture(json.specularMap);\n\t\t\tif (json.envMap !== undefined) material.envMap = getTexture(json.envMap);\n\t\t\tif (json.envMapIntensity !== undefined) material.envMapIntensity = json.envMapIntensity;\n\t\t\tif (json.reflectivity !== undefined) material.reflectivity = json.reflectivity;\n\t\t\tif (json.refractionRatio !== undefined) material.refractionRatio = json.refractionRatio;\n\t\t\tif (json.lightMap !== undefined) material.lightMap = getTexture(json.lightMap);\n\t\t\tif (json.lightMapIntensity !== undefined) material.lightMapIntensity = json.lightMapIntensity;\n\t\t\tif (json.aoMap !== undefined) material.aoMap = getTexture(json.aoMap);\n\t\t\tif (json.aoMapIntensity !== undefined) material.aoMapIntensity = json.aoMapIntensity;\n\t\t\tif (json.gradientMap !== undefined) material.gradientMap = getTexture(json.gradientMap);\n\t\t\tif (json.clearcoatMap !== undefined) material.clearcoatMap = getTexture(json.clearcoatMap);\n\t\t\tif (json.clearcoatRoughnessMap !== undefined) material.clearcoatRoughnessMap = getTexture(json.clearcoatRoughnessMap);\n\t\t\tif (json.clearcoatNormalMap !== undefined) material.clearcoatNormalMap = getTexture(json.clearcoatNormalMap);\n\t\t\tif (json.clearcoatNormalScale !== undefined) material.clearcoatNormalScale = new Vector2().fromArray(json.clearcoatNormalScale);\n\t\t\tif (json.transmission !== undefined) material.transmission = json.transmission;\n\t\t\tif (json.transmissionMap !== undefined) material.transmissionMap = getTexture(json.transmissionMap);\n\t\t\treturn material;\n\t\t},\n\t\tsetTextures: function setTextures(value) {\n\t\t\tthis.textures = value;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tvar LoaderUtils = {\n\t\tdecodeText: function decodeText(array) {\n\t\t\tif (typeof TextDecoder !== 'undefined') {\n\t\t\t\treturn new TextDecoder().decode(array);\n\t\t\t} // Avoid the String.fromCharCode.apply(null, array) shortcut, which\n\t\t\t// throws a \"maximum call stack size exceeded\" error for large arrays.\n\n\n\t\t\tvar s = '';\n\n\t\t\tfor (var i = 0, il = array.length; i < il; i++) {\n\t\t\t\t// Implicitly assumes little-endian.\n\t\t\t\ts += String.fromCharCode(array[i]);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// merges multi-byte utf-8 characters.\n\t\t\t\treturn decodeURIComponent(escape(s));\n\t\t\t} catch (e) {\n\t\t\t\t// see #16358\n\t\t\t\treturn s;\n\t\t\t}\n\t\t},\n\t\textractUrlBase: function extractUrlBase(url) {\n\t\t\tvar index = url.lastIndexOf('/');\n\t\t\tif (index === -1) return './';\n\t\t\treturn url.substr(0, index + 1);\n\t\t}\n\t};\n\n\tfunction InstancedBufferGeometry() {\n\t\tBufferGeometry.call(this);\n\t\tthis.type = 'InstancedBufferGeometry';\n\t\tthis.instanceCount = Infinity;\n\t}\n\n\tInstancedBufferGeometry.prototype = Object.assign(Object.create(BufferGeometry.prototype), {\n\t\tconstructor: InstancedBufferGeometry,\n\t\tisInstancedBufferGeometry: true,\n\t\tcopy: function copy(source) {\n\t\t\tBufferGeometry.prototype.copy.call(this, source);\n\t\t\tthis.instanceCount = source.instanceCount;\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = BufferGeometry.prototype.toJSON.call(this);\n\t\t\tdata.instanceCount = this.instanceCount;\n\t\t\tdata.isInstancedBufferGeometry = true;\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction InstancedBufferAttribute(array, itemSize, normalized, meshPerAttribute) {\n\t\tif (typeof normalized === 'number') {\n\t\t\tmeshPerAttribute = normalized;\n\t\t\tnormalized = false;\n\t\t\tconsole.error('THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.');\n\t\t}\n\n\t\tBufferAttribute.call(this, array, itemSize, normalized);\n\t\tthis.meshPerAttribute = meshPerAttribute || 1;\n\t}\n\n\tInstancedBufferAttribute.prototype = Object.assign(Object.create(BufferAttribute.prototype), {\n\t\tconstructor: InstancedBufferAttribute,\n\t\tisInstancedBufferAttribute: true,\n\t\tcopy: function copy(source) {\n\t\t\tBufferAttribute.prototype.copy.call(this, source);\n\t\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON() {\n\t\t\tvar data = BufferAttribute.prototype.toJSON.call(this);\n\t\t\tdata.meshPerAttribute = this.meshPerAttribute;\n\t\t\tdata.isInstancedBufferAttribute = true;\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction BufferGeometryLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tBufferGeometryLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: BufferGeometryLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(scope.manager);\n\t\t\tloader.setPath(scope.path);\n\t\t\tloader.setRequestHeader(scope.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\ttry {\n\t\t\t\t\tonLoad(scope.parse(JSON.parse(text)));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (onError) {\n\t\t\t\t\t\tonError(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t},\n\t\tparse: function parse(json) {\n\t\t\tvar interleavedBufferMap = {};\n\t\t\tvar arrayBufferMap = {};\n\n\t\t\tfunction getInterleavedBuffer(json, uuid) {\n\t\t\t\tif (interleavedBufferMap[uuid] !== undefined) return interleavedBufferMap[uuid];\n\t\t\t\tvar interleavedBuffers = json.interleavedBuffers;\n\t\t\t\tvar interleavedBuffer = interleavedBuffers[uuid];\n\t\t\t\tvar buffer = getArrayBuffer(json, interleavedBuffer.buffer);\n\t\t\t\tvar array = getTypedArray(interleavedBuffer.type, buffer);\n\t\t\t\tvar ib = new InterleavedBuffer(array, interleavedBuffer.stride);\n\t\t\t\tib.uuid = interleavedBuffer.uuid;\n\t\t\t\tinterleavedBufferMap[uuid] = ib;\n\t\t\t\treturn ib;\n\t\t\t}\n\n\t\t\tfunction getArrayBuffer(json, uuid) {\n\t\t\t\tif (arrayBufferMap[uuid] !== undefined) return arrayBufferMap[uuid];\n\t\t\t\tvar arrayBuffers = json.arrayBuffers;\n\t\t\t\tvar arrayBuffer = arrayBuffers[uuid];\n\t\t\t\tvar ab = new Uint32Array(arrayBuffer).buffer;\n\t\t\t\tarrayBufferMap[uuid] = ab;\n\t\t\t\treturn ab;\n\t\t\t}\n\n\t\t\tvar geometry = json.isInstancedBufferGeometry ? new InstancedBufferGeometry() : new BufferGeometry();\n\t\t\tvar index = json.data.index;\n\n\t\t\tif (index !== undefined) {\n\t\t\t\tvar typedArray = getTypedArray(index.type, index.array);\n\t\t\t\tgeometry.setIndex(new BufferAttribute(typedArray, 1));\n\t\t\t}\n\n\t\t\tvar attributes = json.data.attributes;\n\n\t\t\tfor (var key in attributes) {\n\t\t\t\tvar attribute = attributes[key];\n\t\t\t\tvar bufferAttribute = void 0;\n\n\t\t\t\tif (attribute.isInterleavedBufferAttribute) {\n\t\t\t\t\tvar interleavedBuffer = getInterleavedBuffer(json.data, attribute.data);\n\t\t\t\t\tbufferAttribute = new InterleavedBufferAttribute(interleavedBuffer, attribute.itemSize, attribute.offset, attribute.normalized);\n\t\t\t\t} else {\n\t\t\t\t\tvar _typedArray = getTypedArray(attribute.type, attribute.array);\n\n\t\t\t\t\tvar bufferAttributeConstr = attribute.isInstancedBufferAttribute ? InstancedBufferAttribute : BufferAttribute;\n\t\t\t\t\tbufferAttribute = new bufferAttributeConstr(_typedArray, attribute.itemSize, attribute.normalized);\n\t\t\t\t}\n\n\t\t\t\tif (attribute.name !== undefined) bufferAttribute.name = attribute.name;\n\t\t\t\tgeometry.setAttribute(key, bufferAttribute);\n\t\t\t}\n\n\t\t\tvar morphAttributes = json.data.morphAttributes;\n\n\t\t\tif (morphAttributes) {\n\t\t\t\tfor (var _key in morphAttributes) {\n\t\t\t\t\tvar attributeArray = morphAttributes[_key];\n\t\t\t\t\tvar array = [];\n\n\t\t\t\t\tfor (var i = 0, il = attributeArray.length; i < il; i++) {\n\t\t\t\t\t\tvar _attribute = attributeArray[i];\n\n\t\t\t\t\t\tvar _bufferAttribute = void 0;\n\n\t\t\t\t\t\tif (_attribute.isInterleavedBufferAttribute) {\n\t\t\t\t\t\t\tvar _interleavedBuffer = getInterleavedBuffer(json.data, _attribute.data);\n\n\t\t\t\t\t\t\t_bufferAttribute = new InterleavedBufferAttribute(_interleavedBuffer, _attribute.itemSize, _attribute.offset, _attribute.normalized);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar _typedArray2 = getTypedArray(_attribute.type, _attribute.array);\n\n\t\t\t\t\t\t\t_bufferAttribute = new BufferAttribute(_typedArray2, _attribute.itemSize, _attribute.normalized);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (_attribute.name !== undefined) _bufferAttribute.name = _attribute.name;\n\t\t\t\t\t\tarray.push(_bufferAttribute);\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.morphAttributes[_key] = array;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar morphTargetsRelative = json.data.morphTargetsRelative;\n\n\t\t\tif (morphTargetsRelative) {\n\t\t\t\tgeometry.morphTargetsRelative = true;\n\t\t\t}\n\n\t\t\tvar groups = json.data.groups || json.data.drawcalls || json.data.offsets;\n\n\t\t\tif (groups !== undefined) {\n\t\t\t\tfor (var _i = 0, n = groups.length; _i !== n; ++_i) {\n\t\t\t\t\tvar group = groups[_i];\n\t\t\t\t\tgeometry.addGroup(group.start, group.count, group.materialIndex);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar boundingSphere = json.data.boundingSphere;\n\n\t\t\tif (boundingSphere !== undefined) {\n\t\t\t\tvar center = new Vector3();\n\n\t\t\t\tif (boundingSphere.center !== undefined) {\n\t\t\t\t\tcenter.fromArray(boundingSphere.center);\n\t\t\t\t}\n\n\t\t\t\tgeometry.boundingSphere = new Sphere(center, boundingSphere.radius);\n\t\t\t}\n\n\t\t\tif (json.name) geometry.name = json.name;\n\t\t\tif (json.userData) geometry.userData = json.userData;\n\t\t\treturn geometry;\n\t\t}\n\t});\n\n\tvar ObjectLoader = /*#__PURE__*/function (_Loader) {\n\t\t_inheritsLoose(ObjectLoader, _Loader);\n\n\t\tfunction ObjectLoader(manager) {\n\t\t\treturn _Loader.call(this, manager) || this;\n\t\t}\n\n\t\tvar _proto = ObjectLoader.prototype;\n\n\t\t_proto.load = function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar path = this.path === '' ? LoaderUtils.extractUrlBase(url) : this.path;\n\t\t\tthis.resourcePath = this.resourcePath || path;\n\t\t\tvar loader = new FileLoader(this.manager);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.setRequestHeader(this.requestHeader);\n\t\t\tloader.setWithCredentials(this.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\tvar json = null;\n\n\t\t\t\ttry {\n\t\t\t\t\tjson = JSON.parse(text);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (onError !== undefined) onError(error);\n\t\t\t\t\tconsole.error('THREE:ObjectLoader: Can\\'t parse ' + url + '.', error.message);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar metadata = json.metadata;\n\n\t\t\t\tif (metadata === undefined || metadata.type === undefined || metadata.type.toLowerCase() === 'geometry') {\n\t\t\t\t\tconsole.error('THREE.ObjectLoader: Can\\'t load ' + url);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tscope.parse(json, onLoad);\n\t\t\t}, onProgress, onError);\n\t\t};\n\n\t\t_proto.parse = function parse(json, onLoad) {\n\t\t\tvar animations = this.parseAnimations(json.animations);\n\t\t\tvar shapes = this.parseShapes(json.shapes);\n\t\t\tvar geometries = this.parseGeometries(json.geometries, shapes);\n\t\t\tvar images = this.parseImages(json.images, function () {\n\t\t\t\tif (onLoad !== undefined) onLoad(object);\n\t\t\t});\n\t\t\tvar textures = this.parseTextures(json.textures, images);\n\t\t\tvar materials = this.parseMaterials(json.materials, textures);\n\t\t\tvar object = this.parseObject(json.object, geometries, materials, animations);\n\t\t\tvar skeletons = this.parseSkeletons(json.skeletons, object);\n\t\t\tthis.bindSkeletons(object, skeletons); //\n\n\t\t\tif (onLoad !== undefined) {\n\t\t\t\tvar hasImages = false;\n\n\t\t\t\tfor (var uuid in images) {\n\t\t\t\t\tif (images[uuid] instanceof HTMLImageElement) {\n\t\t\t\t\t\thasImages = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (hasImages === false) onLoad(object);\n\t\t\t}\n\n\t\t\treturn object;\n\t\t};\n\n\t\t_proto.parseShapes = function parseShapes(json) {\n\t\t\tvar shapes = {};\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar shape = new Shape().fromJSON(json[i]);\n\t\t\t\t\tshapes[shape.uuid] = shape;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn shapes;\n\t\t};\n\n\t\t_proto.parseSkeletons = function parseSkeletons(json, object) {\n\t\t\tvar skeletons = {};\n\t\t\tvar bones = {}; // generate bone lookup table\n\n\t\t\tobject.traverse(function (child) {\n\t\t\t\tif (child.isBone) bones[child.uuid] = child;\n\t\t\t}); // create skeletons\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar skeleton = new Skeleton().fromJSON(json[i], bones);\n\t\t\t\t\tskeletons[skeleton.uuid] = skeleton;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn skeletons;\n\t\t};\n\n\t\t_proto.parseGeometries = function parseGeometries(json, shapes) {\n\t\t\tvar geometries = {};\n\t\t\tvar geometryShapes;\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tvar bufferGeometryLoader = new BufferGeometryLoader();\n\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar geometry = void 0;\n\t\t\t\t\tvar data = json[i];\n\n\t\t\t\t\tswitch (data.type) {\n\t\t\t\t\t\tcase 'PlaneGeometry':\n\t\t\t\t\t\tcase 'PlaneBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.width, data.height, data.widthSegments, data.heightSegments);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'BoxGeometry':\n\t\t\t\t\t\tcase 'BoxBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'CircleGeometry':\n\t\t\t\t\t\tcase 'CircleBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.segments, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'CylinderGeometry':\n\t\t\t\t\t\tcase 'CylinderBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'ConeGeometry':\n\t\t\t\t\t\tcase 'ConeBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'SphereGeometry':\n\t\t\t\t\t\tcase 'SphereBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'DodecahedronGeometry':\n\t\t\t\t\t\tcase 'DodecahedronBufferGeometry':\n\t\t\t\t\t\tcase 'IcosahedronGeometry':\n\t\t\t\t\t\tcase 'IcosahedronBufferGeometry':\n\t\t\t\t\t\tcase 'OctahedronGeometry':\n\t\t\t\t\t\tcase 'OctahedronBufferGeometry':\n\t\t\t\t\t\tcase 'TetrahedronGeometry':\n\t\t\t\t\t\tcase 'TetrahedronBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.detail);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'RingGeometry':\n\t\t\t\t\t\tcase 'RingBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'TorusGeometry':\n\t\t\t\t\t\tcase 'TorusBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'TorusKnotGeometry':\n\t\t\t\t\t\tcase 'TorusKnotBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'TubeGeometry':\n\t\t\t\t\t\tcase 'TubeBufferGeometry':\n\t\t\t\t\t\t\t// This only works for built-in curves (e.g. CatmullRomCurve3).\n\t\t\t\t\t\t\t// User defined curves or instances of CurvePath will not be deserialized.\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](new Curves[data.path.type]().fromJSON(data.path), data.tubularSegments, data.radius, data.radialSegments, data.closed);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'LatheGeometry':\n\t\t\t\t\t\tcase 'LatheBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.points, data.segments, data.phiStart, data.phiLength);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'PolyhedronGeometry':\n\t\t\t\t\t\tcase 'PolyhedronBufferGeometry':\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](data.vertices, data.indices, data.radius, data.details);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'ShapeGeometry':\n\t\t\t\t\t\tcase 'ShapeBufferGeometry':\n\t\t\t\t\t\t\tgeometryShapes = [];\n\n\t\t\t\t\t\t\tfor (var j = 0, jl = data.shapes.length; j < jl; j++) {\n\t\t\t\t\t\t\t\tvar shape = shapes[data.shapes[j]];\n\t\t\t\t\t\t\t\tgeometryShapes.push(shape);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](geometryShapes, data.curveSegments);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'ExtrudeGeometry':\n\t\t\t\t\t\tcase 'ExtrudeBufferGeometry':\n\t\t\t\t\t\t\tgeometryShapes = [];\n\n\t\t\t\t\t\t\tfor (var _j = 0, _jl = data.shapes.length; _j < _jl; _j++) {\n\t\t\t\t\t\t\t\tvar _shape = shapes[data.shapes[_j]];\n\t\t\t\t\t\t\t\tgeometryShapes.push(_shape);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar extrudePath = data.options.extrudePath;\n\n\t\t\t\t\t\t\tif (extrudePath !== undefined) {\n\t\t\t\t\t\t\t\tdata.options.extrudePath = new Curves[extrudePath.type]().fromJSON(extrudePath);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgeometry = new Geometries[data.type](geometryShapes, data.options);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'BufferGeometry':\n\t\t\t\t\t\tcase 'InstancedBufferGeometry':\n\t\t\t\t\t\t\tgeometry = bufferGeometryLoader.parse(data);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'Geometry':\n\t\t\t\t\t\t\tif ('THREE' in window && 'LegacyJSONLoader' in THREE) {\n\t\t\t\t\t\t\t\tvar geometryLoader = new THREE.LegacyJSONLoader();\n\t\t\t\t\t\t\t\tgeometry = geometryLoader.parse(data, this.resourcePath).geometry;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconsole.error('THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type \"Geometry\".');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Unsupported geometry type \"' + data.type + '\"');\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.uuid = data.uuid;\n\t\t\t\t\tif (data.name !== undefined) geometry.name = data.name;\n\t\t\t\t\tif (geometry.isBufferGeometry === true && data.userData !== undefined) geometry.userData = data.userData;\n\t\t\t\t\tgeometries[data.uuid] = geometry;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn geometries;\n\t\t};\n\n\t\t_proto.parseMaterials = function parseMaterials(json, textures) {\n\t\t\tvar cache = {}; // MultiMaterial\n\n\t\t\tvar materials = {};\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tvar loader = new MaterialLoader();\n\t\t\t\tloader.setTextures(textures);\n\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar data = json[i];\n\n\t\t\t\t\tif (data.type === 'MultiMaterial') {\n\t\t\t\t\t\t// Deprecated\n\t\t\t\t\t\tvar array = [];\n\n\t\t\t\t\t\tfor (var j = 0; j < data.materials.length; j++) {\n\t\t\t\t\t\t\tvar material = data.materials[j];\n\n\t\t\t\t\t\t\tif (cache[material.uuid] === undefined) {\n\t\t\t\t\t\t\t\tcache[material.uuid] = loader.parse(material);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tarray.push(cache[material.uuid]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaterials[data.uuid] = array;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (cache[data.uuid] === undefined) {\n\t\t\t\t\t\t\tcache[data.uuid] = loader.parse(data);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmaterials[data.uuid] = cache[data.uuid];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn materials;\n\t\t};\n\n\t\t_proto.parseAnimations = function parseAnimations(json) {\n\t\t\tvar animations = {};\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tfor (var i = 0; i < json.length; i++) {\n\t\t\t\t\tvar data = json[i];\n\t\t\t\t\tvar clip = AnimationClip.parse(data);\n\t\t\t\t\tanimations[clip.uuid] = clip;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn animations;\n\t\t};\n\n\t\t_proto.parseImages = function parseImages(json, onLoad) {\n\t\t\tvar scope = this;\n\t\t\tvar images = {};\n\t\t\tvar loader;\n\n\t\t\tfunction loadImage(url) {\n\t\t\t\tscope.manager.itemStart(url);\n\t\t\t\treturn loader.load(url, function () {\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, undefined, function () {\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tfunction deserializeImage(image) {\n\t\t\t\tif (typeof image === 'string') {\n\t\t\t\t\tvar url = image;\n\t\t\t\t\tvar path = /^(\\/\\/)|([a-z]+:(\\/\\/)?)/i.test(url) ? url : scope.resourcePath + url;\n\t\t\t\t\treturn loadImage(path);\n\t\t\t\t} else {\n\t\t\t\t\tif (image.data) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tdata: getTypedArray(image.type, image.data),\n\t\t\t\t\t\t\twidth: image.width,\n\t\t\t\t\t\t\theight: image.height\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (json !== undefined && json.length > 0) {\n\t\t\t\tvar manager = new LoadingManager(onLoad);\n\t\t\t\tloader = new ImageLoader(manager);\n\t\t\t\tloader.setCrossOrigin(this.crossOrigin);\n\n\t\t\t\tfor (var i = 0, il = json.length; i < il; i++) {\n\t\t\t\t\tvar image = json[i];\n\t\t\t\t\tvar url = image.url;\n\n\t\t\t\t\tif (Array.isArray(url)) {\n\t\t\t\t\t\t// load array of images e.g CubeTexture\n\t\t\t\t\t\timages[image.uuid] = [];\n\n\t\t\t\t\t\tfor (var j = 0, jl = url.length; j < jl; j++) {\n\t\t\t\t\t\t\tvar currentUrl = url[j];\n\t\t\t\t\t\t\tvar deserializedImage = deserializeImage(currentUrl);\n\n\t\t\t\t\t\t\tif (deserializedImage !== null) {\n\t\t\t\t\t\t\t\tif (deserializedImage instanceof HTMLImageElement) {\n\t\t\t\t\t\t\t\t\timages[image.uuid].push(deserializedImage);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// special case: handle array of data textures for cube textures\n\t\t\t\t\t\t\t\t\timages[image.uuid].push(new DataTexture(deserializedImage.data, deserializedImage.width, deserializedImage.height));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// load single image\n\t\t\t\t\t\tvar _deserializedImage = deserializeImage(image.url);\n\n\t\t\t\t\t\tif (_deserializedImage !== null) {\n\t\t\t\t\t\t\timages[image.uuid] = _deserializedImage;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn images;\n\t\t};\n\n\t\t_proto.parseTextures = function parseTextures(json, images) {\n\t\t\tfunction parseConstant(value, type) {\n\t\t\t\tif (typeof value === 'number') return value;\n\t\t\t\tconsole.warn('THREE.ObjectLoader.parseTexture: Constant should be in numeric form.', value);\n\t\t\t\treturn type[value];\n\t\t\t}\n\n\t\t\tvar textures = {};\n\n\t\t\tif (json !== undefined) {\n\t\t\t\tfor (var i = 0, l = json.length; i < l; i++) {\n\t\t\t\t\tvar data = json[i];\n\n\t\t\t\t\tif (data.image === undefined) {\n\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: No \"image\" specified for', data.uuid);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (images[data.image] === undefined) {\n\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Undefined image', data.image);\n\t\t\t\t\t}\n\n\t\t\t\t\tvar texture = void 0;\n\t\t\t\t\tvar image = images[data.image];\n\n\t\t\t\t\tif (Array.isArray(image)) {\n\t\t\t\t\t\ttexture = new CubeTexture(image);\n\t\t\t\t\t\tif (image.length === 6) texture.needsUpdate = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (image && image.data) {\n\t\t\t\t\t\t\ttexture = new DataTexture(image.data, image.width, image.height);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttexture = new Texture(image);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (image) texture.needsUpdate = true; // textures can have undefined image data\n\t\t\t\t\t}\n\n\t\t\t\t\ttexture.uuid = data.uuid;\n\t\t\t\t\tif (data.name !== undefined) texture.name = data.name;\n\t\t\t\t\tif (data.mapping !== undefined) texture.mapping = parseConstant(data.mapping, TEXTURE_MAPPING);\n\t\t\t\t\tif (data.offset !== undefined) texture.offset.fromArray(data.offset);\n\t\t\t\t\tif (data.repeat !== undefined) texture.repeat.fromArray(data.repeat);\n\t\t\t\t\tif (data.center !== undefined) texture.center.fromArray(data.center);\n\t\t\t\t\tif (data.rotation !== undefined) texture.rotation = data.rotation;\n\n\t\t\t\t\tif (data.wrap !== undefined) {\n\t\t\t\t\t\ttexture.wrapS = parseConstant(data.wrap[0], TEXTURE_WRAPPING);\n\t\t\t\t\t\ttexture.wrapT = parseConstant(data.wrap[1], TEXTURE_WRAPPING);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (data.format !== undefined) texture.format = data.format;\n\t\t\t\t\tif (data.type !== undefined) texture.type = data.type;\n\t\t\t\t\tif (data.encoding !== undefined) texture.encoding = data.encoding;\n\t\t\t\t\tif (data.minFilter !== undefined) texture.minFilter = parseConstant(data.minFilter, TEXTURE_FILTER);\n\t\t\t\t\tif (data.magFilter !== undefined) texture.magFilter = parseConstant(data.magFilter, TEXTURE_FILTER);\n\t\t\t\t\tif (data.anisotropy !== undefined) texture.anisotropy = data.anisotropy;\n\t\t\t\t\tif (data.flipY !== undefined) texture.flipY = data.flipY;\n\t\t\t\t\tif (data.premultiplyAlpha !== undefined) texture.premultiplyAlpha = data.premultiplyAlpha;\n\t\t\t\t\tif (data.unpackAlignment !== undefined) texture.unpackAlignment = data.unpackAlignment;\n\t\t\t\t\ttextures[data.uuid] = texture;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn textures;\n\t\t};\n\n\t\t_proto.parseObject = function parseObject(data, geometries, materials, animations) {\n\t\t\tvar object;\n\n\t\t\tfunction getGeometry(name) {\n\t\t\t\tif (geometries[name] === undefined) {\n\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Undefined geometry', name);\n\t\t\t\t}\n\n\t\t\t\treturn geometries[name];\n\t\t\t}\n\n\t\t\tfunction getMaterial(name) {\n\t\t\t\tif (name === undefined) return undefined;\n\n\t\t\t\tif (Array.isArray(name)) {\n\t\t\t\t\tvar array = [];\n\n\t\t\t\t\tfor (var i = 0, l = name.length; i < l; i++) {\n\t\t\t\t\t\tvar uuid = name[i];\n\n\t\t\t\t\t\tif (materials[uuid] === undefined) {\n\t\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Undefined material', uuid);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tarray.push(materials[uuid]);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn array;\n\t\t\t\t}\n\n\t\t\t\tif (materials[name] === undefined) {\n\t\t\t\t\tconsole.warn('THREE.ObjectLoader: Undefined material', name);\n\t\t\t\t}\n\n\t\t\t\treturn materials[name];\n\t\t\t}\n\n\t\t\tvar geometry, material;\n\n\t\t\tswitch (data.type) {\n\t\t\t\tcase 'Scene':\n\t\t\t\t\tobject = new Scene();\n\n\t\t\t\t\tif (data.background !== undefined) {\n\t\t\t\t\t\tif (Number.isInteger(data.background)) {\n\t\t\t\t\t\t\tobject.background = new Color(data.background);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (data.fog !== undefined) {\n\t\t\t\t\t\tif (data.fog.type === 'Fog') {\n\t\t\t\t\t\t\tobject.fog = new Fog(data.fog.color, data.fog.near, data.fog.far);\n\t\t\t\t\t\t} else if (data.fog.type === 'FogExp2') {\n\t\t\t\t\t\t\tobject.fog = new FogExp2(data.fog.color, data.fog.density);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PerspectiveCamera':\n\t\t\t\t\tobject = new PerspectiveCamera(data.fov, data.aspect, data.near, data.far);\n\t\t\t\t\tif (data.focus !== undefined) object.focus = data.focus;\n\t\t\t\t\tif (data.zoom !== undefined) object.zoom = data.zoom;\n\t\t\t\t\tif (data.filmGauge !== undefined) object.filmGauge = data.filmGauge;\n\t\t\t\t\tif (data.filmOffset !== undefined) object.filmOffset = data.filmOffset;\n\t\t\t\t\tif (data.view !== undefined) object.view = Object.assign({}, data.view);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'OrthographicCamera':\n\t\t\t\t\tobject = new OrthographicCamera(data.left, data.right, data.top, data.bottom, data.near, data.far);\n\t\t\t\t\tif (data.zoom !== undefined) object.zoom = data.zoom;\n\t\t\t\t\tif (data.view !== undefined) object.view = Object.assign({}, data.view);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'AmbientLight':\n\t\t\t\t\tobject = new AmbientLight(data.color, data.intensity);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'DirectionalLight':\n\t\t\t\t\tobject = new DirectionalLight(data.color, data.intensity);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointLight':\n\t\t\t\t\tobject = new PointLight(data.color, data.intensity, data.distance, data.decay);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'RectAreaLight':\n\t\t\t\t\tobject = new RectAreaLight(data.color, data.intensity, data.width, data.height);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SpotLight':\n\t\t\t\t\tobject = new SpotLight(data.color, data.intensity, data.distance, data.angle, data.penumbra, data.decay);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'HemisphereLight':\n\t\t\t\t\tobject = new HemisphereLight(data.color, data.groundColor, data.intensity);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'LightProbe':\n\t\t\t\t\tobject = new LightProbe().fromJSON(data);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SkinnedMesh':\n\t\t\t\t\tgeometry = getGeometry(data.geometry);\n\t\t\t\t\tmaterial = getMaterial(data.material);\n\t\t\t\t\tobject = new SkinnedMesh(geometry, material);\n\t\t\t\t\tif (data.bindMode !== undefined) object.bindMode = data.bindMode;\n\t\t\t\t\tif (data.bindMatrix !== undefined) object.bindMatrix.fromArray(data.bindMatrix);\n\t\t\t\t\tif (data.skeleton !== undefined) object.skeleton = data.skeleton;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Mesh':\n\t\t\t\t\tgeometry = getGeometry(data.geometry);\n\t\t\t\t\tmaterial = getMaterial(data.material);\n\t\t\t\t\tobject = new Mesh(geometry, material);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'InstancedMesh':\n\t\t\t\t\tgeometry = getGeometry(data.geometry);\n\t\t\t\t\tmaterial = getMaterial(data.material);\n\t\t\t\t\tvar count = data.count;\n\t\t\t\t\tvar instanceMatrix = data.instanceMatrix;\n\t\t\t\t\tobject = new InstancedMesh(geometry, material, count);\n\t\t\t\t\tobject.instanceMatrix = new BufferAttribute(new Float32Array(instanceMatrix.array), 16);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'LOD':\n\t\t\t\t\tobject = new LOD();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Line':\n\t\t\t\t\tobject = new Line(getGeometry(data.geometry), getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'LineLoop':\n\t\t\t\t\tobject = new LineLoop(getGeometry(data.geometry), getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'LineSegments':\n\t\t\t\t\tobject = new LineSegments(getGeometry(data.geometry), getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'PointCloud':\n\t\t\t\tcase 'Points':\n\t\t\t\t\tobject = new Points(getGeometry(data.geometry), getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Sprite':\n\t\t\t\t\tobject = new Sprite(getMaterial(data.material));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Group':\n\t\t\t\t\tobject = new Group();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Bone':\n\t\t\t\t\tobject = new Bone();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tobject = new Object3D();\n\t\t\t}\n\n\t\t\tobject.uuid = data.uuid;\n\t\t\tif (data.name !== undefined) object.name = data.name;\n\n\t\t\tif (data.matrix !== undefined) {\n\t\t\t\tobject.matrix.fromArray(data.matrix);\n\t\t\t\tif (data.matrixAutoUpdate !== undefined) object.matrixAutoUpdate = data.matrixAutoUpdate;\n\t\t\t\tif (object.matrixAutoUpdate) object.matrix.decompose(object.position, object.quaternion, object.scale);\n\t\t\t} else {\n\t\t\t\tif (data.position !== undefined) object.position.fromArray(data.position);\n\t\t\t\tif (data.rotation !== undefined) object.rotation.fromArray(data.rotation);\n\t\t\t\tif (data.quaternion !== undefined) object.quaternion.fromArray(data.quaternion);\n\t\t\t\tif (data.scale !== undefined) object.scale.fromArray(data.scale);\n\t\t\t}\n\n\t\t\tif (data.castShadow !== undefined) object.castShadow = data.castShadow;\n\t\t\tif (data.receiveShadow !== undefined) object.receiveShadow = data.receiveShadow;\n\n\t\t\tif (data.shadow) {\n\t\t\t\tif (data.shadow.bias !== undefined) object.shadow.bias = data.shadow.bias;\n\t\t\t\tif (data.shadow.normalBias !== undefined) object.shadow.normalBias = data.shadow.normalBias;\n\t\t\t\tif (data.shadow.radius !== undefined) object.shadow.radius = data.shadow.radius;\n\t\t\t\tif (data.shadow.mapSize !== undefined) object.shadow.mapSize.fromArray(data.shadow.mapSize);\n\t\t\t\tif (data.shadow.camera !== undefined) object.shadow.camera = this.parseObject(data.shadow.camera);\n\t\t\t}\n\n\t\t\tif (data.visible !== undefined) object.visible = data.visible;\n\t\t\tif (data.frustumCulled !== undefined) object.frustumCulled = data.frustumCulled;\n\t\t\tif (data.renderOrder !== undefined) object.renderOrder = data.renderOrder;\n\t\t\tif (data.userData !== undefined) object.userData = data.userData;\n\t\t\tif (data.layers !== undefined) object.layers.mask = data.layers;\n\n\t\t\tif (data.children !== undefined) {\n\t\t\t\tvar children = data.children;\n\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tobject.add(this.parseObject(children[i], geometries, materials, animations));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (data.animations !== undefined) {\n\t\t\t\tvar objectAnimations = data.animations;\n\n\t\t\t\tfor (var _i = 0; _i < objectAnimations.length; _i++) {\n\t\t\t\t\tvar uuid = objectAnimations[_i];\n\t\t\t\t\tobject.animations.push(animations[uuid]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (data.type === 'LOD') {\n\t\t\t\tif (data.autoUpdate !== undefined) object.autoUpdate = data.autoUpdate;\n\t\t\t\tvar levels = data.levels;\n\n\t\t\t\tfor (var l = 0; l < levels.length; l++) {\n\t\t\t\t\tvar level = levels[l];\n\t\t\t\t\tvar child = object.getObjectByProperty('uuid', level.object);\n\n\t\t\t\t\tif (child !== undefined) {\n\t\t\t\t\t\tobject.addLevel(child, level.distance);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn object;\n\t\t};\n\n\t\t_proto.bindSkeletons = function bindSkeletons(object, skeletons) {\n\t\t\tif (Object.keys(skeletons).length === 0) return;\n\t\t\tobject.traverse(function (child) {\n\t\t\t\tif (child.isSkinnedMesh === true && child.skeleton !== undefined) {\n\t\t\t\t\tvar skeleton = skeletons[child.skeleton];\n\n\t\t\t\t\tif (skeleton === undefined) {\n\t\t\t\t\t\tconsole.warn('THREE.ObjectLoader: No skeleton found with UUID:', child.skeleton);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.bind(skeleton, child.bindMatrix);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t/* DEPRECATED */\n\t\t;\n\n\t\t_proto.setTexturePath = function setTexturePath(value) {\n\t\t\tconsole.warn('THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath().');\n\t\t\treturn this.setResourcePath(value);\n\t\t};\n\n\t\treturn ObjectLoader;\n\t}(Loader);\n\n\tvar TEXTURE_MAPPING = {\n\t\tUVMapping: UVMapping,\n\t\tCubeReflectionMapping: CubeReflectionMapping,\n\t\tCubeRefractionMapping: CubeRefractionMapping,\n\t\tEquirectangularReflectionMapping: EquirectangularReflectionMapping,\n\t\tEquirectangularRefractionMapping: EquirectangularRefractionMapping,\n\t\tCubeUVReflectionMapping: CubeUVReflectionMapping,\n\t\tCubeUVRefractionMapping: CubeUVRefractionMapping\n\t};\n\tvar TEXTURE_WRAPPING = {\n\t\tRepeatWrapping: RepeatWrapping,\n\t\tClampToEdgeWrapping: ClampToEdgeWrapping,\n\t\tMirroredRepeatWrapping: MirroredRepeatWrapping\n\t};\n\tvar TEXTURE_FILTER = {\n\t\tNearestFilter: NearestFilter,\n\t\tNearestMipmapNearestFilter: NearestMipmapNearestFilter,\n\t\tNearestMipmapLinearFilter: NearestMipmapLinearFilter,\n\t\tLinearFilter: LinearFilter,\n\t\tLinearMipmapNearestFilter: LinearMipmapNearestFilter,\n\t\tLinearMipmapLinearFilter: LinearMipmapLinearFilter\n\t};\n\n\tfunction ImageBitmapLoader(manager) {\n\t\tif (typeof createImageBitmap === 'undefined') {\n\t\t\tconsole.warn('THREE.ImageBitmapLoader: createImageBitmap() not supported.');\n\t\t}\n\n\t\tif (typeof fetch === 'undefined') {\n\t\t\tconsole.warn('THREE.ImageBitmapLoader: fetch() not supported.');\n\t\t}\n\n\t\tLoader.call(this, manager);\n\t\tthis.options = {\n\t\t\tpremultiplyAlpha: 'none'\n\t\t};\n\t}\n\n\tImageBitmapLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: ImageBitmapLoader,\n\t\tisImageBitmapLoader: true,\n\t\tsetOptions: function setOptions(options) {\n\t\t\tthis.options = options;\n\t\t\treturn this;\n\t\t},\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tif (url === undefined) url = '';\n\t\t\tif (this.path !== undefined) url = this.path + url;\n\t\t\turl = this.manager.resolveURL(url);\n\t\t\tvar scope = this;\n\t\t\tvar cached = Cache.get(url);\n\n\t\t\tif (cached !== undefined) {\n\t\t\t\tscope.manager.itemStart(url);\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (onLoad) onLoad(cached);\n\t\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t\t}, 0);\n\t\t\t\treturn cached;\n\t\t\t}\n\n\t\t\tvar fetchOptions = {};\n\t\t\tfetchOptions.credentials = this.crossOrigin === 'anonymous' ? 'same-origin' : 'include';\n\t\t\tfetch(url, fetchOptions).then(function (res) {\n\t\t\t\treturn res.blob();\n\t\t\t}).then(function (blob) {\n\t\t\t\treturn createImageBitmap(blob, scope.options);\n\t\t\t}).then(function (imageBitmap) {\n\t\t\t\tCache.add(url, imageBitmap);\n\t\t\t\tif (onLoad) onLoad(imageBitmap);\n\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t}).catch(function (e) {\n\t\t\t\tif (onError) onError(e);\n\t\t\t\tscope.manager.itemError(url);\n\t\t\t\tscope.manager.itemEnd(url);\n\t\t\t});\n\t\t\tscope.manager.itemStart(url);\n\t\t}\n\t});\n\n\tfunction ShapePath() {\n\t\tthis.type = 'ShapePath';\n\t\tthis.color = new Color();\n\t\tthis.subPaths = [];\n\t\tthis.currentPath = null;\n\t}\n\n\tObject.assign(ShapePath.prototype, {\n\t\tmoveTo: function moveTo(x, y) {\n\t\t\tthis.currentPath = new Path();\n\t\t\tthis.subPaths.push(this.currentPath);\n\t\t\tthis.currentPath.moveTo(x, y);\n\t\t\treturn this;\n\t\t},\n\t\tlineTo: function lineTo(x, y) {\n\t\t\tthis.currentPath.lineTo(x, y);\n\t\t\treturn this;\n\t\t},\n\t\tquadraticCurveTo: function quadraticCurveTo(aCPx, aCPy, aX, aY) {\n\t\t\tthis.currentPath.quadraticCurveTo(aCPx, aCPy, aX, aY);\n\t\t\treturn this;\n\t\t},\n\t\tbezierCurveTo: function bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY) {\n\t\t\tthis.currentPath.bezierCurveTo(aCP1x, aCP1y, aCP2x, aCP2y, aX, aY);\n\t\t\treturn this;\n\t\t},\n\t\tsplineThru: function splineThru(pts) {\n\t\t\tthis.currentPath.splineThru(pts);\n\t\t\treturn this;\n\t\t},\n\t\ttoShapes: function toShapes(isCCW, noHoles) {\n\t\t\tfunction toShapesNoHoles(inSubpaths) {\n\t\t\t\tvar shapes = [];\n\n\t\t\t\tfor (var i = 0, l = inSubpaths.length; i < l; i++) {\n\t\t\t\t\tvar _tmpPath = inSubpaths[i];\n\n\t\t\t\t\tvar _tmpShape = new Shape();\n\n\t\t\t\t\t_tmpShape.curves = _tmpPath.curves;\n\t\t\t\t\tshapes.push(_tmpShape);\n\t\t\t\t}\n\n\t\t\t\treturn shapes;\n\t\t\t}\n\n\t\t\tfunction isPointInsidePolygon(inPt, inPolygon) {\n\t\t\t\tvar polyLen = inPolygon.length; // inPt on polygon contour => immediate success\t\tor\n\t\t\t\t// toggling of inside/outside at every single! intersection point of an edge\n\t\t\t\t//\twith the horizontal line through inPt, left of inPt\n\t\t\t\t//\tnot counting lowerY endpoints of edges and whole edges on that line\n\n\t\t\t\tvar inside = false;\n\n\t\t\t\tfor (var p = polyLen - 1, q = 0; q < polyLen; p = q++) {\n\t\t\t\t\tvar edgeLowPt = inPolygon[p];\n\t\t\t\t\tvar edgeHighPt = inPolygon[q];\n\t\t\t\t\tvar edgeDx = edgeHighPt.x - edgeLowPt.x;\n\t\t\t\t\tvar edgeDy = edgeHighPt.y - edgeLowPt.y;\n\n\t\t\t\t\tif (Math.abs(edgeDy) > Number.EPSILON) {\n\t\t\t\t\t\t// not parallel\n\t\t\t\t\t\tif (edgeDy < 0) {\n\t\t\t\t\t\t\tedgeLowPt = inPolygon[q];\n\t\t\t\t\t\t\tedgeDx = -edgeDx;\n\t\t\t\t\t\t\tedgeHighPt = inPolygon[p];\n\t\t\t\t\t\t\tedgeDy = -edgeDy;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (inPt.y < edgeLowPt.y || inPt.y > edgeHighPt.y) continue;\n\n\t\t\t\t\t\tif (inPt.y === edgeLowPt.y) {\n\t\t\t\t\t\t\tif (inPt.x === edgeLowPt.x) return true; // inPt is on contour ?\n\t\t\t\t\t\t\t// continue;\t\t\t\t// no intersection or edgeLowPt => doesn't count !!!\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar perpEdge = edgeDy * (inPt.x - edgeLowPt.x) - edgeDx * (inPt.y - edgeLowPt.y);\n\t\t\t\t\t\t\tif (perpEdge === 0) return true; // inPt is on contour ?\n\n\t\t\t\t\t\t\tif (perpEdge < 0) continue;\n\t\t\t\t\t\t\tinside = !inside; // true intersection left of inPt\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// parallel or collinear\n\t\t\t\t\t\tif (inPt.y !== edgeLowPt.y) continue; // parallel\n\t\t\t\t\t\t// edge lies on the same horizontal line as inPt\n\n\t\t\t\t\t\tif (edgeHighPt.x <= inPt.x && inPt.x <= edgeLowPt.x || edgeLowPt.x <= inPt.x && inPt.x <= edgeHighPt.x) return true; // inPt: Point on contour !\n\t\t\t\t\t\t// continue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn inside;\n\t\t\t}\n\n\t\t\tvar isClockWise = ShapeUtils.isClockWise;\n\t\t\tvar subPaths = this.subPaths;\n\t\t\tif (subPaths.length === 0) return [];\n\t\t\tif (noHoles === true) return toShapesNoHoles(subPaths);\n\t\t\tvar solid, tmpPath, tmpShape;\n\t\t\tvar shapes = [];\n\n\t\t\tif (subPaths.length === 1) {\n\t\t\t\ttmpPath = subPaths[0];\n\t\t\t\ttmpShape = new Shape();\n\t\t\t\ttmpShape.curves = tmpPath.curves;\n\t\t\t\tshapes.push(tmpShape);\n\t\t\t\treturn shapes;\n\t\t\t}\n\n\t\t\tvar holesFirst = !isClockWise(subPaths[0].getPoints());\n\t\t\tholesFirst = isCCW ? !holesFirst : holesFirst; // console.log(\"Holes first\", holesFirst);\n\n\t\t\tvar betterShapeHoles = [];\n\t\t\tvar newShapes = [];\n\t\t\tvar newShapeHoles = [];\n\t\t\tvar mainIdx = 0;\n\t\t\tvar tmpPoints;\n\t\t\tnewShapes[mainIdx] = undefined;\n\t\t\tnewShapeHoles[mainIdx] = [];\n\n\t\t\tfor (var i = 0, l = subPaths.length; i < l; i++) {\n\t\t\t\ttmpPath = subPaths[i];\n\t\t\t\ttmpPoints = tmpPath.getPoints();\n\t\t\t\tsolid = isClockWise(tmpPoints);\n\t\t\t\tsolid = isCCW ? !solid : solid;\n\n\t\t\t\tif (solid) {\n\t\t\t\t\tif (!holesFirst && newShapes[mainIdx]) mainIdx++;\n\t\t\t\t\tnewShapes[mainIdx] = {\n\t\t\t\t\t\ts: new Shape(),\n\t\t\t\t\t\tp: tmpPoints\n\t\t\t\t\t};\n\t\t\t\t\tnewShapes[mainIdx].s.curves = tmpPath.curves;\n\t\t\t\t\tif (holesFirst) mainIdx++;\n\t\t\t\t\tnewShapeHoles[mainIdx] = []; //console.log('cw', i);\n\t\t\t\t} else {\n\t\t\t\t\tnewShapeHoles[mainIdx].push({\n\t\t\t\t\t\th: tmpPath,\n\t\t\t\t\t\tp: tmpPoints[0]\n\t\t\t\t\t}); //console.log('ccw', i);\n\t\t\t\t}\n\t\t\t} // only Holes? -> probably all Shapes with wrong orientation\n\n\n\t\t\tif (!newShapes[0]) return toShapesNoHoles(subPaths);\n\n\t\t\tif (newShapes.length > 1) {\n\t\t\t\tvar ambiguous = false;\n\t\t\t\tvar toChange = [];\n\n\t\t\t\tfor (var sIdx = 0, sLen = newShapes.length; sIdx < sLen; sIdx++) {\n\t\t\t\t\tbetterShapeHoles[sIdx] = [];\n\t\t\t\t}\n\n\t\t\t\tfor (var _sIdx = 0, _sLen = newShapes.length; _sIdx < _sLen; _sIdx++) {\n\t\t\t\t\tvar sho = newShapeHoles[_sIdx];\n\n\t\t\t\t\tfor (var hIdx = 0; hIdx < sho.length; hIdx++) {\n\t\t\t\t\t\tvar ho = sho[hIdx];\n\t\t\t\t\t\tvar hole_unassigned = true;\n\n\t\t\t\t\t\tfor (var s2Idx = 0; s2Idx < newShapes.length; s2Idx++) {\n\t\t\t\t\t\t\tif (isPointInsidePolygon(ho.p, newShapes[s2Idx].p)) {\n\t\t\t\t\t\t\t\tif (_sIdx !== s2Idx) toChange.push({\n\t\t\t\t\t\t\t\t\tfroms: _sIdx,\n\t\t\t\t\t\t\t\t\ttos: s2Idx,\n\t\t\t\t\t\t\t\t\thole: hIdx\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tif (hole_unassigned) {\n\t\t\t\t\t\t\t\t\thole_unassigned = false;\n\t\t\t\t\t\t\t\t\tbetterShapeHoles[s2Idx].push(ho);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tambiguous = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (hole_unassigned) {\n\t\t\t\t\t\t\tbetterShapeHoles[_sIdx].push(ho);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // console.log(\"ambiguous: \", ambiguous);\n\n\n\t\t\t\tif (toChange.length > 0) {\n\t\t\t\t\t// console.log(\"to change: \", toChange);\n\t\t\t\t\tif (!ambiguous) newShapeHoles = betterShapeHoles;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar tmpHoles;\n\n\t\t\tfor (var _i = 0, il = newShapes.length; _i < il; _i++) {\n\t\t\t\ttmpShape = newShapes[_i].s;\n\t\t\t\tshapes.push(tmpShape);\n\t\t\t\ttmpHoles = newShapeHoles[_i];\n\n\t\t\t\tfor (var j = 0, jl = tmpHoles.length; j < jl; j++) {\n\t\t\t\t\ttmpShape.holes.push(tmpHoles[j].h);\n\t\t\t\t}\n\t\t\t} //console.log(\"shape\", shapes);\n\n\n\t\t\treturn shapes;\n\t\t}\n\t});\n\n\tvar Font = /*#__PURE__*/function () {\n\t\tfunction Font(data) {\n\t\t\tObject.defineProperty(this, 'isFont', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.type = 'Font';\n\t\t\tthis.data = data;\n\t\t}\n\n\t\tvar _proto = Font.prototype;\n\n\t\t_proto.generateShapes = function generateShapes(text, size) {\n\t\t\tif (size === void 0) {\n\t\t\t\tsize = 100;\n\t\t\t}\n\n\t\t\tvar shapes = [];\n\t\t\tvar paths = createPaths(text, size, this.data);\n\n\t\t\tfor (var p = 0, pl = paths.length; p < pl; p++) {\n\t\t\t\tArray.prototype.push.apply(shapes, paths[p].toShapes());\n\t\t\t}\n\n\t\t\treturn shapes;\n\t\t};\n\n\t\treturn Font;\n\t}();\n\n\tfunction createPaths(text, size, data) {\n\t\tvar chars = Array.from ? Array.from(text) : String(text).split(''); // workaround for IE11, see #13988\n\n\t\tvar scale = size / data.resolution;\n\t\tvar line_height = (data.boundingBox.yMax - data.boundingBox.yMin + data.underlineThickness) * scale;\n\t\tvar paths = [];\n\t\tvar offsetX = 0,\n\t\t\t\toffsetY = 0;\n\n\t\tfor (var i = 0; i < chars.length; i++) {\n\t\t\tvar char = chars[i];\n\n\t\t\tif (char === '\\n') {\n\t\t\t\toffsetX = 0;\n\t\t\t\toffsetY -= line_height;\n\t\t\t} else {\n\t\t\t\tvar ret = createPath(char, scale, offsetX, offsetY, data);\n\t\t\t\toffsetX += ret.offsetX;\n\t\t\t\tpaths.push(ret.path);\n\t\t\t}\n\t\t}\n\n\t\treturn paths;\n\t}\n\n\tfunction createPath(char, scale, offsetX, offsetY, data) {\n\t\tvar glyph = data.glyphs[char] || data.glyphs['?'];\n\n\t\tif (!glyph) {\n\t\t\tconsole.error('THREE.Font: character \"' + char + '\" does not exists in font family ' + data.familyName + '.');\n\t\t\treturn;\n\t\t}\n\n\t\tvar path = new ShapePath();\n\t\tvar x, y, cpx, cpy, cpx1, cpy1, cpx2, cpy2;\n\n\t\tif (glyph.o) {\n\t\t\tvar outline = glyph._cachedOutline || (glyph._cachedOutline = glyph.o.split(' '));\n\n\t\t\tfor (var i = 0, l = outline.length; i < l;) {\n\t\t\t\tvar action = outline[i++];\n\n\t\t\t\tswitch (action) {\n\t\t\t\t\tcase 'm':\n\t\t\t\t\t\t// moveTo\n\t\t\t\t\t\tx = outline[i++] * scale + offsetX;\n\t\t\t\t\t\ty = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tpath.moveTo(x, y);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'l':\n\t\t\t\t\t\t// lineTo\n\t\t\t\t\t\tx = outline[i++] * scale + offsetX;\n\t\t\t\t\t\ty = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tpath.lineTo(x, y);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'q':\n\t\t\t\t\t\t// quadraticCurveTo\n\t\t\t\t\t\tcpx = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tcpx1 = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy1 = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tpath.quadraticCurveTo(cpx1, cpy1, cpx, cpy);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t// bezierCurveTo\n\t\t\t\t\t\tcpx = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tcpx1 = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy1 = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tcpx2 = outline[i++] * scale + offsetX;\n\t\t\t\t\t\tcpy2 = outline[i++] * scale + offsetY;\n\t\t\t\t\t\tpath.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, cpx, cpy);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\toffsetX: glyph.ha * scale,\n\t\t\tpath: path\n\t\t};\n\t}\n\n\tfunction FontLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tFontLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: FontLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(this.manager);\n\t\t\tloader.setPath(this.path);\n\t\t\tloader.setRequestHeader(this.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (text) {\n\t\t\t\tvar json;\n\n\t\t\t\ttry {\n\t\t\t\t\tjson = JSON.parse(text);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.warn('THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead.');\n\t\t\t\t\tjson = JSON.parse(text.substring(65, text.length - 2));\n\t\t\t\t}\n\n\t\t\t\tvar font = scope.parse(json);\n\t\t\t\tif (onLoad) onLoad(font);\n\t\t\t}, onProgress, onError);\n\t\t},\n\t\tparse: function parse(json) {\n\t\t\treturn new Font(json);\n\t\t}\n\t});\n\n\tvar _context;\n\n\tvar AudioContext = {\n\t\tgetContext: function getContext() {\n\t\t\tif (_context === undefined) {\n\t\t\t\t_context = new (window.AudioContext || window.webkitAudioContext)();\n\t\t\t}\n\n\t\t\treturn _context;\n\t\t},\n\t\tsetContext: function setContext(value) {\n\t\t\t_context = value;\n\t\t}\n\t};\n\n\tfunction AudioLoader(manager) {\n\t\tLoader.call(this, manager);\n\t}\n\n\tAudioLoader.prototype = Object.assign(Object.create(Loader.prototype), {\n\t\tconstructor: AudioLoader,\n\t\tload: function load(url, onLoad, onProgress, onError) {\n\t\t\tvar scope = this;\n\t\t\tvar loader = new FileLoader(scope.manager);\n\t\t\tloader.setResponseType('arraybuffer');\n\t\t\tloader.setPath(scope.path);\n\t\t\tloader.setRequestHeader(scope.requestHeader);\n\t\t\tloader.setWithCredentials(scope.withCredentials);\n\t\t\tloader.load(url, function (buffer) {\n\t\t\t\ttry {\n\t\t\t\t\t// Create a copy of the buffer. The `decodeAudioData` method\n\t\t\t\t\t// detaches the buffer when complete, preventing reuse.\n\t\t\t\t\tvar bufferCopy = buffer.slice(0);\n\t\t\t\t\tvar context = AudioContext.getContext();\n\t\t\t\t\tcontext.decodeAudioData(bufferCopy, function (audioBuffer) {\n\t\t\t\t\t\tonLoad(audioBuffer);\n\t\t\t\t\t});\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (onError) {\n\t\t\t\t\t\tonError(e);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error(e);\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError(url);\n\t\t\t\t}\n\t\t\t}, onProgress, onError);\n\t\t}\n\t});\n\n\tfunction HemisphereLightProbe(skyColor, groundColor, intensity) {\n\t\tLightProbe.call(this, undefined, intensity);\n\t\tvar color1 = new Color().set(skyColor);\n\t\tvar color2 = new Color().set(groundColor);\n\t\tvar sky = new Vector3(color1.r, color1.g, color1.b);\n\t\tvar ground = new Vector3(color2.r, color2.g, color2.b); // without extra factor of PI in the shader, should = 1 / Math.sqrt( Math.PI );\n\n\t\tvar c0 = Math.sqrt(Math.PI);\n\t\tvar c1 = c0 * Math.sqrt(0.75);\n\t\tthis.sh.coefficients[0].copy(sky).add(ground).multiplyScalar(c0);\n\t\tthis.sh.coefficients[1].copy(sky).sub(ground).multiplyScalar(c1);\n\t}\n\n\tHemisphereLightProbe.prototype = Object.assign(Object.create(LightProbe.prototype), {\n\t\tconstructor: HemisphereLightProbe,\n\t\tisHemisphereLightProbe: true,\n\t\tcopy: function copy(source) {\n\t\t\t// modifying colors not currently supported\n\t\t\tLightProbe.prototype.copy.call(this, source);\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = LightProbe.prototype.toJSON.call(this, meta); // data.sh = this.sh.toArray(); // todo\n\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tfunction AmbientLightProbe(color, intensity) {\n\t\tLightProbe.call(this, undefined, intensity);\n\t\tvar color1 = new Color().set(color); // without extra factor of PI in the shader, would be 2 / Math.sqrt( Math.PI );\n\n\t\tthis.sh.coefficients[0].set(color1.r, color1.g, color1.b).multiplyScalar(2 * Math.sqrt(Math.PI));\n\t}\n\n\tAmbientLightProbe.prototype = Object.assign(Object.create(LightProbe.prototype), {\n\t\tconstructor: AmbientLightProbe,\n\t\tisAmbientLightProbe: true,\n\t\tcopy: function copy(source) {\n\t\t\t// modifying color not currently supported\n\t\t\tLightProbe.prototype.copy.call(this, source);\n\t\t\treturn this;\n\t\t},\n\t\ttoJSON: function toJSON(meta) {\n\t\t\tvar data = LightProbe.prototype.toJSON.call(this, meta); // data.sh = this.sh.toArray(); // todo\n\n\t\t\treturn data;\n\t\t}\n\t});\n\n\tvar _eyeRight = new Matrix4();\n\n\tvar _eyeLeft = new Matrix4();\n\n\tfunction StereoCamera() {\n\t\tthis.type = 'StereoCamera';\n\t\tthis.aspect = 1;\n\t\tthis.eyeSep = 0.064;\n\t\tthis.cameraL = new PerspectiveCamera();\n\t\tthis.cameraL.layers.enable(1);\n\t\tthis.cameraL.matrixAutoUpdate = false;\n\t\tthis.cameraR = new PerspectiveCamera();\n\t\tthis.cameraR.layers.enable(2);\n\t\tthis.cameraR.matrixAutoUpdate = false;\n\t\tthis._cache = {\n\t\t\tfocus: null,\n\t\t\tfov: null,\n\t\t\taspect: null,\n\t\t\tnear: null,\n\t\t\tfar: null,\n\t\t\tzoom: null,\n\t\t\teyeSep: null\n\t\t};\n\t}\n\n\tObject.assign(StereoCamera.prototype, {\n\t\tupdate: function update(camera) {\n\t\t\tvar cache = this._cache;\n\t\t\tvar needsUpdate = cache.focus !== camera.focus || cache.fov !== camera.fov || cache.aspect !== camera.aspect * this.aspect || cache.near !== camera.near || cache.far !== camera.far || cache.zoom !== camera.zoom || cache.eyeSep !== this.eyeSep;\n\n\t\t\tif (needsUpdate) {\n\t\t\t\tcache.focus = camera.focus;\n\t\t\t\tcache.fov = camera.fov;\n\t\t\t\tcache.aspect = camera.aspect * this.aspect;\n\t\t\t\tcache.near = camera.near;\n\t\t\t\tcache.far = camera.far;\n\t\t\t\tcache.zoom = camera.zoom;\n\t\t\t\tcache.eyeSep = this.eyeSep; // Off-axis stereoscopic effect based on\n\t\t\t\t// http://paulbourke.net/stereographics/stereorender/\n\n\t\t\t\tvar projectionMatrix = camera.projectionMatrix.clone();\n\t\t\t\tvar eyeSepHalf = cache.eyeSep / 2;\n\t\t\t\tvar eyeSepOnProjection = eyeSepHalf * cache.near / cache.focus;\n\t\t\t\tvar ymax = cache.near * Math.tan(MathUtils.DEG2RAD * cache.fov * 0.5) / cache.zoom;\n\t\t\t\tvar xmin, xmax; // translate xOffset\n\n\t\t\t\t_eyeLeft.elements[12] = -eyeSepHalf;\n\t\t\t\t_eyeRight.elements[12] = eyeSepHalf; // for left eye\n\n\t\t\t\txmin = -ymax * cache.aspect + eyeSepOnProjection;\n\t\t\t\txmax = ymax * cache.aspect + eyeSepOnProjection;\n\t\t\t\tprojectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin);\n\t\t\t\tprojectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);\n\t\t\t\tthis.cameraL.projectionMatrix.copy(projectionMatrix); // for right eye\n\n\t\t\t\txmin = -ymax * cache.aspect - eyeSepOnProjection;\n\t\t\t\txmax = ymax * cache.aspect - eyeSepOnProjection;\n\t\t\t\tprojectionMatrix.elements[0] = 2 * cache.near / (xmax - xmin);\n\t\t\t\tprojectionMatrix.elements[8] = (xmax + xmin) / (xmax - xmin);\n\t\t\t\tthis.cameraR.projectionMatrix.copy(projectionMatrix);\n\t\t\t}\n\n\t\t\tthis.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(_eyeLeft);\n\t\t\tthis.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(_eyeRight);\n\t\t}\n\t});\n\n\tvar Clock = /*#__PURE__*/function () {\n\t\tfunction Clock(autoStart) {\n\t\t\tthis.autoStart = autoStart !== undefined ? autoStart : true;\n\t\t\tthis.startTime = 0;\n\t\t\tthis.oldTime = 0;\n\t\t\tthis.elapsedTime = 0;\n\t\t\tthis.running = false;\n\t\t}\n\n\t\tvar _proto = Clock.prototype;\n\n\t\t_proto.start = function start() {\n\t\t\tthis.startTime = now();\n\t\t\tthis.oldTime = this.startTime;\n\t\t\tthis.elapsedTime = 0;\n\t\t\tthis.running = true;\n\t\t};\n\n\t\t_proto.stop = function stop() {\n\t\t\tthis.getElapsedTime();\n\t\t\tthis.running = false;\n\t\t\tthis.autoStart = false;\n\t\t};\n\n\t\t_proto.getElapsedTime = function getElapsedTime() {\n\t\t\tthis.getDelta();\n\t\t\treturn this.elapsedTime;\n\t\t};\n\n\t\t_proto.getDelta = function getDelta() {\n\t\t\tvar diff = 0;\n\n\t\t\tif (this.autoStart && !this.running) {\n\t\t\t\tthis.start();\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (this.running) {\n\t\t\t\tvar newTime = now();\n\t\t\t\tdiff = (newTime - this.oldTime) / 1000;\n\t\t\t\tthis.oldTime = newTime;\n\t\t\t\tthis.elapsedTime += diff;\n\t\t\t}\n\n\t\t\treturn diff;\n\t\t};\n\n\t\treturn Clock;\n\t}();\n\n\tfunction now() {\n\t\treturn (typeof performance === 'undefined' ? Date : performance).now(); // see #10732\n\t}\n\n\tvar _position$2 = /*@__PURE__*/new Vector3();\n\n\tvar _quaternion$3 = /*@__PURE__*/new Quaternion();\n\n\tvar _scale$1 = /*@__PURE__*/new Vector3();\n\n\tvar _orientation = /*@__PURE__*/new Vector3();\n\n\tvar AudioListener = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(AudioListener, _Object3D);\n\n\t\tfunction AudioListener() {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.type = 'AudioListener';\n\t\t\t_this.context = AudioContext.getContext();\n\t\t\t_this.gain = _this.context.createGain();\n\n\t\t\t_this.gain.connect(_this.context.destination);\n\n\t\t\t_this.filter = null;\n\t\t\t_this.timeDelta = 0; // private\n\n\t\t\t_this._clock = new Clock();\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = AudioListener.prototype;\n\n\t\t_proto.getInput = function getInput() {\n\t\t\treturn this.gain;\n\t\t};\n\n\t\t_proto.removeFilter = function removeFilter() {\n\t\t\tif (this.filter !== null) {\n\t\t\t\tthis.gain.disconnect(this.filter);\n\t\t\t\tthis.filter.disconnect(this.context.destination);\n\t\t\t\tthis.gain.connect(this.context.destination);\n\t\t\t\tthis.filter = null;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getFilter = function getFilter() {\n\t\t\treturn this.filter;\n\t\t};\n\n\t\t_proto.setFilter = function setFilter(value) {\n\t\t\tif (this.filter !== null) {\n\t\t\t\tthis.gain.disconnect(this.filter);\n\t\t\t\tthis.filter.disconnect(this.context.destination);\n\t\t\t} else {\n\t\t\t\tthis.gain.disconnect(this.context.destination);\n\t\t\t}\n\n\t\t\tthis.filter = value;\n\t\t\tthis.gain.connect(this.filter);\n\t\t\tthis.filter.connect(this.context.destination);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getMasterVolume = function getMasterVolume() {\n\t\t\treturn this.gain.gain.value;\n\t\t};\n\n\t\t_proto.setMasterVolume = function setMasterVolume(value) {\n\t\t\tthis.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\t_Object3D.prototype.updateMatrixWorld.call(this, force);\n\n\t\t\tvar listener = this.context.listener;\n\t\t\tvar up = this.up;\n\t\t\tthis.timeDelta = this._clock.getDelta();\n\t\t\tthis.matrixWorld.decompose(_position$2, _quaternion$3, _scale$1);\n\n\t\t\t_orientation.set(0, 0, -1).applyQuaternion(_quaternion$3);\n\n\t\t\tif (listener.positionX) {\n\t\t\t\t// code path for Chrome (see #14393)\n\t\t\t\tvar endTime = this.context.currentTime + this.timeDelta;\n\t\t\t\tlistener.positionX.linearRampToValueAtTime(_position$2.x, endTime);\n\t\t\t\tlistener.positionY.linearRampToValueAtTime(_position$2.y, endTime);\n\t\t\t\tlistener.positionZ.linearRampToValueAtTime(_position$2.z, endTime);\n\t\t\t\tlistener.forwardX.linearRampToValueAtTime(_orientation.x, endTime);\n\t\t\t\tlistener.forwardY.linearRampToValueAtTime(_orientation.y, endTime);\n\t\t\t\tlistener.forwardZ.linearRampToValueAtTime(_orientation.z, endTime);\n\t\t\t\tlistener.upX.linearRampToValueAtTime(up.x, endTime);\n\t\t\t\tlistener.upY.linearRampToValueAtTime(up.y, endTime);\n\t\t\t\tlistener.upZ.linearRampToValueAtTime(up.z, endTime);\n\t\t\t} else {\n\t\t\t\tlistener.setPosition(_position$2.x, _position$2.y, _position$2.z);\n\t\t\t\tlistener.setOrientation(_orientation.x, _orientation.y, _orientation.z, up.x, up.y, up.z);\n\t\t\t}\n\t\t};\n\n\t\treturn AudioListener;\n\t}(Object3D);\n\n\tvar Audio = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(Audio, _Object3D);\n\n\t\tfunction Audio(listener) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.type = 'Audio';\n\t\t\t_this.listener = listener;\n\t\t\t_this.context = listener.context;\n\t\t\t_this.gain = _this.context.createGain();\n\n\t\t\t_this.gain.connect(listener.getInput());\n\n\t\t\t_this.autoplay = false;\n\t\t\t_this.buffer = null;\n\t\t\t_this.detune = 0;\n\t\t\t_this.loop = false;\n\t\t\t_this.loopStart = 0;\n\t\t\t_this.loopEnd = 0;\n\t\t\t_this.offset = 0;\n\t\t\t_this.duration = undefined;\n\t\t\t_this.playbackRate = 1;\n\t\t\t_this.isPlaying = false;\n\t\t\t_this.hasPlaybackControl = true;\n\t\t\t_this.source = null;\n\t\t\t_this.sourceType = 'empty';\n\t\t\t_this._startedAt = 0;\n\t\t\t_this._progress = 0;\n\t\t\t_this._connected = false;\n\t\t\t_this.filters = [];\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = Audio.prototype;\n\n\t\t_proto.getOutput = function getOutput() {\n\t\t\treturn this.gain;\n\t\t};\n\n\t\t_proto.setNodeSource = function setNodeSource(audioNode) {\n\t\t\tthis.hasPlaybackControl = false;\n\t\t\tthis.sourceType = 'audioNode';\n\t\t\tthis.source = audioNode;\n\t\t\tthis.connect();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setMediaElementSource = function setMediaElementSource(mediaElement) {\n\t\t\tthis.hasPlaybackControl = false;\n\t\t\tthis.sourceType = 'mediaNode';\n\t\t\tthis.source = this.context.createMediaElementSource(mediaElement);\n\t\t\tthis.connect();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setMediaStreamSource = function setMediaStreamSource(mediaStream) {\n\t\t\tthis.hasPlaybackControl = false;\n\t\t\tthis.sourceType = 'mediaStreamNode';\n\t\t\tthis.source = this.context.createMediaStreamSource(mediaStream);\n\t\t\tthis.connect();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setBuffer = function setBuffer(audioBuffer) {\n\t\t\tthis.buffer = audioBuffer;\n\t\t\tthis.sourceType = 'buffer';\n\t\t\tif (this.autoplay) this.play();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.play = function play(delay) {\n\t\t\tif (delay === void 0) {\n\t\t\t\tdelay = 0;\n\t\t\t}\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\tconsole.warn('THREE.Audio: Audio is already playing.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._startedAt = this.context.currentTime + delay;\n\t\t\tvar source = this.context.createBufferSource();\n\t\t\tsource.buffer = this.buffer;\n\t\t\tsource.loop = this.loop;\n\t\t\tsource.loopStart = this.loopStart;\n\t\t\tsource.loopEnd = this.loopEnd;\n\t\t\tsource.onended = this.onEnded.bind(this);\n\t\t\tsource.start(this._startedAt, this._progress + this.offset, this.duration);\n\t\t\tthis.isPlaying = true;\n\t\t\tthis.source = source;\n\t\t\tthis.setDetune(this.detune);\n\t\t\tthis.setPlaybackRate(this.playbackRate);\n\t\t\treturn this.connect();\n\t\t};\n\n\t\t_proto.pause = function pause() {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\t// update current progress\n\t\t\t\tthis._progress += Math.max(this.context.currentTime - this._startedAt, 0) * this.playbackRate;\n\n\t\t\t\tif (this.loop === true) {\n\t\t\t\t\t// ensure _progress does not exceed duration with looped audios\n\t\t\t\t\tthis._progress = this._progress % (this.duration || this.buffer.duration);\n\t\t\t\t}\n\n\t\t\t\tthis.source.stop();\n\t\t\t\tthis.source.onended = null;\n\t\t\t\tthis.isPlaying = false;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.stop = function stop() {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._progress = 0;\n\t\t\tthis.source.stop();\n\t\t\tthis.source.onended = null;\n\t\t\tthis.isPlaying = false;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.connect = function connect() {\n\t\t\tif (this.filters.length > 0) {\n\t\t\t\tthis.source.connect(this.filters[0]);\n\n\t\t\t\tfor (var i = 1, l = this.filters.length; i < l; i++) {\n\t\t\t\t\tthis.filters[i - 1].connect(this.filters[i]);\n\t\t\t\t}\n\n\t\t\t\tthis.filters[this.filters.length - 1].connect(this.getOutput());\n\t\t\t} else {\n\t\t\t\tthis.source.connect(this.getOutput());\n\t\t\t}\n\n\t\t\tthis._connected = true;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.disconnect = function disconnect() {\n\t\t\tif (this.filters.length > 0) {\n\t\t\t\tthis.source.disconnect(this.filters[0]);\n\n\t\t\t\tfor (var i = 1, l = this.filters.length; i < l; i++) {\n\t\t\t\t\tthis.filters[i - 1].disconnect(this.filters[i]);\n\t\t\t\t}\n\n\t\t\t\tthis.filters[this.filters.length - 1].disconnect(this.getOutput());\n\t\t\t} else {\n\t\t\t\tthis.source.disconnect(this.getOutput());\n\t\t\t}\n\n\t\t\tthis._connected = false;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getFilters = function getFilters() {\n\t\t\treturn this.filters;\n\t\t};\n\n\t\t_proto.setFilters = function setFilters(value) {\n\t\t\tif (!value) value = [];\n\n\t\t\tif (this._connected === true) {\n\t\t\t\tthis.disconnect();\n\t\t\t\tthis.filters = value.slice();\n\t\t\t\tthis.connect();\n\t\t\t} else {\n\t\t\t\tthis.filters = value.slice();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setDetune = function setDetune(value) {\n\t\t\tthis.detune = value;\n\t\t\tif (this.source.detune === undefined) return; // only set detune when available\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\tthis.source.detune.setTargetAtTime(this.detune, this.context.currentTime, 0.01);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getDetune = function getDetune() {\n\t\t\treturn this.detune;\n\t\t};\n\n\t\t_proto.getFilter = function getFilter() {\n\t\t\treturn this.getFilters()[0];\n\t\t};\n\n\t\t_proto.setFilter = function setFilter(filter) {\n\t\t\treturn this.setFilters(filter ? [filter] : []);\n\t\t};\n\n\t\t_proto.setPlaybackRate = function setPlaybackRate(value) {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.playbackRate = value;\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\tthis.source.playbackRate.setTargetAtTime(this.playbackRate, this.context.currentTime, 0.01);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getPlaybackRate = function getPlaybackRate() {\n\t\t\treturn this.playbackRate;\n\t\t};\n\n\t\t_proto.onEnded = function onEnded() {\n\t\t\tthis.isPlaying = false;\n\t\t};\n\n\t\t_proto.getLoop = function getLoop() {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn this.loop;\n\t\t};\n\n\t\t_proto.setLoop = function setLoop(value) {\n\t\t\tif (this.hasPlaybackControl === false) {\n\t\t\t\tconsole.warn('THREE.Audio: this Audio has no playback control.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.loop = value;\n\n\t\t\tif (this.isPlaying === true) {\n\t\t\t\tthis.source.loop = this.loop;\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setLoopStart = function setLoopStart(value) {\n\t\t\tthis.loopStart = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setLoopEnd = function setLoopEnd(value) {\n\t\t\tthis.loopEnd = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getVolume = function getVolume() {\n\t\t\treturn this.gain.gain.value;\n\t\t};\n\n\t\t_proto.setVolume = function setVolume(value) {\n\t\t\tthis.gain.gain.setTargetAtTime(value, this.context.currentTime, 0.01);\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Audio;\n\t}(Object3D);\n\n\tvar _position$3 = /*@__PURE__*/new Vector3();\n\n\tvar _quaternion$4 = /*@__PURE__*/new Quaternion();\n\n\tvar _scale$2 = /*@__PURE__*/new Vector3();\n\n\tvar _orientation$1 = /*@__PURE__*/new Vector3();\n\n\tvar PositionalAudio = /*#__PURE__*/function (_Audio) {\n\t\t_inheritsLoose(PositionalAudio, _Audio);\n\n\t\tfunction PositionalAudio(listener) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Audio.call(this, listener) || this;\n\t\t\t_this.panner = _this.context.createPanner();\n\t\t\t_this.panner.panningModel = 'HRTF';\n\n\t\t\t_this.panner.connect(_this.gain);\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = PositionalAudio.prototype;\n\n\t\t_proto.getOutput = function getOutput() {\n\t\t\treturn this.panner;\n\t\t};\n\n\t\t_proto.getRefDistance = function getRefDistance() {\n\t\t\treturn this.panner.refDistance;\n\t\t};\n\n\t\t_proto.setRefDistance = function setRefDistance(value) {\n\t\t\tthis.panner.refDistance = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getRolloffFactor = function getRolloffFactor() {\n\t\t\treturn this.panner.rolloffFactor;\n\t\t};\n\n\t\t_proto.setRolloffFactor = function setRolloffFactor(value) {\n\t\t\tthis.panner.rolloffFactor = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getDistanceModel = function getDistanceModel() {\n\t\t\treturn this.panner.distanceModel;\n\t\t};\n\n\t\t_proto.setDistanceModel = function setDistanceModel(value) {\n\t\t\tthis.panner.distanceModel = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getMaxDistance = function getMaxDistance() {\n\t\t\treturn this.panner.maxDistance;\n\t\t};\n\n\t\t_proto.setMaxDistance = function setMaxDistance(value) {\n\t\t\tthis.panner.maxDistance = value;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setDirectionalCone = function setDirectionalCone(coneInnerAngle, coneOuterAngle, coneOuterGain) {\n\t\t\tthis.panner.coneInnerAngle = coneInnerAngle;\n\t\t\tthis.panner.coneOuterAngle = coneOuterAngle;\n\t\t\tthis.panner.coneOuterGain = coneOuterGain;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\t_Audio.prototype.updateMatrixWorld.call(this, force);\n\n\t\t\tif (this.hasPlaybackControl === true && this.isPlaying === false) return;\n\t\t\tthis.matrixWorld.decompose(_position$3, _quaternion$4, _scale$2);\n\n\t\t\t_orientation$1.set(0, 0, 1).applyQuaternion(_quaternion$4);\n\n\t\t\tvar panner = this.panner;\n\n\t\t\tif (panner.positionX) {\n\t\t\t\t// code path for Chrome and Firefox (see #14393)\n\t\t\t\tvar endTime = this.context.currentTime + this.listener.timeDelta;\n\t\t\t\tpanner.positionX.linearRampToValueAtTime(_position$3.x, endTime);\n\t\t\t\tpanner.positionY.linearRampToValueAtTime(_position$3.y, endTime);\n\t\t\t\tpanner.positionZ.linearRampToValueAtTime(_position$3.z, endTime);\n\t\t\t\tpanner.orientationX.linearRampToValueAtTime(_orientation$1.x, endTime);\n\t\t\t\tpanner.orientationY.linearRampToValueAtTime(_orientation$1.y, endTime);\n\t\t\t\tpanner.orientationZ.linearRampToValueAtTime(_orientation$1.z, endTime);\n\t\t\t} else {\n\t\t\t\tpanner.setPosition(_position$3.x, _position$3.y, _position$3.z);\n\t\t\t\tpanner.setOrientation(_orientation$1.x, _orientation$1.y, _orientation$1.z);\n\t\t\t}\n\t\t};\n\n\t\treturn PositionalAudio;\n\t}(Audio);\n\n\tvar AudioAnalyser = /*#__PURE__*/function () {\n\t\tfunction AudioAnalyser(audio, fftSize) {\n\t\t\tif (fftSize === void 0) {\n\t\t\t\tfftSize = 2048;\n\t\t\t}\n\n\t\t\tthis.analyser = audio.context.createAnalyser();\n\t\t\tthis.analyser.fftSize = fftSize;\n\t\t\tthis.data = new Uint8Array(this.analyser.frequencyBinCount);\n\t\t\taudio.getOutput().connect(this.analyser);\n\t\t}\n\n\t\tvar _proto = AudioAnalyser.prototype;\n\n\t\t_proto.getFrequencyData = function getFrequencyData() {\n\t\t\tthis.analyser.getByteFrequencyData(this.data);\n\t\t\treturn this.data;\n\t\t};\n\n\t\t_proto.getAverageFrequency = function getAverageFrequency() {\n\t\t\tvar value = 0;\n\t\t\tvar data = this.getFrequencyData();\n\n\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\tvalue += data[i];\n\t\t\t}\n\n\t\t\treturn value / data.length;\n\t\t};\n\n\t\treturn AudioAnalyser;\n\t}();\n\n\tfunction PropertyMixer(binding, typeName, valueSize) {\n\t\tthis.binding = binding;\n\t\tthis.valueSize = valueSize;\n\t\tvar mixFunction, mixFunctionAdditive, setIdentity; // buffer layout: [ incoming | accu0 | accu1 | orig | addAccu | (optional work) ]\n\t\t//\n\t\t// interpolators can use .buffer as their .result\n\t\t// the data then goes to 'incoming'\n\t\t//\n\t\t// 'accu0' and 'accu1' are used frame-interleaved for\n\t\t// the cumulative result and are compared to detect\n\t\t// changes\n\t\t//\n\t\t// 'orig' stores the original state of the property\n\t\t//\n\t\t// 'add' is used for additive cumulative results\n\t\t//\n\t\t// 'work' is optional and is only present for quaternion types. It is used\n\t\t// to store intermediate quaternion multiplication results\n\n\t\tswitch (typeName) {\n\t\t\tcase 'quaternion':\n\t\t\t\tmixFunction = this._slerp;\n\t\t\t\tmixFunctionAdditive = this._slerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityQuaternion;\n\t\t\t\tthis.buffer = new Float64Array(valueSize * 6);\n\t\t\t\tthis._workIndex = 5;\n\t\t\t\tbreak;\n\n\t\t\tcase 'string':\n\t\t\tcase 'bool':\n\t\t\t\tmixFunction = this._select; // Use the regular mix function and for additive on these types,\n\t\t\t\t// additive is not relevant for non-numeric types\n\n\t\t\t\tmixFunctionAdditive = this._select;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityOther;\n\t\t\t\tthis.buffer = new Array(valueSize * 5);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tmixFunction = this._lerp;\n\t\t\t\tmixFunctionAdditive = this._lerpAdditive;\n\t\t\t\tsetIdentity = this._setAdditiveIdentityNumeric;\n\t\t\t\tthis.buffer = new Float64Array(valueSize * 5);\n\t\t}\n\n\t\tthis._mixBufferRegion = mixFunction;\n\t\tthis._mixBufferRegionAdditive = mixFunctionAdditive;\n\t\tthis._setIdentity = setIdentity;\n\t\tthis._origIndex = 3;\n\t\tthis._addIndex = 4;\n\t\tthis.cumulativeWeight = 0;\n\t\tthis.cumulativeWeightAdditive = 0;\n\t\tthis.useCount = 0;\n\t\tthis.referenceCount = 0;\n\t}\n\n\tObject.assign(PropertyMixer.prototype, {\n\t\t// accumulate data in the 'incoming' region into 'accu<i>'\n\t\taccumulate: function accumulate(accuIndex, weight) {\n\t\t\t// note: happily accumulating nothing when weight = 0, the caller knows\n\t\t\t// the weight and shouldn't have made the call in the first place\n\t\t\tvar buffer = this.buffer,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toffset = accuIndex * stride + stride;\n\t\t\tvar currentWeight = this.cumulativeWeight;\n\n\t\t\tif (currentWeight === 0) {\n\t\t\t\t// accuN := incoming * weight\n\t\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\t\tbuffer[offset + i] = buffer[i];\n\t\t\t\t}\n\n\t\t\t\tcurrentWeight = weight;\n\t\t\t} else {\n\t\t\t\t// accuN := accuN + incoming * weight\n\t\t\t\tcurrentWeight += weight;\n\t\t\t\tvar mix = weight / currentWeight;\n\n\t\t\t\tthis._mixBufferRegion(buffer, offset, 0, mix, stride);\n\t\t\t}\n\n\t\t\tthis.cumulativeWeight = currentWeight;\n\t\t},\n\t\t// accumulate data in the 'incoming' region into 'add'\n\t\taccumulateAdditive: function accumulateAdditive(weight) {\n\t\t\tvar buffer = this.buffer,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toffset = stride * this._addIndex;\n\n\t\t\tif (this.cumulativeWeightAdditive === 0) {\n\t\t\t\t// add = identity\n\t\t\t\tthis._setIdentity();\n\t\t\t} // add := add + incoming * weight\n\n\n\t\t\tthis._mixBufferRegionAdditive(buffer, offset, 0, weight, stride);\n\n\t\t\tthis.cumulativeWeightAdditive += weight;\n\t\t},\n\t\t// apply the state of 'accu<i>' to the binding when accus differ\n\t\tapply: function apply(accuIndex) {\n\t\t\tvar stride = this.valueSize,\n\t\t\t\t\tbuffer = this.buffer,\n\t\t\t\t\toffset = accuIndex * stride + stride,\n\t\t\t\t\tweight = this.cumulativeWeight,\n\t\t\t\t\tweightAdditive = this.cumulativeWeightAdditive,\n\t\t\t\t\tbinding = this.binding;\n\t\t\tthis.cumulativeWeight = 0;\n\t\t\tthis.cumulativeWeightAdditive = 0;\n\n\t\t\tif (weight < 1) {\n\t\t\t\t// accuN := accuN + original * ( 1 - cumulativeWeight )\n\t\t\t\tvar originalValueOffset = stride * this._origIndex;\n\n\t\t\t\tthis._mixBufferRegion(buffer, offset, originalValueOffset, 1 - weight, stride);\n\t\t\t}\n\n\t\t\tif (weightAdditive > 0) {\n\t\t\t\t// accuN := accuN + additive accuN\n\t\t\t\tthis._mixBufferRegionAdditive(buffer, offset, this._addIndex * stride, 1, stride);\n\t\t\t}\n\n\t\t\tfor (var i = stride, e = stride + stride; i !== e; ++i) {\n\t\t\t\tif (buffer[i] !== buffer[i + stride]) {\n\t\t\t\t\t// value has changed -> update scene graph\n\t\t\t\t\tbinding.setValue(buffer, offset);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// remember the state of the bound property and copy it to both accus\n\t\tsaveOriginalState: function saveOriginalState() {\n\t\t\tvar binding = this.binding;\n\t\t\tvar buffer = this.buffer,\n\t\t\t\t\tstride = this.valueSize,\n\t\t\t\t\toriginalValueOffset = stride * this._origIndex;\n\t\t\tbinding.getValue(buffer, originalValueOffset); // accu[0..1] := orig -- initially detect changes against the original\n\n\t\t\tfor (var i = stride, e = originalValueOffset; i !== e; ++i) {\n\t\t\t\tbuffer[i] = buffer[originalValueOffset + i % stride];\n\t\t\t} // Add to identity for additive\n\n\n\t\t\tthis._setIdentity();\n\n\t\t\tthis.cumulativeWeight = 0;\n\t\t\tthis.cumulativeWeightAdditive = 0;\n\t\t},\n\t\t// apply the state previously taken via 'saveOriginalState' to the binding\n\t\trestoreOriginalState: function restoreOriginalState() {\n\t\t\tvar originalValueOffset = this.valueSize * 3;\n\t\t\tthis.binding.setValue(this.buffer, originalValueOffset);\n\t\t},\n\t\t_setAdditiveIdentityNumeric: function _setAdditiveIdentityNumeric() {\n\t\t\tvar startIndex = this._addIndex * this.valueSize;\n\t\t\tvar endIndex = startIndex + this.valueSize;\n\n\t\t\tfor (var i = startIndex; i < endIndex; i++) {\n\t\t\t\tthis.buffer[i] = 0;\n\t\t\t}\n\t\t},\n\t\t_setAdditiveIdentityQuaternion: function _setAdditiveIdentityQuaternion() {\n\t\t\tthis._setAdditiveIdentityNumeric();\n\n\t\t\tthis.buffer[this._addIndex * this.valueSize + 3] = 1;\n\t\t},\n\t\t_setAdditiveIdentityOther: function _setAdditiveIdentityOther() {\n\t\t\tvar startIndex = this._origIndex * this.valueSize;\n\t\t\tvar targetIndex = this._addIndex * this.valueSize;\n\n\t\t\tfor (var i = 0; i < this.valueSize; i++) {\n\t\t\t\tthis.buffer[targetIndex + i] = this.buffer[startIndex + i];\n\t\t\t}\n\t\t},\n\t\t// mix functions\n\t\t_select: function _select(buffer, dstOffset, srcOffset, t, stride) {\n\t\t\tif (t >= 0.5) {\n\t\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\t\tbuffer[dstOffset + i] = buffer[srcOffset + i];\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t_slerp: function _slerp(buffer, dstOffset, srcOffset, t) {\n\t\t\tQuaternion.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, srcOffset, t);\n\t\t},\n\t\t_slerpAdditive: function _slerpAdditive(buffer, dstOffset, srcOffset, t, stride) {\n\t\t\tvar workOffset = this._workIndex * stride; // Store result in intermediate buffer offset\n\n\t\t\tQuaternion.multiplyQuaternionsFlat(buffer, workOffset, buffer, dstOffset, buffer, srcOffset); // Slerp to the intermediate result\n\n\t\t\tQuaternion.slerpFlat(buffer, dstOffset, buffer, dstOffset, buffer, workOffset, t);\n\t\t},\n\t\t_lerp: function _lerp(buffer, dstOffset, srcOffset, t, stride) {\n\t\t\tvar s = 1 - t;\n\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tvar j = dstOffset + i;\n\t\t\t\tbuffer[j] = buffer[j] * s + buffer[srcOffset + i] * t;\n\t\t\t}\n\t\t},\n\t\t_lerpAdditive: function _lerpAdditive(buffer, dstOffset, srcOffset, t, stride) {\n\t\t\tfor (var i = 0; i !== stride; ++i) {\n\t\t\t\tvar j = dstOffset + i;\n\t\t\t\tbuffer[j] = buffer[j] + buffer[srcOffset + i] * t;\n\t\t\t}\n\t\t}\n\t});\n\n\t// Characters [].:/ are reserved for track binding syntax.\n\tvar _RESERVED_CHARS_RE = '\\\\[\\\\]\\\\.:\\\\/';\n\n\tvar _reservedRe = new RegExp('[' + _RESERVED_CHARS_RE + ']', 'g'); // Attempts to allow node names from any language. ES5's `\\w` regexp matches\n\t// only latin characters, and the unicode \\p{L} is not yet supported. So\n\t// instead, we exclude reserved characters and match everything else.\n\n\n\tvar _wordChar = '[^' + _RESERVED_CHARS_RE + ']';\n\n\tvar _wordCharOrDot = '[^' + _RESERVED_CHARS_RE.replace('\\\\.', '') + ']'; // Parent directories, delimited by '/' or ':'. Currently unused, but must\n\t// be matched to parse the rest of the track name.\n\n\n\tvar _directoryRe = /((?:WC+[\\/:])*)/.source.replace('WC', _wordChar); // Target node. May contain word characters (a-zA-Z0-9_) and '.' or '-'.\n\n\n\tvar _nodeRe = /(WCOD+)?/.source.replace('WCOD', _wordCharOrDot); // Object on target node, and accessor. May not contain reserved\n\t// characters. Accessor may contain any character except closing bracket.\n\n\n\tvar _objectRe = /(?:\\.(WC+)(?:\\[(.+)\\])?)?/.source.replace('WC', _wordChar); // Property and accessor. May not contain reserved characters. Accessor may\n\t// contain any non-bracket characters.\n\n\n\tvar _propertyRe = /\\.(WC+)(?:\\[(.+)\\])?/.source.replace('WC', _wordChar);\n\n\tvar _trackRe = new RegExp('' + '^' + _directoryRe + _nodeRe + _objectRe + _propertyRe + '$');\n\n\tvar _supportedObjectNames = ['material', 'materials', 'bones'];\n\n\tfunction Composite(targetGroup, path, optionalParsedPath) {\n\t\tvar parsedPath = optionalParsedPath || PropertyBinding.parseTrackName(path);\n\t\tthis._targetGroup = targetGroup;\n\t\tthis._bindings = targetGroup.subscribe_(path, parsedPath);\n\t}\n\n\tObject.assign(Composite.prototype, {\n\t\tgetValue: function getValue(array, offset) {\n\t\t\tthis.bind(); // bind all binding\n\n\t\t\tvar firstValidIndex = this._targetGroup.nCachedObjects_,\n\t\t\t\t\tbinding = this._bindings[firstValidIndex]; // and only call .getValue on the first\n\n\t\t\tif (binding !== undefined) binding.getValue(array, offset);\n\t\t},\n\t\tsetValue: function setValue(array, offset) {\n\t\t\tvar bindings = this._bindings;\n\n\t\t\tfor (var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) {\n\t\t\t\tbindings[i].setValue(array, offset);\n\t\t\t}\n\t\t},\n\t\tbind: function bind() {\n\t\t\tvar bindings = this._bindings;\n\n\t\t\tfor (var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) {\n\t\t\t\tbindings[i].bind();\n\t\t\t}\n\t\t},\n\t\tunbind: function unbind() {\n\t\t\tvar bindings = this._bindings;\n\n\t\t\tfor (var i = this._targetGroup.nCachedObjects_, n = bindings.length; i !== n; ++i) {\n\t\t\t\tbindings[i].unbind();\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction PropertyBinding(rootNode, path, parsedPath) {\n\t\tthis.path = path;\n\t\tthis.parsedPath = parsedPath || PropertyBinding.parseTrackName(path);\n\t\tthis.node = PropertyBinding.findNode(rootNode, this.parsedPath.nodeName) || rootNode;\n\t\tthis.rootNode = rootNode;\n\t}\n\n\tObject.assign(PropertyBinding, {\n\t\tComposite: Composite,\n\t\tcreate: function create(root, path, parsedPath) {\n\t\t\tif (!(root && root.isAnimationObjectGroup)) {\n\t\t\t\treturn new PropertyBinding(root, path, parsedPath);\n\t\t\t} else {\n\t\t\t\treturn new PropertyBinding.Composite(root, path, parsedPath);\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Replaces spaces with underscores and removes unsupported characters from\n\t\t * node names, to ensure compatibility with parseTrackName().\n\t\t *\n\t\t * @param {string} name Node name to be sanitized.\n\t\t * @return {string}\n\t\t */\n\t\tsanitizeNodeName: function sanitizeNodeName(name) {\n\t\t\treturn name.replace(/\\s/g, '_').replace(_reservedRe, '');\n\t\t},\n\t\tparseTrackName: function parseTrackName(trackName) {\n\t\t\tvar matches = _trackRe.exec(trackName);\n\n\t\t\tif (!matches) {\n\t\t\t\tthrow new Error('PropertyBinding: Cannot parse trackName: ' + trackName);\n\t\t\t}\n\n\t\t\tvar results = {\n\t\t\t\t// directoryName: matches[ 1 ], // (tschw) currently unused\n\t\t\t\tnodeName: matches[2],\n\t\t\t\tobjectName: matches[3],\n\t\t\t\tobjectIndex: matches[4],\n\t\t\t\tpropertyName: matches[5],\n\t\t\t\t// required\n\t\t\t\tpropertyIndex: matches[6]\n\t\t\t};\n\t\t\tvar lastDot = results.nodeName && results.nodeName.lastIndexOf('.');\n\n\t\t\tif (lastDot !== undefined && lastDot !== -1) {\n\t\t\t\tvar objectName = results.nodeName.substring(lastDot + 1); // Object names must be checked against an allowlist. Otherwise, there\n\t\t\t\t// is no way to parse 'foo.bar.baz': 'baz' must be a property, but\n\t\t\t\t// 'bar' could be the objectName, or part of a nodeName (which can\n\t\t\t\t// include '.' characters).\n\n\t\t\t\tif (_supportedObjectNames.indexOf(objectName) !== -1) {\n\t\t\t\t\tresults.nodeName = results.nodeName.substring(0, lastDot);\n\t\t\t\t\tresults.objectName = objectName;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (results.propertyName === null || results.propertyName.length === 0) {\n\t\t\t\tthrow new Error('PropertyBinding: can not parse propertyName from trackName: ' + trackName);\n\t\t\t}\n\n\t\t\treturn results;\n\t\t},\n\t\tfindNode: function findNode(root, nodeName) {\n\t\t\tif (!nodeName || nodeName === '' || nodeName === '.' || nodeName === -1 || nodeName === root.name || nodeName === root.uuid) {\n\t\t\t\treturn root;\n\t\t\t} // search into skeleton bones.\n\n\n\t\t\tif (root.skeleton) {\n\t\t\t\tvar bone = root.skeleton.getBoneByName(nodeName);\n\n\t\t\t\tif (bone !== undefined) {\n\t\t\t\t\treturn bone;\n\t\t\t\t}\n\t\t\t} // search into node subtree.\n\n\n\t\t\tif (root.children) {\n\t\t\t\tvar searchNodeSubtree = function searchNodeSubtree(children) {\n\t\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\t\tvar childNode = children[i];\n\n\t\t\t\t\t\tif (childNode.name === nodeName || childNode.uuid === nodeName) {\n\t\t\t\t\t\t\treturn childNode;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar result = searchNodeSubtree(childNode.children);\n\t\t\t\t\t\tif (result) return result;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t};\n\n\t\t\t\tvar subTreeNode = searchNodeSubtree(root.children);\n\n\t\t\t\tif (subTreeNode) {\n\t\t\t\t\treturn subTreeNode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\t});\n\tObject.assign(PropertyBinding.prototype, {\n\t\t// prototype, continued\n\t\t// these are used to \"bind\" a nonexistent property\n\t\t_getValue_unavailable: function _getValue_unavailable() {},\n\t\t_setValue_unavailable: function _setValue_unavailable() {},\n\t\tBindingType: {\n\t\t\tDirect: 0,\n\t\t\tEntireArray: 1,\n\t\t\tArrayElement: 2,\n\t\t\tHasFromToArray: 3\n\t\t},\n\t\tVersioning: {\n\t\t\tNone: 0,\n\t\t\tNeedsUpdate: 1,\n\t\t\tMatrixWorldNeedsUpdate: 2\n\t\t},\n\t\tGetterByBindingType: [function getValue_direct(buffer, offset) {\n\t\t\tbuffer[offset] = this.node[this.propertyName];\n\t\t}, function getValue_array(buffer, offset) {\n\t\t\tvar source = this.resolvedProperty;\n\n\t\t\tfor (var i = 0, n = source.length; i !== n; ++i) {\n\t\t\t\tbuffer[offset++] = source[i];\n\t\t\t}\n\t\t}, function getValue_arrayElement(buffer, offset) {\n\t\t\tbuffer[offset] = this.resolvedProperty[this.propertyIndex];\n\t\t}, function getValue_toArray(buffer, offset) {\n\t\t\tthis.resolvedProperty.toArray(buffer, offset);\n\t\t}],\n\t\tSetterByBindingTypeAndVersioning: [[// Direct\n\t\tfunction setValue_direct(buffer, offset) {\n\t\t\tthis.targetObject[this.propertyName] = buffer[offset];\n\t\t}, function setValue_direct_setNeedsUpdate(buffer, offset) {\n\t\t\tthis.targetObject[this.propertyName] = buffer[offset];\n\t\t\tthis.targetObject.needsUpdate = true;\n\t\t}, function setValue_direct_setMatrixWorldNeedsUpdate(buffer, offset) {\n\t\t\tthis.targetObject[this.propertyName] = buffer[offset];\n\t\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\t\t}], [// EntireArray\n\t\tfunction setValue_array(buffer, offset) {\n\t\t\tvar dest = this.resolvedProperty;\n\n\t\t\tfor (var i = 0, n = dest.length; i !== n; ++i) {\n\t\t\t\tdest[i] = buffer[offset++];\n\t\t\t}\n\t\t}, function setValue_array_setNeedsUpdate(buffer, offset) {\n\t\t\tvar dest = this.resolvedProperty;\n\n\t\t\tfor (var i = 0, n = dest.length; i !== n; ++i) {\n\t\t\t\tdest[i] = buffer[offset++];\n\t\t\t}\n\n\t\t\tthis.targetObject.needsUpdate = true;\n\t\t}, function setValue_array_setMatrixWorldNeedsUpdate(buffer, offset) {\n\t\t\tvar dest = this.resolvedProperty;\n\n\t\t\tfor (var i = 0, n = dest.length; i !== n; ++i) {\n\t\t\t\tdest[i] = buffer[offset++];\n\t\t\t}\n\n\t\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\t\t}], [// ArrayElement\n\t\tfunction setValue_arrayElement(buffer, offset) {\n\t\t\tthis.resolvedProperty[this.propertyIndex] = buffer[offset];\n\t\t}, function setValue_arrayElement_setNeedsUpdate(buffer, offset) {\n\t\t\tthis.resolvedProperty[this.propertyIndex] = buffer[offset];\n\t\t\tthis.targetObject.needsUpdate = true;\n\t\t}, function setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer, offset) {\n\t\t\tthis.resolvedProperty[this.propertyIndex] = buffer[offset];\n\t\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\t\t}], [// HasToFromArray\n\t\tfunction setValue_fromArray(buffer, offset) {\n\t\t\tthis.resolvedProperty.fromArray(buffer, offset);\n\t\t}, function setValue_fromArray_setNeedsUpdate(buffer, offset) {\n\t\t\tthis.resolvedProperty.fromArray(buffer, offset);\n\t\t\tthis.targetObject.needsUpdate = true;\n\t\t}, function setValue_fromArray_setMatrixWorldNeedsUpdate(buffer, offset) {\n\t\t\tthis.resolvedProperty.fromArray(buffer, offset);\n\t\t\tthis.targetObject.matrixWorldNeedsUpdate = true;\n\t\t}]],\n\t\tgetValue: function getValue_unbound(targetArray, offset) {\n\t\t\tthis.bind();\n\t\t\tthis.getValue(targetArray, offset); // Note: This class uses a State pattern on a per-method basis:\n\t\t\t// 'bind' sets 'this.getValue' / 'setValue' and shadows the\n\t\t\t// prototype version of these methods with one that represents\n\t\t\t// the bound state. When the property is not found, the methods\n\t\t\t// become no-ops.\n\t\t},\n\t\tsetValue: function getValue_unbound(sourceArray, offset) {\n\t\t\tthis.bind();\n\t\t\tthis.setValue(sourceArray, offset);\n\t\t},\n\t\t// create getter / setter pair for a property in the scene graph\n\t\tbind: function bind() {\n\t\t\tvar targetObject = this.node;\n\t\t\tvar parsedPath = this.parsedPath;\n\t\t\tvar objectName = parsedPath.objectName;\n\t\t\tvar propertyName = parsedPath.propertyName;\n\t\t\tvar propertyIndex = parsedPath.propertyIndex;\n\n\t\t\tif (!targetObject) {\n\t\t\t\ttargetObject = PropertyBinding.findNode(this.rootNode, parsedPath.nodeName) || this.rootNode;\n\t\t\t\tthis.node = targetObject;\n\t\t\t} // set fail state so we can just 'return' on error\n\n\n\t\t\tthis.getValue = this._getValue_unavailable;\n\t\t\tthis.setValue = this._setValue_unavailable; // ensure there is a value node\n\n\t\t\tif (!targetObject) {\n\t\t\t\tconsole.error('THREE.PropertyBinding: Trying to update node for track: ' + this.path + ' but it wasn\\'t found.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (objectName) {\n\t\t\t\tvar objectIndex = parsedPath.objectIndex; // special cases were we need to reach deeper into the hierarchy to get the face materials....\n\n\t\t\t\tswitch (objectName) {\n\t\t\t\t\tcase 'materials':\n\t\t\t\t\t\tif (!targetObject.material) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to material as node does not have a material.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!targetObject.material.materials) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttargetObject = targetObject.material.materials;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'bones':\n\t\t\t\t\t\tif (!targetObject.skeleton) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t} // potential future optimization: skip this if propertyIndex is already an integer\n\t\t\t\t\t\t// and convert the integer string to a true integer.\n\n\n\t\t\t\t\t\ttargetObject = targetObject.skeleton.bones; // support resolving morphTarget names into indices.\n\n\t\t\t\t\t\tfor (var i = 0; i < targetObject.length; i++) {\n\t\t\t\t\t\t\tif (targetObject[i].name === objectIndex) {\n\t\t\t\t\t\t\t\tobjectIndex = i;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (targetObject[objectName] === undefined) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to objectName of node undefined.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttargetObject = targetObject[objectName];\n\t\t\t\t}\n\n\t\t\t\tif (objectIndex !== undefined) {\n\t\t\t\t\tif (targetObject[objectIndex] === undefined) {\n\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.', this, targetObject);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\ttargetObject = targetObject[objectIndex];\n\t\t\t\t}\n\t\t\t} // resolve property\n\n\n\t\t\tvar nodeProperty = targetObject[propertyName];\n\n\t\t\tif (nodeProperty === undefined) {\n\t\t\t\tvar nodeName = parsedPath.nodeName;\n\t\t\t\tconsole.error('THREE.PropertyBinding: Trying to update property for track: ' + nodeName + '.' + propertyName + ' but it wasn\\'t found.', targetObject);\n\t\t\t\treturn;\n\t\t\t} // determine versioning scheme\n\n\n\t\t\tvar versioning = this.Versioning.None;\n\t\t\tthis.targetObject = targetObject;\n\n\t\t\tif (targetObject.needsUpdate !== undefined) {\n\t\t\t\t// material\n\t\t\t\tversioning = this.Versioning.NeedsUpdate;\n\t\t\t} else if (targetObject.matrixWorldNeedsUpdate !== undefined) {\n\t\t\t\t// node transform\n\t\t\t\tversioning = this.Versioning.MatrixWorldNeedsUpdate;\n\t\t\t} // determine how the property gets bound\n\n\n\t\t\tvar bindingType = this.BindingType.Direct;\n\n\t\t\tif (propertyIndex !== undefined) {\n\t\t\t\t// access a sub element of the property array (only primitives are supported right now)\n\t\t\t\tif (propertyName === 'morphTargetInfluences') {\n\t\t\t\t\t// potential optimization, skip this if propertyIndex is already an integer, and convert the integer string to a true integer.\n\t\t\t\t\t// support resolving morphTarget names into indices.\n\t\t\t\t\tif (!targetObject.geometry) {\n\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.', this);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (targetObject.geometry.isBufferGeometry) {\n\t\t\t\t\t\tif (!targetObject.geometry.morphAttributes) {\n\t\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.', this);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (targetObject.morphTargetDictionary[propertyIndex] !== undefined) {\n\t\t\t\t\t\t\tpropertyIndex = targetObject.morphTargetDictionary[propertyIndex];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.error('THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.', this);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbindingType = this.BindingType.ArrayElement;\n\t\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\t\tthis.propertyIndex = propertyIndex;\n\t\t\t} else if (nodeProperty.fromArray !== undefined && nodeProperty.toArray !== undefined) {\n\t\t\t\t// must use copy for Object3D.Euler/Quaternion\n\t\t\t\tbindingType = this.BindingType.HasFromToArray;\n\t\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\t} else if (Array.isArray(nodeProperty)) {\n\t\t\t\tbindingType = this.BindingType.EntireArray;\n\t\t\t\tthis.resolvedProperty = nodeProperty;\n\t\t\t} else {\n\t\t\t\tthis.propertyName = propertyName;\n\t\t\t} // select getter / setter\n\n\n\t\t\tthis.getValue = this.GetterByBindingType[bindingType];\n\t\t\tthis.setValue = this.SetterByBindingTypeAndVersioning[bindingType][versioning];\n\t\t},\n\t\tunbind: function unbind() {\n\t\t\tthis.node = null; // back to the prototype version of getValue / setValue\n\t\t\t// note: avoiding to mutate the shape of 'this' via 'delete'\n\n\t\t\tthis.getValue = this._getValue_unbound;\n\t\t\tthis.setValue = this._setValue_unbound;\n\t\t}\n\t}); // DECLARE ALIAS AFTER assign prototype\n\n\tObject.assign(PropertyBinding.prototype, {\n\t\t// initial state of these methods that calls 'bind'\n\t\t_getValue_unbound: PropertyBinding.prototype.getValue,\n\t\t_setValue_unbound: PropertyBinding.prototype.setValue\n\t});\n\n\t/**\n\t *\n\t * A group of objects that receives a shared animation state.\n\t *\n\t * Usage:\n\t *\n\t *\t- Add objects you would otherwise pass as 'root' to the\n\t *\t\tconstructor or the .clipAction method of AnimationMixer.\n\t *\n\t *\t- Instead pass this object as 'root'.\n\t *\n\t *\t- You can also add and remove objects later when the mixer\n\t *\t\tis running.\n\t *\n\t * Note:\n\t *\n\t *\t\tObjects of this class appear as one object to the mixer,\n\t *\t\tso cache control of the individual objects must be done\n\t *\t\ton the group.\n\t *\n\t * Limitation:\n\t *\n\t *\t- The animated properties must be compatible among the\n\t *\t\tall objects in the group.\n\t *\n\t *\t- A single property can either be controlled through a\n\t *\t\ttarget group or directly, but not both.\n\t */\n\n\tfunction AnimationObjectGroup() {\n\t\tthis.uuid = MathUtils.generateUUID(); // cached objects followed by the active ones\n\n\t\tthis._objects = Array.prototype.slice.call(arguments);\n\t\tthis.nCachedObjects_ = 0; // threshold\n\t\t// note: read by PropertyBinding.Composite\n\n\t\tvar indices = {};\n\t\tthis._indicesByUUID = indices; // for bookkeeping\n\n\t\tfor (var i = 0, n = arguments.length; i !== n; ++i) {\n\t\t\tindices[arguments[i].uuid] = i;\n\t\t}\n\n\t\tthis._paths = []; // inside: string\n\n\t\tthis._parsedPaths = []; // inside: { we don't care, here }\n\n\t\tthis._bindings = []; // inside: Array< PropertyBinding >\n\n\t\tthis._bindingsIndicesByPath = {}; // inside: indices in these arrays\n\n\t\tvar scope = this;\n\t\tthis.stats = {\n\t\t\tobjects: {\n\t\t\t\tget total() {\n\t\t\t\t\treturn scope._objects.length;\n\t\t\t\t},\n\n\t\t\t\tget inUse() {\n\t\t\t\t\treturn this.total - scope.nCachedObjects_;\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tget bindingsPerObject() {\n\t\t\t\treturn scope._bindings.length;\n\t\t\t}\n\n\t\t};\n\t}\n\n\tObject.assign(AnimationObjectGroup.prototype, {\n\t\tisAnimationObjectGroup: true,\n\t\tadd: function add() {\n\t\t\tvar objects = this._objects,\n\t\t\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\t\t\tpaths = this._paths,\n\t\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\t\tbindings = this._bindings,\n\t\t\t\t\tnBindings = bindings.length;\n\t\t\tvar knownObject = undefined,\n\t\t\t\t\tnObjects = objects.length,\n\t\t\t\t\tnCachedObjects = this.nCachedObjects_;\n\n\t\t\tfor (var i = 0, n = arguments.length; i !== n; ++i) {\n\t\t\t\tvar object = arguments[i],\n\t\t\t\t\t\tuuid = object.uuid;\n\t\t\t\tvar index = indicesByUUID[uuid];\n\n\t\t\t\tif (index === undefined) {\n\t\t\t\t\t// unknown object -> add it to the ACTIVE region\n\t\t\t\t\tindex = nObjects++;\n\t\t\t\t\tindicesByUUID[uuid] = index;\n\t\t\t\t\tobjects.push(object); // accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor (var j = 0, m = nBindings; j !== m; ++j) {\n\t\t\t\t\t\tbindings[j].push(new PropertyBinding(object, paths[j], parsedPaths[j]));\n\t\t\t\t\t}\n\t\t\t\t} else if (index < nCachedObjects) {\n\t\t\t\t\tknownObject = objects[index]; // move existing object to the ACTIVE region\n\n\t\t\t\t\tvar firstActiveIndex = --nCachedObjects,\n\t\t\t\t\t\t\tlastCachedObject = objects[firstActiveIndex];\n\t\t\t\t\tindicesByUUID[lastCachedObject.uuid] = index;\n\t\t\t\t\tobjects[index] = lastCachedObject;\n\t\t\t\t\tindicesByUUID[uuid] = firstActiveIndex;\n\t\t\t\t\tobjects[firstActiveIndex] = object; // accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor (var _j = 0, _m = nBindings; _j !== _m; ++_j) {\n\t\t\t\t\t\tvar bindingsForPath = bindings[_j],\n\t\t\t\t\t\t\t\tlastCached = bindingsForPath[firstActiveIndex];\n\t\t\t\t\t\tvar binding = bindingsForPath[index];\n\t\t\t\t\t\tbindingsForPath[index] = lastCached;\n\n\t\t\t\t\t\tif (binding === undefined) {\n\t\t\t\t\t\t\t// since we do not bother to create new bindings\n\t\t\t\t\t\t\t// for objects that are cached, the binding may\n\t\t\t\t\t\t\t// or may not exist\n\t\t\t\t\t\t\tbinding = new PropertyBinding(object, paths[_j], parsedPaths[_j]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbindingsForPath[firstActiveIndex] = binding;\n\t\t\t\t\t}\n\t\t\t\t} else if (objects[index] !== knownObject) {\n\t\t\t\t\tconsole.error('THREE.AnimationObjectGroup: Different objects with the same UUID ' + 'detected. Clean the caches or recreate your infrastructure when reloading scenes.');\n\t\t\t\t} // else the object is already where we want it to be\n\n\t\t\t} // for arguments\n\n\n\t\t\tthis.nCachedObjects_ = nCachedObjects;\n\t\t},\n\t\tremove: function remove() {\n\t\t\tvar objects = this._objects,\n\t\t\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\t\t\tbindings = this._bindings,\n\t\t\t\t\tnBindings = bindings.length;\n\t\t\tvar nCachedObjects = this.nCachedObjects_;\n\n\t\t\tfor (var i = 0, n = arguments.length; i !== n; ++i) {\n\t\t\t\tvar object = arguments[i],\n\t\t\t\t\t\tuuid = object.uuid,\n\t\t\t\t\t\tindex = indicesByUUID[uuid];\n\n\t\t\t\tif (index !== undefined && index >= nCachedObjects) {\n\t\t\t\t\t// move existing object into the CACHED region\n\t\t\t\t\tvar lastCachedIndex = nCachedObjects++,\n\t\t\t\t\t\t\tfirstActiveObject = objects[lastCachedIndex];\n\t\t\t\t\tindicesByUUID[firstActiveObject.uuid] = index;\n\t\t\t\t\tobjects[index] = firstActiveObject;\n\t\t\t\t\tindicesByUUID[uuid] = lastCachedIndex;\n\t\t\t\t\tobjects[lastCachedIndex] = object; // accounting is done, now do the same for all bindings\n\n\t\t\t\t\tfor (var j = 0, m = nBindings; j !== m; ++j) {\n\t\t\t\t\t\tvar bindingsForPath = bindings[j],\n\t\t\t\t\t\t\t\tfirstActive = bindingsForPath[lastCachedIndex],\n\t\t\t\t\t\t\t\tbinding = bindingsForPath[index];\n\t\t\t\t\t\tbindingsForPath[index] = firstActive;\n\t\t\t\t\t\tbindingsForPath[lastCachedIndex] = binding;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // for arguments\n\n\n\t\t\tthis.nCachedObjects_ = nCachedObjects;\n\t\t},\n\t\t// remove & forget\n\t\tuncache: function uncache() {\n\t\t\tvar objects = this._objects,\n\t\t\t\t\tindicesByUUID = this._indicesByUUID,\n\t\t\t\t\tbindings = this._bindings,\n\t\t\t\t\tnBindings = bindings.length;\n\t\t\tvar nCachedObjects = this.nCachedObjects_,\n\t\t\t\t\tnObjects = objects.length;\n\n\t\t\tfor (var i = 0, n = arguments.length; i !== n; ++i) {\n\t\t\t\tvar object = arguments[i],\n\t\t\t\t\t\tuuid = object.uuid,\n\t\t\t\t\t\tindex = indicesByUUID[uuid];\n\n\t\t\t\tif (index !== undefined) {\n\t\t\t\t\tdelete indicesByUUID[uuid];\n\n\t\t\t\t\tif (index < nCachedObjects) {\n\t\t\t\t\t\t// object is cached, shrink the CACHED region\n\t\t\t\t\t\tvar firstActiveIndex = --nCachedObjects,\n\t\t\t\t\t\t\t\tlastCachedObject = objects[firstActiveIndex],\n\t\t\t\t\t\t\t\tlastIndex = --nObjects,\n\t\t\t\t\t\t\t\tlastObject = objects[lastIndex]; // last cached object takes this object's place\n\n\t\t\t\t\t\tindicesByUUID[lastCachedObject.uuid] = index;\n\t\t\t\t\t\tobjects[index] = lastCachedObject; // last object goes to the activated slot and pop\n\n\t\t\t\t\t\tindicesByUUID[lastObject.uuid] = firstActiveIndex;\n\t\t\t\t\t\tobjects[firstActiveIndex] = lastObject;\n\t\t\t\t\t\tobjects.pop(); // accounting is done, now do the same for all bindings\n\n\t\t\t\t\t\tfor (var j = 0, m = nBindings; j !== m; ++j) {\n\t\t\t\t\t\t\tvar bindingsForPath = bindings[j],\n\t\t\t\t\t\t\t\t\tlastCached = bindingsForPath[firstActiveIndex],\n\t\t\t\t\t\t\t\t\tlast = bindingsForPath[lastIndex];\n\t\t\t\t\t\t\tbindingsForPath[index] = lastCached;\n\t\t\t\t\t\t\tbindingsForPath[firstActiveIndex] = last;\n\t\t\t\t\t\t\tbindingsForPath.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// object is active, just swap with the last and pop\n\t\t\t\t\t\tvar _lastIndex = --nObjects,\n\t\t\t\t\t\t\t\t_lastObject = objects[_lastIndex];\n\n\t\t\t\t\t\tif (_lastIndex > 0) {\n\t\t\t\t\t\t\tindicesByUUID[_lastObject.uuid] = index;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tobjects[index] = _lastObject;\n\t\t\t\t\t\tobjects.pop(); // accounting is done, now do the same for all bindings\n\n\t\t\t\t\t\tfor (var _j2 = 0, _m2 = nBindings; _j2 !== _m2; ++_j2) {\n\t\t\t\t\t\t\tvar _bindingsForPath = bindings[_j2];\n\t\t\t\t\t\t\t_bindingsForPath[index] = _bindingsForPath[_lastIndex];\n\n\t\t\t\t\t\t\t_bindingsForPath.pop();\n\t\t\t\t\t\t}\n\t\t\t\t\t} // cached or active\n\n\t\t\t\t} // if object is known\n\n\t\t\t} // for arguments\n\n\n\t\t\tthis.nCachedObjects_ = nCachedObjects;\n\t\t},\n\t\t// Internal interface used by befriended PropertyBinding.Composite:\n\t\tsubscribe_: function subscribe_(path, parsedPath) {\n\t\t\t// returns an array of bindings for the given path that is changed\n\t\t\t// according to the contained objects in the group\n\t\t\tvar indicesByPath = this._bindingsIndicesByPath;\n\t\t\tvar index = indicesByPath[path];\n\t\t\tvar bindings = this._bindings;\n\t\t\tif (index !== undefined) return bindings[index];\n\t\t\tvar paths = this._paths,\n\t\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\t\tobjects = this._objects,\n\t\t\t\t\tnObjects = objects.length,\n\t\t\t\t\tnCachedObjects = this.nCachedObjects_,\n\t\t\t\t\tbindingsForPath = new Array(nObjects);\n\t\t\tindex = bindings.length;\n\t\t\tindicesByPath[path] = index;\n\t\t\tpaths.push(path);\n\t\t\tparsedPaths.push(parsedPath);\n\t\t\tbindings.push(bindingsForPath);\n\n\t\t\tfor (var i = nCachedObjects, n = objects.length; i !== n; ++i) {\n\t\t\t\tvar object = objects[i];\n\t\t\t\tbindingsForPath[i] = new PropertyBinding(object, path, parsedPath);\n\t\t\t}\n\n\t\t\treturn bindingsForPath;\n\t\t},\n\t\tunsubscribe_: function unsubscribe_(path) {\n\t\t\t// tells the group to forget about a property path and no longer\n\t\t\t// update the array previously obtained with 'subscribe_'\n\t\t\tvar indicesByPath = this._bindingsIndicesByPath,\n\t\t\t\t\tindex = indicesByPath[path];\n\n\t\t\tif (index !== undefined) {\n\t\t\t\tvar paths = this._paths,\n\t\t\t\t\t\tparsedPaths = this._parsedPaths,\n\t\t\t\t\t\tbindings = this._bindings,\n\t\t\t\t\t\tlastBindingsIndex = bindings.length - 1,\n\t\t\t\t\t\tlastBindings = bindings[lastBindingsIndex],\n\t\t\t\t\t\tlastBindingsPath = path[lastBindingsIndex];\n\t\t\t\tindicesByPath[lastBindingsPath] = index;\n\t\t\t\tbindings[index] = lastBindings;\n\t\t\t\tbindings.pop();\n\t\t\t\tparsedPaths[index] = parsedPaths[lastBindingsIndex];\n\t\t\t\tparsedPaths.pop();\n\t\t\t\tpaths[index] = paths[lastBindingsIndex];\n\t\t\t\tpaths.pop();\n\t\t\t}\n\t\t}\n\t});\n\n\tvar AnimationAction = /*#__PURE__*/function () {\n\t\tfunction AnimationAction(mixer, clip, localRoot, blendMode) {\n\t\t\tif (localRoot === void 0) {\n\t\t\t\tlocalRoot = null;\n\t\t\t}\n\n\t\t\tif (blendMode === void 0) {\n\t\t\t\tblendMode = clip.blendMode;\n\t\t\t}\n\n\t\t\tthis._mixer = mixer;\n\t\t\tthis._clip = clip;\n\t\t\tthis._localRoot = localRoot;\n\t\t\tthis.blendMode = blendMode;\n\t\t\tvar tracks = clip.tracks,\n\t\t\t\t\tnTracks = tracks.length,\n\t\t\t\t\tinterpolants = new Array(nTracks);\n\t\t\tvar interpolantSettings = {\n\t\t\t\tendingStart: ZeroCurvatureEnding,\n\t\t\t\tendingEnd: ZeroCurvatureEnding\n\t\t\t};\n\n\t\t\tfor (var i = 0; i !== nTracks; ++i) {\n\t\t\t\tvar interpolant = tracks[i].createInterpolant(null);\n\t\t\t\tinterpolants[i] = interpolant;\n\t\t\t\tinterpolant.settings = interpolantSettings;\n\t\t\t}\n\n\t\t\tthis._interpolantSettings = interpolantSettings;\n\t\t\tthis._interpolants = interpolants; // bound by the mixer\n\t\t\t// inside: PropertyMixer (managed by the mixer)\n\n\t\t\tthis._propertyBindings = new Array(nTracks);\n\t\t\tthis._cacheIndex = null; // for the memory manager\n\n\t\t\tthis._byClipCacheIndex = null; // for the memory manager\n\n\t\t\tthis._timeScaleInterpolant = null;\n\t\t\tthis._weightInterpolant = null;\n\t\t\tthis.loop = LoopRepeat;\n\t\t\tthis._loopCount = -1; // global mixer time when the action is to be started\n\t\t\t// it's set back to 'null' upon start of the action\n\n\t\t\tthis._startTime = null; // scaled local time of the action\n\t\t\t// gets clamped or wrapped to 0..clip.duration according to loop\n\n\t\t\tthis.time = 0;\n\t\t\tthis.timeScale = 1;\n\t\t\tthis._effectiveTimeScale = 1;\n\t\t\tthis.weight = 1;\n\t\t\tthis._effectiveWeight = 1;\n\t\t\tthis.repetitions = Infinity; // no. of repetitions when looping\n\n\t\t\tthis.paused = false; // true -> zero effective time scale\n\n\t\t\tthis.enabled = true; // false -> zero effective weight\n\n\t\t\tthis.clampWhenFinished = false; // keep feeding the last frame?\n\n\t\t\tthis.zeroSlopeAtStart = true; // for smooth interpolation w/o separate\n\n\t\t\tthis.zeroSlopeAtEnd = true; // clips for start, loop and end\n\t\t} // State & Scheduling\n\n\n\t\tvar _proto = AnimationAction.prototype;\n\n\t\t_proto.play = function play() {\n\t\t\tthis._mixer._activateAction(this);\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.stop = function stop() {\n\t\t\tthis._mixer._deactivateAction(this);\n\n\t\t\treturn this.reset();\n\t\t};\n\n\t\t_proto.reset = function reset() {\n\t\t\tthis.paused = false;\n\t\t\tthis.enabled = true;\n\t\t\tthis.time = 0; // restart clip\n\n\t\t\tthis._loopCount = -1; // forget previous loops\n\n\t\t\tthis._startTime = null; // forget scheduling\n\n\t\t\treturn this.stopFading().stopWarping();\n\t\t};\n\n\t\t_proto.isRunning = function isRunning() {\n\t\t\treturn this.enabled && !this.paused && this.timeScale !== 0 && this._startTime === null && this._mixer._isActiveAction(this);\n\t\t} // return true when play has been called\n\t\t;\n\n\t\t_proto.isScheduled = function isScheduled() {\n\t\t\treturn this._mixer._isActiveAction(this);\n\t\t};\n\n\t\t_proto.startAt = function startAt(time) {\n\t\t\tthis._startTime = time;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setLoop = function setLoop(mode, repetitions) {\n\t\t\tthis.loop = mode;\n\t\t\tthis.repetitions = repetitions;\n\t\t\treturn this;\n\t\t} // Weight\n\t\t// set the weight stopping any scheduled fading\n\t\t// although .enabled = false yields an effective weight of zero, this\n\t\t// method does *not* change .enabled, because it would be confusing\n\t\t;\n\n\t\t_proto.setEffectiveWeight = function setEffectiveWeight(weight) {\n\t\t\tthis.weight = weight; // note: same logic as when updated at runtime\n\n\t\t\tthis._effectiveWeight = this.enabled ? weight : 0;\n\t\t\treturn this.stopFading();\n\t\t} // return the weight considering fading and .enabled\n\t\t;\n\n\t\t_proto.getEffectiveWeight = function getEffectiveWeight() {\n\t\t\treturn this._effectiveWeight;\n\t\t};\n\n\t\t_proto.fadeIn = function fadeIn(duration) {\n\t\t\treturn this._scheduleFading(duration, 0, 1);\n\t\t};\n\n\t\t_proto.fadeOut = function fadeOut(duration) {\n\t\t\treturn this._scheduleFading(duration, 1, 0);\n\t\t};\n\n\t\t_proto.crossFadeFrom = function crossFadeFrom(fadeOutAction, duration, warp) {\n\t\t\tfadeOutAction.fadeOut(duration);\n\t\t\tthis.fadeIn(duration);\n\n\t\t\tif (warp) {\n\t\t\t\tvar fadeInDuration = this._clip.duration,\n\t\t\t\t\t\tfadeOutDuration = fadeOutAction._clip.duration,\n\t\t\t\t\t\tstartEndRatio = fadeOutDuration / fadeInDuration,\n\t\t\t\t\t\tendStartRatio = fadeInDuration / fadeOutDuration;\n\t\t\t\tfadeOutAction.warp(1.0, startEndRatio, duration);\n\t\t\t\tthis.warp(endStartRatio, 1.0, duration);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.crossFadeTo = function crossFadeTo(fadeInAction, duration, warp) {\n\t\t\treturn fadeInAction.crossFadeFrom(this, duration, warp);\n\t\t};\n\n\t\t_proto.stopFading = function stopFading() {\n\t\t\tvar weightInterpolant = this._weightInterpolant;\n\n\t\t\tif (weightInterpolant !== null) {\n\t\t\t\tthis._weightInterpolant = null;\n\n\t\t\t\tthis._mixer._takeBackControlInterpolant(weightInterpolant);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t} // Time Scale Control\n\t\t// set the time scale stopping any scheduled warping\n\t\t// although .paused = true yields an effective time scale of zero, this\n\t\t// method does *not* change .paused, because it would be confusing\n\t\t;\n\n\t\t_proto.setEffectiveTimeScale = function setEffectiveTimeScale(timeScale) {\n\t\t\tthis.timeScale = timeScale;\n\t\t\tthis._effectiveTimeScale = this.paused ? 0 : timeScale;\n\t\t\treturn this.stopWarping();\n\t\t} // return the time scale considering warping and .paused\n\t\t;\n\n\t\t_proto.getEffectiveTimeScale = function getEffectiveTimeScale() {\n\t\t\treturn this._effectiveTimeScale;\n\t\t};\n\n\t\t_proto.setDuration = function setDuration(duration) {\n\t\t\tthis.timeScale = this._clip.duration / duration;\n\t\t\treturn this.stopWarping();\n\t\t};\n\n\t\t_proto.syncWith = function syncWith(action) {\n\t\t\tthis.time = action.time;\n\t\t\tthis.timeScale = action.timeScale;\n\t\t\treturn this.stopWarping();\n\t\t};\n\n\t\t_proto.halt = function halt(duration) {\n\t\t\treturn this.warp(this._effectiveTimeScale, 0, duration);\n\t\t};\n\n\t\t_proto.warp = function warp(startTimeScale, endTimeScale, duration) {\n\t\t\tvar mixer = this._mixer,\n\t\t\t\t\tnow = mixer.time,\n\t\t\t\t\ttimeScale = this.timeScale;\n\t\t\tvar interpolant = this._timeScaleInterpolant;\n\n\t\t\tif (interpolant === null) {\n\t\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\t\tthis._timeScaleInterpolant = interpolant;\n\t\t\t}\n\n\t\t\tvar times = interpolant.parameterPositions,\n\t\t\t\t\tvalues = interpolant.sampleValues;\n\t\t\ttimes[0] = now;\n\t\t\ttimes[1] = now + duration;\n\t\t\tvalues[0] = startTimeScale / timeScale;\n\t\t\tvalues[1] = endTimeScale / timeScale;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.stopWarping = function stopWarping() {\n\t\t\tvar timeScaleInterpolant = this._timeScaleInterpolant;\n\n\t\t\tif (timeScaleInterpolant !== null) {\n\t\t\t\tthis._timeScaleInterpolant = null;\n\n\t\t\t\tthis._mixer._takeBackControlInterpolant(timeScaleInterpolant);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t} // Object Accessors\n\t\t;\n\n\t\t_proto.getMixer = function getMixer() {\n\t\t\treturn this._mixer;\n\t\t};\n\n\t\t_proto.getClip = function getClip() {\n\t\t\treturn this._clip;\n\t\t};\n\n\t\t_proto.getRoot = function getRoot() {\n\t\t\treturn this._localRoot || this._mixer._root;\n\t\t} // Interna\n\t\t;\n\n\t\t_proto._update = function _update(time, deltaTime, timeDirection, accuIndex) {\n\t\t\t// called by the mixer\n\t\t\tif (!this.enabled) {\n\t\t\t\t// call ._updateWeight() to update ._effectiveWeight\n\t\t\t\tthis._updateWeight(time);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar startTime = this._startTime;\n\n\t\t\tif (startTime !== null) {\n\t\t\t\t// check for scheduled start of action\n\t\t\t\tvar timeRunning = (time - startTime) * timeDirection;\n\n\t\t\t\tif (timeRunning < 0 || timeDirection === 0) {\n\t\t\t\t\treturn; // yet to come / don't decide when delta = 0\n\t\t\t\t} // start\n\n\n\t\t\t\tthis._startTime = null; // unschedule\n\n\t\t\t\tdeltaTime = timeDirection * timeRunning;\n\t\t\t} // apply time scale and advance time\n\n\n\t\t\tdeltaTime *= this._updateTimeScale(time);\n\n\t\t\tvar clipTime = this._updateTime(deltaTime); // note: _updateTime may disable the action resulting in\n\t\t\t// an effective weight of 0\n\n\n\t\t\tvar weight = this._updateWeight(time);\n\n\t\t\tif (weight > 0) {\n\t\t\t\tvar _interpolants = this._interpolants;\n\t\t\t\tvar propertyMixers = this._propertyBindings;\n\n\t\t\t\tswitch (this.blendMode) {\n\t\t\t\t\tcase AdditiveAnimationBlendMode:\n\t\t\t\t\t\tfor (var j = 0, m = _interpolants.length; j !== m; ++j) {\n\t\t\t\t\t\t\t_interpolants[j].evaluate(clipTime);\n\n\t\t\t\t\t\t\tpropertyMixers[j].accumulateAdditive(weight);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase NormalAnimationBlendMode:\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tfor (var _j = 0, _m = _interpolants.length; _j !== _m; ++_j) {\n\t\t\t\t\t\t\t_interpolants[_j].evaluate(clipTime);\n\n\t\t\t\t\t\t\tpropertyMixers[_j].accumulate(accuIndex, weight);\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t_proto._updateWeight = function _updateWeight(time) {\n\t\t\tvar weight = 0;\n\n\t\t\tif (this.enabled) {\n\t\t\t\tweight = this.weight;\n\t\t\t\tvar interpolant = this._weightInterpolant;\n\n\t\t\t\tif (interpolant !== null) {\n\t\t\t\t\tvar interpolantValue = interpolant.evaluate(time)[0];\n\t\t\t\t\tweight *= interpolantValue;\n\n\t\t\t\t\tif (time > interpolant.parameterPositions[1]) {\n\t\t\t\t\t\tthis.stopFading();\n\n\t\t\t\t\t\tif (interpolantValue === 0) {\n\t\t\t\t\t\t\t// faded out, disable\n\t\t\t\t\t\t\tthis.enabled = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._effectiveWeight = weight;\n\t\t\treturn weight;\n\t\t};\n\n\t\t_proto._updateTimeScale = function _updateTimeScale(time) {\n\t\t\tvar timeScale = 0;\n\n\t\t\tif (!this.paused) {\n\t\t\t\ttimeScale = this.timeScale;\n\t\t\t\tvar interpolant = this._timeScaleInterpolant;\n\n\t\t\t\tif (interpolant !== null) {\n\t\t\t\t\tvar interpolantValue = interpolant.evaluate(time)[0];\n\t\t\t\t\ttimeScale *= interpolantValue;\n\n\t\t\t\t\tif (time > interpolant.parameterPositions[1]) {\n\t\t\t\t\t\tthis.stopWarping();\n\n\t\t\t\t\t\tif (timeScale === 0) {\n\t\t\t\t\t\t\t// motion has halted, pause\n\t\t\t\t\t\t\tthis.paused = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// warp done - apply final time scale\n\t\t\t\t\t\t\tthis.timeScale = timeScale;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._effectiveTimeScale = timeScale;\n\t\t\treturn timeScale;\n\t\t};\n\n\t\t_proto._updateTime = function _updateTime(deltaTime) {\n\t\t\tvar duration = this._clip.duration;\n\t\t\tvar loop = this.loop;\n\t\t\tvar time = this.time + deltaTime;\n\t\t\tvar loopCount = this._loopCount;\n\t\t\tvar pingPong = loop === LoopPingPong;\n\n\t\t\tif (deltaTime === 0) {\n\t\t\t\tif (loopCount === -1) return time;\n\t\t\t\treturn pingPong && (loopCount & 1) === 1 ? duration - time : time;\n\t\t\t}\n\n\t\t\tif (loop === LoopOnce) {\n\t\t\t\tif (loopCount === -1) {\n\t\t\t\t\t// just started\n\t\t\t\t\tthis._loopCount = 0;\n\n\t\t\t\t\tthis._setEndings(true, true, false);\n\t\t\t\t}\n\n\t\t\t\thandle_stop: {\n\t\t\t\t\tif (time >= duration) {\n\t\t\t\t\t\ttime = duration;\n\t\t\t\t\t} else if (time < 0) {\n\t\t\t\t\t\ttime = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.time = time;\n\t\t\t\t\t\tbreak handle_stop;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (this.clampWhenFinished) this.paused = true;else this.enabled = false;\n\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\tthis._mixer.dispatchEvent({\n\t\t\t\t\t\ttype: 'finished',\n\t\t\t\t\t\taction: this,\n\t\t\t\t\t\tdirection: deltaTime < 0 ? -1 : 1\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// repetitive Repeat or PingPong\n\t\t\t\tif (loopCount === -1) {\n\t\t\t\t\t// just started\n\t\t\t\t\tif (deltaTime >= 0) {\n\t\t\t\t\t\tloopCount = 0;\n\n\t\t\t\t\t\tthis._setEndings(true, this.repetitions === 0, pingPong);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// when looping in reverse direction, the initial\n\t\t\t\t\t\t// transition through zero counts as a repetition,\n\t\t\t\t\t\t// so leave loopCount at -1\n\t\t\t\t\t\tthis._setEndings(this.repetitions === 0, true, pingPong);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (time >= duration || time < 0) {\n\t\t\t\t\t// wrap around\n\t\t\t\t\tvar loopDelta = Math.floor(time / duration); // signed\n\n\t\t\t\t\ttime -= duration * loopDelta;\n\t\t\t\t\tloopCount += Math.abs(loopDelta);\n\t\t\t\t\tvar pending = this.repetitions - loopCount;\n\n\t\t\t\t\tif (pending <= 0) {\n\t\t\t\t\t\t// have to stop (switch state, clamp time, fire event)\n\t\t\t\t\t\tif (this.clampWhenFinished) this.paused = true;else this.enabled = false;\n\t\t\t\t\t\ttime = deltaTime > 0 ? duration : 0;\n\t\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\t\tthis._mixer.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'finished',\n\t\t\t\t\t\t\taction: this,\n\t\t\t\t\t\t\tdirection: deltaTime > 0 ? 1 : -1\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// keep running\n\t\t\t\t\t\tif (pending === 1) {\n\t\t\t\t\t\t\t// entering the last round\n\t\t\t\t\t\t\tvar atStart = deltaTime < 0;\n\n\t\t\t\t\t\t\tthis._setEndings(atStart, !atStart, pingPong);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis._setEndings(false, false, pingPong);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis._loopCount = loopCount;\n\t\t\t\t\t\tthis.time = time;\n\n\t\t\t\t\t\tthis._mixer.dispatchEvent({\n\t\t\t\t\t\t\ttype: 'loop',\n\t\t\t\t\t\t\taction: this,\n\t\t\t\t\t\t\tloopDelta: loopDelta\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.time = time;\n\t\t\t\t}\n\n\t\t\t\tif (pingPong && (loopCount & 1) === 1) {\n\t\t\t\t\t// invert time for the \"pong round\"\n\t\t\t\t\treturn duration - time;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn time;\n\t\t};\n\n\t\t_proto._setEndings = function _setEndings(atStart, atEnd, pingPong) {\n\t\t\tvar settings = this._interpolantSettings;\n\n\t\t\tif (pingPong) {\n\t\t\t\tsettings.endingStart = ZeroSlopeEnding;\n\t\t\t\tsettings.endingEnd = ZeroSlopeEnding;\n\t\t\t} else {\n\t\t\t\t// assuming for LoopOnce atStart == atEnd == true\n\t\t\t\tif (atStart) {\n\t\t\t\t\tsettings.endingStart = this.zeroSlopeAtStart ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\t\t\t\t} else {\n\t\t\t\t\tsettings.endingStart = WrapAroundEnding;\n\t\t\t\t}\n\n\t\t\t\tif (atEnd) {\n\t\t\t\t\tsettings.endingEnd = this.zeroSlopeAtEnd ? ZeroSlopeEnding : ZeroCurvatureEnding;\n\t\t\t\t} else {\n\t\t\t\t\tsettings.endingEnd = WrapAroundEnding;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t_proto._scheduleFading = function _scheduleFading(duration, weightNow, weightThen) {\n\t\t\tvar mixer = this._mixer,\n\t\t\t\t\tnow = mixer.time;\n\t\t\tvar interpolant = this._weightInterpolant;\n\n\t\t\tif (interpolant === null) {\n\t\t\t\tinterpolant = mixer._lendControlInterpolant();\n\t\t\t\tthis._weightInterpolant = interpolant;\n\t\t\t}\n\n\t\t\tvar times = interpolant.parameterPositions,\n\t\t\t\t\tvalues = interpolant.sampleValues;\n\t\t\ttimes[0] = now;\n\t\t\tvalues[0] = weightNow;\n\t\t\ttimes[1] = now + duration;\n\t\t\tvalues[1] = weightThen;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn AnimationAction;\n\t}();\n\n\tfunction AnimationMixer(root) {\n\t\tthis._root = root;\n\n\t\tthis._initMemoryManager();\n\n\t\tthis._accuIndex = 0;\n\t\tthis.time = 0;\n\t\tthis.timeScale = 1.0;\n\t}\n\n\tAnimationMixer.prototype = Object.assign(Object.create(EventDispatcher.prototype), {\n\t\tconstructor: AnimationMixer,\n\t\t_bindAction: function _bindAction(action, prototypeAction) {\n\t\t\tvar root = action._localRoot || this._root,\n\t\t\t\t\ttracks = action._clip.tracks,\n\t\t\t\t\tnTracks = tracks.length,\n\t\t\t\t\tbindings = action._propertyBindings,\n\t\t\t\t\tinterpolants = action._interpolants,\n\t\t\t\t\trootUuid = root.uuid,\n\t\t\t\t\tbindingsByRoot = this._bindingsByRootAndName;\n\t\t\tvar bindingsByName = bindingsByRoot[rootUuid];\n\n\t\t\tif (bindingsByName === undefined) {\n\t\t\t\tbindingsByName = {};\n\t\t\t\tbindingsByRoot[rootUuid] = bindingsByName;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i !== nTracks; ++i) {\n\t\t\t\tvar track = tracks[i],\n\t\t\t\t\t\ttrackName = track.name;\n\t\t\t\tvar binding = bindingsByName[trackName];\n\n\t\t\t\tif (binding !== undefined) {\n\t\t\t\t\tbindings[i] = binding;\n\t\t\t\t} else {\n\t\t\t\t\tbinding = bindings[i];\n\n\t\t\t\t\tif (binding !== undefined) {\n\t\t\t\t\t\t// existing binding, make sure the cache knows\n\t\t\t\t\t\tif (binding._cacheIndex === null) {\n\t\t\t\t\t\t\t++binding.referenceCount;\n\n\t\t\t\t\t\t\tthis._addInactiveBinding(binding, rootUuid, trackName);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar path = prototypeAction && prototypeAction._propertyBindings[i].binding.parsedPath;\n\t\t\t\t\tbinding = new PropertyMixer(PropertyBinding.create(root, trackName, path), track.ValueTypeName, track.getValueSize());\n\t\t\t\t\t++binding.referenceCount;\n\n\t\t\t\t\tthis._addInactiveBinding(binding, rootUuid, trackName);\n\n\t\t\t\t\tbindings[i] = binding;\n\t\t\t\t}\n\n\t\t\t\tinterpolants[i].resultBuffer = binding.buffer;\n\t\t\t}\n\t\t},\n\t\t_activateAction: function _activateAction(action) {\n\t\t\tif (!this._isActiveAction(action)) {\n\t\t\t\tif (action._cacheIndex === null) {\n\t\t\t\t\t// this action has been forgotten by the cache, but the user\n\t\t\t\t\t// appears to be still using it -> rebind\n\t\t\t\t\tvar rootUuid = (action._localRoot || this._root).uuid,\n\t\t\t\t\t\t\tclipUuid = action._clip.uuid,\n\t\t\t\t\t\t\tactionsForClip = this._actionsByClip[clipUuid];\n\n\t\t\t\t\tthis._bindAction(action, actionsForClip && actionsForClip.knownActions[0]);\n\n\t\t\t\t\tthis._addInactiveAction(action, clipUuid, rootUuid);\n\t\t\t\t}\n\n\t\t\t\tvar bindings = action._propertyBindings; // increment reference counts / sort out state\n\n\t\t\t\tfor (var i = 0, n = bindings.length; i !== n; ++i) {\n\t\t\t\t\tvar binding = bindings[i];\n\n\t\t\t\t\tif (binding.useCount++ === 0) {\n\t\t\t\t\t\tthis._lendBinding(binding);\n\n\t\t\t\t\t\tbinding.saveOriginalState();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._lendAction(action);\n\t\t\t}\n\t\t},\n\t\t_deactivateAction: function _deactivateAction(action) {\n\t\t\tif (this._isActiveAction(action)) {\n\t\t\t\tvar bindings = action._propertyBindings; // decrement reference counts / sort out state\n\n\t\t\t\tfor (var i = 0, n = bindings.length; i !== n; ++i) {\n\t\t\t\t\tvar binding = bindings[i];\n\n\t\t\t\t\tif (--binding.useCount === 0) {\n\t\t\t\t\t\tbinding.restoreOriginalState();\n\n\t\t\t\t\t\tthis._takeBackBinding(binding);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._takeBackAction(action);\n\t\t\t}\n\t\t},\n\t\t// Memory manager\n\t\t_initMemoryManager: function _initMemoryManager() {\n\t\t\tthis._actions = []; // 'nActiveActions' followed by inactive ones\n\n\t\t\tthis._nActiveActions = 0;\n\t\t\tthis._actionsByClip = {}; // inside:\n\t\t\t// {\n\t\t\t// \tknownActions: Array< AnimationAction > - used as prototypes\n\t\t\t// \tactionByRoot: AnimationAction - lookup\n\t\t\t// }\n\n\t\t\tthis._bindings = []; // 'nActiveBindings' followed by inactive ones\n\n\t\t\tthis._nActiveBindings = 0;\n\t\t\tthis._bindingsByRootAndName = {}; // inside: Map< name, PropertyMixer >\n\n\t\t\tthis._controlInterpolants = []; // same game as above\n\n\t\t\tthis._nActiveControlInterpolants = 0;\n\t\t\tvar scope = this;\n\t\t\tthis.stats = {\n\t\t\t\tactions: {\n\t\t\t\t\tget total() {\n\t\t\t\t\t\treturn scope._actions.length;\n\t\t\t\t\t},\n\n\t\t\t\t\tget inUse() {\n\t\t\t\t\t\treturn scope._nActiveActions;\n\t\t\t\t\t}\n\n\t\t\t\t},\n\t\t\t\tbindings: {\n\t\t\t\t\tget total() {\n\t\t\t\t\t\treturn scope._bindings.length;\n\t\t\t\t\t},\n\n\t\t\t\t\tget inUse() {\n\t\t\t\t\t\treturn scope._nActiveBindings;\n\t\t\t\t\t}\n\n\t\t\t\t},\n\t\t\t\tcontrolInterpolants: {\n\t\t\t\t\tget total() {\n\t\t\t\t\t\treturn scope._controlInterpolants.length;\n\t\t\t\t\t},\n\n\t\t\t\t\tget inUse() {\n\t\t\t\t\t\treturn scope._nActiveControlInterpolants;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\t// Memory management for AnimationAction objects\n\t\t_isActiveAction: function _isActiveAction(action) {\n\t\t\tvar index = action._cacheIndex;\n\t\t\treturn index !== null && index < this._nActiveActions;\n\t\t},\n\t\t_addInactiveAction: function _addInactiveAction(action, clipUuid, rootUuid) {\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tactionsByClip = this._actionsByClip;\n\t\t\tvar actionsForClip = actionsByClip[clipUuid];\n\n\t\t\tif (actionsForClip === undefined) {\n\t\t\t\tactionsForClip = {\n\t\t\t\t\tknownActions: [action],\n\t\t\t\t\tactionByRoot: {}\n\t\t\t\t};\n\t\t\t\taction._byClipCacheIndex = 0;\n\t\t\t\tactionsByClip[clipUuid] = actionsForClip;\n\t\t\t} else {\n\t\t\t\tvar knownActions = actionsForClip.knownActions;\n\t\t\t\taction._byClipCacheIndex = knownActions.length;\n\t\t\t\tknownActions.push(action);\n\t\t\t}\n\n\t\t\taction._cacheIndex = actions.length;\n\t\t\tactions.push(action);\n\t\t\tactionsForClip.actionByRoot[rootUuid] = action;\n\t\t},\n\t\t_removeInactiveAction: function _removeInactiveAction(action) {\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tlastInactiveAction = actions[actions.length - 1],\n\t\t\t\t\tcacheIndex = action._cacheIndex;\n\t\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\t\tactions[cacheIndex] = lastInactiveAction;\n\t\t\tactions.pop();\n\t\t\taction._cacheIndex = null;\n\t\t\tvar clipUuid = action._clip.uuid,\n\t\t\t\t\tactionsByClip = this._actionsByClip,\n\t\t\t\t\tactionsForClip = actionsByClip[clipUuid],\n\t\t\t\t\tknownActionsForClip = actionsForClip.knownActions,\n\t\t\t\t\tlastKnownAction = knownActionsForClip[knownActionsForClip.length - 1],\n\t\t\t\t\tbyClipCacheIndex = action._byClipCacheIndex;\n\t\t\tlastKnownAction._byClipCacheIndex = byClipCacheIndex;\n\t\t\tknownActionsForClip[byClipCacheIndex] = lastKnownAction;\n\t\t\tknownActionsForClip.pop();\n\t\t\taction._byClipCacheIndex = null;\n\t\t\tvar actionByRoot = actionsForClip.actionByRoot,\n\t\t\t\t\trootUuid = (action._localRoot || this._root).uuid;\n\t\t\tdelete actionByRoot[rootUuid];\n\n\t\t\tif (knownActionsForClip.length === 0) {\n\t\t\t\tdelete actionsByClip[clipUuid];\n\t\t\t}\n\n\t\t\tthis._removeInactiveBindingsForAction(action);\n\t\t},\n\t\t_removeInactiveBindingsForAction: function _removeInactiveBindingsForAction(action) {\n\t\t\tvar bindings = action._propertyBindings;\n\n\t\t\tfor (var i = 0, n = bindings.length; i !== n; ++i) {\n\t\t\t\tvar binding = bindings[i];\n\n\t\t\t\tif (--binding.referenceCount === 0) {\n\t\t\t\t\tthis._removeInactiveBinding(binding);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t_lendAction: function _lendAction(action) {\n\t\t\t// [ active actions |\tinactive actions\t]\n\t\t\t// [\tactive actions >| inactive actions ]\n\t\t\t//\t\t\t\t\t\t\t\t s\t\t\t\ta\n\t\t\t//\t\t\t\t\t\t\t\t\t<-swap->\n\t\t\t//\t\t\t\t\t\t\t\t a\t\t\t\ts\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tprevIndex = action._cacheIndex,\n\t\t\t\t\tlastActiveIndex = this._nActiveActions++,\n\t\t\t\t\tfirstInactiveAction = actions[lastActiveIndex];\n\t\t\taction._cacheIndex = lastActiveIndex;\n\t\t\tactions[lastActiveIndex] = action;\n\t\t\tfirstInactiveAction._cacheIndex = prevIndex;\n\t\t\tactions[prevIndex] = firstInactiveAction;\n\t\t},\n\t\t_takeBackAction: function _takeBackAction(action) {\n\t\t\t// [\tactive actions\t| inactive actions ]\n\t\t\t// [ active actions |< inactive actions\t]\n\t\t\t//\t\t\t\ta\t\t\t\ts\n\t\t\t//\t\t\t\t <-swap->\n\t\t\t//\t\t\t\ts\t\t\t\ta\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tprevIndex = action._cacheIndex,\n\t\t\t\t\tfirstInactiveIndex = --this._nActiveActions,\n\t\t\t\t\tlastActiveAction = actions[firstInactiveIndex];\n\t\t\taction._cacheIndex = firstInactiveIndex;\n\t\t\tactions[firstInactiveIndex] = action;\n\t\t\tlastActiveAction._cacheIndex = prevIndex;\n\t\t\tactions[prevIndex] = lastActiveAction;\n\t\t},\n\t\t// Memory management for PropertyMixer objects\n\t\t_addInactiveBinding: function _addInactiveBinding(binding, rootUuid, trackName) {\n\t\t\tvar bindingsByRoot = this._bindingsByRootAndName,\n\t\t\t\t\tbindings = this._bindings;\n\t\t\tvar bindingByName = bindingsByRoot[rootUuid];\n\n\t\t\tif (bindingByName === undefined) {\n\t\t\t\tbindingByName = {};\n\t\t\t\tbindingsByRoot[rootUuid] = bindingByName;\n\t\t\t}\n\n\t\t\tbindingByName[trackName] = binding;\n\t\t\tbinding._cacheIndex = bindings.length;\n\t\t\tbindings.push(binding);\n\t\t},\n\t\t_removeInactiveBinding: function _removeInactiveBinding(binding) {\n\t\t\tvar bindings = this._bindings,\n\t\t\t\t\tpropBinding = binding.binding,\n\t\t\t\t\trootUuid = propBinding.rootNode.uuid,\n\t\t\t\t\ttrackName = propBinding.path,\n\t\t\t\t\tbindingsByRoot = this._bindingsByRootAndName,\n\t\t\t\t\tbindingByName = bindingsByRoot[rootUuid],\n\t\t\t\t\tlastInactiveBinding = bindings[bindings.length - 1],\n\t\t\t\t\tcacheIndex = binding._cacheIndex;\n\t\t\tlastInactiveBinding._cacheIndex = cacheIndex;\n\t\t\tbindings[cacheIndex] = lastInactiveBinding;\n\t\t\tbindings.pop();\n\t\t\tdelete bindingByName[trackName];\n\n\t\t\tif (Object.keys(bindingByName).length === 0) {\n\t\t\t\tdelete bindingsByRoot[rootUuid];\n\t\t\t}\n\t\t},\n\t\t_lendBinding: function _lendBinding(binding) {\n\t\t\tvar bindings = this._bindings,\n\t\t\t\t\tprevIndex = binding._cacheIndex,\n\t\t\t\t\tlastActiveIndex = this._nActiveBindings++,\n\t\t\t\t\tfirstInactiveBinding = bindings[lastActiveIndex];\n\t\t\tbinding._cacheIndex = lastActiveIndex;\n\t\t\tbindings[lastActiveIndex] = binding;\n\t\t\tfirstInactiveBinding._cacheIndex = prevIndex;\n\t\t\tbindings[prevIndex] = firstInactiveBinding;\n\t\t},\n\t\t_takeBackBinding: function _takeBackBinding(binding) {\n\t\t\tvar bindings = this._bindings,\n\t\t\t\t\tprevIndex = binding._cacheIndex,\n\t\t\t\t\tfirstInactiveIndex = --this._nActiveBindings,\n\t\t\t\t\tlastActiveBinding = bindings[firstInactiveIndex];\n\t\t\tbinding._cacheIndex = firstInactiveIndex;\n\t\t\tbindings[firstInactiveIndex] = binding;\n\t\t\tlastActiveBinding._cacheIndex = prevIndex;\n\t\t\tbindings[prevIndex] = lastActiveBinding;\n\t\t},\n\t\t// Memory management of Interpolants for weight and time scale\n\t\t_lendControlInterpolant: function _lendControlInterpolant() {\n\t\t\tvar interpolants = this._controlInterpolants,\n\t\t\t\t\tlastActiveIndex = this._nActiveControlInterpolants++;\n\t\t\tvar interpolant = interpolants[lastActiveIndex];\n\n\t\t\tif (interpolant === undefined) {\n\t\t\t\tinterpolant = new LinearInterpolant(new Float32Array(2), new Float32Array(2), 1, this._controlInterpolantsResultBuffer);\n\t\t\t\tinterpolant.__cacheIndex = lastActiveIndex;\n\t\t\t\tinterpolants[lastActiveIndex] = interpolant;\n\t\t\t}\n\n\t\t\treturn interpolant;\n\t\t},\n\t\t_takeBackControlInterpolant: function _takeBackControlInterpolant(interpolant) {\n\t\t\tvar interpolants = this._controlInterpolants,\n\t\t\t\t\tprevIndex = interpolant.__cacheIndex,\n\t\t\t\t\tfirstInactiveIndex = --this._nActiveControlInterpolants,\n\t\t\t\t\tlastActiveInterpolant = interpolants[firstInactiveIndex];\n\t\t\tinterpolant.__cacheIndex = firstInactiveIndex;\n\t\t\tinterpolants[firstInactiveIndex] = interpolant;\n\t\t\tlastActiveInterpolant.__cacheIndex = prevIndex;\n\t\t\tinterpolants[prevIndex] = lastActiveInterpolant;\n\t\t},\n\t\t_controlInterpolantsResultBuffer: new Float32Array(1),\n\t\t// return an action for a clip optionally using a custom root target\n\t\t// object (this method allocates a lot of dynamic memory in case a\n\t\t// previously unknown clip/root combination is specified)\n\t\tclipAction: function clipAction(clip, optionalRoot, blendMode) {\n\t\t\tvar root = optionalRoot || this._root,\n\t\t\t\t\trootUuid = root.uuid;\n\t\t\tvar clipObject = typeof clip === 'string' ? AnimationClip.findByName(root, clip) : clip;\n\t\t\tvar clipUuid = clipObject !== null ? clipObject.uuid : clip;\n\t\t\tvar actionsForClip = this._actionsByClip[clipUuid];\n\t\t\tvar prototypeAction = null;\n\n\t\t\tif (blendMode === undefined) {\n\t\t\t\tif (clipObject !== null) {\n\t\t\t\t\tblendMode = clipObject.blendMode;\n\t\t\t\t} else {\n\t\t\t\t\tblendMode = NormalAnimationBlendMode;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (actionsForClip !== undefined) {\n\t\t\t\tvar existingAction = actionsForClip.actionByRoot[rootUuid];\n\n\t\t\t\tif (existingAction !== undefined && existingAction.blendMode === blendMode) {\n\t\t\t\t\treturn existingAction;\n\t\t\t\t} // we know the clip, so we don't have to parse all\n\t\t\t\t// the bindings again but can just copy\n\n\n\t\t\t\tprototypeAction = actionsForClip.knownActions[0]; // also, take the clip from the prototype action\n\n\t\t\t\tif (clipObject === null) clipObject = prototypeAction._clip;\n\t\t\t} // clip must be known when specified via string\n\n\n\t\t\tif (clipObject === null) return null; // allocate all resources required to run it\n\n\t\t\tvar newAction = new AnimationAction(this, clipObject, optionalRoot, blendMode);\n\n\t\t\tthis._bindAction(newAction, prototypeAction); // and make the action known to the memory manager\n\n\n\t\t\tthis._addInactiveAction(newAction, clipUuid, rootUuid);\n\n\t\t\treturn newAction;\n\t\t},\n\t\t// get an existing action\n\t\texistingAction: function existingAction(clip, optionalRoot) {\n\t\t\tvar root = optionalRoot || this._root,\n\t\t\t\t\trootUuid = root.uuid,\n\t\t\t\t\tclipObject = typeof clip === 'string' ? AnimationClip.findByName(root, clip) : clip,\n\t\t\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\t\t\t\t\tactionsForClip = this._actionsByClip[clipUuid];\n\n\t\t\tif (actionsForClip !== undefined) {\n\t\t\t\treturn actionsForClip.actionByRoot[rootUuid] || null;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t},\n\t\t// deactivates all previously scheduled actions\n\t\tstopAllAction: function stopAllAction() {\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tnActions = this._nActiveActions;\n\n\t\t\tfor (var i = nActions - 1; i >= 0; --i) {\n\t\t\t\tactions[i].stop();\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// advance the time and update apply the animation\n\t\tupdate: function update(deltaTime) {\n\t\t\tdeltaTime *= this.timeScale;\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tnActions = this._nActiveActions,\n\t\t\t\t\ttime = this.time += deltaTime,\n\t\t\t\t\ttimeDirection = Math.sign(deltaTime),\n\t\t\t\t\taccuIndex = this._accuIndex ^= 1; // run active actions\n\n\t\t\tfor (var i = 0; i !== nActions; ++i) {\n\t\t\t\tvar action = actions[i];\n\n\t\t\t\taction._update(time, deltaTime, timeDirection, accuIndex);\n\t\t\t} // update scene graph\n\n\n\t\t\tvar bindings = this._bindings,\n\t\t\t\t\tnBindings = this._nActiveBindings;\n\n\t\t\tfor (var _i = 0; _i !== nBindings; ++_i) {\n\t\t\t\tbindings[_i].apply(accuIndex);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\t\t// Allows you to seek to a specific time in an animation.\n\t\tsetTime: function setTime(timeInSeconds) {\n\t\t\tthis.time = 0; // Zero out time attribute for AnimationMixer object;\n\n\t\t\tfor (var i = 0; i < this._actions.length; i++) {\n\t\t\t\tthis._actions[i].time = 0; // Zero out time attribute for all associated AnimationAction objects.\n\t\t\t}\n\n\t\t\treturn this.update(timeInSeconds); // Update used to set exact time. Returns \"this\" AnimationMixer object.\n\t\t},\n\t\t// return this mixer's root target object\n\t\tgetRoot: function getRoot() {\n\t\t\treturn this._root;\n\t\t},\n\t\t// free all resources specific to a particular clip\n\t\tuncacheClip: function uncacheClip(clip) {\n\t\t\tvar actions = this._actions,\n\t\t\t\t\tclipUuid = clip.uuid,\n\t\t\t\t\tactionsByClip = this._actionsByClip,\n\t\t\t\t\tactionsForClip = actionsByClip[clipUuid];\n\n\t\t\tif (actionsForClip !== undefined) {\n\t\t\t\t// note: just calling _removeInactiveAction would mess up the\n\t\t\t\t// iteration state and also require updating the state we can\n\t\t\t\t// just throw away\n\t\t\t\tvar actionsToRemove = actionsForClip.knownActions;\n\n\t\t\t\tfor (var i = 0, n = actionsToRemove.length; i !== n; ++i) {\n\t\t\t\t\tvar action = actionsToRemove[i];\n\n\t\t\t\t\tthis._deactivateAction(action);\n\n\t\t\t\t\tvar cacheIndex = action._cacheIndex,\n\t\t\t\t\t\t\tlastInactiveAction = actions[actions.length - 1];\n\t\t\t\t\taction._cacheIndex = null;\n\t\t\t\t\taction._byClipCacheIndex = null;\n\t\t\t\t\tlastInactiveAction._cacheIndex = cacheIndex;\n\t\t\t\t\tactions[cacheIndex] = lastInactiveAction;\n\t\t\t\t\tactions.pop();\n\n\t\t\t\t\tthis._removeInactiveBindingsForAction(action);\n\t\t\t\t}\n\n\t\t\t\tdelete actionsByClip[clipUuid];\n\t\t\t}\n\t\t},\n\t\t// free all resources specific to a particular root target object\n\t\tuncacheRoot: function uncacheRoot(root) {\n\t\t\tvar rootUuid = root.uuid,\n\t\t\t\t\tactionsByClip = this._actionsByClip;\n\n\t\t\tfor (var clipUuid in actionsByClip) {\n\t\t\t\tvar actionByRoot = actionsByClip[clipUuid].actionByRoot,\n\t\t\t\t\t\taction = actionByRoot[rootUuid];\n\n\t\t\t\tif (action !== undefined) {\n\t\t\t\t\tthis._deactivateAction(action);\n\n\t\t\t\t\tthis._removeInactiveAction(action);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar bindingsByRoot = this._bindingsByRootAndName,\n\t\t\t\t\tbindingByName = bindingsByRoot[rootUuid];\n\n\t\t\tif (bindingByName !== undefined) {\n\t\t\t\tfor (var trackName in bindingByName) {\n\t\t\t\t\tvar binding = bindingByName[trackName];\n\t\t\t\t\tbinding.restoreOriginalState();\n\n\t\t\t\t\tthis._removeInactiveBinding(binding);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// remove a targeted clip from the cache\n\t\tuncacheAction: function uncacheAction(clip, optionalRoot) {\n\t\t\tvar action = this.existingAction(clip, optionalRoot);\n\n\t\t\tif (action !== null) {\n\t\t\t\tthis._deactivateAction(action);\n\n\t\t\t\tthis._removeInactiveAction(action);\n\t\t\t}\n\t\t}\n\t});\n\n\tvar Uniform = /*#__PURE__*/function () {\n\t\tfunction Uniform(value) {\n\t\t\tif (typeof value === 'string') {\n\t\t\t\tconsole.warn('THREE.Uniform: Type parameter is no longer needed.');\n\t\t\t\tvalue = arguments[1];\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t}\n\n\t\tvar _proto = Uniform.prototype;\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new Uniform(this.value.clone === undefined ? this.value : this.value.clone());\n\t\t};\n\n\t\treturn Uniform;\n\t}();\n\n\tfunction InstancedInterleavedBuffer(array, stride, meshPerAttribute) {\n\t\tInterleavedBuffer.call(this, array, stride);\n\t\tthis.meshPerAttribute = meshPerAttribute || 1;\n\t}\n\n\tInstancedInterleavedBuffer.prototype = Object.assign(Object.create(InterleavedBuffer.prototype), {\n\t\tconstructor: InstancedInterleavedBuffer,\n\t\tisInstancedInterleavedBuffer: true,\n\t\tcopy: function copy(source) {\n\t\t\tInterleavedBuffer.prototype.copy.call(this, source);\n\t\t\tthis.meshPerAttribute = source.meshPerAttribute;\n\t\t\treturn this;\n\t\t},\n\t\tclone: function clone(data) {\n\t\t\tvar ib = InterleavedBuffer.prototype.clone.call(this, data);\n\t\t\tib.meshPerAttribute = this.meshPerAttribute;\n\t\t\treturn ib;\n\t\t},\n\t\ttoJSON: function toJSON(data) {\n\t\t\tvar json = InterleavedBuffer.prototype.toJSON.call(this, data);\n\t\t\tjson.isInstancedInterleavedBuffer = true;\n\t\t\tjson.meshPerAttribute = this.meshPerAttribute;\n\t\t\treturn json;\n\t\t}\n\t});\n\n\tfunction GLBufferAttribute(buffer, type, itemSize, elementSize, count) {\n\t\tthis.buffer = buffer;\n\t\tthis.type = type;\n\t\tthis.itemSize = itemSize;\n\t\tthis.elementSize = elementSize;\n\t\tthis.count = count;\n\t\tthis.version = 0;\n\t}\n\n\tObject.defineProperty(GLBufferAttribute.prototype, 'needsUpdate', {\n\t\tset: function set(value) {\n\t\t\tif (value === true) this.version++;\n\t\t}\n\t});\n\tObject.assign(GLBufferAttribute.prototype, {\n\t\tisGLBufferAttribute: true,\n\t\tsetBuffer: function setBuffer(buffer) {\n\t\t\tthis.buffer = buffer;\n\t\t\treturn this;\n\t\t},\n\t\tsetType: function setType(type, elementSize) {\n\t\t\tthis.type = type;\n\t\t\tthis.elementSize = elementSize;\n\t\t\treturn this;\n\t\t},\n\t\tsetItemSize: function setItemSize(itemSize) {\n\t\t\tthis.itemSize = itemSize;\n\t\t\treturn this;\n\t\t},\n\t\tsetCount: function setCount(count) {\n\t\t\tthis.count = count;\n\t\t\treturn this;\n\t\t}\n\t});\n\n\tfunction Raycaster(origin, direction, near, far) {\n\t\tthis.ray = new Ray(origin, direction); // direction is assumed to be normalized (for accurate distance calculations)\n\n\t\tthis.near = near || 0;\n\t\tthis.far = far || Infinity;\n\t\tthis.camera = null;\n\t\tthis.layers = new Layers();\n\t\tthis.params = {\n\t\t\tMesh: {},\n\t\t\tLine: {\n\t\t\t\tthreshold: 1\n\t\t\t},\n\t\t\tLOD: {},\n\t\t\tPoints: {\n\t\t\t\tthreshold: 1\n\t\t\t},\n\t\t\tSprite: {}\n\t\t};\n\t\tObject.defineProperties(this.params, {\n\t\t\tPointCloud: {\n\t\t\t\tget: function get() {\n\t\t\t\t\tconsole.warn('THREE.Raycaster: params.PointCloud has been renamed to params.Points.');\n\t\t\t\t\treturn this.Points;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tfunction ascSort(a, b) {\n\t\treturn a.distance - b.distance;\n\t}\n\n\tfunction _intersectObject(object, raycaster, intersects, recursive) {\n\t\tif (object.layers.test(raycaster.layers)) {\n\t\t\tobject.raycast(raycaster, intersects);\n\t\t}\n\n\t\tif (recursive === true) {\n\t\t\tvar children = object.children;\n\n\t\t\tfor (var i = 0, l = children.length; i < l; i++) {\n\t\t\t\t_intersectObject(children[i], raycaster, intersects, true);\n\t\t\t}\n\t\t}\n\t}\n\n\tObject.assign(Raycaster.prototype, {\n\t\tset: function set(origin, direction) {\n\t\t\t// direction is assumed to be normalized (for accurate distance calculations)\n\t\t\tthis.ray.set(origin, direction);\n\t\t},\n\t\tsetFromCamera: function setFromCamera(coords, camera) {\n\t\t\tif (camera && camera.isPerspectiveCamera) {\n\t\t\t\tthis.ray.origin.setFromMatrixPosition(camera.matrixWorld);\n\t\t\t\tthis.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();\n\t\t\t\tthis.camera = camera;\n\t\t\t} else if (camera && camera.isOrthographicCamera) {\n\t\t\t\tthis.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera\n\n\t\t\t\tthis.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);\n\t\t\t\tthis.camera = camera;\n\t\t\t} else {\n\t\t\t\tconsole.error('THREE.Raycaster: Unsupported camera type: ' + camera.type);\n\t\t\t}\n\t\t},\n\t\tintersectObject: function intersectObject(object, recursive, optionalTarget) {\n\t\t\tvar intersects = optionalTarget || [];\n\n\t\t\t_intersectObject(object, this, intersects, recursive);\n\n\t\t\tintersects.sort(ascSort);\n\t\t\treturn intersects;\n\t\t},\n\t\tintersectObjects: function intersectObjects(objects, recursive, optionalTarget) {\n\t\t\tvar intersects = optionalTarget || [];\n\n\t\t\tif (Array.isArray(objects) === false) {\n\t\t\t\tconsole.warn('THREE.Raycaster.intersectObjects: objects is not an Array.');\n\t\t\t\treturn intersects;\n\t\t\t}\n\n\t\t\tfor (var i = 0, l = objects.length; i < l; i++) {\n\t\t\t\t_intersectObject(objects[i], this, intersects, recursive);\n\t\t\t}\n\n\t\t\tintersects.sort(ascSort);\n\t\t\treturn intersects;\n\t\t}\n\t});\n\n\t/**\n\t * Ref: https://en.wikipedia.org/wiki/Spherical_coordinate_system\n\t *\n\t * The polar angle (phi) is measured from the positive y-axis. The positive y-axis is up.\n\t * The azimuthal angle (theta) is measured from the positive z-axis.\n\t */\n\n\tvar Spherical = /*#__PURE__*/function () {\n\t\tfunction Spherical(radius, phi, theta) {\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 1;\n\t\t\t}\n\n\t\t\tif (phi === void 0) {\n\t\t\t\tphi = 0;\n\t\t\t}\n\n\t\t\tif (theta === void 0) {\n\t\t\t\ttheta = 0;\n\t\t\t}\n\n\t\t\tthis.radius = radius;\n\t\t\tthis.phi = phi; // polar angle\n\n\t\t\tthis.theta = theta; // azimuthal angle\n\n\t\t\treturn this;\n\t\t}\n\n\t\tvar _proto = Spherical.prototype;\n\n\t\t_proto.set = function set(radius, phi, theta) {\n\t\t\tthis.radius = radius;\n\t\t\tthis.phi = phi;\n\t\t\tthis.theta = theta;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(other) {\n\t\t\tthis.radius = other.radius;\n\t\t\tthis.phi = other.phi;\n\t\t\tthis.theta = other.theta;\n\t\t\treturn this;\n\t\t} // restrict phi to be betwee EPS and PI-EPS\n\t\t;\n\n\t\t_proto.makeSafe = function makeSafe() {\n\t\t\tvar EPS = 0.000001;\n\t\t\tthis.phi = Math.max(EPS, Math.min(Math.PI - EPS, this.phi));\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromVector3 = function setFromVector3(v) {\n\t\t\treturn this.setFromCartesianCoords(v.x, v.y, v.z);\n\t\t};\n\n\t\t_proto.setFromCartesianCoords = function setFromCartesianCoords(x, y, z) {\n\t\t\tthis.radius = Math.sqrt(x * x + y * y + z * z);\n\n\t\t\tif (this.radius === 0) {\n\t\t\t\tthis.theta = 0;\n\t\t\t\tthis.phi = 0;\n\t\t\t} else {\n\t\t\t\tthis.theta = Math.atan2(x, z);\n\t\t\t\tthis.phi = Math.acos(MathUtils.clamp(y / this.radius, -1, 1));\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Spherical;\n\t}();\n\n\t/**\n\t * Ref: https://en.wikipedia.org/wiki/Cylindrical_coordinate_system\n\t */\n\tvar Cylindrical = /*#__PURE__*/function () {\n\t\tfunction Cylindrical(radius, theta, y) {\n\t\t\tthis.radius = radius !== undefined ? radius : 1.0; // distance from the origin to a point in the x-z plane\n\n\t\t\tthis.theta = theta !== undefined ? theta : 0; // counterclockwise angle in the x-z plane measured in radians from the positive z-axis\n\n\t\t\tthis.y = y !== undefined ? y : 0; // height above the x-z plane\n\n\t\t\treturn this;\n\t\t}\n\n\t\tvar _proto = Cylindrical.prototype;\n\n\t\t_proto.set = function set(radius, theta, y) {\n\t\t\tthis.radius = radius;\n\t\t\tthis.theta = theta;\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(other) {\n\t\t\tthis.radius = other.radius;\n\t\t\tthis.theta = other.theta;\n\t\t\tthis.y = other.y;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromVector3 = function setFromVector3(v) {\n\t\t\treturn this.setFromCartesianCoords(v.x, v.y, v.z);\n\t\t};\n\n\t\t_proto.setFromCartesianCoords = function setFromCartesianCoords(x, y, z) {\n\t\t\tthis.radius = Math.sqrt(x * x + z * z);\n\t\t\tthis.theta = Math.atan2(x, z);\n\t\t\tthis.y = y;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn Cylindrical;\n\t}();\n\n\tvar _vector$8 = /*@__PURE__*/new Vector2();\n\n\tvar Box2 = /*#__PURE__*/function () {\n\t\tfunction Box2(min, max) {\n\t\t\tObject.defineProperty(this, 'isBox2', {\n\t\t\t\tvalue: true\n\t\t\t});\n\t\t\tthis.min = min !== undefined ? min : new Vector2(+Infinity, +Infinity);\n\t\t\tthis.max = max !== undefined ? max : new Vector2(-Infinity, -Infinity);\n\t\t}\n\n\t\tvar _proto = Box2.prototype;\n\n\t\t_proto.set = function set(min, max) {\n\t\t\tthis.min.copy(min);\n\t\t\tthis.max.copy(max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromPoints = function setFromPoints(points) {\n\t\t\tthis.makeEmpty();\n\n\t\t\tfor (var i = 0, il = points.length; i < il; i++) {\n\t\t\t\tthis.expandByPoint(points[i]);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.setFromCenterAndSize = function setFromCenterAndSize(center, size) {\n\t\t\tvar halfSize = _vector$8.copy(size).multiplyScalar(0.5);\n\n\t\t\tthis.min.copy(center).sub(halfSize);\n\t\t\tthis.max.copy(center).add(halfSize);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(box) {\n\t\t\tthis.min.copy(box.min);\n\t\t\tthis.max.copy(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.makeEmpty = function makeEmpty() {\n\t\t\tthis.min.x = this.min.y = +Infinity;\n\t\t\tthis.max.x = this.max.y = -Infinity;\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.isEmpty = function isEmpty() {\n\t\t\t// this is a more robust check for empty than ( volume <= 0 ) because volume can get positive with two negative axes\n\t\t\treturn this.max.x < this.min.x || this.max.y < this.min.y;\n\t\t};\n\n\t\t_proto.getCenter = function getCenter(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box2: .getCenter() target is now required');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn this.isEmpty() ? target.set(0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);\n\t\t};\n\n\t\t_proto.getSize = function getSize(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box2: .getSize() target is now required');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn this.isEmpty() ? target.set(0, 0) : target.subVectors(this.max, this.min);\n\t\t};\n\n\t\t_proto.expandByPoint = function expandByPoint(point) {\n\t\t\tthis.min.min(point);\n\t\t\tthis.max.max(point);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByVector = function expandByVector(vector) {\n\t\t\tthis.min.sub(vector);\n\t\t\tthis.max.add(vector);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.expandByScalar = function expandByScalar(scalar) {\n\t\t\tthis.min.addScalar(-scalar);\n\t\t\tthis.max.addScalar(scalar);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.containsPoint = function containsPoint(point) {\n\t\t\treturn point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y ? false : true;\n\t\t};\n\n\t\t_proto.containsBox = function containsBox(box) {\n\t\t\treturn this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y;\n\t\t};\n\n\t\t_proto.getParameter = function getParameter(point, target) {\n\t\t\t// This can potentially have a divide by zero if the box\n\t\t\t// has a size dimension of 0.\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box2: .getParameter() target is now required');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn target.set((point.x - this.min.x) / (this.max.x - this.min.x), (point.y - this.min.y) / (this.max.y - this.min.y));\n\t\t};\n\n\t\t_proto.intersectsBox = function intersectsBox(box) {\n\t\t\t// using 4 splitting planes to rule out intersections\n\t\t\treturn box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y ? false : true;\n\t\t};\n\n\t\t_proto.clampPoint = function clampPoint(point, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Box2: .clampPoint() target is now required');\n\t\t\t\ttarget = new Vector2();\n\t\t\t}\n\n\t\t\treturn target.copy(point).clamp(this.min, this.max);\n\t\t};\n\n\t\t_proto.distanceToPoint = function distanceToPoint(point) {\n\t\t\tvar clampedPoint = _vector$8.copy(point).clamp(this.min, this.max);\n\n\t\t\treturn clampedPoint.sub(point).length();\n\t\t};\n\n\t\t_proto.intersect = function intersect(box) {\n\t\t\tthis.min.max(box.min);\n\t\t\tthis.max.min(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.union = function union(box) {\n\t\t\tthis.min.min(box.min);\n\t\t\tthis.max.max(box.max);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.translate = function translate(offset) {\n\t\t\tthis.min.add(offset);\n\t\t\tthis.max.add(offset);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(box) {\n\t\t\treturn box.min.equals(this.min) && box.max.equals(this.max);\n\t\t};\n\n\t\treturn Box2;\n\t}();\n\n\tvar _startP = /*@__PURE__*/new Vector3();\n\n\tvar _startEnd = /*@__PURE__*/new Vector3();\n\n\tvar Line3 = /*#__PURE__*/function () {\n\t\tfunction Line3(start, end) {\n\t\t\tthis.start = start !== undefined ? start : new Vector3();\n\t\t\tthis.end = end !== undefined ? end : new Vector3();\n\t\t}\n\n\t\tvar _proto = Line3.prototype;\n\n\t\t_proto.set = function set(start, end) {\n\t\t\tthis.start.copy(start);\n\t\t\tthis.end.copy(end);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.clone = function clone() {\n\t\t\treturn new this.constructor().copy(this);\n\t\t};\n\n\t\t_proto.copy = function copy(line) {\n\t\t\tthis.start.copy(line.start);\n\t\t\tthis.end.copy(line.end);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.getCenter = function getCenter(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Line3: .getCenter() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.addVectors(this.start, this.end).multiplyScalar(0.5);\n\t\t};\n\n\t\t_proto.delta = function delta(target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Line3: .delta() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn target.subVectors(this.end, this.start);\n\t\t};\n\n\t\t_proto.distanceSq = function distanceSq() {\n\t\t\treturn this.start.distanceToSquared(this.end);\n\t\t};\n\n\t\t_proto.distance = function distance() {\n\t\t\treturn this.start.distanceTo(this.end);\n\t\t};\n\n\t\t_proto.at = function at(t, target) {\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Line3: .at() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn this.delta(target).multiplyScalar(t).add(this.start);\n\t\t};\n\n\t\t_proto.closestPointToPointParameter = function closestPointToPointParameter(point, clampToLine) {\n\t\t\t_startP.subVectors(point, this.start);\n\n\t\t\t_startEnd.subVectors(this.end, this.start);\n\n\t\t\tvar startEnd2 = _startEnd.dot(_startEnd);\n\n\t\t\tvar startEnd_startP = _startEnd.dot(_startP);\n\n\t\t\tvar t = startEnd_startP / startEnd2;\n\n\t\t\tif (clampToLine) {\n\t\t\t\tt = MathUtils.clamp(t, 0, 1);\n\t\t\t}\n\n\t\t\treturn t;\n\t\t};\n\n\t\t_proto.closestPointToPoint = function closestPointToPoint(point, clampToLine, target) {\n\t\t\tvar t = this.closestPointToPointParameter(point, clampToLine);\n\n\t\t\tif (target === undefined) {\n\t\t\t\tconsole.warn('THREE.Line3: .closestPointToPoint() target is now required');\n\t\t\t\ttarget = new Vector3();\n\t\t\t}\n\n\t\t\treturn this.delta(target).multiplyScalar(t).add(this.start);\n\t\t};\n\n\t\t_proto.applyMatrix4 = function applyMatrix4(matrix) {\n\t\t\tthis.start.applyMatrix4(matrix);\n\t\t\tthis.end.applyMatrix4(matrix);\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.equals = function equals(line) {\n\t\t\treturn line.start.equals(this.start) && line.end.equals(this.end);\n\t\t};\n\n\t\treturn Line3;\n\t}();\n\n\tfunction ImmediateRenderObject(material) {\n\t\tObject3D.call(this);\n\t\tthis.material = material;\n\n\t\tthis.render = function ()\n\t\t/* renderCallback */\n\t\t{};\n\n\t\tthis.hasPositions = false;\n\t\tthis.hasNormals = false;\n\t\tthis.hasColors = false;\n\t\tthis.hasUvs = false;\n\t\tthis.positionArray = null;\n\t\tthis.normalArray = null;\n\t\tthis.colorArray = null;\n\t\tthis.uvArray = null;\n\t\tthis.count = 0;\n\t}\n\n\tImmediateRenderObject.prototype = Object.create(Object3D.prototype);\n\tImmediateRenderObject.prototype.constructor = ImmediateRenderObject;\n\tImmediateRenderObject.prototype.isImmediateRenderObject = true;\n\n\tvar _vector$9 = /*@__PURE__*/new Vector3();\n\n\tvar SpotLightHelper = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(SpotLightHelper, _Object3D);\n\n\t\tfunction SpotLightHelper(light, color) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.light = light;\n\n\t\t\t_this.light.updateMatrixWorld();\n\n\t\t\t_this.matrix = light.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\t_this.color = color;\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tvar positions = [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];\n\n\t\t\tfor (var i = 0, j = 1, l = 32; i < l; i++, j++) {\n\t\t\t\tvar p1 = i / l * Math.PI * 2;\n\t\t\t\tvar p2 = j / l * Math.PI * 2;\n\t\t\t\tpositions.push(Math.cos(p1), Math.sin(p1), 1, Math.cos(p2), Math.sin(p2), 1);\n\t\t\t}\n\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(positions, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tfog: false,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this.cone = new LineSegments(geometry, material);\n\n\t\t\t_this.add(_this.cone);\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = SpotLightHelper.prototype;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.cone.geometry.dispose();\n\t\t\tthis.cone.material.dispose();\n\t\t};\n\n\t\t_proto.update = function update() {\n\t\t\tthis.light.updateMatrixWorld();\n\t\t\tvar coneLength = this.light.distance ? this.light.distance : 1000;\n\t\t\tvar coneWidth = coneLength * Math.tan(this.light.angle);\n\t\t\tthis.cone.scale.set(coneWidth, coneWidth, coneLength);\n\n\t\t\t_vector$9.setFromMatrixPosition(this.light.target.matrixWorld);\n\n\t\t\tthis.cone.lookAt(_vector$9);\n\n\t\t\tif (this.color !== undefined) {\n\t\t\t\tthis.cone.material.color.set(this.color);\n\t\t\t} else {\n\t\t\t\tthis.cone.material.color.copy(this.light.color);\n\t\t\t}\n\t\t};\n\n\t\treturn SpotLightHelper;\n\t}(Object3D);\n\n\tvar _vector$a = /*@__PURE__*/new Vector3();\n\n\tvar _boneMatrix = /*@__PURE__*/new Matrix4();\n\n\tvar _matrixWorldInv = /*@__PURE__*/new Matrix4();\n\n\tvar SkeletonHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(SkeletonHelper, _LineSegments);\n\n\t\tfunction SkeletonHelper(object) {\n\t\t\tvar _this;\n\n\t\t\tvar bones = getBoneList(object);\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tvar vertices = [];\n\t\t\tvar colors = [];\n\t\t\tvar color1 = new Color(0, 0, 1);\n\t\t\tvar color2 = new Color(0, 1, 0);\n\n\t\t\tfor (var i = 0; i < bones.length; i++) {\n\t\t\t\tvar bone = bones[i];\n\n\t\t\t\tif (bone.parent && bone.parent.isBone) {\n\t\t\t\t\tvertices.push(0, 0, 0);\n\t\t\t\t\tvertices.push(0, 0, 0);\n\t\t\t\t\tcolors.push(color1.r, color1.g, color1.b);\n\t\t\t\t\tcolors.push(color2.r, color2.g, color2.b);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tvertexColors: true,\n\t\t\t\tdepthTest: false,\n\t\t\t\tdepthWrite: false,\n\t\t\t\ttoneMapped: false,\n\t\t\t\ttransparent: true\n\t\t\t});\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'SkeletonHelper';\n\t\t\t_this.isSkeletonHelper = true;\n\t\t\t_this.root = object;\n\t\t\t_this.bones = bones;\n\t\t\t_this.matrix = object.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = SkeletonHelper.prototype;\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\tvar bones = this.bones;\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar position = geometry.getAttribute('position');\n\n\t\t\t_matrixWorldInv.copy(this.root.matrixWorld).invert();\n\n\t\t\tfor (var i = 0, j = 0; i < bones.length; i++) {\n\t\t\t\tvar bone = bones[i];\n\n\t\t\t\tif (bone.parent && bone.parent.isBone) {\n\t\t\t\t\t_boneMatrix.multiplyMatrices(_matrixWorldInv, bone.matrixWorld);\n\n\t\t\t\t\t_vector$a.setFromMatrixPosition(_boneMatrix);\n\n\t\t\t\t\tposition.setXYZ(j, _vector$a.x, _vector$a.y, _vector$a.z);\n\n\t\t\t\t\t_boneMatrix.multiplyMatrices(_matrixWorldInv, bone.parent.matrixWorld);\n\n\t\t\t\t\t_vector$a.setFromMatrixPosition(_boneMatrix);\n\n\t\t\t\t\tposition.setXYZ(j + 1, _vector$a.x, _vector$a.y, _vector$a.z);\n\t\t\t\t\tj += 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tgeometry.getAttribute('position').needsUpdate = true;\n\n\t\t\t_LineSegments.prototype.updateMatrixWorld.call(this, force);\n\t\t};\n\n\t\treturn SkeletonHelper;\n\t}(LineSegments);\n\n\tfunction getBoneList(object) {\n\t\tvar boneList = [];\n\n\t\tif (object && object.isBone) {\n\t\t\tboneList.push(object);\n\t\t}\n\n\t\tfor (var i = 0; i < object.children.length; i++) {\n\t\t\tboneList.push.apply(boneList, getBoneList(object.children[i]));\n\t\t}\n\n\t\treturn boneList;\n\t}\n\n\tvar PointLightHelper = /*#__PURE__*/function (_Mesh) {\n\t\t_inheritsLoose(PointLightHelper, _Mesh);\n\n\t\tfunction PointLightHelper(light, sphereSize, color) {\n\t\t\tvar _this;\n\n\t\t\tvar geometry = new SphereGeometry(sphereSize, 4, 2);\n\t\t\tvar material = new MeshBasicMaterial({\n\t\t\t\twireframe: true,\n\t\t\t\tfog: false,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this = _Mesh.call(this, geometry, material) || this;\n\t\t\t_this.light = light;\n\n\t\t\t_this.light.updateMatrixWorld();\n\n\t\t\t_this.color = color;\n\t\t\t_this.type = 'PointLightHelper';\n\t\t\t_this.matrix = _this.light.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\n\t\t\t_this.update();\n\t\t\t/*\n\t\t\t// TODO: delete this comment?\n\t\t\tconst distanceGeometry = new THREE.IcosahedronBufferGeometry( 1, 2 );\n\t\t\tconst distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );\n\t\t\t\tthis.lightSphere = new THREE.Mesh( bulbGeometry, bulbMaterial );\n\t\t\tthis.lightDistance = new THREE.Mesh( distanceGeometry, distanceMaterial );\n\t\t\t\tconst d = light.distance;\n\t\t\t\tif ( d === 0.0 ) {\n\t\t\t\t\tthis.lightDistance.visible = false;\n\t\t\t\t} else {\n\t\t\t\t\tthis.lightDistance.scale.set( d, d, d );\n\t\t\t\t}\n\t\t\t\tthis.add( this.lightDistance );\n\t\t\t*/\n\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = PointLightHelper.prototype;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.geometry.dispose();\n\t\t\tthis.material.dispose();\n\t\t};\n\n\t\t_proto.update = function update() {\n\t\t\tif (this.color !== undefined) {\n\t\t\t\tthis.material.color.set(this.color);\n\t\t\t} else {\n\t\t\t\tthis.material.color.copy(this.light.color);\n\t\t\t}\n\t\t\t/*\n\t\t\tconst d = this.light.distance;\n\t\t\t\t\tif ( d === 0.0 ) {\n\t\t\t\t\t\tthis.lightDistance.visible = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.lightDistance.visible = true;\n\t\t\t\tthis.lightDistance.scale.set( d, d, d );\n\t\t\t\t\t}\n\t\t\t*/\n\n\t\t};\n\n\t\treturn PointLightHelper;\n\t}(Mesh);\n\n\tvar _vector$b = /*@__PURE__*/new Vector3();\n\n\tvar _color1 = /*@__PURE__*/new Color();\n\n\tvar _color2 = /*@__PURE__*/new Color();\n\n\tvar HemisphereLightHelper = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(HemisphereLightHelper, _Object3D);\n\n\t\tfunction HemisphereLightHelper(light, size, color) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.light = light;\n\n\t\t\t_this.light.updateMatrixWorld();\n\n\t\t\t_this.matrix = light.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\t_this.color = color;\n\t\t\tvar geometry = new OctahedronGeometry(size);\n\t\t\tgeometry.rotateY(Math.PI * 0.5);\n\t\t\t_this.material = new MeshBasicMaterial({\n\t\t\t\twireframe: true,\n\t\t\t\tfog: false,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\tif (_this.color === undefined) _this.material.vertexColors = true;\n\t\t\tvar position = geometry.getAttribute('position');\n\t\t\tvar colors = new Float32Array(position.count * 3);\n\t\t\tgeometry.setAttribute('color', new BufferAttribute(colors, 3));\n\n\t\t\t_this.add(new Mesh(geometry, _this.material));\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = HemisphereLightHelper.prototype;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.children[0].geometry.dispose();\n\t\t\tthis.children[0].material.dispose();\n\t\t};\n\n\t\t_proto.update = function update() {\n\t\t\tvar mesh = this.children[0];\n\n\t\t\tif (this.color !== undefined) {\n\t\t\t\tthis.material.color.set(this.color);\n\t\t\t} else {\n\t\t\t\tvar colors = mesh.geometry.getAttribute('color');\n\n\t\t\t\t_color1.copy(this.light.color);\n\n\t\t\t\t_color2.copy(this.light.groundColor);\n\n\t\t\t\tfor (var i = 0, l = colors.count; i < l; i++) {\n\t\t\t\t\tvar color = i < l / 2 ? _color1 : _color2;\n\t\t\t\t\tcolors.setXYZ(i, color.r, color.g, color.b);\n\t\t\t\t}\n\n\t\t\t\tcolors.needsUpdate = true;\n\t\t\t}\n\n\t\t\tmesh.lookAt(_vector$b.setFromMatrixPosition(this.light.matrixWorld).negate());\n\t\t};\n\n\t\treturn HemisphereLightHelper;\n\t}(Object3D);\n\n\tvar GridHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(GridHelper, _LineSegments);\n\n\t\tfunction GridHelper(size, divisions, color1, color2) {\n\t\t\tvar _this;\n\n\t\t\tif (size === void 0) {\n\t\t\t\tsize = 10;\n\t\t\t}\n\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 10;\n\t\t\t}\n\n\t\t\tif (color1 === void 0) {\n\t\t\t\tcolor1 = 0x444444;\n\t\t\t}\n\n\t\t\tif (color2 === void 0) {\n\t\t\t\tcolor2 = 0x888888;\n\t\t\t}\n\n\t\t\tcolor1 = new Color(color1);\n\t\t\tcolor2 = new Color(color2);\n\t\t\tvar center = divisions / 2;\n\t\t\tvar step = size / divisions;\n\t\t\tvar halfSize = size / 2;\n\t\t\tvar vertices = [],\n\t\t\t\t\tcolors = [];\n\n\t\t\tfor (var i = 0, j = 0, k = -halfSize; i <= divisions; i++, k += step) {\n\t\t\t\tvertices.push(-halfSize, 0, k, halfSize, 0, k);\n\t\t\t\tvertices.push(k, 0, -halfSize, k, 0, halfSize);\n\t\t\t\tvar color = i === center ? color1 : color2;\n\t\t\t\tcolor.toArray(colors, j);\n\t\t\t\tj += 3;\n\t\t\t\tcolor.toArray(colors, j);\n\t\t\t\tj += 3;\n\t\t\t\tcolor.toArray(colors, j);\n\t\t\t\tj += 3;\n\t\t\t\tcolor.toArray(colors, j);\n\t\t\t\tj += 3;\n\t\t\t}\n\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tvertexColors: true,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'GridHelper';\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn GridHelper;\n\t}(LineSegments);\n\n\tvar PolarGridHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(PolarGridHelper, _LineSegments);\n\n\t\tfunction PolarGridHelper(radius, radials, circles, divisions, color1, color2) {\n\t\t\tvar _this;\n\n\t\t\tif (radius === void 0) {\n\t\t\t\tradius = 10;\n\t\t\t}\n\n\t\t\tif (radials === void 0) {\n\t\t\t\tradials = 16;\n\t\t\t}\n\n\t\t\tif (circles === void 0) {\n\t\t\t\tcircles = 8;\n\t\t\t}\n\n\t\t\tif (divisions === void 0) {\n\t\t\t\tdivisions = 64;\n\t\t\t}\n\n\t\t\tif (color1 === void 0) {\n\t\t\t\tcolor1 = 0x444444;\n\t\t\t}\n\n\t\t\tif (color2 === void 0) {\n\t\t\t\tcolor2 = 0x888888;\n\t\t\t}\n\n\t\t\tcolor1 = new Color(color1);\n\t\t\tcolor2 = new Color(color2);\n\t\t\tvar vertices = [];\n\t\t\tvar colors = []; // create the radials\n\n\t\t\tfor (var i = 0; i <= radials; i++) {\n\t\t\t\tvar v = i / radials * (Math.PI * 2);\n\t\t\t\tvar x = Math.sin(v) * radius;\n\t\t\t\tvar z = Math.cos(v) * radius;\n\t\t\t\tvertices.push(0, 0, 0);\n\t\t\t\tvertices.push(x, 0, z);\n\t\t\t\tvar color = i & 1 ? color1 : color2;\n\t\t\t\tcolors.push(color.r, color.g, color.b);\n\t\t\t\tcolors.push(color.r, color.g, color.b);\n\t\t\t} // create the circles\n\n\n\t\t\tfor (var _i = 0; _i <= circles; _i++) {\n\t\t\t\tvar _color = _i & 1 ? color1 : color2;\n\n\t\t\t\tvar r = radius - radius / circles * _i;\n\n\t\t\t\tfor (var j = 0; j < divisions; j++) {\n\t\t\t\t\t// first vertex\n\t\t\t\t\tvar _v = j / divisions * (Math.PI * 2);\n\n\t\t\t\t\tvar _x = Math.sin(_v) * r;\n\n\t\t\t\t\tvar _z = Math.cos(_v) * r;\n\n\t\t\t\t\tvertices.push(_x, 0, _z);\n\t\t\t\t\tcolors.push(_color.r, _color.g, _color.b); // second vertex\n\n\t\t\t\t\t_v = (j + 1) / divisions * (Math.PI * 2);\n\t\t\t\t\t_x = Math.sin(_v) * r;\n\t\t\t\t\t_z = Math.cos(_v) * r;\n\t\t\t\t\tvertices.push(_x, 0, _z);\n\t\t\t\t\tcolors.push(_color.r, _color.g, _color.b);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tvertexColors: true,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'PolarGridHelper';\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn PolarGridHelper;\n\t}(LineSegments);\n\n\tvar _v1$6 = /*@__PURE__*/new Vector3();\n\n\tvar _v2$3 = /*@__PURE__*/new Vector3();\n\n\tvar _v3$1 = /*@__PURE__*/new Vector3();\n\n\tvar DirectionalLightHelper = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(DirectionalLightHelper, _Object3D);\n\n\t\tfunction DirectionalLightHelper(light, size, color) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this;\n\t\t\t_this.light = light;\n\n\t\t\t_this.light.updateMatrixWorld();\n\n\t\t\t_this.matrix = light.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\t_this.color = color;\n\t\t\tif (size === undefined) size = 1;\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute([-size, size, 0, size, size, 0, size, -size, 0, -size, -size, 0, -size, size, 0], 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tfog: false,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this.lightPlane = new Line(geometry, material);\n\n\t\t\t_this.add(_this.lightPlane);\n\n\t\t\tgeometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 0, 0, 1], 3));\n\t\t\t_this.targetLine = new Line(geometry, material);\n\n\t\t\t_this.add(_this.targetLine);\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = DirectionalLightHelper.prototype;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis.lightPlane.geometry.dispose();\n\t\t\tthis.lightPlane.material.dispose();\n\t\t\tthis.targetLine.geometry.dispose();\n\t\t\tthis.targetLine.material.dispose();\n\t\t};\n\n\t\t_proto.update = function update() {\n\t\t\t_v1$6.setFromMatrixPosition(this.light.matrixWorld);\n\n\t\t\t_v2$3.setFromMatrixPosition(this.light.target.matrixWorld);\n\n\t\t\t_v3$1.subVectors(_v2$3, _v1$6);\n\n\t\t\tthis.lightPlane.lookAt(_v2$3);\n\n\t\t\tif (this.color !== undefined) {\n\t\t\t\tthis.lightPlane.material.color.set(this.color);\n\t\t\t\tthis.targetLine.material.color.set(this.color);\n\t\t\t} else {\n\t\t\t\tthis.lightPlane.material.color.copy(this.light.color);\n\t\t\t\tthis.targetLine.material.color.copy(this.light.color);\n\t\t\t}\n\n\t\t\tthis.targetLine.lookAt(_v2$3);\n\t\t\tthis.targetLine.scale.z = _v3$1.length();\n\t\t};\n\n\t\treturn DirectionalLightHelper;\n\t}(Object3D);\n\n\tvar _vector$c = /*@__PURE__*/new Vector3();\n\n\tvar _camera = /*@__PURE__*/new Camera();\n\t/**\n\t *\t- shows frustum, line of sight and up of the camera\n\t *\t- suitable for fast updates\n\t * \t- based on frustum visualization in lightgl.js shadowmap example\n\t *\t\thttp://evanw.github.com/lightgl.js/tests/shadowmap.html\n\t */\n\n\n\tvar CameraHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(CameraHelper, _LineSegments);\n\n\t\tfunction CameraHelper(camera) {\n\t\t\tvar _this;\n\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tcolor: 0xffffff,\n\t\t\t\tvertexColors: true,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\tvar vertices = [];\n\t\t\tvar colors = [];\n\t\t\tvar pointMap = {}; // colors\n\n\t\t\tvar colorFrustum = new Color(0xffaa00);\n\t\t\tvar colorCone = new Color(0xff0000);\n\t\t\tvar colorUp = new Color(0x00aaff);\n\t\t\tvar colorTarget = new Color(0xffffff);\n\t\t\tvar colorCross = new Color(0x333333); // near\n\n\t\t\taddLine('n1', 'n2', colorFrustum);\n\t\t\taddLine('n2', 'n4', colorFrustum);\n\t\t\taddLine('n4', 'n3', colorFrustum);\n\t\t\taddLine('n3', 'n1', colorFrustum); // far\n\n\t\t\taddLine('f1', 'f2', colorFrustum);\n\t\t\taddLine('f2', 'f4', colorFrustum);\n\t\t\taddLine('f4', 'f3', colorFrustum);\n\t\t\taddLine('f3', 'f1', colorFrustum); // sides\n\n\t\t\taddLine('n1', 'f1', colorFrustum);\n\t\t\taddLine('n2', 'f2', colorFrustum);\n\t\t\taddLine('n3', 'f3', colorFrustum);\n\t\t\taddLine('n4', 'f4', colorFrustum); // cone\n\n\t\t\taddLine('p', 'n1', colorCone);\n\t\t\taddLine('p', 'n2', colorCone);\n\t\t\taddLine('p', 'n3', colorCone);\n\t\t\taddLine('p', 'n4', colorCone); // up\n\n\t\t\taddLine('u1', 'u2', colorUp);\n\t\t\taddLine('u2', 'u3', colorUp);\n\t\t\taddLine('u3', 'u1', colorUp); // target\n\n\t\t\taddLine('c', 't', colorTarget);\n\t\t\taddLine('p', 'c', colorCross); // cross\n\n\t\t\taddLine('cn1', 'cn2', colorCross);\n\t\t\taddLine('cn3', 'cn4', colorCross);\n\t\t\taddLine('cf1', 'cf2', colorCross);\n\t\t\taddLine('cf3', 'cf4', colorCross);\n\n\t\t\tfunction addLine(a, b, color) {\n\t\t\t\taddPoint(a, color);\n\t\t\t\taddPoint(b, color);\n\t\t\t}\n\n\t\t\tfunction addPoint(id, color) {\n\t\t\t\tvertices.push(0, 0, 0);\n\t\t\t\tcolors.push(color.r, color.g, color.b);\n\n\t\t\t\tif (pointMap[id] === undefined) {\n\t\t\t\t\tpointMap[id] = [];\n\t\t\t\t}\n\n\t\t\t\tpointMap[id].push(vertices.length / 3 - 1);\n\t\t\t}\n\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'CameraHelper';\n\t\t\t_this.camera = camera;\n\t\t\tif (_this.camera.updateProjectionMatrix) _this.camera.updateProjectionMatrix();\n\t\t\t_this.matrix = camera.matrixWorld;\n\t\t\t_this.matrixAutoUpdate = false;\n\t\t\t_this.pointMap = pointMap;\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = CameraHelper.prototype;\n\n\t\t_proto.update = function update() {\n\t\t\tvar geometry = this.geometry;\n\t\t\tvar pointMap = this.pointMap;\n\t\t\tvar w = 1,\n\t\t\t\t\th = 1; // we need just camera projection matrix inverse\n\t\t\t// world matrix must be identity\n\n\t\t\t_camera.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse); // center / target\n\n\n\t\t\tsetPoint('c', pointMap, geometry, _camera, 0, 0, -1);\n\t\t\tsetPoint('t', pointMap, geometry, _camera, 0, 0, 1); // near\n\n\t\t\tsetPoint('n1', pointMap, geometry, _camera, -w, -h, -1);\n\t\t\tsetPoint('n2', pointMap, geometry, _camera, w, -h, -1);\n\t\t\tsetPoint('n3', pointMap, geometry, _camera, -w, h, -1);\n\t\t\tsetPoint('n4', pointMap, geometry, _camera, w, h, -1); // far\n\n\t\t\tsetPoint('f1', pointMap, geometry, _camera, -w, -h, 1);\n\t\t\tsetPoint('f2', pointMap, geometry, _camera, w, -h, 1);\n\t\t\tsetPoint('f3', pointMap, geometry, _camera, -w, h, 1);\n\t\t\tsetPoint('f4', pointMap, geometry, _camera, w, h, 1); // up\n\n\t\t\tsetPoint('u1', pointMap, geometry, _camera, w * 0.7, h * 1.1, -1);\n\t\t\tsetPoint('u2', pointMap, geometry, _camera, -w * 0.7, h * 1.1, -1);\n\t\t\tsetPoint('u3', pointMap, geometry, _camera, 0, h * 2, -1); // cross\n\n\t\t\tsetPoint('cf1', pointMap, geometry, _camera, -w, 0, 1);\n\t\t\tsetPoint('cf2', pointMap, geometry, _camera, w, 0, 1);\n\t\t\tsetPoint('cf3', pointMap, geometry, _camera, 0, -h, 1);\n\t\t\tsetPoint('cf4', pointMap, geometry, _camera, 0, h, 1);\n\t\t\tsetPoint('cn1', pointMap, geometry, _camera, -w, 0, -1);\n\t\t\tsetPoint('cn2', pointMap, geometry, _camera, w, 0, -1);\n\t\t\tsetPoint('cn3', pointMap, geometry, _camera, 0, -h, -1);\n\t\t\tsetPoint('cn4', pointMap, geometry, _camera, 0, h, -1);\n\t\t\tgeometry.getAttribute('position').needsUpdate = true;\n\t\t};\n\n\t\treturn CameraHelper;\n\t}(LineSegments);\n\n\tfunction setPoint(point, pointMap, geometry, camera, x, y, z) {\n\t\t_vector$c.set(x, y, z).unproject(camera);\n\n\t\tvar points = pointMap[point];\n\n\t\tif (points !== undefined) {\n\t\t\tvar position = geometry.getAttribute('position');\n\n\t\t\tfor (var i = 0, l = points.length; i < l; i++) {\n\t\t\t\tposition.setXYZ(points[i], _vector$c.x, _vector$c.y, _vector$c.z);\n\t\t\t}\n\t\t}\n\t}\n\n\tvar _box$3 = /*@__PURE__*/new Box3();\n\n\tvar BoxHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(BoxHelper, _LineSegments);\n\n\t\tfunction BoxHelper(object, color) {\n\t\t\tvar _this;\n\n\t\t\tif (color === void 0) {\n\t\t\t\tcolor = 0xffff00;\n\t\t\t}\n\n\t\t\tvar indices = 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]);\n\t\t\tvar positions = new Float32Array(8 * 3);\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setIndex(new BufferAttribute(indices, 1));\n\t\t\tgeometry.setAttribute('position', new BufferAttribute(positions, 3));\n\t\t\t_this = _LineSegments.call(this, geometry, new LineBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t})) || this;\n\t\t\t_this.object = object;\n\t\t\t_this.type = 'BoxHelper';\n\t\t\t_this.matrixAutoUpdate = false;\n\n\t\t\t_this.update();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = BoxHelper.prototype;\n\n\t\t_proto.update = function update(object) {\n\t\t\tif (object !== undefined) {\n\t\t\t\tconsole.warn('THREE.BoxHelper: .update() has no longer arguments.');\n\t\t\t}\n\n\t\t\tif (this.object !== undefined) {\n\t\t\t\t_box$3.setFromObject(this.object);\n\t\t\t}\n\n\t\t\tif (_box$3.isEmpty()) return;\n\t\t\tvar min = _box$3.min;\n\t\t\tvar max = _box$3.max;\n\t\t\t/*\n\t\t\t\t5____4\n\t\t\t1/___0/|\n\t\t\t| 6__|_7\n\t\t\t2/___3/\n\t\t\t\t\t0: max.x, max.y, max.z\n\t\t\t1: min.x, max.y, max.z\n\t\t\t2: min.x, min.y, max.z\n\t\t\t3: max.x, min.y, max.z\n\t\t\t4: max.x, max.y, min.z\n\t\t\t5: min.x, max.y, min.z\n\t\t\t6: min.x, min.y, min.z\n\t\t\t7: max.x, min.y, min.z\n\t\t\t*/\n\n\t\t\tvar position = this.geometry.attributes.position;\n\t\t\tvar array = position.array;\n\t\t\tarray[0] = max.x;\n\t\t\tarray[1] = max.y;\n\t\t\tarray[2] = max.z;\n\t\t\tarray[3] = min.x;\n\t\t\tarray[4] = max.y;\n\t\t\tarray[5] = max.z;\n\t\t\tarray[6] = min.x;\n\t\t\tarray[7] = min.y;\n\t\t\tarray[8] = max.z;\n\t\t\tarray[9] = max.x;\n\t\t\tarray[10] = min.y;\n\t\t\tarray[11] = max.z;\n\t\t\tarray[12] = max.x;\n\t\t\tarray[13] = max.y;\n\t\t\tarray[14] = min.z;\n\t\t\tarray[15] = min.x;\n\t\t\tarray[16] = max.y;\n\t\t\tarray[17] = min.z;\n\t\t\tarray[18] = min.x;\n\t\t\tarray[19] = min.y;\n\t\t\tarray[20] = min.z;\n\t\t\tarray[21] = max.x;\n\t\t\tarray[22] = min.y;\n\t\t\tarray[23] = min.z;\n\t\t\tposition.needsUpdate = true;\n\t\t\tthis.geometry.computeBoundingSphere();\n\t\t};\n\n\t\t_proto.setFromObject = function setFromObject(object) {\n\t\t\tthis.object = object;\n\t\t\tthis.update();\n\t\t\treturn this;\n\t\t};\n\n\t\t_proto.copy = function copy(source) {\n\t\t\tLineSegments.prototype.copy.call(this, source);\n\t\t\tthis.object = source.object;\n\t\t\treturn this;\n\t\t};\n\n\t\treturn BoxHelper;\n\t}(LineSegments);\n\n\tvar Box3Helper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(Box3Helper, _LineSegments);\n\n\t\tfunction Box3Helper(box, color) {\n\t\t\tvar _this;\n\n\t\t\tif (color === void 0) {\n\t\t\t\tcolor = 0xffff00;\n\t\t\t}\n\n\t\t\tvar indices = 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]);\n\t\t\tvar positions = [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1];\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setIndex(new BufferAttribute(indices, 1));\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(positions, 3));\n\t\t\t_this = _LineSegments.call(this, geometry, new LineBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t})) || this;\n\t\t\t_this.box = box;\n\t\t\t_this.type = 'Box3Helper';\n\n\t\t\t_this.geometry.computeBoundingSphere();\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = Box3Helper.prototype;\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\tvar box = this.box;\n\t\t\tif (box.isEmpty()) return;\n\t\t\tbox.getCenter(this.position);\n\t\t\tbox.getSize(this.scale);\n\t\t\tthis.scale.multiplyScalar(0.5);\n\n\t\t\t_LineSegments.prototype.updateMatrixWorld.call(this, force);\n\t\t};\n\n\t\treturn Box3Helper;\n\t}(LineSegments);\n\n\tvar PlaneHelper = /*#__PURE__*/function (_Line) {\n\t\t_inheritsLoose(PlaneHelper, _Line);\n\n\t\tfunction PlaneHelper(plane, size, hex) {\n\t\t\tvar _this;\n\n\t\t\tif (size === void 0) {\n\t\t\t\tsize = 1;\n\t\t\t}\n\n\t\t\tif (hex === void 0) {\n\t\t\t\thex = 0xffff00;\n\t\t\t}\n\n\t\t\tvar color = hex;\n\t\t\tvar positions = [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];\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(positions, 3));\n\t\t\tgeometry.computeBoundingSphere();\n\t\t\t_this = _Line.call(this, geometry, new LineBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t})) || this;\n\t\t\t_this.type = 'PlaneHelper';\n\t\t\t_this.plane = plane;\n\t\t\t_this.size = size;\n\t\t\tvar positions2 = [1, 1, 1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, 1];\n\t\t\tvar geometry2 = new BufferGeometry();\n\t\t\tgeometry2.setAttribute('position', new Float32BufferAttribute(positions2, 3));\n\t\t\tgeometry2.computeBoundingSphere();\n\n\t\t\t_this.add(new Mesh(geometry2, new MeshBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\topacity: 0.2,\n\t\t\t\ttransparent: true,\n\t\t\t\tdepthWrite: false,\n\t\t\t\ttoneMapped: false\n\t\t\t})));\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = PlaneHelper.prototype;\n\n\t\t_proto.updateMatrixWorld = function updateMatrixWorld(force) {\n\t\t\tvar scale = -this.plane.constant;\n\t\t\tif (Math.abs(scale) < 1e-8) scale = 1e-8; // sign does not matter\n\n\t\t\tthis.scale.set(0.5 * this.size, 0.5 * this.size, scale);\n\t\t\tthis.children[0].material.side = scale < 0 ? BackSide : FrontSide; // renderer flips side when determinant < 0; flipping not wanted here\n\n\t\t\tthis.lookAt(this.plane.normal);\n\n\t\t\t_Line.prototype.updateMatrixWorld.call(this, force);\n\t\t};\n\n\t\treturn PlaneHelper;\n\t}(Line);\n\n\tvar _axis = /*@__PURE__*/new Vector3();\n\n\tvar _lineGeometry, _coneGeometry;\n\n\tvar ArrowHelper = /*#__PURE__*/function (_Object3D) {\n\t\t_inheritsLoose(ArrowHelper, _Object3D);\n\n\t\tfunction ArrowHelper(dir, origin, length, color, headLength, headWidth) {\n\t\t\tvar _this;\n\n\t\t\t_this = _Object3D.call(this) || this; // dir is assumed to be normalized\n\n\t\t\t_this.type = 'ArrowHelper';\n\t\t\tif (dir === undefined) dir = new Vector3(0, 0, 1);\n\t\t\tif (origin === undefined) origin = new Vector3(0, 0, 0);\n\t\t\tif (length === undefined) length = 1;\n\t\t\tif (color === undefined) color = 0xffff00;\n\t\t\tif (headLength === undefined) headLength = 0.2 * length;\n\t\t\tif (headWidth === undefined) headWidth = 0.2 * headLength;\n\n\t\t\tif (_lineGeometry === undefined) {\n\t\t\t\t_lineGeometry = new BufferGeometry();\n\n\t\t\t\t_lineGeometry.setAttribute('position', new Float32BufferAttribute([0, 0, 0, 0, 1, 0], 3));\n\n\t\t\t\t_coneGeometry = new CylinderGeometry(0, 0.5, 1, 5, 1);\n\n\t\t\t\t_coneGeometry.translate(0, -0.5, 0);\n\t\t\t}\n\n\t\t\t_this.position.copy(origin);\n\n\t\t\t_this.line = new Line(_lineGeometry, new LineBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t}));\n\t\t\t_this.line.matrixAutoUpdate = false;\n\n\t\t\t_this.add(_this.line);\n\n\t\t\t_this.cone = new Mesh(_coneGeometry, new MeshBasicMaterial({\n\t\t\t\tcolor: color,\n\t\t\t\ttoneMapped: false\n\t\t\t}));\n\t\t\t_this.cone.matrixAutoUpdate = false;\n\n\t\t\t_this.add(_this.cone);\n\n\t\t\t_this.setDirection(dir);\n\n\t\t\t_this.setLength(length, headLength, headWidth);\n\n\t\t\treturn _this;\n\t\t}\n\n\t\tvar _proto = ArrowHelper.prototype;\n\n\t\t_proto.setDirection = function setDirection(dir) {\n\t\t\t// dir is assumed to be normalized\n\t\t\tif (dir.y > 0.99999) {\n\t\t\t\tthis.quaternion.set(0, 0, 0, 1);\n\t\t\t} else if (dir.y < -0.99999) {\n\t\t\t\tthis.quaternion.set(1, 0, 0, 0);\n\t\t\t} else {\n\t\t\t\t_axis.set(dir.z, 0, -dir.x).normalize();\n\n\t\t\t\tvar radians = Math.acos(dir.y);\n\t\t\t\tthis.quaternion.setFromAxisAngle(_axis, radians);\n\t\t\t}\n\t\t};\n\n\t\t_proto.setLength = function setLength(length, headLength, headWidth) {\n\t\t\tif (headLength === undefined) headLength = 0.2 * length;\n\t\t\tif (headWidth === undefined) headWidth = 0.2 * headLength;\n\t\t\tthis.line.scale.set(1, Math.max(0.0001, length - headLength), 1); // see #17458\n\n\t\t\tthis.line.updateMatrix();\n\t\t\tthis.cone.scale.set(headWidth, headLength, headWidth);\n\t\t\tthis.cone.position.y = length;\n\t\t\tthis.cone.updateMatrix();\n\t\t};\n\n\t\t_proto.setColor = function setColor(color) {\n\t\t\tthis.line.material.color.set(color);\n\t\t\tthis.cone.material.color.set(color);\n\t\t};\n\n\t\t_proto.copy = function copy(source) {\n\t\t\t_Object3D.prototype.copy.call(this, source, false);\n\n\t\t\tthis.line.copy(source.line);\n\t\t\tthis.cone.copy(source.cone);\n\t\t\treturn this;\n\t\t};\n\n\t\treturn ArrowHelper;\n\t}(Object3D);\n\n\tvar AxesHelper = /*#__PURE__*/function (_LineSegments) {\n\t\t_inheritsLoose(AxesHelper, _LineSegments);\n\n\t\tfunction AxesHelper(size) {\n\t\t\tvar _this;\n\n\t\t\tif (size === void 0) {\n\t\t\t\tsize = 1;\n\t\t\t}\n\n\t\t\tvar vertices = [0, 0, 0, size, 0, 0, 0, 0, 0, 0, size, 0, 0, 0, 0, 0, 0, size];\n\t\t\tvar colors = [1, 0, 0, 1, 0.6, 0, 0, 1, 0, 0.6, 1, 0, 0, 0, 1, 0, 0.6, 1];\n\t\t\tvar geometry = new BufferGeometry();\n\t\t\tgeometry.setAttribute('position', new Float32BufferAttribute(vertices, 3));\n\t\t\tgeometry.setAttribute('color', new Float32BufferAttribute(colors, 3));\n\t\t\tvar material = new LineBasicMaterial({\n\t\t\t\tvertexColors: true,\n\t\t\t\ttoneMapped: false\n\t\t\t});\n\t\t\t_this = _LineSegments.call(this, geometry, material) || this;\n\t\t\t_this.type = 'AxesHelper';\n\t\t\treturn _this;\n\t\t}\n\n\t\treturn AxesHelper;\n\t}(LineSegments);\n\n\tvar _floatView = new Float32Array(1);\n\n\tvar _int32View = new Int32Array(_floatView.buffer);\n\n\tvar DataUtils = {\n\t\t// Converts float32 to float16 (stored as uint16 value).\n\t\ttoHalfFloat: function toHalfFloat(val) {\n\t\t\t// Source: http://gamedev.stackexchange.com/questions/17326/conversion-of-a-number-from-single-precision-floating-point-representation-to-a/17410#17410\n\n\t\t\t/* This method is faster than the OpenEXR implementation (very often\n\t\t\t* used, eg. in Ogre), with the additional benefit of rounding, inspired\n\t\t\t* by James Tursa?s half-precision code. */\n\t\t\t_floatView[0] = val;\n\t\t\tvar x = _int32View[0];\n\t\t\tvar bits = x >> 16 & 0x8000;\n\t\t\t/* Get the sign */\n\n\t\t\tvar m = x >> 12 & 0x07ff;\n\t\t\t/* Keep one extra bit for rounding */\n\n\t\t\tvar e = x >> 23 & 0xff;\n\t\t\t/* Using int is faster here */\n\n\t\t\t/* If zero, or denormal, or exponent underflows too much for a denormal\n\t\t\t\t* half, return signed zero. */\n\n\t\t\tif (e < 103) return bits;\n\t\t\t/* If NaN, return NaN. If Inf or exponent overflow, return Inf. */\n\n\t\t\tif (e > 142) {\n\t\t\t\tbits |= 0x7c00;\n\t\t\t\t/* If exponent was 0xff and one mantissa bit was set, it means NaN,\n\t\t\t\t\t\t\t* not Inf, so make sure we set one mantissa bit too. */\n\n\t\t\t\tbits |= (e == 255 ? 0 : 1) && x & 0x007fffff;\n\t\t\t\treturn bits;\n\t\t\t}\n\t\t\t/* If exponent underflows but not too much, return a denormal */\n\n\n\t\t\tif (e < 113) {\n\t\t\t\tm |= 0x0800;\n\t\t\t\t/* Extra rounding may overflow and set mantissa to 0 and exponent\n\t\t\t\t\t* to 1, which is OK. */\n\n\t\t\t\tbits |= (m >> 114 - e) + (m >> 113 - e & 1);\n\t\t\t\treturn bits;\n\t\t\t}\n\n\t\t\tbits |= e - 112 << 10 | m >> 1;\n\t\t\t/* Extra rounding. An overflow will set mantissa to 0 and increment\n\t\t\t\t* the exponent, which is OK. */\n\n\t\t\tbits += m & 1;\n\t\t\treturn bits;\n\t\t}\n\t};\n\n\tvar _ENCODINGS;\n\tvar LOD_MIN = 4;\n\tvar LOD_MAX = 8;\n\tvar SIZE_MAX = Math.pow(2, LOD_MAX); // The standard deviations (radians) associated with the extra mips. These are\n\t// chosen to approximate a Trowbridge-Reitz distribution function times the\n\t// geometric shadowing function. These sigma values squared must match the\n\t// variance #defines in cube_uv_reflection_fragment.glsl.js.\n\n\tvar EXTRA_LOD_SIGMA = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582];\n\tvar TOTAL_LODS = LOD_MAX - LOD_MIN + 1 + EXTRA_LOD_SIGMA.length; // The maximum length of the blur for loop. Smaller sigmas will use fewer\n\t// samples and exit early, but not recompile the shader.\n\n\tvar MAX_SAMPLES = 20;\n\tvar ENCODINGS = (_ENCODINGS = {}, _ENCODINGS[LinearEncoding] = 0, _ENCODINGS[sRGBEncoding] = 1, _ENCODINGS[RGBEEncoding] = 2, _ENCODINGS[RGBM7Encoding] = 3, _ENCODINGS[RGBM16Encoding] = 4, _ENCODINGS[RGBDEncoding] = 5, _ENCODINGS[GammaEncoding] = 6, _ENCODINGS);\n\tvar backgroundMaterial = new MeshBasicMaterial({\n\t\tside: BackSide,\n\t\tdepthWrite: false,\n\t\tdepthTest: false\n\t});\n\tvar backgroundBox = new Mesh(new BoxGeometry(), backgroundMaterial);\n\n\tvar _flatCamera = /*@__PURE__*/new OrthographicCamera();\n\n\tvar _createPlanes2 = /*@__PURE__*/_createPlanes(),\n\t\t\t_lodPlanes = _createPlanes2._lodPlanes,\n\t\t\t_sizeLods = _createPlanes2._sizeLods,\n\t\t\t_sigmas = _createPlanes2._sigmas;\n\n\tvar _clearColor = /*@__PURE__*/new Color();\n\n\tvar _oldTarget = null; // Golden Ratio\n\n\tvar PHI = (1 + Math.sqrt(5)) / 2;\n\tvar INV_PHI = 1 / PHI; // Vertices of a dodecahedron (except the opposites, which represent the\n\t// same axis), used as axis directions evenly spread on a sphere.\n\n\tvar _axisDirections = [/*@__PURE__*/new Vector3(1, 1, 1), /*@__PURE__*/new Vector3(-1, 1, 1), /*@__PURE__*/new Vector3(1, 1, -1), /*@__PURE__*/new Vector3(-1, 1, -1), /*@__PURE__*/new Vector3(0, PHI, INV_PHI), /*@__PURE__*/new Vector3(0, PHI, -INV_PHI), /*@__PURE__*/new Vector3(INV_PHI, 0, PHI), /*@__PURE__*/new Vector3(-INV_PHI, 0, PHI), /*@__PURE__*/new Vector3(PHI, INV_PHI, 0), /*@__PURE__*/new Vector3(-PHI, INV_PHI, 0)];\n\t/**\n\t * This class generates a Prefiltered, Mipmapped Radiance Environment Map\n\t * (PMREM) from a cubeMap environment texture. This allows different levels of\n\t * blur to be quickly accessed based on material roughness. It is packed into a\n\t * special CubeUV format that allows us to perform custom interpolation so that\n\t * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap\n\t * chain, it only goes down to the LOD_MIN level (above), and then creates extra\n\t * even more filtered 'mips' at the same LOD_MIN resolution, associated with\n\t * higher roughness levels. In this way we maintain resolution to smoothly\n\t * interpolate diffuse lighting while limiting sampling computation.\n\t */\n\n\tfunction convertLinearToRGBE(color) {\n\t\tvar maxComponent = Math.max(color.r, color.g, color.b);\n\t\tvar fExp = Math.min(Math.max(Math.ceil(Math.log2(maxComponent)), -128.0), 127.0);\n\t\tcolor.multiplyScalar(Math.pow(2.0, -fExp));\n\t\tvar alpha = (fExp + 128.0) / 255.0;\n\t\treturn alpha;\n\t}\n\n\tvar PMREMGenerator = /*#__PURE__*/function () {\n\t\tfunction PMREMGenerator(renderer) {\n\t\t\tthis._renderer = renderer;\n\t\t\tthis._pingPongRenderTarget = null;\n\t\t\tthis._blurMaterial = _getBlurShader(MAX_SAMPLES);\n\t\t\tthis._equirectShader = null;\n\t\t\tthis._cubemapShader = null;\n\n\t\t\tthis._compileMaterial(this._blurMaterial);\n\t\t}\n\t\t/**\n\t\t * Generates a PMREM from a supplied Scene, which can be faster than using an\n\t\t * image if networking bandwidth is low. Optional sigma specifies a blur radius\n\t\t * in radians to be applied to the scene before PMREM generation. Optional near\n\t\t * and far planes ensure the scene is rendered in its entirety (the cubeCamera\n\t\t * is placed at the origin).\n\t\t */\n\n\n\t\tvar _proto = PMREMGenerator.prototype;\n\n\t\t_proto.fromScene = function fromScene(scene, sigma, near, far) {\n\t\t\tif (sigma === void 0) {\n\t\t\t\tsigma = 0;\n\t\t\t}\n\n\t\t\tif (near === void 0) {\n\t\t\t\tnear = 0.1;\n\t\t\t}\n\n\t\t\tif (far === void 0) {\n\t\t\t\tfar = 100;\n\t\t\t}\n\n\t\t\t_oldTarget = this._renderer.getRenderTarget();\n\n\t\t\tvar cubeUVRenderTarget = this._allocateTargets();\n\n\t\t\tthis._sceneToCubeUV(scene, near, far, cubeUVRenderTarget);\n\n\t\t\tif (sigma > 0) {\n\t\t\t\tthis._blur(cubeUVRenderTarget, 0, 0, sigma);\n\t\t\t}\n\n\t\t\tthis._applyPMREM(cubeUVRenderTarget);\n\n\t\t\tthis._cleanup(cubeUVRenderTarget);\n\n\t\t\treturn cubeUVRenderTarget;\n\t\t}\n\t\t/**\n\t\t * Generates a PMREM from an equirectangular texture, which can be either LDR\n\t\t * (RGBFormat) or HDR (RGBEFormat). The ideal input image size is 1k (1024 x 512),\n\t\t * as this matches best with the 256 x 256 cubemap output.\n\t\t */\n\t\t;\n\n\t\t_proto.fromEquirectangular = function fromEquirectangular(equirectangular) {\n\t\t\treturn this._fromTexture(equirectangular);\n\t\t}\n\t\t/**\n\t\t * Generates a PMREM from an cubemap texture, which can be either LDR\n\t\t * (RGBFormat) or HDR (RGBEFormat). The ideal input cube size is 256 x 256,\n\t\t * as this matches best with the 256 x 256 cubemap output.\n\t\t */\n\t\t;\n\n\t\t_proto.fromCubemap = function fromCubemap(cubemap) {\n\t\t\treturn this._fromTexture(cubemap);\n\t\t}\n\t\t/**\n\t\t * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during\n\t\t * your texture's network fetch for increased concurrency.\n\t\t */\n\t\t;\n\n\t\t_proto.compileCubemapShader = function compileCubemapShader() {\n\t\t\tif (this._cubemapShader === null) {\n\t\t\t\tthis._cubemapShader = _getCubemapShader();\n\n\t\t\t\tthis._compileMaterial(this._cubemapShader);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during\n\t\t * your texture's network fetch for increased concurrency.\n\t\t */\n\t\t;\n\n\t\t_proto.compileEquirectangularShader = function compileEquirectangularShader() {\n\t\t\tif (this._equirectShader === null) {\n\t\t\t\tthis._equirectShader = _getEquirectShader();\n\n\t\t\t\tthis._compileMaterial(this._equirectShader);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class,\n\t\t * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on\n\t\t * one of them will cause any others to also become unusable.\n\t\t */\n\t\t;\n\n\t\t_proto.dispose = function dispose() {\n\t\t\tthis._blurMaterial.dispose();\n\n\t\t\tif (this._cubemapShader !== null) this._cubemapShader.dispose();\n\t\t\tif (this._equirectShader !== null) this._equirectShader.dispose();\n\n\t\t\tfor (var i = 0; i < _lodPlanes.length; i++) {\n\t\t\t\t_lodPlanes[i].dispose();\n\t\t\t}\n\t\t} // private interface\n\t\t;\n\n\t\t_proto._cleanup = function _cleanup(outputTarget) {\n\t\t\tthis._pingPongRenderTarget.dispose();\n\n\t\t\tthis._renderer.setRenderTarget(_oldTarget);\n\n\t\t\toutputTarget.scissorTest = false;\n\n\t\t\t_setViewport(outputTarget, 0, 0, outputTarget.width, outputTarget.height);\n\t\t};\n\n\t\t_proto._fromTexture = function _fromTexture(texture) {\n\t\t\t_oldTarget = this._renderer.getRenderTarget();\n\n\t\t\tvar cubeUVRenderTarget = this._allocateTargets(texture);\n\n\t\t\tthis._textureToCubeUV(texture, cubeUVRenderTarget);\n\n\t\t\tthis._applyPMREM(cubeUVRenderTarget);\n\n\t\t\tthis._cleanup(cubeUVRenderTarget);\n\n\t\t\treturn cubeUVRenderTarget;\n\t\t};\n\n\t\t_proto._allocateTargets = function _allocateTargets(texture) {\n\t\t\t// warning: null texture is valid\n\t\t\tvar params = {\n\t\t\t\tmagFilter: NearestFilter,\n\t\t\t\tminFilter: NearestFilter,\n\t\t\t\tgenerateMipmaps: false,\n\t\t\t\ttype: UnsignedByteType,\n\t\t\t\tformat: RGBEFormat,\n\t\t\t\tencoding: _isLDR(texture) ? texture.encoding : RGBEEncoding,\n\t\t\t\tdepthBuffer: false\n\t\t\t};\n\n\t\t\tvar cubeUVRenderTarget = _createRenderTarget(params);\n\n\t\t\tcubeUVRenderTarget.depthBuffer = texture ? false : true;\n\t\t\tthis._pingPongRenderTarget = _createRenderTarget(params);\n\t\t\treturn cubeUVRenderTarget;\n\t\t};\n\n\t\t_proto._compileMaterial = function _compileMaterial(material) {\n\t\t\tvar tmpMesh = new Mesh(_lodPlanes[0], material);\n\n\t\t\tthis._renderer.compile(tmpMesh, _flatCamera);\n\t\t};\n\n\t\t_proto._sceneToCubeUV = function _sceneToCubeUV(scene, near, far, cubeUVRenderTarget) {\n\t\t\tvar fov = 90;\n\t\t\tvar aspect = 1;\n\t\t\tvar cubeCamera = new PerspectiveCamera(fov, aspect, near, far);\n\t\t\tvar upSign = [1, -1, 1, 1, 1, 1];\n\t\t\tvar forwardSign = [1, 1, 1, -1, -1, -1];\n\t\t\tvar renderer = this._renderer;\n\t\t\tvar originalAutoClear = renderer.autoClear;\n\t\t\tvar outputEncoding = renderer.outputEncoding;\n\t\t\tvar toneMapping = renderer.toneMapping;\n\t\t\trenderer.getClearColor(_clearColor);\n\t\t\trenderer.toneMapping = NoToneMapping;\n\t\t\trenderer.outputEncoding = LinearEncoding;\n\t\t\trenderer.autoClear = false;\n\t\t\tvar useSolidColor = false;\n\t\t\tvar background = scene.background;\n\n\t\t\tif (background) {\n\t\t\t\tif (background.isColor) {\n\t\t\t\t\tbackgroundMaterial.color.copy(background).convertSRGBToLinear();\n\t\t\t\t\tscene.background = null;\n\t\t\t\t\tvar alpha = convertLinearToRGBE(backgroundMaterial.color);\n\t\t\t\t\tbackgroundMaterial.opacity = alpha;\n\t\t\t\t\tuseSolidColor = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbackgroundMaterial.color.copy(_clearColor).convertSRGBToLinear();\n\n\t\t\t\tvar _alpha = convertLinearToRGBE(backgroundMaterial.color);\n\n\t\t\t\tbackgroundMaterial.opacity = _alpha;\n\t\t\t\tuseSolidColor = true;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < 6; i++) {\n\t\t\t\tvar col = i % 3;\n\n\t\t\t\tif (col == 0) {\n\t\t\t\t\tcubeCamera.up.set(0, upSign[i], 0);\n\t\t\t\t\tcubeCamera.lookAt(forwardSign[i], 0, 0);\n\t\t\t\t} else if (col == 1) {\n\t\t\t\t\tcubeCamera.up.set(0, 0, upSign[i]);\n\t\t\t\t\tcubeCamera.lookAt(0, forwardSign[i], 0);\n\t\t\t\t} else {\n\t\t\t\t\tcubeCamera.up.set(0, upSign[i], 0);\n\t\t\t\t\tcubeCamera.lookAt(0, 0, forwardSign[i]);\n\t\t\t\t}\n\n\t\t\t\t_setViewport(cubeUVRenderTarget, col * SIZE_MAX, i > 2 ? SIZE_MAX : 0, SIZE_MAX, SIZE_MAX);\n\n\t\t\t\trenderer.setRenderTarget(cubeUVRenderTarget);\n\n\t\t\t\tif (useSolidColor) {\n\t\t\t\t\trenderer.render(backgroundBox, cubeCamera);\n\t\t\t\t}\n\n\t\t\t\trenderer.render(scene, cubeCamera);\n\t\t\t}\n\n\t\t\trenderer.toneMapping = toneMapping;\n\t\t\trenderer.outputEncoding = outputEncoding;\n\t\t\trenderer.autoClear = originalAutoClear;\n\t\t};\n\n\t\t_proto._textureToCubeUV = function _textureToCubeUV(texture, cubeUVRenderTarget) {\n\t\t\tvar renderer = this._renderer;\n\n\t\t\tif (texture.isCubeTexture) {\n\t\t\t\tif (this._cubemapShader == null) {\n\t\t\t\t\tthis._cubemapShader = _getCubemapShader();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this._equirectShader == null) {\n\t\t\t\t\tthis._equirectShader = _getEquirectShader();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar material = texture.isCubeTexture ? this._cubemapShader : this._equirectShader;\n\t\t\tvar mesh = new Mesh(_lodPlanes[0], material);\n\t\t\tvar uniforms = material.uniforms;\n\t\t\tuniforms['envMap'].value = texture;\n\n\t\t\tif (!texture.isCubeTexture) {\n\t\t\t\tuniforms['texelSize'].value.set(1.0 / texture.image.width, 1.0 / texture.image.height);\n\t\t\t}\n\n\t\t\tuniforms['inputEncoding'].value = ENCODINGS[texture.encoding];\n\t\t\tuniforms['outputEncoding'].value = ENCODINGS[cubeUVRenderTarget.texture.encoding];\n\n\t\t\t_setViewport(cubeUVRenderTarget, 0, 0, 3 * SIZE_MAX, 2 * SIZE_MAX);\n\n\t\t\trenderer.setRenderTarget(cubeUVRenderTarget);\n\t\t\trenderer.render(mesh, _flatCamera);\n\t\t};\n\n\t\t_proto._applyPMREM = function _applyPMREM(cubeUVRenderTarget) {\n\t\t\tvar renderer = this._renderer;\n\t\t\tvar autoClear = renderer.autoClear;\n\t\t\trenderer.autoClear = false;\n\n\t\t\tfor (var i = 1; i < TOTAL_LODS; i++) {\n\t\t\t\tvar sigma = Math.sqrt(_sigmas[i] * _sigmas[i] - _sigmas[i - 1] * _sigmas[i - 1]);\n\t\t\t\tvar poleAxis = _axisDirections[(i - 1) % _axisDirections.length];\n\n\t\t\t\tthis._blur(cubeUVRenderTarget, i - 1, i, sigma, poleAxis);\n\t\t\t}\n\n\t\t\trenderer.autoClear = autoClear;\n\t\t}\n\t\t/**\n\t\t * This is a two-pass Gaussian blur for a cubemap. Normally this is done\n\t\t * vertically and horizontally, but this breaks down on a cube. Here we apply\n\t\t * the blur latitudinally (around the poles), and then longitudinally (towards\n\t\t * the poles) to approximate the orthogonally-separable blur. It is least\n\t\t * accurate at the poles, but still does a decent job.\n\t\t */\n\t\t;\n\n\t\t_proto._blur = function _blur(cubeUVRenderTarget, lodIn, lodOut, sigma, poleAxis) {\n\t\t\tvar pingPongRenderTarget = this._pingPongRenderTarget;\n\n\t\t\tthis._halfBlur(cubeUVRenderTarget, pingPongRenderTarget, lodIn, lodOut, sigma, 'latitudinal', poleAxis);\n\n\t\t\tthis._halfBlur(pingPongRenderTarget, cubeUVRenderTarget, lodOut, lodOut, sigma, 'longitudinal', poleAxis);\n\t\t};\n\n\t\t_proto._halfBlur = function _halfBlur(targetIn, targetOut, lodIn, lodOut, sigmaRadians, direction, poleAxis) {\n\t\t\tvar renderer = this._renderer;\n\t\t\tvar blurMaterial = this._blurMaterial;\n\n\t\t\tif (direction !== 'latitudinal' && direction !== 'longitudinal') {\n\t\t\t\tconsole.error('blur direction must be either latitudinal or longitudinal!');\n\t\t\t} // Number of standard deviations at which to cut off the discrete approximation.\n\n\n\t\t\tvar STANDARD_DEVIATIONS = 3;\n\t\t\tvar blurMesh = new Mesh(_lodPlanes[lodOut], blurMaterial);\n\t\t\tvar blurUniforms = blurMaterial.uniforms;\n\t\t\tvar pixels = _sizeLods[lodIn] - 1;\n\t\t\tvar radiansPerPixel = isFinite(sigmaRadians) ? Math.PI / (2 * pixels) : 2 * Math.PI / (2 * MAX_SAMPLES - 1);\n\t\t\tvar sigmaPixels = sigmaRadians / radiansPerPixel;\n\t\t\tvar samples = isFinite(sigmaRadians) ? 1 + Math.floor(STANDARD_DEVIATIONS * sigmaPixels) : MAX_SAMPLES;\n\n\t\t\tif (samples > MAX_SAMPLES) {\n\t\t\t\tconsole.warn(\"sigmaRadians, \" + sigmaRadians + \", is too large and will clip, as it requested \" + samples + \" samples when the maximum is set to \" + MAX_SAMPLES);\n\t\t\t}\n\n\t\t\tvar weights = [];\n\t\t\tvar sum = 0;\n\n\t\t\tfor (var i = 0; i < MAX_SAMPLES; ++i) {\n\t\t\t\tvar _x = i / sigmaPixels;\n\n\t\t\t\tvar weight = Math.exp(-_x * _x / 2);\n\t\t\t\tweights.push(weight);\n\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tsum += weight;\n\t\t\t\t} else if (i < samples) {\n\t\t\t\t\tsum += 2 * weight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (var _i = 0; _i < weights.length; _i++) {\n\t\t\t\tweights[_i] = weights[_i] / sum;\n\t\t\t}\n\n\t\t\tblurUniforms['envMap'].value = targetIn.texture;\n\t\t\tblurUniforms['samples'].value = samples;\n\t\t\tblurUniforms['weights'].value = weights;\n\t\t\tblurUniforms['latitudinal'].value = direction === 'latitudinal';\n\n\t\t\tif (poleAxis) {\n\t\t\t\tblurUniforms['poleAxis'].value = poleAxis;\n\t\t\t}\n\n\t\t\tblurUniforms['dTheta'].value = radiansPerPixel;\n\t\t\tblurUniforms['mipInt'].value = LOD_MAX - lodIn;\n\t\t\tblurUniforms['inputEncoding'].value = ENCODINGS[targetIn.texture.encoding];\n\t\t\tblurUniforms['outputEncoding'].value = ENCODINGS[targetIn.texture.encoding];\n\t\t\tvar outputSize = _sizeLods[lodOut];\n\t\t\tvar x = 3 * Math.max(0, SIZE_MAX - 2 * outputSize);\n\t\t\tvar y = (lodOut === 0 ? 0 : 2 * SIZE_MAX) + 2 * outputSize * (lodOut > LOD_MAX - LOD_MIN ? lodOut - LOD_MAX + LOD_MIN : 0);\n\n\t\t\t_setViewport(targetOut, x, y, 3 * outputSize, 2 * outputSize);\n\n\t\t\trenderer.setRenderTarget(targetOut);\n\t\t\trenderer.render(blurMesh, _flatCamera);\n\t\t};\n\n\t\treturn PMREMGenerator;\n\t}();\n\n\tfunction _isLDR(texture) {\n\t\tif (texture === undefined || texture.type !== UnsignedByteType) return false;\n\t\treturn texture.encoding === LinearEncoding || texture.encoding === sRGBEncoding || texture.encoding === GammaEncoding;\n\t}\n\n\tfunction _createPlanes() {\n\t\tvar _lodPlanes = [];\n\t\tvar _sizeLods = [];\n\t\tvar _sigmas = [];\n\t\tvar lod = LOD_MAX;\n\n\t\tfor (var i = 0; i < TOTAL_LODS; i++) {\n\t\t\tvar sizeLod = Math.pow(2, lod);\n\n\t\t\t_sizeLods.push(sizeLod);\n\n\t\t\tvar sigma = 1.0 / sizeLod;\n\n\t\t\tif (i > LOD_MAX - LOD_MIN) {\n\t\t\t\tsigma = EXTRA_LOD_SIGMA[i - LOD_MAX + LOD_MIN - 1];\n\t\t\t} else if (i == 0) {\n\t\t\t\tsigma = 0;\n\t\t\t}\n\n\t\t\t_sigmas.push(sigma);\n\n\t\t\tvar texelSize = 1.0 / (sizeLod - 1);\n\t\t\tvar min = -texelSize / 2;\n\t\t\tvar max = 1 + texelSize / 2;\n\t\t\tvar uv1 = [min, min, max, min, max, max, min, min, max, max, min, max];\n\t\t\tvar cubeFaces = 6;\n\t\t\tvar vertices = 6;\n\t\t\tvar positionSize = 3;\n\t\t\tvar uvSize = 2;\n\t\t\tvar faceIndexSize = 1;\n\t\t\tvar position = new Float32Array(positionSize * vertices * cubeFaces);\n\t\t\tvar uv = new Float32Array(uvSize * vertices * cubeFaces);\n\t\t\tvar faceIndex = new Float32Array(faceIndexSize * vertices * cubeFaces);\n\n\t\t\tfor (var face = 0; face < cubeFaces; face++) {\n\t\t\t\tvar x = face % 3 * 2 / 3 - 1;\n\t\t\t\tvar y = face > 2 ? 0 : -1;\n\t\t\t\tvar coordinates = [x, y, 0, x + 2 / 3, y, 0, x + 2 / 3, y + 1, 0, x, y, 0, x + 2 / 3, y + 1, 0, x, y + 1, 0];\n\t\t\t\tposition.set(coordinates, positionSize * vertices * face);\n\t\t\t\tuv.set(uv1, uvSize * vertices * face);\n\t\t\t\tvar fill = [face, face, face, face, face, face];\n\t\t\t\tfaceIndex.set(fill, faceIndexSize * vertices * face);\n\t\t\t}\n\n\t\t\tvar planes = new BufferGeometry();\n\t\t\tplanes.setAttribute('position', new BufferAttribute(position, positionSize));\n\t\t\tplanes.setAttribute('uv', new BufferAttribute(uv, uvSize));\n\t\t\tplanes.setAttribute('faceIndex', new BufferAttribute(faceIndex, faceIndexSize));\n\n\t\t\t_lodPlanes.push(planes);\n\n\t\t\tif (lod > LOD_MIN) {\n\t\t\t\tlod--;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\t_lodPlanes: _lodPlanes,\n\t\t\t_sizeLods: _sizeLods,\n\t\t\t_sigmas: _sigmas\n\t\t};\n\t}\n\n\tfunction _createRenderTarget(params) {\n\t\tvar cubeUVRenderTarget = new WebGLRenderTarget(3 * SIZE_MAX, 3 * SIZE_MAX, params);\n\t\tcubeUVRenderTarget.texture.mapping = CubeUVReflectionMapping;\n\t\tcubeUVRenderTarget.texture.name = 'PMREM.cubeUv';\n\t\tcubeUVRenderTarget.scissorTest = true;\n\t\treturn cubeUVRenderTarget;\n\t}\n\n\tfunction _setViewport(target, x, y, width, height) {\n\t\ttarget.viewport.set(x, y, width, height);\n\t\ttarget.scissor.set(x, y, width, height);\n\t}\n\n\tfunction _getBlurShader(maxSamples) {\n\t\tvar weights = new Float32Array(maxSamples);\n\t\tvar poleAxis = new Vector3(0, 1, 0);\n\t\tvar shaderMaterial = new RawShaderMaterial({\n\t\t\tname: 'SphericalGaussianBlur',\n\t\t\tdefines: {\n\t\t\t\t'n': maxSamples\n\t\t\t},\n\t\t\tuniforms: {\n\t\t\t\t'envMap': {\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\t'samples': {\n\t\t\t\t\tvalue: 1\n\t\t\t\t},\n\t\t\t\t'weights': {\n\t\t\t\t\tvalue: weights\n\t\t\t\t},\n\t\t\t\t'latitudinal': {\n\t\t\t\t\tvalue: false\n\t\t\t\t},\n\t\t\t\t'dTheta': {\n\t\t\t\t\tvalue: 0\n\t\t\t\t},\n\t\t\t\t'mipInt': {\n\t\t\t\t\tvalue: 0\n\t\t\t\t},\n\t\t\t\t'poleAxis': {\n\t\t\t\t\tvalue: poleAxis\n\t\t\t\t},\n\t\t\t\t'inputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t},\n\t\t\t\t'outputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: _getCommonVertexShader(),\n\t\t\tfragmentShader:\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform sampler2D envMap;\\n\\t\\t\\tuniform int samples;\\n\\t\\t\\tuniform float weights[ n ];\\n\\t\\t\\tuniform bool latitudinal;\\n\\t\\t\\tuniform float dTheta;\\n\\t\\t\\tuniform float mipInt;\\n\\t\\t\\tuniform vec3 poleAxis;\\n\\n\\t\\t\\t\" + _getEncodings() + \"\\n\\n\\t\\t\\t#define ENVMAP_TYPE_CUBE_UV\\n\\t\\t\\t#include <cube_uv_reflection_fragment>\\n\\n\\t\\t\\tvec3 getSample( float theta, vec3 axis ) {\\n\\n\\t\\t\\t\\tfloat cosTheta = cos( theta );\\n\\t\\t\\t\\t// Rodrigues' axis-angle rotation\\n\\t\\t\\t\\tvec3 sampleDirection = vOutputDirection * cosTheta\\n\\t\\t\\t\\t\\t+ cross( axis, vOutputDirection ) * sin( theta )\\n\\t\\t\\t\\t\\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\\n\\n\\t\\t\\t\\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\\n\\n\\t\\t\\t}\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\\n\\n\\t\\t\\t\\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\\n\\n\\t\\t\\t\\t\\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\taxis = normalize( axis );\\n\\n\\t\\t\\t\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\t\\t\\t\\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\\n\\n\\t\\t\\t\\tfor ( int i = 1; i < n; i++ ) {\\n\\n\\t\\t\\t\\t\\tif ( i >= samples ) {\\n\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\tfloat theta = dTheta * float( i );\\n\\t\\t\\t\\t\\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\\n\\t\\t\\t\\t\\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tgl_FragColor = linearToOutputTexel( gl_FragColor );\\n\\n\\t\\t\\t}\\n\\t\\t\",\n\t\t\tblending: NoBlending,\n\t\t\tdepthTest: false,\n\t\t\tdepthWrite: false\n\t\t});\n\t\treturn shaderMaterial;\n\t}\n\n\tfunction _getEquirectShader() {\n\t\tvar texelSize = new Vector2(1, 1);\n\t\tvar shaderMaterial = new RawShaderMaterial({\n\t\t\tname: 'EquirectangularToCubeUV',\n\t\t\tuniforms: {\n\t\t\t\t'envMap': {\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\t'texelSize': {\n\t\t\t\t\tvalue: texelSize\n\t\t\t\t},\n\t\t\t\t'inputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t},\n\t\t\t\t'outputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: _getCommonVertexShader(),\n\t\t\tfragmentShader:\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform sampler2D envMap;\\n\\t\\t\\tuniform vec2 texelSize;\\n\\n\\t\\t\\t\" + _getEncodings() + \"\\n\\n\\t\\t\\t#include <common>\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\n\\t\\t\\t\\tvec3 outputDirection = normalize( vOutputDirection );\\n\\t\\t\\t\\tvec2 uv = equirectUv( outputDirection );\\n\\n\\t\\t\\t\\tvec2 f = fract( uv / texelSize - 0.5 );\\n\\t\\t\\t\\tuv -= f * texelSize;\\n\\t\\t\\t\\tvec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\\n\\t\\t\\t\\tuv.x += texelSize.x;\\n\\t\\t\\t\\tvec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\\n\\t\\t\\t\\tuv.y += texelSize.y;\\n\\t\\t\\t\\tvec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\\n\\t\\t\\t\\tuv.x -= texelSize.x;\\n\\t\\t\\t\\tvec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb;\\n\\n\\t\\t\\t\\tvec3 tm = mix( tl, tr, f.x );\\n\\t\\t\\t\\tvec3 bm = mix( bl, br, f.x );\\n\\t\\t\\t\\tgl_FragColor.rgb = mix( tm, bm, f.y );\\n\\n\\t\\t\\t\\tgl_FragColor = linearToOutputTexel( gl_FragColor );\\n\\n\\t\\t\\t}\\n\\t\\t\",\n\t\t\tblending: NoBlending,\n\t\t\tdepthTest: false,\n\t\t\tdepthWrite: false\n\t\t});\n\t\treturn shaderMaterial;\n\t}\n\n\tfunction _getCubemapShader() {\n\t\tvar shaderMaterial = new RawShaderMaterial({\n\t\t\tname: 'CubemapToCubeUV',\n\t\t\tuniforms: {\n\t\t\t\t'envMap': {\n\t\t\t\t\tvalue: null\n\t\t\t\t},\n\t\t\t\t'inputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t},\n\t\t\t\t'outputEncoding': {\n\t\t\t\t\tvalue: ENCODINGS[LinearEncoding]\n\t\t\t\t}\n\t\t\t},\n\t\t\tvertexShader: _getCommonVertexShader(),\n\t\t\tfragmentShader:\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\t\\tprecision mediump float;\\n\\t\\t\\tprecision mediump int;\\n\\n\\t\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t\\tuniform samplerCube envMap;\\n\\n\\t\\t\\t\" + _getEncodings() + \"\\n\\n\\t\\t\\tvoid main() {\\n\\n\\t\\t\\t\\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\\n\\t\\t\\t\\tgl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb;\\n\\t\\t\\t\\tgl_FragColor = linearToOutputTexel( gl_FragColor );\\n\\n\\t\\t\\t}\\n\\t\\t\",\n\t\t\tblending: NoBlending,\n\t\t\tdepthTest: false,\n\t\t\tdepthWrite: false\n\t\t});\n\t\treturn shaderMaterial;\n\t}\n\n\tfunction _getCommonVertexShader() {\n\t\treturn (\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\tprecision mediump float;\\n\\t\\tprecision mediump int;\\n\\n\\t\\tattribute vec3 position;\\n\\t\\tattribute vec2 uv;\\n\\t\\tattribute float faceIndex;\\n\\n\\t\\tvarying vec3 vOutputDirection;\\n\\n\\t\\t// RH coordinate system; PMREM face-indexing convention\\n\\t\\tvec3 getDirection( vec2 uv, float face ) {\\n\\n\\t\\t\\tuv = 2.0 * uv - 1.0;\\n\\n\\t\\t\\tvec3 direction = vec3( uv, 1.0 );\\n\\n\\t\\t\\tif ( face == 0.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx; // ( 1, v, u ) pos x\\n\\n\\t\\t\\t} else if ( face == 1.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\\n\\n\\t\\t\\t} else if ( face == 2.0 ) {\\n\\n\\t\\t\\t\\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\\n\\n\\t\\t\\t} else if ( face == 3.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.zyx;\\n\\t\\t\\t\\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\\n\\n\\t\\t\\t} else if ( face == 4.0 ) {\\n\\n\\t\\t\\t\\tdirection = direction.xzy;\\n\\t\\t\\t\\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\\n\\n\\t\\t\\t} else if ( face == 5.0 ) {\\n\\n\\t\\t\\t\\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\\n\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn direction;\\n\\n\\t\\t}\\n\\n\\t\\tvoid main() {\\n\\n\\t\\t\\tvOutputDirection = getDirection( uv, faceIndex );\\n\\t\\t\\tgl_Position = vec4( position, 1.0 );\\n\\n\\t\\t}\\n\\t\"\n\t\t);\n\t}\n\n\tfunction _getEncodings() {\n\t\treturn (\n\t\t\t/* glsl */\n\t\t\t\"\\n\\n\\t\\tuniform int inputEncoding;\\n\\t\\tuniform int outputEncoding;\\n\\n\\t\\t#include <encodings_pars_fragment>\\n\\n\\t\\tvec4 inputTexelToLinear( vec4 value ) {\\n\\n\\t\\t\\tif ( inputEncoding == 0 ) {\\n\\n\\t\\t\\t\\treturn value;\\n\\n\\t\\t\\t} else if ( inputEncoding == 1 ) {\\n\\n\\t\\t\\t\\treturn sRGBToLinear( value );\\n\\n\\t\\t\\t} else if ( inputEncoding == 2 ) {\\n\\n\\t\\t\\t\\treturn RGBEToLinear( value );\\n\\n\\t\\t\\t} else if ( inputEncoding == 3 ) {\\n\\n\\t\\t\\t\\treturn RGBMToLinear( value, 7.0 );\\n\\n\\t\\t\\t} else if ( inputEncoding == 4 ) {\\n\\n\\t\\t\\t\\treturn RGBMToLinear( value, 16.0 );\\n\\n\\t\\t\\t} else if ( inputEncoding == 5 ) {\\n\\n\\t\\t\\t\\treturn RGBDToLinear( value, 256.0 );\\n\\n\\t\\t\\t} else {\\n\\n\\t\\t\\t\\treturn GammaToLinear( value, 2.2 );\\n\\n\\t\\t\\t}\\n\\n\\t\\t}\\n\\n\\t\\tvec4 linearToOutputTexel( vec4 value ) {\\n\\n\\t\\t\\tif ( outputEncoding == 0 ) {\\n\\n\\t\\t\\t\\treturn value;\\n\\n\\t\\t\\t} else if ( outputEncoding == 1 ) {\\n\\n\\t\\t\\t\\treturn LinearTosRGB( value );\\n\\n\\t\\t\\t} else if ( outputEncoding == 2 ) {\\n\\n\\t\\t\\t\\treturn LinearToRGBE( value );\\n\\n\\t\\t\\t} else if ( outputEncoding == 3 ) {\\n\\n\\t\\t\\t\\treturn LinearToRGBM( value, 7.0 );\\n\\n\\t\\t\\t} else if ( outputEncoding == 4 ) {\\n\\n\\t\\t\\t\\treturn LinearToRGBM( value, 16.0 );\\n\\n\\t\\t\\t} else if ( outputEncoding == 5 ) {\\n\\n\\t\\t\\t\\treturn LinearToRGBD( value, 256.0 );\\n\\n\\t\\t\\t} else {\\n\\n\\t\\t\\t\\treturn LinearToGamma( value, 2.2 );\\n\\n\\t\\t\\t}\\n\\n\\t\\t}\\n\\n\\t\\tvec4 envMapTexelToLinear( vec4 color ) {\\n\\n\\t\\t\\treturn inputTexelToLinear( color );\\n\\n\\t\\t}\\n\\t\"\n\t\t);\n\t}\n\n\tfunction Face4(a, b, c, d, normal, color, materialIndex) {\n\t\tconsole.warn('THREE.Face4 has been removed. A THREE.Face3 will be created instead.');\n\t\treturn new Face3(a, b, c, normal, color, materialIndex);\n\t}\n\tvar LineStrip = 0;\n\tvar LinePieces = 1;\n\tvar NoColors = 0;\n\tvar FaceColors = 1;\n\tvar VertexColors = 2;\n\tfunction MeshFaceMaterial(materials) {\n\t\tconsole.warn('THREE.MeshFaceMaterial has been removed. Use an Array instead.');\n\t\treturn materials;\n\t}\n\tfunction MultiMaterial(materials) {\n\t\tif (materials === void 0) {\n\t\t\tmaterials = [];\n\t\t}\n\n\t\tconsole.warn('THREE.MultiMaterial has been removed. Use an Array instead.');\n\t\tmaterials.isMultiMaterial = true;\n\t\tmaterials.materials = materials;\n\n\t\tmaterials.clone = function () {\n\t\t\treturn materials.slice();\n\t\t};\n\n\t\treturn materials;\n\t}\n\tfunction PointCloud(geometry, material) {\n\t\tconsole.warn('THREE.PointCloud has been renamed to THREE.Points.');\n\t\treturn new Points(geometry, material);\n\t}\n\tfunction Particle(material) {\n\t\tconsole.warn('THREE.Particle has been renamed to THREE.Sprite.');\n\t\treturn new Sprite(material);\n\t}\n\tfunction ParticleSystem(geometry, material) {\n\t\tconsole.warn('THREE.ParticleSystem has been renamed to THREE.Points.');\n\t\treturn new Points(geometry, material);\n\t}\n\tfunction PointCloudMaterial(parameters) {\n\t\tconsole.warn('THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial.');\n\t\treturn new PointsMaterial(parameters);\n\t}\n\tfunction ParticleBasicMaterial(parameters) {\n\t\tconsole.warn('THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial.');\n\t\treturn new PointsMaterial(parameters);\n\t}\n\tfunction ParticleSystemMaterial(parameters) {\n\t\tconsole.warn('THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial.');\n\t\treturn new PointsMaterial(parameters);\n\t}\n\tfunction Vertex(x, y, z) {\n\t\tconsole.warn('THREE.Vertex has been removed. Use THREE.Vector3 instead.');\n\t\treturn new Vector3(x, y, z);\n\t} //\n\n\tfunction DynamicBufferAttribute(array, itemSize) {\n\t\tconsole.warn('THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead.');\n\t\treturn new BufferAttribute(array, itemSize).setUsage(DynamicDrawUsage);\n\t}\n\tfunction Int8Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead.');\n\t\treturn new Int8BufferAttribute(array, itemSize);\n\t}\n\tfunction Uint8Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead.');\n\t\treturn new Uint8BufferAttribute(array, itemSize);\n\t}\n\tfunction Uint8ClampedAttribute(array, itemSize) {\n\t\tconsole.warn('THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead.');\n\t\treturn new Uint8ClampedBufferAttribute(array, itemSize);\n\t}\n\tfunction Int16Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead.');\n\t\treturn new Int16BufferAttribute(array, itemSize);\n\t}\n\tfunction Uint16Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead.');\n\t\treturn new Uint16BufferAttribute(array, itemSize);\n\t}\n\tfunction Int32Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead.');\n\t\treturn new Int32BufferAttribute(array, itemSize);\n\t}\n\tfunction Uint32Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead.');\n\t\treturn new Uint32BufferAttribute(array, itemSize);\n\t}\n\tfunction Float32Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead.');\n\t\treturn new Float32BufferAttribute(array, itemSize);\n\t}\n\tfunction Float64Attribute(array, itemSize) {\n\t\tconsole.warn('THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead.');\n\t\treturn new Float64BufferAttribute(array, itemSize);\n\t} //\n\n\tCurve.create = function (construct, getPoint) {\n\t\tconsole.log('THREE.Curve.create() has been deprecated');\n\t\tconstruct.prototype = Object.create(Curve.prototype);\n\t\tconstruct.prototype.constructor = construct;\n\t\tconstruct.prototype.getPoint = getPoint;\n\t\treturn construct;\n\t}; //\n\n\n\tObject.assign(Path.prototype, {\n\t\tfromPoints: function fromPoints(points) {\n\t\t\tconsole.warn('THREE.Path: .fromPoints() has been renamed to .setFromPoints().');\n\t\t\treturn this.setFromPoints(points);\n\t\t}\n\t}); //\n\n\tfunction ClosedSplineCurve3(points) {\n\t\tconsole.warn('THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.');\n\t\tCatmullRomCurve3.call(this, points);\n\t\tthis.type = 'catmullrom';\n\t\tthis.closed = true;\n\t}\n\tClosedSplineCurve3.prototype = Object.create(CatmullRomCurve3.prototype); //\n\n\tfunction SplineCurve3(points) {\n\t\tconsole.warn('THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead.');\n\t\tCatmullRomCurve3.call(this, points);\n\t\tthis.type = 'catmullrom';\n\t}\n\tSplineCurve3.prototype = Object.create(CatmullRomCurve3.prototype); //\n\n\tfunction Spline(points) {\n\t\tconsole.warn('THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead.');\n\t\tCatmullRomCurve3.call(this, points);\n\t\tthis.type = 'catmullrom';\n\t}\n\tSpline.prototype = Object.create(CatmullRomCurve3.prototype);\n\tObject.assign(Spline.prototype, {\n\t\tinitFromArray: function initFromArray()\n\t\t/* a */\n\t\t{\n\t\t\tconsole.error('THREE.Spline: .initFromArray() has been removed.');\n\t\t},\n\t\tgetControlPointsArray: function getControlPointsArray()\n\t\t/* optionalTarget */\n\t\t{\n\t\t\tconsole.error('THREE.Spline: .getControlPointsArray() has been removed.');\n\t\t},\n\t\treparametrizeByArcLength: function reparametrizeByArcLength()\n\t\t/* samplingCoef */\n\t\t{\n\t\t\tconsole.error('THREE.Spline: .reparametrizeByArcLength() has been removed.');\n\t\t}\n\t}); //\n\n\tfunction AxisHelper(size) {\n\t\tconsole.warn('THREE.AxisHelper has been renamed to THREE.AxesHelper.');\n\t\treturn new AxesHelper(size);\n\t}\n\tfunction BoundingBoxHelper(object, color) {\n\t\tconsole.warn('THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead.');\n\t\treturn new BoxHelper(object, color);\n\t}\n\tfunction EdgesHelper(object, hex) {\n\t\tconsole.warn('THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead.');\n\t\treturn new LineSegments(new EdgesGeometry(object.geometry), new LineBasicMaterial({\n\t\t\tcolor: hex !== undefined ? hex : 0xffffff\n\t\t}));\n\t}\n\n\tGridHelper.prototype.setColors = function () {\n\t\tconsole.error('THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.');\n\t};\n\n\tSkeletonHelper.prototype.update = function () {\n\t\tconsole.error('THREE.SkeletonHelper: update() no longer needs to be called.');\n\t};\n\n\tfunction WireframeHelper(object, hex) {\n\t\tconsole.warn('THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead.');\n\t\treturn new LineSegments(new WireframeGeometry(object.geometry), new LineBasicMaterial({\n\t\t\tcolor: hex !== undefined ? hex : 0xffffff\n\t\t}));\n\t} //\n\n\tObject.assign(Loader.prototype, {\n\t\textractUrlBase: function extractUrlBase(url) {\n\t\t\tconsole.warn('THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead.');\n\t\t\treturn LoaderUtils.extractUrlBase(url);\n\t\t}\n\t});\n\tLoader.Handlers = {\n\t\tadd: function add()\n\t\t/* regex, loader */\n\t\t{\n\t\t\tconsole.error('THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.');\n\t\t},\n\t\tget: function get()\n\t\t/* file */\n\t\t{\n\t\t\tconsole.error('THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.');\n\t\t}\n\t};\n\tfunction XHRLoader(manager) {\n\t\tconsole.warn('THREE.XHRLoader has been renamed to THREE.FileLoader.');\n\t\treturn new FileLoader(manager);\n\t}\n\tfunction BinaryTextureLoader(manager) {\n\t\tconsole.warn('THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader.');\n\t\treturn new DataTextureLoader(manager);\n\t} //\n\n\tObject.assign(Box2.prototype, {\n\t\tcenter: function center(optionalTarget) {\n\t\t\tconsole.warn('THREE.Box2: .center() has been renamed to .getCenter().');\n\t\t\treturn this.getCenter(optionalTarget);\n\t\t},\n\t\tempty: function empty() {\n\t\t\tconsole.warn('THREE.Box2: .empty() has been renamed to .isEmpty().');\n\t\t\treturn this.isEmpty();\n\t\t},\n\t\tisIntersectionBox: function isIntersectionBox(box) {\n\t\t\tconsole.warn('THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox().');\n\t\t\treturn this.intersectsBox(box);\n\t\t},\n\t\tsize: function size(optionalTarget) {\n\t\t\tconsole.warn('THREE.Box2: .size() has been renamed to .getSize().');\n\t\t\treturn this.getSize(optionalTarget);\n\t\t}\n\t});\n\tObject.assign(Box3.prototype, {\n\t\tcenter: function center(optionalTarget) {\n\t\t\tconsole.warn('THREE.Box3: .center() has been renamed to .getCenter().');\n\t\t\treturn this.getCenter(optionalTarget);\n\t\t},\n\t\tempty: function empty() {\n\t\t\tconsole.warn('THREE.Box3: .empty() has been renamed to .isEmpty().');\n\t\t\treturn this.isEmpty();\n\t\t},\n\t\tisIntersectionBox: function isIntersectionBox(box) {\n\t\t\tconsole.warn('THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox().');\n\t\t\treturn this.intersectsBox(box);\n\t\t},\n\t\tisIntersectionSphere: function isIntersectionSphere(sphere) {\n\t\t\tconsole.warn('THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere().');\n\t\t\treturn this.intersectsSphere(sphere);\n\t\t},\n\t\tsize: function size(optionalTarget) {\n\t\t\tconsole.warn('THREE.Box3: .size() has been renamed to .getSize().');\n\t\t\treturn this.getSize(optionalTarget);\n\t\t}\n\t});\n\tObject.assign(Sphere.prototype, {\n\t\tempty: function empty() {\n\t\t\tconsole.warn('THREE.Sphere: .empty() has been renamed to .isEmpty().');\n\t\t\treturn this.isEmpty();\n\t\t}\n\t});\n\n\tFrustum.prototype.setFromMatrix = function (m) {\n\t\tconsole.warn('THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix().');\n\t\treturn this.setFromProjectionMatrix(m);\n\t};\n\n\tLine3.prototype.center = function (optionalTarget) {\n\t\tconsole.warn('THREE.Line3: .center() has been renamed to .getCenter().');\n\t\treturn this.getCenter(optionalTarget);\n\t};\n\n\tObject.assign(MathUtils, {\n\t\trandom16: function random16() {\n\t\t\tconsole.warn('THREE.Math: .random16() has been deprecated. Use Math.random() instead.');\n\t\t\treturn Math.random();\n\t\t},\n\t\tnearestPowerOfTwo: function nearestPowerOfTwo(value) {\n\t\t\tconsole.warn('THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo().');\n\t\t\treturn MathUtils.floorPowerOfTwo(value);\n\t\t},\n\t\tnextPowerOfTwo: function nextPowerOfTwo(value) {\n\t\t\tconsole.warn('THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo().');\n\t\t\treturn MathUtils.ceilPowerOfTwo(value);\n\t\t}\n\t});\n\tObject.assign(Matrix3.prototype, {\n\t\tflattenToArrayOffset: function flattenToArrayOffset(array, offset) {\n\t\t\tconsole.warn('THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.');\n\t\t\treturn this.toArray(array, offset);\n\t\t},\n\t\tmultiplyVector3: function multiplyVector3(vector) {\n\t\t\tconsole.warn('THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead.');\n\t\t\treturn vector.applyMatrix3(this);\n\t\t},\n\t\tmultiplyVector3Array: function multiplyVector3Array()\n\t\t/* a */\n\t\t{\n\t\t\tconsole.error('THREE.Matrix3: .multiplyVector3Array() has been removed.');\n\t\t},\n\t\tapplyToBufferAttribute: function applyToBufferAttribute(attribute) {\n\t\t\tconsole.warn('THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead.');\n\t\t\treturn attribute.applyMatrix3(this);\n\t\t},\n\t\tapplyToVector3Array: function applyToVector3Array()\n\t\t/* array, offset, length */\n\t\t{\n\t\t\tconsole.error('THREE.Matrix3: .applyToVector3Array() has been removed.');\n\t\t},\n\t\tgetInverse: function getInverse(matrix) {\n\t\t\tconsole.warn('THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.');\n\t\t\treturn this.copy(matrix).invert();\n\t\t}\n\t});\n\tObject.assign(Matrix4.prototype, {\n\t\textractPosition: function extractPosition(m) {\n\t\t\tconsole.warn('THREE.Matrix4: .extractPosition() has been renamed to .copyPosition().');\n\t\t\treturn this.copyPosition(m);\n\t\t},\n\t\tflattenToArrayOffset: function flattenToArrayOffset(array, offset) {\n\t\t\tconsole.warn('THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead.');\n\t\t\treturn this.toArray(array, offset);\n\t\t},\n\t\tgetPosition: function getPosition() {\n\t\t\tconsole.warn('THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead.');\n\t\t\treturn new Vector3().setFromMatrixColumn(this, 3);\n\t\t},\n\t\tsetRotationFromQuaternion: function setRotationFromQuaternion(q) {\n\t\t\tconsole.warn('THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion().');\n\t\t\treturn this.makeRotationFromQuaternion(q);\n\t\t},\n\t\tmultiplyToArray: function multiplyToArray() {\n\t\t\tconsole.warn('THREE.Matrix4: .multiplyToArray() has been removed.');\n\t\t},\n\t\tmultiplyVector3: function multiplyVector3(vector) {\n\t\t\tconsole.warn('THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead.');\n\t\t\treturn vector.applyMatrix4(this);\n\t\t},\n\t\tmultiplyVector4: function multiplyVector4(vector) {\n\t\t\tconsole.warn('THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead.');\n\t\t\treturn vector.applyMatrix4(this);\n\t\t},\n\t\tmultiplyVector3Array: function multiplyVector3Array()\n\t\t/* a */\n\t\t{\n\t\t\tconsole.error('THREE.Matrix4: .multiplyVector3Array() has been removed.');\n\t\t},\n\t\trotateAxis: function rotateAxis(v) {\n\t\t\tconsole.warn('THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead.');\n\t\t\tv.transformDirection(this);\n\t\t},\n\t\tcrossVector: function crossVector(vector) {\n\t\t\tconsole.warn('THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead.');\n\t\t\treturn vector.applyMatrix4(this);\n\t\t},\n\t\ttranslate: function translate() {\n\t\t\tconsole.error('THREE.Matrix4: .translate() has been removed.');\n\t\t},\n\t\trotateX: function rotateX() {\n\t\t\tconsole.error('THREE.Matrix4: .rotateX() has been removed.');\n\t\t},\n\t\trotateY: function rotateY() {\n\t\t\tconsole.error('THREE.Matrix4: .rotateY() has been removed.');\n\t\t},\n\t\trotateZ: function rotateZ() {\n\t\t\tconsole.error('THREE.Matrix4: .rotateZ() has been removed.');\n\t\t},\n\t\trotateByAxis: function rotateByAxis() {\n\t\t\tconsole.error('THREE.Matrix4: .rotateByAxis() has been removed.');\n\t\t},\n\t\tapplyToBufferAttribute: function applyToBufferAttribute(attribute) {\n\t\t\tconsole.warn('THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead.');\n\t\t\treturn attribute.applyMatrix4(this);\n\t\t},\n\t\tapplyToVector3Array: function applyToVector3Array()\n\t\t/* array, offset, length */\n\t\t{\n\t\t\tconsole.error('THREE.Matrix4: .applyToVector3Array() has been removed.');\n\t\t},\n\t\tmakeFrustum: function makeFrustum(left, right, bottom, top, near, far) {\n\t\t\tconsole.warn('THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead.');\n\t\t\treturn this.makePerspective(left, right, top, bottom, near, far);\n\t\t},\n\t\tgetInverse: function getInverse(matrix) {\n\t\t\tconsole.warn('THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead.');\n\t\t\treturn this.copy(matrix).invert();\n\t\t}\n\t});\n\n\tPlane.prototype.isIntersectionLine = function (line) {\n\t\tconsole.warn('THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine().');\n\t\treturn this.intersectsLine(line);\n\t};\n\n\tObject.assign(Quaternion.prototype, {\n\t\tmultiplyVector3: function multiplyVector3(vector) {\n\t\t\tconsole.warn('THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead.');\n\t\t\treturn vector.applyQuaternion(this);\n\t\t},\n\t\tinverse: function inverse() {\n\t\t\tconsole.warn('THREE.Quaternion: .inverse() has been renamed to invert().');\n\t\t\treturn this.invert();\n\t\t}\n\t});\n\tObject.assign(Ray.prototype, {\n\t\tisIntersectionBox: function isIntersectionBox(box) {\n\t\t\tconsole.warn('THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox().');\n\t\t\treturn this.intersectsBox(box);\n\t\t},\n\t\tisIntersectionPlane: function isIntersectionPlane(plane) {\n\t\t\tconsole.warn('THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane().');\n\t\t\treturn this.intersectsPlane(plane);\n\t\t},\n\t\tisIntersectionSphere: function isIntersectionSphere(sphere) {\n\t\t\tconsole.warn('THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere().');\n\t\t\treturn this.intersectsSphere(sphere);\n\t\t}\n\t});\n\tObject.assign(Triangle.prototype, {\n\t\tarea: function area() {\n\t\t\tconsole.warn('THREE.Triangle: .area() has been renamed to .getArea().');\n\t\t\treturn this.getArea();\n\t\t},\n\t\tbarycoordFromPoint: function barycoordFromPoint(point, target) {\n\t\t\tconsole.warn('THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().');\n\t\t\treturn this.getBarycoord(point, target);\n\t\t},\n\t\tmidpoint: function midpoint(target) {\n\t\t\tconsole.warn('THREE.Triangle: .midpoint() has been renamed to .getMidpoint().');\n\t\t\treturn this.getMidpoint(target);\n\t\t},\n\t\tnormal: function normal(target) {\n\t\t\tconsole.warn('THREE.Triangle: .normal() has been renamed to .getNormal().');\n\t\t\treturn this.getNormal(target);\n\t\t},\n\t\tplane: function plane(target) {\n\t\t\tconsole.warn('THREE.Triangle: .plane() has been renamed to .getPlane().');\n\t\t\treturn this.getPlane(target);\n\t\t}\n\t});\n\tObject.assign(Triangle, {\n\t\tbarycoordFromPoint: function barycoordFromPoint(point, a, b, c, target) {\n\t\t\tconsole.warn('THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord().');\n\t\t\treturn Triangle.getBarycoord(point, a, b, c, target);\n\t\t},\n\t\tnormal: function normal(a, b, c, target) {\n\t\t\tconsole.warn('THREE.Triangle: .normal() has been renamed to .getNormal().');\n\t\t\treturn Triangle.getNormal(a, b, c, target);\n\t\t}\n\t});\n\tObject.assign(Shape.prototype, {\n\t\textractAllPoints: function extractAllPoints(divisions) {\n\t\t\tconsole.warn('THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead.');\n\t\t\treturn this.extractPoints(divisions);\n\t\t},\n\t\textrude: function extrude(options) {\n\t\t\tconsole.warn('THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead.');\n\t\t\treturn new ExtrudeGeometry(this, options);\n\t\t},\n\t\tmakeGeometry: function makeGeometry(options) {\n\t\t\tconsole.warn('THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead.');\n\t\t\treturn new ShapeGeometry(this, options);\n\t\t}\n\t});\n\tObject.assign(Vector2.prototype, {\n\t\tfromAttribute: function fromAttribute(attribute, index, offset) {\n\t\t\tconsole.warn('THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute().');\n\t\t\treturn this.fromBufferAttribute(attribute, index, offset);\n\t\t},\n\t\tdistanceToManhattan: function distanceToManhattan(v) {\n\t\t\tconsole.warn('THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo().');\n\t\t\treturn this.manhattanDistanceTo(v);\n\t\t},\n\t\tlengthManhattan: function lengthManhattan() {\n\t\t\tconsole.warn('THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength().');\n\t\t\treturn this.manhattanLength();\n\t\t}\n\t});\n\tObject.assign(Vector3.prototype, {\n\t\tsetEulerFromRotationMatrix: function setEulerFromRotationMatrix() {\n\t\t\tconsole.error('THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.');\n\t\t},\n\t\tsetEulerFromQuaternion: function setEulerFromQuaternion() {\n\t\t\tconsole.error('THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.');\n\t\t},\n\t\tgetPositionFromMatrix: function getPositionFromMatrix(m) {\n\t\t\tconsole.warn('THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition().');\n\t\t\treturn this.setFromMatrixPosition(m);\n\t\t},\n\t\tgetScaleFromMatrix: function getScaleFromMatrix(m) {\n\t\t\tconsole.warn('THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale().');\n\t\t\treturn this.setFromMatrixScale(m);\n\t\t},\n\t\tgetColumnFromMatrix: function getColumnFromMatrix(index, matrix) {\n\t\t\tconsole.warn('THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn().');\n\t\t\treturn this.setFromMatrixColumn(matrix, index);\n\t\t},\n\t\tapplyProjection: function applyProjection(m) {\n\t\t\tconsole.warn('THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead.');\n\t\t\treturn this.applyMatrix4(m);\n\t\t},\n\t\tfromAttribute: function fromAttribute(attribute, index, offset) {\n\t\t\tconsole.warn('THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute().');\n\t\t\treturn this.fromBufferAttribute(attribute, index, offset);\n\t\t},\n\t\tdistanceToManhattan: function distanceToManhattan(v) {\n\t\t\tconsole.warn('THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo().');\n\t\t\treturn this.manhattanDistanceTo(v);\n\t\t},\n\t\tlengthManhattan: function lengthManhattan() {\n\t\t\tconsole.warn('THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength().');\n\t\t\treturn this.manhattanLength();\n\t\t}\n\t});\n\tObject.assign(Vector4.prototype, {\n\t\tfromAttribute: function fromAttribute(attribute, index, offset) {\n\t\t\tconsole.warn('THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute().');\n\t\t\treturn this.fromBufferAttribute(attribute, index, offset);\n\t\t},\n\t\tlengthManhattan: function lengthManhattan() {\n\t\t\tconsole.warn('THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength().');\n\t\t\treturn this.manhattanLength();\n\t\t}\n\t}); //\n\n\tObject.assign(Object3D.prototype, {\n\t\tgetChildByName: function getChildByName(name) {\n\t\t\tconsole.warn('THREE.Object3D: .getChildByName() has been renamed to .getObjectByName().');\n\t\t\treturn this.getObjectByName(name);\n\t\t},\n\t\trenderDepth: function renderDepth() {\n\t\t\tconsole.warn('THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.');\n\t\t},\n\t\ttranslate: function translate(distance, axis) {\n\t\t\tconsole.warn('THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead.');\n\t\t\treturn this.translateOnAxis(axis, distance);\n\t\t},\n\t\tgetWorldRotation: function getWorldRotation() {\n\t\t\tconsole.error('THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.');\n\t\t},\n\t\tapplyMatrix: function applyMatrix(matrix) {\n\t\t\tconsole.warn('THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4().');\n\t\t\treturn this.applyMatrix4(matrix);\n\t\t}\n\t});\n\tObject.defineProperties(Object3D.prototype, {\n\t\teulerOrder: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Object3D: .eulerOrder is now .rotation.order.');\n\t\t\t\treturn this.rotation.order;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Object3D: .eulerOrder is now .rotation.order.');\n\t\t\t\tthis.rotation.order = value;\n\t\t\t}\n\t\t},\n\t\tuseQuaternion: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.');\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.');\n\t\t\t}\n\t\t}\n\t});\n\tObject.assign(Mesh.prototype, {\n\t\tsetDrawMode: function setDrawMode() {\n\t\t\tconsole.error('THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.');\n\t\t}\n\t});\n\tObject.defineProperties(Mesh.prototype, {\n\t\tdrawMode: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.error('THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode.');\n\t\t\t\treturn TrianglesDrawMode;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.error('THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.');\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(LOD.prototype, {\n\t\tobjects: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.LOD: .objects has been renamed to .levels.');\n\t\t\t\treturn this.levels;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperty(Skeleton.prototype, 'useVertexTexture', {\n\t\tget: function get() {\n\t\t\tconsole.warn('THREE.Skeleton: useVertexTexture has been removed.');\n\t\t},\n\t\tset: function set() {\n\t\t\tconsole.warn('THREE.Skeleton: useVertexTexture has been removed.');\n\t\t}\n\t});\n\n\tSkinnedMesh.prototype.initBones = function () {\n\t\tconsole.error('THREE.SkinnedMesh: initBones() has been removed.');\n\t};\n\n\tObject.defineProperty(Curve.prototype, '__arcLengthDivisions', {\n\t\tget: function get() {\n\t\t\tconsole.warn('THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.');\n\t\t\treturn this.arcLengthDivisions;\n\t\t},\n\t\tset: function set(value) {\n\t\t\tconsole.warn('THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions.');\n\t\t\tthis.arcLengthDivisions = value;\n\t\t}\n\t}); //\n\n\tPerspectiveCamera.prototype.setLens = function (focalLength, filmGauge) {\n\t\tconsole.warn('THREE.PerspectiveCamera.setLens is deprecated. ' + 'Use .setFocalLength and .filmGauge for a photographic setup.');\n\t\tif (filmGauge !== undefined) this.filmGauge = filmGauge;\n\t\tthis.setFocalLength(focalLength);\n\t}; //\n\n\n\tObject.defineProperties(Light.prototype, {\n\t\tonlyShadow: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Light: .onlyShadow has been removed.');\n\t\t\t}\n\t\t},\n\t\tshadowCameraFov: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraFov is now .shadow.camera.fov.');\n\t\t\t\tthis.shadow.camera.fov = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraLeft: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraLeft is now .shadow.camera.left.');\n\t\t\t\tthis.shadow.camera.left = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraRight: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraRight is now .shadow.camera.right.');\n\t\t\t\tthis.shadow.camera.right = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraTop: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraTop is now .shadow.camera.top.');\n\t\t\t\tthis.shadow.camera.top = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraBottom: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.');\n\t\t\t\tthis.shadow.camera.bottom = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraNear: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraNear is now .shadow.camera.near.');\n\t\t\t\tthis.shadow.camera.near = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraFar: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraFar is now .shadow.camera.far.');\n\t\t\t\tthis.shadow.camera.far = value;\n\t\t\t}\n\t\t},\n\t\tshadowCameraVisible: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.');\n\t\t\t}\n\t\t},\n\t\tshadowBias: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowBias is now .shadow.bias.');\n\t\t\t\tthis.shadow.bias = value;\n\t\t\t}\n\t\t},\n\t\tshadowDarkness: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Light: .shadowDarkness has been removed.');\n\t\t\t}\n\t\t},\n\t\tshadowMapWidth: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.');\n\t\t\t\tthis.shadow.mapSize.width = value;\n\t\t\t}\n\t\t},\n\t\tshadowMapHeight: {\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.');\n\t\t\t\tthis.shadow.mapSize.height = value;\n\t\t\t}\n\t\t}\n\t}); //\n\n\tObject.defineProperties(BufferAttribute.prototype, {\n\t\tlength: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.BufferAttribute: .length has been deprecated. Use .count instead.');\n\t\t\t\treturn this.array.length;\n\t\t\t}\n\t\t},\n\t\tdynamic: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.');\n\t\t\t\treturn this.usage === DynamicDrawUsage;\n\t\t\t},\n\t\t\tset: function set()\n\t\t\t/* value */\n\t\t\t{\n\t\t\t\tconsole.warn('THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead.');\n\t\t\t\tthis.setUsage(DynamicDrawUsage);\n\t\t\t}\n\t\t}\n\t});\n\tObject.assign(BufferAttribute.prototype, {\n\t\tsetDynamic: function setDynamic(value) {\n\t\t\tconsole.warn('THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead.');\n\t\t\tthis.setUsage(value === true ? DynamicDrawUsage : StaticDrawUsage);\n\t\t\treturn this;\n\t\t},\n\t\tcopyIndicesArray: function copyIndicesArray()\n\t\t/* indices */\n\t\t{\n\t\t\tconsole.error('THREE.BufferAttribute: .copyIndicesArray() has been removed.');\n\t\t},\n\t\tsetArray: function setArray()\n\t\t/* array */\n\t\t{\n\t\t\tconsole.error('THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers');\n\t\t}\n\t});\n\tObject.assign(BufferGeometry.prototype, {\n\t\taddIndex: function addIndex(index) {\n\t\t\tconsole.warn('THREE.BufferGeometry: .addIndex() has been renamed to .setIndex().');\n\t\t\tthis.setIndex(index);\n\t\t},\n\t\taddAttribute: function addAttribute(name, attribute) {\n\t\t\tconsole.warn('THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute().');\n\n\t\t\tif (!(attribute && attribute.isBufferAttribute) && !(attribute && attribute.isInterleavedBufferAttribute)) {\n\t\t\t\tconsole.warn('THREE.BufferGeometry: .addAttribute() now expects ( name, attribute ).');\n\t\t\t\treturn this.setAttribute(name, new BufferAttribute(arguments[1], arguments[2]));\n\t\t\t}\n\n\t\t\tif (name === 'index') {\n\t\t\t\tconsole.warn('THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute.');\n\t\t\t\tthis.setIndex(attribute);\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\treturn this.setAttribute(name, attribute);\n\t\t},\n\t\taddDrawCall: function addDrawCall(start, count, indexOffset) {\n\t\t\tif (indexOffset !== undefined) {\n\t\t\t\tconsole.warn('THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset.');\n\t\t\t}\n\n\t\t\tconsole.warn('THREE.BufferGeometry: .addDrawCall() is now .addGroup().');\n\t\t\tthis.addGroup(start, count);\n\t\t},\n\t\tclearDrawCalls: function clearDrawCalls() {\n\t\t\tconsole.warn('THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups().');\n\t\t\tthis.clearGroups();\n\t\t},\n\t\tcomputeOffsets: function computeOffsets() {\n\t\t\tconsole.warn('THREE.BufferGeometry: .computeOffsets() has been removed.');\n\t\t},\n\t\tremoveAttribute: function removeAttribute(name) {\n\t\t\tconsole.warn('THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute().');\n\t\t\treturn this.deleteAttribute(name);\n\t\t},\n\t\tapplyMatrix: function applyMatrix(matrix) {\n\t\t\tconsole.warn('THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4().');\n\t\t\treturn this.applyMatrix4(matrix);\n\t\t}\n\t});\n\tObject.defineProperties(BufferGeometry.prototype, {\n\t\tdrawcalls: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.error('THREE.BufferGeometry: .drawcalls has been renamed to .groups.');\n\t\t\t\treturn this.groups;\n\t\t\t}\n\t\t},\n\t\toffsets: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.BufferGeometry: .offsets has been renamed to .groups.');\n\t\t\t\treturn this.groups;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(InstancedBufferGeometry.prototype, {\n\t\tmaxInstancedCount: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.');\n\t\t\t\treturn this.instanceCount;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.InstancedBufferGeometry: .maxInstancedCount has been renamed to .instanceCount.');\n\t\t\t\tthis.instanceCount = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(Raycaster.prototype, {\n\t\tlinePrecision: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.');\n\t\t\t\treturn this.params.Line.threshold;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.Raycaster: .linePrecision has been deprecated. Use .params.Line.threshold instead.');\n\t\t\t\tthis.params.Line.threshold = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(InterleavedBuffer.prototype, {\n\t\tdynamic: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.');\n\t\t\t\treturn this.usage === DynamicDrawUsage;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead.');\n\t\t\t\tthis.setUsage(value);\n\t\t\t}\n\t\t}\n\t});\n\tObject.assign(InterleavedBuffer.prototype, {\n\t\tsetDynamic: function setDynamic(value) {\n\t\t\tconsole.warn('THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead.');\n\t\t\tthis.setUsage(value === true ? DynamicDrawUsage : StaticDrawUsage);\n\t\t\treturn this;\n\t\t},\n\t\tsetArray: function setArray()\n\t\t/* array */\n\t\t{\n\t\t\tconsole.error('THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers');\n\t\t}\n\t}); //\n\n\tObject.assign(ExtrudeGeometry.prototype, {\n\t\tgetArrays: function getArrays() {\n\t\t\tconsole.error('THREE.ExtrudeGeometry: .getArrays() has been removed.');\n\t\t},\n\t\taddShapeList: function addShapeList() {\n\t\t\tconsole.error('THREE.ExtrudeGeometry: .addShapeList() has been removed.');\n\t\t},\n\t\taddShape: function addShape() {\n\t\t\tconsole.error('THREE.ExtrudeGeometry: .addShape() has been removed.');\n\t\t}\n\t}); //\n\n\tObject.assign(Scene.prototype, {\n\t\tdispose: function dispose() {\n\t\t\tconsole.error('THREE.Scene: .dispose() has been removed.');\n\t\t}\n\t}); //\n\n\tObject.defineProperties(Uniform.prototype, {\n\t\tdynamic: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.');\n\t\t\t}\n\t\t},\n\t\tonUpdate: {\n\t\t\tvalue: function value() {\n\t\t\t\tconsole.warn('THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead.');\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\t}); //\n\n\tObject.defineProperties(Material.prototype, {\n\t\twrapAround: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Material: .wrapAround has been removed.');\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Material: .wrapAround has been removed.');\n\t\t\t}\n\t\t},\n\t\toverdraw: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Material: .overdraw has been removed.');\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Material: .overdraw has been removed.');\n\t\t\t}\n\t\t},\n\t\twrapRGB: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.Material: .wrapRGB has been removed.');\n\t\t\t\treturn new Color();\n\t\t\t}\n\t\t},\n\t\tshading: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.error('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.');\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.');\n\t\t\t\tthis.flatShading = value === FlatShading;\n\t\t\t}\n\t\t},\n\t\tstencilMask: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.');\n\t\t\t\treturn this.stencilFuncMask;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.');\n\t\t\t\tthis.stencilFuncMask = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(MeshPhongMaterial.prototype, {\n\t\tmetal: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead.');\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead');\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(MeshPhysicalMaterial.prototype, {\n\t\ttransparency: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.');\n\t\t\t\treturn this.transmission;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.MeshPhysicalMaterial: .transparency has been renamed to .transmission.');\n\t\t\t\tthis.transmission = value;\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(ShaderMaterial.prototype, {\n\t\tderivatives: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives.');\n\t\t\t\treturn this.extensions.derivatives;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives.');\n\t\t\t\tthis.extensions.derivatives = value;\n\t\t\t}\n\t\t}\n\t}); //\n\n\tObject.assign(WebGLRenderer.prototype, {\n\t\tclearTarget: function clearTarget(renderTarget, color, depth, stencil) {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead.');\n\t\t\tthis.setRenderTarget(renderTarget);\n\t\t\tthis.clear(color, depth, stencil);\n\t\t},\n\t\tanimate: function animate(callback) {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .animate() is now .setAnimationLoop().');\n\t\t\tthis.setAnimationLoop(callback);\n\t\t},\n\t\tgetCurrentRenderTarget: function getCurrentRenderTarget() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget().');\n\t\t\treturn this.getRenderTarget();\n\t\t},\n\t\tgetMaxAnisotropy: function getMaxAnisotropy() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy().');\n\t\t\treturn this.capabilities.getMaxAnisotropy();\n\t\t},\n\t\tgetPrecision: function getPrecision() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision.');\n\t\t\treturn this.capabilities.precision;\n\t\t},\n\t\tresetGLState: function resetGLState() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .resetGLState() is now .state.reset().');\n\t\t\treturn this.state.reset();\n\t\t},\n\t\tsupportsFloatTextures: function supportsFloatTextures() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( \\'OES_texture_float\\' ).');\n\t\t\treturn this.extensions.get('OES_texture_float');\n\t\t},\n\t\tsupportsHalfFloatTextures: function supportsHalfFloatTextures() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( \\'OES_texture_half_float\\' ).');\n\t\t\treturn this.extensions.get('OES_texture_half_float');\n\t\t},\n\t\tsupportsStandardDerivatives: function supportsStandardDerivatives() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( \\'OES_standard_derivatives\\' ).');\n\t\t\treturn this.extensions.get('OES_standard_derivatives');\n\t\t},\n\t\tsupportsCompressedTextureS3TC: function supportsCompressedTextureS3TC() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( \\'WEBGL_compressed_texture_s3tc\\' ).');\n\t\t\treturn this.extensions.get('WEBGL_compressed_texture_s3tc');\n\t\t},\n\t\tsupportsCompressedTexturePVRTC: function supportsCompressedTexturePVRTC() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( \\'WEBGL_compressed_texture_pvrtc\\' ).');\n\t\t\treturn this.extensions.get('WEBGL_compressed_texture_pvrtc');\n\t\t},\n\t\tsupportsBlendMinMax: function supportsBlendMinMax() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( \\'EXT_blend_minmax\\' ).');\n\t\t\treturn this.extensions.get('EXT_blend_minmax');\n\t\t},\n\t\tsupportsVertexTextures: function supportsVertexTextures() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures.');\n\t\t\treturn this.capabilities.vertexTextures;\n\t\t},\n\t\tsupportsInstancedArrays: function supportsInstancedArrays() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( \\'ANGLE_instanced_arrays\\' ).');\n\t\t\treturn this.extensions.get('ANGLE_instanced_arrays');\n\t\t},\n\t\tenableScissorTest: function enableScissorTest(boolean) {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest().');\n\t\t\tthis.setScissorTest(boolean);\n\t\t},\n\t\tinitMaterial: function initMaterial() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .initMaterial() has been removed.');\n\t\t},\n\t\taddPrePlugin: function addPrePlugin() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .addPrePlugin() has been removed.');\n\t\t},\n\t\taddPostPlugin: function addPostPlugin() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .addPostPlugin() has been removed.');\n\t\t},\n\t\tupdateShadowMap: function updateShadowMap() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .updateShadowMap() has been removed.');\n\t\t},\n\t\tsetFaceCulling: function setFaceCulling() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .setFaceCulling() has been removed.');\n\t\t},\n\t\tallocTextureUnit: function allocTextureUnit() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .allocTextureUnit() has been removed.');\n\t\t},\n\t\tsetTexture: function setTexture() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .setTexture() has been removed.');\n\t\t},\n\t\tsetTextureCube: function setTextureCube() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .setTextureCube() has been removed.');\n\t\t},\n\t\tgetActiveMipMapLevel: function getActiveMipMapLevel() {\n\t\t\tconsole.warn('THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel().');\n\t\t\treturn this.getActiveMipmapLevel();\n\t\t}\n\t});\n\tObject.defineProperties(WebGLRenderer.prototype, {\n\t\tshadowMapEnabled: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.shadowMap.enabled;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled.');\n\t\t\t\tthis.shadowMap.enabled = value;\n\t\t\t}\n\t\t},\n\t\tshadowMapType: {\n\t\t\tget: function get() {\n\t\t\t\treturn this.shadowMap.type;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type.');\n\t\t\t\tthis.shadowMap.type = value;\n\t\t\t}\n\t\t},\n\t\tshadowMapCullFace: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.');\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t\tset: function set()\n\t\t\t/* value */\n\t\t\t{\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.');\n\t\t\t}\n\t\t},\n\t\tcontext: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .context has been removed. Use .getContext() instead.');\n\t\t\t\treturn this.getContext();\n\t\t\t}\n\t\t},\n\t\tvr: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .vr has been renamed to .xr');\n\t\t\t\treturn this.xr;\n\t\t\t}\n\t\t},\n\t\tgammaInput: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.');\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.');\n\t\t\t}\n\t\t},\n\t\tgammaOutput: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.');\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead.');\n\t\t\t\tthis.outputEncoding = value === true ? sRGBEncoding : LinearEncoding;\n\t\t\t}\n\t\t},\n\t\ttoneMappingWhitePoint: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.');\n\t\t\t\treturn 1.0;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.');\n\t\t\t}\n\t\t}\n\t});\n\tObject.defineProperties(WebGLShadowMap.prototype, {\n\t\tcullFace: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.');\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t\tset: function set()\n\t\t\t/* cullFace */\n\t\t\t{\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.');\n\t\t\t}\n\t\t},\n\t\trenderReverseSided: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.');\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.');\n\t\t\t}\n\t\t},\n\t\trenderSingleSided: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.');\n\t\t\t\treturn undefined;\n\t\t\t},\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.');\n\t\t\t}\n\t\t}\n\t});\n\tfunction WebGLRenderTargetCube(width, height, options) {\n\t\tconsole.warn('THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options ).');\n\t\treturn new WebGLCubeRenderTarget(width, options);\n\t} //\n\n\tObject.defineProperties(WebGLRenderTarget.prototype, {\n\t\twrapS: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.');\n\t\t\t\treturn this.texture.wrapS;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS.');\n\t\t\t\tthis.texture.wrapS = value;\n\t\t\t}\n\t\t},\n\t\twrapT: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.');\n\t\t\t\treturn this.texture.wrapT;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT.');\n\t\t\t\tthis.texture.wrapT = value;\n\t\t\t}\n\t\t},\n\t\tmagFilter: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.');\n\t\t\t\treturn this.texture.magFilter;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter.');\n\t\t\t\tthis.texture.magFilter = value;\n\t\t\t}\n\t\t},\n\t\tminFilter: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.');\n\t\t\t\treturn this.texture.minFilter;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter.');\n\t\t\t\tthis.texture.minFilter = value;\n\t\t\t}\n\t\t},\n\t\tanisotropy: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.');\n\t\t\t\treturn this.texture.anisotropy;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy.');\n\t\t\t\tthis.texture.anisotropy = value;\n\t\t\t}\n\t\t},\n\t\toffset: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .offset is now .texture.offset.');\n\t\t\t\treturn this.texture.offset;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .offset is now .texture.offset.');\n\t\t\t\tthis.texture.offset = value;\n\t\t\t}\n\t\t},\n\t\trepeat: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .repeat is now .texture.repeat.');\n\t\t\t\treturn this.texture.repeat;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .repeat is now .texture.repeat.');\n\t\t\t\tthis.texture.repeat = value;\n\t\t\t}\n\t\t},\n\t\tformat: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .format is now .texture.format.');\n\t\t\t\treturn this.texture.format;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .format is now .texture.format.');\n\t\t\t\tthis.texture.format = value;\n\t\t\t}\n\t\t},\n\t\ttype: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .type is now .texture.type.');\n\t\t\t\treturn this.texture.type;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .type is now .texture.type.');\n\t\t\t\tthis.texture.type = value;\n\t\t\t}\n\t\t},\n\t\tgenerateMipmaps: {\n\t\t\tget: function get() {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.');\n\t\t\t\treturn this.texture.generateMipmaps;\n\t\t\t},\n\t\t\tset: function set(value) {\n\t\t\t\tconsole.warn('THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps.');\n\t\t\t\tthis.texture.generateMipmaps = value;\n\t\t\t}\n\t\t}\n\t}); //\n\n\tObject.defineProperties(Audio.prototype, {\n\t\tload: {\n\t\t\tvalue: function value(file) {\n\t\t\t\tconsole.warn('THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.');\n\t\t\t\tvar scope = this;\n\t\t\t\tvar audioLoader = new AudioLoader();\n\t\t\t\taudioLoader.load(file, function (buffer) {\n\t\t\t\t\tscope.setBuffer(buffer);\n\t\t\t\t});\n\t\t\t\treturn this;\n\t\t\t}\n\t\t},\n\t\tstartTime: {\n\t\t\tset: function set() {\n\t\t\t\tconsole.warn('THREE.Audio: .startTime is now .play( delay ).');\n\t\t\t}\n\t\t}\n\t});\n\n\tAudioAnalyser.prototype.getData = function () {\n\t\tconsole.warn('THREE.AudioAnalyser: .getData() is now .getFrequencyData().');\n\t\treturn this.getFrequencyData();\n\t}; //\n\n\n\tCubeCamera.prototype.updateCubeMap = function (renderer, scene) {\n\t\tconsole.warn('THREE.CubeCamera: .updateCubeMap() is now .update().');\n\t\treturn this.update(renderer, scene);\n\t};\n\n\tCubeCamera.prototype.clear = function (renderer, color, depth, stencil) {\n\t\tconsole.warn('THREE.CubeCamera: .clear() is now .renderTarget.clear().');\n\t\treturn this.renderTarget.clear(renderer, color, depth, stencil);\n\t}; //\n\n\n\tvar GeometryUtils = {\n\t\tmerge: function merge(geometry1, geometry2, materialIndexOffset) {\n\t\t\tconsole.warn('THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead.');\n\t\t\tvar matrix;\n\n\t\t\tif (geometry2.isMesh) {\n\t\t\t\tgeometry2.matrixAutoUpdate && geometry2.updateMatrix();\n\t\t\t\tmatrix = geometry2.matrix;\n\t\t\t\tgeometry2 = geometry2.geometry;\n\t\t\t}\n\n\t\t\tgeometry1.merge(geometry2, matrix, materialIndexOffset);\n\t\t},\n\t\tcenter: function center(geometry) {\n\t\t\tconsole.warn('THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead.');\n\t\t\treturn geometry.center();\n\t\t}\n\t};\n\tImageUtils.crossOrigin = undefined;\n\n\tImageUtils.loadTexture = function (url, mapping, onLoad, onError) {\n\t\tconsole.warn('THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.');\n\t\tvar loader = new TextureLoader();\n\t\tloader.setCrossOrigin(this.crossOrigin);\n\t\tvar texture = loader.load(url, onLoad, undefined, onError);\n\t\tif (mapping) texture.mapping = mapping;\n\t\treturn texture;\n\t};\n\n\tImageUtils.loadTextureCube = function (urls, mapping, onLoad, onError) {\n\t\tconsole.warn('THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.');\n\t\tvar loader = new CubeTextureLoader();\n\t\tloader.setCrossOrigin(this.crossOrigin);\n\t\tvar texture = loader.load(urls, onLoad, undefined, onError);\n\t\tif (mapping) texture.mapping = mapping;\n\t\treturn texture;\n\t};\n\n\tImageUtils.loadCompressedTexture = function () {\n\t\tconsole.error('THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.');\n\t};\n\n\tImageUtils.loadCompressedTextureCube = function () {\n\t\tconsole.error('THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.');\n\t}; //\n\n\n\tfunction CanvasRenderer() {\n\t\tconsole.error('THREE.CanvasRenderer has been removed');\n\t} //\n\n\tfunction JSONLoader() {\n\t\tconsole.error('THREE.JSONLoader has been removed.');\n\t} //\n\n\tvar SceneUtils = {\n\t\tcreateMultiMaterialObject: function createMultiMaterialObject()\n\t\t/* geometry, materials */\n\t\t{\n\t\t\tconsole.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js');\n\t\t},\n\t\tdetach: function detach()\n\t\t/* child, parent, scene */\n\t\t{\n\t\t\tconsole.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js');\n\t\t},\n\t\tattach: function attach()\n\t\t/* child, scene, parent */\n\t\t{\n\t\t\tconsole.error('THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js');\n\t\t}\n\t}; //\n\n\tfunction LensFlare() {\n\t\tconsole.error('THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js');\n\t}\n\n\tif (typeof __THREE_DEVTOOLS__ !== 'undefined') {\n\t\t/* eslint-disable no-undef */\n\t\t__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent('register', {\n\t\t\tdetail: {\n\t\t\t\trevision: REVISION\n\t\t\t}\n\t\t}));\n\t\t/* eslint-enable no-undef */\n\n\t}\n\n\tif (typeof window !== 'undefined') {\n\t\tif (window.__THREE__) {\n\t\t\tconsole.warn('WARNING: Multiple instances of Three.js being imported.');\n\t\t} else {\n\t\t\twindow.__THREE__ = REVISION;\n\t\t}\n\t}\n\n\texports.ACESFilmicToneMapping = ACESFilmicToneMapping;\n\texports.AddEquation = AddEquation;\n\texports.AddOperation = AddOperation;\n\texports.AdditiveAnimationBlendMode = AdditiveAnimationBlendMode;\n\texports.AdditiveBlending = AdditiveBlending;\n\texports.AlphaFormat = AlphaFormat;\n\texports.AlwaysDepth = AlwaysDepth;\n\texports.AlwaysStencilFunc = AlwaysStencilFunc;\n\texports.AmbientLight = AmbientLight;\n\texports.AmbientLightProbe = AmbientLightProbe;\n\texports.AnimationClip = AnimationClip;\n\texports.AnimationLoader = AnimationLoader;\n\texports.AnimationMixer = AnimationMixer;\n\texports.AnimationObjectGroup = AnimationObjectGroup;\n\texports.AnimationUtils = AnimationUtils;\n\texports.ArcCurve = ArcCurve;\n\texports.ArrayCamera = ArrayCamera;\n\texports.ArrowHelper = ArrowHelper;\n\texports.Audio = Audio;\n\texports.AudioAnalyser = AudioAnalyser;\n\texports.AudioContext = AudioContext;\n\texports.AudioListener = AudioListener;\n\texports.AudioLoader = AudioLoader;\n\texports.AxesHelper = AxesHelper;\n\texports.AxisHelper = AxisHelper;\n\texports.BackSide = BackSide;\n\texports.BasicDepthPacking = BasicDepthPacking;\n\texports.BasicShadowMap = BasicShadowMap;\n\texports.BinaryTextureLoader = BinaryTextureLoader;\n\texports.Bone = Bone;\n\texports.BooleanKeyframeTrack = BooleanKeyframeTrack;\n\texports.BoundingBoxHelper = BoundingBoxHelper;\n\texports.Box2 = Box2;\n\texports.Box3 = Box3;\n\texports.Box3Helper = Box3Helper;\n\texports.BoxBufferGeometry = BoxGeometry;\n\texports.BoxGeometry = BoxGeometry;\n\texports.BoxHelper = BoxHelper;\n\texports.BufferAttribute = BufferAttribute;\n\texports.BufferGeometry = BufferGeometry;\n\texports.BufferGeometryLoader = BufferGeometryLoader;\n\texports.ByteType = ByteType;\n\texports.Cache = Cache;\n\texports.Camera = Camera;\n\texports.CameraHelper = CameraHelper;\n\texports.CanvasRenderer = CanvasRenderer;\n\texports.CanvasTexture = CanvasTexture;\n\texports.CatmullRomCurve3 = CatmullRomCurve3;\n\texports.CineonToneMapping = CineonToneMapping;\n\texports.CircleBufferGeometry = CircleGeometry;\n\texports.CircleGeometry = CircleGeometry;\n\texports.ClampToEdgeWrapping = ClampToEdgeWrapping;\n\texports.Clock = Clock;\n\texports.ClosedSplineCurve3 = ClosedSplineCurve3;\n\texports.Color = Color;\n\texports.ColorKeyframeTrack = ColorKeyframeTrack;\n\texports.CompressedTexture = CompressedTexture;\n\texports.CompressedTextureLoader = CompressedTextureLoader;\n\texports.ConeBufferGeometry = ConeGeometry;\n\texports.ConeGeometry = ConeGeometry;\n\texports.CubeCamera = CubeCamera;\n\texports.CubeReflectionMapping = CubeReflectionMapping;\n\texports.CubeRefractionMapping = CubeRefractionMapping;\n\texports.CubeTexture = CubeTexture;\n\texports.CubeTextureLoader = CubeTextureLoader;\n\texports.CubeUVReflectionMapping = CubeUVReflectionMapping;\n\texports.CubeUVRefractionMapping = CubeUVRefractionMapping;\n\texports.CubicBezierCurve = CubicBezierCurve;\n\texports.CubicBezierCurve3 = CubicBezierCurve3;\n\texports.CubicInterpolant = CubicInterpolant;\n\texports.CullFaceBack = CullFaceBack;\n\texports.CullFaceFront = CullFaceFront;\n\texports.CullFaceFrontBack = CullFaceFrontBack;\n\texports.CullFaceNone = CullFaceNone;\n\texports.Curve = Curve;\n\texports.CurvePath = CurvePath;\n\texports.CustomBlending = CustomBlending;\n\texports.CustomToneMapping = CustomToneMapping;\n\texports.CylinderBufferGeometry = CylinderGeometry;\n\texports.CylinderGeometry = CylinderGeometry;\n\texports.Cylindrical = Cylindrical;\n\texports.DataTexture = DataTexture;\n\texports.DataTexture2DArray = DataTexture2DArray;\n\texports.DataTexture3D = DataTexture3D;\n\texports.DataTextureLoader = DataTextureLoader;\n\texports.DataUtils = DataUtils;\n\texports.DecrementStencilOp = DecrementStencilOp;\n\texports.DecrementWrapStencilOp = DecrementWrapStencilOp;\n\texports.DefaultLoadingManager = DefaultLoadingManager;\n\texports.DepthFormat = DepthFormat;\n\texports.DepthStencilFormat = DepthStencilFormat;\n\texports.DepthTexture = DepthTexture;\n\texports.DirectionalLight = DirectionalLight;\n\texports.DirectionalLightHelper = DirectionalLightHelper;\n\texports.DiscreteInterpolant = DiscreteInterpolant;\n\texports.DodecahedronBufferGeometry = DodecahedronGeometry;\n\texports.DodecahedronGeometry = DodecahedronGeometry;\n\texports.DoubleSide = DoubleSide;\n\texports.DstAlphaFactor = DstAlphaFactor;\n\texports.DstColorFactor = DstColorFactor;\n\texports.DynamicBufferAttribute = DynamicBufferAttribute;\n\texports.DynamicCopyUsage = DynamicCopyUsage;\n\texports.DynamicDrawUsage = DynamicDrawUsage;\n\texports.DynamicReadUsage = DynamicReadUsage;\n\texports.EdgesGeometry = EdgesGeometry;\n\texports.EdgesHelper = EdgesHelper;\n\texports.EllipseCurve = EllipseCurve;\n\texports.EqualDepth = EqualDepth;\n\texports.EqualStencilFunc = EqualStencilFunc;\n\texports.EquirectangularReflectionMapping = EquirectangularReflectionMapping;\n\texports.EquirectangularRefractionMapping = EquirectangularRefractionMapping;\n\texports.Euler = Euler;\n\texports.EventDispatcher = EventDispatcher;\n\texports.ExtrudeBufferGeometry = ExtrudeGeometry;\n\texports.ExtrudeGeometry = ExtrudeGeometry;\n\texports.Face3 = Face3;\n\texports.Face4 = Face4;\n\texports.FaceColors = FaceColors;\n\texports.FileLoader = FileLoader;\n\texports.FlatShading = FlatShading;\n\texports.Float16BufferAttribute = Float16BufferAttribute;\n\texports.Float32Attribute = Float32Attribute;\n\texports.Float32BufferAttribute = Float32BufferAttribute;\n\texports.Float64Attribute = Float64Attribute;\n\texports.Float64BufferAttribute = Float64BufferAttribute;\n\texports.FloatType = FloatType;\n\texports.Fog = Fog;\n\texports.FogExp2 = FogExp2;\n\texports.Font = Font;\n\texports.FontLoader = FontLoader;\n\texports.FrontSide = FrontSide;\n\texports.Frustum = Frustum;\n\texports.GLBufferAttribute = GLBufferAttribute;\n\texports.GLSL1 = GLSL1;\n\texports.GLSL3 = GLSL3;\n\texports.GammaEncoding = GammaEncoding;\n\texports.GeometryUtils = GeometryUtils;\n\texports.GreaterDepth = GreaterDepth;\n\texports.GreaterEqualDepth = GreaterEqualDepth;\n\texports.GreaterEqualStencilFunc = GreaterEqualStencilFunc;\n\texports.GreaterStencilFunc = GreaterStencilFunc;\n\texports.GridHelper = GridHelper;\n\texports.Group = Group;\n\texports.HalfFloatType = HalfFloatType;\n\texports.HemisphereLight = HemisphereLight;\n\texports.HemisphereLightHelper = HemisphereLightHelper;\n\texports.HemisphereLightProbe = HemisphereLightProbe;\n\texports.IcosahedronBufferGeometry = IcosahedronGeometry;\n\texports.IcosahedronGeometry = IcosahedronGeometry;\n\texports.ImageBitmapLoader = ImageBitmapLoader;\n\texports.ImageLoader = ImageLoader;\n\texports.ImageUtils = ImageUtils;\n\texports.ImmediateRenderObject = ImmediateRenderObject;\n\texports.IncrementStencilOp = IncrementStencilOp;\n\texports.IncrementWrapStencilOp = IncrementWrapStencilOp;\n\texports.InstancedBufferAttribute = InstancedBufferAttribute;\n\texports.InstancedBufferGeometry = InstancedBufferGeometry;\n\texports.InstancedInterleavedBuffer = InstancedInterleavedBuffer;\n\texports.InstancedMesh = InstancedMesh;\n\texports.Int16Attribute = Int16Attribute;\n\texports.Int16BufferAttribute = Int16BufferAttribute;\n\texports.Int32Attribute = Int32Attribute;\n\texports.Int32BufferAttribute = Int32BufferAttribute;\n\texports.Int8Attribute = Int8Attribute;\n\texports.Int8BufferAttribute = Int8BufferAttribute;\n\texports.IntType = IntType;\n\texports.InterleavedBuffer = InterleavedBuffer;\n\texports.InterleavedBufferAttribute = InterleavedBufferAttribute;\n\texports.Interpolant = Interpolant;\n\texports.InterpolateDiscrete = InterpolateDiscrete;\n\texports.InterpolateLinear = InterpolateLinear;\n\texports.InterpolateSmooth = InterpolateSmooth;\n\texports.InvertStencilOp = InvertStencilOp;\n\texports.JSONLoader = JSONLoader;\n\texports.KeepStencilOp = KeepStencilOp;\n\texports.KeyframeTrack = KeyframeTrack;\n\texports.LOD = LOD;\n\texports.LatheBufferGeometry = LatheGeometry;\n\texports.LatheGeometry = LatheGeometry;\n\texports.Layers = Layers;\n\texports.LensFlare = LensFlare;\n\texports.LessDepth = LessDepth;\n\texports.LessEqualDepth = LessEqualDepth;\n\texports.LessEqualStencilFunc = LessEqualStencilFunc;\n\texports.LessStencilFunc = LessStencilFunc;\n\texports.Light = Light;\n\texports.LightProbe = LightProbe;\n\texports.Line = Line;\n\texports.Line3 = Line3;\n\texports.LineBasicMaterial = LineBasicMaterial;\n\texports.LineCurve = LineCurve;\n\texports.LineCurve3 = LineCurve3;\n\texports.LineDashedMaterial = LineDashedMaterial;\n\texports.LineLoop = LineLoop;\n\texports.LinePieces = LinePieces;\n\texports.LineSegments = LineSegments;\n\texports.LineStrip = LineStrip;\n\texports.LinearEncoding = LinearEncoding;\n\texports.LinearFilter = LinearFilter;\n\texports.LinearInterpolant = LinearInterpolant;\n\texports.LinearMipMapLinearFilter = LinearMipMapLinearFilter;\n\texports.LinearMipMapNearestFilter = LinearMipMapNearestFilter;\n\texports.LinearMipmapLinearFilter = LinearMipmapLinearFilter;\n\texports.LinearMipmapNearestFilter = LinearMipmapNearestFilter;\n\texports.LinearToneMapping = LinearToneMapping;\n\texports.Loader = Loader;\n\texports.LoaderUtils = LoaderUtils;\n\texports.LoadingManager = LoadingManager;\n\texports.LogLuvEncoding = LogLuvEncoding;\n\texports.LoopOnce = LoopOnce;\n\texports.LoopPingPong = LoopPingPong;\n\texports.LoopRepeat = LoopRepeat;\n\texports.LuminanceAlphaFormat = LuminanceAlphaFormat;\n\texports.LuminanceFormat = LuminanceFormat;\n\texports.MOUSE = MOUSE;\n\texports.Material = Material;\n\texports.MaterialLoader = MaterialLoader;\n\texports.Math = MathUtils;\n\texports.MathUtils = MathUtils;\n\texports.Matrix3 = Matrix3;\n\texports.Matrix4 = Matrix4;\n\texports.MaxEquation = MaxEquation;\n\texports.Mesh = Mesh;\n\texports.MeshBasicMaterial = MeshBasicMaterial;\n\texports.MeshDepthMaterial = MeshDepthMaterial;\n\texports.MeshDistanceMaterial = MeshDistanceMaterial;\n\texports.MeshFaceMaterial = MeshFaceMaterial;\n\texports.MeshLambertMaterial = MeshLambertMaterial;\n\texports.MeshMatcapMaterial = MeshMatcapMaterial;\n\texports.MeshNormalMaterial = MeshNormalMaterial;\n\texports.MeshPhongMaterial = MeshPhongMaterial;\n\texports.MeshPhysicalMaterial = MeshPhysicalMaterial;\n\texports.MeshStandardMaterial = MeshStandardMaterial;\n\texports.MeshToonMaterial = MeshToonMaterial;\n\texports.MinEquation = MinEquation;\n\texports.MirroredRepeatWrapping = MirroredRepeatWrapping;\n\texports.MixOperation = MixOperation;\n\texports.MultiMaterial = MultiMaterial;\n\texports.MultiplyBlending = MultiplyBlending;\n\texports.MultiplyOperation = MultiplyOperation;\n\texports.NearestFilter = NearestFilter;\n\texports.NearestMipMapLinearFilter = NearestMipMapLinearFilter;\n\texports.NearestMipMapNearestFilter = NearestMipMapNearestFilter;\n\texports.NearestMipmapLinearFilter = NearestMipmapLinearFilter;\n\texports.NearestMipmapNearestFilter = NearestMipmapNearestFilter;\n\texports.NeverDepth = NeverDepth;\n\texports.NeverStencilFunc = NeverStencilFunc;\n\texports.NoBlending = NoBlending;\n\texports.NoColors = NoColors;\n\texports.NoToneMapping = NoToneMapping;\n\texports.NormalAnimationBlendMode = NormalAnimationBlendMode;\n\texports.NormalBlending = NormalBlending;\n\texports.NotEqualDepth = NotEqualDepth;\n\texports.NotEqualStencilFunc = NotEqualStencilFunc;\n\texports.NumberKeyframeTrack = NumberKeyframeTrack;\n\texports.Object3D = Object3D;\n\texports.ObjectLoader = ObjectLoader;\n\texports.ObjectSpaceNormalMap = ObjectSpaceNormalMap;\n\texports.OctahedronBufferGeometry = OctahedronGeometry;\n\texports.OctahedronGeometry = OctahedronGeometry;\n\texports.OneFactor = OneFactor;\n\texports.OneMinusDstAlphaFactor = OneMinusDstAlphaFactor;\n\texports.OneMinusDstColorFactor = OneMinusDstColorFactor;\n\texports.OneMinusSrcAlphaFactor = OneMinusSrcAlphaFactor;\n\texports.OneMinusSrcColorFactor = OneMinusSrcColorFactor;\n\texports.OrthographicCamera = OrthographicCamera;\n\texports.PCFShadowMap = PCFShadowMap;\n\texports.PCFSoftShadowMap = PCFSoftShadowMap;\n\texports.PMREMGenerator = PMREMGenerator;\n\texports.ParametricBufferGeometry = ParametricGeometry;\n\texports.ParametricGeometry = ParametricGeometry;\n\texports.Particle = Particle;\n\texports.ParticleBasicMaterial = ParticleBasicMaterial;\n\texports.ParticleSystem = ParticleSystem;\n\texports.ParticleSystemMaterial = ParticleSystemMaterial;\n\texports.Path = Path;\n\texports.PerspectiveCamera = PerspectiveCamera;\n\texports.Plane = Plane;\n\texports.PlaneBufferGeometry = PlaneGeometry;\n\texports.PlaneGeometry = PlaneGeometry;\n\texports.PlaneHelper = PlaneHelper;\n\texports.PointCloud = PointCloud;\n\texports.PointCloudMaterial = PointCloudMaterial;\n\texports.PointLight = PointLight;\n\texports.PointLightHelper = PointLightHelper;\n\texports.Points = Points;\n\texports.PointsMaterial = PointsMaterial;\n\texports.PolarGridHelper = PolarGridHelper;\n\texports.PolyhedronBufferGeometry = PolyhedronGeometry;\n\texports.PolyhedronGeometry = PolyhedronGeometry;\n\texports.PositionalAudio = PositionalAudio;\n\texports.PropertyBinding = PropertyBinding;\n\texports.PropertyMixer = PropertyMixer;\n\texports.QuadraticBezierCurve = QuadraticBezierCurve;\n\texports.QuadraticBezierCurve3 = QuadraticBezierCurve3;\n\texports.Quaternion = Quaternion;\n\texports.QuaternionKeyframeTrack = QuaternionKeyframeTrack;\n\texports.QuaternionLinearInterpolant = QuaternionLinearInterpolant;\n\texports.REVISION = REVISION;\n\texports.RGBADepthPacking = RGBADepthPacking;\n\texports.RGBAFormat = RGBAFormat;\n\texports.RGBAIntegerFormat = RGBAIntegerFormat;\n\texports.RGBA_ASTC_10x10_Format = RGBA_ASTC_10x10_Format;\n\texports.RGBA_ASTC_10x5_Format = RGBA_ASTC_10x5_Format;\n\texports.RGBA_ASTC_10x6_Format = RGBA_ASTC_10x6_Format;\n\texports.RGBA_ASTC_10x8_Format = RGBA_ASTC_10x8_Format;\n\texports.RGBA_ASTC_12x10_Format = RGBA_ASTC_12x10_Format;\n\texports.RGBA_ASTC_12x12_Format = RGBA_ASTC_12x12_Format;\n\texports.RGBA_ASTC_4x4_Format = RGBA_ASTC_4x4_Format;\n\texports.RGBA_ASTC_5x4_Format = RGBA_ASTC_5x4_Format;\n\texports.RGBA_ASTC_5x5_Format = RGBA_ASTC_5x5_Format;\n\texports.RGBA_ASTC_6x5_Format = RGBA_ASTC_6x5_Format;\n\texports.RGBA_ASTC_6x6_Format = RGBA_ASTC_6x6_Format;\n\texports.RGBA_ASTC_8x5_Format = RGBA_ASTC_8x5_Format;\n\texports.RGBA_ASTC_8x6_Format = RGBA_ASTC_8x6_Format;\n\texports.RGBA_ASTC_8x8_Format = RGBA_ASTC_8x8_Format;\n\texports.RGBA_BPTC_Format = RGBA_BPTC_Format;\n\texports.RGBA_ETC2_EAC_Format = RGBA_ETC2_EAC_Format;\n\texports.RGBA_PVRTC_2BPPV1_Format = RGBA_PVRTC_2BPPV1_Format;\n\texports.RGBA_PVRTC_4BPPV1_Format = RGBA_PVRTC_4BPPV1_Format;\n\texports.RGBA_S3TC_DXT1_Format = RGBA_S3TC_DXT1_Format;\n\texports.RGBA_S3TC_DXT3_Format = RGBA_S3TC_DXT3_Format;\n\texports.RGBA_S3TC_DXT5_Format = RGBA_S3TC_DXT5_Format;\n\texports.RGBDEncoding = RGBDEncoding;\n\texports.RGBEEncoding = RGBEEncoding;\n\texports.RGBEFormat = RGBEFormat;\n\texports.RGBFormat = RGBFormat;\n\texports.RGBIntegerFormat = RGBIntegerFormat;\n\texports.RGBM16Encoding = RGBM16Encoding;\n\texports.RGBM7Encoding = RGBM7Encoding;\n\texports.RGB_ETC1_Format = RGB_ETC1_Format;\n\texports.RGB_ETC2_Format = RGB_ETC2_Format;\n\texports.RGB_PVRTC_2BPPV1_Format = RGB_PVRTC_2BPPV1_Format;\n\texports.RGB_PVRTC_4BPPV1_Format = RGB_PVRTC_4BPPV1_Format;\n\texports.RGB_S3TC_DXT1_Format = RGB_S3TC_DXT1_Format;\n\texports.RGFormat = RGFormat;\n\texports.RGIntegerFormat = RGIntegerFormat;\n\texports.RawShaderMaterial = RawShaderMaterial;\n\texports.Ray = Ray;\n\texports.Raycaster = Raycaster;\n\texports.RectAreaLight = RectAreaLight;\n\texports.RedFormat = RedFormat;\n\texports.RedIntegerFormat = RedIntegerFormat;\n\texports.ReinhardToneMapping = ReinhardToneMapping;\n\texports.RepeatWrapping = RepeatWrapping;\n\texports.ReplaceStencilOp = ReplaceStencilOp;\n\texports.ReverseSubtractEquation = ReverseSubtractEquation;\n\texports.RingBufferGeometry = RingGeometry;\n\texports.RingGeometry = RingGeometry;\n\texports.SRGB8_ALPHA8_ASTC_10x10_Format = SRGB8_ALPHA8_ASTC_10x10_Format;\n\texports.SRGB8_ALPHA8_ASTC_10x5_Format = SRGB8_ALPHA8_ASTC_10x5_Format;\n\texports.SRGB8_ALPHA8_ASTC_10x6_Format = SRGB8_ALPHA8_ASTC_10x6_Format;\n\texports.SRGB8_ALPHA8_ASTC_10x8_Format = SRGB8_ALPHA8_ASTC_10x8_Format;\n\texports.SRGB8_ALPHA8_ASTC_12x10_Format = SRGB8_ALPHA8_ASTC_12x10_Format;\n\texports.SRGB8_ALPHA8_ASTC_12x12_Format = SRGB8_ALPHA8_ASTC_12x12_Format;\n\texports.SRGB8_ALPHA8_ASTC_4x4_Format = SRGB8_ALPHA8_ASTC_4x4_Format;\n\texports.SRGB8_ALPHA8_ASTC_5x4_Format = SRGB8_ALPHA8_ASTC_5x4_Format;\n\texports.SRGB8_ALPHA8_ASTC_5x5_Format = SRGB8_ALPHA8_ASTC_5x5_Format;\n\texports.SRGB8_ALPHA8_ASTC_6x5_Format = SRGB8_ALPHA8_ASTC_6x5_Format;\n\texports.SRGB8_ALPHA8_ASTC_6x6_Format = SRGB8_ALPHA8_ASTC_6x6_Format;\n\texports.SRGB8_ALPHA8_ASTC_8x5_Format = SRGB8_ALPHA8_ASTC_8x5_Format;\n\texports.SRGB8_ALPHA8_ASTC_8x6_Format = SRGB8_ALPHA8_ASTC_8x6_Format;\n\texports.SRGB8_ALPHA8_ASTC_8x8_Format = SRGB8_ALPHA8_ASTC_8x8_Format;\n\texports.Scene = Scene;\n\texports.SceneUtils = SceneUtils;\n\texports.ShaderChunk = ShaderChunk;\n\texports.ShaderLib = ShaderLib;\n\texports.ShaderMaterial = ShaderMaterial;\n\texports.ShadowMaterial = ShadowMaterial;\n\texports.Shape = Shape;\n\texports.ShapeBufferGeometry = ShapeGeometry;\n\texports.ShapeGeometry = ShapeGeometry;\n\texports.ShapePath = ShapePath;\n\texports.ShapeUtils = ShapeUtils;\n\texports.ShortType = ShortType;\n\texports.Skeleton = Skeleton;\n\texports.SkeletonHelper = SkeletonHelper;\n\texports.SkinnedMesh = SkinnedMesh;\n\texports.SmoothShading = SmoothShading;\n\texports.Sphere = Sphere;\n\texports.SphereBufferGeometry = SphereGeometry;\n\texports.SphereGeometry = SphereGeometry;\n\texports.Spherical = Spherical;\n\texports.SphericalHarmonics3 = SphericalHarmonics3;\n\texports.Spline = Spline;\n\texports.SplineCurve = SplineCurve;\n\texports.SplineCurve3 = SplineCurve3;\n\texports.SpotLight = SpotLight;\n\texports.SpotLightHelper = SpotLightHelper;\n\texports.Sprite = Sprite;\n\texports.SpriteMaterial = SpriteMaterial;\n\texports.SrcAlphaFactor = SrcAlphaFactor;\n\texports.SrcAlphaSaturateFactor = SrcAlphaSaturateFactor;\n\texports.SrcColorFactor = SrcColorFactor;\n\texports.StaticCopyUsage = StaticCopyUsage;\n\texports.StaticDrawUsage = StaticDrawUsage;\n\texports.StaticReadUsage = StaticReadUsage;\n\texports.StereoCamera = StereoCamera;\n\texports.StreamCopyUsage = StreamCopyUsage;\n\texports.StreamDrawUsage = StreamDrawUsage;\n\texports.StreamReadUsage = StreamReadUsage;\n\texports.StringKeyframeTrack = StringKeyframeTrack;\n\texports.SubtractEquation = SubtractEquation;\n\texports.SubtractiveBlending = SubtractiveBlending;\n\texports.TOUCH = TOUCH;\n\texports.TangentSpaceNormalMap = TangentSpaceNormalMap;\n\texports.TetrahedronBufferGeometry = TetrahedronGeometry;\n\texports.TetrahedronGeometry = TetrahedronGeometry;\n\texports.TextBufferGeometry = TextGeometry;\n\texports.TextGeometry = TextGeometry;\n\texports.Texture = Texture;\n\texports.TextureLoader = TextureLoader;\n\texports.TorusBufferGeometry = TorusGeometry;\n\texports.TorusGeometry = TorusGeometry;\n\texports.TorusKnotBufferGeometry = TorusKnotGeometry;\n\texports.TorusKnotGeometry = TorusKnotGeometry;\n\texports.Triangle = Triangle;\n\texports.TriangleFanDrawMode = TriangleFanDrawMode;\n\texports.TriangleStripDrawMode = TriangleStripDrawMode;\n\texports.TrianglesDrawMode = TrianglesDrawMode;\n\texports.TubeBufferGeometry = TubeGeometry;\n\texports.TubeGeometry = TubeGeometry;\n\texports.UVMapping = UVMapping;\n\texports.Uint16Attribute = Uint16Attribute;\n\texports.Uint16BufferAttribute = Uint16BufferAttribute;\n\texports.Uint32Attribute = Uint32Attribute;\n\texports.Uint32BufferAttribute = Uint32BufferAttribute;\n\texports.Uint8Attribute = Uint8Attribute;\n\texports.Uint8BufferAttribute = Uint8BufferAttribute;\n\texports.Uint8ClampedAttribute = Uint8ClampedAttribute;\n\texports.Uint8ClampedBufferAttribute = Uint8ClampedBufferAttribute;\n\texports.Uniform = Uniform;\n\texports.UniformsLib = UniformsLib;\n\texports.UniformsUtils = UniformsUtils;\n\texports.UnsignedByteType = UnsignedByteType;\n\texports.UnsignedInt248Type = UnsignedInt248Type;\n\texports.UnsignedIntType = UnsignedIntType;\n\texports.UnsignedShort4444Type = UnsignedShort4444Type;\n\texports.UnsignedShort5551Type = UnsignedShort5551Type;\n\texports.UnsignedShort565Type = UnsignedShort565Type;\n\texports.UnsignedShortType = UnsignedShortType;\n\texports.VSMShadowMap = VSMShadowMap;\n\texports.Vector2 = Vector2;\n\texports.Vector3 = Vector3;\n\texports.Vector4 = Vector4;\n\texports.VectorKeyframeTrack = VectorKeyframeTrack;\n\texports.Vertex = Vertex;\n\texports.VertexColors = VertexColors;\n\texports.VideoTexture = VideoTexture;\n\texports.WebGL1Renderer = WebGL1Renderer;\n\texports.WebGLCubeRenderTarget = WebGLCubeRenderTarget;\n\texports.WebGLMultisampleRenderTarget = WebGLMultisampleRenderTarget;\n\texports.WebGLRenderTarget = WebGLRenderTarget;\n\texports.WebGLRenderTargetCube = WebGLRenderTargetCube;\n\texports.WebGLRenderer = WebGLRenderer;\n\texports.WebGLUtils = WebGLUtils;\n\texports.WireframeGeometry = WireframeGeometry;\n\texports.WireframeHelper = WireframeHelper;\n\texports.WrapAroundEnding = WrapAroundEnding;\n\texports.XHRLoader = XHRLoader;\n\texports.ZeroCurvatureEnding = ZeroCurvatureEnding;\n\texports.ZeroFactor = ZeroFactor;\n\texports.ZeroSlopeEnding = ZeroSlopeEnding;\n\texports.ZeroStencilOp = ZeroStencilOp;\n\texports.sRGBEncoding = sRGBEncoding;\n\n\tObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n},{}],58:[function(_dereq_,module,exports){\nTHREE.DRACOLoader = function ( manager ) {\n\n\tTHREE.Loader.call( this, manager );\n\n\tthis.decoderPath = '';\n\tthis.decoderConfig = {};\n\tthis.decoderBinary = null;\n\tthis.decoderPending = null;\n\n\tthis.workerLimit = 4;\n\tthis.workerPool = [];\n\tthis.workerNextTaskID = 1;\n\tthis.workerSourceURL = '';\n\n\tthis.defaultAttributeIDs = {\n\t\tposition: 'POSITION',\n\t\tnormal: 'NORMAL',\n\t\tcolor: 'COLOR',\n\t\tuv: 'TEX_COORD'\n\t};\n\tthis.defaultAttributeTypes = {\n\t\tposition: 'Float32Array',\n\t\tnormal: 'Float32Array',\n\t\tcolor: 'Float32Array',\n\t\tuv: 'Float32Array'\n\t};\n\n};\n\nTHREE.DRACOLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), {\n\n\tconstructor: THREE.DRACOLoader,\n\n\tsetDecoderPath: function ( path ) {\n\n\t\tthis.decoderPath = path;\n\n\t\treturn this;\n\n\t},\n\n\tsetDecoderConfig: function ( config ) {\n\n\t\tthis.decoderConfig = config;\n\n\t\treturn this;\n\n\t},\n\n\tsetWorkerLimit: function ( workerLimit ) {\n\n\t\tthis.workerLimit = workerLimit;\n\n\t\treturn this;\n\n\t},\n\n\t/** @deprecated */\n\tsetVerbosity: function () {\n\n\t\tconsole.warn( 'THREE.DRACOLoader: The .setVerbosity() method has been removed.' );\n\n\t},\n\n\t/** @deprecated */\n\tsetDrawMode: function () {\n\n\t\tconsole.warn( 'THREE.DRACOLoader: The .setDrawMode() method has been removed.' );\n\n\t},\n\n\t/** @deprecated */\n\tsetSkipDequantization: function () {\n\n\t\tconsole.warn( 'THREE.DRACOLoader: The .setSkipDequantization() method has been removed.' );\n\n\t},\n\n\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\tvar loader = new THREE.FileLoader( this.manager );\n\n\t\tloader.setPath( this.path );\n\t\tloader.setResponseType( 'arraybuffer' );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\tloader.load( url, ( buffer ) => {\n\n\t\t\tvar taskConfig = {\n\t\t\t\tattributeIDs: this.defaultAttributeIDs,\n\t\t\t\tattributeTypes: this.defaultAttributeTypes,\n\t\t\t\tuseUniqueIDs: false\n\t\t\t};\n\n\t\t\tthis.decodeGeometry( buffer, taskConfig )\n\t\t\t\t.then( onLoad )\n\t\t\t\t.catch( onError );\n\n\t\t}, onProgress, onError );\n\n\t},\n\n\t/** @deprecated Kept for backward-compatibility with previous DRACOLoader versions. */\n\tdecodeDracoFile: function ( buffer, callback, attributeIDs, attributeTypes ) {\n\n\t\tvar taskConfig = {\n\t\t\tattributeIDs: attributeIDs || this.defaultAttributeIDs,\n\t\t\tattributeTypes: attributeTypes || this.defaultAttributeTypes,\n\t\t\tuseUniqueIDs: !! attributeIDs\n\t\t};\n\n\t\tthis.decodeGeometry( buffer, taskConfig ).then( callback );\n\n\t},\n\n\tdecodeGeometry: function ( buffer, taskConfig ) {\n\n\t\t// TODO: For backward-compatibility, support 'attributeTypes' objects containing\n\t\t// references (rather than names) to typed array constructors. These must be\n\t\t// serialized before sending them to the worker.\n\t\tfor ( var attribute in taskConfig.attributeTypes ) {\n\n\t\t\tvar type = taskConfig.attributeTypes[ attribute ];\n\n\t\t\tif ( type.BYTES_PER_ELEMENT !== undefined ) {\n\n\t\t\t\ttaskConfig.attributeTypes[ attribute ] = type.name;\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tvar taskKey = JSON.stringify( taskConfig );\n\n\t\t// Check for an existing task using this buffer. A transferred buffer cannot be transferred\n\t\t// again from this thread.\n\t\tif ( THREE.DRACOLoader.taskCache.has( buffer ) ) {\n\n\t\t\tvar cachedTask = THREE.DRACOLoader.taskCache.get( buffer );\n\n\t\t\tif ( cachedTask.key === taskKey ) {\n\n\t\t\t\treturn cachedTask.promise;\n\n\t\t\t} else if ( buffer.byteLength === 0 ) {\n\n\t\t\t\t// Technically, it would be possible to wait for the previous task to complete,\n\t\t\t\t// transfer the buffer back, and decode again with the second configuration. That\n\t\t\t\t// is complex, and I don't know of any reason to decode a Draco buffer twice in\n\t\t\t\t// different ways, so this is left unimplemented.\n\t\t\t\tthrow new Error(\n\n\t\t\t\t\t'THREE.DRACOLoader: Unable to re-decode a buffer with different ' +\n\t\t\t\t\t'settings. Buffer has already been transferred.'\n\n\t\t\t\t);\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tvar worker;\n\t\tvar taskID = this.workerNextTaskID ++;\n\t\tvar taskCost = buffer.byteLength;\n\n\t\t// Obtain a worker and assign a task, and construct a geometry instance\n\t\t// when the task completes.\n\t\tvar geometryPending = this._getWorker( taskID, taskCost )\n\t\t\t.then( ( _worker ) => {\n\n\t\t\t\tworker = _worker;\n\n\t\t\t\treturn new Promise( ( resolve, reject ) => {\n\n\t\t\t\t\tworker._callbacks[ taskID ] = { resolve, reject };\n\n\t\t\t\t\tworker.postMessage( { type: 'decode', id: taskID, taskConfig, buffer }, [ buffer ] );\n\n\t\t\t\t\t// this.debug();\n\n\t\t\t\t} );\n\n\t\t\t} )\n\t\t\t.then( ( message ) => this._createGeometry( message.geometry ) );\n\n\t\t// Remove task from the task list.\n\t\t// Note: replaced '.finally()' with '.catch().then()' block - iOS 11 support (#19416)\n\t\tgeometryPending\n\t\t\t.catch( () => true )\n\t\t\t.then( () => {\n\n\t\t\t\tif ( worker && taskID ) {\n\n\t\t\t\t\tthis._releaseTask( worker, taskID );\n\n\t\t\t\t\t// this.debug();\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t// Cache the task result.\n\t\tTHREE.DRACOLoader.taskCache.set( buffer, {\n\n\t\t\tkey: taskKey,\n\t\t\tpromise: geometryPending\n\n\t\t} );\n\n\t\treturn geometryPending;\n\n\t},\n\n\t_createGeometry: function ( geometryData ) {\n\n\t\tvar geometry = new THREE.BufferGeometry();\n\n\t\tif ( geometryData.index ) {\n\n\t\t\tgeometry.setIndex( new THREE.BufferAttribute( geometryData.index.array, 1 ) );\n\n\t\t}\n\n\t\tfor ( var i = 0; i < geometryData.attributes.length; i ++ ) {\n\n\t\t\tvar attribute = geometryData.attributes[ i ];\n\t\t\tvar name = attribute.name;\n\t\t\tvar array = attribute.array;\n\t\t\tvar itemSize = attribute.itemSize;\n\n\t\t\tgeometry.setAttribute( name, new THREE.BufferAttribute( array, itemSize ) );\n\n\t\t}\n\n\t\treturn geometry;\n\n\t},\n\n\t_loadLibrary: function ( url, responseType ) {\n\n\t\tvar loader = new THREE.FileLoader( this.manager );\n\t\tloader.setPath( this.decoderPath );\n\t\tloader.setResponseType( responseType );\n\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\treturn new Promise( ( resolve, reject ) => {\n\n\t\t\tloader.load( url, resolve, undefined, reject );\n\n\t\t} );\n\n\t},\n\n\tpreload: function () {\n\n\t\tthis._initDecoder();\n\n\t\treturn this;\n\n\t},\n\n\t_initDecoder: function () {\n\n\t\tif ( this.decoderPending ) return this.decoderPending;\n\n\t\tvar useJS = typeof WebAssembly !== 'object' || this.decoderConfig.type === 'js';\n\t\tvar librariesPending = [];\n\n\t\tif ( useJS ) {\n\n\t\t\tlibrariesPending.push( this._loadLibrary( 'draco_decoder.js', 'text' ) );\n\n\t\t} else {\n\n\t\t\tlibrariesPending.push( this._loadLibrary( 'draco_wasm_wrapper.js', 'text' ) );\n\t\t\tlibrariesPending.push( this._loadLibrary( 'draco_decoder.wasm', 'arraybuffer' ) );\n\n\t\t}\n\n\t\tthis.decoderPending = Promise.all( librariesPending )\n\t\t\t.then( ( libraries ) => {\n\n\t\t\t\tvar jsContent = libraries[ 0 ];\n\n\t\t\t\tif ( ! useJS ) {\n\n\t\t\t\t\tthis.decoderConfig.wasmBinary = libraries[ 1 ];\n\n\t\t\t\t}\n\n\t\t\t\tvar fn = THREE.DRACOLoader.DRACOWorker.toString();\n\n\t\t\t\tvar body = [\n\t\t\t\t\t'/* draco decoder */',\n\t\t\t\t\tjsContent,\n\t\t\t\t\t'',\n\t\t\t\t\t'/* worker */',\n\t\t\t\t\tfn.substring( fn.indexOf( '{' ) + 1, fn.lastIndexOf( '}' ) )\n\t\t\t\t].join( '\\n' );\n\n\t\t\t\tthis.workerSourceURL = URL.createObjectURL( new Blob( [ body ] ) );\n\n\t\t\t} );\n\n\t\treturn this.decoderPending;\n\n\t},\n\n\t_getWorker: function ( taskID, taskCost ) {\n\n\t\treturn this._initDecoder().then( () => {\n\n\t\t\tif ( this.workerPool.length < this.workerLimit ) {\n\n\t\t\t\tvar worker = new Worker( this.workerSourceURL );\n\n\t\t\t\tworker._callbacks = {};\n\t\t\t\tworker._taskCosts = {};\n\t\t\t\tworker._taskLoad = 0;\n\n\t\t\t\tworker.postMessage( { type: 'init', decoderConfig: this.decoderConfig } );\n\n\t\t\t\tworker.onmessage = function ( e ) {\n\n\t\t\t\t\tvar message = e.data;\n\n\t\t\t\t\tswitch ( message.type ) {\n\n\t\t\t\t\t\tcase 'decode':\n\t\t\t\t\t\t\tworker._callbacks[ message.id ].resolve( message );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'error':\n\t\t\t\t\t\t\tworker._callbacks[ message.id ].reject( message );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tconsole.error( 'THREE.DRACOLoader: Unexpected message, \"' + message.type + '\"' );\n\n\t\t\t\t\t}\n\n\t\t\t\t};\n\n\t\t\t\tthis.workerPool.push( worker );\n\n\t\t\t} else {\n\n\t\t\t\tthis.workerPool.sort( function ( a, b ) {\n\n\t\t\t\t\treturn a._taskLoad > b._taskLoad ? - 1 : 1;\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tvar worker = this.workerPool[ this.workerPool.length - 1 ];\n\t\t\tworker._taskCosts[ taskID ] = taskCost;\n\t\t\tworker._taskLoad += taskCost;\n\t\t\treturn worker;\n\n\t\t} );\n\n\t},\n\n\t_releaseTask: function ( worker, taskID ) {\n\n\t\tworker._taskLoad -= worker._taskCosts[ taskID ];\n\t\tdelete worker._callbacks[ taskID ];\n\t\tdelete worker._taskCosts[ taskID ];\n\n\t},\n\n\tdebug: function () {\n\n\t\tconsole.log( 'Task load: ', this.workerPool.map( ( worker ) => worker._taskLoad ) );\n\n\t},\n\n\tdispose: function () {\n\n\t\tfor ( var i = 0; i < this.workerPool.length; ++ i ) {\n\n\t\t\tthis.workerPool[ i ].terminate();\n\n\t\t}\n\n\t\tthis.workerPool.length = 0;\n\n\t\treturn this;\n\n\t}\n\n} );\n\n/* WEB WORKER */\n\nTHREE.DRACOLoader.DRACOWorker = function () {\n\n\tvar decoderConfig;\n\tvar decoderPending;\n\n\tonmessage = function ( e ) {\n\n\t\tvar message = e.data;\n\n\t\tswitch ( message.type ) {\n\n\t\t\tcase 'init':\n\t\t\t\tdecoderConfig = message.decoderConfig;\n\t\t\t\tdecoderPending = new Promise( function ( resolve/*, reject*/ ) {\n\n\t\t\t\t\tdecoderConfig.onModuleLoaded = function ( draco ) {\n\n\t\t\t\t\t\t// Module is Promise-like. Wrap before resolving to avoid loop.\n\t\t\t\t\t\tresolve( { draco: draco } );\n\n\t\t\t\t\t};\n\n\t\t\t\t\tDracoDecoderModule( decoderConfig ); // eslint-disable-line no-undef\n\n\t\t\t\t} );\n\t\t\t\tbreak;\n\n\t\t\tcase 'decode':\n\t\t\t\tvar buffer = message.buffer;\n\t\t\t\tvar taskConfig = message.taskConfig;\n\t\t\t\tdecoderPending.then( ( module ) => {\n\n\t\t\t\t\tvar draco = module.draco;\n\t\t\t\t\tvar decoder = new draco.Decoder();\n\t\t\t\t\tvar decoderBuffer = new draco.DecoderBuffer();\n\t\t\t\t\tdecoderBuffer.Init( new Int8Array( buffer ), buffer.byteLength );\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tvar geometry = decodeGeometry( draco, decoder, decoderBuffer, taskConfig );\n\n\t\t\t\t\t\tvar buffers = geometry.attributes.map( ( attr ) => attr.array.buffer );\n\n\t\t\t\t\t\tif ( geometry.index ) buffers.push( geometry.index.array.buffer );\n\n\t\t\t\t\t\tself.postMessage( { type: 'decode', id: message.id, geometry }, buffers );\n\n\t\t\t\t\t} catch ( error ) {\n\n\t\t\t\t\t\tconsole.error( error );\n\n\t\t\t\t\t\tself.postMessage( { type: 'error', id: message.id, error: error.message } );\n\n\t\t\t\t\t} finally {\n\n\t\t\t\t\t\tdraco.destroy( decoderBuffer );\n\t\t\t\t\t\tdraco.destroy( decoder );\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t};\n\n\tfunction decodeGeometry( draco, decoder, decoderBuffer, taskConfig ) {\n\n\t\tvar attributeIDs = taskConfig.attributeIDs;\n\t\tvar attributeTypes = taskConfig.attributeTypes;\n\n\t\tvar dracoGeometry;\n\t\tvar decodingStatus;\n\n\t\tvar geometryType = decoder.GetEncodedGeometryType( decoderBuffer );\n\n\t\tif ( geometryType === draco.TRIANGULAR_MESH ) {\n\n\t\t\tdracoGeometry = new draco.Mesh();\n\t\t\tdecodingStatus = decoder.DecodeBufferToMesh( decoderBuffer, dracoGeometry );\n\n\t\t} else if ( geometryType === draco.POINT_CLOUD ) {\n\n\t\t\tdracoGeometry = new draco.PointCloud();\n\t\t\tdecodingStatus = decoder.DecodeBufferToPointCloud( decoderBuffer, dracoGeometry );\n\n\t\t} else {\n\n\t\t\tthrow new Error( 'THREE.DRACOLoader: Unexpected geometry type.' );\n\n\t\t}\n\n\t\tif ( ! decodingStatus.ok() || dracoGeometry.ptr === 0 ) {\n\n\t\t\tthrow new Error( 'THREE.DRACOLoader: Decoding failed: ' + decodingStatus.error_msg() );\n\n\t\t}\n\n\t\tvar geometry = { index: null, attributes: [] };\n\n\t\t// Gather all vertex attributes.\n\t\tfor ( var attributeName in attributeIDs ) {\n\n\t\t\tvar attributeType = self[ attributeTypes[ attributeName ] ];\n\n\t\t\tvar attribute;\n\t\t\tvar attributeID;\n\n\t\t\t// A Draco file may be created with default vertex attributes, whose attribute IDs\n\t\t\t// are mapped 1:1 from their semantic name (POSITION, NORMAL, ...). Alternatively,\n\t\t\t// a Draco file may contain a custom set of attributes, identified by known unique\n\t\t\t// IDs. glTF files always do the latter, and `.drc` files typically do the former.\n\t\t\tif ( taskConfig.useUniqueIDs ) {\n\n\t\t\t\tattributeID = attributeIDs[ attributeName ];\n\t\t\t\tattribute = decoder.GetAttributeByUniqueId( dracoGeometry, attributeID );\n\n\t\t\t} else {\n\n\t\t\t\tattributeID = decoder.GetAttributeId( dracoGeometry, draco[ attributeIDs[ attributeName ] ] );\n\n\t\t\t\tif ( attributeID === - 1 ) continue;\n\n\t\t\t\tattribute = decoder.GetAttribute( dracoGeometry, attributeID );\n\n\t\t\t}\n\n\t\t\tgeometry.attributes.push( decodeAttribute( draco, decoder, dracoGeometry, attributeName, attributeType, attribute ) );\n\n\t\t}\n\n\t\t// Add index.\n\t\tif ( geometryType === draco.TRIANGULAR_MESH ) {\n\n\t\t\tgeometry.index = decodeIndex( draco, decoder, dracoGeometry );\n\n\t\t}\n\n\t\tdraco.destroy( dracoGeometry );\n\n\t\treturn geometry;\n\n\t}\n\n\tfunction decodeIndex( draco, decoder, dracoGeometry ) {\n\n\t\tvar numFaces = dracoGeometry.num_faces();\n\t\tvar numIndices = numFaces * 3;\n\t\tvar byteLength = numIndices * 4;\n\n\t\tvar ptr = draco._malloc( byteLength );\n\t\tdecoder.GetTrianglesUInt32Array( dracoGeometry, byteLength, ptr );\n\t\tvar index = new Uint32Array( draco.HEAPF32.buffer, ptr, numIndices ).slice();\n\t\tdraco._free( ptr );\n\n\t\treturn { array: index, itemSize: 1 };\n\n\t}\n\n\tfunction decodeAttribute( draco, decoder, dracoGeometry, attributeName, attributeType, attribute ) {\n\n\t\tvar numComponents = attribute.num_components();\n\t\tvar numPoints = dracoGeometry.num_points();\n\t\tvar numValues = numPoints * numComponents;\n\t\tvar byteLength = numValues * attributeType.BYTES_PER_ELEMENT;\n\t\tvar dataType = getDracoDataType( draco, attributeType );\n\n\t\tvar ptr = draco._malloc( byteLength );\n\t\tdecoder.GetAttributeDataArrayForAllPoints( dracoGeometry, attribute, dataType, byteLength, ptr );\n\t\tvar array = new attributeType( draco.HEAPF32.buffer, ptr, numValues ).slice();\n\t\tdraco._free( ptr );\n\n\t\treturn {\n\t\t\tname: attributeName,\n\t\t\tarray: array,\n\t\t\titemSize: numComponents\n\t\t};\n\n\t}\n\n\tfunction getDracoDataType( draco, attributeType ) {\n\n\t\tswitch ( attributeType ) {\n\n\t\t\tcase Float32Array: return draco.DT_FLOAT32;\n\t\t\tcase Int8Array: return draco.DT_INT8;\n\t\t\tcase Int16Array: return draco.DT_INT16;\n\t\t\tcase Int32Array: return draco.DT_INT32;\n\t\t\tcase Uint8Array: return draco.DT_UINT8;\n\t\t\tcase Uint16Array: return draco.DT_UINT16;\n\t\t\tcase Uint32Array: return draco.DT_UINT32;\n\n\t\t}\n\n\t}\n\n};\n\nTHREE.DRACOLoader.taskCache = new WeakMap();\n\n/** Deprecated static methods */\n\n/** @deprecated */\nTHREE.DRACOLoader.setDecoderPath = function () {\n\n\tconsole.warn( 'THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.' );\n\n};\n\n/** @deprecated */\nTHREE.DRACOLoader.setDecoderConfig = function () {\n\n\tconsole.warn( 'THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.' );\n\n};\n\n/** @deprecated */\nTHREE.DRACOLoader.releaseDecoderModule = function () {\n\n\tconsole.warn( 'THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.' );\n\n};\n\n/** @deprecated */\nTHREE.DRACOLoader.getDecoderModule = function () {\n\n\tconsole.warn( 'THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.' );\n\n};\n\n},{}],59:[function(_dereq_,module,exports){\nTHREE.GLTFLoader = ( function () {\n\n\tfunction GLTFLoader( manager ) {\n\n\t\tTHREE.Loader.call( this, manager );\n\n\t\tthis.dracoLoader = null;\n\t\tthis.ddsLoader = null;\n\t\tthis.ktx2Loader = null;\n\t\tthis.meshoptDecoder = null;\n\n\t\tthis.pluginCallbacks = [];\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFMaterialsClearcoatExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFTextureBasisUExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFTextureWebPExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFMaterialsTransmissionExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFLightsExtension( parser );\n\n\t\t} );\n\n\t\tthis.register( function ( parser ) {\n\n\t\t\treturn new GLTFMeshoptCompression( parser );\n\n\t\t} );\n\n\t}\n\n\tGLTFLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), {\n\n\t\tconstructor: GLTFLoader,\n\n\t\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\t\tvar scope = this;\n\n\t\t\tvar resourcePath;\n\n\t\t\tif ( this.resourcePath !== '' ) {\n\n\t\t\t\tresourcePath = this.resourcePath;\n\n\t\t\t} else if ( this.path !== '' ) {\n\n\t\t\t\tresourcePath = this.path;\n\n\t\t\t} else {\n\n\t\t\t\tresourcePath = THREE.LoaderUtils.extractUrlBase( url );\n\n\t\t\t}\n\n\t\t\t// Tells the LoadingManager to track an extra item, which resolves after\n\t\t\t// the model is fully loaded. This means the count of items loaded will\n\t\t\t// be incorrect, but ensures manager.onLoad() does not fire early.\n\t\t\tthis.manager.itemStart( url );\n\n\t\t\tvar _onError = function ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t};\n\n\t\t\tvar loader = new THREE.FileLoader( this.manager );\n\n\t\t\tloader.setPath( this.path );\n\t\t\tloader.setResponseType( 'arraybuffer' );\n\t\t\tloader.setRequestHeader( this.requestHeader );\n\t\t\tloader.setWithCredentials( this.withCredentials );\n\n\t\t\tloader.load( url, function ( data ) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tscope.parse( data, resourcePath, function ( gltf ) {\n\n\t\t\t\t\t\tonLoad( gltf );\n\n\t\t\t\t\t\tscope.manager.itemEnd( url );\n\n\t\t\t\t\t}, _onError );\n\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t_onError( e );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, _onError );\n\n\t\t},\n\n\t\tsetDRACOLoader: function ( dracoLoader ) {\n\n\t\t\tthis.dracoLoader = dracoLoader;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tsetDDSLoader: function ( ddsLoader ) {\n\n\t\t\tthis.ddsLoader = ddsLoader;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tsetKTX2Loader: function ( ktx2Loader ) {\n\n\t\t\tthis.ktx2Loader = ktx2Loader;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tsetMeshoptDecoder: function ( meshoptDecoder ) {\n\n\t\t\tthis.meshoptDecoder = meshoptDecoder;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tregister: function ( callback ) {\n\n\t\t\tif ( this.pluginCallbacks.indexOf( callback ) === - 1 ) {\n\n\t\t\t\tthis.pluginCallbacks.push( callback );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t},\n\n\t\tunregister: function ( callback ) {\n\n\t\t\tif ( this.pluginCallbacks.indexOf( callback ) !== - 1 ) {\n\n\t\t\t\tthis.pluginCallbacks.splice( this.pluginCallbacks.indexOf( callback ), 1 );\n\n\t\t\t}\n\n\t\t\treturn this;\n\n\t\t},\n\n\t\tparse: function ( data, path, onLoad, onError ) {\n\n\t\t\tvar content;\n\t\t\tvar extensions = {};\n\t\t\tvar plugins = {};\n\n\t\t\tif ( typeof data === 'string' ) {\n\n\t\t\t\tcontent = data;\n\n\t\t\t} else {\n\n\t\t\t\tvar magic = THREE.LoaderUtils.decodeText( new Uint8Array( data, 0, 4 ) );\n\n\t\t\t\tif ( magic === BINARY_EXTENSION_HEADER_MAGIC ) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\textensions[ EXTENSIONS.KHR_BINARY_GLTF ] = new GLTFBinaryExtension( data );\n\n\t\t\t\t\t} catch ( error ) {\n\n\t\t\t\t\t\tif ( onError ) onError( error );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcontent = extensions[ EXTENSIONS.KHR_BINARY_GLTF ].content;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tcontent = THREE.LoaderUtils.decodeText( new Uint8Array( data ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar json = JSON.parse( content );\n\n\t\t\tif ( json.asset === undefined || json.asset.version[ 0 ] < 2 ) {\n\n\t\t\t\tif ( onError ) onError( new Error( 'THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.' ) );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tvar parser = new GLTFParser( json, {\n\n\t\t\t\tpath: path || this.resourcePath || '',\n\t\t\t\tcrossOrigin: this.crossOrigin,\n\t\t\t\tmanager: this.manager,\n\t\t\t\tktx2Loader: this.ktx2Loader,\n\t\t\t\tmeshoptDecoder: this.meshoptDecoder\n\n\t\t\t} );\n\n\t\t\tparser.fileLoader.setRequestHeader( this.requestHeader );\n\n\t\t\tfor ( var i = 0; i < this.pluginCallbacks.length; i ++ ) {\n\n\t\t\t\tvar plugin = this.pluginCallbacks[ i ]( parser );\n\t\t\t\tplugins[ plugin.name ] = plugin;\n\n\t\t\t\t// Workaround to avoid determining as unknown extension\n\t\t\t\t// in addUnknownExtensionsToUserData().\n\t\t\t\t// Remove this workaround if we move all the existing\n\t\t\t\t// extension handlers to plugin system\n\t\t\t\textensions[ plugin.name ] = true;\n\n\t\t\t}\n\n\t\t\tif ( json.extensionsUsed ) {\n\n\t\t\t\tfor ( var i = 0; i < json.extensionsUsed.length; ++ i ) {\n\n\t\t\t\t\tvar extensionName = json.extensionsUsed[ i ];\n\t\t\t\t\tvar extensionsRequired = json.extensionsRequired || [];\n\n\t\t\t\t\tswitch ( extensionName ) {\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_MATERIALS_UNLIT:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFMaterialsUnlitExtension();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFMaterialsPbrSpecularGlossinessExtension();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_DRACO_MESH_COMPRESSION:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFDracoMeshCompressionExtension( json, this.dracoLoader );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.MSFT_TEXTURE_DDS:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFTextureDDSExtension( this.ddsLoader );\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_TEXTURE_TRANSFORM:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFTextureTransformExtension();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase EXTENSIONS.KHR_MESH_QUANTIZATION:\n\t\t\t\t\t\t\textensions[ extensionName ] = new GLTFMeshQuantizationExtension();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\n\t\t\t\t\t\t\tif ( extensionsRequired.indexOf( extensionName ) >= 0 && plugins[ extensionName ] === undefined ) {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Unknown extension \"' + extensionName + '\".' );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tparser.setExtensions( extensions );\n\t\t\tparser.setPlugins( plugins );\n\t\t\tparser.parse( onLoad, onError );\n\n\t\t}\n\n\t} );\n\n\t/* GLTFREGISTRY */\n\n\tfunction GLTFRegistry() {\n\n\t\tvar objects = {};\n\n\t\treturn\t{\n\n\t\t\tget: function ( key ) {\n\n\t\t\t\treturn objects[ key ];\n\n\t\t\t},\n\n\t\t\tadd: function ( key, object ) {\n\n\t\t\t\tobjects[ key ] = object;\n\n\t\t\t},\n\n\t\t\tremove: function ( key ) {\n\n\t\t\t\tdelete objects[ key ];\n\n\t\t\t},\n\n\t\t\tremoveAll: function () {\n\n\t\t\t\tobjects = {};\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\t/*********************************/\n\t/********** EXTENSIONS ***********/\n\t/*********************************/\n\n\tvar EXTENSIONS = {\n\t\tKHR_BINARY_GLTF: 'KHR_binary_glTF',\n\t\tKHR_DRACO_MESH_COMPRESSION: 'KHR_draco_mesh_compression',\n\t\tKHR_LIGHTS_PUNCTUAL: 'KHR_lights_punctual',\n\t\tKHR_MATERIALS_CLEARCOAT: 'KHR_materials_clearcoat',\n\t\tKHR_MATERIALS_PBR_SPECULAR_GLOSSINESS: 'KHR_materials_pbrSpecularGlossiness',\n\t\tKHR_MATERIALS_TRANSMISSION: 'KHR_materials_transmission',\n\t\tKHR_MATERIALS_UNLIT: 'KHR_materials_unlit',\n\t\tKHR_TEXTURE_BASISU: 'KHR_texture_basisu',\n\t\tKHR_TEXTURE_TRANSFORM: 'KHR_texture_transform',\n\t\tKHR_MESH_QUANTIZATION: 'KHR_mesh_quantization',\n\t\tEXT_TEXTURE_WEBP: 'EXT_texture_webp',\n\t\tEXT_MESHOPT_COMPRESSION: 'EXT_meshopt_compression',\n\t\tMSFT_TEXTURE_DDS: 'MSFT_texture_dds'\n\t};\n\n\t/**\n\t * DDS Texture Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/MSFT_texture_dds\n\t *\n\t */\n\tfunction GLTFTextureDDSExtension( ddsLoader ) {\n\n\t\tif ( ! ddsLoader ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: Attempting to load .dds texture without importing THREE.DDSLoader' );\n\n\t\t}\n\n\t\tthis.name = EXTENSIONS.MSFT_TEXTURE_DDS;\n\t\tthis.ddsLoader = ddsLoader;\n\n\t}\n\n\t/**\n\t * Punctual Lights Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual\n\t */\n\tfunction GLTFLightsExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.KHR_LIGHTS_PUNCTUAL;\n\n\t\t// Object3D instance caches\n\t\tthis.cache = { refs: {}, uses: {} };\n\n\t}\n\n\tGLTFLightsExtension.prototype._markDefs = function () {\n\n\t\tvar parser = this.parser;\n\t\tvar nodeDefs = this.parser.json.nodes || [];\n\n\t\tfor ( var nodeIndex = 0, nodeLength = nodeDefs.length; nodeIndex < nodeLength; nodeIndex ++ ) {\n\n\t\t\tvar nodeDef = nodeDefs[ nodeIndex ];\n\n\t\t\tif ( nodeDef.extensions\n\t\t\t\t&& nodeDef.extensions[ this.name ]\n\t\t\t\t&& nodeDef.extensions[ this.name ].light !== undefined ) {\n\n\t\t\t\tparser._addNodeRef( this.cache, nodeDef.extensions[ this.name ].light );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\tGLTFLightsExtension.prototype._loadLight = function ( lightIndex ) {\n\n\t\tvar parser = this.parser;\n\t\tvar cacheKey = 'light:' + lightIndex;\n\t\tvar dependency = parser.cache.get( cacheKey );\n\n\t\tif ( dependency ) return dependency;\n\n\t\tvar json = parser.json;\n\t\tvar extensions = ( json.extensions && json.extensions[ this.name ] ) || {};\n\t\tvar lightDefs = extensions.lights || [];\n\t\tvar lightDef = lightDefs[ lightIndex ];\n\t\tvar lightNode;\n\n\t\tvar color = new THREE.Color( 0xffffff );\n\n\t\tif ( lightDef.color !== undefined ) color.fromArray( lightDef.color );\n\n\t\tvar range = lightDef.range !== undefined ? lightDef.range : 0;\n\n\t\tswitch ( lightDef.type ) {\n\n\t\t\tcase 'directional':\n\t\t\t\tlightNode = new THREE.DirectionalLight( color );\n\t\t\t\tlightNode.target.position.set( 0, 0, - 1 );\n\t\t\t\tlightNode.add( lightNode.target );\n\t\t\t\tbreak;\n\n\t\t\tcase 'point':\n\t\t\t\tlightNode = new THREE.PointLight( color );\n\t\t\t\tlightNode.distance = range;\n\t\t\t\tbreak;\n\n\t\t\tcase 'spot':\n\t\t\t\tlightNode = new THREE.SpotLight( color );\n\t\t\t\tlightNode.distance = range;\n\t\t\t\t// Handle spotlight properties.\n\t\t\t\tlightDef.spot = lightDef.spot || {};\n\t\t\t\tlightDef.spot.innerConeAngle = lightDef.spot.innerConeAngle !== undefined ? lightDef.spot.innerConeAngle : 0;\n\t\t\t\tlightDef.spot.outerConeAngle = lightDef.spot.outerConeAngle !== undefined ? lightDef.spot.outerConeAngle : Math.PI / 4.0;\n\t\t\t\tlightNode.angle = lightDef.spot.outerConeAngle;\n\t\t\t\tlightNode.penumbra = 1.0 - lightDef.spot.innerConeAngle / lightDef.spot.outerConeAngle;\n\t\t\t\tlightNode.target.position.set( 0, 0, - 1 );\n\t\t\t\tlightNode.add( lightNode.target );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'THREE.GLTFLoader: Unexpected light type: ' + lightDef.type );\n\n\t\t}\n\n\t\t// Some lights (e.g. spot) default to a position other than the origin. Reset the position\n\t\t// here, because node-level parsing will only override position if explicitly specified.\n\t\tlightNode.position.set( 0, 0, 0 );\n\n\t\tlightNode.decay = 2;\n\n\t\tif ( lightDef.intensity !== undefined ) lightNode.intensity = lightDef.intensity;\n\n\t\tlightNode.name = parser.createUniqueName( lightDef.name || ( 'light_' + lightIndex ) );\n\n\t\tdependency = Promise.resolve( lightNode );\n\n\t\tparser.cache.add( cacheKey, dependency );\n\n\t\treturn dependency;\n\n\t};\n\n\tGLTFLightsExtension.prototype.createNodeAttachment = function ( nodeIndex ) {\n\n\t\tvar self = this;\n\t\tvar parser = this.parser;\n\t\tvar json = parser.json;\n\t\tvar nodeDef = json.nodes[ nodeIndex ];\n\t\tvar lightDef = ( nodeDef.extensions && nodeDef.extensions[ this.name ] ) || {};\n\t\tvar lightIndex = lightDef.light;\n\n\t\tif ( lightIndex === undefined ) return null;\n\n\t\treturn this._loadLight( lightIndex ).then( function ( light ) {\n\n\t\t\treturn parser._getNodeRef( self.cache, lightIndex, light );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Unlit Materials Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit\n\t */\n\tfunction GLTFMaterialsUnlitExtension() {\n\n\t\tthis.name = EXTENSIONS.KHR_MATERIALS_UNLIT;\n\n\t}\n\n\tGLTFMaterialsUnlitExtension.prototype.getMaterialType = function () {\n\n\t\treturn THREE.MeshBasicMaterial;\n\n\t};\n\n\tGLTFMaterialsUnlitExtension.prototype.extendParams = function ( materialParams, materialDef, parser ) {\n\n\t\tvar pending = [];\n\n\t\tmaterialParams.color = new THREE.Color( 1.0, 1.0, 1.0 );\n\t\tmaterialParams.opacity = 1.0;\n\n\t\tvar metallicRoughness = materialDef.pbrMetallicRoughness;\n\n\t\tif ( metallicRoughness ) {\n\n\t\t\tif ( Array.isArray( metallicRoughness.baseColorFactor ) ) {\n\n\t\t\t\tvar array = metallicRoughness.baseColorFactor;\n\n\t\t\t\tmaterialParams.color.fromArray( array );\n\t\t\t\tmaterialParams.opacity = array[ 3 ];\n\n\t\t\t}\n\n\t\t\tif ( metallicRoughness.baseColorTexture !== undefined ) {\n\n\t\t\t\tpending.push( parser.assignTexture( materialParams, 'map', metallicRoughness.baseColorTexture ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn Promise.all( pending );\n\n\t};\n\n\t/**\n\t * Clearcoat Materials Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat\n\t */\n\tfunction GLTFMaterialsClearcoatExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.KHR_MATERIALS_CLEARCOAT;\n\n\t}\n\n\tGLTFMaterialsClearcoatExtension.prototype.getMaterialType = function ( materialIndex ) {\n\n\t\tvar parser = this.parser;\n\t\tvar materialDef = parser.json.materials[ materialIndex ];\n\n\t\tif ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null;\n\n\t\treturn THREE.MeshPhysicalMaterial;\n\n\t};\n\n\tGLTFMaterialsClearcoatExtension.prototype.extendMaterialParams = function ( materialIndex, materialParams ) {\n\n\t\tvar parser = this.parser;\n\t\tvar materialDef = parser.json.materials[ materialIndex ];\n\n\t\tif ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) {\n\n\t\t\treturn Promise.resolve();\n\n\t\t}\n\n\t\tvar pending = [];\n\n\t\tvar extension = materialDef.extensions[ this.name ];\n\n\t\tif ( extension.clearcoatFactor !== undefined ) {\n\n\t\t\tmaterialParams.clearcoat = extension.clearcoatFactor;\n\n\t\t}\n\n\t\tif ( extension.clearcoatTexture !== undefined ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'clearcoatMap', extension.clearcoatTexture ) );\n\n\t\t}\n\n\t\tif ( extension.clearcoatRoughnessFactor !== undefined ) {\n\n\t\t\tmaterialParams.clearcoatRoughness = extension.clearcoatRoughnessFactor;\n\n\t\t}\n\n\t\tif ( extension.clearcoatRoughnessTexture !== undefined ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'clearcoatRoughnessMap', extension.clearcoatRoughnessTexture ) );\n\n\t\t}\n\n\t\tif ( extension.clearcoatNormalTexture !== undefined ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'clearcoatNormalMap', extension.clearcoatNormalTexture ) );\n\n\t\t\tif ( extension.clearcoatNormalTexture.scale !== undefined ) {\n\n\t\t\t\tvar scale = extension.clearcoatNormalTexture.scale;\n\n\t\t\t\t// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995\n\t\t\t\tmaterialParams.clearcoatNormalScale = new THREE.Vector2( scale, -scale );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn Promise.all( pending );\n\n\t};\n\n\t/**\n\t * Transmission Materials Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_transmission\n\t * Draft: https://github.com/KhronosGroup/glTF/pull/1698\n\t */\n\tfunction GLTFMaterialsTransmissionExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.KHR_MATERIALS_TRANSMISSION;\n\n\t}\n\n\tGLTFMaterialsTransmissionExtension.prototype.getMaterialType = function ( materialIndex ) {\n\n\t\tvar parser = this.parser;\n\t\tvar materialDef = parser.json.materials[ materialIndex ];\n\n\t\tif ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) return null;\n\n\t\treturn THREE.MeshPhysicalMaterial;\n\n\t};\n\n\tGLTFMaterialsTransmissionExtension.prototype.extendMaterialParams = function ( materialIndex, materialParams ) {\n\n\t\tvar parser = this.parser;\n\t\tvar materialDef = parser.json.materials[ materialIndex ];\n\n\t\tif ( ! materialDef.extensions || ! materialDef.extensions[ this.name ] ) {\n\n\t\t\treturn Promise.resolve();\n\n\t\t}\n\n\t\tvar pending = [];\n\n\t\tvar extension = materialDef.extensions[ this.name ];\n\n\t\tif ( extension.transmissionFactor !== undefined ) {\n\n\t\t\tmaterialParams.transmission = extension.transmissionFactor;\n\n\t\t}\n\n\t\tif ( extension.transmissionTexture !== undefined ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'transmissionMap', extension.transmissionTexture ) );\n\n\t\t}\n\n\t\treturn Promise.all( pending );\n\n\t};\n\n\t/**\n\t * BasisU Texture Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_basisu\n\t */\n\tfunction GLTFTextureBasisUExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.KHR_TEXTURE_BASISU;\n\n\t}\n\n\tGLTFTextureBasisUExtension.prototype.loadTexture = function ( textureIndex ) {\n\n\t\tvar parser = this.parser;\n\t\tvar json = parser.json;\n\n\t\tvar textureDef = json.textures[ textureIndex ];\n\n\t\tif ( ! textureDef.extensions || ! textureDef.extensions[ this.name ] ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tvar extension = textureDef.extensions[ this.name ];\n\t\tvar source = json.images[ extension.source ];\n\t\tvar loader = parser.options.ktx2Loader;\n\n\t\tif ( ! loader ) {\n\n\t\t\tif ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) {\n\n\t\t\t\tthrow new Error( 'THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures' );\n\n\t\t\t} else {\n\n\t\t\t\t// Assumes that the extension is optional and that a fallback texture is present\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn parser.loadTextureImage( textureIndex, source, loader );\n\n\t};\n\n\t/**\n\t * WebP Texture Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_texture_webp\n\t */\n\tfunction GLTFTextureWebPExtension( parser ) {\n\n\t\tthis.parser = parser;\n\t\tthis.name = EXTENSIONS.EXT_TEXTURE_WEBP;\n\t\tthis.isSupported = null;\n\n\t}\n\n\tGLTFTextureWebPExtension.prototype.loadTexture = function ( textureIndex ) {\n\n\t\tvar name = this.name;\n\t\tvar parser = this.parser;\n\t\tvar json = parser.json;\n\n\t\tvar textureDef = json.textures[ textureIndex ];\n\n\t\tif ( ! textureDef.extensions || ! textureDef.extensions[ name ] ) {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t\tvar extension = textureDef.extensions[ name ];\n\t\tvar source = json.images[ extension.source ];\n\t\tvar loader = source.uri ? parser.options.manager.getHandler( source.uri ) : parser.textureLoader;\n\n\t\treturn this.detectSupport().then( function ( isSupported ) {\n\n\t\t\tif ( isSupported ) return parser.loadTextureImage( textureIndex, source, loader );\n\n\t\t\tif ( json.extensionsRequired && json.extensionsRequired.indexOf( name ) >= 0 ) {\n\n\t\t\t\tthrow new Error( 'THREE.GLTFLoader: WebP required by asset but unsupported.' );\n\n\t\t\t}\n\n\t\t\t// Fall back to PNG or JPEG.\n\t\t\treturn parser.loadTexture( textureIndex );\n\n\t\t} );\n\n\t};\n\n\tGLTFTextureWebPExtension.prototype.detectSupport = function () {\n\n\t\tif ( ! this.isSupported ) {\n\n\t\t\tthis.isSupported = new Promise( function ( resolve ) {\n\n\t\t\t\tvar image = new Image();\n\n\t\t\t\t// Lossy test image. Support for lossy images doesn't guarantee support for all\n\t\t\t\t// WebP images, unfortunately.\n\t\t\t\timage.src = 'data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA';\n\n\t\t\t\timage.onload = image.onerror = function () {\n\n\t\t\t\t\tresolve( image.height === 1 );\n\n\t\t\t\t};\n\n\t\t\t} );\n\n\t\t}\n\n\t\treturn this.isSupported;\n\n\t};\n\n\t/**\n\t* meshopt BufferView Compression Extension\n\t*\n\t* Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/EXT_meshopt_compression\n\t*/\n\tfunction GLTFMeshoptCompression( parser ) {\n\n\t\tthis.name = EXTENSIONS.EXT_MESHOPT_COMPRESSION;\n\t\tthis.parser = parser;\n\n\t}\n\n\tGLTFMeshoptCompression.prototype.loadBufferView = function ( index ) {\n\n\t\tvar json = this.parser.json;\n\t\tvar bufferView = json.bufferViews[ index ];\n\n\t\tif ( bufferView.extensions && bufferView.extensions[ this.name ] ) {\n\n\t\t\tvar extensionDef = bufferView.extensions[ this.name ];\n\n\t\t\tvar buffer = this.parser.getDependency( 'buffer', extensionDef.buffer );\n\t\t\tvar decoder = this.parser.options.meshoptDecoder;\n\n\t\t\tif ( ! decoder || ! decoder.supported ) {\n\n\t\t\t\tif ( json.extensionsRequired && json.extensionsRequired.indexOf( this.name ) >= 0 ) {\n\n\t\t\t\t\tthrow new Error( 'THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files' );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Assumes that the extension is optional and that fallback buffer data is present\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn Promise.all( [ buffer, decoder.ready ] ).then( function ( res ) {\n\n\t\t\t\tvar byteOffset = extensionDef.byteOffset || 0;\n\t\t\t\tvar byteLength = extensionDef.byteLength || 0;\n\n\t\t\t\tvar count = extensionDef.count;\n\t\t\t\tvar stride = extensionDef.byteStride;\n\n\t\t\t\tvar result = new ArrayBuffer( count * stride );\n\t\t\t\tvar source = new Uint8Array( res[ 0 ], byteOffset, byteLength );\n\n\t\t\t\tdecoder.decodeGltfBuffer( new Uint8Array( result ), count, stride, source, extensionDef.mode, extensionDef.filter );\n\t\t\t\treturn result;\n\n\t\t\t} );\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t};\n\n\t/* BINARY EXTENSION */\n\tvar BINARY_EXTENSION_HEADER_MAGIC = 'glTF';\n\tvar BINARY_EXTENSION_HEADER_LENGTH = 12;\n\tvar BINARY_EXTENSION_CHUNK_TYPES = { JSON: 0x4E4F534A, BIN: 0x004E4942 };\n\n\tfunction GLTFBinaryExtension( data ) {\n\n\t\tthis.name = EXTENSIONS.KHR_BINARY_GLTF;\n\t\tthis.content = null;\n\t\tthis.body = null;\n\n\t\tvar headerView = new DataView( data, 0, BINARY_EXTENSION_HEADER_LENGTH );\n\n\t\tthis.header = {\n\t\t\tmagic: THREE.LoaderUtils.decodeText( new Uint8Array( data.slice( 0, 4 ) ) ),\n\t\t\tversion: headerView.getUint32( 4, true ),\n\t\t\tlength: headerView.getUint32( 8, true )\n\t\t};\n\n\t\tif ( this.header.magic !== BINARY_EXTENSION_HEADER_MAGIC ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: Unsupported glTF-Binary header.' );\n\n\t\t} else if ( this.header.version < 2.0 ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: Legacy binary file detected.' );\n\n\t\t}\n\n\t\tvar chunkContentsLength = this.header.length - BINARY_EXTENSION_HEADER_LENGTH;\n\t\tvar chunkView = new DataView( data, BINARY_EXTENSION_HEADER_LENGTH );\n\t\tvar chunkIndex = 0;\n\n\t\twhile ( chunkIndex < chunkContentsLength ) {\n\n\t\t\tvar chunkLength = chunkView.getUint32( chunkIndex, true );\n\t\t\tchunkIndex += 4;\n\n\t\t\tvar chunkType = chunkView.getUint32( chunkIndex, true );\n\t\t\tchunkIndex += 4;\n\n\t\t\tif ( chunkType === BINARY_EXTENSION_CHUNK_TYPES.JSON ) {\n\n\t\t\t\tvar contentArray = new Uint8Array( data, BINARY_EXTENSION_HEADER_LENGTH + chunkIndex, chunkLength );\n\t\t\t\tthis.content = THREE.LoaderUtils.decodeText( contentArray );\n\n\t\t\t} else if ( chunkType === BINARY_EXTENSION_CHUNK_TYPES.BIN ) {\n\n\t\t\t\tvar byteOffset = BINARY_EXTENSION_HEADER_LENGTH + chunkIndex;\n\t\t\t\tthis.body = data.slice( byteOffset, byteOffset + chunkLength );\n\n\t\t\t}\n\n\t\t\t// Clients must ignore chunks with unknown types.\n\n\t\t\tchunkIndex += chunkLength;\n\n\t\t}\n\n\t\tif ( this.content === null ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: JSON content not found.' );\n\n\t\t}\n\n\t}\n\n\t/**\n\t * DRACO Mesh Compression Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression\n\t */\n\tfunction GLTFDracoMeshCompressionExtension( json, dracoLoader ) {\n\n\t\tif ( ! dracoLoader ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: No DRACOLoader instance provided.' );\n\n\t\t}\n\n\t\tthis.name = EXTENSIONS.KHR_DRACO_MESH_COMPRESSION;\n\t\tthis.json = json;\n\t\tthis.dracoLoader = dracoLoader;\n\t\tthis.dracoLoader.preload();\n\n\t}\n\n\tGLTFDracoMeshCompressionExtension.prototype.decodePrimitive = function ( primitive, parser ) {\n\n\t\tvar json = this.json;\n\t\tvar dracoLoader = this.dracoLoader;\n\t\tvar bufferViewIndex = primitive.extensions[ this.name ].bufferView;\n\t\tvar gltfAttributeMap = primitive.extensions[ this.name ].attributes;\n\t\tvar threeAttributeMap = {};\n\t\tvar attributeNormalizedMap = {};\n\t\tvar attributeTypeMap = {};\n\n\t\tfor ( var attributeName in gltfAttributeMap ) {\n\n\t\t\tvar threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase();\n\n\t\t\tthreeAttributeMap[ threeAttributeName ] = gltfAttributeMap[ attributeName ];\n\n\t\t}\n\n\t\tfor ( attributeName in primitive.attributes ) {\n\n\t\t\tvar threeAttributeName = ATTRIBUTES[ attributeName ] || attributeName.toLowerCase();\n\n\t\t\tif ( gltfAttributeMap[ attributeName ] !== undefined ) {\n\n\t\t\t\tvar accessorDef = json.accessors[ primitive.attributes[ attributeName ] ];\n\t\t\t\tvar componentType = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ];\n\n\t\t\t\tattributeTypeMap[ threeAttributeName ] = componentType;\n\t\t\t\tattributeNormalizedMap[ threeAttributeName ] = accessorDef.normalized === true;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn parser.getDependency( 'bufferView', bufferViewIndex ).then( function ( bufferView ) {\n\n\t\t\treturn new Promise( function ( resolve ) {\n\n\t\t\t\tdracoLoader.decodeDracoFile( bufferView, function ( geometry ) {\n\n\t\t\t\t\tfor ( var attributeName in geometry.attributes ) {\n\n\t\t\t\t\t\tvar attribute = geometry.attributes[ attributeName ];\n\t\t\t\t\t\tvar normalized = attributeNormalizedMap[ attributeName ];\n\n\t\t\t\t\t\tif ( normalized !== undefined ) attribute.normalized = normalized;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve( geometry );\n\n\t\t\t\t}, threeAttributeMap, attributeTypeMap );\n\n\t\t\t} );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Texture Transform Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform\n\t */\n\tfunction GLTFTextureTransformExtension() {\n\n\t\tthis.name = EXTENSIONS.KHR_TEXTURE_TRANSFORM;\n\n\t}\n\n\tGLTFTextureTransformExtension.prototype.extendTexture = function ( texture, transform ) {\n\n\t\ttexture = texture.clone();\n\n\t\tif ( transform.offset !== undefined ) {\n\n\t\t\ttexture.offset.fromArray( transform.offset );\n\n\t\t}\n\n\t\tif ( transform.rotation !== undefined ) {\n\n\t\t\ttexture.rotation = transform.rotation;\n\n\t\t}\n\n\t\tif ( transform.scale !== undefined ) {\n\n\t\t\ttexture.repeat.fromArray( transform.scale );\n\n\t\t}\n\n\t\tif ( transform.texCoord !== undefined ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFLoader: Custom UV sets in \"' + this.name + '\" extension not yet supported.' );\n\n\t\t}\n\n\t\ttexture.needsUpdate = true;\n\n\t\treturn texture;\n\n\t};\n\n\t/**\n\t * Specular-Glossiness Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness\n\t */\n\n\t/**\n\t * A sub class of THREE.StandardMaterial with some of the functionality\n\t * changed via the `onBeforeCompile` callback\n\t * @pailhead\n\t */\n\n\tfunction GLTFMeshStandardSGMaterial( params ) {\n\n\t\tTHREE.MeshStandardMaterial.call( this );\n\n\t\tthis.isGLTFSpecularGlossinessMaterial = true;\n\n\t\t//various chunks that need replacing\n\t\tvar specularMapParsFragmentChunk = [\n\t\t\t'#ifdef USE_SPECULARMAP',\n\t\t\t'\tuniform sampler2D specularMap;',\n\t\t\t'#endif'\n\t\t].join( '\\n' );\n\n\t\tvar glossinessMapParsFragmentChunk = [\n\t\t\t'#ifdef USE_GLOSSINESSMAP',\n\t\t\t'\tuniform sampler2D glossinessMap;',\n\t\t\t'#endif'\n\t\t].join( '\\n' );\n\n\t\tvar specularMapFragmentChunk = [\n\t\t\t'vec3 specularFactor = specular;',\n\t\t\t'#ifdef USE_SPECULARMAP',\n\t\t\t'\tvec4 texelSpecular = texture2D( specularMap, vUv );',\n\t\t\t'\ttexelSpecular = sRGBToLinear( texelSpecular );',\n\t\t\t'\t// reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture',\n\t\t\t'\tspecularFactor *= texelSpecular.rgb;',\n\t\t\t'#endif'\n\t\t].join( '\\n' );\n\n\t\tvar glossinessMapFragmentChunk = [\n\t\t\t'float glossinessFactor = glossiness;',\n\t\t\t'#ifdef USE_GLOSSINESSMAP',\n\t\t\t'\tvec4 texelGlossiness = texture2D( glossinessMap, vUv );',\n\t\t\t'\t// reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture',\n\t\t\t'\tglossinessFactor *= texelGlossiness.a;',\n\t\t\t'#endif'\n\t\t].join( '\\n' );\n\n\t\tvar lightPhysicalFragmentChunk = [\n\t\t\t'PhysicalMaterial material;',\n\t\t\t'material.diffuseColor = diffuseColor.rgb * ( 1. - max( specularFactor.r, max( specularFactor.g, specularFactor.b ) ) );',\n\t\t\t'vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );',\n\t\t\t'float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );',\n\t\t\t'material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 ); // 0.0525 corresponds to the base mip of a 256 cubemap.',\n\t\t\t'material.specularRoughness += geometryRoughness;',\n\t\t\t'material.specularRoughness = min( material.specularRoughness, 1.0 );',\n\t\t\t'material.specularColor = specularFactor;',\n\t\t].join( '\\n' );\n\n\t\tvar uniforms = {\n\t\t\tspecular: { value: new THREE.Color().setHex( 0xffffff ) },\n\t\t\tglossiness: { value: 1 },\n\t\t\tspecularMap: { value: null },\n\t\t\tglossinessMap: { value: null }\n\t\t};\n\n\t\tthis._extraUniforms = uniforms;\n\n\t\tthis.onBeforeCompile = function ( shader ) {\n\n\t\t\tfor ( var uniformName in uniforms ) {\n\n\t\t\t\tshader.uniforms[ uniformName ] = uniforms[ uniformName ];\n\n\t\t\t}\n\n\t\t\tshader.fragmentShader = shader.fragmentShader\n\t\t\t\t.replace( 'uniform float roughness;', 'uniform vec3 specular;' )\n\t\t\t\t.replace( 'uniform float metalness;', 'uniform float glossiness;' )\n\t\t\t\t.replace( '#include <roughnessmap_pars_fragment>', specularMapParsFragmentChunk )\n\t\t\t\t.replace( '#include <metalnessmap_pars_fragment>', glossinessMapParsFragmentChunk )\n\t\t\t\t.replace( '#include <roughnessmap_fragment>', specularMapFragmentChunk )\n\t\t\t\t.replace( '#include <metalnessmap_fragment>', glossinessMapFragmentChunk )\n\t\t\t\t.replace( '#include <lights_physical_fragment>', lightPhysicalFragmentChunk );\n\n\t\t};\n\n\t\tObject.defineProperties( this, {\n\n\t\t\tspecular: {\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn uniforms.specular.value;\n\n\t\t\t\t},\n\t\t\t\tset: function ( v ) {\n\n\t\t\t\t\tuniforms.specular.value = v;\n\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tspecularMap: {\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn uniforms.specularMap.value;\n\n\t\t\t\t},\n\t\t\t\tset: function ( v ) {\n\n\t\t\t\t\tuniforms.specularMap.value = v;\n\n\t\t\t\t\tif ( v ) {\n\n\t\t\t\t\t\tthis.defines.USE_SPECULARMAP = ''; // USE_UV is set by the renderer for specular maps\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdelete this.defines.USE_SPECULARMAP;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tglossiness: {\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn uniforms.glossiness.value;\n\n\t\t\t\t},\n\t\t\t\tset: function ( v ) {\n\n\t\t\t\t\tuniforms.glossiness.value = v;\n\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tglossinessMap: {\n\t\t\t\tget: function () {\n\n\t\t\t\t\treturn uniforms.glossinessMap.value;\n\n\t\t\t\t},\n\t\t\t\tset: function ( v ) {\n\n\t\t\t\t\tuniforms.glossinessMap.value = v;\n\n\t\t\t\t\tif ( v ) {\n\n\t\t\t\t\t\tthis.defines.USE_GLOSSINESSMAP = '';\n\t\t\t\t\t\tthis.defines.USE_UV = '';\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdelete this.defines.USE_GLOSSINESSMAP;\n\t\t\t\t\t\tdelete this.defines.USE_UV;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t} );\n\n\t\tdelete this.metalness;\n\t\tdelete this.roughness;\n\t\tdelete this.metalnessMap;\n\t\tdelete this.roughnessMap;\n\n\t\tthis.setValues( params );\n\n\t}\n\n\tGLTFMeshStandardSGMaterial.prototype = Object.create( THREE.MeshStandardMaterial.prototype );\n\tGLTFMeshStandardSGMaterial.prototype.constructor = GLTFMeshStandardSGMaterial;\n\n\tGLTFMeshStandardSGMaterial.prototype.copy = function ( source ) {\n\n\t\tTHREE.MeshStandardMaterial.prototype.copy.call( this, source );\n\t\tthis.specularMap = source.specularMap;\n\t\tthis.specular.copy( source.specular );\n\t\tthis.glossinessMap = source.glossinessMap;\n\t\tthis.glossiness = source.glossiness;\n\t\tdelete this.metalness;\n\t\tdelete this.roughness;\n\t\tdelete this.metalnessMap;\n\t\tdelete this.roughnessMap;\n\t\treturn this;\n\n\t};\n\n\tfunction GLTFMaterialsPbrSpecularGlossinessExtension() {\n\n\t\treturn {\n\n\t\t\tname: EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,\n\n\t\t\tspecularGlossinessParams: [\n\t\t\t\t'color',\n\t\t\t\t'map',\n\t\t\t\t'lightMap',\n\t\t\t\t'lightMapIntensity',\n\t\t\t\t'aoMap',\n\t\t\t\t'aoMapIntensity',\n\t\t\t\t'emissive',\n\t\t\t\t'emissiveIntensity',\n\t\t\t\t'emissiveMap',\n\t\t\t\t'bumpMap',\n\t\t\t\t'bumpScale',\n\t\t\t\t'normalMap',\n\t\t\t\t'normalMapType',\n\t\t\t\t'displacementMap',\n\t\t\t\t'displacementScale',\n\t\t\t\t'displacementBias',\n\t\t\t\t'specularMap',\n\t\t\t\t'specular',\n\t\t\t\t'glossinessMap',\n\t\t\t\t'glossiness',\n\t\t\t\t'alphaMap',\n\t\t\t\t'envMap',\n\t\t\t\t'envMapIntensity',\n\t\t\t\t'refractionRatio',\n\t\t\t],\n\n\t\t\tgetMaterialType: function () {\n\n\t\t\t\treturn GLTFMeshStandardSGMaterial;\n\n\t\t\t},\n\n\t\t\textendParams: function ( materialParams, materialDef, parser ) {\n\n\t\t\t\tvar pbrSpecularGlossiness = materialDef.extensions[ this.name ];\n\n\t\t\t\tmaterialParams.color = new THREE.Color( 1.0, 1.0, 1.0 );\n\t\t\t\tmaterialParams.opacity = 1.0;\n\n\t\t\t\tvar pending = [];\n\n\t\t\t\tif ( Array.isArray( pbrSpecularGlossiness.diffuseFactor ) ) {\n\n\t\t\t\t\tvar array = pbrSpecularGlossiness.diffuseFactor;\n\n\t\t\t\t\tmaterialParams.color.fromArray( array );\n\t\t\t\t\tmaterialParams.opacity = array[ 3 ];\n\n\t\t\t\t}\n\n\t\t\t\tif ( pbrSpecularGlossiness.diffuseTexture !== undefined ) {\n\n\t\t\t\t\tpending.push( parser.assignTexture( materialParams, 'map', pbrSpecularGlossiness.diffuseTexture ) );\n\n\t\t\t\t}\n\n\t\t\t\tmaterialParams.emissive = new THREE.Color( 0.0, 0.0, 0.0 );\n\t\t\t\tmaterialParams.glossiness = pbrSpecularGlossiness.glossinessFactor !== undefined ? pbrSpecularGlossiness.glossinessFactor : 1.0;\n\t\t\t\tmaterialParams.specular = new THREE.Color( 1.0, 1.0, 1.0 );\n\n\t\t\t\tif ( Array.isArray( pbrSpecularGlossiness.specularFactor ) ) {\n\n\t\t\t\t\tmaterialParams.specular.fromArray( pbrSpecularGlossiness.specularFactor );\n\n\t\t\t\t}\n\n\t\t\t\tif ( pbrSpecularGlossiness.specularGlossinessTexture !== undefined ) {\n\n\t\t\t\t\tvar specGlossMapDef = pbrSpecularGlossiness.specularGlossinessTexture;\n\t\t\t\t\tpending.push( parser.assignTexture( materialParams, 'glossinessMap', specGlossMapDef ) );\n\t\t\t\t\tpending.push( parser.assignTexture( materialParams, 'specularMap', specGlossMapDef ) );\n\n\t\t\t\t}\n\n\t\t\t\treturn Promise.all( pending );\n\n\t\t\t},\n\n\t\t\tcreateMaterial: function ( materialParams ) {\n\n\t\t\t\tvar material = new GLTFMeshStandardSGMaterial( materialParams );\n\t\t\t\tmaterial.fog = true;\n\n\t\t\t\tmaterial.color = materialParams.color;\n\n\t\t\t\tmaterial.map = materialParams.map === undefined ? null : materialParams.map;\n\n\t\t\t\tmaterial.lightMap = null;\n\t\t\t\tmaterial.lightMapIntensity = 1.0;\n\n\t\t\t\tmaterial.aoMap = materialParams.aoMap === undefined ? null : materialParams.aoMap;\n\t\t\t\tmaterial.aoMapIntensity = 1.0;\n\n\t\t\t\tmaterial.emissive = materialParams.emissive;\n\t\t\t\tmaterial.emissiveIntensity = 1.0;\n\t\t\t\tmaterial.emissiveMap = materialParams.emissiveMap === undefined ? null : materialParams.emissiveMap;\n\n\t\t\t\tmaterial.bumpMap = materialParams.bumpMap === undefined ? null : materialParams.bumpMap;\n\t\t\t\tmaterial.bumpScale = 1;\n\n\t\t\t\tmaterial.normalMap = materialParams.normalMap === undefined ? null : materialParams.normalMap;\n\t\t\t\tmaterial.normalMapType = THREE.TangentSpaceNormalMap;\n\n\t\t\t\tif ( materialParams.normalScale ) material.normalScale = materialParams.normalScale;\n\n\t\t\t\tmaterial.displacementMap = null;\n\t\t\t\tmaterial.displacementScale = 1;\n\t\t\t\tmaterial.displacementBias = 0;\n\n\t\t\t\tmaterial.specularMap = materialParams.specularMap === undefined ? null : materialParams.specularMap;\n\t\t\t\tmaterial.specular = materialParams.specular;\n\n\t\t\t\tmaterial.glossinessMap = materialParams.glossinessMap === undefined ? null : materialParams.glossinessMap;\n\t\t\t\tmaterial.glossiness = materialParams.glossiness;\n\n\t\t\t\tmaterial.alphaMap = null;\n\n\t\t\t\tmaterial.envMap = materialParams.envMap === undefined ? null : materialParams.envMap;\n\t\t\t\tmaterial.envMapIntensity = 1.0;\n\n\t\t\t\tmaterial.refractionRatio = 0.98;\n\n\t\t\t\treturn material;\n\n\t\t\t},\n\n\t\t};\n\n\t}\n\n\t/**\n\t * Mesh Quantization Extension\n\t *\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization\n\t */\n\tfunction GLTFMeshQuantizationExtension() {\n\n\t\tthis.name = EXTENSIONS.KHR_MESH_QUANTIZATION;\n\n\t}\n\n\t/*********************************/\n\t/********** INTERPOLATION ********/\n\t/*********************************/\n\n\t// Spline Interpolation\n\t// Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#appendix-c-spline-interpolation\n\tfunction GLTFCubicSplineInterpolant( parameterPositions, sampleValues, sampleSize, resultBuffer ) {\n\n\t\tTHREE.Interpolant.call( this, parameterPositions, sampleValues, sampleSize, resultBuffer );\n\n\t}\n\n\tGLTFCubicSplineInterpolant.prototype = Object.create( THREE.Interpolant.prototype );\n\tGLTFCubicSplineInterpolant.prototype.constructor = GLTFCubicSplineInterpolant;\n\n\tGLTFCubicSplineInterpolant.prototype.copySampleValue_ = function ( index ) {\n\n\t\t// Copies a sample value to the result buffer. See description of glTF\n\t\t// CUBICSPLINE values layout in interpolate_() function below.\n\n\t\tvar result = this.resultBuffer,\n\t\t\tvalues = this.sampleValues,\n\t\t\tvalueSize = this.valueSize,\n\t\t\toffset = index * valueSize * 3 + valueSize;\n\n\t\tfor ( var i = 0; i !== valueSize; i ++ ) {\n\n\t\t\tresult[ i ] = values[ offset + i ];\n\n\t\t}\n\n\t\treturn result;\n\n\t};\n\n\tGLTFCubicSplineInterpolant.prototype.beforeStart_ = GLTFCubicSplineInterpolant.prototype.copySampleValue_;\n\n\tGLTFCubicSplineInterpolant.prototype.afterEnd_ = GLTFCubicSplineInterpolant.prototype.copySampleValue_;\n\n\tGLTFCubicSplineInterpolant.prototype.interpolate_ = function ( i1, t0, t, t1 ) {\n\n\t\tvar result = this.resultBuffer;\n\t\tvar values = this.sampleValues;\n\t\tvar stride = this.valueSize;\n\n\t\tvar stride2 = stride * 2;\n\t\tvar stride3 = stride * 3;\n\n\t\tvar td = t1 - t0;\n\n\t\tvar p = ( t - t0 ) / td;\n\t\tvar pp = p * p;\n\t\tvar ppp = pp * p;\n\n\t\tvar offset1 = i1 * stride3;\n\t\tvar offset0 = offset1 - stride3;\n\n\t\tvar s2 = - 2 * ppp + 3 * pp;\n\t\tvar s3 = ppp - pp;\n\t\tvar s0 = 1 - s2;\n\t\tvar s1 = s3 - pp + p;\n\n\t\t// Layout of keyframe output values for CUBICSPLINE animations:\n\t\t// [ inTangent_1, splineVertex_1, outTangent_1, inTangent_2, splineVertex_2, ... ]\n\t\tfor ( var i = 0; i !== stride; i ++ ) {\n\n\t\t\tvar p0 = values[ offset0 + i + stride ]; // splineVertex_k\n\t\t\tvar m0 = values[ offset0 + i + stride2 ] * td; // outTangent_k * (t_k+1 - t_k)\n\t\t\tvar p1 = values[ offset1 + i + stride ]; // splineVertex_k+1\n\t\t\tvar m1 = values[ offset1 + i ] * td; // inTangent_k+1 * (t_k+1 - t_k)\n\n\t\t\tresult[ i ] = s0 * p0 + s1 * m0 + s2 * p1 + s3 * m1;\n\n\t\t}\n\n\t\treturn result;\n\n\t};\n\n\t/*********************************/\n\t/********** INTERNALS ************/\n\t/*********************************/\n\n\t/* CONSTANTS */\n\n\tvar WEBGL_CONSTANTS = {\n\t\tFLOAT: 5126,\n\t\t//FLOAT_MAT2: 35674,\n\t\tFLOAT_MAT3: 35675,\n\t\tFLOAT_MAT4: 35676,\n\t\tFLOAT_VEC2: 35664,\n\t\tFLOAT_VEC3: 35665,\n\t\tFLOAT_VEC4: 35666,\n\t\tLINEAR: 9729,\n\t\tREPEAT: 10497,\n\t\tSAMPLER_2D: 35678,\n\t\tPOINTS: 0,\n\t\tLINES: 1,\n\t\tLINE_LOOP: 2,\n\t\tLINE_STRIP: 3,\n\t\tTRIANGLES: 4,\n\t\tTRIANGLE_STRIP: 5,\n\t\tTRIANGLE_FAN: 6,\n\t\tUNSIGNED_BYTE: 5121,\n\t\tUNSIGNED_SHORT: 5123\n\t};\n\n\tvar WEBGL_COMPONENT_TYPES = {\n\t\t5120: Int8Array,\n\t\t5121: Uint8Array,\n\t\t5122: Int16Array,\n\t\t5123: Uint16Array,\n\t\t5125: Uint32Array,\n\t\t5126: Float32Array\n\t};\n\n\tvar WEBGL_FILTERS = {\n\t\t9728: THREE.NearestFilter,\n\t\t9729: THREE.LinearFilter,\n\t\t9984: THREE.NearestMipmapNearestFilter,\n\t\t9985: THREE.LinearMipmapNearestFilter,\n\t\t9986: THREE.NearestMipmapLinearFilter,\n\t\t9987: THREE.LinearMipmapLinearFilter\n\t};\n\n\tvar WEBGL_WRAPPINGS = {\n\t\t33071: THREE.ClampToEdgeWrapping,\n\t\t33648: THREE.MirroredRepeatWrapping,\n\t\t10497: THREE.RepeatWrapping\n\t};\n\n\tvar WEBGL_TYPE_SIZES = {\n\t\t'SCALAR': 1,\n\t\t'VEC2': 2,\n\t\t'VEC3': 3,\n\t\t'VEC4': 4,\n\t\t'MAT2': 4,\n\t\t'MAT3': 9,\n\t\t'MAT4': 16\n\t};\n\n\tvar ATTRIBUTES = {\n\t\tPOSITION: 'position',\n\t\tNORMAL: 'normal',\n\t\tTANGENT: 'tangent',\n\t\tTEXCOORD_0: 'uv',\n\t\tTEXCOORD_1: 'uv2',\n\t\tCOLOR_0: 'color',\n\t\tWEIGHTS_0: 'skinWeight',\n\t\tJOINTS_0: 'skinIndex',\n\t};\n\n\tvar PATH_PROPERTIES = {\n\t\tscale: 'scale',\n\t\ttranslation: 'position',\n\t\trotation: 'quaternion',\n\t\tweights: 'morphTargetInfluences'\n\t};\n\n\tvar INTERPOLATION = {\n\t\tCUBICSPLINE: undefined, // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each\n\t\t // keyframe track will be initialized with a default interpolation type, then modified.\n\t\tLINEAR: THREE.InterpolateLinear,\n\t\tSTEP: THREE.InterpolateDiscrete\n\t};\n\n\tvar ALPHA_MODES = {\n\t\tOPAQUE: 'OPAQUE',\n\t\tMASK: 'MASK',\n\t\tBLEND: 'BLEND'\n\t};\n\n\t/* UTILITY FUNCTIONS */\n\n\tfunction resolveURL( url, path ) {\n\n\t\t// Invalid URL\n\t\tif ( typeof url !== 'string' || url === '' ) return '';\n\n\t\t// Host Relative URL\n\t\tif ( /^https?:\\/\\//i.test( path ) && /^\\//.test( url ) ) {\n\n\t\t\tpath = path.replace( /(^https?:\\/\\/[^\\/]+).*/i, '$1' );\n\n\t\t}\n\n\t\t// Absolute URL http://,https://,//\n\t\tif ( /^(https?:)?\\/\\//i.test( url ) ) return url;\n\n\t\t// Data URI\n\t\tif ( /^data:.*,.*$/i.test( url ) ) return url;\n\n\t\t// Blob URL\n\t\tif ( /^blob:.*$/i.test( url ) ) return url;\n\n\t\t// Relative URL\n\t\treturn path + url;\n\n\t}\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#default-material\n\t */\n\tfunction createDefaultMaterial( cache ) {\n\n\t\tif ( cache[ 'DefaultMaterial' ] === undefined ) {\n\n\t\t\tcache[ 'DefaultMaterial' ] = new THREE.MeshStandardMaterial( {\n\t\t\t\tcolor: 0xFFFFFF,\n\t\t\t\temissive: 0x000000,\n\t\t\t\tmetalness: 1,\n\t\t\t\troughness: 1,\n\t\t\t\ttransparent: false,\n\t\t\t\tdepthTest: true,\n\t\t\t\tside: THREE.FrontSide\n\t\t\t} );\n\n\t\t}\n\n\t\treturn cache[ 'DefaultMaterial' ];\n\n\t}\n\n\tfunction addUnknownExtensionsToUserData( knownExtensions, object, objectDef ) {\n\n\t\t// Add unknown glTF extensions to an object's userData.\n\n\t\tfor ( var name in objectDef.extensions ) {\n\n\t\t\tif ( knownExtensions[ name ] === undefined ) {\n\n\t\t\t\tobject.userData.gltfExtensions = object.userData.gltfExtensions || {};\n\t\t\t\tobject.userData.gltfExtensions[ name ] = objectDef.extensions[ name ];\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t/**\n\t * @param {THREE.Object3D|THREE.Material|THREE.BufferGeometry} object\n\t * @param {GLTF.definition} gltfDef\n\t */\n\tfunction assignExtrasToUserData( object, gltfDef ) {\n\n\t\tif ( gltfDef.extras !== undefined ) {\n\n\t\t\tif ( typeof gltfDef.extras === 'object' ) {\n\n\t\t\t\tObject.assign( object.userData, gltfDef.extras );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Ignoring primitive type .extras, ' + gltfDef.extras );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#morph-targets\n\t *\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {Array<GLTF.Target>} targets\n\t * @param {GLTFParser} parser\n\t * @return {Promise<THREE.BufferGeometry>}\n\t */\n\tfunction addMorphTargets( geometry, targets, parser ) {\n\n\t\tvar hasMorphPosition = false;\n\t\tvar hasMorphNormal = false;\n\n\t\tfor ( var i = 0, il = targets.length; i < il; i ++ ) {\n\n\t\t\tvar target = targets[ i ];\n\n\t\t\tif ( target.POSITION !== undefined ) hasMorphPosition = true;\n\t\t\tif ( target.NORMAL !== undefined ) hasMorphNormal = true;\n\n\t\t\tif ( hasMorphPosition && hasMorphNormal ) break;\n\n\t\t}\n\n\t\tif ( ! hasMorphPosition && ! hasMorphNormal ) return Promise.resolve( geometry );\n\n\t\tvar pendingPositionAccessors = [];\n\t\tvar pendingNormalAccessors = [];\n\n\t\tfor ( var i = 0, il = targets.length; i < il; i ++ ) {\n\n\t\t\tvar target = targets[ i ];\n\n\t\t\tif ( hasMorphPosition ) {\n\n\t\t\t\tvar pendingAccessor = target.POSITION !== undefined\n\t\t\t\t\t? parser.getDependency( 'accessor', target.POSITION )\n\t\t\t\t\t: geometry.attributes.position;\n\n\t\t\t\tpendingPositionAccessors.push( pendingAccessor );\n\n\t\t\t}\n\n\t\t\tif ( hasMorphNormal ) {\n\n\t\t\t\tvar pendingAccessor = target.NORMAL !== undefined\n\t\t\t\t\t? parser.getDependency( 'accessor', target.NORMAL )\n\t\t\t\t\t: geometry.attributes.normal;\n\n\t\t\t\tpendingNormalAccessors.push( pendingAccessor );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn Promise.all( [\n\t\t\tPromise.all( pendingPositionAccessors ),\n\t\t\tPromise.all( pendingNormalAccessors )\n\t\t] ).then( function ( accessors ) {\n\n\t\t\tvar morphPositions = accessors[ 0 ];\n\t\t\tvar morphNormals = accessors[ 1 ];\n\n\t\t\tif ( hasMorphPosition ) geometry.morphAttributes.position = morphPositions;\n\t\t\tif ( hasMorphNormal ) geometry.morphAttributes.normal = morphNormals;\n\t\t\tgeometry.morphTargetsRelative = true;\n\n\t\t\treturn geometry;\n\n\t\t} );\n\n\t}\n\n\t/**\n\t * @param {THREE.Mesh} mesh\n\t * @param {GLTF.Mesh} meshDef\n\t */\n\tfunction updateMorphTargets( mesh, meshDef ) {\n\n\t\tmesh.updateMorphTargets();\n\n\t\tif ( meshDef.weights !== undefined ) {\n\n\t\t\tfor ( var i = 0, il = meshDef.weights.length; i < il; i ++ ) {\n\n\t\t\t\tmesh.morphTargetInfluences[ i ] = meshDef.weights[ i ];\n\n\t\t\t}\n\n\t\t}\n\n\t\t// .extras has user-defined data, so check that .extras.targetNames is an array.\n\t\tif ( meshDef.extras && Array.isArray( meshDef.extras.targetNames ) ) {\n\n\t\t\tvar targetNames = meshDef.extras.targetNames;\n\n\t\t\tif ( mesh.morphTargetInfluences.length === targetNames.length ) {\n\n\t\t\t\tmesh.morphTargetDictionary = {};\n\n\t\t\t\tfor ( var i = 0, il = targetNames.length; i < il; i ++ ) {\n\n\t\t\t\t\tmesh.morphTargetDictionary[ targetNames[ i ] ] = i;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.' );\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\tfunction createPrimitiveKey( primitiveDef ) {\n\n\t\tvar dracoExtension = primitiveDef.extensions && primitiveDef.extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ];\n\t\tvar geometryKey;\n\n\t\tif ( dracoExtension ) {\n\n\t\t\tgeometryKey = 'draco:' + dracoExtension.bufferView\n\t\t\t\t+ ':' + dracoExtension.indices\n\t\t\t\t+ ':' + createAttributesKey( dracoExtension.attributes );\n\n\t\t} else {\n\n\t\t\tgeometryKey = primitiveDef.indices + ':' + createAttributesKey( primitiveDef.attributes ) + ':' + primitiveDef.mode;\n\n\t\t}\n\n\t\treturn geometryKey;\n\n\t}\n\n\tfunction createAttributesKey( attributes ) {\n\n\t\tvar attributesKey = '';\n\n\t\tvar keys = Object.keys( attributes ).sort();\n\n\t\tfor ( var i = 0, il = keys.length; i < il; i ++ ) {\n\n\t\t\tattributesKey += keys[ i ] + ':' + attributes[ keys[ i ] ] + ';';\n\n\t\t}\n\n\t\treturn attributesKey;\n\n\t}\n\n\t/* GLTF PARSER */\n\n\tfunction GLTFParser( json, options ) {\n\n\t\tthis.json = json || {};\n\t\tthis.extensions = {};\n\t\tthis.plugins = {};\n\t\tthis.options = options || {};\n\n\t\t// loader object cache\n\t\tthis.cache = new GLTFRegistry();\n\n\t\t// associations between Three.js objects and glTF elements\n\t\tthis.associations = new Map();\n\n\t\t// BufferGeometry caching\n\t\tthis.primitiveCache = {};\n\n\t\t// Object3D instance caches\n\t\tthis.meshCache = { refs: {}, uses: {} };\n\t\tthis.cameraCache = { refs: {}, uses: {} };\n\t\tthis.lightCache = { refs: {}, uses: {} };\n\n\t\t// Track node names, to ensure no duplicates\n\t\tthis.nodeNamesUsed = {};\n\n\t\t// Use an ImageBitmapLoader if imageBitmaps are supported. Moves much of the\n\t\t// expensive work of uploading a texture to the GPU off the main thread.\n\t\tif ( typeof createImageBitmap !== 'undefined' && /Firefox/.test( navigator.userAgent ) === false ) {\n\n\t\t\tthis.textureLoader = new THREE.ImageBitmapLoader( this.options.manager );\n\n\t\t} else {\n\n\t\t\tthis.textureLoader = new THREE.TextureLoader( this.options.manager );\n\n\t\t}\n\n\t\tthis.textureLoader.setCrossOrigin( this.options.crossOrigin );\n\n\t\tthis.fileLoader = new THREE.FileLoader( this.options.manager );\n\t\tthis.fileLoader.setResponseType( 'arraybuffer' );\n\n\t\tif ( this.options.crossOrigin === 'use-credentials' ) {\n\n\t\t\tthis.fileLoader.setWithCredentials( true );\n\n\t\t}\n\n\t}\n\n\tGLTFParser.prototype.setExtensions = function ( extensions ) {\n\n\t\tthis.extensions = extensions;\n\n\t};\n\n\tGLTFParser.prototype.setPlugins = function ( plugins ) {\n\n\t\tthis.plugins = plugins;\n\n\t};\n\n\tGLTFParser.prototype.parse = function ( onLoad, onError ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar extensions = this.extensions;\n\n\t\t// Clear the loader cache\n\t\tthis.cache.removeAll();\n\n\t\t// Mark the special nodes/meshes in json for efficient parse\n\t\tthis._invokeAll( function ( ext ) {\n\n\t\t\treturn ext._markDefs && ext._markDefs();\n\n\t\t} );\n\n\t\tPromise.all( [\n\n\t\t\tthis.getDependencies( 'scene' ),\n\t\t\tthis.getDependencies( 'animation' ),\n\t\t\tthis.getDependencies( 'camera' ),\n\n\t\t] ).then( function ( dependencies ) {\n\n\t\t\tvar result = {\n\t\t\t\tscene: dependencies[ 0 ][ json.scene || 0 ],\n\t\t\t\tscenes: dependencies[ 0 ],\n\t\t\t\tanimations: dependencies[ 1 ],\n\t\t\t\tcameras: dependencies[ 2 ],\n\t\t\t\tasset: json.asset,\n\t\t\t\tparser: parser,\n\t\t\t\tuserData: {}\n\t\t\t};\n\n\t\t\taddUnknownExtensionsToUserData( extensions, result, json );\n\n\t\t\tassignExtrasToUserData( result, json );\n\n\t\t\tonLoad( result );\n\n\t\t} ).catch( onError );\n\n\t};\n\n\t/**\n\t * Marks the special nodes/meshes in json for efficient parse.\n\t */\n\tGLTFParser.prototype._markDefs = function () {\n\n\t\tvar nodeDefs = this.json.nodes || [];\n\t\tvar skinDefs = this.json.skins || [];\n\t\tvar meshDefs = this.json.meshes || [];\n\n\t\t// Nothing in the node definition indicates whether it is a Bone or an\n\t\t// Object3D. Use the skins' joint references to mark bones.\n\t\tfor ( var skinIndex = 0, skinLength = skinDefs.length; skinIndex < skinLength; skinIndex ++ ) {\n\n\t\t\tvar joints = skinDefs[ skinIndex ].joints;\n\n\t\t\tfor ( var i = 0, il = joints.length; i < il; i ++ ) {\n\n\t\t\t\tnodeDefs[ joints[ i ] ].isBone = true;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Iterate over all nodes, marking references to shared resources,\n\t\t// as well as skeleton joints.\n\t\tfor ( var nodeIndex = 0, nodeLength = nodeDefs.length; nodeIndex < nodeLength; nodeIndex ++ ) {\n\n\t\t\tvar nodeDef = nodeDefs[ nodeIndex ];\n\n\t\t\tif ( nodeDef.mesh !== undefined ) {\n\n\t\t\t\tthis._addNodeRef( this.meshCache, nodeDef.mesh );\n\n\t\t\t\t// Nothing in the mesh definition indicates whether it is\n\t\t\t\t// a SkinnedMesh or Mesh. Use the node's mesh reference\n\t\t\t\t// to mark SkinnedMesh if node has skin.\n\t\t\t\tif ( nodeDef.skin !== undefined ) {\n\n\t\t\t\t\tmeshDefs[ nodeDef.mesh ].isSkinnedMesh = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( nodeDef.camera !== undefined ) {\n\n\t\t\t\tthis._addNodeRef( this.cameraCache, nodeDef.camera );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\t/**\n\t * Counts references to shared node / Object3D resources. These resources\n\t * can be reused, or \"instantiated\", at multiple nodes in the scene\n\t * hierarchy. Mesh, Camera, and Light instances are instantiated and must\n\t * be marked. Non-scenegraph resources (like Materials, Geometries, and\n\t * Textures) can be reused directly and are not marked here.\n\t *\n\t * Example: CesiumMilkTruck sample model reuses \"Wheel\" meshes.\n\t */\n\tGLTFParser.prototype._addNodeRef = function ( cache, index ) {\n\n\t\tif ( index === undefined ) return;\n\n\t\tif ( cache.refs[ index ] === undefined ) {\n\n\t\t\tcache.refs[ index ] = cache.uses[ index ] = 0;\n\n\t\t}\n\n\t\tcache.refs[ index ] ++;\n\n\t};\n\n\t/** Returns a reference to a shared resource, cloning it if necessary. */\n\tGLTFParser.prototype._getNodeRef = function ( cache, index, object ) {\n\n\t\tif ( cache.refs[ index ] <= 1 ) return object;\n\n\t\tvar ref = object.clone();\n\n\t\tref.name += '_instance_' + ( cache.uses[ index ] ++ );\n\n\t\treturn ref;\n\n\t};\n\n\tGLTFParser.prototype._invokeOne = function ( func ) {\n\n\t\tvar extensions = Object.values( this.plugins );\n\t\textensions.push( this );\n\n\t\tfor ( var i = 0; i < extensions.length; i ++ ) {\n\n\t\t\tvar result = func( extensions[ i ] );\n\n\t\t\tif ( result ) return result;\n\n\t\t}\n\n\t};\n\n\tGLTFParser.prototype._invokeAll = function ( func ) {\n\n\t\tvar extensions = Object.values( this.plugins );\n\t\textensions.unshift( this );\n\n\t\tvar pending = [];\n\n\t\tfor ( var i = 0; i < extensions.length; i ++ ) {\n\n\t\t\tvar result = func( extensions[ i ] );\n\n\t\t\tif ( result ) pending.push( result );\n\n\t\t}\n\n\t\treturn pending;\n\n\t};\n\n\t/**\n\t * Requests the specified dependency asynchronously, with caching.\n\t * @param {string} type\n\t * @param {number} index\n\t * @return {Promise<THREE.Object3D|THREE.Material|THREE.Texture|THREE.AnimationClip|ArrayBuffer|Object>}\n\t */\n\tGLTFParser.prototype.getDependency = function ( type, index ) {\n\n\t\tvar cacheKey = type + ':' + index;\n\t\tvar dependency = this.cache.get( cacheKey );\n\n\t\tif ( ! dependency ) {\n\n\t\t\tswitch ( type ) {\n\n\t\t\t\tcase 'scene':\n\t\t\t\t\tdependency = this.loadScene( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'node':\n\t\t\t\t\tdependency = this.loadNode( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'mesh':\n\t\t\t\t\tdependency = this._invokeOne( function ( ext ) {\n\n\t\t\t\t\t\treturn ext.loadMesh && ext.loadMesh( index );\n\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'accessor':\n\t\t\t\t\tdependency = this.loadAccessor( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'bufferView':\n\t\t\t\t\tdependency = this._invokeOne( function ( ext ) {\n\n\t\t\t\t\t\treturn ext.loadBufferView && ext.loadBufferView( index );\n\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'buffer':\n\t\t\t\t\tdependency = this.loadBuffer( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'material':\n\t\t\t\t\tdependency = this._invokeOne( function ( ext ) {\n\n\t\t\t\t\t\treturn ext.loadMaterial && ext.loadMaterial( index );\n\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'texture':\n\t\t\t\t\tdependency = this._invokeOne( function ( ext ) {\n\n\t\t\t\t\t\treturn ext.loadTexture && ext.loadTexture( index );\n\n\t\t\t\t\t} );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'skin':\n\t\t\t\t\tdependency = this.loadSkin( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'animation':\n\t\t\t\t\tdependency = this.loadAnimation( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'camera':\n\t\t\t\t\tdependency = this.loadCamera( index );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'Unknown type: ' + type );\n\n\t\t\t}\n\n\t\t\tthis.cache.add( cacheKey, dependency );\n\n\t\t}\n\n\t\treturn dependency;\n\n\t};\n\n\t/**\n\t * Requests all dependencies of the specified type asynchronously, with caching.\n\t * @param {string} type\n\t * @return {Promise<Array<Object>>}\n\t */\n\tGLTFParser.prototype.getDependencies = function ( type ) {\n\n\t\tvar dependencies = this.cache.get( type );\n\n\t\tif ( ! dependencies ) {\n\n\t\t\tvar parser = this;\n\t\t\tvar defs = this.json[ type + ( type === 'mesh' ? 'es' : 's' ) ] || [];\n\n\t\t\tdependencies = Promise.all( defs.map( function ( def, index ) {\n\n\t\t\t\treturn parser.getDependency( type, index );\n\n\t\t\t} ) );\n\n\t\t\tthis.cache.add( type, dependencies );\n\n\t\t}\n\n\t\treturn dependencies;\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views\n\t * @param {number} bufferIndex\n\t * @return {Promise<ArrayBuffer>}\n\t */\n\tGLTFParser.prototype.loadBuffer = function ( bufferIndex ) {\n\n\t\tvar bufferDef = this.json.buffers[ bufferIndex ];\n\t\tvar loader = this.fileLoader;\n\n\t\tif ( bufferDef.type && bufferDef.type !== 'arraybuffer' ) {\n\n\t\t\tthrow new Error( 'THREE.GLTFLoader: ' + bufferDef.type + ' buffer type is not supported.' );\n\n\t\t}\n\n\t\t// If present, GLB container is required to be the first buffer.\n\t\tif ( bufferDef.uri === undefined && bufferIndex === 0 ) {\n\n\t\t\treturn Promise.resolve( this.extensions[ EXTENSIONS.KHR_BINARY_GLTF ].body );\n\n\t\t}\n\n\t\tvar options = this.options;\n\n\t\treturn new Promise( function ( resolve, reject ) {\n\n\t\t\tloader.load( resolveURL( bufferDef.uri, options.path ), resolve, undefined, function () {\n\n\t\t\t\treject( new Error( 'THREE.GLTFLoader: Failed to load buffer \"' + bufferDef.uri + '\".' ) );\n\n\t\t\t} );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views\n\t * @param {number} bufferViewIndex\n\t * @return {Promise<ArrayBuffer>}\n\t */\n\tGLTFParser.prototype.loadBufferView = function ( bufferViewIndex ) {\n\n\t\tvar bufferViewDef = this.json.bufferViews[ bufferViewIndex ];\n\n\t\treturn this.getDependency( 'buffer', bufferViewDef.buffer ).then( function ( buffer ) {\n\n\t\t\tvar byteLength = bufferViewDef.byteLength || 0;\n\t\t\tvar byteOffset = bufferViewDef.byteOffset || 0;\n\t\t\treturn buffer.slice( byteOffset, byteOffset + byteLength );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors\n\t * @param {number} accessorIndex\n\t * @return {Promise<THREE.BufferAttribute|THREE.InterleavedBufferAttribute>}\n\t */\n\tGLTFParser.prototype.loadAccessor = function ( accessorIndex ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\n\t\tvar accessorDef = this.json.accessors[ accessorIndex ];\n\n\t\tif ( accessorDef.bufferView === undefined && accessorDef.sparse === undefined ) {\n\n\t\t\t// Ignore empty accessors, which may be used to declare runtime\n\t\t\t// information about attributes coming from another source (e.g. Draco\n\t\t\t// compression extension).\n\t\t\treturn Promise.resolve( null );\n\n\t\t}\n\n\t\tvar pendingBufferViews = [];\n\n\t\tif ( accessorDef.bufferView !== undefined ) {\n\n\t\t\tpendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.bufferView ) );\n\n\t\t} else {\n\n\t\t\tpendingBufferViews.push( null );\n\n\t\t}\n\n\t\tif ( accessorDef.sparse !== undefined ) {\n\n\t\t\tpendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.sparse.indices.bufferView ) );\n\t\t\tpendingBufferViews.push( this.getDependency( 'bufferView', accessorDef.sparse.values.bufferView ) );\n\n\t\t}\n\n\t\treturn Promise.all( pendingBufferViews ).then( function ( bufferViews ) {\n\n\t\t\tvar bufferView = bufferViews[ 0 ];\n\n\t\t\tvar itemSize = WEBGL_TYPE_SIZES[ accessorDef.type ];\n\t\t\tvar TypedArray = WEBGL_COMPONENT_TYPES[ accessorDef.componentType ];\n\n\t\t\t// For VEC3: itemSize is 3, elementBytes is 4, itemBytes is 12.\n\t\t\tvar elementBytes = TypedArray.BYTES_PER_ELEMENT;\n\t\t\tvar itemBytes = elementBytes * itemSize;\n\t\t\tvar byteOffset = accessorDef.byteOffset || 0;\n\t\t\tvar byteStride = accessorDef.bufferView !== undefined ? json.bufferViews[ accessorDef.bufferView ].byteStride : undefined;\n\t\t\tvar normalized = accessorDef.normalized === true;\n\t\t\tvar array, bufferAttribute;\n\n\t\t\t// The buffer is not interleaved if the stride is the item size in bytes.\n\t\t\tif ( byteStride && byteStride !== itemBytes ) {\n\n\t\t\t\t// Each \"slice\" of the buffer, as defined by 'count' elements of 'byteStride' bytes, gets its own InterleavedBuffer\n\t\t\t\t// This makes sure that IBA.count reflects accessor.count properly\n\t\t\t\tvar ibSlice = Math.floor( byteOffset / byteStride );\n\t\t\t\tvar ibCacheKey = 'InterleavedBuffer:' + accessorDef.bufferView + ':' + accessorDef.componentType + ':' + ibSlice + ':' + accessorDef.count;\n\t\t\t\tvar ib = parser.cache.get( ibCacheKey );\n\n\t\t\t\tif ( ! ib ) {\n\n\t\t\t\t\tarray = new TypedArray( bufferView, ibSlice * byteStride, accessorDef.count * byteStride / elementBytes );\n\n\t\t\t\t\t// Integer parameters to IB/IBA are in array elements, not bytes.\n\t\t\t\t\tib = new THREE.InterleavedBuffer( array, byteStride / elementBytes );\n\n\t\t\t\t\tparser.cache.add( ibCacheKey, ib );\n\n\t\t\t\t}\n\n\t\t\t\tbufferAttribute = new THREE.InterleavedBufferAttribute( ib, itemSize, ( byteOffset % byteStride ) / elementBytes, normalized );\n\n\t\t\t} else {\n\n\t\t\t\tif ( bufferView === null ) {\n\n\t\t\t\t\tarray = new TypedArray( accessorDef.count * itemSize );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tarray = new TypedArray( bufferView, byteOffset, accessorDef.count * itemSize );\n\n\t\t\t\t}\n\n\t\t\t\tbufferAttribute = new THREE.BufferAttribute( array, itemSize, normalized );\n\n\t\t\t}\n\n\t\t\t// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#sparse-accessors\n\t\t\tif ( accessorDef.sparse !== undefined ) {\n\n\t\t\t\tvar itemSizeIndices = WEBGL_TYPE_SIZES.SCALAR;\n\t\t\t\tvar TypedArrayIndices = WEBGL_COMPONENT_TYPES[ accessorDef.sparse.indices.componentType ];\n\n\t\t\t\tvar byteOffsetIndices = accessorDef.sparse.indices.byteOffset || 0;\n\t\t\t\tvar byteOffsetValues = accessorDef.sparse.values.byteOffset || 0;\n\n\t\t\t\tvar sparseIndices = new TypedArrayIndices( bufferViews[ 1 ], byteOffsetIndices, accessorDef.sparse.count * itemSizeIndices );\n\t\t\t\tvar sparseValues = new TypedArray( bufferViews[ 2 ], byteOffsetValues, accessorDef.sparse.count * itemSize );\n\n\t\t\t\tif ( bufferView !== null ) {\n\n\t\t\t\t\t// Avoid modifying the original ArrayBuffer, if the bufferView wasn't initialized with zeroes.\n\t\t\t\t\tbufferAttribute = new THREE.BufferAttribute( bufferAttribute.array.slice(), bufferAttribute.itemSize, bufferAttribute.normalized );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( var i = 0, il = sparseIndices.length; i < il; i ++ ) {\n\n\t\t\t\t\tvar index = sparseIndices[ i ];\n\n\t\t\t\t\tbufferAttribute.setX( index, sparseValues[ i * itemSize ] );\n\t\t\t\t\tif ( itemSize >= 2 ) bufferAttribute.setY( index, sparseValues[ i * itemSize + 1 ] );\n\t\t\t\t\tif ( itemSize >= 3 ) bufferAttribute.setZ( index, sparseValues[ i * itemSize + 2 ] );\n\t\t\t\t\tif ( itemSize >= 4 ) bufferAttribute.setW( index, sparseValues[ i * itemSize + 3 ] );\n\t\t\t\t\tif ( itemSize >= 5 ) throw new Error( 'THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn bufferAttribute;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures\n\t * @param {number} textureIndex\n\t * @return {Promise<THREE.Texture>}\n\t */\n\tGLTFParser.prototype.loadTexture = function ( textureIndex ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar options = this.options;\n\n\t\tvar textureDef = json.textures[ textureIndex ];\n\n\t\tvar textureExtensions = textureDef.extensions || {};\n\n\t\tvar source;\n\n\t\tif ( textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ] ) {\n\n\t\t\tsource = json.images[ textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].source ];\n\n\t\t} else {\n\n\t\t\tsource = json.images[ textureDef.source ];\n\n\t\t}\n\n\t\tvar loader;\n\n\t\tif ( source.uri ) {\n\n\t\t\tloader = options.manager.getHandler( source.uri );\n\n\t\t}\n\n\t\tif ( ! loader ) {\n\n\t\t\tloader = textureExtensions[ EXTENSIONS.MSFT_TEXTURE_DDS ]\n\t\t\t\t? parser.extensions[ EXTENSIONS.MSFT_TEXTURE_DDS ].ddsLoader\n\t\t\t\t: this.textureLoader;\n\n\t\t}\n\n\t\treturn this.loadTextureImage( textureIndex, source, loader );\n\n\t};\n\n\tGLTFParser.prototype.loadTextureImage = function ( textureIndex, source, loader ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar options = this.options;\n\n\t\tvar textureDef = json.textures[ textureIndex ];\n\n\t\tvar URL = self.URL || self.webkitURL;\n\n\t\tvar sourceURI = source.uri;\n\t\tvar isObjectURL = false;\n\t\tvar hasAlpha = true;\n\n\t\tif ( source.mimeType === 'image/jpeg' ) hasAlpha = false;\n\n\t\tif ( source.bufferView !== undefined ) {\n\n\t\t\t// Load binary image data from bufferView, if provided.\n\n\t\t\tsourceURI = parser.getDependency( 'bufferView', source.bufferView ).then( function ( bufferView ) {\n\n\t\t\t\tif ( source.mimeType === 'image/png' ) {\n\n\t\t\t\t\t// Inspect the PNG 'IHDR' chunk to determine whether the image could have an\n\t\t\t\t\t// alpha channel. This check is conservative — the image could have an alpha\n\t\t\t\t\t// channel with all values == 1, and the indexed type (colorType == 3) only\n\t\t\t\t\t// sometimes contains alpha.\n\t\t\t\t\t//\n\t\t\t\t\t// https://en.wikipedia.org/wiki/Portable_Network_Graphics#File_header\n\t\t\t\t\tvar colorType = new DataView( bufferView, 25, 1 ).getUint8( 0, false );\n\t\t\t\t\thasAlpha = colorType === 6 || colorType === 4 || colorType === 3;\n\n\t\t\t\t}\n\n\t\t\t\tisObjectURL = true;\n\t\t\t\tvar blob = new Blob( [ bufferView ], { type: source.mimeType } );\n\t\t\t\tsourceURI = URL.createObjectURL( blob );\n\t\t\t\treturn sourceURI;\n\n\t\t\t} );\n\n\t\t}\n\n\t\treturn Promise.resolve( sourceURI ).then( function ( sourceURI ) {\n\n\t\t\treturn new Promise( function ( resolve, reject ) {\n\n\t\t\t\tvar onLoad = resolve;\n\n\t\t\t\tif ( loader.isImageBitmapLoader === true ) {\n\n\t\t\t\t\tonLoad = function ( imageBitmap ) {\n\n\t\t\t\t\t\tresolve( new THREE.CanvasTexture( imageBitmap ) );\n\n\t\t\t\t\t};\n\n\t\t\t\t}\n\n\t\t\t\tloader.load( resolveURL( sourceURI, options.path ), onLoad, undefined, reject );\n\n\t\t\t} );\n\n\t\t} ).then( function ( texture ) {\n\n\t\t\t// Clean up resources and configure Texture.\n\n\t\t\tif ( isObjectURL === true ) {\n\n\t\t\t\tURL.revokeObjectURL( sourceURI );\n\n\t\t\t}\n\n\t\t\ttexture.flipY = false;\n\n\t\t\tif ( textureDef.name ) texture.name = textureDef.name;\n\n\t\t\t// When there is definitely no alpha channel in the texture, set RGBFormat to save space.\n\t\t\tif ( ! hasAlpha ) texture.format = THREE.RGBFormat;\n\n\t\t\tvar samplers = json.samplers || {};\n\t\t\tvar sampler = samplers[ textureDef.sampler ] || {};\n\n\t\t\ttexture.magFilter = WEBGL_FILTERS[ sampler.magFilter ] || THREE.LinearFilter;\n\t\t\ttexture.minFilter = WEBGL_FILTERS[ sampler.minFilter ] || THREE.LinearMipmapLinearFilter;\n\t\t\ttexture.wrapS = WEBGL_WRAPPINGS[ sampler.wrapS ] || THREE.RepeatWrapping;\n\t\t\ttexture.wrapT = WEBGL_WRAPPINGS[ sampler.wrapT ] || THREE.RepeatWrapping;\n\n\t\t\tparser.associations.set( texture, {\n\t\t\t\ttype: 'textures',\n\t\t\t\tindex: textureIndex\n\t\t\t} );\n\n\t\t\treturn texture;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Asynchronously assigns a texture to the given material parameters.\n\t * @param {Object} materialParams\n\t * @param {string} mapName\n\t * @param {Object} mapDef\n\t * @return {Promise}\n\t */\n\tGLTFParser.prototype.assignTexture = function ( materialParams, mapName, mapDef ) {\n\n\t\tvar parser = this;\n\n\t\treturn this.getDependency( 'texture', mapDef.index ).then( function ( texture ) {\n\n\t\t\t// Materials sample aoMap from UV set 1 and other maps from UV set 0 - this can't be configured\n\t\t\t// However, we will copy UV set 0 to UV set 1 on demand for aoMap\n\t\t\tif ( mapDef.texCoord !== undefined && mapDef.texCoord != 0 && ! ( mapName === 'aoMap' && mapDef.texCoord == 1 ) ) {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Custom UV set ' + mapDef.texCoord + ' for texture ' + mapName + ' not yet supported.' );\n\n\t\t\t}\n\n\t\t\tif ( parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] ) {\n\n\t\t\t\tvar transform = mapDef.extensions !== undefined ? mapDef.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ] : undefined;\n\n\t\t\t\tif ( transform ) {\n\n\t\t\t\t\tvar gltfReference = parser.associations.get( texture );\n\t\t\t\t\ttexture = parser.extensions[ EXTENSIONS.KHR_TEXTURE_TRANSFORM ].extendTexture( texture, transform );\n\t\t\t\t\tparser.associations.set( texture, gltfReference );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tmaterialParams[ mapName ] = texture;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Assigns final material to a Mesh, Line, or Points instance. The instance\n\t * already has a material (generated from the glTF material options alone)\n\t * but reuse of the same glTF material may require multiple threejs materials\n\t * to accomodate different primitive types, defines, etc. New materials will\n\t * be created if necessary, and reused from a cache.\n\t * @param {THREE.Object3D} mesh Mesh, Line, or Points instance.\n\t */\n\tGLTFParser.prototype.assignFinalMaterial = function ( mesh ) {\n\n\t\tvar geometry = mesh.geometry;\n\t\tvar material = mesh.material;\n\n\t\tvar useVertexTangents = geometry.attributes.tangent !== undefined;\n\t\tvar useVertexColors = geometry.attributes.color !== undefined;\n\t\tvar useFlatShading = geometry.attributes.normal === undefined;\n\t\tvar useSkinning = mesh.isSkinnedMesh === true;\n\t\tvar useMorphTargets = Object.keys( geometry.morphAttributes ).length > 0;\n\t\tvar useMorphNormals = useMorphTargets && geometry.morphAttributes.normal !== undefined;\n\n\t\tif ( mesh.isPoints ) {\n\n\t\t\tvar cacheKey = 'PointsMaterial:' + material.uuid;\n\n\t\t\tvar pointsMaterial = this.cache.get( cacheKey );\n\n\t\t\tif ( ! pointsMaterial ) {\n\n\t\t\t\tpointsMaterial = new THREE.PointsMaterial();\n\t\t\t\tTHREE.Material.prototype.copy.call( pointsMaterial, material );\n\t\t\t\tpointsMaterial.color.copy( material.color );\n\t\t\t\tpointsMaterial.map = material.map;\n\t\t\t\tpointsMaterial.sizeAttenuation = false; // glTF spec says points should be 1px\n\n\t\t\t\tthis.cache.add( cacheKey, pointsMaterial );\n\n\t\t\t}\n\n\t\t\tmaterial = pointsMaterial;\n\n\t\t} else if ( mesh.isLine ) {\n\n\t\t\tvar cacheKey = 'LineBasicMaterial:' + material.uuid;\n\n\t\t\tvar lineMaterial = this.cache.get( cacheKey );\n\n\t\t\tif ( ! lineMaterial ) {\n\n\t\t\t\tlineMaterial = new THREE.LineBasicMaterial();\n\t\t\t\tTHREE.Material.prototype.copy.call( lineMaterial, material );\n\t\t\t\tlineMaterial.color.copy( material.color );\n\n\t\t\t\tthis.cache.add( cacheKey, lineMaterial );\n\n\t\t\t}\n\n\t\t\tmaterial = lineMaterial;\n\n\t\t}\n\n\t\t// Clone the material if it will be modified\n\t\tif ( useVertexTangents || useVertexColors || useFlatShading || useSkinning || useMorphTargets ) {\n\n\t\t\tvar cacheKey = 'ClonedMaterial:' + material.uuid + ':';\n\n\t\t\tif ( material.isGLTFSpecularGlossinessMaterial ) cacheKey += 'specular-glossiness:';\n\t\t\tif ( useSkinning ) cacheKey += 'skinning:';\n\t\t\tif ( useVertexTangents ) cacheKey += 'vertex-tangents:';\n\t\t\tif ( useVertexColors ) cacheKey += 'vertex-colors:';\n\t\t\tif ( useFlatShading ) cacheKey += 'flat-shading:';\n\t\t\tif ( useMorphTargets ) cacheKey += 'morph-targets:';\n\t\t\tif ( useMorphNormals ) cacheKey += 'morph-normals:';\n\n\t\t\tvar cachedMaterial = this.cache.get( cacheKey );\n\n\t\t\tif ( ! cachedMaterial ) {\n\n\t\t\t\tcachedMaterial = material.clone();\n\n\t\t\t\tif ( useSkinning ) cachedMaterial.skinning = true;\n\t\t\t\tif ( useVertexColors ) cachedMaterial.vertexColors = true;\n\t\t\t\tif ( useFlatShading ) cachedMaterial.flatShading = true;\n\t\t\t\tif ( useMorphTargets ) cachedMaterial.morphTargets = true;\n\t\t\t\tif ( useMorphNormals ) cachedMaterial.morphNormals = true;\n\t\t\t\t\n\t\t\t\tif ( useVertexTangents ) {\n\n\t\t\t\t\tcachedMaterial.vertexTangents = true;\n\n\t\t\t\t\t// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995\n\t\t\t\t\tif ( material.normalScale ) material.normalScale.y *= -1;\n\t\t\t\t\tif ( material.clearcoatNormalScale ) material.clearcoatNormalScale.y *= -1;\n\n\t\t\t\t}\n\n\t\t\t\tthis.cache.add( cacheKey, cachedMaterial );\n\n\t\t\t\tthis.associations.set( cachedMaterial, this.associations.get( material ) );\n\n\t\t\t}\n\n\t\t\tmaterial = cachedMaterial;\n\n\t\t}\n\n\t\t// workarounds for mesh and geometry\n\n\t\tif ( material.aoMap && geometry.attributes.uv2 === undefined && geometry.attributes.uv !== undefined ) {\n\n\t\t\tgeometry.setAttribute( 'uv2', geometry.attributes.uv );\n\n\t\t}\n\n\t\tmesh.material = material;\n\n\t};\n\n\tGLTFParser.prototype.getMaterialType = function ( /* materialIndex */ ) {\n\n\t\treturn THREE.MeshStandardMaterial;\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials\n\t * @param {number} materialIndex\n\t * @return {Promise<THREE.Material>}\n\t */\n\tGLTFParser.prototype.loadMaterial = function ( materialIndex ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar extensions = this.extensions;\n\t\tvar materialDef = json.materials[ materialIndex ];\n\n\t\tvar materialType;\n\t\tvar materialParams = {};\n\t\tvar materialExtensions = materialDef.extensions || {};\n\n\t\tvar pending = [];\n\n\t\tif ( materialExtensions[ EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS ] ) {\n\n\t\t\tvar sgExtension = extensions[ EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS ];\n\t\t\tmaterialType = sgExtension.getMaterialType();\n\t\t\tpending.push( sgExtension.extendParams( materialParams, materialDef, parser ) );\n\n\t\t} else if ( materialExtensions[ EXTENSIONS.KHR_MATERIALS_UNLIT ] ) {\n\n\t\t\tvar kmuExtension = extensions[ EXTENSIONS.KHR_MATERIALS_UNLIT ];\n\t\t\tmaterialType = kmuExtension.getMaterialType();\n\t\t\tpending.push( kmuExtension.extendParams( materialParams, materialDef, parser ) );\n\n\t\t} else {\n\n\t\t\t// Specification:\n\t\t\t// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#metallic-roughness-material\n\n\t\t\tvar metallicRoughness = materialDef.pbrMetallicRoughness || {};\n\n\t\t\tmaterialParams.color = new THREE.Color( 1.0, 1.0, 1.0 );\n\t\t\tmaterialParams.opacity = 1.0;\n\n\t\t\tif ( Array.isArray( metallicRoughness.baseColorFactor ) ) {\n\n\t\t\t\tvar array = metallicRoughness.baseColorFactor;\n\n\t\t\t\tmaterialParams.color.fromArray( array );\n\t\t\t\tmaterialParams.opacity = array[ 3 ];\n\n\t\t\t}\n\n\t\t\tif ( metallicRoughness.baseColorTexture !== undefined ) {\n\n\t\t\t\tpending.push( parser.assignTexture( materialParams, 'map', metallicRoughness.baseColorTexture ) );\n\n\t\t\t}\n\n\t\t\tmaterialParams.metalness = metallicRoughness.metallicFactor !== undefined ? metallicRoughness.metallicFactor : 1.0;\n\t\t\tmaterialParams.roughness = metallicRoughness.roughnessFactor !== undefined ? metallicRoughness.roughnessFactor : 1.0;\n\n\t\t\tif ( metallicRoughness.metallicRoughnessTexture !== undefined ) {\n\n\t\t\t\tpending.push( parser.assignTexture( materialParams, 'metalnessMap', metallicRoughness.metallicRoughnessTexture ) );\n\t\t\t\tpending.push( parser.assignTexture( materialParams, 'roughnessMap', metallicRoughness.metallicRoughnessTexture ) );\n\n\t\t\t}\n\n\t\t\tmaterialType = this._invokeOne( function ( ext ) {\n\n\t\t\t\treturn ext.getMaterialType && ext.getMaterialType( materialIndex );\n\n\t\t\t} );\n\n\t\t\tpending.push( Promise.all( this._invokeAll( function ( ext ) {\n\n\t\t\t\treturn ext.extendMaterialParams && ext.extendMaterialParams( materialIndex, materialParams );\n\n\t\t\t} ) ) );\n\n\t\t}\n\n\t\tif ( materialDef.doubleSided === true ) {\n\n\t\t\tmaterialParams.side = THREE.DoubleSide;\n\n\t\t}\n\n\t\tvar alphaMode = materialDef.alphaMode || ALPHA_MODES.OPAQUE;\n\n\t\tif ( alphaMode === ALPHA_MODES.BLEND ) {\n\n\t\t\tmaterialParams.transparent = true;\n\n\t\t\t// See: https://github.com/mrdoob/three.js/issues/17706\n\t\t\tmaterialParams.depthWrite = false;\n\n\t\t} else {\n\n\t\t\tmaterialParams.transparent = false;\n\n\t\t\tif ( alphaMode === ALPHA_MODES.MASK ) {\n\n\t\t\t\tmaterialParams.alphaTest = materialDef.alphaCutoff !== undefined ? materialDef.alphaCutoff : 0.5;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( materialDef.normalTexture !== undefined && materialType !== THREE.MeshBasicMaterial ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'normalMap', materialDef.normalTexture ) );\n\n\t\t\t// https://github.com/mrdoob/three.js/issues/11438#issuecomment-507003995\n\t\t\tmaterialParams.normalScale = new THREE.Vector2( 1, -1 );\n\n\t\t\tif ( materialDef.normalTexture.scale !== undefined ) {\n\n\t\t\t\tmaterialParams.normalScale.set( materialDef.normalTexture.scale, -materialDef.normalTexture.scale );\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( materialDef.occlusionTexture !== undefined && materialType !== THREE.MeshBasicMaterial ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'aoMap', materialDef.occlusionTexture ) );\n\n\t\t\tif ( materialDef.occlusionTexture.strength !== undefined ) {\n\n\t\t\t\tmaterialParams.aoMapIntensity = materialDef.occlusionTexture.strength;\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( materialDef.emissiveFactor !== undefined && materialType !== THREE.MeshBasicMaterial ) {\n\n\t\t\tmaterialParams.emissive = new THREE.Color().fromArray( materialDef.emissiveFactor );\n\n\t\t}\n\n\t\tif ( materialDef.emissiveTexture !== undefined && materialType !== THREE.MeshBasicMaterial ) {\n\n\t\t\tpending.push( parser.assignTexture( materialParams, 'emissiveMap', materialDef.emissiveTexture ) );\n\n\t\t}\n\n\t\treturn Promise.all( pending ).then( function () {\n\n\t\t\tvar material;\n\n\t\t\tif ( materialType === GLTFMeshStandardSGMaterial ) {\n\n\t\t\t\tmaterial = extensions[ EXTENSIONS.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS ].createMaterial( materialParams );\n\n\t\t\t} else {\n\n\t\t\t\tmaterial = new materialType( materialParams );\n\n\t\t\t}\n\n\t\t\tif ( materialDef.name ) material.name = materialDef.name;\n\n\t\t\t// baseColorTexture, emissiveTexture, and specularGlossinessTexture use sRGB encoding.\n\t\t\tif ( material.map ) material.map.encoding = THREE.sRGBEncoding;\n\t\t\tif ( material.emissiveMap ) material.emissiveMap.encoding = THREE.sRGBEncoding;\n\n\t\t\tassignExtrasToUserData( material, materialDef );\n\n\t\t\tparser.associations.set( material, { type: 'materials', index: materialIndex } );\n\n\t\t\tif ( materialDef.extensions ) addUnknownExtensionsToUserData( extensions, material, materialDef );\n\n\t\t\treturn material;\n\n\t\t} );\n\n\t};\n\n\t/** When Object3D instances are targeted by animation, they need unique names. */\n\tGLTFParser.prototype.createUniqueName = function ( originalName ) {\n\n\t\tvar sanitizedName = THREE.PropertyBinding.sanitizeNodeName( originalName || '' );\n\n\t\tvar name = sanitizedName;\n\n\t\tfor ( var i = 1; this.nodeNamesUsed[ name ]; ++ i ) {\n\n\t\t\tname = sanitizedName + '_' + i;\n\n\t\t}\n\n\t\tthis.nodeNamesUsed[ name ] = true;\n\n\t\treturn name;\n\n\t};\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {GLTF.Primitive} primitiveDef\n\t * @param {GLTFParser} parser\n\t */\n\tfunction computeBounds( geometry, primitiveDef, parser ) {\n\n\t\tvar attributes = primitiveDef.attributes;\n\n\t\tvar box = new THREE.Box3();\n\n\t\tif ( attributes.POSITION !== undefined ) {\n\n\t\t\tvar accessor = parser.json.accessors[ attributes.POSITION ];\n\n\t\t\tvar min = accessor.min;\n\t\t\tvar max = accessor.max;\n\n\t\t\t// glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.\n\n\t\t\tif ( min !== undefined && max !== undefined ) {\n\n\t\t\t\tbox.set(\n\t\t\t\t\tnew THREE.Vector3( min[ 0 ], min[ 1 ], min[ 2 ] ),\n\t\t\t\t\tnew THREE.Vector3( max[ 0 ], max[ 1 ], max[ 2 ] ) );\n\n\t\t\t} else {\n\n\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Missing min/max properties for accessor POSITION.' );\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\treturn;\n\n\t\t}\n\n\t\tvar targets = primitiveDef.targets;\n\n\t\tif ( targets !== undefined ) {\n\n\t\t\tvar maxDisplacement = new THREE.Vector3();\n\t\t\tvar vector = new THREE.Vector3();\n\n\t\t\tfor ( var i = 0, il = targets.length; i < il; i ++ ) {\n\n\t\t\t\tvar target = targets[ i ];\n\n\t\t\t\tif ( target.POSITION !== undefined ) {\n\n\t\t\t\t\tvar accessor = parser.json.accessors[ target.POSITION ];\n\t\t\t\t\tvar min = accessor.min;\n\t\t\t\t\tvar max = accessor.max;\n\n\t\t\t\t\t// glTF requires 'min' and 'max', but VRM (which extends glTF) currently ignores that requirement.\n\n\t\t\t\t\tif ( min !== undefined && max !== undefined ) {\n\n\t\t\t\t\t\t// we need to get max of absolute components because target weight is [-1,1]\n\t\t\t\t\t\tvector.setX( Math.max( Math.abs( min[ 0 ] ), Math.abs( max[ 0 ] ) ) );\n\t\t\t\t\t\tvector.setY( Math.max( Math.abs( min[ 1 ] ), Math.abs( max[ 1 ] ) ) );\n\t\t\t\t\t\tvector.setZ( Math.max( Math.abs( min[ 2 ] ), Math.abs( max[ 2 ] ) ) );\n\n\t\t\t\t\t\t// Note: this assumes that the sum of all weights is at most 1. This isn't quite correct - it's more conservative\n\t\t\t\t\t\t// to assume that each target can have a max weight of 1. However, for some use cases - notably, when morph targets\n\t\t\t\t\t\t// are used to implement key-frame animations and as such only two are active at a time - this results in very large\n\t\t\t\t\t\t// boxes. So for now we make a box that's sometimes a touch too small but is hopefully mostly of reasonable size.\n\t\t\t\t\t\tmaxDisplacement.max( vector );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Missing min/max properties for accessor POSITION.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// As per comment above this box isn't conservative, but has a reasonable size for a very large number of morph targets.\n\t\t\tbox.expandByVector( maxDisplacement );\n\n\t\t}\n\n\t\tgeometry.boundingBox = box;\n\n\t\tvar sphere = new THREE.Sphere();\n\n\t\tbox.getCenter( sphere.center );\n\t\tsphere.radius = box.min.distanceTo( box.max ) / 2;\n\n\t\tgeometry.boundingSphere = sphere;\n\n\t}\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {GLTF.Primitive} primitiveDef\n\t * @param {GLTFParser} parser\n\t * @return {Promise<THREE.BufferGeometry>}\n\t */\n\tfunction addPrimitiveAttributes( geometry, primitiveDef, parser ) {\n\n\t\tvar attributes = primitiveDef.attributes;\n\n\t\tvar pending = [];\n\n\t\tfunction assignAttributeAccessor( accessorIndex, attributeName ) {\n\n\t\t\treturn parser.getDependency( 'accessor', accessorIndex )\n\t\t\t\t.then( function ( accessor ) {\n\n\t\t\t\t\tgeometry.setAttribute( attributeName, accessor );\n\n\t\t\t\t} );\n\n\t\t}\n\n\t\tfor ( var gltfAttributeName in attributes ) {\n\n\t\t\tvar threeAttributeName = ATTRIBUTES[ gltfAttributeName ] || gltfAttributeName.toLowerCase();\n\n\t\t\t// Skip attributes already provided by e.g. Draco extension.\n\t\t\tif ( threeAttributeName in geometry.attributes ) continue;\n\n\t\t\tpending.push( assignAttributeAccessor( attributes[ gltfAttributeName ], threeAttributeName ) );\n\n\t\t}\n\n\t\tif ( primitiveDef.indices !== undefined && ! geometry.index ) {\n\n\t\t\tvar accessor = parser.getDependency( 'accessor', primitiveDef.indices ).then( function ( accessor ) {\n\n\t\t\t\tgeometry.setIndex( accessor );\n\n\t\t\t} );\n\n\t\t\tpending.push( accessor );\n\n\t\t}\n\n\t\tassignExtrasToUserData( geometry, primitiveDef );\n\n\t\tcomputeBounds( geometry, primitiveDef, parser );\n\n\t\treturn Promise.all( pending ).then( function () {\n\n\t\t\treturn primitiveDef.targets !== undefined\n\t\t\t\t? addMorphTargets( geometry, primitiveDef.targets, parser )\n\t\t\t\t: geometry;\n\n\t\t} );\n\n\t}\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {Number} drawMode\n\t * @return {THREE.BufferGeometry}\n\t */\n\tfunction toTrianglesDrawMode( geometry, drawMode ) {\n\n\t\tvar index = geometry.getIndex();\n\n\t\t// generate index if not present\n\n\t\tif ( index === null ) {\n\n\t\t\tvar indices = [];\n\n\t\t\tvar position = geometry.getAttribute( 'position' );\n\n\t\t\tif ( position !== undefined ) {\n\n\t\t\t\tfor ( var i = 0; i < position.count; i ++ ) {\n\n\t\t\t\t\tindices.push( i );\n\n\t\t\t\t}\n\n\t\t\t\tgeometry.setIndex( indices );\n\t\t\t\tindex = geometry.getIndex();\n\n\t\t\t} else {\n\n\t\t\t\tconsole.error( 'THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.' );\n\t\t\t\treturn geometry;\n\n\t\t\t}\n\n\t\t}\n\n\t\t//\n\n\t\tvar numberOfTriangles = index.count - 2;\n\t\tvar newIndices = [];\n\n\t\tif ( drawMode === THREE.TriangleFanDrawMode ) {\n\n\t\t\t// gl.TRIANGLE_FAN\n\n\t\t\tfor ( var i = 1; i <= numberOfTriangles; i ++ ) {\n\n\t\t\t\tnewIndices.push( index.getX( 0 ) );\n\t\t\t\tnewIndices.push( index.getX( i ) );\n\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// gl.TRIANGLE_STRIP\n\n\t\t\tfor ( var i = 0; i < numberOfTriangles; i ++ ) {\n\n\t\t\t\tif ( i % 2 === 0 ) {\n\n\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\t\t\t\t\tnewIndices.push( index.getX( i + 2 ) );\n\n\n\t\t\t\t} else {\n\n\t\t\t\t\tnewIndices.push( index.getX( i + 2 ) );\n\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif ( ( newIndices.length / 3 ) !== numberOfTriangles ) {\n\n\t\t\tconsole.error( 'THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.' );\n\n\t\t}\n\n\t\t// build final geometry\n\n\t\tvar newGeometry = geometry.clone();\n\t\tnewGeometry.setIndex( newIndices );\n\n\t\treturn newGeometry;\n\n\t}\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#geometry\n\t *\n\t * Creates BufferGeometries from primitives.\n\t *\n\t * @param {Array<GLTF.Primitive>} primitives\n\t * @return {Promise<Array<THREE.BufferGeometry>>}\n\t */\n\tGLTFParser.prototype.loadGeometries = function ( primitives ) {\n\n\t\tvar parser = this;\n\t\tvar extensions = this.extensions;\n\t\tvar cache = this.primitiveCache;\n\n\t\tfunction createDracoPrimitive( primitive ) {\n\n\t\t\treturn extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ]\n\t\t\t\t.decodePrimitive( primitive, parser )\n\t\t\t\t.then( function ( geometry ) {\n\n\t\t\t\t\treturn addPrimitiveAttributes( geometry, primitive, parser );\n\n\t\t\t\t} );\n\n\t\t}\n\n\t\tvar pending = [];\n\n\t\tfor ( var i = 0, il = primitives.length; i < il; i ++ ) {\n\n\t\t\tvar primitive = primitives[ i ];\n\t\t\tvar cacheKey = createPrimitiveKey( primitive );\n\n\t\t\t// See if we've already created this geometry\n\t\t\tvar cached = cache[ cacheKey ];\n\n\t\t\tif ( cached ) {\n\n\t\t\t\t// Use the cached geometry if it exists\n\t\t\t\tpending.push( cached.promise );\n\n\t\t\t} else {\n\n\t\t\t\tvar geometryPromise;\n\n\t\t\t\tif ( primitive.extensions && primitive.extensions[ EXTENSIONS.KHR_DRACO_MESH_COMPRESSION ] ) {\n\n\t\t\t\t\t// Use DRACO geometry if available\n\t\t\t\t\tgeometryPromise = createDracoPrimitive( primitive );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Otherwise create a new geometry\n\t\t\t\t\tgeometryPromise = addPrimitiveAttributes( new THREE.BufferGeometry(), primitive, parser );\n\n\t\t\t\t}\n\n\t\t\t\t// Cache this geometry\n\t\t\t\tcache[ cacheKey ] = { primitive: primitive, promise: geometryPromise };\n\n\t\t\t\tpending.push( geometryPromise );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn Promise.all( pending );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes\n\t * @param {number} meshIndex\n\t * @return {Promise<THREE.Group|THREE.Mesh|THREE.SkinnedMesh>}\n\t */\n\tGLTFParser.prototype.loadMesh = function ( meshIndex ) {\n\n\t\tvar parser = this;\n\t\tvar json = this.json;\n\t\tvar extensions = this.extensions;\n\n\t\tvar meshDef = json.meshes[ meshIndex ];\n\t\tvar primitives = meshDef.primitives;\n\n\t\tvar pending = [];\n\n\t\tfor ( var i = 0, il = primitives.length; i < il; i ++ ) {\n\n\t\t\tvar material = primitives[ i ].material === undefined\n\t\t\t\t? createDefaultMaterial( this.cache )\n\t\t\t\t: this.getDependency( 'material', primitives[ i ].material );\n\n\t\t\tpending.push( material );\n\n\t\t}\n\n\t\tpending.push( parser.loadGeometries( primitives ) );\n\n\t\treturn Promise.all( pending ).then( function ( results ) {\n\n\t\t\tvar materials = results.slice( 0, results.length - 1 );\n\t\t\tvar geometries = results[ results.length - 1 ];\n\n\t\t\tvar meshes = [];\n\n\t\t\tfor ( var i = 0, il = geometries.length; i < il; i ++ ) {\n\n\t\t\t\tvar geometry = geometries[ i ];\n\t\t\t\tvar primitive = primitives[ i ];\n\n\t\t\t\t// 1. create Mesh\n\n\t\t\t\tvar mesh;\n\n\t\t\t\tvar material = materials[ i ];\n\n\t\t\t\tif ( primitive.mode === WEBGL_CONSTANTS.TRIANGLES ||\n\t\t\t\t\tprimitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ||\n\t\t\t\t\tprimitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN ||\n\t\t\t\t\tprimitive.mode === undefined ) {\n\n\t\t\t\t\t// .isSkinnedMesh isn't in glTF spec. See ._markDefs()\n\t\t\t\t\tmesh = meshDef.isSkinnedMesh === true\n\t\t\t\t\t\t? new THREE.SkinnedMesh( geometry, material )\n\t\t\t\t\t\t: new THREE.Mesh( geometry, material );\n\n\t\t\t\t\t// Fix double sided rendered models on certain mobile devices, see https://github.com/mrdoob/three.js/issues/20997#issuecomment-756082184\n\n\t\t\t\t\tif ( material.isMeshStandardMaterial === true &&\n\t\t\t\t\t\tmaterial.side === THREE.DoubleSide &&\n\t\t\t\t\t\tgeometry.getIndex() !== null &&\n\t\t\t\t\t\tgeometry.hasAttribute( 'position' ) === true &&\n\t\t\t\t\t\tgeometry.hasAttribute( 'normal' ) === true &&\n\t\t\t\t\t\tgeometry.hasAttribute( 'uv' ) === true &&\n\t\t\t\t\t\tgeometry.hasAttribute( 'tangent' ) === false ) {\n\n\t\t\t\t\t\tgeometry.computeTangents();\n\t\t\t\t\t\tmaterial.vertexTangents = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( mesh.isSkinnedMesh === true && ! mesh.geometry.attributes.skinWeight.normalized ) {\n\n\t\t\t\t\t\t// we normalize floating point skin weight array to fix malformed assets (see #15319)\n\t\t\t\t\t\t// it's important to skip this for non-float32 data since normalizeSkinWeights assumes non-normalized inputs\n\t\t\t\t\t\tmesh.normalizeSkinWeights();\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_STRIP ) {\n\n\t\t\t\t\t\tmesh.geometry = toTrianglesDrawMode( mesh.geometry, THREE.TriangleStripDrawMode );\n\n\t\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.TRIANGLE_FAN ) {\n\n\t\t\t\t\t\tmesh.geometry = toTrianglesDrawMode( mesh.geometry, THREE.TriangleFanDrawMode );\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.LINES ) {\n\n\t\t\t\t\tmesh = new THREE.LineSegments( geometry, material );\n\n\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.LINE_STRIP ) {\n\n\t\t\t\t\tmesh = new THREE.Line( geometry, material );\n\n\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.LINE_LOOP ) {\n\n\t\t\t\t\tmesh = new THREE.LineLoop( geometry, material );\n\n\t\t\t\t} else if ( primitive.mode === WEBGL_CONSTANTS.POINTS ) {\n\n\t\t\t\t\tmesh = new THREE.Points( geometry, material );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthrow new Error( 'THREE.GLTFLoader: Primitive mode unsupported: ' + primitive.mode );\n\n\t\t\t\t}\n\n\t\t\t\tif ( Object.keys( mesh.geometry.morphAttributes ).length > 0 ) {\n\n\t\t\t\t\tupdateMorphTargets( mesh, meshDef );\n\n\t\t\t\t}\n\n\t\t\t\tmesh.name = parser.createUniqueName( meshDef.name || ( 'mesh_' + meshIndex ) );\n\n\t\t\t\tassignExtrasToUserData( mesh, meshDef );\n\n\t\t\t\tif ( primitive.extensions ) addUnknownExtensionsToUserData( extensions, mesh, primitive );\n\n\t\t\t\tparser.assignFinalMaterial( mesh );\n\n\t\t\t\tmeshes.push( mesh );\n\n\t\t\t}\n\n\t\t\tif ( meshes.length === 1 ) {\n\n\t\t\t\treturn meshes[ 0 ];\n\n\t\t\t}\n\n\t\t\tvar group = new THREE.Group();\n\n\t\t\tfor ( var i = 0, il = meshes.length; i < il; i ++ ) {\n\n\t\t\t\tgroup.add( meshes[ i ] );\n\n\t\t\t}\n\n\t\t\treturn group;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras\n\t * @param {number} cameraIndex\n\t * @return {Promise<THREE.Camera>}\n\t */\n\tGLTFParser.prototype.loadCamera = function ( cameraIndex ) {\n\n\t\tvar camera;\n\t\tvar cameraDef = this.json.cameras[ cameraIndex ];\n\t\tvar params = cameraDef[ cameraDef.type ];\n\n\t\tif ( ! params ) {\n\n\t\t\tconsole.warn( 'THREE.GLTFLoader: Missing camera parameters.' );\n\t\t\treturn;\n\n\t\t}\n\n\t\tif ( cameraDef.type === 'perspective' ) {\n\n\t\t\tcamera = new THREE.PerspectiveCamera( THREE.MathUtils.radToDeg( params.yfov ), params.aspectRatio || 1, params.znear || 1, params.zfar || 2e6 );\n\n\t\t} else if ( cameraDef.type === 'orthographic' ) {\n\n\t\t\tcamera = new THREE.OrthographicCamera( - params.xmag, params.xmag, params.ymag, - params.ymag, params.znear, params.zfar );\n\n\t\t}\n\n\t\tif ( cameraDef.name ) camera.name = this.createUniqueName( cameraDef.name );\n\n\t\tassignExtrasToUserData( camera, cameraDef );\n\n\t\treturn Promise.resolve( camera );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins\n\t * @param {number} skinIndex\n\t * @return {Promise<Object>}\n\t */\n\tGLTFParser.prototype.loadSkin = function ( skinIndex ) {\n\n\t\tvar skinDef = this.json.skins[ skinIndex ];\n\n\t\tvar skinEntry = { joints: skinDef.joints };\n\n\t\tif ( skinDef.inverseBindMatrices === undefined ) {\n\n\t\t\treturn Promise.resolve( skinEntry );\n\n\t\t}\n\n\t\treturn this.getDependency( 'accessor', skinDef.inverseBindMatrices ).then( function ( accessor ) {\n\n\t\t\tskinEntry.inverseBindMatrices = accessor;\n\n\t\t\treturn skinEntry;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations\n\t * @param {number} animationIndex\n\t * @return {Promise<THREE.AnimationClip>}\n\t */\n\tGLTFParser.prototype.loadAnimation = function ( animationIndex ) {\n\n\t\tvar json = this.json;\n\n\t\tvar animationDef = json.animations[ animationIndex ];\n\n\t\tvar pendingNodes = [];\n\t\tvar pendingInputAccessors = [];\n\t\tvar pendingOutputAccessors = [];\n\t\tvar pendingSamplers = [];\n\t\tvar pendingTargets = [];\n\n\t\tfor ( var i = 0, il = animationDef.channels.length; i < il; i ++ ) {\n\n\t\t\tvar channel = animationDef.channels[ i ];\n\t\t\tvar sampler = animationDef.samplers[ channel.sampler ];\n\t\t\tvar target = channel.target;\n\t\t\tvar name = target.node !== undefined ? target.node : target.id; // NOTE: target.id is deprecated.\n\t\t\tvar input = animationDef.parameters !== undefined ? animationDef.parameters[ sampler.input ] : sampler.input;\n\t\t\tvar output = animationDef.parameters !== undefined ? animationDef.parameters[ sampler.output ] : sampler.output;\n\n\t\t\tpendingNodes.push( this.getDependency( 'node', name ) );\n\t\t\tpendingInputAccessors.push( this.getDependency( 'accessor', input ) );\n\t\t\tpendingOutputAccessors.push( this.getDependency( 'accessor', output ) );\n\t\t\tpendingSamplers.push( sampler );\n\t\t\tpendingTargets.push( target );\n\n\t\t}\n\n\t\treturn Promise.all( [\n\n\t\t\tPromise.all( pendingNodes ),\n\t\t\tPromise.all( pendingInputAccessors ),\n\t\t\tPromise.all( pendingOutputAccessors ),\n\t\t\tPromise.all( pendingSamplers ),\n\t\t\tPromise.all( pendingTargets )\n\n\t\t] ).then( function ( dependencies ) {\n\n\t\t\tvar nodes = dependencies[ 0 ];\n\t\t\tvar inputAccessors = dependencies[ 1 ];\n\t\t\tvar outputAccessors = dependencies[ 2 ];\n\t\t\tvar samplers = dependencies[ 3 ];\n\t\t\tvar targets = dependencies[ 4 ];\n\n\t\t\tvar tracks = [];\n\n\t\t\tfor ( var i = 0, il = nodes.length; i < il; i ++ ) {\n\n\t\t\t\tvar node = nodes[ i ];\n\t\t\t\tvar inputAccessor = inputAccessors[ i ];\n\t\t\t\tvar outputAccessor = outputAccessors[ i ];\n\t\t\t\tvar sampler = samplers[ i ];\n\t\t\t\tvar target = targets[ i ];\n\n\t\t\t\tif ( node === undefined ) continue;\n\n\t\t\t\tnode.updateMatrix();\n\t\t\t\tnode.matrixAutoUpdate = true;\n\n\t\t\t\tvar TypedKeyframeTrack;\n\n\t\t\t\tswitch ( PATH_PROPERTIES[ target.path ] ) {\n\n\t\t\t\t\tcase PATH_PROPERTIES.weights:\n\n\t\t\t\t\t\tTypedKeyframeTrack = THREE.NumberKeyframeTrack;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase PATH_PROPERTIES.rotation:\n\n\t\t\t\t\t\tTypedKeyframeTrack = THREE.QuaternionKeyframeTrack;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase PATH_PROPERTIES.position:\n\t\t\t\t\tcase PATH_PROPERTIES.scale:\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tTypedKeyframeTrack = THREE.VectorKeyframeTrack;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tvar targetName = node.name ? node.name : node.uuid;\n\n\t\t\t\tvar interpolation = sampler.interpolation !== undefined ? INTERPOLATION[ sampler.interpolation ] : THREE.InterpolateLinear;\n\n\t\t\t\tvar targetNames = [];\n\n\t\t\t\tif ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) {\n\n\t\t\t\t\t// Node may be a THREE.Group (glTF mesh with several primitives) or a THREE.Mesh.\n\t\t\t\t\tnode.traverse( function ( object ) {\n\n\t\t\t\t\t\tif ( object.isMesh === true && object.morphTargetInfluences ) {\n\n\t\t\t\t\t\t\ttargetNames.push( object.name ? object.name : object.uuid );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttargetNames.push( targetName );\n\n\t\t\t\t}\n\n\t\t\t\tvar outputArray = outputAccessor.array;\n\n\t\t\t\tif ( outputAccessor.normalized ) {\n\n\t\t\t\t\tvar scale;\n\n\t\t\t\t\tif ( outputArray.constructor === Int8Array ) {\n\n\t\t\t\t\t\tscale = 1 / 127;\n\n\t\t\t\t\t} else if ( outputArray.constructor === Uint8Array ) {\n\n\t\t\t\t\t\tscale = 1 / 255;\n\n\t\t\t\t\t} else if ( outputArray.constructor == Int16Array ) {\n\n\t\t\t\t\t\tscale = 1 / 32767;\n\n\t\t\t\t\t} else if ( outputArray.constructor === Uint16Array ) {\n\n\t\t\t\t\t\tscale = 1 / 65535;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tthrow new Error( 'THREE.GLTFLoader: Unsupported output accessor component type.' );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar scaled = new Float32Array( outputArray.length );\n\n\t\t\t\t\tfor ( var j = 0, jl = outputArray.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tscaled[ j ] = outputArray[ j ] * scale;\n\n\t\t\t\t\t}\n\n\t\t\t\t\toutputArray = scaled;\n\n\t\t\t\t}\n\n\t\t\t\tfor ( var j = 0, jl = targetNames.length; j < jl; j ++ ) {\n\n\t\t\t\t\tvar track = new TypedKeyframeTrack(\n\t\t\t\t\t\ttargetNames[ j ] + '.' + PATH_PROPERTIES[ target.path ],\n\t\t\t\t\t\tinputAccessor.array,\n\t\t\t\t\t\toutputArray,\n\t\t\t\t\t\tinterpolation\n\t\t\t\t\t);\n\n\t\t\t\t\t// Override interpolation with custom factory method.\n\t\t\t\t\tif ( sampler.interpolation === 'CUBICSPLINE' ) {\n\n\t\t\t\t\t\ttrack.createInterpolant = function InterpolantFactoryMethodGLTFCubicSpline( result ) {\n\n\t\t\t\t\t\t\t// A CUBICSPLINE keyframe in glTF has three output values for each input value,\n\t\t\t\t\t\t\t// representing inTangent, splineVertex, and outTangent. As a result, track.getValueSize()\n\t\t\t\t\t\t\t// must be divided by three to get the interpolant's sampleSize argument.\n\n\t\t\t\t\t\t\treturn new GLTFCubicSplineInterpolant( this.times, this.values, this.getValueSize() / 3, result );\n\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\t// Mark as CUBICSPLINE. `track.getInterpolation()` doesn't support custom interpolants.\n\t\t\t\t\t\ttrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\ttracks.push( track );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar name = animationDef.name ? animationDef.name : 'animation_' + animationIndex;\n\n\t\t\treturn new THREE.AnimationClip( name, undefined, tracks );\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy\n\t * @param {number} nodeIndex\n\t * @return {Promise<THREE.Object3D>}\n\t */\n\tGLTFParser.prototype.loadNode = function ( nodeIndex ) {\n\n\t\tvar json = this.json;\n\t\tvar extensions = this.extensions;\n\t\tvar parser = this;\n\n\t\tvar nodeDef = json.nodes[ nodeIndex ];\n\n\t\t// reserve node's name before its dependencies, so the root has the intended name.\n\t\tvar nodeName = nodeDef.name ? parser.createUniqueName( nodeDef.name ) : '';\n\n\t\treturn ( function () {\n\n\t\t\tvar pending = [];\n\n\t\t\tif ( nodeDef.mesh !== undefined ) {\n\n\t\t\t\tpending.push( parser.getDependency( 'mesh', nodeDef.mesh ).then( function ( mesh ) {\n\n\t\t\t\t\tvar node = parser._getNodeRef( parser.meshCache, nodeDef.mesh, mesh );\n\n\t\t\t\t\t// if weights are provided on the node, override weights on the mesh.\n\t\t\t\t\tif ( nodeDef.weights !== undefined ) {\n\n\t\t\t\t\t\tnode.traverse( function ( o ) {\n\n\t\t\t\t\t\t\tif ( ! o.isMesh ) return;\n\n\t\t\t\t\t\t\tfor ( var i = 0, il = nodeDef.weights.length; i < il; i ++ ) {\n\n\t\t\t\t\t\t\t\to.morphTargetInfluences[ i ] = nodeDef.weights[ i ];\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn node;\n\n\t\t\t\t} ) );\n\n\t\t\t}\n\n\t\t\tif ( nodeDef.camera !== undefined ) {\n\n\t\t\t\tpending.push( parser.getDependency( 'camera', nodeDef.camera ).then( function ( camera ) {\n\n\t\t\t\t\treturn parser._getNodeRef( parser.cameraCache, nodeDef.camera, camera );\n\n\t\t\t\t} ) );\n\n\t\t\t}\n\n\t\t\tparser._invokeAll( function ( ext ) {\n\n\t\t\t\treturn ext.createNodeAttachment && ext.createNodeAttachment( nodeIndex );\n\n\t\t\t} ).forEach( function ( promise ) {\n\n\t\t\t\tpending.push( promise );\n\n\t\t\t} );\n\n\t\t\treturn Promise.all( pending );\n\n\t\t}() ).then( function ( objects ) {\n\n\t\t\tvar node;\n\n\t\t\t// .isBone isn't in glTF spec. See ._markDefs\n\t\t\tif ( nodeDef.isBone === true ) {\n\n\t\t\t\tnode = new THREE.Bone();\n\n\t\t\t} else if ( objects.length > 1 ) {\n\n\t\t\t\tnode = new THREE.Group();\n\n\t\t\t} else if ( objects.length === 1 ) {\n\n\t\t\t\tnode = objects[ 0 ];\n\n\t\t\t} else {\n\n\t\t\t\tnode = new THREE.Object3D();\n\n\t\t\t}\n\n\t\t\tif ( node !== objects[ 0 ] ) {\n\n\t\t\t\tfor ( var i = 0, il = objects.length; i < il; i ++ ) {\n\n\t\t\t\t\tnode.add( objects[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( nodeDef.name ) {\n\n\t\t\t\tnode.userData.name = nodeDef.name;\n\t\t\t\tnode.name = nodeName;\n\n\t\t\t}\n\n\t\t\tassignExtrasToUserData( node, nodeDef );\n\n\t\t\tif ( nodeDef.extensions ) addUnknownExtensionsToUserData( extensions, node, nodeDef );\n\n\t\t\tif ( nodeDef.matrix !== undefined ) {\n\n\t\t\t\tvar matrix = new THREE.Matrix4();\n\t\t\t\tmatrix.fromArray( nodeDef.matrix );\n\t\t\t\tnode.applyMatrix4( matrix );\n\n\t\t\t} else {\n\n\t\t\t\tif ( nodeDef.translation !== undefined ) {\n\n\t\t\t\t\tnode.position.fromArray( nodeDef.translation );\n\n\t\t\t\t}\n\n\t\t\t\tif ( nodeDef.rotation !== undefined ) {\n\n\t\t\t\t\tnode.quaternion.fromArray( nodeDef.rotation );\n\n\t\t\t\t}\n\n\t\t\t\tif ( nodeDef.scale !== undefined ) {\n\n\t\t\t\t\tnode.scale.fromArray( nodeDef.scale );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tparser.associations.set( node, { type: 'nodes', index: nodeIndex } );\n\n\t\t\treturn node;\n\n\t\t} );\n\n\t};\n\n\t/**\n\t * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes\n\t * @param {number} sceneIndex\n\t * @return {Promise<THREE.Group>}\n\t */\n\tGLTFParser.prototype.loadScene = function () {\n\n\t\t// scene node hierachy builder\n\n\t\tfunction buildNodeHierachy( nodeId, parentObject, json, parser ) {\n\n\t\t\tvar nodeDef = json.nodes[ nodeId ];\n\n\t\t\treturn parser.getDependency( 'node', nodeId ).then( function ( node ) {\n\n\t\t\t\tif ( nodeDef.skin === undefined ) return node;\n\n\t\t\t\t// build skeleton here as well\n\n\t\t\t\tvar skinEntry;\n\n\t\t\t\treturn parser.getDependency( 'skin', nodeDef.skin ).then( function ( skin ) {\n\n\t\t\t\t\tskinEntry = skin;\n\n\t\t\t\t\tvar pendingJoints = [];\n\n\t\t\t\t\tfor ( var i = 0, il = skinEntry.joints.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tpendingJoints.push( parser.getDependency( 'node', skinEntry.joints[ i ] ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Promise.all( pendingJoints );\n\n\t\t\t\t} ).then( function ( jointNodes ) {\n\n\t\t\t\t\tnode.traverse( function ( mesh ) {\n\n\t\t\t\t\t\tif ( ! mesh.isMesh ) return;\n\n\t\t\t\t\t\tvar bones = [];\n\t\t\t\t\t\tvar boneInverses = [];\n\n\t\t\t\t\t\tfor ( var j = 0, jl = jointNodes.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\t\tvar jointNode = jointNodes[ j ];\n\n\t\t\t\t\t\t\tif ( jointNode ) {\n\n\t\t\t\t\t\t\t\tbones.push( jointNode );\n\n\t\t\t\t\t\t\t\tvar mat = new THREE.Matrix4();\n\n\t\t\t\t\t\t\t\tif ( skinEntry.inverseBindMatrices !== undefined ) {\n\n\t\t\t\t\t\t\t\t\tmat.fromArray( skinEntry.inverseBindMatrices.array, j * 16 );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tboneInverses.push( mat );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tconsole.warn( 'THREE.GLTFLoader: Joint \"%s\" could not be found.', skinEntry.joints[ j ] );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmesh.bind( new THREE.Skeleton( bones, boneInverses ), mesh.matrixWorld );\n\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn node;\n\n\t\t\t\t} );\n\n\t\t\t} ).then( function ( node ) {\n\n\t\t\t\t// build node hierachy\n\n\t\t\t\tparentObject.add( node );\n\n\t\t\t\tvar pending = [];\n\n\t\t\t\tif ( nodeDef.children ) {\n\n\t\t\t\t\tvar children = nodeDef.children;\n\n\t\t\t\t\tfor ( var i = 0, il = children.length; i < il; i ++ ) {\n\n\t\t\t\t\t\tvar child = children[ i ];\n\t\t\t\t\t\tpending.push( buildNodeHierachy( child, node, json, parser ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn Promise.all( pending );\n\n\t\t\t} );\n\n\t\t}\n\n\t\treturn function loadScene( sceneIndex ) {\n\n\t\t\tvar json = this.json;\n\t\t\tvar extensions = this.extensions;\n\t\t\tvar sceneDef = this.json.scenes[ sceneIndex ];\n\t\t\tvar parser = this;\n\n\t\t\t// Loader returns Group, not Scene.\n\t\t\t// See: https://github.com/mrdoob/three.js/issues/18342#issuecomment-578981172\n\t\t\tvar scene = new THREE.Group();\n\t\t\tif ( sceneDef.name ) scene.name = parser.createUniqueName( sceneDef.name );\n\n\t\t\tassignExtrasToUserData( scene, sceneDef );\n\n\t\t\tif ( sceneDef.extensions ) addUnknownExtensionsToUserData( extensions, scene, sceneDef );\n\n\t\t\tvar nodeIds = sceneDef.nodes || [];\n\n\t\t\tvar pending = [];\n\n\t\t\tfor ( var i = 0, il = nodeIds.length; i < il; i ++ ) {\n\n\t\t\t\tpending.push( buildNodeHierachy( nodeIds[ i ], scene, json, parser ) );\n\n\t\t\t}\n\n\t\t\treturn Promise.all( pending ).then( function () {\n\n\t\t\t\treturn scene;\n\n\t\t\t} );\n\n\t\t};\n\n\t}();\n\n\treturn GLTFLoader;\n\n} )();\n\n},{}],60:[function(_dereq_,module,exports){\n/**\n * Loads a Wavefront .mtl file specifying materials\n */\n\nTHREE.MTLLoader = function ( manager ) {\n\n\tTHREE.Loader.call( this, manager );\n\n};\n\nTHREE.MTLLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), {\n\n\tconstructor: THREE.MTLLoader,\n\n\t/**\n\t * Loads and parses a MTL asset from a URL.\n\t *\n\t * @param {String} url - URL to the MTL file.\n\t * @param {Function} [onLoad] - Callback invoked with the loaded object.\n\t * @param {Function} [onProgress] - Callback for download progress.\n\t * @param {Function} [onError] - Callback for download errors.\n\t *\n\t * @see setPath setResourcePath\n\t *\n\t * @note In order for relative texture references to resolve correctly\n\t * you must call setResourcePath() explicitly prior to load.\n\t */\n\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\tvar scope = this;\n\n\t\tvar path = ( this.path === '' ) ? THREE.LoaderUtils.extractUrlBase( url ) : this.path;\n\n\t\tvar loader = new THREE.FileLoader( this.manager );\n\t\tloader.setPath( this.path );\n\t\tloader.setRequestHeader( this.requestHeader );\n\t\tloader.setWithCredentials( this.withCredentials );\n\t\tloader.load( url, function ( text ) {\n\n\t\t\ttry {\n\n\t\t\t\tonLoad( scope.parse( text, path ) );\n\n\t\t\t} catch ( e ) {\n\n\t\t\t\tif ( onError ) {\n\n\t\t\t\t\tonError( e );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t}\n\n\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t}\n\n\t\t}, onProgress, onError );\n\n\t},\n\n\tsetMaterialOptions: function ( value ) {\n\n\t\tthis.materialOptions = value;\n\t\treturn this;\n\n\t},\n\n\t/**\n\t * Parses a MTL file.\n\t *\n\t * @param {String} text - Content of MTL file\n\t * @return {THREE.MTLLoader.MaterialCreator}\n\t *\n\t * @see setPath setResourcePath\n\t *\n\t * @note In order for relative texture references to resolve correctly\n\t * you must call setResourcePath() explicitly prior to parse.\n\t */\n\tparse: function ( text, path ) {\n\n\t\tvar lines = text.split( '\\n' );\n\t\tvar info = {};\n\t\tvar delimiter_pattern = /\\s+/;\n\t\tvar materialsInfo = {};\n\n\t\tfor ( var i = 0; i < lines.length; i ++ ) {\n\n\t\t\tvar line = lines[ i ];\n\t\t\tline = line.trim();\n\n\t\t\tif ( line.length === 0 || line.charAt( 0 ) === '#' ) {\n\n\t\t\t\t// Blank line or comment ignore\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tvar pos = line.indexOf( ' ' );\n\n\t\t\tvar key = ( pos >= 0 ) ? line.substring( 0, pos ) : line;\n\t\t\tkey = key.toLowerCase();\n\n\t\t\tvar value = ( pos >= 0 ) ? line.substring( pos + 1 ) : '';\n\t\t\tvalue = value.trim();\n\n\t\t\tif ( key === 'newmtl' ) {\n\n\t\t\t\t// New material\n\n\t\t\t\tinfo = { name: value };\n\t\t\t\tmaterialsInfo[ value ] = info;\n\n\t\t\t} else {\n\n\t\t\t\tif ( key === 'ka' || key === 'kd' || key === 'ks' || key === 'ke' ) {\n\n\t\t\t\t\tvar ss = value.split( delimiter_pattern, 3 );\n\t\t\t\t\tinfo[ key ] = [ parseFloat( ss[ 0 ] ), parseFloat( ss[ 1 ] ), parseFloat( ss[ 2 ] ) ];\n\n\t\t\t\t} else {\n\n\t\t\t\t\tinfo[ key ] = value;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tvar materialCreator = new THREE.MTLLoader.MaterialCreator( this.resourcePath || path, this.materialOptions );\n\t\tmaterialCreator.setCrossOrigin( this.crossOrigin );\n\t\tmaterialCreator.setManager( this.manager );\n\t\tmaterialCreator.setMaterials( materialsInfo );\n\t\treturn materialCreator;\n\n\t}\n\n} );\n\n/**\n * Create a new THREE.MTLLoader.MaterialCreator\n * @param baseUrl - Url relative to which textures are loaded\n * @param options - Set of options on how to construct the materials\n * side: Which side to apply the material\n * THREE.FrontSide (default), THREE.BackSide, THREE.DoubleSide\n * wrap: What type of wrapping to apply for textures\n * THREE.RepeatWrapping (default), THREE.ClampToEdgeWrapping, THREE.MirroredRepeatWrapping\n * normalizeRGB: RGBs need to be normalized to 0-1 from 0-255\n * Default: false, assumed to be already normalized\n * ignoreZeroRGBs: Ignore values of RGBs (Ka,Kd,Ks) that are all 0's\n * Default: false\n * @constructor\n */\n\nTHREE.MTLLoader.MaterialCreator = function ( baseUrl, options ) {\n\n\tthis.baseUrl = baseUrl || '';\n\tthis.options = options;\n\tthis.materialsInfo = {};\n\tthis.materials = {};\n\tthis.materialsArray = [];\n\tthis.nameLookup = {};\n\n\tthis.side = ( this.options && this.options.side ) ? this.options.side : THREE.FrontSide;\n\tthis.wrap = ( this.options && this.options.wrap ) ? this.options.wrap : THREE.RepeatWrapping;\n\n};\n\nTHREE.MTLLoader.MaterialCreator.prototype = {\n\n\tconstructor: THREE.MTLLoader.MaterialCreator,\n\n\tcrossOrigin: 'anonymous',\n\n\tsetCrossOrigin: function ( value ) {\n\n\t\tthis.crossOrigin = value;\n\t\treturn this;\n\n\t},\n\n\tsetManager: function ( value ) {\n\n\t\tthis.manager = value;\n\n\t},\n\n\tsetMaterials: function ( materialsInfo ) {\n\n\t\tthis.materialsInfo = this.convert( materialsInfo );\n\t\tthis.materials = {};\n\t\tthis.materialsArray = [];\n\t\tthis.nameLookup = {};\n\n\t},\n\n\tconvert: function ( materialsInfo ) {\n\n\t\tif ( ! this.options ) return materialsInfo;\n\n\t\tvar converted = {};\n\n\t\tfor ( var mn in materialsInfo ) {\n\n\t\t\t// Convert materials info into normalized form based on options\n\n\t\t\tvar mat = materialsInfo[ mn ];\n\n\t\t\tvar covmat = {};\n\n\t\t\tconverted[ mn ] = covmat;\n\n\t\t\tfor ( var prop in mat ) {\n\n\t\t\t\tvar save = true;\n\t\t\t\tvar value = mat[ prop ];\n\t\t\t\tvar lprop = prop.toLowerCase();\n\n\t\t\t\tswitch ( lprop ) {\n\n\t\t\t\t\tcase 'kd':\n\t\t\t\t\tcase 'ka':\n\t\t\t\t\tcase 'ks':\n\n\t\t\t\t\t\t// Diffuse color (color under white light) using RGB values\n\n\t\t\t\t\t\tif ( this.options && this.options.normalizeRGB ) {\n\n\t\t\t\t\t\t\tvalue = [ value[ 0 ] / 255, value[ 1 ] / 255, value[ 2 ] / 255 ];\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( this.options && this.options.ignoreZeroRGBs ) {\n\n\t\t\t\t\t\t\tif ( value[ 0 ] === 0 && value[ 1 ] === 0 && value[ 2 ] === 0 ) {\n\n\t\t\t\t\t\t\t\t// ignore\n\n\t\t\t\t\t\t\t\tsave = false;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tif ( save ) {\n\n\t\t\t\t\tcovmat[ lprop ] = value;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn converted;\n\n\t},\n\n\tpreload: function () {\n\n\t\tfor ( var mn in this.materialsInfo ) {\n\n\t\t\tthis.create( mn );\n\n\t\t}\n\n\t},\n\n\tgetIndex: function ( materialName ) {\n\n\t\treturn this.nameLookup[ materialName ];\n\n\t},\n\n\tgetAsArray: function () {\n\n\t\tvar index = 0;\n\n\t\tfor ( var mn in this.materialsInfo ) {\n\n\t\t\tthis.materialsArray[ index ] = this.create( mn );\n\t\t\tthis.nameLookup[ mn ] = index;\n\t\t\tindex ++;\n\n\t\t}\n\n\t\treturn this.materialsArray;\n\n\t},\n\n\tcreate: function ( materialName ) {\n\n\t\tif ( this.materials[ materialName ] === undefined ) {\n\n\t\t\tthis.createMaterial_( materialName );\n\n\t\t}\n\n\t\treturn this.materials[ materialName ];\n\n\t},\n\n\tcreateMaterial_: function ( materialName ) {\n\n\t\t// Create material\n\n\t\tvar scope = this;\n\t\tvar mat = this.materialsInfo[ materialName ];\n\t\tvar params = {\n\n\t\t\tname: materialName,\n\t\t\tside: this.side\n\n\t\t};\n\n\t\tfunction resolveURL( baseUrl, url ) {\n\n\t\t\tif ( typeof url !== 'string' || url === '' )\n\t\t\t\treturn '';\n\n\t\t\t// Absolute URL\n\t\t\tif ( /^https?:\\/\\//i.test( url ) ) return url;\n\n\t\t\treturn baseUrl + url;\n\n\t\t}\n\n\t\tfunction setMapForType( mapType, value ) {\n\n\t\t\tif ( params[ mapType ] ) return; // Keep the first encountered texture\n\n\t\t\tvar texParams = scope.getTextureParams( value, params );\n\t\t\tvar map = scope.loadTexture( resolveURL( scope.baseUrl, texParams.url ) );\n\n\t\t\tmap.repeat.copy( texParams.scale );\n\t\t\tmap.offset.copy( texParams.offset );\n\n\t\t\tmap.wrapS = scope.wrap;\n\t\t\tmap.wrapT = scope.wrap;\n\n\t\t\tparams[ mapType ] = map;\n\n\t\t}\n\n\t\tfor ( var prop in mat ) {\n\n\t\t\tvar value = mat[ prop ];\n\t\t\tvar n;\n\n\t\t\tif ( value === '' ) continue;\n\n\t\t\tswitch ( prop.toLowerCase() ) {\n\n\t\t\t\t// Ns is material specular exponent\n\n\t\t\t\tcase 'kd':\n\n\t\t\t\t\t// Diffuse color (color under white light) using RGB values\n\n\t\t\t\t\tparams.color = new THREE.Color().fromArray( value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ks':\n\n\t\t\t\t\t// Specular color (color when light is reflected from shiny surface) using RGB values\n\t\t\t\t\tparams.specular = new THREE.Color().fromArray( value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ke':\n\n\t\t\t\t\t// Emissive using RGB values\n\t\t\t\t\tparams.emissive = new THREE.Color().fromArray( value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_kd':\n\n\t\t\t\t\t// Diffuse texture map\n\n\t\t\t\t\tsetMapForType( 'map', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_ks':\n\n\t\t\t\t\t// Specular map\n\n\t\t\t\t\tsetMapForType( 'specularMap', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_ke':\n\n\t\t\t\t\t// Emissive map\n\n\t\t\t\t\tsetMapForType( 'emissiveMap', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'norm':\n\n\t\t\t\t\tsetMapForType( 'normalMap', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_bump':\n\t\t\t\tcase 'bump':\n\n\t\t\t\t\t// Bump texture map\n\n\t\t\t\t\tsetMapForType( 'bumpMap', value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'map_d':\n\n\t\t\t\t\t// Alpha map\n\n\t\t\t\t\tsetMapForType( 'alphaMap', value );\n\t\t\t\t\tparams.transparent = true;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ns':\n\n\t\t\t\t\t// The specular exponent (defines the focus of the specular highlight)\n\t\t\t\t\t// A high exponent results in a tight, concentrated highlight. Ns values normally range from 0 to 1000.\n\n\t\t\t\t\tparams.shininess = parseFloat( value );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'd':\n\t\t\t\t\tn = parseFloat( value );\n\n\t\t\t\t\tif ( n < 1 ) {\n\n\t\t\t\t\t\tparams.opacity = n;\n\t\t\t\t\t\tparams.transparent = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tr':\n\t\t\t\t\tn = parseFloat( value );\n\n\t\t\t\t\tif ( this.options && this.options.invertTrProperty ) n = 1 - n;\n\n\t\t\t\t\tif ( n > 0 ) {\n\n\t\t\t\t\t\tparams.opacity = 1 - n;\n\t\t\t\t\t\tparams.transparent = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t}\n\n\t\tthis.materials[ materialName ] = new THREE.MeshPhongMaterial( params );\n\t\treturn this.materials[ materialName ];\n\n\t},\n\n\tgetTextureParams: function ( value, matParams ) {\n\n\t\tvar texParams = {\n\n\t\t\tscale: new THREE.Vector2( 1, 1 ),\n\t\t\toffset: new THREE.Vector2( 0, 0 )\n\n\t\t };\n\n\t\tvar items = value.split( /\\s+/ );\n\t\tvar pos;\n\n\t\tpos = items.indexOf( '-bm' );\n\n\t\tif ( pos >= 0 ) {\n\n\t\t\tmatParams.bumpScale = parseFloat( items[ pos + 1 ] );\n\t\t\titems.splice( pos, 2 );\n\n\t\t}\n\n\t\tpos = items.indexOf( '-s' );\n\n\t\tif ( pos >= 0 ) {\n\n\t\t\ttexParams.scale.set( parseFloat( items[ pos + 1 ] ), parseFloat( items[ pos + 2 ] ) );\n\t\t\titems.splice( pos, 4 ); // we expect 3 parameters here!\n\n\t\t}\n\n\t\tpos = items.indexOf( '-o' );\n\n\t\tif ( pos >= 0 ) {\n\n\t\t\ttexParams.offset.set( parseFloat( items[ pos + 1 ] ), parseFloat( items[ pos + 2 ] ) );\n\t\t\titems.splice( pos, 4 ); // we expect 3 parameters here!\n\n\t\t}\n\n\t\ttexParams.url = items.join( ' ' ).trim();\n\t\treturn texParams;\n\n\t},\n\n\tloadTexture: function ( url, mapping, onLoad, onProgress, onError ) {\n\n\t\tvar texture;\n\t\tvar manager = ( this.manager !== undefined ) ? this.manager : THREE.DefaultLoadingManager;\n\t\tvar loader = manager.getHandler( url );\n\n\t\tif ( loader === null ) {\n\n\t\t\tloader = new THREE.TextureLoader( manager );\n\n\t\t}\n\n\t\tif ( loader.setCrossOrigin ) loader.setCrossOrigin( this.crossOrigin );\n\t\ttexture = loader.load( url, onLoad, onProgress, onError );\n\n\t\tif ( mapping !== undefined ) texture.mapping = mapping;\n\n\t\treturn texture;\n\n\t}\n\n};\n\n},{}],61:[function(_dereq_,module,exports){\nTHREE.OBJLoader = ( function () {\n\n\t// o object_name | g group_name\n\tvar object_pattern = /^[og]\\s*(.+)?/;\n\t// mtllib file_reference\n\tvar material_library_pattern = /^mtllib /;\n\t// usemtl material_name\n\tvar material_use_pattern = /^usemtl /;\n\t// usemap map_name\n\tvar map_use_pattern = /^usemap /;\n\n\tvar vA = new THREE.Vector3();\n\tvar vB = new THREE.Vector3();\n\tvar vC = new THREE.Vector3();\n\n\tvar ab = new THREE.Vector3();\n\tvar cb = new THREE.Vector3();\n\n\tfunction ParserState() {\n\n\t\tvar state = {\n\t\t\tobjects: [],\n\t\t\tobject: {},\n\n\t\t\tvertices: [],\n\t\t\tnormals: [],\n\t\t\tcolors: [],\n\t\t\tuvs: [],\n\n\t\t\tmaterials: {},\n\t\t\tmaterialLibraries: [],\n\n\t\t\tstartObject: function ( name, fromDeclaration ) {\n\n\t\t\t\t// If the current object (initial from reset) is not from a g/o declaration in the parsed\n\t\t\t\t// file. We need to use it for the first parsed g/o to keep things in sync.\n\t\t\t\tif ( this.object && this.object.fromDeclaration === false ) {\n\n\t\t\t\t\tthis.object.name = name;\n\t\t\t\t\tthis.object.fromDeclaration = ( fromDeclaration !== false );\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t\tvar previousMaterial = ( this.object && typeof this.object.currentMaterial === 'function' ? this.object.currentMaterial() : undefined );\n\n\t\t\t\tif ( this.object && typeof this.object._finalize === 'function' ) {\n\n\t\t\t\t\tthis.object._finalize( true );\n\n\t\t\t\t}\n\n\t\t\t\tthis.object = {\n\t\t\t\t\tname: name || '',\n\t\t\t\t\tfromDeclaration: ( fromDeclaration !== false ),\n\n\t\t\t\t\tgeometry: {\n\t\t\t\t\t\tvertices: [],\n\t\t\t\t\t\tnormals: [],\n\t\t\t\t\t\tcolors: [],\n\t\t\t\t\t\tuvs: [],\n\t\t\t\t\t\thasUVIndices: false\n\t\t\t\t\t},\n\t\t\t\t\tmaterials: [],\n\t\t\t\t\tsmooth: true,\n\n\t\t\t\t\tstartMaterial: function ( name, libraries ) {\n\n\t\t\t\t\t\tvar previous = this._finalize( false );\n\n\t\t\t\t\t\t// New usemtl declaration overwrites an inherited material, except if faces were declared\n\t\t\t\t\t\t// after the material, then it must be preserved for proper MultiMaterial continuation.\n\t\t\t\t\t\tif ( previous && ( previous.inherited || previous.groupCount <= 0 ) ) {\n\n\t\t\t\t\t\t\tthis.materials.splice( previous.index, 1 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar material = {\n\t\t\t\t\t\t\tindex: this.materials.length,\n\t\t\t\t\t\t\tname: name || '',\n\t\t\t\t\t\t\tmtllib: ( Array.isArray( libraries ) && libraries.length > 0 ? libraries[ libraries.length - 1 ] : '' ),\n\t\t\t\t\t\t\tsmooth: ( previous !== undefined ? previous.smooth : this.smooth ),\n\t\t\t\t\t\t\tgroupStart: ( previous !== undefined ? previous.groupEnd : 0 ),\n\t\t\t\t\t\t\tgroupEnd: - 1,\n\t\t\t\t\t\t\tgroupCount: - 1,\n\t\t\t\t\t\t\tinherited: false,\n\n\t\t\t\t\t\t\tclone: function ( index ) {\n\n\t\t\t\t\t\t\t\tvar cloned = {\n\t\t\t\t\t\t\t\t\tindex: ( typeof index === 'number' ? index : this.index ),\n\t\t\t\t\t\t\t\t\tname: this.name,\n\t\t\t\t\t\t\t\t\tmtllib: this.mtllib,\n\t\t\t\t\t\t\t\t\tsmooth: this.smooth,\n\t\t\t\t\t\t\t\t\tgroupStart: 0,\n\t\t\t\t\t\t\t\t\tgroupEnd: - 1,\n\t\t\t\t\t\t\t\t\tgroupCount: - 1,\n\t\t\t\t\t\t\t\t\tinherited: false\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\tcloned.clone = this.clone.bind( cloned );\n\t\t\t\t\t\t\t\treturn cloned;\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tthis.materials.push( material );\n\n\t\t\t\t\t\treturn material;\n\n\t\t\t\t\t},\n\n\t\t\t\t\tcurrentMaterial: function () {\n\n\t\t\t\t\t\tif ( this.materials.length > 0 ) {\n\n\t\t\t\t\t\t\treturn this.materials[ this.materials.length - 1 ];\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn undefined;\n\n\t\t\t\t\t},\n\n\t\t\t\t\t_finalize: function ( end ) {\n\n\t\t\t\t\t\tvar lastMultiMaterial = this.currentMaterial();\n\t\t\t\t\t\tif ( lastMultiMaterial && lastMultiMaterial.groupEnd === - 1 ) {\n\n\t\t\t\t\t\t\tlastMultiMaterial.groupEnd = this.geometry.vertices.length / 3;\n\t\t\t\t\t\t\tlastMultiMaterial.groupCount = lastMultiMaterial.groupEnd - lastMultiMaterial.groupStart;\n\t\t\t\t\t\t\tlastMultiMaterial.inherited = false;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Ignore objects tail materials if no face declarations followed them before a new o/g started.\n\t\t\t\t\t\tif ( end && this.materials.length > 1 ) {\n\n\t\t\t\t\t\t\tfor ( var mi = this.materials.length - 1; mi >= 0; mi -- ) {\n\n\t\t\t\t\t\t\t\tif ( this.materials[ mi ].groupCount <= 0 ) {\n\n\t\t\t\t\t\t\t\t\tthis.materials.splice( mi, 1 );\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Guarantee at least one empty material, this makes the creation later more straight forward.\n\t\t\t\t\t\tif ( end && this.materials.length === 0 ) {\n\n\t\t\t\t\t\t\tthis.materials.push( {\n\t\t\t\t\t\t\t\tname: '',\n\t\t\t\t\t\t\t\tsmooth: this.smooth\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn lastMultiMaterial;\n\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\t// Inherit previous objects material.\n\t\t\t\t// Spec tells us that a declared material must be set to all objects until a new material is declared.\n\t\t\t\t// If a usemtl declaration is encountered while this new object is being parsed, it will\n\t\t\t\t// overwrite the inherited material. Exception being that there was already face declarations\n\t\t\t\t// to the inherited material, then it will be preserved for proper MultiMaterial continuation.\n\n\t\t\t\tif ( previousMaterial && previousMaterial.name && typeof previousMaterial.clone === 'function' ) {\n\n\t\t\t\t\tvar declared = previousMaterial.clone( 0 );\n\t\t\t\t\tdeclared.inherited = true;\n\t\t\t\t\tthis.object.materials.push( declared );\n\n\t\t\t\t}\n\n\t\t\t\tthis.objects.push( this.object );\n\n\t\t\t},\n\n\t\t\tfinalize: function () {\n\n\t\t\t\tif ( this.object && typeof this.object._finalize === 'function' ) {\n\n\t\t\t\t\tthis.object._finalize( true );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\tparseVertexIndex: function ( value, len ) {\n\n\t\t\t\tvar index = parseInt( value, 10 );\n\t\t\t\treturn ( index >= 0 ? index - 1 : index + len / 3 ) * 3;\n\n\t\t\t},\n\n\t\t\tparseNormalIndex: function ( value, len ) {\n\n\t\t\t\tvar index = parseInt( value, 10 );\n\t\t\t\treturn ( index >= 0 ? index - 1 : index + len / 3 ) * 3;\n\n\t\t\t},\n\n\t\t\tparseUVIndex: function ( value, len ) {\n\n\t\t\t\tvar index = parseInt( value, 10 );\n\t\t\t\treturn ( index >= 0 ? index - 1 : index + len / 2 ) * 2;\n\n\t\t\t},\n\n\t\t\taddVertex: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.vertices;\n\t\t\t\tvar dst = this.object.geometry.vertices;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t\t},\n\n\t\t\taddVertexPoint: function ( a ) {\n\n\t\t\t\tvar src = this.vertices;\n\t\t\t\tvar dst = this.object.geometry.vertices;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\n\t\t\t},\n\n\t\t\taddVertexLine: function ( a ) {\n\n\t\t\t\tvar src = this.vertices;\n\t\t\t\tvar dst = this.object.geometry.vertices;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\n\t\t\t},\n\n\t\t\taddNormal: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.normals;\n\t\t\t\tvar dst = this.object.geometry.normals;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t\t},\n\n\t\t\taddFaceNormal: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.vertices;\n\t\t\t\tvar dst = this.object.geometry.normals;\n\n\t\t\t\tvA.fromArray( src, a );\n\t\t\t\tvB.fromArray( src, b );\n\t\t\t\tvC.fromArray( src, c );\n\n\t\t\t\tcb.subVectors( vC, vB );\n\t\t\t\tab.subVectors( vA, vB );\n\t\t\t\tcb.cross( ab );\n\n\t\t\t\tcb.normalize();\n\n\t\t\t\tdst.push( cb.x, cb.y, cb.z );\n\t\t\t\tdst.push( cb.x, cb.y, cb.z );\n\t\t\t\tdst.push( cb.x, cb.y, cb.z );\n\n\t\t\t},\n\n\t\t\taddColor: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.colors;\n\t\t\t\tvar dst = this.object.geometry.colors;\n\n\t\t\t\tif ( src[ a ] !== undefined ) dst.push( src[ a + 0 ], src[ a + 1 ], src[ a + 2 ] );\n\t\t\t\tif ( src[ b ] !== undefined ) dst.push( src[ b + 0 ], src[ b + 1 ], src[ b + 2 ] );\n\t\t\t\tif ( src[ c ] !== undefined ) dst.push( src[ c + 0 ], src[ c + 1 ], src[ c + 2 ] );\n\n\t\t\t},\n\n\t\t\taddUV: function ( a, b, c ) {\n\n\t\t\t\tvar src = this.uvs;\n\t\t\t\tvar dst = this.object.geometry.uvs;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ] );\n\t\t\t\tdst.push( src[ b + 0 ], src[ b + 1 ] );\n\t\t\t\tdst.push( src[ c + 0 ], src[ c + 1 ] );\n\n\t\t\t},\n\n\t\t\taddDefaultUV: function () {\n\n\t\t\t\tvar dst = this.object.geometry.uvs;\n\n\t\t\t\tdst.push( 0, 0 );\n\t\t\t\tdst.push( 0, 0 );\n\t\t\t\tdst.push( 0, 0 );\n\n\t\t\t},\n\n\t\t\taddUVLine: function ( a ) {\n\n\t\t\t\tvar src = this.uvs;\n\t\t\t\tvar dst = this.object.geometry.uvs;\n\n\t\t\t\tdst.push( src[ a + 0 ], src[ a + 1 ] );\n\n\t\t\t},\n\n\t\t\taddFace: function ( a, b, c, ua, ub, uc, na, nb, nc ) {\n\n\t\t\t\tvar vLen = this.vertices.length;\n\n\t\t\t\tvar ia = this.parseVertexIndex( a, vLen );\n\t\t\t\tvar ib = this.parseVertexIndex( b, vLen );\n\t\t\t\tvar ic = this.parseVertexIndex( c, vLen );\n\n\t\t\t\tthis.addVertex( ia, ib, ic );\n\t\t\t\tthis.addColor( ia, ib, ic );\n\n\t\t\t\t// normals\n\n\t\t\t\tif ( na !== undefined && na !== '' ) {\n\n\t\t\t\t\tvar nLen = this.normals.length;\n\n\t\t\t\t\tia = this.parseNormalIndex( na, nLen );\n\t\t\t\t\tib = this.parseNormalIndex( nb, nLen );\n\t\t\t\t\tic = this.parseNormalIndex( nc, nLen );\n\n\t\t\t\t\tthis.addNormal( ia, ib, ic );\n\n\t\t\t\t} else {\n\n\t\t\t\t\tthis.addFaceNormal( ia, ib, ic );\n\n\t\t\t\t}\n\n\t\t\t\t// uvs\n\n\t\t\t\tif ( ua !== undefined && ua !== '' ) {\n\n\t\t\t\t\tvar uvLen = this.uvs.length;\n\n\t\t\t\t\tia = this.parseUVIndex( ua, uvLen );\n\t\t\t\t\tib = this.parseUVIndex( ub, uvLen );\n\t\t\t\t\tic = this.parseUVIndex( uc, uvLen );\n\n\t\t\t\t\tthis.addUV( ia, ib, ic );\n\n\t\t\t\t\tthis.object.geometry.hasUVIndices = true;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// add placeholder values (for inconsistent face definitions)\n\n\t\t\t\t\tthis.addDefaultUV();\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\taddPointGeometry: function ( vertices ) {\n\n\t\t\t\tthis.object.geometry.type = 'Points';\n\n\t\t\t\tvar vLen = this.vertices.length;\n\n\t\t\t\tfor ( var vi = 0, l = vertices.length; vi < l; vi ++ ) {\n\n\t\t\t\t\tvar index = this.parseVertexIndex( vertices[ vi ], vLen );\n\n\t\t\t\t\tthis.addVertexPoint( index );\n\t\t\t\t\tthis.addColor( index );\n\n\t\t\t\t}\n\n\t\t\t},\n\n\t\t\taddLineGeometry: function ( vertices, uvs ) {\n\n\t\t\t\tthis.object.geometry.type = 'Line';\n\n\t\t\t\tvar vLen = this.vertices.length;\n\t\t\t\tvar uvLen = this.uvs.length;\n\n\t\t\t\tfor ( var vi = 0, l = vertices.length; vi < l; vi ++ ) {\n\n\t\t\t\t\tthis.addVertexLine( this.parseVertexIndex( vertices[ vi ], vLen ) );\n\n\t\t\t\t}\n\n\t\t\t\tfor ( var uvi = 0, l = uvs.length; uvi < l; uvi ++ ) {\n\n\t\t\t\t\tthis.addUVLine( this.parseUVIndex( uvs[ uvi ], uvLen ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tstate.startObject( '', false );\n\n\t\treturn state;\n\n\t}\n\n\t//\n\n\tfunction OBJLoader( manager ) {\n\n\t\tTHREE.Loader.call( this, manager );\n\n\t\tthis.materials = null;\n\n\t}\n\n\tOBJLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype ), {\n\n\t\tconstructor: OBJLoader,\n\n\t\tload: function ( url, onLoad, onProgress, onError ) {\n\n\t\t\tvar scope = this;\n\n\t\t\tvar loader = new THREE.FileLoader( this.manager );\n\t\t\tloader.setPath( this.path );\n\t\t\tloader.setRequestHeader( this.requestHeader );\n\t\t\tloader.setWithCredentials( this.withCredentials );\n\t\t\tloader.load( url, function ( text ) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tonLoad( scope.parse( text ) );\n\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\tif ( onError ) {\n\n\t\t\t\t\t\tonError( e );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tconsole.error( e );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tscope.manager.itemError( url );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, onError );\n\n\t\t},\n\n\t\tsetMaterials: function ( materials ) {\n\n\t\t\tthis.materials = materials;\n\n\t\t\treturn this;\n\n\t\t},\n\n\t\tparse: function ( text ) {\n\n\t\t\tvar state = new ParserState();\n\n\t\t\tif ( text.indexOf( '\\r\\n' ) !== - 1 ) {\n\n\t\t\t\t// This is faster than String.split with regex that splits on both\n\t\t\t\ttext = text.replace( /\\r\\n/g, '\\n' );\n\n\t\t\t}\n\n\t\t\tif ( text.indexOf( '\\\\\\n' ) !== - 1 ) {\n\n\t\t\t\t// join lines separated by a line continuation character (\\)\n\t\t\t\ttext = text.replace( /\\\\\\n/g, '' );\n\n\t\t\t}\n\n\t\t\tvar lines = text.split( '\\n' );\n\t\t\tvar line = '', lineFirstChar = '';\n\t\t\tvar lineLength = 0;\n\t\t\tvar result = [];\n\n\t\t\t// Faster to just trim left side of the line. Use if available.\n\t\t\tvar trimLeft = ( typeof ''.trimLeft === 'function' );\n\n\t\t\tfor ( var i = 0, l = lines.length; i < l; i ++ ) {\n\n\t\t\t\tline = lines[ i ];\n\n\t\t\t\tline = trimLeft ? line.trimLeft() : line.trim();\n\n\t\t\t\tlineLength = line.length;\n\n\t\t\t\tif ( lineLength === 0 ) continue;\n\n\t\t\t\tlineFirstChar = line.charAt( 0 );\n\n\t\t\t\t// @todo invoke passed in handler if any\n\t\t\t\tif ( lineFirstChar === '#' ) continue;\n\n\t\t\t\tif ( lineFirstChar === 'v' ) {\n\n\t\t\t\t\tvar data = line.split( /\\s+/ );\n\n\t\t\t\t\tswitch ( data[ 0 ] ) {\n\n\t\t\t\t\t\tcase 'v':\n\t\t\t\t\t\t\tstate.vertices.push(\n\t\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 2 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 3 ] )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif ( data.length >= 7 ) {\n\n\t\t\t\t\t\t\t\tstate.colors.push(\n\t\t\t\t\t\t\t\t\tparseFloat( data[ 4 ] ),\n\t\t\t\t\t\t\t\t\tparseFloat( data[ 5 ] ),\n\t\t\t\t\t\t\t\t\tparseFloat( data[ 6 ] )\n\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// if no colors are defined, add placeholders so color and vertex indices match\n\n\t\t\t\t\t\t\t\tstate.colors.push( undefined, undefined, undefined );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'vn':\n\t\t\t\t\t\t\tstate.normals.push(\n\t\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 2 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 3 ] )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'vt':\n\t\t\t\t\t\t\tstate.uvs.push(\n\t\t\t\t\t\t\t\tparseFloat( data[ 1 ] ),\n\t\t\t\t\t\t\t\tparseFloat( data[ 2 ] )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( lineFirstChar === 'f' ) {\n\n\t\t\t\t\tvar lineData = line.substr( 1 ).trim();\n\t\t\t\t\tvar vertexData = lineData.split( /\\s+/ );\n\t\t\t\t\tvar faceVertices = [];\n\n\t\t\t\t\t// Parse the face vertex data into an easy to work with format\n\n\t\t\t\t\tfor ( var j = 0, jl = vertexData.length; j < jl; j ++ ) {\n\n\t\t\t\t\t\tvar vertex = vertexData[ j ];\n\n\t\t\t\t\t\tif ( vertex.length > 0 ) {\n\n\t\t\t\t\t\t\tvar vertexParts = vertex.split( '/' );\n\t\t\t\t\t\t\tfaceVertices.push( vertexParts );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Draw an edge between the first vertex and all subsequent vertices to form an n-gon\n\n\t\t\t\t\tvar v1 = faceVertices[ 0 ];\n\n\t\t\t\t\tfor ( var j = 1, jl = faceVertices.length - 1; j < jl; j ++ ) {\n\n\t\t\t\t\t\tvar v2 = faceVertices[ j ];\n\t\t\t\t\t\tvar v3 = faceVertices[ j + 1 ];\n\n\t\t\t\t\t\tstate.addFace(\n\t\t\t\t\t\t\tv1[ 0 ], v2[ 0 ], v3[ 0 ],\n\t\t\t\t\t\t\tv1[ 1 ], v2[ 1 ], v3[ 1 ],\n\t\t\t\t\t\t\tv1[ 2 ], v2[ 2 ], v3[ 2 ]\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t} else if ( lineFirstChar === 'l' ) {\n\n\t\t\t\t\tvar lineParts = line.substring( 1 ).trim().split( ' ' );\n\t\t\t\t\tvar lineVertices = [], lineUVs = [];\n\n\t\t\t\t\tif ( line.indexOf( '/' ) === - 1 ) {\n\n\t\t\t\t\t\tlineVertices = lineParts;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tfor ( var li = 0, llen = lineParts.length; li < llen; li ++ ) {\n\n\t\t\t\t\t\t\tvar parts = lineParts[ li ].split( '/' );\n\n\t\t\t\t\t\t\tif ( parts[ 0 ] !== '' ) lineVertices.push( parts[ 0 ] );\n\t\t\t\t\t\t\tif ( parts[ 1 ] !== '' ) lineUVs.push( parts[ 1 ] );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.addLineGeometry( lineVertices, lineUVs );\n\n\t\t\t\t} else if ( lineFirstChar === 'p' ) {\n\n\t\t\t\t\tvar lineData = line.substr( 1 ).trim();\n\t\t\t\t\tvar pointData = lineData.split( ' ' );\n\n\t\t\t\t\tstate.addPointGeometry( pointData );\n\n\t\t\t\t} else if ( ( result = object_pattern.exec( line ) ) !== null ) {\n\n\t\t\t\t\t// o object_name\n\t\t\t\t\t// or\n\t\t\t\t\t// g group_name\n\n\t\t\t\t\t// WORKAROUND: https://bugs.chromium.org/p/v8/issues/detail?id=2869\n\t\t\t\t\t// var name = result[ 0 ].substr( 1 ).trim();\n\t\t\t\t\tvar name = ( ' ' + result[ 0 ].substr( 1 ).trim() ).substr( 1 );\n\n\t\t\t\t\tstate.startObject( name );\n\n\t\t\t\t} else if ( material_use_pattern.test( line ) ) {\n\n\t\t\t\t\t// material\n\n\t\t\t\t\tstate.object.startMaterial( line.substring( 7 ).trim(), state.materialLibraries );\n\n\t\t\t\t} else if ( material_library_pattern.test( line ) ) {\n\n\t\t\t\t\t// mtl file\n\n\t\t\t\t\tstate.materialLibraries.push( line.substring( 7 ).trim() );\n\n\t\t\t\t} else if ( map_use_pattern.test( line ) ) {\n\n\t\t\t\t\t// the line is parsed but ignored since the loader assumes textures are defined MTL files\n\t\t\t\t\t// (according to https://www.okino.com/conv/imp_wave.htm, 'usemap' is the old-style Wavefront texture reference method)\n\n\t\t\t\t\tconsole.warn( 'THREE.OBJLoader: Rendering identifier \"usemap\" not supported. Textures must be defined in MTL files.' );\n\n\t\t\t\t} else if ( lineFirstChar === 's' ) {\n\n\t\t\t\t\tresult = line.split( ' ' );\n\n\t\t\t\t\t// smooth shading\n\n\t\t\t\t\t// @todo Handle files that have varying smooth values for a set of faces inside one geometry,\n\t\t\t\t\t// but does not define a usemtl for each face set.\n\t\t\t\t\t// This should be detected and a dummy material created (later MultiMaterial and geometry groups).\n\t\t\t\t\t// This requires some care to not create extra material on each smooth value for \"normal\" obj files.\n\t\t\t\t\t// where explicit usemtl defines geometry groups.\n\t\t\t\t\t// Example asset: examples/models/obj/cerberus/Cerberus.obj\n\n\t\t\t\t\t/*\n\t\t\t\t\t * http://paulbourke.net/dataformats/obj/\n\t\t\t\t\t * or\n\t\t\t\t\t * http://www.cs.utah.edu/~boulos/cs3505/obj_spec.pdf\n\t\t\t\t\t *\n\t\t\t\t\t * From chapter \"Grouping\" Syntax explanation \"s group_number\":\n\t\t\t\t\t * \"group_number is the smoothing group number. To turn off smoothing groups, use a value of 0 or off.\n\t\t\t\t\t * Polygonal elements use group numbers to put elements in different smoothing groups. For free-form\n\t\t\t\t\t * surfaces, smoothing groups are either turned on or off; there is no difference between values greater\n\t\t\t\t\t * than 0.\"\n\t\t\t\t\t */\n\t\t\t\t\tif ( result.length > 1 ) {\n\n\t\t\t\t\t\tvar value = result[ 1 ].trim().toLowerCase();\n\t\t\t\t\t\tstate.object.smooth = ( value !== '0' && value !== 'off' );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// ZBrush can produce \"s\" lines #11707\n\t\t\t\t\t\tstate.object.smooth = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar material = state.object.currentMaterial();\n\t\t\t\t\tif ( material ) material.smooth = state.object.smooth;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Handle null terminated files without exception\n\t\t\t\t\tif ( line === '\\0' ) continue;\n\n\t\t\t\t\tconsole.warn( 'THREE.OBJLoader: Unexpected line: \"' + line + '\"' );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tstate.finalize();\n\n\t\t\tvar container = new THREE.Group();\n\t\t\tcontainer.materialLibraries = [].concat( state.materialLibraries );\n\n\t\t\tvar hasPrimitives = ! ( state.objects.length === 1 && state.objects[ 0 ].geometry.vertices.length === 0 );\n\n\t\t\tif ( hasPrimitives === true ) {\n\n\t\t\t\tfor ( var i = 0, l = state.objects.length; i < l; i ++ ) {\n\n\t\t\t\t\tvar object = state.objects[ i ];\n\t\t\t\t\tvar geometry = object.geometry;\n\t\t\t\t\tvar materials = object.materials;\n\t\t\t\t\tvar isLine = ( geometry.type === 'Line' );\n\t\t\t\t\tvar isPoints = ( geometry.type === 'Points' );\n\t\t\t\t\tvar hasVertexColors = false;\n\n\t\t\t\t\t// Skip o/g line declarations that did not follow with any faces\n\t\t\t\t\tif ( geometry.vertices.length === 0 ) continue;\n\n\t\t\t\t\tvar buffergeometry = new THREE.BufferGeometry();\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'position', new THREE.Float32BufferAttribute( geometry.vertices, 3 ) );\n\n\t\t\t\t\tif ( geometry.normals.length > 0 ) {\n\n\t\t\t\t\t\tbuffergeometry.setAttribute( 'normal', new THREE.Float32BufferAttribute( geometry.normals, 3 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( geometry.colors.length > 0 ) {\n\n\t\t\t\t\t\thasVertexColors = true;\n\t\t\t\t\t\tbuffergeometry.setAttribute( 'color', new THREE.Float32BufferAttribute( geometry.colors, 3 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( geometry.hasUVIndices === true ) {\n\n\t\t\t\t\t\tbuffergeometry.setAttribute( 'uv', new THREE.Float32BufferAttribute( geometry.uvs, 2 ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create materials\n\n\t\t\t\t\tvar createdMaterials = [];\n\n\t\t\t\t\tfor ( var mi = 0, miLen = materials.length; mi < miLen; mi ++ ) {\n\n\t\t\t\t\t\tvar sourceMaterial = materials[ mi ];\n\t\t\t\t\t\tvar materialHash = sourceMaterial.name + '_' + sourceMaterial.smooth + '_' + hasVertexColors;\n\t\t\t\t\t\tvar material = state.materials[ materialHash ];\n\n\t\t\t\t\t\tif ( this.materials !== null ) {\n\n\t\t\t\t\t\t\tmaterial = this.materials.create( sourceMaterial.name );\n\n\t\t\t\t\t\t\t// mtl etc. loaders probably can't create line materials correctly, copy properties to a line material.\n\t\t\t\t\t\t\tif ( isLine && material && ! ( material instanceof THREE.LineBasicMaterial ) ) {\n\n\t\t\t\t\t\t\t\tvar materialLine = new THREE.LineBasicMaterial();\n\t\t\t\t\t\t\t\tTHREE.Material.prototype.copy.call( materialLine, material );\n\t\t\t\t\t\t\t\tmaterialLine.color.copy( material.color );\n\t\t\t\t\t\t\t\tmaterial = materialLine;\n\n\t\t\t\t\t\t\t} else if ( isPoints && material && ! ( material instanceof THREE.PointsMaterial ) ) {\n\n\t\t\t\t\t\t\t\tvar materialPoints = new THREE.PointsMaterial( { size: 10, sizeAttenuation: false } );\n\t\t\t\t\t\t\t\tTHREE.Material.prototype.copy.call( materialPoints, material );\n\t\t\t\t\t\t\t\tmaterialPoints.color.copy( material.color );\n\t\t\t\t\t\t\t\tmaterialPoints.map = material.map;\n\t\t\t\t\t\t\t\tmaterial = materialPoints;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( material === undefined ) {\n\n\t\t\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\t\t\tmaterial = new THREE.LineBasicMaterial();\n\n\t\t\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\t\t\tmaterial = new THREE.PointsMaterial( { size: 1, sizeAttenuation: false } );\n\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tmaterial = new THREE.MeshPhongMaterial();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmaterial.name = sourceMaterial.name;\n\t\t\t\t\t\t\tmaterial.flatShading = sourceMaterial.smooth ? false : true;\n\t\t\t\t\t\t\tmaterial.vertexColors = hasVertexColors;\n\n\t\t\t\t\t\t\tstate.materials[ materialHash ] = material;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcreatedMaterials.push( material );\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create mesh\n\n\t\t\t\t\tvar mesh;\n\n\t\t\t\t\tif ( createdMaterials.length > 1 ) {\n\n\t\t\t\t\t\tfor ( var mi = 0, miLen = materials.length; mi < miLen; mi ++ ) {\n\n\t\t\t\t\t\t\tvar sourceMaterial = materials[ mi ];\n\t\t\t\t\t\t\tbuffergeometry.addGroup( sourceMaterial.groupStart, sourceMaterial.groupCount, mi );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\t\tmesh = new THREE.LineSegments( buffergeometry, createdMaterials );\n\n\t\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\t\tmesh = new THREE.Points( buffergeometry, createdMaterials );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tmesh = new THREE.Mesh( buffergeometry, createdMaterials );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( isLine ) {\n\n\t\t\t\t\t\t\tmesh = new THREE.LineSegments( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t\t} else if ( isPoints ) {\n\n\t\t\t\t\t\t\tmesh = new THREE.Points( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tmesh = new THREE.Mesh( buffergeometry, createdMaterials[ 0 ] );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmesh.name = object.name;\n\n\t\t\t\t\tcontainer.add( mesh );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// if there is only the default parser state object with no geometry data, interpret data as point cloud\n\n\t\t\t\tif ( state.vertices.length > 0 ) {\n\n\t\t\t\t\tvar material = new THREE.PointsMaterial( { size: 1, sizeAttenuation: false } );\n\n\t\t\t\t\tvar buffergeometry = new THREE.BufferGeometry();\n\n\t\t\t\t\tbuffergeometry.setAttribute( 'position', new THREE.Float32BufferAttribute( state.vertices, 3 ) );\n\n\t\t\t\t\tif ( state.colors.length > 0 && state.colors[ 0 ] !== undefined ) {\n\n\t\t\t\t\t\tbuffergeometry.setAttribute( 'color', new THREE.Float32BufferAttribute( state.colors, 3 ) );\n\t\t\t\t\t\tmaterial.vertexColors = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar points = new THREE.Points( buffergeometry, material );\n\t\t\t\t\tcontainer.add( points );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn container;\n\n\t\t}\n\n\t} );\n\n\treturn OBJLoader;\n\n} )();\n\n},{}],62:[function(_dereq_,module,exports){\nTHREE.BufferGeometryUtils = {\n\n\tcomputeTangents: function ( geometry ) {\n\n\t\tgeometry.computeTangents();\n\t\tconsole.warn( 'THREE.BufferGeometryUtils: .computeTangents() has been removed. Use BufferGeometry.computeTangents() instead.' );\n\n\t},\n\n\t/**\n\t * @param {Array<THREE.BufferGeometry>} geometries\n\t * @param {Boolean} useGroups\n\t * @return {THREE.BufferGeometry}\n\t */\n\tmergeBufferGeometries: function ( geometries, useGroups ) {\n\n\t\tvar isIndexed = geometries[ 0 ].index !== null;\n\n\t\tvar attributesUsed = new Set( Object.keys( geometries[ 0 ].attributes ) );\n\t\tvar morphAttributesUsed = new Set( Object.keys( geometries[ 0 ].morphAttributes ) );\n\n\t\tvar attributes = {};\n\t\tvar morphAttributes = {};\n\n\t\tvar morphTargetsRelative = geometries[ 0 ].morphTargetsRelative;\n\n\t\tvar mergedGeometry = new THREE.BufferGeometry();\n\n\t\tvar offset = 0;\n\n\t\tfor ( var i = 0; i < geometries.length; ++ i ) {\n\n\t\t\tvar geometry = geometries[ i ];\n\t\t\tvar attributesCount = 0;\n\n\t\t\t// ensure that all geometries are indexed, or none\n\n\t\t\tif ( isIndexed !== ( geometry.index !== null ) ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\t// gather attributes, exit early if they're different\n\n\t\t\tfor ( var name in geometry.attributes ) {\n\n\t\t\t\tif ( ! attributesUsed.has( name ) ) {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. All geometries must have compatible attributes; make sure \"' + name + '\" attribute exists among all geometries, or in none of them.' );\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t\tif ( attributes[ name ] === undefined ) attributes[ name ] = [];\n\n\t\t\t\tattributes[ name ].push( geometry.attributes[ name ] );\n\n\t\t\t\tattributesCount ++;\n\n\t\t\t}\n\n\t\t\t// ensure geometries have the same number of attributes\n\n\t\t\tif ( attributesCount !== attributesUsed.size ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. Make sure all geometries have the same number of attributes.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\t// gather morph attributes, exit early if they're different\n\n\t\t\tif ( morphTargetsRelative !== geometry.morphTargetsRelative ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. .morphTargetsRelative must be consistent throughout all geometries.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tfor ( var name in geometry.morphAttributes ) {\n\n\t\t\t\tif ( ! morphAttributesUsed.has( name ) ) {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. .morphAttributes must be consistent throughout all geometries.' );\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t\tif ( morphAttributes[ name ] === undefined ) morphAttributes[ name ] = [];\n\n\t\t\t\tmorphAttributes[ name ].push( geometry.morphAttributes[ name ] );\n\n\t\t\t}\n\n\t\t\t// gather .userData\n\n\t\t\tmergedGeometry.userData.mergedUserData = mergedGeometry.userData.mergedUserData || [];\n\t\t\tmergedGeometry.userData.mergedUserData.push( geometry.userData );\n\n\t\t\tif ( useGroups ) {\n\n\t\t\t\tvar count;\n\n\t\t\t\tif ( isIndexed ) {\n\n\t\t\t\t\tcount = geometry.index.count;\n\n\t\t\t\t} else if ( geometry.attributes.position !== undefined ) {\n\n\t\t\t\t\tcount = geometry.attributes.position.count;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index ' + i + '. The geometry must have either an index or a position attribute' );\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t\tmergedGeometry.addGroup( offset, count, i );\n\n\t\t\t\toffset += count;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// merge indices\n\n\t\tif ( isIndexed ) {\n\n\t\t\tvar indexOffset = 0;\n\t\t\tvar mergedIndex = [];\n\n\t\t\tfor ( var i = 0; i < geometries.length; ++ i ) {\n\n\t\t\t\tvar index = geometries[ i ].index;\n\n\t\t\t\tfor ( var j = 0; j < index.count; ++ j ) {\n\n\t\t\t\t\tmergedIndex.push( index.getX( j ) + indexOffset );\n\n\t\t\t\t}\n\n\t\t\t\tindexOffset += geometries[ i ].attributes.position.count;\n\n\t\t\t}\n\n\t\t\tmergedGeometry.setIndex( mergedIndex );\n\n\t\t}\n\n\t\t// merge attributes\n\n\t\tfor ( var name in attributes ) {\n\n\t\t\tvar mergedAttribute = this.mergeBufferAttributes( attributes[ name ] );\n\n\t\t\tif ( ! mergedAttribute ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the ' + name + ' attribute.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tmergedGeometry.setAttribute( name, mergedAttribute );\n\n\t\t}\n\n\t\t// merge morph attributes\n\n\t\tfor ( var name in morphAttributes ) {\n\n\t\t\tvar numMorphTargets = morphAttributes[ name ][ 0 ].length;\n\n\t\t\tif ( numMorphTargets === 0 ) break;\n\n\t\t\tmergedGeometry.morphAttributes = mergedGeometry.morphAttributes || {};\n\t\t\tmergedGeometry.morphAttributes[ name ] = [];\n\n\t\t\tfor ( var i = 0; i < numMorphTargets; ++ i ) {\n\n\t\t\t\tvar morphAttributesToMerge = [];\n\n\t\t\t\tfor ( var j = 0; j < morphAttributes[ name ].length; ++ j ) {\n\n\t\t\t\t\tmorphAttributesToMerge.push( morphAttributes[ name ][ j ][ i ] );\n\n\t\t\t\t}\n\n\t\t\t\tvar mergedMorphAttribute = this.mergeBufferAttributes( morphAttributesToMerge );\n\n\t\t\t\tif ( ! mergedMorphAttribute ) {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the ' + name + ' morphAttribute.' );\n\t\t\t\t\treturn null;\n\n\t\t\t\t}\n\n\t\t\t\tmergedGeometry.morphAttributes[ name ].push( mergedMorphAttribute );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn mergedGeometry;\n\n\t},\n\n\t/**\n\t * @param {Array<THREE.BufferAttribute>} attributes\n\t * @return {THREE.BufferAttribute}\n\t */\n\tmergeBufferAttributes: function ( attributes ) {\n\n\t\tvar TypedArray;\n\t\tvar itemSize;\n\t\tvar normalized;\n\t\tvar arrayLength = 0;\n\n\t\tfor ( var i = 0; i < attributes.length; ++ i ) {\n\n\t\t\tvar attribute = attributes[ i ];\n\n\t\t\tif ( attribute.isInterleavedBufferAttribute ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. InterleavedBufferAttributes are not supported.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tif ( TypedArray === undefined ) TypedArray = attribute.array.constructor;\n\t\t\tif ( TypedArray !== attribute.array.constructor ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tif ( itemSize === undefined ) itemSize = attribute.itemSize;\n\t\t\tif ( itemSize !== attribute.itemSize ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tif ( normalized === undefined ) normalized = attribute.normalized;\n\t\t\tif ( normalized !== attribute.normalized ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes.' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tarrayLength += attribute.array.length;\n\n\t\t}\n\n\t\tvar array = new TypedArray( arrayLength );\n\t\tvar offset = 0;\n\n\t\tfor ( var i = 0; i < attributes.length; ++ i ) {\n\n\t\t\tarray.set( attributes[ i ].array, offset );\n\n\t\t\toffset += attributes[ i ].array.length;\n\n\t\t}\n\n\t\treturn new THREE.BufferAttribute( array, itemSize, normalized );\n\n\t},\n\n\t/**\n\t * @param {Array<THREE.BufferAttribute>} attributes\n\t * @return {Array<THREE.InterleavedBufferAttribute>}\n\t */\n\tinterleaveAttributes: function ( attributes ) {\n\n\t\t// Interleaves the provided attributes into an InterleavedBuffer and returns\n\t\t// a set of InterleavedBufferAttributes for each attribute\n\t\tvar TypedArray;\n\t\tvar arrayLength = 0;\n\t\tvar stride = 0;\n\n\t\t// calculate the the length and type of the interleavedBuffer\n\t\tfor ( var i = 0, l = attributes.length; i < l; ++ i ) {\n\n\t\t\tvar attribute = attributes[ i ];\n\n\t\t\tif ( TypedArray === undefined ) TypedArray = attribute.array.constructor;\n\t\t\tif ( TypedArray !== attribute.array.constructor ) {\n\n\t\t\t\tconsole.error( 'AttributeBuffers of different types cannot be interleaved' );\n\t\t\t\treturn null;\n\n\t\t\t}\n\n\t\t\tarrayLength += attribute.array.length;\n\t\t\tstride += attribute.itemSize;\n\n\t\t}\n\n\t\t// Create the set of buffer attributes\n\t\tvar interleavedBuffer = new THREE.InterleavedBuffer( new TypedArray( arrayLength ), stride );\n\t\tvar offset = 0;\n\t\tvar res = [];\n\t\tvar getters = [ 'getX', 'getY', 'getZ', 'getW' ];\n\t\tvar setters = [ 'setX', 'setY', 'setZ', 'setW' ];\n\n\t\tfor ( var j = 0, l = attributes.length; j < l; j ++ ) {\n\n\t\t\tvar attribute = attributes[ j ];\n\t\t\tvar itemSize = attribute.itemSize;\n\t\t\tvar count = attribute.count;\n\t\t\tvar iba = new THREE.InterleavedBufferAttribute( interleavedBuffer, itemSize, offset, attribute.normalized );\n\t\t\tres.push( iba );\n\n\t\t\toffset += itemSize;\n\n\t\t\t// Move the data for each attribute into the new interleavedBuffer\n\t\t\t// at the appropriate offset\n\t\t\tfor ( var c = 0; c < count; c ++ ) {\n\n\t\t\t\tfor ( var k = 0; k < itemSize; k ++ ) {\n\n\t\t\t\t\tiba[ setters[ k ] ]( c, attribute[ getters[ k ] ]( c ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn res;\n\n\t},\n\n\t/**\n\t * @param {Array<THREE.BufferGeometry>} geometry\n\t * @return {number}\n\t */\n\testimateBytesUsed: function ( geometry ) {\n\n\t\t// Return the estimated memory used by this geometry in bytes\n\t\t// Calculate using itemSize, count, and BYTES_PER_ELEMENT to account\n\t\t// for InterleavedBufferAttributes.\n\t\tvar mem = 0;\n\t\tfor ( var name in geometry.attributes ) {\n\n\t\t\tvar attr = geometry.getAttribute( name );\n\t\t\tmem += attr.count * attr.itemSize * attr.array.BYTES_PER_ELEMENT;\n\n\t\t}\n\n\t\tvar indices = geometry.getIndex();\n\t\tmem += indices ? indices.count * indices.itemSize * indices.array.BYTES_PER_ELEMENT : 0;\n\t\treturn mem;\n\n\t},\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {number} tolerance\n\t * @return {THREE.BufferGeometry>}\n\t */\n\tmergeVertices: function ( geometry, tolerance = 1e-4 ) {\n\n\t\ttolerance = Math.max( tolerance, Number.EPSILON );\n\n\t\t// Generate an index buffer if the geometry doesn't have one, or optimize it\n\t\t// if it's already available.\n\t\tvar hashToIndex = {};\n\t\tvar indices = geometry.getIndex();\n\t\tvar positions = geometry.getAttribute( 'position' );\n\t\tvar vertexCount = indices ? indices.count : positions.count;\n\n\t\t// next value for triangle indices\n\t\tvar nextIndex = 0;\n\n\t\t// attributes and new attribute arrays\n\t\tvar attributeNames = Object.keys( geometry.attributes );\n\t\tvar attrArrays = {};\n\t\tvar morphAttrsArrays = {};\n\t\tvar newIndices = [];\n\t\tvar getters = [ 'getX', 'getY', 'getZ', 'getW' ];\n\n\t\t// initialize the arrays\n\t\tfor ( var i = 0, l = attributeNames.length; i < l; i ++ ) {\n\n\t\t\tvar name = attributeNames[ i ];\n\n\t\t\tattrArrays[ name ] = [];\n\n\t\t\tvar morphAttr = geometry.morphAttributes[ name ];\n\t\t\tif ( morphAttr ) {\n\n\t\t\t\tmorphAttrsArrays[ name ] = new Array( morphAttr.length ).fill().map( () => [] );\n\n\t\t\t}\n\n\t\t}\n\n\t\t// convert the error tolerance to an amount of decimal places to truncate to\n\t\tvar decimalShift = Math.log10( 1 / tolerance );\n\t\tvar shiftMultiplier = Math.pow( 10, decimalShift );\n\t\tfor ( var i = 0; i < vertexCount; i ++ ) {\n\n\t\t\tvar index = indices ? indices.getX( i ) : i;\n\n\t\t\t// Generate a hash for the vertex attributes at the current index 'i'\n\t\t\tvar hash = '';\n\t\t\tfor ( var j = 0, l = attributeNames.length; j < l; j ++ ) {\n\n\t\t\t\tvar name = attributeNames[ j ];\n\t\t\t\tvar attribute = geometry.getAttribute( name );\n\t\t\t\tvar itemSize = attribute.itemSize;\n\n\t\t\t\tfor ( var k = 0; k < itemSize; k ++ ) {\n\n\t\t\t\t\t// double tilde truncates the decimal value\n\t\t\t\t\thash += `${ ~ ~ ( attribute[ getters[ k ] ]( index ) * shiftMultiplier ) },`;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Add another reference to the vertex if it's already\n\t\t\t// used by another index\n\t\t\tif ( hash in hashToIndex ) {\n\n\t\t\t\tnewIndices.push( hashToIndex[ hash ] );\n\n\t\t\t} else {\n\n\t\t\t\t// copy data to the new index in the attribute arrays\n\t\t\t\tfor ( var j = 0, l = attributeNames.length; j < l; j ++ ) {\n\n\t\t\t\t\tvar name = attributeNames[ j ];\n\t\t\t\t\tvar attribute = geometry.getAttribute( name );\n\t\t\t\t\tvar morphAttr = geometry.morphAttributes[ name ];\n\t\t\t\t\tvar itemSize = attribute.itemSize;\n\t\t\t\t\tvar newarray = attrArrays[ name ];\n\t\t\t\t\tvar newMorphArrays = morphAttrsArrays[ name ];\n\n\t\t\t\t\tfor ( var k = 0; k < itemSize; k ++ ) {\n\n\t\t\t\t\t\tvar getterFunc = getters[ k ];\n\t\t\t\t\t\tnewarray.push( attribute[ getterFunc ]( index ) );\n\n\t\t\t\t\t\tif ( morphAttr ) {\n\n\t\t\t\t\t\t\tfor ( var m = 0, ml = morphAttr.length; m < ml; m ++ ) {\n\n\t\t\t\t\t\t\t\tnewMorphArrays[ m ].push( morphAttr[ m ][ getterFunc ]( index ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\thashToIndex[ hash ] = nextIndex;\n\t\t\t\tnewIndices.push( nextIndex );\n\t\t\t\tnextIndex ++;\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Generate typed arrays from new attribute arrays and update\n\t\t// the attributeBuffers\n\t\tconst result = geometry.clone();\n\t\tfor ( var i = 0, l = attributeNames.length; i < l; i ++ ) {\n\n\t\t\tvar name = attributeNames[ i ];\n\t\t\tvar oldAttribute = geometry.getAttribute( name );\n\n\t\t\tvar buffer = new oldAttribute.array.constructor( attrArrays[ name ] );\n\t\t\tvar attribute = new THREE.BufferAttribute( buffer, oldAttribute.itemSize, oldAttribute.normalized );\n\n\t\t\tresult.setAttribute( name, attribute );\n\n\t\t\t// Update the attribute arrays\n\t\t\tif ( name in morphAttrsArrays ) {\n\n\t\t\t\tfor ( var j = 0; j < morphAttrsArrays[ name ].length; j ++ ) {\n\n\t\t\t\t\tvar oldMorphAttribute = geometry.morphAttributes[ name ][ j ];\n\n\t\t\t\t\tvar buffer = new oldMorphAttribute.array.constructor( morphAttrsArrays[ name ][ j ] );\n\t\t\t\t\tvar morphAttribute = new THREE.BufferAttribute( buffer, oldMorphAttribute.itemSize, oldMorphAttribute.normalized );\n\t\t\t\t\tresult.morphAttributes[ name ][ j ] = morphAttribute;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t// indices\n\n\t\tresult.setIndex( newIndices );\n\n\t\treturn result;\n\n\t},\n\n\t/**\n\t * @param {THREE.BufferGeometry} geometry\n\t * @param {number} drawMode\n\t * @return {THREE.BufferGeometry>}\n\t */\n\ttoTrianglesDrawMode: function ( geometry, drawMode ) {\n\n\t\tif ( drawMode === THREE.TrianglesDrawMode ) {\n\n\t\t\tconsole.warn( 'THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles.' );\n\t\t\treturn geometry;\n\n\t\t}\n\n\t\tif ( drawMode === THREE.TriangleFanDrawMode || drawMode === THREE.TriangleStripDrawMode ) {\n\n\t\t\tvar index = geometry.getIndex();\n\n\t\t\t// generate index if not present\n\n\t\t\tif ( index === null ) {\n\n\t\t\t\tvar indices = [];\n\n\t\t\t\tvar position = geometry.getAttribute( 'position' );\n\n\t\t\t\tif ( position !== undefined ) {\n\n\t\t\t\t\tfor ( var i = 0; i < position.count; i ++ ) {\n\n\t\t\t\t\t\tindices.push( i );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tgeometry.setIndex( indices );\n\t\t\t\t\tindex = geometry.getIndex();\n\n\t\t\t\t} else {\n\n\t\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.' );\n\t\t\t\t\treturn geometry;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//\n\n\t\t\tvar numberOfTriangles = index.count - 2;\n\t\t\tvar newIndices = [];\n\n\t\t\tif ( drawMode === THREE.TriangleFanDrawMode ) {\n\n\t\t\t\t// gl.TRIANGLE_FAN\n\n\t\t\t\tfor ( var i = 1; i <= numberOfTriangles; i ++ ) {\n\n\t\t\t\t\tnewIndices.push( index.getX( 0 ) );\n\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t// gl.TRIANGLE_STRIP\n\n\t\t\t\tfor ( var i = 0; i < numberOfTriangles; i ++ ) {\n\n\t\t\t\t\tif ( i % 2 === 0 ) {\n\n\t\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\t\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\t\t\t\t\t\tnewIndices.push( index.getX( i + 2 ) );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tnewIndices.push( index.getX( i + 2 ) );\n\t\t\t\t\t\tnewIndices.push( index.getX( i + 1 ) );\n\t\t\t\t\t\tnewIndices.push( index.getX( i ) );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( ( newIndices.length / 3 ) !== numberOfTriangles ) {\n\n\t\t\t\tconsole.error( 'THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.' );\n\n\t\t\t}\n\n\t\t\t// build final geometry\n\n\t\t\tvar newGeometry = geometry.clone();\n\t\t\tnewGeometry.setIndex( newIndices );\n\t\t\tnewGeometry.clearGroups();\n\n\t\t\treturn newGeometry;\n\n\t\t} else {\n\n\t\t\tconsole.error( 'THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:', drawMode );\n\t\t\treturn geometry;\n\n\t\t}\n\n\t},\n\n\t/**\n\t * Calculates the morphed attributes of a morphed/skinned BufferGeometry.\n\t * Helpful for Raytracing or Decals.\n\t * @param {Mesh | Line | Points} object An instance of Mesh, Line or Points.\n\t * @return {Object} An Object with original position/normal attributes and morphed ones.\n\t */\n\tcomputeMorphedAttributes: function ( object ) {\n\n\t\tif ( object.geometry.isBufferGeometry !== true ) {\n\n\t\t\tconsole.error( 'THREE.BufferGeometryUtils: Geometry is not of type THREE.BufferGeometry.' );\n\t\t\treturn null;\n\n\t\t}\n\n\t\tvar _vA = new THREE.Vector3();\n\t\tvar _vB = new THREE.Vector3();\n\t\tvar _vC = new THREE.Vector3();\n\n\t\tvar _tempA = new THREE.Vector3();\n\t\tvar _tempB = new THREE.Vector3();\n\t\tvar _tempC = new THREE.Vector3();\n\n\t\tvar _morphA = new THREE.Vector3();\n\t\tvar _morphB = new THREE.Vector3();\n\t\tvar _morphC = new THREE.Vector3();\n\n\t\tfunction _calculateMorphedAttributeData(\n\t\t\tobject,\n\t\t\tmaterial,\n\t\t\tattribute,\n\t\t\tmorphAttribute,\n\t\t\tmorphTargetsRelative,\n\t\t\ta,\n\t\t\tb,\n\t\t\tc,\n\t\t\tmodifiedAttributeArray\n\t\t) {\n\n\t\t\t_vA.fromBufferAttribute( attribute, a );\n\t\t\t_vB.fromBufferAttribute( attribute, b );\n\t\t\t_vC.fromBufferAttribute( attribute, c );\n\n\t\t\tvar morphInfluences = object.morphTargetInfluences;\n\n\t\t\tif ( material.morphTargets && morphAttribute && morphInfluences ) {\n\n\t\t\t\t_morphA.set( 0, 0, 0 );\n\t\t\t\t_morphB.set( 0, 0, 0 );\n\t\t\t\t_morphC.set( 0, 0, 0 );\n\n\t\t\t\tfor ( var i = 0, il = morphAttribute.length; i < il; i ++ ) {\n\n\t\t\t\t\tvar influence = morphInfluences[ i ];\n\t\t\t\t\tvar morphAttribute = morphAttribute[ i ];\n\n\t\t\t\t\tif ( influence === 0 ) continue;\n\n\t\t\t\t\t_tempA.fromBufferAttribute( morphAttribute, a );\n\t\t\t\t\t_tempB.fromBufferAttribute( morphAttribute, b );\n\t\t\t\t\t_tempC.fromBufferAttribute( morphAttribute, c );\n\n\t\t\t\t\tif ( morphTargetsRelative ) {\n\n\t\t\t\t\t\t_morphA.addScaledVector( _tempA, influence );\n\t\t\t\t\t\t_morphB.addScaledVector( _tempB, influence );\n\t\t\t\t\t\t_morphC.addScaledVector( _tempC, influence );\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t_morphA.addScaledVector( _tempA.sub( _vA ), influence );\n\t\t\t\t\t\t_morphB.addScaledVector( _tempB.sub( _vB ), influence );\n\t\t\t\t\t\t_morphC.addScaledVector( _tempC.sub( _vC ), influence );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t_vA.add( _morphA );\n\t\t\t\t_vB.add( _morphB );\n\t\t\t\t_vC.add( _morphC );\n\n\t\t\t}\n\n\t\t\tif ( object.isSkinnedMesh ) {\n\n\t\t\t\tobject.boneTransform( a, _vA );\n\t\t\t\tobject.boneTransform( b, _vB );\n\t\t\t\tobject.boneTransform( c, _vC );\n\n\t\t\t}\n\n\t\t\tmodifiedAttributeArray[ a * 3 + 0 ] = _vA.x;\n\t\t\tmodifiedAttributeArray[ a * 3 + 1 ] = _vA.y;\n\t\t\tmodifiedAttributeArray[ a * 3 + 2 ] = _vA.z;\n\t\t\tmodifiedAttributeArray[ b * 3 + 0 ] = _vB.x;\n\t\t\tmodifiedAttributeArray[ b * 3 + 1 ] = _vB.y;\n\t\t\tmodifiedAttributeArray[ b * 3 + 2 ] = _vB.z;\n\t\t\tmodifiedAttributeArray[ c * 3 + 0 ] = _vC.x;\n\t\t\tmodifiedAttributeArray[ c * 3 + 1 ] = _vC.y;\n\t\t\tmodifiedAttributeArray[ c * 3 + 2 ] = _vC.z;\n\n\t\t}\n\n\t\tvar geometry = object.geometry;\n\t\tvar material = object.material;\n\n\t\tvar a, b, c;\n\t\tvar index = geometry.index;\n\t\tvar positionAttribute = geometry.attributes.position;\n\t\tvar morphPosition = geometry.morphAttributes.position;\n\t\tvar morphTargetsRelative = geometry.morphTargetsRelative;\n\t\tvar normalAttribute = geometry.attributes.normal;\n\t\tvar morphNormal = geometry.morphAttributes.position;\n\n\t\tvar groups = geometry.groups;\n\t\tvar drawRange = geometry.drawRange;\n\t\tvar i, j, il, jl;\n\t\tvar group, groupMaterial;\n\t\tvar start, end;\n\n\t\tvar modifiedPosition = new Float32Array( positionAttribute.count * positionAttribute.itemSize );\n\t\tvar modifiedNormal = new Float32Array( normalAttribute.count * normalAttribute.itemSize );\n\n\t\tif ( index !== null ) {\n\n\t\t\t// indexed buffer geometry\n\n\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\tfor ( i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\tgroup = groups[ i ];\n\t\t\t\t\tgroupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\tstart = Math.max( group.start, drawRange.start );\n\t\t\t\t\tend = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\tfor ( j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\ta = index.getX( j );\n\t\t\t\t\t\tb = index.getX( j + 1 );\n\t\t\t\t\t\tc = index.getX( j + 2 );\n\n\t\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\t\tobject,\n\t\t\t\t\t\t\tgroupMaterial,\n\t\t\t\t\t\t\tpositionAttribute,\n\t\t\t\t\t\t\tmorphPosition,\n\t\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\t\tmodifiedPosition\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\t\tobject,\n\t\t\t\t\t\t\tgroupMaterial,\n\t\t\t\t\t\t\tnormalAttribute,\n\t\t\t\t\t\t\tmorphNormal,\n\t\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\t\tmodifiedNormal\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstart = Math.max( 0, drawRange.start );\n\t\t\t\tend = Math.min( index.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\ta = index.getX( i );\n\t\t\t\t\tb = index.getX( i + 1 );\n\t\t\t\t\tc = index.getX( i + 2 );\n\n\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tmaterial,\n\t\t\t\t\t\tpositionAttribute,\n\t\t\t\t\t\tmorphPosition,\n\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\tmodifiedPosition\n\t\t\t\t\t);\n\n\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tmaterial,\n\t\t\t\t\t\tnormalAttribute,\n\t\t\t\t\t\tmorphNormal,\n\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\tmodifiedNormal\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else if ( positionAttribute !== undefined ) {\n\n\t\t\t// non-indexed buffer geometry\n\n\t\t\tif ( Array.isArray( material ) ) {\n\n\t\t\t\tfor ( i = 0, il = groups.length; i < il; i ++ ) {\n\n\t\t\t\t\tgroup = groups[ i ];\n\t\t\t\t\tgroupMaterial = material[ group.materialIndex ];\n\n\t\t\t\t\tstart = Math.max( group.start, drawRange.start );\n\t\t\t\t\tend = Math.min( ( group.start + group.count ), ( drawRange.start + drawRange.count ) );\n\n\t\t\t\t\tfor ( j = start, jl = end; j < jl; j += 3 ) {\n\n\t\t\t\t\t\ta = j;\n\t\t\t\t\t\tb = j + 1;\n\t\t\t\t\t\tc = j + 2;\n\n\t\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\t\tobject,\n\t\t\t\t\t\t\tgroupMaterial,\n\t\t\t\t\t\t\tpositionAttribute,\n\t\t\t\t\t\t\tmorphPosition,\n\t\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\t\tmodifiedPosition\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\t\tobject,\n\t\t\t\t\t\t\tgroupMaterial,\n\t\t\t\t\t\t\tnormalAttribute,\n\t\t\t\t\t\t\tmorphNormal,\n\t\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\t\tmodifiedNormal\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstart = Math.max( 0, drawRange.start );\n\t\t\t\tend = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );\n\n\t\t\t\tfor ( i = start, il = end; i < il; i += 3 ) {\n\n\t\t\t\t\ta = i;\n\t\t\t\t\tb = i + 1;\n\t\t\t\t\tc = i + 2;\n\n\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tmaterial,\n\t\t\t\t\t\tpositionAttribute,\n\t\t\t\t\t\tmorphPosition,\n\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\tmodifiedPosition\n\t\t\t\t\t);\n\n\t\t\t\t\t_calculateMorphedAttributeData(\n\t\t\t\t\t\tobject,\n\t\t\t\t\t\tmaterial,\n\t\t\t\t\t\tnormalAttribute,\n\t\t\t\t\t\tmorphNormal,\n\t\t\t\t\t\tmorphTargetsRelative,\n\t\t\t\t\t\ta, b, c,\n\t\t\t\t\t\tmodifiedNormal\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tvar morphedPositionAttribute = new THREE.Float32BufferAttribute( modifiedPosition, 3 );\n\t\tvar morphedNormalAttribute = new THREE.Float32BufferAttribute( modifiedNormal, 3 );\n\n\t\treturn {\n\n\t\t\tpositionAttribute: positionAttribute,\n\t\t\tnormalAttribute: normalAttribute,\n\t\t\tmorphedPositionAttribute: morphedPositionAttribute,\n\t\t\tmorphedNormalAttribute: morphedNormalAttribute\n\n\t\t};\n\n\t}\n\n};\n\n},{}],63:[function(_dereq_,module,exports){\nvar createLayout = _dereq_('layout-bmfont-text')\nvar inherits = _dereq_('inherits')\nvar createIndices = _dereq_('quad-indices')\nvar buffer = _dereq_('three-buffer-vertex-data')\nvar assign = _dereq_('object-assign')\n\nvar vertices = _dereq_('./lib/vertices')\nvar utils = _dereq_('./lib/utils')\n\nvar Base = THREE.BufferGeometry\n\nmodule.exports = function createTextGeometry (opt) {\n return new TextGeometry(opt)\n}\n\nfunction TextGeometry (opt) {\n Base.call(this)\n\n if (typeof opt === 'string') {\n opt = { text: opt }\n }\n\n // use these as default values for any subsequent\n // calls to update()\n this._opt = assign({}, opt)\n\n // also do an initial setup...\n if (opt) this.update(opt)\n}\n\ninherits(TextGeometry, Base)\n\nTextGeometry.prototype.update = function (opt) {\n if (typeof opt === 'string') {\n opt = { text: opt }\n }\n\n // use constructor defaults\n opt = assign({}, this._opt, opt)\n\n if (!opt.font) {\n throw new TypeError('must specify a { font } in options')\n }\n\n this.layout = createLayout(opt)\n\n // get vec2 texcoords\n var flipY = opt.flipY !== false\n\n // the desired BMFont data\n var font = opt.font\n\n // determine texture size from font file\n var texWidth = font.common.scaleW\n var texHeight = font.common.scaleH\n\n // get visible glyphs\n var glyphs = this.layout.glyphs.filter(function (glyph) {\n var bitmap = glyph.data\n return bitmap.width * bitmap.height > 0\n })\n\n // provide visible glyphs for convenience\n this.visibleGlyphs = glyphs\n\n // get common vertex data\n var positions = vertices.positions(glyphs)\n var uvs = vertices.uvs(glyphs, texWidth, texHeight, flipY)\n var indices = createIndices({\n clockwise: true,\n type: 'uint16',\n count: glyphs.length\n })\n\n // update vertex data\n buffer.index(this, indices, 1, 'uint16')\n buffer.attr(this, 'position', positions, 2)\n buffer.attr(this, 'uv', uvs, 2)\n\n // update multipage data\n if (!opt.multipage && 'page' in this.attributes) {\n // disable multipage rendering\n this.removeAttribute('page')\n } else if (opt.multipage) {\n var pages = vertices.pages(glyphs)\n // enable multipage rendering\n buffer.attr(this, 'page', pages, 1)\n }\n}\n\nTextGeometry.prototype.computeBoundingSphere = function () {\n if (this.boundingSphere === null) {\n this.boundingSphere = new THREE.Sphere()\n }\n\n var positions = this.attributes.position.array\n var itemSize = this.attributes.position.itemSize\n if (!positions || !itemSize || positions.length < 2) {\n this.boundingSphere.radius = 0\n this.boundingSphere.center.set(0, 0, 0)\n return\n }\n utils.computeSphere(positions, this.boundingSphere)\n if (isNaN(this.boundingSphere.radius)) {\n console.error('THREE.BufferGeometry.computeBoundingSphere(): ' +\n 'Computed radius is NaN. The ' +\n '\"position\" attribute is likely to have NaN values.')\n }\n}\n\nTextGeometry.prototype.computeBoundingBox = function () {\n if (this.boundingBox === null) {\n this.boundingBox = new THREE.Box3()\n }\n\n var bbox = this.boundingBox\n var positions = this.attributes.position.array\n var itemSize = this.attributes.position.itemSize\n if (!positions || !itemSize || positions.length < 2) {\n bbox.makeEmpty()\n return\n }\n utils.computeBox(positions, bbox)\n}\n\n},{\"./lib/utils\":64,\"./lib/vertices\":65,\"inherits\":30,\"layout-bmfont-text\":36,\"object-assign\":39,\"quad-indices\":51,\"three-buffer-vertex-data\":66}],64:[function(_dereq_,module,exports){\nvar itemSize = 2\nvar box = { min: [0, 0], max: [0, 0] }\n\nfunction bounds (positions) {\n var count = positions.length / itemSize\n box.min[0] = positions[0]\n box.min[1] = positions[1]\n box.max[0] = positions[0]\n box.max[1] = positions[1]\n\n for (var i = 0; i < count; i++) {\n var x = positions[i * itemSize + 0]\n var y = positions[i * itemSize + 1]\n box.min[0] = Math.min(x, box.min[0])\n box.min[1] = Math.min(y, box.min[1])\n box.max[0] = Math.max(x, box.max[0])\n box.max[1] = Math.max(y, box.max[1])\n }\n}\n\nmodule.exports.computeBox = function (positions, output) {\n bounds(positions)\n output.min.set(box.min[0], box.min[1], 0)\n output.max.set(box.max[0], box.max[1], 0)\n}\n\nmodule.exports.computeSphere = function (positions, output) {\n bounds(positions)\n var minX = box.min[0]\n var minY = box.min[1]\n var maxX = box.max[0]\n var maxY = box.max[1]\n var width = maxX - minX\n var height = maxY - minY\n var length = Math.sqrt(width * width + height * height)\n output.center.set(minX + width / 2, minY + height / 2, 0)\n output.radius = length / 2\n}\n\n},{}],65:[function(_dereq_,module,exports){\nmodule.exports.pages = function pages (glyphs) {\n var pages = new Float32Array(glyphs.length * 4 * 1)\n var i = 0\n glyphs.forEach(function (glyph) {\n var id = glyph.data.page || 0\n pages[i++] = id\n pages[i++] = id\n pages[i++] = id\n pages[i++] = id\n })\n return pages\n}\n\nmodule.exports.uvs = function uvs (glyphs, texWidth, texHeight, flipY) {\n var uvs = new Float32Array(glyphs.length * 4 * 2)\n var i = 0\n glyphs.forEach(function (glyph) {\n var bitmap = glyph.data\n var bw = (bitmap.x + bitmap.width)\n var bh = (bitmap.y + bitmap.height)\n\n // top left position\n var u0 = bitmap.x / texWidth\n var v1 = bitmap.y / texHeight\n var u1 = bw / texWidth\n var v0 = bh / texHeight\n\n if (flipY) {\n v1 = (texHeight - bitmap.y) / texHeight\n v0 = (texHeight - bh) / texHeight\n }\n\n // BL\n uvs[i++] = u0\n uvs[i++] = v1\n // TL\n uvs[i++] = u0\n uvs[i++] = v0\n // TR\n uvs[i++] = u1\n uvs[i++] = v0\n // BR\n uvs[i++] = u1\n uvs[i++] = v1\n })\n return uvs\n}\n\nmodule.exports.positions = function positions (glyphs) {\n var positions = new Float32Array(glyphs.length * 4 * 2)\n var i = 0\n glyphs.forEach(function (glyph) {\n var bitmap = glyph.data\n\n // bottom left position\n var x = glyph.position[0] + bitmap.xoffset\n var y = glyph.position[1] + bitmap.yoffset\n\n // quad size\n var w = bitmap.width\n var h = bitmap.height\n\n // BL\n positions[i++] = x\n positions[i++] = y\n // TL\n positions[i++] = x\n positions[i++] = y + h\n // TR\n positions[i++] = x + w\n positions[i++] = y + h\n // BR\n positions[i++] = x + w\n positions[i++] = y\n })\n return positions\n}\n\n},{}],66:[function(_dereq_,module,exports){\nvar flatten = _dereq_('flatten-vertex-data')\nvar warned = false;\n\nmodule.exports.attr = setAttribute\nmodule.exports.index = setIndex\n\nfunction setIndex (geometry, data, itemSize, dtype) {\n if (typeof itemSize !== 'number') itemSize = 1\n if (typeof dtype !== 'string') dtype = 'uint16'\n\n var isR69 = !geometry.index && typeof geometry.setIndex !== 'function'\n var attrib = isR69 ? geometry.getAttribute('index') : geometry.index\n var newAttrib = updateAttribute(attrib, data, itemSize, dtype)\n if (newAttrib) {\n if (isR69) geometry.addAttribute('index', newAttrib)\n else geometry.index = newAttrib\n }\n}\n\nfunction setAttribute (geometry, key, data, itemSize, dtype) {\n if (typeof itemSize !== 'number') itemSize = 3\n if (typeof dtype !== 'string') dtype = 'float32'\n if (Array.isArray(data) &&\n Array.isArray(data[0]) &&\n data[0].length !== itemSize) {\n throw new Error('Nested vertex array has unexpected size; expected ' +\n itemSize + ' but found ' + data[0].length)\n }\n\n var attrib = geometry.getAttribute(key)\n var newAttrib = updateAttribute(attrib, data, itemSize, dtype)\n geometry.setAttribute(key, newAttrib)\n}\n\nfunction updateAttribute (attrib, data, itemSize, dtype) {\n data = data || []\n\n // create a new array with desired type\n data = flatten(data, dtype)\n\n attrib = new THREE.BufferAttribute(data, itemSize);\n attrib.itemSize = itemSize;\n attrib.needsUpdate = true;\n\n return attrib\n}\n\n// Test whether the attribute needs to be re-created,\n// returns false if we can re-use it as-is.\nfunction rebuildAttribute (attrib, data, itemSize) {\n if (attrib.itemSize !== itemSize) return true\n if (!attrib.array) return true\n var attribLength = attrib.array.length\n if (Array.isArray(data) && Array.isArray(data[0])) {\n // [ [ x, y, z ] ]\n return attribLength !== data.length * itemSize\n } else {\n // [ x, y, z ]\n return attribLength !== data.length\n }\n return false\n}\n\n},{\"flatten-vertex-data\":23}],67:[function(_dereq_,module,exports){\n(function (setImmediate,clearImmediate){\nvar nextTick = _dereq_('process/browser.js').nextTick;\nvar apply = Function.prototype.apply;\nvar slice = Array.prototype.slice;\nvar immediateIds = {};\nvar nextImmediateId = 0;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) { timeout.close(); };\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// That's not how node.js implements it but the exposed api is the same.\nexports.setImmediate = typeof setImmediate === \"function\" ? setImmediate : function(fn) {\n var id = nextImmediateId++;\n var args = arguments.length < 2 ? false : slice.call(arguments, 1);\n\n immediateIds[id] = true;\n\n nextTick(function onNextTick() {\n if (immediateIds[id]) {\n // fn.call() is faster so we optimize for the common use-case\n // @see http://jsperf.com/call-apply-segu\n if (args) {\n fn.apply(null, args);\n } else {\n fn.call(null);\n }\n // Prevent ids from leaking\n exports.clearImmediate(id);\n }\n });\n\n return id;\n};\n\nexports.clearImmediate = typeof clearImmediate === \"function\" ? clearImmediate : function(id) {\n delete immediateIds[id];\n};\n}).call(this,_dereq_(\"timers\").setImmediate,_dereq_(\"timers\").clearImmediate)\n\n},{\"process/browser.js\":49,\"timers\":67}],68:[function(_dereq_,module,exports){\n(function (global){\n/**\n * @license\n * webvr-polyfill\n * Copyright (c) 2015-2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @license\n * cardboard-vr-display\n * Copyright (c) 2015-2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @license\n * webvr-polyfill-dpdb \n * Copyright (c) 2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @license\n * wglu-preserve-state\n * Copyright (c) 2016, Brandon Jones.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n/**\n * @license\n * nosleep.js\n * Copyright (c) 2017, Rich Tibbett\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.WebVRPolyfill = factory());\n}(this, (function () { 'use strict';\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\n\nfunction unwrapExports (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar isMobile = function isMobile() {\n return (/Android/i.test(navigator.userAgent) || /iPhone|iPad|iPod/i.test(navigator.userAgent)\n );\n};\nvar copyArray = function copyArray(source, dest) {\n for (var i = 0, n = source.length; i < n; i++) {\n dest[i] = source[i];\n }\n};\nvar extend = function extend(dest, src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dest[key] = src[key];\n }\n }\n return dest;\n};\n\nvar cardboardVrDisplay = createCommonjsModule(function (module, exports) {\n/**\n * @license\n * cardboard-vr-display\n * Copyright (c) 2015-2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @license\n * gl-preserve-state\n * Copyright (c) 2016, Brandon Jones.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/**\n * @license\n * webvr-polyfill-dpdb\n * Copyright (c) 2015-2017 Google\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @license\n * nosleep.js\n * Copyright (c) 2017, Rich Tibbett\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n(function (global, factory) {\n\tmodule.exports = factory();\n}(commonjsGlobal, (function () { var classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\nvar slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\nvar MIN_TIMESTEP = 0.001;\nvar MAX_TIMESTEP = 1;\nvar dataUri = function dataUri(mimeType, svg) {\n return 'data:' + mimeType + ',' + encodeURIComponent(svg);\n};\nvar lerp = function lerp(a, b, t) {\n return a + (b - a) * t;\n};\nvar isIOS = function () {\n var isIOS = /iPad|iPhone|iPod/.test(navigator.platform);\n return function () {\n return isIOS;\n };\n}();\nvar isWebViewAndroid = function () {\n var isWebViewAndroid = navigator.userAgent.indexOf('Version') !== -1 && navigator.userAgent.indexOf('Android') !== -1 && navigator.userAgent.indexOf('Chrome') !== -1;\n return function () {\n return isWebViewAndroid;\n };\n}();\nvar isSafari = function () {\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n return function () {\n return isSafari;\n };\n}();\nvar isFirefoxAndroid = function () {\n var isFirefoxAndroid = navigator.userAgent.indexOf('Firefox') !== -1 && navigator.userAgent.indexOf('Android') !== -1;\n return function () {\n return isFirefoxAndroid;\n };\n}();\nvar getChromeVersion = function () {\n var match = navigator.userAgent.match(/.*Chrome\\/([0-9]+)/);\n var value = match ? parseInt(match[1], 10) : null;\n return function () {\n return value;\n };\n}();\nvar isSafariWithoutDeviceMotion = function () {\n var value = false;\n value = isIOS() && isSafari() && navigator.userAgent.indexOf('13_4') !== -1;\n return function () {\n return value;\n };\n}();\nvar isChromeWithoutDeviceMotion = function () {\n var value = false;\n if (getChromeVersion() === 65) {\n var match = navigator.userAgent.match(/.*Chrome\\/([0-9\\.]*)/);\n if (match) {\n var _match$1$split = match[1].split('.'),\n _match$1$split2 = slicedToArray(_match$1$split, 4),\n major = _match$1$split2[0],\n minor = _match$1$split2[1],\n branch = _match$1$split2[2],\n build = _match$1$split2[3];\n value = parseInt(branch, 10) === 3325 && parseInt(build, 10) < 148;\n }\n }\n return function () {\n return value;\n };\n}();\nvar isR7 = function () {\n var isR7 = navigator.userAgent.indexOf('R7 Build') !== -1;\n return function () {\n return isR7;\n };\n}();\nvar isLandscapeMode = function isLandscapeMode() {\n var rtn = window.orientation == 90 || window.orientation == -90;\n return isR7() ? !rtn : rtn;\n};\nvar isTimestampDeltaValid = function isTimestampDeltaValid(timestampDeltaS) {\n if (isNaN(timestampDeltaS)) {\n return false;\n }\n if (timestampDeltaS <= MIN_TIMESTEP) {\n return false;\n }\n if (timestampDeltaS > MAX_TIMESTEP) {\n return false;\n }\n return true;\n};\nvar getScreenWidth = function getScreenWidth() {\n return Math.max(window.screen.width, window.screen.height) * window.devicePixelRatio;\n};\nvar getScreenHeight = function getScreenHeight() {\n return Math.min(window.screen.width, window.screen.height) * window.devicePixelRatio;\n};\nvar requestFullscreen = function requestFullscreen(element) {\n if (isWebViewAndroid()) {\n return false;\n }\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element.webkitRequestFullscreen) {\n element.webkitRequestFullscreen();\n } else if (element.mozRequestFullScreen) {\n element.mozRequestFullScreen();\n } else if (element.msRequestFullscreen) {\n element.msRequestFullscreen();\n } else {\n return false;\n }\n return true;\n};\nvar exitFullscreen = function exitFullscreen() {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n } else {\n return false;\n }\n return true;\n};\nvar getFullscreenElement = function getFullscreenElement() {\n return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n};\nvar linkProgram = function linkProgram(gl, vertexSource, fragmentSource, attribLocationMap) {\n var vertexShader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(vertexShader, vertexSource);\n gl.compileShader(vertexShader);\n var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);\n gl.shaderSource(fragmentShader, fragmentSource);\n gl.compileShader(fragmentShader);\n var program = gl.createProgram();\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n for (var attribName in attribLocationMap) {\n gl.bindAttribLocation(program, attribLocationMap[attribName], attribName);\n }gl.linkProgram(program);\n gl.deleteShader(vertexShader);\n gl.deleteShader(fragmentShader);\n return program;\n};\nvar getProgramUniforms = function getProgramUniforms(gl, program) {\n var uniforms = {};\n var uniformCount = gl.getProgramParameter(program, gl.ACTIVE_UNIFORMS);\n var uniformName = '';\n for (var i = 0; i < uniformCount; i++) {\n var uniformInfo = gl.getActiveUniform(program, i);\n uniformName = uniformInfo.name.replace('[0]', '');\n uniforms[uniformName] = gl.getUniformLocation(program, uniformName);\n }\n return uniforms;\n};\nvar orthoMatrix = function orthoMatrix(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n};\nvar isMobile = function isMobile() {\n var check = false;\n (function (a) {\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) check = true;\n })(navigator.userAgent || navigator.vendor || window.opera);\n return check;\n};\nvar extend = function extend(dest, src) {\n for (var key in src) {\n if (src.hasOwnProperty(key)) {\n dest[key] = src[key];\n }\n }\n return dest;\n};\nvar safariCssSizeWorkaround = function safariCssSizeWorkaround(canvas) {\n if (isIOS()) {\n var width = canvas.style.width;\n var height = canvas.style.height;\n canvas.style.width = parseInt(width) + 1 + 'px';\n canvas.style.height = parseInt(height) + 'px';\n setTimeout(function () {\n canvas.style.width = width;\n canvas.style.height = height;\n }, 100);\n }\n window.canvas = canvas;\n};\nvar frameDataFromPose = function () {\n var piOver180 = Math.PI / 180.0;\n var rad45 = Math.PI * 0.25;\n function mat4_perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov ? fov.upDegrees * piOver180 : rad45),\n downTan = Math.tan(fov ? fov.downDegrees * piOver180 : rad45),\n leftTan = Math.tan(fov ? fov.leftDegrees * piOver180 : rad45),\n rightTan = Math.tan(fov ? fov.rightDegrees * piOver180 : rad45),\n xScale = 2.0 / (leftTan + rightTan),\n yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n }\n function mat4_fromRotationTranslation(out, q, v) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3],\n x2 = x + x,\n y2 = y + y,\n z2 = z + z,\n xx = x * x2,\n xy = x * y2,\n xz = x * z2,\n yy = y * y2,\n yz = y * z2,\n zz = z * z2,\n wx = w * x2,\n wy = w * y2,\n wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n }\n function mat4_translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2],\n a00,\n a01,\n a02,\n a03,\n a10,\n a11,\n a12,\n a13,\n a20,\n a21,\n a22,\n a23;\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];a01 = a[1];a02 = a[2];a03 = a[3];\n a10 = a[4];a11 = a[5];a12 = a[6];a13 = a[7];\n a20 = a[8];a21 = a[9];a22 = a[10];a23 = a[11];\n out[0] = a00;out[1] = a01;out[2] = a02;out[3] = a03;\n out[4] = a10;out[5] = a11;out[6] = a12;out[7] = a13;\n out[8] = a20;out[9] = a21;out[10] = a22;out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n return out;\n }\n function mat4_invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3],\n a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7],\n a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11],\n a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15],\n b00 = a00 * a11 - a01 * a10,\n b01 = a00 * a12 - a02 * a10,\n b02 = a00 * a13 - a03 * a10,\n b03 = a01 * a12 - a02 * a11,\n b04 = a01 * a13 - a03 * a11,\n b05 = a02 * a13 - a03 * a12,\n b06 = a20 * a31 - a21 * a30,\n b07 = a20 * a32 - a22 * a30,\n b08 = a20 * a33 - a23 * a30,\n b09 = a21 * a32 - a22 * a31,\n b10 = a21 * a33 - a23 * a31,\n b11 = a22 * a33 - a23 * a32,\n det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n }\n var defaultOrientation = new Float32Array([0, 0, 0, 1]);\n var defaultPosition = new Float32Array([0, 0, 0]);\n function updateEyeMatrices(projection, view, pose, fov, offset, vrDisplay) {\n mat4_perspectiveFromFieldOfView(projection, fov || null, vrDisplay.depthNear, vrDisplay.depthFar);\n var orientation = pose.orientation || defaultOrientation;\n var position = pose.position || defaultPosition;\n mat4_fromRotationTranslation(view, orientation, position);\n if (offset) mat4_translate(view, view, offset);\n mat4_invert(view, view);\n }\n return function (frameData, pose, vrDisplay) {\n if (!frameData || !pose) return false;\n frameData.pose = pose;\n frameData.timestamp = pose.timestamp;\n updateEyeMatrices(frameData.leftProjectionMatrix, frameData.leftViewMatrix, pose, vrDisplay._getFieldOfView(\"left\"), vrDisplay._getEyeOffset(\"left\"), vrDisplay);\n updateEyeMatrices(frameData.rightProjectionMatrix, frameData.rightViewMatrix, pose, vrDisplay._getFieldOfView(\"right\"), vrDisplay._getEyeOffset(\"right\"), vrDisplay);\n return true;\n };\n}();\nvar isInsideCrossOriginIFrame = function isInsideCrossOriginIFrame() {\n var isFramed = window.self !== window.top;\n var refOrigin = getOriginFromUrl(document.referrer);\n var thisOrigin = getOriginFromUrl(window.location.href);\n return isFramed && refOrigin !== thisOrigin;\n};\nvar getOriginFromUrl = function getOriginFromUrl(url) {\n var domainIdx;\n var protoSepIdx = url.indexOf(\"://\");\n if (protoSepIdx !== -1) {\n domainIdx = protoSepIdx + 3;\n } else {\n domainIdx = 0;\n }\n var domainEndIdx = url.indexOf('/', domainIdx);\n if (domainEndIdx === -1) {\n domainEndIdx = url.length;\n }\n return url.substring(0, domainEndIdx);\n};\nvar getQuaternionAngle = function getQuaternionAngle(quat) {\n if (quat.w > 1) {\n console.warn('getQuaternionAngle: w > 1');\n return 0;\n }\n var angle = 2 * Math.acos(quat.w);\n return angle;\n};\nvar warnOnce = function () {\n var observedWarnings = {};\n return function (key, message) {\n if (observedWarnings[key] === undefined) {\n console.warn('webvr-polyfill: ' + message);\n observedWarnings[key] = true;\n }\n };\n}();\nvar deprecateWarning = function deprecateWarning(deprecated, suggested) {\n var alternative = suggested ? 'Please use ' + suggested + ' instead.' : '';\n warnOnce(deprecated, deprecated + ' has been deprecated. ' + 'This may not work on native WebVR displays. ' + alternative);\n};\nfunction WGLUPreserveGLState(gl, bindings, callback) {\n if (!bindings) {\n callback(gl);\n return;\n }\n var boundValues = [];\n var activeTexture = null;\n for (var i = 0; i < bindings.length; ++i) {\n var binding = bindings[i];\n switch (binding) {\n case gl.TEXTURE_BINDING_2D:\n case gl.TEXTURE_BINDING_CUBE_MAP:\n var textureUnit = bindings[++i];\n if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31) {\n console.error(\"TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit\");\n boundValues.push(null, null);\n break;\n }\n if (!activeTexture) {\n activeTexture = gl.getParameter(gl.ACTIVE_TEXTURE);\n }\n gl.activeTexture(textureUnit);\n boundValues.push(gl.getParameter(binding), null);\n break;\n case gl.ACTIVE_TEXTURE:\n activeTexture = gl.getParameter(gl.ACTIVE_TEXTURE);\n boundValues.push(null);\n break;\n default:\n boundValues.push(gl.getParameter(binding));\n break;\n }\n }\n callback(gl);\n for (var i = 0; i < bindings.length; ++i) {\n var binding = bindings[i];\n var boundValue = boundValues[i];\n switch (binding) {\n case gl.ACTIVE_TEXTURE:\n break;\n case gl.ARRAY_BUFFER_BINDING:\n gl.bindBuffer(gl.ARRAY_BUFFER, boundValue);\n break;\n case gl.COLOR_CLEAR_VALUE:\n gl.clearColor(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);\n break;\n case gl.COLOR_WRITEMASK:\n gl.colorMask(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);\n break;\n case gl.CURRENT_PROGRAM:\n gl.useProgram(boundValue);\n break;\n case gl.ELEMENT_ARRAY_BUFFER_BINDING:\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, boundValue);\n break;\n case gl.FRAMEBUFFER_BINDING:\n gl.bindFramebuffer(gl.FRAMEBUFFER, boundValue);\n break;\n case gl.RENDERBUFFER_BINDING:\n gl.bindRenderbuffer(gl.RENDERBUFFER, boundValue);\n break;\n case gl.TEXTURE_BINDING_2D:\n var textureUnit = bindings[++i];\n if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31)\n break;\n gl.activeTexture(textureUnit);\n gl.bindTexture(gl.TEXTURE_2D, boundValue);\n break;\n case gl.TEXTURE_BINDING_CUBE_MAP:\n var textureUnit = bindings[++i];\n if (textureUnit < gl.TEXTURE0 || textureUnit > gl.TEXTURE31)\n break;\n gl.activeTexture(textureUnit);\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, boundValue);\n break;\n case gl.VIEWPORT:\n gl.viewport(boundValue[0], boundValue[1], boundValue[2], boundValue[3]);\n break;\n case gl.BLEND:\n case gl.CULL_FACE:\n case gl.DEPTH_TEST:\n case gl.SCISSOR_TEST:\n case gl.STENCIL_TEST:\n if (boundValue) {\n gl.enable(binding);\n } else {\n gl.disable(binding);\n }\n break;\n default:\n console.log(\"No GL restore behavior for 0x\" + binding.toString(16));\n break;\n }\n if (activeTexture) {\n gl.activeTexture(activeTexture);\n }\n }\n}\nvar glPreserveState = WGLUPreserveGLState;\nvar distortionVS = ['attribute vec2 position;', 'attribute vec3 texCoord;', 'varying vec2 vTexCoord;', 'uniform vec4 viewportOffsetScale[2];', 'void main() {', ' vec4 viewport = viewportOffsetScale[int(texCoord.z)];', ' vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;', ' gl_Position = vec4( position, 1.0, 1.0 );', '}'].join('\\n');\nvar distortionFS = ['precision mediump float;', 'uniform sampler2D diffuse;', 'varying vec2 vTexCoord;', 'void main() {', ' gl_FragColor = texture2D(diffuse, vTexCoord);', '}'].join('\\n');\nfunction CardboardDistorter(gl, cardboardUI, bufferScale, dirtySubmitFrameBindings) {\n this.gl = gl;\n this.cardboardUI = cardboardUI;\n this.bufferScale = bufferScale;\n this.dirtySubmitFrameBindings = dirtySubmitFrameBindings;\n this.ctxAttribs = gl.getContextAttributes();\n this.instanceExt = gl.getExtension('ANGLE_instanced_arrays');\n this.meshWidth = 20;\n this.meshHeight = 20;\n this.bufferWidth = gl.drawingBufferWidth;\n this.bufferHeight = gl.drawingBufferHeight;\n this.realBindFramebuffer = gl.bindFramebuffer;\n this.realEnable = gl.enable;\n this.realDisable = gl.disable;\n this.realColorMask = gl.colorMask;\n this.realClearColor = gl.clearColor;\n this.realViewport = gl.viewport;\n if (!isIOS()) {\n this.realCanvasWidth = Object.getOwnPropertyDescriptor(gl.canvas.__proto__, 'width');\n this.realCanvasHeight = Object.getOwnPropertyDescriptor(gl.canvas.__proto__, 'height');\n }\n this.isPatched = false;\n this.lastBoundFramebuffer = null;\n this.cullFace = false;\n this.depthTest = false;\n this.blend = false;\n this.scissorTest = false;\n this.stencilTest = false;\n this.viewport = [0, 0, 0, 0];\n this.colorMask = [true, true, true, true];\n this.clearColor = [0, 0, 0, 0];\n this.attribs = {\n position: 0,\n texCoord: 1\n };\n this.program = linkProgram(gl, distortionVS, distortionFS, this.attribs);\n this.uniforms = getProgramUniforms(gl, this.program);\n this.viewportOffsetScale = new Float32Array(8);\n this.setTextureBounds();\n this.vertexBuffer = gl.createBuffer();\n this.indexBuffer = gl.createBuffer();\n this.indexCount = 0;\n this.renderTarget = gl.createTexture();\n this.framebuffer = gl.createFramebuffer();\n this.depthStencilBuffer = null;\n this.depthBuffer = null;\n this.stencilBuffer = null;\n if (this.ctxAttribs.depth && this.ctxAttribs.stencil) {\n this.depthStencilBuffer = gl.createRenderbuffer();\n } else if (this.ctxAttribs.depth) {\n this.depthBuffer = gl.createRenderbuffer();\n } else if (this.ctxAttribs.stencil) {\n this.stencilBuffer = gl.createRenderbuffer();\n }\n this.patch();\n this.onResize();\n}\nCardboardDistorter.prototype.destroy = function () {\n var gl = this.gl;\n this.unpatch();\n gl.deleteProgram(this.program);\n gl.deleteBuffer(this.vertexBuffer);\n gl.deleteBuffer(this.indexBuffer);\n gl.deleteTexture(this.renderTarget);\n gl.deleteFramebuffer(this.framebuffer);\n if (this.depthStencilBuffer) {\n gl.deleteRenderbuffer(this.depthStencilBuffer);\n }\n if (this.depthBuffer) {\n gl.deleteRenderbuffer(this.depthBuffer);\n }\n if (this.stencilBuffer) {\n gl.deleteRenderbuffer(this.stencilBuffer);\n }\n if (this.cardboardUI) {\n this.cardboardUI.destroy();\n }\n};\nCardboardDistorter.prototype.onResize = function () {\n var gl = this.gl;\n var self = this;\n var glState = [gl.RENDERBUFFER_BINDING, gl.TEXTURE_BINDING_2D, gl.TEXTURE0];\n glPreserveState(gl, glState, function (gl) {\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, null);\n if (self.scissorTest) {\n self.realDisable.call(gl, gl.SCISSOR_TEST);\n }\n self.realColorMask.call(gl, true, true, true, true);\n self.realViewport.call(gl, 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n self.realClearColor.call(gl, 0, 0, 0, 1);\n gl.clear(gl.COLOR_BUFFER_BIT);\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.framebuffer);\n gl.bindTexture(gl.TEXTURE_2D, self.renderTarget);\n gl.texImage2D(gl.TEXTURE_2D, 0, self.ctxAttribs.alpha ? gl.RGBA : gl.RGB, self.bufferWidth, self.bufferHeight, 0, self.ctxAttribs.alpha ? gl.RGBA : gl.RGB, gl.UNSIGNED_BYTE, null);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, self.renderTarget, 0);\n if (self.ctxAttribs.depth && self.ctxAttribs.stencil) {\n gl.bindRenderbuffer(gl.RENDERBUFFER, self.depthStencilBuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, self.bufferWidth, self.bufferHeight);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, self.depthStencilBuffer);\n } else if (self.ctxAttribs.depth) {\n gl.bindRenderbuffer(gl.RENDERBUFFER, self.depthBuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, self.bufferWidth, self.bufferHeight);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.RENDERBUFFER, self.depthBuffer);\n } else if (self.ctxAttribs.stencil) {\n gl.bindRenderbuffer(gl.RENDERBUFFER, self.stencilBuffer);\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.STENCIL_INDEX8, self.bufferWidth, self.bufferHeight);\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.RENDERBUFFER, self.stencilBuffer);\n }\n if (!gl.checkFramebufferStatus(gl.FRAMEBUFFER) === gl.FRAMEBUFFER_COMPLETE) {\n console.error('Framebuffer incomplete!');\n }\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.lastBoundFramebuffer);\n if (self.scissorTest) {\n self.realEnable.call(gl, gl.SCISSOR_TEST);\n }\n self.realColorMask.apply(gl, self.colorMask);\n self.realViewport.apply(gl, self.viewport);\n self.realClearColor.apply(gl, self.clearColor);\n });\n if (this.cardboardUI) {\n this.cardboardUI.onResize();\n }\n};\nCardboardDistorter.prototype.patch = function () {\n if (this.isPatched) {\n return;\n }\n var self = this;\n var canvas = this.gl.canvas;\n var gl = this.gl;\n if (!isIOS()) {\n canvas.width = getScreenWidth() * this.bufferScale;\n canvas.height = getScreenHeight() * this.bufferScale;\n Object.defineProperty(canvas, 'width', {\n configurable: true,\n enumerable: true,\n get: function get() {\n return self.bufferWidth;\n },\n set: function set(value) {\n self.bufferWidth = value;\n self.realCanvasWidth.set.call(canvas, value);\n self.onResize();\n }\n });\n Object.defineProperty(canvas, 'height', {\n configurable: true,\n enumerable: true,\n get: function get() {\n return self.bufferHeight;\n },\n set: function set(value) {\n self.bufferHeight = value;\n self.realCanvasHeight.set.call(canvas, value);\n self.onResize();\n }\n });\n }\n this.lastBoundFramebuffer = gl.getParameter(gl.FRAMEBUFFER_BINDING);\n if (this.lastBoundFramebuffer == null) {\n this.lastBoundFramebuffer = this.framebuffer;\n this.gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);\n }\n this.gl.bindFramebuffer = function (target, framebuffer) {\n self.lastBoundFramebuffer = framebuffer ? framebuffer : self.framebuffer;\n self.realBindFramebuffer.call(gl, target, self.lastBoundFramebuffer);\n };\n this.cullFace = gl.getParameter(gl.CULL_FACE);\n this.depthTest = gl.getParameter(gl.DEPTH_TEST);\n this.blend = gl.getParameter(gl.BLEND);\n this.scissorTest = gl.getParameter(gl.SCISSOR_TEST);\n this.stencilTest = gl.getParameter(gl.STENCIL_TEST);\n gl.enable = function (pname) {\n switch (pname) {\n case gl.CULL_FACE:\n self.cullFace = true;break;\n case gl.DEPTH_TEST:\n self.depthTest = true;break;\n case gl.BLEND:\n self.blend = true;break;\n case gl.SCISSOR_TEST:\n self.scissorTest = true;break;\n case gl.STENCIL_TEST:\n self.stencilTest = true;break;\n }\n self.realEnable.call(gl, pname);\n };\n gl.disable = function (pname) {\n switch (pname) {\n case gl.CULL_FACE:\n self.cullFace = false;break;\n case gl.DEPTH_TEST:\n self.depthTest = false;break;\n case gl.BLEND:\n self.blend = false;break;\n case gl.SCISSOR_TEST:\n self.scissorTest = false;break;\n case gl.STENCIL_TEST:\n self.stencilTest = false;break;\n }\n self.realDisable.call(gl, pname);\n };\n this.colorMask = gl.getParameter(gl.COLOR_WRITEMASK);\n gl.colorMask = function (r, g, b, a) {\n self.colorMask[0] = r;\n self.colorMask[1] = g;\n self.colorMask[2] = b;\n self.colorMask[3] = a;\n self.realColorMask.call(gl, r, g, b, a);\n };\n this.clearColor = gl.getParameter(gl.COLOR_CLEAR_VALUE);\n gl.clearColor = function (r, g, b, a) {\n self.clearColor[0] = r;\n self.clearColor[1] = g;\n self.clearColor[2] = b;\n self.clearColor[3] = a;\n self.realClearColor.call(gl, r, g, b, a);\n };\n this.viewport = gl.getParameter(gl.VIEWPORT);\n gl.viewport = function (x, y, w, h) {\n self.viewport[0] = x;\n self.viewport[1] = y;\n self.viewport[2] = w;\n self.viewport[3] = h;\n self.realViewport.call(gl, x, y, w, h);\n };\n this.isPatched = true;\n safariCssSizeWorkaround(canvas);\n};\nCardboardDistorter.prototype.unpatch = function () {\n if (!this.isPatched) {\n return;\n }\n var gl = this.gl;\n var canvas = this.gl.canvas;\n if (!isIOS()) {\n Object.defineProperty(canvas, 'width', this.realCanvasWidth);\n Object.defineProperty(canvas, 'height', this.realCanvasHeight);\n }\n canvas.width = this.bufferWidth;\n canvas.height = this.bufferHeight;\n gl.bindFramebuffer = this.realBindFramebuffer;\n gl.enable = this.realEnable;\n gl.disable = this.realDisable;\n gl.colorMask = this.realColorMask;\n gl.clearColor = this.realClearColor;\n gl.viewport = this.realViewport;\n if (this.lastBoundFramebuffer == this.framebuffer) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n }\n this.isPatched = false;\n setTimeout(function () {\n safariCssSizeWorkaround(canvas);\n }, 1);\n};\nCardboardDistorter.prototype.setTextureBounds = function (leftBounds, rightBounds) {\n if (!leftBounds) {\n leftBounds = [0, 0, 0.5, 1];\n }\n if (!rightBounds) {\n rightBounds = [0.5, 0, 0.5, 1];\n }\n this.viewportOffsetScale[0] = leftBounds[0];\n this.viewportOffsetScale[1] = leftBounds[1];\n this.viewportOffsetScale[2] = leftBounds[2];\n this.viewportOffsetScale[3] = leftBounds[3];\n this.viewportOffsetScale[4] = rightBounds[0];\n this.viewportOffsetScale[5] = rightBounds[1];\n this.viewportOffsetScale[6] = rightBounds[2];\n this.viewportOffsetScale[7] = rightBounds[3];\n};\nCardboardDistorter.prototype.submitFrame = function () {\n var gl = this.gl;\n var self = this;\n var glState = [];\n if (!this.dirtySubmitFrameBindings) {\n glState.push(gl.CURRENT_PROGRAM, gl.ARRAY_BUFFER_BINDING, gl.ELEMENT_ARRAY_BUFFER_BINDING, gl.TEXTURE_BINDING_2D, gl.TEXTURE0);\n }\n glPreserveState(gl, glState, function (gl) {\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, null);\n var positionDivisor = 0;\n var texCoordDivisor = 0;\n if (self.instanceExt) {\n positionDivisor = gl.getVertexAttrib(self.attribs.position, self.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);\n texCoordDivisor = gl.getVertexAttrib(self.attribs.texCoord, self.instanceExt.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE);\n }\n if (self.cullFace) {\n self.realDisable.call(gl, gl.CULL_FACE);\n }\n if (self.depthTest) {\n self.realDisable.call(gl, gl.DEPTH_TEST);\n }\n if (self.blend) {\n self.realDisable.call(gl, gl.BLEND);\n }\n if (self.scissorTest) {\n self.realDisable.call(gl, gl.SCISSOR_TEST);\n }\n if (self.stencilTest) {\n self.realDisable.call(gl, gl.STENCIL_TEST);\n }\n self.realColorMask.call(gl, true, true, true, true);\n self.realViewport.call(gl, 0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n if (self.ctxAttribs.alpha || isIOS()) {\n self.realClearColor.call(gl, 0, 0, 0, 1);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n gl.useProgram(self.program);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, self.indexBuffer);\n gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);\n gl.enableVertexAttribArray(self.attribs.position);\n gl.enableVertexAttribArray(self.attribs.texCoord);\n gl.vertexAttribPointer(self.attribs.position, 2, gl.FLOAT, false, 20, 0);\n gl.vertexAttribPointer(self.attribs.texCoord, 3, gl.FLOAT, false, 20, 8);\n if (self.instanceExt) {\n if (positionDivisor != 0) {\n self.instanceExt.vertexAttribDivisorANGLE(self.attribs.position, 0);\n }\n if (texCoordDivisor != 0) {\n self.instanceExt.vertexAttribDivisorANGLE(self.attribs.texCoord, 0);\n }\n }\n gl.activeTexture(gl.TEXTURE0);\n gl.uniform1i(self.uniforms.diffuse, 0);\n gl.bindTexture(gl.TEXTURE_2D, self.renderTarget);\n gl.uniform4fv(self.uniforms.viewportOffsetScale, self.viewportOffsetScale);\n gl.drawElements(gl.TRIANGLES, self.indexCount, gl.UNSIGNED_SHORT, 0);\n if (self.cardboardUI) {\n self.cardboardUI.renderNoState();\n }\n self.realBindFramebuffer.call(self.gl, gl.FRAMEBUFFER, self.framebuffer);\n if (!self.ctxAttribs.preserveDrawingBuffer) {\n self.realClearColor.call(gl, 0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n }\n if (!self.dirtySubmitFrameBindings) {\n self.realBindFramebuffer.call(gl, gl.FRAMEBUFFER, self.lastBoundFramebuffer);\n }\n if (self.cullFace) {\n self.realEnable.call(gl, gl.CULL_FACE);\n }\n if (self.depthTest) {\n self.realEnable.call(gl, gl.DEPTH_TEST);\n }\n if (self.blend) {\n self.realEnable.call(gl, gl.BLEND);\n }\n if (self.scissorTest) {\n self.realEnable.call(gl, gl.SCISSOR_TEST);\n }\n if (self.stencilTest) {\n self.realEnable.call(gl, gl.STENCIL_TEST);\n }\n self.realColorMask.apply(gl, self.colorMask);\n self.realViewport.apply(gl, self.viewport);\n if (self.ctxAttribs.alpha || !self.ctxAttribs.preserveDrawingBuffer) {\n self.realClearColor.apply(gl, self.clearColor);\n }\n if (self.instanceExt) {\n if (positionDivisor != 0) {\n self.instanceExt.vertexAttribDivisorANGLE(self.attribs.position, positionDivisor);\n }\n if (texCoordDivisor != 0) {\n self.instanceExt.vertexAttribDivisorANGLE(self.attribs.texCoord, texCoordDivisor);\n }\n }\n });\n if (isIOS()) {\n var canvas = gl.canvas;\n if (canvas.width != self.bufferWidth || canvas.height != self.bufferHeight) {\n self.bufferWidth = canvas.width;\n self.bufferHeight = canvas.height;\n self.onResize();\n }\n }\n};\nCardboardDistorter.prototype.updateDeviceInfo = function (deviceInfo) {\n var gl = this.gl;\n var self = this;\n var glState = [gl.ARRAY_BUFFER_BINDING, gl.ELEMENT_ARRAY_BUFFER_BINDING];\n glPreserveState(gl, glState, function (gl) {\n var vertices = self.computeMeshVertices_(self.meshWidth, self.meshHeight, deviceInfo);\n gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);\n if (!self.indexCount) {\n var indices = self.computeMeshIndices_(self.meshWidth, self.meshHeight);\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, self.indexBuffer);\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);\n self.indexCount = indices.length;\n }\n });\n};\nCardboardDistorter.prototype.computeMeshVertices_ = function (width, height, deviceInfo) {\n var vertices = new Float32Array(2 * width * height * 5);\n var lensFrustum = deviceInfo.getLeftEyeVisibleTanAngles();\n var noLensFrustum = deviceInfo.getLeftEyeNoLensTanAngles();\n var viewport = deviceInfo.getLeftEyeVisibleScreenRect(noLensFrustum);\n var vidx = 0;\n for (var e = 0; e < 2; e++) {\n for (var j = 0; j < height; j++) {\n for (var i = 0; i < width; i++, vidx++) {\n var u = i / (width - 1);\n var v = j / (height - 1);\n var s = u;\n var t = v;\n var x = lerp(lensFrustum[0], lensFrustum[2], u);\n var y = lerp(lensFrustum[3], lensFrustum[1], v);\n var d = Math.sqrt(x * x + y * y);\n var r = deviceInfo.distortion.distortInverse(d);\n var p = x * r / d;\n var q = y * r / d;\n u = (p - noLensFrustum[0]) / (noLensFrustum[2] - noLensFrustum[0]);\n v = (q - noLensFrustum[3]) / (noLensFrustum[1] - noLensFrustum[3]);\n u = (viewport.x + u * viewport.width - 0.5) * 2.0;\n v = (viewport.y + v * viewport.height - 0.5) * 2.0;\n vertices[vidx * 5 + 0] = u;\n vertices[vidx * 5 + 1] = v;\n vertices[vidx * 5 + 2] = s;\n vertices[vidx * 5 + 3] = t;\n vertices[vidx * 5 + 4] = e;\n }\n }\n var w = lensFrustum[2] - lensFrustum[0];\n lensFrustum[0] = -(w + lensFrustum[0]);\n lensFrustum[2] = w - lensFrustum[2];\n w = noLensFrustum[2] - noLensFrustum[0];\n noLensFrustum[0] = -(w + noLensFrustum[0]);\n noLensFrustum[2] = w - noLensFrustum[2];\n viewport.x = 1 - (viewport.x + viewport.width);\n }\n return vertices;\n};\nCardboardDistorter.prototype.computeMeshIndices_ = function (width, height) {\n var indices = new Uint16Array(2 * (width - 1) * (height - 1) * 6);\n var halfwidth = width / 2;\n var halfheight = height / 2;\n var vidx = 0;\n var iidx = 0;\n for (var e = 0; e < 2; e++) {\n for (var j = 0; j < height; j++) {\n for (var i = 0; i < width; i++, vidx++) {\n if (i == 0 || j == 0) continue;\n if (i <= halfwidth == j <= halfheight) {\n indices[iidx++] = vidx;\n indices[iidx++] = vidx - width - 1;\n indices[iidx++] = vidx - width;\n indices[iidx++] = vidx - width - 1;\n indices[iidx++] = vidx;\n indices[iidx++] = vidx - 1;\n } else {\n indices[iidx++] = vidx - 1;\n indices[iidx++] = vidx - width;\n indices[iidx++] = vidx;\n indices[iidx++] = vidx - width;\n indices[iidx++] = vidx - 1;\n indices[iidx++] = vidx - width - 1;\n }\n }\n }\n }\n return indices;\n};\nCardboardDistorter.prototype.getOwnPropertyDescriptor_ = function (proto, attrName) {\n var descriptor = Object.getOwnPropertyDescriptor(proto, attrName);\n if (descriptor.get === undefined || descriptor.set === undefined) {\n descriptor.configurable = true;\n descriptor.enumerable = true;\n descriptor.get = function () {\n return this.getAttribute(attrName);\n };\n descriptor.set = function (val) {\n this.setAttribute(attrName, val);\n };\n }\n return descriptor;\n};\nvar uiVS = ['attribute vec2 position;', 'uniform mat4 projectionMat;', 'void main() {', ' gl_Position = projectionMat * vec4( position, -1.0, 1.0 );', '}'].join('\\n');\nvar uiFS = ['precision mediump float;', 'uniform vec4 color;', 'void main() {', ' gl_FragColor = color;', '}'].join('\\n');\nvar DEG2RAD = Math.PI / 180.0;\nvar kAnglePerGearSection = 60;\nvar kOuterRimEndAngle = 12;\nvar kInnerRimBeginAngle = 20;\nvar kOuterRadius = 1;\nvar kMiddleRadius = 0.75;\nvar kInnerRadius = 0.3125;\nvar kCenterLineThicknessDp = 4;\nvar kButtonWidthDp = 28;\nvar kTouchSlopFactor = 1.5;\nfunction CardboardUI(gl) {\n this.gl = gl;\n this.attribs = {\n position: 0\n };\n this.program = linkProgram(gl, uiVS, uiFS, this.attribs);\n this.uniforms = getProgramUniforms(gl, this.program);\n this.vertexBuffer = gl.createBuffer();\n this.gearOffset = 0;\n this.gearVertexCount = 0;\n this.arrowOffset = 0;\n this.arrowVertexCount = 0;\n this.projMat = new Float32Array(16);\n this.listener = null;\n this.onResize();\n}\nCardboardUI.prototype.destroy = function () {\n var gl = this.gl;\n if (this.listener) {\n gl.canvas.removeEventListener('click', this.listener, false);\n }\n gl.deleteProgram(this.program);\n gl.deleteBuffer(this.vertexBuffer);\n};\nCardboardUI.prototype.listen = function (optionsCallback, backCallback) {\n var canvas = this.gl.canvas;\n this.listener = function (event) {\n var midline = canvas.clientWidth / 2;\n var buttonSize = kButtonWidthDp * kTouchSlopFactor;\n if (event.clientX > midline - buttonSize && event.clientX < midline + buttonSize && event.clientY > canvas.clientHeight - buttonSize) {\n optionsCallback(event);\n }\n else if (event.clientX < buttonSize && event.clientY < buttonSize) {\n backCallback(event);\n }\n };\n canvas.addEventListener('click', this.listener, false);\n};\nCardboardUI.prototype.onResize = function () {\n var gl = this.gl;\n var self = this;\n var glState = [gl.ARRAY_BUFFER_BINDING];\n glPreserveState(gl, glState, function (gl) {\n var vertices = [];\n var midline = gl.drawingBufferWidth / 2;\n var physicalPixels = Math.max(screen.width, screen.height) * window.devicePixelRatio;\n var scalingRatio = gl.drawingBufferWidth / physicalPixels;\n var dps = scalingRatio * window.devicePixelRatio;\n var lineWidth = kCenterLineThicknessDp * dps / 2;\n var buttonSize = kButtonWidthDp * kTouchSlopFactor * dps;\n var buttonScale = kButtonWidthDp * dps / 2;\n var buttonBorder = (kButtonWidthDp * kTouchSlopFactor - kButtonWidthDp) * dps;\n vertices.push(midline - lineWidth, buttonSize);\n vertices.push(midline - lineWidth, gl.drawingBufferHeight);\n vertices.push(midline + lineWidth, buttonSize);\n vertices.push(midline + lineWidth, gl.drawingBufferHeight);\n self.gearOffset = vertices.length / 2;\n function addGearSegment(theta, r) {\n var angle = (90 - theta) * DEG2RAD;\n var x = Math.cos(angle);\n var y = Math.sin(angle);\n vertices.push(kInnerRadius * x * buttonScale + midline, kInnerRadius * y * buttonScale + buttonScale);\n vertices.push(r * x * buttonScale + midline, r * y * buttonScale + buttonScale);\n }\n for (var i = 0; i <= 6; i++) {\n var segmentTheta = i * kAnglePerGearSection;\n addGearSegment(segmentTheta, kOuterRadius);\n addGearSegment(segmentTheta + kOuterRimEndAngle, kOuterRadius);\n addGearSegment(segmentTheta + kInnerRimBeginAngle, kMiddleRadius);\n addGearSegment(segmentTheta + (kAnglePerGearSection - kInnerRimBeginAngle), kMiddleRadius);\n addGearSegment(segmentTheta + (kAnglePerGearSection - kOuterRimEndAngle), kOuterRadius);\n }\n self.gearVertexCount = vertices.length / 2 - self.gearOffset;\n self.arrowOffset = vertices.length / 2;\n function addArrowVertex(x, y) {\n vertices.push(buttonBorder + x, gl.drawingBufferHeight - buttonBorder - y);\n }\n var angledLineWidth = lineWidth / Math.sin(45 * DEG2RAD);\n addArrowVertex(0, buttonScale);\n addArrowVertex(buttonScale, 0);\n addArrowVertex(buttonScale + angledLineWidth, angledLineWidth);\n addArrowVertex(angledLineWidth, buttonScale + angledLineWidth);\n addArrowVertex(angledLineWidth, buttonScale - angledLineWidth);\n addArrowVertex(0, buttonScale);\n addArrowVertex(buttonScale, buttonScale * 2);\n addArrowVertex(buttonScale + angledLineWidth, buttonScale * 2 - angledLineWidth);\n addArrowVertex(angledLineWidth, buttonScale - angledLineWidth);\n addArrowVertex(0, buttonScale);\n addArrowVertex(angledLineWidth, buttonScale - lineWidth);\n addArrowVertex(kButtonWidthDp * dps, buttonScale - lineWidth);\n addArrowVertex(angledLineWidth, buttonScale + lineWidth);\n addArrowVertex(kButtonWidthDp * dps, buttonScale + lineWidth);\n self.arrowVertexCount = vertices.length / 2 - self.arrowOffset;\n gl.bindBuffer(gl.ARRAY_BUFFER, self.vertexBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertices), gl.STATIC_DRAW);\n });\n};\nCardboardUI.prototype.render = function () {\n var gl = this.gl;\n var self = this;\n var glState = [gl.CULL_FACE, gl.DEPTH_TEST, gl.BLEND, gl.SCISSOR_TEST, gl.STENCIL_TEST, gl.COLOR_WRITEMASK, gl.VIEWPORT, gl.CURRENT_PROGRAM, gl.ARRAY_BUFFER_BINDING];\n glPreserveState(gl, glState, function (gl) {\n gl.disable(gl.CULL_FACE);\n gl.disable(gl.DEPTH_TEST);\n gl.disable(gl.BLEND);\n gl.disable(gl.SCISSOR_TEST);\n gl.disable(gl.STENCIL_TEST);\n gl.colorMask(true, true, true, true);\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n self.renderNoState();\n });\n};\nCardboardUI.prototype.renderNoState = function () {\n var gl = this.gl;\n gl.useProgram(this.program);\n gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);\n gl.enableVertexAttribArray(this.attribs.position);\n gl.vertexAttribPointer(this.attribs.position, 2, gl.FLOAT, false, 8, 0);\n gl.uniform4f(this.uniforms.color, 1.0, 1.0, 1.0, 1.0);\n orthoMatrix(this.projMat, 0, gl.drawingBufferWidth, 0, gl.drawingBufferHeight, 0.1, 1024.0);\n gl.uniformMatrix4fv(this.uniforms.projectionMat, false, this.projMat);\n gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n gl.drawArrays(gl.TRIANGLE_STRIP, this.gearOffset, this.gearVertexCount);\n gl.drawArrays(gl.TRIANGLE_STRIP, this.arrowOffset, this.arrowVertexCount);\n};\nfunction Distortion(coefficients) {\n this.coefficients = coefficients;\n}\nDistortion.prototype.distortInverse = function (radius) {\n var r0 = 0;\n var r1 = 1;\n var dr0 = radius - this.distort(r0);\n while (Math.abs(r1 - r0) > 0.0001 ) {\n var dr1 = radius - this.distort(r1);\n var r2 = r1 - dr1 * ((r1 - r0) / (dr1 - dr0));\n r0 = r1;\n r1 = r2;\n dr0 = dr1;\n }\n return r1;\n};\nDistortion.prototype.distort = function (radius) {\n var r2 = radius * radius;\n var ret = 0;\n for (var i = 0; i < this.coefficients.length; i++) {\n ret = r2 * (ret + this.coefficients[i]);\n }\n return (ret + 1) * radius;\n};\nvar degToRad = Math.PI / 180;\nvar radToDeg = 180 / Math.PI;\nvar Vector3 = function Vector3(x, y, z) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n};\nVector3.prototype = {\n constructor: Vector3,\n set: function set(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n },\n copy: function copy(v) {\n this.x = v.x;\n this.y = v.y;\n this.z = v.z;\n return this;\n },\n length: function length() {\n return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n },\n normalize: function normalize() {\n var scalar = this.length();\n if (scalar !== 0) {\n var invScalar = 1 / scalar;\n this.multiplyScalar(invScalar);\n } else {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n }\n return this;\n },\n multiplyScalar: function multiplyScalar(scalar) {\n this.x *= scalar;\n this.y *= scalar;\n this.z *= scalar;\n },\n applyQuaternion: function applyQuaternion(q) {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n var qx = q.x;\n var qy = q.y;\n var qz = q.z;\n var qw = q.w;\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z;\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n return this;\n },\n dot: function dot(v) {\n return this.x * v.x + this.y * v.y + this.z * v.z;\n },\n crossVectors: function crossVectors(a, b) {\n var ax = a.x,\n ay = a.y,\n az = a.z;\n var bx = b.x,\n by = b.y,\n bz = b.z;\n this.x = ay * bz - az * by;\n this.y = az * bx - ax * bz;\n this.z = ax * by - ay * bx;\n return this;\n }\n};\nvar Quaternion = function Quaternion(x, y, z, w) {\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n this.w = w !== undefined ? w : 1;\n};\nQuaternion.prototype = {\n constructor: Quaternion,\n set: function set(x, y, z, w) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.w = w;\n return this;\n },\n copy: function copy(quaternion) {\n this.x = quaternion.x;\n this.y = quaternion.y;\n this.z = quaternion.z;\n this.w = quaternion.w;\n return this;\n },\n setFromEulerXYZ: function setFromEulerXYZ(x, y, z) {\n var c1 = Math.cos(x / 2);\n var c2 = Math.cos(y / 2);\n var c3 = Math.cos(z / 2);\n var s1 = Math.sin(x / 2);\n var s2 = Math.sin(y / 2);\n var s3 = Math.sin(z / 2);\n this.x = s1 * c2 * c3 + c1 * s2 * s3;\n this.y = c1 * s2 * c3 - s1 * c2 * s3;\n this.z = c1 * c2 * s3 + s1 * s2 * c3;\n this.w = c1 * c2 * c3 - s1 * s2 * s3;\n return this;\n },\n setFromEulerYXZ: function setFromEulerYXZ(x, y, z) {\n var c1 = Math.cos(x / 2);\n var c2 = Math.cos(y / 2);\n var c3 = Math.cos(z / 2);\n var s1 = Math.sin(x / 2);\n var s2 = Math.sin(y / 2);\n var s3 = Math.sin(z / 2);\n this.x = s1 * c2 * c3 + c1 * s2 * s3;\n this.y = c1 * s2 * c3 - s1 * c2 * s3;\n this.z = c1 * c2 * s3 - s1 * s2 * c3;\n this.w = c1 * c2 * c3 + s1 * s2 * s3;\n return this;\n },\n setFromAxisAngle: function setFromAxisAngle(axis, angle) {\n var halfAngle = angle / 2,\n s = Math.sin(halfAngle);\n this.x = axis.x * s;\n this.y = axis.y * s;\n this.z = axis.z * s;\n this.w = Math.cos(halfAngle);\n return this;\n },\n multiply: function multiply(q) {\n return this.multiplyQuaternions(this, q);\n },\n multiplyQuaternions: function multiplyQuaternions(a, b) {\n var qax = a.x,\n qay = a.y,\n qaz = a.z,\n qaw = a.w;\n var qbx = b.x,\n qby = b.y,\n qbz = b.z,\n qbw = b.w;\n this.x = qax * qbw + qaw * qbx + qay * qbz - qaz * qby;\n this.y = qay * qbw + qaw * qby + qaz * qbx - qax * qbz;\n this.z = qaz * qbw + qaw * qbz + qax * qby - qay * qbx;\n this.w = qaw * qbw - qax * qbx - qay * qby - qaz * qbz;\n return this;\n },\n inverse: function inverse() {\n this.x *= -1;\n this.y *= -1;\n this.z *= -1;\n this.normalize();\n return this;\n },\n normalize: function normalize() {\n var l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);\n if (l === 0) {\n this.x = 0;\n this.y = 0;\n this.z = 0;\n this.w = 1;\n } else {\n l = 1 / l;\n this.x = this.x * l;\n this.y = this.y * l;\n this.z = this.z * l;\n this.w = this.w * l;\n }\n return this;\n },\n slerp: function slerp(qb, t) {\n if (t === 0) return this;\n if (t === 1) return this.copy(qb);\n var x = this.x,\n y = this.y,\n z = this.z,\n w = this.w;\n var cosHalfTheta = w * qb.w + x * qb.x + y * qb.y + z * qb.z;\n if (cosHalfTheta < 0) {\n this.w = -qb.w;\n this.x = -qb.x;\n this.y = -qb.y;\n this.z = -qb.z;\n cosHalfTheta = -cosHalfTheta;\n } else {\n this.copy(qb);\n }\n if (cosHalfTheta >= 1.0) {\n this.w = w;\n this.x = x;\n this.y = y;\n this.z = z;\n return this;\n }\n var halfTheta = Math.acos(cosHalfTheta);\n var sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta * cosHalfTheta);\n if (Math.abs(sinHalfTheta) < 0.001) {\n this.w = 0.5 * (w + this.w);\n this.x = 0.5 * (x + this.x);\n this.y = 0.5 * (y + this.y);\n this.z = 0.5 * (z + this.z);\n return this;\n }\n var ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta,\n ratioB = Math.sin(t * halfTheta) / sinHalfTheta;\n this.w = w * ratioA + this.w * ratioB;\n this.x = x * ratioA + this.x * ratioB;\n this.y = y * ratioA + this.y * ratioB;\n this.z = z * ratioA + this.z * ratioB;\n return this;\n },\n setFromUnitVectors: function () {\n var v1, r;\n var EPS = 0.000001;\n return function (vFrom, vTo) {\n if (v1 === undefined) v1 = new Vector3();\n r = vFrom.dot(vTo) + 1;\n if (r < EPS) {\n r = 0;\n if (Math.abs(vFrom.x) > Math.abs(vFrom.z)) {\n v1.set(-vFrom.y, vFrom.x, 0);\n } else {\n v1.set(0, -vFrom.z, vFrom.y);\n }\n } else {\n v1.crossVectors(vFrom, vTo);\n }\n this.x = v1.x;\n this.y = v1.y;\n this.z = v1.z;\n this.w = r;\n this.normalize();\n return this;\n };\n }()\n};\nfunction Device(params) {\n this.width = params.width || getScreenWidth();\n this.height = params.height || getScreenHeight();\n this.widthMeters = params.widthMeters;\n this.heightMeters = params.heightMeters;\n this.bevelMeters = params.bevelMeters;\n}\nvar DEFAULT_ANDROID = new Device({\n widthMeters: 0.110,\n heightMeters: 0.062,\n bevelMeters: 0.004\n});\nvar DEFAULT_IOS = new Device({\n widthMeters: 0.1038,\n heightMeters: 0.0584,\n bevelMeters: 0.004\n});\nvar Viewers = {\n CardboardV1: new CardboardViewer({\n id: 'CardboardV1',\n label: 'Cardboard I/O 2014',\n fov: 40,\n interLensDistance: 0.060,\n baselineLensDistance: 0.035,\n screenLensDistance: 0.042,\n distortionCoefficients: [0.441, 0.156],\n inverseCoefficients: [-0.4410035, 0.42756155, -0.4804439, 0.5460139, -0.58821183, 0.5733938, -0.48303202, 0.33299083, -0.17573841, 0.0651772, -0.01488963, 0.001559834]\n }),\n CardboardV2: new CardboardViewer({\n id: 'CardboardV2',\n label: 'Cardboard I/O 2015',\n fov: 60,\n interLensDistance: 0.064,\n baselineLensDistance: 0.035,\n screenLensDistance: 0.039,\n distortionCoefficients: [0.34, 0.55],\n inverseCoefficients: [-0.33836704, -0.18162185, 0.862655, -1.2462051, 1.0560602, -0.58208317, 0.21609078, -0.05444823, 0.009177956, -9.904169E-4, 6.183535E-5, -1.6981803E-6]\n })\n};\nfunction DeviceInfo(deviceParams, additionalViewers) {\n this.viewer = Viewers.CardboardV2;\n this.updateDeviceParams(deviceParams);\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n for (var i = 0; i < additionalViewers.length; i++) {\n var viewer = additionalViewers[i];\n Viewers[viewer.id] = new CardboardViewer(viewer);\n }\n}\nDeviceInfo.prototype.updateDeviceParams = function (deviceParams) {\n this.device = this.determineDevice_(deviceParams) || this.device;\n};\nDeviceInfo.prototype.getDevice = function () {\n return this.device;\n};\nDeviceInfo.prototype.setViewer = function (viewer) {\n this.viewer = viewer;\n this.distortion = new Distortion(this.viewer.distortionCoefficients);\n};\nDeviceInfo.prototype.determineDevice_ = function (deviceParams) {\n if (!deviceParams) {\n if (isIOS()) {\n console.warn('Using fallback iOS device measurements.');\n return DEFAULT_IOS;\n } else {\n console.warn('Using fallback Android device measurements.');\n return DEFAULT_ANDROID;\n }\n }\n var METERS_PER_INCH = 0.0254;\n var metersPerPixelX = METERS_PER_INCH / deviceParams.xdpi;\n var metersPerPixelY = METERS_PER_INCH / deviceParams.ydpi;\n var width = getScreenWidth();\n var height = getScreenHeight();\n return new Device({\n widthMeters: metersPerPixelX * width,\n heightMeters: metersPerPixelY * height,\n bevelMeters: deviceParams.bevelMm * 0.001\n });\n};\nDeviceInfo.prototype.getDistortedFieldOfViewLeftEye = function () {\n var viewer = this.viewer;\n var device = this.device;\n var distortion = this.distortion;\n var eyeToScreenDistance = viewer.screenLensDistance;\n var outerDist = (device.widthMeters - viewer.interLensDistance) / 2;\n var innerDist = viewer.interLensDistance / 2;\n var bottomDist = viewer.baselineLensDistance - device.bevelMeters;\n var topDist = device.heightMeters - bottomDist;\n var outerAngle = radToDeg * Math.atan(distortion.distort(outerDist / eyeToScreenDistance));\n var innerAngle = radToDeg * Math.atan(distortion.distort(innerDist / eyeToScreenDistance));\n var bottomAngle = radToDeg * Math.atan(distortion.distort(bottomDist / eyeToScreenDistance));\n var topAngle = radToDeg * Math.atan(distortion.distort(topDist / eyeToScreenDistance));\n return {\n leftDegrees: Math.min(outerAngle, viewer.fov),\n rightDegrees: Math.min(innerAngle, viewer.fov),\n downDegrees: Math.min(bottomAngle, viewer.fov),\n upDegrees: Math.min(topAngle, viewer.fov)\n };\n};\nDeviceInfo.prototype.getLeftEyeVisibleTanAngles = function () {\n var viewer = this.viewer;\n var device = this.device;\n var distortion = this.distortion;\n var fovLeft = Math.tan(-degToRad * viewer.fov);\n var fovTop = Math.tan(degToRad * viewer.fov);\n var fovRight = Math.tan(degToRad * viewer.fov);\n var fovBottom = Math.tan(-degToRad * viewer.fov);\n var halfWidth = device.widthMeters / 4;\n var halfHeight = device.heightMeters / 2;\n var verticalLensOffset = viewer.baselineLensDistance - device.bevelMeters - halfHeight;\n var centerX = viewer.interLensDistance / 2 - halfWidth;\n var centerY = -verticalLensOffset;\n var centerZ = viewer.screenLensDistance;\n var screenLeft = distortion.distort((centerX - halfWidth) / centerZ);\n var screenTop = distortion.distort((centerY + halfHeight) / centerZ);\n var screenRight = distortion.distort((centerX + halfWidth) / centerZ);\n var screenBottom = distortion.distort((centerY - halfHeight) / centerZ);\n var result = new Float32Array(4);\n result[0] = Math.max(fovLeft, screenLeft);\n result[1] = Math.min(fovTop, screenTop);\n result[2] = Math.min(fovRight, screenRight);\n result[3] = Math.max(fovBottom, screenBottom);\n return result;\n};\nDeviceInfo.prototype.getLeftEyeNoLensTanAngles = function () {\n var viewer = this.viewer;\n var device = this.device;\n var distortion = this.distortion;\n var result = new Float32Array(4);\n var fovLeft = distortion.distortInverse(Math.tan(-degToRad * viewer.fov));\n var fovTop = distortion.distortInverse(Math.tan(degToRad * viewer.fov));\n var fovRight = distortion.distortInverse(Math.tan(degToRad * viewer.fov));\n var fovBottom = distortion.distortInverse(Math.tan(-degToRad * viewer.fov));\n var halfWidth = device.widthMeters / 4;\n var halfHeight = device.heightMeters / 2;\n var verticalLensOffset = viewer.baselineLensDistance - device.bevelMeters - halfHeight;\n var centerX = viewer.interLensDistance / 2 - halfWidth;\n var centerY = -verticalLensOffset;\n var centerZ = viewer.screenLensDistance;\n var screenLeft = (centerX - halfWidth) / centerZ;\n var screenTop = (centerY + halfHeight) / centerZ;\n var screenRight = (centerX + halfWidth) / centerZ;\n var screenBottom = (centerY - halfHeight) / centerZ;\n result[0] = Math.max(fovLeft, screenLeft);\n result[1] = Math.min(fovTop, screenTop);\n result[2] = Math.min(fovRight, screenRight);\n result[3] = Math.max(fovBottom, screenBottom);\n return result;\n};\nDeviceInfo.prototype.getLeftEyeVisibleScreenRect = function (undistortedFrustum) {\n var viewer = this.viewer;\n var device = this.device;\n var dist = viewer.screenLensDistance;\n var eyeX = (device.widthMeters - viewer.interLensDistance) / 2;\n var eyeY = viewer.baselineLensDistance - device.bevelMeters;\n var left = (undistortedFrustum[0] * dist + eyeX) / device.widthMeters;\n var top = (undistortedFrustum[1] * dist + eyeY) / device.heightMeters;\n var right = (undistortedFrustum[2] * dist + eyeX) / device.widthMeters;\n var bottom = (undistortedFrustum[3] * dist + eyeY) / device.heightMeters;\n return {\n x: left,\n y: bottom,\n width: right - left,\n height: top - bottom\n };\n};\nDeviceInfo.prototype.getFieldOfViewLeftEye = function (opt_isUndistorted) {\n return opt_isUndistorted ? this.getUndistortedFieldOfViewLeftEye() : this.getDistortedFieldOfViewLeftEye();\n};\nDeviceInfo.prototype.getFieldOfViewRightEye = function (opt_isUndistorted) {\n var fov = this.getFieldOfViewLeftEye(opt_isUndistorted);\n return {\n leftDegrees: fov.rightDegrees,\n rightDegrees: fov.leftDegrees,\n upDegrees: fov.upDegrees,\n downDegrees: fov.downDegrees\n };\n};\nDeviceInfo.prototype.getUndistortedFieldOfViewLeftEye = function () {\n var p = this.getUndistortedParams_();\n return {\n leftDegrees: radToDeg * Math.atan(p.outerDist),\n rightDegrees: radToDeg * Math.atan(p.innerDist),\n downDegrees: radToDeg * Math.atan(p.bottomDist),\n upDegrees: radToDeg * Math.atan(p.topDist)\n };\n};\nDeviceInfo.prototype.getUndistortedViewportLeftEye = function () {\n var p = this.getUndistortedParams_();\n var viewer = this.viewer;\n var device = this.device;\n var eyeToScreenDistance = viewer.screenLensDistance;\n var screenWidth = device.widthMeters / eyeToScreenDistance;\n var screenHeight = device.heightMeters / eyeToScreenDistance;\n var xPxPerTanAngle = device.width / screenWidth;\n var yPxPerTanAngle = device.height / screenHeight;\n var x = Math.round((p.eyePosX - p.outerDist) * xPxPerTanAngle);\n var y = Math.round((p.eyePosY - p.bottomDist) * yPxPerTanAngle);\n return {\n x: x,\n y: y,\n width: Math.round((p.eyePosX + p.innerDist) * xPxPerTanAngle) - x,\n height: Math.round((p.eyePosY + p.topDist) * yPxPerTanAngle) - y\n };\n};\nDeviceInfo.prototype.getUndistortedParams_ = function () {\n var viewer = this.viewer;\n var device = this.device;\n var distortion = this.distortion;\n var eyeToScreenDistance = viewer.screenLensDistance;\n var halfLensDistance = viewer.interLensDistance / 2 / eyeToScreenDistance;\n var screenWidth = device.widthMeters / eyeToScreenDistance;\n var screenHeight = device.heightMeters / eyeToScreenDistance;\n var eyePosX = screenWidth / 2 - halfLensDistance;\n var eyePosY = (viewer.baselineLensDistance - device.bevelMeters) / eyeToScreenDistance;\n var maxFov = viewer.fov;\n var viewerMax = distortion.distortInverse(Math.tan(degToRad * maxFov));\n var outerDist = Math.min(eyePosX, viewerMax);\n var innerDist = Math.min(halfLensDistance, viewerMax);\n var bottomDist = Math.min(eyePosY, viewerMax);\n var topDist = Math.min(screenHeight - eyePosY, viewerMax);\n return {\n outerDist: outerDist,\n innerDist: innerDist,\n topDist: topDist,\n bottomDist: bottomDist,\n eyePosX: eyePosX,\n eyePosY: eyePosY\n };\n};\nfunction CardboardViewer(params) {\n this.id = params.id;\n this.label = params.label;\n this.fov = params.fov;\n this.interLensDistance = params.interLensDistance;\n this.baselineLensDistance = params.baselineLensDistance;\n this.screenLensDistance = params.screenLensDistance;\n this.distortionCoefficients = params.distortionCoefficients;\n this.inverseCoefficients = params.inverseCoefficients;\n}\nDeviceInfo.Viewers = Viewers;\nvar format = 1;\nvar last_updated = \"2019-11-09T17:36:14Z\";\nvar devices = [{\"type\":\"android\",\"rules\":[{\"mdmh\":\"asus/*/Nexus 7/*\"},{\"ua\":\"Nexus 7\"}],\"dpi\":[320.8,323],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"asus/*/ASUS_X00PD/*\"},{\"ua\":\"ASUS_X00PD\"}],\"dpi\":245,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"asus/*/ASUS_X008D/*\"},{\"ua\":\"ASUS_X008D\"}],\"dpi\":282,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"asus/*/ASUS_Z00AD/*\"},{\"ua\":\"ASUS_Z00AD\"}],\"dpi\":[403,404.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel 2 XL/*\"},{\"ua\":\"Pixel 2 XL\"}],\"dpi\":537.9,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel 3 XL/*\"},{\"ua\":\"Pixel 3 XL\"}],\"dpi\":[558.5,553.8],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel XL/*\"},{\"ua\":\"Pixel XL\"}],\"dpi\":[537.9,533],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel 3/*\"},{\"ua\":\"Pixel 3\"}],\"dpi\":442.4,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel 2/*\"},{\"ua\":\"Pixel 2\"}],\"dpi\":441,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Google/*/Pixel/*\"},{\"ua\":\"Pixel\"}],\"dpi\":[432.6,436.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC6435LVW/*\"},{\"ua\":\"HTC6435LVW\"}],\"dpi\":[449.7,443.3],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC One XL/*\"},{\"ua\":\"HTC One XL\"}],\"dpi\":[315.3,314.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"htc/*/Nexus 9/*\"},{\"ua\":\"Nexus 9\"}],\"dpi\":289,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC One M9/*\"},{\"ua\":\"HTC One M9\"}],\"dpi\":[442.5,443.3],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC One_M8/*\"},{\"ua\":\"HTC One_M8\"}],\"dpi\":[449.7,447.4],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"HTC/*/HTC One/*\"},{\"ua\":\"HTC One\"}],\"dpi\":472.8,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Huawei/*/Nexus 6P/*\"},{\"ua\":\"Nexus 6P\"}],\"dpi\":[515.1,518],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Huawei/*/BLN-L24/*\"},{\"ua\":\"HONORBLN-L24\"}],\"dpi\":480,\"bw\":4,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Huawei/*/BKL-L09/*\"},{\"ua\":\"BKL-L09\"}],\"dpi\":403,\"bw\":3.47,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LENOVO/*/Lenovo PB2-690Y/*\"},{\"ua\":\"Lenovo PB2-690Y\"}],\"dpi\":[457.2,454.713],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/Nexus 5X/*\"},{\"ua\":\"Nexus 5X\"}],\"dpi\":[422,419.9],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LGMS345/*\"},{\"ua\":\"LGMS345\"}],\"dpi\":[221.7,219.1],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LG-D800/*\"},{\"ua\":\"LG-D800\"}],\"dpi\":[422,424.1],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LG-D850/*\"},{\"ua\":\"LG-D850\"}],\"dpi\":[537.9,541.9],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/VS985 4G/*\"},{\"ua\":\"VS985 4G\"}],\"dpi\":[537.9,535.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/Nexus 5/*\"},{\"ua\":\"Nexus 5 B\"}],\"dpi\":[442.4,444.8],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/Nexus 4/*\"},{\"ua\":\"Nexus 4\"}],\"dpi\":[319.8,318.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LG-P769/*\"},{\"ua\":\"LG-P769\"}],\"dpi\":[240.6,247.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LGMS323/*\"},{\"ua\":\"LGMS323\"}],\"dpi\":[206.6,204.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"LGE/*/LGLS996/*\"},{\"ua\":\"LGLS996\"}],\"dpi\":[403.4,401.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Micromax/*/4560MMX/*\"},{\"ua\":\"4560MMX\"}],\"dpi\":[240,219.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Micromax/*/A250/*\"},{\"ua\":\"Micromax A250\"}],\"dpi\":[480,446.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Micromax/*/Micromax AQ4501/*\"},{\"ua\":\"Micromax AQ4501\"}],\"dpi\":240,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/G5/*\"},{\"ua\":\"Moto G (5) Plus\"}],\"dpi\":[403.4,403],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/DROID RAZR/*\"},{\"ua\":\"DROID RAZR\"}],\"dpi\":[368.1,256.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT830C/*\"},{\"ua\":\"XT830C\"}],\"dpi\":[254,255.9],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1021/*\"},{\"ua\":\"XT1021\"}],\"dpi\":[254,256.7],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1023/*\"},{\"ua\":\"XT1023\"}],\"dpi\":[254,256.7],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1028/*\"},{\"ua\":\"XT1028\"}],\"dpi\":[326.6,327.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1034/*\"},{\"ua\":\"XT1034\"}],\"dpi\":[326.6,328.4],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1053/*\"},{\"ua\":\"XT1053\"}],\"dpi\":[315.3,316.1],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1562/*\"},{\"ua\":\"XT1562\"}],\"dpi\":[403.4,402.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/Nexus 6/*\"},{\"ua\":\"Nexus 6 B\"}],\"dpi\":[494.3,489.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1063/*\"},{\"ua\":\"XT1063\"}],\"dpi\":[295,296.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1064/*\"},{\"ua\":\"XT1064\"}],\"dpi\":[295,295.6],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1092/*\"},{\"ua\":\"XT1092\"}],\"dpi\":[422,424.1],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/XT1095/*\"},{\"ua\":\"XT1095\"}],\"dpi\":[422,423.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"motorola/*/G4/*\"},{\"ua\":\"Moto G (4)\"}],\"dpi\":401,\"bw\":4,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/A0001/*\"},{\"ua\":\"A0001\"}],\"dpi\":[403.4,401],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE E1001/*\"},{\"ua\":\"ONE E1001\"}],\"dpi\":[442.4,441.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE E1003/*\"},{\"ua\":\"ONE E1003\"}],\"dpi\":[442.4,441.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE E1005/*\"},{\"ua\":\"ONE E1005\"}],\"dpi\":[442.4,441.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE A2001/*\"},{\"ua\":\"ONE A2001\"}],\"dpi\":[391.9,405.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE A2003/*\"},{\"ua\":\"ONE A2003\"}],\"dpi\":[391.9,405.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE A2005/*\"},{\"ua\":\"ONE A2005\"}],\"dpi\":[391.9,405.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A3000/*\"},{\"ua\":\"ONEPLUS A3000\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A3003/*\"},{\"ua\":\"ONEPLUS A3003\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A3010/*\"},{\"ua\":\"ONEPLUS A3010\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A5000/*\"},{\"ua\":\"ONEPLUS A5000 \"}],\"dpi\":[403.411,399.737],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONE A5010/*\"},{\"ua\":\"ONEPLUS A5010\"}],\"dpi\":[403,400],\"bw\":2,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A6000/*\"},{\"ua\":\"ONEPLUS A6000\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A6003/*\"},{\"ua\":\"ONEPLUS A6003\"}],\"dpi\":401,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A6010/*\"},{\"ua\":\"ONEPLUS A6010\"}],\"dpi\":401,\"bw\":2,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OnePlus/*/ONEPLUS A6013/*\"},{\"ua\":\"ONEPLUS A6013\"}],\"dpi\":401,\"bw\":2,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"OPPO/*/X909/*\"},{\"ua\":\"X909\"}],\"dpi\":[442.4,444.1],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9082/*\"},{\"ua\":\"GT-I9082\"}],\"dpi\":[184.7,185.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G360P/*\"},{\"ua\":\"SM-G360P\"}],\"dpi\":[196.7,205.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/Nexus S/*\"},{\"ua\":\"Nexus S\"}],\"dpi\":[234.5,229.8],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9300/*\"},{\"ua\":\"GT-I9300\"}],\"dpi\":[304.8,303.9],\"bw\":5,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-T230NU/*\"},{\"ua\":\"SM-T230NU\"}],\"dpi\":216,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SGH-T399/*\"},{\"ua\":\"SGH-T399\"}],\"dpi\":[217.7,231.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SGH-M919/*\"},{\"ua\":\"SGH-M919\"}],\"dpi\":[440.8,437.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N9005/*\"},{\"ua\":\"SM-N9005\"}],\"dpi\":[386.4,387],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SAMSUNG-SM-N900A/*\"},{\"ua\":\"SAMSUNG-SM-N900A\"}],\"dpi\":[386.4,387.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9500/*\"},{\"ua\":\"GT-I9500\"}],\"dpi\":[442.5,443.3],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9505/*\"},{\"ua\":\"GT-I9505\"}],\"dpi\":439.4,\"bw\":4,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G900F/*\"},{\"ua\":\"SM-G900F\"}],\"dpi\":[415.6,431.6],\"bw\":5,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G900M/*\"},{\"ua\":\"SM-G900M\"}],\"dpi\":[415.6,431.6],\"bw\":5,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G800F/*\"},{\"ua\":\"SM-G800F\"}],\"dpi\":326.8,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G906S/*\"},{\"ua\":\"SM-G906S\"}],\"dpi\":[562.7,572.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9300/*\"},{\"ua\":\"GT-I9300\"}],\"dpi\":[306.7,304.8],\"bw\":5,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-T535/*\"},{\"ua\":\"SM-T535\"}],\"dpi\":[142.6,136.4],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N920C/*\"},{\"ua\":\"SM-N920C\"}],\"dpi\":[515.1,518.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N920P/*\"},{\"ua\":\"SM-N920P\"}],\"dpi\":[386.3655,390.144],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N920W8/*\"},{\"ua\":\"SM-N920W8\"}],\"dpi\":[515.1,518.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9300I/*\"},{\"ua\":\"GT-I9300I\"}],\"dpi\":[304.8,305.8],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-I9195/*\"},{\"ua\":\"GT-I9195\"}],\"dpi\":[249.4,256.7],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SPH-L520/*\"},{\"ua\":\"SPH-L520\"}],\"dpi\":[249.4,255.9],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SAMSUNG-SGH-I717/*\"},{\"ua\":\"SAMSUNG-SGH-I717\"}],\"dpi\":285.8,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SPH-D710/*\"},{\"ua\":\"SPH-D710\"}],\"dpi\":[217.7,204.2],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/GT-N7100/*\"},{\"ua\":\"GT-N7100\"}],\"dpi\":265.1,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SCH-I605/*\"},{\"ua\":\"SCH-I605\"}],\"dpi\":265.1,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/Galaxy Nexus/*\"},{\"ua\":\"Galaxy Nexus\"}],\"dpi\":[315.3,314.2],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N910H/*\"},{\"ua\":\"SM-N910H\"}],\"dpi\":[515.1,518],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-N910C/*\"},{\"ua\":\"SM-N910C\"}],\"dpi\":[515.2,520.2],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G130M/*\"},{\"ua\":\"SM-G130M\"}],\"dpi\":[165.9,164.8],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G928I/*\"},{\"ua\":\"SM-G928I\"}],\"dpi\":[515.1,518.4],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G920F/*\"},{\"ua\":\"SM-G920F\"}],\"dpi\":580.6,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G920P/*\"},{\"ua\":\"SM-G920P\"}],\"dpi\":[522.5,577],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G925F/*\"},{\"ua\":\"SM-G925F\"}],\"dpi\":580.6,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G925V/*\"},{\"ua\":\"SM-G925V\"}],\"dpi\":[522.5,576.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G930F/*\"},{\"ua\":\"SM-G930F\"}],\"dpi\":576.6,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G935F/*\"},{\"ua\":\"SM-G935F\"}],\"dpi\":533,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G950F/*\"},{\"ua\":\"SM-G950F\"}],\"dpi\":[562.707,565.293],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G955U/*\"},{\"ua\":\"SM-G955U\"}],\"dpi\":[522.514,525.762],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G955F/*\"},{\"ua\":\"SM-G955F\"}],\"dpi\":[522.514,525.762],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960F/*\"},{\"ua\":\"SM-G960F\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G9600/*\"},{\"ua\":\"SM-G9600\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960T/*\"},{\"ua\":\"SM-G960T\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960N/*\"},{\"ua\":\"SM-G960N\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960U/*\"},{\"ua\":\"SM-G960U\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G9608/*\"},{\"ua\":\"SM-G9608\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960FD/*\"},{\"ua\":\"SM-G960FD\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G960W/*\"},{\"ua\":\"SM-G960W\"}],\"dpi\":[569.575,571.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G965F/*\"},{\"ua\":\"SM-G965F\"}],\"dpi\":529,\"bw\":2,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/C6903/*\"},{\"ua\":\"C6903\"}],\"dpi\":[442.5,443.3],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/D6653/*\"},{\"ua\":\"D6653\"}],\"dpi\":[428.6,427.6],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/E6653/*\"},{\"ua\":\"E6653\"}],\"dpi\":[428.6,425.7],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/E6853/*\"},{\"ua\":\"E6853\"}],\"dpi\":[403.4,401.9],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Sony/*/SGP321/*\"},{\"ua\":\"SGP321\"}],\"dpi\":[224.7,224.1],\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"TCT/*/ALCATEL ONE TOUCH Fierce/*\"},{\"ua\":\"ALCATEL ONE TOUCH Fierce\"}],\"dpi\":[240,247.5],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"THL/*/thl 5000/*\"},{\"ua\":\"thl 5000\"}],\"dpi\":[480,443.3],\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Fly/*/IQ4412/*\"},{\"ua\":\"IQ4412\"}],\"dpi\":307.9,\"bw\":3,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"ZTE/*/ZTE Blade L2/*\"},{\"ua\":\"ZTE Blade L2\"}],\"dpi\":240,\"bw\":3,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"BENEVE/*/VR518/*\"},{\"ua\":\"VR518\"}],\"dpi\":480,\"bw\":3,\"ac\":500},{\"type\":\"ios\",\"rules\":[{\"res\":[640,960]}],\"dpi\":[325.1,328.4],\"bw\":4,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[640,1136]}],\"dpi\":[317.1,320.2],\"bw\":3,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[750,1334]}],\"dpi\":326.4,\"bw\":4,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[1242,2208]}],\"dpi\":[453.6,458.4],\"bw\":4,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[1125,2001]}],\"dpi\":[410.9,415.4],\"bw\":4,\"ac\":1000},{\"type\":\"ios\",\"rules\":[{\"res\":[1125,2436]}],\"dpi\":458,\"bw\":4,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Huawei/*/EML-L29/*\"},{\"ua\":\"EML-L29\"}],\"dpi\":428,\"bw\":3.45,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"Nokia/*/Nokia 7.1/*\"},{\"ua\":\"Nokia 7.1\"}],\"dpi\":[432,431.9],\"bw\":3,\"ac\":500},{\"type\":\"ios\",\"rules\":[{\"res\":[1242,2688]}],\"dpi\":458,\"bw\":4,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G570M/*\"},{\"ua\":\"SM-G570M\"}],\"dpi\":320,\"bw\":3.684,\"ac\":1000},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G970F/*\"},{\"ua\":\"SM-G970F\"}],\"dpi\":438,\"bw\":2.281,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G973F/*\"},{\"ua\":\"SM-G973F\"}],\"dpi\":550,\"bw\":2.002,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G975F/*\"},{\"ua\":\"SM-G975F\"}],\"dpi\":522,\"bw\":2.054,\"ac\":500},{\"type\":\"android\",\"rules\":[{\"mdmh\":\"samsung/*/SM-G977F/*\"},{\"ua\":\"SM-G977F\"}],\"dpi\":505,\"bw\":2.334,\"ac\":500},{\"type\":\"ios\",\"rules\":[{\"res\":[828,1792]}],\"dpi\":326,\"bw\":5,\"ac\":500}];\nvar DPDB_CACHE = {\n\tformat: format,\n\tlast_updated: last_updated,\n\tdevices: devices\n};\nfunction Dpdb(url, onDeviceParamsUpdated) {\n this.dpdb = DPDB_CACHE;\n this.recalculateDeviceParams_();\n if (url) {\n this.onDeviceParamsUpdated = onDeviceParamsUpdated;\n var xhr = new XMLHttpRequest();\n var obj = this;\n xhr.open('GET', url, true);\n xhr.addEventListener('load', function () {\n obj.loading = false;\n if (xhr.status >= 200 && xhr.status <= 299) {\n obj.dpdb = JSON.parse(xhr.response);\n obj.recalculateDeviceParams_();\n } else {\n console.error('Error loading online DPDB!');\n }\n });\n xhr.send();\n }\n}\nDpdb.prototype.getDeviceParams = function () {\n return this.deviceParams;\n};\nDpdb.prototype.recalculateDeviceParams_ = function () {\n var newDeviceParams = this.calcDeviceParams_();\n if (newDeviceParams) {\n this.deviceParams = newDeviceParams;\n if (this.onDeviceParamsUpdated) {\n this.onDeviceParamsUpdated(this.deviceParams);\n }\n } else {\n console.error('Failed to recalculate device parameters.');\n }\n};\nDpdb.prototype.calcDeviceParams_ = function () {\n var db = this.dpdb;\n if (!db) {\n console.error('DPDB not available.');\n return null;\n }\n if (db.format != 1) {\n console.error('DPDB has unexpected format version.');\n return null;\n }\n if (!db.devices || !db.devices.length) {\n console.error('DPDB does not have a devices section.');\n return null;\n }\n var userAgent = navigator.userAgent || navigator.vendor || window.opera;\n var width = getScreenWidth();\n var height = getScreenHeight();\n if (!db.devices) {\n console.error('DPDB has no devices section.');\n return null;\n }\n for (var i = 0; i < db.devices.length; i++) {\n var device = db.devices[i];\n if (!device.rules) {\n console.warn('Device[' + i + '] has no rules section.');\n continue;\n }\n if (device.type != 'ios' && device.type != 'android') {\n console.warn('Device[' + i + '] has invalid type.');\n continue;\n }\n if (isIOS() != (device.type == 'ios')) continue;\n var matched = false;\n for (var j = 0; j < device.rules.length; j++) {\n var rule = device.rules[j];\n if (this.ruleMatches_(rule, userAgent, width, height)) {\n matched = true;\n break;\n }\n }\n if (!matched) continue;\n var xdpi = device.dpi[0] || device.dpi;\n var ydpi = device.dpi[1] || device.dpi;\n return new DeviceParams({ xdpi: xdpi, ydpi: ydpi, bevelMm: device.bw });\n }\n console.warn('No DPDB device match.');\n return null;\n};\nDpdb.prototype.ruleMatches_ = function (rule, ua, screenWidth, screenHeight) {\n if (!rule.ua && !rule.res) return false;\n if (rule.ua && rule.ua.substring(0, 2) === 'SM') rule.ua = rule.ua.substring(0, 7);\n if (rule.ua && ua.indexOf(rule.ua) < 0) return false;\n if (rule.res) {\n if (!rule.res[0] || !rule.res[1]) return false;\n var resX = rule.res[0];\n var resY = rule.res[1];\n if (Math.min(screenWidth, screenHeight) != Math.min(resX, resY) || Math.max(screenWidth, screenHeight) != Math.max(resX, resY)) {\n return false;\n }\n }\n return true;\n};\nfunction DeviceParams(params) {\n this.xdpi = params.xdpi;\n this.ydpi = params.ydpi;\n this.bevelMm = params.bevelMm;\n}\nfunction SensorSample(sample, timestampS) {\n this.set(sample, timestampS);\n}\nSensorSample.prototype.set = function (sample, timestampS) {\n this.sample = sample;\n this.timestampS = timestampS;\n};\nSensorSample.prototype.copy = function (sensorSample) {\n this.set(sensorSample.sample, sensorSample.timestampS);\n};\nfunction ComplementaryFilter(kFilter, isDebug) {\n this.kFilter = kFilter;\n this.isDebug = isDebug;\n this.currentAccelMeasurement = new SensorSample();\n this.currentGyroMeasurement = new SensorSample();\n this.previousGyroMeasurement = new SensorSample();\n if (isIOS()) {\n this.filterQ = new Quaternion(-1, 0, 0, 1);\n } else {\n this.filterQ = new Quaternion(1, 0, 0, 1);\n }\n this.previousFilterQ = new Quaternion();\n this.previousFilterQ.copy(this.filterQ);\n this.accelQ = new Quaternion();\n this.isOrientationInitialized = false;\n this.estimatedGravity = new Vector3();\n this.measuredGravity = new Vector3();\n this.gyroIntegralQ = new Quaternion();\n}\nComplementaryFilter.prototype.addAccelMeasurement = function (vector, timestampS) {\n this.currentAccelMeasurement.set(vector, timestampS);\n};\nComplementaryFilter.prototype.addGyroMeasurement = function (vector, timestampS) {\n this.currentGyroMeasurement.set(vector, timestampS);\n var deltaT = timestampS - this.previousGyroMeasurement.timestampS;\n if (isTimestampDeltaValid(deltaT)) {\n this.run_();\n }\n this.previousGyroMeasurement.copy(this.currentGyroMeasurement);\n};\nComplementaryFilter.prototype.run_ = function () {\n if (!this.isOrientationInitialized) {\n this.accelQ = this.accelToQuaternion_(this.currentAccelMeasurement.sample);\n this.previousFilterQ.copy(this.accelQ);\n this.isOrientationInitialized = true;\n return;\n }\n var deltaT = this.currentGyroMeasurement.timestampS - this.previousGyroMeasurement.timestampS;\n var gyroDeltaQ = this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample, deltaT);\n this.gyroIntegralQ.multiply(gyroDeltaQ);\n this.filterQ.copy(this.previousFilterQ);\n this.filterQ.multiply(gyroDeltaQ);\n var invFilterQ = new Quaternion();\n invFilterQ.copy(this.filterQ);\n invFilterQ.inverse();\n this.estimatedGravity.set(0, 0, -1);\n this.estimatedGravity.applyQuaternion(invFilterQ);\n this.estimatedGravity.normalize();\n this.measuredGravity.copy(this.currentAccelMeasurement.sample);\n this.measuredGravity.normalize();\n var deltaQ = new Quaternion();\n deltaQ.setFromUnitVectors(this.estimatedGravity, this.measuredGravity);\n deltaQ.inverse();\n if (this.isDebug) {\n console.log('Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)', radToDeg * getQuaternionAngle(deltaQ), this.estimatedGravity.x.toFixed(1), this.estimatedGravity.y.toFixed(1), this.estimatedGravity.z.toFixed(1), this.measuredGravity.x.toFixed(1), this.measuredGravity.y.toFixed(1), this.measuredGravity.z.toFixed(1));\n }\n var targetQ = new Quaternion();\n targetQ.copy(this.filterQ);\n targetQ.multiply(deltaQ);\n this.filterQ.slerp(targetQ, 1 - this.kFilter);\n this.previousFilterQ.copy(this.filterQ);\n};\nComplementaryFilter.prototype.getOrientation = function () {\n return this.filterQ;\n};\nComplementaryFilter.prototype.accelToQuaternion_ = function (accel) {\n var normAccel = new Vector3();\n normAccel.copy(accel);\n normAccel.normalize();\n var quat = new Quaternion();\n quat.setFromUnitVectors(new Vector3(0, 0, -1), normAccel);\n quat.inverse();\n return quat;\n};\nComplementaryFilter.prototype.gyroToQuaternionDelta_ = function (gyro, dt) {\n var quat = new Quaternion();\n var axis = new Vector3();\n axis.copy(gyro);\n axis.normalize();\n quat.setFromAxisAngle(axis, gyro.length() * dt);\n return quat;\n};\nfunction PosePredictor(predictionTimeS, isDebug) {\n this.predictionTimeS = predictionTimeS;\n this.isDebug = isDebug;\n this.previousQ = new Quaternion();\n this.previousTimestampS = null;\n this.deltaQ = new Quaternion();\n this.outQ = new Quaternion();\n}\nPosePredictor.prototype.getPrediction = function (currentQ, gyro, timestampS) {\n if (!this.previousTimestampS) {\n this.previousQ.copy(currentQ);\n this.previousTimestampS = timestampS;\n return currentQ;\n }\n var axis = new Vector3();\n axis.copy(gyro);\n axis.normalize();\n var angularSpeed = gyro.length();\n if (angularSpeed < degToRad * 20) {\n if (this.isDebug) {\n console.log('Moving slowly, at %s deg/s: no prediction', (radToDeg * angularSpeed).toFixed(1));\n }\n this.outQ.copy(currentQ);\n this.previousQ.copy(currentQ);\n return this.outQ;\n }\n var predictAngle = angularSpeed * this.predictionTimeS;\n this.deltaQ.setFromAxisAngle(axis, predictAngle);\n this.outQ.copy(this.previousQ);\n this.outQ.multiply(this.deltaQ);\n this.previousQ.copy(currentQ);\n this.previousTimestampS = timestampS;\n return this.outQ;\n};\nfunction FusionPoseSensor(kFilter, predictionTime, yawOnly, isDebug) {\n this.yawOnly = yawOnly;\n this.accelerometer = new Vector3();\n this.gyroscope = new Vector3();\n this.filter = new ComplementaryFilter(kFilter, isDebug);\n this.posePredictor = new PosePredictor(predictionTime, isDebug);\n this.isFirefoxAndroid = isFirefoxAndroid();\n this.isIOS = isIOS();\n var chromeVersion = getChromeVersion();\n this.isDeviceMotionInRadians = !this.isIOS && chromeVersion && chromeVersion < 66;\n this.isWithoutDeviceMotion = isChromeWithoutDeviceMotion() || isSafariWithoutDeviceMotion();\n this.filterToWorldQ = new Quaternion();\n if (isIOS()) {\n this.filterToWorldQ.setFromAxisAngle(new Vector3(1, 0, 0), Math.PI / 2);\n } else {\n this.filterToWorldQ.setFromAxisAngle(new Vector3(1, 0, 0), -Math.PI / 2);\n }\n this.inverseWorldToScreenQ = new Quaternion();\n this.worldToScreenQ = new Quaternion();\n this.originalPoseAdjustQ = new Quaternion();\n this.originalPoseAdjustQ.setFromAxisAngle(new Vector3(0, 0, 1), -window.orientation * Math.PI / 180);\n this.setScreenTransform_();\n if (isLandscapeMode()) {\n this.filterToWorldQ.multiply(this.inverseWorldToScreenQ);\n }\n this.resetQ = new Quaternion();\n this.orientationOut_ = new Float32Array(4);\n this.start();\n}\nFusionPoseSensor.prototype.getPosition = function () {\n return null;\n};\nFusionPoseSensor.prototype.getOrientation = function () {\n var orientation = void 0;\n if (this.isWithoutDeviceMotion && this._deviceOrientationQ) {\n this.deviceOrientationFixQ = this.deviceOrientationFixQ || function () {\n var z = new Quaternion().setFromAxisAngle(new Vector3(0, 0, -1), 0);\n var y = new Quaternion();\n if (window.orientation === -90) {\n y.setFromAxisAngle(new Vector3(0, 1, 0), Math.PI / -2);\n } else {\n y.setFromAxisAngle(new Vector3(0, 1, 0), Math.PI / 2);\n }\n return z.multiply(y);\n }();\n this.deviceOrientationFilterToWorldQ = this.deviceOrientationFilterToWorldQ || function () {\n var q = new Quaternion();\n q.setFromAxisAngle(new Vector3(1, 0, 0), -Math.PI / 2);\n return q;\n }();\n orientation = this._deviceOrientationQ;\n var out = new Quaternion();\n out.copy(orientation);\n out.multiply(this.deviceOrientationFilterToWorldQ);\n out.multiply(this.resetQ);\n out.multiply(this.worldToScreenQ);\n out.multiplyQuaternions(this.deviceOrientationFixQ, out);\n if (this.yawOnly) {\n out.x = 0;\n out.z = 0;\n out.normalize();\n }\n this.orientationOut_[0] = out.x;\n this.orientationOut_[1] = out.y;\n this.orientationOut_[2] = out.z;\n this.orientationOut_[3] = out.w;\n return this.orientationOut_;\n } else {\n var filterOrientation = this.filter.getOrientation();\n orientation = this.posePredictor.getPrediction(filterOrientation, this.gyroscope, this.previousTimestampS);\n }\n var out = new Quaternion();\n out.copy(this.filterToWorldQ);\n out.multiply(this.resetQ);\n out.multiply(orientation);\n out.multiply(this.worldToScreenQ);\n if (this.yawOnly) {\n out.x = 0;\n out.z = 0;\n out.normalize();\n }\n this.orientationOut_[0] = out.x;\n this.orientationOut_[1] = out.y;\n this.orientationOut_[2] = out.z;\n this.orientationOut_[3] = out.w;\n return this.orientationOut_;\n};\nFusionPoseSensor.prototype.resetPose = function () {\n this.resetQ.copy(this.filter.getOrientation());\n this.resetQ.x = 0;\n this.resetQ.y = 0;\n this.resetQ.z *= -1;\n this.resetQ.normalize();\n if (isLandscapeMode()) {\n this.resetQ.multiply(this.inverseWorldToScreenQ);\n }\n this.resetQ.multiply(this.originalPoseAdjustQ);\n};\nFusionPoseSensor.prototype.onDeviceOrientation_ = function (e) {\n this._deviceOrientationQ = this._deviceOrientationQ || new Quaternion();\n var alpha = e.alpha,\n beta = e.beta,\n gamma = e.gamma;\n alpha = (alpha || 0) * Math.PI / 180;\n beta = (beta || 0) * Math.PI / 180;\n gamma = (gamma || 0) * Math.PI / 180;\n this._deviceOrientationQ.setFromEulerYXZ(beta, alpha, -gamma);\n};\nFusionPoseSensor.prototype.onDeviceMotion_ = function (deviceMotion) {\n this.updateDeviceMotion_(deviceMotion);\n};\nFusionPoseSensor.prototype.updateDeviceMotion_ = function (deviceMotion) {\n var accGravity = deviceMotion.accelerationIncludingGravity;\n var rotRate = deviceMotion.rotationRate;\n var timestampS = deviceMotion.timeStamp / 1000;\n var deltaS = timestampS - this.previousTimestampS;\n if (deltaS < 0) {\n warnOnce('fusion-pose-sensor:invalid:non-monotonic', 'Invalid timestamps detected: non-monotonic timestamp from devicemotion');\n this.previousTimestampS = timestampS;\n return;\n } else if (deltaS <= MIN_TIMESTEP || deltaS > MAX_TIMESTEP) {\n warnOnce('fusion-pose-sensor:invalid:outside-threshold', 'Invalid timestamps detected: Timestamp from devicemotion outside expected range.');\n this.previousTimestampS = timestampS;\n return;\n }\n this.accelerometer.set(-accGravity.x, -accGravity.y, -accGravity.z);\n if (rotRate) {\n if (isR7()) {\n this.gyroscope.set(-rotRate.beta, rotRate.alpha, rotRate.gamma);\n } else {\n this.gyroscope.set(rotRate.alpha, rotRate.beta, rotRate.gamma);\n }\n if (!this.isDeviceMotionInRadians) {\n this.gyroscope.multiplyScalar(Math.PI / 180);\n }\n this.filter.addGyroMeasurement(this.gyroscope, timestampS);\n }\n this.filter.addAccelMeasurement(this.accelerometer, timestampS);\n this.previousTimestampS = timestampS;\n};\nFusionPoseSensor.prototype.onOrientationChange_ = function (screenOrientation) {\n this.setScreenTransform_();\n};\nFusionPoseSensor.prototype.onMessage_ = function (event) {\n var message = event.data;\n if (!message || !message.type) {\n return;\n }\n var type = message.type.toLowerCase();\n if (type !== 'devicemotion') {\n return;\n }\n this.updateDeviceMotion_(message.deviceMotionEvent);\n};\nFusionPoseSensor.prototype.setScreenTransform_ = function () {\n this.worldToScreenQ.set(0, 0, 0, 1);\n switch (window.orientation) {\n case 0:\n break;\n case 90:\n this.worldToScreenQ.setFromAxisAngle(new Vector3(0, 0, 1), -Math.PI / 2);\n break;\n case -90:\n this.worldToScreenQ.setFromAxisAngle(new Vector3(0, 0, 1), Math.PI / 2);\n break;\n case 180:\n break;\n }\n this.inverseWorldToScreenQ.copy(this.worldToScreenQ);\n this.inverseWorldToScreenQ.inverse();\n};\nFusionPoseSensor.prototype.start = function () {\n this.onDeviceMotionCallback_ = this.onDeviceMotion_.bind(this);\n this.onOrientationChangeCallback_ = this.onOrientationChange_.bind(this);\n this.onMessageCallback_ = this.onMessage_.bind(this);\n this.onDeviceOrientationCallback_ = this.onDeviceOrientation_.bind(this);\n if (isIOS() && isInsideCrossOriginIFrame()) {\n window.addEventListener('message', this.onMessageCallback_);\n }\n window.addEventListener('orientationchange', this.onOrientationChangeCallback_);\n if (this.isWithoutDeviceMotion) {\n window.addEventListener('deviceorientation', this.onDeviceOrientationCallback_);\n } else {\n window.addEventListener('devicemotion', this.onDeviceMotionCallback_);\n }\n};\nFusionPoseSensor.prototype.stop = function () {\n window.removeEventListener('devicemotion', this.onDeviceMotionCallback_);\n window.removeEventListener('deviceorientation', this.onDeviceOrientationCallback_);\n window.removeEventListener('orientationchange', this.onOrientationChangeCallback_);\n window.removeEventListener('message', this.onMessageCallback_);\n};\nvar SENSOR_FREQUENCY = 60;\nvar X_AXIS = new Vector3(1, 0, 0);\nvar Z_AXIS = new Vector3(0, 0, 1);\nvar SENSOR_TO_VR = new Quaternion();\nSENSOR_TO_VR.setFromAxisAngle(X_AXIS, -Math.PI / 2);\nSENSOR_TO_VR.multiply(new Quaternion().setFromAxisAngle(Z_AXIS, Math.PI / 2));\nvar PoseSensor = function () {\n function PoseSensor(config) {\n classCallCheck(this, PoseSensor);\n this.config = config;\n this.sensor = null;\n this.fusionSensor = null;\n this._out = new Float32Array(4);\n this.api = null;\n this.errors = [];\n this._sensorQ = new Quaternion();\n this._outQ = new Quaternion();\n this._onSensorRead = this._onSensorRead.bind(this);\n this._onSensorError = this._onSensorError.bind(this);\n this.init();\n }\n createClass(PoseSensor, [{\n key: 'init',\n value: function init() {\n var sensor = null;\n try {\n sensor = new RelativeOrientationSensor({\n frequency: SENSOR_FREQUENCY,\n referenceFrame: 'screen'\n });\n sensor.addEventListener('error', this._onSensorError);\n } catch (error) {\n this.errors.push(error);\n if (error.name === 'SecurityError') {\n console.error('Cannot construct sensors due to the Feature Policy');\n console.warn('Attempting to fall back using \"devicemotion\"; however this will ' + 'fail in the future without correct permissions.');\n this.useDeviceMotion();\n } else if (error.name === 'ReferenceError') {\n this.useDeviceMotion();\n } else {\n console.error(error);\n }\n }\n if (sensor) {\n this.api = 'sensor';\n this.sensor = sensor;\n this.sensor.addEventListener('reading', this._onSensorRead);\n this.sensor.start();\n }\n }\n }, {\n key: 'useDeviceMotion',\n value: function useDeviceMotion() {\n this.api = 'devicemotion';\n this.fusionSensor = new FusionPoseSensor(this.config.K_FILTER, this.config.PREDICTION_TIME_S, this.config.YAW_ONLY, this.config.DEBUG);\n if (this.sensor) {\n this.sensor.removeEventListener('reading', this._onSensorRead);\n this.sensor.removeEventListener('error', this._onSensorError);\n this.sensor = null;\n }\n }\n }, {\n key: 'getOrientation',\n value: function getOrientation() {\n if (this.fusionSensor) {\n return this.fusionSensor.getOrientation();\n }\n if (!this.sensor || !this.sensor.quaternion) {\n this._out[0] = this._out[1] = this._out[2] = 0;\n this._out[3] = 1;\n return this._out;\n }\n var q = this.sensor.quaternion;\n this._sensorQ.set(q[0], q[1], q[2], q[3]);\n var out = this._outQ;\n out.copy(SENSOR_TO_VR);\n out.multiply(this._sensorQ);\n if (this.config.YAW_ONLY) {\n out.x = out.z = 0;\n out.normalize();\n }\n this._out[0] = out.x;\n this._out[1] = out.y;\n this._out[2] = out.z;\n this._out[3] = out.w;\n return this._out;\n }\n }, {\n key: '_onSensorError',\n value: function _onSensorError(event) {\n this.errors.push(event.error);\n if (event.error.name === 'NotAllowedError') {\n console.error('Permission to access sensor was denied');\n } else if (event.error.name === 'NotReadableError') {\n console.error('Sensor could not be read');\n } else {\n console.error(event.error);\n }\n this.useDeviceMotion();\n }\n }, {\n key: '_onSensorRead',\n value: function _onSensorRead() {}\n }]);\n return PoseSensor;\n}();\nvar rotateInstructionsAsset = \"<svg width='198' height='240' viewBox='0 0 198 240' xmlns='http://www.w3.org/2000/svg'><g fill='none' fill-rule='evenodd'><path d='M149.625 109.527l6.737 3.891v.886c0 .177.013.36.038.549.01.081.02.162.027.242.14 1.415.974 2.998 2.105 3.999l5.72 5.062.081-.09s4.382-2.53 5.235-3.024l25.97 14.993v54.001c0 .771-.386 1.217-.948 1.217-.233 0-.495-.076-.772-.236l-23.967-13.838-.014.024-27.322 15.775-.85-1.323c-4.731-1.529-9.748-2.74-14.951-3.61a.27.27 0 0 0-.007.024l-5.067 16.961-7.891 4.556-.037-.063v27.59c0 .772-.386 1.217-.948 1.217-.232 0-.495-.076-.772-.236l-42.473-24.522c-.95-.549-1.72-1.877-1.72-2.967v-1.035l-.021.047a5.111 5.111 0 0 0-1.816-.399 5.682 5.682 0 0 0-.546.001 13.724 13.724 0 0 1-1.918-.041c-1.655-.153-3.2-.6-4.404-1.296l-46.576-26.89.005.012-10.278-18.75c-1.001-1.827-.241-4.216 1.698-5.336l56.011-32.345a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.659 3.227 1.853l.005-.003.227.413-.006.004a9.63 9.63 0 0 0 1.477 2.018l.277.27c1.914 1.85 4.468 2.801 7.113 2.801 1.949 0 3.948-.517 5.775-1.572.013 0 7.319-4.219 7.319-4.219a4.194 4.194 0 0 1 2.099-.572c1.326 0 2.572.658 3.226 1.853l3.25 5.928.022-.018 6.785 3.917-.105-.182 46.881-26.965m0-1.635c-.282 0-.563.073-.815.218l-46.169 26.556-5.41-3.124-3.005-5.481c-.913-1.667-2.699-2.702-4.66-2.703-1.011 0-2.02.274-2.917.792a3825 3825 0 0 1-7.275 4.195l-.044.024a9.937 9.937 0 0 1-4.957 1.353c-2.292 0-4.414-.832-5.976-2.342l-.252-.245a7.992 7.992 0 0 1-1.139-1.534 1.379 1.379 0 0 0-.06-.122l-.227-.414a1.718 1.718 0 0 0-.095-.154c-.938-1.574-2.673-2.545-4.571-2.545-1.011 0-2.02.274-2.917.792L3.125 155.502c-2.699 1.559-3.738 4.94-2.314 7.538l10.278 18.75c.177.323.448.563.761.704l46.426 26.804c1.403.81 3.157 1.332 5.072 1.508a15.661 15.661 0 0 0 2.146.046 4.766 4.766 0 0 1 .396 0c.096.004.19.011.283.022.109 1.593 1.159 3.323 2.529 4.114l42.472 24.522c.524.302 1.058.455 1.59.455 1.497 0 2.583-1.2 2.583-2.852v-26.562l7.111-4.105a1.64 1.64 0 0 0 .749-.948l4.658-15.593c4.414.797 8.692 1.848 12.742 3.128l.533.829a1.634 1.634 0 0 0 2.193.531l26.532-15.317L193 192.433c.523.302 1.058.455 1.59.455 1.497 0 2.583-1.199 2.583-2.852v-54.001c0-.584-.312-1.124-.818-1.416l-25.97-14.993a1.633 1.633 0 0 0-1.636.001c-.606.351-2.993 1.73-4.325 2.498l-4.809-4.255c-.819-.725-1.461-1.933-1.561-2.936a7.776 7.776 0 0 0-.033-.294 2.487 2.487 0 0 1-.023-.336v-.886c0-.584-.312-1.123-.817-1.416l-6.739-3.891a1.633 1.633 0 0 0-.817-.219' fill='#455A64'/><path d='M96.027 132.636l46.576 26.891c1.204.695 1.979 1.587 2.242 2.541l-.01.007-81.374 46.982h-.001c-1.654-.152-3.199-.6-4.403-1.295l-46.576-26.891 83.546-48.235' fill='#FAFAFA'/><path d='M63.461 209.174c-.008 0-.015 0-.022-.002-1.693-.156-3.228-.609-4.441-1.309l-46.576-26.89a.118.118 0 0 1 0-.203l83.546-48.235a.117.117 0 0 1 .117 0l46.576 26.891c1.227.708 2.021 1.612 2.296 2.611a.116.116 0 0 1-.042.124l-.021.016-81.375 46.981a.11.11 0 0 1-.058.016zm-50.747-28.303l46.401 26.79c1.178.68 2.671 1.121 4.32 1.276l81.272-46.922c-.279-.907-1.025-1.73-2.163-2.387l-46.517-26.857-83.313 48.1z' fill='#607D8B'/><path d='M148.327 165.471a5.85 5.85 0 0 1-.546.001c-1.894-.083-3.302-1.038-3.145-2.132a2.693 2.693 0 0 0-.072-1.105l-81.103 46.822c.628.058 1.272.073 1.918.042.182-.009.364-.009.546-.001 1.894.083 3.302 1.038 3.145 2.132l79.257-45.759' fill='#FFF'/><path d='M69.07 211.347a.118.118 0 0 1-.115-.134c.045-.317-.057-.637-.297-.925-.505-.61-1.555-1.022-2.738-1.074a5.966 5.966 0 0 0-.535.001 14.03 14.03 0 0 1-1.935-.041.117.117 0 0 1-.103-.092.116.116 0 0 1 .055-.126l81.104-46.822a.117.117 0 0 1 .171.07c.104.381.129.768.074 1.153-.045.316.057.637.296.925.506.61 1.555 1.021 2.739 1.073.178.008.357.008.535-.001a.117.117 0 0 1 .064.218l-79.256 45.759a.114.114 0 0 1-.059.016zm-3.405-2.372c.089 0 .177.002.265.006 1.266.056 2.353.488 2.908 1.158.227.274.35.575.36.882l78.685-45.429c-.036 0-.072-.001-.107-.003-1.267-.056-2.354-.489-2.909-1.158-.282-.34-.402-.724-.347-1.107a2.604 2.604 0 0 0-.032-.91L63.846 208.97a13.91 13.91 0 0 0 1.528.012c.097-.005.194-.007.291-.007z' fill='#607D8B'/><path d='M2.208 162.134c-1.001-1.827-.241-4.217 1.698-5.337l56.011-32.344c1.939-1.12 4.324-.546 5.326 1.281l.232.41a9.344 9.344 0 0 0 1.47 2.021l.278.27c3.325 3.214 8.583 3.716 12.888 1.23l7.319-4.22c1.94-1.119 4.324-.546 5.325 1.282l3.25 5.928-83.519 48.229-10.278-18.75z' fill='#FAFAFA'/><path d='M12.486 181.001a.112.112 0 0 1-.031-.005.114.114 0 0 1-.071-.056L2.106 162.19c-1.031-1.88-.249-4.345 1.742-5.494l56.01-32.344a4.328 4.328 0 0 1 2.158-.588c1.415 0 2.65.702 3.311 1.882.01.008.018.017.024.028l.227.414a.122.122 0 0 1 .013.038 9.508 9.508 0 0 0 1.439 1.959l.275.266c1.846 1.786 4.344 2.769 7.031 2.769 1.977 0 3.954-.538 5.717-1.557a.148.148 0 0 1 .035-.013l7.284-4.206a4.321 4.321 0 0 1 2.157-.588c1.427 0 2.672.716 3.329 1.914l3.249 5.929a.116.116 0 0 1-.044.157l-83.518 48.229a.116.116 0 0 1-.059.016zm49.53-57.004c-.704 0-1.41.193-2.041.557l-56.01 32.345c-1.882 1.086-2.624 3.409-1.655 5.179l10.221 18.645 83.317-48.112-3.195-5.829c-.615-1.122-1.783-1.792-3.124-1.792a4.08 4.08 0 0 0-2.04.557l-7.317 4.225a.148.148 0 0 1-.035.013 11.7 11.7 0 0 1-5.801 1.569c-2.748 0-5.303-1.007-7.194-2.835l-.278-.27a9.716 9.716 0 0 1-1.497-2.046.096.096 0 0 1-.013-.037l-.191-.347a.11.11 0 0 1-.023-.029c-.615-1.123-1.783-1.793-3.124-1.793z' fill='#607D8B'/><path d='M42.434 155.808c-2.51-.001-4.697-1.258-5.852-3.365-1.811-3.304-.438-7.634 3.059-9.654l12.291-7.098a7.599 7.599 0 0 1 3.789-1.033c2.51 0 4.697 1.258 5.852 3.365 1.811 3.304.439 7.634-3.059 9.654l-12.291 7.098a7.606 7.606 0 0 1-3.789 1.033zm13.287-20.683a7.128 7.128 0 0 0-3.555.971l-12.291 7.098c-3.279 1.893-4.573 5.942-2.883 9.024 1.071 1.955 3.106 3.122 5.442 3.122a7.13 7.13 0 0 0 3.556-.97l12.291-7.098c3.279-1.893 4.572-5.942 2.883-9.024-1.072-1.955-3.106-3.123-5.443-3.123z' fill='#607D8B'/><path d='M149.588 109.407l6.737 3.89v.887c0 .176.013.36.037.549.011.081.02.161.028.242.14 1.415.973 2.998 2.105 3.999l7.396 6.545c.177.156.358.295.541.415 1.579 1.04 2.95.466 3.062-1.282.049-.784.057-1.595.023-2.429l-.003-.16v-1.151l25.987 15.003v54c0 1.09-.77 1.53-1.72.982l-42.473-24.523c-.95-.548-1.72-1.877-1.72-2.966v-34.033' fill='#FAFAFA'/><path d='M194.553 191.25c-.257 0-.54-.085-.831-.253l-42.472-24.521c-.981-.567-1.779-1.943-1.779-3.068v-34.033h.234v34.033c0 1.051.745 2.336 1.661 2.866l42.473 24.521c.424.245.816.288 1.103.122.285-.164.442-.52.442-1.002v-53.933l-25.753-14.868.003 1.106c.034.832.026 1.654-.024 2.439-.054.844-.396 1.464-.963 1.746-.619.309-1.45.173-2.28-.373a5.023 5.023 0 0 1-.553-.426l-7.397-6.544c-1.158-1.026-1.999-2.625-2.143-4.076a9.624 9.624 0 0 0-.027-.238 4.241 4.241 0 0 1-.038-.564v-.82l-6.68-3.856.117-.202 6.738 3.89.058.034v.954c0 .171.012.351.036.533.011.083.021.165.029.246.138 1.395.948 2.935 2.065 3.923l7.397 6.545c.173.153.35.289.527.406.758.499 1.504.63 2.047.359.49-.243.786-.795.834-1.551.05-.778.057-1.591.024-2.417l-.004-.163v-1.355l.175.1 25.987 15.004.059.033v54.068c0 .569-.198.996-.559 1.204a1.002 1.002 0 0 1-.506.131' fill='#607D8B'/><path d='M145.685 163.161l24.115 13.922-25.978 14.998-1.462-.307c-6.534-2.17-13.628-3.728-21.019-4.616-4.365-.524-8.663 1.096-9.598 3.62a2.746 2.746 0 0 0-.011 1.928c1.538 4.267 4.236 8.363 7.995 12.135l.532.845-25.977 14.997-24.115-13.922 75.518-43.6' fill='#FFF'/><path d='M94.282 220.818l-.059-.033-24.29-14.024.175-.101 75.577-43.634.058.033 24.29 14.024-26.191 15.122-.045-.01-1.461-.307c-6.549-2.174-13.613-3.725-21.009-4.614a13.744 13.744 0 0 0-1.638-.097c-3.758 0-7.054 1.531-7.837 3.642a2.62 2.62 0 0 0-.01 1.848c1.535 4.258 4.216 8.326 7.968 12.091l.016.021.526.835.006.01.064.102-.105.061-25.977 14.998-.058.033zm-23.881-14.057l23.881 13.788 24.802-14.32c.546-.315.846-.489 1.017-.575l-.466-.74c-3.771-3.787-6.467-7.881-8.013-12.168a2.851 2.851 0 0 1 .011-2.008c.815-2.199 4.203-3.795 8.056-3.795.557 0 1.117.033 1.666.099 7.412.891 14.491 2.445 21.041 4.621.836.175 1.215.254 1.39.304l25.78-14.884-23.881-13.788-75.284 43.466z' fill='#607D8B'/><path d='M167.23 125.979v50.871l-27.321 15.773-6.461-14.167c-.91-1.996-3.428-1.738-5.624.574a10.238 10.238 0 0 0-2.33 4.018l-6.46 21.628-27.322 15.774v-50.871l75.518-43.6' fill='#FFF'/><path d='M91.712 220.567a.127.127 0 0 1-.059-.016.118.118 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.519-43.6a.117.117 0 0 1 .175.101v50.871c0 .041-.023.08-.059.1l-27.321 15.775a.118.118 0 0 1-.094.01.12.12 0 0 1-.071-.063l-6.46-14.168c-.375-.822-1.062-1.275-1.934-1.275-1.089 0-2.364.686-3.5 1.881a10.206 10.206 0 0 0-2.302 3.972l-6.46 21.627a.118.118 0 0 1-.054.068L91.77 220.551a.12.12 0 0 1-.058.016zm.117-50.92v50.601l27.106-15.65 6.447-21.583a10.286 10.286 0 0 1 2.357-4.065c1.18-1.242 2.517-1.954 3.669-1.954.969 0 1.731.501 2.146 1.411l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M168.543 126.213v50.87l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.624.574a10.248 10.248 0 0 0-2.33 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6' fill='#FFF'/><path d='M93.025 220.8a.123.123 0 0 1-.059-.015.12.12 0 0 1-.058-.101v-50.871c0-.042.023-.08.058-.101l75.518-43.6a.112.112 0 0 1 .117 0c.036.02.059.059.059.1v50.871a.116.116 0 0 1-.059.101l-27.321 15.774a.111.111 0 0 1-.094.01.115.115 0 0 1-.071-.062l-6.46-14.168c-.375-.823-1.062-1.275-1.935-1.275-1.088 0-2.363.685-3.499 1.881a10.19 10.19 0 0 0-2.302 3.971l-6.461 21.628a.108.108 0 0 1-.053.067l-27.322 15.775a.12.12 0 0 1-.058.015zm.117-50.919v50.6l27.106-15.649 6.447-21.584a10.293 10.293 0 0 1 2.357-4.065c1.179-1.241 2.516-1.954 3.668-1.954.969 0 1.732.502 2.147 1.412l6.407 14.051 27.152-15.676v-50.601l-75.284 43.466z' fill='#607D8B'/><path d='M169.8 177.083l-27.322 15.774-6.46-14.168c-.91-1.995-3.428-1.738-5.625.574a10.246 10.246 0 0 0-2.329 4.019l-6.461 21.627-27.321 15.774v-50.87l75.518-43.6v50.87z' fill='#FAFAFA'/><path d='M94.282 220.917a.234.234 0 0 1-.234-.233v-50.871c0-.083.045-.161.117-.202l75.518-43.601a.234.234 0 1 1 .35.202v50.871a.233.233 0 0 1-.116.202l-27.322 15.775a.232.232 0 0 1-.329-.106l-6.461-14.168c-.36-.789-.992-1.206-1.828-1.206-1.056 0-2.301.672-3.415 1.844a10.099 10.099 0 0 0-2.275 3.924l-6.46 21.628a.235.235 0 0 1-.107.136l-27.322 15.774a.23.23 0 0 1-.116.031zm.233-50.969v50.331l26.891-15.525 6.434-21.539a10.41 10.41 0 0 1 2.384-4.112c1.201-1.265 2.569-1.991 3.753-1.991 1.018 0 1.818.526 2.253 1.48l6.354 13.934 26.982-15.578v-50.331l-75.051 43.331z' fill='#607D8B'/><path d='M109.894 199.943c-1.774 0-3.241-.725-4.244-2.12a.224.224 0 0 1 .023-.294.233.233 0 0 1 .301-.023c.78.547 1.705.827 2.75.827 1.323 0 2.754-.439 4.256-1.306 5.311-3.067 9.631-10.518 9.631-16.611 0-1.927-.442-3.56-1.278-4.724a.232.232 0 0 1 .323-.327c1.671 1.172 2.591 3.381 2.591 6.219 0 6.242-4.426 13.863-9.865 17.003-1.574.908-3.084 1.356-4.488 1.356zm-2.969-1.542c.813.651 1.82.877 2.968.877h.001c1.321 0 2.753-.327 4.254-1.194 5.311-3.067 9.632-10.463 9.632-16.556 0-1.979-.463-3.599-1.326-4.761.411 1.035.625 2.275.625 3.635 0 6.243-4.426 13.883-9.865 17.023-1.574.909-3.084 1.317-4.49 1.317-.641 0-1.243-.149-1.799-.341z' fill='#607D8B'/><path d='M113.097 197.23c5.384-3.108 9.748-10.636 9.748-16.814 0-2.051-.483-3.692-1.323-4.86-1.784-1.252-4.374-1.194-7.257.47-5.384 3.108-9.748 10.636-9.748 16.814 0 2.051.483 3.692 1.323 4.86 1.784 1.252 4.374 1.194 7.257-.47' fill='#FAFAFA'/><path d='M108.724 198.614c-1.142 0-2.158-.213-3.019-.817-.021-.014-.04.014-.055-.007-.894-1.244-1.367-2.948-1.367-4.973 0-6.242 4.426-13.864 9.865-17.005 1.574-.908 3.084-1.363 4.49-1.363 1.142 0 2.158.309 3.018.913a.23.23 0 0 1 .056.056c.894 1.244 1.367 2.972 1.367 4.997 0 6.243-4.426 13.783-9.865 16.923-1.574.909-3.084 1.276-4.49 1.276zm-2.718-1.109c.774.532 1.688.776 2.718.776 1.323 0 2.754-.413 4.256-1.28 5.311-3.066 9.631-10.505 9.631-16.598 0-1.909-.434-3.523-1.255-4.685-.774-.533-1.688-.799-2.718-.799-1.323 0-2.755.441-4.256 1.308-5.311 3.066-9.631 10.506-9.631 16.599 0 1.909.434 3.517 1.255 4.679z' fill='#607D8B'/><path d='M149.318 114.262l-9.984 8.878 15.893 11.031 5.589-6.112-11.498-13.797' fill='#FAFAFA'/><path d='M169.676 120.84l-9.748 5.627c-3.642 2.103-9.528 2.113-13.147.024-3.62-2.089-3.601-5.488.041-7.591l9.495-5.608-6.729-3.885-81.836 47.071 45.923 26.514 3.081-1.779c.631-.365.869-.898.618-1.39-2.357-4.632-2.593-9.546-.683-14.262 5.638-13.92 24.509-24.815 48.618-28.07 8.169-1.103 16.68-.967 24.704.394.852.145 1.776.008 2.407-.357l3.081-1.778-25.825-14.91' fill='#FAFAFA'/><path d='M113.675 183.459a.47.47 0 0 1-.233-.062l-45.924-26.515a.468.468 0 0 1 .001-.809l81.836-47.071a.467.467 0 0 1 .466 0l6.729 3.885a.467.467 0 0 1-.467.809l-6.496-3.75-80.9 46.533 44.988 25.973 2.848-1.644c.192-.111.62-.409.435-.773-2.416-4.748-2.658-9.814-.7-14.65 2.806-6.927 8.885-13.242 17.582-18.263 8.657-4.998 19.518-8.489 31.407-10.094 8.198-1.107 16.79-.97 24.844.397.739.125 1.561.007 2.095-.301l2.381-1.374-25.125-14.506a.467.467 0 0 1 .467-.809l25.825 14.91a.467.467 0 0 1 0 .809l-3.081 1.779c-.721.417-1.763.575-2.718.413-7.963-1.351-16.457-1.486-24.563-.392-11.77 1.589-22.512 5.039-31.065 9.977-8.514 4.916-14.456 11.073-17.183 17.805-1.854 4.578-1.623 9.376.666 13.875.37.725.055 1.513-.8 2.006l-3.081 1.78a.476.476 0 0 1-.234.062' fill='#455A64'/><path d='M153.316 128.279c-2.413 0-4.821-.528-6.652-1.586-1.818-1.049-2.82-2.461-2.82-3.975 0-1.527 1.016-2.955 2.861-4.02l9.493-5.607a.233.233 0 1 1 .238.402l-9.496 5.609c-1.696.979-2.628 2.263-2.628 3.616 0 1.34.918 2.608 2.585 3.571 3.549 2.049 9.343 2.038 12.914-.024l9.748-5.628a.234.234 0 0 1 .234.405l-9.748 5.628c-1.858 1.072-4.296 1.609-6.729 1.609' fill='#607D8B'/><path d='M113.675 182.992l-45.913-26.508M113.675 183.342a.346.346 0 0 1-.175-.047l-45.913-26.508a.35.35 0 1 1 .35-.607l45.913 26.508a.35.35 0 0 1-.175.654' fill='#455A64'/><path d='M67.762 156.484v54.001c0 1.09.77 2.418 1.72 2.967l42.473 24.521c.95.549 1.72.11 1.72-.98v-54.001' fill='#FAFAFA'/><path d='M112.727 238.561c-.297 0-.62-.095-.947-.285l-42.473-24.521c-1.063-.613-1.895-2.05-1.895-3.27v-54.001a.35.35 0 1 1 .701 0v54.001c0 .96.707 2.18 1.544 2.663l42.473 24.522c.344.198.661.243.87.122.206-.119.325-.411.325-.799v-54.001a.35.35 0 1 1 .7 0v54.001c0 .655-.239 1.154-.675 1.406a1.235 1.235 0 0 1-.623.162' fill='#455A64'/><path d='M112.86 147.512h-.001c-2.318 0-4.499-.522-6.142-1.471-1.705-.984-2.643-2.315-2.643-3.749 0-1.445.952-2.791 2.68-3.788l12.041-6.953c1.668-.962 3.874-1.493 6.212-1.493 2.318 0 4.499.523 6.143 1.472 1.704.984 2.643 2.315 2.643 3.748 0 1.446-.952 2.791-2.68 3.789l-12.042 6.952c-1.668.963-3.874 1.493-6.211 1.493zm12.147-16.753c-2.217 0-4.298.497-5.861 1.399l-12.042 6.952c-1.502.868-2.33 1.998-2.33 3.182 0 1.173.815 2.289 2.293 3.142 1.538.889 3.596 1.378 5.792 1.378h.001c2.216 0 4.298-.497 5.861-1.399l12.041-6.953c1.502-.867 2.33-1.997 2.33-3.182 0-1.172-.814-2.288-2.292-3.142-1.539-.888-3.596-1.377-5.793-1.377z' fill='#607D8B'/><path d='M165.63 123.219l-5.734 3.311c-3.167 1.828-8.286 1.837-11.433.02-3.147-1.817-3.131-4.772.036-6.601l5.734-3.31 11.397 6.58' fill='#FAFAFA'/><path d='M154.233 117.448l9.995 5.771-4.682 2.704c-1.434.827-3.352 1.283-5.399 1.283-2.029 0-3.923-.449-5.333-1.263-1.29-.744-2-1.694-2-2.674 0-.991.723-1.955 2.036-2.713l5.383-3.108m0-.809l-5.734 3.31c-3.167 1.829-3.183 4.784-.036 6.601 1.568.905 3.623 1.357 5.684 1.357 2.077 0 4.159-.46 5.749-1.377l5.734-3.311-11.397-6.58M145.445 179.667c-1.773 0-3.241-.85-4.243-2.245-.067-.092-.057-.275.023-.356.08-.081.207-.12.3-.055.781.548 1.706.812 2.751.811 1.322 0 2.754-.446 4.256-1.313 5.31-3.066 9.631-10.522 9.631-16.615 0-1.927-.442-3.562-1.279-4.726a.235.235 0 0 1 .024-.301.232.232 0 0 1 .3-.027c1.67 1.172 2.59 3.38 2.59 6.219 0 6.242-4.425 13.987-9.865 17.127-1.573.908-3.083 1.481-4.488 1.481zM142.476 178c.814.651 1.82 1.002 2.969 1.002 1.322 0 2.753-.452 4.255-1.32 5.31-3.065 9.631-10.523 9.631-16.617 0-1.98-.463-3.63-1.325-4.793.411 1.035.624 2.26.624 3.62 0 6.242-4.425 13.875-9.865 17.015-1.573.909-3.084 1.376-4.489 1.376a5.49 5.49 0 0 1-1.8-.283z' fill='#607D8B'/><path d='M148.648 176.704c5.384-3.108 9.748-10.636 9.748-16.813 0-2.052-.483-3.693-1.322-4.861-1.785-1.252-4.375-1.194-7.258.471-5.383 3.108-9.748 10.636-9.748 16.813 0 2.051.484 3.692 1.323 4.86 1.785 1.253 4.374 1.195 7.257-.47' fill='#FAFAFA'/><path d='M144.276 178.276c-1.143 0-2.158-.307-3.019-.911a.217.217 0 0 1-.055-.054c-.895-1.244-1.367-2.972-1.367-4.997 0-6.241 4.425-13.875 9.865-17.016 1.573-.908 3.084-1.369 4.489-1.369 1.143 0 2.158.307 3.019.91a.24.24 0 0 1 .055.055c.894 1.244 1.367 2.971 1.367 4.997 0 6.241-4.425 13.875-9.865 17.016-1.573.908-3.084 1.369-4.489 1.369zm-2.718-1.172c.773.533 1.687.901 2.718.901 1.322 0 2.754-.538 4.256-1.405 5.31-3.066 9.631-10.567 9.631-16.661 0-1.908-.434-3.554-1.256-4.716-.774-.532-1.688-.814-2.718-.814-1.322 0-2.754.433-4.256 1.3-5.31 3.066-9.631 10.564-9.631 16.657 0 1.91.434 3.576 1.256 4.738z' fill='#607D8B'/><path d='M150.72 172.361l-.363-.295a24.105 24.105 0 0 0 2.148-3.128 24.05 24.05 0 0 0 1.977-4.375l.443.149a24.54 24.54 0 0 1-2.015 4.46 24.61 24.61 0 0 1-2.19 3.189M115.917 191.514l-.363-.294a24.174 24.174 0 0 0 2.148-3.128 24.038 24.038 0 0 0 1.976-4.375l.443.148a24.48 24.48 0 0 1-2.015 4.461 24.662 24.662 0 0 1-2.189 3.188M114 237.476V182.584 237.476' fill='#607D8B'/><g><path d='M81.822 37.474c.017-.135-.075-.28-.267-.392-.327-.188-.826-.21-1.109-.045l-6.012 3.471c-.131.076-.194.178-.191.285.002.132.002.461.002.578v.043l-.007.128-6.591 3.779c-.001 0-2.077 1.046-2.787 5.192 0 0-.912 6.961-.898 19.745.015 12.57.606 17.07 1.167 21.351.22 1.684 3.001 2.125 3.001 2.125.331.04.698-.027 1.08-.248l75.273-43.551c1.808-1.069 2.667-3.719 3.056-6.284 1.213-7.99 1.675-32.978-.275-39.878-.196-.693-.51-1.083-.868-1.282l-2.086-.79c-.727.028-1.416.467-1.534.535L82.032 37.072l-.21.402' fill='#FFF'/><path d='M144.311 1.701l2.085.79c.358.199.672.589.868 1.282 1.949 6.9 1.487 31.887.275 39.878-.39 2.565-1.249 5.215-3.056 6.284L69.21 93.486a1.78 1.78 0 0 1-.896.258l-.183-.011c0 .001-2.782-.44-3.003-2.124-.56-4.282-1.151-8.781-1.165-21.351-.015-12.784.897-19.745.897-19.745.71-4.146 2.787-5.192 2.787-5.192l6.591-3.779.007-.128v-.043c0-.117 0-.446-.002-.578-.003-.107.059-.21.191-.285l6.012-3.472a.98.98 0 0 1 .481-.11c.218 0 .449.053.627.156.193.112.285.258.268.392l.211-.402 60.744-34.836c.117-.068.806-.507 1.534-.535m0-.997l-.039.001c-.618.023-1.283.244-1.974.656l-.021.012-60.519 34.706a2.358 2.358 0 0 0-.831-.15c-.365 0-.704.084-.98.244l-6.012 3.471c-.442.255-.699.69-.689 1.166l.001.15-6.08 3.487c-.373.199-2.542 1.531-3.29 5.898l-.006.039c-.009.07-.92 7.173-.906 19.875.014 12.62.603 17.116 1.172 21.465l.002.015c.308 2.355 3.475 2.923 3.836 2.98l.034.004c.101.013.204.019.305.019a2.77 2.77 0 0 0 1.396-.392l75.273-43.552c1.811-1.071 2.999-3.423 3.542-6.997 1.186-7.814 1.734-33.096-.301-40.299-.253-.893-.704-1.527-1.343-1.882l-.132-.062-2.085-.789a.973.973 0 0 0-.353-.065' fill='#455A64'/><path d='M128.267 11.565l1.495.434-56.339 32.326' fill='#FFF'/><path d='M74.202 90.545a.5.5 0 0 1-.25-.931l18.437-10.645a.499.499 0 1 1 .499.864L74.451 90.478l-.249.067M75.764 42.654l-.108-.062.046-.171 5.135-2.964.17.045-.045.171-5.135 2.964-.063.017M70.52 90.375V46.421l.063-.036L137.84 7.554v43.954l-.062.036L70.52 90.375zm.25-43.811v43.38l66.821-38.579V7.985L70.77 46.564z' fill='#607D8B'/><path d='M86.986 83.182c-.23.149-.612.384-.849.523l-11.505 6.701c-.237.139-.206.252.068.252h.565c.275 0 .693-.113.93-.252L87.7 83.705c.237-.139.428-.253.425-.256a11.29 11.29 0 0 1-.006-.503c0-.274-.188-.377-.418-.227l-.715.463' fill='#607D8B'/><path d='M75.266 90.782H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.236-.138.615-.371.844-.519l.715-.464a.488.488 0 0 1 .266-.089c.172 0 .345.13.345.421 0 .214.001.363.003.437l.006.004-.004.069c-.003.075-.003.075-.486.356l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.108.866-.234l11.505-6.702c.168-.098.294-.173.361-.214-.004-.084-.004-.218-.004-.437l-.095-.171-.131.049-.714.463c-.232.15-.616.386-.854.525l-11.505 6.702-.029.018z' fill='#607D8B'/><path d='M75.266 89.871H74.7c-.2 0-.316-.056-.346-.166-.03-.11.043-.217.215-.317l11.505-6.702c.258-.151.694-.268.993-.268h.565c.2 0 .316.056.346.166.03.11-.043.217-.215.317l-11.505 6.702a2.282 2.282 0 0 1-.992.268zm-.6-.25l.034.001h.566c.252 0 .649-.107.866-.234l11.505-6.702.03-.018-.035-.001h-.565c-.252 0-.649.108-.867.234l-11.505 6.702-.029.018zM74.37 90.801v-1.247 1.247' fill='#607D8B'/><path d='M68.13 93.901c-.751-.093-1.314-.737-1.439-1.376-.831-4.238-1.151-8.782-1.165-21.352-.015-12.784.897-19.745.897-19.745.711-4.146 2.787-5.192 2.787-5.192l74.859-43.219c.223-.129 2.487-1.584 3.195.923 1.95 6.9 1.488 31.887.275 39.878-.389 2.565-1.248 5.215-3.056 6.283L69.21 93.653c-.382.221-.749.288-1.08.248 0 0-2.781-.441-3.001-2.125-.561-4.281-1.152-8.781-1.167-21.351-.014-12.784.898-19.745.898-19.745.71-4.146 2.787-5.191 2.787-5.191l6.598-3.81.871-.119 6.599-3.83.046-.461L68.13 93.901' fill='#FAFAFA'/><path d='M68.317 94.161l-.215-.013h-.001l-.244-.047c-.719-.156-2.772-.736-2.976-2.292-.568-4.34-1.154-8.813-1.168-21.384-.014-12.654.891-19.707.9-19.777.725-4.231 2.832-5.338 2.922-5.382l6.628-3.827.87-.119 6.446-3.742.034-.334a.248.248 0 0 1 .273-.223.248.248 0 0 1 .223.272l-.059.589-6.752 3.919-.87.118-6.556 3.785c-.031.016-1.99 1.068-2.666 5.018-.007.06-.908 7.086-.894 19.702.014 12.539.597 16.996 1.161 21.305.091.691.689 1.154 1.309 1.452a1.95 1.95 0 0 1-.236-.609c-.781-3.984-1.155-8.202-1.17-21.399-.014-12.653.891-19.707.9-19.777.725-4.231 2.832-5.337 2.922-5.382-.004.001 74.444-42.98 74.846-43.212l.028-.017c.904-.538 1.72-.688 2.36-.433.555.221.949.733 1.172 1.52 2.014 7.128 1.46 32.219.281 39.983-.507 3.341-1.575 5.515-3.175 6.462L69.335 93.869a2.023 2.023 0 0 1-1.018.292zm-.147-.507c.293.036.604-.037.915-.217l75.273-43.551c1.823-1.078 2.602-3.915 2.934-6.106 1.174-7.731 1.731-32.695-.268-39.772-.178-.631-.473-1.032-.876-1.192-.484-.193-1.166-.052-1.921.397l-.034.021-74.858 43.218c-.031.017-1.989 1.069-2.666 5.019-.007.059-.908 7.085-.894 19.702.015 13.155.386 17.351 1.161 21.303.09.461.476.983 1.037 1.139.114.025.185.037.196.039h.001z' fill='#455A64'/><path d='M69.317 68.982c.489-.281.885-.056.885.505 0 .56-.396 1.243-.885 1.525-.488.282-.884.057-.884-.504 0-.56.396-1.243.884-1.526' fill='#FFF'/><path d='M68.92 71.133c-.289 0-.487-.228-.487-.625 0-.56.396-1.243.884-1.526a.812.812 0 0 1 .397-.121c.289 0 .488.229.488.626 0 .56-.396 1.243-.885 1.525a.812.812 0 0 1-.397.121m.794-2.459a.976.976 0 0 0-.49.147c-.548.317-.978 1.058-.978 1.687 0 .486.271.812.674.812a.985.985 0 0 0 .491-.146c.548-.317.978-1.057.978-1.687 0-.486-.272-.813-.675-.813' fill='#8097A2'/><path d='M68.92 70.947c-.271 0-.299-.307-.299-.439 0-.491.361-1.116.79-1.363a.632.632 0 0 1 .303-.096c.272 0 .301.306.301.438 0 .491-.363 1.116-.791 1.364a.629.629 0 0 1-.304.096m.794-2.086a.812.812 0 0 0-.397.121c-.488.283-.884.966-.884 1.526 0 .397.198.625.487.625a.812.812 0 0 0 .397-.121c.489-.282.885-.965.885-1.525 0-.397-.199-.626-.488-.626' fill='#8097A2'/><path d='M69.444 85.35c.264-.152.477-.031.477.272 0 .303-.213.67-.477.822-.263.153-.477.031-.477-.271 0-.302.214-.671.477-.823' fill='#FFF'/><path d='M69.23 86.51c-.156 0-.263-.123-.263-.337 0-.302.214-.671.477-.823a.431.431 0 0 1 .214-.066c.156 0 .263.124.263.338 0 .303-.213.67-.477.822a.431.431 0 0 1-.214.066m.428-1.412c-.1 0-.203.029-.307.09-.32.185-.57.618-.57.985 0 .309.185.524.449.524a.63.63 0 0 0 .308-.09c.32-.185.57-.618.57-.985 0-.309-.185-.524-.45-.524' fill='#8097A2'/><path d='M69.23 86.322l-.076-.149c0-.235.179-.544.384-.661l.12-.041.076.151c0 .234-.179.542-.383.66l-.121.04m.428-1.038a.431.431 0 0 0-.214.066c-.263.152-.477.521-.477.823 0 .214.107.337.263.337a.431.431 0 0 0 .214-.066c.264-.152.477-.519.477-.822 0-.214-.107-.338-.263-.338' fill='#8097A2'/><path d='M139.278 7.769v43.667L72.208 90.16V46.493l67.07-38.724' fill='#455A64'/><path d='M72.083 90.375V46.421l.063-.036 67.257-38.831v43.954l-.062.036-67.258 38.831zm.25-43.811v43.38l66.821-38.579V7.985L72.333 46.564z' fill='#607D8B'/></g><path d='M125.737 88.647l-7.639 3.334V84l-11.459 4.713v8.269L99 100.315l13.369 3.646 13.368-15.314' fill='#455A64'/></g></svg>\";\nfunction RotateInstructions() {\n this.loadIcon_();\n var overlay = document.createElement('div');\n var s = overlay.style;\n s.position = 'fixed';\n s.top = 0;\n s.right = 0;\n s.bottom = 0;\n s.left = 0;\n s.backgroundColor = 'gray';\n s.fontFamily = 'sans-serif';\n s.zIndex = 1000000;\n var img = document.createElement('img');\n img.src = this.icon;\n var s = img.style;\n s.marginLeft = '25%';\n s.marginTop = '25%';\n s.width = '50%';\n overlay.appendChild(img);\n var text = document.createElement('div');\n var s = text.style;\n s.textAlign = 'center';\n s.fontSize = '16px';\n s.lineHeight = '24px';\n s.margin = '24px 25%';\n s.width = '50%';\n text.innerHTML = 'Place your phone into your Cardboard viewer.';\n overlay.appendChild(text);\n var snackbar = document.createElement('div');\n var s = snackbar.style;\n s.backgroundColor = '#CFD8DC';\n s.position = 'fixed';\n s.bottom = 0;\n s.width = '100%';\n s.height = '48px';\n s.padding = '14px 24px';\n s.boxSizing = 'border-box';\n s.color = '#656A6B';\n overlay.appendChild(snackbar);\n var snackbarText = document.createElement('div');\n snackbarText.style.float = 'left';\n snackbarText.innerHTML = 'No Cardboard viewer?';\n var snackbarButton = document.createElement('a');\n snackbarButton.href = 'https://www.google.com/get/cardboard/get-cardboard/';\n snackbarButton.innerHTML = 'get one';\n snackbarButton.target = '_blank';\n var s = snackbarButton.style;\n s.float = 'right';\n s.fontWeight = 600;\n s.textTransform = 'uppercase';\n s.borderLeft = '1px solid gray';\n s.paddingLeft = '24px';\n s.textDecoration = 'none';\n s.color = '#656A6B';\n snackbar.appendChild(snackbarText);\n snackbar.appendChild(snackbarButton);\n this.overlay = overlay;\n this.text = text;\n this.hide();\n}\nRotateInstructions.prototype.show = function (parent) {\n if (!parent && !this.overlay.parentElement) {\n document.body.appendChild(this.overlay);\n } else if (parent) {\n if (this.overlay.parentElement && this.overlay.parentElement != parent) this.overlay.parentElement.removeChild(this.overlay);\n parent.appendChild(this.overlay);\n }\n this.overlay.style.display = 'block';\n var img = this.overlay.querySelector('img');\n var s = img.style;\n if (isLandscapeMode()) {\n s.width = '20%';\n s.marginLeft = '40%';\n s.marginTop = '3%';\n } else {\n s.width = '50%';\n s.marginLeft = '25%';\n s.marginTop = '25%';\n }\n};\nRotateInstructions.prototype.hide = function () {\n this.overlay.style.display = 'none';\n};\nRotateInstructions.prototype.showTemporarily = function (ms, parent) {\n this.show(parent);\n this.timer = setTimeout(this.hide.bind(this), ms);\n};\nRotateInstructions.prototype.disableShowTemporarily = function () {\n clearTimeout(this.timer);\n};\nRotateInstructions.prototype.update = function () {\n this.disableShowTemporarily();\n if (!isLandscapeMode() && isMobile()) {\n this.show();\n } else {\n this.hide();\n }\n};\nRotateInstructions.prototype.loadIcon_ = function () {\n this.icon = dataUri('image/svg+xml', rotateInstructionsAsset);\n};\nvar DEFAULT_VIEWER = 'CardboardV1';\nvar VIEWER_KEY = 'WEBVR_CARDBOARD_VIEWER';\nvar CLASS_NAME = 'webvr-polyfill-viewer-selector';\nfunction ViewerSelector(defaultViewer) {\n try {\n this.selectedKey = localStorage.getItem(VIEWER_KEY);\n } catch (error) {\n console.error('Failed to load viewer profile: %s', error);\n }\n if (!this.selectedKey) {\n this.selectedKey = defaultViewer || DEFAULT_VIEWER;\n }\n this.dialog = this.createDialog_(DeviceInfo.Viewers);\n this.root = null;\n this.onChangeCallbacks_ = [];\n}\nViewerSelector.prototype.show = function (root) {\n this.root = root;\n root.appendChild(this.dialog);\n var selected = this.dialog.querySelector('#' + this.selectedKey);\n selected.checked = true;\n this.dialog.style.display = 'block';\n};\nViewerSelector.prototype.hide = function () {\n if (this.root && this.root.contains(this.dialog)) {\n this.root.removeChild(this.dialog);\n }\n this.dialog.style.display = 'none';\n};\nViewerSelector.prototype.getCurrentViewer = function () {\n return DeviceInfo.Viewers[this.selectedKey];\n};\nViewerSelector.prototype.getSelectedKey_ = function () {\n var input = this.dialog.querySelector('input[name=field]:checked');\n if (input) {\n return input.id;\n }\n return null;\n};\nViewerSelector.prototype.onChange = function (cb) {\n this.onChangeCallbacks_.push(cb);\n};\nViewerSelector.prototype.fireOnChange_ = function (viewer) {\n for (var i = 0; i < this.onChangeCallbacks_.length; i++) {\n this.onChangeCallbacks_[i](viewer);\n }\n};\nViewerSelector.prototype.onSave_ = function () {\n this.selectedKey = this.getSelectedKey_();\n if (!this.selectedKey || !DeviceInfo.Viewers[this.selectedKey]) {\n console.error('ViewerSelector.onSave_: this should never happen!');\n return;\n }\n this.fireOnChange_(DeviceInfo.Viewers[this.selectedKey]);\n try {\n localStorage.setItem(VIEWER_KEY, this.selectedKey);\n } catch (error) {\n console.error('Failed to save viewer profile: %s', error);\n }\n this.hide();\n};\nViewerSelector.prototype.createDialog_ = function (options) {\n var container = document.createElement('div');\n container.classList.add(CLASS_NAME);\n container.style.display = 'none';\n var overlay = document.createElement('div');\n var s = overlay.style;\n s.position = 'fixed';\n s.left = 0;\n s.top = 0;\n s.width = '100%';\n s.height = '100%';\n s.background = 'rgba(0, 0, 0, 0.3)';\n overlay.addEventListener('click', this.hide.bind(this));\n var width = 280;\n var dialog = document.createElement('div');\n var s = dialog.style;\n s.boxSizing = 'border-box';\n s.position = 'fixed';\n s.top = '24px';\n s.left = '50%';\n s.marginLeft = -width / 2 + 'px';\n s.width = width + 'px';\n s.padding = '24px';\n s.overflow = 'hidden';\n s.background = '#fafafa';\n s.fontFamily = \"'Roboto', sans-serif\";\n s.boxShadow = '0px 5px 20px #666';\n dialog.appendChild(this.createH1_('Select your viewer'));\n for (var id in options) {\n dialog.appendChild(this.createChoice_(id, options[id].label));\n }\n dialog.appendChild(this.createButton_('Save', this.onSave_.bind(this)));\n container.appendChild(overlay);\n container.appendChild(dialog);\n return container;\n};\nViewerSelector.prototype.createH1_ = function (name) {\n var h1 = document.createElement('h1');\n var s = h1.style;\n s.color = 'black';\n s.fontSize = '20px';\n s.fontWeight = 'bold';\n s.marginTop = 0;\n s.marginBottom = '24px';\n h1.innerHTML = name;\n return h1;\n};\nViewerSelector.prototype.createChoice_ = function (id, name) {\n var div = document.createElement('div');\n div.style.marginTop = '8px';\n div.style.color = 'black';\n var input = document.createElement('input');\n input.style.fontSize = '30px';\n input.setAttribute('id', id);\n input.setAttribute('type', 'radio');\n input.setAttribute('value', id);\n input.setAttribute('name', 'field');\n var label = document.createElement('label');\n label.style.marginLeft = '4px';\n label.setAttribute('for', id);\n label.innerHTML = name;\n div.appendChild(input);\n div.appendChild(label);\n return div;\n};\nViewerSelector.prototype.createButton_ = function (label, onclick) {\n var button = document.createElement('button');\n button.innerHTML = label;\n var s = button.style;\n s.float = 'right';\n s.textTransform = 'uppercase';\n s.color = '#1094f7';\n s.fontSize = '14px';\n s.letterSpacing = 0;\n s.border = 0;\n s.background = 'none';\n s.marginTop = '16px';\n button.addEventListener('click', onclick);\n return button;\n};\nvar commonjsGlobal$$1 = typeof window !== 'undefined' ? window : typeof commonjsGlobal !== 'undefined' ? commonjsGlobal : typeof self !== 'undefined' ? self : {};\nfunction unwrapExports$$1 (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\nfunction createCommonjsModule$$1(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\nvar NoSleep = createCommonjsModule$$1(function (module, exports) {\n(function webpackUniversalModuleDefinition(root, factory) {\n\tmodule.exports = factory();\n})(commonjsGlobal$$1, function() {\nreturn (function(modules) {\n \tvar installedModules = {};\n \tfunction __webpack_require__(moduleId) {\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n \t\tmodule.l = true;\n \t\treturn module.exports;\n \t}\n \t__webpack_require__.m = modules;\n \t__webpack_require__.c = installedModules;\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n \t__webpack_require__.p = \"\";\n \treturn __webpack_require__(__webpack_require__.s = 0);\n })\n ([\n (function(module, exports, __webpack_require__) {\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nvar mediaFile = __webpack_require__(1);\nvar oldIOS = typeof navigator !== 'undefined' && parseFloat(('' + (/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0, ''])[1]).replace('undefined', '3_2').replace('_', '.').replace('_', '')) < 10 && !window.MSStream;\nvar NoSleep = function () {\n function NoSleep() {\n _classCallCheck(this, NoSleep);\n if (oldIOS) {\n this.noSleepTimer = null;\n } else {\n this.noSleepVideo = document.createElement('video');\n this.noSleepVideo.setAttribute('playsinline', '');\n this.noSleepVideo.setAttribute('src', mediaFile);\n this.noSleepVideo.addEventListener('timeupdate', function (e) {\n if (this.noSleepVideo.currentTime > 0.5) {\n this.noSleepVideo.currentTime = Math.random();\n }\n }.bind(this));\n }\n }\n _createClass(NoSleep, [{\n key: 'enable',\n value: function enable() {\n if (oldIOS) {\n this.disable();\n this.noSleepTimer = window.setInterval(function () {\n window.location.href = '/';\n window.setTimeout(window.stop, 0);\n }, 15000);\n } else {\n this.noSleepVideo.play();\n }\n }\n }, {\n key: 'disable',\n value: function disable() {\n if (oldIOS) {\n if (this.noSleepTimer) {\n window.clearInterval(this.noSleepTimer);\n this.noSleepTimer = null;\n }\n } else {\n this.noSleepVideo.pause();\n }\n }\n }]);\n return NoSleep;\n}();\nmodule.exports = NoSleep;\n }),\n (function(module, exports, __webpack_require__) {\nmodule.exports = 'data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZG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, 1];\nvar defaultRightBounds = [0.5, 0, 0.5, 1];\nvar raf = window.requestAnimationFrame;\nvar caf = window.cancelAnimationFrame;\nfunction VRFrameData() {\n this.leftProjectionMatrix = new Float32Array(16);\n this.leftViewMatrix = new Float32Array(16);\n this.rightProjectionMatrix = new Float32Array(16);\n this.rightViewMatrix = new Float32Array(16);\n this.pose = null;\n}\nfunction VRDisplayCapabilities(config) {\n Object.defineProperties(this, {\n hasPosition: {\n writable: false, enumerable: true, value: config.hasPosition\n },\n hasExternalDisplay: {\n writable: false, enumerable: true, value: config.hasExternalDisplay\n },\n canPresent: {\n writable: false, enumerable: true, value: config.canPresent\n },\n maxLayers: {\n writable: false, enumerable: true, value: config.maxLayers\n },\n hasOrientation: {\n enumerable: true, get: function get() {\n deprecateWarning('VRDisplayCapabilities.prototype.hasOrientation', 'VRDisplay.prototype.getFrameData');\n return config.hasOrientation;\n }\n }\n });\n}\nfunction VRDisplay(config) {\n config = config || {};\n var USE_WAKELOCK = 'wakelock' in config ? config.wakelock : true;\n this.isPolyfilled = true;\n this.displayId = nextDisplayId++;\n this.displayName = '';\n this.depthNear = 0.01;\n this.depthFar = 10000.0;\n this.isPresenting = false;\n Object.defineProperty(this, 'isConnected', {\n get: function get() {\n deprecateWarning('VRDisplay.prototype.isConnected', 'VRDisplayCapabilities.prototype.hasExternalDisplay');\n return false;\n }\n });\n this.capabilities = new VRDisplayCapabilities({\n hasPosition: false,\n hasOrientation: false,\n hasExternalDisplay: false,\n canPresent: false,\n maxLayers: 1\n });\n this.stageParameters = null;\n this.waitingForPresent_ = false;\n this.layer_ = null;\n this.originalParent_ = null;\n this.fullscreenElement_ = null;\n this.fullscreenWrapper_ = null;\n this.fullscreenElementCachedStyle_ = null;\n this.fullscreenEventTarget_ = null;\n this.fullscreenChangeHandler_ = null;\n this.fullscreenErrorHandler_ = null;\n if (USE_WAKELOCK && isMobile()) {\n this.wakelock_ = new NoSleep$1();\n }\n}\nVRDisplay.prototype.getFrameData = function (frameData) {\n return frameDataFromPose(frameData, this._getPose(), this);\n};\nVRDisplay.prototype.getPose = function () {\n deprecateWarning('VRDisplay.prototype.getPose', 'VRDisplay.prototype.getFrameData');\n return this._getPose();\n};\nVRDisplay.prototype.resetPose = function () {\n deprecateWarning('VRDisplay.prototype.resetPose');\n return this._resetPose();\n};\nVRDisplay.prototype.getImmediatePose = function () {\n deprecateWarning('VRDisplay.prototype.getImmediatePose', 'VRDisplay.prototype.getFrameData');\n return this._getPose();\n};\nVRDisplay.prototype.requestAnimationFrame = function (callback) {\n return raf(callback);\n};\nVRDisplay.prototype.cancelAnimationFrame = function (id) {\n return caf(id);\n};\nVRDisplay.prototype.wrapForFullscreen = function (element) {\n if (isIOS()) {\n return element;\n }\n if (!this.fullscreenWrapper_) {\n this.fullscreenWrapper_ = document.createElement('div');\n var cssProperties = ['height: ' + Math.min(screen.height, screen.width) + 'px !important', 'top: 0 !important', 'left: 0 !important', 'right: 0 !important', 'border: 0', 'margin: 0', 'padding: 0', 'z-index: 999999 !important', 'position: fixed'];\n this.fullscreenWrapper_.setAttribute('style', cssProperties.join('; ') + ';');\n this.fullscreenWrapper_.classList.add('webvr-polyfill-fullscreen-wrapper');\n }\n if (this.fullscreenElement_ == element) {\n return this.fullscreenWrapper_;\n }\n if (this.fullscreenElement_) {\n if (this.originalParent_) {\n this.originalParent_.appendChild(this.fullscreenElement_);\n } else {\n this.fullscreenElement_.parentElement.removeChild(this.fullscreenElement_);\n }\n }\n this.fullscreenElement_ = element;\n this.originalParent_ = element.parentElement;\n if (!this.originalParent_) {\n document.body.appendChild(element);\n }\n if (!this.fullscreenWrapper_.parentElement) {\n var parent = this.fullscreenElement_.parentElement;\n parent.insertBefore(this.fullscreenWrapper_, this.fullscreenElement_);\n parent.removeChild(this.fullscreenElement_);\n }\n this.fullscreenWrapper_.insertBefore(this.fullscreenElement_, this.fullscreenWrapper_.firstChild);\n this.fullscreenElementCachedStyle_ = this.fullscreenElement_.getAttribute('style');\n var self = this;\n function applyFullscreenElementStyle() {\n if (!self.fullscreenElement_) {\n return;\n }\n var cssProperties = ['position: absolute', 'top: 0', 'left: 0', 'width: ' + Math.max(screen.width, screen.height) + 'px', 'height: ' + Math.min(screen.height, screen.width) + 'px', 'border: 0', 'margin: 0', 'padding: 0'];\n self.fullscreenElement_.setAttribute('style', cssProperties.join('; ') + ';');\n }\n applyFullscreenElementStyle();\n return this.fullscreenWrapper_;\n};\nVRDisplay.prototype.removeFullscreenWrapper = function () {\n if (!this.fullscreenElement_) {\n return;\n }\n var element = this.fullscreenElement_;\n if (this.fullscreenElementCachedStyle_) {\n element.setAttribute('style', this.fullscreenElementCachedStyle_);\n } else {\n element.removeAttribute('style');\n }\n this.fullscreenElement_ = null;\n this.fullscreenElementCachedStyle_ = null;\n var parent = this.fullscreenWrapper_.parentElement;\n this.fullscreenWrapper_.removeChild(element);\n if (this.originalParent_ === parent) {\n parent.insertBefore(element, this.fullscreenWrapper_);\n }\n else if (this.originalParent_) {\n this.originalParent_.appendChild(element);\n }\n parent.removeChild(this.fullscreenWrapper_);\n return element;\n};\nVRDisplay.prototype.requestPresent = function (layers) {\n var wasPresenting = this.isPresenting;\n var self = this;\n if (!(layers instanceof Array)) {\n deprecateWarning('VRDisplay.prototype.requestPresent with non-array argument', 'an array of VRLayers as the first argument');\n layers = [layers];\n }\n return new Promise(function (resolve, reject) {\n if (!self.capabilities.canPresent) {\n reject(new Error('VRDisplay is not capable of presenting.'));\n return;\n }\n if (layers.length == 0 || layers.length > self.capabilities.maxLayers) {\n reject(new Error('Invalid number of layers.'));\n return;\n }\n var incomingLayer = layers[0];\n if (!incomingLayer.source) {\n resolve();\n return;\n }\n var leftBounds = incomingLayer.leftBounds || defaultLeftBounds;\n var rightBounds = incomingLayer.rightBounds || defaultRightBounds;\n if (wasPresenting) {\n var layer = self.layer_;\n if (layer.source !== incomingLayer.source) {\n layer.source = incomingLayer.source;\n }\n for (var i = 0; i < 4; i++) {\n layer.leftBounds[i] = leftBounds[i];\n layer.rightBounds[i] = rightBounds[i];\n }\n self.wrapForFullscreen(self.layer_.source);\n self.updatePresent_();\n resolve();\n return;\n }\n self.layer_ = {\n predistorted: incomingLayer.predistorted,\n source: incomingLayer.source,\n leftBounds: leftBounds.slice(0),\n rightBounds: rightBounds.slice(0)\n };\n self.waitingForPresent_ = false;\n if (self.layer_ && self.layer_.source) {\n var fullscreenElement = self.wrapForFullscreen(self.layer_.source);\n var onFullscreenChange = function onFullscreenChange() {\n var actualFullscreenElement = getFullscreenElement();\n self.isPresenting = fullscreenElement === actualFullscreenElement;\n if (self.isPresenting) {\n if (screen.orientation && screen.orientation.lock) {\n screen.orientation.lock('landscape-primary').catch(function (error) {\n console.error('screen.orientation.lock() failed due to', error.message);\n });\n }\n self.waitingForPresent_ = false;\n self.beginPresent_();\n resolve();\n } else {\n if (screen.orientation && screen.orientation.unlock) {\n screen.orientation.unlock();\n }\n self.removeFullscreenWrapper();\n self.disableWakeLock();\n self.endPresent_();\n self.removeFullscreenListeners_();\n }\n self.fireVRDisplayPresentChange_();\n };\n var onFullscreenError = function onFullscreenError() {\n if (!self.waitingForPresent_) {\n return;\n }\n self.removeFullscreenWrapper();\n self.removeFullscreenListeners_();\n self.disableWakeLock();\n self.waitingForPresent_ = false;\n self.isPresenting = false;\n reject(new Error('Unable to present.'));\n };\n self.addFullscreenListeners_(fullscreenElement, onFullscreenChange, onFullscreenError);\n if (requestFullscreen(fullscreenElement)) {\n self.enableWakeLock();\n self.waitingForPresent_ = true;\n } else if (isIOS() || isWebViewAndroid()) {\n self.enableWakeLock();\n self.isPresenting = true;\n self.beginPresent_();\n self.fireVRDisplayPresentChange_();\n resolve();\n }\n }\n if (!self.waitingForPresent_ && !isIOS()) {\n exitFullscreen();\n reject(new Error('Unable to present.'));\n }\n });\n};\nVRDisplay.prototype.exitPresent = function () {\n var wasPresenting = this.isPresenting;\n var self = this;\n this.isPresenting = false;\n this.layer_ = null;\n this.disableWakeLock();\n return new Promise(function (resolve, reject) {\n if (wasPresenting) {\n if (!exitFullscreen() && isIOS()) {\n self.endPresent_();\n self.fireVRDisplayPresentChange_();\n }\n if (isWebViewAndroid()) {\n self.removeFullscreenWrapper();\n self.removeFullscreenListeners_();\n self.endPresent_();\n self.fireVRDisplayPresentChange_();\n }\n resolve();\n } else {\n reject(new Error('Was not presenting to VRDisplay.'));\n }\n });\n};\nVRDisplay.prototype.getLayers = function () {\n if (this.layer_) {\n return [this.layer_];\n }\n return [];\n};\nVRDisplay.prototype.fireVRDisplayPresentChange_ = function () {\n var event = new CustomEvent('vrdisplaypresentchange', { detail: { display: this } });\n window.dispatchEvent(event);\n};\nVRDisplay.prototype.fireVRDisplayConnect_ = function () {\n var event = new CustomEvent('vrdisplayconnect', { detail: { display: this } });\n window.dispatchEvent(event);\n};\nVRDisplay.prototype.addFullscreenListeners_ = function (element, changeHandler, errorHandler) {\n this.removeFullscreenListeners_();\n this.fullscreenEventTarget_ = element;\n this.fullscreenChangeHandler_ = changeHandler;\n this.fullscreenErrorHandler_ = errorHandler;\n if (changeHandler) {\n if (document.fullscreenEnabled) {\n element.addEventListener('fullscreenchange', changeHandler, false);\n } else if (document.webkitFullscreenEnabled) {\n element.addEventListener('webkitfullscreenchange', changeHandler, false);\n } else if (document.mozFullScreenEnabled) {\n document.addEventListener('mozfullscreenchange', changeHandler, false);\n } else if (document.msFullscreenEnabled) {\n element.addEventListener('msfullscreenchange', changeHandler, false);\n }\n }\n if (errorHandler) {\n if (document.fullscreenEnabled) {\n element.addEventListener('fullscreenerror', errorHandler, false);\n } else if (document.webkitFullscreenEnabled) {\n element.addEventListener('webkitfullscreenerror', errorHandler, false);\n } else if (document.mozFullScreenEnabled) {\n document.addEventListener('mozfullscreenerror', errorHandler, false);\n } else if (document.msFullscreenEnabled) {\n element.addEventListener('msfullscreenerror', errorHandler, false);\n }\n }\n};\nVRDisplay.prototype.removeFullscreenListeners_ = function () {\n if (!this.fullscreenEventTarget_) return;\n var element = this.fullscreenEventTarget_;\n if (this.fullscreenChangeHandler_) {\n var changeHandler = this.fullscreenChangeHandler_;\n element.removeEventListener('fullscreenchange', changeHandler, false);\n element.removeEventListener('webkitfullscreenchange', changeHandler, false);\n document.removeEventListener('mozfullscreenchange', changeHandler, false);\n element.removeEventListener('msfullscreenchange', changeHandler, false);\n }\n if (this.fullscreenErrorHandler_) {\n var errorHandler = this.fullscreenErrorHandler_;\n element.removeEventListener('fullscreenerror', errorHandler, false);\n element.removeEventListener('webkitfullscreenerror', errorHandler, false);\n document.removeEventListener('mozfullscreenerror', errorHandler, false);\n element.removeEventListener('msfullscreenerror', errorHandler, false);\n }\n this.fullscreenEventTarget_ = null;\n this.fullscreenChangeHandler_ = null;\n this.fullscreenErrorHandler_ = null;\n};\nVRDisplay.prototype.enableWakeLock = function () {\n if (this.wakelock_) {\n this.wakelock_.enable();\n }\n};\nVRDisplay.prototype.disableWakeLock = function () {\n if (this.wakelock_) {\n this.wakelock_.disable();\n }\n};\nVRDisplay.prototype.beginPresent_ = function () {\n};\nVRDisplay.prototype.endPresent_ = function () {\n};\nVRDisplay.prototype.submitFrame = function (pose) {\n};\nVRDisplay.prototype.getEyeParameters = function (whichEye) {\n return null;\n};\nvar config = {\n ADDITIONAL_VIEWERS: [],\n DEFAULT_VIEWER: '',\n MOBILE_WAKE_LOCK: true,\n DEBUG: false,\n DPDB_URL: 'https://dpdb.webvr.rocks/dpdb.json',\n K_FILTER: 0.98,\n PREDICTION_TIME_S: 0.040,\n CARDBOARD_UI_DISABLED: false,\n ROTATE_INSTRUCTIONS_DISABLED: false,\n YAW_ONLY: false,\n BUFFER_SCALE: 0.5,\n DIRTY_SUBMIT_FRAME_BINDINGS: false\n};\nvar Eye = {\n LEFT: 'left',\n RIGHT: 'right'\n};\nfunction CardboardVRDisplay(config$$1) {\n var defaults = extend({}, config);\n config$$1 = extend(defaults, config$$1 || {});\n VRDisplay.call(this, {\n wakelock: config$$1.MOBILE_WAKE_LOCK\n });\n this.config = config$$1;\n this.displayName = 'Cardboard VRDisplay';\n this.capabilities = new VRDisplayCapabilities({\n hasPosition: false,\n hasOrientation: true,\n hasExternalDisplay: false,\n canPresent: true,\n maxLayers: 1\n });\n this.stageParameters = null;\n this.bufferScale_ = this.config.BUFFER_SCALE;\n this.poseSensor_ = new PoseSensor(this.config);\n this.distorter_ = null;\n this.cardboardUI_ = null;\n this.dpdb_ = new Dpdb(this.config.DPDB_URL, this.onDeviceParamsUpdated_.bind(this));\n this.deviceInfo_ = new DeviceInfo(this.dpdb_.getDeviceParams(), config$$1.ADDITIONAL_VIEWERS);\n this.viewerSelector_ = new ViewerSelector(config$$1.DEFAULT_VIEWER);\n this.viewerSelector_.onChange(this.onViewerChanged_.bind(this));\n this.deviceInfo_.setViewer(this.viewerSelector_.getCurrentViewer());\n if (!this.config.ROTATE_INSTRUCTIONS_DISABLED) {\n this.rotateInstructions_ = new RotateInstructions();\n }\n if (isIOS()) {\n window.addEventListener('resize', this.onResize_.bind(this));\n }\n}\nCardboardVRDisplay.prototype = Object.create(VRDisplay.prototype);\nCardboardVRDisplay.prototype._getPose = function () {\n return {\n position: null,\n orientation: this.poseSensor_.getOrientation(),\n linearVelocity: null,\n linearAcceleration: null,\n angularVelocity: null,\n angularAcceleration: null\n };\n};\nCardboardVRDisplay.prototype._resetPose = function () {\n if (this.poseSensor_.resetPose) {\n this.poseSensor_.resetPose();\n }\n};\nCardboardVRDisplay.prototype._getFieldOfView = function (whichEye) {\n var fieldOfView;\n if (whichEye == Eye.LEFT) {\n fieldOfView = this.deviceInfo_.getFieldOfViewLeftEye();\n } else if (whichEye == Eye.RIGHT) {\n fieldOfView = this.deviceInfo_.getFieldOfViewRightEye();\n } else {\n console.error('Invalid eye provided: %s', whichEye);\n return null;\n }\n return fieldOfView;\n};\nCardboardVRDisplay.prototype._getEyeOffset = function (whichEye) {\n var offset;\n if (whichEye == Eye.LEFT) {\n offset = [-this.deviceInfo_.viewer.interLensDistance * 0.5, 0.0, 0.0];\n } else if (whichEye == Eye.RIGHT) {\n offset = [this.deviceInfo_.viewer.interLensDistance * 0.5, 0.0, 0.0];\n } else {\n console.error('Invalid eye provided: %s', whichEye);\n return null;\n }\n return offset;\n};\nCardboardVRDisplay.prototype.getEyeParameters = function (whichEye) {\n var offset = this._getEyeOffset(whichEye);\n var fieldOfView = this._getFieldOfView(whichEye);\n var eyeParams = {\n offset: offset,\n renderWidth: this.deviceInfo_.device.width * 0.5 * this.bufferScale_,\n renderHeight: this.deviceInfo_.device.height * this.bufferScale_\n };\n Object.defineProperty(eyeParams, 'fieldOfView', {\n enumerable: true,\n get: function get() {\n deprecateWarning('VRFieldOfView', 'VRFrameData\\'s projection matrices');\n return fieldOfView;\n }\n });\n return eyeParams;\n};\nCardboardVRDisplay.prototype.onDeviceParamsUpdated_ = function (newParams) {\n if (this.config.DEBUG) {\n console.log('DPDB reported that device params were updated.');\n }\n this.deviceInfo_.updateDeviceParams(newParams);\n if (this.distorter_) {\n this.distorter_.updateDeviceInfo(this.deviceInfo_);\n }\n};\nCardboardVRDisplay.prototype.updateBounds_ = function () {\n if (this.layer_ && this.distorter_ && (this.layer_.leftBounds || this.layer_.rightBounds)) {\n this.distorter_.setTextureBounds(this.layer_.leftBounds, this.layer_.rightBounds);\n }\n};\nCardboardVRDisplay.prototype.beginPresent_ = function () {\n var gl = this.layer_.source.getContext('webgl');\n if (!gl) gl = this.layer_.source.getContext('experimental-webgl');\n if (!gl) gl = this.layer_.source.getContext('webgl2');\n if (!gl) return;\n if (this.layer_.predistorted) {\n if (!this.config.CARDBOARD_UI_DISABLED) {\n gl.canvas.width = getScreenWidth() * this.bufferScale_;\n gl.canvas.height = getScreenHeight() * this.bufferScale_;\n this.cardboardUI_ = new CardboardUI(gl);\n }\n } else {\n if (!this.config.CARDBOARD_UI_DISABLED) {\n this.cardboardUI_ = new CardboardUI(gl);\n }\n this.distorter_ = new CardboardDistorter(gl, this.cardboardUI_, this.config.BUFFER_SCALE, this.config.DIRTY_SUBMIT_FRAME_BINDINGS);\n this.distorter_.updateDeviceInfo(this.deviceInfo_);\n }\n if (this.cardboardUI_) {\n this.cardboardUI_.listen(function (e) {\n this.viewerSelector_.show(this.layer_.source.parentElement);\n e.stopPropagation();\n e.preventDefault();\n }.bind(this), function (e) {\n this.exitPresent();\n e.stopPropagation();\n e.preventDefault();\n }.bind(this));\n }\n if (this.rotateInstructions_) {\n if (isLandscapeMode() && isMobile()) {\n this.rotateInstructions_.showTemporarily(3000, this.layer_.source.parentElement);\n } else {\n this.rotateInstructions_.update();\n }\n }\n this.orientationHandler = this.onOrientationChange_.bind(this);\n window.addEventListener('orientationchange', this.orientationHandler);\n this.vrdisplaypresentchangeHandler = this.updateBounds_.bind(this);\n window.addEventListener('vrdisplaypresentchange', this.vrdisplaypresentchangeHandler);\n this.fireVRDisplayDeviceParamsChange_();\n};\nCardboardVRDisplay.prototype.endPresent_ = function () {\n if (this.distorter_) {\n this.distorter_.destroy();\n this.distorter_ = null;\n }\n if (this.cardboardUI_) {\n this.cardboardUI_.destroy();\n this.cardboardUI_ = null;\n }\n if (this.rotateInstructions_) {\n this.rotateInstructions_.hide();\n }\n this.viewerSelector_.hide();\n window.removeEventListener('orientationchange', this.orientationHandler);\n window.removeEventListener('vrdisplaypresentchange', this.vrdisplaypresentchangeHandler);\n};\nCardboardVRDisplay.prototype.updatePresent_ = function () {\n this.endPresent_();\n this.beginPresent_();\n};\nCardboardVRDisplay.prototype.submitFrame = function (pose) {\n if (this.distorter_) {\n this.updateBounds_();\n this.distorter_.submitFrame();\n } else if (this.cardboardUI_ && this.layer_) {\n var gl = this.layer_.source.getContext('webgl');\n if (!gl) gl = this.layer_.source.getContext('experimental-webgl');\n if (!gl) gl = this.layer_.source.getContext('webgl2');\n var canvas = gl.canvas;\n if (canvas.width != this.lastWidth || canvas.height != this.lastHeight) {\n this.cardboardUI_.onResize();\n }\n this.lastWidth = canvas.width;\n this.lastHeight = canvas.height;\n this.cardboardUI_.render();\n }\n};\nCardboardVRDisplay.prototype.onOrientationChange_ = function (e) {\n this.viewerSelector_.hide();\n if (this.rotateInstructions_) {\n this.rotateInstructions_.update();\n }\n this.onResize_();\n};\nCardboardVRDisplay.prototype.onResize_ = function (e) {\n if (this.layer_) {\n var gl = this.layer_.source.getContext('webgl');\n if (!gl) gl = this.layer_.source.getContext('experimental-webgl');\n if (!gl) gl = this.layer_.source.getContext('webgl2');\n var cssProperties = ['position: absolute', 'top: 0', 'left: 0',\n 'width: 100vw', 'height: 100vh', 'border: 0', 'margin: 0',\n 'padding: 0px', 'box-sizing: content-box'];\n gl.canvas.setAttribute('style', cssProperties.join('; ') + ';');\n safariCssSizeWorkaround(gl.canvas);\n }\n};\nCardboardVRDisplay.prototype.onViewerChanged_ = function (viewer) {\n this.deviceInfo_.setViewer(viewer);\n if (this.distorter_) {\n this.distorter_.updateDeviceInfo(this.deviceInfo_);\n }\n this.fireVRDisplayDeviceParamsChange_();\n};\nCardboardVRDisplay.prototype.fireVRDisplayDeviceParamsChange_ = function () {\n var event = new CustomEvent('vrdisplaydeviceparamschange', {\n detail: {\n vrdisplay: this,\n deviceInfo: this.deviceInfo_\n }\n });\n window.dispatchEvent(event);\n};\nCardboardVRDisplay.VRFrameData = VRFrameData;\nCardboardVRDisplay.VRDisplay = VRDisplay;\nreturn CardboardVRDisplay;\n})));\n});\nvar CardboardVRDisplay = unwrapExports(cardboardVrDisplay);\n\nvar version = \"0.10.12\";\n\nvar DefaultConfig = {\n ADDITIONAL_VIEWERS: [],\n DEFAULT_VIEWER: '',\n PROVIDE_MOBILE_VRDISPLAY: true,\n MOBILE_WAKE_LOCK: true,\n DEBUG: false,\n DPDB_URL: 'https://dpdb.webvr.rocks/dpdb.json',\n K_FILTER: 0.98,\n PREDICTION_TIME_S: 0.040,\n CARDBOARD_UI_DISABLED: false,\n ROTATE_INSTRUCTIONS_DISABLED: false,\n YAW_ONLY: false,\n BUFFER_SCALE: 0.5,\n DIRTY_SUBMIT_FRAME_BINDINGS: false\n};\n\nfunction WebVRPolyfill(config) {\n this.config = extend(extend({}, DefaultConfig), config);\n this.polyfillDisplays = [];\n this.enabled = false;\n this.hasNative = 'getVRDisplays' in navigator;\n this.native = {};\n this.native.getVRDisplays = navigator.getVRDisplays;\n this.native.VRFrameData = window.VRFrameData;\n this.native.VRDisplay = window.VRDisplay;\n if (!this.hasNative || this.config.PROVIDE_MOBILE_VRDISPLAY && isMobile()) {\n this.enable();\n this.getVRDisplays().then(function (displays) {\n if (displays && displays[0] && displays[0].fireVRDisplayConnect_) {\n displays[0].fireVRDisplayConnect_();\n }\n });\n }\n}\nWebVRPolyfill.prototype.getPolyfillDisplays = function () {\n if (this._polyfillDisplaysPopulated) {\n return this.polyfillDisplays;\n }\n if (isMobile()) {\n var vrDisplay = new CardboardVRDisplay({\n ADDITIONAL_VIEWERS: this.config.ADDITIONAL_VIEWERS,\n DEFAULT_VIEWER: this.config.DEFAULT_VIEWER,\n MOBILE_WAKE_LOCK: this.config.MOBILE_WAKE_LOCK,\n DEBUG: this.config.DEBUG,\n DPDB_URL: this.config.DPDB_URL,\n CARDBOARD_UI_DISABLED: this.config.CARDBOARD_UI_DISABLED,\n K_FILTER: this.config.K_FILTER,\n PREDICTION_TIME_S: this.config.PREDICTION_TIME_S,\n ROTATE_INSTRUCTIONS_DISABLED: this.config.ROTATE_INSTRUCTIONS_DISABLED,\n YAW_ONLY: this.config.YAW_ONLY,\n BUFFER_SCALE: this.config.BUFFER_SCALE,\n DIRTY_SUBMIT_FRAME_BINDINGS: this.config.DIRTY_SUBMIT_FRAME_BINDINGS\n });\n this.polyfillDisplays.push(vrDisplay);\n }\n this._polyfillDisplaysPopulated = true;\n return this.polyfillDisplays;\n};\nWebVRPolyfill.prototype.enable = function () {\n this.enabled = true;\n if (this.hasNative && this.native.VRFrameData) {\n var NativeVRFrameData = this.native.VRFrameData;\n var nativeFrameData = new this.native.VRFrameData();\n var nativeGetFrameData = this.native.VRDisplay.prototype.getFrameData;\n window.VRDisplay.prototype.getFrameData = function (frameData) {\n if (frameData instanceof NativeVRFrameData) {\n nativeGetFrameData.call(this, frameData);\n return;\n }\n nativeGetFrameData.call(this, nativeFrameData);\n frameData.pose = nativeFrameData.pose;\n copyArray(nativeFrameData.leftProjectionMatrix, frameData.leftProjectionMatrix);\n copyArray(nativeFrameData.rightProjectionMatrix, frameData.rightProjectionMatrix);\n copyArray(nativeFrameData.leftViewMatrix, frameData.leftViewMatrix);\n copyArray(nativeFrameData.rightViewMatrix, frameData.rightViewMatrix);\n };\n }\n navigator.getVRDisplays = this.getVRDisplays.bind(this);\n window.VRDisplay = CardboardVRDisplay.VRDisplay;\n window.VRFrameData = CardboardVRDisplay.VRFrameData;\n};\nWebVRPolyfill.prototype.getVRDisplays = function () {\n var _this = this;\n var config = this.config;\n if (!this.hasNative) {\n return Promise.resolve(this.getPolyfillDisplays());\n }\n return this.native.getVRDisplays.call(navigator).then(function (nativeDisplays) {\n return nativeDisplays.length > 0 ? nativeDisplays : _this.getPolyfillDisplays();\n });\n};\nWebVRPolyfill.version = version;\nWebVRPolyfill.VRFrameData = CardboardVRDisplay.VRFrameData;\nWebVRPolyfill.VRDisplay = CardboardVRDisplay.VRDisplay;\n\n\nvar webvrPolyfill = Object.freeze({\n\tdefault: WebVRPolyfill\n});\n\nvar require$$0 = ( webvrPolyfill && WebVRPolyfill ) || webvrPolyfill;\n\nif (typeof commonjsGlobal !== 'undefined' && commonjsGlobal.window) {\n if (!commonjsGlobal.document) {\n commonjsGlobal.document = commonjsGlobal.window.document;\n }\n if (!commonjsGlobal.navigator) {\n commonjsGlobal.navigator = commonjsGlobal.window.navigator;\n }\n}\nvar src = require$$0;\n\nreturn src;\n\n})));\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{}],69:[function(_dereq_,module,exports){\nvar newline = /\\n/\nvar newlineChar = '\\n'\nvar whitespace = /\\s/\n\nmodule.exports = function(text, opt) {\n var lines = module.exports.lines(text, opt)\n return lines.map(function(line) {\n return text.substring(line.start, line.end)\n }).join('\\n')\n}\n\nmodule.exports.lines = function wordwrap(text, opt) {\n opt = opt||{}\n\n //zero width results in nothing visible\n if (opt.width === 0 && opt.mode !== 'nowrap') \n return []\n\n text = text||''\n var width = typeof opt.width === 'number' ? opt.width : Number.MAX_VALUE\n var start = Math.max(0, opt.start||0)\n var end = typeof opt.end === 'number' ? opt.end : text.length\n var mode = opt.mode\n\n var measure = opt.measure || monospace\n if (mode === 'pre')\n return pre(measure, text, start, end, width)\n else\n return greedy(measure, text, start, end, width, mode)\n}\n\nfunction idxOf(text, chr, start, end) {\n var idx = text.indexOf(chr, start)\n if (idx === -1 || idx > end)\n return end\n return idx\n}\n\nfunction isWhitespace(chr) {\n return whitespace.test(chr)\n}\n\nfunction pre(measure, text, start, end, width) {\n var lines = []\n var lineStart = start\n for (var i=start; i<end && i<text.length; i++) {\n var chr = text.charAt(i)\n var isNewline = newline.test(chr)\n\n //If we've reached a newline, then step down a line\n //Or if we've reached the EOF\n if (isNewline || i===end-1) {\n var lineEnd = isNewline ? i : i+1\n var measured = measure(text, lineStart, lineEnd, width)\n lines.push(measured)\n \n lineStart = i+1\n }\n }\n return lines\n}\n\nfunction greedy(measure, text, start, end, width, mode) {\n //A greedy word wrapper based on LibGDX algorithm\n //https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java\n var lines = []\n\n var testWidth = width\n //if 'nowrap' is specified, we only wrap on newline chars\n if (mode === 'nowrap')\n testWidth = Number.MAX_VALUE\n\n while (start < end && start < text.length) {\n //get next newline position\n var newLine = idxOf(text, newlineChar, start, end)\n\n //eat whitespace at start of line\n while (start < newLine) {\n if (!isWhitespace( text.charAt(start) ))\n break\n start++\n }\n\n //determine visible # of glyphs for the available width\n var measured = measure(text, start, newLine, testWidth)\n\n var lineEnd = start + (measured.end-measured.start)\n var nextStart = lineEnd + newlineChar.length\n\n //if we had to cut the line before the next newline...\n if (lineEnd < newLine) {\n //find char to break on\n while (lineEnd > start) {\n if (isWhitespace(text.charAt(lineEnd)))\n break\n lineEnd--\n }\n if (lineEnd === start) {\n if (nextStart > start + newlineChar.length) nextStart--\n lineEnd = nextStart // If no characters to break, show all.\n } else {\n nextStart = lineEnd\n //eat whitespace at end of line\n while (lineEnd > start) {\n if (!isWhitespace(text.charAt(lineEnd - newlineChar.length)))\n break\n lineEnd--\n }\n }\n }\n if (lineEnd >= start) {\n var result = measure(text, start, lineEnd, testWidth)\n lines.push(result)\n }\n start = nextStart\n }\n return lines\n}\n\n//determines the visible number of glyphs within a given width\nfunction monospace(text, start, end, width) {\n var glyphs = Math.min(width, end-start)\n return {\n start: start,\n end: start+glyphs\n }\n}\n},{}],70:[function(_dereq_,module,exports){\n\"use strict\";\nvar window = _dereq_(\"global/window\")\nvar isFunction = _dereq_(\"is-function\")\nvar parseHeaders = _dereq_(\"parse-headers\")\nvar xtend = _dereq_(\"xtend\")\n\nmodule.exports = createXHR\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = createXHR;\ncreateXHR.XMLHttpRequest = window.XMLHttpRequest || noop\ncreateXHR.XDomainRequest = \"withCredentials\" in (new createXHR.XMLHttpRequest()) ? createXHR.XMLHttpRequest : window.XDomainRequest\n\nforEachArray([\"get\", \"put\", \"post\", \"patch\", \"head\", \"delete\"], function(method) {\n createXHR[method === \"delete\" ? \"del\" : method] = function(uri, options, callback) {\n options = initParams(uri, options, callback)\n options.method = method.toUpperCase()\n return _createXHR(options)\n }\n})\n\nfunction forEachArray(array, iterator) {\n for (var i = 0; i < array.length; i++) {\n iterator(array[i])\n }\n}\n\nfunction isEmpty(obj){\n for(var i in obj){\n if(obj.hasOwnProperty(i)) return false\n }\n return true\n}\n\nfunction initParams(uri, options, callback) {\n var params = uri\n\n if (isFunction(options)) {\n callback = options\n if (typeof uri === \"string\") {\n params = {uri:uri}\n }\n } else {\n params = xtend(options, {uri: uri})\n }\n\n params.callback = callback\n return params\n}\n\nfunction createXHR(uri, options, callback) {\n options = initParams(uri, options, callback)\n return _createXHR(options)\n}\n\nfunction _createXHR(options) {\n if(typeof options.callback === \"undefined\"){\n throw new Error(\"callback argument missing\")\n }\n\n var called = false\n var callback = function cbOnce(err, response, body){\n if(!called){\n called = true\n options.callback(err, response, body)\n }\n }\n\n function readystatechange() {\n if (xhr.readyState === 4) {\n setTimeout(loadFunc, 0)\n }\n }\n\n function getBody() {\n // Chrome with requestType=blob throws errors arround when even testing access to responseText\n var body = undefined\n\n if (xhr.response) {\n body = xhr.response\n } else {\n body = xhr.responseText || getXml(xhr)\n }\n\n if (isJson) {\n try {\n body = JSON.parse(body)\n } catch (e) {}\n }\n\n return body\n }\n\n function errorFunc(evt) {\n clearTimeout(timeoutTimer)\n if(!(evt instanceof Error)){\n evt = new Error(\"\" + (evt || \"Unknown XMLHttpRequest Error\") )\n }\n evt.statusCode = 0\n return callback(evt, failureResponse)\n }\n\n // will load the data & process the response in a special response object\n function loadFunc() {\n if (aborted) return\n var status\n clearTimeout(timeoutTimer)\n if(options.useXDR && xhr.status===undefined) {\n //IE8 CORS GET successful response doesn't have a status field, but body is fine\n status = 200\n } else {\n status = (xhr.status === 1223 ? 204 : xhr.status)\n }\n var response = failureResponse\n var err = null\n\n if (status !== 0){\n response = {\n body: getBody(),\n statusCode: status,\n method: method,\n headers: {},\n url: uri,\n rawRequest: xhr\n }\n if(xhr.getAllResponseHeaders){ //remember xhr can in fact be XDR for CORS in IE\n response.headers = parseHeaders(xhr.getAllResponseHeaders())\n }\n } else {\n err = new Error(\"Internal XMLHttpRequest Error\")\n }\n return callback(err, response, response.body)\n }\n\n var xhr = options.xhr || null\n\n if (!xhr) {\n if (options.cors || options.useXDR) {\n xhr = new createXHR.XDomainRequest()\n }else{\n xhr = new createXHR.XMLHttpRequest()\n }\n }\n\n var key\n var aborted\n var uri = xhr.url = options.uri || options.url\n var method = xhr.method = options.method || \"GET\"\n var body = options.body || options.data\n var headers = xhr.headers = options.headers || {}\n var sync = !!options.sync\n var isJson = false\n var timeoutTimer\n var failureResponse = {\n body: undefined,\n headers: {},\n statusCode: 0,\n method: method,\n url: uri,\n rawRequest: xhr\n }\n\n if (\"json\" in options && options.json !== false) {\n isJson = true\n headers[\"accept\"] || headers[\"Accept\"] || (headers[\"Accept\"] = \"application/json\") //Don't override existing accept header declared by user\n if (method !== \"GET\" && method !== \"HEAD\") {\n headers[\"content-type\"] || headers[\"Content-Type\"] || (headers[\"Content-Type\"] = \"application/json\") //Don't override existing accept header declared by user\n body = JSON.stringify(options.json === true ? body : options.json)\n }\n }\n\n xhr.onreadystatechange = readystatechange\n xhr.onload = loadFunc\n xhr.onerror = errorFunc\n // IE9 must have onprogress be set to a unique function.\n xhr.onprogress = function () {\n // IE must die\n }\n xhr.onabort = function(){\n aborted = true;\n }\n xhr.ontimeout = errorFunc\n xhr.open(method, uri, !sync, options.username, options.password)\n //has to be after open\n if(!sync) {\n xhr.withCredentials = !!options.withCredentials\n }\n // Cannot set timeout with sync request\n // not setting timeout on the xhr object, because of old webkits etc. not handling that correctly\n // both npm's request and jquery 1.x use this kind of timeout, so this is being consistent\n if (!sync && options.timeout > 0 ) {\n timeoutTimer = setTimeout(function(){\n if (aborted) return\n aborted = true//IE9 may still call readystatechange\n xhr.abort(\"timeout\")\n var e = new Error(\"XMLHttpRequest timeout\")\n e.code = \"ETIMEDOUT\"\n errorFunc(e)\n }, options.timeout )\n }\n\n if (xhr.setRequestHeader) {\n for(key in headers){\n if(headers.hasOwnProperty(key)){\n xhr.setRequestHeader(key, headers[key])\n }\n }\n } else if (options.headers && !isEmpty(options.headers)) {\n throw new Error(\"Headers cannot be set on an XDomainRequest object\")\n }\n\n if (\"responseType\" in options) {\n xhr.responseType = options.responseType\n }\n\n if (\"beforeSend\" in options &&\n typeof options.beforeSend === \"function\"\n ) {\n options.beforeSend(xhr)\n }\n\n // Microsoft Edge browser sends \"undefined\" when send is called with undefined value.\n // XMLHttpRequest spec says to pass null as body to indicate no body\n // See https://github.com/naugtur/xhr/issues/100.\n xhr.send(body || null)\n\n return xhr\n\n\n}\n\nfunction getXml(xhr) {\n // xhr.responseXML will throw Exception \"InvalidStateError\" or \"DOMException\"\n // See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseXML.\n try {\n if (xhr.responseType === \"document\") {\n return xhr.responseXML\n }\n var firefoxBugTakenEffect = xhr.responseXML && xhr.responseXML.documentElement.nodeName === \"parsererror\"\n if (xhr.responseType === \"\" && !firefoxBugTakenEffect) {\n return xhr.responseXML\n }\n } catch (e) {}\n\n return null\n}\n\nfunction noop() {}\n\n},{\"global/window\":27,\"is-function\":33,\"parse-headers\":47,\"xtend\":72}],71:[function(_dereq_,module,exports){\nmodule.exports = (function xmlparser() {\n //common browsers\n if (typeof self.DOMParser !== 'undefined') {\n return function(str) {\n var parser = new self.DOMParser()\n return parser.parseFromString(str, 'application/xml')\n }\n } \n\n //IE8 fallback\n if (typeof self.ActiveXObject !== 'undefined'\n && new self.ActiveXObject('Microsoft.XMLDOM')) {\n return function(str) {\n var xmlDoc = new self.ActiveXObject(\"Microsoft.XMLDOM\")\n xmlDoc.async = \"false\"\n xmlDoc.loadXML(str)\n return xmlDoc\n }\n }\n\n //last resort fallback\n return function(str) {\n var div = document.createElement('div')\n div.innerHTML = str\n return div\n }\n})()\n\n},{}],72:[function(_dereq_,module,exports){\nmodule.exports = extend\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key]\n }\n }\n }\n\n return target\n}\n\n},{}],73:[function(_dereq_,module,exports){\nmodule.exports={\n \"name\": \"aframe\",\n \"version\": \"1.2.0\",\n \"description\": \"A web framework for building virtual reality experiences.\",\n \"homepage\": \"https://aframe.io/\",\n \"main\": \"dist/aframe-master.js\",\n \"scripts\": {\n \"browserify\": \"browserify src/index.js -s 'AFRAME' -p browserify-derequire\",\n \"build\": \"shx mkdir -p build/ && npm run browserify -- --debug -t [ envify --INSPECTOR_VERSION dev ] -o build/aframe.js\",\n \"codecov\": \"codecov\",\n \"dev\": \"npm run build && cross-env INSPECTOR_VERSION=dev node ./scripts/budo -t envify\",\n \"dist\": \"node scripts/updateVersionLog.js && npm run dist:min && npm run dist:max\",\n \"dist:max\": \"npm run browserify -s -- --debug | exorcist dist/aframe-master.js.map > dist/aframe-master.js\",\n \"dist:min\": \"npm run browserify -s -- --debug -p [ minifyify --map aframe-master.min.js.map --output dist/aframe-master.min.js.map ] -o dist/aframe-master.min.js\",\n \"docs\": \"markserv --dir docs --port 9001\",\n \"preghpages\": \"node ./scripts/preghpages.js\",\n \"ghpages\": \"ghpages -p gh-pages/\",\n \"lint\": \"semistandard -v | snazzy\",\n \"lint:fix\": \"semistandard --fix\",\n \"precommit\": \"npm run lint\",\n \"prepush\": \"node scripts/testOnlyCheck.js\",\n \"prerelease\": \"node scripts/release.js 1.0.4 1.1.0\",\n \"start\": \"npm run dev\",\n \"start:https\": \"cross-env SSL=true npm run dev\",\n \"test\": \"karma start ./tests/karma.conf.js\",\n \"test:docs\": \"node scripts/docsLint.js\",\n \"test:firefox\": \"npm test -- --browsers Firefox\",\n \"test:chrome\": \"npm test -- --browsers Chrome\",\n \"test:nobrowser\": \"NO_BROWSER=true npm test\",\n \"test:node\": \"mocha --ui tdd tests/node\"\n },\n \"repository\": \"aframevr/aframe\",\n \"license\": \"MIT\",\n \"files\": [\n \"dist/*\",\n \"docs/**/*\",\n \"src/**/*\",\n \"vendor/**/*\"\n ],\n \"dependencies\": {\n \"custom-event-polyfill\": \"^1.0.6\",\n \"debug\": \"ngokevin/debug#noTimestamp\",\n \"deep-assign\": \"^2.0.0\",\n \"document-register-element\": \"dmarcos/document-register-element#8ccc532b7f3744be954574caf3072a5fd260ca90\",\n \"load-bmfont\": \"^1.2.3\",\n \"object-assign\": \"^4.0.1\",\n \"present\": \"0.0.6\",\n \"promise-polyfill\": \"^3.1.0\",\n \"super-animejs\": \"^3.1.0\",\n \"super-three\": \"^0.125.1\",\n \"three-bmfont-text\": \"dmarcos/three-bmfont-text#1babdf8507c731a18f8af3b807292e2b9740955e\",\n \"webvr-polyfill\": \"^0.10.12\"\n },\n \"devDependencies\": {\n \"browserify\": \"^13.1.0\",\n \"browserify-css\": \"^0.8.4\",\n \"browserify-derequire\": \"^0.9.4\",\n \"browserify-istanbul\": \"^2.0.0\",\n \"budo\": \"^9.2.0\",\n \"chai\": \"^3.5.0\",\n \"chai-shallow-deep-equal\": \"^1.4.0\",\n \"chalk\": \"^1.1.3\",\n \"codecov\": \"^1.0.1\",\n \"cross-env\": \"^5.0.1\",\n \"envify\": \"^3.4.1\",\n \"exorcist\": \"^0.4.0\",\n \"ghpages\": \"0.0.8\",\n \"git-rev\": \"^0.2.1\",\n \"glob\": \"^7.1.1\",\n \"husky\": \"^0.11.7\",\n \"istanbul\": \"^0.4.5\",\n \"jsdom\": \"^9.11.0\",\n \"karma\": \"1.4.1\",\n \"karma-browserify\": \"^5.1.0\",\n \"karma-chai-shallow-deep-equal\": \"0.0.4\",\n \"karma-chrome-launcher\": \"^2.0.0\",\n \"karma-coverage\": \"^1.1.1\",\n \"karma-env-preprocessor\": \"^0.1.1\",\n \"karma-firefox-launcher\": \"^1.2.0\",\n \"karma-mocha\": \"^1.1.1\",\n \"karma-mocha-reporter\": \"^2.1.0\",\n \"karma-sinon-chai\": \"1.2.4\",\n \"lolex\": \"^1.5.1\",\n \"markserv\": \"github:sukima/markserv#feature/fix-broken-websoketio-link\",\n \"minifyify\": \"^7.3.3\",\n \"mocha\": \"^3.0.2\",\n \"mozilla-download\": \"^1.1.1\",\n \"replace-in-file\": \"^2.5.3\",\n \"semistandard\": \"^9.0.0\",\n \"shelljs\": \"^0.7.7\",\n \"shx\": \"^0.2.2\",\n \"sinon\": \"^1.17.5\",\n \"sinon-chai\": \"2.8.0\",\n \"snazzy\": \"^5.0.0\",\n \"too-wordy\": \"ngokevin/too-wordy\",\n \"uglifyjs\": \"^2.4.10\",\n \"write-good\": \"^0.9.1\"\n },\n \"link\": true,\n \"browserify\": {\n \"transform\": [\n \"browserify-css\",\n \"envify\"\n ]\n },\n \"semistandard\": {\n \"ignore\": [\n \"build/**\",\n \"dist/**\",\n \"examples/**/shaders/*.js\",\n \"**/vendor/**\"\n ]\n },\n \"keywords\": [\n \"3d\",\n \"aframe\",\n \"cardboard\",\n \"components\",\n \"oculus\",\n \"three\",\n \"three.js\",\n \"rift\",\n \"vive\",\n \"vr\",\n \"web-components\",\n \"webvr\"\n ],\n \"browserify-css\": {\n \"minify\": true\n },\n \"engines\": {\n \"node\": \">= 4.6.0\",\n \"npm\": \"^2.15.9\"\n }\n}\n\n},{}],74:[function(_dereq_,module,exports){\nvar anime = _dereq_('super-animejs');\nvar components = _dereq_('../core/component').components;\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils');\n\nvar colorHelperFrom = new THREE.Color();\nvar colorHelperTo = new THREE.Color();\n\nvar getComponentProperty = utils.entity.getComponentProperty;\nvar setComponentProperty = utils.entity.setComponentProperty;\nvar splitCache = {};\n\nvar TYPE_COLOR = 'color';\nvar PROP_POSITION = 'position';\nvar PROP_ROTATION = 'rotation';\nvar PROP_SCALE = 'scale';\nvar STRING_COMPONENTS = 'components';\nvar STRING_OBJECT3D = 'object3D';\n\n/**\n * Animation component for A-Frame using anime.js.\n *\n * The component manually controls the tick by setting `autoplay: false` on anime.js and\n * manually * calling `animation.tick()` in the tick handler. To pause or resume, we toggle a\n * boolean * flag * `isAnimationPlaying`.\n *\n * anime.js animation config for tweenining Javascript objects and values works as:\n *\n * config = {\n * targets: {foo: 0.0, bar: '#000'},\n * foo: 1.0,\n * bar: '#FFF'\n * }\n *\n * The above will tween each property in `targets`. The `to` values are set in the root of\n * the config.\n *\n * @member {object} animation - anime.js instance.\n * @member {boolean} animationIsPlaying - Control if animation is playing.\n */\nmodule.exports.Component = registerComponent('animation', {\n schema: {\n autoplay: {default: true},\n delay: {default: 0},\n dir: {default: ''},\n dur: {default: 1000},\n easing: {default: 'easeInQuad'},\n elasticity: {default: 400},\n enabled: {default: true},\n from: {default: ''},\n loop: {\n default: 0,\n parse: function (value) {\n // Boolean or integer.\n if (value === true || value === 'true') { return true; }\n if (value === false || value === 'false') { return false; }\n return parseInt(value, 10);\n }\n },\n property: {default: ''},\n startEvents: {type: 'array'},\n pauseEvents: {type: 'array'},\n resumeEvents: {type: 'array'},\n round: {default: false},\n to: {default: ''},\n type: {default: ''},\n isRawProperty: {default: false}\n },\n\n multiple: true,\n\n init: function () {\n var self = this;\n\n this.eventDetail = {name: this.attrName};\n this.time = 0;\n\n this.animation = null;\n this.animationIsPlaying = false;\n this.onStartEvent = this.onStartEvent.bind(this);\n this.beginAnimation = this.beginAnimation.bind(this);\n this.pauseAnimation = this.pauseAnimation.bind(this);\n this.resumeAnimation = this.resumeAnimation.bind(this);\n\n this.fromColor = {};\n this.toColor = {};\n this.targets = {};\n this.targetsArray = [];\n\n this.updateConfigForDefault = this.updateConfigForDefault.bind(this);\n this.updateConfigForRawColor = this.updateConfigForRawColor.bind(this);\n\n this.config = {\n complete: function () {\n self.animationIsPlaying = false;\n self.el.emit('animationcomplete', self.eventDetail, false);\n if (self.id) {\n self.el.emit('animationcomplete__' + self.id, self.eventDetail, false);\n }\n }\n };\n },\n\n update: function (oldData) {\n var config = this.config;\n var data = this.data;\n\n this.animationIsPlaying = false;\n\n if (!this.data.enabled) { return; }\n\n if (!data.property) { return; }\n\n // Base config.\n config.autoplay = false;\n config.direction = data.dir;\n config.duration = data.dur;\n config.easing = data.easing;\n config.elasticity = data.elasticity;\n config.loop = data.loop;\n config.round = data.round;\n\n // Start new animation.\n this.createAndStartAnimation();\n },\n\n tick: function (t, dt) {\n if (!this.animationIsPlaying) { return; }\n this.time += dt;\n this.animation.tick(this.time);\n },\n\n remove: function () {\n this.pauseAnimation();\n this.removeEventListeners();\n },\n\n pause: function () {\n this.paused = true;\n this.pausedWasPlaying = this.animationIsPlaying;\n this.pauseAnimation();\n this.removeEventListeners();\n },\n\n /**\n * `play` handler only for resuming scene.\n */\n play: function () {\n if (!this.paused) { return; }\n this.paused = false;\n this.addEventListeners();\n if (this.pausedWasPlaying) {\n this.resumeAnimation();\n this.pausedWasPlaying = false;\n }\n },\n\n /**\n * Start animation from scratch.\n */\n createAndStartAnimation: function () {\n var data = this.data;\n\n this.updateConfig();\n this.animationIsPlaying = false;\n this.animation = anime(this.config);\n this.animation.began = true;\n\n this.removeEventListeners();\n this.addEventListeners();\n\n // Wait for start events for animation.\n if (!data.autoplay || data.startEvents && data.startEvents.length) { return; }\n\n // Delay animation.\n if (data.delay) {\n setTimeout(this.beginAnimation, data.delay);\n return;\n }\n\n // Play animation.\n this.beginAnimation();\n },\n\n /**\n * This is before animation start (including from startEvents).\n * Set to initial state (config.from, time = 0, seekTime = 0).\n */\n beginAnimation: function () {\n this.updateConfig();\n this.animation.began = true;\n this.time = 0;\n this.animationIsPlaying = true;\n this.stopRelatedAnimations();\n this.el.emit('animationbegin', this.eventDetail, false);\n },\n\n pauseAnimation: function () {\n this.animationIsPlaying = false;\n },\n\n resumeAnimation: function () {\n this.animationIsPlaying = true;\n },\n\n /**\n * startEvents callback.\n */\n onStartEvent: function () {\n if (!this.data.enabled) { return; }\n\n this.updateConfig();\n if (this.animation) {\n this.animation.pause();\n }\n this.animation = anime(this.config);\n\n // Include the delay before each start event.\n if (this.data.delay) {\n setTimeout(this.beginAnimation, this.data.delay);\n return;\n }\n this.beginAnimation();\n },\n\n /**\n * rawProperty: true and type: color;\n */\n updateConfigForRawColor: function () {\n var config = this.config;\n var data = this.data;\n var el = this.el;\n var from;\n var key;\n var to;\n\n if (this.waitComponentInitRawProperty(this.updateConfigForRawColor)) {\n return;\n }\n\n from = data.from === '' ? getRawProperty(el, data.property) : data.from;\n to = data.to;\n\n // Use r/g/b vector for color type.\n this.setColorConfig(from, to);\n from = this.fromColor;\n to = this.toColor;\n\n this.targetsArray.length = 0;\n this.targetsArray.push(from);\n config.targets = this.targetsArray;\n for (key in to) { config[key] = to[key]; }\n\n config.update = (function () {\n var lastValue = {};\n return function (anim) {\n var value;\n value = anim.animatables[0].target;\n // For animation timeline.\n if (value.r === lastValue.r &&\n value.g === lastValue.g &&\n value.b === lastValue.b) { return; }\n\n setRawProperty(el, data.property, value, data.type);\n };\n })();\n },\n\n /**\n * Stuff property into generic `property` key.\n */\n updateConfigForDefault: function () {\n var config = this.config;\n var data = this.data;\n var el = this.el;\n var from;\n var isBoolean;\n var isNumber;\n var to;\n\n if (this.waitComponentInitRawProperty(this.updateConfigForDefault)) {\n return;\n }\n\n if (data.from === '') {\n // Infer from.\n from = isRawProperty(data)\n ? getRawProperty(el, data.property)\n : getComponentProperty(el, data.property);\n } else {\n // Explicit from.\n from = data.from;\n }\n\n to = data.to;\n\n isNumber = !isNaN(from || to);\n if (isNumber) {\n from = parseFloat(from);\n to = parseFloat(to);\n } else {\n from = from ? from.toString() : from;\n to = to ? to.toString() : to;\n }\n\n // Convert booleans to integer to allow boolean flipping.\n isBoolean = data.to === 'true' || data.to === 'false' ||\n data.to === true || data.to === false;\n if (isBoolean) {\n from = data.from === 'true' || data.from === true ? 1 : 0;\n to = data.to === 'true' || data.to === true ? 1 : 0;\n }\n\n this.targets.aframeProperty = from;\n config.targets = this.targets;\n config.aframeProperty = to;\n config.update = (function () {\n var lastValue;\n\n return function (anim) {\n var value;\n value = anim.animatables[0].target.aframeProperty;\n\n // Need to do a last value check for animation timeline since all the tweening\n // begins simultaenously even if the value has not changed. Also better for perf\n // anyways.\n if (value === lastValue) { return; }\n lastValue = value;\n\n if (isBoolean) { value = value >= 1; }\n\n if (isRawProperty(data)) {\n setRawProperty(el, data.property, value, data.type);\n } else {\n setComponentProperty(el, data.property, value);\n }\n };\n })();\n },\n\n /**\n * Extend x/y/z/w onto the config.\n * Update vector by modifying object3D.\n */\n updateConfigForVector: function () {\n var config = this.config;\n var data = this.data;\n var el = this.el;\n var key;\n var from;\n var to;\n\n // Parse coordinates.\n from = data.from !== ''\n ? utils.coordinates.parse(data.from) // If data.from defined, use that.\n : getComponentProperty(el, data.property); // If data.from not defined, get on the fly.\n to = utils.coordinates.parse(data.to);\n\n if (data.property === PROP_ROTATION) {\n toRadians(from);\n toRadians(to);\n }\n\n // Set to and from.\n this.targetsArray.length = 0;\n this.targetsArray.push(from);\n config.targets = this.targetsArray;\n for (key in to) { config[key] = to[key]; }\n\n // If animating object3D transformation, run more optimized updater.\n if (data.property === PROP_POSITION || data.property === PROP_ROTATION ||\n data.property === PROP_SCALE) {\n config.update = (function () {\n var lastValue = {};\n return function (anim) {\n var value = anim.animatables[0].target;\n\n if (data.property === PROP_SCALE) {\n value.x = Math.max(0.0001, value.x);\n value.y = Math.max(0.0001, value.y);\n value.z = Math.max(0.0001, value.z);\n }\n\n // For animation timeline.\n if (value.x === lastValue.x &&\n value.y === lastValue.y &&\n value.z === lastValue.z) { return; }\n\n lastValue.x = value.x;\n lastValue.y = value.y;\n lastValue.z = value.z;\n\n el.object3D[data.property].set(value.x, value.y, value.z);\n };\n })();\n return;\n }\n\n // Animating some vector.\n config.update = (function () {\n var lastValue = {};\n return function (anim) {\n var value = anim.animatables[0].target;\n\n // Animate rotation through radians.\n // For animation timeline.\n if (value.x === lastValue.x &&\n value.y === lastValue.y &&\n value.z === lastValue.z) { return; }\n lastValue.x = value.x;\n lastValue.y = value.y;\n lastValue.z = value.z;\n setComponentProperty(el, data.property, value);\n };\n })();\n },\n\n /**\n * Update the config before each run.\n */\n updateConfig: function () {\n var propType;\n\n // Route config type.\n propType = getPropertyType(this.el, this.data.property);\n if (isRawProperty(this.data) && this.data.type === TYPE_COLOR) {\n this.updateConfigForRawColor();\n } else if (propType === 'vec2' || propType === 'vec3' || propType === 'vec4') {\n this.updateConfigForVector();\n } else {\n this.updateConfigForDefault();\n }\n },\n\n /**\n * Wait for component to initialize.\n */\n waitComponentInitRawProperty: function (cb) {\n var componentName;\n var data = this.data;\n var el = this.el;\n var self = this;\n\n if (data.from !== '') { return false; }\n\n if (!data.property.startsWith(STRING_COMPONENTS)) { return false; }\n\n componentName = splitDot(data.property)[1];\n if (el.components[componentName]) { return false; }\n\n el.addEventListener('componentinitialized', function wait (evt) {\n if (evt.detail.name !== componentName) { return; }\n cb();\n // Since the config was created async, create the animation now since we missed it\n // earlier.\n self.animation = anime(self.config);\n el.removeEventListener('componentinitialized', wait);\n });\n return true;\n },\n\n /**\n * Make sure two animations on the same property don't fight each other.\n * e.g., animation__mouseenter=\"property: material.opacity\"\n * animation__mouseleave=\"property: material.opacity\"\n */\n stopRelatedAnimations: function () {\n var component;\n var componentName;\n for (componentName in this.el.components) {\n component = this.el.components[componentName];\n if (componentName === this.attrName) { continue; }\n if (component.name !== 'animation') { continue; }\n if (!component.animationIsPlaying) { continue; }\n if (component.data.property !== this.data.property) { continue; }\n component.animationIsPlaying = false;\n }\n },\n\n addEventListeners: function () {\n var data = this.data;\n var el = this.el;\n addEventListeners(el, data.startEvents, this.onStartEvent);\n addEventListeners(el, data.pauseEvents, this.pauseAnimation);\n addEventListeners(el, data.resumeEvents, this.resumeAnimation);\n },\n\n removeEventListeners: function () {\n var data = this.data;\n var el = this.el;\n removeEventListeners(el, data.startEvents, this.onStartEvent);\n removeEventListeners(el, data.pauseEvents, this.pauseAnimation);\n removeEventListeners(el, data.resumeEvents, this.resumeAnimation);\n },\n\n setColorConfig: function (from, to) {\n colorHelperFrom.set(from);\n colorHelperTo.set(to);\n from = this.fromColor;\n to = this.toColor;\n from.r = colorHelperFrom.r;\n from.g = colorHelperFrom.g;\n from.b = colorHelperFrom.b;\n to.r = colorHelperTo.r;\n to.g = colorHelperTo.g;\n to.b = colorHelperTo.b;\n }\n});\n\n/**\n * Given property name, check schema to see what type we are animating.\n * We just care whether the property is a vector.\n */\nfunction getPropertyType (el, property) {\n var component;\n var componentName;\n var split;\n var propertyName;\n\n split = property.split('.');\n componentName = split[0];\n propertyName = split[1];\n component = el.components[componentName] || components[componentName];\n\n // Primitives.\n if (!component) { return null; }\n\n // Dynamic schema. We only care about vectors anyways.\n if (propertyName && !component.schema[propertyName]) { return null; }\n\n // Multi-prop.\n if (propertyName) { return component.schema[propertyName].type; }\n\n // Single-prop.\n return component.schema.type;\n}\n\n/**\n * Convert object to radians.\n */\nfunction toRadians (obj) {\n obj.x = THREE.Math.degToRad(obj.x);\n obj.y = THREE.Math.degToRad(obj.y);\n obj.z = THREE.Math.degToRad(obj.z);\n}\n\nfunction addEventListeners (el, eventNames, handler) {\n var i;\n for (i = 0; i < eventNames.length; i++) {\n el.addEventListener(eventNames[i], handler);\n }\n}\n\nfunction removeEventListeners (el, eventNames, handler) {\n var i;\n for (i = 0; i < eventNames.length; i++) {\n el.removeEventListener(eventNames[i], handler);\n }\n}\n\nfunction getRawProperty (el, path) {\n var i;\n var split;\n var value;\n split = splitDot(path);\n value = el;\n for (i = 0; i < split.length; i++) {\n value = value[split[i]];\n }\n if (value === undefined) {\n console.log(el);\n throw new Error('[animation] property (' + path + ') could not be found');\n }\n return value;\n}\n\nfunction setRawProperty (el, path, value, type) {\n var i;\n var split;\n var propertyName;\n var targetValue;\n\n if (path.startsWith('object3D.rotation')) {\n value = THREE.Math.degToRad(value);\n }\n\n // Walk.\n split = splitDot(path);\n targetValue = el;\n for (i = 0; i < split.length - 1; i++) { targetValue = targetValue[split[i]]; }\n propertyName = split[split.length - 1];\n\n // Raw color.\n if (type === TYPE_COLOR) {\n if ('r' in targetValue[propertyName]) {\n targetValue[propertyName].r = value.r;\n targetValue[propertyName].g = value.g;\n targetValue[propertyName].b = value.b;\n } else {\n targetValue[propertyName].x = value.r;\n targetValue[propertyName].y = value.g;\n targetValue[propertyName].z = value.b;\n }\n return;\n }\n\n targetValue[propertyName] = value;\n}\n\nfunction splitDot (path) {\n if (path in splitCache) { return splitCache[path]; }\n splitCache[path] = path.split('.');\n return splitCache[path];\n}\n\nfunction isRawProperty (data) {\n return data.isRawProperty || data.property.startsWith(STRING_COMPONENTS) ||\n data.property.startsWith(STRING_OBJECT3D);\n}\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils\":205,\"super-animejs\":56}],75:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\n/**\n * Camera component.\n * Pairs along with camera system to handle tracking the active camera.\n */\nmodule.exports.Component = registerComponent('camera', {\n schema: {\n active: {default: true},\n far: {default: 10000},\n fov: {default: 80, min: 0},\n near: {default: 0.005, min: 0},\n spectator: {default: false},\n zoom: {default: 1, min: 0}\n },\n\n /**\n * Initialize three.js camera and add it to the entity.\n * Add reference from scene to this entity as the camera.\n */\n init: function () {\n var camera;\n var el = this.el;\n\n // Create camera.\n camera = this.camera = new THREE.PerspectiveCamera();\n el.setObject3D('camera', camera);\n },\n\n /**\n * Update three.js camera.\n */\n update: function (oldData) {\n var data = this.data;\n var camera = this.camera;\n\n // Update properties.\n camera.aspect = data.aspect || (window.innerWidth / window.innerHeight);\n camera.far = data.far;\n camera.fov = data.fov;\n camera.near = data.near;\n camera.zoom = data.zoom;\n camera.updateProjectionMatrix();\n\n this.updateActiveCamera(oldData);\n this.updateSpectatorCamera(oldData);\n },\n\n updateActiveCamera: function (oldData) {\n var data = this.data;\n var el = this.el;\n var system = this.system;\n // Active property did not change.\n if (oldData && oldData.active === data.active || data.spectator) { return; }\n\n // If `active` property changes, or first update, handle active camera with system.\n if (data.active && system.activeCameraEl !== el) {\n // Camera enabled. Set camera to this camera.\n system.setActiveCamera(el);\n } else if (!data.active && system.activeCameraEl === el) {\n // Camera disabled. Set camera to another camera.\n system.disableActiveCamera();\n }\n },\n\n updateSpectatorCamera: function (oldData) {\n var data = this.data;\n var el = this.el;\n var system = this.system;\n // spectator property did not change.\n if (oldData && oldData.spectator === data.spectator) { return; }\n\n // If `spectator` property changes, or first update, handle spectator camera with system.\n if (data.spectator && system.spectatorCameraEl !== el) {\n // Camera enabled. Set camera to this camera.\n system.setSpectatorCamera(el);\n } else if (!data.spectator && system.spectatorCameraEl === el) {\n // Camera disabled. Set camera to another camera.\n system.disableSpectatorCamera();\n }\n },\n\n /**\n * Remove camera on remove (callback).\n */\n remove: function () {\n this.el.removeObject3D('camera');\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179}],76:[function(_dereq_,module,exports){\n/* global THREE */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar utils = _dereq_('../utils/');\n\nvar bind = utils.bind;\n\nvar EVENTS = {\n CLICK: 'click',\n FUSING: 'fusing',\n MOUSEENTER: 'mouseenter',\n MOUSEDOWN: 'mousedown',\n MOUSELEAVE: 'mouseleave',\n MOUSEUP: 'mouseup'\n};\n\nvar STATES = {\n FUSING: 'cursor-fusing',\n HOVERING: 'cursor-hovering',\n HOVERED: 'cursor-hovered'\n};\n\nvar CANVAS_EVENTS = {\n DOWN: ['mousedown', 'touchstart'],\n UP: ['mouseup', 'touchend']\n};\n\nvar WEBXR_EVENTS = {\n DOWN: ['selectstart'],\n UP: ['selectend']\n};\n\nvar CANVAS_HOVER_CLASS = 'a-mouse-cursor-hover';\n\n/**\n * Cursor component. Applies the raycaster component specifically for starting the raycaster\n * from the camera and pointing from camera's facing direction, and then only returning the\n * closest intersection. Cursor can be fine-tuned by setting raycaster properties.\n *\n * @member {object} fuseTimeout - Timeout to trigger fuse-click.\n * @member {Element} cursorDownEl - Entity that was last mousedowned during current click.\n * @member {object} intersection - Attributes of the current intersection event, including\n * 3D- and 2D-space coordinates. See: http://threejs.org/docs/api/core/Raycaster.html\n * @member {Element} intersectedEl - Currently-intersected entity. Used to keep track to\n * emit events when unintersecting.\n */\nmodule.exports.Component = registerComponent('cursor', {\n dependencies: ['raycaster'],\n\n schema: {\n downEvents: {default: []},\n fuse: {default: utils.device.isMobile()},\n fuseTimeout: {default: 1500, min: 0},\n mouseCursorStylesEnabled: {default: true},\n upEvents: {default: []},\n rayOrigin: {default: 'entity', oneOf: ['mouse', 'entity']}\n },\n\n init: function () {\n var self = this;\n\n this.fuseTimeout = undefined;\n this.cursorDownEl = null;\n this.intersectedEl = null;\n this.canvasBounds = document.body.getBoundingClientRect();\n this.isCursorDown = false;\n\n // Debounce.\n this.updateCanvasBounds = utils.debounce(function updateCanvasBounds () {\n self.canvasBounds = self.el.sceneEl.canvas.getBoundingClientRect();\n }, 500);\n\n this.eventDetail = {};\n this.intersectedEventDetail = {cursorEl: this.el};\n\n // Bind methods.\n this.onCursorDown = bind(this.onCursorDown, this);\n this.onCursorUp = bind(this.onCursorUp, this);\n this.onIntersection = bind(this.onIntersection, this);\n this.onIntersectionCleared = bind(this.onIntersectionCleared, this);\n this.onMouseMove = bind(this.onMouseMove, this);\n this.onEnterVR = bind(this.onEnterVR, this);\n },\n\n update: function (oldData) {\n if (this.data.rayOrigin === oldData.rayOrigin) { return; }\n this.updateMouseEventListeners();\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n },\n\n remove: function () {\n var el = this.el;\n el.removeState(STATES.HOVERING);\n el.removeState(STATES.FUSING);\n clearTimeout(this.fuseTimeout);\n if (this.intersectedEl) { this.intersectedEl.removeState(STATES.HOVERED); }\n this.removeEventListeners();\n },\n\n addEventListeners: function () {\n var canvas;\n var data = this.data;\n var el = this.el;\n var self = this;\n\n function addCanvasListeners () {\n canvas = el.sceneEl.canvas;\n if (data.downEvents.length || data.upEvents.length) { return; }\n CANVAS_EVENTS.DOWN.forEach(function (downEvent) {\n canvas.addEventListener(downEvent, self.onCursorDown);\n });\n CANVAS_EVENTS.UP.forEach(function (upEvent) {\n canvas.addEventListener(upEvent, self.onCursorUp);\n });\n }\n\n canvas = el.sceneEl.canvas;\n if (canvas) {\n addCanvasListeners();\n } else {\n el.sceneEl.addEventListener('render-target-loaded', addCanvasListeners);\n }\n\n data.downEvents.forEach(function (downEvent) {\n el.addEventListener(downEvent, self.onCursorDown);\n });\n data.upEvents.forEach(function (upEvent) {\n el.addEventListener(upEvent, self.onCursorUp);\n });\n el.addEventListener('raycaster-intersection', this.onIntersection);\n el.addEventListener('raycaster-intersection-cleared', this.onIntersectionCleared);\n\n el.sceneEl.addEventListener('rendererresize', this.updateCanvasBounds);\n el.sceneEl.addEventListener('enter-vr', this.onEnterVR);\n window.addEventListener('resize', this.updateCanvasBounds);\n window.addEventListener('scroll', this.updateCanvasBounds);\n\n this.updateMouseEventListeners();\n },\n\n removeEventListeners: function () {\n var canvas;\n var data = this.data;\n var el = this.el;\n var self = this;\n\n canvas = el.sceneEl.canvas;\n if (canvas && !data.downEvents.length && !data.upEvents.length) {\n CANVAS_EVENTS.DOWN.forEach(function (downEvent) {\n canvas.removeEventListener(downEvent, self.onCursorDown);\n });\n CANVAS_EVENTS.UP.forEach(function (upEvent) {\n canvas.removeEventListener(upEvent, self.onCursorUp);\n });\n }\n\n data.downEvents.forEach(function (downEvent) {\n el.removeEventListener(downEvent, self.onCursorDown);\n });\n data.upEvents.forEach(function (upEvent) {\n el.removeEventListener(upEvent, self.onCursorUp);\n });\n el.removeEventListener('raycaster-intersection', this.onIntersection);\n el.removeEventListener('raycaster-intersection-cleared', this.onIntersectionCleared);\n canvas.removeEventListener('mousemove', this.onMouseMove);\n canvas.removeEventListener('touchstart', this.onMouseMove);\n canvas.removeEventListener('touchmove', this.onMouseMove);\n\n el.sceneEl.removeEventListener('rendererresize', this.updateCanvasBounds);\n el.sceneEl.removeEventListener('enter-vr', this.onEnterVR);\n window.removeEventListener('resize', this.updateCanvasBounds);\n window.removeEventListener('scroll', this.updateCanvasBounds);\n },\n\n updateMouseEventListeners: function () {\n var canvas;\n var el = this.el;\n\n canvas = el.sceneEl.canvas;\n canvas.removeEventListener('mousemove', this.onMouseMove);\n canvas.removeEventListener('touchmove', this.onMouseMove);\n el.setAttribute('raycaster', 'useWorldCoordinates', false);\n if (this.data.rayOrigin !== 'mouse') { return; }\n canvas.addEventListener('mousemove', this.onMouseMove, false);\n canvas.addEventListener('touchmove', this.onMouseMove, false);\n el.setAttribute('raycaster', 'useWorldCoordinates', true);\n this.updateCanvasBounds();\n },\n\n onMouseMove: (function () {\n var direction = new THREE.Vector3();\n var mouse = new THREE.Vector2();\n var origin = new THREE.Vector3();\n var rayCasterConfig = {origin: origin, direction: direction};\n\n return function (evt) {\n var bounds = this.canvasBounds;\n var camera = this.el.sceneEl.camera;\n var left;\n var point;\n var top;\n\n camera.parent.updateMatrixWorld();\n\n // Calculate mouse position based on the canvas element\n if (evt.type === 'touchmove' || evt.type === 'touchstart') {\n // Track the first touch for simplicity.\n point = evt.touches.item(0);\n } else {\n point = evt;\n }\n\n left = point.clientX - bounds.left;\n top = point.clientY - bounds.top;\n mouse.x = (left / bounds.width) * 2 - 1;\n mouse.y = -(top / bounds.height) * 2 + 1;\n\n origin.setFromMatrixPosition(camera.matrixWorld);\n direction.set(mouse.x, mouse.y, 0.5).unproject(camera).sub(origin).normalize();\n this.el.setAttribute('raycaster', rayCasterConfig);\n if (evt.type === 'touchmove') { evt.preventDefault(); }\n };\n })(),\n\n /**\n * Trigger mousedown and keep track of the mousedowned entity.\n */\n onCursorDown: function (evt) {\n this.isCursorDown = true;\n // Raycast again for touch.\n if (this.data.rayOrigin === 'mouse' && evt.type === 'touchstart') {\n this.onMouseMove(evt);\n this.el.components.raycaster.checkIntersections();\n evt.preventDefault();\n }\n\n this.twoWayEmit(EVENTS.MOUSEDOWN);\n this.cursorDownEl = this.intersectedEl;\n },\n\n /**\n * Trigger mouseup if:\n * - Not fusing (mobile has no mouse).\n * - Currently intersecting an entity.\n * - Currently-intersected entity is the same as the one when mousedown was triggered,\n * in case user mousedowned one entity, dragged to another, and mouseupped.\n */\n onCursorUp: function (evt) {\n if (!this.isCursorDown) { return; }\n\n this.isCursorDown = false;\n\n var data = this.data;\n this.twoWayEmit(EVENTS.MOUSEUP);\n\n // If intersected entity has changed since the cursorDown, still emit mouseUp on the\n // previously cursorUp entity.\n if (this.cursorDownEl && this.cursorDownEl !== this.intersectedEl) {\n this.intersectedEventDetail.intersection = null;\n this.cursorDownEl.emit(EVENTS.MOUSEUP, this.intersectedEventDetail);\n }\n\n if ((!data.fuse || data.rayOrigin === 'mouse') &&\n this.intersectedEl && this.cursorDownEl === this.intersectedEl) {\n this.twoWayEmit(EVENTS.CLICK);\n }\n\n this.cursorDownEl = null;\n if (evt.type === 'touchend') { evt.preventDefault(); }\n },\n\n /**\n * Handle intersection.\n */\n onIntersection: function (evt) {\n var currentIntersection;\n var cursorEl = this.el;\n var index;\n var intersectedEl;\n var intersection;\n\n // Select closest object, excluding the cursor.\n index = evt.detail.els[0] === cursorEl ? 1 : 0;\n intersection = evt.detail.intersections[index];\n intersectedEl = evt.detail.els[index];\n\n // If cursor is the only intersected object, ignore the event.\n if (!intersectedEl) { return; }\n\n // Already intersecting this entity.\n if (this.intersectedEl === intersectedEl) { return; }\n\n // Ignore events further away than active intersection.\n if (this.intersectedEl) {\n currentIntersection = this.el.components.raycaster.getIntersection(this.intersectedEl);\n if (currentIntersection && currentIntersection.distance <= intersection.distance) { return; }\n }\n\n // Unset current intersection.\n this.clearCurrentIntersection(true);\n\n this.setIntersection(intersectedEl, intersection);\n },\n\n /**\n * Handle intersection cleared.\n */\n onIntersectionCleared: function (evt) {\n var clearedEls = evt.detail.clearedEls;\n // Check if the current intersection has ended\n if (clearedEls.indexOf(this.intersectedEl) === -1) { return; }\n this.clearCurrentIntersection();\n },\n\n onEnterVR: function () {\n this.clearCurrentIntersection(true);\n var xrSession = this.el.sceneEl.xrSession;\n var self = this;\n if (!xrSession) { return; }\n if (this.data.rayOrigin === 'mouse') { return; }\n WEBXR_EVENTS.DOWN.forEach(function (downEvent) {\n xrSession.addEventListener(downEvent, self.onCursorDown);\n });\n WEBXR_EVENTS.UP.forEach(function (upEvent) {\n xrSession.addEventListener(upEvent, self.onCursorUp);\n });\n },\n\n setIntersection: function (intersectedEl, intersection) {\n var cursorEl = this.el;\n var data = this.data;\n var self = this;\n\n // Already intersecting.\n if (this.intersectedEl === intersectedEl) { return; }\n\n // Set new intersection.\n this.intersectedEl = intersectedEl;\n\n // Hovering.\n cursorEl.addState(STATES.HOVERING);\n intersectedEl.addState(STATES.HOVERED);\n this.twoWayEmit(EVENTS.MOUSEENTER);\n\n if (this.data.mouseCursorStylesEnabled && this.data.rayOrigin === 'mouse') {\n this.el.sceneEl.canvas.classList.add(CANVAS_HOVER_CLASS);\n }\n\n // Begin fuse if necessary.\n if (data.fuseTimeout === 0 || !data.fuse) { return; }\n cursorEl.addState(STATES.FUSING);\n this.twoWayEmit(EVENTS.FUSING);\n this.fuseTimeout = setTimeout(function fuse () {\n cursorEl.removeState(STATES.FUSING);\n self.twoWayEmit(EVENTS.CLICK);\n }, data.fuseTimeout);\n },\n\n clearCurrentIntersection: function (ignoreRemaining) {\n var index;\n var intersection;\n var intersections;\n var cursorEl = this.el;\n\n // Nothing to be cleared.\n if (!this.intersectedEl) { return; }\n\n // No longer hovering (or fusing).\n this.intersectedEl.removeState(STATES.HOVERED);\n cursorEl.removeState(STATES.HOVERING);\n cursorEl.removeState(STATES.FUSING);\n this.twoWayEmit(EVENTS.MOUSELEAVE);\n\n if (this.data.mouseCursorStylesEnabled && this.data.rayOrigin === 'mouse') {\n this.el.sceneEl.canvas.classList.remove(CANVAS_HOVER_CLASS);\n }\n\n // Unset intersected entity (after emitting the event).\n this.intersectedEl = null;\n\n // Clear fuseTimeout.\n clearTimeout(this.fuseTimeout);\n\n // Set intersection to another raycasted element if any.\n if (ignoreRemaining === true) { return; }\n intersections = this.el.components.raycaster.intersections;\n if (intersections.length === 0) { return; }\n // Exclude the cursor.\n index = intersections[0].object.el === cursorEl ? 1 : 0;\n intersection = intersections[index];\n if (!intersection) { return; }\n this.setIntersection(intersection.object.el, intersection);\n },\n\n /**\n * Helper to emit on both the cursor and the intersected entity (if exists).\n */\n twoWayEmit: function (evtName) {\n var el = this.el;\n var intersectedEl = this.intersectedEl;\n var intersection;\n\n intersection = this.el.components.raycaster.getIntersection(intersectedEl);\n this.eventDetail.intersectedEl = intersectedEl;\n this.eventDetail.intersection = intersection;\n el.emit(evtName, this.eventDetail);\n\n if (!intersectedEl) { return; }\n\n this.intersectedEventDetail.intersection = intersection;\n intersectedEl.emit(evtName, this.intersectedEventDetail);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205}],77:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar DAYDREAM_CONTROLLER_MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/google/';\nvar DAYDREAM_CONTROLLER_MODEL_OBJ_URL = DAYDREAM_CONTROLLER_MODEL_BASE_URL + 'vr_controller_daydream.obj';\nvar DAYDREAM_CONTROLLER_MODEL_OBJ_MTL = DAYDREAM_CONTROLLER_MODEL_BASE_URL + 'vr_controller_daydream.mtl';\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'google-daydream';\nvar GAMEPAD_ID_WEBVR = 'Daydream Controller';\n\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n/**\n * Button indices:\n * 0 - trackpad\n * 1 - menu (never dispatched on this layer)\n * 2 - system (never dispatched on this layer)\n *\n * Axis:\n * 0 - trackpad x\n * 1 - trackpad y\n */\nvar INPUT_MAPPING_WEBVR = {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'menu', 'system']\n};\n\n/**\n * Button indices:\n * 0 - none\n * 1 - none\n * 2 - touchpad\n *\n * Axis:\n * 0 - touchpad x\n * 1 - touchpad y\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/google/google-daydream.json\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {touchpad: [0, 1]},\n buttons: ['none', 'none', 'touchpad', 'menu', 'system']\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Daydream controls.\n * Interface with Daydream controller and map Gamepad events to\n * controller buttons: trackpad, menu, system\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('daydream-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n buttonColor: {type: 'color', default: '#000000'},\n buttonTouchedColor: {type: 'color', default: '#777777'},\n buttonHighlightColor: {type: 'color', default: '#FFFFFF'},\n model: {default: true},\n orientationOffset: {type: 'vec3'},\n armModel: {default: true}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX,\n this.data.hand ? {hand: this.data.hand} : {});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n armModel: data.armModel,\n hand: data.hand,\n idPrefix: GAMEPAD_ID_PREFIX,\n id: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset\n });\n if (!this.data.model) { return; }\n this.el.setAttribute('obj-model', {\n obj: DAYDREAM_CONTROLLER_MODEL_OBJ_URL,\n mtl: DAYDREAM_CONTROLLER_MODEL_OBJ_MTL\n });\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n var buttonMeshes;\n if (!this.data.model) { return; }\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.menu = controllerObject3D.getObjectByName('AppButton_AppButton_Cylinder.004');\n buttonMeshes.system = controllerObject3D.getObjectByName('HomeButton_HomeButton_Cylinder.005');\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('TouchPad_TouchPad_Cylinder.003');\n buttonMeshes.touchpad = controllerObject3D.getObjectByName('TouchPad_TouchPad_Cylinder.003');\n // Offset pivot point.\n controllerObject3D.position.set(0, 0, -0.04);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var buttonMeshes = this.buttonMeshes;\n if (!buttonMeshes || !buttonMeshes[buttonName]) { return; }\n var color;\n switch (state) {\n case 'down':\n color = this.data.buttonHighlightColor;\n break;\n case 'touchstart':\n color = this.data.buttonTouchedColor;\n break;\n default:\n color = this.data.buttonColor;\n }\n buttonMeshes[buttonName].material.color.set(color);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],78:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GEARVR_CONTROLLER_MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/samsung/';\nvar GEARVR_CONTROLLER_MODEL_OBJ_URL = GEARVR_CONTROLLER_MODEL_BASE_URL + 'gear_vr_controller.obj';\nvar GEARVR_CONTROLLER_MODEL_OBJ_MTL = GEARVR_CONTROLLER_MODEL_BASE_URL + 'gear_vr_controller.mtl';\n\nvar GAMEPAD_ID_WEBXR = 'samsung-gearvr';\nvar GAMEPAD_ID_WEBVR = 'Gear VR';\n\n// Prefix for Gen1 and Gen2 Oculus Touch Controllers.\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n/**\n * Button indices:\n * 0 - trackpad\n * 1 - trigger\n *\n * Axis:\n * 0 - trackpad x\n * 1 - trackpad y\n */\nvar INPUT_MAPPING_WEBVR = {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'trigger']\n};\n\n/**\n * Button indices:\n * 0 - trigger\n * 1 - none\n * 2 - touchpad\n * 3 - menu\n *\n * Axis:\n * 0 - touchpad x\n * 1 - touchpad y\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/samsung/samsung-gearvr.json\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {touchpad: [0, 1]},\n buttons: ['trigger', 'none', 'touchpad', 'none', 'menu']\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Gear VR controls.\n * Interface with Gear VR controller and map Gamepad events to\n * controller buttons: trackpad, trigger\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('gearvr-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n buttonColor: {type: 'color', default: '#000000'},\n buttonTouchedColor: {type: 'color', default: '#777777'},\n buttonHighlightColor: {type: 'color', default: '#FFFFFF'},\n model: {default: true},\n orientationOffset: {type: 'vec3'},\n armModel: {default: true}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX,\n this.data.hand ? {hand: this.data.hand} : {});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n armModel: data.armModel,\n hand: data.hand,\n idPrefix: GAMEPAD_ID_PREFIX,\n id: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset\n });\n if (!this.data.model) { return; }\n this.el.setAttribute('obj-model', {\n obj: GEARVR_CONTROLLER_MODEL_OBJ_URL,\n mtl: GEARVR_CONTROLLER_MODEL_OBJ_MTL\n });\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n // No need for onButtonChanged, since Gear VR controller has no analog buttons.\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n var buttonMeshes;\n if (!this.data.model) { return; }\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.trigger = controllerObject3D.children[2];\n buttonMeshes.trackpad = controllerObject3D.children[1];\n buttonMeshes.touchpad = controllerObject3D.children[1];\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var buttonMeshes = this.buttonMeshes;\n if (!buttonMeshes || !buttonMeshes[buttonName]) { return; }\n var color;\n switch (state) {\n case 'down':\n color = this.data.buttonHighlightColor;\n break;\n case 'touchstart':\n color = this.data.buttonTouchedColor;\n break;\n default:\n color = this.data.buttonColor;\n }\n buttonMeshes[buttonName].material.color.set(color);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],79:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar GAMEPAD_ID_PREFIX = 'generic';\n\n/**\n * Button indices:\n * 0 - trigger\n * 1 - squeeze\n * 2 - touchpad\n * 3 - thumbstick\n *\n * Axis:\n * 0 - touchpad\n * 1 - thumbstick\n *\n */\nvar INPUT_MAPPING = {\n axes: {\n touchpad: [0, 1],\n thumbstick: [2, 3]\n },\n buttons: ['trigger', 'squeeze', 'touchpad', 'thumbstick']\n};\n\n/**\n * Oculus Go controls.\n * Interface with Oculus Go controller and map Gamepad events to\n * controller buttons: trackpad, trigger\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('generic-tracked-controller-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n defaultModel: {default: true},\n defaultModelColor: {default: 'gray'},\n orientationOffset: {type: 'vec3'},\n disabled: {default: false}\n },\n\n /**\n * Button IDs:\n * 0 - trackpad\n * 1 - trigger\n */\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.wasControllerConnected = false;\n this.lastControllerCheck = 0;\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.bindMethods();\n\n // generic-tracked-controller-controls has the lowest precedence.\n // We must diable this component if there are more specialized controls components.\n this.el.addEventListener('controllerconnected', function (evt) {\n if (evt.detail.name === self.name) { return; }\n self.wasControllerConnected = true;\n self.removeEventListeners();\n self.removeControllersUpdateListener();\n });\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n var data = this.data;\n var hand = data.hand ? data.hand : undefined;\n checkControllerPresentAndSetup(\n this, GAMEPAD_ID_PREFIX,\n {hand: hand, iterateControllerProfiles: true});\n },\n\n play: function () {\n if (this.wasControllerConnected) { return; }\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n\n // Do nothing if tracked-controls already set.\n // Generic controls have the lowest precedence.\n if (this.el.components['tracked-controls']) {\n this.removeEventListeners();\n return;\n }\n el.setAttribute('tracked-controls', {\n hand: data.hand,\n idPrefix: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset,\n iterateControllerProfiles: true\n });\n if (!this.data.defaultModel) { return; }\n this.initDefaultModel();\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n initDefaultModel: function () {\n var modelEl = this.modelEl = document.createElement('a-entity');\n modelEl.setAttribute('geometry', {\n primitive: 'sphere',\n radius: 0.03\n });\n modelEl.setAttribute('material', {color: this.data.color});\n this.el.appendChild(modelEl);\n }\n});\n\n},{\"../core/component\":131,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],80:[function(_dereq_,module,exports){\nvar geometries = _dereq_('../core/geometry').geometries;\nvar geometryNames = _dereq_('../core/geometry').geometryNames;\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\nvar dummyGeometry = new THREE.BufferGeometry();\n\n/**\n * Geometry component. Combined with material component to make a mesh in 3D object.\n * Extended with registered geometries.\n */\nmodule.exports.Component = registerComponent('geometry', {\n schema: {\n buffer: {default: true},\n primitive: {default: 'box', oneOf: geometryNames, schemaChange: true},\n skipCache: {default: false}\n },\n\n init: function () {\n this.geometry = null;\n },\n\n /**\n * Talk to geometry system to get or create geometry.\n */\n update: function (previousData) {\n var data = this.data;\n var el = this.el;\n var mesh;\n var system = this.system;\n\n // Dispose old geometry if we created one.\n if (this.geometry) {\n system.unuseGeometry(previousData);\n this.geometry = null;\n }\n\n // Create new geometry.\n this.geometry = system.getOrCreateGeometry(data);\n\n // Set on mesh. If mesh does not exist, create it.\n mesh = el.getObject3D('mesh');\n if (mesh) {\n mesh.geometry = this.geometry;\n } else {\n mesh = new THREE.Mesh();\n mesh.geometry = this.geometry;\n // Default material if not defined on the entity.\n if (!this.el.getAttribute('material')) {\n mesh.material = new THREE.MeshStandardMaterial({\n color: Math.random() * 0xFFFFFF,\n metalness: 0,\n roughness: 0.5\n });\n }\n el.setObject3D('mesh', mesh);\n }\n },\n\n /**\n * Tell geometry system that entity is no longer using the geometry.\n * Unset the geometry on the mesh\n */\n remove: function () {\n this.system.unuseGeometry(this.data);\n this.el.getObject3D('mesh').geometry = dummyGeometry;\n this.geometry = null;\n },\n\n /**\n * Update geometry component schema based on geometry type.\n */\n updateSchema: function (data) {\n var currentGeometryType = this.oldData && this.oldData.primitive;\n var newGeometryType = data.primitive;\n var schema = geometries[newGeometryType] && geometries[newGeometryType].schema;\n\n // Geometry has no schema.\n if (!schema) { throw new Error('Unknown geometry schema `' + newGeometryType + '`'); }\n // Nothing has changed.\n if (currentGeometryType && currentGeometryType === newGeometryType) { return; }\n\n this.extendSchema(schema);\n }\n});\n\n},{\"../core/component\":131,\"../core/geometry\":132,\"../lib/three\":179}],81:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\nvar warn = utils.debug('components:gltf-model:warn');\n\n/**\n * glTF model loader.\n */\nmodule.exports.Component = registerComponent('gltf-model', {\n schema: {type: 'model'},\n\n init: function () {\n var dracoLoader = this.system.getDRACOLoader();\n this.model = null;\n this.loader = new THREE.GLTFLoader();\n if (dracoLoader) {\n this.loader.setDRACOLoader(dracoLoader);\n }\n },\n\n update: function () {\n var self = this;\n var el = this.el;\n var src = this.data;\n\n if (!src) { return; }\n\n this.remove();\n\n this.loader.load(src, function gltfLoaded (gltfModel) {\n self.model = gltfModel.scene || gltfModel.scenes[0];\n self.model.animations = gltfModel.animations;\n el.setObject3D('mesh', self.model);\n el.emit('model-loaded', {format: 'gltf', model: self.model});\n }, undefined /* onProgress */, function gltfFailed (error) {\n var message = (error && error.message) ? error.message : 'Failed to load glTF model';\n warn(message);\n el.emit('model-error', {format: 'gltf', src: src});\n });\n },\n\n remove: function () {\n if (!this.model) { return; }\n this.el.removeObject3D('mesh');\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205}],82:[function(_dereq_,module,exports){\n/* global THREE */\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\n// Found at https://github.com/aframevr/assets.\nvar MODEL_URLS = {\n toonLeft: 'https://cdn.aframe.io/controllers/hands/leftHand.glb',\n toonRight: 'https://cdn.aframe.io/controllers/hands/rightHand.glb',\n lowPolyLeft: 'https://cdn.aframe.io/controllers/hands/leftHandLow.glb',\n lowPolyRight: 'https://cdn.aframe.io/controllers/hands/rightHandLow.glb',\n highPolyLeft: 'https://cdn.aframe.io/controllers/hands/leftHandHigh.glb',\n highPolyRight: 'https://cdn.aframe.io/controllers/hands/rightHandHigh.glb'\n};\n\n// Poses.\nvar ANIMATIONS = {\n open: 'Open',\n // point: grip active, trackpad surface active, trigger inactive.\n point: 'Point',\n // pointThumb: grip active, trigger inactive, trackpad surface inactive.\n pointThumb: 'Point + Thumb',\n // fist: grip active, trigger active, trackpad surface active.\n fist: 'Fist',\n // hold: trigger active, grip inactive.\n hold: 'Hold',\n // thumbUp: grip active, trigger active, trackpad surface inactive.\n thumbUp: 'Thumb Up'\n};\n\n// Map animation to public events for the API.\nvar EVENTS = {};\nEVENTS[ANIMATIONS.fist] = 'grip';\nEVENTS[ANIMATIONS.thumbUp] = 'pistol';\nEVENTS[ANIMATIONS.point] = 'pointing';\n\n/**\n * Hand controls component that abstracts 6DoF controls:\n * oculus-touch-controls, vive-controls, windows-motion-controls.\n *\n * Originally meant to be a sample implementation of applications-specific controls that\n * abstracts multiple types of controllers.\n *\n * Auto-detect appropriate controller.\n * Handle common events coming from the detected vendor-specific controls.\n * Translate button events to semantic hand-related event names:\n * (gripclose, gripopen, thumbup, thumbdown, pointup, pointdown)\n * Load hand model with gestures that are applied based on the button pressed.\n *\n * @property {string} Hand mapping (`left`, `right`).\n */\nmodule.exports.Component = registerComponent('hand-controls', {\n schema: {\n color: {default: 'white', type: 'color'},\n hand: { default: 'left' },\n handModelStyle: {default: 'lowPoly', oneOf: ['lowPoly', 'highPoly', 'toon']}\n },\n\n init: function () {\n var self = this;\n var el = this.el;\n // Current pose.\n this.gesture = ANIMATIONS.open;\n // Active buttons populated by events provided by the attached controls.\n this.pressedButtons = {};\n this.touchedButtons = {};\n this.loader = new THREE.GLTFLoader();\n this.loader.setCrossOrigin('anonymous');\n\n this.onGripDown = function () { self.handleButton('grip', 'down'); };\n this.onGripUp = function () { self.handleButton('grip', 'up'); };\n this.onTrackpadDown = function () { self.handleButton('trackpad', 'down'); };\n this.onTrackpadUp = function () { self.handleButton('trackpad', 'up'); };\n this.onTrackpadTouchStart = function () { self.handleButton('trackpad', 'touchstart'); };\n this.onTrackpadTouchEnd = function () { self.handleButton('trackpad', 'touchend'); };\n this.onTriggerDown = function () { self.handleButton('trigger', 'down'); };\n this.onTriggerUp = function () { self.handleButton('trigger', 'up'); };\n this.onTriggerTouchStart = function () { self.handleButton('trigger', 'touchstart'); };\n this.onTriggerTouchEnd = function () { self.handleButton('trigger', 'touchend'); };\n this.onGripTouchStart = function () { self.handleButton('grip', 'touchstart'); };\n this.onGripTouchEnd = function () { self.handleButton('grip', 'touchend'); };\n this.onThumbstickDown = function () { self.handleButton('thumbstick', 'down'); };\n this.onThumbstickUp = function () { self.handleButton('thumbstick', 'up'); };\n this.onAorXTouchStart = function () { self.handleButton('AorX', 'touchstart'); };\n this.onAorXTouchEnd = function () { self.handleButton('AorX', 'touchend'); };\n this.onBorYTouchStart = function () { self.handleButton('BorY', 'touchstart'); };\n this.onBorYTouchEnd = function () { self.handleButton('BorY', 'touchend'); };\n this.onSurfaceTouchStart = function () { self.handleButton('surface', 'touchstart'); };\n this.onSurfaceTouchEnd = function () { self.handleButton('surface', 'touchend'); };\n this.onControllerConnected = this.onControllerConnected.bind(this);\n this.onControllerDisconnected = this.onControllerDisconnected.bind(this);\n\n el.addEventListener('controllerconnected', this.onControllerConnected);\n el.addEventListener('controllerdisconnected', this.onControllerDisconnected);\n\n // Hidden by default.\n el.object3D.visible = false;\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n },\n\n tick: function (time, delta) {\n var mesh = this.el.getObject3D('mesh');\n\n if (!mesh || !mesh.mixer) { return; }\n\n mesh.mixer.update(delta / 1000);\n },\n\n onControllerConnected: function () {\n this.el.object3D.visible = true;\n },\n\n onControllerDisconnected: function () {\n this.el.object3D.visible = false;\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('gripdown', this.onGripDown);\n el.addEventListener('gripup', this.onGripUp);\n el.addEventListener('trackpaddown', this.onTrackpadDown);\n el.addEventListener('trackpadup', this.onTrackpadUp);\n el.addEventListener('trackpadtouchstart', this.onTrackpadTouchStart);\n el.addEventListener('trackpadtouchend', this.onTrackpadTouchEnd);\n el.addEventListener('triggerdown', this.onTriggerDown);\n el.addEventListener('triggerup', this.onTriggerUp);\n el.addEventListener('triggertouchstart', this.onTriggerTouchStart);\n el.addEventListener('triggertouchend', this.onTriggerTouchEnd);\n el.addEventListener('griptouchstart', this.onGripTouchStart);\n el.addEventListener('griptouchend', this.onGripTouchEnd);\n el.addEventListener('thumbstickdown', this.onThumbstickDown);\n el.addEventListener('thumbstickup', this.onThumbstickUp);\n el.addEventListener('abuttontouchstart', this.onAorXTouchStart);\n el.addEventListener('abuttontouchend', this.onAorXTouchEnd);\n el.addEventListener('bbuttontouchstart', this.onBorYTouchStart);\n el.addEventListener('bbuttontouchend', this.onBorYTouchEnd);\n el.addEventListener('xbuttontouchstart', this.onAorXTouchStart);\n el.addEventListener('xbuttontouchend', this.onAorXTouchEnd);\n el.addEventListener('ybuttontouchstart', this.onBorYTouchStart);\n el.addEventListener('ybuttontouchend', this.onBorYTouchEnd);\n el.addEventListener('surfacetouchstart', this.onSurfaceTouchStart);\n el.addEventListener('surfacetouchend', this.onSurfaceTouchEnd);\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('gripdown', this.onGripDown);\n el.removeEventListener('gripup', this.onGripUp);\n el.removeEventListener('trackpaddown', this.onTrackpadDown);\n el.removeEventListener('trackpadup', this.onTrackpadUp);\n el.removeEventListener('trackpadtouchstart', this.onTrackpadTouchStart);\n el.removeEventListener('trackpadtouchend', this.onTrackpadTouchEnd);\n el.removeEventListener('triggerdown', this.onTriggerDown);\n el.removeEventListener('triggerup', this.onTriggerUp);\n el.removeEventListener('triggertouchstart', this.onTriggerTouchStart);\n el.removeEventListener('triggertouchend', this.onTriggerTouchEnd);\n el.removeEventListener('griptouchstart', this.onGripTouchStart);\n el.removeEventListener('griptouchend', this.onGripTouchEnd);\n el.removeEventListener('thumbstickdown', this.onThumbstickDown);\n el.removeEventListener('thumbstickup', this.onThumbstickUp);\n el.removeEventListener('abuttontouchstart', this.onAorXTouchStart);\n el.removeEventListener('abuttontouchend', this.onAorXTouchEnd);\n el.removeEventListener('bbuttontouchstart', this.onBorYTouchStart);\n el.removeEventListener('bbuttontouchend', this.onBorYTouchEnd);\n el.removeEventListener('xbuttontouchstart', this.onAorXTouchStart);\n el.removeEventListener('xbuttontouchend', this.onAorXTouchEnd);\n el.removeEventListener('ybuttontouchstart', this.onBorYTouchStart);\n el.removeEventListener('ybuttontouchend', this.onBorYTouchEnd);\n el.removeEventListener('surfacetouchstart', this.onSurfaceTouchStart);\n el.removeEventListener('surfacetouchend', this.onSurfaceTouchEnd);\n },\n\n /**\n * Update handler. More like the `init` handler since the only property is the hand, and\n * that won't be changing much.\n */\n update: function (previousHand) {\n var controlConfiguration;\n var el = this.el;\n var hand = this.data.hand;\n var handModelStyle = this.data.handModelStyle;\n var handColor = this.data.color;\n var self = this;\n\n // Get common configuration to abstract different vendor controls.\n controlConfiguration = {\n hand: hand,\n model: false\n };\n\n // Set model.\n if (hand !== previousHand) {\n var handmodelUrl = MODEL_URLS[handModelStyle + hand.charAt(0).toUpperCase() + hand.slice(1)];\n this.loader.load(handmodelUrl, function (gltf) {\n var mesh = gltf.scene.children[0];\n var handModelOrientation = hand === 'left' ? Math.PI / 2 : -Math.PI / 2;\n mesh.mixer = new THREE.AnimationMixer(mesh);\n self.clips = gltf.animations;\n el.setObject3D('mesh', mesh);\n\n var handMaterial = mesh.children[1].material;\n handMaterial.color = new THREE.Color(handColor);\n mesh.position.set(0, 0, 0);\n mesh.rotation.set(0, 0, handModelOrientation);\n el.setAttribute('magicleap-controls', controlConfiguration);\n el.setAttribute('vive-controls', controlConfiguration);\n el.setAttribute('oculus-touch-controls', controlConfiguration);\n el.setAttribute('windows-motion-controls', controlConfiguration);\n });\n }\n },\n\n remove: function () {\n this.el.removeObject3D('mesh');\n },\n\n /**\n * Play model animation, based on which button was pressed and which kind of event.\n *\n * 1. Process buttons.\n * 2. Determine gesture (this.determineGesture()).\n * 3. Animation gesture (this.animationGesture()).\n * 4. Emit gesture events (this.emitGestureEvents()).\n *\n * @param {string} button - Name of the button.\n * @param {string} evt - Type of event for the button (i.e., down/up/touchstart/touchend).\n */\n handleButton: function (button, evt) {\n var lastGesture;\n var isPressed = evt === 'down';\n var isTouched = evt === 'touchstart';\n\n // Update objects.\n if (evt.indexOf('touch') === 0) {\n // Update touch object.\n if (isTouched === this.touchedButtons[button]) { return; }\n this.touchedButtons[button] = isTouched;\n } else {\n // Update button object.\n if (isPressed === this.pressedButtons[button]) { return; }\n this.pressedButtons[button] = isPressed;\n }\n\n // Determine the gesture.\n lastGesture = this.gesture;\n this.gesture = this.determineGesture();\n\n // Same gesture.\n if (this.gesture === lastGesture) { return; }\n // Animate gesture.\n this.animateGesture(this.gesture, lastGesture);\n\n // Emit events.\n this.emitGestureEvents(this.gesture, lastGesture);\n },\n\n /**\n * Determine which pose hand should be in considering active and touched buttons.\n */\n determineGesture: function () {\n var gesture;\n var isGripActive = this.pressedButtons.grip;\n var isSurfaceActive = this.pressedButtons.surface || this.touchedButtons.surface;\n var isTrackpadActive = this.pressedButtons.trackpad || this.touchedButtons.trackpad;\n var isTriggerActive = this.pressedButtons.trigger || this.touchedButtons.trigger;\n var isABXYActive = this.touchedButtons.AorX || this.touchedButtons.BorY;\n var isVive = isViveController(this.el.components['tracked-controls']);\n\n // Works well with Oculus Touch and Windows Motion Controls, but Vive needs tweaks.\n if (isVive) {\n if (isGripActive || isTriggerActive) {\n gesture = ANIMATIONS.fist;\n } else if (isTrackpadActive) {\n gesture = ANIMATIONS.point;\n }\n } else {\n if (isGripActive) {\n if (isSurfaceActive || isABXYActive || isTrackpadActive) {\n gesture = isTriggerActive ? ANIMATIONS.fist : ANIMATIONS.point;\n } else {\n gesture = isTriggerActive ? ANIMATIONS.thumbUp : ANIMATIONS.pointThumb;\n }\n } else if (isTriggerActive) {\n gesture = ANIMATIONS.hold;\n }\n }\n\n return gesture;\n },\n\n /**\n * Play corresponding clip to a gesture\n */\n getClip: function (gesture) {\n var clip;\n var i;\n for (i = 0; i < this.clips.length; i++) {\n clip = this.clips[i];\n if (clip.name !== gesture) { continue; }\n return clip;\n }\n },\n\n /**\n * Play gesture animation.\n *\n * @param {string} gesture - Which pose to animate to. If absent, then animate to open.\n * @param {string} lastGesture - Previous gesture, to reverse back to open if needed.\n */\n animateGesture: function (gesture, lastGesture) {\n if (gesture) {\n this.playAnimation(gesture || ANIMATIONS.open, lastGesture, false);\n return;\n }\n\n // If no gesture, then reverse the current gesture back to open pose.\n this.playAnimation(lastGesture, lastGesture, true);\n },\n\n /**\n * Emit `hand-controls`-specific events.\n */\n emitGestureEvents: function (gesture, lastGesture) {\n var el = this.el;\n var eventName;\n\n if (lastGesture === gesture) { return; }\n\n // Emit event for lastGesture not inactive.\n eventName = getGestureEventName(lastGesture, false);\n if (eventName) { el.emit(eventName); }\n\n // Emit event for current gesture now active.\n eventName = getGestureEventName(gesture, true);\n if (eventName) { el.emit(eventName); }\n },\n\n /**\n * Play hand animation based on button state.\n *\n * @param {string} gesture - Name of the animation as specified by the model.\n * @param {string} lastGesture - Previous pose.\n * @param {boolean} reverse - Whether animation should play in reverse.\n */\n playAnimation: function (gesture, lastGesture, reverse) {\n var clip;\n var fromAction;\n var mesh = this.el.getObject3D('mesh');\n var toAction;\n\n if (!mesh) { return; }\n\n // Stop all current animations.\n mesh.mixer.stopAllAction();\n\n // Grab clip action.\n clip = this.getClip(gesture);\n toAction = mesh.mixer.clipAction(clip);\n toAction.clampWhenFinished = true;\n toAction.loop = THREE.LoopRepeat;\n toAction.repetitions = 0;\n toAction.timeScale = reverse ? -1 : 1;\n toAction.time = reverse ? clip.duration : 0;\n toAction.weight = 1;\n\n // No gesture to gesture or gesture to no gesture.\n if (!lastGesture || gesture === lastGesture) {\n // Stop all current animations.\n mesh.mixer.stopAllAction();\n // Play animation.\n toAction.play();\n return;\n }\n\n // Animate or crossfade from gesture to gesture.\n clip = this.getClip(lastGesture);\n fromAction = mesh.mixer.clipAction(clip);\n fromAction.weight = 0.15;\n fromAction.play();\n toAction.play();\n fromAction.crossFadeTo(toAction, 0.15, true);\n }\n});\n\n/**\n * Suffix gestures based on toggle state (e.g., open/close, up/down, start/end).\n *\n * @param {string} gesture\n * @param {boolean} active\n */\nfunction getGestureEventName (gesture, active) {\n var eventName;\n\n if (!gesture) { return; }\n\n eventName = EVENTS[gesture];\n if (eventName === 'grip') {\n return eventName + (active ? 'close' : 'open');\n }\n if (eventName === 'point') {\n return eventName + (active ? 'up' : 'down');\n }\n if (eventName === 'pointing' || eventName === 'pistol') {\n return eventName + (active ? 'start' : 'end');\n }\n}\n\nfunction isViveController (trackedControls) {\n var controller = trackedControls && trackedControls.controller;\n var isVive = controller && (controller.id && controller.id.indexOf('OpenVR ') === 0 ||\n (controller.profiles &&\n controller.profiles[0] &&\n controller.profiles[0] === 'htc-vive-controller-mv'));\n return isVive;\n}\n\n},{\"../core/component\":131}],83:[function(_dereq_,module,exports){\n/* global THREE, XRRigidTransform */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\n\nvar LEFT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/unity/left.glb';\nvar RIGHT_HAND_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus-hands/unity/right.glb';\n\nvar BONE_PREFIX = {\n left: 'b_l_',\n right: 'b_r_'\n};\n\nvar JOINTS = [\n 'wrist',\n 'thumb-metacarpal',\n 'thumb-phalanx-proximal',\n 'thumb-phalanx-distal',\n 'thumb-tip',\n 'index-finger-metacarpal',\n 'index-finger-phalanx-proximal',\n 'index-finger-phalanx-intermediate',\n 'index-finger-phalanx-distal',\n 'index-finger-tip',\n 'middle-finger-metacarpal',\n 'middle-finger-phalanx-proximal',\n 'middle-finger-phalanx-intermediate',\n 'middle-finger-phalanx-distal',\n 'middle-finger-tip',\n 'ring-finger-metacarpal',\n 'ring-finger-phalanx-proximal',\n 'ring-finger-phalanx-intermediate',\n 'ring-finger-phalanx-distal',\n 'ring-finger-tip',\n 'pinky-finger-metacarpal',\n 'pinky-finger-phalanx-proximal',\n 'pinky-finger-phalanx-intermediate',\n 'pinky-finger-phalanx-distal',\n 'pinky-finger-tip'\n];\n\nvar BONE_MAPPING = {\n 'wrist': 'wrist',\n 'thumb-metacarpal': 'thumb1',\n 'thumb-phalanx-proximal': 'thumb2',\n 'thumb-phalanx-distal': 'thumb3',\n 'thumb-tip': 'thumb_null',\n 'index-finger-phalanx-proximal': 'index1',\n 'index-finger-phalanx-intermediate': 'index2',\n 'index-finger-phalanx-distal': 'index3',\n 'index-finger-tip': 'index_null',\n 'middle-finger-phalanx-proximal': 'middle1',\n 'middle-finger-phalanx-intermediate': 'middle2',\n 'middle-finger-phalanx-distal': 'middle3',\n 'middle-finger-tip': 'middle_null',\n 'ring-finger-phalanx-proximal': 'ring1',\n 'ring-finger-phalanx-intermediate': 'ring2',\n 'ring-finger-phalanx-distal': 'ring3',\n 'ring-finger-tip': 'ring_null',\n 'pinky-finger-metacarpal': 'pinky0',\n 'pinky-finger-phalanx-proximal': 'pinky1',\n 'pinky-finger-phalanx-intermediate': 'pinky2',\n 'pinky-finger-phalanx-distal': 'pinky3',\n 'pinky-finger-tip': 'pinky_null'\n};\n\nvar PINCH_START_DISTANCE = 0.015;\nvar PINCH_END_DISTANCE = 0.03;\nvar PINCH_POSITION_INTERPOLATION = 0.5;\n\n/**\n * Controls for hand tracking\n */\nmodule.exports.Component = registerComponent('hand-tracking-controls', {\n schema: {\n hand: {default: 'right', oneOf: ['left', 'right']},\n modelStyle: {default: 'mesh', oneOf: ['dots', 'mesh']},\n modelColor: {default: 'white'}\n },\n\n bindMethods: function () {\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n },\n\n addEventListeners: function () {\n this.el.addEventListener('model-loaded', this.onModelLoaded);\n for (var i = 0; i < this.jointEls.length; ++i) {\n this.jointEls[i].object3D.visible = true;\n }\n },\n\n removeEventListeners: function () {\n this.el.removeEventListener('model-loaded', this.onModelLoaded);\n for (var i = 0; i < this.jointEls.length; ++i) {\n this.jointEls[i].object3D.visible = false;\n }\n },\n\n init: function () {\n var sceneEl = this.el.sceneEl;\n var webXROptionalAttributes = sceneEl.getAttribute('webxr').optionalFeatures;\n webXROptionalAttributes.push('hand-tracking');\n sceneEl.setAttribute('webxr', {optionalFeatures: webXROptionalAttributes});\n this.onModelLoaded = this.onModelLoaded.bind(this);\n this.jointEls = [];\n this.controllerPresent = false;\n this.isPinched = false;\n this.pinchEventDetail = {position: new THREE.Vector3()};\n this.indexTipPosition = new THREE.Vector3();\n\n this.bindMethods();\n\n this.updateReferenceSpace = this.updateReferenceSpace.bind(this);\n this.el.sceneEl.addEventListener('enter-vr', this.updateReferenceSpace);\n this.el.sceneEl.addEventListener('exit-vr', this.updateReferenceSpace);\n },\n\n updateReferenceSpace: function () {\n var self = this;\n var xrSession = this.el.sceneEl.xrSession;\n this.referenceSpace = undefined;\n if (!xrSession) { return; }\n var referenceSpaceType = self.el.sceneEl.systems.webxr.sessionReferenceSpaceType;\n xrSession.requestReferenceSpace(referenceSpaceType).then(function (referenceSpace) {\n self.referenceSpace = referenceSpace.getOffsetReferenceSpace(new XRRigidTransform({x: 0, y: 1.5, z: 0}));\n }).catch(function (error) {\n self.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(referenceSpaceType, 'tracked-controls-webxr uses reference space ' + referenceSpaceType);\n throw error;\n });\n },\n\n checkIfControllerPresent: function () {\n var data = this.data;\n var hand = data.hand ? data.hand : undefined;\n checkControllerPresentAndSetup(\n this, '',\n {hand: hand, iterateControllerProfiles: true, handTracking: true});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n tick: function () {\n var sceneEl = this.el.sceneEl;\n var controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n var frame = sceneEl.frame;\n var trackedControlsWebXR = this.el.components['tracked-controls-webxr'];\n if (!controller || !frame || !trackedControlsWebXR) { return; }\n if (controller.hand) {\n this.el.object3D.position.set(0, 0, 0);\n this.el.object3D.rotation.set(0, 0, 0);\n if (frame.getJointPose) { this.updateHandModel(); }\n this.detectGesture();\n }\n },\n\n updateHandModel: function () {\n if (this.data.modelStyle === 'dots') {\n this.updateHandDotsModel();\n }\n\n if (this.data.modelStyle === 'mesh') {\n this.updateHandMeshModel();\n }\n },\n\n getBone: function (name) {\n var bones = this.bones;\n for (var i = 0; i < bones.length; i++) {\n if (bones[i].name === name) { return bones[i]; }\n }\n return null;\n },\n\n updateHandMeshModel: function () {\n var frame = this.el.sceneEl.frame;\n var controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n var referenceSpace = this.referenceSpace;\n\n if (!controller || !this.mesh || !referenceSpace) { return; }\n this.mesh.visible = false;\n for (var inputjoint of controller.hand.values()) {\n var bone;\n var jointPose;\n var jointTransform;\n jointPose = frame.getJointPose(inputjoint, referenceSpace);\n if (!BONE_MAPPING[inputjoint.jointName]) { continue; }\n bone = this.getBone(BONE_PREFIX[this.data.hand] + BONE_MAPPING[inputjoint.jointName]);\n if (bone != null && jointPose) {\n jointTransform = jointPose.transform;\n this.mesh.visible = true;\n bone.position.copy(jointTransform.position).multiplyScalar(100);\n bone.quaternion.set(jointTransform.orientation.x, jointTransform.orientation.y, jointTransform.orientation.z, jointTransform.orientation.w);\n }\n }\n },\n\n updateHandDotsModel: function () {\n var frame = this.el.sceneEl.frame;\n var controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n var trackedControlsWebXR = this.el.components['tracked-controls-webxr'];\n var referenceSpace = trackedControlsWebXR.system.referenceSpace;\n var jointEl;\n var object3D;\n var jointPose;\n var i = 0;\n\n for (var inputjoint of controller.hand.values()) {\n jointEl = this.jointEls[i++];\n object3D = jointEl.object3D;\n jointPose = frame.getJointPose(inputjoint, referenceSpace);\n jointEl.object3D.visible = !!jointPose;\n if (!jointPose) { continue; }\n object3D.matrix.elements = jointPose.transform.matrix;\n object3D.matrix.decompose(object3D.position, object3D.rotation, object3D.scale);\n jointEl.setAttribute('scale', {x: jointPose.radius, y: jointPose.radius, z: jointPose.radius});\n }\n },\n\n detectGesture: function () {\n this.detectPinch();\n },\n\n detectPinch: (function () {\n var thumbTipPosition = new THREE.Vector3();\n return function () {\n var frame = this.el.sceneEl.frame;\n var indexTipPosition = this.indexTipPosition;\n var controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n var trackedControlsWebXR = this.el.components['tracked-controls-webxr'];\n var referenceSpace = this.referenceSpace || trackedControlsWebXR.system.referenceSpace;\n var indexTip = controller.hand.get('index-finger-tip');\n var thumbTip = controller.hand.get('thumb-tip');\n if (!indexTip ||\n !thumbTip) { return; }\n var indexTipPose = frame.getJointPose(indexTip, referenceSpace);\n var thumbTipPose = frame.getJointPose(thumbTip, referenceSpace);\n\n if (!indexTipPose || !thumbTipPose) { return; }\n\n thumbTipPosition.copy(thumbTipPose.transform.position);\n indexTipPosition.copy(indexTipPose.transform.position);\n\n var distance = indexTipPosition.distanceTo(thumbTipPosition);\n\n if (distance < PINCH_START_DISTANCE && this.isPinched === false) {\n this.isPinched = true;\n this.pinchEventDetail.position.copy(indexTipPosition).lerp(thumbTipPosition, PINCH_POSITION_INTERPOLATION);\n this.pinchEventDetail.position.y += 1.5;\n this.el.emit('pinchstarted', this.pinchEventDetail);\n }\n\n if (distance > PINCH_END_DISTANCE && this.isPinched === true) {\n this.isPinched = false;\n this.pinchEventDetail.position.copy(indexTipPosition).lerp(thumbTipPosition, PINCH_POSITION_INTERPOLATION);\n this.pinchEventDetail.position.y += 1.5;\n this.el.emit('pinchended', this.pinchEventDetail);\n }\n\n if (this.isPinched) {\n this.pinchEventDetail.position.copy(indexTipPosition).lerp(thumbTipPosition, PINCH_POSITION_INTERPOLATION);\n this.pinchEventDetail.position.y += 1.5;\n this.el.emit('pinchmoved', this.pinchEventDetail);\n }\n\n indexTipPosition.y += 1.5;\n };\n })(),\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n hand: data.hand,\n iterateControllerProfiles: true,\n handTrackingEnabled: true\n });\n this.initDefaultModel();\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n var controller;\n this.checkIfControllerPresent();\n controller = this.el.components['tracked-controls'] && this.el.components['tracked-controls'].controller;\n if (!this.el.getObject3D('mesh')) { return; }\n if (!controller || !controller.hand || !controller.hand[0]) {\n this.el.getObject3D('mesh').visible = false;\n }\n },\n\n initDefaultModel: function () {\n if (this.el.getObject3D('mesh')) { return; }\n if (this.data.modelStyle === 'dots') {\n this.initDotsModel();\n }\n\n if (this.data.modelStyle === 'mesh') {\n this.initMeshHandModel();\n }\n },\n\n initDotsModel: function () {\n // Add models just once.\n if (this.jointEls.length !== 0) { return; }\n for (var i = 0; i < JOINTS.length; ++i) {\n var jointEl = this.jointEl = document.createElement('a-entity');\n jointEl.setAttribute('geometry', {\n primitive: 'sphere',\n radius: 1.0\n });\n jointEl.setAttribute('material', {color: this.data.modelColor});\n jointEl.object3D.visible = false;\n this.el.appendChild(jointEl);\n this.jointEls.push(jointEl);\n }\n },\n\n initMeshHandModel: function () {\n var modelURL = this.data.hand === 'left' ? LEFT_HAND_MODEL_URL : RIGHT_HAND_MODEL_URL;\n this.el.setAttribute('gltf-model', modelURL);\n },\n\n onModelLoaded: function () {\n var mesh = this.mesh = this.el.getObject3D('mesh').children[0];\n var skinnedMesh = this.skinnedMesh = mesh.children[24];\n if (!this.skinnedMesh) { return; }\n this.bones = skinnedMesh.skeleton.bones;\n this.el.removeObject3D('mesh');\n mesh.position.set(0, 1.5, 0);\n mesh.rotation.set(0, 0, 0);\n skinnedMesh.frustumCulled = false;\n skinnedMesh.material = new THREE.MeshStandardMaterial({skinning: true, color: this.data.modelColor});\n this.el.setObject3D('mesh', mesh);\n }\n});\n\n\n},{\"../core/component\":131,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],84:[function(_dereq_,module,exports){\n_dereq_('./animation');\n_dereq_('./camera');\n_dereq_('./cursor');\n_dereq_('./daydream-controls');\n_dereq_('./gearvr-controls');\n_dereq_('./geometry');\n_dereq_('./generic-tracked-controller-controls');\n_dereq_('./gltf-model');\n_dereq_('./hand-tracking-controls');\n_dereq_('./hand-controls');\n_dereq_('./layer');\n_dereq_('./laser-controls');\n_dereq_('./light');\n_dereq_('./line');\n_dereq_('./link');\n_dereq_('./look-controls');\n_dereq_('./magicleap-controls');\n_dereq_('./material');\n_dereq_('./obj-model');\n_dereq_('./oculus-go-controls');\n_dereq_('./oculus-touch-controls');\n_dereq_('./position');\n_dereq_('./raycaster');\n_dereq_('./rotation');\n_dereq_('./scale');\n_dereq_('./shadow');\n_dereq_('./sound');\n_dereq_('./text');\n_dereq_('./tracked-controls');\n_dereq_('./tracked-controls-webvr');\n_dereq_('./tracked-controls-webxr');\n_dereq_('./visible');\n_dereq_('./valve-index-controls');\n_dereq_('./vive-controls');\n_dereq_('./vive-focus-controls');\n_dereq_('./wasd-controls');\n_dereq_('./windows-motion-controls');\n\n_dereq_('./scene/background');\n_dereq_('./scene/debug');\n_dereq_('./scene/device-orientation-permission-ui');\n_dereq_('./scene/embedded');\n_dereq_('./scene/inspector');\n_dereq_('./scene/fog');\n_dereq_('./scene/keyboard-shortcuts');\n_dereq_('./scene/pool');\n_dereq_('./scene/screenshot');\n_dereq_('./scene/stats');\n_dereq_('./scene/vr-mode-ui');\n\n},{\"./animation\":74,\"./camera\":75,\"./cursor\":76,\"./daydream-controls\":77,\"./gearvr-controls\":78,\"./generic-tracked-controller-controls\":79,\"./geometry\":80,\"./gltf-model\":81,\"./hand-controls\":82,\"./hand-tracking-controls\":83,\"./laser-controls\":85,\"./layer\":86,\"./light\":87,\"./line\":88,\"./link\":89,\"./look-controls\":90,\"./magicleap-controls\":91,\"./material\":92,\"./obj-model\":93,\"./oculus-go-controls\":94,\"./oculus-touch-controls\":95,\"./position\":96,\"./raycaster\":97,\"./rotation\":98,\"./scale\":99,\"./scene/background\":100,\"./scene/debug\":101,\"./scene/device-orientation-permission-ui\":102,\"./scene/embedded\":103,\"./scene/fog\":104,\"./scene/inspector\":105,\"./scene/keyboard-shortcuts\":106,\"./scene/pool\":107,\"./scene/screenshot\":108,\"./scene/stats\":109,\"./scene/vr-mode-ui\":110,\"./shadow\":111,\"./sound\":112,\"./text\":113,\"./tracked-controls\":116,\"./tracked-controls-webvr\":114,\"./tracked-controls-webxr\":115,\"./valve-index-controls\":117,\"./visible\":118,\"./vive-controls\":119,\"./vive-focus-controls\":120,\"./wasd-controls\":121,\"./windows-motion-controls\":122}],85:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar utils = _dereq_('../utils/');\n\nregisterComponent('laser-controls', {\n schema: {\n hand: {default: 'right'},\n model: {default: true},\n defaultModelColor: {type: 'color', default: 'grey'}\n },\n\n init: function () {\n var config = this.config;\n var data = this.data;\n var el = this.el;\n var self = this;\n var controlsConfiguration = {hand: data.hand, model: data.model};\n\n // Set all controller models.\n el.setAttribute('daydream-controls', controlsConfiguration);\n el.setAttribute('gearvr-controls', controlsConfiguration);\n el.setAttribute('magicleap-controls', controlsConfiguration);\n el.setAttribute('oculus-go-controls', controlsConfiguration);\n el.setAttribute('oculus-touch-controls', controlsConfiguration);\n el.setAttribute('valve-index-controls', controlsConfiguration);\n el.setAttribute('vive-controls', controlsConfiguration);\n el.setAttribute('vive-focus-controls', controlsConfiguration);\n el.setAttribute('windows-motion-controls', controlsConfiguration);\n el.setAttribute('generic-tracked-controller-controls', controlsConfiguration);\n\n // Wait for controller to connect, or have a valid pointing pose, before creating ray\n el.addEventListener('controllerconnected', createRay);\n el.addEventListener('controllerdisconnected', hideRay);\n el.addEventListener('controllermodelready', function (evt) {\n createRay(evt);\n self.modelReady = true;\n });\n\n function createRay (evt) {\n var controllerConfig = config[evt.detail.name];\n\n if (!controllerConfig) { return; }\n\n // Show the line unless a particular config opts to hide it, until a controllermodelready\n // event comes through.\n var raycasterConfig = utils.extend({\n showLine: true\n }, controllerConfig.raycaster || {});\n\n // The controllermodelready event contains a rayOrigin that takes into account\n // offsets specific to the loaded model.\n if (evt.detail.rayOrigin) {\n raycasterConfig.origin = evt.detail.rayOrigin.origin;\n raycasterConfig.direction = evt.detail.rayOrigin.direction;\n raycasterConfig.showLine = true;\n }\n\n // Only apply a default raycaster if it does not yet exist. This prevents it overwriting\n // config applied from a controllermodelready event.\n if (evt.detail.rayOrigin || !self.modelReady) {\n el.setAttribute('raycaster', raycasterConfig);\n } else {\n el.setAttribute('raycaster', 'showLine', true);\n }\n\n el.setAttribute('cursor', utils.extend({\n fuse: false\n }, controllerConfig.cursor));\n }\n\n function hideRay () {\n el.setAttribute('raycaster', 'showLine', false);\n }\n },\n\n config: {\n 'daydream-controls': {\n cursor: {downEvents: ['trackpaddown', 'triggerdown'], upEvents: ['trackpadup', 'triggerup']}\n },\n\n 'gearvr-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']},\n raycaster: {origin: {x: 0, y: 0.0010, z: 0}}\n },\n\n 'generic-tracked-controller-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']}\n },\n\n 'magicleap-controls': {\n cursor: {downEvents: ['trackpaddown', 'triggerdown'], upEvents: ['trackpadup', 'triggerup']}\n },\n\n 'oculus-go-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']},\n raycaster: {origin: {x: 0, y: 0.0005, z: 0}}\n },\n\n 'oculus-touch-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']},\n raycaster: {origin: {x: 0, y: 0, z: 0}}\n },\n\n 'valve-index-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']}\n },\n\n 'vive-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']}\n },\n\n 'vive-focus-controls': {\n cursor: {downEvents: ['trackpaddown', 'triggerdown'], upEvents: ['trackpadup', 'triggerup']}\n },\n\n 'windows-motion-controls': {\n cursor: {downEvents: ['triggerdown'], upEvents: ['triggerup']},\n raycaster: {showLine: false}\n }\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205}],86:[function(_dereq_,module,exports){\n/* global THREE, XRRigidTransform, XRWebGLBinding */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar utils = _dereq_('../utils/');\nvar warn = utils.debug('components:layer:warn');\n\nmodule.exports.Component = registerComponent('layer', {\n schema: {\n type: {default: 'quad', oneOf: ['quad', 'monocubemap', 'stereocubemap']},\n src: {type: 'map'},\n rotateCubemap: {default: false},\n width: {default: 0},\n height: {default: 0}\n },\n\n init: function () {\n var gl = this.el.sceneEl.renderer.getContext();\n\n this.quaternion = new THREE.Quaternion();\n this.position = new THREE.Vector3();\n\n this.bindMethods();\n this.needsRedraw = false;\n this.frameBuffer = gl.createFramebuffer();\n var requiredFeatures = this.el.sceneEl.getAttribute('webxr').requiredFeatures;\n requiredFeatures.push('layers');\n this.el.sceneEl.getAttribute('webxr', 'requiredFeatures', requiredFeatures);\n this.el.sceneEl.addEventListener('enter-vr', this.onEnterVR);\n this.el.sceneEl.addEventListener('exit-vr', this.onExitVR);\n },\n\n bindMethods: function () {\n this.onRequestedReferenceSpace = this.onRequestedReferenceSpace.bind(this);\n this.onEnterVR = this.onEnterVR.bind(this);\n this.onExitVR = this.onExitVR.bind(this);\n },\n\n update: function (oldData) {\n if (this.data.src !== oldData.src) { this.updateSrc(); }\n },\n\n updateSrc: function () {\n var type = this.data.type;\n this.texture = undefined;\n if (type === 'quad') {\n this.loadQuadImage();\n return;\n }\n\n if (type === 'monocubemap' || type === 'stereocubemap') {\n this.loadCubeMapImages();\n return;\n }\n },\n\n loadCubeMapImages: function () {\n var type = this.data.type;\n var glayer;\n var xrGLFactory = this.xrGLFactory;\n var frame = this.el.sceneEl.frame;\n var src = this.data.src;\n\n this.visibilityChanged = false;\n if (!this.layer) { return; }\n if (!src.complete) {\n this.pendingCubeMapUpdate = true;\n } else {\n this.pendingCubeMapUpdate = false;\n }\n\n if (!this.loadingScreen) {\n this.loadingScreen = true;\n } else {\n this.loadingScreen = false;\n }\n\n if (type === 'monocubemap') {\n glayer = xrGLFactory.getSubImage(this.layer, frame);\n this.loadCubeMapImage(glayer.colorTexture, src, 0);\n } else {\n glayer = xrGLFactory.getSubImage(this.layer, frame, 'left');\n this.loadCubeMapImage(glayer.colorTexture, src, 0);\n glayer = xrGLFactory.getSubImage(this.layer, frame, 'right');\n this.loadCubeMapImage(glayer.colorTexture, src, 6);\n }\n },\n\n loadQuadImage: function () {\n var src = this.data.src;\n var self = this;\n this.el.sceneEl.systems.material.loadTexture(src, {src: src}, function textureLoaded (texture) {\n self.el.sceneEl.renderer.initTexture(texture);\n self.texture = texture;\n if (src.tagName === 'VIDEO') { setTimeout(function () { self.textureIsVideo = true; }, 1000); }\n if (self.layer) {\n self.layer.height = self.data.height / 2 || self.texture.image.height / 1000;\n self.layer.width = self.data.width / 2 || self.texture.image.width / 1000;\n self.needsRedraw = true;\n }\n self.updateQuadPanel();\n });\n },\n\n preGenerateCubeMapTextures: function (src, callback) {\n if (this.data.type === 'monocubemap') {\n this.generateCubeMapTextures(src, 0, callback);\n } else {\n this.generateCubeMapTextures(src, 0, callback);\n this.generateCubeMapTextures(src, 6, callback);\n }\n },\n\n generateCubeMapTextures: function (src, faceOffset, callback) {\n var data = this.data;\n var cubeFaceSize = this.cubeFaceSize;\n var textureSourceCubeFaceSize = Math.min(src.width, src.height);\n var cubefaceTextures = [];\n var imgTmp0;\n var imgTmp2;\n\n for (var i = 0; i < 6; i++) {\n var tempCanvas = document.createElement('CANVAS');\n tempCanvas.width = tempCanvas.height = cubeFaceSize;\n var tempCanvasContext = tempCanvas.getContext('2d');\n\n if (data.rotateCubemap) {\n if (i === 2 || i === 3) {\n tempCanvasContext.save();\n tempCanvasContext.translate(cubeFaceSize, cubeFaceSize);\n tempCanvasContext.rotate(Math.PI);\n }\n }\n\n // Note that this call to drawImage will not only copy the bytes to the\n // canvas but also could resized the image if our cube face size is\n // smaller than the source image due to GL max texture size.\n tempCanvasContext.drawImage(\n src,\n (i + faceOffset) * textureSourceCubeFaceSize, // top left x coord in source\n 0, // top left y coord in source\n textureSourceCubeFaceSize, // x pixel count from source\n textureSourceCubeFaceSize, // y pixel count from source\n 0, // dest x offset in the canvas\n 0, // dest y offset in the canvas\n cubeFaceSize, // x pixel count in dest\n cubeFaceSize // y pixel count in dest\n );\n\n tempCanvasContext.restore();\n\n if (callback) { callback(); }\n cubefaceTextures.push(tempCanvas);\n }\n\n if (data.rotateCubemap) {\n imgTmp0 = cubefaceTextures[0];\n imgTmp2 = cubefaceTextures[1];\n\n cubefaceTextures[0] = imgTmp2;\n cubefaceTextures[1] = imgTmp0;\n\n imgTmp0 = cubefaceTextures[4];\n imgTmp2 = cubefaceTextures[5];\n\n cubefaceTextures[4] = imgTmp2;\n cubefaceTextures[5] = imgTmp0;\n }\n\n if (callback) { callback(); }\n return cubefaceTextures;\n },\n\n loadCubeMapImage: function (layerColorTexture, src, faceOffset) {\n var gl = this.el.sceneEl.renderer.getContext();\n var cubefaceTextures;\n\n // dont flip the pixels as we load them into the texture buffer.\n // TEXTURE_CUBE_MAP expects the Y to be flipped for the faces and it already\n // is flipped in our texture image.\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, layerColorTexture);\n\n if (!src.complete || this.loadingScreen) {\n cubefaceTextures = this.loadingScreenImages;\n } else {\n cubefaceTextures = this.generateCubeMapTextures(src, faceOffset);\n }\n\n var errorCode = 0;\n cubefaceTextures.forEach(function (canvas, i) {\n gl.texSubImage2D(\n gl.TEXTURE_CUBE_MAP_POSITIVE_X + i,\n 0,\n 0, 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n canvas\n );\n errorCode = gl.getError();\n });\n\n if (errorCode !== 0) {\n console.log('renderingError, WebGL Error Code: ' + errorCode);\n }\n gl.bindTexture(gl.TEXTURE_CUBE_MAP, null);\n },\n\n tick: function () {\n if (!this.el.sceneEl.xrSession) { return; }\n if (!this.layer && this.el.sceneEl.is('vr-mode')) { this.initLayer(); }\n this.updateTransform();\n if (this.data.src.complete && (this.pendingCubeMapUpdate || this.loadingScreen || this.visibilityChanged)) { this.loadCubeMapImages(); }\n if (!this.needsRedraw && !this.layer.needsRedraw && !this.textureIsVideo) { return; }\n if (this.data.type === 'quad') { this.draw(); }\n this.needsRedraw = false;\n },\n\n initLayer: function () {\n var self = this;\n var type = this.data.type;\n\n this.el.sceneEl.xrSession.onvisibilitychange = function (evt) {\n self.visibilityChanged = evt.session.visibilityState !== 'hidden';\n };\n\n if (type === 'quad') {\n this.initQuadLayer();\n return;\n }\n\n if (type === 'monocubemap' || type === 'stereocubemap') {\n this.initCubeMapLayer();\n return;\n }\n },\n\n initQuadLayer: function () {\n var sceneEl = this.el.sceneEl;\n var gl = sceneEl.renderer.getContext();\n var xrGLFactory = this.xrGLFactory = new XRWebGLBinding(sceneEl.xrSession, gl);\n if (!this.texture) { return; }\n this.layer = xrGLFactory.createQuadLayer({\n space: this.referenceSpace,\n viewPixelHeight: 2048,\n viewPixelWidth: 2048,\n height: this.data.height / 2 || this.texture.image.height / 1000,\n width: this.data.width / 2 || this.texture.image.width / 1000\n });\n sceneEl.renderer.xr.addLayer(this.layer);\n },\n\n initCubeMapLayer: function () {\n var src = this.data.src;\n var sceneEl = this.el.sceneEl;\n var gl = sceneEl.renderer.getContext();\n var glSizeLimit = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);\n var cubeFaceSize = this.cubeFaceSize = Math.min(glSizeLimit, Math.min(src.width, src.height));\n var xrGLFactory = this.xrGLFactory = new XRWebGLBinding(sceneEl.xrSession, gl);\n this.layer = xrGLFactory.createCubeLayer({\n space: this.referenceSpace,\n viewPixelWidth: cubeFaceSize,\n viewPixelHeight: cubeFaceSize,\n layout: this.data.type === 'monocubemap' ? 'mono' : 'stereo',\n isStatic: false\n });\n\n this.initLoadingScreenImages();\n this.loadCubeMapImages();\n sceneEl.renderer.xr.addLayer(this.layer);\n },\n\n initLoadingScreenImages: function () {\n var cubeFaceSize = this.cubeFaceSize;\n var loadingScreenImages = this.loadingScreenImages = [];\n for (var i = 0; i < 6; i++) {\n var tempCanvas = document.createElement('CANVAS');\n tempCanvas.width = tempCanvas.height = cubeFaceSize;\n var tempCanvasContext = tempCanvas.getContext('2d');\n tempCanvas.width = tempCanvas.height = cubeFaceSize;\n tempCanvasContext.fillStyle = 'black';\n tempCanvasContext.fillRect(0, 0, cubeFaceSize, cubeFaceSize);\n if (i !== 2 && i !== 3) {\n tempCanvasContext.translate(cubeFaceSize, 0);\n tempCanvasContext.scale(-1, 1);\n tempCanvasContext.fillStyle = 'white';\n tempCanvasContext.font = '30px Arial';\n tempCanvasContext.fillText('Loading', cubeFaceSize / 2, cubeFaceSize / 2);\n }\n loadingScreenImages.push(tempCanvas);\n }\n },\n\n destroyLayer: function () {\n if (!this.layer) { return; }\n this.el.sceneEl.renderer.xr.removeLayer(this.layer);\n this.layer.destroy();\n this.layer = undefined;\n },\n\n toggleCompositorLayer: function () {\n this.enableCompositorLayer(!this.layerEnabled);\n },\n\n enableCompositorLayer: function (enable) {\n this.layerEnabled = enable;\n this.quadPanelEl.object3D.visible = !this.layerEnabled;\n },\n\n updateQuadPanel: function () {\n var quadPanelEl = this.quadPanelEl;\n if (!this.quadPanelEl) {\n quadPanelEl = this.quadPanelEl = document.createElement('a-entity');\n this.el.appendChild(quadPanelEl);\n }\n\n quadPanelEl.setAttribute('material', {\n shader: 'flat',\n src: this.data.src,\n transparent: true\n });\n\n quadPanelEl.setAttribute('geometry', {\n primitive: 'plane',\n height: this.data.height || this.texture.image.height / 1000,\n width: this.data.width || this.texture.image.height / 1000\n });\n },\n\n draw: function () {\n var sceneEl = this.el.sceneEl;\n var gl = this.el.sceneEl.renderer.getContext();\n var glayer = this.xrGLFactory.getSubImage(this.layer, sceneEl.frame);\n var texture = sceneEl.renderer.properties.get(this.texture).__webglTexture;\n var previousFrameBuffer = gl.getParameter(gl.FRAMEBUFFER_BINDING);\n\n gl.viewport(glayer.viewport.x, glayer.viewport.y, glayer.viewport.width, glayer.viewport.height);\n gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, glayer.colorTexture, 0);\n\n blitTexture(gl, texture, glayer, this.data.src);\n\n gl.bindFramebuffer(gl.FRAMEBUFFER, previousFrameBuffer);\n },\n\n updateTransform: function () {\n var el = this.el;\n var position = this.position;\n var quaternion = this.quaternion;\n el.object3D.updateMatrixWorld();\n position.setFromMatrixPosition(el.object3D.matrixWorld);\n quaternion.setFromRotationMatrix(el.object3D.matrixWorld);\n if (!this.layerEnabled) { position.set(0, 0, 100000000); }\n this.layer.transform = new XRRigidTransform(position, quaternion);\n },\n\n onEnterVR: function () {\n var sceneEl = this.el.sceneEl;\n var xrSession = sceneEl.xrSession;\n if (!sceneEl.hasWebXR || !XRWebGLBinding || !xrSession) {\n warn('The layer component requires WebXR and the layers API enabled');\n return;\n }\n xrSession.requestReferenceSpace('local').then(this.onRequestedReferenceSpace);\n this.needsRedraw = true;\n this.layerEnabled = true;\n if (this.quadPanelEl) {\n this.quadPanelEl.object3D.visible = false;\n }\n if (this.data.src.play) { this.data.src.play(); }\n },\n\n onExitVR: function () {\n if (this.quadPanelEl) {\n this.quadPanelEl.object3D.visible = true;\n }\n this.destroyLayer();\n },\n\n onRequestedReferenceSpace: function (referenceSpace) {\n this.referenceSpace = referenceSpace;\n }\n});\n\nfunction blitTexture (gl, texture, subImage, textureEl) {\n var xrReadFramebuffer = gl.createFramebuffer();\n let x1offset = subImage.viewport.x;\n let y1offset = subImage.viewport.y;\n let x2offset = subImage.viewport.x + subImage.viewport.width;\n let y2offset = subImage.viewport.y + subImage.viewport.height;\n\n // Update video texture.\n if (textureEl.tagName === 'VIDEO') {\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, textureEl.width, textureEl.height, gl.RGB, gl.UNSIGNED_BYTE, textureEl);\n }\n\n // Bind texture to read framebuffer.\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, xrReadFramebuffer);\n gl.framebufferTexture2D(gl.READ_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n\n // Blit into layer buffer.\n gl.readBuffer(gl.COLOR_ATTACHMENT0);\n gl.blitFramebuffer(0, 0, textureEl.width, textureEl.height, x1offset, y1offset, x2offset, y2offset, gl.COLOR_BUFFER_BIT, gl.NEAREST);\n\n gl.bindFramebuffer(gl.READ_FRAMEBUFFER, null);\n gl.deleteFramebuffer(xrReadFramebuffer);\n}\n\n},{\"../core/component\":131,\"../utils/\":205}],87:[function(_dereq_,module,exports){\nvar bind = _dereq_('../utils/bind');\nvar diff = _dereq_('../utils').diff;\nvar debug = _dereq_('../utils/debug');\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\nvar warn = debug('components:light:warn');\n\n/**\n * Light component.\n */\nmodule.exports.Component = registerComponent('light', {\n schema: {\n angle: {default: 60, if: {type: ['spot']}},\n color: {type: 'color'},\n groundColor: {type: 'color', if: {type: ['hemisphere']}},\n decay: {default: 1, if: {type: ['point', 'spot']}},\n distance: {default: 0.0, min: 0, if: {type: ['point', 'spot']}},\n intensity: {default: 1.0, min: 0, if: {type: ['ambient', 'directional', 'hemisphere', 'point', 'spot']}},\n penumbra: {default: 0, min: 0, max: 1, if: {type: ['spot']}},\n type: {\n default: 'directional',\n oneOf: ['ambient', 'directional', 'hemisphere', 'point', 'spot'],\n schemaChange: true\n },\n target: {type: 'selector', if: {type: ['spot', 'directional']}},\n\n // Shadows.\n castShadow: {default: false, if: {type: ['point', 'spot', 'directional']}},\n shadowBias: {default: 0, if: {castShadow: true}},\n shadowCameraFar: {default: 500, if: {castShadow: true}},\n shadowCameraFov: {default: 90, if: {castShadow: true}},\n shadowCameraNear: {default: 0.5, if: {castShadow: true}},\n shadowCameraTop: {default: 5, if: {castShadow: true}},\n shadowCameraRight: {default: 5, if: {castShadow: true}},\n shadowCameraBottom: {default: -5, if: {castShadow: true}},\n shadowCameraLeft: {default: -5, if: {castShadow: true}},\n shadowCameraVisible: {default: false, if: {castShadow: true}},\n shadowMapHeight: {default: 512, if: {castShadow: true}},\n shadowMapWidth: {default: 512, if: {castShadow: true}},\n shadowRadius: {default: 1, if: {castShadow: true}}\n },\n\n /**\n * Notifies scene a light has been added to remove default lighting.\n */\n init: function () {\n var el = this.el;\n this.light = null;\n this.defaultTarget = null;\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.system.registerLight(el);\n },\n\n /**\n * (Re)create or update light.\n */\n update: function (oldData) {\n var data = this.data;\n var diffData = diff(data, oldData);\n var light = this.light;\n var rendererSystem = this.rendererSystem;\n var self = this;\n\n // Existing light.\n if (light && !('type' in diffData)) {\n var shadowsLoaded = false;\n // Light type has not changed. Update light.\n Object.keys(diffData).forEach(function (key) {\n var value = data[key];\n\n switch (key) {\n case 'color': {\n light.color.set(value);\n rendererSystem.applyColorCorrection(light.color);\n break;\n }\n\n case 'groundColor': {\n light.groundColor.set(value);\n rendererSystem.applyColorCorrection(light.groundColor);\n break;\n }\n\n case 'angle': {\n light.angle = degToRad(value);\n break;\n }\n\n case 'target': {\n // Reset target if selector is null.\n if (value === null) {\n if (data.type === 'spot' || data.type === 'directional') {\n light.target = self.defaultTarget;\n }\n } else {\n // Target specified, set target to entity's `object3D` when it is loaded.\n if (value.hasLoaded) {\n self.onSetTarget(value, light);\n } else {\n value.addEventListener('loaded', bind(self.onSetTarget, self, value, light));\n }\n }\n break;\n }\n\n case 'castShadow':\n case 'shadowBias':\n case 'shadowCameraFar':\n case 'shadowCameraFov':\n case 'shadowCameraNear':\n case 'shadowCameraTop':\n case 'shadowCameraRight':\n case 'shadowCameraBottom':\n case 'shadowCameraLeft':\n case 'shadowCameraVisible':\n case 'shadowMapHeight':\n case 'shadowMapWidth':\n case 'shadowRadius':\n if (!shadowsLoaded) {\n self.updateShadow();\n shadowsLoaded = true;\n }\n break;\n\n default: {\n light[key] = value;\n }\n }\n });\n return;\n }\n\n // No light yet or light type has changed. Create and add light.\n this.setLight(this.data);\n this.updateShadow();\n },\n\n setLight: function (data) {\n var el = this.el;\n var newLight = this.getLight(data);\n if (newLight) {\n if (this.light) {\n el.removeObject3D('light');\n }\n\n this.light = newLight;\n this.light.el = el;\n el.setObject3D('light', this.light);\n\n // HACK solution for issue #1624\n if (data.type === 'spot' || data.type === 'directional' || data.type === 'hemisphere') {\n el.getObject3D('light').translateY(-1);\n }\n\n // set and position default lighttarget as a child to enable spotlight orientation\n if (data.type === 'spot') {\n el.setObject3D('light-target', this.defaultTarget);\n el.getObject3D('light-target').position.set(0, 0, -1);\n }\n }\n },\n\n /**\n * Updates shadow-related properties on the current light.\n */\n updateShadow: function () {\n var el = this.el;\n var data = this.data;\n var light = this.light;\n\n light.castShadow = data.castShadow;\n\n // Shadow camera helper.\n var cameraHelper = el.getObject3D('cameraHelper');\n if (data.shadowCameraVisible && !cameraHelper) {\n el.setObject3D('cameraHelper', new THREE.CameraHelper(light.shadow.camera));\n } else if (!data.shadowCameraVisible && cameraHelper) {\n el.removeObject3D('cameraHelper');\n }\n\n if (!data.castShadow) { return light; }\n\n // Shadow appearance.\n light.shadow.bias = data.shadowBias;\n light.shadow.radius = data.shadowRadius;\n light.shadow.mapSize.height = data.shadowMapHeight;\n light.shadow.mapSize.width = data.shadowMapWidth;\n\n // Shadow camera.\n light.shadow.camera.near = data.shadowCameraNear;\n light.shadow.camera.far = data.shadowCameraFar;\n if (light.shadow.camera instanceof THREE.OrthographicCamera) {\n light.shadow.camera.top = data.shadowCameraTop;\n light.shadow.camera.right = data.shadowCameraRight;\n light.shadow.camera.bottom = data.shadowCameraBottom;\n light.shadow.camera.left = data.shadowCameraLeft;\n } else {\n light.shadow.camera.fov = data.shadowCameraFov;\n }\n light.shadow.camera.updateProjectionMatrix();\n\n if (cameraHelper) { cameraHelper.update(); }\n },\n\n /**\n * Creates a new three.js light object given data object defining the light.\n *\n * @param {object} data\n */\n getLight: function (data) {\n var angle = data.angle;\n var color = new THREE.Color(data.color);\n this.rendererSystem.applyColorCorrection(color);\n color = color.getHex();\n var decay = data.decay;\n var distance = data.distance;\n var groundColor = new THREE.Color(data.groundColor);\n this.rendererSystem.applyColorCorrection(groundColor);\n groundColor = groundColor.getHex();\n var intensity = data.intensity;\n var type = data.type;\n var target = data.target;\n var light = null;\n\n switch (type.toLowerCase()) {\n case 'ambient': {\n return new THREE.AmbientLight(color, intensity);\n }\n\n case 'directional': {\n light = new THREE.DirectionalLight(color, intensity);\n this.defaultTarget = light.target;\n if (target) {\n if (target.hasLoaded) {\n this.onSetTarget(target, light);\n } else {\n target.addEventListener('loaded', bind(this.onSetTarget, this, target, light));\n }\n }\n return light;\n }\n\n case 'hemisphere': {\n return new THREE.HemisphereLight(color, groundColor, intensity);\n }\n\n case 'point': {\n return new THREE.PointLight(color, intensity, distance, decay);\n }\n\n case 'spot': {\n light = new THREE.SpotLight(color, intensity, distance, degToRad(angle), data.penumbra, decay);\n this.defaultTarget = light.target;\n if (target) {\n if (target.hasLoaded) {\n this.onSetTarget(target, light);\n } else {\n target.addEventListener('loaded', bind(this.onSetTarget, this, target, light));\n }\n }\n return light;\n }\n\n default: {\n warn('%s is not a valid light type. ' +\n 'Choose from ambient, directional, hemisphere, point, spot.', type);\n }\n }\n },\n\n onSetTarget: function (targetEl, light) {\n light.target = targetEl.object3D;\n },\n\n /**\n * Remove light on remove (callback).\n */\n remove: function () {\n var el = this.el;\n el.removeObject3D('light');\n if (el.getObject3D('cameraHelper')) {\n el.removeObject3D('cameraHelper');\n }\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils\":205,\"../utils/bind\":199,\"../utils/debug\":201}],88:[function(_dereq_,module,exports){\n/* global THREE */\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nmodule.exports.Component = registerComponent('line', {\n schema: {\n start: {type: 'vec3', default: {x: 0, y: 0, z: 0}},\n end: {type: 'vec3', default: {x: 0, y: 0, z: 0}},\n color: {type: 'color', default: '#74BEC1'},\n opacity: {type: 'number', default: 1},\n visible: {default: true}\n },\n\n multiple: true,\n\n init: function () {\n var data = this.data;\n var geometry;\n var material;\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n material = this.material = new THREE.LineBasicMaterial({\n color: data.color,\n opacity: data.opacity,\n transparent: data.opacity < 1,\n visible: data.visible\n });\n geometry = this.geometry = new THREE.BufferGeometry();\n geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(2 * 3), 3));\n\n this.rendererSystem.applyColorCorrection(material.color);\n this.line = new THREE.Line(geometry, material);\n this.el.setObject3D(this.attrName, this.line);\n },\n\n update: function (oldData) {\n var data = this.data;\n var geometry = this.geometry;\n var geoNeedsUpdate = false;\n var material = this.material;\n var positionArray = geometry.attributes.position.array;\n\n // Update geometry.\n if (!isEqualVec3(data.start, oldData.start)) {\n positionArray[0] = data.start.x;\n positionArray[1] = data.start.y;\n positionArray[2] = data.start.z;\n geoNeedsUpdate = true;\n }\n\n if (!isEqualVec3(data.end, oldData.end)) {\n positionArray[3] = data.end.x;\n positionArray[4] = data.end.y;\n positionArray[5] = data.end.z;\n geoNeedsUpdate = true;\n }\n\n if (geoNeedsUpdate) {\n geometry.attributes.position.needsUpdate = true;\n geometry.computeBoundingSphere();\n }\n\n material.color.setStyle(data.color);\n this.rendererSystem.applyColorCorrection(material.color);\n material.opacity = data.opacity;\n material.transparent = data.opacity < 1;\n material.visible = data.visible;\n },\n\n remove: function () {\n this.el.removeObject3D('line', this.line);\n }\n});\n\nfunction isEqualVec3 (a, b) {\n if (!a || !b) { return false; }\n return (a.x === b.x && a.y === b.y && a.z === b.z);\n}\n\n},{\"../core/component\":131}],89:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar registerShader = _dereq_('../core/shader').registerShader;\nvar THREE = _dereq_('../lib/three');\n\n/**\n * Link component. Connect experiences and traverse between them in VR\n *\n * @member {object} hiddenEls - Store the hidden elements during peek mode.\n */\nmodule.exports.Component = registerComponent('link', {\n schema: {\n backgroundColor: {default: 'red', type: 'color'},\n borderColor: {default: 'white', type: 'color'},\n highlighted: {default: false},\n highlightedColor: {default: '#24CAFF', type: 'color'},\n href: {default: ''},\n image: {type: 'asset'},\n on: {default: 'click'},\n peekMode: {default: false},\n title: {default: ''},\n titleColor: {default: 'white', type: 'color'},\n visualAspectEnabled: {default: false}\n },\n\n init: function () {\n this.navigate = this.navigate.bind(this);\n this.previousQuaternion = undefined;\n this.quaternionClone = new THREE.Quaternion();\n // Store hidden elements during peek mode so we can show them again later.\n this.hiddenEls = [];\n },\n\n update: function (oldData) {\n var data = this.data;\n var el = this.el;\n var backgroundColor;\n var strokeColor;\n\n if (!data.visualAspectEnabled) { return; }\n\n this.initVisualAspect();\n\n backgroundColor = data.highlighted ? data.highlightedColor : data.backgroundColor;\n strokeColor = data.highlighted ? data.highlightedColor : data.borderColor;\n el.setAttribute('material', 'backgroundColor', backgroundColor);\n el.setAttribute('material', 'strokeColor', strokeColor);\n\n if (data.on !== oldData.on) { this.updateEventListener(); }\n\n if (oldData.peekMode !== undefined &&\n data.peekMode !== oldData.peekMode) { this.updatePeekMode(); }\n\n if (!data.image || oldData.image === data.image) { return; }\n\n el.setAttribute('material', 'pano',\n typeof data.image === 'string' ? data.image : data.image.src);\n },\n\n /*\n * Toggle all elements and full 360 preview of the linked page.\n */\n updatePeekMode: function () {\n var el = this.el;\n var sphereEl = this.sphereEl;\n if (this.data.peekMode) {\n this.hideAll();\n el.getObject3D('mesh').visible = false;\n sphereEl.setAttribute('visible', true);\n } else {\n this.showAll();\n el.getObject3D('mesh').visible = true;\n sphereEl.setAttribute('visible', false);\n }\n },\n\n play: function () {\n this.updateEventListener();\n },\n\n pause: function () {\n this.removeEventListener();\n },\n\n updateEventListener: function () {\n var el = this.el;\n if (!el.isPlaying) { return; }\n this.removeEventListener();\n el.addEventListener(this.data.on, this.navigate);\n },\n\n removeEventListener: function () {\n var on = this.data.on;\n if (!on) { return; }\n this.el.removeEventListener(on, this.navigate);\n },\n\n initVisualAspect: function () {\n var el = this.el;\n var semiSphereEl;\n var sphereEl;\n var textEl;\n\n if (!this.data.visualAspectEnabled || this.visualAspectInitialized) { return; }\n\n textEl = this.textEl = this.textEl || document.createElement('a-entity');\n sphereEl = this.sphereEl = this.sphereEl || document.createElement('a-entity');\n semiSphereEl = this.semiSphereEl = this.semiSphereEl || document.createElement('a-entity');\n\n // Set portal.\n el.setAttribute('geometry', {primitive: 'circle', radius: 1.0, segments: 64});\n el.setAttribute('material', {shader: 'portal', pano: this.data.image, side: 'double'});\n\n // Set text that displays the link title and URL.\n textEl.setAttribute('text', {\n color: this.data.titleColor,\n align: 'center',\n font: 'kelsonsans',\n value: this.data.title || this.data.href,\n width: 4\n });\n textEl.setAttribute('position', '0 1.5 0');\n el.appendChild(textEl);\n\n // Set sphere rendered when camera is close to portal to allow user to peek inside.\n semiSphereEl.setAttribute('geometry', {\n primitive: 'sphere',\n radius: 1.0,\n phiStart: 0,\n segmentsWidth: 64,\n segmentsHeight: 64,\n phiLength: 180,\n thetaStart: 0,\n thetaLength: 360\n });\n semiSphereEl.setAttribute('material', {\n shader: 'portal',\n borderEnabled: 0.0,\n pano: this.data.image,\n side: 'back'\n });\n semiSphereEl.setAttribute('rotation', '0 180 0');\n semiSphereEl.setAttribute('position', '0 0 0');\n semiSphereEl.setAttribute('visible', false);\n el.appendChild(semiSphereEl);\n\n // Set sphere rendered when camera is close to portal to allow user to peek inside.\n sphereEl.setAttribute('geometry', {\n primitive: 'sphere',\n radius: 10,\n segmentsWidth: 64,\n segmentsHeight: 64\n });\n sphereEl.setAttribute('material', {\n shader: 'portal',\n borderEnabled: 0.0,\n pano: this.data.image,\n side: 'back'\n });\n sphereEl.setAttribute('visible', false);\n el.appendChild(sphereEl);\n\n this.visualAspectInitialized = true;\n },\n\n navigate: function () {\n window.location = this.data.href;\n },\n\n /**\n * 1. Swap plane that represents portal with sphere with a hole when the camera is close\n * so user can peek inside portal. Sphere is rendered on oposite side of portal\n * from where user enters.\n * 2. Place the url/title above or inside portal depending on distance to camera.\n * 3. Face portal to camera when far away from user.\n */\n tick: (function () {\n var cameraWorldPosition = new THREE.Vector3();\n var elWorldPosition = new THREE.Vector3();\n var quaternion = new THREE.Quaternion();\n var scale = new THREE.Vector3();\n\n return function () {\n var el = this.el;\n var object3D = el.object3D;\n var camera = el.sceneEl.camera;\n var cameraPortalOrientation;\n var distance;\n var textEl = this.textEl;\n\n if (!this.data.visualAspectEnabled) { return; }\n\n // Update matrices\n object3D.updateMatrixWorld();\n camera.parent.updateMatrixWorld();\n camera.updateMatrixWorld();\n\n object3D.matrix.decompose(elWorldPosition, quaternion, scale);\n elWorldPosition.setFromMatrixPosition(object3D.matrixWorld);\n cameraWorldPosition.setFromMatrixPosition(camera.matrixWorld);\n distance = elWorldPosition.distanceTo(cameraWorldPosition);\n\n if (distance > 20) {\n // Store original orientation to be restored when the portal stops facing the camera.\n if (!this.previousQuaternion) {\n this.quaternionClone.copy(quaternion);\n this.previousQuaternion = this.quaternionClone;\n }\n // If the portal is far away from the user, face portal to camera.\n object3D.lookAt(cameraWorldPosition);\n } else {\n // When portal is close to the user/camera.\n cameraPortalOrientation = this.calculateCameraPortalOrientation();\n // If user gets very close to portal, replace with holed sphere they can peek in.\n if (distance < 0.5) {\n // Configure text size and sphere orientation depending side user approaches portal.\n if (this.semiSphereEl.getAttribute('visible') === true) { return; }\n textEl.setAttribute('text', 'width', 1.5);\n if (cameraPortalOrientation <= 0.0) {\n textEl.setAttribute('position', '0 0 0.75');\n textEl.setAttribute('rotation', '0 180 0');\n this.semiSphereEl.setAttribute('rotation', '0 0 0');\n } else {\n textEl.setAttribute('position', '0 0 -0.75');\n textEl.setAttribute('rotation', '0 0 0');\n this.semiSphereEl.setAttribute('rotation', '0 180 0');\n }\n el.getObject3D('mesh').visible = false;\n this.semiSphereEl.setAttribute('visible', true);\n this.peekCameraPortalOrientation = cameraPortalOrientation;\n } else {\n // Calculate wich side the camera is approaching the camera (back / front).\n // Adjust text orientation based on camera position.\n if (cameraPortalOrientation <= 0.0) {\n textEl.setAttribute('rotation', '0 180 0');\n } else {\n textEl.setAttribute('rotation', '0 0 0');\n }\n textEl.setAttribute('text', 'width', 5);\n textEl.setAttribute('position', '0 1.5 0');\n el.getObject3D('mesh').visible = true;\n this.semiSphereEl.setAttribute('visible', false);\n this.peekCameraPortalOrientation = undefined;\n }\n if (this.previousQuaternion) {\n object3D.quaternion.copy(this.previousQuaternion);\n this.previousQuaternion = undefined;\n }\n }\n };\n })(),\n\n hideAll: function () {\n var el = this.el;\n var hiddenEls = this.hiddenEls;\n var self = this;\n if (hiddenEls.length > 0) { return; }\n el.sceneEl.object3D.traverse(function (object) {\n if (object && object.el && object.el.hasAttribute('link-controls')) { return; }\n if (!object.el || object === el.sceneEl.object3D || object.el === el ||\n object.el === self.sphereEl || object.el === el.sceneEl.cameraEl ||\n object.el.getAttribute('visible') === false || object.el === self.textEl ||\n object.el === self.semiSphereEl) {\n return;\n }\n object.el.setAttribute('visible', false);\n hiddenEls.push(object.el);\n });\n },\n\n showAll: function () {\n this.hiddenEls.forEach(function (el) { el.setAttribute('visible', true); });\n this.hiddenEls = [];\n },\n\n /**\n * Calculate whether the camera faces the front or back face of the portal.\n * @returns {number} > 0 if camera faces front of portal, < 0 if it faces back of portal.\n */\n calculateCameraPortalOrientation: (function () {\n var mat4 = new THREE.Matrix4();\n var cameraPosition = new THREE.Vector3();\n var portalNormal = new THREE.Vector3(0, 0, 1);\n var portalPosition = new THREE.Vector3(0, 0, 0);\n\n return function () {\n var el = this.el;\n var camera = el.sceneEl.camera;\n\n // Reset tmp variables.\n cameraPosition.set(0, 0, 0);\n portalNormal.set(0, 0, 1);\n portalPosition.set(0, 0, 0);\n\n // Apply portal orientation to the normal.\n el.object3D.matrixWorld.extractRotation(mat4);\n portalNormal.applyMatrix4(mat4);\n\n // Calculate portal world position.\n el.object3D.updateMatrixWorld();\n el.object3D.localToWorld(portalPosition);\n\n // Calculate camera world position.\n camera.parent.parent.updateMatrixWorld();\n camera.parent.updateMatrixWorld();\n camera.updateMatrixWorld();\n camera.localToWorld(cameraPosition);\n\n // Calculate vector from portal to camera.\n // (portal) -------> (camera)\n cameraPosition.sub(portalPosition).normalize();\n portalNormal.normalize();\n\n // Side where camera approaches portal is given by sign of dot product of portal normal\n // and portal to camera vectors.\n return Math.sign(portalNormal.dot(cameraPosition));\n };\n })(),\n\n remove: function () {\n this.removeEventListener();\n }\n});\n\n/* eslint-disable */\nregisterShader('portal', {\n schema: {\n borderEnabled: {default: 1.0, type: 'int', is: 'uniform'},\n backgroundColor: {default: 'red', type: 'color', is: 'uniform'},\n pano: {type: 'map', is: 'uniform'},\n strokeColor: {default: 'white', type: 'color', is: 'uniform'}\n },\n\n vertexShader: [\n 'vec3 portalPosition;',\n 'varying vec3 vWorldPosition;',\n 'varying float vDistanceToCenter;',\n 'varying float vDistance;',\n 'void main() {',\n 'vDistanceToCenter = clamp(length(position - vec3(0.0, 0.0, 0.0)), 0.0, 1.0);',\n 'portalPosition = (modelMatrix * vec4(0.0, 0.0, 0.0, 1.0)).xyz;',\n 'vDistance = length(portalPosition - cameraPosition);',\n 'vWorldPosition = (modelMatrix * vec4(position, 1.0)).xyz;',\n 'gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n '}'\n ].join('\\n'),\n\n fragmentShader: [\n '#define RECIPROCAL_PI2 0.15915494',\n 'uniform sampler2D pano;',\n 'uniform vec3 strokeColor;',\n 'uniform vec3 backgroundColor;',\n 'uniform float borderEnabled;',\n 'varying float vDistanceToCenter;',\n 'varying float vDistance;',\n 'varying vec3 vWorldPosition;',\n 'void main() {',\n 'vec3 direction = normalize(vWorldPosition - cameraPosition);',\n 'vec2 sampleUV;',\n 'float borderThickness = clamp(exp(-vDistance / 50.0), 0.6, 0.95);',\n 'sampleUV.y = clamp(direction.y * 0.5 + 0.5, 0.0, 1.0);',\n 'sampleUV.x = atan(direction.z, -direction.x) * -RECIPROCAL_PI2 + 0.5;',\n 'if (vDistanceToCenter > borderThickness && borderEnabled == 1.0) {',\n 'gl_FragColor = vec4(strokeColor, 1.0);',\n '} else {',\n 'gl_FragColor = mix(texture2D(pano, sampleUV), vec4(backgroundColor, 1.0), clamp(pow((vDistance / 15.0), 2.0), 0.0, 1.0));',\n '}',\n '}'\n ].join('\\n')\n});\n/* eslint-enable */\n\n},{\"../core/component\":131,\"../core/shader\":141,\"../lib/three\":179}],90:[function(_dereq_,module,exports){\n/* global DeviceOrientationEvent */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\nvar bind = utils.bind;\n\n// To avoid recalculation at every mouse movement tick\nvar PI_2 = Math.PI / 2;\n\n/**\n * look-controls. Update entity pose, factoring mouse, touch, and WebVR API data.\n */\nmodule.exports.Component = registerComponent('look-controls', {\n dependencies: ['position', 'rotation'],\n\n schema: {\n enabled: {default: true},\n magicWindowTrackingEnabled: {default: true},\n pointerLockEnabled: {default: false},\n reverseMouseDrag: {default: false},\n reverseTouchDrag: {default: false},\n touchEnabled: {default: true},\n mouseEnabled: {default: true}\n },\n\n init: function () {\n this.deltaYaw = 0;\n this.previousHMDPosition = new THREE.Vector3();\n this.hmdQuaternion = new THREE.Quaternion();\n this.magicWindowAbsoluteEuler = new THREE.Euler();\n this.magicWindowDeltaEuler = new THREE.Euler();\n this.position = new THREE.Vector3();\n this.magicWindowObject = new THREE.Object3D();\n this.rotation = {};\n this.deltaRotation = {};\n this.savedPose = null;\n this.pointerLocked = false;\n this.setupMouseControls();\n this.bindMethods();\n this.previousMouseEvent = {};\n\n this.setupMagicWindowControls();\n\n // To save / restore camera pose\n this.savedPose = {\n position: new THREE.Vector3(),\n rotation: new THREE.Euler()\n };\n\n // Call enter VR handler if the scene has entered VR before the event listeners attached.\n if (this.el.sceneEl.is('vr-mode')) { this.onEnterVR(); }\n },\n\n setupMagicWindowControls: function () {\n var magicWindowControls;\n var data = this.data;\n\n // Only on mobile devices and only enabled if DeviceOrientation permission has been granted.\n if (utils.device.isMobile()) {\n magicWindowControls = this.magicWindowControls = new THREE.DeviceOrientationControls(this.magicWindowObject);\n if (typeof DeviceOrientationEvent !== 'undefined' && DeviceOrientationEvent.requestPermission) {\n magicWindowControls.enabled = false;\n if (this.el.sceneEl.components['device-orientation-permission-ui'].permissionGranted) {\n magicWindowControls.enabled = data.magicWindowTrackingEnabled;\n } else {\n this.el.sceneEl.addEventListener('deviceorientationpermissiongranted', function () {\n magicWindowControls.enabled = data.magicWindowTrackingEnabled;\n });\n }\n }\n }\n },\n\n update: function (oldData) {\n var data = this.data;\n\n // Disable grab cursor classes if no longer enabled.\n if (data.enabled !== oldData.enabled) {\n this.updateGrabCursor(data.enabled);\n }\n\n // Reset magic window eulers if tracking is disabled.\n if (oldData && !data.magicWindowTrackingEnabled && oldData.magicWindowTrackingEnabled) {\n this.magicWindowAbsoluteEuler.set(0, 0, 0);\n this.magicWindowDeltaEuler.set(0, 0, 0);\n }\n\n // Pass on magic window tracking setting to magicWindowControls.\n if (this.magicWindowControls) {\n this.magicWindowControls.enabled = data.magicWindowTrackingEnabled;\n }\n\n if (oldData && !data.pointerLockEnabled !== oldData.pointerLockEnabled) {\n this.removeEventListeners();\n this.addEventListeners();\n if (this.pointerLocked) { this.exitPointerLock(); }\n }\n },\n\n tick: function (t) {\n var data = this.data;\n if (!data.enabled) { return; }\n this.updateOrientation();\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n if (this.pointerLocked) { this.exitPointerLock(); }\n },\n\n remove: function () {\n this.removeEventListeners();\n if (this.pointerLocked) { this.exitPointerLock(); }\n },\n\n bindMethods: function () {\n this.onMouseDown = bind(this.onMouseDown, this);\n this.onMouseMove = bind(this.onMouseMove, this);\n this.onMouseUp = bind(this.onMouseUp, this);\n this.onTouchStart = bind(this.onTouchStart, this);\n this.onTouchMove = bind(this.onTouchMove, this);\n this.onTouchEnd = bind(this.onTouchEnd, this);\n this.onEnterVR = bind(this.onEnterVR, this);\n this.onExitVR = bind(this.onExitVR, this);\n this.onPointerLockChange = bind(this.onPointerLockChange, this);\n this.onPointerLockError = bind(this.onPointerLockError, this);\n },\n\n /**\n * Set up states and Object3Ds needed to store rotation data.\n */\n setupMouseControls: function () {\n this.mouseDown = false;\n this.pitchObject = new THREE.Object3D();\n this.yawObject = new THREE.Object3D();\n this.yawObject.position.y = 10;\n this.yawObject.add(this.pitchObject);\n },\n\n /**\n * Add mouse and touch event listeners to canvas.\n */\n addEventListeners: function () {\n var sceneEl = this.el.sceneEl;\n var canvasEl = sceneEl.canvas;\n\n // Wait for canvas to load.\n if (!canvasEl) {\n sceneEl.addEventListener('render-target-loaded', bind(this.addEventListeners, this));\n return;\n }\n\n // Mouse events.\n canvasEl.addEventListener('mousedown', this.onMouseDown, false);\n window.addEventListener('mousemove', this.onMouseMove, false);\n window.addEventListener('mouseup', this.onMouseUp, false);\n\n // Touch events.\n canvasEl.addEventListener('touchstart', this.onTouchStart);\n window.addEventListener('touchmove', this.onTouchMove);\n window.addEventListener('touchend', this.onTouchEnd);\n\n // sceneEl events.\n sceneEl.addEventListener('enter-vr', this.onEnterVR);\n sceneEl.addEventListener('exit-vr', this.onExitVR);\n\n // Pointer Lock events.\n if (this.data.pointerLockEnabled) {\n document.addEventListener('pointerlockchange', this.onPointerLockChange, false);\n document.addEventListener('mozpointerlockchange', this.onPointerLockChange, false);\n document.addEventListener('pointerlockerror', this.onPointerLockError, false);\n }\n },\n\n /**\n * Remove mouse and touch event listeners from canvas.\n */\n removeEventListeners: function () {\n var sceneEl = this.el.sceneEl;\n var canvasEl = sceneEl && sceneEl.canvas;\n\n if (!canvasEl) { return; }\n\n // Mouse events.\n canvasEl.removeEventListener('mousedown', this.onMouseDown);\n window.removeEventListener('mousemove', this.onMouseMove);\n window.removeEventListener('mouseup', this.onMouseUp);\n\n // Touch events.\n canvasEl.removeEventListener('touchstart', this.onTouchStart);\n window.removeEventListener('touchmove', this.onTouchMove);\n window.removeEventListener('touchend', this.onTouchEnd);\n\n // sceneEl events.\n sceneEl.removeEventListener('enter-vr', this.onEnterVR);\n sceneEl.removeEventListener('exit-vr', this.onExitVR);\n\n // Pointer Lock events.\n document.removeEventListener('pointerlockchange', this.onPointerLockChange, false);\n document.removeEventListener('mozpointerlockchange', this.onPointerLockChange, false);\n document.removeEventListener('pointerlockerror', this.onPointerLockError, false);\n },\n\n /**\n * Update orientation for mobile, mouse drag, and headset.\n * Mouse-drag only enabled if HMD is not active.\n */\n updateOrientation: (function () {\n var poseMatrix = new THREE.Matrix4();\n\n return function () {\n var object3D = this.el.object3D;\n var pitchObject = this.pitchObject;\n var yawObject = this.yawObject;\n var pose;\n var sceneEl = this.el.sceneEl;\n\n // In VR mode, THREE is in charge of updating the camera pose.\n if (sceneEl.is('vr-mode') && sceneEl.checkHeadsetConnected()) {\n // With WebXR THREE applies headset pose to the object3D matrixWorld internally.\n // Reflect values back on position, rotation, scale for getAttribute to return the expected values.\n if (sceneEl.hasWebXR) {\n pose = sceneEl.renderer.xr.getCameraPose();\n if (pose) {\n poseMatrix.elements = pose.transform.matrix;\n poseMatrix.decompose(object3D.position, object3D.rotation, object3D.scale);\n }\n }\n return;\n }\n\n this.updateMagicWindowOrientation();\n\n // On mobile, do camera rotation with touch events and sensors.\n object3D.rotation.x = this.magicWindowDeltaEuler.x + pitchObject.rotation.x;\n object3D.rotation.y = this.magicWindowDeltaEuler.y + yawObject.rotation.y;\n object3D.rotation.z = this.magicWindowDeltaEuler.z;\n };\n })(),\n\n updateMagicWindowOrientation: function () {\n var magicWindowAbsoluteEuler = this.magicWindowAbsoluteEuler;\n var magicWindowDeltaEuler = this.magicWindowDeltaEuler;\n // Calculate magic window HMD quaternion.\n if (this.magicWindowControls && this.magicWindowControls.enabled) {\n this.magicWindowControls.update();\n magicWindowAbsoluteEuler.setFromQuaternion(this.magicWindowObject.quaternion, 'YXZ');\n if (!this.previousMagicWindowYaw && magicWindowAbsoluteEuler.y !== 0) {\n this.previousMagicWindowYaw = magicWindowAbsoluteEuler.y;\n }\n if (this.previousMagicWindowYaw) {\n magicWindowDeltaEuler.x = magicWindowAbsoluteEuler.x;\n magicWindowDeltaEuler.y += magicWindowAbsoluteEuler.y - this.previousMagicWindowYaw;\n magicWindowDeltaEuler.z = magicWindowAbsoluteEuler.z;\n this.previousMagicWindowYaw = magicWindowAbsoluteEuler.y;\n }\n }\n },\n\n /**\n * Translate mouse drag into rotation.\n *\n * Dragging up and down rotates the camera around the X-axis (yaw).\n * Dragging left and right rotates the camera around the Y-axis (pitch).\n */\n onMouseMove: function (evt) {\n var direction;\n var movementX;\n var movementY;\n var pitchObject = this.pitchObject;\n var previousMouseEvent = this.previousMouseEvent;\n var yawObject = this.yawObject;\n\n // Not dragging or not enabled.\n if (!this.data.enabled || (!this.mouseDown && !this.pointerLocked)) { return; }\n\n // Calculate delta.\n if (this.pointerLocked) {\n movementX = evt.movementX || evt.mozMovementX || 0;\n movementY = evt.movementY || evt.mozMovementY || 0;\n } else {\n movementX = evt.screenX - previousMouseEvent.screenX;\n movementY = evt.screenY - previousMouseEvent.screenY;\n }\n this.previousMouseEvent.screenX = evt.screenX;\n this.previousMouseEvent.screenY = evt.screenY;\n\n // Calculate rotation.\n direction = this.data.reverseMouseDrag ? 1 : -1;\n yawObject.rotation.y += movementX * 0.002 * direction;\n pitchObject.rotation.x += movementY * 0.002 * direction;\n pitchObject.rotation.x = Math.max(-PI_2, Math.min(PI_2, pitchObject.rotation.x));\n },\n\n /**\n * Register mouse down to detect mouse drag.\n */\n onMouseDown: function (evt) {\n var sceneEl = this.el.sceneEl;\n if (!this.data.enabled || !this.data.mouseEnabled || (sceneEl.is('vr-mode') && sceneEl.checkHeadsetConnected())) { return; }\n // Handle only primary button.\n if (evt.button !== 0) { return; }\n\n var canvasEl = sceneEl && sceneEl.canvas;\n\n this.mouseDown = true;\n this.previousMouseEvent.screenX = evt.screenX;\n this.previousMouseEvent.screenY = evt.screenY;\n this.showGrabbingCursor();\n\n if (this.data.pointerLockEnabled && !this.pointerLocked) {\n if (canvasEl.requestPointerLock) {\n canvasEl.requestPointerLock();\n } else if (canvasEl.mozRequestPointerLock) {\n canvasEl.mozRequestPointerLock();\n }\n }\n },\n\n /**\n * Shows grabbing cursor on scene\n */\n showGrabbingCursor: function () {\n this.el.sceneEl.canvas.style.cursor = 'grabbing';\n },\n\n /**\n * Hides grabbing cursor on scene\n */\n hideGrabbingCursor: function () {\n this.el.sceneEl.canvas.style.cursor = '';\n },\n\n /**\n * Register mouse up to detect release of mouse drag.\n */\n onMouseUp: function () {\n this.mouseDown = false;\n this.hideGrabbingCursor();\n },\n\n /**\n * Register touch down to detect touch drag.\n */\n onTouchStart: function (evt) {\n if (evt.touches.length !== 1 ||\n !this.data.touchEnabled ||\n this.el.sceneEl.is('vr-mode')) { return; }\n this.touchStart = {\n x: evt.touches[0].pageX,\n y: evt.touches[0].pageY\n };\n this.touchStarted = true;\n },\n\n /**\n * Translate touch move to Y-axis rotation.\n */\n onTouchMove: function (evt) {\n var direction;\n var canvas = this.el.sceneEl.canvas;\n var deltaY;\n var yawObject = this.yawObject;\n\n if (!this.touchStarted || !this.data.touchEnabled) { return; }\n\n deltaY = 2 * Math.PI * (evt.touches[0].pageX - this.touchStart.x) / canvas.clientWidth;\n\n direction = this.data.reverseTouchDrag ? 1 : -1;\n // Limit touch orientaion to to yaw (y axis).\n yawObject.rotation.y -= deltaY * 0.5 * direction;\n this.touchStart = {\n x: evt.touches[0].pageX,\n y: evt.touches[0].pageY\n };\n },\n\n /**\n * Register touch end to detect release of touch drag.\n */\n onTouchEnd: function () {\n this.touchStarted = false;\n },\n\n /**\n * Save pose.\n */\n onEnterVR: function () {\n var sceneEl = this.el.sceneEl;\n if (!sceneEl.checkHeadsetConnected()) { return; }\n this.saveCameraPose();\n this.el.object3D.position.set(0, 0, 0);\n this.el.object3D.rotation.set(0, 0, 0);\n if (sceneEl.hasWebXR) {\n this.el.object3D.matrixAutoUpdate = false;\n this.el.object3D.updateMatrix();\n }\n },\n\n /**\n * Restore the pose.\n */\n onExitVR: function () {\n if (!this.el.sceneEl.checkHeadsetConnected()) { return; }\n this.restoreCameraPose();\n this.previousHMDPosition.set(0, 0, 0);\n this.el.object3D.matrixAutoUpdate = true;\n },\n\n /**\n * Update Pointer Lock state.\n */\n onPointerLockChange: function () {\n this.pointerLocked = !!(document.pointerLockElement || document.mozPointerLockElement);\n },\n\n /**\n * Recover from Pointer Lock error.\n */\n onPointerLockError: function () {\n this.pointerLocked = false;\n },\n\n // Exits pointer-locked mode.\n exitPointerLock: function () {\n document.exitPointerLock();\n this.pointerLocked = false;\n },\n\n /**\n * Toggle the feature of showing/hiding the grab cursor.\n */\n updateGrabCursor: function (enabled) {\n var sceneEl = this.el.sceneEl;\n\n function enableGrabCursor () { sceneEl.canvas.classList.add('a-grab-cursor'); }\n function disableGrabCursor () { sceneEl.canvas.classList.remove('a-grab-cursor'); }\n\n if (!sceneEl.canvas) {\n if (enabled) {\n sceneEl.addEventListener('render-target-loaded', enableGrabCursor);\n } else {\n sceneEl.addEventListener('render-target-loaded', disableGrabCursor);\n }\n return;\n }\n\n if (enabled) {\n enableGrabCursor();\n return;\n }\n disableGrabCursor();\n },\n\n /**\n * Save camera pose before entering VR to restore later if exiting.\n */\n saveCameraPose: function () {\n var el = this.el;\n\n this.savedPose.position.copy(el.object3D.position);\n this.savedPose.rotation.copy(el.object3D.rotation);\n this.hasSavedPose = true;\n },\n\n /**\n * Reset camera pose to before entering VR.\n */\n restoreCameraPose: function () {\n var el = this.el;\n var savedPose = this.savedPose;\n\n if (!this.hasSavedPose) { return; }\n\n // Reset camera orientation.\n el.object3D.position.copy(savedPose.position);\n el.object3D.rotation.copy(savedPose.rotation);\n this.hasSavedPose = false;\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205}],91:[function(_dereq_,module,exports){\nvar bind = _dereq_('../utils/bind');\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\n// See Profiles Registry:\n// https://github.com/immersive-web/webxr-input-profiles/tree/master/packages/registry\n// TODO: Add a more robust system for deriving gamepad name.\nvar GAMEPAD_ID_PREFIX = 'magicleap';\nvar GAMEPAD_ID_SUFFIX = '-one';\nvar GAMEPAD_ID_COMPOSITE = GAMEPAD_ID_PREFIX + GAMEPAD_ID_SUFFIX;\n\nvar MAGICLEAP_CONTROLLER_MODEL_GLB_URL = 'https://cdn.aframe.io/controllers/magicleap/magicleap-one-controller.glb';\n\n/**\n * Button IDs:\n * 0 - trigger\n * 1 - grip\n * 2 - touchpad\n * 3 - menu (never dispatched on this layer)\n *\n * Axis:\n * 0 - touchpad x axis\n * 1 - touchpad y axis\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {touchpad: [0, 1]},\n buttons: ['trigger', 'grip', 'touchpad', 'menu']\n};\n\n/**\n * Magic Leap Controls\n * Interface with Magic Leap control and map Gamepad events to controller\n * buttons: trigger, grip, touchpad, and menu.\n * Load a controller model.\n */\nmodule.exports.Component = registerComponent('magicleap-controls', {\n schema: {\n hand: {default: 'none'},\n model: {default: true},\n orientationOffset: {type: 'vec3'}\n },\n\n mapping: INPUT_MAPPING_WEBXR,\n\n init: function () {\n var self = this;\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.previousButtonValues = {};\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n\n this.bindMethods();\n },\n\n update: function () {\n var data = this.data;\n this.controllerIndex = data.hand === 'right' ? 0 : data.hand === 'left' ? 1 : 2;\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('axismove', this.onAxisMoved);\n el.addEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('axismove', this.onAxisMoved);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n var data = this.data;\n checkControllerPresentAndSetup(this, GAMEPAD_ID_COMPOSITE,\n {index: this.controllerIndex, hand: data.hand});\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n\n el.setAttribute('tracked-controls', {\n // TODO: verify expected behavior between reserved prefixes.\n idPrefix: GAMEPAD_ID_COMPOSITE,\n hand: data.hand,\n controller: this.controllerIndex,\n orientationOffset: data.orientationOffset\n });\n\n // Load model.\n if (!this.data.model) { return; }\n this.el.setAttribute('gltf-model', MAGICLEAP_CONTROLLER_MODEL_GLB_URL);\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n // Note that due to gamepadconnected event propagation issues, we don't rely on events.\n this.checkIfControllerPresent();\n },\n\n /**\n * Rotate the trigger button based on how hard the trigger is pressed.\n */\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n var analogValue;\n\n if (!button) { return; }\n if (button === 'trigger') {\n analogValue = evt.detail.state.value;\n console.log('analog value of trigger press: ' + analogValue);\n }\n\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n // our glb scale is too large.\n controllerObject3D.scale.set(0.01, 0.01, 0.01);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {},\n\n setButtonColor: function (buttonName, color) {}\n\n});\n\n},{\"../core/component\":131,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],92:[function(_dereq_,module,exports){\n/* global Promise */\nvar utils = _dereq_('../utils/');\nvar component = _dereq_('../core/component');\nvar THREE = _dereq_('../lib/three');\nvar shader = _dereq_('../core/shader');\n\nvar error = utils.debug('components:material:error');\nvar registerComponent = component.registerComponent;\nvar shaders = shader.shaders;\nvar shaderNames = shader.shaderNames;\n\n/**\n * Material component.\n *\n * @member {object} shader - Determines how material is shaded. Defaults to `standard`,\n * three.js's implementation of PBR. Another standard shading model is `flat` which\n * uses MeshBasicMaterial.\n */\nmodule.exports.Component = registerComponent('material', {\n schema: {\n alphaTest: {default: 0.0, min: 0.0, max: 1.0},\n depthTest: {default: true},\n depthWrite: {default: true},\n flatShading: {default: false},\n npot: {default: false},\n offset: {type: 'vec2', default: {x: 0, y: 0}},\n opacity: {default: 1.0, min: 0.0, max: 1.0},\n repeat: {type: 'vec2', default: {x: 1, y: 1}},\n shader: {default: 'standard', oneOf: shaderNames, schemaChange: true},\n side: {default: 'front', oneOf: ['front', 'back', 'double']},\n transparent: {default: false},\n vertexColors: {type: 'string', default: 'none', oneOf: ['face', 'vertex']},\n visible: {default: true},\n blending: {default: 'normal', oneOf: ['none', 'normal', 'additive', 'subtractive', 'multiply']},\n dithering: {default: true}\n },\n\n init: function () {\n this.material = null;\n },\n\n /**\n * Update or create material.\n *\n * @param {object|null} oldData\n */\n update: function (oldData) {\n var data = this.data;\n if (!this.shader || data.shader !== oldData.shader) {\n this.updateShader(data.shader);\n }\n this.shader.update(this.data);\n this.updateMaterial(oldData);\n },\n\n updateSchema: function (data) {\n var currentShader;\n var newShader;\n var schema;\n var shader;\n\n newShader = data && data.shader;\n currentShader = this.oldData && this.oldData.shader;\n shader = newShader || currentShader;\n schema = shaders[shader] && shaders[shader].schema;\n\n if (!schema) { error('Unknown shader schema ' + shader); }\n if (currentShader && newShader === currentShader) { return; }\n this.extendSchema(schema);\n this.updateBehavior();\n },\n\n updateBehavior: function () {\n var key;\n var sceneEl = this.el.sceneEl;\n var schema = this.schema;\n var self = this;\n var tickProperties;\n\n function tickTime (time, delta) {\n var key;\n for (key in tickProperties) {\n tickProperties[key] = time;\n }\n self.shader.update(tickProperties);\n }\n\n this.tick = undefined;\n\n tickProperties = {};\n for (key in schema) {\n if (schema[key].type === 'time') {\n this.tick = tickTime;\n tickProperties[key] = true;\n }\n }\n\n if (!sceneEl) { return; }\n if (this.tick) {\n sceneEl.addBehavior(this);\n } else {\n sceneEl.removeBehavior(this);\n }\n },\n\n updateShader: function (shaderName) {\n var data = this.data;\n var Shader = shaders[shaderName] && shaders[shaderName].Shader;\n var shaderInstance;\n\n if (!Shader) { throw new Error('Unknown shader ' + shaderName); }\n\n // Get material from A-Frame shader.\n shaderInstance = this.shader = new Shader();\n shaderInstance.el = this.el;\n shaderInstance.init(data);\n this.setMaterial(shaderInstance.material);\n this.updateSchema(data);\n },\n\n /**\n * Set and update base material properties.\n * Set `needsUpdate` when needed.\n */\n updateMaterial: function (oldData) {\n var data = this.data;\n var material = this.material;\n var oldDataHasKeys;\n\n // Base material properties.\n material.alphaTest = data.alphaTest;\n material.depthTest = data.depthTest !== false;\n material.depthWrite = data.depthWrite !== false;\n material.opacity = data.opacity;\n material.flatShading = data.flatShading;\n material.side = parseSide(data.side);\n material.transparent = data.transparent !== false || data.opacity < 1.0;\n material.vertexColors = parseVertexColors(data.vertexColors);\n material.visible = data.visible;\n material.blending = parseBlending(data.blending);\n material.dithering = data.dithering;\n\n // Check if material needs update.\n for (oldDataHasKeys in oldData) { break; }\n if (oldDataHasKeys &&\n (oldData.alphaTest !== data.alphaTest ||\n oldData.side !== data.side ||\n oldData.vertexColors !== data.vertexColors)) {\n material.needsUpdate = true;\n }\n },\n\n /**\n * Remove material on remove (callback).\n * Dispose of it from memory and unsubscribe from scene updates.\n */\n remove: function () {\n var defaultMaterial = new THREE.MeshBasicMaterial();\n var material = this.material;\n var object3D = this.el.getObject3D('mesh');\n if (object3D) { object3D.material = defaultMaterial; }\n disposeMaterial(material, this.system);\n },\n\n /**\n * (Re)create new material. Has side-effects of setting `this.material` and updating\n * material registration in scene.\n *\n * @param {object} data - Material component data.\n * @param {object} type - Material type to create.\n * @returns {object} Material.\n */\n setMaterial: function (material) {\n var el = this.el;\n var mesh;\n var system = this.system;\n\n if (this.material) { disposeMaterial(this.material, system); }\n\n this.material = material;\n system.registerMaterial(material);\n\n // Set on mesh. If mesh does not exist, wait for it.\n mesh = el.getObject3D('mesh');\n if (mesh) {\n mesh.material = material;\n } else {\n el.addEventListener('object3dset', function waitForMesh (evt) {\n if (evt.detail.type !== 'mesh' || evt.target !== el) { return; }\n el.getObject3D('mesh').material = material;\n el.removeEventListener('object3dset', waitForMesh);\n });\n }\n }\n});\n\n/**\n * Return a three.js constant determining which material face sides to render\n * based on the side parameter (passed as a component property).\n *\n * @param {string} [side=front] - `front`, `back`, or `double`.\n * @returns {number} THREE.FrontSide, THREE.BackSide, or THREE.DoubleSide.\n */\nfunction parseSide (side) {\n switch (side) {\n case 'back': {\n return THREE.BackSide;\n }\n case 'double': {\n return THREE.DoubleSide;\n }\n default: {\n // Including case `front`.\n return THREE.FrontSide;\n }\n }\n}\n\n/**\n * Return a three.js constant determining vertex coloring.\n */\nfunction parseVertexColors (coloring) {\n switch (coloring) {\n case 'face': {\n return THREE.FaceColors;\n }\n case 'vertex': {\n return THREE.VertexColors;\n }\n default: {\n return THREE.NoColors;\n }\n }\n}\n\n/**\n * Return a three.js constant determining blending\n *\n * @param {string} [blending=normal]\n * - `none`, additive`, `subtractive`,`multiply` or `normal`.\n * @returns {number}\n */\nfunction parseBlending (blending) {\n switch (blending) {\n case 'none': {\n return THREE.NoBlending;\n }\n case 'additive': {\n return THREE.AdditiveBlending;\n }\n case 'subtractive': {\n return THREE.SubtractiveBlending;\n }\n case 'multiply': {\n return THREE.MultiplyBlending;\n }\n default: {\n return THREE.NormalBlending;\n }\n }\n}\n\n/**\n * Dispose of material from memory and unsubscribe material from scene updates like fog.\n */\nfunction disposeMaterial (material, system) {\n material.dispose();\n system.unregisterMaterial(material);\n}\n\n},{\"../core/component\":131,\"../core/shader\":141,\"../lib/three\":179,\"../utils/\":205}],93:[function(_dereq_,module,exports){\nvar debug = _dereq_('../utils/debug');\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\nvar warn = debug('components:obj-model:warn');\n\nmodule.exports.Component = registerComponent('obj-model', {\n schema: {\n mtl: {type: 'model'},\n obj: {type: 'model'}\n },\n\n init: function () {\n var self = this;\n\n this.model = null;\n this.objLoader = new THREE.OBJLoader();\n this.mtlLoader = new THREE.MTLLoader(this.objLoader.manager);\n // Allow cross-origin images to be loaded.\n this.mtlLoader.crossOrigin = '';\n\n this.el.addEventListener('componentinitialized', function (evt) {\n if (!self.model) { return; }\n if (evt.detail.name !== 'material') { return; }\n self.applyMaterial();\n });\n },\n\n update: function () {\n var data = this.data;\n if (!data.obj) { return; }\n this.resetMesh();\n this.loadObj(data.obj, data.mtl);\n },\n\n remove: function () {\n if (!this.model) { return; }\n this.resetMesh();\n },\n\n resetMesh: function () {\n this.el.removeObject3D('mesh');\n },\n\n loadObj: function (objUrl, mtlUrl) {\n var self = this;\n var el = this.el;\n var mtlLoader = this.mtlLoader;\n var objLoader = this.objLoader;\n var rendererSystem = this.el.sceneEl.systems.renderer;\n var BASE_PATH = mtlUrl.substr(0, mtlUrl.lastIndexOf('/') + 1);\n\n if (mtlUrl) {\n // .OBJ with an .MTL.\n if (el.hasAttribute('material')) {\n warn('Material component properties are ignored when a .MTL is provided');\n }\n mtlLoader.setResourcePath(BASE_PATH);\n mtlLoader.load(mtlUrl, function (materials) {\n materials.preload();\n objLoader.setMaterials(materials);\n objLoader.load(objUrl, function (objModel) {\n self.model = objModel;\n self.model.traverse(function (object) {\n if (object.isMesh) {\n var material = object.material;\n if (material.color) rendererSystem.applyColorCorrection(material.color);\n if (material.map) rendererSystem.applyColorCorrection(material.map);\n if (material.emissive) rendererSystem.applyColorCorrection(material.emissive);\n if (material.emissiveMap) rendererSystem.applyColorCorrection(material.emissiveMap);\n }\n });\n el.setObject3D('mesh', objModel);\n el.emit('model-loaded', {format: 'obj', model: objModel});\n });\n });\n return;\n }\n\n // .OBJ only.\n objLoader.load(objUrl, function loadObjOnly (objModel) {\n self.model = objModel;\n self.applyMaterial();\n el.setObject3D('mesh', objModel);\n el.emit('model-loaded', {format: 'obj', model: objModel});\n });\n },\n\n /**\n * Apply material from material component recursively.\n */\n applyMaterial: function () {\n var material = this.el.components.material;\n if (!material) { return; }\n this.model.traverse(function (child) {\n if (child instanceof THREE.Mesh) {\n child.material = material.material;\n }\n });\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/debug\":201}],94:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'oculus-go';\nvar GAMEPAD_ID_WEBVR = 'Oculus Go';\n\nvar OCULUS_GO_CONTROLLER_MODEL_URL = 'https://cdn.aframe.io/controllers/oculus/go/oculus-go-controller.gltf';\n\n// Prefix for Gen1 and Gen2 Oculus Touch Controllers.\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n/**\n * Button indices:\n * 0 - trackpad\n * 1 - trigger\n *\n * Axis:\n * 0 - trackpad x\n * 1 - trackpad y\n */\nvar INPUT_MAPPING_WEBVR = {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'trigger']\n};\n\n/**\n * Button indices:\n * 0 - trigger\n * 1 - none\n * 2 - touchpad\n *\n * Axis:\n * 0 - touchpad x\n * 1 - touchpad y\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/oculus/oculus-go.json\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {touchpad: [0, 1]},\n buttons: ['trigger', 'none', 'touchpad']\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Oculus Go controls.\n * Interface with Oculus Go controller and map Gamepad events to\n * controller buttons: trackpad, trigger\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('oculus-go-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n buttonColor: {type: 'color', default: '#FFFFFF'},\n buttonTouchedColor: {type: 'color', default: '#BBBBBB'},\n buttonHighlightColor: {type: 'color', default: '#7A7A7A'},\n model: {default: true},\n orientationOffset: {type: 'vec3'},\n armModel: {default: true}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX,\n this.data.hand ? {hand: this.data.hand} : {});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n armModel: data.armModel,\n hand: data.hand,\n idPrefix: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset\n });\n if (!this.data.model) { return; }\n this.el.setAttribute('gltf-model', OCULUS_GO_CONTROLLER_MODEL_URL);\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n // No need for onButtonChanged, since Oculus Go controller has no analog buttons.\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n var buttonMeshes;\n\n if (!this.data.model) { return; }\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.trigger = controllerObject3D.getObjectByName('oculus_go_button_trigger');\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('oculus_go_touchpad');\n buttonMeshes.touchpad = controllerObject3D.getObjectByName('oculus_go_touchpad');\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var buttonMeshes = this.buttonMeshes;\n if (!buttonMeshes || !buttonMeshes[buttonName]) { return; }\n var color;\n var button;\n switch (state) {\n case 'down':\n color = this.data.buttonHighlightColor;\n break;\n case 'touchstart':\n color = this.data.buttonTouchedColor;\n break;\n default:\n color = this.data.buttonColor;\n }\n button = buttonMeshes[buttonName];\n button.material.color.set(color);\n this.rendererSystem.applyColorCorrection(button.material.color);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],95:[function(_dereq_,module,exports){\nvar bind = _dereq_('../utils/bind');\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'oculus-touch';\nvar GAMEPAD_ID_WEBVR = 'Oculus Touch';\n\n// Prefix for Gen1 and Gen2 Oculus Touch Controllers.\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n// First generation model URL.\nvar TOUCH_CONTROLLER_MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/oculus/oculus-touch-controller-';\n\nvar OCULUS_TOUCH_WEBVR = {\n left: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'left.gltf',\n rayOrigin: {origin: {x: 0.008, y: -0.01, z: 0}, direction: {x: 0, y: -0.8, z: -1}},\n modelPivotOffset: new THREE.Vector3(-0.005, 0.003, -0.055),\n modelPivotRotation: new THREE.Euler(0, 0, 0)\n },\n right: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'right.gltf',\n rayOrigin: {origin: {x: -0.008, y: -0.01, z: 0}, direction: {x: 0, y: -0.8, z: -1}},\n modelPivotOffset: new THREE.Vector3(0.005, 0.003, -0.055),\n modelPivotRotation: new THREE.Euler(0, 0, 0)\n }\n};\n\nvar OCULUS_TOUCH_WEBXR = {\n left: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'left.gltf',\n rayOrigin: {origin: {x: 0.002, y: -0.005, z: -0.03}, direction: {x: 0, y: -0.8, z: -1}},\n modelPivotOffset: new THREE.Vector3(-0.005, 0.036, -0.037),\n modelPivotRotation: new THREE.Euler(Math.PI / 4.5, 0, 0)\n },\n right: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'right.gltf',\n rayOrigin: {origin: {x: -0.002, y: -0.005, z: -0.03}, direction: {x: 0, y: -0.8, z: -1}},\n modelPivotOffset: new THREE.Vector3(0.005, 0.036, -0.037),\n modelPivotRotation: new THREE.Euler(Math.PI / 4.5, 0, 0)\n }\n};\n\nvar OCULUS_TOUCH_CONFIG = isWebXRAvailable ? OCULUS_TOUCH_WEBXR : OCULUS_TOUCH_WEBVR;\n\nvar CONTROLLER_DEFAULT = 'oculus-touch';\nvar CONTROLLER_PROPERTIES = {\n 'oculus-touch': OCULUS_TOUCH_CONFIG,\n 'oculus-touch-v2': {\n left: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'gen2-left.gltf',\n rayOrigin: {origin: {x: -0.01, y: 0, z: -0.02}, direction: {x: 0, y: -0.5, z: -1}},\n modelPivotOffset: new THREE.Vector3(0, 0, 0),\n modelPivotRotation: new THREE.Euler(0, 0, 0)\n },\n right: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'gen2-right.gltf',\n rayOrigin: {origin: {x: 0.01, y: 0, z: -0.02}, direction: {x: 0, y: -0.5, z: -1}},\n modelPivotOffset: new THREE.Vector3(0, 0, 0),\n modelPivotRotation: new THREE.Euler(0, 0, 0)\n }\n },\n 'oculus-touch-v3': {\n left: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'v3-left.glb',\n rayOrigin: {origin: {x: 0.015, y: 0.005, z: 0}, direction: {x: 0, y: 0, z: -1}},\n modelPivotOffset: new THREE.Vector3(0.01, -0.01, 0.05),\n modelPivotRotation: new THREE.Euler(Math.PI / 4, 0, 0)\n },\n right: {\n modelUrl: TOUCH_CONTROLLER_MODEL_BASE_URL + 'v3-right.glb',\n rayOrigin: {origin: {x: -0.015, y: 0.005, z: 0}, direction: {x: 0, y: 0, z: -1}},\n modelPivotOffset: new THREE.Vector3(-0.01, -0.01, 0.05),\n modelPivotRotation: new THREE.Euler(Math.PI / 4, 0, 0)\n }\n }\n};\n\n/**\n * Button indices:\n * 0 - thumbstick (which has separate axismove / thumbstickmoved events)\n * 1 - trigger (with analog value, which goes up to 1)\n * 2 - grip (with analog value, which goes up to 1)\n * 3 - X (left) or A (right)\n * 4 - Y (left) or B (right)\n * 5 - surface (touch only)\n */\nvar INPUT_MAPPING_WEBVR = {\n left: {\n axes: {thumbstick: [0, 1]},\n buttons: ['thumbstick', 'trigger', 'grip', 'xbutton', 'ybutton', 'surface']\n },\n right: {\n axes: {thumbstick: [0, 1]},\n buttons: ['thumbstick', 'trigger', 'grip', 'abutton', 'bbutton', 'surface']\n }\n};\n\n/**\n * Button indices:\n * 0 - trigger\n * 1 - grip\n * 2 - none\n * 3 - thumbstick\n * 4 - X or A button\n * 5 - Y or B button\n * 6 - surface\n *\n * Axis:\n * 0 - none\n * 1 - none\n * 2 - thumbstick\n * 3 - thumbstick\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/oculus/oculus-touch.json\n */\nvar INPUT_MAPPING_WEBXR = {\n left: {\n axes: {thumbstick: [2, 3]},\n buttons: ['trigger', 'grip', 'none', 'thumbstick', 'xbutton', 'ybutton', 'surface']\n },\n right: {\n axes: {thumbstick: [2, 3]},\n buttons: ['trigger', 'grip', 'none', 'thumbstick', 'abutton', 'bbutton', 'surface']\n }\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Oculus Touch controls.\n * Interface with Oculus Touch controllers and map Gamepad events to\n * controller buttons: thumbstick, trigger, grip, xbutton, ybutton, surface\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('oculus-touch-controls', {\n schema: {\n hand: {default: 'left'},\n buttonColor: {type: 'color', default: '#999'}, // Off-white.\n buttonTouchColor: {type: 'color', default: '#8AB'},\n buttonHighlightColor: {type: 'color', default: '#2DF'}, // Light blue.\n model: {default: true},\n controllerType: {default: 'auto', oneOf: ['auto', 'oculus-touch', 'oculus-touch-v2', 'oculus-touch-v3']},\n orientationOffset: {type: 'vec3', default: {x: 43, y: 0, z: 0}}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self, self.data.hand); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self, self.data.hand); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self, self.data.hand); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self, self.data.hand); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.previousButtonValues = {};\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('axismove', this.onAxisMoved);\n el.addEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('axismove', this.onAxisMoved);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {\n hand: this.data.hand\n });\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n loadModel: function (controller) {\n var data = this.data;\n var controllerId;\n\n if (!data.model) { return; }\n // Set the controller display model based on the data passed in.\n this.displayModel = CONTROLLER_PROPERTIES[data.controllerType] || CONTROLLER_PROPERTIES[CONTROLLER_DEFAULT];\n // If the developer is asking for auto-detection, see if the displayName can be retrieved to identify the specific unit.\n // This only works for WebVR currently.\n if (data.controllerType === 'auto') {\n var trackedControlsSystem = this.el.sceneEl.systems['tracked-controls-webvr'];\n // WebVR\n if (trackedControlsSystem && trackedControlsSystem.vrDisplay) {\n var displayName = trackedControlsSystem.vrDisplay.displayName;\n // The Oculus Quest uses the updated generation 2 inside-out tracked controllers so update the displayModel.\n if (/^Oculus Quest$/.test(displayName)) {\n this.displayModel = CONTROLLER_PROPERTIES['oculus-touch-v2'];\n }\n } else { // WebXR\n controllerId = CONTROLLER_DEFAULT;\n controllerId = controller.profiles.indexOf('oculus-touch-v2') !== -1 ? 'oculus-touch-v2' : controllerId;\n controllerId = controller.profiles.indexOf('oculus-touch-v3') !== -1 ? 'oculus-touch-v3' : controllerId;\n this.displayModel = CONTROLLER_PROPERTIES[controllerId];\n }\n }\n var modelUrl = this.displayModel[data.hand].modelUrl;\n this.el.setAttribute('gltf-model', modelUrl);\n },\n\n injectTrackedControls: function (controller) {\n var data = this.data;\n var webXRId = GAMEPAD_ID_WEBXR;\n var webVRId = data.hand === 'right' ? 'Oculus Touch (Right)' : 'Oculus Touch (Left)';\n var id = isWebXRAvailable ? webXRId : webVRId;\n this.el.setAttribute('tracked-controls', {\n id: id,\n hand: data.hand,\n orientationOffset: data.orientationOffset,\n handTrackingEnabled: false\n });\n this.loadModel(controller);\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n // Note that due to gamepadconnected event propagation issues, we don't rely on events.\n this.checkIfControllerPresent();\n },\n\n onButtonChanged: function (evt) {\n var button = this.mapping[this.data.hand].buttons[evt.detail.id];\n var buttonMeshes = this.buttonMeshes;\n var analogValue;\n if (!button) { return; }\n\n if (button === 'trigger' || button === 'grip') { analogValue = evt.detail.state.value; }\n\n // Update trigger and/or grip meshes, if any.\n if (buttonMeshes) {\n if (button === 'trigger' && buttonMeshes.trigger) {\n buttonMeshes.trigger.rotation.x = this.originalXRotationTrigger - analogValue * (Math.PI / 26);\n }\n if (button === 'grip' && buttonMeshes.grip) {\n buttonMeshes.grip.position.x = this.originalXPositionGrip + (this.data.hand === 'left' ? -1 : 1) * analogValue * 0.004;\n }\n }\n\n // Pass along changed event with button state, using the buttom mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onModelLoaded: function (evt) {\n var controllerObject3D = this.controllerObject3D = evt.detail.model;\n var buttonMeshes;\n\n if (!this.data.model) { return; }\n\n buttonMeshes = this.buttonMeshes = {};\n\n buttonMeshes.grip = controllerObject3D.getObjectByName('buttonHand');\n this.originalXPositionGrip = buttonMeshes.grip && buttonMeshes.grip.position.x;\n buttonMeshes.thumbstick = controllerObject3D.getObjectByName('stick');\n buttonMeshes.trigger = controllerObject3D.getObjectByName('buttonTrigger');\n this.originalXRotationTrigger = buttonMeshes.trigger && buttonMeshes.trigger.rotation.x;\n buttonMeshes.xbutton = controllerObject3D.getObjectByName('buttonX');\n buttonMeshes.abutton = controllerObject3D.getObjectByName('buttonA');\n buttonMeshes.ybutton = controllerObject3D.getObjectByName('buttonY');\n buttonMeshes.bbutton = controllerObject3D.getObjectByName('buttonB');\n\n // Offset pivot point\n controllerObject3D.position.copy(this.displayModel[this.data.hand].modelPivotOffset);\n controllerObject3D.rotation.copy(this.displayModel[this.data.hand].modelPivotRotation);\n\n this.el.emit('controllermodelready', {\n name: 'oculus-touch-controls',\n model: this.data.model,\n rayOrigin: this.displayModel[this.data.hand].rayOrigin\n });\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping[this.data.hand].axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var button;\n var color = (state === 'up' || state === 'touchend') ? this.data.buttonColor : state === 'touchstart' ? this.data.buttonTouchColor : this.data.buttonHighlightColor;\n var buttonMeshes = this.buttonMeshes;\n if (!this.data.model) { return; }\n if (buttonMeshes && buttonMeshes[buttonName]) {\n button = buttonMeshes[buttonName];\n button.material.color.set(color);\n this.rendererSystem.applyColorCorrection(button.material.color);\n }\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],96:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nmodule.exports.Component = registerComponent('position', {\n schema: {type: 'vec3'},\n\n update: function () {\n var object3D = this.el.object3D;\n var data = this.data;\n object3D.position.set(data.x, data.y, data.z);\n },\n\n remove: function () {\n // Pretty much for mixins.\n this.el.object3D.position.set(0, 0, 0);\n }\n});\n\n},{\"../core/component\":131}],97:[function(_dereq_,module,exports){\n/* global MutationObserver */\n\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar warn = utils.debug('components:raycaster:warn');\n\n// Defines selectors that should be 'safe' for the MutationObserver used to\n// refresh the whitelist. Matches classnames, IDs, and presence of attributes.\n// Selectors for the value of an attribute, like [position=0 2 0], cannot be\n// reliably detected and are therefore disallowed.\nvar OBSERVER_SELECTOR_RE = /^[\\w\\s-.,[\\]#]*$/;\n\n// Configuration for the MutationObserver used to refresh the whitelist.\n// Listens for addition/removal of elements and attributes within the scene.\nvar OBSERVER_CONFIG = {\n childList: true,\n attributes: true,\n subtree: true\n};\n\nvar EVENTS = {\n INTERSECT: 'raycaster-intersected',\n INTERSECTION: 'raycaster-intersection',\n INTERSECT_CLEAR: 'raycaster-intersected-cleared',\n INTERSECTION_CLEAR: 'raycaster-intersection-cleared'\n};\n\n/**\n * Raycaster component.\n *\n * Pass options to three.js Raycaster including which objects to test.\n * Poll for intersections.\n * Emit event on origin entity and on target entity on intersect.\n *\n * @member {array} intersectedEls - List of currently intersected entities.\n * @member {array} objects - Cached list of meshes to intersect.\n * @member {number} prevCheckTime - Previous time intersection was checked. To help interval.\n * @member {object} raycaster - three.js Raycaster.\n */\nmodule.exports.Component = registerComponent('raycaster', {\n schema: {\n autoRefresh: {default: true},\n direction: {type: 'vec3', default: {x: 0, y: 0, z: -1}},\n enabled: {default: true},\n far: {default: 1000},\n interval: {default: 0},\n near: {default: 0},\n objects: {default: ''},\n origin: {type: 'vec3'},\n showLine: {default: false},\n lineColor: {default: 'white'},\n lineOpacity: {default: 1},\n useWorldCoordinates: {default: false}\n },\n\n multiple: true,\n\n init: function () {\n this.clearedIntersectedEls = [];\n this.unitLineEndVec3 = new THREE.Vector3();\n this.intersectedEls = [];\n this.intersections = [];\n this.newIntersectedEls = [];\n this.newIntersections = [];\n this.objects = [];\n this.prevCheckTime = undefined;\n this.prevIntersectedEls = [];\n this.rawIntersections = [];\n this.raycaster = new THREE.Raycaster();\n this.updateOriginDirection();\n this.setDirty = this.setDirty.bind(this);\n this.updateLine = this.updateLine.bind(this);\n this.observer = new MutationObserver(this.setDirty);\n this.dirty = true;\n this.lineEndVec3 = new THREE.Vector3();\n this.otherLineEndVec3 = new THREE.Vector3();\n this.lineData = {end: this.lineEndVec3};\n\n this.getIntersection = this.getIntersection.bind(this);\n this.intersectedDetail = {el: this.el, getIntersection: this.getIntersection};\n this.intersectedClearedDetail = {el: this.el};\n this.intersectionClearedDetail = {clearedEls: this.clearedIntersectedEls};\n this.intersectionDetail = {};\n },\n\n /**\n * Create or update raycaster object.\n */\n update: function (oldData) {\n var data = this.data;\n var el = this.el;\n var raycaster = this.raycaster;\n\n // Set raycaster properties.\n raycaster.far = data.far;\n raycaster.near = data.near;\n\n // Draw line.\n if (data.showLine &&\n (data.far !== oldData.far || data.origin !== oldData.origin ||\n data.direction !== oldData.direction || !oldData.showLine)) {\n // Calculate unit vector for line direction. Can be multiplied via scalar to performantly\n // adjust line length.\n this.unitLineEndVec3.copy(data.origin).add(data.direction).normalize();\n this.drawLine();\n }\n\n if (!data.showLine && oldData.showLine) {\n el.removeAttribute('line');\n }\n\n if (data.objects !== oldData.objects && !OBSERVER_SELECTOR_RE.test(data.objects)) {\n warn('[raycaster] Selector \"' + data.objects +\n '\" may not update automatically with DOM changes.');\n }\n\n if (!data.objects) {\n warn('[raycaster] For performance, please define raycaster.objects when using ' +\n 'raycaster or cursor components to whitelist which entities to intersect with. ' +\n 'e.g., raycaster=\"objects: [data-raycastable]\".');\n }\n\n if (data.autoRefresh !== oldData.autoRefresh && el.isPlaying) {\n data.autoRefresh\n ? this.addEventListeners()\n : this.removeEventListeners();\n }\n\n if (oldData.enabled && !data.enabled) { this.clearAllIntersections(); }\n\n this.setDirty();\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n },\n\n remove: function () {\n if (this.data.showLine) {\n this.el.removeAttribute('line');\n }\n this.clearAllIntersections();\n },\n\n addEventListeners: function () {\n if (!this.data.autoRefresh) { return; }\n this.observer.observe(this.el.sceneEl, OBSERVER_CONFIG);\n this.el.sceneEl.addEventListener('object3dset', this.setDirty);\n this.el.sceneEl.addEventListener('object3dremove', this.setDirty);\n },\n\n removeEventListeners: function () {\n this.observer.disconnect();\n this.el.sceneEl.removeEventListener('object3dset', this.setDirty);\n this.el.sceneEl.removeEventListener('object3dremove', this.setDirty);\n },\n\n /**\n * Mark the object list as dirty, to be refreshed before next raycast.\n */\n setDirty: function () {\n this.dirty = true;\n },\n\n /**\n * Update list of objects to test for intersection.\n */\n refreshObjects: function () {\n var data = this.data;\n var els;\n\n // If objects not defined, intersect with everything.\n els = data.objects\n ? this.el.sceneEl.querySelectorAll(data.objects)\n : this.el.sceneEl.querySelectorAll('*');\n this.objects = this.flattenObject3DMaps(els);\n this.dirty = false;\n },\n\n /**\n * Check for intersections and cleared intersections on an interval.\n */\n tock: function (time) {\n var data = this.data;\n var prevCheckTime = this.prevCheckTime;\n\n if (!data.enabled) { return; }\n\n // Only check for intersection if interval time has passed.\n if (prevCheckTime && (time - prevCheckTime < data.interval)) { return; }\n\n // Update check time.\n this.prevCheckTime = time;\n this.checkIntersections();\n },\n\n /**\n * Raycast for intersections and emit events for current and cleared intersections.\n */\n checkIntersections: function () {\n var clearedIntersectedEls = this.clearedIntersectedEls;\n var el = this.el;\n var data = this.data;\n var i;\n var intersectedEls = this.intersectedEls;\n var intersection;\n var intersections = this.intersections;\n var newIntersectedEls = this.newIntersectedEls;\n var newIntersections = this.newIntersections;\n var prevIntersectedEls = this.prevIntersectedEls;\n var rawIntersections = this.rawIntersections;\n\n // Refresh the object whitelist if needed.\n if (this.dirty) { this.refreshObjects(); }\n\n // Store old previously intersected entities.\n copyArray(this.prevIntersectedEls, this.intersectedEls);\n\n // Raycast.\n this.updateOriginDirection();\n rawIntersections.length = 0;\n this.raycaster.intersectObjects(this.objects, true, rawIntersections);\n\n // Only keep intersections against objects that have a reference to an entity.\n intersections.length = 0;\n intersectedEls.length = 0;\n for (i = 0; i < rawIntersections.length; i++) {\n intersection = rawIntersections[i];\n // Don't intersect with own line.\n if (data.showLine && intersection.object === el.getObject3D('line')) {\n continue;\n }\n if (intersection.object.el) {\n intersections.push(intersection);\n intersectedEls.push(intersection.object.el);\n }\n }\n\n // Get newly intersected entities.\n newIntersections.length = 0;\n newIntersectedEls.length = 0;\n for (i = 0; i < intersections.length; i++) {\n if (prevIntersectedEls.indexOf(intersections[i].object.el) === -1) {\n newIntersections.push(intersections[i]);\n newIntersectedEls.push(intersections[i].object.el);\n }\n }\n\n // Emit intersection cleared on both entities per formerly intersected entity.\n clearedIntersectedEls.length = 0;\n for (i = 0; i < prevIntersectedEls.length; i++) {\n if (intersectedEls.indexOf(prevIntersectedEls[i]) !== -1) { continue; }\n prevIntersectedEls[i].emit(EVENTS.INTERSECT_CLEAR,\n this.intersectedClearedDetail);\n clearedIntersectedEls.push(prevIntersectedEls[i]);\n }\n if (clearedIntersectedEls.length) {\n el.emit(EVENTS.INTERSECTION_CLEAR, this.intersectionClearedDetail);\n }\n\n // Emit intersected on intersected entity per intersected entity.\n for (i = 0; i < newIntersectedEls.length; i++) {\n newIntersectedEls[i].emit(EVENTS.INTERSECT, this.intersectedDetail);\n }\n\n // Emit all intersections at once on raycasting entity.\n if (newIntersections.length) {\n this.intersectionDetail.els = newIntersectedEls;\n this.intersectionDetail.intersections = newIntersections;\n el.emit(EVENTS.INTERSECTION, this.intersectionDetail);\n }\n\n // Update line length.\n if (data.showLine) { setTimeout(this.updateLine); }\n },\n\n updateLine: function () {\n var el = this.el;\n var intersections = this.intersections;\n var lineLength;\n\n if (intersections.length) {\n if (intersections[0].object.el === el && intersections[1]) {\n lineLength = intersections[1].distance;\n } else {\n lineLength = intersections[0].distance;\n }\n }\n this.drawLine(lineLength);\n },\n\n /**\n * Return the most recent intersection details for a given entity, if any.\n * @param {AEntity} el\n * @return {Object}\n */\n getIntersection: function (el) {\n var i;\n var intersection;\n for (i = 0; i < this.intersections.length; i++) {\n intersection = this.intersections[i];\n if (intersection.object.el === el) { return intersection; }\n }\n return null;\n },\n\n /**\n * Update origin and direction of raycaster using entity transforms and supplied origin or\n * direction offsets.\n */\n updateOriginDirection: (function () {\n var direction = new THREE.Vector3();\n var originVec3 = new THREE.Vector3();\n\n // Closure to make quaternion/vector3 objects private.\n return function updateOriginDirection () {\n var el = this.el;\n var data = this.data;\n\n if (data.useWorldCoordinates) {\n this.raycaster.set(data.origin, data.direction);\n return;\n }\n\n el.object3D.updateMatrixWorld();\n originVec3.setFromMatrixPosition(el.object3D.matrixWorld);\n\n // If non-zero origin, translate the origin into world space.\n if (data.origin.x !== 0 || data.origin.y !== 0 || data.origin.z !== 0) {\n originVec3 = el.object3D.localToWorld(originVec3.copy(data.origin));\n }\n\n // three.js raycaster direction is relative to 0, 0, 0 NOT the origin / offset we\n // provide. Apply the offset to the direction, then rotation from the object,\n // and normalize.\n direction.copy(data.direction).transformDirection(el.object3D.matrixWorld).normalize();\n\n // Apply offset and direction, in world coordinates.\n this.raycaster.set(originVec3, direction);\n };\n })(),\n\n /**\n * Create or update line to give raycaster visual representation.\n * Customize the line through through line component.\n * We draw the line in the raycaster component to customize the line to the\n * raycaster's origin, direction, and far.\n *\n * Unlike the raycaster, we create the line as a child of the object. The line will\n * be affected by the transforms of the objects, so we don't have to calculate transforms\n * like we do with the raycaster.\n *\n * @param {number} length - Length of line. Pass in to shorten the line to the intersection\n * point. If not provided, length will default to the max length, `raycaster.far`.\n */\n drawLine: function (length) {\n var data = this.data;\n var el = this.el;\n var endVec3;\n\n // Switch each time vector so line update triggered and to avoid unnecessary vector clone.\n endVec3 = this.lineData.end === this.lineEndVec3\n ? this.otherLineEndVec3\n : this.lineEndVec3;\n\n // Treat Infinity as 1000m for the line.\n if (length === undefined) {\n length = data.far === Infinity ? 1000 : data.far;\n }\n\n // Update the length of the line if given. `unitLineEndVec3` is the direction\n // given by data.direction, then we apply a scalar to give it a length.\n this.lineData.start = data.origin;\n this.lineData.end = endVec3.copy(this.unitLineEndVec3).multiplyScalar(length);\n this.lineData.color = data.lineColor;\n this.lineData.opacity = data.lineOpacity;\n el.setAttribute('line', this.lineData);\n },\n\n /**\n * Return A-Frame attachments of each element's object3D group (e.g., mesh).\n * Children are flattened by one level, removing the THREE.Group wrapper,\n * so that non-recursive raycasting remains useful.\n *\n * Only push children defined as component attachements (e.g., setObject3D),\n * NOT actual children in the scene graph hierarchy.\n *\n * @param {Array<Element>} els\n * @return {Array<THREE.Object3D>}\n */\n flattenObject3DMaps: function (els) {\n var key;\n var i;\n var objects = this.objects;\n\n // Push meshes and other attachments onto list of objects to intersect.\n objects.length = 0;\n for (i = 0; i < els.length; i++) {\n if (els[i].isEntity && els[i].object3D) {\n for (key in els[i].object3DMap) {\n objects.push(els[i].getObject3D(key));\n }\n }\n }\n\n return objects;\n },\n\n clearAllIntersections: function () {\n var i;\n for (i = 0; i < this.intersectedEls.length; i++) {\n this.intersectedEls[i].emit(EVENTS.INTERSECT_CLEAR,\n this.intersectedClearedDetail);\n }\n copyArray(this.clearedIntersectedEls, this.intersectedEls);\n this.intersectedEls.length = 0;\n this.intersections.length = 0;\n this.el.emit(EVENTS.INTERSECTION_CLEAR, this.intersectionClearedDetail);\n }\n});\n\n/**\n * Copy contents of one array to another without allocating new array.\n */\nfunction copyArray (a, b) {\n var i;\n a.length = b.length;\n for (i = 0; i < b.length; i++) {\n a[i] = b[i];\n }\n}\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205}],98:[function(_dereq_,module,exports){\nvar degToRad = _dereq_('../lib/three').Math.degToRad;\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nmodule.exports.Component = registerComponent('rotation', {\n schema: {type: 'vec3'},\n\n /**\n * Updates object3D rotation.\n */\n update: function () {\n var data = this.data;\n var object3D = this.el.object3D;\n object3D.rotation.set(degToRad(data.x), degToRad(data.y), degToRad(data.z));\n object3D.rotation.order = 'YXZ';\n },\n\n remove: function () {\n // Pretty much for mixins.\n this.el.object3D.rotation.set(0, 0, 0);\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179}],99:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\n// Avoids triggering a zero-determinant which makes object3D matrix non-invertible.\nvar zeroScale = 0.00001;\n\nmodule.exports.Component = registerComponent('scale', {\n schema: {\n type: 'vec3',\n default: {x: 1, y: 1, z: 1}\n },\n\n update: function () {\n var data = this.data;\n var object3D = this.el.object3D;\n var x = data.x === 0 ? zeroScale : data.x;\n var y = data.y === 0 ? zeroScale : data.y;\n var z = data.z === 0 ? zeroScale : data.z;\n object3D.scale.set(x, y, z);\n },\n\n remove: function () {\n // Pretty much for mixins.\n this.el.object3D.scale.set(1, 1, 1);\n }\n});\n\n},{\"../core/component\":131}],100:[function(_dereq_,module,exports){\n/* global THREE */\nvar register = _dereq_('../../core/component').registerComponent;\nvar COMPONENTS = _dereq_('../../core/component').components;\n\nmodule.exports.Component = register('background', {\n schema: {\n color: {type: 'color', default: 'black'},\n transparent: {default: false}\n },\n update: function () {\n var data = this.data;\n var object3D = this.el.object3D;\n if (data.transparent) {\n object3D.background = null;\n return;\n }\n object3D.background = new THREE.Color(data.color);\n },\n\n remove: function () {\n var data = this.data;\n var object3D = this.el.object3D;\n if (data.transparent) {\n object3D.background = null;\n return;\n }\n object3D.background = COMPONENTS[this.name].schema.color.default;\n }\n});\n\n},{\"../../core/component\":131}],101:[function(_dereq_,module,exports){\nvar register = _dereq_('../../core/component').registerComponent;\n\nmodule.exports.Component = register('debug', {\n schema: {default: true}\n});\n\n},{\"../../core/component\":131}],102:[function(_dereq_,module,exports){\n/* global DeviceOrientationEvent, location */\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar utils = _dereq_('../../utils/');\nvar bind = utils.bind;\n\nvar constants = _dereq_('../../constants/');\n\nvar MODAL_CLASS = 'a-modal';\nvar DIALOG_CLASS = 'a-dialog';\nvar DIALOG_TEXT_CLASS = 'a-dialog-text';\nvar DIALOG_TEXT_CONTAINER_CLASS = 'a-dialog-text-container';\nvar DIALOG_BUTTONS_CONTAINER_CLASS = 'a-dialog-buttons-container';\nvar DIALOG_BUTTON_CLASS = 'a-dialog-button';\nvar DIALOG_ALLOW_BUTTON_CLASS = 'a-dialog-allow-button';\nvar DIALOG_DENY_BUTTON_CLASS = 'a-dialog-deny-button';\nvar DIALOG_OK_BUTTON_CLASS = 'a-dialog-ok-button';\n\n/**\n * UI for enabling device motion permission\n */\nmodule.exports.Component = registerComponent('device-orientation-permission-ui', {\n schema: {\n enabled: {default: true},\n deviceMotionMessage: {\n default: 'This immersive website requires access to your device motion sensors.'\n },\n mobileDesktopMessage: {\n default: 'Set your browser to request the mobile version of the site and reload the page to enjoy immersive mode.'\n },\n httpsMessage: {\n default: 'Access this site over HTTPS to enter VR mode and grant access to the device sensors.'\n },\n denyButtonText: {default: 'Deny'},\n allowButtonText: {default: 'Allow'},\n cancelButtonText: {default: 'Cancel'}\n },\n\n init: function () {\n var self = this;\n\n if (!this.data.enabled) { return; }\n\n if (location.hostname !== 'localhost' &&\n location.hostname !== '127.0.0.1' &&\n location.protocol === 'http:') {\n this.showHTTPAlert();\n }\n\n // Show alert on iPad if Safari is on desktop mode.\n if (utils.device.isMobileDeviceRequestingDesktopSite()) {\n this.showMobileDesktopModeAlert();\n return;\n }\n\n // Browser doesn't support or doesn't require permission to DeviceOrientationEvent API.\n if (typeof DeviceOrientationEvent === 'undefined' || !DeviceOrientationEvent.requestPermission) {\n this.permissionGranted = true;\n return;\n }\n\n this.onDeviceMotionDialogAllowClicked = bind(this.onDeviceMotionDialogAllowClicked, this);\n this.onDeviceMotionDialogDenyClicked = bind(this.onDeviceMotionDialogDenyClicked, this);\n // Show dialog only if permission has not yet been granted.\n DeviceOrientationEvent.requestPermission().catch(function () {\n self.devicePermissionDialogEl = createPermissionDialog(\n self.data.denyButtonText,\n self.data.allowButtonText,\n self.data.deviceMotionMessage,\n self.onDeviceMotionDialogAllowClicked,\n self.onDeviceMotionDialogDenyClicked);\n self.el.appendChild(self.devicePermissionDialogEl);\n }).then(function () {\n self.el.emit('deviceorientationpermissiongranted');\n self.permissionGranted = true;\n });\n },\n\n remove: function () {\n // This removes the modal screen\n if (this.devicePermissionDialogEl) { this.el.removeChild(this.devicePermissionDialogEl); }\n },\n\n onDeviceMotionDialogDenyClicked: function () {\n this.remove();\n },\n\n showMobileDesktopModeAlert: function () {\n var self = this;\n var safariIpadAlertEl = createAlertDialog(\n self.data.cancelButtonText,\n self.data.mobileDesktopMessage,\n function () { self.el.removeChild(safariIpadAlertEl); });\n this.el.appendChild(safariIpadAlertEl);\n },\n\n showHTTPAlert: function () {\n var self = this;\n var httpAlertEl = createAlertDialog(\n self.data.cancelButtonText,\n self.data.httpsMessage,\n function () { self.el.removeChild(httpAlertEl); });\n this.el.appendChild(httpAlertEl);\n },\n\n /**\n * Enable device motion permission when clicked.\n */\n onDeviceMotionDialogAllowClicked: function () {\n var self = this;\n this.el.emit('deviceorientationpermissionrequested');\n DeviceOrientationEvent.requestPermission().then(function (response) {\n if (response === 'granted') {\n self.el.emit('deviceorientationpermissiongranted');\n self.permissionGranted = true;\n } else {\n self.el.emit('deviceorientationpermissionrejected');\n }\n self.remove();\n }).catch(console.error);\n }\n});\n\n/**\n * Create a modal dialog that request users permission to access the Device Motion API.\n *\n * @param {function} onAllowClicked - click event handler\n * @param {function} onDenyClicked - click event handler\n *\n * @returns {Element} Wrapper <div>.\n */\nfunction createPermissionDialog (\n denyText, allowText, dialogText, onAllowClicked, onDenyClicked) {\n var buttonsContainer;\n var denyButton;\n var acceptButton;\n\n buttonsContainer = document.createElement('div');\n buttonsContainer.classList.add(DIALOG_BUTTONS_CONTAINER_CLASS);\n\n // Buttons\n denyButton = document.createElement('button');\n denyButton.classList.add(DIALOG_BUTTON_CLASS, DIALOG_DENY_BUTTON_CLASS);\n denyButton.setAttribute(constants.AFRAME_INJECTED, '');\n denyButton.innerHTML = denyText;\n buttonsContainer.appendChild(denyButton);\n\n acceptButton = document.createElement('button');\n acceptButton.classList.add(DIALOG_BUTTON_CLASS, DIALOG_ALLOW_BUTTON_CLASS);\n acceptButton.setAttribute(constants.AFRAME_INJECTED, '');\n acceptButton.innerHTML = allowText;\n buttonsContainer.appendChild(acceptButton);\n\n // Ask for sensor events to be used\n acceptButton.addEventListener('click', function (evt) {\n evt.stopPropagation();\n onAllowClicked();\n });\n\n denyButton.addEventListener('click', function (evt) {\n evt.stopPropagation();\n onDenyClicked();\n });\n\n return createDialog(dialogText, buttonsContainer);\n}\n\nfunction createAlertDialog (closeText, dialogText, onOkClicked) {\n var buttonsContainer;\n var okButton;\n\n buttonsContainer = document.createElement('div');\n buttonsContainer.classList.add(DIALOG_BUTTONS_CONTAINER_CLASS);\n\n // Buttons\n okButton = document.createElement('button');\n okButton.classList.add(DIALOG_BUTTON_CLASS, DIALOG_OK_BUTTON_CLASS);\n okButton.setAttribute(constants.AFRAME_INJECTED, '');\n okButton.innerHTML = closeText;\n buttonsContainer.appendChild(okButton);\n\n // Ask for sensor events to be used\n okButton.addEventListener('click', function (evt) {\n evt.stopPropagation();\n onOkClicked();\n });\n\n return createDialog(dialogText, buttonsContainer);\n}\n\nfunction createDialog (text, buttonsContainerEl) {\n var modalContainer;\n var dialog;\n var dialogTextContainer;\n var dialogText;\n\n modalContainer = document.createElement('div');\n modalContainer.classList.add(MODAL_CLASS);\n modalContainer.setAttribute(constants.AFRAME_INJECTED, '');\n\n dialog = document.createElement('div');\n dialog.className = DIALOG_CLASS;\n dialog.setAttribute(constants.AFRAME_INJECTED, '');\n modalContainer.appendChild(dialog);\n\n dialogTextContainer = document.createElement('div');\n dialogTextContainer.classList.add(DIALOG_TEXT_CONTAINER_CLASS);\n dialog.appendChild(dialogTextContainer);\n\n dialogText = document.createElement('div');\n dialogText.classList.add(DIALOG_TEXT_CLASS);\n dialogText.innerHTML = text;\n dialogTextContainer.appendChild(dialogText);\n\n dialog.appendChild(buttonsContainerEl);\n\n return modalContainer;\n}\n\n},{\"../../constants/\":123,\"../../core/component\":131,\"../../utils/\":205}],103:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\n\n/**\n * Component to embed an a-frame scene within the layout of a 2D page.\n */\nmodule.exports.Component = registerComponent('embedded', {\n dependencies: ['vr-mode-ui'],\n\n schema: {default: true},\n\n update: function () {\n var sceneEl = this.el;\n var enterVREl = sceneEl.querySelector('.a-enter-vr');\n if (this.data === true) {\n if (enterVREl) { enterVREl.classList.add('embedded'); }\n sceneEl.removeFullScreenStyles();\n } else {\n if (enterVREl) { enterVREl.classList.remove('embedded'); }\n sceneEl.addFullScreenStyles();\n }\n }\n\n});\n\n},{\"../../core/component\":131}],104:[function(_dereq_,module,exports){\nvar register = _dereq_('../../core/component').registerComponent;\nvar THREE = _dereq_('../../lib/three');\nvar debug = _dereq_('../../utils/debug');\n\nvar warn = debug('components:fog:warn');\n\n/**\n * Fog component.\n * Applies only to the scene entity.\n */\nmodule.exports.Component = register('fog', {\n schema: {\n color: {type: 'color', default: '#000'},\n density: {default: 0.00025},\n far: {default: 1000, min: 0},\n near: {default: 1, min: 0},\n type: {default: 'linear', oneOf: ['linear', 'exponential']}\n },\n\n update: function () {\n var data = this.data;\n var el = this.el;\n var fog = this.el.object3D.fog;\n\n if (!el.isScene) {\n warn('Fog component can only be applied to <a-scene>');\n return;\n }\n\n // (Re)create fog if fog doesn't exist or fog type changed.\n if (!fog || data.type !== fog.name) {\n el.object3D.fog = getFog(data);\n el.systems.material.updateMaterials();\n return;\n }\n\n // Fog data changed. Update fog.\n Object.keys(this.schema).forEach(function (key) {\n var value = data[key];\n if (key === 'color') { value = new THREE.Color(value); }\n fog[key] = value;\n });\n },\n\n /**\n * Remove fog on remove (callback).\n */\n remove: function () {\n var fog = this.el.object3D.fog;\n if (!fog) { return; }\n fog.far = 0;\n fog.near = 0.1;\n }\n});\n\n/**\n * Creates a fog object. Sets fog.name to be able to detect fog type changes.\n *\n * @param {object} data - Fog data.\n * @returns {object} fog\n */\nfunction getFog (data) {\n var fog;\n if (data.type === 'exponential') {\n fog = new THREE.FogExp2(data.color, data.density);\n } else {\n fog = new THREE.Fog(data.color, data.near, data.far);\n }\n fog.name = data.type;\n return fog;\n}\n\n},{\"../../core/component\":131,\"../../lib/three\":179,\"../../utils/debug\":201}],105:[function(_dereq_,module,exports){\n(function (process){\n/* global AFRAME */\nvar AFRAME_INJECTED = _dereq_('../../constants').AFRAME_INJECTED;\nvar pkg = _dereq_('../../../package');\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar utils = _dereq_('../../utils/');\n\n/**\n * 0.4.2 to 0.4.x\n * Will need to update this when A-Frame goes to 1.x.x.\n */\nfunction getFuzzyPatchVersion (version) {\n var split = version.split('.');\n split[2] = 'x';\n return split.join('.');\n}\n\nvar INSPECTOR_DEV_URL = 'https://aframe.io/aframe-inspector/dist/aframe-inspector.js';\nvar INSPECTOR_RELEASE_URL = 'https://unpkg.com/aframe-inspector@' + getFuzzyPatchVersion(pkg.version) + '/dist/aframe-inspector.min.js';\nvar INSPECTOR_URL = process.env.INSPECTOR_VERSION === 'dev' ? INSPECTOR_DEV_URL : INSPECTOR_RELEASE_URL;\nvar LOADING_MESSAGE = 'Loading Inspector';\nvar LOADING_ERROR_MESSAGE = 'Error loading Inspector';\n\nmodule.exports.Component = registerComponent('inspector', {\n schema: {\n url: {default: INSPECTOR_URL}\n },\n\n init: function () {\n this.firstPlay = true;\n this.onKeydown = this.onKeydown.bind(this);\n this.onMessage = this.onMessage.bind(this);\n this.initOverlay();\n window.addEventListener('keydown', this.onKeydown);\n window.addEventListener('message', this.onMessage);\n },\n\n play: function () {\n var urlParam;\n if (!this.firstPlay) { return; }\n urlParam = utils.getUrlParameter('inspector');\n if (urlParam !== 'false' && !!urlParam) {\n this.openInspector();\n this.firstPlay = false;\n }\n },\n\n initOverlay: function () {\n var dotsHTML = '<span class=\"dots\"><span>.</span><span>.</span><span>.</span></span>';\n this.loadingMessageEl = document.createElement('div');\n this.loadingMessageEl.classList.add('a-inspector-loader');\n this.loadingMessageEl.innerHTML = LOADING_MESSAGE + dotsHTML;\n },\n\n remove: function () {\n this.removeEventListeners();\n },\n\n /**\n * <ctrl> + <alt> + i keyboard shortcut.\n */\n onKeydown: function (evt) {\n var shortcutPressed = evt.keyCode === 73 && (evt.ctrlKey && evt.altKey || evt.getModifierState('AltGraph'));\n if (!shortcutPressed) { return; }\n this.openInspector();\n },\n\n showLoader: function () {\n document.body.appendChild(this.loadingMessageEl);\n },\n\n hideLoader: function () {\n document.body.removeChild(this.loadingMessageEl);\n },\n\n /**\n * postMessage. aframe.io uses this to create a button on examples to open Inspector.\n */\n onMessage: function (evt) {\n if (evt.data === 'INJECT_AFRAME_INSPECTOR') { this.openInspector(); }\n },\n\n openInspector: function (focusEl) {\n var self = this;\n var script;\n\n // Already injected. Open.\n if (AFRAME.INSPECTOR || AFRAME.inspectorInjected) {\n AFRAME.INSPECTOR.open(focusEl);\n return;\n }\n\n this.showLoader();\n\n // Inject.\n script = document.createElement('script');\n script.src = this.data.url;\n script.setAttribute('data-name', 'aframe-inspector');\n script.setAttribute(AFRAME_INJECTED, '');\n script.onload = function () {\n AFRAME.INSPECTOR.open(focusEl);\n self.hideLoader();\n self.removeEventListeners();\n };\n script.onerror = function () {\n self.loadingMessageEl.innerHTML = LOADING_ERROR_MESSAGE;\n };\n document.head.appendChild(script);\n AFRAME.inspectorInjected = true;\n },\n\n removeEventListeners: function () {\n window.removeEventListener('keydown', this.onKeydown);\n window.removeEventListener('message', this.onMessage);\n }\n});\n\n}).call(this,_dereq_('_process'))\n\n},{\"../../../package\":73,\"../../constants\":123,\"../../core/component\":131,\"../../utils/\":205,\"_process\":49}],106:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar shouldCaptureKeyEvent = _dereq_('../../utils/').shouldCaptureKeyEvent;\n\nmodule.exports.Component = registerComponent('keyboard-shortcuts', {\n schema: {\n enterVR: {default: true},\n exitVR: {default: true}\n },\n\n init: function () {\n this.onKeyup = this.onKeyup.bind(this);\n },\n\n update: function (oldData) {\n var data = this.data;\n this.enterVREnabled = data.enterVR;\n },\n\n play: function () {\n window.addEventListener('keyup', this.onKeyup, false);\n },\n\n pause: function () {\n window.removeEventListener('keyup', this.onKeyup);\n },\n\n onKeyup: function (evt) {\n var scene = this.el;\n if (!shouldCaptureKeyEvent(evt)) { return; }\n if (this.enterVREnabled && evt.keyCode === 70) { // f.\n scene.enterVR();\n }\n if (this.enterVREnabled && evt.keyCode === 27) { // escape.\n scene.exitVR();\n }\n }\n});\n\n},{\"../../core/component\":131,\"../../utils/\":205}],107:[function(_dereq_,module,exports){\nvar debug = _dereq_('../../utils/debug');\nvar registerComponent = _dereq_('../../core/component').registerComponent;\n\nvar warn = debug('components:pool:warn');\n\n/**\n * Pool component to reuse entities.\n * Avoids creating and destroying the same kind of entities.\n * Helps reduce GC pauses. For example in a game to reuse enemies entities.\n *\n * @member {array} availableEls - Available entities in the pool.\n * @member {array} usedEls - Entities of the pool in use.\n */\nmodule.exports.Component = registerComponent('pool', {\n schema: {\n container: {default: ''},\n mixin: {default: ''},\n size: {default: 0},\n dynamic: {default: false}\n },\n\n multiple: true,\n\n initPool: function () {\n var i;\n\n this.availableEls = [];\n this.usedEls = [];\n\n if (!this.data.mixin) {\n warn('No mixin provided for pool component.');\n }\n\n if (this.data.container) {\n this.container = document.querySelector(this.data.container);\n if (!this.container) {\n warn('Container ' + this.data.container + ' not found.');\n }\n }\n this.container = this.container || this.el;\n\n for (i = 0; i < this.data.size; ++i) {\n this.createEntity();\n }\n },\n\n update: function (oldData) {\n var data = this.data;\n if (oldData.mixin !== data.mixin || oldData.size !== data.size) {\n this.initPool();\n }\n },\n\n /**\n * Add a new entity to the list of available entities.\n */\n createEntity: function () {\n var el;\n el = document.createElement('a-entity');\n el.play = this.wrapPlay(el.play);\n el.setAttribute('mixin', this.data.mixin);\n el.object3D.visible = false;\n el.pause();\n this.container.appendChild(el);\n this.availableEls.push(el);\n },\n\n /**\n * Play wrapper for pooled entities. When pausing and playing a scene, don't want to play\n * entities that are not in use.\n */\n wrapPlay: function (playMethod) {\n var usedEls = this.usedEls;\n return function () {\n if (usedEls.indexOf(this) === -1) { return; }\n playMethod.call(this);\n };\n },\n\n /**\n * Used to request one of the available entities of the pool.\n */\n requestEntity: function () {\n var el;\n if (this.availableEls.length === 0) {\n if (this.data.dynamic === false) {\n warn('Requested entity from empty pool: ' + this.attrName);\n return;\n } else {\n warn('Requested entity from empty pool. This pool is dynamic and will resize ' +\n 'automatically. You might want to increase its initial size: ' + this.attrName);\n }\n this.createEntity();\n }\n el = this.availableEls.shift();\n this.usedEls.push(el);\n el.object3D.visible = true;\n return el;\n },\n\n /**\n * Used to return a used entity to the pool.\n */\n returnEntity: function (el) {\n var index = this.usedEls.indexOf(el);\n if (index === -1) {\n warn('The returned entity was not previously pooled from ' + this.attrName);\n return;\n }\n this.usedEls.splice(index, 1);\n this.availableEls.push(el);\n el.object3D.visible = false;\n el.pause();\n return el;\n }\n});\n\n},{\"../../core/component\":131,\"../../utils/debug\":201}],108:[function(_dereq_,module,exports){\n/* global ImageData, URL */\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar THREE = _dereq_('../../lib/three');\n\nvar VERTEX_SHADER = [\n 'attribute vec3 position;',\n 'attribute vec2 uv;',\n 'uniform mat4 projectionMatrix;',\n 'uniform mat4 modelViewMatrix;',\n 'varying vec2 vUv;',\n 'void main() {',\n ' vUv = vec2( 1.- uv.x, uv.y );',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );',\n '}'\n].join('\\n');\n\nvar FRAGMENT_SHADER = [\n 'precision mediump float;',\n 'uniform samplerCube map;',\n 'varying vec2 vUv;',\n '#define M_PI 3.141592653589793238462643383279',\n 'void main() {',\n ' vec2 uv = vUv;',\n ' float longitude = uv.x * 2. * M_PI - M_PI + M_PI / 2.;',\n ' float latitude = uv.y * M_PI;',\n ' vec3 dir = vec3(',\n ' - sin( longitude ) * sin( latitude ),',\n ' cos( latitude ),',\n ' - cos( longitude ) * sin( latitude )',\n ' );',\n ' normalize( dir );',\n ' gl_FragColor = vec4( textureCube( map, dir ).rgb, 1.0 );',\n '}'\n].join('\\n');\n\n/**\n * Component to take screenshots of the scene using a keboard shortcut (alt+s).\n * It can be configured to either take 360° captures (`equirectangular`)\n * or regular screenshots (`projection`)\n *\n * This is based on https://github.com/spite/THREE.CubemapToEquirectangular\n * To capture an equirectangular projection of the scene a THREE.CubeCamera is used\n * The cube map produced by the CubeCamera is projected on a quad and then rendered to\n * WebGLRenderTarget with an ortographic camera.\n */\nmodule.exports.Component = registerComponent('screenshot', {\n schema: {\n width: {default: 4096},\n height: {default: 2048},\n camera: {type: 'selector'}\n },\n\n init: function () {\n var el = this.el;\n var self = this;\n\n if (el.renderer) {\n setup();\n } else {\n el.addEventListener('render-target-loaded', setup);\n }\n\n function setup () {\n var gl = el.renderer.getContext();\n if (!gl) { return; }\n self.cubeMapSize = gl.getParameter(gl.MAX_CUBE_MAP_TEXTURE_SIZE);\n self.material = new THREE.RawShaderMaterial({\n uniforms: {map: {type: 't', value: null}},\n vertexShader: VERTEX_SHADER,\n fragmentShader: FRAGMENT_SHADER,\n side: THREE.DoubleSide\n });\n self.quad = new THREE.Mesh(\n new THREE.PlaneBufferGeometry(1, 1),\n self.material\n );\n self.quad.visible = false;\n self.camera = new THREE.OrthographicCamera(-1 / 2, 1 / 2, 1 / 2, -1 / 2, -10000, 10000);\n self.canvas = document.createElement('canvas');\n self.ctx = self.canvas.getContext('2d');\n el.object3D.add(self.quad);\n self.onKeyDown = self.onKeyDown.bind(self);\n }\n },\n\n getRenderTarget: function (width, height) {\n return new THREE.WebGLRenderTarget(width, height, {\n minFilter: THREE.LinearFilter,\n magFilter: THREE.LinearFilter,\n wrapS: THREE.ClampToEdgeWrapping,\n wrapT: THREE.ClampToEdgeWrapping,\n format: THREE.RGBAFormat,\n type: THREE.UnsignedByteType\n });\n },\n\n resize: function (width, height) {\n // Resize quad.\n this.quad.scale.set(width, height, 1);\n\n // Resize camera.\n this.camera.left = -1 * width / 2;\n this.camera.right = width / 2;\n this.camera.top = height / 2;\n this.camera.bottom = -1 * height / 2;\n this.camera.updateProjectionMatrix();\n\n // Resize canvas.\n this.canvas.width = width;\n this.canvas.height = height;\n },\n\n play: function () {\n window.addEventListener('keydown', this.onKeyDown);\n },\n\n /**\n * <ctrl> + <alt> + s = Regular screenshot.\n * <ctrl> + <alt> + <shift> + s = Equirectangular screenshot.\n */\n onKeyDown: function (evt) {\n var shortcutPressed = evt.keyCode === 83 && evt.ctrlKey && evt.altKey;\n if (!this.data || !shortcutPressed) { return; }\n var projection = evt.shiftKey ? 'equirectangular' : 'perspective';\n this.capture(projection);\n },\n\n /**\n * Capture a screenshot of the scene.\n *\n * @param {string} projection - Screenshot projection (equirectangular or perspective).\n */\n setCapture: function (projection) {\n var el = this.el;\n var size;\n var camera;\n var cubeCamera;\n var cubeRenderTarget;\n // Configure camera.\n if (projection === 'perspective') {\n // Quad is only used in equirectangular mode. Hide it in this case.\n this.quad.visible = false;\n // Use scene camera.\n camera = (this.data.camera && this.data.camera.components.camera.camera) || el.camera;\n size = {width: this.data.width, height: this.data.height};\n } else {\n // Use ortho camera.\n camera = this.camera;\n cubeRenderTarget = new THREE.WebGLCubeRenderTarget(\n Math.min(this.cubeMapSize, 2048),\n {\n format: THREE.RGBFormat,\n generateMipmaps: true,\n minFilter: THREE.LinearMipmapLinearFilter,\n encoding: THREE.sRGBEncoding\n });\n // Create cube camera and copy position from scene camera.\n cubeCamera = new THREE.CubeCamera(el.camera.near, el.camera.far, cubeRenderTarget);\n // Copy camera position into cube camera;\n el.camera.getWorldPosition(cubeCamera.position);\n el.camera.getWorldQuaternion(cubeCamera.quaternion);\n // Render scene with cube camera.\n cubeCamera.update(el.renderer, el.object3D);\n this.quad.material.uniforms.map.value = cubeCamera.renderTarget.texture;\n size = {width: this.data.width, height: this.data.height};\n // Use quad to project image taken by the cube camera.\n this.quad.visible = true;\n }\n return {\n camera: camera,\n size: size,\n projection: projection\n };\n },\n\n /**\n * Maintained for backwards compatibility.\n */\n capture: function (projection) {\n var isVREnabled = this.el.renderer.xr.enabled;\n var renderer = this.el.renderer;\n var params;\n // Disable VR.\n renderer.xr.enabled = false;\n params = this.setCapture(projection);\n this.renderCapture(params.camera, params.size, params.projection);\n // Trigger file download.\n this.saveCapture();\n // Restore VR.\n renderer.xr.enabled = isVREnabled;\n },\n\n /**\n * Return canvas instead of triggering download (e.g., for uploading blob to server).\n */\n getCanvas: function (projection) {\n var isVREnabled = this.el.renderer.xr.enabled;\n var renderer = this.el.renderer;\n // Disable VR.\n var params = this.setCapture(projection);\n renderer.xr.enabled = false;\n this.renderCapture(params.camera, params.size, params.projection);\n // Restore VR.\n renderer.xr.enabled = isVREnabled;\n return this.canvas;\n },\n\n renderCapture: function (camera, size, projection) {\n var autoClear = this.el.renderer.autoClear;\n var el = this.el;\n var imageData;\n var output;\n var pixels;\n var renderer = el.renderer;\n // Create rendering target and buffer to store the read pixels.\n output = this.getRenderTarget(size.width, size.height);\n pixels = new Uint8Array(4 * size.width * size.height);\n // Resize quad, camera, and canvas.\n this.resize(size.width, size.height);\n // Render scene to render target.\n renderer.autoClear = true;\n renderer.clear();\n renderer.setRenderTarget(output);\n renderer.render(el.object3D, camera);\n renderer.autoClear = autoClear;\n // Read image pizels back.\n renderer.readRenderTargetPixels(output, 0, 0, size.width, size.height, pixels);\n renderer.setRenderTarget(null);\n if (projection === 'perspective') {\n pixels = this.flipPixelsVertically(pixels, size.width, size.height);\n }\n imageData = new ImageData(new Uint8ClampedArray(pixels), size.width, size.height);\n // Hide quad after projecting the image.\n this.quad.visible = false;\n // Copy pixels into canvas.\n this.ctx.putImageData(imageData, 0, 0);\n },\n\n flipPixelsVertically: function (pixels, width, height) {\n var flippedPixels = pixels.slice(0);\n for (var x = 0; x < width; ++x) {\n for (var y = 0; y < height; ++y) {\n flippedPixels[x * 4 + y * width * 4] = pixels[x * 4 + (height - y) * width * 4];\n flippedPixels[x * 4 + 1 + y * width * 4] = pixels[x * 4 + 1 + (height - y) * width * 4];\n flippedPixels[x * 4 + 2 + y * width * 4] = pixels[x * 4 + 2 + (height - y) * width * 4];\n flippedPixels[x * 4 + 3 + y * width * 4] = pixels[x * 4 + 3 + (height - y) * width * 4];\n }\n }\n return flippedPixels;\n },\n\n /**\n * Download capture to file.\n */\n saveCapture: function () {\n this.canvas.toBlob(function (blob) {\n var fileName = 'screenshot-' + document.title.toLowerCase() + '-' + Date.now() + '.png';\n var linkEl = document.createElement('a');\n var url = URL.createObjectURL(blob);\n linkEl.href = url;\n linkEl.setAttribute('download', fileName);\n linkEl.innerHTML = 'downloading...';\n linkEl.style.display = 'none';\n document.body.appendChild(linkEl);\n setTimeout(function () {\n linkEl.click();\n document.body.removeChild(linkEl);\n }, 1);\n }, 'image/png');\n }\n});\n\n},{\"../../core/component\":131,\"../../lib/three\":179}],109:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar RStats = _dereq_('../../../vendor/rStats');\nvar utils = _dereq_('../../utils');\n_dereq_('../../../vendor/rStats.extras');\n_dereq_('../../lib/rStatsAframe');\n\nvar AFrameStats = window.aframeStats;\nvar bind = utils.bind;\nvar HIDDEN_CLASS = 'a-hidden';\nvar ThreeStats = window.threeStats;\n\n/**\n * Stats appended to document.body by RStats.\n */\nmodule.exports.Component = registerComponent('stats', {\n schema: {default: true},\n\n init: function () {\n var scene = this.el;\n\n if (utils.getUrlParameter('stats') === 'false') { return; }\n\n this.stats = createStats(scene);\n this.statsEl = document.querySelector('.rs-base');\n\n this.hideBound = bind(this.hide, this);\n this.showBound = bind(this.show, this);\n\n scene.addEventListener('enter-vr', this.hideBound);\n scene.addEventListener('exit-vr', this.showBound);\n },\n\n update: function () {\n if (!this.stats) { return; }\n return (!this.data) ? this.hide() : this.show();\n },\n\n remove: function () {\n this.el.removeEventListener('enter-vr', this.hideBound);\n this.el.removeEventListener('exit-vr', this.showBound);\n if (!this.statsEl) { return; } // Scene detached.\n this.statsEl.parentNode.removeChild(this.statsEl);\n },\n\n tick: function () {\n var stats = this.stats;\n\n if (!stats) { return; }\n\n stats('rAF').tick();\n stats('FPS').frame();\n stats().update();\n },\n\n hide: function () {\n this.statsEl.classList.add(HIDDEN_CLASS);\n },\n\n show: function () {\n this.statsEl.classList.remove(HIDDEN_CLASS);\n }\n});\n\nfunction createStats (scene) {\n var threeStats = new ThreeStats(scene.renderer);\n var aframeStats = new AFrameStats(scene);\n var plugins = scene.isMobile ? [] : [threeStats, aframeStats];\n return new RStats({\n css: [], // Our stylesheet is injected from `src/index.js`.\n values: {\n fps: {caption: 'fps', below: 30}\n },\n groups: [\n {caption: 'Framerate', values: ['fps', 'raf']}\n ],\n plugins: plugins\n });\n}\n\n},{\"../../../vendor/rStats\":217,\"../../../vendor/rStats.extras\":216,\"../../core/component\":131,\"../../lib/rStatsAframe\":178,\"../../utils\":205}],110:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar constants = _dereq_('../../constants/');\nvar utils = _dereq_('../../utils/');\nvar bind = utils.bind;\n\nvar ENTER_VR_CLASS = 'a-enter-vr';\nvar ENTER_AR_CLASS = 'a-enter-ar';\nvar ENTER_VR_BTN_CLASS = 'a-enter-vr-button';\nvar ENTER_AR_BTN_CLASS = 'a-enter-ar-button';\nvar HIDDEN_CLASS = 'a-hidden';\nvar ORIENTATION_MODAL_CLASS = 'a-orientation-modal';\n\n/**\n * UI for entering VR mode.\n */\nmodule.exports.Component = registerComponent('vr-mode-ui', {\n dependencies: ['canvas'],\n\n schema: {\n enabled: {default: true},\n enterVRButton: {default: ''},\n enterARButton: {default: ''}\n },\n\n init: function () {\n var self = this;\n var sceneEl = this.el;\n\n if (utils.getUrlParameter('ui') === 'false') { return; }\n\n this.insideLoader = false;\n this.enterVREl = null;\n this.enterAREl = null;\n this.orientationModalEl = null;\n this.bindMethods();\n\n // Hide/show VR UI when entering/exiting VR mode.\n sceneEl.addEventListener('enter-vr', this.updateEnterInterfaces);\n sceneEl.addEventListener('exit-vr', this.updateEnterInterfaces);\n sceneEl.addEventListener('update-vr-devices', this.updateEnterInterfaces);\n\n window.addEventListener('message', function (event) {\n if (event.data.type === 'loaderReady') {\n self.insideLoader = true;\n self.remove();\n }\n });\n\n // Modal that tells the user to change orientation if in portrait.\n window.addEventListener('orientationchange', this.toggleOrientationModalIfNeeded);\n },\n\n bindMethods: function () {\n this.onEnterVRButtonClick = bind(this.onEnterVRButtonClick, this);\n this.onEnterARButtonClick = bind(this.onEnterARButtonClick, this);\n this.onModalClick = bind(this.onModalClick, this);\n this.toggleOrientationModalIfNeeded = bind(this.toggleOrientationModalIfNeeded, this);\n this.updateEnterInterfaces = bind(this.updateEnterInterfaces, this);\n },\n\n /**\n * Exit VR when modal clicked.\n */\n onModalClick: function () {\n this.el.exitVR();\n },\n\n /**\n * Enter VR when clicked.\n */\n onEnterVRButtonClick: function () {\n this.el.enterVR();\n },\n\n /**\n * Enter AR when clicked.\n */\n onEnterARButtonClick: function () {\n this.el.enterAR();\n },\n\n update: function () {\n var data = this.data;\n var sceneEl = this.el;\n\n if (!data.enabled || this.insideLoader || utils.getUrlParameter('ui') === 'false') {\n return this.remove();\n }\n\n if (this.enterVREl || this.enterAREl || this.orientationModalEl) { return; }\n\n // Add UI if enabled and not already present.\n if (data.enterVRButton) {\n // Custom button.\n this.enterVREl = document.querySelector(data.enterVRButton);\n this.enterVREl.addEventListener('click', this.onEnterVRButtonClick);\n } else {\n this.enterVREl = createEnterVRButton(this.onEnterVRButtonClick);\n sceneEl.appendChild(this.enterVREl);\n }\n if (data.enterARButton) {\n // Custom button.\n this.enterAREl = document.querySelector(data.enterARButton);\n this.enterAREl.addEventListener('click', this.onEnterARButtonClick);\n } else {\n this.enterAREl = createEnterARButton(this.onEnterARButtonClick);\n sceneEl.appendChild(this.enterAREl);\n }\n\n this.orientationModalEl = createOrientationModal(this.onModalClick);\n sceneEl.appendChild(this.orientationModalEl);\n\n this.updateEnterInterfaces();\n },\n\n remove: function () {\n [this.enterVREl, this.enterAREl, this.orientationModalEl].forEach(function (uiElement) {\n if (uiElement && uiElement.parentNode) {\n uiElement.parentNode.removeChild(uiElement);\n }\n });\n this.enterVREl = undefined;\n this.enterAREl = undefined;\n this.orientationModalEl = undefined;\n },\n\n updateEnterInterfaces: function () {\n this.toggleEnterVRButtonIfNeeded();\n this.toggleEnterARButtonIfNeeded();\n this.toggleOrientationModalIfNeeded();\n },\n\n toggleEnterVRButtonIfNeeded: function () {\n var sceneEl = this.el;\n if (!this.enterVREl) { return; }\n if (sceneEl.is('vr-mode')) {\n this.enterVREl.classList.add(HIDDEN_CLASS);\n } else {\n this.enterVREl.classList.remove(HIDDEN_CLASS);\n }\n },\n\n toggleEnterARButtonIfNeeded: function () {\n var sceneEl = this.el;\n if (!this.enterAREl) { return; }\n // Hide the button while in a session, or if AR is not supported.\n if (sceneEl.is('vr-mode') || !utils.device.checkARSupport()) {\n this.enterAREl.classList.add(HIDDEN_CLASS);\n } else {\n this.enterAREl.classList.remove(HIDDEN_CLASS);\n }\n },\n\n toggleOrientationModalIfNeeded: function () {\n var sceneEl = this.el;\n var orientationModalEl = this.orientationModalEl;\n if (!orientationModalEl || !sceneEl.isMobile) { return; }\n if (!utils.device.isLandscape() && sceneEl.is('vr-mode')) {\n // Show if in VR mode on portrait.\n orientationModalEl.classList.remove(HIDDEN_CLASS);\n } else {\n orientationModalEl.classList.add(HIDDEN_CLASS);\n }\n }\n});\n\n/**\n * Create a button that when clicked will enter into stereo-rendering mode for VR.\n *\n * Structure: <div><button></div>\n *\n * @param {function} onClick - click event handler\n * @returns {Element} Wrapper <div>.\n */\nfunction createEnterVRButton (onClick) {\n var vrButton;\n var wrapper;\n\n // Create elements.\n wrapper = document.createElement('div');\n wrapper.classList.add(ENTER_VR_CLASS);\n wrapper.setAttribute(constants.AFRAME_INJECTED, '');\n vrButton = document.createElement('button');\n vrButton.className = ENTER_VR_BTN_CLASS;\n vrButton.setAttribute('title',\n 'Enter VR mode with a headset or fullscreen mode on a desktop. ' +\n 'Visit https://webvr.rocks or https://webvr.info for more information.');\n vrButton.setAttribute(constants.AFRAME_INJECTED, '');\n if (utils.device.isMobile()) { applyStickyHoverFix(vrButton); }\n // Insert elements.\n wrapper.appendChild(vrButton);\n vrButton.addEventListener('click', function (evt) {\n onClick();\n evt.stopPropagation();\n });\n return wrapper;\n}\n\n/**\n * Create a button that when clicked will enter into AR mode\n *\n * Structure: <div><button></div>\n *\n * @param {function} onClick - click event handler\n * @returns {Element} Wrapper <div>.\n */\nfunction createEnterARButton (onClick) {\n var arButton;\n var wrapper;\n\n // Create elements.\n wrapper = document.createElement('div');\n wrapper.classList.add(ENTER_AR_CLASS);\n wrapper.setAttribute(constants.AFRAME_INJECTED, '');\n arButton = document.createElement('button');\n arButton.className = ENTER_AR_BTN_CLASS;\n arButton.setAttribute('title',\n 'Enter AR mode with a headset or handheld device. ' +\n 'Visit https://webvr.rocks or https://webvr.info for more information.');\n arButton.setAttribute(constants.AFRAME_INJECTED, '');\n if (utils.device.isMobile()) { applyStickyHoverFix(arButton); }\n // Insert elements.\n wrapper.appendChild(arButton);\n arButton.addEventListener('click', function (evt) {\n onClick();\n evt.stopPropagation();\n });\n return wrapper;\n}\n\n/**\n * Creates a modal dialog to request the user to switch to landscape orientation.\n *\n * @param {function} onClick - click event handler\n * @returns {Element} Wrapper <div>.\n */\nfunction createOrientationModal (onClick) {\n var modal = document.createElement('div');\n modal.className = ORIENTATION_MODAL_CLASS;\n modal.classList.add(HIDDEN_CLASS);\n modal.setAttribute(constants.AFRAME_INJECTED, '');\n\n var exit = document.createElement('button');\n exit.setAttribute(constants.AFRAME_INJECTED, '');\n exit.innerHTML = 'Exit VR';\n\n // Exit VR on close.\n exit.addEventListener('click', onClick);\n\n modal.appendChild(exit);\n\n return modal;\n}\n\n/**\n * CSS hover state is sticky in iOS (as in 12/18/2019)\n * They are not removed on mouseleave and this function applies a class\n * to resets the style.\n *\n * @param {function} buttonEl - Button element\n */\nfunction applyStickyHoverFix (buttonEl) {\n buttonEl.addEventListener('touchstart', function () {\n buttonEl.classList.remove('resethover');\n });\n buttonEl.addEventListener('touchend', function () {\n buttonEl.classList.add('resethover');\n });\n}\n\n},{\"../../constants/\":123,\"../../core/component\":131,\"../../utils/\":205}],111:[function(_dereq_,module,exports){\nvar component = _dereq_('../core/component');\nvar THREE = _dereq_('../lib/three');\nvar bind = _dereq_('../utils/bind');\nvar registerComponent = component.registerComponent;\n\n/**\n * Shadow component.\n *\n * When applied to an entity, that entity's geometry and any descendants will cast or receive\n * shadows as specified by the `cast` and `receive` properties.\n */\nmodule.exports.Component = registerComponent('shadow', {\n schema: {\n cast: {default: true},\n receive: {default: true}\n },\n\n init: function () {\n this.onMeshChanged = bind(this.update, this);\n this.el.addEventListener('object3dset', this.onMeshChanged);\n this.system.setShadowMapEnabled(true);\n },\n\n update: function () {\n var data = this.data;\n this.updateDescendants(data.cast, data.receive);\n },\n\n remove: function () {\n var el = this.el;\n el.removeEventListener('object3dset', this.onMeshChanged);\n this.updateDescendants(false, false);\n },\n\n updateDescendants: function (cast, receive) {\n var sceneEl = this.el.sceneEl;\n this.el.object3D.traverse(function (node) {\n if (!(node instanceof THREE.Mesh)) { return; }\n\n node.castShadow = cast;\n node.receiveShadow = receive;\n\n // If scene has already rendered, materials must be updated.\n if (sceneEl.hasLoaded && node.material) {\n var materials = Array.isArray(node.material) ? node.material : [node.material];\n for (var i = 0; i < materials.length; i++) {\n materials[i].needsUpdate = true;\n }\n }\n });\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/bind\":199}],112:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar debug = _dereq_('../utils/debug');\nvar THREE = _dereq_('../lib/three');\n\nvar warn = debug('components:sound:warn');\n\n/**\n * Sound component.\n */\nmodule.exports.Component = registerComponent('sound', {\n schema: {\n autoplay: {default: false},\n distanceModel: {default: 'inverse', oneOf: ['linear', 'inverse', 'exponential']},\n loop: {default: false},\n maxDistance: {default: 10000},\n on: {default: ''},\n poolSize: {default: 1},\n positional: {default: true},\n refDistance: {default: 1},\n rolloffFactor: {default: 1},\n src: {type: 'audio'},\n volume: {default: 1}\n },\n\n multiple: true,\n\n init: function () {\n var self = this;\n\n this.listener = null;\n this.audioLoader = new THREE.AudioLoader();\n this.pool = new THREE.Group();\n this.loaded = false;\n this.mustPlay = false;\n\n // Don't pass evt because playSound takes a function as parameter.\n this.playSoundBound = function () { self.playSound(); };\n },\n\n update: function (oldData) {\n var data = this.data;\n var i;\n var sound;\n var srcChanged = data.src !== oldData.src;\n\n // Create new sound if not yet created or changing `src`.\n if (srcChanged) {\n if (!data.src) { return; }\n this.setupSound();\n }\n\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n if (data.positional) {\n sound.setDistanceModel(data.distanceModel);\n sound.setMaxDistance(data.maxDistance);\n sound.setRefDistance(data.refDistance);\n sound.setRolloffFactor(data.rolloffFactor);\n }\n sound.setLoop(data.loop);\n sound.setVolume(data.volume);\n sound.isPaused = false;\n }\n\n if (data.on !== oldData.on) {\n this.updateEventListener(oldData.on);\n }\n\n // All sound values set. Load in `src`.\n if (srcChanged) {\n var self = this;\n\n this.loaded = false;\n this.audioLoader.load(data.src, function (buffer) {\n for (i = 0; i < self.pool.children.length; i++) {\n sound = self.pool.children[i];\n sound.setBuffer(buffer);\n }\n self.loaded = true;\n\n // Remove this key from cache, otherwise we can't play it again\n THREE.Cache.remove(data.src);\n if (self.data.autoplay || self.mustPlay) { self.playSound(); }\n self.el.emit('sound-loaded', self.evtDetail, false);\n });\n }\n },\n\n pause: function () {\n this.stopSound();\n this.removeEventListener();\n },\n\n play: function () {\n if (this.data.autoplay) { this.playSound(); }\n this.updateEventListener();\n },\n\n remove: function () {\n var i;\n var sound;\n\n this.removeEventListener();\n\n if (this.el.getObject3D(this.attrName)) {\n this.el.removeObject3D(this.attrName);\n }\n\n try {\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n sound.disconnect();\n }\n } catch (e) {\n // disconnect() will throw if it was never connected initially.\n warn('Audio source not properly disconnected');\n }\n },\n\n /**\n * Update listener attached to the user defined on event.\n */\n updateEventListener: function (oldEvt) {\n var el = this.el;\n if (oldEvt) { el.removeEventListener(oldEvt, this.playSoundBound); }\n el.addEventListener(this.data.on, this.playSoundBound);\n },\n\n removeEventListener: function () {\n this.el.removeEventListener(this.data.on, this.playSoundBound);\n },\n\n /**\n * Removes current sound object, creates new sound object, adds to entity.\n *\n * @returns {object} sound\n */\n setupSound: function () {\n var el = this.el;\n var i;\n var sceneEl = el.sceneEl;\n var self = this;\n var sound;\n\n if (this.pool.children.length > 0) {\n this.stopSound();\n el.removeObject3D('sound');\n }\n\n // Only want one AudioListener. Cache it on the scene.\n var listener = this.listener = sceneEl.audioListener || new THREE.AudioListener();\n sceneEl.audioListener = listener;\n\n if (sceneEl.camera) {\n sceneEl.camera.add(listener);\n }\n\n // Wait for camera if necessary.\n sceneEl.addEventListener('camera-set-active', function (evt) {\n evt.detail.cameraEl.getObject3D('camera').add(listener);\n });\n\n // Create [poolSize] audio instances and attach them to pool\n this.pool = new THREE.Group();\n for (i = 0; i < this.data.poolSize; i++) {\n sound = this.data.positional\n ? new THREE.PositionalAudio(listener)\n : new THREE.Audio(listener);\n this.pool.add(sound);\n }\n el.setObject3D(this.attrName, this.pool);\n\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n sound.onEnded = function () {\n this.isPlaying = false;\n self.el.emit('sound-ended', self.evtDetail, false);\n };\n }\n },\n\n /**\n * Pause all the sounds in the pool.\n */\n pauseSound: function () {\n var i;\n var sound;\n\n this.isPlaying = false;\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n if (!sound.source || !sound.source.buffer || !sound.isPlaying || sound.isPaused) {\n continue;\n }\n sound.isPaused = true;\n sound.pause();\n }\n },\n\n /**\n * Look for an unused sound in the pool and play it if found.\n */\n playSound: function (processSound) {\n var found;\n var i;\n var sound;\n\n if (!this.loaded) {\n warn('Sound not loaded yet. It will be played once it finished loading');\n this.mustPlay = true;\n return;\n }\n\n found = false;\n this.isPlaying = true;\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n if (!sound.isPlaying && sound.buffer && !found) {\n if (processSound) { processSound(sound); }\n sound.play();\n sound.isPaused = false;\n found = true;\n continue;\n }\n }\n\n if (!found) {\n warn('All the sounds are playing. If you need to play more sounds simultaneously ' +\n 'consider increasing the size of pool with the `poolSize` attribute.', this.el);\n return;\n }\n\n this.mustPlay = false;\n },\n\n /**\n * Stop all the sounds in the pool.\n */\n stopSound: function () {\n var i;\n var sound;\n this.isPlaying = false;\n for (i = 0; i < this.pool.children.length; i++) {\n sound = this.pool.children[i];\n if (!sound.source || !sound.source.buffer) { return; }\n sound.stop();\n }\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/debug\":201}],113:[function(_dereq_,module,exports){\nvar createTextGeometry = _dereq_('three-bmfont-text');\nvar loadBMFont = _dereq_('load-bmfont');\n\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar coreShader = _dereq_('../core/shader');\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar error = utils.debug('components:text:error');\nvar shaders = coreShader.shaders;\nvar warn = utils.debug('components:text:warn');\n\n// 1 to match other A-Frame default widths.\nvar DEFAULT_WIDTH = 1;\n\n// @bryik set anisotropy to 16. Improves look of large amounts of text when viewed from angle.\nvar MAX_ANISOTROPY = 16;\n\nvar FONT_BASE_URL = 'https://cdn.aframe.io/fonts/';\nvar FONTS = {\n aileronsemibold: FONT_BASE_URL + 'Aileron-Semibold.fnt',\n dejavu: FONT_BASE_URL + 'DejaVu-sdf.fnt',\n exo2bold: FONT_BASE_URL + 'Exo2Bold.fnt',\n exo2semibold: FONT_BASE_URL + 'Exo2SemiBold.fnt',\n kelsonsans: FONT_BASE_URL + 'KelsonSans.fnt',\n monoid: FONT_BASE_URL + 'Monoid.fnt',\n mozillavr: FONT_BASE_URL + 'mozillavr.fnt',\n roboto: FONT_BASE_URL + 'Roboto-msdf.json',\n sourcecodepro: FONT_BASE_URL + 'SourceCodePro.fnt'\n};\nvar MSDF_FONTS = ['roboto'];\nvar DEFAULT_FONT = 'roboto';\nmodule.exports.FONTS = FONTS;\n\nvar cache = new PromiseCache();\nvar fontWidthFactors = {};\nvar textures = {};\n\n// Regular expression for detecting a URLs with a protocol prefix.\nvar protocolRe = /^\\w+:/;\n\n/**\n * SDF-based text component.\n * Based on https://github.com/Jam3/three-bmfont-text.\n *\n * All the stock fonts are for the `sdf` registered shader, an improved version of jam3's\n * original `sdf` shader.\n */\nmodule.exports.Component = registerComponent('text', {\n multiple: true,\n\n schema: {\n align: {type: 'string', default: 'left', oneOf: ['left', 'right', 'center']},\n alphaTest: {default: 0.5},\n // `anchor` defaults to center to match geometries.\n anchor: {default: 'center', oneOf: ['left', 'right', 'center', 'align']},\n baseline: {default: 'center', oneOf: ['top', 'center', 'bottom']},\n color: {type: 'color', default: '#FFF'},\n font: {type: 'string', default: DEFAULT_FONT},\n // `fontImage` defaults to the font name as a .png (e.g., mozillavr.fnt -> mozillavr.png).\n fontImage: {type: 'string'},\n // `height` has no default, will be populated at layout.\n height: {type: 'number'},\n letterSpacing: {type: 'number', default: 0},\n // `lineHeight` defaults to font's `lineHeight` value.\n lineHeight: {type: 'number'},\n // `negate` must be true for fonts generated with older versions of msdfgen (white background).\n negate: {type: 'boolean', default: true},\n opacity: {type: 'number', default: 1.0},\n shader: {default: 'sdf', oneOf: shaders},\n side: {default: 'front', oneOf: ['front', 'back', 'double']},\n tabSize: {default: 4},\n transparent: {default: true},\n value: {type: 'string'},\n whiteSpace: {default: 'normal', oneOf: ['normal', 'pre', 'nowrap']},\n // `width` defaults to geometry width if present, else `DEFAULT_WIDTH`.\n width: {type: 'number'},\n // `wrapCount` units are about one default font character. Wrap roughly at this number.\n wrapCount: {type: 'number', default: 40},\n // `wrapPixels` will wrap using bmfont pixel units (e.g., dejavu's is 32 pixels).\n wrapPixels: {type: 'number'},\n // `xOffset` to add padding.\n xOffset: {type: 'number', default: 0},\n // `yOffset` to adjust generated fonts from tools that may have incorrect metrics.\n yOffset: {type: 'number', default: 0},\n // `zOffset` will provide a small z offset to avoid z-fighting.\n zOffset: {type: 'number', default: 0.001}\n },\n\n init: function () {\n this.shaderData = {};\n this.geometry = createTextGeometry();\n this.createOrUpdateMaterial();\n },\n\n update: function (oldData) {\n var data = this.data;\n var font = this.currentFont;\n if (textures[data.font]) {\n this.texture = textures[data.font];\n } else {\n // Create texture per font.\n this.texture = textures[data.font] = new THREE.Texture();\n this.texture.anisotropy = MAX_ANISOTROPY;\n }\n\n // Update material.\n this.createOrUpdateMaterial();\n\n // New font. `updateFont` will later change data and layout.\n if (oldData.font !== data.font) {\n this.updateFont();\n return;\n }\n\n // Update geometry and layout.\n if (font) {\n this.updateGeometry(this.geometry, font);\n this.updateLayout();\n }\n },\n\n /**\n * Clean up geometry, material, texture, mesh, objects.\n */\n remove: function () {\n this.geometry.dispose();\n this.geometry = null;\n this.el.removeObject3D(this.attrName);\n this.material.dispose();\n this.material = null;\n this.texture.dispose();\n this.texture = null;\n if (this.shaderObject) { delete this.shaderObject; }\n },\n\n /**\n * Update the shader of the material.\n */\n createOrUpdateMaterial: function () {\n var data = this.data;\n var hasChangedShader;\n var material = this.material;\n var NewShader;\n var shaderData = this.shaderData;\n var shaderName;\n\n // Infer shader if using a stock font (or from `-msdf` filename convention).\n shaderName = data.shader;\n if (MSDF_FONTS.indexOf(data.font) !== -1 || data.font.indexOf('-msdf.') >= 0) {\n shaderName = 'msdf';\n } else if (data.font in FONTS && MSDF_FONTS.indexOf(data.font) === -1) {\n shaderName = 'sdf';\n }\n\n hasChangedShader = (this.shaderObject && this.shaderObject.name) !== shaderName;\n\n shaderData.alphaTest = data.alphaTest;\n shaderData.color = data.color;\n shaderData.map = this.texture;\n shaderData.opacity = data.opacity;\n shaderData.side = parseSide(data.side);\n shaderData.transparent = data.transparent;\n shaderData.negate = data.negate;\n\n // Shader has not changed, do an update.\n if (!hasChangedShader) {\n // Update shader material.\n this.shaderObject.update(shaderData);\n // Apparently, was not set on `init` nor `update`.\n material.transparent = shaderData.transparent;\n material.side = shaderData.side;\n return;\n }\n\n // Shader has changed. Create a shader material.\n NewShader = createShader(this.el, shaderName, shaderData);\n this.material = NewShader.material;\n this.shaderObject = NewShader.shader;\n\n // Set new shader material.\n this.material.side = shaderData.side;\n if (this.mesh) { this.mesh.material = this.material; }\n },\n\n /**\n * Load font for geometry, load font image for material, and apply.\n */\n updateFont: function () {\n var data = this.data;\n var el = this.el;\n var fontSrc;\n var geometry = this.geometry;\n var self = this;\n\n if (!data.font) { warn('No font specified. Using the default font.'); }\n\n // Make invisible during font swap.\n if (this.mesh) { this.mesh.visible = false; }\n\n // Look up font URL to use, and perform cached load.\n fontSrc = this.lookupFont(data.font || DEFAULT_FONT) || data.font;\n cache.get(fontSrc, function doLoadFont () {\n return loadFont(fontSrc, data.yOffset);\n }).then(function setFont (font) {\n var fontImgSrc;\n\n if (font.pages.length !== 1) {\n throw new Error('Currently only single-page bitmap fonts are supported.');\n }\n\n if (!fontWidthFactors[fontSrc]) {\n font.widthFactor = fontWidthFactors[font] = computeFontWidthFactor(font);\n }\n self.currentFont = font;\n // Look up font image URL to use, and perform cached load.\n fontImgSrc = self.getFontImageSrc();\n cache.get(fontImgSrc, function () {\n return loadTexture(fontImgSrc);\n }).then(function (image) {\n // Make mesh visible and apply font image as texture.\n var texture = self.texture;\n texture.image = image;\n texture.needsUpdate = true;\n textures[data.font] = texture;\n self.texture = texture;\n self.initMesh();\n self.currentFont = font;\n // Update geometry given font metrics.\n self.updateGeometry(geometry, font);\n self.updateLayout();\n self.mesh.visible = true;\n el.emit('textfontset', {font: data.font, fontObj: font});\n }).catch(function (err) {\n error(err.message);\n error(err.stack);\n });\n }).catch(function (err) {\n error(err.message);\n error(err.stack);\n });\n },\n\n initMesh: function () {\n if (this.mesh) { return; }\n this.mesh = new THREE.Mesh(this.geometry, this.material);\n this.el.setObject3D(this.attrName, this.mesh);\n },\n\n getFontImageSrc: function () {\n if (this.data.fontImage) { return this.data.fontImage; }\n var fontSrc = this.lookupFont(this.data.font || DEFAULT_FONT) || this.data.font;\n var imageSrc = this.currentFont.pages[0];\n // If the image URL contains a non-HTTP(S) protocol, assume it's an absolute\n // path on disk and try to infer the path from the font source instead.\n if (imageSrc.match(protocolRe) && imageSrc.indexOf('http') !== 0) {\n return fontSrc.replace(/(\\.fnt)|(\\.json)/, '.png');\n }\n return THREE.LoaderUtils.extractUrlBase(fontSrc) + imageSrc;\n },\n\n /**\n * Update layout with anchor, alignment, baseline, and considering any meshes.\n */\n updateLayout: function () {\n var anchor;\n var baseline;\n var el = this.el;\n var data = this.data;\n var geometry = this.geometry;\n var geometryComponent;\n var height;\n var layout;\n var mesh = this.mesh;\n var textRenderWidth;\n var textScale;\n var width;\n var x;\n var y;\n\n if (!mesh || !geometry.layout) { return; }\n\n // Determine width to use (defined width, geometry's width, or default width).\n geometryComponent = el.getAttribute('geometry');\n width = data.width || (geometryComponent && geometryComponent.width) || DEFAULT_WIDTH;\n\n // Determine wrap pixel count. Either specified or by experimental fudge factor.\n // Note that experimental factor will never be correct for variable width fonts.\n textRenderWidth = computeWidth(data.wrapPixels, data.wrapCount,\n this.currentFont.widthFactor);\n textScale = width / textRenderWidth;\n\n // Determine height to use.\n layout = geometry.layout;\n height = textScale * (layout.height + layout.descender);\n\n // Update geometry dimensions to match text layout if width and height are set to 0.\n // For example, scales a plane to fit text.\n if (geometryComponent && geometryComponent.primitive === 'plane') {\n if (!geometryComponent.width) { el.setAttribute('geometry', 'width', width); }\n if (!geometryComponent.height) { el.setAttribute('geometry', 'height', height); }\n }\n\n // Calculate X position to anchor text left, center, or right.\n anchor = data.anchor === 'align' ? data.align : data.anchor;\n if (anchor === 'left') {\n x = 0;\n } else if (anchor === 'right') {\n x = -1 * layout.width;\n } else if (anchor === 'center') {\n x = -1 * layout.width / 2;\n } else {\n throw new TypeError('Invalid text.anchor property value', anchor);\n }\n\n // Calculate Y position to anchor text top, center, or bottom.\n baseline = data.baseline;\n if (baseline === 'bottom') {\n y = 0;\n } else if (baseline === 'top') {\n y = -1 * layout.height + layout.ascender;\n } else if (baseline === 'center') {\n y = -1 * layout.height / 2;\n } else {\n throw new TypeError('Invalid text.baseline property value', baseline);\n }\n\n // Position and scale mesh to apply layout.\n mesh.position.x = x * textScale + data.xOffset;\n mesh.position.y = y * textScale;\n // Place text slightly in front to avoid Z-fighting.\n mesh.position.z = data.zOffset;\n mesh.scale.set(textScale, -1 * textScale, textScale);\n },\n\n /**\n * Grab font from the constant.\n * Set as a method for test stubbing purposes.\n */\n lookupFont: function (key) {\n return FONTS[key];\n },\n\n /**\n * Update the text geometry using `three-bmfont-text.update`.\n */\n updateGeometry: (function () {\n var geometryUpdateBase = {};\n var geometryUpdateData = {};\n var newLineRegex = /\\\\n/g;\n var tabRegex = /\\\\t/g;\n\n return function (geometry, font) {\n var data = this.data;\n\n geometryUpdateData.font = font;\n geometryUpdateData.lineHeight = data.lineHeight && isFinite(data.lineHeight)\n ? data.lineHeight\n : font.common.lineHeight;\n geometryUpdateData.text = data.value.toString().replace(newLineRegex, '\\n')\n .replace(tabRegex, '\\t');\n geometryUpdateData.width = computeWidth(data.wrapPixels, data.wrapCount,\n font.widthFactor);\n geometry.update(utils.extend(geometryUpdateBase, data, geometryUpdateData));\n };\n })()\n});\n\n/**\n * Due to using negative scale, we return the opposite side specified.\n * https://github.com/mrdoob/three.js/pull/12787/\n */\nfunction parseSide (side) {\n switch (side) {\n case 'back': {\n return THREE.FrontSide;\n }\n case 'double': {\n return THREE.DoubleSide;\n }\n default: {\n return THREE.BackSide;\n }\n }\n}\n\n/**\n * @returns {Promise}\n */\nfunction loadFont (src, yOffset) {\n return new Promise(function (resolve, reject) {\n loadBMFont(src, function (err, font) {\n if (err) {\n error('Error loading font', src);\n reject(err);\n return;\n }\n\n // Fix negative Y offsets for Roboto MSDF font from tool. Experimentally determined.\n if (src.indexOf('/Roboto-msdf.json') >= 0) { yOffset = 30; }\n if (yOffset) { font.chars.map(function doOffset (ch) { ch.yoffset += yOffset; }); }\n\n resolve(font);\n });\n });\n}\n\n/**\n * @returns {Promise}\n */\nfunction loadTexture (src) {\n return new Promise(function (resolve, reject) {\n new THREE.ImageLoader().load(src, function (image) {\n resolve(image);\n }, undefined, function () {\n error('Error loading font image', src);\n reject(null);\n });\n });\n}\n\nfunction createShader (el, shaderName, data) {\n var shader;\n var shaderObject;\n\n // Set up Shader.\n shaderObject = new shaders[shaderName].Shader();\n shaderObject.el = el;\n shaderObject.init(data);\n shaderObject.update(data);\n\n // Get material.\n shader = shaderObject.material;\n // Apparently, was not set on `init` nor `update`.\n shader.transparent = data.transparent;\n\n return {\n material: shader,\n shader: shaderObject\n };\n}\n\n/**\n * Determine wrap pixel count. Either specified or by experimental fudge factor.\n * Note that experimental factor will never be correct for variable width fonts.\n */\nfunction computeWidth (wrapPixels, wrapCount, widthFactor) {\n return wrapPixels || ((0.5 + wrapCount) * widthFactor);\n}\n\n/**\n * Compute default font width factor to use.\n */\nfunction computeFontWidthFactor (font) {\n var sum = 0;\n var digitsum = 0;\n var digits = 0;\n font.chars.map(function (ch) {\n sum += ch.xadvance;\n if (ch.id >= 48 && ch.id <= 57) {\n digits++;\n digitsum += ch.xadvance;\n }\n });\n return digits ? digitsum / digits : sum / font.chars.length;\n}\n\n/**\n * Get or create a promise given a key and promise generator.\n * @todo Move to a utility and use in other parts of A-Frame.\n */\nfunction PromiseCache () {\n var cache = this.cache = {};\n\n this.get = function (key, promiseGenerator) {\n if (key in cache) {\n return cache[key];\n }\n cache[key] = promiseGenerator();\n return cache[key];\n };\n}\n\n},{\"../core/component\":131,\"../core/shader\":141,\"../lib/three\":179,\"../utils/\":205,\"load-bmfont\":37,\"three-bmfont-text\":63}],114:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar controllerUtils = _dereq_('../utils/tracked-controls');\nvar DEFAULT_CAMERA_HEIGHT = _dereq_('../constants').DEFAULT_CAMERA_HEIGHT;\nvar THREE = _dereq_('../lib/three');\n\nvar DEFAULT_HANDEDNESS = _dereq_('../constants').DEFAULT_HANDEDNESS;\n// Vector from eyes to elbow (divided by user height).\nvar EYES_TO_ELBOW = {x: 0.175, y: -0.3, z: -0.03};\n// Vector from eyes to elbow (divided by user height).\nvar FOREARM = {x: 0, y: 0, z: -0.175};\n\n// Due to unfortunate name collision, add empty touches array to avoid Daydream error.\nvar EMPTY_DAYDREAM_TOUCHES = {touches: []};\n\nvar EVENTS = {\n AXISMOVE: 'axismove',\n BUTTONCHANGED: 'buttonchanged',\n BUTTONDOWN: 'buttondown',\n BUTTONUP: 'buttonup',\n TOUCHSTART: 'touchstart',\n TOUCHEND: 'touchend'\n};\n\n/**\n * Tracked controls component.\n * Wrap the gamepad API for pose and button states.\n * Select the appropriate controller and apply pose to the entity.\n * Observe button states and emit appropriate events.\n *\n * @property {number} controller - Index of controller in array returned by Gamepad API.\n * Only used if hand property is not set.\n * @property {string} id - Selected controller among those returned by Gamepad API.\n * @property {number} hand - If multiple controllers found with id, choose the one with the\n * given value for hand. If set, we ignore 'controller' property\n */\nmodule.exports.Component = registerComponent('tracked-controls-webvr', {\n schema: {\n autoHide: {default: true},\n controller: {default: 0},\n id: {type: 'string', default: ''},\n hand: {type: 'string', default: ''},\n idPrefix: {type: 'string', default: ''},\n orientationOffset: {type: 'vec3'},\n // Arm model parameters when not 6DoF.\n armModel: {default: false},\n headElement: {type: 'selector'}\n },\n\n init: function () {\n // Copy variables back to tracked-controls for backwards compatibility.\n // Some 3rd components rely on them.\n this.axis = this.el.components['tracked-controls'].axis = [0, 0, 0];\n this.buttonStates = this.el.components['tracked-controls'].buttonStates = {};\n this.changedAxes = [];\n this.targetControllerNumber = this.data.controller;\n\n this.axisMoveEventDetail = {axis: this.axis, changed: this.changedAxes};\n this.deltaControllerPosition = new THREE.Vector3();\n this.controllerQuaternion = new THREE.Quaternion();\n this.controllerEuler = new THREE.Euler();\n\n this.updateGamepad();\n\n this.buttonEventDetails = {};\n },\n\n tick: function (time, delta) {\n var mesh = this.el.getObject3D('mesh');\n // Update mesh animations.\n if (mesh && mesh.update) { mesh.update(delta / 1000); }\n this.updateGamepad();\n this.updatePose();\n this.updateButtons();\n },\n\n /**\n * Return default user height to use for non-6DOF arm model.\n */\n defaultUserHeight: function () {\n return DEFAULT_CAMERA_HEIGHT;\n },\n\n /**\n * Return head element to use for non-6DOF arm model.\n */\n getHeadElement: function () {\n return this.data.headElement || this.el.sceneEl.camera.el;\n },\n\n /**\n * Handle update controller match criteria (such as `id`, `idPrefix`, `hand`, `controller`)\n */\n updateGamepad: function () {\n var data = this.data;\n var controller = controllerUtils.findMatchingControllerWebVR(\n this.system.controllers,\n data.id,\n data.idPrefix,\n data.hand,\n data.controller\n );\n\n this.controller = controller;\n // Legacy handle to the controller for old components.\n this.el.components['tracked-controls'].controller = controller;\n\n if (this.data.autoHide) { this.el.object3D.visible = !!this.controller; }\n },\n\n /**\n * Applies an artificial arm model to simulate elbow to wrist positioning\n * based on the orientation of the controller.\n *\n * @param {object} controllerPosition - Existing vector to update with controller position.\n */\n applyArmModel: function (controllerPosition) {\n // Use controllerPosition and deltaControllerPosition to avoid creating variables.\n var controller = this.controller;\n var controllerEuler = this.controllerEuler;\n var controllerQuaternion = this.controllerQuaternion;\n var deltaControllerPosition = this.deltaControllerPosition;\n var hand;\n var headEl;\n var headObject3D;\n var pose;\n var userHeight;\n\n headEl = this.getHeadElement();\n headObject3D = headEl.object3D;\n userHeight = this.defaultUserHeight();\n\n pose = controller.pose;\n hand = (controller ? controller.hand : undefined) || DEFAULT_HANDEDNESS;\n\n // Use camera position as head position.\n controllerPosition.copy(headObject3D.position);\n // Set offset for degenerate \"arm model\" to elbow.\n deltaControllerPosition.set(\n EYES_TO_ELBOW.x * (hand === 'left' ? -1 : hand === 'right' ? 1 : 0),\n EYES_TO_ELBOW.y, // Lower than our eyes.\n EYES_TO_ELBOW.z); // Slightly out in front.\n // Scale offset by user height.\n deltaControllerPosition.multiplyScalar(userHeight);\n // Apply camera Y rotation (not X or Z, so you can look down at your hand).\n deltaControllerPosition.applyAxisAngle(headObject3D.up, headObject3D.rotation.y);\n // Apply rotated offset to position.\n controllerPosition.add(deltaControllerPosition);\n\n // Set offset for degenerate \"arm model\" forearm. Forearm sticking out from elbow.\n deltaControllerPosition.set(FOREARM.x, FOREARM.y, FOREARM.z);\n // Scale offset by user height.\n deltaControllerPosition.multiplyScalar(userHeight);\n // Apply controller X/Y rotation (tilting up/down/left/right is usually moving the arm).\n if (pose.orientation) {\n controllerQuaternion.fromArray(pose.orientation);\n } else {\n controllerQuaternion.copy(headObject3D.quaternion);\n }\n controllerEuler.setFromQuaternion(controllerQuaternion);\n controllerEuler.set(controllerEuler.x, controllerEuler.y, 0);\n deltaControllerPosition.applyEuler(controllerEuler);\n // Apply rotated offset to position.\n controllerPosition.add(deltaControllerPosition);\n },\n\n /**\n * Read pose from controller (from Gamepad API), apply transforms, apply to entity.\n */\n updatePose: function () {\n var controller = this.controller;\n var data = this.data;\n var object3D = this.el.object3D;\n var pose;\n var vrDisplay = this.system.vrDisplay;\n var standingMatrix;\n\n if (!controller) { return; }\n\n // Compose pose from Gamepad.\n pose = controller.pose;\n\n if (pose.position) {\n object3D.position.fromArray(pose.position);\n } else {\n // Controller not 6DOF, apply arm model.\n if (data.armModel) { this.applyArmModel(object3D.position); }\n }\n\n if (pose.orientation) {\n object3D.quaternion.fromArray(pose.orientation);\n }\n\n // Apply transforms, if 6DOF and in VR.\n if (vrDisplay && pose.position) {\n standingMatrix = this.el.sceneEl.renderer.xr.getStandingMatrix();\n object3D.matrix.compose(object3D.position, object3D.quaternion, object3D.scale);\n object3D.matrix.multiplyMatrices(standingMatrix, object3D.matrix);\n object3D.matrix.decompose(object3D.position, object3D.quaternion, object3D.scale);\n }\n\n object3D.rotateX(this.data.orientationOffset.x * THREE.Math.DEG2RAD);\n object3D.rotateY(this.data.orientationOffset.y * THREE.Math.DEG2RAD);\n object3D.rotateZ(this.data.orientationOffset.z * THREE.Math.DEG2RAD);\n },\n\n /**\n * Handle button changes including axes, presses, touches, values.\n */\n updateButtons: function () {\n var buttonState;\n var controller = this.controller;\n var id;\n\n if (!controller) { return; }\n\n // Check every button.\n for (id = 0; id < controller.buttons.length; ++id) {\n // Initialize button state.\n if (!this.buttonStates[id]) {\n this.buttonStates[id] = {pressed: false, touched: false, value: 0};\n }\n if (!this.buttonEventDetails[id]) {\n this.buttonEventDetails[id] = {id: id, state: this.buttonStates[id]};\n }\n\n buttonState = controller.buttons[id];\n this.handleButton(id, buttonState);\n }\n // Check axes.\n this.handleAxes();\n },\n\n /**\n * Handle presses and touches for a single button.\n *\n * @param {number} id - Index of button in Gamepad button array.\n * @param {number} buttonState - Value of button state from 0 to 1.\n * @returns {boolean} Whether button has changed in any way.\n */\n handleButton: function (id, buttonState) {\n var changed;\n changed = this.handlePress(id, buttonState) |\n this.handleTouch(id, buttonState) |\n this.handleValue(id, buttonState);\n if (!changed) { return false; }\n this.el.emit(EVENTS.BUTTONCHANGED, this.buttonEventDetails[id], false);\n return true;\n },\n\n /**\n * An axis is an array of values from -1 (up, left) to 1 (down, right).\n * Compare each component of the axis to the previous value to determine change.\n *\n * @returns {boolean} Whether axes changed.\n */\n handleAxes: function () {\n var changed = false;\n var controllerAxes = this.controller.axes;\n var i;\n var previousAxis = this.axis;\n var changedAxes = this.changedAxes;\n\n // Check if axis changed.\n this.changedAxes.splice(0, this.changedAxes.length);\n for (i = 0; i < controllerAxes.length; ++i) {\n changedAxes.push(previousAxis[i] !== controllerAxes[i]);\n if (changedAxes[i]) { changed = true; }\n }\n if (!changed) { return false; }\n\n this.axis.splice(0, this.axis.length);\n for (i = 0; i < controllerAxes.length; i++) {\n this.axis.push(controllerAxes[i]);\n }\n this.el.emit(EVENTS.AXISMOVE, this.axisMoveEventDetail, false);\n return true;\n },\n\n /**\n * Determine whether a button press has occured and emit events as appropriate.\n *\n * @param {string} id - ID of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button press state changed.\n */\n handlePress: function (id, buttonState) {\n var evtName;\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.pressed === previousButtonState.pressed) { return false; }\n\n evtName = buttonState.pressed ? EVENTS.BUTTONDOWN : EVENTS.BUTTONUP;\n this.el.emit(evtName, this.buttonEventDetails[id], false);\n previousButtonState.pressed = buttonState.pressed;\n return true;\n },\n\n /**\n * Determine whether a button touch has occured and emit events as appropriate.\n *\n * @param {string} id - ID of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button touch state changed.\n */\n handleTouch: function (id, buttonState) {\n var evtName;\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.touched === previousButtonState.touched) { return false; }\n\n evtName = buttonState.touched ? EVENTS.TOUCHSTART : EVENTS.TOUCHEND;\n this.el.emit(evtName, this.buttonEventDetails[id], false, EMPTY_DAYDREAM_TOUCHES);\n previousButtonState.touched = buttonState.touched;\n return true;\n },\n\n /**\n * Determine whether a button value has changed.\n *\n * @param {string} id - Id of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button value changed.\n */\n handleValue: function (id, buttonState) {\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.value === previousButtonState.value) { return false; }\n\n previousButtonState.value = buttonState.value;\n return true;\n }\n});\n\n},{\"../constants\":123,\"../core/component\":131,\"../lib/three\":179,\"../utils/tracked-controls\":214}],115:[function(_dereq_,module,exports){\nvar controllerUtils = _dereq_('../utils/tracked-controls');\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\nvar EVENTS = {\n AXISMOVE: 'axismove',\n BUTTONCHANGED: 'buttonchanged',\n BUTTONDOWN: 'buttondown',\n BUTTONUP: 'buttonup',\n TOUCHSTART: 'touchstart',\n TOUCHEND: 'touchend'\n};\n\nmodule.exports.Component = registerComponent('tracked-controls-webxr', {\n schema: {\n id: {type: 'string', default: ''},\n hand: {type: 'string', default: ''},\n handTrackingEnabled: {default: false},\n index: {type: 'int', default: -1},\n iterateControllerProfiles: {default: false}\n },\n\n init: function () {\n this.updateController = this.updateController.bind(this);\n this.buttonEventDetails = {};\n this.buttonStates = this.el.components['tracked-controls'].buttonStates = {};\n this.axis = this.el.components['tracked-controls'].axis = [0, 0, 0];\n this.changedAxes = [];\n this.axisMoveEventDetail = {axis: this.axis, changed: this.changedAxes};\n },\n\n update: function () {\n this.updateController();\n },\n\n play: function () {\n var sceneEl = this.el.sceneEl;\n this.updateController();\n sceneEl.addEventListener('controllersupdated', this.updateController);\n },\n\n pause: function () {\n var sceneEl = this.el.sceneEl;\n sceneEl.removeEventListener('controllersupdated', this.updateController);\n },\n\n isControllerPresent: function (evt) {\n if (!this.controller || this.controller.gamepad) { return false; }\n if (evt.inputSource.handedness !== 'none' &&\n evt.inputSource.handedness !== this.data.hand) {\n return false;\n }\n return true;\n },\n\n /**\n * Handle update controller match criteria (such as `id`, `idPrefix`, `hand`, `controller`)\n */\n updateController: function () {\n this.controller = controllerUtils.findMatchingControllerWebXR(\n this.system.controllers,\n this.data.id,\n this.data.hand,\n this.data.index,\n this.data.iterateControllerProfiles,\n this.data.handTrackingEnabled\n );\n // Legacy handle to the controller for old components.\n this.el.components['tracked-controls'].controller = this.controller;\n if (this.data.autoHide) { this.el.object3D.visible = !!this.controller; }\n },\n\n tick: function () {\n var sceneEl = this.el.sceneEl;\n var controller = this.controller;\n var frame = sceneEl.frame;\n if (!controller || !sceneEl.frame || !this.system.referenceSpace) { return; }\n if (!controller.hand) {\n this.pose = frame.getPose(controller.targetRaySpace, this.system.referenceSpace);\n this.updatePose();\n this.updateButtons();\n }\n },\n\n updatePose: function () {\n var object3D = this.el.object3D;\n var pose = this.pose;\n if (!pose) { return; }\n object3D.matrix.elements = pose.transform.matrix;\n object3D.matrix.decompose(object3D.position, object3D.rotation, object3D.scale);\n },\n\n /**\n * Handle button changes including axes, presses, touches, values.\n */\n updateButtons: function () {\n var buttonState;\n var id;\n var controller = this.controller;\n var gamepad;\n if (!controller || !controller.gamepad) { return; }\n\n gamepad = controller.gamepad;\n // Check every button.\n for (id = 0; id < gamepad.buttons.length; ++id) {\n // Initialize button state.\n if (!this.buttonStates[id]) {\n this.buttonStates[id] = {pressed: false, touched: false, value: 0};\n }\n if (!this.buttonEventDetails[id]) {\n this.buttonEventDetails[id] = {id: id, state: this.buttonStates[id]};\n }\n\n buttonState = gamepad.buttons[id];\n this.handleButton(id, buttonState);\n }\n // Check axes.\n this.handleAxes();\n },\n\n /**\n * Handle presses and touches for a single button.\n *\n * @param {number} id - Index of button in Gamepad button array.\n * @param {number} buttonState - Value of button state from 0 to 1.\n * @returns {boolean} Whether button has changed in any way.\n */\n handleButton: function (id, buttonState) {\n var changed;\n changed = this.handlePress(id, buttonState) |\n this.handleTouch(id, buttonState) |\n this.handleValue(id, buttonState);\n if (!changed) { return false; }\n this.el.emit(EVENTS.BUTTONCHANGED, this.buttonEventDetails[id], false);\n return true;\n },\n\n /**\n * An axis is an array of values from -1 (up, left) to 1 (down, right).\n * Compare each component of the axis to the previous value to determine change.\n *\n * @returns {boolean} Whether axes changed.\n */\n handleAxes: function () {\n var changed = false;\n var controllerAxes = this.controller.gamepad.axes;\n var i;\n var previousAxis = this.axis;\n var changedAxes = this.changedAxes;\n\n // Check if axis changed.\n this.changedAxes.splice(0, this.changedAxes.length);\n for (i = 0; i < controllerAxes.length; ++i) {\n changedAxes.push(previousAxis[i] !== controllerAxes[i]);\n if (changedAxes[i]) { changed = true; }\n }\n if (!changed) { return false; }\n\n this.axis.splice(0, this.axis.length);\n for (i = 0; i < controllerAxes.length; i++) {\n this.axis.push(controllerAxes[i]);\n }\n this.el.emit(EVENTS.AXISMOVE, this.axisMoveEventDetail, false);\n return true;\n },\n\n /**\n * Determine whether a button press has occured and emit events as appropriate.\n *\n * @param {string} id - ID of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button press state changed.\n */\n handlePress: function (id, buttonState) {\n var evtName;\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.pressed === previousButtonState.pressed) { return false; }\n\n evtName = buttonState.pressed ? EVENTS.BUTTONDOWN : EVENTS.BUTTONUP;\n this.el.emit(evtName, this.buttonEventDetails[id], false);\n previousButtonState.pressed = buttonState.pressed;\n return true;\n },\n\n /**\n * Determine whether a button touch has occured and emit events as appropriate.\n *\n * @param {string} id - ID of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button touch state changed.\n */\n handleTouch: function (id, buttonState) {\n var evtName;\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.touched === previousButtonState.touched) { return false; }\n\n evtName = buttonState.touched ? EVENTS.TOUCHSTART : EVENTS.TOUCHEND;\n this.el.emit(evtName, this.buttonEventDetails[id], false);\n previousButtonState.touched = buttonState.touched;\n return true;\n },\n\n /**\n * Determine whether a button value has changed.\n *\n * @param {string} id - Id of the button to check.\n * @param {object} buttonState - State of the button to check.\n * @returns {boolean} Whether button value changed.\n */\n handleValue: function (id, buttonState) {\n var previousButtonState = this.buttonStates[id];\n\n // Not changed.\n if (buttonState.value === previousButtonState.value) { return false; }\n\n previousButtonState.value = buttonState.value;\n return true;\n }\n});\n\n},{\"../core/component\":131,\"../utils/tracked-controls\":214}],116:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\n/**\n * Tracked controls.\n * Abstract controls that decide if the WebVR or WebXR version is going to be applied.\n *\n * @property {number} controller - Index of controller in array returned by Gamepad API.\n * Only used if hand property is not set.\n * @property {string} id - Selected controller among those returned by Gamepad API.\n * @property {number} hand - If multiple controllers found with id, choose the one with the\n * given value for hand. If set, we ignore 'controller' property\n */\nmodule.exports.Component = registerComponent('tracked-controls', {\n schema: {\n autoHide: {default: true},\n controller: {default: -1},\n id: {type: 'string', default: ''},\n hand: {type: 'string', default: ''},\n idPrefix: {type: 'string', default: ''},\n handTrackingEnabled: {default: false},\n orientationOffset: {type: 'vec3'},\n // Arm model parameters when not 6DoF.\n armModel: {default: false},\n headElement: {type: 'selector'},\n iterateControllerProfiles: {default: false}\n },\n\n update: function () {\n var data = this.data;\n var el = this.el;\n if (el.sceneEl.hasWebXR) {\n el.setAttribute('tracked-controls-webxr', {\n id: data.id,\n hand: data.hand,\n index: data.controller,\n iterateControllerProfiles: data.iterateControllerProfiles,\n handTrackingEnabled: data.handTrackingEnabled\n });\n } else {\n el.setAttribute('tracked-controls-webvr', data);\n }\n }\n});\n\n},{\"../core/component\":131}],117:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\nvar THREE = _dereq_('../lib/three');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar INDEX_CONTROLLER_MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/valve/index/valve-index-';\nvar INDEX_CONTROLLER_MODEL_URL = {\n left: INDEX_CONTROLLER_MODEL_BASE_URL + 'left.glb',\n right: INDEX_CONTROLLER_MODEL_BASE_URL + 'right.glb'\n};\n\nvar GAMEPAD_ID_PREFIX = 'valve';\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar INDEX_CONTROLLER_POSITION_OFFSET_WEBVR = {\n left: {x: -0.00023692678902063457, y: 0.04724540367838371, z: -0.061959880395271096},\n right: {x: 0.002471558599671131, y: 0.055765208987076195, z: -0.061068168708348844}\n};\n\nvar INDEX_CONTROLLER_POSITION_OFFSET_WEBXR = {\n left: {x: 0, y: -0.05, z: 0.06},\n right: {x: 0, y: -0.05, z: 0.06}\n};\n\nvar INDEX_CONTROLLER_ROTATION_OFFSET_WEBVR = {\n left: {_x: 0.692295102620542, _y: -0.0627618864318427, _z: -0.06265893149611756, _order: 'XYZ'},\n right: {_x: 0.6484021229942998, _y: -0.032563619881892894, _z: -0.1327973171917482, _order: 'XYZ'}\n};\n\nvar INDEX_CONTROLLER_ROTATION_OFFSET_WEBXR = {\n left: {_x: Math.PI / 3, _y: 0, _z: 0, _order: 'XYZ'},\n right: {_x: Math.PI / 3, _y: 0, _z: 0, _order: 'XYZ'}\n};\n\nvar INDEX_CONTROLLER_ROTATION_OFFSET = isWebXRAvailable ? INDEX_CONTROLLER_ROTATION_OFFSET_WEBXR : INDEX_CONTROLLER_ROTATION_OFFSET_WEBVR;\n\nvar INDEX_CONTROLLER_POSITION_OFFSET = isWebXRAvailable ? INDEX_CONTROLLER_POSITION_OFFSET_WEBXR : INDEX_CONTROLLER_POSITION_OFFSET_WEBVR;\n/**\n * Vive controls.\n * Interface with Vive controllers and map Gamepad events to controller buttons:\n * trackpad, trigger, grip, menu, system\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('valve-index-controls', {\n schema: {\n hand: {default: 'left'},\n buttonColor: {type: 'color', default: '#FAFAFA'}, // Off-white.\n buttonHighlightColor: {type: 'color', default: '#22D1EE'}, // Light blue.\n model: {default: true},\n orientationOffset: {type: 'vec3'}\n },\n\n mapping: {\n axes: {\n trackpad: [0, 1],\n thumbstick: [2, 3]\n },\n buttons: ['trigger', 'grip', 'trackpad', 'thumbstick', 'abutton']\n },\n\n init: function () {\n var self = this;\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.previousButtonValues = {};\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n\n this.bindMethods();\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n /**\n * Once OpenVR returns correct hand data in supporting browsers, we can use hand property.\n * var isPresent = checkControllerPresentAndSetup(this.el.sceneEl, GAMEPAD_ID_PREFIX,\n { hand: data.hand });\n * Until then, use hardcoded index.\n */\n checkIfControllerPresent: function () {\n var data = this.data;\n var controllerIndex = data.hand === 'right' ? 0 : data.hand === 'left' ? 1 : 2;\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {index: controllerIndex, iterateControllerProfiles: true, hand: data.hand});\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n\n // If we have an OpenVR Gamepad, use the fixed mapping.\n el.setAttribute('tracked-controls', {\n idPrefix: GAMEPAD_ID_PREFIX,\n // Hand IDs: 1 = right, 0 = left, 2 = anything else.\n controller: data.hand === 'right' ? 1 : data.hand === 'left' ? 0 : 2,\n hand: data.hand,\n orientationOffset: data.orientationOffset\n });\n\n this.loadModel();\n },\n\n loadModel: function () {\n var data = this.data;\n if (!data.model) { return; }\n this.el.setAttribute('gltf-model', '' + INDEX_CONTROLLER_MODEL_URL[data.hand] + '');\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n /**\n * Rotate the trigger button based on how hard the trigger is pressed.\n */\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n var buttonMeshes = this.buttonMeshes;\n var analogValue;\n\n if (!button) { return; }\n\n if (button === 'trigger') {\n analogValue = evt.detail.state.value;\n // Update trigger rotation depending on button value.\n if (buttonMeshes && buttonMeshes.trigger) {\n buttonMeshes.trigger.rotation.x = this.triggerOriginalRotationX - analogValue * (Math.PI / 40);\n }\n }\n\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onModelLoaded: function (evt) {\n var buttonMeshes;\n var controllerObject3D = evt.detail.model;\n var self = this;\n\n if (!this.data.model) { return; }\n\n // Store button meshes object to be able to change their colors.\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.grip = {\n left: controllerObject3D.getObjectByName('leftgrip'),\n right: controllerObject3D.getObjectByName('rightgrip')\n };\n buttonMeshes.menu = controllerObject3D.getObjectByName('menubutton');\n buttonMeshes.system = controllerObject3D.getObjectByName('systembutton');\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('touchpad');\n buttonMeshes.trigger = controllerObject3D.getObjectByName('trigger');\n this.triggerOriginalRotationX = buttonMeshes.trigger.rotation.x;\n\n // Set default colors.\n Object.keys(buttonMeshes).forEach(function (buttonName) {\n self.setButtonColor(buttonName, self.data.buttonColor);\n });\n\n // Offset pivot point.\n controllerObject3D.position.copy(INDEX_CONTROLLER_POSITION_OFFSET[this.data.hand]);\n controllerObject3D.rotation.copy(INDEX_CONTROLLER_ROTATION_OFFSET[this.data.hand]);\n\n this.el.emit('controllermodelready', {\n name: 'valve-index-controlls',\n model: this.data.model,\n rayOrigin: new THREE.Vector3(0, 0, 0)\n });\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n var color;\n var isTouch;\n if (!this.data.model) { return; }\n\n isTouch = evtName.indexOf('touch') !== -1;\n // Don't change color for trackpad touch.\n if (isTouch) { return; }\n\n // Update colors.\n color = evtName === 'up' ? this.data.buttonColor : this.data.buttonHighlightColor;\n this.setButtonColor(buttonName, color);\n },\n setButtonColor: function (buttonName, color) {\n // TODO: The meshes aren't set up correctly now, skipping for the moment\n return;\n }\n});\n\n},{\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],118:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\n\n/**\n * Visibility component.\n */\nmodule.exports.Component = registerComponent('visible', {\n schema: {default: true},\n\n update: function () {\n this.el.object3D.visible = this.data;\n }\n});\n\n},{\"../core/component\":131}],119:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar VIVE_CONTROLLER_MODEL_OBJ_URL = 'https://cdn.aframe.io/controllers/vive/vr_controller_vive.obj';\nvar VIVE_CONTROLLER_MODEL_OBJ_MTL = 'https://cdn.aframe.io/controllers/vive/vr_controller_vive.mtl';\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'htc-vive-controller-mv';\nvar GAMEPAD_ID_WEBVR = 'OpenVR ';\n\n// Prefix for Gen1 and Gen2 Oculus Touch Controllers.\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\n/**\n * Button IDs:\n * 0 - trackpad\n * 1 - trigger (intensity value from 0.5 to 1)\n * 2 - grip\n * 3 - menu (dispatch but better for menu options)\n * 4 - system (never dispatched on this layer)\n */\nvar INPUT_MAPPING_WEBVR = {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'trigger', 'grip', 'menu', 'system']\n};\n\n/**\n * Button IDs:\n * 0 - trigger\n * 1 - squeeze\n * 2 - touchpad\n * 3 - none (dispatch but better for menu options)\n * 4 - menu (never dispatched on this layer)\n *\n * Axis:\n * 0 - touchpad x axis\n * 1 - touchpad y axis\n * Reference: https://github.com/immersive-web/webxr-input-profiles/blob/master/packages/registry/profiles/htc/htc-vive.json\n */\nvar INPUT_MAPPING_WEBXR = {\n axes: {thumbstick: [0, 1]},\n buttons: ['trigger', 'grip', 'trackpad', 'none', 'menu']\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Vive controls.\n * Interface with Vive controllers and map Gamepad events to controller buttons:\n * trackpad, trigger, grip, menu, system\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('vive-controls', {\n schema: {\n hand: {default: 'left'},\n buttonColor: {type: 'color', default: '#FAFAFA'}, // Off-white.\n buttonHighlightColor: {type: 'color', default: '#22D1EE'}, // Light blue.\n model: {default: true},\n orientationOffset: {type: 'vec3'}\n },\n\n mapping: INPUT_MAPPING,\n\n init: function () {\n var self = this;\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.previousButtonValues = {};\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n\n this.bindMethods();\n },\n\n update: function () {\n var data = this.data;\n this.controllerIndex = data.hand === 'right' ? 0 : data.hand === 'left' ? 1 : 2;\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n },\n\n /**\n * Once OpenVR returns correct hand data in supporting browsers, we can use hand property.\n * var isPresent = checkControllerPresentAndSetup(this.el.sceneEl, GAMEPAD_ID_PREFIX,\n { hand: data.hand });\n * Until then, use hardcoded index.\n */\n checkIfControllerPresent: function () {\n var data = this.data;\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {index: this.controllerIndex, hand: data.hand});\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n\n // If we have an OpenVR Gamepad, use the fixed mapping.\n el.setAttribute('tracked-controls', {\n idPrefix: GAMEPAD_ID_PREFIX,\n hand: data.hand,\n controller: this.controllerIndex,\n orientationOffset: data.orientationOffset\n });\n\n // Load model.\n if (!this.data.model) { return; }\n this.el.setAttribute('obj-model', {\n obj: VIVE_CONTROLLER_MODEL_OBJ_URL,\n mtl: VIVE_CONTROLLER_MODEL_OBJ_MTL\n });\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n /**\n * Rotate the trigger button based on how hard the trigger is pressed.\n */\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n var buttonMeshes = this.buttonMeshes;\n var analogValue;\n\n if (!button) { return; }\n\n if (button === 'trigger') {\n analogValue = evt.detail.state.value;\n // Update trigger rotation depending on button value.\n if (buttonMeshes && buttonMeshes.trigger) {\n buttonMeshes.trigger.rotation.x = -analogValue * (Math.PI / 12);\n }\n }\n\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onModelLoaded: function (evt) {\n var buttonMeshes;\n var controllerObject3D = evt.detail.model;\n var self = this;\n\n if (!this.data.model) { return; }\n\n // Store button meshes object to be able to change their colors.\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.grip = {\n left: controllerObject3D.getObjectByName('leftgrip'),\n right: controllerObject3D.getObjectByName('rightgrip')\n };\n buttonMeshes.menu = controllerObject3D.getObjectByName('menubutton');\n buttonMeshes.system = controllerObject3D.getObjectByName('systembutton');\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('touchpad');\n buttonMeshes.trigger = controllerObject3D.getObjectByName('trigger');\n\n // Set default colors.\n Object.keys(buttonMeshes).forEach(function (buttonName) {\n self.setButtonColor(buttonName, self.data.buttonColor);\n });\n\n // Offset pivot point.\n controllerObject3D.position.set(0, -0.015, 0.04);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n var color;\n var isTouch;\n if (!this.data.model) { return; }\n\n isTouch = evtName.indexOf('touch') !== -1;\n // Don't change color for trackpad touch.\n if (isTouch) { return; }\n\n // Update colors.\n color = evtName === 'up' ? this.data.buttonColor : this.data.buttonHighlightColor;\n this.setButtonColor(buttonName, color);\n },\n\n setButtonColor: function (buttonName, color) {\n var buttonMeshes = this.buttonMeshes;\n var rendererSystem = this.rendererSystem;\n\n if (!buttonMeshes) { return; }\n\n // Need to do both left and right sides for grip.\n if (buttonName === 'grip') {\n buttonMeshes.grip.left.material.color.set(color);\n buttonMeshes.grip.right.material.color.set(color);\n rendererSystem.applyColorCorrection(buttonMeshes.grip.left.material.color);\n rendererSystem.applyColorCorrection(buttonMeshes.grip.right.material.color);\n return;\n }\n buttonMeshes[buttonName].material.color.set(color);\n rendererSystem.applyColorCorrection(buttonMeshes[buttonName].material.color);\n }\n});\n\n},{\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],120:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar GAMEPAD_ID_PREFIX = 'HTC Vive Focus';\n\nvar VIVE_FOCUS_CONTROLLER_MODEL_URL = 'https://cdn.aframe.io/controllers/vive/focus-controller/focus-controller.gltf';\n\n/**\n * Vive Focus controls.\n * Interface with Vive Focus controller and map Gamepad events to\n * controller buttons: trackpad, trigger\n * Load a controller model and highlight the pressed buttons.\n */\nmodule.exports.Component = registerComponent('vive-focus-controls', {\n schema: {\n hand: {default: ''}, // This informs the degenerate arm model.\n buttonTouchedColor: {type: 'color', default: '#BBBBBB'},\n buttonHighlightColor: {type: 'color', default: '#7A7A7A'},\n model: {default: true},\n orientationOffset: {type: 'vec3'},\n armModel: {default: true}\n },\n\n /**\n * Button IDs:\n * 0 - trackpad\n * 1 - trigger\n */\n mapping: {\n axes: {trackpad: [0, 1]},\n buttons: ['trackpad', 'trigger']\n },\n\n bindMethods: function () {\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.removeControllersUpdateListener = bind(this.removeControllersUpdateListener, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.bindMethods();\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('model-loaded', this.onModelLoaded);\n el.addEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = true;\n this.addControllersUpdateListener();\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n el.removeEventListener('axismove', this.onAxisMoved);\n this.controllerEventsActive = false;\n this.removeControllersUpdateListener();\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX,\n this.data.hand ? {hand: this.data.hand} : {});\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n injectTrackedControls: function () {\n var el = this.el;\n var data = this.data;\n el.setAttribute('tracked-controls', {\n armModel: data.armModel,\n idPrefix: GAMEPAD_ID_PREFIX,\n orientationOffset: data.orientationOffset\n });\n if (!this.data.model) { return; }\n this.el.setAttribute('gltf-model', VIVE_FOCUS_CONTROLLER_MODEL_URL);\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n onModelLoaded: function (evt) {\n var controllerObject3D = evt.detail.model;\n var buttonMeshes;\n\n if (!this.data.model) { return; }\n buttonMeshes = this.buttonMeshes = {};\n buttonMeshes.trigger = controllerObject3D.getObjectByName('BumperKey');\n buttonMeshes.triggerPressed = controllerObject3D.getObjectByName('BumperKey_Press');\n if (buttonMeshes.triggerPressed) {\n buttonMeshes.triggerPressed.visible = false;\n }\n buttonMeshes.trackpad = controllerObject3D.getObjectByName('TouchPad');\n buttonMeshes.trackpadPressed = controllerObject3D.getObjectByName('TouchPad_Press');\n if (buttonMeshes.trackpadPressed) {\n buttonMeshes.trackpadPressed.visible = false;\n }\n },\n\n // No analog buttons, only emits 0/1 values\n onButtonChanged: function (evt) {\n var button = this.mapping.buttons[evt.detail.id];\n if (!button) return;\n // Pass along changed event with button state, using button mapping for convenience.\n this.el.emit(button + 'changed', evt.detail.state);\n },\n\n onAxisMoved: function (evt) {\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n updateModel: function (buttonName, evtName) {\n if (!this.data.model) { return; }\n this.updateButtonModel(buttonName, evtName);\n },\n\n updateButtonModel: function (buttonName, state) {\n var buttonMeshes = this.buttonMeshes;\n var pressedName = buttonName + 'Pressed';\n if (!buttonMeshes || !buttonMeshes[buttonName] || !buttonMeshes[pressedName]) {\n return;\n }\n var color;\n switch (state) {\n case 'down':\n color = this.data.buttonHighlightColor;\n break;\n case 'touchstart':\n color = this.data.buttonTouchedColor;\n break;\n }\n if (color) {\n buttonMeshes[pressedName].material.color.set(color);\n }\n buttonMeshes[pressedName].visible = !!color;\n buttonMeshes[buttonName].visible = !color;\n }\n});\n\n},{\"../core/component\":131,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],121:[function(_dereq_,module,exports){\nvar KEYCODE_TO_CODE = _dereq_('../constants').keyboardevent.KEYCODE_TO_CODE;\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar bind = utils.bind;\nvar shouldCaptureKeyEvent = utils.shouldCaptureKeyEvent;\n\nvar CLAMP_VELOCITY = 0.00001;\nvar MAX_DELTA = 0.2;\nvar KEYS = [\n 'KeyW', 'KeyA', 'KeyS', 'KeyD',\n 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown'\n];\n\n/**\n * WASD component to control entities using WASD keys.\n */\nmodule.exports.Component = registerComponent('wasd-controls', {\n schema: {\n acceleration: {default: 65},\n adAxis: {default: 'x', oneOf: ['x', 'y', 'z']},\n adEnabled: {default: true},\n adInverted: {default: false},\n enabled: {default: true},\n fly: {default: false},\n wsAxis: {default: 'z', oneOf: ['x', 'y', 'z']},\n wsEnabled: {default: true},\n wsInverted: {default: false}\n },\n\n init: function () {\n // To keep track of the pressed keys.\n this.keys = {};\n this.easing = 1.1;\n\n this.velocity = new THREE.Vector3();\n\n // Bind methods and add event listeners.\n this.onBlur = bind(this.onBlur, this);\n this.onContextMenu = bind(this.onContextMenu, this);\n this.onFocus = bind(this.onFocus, this);\n this.onKeyDown = bind(this.onKeyDown, this);\n this.onKeyUp = bind(this.onKeyUp, this);\n this.onVisibilityChange = bind(this.onVisibilityChange, this);\n this.attachVisibilityEventListeners();\n },\n\n tick: function (time, delta) {\n var data = this.data;\n var el = this.el;\n var velocity = this.velocity;\n\n if (!velocity[data.adAxis] && !velocity[data.wsAxis] &&\n isEmptyObject(this.keys)) { return; }\n\n // Update velocity.\n delta = delta / 1000;\n this.updateVelocity(delta);\n\n if (!velocity[data.adAxis] && !velocity[data.wsAxis]) { return; }\n\n // Get movement vector and translate position.\n el.object3D.position.add(this.getMovementVector(delta));\n },\n\n remove: function () {\n this.removeKeyEventListeners();\n this.removeVisibilityEventListeners();\n },\n\n play: function () {\n this.attachKeyEventListeners();\n },\n\n pause: function () {\n this.keys = {};\n this.removeKeyEventListeners();\n },\n\n updateVelocity: function (delta) {\n var acceleration;\n var adAxis;\n var adSign;\n var data = this.data;\n var keys = this.keys;\n var velocity = this.velocity;\n var wsAxis;\n var wsSign;\n\n adAxis = data.adAxis;\n wsAxis = data.wsAxis;\n\n // If FPS too low, reset velocity.\n if (delta > MAX_DELTA) {\n velocity[adAxis] = 0;\n velocity[wsAxis] = 0;\n return;\n }\n\n // https://gamedev.stackexchange.com/questions/151383/frame-rate-independant-movement-with-acceleration\n var scaledEasing = Math.pow(1 / this.easing, delta * 60);\n // Velocity Easing.\n if (velocity[adAxis] !== 0) {\n velocity[adAxis] = velocity[adAxis] * scaledEasing;\n }\n if (velocity[wsAxis] !== 0) {\n velocity[wsAxis] = velocity[wsAxis] * scaledEasing;\n }\n\n // Clamp velocity easing.\n if (Math.abs(velocity[adAxis]) < CLAMP_VELOCITY) { velocity[adAxis] = 0; }\n if (Math.abs(velocity[wsAxis]) < CLAMP_VELOCITY) { velocity[wsAxis] = 0; }\n\n if (!data.enabled) { return; }\n\n // Update velocity using keys pressed.\n acceleration = data.acceleration;\n if (data.adEnabled) {\n adSign = data.adInverted ? -1 : 1;\n if (keys.KeyA || keys.ArrowLeft) { velocity[adAxis] -= adSign * acceleration * delta; }\n if (keys.KeyD || keys.ArrowRight) { velocity[adAxis] += adSign * acceleration * delta; }\n }\n if (data.wsEnabled) {\n wsSign = data.wsInverted ? -1 : 1;\n if (keys.KeyW || keys.ArrowUp) { velocity[wsAxis] -= wsSign * acceleration * delta; }\n if (keys.KeyS || keys.ArrowDown) { velocity[wsAxis] += wsSign * acceleration * delta; }\n }\n },\n\n getMovementVector: (function () {\n var directionVector = new THREE.Vector3(0, 0, 0);\n var rotationEuler = new THREE.Euler(0, 0, 0, 'YXZ');\n\n return function (delta) {\n var rotation = this.el.getAttribute('rotation');\n var velocity = this.velocity;\n var xRotation;\n\n directionVector.copy(velocity);\n directionVector.multiplyScalar(delta);\n\n // Absolute.\n if (!rotation) { return directionVector; }\n\n xRotation = this.data.fly ? rotation.x : 0;\n\n // Transform direction relative to heading.\n rotationEuler.set(THREE.Math.degToRad(xRotation), THREE.Math.degToRad(rotation.y), 0);\n directionVector.applyEuler(rotationEuler);\n return directionVector;\n };\n })(),\n\n attachVisibilityEventListeners: function () {\n window.oncontextmenu = this.onContextMenu;\n window.addEventListener('blur', this.onBlur);\n window.addEventListener('focus', this.onFocus);\n document.addEventListener('visibilitychange', this.onVisibilityChange);\n },\n\n removeVisibilityEventListeners: function () {\n window.removeEventListener('blur', this.onBlur);\n window.removeEventListener('focus', this.onFocus);\n document.removeEventListener('visibilitychange', this.onVisibilityChange);\n },\n\n attachKeyEventListeners: function () {\n window.addEventListener('keydown', this.onKeyDown);\n window.addEventListener('keyup', this.onKeyUp);\n },\n\n removeKeyEventListeners: function () {\n window.removeEventListener('keydown', this.onKeyDown);\n window.removeEventListener('keyup', this.onKeyUp);\n },\n\n onContextMenu: function () {\n var keys = Object.keys(this.keys);\n for (var i = 0; i < keys.length; i++) {\n delete this.keys[keys[i]];\n }\n },\n\n onBlur: function () {\n this.pause();\n },\n\n onFocus: function () {\n this.play();\n },\n\n onVisibilityChange: function () {\n if (document.hidden) {\n this.onBlur();\n } else {\n this.onFocus();\n }\n },\n\n onKeyDown: function (event) {\n var code;\n if (!shouldCaptureKeyEvent(event)) { return; }\n code = event.code || KEYCODE_TO_CODE[event.keyCode];\n if (KEYS.indexOf(code) !== -1) { this.keys[code] = true; }\n },\n\n onKeyUp: function (event) {\n var code;\n code = event.code || KEYCODE_TO_CODE[event.keyCode];\n delete this.keys[code];\n }\n});\n\nfunction isEmptyObject (keys) {\n var key;\n for (key in keys) { return false; }\n return true;\n}\n\n},{\"../constants\":123,\"../core/component\":131,\"../lib/three\":179,\"../utils/\":205}],122:[function(_dereq_,module,exports){\n/* global THREE */\nvar registerComponent = _dereq_('../core/component').registerComponent;\nvar bind = _dereq_('../utils/bind');\n\nvar trackedControlsUtils = _dereq_('../utils/tracked-controls');\nvar checkControllerPresentAndSetup = trackedControlsUtils.checkControllerPresentAndSetup;\nvar emitIfAxesChanged = trackedControlsUtils.emitIfAxesChanged;\nvar onButtonEvent = trackedControlsUtils.onButtonEvent;\n\nvar utils = _dereq_('../utils/');\n\nvar debug = utils.debug('components:windows-motion-controls:debug');\nvar warn = utils.debug('components:windows-motion-controls:warn');\n\nvar DEFAULT_HANDEDNESS = _dereq_('../constants').DEFAULT_HANDEDNESS;\n\nvar MODEL_BASE_URL = 'https://cdn.aframe.io/controllers/microsoft/';\nvar MODEL_FILENAMES = { left: 'left.glb', right: 'right.glb', default: 'universal.glb' };\n\nvar isWebXRAvailable = _dereq_('../utils/').device.isWebXRAvailable;\n\nvar GAMEPAD_ID_WEBXR = 'windows-mixed-reality';\nvar GAMEPAD_ID_WEBVR = 'Spatial Controller (Spatial Interaction Source) ';\nvar GAMEPAD_ID_PATTERN = /([0-9a-zA-Z]+-[0-9a-zA-Z]+)$/;\n\nvar GAMEPAD_ID_PREFIX = isWebXRAvailable ? GAMEPAD_ID_WEBXR : GAMEPAD_ID_WEBVR;\n\nvar INPUT_MAPPING_WEBVR = {\n // A-Frame specific semantic axis names\n axes: {'thumbstick': [0, 1], 'trackpad': [2, 3]},\n // A-Frame specific semantic button names\n buttons: ['thumbstick', 'trigger', 'grip', 'menu', 'trackpad'],\n // A mapping of the semantic name to node name in the glTF model file,\n // that should be transformed by axis value.\n // This array mirrors the browser Gamepad.axes array, such that\n // the mesh corresponding to axis 0 is in this array index 0.\n axisMeshNames: [\n 'THUMBSTICK_X',\n 'THUMBSTICK_Y',\n 'TOUCHPAD_TOUCH_X',\n 'TOUCHPAD_TOUCH_Y'\n ],\n // A mapping of the semantic name to button node name in the glTF model file,\n // that should be transformed by button value.\n buttonMeshNames: {\n 'trigger': 'SELECT',\n 'menu': 'MENU',\n 'grip': 'GRASP',\n 'thumbstick': 'THUMBSTICK_PRESS',\n 'trackpad': 'TOUCHPAD_PRESS'\n },\n pointingPoseMeshName: 'POINTING_POSE'\n};\n\nvar INPUT_MAPPING_WEBXR = {\n // A-Frame specific semantic axis names\n axes: {'touchpad': [0, 1], 'thumbstick': [2, 3]},\n // A-Frame specific semantic button names\n buttons: ['trigger', 'squeeze', 'touchpad', 'thumbstick', 'menu'],\n // A mapping of the semantic name to node name in the glTF model file,\n // that should be transformed by axis value.\n // This array mirrors the browser Gamepad.axes array, such that\n // the mesh corresponding to axis 0 is in this array index 0.\n axisMeshNames: [\n 'TOUCHPAD_TOUCH_X',\n 'TOUCHPAD_TOUCH_X',\n 'THUMBSTICK_X',\n 'THUMBSTICK_Y'\n ],\n // A mapping of the semantic name to button node name in the glTF model file,\n // that should be transformed by button value.\n buttonMeshNames: {\n 'trigger': 'SELECT',\n 'menu': 'MENU',\n 'squeeze': 'GRASP',\n 'thumbstick': 'THUMBSTICK_PRESS',\n 'touchpad': 'TOUCHPAD_PRESS'\n },\n pointingPoseMeshName: 'POINTING_POSE'\n};\n\nvar INPUT_MAPPING = isWebXRAvailable ? INPUT_MAPPING_WEBXR : INPUT_MAPPING_WEBVR;\n\n/**\n * Windows Motion Controller controls.\n * Interface with Windows Motion Controller controllers and map Gamepad events to\n * controller buttons: trackpad, trigger, grip, menu, thumbstick\n * Load a controller model and transform the pressed buttons.\n */\nmodule.exports.Component = registerComponent('windows-motion-controls', {\n schema: {\n hand: {default: DEFAULT_HANDEDNESS},\n // It is possible to have multiple pairs of controllers attached (a pair has both left and right).\n // Set this to 1 to use a controller from the second pair, 2 from the third pair, etc.\n pair: {default: 0},\n // If true, loads the controller glTF asset.\n model: {default: true},\n // If true, will hide the model from the scene if no matching gamepad (based on ID & hand) is connected.\n hideDisconnected: {default: true}\n },\n\n mapping: INPUT_MAPPING,\n\n bindMethods: function () {\n this.onModelError = bind(this.onModelError, this);\n this.onModelLoaded = bind(this.onModelLoaded, this);\n this.onControllersUpdate = bind(this.onControllersUpdate, this);\n this.checkIfControllerPresent = bind(this.checkIfControllerPresent, this);\n this.onAxisMoved = bind(this.onAxisMoved, this);\n },\n\n init: function () {\n var self = this;\n var el = this.el;\n this.onButtonChanged = bind(this.onButtonChanged, this);\n this.onButtonDown = function (evt) { onButtonEvent(evt.detail.id, 'down', self); };\n this.onButtonUp = function (evt) { onButtonEvent(evt.detail.id, 'up', self); };\n this.onButtonTouchStart = function (evt) { onButtonEvent(evt.detail.id, 'touchstart', self); };\n this.onButtonTouchEnd = function (evt) { onButtonEvent(evt.detail.id, 'touchend', self); };\n this.onControllerConnected = function () { self.setModelVisibility(true); };\n this.onControllerDisconnected = function () { self.setModelVisibility(false); };\n this.controllerPresent = false;\n this.lastControllerCheck = 0;\n this.previousButtonValues = {};\n this.bindMethods();\n\n // Cache for submeshes that we have looked up by name.\n this.loadedMeshInfo = {\n buttonMeshes: null,\n axisMeshes: null\n };\n\n // Pointing poses\n this.rayOrigin = {\n origin: new THREE.Vector3(),\n direction: new THREE.Vector3(0, 0, -1),\n createdFromMesh: false\n };\n\n el.addEventListener('controllerconnected', this.onControllerConnected);\n el.addEventListener('controllerdisconnected', this.onControllerDisconnected);\n },\n\n addEventListeners: function () {\n var el = this.el;\n el.addEventListener('buttonchanged', this.onButtonChanged);\n el.addEventListener('buttondown', this.onButtonDown);\n el.addEventListener('buttonup', this.onButtonUp);\n el.addEventListener('touchstart', this.onButtonTouchStart);\n el.addEventListener('touchend', this.onButtonTouchEnd);\n el.addEventListener('axismove', this.onAxisMoved);\n el.addEventListener('model-error', this.onModelError);\n el.addEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = true;\n },\n\n removeEventListeners: function () {\n var el = this.el;\n el.removeEventListener('buttonchanged', this.onButtonChanged);\n el.removeEventListener('buttondown', this.onButtonDown);\n el.removeEventListener('buttonup', this.onButtonUp);\n el.removeEventListener('touchstart', this.onButtonTouchStart);\n el.removeEventListener('touchend', this.onButtonTouchEnd);\n el.removeEventListener('axismove', this.onAxisMoved);\n el.removeEventListener('model-error', this.onModelError);\n el.removeEventListener('model-loaded', this.onModelLoaded);\n this.controllerEventsActive = false;\n },\n\n checkIfControllerPresent: function () {\n checkControllerPresentAndSetup(this, GAMEPAD_ID_PREFIX, {\n hand: this.data.hand,\n index: this.data.pair,\n iterateControllerProfiles: true\n });\n },\n\n play: function () {\n this.checkIfControllerPresent();\n this.addControllersUpdateListener();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.removeControllersUpdateListener();\n },\n\n updateControllerModel: function () {\n // If we do not want to load a model, or, have already loaded the model, emit the controllermodelready event.\n if (!this.data.model || this.rayOrigin.createdFromMesh) {\n this.modelReady();\n return;\n }\n\n var sourceUrl = this.createControllerModelUrl();\n this.loadModel(sourceUrl);\n },\n\n /**\n * Helper function that constructs a URL from the controller ID suffix, for future proofed\n * art assets.\n */\n createControllerModelUrl: function (forceDefault) {\n // Determine the device specific folder based on the ID suffix\n var trackedControlsComponent = this.el.components['tracked-controls'];\n var controller = trackedControlsComponent ? trackedControlsComponent.controller : null;\n var device = 'default';\n var hand = this.data.hand;\n var filename;\n\n if (controller && !window.hasNativeWebXRImplementation) {\n // Read hand directly from the controller, rather than this.data, as in the case that the controller\n // is unhanded this.data will still have 'left' or 'right' (depending on what the user inserted in to the scene).\n // In this case, we want to load the universal model, so need to get the '' from the controller.\n hand = controller.hand;\n\n if (!forceDefault) {\n var match = controller.id.match(GAMEPAD_ID_PATTERN);\n device = ((match && match[0]) || device);\n }\n }\n\n // Hand\n filename = MODEL_FILENAMES[hand] || MODEL_FILENAMES.default;\n\n // Final url\n return MODEL_BASE_URL + device + '/' + filename;\n },\n\n injectTrackedControls: function () {\n var data = this.data;\n this.el.setAttribute('tracked-controls', {\n idPrefix: GAMEPAD_ID_PREFIX,\n controller: data.pair,\n hand: data.hand,\n armModel: false\n });\n\n this.updateControllerModel();\n },\n\n addControllersUpdateListener: function () {\n this.el.sceneEl.addEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n removeControllersUpdateListener: function () {\n this.el.sceneEl.removeEventListener('controllersupdated', this.onControllersUpdate, false);\n },\n\n onControllersUpdate: function () {\n this.checkIfControllerPresent();\n },\n\n onModelError: function (evt) {\n var defaultUrl = this.createControllerModelUrl(true);\n if (evt.detail.src !== defaultUrl) {\n warn('Failed to load controller model for device, attempting to load default.');\n this.loadModel(defaultUrl);\n } else {\n warn('Failed to load default controller model.');\n }\n },\n\n loadModel: function (url) {\n // The model is loaded by the gltf-model compoent when this attribute is initially set,\n // removed and re-loaded if the given url changes.\n this.el.setAttribute('gltf-model', 'url(' + url + ')');\n },\n\n onModelLoaded: function (evt) {\n var rootNode = this.controllerModel = evt.detail.model;\n var loadedMeshInfo = this.loadedMeshInfo;\n var i;\n var meshName;\n var mesh;\n var meshInfo;\n\n debug('Processing model');\n\n // Reset the caches\n loadedMeshInfo.buttonMeshes = {};\n loadedMeshInfo.axisMeshes = {};\n\n // Cache our meshes so we aren't traversing the hierarchy per frame\n if (rootNode) {\n // Button Meshes\n for (i = 0; i < this.mapping.buttons.length; i++) {\n meshName = this.mapping.buttonMeshNames[this.mapping.buttons[i]];\n if (!meshName) {\n debug('Skipping unknown button at index: ' + i + ' with mapped name: ' + this.mapping.buttons[i]);\n continue;\n }\n\n mesh = rootNode.getObjectByName(meshName);\n if (!mesh) {\n warn('Missing button mesh with name: ' + meshName);\n continue;\n }\n\n meshInfo = {\n index: i,\n value: getImmediateChildByName(mesh, 'VALUE'),\n pressed: getImmediateChildByName(mesh, 'PRESSED'),\n unpressed: getImmediateChildByName(mesh, 'UNPRESSED')\n };\n if (meshInfo.value && meshInfo.pressed && meshInfo.unpressed) {\n loadedMeshInfo.buttonMeshes[this.mapping.buttons[i]] = meshInfo;\n } else {\n // If we didn't find the mesh, it simply means this button won't have transforms applied as mapped button value changes.\n warn('Missing button submesh under mesh with name: ' + meshName +\n '(VALUE: ' + !!meshInfo.value +\n ', PRESSED: ' + !!meshInfo.pressed +\n ', UNPRESSED:' + !!meshInfo.unpressed +\n ')');\n }\n }\n\n // Axis Meshes\n for (i = 0; i < this.mapping.axisMeshNames.length; i++) {\n meshName = this.mapping.axisMeshNames[i];\n if (!meshName) {\n debug('Skipping unknown axis at index: ' + i);\n continue;\n }\n\n mesh = rootNode.getObjectByName(meshName);\n if (!mesh) {\n warn('Missing axis mesh with name: ' + meshName);\n continue;\n }\n\n meshInfo = {\n index: i,\n value: getImmediateChildByName(mesh, 'VALUE'),\n min: getImmediateChildByName(mesh, 'MIN'),\n max: getImmediateChildByName(mesh, 'MAX')\n };\n if (meshInfo.value && meshInfo.min && meshInfo.max) {\n loadedMeshInfo.axisMeshes[i] = meshInfo;\n } else {\n // If we didn't find the mesh, it simply means this axis won't have transforms applied as mapped axis values change.\n warn('Missing axis submesh under mesh with name: ' + meshName +\n '(VALUE: ' + !!meshInfo.value +\n ', MIN: ' + !!meshInfo.min +\n ', MAX:' + !!meshInfo.max +\n ')');\n }\n }\n\n this.calculateRayOriginFromMesh(rootNode);\n // Determine if the model has to be visible or not.\n this.setModelVisibility();\n }\n\n debug('Model load complete.');\n\n // Look through only immediate children. This will return null if no mesh exists with the given name.\n function getImmediateChildByName (object3d, value) {\n for (var i = 0, l = object3d.children.length; i < l; i++) {\n var obj = object3d.children[i];\n if (obj && obj['name'] === value) {\n return obj;\n }\n }\n return undefined;\n }\n },\n\n calculateRayOriginFromMesh: (function () {\n var quaternion = new THREE.Quaternion();\n return function (rootNode) {\n var mesh;\n\n // Calculate the pointer pose (used for rays), by applying the world transform of th POINTER_POSE node\n // in the glTF (assumes that root node is at world origin)\n this.rayOrigin.origin.set(0, 0, 0);\n this.rayOrigin.direction.set(0, 0, -1);\n this.rayOrigin.createdFromMesh = true;\n\n // Try to read Pointing pose from the source model\n mesh = rootNode.getObjectByName(this.mapping.pointingPoseMeshName);\n if (mesh) {\n var parent = rootNode.parent;\n\n // We need to read pose transforms accumulated from the root of the glTF, not the scene.\n if (parent) {\n rootNode.parent = null;\n rootNode.updateMatrixWorld(true);\n rootNode.parent = parent;\n }\n\n mesh.getWorldPosition(this.rayOrigin.origin);\n mesh.getWorldQuaternion(quaternion);\n this.rayOrigin.direction.applyQuaternion(quaternion);\n\n // Recalculate the world matrices now that the rootNode is re-attached to the parent.\n if (parent) {\n rootNode.updateMatrixWorld(true);\n }\n } else {\n debug('Mesh does not contain pointing origin data, defaulting to none.');\n }\n\n // Emit event stating that our pointing ray is now accurate.\n this.modelReady();\n };\n })(),\n\n lerpAxisTransform: (function () {\n var quaternion = new THREE.Quaternion();\n return function (axis, axisValue) {\n var axisMeshInfo = this.loadedMeshInfo.axisMeshes[axis];\n if (!axisMeshInfo) return;\n\n var min = axisMeshInfo.min;\n var max = axisMeshInfo.max;\n var target = axisMeshInfo.value;\n\n // Convert from gamepad value range (-1 to +1) to lerp range (0 to 1)\n var lerpValue = axisValue * 0.5 + 0.5;\n target.setRotationFromQuaternion(quaternion.copy(min.quaternion).slerp(max.quaternion, lerpValue));\n target.position.lerpVectors(min.position, max.position, lerpValue);\n };\n })(),\n\n lerpButtonTransform: (function () {\n var quaternion = new THREE.Quaternion();\n return function (buttonName, buttonValue) {\n var buttonMeshInfo = this.loadedMeshInfo.buttonMeshes[buttonName];\n if (!buttonMeshInfo) return;\n\n var min = buttonMeshInfo.unpressed;\n var max = buttonMeshInfo.pressed;\n var target = buttonMeshInfo.value;\n\n target.setRotationFromQuaternion(quaternion.copy(min.quaternion).slerp(max.quaternion, buttonValue));\n target.position.lerpVectors(min.position, max.position, buttonValue);\n };\n })(),\n\n modelReady: function () {\n this.el.emit('controllermodelready', {\n name: 'windows-motion-controls',\n model: this.data.model,\n rayOrigin: this.rayOrigin\n });\n },\n\n onButtonChanged: function (evt) {\n var buttonName = this.mapping.buttons[evt.detail.id];\n\n if (buttonName) {\n // Update the button mesh transform\n if (this.loadedMeshInfo && this.loadedMeshInfo.buttonMeshes) {\n this.lerpButtonTransform(buttonName, evt.detail.state.value);\n }\n\n // Only emit events for buttons that we know how to map from index to name\n this.el.emit(buttonName + 'changed', evt.detail.state);\n }\n },\n\n onAxisMoved: function (evt) {\n var numAxes = this.mapping.axisMeshNames.length;\n\n // Only attempt to update meshes if we have valid data.\n if (this.loadedMeshInfo && this.loadedMeshInfo.axisMeshes) {\n for (var axis = 0; axis < numAxes; axis++) {\n // Update the button mesh transform\n this.lerpAxisTransform(axis, evt.detail.axis[axis] || 0.0);\n }\n }\n\n emitIfAxesChanged(this, this.mapping.axes, evt);\n },\n\n setModelVisibility: function (visible) {\n var model = this.el.getObject3D('mesh');\n visible = visible !== undefined ? visible : this.modelVisible;\n this.modelVisible = visible;\n if (!model) { return; }\n model.visible = visible;\n }\n});\n\n},{\"../constants\":123,\"../core/component\":131,\"../utils/\":205,\"../utils/bind\":199,\"../utils/tracked-controls\":214}],123:[function(_dereq_,module,exports){\nmodule.exports = {\n AFRAME_INJECTED: 'aframe-injected',\n DEFAULT_CAMERA_HEIGHT: 1.6,\n DEFAULT_HANDEDNESS: 'right',\n keyboardevent: _dereq_('./keyboardevent')\n};\n\n},{\"./keyboardevent\":124}],124:[function(_dereq_,module,exports){\nmodule.exports = {\n // Tiny KeyboardEvent.code polyfill.\n KEYCODE_TO_CODE: {\n '38': 'ArrowUp',\n '37': 'ArrowLeft',\n '40': 'ArrowDown',\n '39': 'ArrowRight',\n '87': 'KeyW',\n '65': 'KeyA',\n '83': 'KeyS',\n '68': 'KeyD'\n }\n};\n\n},{}],125:[function(_dereq_,module,exports){\nvar ANode = _dereq_('./a-node');\nvar bind = _dereq_('../utils/bind');\nvar debug = _dereq_('../utils/debug');\nvar registerElement = _dereq_('./a-register-element').registerElement;\nvar THREE = _dereq_('../lib/three');\n\nvar fileLoader = new THREE.FileLoader();\nvar warn = debug('core:a-assets:warn');\n\n/**\n * Asset management system. Handles blocking on asset loading.\n */\nmodule.exports = registerElement('a-assets', {\n prototype: Object.create(ANode.prototype, {\n createdCallback: {\n value: function () {\n this.isAssets = true;\n this.fileLoader = fileLoader;\n this.timeout = null;\n }\n },\n\n attachedCallback: {\n value: function () {\n var self = this;\n var i;\n var loaded = [];\n var mediaEl;\n var mediaEls;\n var imgEl;\n var imgEls;\n var timeout;\n\n if (!this.parentNode.isScene) {\n throw new Error('<a-assets> must be a child of a <a-scene>.');\n }\n\n // Wait for <img>s.\n imgEls = this.querySelectorAll('img');\n for (i = 0; i < imgEls.length; i++) {\n imgEl = fixUpMediaElement(imgEls[i]);\n loaded.push(new Promise(function (resolve, reject) {\n // Set in cache because we won't be needing to call three.js loader if we have.\n // a loaded media element.\n THREE.Cache.files[imgEls[i].getAttribute('src')] = imgEl;\n imgEl.onload = resolve;\n imgEl.onerror = reject;\n }));\n }\n\n // Wait for <audio>s and <video>s.\n mediaEls = this.querySelectorAll('audio, video');\n for (i = 0; i < mediaEls.length; i++) {\n mediaEl = fixUpMediaElement(mediaEls[i]);\n if (!mediaEl.src && !mediaEl.srcObject) {\n warn('Audio/video asset has neither `src` nor `srcObject` attributes.');\n }\n loaded.push(mediaElementLoaded(mediaEl));\n }\n\n // Trigger loaded for scene to start rendering.\n Promise.all(loaded).then(bind(this.load, this));\n\n // Timeout to start loading anyways.\n timeout = parseInt(this.getAttribute('timeout'), 10) || 3000;\n this.timeout = setTimeout(function () {\n if (self.hasLoaded) { return; }\n warn('Asset loading timed out in ', timeout, 'ms');\n self.emit('timeout');\n self.load();\n }, timeout);\n }\n },\n\n detachedCallback: {\n value: function () {\n if (this.timeout) { clearTimeout(this.timeout); }\n }\n },\n\n load: {\n value: function () {\n ANode.prototype.load.call(this, null, function waitOnFilter (el) {\n return el.isAssetItem && el.hasAttribute('src');\n });\n }\n }\n })\n});\n\n/**\n * Preload using XHRLoader for any type of asset.\n */\nregisterElement('a-asset-item', {\n prototype: Object.create(ANode.prototype, {\n createdCallback: {\n value: function () {\n this.data = null;\n this.isAssetItem = true;\n }\n },\n\n attachedCallback: {\n value: function () {\n var self = this;\n var src = this.getAttribute('src');\n fileLoader.setResponseType(\n this.getAttribute('response-type') || inferResponseType(src));\n fileLoader.load(src, function handleOnLoad (response) {\n self.data = response;\n /*\n Workaround for a Chrome bug. If another XHR is sent to the same url before the\n previous one closes, the second request never finishes.\n setTimeout finishes the first request and lets the logic triggered by load open\n subsequent requests.\n setTimeout can be removed once the fix for the bug below ships:\n https://bugs.chromium.org/p/chromium/issues/detail?id=633696&q=component%3ABlink%3ENetwork%3EXHR%20&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified\n */\n setTimeout(function load () { ANode.prototype.load.call(self); });\n }, function handleOnProgress (xhr) {\n self.emit('progress', {\n loadedBytes: xhr.loaded,\n totalBytes: xhr.total,\n xhr: xhr\n });\n }, function handleOnError (xhr) {\n self.emit('error', {xhr: xhr});\n });\n }\n }\n })\n});\n\n/**\n * Create a Promise that resolves once the media element has finished buffering.\n *\n * @param {Element} el - HTMLMediaElement.\n * @returns {Promise}\n */\nfunction mediaElementLoaded (el) {\n if (!el.hasAttribute('autoplay') && el.getAttribute('preload') !== 'auto') {\n return;\n }\n\n // If media specifies autoplay or preload, wait until media is completely buffered.\n return new Promise(function (resolve, reject) {\n if (el.readyState === 4) { return resolve(); } // Already loaded.\n if (el.error) { return reject(); } // Error.\n\n el.addEventListener('loadeddata', checkProgress, false);\n el.addEventListener('progress', checkProgress, false);\n el.addEventListener('error', reject, false);\n\n function checkProgress () {\n // Add up the seconds buffered.\n var secondsBuffered = 0;\n for (var i = 0; i < el.buffered.length; i++) {\n secondsBuffered += el.buffered.end(i) - el.buffered.start(i);\n }\n\n // Compare seconds buffered to media duration.\n if (secondsBuffered >= el.duration) {\n // Set in cache because we won't be needing to call three.js loader if we have.\n // a loaded media element.\n // Store video elements only. three.js loader is used for audio elements.\n // See assetParse too.\n if (el.tagName === 'VIDEO') {\n THREE.Cache.files[el.getAttribute('src')] = el;\n }\n resolve();\n }\n }\n });\n}\n\n/**\n * Automatically add attributes to media elements where convenient.\n * crossorigin, playsinline.\n */\nfunction fixUpMediaElement (mediaEl) {\n // Cross-origin.\n var newMediaEl = setCrossOrigin(mediaEl);\n\n // Plays inline for mobile.\n if (newMediaEl.tagName && newMediaEl.tagName.toLowerCase() === 'video') {\n newMediaEl.setAttribute('playsinline', '');\n newMediaEl.setAttribute('webkit-playsinline', '');\n }\n\n if (newMediaEl !== mediaEl) {\n mediaEl.parentNode.appendChild(newMediaEl);\n mediaEl.parentNode.removeChild(mediaEl);\n }\n return newMediaEl;\n}\n\n/**\n * Automatically set `crossorigin` if not defined on the media element.\n * If it is not defined, we must create and re-append a new media element <img> and\n * have the browser re-request it with `crossorigin` set.\n *\n * @param {Element} Media element (e.g., <img>, <audio>, <video>).\n * @returns {Element} Media element to be used to listen to for loaded events.\n */\nfunction setCrossOrigin (mediaEl) {\n var newMediaEl;\n var src;\n\n // Already has crossorigin set.\n if (mediaEl.hasAttribute('crossorigin')) { return mediaEl; }\n\n src = mediaEl.getAttribute('src');\n\n if (src !== null) {\n // Does not have protocol.\n if (src.indexOf('://') === -1) { return mediaEl; }\n\n // Determine if cross origin is actually needed.\n if (extractDomain(src) === window.location.host) { return mediaEl; }\n }\n\n warn('Cross-origin element (e.g., <img>) was requested without `crossorigin` set. ' +\n 'A-Frame will re-request the asset with `crossorigin` attribute set. ' +\n 'Please set `crossorigin` on the element (e.g., <img crossorigin=\"anonymous\">)', src);\n mediaEl.crossOrigin = 'anonymous';\n newMediaEl = mediaEl.cloneNode(true);\n return newMediaEl;\n}\n\n/**\n * Extract domain out of URL.\n *\n * @param {string} url\n * @returns {string}\n */\nfunction extractDomain (url) {\n // Find and remove protocol (e.g., http, ftp, etc.) to get domain.\n var domain = url.indexOf('://') > -1 ? url.split('/')[2] : url.split('/')[0];\n\n // Find and remove port number.\n return domain.substring(0, domain.indexOf(':'));\n}\n\n/**\n * Infer response-type attribute from src.\n * Default is text (default XMLHttpRequest.responseType)\n * and arraybuffer for .glb files.\n *\n * @param {string} src\n * @returns {string}\n */\nfunction inferResponseType (src) {\n var fileName = getFileNameFromURL(src);\n var dotLastIndex = fileName.lastIndexOf('.');\n if (dotLastIndex >= 0) {\n var extension = fileName.slice(dotLastIndex, src.search(/\\?|#|$/));\n if (extension === '.glb') {\n return 'arraybuffer';\n }\n }\n return 'text';\n}\nmodule.exports.inferResponseType = inferResponseType;\n\n/**\n * Extract filename from URL\n *\n * @param {string} url\n * @returns {string}\n */\nfunction getFileNameFromURL (url) {\n var parser = document.createElement('a');\n parser.href = url;\n var query = parser.search.replace(/^\\?/, '');\n var filePath = url.replace(query, '').replace('?', '');\n return filePath.substring(filePath.lastIndexOf('/') + 1);\n}\nmodule.exports.getFileNameFromURL = getFileNameFromURL;\n\n},{\"../lib/three\":179,\"../utils/bind\":199,\"../utils/debug\":201,\"./a-node\":129,\"./a-register-element\":130}],126:[function(_dereq_,module,exports){\nvar debug = _dereq_('../utils/debug');\nvar registerElement = _dereq_('./a-register-element').registerElement;\n\nvar warn = debug('core:cubemap:warn');\n\n/**\n * Cubemap element that handles validation and exposes list of URLs.\n * Does not listen to updates.\n */\nmodule.exports = registerElement('a-cubemap', {\n prototype: Object.create(window.HTMLElement.prototype, {\n /**\n * Calculates this.srcs.\n */\n attachedCallback: {\n value: function () {\n this.srcs = this.validate();\n },\n writable: window.debug\n },\n\n /**\n * Checks for exactly six elements with [src].\n * Does not check explicitly for <img>s in case user does not want\n * prefetching.\n *\n * @returns {Array|null} - six URLs if valid, else null.\n */\n validate: {\n value: function () {\n var elements = this.querySelectorAll('[src]');\n var i;\n var srcs = [];\n if (elements.length === 6) {\n for (i = 0; i < elements.length; i++) {\n srcs.push(elements[i].getAttribute('src'));\n }\n return srcs;\n }\n // Else if there are not six elements, throw a warning.\n warn(\n '<a-cubemap> did not contain exactly six elements each with a ' +\n '`src` attribute.');\n },\n writable: window.debug\n }\n })\n});\n\n},{\"../utils/debug\":201,\"./a-register-element\":130}],127:[function(_dereq_,module,exports){\nvar ANode = _dereq_('./a-node');\nvar COMPONENTS = _dereq_('./component').components;\nvar registerElement = _dereq_('./a-register-element').registerElement;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar AEntity;\nvar debug = utils.debug('core:a-entity:debug');\nvar warn = utils.debug('core:a-entity:warn');\n\nvar MULTIPLE_COMPONENT_DELIMITER = '__';\nvar OBJECT3D_COMPONENTS = ['position', 'rotation', 'scale', 'visible'];\nvar ONCE = {once: true};\n\n/**\n * Entity is a container object that components are plugged into to comprise everything in\n * the scene. In A-Frame, they inherently have position, rotation, and scale.\n *\n * To be able to take components, the scene element inherits from the entity definition.\n *\n * @member {object} components - entity's currently initialized components.\n * @member {object} object3D - three.js object.\n * @member {array} states\n * @member {boolean} isPlaying - false if dynamic behavior of the entity is paused.\n */\nvar proto = Object.create(ANode.prototype, {\n createdCallback: {\n value: function () {\n this.components = {};\n // To avoid double initializations and infinite loops.\n this.initializingComponents = {};\n this.componentsToUpdate = {};\n this.isEntity = true;\n this.isPlaying = false;\n this.object3D = new THREE.Group();\n this.object3D.el = this;\n this.object3DMap = {};\n this.parentEl = null;\n this.rotationObj = {};\n this.states = [];\n }\n },\n\n /**\n * Handle changes coming from the browser DOM inspector.\n */\n attributeChangedCallback: {\n value: function (attr, oldVal, newVal) {\n var component = this.components[attr];\n // If the empty string is passed by the component initialization\n // logic we ignore the component update.\n if (component && component.justInitialized && newVal === '') {\n delete component.justInitialized;\n return;\n }\n // When a component is removed after calling el.removeAttribute('material')\n if (!component && newVal === null) { return; }\n this.setEntityAttribute(attr, oldVal, newVal);\n }\n },\n\n /**\n * Add to parent, load, play.\n */\n attachedCallback: {\n value: function () {\n var assetsEl; // Asset management system element.\n var sceneEl = this.sceneEl;\n var self = this; // Component.\n\n this.addToParent();\n\n // Don't .load() scene on attachedCallback.\n if (this.isScene) { return; }\n\n // Gracefully not error when outside of <a-scene> (e.g., tests).\n if (!sceneEl) {\n this.load();\n return;\n }\n\n // Wait for asset management system to finish before loading.\n assetsEl = sceneEl.querySelector('a-assets');\n if (assetsEl && !assetsEl.hasLoaded) {\n assetsEl.addEventListener('loaded', function () { self.load(); });\n return;\n }\n this.load();\n }\n },\n\n /**\n * Tell parent to remove this element's object3D from its object3D.\n * Do not call on scene element because that will cause a call to document.body.remove().\n */\n detachedCallback: {\n value: function () {\n var componentName;\n\n if (!this.parentEl) { return; }\n\n // Remove components.\n for (componentName in this.components) {\n this.removeComponent(componentName, false);\n }\n\n if (this.isScene) { return; }\n\n this.removeFromParent();\n ANode.prototype.detachedCallback.call(this);\n\n // Remove cyclic reference.\n this.object3D.el = null;\n }\n },\n\n getObject3D: {\n value: function (type) {\n return this.object3DMap[type];\n }\n },\n\n /**\n * Set a THREE.Object3D into the map.\n *\n * @param {string} type - Developer-set name of the type of object, will be unique per type.\n * @param {object} obj - A THREE.Object3D.\n */\n setObject3D: {\n value: function (type, obj) {\n var oldObj;\n var self = this;\n\n if (!(obj instanceof THREE.Object3D)) {\n throw new Error(\n '`Entity.setObject3D` was called with an object that was not an instance of ' +\n 'THREE.Object3D.'\n );\n }\n\n // Remove existing object of the type.\n oldObj = this.getObject3D(type);\n if (oldObj) { this.object3D.remove(oldObj); }\n\n // Set references to A-Frame entity.\n obj.el = this;\n if (obj.children.length) {\n obj.traverse(function bindEl (child) {\n child.el = self;\n });\n }\n\n // Add.\n this.object3D.add(obj);\n this.object3DMap[type] = obj;\n this.emit('object3dset', {object: obj, type: type});\n }\n },\n\n /**\n * Remove object from scene and entity object3D map.\n */\n removeObject3D: {\n value: function (type) {\n var obj = this.getObject3D(type);\n if (!obj) {\n warn('Tried to remove `Object3D` of type:', type, 'which was not defined.');\n return;\n }\n this.object3D.remove(obj);\n delete this.object3DMap[type];\n this.emit('object3dremove', {type: type});\n }\n },\n\n /**\n * Gets or creates an object3D of a given type.\n *\n * @param {string} type - Type of the object3D.\n * @param {string} Constructor - Constructor to use to create the object3D if needed.\n * @returns {object}\n */\n getOrCreateObject3D: {\n value: function (type, Constructor) {\n var object3D = this.getObject3D(type);\n if (!object3D && Constructor) {\n object3D = new Constructor();\n this.setObject3D(type, object3D);\n }\n warn('`getOrCreateObject3D` has been deprecated. Use `setObject3D()` ' +\n 'and `object3dset` event instead.');\n return object3D;\n }\n },\n\n /**\n * Add child entity.\n *\n * @param {Element} el - Child entity.\n */\n add: {\n value: function (el) {\n if (!el.object3D) {\n throw new Error(\"Trying to add an element that doesn't have an `object3D`\");\n }\n this.object3D.add(el.object3D);\n this.emit('child-attached', {el: el});\n }\n },\n\n /**\n * Tell parentNode to add this entity to itself.\n */\n addToParent: {\n value: function () {\n var parentNode = this.parentEl = this.parentNode;\n\n // `!parentNode` check primarily for unit tests.\n if (!parentNode || !parentNode.add || this.attachedToParent) { return; }\n\n parentNode.add(this);\n this.attachedToParent = true; // To prevent multiple attachments to same parent.\n }\n },\n\n /**\n * Tell parentNode to remove this entity from itself.\n */\n removeFromParent: {\n value: function () {\n var parentEl = this.parentEl;\n this.parentEl.remove(this);\n this.attachedToParent = false;\n this.parentEl = null;\n parentEl.emit('child-detached', {el: this});\n }\n },\n\n load: {\n value: function () {\n var self = this;\n\n if (this.hasLoaded || !this.parentEl) { return; }\n\n ANode.prototype.load.call(this, function entityLoadCallback () {\n // Check if entity was detached while it was waiting to load.\n if (!self.parentEl) { return; }\n\n self.updateComponents();\n if (self.isScene || self.parentEl.isPlaying) { self.play(); }\n });\n },\n writable: window.debug\n },\n\n /**\n * Remove child entity.\n *\n * @param {Element} el - Child entity.\n */\n remove: {\n value: function (el) {\n if (el) {\n this.object3D.remove(el.object3D);\n } else {\n this.parentNode.removeChild(this);\n }\n }\n },\n\n /**\n * @returns {array} Direct children that are entities.\n */\n getChildEntities: {\n value: function () {\n var children = this.children;\n var childEntities = [];\n\n for (var i = 0; i < children.length; i++) {\n var child = children[i];\n if (child instanceof AEntity) {\n childEntities.push(child);\n }\n }\n\n return childEntities;\n }\n },\n\n /**\n * Initialize component.\n *\n * @param {string} attrName - Attribute name asociated to the component.\n * @param {object} data - Component data\n * @param {boolean} isDependency - True if the component is a dependency.\n */\n initComponent: {\n value: function (attrName, data, isDependency) {\n var component;\n var componentId;\n var componentInfo;\n var componentName;\n var isComponentDefined;\n\n componentInfo = utils.split(attrName, MULTIPLE_COMPONENT_DELIMITER);\n componentName = componentInfo[0];\n componentId = componentInfo.length > 2\n ? componentInfo.slice(1).join('__')\n : componentInfo[1];\n\n // Not a registered component.\n if (!COMPONENTS[componentName]) { return; }\n\n // Component is not a dependency and is undefined.\n // If a component is a dependency, then it is okay to have no data.\n isComponentDefined = checkComponentDefined(this, attrName) ||\n data !== undefined;\n if (!isComponentDefined && !isDependency) { return; }\n\n // Component already initialized.\n if (attrName in this.components) { return; }\n\n // Initialize dependencies first\n this.initComponentDependencies(componentName);\n\n // If component name has an id we check component type multiplic\n if (componentId && !COMPONENTS[componentName].multiple) {\n throw new Error('Trying to initialize multiple ' +\n 'components of type `' + componentName +\n '`. There can only be one component of this type per entity.');\n }\n component = new COMPONENTS[componentName].Component(this, data, componentId);\n if (this.isPlaying) { component.play(); }\n\n // Components are reflected in the DOM as attributes but the state is not shown\n // hence we set the attribute to empty string.\n // The flag justInitialized is for attributeChangedCallback to not overwrite\n // the component with the empty string.\n if (!this.hasAttribute(attrName)) {\n component.justInitialized = true;\n window.HTMLElement.prototype.setAttribute.call(this, attrName, '');\n }\n\n debug('Component initialized: %s', attrName);\n },\n writable: window.debug\n },\n\n /**\n * Initialize dependencies of a component.\n *\n * @param {string} name - Root component name.\n */\n initComponentDependencies: {\n value: function (name) {\n var self = this;\n var component = COMPONENTS[name];\n var dependencies;\n var i;\n\n // Not a component.\n if (!component) { return; }\n\n // No dependencies.\n dependencies = COMPONENTS[name].dependencies;\n\n if (!dependencies) { return; }\n\n // Initialize dependencies.\n for (i = 0; i < dependencies.length; i++) {\n // Call getAttribute to initialize the data from the DOM.\n self.initComponent(\n dependencies[i],\n window.HTMLElement.prototype.getAttribute.call(self, dependencies[i]) || undefined,\n true\n );\n }\n }\n },\n\n removeComponent: {\n value: function (name, destroy) {\n var component;\n\n component = this.components[name];\n if (!component) { return; }\n\n // Wait for component to initialize.\n if (!component.initialized) {\n this.addEventListener('componentinitialized', function tryRemoveLater (evt) {\n if (evt.detail.name !== name) { return; }\n this.removeComponent(name, destroy);\n this.removeEventListener('componentinitialized', tryRemoveLater);\n });\n return;\n }\n\n component.pause();\n component.remove();\n\n // Keep component attached to entity in case of just full entity detach.\n if (destroy) {\n component.destroy();\n delete this.components[name];\n }\n\n this.emit('componentremoved', component.evtDetail, false);\n },\n writable: window.debug\n },\n\n /**\n * Initialize or update all components.\n * Build data using initial components, defined attributes, mixins, and defaults.\n * Update default components before the rest.\n *\n * @member {function} getExtraComponents - Can be implemented to include component data\n * from other sources (e.g., implemented by primitives).\n */\n updateComponents: {\n value: function () {\n var data;\n var extraComponents;\n var i;\n var name;\n var componentsToUpdate = this.componentsToUpdate;\n\n if (!this.hasLoaded) { return; }\n\n // Gather mixin-defined components.\n for (i = 0; i < this.mixinEls.length; i++) {\n for (name in this.mixinEls[i].componentCache) {\n if (isComponent(name)) { componentsToUpdate[name] = true; }\n }\n }\n\n // Gather from extra initial component data if defined (e.g., primitives).\n if (this.getExtraComponents) {\n extraComponents = this.getExtraComponents();\n for (name in extraComponents) {\n if (isComponent(name)) { componentsToUpdate[name] = true; }\n }\n }\n\n // Gather entity-defined components.\n for (i = 0; i < this.attributes.length; ++i) {\n name = this.attributes[i].name;\n if (OBJECT3D_COMPONENTS.indexOf(name) !== -1) { continue; }\n if (isComponent(name)) { componentsToUpdate[name] = true; }\n }\n\n // object3D components first (position, rotation, scale, visible).\n for (i = 0; i < OBJECT3D_COMPONENTS.length; i++) {\n name = OBJECT3D_COMPONENTS[i];\n if (!this.hasAttribute(name)) { continue; }\n this.updateComponent(name, this.getDOMAttribute(name));\n }\n\n // Initialize or update rest of components.\n for (name in componentsToUpdate) {\n data = mergeComponentData(this.getDOMAttribute(name),\n extraComponents && extraComponents[name]);\n this.updateComponent(name, data);\n delete componentsToUpdate[name];\n }\n },\n writable: window.debug\n },\n\n /**\n * Initialize, update, or remove a single component.\n *\n * When initializing, we set the component on `this.components`.\n *\n * @param {string} attr - Component name.\n * @param {object} attrValue - Value of the DOM attribute.\n * @param {boolean} clobber - If new attrValue completely replaces previous properties.\n */\n updateComponent: {\n value: function (attr, attrValue, clobber) {\n var component = this.components[attr];\n\n if (component) {\n // Remove component.\n if (attrValue === null && !checkComponentDefined(this, attr)) {\n this.removeComponent(attr, true);\n return;\n }\n // Component already initialized. Update component.\n component.updateProperties(attrValue, clobber);\n return;\n }\n\n // Component not yet initialized. Initialize component.\n this.initComponent(attr, attrValue, false);\n }\n },\n\n /**\n * If `attr` is a component name, detach the component from the entity.\n *\n * If `propertyName` is given, reset the component property value to its default.\n *\n * @param {string} attr - Attribute name, which could also be a component name.\n * @param {string} propertyName - Component prop name, if resetting an individual prop.\n */\n removeAttribute: {\n value: function (attr, propertyName) {\n var component = this.components[attr];\n\n // Remove component.\n if (component && propertyName === undefined) {\n this.removeComponent(attr, true);\n }\n\n // Reset component property value.\n if (component && propertyName !== undefined) {\n component.resetProperty(propertyName);\n return;\n }\n\n // Remove mixins.\n if (attr === 'mixin') {\n this.mixinUpdate('');\n }\n\n window.HTMLElement.prototype.removeAttribute.call(this, attr);\n }\n },\n\n /**\n * Start dynamic behavior associated with entity such as dynamic components and animations.\n * Tell all children entities to also play.\n */\n play: {\n value: function () {\n var entities;\n var i;\n var key;\n\n // Already playing.\n if (this.isPlaying || !this.hasLoaded) { return; }\n this.isPlaying = true;\n\n // Wake up all components.\n for (key in this.components) { this.components[key].play(); }\n\n // Tell all child entities to play.\n entities = this.getChildEntities();\n for (i = 0; i < entities.length; i++) { entities[i].play(); }\n\n this.emit('play');\n },\n writable: true\n },\n\n /**\n * Pause dynamic behavior associated with entity such as dynamic components and animations.\n * Tell all children entities to also pause.\n */\n pause: {\n value: function () {\n var entities;\n var i;\n var key;\n\n if (!this.isPlaying) { return; }\n this.isPlaying = false;\n\n // Sleep all components.\n for (key in this.components) { this.components[key].pause(); }\n\n // Tell all child entities to pause.\n entities = this.getChildEntities();\n for (i = 0; i < entities.length; i++) { entities[i].pause(); }\n\n this.emit('pause');\n },\n writable: true\n },\n\n /**\n * Deals with updates on entity-specific attributes (i.e., components and mixins).\n *\n * @param {string} attr\n * @param {string} oldVal\n * @param {string|object} newVal\n */\n setEntityAttribute: {\n value: function (attr, oldVal, newVal) {\n if (COMPONENTS[attr] || this.components[attr]) {\n this.updateComponent(attr, newVal);\n return;\n }\n if (attr === 'mixin') {\n // Ignore if `<a-node>` code is just updating computed mixin in the DOM.\n if (newVal === this.computedMixinStr) { return; }\n this.mixinUpdate(newVal, oldVal);\n }\n }\n },\n\n /**\n * When mixins updated, trigger init or optimized-update of relevant components.\n */\n mixinUpdate: {\n value: (function () {\n var componentsUpdated = [];\n\n return function (newMixins, oldMixins) {\n var component;\n var mixinEl;\n var mixinIds;\n var i;\n var self = this;\n\n if (!this.hasLoaded) {\n this.addEventListener('loaded', function () {\n self.mixinUpdate(newMixins, oldMixins);\n }, ONCE);\n return;\n }\n\n oldMixins = oldMixins || this.getAttribute('mixin');\n mixinIds = this.updateMixins(newMixins, oldMixins);\n\n // Loop over current mixins.\n componentsUpdated.length = 0;\n for (i = 0; i < this.mixinEls.length; i++) {\n for (component in this.mixinEls[i].componentCache) {\n if (componentsUpdated.indexOf(component) === -1) {\n if (this.components[component]) {\n // Update. Just rebuild data.\n this.components[component].handleMixinUpdate();\n } else {\n // Init. buildData will gather mixin values.\n this.initComponent(component, null);\n }\n componentsUpdated.push(component);\n }\n }\n }\n\n // Loop over old mixins to call for data rebuild.\n for (i = 0; i < mixinIds.oldMixinIds.length; i++) {\n mixinEl = document.getElementById(mixinIds.oldMixinIds[i]);\n if (!mixinEl) { continue; }\n for (component in mixinEl.componentCache) {\n if (componentsUpdated.indexOf(component) === -1) {\n if (this.components[component]) {\n if (this.getDOMAttribute(component)) {\n // Update component if explicitly defined.\n this.components[component].handleMixinUpdate();\n } else {\n // Remove component if not explicitly defined.\n this.removeComponent(component, true);\n }\n }\n }\n }\n }\n };\n })()\n },\n\n /**\n * setAttribute can:\n *\n * 1. Set a single property of a multi-property component.\n * 2. Set multiple properties of a multi-property component.\n * 3. Replace properties of a multi-property component.\n * 4. Set a value for a single-property component, mixin, or normal HTML attribute.\n *\n * @param {string} attrName - Component or attribute name.\n * @param {*} arg1 - Can be a value, property name, CSS-style property string, or\n * object of properties.\n * @param {*|bool} arg2 - If arg1 is a property name, this should be a value. Otherwise,\n * it is a boolean indicating whether to clobber previous values (defaults to false).\n */\n setAttribute: {\n value: (function () {\n var singlePropUpdate = {};\n\n return function (attrName, arg1, arg2) {\n var newAttrValue;\n var clobber;\n var componentName;\n var delimiterIndex;\n var isDebugMode;\n var key;\n\n delimiterIndex = attrName.indexOf(MULTIPLE_COMPONENT_DELIMITER);\n componentName = delimiterIndex > 0 ? attrName.substring(0, delimiterIndex) : attrName;\n\n // Not a component. Normal set attribute.\n if (!COMPONENTS[componentName]) {\n if (attrName === 'mixin') { this.mixinUpdate(arg1); }\n ANode.prototype.setAttribute.call(this, attrName, arg1);\n return;\n }\n\n // Initialize component first if not yet initialized.\n if (!this.components[attrName] && this.hasAttribute(attrName)) {\n this.updateComponent(\n attrName,\n window.HTMLElement.prototype.getAttribute.call(this, attrName));\n }\n\n // Determine new attributes from the arguments\n if (typeof arg2 !== 'undefined' &&\n typeof arg1 === 'string' &&\n arg1.length > 0 &&\n typeof utils.styleParser.parse(arg1) === 'string') {\n // Update a single property of a multi-property component\n for (key in singlePropUpdate) { delete singlePropUpdate[key]; }\n newAttrValue = singlePropUpdate;\n newAttrValue[arg1] = arg2;\n clobber = false;\n } else {\n // Update with a value, object, or CSS-style property string, with the possiblity\n // of clobbering previous values.\n newAttrValue = arg1;\n clobber = (arg2 === true);\n }\n\n // Update component\n this.updateComponent(attrName, newAttrValue, clobber);\n\n // In debug mode, write component data up to the DOM.\n isDebugMode = this.sceneEl && this.sceneEl.getAttribute('debug');\n if (isDebugMode) { this.components[attrName].flushToDOM(); }\n };\n })(),\n writable: window.debug\n },\n\n /**\n * Reflect component data in the DOM (as seen from the browser DOM Inspector).\n *\n * @param {bool} recursive - Also flushToDOM on the children.\n **/\n flushToDOM: {\n value: function (recursive) {\n var components = this.components;\n var child;\n var children = this.children;\n var i;\n var key;\n\n // Flush entity's components to DOM.\n for (key in components) {\n components[key].flushToDOM();\n }\n\n // Recurse.\n if (!recursive) { return; }\n for (i = 0; i < children.length; ++i) {\n child = children[i];\n if (!child.flushToDOM) { continue; }\n child.flushToDOM(recursive);\n }\n }\n },\n\n /**\n * If `attr` is a component, returns ALL component data including applied mixins and\n * defaults.\n *\n * If `attr` is not a component, fall back to HTML getAttribute.\n *\n * @param {string} attr\n * @returns {object|string} Object if component, else string.\n */\n getAttribute: {\n value: function (attr) {\n // If component, return component data.\n var component;\n if (attr === 'position') { return this.object3D.position; }\n if (attr === 'rotation') { return getRotation(this); }\n if (attr === 'scale') { return this.object3D.scale; }\n if (attr === 'visible') { return this.object3D.visible; }\n component = this.components[attr];\n if (component) { return component.data; }\n return window.HTMLElement.prototype.getAttribute.call(this, attr);\n },\n writable: window.debug\n },\n\n /**\n * If `attr` is a component, returns JUST the component data defined on the entity.\n * Like a partial version of `getComputedAttribute` as returned component data\n * does not include applied mixins or defaults.\n *\n * If `attr` is not a component, fall back to HTML getAttribute.\n *\n * @param {string} attr\n * @returns {object|string} Object if component, else string.\n */\n getDOMAttribute: {\n value: function (attr) {\n // If cached value exists, return partial component data.\n var component = this.components[attr];\n if (component) { return component.attrValue; }\n return window.HTMLElement.prototype.getAttribute.call(this, attr);\n },\n writable: window.debug\n },\n\n addState: {\n value: function (state) {\n if (this.is(state)) { return; }\n this.states.push(state);\n this.emit('stateadded', state);\n }\n },\n\n removeState: {\n value: function (state) {\n var stateIndex = this.states.indexOf(state);\n if (stateIndex === -1) { return; }\n this.states.splice(stateIndex, 1);\n this.emit('stateremoved', state);\n }\n },\n\n /**\n * Checks if the element is in a given state. e.g. el.is('alive');\n * @type {string} state - Name of the state we want to check\n */\n is: {\n value: function (state) {\n return this.states.indexOf(state) !== -1;\n }\n },\n\n /**\n * Open Inspector to this entity.\n */\n inspect: {\n value: function () {\n this.sceneEl.components.inspector.openInspector(this);\n }\n },\n\n /**\n * Clean up memory and return memory to object pools.\n */\n destroy: {\n value: function () {\n var key;\n if (this.parentNode) {\n warn('Entity can only be destroyed if detached from scenegraph.');\n return;\n }\n for (key in this.components) {\n this.components[key].destroy();\n }\n }\n }\n});\n\n/**\n * Check if a component is *defined* for an entity, including defaults and mixins.\n * Does not check whether the component has been *initialized* for an entity.\n *\n * @param {string} el - Entity.\n * @param {string} name - Component name.\n * @returns {boolean}\n */\nfunction checkComponentDefined (el, name) {\n // Check if element contains the component.\n if (el.components[name] && el.components[name].attrValue) { return true; }\n\n return isComponentMixedIn(name, el.mixinEls);\n}\n\n/**\n * Check if any mixins contains a component.\n *\n * @param {string} name - Component name.\n * @param {array} mixinEls - Array of <a-mixin>s.\n */\nfunction isComponentMixedIn (name, mixinEls) {\n var i;\n var inMixin = false;\n for (i = 0; i < mixinEls.length; ++i) {\n inMixin = mixinEls[i].hasAttribute(name);\n if (inMixin) { break; }\n }\n return inMixin;\n}\n\n/**\n * Given entity defined value, merge in extra data if necessary.\n * Handle both single and multi-property components.\n *\n * @param {string} attrValue - Entity data.\n * @param extraData - Entity data from another source to merge in.\n */\nfunction mergeComponentData (attrValue, extraData) {\n // Extra data not defined, just return attrValue.\n if (!extraData) { return attrValue; }\n\n // Merge multi-property data.\n if (extraData.constructor === Object) {\n return utils.extend(extraData, utils.styleParser.parse(attrValue || {}));\n }\n\n // Return data, precendence to the defined value.\n return attrValue || extraData;\n}\n\nfunction isComponent (componentName) {\n if (componentName.indexOf(MULTIPLE_COMPONENT_DELIMITER) !== -1) {\n componentName = utils.split(componentName, MULTIPLE_COMPONENT_DELIMITER)[0];\n }\n if (!COMPONENTS[componentName]) { return false; }\n return true;\n}\n\nfunction getRotation (entityEl) {\n var radToDeg = THREE.Math.radToDeg;\n var rotation = entityEl.object3D.rotation;\n var rotationObj = entityEl.rotationObj;\n rotationObj.x = radToDeg(rotation.x);\n rotationObj.y = radToDeg(rotation.y);\n rotationObj.z = radToDeg(rotation.z);\n return rotationObj;\n}\n\nAEntity = registerElement('a-entity', {prototype: proto});\nmodule.exports = AEntity;\n\n},{\"../lib/three\":179,\"../utils/\":205,\"./a-node\":129,\"./a-register-element\":130,\"./component\":131}],128:[function(_dereq_,module,exports){\nvar ANode = _dereq_('./a-node');\nvar registerElement = _dereq_('./a-register-element').registerElement;\nvar components = _dereq_('./component').components;\nvar utils = _dereq_('../utils');\n\nvar MULTIPLE_COMPONENT_DELIMITER = '__';\n\n/**\n * @member {object} componentCache - Cache of pre-parsed values. An object where the keys\n * are component names and the values are already parsed by the component.\n */\nmodule.exports = registerElement('a-mixin', {\n prototype: Object.create(ANode.prototype, {\n createdCallback: {\n value: function () {\n this.componentCache = {};\n this.id = this.getAttribute('id');\n this.isMixin = true;\n }\n },\n\n attributeChangedCallback: {\n value: function (attr, oldVal, newVal) {\n this.cacheAttribute(attr, newVal);\n this.updateEntities();\n }\n },\n\n attachedCallback: {\n value: function () {\n this.sceneEl = this.closestScene();\n this.cacheAttributes();\n this.updateEntities();\n this.load();\n }\n },\n\n /**\n * setAttribute that parses and caches component values.\n */\n setAttribute: {\n value: function (attr, value) {\n window.HTMLElement.prototype.setAttribute.call(this, attr, value);\n this.cacheAttribute(attr, value);\n }\n },\n\n /**\n * If `attr` is a component, then parse the value using the schema and store it.\n */\n cacheAttribute: {\n value: function (attr, value) {\n var component;\n var componentName;\n\n // Get component data.\n componentName = utils.split(attr, MULTIPLE_COMPONENT_DELIMITER)[0];\n component = components[componentName];\n if (!component) { return; }\n if (value === undefined) {\n value = window.HTMLElement.prototype.getAttribute.call(this, attr);\n }\n this.componentCache[attr] = component.parseAttrValueForCache(value);\n }\n },\n\n /**\n * If `attr` is a component, then grab pre-parsed value from the cache.\n * Else do a normal getAttribute.\n */\n getAttribute: {\n value: function (attr) {\n return this.componentCache[attr] ||\n window.HTMLElement.prototype.getAttribute.call(this, attr);\n }\n },\n\n /**\n * Parse and cache every component defined on the mixin.\n */\n cacheAttributes: {\n value: function () {\n var attributes = this.attributes;\n var attrName;\n var i;\n for (i = 0; i < attributes.length; i++) {\n attrName = attributes[i].name;\n this.cacheAttribute(attrName);\n }\n }\n },\n\n /**\n * For entities that already have been loaded by the time the mixin was attached, tell\n * those entities to register the mixin and refresh their component data.\n */\n updateEntities: {\n value: function () {\n var entity;\n var entities;\n var i;\n\n if (!this.sceneEl) { return; }\n\n entities = this.sceneEl.querySelectorAll('[mixin~=' + this.id + ']');\n for (i = 0; i < entities.length; i++) {\n entity = entities[i];\n if (!entity.hasLoaded || entity.isMixin) { continue; }\n entity.mixinUpdate(this.id);\n }\n }\n }\n })\n});\n\n},{\"../utils\":205,\"./a-node\":129,\"./a-register-element\":130,\"./component\":131}],129:[function(_dereq_,module,exports){\n/* global CustomEvent */\nvar registerElement = _dereq_('./a-register-element').registerElement;\nvar isNode = _dereq_('./a-register-element').isNode;\nvar utils = _dereq_('../utils/');\n\nvar warn = utils.debug('core:a-node:warn');\nvar error = utils.debug('core:a-node:error');\n\n/**\n * Base class for A-Frame that manages loading of objects.\n *\n * Nodes can be modified using mixins.\n * Nodes emit a `loaded` event when they and their children have initialized.\n */\nmodule.exports = registerElement('a-node', {\n prototype: Object.create(window.HTMLElement.prototype, {\n createdCallback: {\n value: function () {\n this.computedMixinStr = '';\n this.hasLoaded = false;\n this.isNode = true;\n this.mixinEls = [];\n },\n writable: window.debug\n },\n\n attachedCallback: {\n value: function () {\n var mixins;\n this.sceneEl = this.closestScene();\n\n if (!this.sceneEl) {\n warn('You are attempting to attach <' + this.tagName + '> outside of an A-Frame ' +\n 'scene. Append this element to `<a-scene>` instead.');\n }\n\n this.hasLoaded = false;\n this.emit('nodeready', undefined, false);\n\n if (!this.isMixin) {\n mixins = this.getAttribute('mixin');\n if (mixins) { this.updateMixins(mixins); }\n }\n },\n writable: window.debug\n },\n\n /**\n * Handle mixin.\n */\n attributeChangedCallback: {\n value: function (attr, oldVal, newVal) {\n // Ignore if `<a-node>` code is just updating computed mixin in the DOM.\n if (newVal === this.computedMixinStr) { return; }\n\n if (attr === 'mixin' && !this.isMixin) {\n this.updateMixins(newVal, oldVal);\n }\n }\n },\n\n /**\n * Returns the first scene by traversing up the tree starting from and\n * including receiver element.\n */\n closestScene: {\n value: function closest () {\n var element = this;\n while (element) {\n if (element.isScene) { break; }\n element = element.parentElement;\n }\n return element;\n }\n },\n\n /**\n * Returns first element matching a selector by traversing up the tree starting\n * from and including receiver element.\n *\n * @param {string} selector - Selector of element to find.\n */\n closest: {\n value: function closest (selector) {\n var matches = this.matches || this.mozMatchesSelector ||\n this.msMatchesSelector || this.oMatchesSelector || this.webkitMatchesSelector;\n var element = this;\n while (element) {\n if (matches.call(element, selector)) { break; }\n element = element.parentElement;\n }\n return element;\n }\n },\n\n detachedCallback: {\n value: function () {\n this.hasLoaded = false;\n }\n },\n\n /**\n * Wait for children to load, if any.\n * Then emit `loaded` event and set `hasLoaded`.\n */\n load: {\n value: function (cb, childFilter) {\n var children;\n var childrenLoaded;\n var self = this;\n\n if (this.hasLoaded) { return; }\n\n // Default to waiting for all nodes.\n childFilter = childFilter || isNode;\n // Wait for children to load (if any), then load.\n children = this.getChildren();\n childrenLoaded = children.filter(childFilter).map(function (child) {\n return new Promise(function waitForLoaded (resolve) {\n if (child.hasLoaded) { return resolve(); }\n child.addEventListener('loaded', resolve);\n });\n });\n\n Promise.all(childrenLoaded).then(function emitLoaded () {\n self.hasLoaded = true;\n if (cb) { cb(); }\n self.emit('loaded', undefined, false);\n }).catch(function (err) {\n error('Failure loading node: ', err);\n });\n },\n writable: true\n },\n\n getChildren: {\n value: function () {\n return Array.prototype.slice.call(this.children, 0);\n }\n },\n\n /**\n * Unregister old mixins and listeners.\n * Register new mixins and listeners.\n * Registering means to update `this.mixinEls` with listeners.\n */\n updateMixins: {\n value: (function () {\n var newMixinIdArray = [];\n var oldMixinIdArray = [];\n var mixinIds = {};\n\n return function (newMixins, oldMixins) {\n var i;\n var newMixinIds;\n var oldMixinIds;\n\n newMixinIdArray.length = 0;\n oldMixinIdArray.length = 0;\n newMixinIds = newMixins ? utils.split(newMixins.trim(), /\\s+/) : newMixinIdArray;\n oldMixinIds = oldMixins ? utils.split(oldMixins.trim(), /\\s+/) : oldMixinIdArray;\n\n mixinIds.newMixinIds = newMixinIds;\n mixinIds.oldMixinIds = oldMixinIds;\n\n // Unregister old mixins.\n for (i = 0; i < oldMixinIds.length; i++) {\n if (newMixinIds.indexOf(oldMixinIds[i]) === -1) {\n this.unregisterMixin(oldMixinIds[i]);\n }\n }\n\n // Register new mixins.\n this.computedMixinStr = '';\n this.mixinEls.length = 0;\n for (i = 0; i < newMixinIds.length; i++) {\n this.registerMixin(document.getElementById(newMixinIds[i]));\n }\n\n // Update DOM. Keep track of `computedMixinStr` to not recurse back here after\n // update.\n if (this.computedMixinStr) {\n this.computedMixinStr = this.computedMixinStr.trim();\n window.HTMLElement.prototype.setAttribute.call(this, 'mixin',\n this.computedMixinStr);\n }\n\n return mixinIds;\n };\n })()\n },\n\n /**\n * From mixin ID, add mixin element to `mixinEls`.\n *\n * @param {Element} mixinEl\n */\n registerMixin: {\n value: function (mixinEl) {\n var compositedMixinIds;\n var i;\n var mixin;\n\n if (!mixinEl) { return; }\n\n // Register composited mixins (if mixin has mixins).\n mixin = mixinEl.getAttribute('mixin');\n if (mixin) {\n compositedMixinIds = utils.split(mixin.trim(), /\\s+/);\n for (i = 0; i < compositedMixinIds.length; i++) {\n this.registerMixin(document.getElementById(compositedMixinIds[i]));\n }\n }\n\n // Register mixin.\n this.computedMixinStr = this.computedMixinStr + ' ' + mixinEl.id;\n this.mixinEls.push(mixinEl);\n }\n },\n\n setAttribute: {\n value: function (attr, newValue) {\n if (attr === 'mixin') { this.updateMixins(newValue); }\n window.HTMLElement.prototype.setAttribute.call(this, attr, newValue);\n }\n },\n\n unregisterMixin: {\n value: function (mixinId) {\n var i;\n var mixinEls = this.mixinEls;\n var mixinEl;\n for (i = 0; i < mixinEls.length; ++i) {\n mixinEl = mixinEls[i];\n if (mixinId === mixinEl.id) {\n mixinEls.splice(i, 1);\n break;\n }\n }\n }\n },\n\n /**\n * Emit a DOM event.\n *\n * @param {string} name - Name of event.\n * @param {object} [detail={}] - Custom data to pass as `detail` to the event.\n * @param {boolean} [bubbles=true] - Whether the event should bubble.\n * @param {object} [extraData] - Extra data to pass to the event, if any.\n */\n emit: {\n value: (function () {\n var data = {};\n\n return function (name, detail, bubbles, extraData) {\n if (bubbles === undefined) { bubbles = true; }\n data.bubbles = !!bubbles;\n data.detail = detail;\n\n // If extra data is present, we need to create a new object.\n if (extraData) { data = utils.extend({}, extraData, data); }\n\n this.dispatchEvent(new CustomEvent(name, data));\n };\n })(),\n writable: window.debug\n }\n })\n});\n\n},{\"../utils/\":205,\"./a-register-element\":130}],130:[function(_dereq_,module,exports){\n/*\n ------------------------------------------------------------\n ------------- WARNING WARNING WARNING WARNING --------------\n ------------------------------------------------------------\n\n This module wraps registerElement to deal with components that inherit from\n `ANode` and `AEntity`. It's a pass through in any other case.\n\n It wraps some of the prototype methods of the created element to make sure\n that the corresponding functions in the base prototypes (`AEntity` and `ANode`)\n are also invoked. The method in the base prototype is always called before the one\n in the derived prototype.\n*/\n\n// Polyfill `document.registerElement`.\n_dereq_('document-register-element');\n\nvar ANode; // Must declare before AEntity. Initialized at the bottom.\nvar AEntity;\nvar knownTags = module.exports.knownTags = {};\n\nfunction addTagName (tagName) {\n knownTags[tagName.toLowerCase()] = true;\n}\n\n/**\n * Return whether the element type is one of our known registered ones.\n *\n * @param {string} node - The name of the tag to register.\n * @returns {boolean} Whether the tag name matches that of our registered custom elements.\n */\nmodule.exports.isNode = function (node) {\n return node.tagName.toLowerCase() in knownTags || node.isNode;\n};\n\n/**\n * @param {string} tagName - The name of the tag to register.\n * @param {object} obj - The prototype of the new element.\n * @returns {object} The prototype of the new element.\n */\nmodule.exports.registerElement = function (tagName, obj) {\n var proto = Object.getPrototypeOf(obj.prototype);\n var newObj = obj;\n var isANode = ANode && proto === ANode.prototype;\n var isAEntity = AEntity && proto === AEntity.prototype;\n\n if (isANode || isAEntity) { addTagName(tagName); }\n\n // Wrap if element inherits from `ANode`.\n if (isANode) {\n newObj = wrapANodeMethods(obj.prototype);\n newObj = {prototype: Object.create(proto, newObj)};\n }\n\n // Wrap if element inherits from `AEntity`.\n if (isAEntity) {\n newObj = wrapAEntityMethods(obj.prototype);\n newObj = {prototype: Object.create(proto, newObj)};\n }\n\n // Give all functions their proper name.\n Object.getOwnPropertyNames(newObj.prototype).forEach(function (propName) {\n var propVal = newObj.prototype[propName];\n if (typeof propVal === 'function') {\n propVal.displayName = propName;\n }\n });\n\n return document.registerElement(tagName, newObj);\n};\n\n/**\n * Wrap some obj methods to call those on `ANode` base prototype.\n *\n * @param {object} obj - Object that contains the methods that will be wrapped.\n * @return {object} An object with the same properties as the input parameter but\n * with some of methods wrapped.\n */\nfunction wrapANodeMethods (obj) {\n var newObj = {};\n var ANodeMethods = [\n 'attachedCallback',\n 'attributeChangedCallback',\n 'createdCallback',\n 'detachedCallback'\n ];\n wrapMethods(newObj, ANodeMethods, obj, ANode.prototype);\n copyProperties(obj, newObj);\n return newObj;\n}\n\n/**\n * This wraps some of the obj methods to call those on `AEntity` base prototype.\n *\n * @param {object} obj - The objects that contains the methods that will be wrapped.\n * @return {object} - An object with the same properties as the input parameter but\n * with some of methods wrapped.\n */\nfunction wrapAEntityMethods (obj) {\n var newObj = {};\n var ANodeMethods = [\n 'attachedCallback',\n 'attributeChangedCallback',\n 'createdCallback',\n 'detachedCallback'\n ];\n var AEntityMethods = [\n 'attachedCallback',\n 'attributeChangedCallback',\n 'createdCallback',\n 'detachedCallback'\n ];\n\n wrapMethods(newObj, ANodeMethods, obj, ANode.prototype);\n wrapMethods(newObj, AEntityMethods, obj, AEntity.prototype);\n // Copies the remaining properties into the new object.\n copyProperties(obj, newObj);\n return newObj;\n}\n\n/**\n * Wrap a list a methods to ensure that those in the base prototype are called\n * before the derived one.\n *\n * @param {object} targetObj - Object that will contain the wrapped methods.\n * @param {array} methodList - List of methods from the derivedObj that will be wrapped.\n * @param {object} derivedObject - Object that inherits from the baseObj.\n * @param {object} baseObj - Object that derivedObj inherits from.\n */\nfunction wrapMethods (targetObj, methodList, derivedObj, baseObj) {\n methodList.forEach(function (methodName) {\n wrapMethod(targetObj, methodName, derivedObj, baseObj);\n });\n}\nmodule.exports.wrapMethods = wrapMethods;\n\n/**\n * Wrap one method to ensure that the one in the base prototype is called before\n * the one in the derived one.\n *\n * @param {object} obj - Object that will contain the wrapped method.\n * @param {string} methodName - The name of the method that will be wrapped.\n * @param {object} derivedObject - Object that inherits from the baseObj.\n * @param {object} baseObj - Object that derivedObj inherits from.\n */\nfunction wrapMethod (obj, methodName, derivedObj, baseObj) {\n var derivedMethod = derivedObj[methodName];\n var baseMethod = baseObj[methodName];\n\n // Derived prototype does not define method, no need to wrap.\n if (!derivedMethod || !baseMethod) { return; }\n\n // Derived prototype doesn't override the one in the base one, no need to wrap.\n if (derivedMethod === baseMethod) { return; }\n\n // Wrap to ensure the base method is called before the one in the derived prototype.\n obj[methodName] = {\n value: function wrappedMethod () {\n baseMethod.apply(this, arguments);\n return derivedMethod.apply(this, arguments);\n },\n writable: window.debug\n };\n}\n\n/**\n * It copies the properties from source to destination object if they don't\n * exist already.\n *\n * @param {object} source - The object where properties are copied from.\n * @param {type} destination - The object where properties are copied to.\n */\nfunction copyProperties (source, destination) {\n var props = Object.getOwnPropertyNames(source);\n props.forEach(function (prop) {\n var desc;\n if (!destination[prop]) {\n desc = Object.getOwnPropertyDescriptor(source, prop);\n destination[prop] = {value: source[prop], writable: desc.writable};\n }\n });\n}\n\nANode = _dereq_('./a-node');\nAEntity = _dereq_('./a-entity');\n\n},{\"./a-entity\":127,\"./a-node\":129,\"document-register-element\":12}],131:[function(_dereq_,module,exports){\n/* global Node */\nvar schema = _dereq_('./schema');\nvar scenes = _dereq_('./scene/scenes');\nvar systems = _dereq_('./system');\nvar utils = _dereq_('../utils/');\n\nvar components = module.exports.components = {}; // Keep track of registered components.\nvar parseProperties = schema.parseProperties;\nvar parseProperty = schema.parseProperty;\nvar processSchema = schema.process;\nvar isSingleProp = schema.isSingleProperty;\nvar stringifyProperties = schema.stringifyProperties;\nvar stringifyProperty = schema.stringifyProperty;\nvar styleParser = utils.styleParser;\nvar warn = utils.debug('core:component:warn');\n\nvar aframeScript = document.currentScript;\nvar upperCaseRegExp = new RegExp('[A-Z]+');\n\n// Object pools by component, created upon registration.\nvar objectPools = {};\n\n/**\n * Component class definition.\n *\n * Components configure appearance, modify behavior, or add functionality to\n * entities. The behavior and appearance of an entity can be changed at runtime\n * by adding, removing, or updating components. Entities do not share instances\n * of components.\n *\n * @member {object} el - Reference to the entity element.\n * @member {string} attrValue - Value of the corresponding HTML attribute.\n * @member {object} data - Component data populated by parsing the\n * mapped attribute of the component plus applying defaults and mixins.\n */\nvar Component = module.exports.Component = function (el, attrValue, id) {\n var self = this;\n this.el = el;\n this.id = id;\n this.attrName = this.name + (id ? '__' + id : '');\n this.evtDetail = {id: this.id, name: this.name};\n this.initialized = false;\n this.isSingleProperty = isSingleProp(this.schema);\n this.isSinglePropertyObject = this.isSingleProperty &&\n isObject(parseProperty(undefined, this.schema)) &&\n !(this.schema.default instanceof window.HTMLElement);\n this.isObjectBased = !this.isSingleProperty || this.isSinglePropertyObject;\n this.el.components[this.attrName] = this;\n this.objectPool = objectPools[this.name];\n\n const events = this.events;\n this.events = {};\n eventsBind(this, events);\n\n // Store component data from previous update call.\n this.attrValue = undefined;\n if (this.isObjectBased) {\n this.nextData = this.objectPool.use();\n // Drop any properties added by dynamic schemas in previous use\n utils.objectPool.removeUnusedKeys(this.nextData, this.schema);\n this.oldData = this.objectPool.use();\n utils.objectPool.removeUnusedKeys(this.oldData, this.schema);\n this.previousOldData = this.objectPool.use();\n utils.objectPool.removeUnusedKeys(this.previousOldData, this.schema);\n this.parsingAttrValue = this.objectPool.use();\n utils.objectPool.removeUnusedKeys(this.parsingAttrValue, this.schema);\n } else {\n this.nextData = undefined;\n this.oldData = undefined;\n this.previousOldData = undefined;\n this.parsingAttrValue = undefined;\n }\n\n // Last value passed to updateProperties.\n this.throttledEmitComponentChanged = utils.throttle(function emitChange () {\n el.emit('componentchanged', self.evtDetail, false);\n }, 200);\n this.updateProperties(attrValue);\n};\n\nComponent.prototype = {\n /**\n * Contains the type schema and defaults for the data values.\n * Data is coerced into the types of the values of the defaults.\n */\n schema: {},\n\n /**\n * Init handler. Similar to attachedCallback.\n * Called during component initialization and is only run once.\n * Components can use this to set initial state.\n */\n init: function () { /* no-op */ },\n\n /**\n * Map of event names to binded event handlers that will be lifecycle-handled.\n * Will be detached on pause / remove.\n * Will be attached on play.\n */\n events: {},\n\n /**\n * Update handler. Similar to attributeChangedCallback.\n * Called whenever component's data changes.\n * Also called on component initialization when the component receives initial data.\n *\n * @param {object} prevData - Previous attributes of the component.\n */\n update: function (prevData) { /* no-op */ },\n\n updateSchema: undefined,\n\n /**\n * Tick handler.\n * Called on each tick of the scene render loop.\n * Affected by play and pause.\n *\n * @param {number} time - Scene tick time.\n * @param {number} timeDelta - Difference in current render time and previous render time.\n */\n tick: undefined,\n\n /**\n * Tock handler.\n * Called on each tock of the scene render loop.\n * Affected by play and pause.\n *\n * @param {number} time - Scene tick time.\n * @param {number} timeDelta - Difference in current render time and previous render time.\n * @param {object} camera - Camera used to render the last frame.\n */\n tock: undefined,\n\n /**\n * Called to start any dynamic behavior (e.g., animation, AI, events, physics).\n */\n play: function () { /* no-op */ },\n\n /**\n * Called to stop any dynamic behavior (e.g., animation, AI, events, physics).\n */\n pause: function () { /* no-op */ },\n\n /**\n * Remove handler. Similar to detachedCallback.\n * Called whenever component is removed from the entity (i.e., removeAttribute).\n * Components can use this to reset behavior on the entity.\n */\n remove: function () { /* no-op */ },\n\n /**\n * Parses each property based on property type.\n * If component is single-property, then parses the single property value.\n *\n * @param {string} value - HTML attribute value.\n * @param {boolean} silent - Suppress warning messages.\n * @returns {object} Component data.\n */\n parse: function (value, silent) {\n var schema = this.schema;\n if (this.isSingleProperty) { return parseProperty(value, schema); }\n return parseProperties(styleParser.parse(value), schema, true, this.name, silent);\n },\n\n /**\n * Stringify properties if necessary.\n *\n * Only called from `Entity.setAttribute` for properties whose parsers accept a non-string\n * value (e.g., selector, vec3 property types).\n *\n * @param {object} data - Complete component data.\n * @returns {string}\n */\n stringify: function (data) {\n var schema = this.schema;\n if (typeof data === 'string') { return data; }\n if (this.isSingleProperty) { return stringifyProperty(data, schema); }\n data = stringifyProperties(data, schema);\n return styleParser.stringify(data);\n },\n\n /**\n * Update the cache of the pre-parsed attribute value.\n *\n * @param {string} value - New data.\n * @param {boolean } clobber - Whether to wipe out and replace previous data.\n */\n updateCachedAttrValue: function (value, clobber) {\n var newAttrValue;\n var tempObject;\n var property;\n\n if (value === undefined) { return; }\n\n // If null value is the new attribute value, make the attribute value falsy.\n if (value === null) {\n if (this.isObjectBased && this.attrValue) {\n this.objectPool.recycle(this.attrValue);\n }\n this.attrValue = undefined;\n return;\n }\n\n if (value instanceof Object && !(value instanceof window.HTMLElement)) {\n // If value is an object, copy it to our pooled newAttrValue object to use to update\n // the attrValue.\n tempObject = this.objectPool.use();\n newAttrValue = utils.extend(tempObject, value);\n } else {\n newAttrValue = this.parseAttrValueForCache(value);\n }\n\n // Merge new data with previous `attrValue` if updating and not clobbering.\n if (this.isObjectBased && !clobber && this.attrValue) {\n for (property in this.attrValue) {\n if (newAttrValue[property] === undefined) {\n newAttrValue[property] = this.attrValue[property];\n }\n }\n }\n\n // Update attrValue.\n if (this.isObjectBased && !this.attrValue) {\n this.attrValue = this.objectPool.use();\n }\n utils.objectPool.clearObject(this.attrValue);\n this.attrValue = extendProperties(this.attrValue, newAttrValue, this.isObjectBased);\n utils.objectPool.clearObject(tempObject);\n },\n\n /**\n * Given an HTML attribute value parses the string based on the component schema.\n * To avoid double parsings of strings into strings we store the original instead\n * of the parsed one\n *\n * @param {string} value - HTML attribute value\n */\n parseAttrValueForCache: function (value) {\n var parsedValue;\n if (typeof value !== 'string') { return value; }\n if (this.isSingleProperty) {\n parsedValue = this.schema.parse(value);\n /**\n * To avoid bogus double parsings. Cached values will be parsed when building\n * component data. For instance when parsing a src id to its url, we want to cache\n * original string and not the parsed one (#monster -> models/monster.dae)\n * so when building data we parse the expected value.\n */\n if (typeof parsedValue === 'string') { parsedValue = value; }\n } else {\n // Parse using the style parser to avoid double parsing of individual properties.\n utils.objectPool.clearObject(this.parsingAttrValue);\n parsedValue = styleParser.parse(value, this.parsingAttrValue);\n }\n return parsedValue;\n },\n\n /**\n * Write cached attribute data to the entity DOM element.\n *\n * @param {boolean} isDefault - Whether component is a default component. Always flush for\n * default components.\n */\n flushToDOM: function (isDefault) {\n var attrValue = isDefault ? this.data : this.attrValue;\n if (attrValue === null || attrValue === undefined) { return; }\n window.HTMLElement.prototype.setAttribute.call(this.el, this.attrName,\n this.stringify(attrValue));\n },\n\n /**\n * Apply new component data if data has changed (from setAttribute).\n *\n * @param {string} attrValue - HTML attribute value.\n * If undefined, use the cached attribute value and continue updating properties.\n * @param {boolean} clobber - The previous component data is overwritten by the atrrValue\n */\n updateProperties: function (attrValue, clobber) {\n var el = this.el;\n\n // Just cache the attribute if the entity has not loaded\n // Components are not initialized until the entity has loaded\n if (!el.hasLoaded) {\n this.updateCachedAttrValue(attrValue);\n return;\n }\n\n // Parse the attribute value.\n // Cache current attrValue for future updates. Updates `this.attrValue`.\n // `null` means no value on purpose, do not set a default value, let mixins take over.\n if (attrValue !== null) {\n attrValue = this.parseAttrValueForCache(attrValue);\n }\n\n // Cache current attrValue for future updates.\n this.updateCachedAttrValue(attrValue, clobber);\n\n if (this.initialized) {\n this.updateComponent(attrValue, clobber);\n this.callUpdateHandler();\n } else {\n this.initComponent();\n }\n },\n\n initComponent: function () {\n var el = this.el;\n var initialOldData;\n\n // Build data.\n if (this.updateSchema) { this.updateSchema(this.buildData(this.attrValue, false, true)); }\n this.data = this.buildData(this.attrValue);\n\n // Component is being already initialized.\n if (el.initializingComponents[this.name]) { return; }\n\n // Prevent infinite loop in case of init method setting same component on the entity.\n el.initializingComponents[this.name] = true;\n // Initialize component.\n this.init();\n this.initialized = true;\n delete el.initializingComponents[this.name];\n\n // Store current data as previous data for future updates.\n this.oldData = extendProperties(this.oldData, this.data, this.isObjectBased);\n\n // For oldData, pass empty object to multiple-prop schemas or object single-prop schema.\n // Pass undefined to rest of types.\n initialOldData = this.isObjectBased ? this.objectPool.use() : undefined;\n this.update(initialOldData);\n if (this.isObjectBased) { this.objectPool.recycle(initialOldData); }\n\n // Play the component if the entity is playing.\n if (el.isPlaying) { this.play(); }\n el.emit('componentinitialized', this.evtDetail, false);\n },\n\n /**\n * @param attrValue - Passed argument from setAttribute.\n */\n updateComponent: function (attrValue, clobber) {\n var key;\n var mayNeedSchemaUpdate;\n\n if (clobber) {\n // Clobber. Rebuild.\n if (this.updateSchema) {\n this.updateSchema(this.buildData(this.attrValue, true, true));\n }\n this.data = this.buildData(this.attrValue, true, false);\n return;\n }\n\n // Apply new value to this.data in place since direct update.\n if (this.isSingleProperty) {\n if (this.isObjectBased) {\n parseProperty(attrValue, this.schema);\n }\n // Single-property (already parsed).\n this.data = attrValue;\n return;\n }\n\n parseProperties(attrValue, this.schema, true, this.name);\n\n // Check if we need to update schema.\n if (this.schemaChangeKeys.length) {\n for (key in attrValue) {\n if (this.schema[key].schemaChange) {\n mayNeedSchemaUpdate = true;\n break;\n }\n }\n }\n if (mayNeedSchemaUpdate) {\n // Rebuild data if need schema update.\n if (this.updateSchema) {\n this.updateSchema(this.buildData(this.attrValue, true, true));\n }\n this.data = this.buildData(this.attrValue, true, false);\n return;\n }\n\n // Normal update.\n for (key in attrValue) {\n if (attrValue[key] === undefined) { continue; }\n this.data[key] = attrValue[key];\n }\n },\n\n /**\n * Check if component should fire update and fire update lifecycle handler.\n */\n callUpdateHandler: function () {\n var hasComponentChanged;\n\n // Store the previous old data before we calculate the new oldData.\n if (this.previousOldData instanceof Object) {\n utils.objectPool.clearObject(this.previousOldData);\n }\n if (this.isObjectBased) {\n copyData(this.previousOldData, this.oldData);\n } else {\n this.previousOldData = this.oldData;\n }\n\n hasComponentChanged = !utils.deepEqual(this.oldData, this.data);\n\n // Don't update if properties haven't changed.\n // Always update rotation, position, scale.\n if (!this.isPositionRotationScale && !hasComponentChanged) { return; }\n\n // Store current data as previous data for future updates.\n // Reuse `this.oldData` object to try not to allocate another one.\n if (this.oldData instanceof Object) { utils.objectPool.clearObject(this.oldData); }\n this.oldData = extendProperties(this.oldData, this.data, this.isObjectBased);\n\n // Update component with the previous old data.\n this.update(this.previousOldData);\n\n this.throttledEmitComponentChanged();\n },\n\n handleMixinUpdate: function () {\n this.data = this.buildData(this.attrValue);\n this.callUpdateHandler();\n },\n\n /**\n * Reset value of a property to the property's default value.\n * If single-prop component, reset value to component's default value.\n *\n * @param {string} propertyName - Name of property to reset.\n */\n resetProperty: function (propertyName) {\n if (this.isObjectBased) {\n if (!(propertyName in this.attrValue)) { return; }\n delete this.attrValue[propertyName];\n this.data[propertyName] = this.schema[propertyName].default;\n } else {\n this.attrValue = this.schema.default;\n this.data = this.schema.default;\n }\n this.updateProperties(this.attrValue);\n },\n\n /**\n * Extend schema of component given a partial schema.\n *\n * Some components might want to mutate their schema based on certain properties.\n * e.g., Material component changes its schema based on `shader` to account for different\n * uniforms\n *\n * @param {object} schemaAddon - Schema chunk that extend base schema.\n */\n extendSchema: function (schemaAddon) {\n var extendedSchema;\n // Clone base schema.\n extendedSchema = utils.extend({}, components[this.name].schema);\n // Extend base schema with new schema chunk.\n utils.extend(extendedSchema, schemaAddon);\n this.schema = processSchema(extendedSchema);\n this.el.emit('schemachanged', this.evtDetail);\n },\n\n /**\n * Build component data from the current state of the entity.data.\n *\n * Precedence:\n * 1. Defaults data\n * 2. Mixin data.\n * 3. Attribute data.\n *\n * Finally coerce the data to the types of the defaults.\n *\n * @param {object} newData - Element new data.\n * @param {boolean} clobber - The previous data is completely replaced by the new one.\n * @param {boolean} silent - Suppress warning messages.\n * @return {object} The component data\n */\n buildData: function (newData, clobber, silent) {\n var componentDefined;\n var data;\n var defaultValue;\n var key;\n var mixinData;\n var nextData = this.nextData;\n var schema = this.schema;\n var i;\n var mixinEls = this.el.mixinEls;\n var previousData;\n\n // Whether component has a defined value. For arrays, treat empty as not defined.\n componentDefined = newData && newData.constructor === Array\n ? newData.length\n : newData !== undefined && newData !== null;\n\n if (this.isObjectBased) { utils.objectPool.clearObject(nextData); }\n\n // 1. Gather default values (lowest precendence).\n if (this.isSingleProperty) {\n if (this.isObjectBased) {\n // If object-based single-prop, then copy over the data to our pooled object.\n data = copyData(nextData, schema.default);\n } else {\n // If is plain single-prop, copy by value the default.\n data = isObjectOrArray(schema.default)\n ? utils.clone(schema.default)\n : schema.default;\n }\n } else {\n // Preserve previously set properties if clobber not enabled.\n previousData = !clobber && this.attrValue;\n\n // Clone default value if object so components don't share object\n data = previousData instanceof Object\n ? copyData(nextData, previousData)\n : nextData;\n\n // Apply defaults.\n for (key in schema) {\n defaultValue = schema[key].default;\n if (data[key] !== undefined) { continue; }\n // Clone default value if object so components don't share object\n data[key] = isObjectOrArray(defaultValue)\n ? utils.clone(defaultValue)\n : defaultValue;\n }\n }\n\n // 2. Gather mixin values.\n for (i = 0; i < mixinEls.length; i++) {\n mixinData = mixinEls[i].getAttribute(this.attrName);\n if (!mixinData) { continue; }\n data = extendProperties(data, mixinData, this.isObjectBased);\n }\n\n // 3. Gather attribute values (highest precendence).\n if (componentDefined) {\n if (this.isSingleProperty) {\n // If object-based, copy the value to not modify the original.\n if (isObject(newData)) {\n copyData(this.parsingAttrValue, newData);\n return parseProperty(this.parsingAttrValue, schema);\n }\n return parseProperty(newData, schema);\n }\n data = extendProperties(data, newData, this.isObjectBased);\n } else {\n // Parse and coerce using the schema.\n if (this.isSingleProperty) { return parseProperty(data, schema); }\n }\n\n return parseProperties(data, schema, undefined, this.name, silent);\n },\n\n /**\n * Attach events from component-defined events map.\n */\n eventsAttach: function () {\n var eventName;\n // Safety detach to prevent double-registration.\n this.eventsDetach();\n for (eventName in this.events) {\n this.el.addEventListener(eventName, this.events[eventName]);\n }\n },\n\n /**\n * Detach events from component-defined events map.\n */\n eventsDetach: function () {\n var eventName;\n for (eventName in this.events) {\n this.el.removeEventListener(eventName, this.events[eventName]);\n }\n },\n\n /**\n * Release and free memory.\n */\n destroy: function () {\n this.objectPool.recycle(this.attrValue);\n this.objectPool.recycle(this.oldData);\n this.objectPool.recycle(this.parsingAttrValue);\n this.attrValue = this.oldData = this.parsingAttrValue = undefined;\n }\n};\n\nfunction eventsBind (component, events) {\n var eventName;\n for (eventName in events) {\n component.events[eventName] = events[eventName].bind(component);\n }\n}\n\n// For testing.\nif (window.debug) {\n var registrationOrderWarnings = module.exports.registrationOrderWarnings = {};\n}\n\n/**\n * Register a component to A-Frame.\n *\n * @param {string} name - Component name.\n * @param {object} definition - Component schema and lifecycle method handlers.\n * @returns {object} Component.\n */\nmodule.exports.registerComponent = function (name, definition) {\n var NewComponent;\n var propertyName;\n var proto = {};\n var schema;\n var schemaIsSingleProp;\n\n // Warning if component is statically registered after the scene.\n if (document.currentScript && document.currentScript !== aframeScript) {\n scenes.forEach(function checkPosition (sceneEl) {\n // Okay to register component after the scene at runtime.\n if (sceneEl.hasLoaded) { return; }\n\n // Check that component is declared before the scene.\n if (document.currentScript.compareDocumentPosition(sceneEl) ===\n Node.DOCUMENT_POSITION_FOLLOWING) { return; }\n\n warn('The component `' + name + '` was registered in a <script> tag after the scene. ' +\n 'Component <script> tags in an HTML file should be declared *before* the scene ' +\n 'such that the component is available to entities during scene initialization.');\n\n // For testing.\n if (window.debug) { registrationOrderWarnings[name] = true; }\n });\n }\n\n if (upperCaseRegExp.test(name) === true) {\n warn('The component name `' + name + '` contains uppercase characters, but ' +\n 'HTML will ignore the capitalization of attribute names. ' +\n 'Change the name to be lowercase: `' + name.toLowerCase() + '`');\n }\n\n if (name.indexOf('__') !== -1) {\n throw new Error('The component name `' + name + '` is not allowed. ' +\n 'The sequence __ (double underscore) is reserved to specify an id' +\n ' for multiple components of the same type');\n }\n\n // Format definition object to prototype object.\n Object.keys(definition).forEach(function (key) {\n proto[key] = {\n value: definition[key],\n writable: true\n };\n });\n\n if (components[name]) {\n throw new Error('The component `' + name + '` has been already registered. ' +\n 'Check that you are not loading two versions of the same component ' +\n 'or two different components of the same name.');\n }\n\n NewComponent = function (el, attr, id) {\n Component.call(this, el, attr, id);\n };\n\n NewComponent.prototype = Object.create(Component.prototype, proto);\n NewComponent.prototype.name = name;\n NewComponent.prototype.isPositionRotationScale =\n name === 'position' || name === 'rotation' || name === 'scale';\n NewComponent.prototype.constructor = NewComponent;\n NewComponent.prototype.system = systems && systems.systems[name];\n NewComponent.prototype.play = wrapPlay(NewComponent.prototype.play);\n NewComponent.prototype.pause = wrapPause(NewComponent.prototype.pause);\n\n schema = utils.extend(processSchema(NewComponent.prototype.schema,\n NewComponent.prototype.name));\n schemaIsSingleProp = isSingleProp(NewComponent.prototype.schema);\n\n // Keep track of keys that may potentially change the schema.\n if (!schemaIsSingleProp) {\n NewComponent.prototype.schemaChangeKeys = [];\n for (propertyName in schema) {\n if (schema[propertyName].schemaChange) {\n NewComponent.prototype.schemaChangeKeys.push(propertyName);\n }\n }\n }\n\n // Create object pool for class of components.\n objectPools[name] = utils.objectPool.createPool();\n\n components[name] = {\n Component: NewComponent,\n dependencies: NewComponent.prototype.dependencies,\n isSingleProp: schemaIsSingleProp,\n multiple: NewComponent.prototype.multiple,\n name: name,\n parse: NewComponent.prototype.parse,\n parseAttrValueForCache: NewComponent.prototype.parseAttrValueForCache,\n schema: schema,\n stringify: NewComponent.prototype.stringify,\n type: NewComponent.prototype.type\n };\n return NewComponent;\n};\n\n/**\n* Clone component data.\n* Clone only the properties that are plain objects while keeping a reference for the rest.\n*\n* @param data - Component data to clone.\n* @returns Cloned data.\n*/\nfunction copyData (dest, sourceData) {\n var parsedProperty;\n var key;\n for (key in sourceData) {\n if (sourceData[key] === undefined) { continue; }\n parsedProperty = sourceData[key];\n dest[key] = isObjectOrArray(parsedProperty)\n ? utils.clone(parsedProperty)\n : parsedProperty;\n }\n return dest;\n}\n\n/**\n* Object extending with checking for single-property schema.\n*\n* @param dest - Destination object or value.\n* @param source - Source object or value\n* @param {boolean} isObjectBased - Whether values are objects.\n* @returns Overridden object or value.\n*/\nfunction extendProperties (dest, source, isObjectBased) {\n var key;\n if (isObjectBased && source.constructor === Object) {\n for (key in source) {\n if (source[key] === undefined) { continue; }\n if (source[key] && source[key].constructor === Object) {\n dest[key] = utils.clone(source[key]);\n } else {\n dest[key] = source[key];\n }\n }\n return dest;\n }\n return source;\n}\n\n/**\n * Checks if a component has defined a method that needs to run every frame.\n */\nfunction hasBehavior (component) {\n return component.tick || component.tock;\n}\n\n/**\n * Wrapper for defined pause method.\n * Pause component by removing tick behavior and calling user's pause method.\n *\n * @param pauseMethod {function}\n */\nfunction wrapPause (pauseMethod) {\n return function pause () {\n var sceneEl = this.el.sceneEl;\n if (!this.isPlaying) { return; }\n pauseMethod.call(this);\n this.isPlaying = false;\n this.eventsDetach();\n // Remove tick behavior.\n if (!hasBehavior(this)) { return; }\n sceneEl.removeBehavior(this);\n };\n}\n\n/**\n * Wrapper for defined play method.\n * Play component by adding tick behavior and calling user's play method.\n *\n * @param playMethod {function}\n */\nfunction wrapPlay (playMethod) {\n return function play () {\n var sceneEl = this.el.sceneEl;\n var shouldPlay = this.el.isPlaying && !this.isPlaying;\n if (!this.initialized || !shouldPlay) { return; }\n playMethod.call(this);\n this.isPlaying = true;\n this.eventsAttach();\n // Add tick behavior.\n if (!hasBehavior(this)) { return; }\n sceneEl.addBehavior(this);\n };\n}\n\nfunction isObject (value) {\n return value && value.constructor === Object && !(value instanceof window.HTMLElement);\n}\n\nfunction isObjectOrArray (value) {\n return value && (value.constructor === Object || value.constructor === Array) &&\n !(value instanceof window.HTMLElement);\n}\n\n},{\"../utils/\":205,\"./scene/scenes\":138,\"./schema\":140,\"./system\":142}],132:[function(_dereq_,module,exports){\nvar schema = _dereq_('./schema');\n\nvar processSchema = schema.process;\nvar geometries = module.exports.geometries = {}; // Registered geometries.\nvar geometryNames = module.exports.geometryNames = []; // Names of registered geometries.\nvar THREE = _dereq_('../lib/three');\n\n/**\n * Geometry class definition.\n *\n * Geometries extend the geometry component API to create and register geometry types.\n */\nvar Geometry = module.exports.Geometry = function () {};\n\nGeometry.prototype = {\n /**\n * Contains the type schema and defaults for the data values.\n * Data is coerced into the types of the values of the defaults.\n */\n schema: {},\n\n /**\n * Init handler. Similar to attachedCallback.\n * Called during shader initialization and is only run once.\n */\n init: function (data) {\n this.geometry = new THREE.BufferGeometry();\n return this.geometry;\n },\n\n /**\n * Update handler. Similar to attributeChangedCallback.\n * Called whenever the associated geometry data changes.\n *\n * @param {object} data - New geometry data.\n */\n update: function (data) { /* no-op */ }\n};\n\n/**\n * Registers a geometry to A-Frame.\n *\n * @param {string} name - Geometry name.\n * @param {object} definition - Geometry property and methods.\n * @returns {object} Geometry.\n */\nmodule.exports.registerGeometry = function (name, definition) {\n var NewGeometry;\n var proto = {};\n\n // Format definition object to prototype object.\n Object.keys(definition).forEach(function expandDefinition (key) {\n proto[key] = {\n value: definition[key],\n writable: true\n };\n });\n\n if (geometries[name]) {\n throw new Error('The geometry `' + name + '` has been already registered');\n }\n NewGeometry = function () { Geometry.call(this); };\n NewGeometry.prototype = Object.create(Geometry.prototype, proto);\n NewGeometry.prototype.name = name;\n NewGeometry.prototype.constructor = NewGeometry;\n geometries[name] = {\n Geometry: NewGeometry,\n schema: processSchema(NewGeometry.prototype.schema)\n };\n geometryNames.push(name);\n return NewGeometry;\n};\n\n},{\"../lib/three\":179,\"./schema\":140}],133:[function(_dereq_,module,exports){\nvar coordinates = _dereq_('../utils/coordinates');\nvar debug = _dereq_('debug');\n\nvar error = debug('core:propertyTypes:warn');\nvar warn = debug('core:propertyTypes:warn');\n\nvar propertyTypes = module.exports.propertyTypes = {};\nvar nonCharRegex = /[,> .[\\]:]/;\nvar urlRegex = /\\url\\((.+)\\)/;\n\n// Built-in property types.\nregisterPropertyType('audio', '', assetParse);\nregisterPropertyType('array', [], arrayParse, arrayStringify);\nregisterPropertyType('asset', '', assetParse);\nregisterPropertyType('boolean', false, boolParse);\nregisterPropertyType('color', '#FFF', defaultParse, defaultStringify);\nregisterPropertyType('int', 0, intParse);\nregisterPropertyType('number', 0, numberParse);\nregisterPropertyType('map', '', assetParse);\nregisterPropertyType('model', '', assetParse);\nregisterPropertyType('selector', null, selectorParse, selectorStringify);\nregisterPropertyType('selectorAll', null, selectorAllParse, selectorAllStringify);\nregisterPropertyType('src', '', srcParse);\nregisterPropertyType('string', '', defaultParse, defaultStringify);\nregisterPropertyType('time', 0, intParse);\nregisterPropertyType('vec2', {x: 0, y: 0}, vecParse, coordinates.stringify);\nregisterPropertyType('vec3', {x: 0, y: 0, z: 0}, vecParse, coordinates.stringify);\nregisterPropertyType('vec4', {x: 0, y: 0, z: 0, w: 1}, vecParse, coordinates.stringify);\n\n/**\n * Register a parser for re-use such that when someone uses `type` in the schema,\n * `schema.process` will set the property `parse` and `stringify`.\n *\n * @param {string} type - Type name.\n * @param [defaultValue=null] -\n * Default value to use if component does not define default value.\n * @param {function} [parse=defaultParse] - Parse string function.\n * @param {function} [stringify=defaultStringify] - Stringify to DOM function.\n */\nfunction registerPropertyType (type, defaultValue, parse, stringify) {\n if ('type' in propertyTypes) {\n error('Property type ' + type + ' is already registered.');\n return;\n }\n\n propertyTypes[type] = {\n default: defaultValue,\n parse: parse || defaultParse,\n stringify: stringify || defaultStringify\n };\n}\nmodule.exports.registerPropertyType = registerPropertyType;\n\nfunction arrayParse (value) {\n if (Array.isArray(value)) { return value; }\n if (!value || typeof value !== 'string') { return []; }\n return value.split(',').map(trim);\n function trim (str) { return str.trim(); }\n}\n\nfunction arrayStringify (value) {\n return value.join(', ');\n}\n\n/**\n * For general assets.\n *\n * @param {string} value - Can either be `url(<value>)`, an ID selector to an asset, or\n * just string.\n * @returns {string} Parsed value from `url(<value>)`, src from `<someasset src>`, or\n * just string.\n */\nfunction assetParse (value) {\n var el;\n var parsedUrl;\n\n // If an element was provided (e.g. canvas or video), just return it.\n if (typeof value !== 'string') { return value; }\n\n // Wrapped `url()` in case of data URI.\n parsedUrl = value.match(urlRegex);\n if (parsedUrl) { return parsedUrl[1]; }\n\n // ID.\n if (value.charAt(0) === '#') {\n el = document.getElementById(value.substring(1));\n if (el) {\n // Pass through media elements. If we have the elements, we don't have to call\n // three.js loaders which would re-request the assets.\n if (el.tagName === 'CANVAS' || el.tagName === 'VIDEO' || el.tagName === 'IMG') {\n return el;\n }\n return el.getAttribute('src');\n }\n warn('\"' + value + '\" asset not found.');\n return;\n }\n\n // Non-wrapped url().\n return value;\n}\n\nfunction defaultParse (value) {\n return value;\n}\n\nfunction defaultStringify (value) {\n if (value === null) { return 'null'; }\n return value.toString();\n}\n\nfunction boolParse (value) {\n return value !== 'false' && value !== false;\n}\n\nfunction intParse (value) {\n return parseInt(value, 10);\n}\n\nfunction numberParse (value) {\n return parseFloat(value, 10);\n}\n\nfunction selectorParse (value) {\n if (!value) { return null; }\n if (typeof value !== 'string') { return value; }\n if (value[0] === '#' && !nonCharRegex.test(value)) {\n // When selecting element by ID only, use getElementById for better performance.\n // Don't match like #myId .child.\n return document.getElementById(value.substring(1));\n }\n return document.querySelector(value);\n}\n\nfunction selectorAllParse (value) {\n if (!value) { return null; }\n if (typeof value !== 'string') { return value; }\n return Array.prototype.slice.call(document.querySelectorAll(value), 0);\n}\n\nfunction selectorStringify (value) {\n if (value.getAttribute) {\n return '#' + value.getAttribute('id');\n }\n return defaultStringify(value);\n}\n\nfunction selectorAllStringify (value) {\n if (value instanceof Array) {\n return value.map(function (element) {\n return '#' + element.getAttribute('id');\n }).join(', ');\n }\n return defaultStringify(value);\n}\n\nfunction srcParse (value) {\n warn('`src` property type is deprecated. Use `asset` instead.');\n return assetParse(value);\n}\n\nfunction vecParse (value) {\n return coordinates.parse(value, this.default);\n}\n\n/**\n * Validate the default values in a schema to match their type.\n *\n * @param {string} type - Property type name.\n * @param defaultVal - Property type default value.\n * @returns {boolean} Whether default value is accurate given the type.\n */\nfunction isValidDefaultValue (type, defaultVal) {\n if (type === 'audio' && typeof defaultVal !== 'string') { return false; }\n if (type === 'array' && !Array.isArray(defaultVal)) { return false; }\n if (type === 'asset' && typeof defaultVal !== 'string') { return false; }\n if (type === 'boolean' && typeof defaultVal !== 'boolean') { return false; }\n if (type === 'color' && typeof defaultVal !== 'string') { return false; }\n if (type === 'int' && typeof defaultVal !== 'number') { return false; }\n if (type === 'number' && typeof defaultVal !== 'number') { return false; }\n if (type === 'map' && typeof defaultVal !== 'string') { return false; }\n if (type === 'model' && typeof defaultVal !== 'string') { return false; }\n if (type === 'selector' && typeof defaultVal !== 'string' &&\n defaultVal !== null) { return false; }\n if (type === 'selectorAll' && typeof defaultVal !== 'string' &&\n defaultVal !== null) { return false; }\n if (type === 'src' && typeof defaultVal !== 'string') { return false; }\n if (type === 'string' && typeof defaultVal !== 'string') { return false; }\n if (type === 'time' && typeof defaultVal !== 'number') { return false; }\n if (type === 'vec2') { return isValidDefaultCoordinate(defaultVal, 2); }\n if (type === 'vec3') { return isValidDefaultCoordinate(defaultVal, 3); }\n if (type === 'vec4') { return isValidDefaultCoordinate(defaultVal, 4); }\n return true;\n}\nmodule.exports.isValidDefaultValue = isValidDefaultValue;\n\n/**\n * Checks if default coordinates are valid.\n *\n * @param possibleCoordinates\n * @param {number} dimensions - 2 for 2D Vector, 3 for 3D vector.\n * @returns {boolean} Whether coordinates are parsed correctly.\n */\nfunction isValidDefaultCoordinate (possibleCoordinates, dimensions) {\n if (possibleCoordinates === null) { return true; }\n if (typeof possibleCoordinates !== 'object') { return false; }\n\n if (Object.keys(possibleCoordinates).length !== dimensions) {\n return false;\n } else {\n var x = possibleCoordinates.x;\n var y = possibleCoordinates.y;\n var z = possibleCoordinates.z;\n var w = possibleCoordinates.w;\n\n if (typeof x !== 'number' || typeof y !== 'number') { return false; }\n if (dimensions > 2 && typeof z !== 'number') { return false; }\n if (dimensions > 3 && typeof w !== 'number') { return false; }\n }\n\n return true;\n}\nmodule.exports.isValidDefaultCoordinate = isValidDefaultCoordinate;\n\n},{\"../utils/coordinates\":200,\"debug\":8}],134:[function(_dereq_,module,exports){\n/* global Promise, screen, CustomEvent */\nvar initMetaTags = _dereq_('./metaTags').inject;\nvar initWakelock = _dereq_('./wakelock');\nvar loadingScreen = _dereq_('./loadingScreen');\nvar re = _dereq_('../a-register-element');\nvar scenes = _dereq_('./scenes');\nvar systems = _dereq_('../system').systems;\nvar THREE = _dereq_('../../lib/three');\nvar utils = _dereq_('../../utils/');\n// Require after.\nvar AEntity = _dereq_('../a-entity');\nvar ANode = _dereq_('../a-node');\nvar initPostMessageAPI = _dereq_('./postMessage');\n\nvar bind = utils.bind;\nvar isIOS = utils.device.isIOS();\nvar isMobile = utils.device.isMobile();\nvar isWebXRAvailable = utils.device.isWebXRAvailable;\nvar registerElement = re.registerElement;\nvar warn = utils.debug('core:a-scene:warn');\n\nif (isIOS) { _dereq_('../../utils/ios-orientationchange-blank-bug'); }\n\n/**\n * Scene element, holds all entities.\n *\n * @member {array} behaviors - Component instances that have registered themselves to be\n updated on every tick.\n * @member {object} camera - three.js Camera object.\n * @member {object} canvas\n * @member {bool} isScene - Differentiates as scene entity as opposed to other entites.\n * @member {bool} isMobile - Whether browser is mobile (via UA detection).\n * @member {object} object3D - Root three.js Scene object.\n * @member {object} renderer\n * @member {bool} renderStarted\n * @member {object} systems - Registered instantiated systems.\n * @member {number} time\n */\nmodule.exports.AScene = registerElement('a-scene', {\n prototype: Object.create(AEntity.prototype, {\n createdCallback: {\n value: function () {\n this.clock = new THREE.Clock();\n this.isIOS = isIOS;\n this.isMobile = isMobile;\n this.hasWebXR = isWebXRAvailable;\n this.isAR = false;\n this.isScene = true;\n this.object3D = new THREE.Scene();\n var self = this;\n this.object3D.onAfterRender = function (renderer, scene, camera) {\n // THREE may swap the camera used for the rendering if in VR, so we pass it to tock\n if (self.isPlaying) { self.tock(self.time, self.delta, camera); }\n };\n this.resize = bind(this.resize, this);\n this.render = bind(this.render, this);\n this.systems = {};\n this.systemNames = [];\n this.time = this.delta = 0;\n\n this.behaviors = {tick: [], tock: []};\n this.hasLoaded = false;\n this.isPlaying = false;\n this.originalHTML = this.innerHTML;\n\n // Default components.\n this.setAttribute('inspector', '');\n this.setAttribute('keyboard-shortcuts', '');\n this.setAttribute('screenshot', '');\n this.setAttribute('vr-mode-ui', '');\n this.setAttribute('device-orientation-permission-ui', '');\n }\n },\n\n addFullScreenStyles: {\n value: function () {\n document.documentElement.classList.add('a-fullscreen');\n }\n },\n\n removeFullScreenStyles: {\n value: function () {\n document.documentElement.classList.remove('a-fullscreen');\n }\n },\n\n attachedCallback: {\n value: function () {\n var self = this;\n var embedded = this.hasAttribute('embedded');\n // Renderer initialization\n setupCanvas(this);\n this.setupRenderer();\n loadingScreen.setup(this, getCanvasSize);\n\n this.resize();\n if (!embedded) { this.addFullScreenStyles(); }\n initPostMessageAPI(this);\n\n initMetaTags(this);\n initWakelock(this);\n\n // Handler to exit VR (e.g., Oculus Browser back button).\n this.onVRPresentChangeBound = bind(this.onVRPresentChange, this);\n window.addEventListener('vrdisplaypresentchange', this.onVRPresentChangeBound);\n\n // Bind functions.\n this.enterVRBound = function () { self.enterVR(); };\n this.exitVRBound = function () { self.exitVR(); };\n this.exitVRTrueBound = function () { self.exitVR(true); };\n this.pointerRestrictedBound = function () { self.pointerRestricted(); };\n this.pointerUnrestrictedBound = function () { self.pointerUnrestricted(); };\n\n if (!isWebXRAvailable) {\n // Exit VR on `vrdisplaydeactivate` (e.g. taking off Rift headset).\n window.addEventListener('vrdisplaydeactivate', this.exitVRBound);\n\n // Exit VR on `vrdisplaydisconnect` (e.g. unplugging Rift headset).\n window.addEventListener('vrdisplaydisconnect', this.exitVRTrueBound);\n\n // Register for mouse restricted events while in VR\n // (e.g. mouse no longer available on desktop 2D view)\n window.addEventListener('vrdisplaypointerrestricted', this.pointerRestrictedBound);\n\n // Register for mouse unrestricted events while in VR\n // (e.g. mouse once again available on desktop 2D view)\n window.addEventListener('vrdisplaypointerunrestricted',\n this.pointerUnrestrictedBound);\n }\n\n window.addEventListener('sessionend', this.resize);\n // Camera set up by camera system.\n this.addEventListener('cameraready', function () {\n self.attachedCallbackPostCamera();\n });\n\n this.initSystems();\n\n // WebXR Immersive navigation handler.\n if (this.hasWebXR && navigator.xr && navigator.xr.addEventListener) {\n navigator.xr.addEventListener('sessiongranted', function () { self.enterVR(); });\n }\n }\n },\n\n attachedCallbackPostCamera: {\n value: function () {\n var resize;\n var self = this;\n\n window.addEventListener('load', resize);\n window.addEventListener('resize', function () {\n // Workaround for a Webkit bug (https://bugs.webkit.org/show_bug.cgi?id=170595)\n // where the window does not contain the correct viewport size\n // after an orientation change. The window size is correct if the operation\n // is postponed a few milliseconds.\n // self.resize can be called directly once the bug above is fixed.\n if (self.isIOS) {\n setTimeout(self.resize, 100);\n } else {\n self.resize();\n }\n });\n this.play();\n\n // Add to scene index.\n scenes.push(this);\n },\n writable: window.debug\n },\n\n /**\n * Initialize all systems.\n */\n initSystems: {\n value: function () {\n var name;\n\n // Initialize camera system first.\n this.initSystem('camera');\n\n for (name in systems) {\n if (name === 'camera') { continue; }\n this.initSystem(name);\n }\n }\n },\n\n /**\n * Initialize a system.\n */\n initSystem: {\n value: function (name) {\n if (this.systems[name]) { return; }\n this.systems[name] = new systems[name](this);\n this.systemNames.push(name);\n }\n },\n\n /**\n * Shut down scene on detach.\n */\n detachedCallback: {\n value: function () {\n // Remove from scene index.\n var sceneIndex = scenes.indexOf(this);\n scenes.splice(sceneIndex, 1);\n\n window.removeEventListener('vrdisplaypresentchange', this.onVRPresentChangeBound);\n window.removeEventListener('vrdisplayactivate', this.enterVRBound);\n window.removeEventListener('vrdisplaydeactivate', this.exitVRBound);\n window.removeEventListener('vrdisplayconnect', this.enterVRBound);\n window.removeEventListener('vrdisplaydisconnect', this.exitVRTrueBound);\n window.removeEventListener('vrdisplaypointerrestricted', this.pointerRestrictedBound);\n window.removeEventListener('vrdisplaypointerunrestricted', this.pointerUnrestrictedBound);\n window.removeEventListener('sessionend', this.resize);\n this.renderer.xr.dispose();\n }\n },\n\n /**\n * Add ticks and tocks.\n *\n * @param {object} behavior - A component.\n */\n addBehavior: {\n value: function (behavior) {\n var behaviorArr;\n var behaviors = this.behaviors;\n var behaviorType;\n\n // Check if behavior has tick and/or tock and add the behavior to the appropriate list.\n for (behaviorType in behaviors) {\n if (!behavior[behaviorType]) { continue; }\n behaviorArr = this.behaviors[behaviorType];\n if (behaviorArr.indexOf(behavior) === -1) {\n behaviorArr.push(behavior);\n }\n }\n }\n },\n\n /**\n * For tests.\n */\n getPointerLockElement: {\n value: function () {\n return document.pointerLockElement;\n },\n writable: window.debug\n },\n\n /**\n * For tests.\n */\n checkHeadsetConnected: {\n value: utils.device.checkHeadsetConnected,\n writable: window.debug\n },\n\n enterAR: {\n value: function () {\n var errorMessage;\n if (!this.hasWebXR) {\n errorMessage = 'Failed to enter AR mode, WebXR not supported.';\n throw new Error(errorMessage);\n }\n if (!utils.device.checkARSupport()) {\n errorMessage = 'Failed to enter AR, WebXR immersive-ar mode not supported in your browser or device.';\n throw new Error(errorMessage);\n }\n return this.enterVR(true);\n }\n },\n\n /**\n * Call `requestPresent` if WebVR or WebVR polyfill.\n * Call `requestFullscreen` on desktop.\n * Handle events, states, fullscreen styles.\n *\n * @param {bool?} useAR - if true, try immersive-ar mode\n * @returns {Promise}\n */\n enterVR: {\n value: function (useAR) {\n var self = this;\n var vrDisplay;\n var vrManager = self.renderer.xr;\n var xrInit;\n\n // Don't enter VR if already in VR.\n if (this.is('vr-mode')) { return Promise.resolve('Already in VR.'); }\n\n // Has VR.\n if (this.checkHeadsetConnected() || this.isMobile) {\n vrManager.enabled = true;\n\n if (this.hasWebXR) {\n // XR API.\n if (this.xrSession) {\n this.xrSession.removeEventListener('end', this.exitVRBound);\n }\n var refspace = this.sceneEl.systems.webxr.sessionReferenceSpaceType;\n vrManager.setReferenceSpaceType(refspace);\n var xrMode = useAR ? 'immersive-ar' : 'immersive-vr';\n xrInit = this.sceneEl.systems.webxr.sessionConfiguration;\n return new Promise(function (resolve, reject) {\n navigator.xr.requestSession(xrMode, xrInit).then(\n function requestSuccess (xrSession) {\n self.xrSession = xrSession;\n vrManager.layersEnabled = xrInit.requiredFeatures.indexOf('layers') !== -1;\n vrManager.setSession(xrSession);\n xrSession.addEventListener('end', self.exitVRBound);\n enterVRSuccess(resolve);\n },\n function requestFail (error) {\n var useAR = xrMode === 'immersive-ar';\n var mode = useAR ? 'AR' : 'VR';\n throw new Error('Failed to enter ' + mode + ' mode (`requestSession`) ' + error);\n }\n );\n });\n } else {\n vrDisplay = utils.device.getVRDisplay();\n vrManager.setDevice(vrDisplay);\n if (vrDisplay.isPresenting &&\n !window.hasNativeWebVRImplementation) {\n enterVRSuccess();\n return Promise.resolve();\n }\n var rendererSystem = this.getAttribute('renderer');\n var presentationAttributes = {\n highRefreshRate: rendererSystem.highRefreshRate,\n foveationLevel: rendererSystem.foveationLevel\n };\n\n return vrDisplay.requestPresent([{\n source: this.canvas,\n attributes: presentationAttributes\n }]).then(enterVRSuccess, enterVRFailure);\n }\n }\n\n // No VR.\n enterVRSuccess();\n return Promise.resolve();\n\n // Callback that happens on enter VR success or enter fullscreen (any API).\n function enterVRSuccess (resolve) {\n // vrdisplaypresentchange fires only once when the first requestPresent is completed;\n // the first requestPresent could be called from ondisplayactivate and there is no way\n // to setup everything from there. Thus, we need to emulate another vrdisplaypresentchange\n // for the actual requestPresent. Need to make sure there are no issues with firing the\n // vrdisplaypresentchange multiple times.\n var event;\n if (window.hasNativeWebVRImplementation && !window.hasNativeWebXRImplementation) {\n event = new CustomEvent('vrdisplaypresentchange', {detail: {display: utils.device.getVRDisplay()}});\n window.dispatchEvent(event);\n }\n\n if (useAR) {\n self.addState('ar-mode');\n } else {\n self.addState('vr-mode');\n }\n self.emit('enter-vr', {target: self});\n // Lock to landscape orientation on mobile.\n if (!isWebXRAvailable && self.isMobile && screen.orientation && screen.orientation.lock) {\n screen.orientation.lock('landscape');\n }\n self.addFullScreenStyles();\n\n // On mobile, the polyfill handles fullscreen.\n // TODO: 07/16 Chromium builds break when `requestFullscreen`ing on a canvas\n // that we are also `requestPresent`ing. Until then, don't fullscreen if headset\n // connected.\n if (!self.isMobile && !self.checkHeadsetConnected()) {\n requestFullscreen(self.canvas);\n }\n\n self.renderer.setAnimationLoop(self.render);\n self.resize();\n if (resolve) { resolve(); }\n }\n\n function enterVRFailure (err) {\n self.removeState('vr-mode');\n if (err && err.message) {\n throw new Error('Failed to enter VR mode (`requestPresent`): ' + err.message);\n } else {\n throw new Error('Failed to enter VR mode (`requestPresent`).');\n }\n }\n },\n writable: true\n },\n /**\n * Call `exitPresent` if WebVR / WebXR or WebVR polyfill.\n * Handle events, states, fullscreen styles.\n *\n * @returns {Promise}\n */\n exitVR: {\n value: function () {\n var self = this;\n var vrDisplay;\n var vrManager = this.renderer.xr;\n\n // Don't exit VR if not in VR.\n if (!this.is('vr-mode') && !this.is('ar-mode')) { return Promise.resolve('Not in immersive mode.'); }\n\n // Handle exiting VR if not yet already and in a headset or polyfill.\n if (this.checkHeadsetConnected() || this.isMobile) {\n vrManager.enabled = false;\n vrDisplay = utils.device.getVRDisplay();\n if (this.hasWebXR) {\n this.xrSession.removeEventListener('end', this.exitVRBound);\n // Capture promise to avoid errors.\n this.xrSession.end().then(function () {}, function () {});\n this.xrSession = undefined;\n vrManager.setSession(null);\n } else {\n if (vrDisplay.isPresenting) {\n return vrDisplay.exitPresent().then(exitVRSuccess, exitVRFailure);\n }\n }\n } else {\n exitFullscreen();\n }\n\n // Handle exiting VR in all other cases (2D fullscreen, external exit VR event).\n exitVRSuccess();\n\n return Promise.resolve();\n\n function exitVRSuccess () {\n self.removeState('vr-mode');\n self.removeState('ar-mode');\n // Lock to landscape orientation on mobile.\n if (self.isMobile && screen.orientation && screen.orientation.unlock) {\n screen.orientation.unlock();\n }\n // Exiting VR in embedded mode, no longer need fullscreen styles.\n if (self.hasAttribute('embedded')) { self.removeFullScreenStyles(); }\n\n self.resize();\n if (self.isIOS) { utils.forceCanvasResizeSafariMobile(self.canvas); }\n self.renderer.setPixelRatio(window.devicePixelRatio);\n self.emit('exit-vr', {target: self});\n }\n\n function exitVRFailure (err) {\n if (err && err.message) {\n throw new Error('Failed to exit VR mode (`exitPresent`): ' + err.message);\n } else {\n throw new Error('Failed to exit VR mode (`exitPresent`).');\n }\n }\n },\n writable: true\n },\n\n pointerRestricted: {\n value: function () {\n if (this.canvas) {\n var pointerLockElement = this.getPointerLockElement();\n if (pointerLockElement && pointerLockElement !== this.canvas && document.exitPointerLock) {\n // Recreate pointer lock on the canvas, if taken on another element.\n document.exitPointerLock();\n }\n\n if (this.canvas.requestPointerLock) {\n this.canvas.requestPointerLock();\n }\n }\n }\n },\n\n pointerUnrestricted: {\n value: function () {\n var pointerLockElement = this.getPointerLockElement();\n if (pointerLockElement && pointerLockElement === this.canvas && document.exitPointerLock) {\n document.exitPointerLock();\n }\n }\n },\n\n /**\n * Handle `vrdisplaypresentchange` event for exiting VR through other means than\n * `<ESC>` key. For example, GearVR back button on Oculus Browser.\n */\n onVRPresentChange: {\n value: function (evt) {\n // Polyfill places display inside the detail property\n var display = evt.display || evt.detail.display;\n // Entering VR.\n if (display && display.isPresenting) {\n this.enterVR();\n return;\n }\n // Exiting VR.\n this.exitVR();\n }\n },\n\n /**\n * Wraps Entity.getAttribute to take into account for systems.\n * If system exists, then return system data rather than possible component data.\n */\n getAttribute: {\n value: function (attr) {\n var system = this.systems[attr];\n if (system) { return system.data; }\n return AEntity.prototype.getAttribute.call(this, attr);\n }\n },\n\n /**\n * `getAttribute` used to be `getDOMAttribute` and `getComputedAttribute` used to be\n * what `getAttribute` is now. Now legacy code.\n */\n getComputedAttribute: {\n value: function (attr) {\n warn('`getComputedAttribute` is deprecated. Use `getAttribute` instead.');\n this.getAttribute(attr);\n }\n },\n\n /**\n * Wraps Entity.getDOMAttribute to take into account for systems.\n * If system exists, then return system data rather than possible component data.\n */\n getDOMAttribute: {\n value: function (attr) {\n var system = this.systems[attr];\n if (system) { return system.data; }\n return AEntity.prototype.getDOMAttribute.call(this, attr);\n }\n },\n\n /**\n * Wrap Entity.setAttribute to take into account for systems.\n * If system exists, then skip component initialization checks and do a normal\n * setAttribute.\n */\n setAttribute: {\n value: function (attr, value, componentPropValue) {\n var system = this.systems[attr];\n if (system) {\n ANode.prototype.setAttribute.call(this, attr, value);\n system.updateProperties(value);\n return;\n }\n AEntity.prototype.setAttribute.call(this, attr, value, componentPropValue);\n }\n },\n\n /**\n * @param {object} behavior - A component.\n */\n removeBehavior: {\n value: function (behavior) {\n var behaviorArr;\n var behaviorType;\n var behaviors = this.behaviors;\n var index;\n\n // Check if behavior has tick and/or tock and remove the behavior from the appropriate\n // array.\n for (behaviorType in behaviors) {\n if (!behavior[behaviorType]) { continue; }\n behaviorArr = this.behaviors[behaviorType];\n index = behaviorArr.indexOf(behavior);\n if (index !== -1) { behaviorArr.splice(index, 1); }\n }\n }\n },\n\n resize: {\n value: function () {\n var camera = this.camera;\n var canvas = this.canvas;\n var embedded;\n var isVRPresenting;\n var size;\n var isPresenting = this.renderer.xr.isPresenting;\n isVRPresenting = this.renderer.xr.enabled && isPresenting;\n\n // Do not update renderer, if a camera or a canvas have not been injected.\n // In VR mode, three handles canvas resize based on the dimensions returned by\n // the getEyeParameters function of the WebVR API. These dimensions are independent of\n // the window size, therefore should not be overwritten with the window's width and\n // height, // except when in fullscreen mode.\n if (!camera || !canvas || (this.is('vr-mode') && (this.isMobile || isVRPresenting))) {\n return;\n }\n\n // Update camera.\n embedded = this.getAttribute('embedded') && !this.is('vr-mode');\n size = getCanvasSize(canvas, embedded, this.maxCanvasSize, this.is('vr-mode'));\n camera.aspect = size.width / size.height;\n camera.updateProjectionMatrix();\n\n // Notify renderer of size change.\n this.renderer.setSize(size.width, size.height, false);\n this.emit('rendererresize', null, false);\n },\n writable: true\n },\n\n setupRenderer: {\n value: function () {\n var self = this;\n var renderer;\n var rendererAttr;\n var rendererAttrString;\n var rendererConfig;\n\n rendererConfig = {\n alpha: true,\n antialias: !isMobile,\n canvas: this.canvas,\n logarithmicDepthBuffer: false,\n powerPreference: 'high-performance'\n };\n\n this.maxCanvasSize = {height: 1920, width: 1920};\n\n if (this.hasAttribute('renderer')) {\n rendererAttrString = this.getAttribute('renderer');\n rendererAttr = utils.styleParser.parse(rendererAttrString);\n\n if (rendererAttr.precision) {\n rendererConfig.precision = rendererAttr.precision + 'p';\n }\n\n if (rendererAttr.antialias && rendererAttr.antialias !== 'auto') {\n rendererConfig.antialias = rendererAttr.antialias === 'true';\n }\n\n if (rendererAttr.logarithmicDepthBuffer && rendererAttr.logarithmicDepthBuffer !== 'auto') {\n rendererConfig.logarithmicDepthBuffer = rendererAttr.logarithmicDepthBuffer === 'true';\n }\n\n if (rendererAttr.alpha) {\n rendererConfig.alpha = rendererAttr.alpha === 'true';\n }\n\n this.maxCanvasSize = {\n width: rendererAttr.maxCanvasWidth\n ? parseInt(rendererAttr.maxCanvasWidth)\n : this.maxCanvasSize.width,\n height: rendererAttr.maxCanvasHeight\n ? parseInt(rendererAttr.maxCanvasHeight)\n : this.maxCanvasSize.height\n };\n }\n\n renderer = this.renderer = new THREE.WebGLRenderer(rendererConfig);\n renderer.setPixelRatio(window.devicePixelRatio);\n renderer.sortObjects = false;\n if (this.camera) { renderer.xr.setPoseTarget(this.camera.el.object3D); }\n this.addEventListener('camera-set-active', function () {\n renderer.xr.setPoseTarget(self.camera.el.object3D);\n });\n },\n writable: window.debug\n },\n\n /**\n * Handler attached to elements to help scene know when to kick off.\n * Scene waits for all entities to load.\n */\n play: {\n value: function () {\n var self = this;\n var sceneEl = this;\n\n if (this.renderStarted) {\n AEntity.prototype.play.call(this);\n return;\n }\n\n this.addEventListener('loaded', function () {\n var renderer = this.renderer;\n var vrDisplay;\n var vrManager = this.renderer.xr;\n AEntity.prototype.play.call(this); // .play() *before* render.\n\n if (sceneEl.renderStarted) { return; }\n sceneEl.resize();\n\n // Kick off render loop.\n if (sceneEl.renderer) {\n if (window.performance) { window.performance.mark('render-started'); }\n loadingScreen.remove();\n vrDisplay = utils.device.getVRDisplay();\n if (vrDisplay && vrDisplay.isPresenting) {\n vrManager.setDevice(vrDisplay);\n vrManager.enabled = true;\n sceneEl.enterVR();\n }\n renderer.setAnimationLoop(this.render);\n sceneEl.renderStarted = true;\n sceneEl.emit('renderstart');\n }\n });\n\n // setTimeout to wait for all nodes to attach and run their callbacks.\n setTimeout(function () {\n AEntity.prototype.load.call(self);\n });\n }\n },\n\n /**\n * Wrap `updateComponent` to not initialize the component if the component has a system\n * (aframevr/aframe#2365).\n */\n updateComponent: {\n value: function (componentName) {\n if (componentName in systems) { return; }\n AEntity.prototype.updateComponent.apply(this, arguments);\n }\n },\n\n /**\n * Behavior-updater meant to be called from scene render.\n * Abstracted to a different function to facilitate unit testing (`scene.tick()`) without\n * needing to render.\n */\n tick: {\n value: function (time, timeDelta) {\n var i;\n var systems = this.systems;\n\n // Components.\n for (i = 0; i < this.behaviors.tick.length; i++) {\n if (!this.behaviors.tick[i].el.isPlaying) { continue; }\n this.behaviors.tick[i].tick(time, timeDelta);\n }\n\n // Systems.\n for (i = 0; i < this.systemNames.length; i++) {\n if (!systems[this.systemNames[i]].tick) { continue; }\n systems[this.systemNames[i]].tick(time, timeDelta);\n }\n }\n },\n\n /**\n * Behavior-updater meant to be called after scene render for post processing purposes.\n * Abstracted to a different function to facilitate unit testing (`scene.tock()`) without\n * needing to render.\n */\n tock: {\n value: function (time, timeDelta, camera) {\n var i;\n var systems = this.systems;\n\n // Components.\n for (i = 0; i < this.behaviors.tock.length; i++) {\n if (!this.behaviors.tock[i].el.isPlaying) { continue; }\n this.behaviors.tock[i].tock(time, timeDelta, camera);\n }\n\n // Systems.\n for (i = 0; i < this.systemNames.length; i++) {\n if (!systems[this.systemNames[i]].tock) { continue; }\n systems[this.systemNames[i]].tock(time, timeDelta, camera);\n }\n }\n },\n\n /**\n * The render loop.\n *\n * Updates animations.\n * Updates behaviors.\n * Renders with request animation frame.\n */\n render: {\n value: function (time, frame) {\n var renderer = this.renderer;\n\n this.frame = frame;\n this.delta = this.clock.getDelta() * 1000;\n this.time = this.clock.elapsedTime * 1000;\n\n if (this.isPlaying) { this.tick(this.time, this.delta); }\n var savedBackground = null;\n if (this.is('ar-mode')) {\n // In AR mode, don't render the default background. Hide it, then\n // restore it again after rendering.\n savedBackground = this.object3D.background;\n this.object3D.background = null;\n }\n renderer.render(this.object3D, this.camera);\n if (savedBackground) {\n this.object3D.background = savedBackground;\n }\n },\n writable: true\n }\n })\n});\n\n/**\n * Return the canvas size where the scene will be rendered.\n * Will be always the window size except when the scene is embedded.\n * The parent size (less than max size) will be returned in that case.\n *\n * @param {object} canvasEl - the canvas element\n * @param {boolean} embedded - Is the scene embedded?\n * @param {object} max - Max size parameters\n * @param {boolean} isVR - If in VR\n */\nfunction getCanvasSize (canvasEl, embedded, maxSize, isVR) {\n if (!canvasEl.parentElement) { return {height: 0, width: 0}; }\n if (embedded) {\n return {\n height: canvasEl.parentElement.offsetHeight,\n width: canvasEl.parentElement.offsetWidth\n };\n }\n return getMaxSize(maxSize, isVR);\n}\n\n/**\n * Return the canvas size. Will be the window size unless that size is greater than the\n * maximum size (1920x1920 by default). The constrained size will be returned in that case,\n * maintaining aspect ratio\n *\n * @param {object} maxSize - Max size parameters (width and height).\n * @param {boolean} isVR - If in VR.\n * @returns {object} Width and height.\n */\nfunction getMaxSize (maxSize, isVR) {\n var aspectRatio;\n var size;\n var pixelRatio = window.devicePixelRatio;\n\n size = {height: document.body.offsetHeight, width: document.body.offsetWidth};\n if (!maxSize || isVR || (maxSize.width === -1 && maxSize.height === -1)) {\n return size;\n }\n\n if (size.width * pixelRatio < maxSize.width &&\n size.height * pixelRatio < maxSize.height) {\n return size;\n }\n\n aspectRatio = size.width / size.height;\n\n if ((size.width * pixelRatio) > maxSize.width && maxSize.width !== -1) {\n size.width = Math.round(maxSize.width / pixelRatio);\n size.height = Math.round(maxSize.width / aspectRatio / pixelRatio);\n }\n\n if ((size.height * pixelRatio) > maxSize.height && maxSize.height !== -1) {\n size.height = Math.round(maxSize.height / pixelRatio);\n size.width = Math.round(maxSize.height * aspectRatio / pixelRatio);\n }\n\n return size;\n}\n\nfunction requestFullscreen (canvas) {\n var requestFullscreen =\n canvas.requestFullscreen ||\n canvas.webkitRequestFullscreen ||\n canvas.mozRequestFullScreen || // The capitalized `S` is not a typo.\n canvas.msRequestFullscreen;\n // Hide navigation buttons on Android.\n requestFullscreen.apply(canvas, [{navigationUI: 'hide'}]);\n}\n\nfunction exitFullscreen () {\n var fullscreenEl =\n document.fullscreenElement ||\n document.webkitFullscreenElement ||\n document.mozFullScreenElement;\n if (!fullscreenEl) { return; }\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n}\n\nfunction setupCanvas (sceneEl) {\n var canvasEl;\n\n canvasEl = document.createElement('canvas');\n canvasEl.classList.add('a-canvas');\n // Mark canvas as provided/injected by A-Frame.\n canvasEl.dataset.aframeCanvas = true;\n sceneEl.appendChild(canvasEl);\n\n document.addEventListener('fullscreenchange', onFullScreenChange);\n document.addEventListener('mozfullscreenchange', onFullScreenChange);\n document.addEventListener('webkitfullscreenchange', onFullScreenChange);\n document.addEventListener('MSFullscreenChange', onFullScreenChange);\n\n // Prevent overscroll on mobile.\n canvasEl.addEventListener('touchmove', function (event) { event.preventDefault(); });\n\n // Set canvas on scene.\n sceneEl.canvas = canvasEl;\n sceneEl.emit('render-target-loaded', {target: canvasEl});\n // For unknown reasons a synchronous resize does not work on desktop when\n // entering/exiting fullscreen.\n setTimeout(bind(sceneEl.resize, sceneEl), 0);\n\n function onFullScreenChange () {\n var fullscreenEl =\n document.fullscreenElement ||\n document.mozFullScreenElement ||\n document.webkitFullscreenElement;\n // No fullscren element === exit fullscreen\n if (!fullscreenEl) { sceneEl.exitVR(); }\n document.activeElement.blur();\n document.body.focus();\n }\n}\nmodule.exports.setupCanvas = setupCanvas; // For testing.\n\n},{\"../../lib/three\":179,\"../../utils/\":205,\"../../utils/ios-orientationchange-blank-bug\":206,\"../a-entity\":127,\"../a-node\":129,\"../a-register-element\":130,\"../system\":142,\"./loadingScreen\":135,\"./metaTags\":136,\"./postMessage\":137,\"./scenes\":138,\"./wakelock\":139}],135:[function(_dereq_,module,exports){\n/* global THREE */\nvar utils = _dereq_('../../utils/');\nvar styleParser = utils.styleParser;\n\nvar sceneEl;\nvar titleEl;\nvar getSceneCanvasSize;\n\nvar ATTR_NAME = 'loading-screen';\nvar LOADER_TITLE_CLASS = 'a-loader-title';\n\nmodule.exports.setup = function setup (el, getCanvasSize) {\n sceneEl = el;\n getSceneCanvasSize = getCanvasSize;\n var loaderAttribute = sceneEl.hasAttribute(ATTR_NAME) ? styleParser.parse(sceneEl.getAttribute(ATTR_NAME)) : undefined;\n var dotsColor = loaderAttribute && loaderAttribute.dotsColor || 'white';\n var backgroundColor = loaderAttribute && loaderAttribute.backgroundColor || '#24CAFF';\n var loaderEnabled = loaderAttribute === undefined || loaderAttribute.enabled === 'true' || loaderAttribute.enabled === undefined; // true default\n var loaderScene;\n var sphereGeometry;\n var sphereMaterial;\n var sphereMesh1;\n var sphereMesh2;\n var sphereMesh3;\n var camera;\n var clock;\n var time;\n var render;\n\n if (!loaderEnabled) { return; }\n\n // Setup Scene.\n loaderScene = new THREE.Scene();\n sphereGeometry = new THREE.SphereGeometry(0.20, 36, 18, 0, 2 * Math.PI, 0, Math.PI);\n sphereMaterial = new THREE.MeshBasicMaterial({color: dotsColor});\n sphereMesh1 = new THREE.Mesh(sphereGeometry, sphereMaterial);\n sphereMesh2 = sphereMesh1.clone();\n sphereMesh3 = sphereMesh1.clone();\n camera = new THREE.PerspectiveCamera(80, window.innerWidth / window.innerHeight, 0.0005, 10000);\n clock = new THREE.Clock();\n time = 0;\n render = function () {\n sceneEl.renderer.render(loaderScene, camera);\n time = clock.getElapsedTime() % 4;\n sphereMesh1.visible = time >= 1;\n sphereMesh2.visible = time >= 2;\n sphereMesh3.visible = time >= 3;\n };\n\n loaderScene.background = new THREE.Color(backgroundColor);\n loaderScene.add(camera);\n sphereMesh1.position.set(-1, 0, -15);\n sphereMesh2.position.set(0, 0, -15);\n sphereMesh3.position.set(1, 0, -15);\n camera.add(sphereMesh1);\n camera.add(sphereMesh2);\n camera.add(sphereMesh3);\n setupTitle();\n\n // Delay 200ms to avoid loader flashes.\n setTimeout(function () {\n if (sceneEl.hasLoaded) { return; }\n resize(camera);\n titleEl.style.display = 'block';\n window.addEventListener('resize', function () { resize(camera); });\n sceneEl.renderer.setAnimationLoop(render);\n }, 200);\n};\n\nmodule.exports.remove = function remove () {\n window.removeEventListener('resize', resize);\n if (!titleEl) { return; }\n // Hide title.\n titleEl.style.display = 'none';\n};\n\nfunction resize (camera) {\n var embedded = sceneEl.hasAttribute('embedded');\n var size = getSceneCanvasSize(sceneEl.canvas, embedded, sceneEl.maxCanvasSize, sceneEl.is('vr-mode'));\n camera.aspect = size.width / size.height;\n camera.updateProjectionMatrix();\n // Notify renderer of size change.\n sceneEl.renderer.setSize(size.width, size.height, false);\n}\n\nfunction setupTitle () {\n titleEl = document.createElement('div');\n titleEl.className = LOADER_TITLE_CLASS;\n titleEl.innerHTML = document.title;\n titleEl.style.display = 'none';\n sceneEl.appendChild(titleEl);\n}\n\n},{\"../../utils/\":205}],136:[function(_dereq_,module,exports){\nvar constants = _dereq_('../../constants/');\nvar extend = _dereq_('../../utils').extend;\n\nvar MOBILE_HEAD_TAGS = module.exports.MOBILE_HEAD_TAGS = [\n Meta({name: 'viewport', content: 'width=device-width,initial-scale=1,maximum-scale=1,shrink-to-fit=no,user-scalable=no,minimal-ui,viewport-fit=cover'}),\n\n // W3C-standardised meta tags.\n Meta({name: 'mobile-web-app-capable', content: 'yes'}),\n Meta({name: 'theme-color', content: 'black'})\n];\n\nvar MOBILE_IOS_HEAD_TAGS = [\n // iOS-specific meta tags for fullscreen when pinning to homescreen.\n Meta({name: 'apple-mobile-web-app-capable', content: 'yes'}),\n Meta({name: 'apple-mobile-web-app-status-bar-style', content: 'black'}),\n Link({rel: 'apple-touch-icon', href: 'https://aframe.io/images/aframe-logo-152.png'})\n];\n\nfunction Meta (attrs) {\n return {\n tagName: 'meta',\n attributes: attrs,\n exists: function () { return document.querySelector('meta[name=\"' + attrs.name + '\"]'); }\n };\n}\n\nfunction Link (attrs) {\n return {\n tagName: 'link',\n attributes: attrs,\n exists: function () { return document.querySelector('link[rel=\"' + attrs.rel + '\"]'); }\n };\n}\n\n/**\n * Injects the necessary metatags in the document for mobile support:\n * 1. Prevent the user to zoom in the document.\n * 2. Ensure that window.innerWidth and window.innerHeight have the correct\n * values and the canvas is properly scaled.\n * 3. To allow fullscreen mode when pinning a web app on the home screen on\n * iOS.\n * Adapted from https://www.reddit.com/r/web_design/comments/3la04p/\n *\n * @param {object} scene - Scene element\n * @returns {Array}\n */\nmodule.exports.inject = function injectHeadTags (scene) {\n var headEl = document.head;\n var headScriptEl = headEl.querySelector('script');\n var tag;\n var headTags = [];\n MOBILE_HEAD_TAGS.forEach(createAndInjectTag);\n if (scene.isIOS) {\n MOBILE_IOS_HEAD_TAGS.forEach(createAndInjectTag);\n }\n return headTags;\n\n function createAndInjectTag (tagObj) {\n if (!tagObj || tagObj.exists()) { return; }\n\n tag = createTag(tagObj);\n if (!tag) { return; }\n\n if (headScriptEl) {\n headScriptEl.parentNode.insertBefore(tag, headScriptEl);\n } else {\n headEl.appendChild(tag);\n }\n\n headTags.push(tag);\n }\n};\n\nfunction createTag (tagObj) {\n if (!tagObj || !tagObj.tagName) { return; }\n var meta = document.createElement(tagObj.tagName);\n meta.setAttribute(constants.AFRAME_INJECTED, '');\n return extend(meta, tagObj.attributes);\n}\n\n},{\"../../constants/\":123,\"../../utils\":205}],137:[function(_dereq_,module,exports){\nvar bind = _dereq_('../../utils/bind');\nvar isIframed = _dereq_('../../utils/').isIframed;\n\n/**\n * Provides a post message API for scenes contained\n * in an iframe.\n */\nmodule.exports = function initPostMessageAPI (scene) {\n // Handles fullscreen behavior when inside an iframe.\n if (!isIframed()) { return; }\n // postMessage API handler\n window.addEventListener('message', bind(postMessageAPIHandler, scene));\n};\n\nfunction postMessageAPIHandler (event) {\n var scene = this;\n if (!event.data) { return; }\n\n switch (event.data.type) {\n case 'vr': {\n switch (event.data.data) {\n case 'enter':\n scene.enterVR();\n break;\n case 'exit':\n scene.exitVR();\n break;\n }\n }\n }\n}\n\n},{\"../../utils/\":205,\"../../utils/bind\":199}],138:[function(_dereq_,module,exports){\n/*\n Scene index for keeping track of created scenes.\n*/\nmodule.exports = [];\n\n},{}],139:[function(_dereq_,module,exports){\nvar Wakelock = _dereq_('../../../vendor/wakelock/wakelock');\n\nmodule.exports = function initWakelock (scene) {\n if (!scene.isMobile) { return; }\n\n var wakelock = scene.wakelock = new Wakelock();\n scene.addEventListener('enter-vr', function () { wakelock.request(); });\n scene.addEventListener('exit-vr', function () { wakelock.release(); });\n};\n\n},{\"../../../vendor/wakelock/wakelock\":220}],140:[function(_dereq_,module,exports){\nvar utils = _dereq_('../utils/');\nvar PropertyTypes = _dereq_('./propertyTypes');\n\nvar debug = utils.debug;\nvar isValidDefaultValue = PropertyTypes.isValidDefaultValue;\nvar propertyTypes = PropertyTypes.propertyTypes;\n\nvar warn = debug('core:schema:warn');\n\n/**\n * A schema is classified as a schema for a single property if:\n * - `type` is defined on the schema as a string.\n * - OR `default` is defined on the schema, as a reserved keyword.\n * - OR schema is empty.\n */\nfunction isSingleProperty (schema) {\n if ('type' in schema) {\n return typeof schema.type === 'string';\n }\n return 'default' in schema;\n}\nmodule.exports.isSingleProperty = isSingleProperty;\n\n/**\n * Build step to schema to use `type` to inject default value, parser, and stringifier.\n *\n * @param {object} schema\n * @param {string} componentName\n * @returns {object} Schema.\n */\nmodule.exports.process = function (schema, componentName) {\n var propName;\n\n // For single property schema, run processPropDefinition over the whole schema.\n if (isSingleProperty(schema)) {\n return processPropertyDefinition(schema, componentName);\n }\n\n // For multi-property schema, run processPropDefinition over each property definition.\n for (propName in schema) {\n schema[propName] = processPropertyDefinition(schema[propName], componentName);\n }\n return schema;\n};\n\n/**\n * Inject default value, parser, stringifier for single property.\n *\n * @param {object} propDefinition\n * @param {string} componentName\n */\nfunction processPropertyDefinition (propDefinition, componentName) {\n var defaultVal = propDefinition.default;\n var isCustomType;\n var propType;\n var typeName = propDefinition.type;\n\n // Type inference.\n if (!propDefinition.type) {\n if (defaultVal !== undefined &&\n (typeof defaultVal === 'boolean' || typeof defaultVal === 'number')) {\n // Type inference.\n typeName = typeof defaultVal;\n } else if (Array.isArray(defaultVal)) {\n typeName = 'array';\n } else {\n // Fall back to string.\n typeName = 'string';\n }\n } else if (propDefinition.type === 'bool') {\n typeName = 'boolean';\n } else if (propDefinition.type === 'float') {\n typeName = 'number';\n }\n\n propType = propertyTypes[typeName];\n if (!propType) {\n warn('Unknown property type for component `' + componentName + '`: ' + typeName);\n }\n\n // Fill in parse and stringify using property types.\n isCustomType = !!propDefinition.parse;\n propDefinition.parse = propDefinition.parse || propType.parse;\n propDefinition.stringify = propDefinition.stringify || propType.stringify;\n\n // Fill in type name.\n propDefinition.type = typeName;\n\n // Check that default value exists.\n if ('default' in propDefinition) {\n // Check that default values are valid.\n if (!isCustomType && !isValidDefaultValue(typeName, defaultVal)) {\n warn('Default value `' + defaultVal + '` does not match type `' + typeName +\n '` in component `' + componentName + '`');\n }\n } else {\n // Fill in default value.\n propDefinition.default = propType.default;\n }\n\n return propDefinition;\n}\nmodule.exports.processPropertyDefinition = processPropertyDefinition;\n\n/**\n * Parse propData using schema. Use default values if not existing in propData.\n *\n * @param {object} propData - Unparsed properties.\n * @param {object} schema - Property types definition.\n * @param {boolean} getPartialData - Whether to return full component data or just the data\n * with keys in `propData`.\n * @param {string } componentName - Name of the component, used for the property warning.\n * @param {boolean} silent - Suppress warning messages.\n */\nmodule.exports.parseProperties = (function () {\n var propNames = [];\n\n return function (propData, schema, getPartialData, componentName, silent) {\n var i;\n var propName;\n var propDefinition;\n var propValue;\n\n propNames.length = 0;\n for (propName in (getPartialData ? propData : schema)) {\n if (getPartialData && propData[propName] === undefined) { continue; }\n propNames.push(propName);\n }\n\n if (propData === null || typeof propData !== 'object') { return propData; }\n\n // Validation errors.\n for (propName in propData) {\n if (propData[propName] !== undefined && !schema[propName] && !silent) {\n warn('Unknown property `' + propName +\n '` for component/system `' + componentName + '`.');\n }\n }\n\n for (i = 0; i < propNames.length; i++) {\n propName = propNames[i];\n propDefinition = schema[propName];\n propValue = propData[propName];\n if (!(schema[propName])) { return; }\n propData[propName] = parseProperty(propValue, propDefinition);\n }\n\n return propData;\n };\n})();\n\n/**\n * Deserialize a single property.\n */\nfunction parseProperty (value, propDefinition) {\n // Use default value if value is falsy.\n if (value === undefined || value === null || value === '') {\n value = propDefinition.default;\n if (Array.isArray(value)) { value = value.slice(); }\n }\n // Invoke property type parser.\n return propDefinition.parse(value, propDefinition.default);\n}\nmodule.exports.parseProperty = parseProperty;\n\n/**\n * Serialize a group of properties.\n */\nmodule.exports.stringifyProperties = function (propData, schema) {\n var propName;\n var propDefinition;\n var propValue;\n var stringifiedData = {};\n var value;\n\n for (propName in propData) {\n propDefinition = schema[propName];\n propValue = propData[propName];\n value = propValue;\n if (typeof value === 'object') {\n value = stringifyProperty(propValue, propDefinition);\n if (!propDefinition) { warn('Unknown component property: ' + propName); }\n }\n stringifiedData[propName] = value;\n }\n return stringifiedData;\n};\n\n/**\n * Serialize a single property.\n */\nfunction stringifyProperty (value, propDefinition) {\n // This function stringifies but it's used in a context where\n // there's always second stringification pass. By returning the original\n // value when it's not an object we save one unnecessary call\n // to JSON.stringify.\n if (typeof value !== 'object') { return value; }\n // if there's no schema for the property we use standar JSON stringify\n if (!propDefinition || value === null) { return JSON.stringify(value); }\n return propDefinition.stringify(value);\n}\nmodule.exports.stringifyProperty = stringifyProperty;\n\n},{\"../utils/\":205,\"./propertyTypes\":133}],141:[function(_dereq_,module,exports){\nvar schema = _dereq_('./schema');\n\nvar processSchema = schema.process;\nvar shaders = module.exports.shaders = {}; // Keep track of registered shaders.\nvar shaderNames = module.exports.shaderNames = []; // Keep track of the names of registered shaders.\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils');\n\n// A-Frame properties to three.js uniform types.\nvar propertyToThreeMapping = {\n array: 'v3',\n color: 'v3',\n int: 'i',\n number: 'f',\n map: 't',\n time: 'f',\n vec2: 'v2',\n vec3: 'v3',\n vec4: 'v4'\n};\n\n/**\n * Shader class definition.\n *\n * Shaders extend the material component API so you can create your own library\n * of customized materials\n *\n */\nvar Shader = module.exports.Shader = function () {};\n\nShader.prototype = {\n /**\n * Contains the type schema and defaults for the data values.\n * Data is coerced into the types of the values of the defaults.\n */\n schema: {},\n\n vertexShader:\n 'void main() {' +\n 'gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);' +\n '}',\n\n fragmentShader:\n 'void main() {' +\n 'gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);' +\n '}',\n\n /**\n * Init handler. Similar to attachedCallback.\n * Called during shader initialization and is only run once.\n */\n init: function (data) {\n this.attributes = this.initVariables(data, 'attribute');\n this.uniforms = this.initVariables(data, 'uniform');\n this.material = new (this.raw ? THREE.RawShaderMaterial : THREE.ShaderMaterial)({\n // attributes: this.attributes,\n uniforms: this.uniforms,\n vertexShader: this.vertexShader,\n fragmentShader: this.fragmentShader\n });\n return this.material;\n },\n\n initVariables: function (data, type) {\n var key;\n var schema = this.schema;\n var variables = {};\n var varType;\n\n for (key in schema) {\n if (schema[key].is !== type) { continue; }\n varType = propertyToThreeMapping[schema[key].type];\n variables[key] = {\n type: varType,\n value: undefined // Let updateVariables handle setting these.\n };\n }\n return variables;\n },\n\n /**\n * Update handler. Similar to attributeChangedCallback.\n * Called whenever the associated material data changes.\n *\n * @param {object} data - New material data.\n */\n update: function (data) {\n this.updateVariables(data, 'attribute');\n this.updateVariables(data, 'uniform');\n },\n\n updateVariables: function (data, type) {\n var key;\n var materialKey;\n var schema = this.schema;\n var variables;\n\n variables = type === 'uniform' ? this.uniforms : this.attributes;\n for (key in data) {\n if (!schema[key] || schema[key].is !== type) { continue; }\n\n if (schema[key].type === 'map') {\n // If data unchanged, get out early.\n if (!variables[key] || variables[key].value === data[key]) { continue; }\n\n // Special handling is needed for textures.\n materialKey = '_texture_' + key;\n\n // We can't actually set the variable correctly until we've loaded the texture.\n this.setMapOnTextureLoad(variables, key, materialKey);\n\n // Kick off the texture update now that handler is added.\n utils.material.updateMapMaterialFromData(materialKey, key, this, data);\n continue;\n }\n variables[key].value = this.parseValue(schema[key].type, data[key]);\n variables[key].needsUpdate = true;\n }\n },\n\n parseValue: function (type, value) {\n var color;\n switch (type) {\n case 'vec2': {\n return new THREE.Vector2(value.x, value.y);\n }\n case 'vec3': {\n return new THREE.Vector3(value.x, value.y, value.z);\n }\n case 'vec4': {\n return new THREE.Vector4(value.x, value.y, value.z, value.w);\n }\n case 'color': {\n color = new THREE.Color(value);\n return new THREE.Vector3(color.r, color.g, color.b);\n }\n case 'map': {\n return THREE.ImageUtils.loadTexture(value);\n }\n default: {\n return value;\n }\n }\n },\n\n setMapOnTextureLoad: function (variables, key, materialKey) {\n var self = this;\n this.el.addEventListener('materialtextureloaded', function () {\n variables[key].value = self.material[materialKey];\n variables[key].needsUpdate = true;\n });\n }\n};\n\n/**\n * Registers a shader to A-Frame.\n *\n * @param {string} name - shader name.\n * @param {object} definition - shader property and methods.\n * @returns {object} Shader.\n */\nmodule.exports.registerShader = function (name, definition) {\n var NewShader;\n var proto = {};\n\n // Format definition object to prototype object.\n Object.keys(definition).forEach(function (key) {\n proto[key] = {\n value: definition[key],\n writable: true\n };\n });\n\n if (shaders[name]) {\n throw new Error('The shader ' + name + ' has been already registered');\n }\n NewShader = function () { Shader.call(this); };\n NewShader.prototype = Object.create(Shader.prototype, proto);\n NewShader.prototype.name = name;\n NewShader.prototype.constructor = NewShader;\n shaders[name] = {\n Shader: NewShader,\n schema: processSchema(NewShader.prototype.schema)\n };\n shaderNames.push(name);\n return NewShader;\n};\n\n},{\"../lib/three\":179,\"../utils\":205,\"./schema\":140}],142:[function(_dereq_,module,exports){\nvar components = _dereq_('./component');\nvar schema = _dereq_('./schema');\nvar utils = _dereq_('../utils/');\n\nvar parseProperties = schema.parseProperties;\nvar parseProperty = schema.parseProperty;\nvar processSchema = schema.process;\nvar isSingleProp = schema.isSingleProperty;\nvar styleParser = utils.styleParser;\n\nvar systems = module.exports.systems = {}; // Keep track of registered systems.\n\n/**\n * System class definition.\n *\n * Systems provide global scope and services to a group of instantiated components of the\n * same class. They can also help abstract logic away from components such that components\n * only have to worry about data.\n *\n * For example, a physics component that creates a physics world that oversees\n * all entities with a physics or rigid body component.\n *\n * TODO: Have the System prototype reuse the Component prototype. Most code is copied\n * and some pieces are missing from the Component facilities (e.g., attribute caching,\n * setAttribute behavior).\n *\n * @member {string} name - Name that system is registered under.\n * @member {Element} sceneEl - Handle to the scene element where system applies to.\n */\nvar System = module.exports.System = function (sceneEl) {\n var component = components && components.components[this.name];\n\n // Set reference to scene.\n this.el = sceneEl;\n this.sceneEl = sceneEl;\n\n // Set reference to matching component (if exists).\n if (component) { component.Component.prototype.system = this; }\n\n // Process system configuration.\n this.buildData();\n this.init();\n this.update({});\n};\n\nSystem.prototype = {\n /**\n * Schema to configure system.\n */\n schema: {},\n\n /**\n * Init handler. Called during scene initialization and is only run once.\n * Systems can use this to set initial state.\n */\n init: function () { /* no-op */ },\n\n /**\n * Update handler. Called during scene attribute updates.\n * Systems can use this to dynamically update their state.\n */\n update: function (oldData) { /* no-op */ },\n\n /**\n * Build data and call update handler.\n *\n * @private\n */\n updateProperties: function (rawData) {\n var oldData = this.data;\n if (!Object.keys(schema).length) { return; }\n this.buildData(rawData);\n this.update(oldData);\n },\n\n /**\n * Parse data.\n */\n buildData: function (rawData) {\n var schema = this.schema;\n if (!Object.keys(schema).length) { return; }\n rawData = rawData || window.HTMLElement.prototype.getAttribute.call(this.sceneEl, this.name);\n if (isSingleProp(schema)) {\n this.data = parseProperty(rawData, schema);\n } else {\n this.data = parseProperties(styleParser.parse(rawData) || {}, schema);\n }\n },\n\n /**\n * Tick handler.\n * Called on each tick of the scene render loop.\n * Affected by play and pause.\n *\n * @param {number} time - Scene tick time.\n * @param {number} timeDelta - Difference in current render time and previous render time.\n */\n tick: undefined,\n\n /**\n * Tock handler.\n * Called on each tock of the scene render loop.\n * Affected by play and pause.\n *\n * @param {number} time - Scene tick time.\n * @param {number} timeDelta - Difference in current render time and previous render time.\n */\n tock: undefined,\n\n /**\n * Called to start any dynamic behavior (e.g., animation, AI, events, physics).\n */\n play: function () { /* no-op */ },\n\n /**\n * Called to stop any dynamic behavior (e.g., animation, AI, events, physics).\n */\n pause: function () { /* no-op */ }\n};\n\n/**\n * Registers a system to A-Frame.\n *\n * @param {string} name - Component name.\n * @param {object} definition - Component property and methods.\n * @returns {object} Component.\n */\nmodule.exports.registerSystem = function (name, definition) {\n var i;\n var NewSystem;\n var proto = {};\n var scenes = utils.findAllScenes(document);\n\n // Format definition object to prototype object.\n Object.keys(definition).forEach(function (key) {\n proto[key] = {\n value: definition[key],\n writable: true\n };\n });\n\n if (systems[name]) {\n throw new Error('The system `' + name + '` has been already registered. ' +\n 'Check that you are not loading two versions of the same system ' +\n 'or two different systems of the same name.');\n }\n NewSystem = function (sceneEl) { System.call(this, sceneEl); };\n NewSystem.prototype = Object.create(System.prototype, proto);\n NewSystem.prototype.name = name;\n NewSystem.prototype.constructor = NewSystem;\n NewSystem.prototype.schema = utils.extend(processSchema(NewSystem.prototype.schema));\n systems[name] = NewSystem;\n\n // Initialize systems for existing scenes\n for (i = 0; i < scenes.length; i++) { scenes[i].initSystem(name); }\n};\n\n},{\"../utils/\":205,\"./component\":131,\"./schema\":140}],143:[function(_dereq_,module,exports){\n_dereq_('./pivot');\n\n},{\"./pivot\":144}],144:[function(_dereq_,module,exports){\nvar registerComponent = _dereq_('../../core/component').registerComponent;\nvar THREE = _dereq_('../../lib/three');\n\nvar originalPosition = new THREE.Vector3();\nvar originalRotation = new THREE.Vector3();\n\n/**\n * Wrap el.object3D within an outer group. Apply pivot to el.object3D as position.\n */\nregisterComponent('pivot', {\n dependencies: ['position'],\n\n schema: {type: 'vec3'},\n\n init: function () {\n var data = this.data;\n var el = this.el;\n var originalParent = el.object3D.parent;\n var originalGroup = el.object3D;\n var outerGroup = new THREE.Group();\n\n originalPosition.copy(originalGroup.position);\n originalRotation.copy(originalGroup.rotation);\n\n // Detach current group from parent.\n originalParent.remove(originalGroup);\n outerGroup.add(originalGroup);\n\n // Set new group as the outer group.\n originalParent.add(outerGroup);\n\n // Set outer group as new object3D.\n el.object3D = outerGroup;\n\n // Apply pivot to original group.\n originalGroup.position.set(-1 * data.x, -1 * data.y, -1 * data.z);\n\n // Offset the pivot so that world position not affected.\n // And restore position onto outer group.\n outerGroup.position.set(data.x + originalPosition.x, data.y + originalPosition.y,\n data.z + originalPosition.z);\n\n // Transfer rotation to outer group.\n outerGroup.rotation.copy(originalGroup.rotation);\n originalGroup.rotation.set(0, 0, 0);\n }\n});\n\n},{\"../../core/component\":131,\"../../lib/three\":179}],145:[function(_dereq_,module,exports){\n/**\n * Common mesh defaults, mappings, and transforms.\n */\nvar components = _dereq_('../../core/component').components;\nvar shaders = _dereq_('../../core/shader').shaders;\nvar utils = _dereq_('../../utils/');\n\nvar materialMappings = {};\nObject.keys(components.material.schema).forEach(addMapping);\nObject.keys(shaders.standard.schema).forEach(addMapping);\n\nfunction addMapping (prop) {\n // To hyphenated.\n var htmlAttrName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n if (prop === 'fog') { htmlAttrName = 'material-fog'; }\n if (prop === 'visible') { htmlAttrName = 'material-visible'; }\n materialMappings[htmlAttrName] = 'material.' + prop;\n}\n\nmodule.exports = function getMeshMixin () {\n return {\n defaultComponents: {material: {}},\n mappings: utils.extend({}, materialMappings)\n };\n};\n\n},{\"../../core/component\":131,\"../../core/shader\":141,\"../../utils/\":205}],146:[function(_dereq_,module,exports){\n_dereq_('./primitives/a-camera');\n_dereq_('./primitives/a-cursor');\n_dereq_('./primitives/a-curvedimage');\n_dereq_('./primitives/a-gltf-model');\n_dereq_('./primitives/a-image');\n_dereq_('./primitives/a-light');\n_dereq_('./primitives/a-link');\n_dereq_('./primitives/a-obj-model');\n_dereq_('./primitives/a-sky');\n_dereq_('./primitives/a-sound');\n_dereq_('./primitives/a-text');\n_dereq_('./primitives/a-video');\n_dereq_('./primitives/a-videosphere');\n_dereq_('./primitives/meshPrimitives');\n\n},{\"./primitives/a-camera\":148,\"./primitives/a-cursor\":149,\"./primitives/a-curvedimage\":150,\"./primitives/a-gltf-model\":151,\"./primitives/a-image\":152,\"./primitives/a-light\":153,\"./primitives/a-link\":154,\"./primitives/a-obj-model\":155,\"./primitives/a-sky\":156,\"./primitives/a-sound\":157,\"./primitives/a-text\":158,\"./primitives/a-video\":159,\"./primitives/a-videosphere\":160,\"./primitives/meshPrimitives\":161}],147:[function(_dereq_,module,exports){\nvar AEntity = _dereq_('../../core/a-entity');\nvar components = _dereq_('../../core/component').components;\nvar registerElement = _dereq_('../../core/a-register-element').registerElement;\nvar utils = _dereq_('../../utils/');\n\nvar debug = utils.debug;\nvar setComponentProperty = utils.entity.setComponentProperty;\nvar log = debug('extras:primitives:debug');\nvar warn = debug('extras:primitives:warn');\n\nvar primitives = module.exports.primitives = {};\n\nmodule.exports.registerPrimitive = function registerPrimitive (name, definition) {\n name = name.toLowerCase();\n log('Registering <%s>', name);\n\n // Deprecation warning for defaultAttributes usage.\n if (definition.defaultAttributes) {\n warn(\"The 'defaultAttributes' object is deprecated. Use 'defaultComponents' instead.\");\n }\n\n var primitive = registerElement(name, {\n prototype: Object.create(AEntity.prototype, {\n defaultComponentsFromPrimitive: {\n value: definition.defaultComponents || definition.defaultAttributes || {}\n },\n deprecated: {value: definition.deprecated || null},\n deprecatedMappings: {value: definition.deprecatedMappings || {}},\n mappings: {value: definition.mappings || {}},\n\n createdCallback: {\n value: function () {\n if (definition.deprecated) { console.warn(definition.deprecated); }\n this.resolveMappingCollisions();\n }\n },\n\n /**\n * If a mapping collides with a registered component name\n * it renames the mapping to componentname-property\n */\n resolveMappingCollisions: {\n value: function () {\n var mappings = this.mappings;\n var self = this;\n Object.keys(mappings).forEach(function resolveCollision (key) {\n var newAttribute;\n if (key !== key.toLowerCase()) { warn('Mapping keys should be specified in lower case. The mapping key ' + key + ' may not be recognized'); }\n if (components[key]) {\n newAttribute = mappings[key].replace('.', '-');\n mappings[newAttribute] = mappings[key];\n delete mappings[key];\n console.warn('The primitive ' + self.tagName.toLowerCase() + ' has a mapping collision. ' +\n 'The attribute ' + key + ' has the same name as a registered component and' +\n ' has been renamed to ' + newAttribute);\n }\n });\n }\n },\n\n getExtraComponents: {\n value: function () {\n var attr;\n var data;\n var i;\n var mapping;\n var mixins;\n var path;\n var self = this;\n\n // Gather component data from default components.\n data = utils.clone(this.defaultComponentsFromPrimitive);\n\n // Factor in mixins to overwrite default components.\n mixins = this.getAttribute('mixin');\n if (mixins) {\n mixins = mixins.trim().split(' ');\n mixins.forEach(function applyMixin (mixinId) {\n var mixinComponents = self.sceneEl.querySelector('#' + mixinId).componentCache;\n Object.keys(mixinComponents).forEach(function setComponent (name) {\n data[name] = extend(data[name], mixinComponents[name]);\n });\n });\n }\n\n // Gather component data from mappings.\n for (i = 0; i < this.attributes.length; i++) {\n attr = this.attributes[i];\n mapping = this.mappings[attr.name];\n if (mapping) {\n path = utils.entity.getComponentPropertyPath(mapping);\n if (path.constructor === Array) {\n data[path[0]] = data[path[0]] || {};\n data[path[0]][path[1]] = attr.value.trim();\n } else {\n data[path] = attr.value.trim();\n }\n continue;\n }\n }\n\n return data;\n\n /**\n * For the base to be extensible, both objects must be pure JavaScript objects.\n * The function assumes that base is undefined, or null or a pure object.\n */\n function extend (base, extension) {\n if (isUndefined(base)) {\n return copy(extension);\n }\n if (isUndefined(extension)) {\n return copy(base);\n }\n if (isPureObject(base) && isPureObject(extension)) {\n return utils.extendDeep(base, extension);\n }\n return copy(extension);\n }\n\n function isUndefined (value) {\n return typeof value === 'undefined';\n }\n\n function copy (value) {\n if (isPureObject(value)) {\n return utils.extendDeep({}, value);\n }\n return value;\n }\n\n function isPureObject (value) {\n return value !== null && value.constructor === Object;\n }\n }\n },\n\n /**\n * Sync to attribute to component property whenever mapped attribute changes.\n * If attribute is mapped to a component property, set the component property using\n * the attribute value.\n */\n attributeChangedCallback: {\n value: function (attr, oldVal, value) {\n var componentName = this.mappings[attr];\n\n if (attr in this.deprecatedMappings) {\n console.warn(this.deprecatedMappings[attr]);\n }\n\n if (!attr || !componentName) { return; }\n\n // Set value.\n setComponentProperty(this, componentName, value);\n }\n }\n })\n });\n\n // Store.\n primitives[name] = primitive;\n return primitive;\n};\n\n/**\n * Add component mappings using schema.\n */\nfunction addComponentMapping (componentName, mappings) {\n var schema = components[componentName].schema;\n Object.keys(schema).map(function (prop) {\n // Hyphenate where there is camelCase.\n var attrName = prop.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n // If there is a mapping collision, prefix with component name and hyphen.\n if (mappings[attrName] !== undefined) { attrName = componentName + '-' + prop; }\n mappings[attrName] = componentName + '.' + prop;\n });\n}\n\n/**\n * Helper to define a primitive, building mappings using a component schema.\n */\nfunction definePrimitive (tagName, defaultComponents, mappings) {\n // If no initial mappings provided, start from empty map.\n mappings = mappings || {};\n\n // From the default components, add mapping automagically.\n Object.keys(defaultComponents).map(function buildMappings (componentName) {\n addComponentMapping(componentName, mappings);\n });\n\n // Register the primitive.\n module.exports.registerPrimitive(tagName, utils.extendDeep({}, null, {\n defaultComponents: defaultComponents,\n mappings: mappings\n }));\n}\nmodule.exports.definePrimitive = definePrimitive;\n\n},{\"../../core/a-entity\":127,\"../../core/a-register-element\":130,\"../../core/component\":131,\"../../utils/\":205}],148:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-camera', {\n defaultComponents: {\n 'camera': {},\n 'look-controls': {},\n 'wasd-controls': {},\n 'position': {x: 0, y: 1.6, z: 0}\n },\n\n mappings: {\n active: 'camera.active',\n far: 'camera.far',\n fov: 'camera.fov',\n 'look-controls-enabled': 'look-controls.enabled',\n near: 'camera.near',\n 'pointer-lock-enabled': 'look-controls.pointerLockEnabled',\n 'wasd-controls-enabled': 'wasd-controls.enabled',\n 'reverse-mouse-drag': 'look-controls.reverseMouseDrag',\n zoom: 'camera.zoom'\n }\n});\n\n},{\"../primitives\":147}],149:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-cursor', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n cursor: {},\n geometry: {\n primitive: 'ring',\n radiusOuter: 0.016,\n radiusInner: 0.01,\n segmentsTheta: 32\n },\n material: {\n color: '#000',\n shader: 'flat',\n opacity: 0.8\n },\n position: {\n x: 0,\n y: 0,\n z: -1\n }\n },\n\n mappings: {\n far: 'raycaster.far',\n fuse: 'cursor.fuse',\n 'fuse-timeout': 'cursor.fuseTimeout',\n interval: 'raycaster.interval',\n objects: 'raycaster.objects'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],150:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-curvedimage', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n height: 1,\n primitive: 'cylinder',\n radius: 2,\n segmentsRadial: 48,\n thetaLength: 270,\n openEnded: true,\n thetaStart: 0\n },\n material: {\n color: '#FFF',\n shader: 'flat',\n side: 'double',\n transparent: true,\n repeat: '-1 1'\n }\n },\n\n mappings: {\n height: 'geometry.height',\n 'open-ended': 'geometry.openEnded',\n radius: 'geometry.radius',\n segments: 'geometry.segmentsRadial',\n start: 'geometry.thetaStart',\n 'theta-length': 'geometry.thetaLength',\n 'theta-start': 'geometry.thetaStart',\n 'width': 'geometry.thetaLength'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],151:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-gltf-model', {\n mappings: {\n src: 'gltf-model'\n }\n});\n\n},{\"../primitives\":147}],152:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-image', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n primitive: 'plane'\n },\n material: {\n color: '#FFF',\n shader: 'flat',\n side: 'double',\n transparent: true\n }\n },\n\n mappings: {\n height: 'geometry.height',\n width: 'geometry.width'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],153:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-light', {\n defaultComponents: {\n light: {}\n },\n\n mappings: {\n angle: 'light.angle',\n color: 'light.color',\n 'ground-color': 'light.groundColor',\n decay: 'light.decay',\n distance: 'light.distance',\n intensity: 'light.intensity',\n penumbra: 'light.penumbra',\n type: 'light.type',\n target: 'light.target'\n }\n});\n\n},{\"../primitives\":147}],154:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-link', {\n defaultComponents: {\n link: {\n visualAspectEnabled: true\n }\n },\n\n mappings: {\n href: 'link.href',\n image: 'link.image',\n title: 'link.title'\n }\n});\n\n},{\"../primitives\":147}],155:[function(_dereq_,module,exports){\nvar meshMixin = _dereq_('../getMeshMixin')();\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-obj-model', utils.extendDeep({}, meshMixin, {\n defaultComponents: {\n 'obj-model': {}\n },\n\n mappings: {\n src: 'obj-model.obj',\n mtl: 'obj-model.mtl'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],156:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\nvar meshPrimitives = _dereq_('./meshPrimitives');\n\nregisterPrimitive('a-sky', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n primitive: 'sphere',\n radius: 500,\n segmentsWidth: 64,\n segmentsHeight: 32\n },\n material: {\n color: '#FFF',\n side: 'back',\n shader: 'flat',\n npot: true\n },\n scale: '-1 1 1'\n },\n\n mappings: utils.extendDeep({}, meshPrimitives['a-sphere'].prototype.mappings)\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147,\"./meshPrimitives\":161}],157:[function(_dereq_,module,exports){\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\n\nregisterPrimitive('a-sound', {\n defaultComponents: {\n sound: {}\n },\n\n mappings: {\n src: 'sound.src',\n on: 'sound.on',\n autoplay: 'sound.autoplay',\n loop: 'sound.loop',\n volume: 'sound.volume'\n }\n});\n\n},{\"../primitives\":147}],158:[function(_dereq_,module,exports){\n// <a-text> using `definePrimitive` helper.\nvar definePrimitive = _dereq_('../primitives').definePrimitive;\ndefinePrimitive('a-text', {text: {anchor: 'align', width: 5}});\n\n},{\"../primitives\":147}],159:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-video', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n primitive: 'plane'\n },\n material: {\n color: '#FFF',\n shader: 'flat',\n side: 'double',\n transparent: true\n }\n },\n\n mappings: {\n height: 'geometry.height',\n width: 'geometry.width'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],160:[function(_dereq_,module,exports){\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\nregisterPrimitive('a-videosphere', utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {\n geometry: {\n primitive: 'sphere',\n radius: 500,\n segmentsWidth: 64,\n segmentsHeight: 32\n },\n material: {\n color: '#FFF',\n shader: 'flat',\n side: 'back',\n npot: true\n },\n scale: '-1 1 1'\n },\n\n mappings: {\n radius: 'geometry.radius',\n 'segments-height': 'geometry.segmentsHeight',\n 'segments-width': 'geometry.segmentsWidth'\n }\n}));\n\n},{\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],161:[function(_dereq_,module,exports){\n/**\n * Automated mesh primitive registration.\n */\nvar getMeshMixin = _dereq_('../getMeshMixin');\nvar geometries = _dereq_('../../../core/geometry').geometries;\nvar geometryNames = _dereq_('../../../core/geometry').geometryNames;\nvar registerPrimitive = _dereq_('../primitives').registerPrimitive;\nvar utils = _dereq_('../../../utils/');\n\n// For testing.\nvar meshPrimitives = module.exports = {};\n\n// Generate primitive for each geometry type.\ngeometryNames.forEach(function registerMeshPrimitive (geometryName) {\n var geometry = geometries[geometryName];\n var geometryHyphened = unCamelCase(geometryName);\n\n // Generate mappings.\n var mappings = {};\n Object.keys(geometry.schema).forEach(function createMapping (property) {\n mappings[unCamelCase(property)] = 'geometry.' + property;\n });\n\n // Register.\n var tagName = 'a-' + geometryHyphened;\n var primitive = registerPrimitive(tagName, utils.extendDeep({}, getMeshMixin(), {\n defaultComponents: {geometry: {primitive: geometryName}},\n mappings: mappings\n }));\n meshPrimitives[tagName] = primitive;\n});\n\n/**\n * camelCase to hyphened-string.\n */\nfunction unCamelCase (str) {\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\n}\n\n},{\"../../../core/geometry\":132,\"../../../utils/\":205,\"../getMeshMixin\":145,\"../primitives\":147}],162:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('box', {\n schema: {\n depth: {default: 1, min: 0},\n height: {default: 1, min: 0},\n width: {default: 1, min: 0},\n segmentsHeight: {default: 1, min: 1, max: 20, type: 'int'},\n segmentsWidth: {default: 1, min: 1, max: 20, type: 'int'},\n segmentsDepth: {default: 1, min: 1, max: 20, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.BoxGeometry(\n data.width, data.height, data.depth,\n data.segmentsWidth, data.segmentsHeight, data.segmentsDepth);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],163:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('circle', {\n schema: {\n radius: {default: 1, min: 0},\n segments: {default: 32, min: 3, type: 'int'},\n thetaLength: {default: 360, min: 0},\n thetaStart: {default: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.CircleGeometry(\n data.radius, data.segments, degToRad(data.thetaStart), degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],164:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('cone', {\n schema: {\n height: {default: 1, min: 0},\n openEnded: {default: false},\n radiusBottom: {default: 1, min: 0},\n radiusTop: {default: 0.01, min: 0},\n segmentsHeight: {default: 18, min: 1, type: 'int'},\n segmentsRadial: {default: 36, min: 3, type: 'int'},\n thetaLength: {default: 360, min: 0},\n thetaStart: {default: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.CylinderGeometry(\n data.radiusTop, data.radiusBottom, data.height, data.segmentsRadial,\n data.segmentsHeight, data.openEnded, degToRad(data.thetaStart),\n degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],165:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('cylinder', {\n schema: {\n height: {default: 1, min: 0},\n openEnded: {default: false},\n radius: {default: 1, min: 0},\n segmentsHeight: {default: 18, min: 1, type: 'int'},\n segmentsRadial: {default: 36, min: 3, type: 'int'},\n thetaLength: {default: 360, min: 0},\n thetaStart: {default: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.CylinderGeometry(\n data.radius, data.radius, data.height, data.segmentsRadial, data.segmentsHeight,\n data.openEnded, degToRad(data.thetaStart), degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],166:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('dodecahedron', {\n schema: {\n detail: {default: 0, min: 0, max: 5, type: 'int'},\n radius: {default: 1, min: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.DodecahedronGeometry(data.radius, data.detail);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],167:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('icosahedron', {\n schema: {\n detail: {default: 0, min: 0, max: 5, type: 'int'},\n radius: {default: 1, min: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.IcosahedronGeometry(data.radius, data.detail);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],168:[function(_dereq_,module,exports){\n_dereq_('./box.js');\n_dereq_('./circle.js');\n_dereq_('./cone.js');\n_dereq_('./cylinder.js');\n_dereq_('./dodecahedron.js');\n_dereq_('./icosahedron.js');\n_dereq_('./octahedron.js');\n_dereq_('./plane.js');\n_dereq_('./ring.js');\n_dereq_('./sphere.js');\n_dereq_('./tetrahedron.js');\n_dereq_('./torus.js');\n_dereq_('./torusKnot.js');\n_dereq_('./triangle.js');\n\n},{\"./box.js\":162,\"./circle.js\":163,\"./cone.js\":164,\"./cylinder.js\":165,\"./dodecahedron.js\":166,\"./icosahedron.js\":167,\"./octahedron.js\":169,\"./plane.js\":170,\"./ring.js\":171,\"./sphere.js\":172,\"./tetrahedron.js\":173,\"./torus.js\":174,\"./torusKnot.js\":175,\"./triangle.js\":176}],169:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('octahedron', {\n schema: {\n detail: {default: 0, min: 0, max: 5, type: 'int'},\n radius: {default: 1, min: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.OctahedronGeometry(data.radius, data.detail);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],170:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('plane', {\n schema: {\n height: {default: 1, min: 0},\n width: {default: 1, min: 0},\n segmentsHeight: {default: 1, min: 1, max: 20, type: 'int'},\n segmentsWidth: {default: 1, min: 1, max: 20, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.PlaneGeometry(data.width, data.height, data.segmentsWidth, data.segmentsHeight);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],171:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('ring', {\n schema: {\n radiusInner: {default: 0.8, min: 0},\n radiusOuter: {default: 1.2, min: 0},\n segmentsPhi: {default: 10, min: 1, type: 'int'},\n segmentsTheta: {default: 32, min: 3, type: 'int'},\n thetaLength: {default: 360, min: 0},\n thetaStart: {default: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.RingGeometry(\n data.radiusInner, data.radiusOuter, data.segmentsTheta, data.segmentsPhi,\n degToRad(data.thetaStart), degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],172:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('sphere', {\n schema: {\n radius: {default: 1, min: 0},\n phiLength: {default: 360},\n phiStart: {default: 0, min: 0},\n thetaLength: {default: 180, min: 0},\n thetaStart: {default: 0},\n segmentsHeight: {default: 18, min: 2, type: 'int'},\n segmentsWidth: {default: 36, min: 3, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.SphereGeometry(\n data.radius, data.segmentsWidth, data.segmentsHeight, degToRad(data.phiStart),\n degToRad(data.phiLength), degToRad(data.thetaStart), degToRad(data.thetaLength));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],173:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('tetrahedron', {\n schema: {\n detail: {default: 0, min: 0, max: 5, type: 'int'},\n radius: {default: 1, min: 0}\n },\n\n init: function (data) {\n this.geometry = new THREE.TetrahedronGeometry(data.radius, data.detail);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],174:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar degToRad = THREE.Math.degToRad;\n\nregisterGeometry('torus', {\n schema: {\n arc: {default: 360},\n radius: {default: 1, min: 0},\n radiusTubular: {default: 0.2, min: 0},\n segmentsRadial: {default: 36, min: 2, type: 'int'},\n segmentsTubular: {default: 32, min: 3, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.TorusGeometry(\n data.radius, data.radiusTubular * 2, data.segmentsRadial, data.segmentsTubular,\n degToRad(data.arc));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],175:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nregisterGeometry('torusKnot', {\n schema: {\n p: {default: 2, min: 1},\n q: {default: 3, min: 1},\n radius: {default: 1, min: 0},\n radiusTubular: {default: 0.2, min: 0},\n segmentsRadial: {default: 8, min: 3, type: 'int'},\n segmentsTubular: {default: 100, min: 3, type: 'int'}\n },\n\n init: function (data) {\n this.geometry = new THREE.TorusKnotGeometry(\n data.radius, data.radiusTubular * 2, data.segmentsTubular, data.segmentsRadial,\n data.p, data.q);\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],176:[function(_dereq_,module,exports){\nvar registerGeometry = _dereq_('../core/geometry').registerGeometry;\nvar THREE = _dereq_('../lib/three');\n\nvar quaternion = new THREE.Quaternion();\nvar rotateVector = new THREE.Vector3(0, 0, 1);\nvar uvMinVector = new THREE.Vector2();\nvar uvMaxVector = new THREE.Vector2();\nvar uvScaleVector = new THREE.Vector2();\n\nregisterGeometry('triangle', {\n schema: {\n vertexA: {type: 'vec3', default: {x: 0, y: 0.5, z: 0}},\n vertexB: {type: 'vec3', default: {x: -0.5, y: -0.5, z: 0}},\n vertexC: {type: 'vec3', default: {x: 0.5, y: -0.5, z: 0}}\n },\n\n init: function (data) {\n var geometry;\n var normal;\n var triangle;\n var uvA;\n var uvB;\n var uvC;\n\n var vertices;\n var normals;\n var uvs;\n\n triangle = new THREE.Triangle();\n triangle.a.set(data.vertexA.x, data.vertexA.y, data.vertexA.z);\n triangle.b.set(data.vertexB.x, data.vertexB.y, data.vertexB.z);\n triangle.c.set(data.vertexC.x, data.vertexC.y, data.vertexC.z);\n normal = triangle.getNormal(new THREE.Vector3());\n\n // Rotate the 3D triangle to be parallel to XY plane.\n quaternion.setFromUnitVectors(normal, rotateVector);\n uvA = triangle.a.clone().applyQuaternion(quaternion);\n uvB = triangle.b.clone().applyQuaternion(quaternion);\n uvC = triangle.c.clone().applyQuaternion(quaternion);\n\n // Compute UVs.\n // Normalize x/y values of UV so they are within 0 to 1.\n uvMinVector.set(Math.min(uvA.x, uvB.x, uvC.x), Math.min(uvA.y, uvB.y, uvC.y));\n uvMaxVector.set(Math.max(uvA.x, uvB.x, uvC.x), Math.max(uvA.y, uvB.y, uvC.y));\n uvScaleVector.set(0, 0).subVectors(uvMaxVector, uvMinVector);\n uvA = new THREE.Vector2().subVectors(uvA, uvMinVector).divide(uvScaleVector);\n uvB = new THREE.Vector2().subVectors(uvB, uvMinVector).divide(uvScaleVector);\n uvC = new THREE.Vector2().subVectors(uvC, uvMinVector).divide(uvScaleVector);\n\n geometry = this.geometry = new THREE.BufferGeometry();\n vertices = [\n triangle.a.x, triangle.a.y, triangle.a.z,\n triangle.b.x, triangle.b.y, triangle.b.z,\n triangle.c.x, triangle.c.y, triangle.c.z\n ];\n normals = [\n normal.x, normal.y, normal.z,\n normal.x, normal.y, normal.z,\n normal.x, normal.y, normal.z\n ];\n uvs = [\n uvA.x, uvA.y,\n uvB.x, uvB.y,\n uvC.x, uvC.y\n ];\n\n geometry.setAttribute('position', new THREE.Float32BufferAttribute(vertices, 3));\n geometry.setAttribute('normal', new THREE.Float32BufferAttribute(normals, 3));\n geometry.setAttribute('uv', new THREE.Float32BufferAttribute(uvs, 2));\n }\n});\n\n},{\"../core/geometry\":132,\"../lib/three\":179}],177:[function(_dereq_,module,exports){\n// Polyfill `Promise`.\nwindow.Promise = window.Promise || _dereq_('promise-polyfill');\n\n// WebVR polyfill\n// Check before the polyfill runs.\nwindow.hasNativeWebVRImplementation = !!window.navigator.getVRDisplays ||\n !!window.navigator.getVRDevices;\nwindow.hasNativeWebXRImplementation = navigator.xr !== undefined;\n\n// If native WebXR or WebVR are defined WebVRPolyfill does not initialize.\nif (!window.hasNativeWebXRImplementation && !window.hasNativeWebVRImplementation) {\n var isIOSOlderThan10 = _dereq_('./utils/isIOSOlderThan10');\n // Workaround for iOS Safari canvas sizing issues in stereo (webvr-polyfill/issues/102).\n // Only for iOS on versions older than 10.\n var bufferScale = isIOSOlderThan10(window.navigator.userAgent) ? 1 / window.devicePixelRatio : 1;\n var WebVRPolyfill = _dereq_('webvr-polyfill');\n var polyfillConfig = {\n BUFFER_SCALE: bufferScale,\n CARDBOARD_UI_DISABLED: true,\n ROTATE_INSTRUCTIONS_DISABLED: true,\n MOBILE_WAKE_LOCK: !!window.cordova\n };\n window.webvrpolyfill = new WebVRPolyfill(polyfillConfig);\n}\n\nvar utils = _dereq_('./utils/');\nvar debug = utils.debug;\n\nif (utils.isIE11) {\n // Polyfill `CustomEvent`.\n _dereq_('custom-event-polyfill');\n // Polyfill String.startsWith.\n _dereq_('../vendor/starts-with-polyfill');\n}\n\nvar error = debug('A-Frame:error');\nvar warn = debug('A-Frame:warn');\n\nif (window.document.currentScript && window.document.currentScript.parentNode !==\n window.document.head && !window.debug) {\n warn('Put the A-Frame <script> tag in the <head> of the HTML *before* the scene to ' +\n 'ensure everything for A-Frame is properly registered before they are used from ' +\n 'HTML.');\n}\n\n// Error if not using a server.\nif (!window.cordova && window.location.protocol === 'file:') {\n error(\n 'This HTML file is currently being served via the file:// protocol. ' +\n 'Assets, textures, and models WILL NOT WORK due to cross-origin policy! ' +\n 'Please use a local or hosted server: ' +\n 'https://aframe.io/docs/0.5.0/introduction/getting-started.html#using-a-local-server.');\n}\n\n_dereq_('present'); // Polyfill `performance.now()`.\n\n// CSS.\nif (utils.device.isBrowserEnvironment) {\n _dereq_('./style/aframe.css');\n _dereq_('./style/rStats.css');\n}\n\n// Required before `AEntity` so that all components are registered.\nvar AScene = _dereq_('./core/scene/a-scene').AScene;\nvar components = _dereq_('./core/component').components;\nvar registerComponent = _dereq_('./core/component').registerComponent;\nvar registerGeometry = _dereq_('./core/geometry').registerGeometry;\nvar registerPrimitive = _dereq_('./extras/primitives/primitives').registerPrimitive;\nvar registerShader = _dereq_('./core/shader').registerShader;\nvar registerSystem = _dereq_('./core/system').registerSystem;\nvar shaders = _dereq_('./core/shader').shaders;\nvar systems = _dereq_('./core/system').systems;\n// Exports THREE to window so three.js can be used without alteration.\nvar THREE = window.THREE = _dereq_('./lib/three');\n\nvar pkg = _dereq_('../package');\n\n_dereq_('./components/index'); // Register standard components.\n_dereq_('./geometries/index'); // Register standard geometries.\n_dereq_('./shaders/index'); // Register standard shaders.\n_dereq_('./systems/index'); // Register standard systems.\nvar ANode = _dereq_('./core/a-node');\nvar AEntity = _dereq_('./core/a-entity'); // Depends on ANode and core components.\n\n_dereq_('./core/a-assets');\n_dereq_('./core/a-cubemap');\n_dereq_('./core/a-mixin');\n\n// Extras.\n_dereq_('./extras/components/');\n_dereq_('./extras/primitives/');\n\nconsole.log('A-Frame Version: 1.2.0 (Date 2021-02-05, Commit #b220fa00)');\nconsole.log('THREE Version (https://github.com/supermedium/three.js):',\n pkg.dependencies['super-three']);\nconsole.log('WebVR Polyfill Version:', pkg.dependencies['webvr-polyfill']);\n\nmodule.exports = window.AFRAME = {\n AComponent: _dereq_('./core/component').Component,\n AEntity: AEntity,\n ANode: ANode,\n ANIME: _dereq_('super-animejs'),\n AScene: AScene,\n components: components,\n coreComponents: Object.keys(components),\n geometries: _dereq_('./core/geometry').geometries,\n registerComponent: registerComponent,\n registerElement: _dereq_('./core/a-register-element').registerElement,\n registerGeometry: registerGeometry,\n registerPrimitive: registerPrimitive,\n registerShader: registerShader,\n registerSystem: registerSystem,\n primitives: {\n getMeshMixin: _dereq_('./extras/primitives/getMeshMixin'),\n primitives: _dereq_('./extras/primitives/primitives').primitives\n },\n scenes: _dereq_('./core/scene/scenes'),\n schema: _dereq_('./core/schema'),\n shaders: shaders,\n systems: systems,\n THREE: THREE,\n utils: utils,\n version: pkg.version\n};\n\n},{\"../package\":73,\"../vendor/starts-with-polyfill\":218,\"./components/index\":84,\"./core/a-assets\":125,\"./core/a-cubemap\":126,\"./core/a-entity\":127,\"./core/a-mixin\":128,\"./core/a-node\":129,\"./core/a-register-element\":130,\"./core/component\":131,\"./core/geometry\":132,\"./core/scene/a-scene\":134,\"./core/scene/scenes\":138,\"./core/schema\":140,\"./core/shader\":141,\"./core/system\":142,\"./extras/components/\":143,\"./extras/primitives/\":146,\"./extras/primitives/getMeshMixin\":145,\"./extras/primitives/primitives\":147,\"./geometries/index\":168,\"./lib/three\":179,\"./shaders/index\":181,\"./style/aframe.css\":186,\"./style/rStats.css\":187,\"./systems/index\":191,\"./utils/\":205,\"./utils/isIOSOlderThan10\":208,\"custom-event-polyfill\":7,\"present\":48,\"promise-polyfill\":50,\"super-animejs\":56,\"webvr-polyfill\":68}],178:[function(_dereq_,module,exports){\nwindow.aframeStats = function (scene) {\n var _rS = null;\n var _scene = scene;\n var _values = {\n te: {\n caption: 'Entities'\n },\n lt: {\n caption: 'Load Time'\n }\n };\n var _groups = [ {\n caption: 'A-Frame',\n values: [ 'te', 'lt' ]\n } ];\n\n function _update () {\n _rS('te').set(getEntityCount());\n if (window.performance.getEntriesByName) {\n _rS('lt').set(window.performance.getEntriesByName('render-started')[0].startTime.toFixed(0));\n }\n }\n\n function getEntityCount () {\n var elements = _scene.querySelectorAll('*');\n Array.prototype.slice.call(elements).filter(function (el) {\n return el.isEntity;\n });\n return elements.length;\n }\n\n function _start () {}\n\n function _end () {}\n\n function _attach (r) {\n _rS = r;\n }\n\n return {\n update: _update,\n start: _start,\n end: _end,\n attach: _attach,\n values: _values,\n groups: _groups,\n fractions: []\n };\n};\n\nif (typeof module === 'object') {\n module.exports = {\n aframeStats: window.aframeStats\n };\n}\n\n},{}],179:[function(_dereq_,module,exports){\n(function (global){\nvar THREE = global.THREE = _dereq_('super-three');\n\n// Allow cross-origin images to be loaded.\n\n// This should not be on `THREE.Loader` nor `THREE.ImageUtils`.\n// Must be on `THREE.TextureLoader`.\nif (THREE.TextureLoader) {\n THREE.TextureLoader.prototype.crossOrigin = 'anonymous';\n}\n\n// This is for images loaded from the model loaders.\nif (THREE.ImageLoader) {\n THREE.ImageLoader.prototype.crossOrigin = 'anonymous';\n}\n\n// In-memory caching for XHRs (for images, audio files, textures, etc.).\nif (THREE.Cache) {\n THREE.Cache.enabled = true;\n}\n\n// TODO: Eventually include these only if they are needed by a component.\n_dereq_('../../vendor/DeviceOrientationControls'); // THREE.DeviceOrientationControls\n_dereq_('super-three/examples/js/loaders/DRACOLoader'); // THREE.DRACOLoader\n_dereq_('super-three/examples/js/loaders/GLTFLoader'); // THREE.GLTFLoader\n_dereq_('super-three/examples/js/loaders/OBJLoader'); // THREE.OBJLoader\n_dereq_('super-three/examples/js/loaders/MTLLoader'); // THREE.MTLLoader\n_dereq_('super-three/examples/js/utils/BufferGeometryUtils'); // THREE.BufferGeometryUtils\n\nTHREE.DRACOLoader.prototype.crossOrigin = 'anonymous';\nTHREE.GLTFLoader.prototype.crossOrigin = 'anonymous';\nTHREE.MTLLoader.prototype.crossOrigin = 'anonymous';\nTHREE.OBJLoader.prototype.crossOrigin = 'anonymous';\n\nmodule.exports = THREE;\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n\n},{\"../../vendor/DeviceOrientationControls\":215,\"super-three\":57,\"super-three/examples/js/loaders/DRACOLoader\":58,\"super-three/examples/js/loaders/GLTFLoader\":59,\"super-three/examples/js/loaders/MTLLoader\":60,\"super-three/examples/js/loaders/OBJLoader\":61,\"super-three/examples/js/utils/BufferGeometryUtils\":62}],180:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\n/**\n * Flat shader using THREE.MeshBasicMaterial.\n */\nmodule.exports.Shader = registerShader('flat', {\n schema: {\n color: {type: 'color'},\n fog: {default: true},\n height: {default: 256},\n offset: {type: 'vec2', default: {x: 0, y: 0}},\n repeat: {type: 'vec2', default: {x: 1, y: 1}},\n src: {type: 'map'},\n width: {default: 512},\n wireframe: {default: false},\n wireframeLinewidth: {default: 2}\n },\n\n /**\n * Initializes the shader.\n * Adds a reference from the scene to this entity as the camera.\n */\n init: function (data) {\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.materialData = {color: new THREE.Color()};\n this.textureSrc = null;\n getMaterialData(data, this.materialData);\n this.rendererSystem.applyColorCorrection(this.materialData.color);\n this.material = new THREE.MeshBasicMaterial(this.materialData);\n utils.material.updateMap(this, data);\n },\n\n update: function (data) {\n this.updateMaterial(data);\n utils.material.updateMap(this, data);\n },\n\n /**\n * Updating existing material.\n *\n * @param {object} data - Material component data.\n */\n updateMaterial: function (data) {\n var key;\n getMaterialData(data, this.materialData);\n this.rendererSystem.applyColorCorrection(this.materialData.color);\n for (key in this.materialData) {\n this.material[key] = this.materialData[key];\n }\n }\n});\n\n/**\n * Builds and normalize material data, normalizing stuff along the way.\n *\n * @param {object} data - Material data.\n * @param {object} materialData - Object to reuse.\n * @returns {object} Updated material data.\n */\nfunction getMaterialData (data, materialData) {\n materialData.color.set(data.color);\n materialData.fog = data.fog;\n materialData.wireframe = data.wireframe;\n materialData.wireframeLinewidth = data.wireframeLinewidth;\n return materialData;\n}\n\n},{\"../core/shader\":141,\"../lib/three\":179,\"../utils/\":205}],181:[function(_dereq_,module,exports){\n_dereq_('./flat');\n_dereq_('./standard');\n_dereq_('./sdf');\n_dereq_('./msdf');\n_dereq_('./ios10hls');\n\n},{\"./flat\":180,\"./ios10hls\":182,\"./msdf\":183,\"./sdf\":184,\"./standard\":185}],182:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\n\n/**\n * Custom shader for iOS 10 HTTP Live Streaming (HLS).\n * For more information on HLS, see https://datatracker.ietf.org/doc/draft-pantos-http-live-streaming/\n */\nmodule.exports.Shader = registerShader('ios10hls', {\n schema: {\n src: {type: 'map', is: 'uniform'},\n opacity: {type: 'number', is: 'uniform', default: 1}\n },\n\n vertexShader: [\n 'varying vec2 vUV;',\n 'void main(void) {',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n ' vUV = uv;',\n '}'\n ].join('\\n'),\n\n fragmentShader: [\n 'uniform sampler2D src;',\n 'uniform float opacity;',\n 'varying vec2 vUV;',\n 'void main() {',\n ' vec2 offset = vec2(0, 0);',\n ' vec2 repeat = vec2(1, 1);',\n ' vec4 color = texture2D(src, vec2(vUV.x / repeat.x + offset.x, (1.0 - vUV.y) / repeat.y + offset.y)).bgra;',\n ' gl_FragColor = vec4(color.rgb, opacity);',\n '}'\n ].join('\\n')\n});\n\n\n},{\"../core/shader\":141}],183:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\n\nvar isWebGL2AVailable = !!document.createElement('canvas').getContext('webgl2');\n\nvar VERTEX_SHADER_WEBGL1 = [\n 'attribute vec2 uv;',\n 'attribute vec3 position;',\n 'uniform mat4 projectionMatrix;',\n 'uniform mat4 modelViewMatrix;',\n 'varying vec2 vUV;',\n 'void main(void) {',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n ' vUV = uv;',\n '}'\n].join('\\n');\n\nvar VERTEX_SHADER_WEBGL2 = [\n '#version 300 es',\n 'in vec2 uv;',\n 'in vec3 position;',\n 'uniform mat4 projectionMatrix;',\n 'uniform mat4 modelViewMatrix;',\n 'out vec2 vUV;',\n 'void main(void) {',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n ' vUV = uv;',\n '}'\n].join('\\n');\n\nvar VERTEX_SHADER = isWebGL2AVailable ? VERTEX_SHADER_WEBGL2 : VERTEX_SHADER_WEBGL1;\n\nvar FRAGMENT_SHADER_WEBGL1 = [\n '#ifdef GL_OES_standard_derivatives',\n '#extension GL_OES_standard_derivatives: enable',\n '#endif',\n 'precision highp float;',\n 'uniform bool negate;',\n 'uniform float alphaTest;',\n 'uniform float opacity;',\n 'uniform sampler2D map;',\n 'uniform vec3 color;',\n 'varying vec2 vUV;',\n\n 'float median(float r, float g, float b) {',\n ' return max(min(r, g), min(max(r, g), b));',\n '}',\n\n // FIXME: Experimentally determined constants.\n '#define BIG_ENOUGH 0.001',\n '#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)',\n\n 'void main() {',\n ' vec3 sampleColor = texture2D(map, vUV).rgb;',\n ' if (negate) { sampleColor = 1.0 - sampleColor; }',\n\n ' float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;',\n ' float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);',\n ' float dscale = 0.353505;',\n ' vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));',\n ' float isBigEnough = max(abs(duv.x), abs(duv.y));',\n\n // When texel is too small, blend raw alpha value rather than supersampling.\n // FIXME: Experimentally determined constant.\n ' // Do modified alpha test.',\n ' if (isBigEnough > BIG_ENOUGH) {',\n ' float ratio = BIG_ENOUGH / isBigEnough;',\n ' alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);',\n ' }',\n\n ' // Do modified alpha test.',\n ' if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }',\n ' gl_FragColor = vec4(color.xyz, alpha * opacity);',\n '}'\n].join('\\n');\n\nvar FRAGMENT_SHADER_WEBGL2 = [\n '#version 300 es',\n 'precision highp float;',\n 'uniform bool negate;',\n 'uniform float alphaTest;',\n 'uniform float opacity;',\n 'uniform sampler2D map;',\n 'uniform vec3 color;',\n 'in vec2 vUV;',\n 'out vec4 fragColor;',\n\n 'float median(float r, float g, float b) {',\n ' return max(min(r, g), min(max(r, g), b));',\n '}',\n\n // FIXME: Experimentally determined constants.\n '#define BIG_ENOUGH 0.001',\n '#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)',\n\n 'void main() {',\n ' vec3 sampleColor = texture(map, vUV).rgb;',\n ' if (negate) { sampleColor = 1.0 - sampleColor; }',\n\n ' float sigDist = median(sampleColor.r, sampleColor.g, sampleColor.b) - 0.5;',\n ' float alpha = clamp(sigDist / fwidth(sigDist) + 0.5, 0.0, 1.0);',\n ' float dscale = 0.353505;',\n ' vec2 duv = dscale * (dFdx(vUV) + dFdy(vUV));',\n ' float isBigEnough = max(abs(duv.x), abs(duv.y));',\n\n // When texel is too small, blend raw alpha value rather than supersampling.\n // FIXME: Experimentally determined constant.\n ' // Do modified alpha test.',\n ' if (isBigEnough > BIG_ENOUGH) {',\n ' float ratio = BIG_ENOUGH / isBigEnough;',\n ' alpha = ratio * alpha + (1.0 - ratio) * (sigDist + 0.5);',\n ' }',\n\n ' // Do modified alpha test.',\n ' if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }',\n ' fragColor = vec4(color.xyz, alpha * opacity);',\n '}'\n].join('\\n');\n\nvar FRAGMENT_SHADER = isWebGL2AVailable ? FRAGMENT_SHADER_WEBGL2 : FRAGMENT_SHADER_WEBGL1;\n\n/**\n * Multi-channel signed distance field.\n * Used by text component.\n */\nmodule.exports.Shader = registerShader('msdf', {\n schema: {\n alphaTest: {type: 'number', is: 'uniform', default: 0.5},\n color: {type: 'color', is: 'uniform', default: 'white'},\n map: {type: 'map', is: 'uniform'},\n negate: {type: 'boolean', is: 'uniform', default: true},\n opacity: {type: 'number', is: 'uniform', default: 1.0}\n },\n\n raw: true,\n\n vertexShader: VERTEX_SHADER,\n\n fragmentShader: FRAGMENT_SHADER\n});\n\n},{\"../core/shader\":141}],184:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\n\n/**\n * Signed distance field.\n * Used by text component.\n */\nmodule.exports.Shader = registerShader('sdf', {\n schema: {\n alphaTest: {type: 'number', is: 'uniform', default: 0.5},\n color: {type: 'color', is: 'uniform', default: 'white'},\n map: {type: 'map', is: 'uniform'},\n opacity: {type: 'number', is: 'uniform', default: 1.0}\n },\n\n raw: true,\n\n vertexShader: [\n '#version 300 es',\n 'in vec2 uv;',\n 'in vec3 position;',\n 'uniform mat4 projectionMatrix;',\n 'uniform mat4 modelViewMatrix;',\n 'out vec2 vUV;',\n 'void main(void) {',\n ' gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);',\n ' vUV = uv;',\n '}'\n ].join('\\n'),\n\n fragmentShader: [\n '#version 300 es',\n 'precision highp float;',\n 'uniform float alphaTest;',\n 'uniform float opacity;',\n 'uniform sampler2D map;',\n 'uniform vec3 color;',\n 'in vec2 vUV;',\n 'out vec4 fragColor;',\n\n '#ifdef GL_OES_standard_derivatives',\n ' float contour(float width, float value) {',\n ' return smoothstep(0.5 - value, 0.5 + value, width);',\n ' }',\n '#else',\n ' float aastep(float value, float afwidth) {',\n ' return smoothstep(0.5 - afwidth, 0.5 + afwidth, value);',\n ' }',\n '#endif',\n\n // FIXME: Experimentally determined constants.\n '#define BIG_ENOUGH 0.001',\n '#define MODIFIED_ALPHATEST (0.02 * isBigEnough / BIG_ENOUGH)',\n '#define ALL_SMOOTH 0.4',\n '#define ALL_ROUGH 0.02',\n '#define DISCARD_ALPHA (alphaTest / (2.2 - 1.2 * ratio))',\n\n 'void main() {',\n // When we have derivatives and can get texel size for supersampling.\n ' #ifdef GL_OES_standard_derivatives',\n ' vec2 uv = vUV;',\n ' vec4 texColor = texture(map, uv);',\n ' float dist = texColor.a;',\n ' float width = fwidth(dist);',\n ' float alpha = contour(dist, width);',\n ' float dscale = 0.353505;',\n\n ' vec2 duv = dscale * (dFdx(uv) + dFdy(uv));',\n ' float isBigEnough = max(abs(duv.x), abs(duv.y));',\n\n // When texel is too small, blend raw alpha value rather than supersampling.\n // FIXME: experimentally determined constant\n ' if (isBigEnough > BIG_ENOUGH) {',\n ' float ratio = BIG_ENOUGH / isBigEnough;',\n ' alpha = ratio * alpha + (1.0 - ratio) * dist;',\n ' }',\n\n // Otherwise do weighted supersampling.\n // FIXME: why this weighting?\n ' if (isBigEnough <= BIG_ENOUGH) {',\n ' vec4 box = vec4 (uv - duv, uv + duv);',\n ' alpha = (alpha + 0.5 * (',\n ' contour(texture(map, box.xy).a, width)',\n ' + contour(texture(map, box.zw).a, width)',\n ' + contour(texture(map, box.xw).a, width)',\n ' + contour(texture(map, box.zy).a, width)',\n ' )) / 3.0;',\n ' }',\n\n // Do modified alpha test.\n ' if (alpha < alphaTest * MODIFIED_ALPHATEST) { discard; return; }',\n\n ' #else',\n // When we don't have derivatives, use approximations.\n ' vec4 texColor = texture(map, vUV);',\n ' float value = texColor.a;',\n // FIXME: if we understood font pixel dimensions, this could probably be improved\n ' float afwidth = (1.0 / 32.0) * (1.4142135623730951 / (2.0 * gl_FragCoord.w));',\n ' float alpha = aastep(value, afwidth);',\n\n // Use gl_FragCoord.w to guess when we should blend.\n // FIXME: If we understood font pixel dimensions, this could probably be improved.\n ' float ratio = (gl_FragCoord.w >= ALL_SMOOTH) ? 1.0 : (gl_FragCoord.w < ALL_ROUGH) ? 0.0 : (gl_FragCoord.w - ALL_ROUGH) / (ALL_SMOOTH - ALL_ROUGH);',\n ' if (alpha < alphaTest) { if (ratio >= 1.0) { discard; return; } alpha = 0.0; }',\n ' alpha = alpha * ratio + (1.0 - ratio) * value;',\n ' if (ratio < 1.0 && alpha <= DISCARD_ALPHA) { discard; return; }',\n ' #endif',\n\n ' fragColor = vec4(color, opacity * alpha);',\n '}'\n ].join('\\n')\n});\n\n},{\"../core/shader\":141}],185:[function(_dereq_,module,exports){\nvar registerShader = _dereq_('../core/shader').registerShader;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\n\nvar CubeLoader = new THREE.CubeTextureLoader();\nvar texturePromises = {};\n\n/**\n * Standard (physically-based) shader using THREE.MeshStandardMaterial.\n */\nmodule.exports.Shader = registerShader('standard', {\n schema: {\n ambientOcclusionMap: {type: 'map'},\n ambientOcclusionMapIntensity: {default: 1},\n ambientOcclusionTextureOffset: {type: 'vec2'},\n ambientOcclusionTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n color: {type: 'color'},\n\n displacementMap: {type: 'map'},\n displacementScale: {default: 1},\n displacementBias: {default: 0.5},\n displacementTextureOffset: {type: 'vec2'},\n displacementTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n emissive: {type: 'color', default: '#000'},\n emissiveIntensity: {default: 1},\n envMap: {default: ''},\n\n fog: {default: true},\n height: {default: 256},\n\n metalness: {default: 0.0, min: 0.0, max: 1.0},\n metalnessMap: {type: 'map'},\n metalnessTextureOffset: {type: 'vec2'},\n metalnessTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n normalMap: {type: 'map'},\n normalScale: {type: 'vec2', default: {x: 1, y: 1}},\n normalTextureOffset: {type: 'vec2'},\n normalTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n offset: {type: 'vec2', default: {x: 0, y: 0}},\n repeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n roughness: {default: 0.5, min: 0.0, max: 1.0},\n roughnessMap: {type: 'map'},\n roughnessTextureOffset: {type: 'vec2'},\n roughnessTextureRepeat: {type: 'vec2', default: {x: 1, y: 1}},\n\n sphericalEnvMap: {type: 'map'},\n src: {type: 'map'},\n width: {default: 512},\n wireframe: {default: false},\n wireframeLinewidth: {default: 2}\n },\n\n /**\n * Initializes the shader.\n * Adds a reference from the scene to this entity as the camera.\n */\n init: function (data) {\n this.rendererSystem = this.el.sceneEl.systems.renderer;\n this.materialData = {color: new THREE.Color(), emissive: new THREE.Color()};\n getMaterialData(data, this.materialData);\n this.rendererSystem.applyColorCorrection(this.materialData.color);\n this.rendererSystem.applyColorCorrection(this.materialData.emissive);\n this.material = new THREE.MeshStandardMaterial(this.materialData);\n\n utils.material.updateMap(this, data);\n if (data.normalMap) { utils.material.updateDistortionMap('normal', this, data); }\n if (data.displacementMap) { utils.material.updateDistortionMap('displacement', this, data); }\n if (data.ambientOcclusionMap) { utils.material.updateDistortionMap('ambientOcclusion', this, data); }\n if (data.metalnessMap) { utils.material.updateDistortionMap('metalness', this, data); }\n if (data.roughnessMap) { utils.material.updateDistortionMap('roughness', this, data); }\n this.updateEnvMap(data);\n },\n\n update: function (data) {\n this.updateMaterial(data);\n utils.material.updateMap(this, data);\n if (data.normalMap) { utils.material.updateDistortionMap('normal', this, data); }\n if (data.displacementMap) { utils.material.updateDistortionMap('displacement', this, data); }\n if (data.ambientOcclusionMap) { utils.material.updateDistortionMap('ambientOcclusion', this, data); }\n if (data.metalnessMap) { utils.material.updateDistortionMap('metalness', this, data); }\n if (data.roughnessMap) { utils.material.updateDistortionMap('roughness', this, data); }\n this.updateEnvMap(data);\n },\n\n /**\n * Updating existing material.\n *\n * @param {object} data - Material component data.\n * @returns {object} Material.\n */\n updateMaterial: function (data) {\n var key;\n var material = this.material;\n getMaterialData(data, this.materialData);\n this.rendererSystem.applyColorCorrection(this.materialData.color);\n this.rendererSystem.applyColorCorrection(this.materialData.emissive);\n for (key in this.materialData) {\n material[key] = this.materialData[key];\n }\n },\n\n /**\n * Handle environment cubemap. Textures are cached in texturePromises.\n */\n updateEnvMap: function (data) {\n var self = this;\n var material = this.material;\n var envMap = data.envMap;\n var sphericalEnvMap = data.sphericalEnvMap;\n\n // No envMap defined or already loading.\n if ((!envMap && !sphericalEnvMap) || this.isLoadingEnvMap) {\n material.envMap = null;\n material.needsUpdate = true;\n return;\n }\n this.isLoadingEnvMap = true;\n\n // if a spherical env map is defined then use it.\n if (sphericalEnvMap) {\n this.el.sceneEl.systems.material.loadTexture(sphericalEnvMap, {src: sphericalEnvMap}, function textureLoaded (texture) {\n self.isLoadingEnvMap = false;\n texture.mapping = THREE.SphericalReflectionMapping;\n material.envMap = texture;\n utils.material.handleTextureEvents(self.el, texture);\n material.needsUpdate = true;\n });\n return;\n }\n\n // Another material is already loading this texture. Wait on promise.\n if (texturePromises[envMap]) {\n texturePromises[envMap].then(function (cube) {\n self.isLoadingEnvMap = false;\n material.envMap = cube;\n utils.material.handleTextureEvents(self.el, cube);\n material.needsUpdate = true;\n });\n return;\n }\n\n // Material is first to load this texture. Load and resolve texture.\n texturePromises[envMap] = new Promise(function (resolve) {\n utils.srcLoader.validateCubemapSrc(envMap, function loadEnvMap (urls) {\n CubeLoader.load(urls, function (cube) {\n // Texture loaded.\n self.isLoadingEnvMap = false;\n material.envMap = cube;\n utils.material.handleTextureEvents(self.el, cube);\n resolve(cube);\n });\n });\n });\n }\n});\n\n/**\n * Builds and normalize material data, normalizing stuff along the way.\n *\n * @param {object} data - Material data.\n * @param {object} materialData - Object to use.\n * @returns {object} Updated materialData.\n */\nfunction getMaterialData (data, materialData) {\n materialData.color.set(data.color);\n materialData.emissive.set(data.emissive);\n materialData.emissiveIntensity = data.emissiveIntensity;\n materialData.fog = data.fog;\n materialData.metalness = data.metalness;\n materialData.roughness = data.roughness;\n materialData.wireframe = data.wireframe;\n materialData.wireframeLinewidth = data.wireframeLinewidth;\n\n if (data.normalMap) { materialData.normalScale = data.normalScale; }\n\n if (data.ambientOcclusionMap) {\n materialData.aoMapIntensity = data.ambientOcclusionMapIntensity;\n }\n\n if (data.displacementMap) {\n materialData.displacementScale = data.displacementScale;\n materialData.displacementBias = data.displacementBias;\n }\n\n return materialData;\n}\n\n},{\"../core/shader\":141,\"../lib/three\":179,\"../utils/\":205}],186:[function(_dereq_,module,exports){\nvar css = \"html.a-fullscreen{bottom:0;left:0;position:fixed;right:0;top:0}html.a-fullscreen body{height:100%;margin:0;overflow:hidden;padding:0;width:100%}html.a-fullscreen .a-canvas{width:100%!important;height:100%!important;top:0!important;left:0!important;right:0!important;bottom:0!important;position:fixed!important}html:not(.a-fullscreen) .a-enter-ar,html:not(.a-fullscreen) .a-enter-vr{right:5px;bottom:5px}:-webkit-full-screen{background-color:transparent}.a-hidden{display:none!important}.a-canvas{height:100%;left:0;position:absolute;top:0;width:100%}.a-canvas.a-grab-cursor:hover{cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}canvas.a-canvas.a-mouse-cursor-hover:hover{cursor:pointer}.a-inspector-loader{background-color:#ed3160;position:fixed;left:3px;top:3px;padding:6px 10px;color:#fff;text-decoration:none;font-size:12px;font-family:Roboto,sans-serif;text-align:center;z-index:99999;width:204px}@keyframes dots-1{from{opacity:0}25%{opacity:1}}@keyframes dots-2{from{opacity:0}50%{opacity:1}}@keyframes dots-3{from{opacity:0}75%{opacity:1}}@-webkit-keyframes dots-1{from{opacity:0}25%{opacity:1}}@-webkit-keyframes dots-2{from{opacity:0}50%{opacity:1}}@-webkit-keyframes dots-3{from{opacity:0}75%{opacity:1}}.a-inspector-loader .dots span{animation:dots-1 2s infinite steps(1);-webkit-animation:dots-1 2s infinite steps(1)}.a-inspector-loader .dots span:first-child+span{animation-name:dots-2;-webkit-animation-name:dots-2}.a-inspector-loader .dots span:first-child+span+span{animation-name:dots-3;-webkit-animation-name:dots-3}a-scene{display:block;position:relative;height:100%;width:100%}a-assets,a-scene audio,a-scene img,a-scene video{display:none}.a-enter-vr-modal,.a-orientation-modal{font-family:Consolas,Andale Mono,Courier New,monospace}.a-enter-vr-modal a{border-bottom:1px solid #fff;padding:2px 0;text-decoration:none;transition:.1s color ease-in}.a-enter-vr-modal a:hover{background-color:#fff;color:#111;padding:2px 4px;position:relative;left:-4px}.a-enter-ar,.a-enter-vr{font-family:sans-serif,monospace;font-size:13px;width:100%;font-weight:200;line-height:16px;position:absolute;right:20px;bottom:20px}.a-enter-ar{right:80px}.a-enter-vr-button,.a-enter-vr-modal,.a-enter-vr-modal a{color:#fff;user-select:none;outline:0}.a-enter-vr-button{background:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z' fill='%23fff'/%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z' fill='%23fff'/%3E%3C/svg%3E\\\") 50% 50% no-repeat rgba(0,0,0,.35)}.a-enter-ar-button{background:url(\\\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d='M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z' fill='%23fff'/%3E%3Cpath d='M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z' fill='%23fff'/%3E%3Cpath d='M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z' fill='%23fff'/%3E%3C/svg%3E\\\") 50% 50% no-repeat rgba(0,0,0,.2)}.a-enter-ar-button,.a-enter-vr-button{background-size:90% 90%;border:0;bottom:0;cursor:pointer;min-width:58px;min-height:34px;padding-right:0;padding-top:0;position:absolute;right:0;transition:background-color .05s ease;-webkit-transition:background-color .05s ease;z-index:9999;border-radius:8px;touch-action:manipulation}.a-enter-ar-button{background-size:100% 90%;margin-right:10px;border-radius:7px}.a-enter-ar-button:active,.a-enter-ar-button:hover,.a-enter-vr-button:active,.a-enter-vr-button:hover{background-color:#ef2d5e}.a-enter-vr-button.resethover{background-color:rgba(0,0,0,.35)}[data-a-enter-vr-no-webvr] .a-enter-vr-button{border-color:#666;opacity:.65}[data-a-enter-vr-no-webvr] .a-enter-vr-button:active,[data-a-enter-vr-no-webvr] .a-enter-vr-button:hover{background-color:rgba(0,0,0,.35);cursor:not-allowed}.a-enter-vr-modal{background-color:#666;border-radius:0;display:none;min-height:32px;margin-right:70px;padding:9px;width:280px;right:2%;position:absolute}.a-enter-vr-modal:after{border-bottom:10px solid transparent;border-left:10px solid #666;border-top:10px solid transparent;display:inline-block;content:'';position:absolute;right:-5px;top:5px;width:0;height:0}.a-enter-vr-modal a,.a-enter-vr-modal p{display:inline}.a-enter-vr-modal p{margin:0}.a-enter-vr-modal p:after{content:' '}[data-a-enter-vr-no-headset].a-enter-vr:hover .a-enter-vr-modal,[data-a-enter-vr-no-webvr].a-enter-vr:hover .a-enter-vr-modal{display:block}.a-orientation-modal{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E) center/50% 50% no-repeat rgba(244,244,244,1);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-orientation-modal:after{color:#666;content:\\\"Insert phone into Cardboard holder.\\\";display:block;position:absolute;text-align:center;top:70%;transform:translateY(-70%);width:100%}.a-orientation-modal button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E) no-repeat;border:none;height:50px;text-indent:-9999px;width:50px}.a-loader-title{background-color:rgba(0,0,0,.6);font-family:sans-serif,monospace;text-align:center;font-size:20px;height:50px;font-weight:300;line-height:50px;position:absolute;right:0;left:0;top:0;color:#fff}.a-modal{background:0 0/50% 50% rgba(0,0,0,.6);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-dialog{position:relative;left:50%;top:50%;transform:translate(-50%,-50%);z-index:199995;width:300px;height:200px;background-size:contain;background-color:#fff;font-family:sans-serif,monospace;font-size:20px;border-radius:3px;padding:6px}.a-dialog-text-container{width:100%;height:70%;align-self:flex-start;display:flex;justify-content:center;align-content:center;flex-direction:column}.a-dialog-text{display:inline-block;font-weight:400;font-size:14pt;margin:8px}.a-dialog-buttons-container{display:inline-flex;align-self:flex-end;width:100%;height:30%}.a-dialog-button{cursor:pointer;align-self:center;opacity:.9;height:80%;width:50%;font-size:12pt;margin:4px;border-radius:2px;text-align:center;border:none;display:inline-block;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.2);user-select:none}.a-dialog-permission-button:hover{box-shadow:0 7px 14px rgba(0,0,0,.2),0 2px 2px rgba(0,0,0,.2)}.a-dialog-allow-button{background-color:#00ceff}.a-dialog-deny-button{background-color:#ff005b}.a-dialog-ok-button{background-color:#00ceff;width:100%}\"; (_dereq_(\"browserify-css\").createStyle(css, { \"href\": \"src/style/aframe.css\"})); module.exports = css;\n},{\"browserify-css\":4}],187:[function(_dereq_,module,exports){\nvar css = \".rs-base{background-color:#333;color:#fafafa;border-radius:0;font:10px monospace;left:5px;line-height:1em;opacity:.85;overflow:hidden;padding:10px;position:fixed;top:5px;width:300px;z-index:10000}.rs-base div.hidden{display:none}.rs-base h1{color:#fff;cursor:pointer;font-size:1.4em;font-weight:300;margin:0 0 5px;padding:0}.rs-group{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;margin-bottom:5px}.rs-group:last-child{margin-bottom:0}.rs-counter-base{align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;height:10px;-webkit-justify-content:space-between;justify-content:space-between;margin:2px 0}.rs-counter-base.alarm{color:#b70000;text-shadow:0 0 0 #b70000,0 0 1px #fff,0 0 1px #fff,0 0 2px #fff,0 0 2px #fff,0 0 3px #fff,0 0 3px #fff,0 0 4px #fff,0 0 4px #fff}.rs-counter-id{font-weight:300;-webkit-box-ordinal-group:0;-webkit-order:0;order:0;width:54px}.rs-counter-value{font-weight:300;-webkit-box-ordinal-group:1;-webkit-order:1;order:1;text-align:right;width:35px}.rs-canvas{-webkit-box-ordinal-group:2;-webkit-order:2;order:2}@media (min-width:480px){.rs-base{left:20px;top:20px}}\"; (_dereq_(\"browserify-css\").createStyle(css, { \"href\": \"src/style/rStats.css\"})); module.exports = css;\n},{\"browserify-css\":4}],188:[function(_dereq_,module,exports){\nvar constants = _dereq_('../constants/');\nvar registerSystem = _dereq_('../core/system').registerSystem;\n\nvar DEFAULT_CAMERA_ATTR = 'data-aframe-default-camera';\n\n/**\n * Camera system. Manages which camera is active among multiple cameras in scene.\n *\n * @member {object} activeCameraEl - Active camera entity.\n */\nmodule.exports.System = registerSystem('camera', {\n init: function () {\n this.activeCameraEl = null;\n\n this.render = this.render.bind(this);\n this.unwrapRender = this.unwrapRender.bind(this);\n this.wrapRender = this.wrapRender.bind(this);\n\n this.initialCameraFound = false;\n this.numUserCameras = 0;\n this.numUserCamerasChecked = 0;\n this.setupInitialCamera();\n },\n\n /**\n * Setup initial camera, either searching for camera or\n * creating a default camera if user has not added one during the initial scene traversal.\n * We want sceneEl.camera to be ready, set, and initialized before the rest of the scene\n * loads.\n *\n * Default camera offset height is at average eye level (~1.6m).\n */\n setupInitialCamera: function () {\n var cameraEls;\n var i;\n var sceneEl = this.sceneEl;\n var self = this;\n\n // Camera already defined or the one defined it is an spectator one.\n if (sceneEl.camera && !sceneEl.camera.el.getAttribute('camera').spectator) {\n sceneEl.emit('cameraready', {cameraEl: sceneEl.camera.el});\n return;\n }\n\n // Search for initial user-defined camera.\n cameraEls = sceneEl.querySelectorAll('a-camera, [camera]');\n\n // No user cameras, create default one.\n if (!cameraEls.length) {\n this.createDefaultCamera();\n return;\n }\n\n this.numUserCameras = cameraEls.length;\n for (i = 0; i < cameraEls.length; i++) {\n cameraEls[i].addEventListener('object3dset', function (evt) {\n if (evt.detail.type !== 'camera') { return; }\n self.checkUserCamera(this);\n });\n\n // Load camera and wait for camera to initialize.\n if (cameraEls[i].isNode) {\n cameraEls[i].load();\n } else {\n cameraEls[i].addEventListener('nodeready', function () {\n this.load();\n });\n }\n }\n },\n\n /**\n * Check if a user-defined camera entity is appropriate to be initial camera.\n * (active + non-spectator).\n *\n * Keep track of the number of cameras we checked and whether we found one.\n */\n checkUserCamera: function (cameraEl) {\n var cameraData;\n var sceneEl = this.el.sceneEl;\n this.numUserCamerasChecked++;\n\n // Already found one.\n if (this.initialCameraFound) { return; }\n\n // Check if camera is appropriate for being the initial camera.\n cameraData = cameraEl.getAttribute('camera');\n if (!cameraData.active || cameraData.spectator) {\n // No user cameras eligible, create default camera.\n if (this.numUserCamerasChecked === this.numUserCameras) {\n this.createDefaultCamera();\n }\n return;\n }\n\n this.initialCameraFound = true;\n sceneEl.camera = cameraEl.getObject3D('camera');\n sceneEl.emit('cameraready', {cameraEl: cameraEl});\n },\n\n createDefaultCamera: function () {\n var defaultCameraEl;\n var sceneEl = this.sceneEl;\n\n // Set up default camera.\n defaultCameraEl = document.createElement('a-entity');\n defaultCameraEl.setAttribute('camera', {active: true});\n defaultCameraEl.setAttribute('position', {\n x: 0,\n y: constants.DEFAULT_CAMERA_HEIGHT,\n z: 0\n });\n defaultCameraEl.setAttribute('wasd-controls', '');\n defaultCameraEl.setAttribute('look-controls', '');\n defaultCameraEl.setAttribute(constants.AFRAME_INJECTED, '');\n\n defaultCameraEl.addEventListener('object3dset', function (evt) {\n if (evt.detail.type !== 'camera') { return; }\n sceneEl.camera = evt.detail.object;\n sceneEl.emit('cameraready', {cameraEl: defaultCameraEl});\n });\n\n sceneEl.appendChild(defaultCameraEl);\n },\n\n /**\n * Set a different active camera.\n * When we choose a (sort of) random scene camera as the replacement, set its `active` to\n * true. The camera component will call `setActiveCamera` and handle passing the torch to\n * the new camera.\n */\n disableActiveCamera: function () {\n var cameraEls;\n var newActiveCameraEl;\n cameraEls = this.sceneEl.querySelectorAll('[camera]');\n newActiveCameraEl = cameraEls[cameraEls.length - 1];\n newActiveCameraEl.setAttribute('camera', 'active', true);\n },\n\n /**\n * Set active camera to be used by renderer.\n * Removes the default camera (if present).\n * Disables all other cameras in the scene.\n *\n * @param {Element} newCameraEl - Entity with camera component.\n */\n setActiveCamera: function (newCameraEl) {\n var cameraEl;\n var cameraEls;\n var i;\n var newCamera;\n var previousCamera = this.activeCameraEl;\n var sceneEl = this.sceneEl;\n\n // Same camera.\n newCamera = newCameraEl.getObject3D('camera');\n if (!newCamera || newCameraEl === this.activeCameraEl) { return; }\n\n // Grab the default camera.\n var defaultCameraWrapper = sceneEl.querySelector('[' + DEFAULT_CAMERA_ATTR + ']');\n var defaultCameraEl = defaultCameraWrapper &&\n defaultCameraWrapper.querySelector('[camera]');\n\n // Remove default camera if new camera is not the default camera.\n if (newCameraEl !== defaultCameraEl) { removeDefaultCamera(sceneEl); }\n\n // Make new camera active.\n this.activeCameraEl = newCameraEl;\n this.activeCameraEl.play();\n sceneEl.camera = newCamera;\n\n // Disable current camera\n if (previousCamera) {\n previousCamera.setAttribute('camera', 'active', false);\n }\n\n // Disable other cameras in the scene\n cameraEls = sceneEl.querySelectorAll('[camera]');\n for (i = 0; i < cameraEls.length; i++) {\n cameraEl = cameraEls[i];\n if (!cameraEl.isEntity || newCameraEl === cameraEl) { continue; }\n cameraEl.setAttribute('camera', 'active', false);\n cameraEl.pause();\n }\n sceneEl.emit('camera-set-active', {cameraEl: newCameraEl});\n },\n\n /**\n * Set spectator camera to render the scene on a 2D display.\n *\n * @param {Element} newCameraEl - Entity with camera component.\n */\n setSpectatorCamera: function (newCameraEl) {\n var newCamera;\n var previousCamera = this.spectatorCameraEl;\n var sceneEl = this.sceneEl;\n var spectatorCameraEl;\n\n // Same camera.\n newCamera = newCameraEl.getObject3D('camera');\n if (!newCamera || newCameraEl === this.spectatorCameraEl) { return; }\n\n // Disable current camera\n if (previousCamera) {\n previousCamera.setAttribute('camera', 'spectator', false);\n }\n\n spectatorCameraEl = this.spectatorCameraEl = newCameraEl;\n\n sceneEl.addEventListener('enter-vr', this.wrapRender);\n sceneEl.addEventListener('exit-vr', this.unwrapRender);\n\n spectatorCameraEl.setAttribute('camera', 'active', false);\n spectatorCameraEl.play();\n\n sceneEl.emit('camera-set-spectator', {cameraEl: newCameraEl});\n },\n\n /**\n * Disables current spectator camera.\n */\n disableSpectatorCamera: function () {\n this.spectatorCameraEl = undefined;\n },\n\n /**\n * Wrap the render method of the renderer to render\n * the spectator camera after vrDisplay.submitFrame.\n */\n wrapRender: function () {\n if (!this.spectatorCameraEl || this.originalRender) { return; }\n this.originalRender = this.sceneEl.renderer.render;\n this.sceneEl.renderer.render = this.render;\n },\n\n unwrapRender: function () {\n if (!this.originalRender) { return; }\n this.sceneEl.renderer.render = this.originalRender;\n this.originalRender = undefined;\n },\n\n render: function (scene, camera) {\n var isVREnabled;\n var sceneEl = this.sceneEl;\n var spectatorCamera;\n\n isVREnabled = sceneEl.renderer.xr.enabled;\n this.originalRender.call(sceneEl.renderer, scene, camera);\n if (!this.spectatorCameraEl || sceneEl.isMobile || !isVREnabled) { return; }\n spectatorCamera = this.spectatorCameraEl.components.camera.camera;\n sceneEl.renderer.xr.enabled = false;\n this.originalRender.call(sceneEl.renderer, scene, spectatorCamera);\n sceneEl.renderer.xr.enabled = isVREnabled;\n }\n});\n\n/**\n * Remove injected default camera from scene, if present.\n *\n * @param {Element} sceneEl\n */\nfunction removeDefaultCamera (sceneEl) {\n var defaultCamera;\n var camera = sceneEl.camera;\n if (!camera) { return; }\n\n // Remove default camera if present.\n defaultCamera = sceneEl.querySelector('[' + DEFAULT_CAMERA_ATTR + ']');\n if (!defaultCamera) { return; }\n sceneEl.removeChild(defaultCamera);\n}\n\n},{\"../constants/\":123,\"../core/system\":142}],189:[function(_dereq_,module,exports){\nvar geometries = _dereq_('../core/geometry').geometries;\nvar registerSystem = _dereq_('../core/system').registerSystem;\n\n/**\n * System for geometry component.\n * Handle geometry caching.\n *\n * @member {object} cache - Mapping of stringified component data to THREE.BufferGeometry objects.\n * @member {object} cacheCount - Keep track of number of entities using a geometry to\n * know whether to dispose on removal.\n */\nmodule.exports.System = registerSystem('geometry', {\n init: function () {\n this.cache = {};\n this.cacheCount = {};\n },\n\n /**\n * Reset cache. Mainly for testing.\n */\n clearCache: function () {\n this.cache = {};\n this.cacheCount = {};\n },\n\n /**\n * Attempt to retrieve from cache.\n *\n * @returns {Object|null} A geometry if it exists, else null.\n */\n getOrCreateGeometry: function (data) {\n var cache = this.cache;\n var cachedGeometry;\n var hash;\n\n // Skip all caching logic.\n if (data.skipCache) { return createGeometry(data); }\n\n // Try to retrieve from cache first.\n hash = this.hash(data);\n cachedGeometry = cache[hash];\n incrementCacheCount(this.cacheCount, hash);\n\n if (cachedGeometry) { return cachedGeometry; }\n\n // Create geometry.\n cachedGeometry = createGeometry(data);\n\n // Cache and return geometry.\n cache[hash] = cachedGeometry;\n return cachedGeometry;\n },\n\n /**\n * Let system know that an entity is no longer using a geometry.\n */\n unuseGeometry: function (data) {\n var cache = this.cache;\n var cacheCount = this.cacheCount;\n var geometry;\n var hash;\n\n if (data.skipCache) { return; }\n\n hash = this.hash(data);\n\n if (!cache[hash]) { return; }\n\n decrementCacheCount(cacheCount, hash);\n\n // Another entity is still using this geometry. No need to do anything.\n if (cacheCount[hash] > 0) { return; }\n\n // No more entities are using this geometry. Dispose.\n geometry = cache[hash];\n geometry.dispose();\n delete cache[hash];\n delete cacheCount[hash];\n },\n\n /**\n * Use JSON.stringify to turn component data into hash.\n * Should be deterministic within a single browser engine.\n * If not, then look into json-stable-stringify.\n */\n hash: function (data) {\n return JSON.stringify(data);\n }\n});\n\n/**\n * Create geometry using component data.\n *\n * @param {object} data - Component data.\n * @returns {object} Geometry.\n */\nfunction createGeometry (data) {\n var geometryType = data.primitive;\n var GeometryClass = geometries[geometryType] && geometries[geometryType].Geometry;\n var geometryInstance = new GeometryClass();\n\n if (!GeometryClass) { throw new Error('Unknown geometry `' + geometryType + '`'); }\n\n geometryInstance.init(data);\n return geometryInstance.geometry;\n}\n\n/**\n * Decreate count of entity using a geometry.\n */\nfunction decrementCacheCount (cacheCount, hash) {\n cacheCount[hash]--;\n}\n\n/**\n * Increase count of entity using a geometry.\n */\nfunction incrementCacheCount (cacheCount, hash) {\n cacheCount[hash] = cacheCount[hash] === undefined ? 1 : cacheCount[hash] + 1;\n}\n\n},{\"../core/geometry\":132,\"../core/system\":142}],190:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar THREE = _dereq_('../lib/three');\n\n/**\n * glTF model system.\n *\n * Configures glTF loading options. Models using glTF compression require that a Draco decoder be\n * provided externally.\n *\n * @param {string} dracoDecoderPath - Base path from which to load Draco decoder library.\n */\nmodule.exports.System = registerSystem('gltf-model', {\n schema: {\n dracoDecoderPath: {default: ''}\n },\n\n init: function () {\n var path = this.data.dracoDecoderPath;\n this.dracoLoader = new THREE.DRACOLoader();\n this.dracoLoader.setDecoderPath(path);\n },\n\n update: function () {\n var path;\n if (this.dracoLoader) { return; }\n path = this.data.dracoDecoderPath;\n this.dracoLoader = new THREE.DRACOLoader();\n this.dracoLoader.setDecoderPath(path);\n },\n\n getDRACOLoader: function () {\n return this.dracoLoader;\n }\n});\n\n},{\"../core/system\":142,\"../lib/three\":179}],191:[function(_dereq_,module,exports){\n_dereq_('./camera');\n_dereq_('./geometry');\n_dereq_('./gltf-model');\n_dereq_('./light');\n_dereq_('./material');\n_dereq_('./renderer');\n_dereq_('./shadow');\n_dereq_('./tracked-controls-webvr');\n_dereq_('./tracked-controls-webxr');\n_dereq_('./webxr');\n\n},{\"./camera\":188,\"./geometry\":189,\"./gltf-model\":190,\"./light\":192,\"./material\":193,\"./renderer\":194,\"./shadow\":195,\"./tracked-controls-webvr\":196,\"./tracked-controls-webxr\":197,\"./webxr\":198}],192:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar bind = _dereq_('../utils/bind');\nvar constants = _dereq_('../constants/');\n\nvar DEFAULT_LIGHT_ATTR = 'data-aframe-default-light';\n\n/**\n * Light system.\n *\n * Prescribes default lighting if not specified (one ambient, one directional).\n * Removes default lighting from the scene when a new light is added.\n *\n * @param {bool} defaultLights - Whether default lighting are defined.\n * @param {bool} userDefinedLights - Whether user lighting is defined.\n */\nmodule.exports.System = registerSystem('light', {\n schema: {\n defaultLightsEnabled: {default: true}\n },\n\n init: function () {\n this.defaultLights = false;\n this.userDefinedLights = false;\n // Wait for all entities to fully load before checking for existence of lights.\n // Since entities wait for <a-assets> to load, any lights attaching to the scene\n // will do so asynchronously.\n this.sceneEl.addEventListener('loaded', bind(this.setupDefaultLights, this));\n },\n\n /**\n * Notify scene that light has been added and to remove the default.\n *\n * @param {object} el - element holding the light component.\n */\n registerLight: function (el) {\n if (!el.hasAttribute(DEFAULT_LIGHT_ATTR)) {\n // User added a light, remove default lights through DOM.\n this.removeDefaultLights();\n this.userDefinedLights = true;\n }\n },\n\n removeDefaultLights: function () {\n var defaultLights;\n var sceneEl = this.sceneEl;\n\n if (!this.defaultLights) { return; }\n defaultLights = document.querySelectorAll('[' + DEFAULT_LIGHT_ATTR + ']');\n for (var i = 0; i < defaultLights.length; i++) {\n sceneEl.removeChild(defaultLights[i]);\n }\n this.defaultLights = false;\n },\n\n /**\n * Prescibe default lights to the scene.\n * Does so by injecting markup such that this state is not invisible.\n * These lights are removed if the user adds any lights.\n */\n setupDefaultLights: function () {\n var sceneEl = this.sceneEl;\n var ambientLight;\n var directionalLight;\n\n if (this.userDefinedLights || this.defaultLights || !this.data.defaultLightsEnabled) {\n return;\n }\n\n ambientLight = document.createElement('a-entity');\n ambientLight.setAttribute('light', {color: '#BBB', type: 'ambient'});\n ambientLight.setAttribute(DEFAULT_LIGHT_ATTR, '');\n ambientLight.setAttribute(constants.AFRAME_INJECTED, '');\n sceneEl.appendChild(ambientLight);\n\n directionalLight = document.createElement('a-entity');\n directionalLight.setAttribute('light', {color: '#FFF', intensity: 0.6, castShadow: true});\n directionalLight.setAttribute('position', {x: -0.5, y: 1, z: 1});\n directionalLight.setAttribute(DEFAULT_LIGHT_ATTR, '');\n directionalLight.setAttribute(constants.AFRAME_INJECTED, '');\n sceneEl.appendChild(directionalLight);\n\n this.defaultLights = true;\n }\n});\n\n},{\"../constants/\":123,\"../core/system\":142,\"../utils/bind\":199}],193:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar THREE = _dereq_('../lib/three');\nvar utils = _dereq_('../utils/');\nvar isHLS = _dereq_('../utils/material').isHLS;\n\nvar bind = utils.bind;\nvar debug = utils.debug;\nvar error = debug('components:texture:error');\nvar TextureLoader = new THREE.TextureLoader();\nvar warn = debug('components:texture:warn');\n\nTextureLoader.setCrossOrigin('anonymous');\n\n/**\n * System for material component.\n * Handle material registration, updates (for fog), and texture caching.\n *\n * @member {object} materials - Registered materials.\n * @member {object} textureCounts - Number of times each texture is used. Tracked\n * separately from textureCache, because the cache (1) is populated in\n * multiple places, and (2) may be cleared at any time.\n * @member {object} textureCache - Texture cache for:\n * - Images: textureCache has mapping of src -> repeat -> cached three.js texture.\n * - Videos: textureCache has mapping of videoElement -> cached three.js texture.\n */\nmodule.exports.System = registerSystem('material', {\n init: function () {\n this.materials = {};\n this.textureCounts = {};\n this.textureCache = {};\n\n this.sceneEl.addEventListener(\n 'materialtextureloaded',\n bind(this.onMaterialTextureLoaded, this)\n );\n },\n\n clearTextureCache: function () {\n this.textureCache = {};\n },\n\n /**\n * Determine whether `src` is a image or video. Then try to load the asset, then call back.\n *\n * @param {string, or element} src - Texture URL or element.\n * @param {string} data - Relevant texture data used for caching.\n * @param {function} cb - Callback to pass texture to.\n */\n loadTexture: function (src, data, cb) {\n var self = this;\n\n // Canvas.\n if (src.tagName === 'CANVAS') {\n this.loadCanvas(src, data, cb);\n return;\n }\n\n // Video element.\n if (src.tagName === 'VIDEO') {\n if (!src.src && !src.srcObject && !src.childElementCount) {\n warn('Video element was defined with neither `source` elements nor `src` / `srcObject` attributes.');\n }\n this.loadVideo(src, data, cb);\n return;\n }\n\n utils.srcLoader.validateSrc(src, loadImageCb, loadVideoCb);\n function loadImageCb (src) { self.loadImage(src, data, cb); }\n function loadVideoCb (src) { self.loadVideo(src, data, cb); }\n },\n\n /**\n * High-level function for loading image textures (THREE.Texture).\n *\n * @param {Element|string} src - Texture source.\n * @param {object} data - Texture data.\n * @param {function} cb - Callback to pass texture to.\n */\n loadImage: function (src, data, handleImageTextureLoaded) {\n var hash = this.hash(data);\n var textureCache = this.textureCache;\n\n // Texture already being loaded or already loaded. Wait on promise.\n if (textureCache[hash]) {\n textureCache[hash].then(handleImageTextureLoaded);\n return;\n }\n\n // Texture not yet being loaded. Start loading it.\n textureCache[hash] = loadImageTexture(src, data);\n textureCache[hash].then(handleImageTextureLoaded);\n },\n\n /**\n * High-level function for loading canvas textures (THREE.Texture).\n *\n * @param {Element|string} src - Texture source.\n * @param {object} data - Texture data.\n * @param {function} cb - Callback to pass texture to.\n */\n loadCanvas: function (src, data, cb) {\n var texture;\n texture = new THREE.CanvasTexture(src);\n setTextureProperties(texture, data);\n cb(texture);\n },\n\n /**\n * Load video texture (THREE.VideoTexture).\n * Which is just an image texture that RAFs + needsUpdate.\n * Note that creating a video texture is synchronous unlike loading an image texture.\n * Made asynchronous to be consistent with image textures.\n *\n * @param {Element|string} src - Texture source.\n * @param {object} data - Texture data.\n * @param {function} cb - Callback to pass texture to.\n */\n loadVideo: function (src, data, cb) {\n var hash;\n var texture;\n var textureCache = this.textureCache;\n var videoEl;\n var videoTextureResult;\n\n function handleVideoTextureLoaded (result) {\n result.texture.needsUpdate = true;\n cb(result.texture, result.videoEl);\n }\n\n // Video element provided.\n if (typeof src !== 'string') {\n // Check cache before creating texture.\n videoEl = src;\n hash = this.hashVideo(data, videoEl);\n if (textureCache[hash]) {\n textureCache[hash].then(handleVideoTextureLoaded);\n return;\n }\n // If not in cache, fix up the attributes then start to create the texture.\n fixVideoAttributes(videoEl);\n }\n\n // Only URL provided. Use video element to create texture.\n videoEl = videoEl || createVideoEl(src, data.width, data.height);\n\n // Generated video element already cached. Use that.\n hash = this.hashVideo(data, videoEl);\n if (textureCache[hash]) {\n textureCache[hash].then(handleVideoTextureLoaded);\n return;\n }\n\n // Create new video texture.\n texture = new THREE.VideoTexture(videoEl);\n texture.minFilter = THREE.LinearFilter;\n setTextureProperties(texture, data);\n\n // If iOS and video is HLS, do some hacks.\n if (this.sceneEl.isIOS &&\n isHLS(videoEl.src || videoEl.getAttribute('src'),\n videoEl.type || videoEl.getAttribute('type'))) {\n // Actually BGRA. Tell shader to correct later.\n texture.format = THREE.RGBAFormat;\n texture.needsCorrectionBGRA = true;\n // Apparently needed for HLS. Tell shader to correct later.\n texture.flipY = false;\n texture.needsCorrectionFlipY = true;\n }\n\n // Cache as promise to be consistent with image texture caching.\n videoTextureResult = {texture: texture, videoEl: videoEl};\n textureCache[hash] = Promise.resolve(videoTextureResult);\n handleVideoTextureLoaded(videoTextureResult);\n },\n\n /**\n * Create a hash of the material properties for texture cache key.\n */\n hash: function (data) {\n if (data.src.tagName) {\n // Since `data.src` can be an element, parse out the string if necessary for the hash.\n data = utils.extendDeep({}, data);\n data.src = data.src.src;\n }\n return JSON.stringify(data);\n },\n\n hashVideo: function (data, videoEl) {\n return calculateVideoCacheHash(data, videoEl);\n },\n\n /**\n * Keep track of material in case an update trigger is needed (e.g., fog).\n *\n * @param {object} material\n */\n registerMaterial: function (material) {\n this.materials[material.uuid] = material;\n },\n\n /**\n * Stop tracking material, and dispose of any textures not being used by\n * another material component.\n *\n * @param {object} material\n */\n unregisterMaterial: function (material) {\n delete this.materials[material.uuid];\n\n // If any textures on this material are no longer in use, dispose of them.\n var textureCounts = this.textureCounts;\n Object.keys(material)\n .filter(function (propName) {\n return material[propName] && material[propName].isTexture;\n })\n .forEach(function (mapName) {\n textureCounts[material[mapName].uuid]--;\n if (textureCounts[material[mapName].uuid] <= 0) {\n material[mapName].dispose();\n }\n });\n },\n\n /**\n * Trigger update to all registered materials.\n */\n updateMaterials: function (material) {\n var materials = this.materials;\n Object.keys(materials).forEach(function (uuid) {\n materials[uuid].needsUpdate = true;\n });\n },\n\n /**\n * Track textures used by material components, so that they can be safely\n * disposed when no longer in use. Textures must be registered here, and not\n * through registerMaterial(), because textures may not be attached at the\n * time the material is registered.\n *\n * @param {Event} e\n */\n onMaterialTextureLoaded: function (e) {\n if (!this.textureCounts[e.detail.texture.uuid]) {\n this.textureCounts[e.detail.texture.uuid] = 0;\n }\n this.textureCounts[e.detail.texture.uuid]++;\n }\n});\n\n/**\n * Calculates consistent hash from a video element using its attributes.\n * If the video element has an ID, use that.\n * Else build a hash that looks like `src:myvideo.mp4;height:200;width:400;`.\n *\n * @param data {object} - Texture data such as repeat.\n * @param videoEl {Element} - Video element.\n * @returns {string}\n */\nfunction calculateVideoCacheHash (data, videoEl) {\n var i;\n var id = videoEl.getAttribute('id');\n var hash;\n var videoAttributes;\n\n if (id) { return id; }\n\n // Calculate hash using sorted video attributes.\n hash = '';\n videoAttributes = data || {};\n for (i = 0; i < videoEl.attributes.length; i++) {\n videoAttributes[videoEl.attributes[i].name] = videoEl.attributes[i].value;\n }\n Object.keys(videoAttributes).sort().forEach(function (name) {\n hash += name + ':' + videoAttributes[name] + ';';\n });\n\n return hash;\n}\n\n/**\n * Load image texture.\n *\n * @private\n * @param {string|object} src - An <img> element or url to an image file.\n * @param {object} data - Data to set texture properties like `repeat`.\n * @returns {Promise} Resolves once texture is loaded.\n */\nfunction loadImageTexture (src, data) {\n return new Promise(doLoadImageTexture);\n\n function doLoadImageTexture (resolve, reject) {\n var isEl = typeof src !== 'string';\n\n function resolveTexture (texture) {\n setTextureProperties(texture, data);\n texture.needsUpdate = true;\n resolve(texture);\n }\n\n // Create texture from an element.\n if (isEl) {\n resolveTexture(new THREE.Texture(src));\n return;\n }\n\n // Request and load texture from src string. THREE will create underlying element.\n // Use THREE.TextureLoader (src, onLoad, onProgress, onError) to load texture.\n TextureLoader.load(\n src,\n resolveTexture,\n function () { /* no-op */ },\n function (xhr) {\n error('`$s` could not be fetched (Error code: %s; Response: %s)', xhr.status,\n xhr.statusText);\n }\n );\n }\n}\n\n/**\n * Set texture properties such as repeat and offset.\n *\n * @param {object} data - With keys like `repeat`.\n */\nfunction setTextureProperties (texture, data) {\n var offset = data.offset || {x: 0, y: 0};\n var repeat = data.repeat || {x: 1, y: 1};\n var npot = data.npot || false;\n\n // To support NPOT textures, wrap must be ClampToEdge (not Repeat),\n // and filters must not use mipmaps (i.e. Nearest or Linear).\n if (npot) {\n texture.wrapS = THREE.ClampToEdgeWrapping;\n texture.wrapT = THREE.ClampToEdgeWrapping;\n texture.magFilter = THREE.LinearFilter;\n texture.minFilter = THREE.LinearFilter;\n }\n\n // Don't bother setting repeat if it is 1/1. Power-of-two is required to repeat.\n if (repeat.x !== 1 || repeat.y !== 1) {\n texture.wrapS = THREE.RepeatWrapping;\n texture.wrapT = THREE.RepeatWrapping;\n texture.repeat.set(repeat.x, repeat.y);\n }\n // Don't bother setting offset if it is 0/0.\n if (offset.x !== 0 || offset.y !== 0) {\n texture.offset.set(offset.x, offset.y);\n }\n}\n\n/**\n * Create video element to be used as a texture.\n *\n * @param {string} src - Url to a video file.\n * @param {number} width - Width of the video.\n * @param {number} height - Height of the video.\n * @returns {Element} Video element.\n */\nfunction createVideoEl (src, width, height) {\n var videoEl = document.createElement('video');\n videoEl.width = width;\n videoEl.height = height;\n // Support inline videos for iOS webviews.\n videoEl.setAttribute('playsinline', '');\n videoEl.setAttribute('webkit-playsinline', '');\n videoEl.autoplay = true;\n videoEl.loop = true;\n videoEl.crossOrigin = 'anonymous';\n videoEl.addEventListener('error', function () {\n warn('`$s` is not a valid video', src);\n }, true);\n videoEl.src = src;\n return videoEl;\n}\n\n/**\n * Fixes a video element's attributes to prevent developers from accidentally passing the\n * wrong attribute values to commonly misused video attributes.\n *\n * <video> does not treat `autoplay`, `controls`, `crossorigin`, `loop`, and `preload` as\n * as booleans. Existence of those attributes will mean truthy.\n *\n * For example, translates <video loop=\"false\"> to <video>.\n *\n * @see https://developer.mozilla.org/docs/Web/HTML/Element/video#Attributes\n * @param {Element} videoEl - Video element.\n * @returns {Element} Video element with the correct properties updated.\n */\nfunction fixVideoAttributes (videoEl) {\n videoEl.autoplay = videoEl.hasAttribute('autoplay') && videoEl.getAttribute('autoplay') !== 'false';\n videoEl.controls = videoEl.hasAttribute('controls') && videoEl.getAttribute('controls') !== 'false';\n if (videoEl.getAttribute('loop') === 'false') {\n videoEl.removeAttribute('loop');\n }\n if (videoEl.getAttribute('preload') === 'false') {\n videoEl.preload = 'none';\n }\n videoEl.crossOrigin = videoEl.crossOrigin || 'anonymous';\n // To support inline videos in iOS webviews.\n videoEl.setAttribute('playsinline', '');\n videoEl.setAttribute('webkit-playsinline', '');\n return videoEl;\n}\n\n},{\"../core/system\":142,\"../lib/three\":179,\"../utils/\":205,\"../utils/material\":209}],194:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar utils = _dereq_('../utils/');\nvar THREE = _dereq_('../lib/three');\n\nvar debug = utils.debug;\nvar warn = debug('components:renderer:warn');\n\n/**\n * Determines state of various renderer properties.\n */\nmodule.exports.System = registerSystem('renderer', {\n schema: {\n antialias: {default: 'auto', oneOf: ['true', 'false', 'auto']},\n highRefreshRate: {default: utils.device.isOculusBrowser()},\n logarithmicDepthBuffer: {default: 'auto', oneOf: ['true', 'false', 'auto']},\n maxCanvasWidth: {default: 1920},\n maxCanvasHeight: {default: 1920},\n physicallyCorrectLights: {default: false},\n precision: {default: 'high', oneOf: ['high', 'medium', 'low']},\n sortObjects: {default: false},\n colorManagement: {default: false},\n gammaOutput: {default: false},\n alpha: {default: true},\n foveationLevel: {default: 0}\n },\n\n init: function () {\n var data = this.data;\n var sceneEl = this.el;\n // This is the rendering engine, such as THREE.js so copy over any persistent properties from the rendering system.\n var renderer = sceneEl.renderer;\n renderer.sortObjects = data.sortObjects;\n renderer.physicallyCorrectLights = data.physicallyCorrectLights;\n\n if (data.colorManagement || data.gammaOutput) {\n renderer.outputEncoding = THREE.sRGBEncoding;\n if (data.gammaOutput) {\n warn('Property `gammaOutput` is deprecated. Use `renderer=\"colorManagement: true;\"` instead.');\n }\n }\n\n if (sceneEl.hasAttribute('antialias')) {\n warn('Component `antialias` is deprecated. Use `renderer=\"antialias: true\"` instead.');\n }\n\n if (sceneEl.hasAttribute('logarithmicDepthBuffer')) {\n warn('Component `logarithmicDepthBuffer` is deprecated. Use `renderer=\"logarithmicDepthBuffer: true\"` instead.');\n }\n },\n\n applyColorCorrection: function (colorOrTexture) {\n if (!this.data.colorManagement || !colorOrTexture) {\n return;\n } else if (colorOrTexture.isColor) {\n colorOrTexture.convertSRGBToLinear();\n } else if (colorOrTexture.isTexture) {\n colorOrTexture.encoding = THREE.sRGBEncoding;\n }\n }\n});\n\n},{\"../core/system\":142,\"../lib/three\":179,\"../utils/\":205}],195:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar THREE = _dereq_('../lib/three');\n\nvar SHADOW_MAP_TYPE_MAP = {\n basic: THREE.BasicShadowMap,\n pcf: THREE.PCFShadowMap,\n pcfsoft: THREE.PCFSoftShadowMap\n};\n\n/**\n * Shadow system.\n *\n * Enabled automatically when one or more shadow components are added to the scene, the system sets\n * options on the WebGLRenderer for configuring shadow appearance.\n */\nmodule.exports.System = registerSystem('shadow', {\n schema: {\n enabled: {default: true},\n autoUpdate: {default: true},\n type: {default: 'pcf', oneOf: ['basic', 'pcf', 'pcfsoft']}\n },\n\n init: function () {\n var sceneEl = this.sceneEl;\n var data = this.data;\n\n this.shadowMapEnabled = false;\n\n if (!sceneEl.renderer) { return; } // For tests.\n\n sceneEl.renderer.shadowMap.type = SHADOW_MAP_TYPE_MAP[data.type];\n sceneEl.renderer.shadowMap.autoUpdate = data.autoUpdate;\n this.setShadowMapEnabled(this.shadowMapEnabled);\n },\n\n update: function (prevData) {\n if (prevData.enabled !== this.data.enabled) {\n this.setShadowMapEnabled(this.data.enabled);\n }\n },\n\n /**\n * Enables/disables the renderer shadow map.\n * @param {boolean} enabled\n */\n setShadowMapEnabled: function (enabled) {\n var renderer = this.sceneEl.renderer;\n this.shadowMapEnabled = this.data.enabled && enabled;\n if (renderer) {\n renderer.shadowMap.enabled = this.shadowMapEnabled;\n }\n }\n});\n\n},{\"../core/system\":142,\"../lib/three\":179}],196:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar utils = _dereq_('../utils');\nvar isWebXRAvailable = utils.device.isWebXRAvailable;\n\n/**\n * Tracked controls system.\n * Maintain list with available tracked controllers.\n */\nmodule.exports.System = registerSystem('tracked-controls-webvr', {\n init: function () {\n var self = this;\n\n this.controllers = [];\n this.isChrome = navigator.userAgent.indexOf('Chrome') !== -1;\n\n this.updateControllerList();\n this.throttledUpdateControllerList = utils.throttle(this.updateControllerList, 500, this);\n\n // Don't use WebVR if WebXR is available?\n if (isWebXRAvailable) { return; }\n\n if (!navigator.getVRDisplays) { return; }\n\n this.sceneEl.addEventListener('enter-vr', function () {\n navigator.getVRDisplays().then(function (displays) {\n if (displays.length) { self.vrDisplay = displays[0]; }\n });\n });\n },\n\n tick: function () {\n if (this.isChrome) {\n // Retrieve new controller handlers with updated state (pose, buttons...)\n this.updateControllerList();\n } else {\n this.throttledUpdateControllerList();\n }\n },\n\n /**\n * Update controller list.\n */\n updateControllerList: function () {\n var controllers = this.controllers;\n var gamepad;\n var gamepads;\n var i;\n var prevCount;\n\n gamepads = navigator.getGamepads && navigator.getGamepads();\n if (!gamepads) { return; }\n\n prevCount = controllers.length;\n controllers.length = 0;\n for (i = 0; i < gamepads.length; ++i) {\n gamepad = gamepads[i];\n if (gamepad && gamepad.pose) {\n controllers.push(gamepad);\n }\n }\n\n if (controllers.length !== prevCount) {\n this.el.emit('controllersupdated', undefined, false);\n }\n }\n});\n\n},{\"../core/system\":142,\"../utils\":205}],197:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\nvar utils = _dereq_('../utils');\n\n/**\n * Tracked controls system.\n * Maintain list with available tracked controllers.\n */\nmodule.exports.System = registerSystem('tracked-controls-webxr', {\n init: function () {\n this.controllers = [];\n this.oldControllers = [];\n this.oldControllersLength = 0;\n this.throttledUpdateControllerList = utils.throttle(this.updateControllerList, 500, this);\n this.updateReferenceSpace = this.updateReferenceSpace.bind(this);\n this.el.addEventListener('enter-vr', this.updateReferenceSpace);\n this.el.addEventListener('exit-vr', this.updateReferenceSpace);\n },\n\n tick: function () {\n this.throttledUpdateControllerList();\n },\n\n updateReferenceSpace: function () {\n var self = this;\n var xrSession = this.el.xrSession;\n\n if (!xrSession) {\n this.referenceSpace = undefined;\n this.controllers = [];\n if (this.oldControllersLength > 0) {\n this.oldControllersLength = 0;\n this.el.emit('controllersupdated', undefined, false);\n }\n return;\n }\n var refspace = self.el.sceneEl.systems.webxr.sessionReferenceSpaceType;\n xrSession.requestReferenceSpace(refspace).then(function (referenceSpace) {\n self.referenceSpace = referenceSpace;\n }).catch(function (err) {\n self.el.sceneEl.systems.webxr.warnIfFeatureNotRequested(\n refspace,\n 'tracked-controls-webxr uses reference space \"' + refspace + '\".');\n throw err;\n });\n },\n\n updateControllerList: function () {\n var xrSession = this.el.xrSession;\n var oldControllers = this.oldControllers;\n var i;\n if (!xrSession) {\n if (this.oldControllersLength === 0) { return; }\n // Broadcast that we now have zero controllers connected if there is\n // no session\n this.oldControllersLength = 0;\n this.controllers = [];\n this.el.emit('controllersupdated', undefined, false);\n return;\n }\n\n if (!xrSession.inputSources) { return; }\n this.controllers = xrSession.inputSources;\n if (this.oldControllersLength === this.controllers.length) {\n var equal = true;\n for (i = 0; i < this.controllers.length; ++i) {\n if (this.controllers[i] === oldControllers[i] &&\n this.controllers[i].gamepad === oldControllers[i].gamepad) { continue; }\n equal = false;\n break;\n }\n if (equal) { return; }\n }\n\n // Store reference to current controllers\n oldControllers.length = 0;\n for (i = 0; i < this.controllers.length; i++) {\n oldControllers.push(this.controllers[i]);\n }\n\n this.oldControllersLength = this.controllers.length;\n this.el.emit('controllersupdated', undefined, false);\n }\n});\n\n},{\"../core/system\":142,\"../utils\":205}],198:[function(_dereq_,module,exports){\nvar registerSystem = _dereq_('../core/system').registerSystem;\n\nvar utils = _dereq_('../utils/');\nvar warn = utils.debug('systems:webxr:warn');\n\n/**\n * WebXR session initialization and XR module support.\n */\nmodule.exports.System = registerSystem('webxr', {\n schema: {\n referenceSpaceType: {type: 'string', default: 'local-floor'},\n requiredFeatures: {type: 'array', default: ['local-floor']},\n optionalFeatures: {type: 'array', default: ['bounded-floor']},\n overlayElement: {type: 'selector'}\n },\n\n update: function () {\n var data = this.data;\n this.sessionConfiguration = {\n requiredFeatures: data.requiredFeatures,\n optionalFeatures: data.optionalFeatures\n };\n this.sessionReferenceSpaceType = data.referenceSpaceType;\n\n if (data.overlayElement) {\n this.warnIfFeatureNotRequested('dom-overlay');\n this.sessionConfiguration.domOverlay = {root: data.overlayElement};\n }\n },\n\n wasFeatureRequested: function (feature) {\n // Features available by default for immersive sessions don't need to\n // be requested explicitly.\n if (feature === 'viewer' || feature === 'local') return true;\n\n if (this.sessionConfiguration.requiredFeatures.includes(feature) ||\n this.sessionConfiguration.optionalFeatures.includes(feature)) {\n return true;\n }\n\n return false;\n },\n\n warnIfFeatureNotRequested: function (feature, optIntro) {\n if (!this.wasFeatureRequested(feature)) {\n var msg = 'Please add the feature \"' + feature + '\" to a-scene\\'s ' +\n 'webxr system options in requiredFeatures/optionalFeatures.';\n warn((optIntro ? optIntro + ' ' : '') + msg);\n }\n }\n});\n\n},{\"../core/system\":142,\"../utils/\":205}],199:[function(_dereq_,module,exports){\n/**\n * Faster version of Function.prototype.bind\n * @param {Function} fn - Function to wrap.\n * @param {Object} ctx - What to bind as context.\n * @param {...*} arguments - Arguments to pass through.\n */\nmodule.exports = function bind (fn, ctx/* , arg1, arg2 */) {\n return (function (prependedArgs) {\n return function bound () {\n // Concat the bound function arguments with those passed to original bind\n var args = prependedArgs.concat(Array.prototype.slice.call(arguments, 0));\n return fn.apply(ctx, args);\n };\n })(Array.prototype.slice.call(arguments, 2));\n};\n\n},{}],200:[function(_dereq_,module,exports){\n/* global THREE */\nvar debug = _dereq_('./debug');\nvar extend = _dereq_('object-assign');\n\nvar warn = debug('utils:coordinates:warn');\n\n// Order of coordinates parsed by coordinates.parse.\nvar COORDINATE_KEYS = ['x', 'y', 'z', 'w'];\n\n// Coordinate string regex. Handles negative, positive, and decimals.\nvar regex = /^\\s*((-?\\d*\\.{0,1}\\d+(e-?\\d+)?)\\s+){2,3}(-?\\d*\\.{0,1}\\d+(e-?\\d+)?)\\s*$/;\nmodule.exports.regex = regex;\n\nvar OBJECT = 'object';\nvar whitespaceRegex = /\\s+/g;\n\n/**\n * Parses coordinates from an \"x y z\" string.\n * Example: \"3 10 -5\" to {x: 3, y: 10, z: -5}.\n *\n * @param {string} val - An \"x y z\" string.\n * @param {string} defaults - fallback value.\n * @returns {object} An object with keys [x, y, z].\n */\nfunction parse (value, defaultVec) {\n var coordinate;\n var defaultVal;\n var key;\n var i;\n var vec;\n var x;\n var y;\n var z;\n var w;\n\n if (value && value instanceof Object) {\n x = value.x === undefined ? defaultVec && defaultVec.x : value.x;\n y = value.y === undefined ? defaultVec && defaultVec.y : value.y;\n z = value.z === undefined ? defaultVec && defaultVec.z : value.z;\n w = value.w === undefined ? defaultVec && defaultVec.w : value.w;\n if (x !== undefined && x !== null) { value.x = parseIfString(x); }\n if (y !== undefined && y !== null) { value.y = parseIfString(y); }\n if (z !== undefined && z !== null) { value.z = parseIfString(z); }\n if (w !== undefined && w !== null) { value.w = parseIfString(w); }\n return value;\n }\n\n if (value === null || value === undefined) {\n return typeof defaultVec === OBJECT ? extend({}, defaultVec) : defaultVec;\n }\n\n coordinate = value.trim().split(whitespaceRegex);\n vec = {};\n for (i = 0; i < COORDINATE_KEYS.length; i++) {\n key = COORDINATE_KEYS[i];\n if (coordinate[i]) {\n vec[key] = parseFloat(coordinate[i], 10);\n } else {\n defaultVal = defaultVec && defaultVec[key];\n if (defaultVal === undefined) { continue; }\n vec[key] = parseIfString(defaultVal);\n }\n }\n return vec;\n}\nmodule.exports.parse = parse;\n\n/**\n * Stringify coordinates from an object with keys [x y z].\n * Example: {x: 3, y: 10, z: -5} to \"3 10 -5\".\n *\n * @param {object|string} data - An object with keys [x y z].\n * @returns {string} An \"x y z\" string.\n */\nfunction stringify (data) {\n var str;\n if (typeof data !== OBJECT) { return data; }\n str = data.x + ' ' + data.y;\n if (data.z != null) { str += ' ' + data.z; }\n if (data.w != null) { str += ' ' + data.w; }\n return str;\n}\nmodule.exports.stringify = stringify;\n\n/**\n * @returns {bool}\n */\nfunction isCoordinates (value) {\n return regex.test(value);\n}\nmodule.exports.isCoordinates = isCoordinates;\n\nmodule.exports.isCoordinate = function (value) {\n warn('`AFRAME.utils.isCoordinate` has been renamed to `AFRAME.utils.isCoordinates`');\n return isCoordinates(value);\n};\n\nfunction parseIfString (val) {\n if (val !== null && val !== undefined && val.constructor === String) {\n return parseFloat(val, 10);\n }\n return val;\n}\n\n/**\n * Convert {x, y, z} object to three.js Vector3.\n */\nmodule.exports.toVector3 = function (vec3) {\n return new THREE.Vector3(vec3.x, vec3.y, vec3.z);\n};\n\n},{\"./debug\":201,\"object-assign\":39}],201:[function(_dereq_,module,exports){\n(function (process){\nvar debugLib = _dereq_('debug');\nvar extend = _dereq_('object-assign');\n\nvar settings = {\n colors: {\n debug: 'gray',\n error: 'red',\n info: 'gray',\n warn: 'orange'\n }\n};\n\n/**\n * Monkeypatches `debug` so we can colorize error/warning messages.\n *\n * (See issue: https://github.com/visionmedia/debug/issues/137)\n */\nvar debug = function (namespace) {\n var d = debugLib(namespace);\n\n d.color = getDebugNamespaceColor(namespace);\n\n return d;\n};\nextend(debug, debugLib);\n\n/**\n * Returns the type of the namespace (e.g., `error`, `warn`).\n *\n * @param {String} namespace\n * The debug logger's namespace (e.g., `components:geometry:warn`).\n * @returns {String} The type of the namespace (e.g., `warn`).\n * @api private\n */\nfunction getDebugNamespaceType (namespace) {\n var chunks = namespace.split(':');\n\n return chunks[chunks.length - 1]; // Return the last one\n}\n\n/**\n * Returns the color of the namespace (e.g., `orange`).\n *\n * @param {String} namespace\n * The debug logger's namespace (e.g., `components:geometry:warn`).\n * @returns {String} The color of the namespace (e.g., `orange`).\n * @api private\n */\nfunction getDebugNamespaceColor (namespace) {\n var type = getDebugNamespaceType(namespace);\n\n var color = settings.colors && settings.colors[type];\n\n return color || null;\n}\n\n/**\n * Returns `localStorage` if possible.\n *\n * This is necessary because Safari throws when a user disables\n * cookies or `localStorage` and you attempt to access it.\n *\n * @returns {localStorage}\n * @api private\n */\nfunction storage () {\n try {\n return window.localStorage;\n } catch (e) {\n }\n}\n\n/**\n * To enable console logging, type this in the Console of your Dev Tools:\n *\n * localStorage.logs = 1\n *\n * To disable console logging:\n *\n * localStorage.logs = 0\n *\n */\nvar ls = storage();\nif (ls && (parseInt(ls.logs, 10) || ls.logs === 'true')) {\n debug.enable('*');\n} else {\n debug.enable('*:error,*:info,*:warn');\n}\n\nif (process.browser) { window.logs = debug; }\n\nmodule.exports = debug;\n\n}).call(this,_dereq_('_process'))\n\n},{\"_process\":49,\"debug\":8,\"object-assign\":39}],202:[function(_dereq_,module,exports){\n(function (process){\nvar error = _dereq_('debug')('device:error');\n\nvar vrDisplay;\nvar supportsVRSession = false;\nvar supportsARSession = false;\n\n/**\n * Oculus Browser 7 doesn't support the WebXR gamepads module.\n * We fallback to WebVR API and will hotfix when implementation is complete.\n */\nvar isWebXRAvailable = module.exports.isWebXRAvailable = !window.debug && navigator.xr !== undefined;\n\n// Catch vrdisplayactivate early to ensure we can enter VR mode after the scene loads.\nwindow.addEventListener('vrdisplayactivate', function (evt) {\n var canvasEl;\n // WebXR takes priority if available.\n if (isWebXRAvailable) { return; }\n canvasEl = document.createElement('canvas');\n vrDisplay = evt.display;\n // We need to make sure the canvas has a WebGL context associated with it.\n // Otherwise, the requestPresent could be denied.\n canvasEl.getContext('webgl', {});\n // Request present immediately. a-scene will be allowed to enter VR without user gesture.\n vrDisplay.requestPresent([{source: canvasEl}]).then(function () {}, function () {});\n});\n\n// Support both WebVR and WebXR APIs.\nif (isWebXRAvailable) {\n var updateEnterInterfaces = function () {\n var sceneEl = document.querySelector('a-scene');\n if (!sceneEl) {\n window.addEventListener('DOMContentLoaded', updateEnterInterfaces);\n return;\n }\n if (sceneEl.hasLoaded) {\n sceneEl.components['vr-mode-ui'].updateEnterInterfaces();\n } else {\n sceneEl.addEventListener('loaded', updateEnterInterfaces);\n }\n };\n var errorHandler = function (err) {\n error('WebXR session support error: ' + err.message);\n };\n if (navigator.xr.isSessionSupported) {\n // Current WebXR spec uses a boolean-returning isSessionSupported promise\n navigator.xr.isSessionSupported('immersive-vr').then(function (supported) {\n supportsVRSession = supported;\n updateEnterInterfaces();\n }).catch(errorHandler);\n\n navigator.xr.isSessionSupported('immersive-ar').then(function (supported) {\n supportsARSession = supported;\n updateEnterInterfaces();\n }).catch(function () {});\n } else if (navigator.xr.supportsSession) {\n // Fallback for implementations that haven't updated to the new spec yet,\n // the old version used supportsSession which is rejected for missing\n // support.\n navigator.xr.supportsSession('immersive-vr').then(function () {\n supportsVRSession = true;\n updateEnterInterfaces();\n }).catch(errorHandler);\n navigator.xr.supportsSession('immersive-ar').then(function () {\n supportsARSession = true;\n updateEnterInterfaces();\n }).catch(function () {});\n } else {\n error('WebXR has neither isSessionSupported or supportsSession?!');\n }\n} else {\n if (navigator.getVRDisplays) {\n navigator.getVRDisplays().then(function (displays) {\n var sceneEl = document.querySelector('a-scene');\n vrDisplay = displays.length && displays[0];\n if (sceneEl) { sceneEl.emit('displayconnected', {vrDisplay: vrDisplay}); }\n });\n }\n}\n\nfunction getVRDisplay () { return vrDisplay; }\nmodule.exports.getVRDisplay = getVRDisplay;\n\n/**\n * Determine if a headset is connected by checking if a vrDisplay is available.\n */\nfunction checkHeadsetConnected () {\n return supportsVRSession || supportsARSession || !!getVRDisplay();\n}\nmodule.exports.checkHeadsetConnected = checkHeadsetConnected;\n\nfunction checkARSupport () { return supportsARSession; }\nmodule.exports.checkARSupport = checkARSupport;\n\n/**\n * Checks if browser is mobile and not stand-alone dedicated vr device.\n * @return {Boolean} True if mobile browser detected.\n */\nvar isMobile = (function () {\n var _isMobile = false;\n (function (a) {\n // eslint-disable-next-line no-useless-escape\n if (/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0, 4))) {\n _isMobile = true;\n }\n if (isIOS() || isTablet() || isR7()) {\n _isMobile = true;\n }\n if (isMobileVR()) {\n _isMobile = false;\n }\n })(window.navigator.userAgent || window.navigator.vendor || window.opera);\n\n return function () { return _isMobile; };\n})();\nmodule.exports.isMobile = isMobile;\n\n/**\n * Detect tablet devices.\n * @param {string} mockUserAgent - Allow passing a mock user agent for testing.\n */\nfunction isTablet (mockUserAgent) {\n var userAgent = mockUserAgent || window.navigator.userAgent;\n return /ipad|Nexus (7|9)|xoom|sch-i800|playbook|tablet|kindle/i.test(userAgent);\n}\nmodule.exports.isTablet = isTablet;\n\nfunction isIOS () {\n return /iPad|iPhone|iPod/.test(window.navigator.platform);\n}\nmodule.exports.isIOS = isIOS;\n\nfunction isMobileDeviceRequestingDesktopSite () {\n return !isMobile() && !isMobileVR() && window.orientation !== undefined;\n}\nmodule.exports.isMobileDeviceRequestingDesktopSite = isMobileDeviceRequestingDesktopSite;\n\n/**\n * Detect Oculus Browser (standalone headset)\n */\nfunction isOculusBrowser () {\n return /(OculusBrowser)/i.test(window.navigator.userAgent);\n}\nmodule.exports.isOculusBrowser = isOculusBrowser;\n\n/**\n * Detect Firefox Reality (standalone headset)\n */\nfunction isFirefoxReality () {\n return /(Mobile VR)/i.test(window.navigator.userAgent);\n}\nmodule.exports.isFirefoxReality = isFirefoxReality;\n\n/**\n * Detect browsers in Stand-Alone headsets\n */\nfunction isMobileVR () {\n return isOculusBrowser() || isFirefoxReality();\n}\nmodule.exports.isMobileVR = isMobileVR;\n\nfunction isR7 () {\n return /R7 Build/.test(window.navigator.userAgent);\n}\nmodule.exports.isR7 = isR7;\n\n/**\n * Checks mobile device orientation.\n * @return {Boolean} True if landscape orientation.\n */\nmodule.exports.isLandscape = function () {\n var orientation = window.orientation;\n if (isR7()) { orientation += 90; }\n return orientation === 90 || orientation === -90;\n};\n\n/**\n * Check if running in a browser or spoofed browser (bundler).\n * We need to check a node api that isn't mocked on either side.\n * `require` and `module.exports` are mocked in browser by bundlers.\n * `window` is mocked in node.\n * `process` is also mocked by browserify, but has custom properties.\n */\nmodule.exports.isBrowserEnvironment = !!(!process || process.browser);\n\n/**\n * Check if running in node on the server.\n */\nmodule.exports.isNodeEnvironment = !module.exports.isBrowserEnvironment;\n\n}).call(this,_dereq_('_process'))\n\n},{\"_process\":49,\"debug\":8}],203:[function(_dereq_,module,exports){\n/**\n * Split a delimited component property string (e.g., `material.color`) to an object\n * containing `component` name and `property` name. If there is no delimiter, just return the\n * string back.\n *\n * Cache arrays from splitting strings via delimiter to save on memory.\n *\n * @param {string} str - e.g., `material.opacity`.\n * @param {string} delimiter - e.g., `.`.\n * @returns {array} e.g., `['material', 'opacity']`.\n */\nvar propertyPathCache = {};\nfunction getComponentPropertyPath (str, delimiter) {\n delimiter = delimiter || '.';\n if (!propertyPathCache[delimiter]) { propertyPathCache[delimiter] = {}; }\n if (str.indexOf(delimiter) !== -1) {\n propertyPathCache[delimiter][str] = str.split(delimiter);\n } else {\n propertyPathCache[delimiter][str] = str;\n }\n return propertyPathCache[delimiter][str];\n}\nmodule.exports.getComponentPropertyPath = getComponentPropertyPath;\nmodule.exports.propertyPathCache = propertyPathCache;\n\n/**\n * Get component property using encoded component name + component property name with a\n * delimiter.\n */\nmodule.exports.getComponentProperty = function (el, name, delimiter) {\n var splitName;\n delimiter = delimiter || '.';\n if (name.indexOf(delimiter) !== -1) {\n splitName = getComponentPropertyPath(name, delimiter);\n if (splitName.constructor === String) {\n return el.getAttribute(splitName);\n }\n return el.getAttribute(splitName[0])[splitName[1]];\n }\n return el.getAttribute(name);\n};\n\n/**\n * Set component property using encoded component name + component property name with a\n * delimiter.\n */\nmodule.exports.setComponentProperty = function (el, name, value, delimiter) {\n var splitName;\n delimiter = delimiter || '.';\n if (name.indexOf(delimiter) !== -1) {\n splitName = getComponentPropertyPath(name, delimiter);\n if (splitName.constructor === String) {\n el.setAttribute(splitName, value);\n } else {\n el.setAttribute(splitName[0], splitName[1], value);\n }\n return;\n }\n el.setAttribute(name, value);\n};\n\n},{}],204:[function(_dereq_,module,exports){\nmodule.exports = function forceCanvasResizeSafariMobile (canvasEl) {\n var width = canvasEl.style.width;\n var height = canvasEl.style.height;\n // Taken from webvr-polyfill (https://github.com/borismus/webvr-polyfill/blob/85f657cd502ec9417bf26b87c3cb2afa6a70e079/src/util.js#L200)\n // iOS only workaround for https://bugs.webkit.org/show_bug.cgi?id=152556\n // By changing the size 1 pixel and restoring the previous value\n // we trigger a size recalculation cycle.\n canvasEl.style.width = (parseInt(width, 10) + 1) + 'px';\n canvasEl.style.height = (parseInt(height, 10) + 1) + 'px';\n setTimeout(function () {\n canvasEl.style.width = width;\n canvasEl.style.height = height;\n }, 200);\n};\n\n},{}],205:[function(_dereq_,module,exports){\n/* global location */\n\n/* Centralized place to reference utilities since utils is exposed to the user. */\nvar debug = _dereq_('./debug');\nvar deepAssign = _dereq_('deep-assign');\nvar device = _dereq_('./device');\nvar objectAssign = _dereq_('object-assign');\nvar objectPool = _dereq_('./object-pool');\n\nvar warn = debug('utils:warn');\n\nmodule.exports.bind = _dereq_('./bind');\nmodule.exports.coordinates = _dereq_('./coordinates');\nmodule.exports.debug = debug;\nmodule.exports.device = device;\nmodule.exports.entity = _dereq_('./entity');\nmodule.exports.forceCanvasResizeSafariMobile = _dereq_('./forceCanvasResizeSafariMobile');\nmodule.exports.isIE11 = _dereq_('./is-ie11');\nmodule.exports.material = _dereq_('./material');\nmodule.exports.objectPool = objectPool;\nmodule.exports.split = _dereq_('./split').split;\nmodule.exports.styleParser = _dereq_('./styleParser');\nmodule.exports.trackedControls = _dereq_('./tracked-controls');\n\nmodule.exports.checkHeadsetConnected = function () {\n warn('`utils.checkHeadsetConnected` has moved to `utils.device.checkHeadsetConnected`');\n return device.checkHeadsetConnected(arguments);\n};\nmodule.exports.isGearVR = module.exports.device.isGearVR = function () {\n warn('`utils.isGearVR` has been deprecated, use `utils.device.isMobileVR`');\n};\nmodule.exports.isIOS = function () {\n warn('`utils.isIOS` has moved to `utils.device.isIOS`');\n return device.isIOS(arguments);\n};\nmodule.exports.isOculusGo = module.exports.device.isOculusGo = function () {\n warn('`utils.isOculusGo` has been deprecated, use `utils.device.isMobileVR`');\n};\nmodule.exports.isMobile = function () {\n warn('`utils.isMobile has moved to `utils.device.isMobile`');\n return device.isMobile(arguments);\n};\n\n/**\n * Returns throttle function that gets called at most once every interval.\n *\n * @param {function} functionToThrottle\n * @param {number} minimumInterval - Minimal interval between calls (milliseconds).\n * @param {object} optionalContext - If given, bind function to throttle to this context.\n * @returns {function} Throttled function.\n */\nmodule.exports.throttle = function (functionToThrottle, minimumInterval, optionalContext) {\n var lastTime;\n if (optionalContext) {\n functionToThrottle = module.exports.bind(functionToThrottle, optionalContext);\n }\n return function () {\n var time = Date.now();\n var sinceLastTime = typeof lastTime === 'undefined' ? minimumInterval : time - lastTime;\n if (typeof lastTime === 'undefined' || (sinceLastTime >= minimumInterval)) {\n lastTime = time;\n functionToThrottle.apply(null, arguments);\n }\n };\n};\n\n/**\n * Returns throttle function that gets called at most once every interval.\n * Uses the time/timeDelta timestamps provided by the global render loop for better perf.\n *\n * @param {function} functionToThrottle\n * @param {number} minimumInterval - Minimal interval between calls (milliseconds).\n * @param {object} optionalContext - If given, bind function to throttle to this context.\n * @returns {function} Throttled function.\n */\nmodule.exports.throttleTick = function (functionToThrottle, minimumInterval, optionalContext) {\n var lastTime;\n if (optionalContext) {\n functionToThrottle = module.exports.bind(functionToThrottle, optionalContext);\n }\n return function (time, delta) {\n var sinceLastTime = typeof lastTime === 'undefined' ? delta : time - lastTime;\n if (typeof lastTime === 'undefined' || (sinceLastTime >= minimumInterval)) {\n lastTime = time;\n functionToThrottle(time, sinceLastTime);\n }\n };\n};\n\n/**\n * Returns debounce function that gets called only once after a set of repeated calls.\n *\n * @param {function} functionToDebounce\n * @param {number} wait - Time to wait for repeated function calls (milliseconds).\n * @param {boolean} immediate - Calls the function immediately regardless of if it should be waiting.\n * @returns {function} Debounced function.\n */\nmodule.exports.debounce = function (func, wait, immediate) {\n var timeout;\n return function () {\n var context = this;\n var args = arguments;\n var later = function () {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n};\n\n/**\n * Mix the properties of source object(s) into a destination object.\n *\n * @param {object} dest - The object to which properties will be copied.\n * @param {...object} source - The object(s) from which properties will be copied.\n */\nmodule.exports.extend = objectAssign;\nmodule.exports.extendDeep = deepAssign;\n\nmodule.exports.clone = function (obj) {\n return JSON.parse(JSON.stringify(obj));\n};\n\n/**\n * Checks if two values are equal.\n * Includes objects and arrays and nested objects and arrays.\n * Try to keep this function performant as it will be called often to see if a component\n * should be updated.\n *\n * @param {object} a - First object.\n * @param {object} b - Second object.\n * @returns {boolean} Whether two objects are deeply equal.\n */\nvar deepEqual = (function () {\n var arrayPool = objectPool.createPool(function () { return []; });\n\n return function (a, b) {\n var key;\n var keysA;\n var keysB;\n var i;\n var valA;\n var valB;\n\n // If not objects or arrays, compare as values.\n if (a === undefined || b === undefined || a === null || b === null ||\n !(a && b && (a.constructor === Object && b.constructor === Object) ||\n (a.constructor === Array && b.constructor === Array))) {\n return a === b;\n }\n\n // Different number of keys, not equal.\n keysA = arrayPool.use();\n keysB = arrayPool.use();\n keysA.length = 0;\n keysB.length = 0;\n for (key in a) { keysA.push(key); }\n for (key in b) { keysB.push(key); }\n if (keysA.length !== keysB.length) {\n arrayPool.recycle(keysA);\n arrayPool.recycle(keysB);\n return false;\n }\n\n // Return `false` at the first sign of inequality.\n for (i = 0; i < keysA.length; ++i) {\n valA = a[keysA[i]];\n valB = b[keysA[i]];\n // Check nested array and object.\n if ((typeof valA === 'object' || typeof valB === 'object') ||\n (Array.isArray(valA) && Array.isArray(valB))) {\n if (valA === valB) { continue; }\n if (!deepEqual(valA, valB)) {\n arrayPool.recycle(keysA);\n arrayPool.recycle(keysB);\n return false;\n }\n } else if (valA !== valB) {\n arrayPool.recycle(keysA);\n arrayPool.recycle(keysB);\n return false;\n }\n }\n\n arrayPool.recycle(keysA);\n arrayPool.recycle(keysB);\n return true;\n };\n})();\nmodule.exports.deepEqual = deepEqual;\n\n/**\n * Computes the difference between two objects.\n *\n * @param {object} a - First object to compare (e.g., oldData).\n * @param {object} b - Second object to compare (e.g., newData).\n * @returns {object}\n * Difference object where set of keys note which values were not equal, and values are\n * `b`'s values.\n */\nmodule.exports.diff = (function () {\n var keys = [];\n\n return function (a, b, targetObject) {\n var aVal;\n var bVal;\n var bKey;\n var diff;\n var key;\n var i;\n var isComparingObjects;\n\n diff = targetObject || {};\n\n // Collect A keys.\n keys.length = 0;\n for (key in a) { keys.push(key); }\n\n if (!b) { return diff; }\n\n // Collect B keys.\n for (bKey in b) {\n if (keys.indexOf(bKey) === -1) {\n keys.push(bKey);\n }\n }\n\n for (i = 0; i < keys.length; i++) {\n key = keys[i];\n aVal = a[key];\n bVal = b[key];\n isComparingObjects = aVal && bVal &&\n aVal.constructor === Object && bVal.constructor === Object;\n if ((isComparingObjects && !deepEqual(aVal, bVal)) ||\n (!isComparingObjects && aVal !== bVal)) {\n diff[key] = bVal;\n }\n }\n return diff;\n };\n})();\n\n/**\n * Returns whether we should capture this keyboard event for keyboard shortcuts.\n * @param {Event} event Event object.\n * @returns {Boolean} Whether the key event should be captured.\n */\nmodule.exports.shouldCaptureKeyEvent = function (event) {\n if (event.metaKey) { return false; }\n return document.activeElement === document.body;\n};\n\n/**\n * Splits a string into an array based on a delimiter.\n *\n * @param {string=} [str=''] Source string\n * @param {string=} [delimiter=' '] Delimiter to use\n * @returns {array} Array of delimited strings\n */\nmodule.exports.splitString = function (str, delimiter) {\n if (typeof delimiter === 'undefined') { delimiter = ' '; }\n // First collapse the whitespace (or whatever the delimiter is).\n var regex = new RegExp(delimiter, 'g');\n str = (str || '').replace(regex, delimiter);\n // Then split.\n return str.split(delimiter);\n};\n\n/**\n * Extracts data from the element given an object that contains expected keys.\n *\n * @param {Element} Source element.\n * @param {Object} [defaults={}] Object of default key-value pairs.\n * @returns {Object}\n */\nmodule.exports.getElData = function (el, defaults) {\n defaults = defaults || {};\n var data = {};\n Object.keys(defaults).forEach(copyAttribute);\n function copyAttribute (key) {\n if (el.hasAttribute(key)) {\n data[key] = el.getAttribute(key);\n }\n }\n return data;\n};\n\n/**\n * Retrieves querystring value.\n * @param {String} name Name of querystring key.\n * @return {String} Value\n */\nmodule.exports.getUrlParameter = function (name) {\n // eslint-disable-next-line no-useless-escape\n name = name.replace(/[\\[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\n var regex = new RegExp('[\\\\?&]' + name + '=([^&#]*)');\n var results = regex.exec(location.search);\n return results === null ? '' : decodeURIComponent(results[1].replace(/\\+/g, ' '));\n};\n\n/**\n * Detects whether context is within iframe.\n */\nmodule.exports.isIframed = function () {\n return window.top !== window.self;\n};\n\n/**\n * Finds all elements under the element that have the isScene\n * property set to true\n */\nmodule.exports.findAllScenes = function (el) {\n var matchingElements = [];\n var allElements = el.getElementsByTagName('*');\n for (var i = 0, n = allElements.length; i < n; i++) {\n if (allElements[i].isScene) {\n // Element exists with isScene set.\n matchingElements.push(allElements[i]);\n }\n }\n return matchingElements;\n};\n\n// Must be at bottom to avoid circular dependency.\nmodule.exports.srcLoader = _dereq_('./src-loader');\n\n},{\"./bind\":199,\"./coordinates\":200,\"./debug\":201,\"./device\":202,\"./entity\":203,\"./forceCanvasResizeSafariMobile\":204,\"./is-ie11\":207,\"./material\":209,\"./object-pool\":210,\"./split\":211,\"./src-loader\":212,\"./styleParser\":213,\"./tracked-controls\":214,\"deep-assign\":10,\"object-assign\":39}],206:[function(_dereq_,module,exports){\n// Safari regression introduced in iOS 12 and remains in iOS 13.\n// https://stackoverflow.com/questions/62717621/white-space-at-page-bottom-after-device-rotation-in-ios-safari\nwindow.addEventListener('orientationchange', function () {\n document.documentElement.style.height = `initial`;\n setTimeout(function () {\n document.documentElement.style.height = `100%`;\n setTimeout(function () {\n // this line prevents the content\n // from hiding behind the address bar\n window.scrollTo(0, 1);\n }, 500);\n }, 500);\n});\n\n},{}],207:[function(_dereq_,module,exports){\n// https://stackoverflow.com/a/17907562\nfunction getInternetExplorerVersion () {\n var version = -1;\n var userAgent = navigator.userAgent;\n var re;\n if (navigator.appName === 'Microsoft Internet Explorer') {\n re = new RegExp('MSIE ([0-9]{1,}[\\\\.0-9]{0,})');\n if (re.exec(userAgent) != null) { version = parseFloat(RegExp.$1); }\n } else if (navigator.appName === 'Netscape') {\n re = new RegExp('Trident/.*rv:([0-9]{1,}[\\\\.0-9]{0,})');\n if (re.exec(userAgent) != null) { version = parseFloat(RegExp.$1); }\n }\n return version;\n}\n\nmodule.exports = getInternetExplorerVersion() === 11;\n\n},{}],208:[function(_dereq_,module,exports){\n/**\n * Check if device is iOS and older than version 10.\n */\nmodule.exports = function isIOSOlderThan10 (userAgent) {\n return /(iphone|ipod|ipad).*os.(7_|8_|9_)/i.test(userAgent);\n};\n\n},{}],209:[function(_dereq_,module,exports){\nvar THREE = _dereq_('../lib/three');\n\nvar HLS_MIMETYPES = ['application/x-mpegurl', 'application/vnd.apple.mpegurl'];\n\nvar COLOR_MAPS = new Set([\n 'emissiveMap',\n 'envMap',\n 'map',\n 'specularMap'\n]);\n\n/**\n * Update `material` texture property (usually but not always `map`)\n * from `data` property (usually but not always `src`)\n *\n * @param {object} shader - A-Frame shader instance.\n * @param {object} data\n */\nmodule.exports.updateMapMaterialFromData = function (materialName, dataName, shader, data) {\n var el = shader.el;\n var material = shader.material;\n var rendererSystem = el.sceneEl.systems.renderer;\n var src = data[dataName];\n\n // Because a single material / shader may have multiple textures,\n // we need to remember the source value for this data property\n // to avoid redundant operations which can be expensive otherwise\n // (e.g. video texture loads).\n if (!shader.materialSrcs) { shader.materialSrcs = {}; }\n\n if (!src) {\n // Forget the prior material src.\n delete shader.materialSrcs[materialName];\n // Remove the texture.\n setMap(null);\n return;\n }\n\n // Don't process if material src hasn't changed.\n if (src === shader.materialSrcs[materialName]) { return; }\n\n // Remember the new src for this texture (there may be multiple).\n shader.materialSrcs[materialName] = src;\n\n // If the new material src is already a texture, just use it.\n if (src instanceof THREE.Texture) { setMap(src); } else {\n // Load texture for the new material src.\n // (And check if we should still use it once available in callback.)\n el.sceneEl.systems.material.loadTexture(src,\n {src: src, repeat: data.repeat, offset: data.offset, npot: data.npot},\n checkSetMap);\n }\n\n function checkSetMap (texture) {\n // If the source has been changed, don't use loaded texture.\n if (shader.materialSrcs[materialName] !== src) { return; }\n setMap(texture);\n }\n\n function setMap (texture) {\n material[materialName] = texture;\n if (texture && COLOR_MAPS.has(materialName)) {\n rendererSystem.applyColorCorrection(texture);\n }\n material.needsUpdate = true;\n handleTextureEvents(el, texture);\n }\n};\n\n/**\n * Update `material.map` given `data.src`. For standard and flat shaders.\n *\n * @param {object} shader - A-Frame shader instance.\n * @param {object} data\n */\nmodule.exports.updateMap = function (shader, data) {\n return module.exports.updateMapMaterialFromData('map', 'src', shader, data);\n};\n\n/**\n * Updates the material's maps which give the illusion of extra geometry.\n *\n * @param {string} longType - The friendly name of the map from the component e.g. ambientOcclusionMap becomes aoMap in THREE.js\n * @param {object} shader - A-Frame shader instance\n * @param {object} data\n */\nmodule.exports.updateDistortionMap = function (longType, shader, data) {\n var shortType = longType;\n if (longType === 'ambientOcclusion') { shortType = 'ao'; }\n var el = shader.el;\n var material = shader.material;\n var rendererSystem = el.sceneEl.systems.renderer;\n var src = data[longType + 'Map'];\n var info = {};\n info.src = src;\n\n // Pass through the repeat and offset to be handled by the material loader.\n info.offset = data[longType + 'TextureOffset'];\n info.repeat = data[longType + 'TextureRepeat'];\n info.wrap = data[longType + 'TextureWrap'];\n\n if (src) {\n if (src === shader[longType + 'TextureSrc']) { return; }\n\n // Texture added or changed.\n shader[longType + 'TextureSrc'] = src;\n el.sceneEl.systems.material.loadTexture(src, info, setMap);\n return;\n }\n\n // Texture removed.\n if (!material.map) { return; }\n setMap(null);\n\n function setMap (texture) {\n var slot = shortType + 'Map';\n material[slot] = texture;\n if (texture && COLOR_MAPS.has(slot)) {\n rendererSystem.applyColorCorrection(texture);\n }\n material.needsUpdate = true;\n handleTextureEvents(el, texture);\n }\n};\n\n/**\n * Emit event on entities on texture-related events.\n *\n * @param {Element} el - Entity.\n * @param {object} texture - three.js Texture.\n */\nfunction handleTextureEvents (el, texture) {\n if (!texture) { return; }\n\n el.emit('materialtextureloaded', {src: texture.image, texture: texture});\n\n // Video events.\n if (!texture.image || texture.image.tagName !== 'VIDEO') { return; }\n\n texture.image.addEventListener('loadeddata', function emitVideoTextureLoadedDataAll () {\n // Check to see if we need to use iOS 10 HLS shader.\n // Only override the shader if it is stock shader that we know doesn't correct.\n if (!el.components || !el.components.material) { return; }\n\n if (texture.needsCorrectionBGRA && texture.needsCorrectionFlipY &&\n ['standard', 'flat'].indexOf(el.components.material.data.shader) !== -1) {\n el.setAttribute('material', 'shader', 'ios10hls');\n }\n\n el.emit('materialvideoloadeddata', {src: texture.image, texture: texture});\n });\n texture.image.addEventListener('ended', function emitVideoTextureEndedAll () {\n // Works for non-looping videos only.\n el.emit('materialvideoended', {src: texture.image, texture: texture});\n });\n}\nmodule.exports.handleTextureEvents = handleTextureEvents;\n\n/**\n * Given video element src and type, guess whether stream is HLS.\n *\n * @param {string} src - src from video element (generally URL to content).\n * @param {string} type - type from video element (generally MIME type if present).\n */\nmodule.exports.isHLS = function (src, type) {\n if (type && HLS_MIMETYPES.includes(type.toLowerCase())) { return true; }\n if (src && src.toLowerCase().indexOf('.m3u8') > 0) { return true; }\n return false;\n};\n\n},{\"../lib/three\":179}],210:[function(_dereq_,module,exports){\n/*\n Adapted deePool by Kyle Simpson.\n MIT License: http://getify.mit-license.org\n*/\nvar EMPTY_SLOT = Object.freeze(Object.create(null));\n\n// Default object factory.\nfunction defaultObjectFactory () { return {}; }\n\n/**\n * Create a new pool.\n */\nmodule.exports.createPool = function createPool (objectFactory) {\n var objPool = [];\n var nextFreeSlot = null; // Pool location to look for a free object to use.\n\n objectFactory = objectFactory || defaultObjectFactory;\n\n function use () {\n var objToUse;\n if (nextFreeSlot === null || nextFreeSlot === objPool.length) {\n grow(objPool.length || 5);\n }\n objToUse = objPool[nextFreeSlot];\n objPool[nextFreeSlot++] = EMPTY_SLOT;\n clearObject(objToUse);\n return objToUse;\n }\n\n function recycle (obj) {\n if (!(obj instanceof Object)) { return; }\n if (nextFreeSlot === null || nextFreeSlot === -1) {\n objPool[objPool.length] = obj;\n return;\n }\n objPool[--nextFreeSlot] = obj;\n }\n\n function grow (count) {\n var currentLength;\n var i;\n\n count = count === undefined ? objPool.length : count;\n if (count > 0 && nextFreeSlot == null) {\n nextFreeSlot = 0;\n }\n\n if (count > 0) {\n currentLength = objPool.length;\n objPool.length += Number(count);\n for (i = currentLength; i < objPool.length; i++) {\n // Add new obj to pool.\n objPool[i] = objectFactory();\n }\n }\n\n return objPool.length;\n }\n\n function size () {\n return objPool.length;\n }\n\n return {\n grow: grow,\n pool: objPool,\n recycle: recycle,\n size: size,\n use: use\n };\n};\n\nfunction clearObject (obj) {\n var key;\n if (!obj || obj.constructor !== Object) { return; }\n for (key in obj) { obj[key] = undefined; }\n}\nmodule.exports.clearObject = clearObject;\n\nfunction removeUnusedKeys (obj, schema) {\n var key;\n if (!obj || obj.constructor !== Object) { return; }\n for (key in obj) {\n if (!(key in schema)) {\n delete obj[key];\n }\n }\n}\nmodule.exports.removeUnusedKeys = removeUnusedKeys;\n\n},{}],211:[function(_dereq_,module,exports){\n/**\n * String split with cached result.\n */\nmodule.exports.split = (function () {\n var splitCache = {};\n\n return function (str, delimiter) {\n if (!(delimiter in splitCache)) { splitCache[delimiter] = {}; }\n\n if (str in splitCache[delimiter]) { return splitCache[delimiter][str]; }\n\n splitCache[delimiter][str] = str.split(delimiter);\n return splitCache[delimiter][str];\n };\n})();\n\n},{}],212:[function(_dereq_,module,exports){\n/* global Image, XMLHttpRequest */\nvar debug = _dereq_('./debug');\n\nvar warn = debug('utils:src-loader:warn');\n\n/**\n * Validate a texture, either as a selector or as a URL.\n * Detects whether `src` is pointing to an image or video and invokes the appropriate\n * callback.\n *\n * `src` will be passed into the callback\n *\n * @params {string|Element} src - URL or media element.\n * @params {function} isImageCb - callback if texture is an image.\n * @params {function} isVideoCb - callback if texture is a video.\n */\nfunction validateSrc (src, isImageCb, isVideoCb) {\n checkIsImage(src, function isAnImageUrl (isImage) {\n if (isImage) {\n isImageCb(src);\n return;\n }\n isVideoCb(src);\n });\n}\n\n/**\n * Validates six images as a cubemap, either as selector or comma-separated\n * URLs.\n *\n * @param {string} src - A selector or comma-separated image URLs. Image URLs\n must be wrapped by `url()`.\n * @param {string} src - A selector or comma-separated image URLs. Image URLs\n must be wrapped by `url()`.\n */\nfunction validateCubemapSrc (src, cb) {\n var aCubemap;\n var cubemapSrcRegex = '';\n var i;\n var urls;\n var validatedUrls = [];\n\n for (i = 0; i < 5; i++) {\n cubemapSrcRegex += '(url\\\\((?:[^\\\\)]+)\\\\),\\\\s*)';\n }\n cubemapSrcRegex += '(url\\\\((?:[^\\\\)]+)\\\\)\\\\s*)';\n urls = src.match(new RegExp(cubemapSrcRegex));\n\n // `src` is a comma-separated list of URLs.\n // In this case, re-use validateSrc for each side of the cube.\n function isImageCb (url) {\n validatedUrls.push(url);\n if (validatedUrls.length === 6) {\n cb(validatedUrls);\n }\n }\n if (urls) {\n for (i = 1; i < 7; i++) {\n validateSrc(parseUrl(urls[i]), isImageCb);\n }\n return;\n }\n\n // `src` is a query selector to <a-cubemap> containing six $([src])s.\n aCubemap = validateAndGetQuerySelector(src);\n if (!aCubemap) { return; }\n if (aCubemap.tagName === 'A-CUBEMAP' && aCubemap.srcs) {\n return cb(aCubemap.srcs);\n }\n // Else if aCubeMap is not a <a-cubemap>.\n warn('Selector \"%s\" does not point to <a-cubemap>', src);\n}\n\n/**\n * Parses src from `url(src)`.\n * @param {string} src - String to parse.\n * @return {string} The parsed src, if parseable.\n */\nfunction parseUrl (src) {\n var parsedSrc = src.match(/\\url\\((.+)\\)/);\n if (!parsedSrc) { return; }\n return parsedSrc[1];\n}\n\n/**\n * Call back whether `src` is an image.\n *\n * @param {string|Element} src - URL or element that will be tested.\n * @param {function} onResult - Callback with whether `src` is an image.\n */\nfunction checkIsImage (src, onResult) {\n var request;\n\n if (src.tagName) {\n onResult(src.tagName === 'IMG');\n return;\n }\n request = new XMLHttpRequest();\n\n // Try to send HEAD request to check if image first.\n request.open('HEAD', src);\n request.addEventListener('load', function (event) {\n var contentType;\n if (request.status >= 200 && request.status < 300) {\n contentType = request.getResponseHeader('Content-Type');\n if (contentType == null) {\n checkIsImageFallback(src, onResult);\n } else {\n if (contentType.startsWith('image')) {\n onResult(true);\n } else {\n onResult(false);\n }\n }\n } else {\n checkIsImageFallback(src, onResult);\n }\n request.abort();\n });\n request.send();\n}\n\nfunction checkIsImageFallback (src, onResult) {\n var tester = new Image();\n tester.addEventListener('load', onLoad);\n function onLoad () { onResult(true); }\n tester.addEventListener('error', onError);\n function onError () { onResult(false); }\n tester.src = src;\n}\n\n/**\n * Query and validate a query selector,\n *\n * @param {string} selector - DOM selector.\n * @return {object|null|undefined} Selected DOM element if exists.\n null if query yields no results.\n undefined if `selector` is not a valid selector.\n */\nfunction validateAndGetQuerySelector (selector) {\n try {\n var el = document.querySelector(selector);\n if (!el) {\n warn('No element was found matching the selector: \"%s\"', selector);\n }\n return el;\n } catch (e) { // Capture exception if it's not a valid selector.\n warn('\"%s\" is not a valid selector', selector);\n return undefined;\n }\n}\n\nmodule.exports = {\n parseUrl: parseUrl,\n validateSrc: validateSrc,\n validateCubemapSrc: validateCubemapSrc\n};\n\n},{\"./debug\":201}],213:[function(_dereq_,module,exports){\n/**\n * Utils for parsing style-like strings (e.g., \"primitive: box; width: 5; height: 4.5\").\n * Some code adapted from `style-attr` (https://github.com/joshwnj/style-attr)\n * by Josh Johnston (MIT License).\n */\nvar DASH_REGEX = /-([a-z])/g;\n\n/**\n * Deserialize style-like string into an object of properties.\n *\n * @param {string} value - HTML attribute value.\n * @param {object} obj - Reused object for object pooling.\n * @returns {object} Property data.\n */\nmodule.exports.parse = function (value, obj) {\n var parsedData;\n if (typeof value !== 'string') { return value; }\n parsedData = styleParse(value, obj);\n // The style parser returns an object { \"\" : \"test\"} when fed a string\n if (parsedData['']) { return value; }\n return transformKeysToCamelCase(parsedData);\n};\n\n/**\n * Serialize an object of properties into a style-like string.\n *\n * @param {object} data - Property data.\n * @returns {string}\n */\nmodule.exports.stringify = function (data) {\n if (typeof data === 'string') { return data; }\n return styleStringify(data);\n};\n\n/**\n * Converts string from hyphen to camelCase.\n *\n * @param {string} str - String to camelCase.\n * @return {string} CamelCased string.\n */\nfunction toCamelCase (str) {\n return str.replace(DASH_REGEX, upperCase);\n}\nmodule.exports.toCamelCase = toCamelCase;\n\n/**\n * Converts object's keys from hyphens to camelCase (e.g., `max-value` to\n * `maxValue`).\n *\n * @param {object} obj - The object to camelCase keys.\n * @return {object} The object with keys camelCased.\n */\nfunction transformKeysToCamelCase (obj) {\n var camelKey;\n var key;\n for (key in obj) {\n camelKey = toCamelCase(key);\n if (key === camelKey) { continue; }\n obj[camelKey] = obj[key];\n delete obj[key];\n }\n return obj;\n}\nmodule.exports.transformKeysToCamelCase = transformKeysToCamelCase;\n\n/**\n * Split a string into chunks matching `<key>: <value>`\n */\nvar getKeyValueChunks = (function () {\n var chunks = [];\n var hasUnclosedUrl = /url\\([^)]+$/;\n\n return function getKeyValueChunks (raw) {\n var chunk = '';\n var nextSplit;\n var offset = 0;\n var sep = ';';\n\n chunks.length = 0;\n\n while (offset < raw.length) {\n nextSplit = raw.indexOf(sep, offset);\n if (nextSplit === -1) { nextSplit = raw.length; }\n\n chunk += raw.substring(offset, nextSplit);\n\n // data URIs can contain semicolons, so make sure we get the whole thing\n if (hasUnclosedUrl.test(chunk)) {\n chunk += ';';\n offset = nextSplit + 1;\n continue;\n }\n\n chunks.push(chunk.trim());\n chunk = '';\n offset = nextSplit + 1;\n }\n\n return chunks;\n };\n})();\n\n/**\n * Convert a style attribute string to an object.\n *\n * @param {object} str - Attribute string.\n * @param {object} obj - Object to reuse as a base, else a new one will be allocated.\n */\nfunction styleParse (str, obj) {\n var chunks;\n var i;\n var item;\n var pos;\n var key;\n var val;\n\n obj = obj || {};\n\n chunks = getKeyValueChunks(str);\n for (i = 0; i < chunks.length; i++) {\n item = chunks[i];\n if (!item) { continue; }\n // Split with `.indexOf` rather than `.split` because the value may also contain colons.\n pos = item.indexOf(':');\n key = item.substr(0, pos).trim();\n val = item.substr(pos + 1).trim();\n obj[key] = val;\n }\n return obj;\n}\n\n/**\n * Convert an object into an attribute string\n **/\nfunction styleStringify (obj) {\n var key;\n var keyCount = 0;\n var i = 0;\n var str = '';\n\n for (key in obj) { keyCount++; }\n\n for (key in obj) {\n str += (key + ': ' + obj[key]);\n if (i < keyCount - 1) { str += '; '; }\n i++;\n }\n return str;\n}\n\nfunction upperCase (str) { return str[1].toUpperCase(); }\n\n},{}],214:[function(_dereq_,module,exports){\nvar DEFAULT_HANDEDNESS = _dereq_('../constants').DEFAULT_HANDEDNESS;\nvar AXIS_LABELS = ['x', 'y', 'z', 'w'];\nvar NUM_HANDS = 2; // Number of hands in a pair. Should always be 2.\n\n/**\n * Called on controller component `.play` handlers.\n * Check if controller matches parameters and inject tracked-controls component.\n * Handle event listeners.\n * Generate controllerconnected or controllerdisconnected events.\n *\n * @param {object} component - Tracked controls component.\n * @param {object} idPrefix - Prefix to match in gamepad id if any.\n * @param {object} queryObject - Map of values to match.\n */\nmodule.exports.checkControllerPresentAndSetup = function (component, idPrefix, queryObject) {\n var el = component.el;\n var controller;\n var hasWebXR = el.sceneEl.hasWebXR;\n var isControllerPresent = hasWebXR ? isControllerPresentWebXR : isControllerPresentWebVR;\n var isPresent;\n\n controller = isControllerPresent(component, idPrefix, queryObject);\n isPresent = !!controller;\n\n // If component was previously paused and now playing, re-add event listeners.\n // Handle the event listeners here since this helper method is control of calling\n // `.addEventListeners` and `.removeEventListeners`.\n if (component.controllerPresent && !component.controllerEventsActive && !hasWebXR) {\n component.addEventListeners();\n }\n\n // Nothing changed, no need to do anything.\n if (isPresent === component.controllerPresent) { return isPresent; }\n\n component.controllerPresent = isPresent;\n\n // Update controller presence.\n if (isPresent) {\n component.addEventListeners();\n component.injectTrackedControls(controller);\n el.emit('controllerconnected', {name: component.name, component: component});\n } else {\n component.removeEventListeners();\n el.emit('controllerdisconnected', {name: component.name, component: component});\n }\n};\n\n/**\n * Enumerate controller (that have pose) and check if they match parameters for WebVR\n *\n * @param {object} component - Tracked controls component.\n * @param {object} idPrefix - Prefix to match in gamepad id if any.\n * @param {object} queryObject - Map of values to match.\n */\nfunction isControllerPresentWebVR (component, idPrefix, queryObject) {\n var gamepads;\n var sceneEl = component.el.sceneEl;\n var trackedControlsSystem;\n var filterControllerIndex = queryObject.index || 0;\n\n if (!idPrefix) { return false; }\n\n trackedControlsSystem = sceneEl && sceneEl.systems['tracked-controls-webvr'];\n if (!trackedControlsSystem) { return false; }\n\n gamepads = trackedControlsSystem.controllers;\n if (!gamepads.length) { return false; }\n\n return !!findMatchingControllerWebVR(gamepads, null, idPrefix, queryObject.hand,\n filterControllerIndex);\n}\n\n/**\n *\n * @param {object} component - Tracked controls component.\n */\nfunction isControllerPresentWebXR (component, id, queryObject) {\n var controllers;\n var sceneEl = component.el.sceneEl;\n var trackedControlsSystem = sceneEl && sceneEl.systems['tracked-controls-webxr'];\n if (!trackedControlsSystem) { return false; }\n\n controllers = trackedControlsSystem.controllers;\n if (!controllers || !controllers.length) { return false; }\n\n return findMatchingControllerWebXR(\n controllers, id,\n queryObject.hand, queryObject.index, queryObject.iterateControllerProfiles, queryObject.handTracking);\n}\n\nmodule.exports.isControllerPresentWebVR = isControllerPresentWebVR;\nmodule.exports.isControllerPresentWebXR = isControllerPresentWebXR;\n\n/**\n * Walk through the given controllers to find any where the device ID equals\n * filterIdExact, or startsWith filterIdPrefix.\n * A controller where this considered true is considered a 'match'.\n *\n * For each matching controller:\n * If filterHand is set, and the controller:\n * is handed, we further verify that controller.hand equals filterHand.\n * is unhanded (controller.hand is ''), we skip until we have found a\n * number of matching controllers that equals filterControllerIndex\n * If filterHand is not set, we skip until we have found the nth matching\n * controller, where n equals filterControllerIndex\n *\n * The method should be called with one of: [filterIdExact, filterIdPrefix] AND\n * one or both of: [filterHand, filterControllerIndex]\n *\n * @param {object} controllers - Array of gamepads to search\n * @param {string} filterIdExact - If set, used to find controllers with id === this value\n * @param {string} filterIdPrefix - If set, used to find controllers with id startsWith this value\n * @param {object} filterHand - If set, further filters controllers with matching 'hand' property\n * @param {object} filterControllerIndex - Find the nth matching controller,\n * where n equals filterControllerIndex. defaults to 0.\n */\nfunction findMatchingControllerWebVR (controllers, filterIdExact, filterIdPrefix, filterHand,\n filterControllerIndex) {\n var controller;\n var i;\n var matchingControllerOccurence = 0;\n var targetControllerMatch = filterControllerIndex >= 0 ? filterControllerIndex : 0;\n\n for (i = 0; i < controllers.length; i++) {\n controller = controllers[i];\n\n // Determine if the controller ID matches our criteria.\n if (filterIdPrefix && !controller.id.startsWith(filterIdPrefix)) {\n continue;\n }\n\n if (!filterIdPrefix && controller.id !== filterIdExact) { continue; }\n\n // If the hand filter and controller handedness are defined we compare them.\n if (filterHand && controller.hand && filterHand !== controller.hand) { continue; }\n\n // If we have detected an unhanded controller and the component was asking\n // for a particular hand, we need to treat the controllers in the array as\n // pairs of controllers. This effectively means that we need to skip\n // NUM_HANDS matches for each controller number, instead of 1.\n if (filterHand && !controller.hand) {\n targetControllerMatch = NUM_HANDS * filterControllerIndex + ((filterHand === DEFAULT_HANDEDNESS) ? 0 : 1);\n } else {\n return controller;\n }\n\n // We are looking for the nth occurence of a matching controller\n // (n equals targetControllerMatch).\n if (matchingControllerOccurence === targetControllerMatch) { return controller; }\n ++matchingControllerOccurence;\n }\n return undefined;\n}\n\nfunction findMatchingControllerWebXR (controllers, idPrefix, handedness, index, iterateProfiles, handTracking) {\n var i;\n var j;\n var controller;\n var controllerMatch = false;\n var controllerHasHandedness;\n var profiles;\n for (i = 0; i < controllers.length; i++) {\n controller = controllers[i];\n profiles = controller.profiles;\n if (handTracking) {\n controllerMatch = controller.hand;\n } else {\n if (iterateProfiles) {\n for (j = 0; j < profiles.length; j++) {\n controllerMatch = profiles[j].startsWith(idPrefix);\n if (controllerMatch) { break; }\n }\n } else {\n controllerMatch = profiles.length > 0 && profiles[0].startsWith(idPrefix);\n }\n }\n if (!controllerMatch) { continue; }\n // Vive controllers are assigned handedness at runtime and it might not be always available.\n controllerHasHandedness = controller.handedness === 'right' || controller.handedness === 'left';\n if (controllerHasHandedness) {\n if (controller.handedness === handedness) { return controllers[i]; }\n } else { // Fallback to index if controller has no handedness.\n if ((i === index)) { return controllers[i]; }\n }\n }\n return undefined;\n}\n\nmodule.exports.findMatchingControllerWebVR = findMatchingControllerWebVR;\nmodule.exports.findMatchingControllerWebXR = findMatchingControllerWebXR;\n\n/**\n * Emit specific `moved` event(s) if axes changed based on original axismoved event.\n *\n * @param {object} component - Controller component in use.\n * @param {array} axesMapping - For example `{thumbstick: [0, 1]}`.\n * @param {object} evt - Event to process.\n */\nmodule.exports.emitIfAxesChanged = function (component, axesMapping, evt) {\n var axes;\n var buttonType;\n var changed;\n var detail;\n var j;\n\n for (buttonType in axesMapping) {\n axes = axesMapping[buttonType];\n\n changed = false;\n for (j = 0; j < axes.length; j++) {\n if (evt.detail.changed[axes[j]]) { changed = true; }\n }\n\n if (!changed) { continue; }\n\n // Axis has changed. Emit the specific moved event with axis values in detail.\n detail = {};\n for (j = 0; j < axes.length; j++) {\n detail[AXIS_LABELS[j]] = evt.detail.axis[axes[j]];\n }\n component.el.emit(buttonType + 'moved', detail);\n }\n};\n\n/**\n * Handle a button event and reemits the events.\n *\n * @param {string} id - id of the button.\n * @param {string} evtName - name of the reemitted event\n * @param {object} component - reference to the component\n * @param {string} hand - handedness of the controller: left or right.\n */\nmodule.exports.onButtonEvent = function (id, evtName, component, hand) {\n var mapping = hand ? component.mapping[hand] : component.mapping;\n var buttonName = mapping.buttons[id];\n component.el.emit(buttonName + evtName);\n if (component.updateModel) {\n component.updateModel(buttonName, evtName);\n }\n};\n\n},{\"../constants\":123}],215:[function(_dereq_,module,exports){\n/**\n * @author richt / http://richt.me\n * @author WestLangley / http://github.com/WestLangley\n *\n * W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)\n */\n\nTHREE.DeviceOrientationControls = function ( object ) {\n\n var scope = this;\n\n this.object = object;\n this.object.rotation.reorder( 'YXZ' );\n\n this.enabled = true;\n\n this.deviceOrientation = {};\n this.screenOrientation = 0;\n\n this.alphaOffset = 0; // radians\n\n var onDeviceOrientationChangeEvent = function ( event ) {\n\n scope.deviceOrientation = event;\n\n };\n\n var onScreenOrientationChangeEvent = function () {\n\n scope.screenOrientation = window.orientation || 0;\n\n };\n\n // The angles alpha, beta and gamma form a set of intrinsic Tait-Bryan angles of type Z-X'-Y''\n\n var setObjectQuaternion = function () {\n\n var zee = new THREE.Vector3( 0, 0, 1 );\n\n var euler = new THREE.Euler();\n\n var q0 = new THREE.Quaternion();\n\n var q1 = new THREE.Quaternion( - Math.sqrt( 0.5 ), 0, 0, Math.sqrt( 0.5 ) ); // - PI/2 around the x-axis\n\n return function ( quaternion, alpha, beta, gamma, orient ) {\n\n euler.set( beta, alpha, - gamma, 'YXZ' ); // 'ZXY' for the device, but 'YXZ' for us\n\n quaternion.setFromEuler( euler ); // orient the device\n\n quaternion.multiply( q1 ); // camera looks out the back of the device, not the top\n\n quaternion.multiply( q0.setFromAxisAngle( zee, - orient ) ); // adjust for screen orientation\n\n };\n\n }();\n\n this.connect = function () {\n \n onScreenOrientationChangeEvent();\n\n window.addEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );\n window.addEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );\n\n scope.enabled = true;\n\n };\n\n this.disconnect = function () {\n\n window.removeEventListener( 'orientationchange', onScreenOrientationChangeEvent, false );\n window.removeEventListener( 'deviceorientation', onDeviceOrientationChangeEvent, false );\n\n scope.enabled = false;\n\n };\n\n this.update = function () {\n\n if ( scope.enabled === false ) return;\n\n var device = scope.deviceOrientation;\n\n if ( device ) {\n\n var alpha = device.alpha ? THREE.Math.degToRad( device.alpha ) + scope.alphaOffset : 0; // Z\n\n var beta = device.beta ? THREE.Math.degToRad( device.beta ) : 0; // X'\n\n var gamma = device.gamma ? THREE.Math.degToRad( device.gamma ) : 0; // Y''\n\n var orient = scope.screenOrientation ? THREE.Math.degToRad( scope.screenOrientation ) : 0; // O\n\n setObjectQuaternion( scope.object.quaternion, alpha, beta, gamma, orient );\n\n }\n\n\n };\n\n this.dispose = function () {\n\n scope.disconnect();\n\n };\n\n this.connect();\n\n};\n\n},{}],216:[function(_dereq_,module,exports){\nwindow.glStats = function () {\n\n var _rS = null;\n\n var _totalDrawArraysCalls = 0,\n _totalDrawElementsCalls = 0,\n _totalUseProgramCalls = 0,\n _totalFaces = 0,\n _totalVertices = 0,\n _totalPoints = 0,\n _totalBindTexures = 0;\n\n function _h ( f, c ) {\n return function () {\n c.apply( this, arguments );\n f.apply( this, arguments );\n };\n }\n\n WebGLRenderingContext.prototype.drawArrays = _h( WebGLRenderingContext.prototype.drawArrays, function () {\n _totalDrawArraysCalls++;\n if ( arguments[ 0 ] == this.POINTS ) _totalPoints += arguments[ 2 ];\n else _totalVertices += arguments[ 2 ];\n } );\n\n WebGLRenderingContext.prototype.drawElements = _h( WebGLRenderingContext.prototype.drawElements, function () {\n _totalDrawElementsCalls++;\n _totalFaces += arguments[ 1 ] / 3;\n _totalVertices += arguments[ 1 ];\n } );\n\n WebGLRenderingContext.prototype.useProgram = _h( WebGLRenderingContext.prototype.useProgram, function () {\n _totalUseProgramCalls++;\n } );\n\n WebGLRenderingContext.prototype.bindTexture = _h( WebGLRenderingContext.prototype.bindTexture, function () {\n _totalBindTexures++;\n } );\n\n var _values = {\n allcalls: {\n over: 3000,\n caption: 'Calls (hook)'\n },\n drawelements: {\n caption: 'drawElements (hook)'\n },\n drawarrays: {\n caption: 'drawArrays (hook)'\n }\n };\n\n var _groups = [ {\n caption: 'WebGL',\n values: [ 'allcalls', 'drawelements', 'drawarrays', 'useprogram', 'bindtexture', 'glfaces', 'glvertices', 'glpoints' ]\n } ];\n\n var _fractions = [ {\n base: 'allcalls',\n steps: [ 'drawelements', 'drawarrays' ]\n } ];\n\n function _update () {\n _rS( 'allcalls' ).set( _totalDrawArraysCalls + _totalDrawElementsCalls );\n _rS( 'drawElements' ).set( _totalDrawElementsCalls );\n _rS( 'drawArrays' ).set( _totalDrawArraysCalls );\n _rS( 'bindTexture' ).set( _totalBindTexures );\n _rS( 'useProgram' ).set( _totalUseProgramCalls );\n _rS( 'glfaces' ).set( _totalFaces );\n _rS( 'glvertices' ).set( _totalVertices );\n _rS( 'glpoints' ).set( _totalPoints );\n }\n\n function _start () {\n _totalDrawArraysCalls = 0;\n _totalDrawElementsCalls = 0;\n _totalUseProgramCalls = 0;\n _totalFaces = 0;\n _totalVertices = 0;\n _totalPoints = 0;\n _totalBindTexures = 0;\n }\n\n function _end () {}\n\n function _attach ( r ) {\n _rS = r;\n }\n\n return {\n update: _update,\n start: _start,\n end: _end,\n attach: _attach,\n values: _values,\n groups: _groups,\n fractions: _fractions\n };\n\n};\n\nwindow.threeStats = function ( renderer ) {\n\n var _rS = null;\n\n var _values = {\n 'renderer.info.memory.geometries': {\n caption: 'Geometries'\n },\n 'renderer.info.memory.textures': {\n caption: 'Textures'\n },\n 'renderer.info.programs': {\n caption: 'Programs'\n },\n 'renderer.info.render.calls': {\n caption: 'Calls'\n },\n 'renderer.info.render.triangles': {\n caption: 'Triangles',\n over: 1000\n },\n 'renderer.info.render.points': {\n caption: 'Points'\n }\n };\n\n var _groups = [ {\n caption: 'Three.js - Memory',\n values: [ 'renderer.info.memory.geometries', 'renderer.info.programs', 'renderer.info.memory.textures' ]\n }, {\n caption: 'Three.js - Render',\n values: [ 'renderer.info.render.calls', 'renderer.info.render.triangles', 'renderer.info.render.points' ]\n } ];\n\n var _fractions = [];\n\n function _update () {\n\n _rS( 'renderer.info.memory.geometries' ).set( renderer.info.memory.geometries );\n _rS( 'renderer.info.programs' ).set( renderer.info.programs.length );\n _rS( 'renderer.info.memory.textures' ).set( renderer.info.memory.textures );\n _rS( 'renderer.info.render.calls' ).set( renderer.info.render.calls );\n _rS( 'renderer.info.render.triangles' ).set( renderer.info.render.triangles );\n _rS( 'renderer.info.render.points' ).set( renderer.info.render.points );\n\n }\n\n function _start () {}\n\n function _end () {}\n\n function _attach ( r ) {\n _rS = r;\n }\n\n return {\n update: _update,\n start: _start,\n end: _end,\n attach: _attach,\n values: _values,\n groups: _groups,\n fractions: _fractions\n };\n\n};\n\n/*\n * From https://github.com/paulirish/memory-stats.js\n */\n\nwindow.BrowserStats = function () {\n\n var _rS = null;\n\n var _usedJSHeapSize = 0,\n _totalJSHeapSize = 0;\n\n if ( window.performance && !performance.memory ) {\n performance.memory = {\n usedJSHeapSize: 0,\n totalJSHeapSize: 0\n };\n }\n\n if ( performance.memory.totalJSHeapSize === 0 ) {\n console.warn( 'totalJSHeapSize === 0... performance.memory is only available in Chrome .' );\n }\n\n var _values = {\n memory: {\n caption: 'Used Memory',\n average: true,\n avgMs: 1000,\n over: 22\n },\n total: {\n caption: 'Total Memory'\n }\n };\n\n var _groups = [ {\n caption: 'Browser',\n values: [ 'memory', 'total' ]\n } ];\n\n var _fractions = [ {\n base: 'total',\n steps: [ 'memory' ]\n } ];\n\n var log1024 = Math.log( 1024 );\n\n function _size ( v ) {\n\n var precision = 100; //Math.pow(10, 2);\n var i = Math.floor( Math.log( v ) / log1024 );\n return Math.round( v * precision / Math.pow( 1024, i ) ) / precision; // + ' ' + sizes[i];\n\n }\n\n function _update () {\n _usedJSHeapSize = _size( performance.memory.usedJSHeapSize );\n _totalJSHeapSize = _size( performance.memory.totalJSHeapSize );\n\n _rS( 'memory' ).set( _usedJSHeapSize );\n _rS( 'total' ).set( _totalJSHeapSize );\n }\n\n function _start () {\n _usedJSHeapSize = 0;\n }\n\n function _end () {}\n\n function _attach ( r ) {\n _rS = r;\n }\n\n return {\n update: _update,\n start: _start,\n end: _end,\n attach: _attach,\n values: _values,\n groups: _groups,\n fractions: _fractions\n };\n\n};\n\nif (typeof module === 'object') {\n module.exports = {\n glStats: window.glStats,\n threeStats: window.threeStats,\n BrowserStats: window.BrowserStats\n };\n}\n\n},{}],217:[function(_dereq_,module,exports){\n// performance.now() polyfill from https://gist.github.com/paulirish/5438650\n'use strict';\n\n( function () {\n\n if ( 'performance' in window == false ) {\n window.performance = {};\n }\n\n var performance = window.performance;\n\n if ( 'now' in performance == false ) {\n\n var nowOffset = Date.now();\n\n if ( performance.timing && performance.timing.navigationStart ) {\n nowOffset = performance.timing.navigationStart;\n }\n\n performance.now = function now () {\n return Date.now() - nowOffset;\n };\n\n }\n\n if( !performance.mark ) {\n performance.mark = function(){}\n }\n\n if( !performance.measure ) {\n performance.measure = function(){}\n }\n\n} )();\n\nwindow.rStats = function rStats ( settings ) {\n\n function iterateKeys ( array, callback ) {\n var keys = Object.keys( array );\n for ( var j = 0, l = keys.length; j < l; j++ ) {\n callback( keys[ j ] );\n }\n }\n\n function importCSS ( url ) {\n\n var element = document.createElement( 'link' );\n element.href = url;\n element.rel = 'stylesheet';\n element.type = 'text/css';\n document.getElementsByTagName( 'head' )[ 0 ].appendChild( element );\n\n }\n\n var _settings = settings || {};\n var _colours = _settings.colours || [ '#850700', '#c74900', '#fcb300', '#284280', '#4c7c0c' ];\n\n var _cssFont = 'https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300';\n var _cssRStats = ( _settings.CSSPath ? _settings.CSSPath : '' ) + 'rStats.css';\n\n var _css = _settings.css || [ _cssFont, _cssRStats ];\n _css.forEach(function (uri) {\n importCSS( uri );\n });\n\n if ( !_settings.values ) _settings.values = {};\n\n var _base, _div, _elHeight = 10, _elWidth = 200;\n var _perfCounters = {};\n\n\n function Graph ( _dom, _id, _defArg ) {\n\n var _def = _defArg || {};\n var _canvas = document.createElement( 'canvas' ),\n _ctx = _canvas.getContext( '2d' ),\n _max = 0,\n _current = 0;\n\n var c = _def.color ? _def.color : '#666666';\n\n var _dotCanvas = document.createElement( 'canvas' ),\n _dotCtx = _dotCanvas.getContext( '2d' );\n _dotCanvas.width = 1;\n _dotCanvas.height = 2 * _elHeight;\n _dotCtx.fillStyle = '#444444';\n _dotCtx.fillRect( 0, 0, 1, 2 * _elHeight );\n _dotCtx.fillStyle = c;\n _dotCtx.fillRect( 0, _elHeight, 1, _elHeight );\n _dotCtx.fillStyle = '#ffffff';\n _dotCtx.globalAlpha = 0.5;\n _dotCtx.fillRect( 0, _elHeight, 1, 1 );\n _dotCtx.globalAlpha = 1;\n\n var _alarmCanvas = document.createElement( 'canvas' ),\n _alarmCtx = _alarmCanvas.getContext( '2d' );\n _alarmCanvas.width = 1;\n _alarmCanvas.height = 2 * _elHeight;\n _alarmCtx.fillStyle = '#444444';\n _alarmCtx.fillRect( 0, 0, 1, 2 * _elHeight );\n _alarmCtx.fillStyle = '#b70000';\n _alarmCtx.fillRect( 0, _elHeight, 1, _elHeight );\n _alarmCtx.globalAlpha = 0.5;\n _alarmCtx.fillStyle = '#ffffff';\n _alarmCtx.fillRect( 0, _elHeight, 1, 1 );\n _alarmCtx.globalAlpha = 1;\n\n function _init () {\n\n _canvas.width = _elWidth;\n _canvas.height = _elHeight;\n _canvas.style.width = _canvas.width + 'px';\n _canvas.style.height = _canvas.height + 'px';\n _canvas.className = 'rs-canvas';\n _dom.appendChild( _canvas );\n\n _ctx.fillStyle = '#444444';\n _ctx.fillRect( 0, 0, _canvas.width, _canvas.height );\n\n }\n\n function _draw ( v, alarm ) {\n _current += ( v - _current ) * 0.1;\n _max *= 0.99;\n if ( _current > _max ) _max = _current;\n _ctx.drawImage( _canvas, 1, 0, _canvas.width - 1, _canvas.height, 0, 0, _canvas.width - 1, _canvas.height );\n if ( alarm ) {\n _ctx.drawImage( _alarmCanvas, _canvas.width - 1, _canvas.height - _current * _canvas.height / _max - _elHeight );\n } else {\n _ctx.drawImage( _dotCanvas, _canvas.width - 1, _canvas.height - _current * _canvas.height / _max - _elHeight );\n }\n }\n\n _init();\n\n return {\n draw: _draw\n };\n\n }\n\n function StackGraph ( _dom, _num ) {\n\n var _canvas = document.createElement( 'canvas' ),\n _ctx = _canvas.getContext( '2d' );\n\n function _init () {\n\n _canvas.width = _elWidth;\n _canvas.height = _elHeight * _num;\n _canvas.style.width = _canvas.width + 'px';\n _canvas.style.height = _canvas.height + 'px';\n _canvas.className = 'rs-canvas';\n _dom.appendChild( _canvas );\n\n _ctx.fillStyle = '#444444';\n _ctx.fillRect( 0, 0, _canvas.width, _canvas.height );\n\n }\n\n function _draw ( v ) {\n _ctx.drawImage( _canvas, 1, 0, _canvas.width - 1, _canvas.height, 0, 0, _canvas.width - 1, _canvas.height );\n var th = 0;\n iterateKeys( v, function ( j ) {\n var h = v[ j ] * _canvas.height;\n _ctx.fillStyle = _colours[ j ];\n _ctx.fillRect( _canvas.width - 1, th, 1, h );\n th += h;\n } );\n }\n\n _init();\n\n return {\n draw: _draw\n };\n\n }\n\n function PerfCounter ( id, group ) {\n\n var _id = id,\n _time,\n _value = 0,\n _total = 0,\n _averageValue = 0,\n _accumValue = 0,\n _accumStart = performance.now(),\n _accumSamples = 0,\n _dom = document.createElement( 'div' ),\n _spanId = document.createElement( 'span' ),\n _spanValue = document.createElement( 'div' ),\n _spanValueText = document.createTextNode( '' ),\n _def = _settings ? _settings.values[ _id.toLowerCase() ] : null,\n _graph = new Graph( _dom, _id, _def ),\n _started = false;\n\n _spanId.className = 'rs-counter-id';\n _spanId.textContent = ( _def && _def.caption ) ? _def.caption : _id;\n\n _spanValue.className = 'rs-counter-value';\n _spanValue.appendChild( _spanValueText );\n\n _dom.appendChild( _spanId );\n _dom.appendChild( _spanValue );\n if ( group ) group.div.appendChild( _dom );\n else _div.appendChild( _dom );\n\n _time = performance.now();\n\n function _average ( v ) {\n if ( _def && _def.average ) {\n _accumValue += v;\n _accumSamples++;\n var t = performance.now();\n if ( t - _accumStart >= ( _def.avgMs || 1000 ) ) {\n _averageValue = _accumValue / _accumSamples;\n _accumValue = 0;\n _accumStart = t;\n _accumSamples = 0;\n }\n }\n }\n\n function _start () {\n _time = performance.now();\n if( _settings.userTimingAPI ) performance.mark( _id + '-start' );\n _started = true;\n }\n\n function _end () {\n _value = performance.now() - _time;\n if( _settings.userTimingAPI ) {\n performance.mark( _id + '-end' );\n if( _started ) {\n performance.measure( _id, _id + '-start', _id + '-end' );\n }\n }\n _average( _value );\n }\n\n function _tick () {\n _end();\n _start();\n }\n\n function _draw () {\n var v = ( _def && _def.average ) ? _averageValue : _value;\n _spanValueText.nodeValue = Math.round( v * 100 ) / 100;\n var a = ( _def && ( ( _def.below && _value < _def.below ) || ( _def.over && _value > _def.over ) ) );\n _graph.draw( _value, a );\n _dom.className = a ? 'rs-counter-base alarm' : 'rs-counter-base';\n\n }\n\n function _frame () {\n var t = performance.now();\n var e = t - _time;\n _total++;\n if ( e > 1000 ) {\n if ( _def && _def.interpolate === false ) {\n _value = _total;\n } else {\n _value = _total * 1000 / e;\n }\n _total = 0;\n _time = t;\n _average( _value );\n }\n }\n\n function _set ( v ) {\n _value = v;\n _average( _value );\n }\n\n return {\n set: _set,\n start: _start,\n tick: _tick,\n end: _end,\n frame: _frame,\n value: function () {\n return _value;\n },\n draw: _draw\n };\n\n }\n\n function sample () {\n\n var _value = 0;\n\n function _set ( v ) {\n _value = v;\n }\n\n return {\n set: _set,\n value: function () {\n return _value;\n }\n };\n\n }\n\n function _perf ( idArg ) {\n\n var id = idArg.toLowerCase();\n if ( id === undefined ) id = 'default';\n if ( _perfCounters[ id ] ) return _perfCounters[ id ];\n\n var group = null;\n if ( _settings && _settings.groups ) {\n iterateKeys( _settings.groups, function ( j ) {\n var g = _settings.groups[ parseInt( j, 10 ) ];\n if ( !group && g.values.indexOf( id.toLowerCase() ) !== -1 ) {\n group = g;\n }\n } );\n }\n\n var p = new PerfCounter( id, group );\n _perfCounters[ id ] = p;\n return p;\n\n }\n\n function _init () {\n\n if ( _settings.plugins ) {\n if ( !_settings.values ) _settings.values = {};\n if ( !_settings.groups ) _settings.groups = [];\n if ( !_settings.fractions ) _settings.fractions = [];\n for ( var j = 0; j < _settings.plugins.length; j++ ) {\n _settings.plugins[ j ].attach( _perf );\n iterateKeys( _settings.plugins[ j ].values, function ( k ) {\n _settings.values[ k ] = _settings.plugins[ j ].values[ k ];\n } );\n _settings.groups = _settings.groups.concat( _settings.plugins[ j ].groups );\n _settings.fractions = _settings.fractions.concat( _settings.plugins[ j ].fractions );\n }\n } else {\n _settings.plugins = {};\n }\n\n _base = document.createElement( 'div' );\n _base.className = 'rs-base';\n _div = document.createElement( 'div' );\n _div.className = 'rs-container';\n _div.style.height = 'auto';\n _base.appendChild( _div );\n document.body.appendChild( _base );\n\n if ( !_settings ) return;\n\n if ( _settings.groups ) {\n iterateKeys( _settings.groups, function ( j ) {\n var g = _settings.groups[ parseInt( j, 10 ) ];\n var div = document.createElement( 'div' );\n div.className = 'rs-group';\n g.div = div;\n var h1 = document.createElement( 'h1' );\n h1.textContent = g.caption;\n h1.addEventListener( 'click', function ( e ) {\n this.classList.toggle( 'hidden' );\n e.preventDefault();\n }.bind( div ) );\n _div.appendChild( h1 );\n _div.appendChild( div );\n } );\n }\n\n if ( _settings.fractions ) {\n iterateKeys( _settings.fractions, function ( j ) {\n var f = _settings.fractions[ parseInt( j, 10 ) ];\n var div = document.createElement( 'div' );\n div.className = 'rs-fraction';\n var legend = document.createElement( 'div' );\n legend.className = 'rs-legend';\n\n var h = 0;\n iterateKeys( _settings.fractions[ j ].steps, function ( k ) {\n var p = document.createElement( 'p' );\n p.textContent = _settings.fractions[ j ].steps[ k ];\n p.style.color = _colours[ h ];\n legend.appendChild( p );\n h++;\n } );\n div.appendChild( legend );\n div.style.height = h * _elHeight + 'px';\n f.div = div;\n var graph = new StackGraph( div, h );\n f.graph = graph;\n _div.appendChild( div );\n } );\n }\n\n }\n\n function _update () {\n\n iterateKeys( _settings.plugins, function ( j ) {\n _settings.plugins[ j ].update();\n } );\n\n iterateKeys( _perfCounters, function ( j ) {\n _perfCounters[ j ].draw();\n } );\n\n if ( _settings && _settings.fractions ) {\n iterateKeys( _settings.fractions, function ( j ) {\n var f = _settings.fractions[ parseInt( j, 10 ) ];\n var v = [];\n var base = _perfCounters[ f.base.toLowerCase() ];\n if ( base ) {\n base = base.value();\n iterateKeys( _settings.fractions[ j ].steps, function ( k ) {\n var s = _settings.fractions[ j ].steps[ parseInt( k, 10 ) ].toLowerCase();\n var val = _perfCounters[ s ];\n if ( val ) {\n v.push( val.value() / base );\n }\n } );\n }\n f.graph.draw( v );\n } );\n }\n\n /*if( _height != _div.clientHeight ) {\n _height = _div.clientHeight;\n _base.style.height = _height + 2 * _elHeight + 'px';\n console.log( _base.clientHeight );\n }*/\n\n }\n\n _init();\n\n return function ( id ) {\n if ( id ) return _perf( id );\n return {\n element: _base,\n update: _update\n };\n };\n\n}\n\nif (typeof module === 'object') {\n module.exports = window.rStats;\n}\n\n},{}],218:[function(_dereq_,module,exports){\n// https://stackoverflow.com/a/36213464\nif (!String.prototype.startsWith) {\n String.prototype.startsWith = function(searchString, position){\n position = position || 0;\n return this.substr(position, searchString.length) === searchString;\n };\n}\n\n},{}],219:[function(_dereq_,module,exports){\n/*\n * Copyright 2015 Google Inc. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Util = {};\n\nUtil.base64 = function(mimeType, base64) {\n return 'data:' + mimeType + ';base64,' + base64;\n};\n\nUtil.isMobile = function() {\n var check = false;\n (function(a){if(/(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);\n return check;\n};\n\nUtil.isIOS = function() {\n return /(iPad|iPhone|iPod)/g.test(navigator.userAgent);\n};\n\nUtil.isIFrame = function() {\n try {\n return window.self !== window.top;\n } catch (e) {\n return true;\n }\n};\n\nUtil.appendQueryParameter = function(url, key, value) {\n // Determine delimiter based on if the URL already GET parameters in it.\n var delimiter = (url.indexOf('?') < 0 ? '?' : '&');\n url += delimiter + key + '=' + value;\n return url;\n};\n\n// From http://goo.gl/4WX3tg\nUtil.getQueryParameter = function(name) {\n name = name.replace(/[\\[]/, \"\\\\[\").replace(/[\\]]/, \"\\\\]\");\n var regex = new RegExp(\"[\\\\?&]\" + name + \"=([^&#]*)\"),\n results = regex.exec(location.search);\n return results === null ? \"\" : decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n};\n\nUtil.isLandscapeMode = function() {\n return (window.orientation == 90 || window.orientation == -90);\n};\n\n\nmodule.exports = Util;\n\n},{}],220:[function(_dereq_,module,exports){\n/*\n * Copyright 2015 Google Inc. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Util = _dereq_('./util.js');\n\n/**\n * Android and iOS compatible wakelock implementation.\n *\n * Refactored thanks to dkovalev@.\n */\nfunction AndroidWakeLock() {\n var video = document.createElement('video');\n\n video.addEventListener('ended', function() {\n video.play();\n });\n\n this.request = function() {\n if (video.paused) {\n // Base64 version of videos_src/no-sleep-60s.webm.\n video.src = Util.base64('video/webm', 'GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlYm1Ch4ECQoWBAhhTgGcBAAAAAAAH4xFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua1OsggEwTbuMU6uEHFO7a1OsggfG7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCNTGF2ZjU2LjQwLjEwMVdBjUxhdmY1Ni40MC4xMDFzpJAGSJTMbsLpDt/ySkipgX1fRImIQO1MAAAAAAAWVK5rAQAAAAAAADuuAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDmDgQEj44OEO5rKAOABAAAAAAAABrCBsLqBkB9DtnUBAAAAAAAAo+eBAKOmgQAAgKJJg0IAAV4BHsAHBIODCoAACmH2MAAAZxgz4dPSTFi5JACjloED6ACmAECSnABMQAADYAAAWi0quoCjloEH0ACmAECSnABNwAADYAAAWi0quoCjloELuACmAECSnABNgAADYAAAWi0quoCjloEPoACmAECSnABNYAADYAAAWi0quoCjloETiACmAECSnABNIAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTnghdwo5aBAAAApgBAkpwATOAAA2AAAFotKrqAo5aBA+gApgBAkpwATMAAA2AAAFotKrqAo5aBB9AApgBAkpwATIAAA2AAAFotKrqAo5aBC7gApgBAkpwATEAAA2AAAFotKrqAo5aBD6AApgDAkpwAQ2AAA2AAAFotKrqAo5aBE4gApgBAkpwATCAAA2AAAFotKrqAH0O2dQEAAAAAAACU54Iu4KOWgQAAAKYAQJKcAEvAAANgAABaLSq6gKOWgQPoAKYAQJKcAEtgAANgAABaLSq6gKOWgQfQAKYAQJKcAEsAAANgAABaLSq6gKOWgQu4AKYAQJKcAEqAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEogAANgAABaLSq6gKOWgROIAKYAQJKcAEnAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCRlCjloEAAACmAECSnABJgAADYAAAWi0quoCjloED6ACmAECSnABJIAADYAAAWi0quoCjloEH0ACmAMCSnABDYAADYAAAWi0quoCjloELuACmAECSnABI4AADYAAAWi0quoCjloEPoACmAECSnABIoAADYAAAWi0quoCjloETiACmAECSnABIYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngl3Ao5aBAAAApgBAkpwASCAAA2AAAFotKrqAo5aBA+gApgBAkpwASAAAA2AAAFotKrqAo5aBB9AApgBAkpwAR8AAA2AAAFotKrqAo5aBC7gApgBAkpwAR4AAA2AAAFotKrqAo5aBD6AApgBAkpwAR2AAA2AAAFotKrqAo5aBE4gApgBAkpwARyAAA2AAAFotKrqAH0O2dQEAAAAAAACU54J1MKOWgQAAAKYAwJKcAENgAANgAABaLSq6gKOWgQPoAKYAQJKcAEbgAANgAABaLSq6gKOWgQfQAKYAQJKcAEagAANgAABaLSq6gKOWgQu4AKYAQJKcAEaAAANgAABaLSq6gKOWgQ+gAKYAQJKcAEZAAANgAABaLSq6gKOWgROIAKYAQJKcAEYAAANgAABaLSq6gB9DtnUBAAAAAAAAlOeCjKCjloEAAACmAECSnABF4AADYAAAWi0quoCjloED6ACmAECSnABFwAADYAAAWi0quoCjloEH0ACmAECSnABFoAADYAAAWi0quoCjloELuACmAECSnABFgAADYAAAWi0quoCjloEPoACmAMCSnABDYAADYAAAWi0quoCjloETiACmAECSnABFYAADYAAAWi0quoAfQ7Z1AQAAAAAAAJTngqQQo5aBAAAApgBAkpwARUAAA2AAAFotKrqAo5aBA+gApgBAkpwARSAAA2AAAFotKrqAo5aBB9AApgBAkpwARQAAA2AAAFotKrqAo5aBC7gApgBAkpwARQAAA2AAAFotKrqAo5aBD6AApgBAkpwAROAAA2AAAFotKrqAo5aBE4gApgBAkpwARMAAA2AAAFotKrqAH0O2dQEAAAAAAACU54K7gKOWgQAAAKYAQJKcAESgAANgAABaLSq6gKOWgQPoAKYAQJKcAESAAANgAABaLSq6gKOWgQfQAKYAwJKcAENgAANgAABaLSq6gKOWgQu4AKYAQJKcAERgAANgAABaLSq6gKOWgQ+gAKYAQJKcAERAAANgAABaLSq6gKOWgROIAKYAQJKcAEQgAANgAABaLSq6gB9DtnUBAAAAAAAAlOeC0vCjloEAAACmAECSnABEIAADYAAAWi0quoCjloED6ACmAECSnABEAAADYAAAWi0quoCjloEH0ACmAECSnABD4AADYAAAWi0quoCjloELuACmAECSnABDwAADYAAAWi0quoCjloEPoACmAECSnABDoAADYAAAWi0quoCjloETiACmAECSnABDgAADYAAAWi0quoAcU7trAQAAAAAAABG7j7OBALeK94EB8YIBd/CBAw==');\n video.play();\n }\n };\n\n this.release = function() {\n video.pause();\n video.src = '';\n };\n}\n\nfunction iOSWakeLock() {\n var timer = null;\n\n this.request = function() {\n if (!timer) {\n timer = setInterval(function() {\n window.location.href = '/';\n setTimeout(window.stop, 0);\n }, 15000);\n }\n }\n\n this.release = function() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n}\n\n\nfunction getWakeLock() {\n var userAgent = navigator.userAgent || navigator.vendor || window.opera;\n if (userAgent.match(/iPhone/i) || userAgent.match(/iPod/i)) {\n return iOSWakeLock;\n } else {\n return AndroidWakeLock;\n }\n}\n\nmodule.exports = getWakeLock();\n\n},{\"./util.js\":219}]},{},[177])(177)\n});\n//# sourceMappingURL=aframe-master.js.map\n","require('./src/controls');\nrequire('./src/loaders');\nrequire('./src/misc');\nrequire('./src/pathfinding');\nrequire('./src/primitives');\n","require('./checkpoint-controls');\nrequire('./gamepad-controls');\nrequire('./keyboard-controls');\nrequire('./touch-controls');\nrequire('./movement-controls');\nrequire('./trackpad-controls');\n","const EPS = 0.1;\n\nmodule.exports = AFRAME.registerComponent('checkpoint-controls', {\n schema: {\n enabled: {default: true},\n mode: {default: 'teleport', oneOf: ['teleport', 'animate']},\n animateSpeed: {default: 3.0}\n },\n\n init: function () {\n this.active = true;\n this.checkpoint = null;\n\n this.isNavMeshConstrained = false;\n\n this.offset = new THREE.Vector3();\n this.position = new THREE.Vector3();\n this.targetPosition = new THREE.Vector3();\n },\n\n play: function () { this.active = true; },\n pause: function () { this.active = false; },\n\n setCheckpoint: function (checkpoint) {\n const el = this.el;\n\n if (!this.active) return;\n if (this.checkpoint === checkpoint) return;\n\n if (this.checkpoint) {\n el.emit('navigation-end', {checkpoint: this.checkpoint});\n }\n\n this.checkpoint = checkpoint;\n this.sync();\n\n // Ignore new checkpoint if we're already there.\n if (this.position.distanceTo(this.targetPosition) < EPS) {\n this.checkpoint = null;\n return;\n }\n\n el.emit('navigation-start', {checkpoint: checkpoint});\n\n if (this.data.mode === 'teleport') {\n this.el.setAttribute('position', this.targetPosition);\n this.checkpoint = null;\n el.emit('navigation-end', {checkpoint: checkpoint});\n el.components['movement-controls'].updateNavLocation();\n }\n },\n\n isVelocityActive: function () {\n return !!(this.active && this.checkpoint);\n },\n\n getVelocity: function () {\n if (!this.active) return;\n\n const data = this.data;\n const offset = this.offset;\n const position = this.position;\n const targetPosition = this.targetPosition;\n const checkpoint = this.checkpoint;\n\n this.sync();\n if (position.distanceTo(targetPosition) < EPS) {\n this.checkpoint = null;\n this.el.emit('navigation-end', {checkpoint: checkpoint});\n return offset.set(0, 0, 0);\n }\n offset.setLength(data.animateSpeed);\n return offset;\n },\n\n sync: function () {\n const offset = this.offset;\n const position = this.position;\n const targetPosition = this.targetPosition;\n\n position.copy(this.el.getAttribute('position'));\n this.checkpoint.object3D.getWorldPosition(targetPosition);\n targetPosition.add(this.checkpoint.components.checkpoint.getOffset());\n offset.copy(targetPosition).sub(position);\n }\n});\n","/**\n * Gamepad controls for A-Frame.\n *\n * Stripped-down version of: https://github.com/donmccurdy/aframe-gamepad-controls\n *\n * For more information about the Gamepad API, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API\n */\n\nconst GamepadButton = require('../../lib/GamepadButton'),\n GamepadButtonEvent = require('../../lib/GamepadButtonEvent');\n\nconst JOYSTICK_EPS = 0.2;\n\nconst Hand = {\n LEFT: 'left',\n RIGHT: 'right'\n};\n\nconst Joystick = {\n MOVEMENT: 1,\n ROTATION: 2\n};\n\nmodule.exports = AFRAME.registerComponent('gamepad-controls', {\n\n /*******************************************************************\n * Statics\n */\n\n GamepadButton: GamepadButton,\n\n /*******************************************************************\n * Schema\n */\n\n schema: {\n // Enable/disable gamepad-controls\n enabled: { default: true },\n\n // Heading element for rotation\n camera: { default: '[camera]', type: 'selector' },\n\n // Rotation sensitivity\n rotationSensitivity: { default: 2.0 },\n },\n\n /*******************************************************************\n * Core\n */\n\n /**\n * Called once when component is attached. Generally for initial setup.\n */\n init: function () {\n const sceneEl = this.el.sceneEl;\n\n this.system = sceneEl.systems['tracked-controls-webxr'] || {controllers: []};\n\n this.prevTime = window.performance.now();\n\n // Button state\n this.buttons = {};\n\n // Rotation\n const rotation = this.el.object3D.rotation;\n this.pitch = new THREE.Object3D();\n this.pitch.rotation.x = THREE.Math.degToRad(rotation.x);\n this.yaw = new THREE.Object3D();\n this.yaw.position.y = 10;\n this.yaw.rotation.y = THREE.Math.degToRad(rotation.y);\n this.yaw.add(this.pitch);\n\n this._lookVector = new THREE.Vector2();\n this._moveVector = new THREE.Vector2();\n this._dpadVector = new THREE.Vector2();\n\n sceneEl.addBehavior(this);\n },\n\n /**\n * Called when component is attached and when component data changes.\n * Generally modifies the entity based on the data.\n */\n update: function () { this.tick(); },\n\n /**\n * Called on each iteration of main render loop.\n */\n tick: function (t, dt) {\n this.updateButtonState();\n this.updateRotation(dt);\n },\n\n /**\n * Called when a component is removed (e.g., via removeAttribute).\n * Generally undoes all modifications to the entity.\n */\n remove: function () { },\n\n /*******************************************************************\n * Movement\n */\n\n isVelocityActive: function () {\n if (!this.data.enabled || !this.isConnected()) return false;\n\n const dpad = this._dpadVector;\n const joystick = this._moveVector;\n\n this.getDpad(dpad);\n this.getJoystick(Joystick.MOVEMENT, joystick);\n\n const inputX = dpad.x || joystick.x;\n const inputY = dpad.y || joystick.y;\n\n return Math.abs(inputX) > JOYSTICK_EPS || Math.abs(inputY) > JOYSTICK_EPS;\n },\n\n getVelocityDelta: function () {\n const dpad = this._dpadVector;\n const joystick = this._moveVector;\n\n this.getDpad(dpad);\n this.getJoystick(Joystick.MOVEMENT, joystick);\n\n const inputX = dpad.x || joystick.x;\n const inputY = dpad.y || joystick.y;\n const dVelocity = new THREE.Vector3();\n\n if (Math.abs(inputX) > JOYSTICK_EPS) {\n dVelocity.x += inputX;\n }\n if (Math.abs(inputY) > JOYSTICK_EPS) {\n dVelocity.z += inputY;\n }\n\n return dVelocity;\n },\n\n /*******************************************************************\n * Rotation\n */\n\n isRotationActive: function () {\n if (!this.data.enabled || !this.isConnected()) return false;\n\n const joystick = this._lookVector;\n\n this.getJoystick(Joystick.ROTATION, joystick);\n\n return Math.abs(joystick.x) > JOYSTICK_EPS || Math.abs(joystick.y) > JOYSTICK_EPS;\n },\n\n updateRotation: function (dt) {\n if (!this.isRotationActive()) return;\n\n const data = this.data;\n const yaw = this.yaw;\n const pitch = this.pitch;\n const lookControls = data.camera.components['look-controls'];\n const hasLookControls = lookControls && lookControls.pitchObject && lookControls.yawObject;\n\n // Sync with look-controls pitch/yaw if available.\n if (hasLookControls) {\n pitch.rotation.copy(lookControls.pitchObject.rotation);\n yaw.rotation.copy(lookControls.yawObject.rotation);\n }\n\n const lookVector = this._lookVector;\n\n this.getJoystick(Joystick.ROTATION, lookVector);\n\n if (Math.abs(lookVector.x) <= JOYSTICK_EPS) lookVector.x = 0;\n if (Math.abs(lookVector.y) <= JOYSTICK_EPS) lookVector.y = 0;\n\n lookVector.multiplyScalar(data.rotationSensitivity * dt / 1000);\n yaw.rotation.y -= lookVector.x;\n pitch.rotation.x -= lookVector.y;\n pitch.rotation.x = Math.max(- Math.PI / 2, Math.min(Math.PI / 2, pitch.rotation.x));\n data.camera.object3D.rotation.set(pitch.rotation.x, yaw.rotation.y, 0);\n\n // Sync with look-controls pitch/yaw if available.\n if (hasLookControls) {\n lookControls.pitchObject.rotation.copy(pitch.rotation);\n lookControls.yawObject.rotation.copy(yaw.rotation);\n }\n },\n\n /*******************************************************************\n * Button events\n */\n\n updateButtonState: function () {\n const gamepad = this.getGamepad(Hand.RIGHT);\n if (this.data.enabled && gamepad) {\n\n // Fire DOM events for button state changes.\n for (var i = 0; i < gamepad.buttons.length; i++) {\n if (gamepad.buttons[i].pressed && !this.buttons[i]) {\n this.emit(new GamepadButtonEvent('gamepadbuttondown', i, gamepad.buttons[i]));\n } else if (!gamepad.buttons[i].pressed && this.buttons[i]) {\n this.emit(new GamepadButtonEvent('gamepadbuttonup', i, gamepad.buttons[i]));\n }\n this.buttons[i] = gamepad.buttons[i].pressed;\n }\n\n } else if (Object.keys(this.buttons)) {\n // Reset state if controls are disabled or controller is lost.\n this.buttons = {};\n }\n },\n\n emit: function (event) {\n // Emit original event.\n this.el.emit(event.type, event);\n\n // Emit convenience event, identifying button index.\n this.el.emit(\n event.type + ':' + event.index,\n new GamepadButtonEvent(event.type, event.index, event)\n );\n },\n\n /*******************************************************************\n * Gamepad state\n */\n\n /**\n * Returns the Gamepad instance attached to the component. If connected,\n * a proxy-controls component may provide access to Gamepad input from a\n * remote device.\n *\n * @param {string} handPreference\n * @return {Gamepad}\n */\n getGamepad: (function () {\n const _xrGamepads = [];\n const _empty = [];\n\n return function (handPreference) {\n // https://github.com/donmccurdy/aframe-proxy-controls\n const proxyControls = this.el.sceneEl.components['proxy-controls'];\n const proxyGamepad = proxyControls && proxyControls.isConnected()\n && proxyControls.getGamepad(0);\n if (proxyGamepad) return proxyGamepad;\n\n // https://www.w3.org/TR/webxr/#dom-xrinputsource-handedness\n _xrGamepads.length = 0;\n for (let i = 0; i < this.system.controllers.length; i++) {\n const xrController = this.system.controllers[i];\n const xrGamepad = xrController ? xrController.gamepad : null;\n _xrGamepads.push(xrGamepad);\n if (xrGamepad && xrGamepad.handedness === handPreference) return xrGamepad;\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/hand\n const navGamepads = navigator.getGamepads ? navigator.getGamepads() : _empty;\n for (let i = 0; i < navGamepads.length; i++) {\n const navGamepad = navGamepads[i];\n if (navGamepad && navGamepad.hand === handPreference) return navGamepad;\n }\n\n return _xrGamepads[0] || navGamepads[0];\n };\n })(),\n\n /**\n * Returns the state of the given button.\n * @param {number} index The button (0-N) for which to find state.\n * @return {GamepadButton}\n */\n getButton: function (index) {\n return this.getGamepad(Hand.RIGHT).buttons[index];\n },\n\n /**\n * Returns state of the given axis. Axes are labelled 0-N, where 0-1 will\n * represent X/Y on the first joystick, and 2-3 X/Y on the second.\n * @param {number} index The axis (0-N) for which to find state.\n * @return {number} On the interval [-1,1].\n */\n getAxis: function (index) {\n return this.getGamepad(index > 1 ? Hand.RIGHT : Hand.LEFT).axes[index];\n },\n\n /**\n * Returns the state of the specified joystick as a THREE.Vector2.\n * @param {Joystick} role\n * @param {THREE.Vector2} target\n * @return {THREE.Vector2}\n */\n getJoystick: function (index, target) {\n const gamepad = this.getGamepad(index === Joystick.MOVEMENT ? Hand.LEFT : Hand.RIGHT);\n if (gamepad.mapping === 'xr-standard') {\n // See: https://github.com/donmccurdy/aframe-extras/issues/307\n switch (index) {\n case Joystick.MOVEMENT: return target.set(gamepad.axes[2], gamepad.axes[3]);\n case Joystick.ROTATION: return target.set(gamepad.axes[0], gamepad.axes[1]);\n }\n } else {\n switch (index) {\n case Joystick.MOVEMENT: return target.set(gamepad.axes[0], gamepad.axes[1]);\n case Joystick.ROTATION: return target.set(gamepad.axes[2], gamepad.axes[3]);\n }\n }\n throw new Error('Unexpected joystick index \"%d\".', index);\n },\n\n /**\n * Returns the state of the dpad as a THREE.Vector2.\n * @param {THREE.Vector2} target\n * @return {THREE.Vector2}\n */\n getDpad: function (target) {\n const gamepad = this.getGamepad(Hand.LEFT);\n if (!gamepad.buttons[GamepadButton.DPAD_RIGHT]) {\n return target.set(0, 0);\n }\n return target.set(\n (gamepad.buttons[GamepadButton.DPAD_RIGHT].pressed ? 1 : 0)\n + (gamepad.buttons[GamepadButton.DPAD_LEFT].pressed ? -1 : 0),\n (gamepad.buttons[GamepadButton.DPAD_UP].pressed ? -1 : 0)\n + (gamepad.buttons[GamepadButton.DPAD_DOWN].pressed ? 1 : 0)\n );\n },\n\n /**\n * Returns true if the gamepad is currently connected to the system.\n * @return {boolean}\n */\n isConnected: function () {\n const gamepad = this.getGamepad(Hand.LEFT);\n return !!(gamepad && gamepad.connected);\n },\n\n /**\n * Returns a string containing some information about the controller. Result\n * may vary across browsers, for a given controller.\n * @return {string}\n */\n getID: function () {\n return this.getGamepad(Hand.LEFT).id;\n }\n});\n","module.exports = Object.assign(function GamepadButton () {}, {\n\tFACE_1: 0,\n\tFACE_2: 1,\n\tFACE_3: 2,\n\tFACE_4: 3,\n\n\tL_SHOULDER_1: 4,\n\tR_SHOULDER_1: 5,\n\tL_SHOULDER_2: 6,\n\tR_SHOULDER_2: 7,\n\n\tSELECT: 8,\n\tSTART: 9,\n\n\tDPAD_UP: 12,\n\tDPAD_DOWN: 13,\n\tDPAD_LEFT: 14,\n\tDPAD_RIGHT: 15,\n\n\tVENDOR: 16,\n});\n","function GamepadButtonEvent (type, index, details) {\n this.type = type;\n this.index = index;\n this.pressed = details.pressed;\n this.value = details.value;\n}\n\nmodule.exports = GamepadButtonEvent;\n","require('../../lib/keyboard.polyfill');\n\nconst MAX_DELTA = 0.2,\n PROXY_FLAG = '__keyboard-controls-proxy';\n\nconst KeyboardEvent = window.KeyboardEvent;\n\n/**\n * Keyboard Controls component.\n *\n * Stripped-down version of: https://github.com/donmccurdy/aframe-keyboard-controls\n *\n * Bind keyboard events to components, or control your entities with the WASD keys.\n *\n * Why use KeyboardEvent.code? \"This is set to a string representing the key that was pressed to\n * generate the KeyboardEvent, without taking the current keyboard layout (e.g., QWERTY vs.\n * Dvorak), locale (e.g., English vs. French), or any modifier keys into account. This is useful\n * when you care about which physical key was pressed, rather thanwhich character it corresponds\n * to. For example, if you’re a writing a game, you might want a certain set of keys to move the\n * player in different directions, and that mapping should ideally be independent of keyboard\n * layout. See: https://developers.google.com/web/updates/2016/04/keyboardevent-keys-codes\n *\n * @namespace wasd-controls\n * keys the entity moves and if you release it will stop. Easing simulates friction.\n * to the entity when pressing the keys.\n * @param {bool} [enabled=true] - To completely enable or disable the controls\n */\nmodule.exports = AFRAME.registerComponent('keyboard-controls', {\n schema: {\n enabled: { default: true },\n debug: { default: false }\n },\n\n init: function () {\n this.dVelocity = new THREE.Vector3();\n this.localKeys = {};\n this.listeners = {\n keydown: this.onKeyDown.bind(this),\n keyup: this.onKeyUp.bind(this),\n blur: this.onBlur.bind(this)\n };\n this.attachEventListeners();\n },\n\n /*******************************************************************\n * Movement\n */\n\n isVelocityActive: function () {\n return this.data.enabled && !!Object.keys(this.getKeys()).length;\n },\n\n getVelocityDelta: function () {\n const data = this.data,\n keys = this.getKeys();\n\n this.dVelocity.set(0, 0, 0);\n if (data.enabled) {\n if (keys.KeyW || keys.ArrowUp) { this.dVelocity.z -= 1; }\n if (keys.KeyA || keys.ArrowLeft) { this.dVelocity.x -= 1; }\n if (keys.KeyS || keys.ArrowDown) { this.dVelocity.z += 1; }\n if (keys.KeyD || keys.ArrowRight) { this.dVelocity.x += 1; }\n }\n\n return this.dVelocity.clone();\n },\n\n /*******************************************************************\n * Events\n */\n\n play: function () {\n this.attachEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n },\n\n remove: function () {\n this.pause();\n },\n\n attachEventListeners: function () {\n window.addEventListener('keydown', this.listeners.keydown, false);\n window.addEventListener('keyup', this.listeners.keyup, false);\n window.addEventListener('blur', this.listeners.blur, false);\n },\n\n removeEventListeners: function () {\n window.removeEventListener('keydown', this.listeners.keydown);\n window.removeEventListener('keyup', this.listeners.keyup);\n window.removeEventListener('blur', this.listeners.blur);\n },\n\n onKeyDown: function (event) {\n if (AFRAME.utils.shouldCaptureKeyEvent(event)) {\n this.localKeys[event.code] = true;\n this.emit(event);\n }\n },\n\n onKeyUp: function (event) {\n if (AFRAME.utils.shouldCaptureKeyEvent(event)) {\n delete this.localKeys[event.code];\n this.emit(event);\n }\n },\n\n onBlur: function () {\n for (let code in this.localKeys) {\n if (this.localKeys.hasOwnProperty(code)) {\n delete this.localKeys[code];\n }\n }\n },\n\n emit: function (event) {\n // TODO - keydown only initially?\n // TODO - where the f is the spacebar\n\n // Emit original event.\n if (PROXY_FLAG in event) {\n // TODO - Method never triggered.\n this.el.emit(event.type, event);\n }\n\n // Emit convenience event, identifying key.\n this.el.emit(event.type + ':' + event.code, new KeyboardEvent(event.type, event));\n if (this.data.debug) console.log(event.type + ':' + event.code);\n },\n\n /*******************************************************************\n * Accessors\n */\n\n isPressed: function (code) {\n return code in this.getKeys();\n },\n\n getKeys: function () {\n if (this.isProxied()) {\n return this.el.sceneEl.components['proxy-controls'].getKeyboard();\n }\n return this.localKeys;\n },\n\n isProxied: function () {\n const proxyControls = this.el.sceneEl.components['proxy-controls'];\n return proxyControls && proxyControls.isConnected();\n }\n\n});\n","/**\n * Polyfill for the additional KeyboardEvent properties defined in the D3E and\n * D4E draft specifications, by @inexorabletash.\n *\n * See: https://github.com/inexorabletash/polyfill\n */\n(function(global) {\n var nativeKeyboardEvent = ('KeyboardEvent' in global);\n if (!nativeKeyboardEvent)\n global.KeyboardEvent = function KeyboardEvent() { throw TypeError('Illegal constructor'); };\n\n if (!('DOM_KEY_LOCATION_STANDARD' in global.KeyboardEvent)) global.KeyboardEvent.DOM_KEY_LOCATION_STANDARD = 0x00; // Default or unknown location\n if (!('DOM_KEY_LOCATION_LEFT' in global.KeyboardEvent)) global.KeyboardEvent.DOM_KEY_LOCATION_LEFT = 0x01; // e.g. Left Alt key\n if (!('DOM_KEY_LOCATION_RIGHT' in global.KeyboardEvent)) global.KeyboardEvent.DOM_KEY_LOCATION_RIGHT = 0x02; // e.g. Right Alt key\n if (!('DOM_KEY_LOCATION_NUMPAD' in global.KeyboardEvent)) global.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD = 0x03; // e.g. Numpad 0 or +\n\n var STANDARD = window.KeyboardEvent.DOM_KEY_LOCATION_STANDARD,\n LEFT = window.KeyboardEvent.DOM_KEY_LOCATION_LEFT,\n RIGHT = window.KeyboardEvent.DOM_KEY_LOCATION_RIGHT,\n NUMPAD = window.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;\n\n //--------------------------------------------------------------------\n //\n // Utilities\n //\n //--------------------------------------------------------------------\n\n function contains(s, ss) { return String(s).indexOf(ss) !== -1; }\n\n var os = (function() {\n if (contains(navigator.platform, 'Win')) { return 'win'; }\n if (contains(navigator.platform, 'Mac')) { return 'mac'; }\n if (contains(navigator.platform, 'CrOS')) { return 'cros'; }\n if (contains(navigator.platform, 'Linux')) { return 'linux'; }\n if (contains(navigator.userAgent, 'iPad') || contains(navigator.platform, 'iPod') || contains(navigator.platform, 'iPhone')) { return 'ios'; }\n return '';\n } ());\n\n var browser = (function() {\n if (contains(navigator.userAgent, 'Chrome/')) { return 'chrome'; }\n if (contains(navigator.vendor, 'Apple')) { return 'safari'; }\n if (contains(navigator.userAgent, 'MSIE')) { return 'ie'; }\n if (contains(navigator.userAgent, 'Gecko/')) { return 'moz'; }\n if (contains(navigator.userAgent, 'Opera/')) { return 'opera'; }\n return '';\n } ());\n\n var browser_os = browser + '-' + os;\n\n function mergeIf(baseTable, select, table) {\n if (browser_os === select || browser === select || os === select) {\n Object.keys(table).forEach(function(keyCode) {\n baseTable[keyCode] = table[keyCode];\n });\n }\n }\n\n function remap(o, key) {\n var r = {};\n Object.keys(o).forEach(function(k) {\n var item = o[k];\n if (key in item) {\n r[item[key]] = item;\n }\n });\n return r;\n }\n\n function invert(o) {\n var r = {};\n Object.keys(o).forEach(function(k) {\n r[o[k]] = k;\n });\n return r;\n }\n\n //--------------------------------------------------------------------\n //\n // Generic Mappings\n //\n //--------------------------------------------------------------------\n\n // \"keyInfo\" is a dictionary:\n // code: string - name from DOM Level 3 KeyboardEvent code Values\n // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3Events-code.html\n // location (optional): number - one of the DOM_KEY_LOCATION values\n // keyCap (optional): string - keyboard label in en-US locale\n // USB code Usage ID from page 0x07 unless otherwise noted (Informative)\n\n // Map of keyCode to keyInfo\n var keyCodeToInfoTable = {\n // 0x01 - VK_LBUTTON\n // 0x02 - VK_RBUTTON\n 0x03: { code: 'Cancel' }, // [USB: 0x9b] char \\x0018 ??? (Not in D3E)\n // 0x04 - VK_MBUTTON\n // 0x05 - VK_XBUTTON1\n // 0x06 - VK_XBUTTON2\n 0x06: { code: 'Help' }, // [USB: 0x75] ???\n // 0x07 - undefined\n 0x08: { code: 'Backspace' }, // [USB: 0x2a] Labelled Delete on Macintosh keyboards.\n 0x09: { code: 'Tab' }, // [USB: 0x2b]\n // 0x0A-0x0B - reserved\n 0X0C: { code: 'Clear' }, // [USB: 0x9c] NumPad Center (Not in D3E)\n 0X0D: { code: 'Enter' }, // [USB: 0x28]\n // 0x0E-0x0F - undefined\n\n 0x10: { code: 'Shift' },\n 0x11: { code: 'Control' },\n 0x12: { code: 'Alt' },\n 0x13: { code: 'Pause' }, // [USB: 0x48]\n 0x14: { code: 'CapsLock' }, // [USB: 0x39]\n 0x15: { code: 'KanaMode' }, // [USB: 0x88] - \"HangulMode\" for Korean layout\n 0x16: { code: 'HangulMode' }, // [USB: 0x90] 0x15 as well in MSDN VK table ???\n 0x17: { code: 'JunjaMode' }, // (Not in D3E)\n 0x18: { code: 'FinalMode' }, // (Not in D3E)\n 0x19: { code: 'KanjiMode' }, // [USB: 0x91] - \"HanjaMode\" for Korean layout\n // 0x1A - undefined\n 0x1B: { code: 'Escape' }, // [USB: 0x29]\n 0x1C: { code: 'Convert' }, // [USB: 0x8a]\n 0x1D: { code: 'NonConvert' }, // [USB: 0x8b]\n 0x1E: { code: 'Accept' }, // (Not in D3E)\n 0x1F: { code: 'ModeChange' }, // (Not in D3E)\n\n 0x20: { code: 'Space' }, // [USB: 0x2c]\n 0x21: { code: 'PageUp' }, // [USB: 0x4b]\n 0x22: { code: 'PageDown' }, // [USB: 0x4e]\n 0x23: { code: 'End' }, // [USB: 0x4d]\n 0x24: { code: 'Home' }, // [USB: 0x4a]\n 0x25: { code: 'ArrowLeft' }, // [USB: 0x50]\n 0x26: { code: 'ArrowUp' }, // [USB: 0x52]\n 0x27: { code: 'ArrowRight' }, // [USB: 0x4f]\n 0x28: { code: 'ArrowDown' }, // [USB: 0x51]\n 0x29: { code: 'Select' }, // (Not in D3E)\n 0x2A: { code: 'Print' }, // (Not in D3E)\n 0x2B: { code: 'Execute' }, // [USB: 0x74] (Not in D3E)\n 0x2C: { code: 'PrintScreen' }, // [USB: 0x46]\n 0x2D: { code: 'Insert' }, // [USB: 0x49]\n 0x2E: { code: 'Delete' }, // [USB: 0x4c]\n 0x2F: { code: 'Help' }, // [USB: 0x75] ???\n\n 0x30: { code: 'Digit0', keyCap: '0' }, // [USB: 0x27] 0)\n 0x31: { code: 'Digit1', keyCap: '1' }, // [USB: 0x1e] 1!\n 0x32: { code: 'Digit2', keyCap: '2' }, // [USB: 0x1f] 2@\n 0x33: { code: 'Digit3', keyCap: '3' }, // [USB: 0x20] 3#\n 0x34: { code: 'Digit4', keyCap: '4' }, // [USB: 0x21] 4$\n 0x35: { code: 'Digit5', keyCap: '5' }, // [USB: 0x22] 5%\n 0x36: { code: 'Digit6', keyCap: '6' }, // [USB: 0x23] 6^\n 0x37: { code: 'Digit7', keyCap: '7' }, // [USB: 0x24] 7&\n 0x38: { code: 'Digit8', keyCap: '8' }, // [USB: 0x25] 8*\n 0x39: { code: 'Digit9', keyCap: '9' }, // [USB: 0x26] 9(\n // 0x3A-0x40 - undefined\n\n 0x41: { code: 'KeyA', keyCap: 'a' }, // [USB: 0x04]\n 0x42: { code: 'KeyB', keyCap: 'b' }, // [USB: 0x05]\n 0x43: { code: 'KeyC', keyCap: 'c' }, // [USB: 0x06]\n 0x44: { code: 'KeyD', keyCap: 'd' }, // [USB: 0x07]\n 0x45: { code: 'KeyE', keyCap: 'e' }, // [USB: 0x08]\n 0x46: { code: 'KeyF', keyCap: 'f' }, // [USB: 0x09]\n 0x47: { code: 'KeyG', keyCap: 'g' }, // [USB: 0x0a]\n 0x48: { code: 'KeyH', keyCap: 'h' }, // [USB: 0x0b]\n 0x49: { code: 'KeyI', keyCap: 'i' }, // [USB: 0x0c]\n 0x4A: { code: 'KeyJ', keyCap: 'j' }, // [USB: 0x0d]\n 0x4B: { code: 'KeyK', keyCap: 'k' }, // [USB: 0x0e]\n 0x4C: { code: 'KeyL', keyCap: 'l' }, // [USB: 0x0f]\n 0x4D: { code: 'KeyM', keyCap: 'm' }, // [USB: 0x10]\n 0x4E: { code: 'KeyN', keyCap: 'n' }, // [USB: 0x11]\n 0x4F: { code: 'KeyO', keyCap: 'o' }, // [USB: 0x12]\n\n 0x50: { code: 'KeyP', keyCap: 'p' }, // [USB: 0x13]\n 0x51: { code: 'KeyQ', keyCap: 'q' }, // [USB: 0x14]\n 0x52: { code: 'KeyR', keyCap: 'r' }, // [USB: 0x15]\n 0x53: { code: 'KeyS', keyCap: 's' }, // [USB: 0x16]\n 0x54: { code: 'KeyT', keyCap: 't' }, // [USB: 0x17]\n 0x55: { code: 'KeyU', keyCap: 'u' }, // [USB: 0x18]\n 0x56: { code: 'KeyV', keyCap: 'v' }, // [USB: 0x19]\n 0x57: { code: 'KeyW', keyCap: 'w' }, // [USB: 0x1a]\n 0x58: { code: 'KeyX', keyCap: 'x' }, // [USB: 0x1b]\n 0x59: { code: 'KeyY', keyCap: 'y' }, // [USB: 0x1c]\n 0x5A: { code: 'KeyZ', keyCap: 'z' }, // [USB: 0x1d]\n 0x5B: { code: 'OSLeft', location: LEFT }, // [USB: 0xe3]\n 0x5C: { code: 'OSRight', location: RIGHT }, // [USB: 0xe7]\n 0x5D: { code: 'ContextMenu' }, // [USB: 0x65] Context Menu\n // 0x5E - reserved\n 0x5F: { code: 'Standby' }, // [USB: 0x82] Sleep\n\n 0x60: { code: 'Numpad0', keyCap: '0', location: NUMPAD }, // [USB: 0x62]\n 0x61: { code: 'Numpad1', keyCap: '1', location: NUMPAD }, // [USB: 0x59]\n 0x62: { code: 'Numpad2', keyCap: '2', location: NUMPAD }, // [USB: 0x5a]\n 0x63: { code: 'Numpad3', keyCap: '3', location: NUMPAD }, // [USB: 0x5b]\n 0x64: { code: 'Numpad4', keyCap: '4', location: NUMPAD }, // [USB: 0x5c]\n 0x65: { code: 'Numpad5', keyCap: '5', location: NUMPAD }, // [USB: 0x5d]\n 0x66: { code: 'Numpad6', keyCap: '6', location: NUMPAD }, // [USB: 0x5e]\n 0x67: { code: 'Numpad7', keyCap: '7', location: NUMPAD }, // [USB: 0x5f]\n 0x68: { code: 'Numpad8', keyCap: '8', location: NUMPAD }, // [USB: 0x60]\n 0x69: { code: 'Numpad9', keyCap: '9', location: NUMPAD }, // [USB: 0x61]\n 0x6A: { code: 'NumpadMultiply', keyCap: '*', location: NUMPAD }, // [USB: 0x55]\n 0x6B: { code: 'NumpadAdd', keyCap: '+', location: NUMPAD }, // [USB: 0x57]\n 0x6C: { code: 'NumpadComma', keyCap: ',', location: NUMPAD }, // [USB: 0x85]\n 0x6D: { code: 'NumpadSubtract', keyCap: '-', location: NUMPAD }, // [USB: 0x56]\n 0x6E: { code: 'NumpadDecimal', keyCap: '.', location: NUMPAD }, // [USB: 0x63]\n 0x6F: { code: 'NumpadDivide', keyCap: '/', location: NUMPAD }, // [USB: 0x54]\n\n 0x70: { code: 'F1' }, // [USB: 0x3a]\n 0x71: { code: 'F2' }, // [USB: 0x3b]\n 0x72: { code: 'F3' }, // [USB: 0x3c]\n 0x73: { code: 'F4' }, // [USB: 0x3d]\n 0x74: { code: 'F5' }, // [USB: 0x3e]\n 0x75: { code: 'F6' }, // [USB: 0x3f]\n 0x76: { code: 'F7' }, // [USB: 0x40]\n 0x77: { code: 'F8' }, // [USB: 0x41]\n 0x78: { code: 'F9' }, // [USB: 0x42]\n 0x79: { code: 'F10' }, // [USB: 0x43]\n 0x7A: { code: 'F11' }, // [USB: 0x44]\n 0x7B: { code: 'F12' }, // [USB: 0x45]\n 0x7C: { code: 'F13' }, // [USB: 0x68]\n 0x7D: { code: 'F14' }, // [USB: 0x69]\n 0x7E: { code: 'F15' }, // [USB: 0x6a]\n 0x7F: { code: 'F16' }, // [USB: 0x6b]\n\n 0x80: { code: 'F17' }, // [USB: 0x6c]\n 0x81: { code: 'F18' }, // [USB: 0x6d]\n 0x82: { code: 'F19' }, // [USB: 0x6e]\n 0x83: { code: 'F20' }, // [USB: 0x6f]\n 0x84: { code: 'F21' }, // [USB: 0x70]\n 0x85: { code: 'F22' }, // [USB: 0x71]\n 0x86: { code: 'F23' }, // [USB: 0x72]\n 0x87: { code: 'F24' }, // [USB: 0x73]\n // 0x88-0x8F - unassigned\n\n 0x90: { code: 'NumLock', location: NUMPAD }, // [USB: 0x53]\n 0x91: { code: 'ScrollLock' }, // [USB: 0x47]\n // 0x92-0x96 - OEM specific\n // 0x97-0x9F - unassigned\n\n // NOTE: 0xA0-0xA5 usually mapped to 0x10-0x12 in browsers\n 0xA0: { code: 'ShiftLeft', location: LEFT }, // [USB: 0xe1]\n 0xA1: { code: 'ShiftRight', location: RIGHT }, // [USB: 0xe5]\n 0xA2: { code: 'ControlLeft', location: LEFT }, // [USB: 0xe0]\n 0xA3: { code: 'ControlRight', location: RIGHT }, // [USB: 0xe4]\n 0xA4: { code: 'AltLeft', location: LEFT }, // [USB: 0xe2]\n 0xA5: { code: 'AltRight', location: RIGHT }, // [USB: 0xe6]\n\n 0xA6: { code: 'BrowserBack' }, // [USB: 0x0c/0x0224]\n 0xA7: { code: 'BrowserForward' }, // [USB: 0x0c/0x0225]\n 0xA8: { code: 'BrowserRefresh' }, // [USB: 0x0c/0x0227]\n 0xA9: { code: 'BrowserStop' }, // [USB: 0x0c/0x0226]\n 0xAA: { code: 'BrowserSearch' }, // [USB: 0x0c/0x0221]\n 0xAB: { code: 'BrowserFavorites' }, // [USB: 0x0c/0x0228]\n 0xAC: { code: 'BrowserHome' }, // [USB: 0x0c/0x0222]\n 0xAD: { code: 'VolumeMute' }, // [USB: 0x7f]\n 0xAE: { code: 'VolumeDown' }, // [USB: 0x81]\n 0xAF: { code: 'VolumeUp' }, // [USB: 0x80]\n\n 0xB0: { code: 'MediaTrackNext' }, // [USB: 0x0c/0x00b5]\n 0xB1: { code: 'MediaTrackPrevious' }, // [USB: 0x0c/0x00b6]\n 0xB2: { code: 'MediaStop' }, // [USB: 0x0c/0x00b7]\n 0xB3: { code: 'MediaPlayPause' }, // [USB: 0x0c/0x00cd]\n 0xB4: { code: 'LaunchMail' }, // [USB: 0x0c/0x018a]\n 0xB5: { code: 'MediaSelect' },\n 0xB6: { code: 'LaunchApp1' },\n 0xB7: { code: 'LaunchApp2' },\n // 0xB8-0xB9 - reserved\n 0xBA: { code: 'Semicolon', keyCap: ';' }, // [USB: 0x33] ;: (US Standard 101)\n 0xBB: { code: 'Equal', keyCap: '=' }, // [USB: 0x2e] =+\n 0xBC: { code: 'Comma', keyCap: ',' }, // [USB: 0x36] ,<\n 0xBD: { code: 'Minus', keyCap: '-' }, // [USB: 0x2d] -_\n 0xBE: { code: 'Period', keyCap: '.' }, // [USB: 0x37] .>\n 0xBF: { code: 'Slash', keyCap: '/' }, // [USB: 0x38] /? (US Standard 101)\n\n 0xC0: { code: 'Backquote', keyCap: '`' }, // [USB: 0x35] `~ (US Standard 101)\n // 0xC1-0xCF - reserved\n\n // 0xD0-0xD7 - reserved\n // 0xD8-0xDA - unassigned\n 0xDB: { code: 'BracketLeft', keyCap: '[' }, // [USB: 0x2f] [{ (US Standard 101)\n 0xDC: { code: 'Backslash', keyCap: '\\\\' }, // [USB: 0x31] \\| (US Standard 101)\n 0xDD: { code: 'BracketRight', keyCap: ']' }, // [USB: 0x30] ]} (US Standard 101)\n 0xDE: { code: 'Quote', keyCap: '\\'' }, // [USB: 0x34] '\" (US Standard 101)\n // 0xDF - miscellaneous/varies\n\n // 0xE0 - reserved\n // 0xE1 - OEM specific\n 0xE2: { code: 'IntlBackslash', keyCap: '\\\\' }, // [USB: 0x64] \\| (UK Standard 102)\n // 0xE3-0xE4 - OEM specific\n 0xE5: { code: 'Process' }, // (Not in D3E)\n // 0xE6 - OEM specific\n // 0xE7 - VK_PACKET\n // 0xE8 - unassigned\n // 0xE9-0xEF - OEM specific\n\n // 0xF0-0xF5 - OEM specific\n 0xF6: { code: 'Attn' }, // [USB: 0x9a] (Not in D3E)\n 0xF7: { code: 'CrSel' }, // [USB: 0xa3] (Not in D3E)\n 0xF8: { code: 'ExSel' }, // [USB: 0xa4] (Not in D3E)\n 0xF9: { code: 'EraseEof' }, // (Not in D3E)\n 0xFA: { code: 'Play' }, // (Not in D3E)\n 0xFB: { code: 'ZoomToggle' }, // (Not in D3E)\n // 0xFC - VK_NONAME - reserved\n // 0xFD - VK_PA1\n 0xFE: { code: 'Clear' } // [USB: 0x9c] (Not in D3E)\n };\n\n // No legacy keyCode, but listed in D3E:\n\n // code: usb\n // 'IntlHash': 0x070032,\n // 'IntlRo': 0x070087,\n // 'IntlYen': 0x070089,\n // 'NumpadBackspace': 0x0700bb,\n // 'NumpadClear': 0x0700d8,\n // 'NumpadClearEntry': 0x0700d9,\n // 'NumpadMemoryAdd': 0x0700d3,\n // 'NumpadMemoryClear': 0x0700d2,\n // 'NumpadMemoryRecall': 0x0700d1,\n // 'NumpadMemoryStore': 0x0700d0,\n // 'NumpadMemorySubtract': 0x0700d4,\n // 'NumpadParenLeft': 0x0700b6,\n // 'NumpadParenRight': 0x0700b7,\n\n //--------------------------------------------------------------------\n //\n // Browser/OS Specific Mappings\n //\n //--------------------------------------------------------------------\n\n mergeIf(keyCodeToInfoTable,\n 'moz', {\n 0x3B: { code: 'Semicolon', keyCap: ';' }, // [USB: 0x33] ;: (US Standard 101)\n 0x3D: { code: 'Equal', keyCap: '=' }, // [USB: 0x2e] =+\n 0x6B: { code: 'Equal', keyCap: '=' }, // [USB: 0x2e] =+\n 0x6D: { code: 'Minus', keyCap: '-' }, // [USB: 0x2d] -_\n 0xBB: { code: 'NumpadAdd', keyCap: '+', location: NUMPAD }, // [USB: 0x57]\n 0xBD: { code: 'NumpadSubtract', keyCap: '-', location: NUMPAD } // [USB: 0x56]\n });\n\n mergeIf(keyCodeToInfoTable,\n 'moz-mac', {\n 0x0C: { code: 'NumLock', location: NUMPAD }, // [USB: 0x53]\n 0xAD: { code: 'Minus', keyCap: '-' } // [USB: 0x2d] -_\n });\n\n mergeIf(keyCodeToInfoTable,\n 'moz-win', {\n 0xAD: { code: 'Minus', keyCap: '-' } // [USB: 0x2d] -_\n });\n\n mergeIf(keyCodeToInfoTable,\n 'chrome-mac', {\n 0x5D: { code: 'OSRight', location: RIGHT } // [USB: 0xe7]\n });\n\n // Windows via Bootcamp (!)\n if (0) {\n mergeIf(keyCodeToInfoTable,\n 'chrome-win', {\n 0xC0: { code: 'Quote', keyCap: '\\'' }, // [USB: 0x34] '\" (US Standard 101)\n 0xDE: { code: 'Backslash', keyCap: '\\\\' }, // [USB: 0x31] \\| (US Standard 101)\n 0xDF: { code: 'Backquote', keyCap: '`' } // [USB: 0x35] `~ (US Standard 101)\n });\n\n mergeIf(keyCodeToInfoTable,\n 'ie', {\n 0xC0: { code: 'Quote', keyCap: '\\'' }, // [USB: 0x34] '\" (US Standard 101)\n 0xDE: { code: 'Backslash', keyCap: '\\\\' }, // [USB: 0x31] \\| (US Standard 101)\n 0xDF: { code: 'Backquote', keyCap: '`' } // [USB: 0x35] `~ (US Standard 101)\n });\n }\n\n mergeIf(keyCodeToInfoTable,\n 'safari', {\n 0x03: { code: 'Enter' }, // [USB: 0x28] old Safari\n 0x19: { code: 'Tab' } // [USB: 0x2b] old Safari for Shift+Tab\n });\n\n mergeIf(keyCodeToInfoTable,\n 'ios', {\n 0x0A: { code: 'Enter', location: STANDARD } // [USB: 0x28]\n });\n\n mergeIf(keyCodeToInfoTable,\n 'safari-mac', {\n 0x5B: { code: 'OSLeft', location: LEFT }, // [USB: 0xe3]\n 0x5D: { code: 'OSRight', location: RIGHT }, // [USB: 0xe7]\n 0xE5: { code: 'KeyQ', keyCap: 'Q' } // [USB: 0x14] On alternate presses, Ctrl+Q sends this\n });\n\n //--------------------------------------------------------------------\n //\n // Identifier Mappings\n //\n //--------------------------------------------------------------------\n\n // Cases where newer-ish browsers send keyIdentifier which can be\n // used to disambiguate keys.\n\n // keyIdentifierTable[keyIdentifier] -> keyInfo\n\n var keyIdentifierTable = {};\n if ('cros' === os) {\n keyIdentifierTable['U+00A0'] = { code: 'ShiftLeft', location: LEFT };\n keyIdentifierTable['U+00A1'] = { code: 'ShiftRight', location: RIGHT };\n keyIdentifierTable['U+00A2'] = { code: 'ControlLeft', location: LEFT };\n keyIdentifierTable['U+00A3'] = { code: 'ControlRight', location: RIGHT };\n keyIdentifierTable['U+00A4'] = { code: 'AltLeft', location: LEFT };\n keyIdentifierTable['U+00A5'] = { code: 'AltRight', location: RIGHT };\n }\n if ('chrome-mac' === browser_os) {\n keyIdentifierTable['U+0010'] = { code: 'ContextMenu' };\n }\n if ('safari-mac' === browser_os) {\n keyIdentifierTable['U+0010'] = { code: 'ContextMenu' };\n }\n if ('ios' === os) {\n // These only generate keyup events\n keyIdentifierTable['U+0010'] = { code: 'Function' };\n\n keyIdentifierTable['U+001C'] = { code: 'ArrowLeft' };\n keyIdentifierTable['U+001D'] = { code: 'ArrowRight' };\n keyIdentifierTable['U+001E'] = { code: 'ArrowUp' };\n keyIdentifierTable['U+001F'] = { code: 'ArrowDown' };\n\n keyIdentifierTable['U+0001'] = { code: 'Home' }; // [USB: 0x4a] Fn + ArrowLeft\n keyIdentifierTable['U+0004'] = { code: 'End' }; // [USB: 0x4d] Fn + ArrowRight\n keyIdentifierTable['U+000B'] = { code: 'PageUp' }; // [USB: 0x4b] Fn + ArrowUp\n keyIdentifierTable['U+000C'] = { code: 'PageDown' }; // [USB: 0x4e] Fn + ArrowDown\n }\n\n //--------------------------------------------------------------------\n //\n // Location Mappings\n //\n //--------------------------------------------------------------------\n\n // Cases where newer-ish browsers send location/keyLocation which\n // can be used to disambiguate keys.\n\n // locationTable[location][keyCode] -> keyInfo\n var locationTable = [];\n locationTable[LEFT] = {\n 0x10: { code: 'ShiftLeft', location: LEFT }, // [USB: 0xe1]\n 0x11: { code: 'ControlLeft', location: LEFT }, // [USB: 0xe0]\n 0x12: { code: 'AltLeft', location: LEFT } // [USB: 0xe2]\n };\n locationTable[RIGHT] = {\n 0x10: { code: 'ShiftRight', location: RIGHT }, // [USB: 0xe5]\n 0x11: { code: 'ControlRight', location: RIGHT }, // [USB: 0xe4]\n 0x12: { code: 'AltRight', location: RIGHT } // [USB: 0xe6]\n };\n locationTable[NUMPAD] = {\n 0x0D: { code: 'NumpadEnter', location: NUMPAD } // [USB: 0x58]\n };\n\n mergeIf(locationTable[NUMPAD], 'moz', {\n 0x6D: { code: 'NumpadSubtract', location: NUMPAD }, // [USB: 0x56]\n 0x6B: { code: 'NumpadAdd', location: NUMPAD } // [USB: 0x57]\n });\n mergeIf(locationTable[LEFT], 'moz-mac', {\n 0xE0: { code: 'OSLeft', location: LEFT } // [USB: 0xe3]\n });\n mergeIf(locationTable[RIGHT], 'moz-mac', {\n 0xE0: { code: 'OSRight', location: RIGHT } // [USB: 0xe7]\n });\n mergeIf(locationTable[RIGHT], 'moz-win', {\n 0x5B: { code: 'OSRight', location: RIGHT } // [USB: 0xe7]\n });\n\n\n mergeIf(locationTable[RIGHT], 'mac', {\n 0x5D: { code: 'OSRight', location: RIGHT } // [USB: 0xe7]\n });\n\n mergeIf(locationTable[NUMPAD], 'chrome-mac', {\n 0x0C: { code: 'NumLock', location: NUMPAD } // [USB: 0x53]\n });\n\n mergeIf(locationTable[NUMPAD], 'safari-mac', {\n 0x0C: { code: 'NumLock', location: NUMPAD }, // [USB: 0x53]\n 0xBB: { code: 'NumpadAdd', location: NUMPAD }, // [USB: 0x57]\n 0xBD: { code: 'NumpadSubtract', location: NUMPAD }, // [USB: 0x56]\n 0xBE: { code: 'NumpadDecimal', location: NUMPAD }, // [USB: 0x63]\n 0xBF: { code: 'NumpadDivide', location: NUMPAD } // [USB: 0x54]\n });\n\n\n //--------------------------------------------------------------------\n //\n // Key Values\n //\n //--------------------------------------------------------------------\n\n // Mapping from `code` values to `key` values. Values defined at:\n // https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3Events-key.html\n // Entries are only provided when `key` differs from `code`. If\n // printable, `shiftKey` has the shifted printable character. This\n // assumes US Standard 101 layout\n\n var codeToKeyTable = {\n // Modifier Keys\n ShiftLeft: { key: 'Shift' },\n ShiftRight: { key: 'Shift' },\n ControlLeft: { key: 'Control' },\n ControlRight: { key: 'Control' },\n AltLeft: { key: 'Alt' },\n AltRight: { key: 'Alt' },\n OSLeft: { key: 'OS' },\n OSRight: { key: 'OS' },\n\n // Whitespace Keys\n NumpadEnter: { key: 'Enter' },\n Space: { key: ' ' },\n\n // Printable Keys\n Digit0: { key: '0', shiftKey: ')' },\n Digit1: { key: '1', shiftKey: '!' },\n Digit2: { key: '2', shiftKey: '@' },\n Digit3: { key: '3', shiftKey: '#' },\n Digit4: { key: '4', shiftKey: '$' },\n Digit5: { key: '5', shiftKey: '%' },\n Digit6: { key: '6', shiftKey: '^' },\n Digit7: { key: '7', shiftKey: '&' },\n Digit8: { key: '8', shiftKey: '*' },\n Digit9: { key: '9', shiftKey: '(' },\n KeyA: { key: 'a', shiftKey: 'A' },\n KeyB: { key: 'b', shiftKey: 'B' },\n KeyC: { key: 'c', shiftKey: 'C' },\n KeyD: { key: 'd', shiftKey: 'D' },\n KeyE: { key: 'e', shiftKey: 'E' },\n KeyF: { key: 'f', shiftKey: 'F' },\n KeyG: { key: 'g', shiftKey: 'G' },\n KeyH: { key: 'h', shiftKey: 'H' },\n KeyI: { key: 'i', shiftKey: 'I' },\n KeyJ: { key: 'j', shiftKey: 'J' },\n KeyK: { key: 'k', shiftKey: 'K' },\n KeyL: { key: 'l', shiftKey: 'L' },\n KeyM: { key: 'm', shiftKey: 'M' },\n KeyN: { key: 'n', shiftKey: 'N' },\n KeyO: { key: 'o', shiftKey: 'O' },\n KeyP: { key: 'p', shiftKey: 'P' },\n KeyQ: { key: 'q', shiftKey: 'Q' },\n KeyR: { key: 'r', shiftKey: 'R' },\n KeyS: { key: 's', shiftKey: 'S' },\n KeyT: { key: 't', shiftKey: 'T' },\n KeyU: { key: 'u', shiftKey: 'U' },\n KeyV: { key: 'v', shiftKey: 'V' },\n KeyW: { key: 'w', shiftKey: 'W' },\n KeyX: { key: 'x', shiftKey: 'X' },\n KeyY: { key: 'y', shiftKey: 'Y' },\n KeyZ: { key: 'z', shiftKey: 'Z' },\n Numpad0: { key: '0' },\n Numpad1: { key: '1' },\n Numpad2: { key: '2' },\n Numpad3: { key: '3' },\n Numpad4: { key: '4' },\n Numpad5: { key: '5' },\n Numpad6: { key: '6' },\n Numpad7: { key: '7' },\n Numpad8: { key: '8' },\n Numpad9: { key: '9' },\n NumpadMultiply: { key: '*' },\n NumpadAdd: { key: '+' },\n NumpadComma: { key: ',' },\n NumpadSubtract: { key: '-' },\n NumpadDecimal: { key: '.' },\n NumpadDivide: { key: '/' },\n Semicolon: { key: ';', shiftKey: ':' },\n Equal: { key: '=', shiftKey: '+' },\n Comma: { key: ',', shiftKey: '<' },\n Minus: { key: '-', shiftKey: '_' },\n Period: { key: '.', shiftKey: '>' },\n Slash: { key: '/', shiftKey: '?' },\n Backquote: { key: '`', shiftKey: '~' },\n BracketLeft: { key: '[', shiftKey: '{' },\n Backslash: { key: '\\\\', shiftKey: '|' },\n BracketRight: { key: ']', shiftKey: '}' },\n Quote: { key: '\\'', shiftKey: '\"' },\n IntlBackslash: { key: '\\\\', shiftKey: '|' }\n };\n\n mergeIf(codeToKeyTable, 'mac', {\n OSLeft: { key: 'Meta' },\n OSRight: { key: 'Meta' }\n });\n\n // Corrections for 'key' names in older browsers (e.g. FF36-)\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.key#Key_values\n var keyFixTable = {\n Esc: 'Escape',\n Nonconvert: 'NonConvert',\n Left: 'ArrowLeft',\n Up: 'ArrowUp',\n Right: 'ArrowRight',\n Down: 'ArrowDown',\n Del: 'Delete',\n Menu: 'ContextMenu',\n MediaNextTrack: 'MediaTrackNext',\n MediaPreviousTrack: 'MediaTrackPrevious',\n SelectMedia: 'MediaSelect',\n HalfWidth: 'Hankaku',\n FullWidth: 'Zenkaku',\n RomanCharacters: 'Romaji',\n Crsel: 'CrSel',\n Exsel: 'ExSel',\n Zoom: 'ZoomToggle'\n };\n\n //--------------------------------------------------------------------\n //\n // Exported Functions\n //\n //--------------------------------------------------------------------\n\n\n var codeTable = remap(keyCodeToInfoTable, 'code');\n\n try {\n var nativeLocation = nativeKeyboardEvent && ('location' in new KeyboardEvent(''));\n } catch (_) {}\n\n function keyInfoForEvent(event) {\n var keyCode = 'keyCode' in event ? event.keyCode : 'which' in event ? event.which : 0;\n\n var keyInfo = (function(){\n if (nativeLocation || 'keyLocation' in event) {\n var location = nativeLocation ? event.location : event.keyLocation;\n if (location && keyCode in locationTable[location]) {\n return locationTable[location][keyCode];\n }\n }\n if ('keyIdentifier' in event && event.keyIdentifier in keyIdentifierTable) {\n return keyIdentifierTable[event.keyIdentifier];\n }\n if (keyCode in keyCodeToInfoTable) {\n return keyCodeToInfoTable[keyCode];\n }\n return null;\n }());\n\n // TODO: Track these down and move to general tables\n if (0) {\n // TODO: Map these for newerish browsers?\n // TODO: iOS only?\n // TODO: Override with more common keyIdentifier name?\n switch (event.keyIdentifier) {\n case 'U+0010': keyInfo = { code: 'Function' }; break;\n case 'U+001C': keyInfo = { code: 'ArrowLeft' }; break;\n case 'U+001D': keyInfo = { code: 'ArrowRight' }; break;\n case 'U+001E': keyInfo = { code: 'ArrowUp' }; break;\n case 'U+001F': keyInfo = { code: 'ArrowDown' }; break;\n }\n }\n\n if (!keyInfo)\n return null;\n\n var key = (function() {\n var entry = codeToKeyTable[keyInfo.code];\n if (!entry) return keyInfo.code;\n return (event.shiftKey && 'shiftKey' in entry) ? entry.shiftKey : entry.key;\n }());\n\n return {\n code: keyInfo.code,\n key: key,\n location: keyInfo.location,\n keyCap: keyInfo.keyCap\n };\n }\n\n function queryKeyCap(code, locale) {\n code = String(code);\n if (!codeTable.hasOwnProperty(code)) return 'Undefined';\n if (locale && String(locale).toLowerCase() !== 'en-us') throw Error('Unsupported locale');\n var keyInfo = codeTable[code];\n return keyInfo.keyCap || keyInfo.code || 'Undefined';\n }\n\n if ('KeyboardEvent' in global && 'defineProperty' in Object) {\n (function() {\n function define(o, p, v) {\n if (p in o) return;\n Object.defineProperty(o, p, v);\n }\n\n define(KeyboardEvent.prototype, 'code', { get: function() {\n var keyInfo = keyInfoForEvent(this);\n return keyInfo ? keyInfo.code : '';\n }});\n\n // Fix for nonstandard `key` values (FF36-)\n if ('key' in KeyboardEvent.prototype) {\n var desc = Object.getOwnPropertyDescriptor(KeyboardEvent.prototype, 'key');\n Object.defineProperty(KeyboardEvent.prototype, 'key', { get: function() {\n var key = desc.get.call(this);\n return keyFixTable.hasOwnProperty(key) ? keyFixTable[key] : key;\n }});\n }\n\n define(KeyboardEvent.prototype, 'key', { get: function() {\n var keyInfo = keyInfoForEvent(this);\n return (keyInfo && 'key' in keyInfo) ? keyInfo.key : 'Unidentified';\n }});\n\n define(KeyboardEvent.prototype, 'location', { get: function() {\n var keyInfo = keyInfoForEvent(this);\n return (keyInfo && 'location' in keyInfo) ? keyInfo.location : STANDARD;\n }});\n\n define(KeyboardEvent.prototype, 'locale', { get: function() {\n return '';\n }});\n }());\n }\n\n if (!('queryKeyCap' in global.KeyboardEvent))\n global.KeyboardEvent.queryKeyCap = queryKeyCap;\n\n // Helper for IE8-\n global.identifyKey = function(event) {\n if ('code' in event)\n return;\n\n var keyInfo = keyInfoForEvent(event);\n event.code = keyInfo ? keyInfo.code : '';\n event.key = (keyInfo && 'key' in keyInfo) ? keyInfo.key : 'Unidentified';\n event.location = ('location' in event) ? event.location :\n ('keyLocation' in event) ? event.keyLocation :\n (keyInfo && 'location' in keyInfo) ? keyInfo.location : STANDARD;\n event.locale = '';\n };\n\n} (window));\n","/**\n * Touch-to-move-forward controls for mobile.\n */\nmodule.exports = AFRAME.registerComponent('touch-controls', {\n schema: {\n enabled: { default: true },\n reverseEnabled: { default: true }\n },\n\n init: function () {\n this.dVelocity = new THREE.Vector3();\n this.bindMethods();\n this.direction = 0;\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.dVelocity.set(0, 0, 0);\n },\n\n remove: function () {\n this.pause();\n },\n\n addEventListeners: function () {\n const sceneEl = this.el.sceneEl;\n const canvasEl = sceneEl.canvas;\n\n if (!canvasEl) {\n sceneEl.addEventListener('render-target-loaded', this.addEventListeners.bind(this));\n return;\n }\n\n canvasEl.addEventListener('touchstart', this.onTouchStart);\n canvasEl.addEventListener('touchend', this.onTouchEnd);\n },\n\n removeEventListeners: function () {\n const canvasEl = this.el.sceneEl && this.el.sceneEl.canvas;\n if (!canvasEl) { return; }\n\n canvasEl.removeEventListener('touchstart', this.onTouchStart);\n canvasEl.removeEventListener('touchend', this.onTouchEnd);\n },\n\n isVelocityActive: function () {\n return this.data.enabled && !!this.direction;\n },\n\n getVelocityDelta: function () {\n this.dVelocity.z = this.direction;\n return this.dVelocity.clone();\n },\n\n bindMethods: function () {\n this.onTouchStart = this.onTouchStart.bind(this);\n this.onTouchEnd = this.onTouchEnd.bind(this);\n },\n\n onTouchStart: function (e) {\n this.direction = -1;\n if (this.data.reverseEnabled && e.touches.length === 2) {\n this.direction = 1;\n }\n e.preventDefault();\n },\n\n onTouchEnd: function (e) {\n this.direction = 0;\n e.preventDefault();\n }\n});\n","/**\n * Movement Controls\n *\n * @author Don McCurdy <[email protected]>\n */\n\nconst COMPONENT_SUFFIX = '-controls',\n MAX_DELTA = 0.2, // ms\n EPS = 10e-6;\n\nmodule.exports = AFRAME.registerComponent('movement-controls', {\n\n /*******************************************************************\n * Schema\n */\n\n dependencies: ['rotation'],\n\n schema: {\n enabled: { default: true },\n controls: { default: ['gamepad', 'trackpad', 'keyboard', 'touch'] },\n speed: { default: 0.3, min: 0 },\n fly: { default: false },\n constrainToNavMesh: { default: false },\n camera: { default: '[movement-controls] [camera]', type: 'selector' }\n },\n\n /*******************************************************************\n * Lifecycle\n */\n\n init: function () {\n const el = this.el;\n\n this.velocityCtrl = null;\n\n this.velocity = new THREE.Vector3();\n this.heading = new THREE.Quaternion();\n\n // Navigation\n this.navGroup = null;\n this.navNode = null;\n\n if (el.sceneEl.hasLoaded) {\n this.injectControls();\n } else {\n el.sceneEl.addEventListener('loaded', this.injectControls.bind(this));\n }\n },\n\n update: function (prevData) {\n const el = this.el;\n const data = this.data;\n const nav = el.sceneEl.systems.nav;\n if (el.sceneEl.hasLoaded) {\n this.injectControls();\n }\n if (nav && data.constrainToNavMesh !== prevData.constrainToNavMesh) {\n data.constrainToNavMesh\n ? nav.addAgent(this)\n : nav.removeAgent(this);\n }\n },\n\n injectControls: function () {\n const data = this.data;\n var name;\n\n for (let i = 0; i < data.controls.length; i++) {\n name = data.controls[i] + COMPONENT_SUFFIX;\n if (!this.el.components[name]) {\n this.el.setAttribute(name, '');\n }\n }\n },\n\n updateNavLocation: function () {\n this.navGroup = null;\n this.navNode = null;\n },\n\n /*******************************************************************\n * Tick\n */\n\n tick: (function () {\n const start = new THREE.Vector3();\n const end = new THREE.Vector3();\n const clampedEnd = new THREE.Vector3();\n\n return function (t, dt) {\n if (!dt) return;\n\n const el = this.el;\n const data = this.data;\n\n if (!data.enabled) return;\n\n this.updateVelocityCtrl();\n const velocityCtrl = this.velocityCtrl;\n const velocity = this.velocity;\n\n if (!velocityCtrl) return;\n\n // Update velocity. If FPS is too low, reset.\n if (dt / 1000 > MAX_DELTA) {\n velocity.set(0, 0, 0);\n } else {\n this.updateVelocity(dt);\n }\n\n if (data.constrainToNavMesh\n && velocityCtrl.isNavMeshConstrained !== false) {\n\n if (velocity.lengthSq() < EPS) return;\n\n start.copy(el.object3D.position);\n end\n .copy(velocity)\n .multiplyScalar(dt / 1000)\n .add(start);\n\n const nav = el.sceneEl.systems.nav;\n this.navGroup = this.navGroup === null ? nav.getGroup(start) : this.navGroup;\n this.navNode = this.navNode || nav.getNode(start, this.navGroup);\n this.navNode = nav.clampStep(start, end, this.navGroup, this.navNode, clampedEnd);\n el.object3D.position.copy(clampedEnd);\n } else if (el.hasAttribute('velocity')) {\n el.setAttribute('velocity', velocity);\n } else {\n el.object3D.position.x += velocity.x * dt / 1000;\n el.object3D.position.y += velocity.y * dt / 1000;\n el.object3D.position.z += velocity.z * dt / 1000;\n }\n\n };\n }()),\n\n /*******************************************************************\n * Movement\n */\n\n updateVelocityCtrl: function () {\n const data = this.data;\n if (data.enabled) {\n for (let i = 0, l = data.controls.length; i < l; i++) {\n const control = this.el.components[data.controls[i] + COMPONENT_SUFFIX];\n if (control && control.isVelocityActive()) {\n this.velocityCtrl = control;\n return;\n }\n }\n this.velocityCtrl = null;\n }\n },\n\n updateVelocity: (function () {\n const vector2 = new THREE.Vector2();\n const quaternion = new THREE.Quaternion();\n\n return function (dt) {\n let dVelocity;\n const el = this.el;\n const control = this.velocityCtrl;\n const velocity = this.velocity;\n const data = this.data;\n\n if (control) {\n if (control.getVelocityDelta) {\n dVelocity = control.getVelocityDelta(dt);\n } else if (control.getVelocity) {\n velocity.copy(control.getVelocity());\n return;\n } else if (control.getPositionDelta) {\n velocity.copy(control.getPositionDelta(dt).multiplyScalar(1000 / dt));\n return;\n } else {\n throw new Error('Incompatible movement controls: ', control);\n }\n }\n\n if (el.hasAttribute('velocity') && !data.constrainToNavMesh) {\n velocity.copy(this.el.getAttribute('velocity'));\n }\n\n if (dVelocity && data.enabled) {\n const cameraEl = data.camera;\n\n // Rotate to heading\n quaternion.copy(cameraEl.object3D.quaternion);\n quaternion.premultiply(el.object3D.quaternion);\n dVelocity.applyQuaternion(quaternion);\n\n const factor = dVelocity.length();\n if (data.fly) {\n velocity.copy(dVelocity);\n velocity.multiplyScalar(this.data.speed * 16.66667);\n } else {\n vector2.set(dVelocity.x, dVelocity.z);\n vector2.setLength(factor * this.data.speed * 16.66667);\n velocity.x = vector2.x;\n velocity.z = vector2.y;\n }\n }\n };\n\n }())\n});\n","/**\n * 3dof (Gear VR, Daydream) controls for mobile.\n */\nmodule.exports = AFRAME.registerComponent('trackpad-controls', {\n schema: {\n enabled: { default: true },\n enableNegX: { default: true },\n enablePosX: { default: true },\n enableNegZ: { default: true },\n enablePosZ: { default: true },\n mode: { default: 'touch', oneOf: ['swipe', 'touch', 'press'] }\n\n },\n\n init: function () {\n this.dVelocity = new THREE.Vector3();\n this.zVel = 0;\n this.xVel = 0;\n this.bindMethods();\n },\n\n play: function () {\n this.addEventListeners();\n },\n\n pause: function () {\n this.removeEventListeners();\n this.dVelocity.set(0, 0, 0);\n },\n\n remove: function () {\n this.pause();\n },\n\n addEventListeners: function () {\n const data = this.data;\n const sceneEl = this.el.sceneEl;\n\n sceneEl.addEventListener('axismove', this.onAxisMove);\n\n switch (data.mode) {\n case 'swipe':\n case 'touch':\n sceneEl.addEventListener('trackpadtouchstart', this.onTouchStart);\n sceneEl.addEventListener('trackpadtouchend', this.onTouchEnd);\n break;\n\n case 'press':\n sceneEl.addEventListener('trackpaddown', this.onTouchStart);\n sceneEl.addEventListener('trackpadup', this.onTouchEnd);\n break;\n }\n\n },\n\n removeEventListeners: function () {\n const sceneEl = this.el.sceneEl;\n\n sceneEl.removeEventListener('axismove', this.onAxisMove);\n sceneEl.removeEventListener('trackpadtouchstart', this.onTouchStart);\n sceneEl.removeEventListener('trackpadtouchend', this.onTouchEnd);\n sceneEl.removeEventListener('trackpaddown', this.onTouchStart);\n sceneEl.removeEventListener('trackpadup', this.onTouchEnd);\n },\n\n isVelocityActive: function () {\n return this.data.enabled && this.isMoving;\n },\n\n getVelocityDelta: function () {\n this.dVelocity.z = this.isMoving ? -this.zVel : 1;\n this.dVelocity.x = this.isMoving ? this.xVel : 1;\n return this.dVelocity.clone();\n },\n\n bindMethods: function () {\n this.onTouchStart = this.onTouchStart.bind(this);\n this.onTouchEnd = this.onTouchEnd.bind(this);\n this.onAxisMove = this.onAxisMove.bind(this);\n },\n\n onTouchStart: function (e) {\n switch(this.data.mode){\n case 'swipe':\n this.canRecordAxis = true;\n this.startingAxisData = [];\n break;\n case 'touch':\n this.isMoving = true;\n break;\n case 'press':\n this.isMoving = true;\n break;\n }\n\n e.preventDefault();\n },\n\n onTouchEnd: function (e) {\n if(this.data.mode == 'swipe') {\n this.startingAxisData = [];\n }\n\n this.isMoving = false;\n e.preventDefault();\n },\n\n onAxisMove: function(e){\n switch (this.data.mode) {\n case 'swipe':\n return this.handleSwipeAxis(e);\n case 'touch':\n case 'press':\n return this.handleTouchAxis(e);\n }\n },\n\n handleSwipeAxis: function(e) {\n const data = this.data;\n const axisData = e.detail.axis;\n\n if(this.startingAxisData.length === 0 && this.canRecordAxis){\n this.canRecordAxis = false;\n this.startingAxisData[0] = axisData[0];\n this.startingAxisData[1] = axisData[1];\n }\n\n if(this.startingAxisData.length > 0){\n let velX = 0;\n let velZ = 0;\n\n if (data.enableNegX && axisData[0] < this.startingAxisData[0]) {\n velX = -1;\n }\n\n if (data.enablePosX && axisData[0] > this.startingAxisData[0]) {\n velX = 1;\n }\n\n if (data.enablePosZ && axisData[1] > this.startingAxisData[1]) {\n velZ = -1;\n }\n\n if (data.enableNegZ && axisData[1] < this.startingAxisData[1]) {\n velZ = 1;\n }\n\n const absChangeZ = Math.abs(this.startingAxisData[1] - axisData[1]);\n const absChangeX = Math.abs(this.startingAxisData[0] - axisData[0]);\n\n if (absChangeX > absChangeZ) {\n this.zVel = 0;\n this.xVel = velX;\n this.isMoving = true;\n } else {\n this.xVel = 0;\n this.zVel = velZ;\n this.isMoving = true;\n }\n\n }\n },\n\n handleTouchAxis: function(e) {\n const data = this.data;\n const axisData = e.detail.axis;\n\n let velX = 0;\n let velZ = 0;\n\n if (data.enableNegX && axisData[0] < 0) {\n velX = -1;\n }\n\n if (data.enablePosX && axisData[0] > 0) {\n velX = 1;\n }\n\n if (data.enablePosZ && axisData[1] > 0) {\n velZ = -1;\n }\n\n if (data.enableNegZ && axisData[1] < 0) {\n velZ = 1;\n }\n\n if (Math.abs(axisData[0]) > Math.abs(axisData[1])) {\n this.zVel = 0;\n this.xVel = velX;\n } else {\n this.xVel = 0;\n this.zVel = velZ;\n }\n\n }\n\n});\n\n","require('./animation-mixer');\nrequire('./collada-model-legacy');\nrequire('./fbx-model');\nrequire('./gltf-model-legacy');\nrequire('./object-model');\n","const LoopMode = {\n once: THREE.LoopOnce,\n repeat: THREE.LoopRepeat,\n pingpong: THREE.LoopPingPong\n};\n\n/**\n * animation-mixer\n *\n * Player for animation clips. Intended to be compatible with any model format that supports\n * skeletal or morph animations through THREE.AnimationMixer.\n * See: https://threejs.org/docs/?q=animation#Reference/Animation/AnimationMixer\n */\nmodule.exports = AFRAME.registerComponent('animation-mixer', {\n schema: {\n clip: {default: '*'},\n duration: {default: 0},\n clampWhenFinished: {default: false, type: 'boolean'},\n crossFadeDuration: {default: 0},\n loop: {default: 'repeat', oneOf: Object.keys(LoopMode)},\n repetitions: {default: Infinity, min: 0},\n timeScale: {default: 1}\n },\n\n init: function () {\n /** @type {THREE.Mesh} */\n this.model = null;\n /** @type {THREE.AnimationMixer} */\n this.mixer = null;\n /** @type {Array<THREE.AnimationAction>} */\n this.activeActions = [];\n\n const model = this.el.getObject3D('mesh');\n\n if (model) {\n this.load(model);\n } else {\n this.el.addEventListener('model-loaded', (e) => {\n this.load(e.detail.model);\n });\n }\n },\n\n load: function (model) {\n const el = this.el;\n this.model = model;\n this.mixer = new THREE.AnimationMixer(model);\n this.mixer.addEventListener('loop', (e) => {\n el.emit('animation-loop', {action: e.action, loopDelta: e.loopDelta});\n });\n this.mixer.addEventListener('finished', (e) => {\n el.emit('animation-finished', {action: e.action, direction: e.direction});\n });\n if (this.data.clip) this.update({});\n },\n\n remove: function () {\n if (this.mixer) this.mixer.stopAllAction();\n },\n\n update: function (prevData) {\n if (!prevData) return;\n\n const data = this.data;\n const changes = AFRAME.utils.diff(data, prevData);\n\n // If selected clips have changed, restart animation.\n if ('clip' in changes) {\n this.stopAction();\n if (data.clip) this.playAction();\n return;\n }\n\n // Otherwise, modify running actions.\n this.activeActions.forEach((action) => {\n if ('duration' in changes && data.duration) {\n action.setDuration(data.duration);\n }\n if ('clampWhenFinished' in changes) {\n action.clampWhenFinished = data.clampWhenFinished;\n }\n if ('loop' in changes || 'repetitions' in changes) {\n action.setLoop(LoopMode[data.loop], data.repetitions);\n }\n if ('timeScale' in changes) {\n action.setEffectiveTimeScale(data.timeScale);\n }\n });\n },\n\n stopAction: function () {\n const data = this.data;\n for (let i = 0; i < this.activeActions.length; i++) {\n data.crossFadeDuration\n ? this.activeActions[i].fadeOut(data.crossFadeDuration)\n : this.activeActions[i].stop();\n }\n this.activeActions.length = 0;\n },\n\n playAction: function () {\n if (!this.mixer) return;\n\n const model = this.model,\n data = this.data,\n clips = model.animations || (model.geometry || {}).animations || [];\n\n if (!clips.length) return;\n\n const re = wildcardToRegExp(data.clip);\n\n for (let clip, i = 0; (clip = clips[i]); i++) {\n if (clip.name.match(re)) {\n const action = this.mixer.clipAction(clip, model);\n action.enabled = true;\n action.clampWhenFinished = data.clampWhenFinished;\n if (data.duration) action.setDuration(data.duration);\n if (data.timeScale !== 1) action.setEffectiveTimeScale(data.timeScale);\n action\n .setLoop(LoopMode[data.loop], data.repetitions)\n .fadeIn(data.crossFadeDuration)\n .play();\n this.activeActions.push(action);\n }\n }\n },\n\n tick: function (t, dt) {\n if (this.mixer && !isNaN(dt)) this.mixer.update(dt / 1000);\n }\n});\n\n/**\n * Creates a RegExp from the given string, converting asterisks to .* expressions,\n * and escaping all other characters.\n */\nfunction wildcardToRegExp (s) {\n return new RegExp('^' + s.split(/\\*+/).map(regExpEscape).join('.*') + '$');\n}\n\n/**\n * RegExp-escapes all characters in the given string.\n */\nfunction regExpEscape (s) {\n return s.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&');\n}\n","THREE.ColladaLoader = require('../../lib/ColladaLoader');\n\n/**\n * collada-model-legacy\n *\n * Loader for COLLADA (.dae) format.\n */\nmodule.exports.Component = AFRAME.registerComponent('collada-model-legacy', {\n schema: {type: 'asset'},\n\n init: function () {\n this.model = null;\n this.loader = new THREE.ColladaLoader();\n },\n\n update: function () {\n var self = this;\n var el = this.el;\n var src = this.data;\n var rendererSystem = this.el.sceneEl.systems.renderer;\n\n if (!src) { return; }\n\n this.remove();\n\n this.loader.load(src, function (colladaModel) {\n self.model = colladaModel.scene;\n self.model.traverse(function (object) {\n if (object.isMesh) {\n var material = object.material;\n if (material.color) rendererSystem.applyColorCorrection(material.color);\n if (material.map) rendererSystem.applyColorCorrection(material.map);\n if (material.emissive) rendererSystem.applyColorCorrection(material.emissive);\n if (material.emissiveMap) rendererSystem.applyColorCorrection(material.emissiveMap);\n }\n });\n el.setObject3D('mesh', self.model);\n el.emit('model-loaded', {format: 'collada', model: self.model});\n });\n },\n\n remove: function () {\n if (!this.model) { return; }\n this.el.removeObject3D('mesh');\n }\n});\n","/**\n * @author mrdoob / http://mrdoob.com/\n * @author Mugen87 / https://github.com/Mugen87\n */\n\nmodule.exports = THREE.ColladaLoader = function ( manager ) {\n\n this.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;\n\n};\n\nTHREE.ColladaLoader.prototype = {\n\n constructor: THREE.ColladaLoader,\n\n crossOrigin: 'anonymous',\n\n load: function ( url, onLoad, onProgress, onError ) {\n\n var scope = this;\n\n var path = ( scope.path === undefined ) ? THREE.LoaderUtils.extractUrlBase( url ) : scope.path;\n\n var loader = new THREE.FileLoader( scope.manager );\n loader.setPath( scope.path );\n loader.load( url, function ( text ) {\n\n onLoad( scope.parse( text, path ) );\n\n }, onProgress, onError );\n\n },\n\n setPath: function ( value ) {\n\n this.path = value;\n return this;\n\n },\n\n setResourcePath: function ( value ) {\n\n this.resourcePath = value;\n return this;\n\n },\n\n options: {\n\n set convertUpAxis( value ) {\n\n console.warn( 'THREE.ColladaLoader: options.convertUpAxis() has been removed. Up axis is converted automatically.' );\n\n }\n\n },\n\n setCrossOrigin: function ( value ) {\n\n this.crossOrigin = value;\n return this;\n\n },\n\n parse: function ( text, path ) {\n\n function getElementsByTagName( xml, name ) {\n\n // Non recursive xml.getElementsByTagName() ...\n\n var array = [];\n var childNodes = xml.childNodes;\n\n for ( var i = 0, l = childNodes.length; i < l; i ++ ) {\n\n var child = childNodes[ i ];\n\n if ( child.nodeName === name ) {\n\n array.push( child );\n\n }\n\n }\n\n return array;\n\n }\n\n function parseStrings( text ) {\n\n if ( text.length === 0 ) return [];\n\n var parts = text.trim().split( /\\s+/ );\n var array = new Array( parts.length );\n\n for ( var i = 0, l = parts.length; i < l; i ++ ) {\n\n array[ i ] = parts[ i ];\n\n }\n\n return array;\n\n }\n\n function parseFloats( text ) {\n\n if ( text.length === 0 ) return [];\n\n var parts = text.trim().split( /\\s+/ );\n var array = new Array( parts.length );\n\n for ( var i = 0, l = parts.length; i < l; i ++ ) {\n\n array[ i ] = parseFloat( parts[ i ] );\n\n }\n\n return array;\n\n }\n\n function parseInts( text ) {\n\n if ( text.length === 0 ) return [];\n\n var parts = text.trim().split( /\\s+/ );\n var array = new Array( parts.length );\n\n for ( var i = 0, l = parts.length; i < l; i ++ ) {\n\n array[ i ] = parseInt( parts[ i ] );\n\n }\n\n return array;\n\n }\n\n function parseId( text ) {\n\n return text.substring( 1 );\n\n }\n\n function generateId() {\n\n return 'three_default_' + ( count ++ );\n\n }\n\n function isEmpty( object ) {\n\n return Object.keys( object ).length === 0;\n\n }\n\n // asset\n\n function parseAsset( xml ) {\n\n return {\n unit: parseAssetUnit( getElementsByTagName( xml, 'unit' )[ 0 ] ),\n upAxis: parseAssetUpAxis( getElementsByTagName( xml, 'up_axis' )[ 0 ] )\n };\n\n }\n\n function parseAssetUnit( xml ) {\n\n if ( ( xml !== undefined ) && ( xml.hasAttribute( 'meter' ) === true ) ) {\n\n return parseFloat( xml.getAttribute( 'meter' ) );\n\n } else {\n\n return 1; // default 1 meter\n\n }\n\n }\n\n function parseAssetUpAxis( xml ) {\n\n return xml !== undefined ? xml.textContent : 'Y_UP';\n\n }\n\n // library\n\n function parseLibrary( xml, libraryName, nodeName, parser ) {\n\n var library = getElementsByTagName( xml, libraryName )[ 0 ];\n\n if ( library !== undefined ) {\n\n var elements = getElementsByTagName( library, nodeName );\n\n for ( var i = 0; i < elements.length; i ++ ) {\n\n parser( elements[ i ] );\n\n }\n\n }\n\n }\n\n function buildLibrary( data, builder ) {\n\n for ( var name in data ) {\n\n var object = data[ name ];\n object.build = builder( data[ name ] );\n\n }\n\n }\n\n // get\n\n function getBuild( data, builder ) {\n\n if ( data.build !== undefined ) return data.build;\n\n data.build = builder( data );\n\n return data.build;\n\n }\n\n // animation\n\n function parseAnimation( xml ) {\n\n var data = {\n sources: {},\n samplers: {},\n channels: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n var id;\n\n switch ( child.nodeName ) {\n\n case 'source':\n id = child.getAttribute( 'id' );\n data.sources[ id ] = parseSource( child );\n break;\n\n case 'sampler':\n id = child.getAttribute( 'id' );\n data.samplers[ id ] = parseAnimationSampler( child );\n break;\n\n case 'channel':\n id = child.getAttribute( 'target' );\n data.channels[ id ] = parseAnimationChannel( child );\n break;\n\n default:\n console.log( child );\n\n }\n\n }\n\n library.animations[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseAnimationSampler( xml ) {\n\n var data = {\n inputs: {},\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'input':\n var id = parseId( child.getAttribute( 'source' ) );\n var semantic = child.getAttribute( 'semantic' );\n data.inputs[ semantic ] = id;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseAnimationChannel( xml ) {\n\n var data = {};\n\n var target = xml.getAttribute( 'target' );\n\n // parsing SID Addressing Syntax\n\n var parts = target.split( '/' );\n\n var id = parts.shift();\n var sid = parts.shift();\n\n // check selection syntax\n\n var arraySyntax = ( sid.indexOf( '(' ) !== - 1 );\n var memberSyntax = ( sid.indexOf( '.' ) !== - 1 );\n\n if ( memberSyntax ) {\n\n // member selection access\n\n parts = sid.split( '.' );\n sid = parts.shift();\n data.member = parts.shift();\n\n } else if ( arraySyntax ) {\n\n // array-access syntax. can be used to express fields in one-dimensional vectors or two-dimensional matrices.\n\n var indices = sid.split( '(' );\n sid = indices.shift();\n\n for ( var i = 0; i < indices.length; i ++ ) {\n\n indices[ i ] = parseInt( indices[ i ].replace( /\\)/, '' ) );\n\n }\n\n data.indices = indices;\n\n }\n\n data.id = id;\n data.sid = sid;\n\n data.arraySyntax = arraySyntax;\n data.memberSyntax = memberSyntax;\n\n data.sampler = parseId( xml.getAttribute( 'source' ) );\n\n return data;\n\n }\n\n function buildAnimation( data ) {\n\n var tracks = [];\n\n var channels = data.channels;\n var samplers = data.samplers;\n var sources = data.sources;\n\n for ( var target in channels ) {\n\n if ( channels.hasOwnProperty( target ) ) {\n\n var channel = channels[ target ];\n var sampler = samplers[ channel.sampler ];\n\n var inputId = sampler.inputs.INPUT;\n var outputId = sampler.inputs.OUTPUT;\n\n var inputSource = sources[ inputId ];\n var outputSource = sources[ outputId ];\n\n var animation = buildAnimationChannel( channel, inputSource, outputSource );\n\n createKeyframeTracks( animation, tracks );\n\n }\n\n }\n\n return tracks;\n\n }\n\n function getAnimation( id ) {\n\n return getBuild( library.animations[ id ], buildAnimation );\n\n }\n\n function buildAnimationChannel( channel, inputSource, outputSource ) {\n\n var node = library.nodes[ channel.id ];\n var object3D = getNode( node.id );\n\n var transform = node.transforms[ channel.sid ];\n var defaultMatrix = node.matrix.clone().transpose();\n\n var time, stride;\n var i, il, j, jl;\n\n var data = {};\n\n // the collada spec allows the animation of data in various ways.\n // depending on the transform type (matrix, translate, rotate, scale), we execute different logic\n\n switch ( transform ) {\n\n case 'matrix':\n\n for ( i = 0, il = inputSource.array.length; i < il; i ++ ) {\n\n time = inputSource.array[ i ];\n stride = i * outputSource.stride;\n\n if ( data[ time ] === undefined ) data[ time ] = {};\n\n if ( channel.arraySyntax === true ) {\n\n var value = outputSource.array[ stride ];\n var index = channel.indices[ 0 ] + 4 * channel.indices[ 1 ];\n\n data[ time ][ index ] = value;\n\n } else {\n\n for ( j = 0, jl = outputSource.stride; j < jl; j ++ ) {\n\n data[ time ][ j ] = outputSource.array[ stride + j ];\n\n }\n\n }\n\n }\n\n break;\n\n case 'translate':\n console.warn( 'THREE.ColladaLoader: Animation transform type \"%s\" not yet implemented.', transform );\n break;\n\n case 'rotate':\n console.warn( 'THREE.ColladaLoader: Animation transform type \"%s\" not yet implemented.', transform );\n break;\n\n case 'scale':\n console.warn( 'THREE.ColladaLoader: Animation transform type \"%s\" not yet implemented.', transform );\n break;\n\n }\n\n var keyframes = prepareAnimationData( data, defaultMatrix );\n\n var animation = {\n name: object3D.uuid,\n keyframes: keyframes\n };\n\n return animation;\n\n }\n\n function prepareAnimationData( data, defaultMatrix ) {\n\n var keyframes = [];\n\n // transfer data into a sortable array\n\n for ( var time in data ) {\n\n keyframes.push( { time: parseFloat( time ), value: data[ time ] } );\n\n }\n\n // ensure keyframes are sorted by time\n\n keyframes.sort( ascending );\n\n // now we clean up all animation data, so we can use them for keyframe tracks\n\n for ( var i = 0; i < 16; i ++ ) {\n\n transformAnimationData( keyframes, i, defaultMatrix.elements[ i ] );\n\n }\n\n return keyframes;\n\n // array sort function\n\n function ascending( a, b ) {\n\n return a.time - b.time;\n\n }\n\n }\n\n var position = new THREE.Vector3();\n var scale = new THREE.Vector3();\n var quaternion = new THREE.Quaternion();\n\n function createKeyframeTracks( animation, tracks ) {\n\n var keyframes = animation.keyframes;\n var name = animation.name;\n\n var times = [];\n var positionData = [];\n var quaternionData = [];\n var scaleData = [];\n\n for ( var i = 0, l = keyframes.length; i < l; i ++ ) {\n\n var keyframe = keyframes[ i ];\n\n var time = keyframe.time;\n var value = keyframe.value;\n\n matrix.fromArray( value ).transpose();\n matrix.decompose( position, quaternion, scale );\n\n times.push( time );\n positionData.push( position.x, position.y, position.z );\n quaternionData.push( quaternion.x, quaternion.y, quaternion.z, quaternion.w );\n scaleData.push( scale.x, scale.y, scale.z );\n\n }\n\n if ( positionData.length > 0 ) tracks.push( new THREE.VectorKeyframeTrack( name + '.position', times, positionData ) );\n if ( quaternionData.length > 0 ) tracks.push( new THREE.QuaternionKeyframeTrack( name + '.quaternion', times, quaternionData ) );\n if ( scaleData.length > 0 ) tracks.push( new THREE.VectorKeyframeTrack( name + '.scale', times, scaleData ) );\n\n return tracks;\n\n }\n\n function transformAnimationData( keyframes, property, defaultValue ) {\n\n var keyframe;\n\n var empty = true;\n var i, l;\n\n // check, if values of a property are missing in our keyframes\n\n for ( i = 0, l = keyframes.length; i < l; i ++ ) {\n\n keyframe = keyframes[ i ];\n\n if ( keyframe.value[ property ] === undefined ) {\n\n keyframe.value[ property ] = null; // mark as missing\n\n } else {\n\n empty = false;\n\n }\n\n }\n\n if ( empty === true ) {\n\n // no values at all, so we set a default value\n\n for ( i = 0, l = keyframes.length; i < l; i ++ ) {\n\n keyframe = keyframes[ i ];\n\n keyframe.value[ property ] = defaultValue;\n\n }\n\n } else {\n\n // filling gaps\n\n createMissingKeyframes( keyframes, property );\n\n }\n\n }\n\n function createMissingKeyframes( keyframes, property ) {\n\n var prev, next;\n\n for ( var i = 0, l = keyframes.length; i < l; i ++ ) {\n\n var keyframe = keyframes[ i ];\n\n if ( keyframe.value[ property ] === null ) {\n\n prev = getPrev( keyframes, i, property );\n next = getNext( keyframes, i, property );\n\n if ( prev === null ) {\n\n keyframe.value[ property ] = next.value[ property ];\n continue;\n\n }\n\n if ( next === null ) {\n\n keyframe.value[ property ] = prev.value[ property ];\n continue;\n\n }\n\n interpolate( keyframe, prev, next, property );\n\n }\n\n }\n\n }\n\n function getPrev( keyframes, i, property ) {\n\n while ( i >= 0 ) {\n\n var keyframe = keyframes[ i ];\n\n if ( keyframe.value[ property ] !== null ) return keyframe;\n\n i --;\n\n }\n\n return null;\n\n }\n\n function getNext( keyframes, i, property ) {\n\n while ( i < keyframes.length ) {\n\n var keyframe = keyframes[ i ];\n\n if ( keyframe.value[ property ] !== null ) return keyframe;\n\n i ++;\n\n }\n\n return null;\n\n }\n\n function interpolate( key, prev, next, property ) {\n\n if ( ( next.time - prev.time ) === 0 ) {\n\n key.value[ property ] = prev.value[ property ];\n return;\n\n }\n\n key.value[ property ] = ( ( key.time - prev.time ) * ( next.value[ property ] - prev.value[ property ] ) / ( next.time - prev.time ) ) + prev.value[ property ];\n\n }\n\n // animation clips\n\n function parseAnimationClip( xml ) {\n\n var data = {\n name: xml.getAttribute( 'id' ) || 'default',\n start: parseFloat( xml.getAttribute( 'start' ) || 0 ),\n end: parseFloat( xml.getAttribute( 'end' ) || 0 ),\n animations: []\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'instance_animation':\n data.animations.push( parseId( child.getAttribute( 'url' ) ) );\n break;\n\n }\n\n }\n\n library.clips[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function buildAnimationClip( data ) {\n\n var tracks = [];\n\n var name = data.name;\n var duration = ( data.end - data.start ) || - 1;\n var animations = data.animations;\n\n for ( var i = 0, il = animations.length; i < il; i ++ ) {\n\n var animationTracks = getAnimation( animations[ i ] );\n\n for ( var j = 0, jl = animationTracks.length; j < jl; j ++ ) {\n\n tracks.push( animationTracks[ j ] );\n\n }\n\n }\n\n return new THREE.AnimationClip( name, duration, tracks );\n\n }\n\n function getAnimationClip( id ) {\n\n return getBuild( library.clips[ id ], buildAnimationClip );\n\n }\n\n // controller\n\n function parseController( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'skin':\n // there is exactly one skin per controller\n data.id = parseId( child.getAttribute( 'source' ) );\n data.skin = parseSkin( child );\n break;\n\n case 'morph':\n data.id = parseId( child.getAttribute( 'source' ) );\n console.warn( 'THREE.ColladaLoader: Morph target animation not supported yet.' );\n break;\n\n }\n\n }\n\n library.controllers[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseSkin( xml ) {\n\n var data = {\n sources: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'bind_shape_matrix':\n data.bindShapeMatrix = parseFloats( child.textContent );\n break;\n\n case 'source':\n var id = child.getAttribute( 'id' );\n data.sources[ id ] = parseSource( child );\n break;\n\n case 'joints':\n data.joints = parseJoints( child );\n break;\n\n case 'vertex_weights':\n data.vertexWeights = parseVertexWeights( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseJoints( xml ) {\n\n var data = {\n inputs: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'input':\n var semantic = child.getAttribute( 'semantic' );\n var id = parseId( child.getAttribute( 'source' ) );\n data.inputs[ semantic ] = id;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseVertexWeights( xml ) {\n\n var data = {\n inputs: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'input':\n var semantic = child.getAttribute( 'semantic' );\n var id = parseId( child.getAttribute( 'source' ) );\n var offset = parseInt( child.getAttribute( 'offset' ) );\n data.inputs[ semantic ] = { id: id, offset: offset };\n break;\n\n case 'vcount':\n data.vcount = parseInts( child.textContent );\n break;\n\n case 'v':\n data.v = parseInts( child.textContent );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildController( data ) {\n\n var build = {\n id: data.id\n };\n\n var geometry = library.geometries[ build.id ];\n\n if ( data.skin !== undefined ) {\n\n build.skin = buildSkin( data.skin );\n\n // we enhance the 'sources' property of the corresponding geometry with our skin data\n\n geometry.sources.skinIndices = build.skin.indices;\n geometry.sources.skinWeights = build.skin.weights;\n\n }\n\n return build;\n\n }\n\n function buildSkin( data ) {\n\n var BONE_LIMIT = 4;\n\n var build = {\n joints: [], // this must be an array to preserve the joint order\n indices: {\n array: [],\n stride: BONE_LIMIT\n },\n weights: {\n array: [],\n stride: BONE_LIMIT\n }\n };\n\n var sources = data.sources;\n var vertexWeights = data.vertexWeights;\n\n var vcount = vertexWeights.vcount;\n var v = vertexWeights.v;\n var jointOffset = vertexWeights.inputs.JOINT.offset;\n var weightOffset = vertexWeights.inputs.WEIGHT.offset;\n\n var jointSource = data.sources[ data.joints.inputs.JOINT ];\n var inverseSource = data.sources[ data.joints.inputs.INV_BIND_MATRIX ];\n\n var weights = sources[ vertexWeights.inputs.WEIGHT.id ].array;\n var stride = 0;\n\n var i, j, l;\n\n // procces skin data for each vertex\n\n for ( i = 0, l = vcount.length; i < l; i ++ ) {\n\n var jointCount = vcount[ i ]; // this is the amount of joints that affect a single vertex\n var vertexSkinData = [];\n\n for ( j = 0; j < jointCount; j ++ ) {\n\n var skinIndex = v[ stride + jointOffset ];\n var weightId = v[ stride + weightOffset ];\n var skinWeight = weights[ weightId ];\n\n vertexSkinData.push( { index: skinIndex, weight: skinWeight } );\n\n stride += 2;\n\n }\n\n // we sort the joints in descending order based on the weights.\n // this ensures, we only procced the most important joints of the vertex\n\n vertexSkinData.sort( descending );\n\n // now we provide for each vertex a set of four index and weight values.\n // the order of the skin data matches the order of vertices\n\n for ( j = 0; j < BONE_LIMIT; j ++ ) {\n\n var d = vertexSkinData[ j ];\n\n if ( d !== undefined ) {\n\n build.indices.array.push( d.index );\n build.weights.array.push( d.weight );\n\n } else {\n\n build.indices.array.push( 0 );\n build.weights.array.push( 0 );\n\n }\n\n }\n\n }\n\n // setup bind matrix\n\n if ( data.bindShapeMatrix ) {\n\n build.bindMatrix = new THREE.Matrix4().fromArray( data.bindShapeMatrix ).transpose();\n\n } else {\n\n build.bindMatrix = new THREE.Matrix4().identity();\n\n }\n\n // process bones and inverse bind matrix data\n\n for ( i = 0, l = jointSource.array.length; i < l; i ++ ) {\n\n var name = jointSource.array[ i ];\n var boneInverse = new THREE.Matrix4().fromArray( inverseSource.array, i * inverseSource.stride ).transpose();\n\n build.joints.push( { name: name, boneInverse: boneInverse } );\n\n }\n\n return build;\n\n // array sort function\n\n function descending( a, b ) {\n\n return b.weight - a.weight;\n\n }\n\n }\n\n function getController( id ) {\n\n return getBuild( library.controllers[ id ], buildController );\n\n }\n\n // image\n\n function parseImage( xml ) {\n\n var data = {\n init_from: getElementsByTagName( xml, 'init_from' )[ 0 ].textContent\n };\n\n library.images[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function buildImage( data ) {\n\n if ( data.build !== undefined ) return data.build;\n\n return data.init_from;\n\n }\n\n function getImage( id ) {\n\n var data = library.images[ id ];\n\n if ( data !== undefined ) {\n\n return getBuild( data, buildImage );\n\n }\n\n console.warn( 'THREE.ColladaLoader: Couldn\\'t find image with ID:', id );\n\n return null;\n\n }\n\n // effect\n\n function parseEffect( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'profile_COMMON':\n data.profile = parseEffectProfileCOMMON( child );\n break;\n\n }\n\n }\n\n library.effects[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseEffectProfileCOMMON( xml ) {\n\n var data = {\n surfaces: {},\n samplers: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'newparam':\n parseEffectNewparam( child, data );\n break;\n\n case 'technique':\n data.technique = parseEffectTechnique( child );\n break;\n\n case 'extra':\n data.extra = parseEffectExtra( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectNewparam( xml, data ) {\n\n var sid = xml.getAttribute( 'sid' );\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'surface':\n data.surfaces[ sid ] = parseEffectSurface( child );\n break;\n\n case 'sampler2D':\n data.samplers[ sid ] = parseEffectSampler( child );\n break;\n\n }\n\n }\n\n }\n\n function parseEffectSurface( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'init_from':\n data.init_from = child.textContent;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectSampler( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'source':\n data.source = child.textContent;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectTechnique( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'constant':\n case 'lambert':\n case 'blinn':\n case 'phong':\n data.type = child.nodeName;\n data.parameters = parseEffectParameters( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectParameters( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'emission':\n case 'diffuse':\n case 'specular':\n case 'bump':\n case 'ambient':\n case 'shininess':\n case 'transparency':\n data[ child.nodeName ] = parseEffectParameter( child );\n break;\n case 'transparent':\n data[ child.nodeName ] = {\n opaque: child.getAttribute( 'opaque' ),\n data: parseEffectParameter( child )\n };\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectParameter( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'color':\n data[ child.nodeName ] = parseFloats( child.textContent );\n break;\n\n case 'float':\n data[ child.nodeName ] = parseFloat( child.textContent );\n break;\n\n case 'texture':\n data[ child.nodeName ] = { id: child.getAttribute( 'texture' ), extra: parseEffectParameterTexture( child ) };\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectParameterTexture( xml ) {\n\n var data = {\n technique: {}\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'extra':\n parseEffectParameterTextureExtra( child, data );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectParameterTextureExtra( xml, data ) {\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique':\n parseEffectParameterTextureExtraTechnique( child, data );\n break;\n\n }\n\n }\n\n }\n\n function parseEffectParameterTextureExtraTechnique( xml, data ) {\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'repeatU':\n case 'repeatV':\n case 'offsetU':\n case 'offsetV':\n data.technique[ child.nodeName ] = parseFloat( child.textContent );\n break;\n\n case 'wrapU':\n case 'wrapV':\n\n // some files have values for wrapU/wrapV which become NaN via parseInt\n\n if ( child.textContent.toUpperCase() === 'TRUE' ) {\n\n data.technique[ child.nodeName ] = 1;\n\n } else if ( child.textContent.toUpperCase() === 'FALSE' ) {\n\n data.technique[ child.nodeName ] = 0;\n\n } else {\n\n data.technique[ child.nodeName ] = parseInt( child.textContent );\n\n }\n\n break;\n\n }\n\n }\n\n }\n\n function parseEffectExtra( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique':\n data.technique = parseEffectExtraTechnique( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseEffectExtraTechnique( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'double_sided':\n data[ child.nodeName ] = parseInt( child.textContent );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildEffect( data ) {\n\n return data;\n\n }\n\n function getEffect( id ) {\n\n return getBuild( library.effects[ id ], buildEffect );\n\n }\n\n // material\n\n function parseMaterial( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' )\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'instance_effect':\n data.url = parseId( child.getAttribute( 'url' ) );\n break;\n\n }\n\n }\n\n library.materials[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function getTextureLoader( image ) {\n\n var loader;\n\n var extension = image.slice( ( image.lastIndexOf( '.' ) - 1 >>> 0 ) + 2 ); // http://www.jstips.co/en/javascript/get-file-extension/\n extension = extension.toLowerCase();\n\n switch ( extension ) {\n\n case 'tga':\n loader = tgaLoader;\n break;\n\n default:\n loader = textureLoader;\n\n }\n\n return loader;\n\n }\n\n function buildMaterial( data ) {\n\n var effect = getEffect( data.url );\n var technique = effect.profile.technique;\n var extra = effect.profile.extra;\n\n var material;\n\n switch ( technique.type ) {\n\n case 'phong':\n case 'blinn':\n material = new THREE.MeshPhongMaterial();\n break;\n\n case 'lambert':\n material = new THREE.MeshLambertMaterial();\n break;\n\n default:\n material = new THREE.MeshBasicMaterial();\n break;\n\n }\n\n material.name = data.name;\n\n function getTexture( textureObject ) {\n\n var sampler = effect.profile.samplers[ textureObject.id ];\n var image = null;\n\n // get image\n\n if ( sampler !== undefined ) {\n\n var surface = effect.profile.surfaces[ sampler.source ];\n image = getImage( surface.init_from );\n\n } else {\n\n console.warn( 'THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530).' );\n image = getImage( textureObject.id );\n\n }\n\n // create texture if image is avaiable\n\n if ( image !== null ) {\n\n var loader = getTextureLoader( image );\n\n if ( loader !== undefined ) {\n\n var texture = loader.load( image );\n\n var extra = textureObject.extra;\n\n if ( extra !== undefined && extra.technique !== undefined && isEmpty( extra.technique ) === false ) {\n\n var technique = extra.technique;\n\n texture.wrapS = technique.wrapU ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;\n texture.wrapT = technique.wrapV ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;\n\n texture.offset.set( technique.offsetU || 0, technique.offsetV || 0 );\n texture.repeat.set( technique.repeatU || 1, technique.repeatV || 1 );\n\n } else {\n\n texture.wrapS = THREE.RepeatWrapping;\n texture.wrapT = THREE.RepeatWrapping;\n\n }\n\n return texture;\n\n } else {\n\n console.warn( 'THREE.ColladaLoader: Loader for texture %s not found.', image );\n\n return null;\n\n }\n\n } else {\n\n console.warn( 'THREE.ColladaLoader: Couldn\\'t create texture with ID:', textureObject.id );\n\n return null;\n\n }\n\n }\n\n var parameters = technique.parameters;\n\n for ( var key in parameters ) {\n\n var parameter = parameters[ key ];\n\n switch ( key ) {\n\n case 'diffuse':\n if ( parameter.color ) material.color.fromArray( parameter.color );\n if ( parameter.texture ) material.map = getTexture( parameter.texture );\n break;\n case 'specular':\n if ( parameter.color && material.specular ) material.specular.fromArray( parameter.color );\n if ( parameter.texture ) material.specularMap = getTexture( parameter.texture );\n break;\n case 'bump':\n if ( parameter.texture ) material.normalMap = getTexture( parameter.texture );\n break;\n case 'ambient':\n if ( parameter.texture ) material.lightMap = getTexture( parameter.texture );\n break;\n case 'shininess':\n if ( parameter.float && material.shininess ) material.shininess = parameter.float;\n break;\n case 'emission':\n if ( parameter.color && material.emissive ) material.emissive.fromArray( parameter.color );\n if ( parameter.texture ) material.emissiveMap = getTexture( parameter.texture );\n break;\n\n }\n\n }\n\n //\n\n var transparent = parameters[ 'transparent' ];\n var transparency = parameters[ 'transparency' ];\n\n // <transparency> does not exist but <transparent>\n\n if ( transparency === undefined && transparent ) {\n\n transparency = {\n float: 1\n };\n\n }\n\n // <transparent> does not exist but <transparency>\n\n if ( transparent === undefined && transparency ) {\n\n transparent = {\n opaque: 'A_ONE',\n data: {\n color: [ 1, 1, 1, 1 ]\n } };\n\n }\n\n if ( transparent && transparency ) {\n\n // handle case if a texture exists but no color\n\n if ( transparent.data.texture ) {\n\n // we do not set an alpha map (see #13792)\n\n material.transparent = true;\n\n } else {\n\n var color = transparent.data.color;\n\n switch ( transparent.opaque ) {\n\n case 'A_ONE':\n material.opacity = color[ 3 ] * transparency.float;\n break;\n case 'RGB_ZERO':\n material.opacity = 1 - ( color[ 0 ] * transparency.float );\n break;\n case 'A_ZERO':\n material.opacity = 1 - ( color[ 3 ] * transparency.float );\n break;\n case 'RGB_ONE':\n material.opacity = color[ 0 ] * transparency.float;\n break;\n default:\n console.warn( 'THREE.ColladaLoader: Invalid opaque type \"%s\" of transparent tag.', transparent.opaque );\n\n }\n\n if ( material.opacity < 1 ) material.transparent = true;\n\n }\n\n }\n\n //\n\n if ( extra !== undefined && extra.technique !== undefined && extra.technique.double_sided === 1 ) {\n\n material.side = THREE.DoubleSide;\n\n }\n\n return material;\n\n }\n\n function getMaterial( id ) {\n\n return getBuild( library.materials[ id ], buildMaterial );\n\n }\n\n // camera\n\n function parseCamera( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' )\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'optics':\n data.optics = parseCameraOptics( child );\n break;\n\n }\n\n }\n\n library.cameras[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseCameraOptics( xml ) {\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n switch ( child.nodeName ) {\n\n case 'technique_common':\n return parseCameraTechnique( child );\n\n }\n\n }\n\n return {};\n\n }\n\n function parseCameraTechnique( xml ) {\n\n var data = {};\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n switch ( child.nodeName ) {\n\n case 'perspective':\n case 'orthographic':\n\n data.technique = child.nodeName;\n data.parameters = parseCameraParameters( child );\n\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseCameraParameters( xml ) {\n\n var data = {};\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n switch ( child.nodeName ) {\n\n case 'xfov':\n case 'yfov':\n case 'xmag':\n case 'ymag':\n case 'znear':\n case 'zfar':\n case 'aspect_ratio':\n data[ child.nodeName ] = parseFloat( child.textContent );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildCamera( data ) {\n\n var camera;\n\n switch ( data.optics.technique ) {\n\n case 'perspective':\n camera = new THREE.PerspectiveCamera(\n data.optics.parameters.yfov,\n data.optics.parameters.aspect_ratio,\n data.optics.parameters.znear,\n data.optics.parameters.zfar\n );\n break;\n\n case 'orthographic':\n var ymag = data.optics.parameters.ymag;\n var xmag = data.optics.parameters.xmag;\n var aspectRatio = data.optics.parameters.aspect_ratio;\n\n xmag = ( xmag === undefined ) ? ( ymag * aspectRatio ) : xmag;\n ymag = ( ymag === undefined ) ? ( xmag / aspectRatio ) : ymag;\n\n xmag *= 0.5;\n ymag *= 0.5;\n\n camera = new THREE.OrthographicCamera(\n - xmag, xmag, ymag, - ymag, // left, right, top, bottom\n data.optics.parameters.znear,\n data.optics.parameters.zfar\n );\n break;\n\n default:\n camera = new THREE.PerspectiveCamera();\n break;\n\n }\n\n camera.name = data.name;\n\n return camera;\n\n }\n\n function getCamera( id ) {\n\n var data = library.cameras[ id ];\n\n if ( data !== undefined ) {\n\n return getBuild( data, buildCamera );\n\n }\n\n console.warn( 'THREE.ColladaLoader: Couldn\\'t find camera with ID:', id );\n\n return null;\n\n }\n\n // light\n\n function parseLight( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique_common':\n data = parseLightTechnique( child );\n break;\n\n }\n\n }\n\n library.lights[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseLightTechnique( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'directional':\n case 'point':\n case 'spot':\n case 'ambient':\n\n data.technique = child.nodeName;\n data.parameters = parseLightParameters( child );\n\n }\n\n }\n\n return data;\n\n }\n\n function parseLightParameters( xml ) {\n\n var data = {};\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'color':\n var array = parseFloats( child.textContent );\n data.color = new THREE.Color().fromArray( array );\n break;\n\n case 'falloff_angle':\n data.falloffAngle = parseFloat( child.textContent );\n break;\n\n case 'quadratic_attenuation':\n var f = parseFloat( child.textContent );\n data.distance = f ? Math.sqrt( 1 / f ) : 0;\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildLight( data ) {\n\n var light;\n\n switch ( data.technique ) {\n\n case 'directional':\n light = new THREE.DirectionalLight();\n break;\n\n case 'point':\n light = new THREE.PointLight();\n break;\n\n case 'spot':\n light = new THREE.SpotLight();\n break;\n\n case 'ambient':\n light = new THREE.AmbientLight();\n break;\n\n }\n\n if ( data.parameters.color ) light.color.copy( data.parameters.color );\n if ( data.parameters.distance ) light.distance = data.parameters.distance;\n\n return light;\n\n }\n\n function getLight( id ) {\n\n var data = library.lights[ id ];\n\n if ( data !== undefined ) {\n\n return getBuild( data, buildLight );\n\n }\n\n console.warn( 'THREE.ColladaLoader: Couldn\\'t find light with ID:', id );\n\n return null;\n\n }\n\n // geometry\n\n function parseGeometry( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ),\n sources: {},\n vertices: {},\n primitives: []\n };\n\n var mesh = getElementsByTagName( xml, 'mesh' )[ 0 ];\n\n // the following tags inside geometry are not supported yet (see https://github.com/mrdoob/three.js/pull/12606): convex_mesh, spline, brep\n if ( mesh === undefined ) return;\n\n for ( var i = 0; i < mesh.childNodes.length; i ++ ) {\n\n var child = mesh.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n var id = child.getAttribute( 'id' );\n\n switch ( child.nodeName ) {\n\n case 'source':\n data.sources[ id ] = parseSource( child );\n break;\n\n case 'vertices':\n // data.sources[ id ] = data.sources[ parseId( getElementsByTagName( child, 'input' )[ 0 ].getAttribute( 'source' ) ) ];\n data.vertices = parseGeometryVertices( child );\n break;\n\n case 'polygons':\n console.warn( 'THREE.ColladaLoader: Unsupported primitive type: ', child.nodeName );\n break;\n\n case 'lines':\n case 'linestrips':\n case 'polylist':\n case 'triangles':\n data.primitives.push( parseGeometryPrimitive( child ) );\n break;\n\n default:\n console.log( child );\n\n }\n\n }\n\n library.geometries[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parseSource( xml ) {\n\n var data = {\n array: [],\n stride: 3\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'float_array':\n data.array = parseFloats( child.textContent );\n break;\n\n case 'Name_array':\n data.array = parseStrings( child.textContent );\n break;\n\n case 'technique_common':\n var accessor = getElementsByTagName( child, 'accessor' )[ 0 ];\n\n if ( accessor !== undefined ) {\n\n data.stride = parseInt( accessor.getAttribute( 'stride' ) );\n\n }\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseGeometryVertices( xml ) {\n\n var data = {};\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n data[ child.getAttribute( 'semantic' ) ] = parseId( child.getAttribute( 'source' ) );\n\n }\n\n return data;\n\n }\n\n function parseGeometryPrimitive( xml ) {\n\n var primitive = {\n type: xml.nodeName,\n material: xml.getAttribute( 'material' ),\n count: parseInt( xml.getAttribute( 'count' ) ),\n inputs: {},\n stride: 0,\n hasUV: false\n };\n\n for ( var i = 0, l = xml.childNodes.length; i < l; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'input':\n var id = parseId( child.getAttribute( 'source' ) );\n var semantic = child.getAttribute( 'semantic' );\n var offset = parseInt( child.getAttribute( 'offset' ) );\n var set = parseInt( child.getAttribute( 'set' ) );\n var inputname = ( set > 0 ? semantic + set : semantic );\n primitive.inputs[ inputname ] = { id: id, offset: offset };\n primitive.stride = Math.max( primitive.stride, offset + 1 );\n if ( semantic === 'TEXCOORD' ) primitive.hasUV = true;\n break;\n\n case 'vcount':\n primitive.vcount = parseInts( child.textContent );\n break;\n\n case 'p':\n primitive.p = parseInts( child.textContent );\n break;\n\n }\n\n }\n\n return primitive;\n\n }\n\n function groupPrimitives( primitives ) {\n\n var build = {};\n\n for ( var i = 0; i < primitives.length; i ++ ) {\n\n var primitive = primitives[ i ];\n\n if ( build[ primitive.type ] === undefined ) build[ primitive.type ] = [];\n\n build[ primitive.type ].push( primitive );\n\n }\n\n return build;\n\n }\n\n function checkUVCoordinates( primitives ) {\n\n var count = 0;\n\n for ( var i = 0, l = primitives.length; i < l; i ++ ) {\n\n var primitive = primitives[ i ];\n\n if ( primitive.hasUV === true ) {\n\n count ++;\n\n }\n\n }\n\n if ( count > 0 && count < primitives.length ) {\n\n primitives.uvsNeedsFix = true;\n\n }\n\n }\n\n function buildGeometry( data ) {\n\n var build = {};\n\n var sources = data.sources;\n var vertices = data.vertices;\n var primitives = data.primitives;\n\n if ( primitives.length === 0 ) return {};\n\n // our goal is to create one buffer geometry for a single type of primitives\n // first, we group all primitives by their type\n\n var groupedPrimitives = groupPrimitives( primitives );\n\n for ( var type in groupedPrimitives ) {\n\n var primitiveType = groupedPrimitives[ type ];\n\n // second, ensure consistent uv coordinates for each type of primitives (polylist,triangles or lines)\n\n checkUVCoordinates( primitiveType );\n\n // third, create a buffer geometry for each type of primitives\n\n build[ type ] = buildGeometryType( primitiveType, sources, vertices );\n\n }\n\n return build;\n\n }\n\n function buildGeometryType( primitives, sources, vertices ) {\n\n var build = {};\n\n var position = { array: [], stride: 0 };\n var normal = { array: [], stride: 0 };\n var uv = { array: [], stride: 0 };\n var uv2 = { array: [], stride: 0 };\n var color = { array: [], stride: 0 };\n\n var skinIndex = { array: [], stride: 4 };\n var skinWeight = { array: [], stride: 4 };\n\n var geometry = new THREE.BufferGeometry();\n\n var materialKeys = [];\n\n var start = 0;\n\n for ( var p = 0; p < primitives.length; p ++ ) {\n\n var primitive = primitives[ p ];\n var inputs = primitive.inputs;\n\n // groups\n\n var count = 0;\n\n switch ( primitive.type ) {\n\n case 'lines':\n case 'linestrips':\n count = primitive.count * 2;\n break;\n\n case 'triangles':\n count = primitive.count * 3;\n break;\n\n case 'polylist':\n\n for ( var g = 0; g < primitive.count; g ++ ) {\n\n var vc = primitive.vcount[ g ];\n\n switch ( vc ) {\n\n case 3:\n count += 3; // single triangle\n break;\n\n case 4:\n count += 6; // quad, subdivided into two triangles\n break;\n\n default:\n count += ( vc - 2 ) * 3; // polylist with more than four vertices\n break;\n\n }\n\n }\n\n break;\n\n default:\n console.warn( 'THREE.ColladaLoader: Unknow primitive type:', primitive.type );\n\n }\n\n geometry.addGroup( start, count, p );\n start += count;\n\n // material\n\n if ( primitive.material ) {\n\n materialKeys.push( primitive.material );\n\n }\n\n // geometry data\n\n for ( var name in inputs ) {\n\n var input = inputs[ name ];\n\n switch ( name ) {\n\n case 'VERTEX':\n for ( var key in vertices ) {\n\n var id = vertices[ key ];\n\n switch ( key ) {\n\n case 'POSITION':\n var prevLength = position.array.length;\n buildGeometryData( primitive, sources[ id ], input.offset, position.array );\n position.stride = sources[ id ].stride;\n\n if ( sources.skinWeights && sources.skinIndices ) {\n\n buildGeometryData( primitive, sources.skinIndices, input.offset, skinIndex.array );\n buildGeometryData( primitive, sources.skinWeights, input.offset, skinWeight.array );\n\n }\n\n // see #3803\n\n if ( primitive.hasUV === false && primitives.uvsNeedsFix === true ) {\n\n var count = ( position.array.length - prevLength ) / position.stride;\n\n for ( var i = 0; i < count; i ++ ) {\n\n // fill missing uv coordinates\n\n uv.array.push( 0, 0 );\n\n }\n\n }\n break;\n\n case 'NORMAL':\n buildGeometryData( primitive, sources[ id ], input.offset, normal.array );\n normal.stride = sources[ id ].stride;\n break;\n\n case 'COLOR':\n buildGeometryData( primitive, sources[ id ], input.offset, color.array );\n color.stride = sources[ id ].stride;\n break;\n\n case 'TEXCOORD':\n buildGeometryData( primitive, sources[ id ], input.offset, uv.array );\n uv.stride = sources[ id ].stride;\n break;\n\n case 'TEXCOORD1':\n buildGeometryData( primitive, sources[ id ], input.offset, uv2.array );\n uv.stride = sources[ id ].stride;\n break;\n\n default:\n console.warn( 'THREE.ColladaLoader: Semantic \"%s\" not handled in geometry build process.', key );\n\n }\n\n }\n break;\n\n case 'NORMAL':\n buildGeometryData( primitive, sources[ input.id ], input.offset, normal.array );\n normal.stride = sources[ input.id ].stride;\n break;\n\n case 'COLOR':\n buildGeometryData( primitive, sources[ input.id ], input.offset, color.array );\n color.stride = sources[ input.id ].stride;\n break;\n\n case 'TEXCOORD':\n buildGeometryData( primitive, sources[ input.id ], input.offset, uv.array );\n uv.stride = sources[ input.id ].stride;\n break;\n\n case 'TEXCOORD1':\n buildGeometryData( primitive, sources[ input.id ], input.offset, uv2.array );\n uv2.stride = sources[ input.id ].stride;\n break;\n\n }\n\n }\n\n }\n\n // build geometry\n\n if ( position.array.length > 0 ) geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( position.array, position.stride ) );\n if ( normal.array.length > 0 ) geometry.addAttribute( 'normal', new THREE.Float32BufferAttribute( normal.array, normal.stride ) );\n if ( color.array.length > 0 ) geometry.addAttribute( 'color', new THREE.Float32BufferAttribute( color.array, color.stride ) );\n if ( uv.array.length > 0 ) geometry.addAttribute( 'uv', new THREE.Float32BufferAttribute( uv.array, uv.stride ) );\n if ( uv2.array.length > 0 ) geometry.addAttribute( 'uv2', new THREE.Float32BufferAttribute( uv2.array, uv2.stride ) );\n\n if ( skinIndex.array.length > 0 ) geometry.addAttribute( 'skinIndex', new THREE.Float32BufferAttribute( skinIndex.array, skinIndex.stride ) );\n if ( skinWeight.array.length > 0 ) geometry.addAttribute( 'skinWeight', new THREE.Float32BufferAttribute( skinWeight.array, skinWeight.stride ) );\n\n build.data = geometry;\n build.type = primitives[ 0 ].type;\n build.materialKeys = materialKeys;\n\n return build;\n\n }\n\n function buildGeometryData( primitive, source, offset, array ) {\n\n var indices = primitive.p;\n var stride = primitive.stride;\n var vcount = primitive.vcount;\n\n function pushVector( i ) {\n\n var index = indices[ i + offset ] * sourceStride;\n var length = index + sourceStride;\n\n for ( ; index < length; index ++ ) {\n\n array.push( sourceArray[ index ] );\n\n }\n\n }\n\n var sourceArray = source.array;\n var sourceStride = source.stride;\n\n if ( primitive.vcount !== undefined ) {\n\n var index = 0;\n\n for ( var i = 0, l = vcount.length; i < l; i ++ ) {\n\n var count = vcount[ i ];\n\n if ( count === 4 ) {\n\n var a = index + stride * 0;\n var b = index + stride * 1;\n var c = index + stride * 2;\n var d = index + stride * 3;\n\n pushVector( a ); pushVector( b ); pushVector( d );\n pushVector( b ); pushVector( c ); pushVector( d );\n\n } else if ( count === 3 ) {\n\n var a = index + stride * 0;\n var b = index + stride * 1;\n var c = index + stride * 2;\n\n pushVector( a ); pushVector( b ); pushVector( c );\n\n } else if ( count > 4 ) {\n\n for ( var k = 1, kl = ( count - 2 ); k <= kl; k ++ ) {\n\n var a = index + stride * 0;\n var b = index + stride * k;\n var c = index + stride * ( k + 1 );\n\n pushVector( a ); pushVector( b ); pushVector( c );\n\n }\n\n }\n\n index += stride * count;\n\n }\n\n } else {\n\n for ( var i = 0, l = indices.length; i < l; i += stride ) {\n\n pushVector( i );\n\n }\n\n }\n\n }\n\n function getGeometry( id ) {\n\n return getBuild( library.geometries[ id ], buildGeometry );\n\n }\n\n // kinematics\n\n function parseKinematicsModel( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ) || '',\n joints: {},\n links: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique_common':\n parseKinematicsTechniqueCommon( child, data );\n break;\n\n }\n\n }\n\n library.kinematicsModels[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function buildKinematicsModel( data ) {\n\n if ( data.build !== undefined ) return data.build;\n\n return data;\n\n }\n\n function getKinematicsModel( id ) {\n\n return getBuild( library.kinematicsModels[ id ], buildKinematicsModel );\n\n }\n\n function parseKinematicsTechniqueCommon( xml, data ) {\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'joint':\n data.joints[ child.getAttribute( 'sid' ) ] = parseKinematicsJoint( child );\n break;\n\n case 'link':\n data.links.push( parseKinematicsLink( child ) );\n break;\n\n }\n\n }\n\n }\n\n function parseKinematicsJoint( xml ) {\n\n var data;\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'prismatic':\n case 'revolute':\n data = parseKinematicsJointParameter( child );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseKinematicsJointParameter( xml, data ) {\n\n var data = {\n sid: xml.getAttribute( 'sid' ),\n name: xml.getAttribute( 'name' ) || '',\n axis: new THREE.Vector3(),\n limits: {\n min: 0,\n max: 0\n },\n type: xml.nodeName,\n static: false,\n zeroPosition: 0,\n middlePosition: 0\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'axis':\n var array = parseFloats( child.textContent );\n data.axis.fromArray( array );\n break;\n case 'limits':\n var max = child.getElementsByTagName( 'max' )[ 0 ];\n var min = child.getElementsByTagName( 'min' )[ 0 ];\n\n data.limits.max = parseFloat( max.textContent );\n data.limits.min = parseFloat( min.textContent );\n break;\n\n }\n\n }\n\n // if min is equal to or greater than max, consider the joint static\n\n if ( data.limits.min >= data.limits.max ) {\n\n data.static = true;\n\n }\n\n // calculate middle position\n\n data.middlePosition = ( data.limits.min + data.limits.max ) / 2.0;\n\n return data;\n\n }\n\n function parseKinematicsLink( xml ) {\n\n var data = {\n sid: xml.getAttribute( 'sid' ),\n name: xml.getAttribute( 'name' ) || '',\n attachments: [],\n transforms: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'attachment_full':\n data.attachments.push( parseKinematicsAttachment( child ) );\n break;\n\n case 'matrix':\n case 'translate':\n case 'rotate':\n data.transforms.push( parseKinematicsTransform( child ) );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseKinematicsAttachment( xml ) {\n\n var data = {\n joint: xml.getAttribute( 'joint' ).split( '/' ).pop(),\n transforms: [],\n links: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'link':\n data.links.push( parseKinematicsLink( child ) );\n break;\n\n case 'matrix':\n case 'translate':\n case 'rotate':\n data.transforms.push( parseKinematicsTransform( child ) );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function parseKinematicsTransform( xml ) {\n\n var data = {\n type: xml.nodeName\n };\n\n var array = parseFloats( xml.textContent );\n\n switch ( data.type ) {\n\n case 'matrix':\n data.obj = new THREE.Matrix4();\n data.obj.fromArray( array ).transpose();\n break;\n\n case 'translate':\n data.obj = new THREE.Vector3();\n data.obj.fromArray( array );\n break;\n\n case 'rotate':\n data.obj = new THREE.Vector3();\n data.obj.fromArray( array );\n data.angle = THREE.Math.degToRad( array[ 3 ] );\n break;\n\n }\n\n return data;\n\n }\n\n // physics\n\n function parsePhysicsModel( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ) || '',\n rigidBodies: {}\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'rigid_body':\n data.rigidBodies[ child.getAttribute( 'name' ) ] = {};\n parsePhysicsRigidBody( child, data.rigidBodies[ child.getAttribute( 'name' ) ] );\n break;\n\n }\n\n }\n\n library.physicsModels[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function parsePhysicsRigidBody( xml, data ) {\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'technique_common':\n parsePhysicsTechniqueCommon( child, data );\n break;\n\n }\n\n }\n\n }\n\n function parsePhysicsTechniqueCommon( xml, data ) {\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'inertia':\n data.inertia = parseFloats( child.textContent );\n break;\n\n case 'mass':\n data.mass = parseFloats( child.textContent )[ 0 ];\n break;\n\n }\n\n }\n\n }\n\n // scene\n\n function parseKinematicsScene( xml ) {\n\n var data = {\n bindJointAxis: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'bind_joint_axis':\n data.bindJointAxis.push( parseKinematicsBindJointAxis( child ) );\n break;\n\n }\n\n }\n\n library.kinematicsScenes[ parseId( xml.getAttribute( 'url' ) ) ] = data;\n\n }\n\n function parseKinematicsBindJointAxis( xml ) {\n\n var data = {\n target: xml.getAttribute( 'target' ).split( '/' ).pop()\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'axis':\n var param = child.getElementsByTagName( 'param' )[ 0 ];\n data.axis = param.textContent;\n var tmpJointIndex = data.axis.split( 'inst_' ).pop().split( 'axis' )[ 0 ];\n data.jointIndex = tmpJointIndex.substr( 0, tmpJointIndex.length - 1 );\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildKinematicsScene( data ) {\n\n if ( data.build !== undefined ) return data.build;\n\n return data;\n\n }\n\n function getKinematicsScene( id ) {\n\n return getBuild( library.kinematicsScenes[ id ], buildKinematicsScene );\n\n }\n\n function setupKinematics() {\n\n var kinematicsModelId = Object.keys( library.kinematicsModels )[ 0 ];\n var kinematicsSceneId = Object.keys( library.kinematicsScenes )[ 0 ];\n var visualSceneId = Object.keys( library.visualScenes )[ 0 ];\n\n if ( kinematicsModelId === undefined || kinematicsSceneId === undefined ) return;\n\n var kinematicsModel = getKinematicsModel( kinematicsModelId );\n var kinematicsScene = getKinematicsScene( kinematicsSceneId );\n var visualScene = getVisualScene( visualSceneId );\n\n var bindJointAxis = kinematicsScene.bindJointAxis;\n var jointMap = {};\n\n for ( var i = 0, l = bindJointAxis.length; i < l; i ++ ) {\n\n var axis = bindJointAxis[ i ];\n\n // the result of the following query is an element of type 'translate', 'rotate','scale' or 'matrix'\n\n var targetElement = collada.querySelector( '[sid=\"' + axis.target + '\"]' );\n\n if ( targetElement ) {\n\n // get the parent of the transfrom element\n\n var parentVisualElement = targetElement.parentElement;\n\n // connect the joint of the kinematics model with the element in the visual scene\n\n connect( axis.jointIndex, parentVisualElement );\n\n }\n\n }\n\n function connect( jointIndex, visualElement ) {\n\n var visualElementName = visualElement.getAttribute( 'name' );\n var joint = kinematicsModel.joints[ jointIndex ];\n\n visualScene.traverse( function ( object ) {\n\n if ( object.name === visualElementName ) {\n\n jointMap[ jointIndex ] = {\n object: object,\n transforms: buildTransformList( visualElement ),\n joint: joint,\n position: joint.zeroPosition\n };\n\n }\n\n } );\n\n }\n\n var m0 = new THREE.Matrix4();\n\n kinematics = {\n\n joints: kinematicsModel && kinematicsModel.joints,\n\n getJointValue: function ( jointIndex ) {\n\n var jointData = jointMap[ jointIndex ];\n\n if ( jointData ) {\n\n return jointData.position;\n\n } else {\n\n console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' doesn\\'t exist.' );\n\n }\n\n },\n\n setJointValue: function ( jointIndex, value ) {\n\n var jointData = jointMap[ jointIndex ];\n\n if ( jointData ) {\n\n var joint = jointData.joint;\n\n if ( value > joint.limits.max || value < joint.limits.min ) {\n\n console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' value ' + value + ' outside of limits (min: ' + joint.limits.min + ', max: ' + joint.limits.max + ').' );\n\n } else if ( joint.static ) {\n\n console.warn( 'THREE.ColladaLoader: Joint ' + jointIndex + ' is static.' );\n\n } else {\n\n var object = jointData.object;\n var axis = joint.axis;\n var transforms = jointData.transforms;\n\n matrix.identity();\n\n // each update, we have to apply all transforms in the correct order\n\n for ( var i = 0; i < transforms.length; i ++ ) {\n\n var transform = transforms[ i ];\n\n // if there is a connection of the transform node with a joint, apply the joint value\n\n if ( transform.sid && transform.sid.indexOf( jointIndex ) !== - 1 ) {\n\n switch ( joint.type ) {\n\n case 'revolute':\n matrix.multiply( m0.makeRotationAxis( axis, THREE.Math.degToRad( value ) ) );\n break;\n\n case 'prismatic':\n matrix.multiply( m0.makeTranslation( axis.x * value, axis.y * value, axis.z * value ) );\n break;\n\n default:\n console.warn( 'THREE.ColladaLoader: Unknown joint type: ' + joint.type );\n break;\n\n }\n\n } else {\n\n switch ( transform.type ) {\n\n case 'matrix':\n matrix.multiply( transform.obj );\n break;\n\n case 'translate':\n matrix.multiply( m0.makeTranslation( transform.obj.x, transform.obj.y, transform.obj.z ) );\n break;\n\n case 'scale':\n matrix.scale( transform.obj );\n break;\n\n case 'rotate':\n matrix.multiply( m0.makeRotationAxis( transform.obj, transform.angle ) );\n break;\n\n }\n\n }\n\n }\n\n object.matrix.copy( matrix );\n object.matrix.decompose( object.position, object.quaternion, object.scale );\n\n jointMap[ jointIndex ].position = value;\n\n }\n\n } else {\n\n console.log( 'THREE.ColladaLoader: ' + jointIndex + ' does not exist.' );\n\n }\n\n }\n\n };\n\n }\n\n function buildTransformList( node ) {\n\n var transforms = [];\n\n var xml = collada.querySelector( '[id=\"' + node.id + '\"]' );\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'matrix':\n var array = parseFloats( child.textContent );\n var matrix = new THREE.Matrix4().fromArray( array ).transpose();\n transforms.push( {\n sid: child.getAttribute( 'sid' ),\n type: child.nodeName,\n obj: matrix\n } );\n break;\n\n case 'translate':\n case 'scale':\n var array = parseFloats( child.textContent );\n var vector = new THREE.Vector3().fromArray( array );\n transforms.push( {\n sid: child.getAttribute( 'sid' ),\n type: child.nodeName,\n obj: vector\n } );\n break;\n\n case 'rotate':\n var array = parseFloats( child.textContent );\n var vector = new THREE.Vector3().fromArray( array );\n var angle = THREE.Math.degToRad( array[ 3 ] );\n transforms.push( {\n sid: child.getAttribute( 'sid' ),\n type: child.nodeName,\n obj: vector,\n angle: angle\n } );\n break;\n\n }\n\n }\n\n return transforms;\n\n }\n\n // nodes\n\n function prepareNodes( xml ) {\n\n var elements = xml.getElementsByTagName( 'node' );\n\n // ensure all node elements have id attributes\n\n for ( var i = 0; i < elements.length; i ++ ) {\n\n var element = elements[ i ];\n\n if ( element.hasAttribute( 'id' ) === false ) {\n\n element.setAttribute( 'id', generateId() );\n\n }\n\n }\n\n }\n\n var matrix = new THREE.Matrix4();\n var vector = new THREE.Vector3();\n\n function parseNode( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ) || '',\n type: xml.getAttribute( 'type' ),\n id: xml.getAttribute( 'id' ),\n sid: xml.getAttribute( 'sid' ),\n matrix: new THREE.Matrix4(),\n nodes: [],\n instanceCameras: [],\n instanceControllers: [],\n instanceLights: [],\n instanceGeometries: [],\n instanceNodes: [],\n transforms: {}\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n if ( child.nodeType !== 1 ) continue;\n\n switch ( child.nodeName ) {\n\n case 'node':\n data.nodes.push( child.getAttribute( 'id' ) );\n parseNode( child );\n break;\n\n case 'instance_camera':\n data.instanceCameras.push( parseId( child.getAttribute( 'url' ) ) );\n break;\n\n case 'instance_controller':\n data.instanceControllers.push( parseNodeInstance( child ) );\n break;\n\n case 'instance_light':\n data.instanceLights.push( parseId( child.getAttribute( 'url' ) ) );\n break;\n\n case 'instance_geometry':\n data.instanceGeometries.push( parseNodeInstance( child ) );\n break;\n\n case 'instance_node':\n data.instanceNodes.push( parseId( child.getAttribute( 'url' ) ) );\n break;\n\n case 'matrix':\n var array = parseFloats( child.textContent );\n data.matrix.multiply( matrix.fromArray( array ).transpose() );\n data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName;\n break;\n\n case 'translate':\n var array = parseFloats( child.textContent );\n vector.fromArray( array );\n data.matrix.multiply( matrix.makeTranslation( vector.x, vector.y, vector.z ) );\n data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName;\n break;\n\n case 'rotate':\n var array = parseFloats( child.textContent );\n var angle = THREE.Math.degToRad( array[ 3 ] );\n data.matrix.multiply( matrix.makeRotationAxis( vector.fromArray( array ), angle ) );\n data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName;\n break;\n\n case 'scale':\n var array = parseFloats( child.textContent );\n data.matrix.scale( vector.fromArray( array ) );\n data.transforms[ child.getAttribute( 'sid' ) ] = child.nodeName;\n break;\n\n case 'extra':\n break;\n\n default:\n console.log( child );\n\n }\n\n }\n\n if ( hasNode( data.id ) ) {\n\n console.warn( 'THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.', data.id );\n\n } else {\n\n library.nodes[ data.id ] = data;\n\n }\n\n return data;\n\n }\n\n function parseNodeInstance( xml ) {\n\n var data = {\n id: parseId( xml.getAttribute( 'url' ) ),\n materials: {},\n skeletons: []\n };\n\n for ( var i = 0; i < xml.childNodes.length; i ++ ) {\n\n var child = xml.childNodes[ i ];\n\n switch ( child.nodeName ) {\n\n case 'bind_material':\n var instances = child.getElementsByTagName( 'instance_material' );\n\n for ( var j = 0; j < instances.length; j ++ ) {\n\n var instance = instances[ j ];\n var symbol = instance.getAttribute( 'symbol' );\n var target = instance.getAttribute( 'target' );\n\n data.materials[ symbol ] = parseId( target );\n\n }\n\n break;\n\n case 'skeleton':\n data.skeletons.push( parseId( child.textContent ) );\n break;\n\n default:\n break;\n\n }\n\n }\n\n return data;\n\n }\n\n function buildSkeleton( skeletons, joints ) {\n\n var boneData = [];\n var sortedBoneData = [];\n\n var i, j, data;\n\n // a skeleton can have multiple root bones. collada expresses this\n // situtation with multiple \"skeleton\" tags per controller instance\n\n for ( i = 0; i < skeletons.length; i ++ ) {\n\n var skeleton = skeletons[ i ];\n\n var root;\n\n if ( hasNode( skeleton ) ) {\n\n root = getNode( skeleton );\n buildBoneHierarchy( root, joints, boneData );\n\n } else if ( hasVisualScene( skeleton ) ) {\n\n // handle case where the skeleton refers to the visual scene (#13335)\n\n var visualScene = library.visualScenes[ skeleton ];\n var children = visualScene.children;\n\n for ( var j = 0; j < children.length; j ++ ) {\n\n var child = children[ j ];\n\n if ( child.type === 'JOINT' ) {\n\n var root = getNode( child.id );\n buildBoneHierarchy( root, joints, boneData );\n\n }\n\n }\n\n } else {\n\n console.error( 'THREE.ColladaLoader: Unable to find root bone of skeleton with ID:', skeleton );\n\n }\n\n }\n\n // sort bone data (the order is defined in the corresponding controller)\n\n for ( i = 0; i < joints.length; i ++ ) {\n\n for ( j = 0; j < boneData.length; j ++ ) {\n\n data = boneData[ j ];\n\n if ( data.bone.name === joints[ i ].name ) {\n\n sortedBoneData[ i ] = data;\n data.processed = true;\n break;\n\n }\n\n }\n\n }\n\n // add unprocessed bone data at the end of the list\n\n for ( i = 0; i < boneData.length; i ++ ) {\n\n data = boneData[ i ];\n\n if ( data.processed === false ) {\n\n sortedBoneData.push( data );\n data.processed = true;\n\n }\n\n }\n\n // setup arrays for skeleton creation\n\n var bones = [];\n var boneInverses = [];\n\n for ( i = 0; i < sortedBoneData.length; i ++ ) {\n\n data = sortedBoneData[ i ];\n\n bones.push( data.bone );\n boneInverses.push( data.boneInverse );\n\n }\n\n return new THREE.Skeleton( bones, boneInverses );\n\n }\n\n function buildBoneHierarchy( root, joints, boneData ) {\n\n // setup bone data from visual scene\n\n root.traverse( function ( object ) {\n\n if ( object.isBone === true ) {\n\n var boneInverse;\n\n // retrieve the boneInverse from the controller data\n\n for ( var i = 0; i < joints.length; i ++ ) {\n\n var joint = joints[ i ];\n\n if ( joint.name === object.name ) {\n\n boneInverse = joint.boneInverse;\n break;\n\n }\n\n }\n\n if ( boneInverse === undefined ) {\n\n // Unfortunately, there can be joints in the visual scene that are not part of the\n // corresponding controller. In this case, we have to create a dummy boneInverse matrix\n // for the respective bone. This bone won't affect any vertices, because there are no skin indices\n // and weights defined for it. But we still have to add the bone to the sorted bone list in order to\n // ensure a correct animation of the model.\n\n boneInverse = new THREE.Matrix4();\n\n }\n\n boneData.push( { bone: object, boneInverse: boneInverse, processed: false } );\n\n }\n\n } );\n\n }\n\n function buildNode( data ) {\n\n var objects = [];\n\n var matrix = data.matrix;\n var nodes = data.nodes;\n var type = data.type;\n var instanceCameras = data.instanceCameras;\n var instanceControllers = data.instanceControllers;\n var instanceLights = data.instanceLights;\n var instanceGeometries = data.instanceGeometries;\n var instanceNodes = data.instanceNodes;\n\n // nodes\n\n for ( var i = 0, l = nodes.length; i < l; i ++ ) {\n\n objects.push( getNode( nodes[ i ] ) );\n\n }\n\n // instance cameras\n\n for ( var i = 0, l = instanceCameras.length; i < l; i ++ ) {\n\n var instanceCamera = getCamera( instanceCameras[ i ] );\n\n if ( instanceCamera !== null ) {\n\n objects.push( instanceCamera.clone() );\n\n }\n\n }\n\n // instance controllers\n\n for ( var i = 0, l = instanceControllers.length; i < l; i ++ ) {\n\n var instance = instanceControllers[ i ];\n var controller = getController( instance.id );\n var geometries = getGeometry( controller.id );\n var newObjects = buildObjects( geometries, instance.materials );\n\n var skeletons = instance.skeletons;\n var joints = controller.skin.joints;\n\n var skeleton = buildSkeleton( skeletons, joints );\n\n for ( var j = 0, jl = newObjects.length; j < jl; j ++ ) {\n\n var object = newObjects[ j ];\n\n if ( object.isSkinnedMesh ) {\n\n object.bind( skeleton, controller.skin.bindMatrix );\n object.normalizeSkinWeights();\n\n }\n\n objects.push( object );\n\n }\n\n }\n\n // instance lights\n\n for ( var i = 0, l = instanceLights.length; i < l; i ++ ) {\n\n var instanceLight = getLight( instanceLights[ i ] );\n\n if ( instanceLight !== null ) {\n\n objects.push( instanceLight.clone() );\n\n }\n\n }\n\n // instance geometries\n\n for ( var i = 0, l = instanceGeometries.length; i < l; i ++ ) {\n\n var instance = instanceGeometries[ i ];\n\n // a single geometry instance in collada can lead to multiple object3Ds.\n // this is the case when primitives are combined like triangles and lines\n\n var geometries = getGeometry( instance.id );\n var newObjects = buildObjects( geometries, instance.materials );\n\n for ( var j = 0, jl = newObjects.length; j < jl; j ++ ) {\n\n objects.push( newObjects[ j ] );\n\n }\n\n }\n\n // instance nodes\n\n for ( var i = 0, l = instanceNodes.length; i < l; i ++ ) {\n\n objects.push( getNode( instanceNodes[ i ] ).clone() );\n\n }\n\n var object;\n\n if ( nodes.length === 0 && objects.length === 1 ) {\n\n object = objects[ 0 ];\n\n } else {\n\n object = ( type === 'JOINT' ) ? new THREE.Bone() : new THREE.Group();\n\n for ( var i = 0; i < objects.length; i ++ ) {\n\n object.add( objects[ i ] );\n\n }\n\n }\n\n if ( object.name === '' ) {\n\n object.name = ( type === 'JOINT' ) ? data.sid : data.name;\n\n }\n\n object.matrix.copy( matrix );\n object.matrix.decompose( object.position, object.quaternion, object.scale );\n\n return object;\n\n }\n\n var fallbackMaterial = new THREE.MeshBasicMaterial( { color: 0xff00ff } );\n\n function resolveMaterialBinding( keys, instanceMaterials ) {\n\n var materials = [];\n\n for ( var i = 0, l = keys.length; i < l; i ++ ) {\n\n var id = instanceMaterials[ keys[ i ] ];\n\n if ( id === undefined ) {\n\n console.warn( 'THREE.ColladaLoader: Material with key %s not found. Apply fallback material.', keys[ i ] );\n materials.push( fallbackMaterial );\n\n } else {\n\n materials.push( getMaterial( id ) );\n\n }\n\n }\n\n return materials;\n\n }\n\n function buildObjects( geometries, instanceMaterials ) {\n\n var objects = [];\n\n for ( var type in geometries ) {\n\n var geometry = geometries[ type ];\n\n var materials = resolveMaterialBinding( geometry.materialKeys, instanceMaterials );\n\n // handle case if no materials are defined\n\n if ( materials.length === 0 ) {\n\n if ( type === 'lines' || type === 'linestrips' ) {\n\n materials.push( new THREE.LineBasicMaterial() );\n\n } else {\n\n materials.push( new THREE.MeshPhongMaterial() );\n\n }\n\n }\n\n // regard skinning\n\n var skinning = ( geometry.data.attributes.skinIndex !== undefined );\n\n if ( skinning ) {\n\n for ( var i = 0, l = materials.length; i < l; i ++ ) {\n\n materials[ i ].skinning = true;\n\n }\n\n }\n\n // choose between a single or multi materials (material array)\n\n var material = ( materials.length === 1 ) ? materials[ 0 ] : materials;\n\n // now create a specific 3D object\n\n var object;\n\n switch ( type ) {\n\n case 'lines':\n object = new THREE.LineSegments( geometry.data, material );\n break;\n\n case 'linestrips':\n object = new THREE.Line( geometry.data, material );\n break;\n\n case 'triangles':\n case 'polylist':\n if ( skinning ) {\n\n object = new THREE.SkinnedMesh( geometry.data, material );\n\n } else {\n\n object = new THREE.Mesh( geometry.data, material );\n\n }\n break;\n\n }\n\n objects.push( object );\n\n }\n\n return objects;\n\n }\n\n function hasNode( id ) {\n\n return library.nodes[ id ] !== undefined;\n\n }\n\n function getNode( id ) {\n\n return getBuild( library.nodes[ id ], buildNode );\n\n }\n\n // visual scenes\n\n function parseVisualScene( xml ) {\n\n var data = {\n name: xml.getAttribute( 'name' ),\n children: []\n };\n\n prepareNodes( xml );\n\n var elements = getElementsByTagName( xml, 'node' );\n\n for ( var i = 0; i < elements.length; i ++ ) {\n\n data.children.push( parseNode( elements[ i ] ) );\n\n }\n\n library.visualScenes[ xml.getAttribute( 'id' ) ] = data;\n\n }\n\n function buildVisualScene( data ) {\n\n var group = new THREE.Group();\n group.name = data.name;\n\n var children = data.children;\n\n for ( var i = 0; i < children.length; i ++ ) {\n\n var child = children[ i ];\n\n group.add( getNode( child.id ) );\n\n }\n\n return group;\n\n }\n\n function hasVisualScene( id ) {\n\n return library.visualScenes[ id ] !== undefined;\n\n }\n\n function getVisualScene( id ) {\n\n return getBuild( library.visualScenes[ id ], buildVisualScene );\n\n }\n\n // scenes\n\n function parseScene( xml ) {\n\n var instance = getElementsByTagName( xml, 'instance_visual_scene' )[ 0 ];\n return getVisualScene( parseId( instance.getAttribute( 'url' ) ) );\n\n }\n\n function setupAnimations() {\n\n var clips = library.clips;\n\n if ( isEmpty( clips ) === true ) {\n\n if ( isEmpty( library.animations ) === false ) {\n\n // if there are animations but no clips, we create a default clip for playback\n\n var tracks = [];\n\n for ( var id in library.animations ) {\n\n var animationTracks = getAnimation( id );\n\n for ( var i = 0, l = animationTracks.length; i < l; i ++ ) {\n\n tracks.push( animationTracks[ i ] );\n\n }\n\n }\n\n animations.push( new THREE.AnimationClip( 'default', - 1, tracks ) );\n\n }\n\n } else {\n\n for ( var id in clips ) {\n\n animations.push( getAnimationClip( id ) );\n\n }\n\n }\n\n }\n\n if ( text.length === 0 ) {\n\n return { scene: new THREE.Scene() };\n\n }\n\n var xml = new DOMParser().parseFromString( text, 'application/xml' );\n\n var collada = getElementsByTagName( xml, 'COLLADA' )[ 0 ];\n\n // metadata\n\n var version = collada.getAttribute( 'version' );\n console.log( 'THREE.ColladaLoader: File version', version );\n\n var asset = parseAsset( getElementsByTagName( collada, 'asset' )[ 0 ] );\n var textureLoader = new THREE.TextureLoader( this.manager );\n textureLoader.setPath( this.resourcePath || path ).setCrossOrigin( this.crossOrigin );\n\n var tgaLoader;\n\n if ( THREE.TGALoader ) {\n\n tgaLoader = new THREE.TGALoader( this.manager );\n tgaLoader.setPath( this.resourcePath || path );\n\n }\n\n //\n\n var animations = [];\n var kinematics = {};\n var count = 0;\n\n //\n\n var library = {\n animations: {},\n clips: {},\n controllers: {},\n images: {},\n effects: {},\n materials: {},\n cameras: {},\n lights: {},\n geometries: {},\n nodes: {},\n visualScenes: {},\n kinematicsModels: {},\n physicsModels: {},\n kinematicsScenes: {}\n };\n\n parseLibrary( collada, 'library_animations', 'animation', parseAnimation );\n parseLibrary( collada, 'library_animation_clips', 'animation_clip', parseAnimationClip );\n parseLibrary( collada, 'library_controllers', 'controller', parseController );\n parseLibrary( collada, 'library_images', 'image', parseImage );\n parseLibrary( collada, 'library_effects', 'effect', parseEffect );\n parseLibrary( collada, 'library_materials', 'material', parseMaterial );\n parseLibrary( collada, 'library_cameras', 'camera', parseCamera );\n parseLibrary( collada, 'library_lights', 'light', parseLight );\n parseLibrary( collada, 'library_geometries', 'geometry', parseGeometry );\n parseLibrary( collada, 'library_nodes', 'node', parseNode );\n parseLibrary( collada, 'library_visual_scenes', 'visual_scene', parseVisualScene );\n parseLibrary( collada, 'library_kinematics_models', 'kinematics_model', parseKinematicsModel );\n parseLibrary( collada, 'library_physics_models', 'physics_model', parsePhysicsModel );\n parseLibrary( collada, 'scene', 'instance_kinematics_scene', parseKinematicsScene );\n\n buildLibrary( library.animations, buildAnimation );\n buildLibrary( library.clips, buildAnimationClip );\n buildLibrary( library.controllers, buildController );\n buildLibrary( library.images, buildImage );\n buildLibrary( library.effects, buildEffect );\n buildLibrary( library.materials, buildMaterial );\n buildLibrary( library.cameras, buildCamera );\n buildLibrary( library.lights, buildLight );\n buildLibrary( library.geometries, buildGeometry );\n buildLibrary( library.visualScenes, buildVisualScene );\n\n setupAnimations();\n setupKinematics();\n\n var scene = parseScene( getElementsByTagName( collada, 'scene' )[ 0 ] );\n\n if ( asset.upAxis === 'Z_UP' ) {\n\n scene.quaternion.setFromEuler( new THREE.Euler( - Math.PI / 2, 0, 0 ) );\n\n }\n\n scene.scale.multiplyScalar( asset.unit );\n\n return {\n animations: animations,\n kinematics: kinematics,\n library: library,\n scene: scene\n };\n\n }\n\n};\n","THREE.FBXLoader = require('../../lib/FBXLoader');\n\n/**\n * fbx-model\n *\n * Loader for FBX format. Supports ASCII, but *not* binary, models.\n */\nmodule.exports = AFRAME.registerComponent('fbx-model', {\n schema: {\n src: { type: 'asset' },\n crossorigin: { default: '' }\n },\n\n init: function () {\n this.model = null;\n },\n\n update: function () {\n const data = this.data;\n if (!data.src) return;\n\n this.remove();\n const loader = new THREE.FBXLoader();\n if (data.crossorigin) loader.setCrossOrigin(data.crossorigin);\n loader.load(data.src, this.load.bind(this));\n },\n\n load: function (model) {\n this.model = model;\n this.el.setObject3D('mesh', model);\n this.el.emit('model-loaded', {format: 'fbx', model: model});\n },\n\n remove: function () {\n if (this.model) this.el.removeObject3D('mesh');\n }\n});\n","/**\n * @author Kyle-Larson https://github.com/Kyle-Larson\n * @author Takahiro https://github.com/takahirox\n * @author Lewy Blue https://github.com/looeee\n *\n * Loader loads FBX file and generates Group representing FBX scene.\n * Requires FBX file to be >= 7.0 and in ASCII or >= 6400 in Binary format\n * Versions lower than this may load but will probably have errors\n *\n * Needs Support:\n * Morph normals / blend shape normals\n *\n * FBX format references:\n * \thttps://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure\n * \thttp://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_index_html (C++ SDK reference)\n *\n * \tBinary format specification:\n *\t\thttps://code.blender.org/2013/08/fbx-binary-file-format-specification/\n */\n\n\nmodule.exports = THREE.FBXLoader = ( function () {\n\n\tvar fbxTree;\n\tvar connections;\n\tvar sceneGraph;\n\n\tfunction FBXLoader( manager ) {\n\n\t\tthis.manager = ( manager !== undefined ) ? manager : THREE.DefaultLoadingManager;\n\n\t}\n\n\tFBXLoader.prototype = {\n\n\t\tconstructor: FBXLoader,\n\n\t\tcrossOrigin: 'anonymous',\n\n\t\tload: function ( url, onLoad, onProgress, onError ) {\n\t\t\tvar self = this;\n\n\t\t\tvar resourceDirectory = THREE.LoaderUtils.extractUrlBase( url );\n\n\t\t\tvar loader = new THREE.FileLoader( this.manager );\n\t\t\tloader.setResponseType( 'arraybuffer' );\n\t\t\tloader.load( url, function ( buffer ) {\n\n\t\t\t\ttry {\n\n\t\t\t\t\tvar scene = self.parse( buffer, resourceDirectory );\n\t\t\t\t\tonLoad( scene );\n\n\t\t\t\t} catch ( error ) {\n\n\t\t\t\t\tsetTimeout( function () {\n\n\t\t\t\t\t\tif ( onError ) onError( error );\n\n\t\t\t\t\t\tself.manager.itemError( url );\n\n\t\t\t\t\t}, 0 );\n\n\t\t\t\t}\n\n\t\t\t}, onProgress, onError );\n\t\t},\n\n\t\tsetCrossOrigin: function ( value ) {\n\n\t\t\tthis.crossOrigin = value;\n\t\t\treturn this;\n\n\t\t},\n\n\t\tparse: function ( FBXBuffer, resourceDirectory ) {\n\n\t\t\tif ( isFbxFormatBinary( FBXBuffer ) ) {\n\n\t\t\t\tfbxTree = new BinaryParser().parse( FBXBuffer );\n\n\t\t\t} else {\n\n\t\t\t\tvar FBXText = convertArrayBufferToString( FBXBuffer );\n\n\t\t\t\tif ( ! isFbxFormatASCII( FBXText ) ) {\n\n\t\t\t\t\tthrow new Error( 'THREE.FBXLoader: Unknown format.' );\n\n\t\t\t\t}\n\n\t\t\t\tif ( getFbxVersion( FBXText ) < 7000 ) {\n\n\t\t\t\t\tthrow new Error( 'THREE.FBXLoader: FBX version not supported, FileVersion: ' + getFbxVersion( FBXText ) );\n\n\t\t\t\t}\n\n\t\t\t\tfbxTree = new TextParser().parse( FBXText );\n\n\t\t\t}\n\n\t\t\t//console.log( FBXTree );\n\n\t\t\tvar textureLoader = new THREE.TextureLoader( this.manager ).setPath( resourceDirectory ).setCrossOrigin( this.crossOrigin );\n\n\t\t\treturn new FBXTreeParser( textureLoader ).parse( fbxTree );\n\n\t\t}\n\n\t};\n\n\t// Parse the FBXTree object returned by the BinaryParser or TextParser and return a THREE.Group\n\tfunction FBXTreeParser( textureLoader ) {\n\n\t\tthis.textureLoader = textureLoader;\n\n\t}\n\n\tFBXTreeParser.prototype = {\n\n\t\tconstructor: FBXTreeParser,\n\n\t\tparse: function () {\n\n\t\t\tconnections = this.parseConnections();\n\n\t\t\tvar images = this.parseImages();\n\t\t\tvar textures = this.parseTextures( images );\n\t\t\tvar materials = this.parseMaterials( textures );\n\t\t\tvar deformers = this.parseDeformers();\n\t\t\tvar geometryMap = new GeometryParser().parse( deformers );\n\n\t\t\tthis.parseScene( deformers, geometryMap, materials );\n\n\t\t\treturn sceneGraph;\n\n\t\t},\n\n\t\t// Parses FBXTree.Connections which holds parent-child connections between objects (e.g. material -> texture, model->geometry )\n\t\t// and details the connection type\n\t\tparseConnections: function () {\n\n\t\t\tvar connectionMap = new Map();\n\n\t\t\tif ( 'Connections' in fbxTree ) {\n\n\t\t\t\tvar rawConnections = fbxTree.Connections.connections;\n\n\t\t\t\trawConnections.forEach( function ( rawConnection ) {\n\n\t\t\t\t\tvar fromID = rawConnection[ 0 ];\n\t\t\t\t\tvar toID = rawConnection[ 1 ];\n\t\t\t\t\tvar relationship = rawConnection[ 2 ];\n\n\t\t\t\t\tif ( ! connectionMap.has( fromID ) ) {\n\n\t\t\t\t\t\tconnectionMap.set( fromID, {\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tchildren: []\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar parentRelationship = { ID: toID, relationship: relationship };\n\t\t\t\t\tconnectionMap.get( fromID ).parents.push( parentRelationship );\n\n\t\t\t\t\tif ( ! connectionMap.has( toID ) ) {\n\n\t\t\t\t\t\tconnectionMap.set( toID, {\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tchildren: []\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar childRelationship = { ID: fromID, relationship: relationship };\n\t\t\t\t\tconnectionMap.get( toID ).children.push( childRelationship );\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\treturn connectionMap;\n\n\t\t},\n\n\t\t// Parse FBXTree.Objects.Video for embedded image data\n\t\t// These images are connected to textures in FBXTree.Objects.Textures\n\t\t// via FBXTree.Connections.\n\t\tparseImages: function () {\n\n\t\t\tvar images = {};\n\t\t\tvar blobs = {};\n\n\t\t\tif ( 'Video' in fbxTree.Objects ) {\n\n\t\t\t\tvar videoNodes = fbxTree.Objects.Video;\n\n\t\t\t\tfor ( var nodeID in videoNodes ) {\n\n\t\t\t\t\tvar videoNode = videoNodes[ nodeID ];\n\n\t\t\t\t\tvar id = parseInt( nodeID );\n\n\t\t\t\t\timages[ id ] = videoNode.RelativeFilename || videoNode.Filename;\n\n\t\t\t\t\t// raw image data is in videoNode.Content\n\t\t\t\t\tif ( 'Content' in videoNode ) {\n\n\t\t\t\t\t\tvar arrayBufferContent = ( videoNode.Content instanceof ArrayBuffer ) && ( videoNode.Content.byteLength > 0 );\n\t\t\t\t\t\tvar base64Content = ( typeof videoNode.Content === 'string' ) && ( videoNode.Content !== '' );\n\n\t\t\t\t\t\tif ( arrayBufferContent || base64Content ) {\n\n\t\t\t\t\t\t\tvar image = this.parseImage( videoNodes[ nodeID ] );\n\n\t\t\t\t\t\t\tblobs[ videoNode.RelativeFilename || videoNode.Filename ] = image;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor ( var id in images ) {\n\n\t\t\t\tvar filename = images[ id ];\n\n\t\t\t\tif ( blobs[ filename ] !== undefined ) images[ id ] = blobs[ filename ];\n\t\t\t\telse images[ id ] = images[ id ].split( '\\\\' ).pop();\n\n\t\t\t}\n\n\t\t\treturn images;\n\n\t\t},\n\n\t\t// Parse embedded image data in FBXTree.Video.Content\n\t\tparseImage: function ( videoNode ) {\n\n\t\t\tvar content = videoNode.Content;\n\t\t\tvar fileName = videoNode.RelativeFilename || videoNode.Filename;\n\t\t\tvar extension = fileName.slice( fileName.lastIndexOf( '.' ) + 1 ).toLowerCase();\n\n\t\t\tvar type;\n\n\t\t\tswitch ( extension ) {\n\n\t\t\t\tcase 'bmp':\n\n\t\t\t\t\ttype = 'image/bmp';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'jpg':\n\t\t\t\tcase 'jpeg':\n\n\t\t\t\t\ttype = 'image/jpeg';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'png':\n\n\t\t\t\t\ttype = 'image/png';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tif':\n\n\t\t\t\t\ttype = 'image/tiff';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tga':\n\n\t\t\t\t\tif ( typeof THREE.TGALoader !== 'function' ) {\n\n\t\t\t\t\t\tconsole.warn( 'FBXLoader: THREE.TGALoader is required to load TGA textures' );\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif ( THREE.Loader.Handlers.get( '.tga' ) === null ) {\n\n\t\t\t\t\t\t\tTHREE.Loader.Handlers.add( /\\.tga$/i, new THREE.TGALoader() );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttype = 'image/tga';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tconsole.warn( 'FBXLoader: Image type \"' + extension + '\" is not supported.' );\n\t\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif ( typeof content === 'string' ) { // ASCII format\n\n\t\t\t\treturn 'data:' + type + ';base64,' + content;\n\n\t\t\t} else { // Binary Format\n\n\t\t\t\tvar array = new Uint8Array( content );\n\t\t\t\treturn window.URL.createObjectURL( new Blob( [ array ], { type: type } ) );\n\n\t\t\t}\n\n\t\t},\n\n\t\t// Parse nodes in FBXTree.Objects.Texture\n\t\t// These contain details such as UV scaling, cropping, rotation etc and are connected\n\t\t// to images in FBXTree.Objects.Video\n\t\tparseTextures: function ( images ) {\n\n\t\t\tvar textureMap = new Map();\n\n\t\t\tif ( 'Texture' in fbxTree.Objects ) {\n\n\t\t\t\tvar textureNodes = fbxTree.Objects.Texture;\n\t\t\t\tfor ( var nodeID in textureNodes ) {\n\n\t\t\t\t\tvar texture = this.parseTexture( textureNodes[ nodeID ], images );\n\t\t\t\t\ttextureMap.set( parseInt( nodeID ), texture );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn textureMap;\n\n\t\t},\n\n\t\t// Parse individual node in FBXTree.Objects.Texture\n\t\tparseTexture: function ( textureNode, images ) {\n\n\t\t\tvar texture = this.loadTexture( textureNode, images );\n\n\t\t\ttexture.ID = textureNode.id;\n\n\t\t\ttexture.name = textureNode.attrName;\n\n\t\t\tvar wrapModeU = textureNode.WrapModeU;\n\t\t\tvar wrapModeV = textureNode.WrapModeV;\n\n\t\t\tvar valueU = wrapModeU !== undefined ? wrapModeU.value : 0;\n\t\t\tvar valueV = wrapModeV !== undefined ? wrapModeV.value : 0;\n\n\t\t\t// http://download.autodesk.com/us/fbx/SDKdocs/FBX_SDK_Help/files/fbxsdkref/class_k_fbx_texture.html#889640e63e2e681259ea81061b85143a\n\t\t\t// 0: repeat(default), 1: clamp\n\n\t\t\ttexture.wrapS = valueU === 0 ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;\n\t\t\ttexture.wrapT = valueV === 0 ? THREE.RepeatWrapping : THREE.ClampToEdgeWrapping;\n\n\t\t\tif ( 'Scaling' in textureNode ) {\n\n\t\t\t\tvar values = textureNode.Scaling.value;\n\n\t\t\t\ttexture.repeat.x = values[ 0 ];\n\t\t\t\ttexture.repeat.y = values[ 1 ];\n\n\t\t\t}\n\n\t\t\treturn texture;\n\n\t\t},\n\n\t\t// load a texture specified as a blob or data URI, or via an external URL using THREE.TextureLoader\n\t\tloadTexture: function ( textureNode, images ) {\n\n\t\t\tvar fileName;\n\n\t\t\tvar currentPath = this.textureLoader.path;\n\n\t\t\tvar children = connections.get( textureNode.id ).children;\n\n\t\t\tif ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) {\n\n\t\t\t\tfileName = images[ children[ 0 ].ID ];\n\n\t\t\t\tif ( fileName.indexOf( 'blob:' ) === 0 || fileName.indexOf( 'data:' ) === 0 ) {\n\n\t\t\t\t\tthis.textureLoader.setPath( undefined );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar texture;\n\n\t\t\tvar extension = textureNode.FileName.slice( - 3 ).toLowerCase();\n\n\t\t\tif ( extension === 'tga' ) {\n\n\t\t\t\tvar loader = THREE.Loader.Handlers.get( '.tga' );\n\n\t\t\t\tif ( loader === null ) {\n\n\t\t\t\t\tconsole.warn( 'FBXLoader: TGALoader not found, creating empty placeholder texture for', fileName );\n\t\t\t\t\ttexture = new THREE.Texture();\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttexture = loader.load( fileName );\n\n\t\t\t\t}\n\n\t\t\t} else if ( extension === 'psd' ) {\n\n\t\t\t\tconsole.warn( 'FBXLoader: PSD textures are not supported, creating empty placeholder texture for', fileName );\n\t\t\t\ttexture = new THREE.Texture();\n\n\t\t\t} else {\n\n\t\t\t\ttexture = this.textureLoader.load( fileName );\n\n\t\t\t}\n\n\t\t\tthis.textureLoader.setPath( currentPath );\n\n\t\t\treturn texture;\n\n\t\t},\n\n\t\t// Parse nodes in FBXTree.Objects.Material\n\t\tparseMaterials: function ( textureMap ) {\n\n\t\t\tvar materialMap = new Map();\n\n\t\t\tif ( 'Material' in fbxTree.Objects ) {\n\n\t\t\t\tvar materialNodes = fbxTree.Objects.Material;\n\n\t\t\t\tfor ( var nodeID in materialNodes ) {\n\n\t\t\t\t\tvar material = this.parseMaterial( materialNodes[ nodeID ], textureMap );\n\n\t\t\t\t\tif ( material !== null ) materialMap.set( parseInt( nodeID ), material );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn materialMap;\n\n\t\t},\n\n\t\t// Parse single node in FBXTree.Objects.Material\n\t\t// Materials are connected to texture maps in FBXTree.Objects.Textures\n\t\t// FBX format currently only supports Lambert and Phong shading models\n\t\tparseMaterial: function ( materialNode, textureMap ) {\n\n\t\t\tvar ID = materialNode.id;\n\t\t\tvar name = materialNode.attrName;\n\t\t\tvar type = materialNode.ShadingModel;\n\n\t\t\t// Case where FBX wraps shading model in property object.\n\t\t\tif ( typeof type === 'object' ) {\n\n\t\t\t\ttype = type.value;\n\n\t\t\t}\n\n\t\t\t// Ignore unused materials which don't have any connections.\n\t\t\tif ( ! connections.has( ID ) ) return null;\n\n\t\t\tvar parameters = this.parseParameters( materialNode, textureMap, ID );\n\n\t\t\tvar material;\n\n\t\t\tswitch ( type.toLowerCase() ) {\n\n\t\t\t\tcase 'phong':\n\t\t\t\t\tmaterial = new THREE.MeshPhongMaterial();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'lambert':\n\t\t\t\t\tmaterial = new THREE.MeshLambertMaterial();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: unknown material type \"%s\". Defaulting to MeshPhongMaterial.', type );\n\t\t\t\t\tmaterial = new THREE.MeshPhongMaterial( { color: 0x3300ff } );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tmaterial.setValues( parameters );\n\t\t\tmaterial.name = name;\n\n\t\t\treturn material;\n\n\t\t},\n\n\t\t// Parse FBX material and return parameters suitable for a three.js material\n\t\t// Also parse the texture map and return any textures associated with the material\n\t\tparseParameters: function ( materialNode, textureMap, ID ) {\n\n\t\t\tvar parameters = {};\n\n\t\t\tif ( materialNode.BumpFactor ) {\n\n\t\t\t\tparameters.bumpScale = materialNode.BumpFactor.value;\n\n\t\t\t}\n\t\t\tif ( materialNode.Diffuse ) {\n\n\t\t\t\tparameters.color = new THREE.Color().fromArray( materialNode.Diffuse.value );\n\n\t\t\t} else if ( materialNode.DiffuseColor && materialNode.DiffuseColor.type === 'Color' ) {\n\n\t\t\t\t// The blender exporter exports diffuse here instead of in materialNode.Diffuse\n\t\t\t\tparameters.color = new THREE.Color().fromArray( materialNode.DiffuseColor.value );\n\n\t\t\t}\n\t\t\tif ( materialNode.DisplacementFactor ) {\n\n\t\t\t\tparameters.displacementScale = materialNode.DisplacementFactor.value;\n\n\t\t\t}\n\t\t\tif ( materialNode.Emissive ) {\n\n\t\t\t\tparameters.emissive = new THREE.Color().fromArray( materialNode.Emissive.value );\n\n\t\t\t} else if ( materialNode.EmissiveColor && materialNode.EmissiveColor.type === 'Color' ) {\n\n\t\t\t\t// The blender exporter exports emissive color here instead of in materialNode.Emissive\n\t\t\t\tparameters.emissive = new THREE.Color().fromArray( materialNode.EmissiveColor.value );\n\n\t\t\t}\n\t\t\tif ( materialNode.EmissiveFactor ) {\n\n\t\t\t\tparameters.emissiveIntensity = parseFloat( materialNode.EmissiveFactor.value );\n\n\t\t\t}\n\t\t\tif ( materialNode.Opacity ) {\n\n\t\t\t\tparameters.opacity = parseFloat( materialNode.Opacity.value );\n\n\t\t\t}\n\t\t\tif ( parameters.opacity < 1.0 ) {\n\n\t\t\t\tparameters.transparent = true;\n\n\t\t\t}\n\t\t\tif ( materialNode.ReflectionFactor ) {\n\n\t\t\t\tparameters.reflectivity = materialNode.ReflectionFactor.value;\n\n\t\t\t}\n\t\t\tif ( materialNode.Shininess ) {\n\n\t\t\t\tparameters.shininess = materialNode.Shininess.value;\n\n\t\t\t}\n\t\t\tif ( materialNode.Specular ) {\n\n\t\t\t\tparameters.specular = new THREE.Color().fromArray( materialNode.Specular.value );\n\n\t\t\t} else if ( materialNode.SpecularColor && materialNode.SpecularColor.type === 'Color' ) {\n\n\t\t\t\t// The blender exporter exports specular color here instead of in materialNode.Specular\n\t\t\t\tparameters.specular = new THREE.Color().fromArray( materialNode.SpecularColor.value );\n\n\t\t\t}\n\n\t\t\tvar self = this;\n\t\t\tconnections.get( ID ).children.forEach( function ( child ) {\n\n\t\t\t\tvar type = child.relationship;\n\n\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\tcase 'Bump':\n\t\t\t\t\t\tparameters.bumpMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'DiffuseColor':\n\t\t\t\t\t\tparameters.map = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'DisplacementColor':\n\t\t\t\t\t\tparameters.displacementMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\tcase 'EmissiveColor':\n\t\t\t\t\t\tparameters.emissiveMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'NormalMap':\n\t\t\t\t\t\tparameters.normalMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'ReflectionColor':\n\t\t\t\t\t\tparameters.envMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tparameters.envMap.mapping = THREE.EquirectangularReflectionMapping;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'SpecularColor':\n\t\t\t\t\t\tparameters.specularMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'TransparentColor':\n\t\t\t\t\t\tparameters.alphaMap = self.getTexture( textureMap, child.ID );\n\t\t\t\t\t\tparameters.transparent = true;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'AmbientColor':\n\t\t\t\t\tcase 'ShininessExponent': // AKA glossiness map\n\t\t\t\t\tcase 'SpecularFactor': // AKA specularLevel\n\t\t\t\t\tcase 'VectorDisplacementColor': // NOTE: Seems to be a copy of DisplacementColor\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: %s map is not supported in three.js, skipping texture.', type );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn parameters;\n\n\t\t},\n\n\t\t// get a texture from the textureMap for use by a material.\n\t\tgetTexture: function ( textureMap, id ) {\n\n\t\t\t// if the texture is a layered texture, just use the first layer and issue a warning\n\t\t\tif ( 'LayeredTexture' in fbxTree.Objects && id in fbxTree.Objects.LayeredTexture ) {\n\n\t\t\t\tconsole.warn( 'THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer.' );\n\t\t\t\tid = connections.get( id ).children[ 0 ].ID;\n\n\t\t\t}\n\n\t\t\treturn textureMap.get( id );\n\n\t\t},\n\n\t\t// Parse nodes in FBXTree.Objects.Deformer\n\t\t// Deformer node can contain skinning or Vertex Cache animation data, however only skinning is supported here\n\t\t// Generates map of Skeleton-like objects for use later when generating and binding skeletons.\n\t\tparseDeformers: function () {\n\n\t\t\tvar skeletons = {};\n\t\t\tvar morphTargets = {};\n\n\t\t\tif ( 'Deformer' in fbxTree.Objects ) {\n\n\t\t\t\tvar DeformerNodes = fbxTree.Objects.Deformer;\n\n\t\t\t\tfor ( var nodeID in DeformerNodes ) {\n\n\t\t\t\t\tvar deformerNode = DeformerNodes[ nodeID ];\n\n\t\t\t\t\tvar relationships = connections.get( parseInt( nodeID ) );\n\n\t\t\t\t\tif ( deformerNode.attrType === 'Skin' ) {\n\n\t\t\t\t\t\tvar skeleton = this.parseSkeleton( relationships, DeformerNodes );\n\t\t\t\t\t\tskeleton.ID = nodeID;\n\n\t\t\t\t\t\tif ( relationships.parents.length > 1 ) console.warn( 'THREE.FBXLoader: skeleton attached to more than one geometry is not supported.' );\n\t\t\t\t\t\tskeleton.geometryID = relationships.parents[ 0 ].ID;\n\n\t\t\t\t\t\tskeletons[ nodeID ] = skeleton;\n\n\t\t\t\t\t} else if ( deformerNode.attrType === 'BlendShape' ) {\n\n\t\t\t\t\t\tvar morphTarget = {\n\t\t\t\t\t\t\tid: nodeID,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tmorphTarget.rawTargets = this.parseMorphTargets( relationships, DeformerNodes );\n\t\t\t\t\t\tmorphTarget.id = nodeID;\n\n\t\t\t\t\t\tif ( relationships.parents.length > 1 ) console.warn( 'THREE.FBXLoader: morph target attached to more than one geometry is not supported.' );\n\n\t\t\t\t\t\tmorphTargets[ nodeID ] = morphTarget;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn {\n\n\t\t\t\tskeletons: skeletons,\n\t\t\t\tmorphTargets: morphTargets,\n\n\t\t\t};\n\n\t\t},\n\n\t\t// Parse single nodes in FBXTree.Objects.Deformer\n\t\t// The top level skeleton node has type 'Skin' and sub nodes have type 'Cluster'\n\t\t// Each skin node represents a skeleton and each cluster node represents a bone\n\t\tparseSkeleton: function ( relationships, deformerNodes ) {\n\n\t\t\tvar rawBones = [];\n\n\t\t\trelationships.children.forEach( function ( child ) {\n\n\t\t\t\tvar boneNode = deformerNodes[ child.ID ];\n\n\t\t\t\tif ( boneNode.attrType !== 'Cluster' ) return;\n\n\t\t\t\tvar rawBone = {\n\n\t\t\t\t\tID: child.ID,\n\t\t\t\t\tindices: [],\n\t\t\t\t\tweights: [],\n\t\t\t\t\ttransform: new THREE.Matrix4().fromArray( boneNode.Transform.a ),\n\t\t\t\t\ttransformLink: new THREE.Matrix4().fromArray( boneNode.TransformLink.a ),\n\t\t\t\t\tlinkMode: boneNode.Mode,\n\n\t\t\t\t};\n\n\t\t\t\tif ( 'Indexes' in boneNode ) {\n\n\t\t\t\t\trawBone.indices = boneNode.Indexes.a;\n\t\t\t\t\trawBone.weights = boneNode.Weights.a;\n\n\t\t\t\t}\n\n\t\t\t\trawBones.push( rawBone );\n\n\t\t\t} );\n\n\t\t\treturn {\n\n\t\t\t\trawBones: rawBones,\n\t\t\t\tbones: []\n\n\t\t\t};\n\n\t\t},\n\n\t\t// The top level morph deformer node has type \"BlendShape\" and sub nodes have type \"BlendShapeChannel\"\n\t\tparseMorphTargets: function ( relationships, deformerNodes ) {\n\n\t\t\tvar rawMorphTargets = [];\n\n\t\t\tfor ( var i = 0; i < relationships.children.length; i ++ ) {\n\n\t\t\t\tif ( i === 8 ) {\n\n\t\t\t\t\tconsole.warn( 'FBXLoader: maximum of 8 morph targets supported. Ignoring additional targets.' );\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tvar child = relationships.children[ i ];\n\n\t\t\t\tvar morphTargetNode = deformerNodes[ child.ID ];\n\n\t\t\t\tvar rawMorphTarget = {\n\n\t\t\t\t\tname: morphTargetNode.attrName,\n\t\t\t\t\tinitialWeight: morphTargetNode.DeformPercent,\n\t\t\t\t\tid: morphTargetNode.id,\n\t\t\t\t\tfullWeights: morphTargetNode.FullWeights.a\n\n\t\t\t\t};\n\n\t\t\t\tif ( morphTargetNode.attrType !== 'BlendShapeChannel' ) return;\n\n\t\t\t\tvar targetRelationships = connections.get( parseInt( child.ID ) );\n\n\t\t\t\ttargetRelationships.children.forEach( function ( child ) {\n\n\t\t\t\t\tif ( child.relationship === undefined ) rawMorphTarget.geoID = child.ID;\n\n\t\t\t\t} );\n\n\t\t\t\trawMorphTargets.push( rawMorphTarget );\n\n\t\t\t}\n\n\t\t\treturn rawMorphTargets;\n\n\t\t},\n\n\t\t// create the main THREE.Group() to be returned by the loader\n\t\tparseScene: function ( deformers, geometryMap, materialMap ) {\n\n\t\t\tsceneGraph = new THREE.Group();\n\n\t\t\tvar modelMap = this.parseModels( deformers.skeletons, geometryMap, materialMap );\n\n\t\t\tvar modelNodes = fbxTree.Objects.Model;\n\n\t\t\tvar self = this;\n\t\t\tmodelMap.forEach( function ( model ) {\n\n\t\t\t\tvar modelNode = modelNodes[ model.ID ];\n\t\t\t\tself.setLookAtProperties( model, modelNode );\n\n\t\t\t\tvar parentConnections = connections.get( model.ID ).parents;\n\n\t\t\t\tparentConnections.forEach( function ( connection ) {\n\n\t\t\t\t\tvar parent = modelMap.get( connection.ID );\n\t\t\t\t\tif ( parent !== undefined ) parent.add( model );\n\n\t\t\t\t} );\n\n\t\t\t\tif ( model.parent === null ) {\n\n\t\t\t\t\tsceneGraph.add( model );\n\n\t\t\t\t}\n\n\n\t\t\t} );\n\n\t\t\tthis.bindSkeleton( deformers.skeletons, geometryMap, modelMap );\n\n\t\t\tthis.createAmbientLight();\n\n\t\t\tthis.setupMorphMaterials();\n\n\t\t\tvar animations = new AnimationParser().parse();\n\n\t\t\t// if all the models where already combined in a single group, just return that\n\t\t\tif ( sceneGraph.children.length === 1 && sceneGraph.children[ 0 ].isGroup ) {\n\n\t\t\t\tsceneGraph.children[ 0 ].animations = animations;\n\t\t\t\tsceneGraph = sceneGraph.children[ 0 ];\n\n\t\t\t}\n\n\t\t\tsceneGraph.animations = animations;\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.Model\n\t\tparseModels: function ( skeletons, geometryMap, materialMap ) {\n\n\t\t\tvar modelMap = new Map();\n\t\t\tvar modelNodes = fbxTree.Objects.Model;\n\n\t\t\tfor ( var nodeID in modelNodes ) {\n\n\t\t\t\tvar id = parseInt( nodeID );\n\t\t\t\tvar node = modelNodes[ nodeID ];\n\t\t\t\tvar relationships = connections.get( id );\n\n\t\t\t\tvar model = this.buildSkeleton( relationships, skeletons, id, node.attrName );\n\n\t\t\t\tif ( ! model ) {\n\n\t\t\t\t\tswitch ( node.attrType ) {\n\n\t\t\t\t\t\tcase 'Camera':\n\t\t\t\t\t\t\tmodel = this.createCamera( relationships );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'Light':\n\t\t\t\t\t\t\tmodel = this.createLight( relationships );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'Mesh':\n\t\t\t\t\t\t\tmodel = this.createMesh( relationships, geometryMap, materialMap );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'NurbsCurve':\n\t\t\t\t\t\t\tmodel = this.createCurve( relationships, geometryMap );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'LimbNode': // usually associated with a Bone, however if a Bone was not created we'll make a Group instead\n\t\t\t\t\t\tcase 'Null':\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tmodel = new THREE.Group();\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tmodel.name = THREE.PropertyBinding.sanitizeNodeName( node.attrName );\n\t\t\t\t\tmodel.ID = id;\n\n\t\t\t\t}\n\n\t\t\t\tthis.setModelTransforms( model, node );\n\t\t\t\tmodelMap.set( id, model );\n\n\t\t\t}\n\n\t\t\treturn modelMap;\n\n\t\t},\n\n\t\tbuildSkeleton: function ( relationships, skeletons, id, name ) {\n\n\t\t\tvar bone = null;\n\n\t\t\trelationships.parents.forEach( function ( parent ) {\n\n\t\t\t\tfor ( var ID in skeletons ) {\n\n\t\t\t\t\tvar skeleton = skeletons[ ID ];\n\n\t\t\t\t\tskeleton.rawBones.forEach( function ( rawBone, i ) {\n\n\t\t\t\t\t\tif ( rawBone.ID === parent.ID ) {\n\n\t\t\t\t\t\t\tvar subBone = bone;\n\t\t\t\t\t\t\tbone = new THREE.Bone();\n\t\t\t\t\t\t\tbone.matrixWorld.copy( rawBone.transformLink );\n\n\t\t\t\t\t\t\t// set name and id here - otherwise in cases where \"subBone\" is created it will not have a name / id\n\t\t\t\t\t\t\tbone.name = THREE.PropertyBinding.sanitizeNodeName( name );\n\t\t\t\t\t\t\tbone.ID = id;\n\n\t\t\t\t\t\t\tskeleton.bones[ i ] = bone;\n\n\t\t\t\t\t\t\t// In cases where a bone is shared between multiple meshes\n\t\t\t\t\t\t\t// duplicate the bone here and and it as a child of the first bone\n\t\t\t\t\t\t\tif ( subBone !== null ) {\n\n\t\t\t\t\t\t\t\tbone.add( subBone );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn bone;\n\n\t\t},\n\n\t\t// create a THREE.PerspectiveCamera or THREE.OrthographicCamera\n\t\tcreateCamera: function ( relationships ) {\n\n\t\t\tvar model;\n\t\t\tvar cameraAttribute;\n\n\t\t\trelationships.children.forEach( function ( child ) {\n\n\t\t\t\tvar attr = fbxTree.Objects.NodeAttribute[ child.ID ];\n\n\t\t\t\tif ( attr !== undefined ) {\n\n\t\t\t\t\tcameraAttribute = attr;\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\tif ( cameraAttribute === undefined ) {\n\n\t\t\t\tmodel = new THREE.Object3D();\n\n\t\t\t} else {\n\n\t\t\t\tvar type = 0;\n\t\t\t\tif ( cameraAttribute.CameraProjectionType !== undefined && cameraAttribute.CameraProjectionType.value === 1 ) {\n\n\t\t\t\t\ttype = 1;\n\n\t\t\t\t}\n\n\t\t\t\tvar nearClippingPlane = 1;\n\t\t\t\tif ( cameraAttribute.NearPlane !== undefined ) {\n\n\t\t\t\t\tnearClippingPlane = cameraAttribute.NearPlane.value / 1000;\n\n\t\t\t\t}\n\n\t\t\t\tvar farClippingPlane = 1000;\n\t\t\t\tif ( cameraAttribute.FarPlane !== undefined ) {\n\n\t\t\t\t\tfarClippingPlane = cameraAttribute.FarPlane.value / 1000;\n\n\t\t\t\t}\n\n\n\t\t\t\tvar width = window.innerWidth;\n\t\t\t\tvar height = window.innerHeight;\n\n\t\t\t\tif ( cameraAttribute.AspectWidth !== undefined && cameraAttribute.AspectHeight !== undefined ) {\n\n\t\t\t\t\twidth = cameraAttribute.AspectWidth.value;\n\t\t\t\t\theight = cameraAttribute.AspectHeight.value;\n\n\t\t\t\t}\n\n\t\t\t\tvar aspect = width / height;\n\n\t\t\t\tvar fov = 45;\n\t\t\t\tif ( cameraAttribute.FieldOfView !== undefined ) {\n\n\t\t\t\t\tfov = cameraAttribute.FieldOfView.value;\n\n\t\t\t\t}\n\n\t\t\t\tvar focalLength = cameraAttribute.FocalLength ? cameraAttribute.FocalLength.value : null;\n\n\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\tcase 0: // Perspective\n\t\t\t\t\t\tmodel = new THREE.PerspectiveCamera( fov, aspect, nearClippingPlane, farClippingPlane );\n\t\t\t\t\t\tif ( focalLength !== null ) model.setFocalLength( focalLength );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 1: // Orthographic\n\t\t\t\t\t\tmodel = new THREE.OrthographicCamera( - width / 2, width / 2, height / 2, - height / 2, nearClippingPlane, farClippingPlane );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: Unknown camera type ' + type + '.' );\n\t\t\t\t\t\tmodel = new THREE.Object3D();\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn model;\n\n\t\t},\n\n\t\t// Create a THREE.DirectionalLight, THREE.PointLight or THREE.SpotLight\n\t\tcreateLight: function ( relationships ) {\n\n\t\t\tvar model;\n\t\t\tvar lightAttribute;\n\n\t\t\trelationships.children.forEach( function ( child ) {\n\n\t\t\t\tvar attr = fbxTree.Objects.NodeAttribute[ child.ID ];\n\n\t\t\t\tif ( attr !== undefined ) {\n\n\t\t\t\t\tlightAttribute = attr;\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\tif ( lightAttribute === undefined ) {\n\n\t\t\t\tmodel = new THREE.Object3D();\n\n\t\t\t} else {\n\n\t\t\t\tvar type;\n\n\t\t\t\t// LightType can be undefined for Point lights\n\t\t\t\tif ( lightAttribute.LightType === undefined ) {\n\n\t\t\t\t\ttype = 0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttype = lightAttribute.LightType.value;\n\n\t\t\t\t}\n\n\t\t\t\tvar color = 0xffffff;\n\n\t\t\t\tif ( lightAttribute.Color !== undefined ) {\n\n\t\t\t\t\tcolor = new THREE.Color().fromArray( lightAttribute.Color.value );\n\n\t\t\t\t}\n\n\t\t\t\tvar intensity = ( lightAttribute.Intensity === undefined ) ? 1 : lightAttribute.Intensity.value / 100;\n\n\t\t\t\t// light disabled\n\t\t\t\tif ( lightAttribute.CastLightOnObject !== undefined && lightAttribute.CastLightOnObject.value === 0 ) {\n\n\t\t\t\t\tintensity = 0;\n\n\t\t\t\t}\n\n\t\t\t\tvar distance = 0;\n\t\t\t\tif ( lightAttribute.FarAttenuationEnd !== undefined ) {\n\n\t\t\t\t\tif ( lightAttribute.EnableFarAttenuation !== undefined && lightAttribute.EnableFarAttenuation.value === 0 ) {\n\n\t\t\t\t\t\tdistance = 0;\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tdistance = lightAttribute.FarAttenuationEnd.value;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// TODO: could this be calculated linearly from FarAttenuationStart to FarAttenuationEnd?\n\t\t\t\tvar decay = 1;\n\n\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\tcase 0: // Point\n\t\t\t\t\t\tmodel = new THREE.PointLight( color, intensity, distance, decay );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 1: // Directional\n\t\t\t\t\t\tmodel = new THREE.DirectionalLight( color, intensity );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 2: // Spot\n\t\t\t\t\t\tvar angle = Math.PI / 3;\n\n\t\t\t\t\t\tif ( lightAttribute.InnerAngle !== undefined ) {\n\n\t\t\t\t\t\t\tangle = THREE.Math.degToRad( lightAttribute.InnerAngle.value );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar penumbra = 0;\n\t\t\t\t\t\tif ( lightAttribute.OuterAngle !== undefined ) {\n\n\t\t\t\t\t\t// TODO: this is not correct - FBX calculates outer and inner angle in degrees\n\t\t\t\t\t\t// with OuterAngle > InnerAngle && OuterAngle <= Math.PI\n\t\t\t\t\t\t// while three.js uses a penumbra between (0, 1) to attenuate the inner angle\n\t\t\t\t\t\t\tpenumbra = THREE.Math.degToRad( lightAttribute.OuterAngle.value );\n\t\t\t\t\t\t\tpenumbra = Math.max( penumbra, 1 );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmodel = new THREE.SpotLight( color, intensity, distance, angle, penumbra, decay );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: Unknown light type ' + lightAttribute.LightType.value + ', defaulting to a THREE.PointLight.' );\n\t\t\t\t\t\tmodel = new THREE.PointLight( color, intensity );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tif ( lightAttribute.CastShadows !== undefined && lightAttribute.CastShadows.value === 1 ) {\n\n\t\t\t\t\tmodel.castShadow = true;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn model;\n\n\t\t},\n\n\t\tcreateMesh: function ( relationships, geometryMap, materialMap ) {\n\n\t\t\tvar model;\n\t\t\tvar geometry = null;\n\t\t\tvar material = null;\n\t\t\tvar materials = [];\n\n\t\t\t// get geometry and materials(s) from connections\n\t\t\trelationships.children.forEach( function ( child ) {\n\n\t\t\t\tif ( geometryMap.has( child.ID ) ) {\n\n\t\t\t\t\tgeometry = geometryMap.get( child.ID );\n\n\t\t\t\t}\n\n\t\t\t\tif ( materialMap.has( child.ID ) ) {\n\n\t\t\t\t\tmaterials.push( materialMap.get( child.ID ) );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\tif ( materials.length > 1 ) {\n\n\t\t\t\tmaterial = materials;\n\n\t\t\t} else if ( materials.length > 0 ) {\n\n\t\t\t\tmaterial = materials[ 0 ];\n\n\t\t\t} else {\n\n\t\t\t\tmaterial = new THREE.MeshPhongMaterial( { color: 0xcccccc } );\n\t\t\t\tmaterials.push( material );\n\n\t\t\t}\n\n\t\t\tif ( 'color' in geometry.attributes ) {\n\n\t\t\t\tmaterials.forEach( function ( material ) {\n\n\t\t\t\t\tmaterial.vertexColors = THREE.VertexColors;\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tif ( geometry.FBX_Deformer ) {\n\n\t\t\t\tmaterials.forEach( function ( material ) {\n\n\t\t\t\t\tmaterial.skinning = true;\n\n\t\t\t\t} );\n\n\t\t\t\tmodel = new THREE.SkinnedMesh( geometry, material );\n\n\t\t\t} else {\n\n\t\t\t\tmodel = new THREE.Mesh( geometry, material );\n\n\t\t\t}\n\n\t\t\treturn model;\n\n\t\t},\n\n\t\tcreateCurve: function ( relationships, geometryMap ) {\n\n\t\t\tvar geometry = relationships.children.reduce( function ( geo, child ) {\n\n\t\t\t\tif ( geometryMap.has( child.ID ) ) geo = geometryMap.get( child.ID );\n\n\t\t\t\treturn geo;\n\n\t\t\t}, null );\n\n\t\t\t// FBX does not list materials for Nurbs lines, so we'll just put our own in here.\n\t\t\tvar material = new THREE.LineBasicMaterial( { color: 0x3300ff, linewidth: 1 } );\n\t\t\treturn new THREE.Line( geometry, material );\n\n\t\t},\n\n\t\t// parse the model node for transform details and apply them to the model\n\t\tsetModelTransforms: function ( model, modelNode ) {\n\n\t\t\tvar transformData = {};\n\n\t\t\tif ( 'RotationOrder' in modelNode ) transformData.eulerOrder = parseInt( modelNode.RotationOrder.value );\n\t\t\tif ( 'Lcl_Translation' in modelNode ) transformData.translation = modelNode.Lcl_Translation.value;\n\t\t\tif ( 'RotationOffset' in modelNode ) transformData.rotationOffset = modelNode.RotationOffset.value;\n\t\t\tif ( 'Lcl_Rotation' in modelNode ) transformData.rotation = modelNode.Lcl_Rotation.value;\n\t\t\tif ( 'PreRotation' in modelNode ) transformData.preRotation = modelNode.PreRotation.value;\n\t\t\tif ( 'PostRotation' in modelNode ) transformData.postRotation = modelNode.PostRotation.value;\n\t\t\tif ( 'Lcl_Scaling' in modelNode ) transformData.scale = modelNode.Lcl_Scaling.value;\n\n\t\t\tvar transform = generateTransform( transformData );\n\n\t\t\tmodel.applyMatrix( transform );\n\n\t\t},\n\n\t\tsetLookAtProperties: function ( model, modelNode ) {\n\n\t\t\tif ( 'LookAtProperty' in modelNode ) {\n\n\t\t\t\tvar children = connections.get( model.ID ).children;\n\n\t\t\t\tchildren.forEach( function ( child ) {\n\n\t\t\t\t\tif ( child.relationship === 'LookAtProperty' ) {\n\n\t\t\t\t\t\tvar lookAtTarget = fbxTree.Objects.Model[ child.ID ];\n\n\t\t\t\t\t\tif ( 'Lcl_Translation' in lookAtTarget ) {\n\n\t\t\t\t\t\t\tvar pos = lookAtTarget.Lcl_Translation.value;\n\n\t\t\t\t\t\t\t// DirectionalLight, SpotLight\n\t\t\t\t\t\t\tif ( model.target !== undefined ) {\n\n\t\t\t\t\t\t\t\tmodel.target.position.fromArray( pos );\n\t\t\t\t\t\t\t\tsceneGraph.add( model.target );\n\n\t\t\t\t\t\t\t} else { // Cameras and other Object3Ds\n\n\t\t\t\t\t\t\t\tmodel.lookAt( new THREE.Vector3().fromArray( pos ) );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t},\n\n\t\tbindSkeleton: function ( skeletons, geometryMap, modelMap ) {\n\n\t\t\tvar bindMatrices = this.parsePoseNodes();\n\n\t\t\tfor ( var ID in skeletons ) {\n\n\t\t\t\tvar skeleton = skeletons[ ID ];\n\n\t\t\t\tvar parents = connections.get( parseInt( skeleton.ID ) ).parents;\n\n\t\t\t\tparents.forEach( function ( parent ) {\n\n\t\t\t\t\tif ( geometryMap.has( parent.ID ) ) {\n\n\t\t\t\t\t\tvar geoID = parent.ID;\n\t\t\t\t\t\tvar geoRelationships = connections.get( geoID );\n\n\t\t\t\t\t\tgeoRelationships.parents.forEach( function ( geoConnParent ) {\n\n\t\t\t\t\t\t\tif ( modelMap.has( geoConnParent.ID ) ) {\n\n\t\t\t\t\t\t\t\tvar model = modelMap.get( geoConnParent.ID );\n\n\t\t\t\t\t\t\t\tmodel.bind( new THREE.Skeleton( skeleton.bones ), bindMatrices[ geoConnParent.ID ] );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t},\n\n\t\tparsePoseNodes: function () {\n\n\t\t\tvar bindMatrices = {};\n\n\t\t\tif ( 'Pose' in fbxTree.Objects ) {\n\n\t\t\t\tvar BindPoseNode = fbxTree.Objects.Pose;\n\n\t\t\t\tfor ( var nodeID in BindPoseNode ) {\n\n\t\t\t\t\tif ( BindPoseNode[ nodeID ].attrType === 'BindPose' ) {\n\n\t\t\t\t\t\tvar poseNodes = BindPoseNode[ nodeID ].PoseNode;\n\n\t\t\t\t\t\tif ( Array.isArray( poseNodes ) ) {\n\n\t\t\t\t\t\t\tposeNodes.forEach( function ( poseNode ) {\n\n\t\t\t\t\t\t\t\tbindMatrices[ poseNode.Node ] = new THREE.Matrix4().fromArray( poseNode.Matrix.a );\n\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tbindMatrices[ poseNodes.Node ] = new THREE.Matrix4().fromArray( poseNodes.Matrix.a );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn bindMatrices;\n\n\t\t},\n\n\t\t// Parse ambient color in FBXTree.GlobalSettings - if it's not set to black (default), create an ambient light\n\t\tcreateAmbientLight: function () {\n\n\t\t\tif ( 'GlobalSettings' in fbxTree && 'AmbientColor' in fbxTree.GlobalSettings ) {\n\n\t\t\t\tvar ambientColor = fbxTree.GlobalSettings.AmbientColor.value;\n\t\t\t\tvar r = ambientColor[ 0 ];\n\t\t\t\tvar g = ambientColor[ 1 ];\n\t\t\t\tvar b = ambientColor[ 2 ];\n\n\t\t\t\tif ( r !== 0 || g !== 0 || b !== 0 ) {\n\n\t\t\t\t\tvar color = new THREE.Color( r, g, b );\n\t\t\t\t\tsceneGraph.add( new THREE.AmbientLight( color, 1 ) );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t\tsetupMorphMaterials: function () {\n\n\t\t\tsceneGraph.traverse( function ( child ) {\n\n\t\t\t\tif ( child.isMesh ) {\n\n\t\t\t\t\tif ( child.geometry.morphAttributes.position || child.geometry.morphAttributes.normal ) {\n\n\t\t\t\t\t\tvar uuid = child.uuid;\n\t\t\t\t\t\tvar matUuid = child.material.uuid;\n\n\t\t\t\t\t\t// if a geometry has morph targets, it cannot share the material with other geometries\n\t\t\t\t\t\tvar sharedMat = false;\n\n\t\t\t\t\t\tsceneGraph.traverse( function ( child ) {\n\n\t\t\t\t\t\t\tif ( child.isMesh ) {\n\n\t\t\t\t\t\t\t\tif ( child.material.uuid === matUuid && child.uuid !== uuid ) sharedMat = true;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\tif ( sharedMat === true ) child.material = child.material.clone();\n\n\t\t\t\t\t\tchild.material.morphTargets = true;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t},\n\n\t};\n\n\t// parse Geometry data from FBXTree and return map of BufferGeometries\n\tfunction GeometryParser() {}\n\n\tGeometryParser.prototype = {\n\n\t\tconstructor: GeometryParser,\n\n\t\t// Parse nodes in FBXTree.Objects.Geometry\n\t\tparse: function ( deformers ) {\n\n\t\t\tvar geometryMap = new Map();\n\n\t\t\tif ( 'Geometry' in fbxTree.Objects ) {\n\n\t\t\t\tvar geoNodes = fbxTree.Objects.Geometry;\n\n\t\t\t\tfor ( var nodeID in geoNodes ) {\n\n\t\t\t\t\tvar relationships = connections.get( parseInt( nodeID ) );\n\t\t\t\t\tvar geo = this.parseGeometry( relationships, geoNodes[ nodeID ], deformers );\n\n\t\t\t\t\tgeometryMap.set( parseInt( nodeID ), geo );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn geometryMap;\n\n\t\t},\n\n\t\t// Parse single node in FBXTree.Objects.Geometry\n\t\tparseGeometry: function ( relationships, geoNode, deformers ) {\n\n\t\t\tswitch ( geoNode.attrType ) {\n\n\t\t\t\tcase 'Mesh':\n\t\t\t\t\treturn this.parseMeshGeometry( relationships, geoNode, deformers );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'NurbsCurve':\n\t\t\t\t\treturn this.parseNurbsGeometry( geoNode );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t},\n\n\t\t// Parse single node mesh geometry in FBXTree.Objects.Geometry\n\t\tparseMeshGeometry: function ( relationships, geoNode, deformers ) {\n\n\t\t\tvar skeletons = deformers.skeletons;\n\t\t\tvar morphTargets = deformers.morphTargets;\n\n\t\t\tvar modelNodes = relationships.parents.map( function ( parent ) {\n\n\t\t\t\treturn fbxTree.Objects.Model[ parent.ID ];\n\n\t\t\t} );\n\n\t\t\t// don't create geometry if it is not associated with any models\n\t\t\tif ( modelNodes.length === 0 ) return;\n\n\t\t\tvar skeleton = relationships.children.reduce( function ( skeleton, child ) {\n\n\t\t\t\tif ( skeletons[ child.ID ] !== undefined ) skeleton = skeletons[ child.ID ];\n\n\t\t\t\treturn skeleton;\n\n\t\t\t}, null );\n\n\t\t\tvar morphTarget = relationships.children.reduce( function ( morphTarget, child ) {\n\n\t\t\t\tif ( morphTargets[ child.ID ] !== undefined ) morphTarget = morphTargets[ child.ID ];\n\n\t\t\t\treturn morphTarget;\n\n\t\t\t}, null );\n\n\t\t\t// TODO: if there is more than one model associated with the geometry, AND the models have\n\t\t\t// different geometric transforms, then this will cause problems\n\t\t\t// if ( modelNodes.length > 1 ) { }\n\n\t\t\t// For now just assume one model and get the preRotations from that\n\t\t\tvar modelNode = modelNodes[ 0 ];\n\n\t\t\tvar transformData = {};\n\n\t\t\tif ( 'RotationOrder' in modelNode ) transformData.eulerOrder = modelNode.RotationOrder.value;\n\t\t\tif ( 'GeometricTranslation' in modelNode ) transformData.translation = modelNode.GeometricTranslation.value;\n\t\t\tif ( 'GeometricRotation' in modelNode ) transformData.rotation = modelNode.GeometricRotation.value;\n\t\t\tif ( 'GeometricScaling' in modelNode ) transformData.scale = modelNode.GeometricScaling.value;\n\n\t\t\tvar transform = generateTransform( transformData );\n\n\t\t\treturn this.genGeometry( geoNode, skeleton, morphTarget, transform );\n\n\t\t},\n\n\t\t// Generate a THREE.BufferGeometry from a node in FBXTree.Objects.Geometry\n\t\tgenGeometry: function ( geoNode, skeleton, morphTarget, preTransform ) {\n\n\t\t\tvar geo = new THREE.BufferGeometry();\n\t\t\tif ( geoNode.attrName ) geo.name = geoNode.attrName;\n\n\t\t\tvar geoInfo = this.parseGeoNode( geoNode, skeleton );\n\t\t\tvar buffers = this.genBuffers( geoInfo );\n\n\t\t\tvar positionAttribute = new THREE.Float32BufferAttribute( buffers.vertex, 3 );\n\n\t\t\tpreTransform.applyToBufferAttribute( positionAttribute );\n\n\t\t\tgeo.addAttribute( 'position', positionAttribute );\n\n\t\t\tif ( buffers.colors.length > 0 ) {\n\n\t\t\t\tgeo.addAttribute( 'color', new THREE.Float32BufferAttribute( buffers.colors, 3 ) );\n\n\t\t\t}\n\n\t\t\tif ( skeleton ) {\n\n\t\t\t\tgeo.addAttribute( 'skinIndex', new THREE.Uint16BufferAttribute( buffers.weightsIndices, 4 ) );\n\n\t\t\t\tgeo.addAttribute( 'skinWeight', new THREE.Float32BufferAttribute( buffers.vertexWeights, 4 ) );\n\n\t\t\t\t// used later to bind the skeleton to the model\n\t\t\t\tgeo.FBX_Deformer = skeleton;\n\n\t\t\t}\n\n\t\t\tif ( buffers.normal.length > 0 ) {\n\n\t\t\t\tvar normalAttribute = new THREE.Float32BufferAttribute( buffers.normal, 3 );\n\n\t\t\t\tvar normalMatrix = new THREE.Matrix3().getNormalMatrix( preTransform );\n\t\t\t\tnormalMatrix.applyToBufferAttribute( normalAttribute );\n\n\t\t\t\tgeo.addAttribute( 'normal', normalAttribute );\n\n\t\t\t}\n\n\t\t\tbuffers.uvs.forEach( function ( uvBuffer, i ) {\n\n\t\t\t\t// subsequent uv buffers are called 'uv1', 'uv2', ...\n\t\t\t\tvar name = 'uv' + ( i + 1 ).toString();\n\n\t\t\t\t// the first uv buffer is just called 'uv'\n\t\t\t\tif ( i === 0 ) {\n\n\t\t\t\t\tname = 'uv';\n\n\t\t\t\t}\n\n\t\t\t\tgeo.addAttribute( name, new THREE.Float32BufferAttribute( buffers.uvs[ i ], 2 ) );\n\n\t\t\t} );\n\n\t\t\tif ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) {\n\n\t\t\t\t// Convert the material indices of each vertex into rendering groups on the geometry.\n\t\t\t\tvar prevMaterialIndex = buffers.materialIndex[ 0 ];\n\t\t\t\tvar startIndex = 0;\n\n\t\t\t\tbuffers.materialIndex.forEach( function ( currentIndex, i ) {\n\n\t\t\t\t\tif ( currentIndex !== prevMaterialIndex ) {\n\n\t\t\t\t\t\tgeo.addGroup( startIndex, i - startIndex, prevMaterialIndex );\n\n\t\t\t\t\t\tprevMaterialIndex = currentIndex;\n\t\t\t\t\t\tstartIndex = i;\n\n\t\t\t\t\t}\n\n\t\t\t\t} );\n\n\t\t\t\t// the loop above doesn't add the last group, do that here.\n\t\t\t\tif ( geo.groups.length > 0 ) {\n\n\t\t\t\t\tvar lastGroup = geo.groups[ geo.groups.length - 1 ];\n\t\t\t\t\tvar lastIndex = lastGroup.start + lastGroup.count;\n\n\t\t\t\t\tif ( lastIndex !== buffers.materialIndex.length ) {\n\n\t\t\t\t\t\tgeo.addGroup( lastIndex, buffers.materialIndex.length - lastIndex, prevMaterialIndex );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// case where there are multiple materials but the whole geometry is only\n\t\t\t\t// using one of them\n\t\t\t\tif ( geo.groups.length === 0 ) {\n\n\t\t\t\t\tgeo.addGroup( 0, buffers.materialIndex.length, buffers.materialIndex[ 0 ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.addMorphTargets( geo, geoNode, morphTarget, preTransform );\n\n\t\t\treturn geo;\n\n\t\t},\n\n\t\tparseGeoNode: function ( geoNode, skeleton ) {\n\n\t\t\tvar geoInfo = {};\n\n\t\t\tgeoInfo.vertexPositions = ( geoNode.Vertices !== undefined ) ? geoNode.Vertices.a : [];\n\t\t\tgeoInfo.vertexIndices = ( geoNode.PolygonVertexIndex !== undefined ) ? geoNode.PolygonVertexIndex.a : [];\n\n\t\t\tif ( geoNode.LayerElementColor ) {\n\n\t\t\t\tgeoInfo.color = this.parseVertexColors( geoNode.LayerElementColor[ 0 ] );\n\n\t\t\t}\n\n\t\t\tif ( geoNode.LayerElementMaterial ) {\n\n\t\t\t\tgeoInfo.material = this.parseMaterialIndices( geoNode.LayerElementMaterial[ 0 ] );\n\n\t\t\t}\n\n\t\t\tif ( geoNode.LayerElementNormal ) {\n\n\t\t\t\tgeoInfo.normal = this.parseNormals( geoNode.LayerElementNormal[ 0 ] );\n\n\t\t\t}\n\n\t\t\tif ( geoNode.LayerElementUV ) {\n\n\t\t\t\tgeoInfo.uv = [];\n\n\t\t\t\tvar i = 0;\n\t\t\t\twhile ( geoNode.LayerElementUV[ i ] ) {\n\n\t\t\t\t\tgeoInfo.uv.push( this.parseUVs( geoNode.LayerElementUV[ i ] ) );\n\t\t\t\t\ti ++;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tgeoInfo.weightTable = {};\n\n\t\t\tif ( skeleton !== null ) {\n\n\t\t\t\tgeoInfo.skeleton = skeleton;\n\n\t\t\t\tskeleton.rawBones.forEach( function ( rawBone, i ) {\n\n\t\t\t\t\t// loop over the bone's vertex indices and weights\n\t\t\t\t\trawBone.indices.forEach( function ( index, j ) {\n\n\t\t\t\t\t\tif ( geoInfo.weightTable[ index ] === undefined ) geoInfo.weightTable[ index ] = [];\n\n\t\t\t\t\t\tgeoInfo.weightTable[ index ].push( {\n\n\t\t\t\t\t\t\tid: i,\n\t\t\t\t\t\t\tweight: rawBone.weights[ j ],\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t} );\n\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\treturn geoInfo;\n\n\t\t},\n\n\t\tgenBuffers: function ( geoInfo ) {\n\n\t\t\tvar buffers = {\n\t\t\t\tvertex: [],\n\t\t\t\tnormal: [],\n\t\t\t\tcolors: [],\n\t\t\t\tuvs: [],\n\t\t\t\tmaterialIndex: [],\n\t\t\t\tvertexWeights: [],\n\t\t\t\tweightsIndices: [],\n\t\t\t};\n\n\t\t\tvar polygonIndex = 0;\n\t\t\tvar faceLength = 0;\n\t\t\tvar displayedWeightsWarning = false;\n\n\t\t\t// these will hold data for a single face\n\t\t\tvar facePositionIndexes = [];\n\t\t\tvar faceNormals = [];\n\t\t\tvar faceColors = [];\n\t\t\tvar faceUVs = [];\n\t\t\tvar faceWeights = [];\n\t\t\tvar faceWeightIndices = [];\n\n\t\t\tvar self = this;\n\t\t\tgeoInfo.vertexIndices.forEach( function ( vertexIndex, polygonVertexIndex ) {\n\n\t\t\t\tvar endOfFace = false;\n\n\t\t\t\t// Face index and vertex index arrays are combined in a single array\n\t\t\t\t// A cube with quad faces looks like this:\n\t\t\t\t// PolygonVertexIndex: *24 {\n\t\t\t\t// a: 0, 1, 3, -3, 2, 3, 5, -5, 4, 5, 7, -7, 6, 7, 1, -1, 1, 7, 5, -4, 6, 0, 2, -5\n\t\t\t\t// }\n\t\t\t\t// Negative numbers mark the end of a face - first face here is 0, 1, 3, -3\n\t\t\t\t// to find index of last vertex bit shift the index: ^ - 1\n\t\t\t\tif ( vertexIndex < 0 ) {\n\n\t\t\t\t\tvertexIndex = vertexIndex ^ - 1; // equivalent to ( x * -1 ) - 1\n\t\t\t\t\tendOfFace = true;\n\n\t\t\t\t}\n\n\t\t\t\tvar weightIndices = [];\n\t\t\t\tvar weights = [];\n\n\t\t\t\tfacePositionIndexes.push( vertexIndex * 3, vertexIndex * 3 + 1, vertexIndex * 3 + 2 );\n\n\t\t\t\tif ( geoInfo.color ) {\n\n\t\t\t\t\tvar data = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.color );\n\n\t\t\t\t\tfaceColors.push( data[ 0 ], data[ 1 ], data[ 2 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.skeleton ) {\n\n\t\t\t\t\tif ( geoInfo.weightTable[ vertexIndex ] !== undefined ) {\n\n\t\t\t\t\t\tgeoInfo.weightTable[ vertexIndex ].forEach( function ( wt ) {\n\n\t\t\t\t\t\t\tweights.push( wt.weight );\n\t\t\t\t\t\t\tweightIndices.push( wt.id );\n\n\t\t\t\t\t\t} );\n\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( weights.length > 4 ) {\n\n\t\t\t\t\t\tif ( ! displayedWeightsWarning ) {\n\n\t\t\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights.' );\n\t\t\t\t\t\t\tdisplayedWeightsWarning = true;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar wIndex = [ 0, 0, 0, 0 ];\n\t\t\t\t\t\tvar Weight = [ 0, 0, 0, 0 ];\n\n\t\t\t\t\t\tweights.forEach( function ( weight, weightIndex ) {\n\n\t\t\t\t\t\t\tvar currentWeight = weight;\n\t\t\t\t\t\t\tvar currentIndex = weightIndices[ weightIndex ];\n\n\t\t\t\t\t\t\tWeight.forEach( function ( comparedWeight, comparedWeightIndex, comparedWeightArray ) {\n\n\t\t\t\t\t\t\t\tif ( currentWeight > comparedWeight ) {\n\n\t\t\t\t\t\t\t\t\tcomparedWeightArray[ comparedWeightIndex ] = currentWeight;\n\t\t\t\t\t\t\t\t\tcurrentWeight = comparedWeight;\n\n\t\t\t\t\t\t\t\t\tvar tmp = wIndex[ comparedWeightIndex ];\n\t\t\t\t\t\t\t\t\twIndex[ comparedWeightIndex ] = currentIndex;\n\t\t\t\t\t\t\t\t\tcurrentIndex = tmp;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\tweightIndices = wIndex;\n\t\t\t\t\t\tweights = Weight;\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// if the weight array is shorter than 4 pad with 0s\n\t\t\t\t\twhile ( weights.length < 4 ) {\n\n\t\t\t\t\t\tweights.push( 0 );\n\t\t\t\t\t\tweightIndices.push( 0 );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( var i = 0; i < 4; ++ i ) {\n\n\t\t\t\t\t\tfaceWeights.push( weights[ i ] );\n\t\t\t\t\t\tfaceWeightIndices.push( weightIndices[ i ] );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.normal ) {\n\n\t\t\t\t\tvar data = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.normal );\n\n\t\t\t\t\tfaceNormals.push( data[ 0 ], data[ 1 ], data[ 2 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) {\n\n\t\t\t\t\tvar materialIndex = getData( polygonVertexIndex, polygonIndex, vertexIndex, geoInfo.material )[ 0 ];\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.uv ) {\n\n\t\t\t\t\tgeoInfo.uv.forEach( function ( uv, i ) {\n\n\t\t\t\t\t\tvar data = getData( polygonVertexIndex, polygonIndex, vertexIndex, uv );\n\n\t\t\t\t\t\tif ( faceUVs[ i ] === undefined ) {\n\n\t\t\t\t\t\t\tfaceUVs[ i ] = [];\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfaceUVs[ i ].push( data[ 0 ] );\n\t\t\t\t\t\tfaceUVs[ i ].push( data[ 1 ] );\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t\tfaceLength ++;\n\n\t\t\t\tif ( endOfFace ) {\n\n\t\t\t\t\tself.genFace( buffers, geoInfo, facePositionIndexes, materialIndex, faceNormals, faceColors, faceUVs, faceWeights, faceWeightIndices, faceLength );\n\n\t\t\t\t\tpolygonIndex ++;\n\t\t\t\t\tfaceLength = 0;\n\n\t\t\t\t\t// reset arrays for the next face\n\t\t\t\t\tfacePositionIndexes = [];\n\t\t\t\t\tfaceNormals = [];\n\t\t\t\t\tfaceColors = [];\n\t\t\t\t\tfaceUVs = [];\n\t\t\t\t\tfaceWeights = [];\n\t\t\t\t\tfaceWeightIndices = [];\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn buffers;\n\n\t\t},\n\n\t\t// Generate data for a single face in a geometry. If the face is a quad then split it into 2 tris\n\t\tgenFace: function ( buffers, geoInfo, facePositionIndexes, materialIndex, faceNormals, faceColors, faceUVs, faceWeights, faceWeightIndices, faceLength ) {\n\n\t\t\tfor ( var i = 2; i < faceLength; i ++ ) {\n\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 0 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 1 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ 2 ] ] );\n\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 + 1 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ ( i - 1 ) * 3 + 2 ] ] );\n\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 + 1 ] ] );\n\t\t\t\tbuffers.vertex.push( geoInfo.vertexPositions[ facePositionIndexes[ i * 3 + 2 ] ] );\n\n\t\t\t\tif ( geoInfo.skeleton ) {\n\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ 0 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ 1 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ 2 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ 3 ] );\n\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 1 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 2 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ ( i - 1 ) * 4 + 3 ] );\n\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ i * 4 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ i * 4 + 1 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ i * 4 + 2 ] );\n\t\t\t\t\tbuffers.vertexWeights.push( faceWeights[ i * 4 + 3 ] );\n\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ 0 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ 1 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ 2 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ 3 ] );\n\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 1 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 2 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ ( i - 1 ) * 4 + 3 ] );\n\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ i * 4 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ i * 4 + 1 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ i * 4 + 2 ] );\n\t\t\t\t\tbuffers.weightsIndices.push( faceWeightIndices[ i * 4 + 3 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.color ) {\n\n\t\t\t\t\tbuffers.colors.push( faceColors[ 0 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ 1 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ 2 ] );\n\n\t\t\t\t\tbuffers.colors.push( faceColors[ ( i - 1 ) * 3 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ ( i - 1 ) * 3 + 1 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ ( i - 1 ) * 3 + 2 ] );\n\n\t\t\t\t\tbuffers.colors.push( faceColors[ i * 3 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ i * 3 + 1 ] );\n\t\t\t\t\tbuffers.colors.push( faceColors[ i * 3 + 2 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.material && geoInfo.material.mappingType !== 'AllSame' ) {\n\n\t\t\t\t\tbuffers.materialIndex.push( materialIndex );\n\t\t\t\t\tbuffers.materialIndex.push( materialIndex );\n\t\t\t\t\tbuffers.materialIndex.push( materialIndex );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.normal ) {\n\n\t\t\t\t\tbuffers.normal.push( faceNormals[ 0 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ 1 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ 2 ] );\n\n\t\t\t\t\tbuffers.normal.push( faceNormals[ ( i - 1 ) * 3 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ ( i - 1 ) * 3 + 1 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ ( i - 1 ) * 3 + 2 ] );\n\n\t\t\t\t\tbuffers.normal.push( faceNormals[ i * 3 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ i * 3 + 1 ] );\n\t\t\t\t\tbuffers.normal.push( faceNormals[ i * 3 + 2 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( geoInfo.uv ) {\n\n\t\t\t\t\tgeoInfo.uv.forEach( function ( uv, j ) {\n\n\t\t\t\t\t\tif ( buffers.uvs[ j ] === undefined ) buffers.uvs[ j ] = [];\n\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ 0 ] );\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ 1 ] );\n\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ ( i - 1 ) * 2 ] );\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ ( i - 1 ) * 2 + 1 ] );\n\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ i * 2 ] );\n\t\t\t\t\t\tbuffers.uvs[ j ].push( faceUVs[ j ][ i * 2 + 1 ] );\n\n\t\t\t\t\t} );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t\taddMorphTargets: function ( parentGeo, parentGeoNode, morphTarget, preTransform ) {\n\n\t\t\tif ( morphTarget === null ) return;\n\n\t\t\tparentGeo.morphAttributes.position = [];\n\t\t\tparentGeo.morphAttributes.normal = [];\n\n\t\t\tvar self = this;\n\t\t\tmorphTarget.rawTargets.forEach( function ( rawTarget ) {\n\n\t\t\t\tvar morphGeoNode = fbxTree.Objects.Geometry[ rawTarget.geoID ];\n\n\t\t\t\tif ( morphGeoNode !== undefined ) {\n\n\t\t\t\t\tself.genMorphGeometry( parentGeo, parentGeoNode, morphGeoNode, preTransform );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t},\n\n\t\t// a morph geometry node is similar to a standard node, and the node is also contained\n\t\t// in FBXTree.Objects.Geometry, however it can only have attributes for position, normal\n\t\t// and a special attribute Index defining which vertices of the original geometry are affected\n\t\t// Normal and position attributes only have data for the vertices that are affected by the morph\n\t\tgenMorphGeometry: function ( parentGeo, parentGeoNode, morphGeoNode, preTransform ) {\n\n\t\t\tvar morphGeo = new THREE.BufferGeometry();\n\t\t\tif ( morphGeoNode.attrName ) morphGeo.name = morphGeoNode.attrName;\n\n\t\t\tvar vertexIndices = ( parentGeoNode.PolygonVertexIndex !== undefined ) ? parentGeoNode.PolygonVertexIndex.a : [];\n\n\t\t\t// make a copy of the parent's vertex positions\n\t\t\tvar vertexPositions = ( parentGeoNode.Vertices !== undefined ) ? parentGeoNode.Vertices.a.slice() : [];\n\n\t\t\tvar morphPositions = ( morphGeoNode.Vertices !== undefined ) ? morphGeoNode.Vertices.a : [];\n\t\t\tvar indices = ( morphGeoNode.Indexes !== undefined ) ? morphGeoNode.Indexes.a : [];\n\n\t\t\tfor ( var i = 0; i < indices.length; i ++ ) {\n\n\t\t\t\tvar morphIndex = indices[ i ] * 3;\n\n\t\t\t\t// FBX format uses blend shapes rather than morph targets. This can be converted\n\t\t\t\t// by additively combining the blend shape positions with the original geometry's positions\n\t\t\t\tvertexPositions[ morphIndex ] += morphPositions[ i * 3 ];\n\t\t\t\tvertexPositions[ morphIndex + 1 ] += morphPositions[ i * 3 + 1 ];\n\t\t\t\tvertexPositions[ morphIndex + 2 ] += morphPositions[ i * 3 + 2 ];\n\n\t\t\t}\n\n\t\t\t// TODO: add morph normal support\n\t\t\tvar morphGeoInfo = {\n\t\t\t\tvertexIndices: vertexIndices,\n\t\t\t\tvertexPositions: vertexPositions,\n\t\t\t};\n\n\t\t\tvar morphBuffers = this.genBuffers( morphGeoInfo );\n\n\t\t\tvar positionAttribute = new THREE.Float32BufferAttribute( morphBuffers.vertex, 3 );\n\t\t\tpositionAttribute.name = morphGeoNode.attrName;\n\n\t\t\tpreTransform.applyToBufferAttribute( positionAttribute );\n\n\t\t\tparentGeo.morphAttributes.position.push( positionAttribute );\n\n\t\t},\n\n\t\t// Parse normal from FBXTree.Objects.Geometry.LayerElementNormal if it exists\n\t\tparseNormals: function ( NormalNode ) {\n\n\t\t\tvar mappingType = NormalNode.MappingInformationType;\n\t\t\tvar referenceType = NormalNode.ReferenceInformationType;\n\t\t\tvar buffer = NormalNode.Normals.a;\n\t\t\tvar indexBuffer = [];\n\t\t\tif ( referenceType === 'IndexToDirect' ) {\n\n\t\t\t\tif ( 'NormalIndex' in NormalNode ) {\n\n\t\t\t\t\tindexBuffer = NormalNode.NormalIndex.a;\n\n\t\t\t\t} else if ( 'NormalsIndex' in NormalNode ) {\n\n\t\t\t\t\tindexBuffer = NormalNode.NormalsIndex.a;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdataSize: 3,\n\t\t\t\tbuffer: buffer,\n\t\t\t\tindices: indexBuffer,\n\t\t\t\tmappingType: mappingType,\n\t\t\t\treferenceType: referenceType\n\t\t\t};\n\n\t\t},\n\n\t\t// Parse UVs from FBXTree.Objects.Geometry.LayerElementUV if it exists\n\t\tparseUVs: function ( UVNode ) {\n\n\t\t\tvar mappingType = UVNode.MappingInformationType;\n\t\t\tvar referenceType = UVNode.ReferenceInformationType;\n\t\t\tvar buffer = UVNode.UV.a;\n\t\t\tvar indexBuffer = [];\n\t\t\tif ( referenceType === 'IndexToDirect' ) {\n\n\t\t\t\tindexBuffer = UVNode.UVIndex.a;\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdataSize: 2,\n\t\t\t\tbuffer: buffer,\n\t\t\t\tindices: indexBuffer,\n\t\t\t\tmappingType: mappingType,\n\t\t\t\treferenceType: referenceType\n\t\t\t};\n\n\t\t},\n\n\t\t// Parse Vertex Colors from FBXTree.Objects.Geometry.LayerElementColor if it exists\n\t\tparseVertexColors: function ( ColorNode ) {\n\n\t\t\tvar mappingType = ColorNode.MappingInformationType;\n\t\t\tvar referenceType = ColorNode.ReferenceInformationType;\n\t\t\tvar buffer = ColorNode.Colors.a;\n\t\t\tvar indexBuffer = [];\n\t\t\tif ( referenceType === 'IndexToDirect' ) {\n\n\t\t\t\tindexBuffer = ColorNode.ColorIndex.a;\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdataSize: 4,\n\t\t\t\tbuffer: buffer,\n\t\t\t\tindices: indexBuffer,\n\t\t\t\tmappingType: mappingType,\n\t\t\t\treferenceType: referenceType\n\t\t\t};\n\n\t\t},\n\n\t\t// Parse mapping and material data in FBXTree.Objects.Geometry.LayerElementMaterial if it exists\n\t\tparseMaterialIndices: function ( MaterialNode ) {\n\n\t\t\tvar mappingType = MaterialNode.MappingInformationType;\n\t\t\tvar referenceType = MaterialNode.ReferenceInformationType;\n\n\t\t\tif ( mappingType === 'NoMappingInformation' ) {\n\n\t\t\t\treturn {\n\t\t\t\t\tdataSize: 1,\n\t\t\t\t\tbuffer: [ 0 ],\n\t\t\t\t\tindices: [ 0 ],\n\t\t\t\t\tmappingType: 'AllSame',\n\t\t\t\t\treferenceType: referenceType\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t\tvar materialIndexBuffer = MaterialNode.Materials.a;\n\n\t\t\t// Since materials are stored as indices, there's a bit of a mismatch between FBX and what\n\t\t\t// we expect.So we create an intermediate buffer that points to the index in the buffer,\n\t\t\t// for conforming with the other functions we've written for other data.\n\t\t\tvar materialIndices = [];\n\n\t\t\tfor ( var i = 0; i < materialIndexBuffer.length; ++ i ) {\n\n\t\t\t\tmaterialIndices.push( i );\n\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdataSize: 1,\n\t\t\t\tbuffer: materialIndexBuffer,\n\t\t\t\tindices: materialIndices,\n\t\t\t\tmappingType: mappingType,\n\t\t\t\treferenceType: referenceType\n\t\t\t};\n\n\t\t},\n\n\t\t// Generate a NurbGeometry from a node in FBXTree.Objects.Geometry\n\t\tparseNurbsGeometry: function ( geoNode ) {\n\n\t\t\tif ( THREE.NURBSCurve === undefined ) {\n\n\t\t\t\tconsole.error( 'THREE.FBXLoader: The loader relies on THREE.NURBSCurve for any nurbs present in the model. Nurbs will show up as empty geometry.' );\n\t\t\t\treturn new THREE.BufferGeometry();\n\n\t\t\t}\n\n\t\t\tvar order = parseInt( geoNode.Order );\n\n\t\t\tif ( isNaN( order ) ) {\n\n\t\t\t\tconsole.error( 'THREE.FBXLoader: Invalid Order %s given for geometry ID: %s', geoNode.Order, geoNode.id );\n\t\t\t\treturn new THREE.BufferGeometry();\n\n\t\t\t}\n\n\t\t\tvar degree = order - 1;\n\n\t\t\tvar knots = geoNode.KnotVector.a;\n\t\t\tvar controlPoints = [];\n\t\t\tvar pointsValues = geoNode.Points.a;\n\n\t\t\tfor ( var i = 0, l = pointsValues.length; i < l; i += 4 ) {\n\n\t\t\t\tcontrolPoints.push( new THREE.Vector4().fromArray( pointsValues, i ) );\n\n\t\t\t}\n\n\t\t\tvar startKnot, endKnot;\n\n\t\t\tif ( geoNode.Form === 'Closed' ) {\n\n\t\t\t\tcontrolPoints.push( controlPoints[ 0 ] );\n\n\t\t\t} else if ( geoNode.Form === 'Periodic' ) {\n\n\t\t\t\tstartKnot = degree;\n\t\t\t\tendKnot = knots.length - 1 - startKnot;\n\n\t\t\t\tfor ( var i = 0; i < degree; ++ i ) {\n\n\t\t\t\t\tcontrolPoints.push( controlPoints[ i ] );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar curve = new THREE.NURBSCurve( degree, knots, controlPoints, startKnot, endKnot );\n\t\t\tvar vertices = curve.getPoints( controlPoints.length * 7 );\n\n\t\t\tvar positions = new Float32Array( vertices.length * 3 );\n\n\t\t\tvertices.forEach( function ( vertex, i ) {\n\n\t\t\t\tvertex.toArray( positions, i * 3 );\n\n\t\t\t} );\n\n\t\t\tvar geometry = new THREE.BufferGeometry();\n\t\t\tgeometry.addAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );\n\n\t\t\treturn geometry;\n\n\t\t},\n\n\t};\n\n\t// parse animation data from FBXTree\n\tfunction AnimationParser() {}\n\n\tAnimationParser.prototype = {\n\n\t\tconstructor: AnimationParser,\n\n\t\t// take raw animation clips and turn them into three.js animation clips\n\t\tparse: function () {\n\n\t\t\tvar animationClips = [];\n\n\n\t\t\tvar rawClips = this.parseClips();\n\n\t\t\tif ( rawClips === undefined ) return animationClips;\n\n\t\t\tfor ( var key in rawClips ) {\n\n\t\t\t\tvar rawClip = rawClips[ key ];\n\n\t\t\t\tvar clip = this.addClip( rawClip );\n\n\t\t\t\tanimationClips.push( clip );\n\n\t\t\t}\n\n\t\t\treturn animationClips;\n\n\t\t},\n\n\t\tparseClips: function () {\n\n\t\t\t// since the actual transformation data is stored in FBXTree.Objects.AnimationCurve,\n\t\t\t// if this is undefined we can safely assume there are no animations\n\t\t\tif ( fbxTree.Objects.AnimationCurve === undefined ) return undefined;\n\n\t\t\tvar curveNodesMap = this.parseAnimationCurveNodes();\n\n\t\t\tthis.parseAnimationCurves( curveNodesMap );\n\n\t\t\tvar layersMap = this.parseAnimationLayers( curveNodesMap );\n\t\t\tvar rawClips = this.parseAnimStacks( layersMap );\n\n\t\t\treturn rawClips;\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.AnimationCurveNode\n\t\t// each AnimationCurveNode holds data for an animation transform for a model (e.g. left arm rotation )\n\t\t// and is referenced by an AnimationLayer\n\t\tparseAnimationCurveNodes: function () {\n\n\t\t\tvar rawCurveNodes = fbxTree.Objects.AnimationCurveNode;\n\n\t\t\tvar curveNodesMap = new Map();\n\n\t\t\tfor ( var nodeID in rawCurveNodes ) {\n\n\t\t\t\tvar rawCurveNode = rawCurveNodes[ nodeID ];\n\n\t\t\t\tif ( rawCurveNode.attrName.match( /S|R|T|DeformPercent/ ) !== null ) {\n\n\t\t\t\t\tvar curveNode = {\n\n\t\t\t\t\t\tid: rawCurveNode.id,\n\t\t\t\t\t\tattr: rawCurveNode.attrName,\n\t\t\t\t\t\tcurves: {},\n\n\t\t\t\t\t};\n\n\t\t\t\t\tcurveNodesMap.set( curveNode.id, curveNode );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn curveNodesMap;\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.AnimationCurve and connect them up to\n\t\t// previously parsed AnimationCurveNodes. Each AnimationCurve holds data for a single animated\n\t\t// axis ( e.g. times and values of x rotation)\n\t\tparseAnimationCurves: function ( curveNodesMap ) {\n\n\t\t\tvar rawCurves = fbxTree.Objects.AnimationCurve;\n\n\t\t\t// TODO: Many values are identical up to roundoff error, but won't be optimised\n\t\t\t// e.g. position times: [0, 0.4, 0. 8]\n\t\t\t// position values: [7.23538335023477e-7, 93.67518615722656, -0.9982695579528809, 7.23538335023477e-7, 93.67518615722656, -0.9982695579528809, 7.235384487103147e-7, 93.67520904541016, -0.9982695579528809]\n\t\t\t// clearly, this should be optimised to\n\t\t\t// times: [0], positions [7.23538335023477e-7, 93.67518615722656, -0.9982695579528809]\n\t\t\t// this shows up in nearly every FBX file, and generally time array is length > 100\n\n\t\t\tfor ( var nodeID in rawCurves ) {\n\n\t\t\t\tvar animationCurve = {\n\n\t\t\t\t\tid: rawCurves[ nodeID ].id,\n\t\t\t\t\ttimes: rawCurves[ nodeID ].KeyTime.a.map( convertFBXTimeToSeconds ),\n\t\t\t\t\tvalues: rawCurves[ nodeID ].KeyValueFloat.a,\n\n\t\t\t\t};\n\n\t\t\t\tvar relationships = connections.get( animationCurve.id );\n\n\t\t\t\tif ( relationships !== undefined ) {\n\n\t\t\t\t\tvar animationCurveID = relationships.parents[ 0 ].ID;\n\t\t\t\t\tvar animationCurveRelationship = relationships.parents[ 0 ].relationship;\n\n\t\t\t\t\tif ( animationCurveRelationship.match( /X/ ) ) {\n\n\t\t\t\t\t\tcurveNodesMap.get( animationCurveID ).curves[ 'x' ] = animationCurve;\n\n\t\t\t\t\t} else if ( animationCurveRelationship.match( /Y/ ) ) {\n\n\t\t\t\t\t\tcurveNodesMap.get( animationCurveID ).curves[ 'y' ] = animationCurve;\n\n\t\t\t\t\t} else if ( animationCurveRelationship.match( /Z/ ) ) {\n\n\t\t\t\t\t\tcurveNodesMap.get( animationCurveID ).curves[ 'z' ] = animationCurve;\n\n\t\t\t\t\t} else if ( animationCurveRelationship.match( /d|DeformPercent/ ) && curveNodesMap.has( animationCurveID ) ) {\n\n\t\t\t\t\t\tcurveNodesMap.get( animationCurveID ).curves[ 'morph' ] = animationCurve;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.AnimationLayer. Each layers holds references\n\t\t// to various AnimationCurveNodes and is referenced by an AnimationStack node\n\t\t// note: theoretically a stack can have multiple layers, however in practice there always seems to be one per stack\n\t\tparseAnimationLayers: function ( curveNodesMap ) {\n\n\t\t\tvar rawLayers = fbxTree.Objects.AnimationLayer;\n\n\t\t\tvar layersMap = new Map();\n\n\t\t\tfor ( var nodeID in rawLayers ) {\n\n\t\t\t\tvar layerCurveNodes = [];\n\n\t\t\t\tvar connection = connections.get( parseInt( nodeID ) );\n\n\t\t\t\tif ( connection !== undefined ) {\n\n\t\t\t\t\t// all the animationCurveNodes used in the layer\n\t\t\t\t\tvar children = connection.children;\n\n\t\t\t\t\tvar self = this;\n\t\t\t\t\tchildren.forEach( function ( child, i ) {\n\n\t\t\t\t\t\tif ( curveNodesMap.has( child.ID ) ) {\n\n\t\t\t\t\t\t\tvar curveNode = curveNodesMap.get( child.ID );\n\n\t\t\t\t\t\t\t// check that the curves are defined for at least one axis, otherwise ignore the curveNode\n\t\t\t\t\t\t\tif ( curveNode.curves.x !== undefined || curveNode.curves.y !== undefined || curveNode.curves.z !== undefined ) {\n\n\t\t\t\t\t\t\t\tif ( layerCurveNodes[ i ] === undefined ) {\n\n\t\t\t\t\t\t\t\t\tvar modelID;\n\n\t\t\t\t\t\t\t\t\tconnections.get( child.ID ).parents.forEach( function ( parent ) {\n\n\t\t\t\t\t\t\t\t\t\tif ( parent.relationship !== undefined ) modelID = parent.ID;\n\n\t\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t\tvar rawModel = fbxTree.Objects.Model[ modelID.toString() ];\n\n\t\t\t\t\t\t\t\t\tvar node = {\n\n\t\t\t\t\t\t\t\t\t\tmodelName: THREE.PropertyBinding.sanitizeNodeName( rawModel.attrName ),\n\t\t\t\t\t\t\t\t\t\tinitialPosition: [ 0, 0, 0 ],\n\t\t\t\t\t\t\t\t\t\tinitialRotation: [ 0, 0, 0 ],\n\t\t\t\t\t\t\t\t\t\tinitialScale: [ 1, 1, 1 ],\n\t\t\t\t\t\t\t\t\t\ttransform: self.getModelAnimTransform( rawModel ),\n\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\t// if the animated model is pre rotated, we'll have to apply the pre rotations to every\n\t\t\t\t\t\t\t\t\t// animation value as well\n\t\t\t\t\t\t\t\t\tif ( 'PreRotation' in rawModel ) node.preRotations = rawModel.PreRotation.value;\n\t\t\t\t\t\t\t\t\tif ( 'PostRotation' in rawModel ) node.postRotations = rawModel.PostRotation.value;\n\n\t\t\t\t\t\t\t\t\tlayerCurveNodes[ i ] = node;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tlayerCurveNodes[ i ][ curveNode.attr ] = curveNode;\n\n\t\t\t\t\t\t\t} else if ( curveNode.curves.morph !== undefined ) {\n\n\t\t\t\t\t\t\t\tif ( layerCurveNodes[ i ] === undefined ) {\n\n\t\t\t\t\t\t\t\t\tvar deformerID;\n\n\t\t\t\t\t\t\t\t\tconnections.get( child.ID ).parents.forEach( function ( parent ) {\n\n\t\t\t\t\t\t\t\t\t\tif ( parent.relationship !== undefined ) deformerID = parent.ID;\n\n\t\t\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t\t\tvar morpherID = connections.get( deformerID ).parents[ 0 ].ID;\n\t\t\t\t\t\t\t\t\tvar geoID = connections.get( morpherID ).parents[ 0 ].ID;\n\n\t\t\t\t\t\t\t\t\t// assuming geometry is not used in more than one model\n\t\t\t\t\t\t\t\t\tvar modelID = connections.get( geoID ).parents[ 0 ].ID;\n\n\t\t\t\t\t\t\t\t\tvar rawModel = fbxTree.Objects.Model[ modelID ];\n\n\t\t\t\t\t\t\t\t\tvar node = {\n\n\t\t\t\t\t\t\t\t\t\tmodelName: THREE.PropertyBinding.sanitizeNodeName( rawModel.attrName ),\n\t\t\t\t\t\t\t\t\t\tmorphName: fbxTree.Objects.Deformer[ deformerID ].attrName,\n\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\t\tlayerCurveNodes[ i ] = node;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tlayerCurveNodes[ i ][ curveNode.attr ] = curveNode;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} );\n\n\t\t\t\t\tlayersMap.set( parseInt( nodeID ), layerCurveNodes );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn layersMap;\n\n\t\t},\n\n\t\tgetModelAnimTransform: function ( modelNode ) {\n\n\t\t\tvar transformData = {};\n\n\t\t\tif ( 'RotationOrder' in modelNode ) transformData.eulerOrder = parseInt( modelNode.RotationOrder.value );\n\n\t\t\tif ( 'Lcl_Translation' in modelNode ) transformData.translation = modelNode.Lcl_Translation.value;\n\t\t\tif ( 'RotationOffset' in modelNode ) transformData.rotationOffset = modelNode.RotationOffset.value;\n\n\t\t\tif ( 'Lcl_Rotation' in modelNode ) transformData.rotation = modelNode.Lcl_Rotation.value;\n\t\t\tif ( 'PreRotation' in modelNode ) transformData.preRotation = modelNode.PreRotation.value;\n\n\t\t\tif ( 'PostRotation' in modelNode ) transformData.postRotation = modelNode.PostRotation.value;\n\n\t\t\tif ( 'Lcl_Scaling' in modelNode ) transformData.scale = modelNode.Lcl_Scaling.value;\n\n\t\t\treturn generateTransform( transformData );\n\n\t\t},\n\n\t\t// parse nodes in FBXTree.Objects.AnimationStack. These are the top level node in the animation\n\t\t// hierarchy. Each Stack node will be used to create a THREE.AnimationClip\n\t\tparseAnimStacks: function ( layersMap ) {\n\n\t\t\tvar rawStacks = fbxTree.Objects.AnimationStack;\n\n\t\t\t// connect the stacks (clips) up to the layers\n\t\t\tvar rawClips = {};\n\n\t\t\tfor ( var nodeID in rawStacks ) {\n\n\t\t\t\tvar children = connections.get( parseInt( nodeID ) ).children;\n\n\t\t\t\tif ( children.length > 1 ) {\n\n\t\t\t\t\t// it seems like stacks will always be associated with a single layer. But just in case there are files\n\t\t\t\t\t// where there are multiple layers per stack, we'll display a warning\n\t\t\t\t\tconsole.warn( 'THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.' );\n\n\t\t\t\t}\n\n\t\t\t\tvar layer = layersMap.get( children[ 0 ].ID );\n\n\t\t\t\trawClips[ nodeID ] = {\n\n\t\t\t\t\tname: rawStacks[ nodeID ].attrName,\n\t\t\t\t\tlayer: layer,\n\n\t\t\t\t};\n\n\t\t\t}\n\n\t\t\treturn rawClips;\n\n\t\t},\n\n\t\taddClip: function ( rawClip ) {\n\n\t\t\tvar tracks = [];\n\n\t\t\tvar self = this;\n\t\t\trawClip.layer.forEach( function ( rawTracks ) {\n\n\t\t\t\ttracks = tracks.concat( self.generateTracks( rawTracks ) );\n\n\t\t\t} );\n\n\t\t\treturn new THREE.AnimationClip( rawClip.name, - 1, tracks );\n\n\t\t},\n\n\t\tgenerateTracks: function ( rawTracks ) {\n\n\t\t\tvar tracks = [];\n\n\t\t\tvar initialPosition = new THREE.Vector3();\n\t\t\tvar initialRotation = new THREE.Quaternion();\n\t\t\tvar initialScale = new THREE.Vector3();\n\n\t\t\tif ( rawTracks.transform ) rawTracks.transform.decompose( initialPosition, initialRotation, initialScale );\n\n\t\t\tinitialPosition = initialPosition.toArray();\n\t\t\tinitialRotation = new THREE.Euler().setFromQuaternion( initialRotation ).toArray(); // todo: euler order\n\t\t\tinitialScale = initialScale.toArray();\n\n\t\t\tif ( rawTracks.T !== undefined && Object.keys( rawTracks.T.curves ).length > 0 ) {\n\n\t\t\t\tvar positionTrack = this.generateVectorTrack( rawTracks.modelName, rawTracks.T.curves, initialPosition, 'position' );\n\t\t\t\tif ( positionTrack !== undefined ) tracks.push( positionTrack );\n\n\t\t\t}\n\n\t\t\tif ( rawTracks.R !== undefined && Object.keys( rawTracks.R.curves ).length > 0 ) {\n\n\t\t\t\tvar rotationTrack = this.generateRotationTrack( rawTracks.modelName, rawTracks.R.curves, initialRotation, rawTracks.preRotations, rawTracks.postRotations );\n\t\t\t\tif ( rotationTrack !== undefined ) tracks.push( rotationTrack );\n\n\t\t\t}\n\n\t\t\tif ( rawTracks.S !== undefined && Object.keys( rawTracks.S.curves ).length > 0 ) {\n\n\t\t\t\tvar scaleTrack = this.generateVectorTrack( rawTracks.modelName, rawTracks.S.curves, initialScale, 'scale' );\n\t\t\t\tif ( scaleTrack !== undefined ) tracks.push( scaleTrack );\n\n\t\t\t}\n\n\t\t\tif ( rawTracks.DeformPercent !== undefined ) {\n\n\t\t\t\tvar morphTrack = this.generateMorphTrack( rawTracks );\n\t\t\t\tif ( morphTrack !== undefined ) tracks.push( morphTrack );\n\n\t\t\t}\n\n\t\t\treturn tracks;\n\n\t\t},\n\n\t\tgenerateVectorTrack: function ( modelName, curves, initialValue, type ) {\n\n\t\t\tvar times = this.getTimesForAllAxes( curves );\n\t\t\tvar values = this.getKeyframeTrackValues( times, curves, initialValue );\n\n\t\t\treturn new THREE.VectorKeyframeTrack( modelName + '.' + type, times, values );\n\n\t\t},\n\n\t\tgenerateRotationTrack: function ( modelName, curves, initialValue, preRotations, postRotations ) {\n\n\t\t\tif ( curves.x !== undefined ) {\n\n\t\t\t\tthis.interpolateRotations( curves.x );\n\t\t\t\tcurves.x.values = curves.x.values.map( THREE.Math.degToRad );\n\n\t\t\t}\n\t\t\tif ( curves.y !== undefined ) {\n\n\t\t\t\tthis.interpolateRotations( curves.y );\n\t\t\t\tcurves.y.values = curves.y.values.map( THREE.Math.degToRad );\n\n\t\t\t}\n\t\t\tif ( curves.z !== undefined ) {\n\n\t\t\t\tthis.interpolateRotations( curves.z );\n\t\t\t\tcurves.z.values = curves.z.values.map( THREE.Math.degToRad );\n\n\t\t\t}\n\n\t\t\tvar times = this.getTimesForAllAxes( curves );\n\t\t\tvar values = this.getKeyframeTrackValues( times, curves, initialValue );\n\n\t\t\tif ( preRotations !== undefined ) {\n\n\t\t\t\tpreRotations = preRotations.map( THREE.Math.degToRad );\n\t\t\t\tpreRotations.push( 'ZYX' );\n\n\t\t\t\tpreRotations = new THREE.Euler().fromArray( preRotations );\n\t\t\t\tpreRotations = new THREE.Quaternion().setFromEuler( preRotations );\n\n\t\t\t}\n\n\t\t\tif ( postRotations !== undefined ) {\n\n\t\t\t\tpostRotations = postRotations.map( THREE.Math.degToRad );\n\t\t\t\tpostRotations.push( 'ZYX' );\n\n\t\t\t\tpostRotations = new THREE.Euler().fromArray( postRotations );\n\t\t\t\tpostRotations = new THREE.Quaternion().setFromEuler( postRotations ).inverse();\n\n\t\t\t}\n\n\t\t\tvar quaternion = new THREE.Quaternion();\n\t\t\tvar euler = new THREE.Euler();\n\n\t\t\tvar quaternionValues = [];\n\n\t\t\tfor ( var i = 0; i < values.length; i += 3 ) {\n\n\t\t\t\teuler.set( values[ i ], values[ i + 1 ], values[ i + 2 ], 'ZYX' );\n\n\t\t\t\tquaternion.setFromEuler( euler );\n\n\t\t\t\tif ( preRotations !== undefined ) quaternion.premultiply( preRotations );\n\t\t\t\tif ( postRotations !== undefined ) quaternion.multiply( postRotations );\n\n\t\t\t\tquaternion.toArray( quaternionValues, ( i / 3 ) * 4 );\n\n\t\t\t}\n\n\t\t\treturn new THREE.QuaternionKeyframeTrack( modelName + '.quaternion', times, quaternionValues );\n\n\t\t},\n\n\t\tgenerateMorphTrack: function ( rawTracks ) {\n\n\t\t\tvar curves = rawTracks.DeformPercent.curves.morph;\n\t\t\tvar values = curves.values.map( function ( val ) {\n\n\t\t\t\treturn val / 100;\n\n\t\t\t} );\n\n\t\t\tvar morphNum = sceneGraph.getObjectByName( rawTracks.modelName ).morphTargetDictionary[ rawTracks.morphName ];\n\n\t\t\treturn new THREE.NumberKeyframeTrack( rawTracks.modelName + '.morphTargetInfluences[' + morphNum + ']', curves.times, values );\n\n\t\t},\n\n\t\t// For all animated objects, times are defined separately for each axis\n\t\t// Here we'll combine the times into one sorted array without duplicates\n\t\tgetTimesForAllAxes: function ( curves ) {\n\n\t\t\tvar times = [];\n\n\t\t\t// first join together the times for each axis, if defined\n\t\t\tif ( curves.x !== undefined ) times = times.concat( curves.x.times );\n\t\t\tif ( curves.y !== undefined ) times = times.concat( curves.y.times );\n\t\t\tif ( curves.z !== undefined ) times = times.concat( curves.z.times );\n\n\t\t\t// then sort them and remove duplicates\n\t\t\ttimes = times.sort( function ( a, b ) {\n\n\t\t\t\treturn a - b;\n\n\t\t\t} ).filter( function ( elem, index, array ) {\n\n\t\t\t\treturn array.indexOf( elem ) == index;\n\n\t\t\t} );\n\n\t\t\treturn times;\n\n\t\t},\n\n\t\tgetKeyframeTrackValues: function ( times, curves, initialValue ) {\n\n\t\t\tvar prevValue = initialValue;\n\n\t\t\tvar values = [];\n\n\t\t\tvar xIndex = - 1;\n\t\t\tvar yIndex = - 1;\n\t\t\tvar zIndex = - 1;\n\n\t\t\ttimes.forEach( function ( time ) {\n\n\t\t\t\tif ( curves.x ) xIndex = curves.x.times.indexOf( time );\n\t\t\t\tif ( curves.y ) yIndex = curves.y.times.indexOf( time );\n\t\t\t\tif ( curves.z ) zIndex = curves.z.times.indexOf( time );\n\n\t\t\t\t// if there is an x value defined for this frame, use that\n\t\t\t\tif ( xIndex !== - 1 ) {\n\n\t\t\t\t\tvar xValue = curves.x.values[ xIndex ];\n\t\t\t\t\tvalues.push( xValue );\n\t\t\t\t\tprevValue[ 0 ] = xValue;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// otherwise use the x value from the previous frame\n\t\t\t\t\tvalues.push( prevValue[ 0 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( yIndex !== - 1 ) {\n\n\t\t\t\t\tvar yValue = curves.y.values[ yIndex ];\n\t\t\t\t\tvalues.push( yValue );\n\t\t\t\t\tprevValue[ 1 ] = yValue;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tvalues.push( prevValue[ 1 ] );\n\n\t\t\t\t}\n\n\t\t\t\tif ( zIndex !== - 1 ) {\n\n\t\t\t\t\tvar zValue = curves.z.values[ zIndex ];\n\t\t\t\t\tvalues.push( zValue );\n\t\t\t\t\tprevValue[ 2 ] = zValue;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tvalues.push( prevValue[ 2 ] );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn values;\n\n\t\t},\n\n\t\t// Rotations are defined as Euler angles which can have values of any size\n\t\t// These will be converted to quaternions which don't support values greater than\n\t\t// PI, so we'll interpolate large rotations\n\t\tinterpolateRotations: function ( curve ) {\n\n\t\t\tfor ( var i = 1; i < curve.values.length; i ++ ) {\n\n\t\t\t\tvar initialValue = curve.values[ i - 1 ];\n\t\t\t\tvar valuesSpan = curve.values[ i ] - initialValue;\n\n\t\t\t\tvar absoluteSpan = Math.abs( valuesSpan );\n\n\t\t\t\tif ( absoluteSpan >= 180 ) {\n\n\t\t\t\t\tvar numSubIntervals = absoluteSpan / 180;\n\n\t\t\t\t\tvar step = valuesSpan / numSubIntervals;\n\t\t\t\t\tvar nextValue = initialValue + step;\n\n\t\t\t\t\tvar initialTime = curve.times[ i - 1 ];\n\t\t\t\t\tvar timeSpan = curve.times[ i ] - initialTime;\n\t\t\t\t\tvar interval = timeSpan / numSubIntervals;\n\t\t\t\t\tvar nextTime = initialTime + interval;\n\n\t\t\t\t\tvar interpolatedTimes = [];\n\t\t\t\t\tvar interpolatedValues = [];\n\n\t\t\t\t\twhile ( nextTime < curve.times[ i ] ) {\n\n\t\t\t\t\t\tinterpolatedTimes.push( nextTime );\n\t\t\t\t\t\tnextTime += interval;\n\n\t\t\t\t\t\tinterpolatedValues.push( nextValue );\n\t\t\t\t\t\tnextValue += step;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcurve.times = inject( curve.times, i, interpolatedTimes );\n\t\t\t\t\tcurve.values = inject( curve.values, i, interpolatedValues );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t};\n\n\t// parse an FBX file in ASCII format\n\tfunction TextParser() {}\n\n\tTextParser.prototype = {\n\n\t\tconstructor: TextParser,\n\n\t\tgetPrevNode: function () {\n\n\t\t\treturn this.nodeStack[ this.currentIndent - 2 ];\n\n\t\t},\n\n\t\tgetCurrentNode: function () {\n\n\t\t\treturn this.nodeStack[ this.currentIndent - 1 ];\n\n\t\t},\n\n\t\tgetCurrentProp: function () {\n\n\t\t\treturn this.currentProp;\n\n\t\t},\n\n\t\tpushStack: function ( node ) {\n\n\t\t\tthis.nodeStack.push( node );\n\t\t\tthis.currentIndent += 1;\n\n\t\t},\n\n\t\tpopStack: function () {\n\n\t\t\tthis.nodeStack.pop();\n\t\t\tthis.currentIndent -= 1;\n\n\t\t},\n\n\t\tsetCurrentProp: function ( val, name ) {\n\n\t\t\tthis.currentProp = val;\n\t\t\tthis.currentPropName = name;\n\n\t\t},\n\n\t\tparse: function ( text ) {\n\n\t\t\tthis.currentIndent = 0;\n\t\t\tconsole.log(\"FBXTree: \", FBXTree);\n\t\t\tthis.allNodes = new FBXTree();\n\t\t\tthis.nodeStack = [];\n\t\t\tthis.currentProp = [];\n\t\t\tthis.currentPropName = '';\n\n\t\t\tvar self = this;\n\n\t\t\tvar split = text.split( /[\\r\\n]+/ );\n\n\t\t\tsplit.forEach( function ( line, i ) {\n\n\t\t\t\tvar matchComment = line.match( /^[\\s\\t]*;/ );\n\t\t\t\tvar matchEmpty = line.match( /^[\\s\\t]*$/ );\n\n\t\t\t\tif ( matchComment || matchEmpty ) return;\n\n\t\t\t\tvar matchBeginning = line.match( '^\\\\t{' + self.currentIndent + '}(\\\\w+):(.*){', '' );\n\t\t\t\tvar matchProperty = line.match( '^\\\\t{' + ( self.currentIndent ) + '}(\\\\w+):[\\\\s\\\\t\\\\r\\\\n](.*)' );\n\t\t\t\tvar matchEnd = line.match( '^\\\\t{' + ( self.currentIndent - 1 ) + '}}' );\n\n\t\t\t\tif ( matchBeginning ) {\n\n\t\t\t\t\tself.parseNodeBegin( line, matchBeginning );\n\n\t\t\t\t} else if ( matchProperty ) {\n\n\t\t\t\t\tself.parseNodeProperty( line, matchProperty, split[ ++ i ] );\n\n\t\t\t\t} else if ( matchEnd ) {\n\n\t\t\t\t\tself.popStack();\n\n\t\t\t\t} else if ( line.match( /^[^\\s\\t}]/ ) ) {\n\n\t\t\t\t\t// large arrays are split over multiple lines terminated with a ',' character\n\t\t\t\t\t// if this is encountered the line needs to be joined to the previous line\n\t\t\t\t\tself.parseNodePropertyContinued( line );\n\n\t\t\t\t}\n\n\t\t\t} );\n\n\t\t\treturn this.allNodes;\n\n\t\t},\n\n\t\tparseNodeBegin: function ( line, property ) {\n\n\t\t\tvar nodeName = property[ 1 ].trim().replace( /^\"/, '' ).replace( /\"$/, '' );\n\n\t\t\tvar nodeAttrs = property[ 2 ].split( ',' ).map( function ( attr ) {\n\n\t\t\t\treturn attr.trim().replace( /^\"/, '' ).replace( /\"$/, '' );\n\n\t\t\t} );\n\n\t\t\tvar node = { name: nodeName };\n\t\t\tvar attrs = this.parseNodeAttr( nodeAttrs );\n\n\t\t\tvar currentNode = this.getCurrentNode();\n\n\t\t\t// a top node\n\t\t\tif ( this.currentIndent === 0 ) {\n\n\t\t\t\tthis.allNodes.add( nodeName, node );\n\n\t\t\t} else { // a subnode\n\n\t\t\t\t// if the subnode already exists, append it\n\t\t\t\tif ( nodeName in currentNode ) {\n\n\t\t\t\t// special case Pose needs PoseNodes as an array\n\t\t\t\t\tif ( nodeName === 'PoseNode' ) {\n\n\t\t\t\t\t\tcurrentNode.PoseNode.push( node );\n\n\t\t\t\t\t} else if ( currentNode[ nodeName ].id !== undefined ) {\n\n\t\t\t\t\t\tcurrentNode[ nodeName ] = {};\n\t\t\t\t\t\tcurrentNode[ nodeName ][ currentNode[ nodeName ].id ] = currentNode[ nodeName ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( attrs.id !== '' ) currentNode[ nodeName ][ attrs.id ] = node;\n\n\t\t\t\t} else if ( typeof attrs.id === 'number' ) {\n\n\t\t\t\t\tcurrentNode[ nodeName ] = {};\n\t\t\t\t\tcurrentNode[ nodeName ][ attrs.id ] = node;\n\n\t\t\t\t} else if ( nodeName !== 'Properties70' ) {\n\n\t\t\t\t\tif ( nodeName === 'PoseNode' )\tcurrentNode[ nodeName ] = [ node ];\n\t\t\t\t\telse currentNode[ nodeName ] = node;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( typeof attrs.id === 'number' ) node.id = attrs.id;\n\t\t\tif ( attrs.name !== '' ) node.attrName = attrs.name;\n\t\t\tif ( attrs.type !== '' ) node.attrType = attrs.type;\n\n\t\t\tthis.pushStack( node );\n\n\t\t},\n\n\t\tparseNodeAttr: function ( attrs ) {\n\n\t\t\tvar id = attrs[ 0 ];\n\n\t\t\tif ( attrs[ 0 ] !== '' ) {\n\n\t\t\t\tid = parseInt( attrs[ 0 ] );\n\n\t\t\t\tif ( isNaN( id ) ) {\n\n\t\t\t\t\tid = attrs[ 0 ];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar name = '', type = '';\n\n\t\t\tif ( attrs.length > 1 ) {\n\n\t\t\t\tname = attrs[ 1 ].replace( /^(\\w+)::/, '' );\n\t\t\t\ttype = attrs[ 2 ];\n\n\t\t\t}\n\n\t\t\treturn { id: id, name: name, type: type };\n\n\t\t},\n\n\t\tparseNodeProperty: function ( line, property, contentLine ) {\n\n\t\t\tvar propName = property[ 1 ].replace( /^\"/, '' ).replace( /\"$/, '' ).trim();\n\t\t\tvar propValue = property[ 2 ].replace( /^\"/, '' ).replace( /\"$/, '' ).trim();\n\n\t\t\t// for special case: base64 image data follows \"Content: ,\" line\n\t\t\t//\tContent: ,\n\t\t\t//\t \"/9j/4RDaRXhpZgAATU0A...\"\n\t\t\tif ( propName === 'Content' && propValue === ',' ) {\n\n\t\t\t\tpropValue = contentLine.replace( /\"/g, '' ).replace( /,$/, '' ).trim();\n\n\t\t\t}\n\n\t\t\tvar currentNode = this.getCurrentNode();\n\t\t\tvar parentName = currentNode.name;\n\n\t\t\tif ( parentName === 'Properties70' ) {\n\n\t\t\t\tthis.parseNodeSpecialProperty( line, propName, propValue );\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\t// Connections\n\t\t\tif ( propName === 'C' ) {\n\n\t\t\t\tvar connProps = propValue.split( ',' ).slice( 1 );\n\t\t\t\tvar from = parseInt( connProps[ 0 ] );\n\t\t\t\tvar to = parseInt( connProps[ 1 ] );\n\n\t\t\t\tvar rest = propValue.split( ',' ).slice( 3 );\n\n\t\t\t\trest = rest.map( function ( elem ) {\n\n\t\t\t\t\treturn elem.trim().replace( /^\"/, '' );\n\n\t\t\t\t} );\n\n\t\t\t\tpropName = 'connections';\n\t\t\t\tpropValue = [ from, to ];\n\t\t\t\tappend( propValue, rest );\n\n\t\t\t\tif ( currentNode[ propName ] === undefined ) {\n\n\t\t\t\t\tcurrentNode[ propName ] = [];\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Node\n\t\t\tif ( propName === 'Node' ) currentNode.id = propValue;\n\n\t\t\t// connections\n\t\t\tif ( propName in currentNode && Array.isArray( currentNode[ propName ] ) ) {\n\n\t\t\t\tcurrentNode[ propName ].push( propValue );\n\n\t\t\t} else {\n\n\t\t\t\tif ( propName !== 'a' ) currentNode[ propName ] = propValue;\n\t\t\t\telse currentNode.a = propValue;\n\n\t\t\t}\n\n\t\t\tthis.setCurrentProp( currentNode, propName );\n\n\t\t\t// convert string to array, unless it ends in ',' in which case more will be added to it\n\t\t\tif ( propName === 'a' && propValue.slice( - 1 ) !== ',' ) {\n\n\t\t\t\tcurrentNode.a = parseNumberArray( propValue );\n\n\t\t\t}\n\n\t\t},\n\n\t\tparseNodePropertyContinued: function ( line ) {\n\n\t\t\tvar currentNode = this.getCurrentNode();\n\n\t\t\tcurrentNode.a += line;\n\n\t\t\t// if the line doesn't end in ',' we have reached the end of the property value\n\t\t\t// so convert the string to an array\n\t\t\tif ( line.slice( - 1 ) !== ',' ) {\n\n\t\t\t\tcurrentNode.a = parseNumberArray( currentNode.a );\n\n\t\t\t}\n\n\t\t},\n\n\t\t// parse \"Property70\"\n\t\tparseNodeSpecialProperty: function ( line, propName, propValue ) {\n\n\t\t\t// split this\n\t\t\t// P: \"Lcl Scaling\", \"Lcl Scaling\", \"\", \"A\",1,1,1\n\t\t\t// into array like below\n\t\t\t// [\"Lcl Scaling\", \"Lcl Scaling\", \"\", \"A\", \"1,1,1\" ]\n\t\t\tvar props = propValue.split( '\",' ).map( function ( prop ) {\n\n\t\t\t\treturn prop.trim().replace( /^\\\"/, '' ).replace( /\\s/, '_' );\n\n\t\t\t} );\n\n\t\t\tvar innerPropName = props[ 0 ];\n\t\t\tvar innerPropType1 = props[ 1 ];\n\t\t\tvar innerPropType2 = props[ 2 ];\n\t\t\tvar innerPropFlag = props[ 3 ];\n\t\t\tvar innerPropValue = props[ 4 ];\n\n\t\t\t// cast values where needed, otherwise leave as strings\n\t\t\tswitch ( innerPropType1 ) {\n\n\t\t\t\tcase 'int':\n\t\t\t\tcase 'enum':\n\t\t\t\tcase 'bool':\n\t\t\t\tcase 'ULongLong':\n\t\t\t\tcase 'double':\n\t\t\t\tcase 'Number':\n\t\t\t\tcase 'FieldOfView':\n\t\t\t\t\tinnerPropValue = parseFloat( innerPropValue );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Color':\n\t\t\t\tcase 'ColorRGB':\n\t\t\t\tcase 'Vector3D':\n\t\t\t\tcase 'Lcl_Translation':\n\t\t\t\tcase 'Lcl_Rotation':\n\t\t\t\tcase 'Lcl_Scaling':\n\t\t\t\t\tinnerPropValue = parseNumberArray( innerPropValue );\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t// CAUTION: these props must append to parent's parent\n\t\t\tthis.getPrevNode()[ innerPropName ] = {\n\n\t\t\t\t'type': innerPropType1,\n\t\t\t\t'type2': innerPropType2,\n\t\t\t\t'flag': innerPropFlag,\n\t\t\t\t'value': innerPropValue\n\n\t\t\t};\n\n\t\t\tthis.setCurrentProp( this.getPrevNode(), innerPropName );\n\n\t\t},\n\n\t};\n\n\t// Parse an FBX file in Binary format\n\tfunction BinaryParser() {}\n\n\tBinaryParser.prototype = {\n\n\t\tconstructor: BinaryParser,\n\n\t\tparse: function ( buffer ) {\n\n\t\t\tvar reader = new BinaryReader( buffer );\n\t\t\treader.skip( 23 ); // skip magic 23 bytes\n\n\t\t\tvar version = reader.getUint32();\n\n\t\t\tconsole.log( 'THREE.FBXLoader: FBX binary version: ' + version );\n\n\t\t\tvar allNodes = new FBXTree();\n\n\t\t\twhile ( ! this.endOfContent( reader ) ) {\n\n\t\t\t\tvar node = this.parseNode( reader, version );\n\t\t\t\tif ( node !== null ) allNodes.add( node.name, node );\n\n\t\t\t}\n\n\t\t\treturn allNodes;\n\n\t\t},\n\n\t\t// Check if reader has reached the end of content.\n\t\tendOfContent: function ( reader ) {\n\n\t\t\t// footer size: 160bytes + 16-byte alignment padding\n\t\t\t// - 16bytes: magic\n\t\t\t// - padding til 16-byte alignment (at least 1byte?)\n\t\t\t//\t(seems like some exporters embed fixed 15 or 16bytes?)\n\t\t\t// - 4bytes: magic\n\t\t\t// - 4bytes: version\n\t\t\t// - 120bytes: zero\n\t\t\t// - 16bytes: magic\n\t\t\tif ( reader.size() % 16 === 0 ) {\n\n\t\t\t\treturn ( ( reader.getOffset() + 160 + 16 ) & ~ 0xf ) >= reader.size();\n\n\t\t\t} else {\n\n\t\t\t\treturn reader.getOffset() + 160 + 16 >= reader.size();\n\n\t\t\t}\n\n\t\t},\n\n\t\t// recursively parse nodes until the end of the file is reached\n\t\tparseNode: function ( reader, version ) {\n\n\t\t\tvar node = {};\n\n\t\t\t// The first three data sizes depends on version.\n\t\t\tvar endOffset = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();\n\t\t\tvar numProperties = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();\n\n\t\t\t// note: do not remove this even if you get a linter warning as it moves the buffer forward\n\t\t\tvar propertyListLen = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();\n\n\t\t\tvar nameLen = reader.getUint8();\n\t\t\tvar name = reader.getString( nameLen );\n\n\t\t\t// Regards this node as NULL-record if endOffset is zero\n\t\t\tif ( endOffset === 0 ) return null;\n\n\t\t\tvar propertyList = [];\n\n\t\t\tfor ( var i = 0; i < numProperties; i ++ ) {\n\n\t\t\t\tpropertyList.push( this.parseProperty( reader ) );\n\n\t\t\t}\n\n\t\t\t// Regards the first three elements in propertyList as id, attrName, and attrType\n\t\t\tvar id = propertyList.length > 0 ? propertyList[ 0 ] : '';\n\t\t\tvar attrName = propertyList.length > 1 ? propertyList[ 1 ] : '';\n\t\t\tvar attrType = propertyList.length > 2 ? propertyList[ 2 ] : '';\n\n\t\t\t// check if this node represents just a single property\n\t\t\t// like (name, 0) set or (name2, [0, 1, 2]) set of {name: 0, name2: [0, 1, 2]}\n\t\t\tnode.singleProperty = ( numProperties === 1 && reader.getOffset() === endOffset ) ? true : false;\n\n\t\t\twhile ( endOffset > reader.getOffset() ) {\n\n\t\t\t\tvar subNode = this.parseNode( reader, version );\n\n\t\t\t\tif ( subNode !== null ) this.parseSubNode( name, node, subNode );\n\n\t\t\t}\n\n\t\t\tnode.propertyList = propertyList; // raw property list used by parent\n\n\t\t\tif ( typeof id === 'number' ) node.id = id;\n\t\t\tif ( attrName !== '' ) node.attrName = attrName;\n\t\t\tif ( attrType !== '' ) node.attrType = attrType;\n\t\t\tif ( name !== '' ) node.name = name;\n\n\t\t\treturn node;\n\n\t\t},\n\n\t\tparseSubNode: function ( name, node, subNode ) {\n\n\t\t\t// special case: child node is single property\n\t\t\tif ( subNode.singleProperty === true ) {\n\n\t\t\t\tvar value = subNode.propertyList[ 0 ];\n\n\t\t\t\tif ( Array.isArray( value ) ) {\n\n\t\t\t\t\tnode[ subNode.name ] = subNode;\n\n\t\t\t\t\tsubNode.a = value;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tnode[ subNode.name ] = value;\n\n\t\t\t\t}\n\n\t\t\t} else if ( name === 'Connections' && subNode.name === 'C' ) {\n\n\t\t\t\tvar array = [];\n\n\t\t\t\tsubNode.propertyList.forEach( function ( property, i ) {\n\n\t\t\t\t\t// first Connection is FBX type (OO, OP, etc.). We'll discard these\n\t\t\t\t\tif ( i !== 0 ) array.push( property );\n\n\t\t\t\t} );\n\n\t\t\t\tif ( node.connections === undefined ) {\n\n\t\t\t\t\tnode.connections = [];\n\n\t\t\t\t}\n\n\t\t\t\tnode.connections.push( array );\n\n\t\t\t} else if ( subNode.name === 'Properties70' ) {\n\n\t\t\t\tvar keys = Object.keys( subNode );\n\n\t\t\t\tkeys.forEach( function ( key ) {\n\n\t\t\t\t\tnode[ key ] = subNode[ key ];\n\n\t\t\t\t} );\n\n\t\t\t} else if ( name === 'Properties70' && subNode.name === 'P' ) {\n\n\t\t\t\tvar innerPropName = subNode.propertyList[ 0 ];\n\t\t\t\tvar innerPropType1 = subNode.propertyList[ 1 ];\n\t\t\t\tvar innerPropType2 = subNode.propertyList[ 2 ];\n\t\t\t\tvar innerPropFlag = subNode.propertyList[ 3 ];\n\t\t\t\tvar innerPropValue;\n\n\t\t\t\tif ( innerPropName.indexOf( 'Lcl ' ) === 0 ) innerPropName = innerPropName.replace( 'Lcl ', 'Lcl_' );\n\t\t\t\tif ( innerPropType1.indexOf( 'Lcl ' ) === 0 ) innerPropType1 = innerPropType1.replace( 'Lcl ', 'Lcl_' );\n\n\t\t\t\tif ( innerPropType1 === 'Color' || innerPropType1 === 'ColorRGB' || innerPropType1 === 'Vector' || innerPropType1 === 'Vector3D' || innerPropType1.indexOf( 'Lcl_' ) === 0 ) {\n\n\t\t\t\t\tinnerPropValue = [\n\t\t\t\t\t\tsubNode.propertyList[ 4 ],\n\t\t\t\t\t\tsubNode.propertyList[ 5 ],\n\t\t\t\t\t\tsubNode.propertyList[ 6 ]\n\t\t\t\t\t];\n\n\t\t\t\t} else {\n\n\t\t\t\t\tinnerPropValue = subNode.propertyList[ 4 ];\n\n\t\t\t\t}\n\n\t\t\t\t// this will be copied to parent, see above\n\t\t\t\tnode[ innerPropName ] = {\n\n\t\t\t\t\t'type': innerPropType1,\n\t\t\t\t\t'type2': innerPropType2,\n\t\t\t\t\t'flag': innerPropFlag,\n\t\t\t\t\t'value': innerPropValue\n\n\t\t\t\t};\n\n\t\t\t} else if ( node[ subNode.name ] === undefined ) {\n\n\t\t\t\tif ( typeof subNode.id === 'number' ) {\n\n\t\t\t\t\tnode[ subNode.name ] = {};\n\t\t\t\t\tnode[ subNode.name ][ subNode.id ] = subNode;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tnode[ subNode.name ] = subNode;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( subNode.name === 'PoseNode' ) {\n\n\t\t\t\t\tif ( ! Array.isArray( node[ subNode.name ] ) ) {\n\n\t\t\t\t\t\tnode[ subNode.name ] = [ node[ subNode.name ] ];\n\n\t\t\t\t\t}\n\n\t\t\t\t\tnode[ subNode.name ].push( subNode );\n\n\t\t\t\t} else if ( node[ subNode.name ][ subNode.id ] === undefined ) {\n\n\t\t\t\t\tnode[ subNode.name ][ subNode.id ] = subNode;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t},\n\n\t\tparseProperty: function ( reader ) {\n\n\t\t\tvar type = reader.getString( 1 );\n\n\t\t\tswitch ( type ) {\n\n\t\t\t\tcase 'C':\n\t\t\t\t\treturn reader.getBoolean();\n\n\t\t\t\tcase 'D':\n\t\t\t\t\treturn reader.getFloat64();\n\n\t\t\t\tcase 'F':\n\t\t\t\t\treturn reader.getFloat32();\n\n\t\t\t\tcase 'I':\n\t\t\t\t\treturn reader.getInt32();\n\n\t\t\t\tcase 'L':\n\t\t\t\t\treturn reader.getInt64();\n\n\t\t\t\tcase 'R':\n\t\t\t\t\tvar length = reader.getUint32();\n\t\t\t\t\treturn reader.getArrayBuffer( length );\n\n\t\t\t\tcase 'S':\n\t\t\t\t\tvar length = reader.getUint32();\n\t\t\t\t\treturn reader.getString( length );\n\n\t\t\t\tcase 'Y':\n\t\t\t\t\treturn reader.getInt16();\n\n\t\t\t\tcase 'b':\n\t\t\t\tcase 'c':\n\t\t\t\tcase 'd':\n\t\t\t\tcase 'f':\n\t\t\t\tcase 'i':\n\t\t\t\tcase 'l':\n\n\t\t\t\t\tvar arrayLength = reader.getUint32();\n\t\t\t\t\tvar encoding = reader.getUint32(); // 0: non-compressed, 1: compressed\n\t\t\t\t\tvar compressedLength = reader.getUint32();\n\n\t\t\t\t\tif ( encoding === 0 ) {\n\n\t\t\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\t\t\treturn reader.getBooleanArray( arrayLength );\n\n\t\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\t\treturn reader.getFloat64Array( arrayLength );\n\n\t\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\t\treturn reader.getFloat32Array( arrayLength );\n\n\t\t\t\t\t\t\tcase 'i':\n\t\t\t\t\t\t\t\treturn reader.getInt32Array( arrayLength );\n\n\t\t\t\t\t\t\tcase 'l':\n\t\t\t\t\t\t\t\treturn reader.getInt64Array( arrayLength );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( typeof Zlib === 'undefined' ) {\n\n\t\t\t\t\t\tconsole.error( 'THREE.FBXLoader: External library Inflate.min.js required, obtain or import from https://github.com/imaya/zlib.js' );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar inflate = new Zlib.Inflate( new Uint8Array( reader.getArrayBuffer( compressedLength ) ) ); // eslint-disable-line no-undef\n\t\t\t\t\tvar reader2 = new BinaryReader( inflate.decompress().buffer );\n\n\t\t\t\t\tswitch ( type ) {\n\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\t\treturn reader2.getBooleanArray( arrayLength );\n\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\t\treturn reader2.getFloat64Array( arrayLength );\n\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\treturn reader2.getFloat32Array( arrayLength );\n\n\t\t\t\t\t\tcase 'i':\n\t\t\t\t\t\t\treturn reader2.getInt32Array( arrayLength );\n\n\t\t\t\t\t\tcase 'l':\n\t\t\t\t\t\t\treturn reader2.getInt64Array( arrayLength );\n\n\t\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'THREE.FBXLoader: Unknown property type ' + type );\n\n\t\t\t}\n\n\t\t}\n\n\t};\n\n\tfunction BinaryReader( buffer, littleEndian ) {\n\n\t\tthis.dv = new DataView( buffer );\n\t\tthis.offset = 0;\n\t\tthis.littleEndian = ( littleEndian !== undefined ) ? littleEndian : true;\n\n\t}\n\n\tBinaryReader.prototype = {\n\n\t\tconstructor: BinaryReader,\n\n\t\tgetOffset: function () {\n\n\t\t\treturn this.offset;\n\n\t\t},\n\n\t\tsize: function () {\n\n\t\t\treturn this.dv.buffer.byteLength;\n\n\t\t},\n\n\t\tskip: function ( length ) {\n\n\t\t\tthis.offset += length;\n\n\t\t},\n\n\t\t// seems like true/false representation depends on exporter.\n\t\t// true: 1 or 'Y'(=0x59), false: 0 or 'T'(=0x54)\n\t\t// then sees LSB.\n\t\tgetBoolean: function () {\n\n\t\t\treturn ( this.getUint8() & 1 ) === 1;\n\n\t\t},\n\n\t\tgetBooleanArray: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getBoolean() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\tgetUint8: function () {\n\n\t\t\tvar value = this.dv.getUint8( this.offset );\n\t\t\tthis.offset += 1;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetInt16: function () {\n\n\t\t\tvar value = this.dv.getInt16( this.offset, this.littleEndian );\n\t\t\tthis.offset += 2;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetInt32: function () {\n\n\t\t\tvar value = this.dv.getInt32( this.offset, this.littleEndian );\n\t\t\tthis.offset += 4;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetInt32Array: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getInt32() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\tgetUint32: function () {\n\n\t\t\tvar value = this.dv.getUint32( this.offset, this.littleEndian );\n\t\t\tthis.offset += 4;\n\t\t\treturn value;\n\n\t\t},\n\n\t\t// JavaScript doesn't support 64-bit integer so calculate this here\n\t\t// 1 << 32 will return 1 so using multiply operation instead here.\n\t\t// There's a possibility that this method returns wrong value if the value\n\t\t// is out of the range between Number.MAX_SAFE_INTEGER and Number.MIN_SAFE_INTEGER.\n\t\t// TODO: safely handle 64-bit integer\n\t\tgetInt64: function () {\n\n\t\t\tvar low, high;\n\n\t\t\tif ( this.littleEndian ) {\n\n\t\t\t\tlow = this.getUint32();\n\t\t\t\thigh = this.getUint32();\n\n\t\t\t} else {\n\n\t\t\t\thigh = this.getUint32();\n\t\t\t\tlow = this.getUint32();\n\n\t\t\t}\n\n\t\t\t// calculate negative value\n\t\t\tif ( high & 0x80000000 ) {\n\n\t\t\t\thigh = ~ high & 0xFFFFFFFF;\n\t\t\t\tlow = ~ low & 0xFFFFFFFF;\n\n\t\t\t\tif ( low === 0xFFFFFFFF ) high = ( high + 1 ) & 0xFFFFFFFF;\n\n\t\t\t\tlow = ( low + 1 ) & 0xFFFFFFFF;\n\n\t\t\t\treturn - ( high * 0x100000000 + low );\n\n\t\t\t}\n\n\t\t\treturn high * 0x100000000 + low;\n\n\t\t},\n\n\t\tgetInt64Array: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getInt64() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\t// Note: see getInt64() comment\n\t\tgetUint64: function () {\n\n\t\t\tvar low, high;\n\n\t\t\tif ( this.littleEndian ) {\n\n\t\t\t\tlow = this.getUint32();\n\t\t\t\thigh = this.getUint32();\n\n\t\t\t} else {\n\n\t\t\t\thigh = this.getUint32();\n\t\t\t\tlow = this.getUint32();\n\n\t\t\t}\n\n\t\t\treturn high * 0x100000000 + low;\n\n\t\t},\n\n\t\tgetFloat32: function () {\n\n\t\t\tvar value = this.dv.getFloat32( this.offset, this.littleEndian );\n\t\t\tthis.offset += 4;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetFloat32Array: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getFloat32() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\tgetFloat64: function () {\n\n\t\t\tvar value = this.dv.getFloat64( this.offset, this.littleEndian );\n\t\t\tthis.offset += 8;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetFloat64Array: function ( size ) {\n\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta.push( this.getFloat64() );\n\n\t\t\t}\n\n\t\t\treturn a;\n\n\t\t},\n\n\t\tgetArrayBuffer: function ( size ) {\n\n\t\t\tvar value = this.dv.buffer.slice( this.offset, this.offset + size );\n\t\t\tthis.offset += size;\n\t\t\treturn value;\n\n\t\t},\n\n\t\tgetString: function ( size ) {\n\n\t\t\t// note: safari 9 doesn't support Uint8Array.indexOf; create intermediate array instead\n\t\t\tvar a = [];\n\n\t\t\tfor ( var i = 0; i < size; i ++ ) {\n\n\t\t\t\ta[ i ] = this.getUint8();\n\n\t\t\t}\n\n\t\t\tvar nullByte = a.indexOf( 0 );\n\t\t\tif ( nullByte >= 0 ) a = a.slice( 0, nullByte );\n\n\t\t\treturn THREE.LoaderUtils.decodeText( new Uint8Array( a ) );\n\n\t\t}\n\n\t};\n\n\t// FBXTree holds a representation of the FBX data, returned by the TextParser ( FBX ASCII format)\n\t// and BinaryParser( FBX Binary format)\n\tfunction FBXTree() {}\n\n\tFBXTree.prototype = {\n\n\t\tconstructor: FBXTree,\n\n\t\tadd: function ( key, val ) {\n\n\t\t\tthis[ key ] = val;\n\n\t\t},\n\n\t};\n\n\t// ************** UTILITY FUNCTIONS **************\n\n\tfunction isFbxFormatBinary( buffer ) {\n\n\t\tvar CORRECT = 'Kaydara FBX Binary \\0';\n\n\t\treturn buffer.byteLength >= CORRECT.length && CORRECT === convertArrayBufferToString( buffer, 0, CORRECT.length );\n\n\t}\n\n\tfunction isFbxFormatASCII( text ) {\n\n\t\tvar CORRECT = [ 'K', 'a', 'y', 'd', 'a', 'r', 'a', '\\\\', 'F', 'B', 'X', '\\\\', 'B', 'i', 'n', 'a', 'r', 'y', '\\\\', '\\\\' ];\n\n\t\tvar cursor = 0;\n\n\t\tfunction read( offset ) {\n\n\t\t\tvar result = text[ offset - 1 ];\n\t\t\ttext = text.slice( cursor + offset );\n\t\t\tcursor ++;\n\t\t\treturn result;\n\n\t\t}\n\n\t\tfor ( var i = 0; i < CORRECT.length; ++ i ) {\n\n\t\t\tvar num = read( 1 );\n\t\t\tif ( num === CORRECT[ i ] ) {\n\n\t\t\t\treturn false;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn true;\n\n\t}\n\n\tfunction getFbxVersion( text ) {\n\n\t\tvar versionRegExp = /FBXVersion: (\\d+)/;\n\t\tvar match = text.match( versionRegExp );\n\t\tif ( match ) {\n\n\t\t\tvar version = parseInt( match[ 1 ] );\n\t\t\treturn version;\n\n\t\t}\n\t\tthrow new Error( 'THREE.FBXLoader: Cannot find the version number for the file given.' );\n\n\t}\n\n\t// Converts FBX ticks into real time seconds.\n\tfunction convertFBXTimeToSeconds( time ) {\n\n\t\treturn time / 46186158000;\n\n\t}\n\n\tvar dataArray = [];\n\n\t// extracts the data from the correct position in the FBX array based on indexing type\n\tfunction getData( polygonVertexIndex, polygonIndex, vertexIndex, infoObject ) {\n\n\t\tvar index;\n\n\t\tswitch ( infoObject.mappingType ) {\n\n\t\t\tcase 'ByPolygonVertex' :\n\t\t\t\tindex = polygonVertexIndex;\n\t\t\t\tbreak;\n\t\t\tcase 'ByPolygon' :\n\t\t\t\tindex = polygonIndex;\n\t\t\t\tbreak;\n\t\t\tcase 'ByVertice' :\n\t\t\t\tindex = vertexIndex;\n\t\t\t\tbreak;\n\t\t\tcase 'AllSame' :\n\t\t\t\tindex = infoObject.indices[ 0 ];\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tconsole.warn( 'THREE.FBXLoader: unknown attribute mapping type ' + infoObject.mappingType );\n\n\t\t}\n\n\t\tif ( infoObject.referenceType === 'IndexToDirect' ) index = infoObject.indices[ index ];\n\n\t\tvar from = index * infoObject.dataSize;\n\t\tvar to = from + infoObject.dataSize;\n\n\t\treturn slice( dataArray, infoObject.buffer, from, to );\n\n\t}\n\n\tvar tempMat = new THREE.Matrix4();\n\tvar tempEuler = new THREE.Euler();\n\tvar tempVec = new THREE.Vector3();\n\tvar translation = new THREE.Vector3();\n\tvar rotation = new THREE.Matrix4();\n\n\t// generate transformation from FBX transform data\n\t// ref: https://help.autodesk.com/view/FBX/2017/ENU/?guid=__files_GUID_10CDD63C_79C1_4F2D_BB28_AD2BE65A02ED_htm\n\t// transformData = {\n\t//\t eulerOrder: int,\n\t//\t translation: [],\n\t// rotationOffset: [],\n\t//\t preRotation\n\t//\t rotation\n\t//\t postRotation\n\t// scale\n\t// }\n\t// all entries are optional\n\tfunction generateTransform( transformData ) {\n\n\t\tvar transform = new THREE.Matrix4();\n\t\ttranslation.set( 0, 0, 0 );\n\t\trotation.identity();\n\n\t\tvar order = ( transformData.eulerOrder ) ? getEulerOrder( transformData.eulerOrder ) : getEulerOrder( 0 );\n\n\t\tif ( transformData.translation ) translation.fromArray( transformData.translation );\n\t\tif ( transformData.rotationOffset ) translation.add( tempVec.fromArray( transformData.rotationOffset ) );\n\n\t\tif ( transformData.rotation ) {\n\n\t\t\tvar array = transformData.rotation.map( THREE.Math.degToRad );\n\t\t\tarray.push( order );\n\t\t\trotation.makeRotationFromEuler( tempEuler.fromArray( array ) );\n\n\t\t}\n\n\t\tif ( transformData.preRotation ) {\n\n\t\t\tvar array = transformData.preRotation.map( THREE.Math.degToRad );\n\t\t\tarray.push( order );\n\t\t\ttempMat.makeRotationFromEuler( tempEuler.fromArray( array ) );\n\n\t\t\trotation.premultiply( tempMat );\n\n\t\t}\n\n\t\tif ( transformData.postRotation ) {\n\n\t\t\tvar array = transformData.postRotation.map( THREE.Math.degToRad );\n\t\t\tarray.push( order );\n\t\t\ttempMat.makeRotationFromEuler( tempEuler.fromArray( array ) );\n\n\t\t\ttempMat.getInverse( tempMat );\n\n\t\t\trotation.multiply( tempMat );\n\n\t\t}\n\n\t\tif ( transformData.scale ) transform.scale( tempVec.fromArray( transformData.scale ) );\n\n\t\ttransform.setPosition( translation );\n\t\ttransform.multiply( rotation );\n\n\t\treturn transform;\n\n\t}\n\n\t// Returns the three.js intrinsic Euler order corresponding to FBX extrinsic Euler order\n\t// ref: http://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_class_fbx_euler_html\n\tfunction getEulerOrder( order ) {\n\n\t\tvar enums = [\n\t\t\t'ZYX', // -> XYZ extrinsic\n\t\t\t'YZX', // -> XZY extrinsic\n\t\t\t'XZY', // -> YZX extrinsic\n\t\t\t'ZXY', // -> YXZ extrinsic\n\t\t\t'YXZ', // -> ZXY extrinsic\n\t\t\t'XYZ', // -> ZYX extrinsic\n\t\t//'SphericXYZ', // not possible to support\n\t\t];\n\n\t\tif ( order === 6 ) {\n\n\t\t\tconsole.warn( 'THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect.' );\n\t\t\treturn enums[ 0 ];\n\n\t\t}\n\n\t\treturn enums[ order ];\n\n\t}\n\n\t// Parses comma separated list of numbers and returns them an array.\n\t// Used internally by the TextParser\n\tfunction parseNumberArray( value ) {\n\n\t\tvar array = value.split( ',' ).map( function ( val ) {\n\n\t\t\treturn parseFloat( val );\n\n\t\t} );\n\n\t\treturn array;\n\n\t}\n\n\tfunction convertArrayBufferToString( buffer, from, to ) {\n\n\t\tif ( from === undefined ) from = 0;\n\t\tif ( to === undefined ) to = buffer.byteLength;\n\n\t\treturn THREE.LoaderUtils.decodeText( new Uint8Array( buffer, from, to ) );\n\n\t}\n\n\tfunction append( a, b ) {\n\n\t\tfor ( var i = 0, j = a.length, l = b.length; i < l; i ++, j ++ ) {\n\n\t\t\ta[ j ] = b[ i ];\n\n\t\t}\n\n\t}\n\n\tfunction slice( a, b, from, to ) {\n\n\t\tfor ( var i = from, j = 0; i < to; i ++, j ++ ) {\n\n\t\t\ta[ j ] = b[ i ];\n\n\t\t}\n\n\t\treturn a;\n\n\t}\n\n\t// inject array a2 into array a1 at index\n\tfunction inject( a1, index, a2 ) {\n\n\t\treturn a1.slice( 0, index ).concat( a2 ).concat( a1.slice( index ) );\n\n\t}\n\n\treturn FBXLoader;\n\n} )();\n","const fetchScript = require('../../lib/fetch-script')();\n\nconst LOADER_SRC = 'https://cdn.jsdelivr.net/gh/mrdoob/three.js@r86/examples/js/loaders/GLTFLoader.js';\n\nconst loadLoader = (function () {\n let promise;\n return function () {\n promise = promise || fetchScript(LOADER_SRC);\n return promise;\n };\n}());\n\n/**\n * Legacy loader for glTF 1.0 models.\n * Asynchronously loads THREE.GLTFLoader from jsdelivr.\n */\nmodule.exports = AFRAME.registerComponent('gltf-model-legacy', {\n schema: {type: 'model'},\n\n init: function () {\n this.model = null;\n this.loader = null;\n this.loaderPromise = loadLoader().then(() => {\n this.loader = new THREE.GLTFLoader();\n this.loader.setCrossOrigin('Anonymous');\n });\n },\n\n update: function () {\n const self = this;\n const el = this.el;\n const src = this.data;\n\n if (!src) { return; }\n\n this.remove();\n\n this.loaderPromise.then(() => {\n this.loader.load(src, function gltfLoaded (gltfModel) {\n self.model = gltfModel.scene;\n self.model.animations = gltfModel.animations;\n el.setObject3D('mesh', self.model);\n el.emit('model-loaded', {format: 'gltf', model: self.model});\n });\n });\n },\n\n remove: function () {\n if (!this.model) { return; }\n this.el.removeObject3D('mesh');\n }\n});\n","/**\n * Source: https://github.com/Adobe-Marketing-Cloud/fetch-script\n */\n\nfunction getScriptId() {\n return 'script_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);\n}\n\nfunction createScript(url, id) {\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.id = id;\n script.src = url;\n\n return script;\n}\n\nfunction removeScript(id) {\n const script = document.getElementById(id);\n const parent = script.parentNode;\n\n try {\n parent && parent.removeChild(script);\n } catch (e) {\n // ignore\n }\n}\n\nfunction appendScript(script) {\n const firstScript = document.getElementsByTagName('script')[0];\n firstScript.parentNode.insertBefore(script, firstScript);\n}\n\nfunction fetchScriptInternal(url, options, Promise) {\n return new Promise(function(resolve, reject) {\n const timeout = options.timeout || 5000;\n const scriptId = getScriptId();\n const script = createScript(url, scriptId);\n\n const timeoutId = setTimeout(function() {\n reject(new Error('Script request to ' + url + ' timed out'));\n\n removeScript(scriptId);\n }, timeout);\n\n const disableTimeout = function(timeoutId) { clearTimeout(timeoutId); };\n\n script.addEventListener('load', function(e) {\n resolve({ok: true});\n\n disableTimeout(timeoutId);\n removeScript(scriptId);\n });\n\n script.addEventListener('error', function(e) {\n reject(new Error('Script request to ' + url + ' failed ' + e));\n\n disableTimeout(timeoutId);\n removeScript(scriptId);\n });\n\n appendScript(script);\n });\n}\n\nfunction fetchScript(settings) {\n settings = settings || {};\n return function (url, options) {\n options = options || {};\n return fetchScriptInternal(url, options, settings.Promise || Promise);\n };\n}\n\nmodule.exports = fetchScript;\n","/**\n * object-model\n *\n * Loader for THREE.js JSON format. Somewhat confusingly, there are two different THREE.js formats,\n * both having the .json extension. This loader supports only THREE.ObjectLoader, which typically\n * includes multiple meshes or an entire scene.\n *\n * Check the console for errors, if in doubt. You may need to use `json-model` or\n * `blend-character-model` for some .js and .json files.\n *\n * See: https://clara.io/learn/user-guide/data_exchange/threejs_export\n */\nmodule.exports = AFRAME.registerComponent('object-model', {\n schema: {\n src: { type: 'asset' },\n crossorigin: { default: '' }\n },\n\n init: function () {\n this.model = null;\n },\n\n update: function () {\n let loader;\n const data = this.data;\n if (!data.src) return;\n\n this.remove();\n loader = new THREE.ObjectLoader();\n if (data.crossorigin) loader.setCrossOrigin(data.crossorigin);\n loader.load(data.src, (object) => {\n\n // Enable skinning, if applicable.\n object.traverse((o) => {\n if (o instanceof THREE.SkinnedMesh && o.material) {\n o.material.skinning = !!((o.geometry && o.geometry.bones) || []).length;\n }\n });\n\n this.load(object);\n });\n },\n\n load: function (model) {\n this.model = model;\n this.el.setObject3D('mesh', model);\n this.el.emit('model-loaded', {format: 'json', model: model});\n },\n\n remove: function () {\n if (this.model) this.el.removeObject3D('mesh');\n }\n});\n","require('./checkpoint');\nrequire('./cube-env-map');\nrequire('./grab');\nrequire('./jump-ability');\nrequire('./kinematic-body');\nrequire('./mesh-smooth');\nrequire('./normal-material');\nrequire('./sphere-collider');\n","module.exports = AFRAME.registerComponent('checkpoint', {\n schema: {\n offset: {default: {x: 0, y: 0, z: 0}, type: 'vec3'}\n },\n\n init: function () {\n this.active = false;\n this.targetEl = null;\n this.fire = this.fire.bind(this);\n this.offset = new THREE.Vector3();\n },\n\n update: function () {\n this.offset.copy(this.data.offset);\n },\n\n play: function () { this.el.addEventListener('click', this.fire); },\n pause: function () { this.el.removeEventListener('click', this.fire); },\n remove: function () { this.pause(); },\n\n fire: function () {\n const targetEl = this.el.sceneEl.querySelector('[checkpoint-controls]');\n if (!targetEl) {\n throw new Error('No `checkpoint-controls` component found.');\n }\n targetEl.components['checkpoint-controls'].setCheckpoint(this.el);\n },\n\n getOffset: function () {\n return this.offset.copy(this.data.offset);\n }\n});\n","/**\n * @param {Array<THREE.Material>|THREE.Material} material\n * @return {Array<THREE.Material>}\n */\nfunction ensureMaterialArray (material) {\n if (!material) {\n return [];\n } else if (Array.isArray(material)) {\n return material;\n } else if (material.materials) {\n return material.materials;\n } else {\n return [material];\n }\n}\n\n/**\n * @param {THREE.Object3D} mesh\n * @param {Array<string>} materialNames\n * @param {THREE.Texture} envMap\n * @param {number} reflectivity [description]\n */\nfunction applyEnvMap (mesh, materialNames, envMap, reflectivity) {\n if (!mesh) return;\n\n materialNames = materialNames || [];\n\n mesh.traverse((node) => {\n\n if (!node.isMesh) return;\n\n const meshMaterials = ensureMaterialArray(node.material);\n\n meshMaterials.forEach((material) => {\n\n if (material && !('envMap' in material)) return;\n if (materialNames.length && materialNames.indexOf(material.name) === -1) return;\n\n material.envMap = envMap;\n material.reflectivity = reflectivity;\n material.needsUpdate = true;\n\n });\n\n });\n}\n\n/**\n * Specifies an envMap on an entity, without replacing any existing material\n * properties.\n */\nmodule.exports = AFRAME.registerComponent('cube-env-map', {\n multiple: true,\n\n schema: {\n path: {default: ''},\n extension: {default: 'jpg', oneOf: ['jpg', 'png']},\n format: {default: 'RGBFormat', oneOf: ['RGBFormat', 'RGBAFormat']},\n enableBackground: {default: false},\n reflectivity: {default: 1, min: 0, max: 1},\n materials: {default: []}\n },\n\n init: function () {\n const data = this.data;\n\n this.texture = new THREE.CubeTextureLoader().load([\n data.path + 'posx.' + data.extension, data.path + 'negx.' + data.extension,\n data.path + 'posy.' + data.extension, data.path + 'negy.' + data.extension,\n data.path + 'posz.' + data.extension, data.path + 'negz.' + data.extension\n ]);\n this.texture.format = THREE[data.format];\n\n this.object3dsetHandler = () => {\n const mesh = this.el.getObject3D('mesh');\n const data = this.data;\n applyEnvMap(mesh, data.materials, this.texture, data.reflectivity);\n };\n this.el.addEventListener('object3dset', this.object3dsetHandler);\n },\n\n update: function (oldData) {\n const data = this.data;\n const mesh = this.el.getObject3D('mesh');\n\n let addedMaterialNames = [];\n let removedMaterialNames = [];\n\n if (data.materials.length) {\n if (oldData.materials) {\n addedMaterialNames = data.materials.filter((name) => !oldData.materials.includes(name));\n removedMaterialNames = oldData.materials.filter((name) => !data.materials.includes(name));\n } else {\n addedMaterialNames = data.materials;\n }\n }\n if (addedMaterialNames.length) {\n applyEnvMap(mesh, addedMaterialNames, this.texture, data.reflectivity);\n }\n if (removedMaterialNames.length) {\n applyEnvMap(mesh, removedMaterialNames, null, 1);\n }\n\n if (oldData.materials && data.reflectivity !== oldData.reflectivity) {\n const maintainedMaterialNames = data.materials\n .filter((name) => oldData.materials.includes(name));\n if (maintainedMaterialNames.length) {\n applyEnvMap(mesh, maintainedMaterialNames, this.texture, data.reflectivity);\n }\n }\n\n if (this.data.enableBackground && !oldData.enableBackground) {\n this.setBackground(this.texture);\n } else if (!this.data.enableBackground && oldData.enableBackground) {\n this.setBackground(null);\n }\n },\n\n remove: function () {\n this.el.removeEventListener('object3dset', this.object3dsetHandler);\n const mesh = this.el.getObject3D('mesh');\n const data = this.data;\n\n applyEnvMap(mesh, data.materials, null, 1);\n if (data.enableBackground) this.setBackground(null);\n },\n\n setBackground: function (texture) {\n this.el.sceneEl.object3D.background = texture;\n }\n});\n","/* global CANNON */\n\n/**\n * Based on aframe/examples/showcase/tracked-controls.\n *\n * Handles events coming from the hand-controls.\n * Determines if the entity is grabbed or released.\n * Updates its position to move along the controller.\n */\nmodule.exports = AFRAME.registerComponent('grab', {\n init: function () {\n this.system = this.el.sceneEl.systems.physics;\n\n this.GRABBED_STATE = 'grabbed';\n\n this.grabbing = false;\n this.hitEl = /** @type {AFRAME.Element} */ null;\n this.physics = /** @type {AFRAME.System} */ this.el.sceneEl.systems.physics;\n this.constraint = /** @type {CANNON.Constraint} */ null;\n\n // Bind event handlers\n this.onHit = this.onHit.bind(this);\n this.onGripOpen = this.onGripOpen.bind(this);\n this.onGripClose = this.onGripClose.bind(this);\n },\n\n play: function () {\n const el = this.el;\n el.addEventListener('hit', this.onHit);\n el.addEventListener('gripdown', this.onGripClose);\n el.addEventListener('gripup', this.onGripOpen);\n el.addEventListener('trackpaddown', this.onGripClose);\n el.addEventListener('trackpadup', this.onGripOpen);\n el.addEventListener('triggerdown', this.onGripClose);\n el.addEventListener('triggerup', this.onGripOpen);\n },\n\n pause: function () {\n const el = this.el;\n el.removeEventListener('hit', this.onHit);\n el.removeEventListener('gripdown', this.onGripClose);\n el.removeEventListener('gripup', this.onGripOpen);\n el.removeEventListener('trackpaddown', this.onGripClose);\n el.removeEventListener('trackpadup', this.onGripOpen);\n el.removeEventListener('triggerdown', this.onGripClose);\n el.removeEventListener('triggerup', this.onGripOpen);\n },\n\n onGripClose: function () {\n this.grabbing = true;\n },\n\n onGripOpen: function () {\n const hitEl = this.hitEl;\n this.grabbing = false;\n if (!hitEl) { return; }\n hitEl.removeState(this.GRABBED_STATE);\n this.hitEl = undefined;\n this.system.removeConstraint(this.constraint);\n this.constraint = null;\n },\n\n onHit: function (evt) {\n const hitEl = evt.detail.el;\n // If the element is already grabbed (it could be grabbed by another controller).\n // If the hand is not grabbing the element does not stick.\n // If we're already grabbing something you can't grab again.\n if (!hitEl || hitEl.is(this.GRABBED_STATE) || !this.grabbing || this.hitEl) { return; }\n hitEl.addState(this.GRABBED_STATE);\n this.hitEl = hitEl;\n this.constraint = new CANNON.LockConstraint(this.el.body, hitEl.body);\n this.system.addConstraint(this.constraint);\n }\n});\n","const ACCEL_G = -9.8, // m/s^2\n EASING = -15; // m/s^2\n\n/**\n * Jump ability.\n */\nmodule.exports = AFRAME.registerComponent('jump-ability', {\n dependencies: ['velocity'],\n\n /* Schema\n ——————————————————————————————————————————————*/\n\n schema: {\n on: { default: 'keydown:Space gamepadbuttondown:0' },\n playerHeight: { default: 1.764 },\n maxJumps: { default: 1 },\n distance: { default: 5 },\n debug: { default: false }\n },\n\n init: function () {\n this.velocity = 0;\n this.numJumps = 0;\n\n const beginJump = this.beginJump.bind(this),\n events = this.data.on.split(' ');\n this.bindings = {};\n for (let i = 0; i < events.length; i++) {\n this.bindings[events[i]] = beginJump;\n this.el.addEventListener(events[i], beginJump);\n }\n this.bindings.collide = this.onCollide.bind(this);\n this.el.addEventListener('collide', this.bindings.collide);\n },\n\n remove: function () {\n for (var event in this.bindings) {\n if (this.bindings.hasOwnProperty(event)) {\n this.el.removeEventListener(event, this.bindings[event]);\n delete this.bindings[event];\n }\n }\n this.el.removeEventListener('collide', this.bindings.collide);\n delete this.bindings.collide;\n },\n\n beginJump: function () {\n if (this.numJumps < this.data.maxJumps) {\n const data = this.data,\n initialVelocity = Math.sqrt(-2 * data.distance * (ACCEL_G + EASING)),\n v = this.el.getAttribute('velocity');\n this.el.setAttribute('velocity', {x: v.x, y: initialVelocity, z: v.z});\n this.numJumps++;\n this.el.emit('jumpstart');\n }\n },\n\n onCollide: function () {\n if (this.numJumps > 0) this.el.emit('jumpend');\n this.numJumps = 0;\n }\n});\n","/* global CANNON */\n\n/**\n * Kinematic body.\n *\n * Managed dynamic body, which moves but is not affected (directly) by the\n * physics engine. This is not a true kinematic body, in the sense that we are\n * letting the physics engine _compute_ collisions against it and selectively\n * applying those collisions to the object. The physics engine does not decide\n * the position/velocity/rotation of the element.\n *\n * Used for the camera object, because full physics simulation would create\n * movement that feels unnatural to the player. Bipedal movement does not\n * translate nicely to rigid body physics.\n *\n * See: http://www.learn-cocos2d.com/2013/08/physics-engine-platformer-terrible-idea/\n * And: http://oxleygamedev.blogspot.com/2011/04/player-physics-part-2.html\n */\nconst EPS = 0.000001;\n\nmodule.exports = AFRAME.registerComponent('kinematic-body', {\n dependencies: ['velocity'],\n\n /*******************************************************************\n * Schema\n */\n\n schema: {\n mass: { default: 5 },\n radius: { default: 1.3 },\n linearDamping: { default: 0.05 },\n enableSlopes: { default: true },\n enableJumps: { default: false },\n },\n\n /*******************************************************************\n * Lifecycle\n */\n\n init: function () {\n this.system = this.el.sceneEl.systems.physics;\n this.system.addComponent(this);\n\n const el = this.el,\n data = this.data,\n position = (new CANNON.Vec3()).copy(el.object3D.getWorldPosition(new THREE.Vector3()));\n\n this.body = new CANNON.Body({\n material: this.system.getMaterial('staticMaterial'),\n position: position,\n mass: data.mass,\n linearDamping: data.linearDamping,\n fixedRotation: true\n });\n this.body.addShape(\n new CANNON.Sphere(data.radius),\n new CANNON.Vec3(0, data.radius, 0)\n );\n\n this.body.el = this.el;\n this.el.body = this.body;\n this.system.addBody(this.body);\n\n if (el.hasAttribute('wasd-controls')) {\n console.warn('[kinematic-body] Not compatible with wasd-controls, use movement-controls.');\n }\n },\n\n remove: function () {\n this.system.removeBody(this.body);\n this.system.removeComponent(this);\n delete this.el.body;\n },\n\n /*******************************************************************\n * Update\n */\n\n /**\n * Checks CANNON.World for collisions and attempts to apply them to the\n * element automatically, in a player-friendly way.\n *\n * There's extra logic for horizontal surfaces here. The basic requirements:\n * (1) Only apply gravity when not in contact with _any_ horizontal surface.\n * (2) When moving, project the velocity against exactly one ground surface.\n * If in contact with two ground surfaces (e.g. ground + ramp), choose\n * the one that collides with current velocity, if any.\n */\n beforeStep: function (t, dt) {\n if (!dt) return;\n\n const el = this.el;\n const data = this.data\n const body = this.body;\n\n if (!data.enableJumps) body.velocity.set(0, 0, 0);\n body.position.copy(el.getAttribute('position'));\n },\n\n step: (function () {\n const velocity = new THREE.Vector3(),\n normalizedVelocity = new THREE.Vector3(),\n currentSurfaceNormal = new THREE.Vector3(),\n groundNormal = new THREE.Vector3();\n\n return function (t, dt) {\n if (!dt) return;\n\n let body = this.body,\n data = this.data,\n didCollide = false,\n height, groundHeight = -Infinity,\n groundBody,\n contacts = this.system.getContacts();\n\n dt = Math.min(dt, this.system.data.maxInterval * 1000);\n\n groundNormal.set(0, 0, 0);\n velocity.copy(this.el.getAttribute('velocity'));\n body.velocity.copy(velocity);\n\n for (var i = 0, contact; contact = contacts[i]; i++) {\n // 1. Find any collisions involving this element. Get the contact\n // normal, and make sure it's oriented _out_ of the other object and\n // enabled (body.collisionReponse is true for both bodies)\n if (!contact.enabled) { continue; }\n if (body.id === contact.bi.id) {\n contact.ni.negate(currentSurfaceNormal);\n } else if (body.id === contact.bj.id) {\n currentSurfaceNormal.copy(contact.ni);\n } else {\n continue;\n }\n\n didCollide = body.velocity.dot(currentSurfaceNormal) < -EPS;\n if (didCollide && currentSurfaceNormal.y <= 0.5) {\n // 2. If current trajectory attempts to move _through_ another\n // object, project the velocity against the collision plane to\n // prevent passing through.\n velocity.projectOnPlane(currentSurfaceNormal);\n } else if (currentSurfaceNormal.y > 0.5) {\n // 3. If in contact with something roughly horizontal (+/- 45º) then\n // consider that the current ground. Only the highest qualifying\n // ground is retained.\n height = body.id === contact.bi.id\n ? Math.abs(contact.rj.y + contact.bj.position.y)\n : Math.abs(contact.ri.y + contact.bi.position.y);\n if (height > groundHeight) {\n groundHeight = height;\n groundNormal.copy(currentSurfaceNormal);\n groundBody = body.id === contact.bi.id ? contact.bj : contact.bi;\n }\n }\n }\n\n normalizedVelocity.copy(velocity).normalize();\n if (groundBody && (!data.enableJumps || normalizedVelocity.y < 0.5)) {\n if (!data.enableSlopes) {\n groundNormal.set(0, 1, 0);\n } else if (groundNormal.y < 1 - EPS) {\n groundNormal.copy(this.raycastToGround(groundBody, groundNormal));\n }\n\n // 4. Project trajectory onto the top-most ground object, unless\n // trajectory is > 45º.\n velocity.projectOnPlane(groundNormal);\n\n } else if (this.system.driver.world) {\n // 5. If not in contact with anything horizontal, apply world gravity.\n // TODO - Why is the 4x scalar necessary.\n // NOTE: Does not work if physics runs on a worker.\n velocity.add(this.system.driver.world.gravity.scale(dt * 4.0 / 1000));\n }\n\n body.velocity.copy(velocity);\n this.el.setAttribute('velocity', body.velocity);\n this.el.setAttribute('position', body.position);\n };\n }()),\n\n /**\n * When walking on complex surfaces (trimeshes, borders between two shapes),\n * the collision normals returned for the player sphere can be very\n * inconsistent. To address this, raycast straight down, find the collision\n * normal, and return whichever normal is more vertical.\n * @param {CANNON.Body} groundBody\n * @param {CANNON.Vec3} groundNormal\n * @return {CANNON.Vec3}\n */\n raycastToGround: function (groundBody, groundNormal) {\n let ray,\n hitNormal,\n vFrom = this.body.position,\n vTo = this.body.position.clone();\n\n ray = new CANNON.Ray(vFrom, vTo);\n ray._updateDirection(); // TODO - Report bug.\n ray.intersectBody(groundBody);\n\n if (!ray.hasHit) return groundNormal;\n\n // Compare ABS, in case we're projecting against the inside of the face.\n hitNormal = ray.result.hitNormalWorld;\n return Math.abs(hitNormal.y) > Math.abs(groundNormal.y) ? hitNormal : groundNormal;\n }\n});\n","/**\n * Apply this component to models that looks \"blocky\", to have Three.js compute\n * vertex normals on the fly for a \"smoother\" look.\n */\nmodule.exports = AFRAME.registerComponent('mesh-smooth', {\n init: function () {\n this.el.addEventListener('model-loaded', (e) => {\n e.detail.model.traverse((node) => {\n if (node.isMesh) node.geometry.computeVertexNormals();\n });\n });\n }\n});\n","/**\n * Recursively applies a MeshNormalMaterial to the entity, such that\n * face colors are determined by their orientation. Helpful for\n * debugging geometry\n */\nmodule.exports = AFRAME.registerComponent('normal-material', {\n init: function () {\n this.material = new THREE.MeshNormalMaterial({flatShading: true});\n this.applyMaterial = this.applyMaterial.bind(this);\n this.el.addEventListener('object3dset', this.applyMaterial);\n },\n\n remove: function () {\n this.el.removeEventListener('object3dset', this.applyMaterial);\n },\n\n applyMaterial: function () {\n this.el.object3D.traverse((node) => {\n if (node.isMesh) node.material = this.material;\n });\n }\n});\n","/**\n * Based on aframe/examples/showcase/tracked-controls.\n *\n * Implement bounding sphere collision detection for entities with a mesh.\n * Sets the specified state on the intersected entities.\n *\n * @property {string} objects - Selector of the entities to test for collision.\n * @property {string} state - State to set on collided entities.\n *\n */\nmodule.exports = AFRAME.registerComponent('sphere-collider', {\n schema: {\n objects: {default: ''},\n state: {default: 'collided'},\n radius: {default: 0.05},\n watch: {default: true}\n },\n\n init: function () {\n /** @type {MutationObserver} */\n this.observer = null;\n /** @type {Array<Element>} Elements to watch for collisions. */\n this.els = [];\n /** @type {Array<Element>} Elements currently in collision state. */\n this.collisions = [];\n\n this.handleHit = this.handleHit.bind(this);\n this.handleHitEnd = this.handleHitEnd.bind(this);\n },\n\n remove: function () {\n this.pause();\n },\n\n play: function () {\n const sceneEl = this.el.sceneEl;\n\n if (this.data.watch) {\n this.observer = new MutationObserver(this.update.bind(this, null));\n this.observer.observe(sceneEl, {childList: true, subtree: true});\n }\n },\n\n pause: function () {\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n },\n\n /**\n * Update list of entities to test for collision.\n */\n update: function () {\n const data = this.data;\n let objectEls;\n\n // Push entities into list of els to intersect.\n if (data.objects) {\n objectEls = this.el.sceneEl.querySelectorAll(data.objects);\n } else {\n // If objects not defined, intersect with everything.\n objectEls = this.el.sceneEl.children;\n }\n // Convert from NodeList to Array\n this.els = Array.prototype.slice.call(objectEls);\n },\n\n tick: (function () {\n const position = new THREE.Vector3(),\n meshPosition = new THREE.Vector3(),\n colliderScale = new THREE.Vector3(),\n size = new THREE.Vector3(),\n box = new THREE.Box3(),\n distanceMap = new Map();\n return function () {\n const el = this.el,\n data = this.data,\n mesh = el.getObject3D('mesh'),\n collisions = [];\n let colliderRadius;\n\n if (!mesh) { return; }\n\n distanceMap.clear();\n el.object3D.getWorldPosition(position);\n el.object3D.getWorldScale(colliderScale);\n colliderRadius = data.radius * scaleFactor(colliderScale);\n // Update collision list.\n this.els.forEach(intersect);\n\n // Emit events and add collision states, in order of distance.\n collisions\n .sort((a, b) => distanceMap.get(a) > distanceMap.get(b) ? 1 : -1)\n .forEach(this.handleHit);\n\n // Remove collision state from current element.\n if (collisions.length === 0) { el.emit('hit', {el: null}); }\n\n // Remove collision state from other elements.\n this.collisions\n .filter((el) => !distanceMap.has(el))\n .forEach(this.handleHitEnd);\n\n // Store new collisions\n this.collisions = collisions;\n\n // Bounding sphere collision detection\n function intersect (el) {\n let radius, mesh, distance, extent;\n\n if (!el.isEntity) { return; }\n\n mesh = el.getObject3D('mesh');\n\n if (!mesh) { return; }\n\n box.setFromObject(mesh).getSize(size);\n extent = Math.max(size.x, size.y, size.z) / 2;\n radius = Math.sqrt(2 * extent * extent);\n box.getCenter(meshPosition);\n\n if (!radius) { return; }\n\n distance = position.distanceTo(meshPosition);\n if (distance < radius + colliderRadius) {\n collisions.push(el);\n distanceMap.set(el, distance);\n }\n }\n // use max of scale factors to maintain bounding sphere collision\n function scaleFactor (scaleVec) {\n return Math.max.apply(null, scaleVec.toArray());\n }\n };\n })(),\n\n handleHit: function (targetEl) {\n targetEl.emit('hit');\n targetEl.addState(this.data.state);\n this.el.emit('hit', {el: targetEl});\n },\n handleHitEnd: function (targetEl) {\n targetEl.emit('hitend');\n targetEl.removeState(this.data.state);\n this.el.emit('hitend', {el: targetEl});\n }\n});\n","require('./nav-mesh');\nrequire('./nav-agent');\nrequire('./system');\n","/**\n * nav-mesh\n *\n * Waits for a mesh to be loaded on the current entity, then sets it as the\n * nav mesh in the pathfinding system.\n */\nmodule.exports = AFRAME.registerComponent('nav-mesh', {\n init: function () {\n this.system = this.el.sceneEl.systems.nav;\n this.hasLoadedNavMesh = false;\n this.el.addEventListener('object3dset', this.loadNavMesh.bind(this));\n },\n\n play: function () {\n if (!this.hasLoadedNavMesh) this.loadNavMesh();\n },\n\n loadNavMesh: function () {\n const object = this.el.getObject3D('mesh');\n const scene = this.el.sceneEl.object3D;\n\n if (!object) return;\n\n let navMesh;\n object.traverse((node) => {\n if (node.isMesh) navMesh = node;\n });\n\n if (!navMesh) return;\n\n const navMeshGeometry = navMesh.geometry.isBufferGeometry\n ? new THREE.Geometry().fromBufferGeometry(navMesh.geometry)\n : navMesh.geometry.clone();\n\n scene.updateMatrixWorld();\n navMeshGeometry.applyMatrix(navMesh.matrixWorld);\n this.system.setNavMeshGeometry(navMeshGeometry);\n\n this.hasLoadedNavMesh = true;\n }\n});\n","module.exports = AFRAME.registerComponent('nav-agent', {\n schema: {\n destination: {type: 'vec3'},\n active: {default: false},\n speed: {default: 2}\n },\n init: function () {\n this.system = this.el.sceneEl.systems.nav;\n this.system.addAgent(this);\n this.group = null;\n this.path = [];\n this.raycaster = new THREE.Raycaster();\n },\n remove: function () {\n this.system.removeAgent(this);\n },\n update: function () {\n this.path.length = 0;\n },\n updateNavLocation: function () {\n this.group = null;\n this.path = [];\n },\n tick: (function () {\n const vDest = new THREE.Vector3();\n const vDelta = new THREE.Vector3();\n const vNext = new THREE.Vector3();\n\n return function (t, dt) {\n const el = this.el;\n const data = this.data;\n const raycaster = this.raycaster;\n const speed = data.speed * dt / 1000;\n\n if (!data.active) return;\n\n // Use PatrolJS pathfinding system to get shortest path to target.\n if (!this.path.length) {\n const position = this.el.object3D.position;\n this.group = this.group || this.system.getGroup(position);\n this.path = this.system.getPath(position, vDest.copy(data.destination), this.group) || [];\n el.emit('navigation-start');\n }\n\n // If no path is found, exit.\n if (!this.path.length) {\n console.warn('[nav] Unable to find path to %o.', data.destination);\n this.el.setAttribute('nav-agent', {active: false});\n el.emit('navigation-end');\n return;\n }\n\n // Current segment is a vector from current position to next waypoint.\n const vCurrent = el.object3D.position;\n const vWaypoint = this.path[0];\n vDelta.subVectors(vWaypoint, vCurrent);\n\n const distance = vDelta.length();\n let gazeTarget;\n\n if (distance < speed) {\n // If <1 step from current waypoint, discard it and move toward next.\n this.path.shift();\n\n // After discarding the last waypoint, exit pathfinding.\n if (!this.path.length) {\n this.el.setAttribute('nav-agent', {active: false});\n el.emit('navigation-end');\n return;\n }\n\n vNext.copy(vCurrent);\n gazeTarget = this.path[0];\n } else {\n // If still far away from next waypoint, find next position for\n // the current frame.\n vNext.copy(vDelta.setLength(speed)).add(vCurrent);\n gazeTarget = vWaypoint;\n }\n\n // Look at the next waypoint.\n gazeTarget.y = vCurrent.y;\n el.object3D.lookAt(gazeTarget);\n\n // Raycast against the nav mesh, to keep the agent moving along the\n // ground, not traveling in a straight line from higher to lower waypoints.\n raycaster.ray.origin.copy(vNext);\n raycaster.ray.origin.y += 1.5;\n raycaster.ray.direction.y = -1;\n const intersections = raycaster.intersectObject(this.system.getNavMesh());\n\n if (!intersections.length) {\n // Raycasting failed. Step toward the waypoint and hope for the best.\n vCurrent.copy(vNext);\n } else {\n // Re-project next position onto nav mesh.\n vDelta.subVectors(intersections[0].point, vCurrent);\n vCurrent.add(vDelta.setLength(speed));\n }\n\n };\n }())\n});\n","const { Pathfinding } = require('three-pathfinding');\n\nconst pathfinder = new Pathfinding();\nconst ZONE = 'level';\n\n/**\n * nav\n *\n * Pathfinding system, using PatrolJS.\n */\nmodule.exports = AFRAME.registerSystem('nav', {\n init: function () {\n this.navMesh = null;\n this.agents = new Set();\n },\n\n /**\n * @param {THREE.Geometry} geometry\n */\n setNavMeshGeometry: function (geometry) {\n this.navMesh = new THREE.Mesh(geometry);\n pathfinder.setZoneData(ZONE, Pathfinding.createZone(geometry));\n Array.from(this.agents).forEach((agent) => agent.updateNavLocation());\n },\n\n /**\n * @return {THREE.Mesh}\n */\n getNavMesh: function () {\n return this.navMesh;\n },\n\n /**\n * @param {NavAgent} ctrl\n */\n addAgent: function (ctrl) {\n this.agents.add(ctrl);\n },\n\n /**\n * @param {NavAgent} ctrl\n */\n removeAgent: function (ctrl) {\n this.agents.delete(ctrl);\n },\n\n /**\n * @param {THREE.Vector3} start\n * @param {THREE.Vector3} end\n * @param {number} groupID\n * @return {Array<THREE.Vector3>}\n */\n getPath: function (start, end, groupID) {\n return this.navMesh\n ? pathfinder.findPath(start, end, ZONE, groupID)\n : null;\n },\n\n /**\n * @param {THREE.Vector3} position\n * @return {number}\n */\n getGroup: function (position) {\n return this.navMesh\n ? pathfinder.getGroup(ZONE, position)\n : null;\n },\n\n /**\n * @param {THREE.Vector3} position\n * @param {number} groupID\n * @return {Node}\n */\n getNode: function (position, groupID) {\n return this.navMesh\n ? pathfinder.getClosestNode(position, ZONE, groupID, true)\n : null;\n },\n\n /**\n * @param {THREE.Vector3} start Starting position.\n * @param {THREE.Vector3} end Desired ending position.\n * @param {number} groupID\n * @param {Node} node\n * @param {THREE.Vector3} endTarget (Output) Adjusted step end position.\n * @return {Node} Current node, after step is taken.\n */\n clampStep: function (start, end, groupID, node, endTarget) {\n if (!this.navMesh) {\n endTarget.copy(end);\n return null;\n } else if (!node) {\n endTarget.copy(end);\n return this.getNode(end, groupID);\n }\n return pathfinder.clampStep(start, end, node, ZONE, groupID, endTarget);\n }\n});\n","var e=function(){};e.computeCentroids=function(e){var t,n,r;for(t=0,n=e.faces.length;t<n;t++)(r=e.faces[t]).centroid=new THREE.Vector3(0,0,0),r.centroid.add(e.vertices[r.a]),r.centroid.add(e.vertices[r.b]),r.centroid.add(e.vertices[r.c]),r.centroid.divideScalar(3)},e.roundNumber=function(e,t){return Number(e.toFixed(t))},e.sample=function(e){return e[Math.floor(Math.random()*e.length)]},e.mergeVertexIds=function(e,t){var n=[];if(e.forEach(function(e){t.indexOf(e)>=0&&n.push(e)}),n.length<2)return[];n.includes(e[0])&&n.includes(e[e.length-1])&&e.push(e.shift()),n.includes(t[0])&&n.includes(t[t.length-1])&&t.push(t.shift()),n=[],e.forEach(function(e){t.includes(e)&&n.push(e)});for(var r=n[1],o=n[0],i=e.slice();i[0]!==r;)i.push(i.shift());for(var s=0,u=t.slice();u[0]!==o;)if(u.push(u.shift()),s++>10)throw new Error(\"Unexpected state\");return u.shift(),u.pop(),i=i.concat(u)},e.setPolygonCentroid=function(e,t){var n=new THREE.Vector3,r=t.vertices;e.vertexIds.forEach(function(e){n.add(r[e])}),n.divideScalar(e.vertexIds.length),e.centroid.copy(n)},e.cleanPolygon=function(e,t){for(var n=[],r=t.vertices,o=0;o<e.vertexIds.length;o++){var i,s,u,c=r[e.vertexIds[o]];0===o?(i=e.vertexIds[1],s=e.vertexIds[e.vertexIds.length-1]):o===e.vertexIds.length-1?(i=e.vertexIds[0],s=e.vertexIds[e.vertexIds.length-2]):(i=e.vertexIds[o+1],s=e.vertexIds[o-1]),u=r[s];var h=r[i].clone().sub(c),a=u.clone().sub(c),d=h.angleTo(a);if(d>Math.PI-.01&&d<Math.PI+.01){var f=[];e.neighbours.forEach(function(t){t.vertexIds.includes(e.vertexIds[o])||f.push(t)}),e.neighbours=f}else n.push(e.vertexIds[o])}e.vertexIds=n,this.setPolygonCentroid(e,t)},e.isConvex=function(e,t){var n=t.vertices;if(e.vertexIds.length<3)return!1;for(var r=!0,o=[],i=0;i<e.vertexIds.length;i++){var s,u,c=n[e.vertexIds[i]];0===i?(s=n[e.vertexIds[1]],u=n[e.vertexIds[e.vertexIds.length-1]]):i===e.vertexIds.length-1?(s=n[e.vertexIds[0]],u=n[e.vertexIds[e.vertexIds.length-2]]):(s=n[e.vertexIds[i+1]],u=n[e.vertexIds[i-1]]);var h=s.clone().sub(c),a=u.clone().sub(c),d=h.angleTo(a);if(d===Math.PI||0===d)return!1;var f=h.cross(a).y;o.push(f)}return o.forEach(function(e){0===e&&(r=!1)}),o.forEach(o[0]>0?function(e){e<0&&(r=!1)}:function(e){e>0&&(r=!1)}),r},e.distanceToSquared=function(e,t){var n=e.x-t.x,r=e.y-t.y,o=e.z-t.z;return n*n+r*r+o*o},e.isPointInPoly=function(e,t){for(var n=!1,r=-1,o=e.length,i=o-1;++r<o;i=r)(e[r].z<=t.z&&t.z<e[i].z||e[i].z<=t.z&&t.z<e[r].z)&&t.x<(e[i].x-e[r].x)*(t.z-e[r].z)/(e[i].z-e[r].z)+e[r].x&&(n=!n);return n},e.isVectorInPolygon=function(e,t,n){var r=1e5,o=-1e5,i=[];return t.vertexIds.forEach(function(e){r=Math.min(n[e].y,r),o=Math.max(n[e].y,o),i.push(n[e])}),!!(e.y<o+.5&&e.y>r-.5&&this.isPointInPoly(i,e))},e.triarea2=function(e,t,n){return(n.x-e.x)*(t.z-e.z)-(t.x-e.x)*(n.z-e.z)},e.vequal=function(e,t){return this.distanceToSquared(e,t)<1e-5};var t=function(e){this.content=[],this.scoreFunction=e};t.prototype.push=function(e){this.content.push(e),this.sinkDown(this.content.length-1)},t.prototype.pop=function(){var e=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.bubbleUp(0)),e},t.prototype.remove=function(e){var t=this.content.indexOf(e),n=this.content.pop();t!==this.content.length-1&&(this.content[t]=n,this.scoreFunction(n)<this.scoreFunction(e)?this.sinkDown(t):this.bubbleUp(t))},t.prototype.size=function(){return this.content.length},t.prototype.rescoreElement=function(e){this.sinkDown(this.content.indexOf(e))},t.prototype.sinkDown=function(e){for(var t=this.content[e];e>0;){var n=(e+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(t)<this.scoreFunction(r)))break;this.content[n]=t,this.content[e]=r,e=n}},t.prototype.bubbleUp=function(e){for(var t=this.content.length,n=this.content[e],r=this.scoreFunction(n);;){var o=e+1<<1,i=o-1,s=null,u=void 0;if(i<t)(u=this.scoreFunction(this.content[i]))<r&&(s=i);if(o<t)this.scoreFunction(this.content[o])<(null===s?r:u)&&(s=o);if(null===s)break;this.content[e]=this.content[s],this.content[s]=n,e=s}};var n=function(){};n.init=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.f=0,n.g=0,n.h=0,n.cost=1,n.visited=!1,n.closed=!1,n.parent=null}},n.cleanUp=function(e){for(var t=0;t<e.length;t++){var n=e[t];delete n.f,delete n.g,delete n.h,delete n.cost,delete n.visited,delete n.closed,delete n.parent}},n.heap=function(){return new t(function(e){return e.f})},n.search=function(e,t,n){this.init(e);var r=this.heap();for(r.push(t);r.size()>0;){var o=r.pop();if(o===n){for(var i=o,s=[];i.parent;)s.push(i),i=i.parent;return this.cleanUp(s),s.reverse()}o.closed=!0;for(var u=this.neighbours(e,o),c=0,h=u.length;c<h;c++){var a=u[c];if(!a.closed){var d=o.g+a.cost,f=a.visited;if(!f||d<a.g){if(a.visited=!0,a.parent=o,!a.centroid||!n.centroid)throw new Error(\"Unexpected state\");a.h=a.h||this.heuristic(a.centroid,n.centroid),a.g=d,a.f=a.g+a.h,f?r.rescoreElement(a):r.push(a)}}}}return[]},n.heuristic=function(t,n){return e.distanceToSquared(t,n)},n.neighbours=function(e,t){for(var n=[],r=0;r<t.neighbours.length;r++)n.push(e[t.neighbours[r]]);return n};var r=1,o=function(){};o.buildZone=function(t){var n=this,r=this._buildNavigationMesh(t),o={};r.vertices.forEach(function(t){t.x=e.roundNumber(t.x,2),t.y=e.roundNumber(t.y,2),t.z=e.roundNumber(t.z,2)}),o.vertices=r.vertices;var i=this._buildPolygonGroups(r);o.groups=[];var s=function(e,t){for(var n=0;n<e.length;n++)if(t===e[n])return n};return i.forEach(function(t){var r=[];t.forEach(function(o){var i=o.neighbours.map(function(e){return s(t,e)}),u=o.neighbours.map(function(e){return n._getSharedVerticesInOrder(o,e)});o.centroid.x=e.roundNumber(o.centroid.x,2),o.centroid.y=e.roundNumber(o.centroid.y,2),o.centroid.z=e.roundNumber(o.centroid.z,2),r.push({id:s(t,o),neighbours:i,vertexIds:o.vertexIds,centroid:o.centroid,portals:u})}),o.groups.push(r)}),o},o._buildNavigationMesh=function(t){return e.computeCentroids(t),t.mergeVertices(),this._buildPolygonsFromGeometry(t)},o._buildPolygonGroups=function(e){var t=[],n=0,r=function(e){e.neighbours.forEach(function(t){void 0===t.group&&(t.group=e.group,r(t))})};return e.polygons.forEach(function(e){void 0===e.group&&(e.group=n++,r(e)),t[e.group]||(t[e.group]=[]),t[e.group].push(e)}),t},o._buildPolygonNeighbours=function(e,t,n){var r=new Set,o=n.get(e.vertexIds[0]),i=n.get(e.vertexIds[1]),s=n.get(e.vertexIds[2]);o.forEach(function(e){(i.has(e)||s.has(e))&&r.add(t.polygons[e])}),i.forEach(function(e){s.has(e)&&r.add(t.polygons[e])}),e.neighbours=Array.from(r)},o._buildPolygonsFromGeometry=function(e){for(var t=this,n=[],o=e.vertices,i=e.faceVertexUvs,s=new Map,u=0;u<o.length;u++)s.set(u,new Set);e.faces.forEach(function(e){n.push({id:r++,vertexIds:[e.a,e.b,e.c],centroid:e.centroid,normal:e.normal,neighbours:[]}),s.get(e.a).add(n.length-1),s.get(e.b).add(n.length-1),s.get(e.c).add(n.length-1)});var c={polygons:n,vertices:o,faceVertexUvs:i};return n.forEach(function(e){t._buildPolygonNeighbours(e,c,s)}),c},o._getSharedVerticesInOrder=function(e,t){var n=e.vertexIds,r=t.vertexIds,o=new Set;if(n.forEach(function(e){r.includes(e)&&o.add(e)}),o.size<2)return[];o.has(n[0])&&o.has(n[n.length-1])&&n.push(n.shift()),o.has(r[0])&&o.has(r[r.length-1])&&r.push(r.shift());var i=[];return n.forEach(function(e){r.includes(e)&&i.push(e)}),i};var i=function(){this.portals=[]};i.prototype.push=function(e,t){void 0===t&&(t=e),this.portals.push({left:e,right:t})},i.prototype.stringPull=function(){var t,n,r,o=this.portals,i=[],s=0,u=0,c=0;n=o[0].left,r=o[0].right,i.push(t=o[0].left);for(var h=1;h<o.length;h++){var a=o[h].left,d=o[h].right;if(e.triarea2(t,r,d)<=0){if(!(e.vequal(t,r)||e.triarea2(t,n,d)>0)){i.push(n),n=t=n,r=t,u=s=u,c=s,h=s;continue}r=d,c=h}if(e.triarea2(t,n,a)>=0){if(!(e.vequal(t,n)||e.triarea2(t,r,a)<0)){i.push(r),n=t=r,r=t,u=s=c,c=s,h=s;continue}n=a,u=h}}return 0!==i.length&&e.vequal(i[i.length-1],o[o.length-1].left)||i.push(o[o.length-1].left),this.path=i,i};var s,u,c,h,a,d,f=function(){this.zones={}};f.createZone=function(e){return o.buildZone(e)},f.prototype.setZoneData=function(e,t){this.zones[e]=t},f.prototype.getGroup=function(t,n){if(!this.zones[t])return null;var r=null,o=Math.pow(50,2);return this.zones[t].groups.forEach(function(t,i){t.forEach(function(t){var s=e.distanceToSquared(t.centroid,n);s<o&&(r=i,o=s)})}),r},f.prototype.getRandomNode=function(t,n,r,o){if(!this.zones[t])return new THREE.Vector3;r=r||null,o=o||0;var i=[];return this.zones[t].groups[n].forEach(function(t){r&&o?e.distanceToSquared(r,t.centroid)<o*o&&i.push(t.centroid):i.push(t.centroid)}),e.sample(i)||new THREE.Vector3},f.prototype.getClosestNode=function(t,n,r,o){void 0===o&&(o=!1);var i=this.zones[n].vertices,s=null,u=Infinity;return this.zones[n].groups[r].forEach(function(n){var r=e.distanceToSquared(n.centroid,t);r<u&&(!o||e.isVectorInPolygon(t,n,i))&&(s=n,u=r)}),s},f.prototype.findPath=function(e,t,r,o){var s=this.zones[r].groups[o],u=this.zones[r].vertices,c=this.getClosestNode(e,r,o),h=this.getClosestNode(t,r,o,!0);if(!c||!h)return null;var a=n.search(s,c,h),d=function(e,t){for(var n=0;n<e.neighbours.length;n++)if(e.neighbours[n]===t.id)return e.portals[n]},f=new i;f.push(e);for(var l=0;l<a.length;l++){var v=a[l+1];if(v){var p=d(a[l],v);f.push(u[p[0]],u[p[1]])}}f.push(t),f.stringPull();var g=f.path.map(function(e){return new THREE.Vector3(e.x,e.y,e.z)});return g.shift(),g},f.prototype.clampStep=(c=new THREE.Vector3,h=new THREE.Plane,a=new THREE.Triangle,d=new THREE.Vector3,function(e,t,n,r,o,i){var f=this.zones[r].vertices,l=this.zones[r].groups[o],v=[n],p={};p[n.id]=0,s=void 0,d.set(0,0,0),u=Infinity,h.setFromCoplanarPoints(f[n.vertexIds[0]],f[n.vertexIds[1]],f[n.vertexIds[2]]),h.projectPoint(t,c),t.copy(c);for(var g=v.pop();g;g=v.pop()){a.set(f[g.vertexIds[0]],f[g.vertexIds[1]],f[g.vertexIds[2]]),a.closestPointToPoint(t,c),c.distanceToSquared(t)<u&&(s=g,d.copy(c),u=c.distanceToSquared(t));var x=p[g];if(!(x>2))for(var I=0;I<g.neighbours.length;I++){var b=l[g.neighbours[I]];b.id in p||(v.push(b),p[b.id]=x+1)}}return i.copy(d),s});export{f as Pathfinding};\n//# sourceMappingURL=three-pathfinding.module.js.map\n","require('./a-grid');\nrequire('./a-hexgrid');\nrequire('./a-ocean');\nrequire('./a-tube');\n","/**\n * Flat grid.\n *\n * Defaults to 75x75.\n */\nmodule.exports = AFRAME.registerPrimitive('a-grid', {\n defaultComponents: {\n geometry: {\n primitive: 'plane',\n width: 75,\n height: 75\n },\n rotation: {x: -90, y: 0, z: 0},\n material: {\n src: 'url(https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/assets/grid.png)',\n repeat: '75 75'\n }\n },\n mappings: {\n width: 'geometry.width',\n height: 'geometry.height',\n src: 'material.src'\n }\n});\n","const vg = require('../../lib/hex-grid.min.js');\nconst defaultHexGrid = require('../../lib/default-hex-grid');\n\n/**\n * Hex grid.\n */\nmodule.exports.Primitive = AFRAME.registerPrimitive('a-hexgrid', {\n defaultComponents: {\n 'hexgrid': {}\n },\n mappings: {\n src: 'hexgrid.src'\n }\n});\n\nmodule.exports.Component = AFRAME.registerComponent('hexgrid', {\n dependencies: ['material'],\n schema: {\n src: {type: 'asset'}\n },\n init: function () {\n const data = this.data;\n if (data.src) {\n fetch(data.src)\n .then((response) => response.json())\n .then((json) => this.addMesh(json));\n } else {\n this.addMesh(defaultHexGrid);\n }\n },\n addMesh: function (json) {\n const grid = new vg.HexGrid();\n grid.fromJSON(json);\n const board = new vg.Board(grid);\n board.generateTilemap();\n this.el.setObject3D('mesh', board.group);\n this.addMaterial();\n },\n addMaterial: function () {\n const materialComponent = this.el.components.material;\n const material = (materialComponent || {}).material;\n if (!material) return;\n this.el.object3D.traverse((node) => {\n if (node.isMesh) {\n node.material = material;\n }\n });\n },\n remove: function () {\n this.el.removeObject3D('mesh');\n }\n});\n","var vg=module.exports={VERSION:\"0.1.1\",PI:Math.PI,TAU:2*Math.PI,DEG_TO_RAD:.0174532925,RAD_TO_DEG:57.2957795,SQRT3:Math.sqrt(3),TILE:\"tile\",ENT:\"entity\",STR:\"structure\",HEX:\"hex\",SQR:\"square\",ABS:\"abstract\"};vg.Board=function(e,t){if(!e)throw new Error(\"You must pass in a grid system for the board to use.\");this.tiles=[],this.tileGroup=null,this.group=new THREE.Object3D,this.grid=null,this.overlay=null,this.finder=new vg.AStarFinder(t),vg.Loader.init(),this.setGrid(e)},vg.Board.prototype={setEntityOnTile:function(e,t){var i=this.grid.cellToPixel(t.cell);e.position.copy(i),e.position.y+=e.heightOffset||0,e.tile&&(e.tile.entity=null),e.tile=t,t.entity=e},addTile:function(e){var t=this.tiles.indexOf(e);-1===t&&(this.tiles.push(e),this.snapTileToGrid(e),e.position.y=0,this.tileGroup.add(e.mesh),this.grid.add(e.cell),e.cell.tile=e)},removeTile:function(e){if(e){var t=this.tiles.indexOf(e);this.grid.remove(e.cell),-1!==t&&this.tiles.splice(t,1),e.dispose()}},removeAllTiles:function(){if(this.tileGroup)for(var e=this.tileGroup.children,t=0;t<e.length;t++)this.tileGroup.remove(e[t])},getTileAtCell:function(e){var t=this.grid.cellToHash(e);return e.tile||(\"undefined\"!=typeof this.grid.cells[t]?this.grid.cells[t].tile:null)},snapToGrid:function(e){var t=this.grid.pixelToCell(e);e.copy(this.grid.cellToPixel(t))},snapTileToGrid:function(e){if(e.cell)e.position.copy(this.grid.cellToPixel(e.cell));else{var t=this.grid.pixelToCell(e.position);e.position.copy(this.grid.cellToPixel(t))}return e},getRandomTile:function(){var e=vg.Tools.randomInt(0,this.tiles.length-1);return this.tiles[e]},findPath:function(e,t,i){return this.finder.findPath(e.cell,t.cell,i,this.grid)},setGrid:function(e){this.group.remove(this.tileGroup),this.grid&&e!==this.grid&&(this.removeAllTiles(),this.tiles.forEach(function(e){this.grid.remove(e.cell),e.dispose()}),this.grid.dispose()),this.grid=e,this.tiles=[],this.tileGroup=new THREE.Object3D,this.group.add(this.tileGroup)},generateOverlay:function(e){var t=new THREE.LineBasicMaterial({color:0,opacity:.3});this.overlay&&this.group.remove(this.overlay),this.overlay=new THREE.Object3D,this.grid.generateOverlay(e,this.overlay,t),this.group.add(this.overlay)},generateTilemap:function(e){this.reset();var t=this.grid.generateTiles(e);this.tiles=t,this.tileGroup=new THREE.Object3D;for(var i=0;i<t.length;i++)this.tileGroup.add(t[i].mesh);this.group.add(this.tileGroup)},reset:function(){this.removeAllTiles(),this.tileGroup&&this.group.remove(this.tileGroup)}},vg.Board.prototype.constructor=vg.Board,vg.Cell=function(e,t,i,s){this.q=e||0,this.r=t||0,this.s=i||0,this.h=s||1,this.tile=null,this.userData={},this.walkable=!0,this._calcCost=0,this._priority=0,this._visited=!1,this._parent=null,this.uniqueID=vg.LinkedList.generateID()},vg.Cell.prototype={set:function(e,t,i){return this.q=e,this.r=t,this.s=i,this},copy:function(e){return this.q=e.q,this.r=e.r,this.s=e.s,this.h=e.h,this.tile=e.tile||null,this.userData=e.userData||{},this.walkable=e.walkable,this},add:function(e){return this.q+=e.q,this.r+=e.r,this.s+=e.s,this},equals:function(e){return this.q===e.q&&this.r===e.r&&this.s===e.s}},vg.Cell.prototype.constructor=vg.Cell,vg.HexGrid=function(e){e=e||{},this.type=vg.HEX,this.size=5,this.cellSize=\"undefined\"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t,i=[];for(t=0;6>t;t++)i.push(this._createVertex(t));for(this.cellShape=new THREE.Shape,this.cellShape.moveTo(i[0].x,i[0].y),t=1;6>t;t++)this.cellShape.lineTo(i[t].x,i[t].y);this.cellShape.lineTo(i[0].x,i[0].y),this.cellShape.autoClose=!0,this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=i,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._cellWidth=2*this.cellSize,this._cellLength=.5*vg.SQRT3*this._cellWidth,this._hashDelimeter=\".\",this._directions=[new vg.Cell(1,-1,0),new vg.Cell(1,0,-1),new vg.Cell(0,1,-1),new vg.Cell(-1,1,0),new vg.Cell(-1,0,1),new vg.Cell(0,-1,1)],this._diagonals=[new vg.Cell(2,-1,-1),new vg.Cell(1,1,-2),new vg.Cell(-1,2,-1),new vg.Cell(-2,1,1),new vg.Cell(-1,-1,2),new vg.Cell(1,-2,1)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new vg.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},vg.HexGrid.TWO_THIRDS=2/3,vg.HexGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._cellWidth*.75,this._vec3.y=e.h,this._vec3.z=-((e.s-e.r)*this._cellLength*.5),this._vec3},pixelToCell:function(e){var t=e.x*(vg.HexGrid.TWO_THIRDS/this.cellSize),i=(-e.x/3+vg.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,i,-t-i),this._cubeRound(this._cel)},getCellAt:function(e){var t=e.x*(vg.HexGrid.TWO_THIRDS/this.cellSize),i=(-e.x/3+vg.SQRT3/3*e.z)/this.cellSize;return this._cel.set(t,i,-t-i),this._cubeRound(this._cel),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,i){var s,n,l=this._directions.length;for(this._list.length=0,s=0;l>s;s++)this._cel.copy(e),this._cel.add(this._directions[s]),n=this.cells[this.cellToHash(this._cel)],!n||i&&!i(e,n)||this._list.push(n);if(t)for(s=0;l>s;s++)this._cel.copy(e),this._cel.add(this._diagonals[s]),n=this.cells[this.cellToHash(this._cel)],!n||i&&!i(e,n)||this._list.push(n);return this._list},getRandomCell:function(){var e,t=0,i=vg.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===i)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r+this._hashDelimeter+e.s},distance:function(e,t){var i=Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r),Math.abs(e.s-t.s));return i+=t.h-e.h},clearPath:function(){var e,t;for(e in this.cells)t=this.cells[e],t._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,i){var s=Math.abs(e.h);1>s&&(s=1);var n=this._geoCache[s];n||(this.extrudeSettings.amount=s,n=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[s]=n);var l=new vg.Tile({size:this.cellSize,scale:t,cell:e,geometry:n,material:i});return e.tile=l,l},generateTiles:function(e){e=e||{};var t=[],i={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};i=vg.Tools.merge(i,e),this.cellSize=i.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*vg.SQRT3*this._cellWidth,this.autogenerated=!0,this.extrudeSettings=i.extrudeSettings;var s,n,l;for(s in this.cells)l=this.cells[s],n=this.generateTile(l,i.tileScale,i.material),n.position.copy(this.cellToPixel(l)),n.position.y=0,t.push(n);return t},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,vg.PI/2),t},generate:function(e){e=e||{},this.size=\"undefined\"==typeof e.size?this.size:e.size;var t,i,s,n;for(t=-this.size;t<this.size+1;t++)for(i=-this.size;i<this.size+1;i++)s=-t-i,Math.abs(t)<=this.size&&Math.abs(i)<=this.size&&Math.abs(s)<=this.size&&(n=new vg.Cell(t,i,s),this.add(n))},generateOverlay:function(e,t,i){var s,n,l,r=this.cellShape.createPointsGeometry();for(s=-e;e+1>s;s++)for(n=-e;e+1>n;n++)if(l=-s-n,Math.abs(s)<=e&&Math.abs(n)<=e&&Math.abs(l)<=e){this._cel.set(s,n,l);var h=new THREE.Line(r,i);h.position.copy(this.cellToPixel(this._cel)),h.rotation.x=90*vg.DEG_TO_RAD,t.add(h)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,i){var s=this;vg.Tools.getJSON({url:e,callback:function(e){s.fromJSON(e),t.call(i||null,e)},cache:!1,scope:s})},fromJSON:function(e){var t,i,s=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._cellWidth=2*this.cellSize,this._cellLength=.5*vg.SQRT3*this._cellWidth,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<s.length;t++)i=new vg.Cell,i.copy(s[t]),this.add(i)},toJSON:function(){var e,t,i={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},s=[];for(t in this.cells)e=this.cells[t],s.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return i.cells=s,i},_createVertex:function(e){var t=vg.TAU/6*e;return new THREE.Vector3(this.cellSize*Math.cos(t),this.cellSize*Math.sin(t),0)},_cubeRound:function(e){var t=Math.round(e.q),i=Math.round(e.r),s=Math.round(e.s),n=Math.abs(t-e.q),l=Math.abs(i-e.r),r=Math.abs(s-e.s);return n>l&&n>r?t=-i-s:l>r?i=-t-s:s=-t-i,this._cel.set(t,i,s)}},vg.HexGrid.prototype.constructor=vg.HexGrid,vg.SqrGrid=function(e){e=e||{},this.type=vg.SQR,this.size=5,this.cellSize=\"undefined\"==typeof e.cellSize?10:e.cellSize,this.cells={},this.numCells=0,this.extrudeSettings=null,this.autogenerated=!1;var t=[];t.push(new THREE.Vector3),t.push(new THREE.Vector3(-this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,this.cellSize)),t.push(new THREE.Vector3(this.cellSize,-this.cellSize)),this.cellShape=new THREE.Shape,this.cellShape.moveTo(-this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,this.cellSize),this.cellShape.lineTo(this.cellSize,-this.cellSize),this.cellShape.lineTo(-this.cellSize,-this.cellSize),this.cellGeo=new THREE.Geometry,this.cellGeo.vertices=t,this.cellGeo.verticesNeedUpdate=!0,this.cellShapeGeo=new THREE.ShapeGeometry(this.cellShape),this._fullCellSize=2*this.cellSize,this._hashDelimeter=\".\",this._directions=[new vg.Cell(1,0,0),new vg.Cell(0,-1,0),new vg.Cell(-1,0,0),new vg.Cell(0,1,0)],this._diagonals=[new vg.Cell(-1,-1,0),new vg.Cell(-1,1,0),new vg.Cell(1,1,0),new vg.Cell(1,-1,0)],this._list=[],this._vec3=new THREE.Vector3,this._cel=new vg.Cell,this._conversionVec=new THREE.Vector3,this._geoCache=[],this._matCache=[]},vg.SqrGrid.prototype={cellToPixel:function(e){return this._vec3.x=e.q*this._fullCellSize,this._vec3.y=e.h,this._vec3.z=e.r*this._fullCellSize,this._vec3},pixelToCell:function(e){var t=Math.round(e.x/this._fullCellSize),i=Math.round(e.z/this._fullCellSize);return this._cel.set(t,i,0)},getCellAt:function(e){var t=Math.round(e.x/this._fullCellSize),i=Math.round(e.z/this._fullCellSize);return this._cel.set(t,i),this.cells[this.cellToHash(this._cel)]},getNeighbors:function(e,t,i){var s,n,l=this._directions.length;for(this._list.length=0,s=0;l>s;s++)this._cel.copy(e),this._cel.add(this._directions[s]),n=this.cells[this.cellToHash(this._cel)],!n||i&&!i(e,n)||this._list.push(n);if(t)for(s=0;l>s;s++)this._cel.copy(e),this._cel.add(this._diagonals[s]),n=this.cells[this.cellToHash(this._cel)],!n||i&&!i(e,n)||this._list.push(n);return this._list},getRandomCell:function(){var e,t=0,i=vg.Tools.randomInt(0,this.numCells);for(e in this.cells){if(t===i)return this.cells[e];t++}return this.cells[e]},cellToHash:function(e){return e.q+this._hashDelimeter+e.r},distance:function(e,t){var i=Math.max(Math.abs(e.q-t.q),Math.abs(e.r-t.r));return i+=t.h-e.h},clearPath:function(){var e,t;for(e in this.cells)t=this.cells[e],t._calcCost=0,t._priority=0,t._parent=null,t._visited=!1},traverse:function(e){var t;for(t in this.cells)e(this.cells[t])},generateTile:function(e,t,i){var s=Math.abs(e.h);1>s&&(s=1);var n=this._geoCache[s];n||(this.extrudeSettings.amount=s,n=new THREE.ExtrudeGeometry(this.cellShape,this.extrudeSettings),this._geoCache[s]=n);var l=new vg.Tile({size:this.cellSize,scale:t,cell:e,geometry:n,material:i});return e.tile=l,l},generateTiles:function(e){e=e||{};var t=[],i={tileScale:.95,cellSize:this.cellSize,material:null,extrudeSettings:{amount:1,bevelEnabled:!0,bevelSegments:1,steps:1,bevelSize:.5,bevelThickness:.5}};i=vg.Tools.merge(i,e),this.cellSize=i.cellSize,this._fullCellSize=2*this.cellSize,this.autogenerated=!0,this.extrudeSettings=i.extrudeSettings;var s,n,l;for(s in this.cells)l=this.cells[s],n=this.generateTile(l,i.tileScale,i.material),n.position.copy(this.cellToPixel(l)),n.position.y=0,t.push(n);return t},generateTilePoly:function(e){e||(e=new THREE.MeshBasicMaterial({color:2405631}));var t=new THREE.Mesh(this.cellShapeGeo,e);return this._vec3.set(1,0,0),t.rotateOnAxis(this._vec3,vg.PI/2),t},generate:function(e){e=e||{},this.size=\"undefined\"==typeof e.size?this.size:e.size;var t,i,s,n=Math.ceil(this.size/2);for(t=-n;n>t;t++)for(i=-n;n>i;i++)s=new vg.Cell(t,i+1),this.add(s)},generateOverlay:function(e,t,i){var s,n,l=Math.ceil(e/2);for(s=-l;l>s;s++)for(n=-l;l>n;n++){this._cel.set(s,n);var r=new THREE.Line(this.cellGeo,i);r.position.copy(this.cellToPixel(this._cel)),r.rotation.x=90*vg.DEG_TO_RAD,t.add(r)}},add:function(e){var t=this.cellToHash(e);if(!this.cells[t])return this.cells[t]=e,this.numCells++,e},remove:function(e){var t=this.cellToHash(e);this.cells[t]&&(delete this.cells[t],this.numCells--)},dispose:function(){this.cells=null,this.numCells=0,this.cellShape=null,this.cellGeo.dispose(),this.cellGeo=null,this.cellShapeGeo.dispose(),this.cellShapeGeo=null,this._list=null,this._vec3=null,this._conversionVec=null,this._geoCache=null,this._matCache=null},load:function(e,t,i){vg.Tools.getJSON({url:e,callback:function(e){this.fromJSON(e),t.call(i||null,e)},cache:!1,scope:this})},fromJSON:function(e){var t,i,s=e.cells;for(this.cells={},this.numCells=0,this.size=e.size,this.cellSize=e.cellSize,this._fullCellSize=2*this.cellSize,this.extrudeSettings=e.extrudeSettings,this.autogenerated=e.autogenerated,t=0;t<s.length;t++)i=new vg.Cell,i.copy(s[t]),this.add(i)},toJSON:function(){var e,t,i={size:this.size,cellSize:this.cellSize,extrudeSettings:this.extrudeSettings,autogenerated:this.autogenerated},s=[];for(t in this.cells)e=this.cells[t],s.push({q:e.q,r:e.r,s:e.s,h:e.h,walkable:e.walkable,userData:e.userData});return i.cells=s,i}},vg.SqrGrid.prototype.constructor=vg.SqrGrid,vg.Tile=function(e){e=e||{};var t={cell:null,geometry:null,material:null};if(t=vg.Tools.merge(t,e),!t.cell||!t.geometry)throw new Error(\"Missing vg.Tile configuration\");this.cell=t.cell,this.cell.tile&&this.cell.tile!==this&&this.cell.tile.dispose(),this.cell.tile=this,this.uniqueID=vg.Tools.generateID(),this.geometry=t.geometry,this.material=t.material,this.material||(this.material=new THREE.MeshPhongMaterial({color:vg.Tools.randomizeRGB(\"30, 30, 30\",13)})),this.objectType=vg.TILE,this.entity=null,this.userData={},this.selected=!1,this.highlight=\"0x0084cc\",this.mesh=new THREE.Mesh(this.geometry,this.material),this.mesh.userData.structure=this,this.position=this.mesh.position,this.rotation=this.mesh.rotation,this.rotation.x=-90*vg.DEG_TO_RAD,this.mesh.scale.set(t.scale,t.scale,1),this.material.emissive?this._emissive=this.material.emissive.getHex():this._emissive=null},vg.Tile.prototype={select:function(){return this.material.emissive&&this.material.emissive.setHex(this.highlight),this.selected=!0,this},deselect:function(){return null!==this._emissive&&this.material.emissive&&this.material.emissive.setHex(this._emissive),this.selected=!1,this},toggle:function(){return this.selected?this.deselect():this.select(),this},dispose:function(){this.cell&&this.cell.tile&&(this.cell.tile=null),this.cell=null,this.position=null,this.rotation=null,this.mesh.parent&&this.mesh.parent.remove(this.mesh),this.mesh.userData.structure=null,this.mesh=null,this.material=null,this.userData=null,this.entity=null,this.geometry=null,this._emissive=null}},vg.Tile.prototype.constructor=vg.Tile,function(){var e=function(){this.obj=null,this.next=null,this.prev=null,this.free=!0},t=function(){this.first=null,this.last=null,this.length=0,this.objToNodeMap={},this.uniqueID=Date.now()+\"\"+Math.floor(1e3*Math.random()),this.sortArray=[]};t.generateID=function(){return Math.random().toString(36).slice(2)+Date.now()},t.prototype={getNode:function(e){return this.objToNodeMap[e.uniqueID]},addNode:function(i){var s=new e;if(!i.uniqueID)try{i.uniqueID=t.generateID()}catch(n){return console.error(\"[LinkedList.addNode] obj passed is immutable: cannot attach necessary identifier\"),null}return s.obj=i,s.free=!1,this.objToNodeMap[i.uniqueID]=s,s},swapObjects:function(e,t){this.objToNodeMap[e.obj.uniqueID]=null,this.objToNodeMap[t.uniqueID]=e,e.obj=t},add:function(e){var t=this.objToNodeMap[e.uniqueID];if(t){if(t.free===!1)return;t.obj=e,t.free=!1,t.next=null,t.prev=null}else t=this.addNode(e);if(this.first){if(!this.last)throw new Error(\"[LinkedList.add] No last in the list -- that shouldn't happen here\");this.last.next=t,t.prev=this.last,this.last=t,t.next=null}else this.first=t,this.last=t,t.next=null,t.prev=null;this.length++,this.showDebug&&this.dump(\"after add\")},has:function(e){return!!this.objToNodeMap[e.uniqueID]},moveUp:function(e){this.dump(\"before move up\");var t=this.getNode(e);if(!t)throw\"Oops, trying to move an object that isn't in the list\";if(t.prev){var i=t.prev,s=i.prev;t==this.last&&(this.last=i);var n=t.next;s&&(s.next=t),t.next=i,t.prev=i.prev,i.next=n,i.prev=t,this.first==i&&(this.first=t)}},moveDown:function(e){var t=this.getNode(e);if(!t)throw\"Oops, trying to move an object that isn't in the list\";if(t.next){var i=t.next;this.moveUp(i.obj),this.last==i&&(this.last=t)}},sort:function(e){var t,i,s=this.sortArray,n=this.first;for(s.length=0;n;)s.push(n.obj),n=n.next;for(this.clear(),s.sort(e),i=s.length,t=0;i>t;t++)this.add(s[t])},remove:function(e){var t=this.getNode(e);return!t||t.free?!1:(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.prev||(this.first=t.next),t.next||(this.last=t.prev),t.free=!0,t.prev=null,t.next=null,this.length--,!0)},shift:function(){var e=this.first;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.first=e.next,e.next||(this.last=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},pop:function(){var e=this.last;return 0===this.length?null:(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),this.last=e.prev,e.prev||(this.first=null),e.free=!0,e.prev=null,e.next=null,this.length--,e.obj)},concat:function(e){for(var t=e.first;t;)this.add(t.obj),t=t.next},clear:function(){for(var e=this.first;e;)e.free=!0,e=e.next;this.first=null,this.length=0},dispose:function(){for(var e=this.first;e;)e.obj=null,e=e.next;this.first=null,this.objToNodeMap=null},dump:function(e){console.log(\"====================\"+e+\"=====================\");for(var t=this.first;t;)console.log(\"{\"+t.obj.toString()+\"} previous=\"+(t.prev?t.prev.obj:\"NULL\")),t=t.next();console.log(\"===================================\"),console.log(\"Last: {\"+(this.last?this.last.obj:\"NULL\")+\"} First: {\"+(this.first?this.first.obj:\"NULL\")+\"}\")}},t.prototype.constructor=t,vg.LinkedList=t}(),function(){var e=function(e,t,i,s,n){this._listener=t,this.isOnce=i,this.context=s,this.signal=e,this._priority=n||0};e.prototype={active:!0,params:null,execute:function(e){var t,i;return this.active&&this._listener&&(i=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,i),this.isOnce&&this.detach()),t},detach:function(){return this.isBound()?this.signal.remove(this._listener,this.context):null},isBound:function(){return!!this.signal&&!!this._listener},_destroy:function(){delete this.signal,delete this._listener,delete this.context},toString:function(){return\"[SignalBinding isOnce:\"+this.isOnce+\", isBound:\"+this.isBound()+\", active:\"+this.active+\"]\"}},e.prototype.constructor=e;var t=function(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){t.prototype.dispatch.apply(e,arguments)}};t.prototype={memorize:!1,_shouldPropagate:!0,active:!0,validateListener:function(e,t){if(\"function\"!=typeof e)throw new Error(\"Signal: listener is a required param of {fn}() and should be a Function.\".replace(\"{fn}\",t))},_registerListener:function(t,i,s,n){var l,r=this._indexOfListener(t,s);if(-1!==r){if(l=this._bindings[r],l.isOnce!==i)throw new Error(\"You cannot add\"+(i?\"\":\"Once\")+\"() then add\"+(i?\"Once\":\"\")+\"() the same listener without removing the relationship first.\")}else l=new e(this,t,i,s,n),this._addBinding(l);return this.memorize&&this._prevParams&&l.execute(this._prevParams),l},_addBinding:function(e){var t=this._bindings.length;do t--;while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var i,s=this._bindings.length;s--;)if(i=this._bindings[s],i._listener===e&&i.context===t)return s;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,i){return this.validateListener(e,\"add\"),this._registerListener(e,!1,t,i)},addOnce:function(e,t,i){return this.validateListener(e,\"addOnce\"),this._registerListener(e,!0,t,i)},remove:function(e,t){this.validateListener(e,\"remove\");var i=this._indexOfListener(e,t);return-1!==i&&(this._bindings[i]._destroy(),this._bindings.splice(i,1)),e},removeAll:function(e){\"undefined\"==typeof e&&(e=null);for(var t=this._bindings.length;t--;)e?this._bindings[t].context===e&&(this._bindings[t]._destroy(),this._bindings.splice(t,1)):this._bindings[t]._destroy();e||(this._bindings.length=0)},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(){if(this.active){var e,t=Array.prototype.slice.call(arguments),i=this._bindings.length;if(this.memorize&&(this._prevParams=t),i){e=this._bindings.slice(),this._shouldPropagate=!0;do i--;while(e[i]&&this._shouldPropagate&&e[i].execute(t)!==!1)}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return\"[Signal active:\"+this.active+\" numListeners:\"+this.getNumListeners()+\"]\"}},t.prototype.constructor=t,vg.Signal=t}(),vg.AStarFinder=function(e){e=e||{};var t={allowDiagonal:!1,heuristicFilter:null};t=vg.Tools.merge(t,e),this.allowDiagonal=t.allowDiagonal,this.heuristicFilter=t.heuristicFilter,this.list=new vg.LinkedList},vg.AStarFinder.prototype={findPath:function(e,t,i,s){var n,l,r,h,o,a;for(i=i||this.heuristicFilter,s.clearPath(),this.list.clear(),this.list.add(e);this.list.length>0;){if(this.list.sort(this.compare),n=this.list.shift(),n._visited=!0,n===t)return vg.PathUtil.backtrace(t);for(r=s.getNeighbors(n,this.allowDiagonal,i),o=0,a=r.length;a>o;o++)if(h=r[o],h.walkable&&(l=n._calcCost+s.distance(n,h),!h._visited||l<h._calcCost)){if(h._visited=!0,h._parent=n,h._calcCost=l,h._priority=l+s.distance(t,h),h===t)return vg.PathUtil.backtrace(t);this.list.add(h)}}return null},compare:function(e,t){return e._priority-t._priority}},vg.AStarFinder.prototype.constructor=vg.AStarFinder,vg.PathUtil={backtrace:function(e){for(var t=[e];e._parent;)e=e._parent,t.push(e);return t.reverse()},biBacktrace:function(e,t){var i=this.backtrace(e),s=this.backtrace(t);return i.concat(s.reverse())},pathLength:function(e){var t,i,s,n,l,r=0;for(t=1;t<e.length;++t)i=e[t-1],s=e[t],n=i[0]-s[0],l=i[1]-s[1],r+=Math.sqrt(n*n+l*l);return r},interpolate:function(e,t,i,s){var n,l,r,h,o,a,c=Math.abs,u=[];for(r=c(i-e),h=c(s-t),n=i>e?1:-1,l=s>t?1:-1,o=r-h;e!==i||t!==s;)u.push([e,t]),a=2*o,a>-h&&(o-=h,e+=n),r>a&&(o+=r,t+=l);return u},expandPath:function(e){var t,i,s,n,l,r,h=[],o=e.length;if(2>o)return h;for(l=0;o-1>l;++l)for(t=e[l],i=e[l+1],s=this.interpolate(t[0],t[1],i[0],i[1]),n=s.length,r=0;n-1>r;++r)h.push(s[r]);return h.push(e[o-1]),h},smoothenPath:function(e,t){var i,s,n,l,r,h,o,a,c,u,d,g,p=t.length,v=t[0][0],f=t[0][1],m=t[p-1][0],_=t[p-1][1];for(i=v,s=f,r=[[i,s]],o=2;p>o;++o){for(c=t[o],n=c[0],l=c[1],u=this.interpolate(i,s,n,l),g=!1,a=1;a<u.length;++a)if(d=u[a],!e.isWalkableAt(d[0],d[1])){g=!0;break}g&&(h=t[o-1],r.push(h),i=h[0],s=h[1])}return r.push([m,_]),r},compressPath:function(e){if(e.length<3)return e;var t,i,s,n,l,r,h=[],o=e[0][0],a=e[0][1],c=e[1][0],u=e[1][1],d=c-o,g=u-a;for(l=Math.sqrt(d*d+g*g),d/=l,g/=l,h.push([o,a]),r=2;r<e.length;r++)t=c,i=u,s=d,n=g,c=e[r][0],u=e[r][1],d=c-t,g=u-i,l=Math.sqrt(d*d+g*g),d/=l,g/=l,(d!==s||g!==n)&&h.push([t,i]);return h.push([c,u]),h}},vg.Loader={manager:null,imageLoader:null,crossOrigin:!1,init:function(e){this.crossOrigin=e||!1,this.manager=new THREE.LoadingManager(function(){},function(){},function(){console.warn(\"Error loading images\")}),this.imageLoader=new THREE.ImageLoader(this.manager),this.imageLoader.crossOrigin=e},loadTexture:function(e,t,i,s){var n=new THREE.Texture(null,t);return this.imageLoader.load(e,function(e){n.image=e,n.needsUpdate=!0,i&&i(n)},null,function(e){s&&s(e)}),n.sourceFile=e,n}},vg.MouseCaster=function(e,t,i){this.down=!1,this.rightDown=!1,this.pickedObject=null,this.selectedObject=null,this.allHits=null,this.active=!0,this.shift=!1,this.ctrl=!1,this.wheel=0,this.position=new THREE.Vector3,this.screenPosition=new THREE.Vector2,this.signal=new vg.Signal,this.group=e,this._camera=t,this._raycaster=new THREE.Raycaster,this._preventDefault=!1,i=i||document,i.addEventListener(\"mousemove\",this._onDocumentMouseMove.bind(this),!1),i.addEventListener(\"mousedown\",this._onDocumentMouseDown.bind(this),!1),i.addEventListener(\"mouseup\",this._onDocumentMouseUp.bind(this),!1),i.addEventListener(\"mousewheel\",this._onMouseWheel.bind(this),!1),i.addEventListener(\"DOMMouseScroll\",this._onMouseWheel.bind(this),!1)},vg.MouseCaster.OVER=\"over\",vg.MouseCaster.OUT=\"out\",vg.MouseCaster.DOWN=\"down\",vg.MouseCaster.UP=\"up\",vg.MouseCaster.CLICK=\"click\",vg.MouseCaster.WHEEL=\"wheel\",vg.MouseCaster.prototype={update:function(){if(this.active){this._raycaster.setFromCamera(this.screenPosition,this._camera);var e,t,i=this._raycaster.intersectObject(this.group,!0);i.length>0?(e=i[0],t=e.object.userData.structure,this.pickedObject!=t&&(this.pickedObject&&this.signal.dispatch(vg.MouseCaster.OUT,this.pickedObject),this.pickedObject=t,this.selectedObject=null,this.signal.dispatch(vg.MouseCaster.OVER,this.pickedObject)),this.position.copy(e.point),this.screenPosition.z=e.distance):(this.pickedObject&&this.signal.dispatch(vg.MouseCaster.OUT,this.pickedObject),this.pickedObject=null,this.selectedObject=null),this.allHits=i}},preventDefault:function(){this._preventDefault=!0},_onDocumentMouseDown:function(e){return e=e||window.event,e.preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.pickedObject&&(this.selectedObject=this.pickedObject),this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.down=1===e.which,this.rightDown=3===e.which,void this.signal.dispatch(vg.MouseCaster.DOWN,this.pickedObject))},_onDocumentMouseUp:function(e){return e.preventDefault(),this._preventDefault?(this._preventDefault=!1,!1):(this.shift=e.shiftKey,this.ctrl=e.ctrlKey,this.signal.dispatch(vg.MouseCaster.UP,this.pickedObject),this.selectedObject&&this.pickedObject&&this.selectedObject.uniqueID===this.pickedObject.uniqueID&&this.signal.dispatch(vg.MouseCaster.CLICK,this.pickedObject),this.down=1===e.which?!1:this.down,void(this.rightDown=3===e.which?!1:this.rightDown))},_onDocumentMouseMove:function(e){e.preventDefault(),this.screenPosition.x=e.clientX/window.innerWidth*2-1,this.screenPosition.y=2*-(e.clientY/window.innerHeight)+1},_onMouseWheel:function(e){if(this.active){e.preventDefault(),e.stopPropagation();var t=0;void 0!==e.wheelDelta?t=e.wheelDelta:void 0!==e.detail&&(t=-e.detail),t>0?this.wheel++:this.wheel--,this.signal.dispatch(vg.MouseCaster.WHEEL,this.wheel)}}},vg.MouseCaster.prototype.constructor=vg.MouseCaster,vg.Scene=function(e,t){var i={element:document.body,alpha:!0,antialias:!0,clearColor:\"#fff\",sortObjects:!1,fog:null,light:new THREE.DirectionalLight(16777215),lightPosition:null,cameraType:\"PerspectiveCamera\",cameraPosition:null,orthoZoom:4},s={minDistance:100,maxDistance:1e3,zoomSpeed:2,noZoom:!1};if(i=vg.Tools.merge(i,e),\"boolean\"!=typeof t&&(s=vg.Tools.merge(s,t)),this.renderer=new THREE.WebGLRenderer({alpha:i.alpha,antialias:i.antialias}),this.renderer.setClearColor(i.clearColor,0),this.renderer.sortObjects=i.sortObjects,this.width=window.innerWidth,this.height=window.innerHeight,this.orthoZoom=i.orthoZoom,this.container=new THREE.Scene,this.container.fog=i.fog,this.container.add(new THREE.AmbientLight(14540253)),i.lightPosition||i.light.position.set(-1,1,-1).normalize(),this.container.add(i.light),\"OrthographicCamera\"===i.cameraType){var n=window.innerWidth/this.orthoZoom,l=window.innerHeight/this.orthoZoom;this.camera=new THREE.OrthographicCamera(n/-2,n/2,l/2,l/-2,1,5e3)}else this.camera=new THREE.PerspectiveCamera(50,this.width/this.height,1,5e3);this.contolled=!!t,this.contolled&&(this.controls=new THREE.OrbitControls(this.camera,this.renderer.domElement),this.controls.minDistance=s.minDistance,this.controls.maxDistance=s.maxDistance,this.controls.zoomSpeed=s.zoomSpeed,this.controls.noZoom=s.noZoom),i.cameraPosition&&this.camera.position.copy(i.cameraPosition),window.addEventListener(\"resize\",function(){if(this.width=window.innerWidth,this.height=window.innerHeight,\"OrthographicCamera\"===this.camera.type){var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2}else this.camera.aspect=this.width/this.height;this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height)}.bind(this),!1),this.attachTo(i.element)},vg.Scene.prototype={attachTo:function(e){e.style.width=this.width+\"px\",e.style.height=this.height+\"px\",this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),e.appendChild(this.renderer.domElement)},add:function(e){this.container.add(e)},remove:function(e){this.container.remove(e)},render:function(){this.contolled&&this.controls.update(),this.renderer.render(this.container,this.camera)},updateOrthoZoom:function(){if(this.orthoZoom<=0)return void(this.orthoZoom=0);var e=this.width/this.orthoZoom,t=this.height/this.orthoZoom;this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2,this.camera.updateProjectionMatrix()},focusOn:function(e){this.camera.lookAt(e.position)}},vg.Scene.prototype.constructor=vg.Scene,vg.SelectionManager=function(e){this.mouse=e,this.onSelect=new vg.Signal,this.onDeselect=new vg.Signal,this.selected=null,this.toggleSelection=!1,this.mouse.signal.add(this.onMouse,this)},vg.SelectionManager.prototype={select:function(e,t){e&&(t=t||!0,this.selected!==e&&this.clearSelection(t),e.selected?this.toggleSelection&&(t&&this.onDeselect.dispatch(e),e.deselect()):e.select(),this.selected=e,t&&this.onSelect.dispatch(e))},clearSelection:function(e){e=e||!0,this.selected&&(e&&this.onDeselect.dispatch(this.selected),this.selected.deselect()),this.selected=null},onMouse:function(e,t){switch(e){case vg.MouseCaster.DOWN:t||this.clearSelection();break;case vg.MouseCaster.CLICK:this.select(t)}}},vg.SelectionManager.prototype.constructor=vg.SelectionManager,vg.Tools={clamp:function(e,t,i){return Math.max(t,Math.min(i,e))},sign:function(e){return e&&e/Math.abs(e)},random:function(e,t){return 1===arguments.length?Math.random()*e-.5*e:Math.random()*(t-e)+e},randomInt:function(e,t){return 1===arguments.length?Math.random()*e-.5*e|0:Math.random()*(t-e+1)+e|0},normalize:function(e,t,i){return(e-t)/(i-t)},getShortRotation:function(e){return e%=this.TAU,e>this.PI?e-=this.TAU:e<-this.PI&&(e+=this.TAU),e},generateID:function(){return Math.random().toString(36).slice(2)+Date.now()},isPlainObject:function(e){if(\"object\"!=typeof e||e.nodeType||e===e.window)return!1;try{if(e.constructor&&!Object.prototype.hasOwnProperty.call(e.constructor.prototype,\"isPrototypeOf\"))return!1}catch(t){return!1}return!0},merge:function(e,t){var i=this,s=Array.isArray(t),n=s&&[]||{};return s?(e=e||[],n=n.concat(e),t.forEach(function(t,s){\"undefined\"==typeof n[s]?n[s]=t:i.isPlainObject(t)?n[s]=i.merge(e[s],t):-1===e.indexOf(t)&&n.push(t)}),n):(e&&i.isPlainObject(e)&&Object.keys(e).forEach(function(t){n[t]=e[t];\n}),Object.keys(t).forEach(function(s){t[s]&&i.isPlainObject(t[s])&&e[s]?n[s]=i.merge(e[s],t[s]):n[s]=t[s]}),n)},now:function(){return window.nwf?window.nwf.system.Performance.elapsedTime:window.performance.now()},empty:function(e){for(;e.lastChild;)e.removeChild(e.lastChild)},radixSort:function(e,t,i,s){if(t=t||0,i=i||e.length,s=s||31,!(t>=i-1||0>s)){for(var n=t,l=i,r=1<<s;l>n;)if(e[n]&r){--l;var h=e[n];e[n]=e[l],e[l]=h}else++n;this.radixSort(e,t,l,s-1),this.radixSort(e,l,i,s-1)}},randomizeRGB:function(e,t){var i,s,n=e.split(\",\"),l=\"rgb(\";for(t=this.randomInt(t),i=0;3>i;i++)s=parseInt(n[i])+t,0>s?s=0:s>255&&(s=255),l+=s+\",\";return l=l.substring(0,l.length-1),l+=\")\"},getJSON:function(e){var t=new XMLHttpRequest,i=\"undefined\"==typeof e.cache?!1:e.cache,s=i?e.url:e.url+\"?t=\"+Math.floor(1e4*Math.random())+Date.now();t.onreadystatechange=function(){if(200===this.status){var t=null;try{t=JSON.parse(this.responseText)}catch(i){return}return void e.callback.call(e.scope||null,t)}0!==this.status&&console.warn(\"[Tools.getJSON] Error: \"+this.status+\" (\"+this.statusText+\") :: \"+e.url)},t.open(\"GET\",s,!0),t.setRequestHeader(\"Accept\",\"application/json\"),t.setRequestHeader(\"Content-Type\",\"application/json\"),t.send(\"\")}};\n//# sourceMappingURL=hex-grid.min.js.map\n","module.exports = {\n \"size\": 5,\n \"cellSize\": 10,\n \"extrudeSettings\": {\n \"amount\": 1,\n \"bevelEnabled\": true,\n \"bevelSegments\": 1,\n \"steps\": 1,\n \"bevelSize\": 0.5,\n \"bevelThickness\": 0.5\n },\n \"autogenerated\": true,\n \"cells\": [\n {\n \"q\": -1,\n \"r\": 0,\n \"s\": 1,\n \"h\": 1,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 0,\n \"r\": -1,\n \"s\": 1,\n \"h\": 1,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 0,\n \"r\": 0,\n \"s\": 0,\n \"h\": 1,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 1,\n \"r\": -1,\n \"s\": 0,\n \"h\": 1,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": -1,\n \"r\": 1,\n \"s\": 0,\n \"h\": 0,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 0,\n \"r\": 1,\n \"s\": -1,\n \"h\": 0,\n \"walkable\": true,\n \"userData\": {}\n },\n {\n \"q\": 1,\n \"r\": 0,\n \"s\": -1,\n \"h\": 0,\n \"walkable\": true,\n \"userData\": {}\n }]\n};\n","/**\n * Flat-shaded ocean primitive.\n *\n * Based on a Codrops tutorial:\n * http://tympanus.net/codrops/2016/04/26/the-aviator-animating-basic-3d-scene-threejs/\n */\nmodule.exports.Primitive = AFRAME.registerPrimitive('a-ocean', {\n defaultComponents: {\n ocean: {},\n rotation: {x: -90, y: 0, z: 0}\n },\n mappings: {\n width: 'ocean.width',\n depth: 'ocean.depth',\n density: 'ocean.density',\n amplitude: 'ocean.amplitude',\n amplitudeVariance: 'ocean.amplitudeVariance',\n speed: 'ocean.speed',\n speedVariance: 'ocean.speedVariance',\n color: 'ocean.color',\n opacity: 'ocean.opacity'\n }\n});\n\nmodule.exports.Component = AFRAME.registerComponent('ocean', {\n schema: {\n // Dimensions of the ocean area.\n width: {default: 10, min: 0},\n depth: {default: 10, min: 0},\n\n // Density of waves.\n density: {default: 10},\n\n // Wave amplitude and variance.\n amplitude: {default: 0.1},\n amplitudeVariance: {default: 0.3},\n\n // Wave speed and variance.\n speed: {default: 1},\n speedVariance: {default: 2},\n\n // Material.\n color: {default: '#7AD2F7', type: 'color'},\n opacity: {default: 0.8}\n },\n\n /**\n * Use play() instead of init(), because component mappings – unavailable as dependencies – are\n * not guaranteed to have parsed when this component is initialized.\n */\n play: function () {\n const el = this.el,\n data = this.data;\n let material = el.components.material;\n\n const geometry = new THREE.PlaneGeometry(data.width, data.depth, data.density, data.density);\n geometry.mergeVertices();\n this.waves = [];\n for (let v, i = 0, l = geometry.vertices.length; i < l; i++) {\n v = geometry.vertices[i];\n this.waves.push({\n z: v.z,\n ang: Math.random() * Math.PI * 2,\n amp: data.amplitude + Math.random() * data.amplitudeVariance,\n speed: (data.speed + Math.random() * data.speedVariance) / 1000 // radians / frame\n });\n }\n\n if (!material) {\n material = {};\n material.material = new THREE.MeshPhongMaterial({\n color: data.color,\n transparent: data.opacity < 1,\n opacity: data.opacity,\n shading: THREE.FlatShading,\n });\n }\n\n this.mesh = new THREE.Mesh(geometry, material.material);\n el.setObject3D('mesh', this.mesh);\n },\n\n remove: function () {\n this.el.removeObject3D('mesh');\n },\n\n tick: function (t, dt) {\n if (!dt) return;\n\n const verts = this.mesh.geometry.vertices;\n for (let v, vprops, i = 0; (v = verts[i]); i++){\n vprops = this.waves[i];\n v.z = vprops.z + Math.sin(vprops.ang) * vprops.amp;\n vprops.ang += vprops.speed * dt;\n }\n this.mesh.geometry.verticesNeedUpdate = true;\n }\n});\n","/**\n * Tube following a custom path.\n *\n * Usage:\n *\n * ```html\n * <a-tube path=\"5 0 5, 5 0 -5, -5 0 -5\" radius=\"0.5\"></a-tube>\n * ```\n */\nmodule.exports.Primitive = AFRAME.registerPrimitive('a-tube', {\n defaultComponents: {\n tube: {},\n },\n mappings: {\n path: 'tube.path',\n segments: 'tube.segments',\n radius: 'tube.radius',\n 'radial-segments': 'tube.radialSegments',\n closed: 'tube.closed'\n }\n});\n\nmodule.exports.Component = AFRAME.registerComponent('tube', {\n schema: {\n path: {default: []},\n segments: {default: 64},\n radius: {default: 1},\n radialSegments: {default: 8},\n closed: {default: false}\n },\n\n init: function () {\n const el = this.el,\n data = this.data;\n let material = el.components.material;\n\n if (!data.path.length) {\n console.error('[a-tube] `path` property expected but not found.');\n return;\n }\n\n const curve = new THREE.CatmullRomCurve3(data.path.map(function (point) {\n point = point.split(' ');\n return new THREE.Vector3(Number(point[0]), Number(point[1]), Number(point[2]));\n }));\n const geometry = new THREE.TubeGeometry(\n curve, data.segments, data.radius, data.radialSegments, data.closed\n );\n\n if (!material) {\n material = {};\n material.material = new THREE.MeshPhongMaterial();\n }\n\n this.mesh = new THREE.Mesh(geometry, material.material);\n this.el.setObject3D('mesh', this.mesh);\n },\n\n update: function (prevData) {\n if (!Object.keys(prevData).length) return;\n\n this.remove();\n this.init();\n },\n\n remove: function () {\n if (this.mesh) this.el.removeObject3D('mesh');\n }\n});\n","\nconst createPatternBuilder = require('./createPatternBuilder');\n\nmodule.exports = generateCreateBodyFunction;\nmodule.exports.generateCreateBodyFunctionBody = generateCreateBodyFunctionBody;\n\n// InlineTransform: getVectorCode\nmodule.exports.getVectorCode = getVectorCode;\n// InlineTransform: getBodyCode\nmodule.exports.getBodyCode = getBodyCode;\n// InlineTransformExport: module.exports = function() { return Body; }\n\nfunction generateCreateBodyFunction(dimension, debugSetters) {\n let code = generateCreateBodyFunctionBody(dimension, debugSetters);\n let {Body} = (new Function(code))();\n return Body;\n}\n\nfunction generateCreateBodyFunctionBody(dimension, debugSetters) {\n let code = `\n${getVectorCode(dimension, debugSetters)}\n${getBodyCode(dimension, debugSetters)}\nreturn {Body: Body, Vector: Vector};\n`;\n return code;\n}\n\nfunction getBodyCode(dimension) {\n let pattern = createPatternBuilder(dimension);\n let variableList = pattern('{var}', {join: ', '});\n return `\nfunction Body(${variableList}) {\n this.isPinned = false;\n this.pos = new Vector(${variableList});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${variableList}) {\n ${pattern('this.pos.{var} = {var} || 0;', {indent: 2})}\n};`;\n}\n\nfunction getVectorCode(dimension, debugSetters) {\n let pattern = createPatternBuilder(dimension);\n let setters = '';\n if (debugSetters) {\n setters = `${pattern(\"\\n\\\n var v{var};\\n\\\nObject.defineProperty(this, '{var}', {\\n\\\n set: function(v) { \\n\\\n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\\n\\\n v{var} = v; \\n\\\n },\\n\\\n get: function() { return v{var}; }\\n\\\n});\")}`;\n }\n\n let variableList = pattern('{var}', {join: ', '});\n return `function Vector(${variableList}) {\n ${setters}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${pattern('if (!Number.isFinite(v.{var})) throw new Error(\"Expected value is not a finite number at Vector constructor ({var})\");', {indent: 4})}\n ${pattern('this.{var} = v.{var};', {indent: 4})}\n } else {\n ${pattern('this.{var} = typeof {var} === \"number\" ? {var} : 0;', {indent: 4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${pattern('this.{var} = ', {join: ''})}0;\n };`;\n}","const createPatternBuilder = require('./createPatternBuilder');\nconst getVariableName = require('./getVariableName');\n\nmodule.exports = generateQuadTreeFunction;\nmodule.exports.generateQuadTreeFunctionBody = generateQuadTreeFunctionBody;\n\n// These exports are for InlineTransform tool.\n// InlineTransform: getInsertStackCode\nmodule.exports.getInsertStackCode = getInsertStackCode;\n// InlineTransform: getQuadNodeCode\nmodule.exports.getQuadNodeCode = getQuadNodeCode;\n// InlineTransform: isSamePosition\nmodule.exports.isSamePosition = isSamePosition;\n// InlineTransform: getChildBodyCode\nmodule.exports.getChildBodyCode = getChildBodyCode;\n// InlineTransform: setChildBodyCode\nmodule.exports.setChildBodyCode = setChildBodyCode;\n\nfunction generateQuadTreeFunction(dimension) {\n let code = generateQuadTreeFunctionBody(dimension);\n return (new Function(code))();\n}\n\nfunction generateQuadTreeFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n let quadCount = Math.pow(2, dimension);\n\n let code = `\n${getInsertStackCode()}\n${getQuadNodeCode(dimension)}\n${isSamePosition(dimension)}\n${getChildBodyCode(dimension)}\n${setChildBodyCode(dimension)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${assignQuads(' node.')}\n node.body = null;\n node.mass = ${pattern('node.mass_{var} = ', {join: ''})}0;\n ${pattern('node.min_{var} = node.max_{var} = ', {join: ''})}0;\n } else {\n node = new QuadNode();\n nodesCache[currentInCache] = node;\n }\n\n ++currentInCache;\n return node;\n }\n\n function update(sourceBody) {\n var queue = updateQueue;\n var v;\n ${pattern('var d{var};', {indent: 4})}\n var r; \n ${pattern('var f{var} = 0;', {indent: 4})}\n var queueLength = 1;\n var shiftIdx = 0;\n var pushIdx = 1;\n\n queue[0] = root;\n\n while (queueLength) {\n var node = queue[shiftIdx];\n var body = node.body;\n\n queueLength -= 1;\n shiftIdx += 1;\n var differentBody = (body !== sourceBody);\n if (body && differentBody) {\n // If the current node is a leaf node (and it is not source body),\n // calculate the force exerted by the current node on body, and add this\n // amount to body's net force.\n ${pattern('d{var} = body.pos.{var} - sourceBody.pos.{var};', {indent: 8})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n\n if (r === 0) {\n // Poor man's protection against zero distance.\n ${pattern('d{var} = (random.nextDouble() - 0.5) / 50;', {indent: 10})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n }\n\n // This is standard gravitation force calculation but we divide\n // by r^3 to save two operations when normalizing force vector.\n v = gravity * body.mass * sourceBody.mass / (r * r * r);\n ${pattern('f{var} += v * d{var};', {indent: 8})}\n } else if (differentBody) {\n // Otherwise, calculate the ratio s / r, where s is the width of the region\n // represented by the internal node, and r is the distance between the body\n // and the node's center-of-mass\n ${pattern('d{var} = node.mass_{var} / node.mass - sourceBody.pos.{var};', {indent: 8})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n\n if (r === 0) {\n // Sorry about code duplication. I don't want to create many functions\n // right away. Just want to see performance first.\n ${pattern('d{var} = (random.nextDouble() - 0.5) / 50;', {indent: 10})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n }\n // If s / r < θ, treat this internal node as a single body, and calculate the\n // force it exerts on sourceBody, and add this amount to sourceBody's net force.\n if ((node.max_${getVariableName(0)} - node.min_${getVariableName(0)}) / r < theta) {\n // in the if statement above we consider node's width only\n // because the region was made into square during tree creation.\n // Thus there is no difference between using width or height.\n v = gravity * node.mass * sourceBody.mass / (r * r * r);\n ${pattern('f{var} += v * d{var};', {indent: 10})}\n } else {\n // Otherwise, run the procedure recursively on each of the current node's children.\n\n // I intentionally unfolded this loop, to save several CPU cycles.\n${runRecursiveOnChildren()}\n }\n }\n }\n\n ${pattern('sourceBody.force.{var} += f{var};', {indent: 4})}\n }\n\n function insertBodies(bodies) {\n ${pattern('var {var}min = Number.MAX_VALUE;', {indent: 4})}\n ${pattern('var {var}max = Number.MIN_VALUE;', {indent: 4})}\n var i = bodies.length;\n\n // To reduce quad tree depth we are looking for exact bounding box of all particles.\n while (i--) {\n var pos = bodies[i].pos;\n ${pattern('if (pos.{var} < {var}min) {var}min = pos.{var};', {indent: 6})}\n ${pattern('if (pos.{var} > {var}max) {var}max = pos.{var};', {indent: 6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${pattern('if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;', {indent: 4})}\n\n currentInCache = 0;\n root = newNode();\n ${pattern('root.min_{var} = {var}min;', {indent: 4})}\n ${pattern('root.max_{var} = {var}min + maxSideLength;', {indent: 4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${pattern('var {var} = body.pos.{var};', {indent: 8})}\n node.mass += body.mass;\n ${pattern('node.mass_{var} += body.mass * {var};', {indent: 8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${pattern('var min_{var} = node.min_{var};', {indent: 8})}\n ${pattern('var max_{var} = (min_{var} + node.max_{var}) / 2;', {indent: 8})}\n\n${assignInsertionQuadIndex(8)}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${pattern('child.min_{var} = min_{var};', {indent: 10})}\n ${pattern('child.max_{var} = max_{var};', {indent: 10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${pattern('var d{var} = (node.max_{var} - node.min_{var}) * offset;', {indent: 12})}\n\n ${pattern('oldBody.pos.{var} = node.min_{var} + d{var};', {indent: 12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`;\n return code;\n\n\n function assignInsertionQuadIndex(indentCount) {\n let insertionCode = [];\n let indent = Array(indentCount + 1).join(' ');\n for (let i = 0; i < dimension; ++i) {\n insertionCode.push(indent + `if (${getVariableName(i)} > max_${getVariableName(i)}) {`);\n insertionCode.push(indent + ` quadIdx = quadIdx + ${Math.pow(2, i)};`);\n insertionCode.push(indent + ` min_${getVariableName(i)} = max_${getVariableName(i)};`);\n insertionCode.push(indent + ` max_${getVariableName(i)} = node.max_${getVariableName(i)};`);\n insertionCode.push(indent + `}`);\n }\n return insertionCode.join('\\n');\n // if (x > max_x) { // somewhere in the eastern part.\n // quadIdx = quadIdx + 1;\n // left = right;\n // right = node.right;\n // }\n }\n\n function runRecursiveOnChildren() {\n let indent = Array(11).join(' ');\n let recursiveCode = [];\n for (let i = 0; i < quadCount; ++i) {\n recursiveCode.push(indent + `if (node.quad${i}) {`);\n recursiveCode.push(indent + ` queue[pushIdx] = node.quad${i};`);\n recursiveCode.push(indent + ` queueLength += 1;`);\n recursiveCode.push(indent + ` pushIdx += 1;`);\n recursiveCode.push(indent + `}`);\n }\n return recursiveCode.join('\\n');\n // if (node.quad0) {\n // queue[pushIdx] = node.quad0;\n // queueLength += 1;\n // pushIdx += 1;\n // }\n }\n\n function assignQuads(indent) {\n // this.quad0 = null;\n // this.quad1 = null;\n // this.quad2 = null;\n // this.quad3 = null;\n let quads = [];\n for (let i = 0; i < quadCount; ++i) {\n quads.push(`${indent}quad${i} = null;`);\n }\n return quads.join('\\n');\n }\n}\n\nfunction isSamePosition(dimension) {\n let pattern = createPatternBuilder(dimension);\n return `\n function isSamePosition(point1, point2) {\n ${pattern('var d{var} = Math.abs(point1.{var} - point2.{var});', {indent: 2})}\n \n return ${pattern('d{var} < 1e-8', {join: ' && '})};\n } \n`;\n}\n\nfunction setChildBodyCode(dimension) {\n var quadCount = Math.pow(2, dimension);\n return `\nfunction setChild(node, idx, child) {\n ${setChildBody()}\n}`;\n function setChildBody() {\n let childBody = [];\n for (let i = 0; i < quadCount; ++i) {\n let prefix = (i === 0) ? ' ' : ' else ';\n childBody.push(`${prefix}if (idx === ${i}) node.quad${i} = child;`);\n }\n\n return childBody.join('\\n');\n // if (idx === 0) node.quad0 = child;\n // else if (idx === 1) node.quad1 = child;\n // else if (idx === 2) node.quad2 = child;\n // else if (idx === 3) node.quad3 = child;\n }\n}\n\nfunction getChildBodyCode(dimension) {\n return `function getChild(node, idx) {\n${getChildBody()}\n return null;\n}`;\n\n function getChildBody() {\n let childBody = [];\n let quadCount = Math.pow(2, dimension);\n for (let i = 0; i < quadCount; ++i) {\n childBody.push(` if (idx === ${i}) return node.quad${i};`);\n }\n\n return childBody.join('\\n');\n // if (idx === 0) return node.quad0;\n // if (idx === 1) return node.quad1;\n // if (idx === 2) return node.quad2;\n // if (idx === 3) return node.quad3;\n }\n}\n\nfunction getQuadNodeCode(dimension) {\n let pattern = createPatternBuilder(dimension);\n let quadCount = Math.pow(2, dimension);\n var quadNodeCode = `\nfunction QuadNode() {\n // body stored inside this node. In quad tree only leaf nodes (by construction)\n // contain bodies:\n this.body = null;\n\n // Child nodes are stored in quads. Each quad is presented by number:\n // 0 | 1\n // -----\n // 2 | 3\n${assignQuads(' this.')}\n\n // Total mass of current node\n this.mass = 0;\n\n // Center of mass coordinates\n ${pattern('this.mass_{var} = 0;', {indent: 2})}\n\n // bounding box coordinates\n ${pattern('this.min_{var} = 0;', {indent: 2})}\n ${pattern('this.max_{var} = 0;', {indent: 2})}\n}\n`;\n return quadNodeCode;\n\n function assignQuads(indent) {\n // this.quad0 = null;\n // this.quad1 = null;\n // this.quad2 = null;\n // this.quad3 = null;\n let quads = [];\n for (let i = 0; i < quadCount; ++i) {\n quads.push(`${indent}quad${i} = null;`);\n }\n return quads.join('\\n');\n }\n}\n\nfunction getInsertStackCode() {\n return `\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n`;\n}","\nmodule.exports = generateBoundsFunction;\nmodule.exports.generateFunctionBody = generateBoundsFunctionBody;\n\nconst createPatternBuilder = require('./createPatternBuilder');\n\nfunction generateBoundsFunction(dimension) {\n let code = generateBoundsFunctionBody(dimension);\n return new Function('bodies', 'settings', 'random', code);\n}\n\nfunction generateBoundsFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n\n let code = `\n var boundingBox = {\n ${pattern('min_{var}: 0, max_{var}: 0,', {indent: 4})}\n };\n\n return {\n box: boundingBox,\n\n update: updateBoundingBox,\n\n reset: resetBoundingBox,\n\n getBestNewPosition: function (neighbors) {\n var ${pattern('base_{var} = 0', {join: ', '})};\n\n if (neighbors.length) {\n for (var i = 0; i < neighbors.length; ++i) {\n let neighborPos = neighbors[i].pos;\n ${pattern('base_{var} += neighborPos.{var};', {indent: 10})}\n }\n\n ${pattern('base_{var} /= neighbors.length;', {indent: 8})}\n } else {\n ${pattern('base_{var} = (boundingBox.min_{var} + boundingBox.max_{var}) / 2;', {indent: 8})}\n }\n\n var springLength = settings.springLength;\n return {\n ${pattern('{var}: base_{var} + (random.nextDouble() - 0.5) * springLength,', {indent: 8})}\n };\n }\n };\n\n function updateBoundingBox() {\n var i = bodies.length;\n if (i === 0) return; // No bodies - no borders.\n\n ${pattern('var max_{var} = -Infinity;', {indent: 4})}\n ${pattern('var min_{var} = Infinity;', {indent: 4})}\n\n while(i--) {\n // this is O(n), it could be done faster with quadtree, if we check the root node bounds\n var bodyPos = bodies[i].pos;\n ${pattern('if (bodyPos.{var} < min_{var}) min_{var} = bodyPos.{var};', {indent: 6})}\n ${pattern('if (bodyPos.{var} > max_{var}) max_{var} = bodyPos.{var};', {indent: 6})}\n }\n\n ${pattern('boundingBox.min_{var} = min_{var};', {indent: 4})}\n ${pattern('boundingBox.max_{var} = max_{var};', {indent: 4})}\n }\n\n function resetBoundingBox() {\n ${pattern('boundingBox.min_{var} = boundingBox.max_{var} = 0;', {indent: 4})}\n }\n`;\n return code;\n}\n","const createPatternBuilder = require('./createPatternBuilder');\n\nmodule.exports = generateCreateDragForceFunction;\nmodule.exports.generateCreateDragForceFunctionBody = generateCreateDragForceFunctionBody;\n\nfunction generateCreateDragForceFunction(dimension) {\n let code = generateCreateDragForceFunctionBody(dimension);\n return new Function('options', code);\n}\n\nfunction generateCreateDragForceFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n let code = `\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ${pattern('body.force.{var} -= options.dragCoefficient * body.velocity.{var};', {indent: 6})}\n }\n };\n`;\n return code;\n}\n","const createPatternBuilder = require('./createPatternBuilder');\n\nmodule.exports = generateCreateSpringForceFunction;\nmodule.exports.generateCreateSpringForceFunctionBody = generateCreateSpringForceFunctionBody;\n\nfunction generateCreateSpringForceFunction(dimension) {\n let code = generateCreateSpringForceFunctionBody(dimension);\n return new Function('options', 'random', code);\n}\n\nfunction generateCreateSpringForceFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n let code = `\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ${pattern('var d{var} = body2.pos.{var} - body1.pos.{var};', {indent: 6})}\n var r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n\n if (r === 0) {\n ${pattern('d{var} = (random.nextDouble() - 0.5) / 50;', {indent: 8})}\n r = Math.sqrt(${pattern('d{var} * d{var}', {join: ' + '})});\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ${pattern('body1.force.{var} += coefficient * d{var}', {indent: 6})};\n body1.springCount += 1;\n body1.springLength += r;\n\n ${pattern('body2.force.{var} -= coefficient * d{var}', {indent: 6})};\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n`;\n return code;\n}\n","const createPatternBuilder = require('./createPatternBuilder');\n\nmodule.exports = generateIntegratorFunction;\nmodule.exports.generateIntegratorFunctionBody = generateIntegratorFunctionBody;\n\nfunction generateIntegratorFunction(dimension) {\n let code = generateIntegratorFunctionBody(dimension);\n return new Function('bodies', 'timeStep', 'adaptiveTimeStepWeight', code);\n}\n\nfunction generateIntegratorFunctionBody(dimension) {\n let pattern = createPatternBuilder(dimension);\n let code = `\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${pattern('var d{var} = 0, t{var} = 0;', {indent: 2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${pattern('body.velocity.{var} += coeff * body.force.{var};', {indent: 4})}\n ${pattern('var v{var} = body.velocity.{var};', {indent: 4})}\n var v = Math.sqrt(${pattern('v{var} * v{var}', {join: ' + '})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${pattern('body.velocity.{var} = v{var} / v;', {indent: 6})}\n }\n\n ${pattern('d{var} = timeStep * body.velocity.{var};', {indent: 4})}\n\n ${pattern('body.pos.{var} += d{var};', {indent: 4})}\n\n ${pattern('t{var} += Math.abs(d{var});', {indent: 4})}\n }\n\n return (${pattern('t{var} * t{var}', {join: ' + '})})/length;\n`;\n return code;\n}\n","module.exports = Spring;\n\n/**\n * Represents a physical spring. Spring connects two bodies, has rest length\n * stiffness coefficient and optional weight\n */\nfunction Spring(fromBody, toBody, length, springCoefficient) {\n this.from = fromBody;\n this.to = toBody;\n this.length = length;\n this.coefficient = springCoefficient;\n}\n","module.exports = merge;\n\n/**\n * Augments `target` with properties in `options`. Does not override\n * target's properties if they are defined and matches expected type in \n * options\n *\n * @returns {Object} merged object\n */\nfunction merge(target, options) {\n var key;\n if (!target) { target = {}; }\n if (options) {\n for (key in options) {\n if (options.hasOwnProperty(key)) {\n var targetHasIt = target.hasOwnProperty(key),\n optionsValueType = typeof options[key],\n shouldReplace = !targetHasIt || (typeof target[key] !== optionsValueType);\n\n if (shouldReplace) {\n target[key] = options[key];\n } else if (optionsValueType === 'object') {\n // go deep, don't care about loops here, we are simple API!:\n target[key] = merge(target[key], options[key]);\n }\n }\n }\n }\n\n return target;\n}\n","module.exports = random;\n\n// TODO: Deprecate?\nmodule.exports.random = random,\nmodule.exports.randomIterator = randomIterator\n\n/**\n * Creates seeded PRNG with two methods:\n * next() and nextDouble()\n */\nfunction random(inputSeed) {\n var seed = typeof inputSeed === 'number' ? inputSeed : (+new Date());\n return new Generator(seed)\n}\n\nfunction Generator(seed) {\n this.seed = seed;\n}\n\n/**\n * Generates random integer number in the range from 0 (inclusive) to maxValue (exclusive)\n *\n * @param maxValue Number REQUIRED. Omitting this number will result in NaN values from PRNG.\n */\nGenerator.prototype.next = next;\n\n/**\n * Generates random double number in the range from 0 (inclusive) to 1 (exclusive)\n * This function is the same as Math.random() (except that it could be seeded)\n */\nGenerator.prototype.nextDouble = nextDouble;\n\n/**\n * Returns a random real number from uniform distribution in [0, 1)\n */\nGenerator.prototype.uniform = nextDouble;\n\n/**\n * Returns a random real number from a Gaussian distribution\n * with 0 as a mean, and 1 as standard deviation u ~ N(0,1)\n */\nGenerator.prototype.gaussian = gaussian;\n\nfunction gaussian() {\n // use the polar form of the Box-Muller transform\n // based on https://introcs.cs.princeton.edu/java/23recursion/StdRandom.java\n var r, x, y;\n do {\n x = this.nextDouble() * 2 - 1;\n y = this.nextDouble() * 2 - 1;\n r = x * x + y * y;\n } while (r >= 1 || r === 0);\n\n return x * Math.sqrt(-2 * Math.log(r)/r);\n}\n\n/**\n * See https://twitter.com/anvaka/status/1296182534150135808\n */\nGenerator.prototype.levy = levy;\n\nfunction levy() {\n var beta = 3 / 2;\n var sigma = Math.pow(\n gamma( 1 + beta ) * Math.sin(Math.PI * beta / 2) / \n (gamma((1 + beta) / 2) * beta * Math.pow(2, (beta - 1) / 2)),\n 1/beta\n );\n return this.gaussian() * sigma / Math.pow(Math.abs(this.gaussian()), 1/beta);\n}\n\n// gamma function approximation\nfunction gamma(z) {\n return Math.sqrt(2 * Math.PI / z) * Math.pow((1 / Math.E) * (z + 1 / (12 * z - 1 / (10 * z))), z);\n}\n\nfunction nextDouble() {\n var seed = this.seed;\n // Robert Jenkins' 32 bit integer hash function.\n seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff;\n seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff;\n seed = ((seed + 0x165667b1) + (seed << 5)) & 0xffffffff;\n seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff;\n seed = ((seed + 0xfd7046c5) + (seed << 3)) & 0xffffffff;\n seed = ((seed ^ 0xb55a4f09) ^ (seed >>> 16)) & 0xffffffff;\n this.seed = seed;\n return (seed & 0xfffffff) / 0x10000000;\n}\n\nfunction next(maxValue) {\n return Math.floor(this.nextDouble() * maxValue);\n}\n\n/*\n * Creates iterator over array, which returns items of array in random order\n * Time complexity is guaranteed to be O(n);\n */\nfunction randomIterator(array, customRandom) {\n var localRandom = customRandom || random();\n if (typeof localRandom.next !== 'function') {\n throw new Error('customRandom does not match expected API: next() function is missing');\n }\n\n return {\n forEach: forEach,\n\n /**\n * Shuffles array randomly, in place.\n */\n shuffle: shuffle\n };\n\n function shuffle() {\n var i, j, t;\n for (i = array.length - 1; i > 0; --i) {\n j = localRandom.next(i + 1); // i inclusive\n t = array[j];\n array[j] = array[i];\n array[i] = t;\n }\n\n return array;\n }\n\n function forEach(callback) {\n var i, j, t;\n for (i = array.length - 1; i > 0; --i) {\n j = localRandom.next(i + 1); // i inclusive\n t = array[j];\n array[j] = array[i];\n array[i] = t;\n\n callback(t);\n }\n\n if (array.length) {\n callback(array[0]);\n }\n }\n}","var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");var _interopRequireWildcard=require(\"@babel/runtime/helpers/interopRequireWildcard\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));var _extends2=_interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));var _defineProperty2=_interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));var _slicedToArray2=_interopRequireDefault(require(\"@babel/runtime/helpers/slicedToArray\"));var _objectWithoutProperties2=_interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));var _react=_interopRequireWildcard(require(\"react\"));var _reactNative=require(\"react-native\");var _jsxFileName=\"/Users/michalchudziak/Projects/react-native/react-native-slider/src/js/RNCSliderNativeComponent.web.js\";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(source,true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(source).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var RCTSliderWebComponent=_react.default.forwardRef(function(_ref,forwardedRef){var initialValue=_ref.value,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?0:_ref$maximumValue,_ref$step=_ref.step,step=_ref$step===void 0?1:_ref$step,_ref$minimumTrackTint=_ref.minimumTrackTintColor,minimumTrackTintColor=_ref$minimumTrackTint===void 0?'#009688':_ref$minimumTrackTint,_ref$maximumTrackTint=_ref.maximumTrackTintColor,maximumTrackTintColor=_ref$maximumTrackTint===void 0?'#939393':_ref$maximumTrackTint,_ref$thumbTintColor=_ref.thumbTintColor,thumbTintColor=_ref$thumbTintColor===void 0?'#009688':_ref$thumbTintColor,_ref$thumbStyle=_ref.thumbStyle,thumbStyle=_ref$thumbStyle===void 0?{}:_ref$thumbStyle,_ref$style=_ref.style,style=_ref$style===void 0?[]:_ref$style,_ref$inverted=_ref.inverted,inverted=_ref$inverted===void 0?false:_ref$inverted,_ref$enabled=_ref.enabled,enabled=_ref$enabled===void 0?true:_ref$enabled,_ref$trackHeight=_ref.trackHeight,trackHeight=_ref$trackHeight===void 0?4:_ref$trackHeight,_ref$thumbSize=_ref.thumbSize,thumbSize=_ref$thumbSize===void 0?20:_ref$thumbSize,_ref$onRNCSliderSlidi=_ref.onRNCSliderSlidingStart,onRNCSliderSlidingStart=_ref$onRNCSliderSlidi===void 0?function(){}:_ref$onRNCSliderSlidi,_ref$onRNCSliderSlidi2=_ref.onRNCSliderSlidingComplete,onRNCSliderSlidingComplete=_ref$onRNCSliderSlidi2===void 0?function(){}:_ref$onRNCSliderSlidi2,_ref$onRNCSliderValue=_ref.onRNCSliderValueChange,onRNCSliderValueChange=_ref$onRNCSliderValue===void 0?function(){}:_ref$onRNCSliderValue,others=(0,_objectWithoutProperties2.default)(_ref,[\"value\",\"minimumValue\",\"maximumValue\",\"step\",\"minimumTrackTintColor\",\"maximumTrackTintColor\",\"thumbTintColor\",\"thumbStyle\",\"style\",\"inverted\",\"enabled\",\"trackHeight\",\"thumbSize\",\"onRNCSliderSlidingStart\",\"onRNCSliderSlidingComplete\",\"onRNCSliderValueChange\"]);var onValueChange=(0,_react.useCallback)(function(value){onRNCSliderValueChange&&onRNCSliderValueChange({nativeEvent:{fromUser:true,value:value}});},[onRNCSliderValueChange]);var onSlidingStart=(0,_react.useCallback)(function(value){onRNCSliderSlidingStart&&onRNCSliderSlidingStart({nativeEvent:{fromUser:true,value:value}});},[onRNCSliderSlidingStart]);var onSlidingComplete=(0,_react.useCallback)(function(value){onRNCSliderSlidingComplete&&onRNCSliderSlidingComplete({nativeEvent:{fromUser:true,value:value}});},[onRNCSliderSlidingComplete]);var containerSize=_react.default.useRef({width:0,height:0});var containerRef=forwardedRef||_react.default.createRef();var _React$useState=_react.default.useState(initialValue||minimumValue),_React$useState2=(0,_slicedToArray2.default)(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];_react.default.useLayoutEffect(function(){return _updateValue(initialValue);},[initialValue,_updateValue]);var percentageValue=(value-minimumValue)/(maximumValue-minimumValue);var minPercent=percentageValue;var maxPercent=1-percentageValue;var containerStyle=_reactNative.StyleSheet.compose({flexGrow:1,flexShrink:1,flexBasis:'auto',flexDirection:'row',userSelect:'none',alignItems:'center',cursor:'pointer'},style);var trackStyle={height:trackHeight,borderRadius:trackHeight/2,userSelect:'none'};var minimumTrackStyle=_objectSpread({},trackStyle,{backgroundColor:minimumTrackTintColor,flexGrow:minPercent*100});var maximumTrackStyle=_objectSpread({},trackStyle,{backgroundColor:maximumTrackTintColor,flexGrow:maxPercent*100});var thumbViewStyle=_reactNative.StyleSheet.compose({width:thumbSize,height:thumbSize,backgroundColor:thumbTintColor,zIndex:1,borderRadius:thumbSize/2,overflow:'hidden',userSelect:'none'},thumbStyle);var decimalPrecision=_react.default.useRef(calculatePrecision(minimumValue,maximumValue,step));_react.default.useEffect(function(){decimalPrecision.current=calculatePrecision(minimumValue,maximumValue,step);},[maximumValue,minimumValue,step]);var _updateValue=(0,_react.useCallback)(function(newValue){var hardRounded=decimalPrecision.current<20?Number.parseFloat(newValue.toFixed(decimalPrecision.current)):newValue;var withinBounds=Math.max(minimumValue,Math.min(hardRounded,maximumValue));if(value!==withinBounds){setValue(withinBounds);onValueChange(withinBounds);}},[minimumValue,maximumValue,value,onValueChange]);var onTouchEnd=function onTouchEnd(){onSlidingComplete(value);};var onMove=function onMove(event){var x=event.nativeEvent.locationX;var width=containerSize.current?containerSize.current.width:1;var newValue=inverted?maximumValue-(maximumValue-minimumValue)*x/width:minimumValue+(maximumValue-minimumValue)*x/width;var roundedValue=step?Math.round(newValue/step)*step:newValue;_updateValue(roundedValue);};var accessibilityActions=function accessibilityActions(event){var tenth=(maximumValue-minimumValue)/10;switch(event.nativeEvent.actionName){case'increment':_updateValue(value+(step||tenth));break;case'decrement':_updateValue(value-(step||tenth));break;}};var handleAccessibilityKeys=function handleAccessibilityKeys(key){switch(key){case'ArrowUp':case'ArrowRight':accessibilityActions({nativeEvent:{actionName:'increment'}});break;case'ArrowDown':case'ArrowLeft':accessibilityActions({nativeEvent:{actionName:'decrement'}});break;}};_react.default.useImperativeHandle(forwardedRef,function(){return{updateValue:function updateValue(val){_updateValue(val);}};},[_updateValue]);return _react.default.createElement(_reactNative.View,(0,_extends2.default)({ref:containerRef,onLayout:function onLayout(_ref2){var nativeEvent=_ref2.nativeEvent;return containerSize.current=nativeEvent.layout;},accessibilityActions:[{name:'increment',label:'increment'},{name:'decrement',label:'decrement'}],onAccessibilityAction:accessibilityActions,accessible:true,accessibleValue:value,accessibilityRole:'adjustable',style:containerStyle,onStartShouldSetResponder:function onStartShouldSetResponder(){return enabled;},onMoveShouldSetResponder:function onMoveShouldSetResponder(){return enabled;},onResponderGrant:function onResponderGrant(){return onSlidingStart(value);},onResponderRelease:onTouchEnd,onResponderMove:onMove,onKeyDown:function onKeyDown(_ref3){var key=_ref3.nativeEvent.key;return handleAccessibilityKeys(key);}},others,{__source:{fileName:_jsxFileName,lineNumber:324}}),_react.default.createElement(_reactNative.View,{pointerEvents:\"none\",style:minimumTrackStyle,__source:{fileName:_jsxFileName,lineNumber:345}}),_react.default.createElement(_reactNative.View,{pointerEvents:\"none\",style:thumbViewStyle,__source:{fileName:_jsxFileName,lineNumber:346}}),_react.default.createElement(_reactNative.View,{pointerEvents:\"none\",style:maximumTrackStyle,__source:{fileName:_jsxFileName,lineNumber:347}}));});function calculatePrecision(minimumValue,maximumValue,step){if(!step){return Infinity;}else{var decimals=[minimumValue,maximumValue,step].map(function(value){return((value+'').split('.').pop()||'').length;});return Math.max.apply(Math,(0,_toConsumableArray2.default)(decimals));}}RCTSliderWebComponent.displayName='RTCSliderWebComponent';var _default=RCTSliderWebComponent;exports.default=_default;","var _typeof = require(\"@babel/runtime/helpers/typeof\")[\"default\"];\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\n\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nmodule.exports = _interopRequireWildcard;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\n\nmodule.exports = _isNativeFunction;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nvar isNativeReflectConstruct = require(\"./isNativeReflectConstruct.js\");\n\nfunction _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n module.exports = _construct = Reflect.construct;\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _construct.apply(null, arguments);\n}\n\nmodule.exports = _construct;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nmodule.exports = _isNativeReflectConstruct;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","var _concat = /*#__PURE__*/require('./internal/_concat');\n\nvar _createPartialApplicator = /*#__PURE__*/require('./internal/_createPartialApplicator');\n\n/**\n * Takes a function `f` and a list of arguments, and returns a function `g`.\n * When applied, `g` returns the result of applying `f` to the arguments\n * provided initially followed by the arguments provided to `g`.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Function\n * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x)\n * @param {Function} f\n * @param {Array} args\n * @return {Function}\n * @see R.partialRight\n * @example\n *\n * var multiply2 = (a, b) => a * b;\n * var double = R.partial(multiply2, [2]);\n * double(2); //=> 4\n *\n * var greet = (salutation, title, firstName, lastName) =>\n * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!';\n *\n * var sayHello = R.partial(greet, ['Hello']);\n * var sayHelloToMs = R.partial(sayHello, ['Ms.']);\n * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!'\n * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d)\n */\n\n\nvar partial = /*#__PURE__*/_createPartialApplicator(_concat);\nmodule.exports = partial;","/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nfunction _concat(set1, set2) {\n set1 = set1 || [];\n set2 = set2 || [];\n var idx;\n var len1 = set1.length;\n var len2 = set2.length;\n var result = [];\n\n idx = 0;\n while (idx < len1) {\n result[result.length] = set1[idx];\n idx += 1;\n }\n idx = 0;\n while (idx < len2) {\n result[result.length] = set2[idx];\n idx += 1;\n }\n return result;\n}\nmodule.exports = _concat;","var _arity = /*#__PURE__*/require('./_arity');\n\nvar _curry2 = /*#__PURE__*/require('./_curry2');\n\nfunction _createPartialApplicator(concat) {\n return _curry2(function (fn, args) {\n return _arity(Math.max(0, fn.length - args.length), function () {\n return fn.apply(this, concat(args, arguments));\n });\n });\n}\nmodule.exports = _createPartialApplicator;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar curryN = /*#__PURE__*/require('./curryN');\n\n/**\n * Returns a curried equivalent of the provided function. The curried function\n * has two unusual capabilities. First, its arguments needn't be provided one\n * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (* -> a) -> (* -> a)\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curryN\n * @example\n *\n * var addFourNumbers = (a, b, c, d) => a + b + c + d;\n *\n * var curriedAddFourNumbers = R.curry(addFourNumbers);\n * var f = curriedAddFourNumbers(1, 2);\n * var g = f(3);\n * g(4); //=> 10\n */\n\n\nvar curry = /*#__PURE__*/_curry1(function curry(fn) {\n return curryN(fn.length, fn);\n});\nmodule.exports = curry;","var _arity = /*#__PURE__*/require('./_arity');\n\nvar _isPlaceholder = /*#__PURE__*/require('./_isPlaceholder');\n\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\n\nfunction _curryN(length, received, fn) {\n return function () {\n var combined = [];\n var argsIdx = 0;\n var left = length;\n var combinedIdx = 0;\n while (combinedIdx < received.length || argsIdx < arguments.length) {\n var result;\n if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {\n result = received[combinedIdx];\n } else {\n result = arguments[argsIdx];\n argsIdx += 1;\n }\n combined[combinedIdx] = result;\n if (!_isPlaceholder(result)) {\n left -= 1;\n }\n combinedIdx += 1;\n }\n return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn));\n };\n}\nmodule.exports = _curryN;","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _pipeP = /*#__PURE__*/require('./internal/_pipeP');\n\nvar reduce = /*#__PURE__*/require('./reduce');\n\nvar tail = /*#__PURE__*/require('./tail');\n\n/**\n * Performs left-to-right composition of one or more Promise-returning\n * functions. The leftmost function may have any arity; the remaining functions\n * must be unary.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Function\n * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.composeP\n * @example\n *\n * // followersForUser :: String -> Promise [User]\n * var followersForUser = R.pipeP(db.getUserById, db.getFollowers);\n */\n\n\nfunction pipeP() {\n if (arguments.length === 0) {\n throw new Error('pipeP requires at least one argument');\n }\n return _arity(arguments[0].length, reduce(_pipeP, arguments[0], tail(arguments)));\n}\nmodule.exports = pipeP;","function _pipeP(f, g) {\n return function () {\n var ctx = this;\n return f.apply(ctx, arguments).then(function (x) {\n return g.call(ctx, x);\n });\n };\n}\nmodule.exports = _pipeP;","var _curry1 = /*#__PURE__*/require('./_curry1');\n\nvar _isArray = /*#__PURE__*/require('./_isArray');\n\nvar _isString = /*#__PURE__*/require('./_isString');\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n */\n\n\nvar _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n if (!x) {\n return false;\n }\n if (typeof x !== 'object') {\n return false;\n }\n if (_isString(x)) {\n return false;\n }\n if (x.nodeType === 1) {\n return !!x.length;\n }\n if (x.length === 0) {\n return true;\n }\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n return false;\n});\nmodule.exports = _isArrayLike;","function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}\nmodule.exports = _isString;","var XWrap = /*#__PURE__*/function () {\n function XWrap(fn) {\n this.f = fn;\n }\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n\n return XWrap;\n}();\n\nfunction _xwrap(fn) {\n return new XWrap(fn);\n}\nmodule.exports = _xwrap;","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * var log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\n\n\nvar bind = /*#__PURE__*/_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\nmodule.exports = bind;","var _checkForMethod = /*#__PURE__*/require('./internal/_checkForMethod');\n\nvar _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar slice = /*#__PURE__*/require('./slice');\n\n/**\n * Returns all but the first element of the given list or string (or object\n * with a `tail` method).\n *\n * Dispatches to the `slice` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.head, R.init, R.last\n * @example\n *\n * R.tail([1, 2, 3]); //=> [2, 3]\n * R.tail([1, 2]); //=> [2]\n * R.tail([1]); //=> []\n * R.tail([]); //=> []\n *\n * R.tail('abc'); //=> 'bc'\n * R.tail('ab'); //=> 'b'\n * R.tail('a'); //=> ''\n * R.tail(''); //=> ''\n */\n\n\nvar tail = /*#__PURE__*/_curry1( /*#__PURE__*/_checkForMethod('tail', /*#__PURE__*/slice(1, Infinity)));\nmodule.exports = tail;","var _checkForMethod = /*#__PURE__*/require('./internal/_checkForMethod');\n\nvar _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\n/**\n * Returns the elements of the given list or string (or object with a `slice`\n * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).\n *\n * Dispatches to the `slice` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @sig Number -> Number -> String -> String\n * @param {Number} fromIndex The start index (inclusive).\n * @param {Number} toIndex The end index (exclusive).\n * @param {*} list\n * @return {*}\n * @example\n *\n * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']\n * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']\n * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(0, 3, 'ramda'); //=> 'ram'\n */\n\n\nvar slice = /*#__PURE__*/_curry3( /*#__PURE__*/_checkForMethod('slice', function slice(fromIndex, toIndex, list) {\n return Array.prototype.slice.call(list, fromIndex, toIndex);\n}));\nmodule.exports = slice;","var _has = /*#__PURE__*/require('./_has');\n\nvar toString = Object.prototype.toString;\nvar _isArguments = function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n};\n\nmodule.exports = _isArguments;","var _checkForMethod = /*#__PURE__*/require('./internal/_checkForMethod');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Iterate over an input `list`, calling a provided function `fn` for each\n * element in the list.\n *\n * `fn` receives one argument: *(value)*.\n *\n * Note: `R.forEach` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.forEach` method. For more\n * details on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description\n *\n * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns\n * the original array. In some libraries this function is named `each`.\n *\n * Dispatches to the `forEach` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> *) -> [a] -> [a]\n * @param {Function} fn The function to invoke. Receives one argument, `value`.\n * @param {Array} list The list to iterate over.\n * @return {Array} The original list.\n * @see R.addIndex\n * @example\n *\n * var printXPlusFive = x => console.log(x + 5);\n * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3]\n * // logs 6\n * // logs 7\n * // logs 8\n * @symb R.forEach(f, [a, b, c]) = [a, b, c]\n */\n\n\nvar forEach = /*#__PURE__*/_curry2( /*#__PURE__*/_checkForMethod('forEach', function forEach(fn, list) {\n var len = list.length;\n var idx = 0;\n while (idx < len) {\n fn(list[idx]);\n idx += 1;\n }\n return list;\n}));\nmodule.exports = forEach;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns a new object that does not contain a `prop` property.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category Object\n * @sig String -> {k: v} -> {k: v}\n * @param {String} prop The name of the property to dissociate\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original but without the specified property\n * @see R.assoc\n * @example\n *\n * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3}\n */\n\n\nvar dissoc = /*#__PURE__*/_curry2(function dissoc(prop, obj) {\n var result = {};\n for (var p in obj) {\n result[p] = obj[p];\n }\n delete result[prop];\n return result;\n});\nmodule.exports = dissoc;","var _assign = /*#__PURE__*/require('./internal/_assign');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @example\n *\n * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * var resetToDefault = R.merge(R.__, {x: 0});\n * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2}\n * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 }\n */\n\n\nvar merge = /*#__PURE__*/_curry2(function merge(l, r) {\n return _assign({}, l, r);\n});\nmodule.exports = merge;","var _objectAssign = /*#__PURE__*/require('./_objectAssign');\n\nmodule.exports = typeof Object.assign === 'function' ? Object.assign : _objectAssign;","var _has = /*#__PURE__*/require('./_has');\n\n// Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\n\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n while (idx < length) {\n var source = arguments[idx];\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n idx += 1;\n }\n return output;\n}\nmodule.exports = _objectAssign;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar path = /*#__PURE__*/require('./path');\n\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig s -> {s: a} -> a | Undefined\n * @param {String} p The property name\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n */\n\nvar prop = /*#__PURE__*/_curry2(function prop(p, obj) {\n return path([p], obj);\n});\nmodule.exports = prop;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Retrieve the value at a given path.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig [Idx] -> {a} -> a | Undefined\n * @param {Array} path The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path`.\n * @see R.prop\n * @example\n *\n * R.path(['a', 'b'], {a: {b: 2}}); //=> 2\n * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined\n */\n\n\nvar path = /*#__PURE__*/_curry2(function path(paths, obj) {\n var val = obj;\n var idx = 0;\n while (idx < paths.length) {\n if (val == null) {\n return;\n }\n val = val[paths[idx]];\n idx += 1;\n }\n return val;\n});\nmodule.exports = path;","var _curry3 = /*#__PURE__*/require('./internal/_curry3');\n\nvar curryN = /*#__PURE__*/require('./curryN');\n\n/**\n * Creates a function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *)\n * @param {Function} condition A predicate function\n * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value.\n * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value.\n * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n * @see R.unless, R.when\n * @example\n *\n * var incCount = R.ifElse(\n * R.has('count'),\n * R.over(R.lensProp('count'), R.inc),\n * R.assoc('count', 1)\n * );\n * incCount({}); //=> { count: 1 }\n * incCount({ count: 1 }); //=> { count: 2 }\n */\n\n\nvar ifElse = /*#__PURE__*/_curry3(function ifElse(condition, onTrue, onFalse) {\n return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() {\n return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments);\n });\n});\nmodule.exports = ifElse;","var _contains = /*#__PURE__*/require('./internal/_contains');\n\nvar _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n * R.contains(3, [1, 2, 3]); //=> true\n * R.contains(4, [1, 2, 3]); //=> false\n * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n * R.contains([42], [[42]]); //=> true\n */\n\n\nvar contains = /*#__PURE__*/_curry2(_contains);\nmodule.exports = contains;","var _indexOf = /*#__PURE__*/require('./_indexOf');\n\nfunction _contains(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}\nmodule.exports = _contains;","var equals = /*#__PURE__*/require('../equals');\n\nfunction _indexOf(list, a, idx) {\n var inf, item;\n // Array.prototype.indexOf doesn't exist below IE9\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n while (idx < list.length) {\n item = list[idx];\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n }\n // non-zero numbers can utilise Set\n return list.indexOf(a, idx);\n\n // all these types can utilise Set\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n }\n }\n // anything else not covered above, defer to R.equals\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n}\nmodule.exports = _indexOf;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar _equals = /*#__PURE__*/require('./internal/_equals');\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * var a = {}; a.v = a;\n * var b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\n\n\nvar equals = /*#__PURE__*/_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\nmodule.exports = equals;","var _arrayFromIterator = /*#__PURE__*/require('./_arrayFromIterator');\n\nvar _containsWith = /*#__PURE__*/require('./_containsWith');\n\nvar _functionName = /*#__PURE__*/require('./_functionName');\n\nvar _has = /*#__PURE__*/require('./_has');\n\nvar identical = /*#__PURE__*/require('../identical');\n\nvar keys = /*#__PURE__*/require('../keys');\n\nvar type = /*#__PURE__*/require('../type');\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparision of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n }\n\n // if *a* array contains any element that is not included in *b*\n return !_containsWith(function (b, aItem) {\n return !_containsWith(eq, aItem, b);\n }, b, a);\n}\n\nfunction _equals(a, b, stackA, stackB) {\n if (identical(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (a == null || b == null) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n break;\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && identical(a.valueOf(), b.valueOf()))) {\n return false;\n }\n break;\n case 'Date':\n if (!identical(a.valueOf(), b.valueOf())) {\n return false;\n }\n break;\n case 'Error':\n return a.name === b.name && a.message === b.message;\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n break;\n }\n\n var idx = stackA.length - 1;\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n\n idx = keysA.length - 1;\n while (idx >= 0) {\n var key = keysA[idx];\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n idx -= 1;\n }\n return true;\n}\nmodule.exports = _equals;","function _arrayFromIterator(iter) {\n var list = [];\n var next;\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n return list;\n}\nmodule.exports = _arrayFromIterator;","function _containsWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n idx += 1;\n }\n return false;\n}\nmodule.exports = _containsWith;","function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}\nmodule.exports = _functionName;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns true if its arguments are identical, false otherwise. Values are\n * identical if they reference the same memory. `NaN` is identical to `NaN`;\n * `0` and `-0` are not identical.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> a -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * var o = {};\n * R.identical(o, o); //=> true\n * R.identical(1, 1); //=> true\n * R.identical(1, '1'); //=> false\n * R.identical([], []); //=> false\n * R.identical(0, -0); //=> false\n * R.identical(NaN, NaN); //=> true\n */\n\n\nvar identical = /*#__PURE__*/_curry2(function identical(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n});\nmodule.exports = identical;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\n\n\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nmodule.exports = type;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns `true` if the first argument is greater than or equal to the second;\n * `false` otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> Boolean\n * @param {Number} a\n * @param {Number} b\n * @return {Boolean}\n * @see R.lte\n * @example\n *\n * R.gte(2, 1); //=> true\n * R.gte(2, 2); //=> true\n * R.gte(2, 3); //=> false\n * R.gte('a', 'z'); //=> false\n * R.gte('z', 'a'); //=> true\n */\n\n\nvar gte = /*#__PURE__*/_curry2(function gte(a, b) {\n return a >= b;\n});\nmodule.exports = gte;","var always = /*#__PURE__*/require('./always');\n\n/**\n * A function that always returns `true`. Any passed in parameters are ignored.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Function\n * @sig * -> Boolean\n * @param {*}\n * @return {Boolean}\n * @see R.always, R.F\n * @example\n *\n * R.T(); //=> true\n */\n\n\nvar T = /*#__PURE__*/always(true);\nmodule.exports = T;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * See if an object (`val`) is an instance of the supplied constructor. This\n * function will check up the inheritance chain, if any.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Type\n * @sig (* -> {*}) -> a -> Boolean\n * @param {Object} ctor A constructor\n * @param {*} val The value to test\n * @return {Boolean}\n * @example\n *\n * R.is(Object, {}); //=> true\n * R.is(Number, 1); //=> true\n * R.is(Object, 1); //=> false\n * R.is(String, 's'); //=> true\n * R.is(String, new String('')); //=> true\n * R.is(Object, new String('')); //=> true\n * R.is(Object, 's'); //=> false\n * R.is(Number, {}); //=> false\n */\n\n\nvar is = /*#__PURE__*/_curry2(function is(Ctor, val) {\n return val != null && val.constructor === Ctor || val instanceof Ctor;\n});\nmodule.exports = is;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar _identity = /*#__PURE__*/require('./internal/_identity');\n\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * var obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\n\n\nvar identity = /*#__PURE__*/_curry1(_identity);\nmodule.exports = identity;","function _identity(x) {\n return x;\n}\nmodule.exports = _identity;","var _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\n\n\nvar isNil = /*#__PURE__*/_curry1(function isNil(x) {\n return x == null;\n});\nmodule.exports = isNil;","var _arity = /*#__PURE__*/require('./internal/_arity');\n\nvar _curry1 = /*#__PURE__*/require('./internal/_curry1');\n\nvar map = /*#__PURE__*/require('./map');\n\nvar max = /*#__PURE__*/require('./max');\n\nvar reduce = /*#__PURE__*/require('./reduce');\n\n/**\n * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic.\n * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments\n * to `fn` are applied to each of the predicates in turn until one returns a\n * \"truthy\" value, at which point `fn` returns the result of applying its\n * arguments to the corresponding transformer. If none of the predicates\n * matches, `fn` returns undefined.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Logic\n * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *)\n * @param {Array} pairs A list of [predicate, transformer]\n * @return {Function}\n * @example\n *\n * var fn = R.cond([\n * [R.equals(0), R.always('water freezes at 0°C')],\n * [R.equals(100), R.always('water boils at 100°C')],\n * [R.T, temp => 'nothing special happens at ' + temp + '°C']\n * ]);\n * fn(0); //=> 'water freezes at 0°C'\n * fn(50); //=> 'nothing special happens at 50°C'\n * fn(100); //=> 'water boils at 100°C'\n */\n\n\nvar cond = /*#__PURE__*/_curry1(function cond(pairs) {\n var arity = reduce(max, 0, map(function (pair) {\n return pair[0].length;\n }, pairs));\n return _arity(arity, function () {\n var idx = 0;\n while (idx < pairs.length) {\n if (pairs[idx][0].apply(this, arguments)) {\n return pairs[idx][1].apply(this, arguments);\n }\n idx += 1;\n }\n });\n});\nmodule.exports = cond;","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\nvar _dispatchable = /*#__PURE__*/require('./internal/_dispatchable');\n\nvar _map = /*#__PURE__*/require('./internal/_map');\n\nvar _reduce = /*#__PURE__*/require('./internal/_reduce');\n\nvar _xmap = /*#__PURE__*/require('./internal/_xmap');\n\nvar curryN = /*#__PURE__*/require('./curryN');\n\nvar keys = /*#__PURE__*/require('./keys');\n\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex\n * @example\n *\n * var double = x => x * 2;\n *\n * R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\n\n\nvar map = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {\n switch (Object.prototype.toString.call(functor)) {\n case '[object Function]':\n return curryN(functor.length, function () {\n return fn.call(this, functor.apply(this, arguments));\n });\n case '[object Object]':\n return _reduce(function (acc, key) {\n acc[key] = fn(functor[key]);\n return acc;\n }, {}, keys(functor));\n default:\n return _map(fn, functor);\n }\n}));\nmodule.exports = map;","var _isArray = /*#__PURE__*/require('./_isArray');\n\nvar _isTransformer = /*#__PURE__*/require('./_isTransformer');\n\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer [xf] to return a new transformer (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} xf transducer to initialize if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\n\n\nfunction _dispatchable(methodNames, xf, fn) {\n return function () {\n if (arguments.length === 0) {\n return fn();\n }\n var args = Array.prototype.slice.call(arguments, 0);\n var obj = args.pop();\n if (!_isArray(obj)) {\n var idx = 0;\n while (idx < methodNames.length) {\n if (typeof obj[methodNames[idx]] === 'function') {\n return obj[methodNames[idx]].apply(obj, args);\n }\n idx += 1;\n }\n if (_isTransformer(obj)) {\n var transducer = xf.apply(null, args);\n return transducer(obj);\n }\n }\n return fn.apply(this, arguments);\n };\n}\nmodule.exports = _dispatchable;","function _isTransformer(obj) {\n return typeof obj['@@transducer/step'] === 'function';\n}\nmodule.exports = _isTransformer;","function _map(fn, functor) {\n var idx = 0;\n var len = functor.length;\n var result = Array(len);\n while (idx < len) {\n result[idx] = fn(functor[idx]);\n idx += 1;\n }\n return result;\n}\nmodule.exports = _map;","var _curry2 = /*#__PURE__*/require('./_curry2');\n\nvar _xfBase = /*#__PURE__*/require('./_xfBase');\n\nvar XMap = /*#__PURE__*/function () {\n\n function XMap(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n XMap.prototype['@@transducer/init'] = _xfBase.init;\n XMap.prototype['@@transducer/result'] = _xfBase.result;\n XMap.prototype['@@transducer/step'] = function (result, input) {\n return this.xf['@@transducer/step'](result, this.f(input));\n };\n\n return XMap;\n}();\n\nvar _xmap = /*#__PURE__*/_curry2(function _xmap(f, xf) {\n return new XMap(f, xf);\n});\nmodule.exports = _xmap;","module.exports = {\n init: function () {\n return this.xf['@@transducer/init']();\n },\n result: function (result) {\n return this.xf['@@transducer/result'](result);\n }\n};","var _curry2 = /*#__PURE__*/require('./internal/_curry2');\n\n/**\n * Returns the larger of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.maxBy, R.min\n * @example\n *\n * R.max(789, 123); //=> 789\n * R.max('a', 'b'); //=> 'b'\n */\n\n\nvar max = /*#__PURE__*/_curry2(function max(a, b) {\n return b > a ? b : a;\n});\nmodule.exports = max;","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\n// Expose isAxiosError\naxios.isAxiosError = require('./helpers/isAxiosError');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n","var scope = (typeof global !== \"undefined\" && global) ||\n (typeof self !== \"undefined\" && self) ||\n window;\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function() {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\nexports.setInterval = function() {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\nexports.clearTimeout =\nexports.clearInterval = function(timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function() {};\nTimeout.prototype.close = function() {\n this._clearFn.call(scope, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function(item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function(item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function(item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout)\n item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\nrequire(\"setimmediate\");\n// On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = (typeof self !== \"undefined\" && self.setImmediate) ||\n (typeof global !== \"undefined\" && global.setImmediate) ||\n (this && this.setImmediate);\nexports.clearImmediate = (typeof self !== \"undefined\" && self.clearImmediate) ||\n (typeof global !== \"undefined\" && global.clearImmediate) ||\n (this && this.clearImmediate);\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted\n // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.\n var script = doc.createElement(\"script\");\n script.onreadystatechange = function () {\n runIfPresent(handle);\n script.onreadystatechange = null;\n html.removeChild(script);\n script = null;\n };\n html.appendChild(script);\n };\n }\n\n function installSetTimeoutImplementation() {\n registerImmediate = function(handle) {\n setTimeout(runIfPresent, 0, handle);\n };\n }\n\n // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.\n var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);\n attachTo = attachTo && attachTo.setTimeout ? attachTo : global;\n\n // Don't get fooled by e.g. browserify environments.\n if ({}.toString.call(global.process) === \"[object process]\") {\n // For Node.js before 0.9\n installNextTickImplementation();\n\n } else if (canUsePostMessage()) {\n // For non-IE10 modern browsers\n installPostMessageImplementation();\n\n } else if (global.MessageChannel) {\n // For web workers, where supported\n installMessageChannelImplementation();\n\n } else if (doc && \"onreadystatechange\" in doc.createElement(\"script\")) {\n // For IE 6–8\n installReadyStateChangeImplementation();\n\n } else {\n // For older browsers\n installSetTimeoutImplementation();\n }\n\n attachTo.setImmediate = setImmediate;\n attachTo.clearImmediate = clearImmediate;\n}(typeof self === \"undefined\" ? typeof global === \"undefined\" ? this : global : self));\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAQAAABIkb+zAAAAlklEQVR4Ae3a1REDMRDG4A3VmHbcUFLigf0exn/mkxuQjmELAAAAAD5Eq5atP6+rZeuPhGz9kZCtPxKy9fs6Zuuf60CfPn369OnTp0+fPn369OnTfx36X1vh+nO6/pytL+D1BCexy+iNhFPt6/dIOEiQIEGCBAkSJEiQ8B0k+PwoQYKhP2OXAYOvRo+vD38bvwcAAACABXF8ILs1PQqpAAAAAElFTkSuQmCC\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABVCAQAAAChx3/YAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfkAQMKHDc9iQjuAAACmUlEQVRo3r3ZS2sUQRAH8M5zklwWg0K8mKBB/AIqXhTEi1cTPQe9iH4AUXBNjh79EooKgggSHyCICIIQL7NV1T2bze6EFS/xoms0ie0hs+sa9zE901U79/3R8+iu+pdSnn/VfbCAz/Um2r+XV8AO0jH9pP3vvSN2COdhGX8xInbIzNMKbv1PeEPsiLmEn2i7E+EJsSN4Az+UtjoTXpBwlG7CGnQlPCA2oFtQxZ3uRG7EBnAvjHsTOREbwB2s9bpRuZHKGCzCer9V5ELi8ehuOiIzYkejBUTYTkNkREyAV5DgdzoiE2ICuoYaUxMZEBPQdYpdCGfkzbA+rUsugDNiAnOGwJVwQipj0XlCd8IBscN0wv1GOSEmCE9qyEakREyAZ4myEqkQE+hzupydSIHE4+aUjvIQfZH6hL6QbxV9kfqEnqP1vEQPxA6YA3hReyB6IOUC3vZDdEXKBVPUG36ILkhlihbxqy+iI1KZogf4xW0zd0TWDuJD+AYWLRuyOo2P0DOxB6nM4Fv87pv4B1mdxhfY8E+0IeaIfok/OIgWEs3q97DJQyTI5xn9FBpcBFqlVDgLz6CBlu9S8SS9JlYCraKlTv2qb+QdN4FWYV0AEVkJLQH/M4kn9Sv2t0vkOxH64pt7F9f22LYLVw8D9y4sdJ40T0bgPRmVUqp+iP2MF6pWkrrrPnPdJVRB7tbCVMQNZkSkqlfKDtD+kLs/Eem0xHpGoe631cdHzIhIIiGUrSQp0XHmlEgo7xJK7loZZMiMJGlqjTVNbebCRKy5cPJsLjMn3EJZvdDUQWh+krwCReZJUHOmVaqxzrSEpnNCc0ahiWlz9ksrrLNfoSn27sgf5mCZfrIiStnB8lF8rHdYEaWU+ljQV/dW0X8Ac6zWpmDZsO8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDEtMDNUMTA6Mjg6NTIrMDA6MDD7fVVWAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTAxLTAzVDEwOjI4OjUyKzAwOjAwiiDt6gAAAABJRU5ErkJggg==\"","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\n\nvar reverseNames = {};\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (colorNames.hasOwnProperty(name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar keyword = /(\\D+)/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\trgb[3] = parseFloat(match[4]);\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\n\t\tif (!rgb) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = (parseFloat(match[1]) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = num.toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","var conversions = require('./conversions');\nvar route = require('./route');\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","var conversions = require('./conversions');\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\tcase 'bracket-separator': {\n\t\t\tconst keyValueSep = options.arrayFormat === 'bracket-separator' ?\n\t\t\t\t'[]=' :\n\t\t\t\t'=';\n\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\t// Translate null to an empty string so that it doesn't serialize as 'null'\n\t\t\t\tvalue = value === null ? '' : value;\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), keyValueSep, encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tcase 'bracket-separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = /(\\[\\])$/.test(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!isArray) {\n\t\t\t\t\taccumulator[key] = value ? decode(value, options) : value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst arrayValue = value === null ?\n\t\t\t\t\t[] :\n\t\t\t\t\tvalue.split(options.arrayFormatSeparator).map(item => decode(item, options));\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = arrayValue;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], arrayValue);\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator', 'bracket-separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\tif (value.length === 0 && options.arrayFormat === 'bracket-separator') {\n\t\t\t\treturn encode(key, options) + '[]';\n\t\t\t}\n\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${encode(object.fragmentIdentifier, options)}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"node not found: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n nDim,\n count,\n bias,\n random,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x = 0, y = 0, z = 0, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle(random);\n if (nDim > 1) { y = target.y + target.vy - source.y - source.vy || jiggle(random); }\n if (nDim > 2) { z = target.z + target.vz - source.z - source.vz || jiggle(random); }\n l = Math.sqrt(x * x + y * y + z * z);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l, z *= l;\n\n target.vx -= x * (b = bias[i]);\n if (nDim > 1) { target.vy -= y * b; }\n if (nDim > 2) { target.vz -= z * b; }\n\n source.vx += x * (b = 1 - b);\n if (nDim > 1) { source.vy += y * b; }\n if (nDim > 2) { source.vz += z * b; }\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_nodes, ...args) {\n nodes = _nodes;\n random = args.find(arg => typeof arg === 'function') || Math.random;\n nDim = args.find(arg => [1, 2, 3].includes(arg)) || 2;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n","export default function(x, y, z) {\n var nodes, strength = 1;\n\n if (x == null) x = 0;\n if (y == null) y = 0;\n if (z == null) z = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0,\n sz = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x || 0, sy += node.y || 0, sz += node.z || 0;\n }\n\n for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, sz = (sz / n - z) * strength, i = 0; i < n; ++i) {\n node = nodes[i];\n if (sx) { node.x -= sx }\n if (sy) { node.y -= sy; }\n if (sz) { node.z -= sz; }\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.z = function(_) {\n return arguments.length ? (z = +_, force) : z;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(radius, x, y, z) {\n var nodes,\n nDim,\n strength = constant(0.1),\n strengths,\n radiuses;\n\n if (typeof radius !== \"function\") radius = constant(+radius);\n if (x == null) x = 0;\n if (y == null) y = 0;\n if (z == null) z = 0;\n\n function force(alpha) {\n for (var i = 0, n = nodes.length; i < n; ++i) {\n var node = nodes[i],\n dx = node.x - x || 1e-6,\n dy = (node.y || 0) - y || 1e-6,\n dz = (node.z || 0) - z || 1e-6,\n r = Math.sqrt(dx * dx + dy * dy + dz * dz),\n k = (radiuses[i] - r) * strengths[i] * alpha / r;\n node.vx += dx * k;\n if (nDim>1) { node.vy += dy * k; }\n if (nDim>2) { node.vz += dz * k; }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n radiuses = new Array(n);\n for (i = 0; i < n; ++i) {\n radiuses[i] = +radius(nodes[i], i, nodes);\n strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(initNodes, ...args) {\n nodes = initNodes;\n nDim = args.find(arg => [1, 2, 3].includes(arg)) || 2;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.z = function(_) {\n return arguments.length ? (z = +_, force) : z;\n };\n\n return force;\n}\n","import Platform from '../Platform';\nimport { CodedError } from './CodedError';\n\n/**\n * A class for errors to be thrown when a property is accessed which is\n * unavailable, unsupported, or not currently implemented on the running\n * platform.\n */\nexport class UnavailabilityError extends CodedError {\n constructor(moduleName: string, propertyName: string) {\n super(\n 'ERR_UNAVAILABLE',\n `The method or property ${moduleName}.${propertyName} is not available on ${Platform.OS}, are you sure you've linked all the native dependencies properly?`\n );\n }\n}\n","import { EdgeInsets, Metrics } from './SafeArea.types';\n\nexport const initialWindowMetrics: Metrics | null = null;\n\n/**\n * @deprecated\n */\nexport const initialWindowSafeAreaInsets: EdgeInsets | null = null;\n","import * as React from 'react';\nimport { Animated, View, Platform, ViewProps } from 'react-native';\n\nlet Screens: typeof import('react-native-screens') | undefined;\n\ntry {\n Screens = require('react-native-screens');\n} catch (e) {\n // Ignore\n}\n\n// The web implementation in react-native-screens seems buggy.\n// The view doesn't become visible after coming back in some cases.\n// So we use our custom implementation.\nclass WebScreen extends React.Component<\n ViewProps & {\n active: number;\n children: React.ReactNode;\n }\n> {\n render() {\n const { active, style, ...rest } = this.props;\n\n return (\n <View\n // @ts-expect-error: hidden exists on web, but not in React Native\n hidden={!active}\n style={[style, { display: active ? 'flex' : 'none' }]}\n {...rest}\n />\n );\n }\n}\n\nconst AnimatedWebScreen = Animated.createAnimatedComponent(WebScreen);\n\n// @ts-ignore\nexport const shouldUseActivityState = Screens?.shouldUseActivityState;\n\nexport const MaybeScreenContainer = ({\n enabled,\n ...rest\n}: ViewProps & {\n enabled: boolean;\n children: React.ReactNode;\n}) => {\n if (enabled && Platform.OS !== 'web' && Screens?.screensEnabled()) {\n return (\n // @ts-ignore\n <Screens.ScreenContainer enabled={enabled} {...rest} />\n );\n }\n\n return <View {...rest} />;\n};\n\nexport const MaybeScreen = ({\n enabled,\n active,\n ...rest\n}: ViewProps & {\n enabled: boolean;\n active: 0 | 1 | 2 | Animated.AnimatedInterpolation;\n children: React.ReactNode;\n}) => {\n if (enabled && Platform.OS === 'web') {\n return <AnimatedWebScreen active={active} {...rest} />;\n }\n\n if (enabled && Screens?.screensEnabled()) {\n if (shouldUseActivityState) {\n return (\n // @ts-expect-error: there was an `active` prop and no `activityState` in older version and stackPresentation was required\n <Screens.Screen enabled={enabled} activityState={active} {...rest} />\n );\n } else {\n return (\n // @ts-expect-error: there was an `active` prop and no `activityState` in older version and stackPresentation was required\n <Screens.Screen enabled={enabled} active={active} {...rest} />\n );\n }\n }\n\n return <View {...rest} />;\n};\n","import * as React from 'react';\nimport { View } from 'react-native';\nimport type { PanGestureHandlerProperties } from 'react-native-gesture-handler';\n\nconst Dummy: any = ({ children }: { children: React.ReactNode }) => (\n <>{children}</>\n);\n\nexport const PanGestureHandler = Dummy as React.ComponentType<\n PanGestureHandlerProperties\n>;\n\nexport const GestureHandlerRootView = View;\n\nexport const GestureState = {\n UNDETERMINED: 0,\n FAILED: 1,\n BEGAN: 2,\n CANCELLED: 3,\n ACTIVE: 4,\n END: 5,\n};\n\nexport type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';\n","/**\n * Use a stub for MaskedView on all Platforms that don't support it.\n */\nimport type * as React from 'react';\n\ntype Props = {\n maskElement: React.ReactElement;\n children: React.ReactElement;\n};\n\nexport default function MaskedView({ children }: Props) {\n return children;\n}\n","/**\n * TouchableItem provides an abstraction on top of TouchableNativeFeedback and\n * TouchableOpacity to handle platform differences.\n *\n * On Android, you can pass the props of TouchableNativeFeedback.\n * On other platforms, you can pass the props of TouchableOpacity.\n */\nimport * as React from 'react';\nimport {\n Platform,\n TouchableNativeFeedback,\n TouchableOpacity,\n View,\n ViewProps,\n} from 'react-native';\n\nexport type Props = ViewProps & {\n pressColor?: string;\n disabled?: boolean;\n borderless?: boolean;\n delayPressIn?: number;\n onPress?: () => void;\n children: React.ReactNode;\n};\n\nconst ANDROID_VERSION_LOLLIPOP = 21;\n\nexport default function TouchableItem({\n borderless = false,\n pressColor = 'rgba(0, 0, 0, .32)',\n style,\n children,\n ...rest\n}: Props) {\n /*\n * TouchableNativeFeedback.Ripple causes a crash on old Android versions,\n * therefore only enable it on Android Lollipop and above.\n *\n * All touchables on Android should have the ripple effect according to\n * platform design guidelines.\n * We need to pass the background prop to specify a borderless ripple effect.\n */\n if (\n Platform.OS === 'android' &&\n Platform.Version >= ANDROID_VERSION_LOLLIPOP\n ) {\n return (\n <TouchableNativeFeedback\n {...rest}\n useForeground={TouchableNativeFeedback.canUseNativeForeground()}\n background={TouchableNativeFeedback.Ripple(pressColor, borderless)}\n >\n <View style={style}>{React.Children.only(children)}</View>\n </TouchableNativeFeedback>\n );\n } else {\n return (\n <TouchableOpacity style={style} {...rest}>\n {children}\n </TouchableOpacity>\n );\n }\n}\n","import * as React from 'react';\nimport {\n Animated,\n I18nManager,\n Image,\n View,\n Platform,\n StyleSheet,\n LayoutChangeEvent,\n} from 'react-native';\nimport { useTheme } from '@react-navigation/native';\nimport MaskedView from '../MaskedView';\nimport TouchableItem from '../TouchableItem';\nimport type { StackHeaderLeftButtonProps } from '../../types';\n\ntype Props = StackHeaderLeftButtonProps;\n\nexport default function HeaderBackButton({\n disabled,\n allowFontScaling,\n backImage,\n label,\n labelStyle,\n labelVisible = Platform.OS === 'ios',\n onLabelLayout,\n onPress,\n pressColorAndroid: customPressColorAndroid,\n screenLayout,\n tintColor: customTintColor,\n titleLayout,\n truncatedLabel = 'Back',\n accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',\n style,\n}: Props) {\n const { dark, colors } = useTheme();\n\n const [initialLabelWidth, setInitialLabelWidth] = React.useState<\n undefined | number\n >(undefined);\n\n const tintColor =\n customTintColor !== undefined\n ? customTintColor\n : Platform.select({\n ios: colors.primary,\n default: colors.text,\n });\n\n const pressColorAndroid =\n customPressColorAndroid !== undefined\n ? customPressColorAndroid\n : dark\n ? 'rgba(255, 255, 255, .32)'\n : 'rgba(0, 0, 0, .32)';\n\n const handleLabelLayout = (e: LayoutChangeEvent) => {\n onLabelLayout?.(e);\n\n setInitialLabelWidth(e.nativeEvent.layout.x + e.nativeEvent.layout.width);\n };\n\n const shouldTruncateLabel = () => {\n return (\n !label ||\n (initialLabelWidth &&\n titleLayout &&\n screenLayout &&\n (screenLayout.width - titleLayout.width) / 2 < initialLabelWidth + 26)\n );\n };\n\n const renderBackImage = () => {\n if (backImage) {\n return backImage({ tintColor });\n } else {\n return (\n <Image\n style={[\n styles.icon,\n Boolean(labelVisible) && styles.iconWithLabel,\n Boolean(tintColor) && { tintColor },\n ]}\n source={require('../assets/back-icon.png')}\n fadeDuration={0}\n />\n );\n }\n };\n\n const renderLabel = () => {\n const leftLabelText = shouldTruncateLabel() ? truncatedLabel : label;\n\n if (!labelVisible || leftLabelText === undefined) {\n return null;\n }\n\n const labelElement = (\n <View\n style={\n screenLayout\n ? // We make the button extend till the middle of the screen\n // Otherwise it appears to cut off when translating\n [styles.labelWrapper, { minWidth: screenLayout.width / 2 - 27 }]\n : null\n }\n >\n <Animated.Text\n accessible={false}\n onLayout={\n // This measurement is used to determine if we should truncate the label when it doesn't fit\n // Only measure it when label is not truncated because we want the measurement of full label\n leftLabelText === label ? handleLabelLayout : undefined\n }\n style={[\n styles.label,\n tintColor ? { color: tintColor } : null,\n labelStyle,\n ]}\n numberOfLines={1}\n allowFontScaling={!!allowFontScaling}\n >\n {leftLabelText}\n </Animated.Text>\n </View>\n );\n\n if (backImage || Platform.OS !== 'ios') {\n // When a custom backimage is specified, we can't mask the label\n // Otherwise there might be weird effect due to our mask not being the same as the image\n return labelElement;\n }\n\n return (\n <MaskedView\n maskElement={\n <View style={styles.iconMaskContainer}>\n <Image\n source={require('../assets/back-icon-mask.png')}\n style={styles.iconMask}\n />\n <View style={styles.iconMaskFillerRect} />\n </View>\n }\n >\n {labelElement}\n </MaskedView>\n );\n };\n\n const handlePress = () => onPress && requestAnimationFrame(onPress);\n\n return (\n <TouchableItem\n disabled={disabled}\n accessible\n accessibilityRole=\"button\"\n accessibilityComponentType=\"button\"\n accessibilityLabel={accessibilityLabel}\n accessibilityTraits=\"button\"\n testID=\"header-back\"\n delayPressIn={0}\n onPress={disabled ? undefined : handlePress}\n pressColor={pressColorAndroid}\n style={[styles.container, disabled && styles.disabled, style]}\n hitSlop={Platform.select({\n ios: undefined,\n default: { top: 16, right: 16, bottom: 16, left: 16 },\n })}\n borderless\n >\n <React.Fragment>\n {renderBackImage()}\n {renderLabel()}\n </React.Fragment>\n </TouchableItem>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'center',\n flexDirection: 'row',\n ...Platform.select({\n ios: null,\n default: {\n marginVertical: 3,\n marginHorizontal: 11,\n },\n }),\n },\n disabled: {\n opacity: 0.5,\n },\n label: {\n fontSize: 17,\n // Title and back label are a bit different width due to title being bold\n // Adjusting the letterSpacing makes them coincide better\n letterSpacing: 0.35,\n },\n labelWrapper: {\n // These styles will make sure that the label doesn't fill the available space\n // Otherwise it messes with the measurement of the label\n flexDirection: 'row',\n alignItems: 'flex-start',\n },\n icon: Platform.select({\n ios: {\n height: 21,\n width: 13,\n marginLeft: 8,\n marginRight: 22,\n marginVertical: 12,\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n default: {\n height: 24,\n width: 24,\n margin: 3,\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n }),\n iconWithLabel:\n Platform.OS === 'ios'\n ? {\n marginRight: 6,\n }\n : {},\n iconMaskContainer: {\n flex: 1,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n iconMaskFillerRect: {\n flex: 1,\n backgroundColor: '#000',\n },\n iconMask: {\n height: 21,\n width: 13,\n marginLeft: -14.5,\n marginVertical: 12,\n alignSelf: 'center',\n resizeMode: 'contain',\n transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],\n },\n});\n","import * as React from 'react';\nimport {\n Animated,\n StyleSheet,\n Platform,\n ViewProps,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport { useTheme } from '@react-navigation/native';\n\ntype Props = ViewProps & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children?: React.ReactNode;\n};\n\nexport default function HeaderBackground({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border,\n },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth,\n },\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n }),\n },\n});\n","import * as React from 'react';\n\nconst HeaderShownContext = React.createContext(false);\n\nexport default HeaderShownContext;\n","export default function memoize<Result, Deps extends readonly any[]>(\n callback: (...deps: Deps) => Result\n) {\n let previous: Deps | undefined;\n let result: Result | undefined;\n\n return (...dependencies: Deps): Result => {\n let hasChanged = false;\n\n if (previous) {\n if (previous.length !== dependencies.length) {\n hasChanged = true;\n } else {\n for (let i = 0; i < previous.length; i++) {\n if (previous[i] !== dependencies[i]) {\n hasChanged = true;\n break;\n }\n }\n }\n } else {\n hasChanged = true;\n }\n\n previous = dependencies;\n\n if (hasChanged || result === undefined) {\n result = callback(...dependencies);\n }\n\n return result;\n };\n}\n","import * as React from 'react';\nimport {\n Animated,\n View,\n StyleSheet,\n LayoutChangeEvent,\n Platform,\n ViewStyle,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\nimport type { Route } from '@react-navigation/native';\nimport HeaderBackButton from './HeaderBackButton';\nimport HeaderBackground from './HeaderBackground';\nimport HeaderShownContext from '../../utils/HeaderShownContext';\nimport memoize from '../../utils/memoize';\nimport type {\n Layout,\n StackHeaderStyleInterpolator,\n StackHeaderLeftButtonProps,\n StackHeaderTitleProps,\n StackHeaderOptions,\n Scene,\n} from '../../types';\n\ntype Props = StackHeaderOptions & {\n headerTitle: (props: StackHeaderTitleProps) => React.ReactNode;\n layout: Layout;\n insets: EdgeInsets;\n onGoBack?: () => void;\n title?: string;\n leftLabel?: string;\n scene: Scene<Route<string>>;\n styleInterpolator: StackHeaderStyleInterpolator;\n};\n\nconst warnIfHeaderStylesDefined = (styles: Record<string, any>) => {\n Object.keys(styles).forEach((styleProp) => {\n const value = styles[styleProp];\n\n if (styleProp === 'position' && value === 'absolute') {\n console.warn(\n \"position: 'absolute' is not supported on headerStyle. If you would like to render content under the header, use the 'headerTransparent' navigationOption.\"\n );\n } else if (value !== undefined) {\n console.warn(\n `${styleProp} was given a value of ${value}, this has no effect on headerStyle.`\n );\n }\n });\n};\n\nexport const getDefaultHeaderHeight = (\n layout: Layout,\n statusBarHeight: number\n): number => {\n const isLandscape = layout.width > layout.height;\n\n let headerHeight;\n\n if (Platform.OS === 'ios') {\n if (isLandscape && !Platform.isPad) {\n headerHeight = 32;\n } else {\n headerHeight = 44;\n }\n } else if (Platform.OS === 'android') {\n headerHeight = 56;\n } else {\n headerHeight = 64;\n }\n\n return headerHeight + statusBarHeight;\n};\n\nexport default function HeaderSegment(props: Props) {\n const [leftLabelLayout, setLeftLabelLayout] = React.useState<\n Layout | undefined\n >(undefined);\n\n const [titleLayout, setTitleLayout] = React.useState<Layout | undefined>(\n undefined\n );\n\n const isParentHeaderShown = React.useContext(HeaderShownContext);\n\n const handleTitleLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n setTitleLayout((titleLayout) => {\n if (\n titleLayout &&\n height === titleLayout.height &&\n width === titleLayout.width\n ) {\n return titleLayout;\n }\n\n return { height, width };\n });\n };\n\n const handleLeftLabelLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n if (\n leftLabelLayout &&\n height === leftLabelLayout.height &&\n width === leftLabelLayout.width\n ) {\n return;\n }\n\n setLeftLabelLayout({ height, width });\n };\n\n const getInterpolatedStyle = memoize(\n (\n styleInterpolator: StackHeaderStyleInterpolator,\n layout: Layout,\n current: Animated.AnimatedInterpolation,\n next: Animated.AnimatedInterpolation | undefined,\n titleLayout: Layout | undefined,\n leftLabelLayout: Layout | undefined,\n headerHeight: number\n ) =>\n styleInterpolator({\n current: { progress: current },\n next: next && { progress: next },\n layouts: {\n header: {\n height: headerHeight,\n width: layout.width,\n },\n screen: layout,\n title: titleLayout,\n leftLabel: leftLabelLayout,\n },\n })\n );\n\n const {\n scene,\n layout,\n insets,\n title: currentTitle,\n leftLabel: previousTitle,\n onGoBack,\n headerTitle,\n headerTitleAlign = Platform.select({\n ios: 'center',\n default: 'left',\n }),\n headerLeft: left = onGoBack\n ? (props: StackHeaderLeftButtonProps) => <HeaderBackButton {...props} />\n : undefined,\n headerTransparent,\n headerTintColor,\n headerBackground,\n headerRight: right,\n headerBackImage: backImage,\n headerBackTitle: leftLabel,\n headerBackTitleVisible,\n headerTruncatedBackTitle: truncatedLabel,\n headerPressColorAndroid: pressColorAndroid,\n headerBackAccessibilityLabel: backAccessibilityLabel,\n headerBackAllowFontScaling: backAllowFontScaling,\n headerTitleAllowFontScaling: titleAllowFontScaling,\n headerTitleStyle: customTitleStyle,\n headerBackTitleStyle: customLeftLabelStyle,\n headerLeftContainerStyle: leftContainerStyle,\n headerRightContainerStyle: rightContainerStyle,\n headerTitleContainerStyle: titleContainerStyle,\n headerStyle: customHeaderStyle,\n headerStatusBarHeight = isParentHeaderShown ? 0 : insets.top,\n styleInterpolator,\n } = props;\n\n const defaultHeight = getDefaultHeaderHeight(layout, headerStatusBarHeight);\n\n const {\n height = defaultHeight,\n minHeight,\n maxHeight,\n backgroundColor,\n borderBottomColor,\n borderBottomEndRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius,\n borderBottomStartRadius,\n borderBottomWidth,\n borderColor,\n borderEndColor,\n borderEndWidth,\n borderLeftColor,\n borderLeftWidth,\n borderRadius,\n borderRightColor,\n borderRightWidth,\n borderStartColor,\n borderStartWidth,\n borderStyle,\n borderTopColor,\n borderTopEndRadius,\n borderTopLeftRadius,\n borderTopRightRadius,\n borderTopStartRadius,\n borderTopWidth,\n borderWidth,\n // @ts-expect-error: web support for shadow\n boxShadow,\n elevation,\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n opacity,\n transform,\n ...unsafeStyles\n } = StyleSheet.flatten(customHeaderStyle || {}) as ViewStyle;\n\n if (process.env.NODE_ENV !== 'production') {\n warnIfHeaderStylesDefined(unsafeStyles);\n }\n\n const safeStyles: ViewStyle = {\n backgroundColor,\n borderBottomColor,\n borderBottomEndRadius,\n borderBottomLeftRadius,\n borderBottomRightRadius,\n borderBottomStartRadius,\n borderBottomWidth,\n borderColor,\n borderEndColor,\n borderEndWidth,\n borderLeftColor,\n borderLeftWidth,\n borderRadius,\n borderRightColor,\n borderRightWidth,\n borderStartColor,\n borderStartWidth,\n borderStyle,\n borderTopColor,\n borderTopEndRadius,\n borderTopLeftRadius,\n borderTopRightRadius,\n borderTopStartRadius,\n borderTopWidth,\n borderWidth,\n // @ts-expect-error: boxShadow is only for Web\n boxShadow,\n elevation,\n shadowColor,\n shadowOffset,\n shadowOpacity,\n shadowRadius,\n opacity,\n transform,\n };\n\n // Setting a property to undefined triggers default style\n // So we need to filter them out\n // Users can use `null` instead\n for (const styleProp in safeStyles) {\n // @ts-expect-error: typescript wrongly complains that styleProp cannot be used to index safeStyles\n if (safeStyles[styleProp] === undefined) {\n // @ts-expect-error\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete safeStyles[styleProp];\n }\n }\n\n const {\n titleStyle,\n leftButtonStyle,\n leftLabelStyle,\n rightButtonStyle,\n backgroundStyle,\n } = getInterpolatedStyle(\n styleInterpolator,\n layout,\n scene.progress.current,\n scene.progress.next,\n titleLayout,\n previousTitle ? leftLabelLayout : undefined,\n typeof height === 'number' ? height : defaultHeight\n );\n\n const leftButton = left\n ? left({\n backImage,\n pressColorAndroid,\n accessibilityLabel: backAccessibilityLabel,\n allowFontScaling: backAllowFontScaling,\n onPress: onGoBack,\n labelVisible: headerBackTitleVisible,\n label: leftLabel !== undefined ? leftLabel : previousTitle,\n truncatedLabel,\n labelStyle: [leftLabelStyle, customLeftLabelStyle],\n onLabelLayout: handleLeftLabelLayout,\n screenLayout: layout,\n titleLayout,\n tintColor: headerTintColor,\n canGoBack: Boolean(onGoBack),\n })\n : null;\n\n const rightButton = right ? right({ tintColor: headerTintColor }) : null;\n\n return (\n <React.Fragment>\n <Animated.View\n pointerEvents=\"box-none\"\n style={[StyleSheet.absoluteFill, { zIndex: 0 }, backgroundStyle]}\n >\n {headerBackground ? (\n headerBackground({ style: safeStyles })\n ) : headerTransparent ? null : (\n <HeaderBackground style={safeStyles} />\n )}\n </Animated.View>\n <Animated.View\n pointerEvents=\"box-none\"\n style={[{ height, minHeight, maxHeight, opacity, transform }]}\n >\n <View pointerEvents=\"none\" style={{ height: headerStatusBarHeight }} />\n <View pointerEvents=\"box-none\" style={styles.content}>\n {leftButton ? (\n <Animated.View\n pointerEvents=\"box-none\"\n style={[\n styles.left,\n { left: insets.left },\n leftButtonStyle,\n leftContainerStyle,\n ]}\n >\n {leftButton}\n </Animated.View>\n ) : null}\n <Animated.View\n pointerEvents=\"box-none\"\n style={[\n headerTitleAlign === 'left'\n ? {\n position: 'absolute',\n left: (leftButton ? 72 : 16) + insets.left,\n right: (rightButton ? 72 : 16) + insets.right,\n }\n : {\n marginHorizontal:\n (leftButton ? 32 : 16) +\n (leftButton && headerBackTitleVisible !== false\n ? 40\n : 0) +\n Math.max(insets.left, insets.right),\n },\n titleStyle,\n titleContainerStyle,\n ]}\n >\n {headerTitle({\n children: currentTitle,\n onLayout: handleTitleLayout,\n allowFontScaling: titleAllowFontScaling,\n tintColor: headerTintColor,\n style: customTitleStyle,\n })}\n </Animated.View>\n {rightButton ? (\n <Animated.View\n pointerEvents=\"box-none\"\n style={[\n styles.right,\n { right: insets.right },\n rightButtonStyle,\n rightContainerStyle,\n ]}\n >\n {rightButton}\n </Animated.View>\n ) : null}\n </View>\n </Animated.View>\n </React.Fragment>\n );\n}\n\nconst styles = StyleSheet.create({\n content: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n },\n left: {\n position: 'absolute',\n left: 0,\n top: 0,\n bottom: 0,\n justifyContent: 'center',\n alignItems: 'flex-start',\n },\n right: {\n position: 'absolute',\n right: 0,\n top: 0,\n bottom: 0,\n justifyContent: 'center',\n alignItems: 'flex-end',\n },\n});\n","import * as React from 'react';\nimport { View, ViewProps, StyleSheet } from 'react-native';\n\ntype Props = ViewProps & {\n enabled: boolean;\n layout: { width: number; height: number };\n children: React.ReactNode;\n};\n\n// This component will render a page which overflows the screen\n// if the container fills the body by comparing the size\n// This lets the document.body handle scrolling of the content\n// It's necessary for mobile browsers to be able to hide address bar on scroll\nexport default React.forwardRef<View, Props>(function CardSheet(\n { enabled, layout, style, ...rest },\n ref\n) {\n const [fill, setFill] = React.useState(false);\n\n React.useEffect(() => {\n if (typeof document === 'undefined' || !document.body) {\n // Only run when DOM is available\n return;\n }\n\n const width = document.body.clientWidth;\n const height = document.body.clientHeight;\n\n setFill(width === layout.width && height === layout.height);\n }, [layout.height, layout.width]);\n\n return (\n <View\n {...rest}\n ref={ref}\n style={[enabled && fill ? styles.page : styles.card, style]}\n />\n );\n});\n\nconst styles = StyleSheet.create({\n page: {\n minHeight: '100%',\n },\n card: {\n flex: 1,\n overflow: 'hidden',\n },\n});\n","import * as React from 'react';\nimport type { StackCardInterpolationProps } from '../types';\n\nexport default React.createContext<StackCardInterpolationProps | undefined>(\n undefined\n);\n","import { I18nManager } from 'react-native';\nimport type { GestureDirection } from '../types';\n\nexport default function getInvertedMultiplier(\n gestureDirection: GestureDirection\n): 1 | -1 {\n switch (gestureDirection) {\n case 'vertical':\n return 1;\n case 'vertical-inverted':\n return -1;\n case 'horizontal':\n return I18nManager.isRTL ? -1 : 1;\n case 'horizontal-inverted':\n return I18nManager.isRTL ? 1 : -1;\n }\n}\n","import getInvertedMultiplier from './getInvertedMultiplier';\nimport type { GestureDirection, Layout } from '../types';\n\nexport default function getDistanceForDirection(\n layout: Layout,\n gestureDirection: GestureDirection\n): number {\n const multiplier = getInvertedMultiplier(gestureDirection);\n\n switch (gestureDirection) {\n case 'vertical':\n case 'vertical-inverted':\n return layout.height * multiplier;\n case 'horizontal':\n case 'horizontal-inverted':\n return layout.width * multiplier;\n }\n}\n","import * as React from 'react';\nimport {\n Animated,\n View,\n StyleSheet,\n ViewProps,\n StyleProp,\n ViewStyle,\n Platform,\n InteractionManager,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\nimport Color from 'color';\n\nimport CardSheet from './CardSheet';\nimport {\n PanGestureHandler,\n GestureState,\n PanGestureHandlerGestureEvent,\n} from '../GestureHandler';\nimport CardAnimationContext from '../../utils/CardAnimationContext';\nimport getDistanceForDirection from '../../utils/getDistanceForDirection';\nimport getInvertedMultiplier from '../../utils/getInvertedMultiplier';\nimport memoize from '../../utils/memoize';\nimport type {\n TransitionSpec,\n StackCardStyleInterpolator,\n GestureDirection,\n Layout,\n} from '../../types';\n\ntype Props = ViewProps & {\n index: number;\n closing: boolean;\n next?: Animated.AnimatedInterpolation;\n current: Animated.AnimatedInterpolation;\n gesture: Animated.Value;\n layout: Layout;\n insets: EdgeInsets;\n pageOverflowEnabled: boolean;\n gestureDirection: GestureDirection;\n onOpen: () => void;\n onClose: () => void;\n onTransition?: (props: { closing: boolean; gesture: boolean }) => void;\n onGestureBegin?: () => void;\n onGestureCanceled?: () => void;\n onGestureEnd?: () => void;\n children: React.ReactNode;\n overlay: (props: {\n style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n }) => React.ReactNode;\n overlayEnabled: boolean;\n shadowEnabled: boolean;\n gestureEnabled: boolean;\n gestureResponseDistance?: {\n vertical?: number;\n horizontal?: number;\n };\n gestureVelocityImpact: number;\n transitionSpec: {\n open: TransitionSpec;\n close: TransitionSpec;\n };\n styleInterpolator: StackCardStyleInterpolator;\n containerStyle?: StyleProp<ViewStyle>;\n contentStyle?: StyleProp<ViewStyle>;\n};\n\nconst GESTURE_VELOCITY_IMPACT = 0.3;\n\nconst TRUE = 1;\nconst FALSE = 0;\n\n/**\n * The distance of touch start from the edge of the screen where the gesture will be recognized\n */\nconst GESTURE_RESPONSE_DISTANCE_HORIZONTAL = 50;\nconst GESTURE_RESPONSE_DISTANCE_VERTICAL = 135;\n\nconst useNativeDriver = Platform.OS !== 'web';\n\nconst hasOpacityStyle = (style: any) => {\n if (style) {\n const flattenedStyle = StyleSheet.flatten(style);\n return flattenedStyle.opacity != null;\n }\n\n return false;\n};\n\nexport default class Card extends React.Component<Props> {\n static defaultProps = {\n overlayEnabled: Platform.OS !== 'ios',\n shadowEnabled: true,\n gestureEnabled: true,\n gestureVelocityImpact: GESTURE_VELOCITY_IMPACT,\n overlay: ({\n style,\n }: {\n style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n }) =>\n style ? (\n <Animated.View pointerEvents=\"none\" style={[styles.overlay, style]} />\n ) : null,\n };\n\n componentDidMount() {\n this.animate({ closing: this.props.closing });\n this.isCurrentlyMounted = true;\n }\n\n componentDidUpdate(prevProps: Props) {\n const { layout, gestureDirection, closing } = this.props;\n const { width, height } = layout;\n\n if (width !== prevProps.layout.width) {\n this.layout.width.setValue(width);\n }\n\n if (height !== prevProps.layout.height) {\n this.layout.height.setValue(height);\n }\n\n if (gestureDirection !== prevProps.gestureDirection) {\n this.inverted.setValue(getInvertedMultiplier(gestureDirection));\n }\n\n const toValue = this.getAnimateToValue(this.props);\n\n if (\n this.getAnimateToValue(prevProps) !== toValue ||\n this.lastToValue !== toValue\n ) {\n // We need to trigger the animation when route was closed\n // Thr route might have been closed by a `POP` action or by a gesture\n // When route was closed due to a gesture, the animation would've happened already\n // It's still important to trigger the animation so that `onClose` is called\n // If `onClose` is not called, cleanup step won't be performed for gestures\n this.animate({ closing });\n }\n }\n\n componentWillUnmount() {\n this.isCurrentlyMounted = false;\n this.handleEndInteraction();\n }\n\n private isCurrentlyMounted = false;\n\n private isClosing = new Animated.Value(FALSE);\n\n private inverted = new Animated.Value(\n getInvertedMultiplier(this.props.gestureDirection)\n );\n\n private layout = {\n width: new Animated.Value(this.props.layout.width),\n height: new Animated.Value(this.props.layout.height),\n };\n\n private isSwiping = new Animated.Value(FALSE);\n\n private interactionHandle: number | undefined;\n\n private pendingGestureCallback: number | undefined;\n\n private lastToValue: number | undefined;\n\n private animate = ({\n closing,\n velocity,\n }: {\n closing: boolean;\n velocity?: number;\n }) => {\n const {\n gesture,\n transitionSpec,\n onOpen,\n onClose,\n onTransition,\n } = this.props;\n\n const toValue = this.getAnimateToValue({\n ...this.props,\n closing,\n });\n\n this.lastToValue = toValue;\n\n const spec = closing ? transitionSpec.close : transitionSpec.open;\n\n const animation =\n spec.animation === 'spring' ? Animated.spring : Animated.timing;\n\n this.setPointerEventsEnabled(!closing);\n this.handleStartInteraction();\n\n clearTimeout(this.pendingGestureCallback);\n\n onTransition?.({ closing, gesture: velocity !== undefined });\n animation(gesture, {\n ...spec.config,\n velocity,\n toValue,\n useNativeDriver,\n isInteraction: false,\n }).start(({ finished }) => {\n this.handleEndInteraction();\n\n clearTimeout(this.pendingGestureCallback);\n\n if (finished) {\n if (closing) {\n onClose();\n } else {\n onOpen();\n }\n\n if (this.isCurrentlyMounted) {\n // Make sure to re-open screen if it wasn't removed\n this.forceUpdate();\n }\n }\n });\n };\n\n private getAnimateToValue = ({\n closing,\n layout,\n gestureDirection,\n }: {\n closing?: boolean;\n layout: Layout;\n gestureDirection: GestureDirection;\n }) => {\n if (!closing) {\n return 0;\n }\n\n return getDistanceForDirection(layout, gestureDirection);\n };\n\n private setPointerEventsEnabled = (enabled: boolean) => {\n const pointerEvents = enabled ? 'box-none' : 'none';\n\n this.contentRef.current?.setNativeProps({ pointerEvents });\n };\n\n private handleStartInteraction = () => {\n if (this.interactionHandle === undefined) {\n this.interactionHandle = InteractionManager.createInteractionHandle();\n }\n };\n\n private handleEndInteraction = () => {\n if (this.interactionHandle !== undefined) {\n InteractionManager.clearInteractionHandle(this.interactionHandle);\n this.interactionHandle = undefined;\n }\n };\n\n private handleGestureStateChange = ({\n nativeEvent,\n }: PanGestureHandlerGestureEvent) => {\n const {\n layout,\n onClose,\n onGestureBegin,\n onGestureCanceled,\n onGestureEnd,\n gestureDirection,\n gestureVelocityImpact,\n } = this.props;\n\n switch (nativeEvent.state) {\n case GestureState.BEGAN:\n this.isSwiping.setValue(TRUE);\n this.handleStartInteraction();\n onGestureBegin?.();\n break;\n case GestureState.CANCELLED: {\n this.isSwiping.setValue(FALSE);\n this.handleEndInteraction();\n\n const velocity =\n gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ? nativeEvent.velocityY\n : nativeEvent.velocityX;\n\n this.animate({ closing: this.props.closing, velocity });\n\n onGestureCanceled?.();\n break;\n }\n case GestureState.END: {\n this.isSwiping.setValue(FALSE);\n\n let distance;\n let translation;\n let velocity;\n\n if (\n gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ) {\n distance = layout.height;\n translation = nativeEvent.translationY;\n velocity = nativeEvent.velocityY;\n } else {\n distance = layout.width;\n translation = nativeEvent.translationX;\n velocity = nativeEvent.velocityX;\n }\n\n const closing =\n (translation + velocity * gestureVelocityImpact) *\n getInvertedMultiplier(gestureDirection) >\n distance / 2\n ? velocity !== 0 || translation !== 0\n : this.props.closing;\n\n this.animate({ closing, velocity });\n\n if (closing) {\n // We call onClose with a delay to make sure that the animation has already started\n // This will make sure that the state update caused by this doesn't affect start of animation\n this.pendingGestureCallback = (setTimeout(() => {\n onClose();\n\n // Trigger an update after we dispatch the action to remove the screen\n // This will make sure that we check if the screen didn't get removed so we can cancel the animation\n this.forceUpdate();\n }, 32) as any) as number;\n }\n\n onGestureEnd?.();\n break;\n }\n }\n };\n\n // Memoize this to avoid extra work on re-render\n private getInterpolatedStyle = memoize(\n (\n styleInterpolator: StackCardStyleInterpolator,\n index: number,\n current: Animated.AnimatedInterpolation,\n next: Animated.AnimatedInterpolation | undefined,\n layout: Layout,\n insetTop: number,\n insetRight: number,\n insetBottom: number,\n insetLeft: number\n ) =>\n styleInterpolator({\n index,\n current: { progress: current },\n next: next && { progress: next },\n closing: this.isClosing,\n swiping: this.isSwiping,\n inverted: this.inverted,\n layouts: {\n screen: layout,\n },\n insets: {\n top: insetTop,\n right: insetRight,\n bottom: insetBottom,\n left: insetLeft,\n },\n })\n );\n\n // Keep track of the animation context when deps changes.\n private getCardAnimationContext = memoize(\n (\n index: number,\n current: Animated.AnimatedInterpolation,\n next: Animated.AnimatedInterpolation | undefined,\n layout: Layout,\n insetTop: number,\n insetRight: number,\n insetBottom: number,\n insetLeft: number\n ) => ({\n index,\n current: { progress: current },\n next: next && { progress: next },\n closing: this.isClosing,\n swiping: this.isSwiping,\n inverted: this.inverted,\n layouts: {\n screen: layout,\n },\n insets: {\n top: insetTop,\n right: insetRight,\n bottom: insetBottom,\n left: insetLeft,\n },\n })\n );\n\n private gestureActivationCriteria() {\n const { layout, gestureDirection, gestureResponseDistance } = this.props;\n\n const distance =\n gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ? gestureResponseDistance?.vertical !== undefined\n ? gestureResponseDistance.vertical\n : GESTURE_RESPONSE_DISTANCE_VERTICAL\n : gestureResponseDistance?.horizontal !== undefined\n ? gestureResponseDistance.horizontal\n : GESTURE_RESPONSE_DISTANCE_HORIZONTAL;\n\n if (gestureDirection === 'vertical') {\n return {\n maxDeltaX: 15,\n minOffsetY: 5,\n hitSlop: { bottom: -layout.height + distance },\n };\n } else if (gestureDirection === 'vertical-inverted') {\n return {\n maxDeltaX: 15,\n minOffsetY: -5,\n hitSlop: { top: -layout.height + distance },\n };\n } else {\n const hitSlop = -layout.width + distance;\n const invertedMultiplier = getInvertedMultiplier(gestureDirection);\n\n if (invertedMultiplier === 1) {\n return {\n minOffsetX: 5,\n maxDeltaY: 20,\n hitSlop: { right: hitSlop },\n };\n } else {\n return {\n minOffsetX: -5,\n maxDeltaY: 20,\n hitSlop: { left: hitSlop },\n };\n }\n }\n }\n\n private contentRef = React.createRef<View>();\n\n render() {\n const {\n styleInterpolator,\n index,\n current,\n gesture,\n next,\n layout,\n insets,\n overlay,\n overlayEnabled,\n shadowEnabled,\n gestureEnabled,\n gestureDirection,\n pageOverflowEnabled,\n children,\n containerStyle: customContainerStyle,\n contentStyle,\n ...rest\n } = this.props;\n\n const interpolatedStyle = this.getInterpolatedStyle(\n styleInterpolator,\n index,\n current,\n next,\n layout,\n insets.top,\n insets.right,\n insets.bottom,\n insets.left\n );\n\n const animationContext = this.getCardAnimationContext(\n index,\n current,\n next,\n layout,\n insets.top,\n insets.right,\n insets.bottom,\n insets.left\n );\n\n const {\n containerStyle,\n cardStyle,\n overlayStyle,\n shadowStyle,\n } = interpolatedStyle;\n\n const handleGestureEvent = gestureEnabled\n ? Animated.event(\n [\n {\n nativeEvent:\n gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ? { translationY: gesture }\n : { translationX: gesture },\n },\n ],\n { useNativeDriver }\n )\n : undefined;\n\n const { backgroundColor } = StyleSheet.flatten(contentStyle || {});\n const isTransparent =\n typeof backgroundColor === 'string'\n ? Color(backgroundColor).alpha() === 0\n : false;\n\n return (\n <CardAnimationContext.Provider value={animationContext}>\n <Animated.View\n style={{\n // This is a dummy style that doesn't actually change anything visually.\n // Animated needs the animated value to be used somewhere, otherwise things don't update properly.\n // If we disable animations and hide header, it could end up making the value unused.\n // So we have this dummy style that will always be used regardless of what else changed.\n opacity: current,\n }}\n // Make sure that this view isn't removed. If this view is removed, our style with animated value won't apply\n collapsable={false}\n />\n <View pointerEvents=\"box-none\" {...rest}>\n {overlayEnabled ? (\n <View pointerEvents=\"box-none\" style={StyleSheet.absoluteFill}>\n {overlay({ style: overlayStyle })}\n </View>\n ) : null}\n <Animated.View\n needsOffscreenAlphaCompositing={hasOpacityStyle(containerStyle)}\n style={[styles.container, containerStyle, customContainerStyle]}\n pointerEvents=\"box-none\"\n >\n <PanGestureHandler\n enabled={layout.width !== 0 && gestureEnabled}\n onGestureEvent={handleGestureEvent}\n onHandlerStateChange={this.handleGestureStateChange}\n {...this.gestureActivationCriteria()}\n >\n <Animated.View style={[styles.container, cardStyle]}>\n {shadowEnabled && shadowStyle && !isTransparent ? (\n <Animated.View\n style={[\n styles.shadow,\n gestureDirection === 'horizontal'\n ? [styles.shadowHorizontal, styles.shadowLeft]\n : gestureDirection === 'horizontal-inverted'\n ? [styles.shadowHorizontal, styles.shadowRight]\n : gestureDirection === 'vertical'\n ? [styles.shadowVertical, styles.shadowTop]\n : [styles.shadowVertical, styles.shadowBottom],\n { backgroundColor },\n shadowStyle,\n ]}\n pointerEvents=\"none\"\n />\n ) : null}\n <CardSheet\n ref={this.contentRef}\n enabled={pageOverflowEnabled}\n layout={layout}\n style={contentStyle}\n >\n {children}\n </CardSheet>\n </Animated.View>\n </PanGestureHandler>\n </Animated.View>\n </View>\n </CardAnimationContext.Provider>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n overlay: {\n flex: 1,\n backgroundColor: '#000',\n },\n shadow: {\n position: 'absolute',\n shadowRadius: 5,\n shadowColor: '#000',\n shadowOpacity: 0.3,\n },\n shadowHorizontal: {\n top: 0,\n bottom: 0,\n width: 3,\n shadowOffset: { width: -1, height: 1 },\n },\n shadowLeft: {\n left: 0,\n },\n shadowRight: {\n right: 0,\n },\n shadowVertical: {\n left: 0,\n right: 0,\n height: 3,\n shadowOffset: { width: 1, height: -1 },\n },\n shadowTop: {\n top: 0,\n },\n shadowBottom: {\n bottom: 0,\n },\n});\n","import * as React from 'react';\n\nexport default React.createContext<number | undefined>(undefined);\n","import * as React from 'react';\nimport type { Route } from '@react-navigation/native';\nimport type { Scene } from '../types';\n\nconst PreviousSceneContext = React.createContext<\n Scene<Route<string>> | undefined\n>(undefined);\n\nexport default PreviousSceneContext;\n","import * as React from 'react';\nimport { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';\nimport { Route, useTheme } from '@react-navigation/native';\nimport type { Props as HeaderContainerProps } from '../Header/HeaderContainer';\nimport Card from './Card';\nimport HeaderHeightContext from '../../utils/HeaderHeightContext';\nimport HeaderShownContext from '../../utils/HeaderShownContext';\nimport PreviousSceneContext from '../../utils/PreviousSceneContext';\nimport type {\n Scene,\n Layout,\n StackHeaderMode,\n StackCardMode,\n TransitionPreset,\n} from '../../types';\n\ntype Props = TransitionPreset & {\n index: number;\n active: boolean;\n focused: boolean;\n closing: boolean;\n layout: Layout;\n gesture: Animated.Value;\n scene: Scene<Route<string>>;\n safeAreaInsetTop: number;\n safeAreaInsetRight: number;\n safeAreaInsetBottom: number;\n safeAreaInsetLeft: number;\n cardOverlay?: (props: {\n style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n }) => React.ReactNode;\n cardOverlayEnabled?: boolean;\n cardShadowEnabled?: boolean;\n cardStyle?: StyleProp<ViewStyle>;\n getPreviousScene: (props: {\n route: Route<string>;\n }) => Scene<Route<string>> | undefined;\n getFocusedRoute: () => Route<string>;\n renderHeader: (props: HeaderContainerProps) => React.ReactNode;\n renderScene: (props: { route: Route<string> }) => React.ReactNode;\n onOpenRoute: (props: { route: Route<string> }) => void;\n onCloseRoute: (props: { route: Route<string> }) => void;\n onTransitionStart?: (\n props: { route: Route<string> },\n closing: boolean\n ) => void;\n onTransitionEnd?: (props: { route: Route<string> }, closing: boolean) => void;\n onPageChangeStart?: () => void;\n onPageChangeConfirm?: (force: boolean) => void;\n onPageChangeCancel?: () => void;\n onGestureStart?: (props: { route: Route<string> }) => void;\n onGestureEnd?: (props: { route: Route<string> }) => void;\n onGestureCancel?: (props: { route: Route<string> }) => void;\n gestureEnabled?: boolean;\n gestureResponseDistance?: {\n vertical?: number;\n horizontal?: number;\n };\n gestureVelocityImpact?: number;\n mode: StackCardMode;\n headerMode: StackHeaderMode;\n headerShown: boolean;\n hasAbsoluteHeader: boolean;\n headerHeight: number;\n onHeaderHeightChange: (props: {\n route: Route<string>;\n height: number;\n }) => void;\n isParentHeaderShown: boolean;\n};\n\nconst EPSILON = 0.1;\n\nfunction CardContainer({\n active,\n cardOverlay,\n cardOverlayEnabled,\n cardShadowEnabled,\n cardStyle,\n cardStyleInterpolator,\n closing,\n gesture,\n focused,\n gestureDirection,\n gestureEnabled,\n gestureResponseDistance,\n gestureVelocityImpact,\n getPreviousScene,\n getFocusedRoute,\n mode,\n headerMode,\n headerShown,\n headerStyleInterpolator,\n hasAbsoluteHeader,\n headerHeight,\n onHeaderHeightChange,\n isParentHeaderShown,\n index,\n layout,\n onCloseRoute,\n onOpenRoute,\n onPageChangeCancel,\n onPageChangeConfirm,\n onPageChangeStart,\n onGestureCancel,\n onGestureEnd,\n onGestureStart,\n onTransitionEnd,\n onTransitionStart,\n renderHeader,\n renderScene,\n safeAreaInsetBottom,\n safeAreaInsetLeft,\n safeAreaInsetRight,\n safeAreaInsetTop,\n scene,\n transitionSpec,\n}: Props) {\n const handleOpen = () => {\n const { route } = scene;\n\n onTransitionEnd?.({ route }, false);\n onOpenRoute({ route });\n };\n\n const handleClose = () => {\n const { route } = scene;\n\n onTransitionEnd?.({ route }, true);\n onCloseRoute({ route });\n };\n\n const handleGestureBegin = () => {\n const { route } = scene;\n\n onPageChangeStart?.();\n onGestureStart?.({ route });\n };\n\n const handleGestureCanceled = () => {\n const { route } = scene;\n\n onPageChangeCancel?.();\n onGestureCancel?.({ route });\n };\n\n const handleGestureEnd = () => {\n const { route } = scene;\n\n onGestureEnd?.({ route });\n };\n\n const handleTransition = ({\n closing,\n gesture,\n }: {\n closing: boolean;\n gesture: boolean;\n }) => {\n const { route } = scene;\n\n if (!gesture) {\n onPageChangeConfirm?.(true);\n } else if (active && closing) {\n onPageChangeConfirm?.(false);\n } else {\n onPageChangeCancel?.();\n }\n\n onTransitionStart?.({ route }, closing);\n };\n\n const insets = {\n top: safeAreaInsetTop,\n right: safeAreaInsetRight,\n bottom: safeAreaInsetBottom,\n left: safeAreaInsetLeft,\n };\n\n const { colors } = useTheme();\n\n const [pointerEvents, setPointerEvents] = React.useState<'box-none' | 'none'>(\n 'box-none'\n );\n\n React.useEffect(() => {\n // @ts-expect-error: AnimatedInterpolation optionally has addListener, but the type defs don't think so\n const listener = scene.progress.next?.addListener?.(\n ({ value }: { value: number }) => {\n setPointerEvents(value <= EPSILON ? 'box-none' : 'none');\n }\n );\n\n return () => {\n if (listener) {\n // @ts-expect-error: AnimatedInterpolation optionally has removedListener, but the type defs don't think so\n scene.progress.next?.removeListener?.(listener);\n }\n };\n }, [pointerEvents, scene.progress.next]);\n\n const isCurrentHeaderShown = headerMode !== 'none' && headerShown !== false;\n const previousScene = getPreviousScene({ route: scene.route });\n\n return (\n <Card\n index={index}\n gestureDirection={gestureDirection}\n layout={layout}\n insets={insets}\n gesture={gesture}\n current={scene.progress.current}\n next={scene.progress.next}\n closing={closing}\n onOpen={handleOpen}\n onClose={handleClose}\n overlay={cardOverlay}\n overlayEnabled={cardOverlayEnabled}\n shadowEnabled={cardShadowEnabled}\n onTransition={handleTransition}\n onGestureBegin={handleGestureBegin}\n onGestureCanceled={handleGestureCanceled}\n onGestureEnd={handleGestureEnd}\n gestureEnabled={gestureEnabled}\n gestureResponseDistance={gestureResponseDistance}\n gestureVelocityImpact={gestureVelocityImpact}\n transitionSpec={transitionSpec}\n styleInterpolator={cardStyleInterpolator}\n accessibilityElementsHidden={!focused}\n importantForAccessibility={focused ? 'auto' : 'no-hide-descendants'}\n pointerEvents={active ? 'box-none' : pointerEvents}\n pageOverflowEnabled={headerMode === 'screen' && mode === 'card'}\n containerStyle={hasAbsoluteHeader ? { marginTop: headerHeight } : null}\n contentStyle={[{ backgroundColor: colors.background }, cardStyle]}\n style={[\n {\n // This is necessary to avoid unfocused larger pages increasing scroll area\n // The issue can be seen on the web when a smaller screen is pushed over a larger one\n overflow: active ? undefined : 'hidden',\n },\n StyleSheet.absoluteFill,\n ]}\n >\n <View style={styles.container}>\n <View style={styles.scene}>\n <PreviousSceneContext.Provider value={previousScene}>\n <HeaderShownContext.Provider\n value={isParentHeaderShown || isCurrentHeaderShown}\n >\n <HeaderHeightContext.Provider value={headerHeight}>\n {renderScene({ route: scene.route })}\n </HeaderHeightContext.Provider>\n </HeaderShownContext.Provider>\n </PreviousSceneContext.Provider>\n </View>\n {headerMode === 'screen'\n ? renderHeader({\n mode: 'screen',\n layout,\n insets,\n scenes: [previousScene, scene],\n getPreviousScene,\n getFocusedRoute,\n gestureDirection,\n styleInterpolator: headerStyleInterpolator,\n onContentHeightChange: onHeaderHeightChange,\n })\n : null}\n </View>\n </Card>\n );\n}\n\nexport default React.memo(CardContainer);\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n flexDirection: 'column-reverse',\n },\n scene: {\n flex: 1,\n },\n});\n","import { Dimensions, Platform, StatusBar } from 'react-native';\n\nexport function isIphoneX() {\n const dimen = Dimensions.get('window');\n return (\n Platform.OS === 'ios' &&\n !Platform.isPad &&\n !Platform.isTVOS &&\n ((dimen.height === 780 || dimen.width === 780)\n || (dimen.height === 812 || dimen.width === 812)\n || (dimen.height === 844 || dimen.width === 844)\n || (dimen.height === 896 || dimen.width === 896)\n || (dimen.height === 926 || dimen.width === 926))\n );\n}\n\nexport function ifIphoneX(iphoneXStyle, regularStyle) {\n if (isIphoneX()) {\n return iphoneXStyle;\n }\n return regularStyle;\n}\n\nexport function getStatusBarHeight(safe) {\n return Platform.select({\n ios: ifIphoneX(safe ? 44 : 30, 20),\n android: StatusBar.currentHeight,\n default: 0\n });\n}\n\nexport function getBottomSpace() {\n return isIphoneX() ? 34 : 0;\n}\n","import { Animated } from 'react-native';\n\nconst { add, multiply } = Animated;\n\n/**\n * Use an Animated Node based on a condition. Similar to Reanimated's `cond`.\n *\n * @param condition Animated Node representing the condition, must be 0 or 1, 1 means `true`, 0 means `false`\n * @param main Animated Node to use if the condition is `true`\n * @param fallback Animated Node to use if the condition is `false`\n */\nexport default function conditional(\n condition: Animated.AnimatedInterpolation,\n main: Animated.AnimatedInterpolation,\n fallback: Animated.AnimatedInterpolation\n) {\n // To implement this behavior, we multiply the main node with the condition.\n // So if condition is 0, result will be 0, and if condition is 1, result will be main node.\n // Then we multiple reverse of the condition (0 if condition is 1) with the fallback.\n // So if condition is 0, result will be fallback node, and if condition is 1, result will be 0,\n // This way, one of them will always be 0, and other one will be the value we need.\n // In the end we add them both together, 0 + value we need = value we need\n return add(\n multiply(condition, main),\n multiply(\n condition.interpolate({\n inputRange: [0, 1],\n outputRange: [1, 0],\n }),\n fallback\n )\n );\n}\n","import { Animated } from 'react-native';\nimport { isIphoneX } from 'react-native-iphone-x-helper';\nimport conditional from '../utils/conditional';\nimport type {\n StackCardInterpolationProps,\n StackCardInterpolatedStyle,\n} from '../types';\n\nconst { add, multiply } = Animated;\n\n/**\n * Standard iOS-style slide in from the right.\n */\nexport function forHorizontalIOS({\n current,\n next,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateFocused = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.width, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const translateUnfocused = next\n ? multiply(\n next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, screen.width * -0.3],\n extrapolate: 'clamp',\n }),\n inverted\n )\n : 0;\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.07],\n extrapolate: 'clamp',\n });\n\n const shadowOpacity = current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 0.3],\n extrapolate: 'clamp',\n });\n\n return {\n cardStyle: {\n transform: [\n // Translation for the animation of the current card\n { translateX: translateFocused },\n // Translation for the animation of the card on top of this\n { translateX: translateUnfocused },\n ],\n },\n overlayStyle: { opacity: overlayOpacity },\n shadowStyle: { shadowOpacity },\n };\n}\n\n/**\n * Standard iOS-style slide in from the bottom (used for modals).\n */\nexport function forVerticalIOS({\n current,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n return {\n cardStyle: {\n transform: [\n // Translation for the animation of the current card\n { translateY },\n ],\n },\n };\n}\n\n/**\n * Standard iOS-style modal animation in iOS 13.\n */\nexport function forModalPresentationIOS({\n index,\n current,\n next,\n inverted,\n layouts: { screen },\n insets,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const isLandscape = screen.width > screen.height;\n const topOffset = isLandscape ? 0 : 10;\n const statusBarHeight = insets.top;\n const aspectRatio = screen.height / screen.width;\n\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateY = multiply(\n progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [\n screen.height,\n index === 0 ? 0 : topOffset,\n (index === 0 ? statusBarHeight : 0) - topOffset * aspectRatio,\n ],\n }),\n inverted\n );\n\n const overlayOpacity = progress.interpolate({\n inputRange: [0, 1, 1.0001, 2],\n outputRange: [0, 0.3, 1, 1],\n });\n\n const scale = isLandscape\n ? 1\n : progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [\n 1,\n 1,\n screen.width ? 1 - (topOffset * 2) / screen.width : 1,\n ],\n });\n\n const borderRadius = isLandscape\n ? 0\n : index === 0\n ? progress.interpolate({\n inputRange: [0, 1, 1.0001, 2],\n outputRange: [0, 0, isIphoneX() ? 38 : 0, 10],\n })\n : 10;\n\n return {\n cardStyle: {\n overflow: 'hidden',\n borderTopLeftRadius: borderRadius,\n borderTopRightRadius: borderRadius,\n marginTop: index === 0 ? 0 : statusBarHeight,\n marginBottom: index === 0 ? 0 : topOffset,\n transform: [{ translateY }, { scale }],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Standard Android-style fade in from the bottom for Android Oreo.\n */\nexport function forFadeFromBottomAndroid({\n current,\n inverted,\n layouts: { screen },\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const translateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * 0.08, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const opacity = conditional(\n closing,\n current.progress,\n current.progress.interpolate({\n inputRange: [0, 0.5, 0.9, 1],\n outputRange: [0, 0.25, 0.7, 1],\n })\n );\n\n return {\n cardStyle: {\n opacity,\n transform: [{ translateY }],\n },\n };\n}\n\n/**\n * Standard Android-style reveal from the bottom for Android Pie.\n */\nexport function forRevealFromBottomAndroid({\n current,\n next,\n inverted,\n layouts: { screen },\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const containerTranslateY = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const cardTranslateYFocused = multiply(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [screen.height * (95.9 / 100) * -1, 0],\n extrapolate: 'clamp',\n }),\n inverted\n );\n\n const cardTranslateYUnfocused = next\n ? multiply(\n next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, screen.height * (2 / 100) * -1],\n extrapolate: 'clamp',\n }),\n inverted\n )\n : 0;\n\n const overlayOpacity = current.progress.interpolate({\n inputRange: [0, 0.36, 1],\n outputRange: [0, 0.1, 0.1],\n extrapolate: 'clamp',\n });\n\n return {\n containerStyle: {\n overflow: 'hidden',\n transform: [{ translateY: containerTranslateY }],\n },\n cardStyle: {\n transform: [\n { translateY: cardTranslateYFocused },\n { translateY: cardTranslateYUnfocused },\n ],\n },\n overlayStyle: { opacity: overlayOpacity },\n };\n}\n\n/**\n * Standard Android-style reveal from the bottom for Android Q.\n */\nexport function forScaleFromCenterAndroid({\n current,\n next,\n closing,\n}: StackCardInterpolationProps): StackCardInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const opacity = progress.interpolate({\n inputRange: [0, 0.75, 0.875, 1, 1.0825, 1.2075, 2],\n outputRange: [0, 0, 1, 1, 1, 1, 0],\n });\n\n const scale = conditional(\n closing,\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0.9, 1],\n extrapolate: 'clamp',\n }),\n progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [0.85, 1, 1.1],\n })\n );\n\n return {\n containerStyle: {\n opacity,\n transform: [{ scale }],\n },\n };\n}\n\nexport function forNoAnimation(): StackCardInterpolatedStyle {\n return {};\n}\n","import { Animated, I18nManager } from 'react-native';\nimport type {\n StackHeaderInterpolationProps,\n StackHeaderInterpolatedStyle,\n} from '../types';\n\nconst { add } = Animated;\n\n/**\n * Standard UIKit style animation for the header where the title fades into the back button label.\n */\nexport function forUIKit({\n current,\n next,\n layouts,\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const defaultOffset = 100;\n const leftSpacing = 27;\n\n // The title and back button title should cross-fade to each other\n // When screen is fully open, the title should be in center, and back title should be on left\n // When screen is closing, the previous title will animate to back title's position\n // And back title will animate to title's position\n // We achieve this by calculating the offsets needed to translate title to back title's position and vice-versa\n const leftLabelOffset = layouts.leftLabel\n ? (layouts.screen.width - layouts.leftLabel.width) / 2 - leftSpacing\n : defaultOffset;\n const titleLeftOffset = layouts.title\n ? (layouts.screen.width - layouts.title.width) / 2 - leftSpacing\n : defaultOffset;\n\n // When the current title is animating to right, it is centered in the right half of screen in middle of transition\n // The back title also animates in from this position\n const rightOffset = layouts.screen.width / 4;\n\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n return {\n leftButtonStyle: {\n opacity: progress.interpolate({\n inputRange: [0.3, 1, 1.5],\n outputRange: [0, 1, 0],\n }),\n },\n leftLabelStyle: {\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.isRTL\n ? [-rightOffset, 0, leftLabelOffset]\n : [leftLabelOffset, 0, -rightOffset],\n }),\n },\n ],\n },\n rightButtonStyle: {\n opacity: progress.interpolate({\n inputRange: [0.3, 1, 1.5],\n outputRange: [0, 1, 0],\n }),\n },\n titleStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 0.4, 1, 1.5],\n outputRange: [0, 0.1, 1, 0],\n }),\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0.5, 1, 2],\n outputRange: I18nManager.isRTL\n ? [-titleLeftOffset, 0, rightOffset]\n : [rightOffset, 0, -titleLeftOffset],\n }),\n },\n ],\n },\n backgroundStyle: {\n transform: [\n {\n translateX: progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.isRTL\n ? [-layouts.screen.width, 0, layouts.screen.width]\n : [layouts.screen.width, 0, -layouts.screen.width],\n }),\n },\n ],\n },\n };\n}\n\n/**\n * Simple fade animation for the header elements.\n */\nexport function forFade({\n current,\n next,\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const opacity = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [0, 1, 0],\n });\n\n return {\n leftButtonStyle: { opacity },\n rightButtonStyle: { opacity },\n titleStyle: { opacity },\n backgroundStyle: {\n opacity: progress.interpolate({\n inputRange: [0, 1, 1.9, 2],\n outputRange: [0, 1, 1, 0],\n }),\n },\n };\n}\n\n/**\n * Simple translate animation to translate the header to left.\n */\nexport function forSlideLeft({\n current,\n next,\n layouts: { screen },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateX = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.isRTL\n ? [-screen.width, 0, screen.width]\n : [screen.width, 0, -screen.width],\n });\n\n const transform = [{ translateX }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\n/**\n * Simple translate animation to translate the header to right.\n */\nexport function forSlideRight({\n current,\n next,\n layouts: { screen },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateX = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: I18nManager.isRTL\n ? [screen.width, 0, -screen.width]\n : [-screen.width, 0, screen.width],\n });\n\n const transform = [{ translateX }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\n/**\n * Simple translate animation to translate the header to slide up.\n */\nexport function forSlideUp({\n current,\n next,\n layouts: { header },\n}: StackHeaderInterpolationProps): StackHeaderInterpolatedStyle {\n const progress = add(\n current.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n }),\n next\n ? next.progress.interpolate({\n inputRange: [0, 1],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n })\n : 0\n );\n\n const translateY = progress.interpolate({\n inputRange: [0, 1, 2],\n outputRange: [-header.height, 0, -header.height],\n });\n\n const transform = [{ translateY }];\n\n return {\n leftButtonStyle: { transform },\n rightButtonStyle: { transform },\n titleStyle: { transform },\n backgroundStyle: { transform },\n };\n}\n\nexport function forNoAnimation(): StackHeaderInterpolatedStyle {\n return {};\n}\n","import { Easing } from 'react-native';\nimport type { TransitionSpec } from '../types';\n\n/**\n * Exact values from UINavigationController's animation configuration.\n */\nexport const TransitionIOSSpec: TransitionSpec = {\n animation: 'spring',\n config: {\n stiffness: 1000,\n damping: 500,\n mass: 3,\n overshootClamping: true,\n restDisplacementThreshold: 10,\n restSpeedThreshold: 10,\n },\n};\n\n/**\n * Configuration for activity open animation from Android Nougat.\n * See http://aosp.opersys.com/xref/android-7.1.2_r37/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml\n */\nexport const FadeInFromBottomAndroidSpec: TransitionSpec = {\n animation: 'timing',\n config: {\n duration: 350,\n easing: Easing.out(Easing.poly(5)),\n },\n};\n\n/**\n * Configuration for activity close animation from Android Nougat.\n * See http://aosp.opersys.com/xref/android-7.1.2_r37/xref/frameworks/base/core/res/res/anim/activity_close_exit.xml\n */\nexport const FadeOutToBottomAndroidSpec: TransitionSpec = {\n animation: 'timing',\n config: {\n duration: 150,\n easing: Easing.in(Easing.linear),\n },\n};\n\n/**\n * Approximate configuration for activity open animation from Android Pie.\n * See http://aosp.opersys.com/xref/android-9.0.0_r47/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml\n */\nexport const RevealFromBottomAndroidSpec: TransitionSpec = {\n animation: 'timing',\n config: {\n duration: 425,\n // This is super rough approximation of the path used for the curve by android\n // See http://aosp.opersys.com/xref/android-9.0.0_r47/xref/frameworks/base/core/res/res/interpolator/fast_out_extra_slow_in.xml\n easing: Easing.bezier(0.35, 0.45, 0, 1),\n },\n};\n\n/**\n * Approximate configuration for activity open animation from Android Q.\n * See http://aosp.opersys.com/xref/android-10.0.0_r2/xref/frameworks/base/core/res/res/anim/activity_open_enter.xml\n */\nexport const ScaleFromCenterAndroidSpec: TransitionSpec = {\n animation: 'timing',\n config: {\n duration: 400,\n // This is super rough approximation of the path used for the curve by android\n // See http://aosp.opersys.com/xref/android-10.0.0_r2/xref/frameworks/base/core/res/res/interpolator/fast_out_extra_slow_in.xml\n easing: Easing.bezier(0.35, 0.45, 0, 1),\n },\n};\n","import { Platform } from 'react-native';\nimport {\n forHorizontalIOS,\n forVerticalIOS,\n forScaleFromCenterAndroid,\n forRevealFromBottomAndroid,\n forFadeFromBottomAndroid,\n forModalPresentationIOS,\n} from './CardStyleInterpolators';\nimport { forFade } from './HeaderStyleInterpolators';\nimport {\n TransitionIOSSpec,\n ScaleFromCenterAndroidSpec,\n RevealFromBottomAndroidSpec,\n FadeOutToBottomAndroidSpec,\n FadeInFromBottomAndroidSpec,\n} from './TransitionSpecs';\nimport type { TransitionPreset } from '../types';\n\nconst ANDROID_VERSION_PIE = 28;\nconst ANDROID_VERSION_10 = 29;\n\n/**\n * Standard iOS navigation transition.\n */\nexport const SlideFromRightIOS: TransitionPreset = {\n gestureDirection: 'horizontal',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forHorizontalIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard iOS navigation transition for modals.\n */\nexport const ModalSlideFromBottomIOS: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forVerticalIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard iOS modal presentation style (introduced in iOS 13).\n */\nexport const ModalPresentationIOS: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: TransitionIOSSpec,\n close: TransitionIOSSpec,\n },\n cardStyleInterpolator: forModalPresentationIOS,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android < 9 (Oreo).\n */\nexport const FadeFromBottomAndroid: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: FadeInFromBottomAndroidSpec,\n close: FadeOutToBottomAndroidSpec,\n },\n cardStyleInterpolator: forFadeFromBottomAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android 9 (Pie).\n */\nexport const RevealFromBottomAndroid: TransitionPreset = {\n gestureDirection: 'vertical',\n transitionSpec: {\n open: RevealFromBottomAndroidSpec,\n close: RevealFromBottomAndroidSpec,\n },\n cardStyleInterpolator: forRevealFromBottomAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Standard Android navigation transition when opening or closing an Activity on Android 10 (Q).\n */\nexport const ScaleFromCenterAndroid: TransitionPreset = {\n gestureDirection: 'horizontal',\n transitionSpec: {\n open: ScaleFromCenterAndroidSpec,\n close: ScaleFromCenterAndroidSpec,\n },\n cardStyleInterpolator: forScaleFromCenterAndroid,\n headerStyleInterpolator: forFade,\n};\n\n/**\n * Default navigation transition for the current platform.\n */\nexport const DefaultTransition = Platform.select({\n ios: SlideFromRightIOS,\n android:\n Platform.Version >= ANDROID_VERSION_10\n ? ScaleFromCenterAndroid\n : Platform.Version >= ANDROID_VERSION_PIE\n ? RevealFromBottomAndroid\n : FadeFromBottomAndroid,\n default: ScaleFromCenterAndroid,\n});\n\n/**\n * Default modal transition for the current platform.\n */\nexport const ModalTransition = Platform.select({\n ios: ModalSlideFromBottomIOS,\n default: DefaultTransition,\n});\n","import * as React from 'react';\nimport {\n Animated,\n StyleSheet,\n LayoutChangeEvent,\n Dimensions,\n} from 'react-native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\nimport type {\n ParamListBase,\n Route,\n StackNavigationState,\n} from '@react-navigation/native';\n\nimport {\n MaybeScreenContainer,\n MaybeScreen,\n shouldUseActivityState,\n} from '../Screens';\nimport { getDefaultHeaderHeight } from '../Header/HeaderSegment';\nimport type { Props as HeaderContainerProps } from '../Header/HeaderContainer';\nimport CardContainer from './CardContainer';\nimport {\n DefaultTransition,\n ModalTransition,\n} from '../../TransitionConfigs/TransitionPresets';\nimport { forNoAnimation as forNoAnimationHeader } from '../../TransitionConfigs/HeaderStyleInterpolators';\nimport { forNoAnimation as forNoAnimationCard } from '../../TransitionConfigs/CardStyleInterpolators';\nimport getDistanceForDirection from '../../utils/getDistanceForDirection';\nimport type {\n Layout,\n StackHeaderMode,\n StackCardMode,\n Scene,\n StackDescriptorMap,\n StackNavigationOptions,\n StackDescriptor,\n} from '../../types';\n\ntype GestureValues = {\n [key: string]: Animated.Value;\n};\n\ntype Props = {\n mode: StackCardMode;\n insets: EdgeInsets;\n state: StackNavigationState<ParamListBase>;\n descriptors: StackDescriptorMap;\n routes: Route<string>[];\n openingRouteKeys: string[];\n closingRouteKeys: string[];\n onOpenRoute: (props: { route: Route<string> }) => void;\n onCloseRoute: (props: { route: Route<string> }) => void;\n getPreviousRoute: (props: {\n route: Route<string>;\n }) => Route<string> | undefined;\n getGesturesEnabled: (props: { route: Route<string> }) => boolean;\n renderHeader: (props: HeaderContainerProps) => React.ReactNode;\n renderScene: (props: { route: Route<string> }) => React.ReactNode;\n headerMode: StackHeaderMode;\n isParentHeaderShown: boolean;\n onTransitionStart: (\n props: { route: Route<string> },\n closing: boolean\n ) => void;\n onTransitionEnd: (props: { route: Route<string> }, closing: boolean) => void;\n onPageChangeStart?: () => void;\n onPageChangeConfirm?: (force: boolean) => void;\n onPageChangeCancel?: () => void;\n onGestureStart?: (props: { route: Route<string> }) => void;\n onGestureEnd?: (props: { route: Route<string> }) => void;\n onGestureCancel?: (props: { route: Route<string> }) => void;\n detachInactiveScreens?: boolean;\n};\n\ntype State = {\n routes: Route<string>[];\n descriptors: StackDescriptorMap;\n scenes: Scene<Route<string>>[];\n gestures: GestureValues;\n layout: Layout;\n headerHeights: Record<string, number>;\n};\n\nconst EPSILON = 0.01;\n\nconst STATE_INACTIVE = 0;\nconst STATE_TRANSITIONING_OR_BELOW_TOP = 1;\nconst STATE_ON_TOP = 2;\n\nconst FALLBACK_DESCRIPTOR = Object.freeze({ options: {} });\n\nconst getHeaderHeights = (\n routes: Route<string>[],\n insets: EdgeInsets,\n isParentHeaderShown: boolean,\n descriptors: StackDescriptorMap,\n layout: Layout,\n previous: Record<string, number>\n) => {\n return routes.reduce<Record<string, number>>((acc, curr) => {\n const { options = {} } = descriptors[curr.key] || {};\n const style: any = StyleSheet.flatten(options.headerStyle || {});\n\n const height =\n typeof style.height === 'number' ? style.height : previous[curr.key];\n\n const safeAreaInsets = {\n ...insets,\n ...options.safeAreaInsets,\n };\n\n const {\n headerStatusBarHeight = isParentHeaderShown ? 0 : safeAreaInsets.top,\n } = options;\n\n acc[curr.key] =\n typeof height === 'number'\n ? height\n : getDefaultHeaderHeight(layout, headerStatusBarHeight);\n\n return acc;\n }, {});\n};\n\nconst getDistanceFromOptions = (\n mode: StackCardMode,\n layout: Layout,\n descriptor?: StackDescriptor\n) => {\n const {\n gestureDirection = mode === 'modal'\n ? ModalTransition.gestureDirection\n : DefaultTransition.gestureDirection,\n } = descriptor?.options || {};\n\n return getDistanceForDirection(layout, gestureDirection);\n};\n\nconst getProgressFromGesture = (\n mode: StackCardMode,\n gesture: Animated.Value,\n layout: Layout,\n descriptor?: StackDescriptor\n) => {\n const distance = getDistanceFromOptions(\n mode,\n {\n // Make sure that we have a non-zero distance, otherwise there will be incorrect progress\n // This causes blank screen on web if it was previously inside container with display: none\n width: Math.max(1, layout.width),\n height: Math.max(1, layout.height),\n },\n descriptor\n );\n\n if (distance > 0) {\n return gesture.interpolate({\n inputRange: [0, distance],\n outputRange: [1, 0],\n });\n }\n\n return gesture.interpolate({\n inputRange: [distance, 0],\n outputRange: [0, 1],\n });\n};\n\nexport default class CardStack extends React.Component<Props, State> {\n static getDerivedStateFromProps(props: Props, state: State) {\n if (\n props.routes === state.routes &&\n props.descriptors === state.descriptors\n ) {\n return null;\n }\n\n const gestures = props.routes.reduce<GestureValues>((acc, curr) => {\n const descriptor = props.descriptors[curr.key];\n const { animationEnabled } = descriptor?.options || {};\n\n acc[curr.key] =\n state.gestures[curr.key] ||\n new Animated.Value(\n props.openingRouteKeys.includes(curr.key) &&\n animationEnabled !== false\n ? getDistanceFromOptions(props.mode, state.layout, descriptor)\n : 0\n );\n\n return acc;\n }, {});\n\n return {\n routes: props.routes,\n scenes: props.routes.map((route, index, self) => {\n const previousRoute = self[index - 1];\n const nextRoute = self[index + 1];\n\n const oldScene = state.scenes[index];\n\n const currentGesture = gestures[route.key];\n const previousGesture = previousRoute\n ? gestures[previousRoute.key]\n : undefined;\n const nextGesture = nextRoute ? gestures[nextRoute.key] : undefined;\n\n const descriptor =\n props.descriptors[route.key] ||\n state.descriptors[route.key] ||\n (oldScene ? oldScene.descriptor : FALLBACK_DESCRIPTOR);\n\n const nextDescriptor =\n props.descriptors[nextRoute?.key] ||\n state.descriptors[nextRoute?.key];\n\n const previousDescriptor =\n props.descriptors[previousRoute?.key] ||\n state.descriptors[previousRoute?.key];\n\n const scene = {\n route,\n descriptor,\n progress: {\n current: getProgressFromGesture(\n props.mode,\n currentGesture,\n state.layout,\n descriptor\n ),\n next: nextGesture\n ? getProgressFromGesture(\n props.mode,\n nextGesture,\n state.layout,\n nextDescriptor\n )\n : undefined,\n previous: previousGesture\n ? getProgressFromGesture(\n props.mode,\n previousGesture,\n state.layout,\n previousDescriptor\n )\n : undefined,\n },\n __memo: [\n route,\n state.layout,\n descriptor,\n nextDescriptor,\n previousDescriptor,\n currentGesture,\n nextGesture,\n previousGesture,\n ],\n };\n\n if (\n oldScene &&\n scene.__memo.every((it, i) => {\n // @ts-expect-error: we haven't added __memo to the annotation to prevent usage elsewhere\n return oldScene.__memo[i] === it;\n })\n ) {\n return oldScene;\n }\n\n return scene;\n }),\n gestures,\n descriptors: props.descriptors,\n headerHeights: getHeaderHeights(\n props.routes,\n props.insets,\n props.isParentHeaderShown,\n state.descriptors,\n state.layout,\n state.headerHeights\n ),\n };\n }\n\n constructor(props: Props) {\n super(props);\n\n const { height = 0, width = 0 } = Dimensions.get('window');\n\n this.state = {\n routes: [],\n scenes: [],\n gestures: {},\n layout: { height, width },\n descriptors: this.props.descriptors,\n // Used when card's header is null and mode is float to make transition\n // between screens with headers and those without headers smooth.\n // This is not a great heuristic here. We don't know synchronously\n // on mount what the header height is so we have just used the most\n // common cases here.\n headerHeights: {},\n };\n }\n\n private handleLayout = (e: LayoutChangeEvent) => {\n const { height, width } = e.nativeEvent.layout;\n\n const layout = { width, height };\n\n this.setState((state, props) => {\n if (height === state.layout.height && width === state.layout.width) {\n return null;\n }\n\n return {\n layout,\n headerHeights: getHeaderHeights(\n props.routes,\n props.insets,\n props.isParentHeaderShown,\n state.descriptors,\n layout,\n state.headerHeights\n ),\n };\n });\n };\n\n private handleHeaderLayout = ({\n route,\n height,\n }: {\n route: Route<string>;\n height: number;\n }) => {\n this.setState(({ headerHeights }) => {\n const previousHeight = headerHeights[route.key];\n\n if (previousHeight === height) {\n return null;\n }\n\n return {\n headerHeights: {\n ...headerHeights,\n [route.key]: height,\n },\n };\n });\n };\n\n private getFocusedRoute = () => {\n const { state } = this.props;\n\n return state.routes[state.index];\n };\n\n private getPreviousScene = ({ route }: { route: Route<string> }) => {\n const { getPreviousRoute } = this.props;\n const { scenes } = this.state;\n\n const previousRoute = getPreviousRoute({ route });\n\n if (previousRoute) {\n const previousScene = scenes.find(\n (scene) => scene.route.key === previousRoute.key\n );\n\n return previousScene;\n }\n\n return undefined;\n };\n\n render() {\n const {\n mode,\n insets,\n descriptors,\n state,\n routes,\n closingRouteKeys,\n onOpenRoute,\n onCloseRoute,\n getGesturesEnabled,\n renderHeader,\n renderScene,\n headerMode,\n isParentHeaderShown,\n onTransitionStart,\n onTransitionEnd,\n onPageChangeStart,\n onPageChangeConfirm,\n onPageChangeCancel,\n onGestureStart,\n onGestureEnd,\n onGestureCancel,\n // Enable on new versions of `react-native-screens`\n // On older versions of `react-native-screens`, there's an issue with screens not being responsive to user interaction.\n detachInactiveScreens = shouldUseActivityState,\n } = this.props;\n\n const { scenes, layout, gestures, headerHeights } = this.state;\n\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor ? focusedDescriptor.options : {};\n const focusedHeaderHeight = headerHeights[focusedRoute.key];\n\n let defaultTransitionPreset =\n mode === 'modal' ? ModalTransition : DefaultTransition;\n\n if (headerMode === 'screen') {\n defaultTransitionPreset = {\n ...defaultTransitionPreset,\n headerStyleInterpolator: forNoAnimationHeader,\n };\n }\n\n const {\n top = insets.top,\n right = insets.right,\n bottom = insets.bottom,\n left = insets.left,\n } = focusedOptions.safeAreaInsets || {};\n\n let activeScreensLimit = 1;\n\n for (let i = scenes.length - 1; i >= 0; i--) {\n const {\n // By default, we don't want to detach the previous screen of the active one for modals\n detachPreviousScreen = mode === 'modal'\n ? i !== scenes.length - 1\n : true,\n } = scenes[i].descriptor.options;\n\n if (detachPreviousScreen === false) {\n activeScreensLimit++;\n } else {\n break;\n }\n }\n\n const isFloatHeaderAbsolute =\n headerMode === 'float'\n ? this.state.scenes.slice(-2).some((scene) => {\n const { descriptor } = scene;\n const options = descriptor ? descriptor.options : {};\n const { headerTransparent, headerShown = true } = options;\n\n if (headerTransparent || headerShown === false) {\n return true;\n }\n\n return false;\n })\n : false;\n\n const floatingHeader =\n headerMode === 'float' ? (\n <React.Fragment key=\"header\">\n {renderHeader({\n mode: 'float',\n layout,\n insets: { top, right, bottom, left },\n scenes,\n getPreviousScene: this.getPreviousScene,\n getFocusedRoute: this.getFocusedRoute,\n onContentHeightChange: this.handleHeaderLayout,\n gestureDirection:\n focusedOptions.gestureDirection !== undefined\n ? focusedOptions.gestureDirection\n : defaultTransitionPreset.gestureDirection,\n styleInterpolator:\n focusedOptions.headerStyleInterpolator !== undefined\n ? focusedOptions.headerStyleInterpolator\n : defaultTransitionPreset.headerStyleInterpolator,\n style: [\n styles.floating,\n isFloatHeaderAbsolute && [\n // Without this, the header buttons won't be touchable on Android when headerTransparent: true\n { height: focusedHeaderHeight },\n styles.absolute,\n ],\n ],\n })}\n </React.Fragment>\n ) : null;\n\n return (\n <React.Fragment>\n {isFloatHeaderAbsolute ? null : floatingHeader}\n <MaybeScreenContainer\n enabled={detachInactiveScreens}\n style={styles.container}\n onLayout={this.handleLayout}\n >\n {routes.map((route, index, self) => {\n const focused = focusedRoute.key === route.key;\n const gesture = gestures[route.key];\n const scene = scenes[index];\n\n // For the screens that shouldn't be active, the value is 0\n // For those that should be active, but are not the top screen, the value is 1\n // For those on top of the stack and with interaction enabled, the value is 2\n // For the old implementation, it stays the same it was\n let isScreenActive: Animated.AnimatedInterpolation | 2 | 1 | 0 = 1;\n\n if (shouldUseActivityState) {\n if (index < self.length - activeScreensLimit - 1) {\n // screen should be inactive because it is too deep in the stack\n isScreenActive = STATE_INACTIVE;\n } else {\n const sceneForActivity = scenes[self.length - 1];\n const outputValue =\n index === self.length - 1\n ? STATE_ON_TOP // the screen is on top after the transition\n : index >= self.length - activeScreensLimit\n ? STATE_TRANSITIONING_OR_BELOW_TOP // the screen should stay active after the transition, it is not on top but is in activeLimit\n : STATE_INACTIVE; // the screen should be active only during the transition, it is at the edge of activeLimit\n isScreenActive = sceneForActivity\n ? sceneForActivity.progress.current.interpolate({\n inputRange: [0, 1 - EPSILON, 1],\n outputRange: [1, 1, outputValue],\n extrapolate: 'clamp',\n })\n : STATE_TRANSITIONING_OR_BELOW_TOP;\n }\n } else {\n isScreenActive = scene.progress.next\n ? scene.progress.next.interpolate({\n inputRange: [0, 1 - EPSILON, 1],\n outputRange: [1, 1, 0],\n extrapolate: 'clamp',\n })\n : 1;\n }\n\n const {\n safeAreaInsets,\n headerShown = true,\n headerTransparent,\n cardShadowEnabled,\n cardOverlayEnabled,\n cardOverlay,\n cardStyle,\n animationEnabled,\n gestureResponseDistance,\n gestureVelocityImpact,\n gestureDirection = defaultTransitionPreset.gestureDirection,\n transitionSpec = defaultTransitionPreset.transitionSpec,\n cardStyleInterpolator = animationEnabled === false\n ? forNoAnimationCard\n : defaultTransitionPreset.cardStyleInterpolator,\n headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,\n } = scene.descriptor\n ? scene.descriptor.options\n : ({} as StackNavigationOptions);\n\n let transitionConfig = {\n gestureDirection,\n transitionSpec,\n cardStyleInterpolator,\n headerStyleInterpolator,\n };\n\n // When a screen is not the last, it should use next screen's transition config\n // Many transitions also animate the previous screen, so using 2 different transitions doesn't look right\n // For example combining a slide and a modal transition would look wrong otherwise\n // With this approach, combining different transition styles in the same navigator mostly looks right\n // This will still be broken when 2 transitions have different idle state (e.g. modal presentation),\n // but majority of the transitions look alright\n if (index !== self.length - 1) {\n const nextScene = scenes[index + 1];\n\n if (nextScene) {\n const {\n animationEnabled,\n gestureDirection = defaultTransitionPreset.gestureDirection,\n transitionSpec = defaultTransitionPreset.transitionSpec,\n cardStyleInterpolator = animationEnabled === false\n ? forNoAnimationCard\n : defaultTransitionPreset.cardStyleInterpolator,\n headerStyleInterpolator = defaultTransitionPreset.headerStyleInterpolator,\n } = nextScene.descriptor\n ? nextScene.descriptor.options\n : ({} as StackNavigationOptions);\n\n transitionConfig = {\n gestureDirection,\n transitionSpec,\n cardStyleInterpolator,\n headerStyleInterpolator,\n };\n }\n }\n\n const {\n top: safeAreaInsetTop = insets.top,\n right: safeAreaInsetRight = insets.right,\n bottom: safeAreaInsetBottom = insets.bottom,\n left: safeAreaInsetLeft = insets.left,\n } = safeAreaInsets || {};\n\n const headerHeight =\n headerMode !== 'none' && headerShown !== false\n ? headerHeights[route.key]\n : 0;\n\n return (\n <MaybeScreen\n key={route.key}\n style={StyleSheet.absoluteFill}\n enabled={detachInactiveScreens}\n active={isScreenActive}\n pointerEvents=\"box-none\"\n >\n <CardContainer\n index={index}\n active={index === self.length - 1}\n focused={focused}\n closing={closingRouteKeys.includes(route.key)}\n layout={layout}\n gesture={gesture}\n scene={scene}\n safeAreaInsetTop={safeAreaInsetTop}\n safeAreaInsetRight={safeAreaInsetRight}\n safeAreaInsetBottom={safeAreaInsetBottom}\n safeAreaInsetLeft={safeAreaInsetLeft}\n cardOverlay={cardOverlay}\n cardOverlayEnabled={cardOverlayEnabled}\n cardShadowEnabled={cardShadowEnabled}\n cardStyle={cardStyle}\n onPageChangeStart={onPageChangeStart}\n onPageChangeConfirm={onPageChangeConfirm}\n onPageChangeCancel={onPageChangeCancel}\n onGestureStart={onGestureStart}\n onGestureCancel={onGestureCancel}\n onGestureEnd={onGestureEnd}\n gestureResponseDistance={gestureResponseDistance}\n headerHeight={headerHeight}\n isParentHeaderShown={isParentHeaderShown}\n onHeaderHeightChange={this.handleHeaderLayout}\n getPreviousScene={this.getPreviousScene}\n getFocusedRoute={this.getFocusedRoute}\n mode={mode}\n headerMode={headerMode}\n headerShown={headerShown}\n hasAbsoluteHeader={\n isFloatHeaderAbsolute && !headerTransparent\n }\n renderHeader={renderHeader}\n renderScene={renderScene}\n onOpenRoute={onOpenRoute}\n onCloseRoute={onCloseRoute}\n onTransitionStart={onTransitionStart}\n onTransitionEnd={onTransitionEnd}\n gestureEnabled={index !== 0 && getGesturesEnabled({ route })}\n gestureVelocityImpact={gestureVelocityImpact}\n {...transitionConfig}\n />\n </MaybeScreen>\n );\n })}\n </MaybeScreenContainer>\n {isFloatHeaderAbsolute ? floatingHeader : null}\n </React.Fragment>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n absolute: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n },\n floating: {\n zIndex: 1,\n },\n});\n","import * as React from 'react';\nimport { TextInput, Keyboard, HostComponent } from 'react-native';\n\ntype Props = {\n enabled: boolean;\n children: (props: {\n onPageChangeStart: () => void;\n onPageChangeConfirm: (force: boolean) => void;\n onPageChangeCancel: () => void;\n }) => React.ReactNode;\n};\n\ntype InputRef = React.ElementRef<HostComponent<unknown>> | undefined;\n\nexport default class KeyboardManager extends React.Component<Props> {\n componentWillUnmount() {\n this.clearKeyboardTimeout();\n }\n\n // Numeric id of the previously focused text input\n // When a gesture didn't change the tab, we can restore the focused input with this\n private previouslyFocusedTextInput: InputRef = undefined;\n private startTimestamp: number = 0;\n private keyboardTimeout: any;\n\n private clearKeyboardTimeout = () => {\n if (this.keyboardTimeout !== undefined) {\n clearTimeout(this.keyboardTimeout);\n this.keyboardTimeout = undefined;\n }\n };\n\n private handlePageChangeStart = () => {\n if (!this.props.enabled) {\n return;\n }\n\n this.clearKeyboardTimeout();\n\n // @ts-expect-error: blurTextInput accepts both number and ref, but types say only ref\n const input: InputRef = TextInput.State.currentlyFocusedInput\n ? TextInput.State.currentlyFocusedInput()\n : TextInput.State.currentlyFocusedField();\n\n // When a page change begins, blur the currently focused input\n TextInput.State.blurTextInput(input);\n\n // Store the id of this input so we can refocus it if change was cancelled\n this.previouslyFocusedTextInput = input;\n\n // Store timestamp for touch start\n this.startTimestamp = Date.now();\n };\n\n private handlePageChangeConfirm = (force: boolean) => {\n if (!this.props.enabled) {\n return;\n }\n\n this.clearKeyboardTimeout();\n\n if (force) {\n // Always dismiss input, even if we don't have a ref to it\n // We might not have the ref if onPageChangeStart was never called\n // This can happen if page change was not from a gesture\n Keyboard.dismiss();\n } else {\n const input = this.previouslyFocusedTextInput;\n\n if (input) {\n // Dismiss the keyboard only if an input was a focused before\n // This makes sure we don't dismiss input on going back and focusing an input\n TextInput.State.blurTextInput(input);\n }\n }\n\n // Cleanup the ID on successful page change\n this.previouslyFocusedTextInput = undefined;\n };\n\n private handlePageChangeCancel = () => {\n if (!this.props.enabled) {\n return;\n }\n\n this.clearKeyboardTimeout();\n\n // The page didn't change, we should restore the focus of text input\n const input = this.previouslyFocusedTextInput;\n\n if (input) {\n // If the interaction was super short we should make sure keyboard won't hide again.\n\n // Too fast input refocus will result only in keyboard flashing on screen and hiding right away.\n // During first ~100ms keyboard will be dismissed no matter what,\n // so we have to make sure it won't interrupt input refocus logic.\n // That's why when the interaction is shorter than 100ms we add delay so it won't hide once again.\n // Subtracting timestamps makes us sure the delay is executed only when needed.\n if (Date.now() - this.startTimestamp < 100) {\n this.keyboardTimeout = setTimeout(() => {\n TextInput.State.focusTextInput(input);\n this.previouslyFocusedTextInput = undefined;\n }, 100);\n } else {\n TextInput.State.focusTextInput(input);\n this.previouslyFocusedTextInput = undefined;\n }\n }\n };\n\n render() {\n return this.props.children({\n onPageChangeStart: this.handlePageChangeStart,\n onPageChangeConfirm: this.handlePageChangeConfirm,\n onPageChangeCancel: this.handlePageChangeCancel,\n });\n }\n}\n","import * as React from 'react';\nimport {\n Animated,\n StyleSheet,\n Platform,\n TextProps,\n StyleProp,\n TextStyle,\n} from 'react-native';\nimport { useTheme } from '@react-navigation/native';\n\ntype Props = Omit<TextProps, 'style'> & {\n tintColor?: string;\n children?: string;\n style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;\n};\n\nexport default function HeaderTitle({ tintColor, style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.Text\n accessibilityRole=\"header\"\n aria-level=\"1\"\n numberOfLines={1}\n {...rest}\n style={[\n styles.title,\n { color: tintColor === undefined ? colors.text : tintColor },\n style,\n ]}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n title: Platform.select({\n ios: {\n fontSize: 17,\n fontWeight: '600',\n },\n android: {\n fontSize: 20,\n fontFamily: 'sans-serif-medium',\n fontWeight: 'normal',\n },\n default: {\n fontSize: 18,\n fontWeight: '500',\n },\n }),\n});\n","import * as React from 'react';\nimport { StackActions } from '@react-navigation/native';\n\nimport HeaderSegment from './HeaderSegment';\nimport HeaderTitle from './HeaderTitle';\nimport debounce from '../../utils/debounce';\nimport type { StackHeaderProps, StackHeaderTitleProps } from '../../types';\n\nexport default React.memo(function Header(props: StackHeaderProps) {\n const {\n scene,\n previous,\n layout,\n insets,\n navigation,\n styleInterpolator,\n } = props;\n const { options } = scene.descriptor;\n const title =\n typeof options.headerTitle !== 'function' &&\n options.headerTitle !== undefined\n ? options.headerTitle\n : options.title !== undefined\n ? options.title\n : scene.route.name;\n\n let leftLabel;\n\n // The label for the left back button shows the title of the previous screen\n // If a custom label is specified, we use it, otherwise use previous screen's title\n if (options.headerBackTitle !== undefined) {\n leftLabel = options.headerBackTitle;\n } else if (previous) {\n const o = previous.descriptor.options;\n\n leftLabel =\n typeof o.headerTitle !== 'function' && o.headerTitle !== undefined\n ? o.headerTitle\n : o.title !== undefined\n ? o.title\n : previous.route.name;\n }\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const goBack = React.useCallback(\n debounce(() => {\n if (navigation.isFocused() && navigation.canGoBack()) {\n navigation.dispatch({\n ...StackActions.pop(),\n source: scene.route.key,\n });\n }\n }, 50),\n [navigation, scene.route.key]\n );\n\n return (\n <HeaderSegment\n {...options}\n insets={insets}\n layout={layout}\n scene={scene}\n title={title}\n leftLabel={leftLabel}\n headerTitle={\n typeof options.headerTitle !== 'function'\n ? (props: StackHeaderTitleProps) => <HeaderTitle {...props} />\n : options.headerTitle\n }\n onGoBack={previous ? goBack : undefined}\n styleInterpolator={styleInterpolator}\n />\n );\n});\n","export default function debounce<T extends (...args: any[]) => void>(\n func: T,\n duration: number\n): T {\n let timeout: NodeJS.Timeout | number | undefined;\n\n return function (this: any, ...args) {\n if (!timeout) {\n // eslint-disable-next-line babel/no-invalid-this\n func.apply(this, args);\n\n timeout = setTimeout(() => {\n timeout = undefined;\n }, duration);\n }\n } as T;\n}\n","import * as React from 'react';\nimport { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';\nimport {\n NavigationContext,\n NavigationRouteContext,\n Route,\n ParamListBase,\n} from '@react-navigation/native';\nimport type { EdgeInsets } from 'react-native-safe-area-context';\n\nimport Header from './Header';\nimport {\n forSlideLeft,\n forSlideUp,\n forNoAnimation,\n forSlideRight,\n} from '../../TransitionConfigs/HeaderStyleInterpolators';\nimport PreviousSceneContext from '../../utils/PreviousSceneContext';\nimport type {\n Layout,\n Scene,\n StackHeaderStyleInterpolator,\n StackNavigationProp,\n GestureDirection,\n} from '../../types';\n\nexport type Props = {\n mode: 'float' | 'screen';\n layout: Layout;\n insets: EdgeInsets;\n scenes: (Scene<Route<string>> | undefined)[];\n getPreviousScene: (props: {\n route: Route<string>;\n }) => Scene<Route<string>> | undefined;\n getFocusedRoute: () => Route<string>;\n onContentHeightChange?: (props: {\n route: Route<string>;\n height: number;\n }) => void;\n styleInterpolator: StackHeaderStyleInterpolator;\n gestureDirection: GestureDirection;\n style?: StyleProp<ViewStyle>;\n};\n\nexport default function HeaderContainer({\n mode,\n scenes,\n layout,\n insets,\n getPreviousScene,\n getFocusedRoute,\n onContentHeightChange,\n gestureDirection,\n styleInterpolator,\n style,\n}: Props) {\n const focusedRoute = getFocusedRoute();\n const parentPreviousScene = React.useContext(PreviousSceneContext);\n\n return (\n <Animated.View pointerEvents=\"box-none\" style={style}>\n {scenes.slice(-3).map((scene, i, self) => {\n if ((mode === 'screen' && i !== self.length - 1) || !scene) {\n return null;\n }\n\n const { header, headerShown = true, headerTransparent } =\n scene.descriptor.options || {};\n\n if (!headerShown) {\n return null;\n }\n\n const isFocused = focusedRoute.key === scene.route.key;\n const previous =\n getPreviousScene({ route: scene.route }) ?? parentPreviousScene;\n\n // If the screen is next to a headerless screen, we need to make the header appear static\n // This makes the header look like it's moving with the screen\n const previousScene = self[i - 1];\n const nextScene = self[i + 1];\n\n const { headerShown: previousHeaderShown = true } =\n previousScene?.descriptor.options || {};\n\n const { headerShown: nextHeaderShown = true } =\n nextScene?.descriptor.options || {};\n\n const isHeaderStatic =\n (previousHeaderShown === false &&\n // We still need to animate when coming back from next scene\n // A hacky way to check this is if the next scene exists\n !nextScene) ||\n nextHeaderShown === false;\n\n const props = {\n mode,\n layout,\n insets,\n scene,\n previous,\n navigation: scene.descriptor.navigation as StackNavigationProp<\n ParamListBase\n >,\n styleInterpolator:\n mode === 'float'\n ? isHeaderStatic\n ? gestureDirection === 'vertical' ||\n gestureDirection === 'vertical-inverted'\n ? forSlideUp\n : gestureDirection === 'horizontal-inverted'\n ? forSlideRight\n : forSlideLeft\n : styleInterpolator\n : forNoAnimation,\n };\n\n return (\n <NavigationContext.Provider\n key={scene.route.key}\n value={scene.descriptor.navigation}\n >\n <NavigationRouteContext.Provider value={scene.route}>\n <View\n onLayout={\n onContentHeightChange\n ? (e) => {\n const { height } = e.nativeEvent.layout;\n\n onContentHeightChange({\n route: scene.route,\n height,\n });\n }\n : undefined\n }\n pointerEvents={isFocused ? 'box-none' : 'none'}\n accessibilityElementsHidden={!isFocused}\n importantForAccessibility={\n isFocused ? 'auto' : 'no-hide-descendants'\n }\n style={\n // Avoid positioning the focused header absolutely\n // Otherwise accessibility tools don't seem to be able to find it\n (mode === 'float' && !isFocused) || headerTransparent\n ? styles.header\n : null\n }\n >\n {header !== undefined ? header(props) : <Header {...props} />}\n </View>\n </NavigationRouteContext.Provider>\n </NavigationContext.Provider>\n );\n })}\n </Animated.View>\n );\n}\n\nconst styles = StyleSheet.create({\n header: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n },\n});\n","import * as React from 'react';\nimport {\n SafeAreaProvider,\n SafeAreaConsumer,\n initialWindowSafeAreaInsets,\n} from 'react-native-safe-area-context';\nimport {\n getStatusBarHeight,\n getBottomSpace,\n} from 'react-native-iphone-x-helper';\n\n// The provider component for safe area initializes asynchornously\n// Until the insets are available, there'll be blank screen\n// To avoid the blank screen, we specify some initial values\nconst initialSafeAreaInsets = {\n // Approximate values which are good enough for most cases\n top: getStatusBarHeight(true),\n bottom: getBottomSpace(),\n right: 0,\n left: 0,\n // If we are on a newer version of the library, we can get the correct window insets\n // The component might not be filling the window, but this is good enough for most cases\n ...initialWindowSafeAreaInsets,\n};\n\ntype Props = {\n children: React.ReactNode;\n};\n\nexport default function SafeAreaProviderCompat({ children }: Props) {\n return (\n <SafeAreaConsumer>\n {(insets) => {\n if (insets) {\n // If we already have insets, don't wrap the stack in another safe area provider\n // This avoids an issue with updates at the cost of potentially incorrect values\n // https://github.com/react-navigation/react-navigation/issues/174\n return children;\n }\n\n return (\n <SafeAreaProvider initialSafeAreaInsets={initialSafeAreaInsets}>\n {children}\n </SafeAreaProvider>\n );\n }}\n </SafeAreaConsumer>\n );\n}\n","import * as React from 'react';\nimport { View, Platform, StyleSheet } from 'react-native';\nimport { SafeAreaConsumer, EdgeInsets } from 'react-native-safe-area-context';\nimport {\n NavigationHelpersContext,\n StackActions,\n StackNavigationState,\n Route,\n ParamListBase,\n} from '@react-navigation/native';\n\nimport { GestureHandlerRootView } from '../GestureHandler';\nimport CardStack from './CardStack';\nimport KeyboardManager from '../KeyboardManager';\nimport HeaderContainer, {\n Props as HeaderContainerProps,\n} from '../Header/HeaderContainer';\nimport SafeAreaProviderCompat from '../SafeAreaProviderCompat';\nimport type {\n StackNavigationHelpers,\n StackNavigationConfig,\n StackDescriptorMap,\n} from '../../types';\nimport HeaderShownContext from '../../utils/HeaderShownContext';\n\ntype Props = StackNavigationConfig & {\n state: StackNavigationState<ParamListBase>;\n navigation: StackNavigationHelpers;\n descriptors: StackDescriptorMap;\n};\n\ntype State = {\n // Local copy of the routes which are actually rendered\n routes: Route<string>[];\n // Previous routes, to compare whether routes have changed or not\n previousRoutes: Route<string>[];\n // Previous descriptors, to compare whether descriptors have changed or not\n previousDescriptors: StackDescriptorMap;\n // List of routes being opened, we need to animate pushing of these new routes\n openingRouteKeys: string[];\n // List of routes being closed, we need to animate popping of these routes\n closingRouteKeys: string[];\n // List of routes being replaced, we need to keep a copy until the new route animates in\n replacingRouteKeys: string[];\n // Since the local routes can vary from the routes from props, we need to keep the descriptors for old routes\n // Otherwise we won't be able to access the options for routes that were removed\n descriptors: StackDescriptorMap;\n};\n\nconst GestureHandlerWrapper = GestureHandlerRootView ?? View;\n\n/**\n * Compare two arrays with primitive values as the content.\n * We need to make sure that both values and order match.\n */\nconst isArrayEqual = (a: any[], b: any[]) =>\n a.length === b.length && a.every((it, index) => it === b[index]);\n\nexport default class StackView extends React.Component<Props, State> {\n static getDerivedStateFromProps(\n props: Readonly<Props>,\n state: Readonly<State>\n ) {\n // If there was no change in routes, we don't need to compute anything\n if (\n (props.state.routes === state.previousRoutes ||\n isArrayEqual(\n props.state.routes.map((r) => r.key),\n state.previousRoutes.map((r) => r.key)\n )) &&\n state.routes.length\n ) {\n let routes = state.routes;\n let previousRoutes = state.previousRoutes;\n let descriptors = props.descriptors;\n let previousDescriptors = state.previousDescriptors;\n\n if (props.descriptors !== state.previousDescriptors) {\n descriptors = state.routes.reduce<StackDescriptorMap>((acc, route) => {\n acc[route.key] =\n props.descriptors[route.key] || state.descriptors[route.key];\n\n return acc;\n }, {});\n\n previousDescriptors = props.descriptors;\n }\n\n if (props.state.routes !== state.previousRoutes) {\n // if any route objects have changed, we should update them\n const map = props.state.routes.reduce<Record<string, Route<string>>>(\n (acc, route) => {\n acc[route.key] = route;\n return acc;\n },\n {}\n );\n\n routes = state.routes.map((route) => map[route.key] || route);\n previousRoutes = props.state.routes;\n }\n\n return {\n routes,\n previousRoutes,\n descriptors,\n previousDescriptors,\n };\n }\n\n // Here we determine which routes were added or removed to animate them\n // We keep a copy of the route being removed in local state to be able to animate it\n\n let routes =\n props.state.index < props.state.routes.length - 1\n ? // Remove any extra routes from the state\n // The last visible route should be the focused route, i.e. at current index\n props.state.routes.slice(0, props.state.index + 1)\n : props.state.routes;\n\n // Now we need to determine which routes were added and removed\n let {\n openingRouteKeys,\n closingRouteKeys,\n replacingRouteKeys,\n previousRoutes,\n } = state;\n\n const previousFocusedRoute = previousRoutes[previousRoutes.length - 1] as\n | Route<string>\n | undefined;\n const nextFocusedRoute = routes[routes.length - 1];\n\n const isAnimationEnabled = (key: string) => {\n const descriptor = props.descriptors[key] || state.descriptors[key];\n\n return descriptor ? descriptor.options.animationEnabled !== false : true;\n };\n\n const getAnimationTypeForReplace = (key: string) => {\n const descriptor = props.descriptors[key] || state.descriptors[key];\n\n return descriptor.options.animationTypeForReplace ?? 'push';\n };\n\n if (\n previousFocusedRoute &&\n previousFocusedRoute.key !== nextFocusedRoute.key\n ) {\n // We only need to animate routes if the focused route changed\n // Animating previous routes won't be visible coz the focused route is on top of everything\n\n if (!previousRoutes.some((r) => r.key === nextFocusedRoute.key)) {\n // A new route has come to the focus, we treat this as a push\n // A replace can also trigger this, the animation should look like push\n\n if (\n isAnimationEnabled(nextFocusedRoute.key) &&\n !openingRouteKeys.includes(nextFocusedRoute.key)\n ) {\n // In this case, we need to animate pushing the focused route\n // We don't care about animating any other added routes because they won't be visible\n openingRouteKeys = [...openingRouteKeys, nextFocusedRoute.key];\n\n closingRouteKeys = closingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n replacingRouteKeys = replacingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n\n if (!routes.some((r) => r.key === previousFocusedRoute.key)) {\n // The previous focused route isn't present in state, we treat this as a replace\n\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n if (getAnimationTypeForReplace(nextFocusedRoute.key) === 'pop') {\n closingRouteKeys = [\n ...closingRouteKeys,\n previousFocusedRoute.key,\n ];\n\n // By default, new routes have a push animation, so we add it to `openingRouteKeys` before\n // But since user configured it to animate the old screen like a pop, we need to add this without animation\n // So remove it from `openingRouteKeys` which will remove the animation\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== nextFocusedRoute.key\n );\n\n // Keep the route being removed at the end to animate it out\n routes = [...routes, previousFocusedRoute];\n } else {\n replacingRouteKeys = [\n ...replacingRouteKeys,\n previousFocusedRoute.key,\n ];\n\n closingRouteKeys = closingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n // Keep the old route in the state because it's visible under the new route, and removing it will feel abrupt\n // We need to insert it just before the focused one (the route being pushed)\n // After the push animation is completed, routes being replaced will be removed completely\n routes = routes.slice();\n routes.splice(routes.length - 1, 0, previousFocusedRoute);\n }\n }\n }\n } else if (!routes.some((r) => r.key === previousFocusedRoute.key)) {\n // The previously focused route was removed, we treat this as a pop\n\n if (\n isAnimationEnabled(previousFocusedRoute.key) &&\n !closingRouteKeys.includes(previousFocusedRoute.key)\n ) {\n closingRouteKeys = [...closingRouteKeys, previousFocusedRoute.key];\n\n // Sometimes a route can be closed before the opening animation finishes\n // So we also need to remove it from the opening list\n openingRouteKeys = openingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n replacingRouteKeys = replacingRouteKeys.filter(\n (key) => key !== previousFocusedRoute.key\n );\n\n // Keep a copy of route being removed in the state to be able to animate it\n routes = [...routes, previousFocusedRoute];\n }\n } else {\n // Looks like some routes were re-arranged and no focused routes were added/removed\n // i.e. the currently focused route already existed and the previously focused route still exists\n // We don't know how to animate this\n }\n } else if (replacingRouteKeys.length || closingRouteKeys.length) {\n // Keep the routes we are closing or replacing if animation is enabled for them\n routes = routes.slice();\n routes.splice(\n routes.length - 1,\n 0,\n ...state.routes.filter(({ key }) =>\n isAnimationEnabled(key)\n ? replacingRouteKeys.includes(key) || closingRouteKeys.includes(key)\n : false\n )\n );\n }\n\n if (!routes.length) {\n throw new Error(\n 'There should always be at least one route in the navigation state.'\n );\n }\n\n const descriptors = routes.reduce<StackDescriptorMap>((acc, route) => {\n acc[route.key] =\n props.descriptors[route.key] || state.descriptors[route.key];\n\n return acc;\n }, {});\n\n return {\n routes,\n previousRoutes: props.state.routes,\n previousDescriptors: props.descriptors,\n openingRouteKeys,\n closingRouteKeys,\n replacingRouteKeys,\n descriptors,\n };\n }\n\n state: State = {\n routes: [],\n previousRoutes: [],\n previousDescriptors: {},\n openingRouteKeys: [],\n closingRouteKeys: [],\n replacingRouteKeys: [],\n descriptors: {},\n };\n\n private getGesturesEnabled = ({ route }: { route: Route<string> }) => {\n const descriptor = this.state.descriptors[route.key];\n\n if (descriptor) {\n const { gestureEnabled, animationEnabled } = descriptor.options;\n\n if (animationEnabled === false) {\n // When animation is disabled, also disable gestures\n // The gesture to dismiss a route will look weird when not animated\n return false;\n }\n\n return gestureEnabled !== false;\n }\n\n return false;\n };\n\n private getPreviousRoute = ({ route }: { route: Route<string> }) => {\n const { closingRouteKeys, replacingRouteKeys } = this.state;\n const routes = this.state.routes.filter(\n (r) =>\n r.key === route.key ||\n (!closingRouteKeys.includes(r.key) &&\n !replacingRouteKeys.includes(r.key))\n );\n\n const index = routes.findIndex((r) => r.key === route.key);\n\n return routes[index - 1];\n };\n\n private renderScene = ({ route }: { route: Route<string> }) => {\n const descriptor =\n this.state.descriptors[route.key] || this.props.descriptors[route.key];\n\n if (!descriptor) {\n return null;\n }\n\n return descriptor.render();\n };\n\n private renderHeader = (props: HeaderContainerProps) => {\n return <HeaderContainer {...props} />;\n };\n\n private handleOpenRoute = ({ route }: { route: Route<string> }) => {\n const { state, navigation } = this.props;\n const { closingRouteKeys, replacingRouteKeys } = this.state;\n\n if (\n closingRouteKeys.some((key) => key === route.key) &&\n replacingRouteKeys.every((key) => key !== route.key) &&\n state.routeNames.includes(route.name) &&\n !state.routes.some((r) => r.key === route.key)\n ) {\n // If route isn't present in current state, but was closing, assume that a close animation was cancelled\n // So we need to add this route back to the state\n navigation.navigate(route);\n } else {\n this.setState((state) => ({\n routes: state.replacingRouteKeys.length\n ? state.routes.filter(\n (r) => !state.replacingRouteKeys.includes(r.key)\n )\n : state.routes,\n openingRouteKeys: state.openingRouteKeys.filter(\n (key) => key !== route.key\n ),\n closingRouteKeys: state.closingRouteKeys.filter(\n (key) => key !== route.key\n ),\n replacingRouteKeys: [],\n }));\n }\n };\n\n private handleCloseRoute = ({ route }: { route: Route<string> }) => {\n const { state, navigation } = this.props;\n\n if (state.routes.some((r) => r.key === route.key)) {\n // If a route exists in state, trigger a pop\n // This will happen in when the route was closed from the card component\n // e.g. When the close animation triggered from a gesture ends\n navigation.dispatch({\n ...StackActions.pop(),\n source: route.key,\n target: state.key,\n });\n } else {\n // We need to clean up any state tracking the route and pop it immediately\n this.setState((state) => ({\n routes: state.routes.filter((r) => r.key !== route.key),\n openingRouteKeys: state.openingRouteKeys.filter(\n (key) => key !== route.key\n ),\n closingRouteKeys: state.closingRouteKeys.filter(\n (key) => key !== route.key\n ),\n }));\n }\n };\n\n private handleTransitionStart = (\n { route }: { route: Route<string> },\n closing: boolean\n ) =>\n this.props.navigation.emit({\n type: 'transitionStart',\n data: { closing },\n target: route.key,\n });\n\n private handleTransitionEnd = (\n { route }: { route: Route<string> },\n closing: boolean\n ) =>\n this.props.navigation.emit({\n type: 'transitionEnd',\n data: { closing },\n target: route.key,\n });\n\n private handleGestureStart = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureStart',\n target: route.key,\n });\n };\n\n private handleGestureEnd = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureEnd',\n target: route.key,\n });\n };\n\n private handleGestureCancel = ({ route }: { route: Route<string> }) => {\n this.props.navigation.emit({\n type: 'gestureCancel',\n target: route.key,\n });\n };\n\n render() {\n const {\n state,\n navigation,\n keyboardHandlingEnabled,\n mode = 'card',\n headerMode = mode === 'card' && Platform.OS === 'ios'\n ? 'float'\n : 'screen',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n descriptors: _,\n ...rest\n } = this.props;\n\n const {\n routes,\n descriptors,\n openingRouteKeys,\n closingRouteKeys,\n } = this.state;\n\n return (\n <NavigationHelpersContext.Provider value={navigation}>\n <GestureHandlerWrapper style={styles.container}>\n <SafeAreaProviderCompat>\n <SafeAreaConsumer>\n {(insets) => (\n <KeyboardManager enabled={keyboardHandlingEnabled !== false}>\n {(props) => (\n <HeaderShownContext.Consumer>\n {(isParentHeaderShown) => (\n <CardStack\n mode={mode}\n insets={insets as EdgeInsets}\n isParentHeaderShown={isParentHeaderShown}\n getPreviousRoute={this.getPreviousRoute}\n getGesturesEnabled={this.getGesturesEnabled}\n routes={routes}\n openingRouteKeys={openingRouteKeys}\n closingRouteKeys={closingRouteKeys}\n onOpenRoute={this.handleOpenRoute}\n onCloseRoute={this.handleCloseRoute}\n onTransitionStart={this.handleTransitionStart}\n onTransitionEnd={this.handleTransitionEnd}\n renderHeader={this.renderHeader}\n renderScene={this.renderScene}\n headerMode={headerMode}\n state={state}\n descriptors={descriptors}\n onGestureStart={this.handleGestureStart}\n onGestureEnd={this.handleGestureEnd}\n onGestureCancel={this.handleGestureCancel}\n {...rest}\n {...props}\n />\n )}\n </HeaderShownContext.Consumer>\n )}\n </KeyboardManager>\n )}\n </SafeAreaConsumer>\n </SafeAreaProviderCompat>\n </GestureHandlerWrapper>\n </NavigationHelpersContext.Provider>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n","import * as React from 'react';\nimport { Platform } from 'react-native';\nimport {\n useNavigationBuilder,\n createNavigatorFactory,\n DefaultNavigatorOptions,\n EventArg,\n StackRouter,\n StackRouterOptions,\n StackNavigationState,\n StackActions,\n ParamListBase,\n StackActionHelpers,\n} from '@react-navigation/native';\nimport StackView from '../views/Stack/StackView';\nimport type {\n StackNavigationConfig,\n StackNavigationOptions,\n StackNavigationEventMap,\n} from '../types';\n\ntype Props = DefaultNavigatorOptions<StackNavigationOptions> &\n StackRouterOptions &\n StackNavigationConfig;\n\nfunction StackNavigator({\n initialRouteName,\n children,\n screenOptions,\n ...rest\n}: Props) {\n const defaultOptions = {\n gestureEnabled: Platform.OS === 'ios',\n animationEnabled:\n Platform.OS !== 'web' &&\n Platform.OS !== 'windows' &&\n Platform.OS !== 'macos',\n };\n\n const { state, descriptors, navigation } = useNavigationBuilder<\n StackNavigationState<ParamListBase>,\n StackRouterOptions,\n StackActionHelpers<ParamListBase>,\n StackNavigationOptions,\n StackNavigationEventMap\n >(StackRouter, {\n initialRouteName,\n children,\n screenOptions:\n typeof screenOptions === 'function'\n ? (...args) => ({\n ...defaultOptions,\n ...screenOptions(...args),\n })\n : {\n ...defaultOptions,\n ...screenOptions,\n },\n });\n\n React.useEffect(\n () =>\n navigation.addListener?.('tabPress', (e) => {\n const isFocused = navigation.isFocused();\n\n // Run the operation in the next frame so we're sure all listeners have been run\n // This is necessary to know if preventDefault() has been called\n requestAnimationFrame(() => {\n if (\n state.index > 0 &&\n isFocused &&\n !(e as EventArg<'tabPress', true>).defaultPrevented\n ) {\n // When user taps on already focused tab and we're inside the tab,\n // reset the stack to replicate native behaviour\n navigation.dispatch({\n ...StackActions.popToTop(),\n target: state.key,\n });\n }\n });\n }),\n [navigation, state.index, state.key]\n );\n\n return (\n <StackView\n {...rest}\n state={state}\n descriptors={descriptors}\n navigation={navigation}\n />\n );\n}\n\nexport default createNavigatorFactory<\n StackNavigationState<ParamListBase>,\n StackNavigationOptions,\n StackNavigationEventMap,\n typeof StackNavigator\n>(StackNavigator);\n","export default function(d) {\n var x = +this._x.call(null, d);\n return add(this.cover(x), x, d);\n}\n\nfunction add(tree, x, d) {\n if (isNaN(x)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n x1 = tree._x1,\n xm,\n xp,\n right,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (parent = node, !(node = node[i = +right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n if (x === xp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(2) : tree._root = new Array(2);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n } while ((i = +right) === (j = +(xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var i, n = data.length,\n x,\n xz = new Array(n),\n x0 = Infinity,\n x1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, data[i]))) continue;\n xz[i] = x;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0).cover(x1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x) {\n if (isNaN(x = +x)) return this; // ignore invalid points\n\n var x0 = this._x0,\n x1 = this._x1;\n\n // If the binarytree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing half boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1) {\n i = +(x < x0);\n parent = new Array(2), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z; break;\n case 1: x0 = x1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._x1 = x1;\n return this;\n}\n","export default function(node, x0, x1) {\n this.node = node;\n this.x0 = x0;\n this.x1 = x1;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add\";\nimport tree_cover from \"./cover\";\nimport tree_data from \"./data\";\nimport tree_extent from \"./extent\";\nimport tree_find from \"./find\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove\";\nimport tree_root from \"./root\";\nimport tree_size from \"./size\";\nimport tree_visit from \"./visit\";\nimport tree_visitAfter from \"./visitAfter\";\nimport tree_x, {defaultX} from \"./x\";\n\nexport default function binarytree(nodes, x) {\n var tree = new Binarytree(x == null ? defaultX : x, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Binarytree(x, x0, x1) {\n this._x = x;\n this._x0 = x0;\n this._x1 = x1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = binarytree.prototype = Binarytree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Binarytree(this._x, this._x0, this._x1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(2)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 2; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(2)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0]).cover(+_[1][0])\n : isNaN(this._x0) ? undefined : [[this._x0], [this._x1]];\n}\n","import Half from \"./half\";\n\nexport default function(x, radius) {\n var data,\n x0 = this._x0,\n x1,\n x2,\n x3 = this._x1,\n halves = [],\n node = this._root,\n q,\n i;\n\n if (node) halves.push(new Half(node, x0, x3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius;\n x3 = x + radius;\n }\n\n while (q = halves.pop()) {\n\n // Stop searching if this half can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (x2 = q.x1) < x0) continue;\n\n // Bisect the current half.\n if (node.length) {\n var xm = (x1 + x2) / 2;\n\n halves.push(\n new Half(node[1], xm, x2),\n new Half(node[0], x1, xm)\n );\n\n // Visit the closest half first.\n if (i = +(x >= xm)) {\n q = halves[halves.length - 1];\n halves[halves.length - 1] = halves[halves.length - 1 - i];\n halves[halves.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var d = Math.abs(x - +this._x.call(null, node.data));\n if (d < radius) {\n radius = d;\n x0 = x - d;\n x3 = x + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n x1 = this._x1,\n x,\n xm,\n right,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (!(parent = node, node = node[i = +right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 1]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1])\n && node === (parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Half from \"./half\";\n\nexport default function(callback) {\n var halves = [], q, node = this._root, child, x0, x1;\n if (node) halves.push(new Half(node, this._x0, this._x1));\n while (q = halves.pop()) {\n if (!callback(node = q.node, x0 = q.x0, x1 = q.x1) && node.length) {\n var xm = (x0 + x1) / 2;\n if (child = node[1]) halves.push(new Half(child, xm, x1));\n if (child = node[0]) halves.push(new Half(child, x0, xm));\n }\n }\n return this;\n}\n","import Half from \"./half\";\n\nexport default function(callback) {\n var halves = [], next = [], q;\n if (this._root) halves.push(new Half(this._root, this._x0, this._x1));\n while (q = halves.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, x1 = q.x1, xm = (x0 + x1) / 2;\n if (child = node[0]) halves.push(new Half(child, x0, xm));\n if (child = node[1]) halves.push(new Half(child, xm, x1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.x1);\n }\n return this;\n}\n","export default function(d) {\n var x = +this._x.call(null, d),\n y = +this._y.call(null, d),\n z = +this._z.call(null, d);\n return add(this.cover(x, y, z), x, y, z, d);\n}\n\nfunction add(tree, x, y, z, d) {\n if (isNaN(x) || isNaN(y) || isNaN(z)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n z0 = tree._z0,\n x1 = tree._x1,\n y1 = tree._y1,\n z1 = tree._z1,\n xm,\n ym,\n zm,\n xp,\n yp,\n zp,\n right,\n bottom,\n deep,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (deep = z >= (zm = (z0 + z1) / 2)) z0 = zm; else z1 = zm;\n if (parent = node, !(node = node[i = deep << 2 | bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n zp = +tree._z.call(null, node.data);\n if (x === xp && y === yp && z === zp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(8) : tree._root = new Array(8);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (deep = z >= (zm = (z0 + z1) / 2)) z0 = zm; else z1 = zm;\n } while ((i = deep << 2 | bottom << 1 | right) === (j = (zp >= zm) << 2 | (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n z,\n xz = new Array(n),\n yz = new Array(n),\n zz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n z0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity,\n z1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d)) || isNaN(z = +this._z.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n zz[i] = z;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n if (z < z0) z0 = z;\n if (z > z1) z1 = z;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1 || z0 > z1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0, z0).cover(x1, y1, z1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], zz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y, z) {\n if (isNaN(x = +x) || isNaN(y = +y) || isNaN(z = +z)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n z0 = this._z0,\n x1 = this._x1,\n y1 = this._y1,\n z1 = this._z1;\n\n // If the octree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing octant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n z1 = (z0 = Math.floor(z)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var t = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1 || z0 > z || z >= z1) {\n i = (z < z0) << 2 | (y < y0) << 1 | (x < x0);\n parent = new Array(8), parent[i] = node, node = parent, t *= 2;\n switch (i) {\n case 0: x1 = x0 + t, y1 = y0 + t, z1 = z0 + t; break;\n case 1: x0 = x1 - t, y1 = y0 + t, z1 = z0 + t; break;\n case 2: x1 = x0 + t, y0 = y1 - t, z1 = z0 + t; break;\n case 3: x0 = x1 - t, y0 = y1 - t, z1 = z0 + t; break;\n case 4: x1 = x0 + t, y1 = y0 + t, z0 = z1 - t; break;\n case 5: x0 = x1 - t, y1 = y0 + t, z0 = z1 - t; break;\n case 6: x1 = x0 + t, y0 = y1 - t, z0 = z1 - t; break;\n case 7: x0 = x1 - t, y0 = y1 - t, z0 = z1 - t; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._z0 = z0;\n this._x1 = x1;\n this._y1 = y1;\n this._z1 = z1;\n return this;\n}\n","export default function(node, x0, y0, z0, x1, y1, z1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.z0 = z0;\n this.x1 = x1;\n this.y1 = y1;\n this.z1 = z1;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","export function defaultZ(d) {\n return d[2];\n}\n\nexport default function(_) {\n return arguments.length ? (this._z = _, this) : this._z;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add\";\nimport tree_cover from \"./cover\";\nimport tree_data from \"./data\";\nimport tree_extent from \"./extent\";\nimport tree_find from \"./find\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove\";\nimport tree_root from \"./root\";\nimport tree_size from \"./size\";\nimport tree_visit from \"./visit\";\nimport tree_visitAfter from \"./visitAfter\";\nimport tree_x, {defaultX} from \"./x\";\nimport tree_y, {defaultY} from \"./y\";\nimport tree_z, {defaultZ} from \"./z\";\n\nexport default function octree(nodes, x, y, z) {\n var tree = new Octree(x == null ? defaultX : x, y == null ? defaultY : y, z == null ? defaultZ : z, NaN, NaN, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Octree(x, y, z, x0, y0, z0, x1, y1, z1) {\n this._x = x;\n this._y = y;\n this._z = z;\n this._x0 = x0;\n this._y0 = y0;\n this._z0 = z0;\n this._x1 = x1;\n this._y1 = y1;\n this._z1 = z1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = octree.prototype = Octree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Octree(this._x, this._y, this._z, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(8)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 8; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(8)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\ntreeProto.z = tree_z;\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1], +_[0][2]).cover(+_[1][0], +_[1][1], +_[1][2])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0, this._z0], [this._x1, this._y1, this._z1]];\n}\n","import Octant from \"./octant\";\n\nexport default function(x, y, z, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n z0 = this._z0,\n x1,\n y1,\n z1,\n x2,\n y2,\n z2,\n x3 = this._x1,\n y3 = this._y1,\n z3 = this._z1,\n octs = [],\n node = this._root,\n q,\n i;\n\n if (node) octs.push(new Octant(node, x0, y0, z0, x3, y3, z3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius, z0 = z - radius;\n x3 = x + radius, y3 = y + radius, z3 = z + radius;\n radius *= radius;\n }\n\n while (q = octs.pop()) {\n\n // Stop searching if this octant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (z1 = q.z0) > z3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0\n || (z2 = q.z1) < z0) continue;\n\n // Bisect the current octant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2,\n zm = (z1 + z2) / 2;\n\n octs.push(\n new Octant(node[7], xm, ym, zm, x2, y2, z2),\n new Octant(node[6], x1, ym, zm, xm, y2, z2),\n new Octant(node[5], xm, y1, zm, x2, ym, z2),\n new Octant(node[4], x1, y1, zm, xm, ym, z2),\n new Octant(node[3], xm, ym, z1, x2, y2, zm),\n new Octant(node[2], x1, ym, z1, xm, y2, zm),\n new Octant(node[1], xm, y1, z1, x2, ym, zm),\n new Octant(node[0], x1, y1, z1, xm, ym, zm)\n );\n\n // Visit the closest octant first.\n if (i = (z >= zm) << 2 | (y >= ym) << 1 | (x >= xm)) {\n q = octs[octs.length - 1];\n octs[octs.length - 1] = octs[octs.length - 1 - i];\n octs[octs.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n dz = z - +this._z.call(null, node.data),\n d2 = dx * dx + dy * dy + dz * dz;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d, z0 = z - d;\n x3 = x + d, y3 = y + d, z3 = z + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d)) || isNaN(z = +this._z.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n z0 = this._z0,\n x1 = this._x1,\n y1 = this._y1,\n z1 = this._z1,\n x,\n y,\n z,\n xm,\n ym,\n zm,\n right,\n bottom,\n deep,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (deep = z >= (zm = (z0 + z1) / 2)) z0 = zm; else z1 = zm;\n if (!(parent = node, node = node[i = deep << 2 | bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 7] || parent[(i + 2) & 7] || parent[(i + 3) & 7] || parent[(i + 4) & 7] || parent[(i + 5) & 7] || parent[(i + 6) & 7] || parent[(i + 7) & 7]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3] || parent[4] || parent[5] || parent[6] || parent[7])\n && node === (parent[7] || parent[6] || parent[5] || parent[4] || parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Octant from \"./octant\";\n\nexport default function(callback) {\n var octs = [], q, node = this._root, child, x0, y0, z0, x1, y1, z1;\n if (node) octs.push(new Octant(node, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1));\n while (q = octs.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, z0 = q.z0, x1 = q.x1, y1 = q.y1, z1 = q.z1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2, zm = (z0 + z1) / 2;\n if (child = node[7]) octs.push(new Octant(child, xm, ym, zm, x1, y1, z1));\n if (child = node[6]) octs.push(new Octant(child, x0, ym, zm, xm, y1, z1));\n if (child = node[5]) octs.push(new Octant(child, xm, y0, zm, x1, ym, z1));\n if (child = node[4]) octs.push(new Octant(child, x0, y0, zm, xm, ym, z1));\n if (child = node[3]) octs.push(new Octant(child, xm, ym, z0, x1, y1, zm));\n if (child = node[2]) octs.push(new Octant(child, x0, ym, z0, xm, y1, zm));\n if (child = node[1]) octs.push(new Octant(child, xm, y0, z0, x1, ym, zm));\n if (child = node[0]) octs.push(new Octant(child, x0, y0, z0, xm, ym, zm));\n }\n }\n return this;\n}\n","import Octant from \"./octant\";\n\nexport default function(callback) {\n var octs = [], next = [], q;\n if (this._root) octs.push(new Octant(this._root, this._x0, this._y0, this._z0, this._x1, this._y1, this._z1));\n while (q = octs.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, z0 = q.z0, x1 = q.x1, y1 = q.y1, z1 = q.z1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2, zm = (z0 + z1) / 2;\n if (child = node[0]) octs.push(new Octant(child, x0, y0, z0, xm, ym, zm));\n if (child = node[1]) octs.push(new Octant(child, xm, y0, z0, x1, ym, zm));\n if (child = node[2]) octs.push(new Octant(child, x0, ym, z0, xm, y1, zm));\n if (child = node[3]) octs.push(new Octant(child, xm, ym, z0, x1, y1, zm));\n if (child = node[4]) octs.push(new Octant(child, x0, y0, zm, xm, ym, z1));\n if (child = node[5]) octs.push(new Octant(child, xm, y0, zm, x1, ym, z1));\n if (child = node[6]) octs.push(new Octant(child, x0, ym, zm, xm, y1, z1));\n if (child = node[7]) octs.push(new Octant(child, xm, ym, zm, x1, y1, z1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.z0, q.x1, q.y1, q.z1);\n }\n return this;\n}\n","import {binarytree} from \"d3-binarytree\";\nimport {quadtree} from \"d3-quadtree\";\nimport {octree} from \"d3-octree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y, z} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n nDim,\n node,\n random,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i,\n n = nodes.length,\n tree =\n (nDim === 1 ? binarytree(nodes, x)\n :(nDim === 2 ? quadtree(nodes, x, y)\n :(nDim === 3 ? octree(nodes, x, y, z)\n :null\n ))).visitAfter(accumulate);\n\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(treeNode) {\n var strength = 0, q, c, weight = 0, x, y, z, i;\n var numChildren = treeNode.length;\n\n // For internal nodes, accumulate forces from children.\n if (numChildren) {\n for (x = y = z = i = 0; i < numChildren; ++i) {\n if ((q = treeNode[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * (q.x || 0), y += c * (q.y || 0), z += c * (q.z || 0);\n }\n }\n strength *= Math.sqrt(4 / numChildren); // scale accumulated strength according to number of dimensions\n\n treeNode.x = x / weight;\n if (nDim > 1) { treeNode.y = y / weight; }\n if (nDim > 2) { treeNode.z = z / weight; }\n }\n\n // For leaf nodes, accumulate forces from coincident nodes.\n else {\n q = treeNode;\n q.x = q.data.x;\n if (nDim > 1) { q.y = q.data.y; }\n if (nDim > 2) { q.z = q.data.z; }\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n treeNode.value = strength;\n }\n\n function apply(treeNode, x1, arg1, arg2, arg3) {\n if (!treeNode.value) return true;\n var x2 = [arg1, arg2, arg3][nDim-1];\n\n var x = treeNode.x - node.x,\n y = (nDim > 1 ? treeNode.y - node.y : 0),\n z = (nDim > 2 ? treeNode.z - node.z : 0),\n w = x2 - x1,\n l = x * x + y * y + z * z;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (nDim > 1 && y === 0) y = jiggle(random), l += y * y;\n if (nDim > 2 && z === 0) z = jiggle(random), l += z * z;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * treeNode.value * alpha / l;\n if (nDim > 1) { node.vy += y * treeNode.value * alpha / l; }\n if (nDim > 2) { node.vz += z * treeNode.value * alpha / l; }\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (treeNode.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (treeNode.data !== node || treeNode.next) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (nDim > 1 && y === 0) y = jiggle(random), l += y * y;\n if (nDim > 2 && z === 0) z = jiggle(random), l += z * z;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (treeNode.data !== node) {\n w = strengths[treeNode.data.index] * alpha / l;\n node.vx += x * w;\n if (nDim > 1) { node.vy += y * w; }\n if (nDim > 2) { node.vz += z * w; }\n } while (treeNode = treeNode.next);\n }\n\n force.initialize = function(_nodes, ...args) {\n nodes = _nodes;\n random = args.find(arg => typeof arg === 'function') || Math.random;\n nDim = args.find(arg => [1, 2, 3].includes(arg)) || 2;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n","export default function(d) {\n const x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nexport default function(radius) {\n var nodes,\n radii,\n random,\n strength = 1,\n iterations = 1;\n\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i, n = nodes.length,\n tree,\n node,\n xi,\n yi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree = quadtree(nodes, x, y).visitAfter(prepare);\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n yi = node.y + node.vy;\n tree.visit(apply);\n }\n }\n\n function apply(quad, x0, y0, x1, y1) {\n var data = quad.data, rj = quad.r, r = ri + rj;\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = yi - data.y - data.vy,\n l = x * x + y * y;\n if (l < r * r) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n node.vy += (y *= l) * r;\n data.vx -= x * (r = 1 - r);\n data.vy -= y * r;\n }\n }\n return;\n }\n return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n }\n }\n\n function prepare(quad) {\n if (quad.data) return quad.r = radii[quad.data.index];\n for (var i = quad.r = 0; i < 4; ++i) {\n if (quad[i] && quad[i].r > quad.r) {\n quad.r = quad[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n radii = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}\n","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(value);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","import {InternMap} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new InternMap(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n let i = index.get(d);\n if (i === undefined) {\n if (unknown !== implicit) return unknown;\n index.set(d, i = domain.push(d) - 1);\n }\n return range[i % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new InternMap();\n for (const value of _) {\n if (index.has(value)) continue;\n index.set(value, domain.push(value) - 1);\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import * as React from 'react';\nimport { View } from 'react-native';\nimport { NativeSafeAreaProviderProps } from './SafeArea.types';\n\n/**\n * TODO:\n * Currently insets and frame are based on the window and are not\n * relative to the provider view. This is inconsistent with iOS and Android.\n * However in most cases if the provider view covers the screen this is not\n * an issue.\n */\n\nconst CSSTransitions: Record<string, string> = {\n WebkitTransition: 'webkitTransitionEnd',\n Transition: 'transitionEnd',\n MozTransition: 'transitionend',\n MSTransition: 'msTransitionEnd',\n OTransition: 'oTransitionEnd',\n};\n\nexport default function NativeSafeAreaView({\n children,\n style,\n onInsetsChange,\n}: NativeSafeAreaProviderProps) {\n React.useEffect(() => {\n // Skip for SSR.\n if (typeof document === 'undefined') {\n return;\n }\n\n const element = createContextElement();\n document.body.appendChild(element);\n const onEnd = () => {\n const {\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n } = window.getComputedStyle(element);\n\n const insets = {\n top: paddingTop ? parseInt(paddingTop, 10) : 0,\n bottom: paddingBottom ? parseInt(paddingBottom, 10) : 0,\n left: paddingLeft ? parseInt(paddingLeft, 10) : 0,\n right: paddingRight ? parseInt(paddingRight, 10) : 0,\n };\n const frame = {\n x: 0,\n y: 0,\n width: document.documentElement.offsetWidth,\n height: document.documentElement.offsetHeight,\n };\n // @ts-ignore: missing properties\n onInsetsChange({ nativeEvent: { insets, frame } });\n };\n element.addEventListener(getSupportedTransitionEvent(), onEnd);\n onEnd();\n return () => {\n document.body.removeChild(element);\n element.removeEventListener(getSupportedTransitionEvent(), onEnd);\n };\n }, [onInsetsChange]);\n\n return <View style={style}>{children}</View>;\n}\n\nlet _supportedTransitionEvent: string | null = null;\nfunction getSupportedTransitionEvent(): string {\n if (_supportedTransitionEvent !== null) {\n return _supportedTransitionEvent;\n }\n const element = document.createElement('invalidtype');\n\n _supportedTransitionEvent = CSSTransitions.Transition;\n for (const key in CSSTransitions) {\n if (element.style[key as keyof CSSStyleDeclaration] !== undefined) {\n _supportedTransitionEvent = CSSTransitions[key];\n break;\n }\n }\n return _supportedTransitionEvent;\n}\n\ntype CssEnv = 'constant' | 'env';\n\nlet _supportedEnv: CssEnv | null = null;\nfunction getSupportedEnv(): CssEnv {\n if (_supportedEnv !== null) {\n return _supportedEnv;\n }\n const { CSS } = window;\n if (\n CSS &&\n CSS.supports &&\n CSS.supports('top: constant(safe-area-inset-top)')\n ) {\n _supportedEnv = 'constant';\n } else {\n _supportedEnv = 'env';\n }\n return _supportedEnv;\n}\n\nfunction getInset(side: string): string {\n return `${getSupportedEnv()}(safe-area-inset-${side})`;\n}\n\nfunction createContextElement(): HTMLElement {\n const element = document.createElement('div');\n const { style } = element;\n style.position = 'fixed';\n style.left = '0';\n style.top = '0';\n style.width = '0';\n style.height = '0';\n style.zIndex = '-1';\n style.overflow = 'hidden';\n style.visibility = 'hidden';\n // Bacon: Anything faster than this and the callback will be invoked too early with the wrong insets\n style.transitionDuration = '0.05s';\n style.transitionProperty = 'padding';\n style.transitionDelay = '0s';\n style.paddingTop = getInset('top');\n style.paddingBottom = getInset('bottom');\n style.paddingLeft = getInset('left');\n style.paddingRight = getInset('right');\n return element;\n}\n","import * as React from 'react';\nimport { Dimensions, StyleProp, StyleSheet, ViewStyle } from 'react-native';\nimport NativeSafeAreaProvider from './NativeSafeAreaProvider';\nimport { EdgeInsets, InsetChangedEvent, Metrics, Rect } from './SafeArea.types';\n\nexport const SafeAreaInsetsContext = React.createContext<EdgeInsets | null>(\n null,\n);\n\nexport const SafeAreaFrameContext = React.createContext<Rect | null>(null);\n\nexport interface SafeAreaViewProps {\n children?: React.ReactNode;\n initialMetrics?: Metrics | null;\n /**\n * @deprecated\n */\n initialSafeAreaInsets?: EdgeInsets | null;\n style?: StyleProp<ViewStyle>;\n}\n\nexport function SafeAreaProvider({\n children,\n initialMetrics,\n initialSafeAreaInsets,\n style,\n}: SafeAreaViewProps) {\n const parentInsets = useParentSafeAreaInsets();\n const parentFrame = useParentSafeAreaFrame();\n const [insets, setInsets] = React.useState<EdgeInsets | null>(\n initialMetrics?.insets ?? initialSafeAreaInsets ?? parentInsets ?? null,\n );\n const [frame, setFrame] = React.useState<Rect>(\n initialMetrics?.frame ??\n parentFrame ?? {\n // Backwards compat so we render anyway if we don't have frame.\n x: 0,\n y: 0,\n width: Dimensions.get('window').width,\n height: Dimensions.get('window').height,\n },\n );\n const onInsetsChange = React.useCallback(\n (event: InsetChangedEvent) => {\n const {\n nativeEvent: { frame: nextFrame, insets: nextInsets },\n } = event;\n\n if (\n // Backwards compat with old native code that won't send frame.\n nextFrame &&\n (nextFrame.height !== frame.height ||\n nextFrame.width !== frame.width ||\n nextFrame.x !== frame.x ||\n nextFrame.y !== frame.y)\n ) {\n setFrame(nextFrame);\n }\n\n if (\n !insets ||\n nextInsets.bottom !== insets.bottom ||\n nextInsets.left !== insets.left ||\n nextInsets.right !== insets.right ||\n nextInsets.top !== insets.top\n ) {\n setInsets(nextInsets);\n }\n },\n [frame, insets],\n );\n\n return (\n <NativeSafeAreaProvider\n style={[styles.fill, style]}\n onInsetsChange={onInsetsChange}\n >\n {insets != null ? (\n <SafeAreaFrameContext.Provider value={frame}>\n <SafeAreaInsetsContext.Provider value={insets}>\n {children}\n </SafeAreaInsetsContext.Provider>\n </SafeAreaFrameContext.Provider>\n ) : null}\n </NativeSafeAreaProvider>\n );\n}\n\nconst styles = StyleSheet.create({\n fill: { flex: 1 },\n});\n\nfunction useParentSafeAreaInsets(): EdgeInsets | null {\n return React.useContext(SafeAreaInsetsContext);\n}\n\nfunction useParentSafeAreaFrame(): Rect | null {\n return React.useContext(SafeAreaFrameContext);\n}\n\nexport function useSafeAreaInsets(): EdgeInsets {\n const safeArea = React.useContext(SafeAreaInsetsContext);\n if (safeArea == null) {\n throw new Error(\n 'No safe area insets value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.',\n );\n }\n return safeArea;\n}\n\nexport function useSafeAreaFrame(): Rect {\n const frame = React.useContext(SafeAreaFrameContext);\n if (frame == null) {\n throw new Error(\n 'No safe area frame value available. Make sure you are rendering `<SafeAreaProvider>` at the top of your app.',\n );\n }\n return frame;\n}\n\nexport function withSafeAreaInsets<T>(\n WrappedComponent: React.ComponentType<T>,\n) {\n return React.forwardRef((props: T, ref: React.Ref<T>) => (\n <SafeAreaConsumer>\n {(insets) => <WrappedComponent {...props} insets={insets} ref={ref} />}\n </SafeAreaConsumer>\n ));\n}\n\n/**\n * @deprecated\n */\nexport function useSafeArea(): EdgeInsets {\n return useSafeAreaInsets();\n}\n\n/**\n * @deprecated\n */\nexport const SafeAreaConsumer = SafeAreaInsetsContext.Consumer;\n\n/**\n * @deprecated\n */\nexport const SafeAreaContext = SafeAreaInsetsContext;\n","import colors from \"../colors.js\";\n\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");\n","export default function(specifier) {\n var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;\n while (i < n) colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n return colors;\n}\n"],"sourceRoot":""}
\ No newline at end of file diff --git a/web-build/static/js/app.767fd55b.chunk.js b/web-build/static/js/app.767fd55b.chunk.js new file mode 100644 index 0000000..69191f0 --- /dev/null +++ b/web-build/static/js/app.767fd55b.chunk.js @@ -0,0 +1,2 @@ +(this.webpackJsonp=this.webpackJsonp||[]).push([[0],{220:function(e){e.exports=JSON.parse('{"common":{"ok":"OK!","cancel":"Cancel","back":"Back"},"errors":{"invalidEmail":"Invalid email address."},"welcomeScreen":{"poweredBy":"POWERED BY IGNITE","readyForLaunch":"Ready for launch.","continue":"CONTINUE"},"demoScreen":{"howTo":"HOW TO","title":"What\u2019s In This Stack?","tagLine":"Congratulations, you\u2019ve got a very advanced React Native app template here. Take advantage of this boilerplate!","reactotron":"Demo Reactotron","demoList":"Demo List","androidReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running, run adb reverse tcp:9090 tcp:9090 from your terminal, and reload the app.","iosReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","macosReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","webReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app.","windowsReactotronHint":"If this doesn\'t work, ensure the Reactotron desktop app is running and reload app."},"demoListScreen":{"title":"Demo List"},"storybook":{"placeholder":"Placeholder","field":"Field"}}')},221:function(e){e.exports=JSON.parse('{"common":{"ok":"OK \ud83c\uddef\ud83c\uddf5","cancel":"Cancel \ud83c\uddef\ud83c\uddf5","back":"Back \ud83c\uddef\ud83c\uddf5"}}')},262:function(e,t,r){"use strict";var n={};r.r(n),r.d(n,"loadString",(function(){return O})),r.d(n,"saveString",(function(){return v})),r.d(n,"load",(function(){return k})),r.d(n,"save",(function(){return E})),r.d(n,"remove",(function(){return w})),r.d(n,"clear",(function(){return x}));var a=r(9),o=r.n(a),i=r(7),c=r.n(i),l=r(264),s=r(97),u=r.n(s),d=r(220),p=r(221);function f(e,t){return e?u.a.t(e,t):null}u.a.fallbacks=!0,u.a.translations={en:d,ja:p},u.a.locale=l.a||"en",r(179).a.ignoreLogs(["Require cycle:"]);var g=r(0),m=r.n(g),h=r(471),b=r(465),y=r(65);function O(e){return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.awrap(y.a.getItem(e));case 3:return t.abrupt("return",t.sent);case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",null);case 9:case"end":return t.stop()}}),null,null,[[0,6]],Promise)}function v(e,t){return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.a.awrap(y.a.setItem(e,t));case 3:return r.abrupt("return",!0);case 6:return r.prev=6,r.t0=r.catch(0),r.abrupt("return",!1);case 9:case"end":return r.stop()}}),null,null,[[0,6]],Promise)}function k(e){var t;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.a.awrap(y.a.getItem(e));case 3:return t=r.sent,r.abrupt("return",JSON.parse(t));case 7:return r.prev=7,r.t0=r.catch(0),r.abrupt("return",null);case 10:case"end":return r.stop()}}),null,null,[[0,7]],Promise)}function E(e,t){return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.a.awrap(y.a.setItem(e,JSON.stringify(t)));case 3:return r.abrupt("return",!0);case 6:return r.prev=6,r.t0=r.catch(0),r.abrupt("return",!1);case 9:case"end":return r.stop()}}),null,null,[[0,6]],Promise)}function w(e){return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,c.a.awrap(y.a.removeItem(e));case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),null,null,[[0,5]],Promise)}function x(){return c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,c.a.awrap(y.a.clear());case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),null,null,[[0,5]],Promise)}var S=r(466),j=r(6),A=r.n(j),C=r(2),P=r(122),R=r(29),I=r(56),D=r(19),B=r.n(D),z=r(17),L=r.n(z),T=r(54),N={black:"#1d1d1d",white:"#ffffff",offWhite:"#e6e6e6",orange:"#FBA928",orangeDarker:"#EB9918",lightGrey:"#939AA4",lighterGrey:"#CDD4DA",angry:"#dd3333",deepPurple:"#5D2555"},V={palette:N,transparent:"rgba(0, 0, 0, 0)",background:N.white,primary:N.orange,primaryDarker:N.orangeDarker,line:N.offWhite,text:N.white,dim:N.lightGrey,error:N.angry,storybookDarkBg:N.black,storybookTextColor:N.black},W=[0,4,8,12,16,24,32,48,64],H=r(8),F={primary:H.a.select({ios:"Helvetica",android:"normal"}),secondary:H.a.select({ios:"Arial",android:"sans-serif"}),code:H.a.select({ios:"Courier",android:"monospace"})};function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){A()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var G={fontFamily:F.primary,color:V.text,fontSize:15},K={default:G,bold:M(M({},G),{},{fontWeight:"bold"}),header:M(M({},G),{},{fontSize:24,fontWeight:"bold"}),fieldLabel:M(M({},G),{},{fontSize:13,color:V.dim}),secondary:M(M({},G),{},{fontSize:9,color:V.dim})},Q=["preset","tx","txOptions","text","children","style"];function Y(e){var t=e.preset,r=void 0===t?"default":t,n=e.tx,a=e.txOptions,o=e.text,i=e.children,c=e.style,l=L()(e,Q),s=n&&f(n,a)||o||i,u=[K[r]||K.default,c];return g.createElement(T.a,B()({},l,{style:u}),s)}var J=r(37);function X(e){var t=Object(g.useState)({width:0,height:0}),r=o()(t,2),n=r[0],a=r[1];return Object(g.useLayoutEffect)((function(){var t;if(null!=(t=e.source)&&t.uri)J.a.getSize(e.source.uri,(function(e,t){a({width:e,height:t})}));else if("web"===H.a.OS)J.a.getSize(e.source,(function(e,t){a({width:e,height:t})}));else{var r=J.a.resolveAssetSource(e.source),n=r.width,o=r.height;a({width:n,height:o})}}),[]),m.a.createElement(J.a,B()({},e,{style:[n,e.style]}))}var Z={back:r(302),bullet:r(303)},_={resizeMode:"contain"};function q(e){var t=e.style,r=e.icon,n=e.containerStyle;return g.createElement(C.a,{style:n},g.createElement(X,{style:[_,t],source:Z[r]}))}var $={flexDirection:"row",marginTop:W[4],paddingBottom:W[4],borderBottomWidth:1,borderBottomColor:"#3A3048"},ee={marginRight:W[4]-1,marginTop:W[2]},te={width:8,height:8},re={flex:1,fontFamily:F.primary,color:"#BAB6C8",fontSize:15,lineHeight:22};function ne(e){return g.createElement(C.a,{style:$},g.createElement(q,{icon:"bullet",containerStyle:ee,style:te}),g.createElement(Y,{style:re,text:e.text}))}var ae=r(45);function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(r),!0).forEach((function(t){A()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ce={paddingVertical:W[2],paddingHorizontal:W[2],borderRadius:4,justifyContent:"center",alignItems:"center"},le={paddingHorizontal:W[3]},se={primary:ie(ie({},ce),{},{backgroundColor:V.palette.orange}),link:ie(ie({},ce),{},{paddingHorizontal:0,paddingVertical:0,alignItems:"flex-start"})},ue={primary:ie(ie({},le),{},{fontSize:9,color:V.palette.white}),link:ie(ie({},le),{},{color:V.text,paddingHorizontal:0,paddingVertical:0})},de=["preset","tx","text","style","textStyle","children"];function pe(e){var t=e.preset,r=void 0===t?"primary":t,n=e.tx,a=e.text,o=e.style,i=e.textStyle,c=e.children,l=L()(e,de),s=[se[r]||se.primary,o],u=[ue[r]||ue.primary,i],d=c||g.createElement(Y,{tx:n,text:a,style:u});return g.createElement(ae.a,B()({style:s},l),d)}function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(r),!0).forEach((function(t){A()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var me={width:16,height:16};ge(ge({},me),{},{marginTop:2,justifyContent:"center",alignItems:"center",borderWidth:1,borderColor:V.primaryDarker,borderRadius:1});function he(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?he(Object(r),!0).forEach((function(t){A()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye={borderWidth:1,borderColor:V.line,padding:W[2]};be(be({},ye),{},{borderTopLeftRadius:8,borderTopRightRadius:8,borderBottomWidth:0}),be(be({},ye),{},{borderBottomWidth:0}),be(be({},ye),{},{borderBottomLeftRadius:8,borderBottomRightRadius:8}),be(be({},ye),{},{borderRadius:8}),be({},ye),be(be({},ye),{},{borderColor:V.transparent});var Oe={flexDirection:"row",paddingHorizontal:W[4],alignItems:"center",paddingTop:W[5],paddingBottom:W[5],justifyContent:"flex-start"},ve={textAlign:"center"},ke={flex:1,justifyContent:"center"},Ee={width:32},we={width:32};function xe(e){var t=e.onLeftPress,r=e.onRightPress,n=e.rightIcon,a=e.leftIcon,o=e.headerText,i=e.headerTx,c=e.style,l=e.titleStyle,s=o||i&&f(i)||"";return m.a.createElement(C.a,{style:[Oe,c]},a?m.a.createElement(pe,{preset:"link",onPress:t},m.a.createElement(q,{icon:a})):m.a.createElement(C.a,{style:Ee}),m.a.createElement(C.a,{style:ke},m.a.createElement(Y,{style:[ve,l],text:s})),n?m.a.createElement(pe,{preset:"link",onPress:r},m.a.createElement(q,{icon:n})):m.a.createElement(C.a,{style:we}))}var Se=r(101),je=r(49),Ae=r(77),Ce={none:0},Pe={fixed:{outer:{backgroundColor:V.background,flex:1,height:"100%"},inner:{justifyContent:"flex-start",alignItems:"stretch",height:"100%",width:"100%"}},scroll:{outer:{backgroundColor:V.background,flex:1,height:"100%"},inner:{justifyContent:"flex-start",alignItems:"stretch"}}};var Re="ios"===H.a.OS;function Ie(e){var t=Object(h.c)(),r=Pe.fixed,n=e.style||{},a=e.backgroundColor?{backgroundColor:e.backgroundColor}:{},o={paddingTop:e.unsafe?0:t.top};return g.createElement(Se.a,{style:[r.outer,a],behavior:Re?"padding":void 0,keyboardVerticalOffset:Ce[e.keyboardOffset||"none"]},g.createElement(Ae.a,{barStyle:e.statusBar||"light-content"}),g.createElement(C.a,{style:[r.inner,n,o]},e.children))}function De(e){var t=Object(h.c)(),r=Pe.scroll,n=e.style||{},a=e.backgroundColor?{backgroundColor:e.backgroundColor}:{},o={paddingTop:e.unsafe?0:t.top};return g.createElement(Se.a,{style:[r.outer,a],behavior:Re?"padding":void 0,keyboardVerticalOffset:Ce[e.keyboardOffset||"none"]},g.createElement(Ae.a,{barStyle:e.statusBar||"light-content"}),g.createElement(C.a,{style:[r.outer,a,o]},g.createElement(je.a,{style:[r.outer,a],contentContainerStyle:[r.inner,n],keyboardShouldPersistTaps:e.keyboardShouldPersistTaps||"handled"},e.children)))}function Be(e){return(t=e.preset)&&Pe[t]&&"fixed"!==t?g.createElement(De,e):g.createElement(Ie,e);var t}r(12),r(14),r(118),V.palette.offWhite;r(57),V.palette.white;function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Le(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(r),!0).forEach((function(t){A()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ze(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Te={stretch:Le(Le({},{position:"absolute",top:0,left:0,bottom:0,right:0}),{},{resizeMode:"stretch",width:null,height:null})},Ne=r(308);function Ve(e){var t=e.preset,r=void 0===t?"stretch":t,n=e.style,a=e.backgroundImage,o=[Te[r]||Te.stretch,n],i=a||Ne;return m.a.createElement(X,{source:i,style:o})}var We=r(261),He=r(169),Fe=r(469),Ue={justifyContent:"center"},Me=Object(I.a)((function(e){var t=e.style,r=e.physics,n=e.gData,a=(e.nodeIds,Object(We.a)([Ue,t]),Object(g.useRef)());Object(g.useEffect)((function(){var e=a.current;e.d3Force("link").strength(r.linkStrength),e.d3Force("link").iterations(r.linkIts),r.collision?e.d3Force("collide",Fe.a().radius(20)):e.d3Force("collide",null),e.d3Force("charge").strength(r.charge)}));Object(g.useMemo)((function(){var e=Object.fromEntries(n.nodes.map((function(e){return[e.id,e]})));return n.nodes.forEach((function(e){e.collapsed=0!==e.id,e.childLinks=[],e.parentLink=[]})),n.links.forEach((function(t){return e[t.source].childLinks.push(t)})),e}),[n]);return g.createElement(C.a,null,r.threedim?g.createElement(He.b,{ref:a,graphData:n,nodeAutoColorBy:"group",linkColor:"#ffffff",linkWidth:2,linkDirectionalParticles:r.particles,nodeLabel:function(e){return e.title},linkWidth:r.linkWidth,linkOpacity:r.linkOpacity,nodeRelSize:r.nodeRel,linkDirectionalParticleWidth:r.particleWidth,backgroundColor:"#1d1d1d"}):g.createElement(He.a,{ref:a,graphData:n,nodeAutoColorBy:"id",linkAutoColorBy:"target",linkColor:"#ffffff",linkDirectionalParticles:r.particles,nodeLabel:function(e){return e.title},linkWidth:r.linkWidth,linkOpacity:r.linkOpacity,nodeRelSize:r.nodeRel,linkDirectionalParticleWidth:r.particleWidth}))})),Ge=r(91),Ke=r(5),Qe=r(69),Ye=r.n(Qe),Je=r(266),Xe=r(170),Ze=r(171);function _e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach((function(t){A()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $e=Object(I.a)((function(e){e.style;var t=e.physics,r=e.setPhysics,n=[{title:"Physics",content:g.createElement(C.a,null,g.createElement(Y,{preset:"fieldLabel",text:"Repulsive force: "+t.charge}),g.createElement(Ye.a,{style:{height:40,width:"90%"},minimumValue:-400,maximumValue:100,onValueChange:function(e){r(qe(qe({},t),{},{charge:e}))},value:t.charge,step:1}),g.createElement(Y,{preset:"fieldLabel",text:"Link Force: "+t.linkStrength}),g.createElement(Ye.a,{style:{height:40,width:"90%"},minimumValue:-2,maximumValue:2,onValueChange:function(e){r(qe(qe({},t),{},{linkStrength:e}))},value:t.linkStrength,step:.1}),g.createElement(Y,{preset:"fieldLabel",text:"'Link Iterations': "+t.linkIts}),g.createElement(Ye.a,{style:{height:40,width:"90%"},minimumValue:1,maximumValue:10,onValueChange:function(e){r(qe(qe({},t),{},{linkIts:e}))},value:t.linkIts,step:1}),g.createElement(Y,{preset:"fieldLabel",text:"Collision"}),g.createElement(Ge.a,{style:{width:"5",height:20,marginVertical:10},value:t.collision,onValueChange:function(){r(qe(qe({},t),{},{collision:!t.collision}))}}))},{title:"Visual",content:g.createElement(C.a,null,g.createElement(Y,{preset:"fieldLabel",text:"Line Opacity: "+t.linkOpacity}),g.createElement(Ye.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:1,onValueChange:function(e){r(qe(qe({},t),{},{linkOpacity:e}))},value:t.linkOpacity,step:.01}),g.createElement(Y,{preset:"fieldLabel",text:"Line width: "+t.linkWidth}),g.createElement(Ye.a,{style:{height:40,width:"90%"},minimumValue:.1,maximumValue:10,onValueChange:function(e){r(qe(qe({},t),{},{linkWidth:e}))},value:t.linkWidth,step:.1}),g.createElement(Y,{preset:"fieldLabel",text:"Node size: "+t.nodeRel}),g.createElement(Ye.a,{style:{height:40,width:"90%"},minimumValue:1,maximumValue:10,onValueChange:function(e){r(qe(qe({},t),{},{nodeRel:e}))},value:t.nodeRel,step:.01}),g.createElement(Y,{preset:"fieldLabel",text:"Particles: "+t.particles}),g.createElement(Ye.a,{style:{height:40,width:"90%"},minimumValue:0,maximumValue:10,onValueChange:function(e){r(qe(qe({},t),{},{particles:e}))},value:t.particles,step:1}),g.createElement(Y,{preset:"fieldLabel",text:"Particle Size: "+t.particleWidth}),g.createElement(Ye.a,{style:{height:40,width:"90%"},minimumValue:1,maximumValue:10,onValueChange:function(e){r(qe(qe({},t),{},{particleWidth:e}))},value:t.particleWidth,step:.1}))},{title:"Modes",content:g.createElement(C.a,null,g.createElement(Y,{preset:"fieldLabel",text:"Expandable Graph"}),g.createElement(Ge.a,{style:{width:"5",height:20,marginVertical:10},value:t.collapse,onValueChange:function(){r(qe(qe({},t),{},{collapse:!t.collapse}))}}),g.createElement(Y,{preset:"fieldLabel",text:"3D"}),g.createElement(Ge.a,{style:{width:"5",height:20,marginVertical:10},value:t.threedim,onValueChange:function(){r(qe(qe({},t),{},{threedim:!t.threedim}))}}))}],a=Object(g.useState)([]),i=o()(a,2),c=i[0],l=i[1],s=Object(g.useState)(!0),u=o()(s,2),d=u[0],p=u[1];return d?g.createElement(C.a,{style:et.container},g.createElement(C.a,{style:{height:30,width:"100%",backgroundColor:"rgb(20,20,20)"}},g.createElement(ae.a,{style:{width:30,color:"#ffffff",textAlign:"center",marginLeft:"auto",padding:5},onPress:function(){p(!1)}},g.createElement(Ze.a,{name:"close-circle",color:"#ffffff",size:20}))),g.createElement(je.a,null,g.createElement(Je.a,{activeSections:c,sections:n,touchAbleComponent:ae.a,expandMultiple:!0,renderHeader:function(e,t,r){return g.createElement(Xe.a,{duration:400,style:[et.header,r?et.active:et.inactive],transition:"backgroundColor"},g.createElement(Y,{style:et.headerText},e.title))},renderContent:function(e,t,r){return g.createElement(Xe.a,{duration:400,style:[et.content,r?et.active:et.inactive],transition:"backgroundColor"},e.content)},duration:200,onChange:function(e){l(e.includes(void 0)?[]:e)},renderAsFlatList:!1}))):g.createElement(ae.a,{onPress:function(){p(!0)},style:{position:"absolute",top:50,left:50,width:30,color:"#ffffff",zIndex:100}},g.createElement(Ze.a,{name:"cog",color:"#ffffff",size:30}))})),et=Ke.a.create({container:{flex:1,backgroundColor:"rgb(20,20,20)",position:"absolute",zIndex:100,left:50,top:50,width:250,borderRadius:5,borderStyle:"solid",maxHeight:"70%",paddingBottom:20},title:{textAlign:"left",fontSize:22,fontWeight:"300",marginBottom:20,paddingLeft:20},header:{backgroundColor:"#111111",padding:10,paddingBottom:20,textAlign:"left"},headerText:{textAlign:"left",paddingLeft:30,fontSize:16,fontWeight:"500"},content:{padding:20,paddingLeft:60,backgroundColor:"#000000"},active:{backgroundColor:"rgba(0,0,0,1)"},inactive:{backgroundColor:"rgba(20,20,20,1)"},selectors:{marginBottom:10,flexDirection:"row",justifyContent:"center"},selector:{backgroundColor:"#111111",padding:10},activeSelector:{fontWeight:"bold"},selectTitle:{fontSize:14,fontWeight:"500",padding:10},multipleToggle:{flexDirection:"row",justifyContent:"center",marginVertical:30,alignItems:"center"},multipleToggle__title:{fontSize:16,marginRight:8}});function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(r),!0).forEach((function(t){A()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var nt=r(368),at={flex:1},ot={backgroundColor:V.transparent,paddingHorizontal:W[4]},it={color:V.palette.white,fontFamily:F.primary},ct={fontWeight:"bold"},lt={paddingTop:W[3],paddingBottom:W[4]+W[1],paddingHorizontal:0},st=rt(rt(rt({},it),ct),{},{fontSize:12,lineHeight:15,textAlign:"center",letterSpacing:1.5}),ut=rt(rt({},it),{},{textAlign:"center"}),dt=rt(rt(rt({},it),ct),{},{fontSize:28,lineHeight:38,textAlign:"center"}),pt=rt(rt(rt({},it),ct),{},{fontSize:26,fontStyle:"italic"}),ft={alignSelf:"center",marginVertical:W[5],maxWidth:"100%",width:343,height:230},gt=rt(rt({},it),{},{color:"#BAB6C8",fontSize:15,lineHeight:22,marginBottom:W[5]}),mt={paddingVertical:W[4],paddingHorizontal:W[4],backgroundColor:V.palette.deepPurple},ht=rt(rt(rt({},it),ct),{},{fontSize:13,letterSpacing:2}),bt={backgroundColor:"#20162D"},yt={paddingVertical:W[4],paddingHorizontal:W[4]},Ot=(Object(I.a)((function(){var e=Object(R.useNavigation)();return m.a.createElement(C.a,{testID:"WelcomeScreen",style:at},m.a.createElement(Ve,null),m.a.createElement(Be,{style:ot,preset:"scroll",backgroundColor:V.transparent},m.a.createElement(xe,{headerTx:"welcomeScreen.poweredBy",style:lt,titleStyle:st}),m.a.createElement(Y,{style:ut},m.a.createElement(Y,{style:dt,text:"Your new app, "}),m.a.createElement(Y,{style:pt,text:"almost"}),m.a.createElement(Y,{style:dt,text:"!"})),m.a.createElement(Y,{style:dt,preset:"header",tx:"welcomeScreen.readyForLaunch"}),m.a.createElement(X,{source:nt,style:ft}),m.a.createElement(Y,{style:gt},"This probably isn't what your app is going to look like. Unless your designer handed you this screen and, in that case, congrats! You're ready to ship."),m.a.createElement(Y,{style:gt},"For everyone else, this is where you'll see a live preview of your fully functioning app using Ignite.")),m.a.createElement(P.a,{style:bt},m.a.createElement(C.a,{style:yt},m.a.createElement(pe,{testID:"next-screen-button",style:mt,textStyle:ht,tx:"welcomeScreen.continue",onPress:function(){return e.navigate("demo")}}))))})),r(20)),vt=r.n(Ot),kt=r(23),Et=r.n(kt),wt=r(259);function xt(e){switch(e.problem){case"CONNECTION_ERROR":case"NETWORK_ERROR":return{kind:"cannot-connect",temporary:!0};case"TIMEOUT_ERROR":return{kind:"timeout",temporary:!0};case"SERVER_ERROR":return{kind:"server"};case"UNKNOWN_ERROR":return{kind:"unknown",temporary:!0};case"CLIENT_ERROR":switch(e.status){case 401:return{kind:"unauthorized"};case 403:return{kind:"forbidden"};case 404:return{kind:"not-found"};default:return{kind:"rejected"}}case"CANCEL_ERROR":return null}return null}var St={url:"http://example.com",timeout:1e4},jt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:St;vt()(this,e),this.config=t}return Et()(e,[{key:"setup",value:function(){this.apisauce=Object(wt.create)({baseURL:this.config.url,timeout:this.config.timeout,headers:{Accept:"application/json"}})}},{key:"getUsers",value:function(){var e,t,r,n,a;return c.a.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,c.a.awrap(this.apisauce.get("/users"));case 2:if((e=o.sent).ok){o.next=7;break}if(!(t=xt(e))){o.next=7;break}return o.abrupt("return",t);case 7:return r=function(e){return{id:e.id,name:e.name}},o.prev=8,n=e.data,a=n.map(r),o.abrupt("return",{kind:"ok",users:a});case 14:return o.prev=14,o.t0=o.catch(8),o.abrupt("return",{kind:"bad-data"});case 17:case"end":return o.stop()}}),null,this,[[8,14]],Promise)}},{key:"getUser",value:function(e){var t,r,n;return c.a.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,c.a.awrap(this.apisauce.get("/users/"+e));case 2:if((t=a.sent).ok){a.next=7;break}if(!(r=xt(t))){a.next=7;break}return a.abrupt("return",r);case 7:return a.prev=7,n={id:t.data.id,name:t.data.name},a.abrupt("return",{kind:"ok",user:n});case 12:return a.prev=12,a.t0=a.catch(7),a.abrupt("return",{kind:"bad-data"});case 15:case"end":return a.stop()}}),null,this,[[7,12]],Promise)}}]),e}();function At(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?At(Object(r),!0).forEach((function(t){A()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pt=r(435),Rt=r(436),It={flex:1},Dt={backgroundColor:V.transparent,paddingHorizontal:W[4]},Bt={paddingVertical:W[4],paddingHorizontal:W[4],backgroundColor:V.palette.deepPurple},zt={fontWeight:"bold"},Lt=Ct(Ct({},zt),{},{fontSize:13,letterSpacing:2}),Tt={paddingTop:W[3],paddingBottom:W[5]-1,paddingHorizontal:0},Nt=Ct(Ct({},zt),{},{fontSize:12,lineHeight:15,textAlign:"center",letterSpacing:1.5}),Vt=Ct(Ct({},zt),{},{fontSize:28,lineHeight:38,textAlign:"center",marginBottom:W[5]}),Wt={color:"#BAB6C8",fontSize:15,lineHeight:22,marginBottom:W[4]+W[1]},Ht={marginVertical:W[6],alignSelf:"center",width:180,height:100},Ft={flexDirection:"row",alignItems:"center",alignSelf:"center"},Ut={color:"#BAB6C8",fontSize:15,lineHeight:22},Mt={marginHorizontal:W[2],width:10,height:10,resizeMode:"contain"},Gt={color:"#BAB6C8",fontSize:12,lineHeight:15,marginVertical:W[2]},Kt=H.a.select({ios:"Cmd + D",android:"Cmd/Ctrl + M"}),Qt=(Object(I.a)((function(){var e=Object(R.useNavigation)(),t=m.a.useMemo((function(){return function(){var e;return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return console.tron.log("Your Friendly tron log message"),console.tron.logImportant("I am important"),console.tron.display({name:"DISPLAY",value:{numbers:1,strings:"strings",booleans:!0,arrays:[1,2,3],objects:{deeper:{deeper:{yay:"\ud83d\udc7e"}}},functionNames:function(){}},preview:"More control with display()",important:!0,image:{uri:"https://avatars2.githubusercontent.com/u/3902527?s=200&u=a0d16b13ed719f35d95ca0f4440f5d07c32c349a&v=4"}}),(e=new jt).setup(),e.getUser("1"),t.next=8,c.a.awrap(E("Cool Name","Boaty McBoatface"));case 8:case"end":return t.stop()}}),null,null,null,Promise)}}),[]);return m.a.createElement(C.a,{testID:"DemoScreen",style:It},m.a.createElement(Ve,null),m.a.createElement(Be,{style:Dt,preset:"scroll",backgroundColor:V.transparent},m.a.createElement(xe,{headerTx:"demoScreen.howTo",leftIcon:"back",onLeftPress:function(){return e.goBack()},style:Tt,titleStyle:Nt}),m.a.createElement(Y,{style:Vt,preset:"header",tx:"demoScreen.title"}),m.a.createElement(Y,{style:Wt,tx:"demoScreen.tagLine"}),m.a.createElement(ne,{text:"Integrated here, Navigation with State, TypeScript, Storybook, Solidarity, and i18n."}),m.a.createElement(ne,{text:"To run Storybook, press "+Kt+' or shake the device to show the developer menu, then select "Toggle Storybook"'}),m.a.createElement(ne,{text:"Load up Reactotron! You can inspect your app, view the events, interact, and so much more!"}),m.a.createElement(C.a,null,m.a.createElement(pe,{style:Bt,textStyle:Lt,tx:"demoScreen.reactotron",onPress:t}),m.a.createElement(Y,{style:Gt,tx:"demoScreen."+H.a.OS+"ReactotronHint"})),m.a.createElement(pe,{style:Bt,textStyle:Lt,tx:"demoScreen.demoList",onPress:function(){return e.navigate("demoList")}}),m.a.createElement(X,{source:Pt,style:Ht}),m.a.createElement(C.a,{style:Ft},m.a.createElement(Y,{style:Ut,text:"Made with"}),m.a.createElement(X,{source:Rt,style:Mt}),m.a.createElement(Y,{style:Ut,text:"by Infinite Red"}))))})),r(22)),Yt=r.n(Qt),Jt=r(71),Xt=r(30),Zt=Xt.d.model("Character").props({id:Xt.d.identifierNumber,name:Xt.d.maybe(Xt.d.string),status:Xt.d.maybe(Xt.d.string),image:Xt.d.maybe(Xt.d.string)}),_t=function(){function e(t){vt()(this,e),this.api=t}return Et()(e,[{key:"getCharacters",value:function(){var e,t,r;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(this.api.apisauce.get("https://raw.githubusercontent.com/infinitered/ignite/master/data/rick-and-morty.json",{amount:50}));case 3:if((e=n.sent).ok){n.next=8;break}if(!(t=xt(e))){n.next=8;break}return n.abrupt("return",t);case 8:return r=e.data.results,n.abrupt("return",{kind:"ok",characters:r});case 12:return n.prev=12,n.t0=n.catch(0),n.abrupt("return",{kind:"bad-data"});case 16:case"end":return n.stop()}}),null,this,[[0,12]],Promise)}}]),e}(),qt=Xt.d.model("CharacterStore").props({characters:Xt.d.optional(Xt.d.array(Zt),[])}).extend((function(e){return{views:{get environment(){return Object(Xt.a)(e)}}}})).actions((function(e){return{saveCharacters:function(t){e.characters.replace(t)}}})).actions((function(e){return{getCharacters:function(){var t,r;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t=new _t(e.environment.api),n.next=3,c.a.awrap(t.getCharacters());case 3:"ok"===(r=n.sent).kind&&e.saveCharacters(r.characters);case 5:case"end":return n.stop()}}),null,null,null,Promise)}}})),$t=Xt.d.model("RootStore").props({characterStore:Xt.d.optional(qt,{})}),er=Object(g.createContext)({}),tr=er.Provider,rr=function(){function e(){vt()(this,e),this.api=new jt}return Et()(e,[{key:"setup",value:function(){return c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:e.next=3;break;case 3:return e.next=5,c.a.awrap(this.api.setup());case 5:case"end":return e.stop()}}),null,this,null,Promise)}}]),e}();function nr(){var e;return c.a.async((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new rr,t.next=3,c.a.awrap(e.setup());case 3:return t.abrupt("return",e);case 4:case"end":return t.stop()}}),null,null,null,Promise)}function ar(){var e,t,r;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,c.a.awrap(nr());case 2:return r=n.sent,n.prev=3,n.next=6,c.a.awrap(k("root"));case 6:if(n.t0=n.sent,n.t0){n.next=9;break}n.t0={};case 9:t=n.t0,e=$t.create(t,r),n.next=17;break;case 13:n.prev=13,n.t1=n.catch(3),e=$t.create({},r);case 17:return Object(Xt.c)(e,(function(e){return E("root",e)})),n.abrupt("return",e);case 20:case"end":return n.stop()}}),null,null,[[3,13]],Promise)}var or={flex:1},ir={backgroundColor:V.transparent},cr={paddingBottom:W[5]-1,paddingHorizontal:W[4],paddingTop:W[3]},lr={fontSize:12,fontWeight:"bold",letterSpacing:1.5,lineHeight:15,textAlign:"center"},sr={alignItems:"center",flexDirection:"row",padding:10},ur={borderRadius:35,height:65,width:65},dr={marginLeft:10},pr={paddingHorizontal:W[4]},fr=(Object(I.a)((function(){var e=Object(R.useNavigation)(),t=Object(g.useContext)(er).characterStore,r=t.characters;return Object(g.useEffect)((function(){c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.a.awrap(t.getCharacters());case 2:case"end":return e.stop()}}),null,null,null,Promise)}),[]),m.a.createElement(C.a,{testID:"DemoListScreen",style:or},m.a.createElement(Ve,null),m.a.createElement(Be,{style:ir,preset:"fixed",backgroundColor:V.transparent},m.a.createElement(xe,{headerTx:"demoListScreen.title",leftIcon:"back",onLeftPress:function(){return e.goBack()},style:cr,titleStyle:lr}),m.a.createElement(Jt.a,{contentContainerStyle:pr,data:Yt()(r),keyExtractor:function(e){return String(e.id)},renderItem:function(e){var t=e.item;return m.a.createElement(C.a,{style:sr},m.a.createElement(X,{source:{uri:t.image},style:ur}),m.a.createElement(Y,{style:dr},t.name," (",t.status,")"))}})))})),r(162)),gr=r.n(fr),mr={backgroundColor:V.palette.black,flex:1},hr=Object(I.a)((function(){var e=Object(g.useState)({}),t=o()(e,2),r=t[0],n=t[1],a=Object(g.useState)(),i=o()(a,2),l=i[0],s=i[1],u=Object(g.useState)([]),d=o()(u,2),p=d[0],f=d[1],h={charge:-30,collision:!1,linkStrength:1,linkIts:1,collapse:!1,threedim:!1,particles:2,linkOpacity:1,linkWidth:1,particleWidth:1,nodeRel:1},b=function(){var e,t;return c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,c.a.awrap(y.a.getItem("@physics"));case 3:if(null===(e=r.sent)){r.next=14;break}if(t=JSON.parse(e),Object.keys(t).length!==Object.keys(h).length){r.next=10;break}return r.abrupt("return",t);case 10:return r.abrupt("return",h);case 11:r.next=15;break;case 14:return r.abrupt("return",h);case 15:r.next=20;break;case 17:r.prev=17,r.t0=r.catch(0),console.log(r.t0);case 20:case"end":return r.stop()}}),null,null,[[0,17]],Promise)};Object(g.useEffect)((function(){e&&clearTimeout(e);var e=setTimeout((function(){!function(e){var t;c.a.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,t=JSON.stringify(e),r.next=4,c.a.awrap(y.a.mergeItem("@physics",t));case 4:console.log("Writing "+t),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(0),console.log(r.t0);case 10:case"end":return r.stop()}}),null,null,[[0,7]],Promise)}(r);var e=b();console.log(e)}),1e3);return function(){return clearTimeout(e)}}),[r]);return Object(g.useEffect)((function(){b().then((function(e){return n(e)})),gr.a.get("http://localhost:35901/graph").then((function(e){var t=function(e){var t=[];return e.nodes.forEach((function(e){return t.push(e.id)})),f(t),t}(e.data);f(t),console.log(p);var r=function(e,t){var r=[];return e.links.forEach((function(e,n){for(n=0;n<=t.length;n++)if(e.target===t[n]){r.push(e);break}})),console.log(r),e.links=r,e}(e.data,t);console.log(r),s(r)})).catch((function(e){console.log(e),console.log("Couldn't get data.")}))}),[]),l?m.a.createElement(Be,{style:mr,preset:"scroll"},m.a.createElement($e,{physics:r,setPhysics:n}),m.a.createElement(Me,{physics:r,gData:l,nodeIds:p})):null})),br=Object(S.a)();function yr(){return m.a.createElement(br.Navigator,{screenOptions:{cardStyle:{backgroundColor:"transparent"},headerShown:!1}},m.a.createElement(br.Screen,{name:"graph",component:hr}))}var Or=["welcome"],vr=function(e){return Or.includes(e)},kr=r(219),Er=Object(S.a)(),wr=function(){return m.a.createElement(Er.Navigator,{screenOptions:{cardStyle:{backgroundColor:V.palette.deepPurple},headerShown:!1}},m.a.createElement(Er.Screen,{name:"mainStack",component:yr,options:{headerShown:!1}}))},xr=m.a.forwardRef((function(e,t){return m.a.createElement(kr.a,B()({},e,{ref:t}),m.a.createElement(wr,null))}));xr.displayName="RootNavigator";var Sr=r(79),jr={navigate:function(e){},goBack:function(){},resetRoot:function(e){},getRootState:function(){return{}}};function Ar(e){var t=e.routes[e.index];return t.state?Ar(t.state):t.name}r(448);var Cr=function(e){var t=Object(g.useState)(null),r=o()(t,2),n=r[0],a=(r[1],Object(g.useState)({})),i=o()(a,2),c=i[0];i[1];return Object(g.useEffect)((function(){0}),[]),Object(g.useEffect)((function(){0}),[window.location.search]),null!=c&&c.storybook?n?m.a.createElement(n,null):null:e.children},Pr=r(163);Object(Pr.enableScreens)();var Rr=function(){var e=Object(g.useRef)(null),t=Object(g.useState)(void 0),r=o()(t,2),a=r[0],i=r[1];!function(e){var t=function(t){jr[t]=function(){var r;if(e.current)return(r=e.current)[t].apply(r,arguments)}};for(var r in jr)t(r)}(e),function(e,t){var r=Object(g.useRef)(t);Object(g.useEffect)((function(){r.current=t}),[t]),Object(g.useEffect)((function(){var t=function(){var t=e.current;if(null==t)return!1;var n=Ar(t.getRootState());return!r.current(n)&&(!!t.canGoBack()&&(t.goBack(),!0))};return Sr.a.addEventListener("hardwareBackPress",t),function(){return Sr.a.removeEventListener("hardwareBackPress",t)}}),[e])}(e,vr);var l=function(e,t){var r=Object(g.useState)(),n=o()(r,2),a=n[0],i=n[1],l=Object(g.useState)(!0),s=o()(l,2),u=s[0],d=s[1],p=Object(g.useRef)(),f=function(){var r;return c.a.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,c.a.awrap(e.load(t));case 3:(r=n.sent)&&i(r);case 5:return n.prev=5,d(!1),n.finish(5);case 8:case"end":return n.stop()}}),null,null,[[0,,5,8]],Promise)};return Object(g.useEffect)((function(){u&&f()}),[u]),{onNavigationStateChange:function(r){p.current;var n=Ar(r);p.current=n,e.save(t,r)},restoreState:f,initialNavigationState:a}}(n,"NAVIGATION_STATE"),s=l.initialNavigationState,u=l.onNavigationStateChange;return Object(g.useEffect)((function(){c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.a.awrap(c.a.async((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),null,null,null,Promise));case 2:ar().then(i);case 3:case"end":return e.stop()}}),null,null,null,Promise)}),[]),a?m.a.createElement(Cr,null,m.a.createElement(tr,{value:a},m.a.createElement(h.b,{initialMetrics:b.a},m.a.createElement(xr,{ref:e,initialState:s,onStateChange:u})))):null},Ir=r(263);Object(Ir.a)(Rr);t.a=Rr},283:function(e,t,r){r(284),e.exports=r(285)},302:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAQNJREFUKBWdk8EOwUAQhme2InFy9yB1cSTReAIOPIeEEyKObs4knkBS2pNbK57A3cETcKBjtmKzJd0mO5fO9p//63Q6BciJ0D83wn3cyZHV7ZLKtISNPUqeawB8EFEVEV+anElF5sSHj5nYDI4AmpnM0pvpQDcjinHTc+eyyBT4FX/NLc+dfjXTNQXYmiUYAz/uAtGGc35nsSOgwPREXeP5RBj60ZUIatzKnQAqekFRzp5biSlL/lQLbqaMCAc2XYqMSkdx/MzAP42IkgkLLxTYb7XrW1VUkKQAWRNaQhTAFpIB2ED+VlkukNxChjmQ0IoH7EhwXvwBZGEKEThAAcOif+ENKNR3psyHynYAAAAASUVORK5CYII="},303:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAIZJREFUGBljZACC/w4OMgy/fnUxMDI6gPgM//8fYGBjK2M8cOAJI1TyIlBYCCyJIN4BFekzgXWCJBkZtwMFZMEYxAaJAU1l/G9t/QxopCRIAmQkyACoqY+Bmp4zIUzEzmICOwgk9/v3LJBOsG4gG6wc6FjCjgTbC3QtUMdykJ1gDGIDxUByAK6uPrQ53B7lAAAAAElFTkSuQmCC"},308:function(e,t,r){e.exports=r.p+"static/media/bg.27c56310.png"},368:function(e,t,r){e.exports=r.p+"static/media/bowser.4ba9aedf.png"},435:function(e,t,r){e.exports=r.p+"static/media/logo-ignite.5c0bc1b0.png"},436:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAIZJREFUGBljYACC////5wHxIyB+AsRFQNwPxG+A+BIQ+4DUgBTFADE+8Bco6QFSeB2fKqjcASagofxgo/ET7CCFq/CrAcsuAVktAMTX8Fi/EyjHAlYOZMgD8X0gRgfHgAK8KDYCBaSBGNnk3UA+N4oiGAcoIQLEZ4F4HRCzw8Sx0kAFzNgkAGi11d75H7oeAAAAAElFTkSuQmCC"}},[[283,1,2]]]); +//# sourceMappingURL=app.767fd55b.chunk.js.map
\ No newline at end of file diff --git a/web-build/static/js/app.767fd55b.chunk.js.map b/web-build/static/js/app.767fd55b.chunk.js.map new file mode 100644 index 0000000..c568461 --- /dev/null +++ b/web-build/static/js/app.767fd55b.chunk.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["app/i18n/translate.ts","app/i18n/i18n.ts","app/utils/ignore-warnings.ts","app/utils/storage/storage.ts","app/theme/palette.ts","app/theme/color.ts","app/theme/spacing.ts","app/theme/typography.ts","app/components/text/text.presets.ts","app/components/text/text.tsx","app/components/auto-image/auto-image.tsx","app/components/icon/icons/index.ts","app/components/icon/icon.tsx","app/components/bullet-item/bullet-item.tsx","app/components/button/button.presets.ts","app/components/button/button.tsx","app/components/checkbox/checkbox.tsx","app/components/form-row/form-row.presets.ts","app/components/header/header.tsx","app/components/screen/screen.presets.ts","app/components/screen/screen.tsx","app/components/switch/switch.tsx","app/components/text-field/text-field.tsx","app/components/wallpaper/wallpaper.presets.ts","app/components/wallpaper/wallpaper.tsx","app/components/graph/graph.tsx","app/components/tweaks/tweaks.tsx","app/screens/welcome/welcome-screen.tsx","app/services/api/api-problem.ts","app/services/api/api-config.ts","app/services/api/api.ts","app/screens/demo/demo-screen.tsx","app/models/character/character.ts","app/services/api/character-api.ts","app/models/character-store/character-store.ts","app/models/extensions/with-environment.ts","app/models/root-store/root-store.ts","app/models/root-store/root-store-context.ts","app/models/environment.ts","app/models/root-store/setup-root-store.ts","app/screens/demo/demo-list-screen.tsx","app/screens/graph/graph-screen.tsx","app/navigators/main-navigator.tsx","app/navigators/root-navigator.tsx","app/navigators/navigation-utilities.tsx","storybook/toggle-storybook.web.tsx","app/app.tsx","app/theme/fonts/index.ts","App.js","app/components/icon/icons/arrow-left.png","app/components/icon/icons/bullet.png","app/components/wallpaper/bg.png","app/screens/welcome/bowser.png","app/screens/demo/logo-ignite.png","app/screens/demo/heart.png"],"names":["translate","key","options","i18n","t","fallbacks","translations","en","ja","locale","Localization","LogBox","ignoreLogs","loadString","a","async","AsyncStorage","getItem","saveString","value","setItem","load","almostThere","JSON","parse","save","stringify","remove","removeItem","clear","palette","black","white","offWhite","orange","orangeDarker","lightGrey","lighterGrey","angry","deepPurple","color","transparent","background","primary","primaryDarker","line","text","dim","error","storybookDarkBg","storybookTextColor","spacing","typography","Platform","select","ios","android","secondary","code","BASE","fontFamily","fontSize","presets","default","bold","fontWeight","header","fieldLabel","Text","props","preset","tx","txOptions","children","styleOverride","style","rest","content","styles","AutoImage","useState","width","height","imageSize","setImageSize","useLayoutEffect","source","uri","RNImage","getSize","OS","resolveAssetSource","icons","back","require","bullet","ROOT","resizeMode","Icon","icon","containerStyle","View","BULLET_ITEM","flexDirection","marginTop","paddingBottom","borderBottomWidth","borderBottomColor","BULLET_CONTAINER","marginRight","BULLET","BULLET_TEXT","flex","lineHeight","BulletItem","BASE_VIEW","paddingVertical","paddingHorizontal","borderRadius","justifyContent","alignItems","BASE_TEXT","viewPresets","backgroundColor","link","textPresets","Button","textStyleOverride","textStyle","viewStyles","textStyles","TouchableOpacity","DIMENSIONS","borderWidth","borderColor","padding","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","paddingTop","TITLE","textAlign","TITLE_MIDDLE","LEFT","RIGHT","Header","onLeftPress","onRightPress","rightIcon","leftIcon","headerText","headerTx","titleStyle","onPress","offsets","none","fixed","outer","inner","scroll","isIos","ScreenWithoutScrolling","insets","useSafeAreaInsets","backgroundStyle","insetStyle","unsafe","top","KeyboardAvoidingView","behavior","undefined","keyboardVerticalOffset","keyboardOffset","StatusBar","barStyle","statusBar","ScreenWithScrolling","ScrollView","contentContainerStyle","keyboardShouldPersistTaps","Screen","stretch","position","left","bottom","right","defaultImage","Wallpaper","backgroundImage","CONTAINER","Graph","observer","physics","gData","fgRef","nodeIds","flatten","useRef","useEffect","fg","current","d3Force","strength","linkStrength","iterations","linkIts","collision","d3","radius","charge","useMemo","nodesById","Object","fromEntries","nodes","map","node","id","forEach","collapsed","childLinks","parentLink","links","push","threedim","ref","graphData","nodeAutoColorBy","linkColor","linkWidth","linkDirectionalParticles","particles","nodeLabel","title","linkOpacity","nodeRelSize","nodeRel","linkDirectionalParticleWidth","particleWidth","linkAutoColorBy","Tweaks","setPhysics","minimumValue","maximumValue","onValueChange","step","marginVertical","collapse","activeSections","setActiveSections","tweaks","setTweaks","container","marginLeft","name","size","Accordion","sections","touchAbleComponent","expandMultiple","renderHeader","section","_","isActive","duration","active","inactive","transition","renderContent","onChange","includes","renderAsFlatList","zIndex","StyleSheet","create","borderStyle","maxHeight","marginBottom","paddingLeft","selectors","selector","activeSelector","selectTitle","multipleToggle","multipleToggle__title","bowserLogo","FULL","TEXT","BOLD","HEADER","HEADER_TITLE","letterSpacing","TITLE_WRAPPER","ALMOST","fontStyle","BOWSER","alignSelf","maxWidth","CONTENT","CONTINUE","CONTINUE_TEXT","FOOTER","FOOTER_CONTENT","navigation","useNavigation","testID","SafeAreaView","navigate","getGeneralApiProblem","response","problem","kind","temporary","status","DEFAULT_API_CONFIG","url","timeout","Api","config","this","apisauce","baseURL","headers","Accept","get","ok","convertUser","raw","rawUsers","data","resultUsers","users","resultUser","user","logoIgnite","heart","DEMO","DEMO_TEXT","TAGLINE","IGNITE","LOVE_WRAPPER","LOVE","HEART","marginHorizontal","HINT","platformCommand","demoReactotron","React","console","tron","log","logImportant","display","numbers","strings","booleans","arrays","objects","deeper","yay","functionNames","preview","important","image","demo","setup","getUser","goBack","CharacterModel","types","model","identifierNumber","maybe","string","CharacterApi","api","amount","characters","results","CharacterStoreModel","optional","array","extend","self","views","getEnv","actions","saveCharacters","characterSnapshots","replace","getCharacters","characterApi","environment","result","RootStoreModel","characterStore","RootStoreContext","createContext","RootStoreProvider","Provider","Environment","createEnvironment","env","setupRootStore","storage","rootStore","onSnapshot","snapshot","LIST_CONTAINER","IMAGE","LIST_TEXT","FLAT_LIST","useContext","FlatList","keyExtractor","item","String","renderItem","GraphScreen","setGraphData","setNodeIds","physicsInit","getData","valueJson","keys","length","timer","clearTimeout","setTimeout","jsonValue","mergeItem","storeData","test","then","axios","dataa","nods","temp","getNodesById","cleanData","cleanLinks","i","target","sanitizeGraph","catch","e","Stack","createStackNavigator","MainNavigator","Navigator","screenOptions","cardStyle","headerShown","component","exitRoutes","canExit","routeName","RootStack","RootNavigator","forwardRef","NavigationContainer","displayName","RootNavigation","resetRoot","state","getRootState","getActiveRouteName","route","routes","index","ToggleStorybook","StorybookUIRoot","queryParams","__DEV__","window","location","search","storybook","enableScreens","App","navigationRef","setRootStore","method","setRootNavigation","canExitRef","onBackPress","canGoBack","BackHandler","addEventListener","removeEventListener","useBackButtonHandler","persistenceKey","initialNavigationState","setInitialNavigationState","isRestoringNavigationState","setIsRestoringNavigationState","routeNameRef","restoreState","onNavigationStateChange","currentRouteName","useNavigationPersistence","initialMetrics","initialWindowMetrics","initialState","onStateChange","registerRootComponent","module","exports"],"mappings":"owDAQO,SAASA,EAAUC,EAAgBC,GACxC,OAAOD,EAAME,IAAKC,EAAEH,EAAKC,GAAW,KCJtCC,IAAKE,WAAY,EACjBF,IAAKG,aAAe,CAAEC,KAAIC,MAE1BL,IAAKM,OAASC,KAAuB,K,OCDrCC,EAAOC,WAAW,CAChB,mB,8CCDK,SAAeC,EAAWZ,GAA1B,SAAAa,EAAAC,OAAA,2EAAAD,EAAA,MAEUE,IAAaC,QAAQhB,IAF/B,iGAKI,MALJ,+DAeA,SAAeiB,EAAWjB,EAAakB,GAAvC,SAAAL,EAAAC,OAAA,2EAAAD,EAAA,MAEGE,IAAaI,QAAQnB,EAAKkB,IAF7B,iCAGI,GAHJ,0DAKI,GALJ,+DAcA,SAAeE,EAAKpB,GAApB,eAAAa,EAAAC,OAAA,2EAAAD,EAAA,MAEuBE,IAAaC,QAAQhB,IAF5C,cAEGqB,EAFH,yBAGIC,KAAKC,MAAMF,IAHf,yDAKI,MALJ,gEAeA,SAAeG,EAAKxB,EAAakB,GAAjC,SAAAL,EAAAC,OAAA,2EAAAD,EAAA,MAEGE,IAAaI,QAAQnB,EAAKsB,KAAKG,UAAUP,KAF5C,iCAGI,GAHJ,0DAKI,GALJ,+DAcA,SAAeQ,EAAO1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d55b.chunk.js","sourcesContent":["import i18n from \"i18n-js\"\nimport { TxKeyPath } from \"./i18n\"\n\n/**\n * Translates text.\n *\n * @param key The i18n key.\n */\nexport function translate(key: TxKeyPath, options?: i18n.TranslateOptions) {\n return key ? i18n.t(key, options) : null\n}\n","import * as Localization from \"expo-localization\"\nimport i18n from \"i18n-js\"\nimport en from \"./en.json\"\nimport ja from \"./ja.json\"\n\ni18n.fallbacks = true\ni18n.translations = { en, ja }\n\ni18n.locale = Localization.locale || \"en\"\n\n/**\n * Builds up valid keypaths for translations.\n * Update to your default locale of choice if not English.\n */\ntype DefaultLocale = typeof en\nexport type TxKeyPath = RecursiveKeyOf<DefaultLocale>\n\ntype RecursiveKeyOf<TObj extends Record<string, any>> = {\n [TKey in keyof TObj & string]: TObj[TKey] extends Record<string, any>\n ? `${TKey}` | `${TKey}.${RecursiveKeyOf<TObj[TKey]>}`\n : `${TKey}`\n}[keyof TObj & string]\n","/**\n * Ignore some yellowbox warnings. Some of these are for deprecated functions\n * that we haven't gotten around to replacing yet.\n */\nimport { LogBox } from \"react-native\"\n\n// prettier-ignore\nLogBox.ignoreLogs([\n \"Require cycle:\",\n])\n","import AsyncStorage from \"@react-native-async-storage/async-storage\"\n\n/**\n * Loads a string from storage.\n *\n * @param key The key to fetch.\n */\nexport async function loadString(key: string): Promise<string | null> {\n try {\n return await AsyncStorage.getItem(key)\n } catch {\n // not sure why this would fail... even reading the RN docs I'm unclear\n return null\n }\n}\n\n/**\n * Saves a string to storage.\n *\n * @param key The key to fetch.\n * @param value The value to store.\n */\nexport async function saveString(key: string, value: string): Promise<boolean> {\n try {\n await AsyncStorage.setItem(key, value)\n return true\n } catch {\n return false\n }\n}\n\n/**\n * Loads something from storage and runs it thru JSON.parse.\n *\n * @param key The key to fetch.\n */\nexport async function load(key: string): Promise<any | null> {\n try {\n const almostThere = await AsyncStorage.getItem(key)\n return JSON.parse(almostThere)\n } catch {\n return null\n }\n}\n\n/**\n * Saves an object to storage.\n *\n * @param key The key to fetch.\n * @param value The value to store.\n */\nexport async function save(key: string, value: any): Promise<boolean> {\n try {\n await AsyncStorage.setItem(key, JSON.stringify(value))\n return true\n } catch {\n return false\n }\n}\n\n/**\n * Removes something from storage.\n *\n * @param key The key to kill.\n */\nexport async function remove(key: string): Promise<void> {\n try {\n await AsyncStorage.removeItem(key)\n } catch {}\n}\n\n/**\n * Burn it all to the ground.\n */\nexport async function clear(): Promise<void> {\n try {\n await AsyncStorage.clear()\n } catch {}\n}\n","export const palette = {\n black: \"#1d1d1d\",\n white: \"#ffffff\",\n offWhite: \"#e6e6e6\",\n orange: \"#FBA928\",\n orangeDarker: \"#EB9918\",\n lightGrey: \"#939AA4\",\n lighterGrey: \"#CDD4DA\",\n angry: \"#dd3333\",\n deepPurple: \"#5D2555\",\n}\n","import { palette } from \"./palette\"\n\n/**\n * Roles for colors. Prefer using these over the palette. It makes it easier\n * to change things.\n *\n * The only roles we need to place in here are the ones that span through the app.\n *\n * If you have a specific use-case, like a spinner color. It makes more sense to\n * put that in the <Spinner /> component.\n */\nexport const color = {\n /**\n * The palette is available to use, but prefer using the name.\n */\n palette,\n /**\n * A helper for making something see-thru. Use sparingly as many layers of transparency\n * can cause older Android devices to slow down due to the excessive compositing required\n * by their under-powered GPUs.\n */\n transparent: \"rgba(0, 0, 0, 0)\",\n /**\n * The screen background.\n */\n background: palette.white,\n /**\n * The main tinting color.\n */\n primary: palette.orange,\n /**\n * The main tinting color, but darker.\n */\n primaryDarker: palette.orangeDarker,\n /**\n * A subtle color used for borders and lines.\n */\n line: palette.offWhite,\n /**\n * The default color of text in many components.\n */\n text: palette.white,\n /**\n * Secondary information.\n */\n dim: palette.lightGrey,\n /**\n * Error messages and icons.\n */\n error: palette.angry,\n\n /**\n * Storybook background for Text stories, or any stories where\n * the text color is color.text, which is white by default, and does not show\n * in Stories against the default white background\n */\n storybookDarkBg: palette.black,\n\n /**\n * Storybook text color for stories that display Text components against the\n * white background\n */\n storybookTextColor: palette.black,\n}\n","/**\n * NOTE TO DEVS:\n *\n * Spacing should be consistent and whitespace thought of as a first class technique up\n * there with color and typefaces.\n *\n * Which type of scale you use is based on the design.\n *\n * If you've got simpler app, you may only need 6 items. Or maybe you want a spacing scale\n * to be named:\n *\n * export const spacing = {\n * tiny: 4,\n * small: 8,\n * medium: 12,\n * large: 24,\n * huge: 64\n * }\n *\n * Whatever you choose, try to stick with these, and not freestyle it everywhere.\n *\n * Feel free to delete this block.\n */\n\n/**\n * The available spacing.\n *\n * Here's the rough guideline. Customize this for you usage. It's ok to put exceptions\n * within the components themselves if they are truly exceptions.\n *\n * 0 = none - nothing. only here to bust out of a zero-based array.\n * 1 = tiny - elements contextually close to each other\n * 2 = smaller - for groups of closely related items or perhaps borders\n * 3 = small - ?\n * 4 = medium - ?\n * 5 = medium+ - ?\n * 6 = large - between groups of content that aren't related?\n * 7 = huge - ?\n * 8 = massive - an uncomfortable amount of whitespace\n */\nexport const spacing = [0, 4, 8, 12, 16, 24, 32, 48, 64]\n","import { Platform } from \"react-native\"\n\n/**\n * You can find a list of available fonts on both iOS and Android here:\n * https://github.com/react-native-training/react-native-fonts\n *\n * If you're interested in adding a custom font to your project,\n * check out the readme file in ./assets/fonts/ then come back here\n * and enter your new font name. Remember the Android font name\n * is probably different than iOS.\n * More on that here:\n * https://github.com/lendup/react-native-cross-platform-text\n *\n * The various styles of fonts are defined in the <Text /> component.\n */\nexport const typography = {\n /**\n * The primary font. Used in most places.\n */\n primary: Platform.select({ ios: \"Helvetica\", android: \"normal\" }),\n\n /**\n * An alternate font used for perhaps titles and stuff.\n */\n secondary: Platform.select({ ios: \"Arial\", android: \"sans-serif\" }),\n\n /**\n * Lets get fancy with a monospace font!\n */\n code: Platform.select({ ios: \"Courier\", android: \"monospace\" }),\n}\n","import { TextStyle } from \"react-native\"\nimport { color, typography } from \"../../theme\"\n\n/**\n * All text will start off looking like this.\n */\nconst BASE: TextStyle = {\n fontFamily: typography.primary,\n color: color.text,\n fontSize: 15,\n}\n\n/**\n * All the variations of text styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const presets = {\n /**\n * The default text styles.\n */\n default: BASE,\n\n /**\n * A bold version of the default text.\n */\n bold: { ...BASE, fontWeight: \"bold\" } as TextStyle,\n\n /**\n * Large headers.\n */\n header: { ...BASE, fontSize: 24, fontWeight: \"bold\" } as TextStyle,\n\n /**\n * Field labels that appear on forms above the inputs.\n */\n fieldLabel: { ...BASE, fontSize: 13, color: color.dim } as TextStyle,\n\n /**\n * A smaller piece of secondard information.\n */\n secondary: { ...BASE, fontSize: 9, color: color.dim } as TextStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type TextPresets = keyof typeof presets\n","import * as React from \"react\"\nimport { Text as ReactNativeText } from \"react-native\"\nimport { presets } from \"./text.presets\"\nimport { TextProps } from \"./text.props\"\nimport { translate } from \"../../i18n\"\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Text(props: TextProps) {\n // grab the props\n const { preset = \"default\", tx, txOptions, text, children, style: styleOverride, ...rest } = props\n\n // figure out which content to use\n const i18nText = tx && translate(tx, txOptions)\n const content = i18nText || text || children\n\n const style = presets[preset] || presets.default\n const styles = [style, styleOverride]\n\n return (\n <ReactNativeText {...rest} style={styles}>\n {content}\n </ReactNativeText>\n )\n}\n","import React, { useLayoutEffect, useState } from \"react\"\nimport {\n Image as RNImage,\n ImageProps as DefaultImageProps,\n ImageURISource,\n Platform,\n} from \"react-native\"\n\ntype ImageProps = DefaultImageProps & {\n source: ImageURISource\n}\n\n/**\n * An Image wrapper component that autosizes itself to the size of the actual image.\n * You can always override by passing a width and height in the style.\n * If passing only one of width/height this image component will use the actual\n * size of the other dimension.\n *\n * This component isn't required, but is provided as a convenience so that\n * we don't have to remember to explicitly set image sizes on every image instance.\n *\n * To use as a stand-in replacement import { AutoImage as Image } and remove the\n * Image import from react-native. Now all images in that file are handled by this\n * component and are web-ready if not explicitly sized in the style property.\n */\nexport function AutoImage(props: ImageProps) {\n const [imageSize, setImageSize] = useState({ width: 0, height: 0 })\n\n useLayoutEffect(() => {\n if (props.source?.uri) {\n RNImage.getSize(props.source.uri as any, (width, height) => {\n setImageSize({ width, height })\n })\n } else if (Platform.OS === \"web\") {\n // web requires a different method to get it's size\n RNImage.getSize(props.source as any, (width, height) => {\n setImageSize({ width, height })\n })\n } else {\n const { width, height } = RNImage.resolveAssetSource(props.source)\n setImageSize({ width, height })\n }\n }, [])\n\n return <RNImage {...props} style={[imageSize, props.style]} />\n}\n","export const icons = {\n back: require(\"./arrow-left.png\"),\n bullet: require(\"./bullet.png\"),\n}\n\nexport type IconTypes = keyof typeof icons\n","import * as React from \"react\"\nimport { View, ImageStyle } from \"react-native\"\nimport { AutoImage as Image } from \"../auto-image/auto-image\"\nimport { IconProps } from \"./icon.props\"\nimport { icons } from \"./icons\"\n\nconst ROOT: ImageStyle = {\n resizeMode: \"contain\",\n}\n\nexport function Icon(props: IconProps) {\n const { style: styleOverride, icon, containerStyle } = props\n\n return (\n <View style={containerStyle}>\n <Image style={[ROOT, styleOverride]} source={icons[icon]} />\n </View>\n )\n}\n","import * as React from \"react\"\nimport { View, ViewStyle, ImageStyle, TextStyle } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { Icon } from \"../icon/icon\"\nimport { spacing, typography } from \"../../theme\"\n\nconst BULLET_ITEM: ViewStyle = {\n flexDirection: \"row\",\n marginTop: spacing[4],\n paddingBottom: spacing[4],\n borderBottomWidth: 1,\n borderBottomColor: \"#3A3048\",\n}\nconst BULLET_CONTAINER: ViewStyle = {\n marginRight: spacing[4] - 1,\n marginTop: spacing[2],\n}\nconst BULLET: ImageStyle = {\n width: 8,\n height: 8,\n}\nconst BULLET_TEXT: TextStyle = {\n flex: 1,\n fontFamily: typography.primary,\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n}\n\nexport interface BulletItemProps {\n text: string\n}\n\nexport function BulletItem(props: BulletItemProps) {\n return (\n <View style={BULLET_ITEM}>\n <Icon icon=\"bullet\" containerStyle={BULLET_CONTAINER} style={BULLET} />\n <Text style={BULLET_TEXT} text={props.text} />\n </View>\n )\n}\n","import { ViewStyle, TextStyle } from \"react-native\"\nimport { color, spacing } from \"../../theme\"\n\n/**\n * All text will start off looking like this.\n */\nconst BASE_VIEW: ViewStyle = {\n paddingVertical: spacing[2],\n paddingHorizontal: spacing[2],\n borderRadius: 4,\n justifyContent: \"center\",\n alignItems: \"center\",\n}\n\nconst BASE_TEXT: TextStyle = {\n paddingHorizontal: spacing[3],\n}\n\n/**\n * All the variations of text styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const viewPresets: Record<string, ViewStyle> = {\n /**\n * A smaller piece of secondard information.\n */\n primary: { ...BASE_VIEW, backgroundColor: color.palette.orange } as ViewStyle,\n\n /**\n * A button without extras.\n */\n link: {\n ...BASE_VIEW,\n paddingHorizontal: 0,\n paddingVertical: 0,\n alignItems: \"flex-start\",\n } as ViewStyle,\n}\n\nexport const textPresets: Record<ButtonPresetNames, TextStyle> = {\n primary: { ...BASE_TEXT, fontSize: 9, color: color.palette.white } as TextStyle,\n link: {\n ...BASE_TEXT,\n color: color.text,\n paddingHorizontal: 0,\n paddingVertical: 0,\n } as TextStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type ButtonPresetNames = keyof typeof viewPresets\n","import * as React from \"react\"\nimport { TouchableOpacity } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { viewPresets, textPresets } from \"./button.presets\"\nimport { ButtonProps } from \"./button.props\"\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Button(props: ButtonProps) {\n // grab the props\n const {\n preset = \"primary\",\n tx,\n text,\n style: styleOverride,\n textStyle: textStyleOverride,\n children,\n ...rest\n } = props\n\n const viewStyle = viewPresets[preset] || viewPresets.primary\n const viewStyles = [viewStyle, styleOverride]\n const textStyle = textPresets[preset] || textPresets.primary\n const textStyles = [textStyle, textStyleOverride]\n\n const content = children || <Text tx={tx} text={text} style={textStyles} />\n\n return (\n <TouchableOpacity style={viewStyles} {...rest}>\n {content}\n </TouchableOpacity>\n )\n}\n","import * as React from \"react\"\nimport { TextStyle, TouchableOpacity, View, ViewStyle } from \"react-native\"\nimport { Text } from \"../text/text\"\nimport { color, spacing } from \"../../theme\"\nimport { CheckboxProps } from \"./checkbox.props\"\n\nconst ROOT: ViewStyle = {\n flexDirection: \"row\",\n paddingVertical: spacing[1],\n alignSelf: \"flex-start\",\n}\n\nconst DIMENSIONS = { width: 16, height: 16 }\n\nconst OUTLINE: ViewStyle = {\n ...DIMENSIONS,\n marginTop: 2, // finicky and will depend on font/line-height/baseline/weather\n justifyContent: \"center\",\n alignItems: \"center\",\n borderWidth: 1,\n borderColor: color.primaryDarker,\n borderRadius: 1,\n}\n\nconst FILL: ViewStyle = {\n width: DIMENSIONS.width - 4,\n height: DIMENSIONS.height - 4,\n backgroundColor: color.primary,\n}\n\nconst LABEL: TextStyle = { paddingLeft: spacing[2] }\n\nexport function Checkbox(props: CheckboxProps) {\n const numberOfLines = props.multiline ? 0 : 1\n\n const rootStyle = [ROOT, props.style]\n const outlineStyle = [OUTLINE, props.outlineStyle]\n const fillStyle = [FILL, props.fillStyle]\n\n const onPress = props.onToggle ? () => props.onToggle && props.onToggle(!props.value) : null\n\n return (\n <TouchableOpacity\n activeOpacity={1}\n disabled={!props.onToggle}\n onPress={onPress}\n style={rootStyle}\n >\n <View style={outlineStyle}>{props.value && <View style={fillStyle} />}</View>\n <Text text={props.text} tx={props.tx} numberOfLines={numberOfLines} style={LABEL} />\n </TouchableOpacity>\n )\n}\n","import { ViewStyle } from \"react-native\"\nimport { color, spacing } from \"../../theme\"\n\n/**\n * The size of the border radius.\n */\nconst RADIUS = 8\n\n/**\n * The default style of the container.\n */\nconst ROOT: ViewStyle = {\n borderWidth: 1,\n borderColor: color.line,\n padding: spacing[2],\n}\n\n/**\n * What each of the presets look like.\n */\nexport const PRESETS = {\n /**\n * Rounded borders on the the top only.\n */\n top: {\n ...ROOT,\n borderTopLeftRadius: RADIUS,\n borderTopRightRadius: RADIUS,\n borderBottomWidth: 0,\n },\n /**\n * No rounded borders.\n */\n middle: {\n ...ROOT,\n borderBottomWidth: 0,\n },\n /**\n * Rounded borders on the bottom.\n */\n bottom: {\n ...ROOT,\n borderBottomLeftRadius: RADIUS,\n borderBottomRightRadius: RADIUS,\n },\n /**\n * Rounded borders everywhere.\n */\n soloRound: {\n ...ROOT,\n borderRadius: RADIUS,\n },\n /**\n * Straight borders everywhere.\n */\n soloStraight: {\n ...ROOT,\n },\n /**\n * Transparent borders useful to keep things lined up.\n */\n clear: {\n ...ROOT,\n borderColor: color.transparent,\n },\n}\n\n/**\n * The names of the presets supported by FormRow.\n */\nexport type FormRowPresets = keyof typeof PRESETS\n","import React from \"react\"\nimport { View, ViewStyle, TextStyle } from \"react-native\"\nimport { HeaderProps } from \"./header.props\"\nimport { Button } from \"../button/button\"\nimport { Text } from \"../text/text\"\nimport { Icon } from \"../icon/icon\"\nimport { spacing } from \"../../theme\"\nimport { translate } from \"../../i18n/\"\n\n// static styles\nconst ROOT: ViewStyle = {\n flexDirection: \"row\",\n paddingHorizontal: spacing[4],\n alignItems: \"center\",\n paddingTop: spacing[5],\n paddingBottom: spacing[5],\n justifyContent: \"flex-start\",\n}\nconst TITLE: TextStyle = { textAlign: \"center\" }\nconst TITLE_MIDDLE: ViewStyle = { flex: 1, justifyContent: \"center\" }\nconst LEFT: ViewStyle = { width: 32 }\nconst RIGHT: ViewStyle = { width: 32 }\n\n/**\n * Header that appears on many screens. Will hold navigation buttons and screen title.\n */\nexport function Header(props: HeaderProps) {\n const {\n onLeftPress,\n onRightPress,\n rightIcon,\n leftIcon,\n headerText,\n headerTx,\n style,\n titleStyle,\n } = props\n const header = headerText || (headerTx && translate(headerTx)) || \"\"\n\n return (\n <View style={[ROOT, style]}>\n {leftIcon ? (\n <Button preset=\"link\" onPress={onLeftPress}>\n <Icon icon={leftIcon} />\n </Button>\n ) : (\n <View style={LEFT} />\n )}\n <View style={TITLE_MIDDLE}>\n <Text style={[TITLE, titleStyle]} text={header} />\n </View>\n {rightIcon ? (\n <Button preset=\"link\" onPress={onRightPress}>\n <Icon icon={rightIcon} />\n </Button>\n ) : (\n <View style={RIGHT} />\n )}\n </View>\n )\n}\n","import { ViewStyle } from \"react-native\"\nimport { color } from \"../../theme\"\n\n/**\n * All screen keyboard offsets.\n */\nexport const offsets = {\n none: 0,\n}\n\n/**\n * The variations of keyboard offsets.\n */\nexport type KeyboardOffsets = keyof typeof offsets\n\n/**\n * All the variations of screens.\n */\nexport const presets = {\n /**\n * No scrolling. Suitable for full-screen carousels and components\n * which have built-in scrolling like FlatList.\n */\n fixed: {\n outer: {\n backgroundColor: color.background,\n flex: 1,\n height: \"100%\",\n } as ViewStyle,\n inner: {\n justifyContent: \"flex-start\",\n alignItems: \"stretch\",\n height: \"100%\",\n width: \"100%\",\n } as ViewStyle,\n },\n\n /**\n * Scrolls. Suitable for forms or other things requiring a keyboard.\n *\n * Pick this one if you don't know which one you want yet.\n */\n scroll: {\n outer: {\n backgroundColor: color.background,\n flex: 1,\n height: \"100%\",\n } as ViewStyle,\n inner: { justifyContent: \"flex-start\", alignItems: \"stretch\" } as ViewStyle,\n },\n}\n\n/**\n * The variations of screens.\n */\nexport type ScreenPresets = keyof typeof presets\n\n/**\n * Is this preset a non-scrolling one?\n *\n * @param preset The preset to check\n */\nexport function isNonScrolling(preset?: ScreenPresets) {\n // any of these things will make you scroll\n return !preset || !presets[preset] || preset === \"fixed\"\n}\n","import * as React from \"react\"\nimport { KeyboardAvoidingView, Platform, ScrollView, StatusBar, View } from \"react-native\"\nimport { useSafeAreaInsets } from \"react-native-safe-area-context\"\nimport { ScreenProps } from \"./screen.props\"\nimport { isNonScrolling, offsets, presets } from \"./screen.presets\"\n\nconst isIos = Platform.OS === \"ios\"\n\nfunction ScreenWithoutScrolling(props: ScreenProps) {\n const insets = useSafeAreaInsets()\n const preset = presets.fixed\n const style = props.style || {}\n const backgroundStyle = props.backgroundColor ? { backgroundColor: props.backgroundColor } : {}\n const insetStyle = { paddingTop: props.unsafe ? 0 : insets.top }\n\n return (\n <KeyboardAvoidingView\n style={[preset.outer, backgroundStyle]}\n behavior={isIos ? \"padding\" : undefined}\n keyboardVerticalOffset={offsets[props.keyboardOffset || \"none\"]}\n >\n <StatusBar barStyle={props.statusBar || \"light-content\"} />\n <View style={[preset.inner, style, insetStyle]}>{props.children}</View>\n </KeyboardAvoidingView>\n )\n}\n\nfunction ScreenWithScrolling(props: ScreenProps) {\n const insets = useSafeAreaInsets()\n const preset = presets.scroll\n const style = props.style || {}\n const backgroundStyle = props.backgroundColor ? { backgroundColor: props.backgroundColor } : {}\n const insetStyle = { paddingTop: props.unsafe ? 0 : insets.top }\n\n return (\n <KeyboardAvoidingView\n style={[preset.outer, backgroundStyle]}\n behavior={isIos ? \"padding\" : undefined}\n keyboardVerticalOffset={offsets[props.keyboardOffset || \"none\"]}\n >\n <StatusBar barStyle={props.statusBar || \"light-content\"} />\n <View style={[preset.outer, backgroundStyle, insetStyle]}>\n <ScrollView\n style={[preset.outer, backgroundStyle]}\n contentContainerStyle={[preset.inner, style]}\n keyboardShouldPersistTaps={props.keyboardShouldPersistTaps || \"handled\"}\n >\n {props.children}\n </ScrollView>\n </View>\n </KeyboardAvoidingView>\n )\n}\n\n/**\n * The starting component on every screen in the app.\n *\n * @param props The screen props\n */\nexport function Screen(props: ScreenProps) {\n if (isNonScrolling(props.preset)) {\n return <ScreenWithoutScrolling {...props} />\n } else {\n return <ScreenWithScrolling {...props} />\n }\n}\n","import React from \"react\"\nimport { ViewStyle, Animated, Easing, TouchableWithoutFeedback } from \"react-native\"\nimport { color } from \"../../theme\"\nimport { SwitchProps } from \"./switch.props\"\n\n// dimensions\nconst THUMB_SIZE = 30\nconst WIDTH = 56\nconst MARGIN = 2\nconst OFF_POSITION = -0.5\nconst ON_POSITION = WIDTH - THUMB_SIZE - MARGIN\nconst BORDER_RADIUS = (THUMB_SIZE * 3) / 4\n\n// colors\nconst ON_COLOR = color.primary\nconst OFF_COLOR = color.palette.offWhite\nconst BORDER_ON_COLOR = ON_COLOR\nconst BORDER_OFF_COLOR = \"rgba(0, 0, 0, 0.1)\"\n\n// animation\nconst DURATION = 250\n\n// the track always has these props\nconst TRACK = {\n height: THUMB_SIZE + MARGIN,\n width: WIDTH,\n borderRadius: BORDER_RADIUS,\n borderWidth: MARGIN / 2,\n backgroundColor: color.background,\n}\n\n// the thumb always has these props\nconst THUMB: ViewStyle = {\n position: \"absolute\",\n width: THUMB_SIZE,\n height: THUMB_SIZE,\n borderColor: BORDER_OFF_COLOR,\n borderRadius: THUMB_SIZE / 2,\n borderWidth: MARGIN / 2,\n backgroundColor: color.background,\n shadowColor: BORDER_OFF_COLOR,\n shadowOffset: { width: 1, height: 2 },\n shadowOpacity: 1,\n shadowRadius: 2,\n elevation: 2,\n}\n\nconst makeAnimatedValue = (switchOn) => new Animated.Value(switchOn ? 1 : 0)\n\nexport function Switch(props: SwitchProps) {\n const [timer] = React.useState<Animated.Value>(makeAnimatedValue(props.value))\n const startAnimation = React.useMemo(\n () => (newValue: boolean) => {\n const toValue = newValue ? 1 : 0\n const easing = Easing.out(Easing.circle)\n Animated.timing(timer, {\n toValue,\n duration: DURATION,\n easing,\n useNativeDriver: true,\n }).start()\n },\n [timer],\n )\n\n const [previousValue, setPreviousValue] = React.useState<boolean>(props.value)\n React.useEffect(() => {\n if (props.value !== previousValue) {\n startAnimation(props.value)\n setPreviousValue(props.value)\n }\n }, [props.value])\n\n const handlePress = React.useMemo(() => () => props.onToggle && props.onToggle(!props.value), [\n props.onToggle,\n props.value,\n ])\n\n if (!timer) {\n return null\n }\n\n const translateX = timer.interpolate({\n inputRange: [0, 1],\n outputRange: [OFF_POSITION, ON_POSITION],\n })\n\n const style = props.style\n\n const trackStyle = [\n TRACK,\n {\n backgroundColor: props.value ? ON_COLOR : OFF_COLOR,\n borderColor: props.value ? BORDER_ON_COLOR : BORDER_OFF_COLOR,\n },\n props.value ? props.trackOnStyle : props.trackOffStyle,\n ]\n\n const thumbStyle = [\n THUMB,\n {\n transform: [{ translateX }],\n },\n props.value ? props.thumbOnStyle : props.thumbOffStyle,\n ]\n\n return (\n <TouchableWithoutFeedback onPress={handlePress} style={style}>\n <Animated.View style={trackStyle}>\n <Animated.View style={thumbStyle} />\n </Animated.View>\n </TouchableWithoutFeedback>\n )\n}\n","import React from \"react\"\nimport { StyleProp, TextInput, TextInputProps, TextStyle, View, ViewStyle } from \"react-native\"\nimport { color, spacing, typography } from \"../../theme\"\nimport { translate, TxKeyPath } from \"../../i18n\"\nimport { Text } from \"../text/text\"\n\n// the base styling for the container\nconst CONTAINER: ViewStyle = {\n paddingVertical: spacing[3],\n}\n\n// the base styling for the TextInput\nconst INPUT: TextStyle = {\n fontFamily: typography.primary,\n color: color.text,\n minHeight: 44,\n fontSize: 18,\n backgroundColor: color.palette.white,\n}\n\n// currently we have no presets, but that changes quickly when you build your app.\nconst PRESETS: { [name: string]: ViewStyle } = {\n default: {},\n}\n\nexport interface TextFieldProps extends TextInputProps {\n /**\n * The placeholder i18n key.\n */\n placeholderTx?: TxKeyPath\n\n /**\n * The Placeholder text if no placeholderTx is provided.\n */\n placeholder?: string\n\n /**\n * The label i18n key.\n */\n labelTx?: TxKeyPath\n\n /**\n * The label text if no labelTx is provided.\n */\n label?: string\n\n /**\n * Optional container style overrides useful for margins & padding.\n */\n style?: StyleProp<ViewStyle>\n\n /**\n * Optional style overrides for the input.\n */\n inputStyle?: StyleProp<TextStyle>\n\n /**\n * Various look & feels.\n */\n preset?: keyof typeof PRESETS\n\n forwardedRef?: any\n}\n\n/**\n * A component which has a label and an input together.\n */\nexport function TextField(props: TextFieldProps) {\n const {\n placeholderTx,\n placeholder,\n labelTx,\n label,\n preset = \"default\",\n style: styleOverride,\n inputStyle: inputStyleOverride,\n forwardedRef,\n ...rest\n } = props\n\n const containerStyles = [CONTAINER, PRESETS[preset], styleOverride]\n const inputStyles = [INPUT, inputStyleOverride]\n const actualPlaceholder = placeholderTx ? translate(placeholderTx) : placeholder\n\n return (\n <View style={containerStyles}>\n <Text preset=\"fieldLabel\" tx={labelTx} text={label} />\n <TextInput\n placeholder={actualPlaceholder}\n placeholderTextColor={color.palette.lighterGrey}\n underlineColorAndroid={color.transparent}\n {...rest}\n style={inputStyles}\n ref={forwardedRef}\n />\n </View>\n )\n}\n","import { ImageStyle } from \"react-native\"\n\n/**\n * All wallpaper will start off looking like this.\n */\nconst BASE: ImageStyle = {\n position: \"absolute\",\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n}\n\n/**\n * All the variations of wallpaper styling within the app.\n *\n * You want to customize these to whatever you need in your app.\n */\nexport const presets = {\n /**\n * The default wallpaper styles.\n */\n stretch: {\n ...BASE,\n resizeMode: \"stretch\",\n width: null, // Have to set these to null because android ¯\\_(ツ)_/¯\n height: null,\n } as ImageStyle,\n}\n\n/**\n * A list of preset names.\n */\nexport type WallpaperPresets = keyof typeof presets\n","import React from \"react\"\nimport { AutoImage as Image } from \"../auto-image/auto-image\"\nimport { presets } from \"./wallpaper.presets\"\nimport { WallpaperProps } from \"./wallpaper.props\"\n\nconst defaultImage = require(\"./bg.png\")\n\n/**\n * For your text displaying needs.\n *\n * This component is a HOC over the built-in React Native one.\n */\nexport function Wallpaper(props: WallpaperProps) {\n // grab the props\n const { preset = \"stretch\", style: styleOverride, backgroundImage } = props\n\n // assemble the style\n const presetToUse = presets[preset] || presets.stretch\n const styles = [presetToUse, styleOverride]\n\n // figure out which image to use\n const source = backgroundImage || defaultImage\n\n return <Image source={source} style={styles} />\n}\n","import * as React from \"react\"\nimport { useState, useEffect, useRef, useMemo, useCallback } from \"react\"\nimport { StyleProp, TextStyle, View, ViewStyle } from \"react-native\"\nimport { observer } from \"mobx-react-lite\"\nimport { color, typography } from \"../../theme\"\nimport { Text } from \"../\"\nimport { flatten } from \"ramda\"\n\n//import data from \"../../data/miserables.json\"\n//import genRandomTree from \"../../data/randomdata\";\n//import rando from \"../../data/rando.json\"\n\nimport { ForceGraph2D, ForceGraph3D, ForceGraphVR, ForceGraphAR } from \"react-force-graph\"\nimport * as d3 from \"d3-force\"\n\nconst CONTAINER: ViewStyle = {\n justifyContent: \"center\",\n}\n\nconst TEXT: TextStyle = {\n fontFamily: typography.primary,\n fontSize: 14,\n color: color.primary,\n}\n\nexport interface GraphProps {\n /**\n * An optional style override useful for padding & margin.\n */\n style?: StyleProp<ViewStyle>\n physics\n gData\n nodeIds: string[]\n}\n\n/**\n * Describe your component here\n */\nexport const Graph = observer(function Graph(props: GraphProps): JSX.Element {\n const { style, physics, gData, nodeIds } = props\n const styles = flatten([CONTAINER, style])\n\n const fgRef = useRef()\n\n const GROUPS: number = 12\n const NODE_R: number = 8\n //const gData = genRandomTree(200);\n\n //const [charge, setCharge] = useState(-30);\n //const [link, setLink] = useState(-30);\n\n useEffect(() => {\n const fg = fgRef.current\n\n //fg.d3Force('center').strength(0.05);\n fg.d3Force(\"link\").strength(physics.linkStrength)\n fg.d3Force(\"link\").iterations(physics.linkIts)\n physics.collision\n ? fg.d3Force(\"collide\", d3.forceCollide().radius(20))\n : fg.d3Force(\"collide\", null)\n fg.d3Force(\"charge\").strength(physics.charge)\n })\n\n // For the expandable version of the graph\n const rootId = 0\n\n const nodesById = useMemo(() => {\n const nodesById = Object.fromEntries(gData.nodes.map((node) => [node.id, node]))\n\n // link parent/children\n gData.nodes.forEach((node) => {\n node.collapsed = node.id !== rootId\n node.childLinks = []\n node.parentLink = []\n })\n gData.links.forEach((link) => nodesById[link.source].childLinks.push(link))\n\n return nodesById\n }, [gData])\n\n /* const getPrunedTree = useCallback(() => {\n* const visibleNodes = [];\n* const visibleLinks = [];\n* (function traverseTree(node = nodesById[rootId]) {\n* visibleNodes.push(node);\n* if (node.collapsed) return\n* visibleLinks.push(...node.childLinks)\n* node.childLinks\n* .map((link) => (typeof link.target === \"object\" ? link.target : nodesById[link.target])) // get child node\n* .forEach(traverseTree)\n* })()\n\n* return { nodes: visibleNodes, links: visibleLinks }\n* }, [nodesById])\n\n* const [prunedTree, setPrunedTree] = useState(getPrunedTree())\n\n* const handleNodeClick = useCallback((node) => {\n* node.collapsed = !node.collapsed // toggle collapse state\n* setPrunedTree(getPrunedTree())\n* }, []);\n */\n\n // Highlight Graph\n /**\n/* const data = useMemo(() => {\n* // cross-link node objects\n* rando.links.forEach(link => {\n* const a = rando.nodes[link.source];\n* const b = rando.nodes[link.target];\n* !a.neighbors && (a.neighbors = []);\n* !b.neighbors && (b.neighbors = []);\n* a.neighbors.push(b);\n* b.neighbors.push(a);\n*\n* !a.links && (a.links = []);\n* !b.links && (b.links = []);\n* a.links.push(link);\n* b.links.push(link);\n* });\n*\n* return rando;\n* }, []);\n* const [highlightNodes, setHighlightNodes] = useState(new Set());\n* const [highlightLinks, setHighlightLinks] = useState(new Set());\n* const [hoverNode, setHoverNode] = useState(null);\n*\n* const updateHighlight = () => {\n* setHighlightNodes(highlightNodes);\n* setHighlightLinks(highlightLinks);\n* };\n*\n* const handleNodeHover = node => {\n* highlightNodes.clear();\n* highlightLinks.clear();\n* if (node) {\n* highlightNodes.add(node);\n* node.neighbors.forEach(neighbor => highlightNodes.add(neighbor));\n* node.links.forEach(link => highlightLinks.add(link));\n* }\n*\n* setHoverNode(node || null);\n* updateHighlight();\n* };\n*\n* const handleLinkHover = link => {\n* highlightNodes.clear();\n* highlightLinks.clear();\n*\n* if (link) {\n* highlightLinks.add(link);\n* highlightNodes.add(link.source);\n* highlightNodes.add(link.target);\n* }\n*\n* updateHighlight();\n* };\n*\n* const paintRing = useCallback((node, ctx) => {\n* // add ring just for highlighted nodes\n* ctx.beginPath();\n* ctx.arc(node.x, node.y, NODE_R * 1.4, 0, 2 * Math.PI, false);\n* ctx.fillStyle = node === hoverNode ? 'red' : 'orange';\n* ctx.fill();\n* }, [hoverNode]);\n*/\n\n /* autoPauseRedraw={false}\n linkWidth={link => highlightLinks.has(link) ? 5 : 1}\n linkDirectionalParticles={4}\n linkDirectionalParticleWidth={link => highlightLinks.has(link) ? 4 : 0}\n nodeCanvasObjectMode={node => highlightNodes.has(node) ? 'before' : undefined}\n nodeCanvasObject={paintRing}\n onNodeHover={handleNodeHover}\n onLinkHover={handleLinkHover}\n nodeRelSize={NODE_R} */\n\n //nodeColor={(node) =>\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n //}\n return (\n <View>\n {!physics.threedim ? (\n <ForceGraph2D\n ref={fgRef}\n graphData={gData}\n //graphData={physics.collapse ? prunedTree : gData}\n nodeAutoColorBy=\"id\"\n linkAutoColorBy=\"target\"\n //linkAutoColorBy={(d) => gData.nodes[d.source].id % GROUPS}\n linkColor=\"#ffffff\"\n linkDirectionalParticles={physics.particles}\n //onNodeClick={!physics.collapse ? null : handleNodeClick}\n nodeLabel={(node) => node.title}\n //nodeVal ={(node)=> node.childLinks.length * 0.5 + 1}\n //d3VelocityDecay={visco}\n linkWidth={physics.linkWidth}\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n linkDirectionalParticleWidth={physics.particleWidth}\n />\n ) : (\n <ForceGraph3D\n ref={fgRef}\n graphData={gData}\n nodeAutoColorBy=\"group\"\n //graphData={physics.collapse ? prunedTree : gData}\n // nodeAutoColorBy={d => d.id%GROUPS}\n //linkAutoColorBy={(d) => gData.nodes[d.source].id % GROUPS}\n linkColor=\"#ffffff\"\n linkWidth={2}\n linkDirectionalParticles={physics.particles}\n //nodeColor={(node) =>\n // !node.childLinks.length ? \"green\" : node.collapsed ? \"red\" : \"yellow\"\n //}\n //onNodeClick={!physics.collapse ? null : handleNodeClick}\n nodeLabel={node => node.title}\n //nodeVal={(node) => node.childLinks.length + 1}\n //d3VelocityDecay={visco}\n linkWidth={physics.linkWidth}\n linkOpacity={physics.linkOpacity}\n nodeRelSize={physics.nodeRel}\n linkDirectionalParticleWidth={physics.particleWidth}\n backgroundColor=\"#1d1d1d\"\n />\n )}\n </View>\n )\n})\n","import * as React from \"react\"\nimport { ScrollView, StyleProp, Switch, TextStyle, TouchableOpacity, View, ViewStyle, StyleSheet, Button } from \"react-native\"\nimport { observer } from \"mobx-react-lite\"\nimport { color, typography } from \"../../theme\"\nimport { Text } from \"../\"\nimport { flatten } from \"ramda\"\nimport Slider from \"@react-native-community/slider\"\nimport { useState } from \"react\"\nimport Accordion from 'react-native-collapsible/Accordion'\nimport * as Animatable from 'react-native-animatable'\nimport Icon from 'react-native-vector-icons/MaterialCommunityIcons'\n\nconst CONTAINER: ViewStyle = {\n justifyContent: \"center\",\n}\n\nconst TEXT: TextStyle = {\n fontFamily: typography.primary,\n fontSize: 14,\n color: color.primary,\n}\n\nexport interface TweaksProps {\n /**\n * An optional style override useful for padding & margin.\n */\n style?: StyleProp<ViewStyle>\n physics\n setPhysics\n}\n\n/**\n * Describe your component here\n */\nexport const Tweaks = observer(function Tweaks(props: TweaksProps): JSX.Element {\n const { style, physics, setPhysics } = props\n // const styles = flatten([CONTAINER, style])\n\n const content = [\n {\n title: \"Physics\",\n content:\n <View>\n <Text preset=\"fieldLabel\" text={\"Repulsive force: \" + physics.charge} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={-400}\n maximumValue={100}\n onValueChange={(value) => { setPhysics({ ...physics, charge: value }) }}\n value={physics.charge}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Link Force: \" + physics.linkStrength} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={-2}\n maximumValue={2}\n onValueChange={(value) => { setPhysics({ ...physics, linkStrength: value }) }}\n value={physics.linkStrength}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"'Link Iterations': \" + physics.linkIts} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkIts: value }) }}\n value={physics.linkIts}\n step={1} />\n <Text preset=\"fieldLabel\" text=\"Collision\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collision}\n onValueChange={() => { setPhysics({ ...physics, collision: !physics.collision }) }}\n />\n </View>,\n },\n {\n title: 'Visual',\n content:\n <View>\n <Text preset=\"fieldLabel\" text={\"Line Opacity: \" + physics.linkOpacity} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={1}\n onValueChange={(value) => { setPhysics({ ...physics, linkOpacity: value }) }}\n value={physics.linkOpacity}\n step={.01} />\n <Text preset=\"fieldLabel\" text={\"Line width: \" + physics.linkWidth} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={.1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkWidth: value }) }}\n value={physics.linkWidth}\n step={0.1} />\n <Text preset=\"fieldLabel\" text={\"Node size: \" + physics.nodeRel} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, nodeRel: value }) }}\n value={physics.nodeRel}\n step={.01} />\n <Text preset=\"fieldLabel\" text={\"Particles: \" + physics.particles} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, particles: value }) }}\n value={physics.particles}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Particle Size: \" + physics.particleWidth} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, particleWidth: value }) }}\n value={physics.particleWidth}\n step={.1} />\n </View>,\n },\n {\n title: 'Modes',\n content:\n <View>\n <Text preset=\"fieldLabel\" text=\"Expandable Graph\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collapse}\n onValueChange={() => { setPhysics({ ...physics, collapse: !physics.collapse }) }}\n />\n <Text preset=\"fieldLabel\" text=\"3D\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.threedim}\n onValueChange={() => { setPhysics({ ...physics, threedim: !physics.threedim }) }}\n />\n </View>\n },\n ];\n\n const [activeSections, setActiveSections] = useState([]);\n\n const setSections = (sections) => {\n setActiveSections(\n sections.includes(undefined) ? [] : sections\n );\n };\n\n const renderHeader = (section, _, isActive) => {\n return (\n <Animatable.View\n duration={400}\n style={[styles.header, isActive ? styles.active : styles.inactive]}\n transition=\"backgroundColor\"\n >\n <Text style={styles.headerText}>{section.title}</Text>\n </Animatable.View>\n );\n };\n\n const renderContent = (section, _, isActive) => {\n return (\n <Animatable.View\n duration={400}\n style={[styles.content, isActive ? styles.active : styles.inactive]}\n transition=\"backgroundColor\"\n >\n {section.content}\n </Animatable.View>\n );\n }\n const [tweaks, setTweaks] = useState(true);\n if (true) {\n if (tweaks) {\n return (\n <View style={styles.container}>\n <View style={{ height: 30, width: \"100%\", backgroundColor: \"rgb(20,20,20)\" }}>\n <TouchableOpacity style={{ width: 30, color: \"#ffffff\", textAlign: \"center\", marginLeft: \"auto\", padding: 5 }}\n onPress={() => { setTweaks(false) }}>\n <Icon name=\"close-circle\" color=\"#ffffff\" size={20} />\n </TouchableOpacity>\n </View>\n <ScrollView>\n <Accordion\n activeSections={activeSections}\n sections={content}\n touchAbleComponent={TouchableOpacity}\n expandMultiple={true}\n renderHeader={renderHeader}\n renderContent={renderContent}\n duration={200}\n onChange={setSections}\n renderAsFlatList={false}\n\n />\n </ScrollView>\n </View>\n );\n } else {\n return (\n <TouchableOpacity\n onPress={() => { setTweaks(true) }}\n style={{ position: \"absolute\", top: 50, left: 50, width: 30, color: \"#ffffff\", zIndex: 100 }}>\n <Icon name=\"cog\" color=\"#ffffff\" size={30} />\n </TouchableOpacity>\n )\n }\n } else {\n return (\n <View style={{ position: \"absolute\", top: \"5%\", left: \"5%\", zIndex: 100, width: 300, backgroundColor: \"#000000\", padding: 20 }}>\n <Text preset=\"bold\" text=\"Physics\" />\n <Text preset=\"fieldLabel\" text={\"Repulsive force: \" + physics.charge} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={-400}\n maximumValue={100}\n onValueChange={(value) => { setPhysics({ ...physics, charge: value }) }}\n value={physics.charge}\n step={1} />\n <Text preset=\"fieldLabel\" text={\"Link Force: \" + physics.linkStrength} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={2}\n onValueChange={(value) => { setPhysics({ ...physics, linkStrength: value }) }}\n value={physics.linkStrength}\n step={0.1}\n />\n <Text preset=\"fieldLabel\" text={\"'Link Iterations': \" + physics.linkIts} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={1}\n maximumValue={10}\n onValueChange={(value) => { setPhysics({ ...physics, linkIts: value }) }}\n value={physics.linkIts}\n step={1} />\n <Text preset=\"fieldLabel\" text=\"Collision\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collision}\n onValueChange={() => { setPhysics({ ...physics, collision: !physics.collision }) }}\n />\n <Text preset=\"bold\" text=\"Visual\" />\n <Text preset=\"fieldLabel\" text={\"Particles: \" + physics.particles} />\n <Slider style={{ height: 40, width: \"90%\" }}\n minimumValue={0}\n maximumValue={5}\n onValueChange={(value) => { setPhysics({ ...physics, particles: value }) }}\n value={physics.particles}\n step={1} />\n <Text preset=\"bold\" text=\"Modes\" />\n <Text preset=\"fieldLabel\" text=\"Expandable Graph\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.collapse}\n onValueChange={() => { setPhysics({ ...physics, collapse: !physics.collapse }) }}\n />\n <Text preset=\"fieldLabel\" text=\"3D\" />\n <Switch style={{ width: \"5\", height: 20, marginVertical: 10 }}\n value={physics.threedim}\n onValueChange={() => { setPhysics({ ...physics, threedim: !physics.threedim }) }}\n />\n </View>\n );\n }\n})\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: 'rgb(20,20,20)',\n position: \"absolute\",\n zIndex: 100,\n left: 50,\n top: 50,\n width: 250,\n borderRadius: 5,\n borderStyle: \"solid\",\n maxHeight: \"70%\",\n paddingBottom: 20,\n },\n title: {\n textAlign: 'left',\n fontSize: 22,\n fontWeight: '300',\n marginBottom: 20,\n paddingLeft: 20,\n },\n header: {\n backgroundColor: '#111111',\n padding: 10,\n paddingBottom: 20,\n textAlign: \"left\",\n },\n headerText: {\n textAlign: 'left',\n paddingLeft: 30,\n fontSize: 16,\n fontWeight: '500',\n },\n content: {\n padding: 20,\n paddingLeft: 60,\n backgroundColor: '#000000',\n },\n active: {\n backgroundColor: 'rgba(0,0,0,1)',\n },\n inactive: {\n backgroundColor: 'rgba(20,20,20,1)',\n },\n selectors: {\n marginBottom: 10,\n flexDirection: 'row',\n justifyContent: 'center',\n },\n selector: {\n backgroundColor: '#111111',\n padding: 10,\n },\n activeSelector: {\n fontWeight: 'bold',\n },\n selectTitle: {\n fontSize: 14,\n fontWeight: '500',\n padding: 10,\n },\n multipleToggle: {\n flexDirection: 'row',\n justifyContent: 'center',\n marginVertical: 30,\n alignItems: 'center',\n },\n multipleToggle__title: {\n fontSize: 16,\n marginRight: 8,\n },\n});\n","import React from \"react\"\nimport { View, ViewStyle, TextStyle, ImageStyle, SafeAreaView } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport { Button, Header, Screen, Text, Wallpaper, AutoImage as Image } from \"../../components\"\nimport { color, spacing, typography } from \"../../theme\"\nconst bowserLogo = require(\"./bowser.png\")\n\nconst FULL: ViewStyle = { flex: 1 }\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n paddingHorizontal: spacing[4],\n}\nconst TEXT: TextStyle = {\n color: color.palette.white,\n fontFamily: typography.primary,\n}\nconst BOLD: TextStyle = { fontWeight: \"bold\" }\nconst HEADER: TextStyle = {\n paddingTop: spacing[3],\n paddingBottom: spacing[4] + spacing[1],\n paddingHorizontal: 0,\n}\nconst HEADER_TITLE: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 12,\n lineHeight: 15,\n textAlign: \"center\",\n letterSpacing: 1.5,\n}\nconst TITLE_WRAPPER: TextStyle = {\n ...TEXT,\n textAlign: \"center\",\n}\nconst TITLE: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 28,\n lineHeight: 38,\n textAlign: \"center\",\n}\nconst ALMOST: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 26,\n fontStyle: \"italic\",\n}\nconst BOWSER: ImageStyle = {\n alignSelf: \"center\",\n marginVertical: spacing[5],\n maxWidth: \"100%\",\n width: 343,\n height: 230,\n}\nconst CONTENT: TextStyle = {\n ...TEXT,\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n marginBottom: spacing[5],\n}\nconst CONTINUE: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n backgroundColor: color.palette.deepPurple,\n}\nconst CONTINUE_TEXT: TextStyle = {\n ...TEXT,\n ...BOLD,\n fontSize: 13,\n letterSpacing: 2,\n}\nconst FOOTER: ViewStyle = { backgroundColor: \"#20162D\" }\nconst FOOTER_CONTENT: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n}\n\nexport const WelcomeScreen = observer(function WelcomeScreen() {\n const navigation = useNavigation()\n const nextScreen = () => navigation.navigate(\"demo\")\n\n return (\n <View testID=\"WelcomeScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"scroll\" backgroundColor={color.transparent}>\n <Header headerTx=\"welcomeScreen.poweredBy\" style={HEADER} titleStyle={HEADER_TITLE} />\n <Text style={TITLE_WRAPPER}>\n <Text style={TITLE} text=\"Your new app, \" />\n <Text style={ALMOST} text=\"almost\" />\n <Text style={TITLE} text=\"!\" />\n </Text>\n <Text style={TITLE} preset=\"header\" tx=\"welcomeScreen.readyForLaunch\" />\n <Image source={bowserLogo} style={BOWSER} />\n <Text style={CONTENT}>\n This probably isn't what your app is going to look like. Unless your designer handed you\n this screen and, in that case, congrats! You're ready to ship.\n </Text>\n <Text style={CONTENT}>\n For everyone else, this is where you'll see a live preview of your fully functioning app\n using Ignite.\n </Text>\n </Screen>\n <SafeAreaView style={FOOTER}>\n <View style={FOOTER_CONTENT}>\n <Button\n testID=\"next-screen-button\"\n style={CONTINUE}\n textStyle={CONTINUE_TEXT}\n tx=\"welcomeScreen.continue\"\n onPress={nextScreen}\n />\n </View>\n </SafeAreaView>\n </View>\n )\n})\n","import { ApiResponse } from \"apisauce\"\n\nexport type GeneralApiProblem =\n /**\n * Times up.\n */\n | { kind: \"timeout\"; temporary: true }\n /**\n * Cannot connect to the server for some reason.\n */\n | { kind: \"cannot-connect\"; temporary: true }\n /**\n * The server experienced a problem. Any 5xx error.\n */\n | { kind: \"server\" }\n /**\n * We're not allowed because we haven't identified ourself. This is 401.\n */\n | { kind: \"unauthorized\" }\n /**\n * We don't have access to perform that request. This is 403.\n */\n | { kind: \"forbidden\" }\n /**\n * Unable to find that resource. This is a 404.\n */\n | { kind: \"not-found\" }\n /**\n * All other 4xx series errors.\n */\n | { kind: \"rejected\" }\n /**\n * Something truly unexpected happened. Most likely can try again. This is a catch all.\n */\n | { kind: \"unknown\"; temporary: true }\n /**\n * The data we received is not in the expected format.\n */\n | { kind: \"bad-data\" }\n\n/**\n * Attempts to get a common cause of problems from an api response.\n *\n * @param response The api response.\n */\nexport function getGeneralApiProblem(response: ApiResponse<any>): GeneralApiProblem | void {\n switch (response.problem) {\n case \"CONNECTION_ERROR\":\n return { kind: \"cannot-connect\", temporary: true }\n case \"NETWORK_ERROR\":\n return { kind: \"cannot-connect\", temporary: true }\n case \"TIMEOUT_ERROR\":\n return { kind: \"timeout\", temporary: true }\n case \"SERVER_ERROR\":\n return { kind: \"server\" }\n case \"UNKNOWN_ERROR\":\n return { kind: \"unknown\", temporary: true }\n case \"CLIENT_ERROR\":\n switch (response.status) {\n case 401:\n return { kind: \"unauthorized\" }\n case 403:\n return { kind: \"forbidden\" }\n case 404:\n return { kind: \"not-found\" }\n default:\n return { kind: \"rejected\" }\n }\n case \"CANCEL_ERROR\":\n return null\n }\n\n return null\n}\n","// Use this import if you want to use \"env.js\" file\n// const { API_URL } = require(\"../../config/env\")\n// Or just specify it directly like this:\nconst API_URL = \"http://example.com\"\n\n/**\n * The options used to configure the API.\n */\nexport interface ApiConfig {\n /**\n * The URL of the api.\n */\n url: string\n\n /**\n * Milliseconds before we timeout the request.\n */\n timeout: number\n}\n\n/**\n * The default configuration for the app.\n */\nexport const DEFAULT_API_CONFIG: ApiConfig = {\n url: API_URL || \"https://jsonplaceholder.typicode.com\",\n timeout: 10000,\n}\n","import { ApisauceInstance, create, ApiResponse } from \"apisauce\"\nimport { getGeneralApiProblem } from \"./api-problem\"\nimport { ApiConfig, DEFAULT_API_CONFIG } from \"./api-config\"\nimport * as Types from \"./api.types\"\n\n/**\n * Manages all requests to the API.\n */\nexport class Api {\n /**\n * The underlying apisauce instance which performs the requests.\n */\n apisauce: ApisauceInstance\n\n /**\n * Configurable options.\n */\n config: ApiConfig\n\n /**\n * Creates the api.\n *\n * @param config The configuration to use.\n */\n constructor(config: ApiConfig = DEFAULT_API_CONFIG) {\n this.config = config\n }\n\n /**\n * Sets up the API. This will be called during the bootup\n * sequence and will happen before the first React component\n * is mounted.\n *\n * Be as quick as possible in here.\n */\n setup() {\n // construct the apisauce instance\n this.apisauce = create({\n baseURL: this.config.url,\n timeout: this.config.timeout,\n headers: {\n Accept: \"application/json\",\n },\n })\n }\n\n /**\n * Gets a list of users.\n */\n async getUsers(): Promise<Types.GetUsersResult> {\n // make the api call\n const response: ApiResponse<any> = await this.apisauce.get(`/users`)\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n const convertUser = (raw) => {\n return {\n id: raw.id,\n name: raw.name,\n }\n }\n\n // transform the data into the format we are expecting\n try {\n const rawUsers = response.data\n const resultUsers: Types.User[] = rawUsers.map(convertUser)\n return { kind: \"ok\", users: resultUsers }\n } catch {\n return { kind: \"bad-data\" }\n }\n }\n\n /**\n * Gets a single user by ID\n */\n\n async getUser(id: string): Promise<Types.GetUserResult> {\n // make the api call\n const response: ApiResponse<any> = await this.apisauce.get(`/users/${id}`)\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n // transform the data into the format we are expecting\n try {\n const resultUser: Types.User = {\n id: response.data.id,\n name: response.data.name,\n }\n return { kind: \"ok\", user: resultUser }\n } catch {\n return { kind: \"bad-data\" }\n }\n }\n}\n","import React from \"react\"\nimport { ImageStyle, Platform, TextStyle, View, ViewStyle } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport {\n BulletItem,\n Button,\n Header,\n Text,\n Screen,\n Wallpaper,\n AutoImage as Image,\n} from \"../../components\"\nimport { color, spacing } from \"../../theme\"\nimport { Api } from \"../../services/api\"\nimport { save } from \"../../utils/storage\"\nexport const logoIgnite = require(\"./logo-ignite.png\")\nexport const heart = require(\"./heart.png\")\n\nconst FULL: ViewStyle = { flex: 1 }\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n paddingHorizontal: spacing[4],\n}\nconst DEMO: ViewStyle = {\n paddingVertical: spacing[4],\n paddingHorizontal: spacing[4],\n backgroundColor: color.palette.deepPurple,\n}\nconst BOLD: TextStyle = { fontWeight: \"bold\" }\nconst DEMO_TEXT: TextStyle = {\n ...BOLD,\n fontSize: 13,\n letterSpacing: 2,\n}\nconst HEADER: TextStyle = {\n paddingTop: spacing[3],\n paddingBottom: spacing[5] - 1,\n paddingHorizontal: 0,\n}\nconst HEADER_TITLE: TextStyle = {\n ...BOLD,\n fontSize: 12,\n lineHeight: 15,\n textAlign: \"center\",\n letterSpacing: 1.5,\n}\nconst TITLE: TextStyle = {\n ...BOLD,\n fontSize: 28,\n lineHeight: 38,\n textAlign: \"center\",\n marginBottom: spacing[5],\n}\nconst TAGLINE: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n marginBottom: spacing[4] + spacing[1],\n}\nconst IGNITE: ImageStyle = {\n marginVertical: spacing[6],\n alignSelf: \"center\",\n width: 180,\n height: 100,\n}\nconst LOVE_WRAPPER: ViewStyle = {\n flexDirection: \"row\",\n alignItems: \"center\",\n alignSelf: \"center\",\n}\nconst LOVE: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 15,\n lineHeight: 22,\n}\nconst HEART: ImageStyle = {\n marginHorizontal: spacing[2],\n width: 10,\n height: 10,\n resizeMode: \"contain\",\n}\nconst HINT: TextStyle = {\n color: \"#BAB6C8\",\n fontSize: 12,\n lineHeight: 15,\n marginVertical: spacing[2],\n}\n\nconst platformCommand = Platform.select({\n ios: \"Cmd + D\",\n android: \"Cmd/Ctrl + M\",\n})\n\nexport const DemoScreen = observer(function DemoScreen() {\n const navigation = useNavigation()\n const goBack = () => navigation.goBack()\n\n const demoReactotron = React.useMemo(\n () => async () => {\n console.tron.log(\"Your Friendly tron log message\")\n console.tron.logImportant(\"I am important\")\n console.tron.display({\n name: \"DISPLAY\",\n value: {\n numbers: 1,\n strings: \"strings\",\n booleans: true,\n arrays: [1, 2, 3],\n objects: {\n deeper: {\n deeper: {\n yay: \"👾\",\n },\n },\n },\n functionNames: function hello() {\n /* dummy function */\n },\n },\n preview: \"More control with display()\",\n important: true,\n image: {\n uri:\n \"https://avatars2.githubusercontent.com/u/3902527?s=200&u=a0d16b13ed719f35d95ca0f4440f5d07c32c349a&v=4\",\n },\n })\n // make an API call for the demo\n // Don't do API like this, use store's API\n const demo = new Api()\n demo.setup()\n demo.getUser(\"1\")\n // Let's do some async storage stuff\n await save(\"Cool Name\", \"Boaty McBoatface\")\n },\n [],\n )\n\n return (\n <View testID=\"DemoScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"scroll\" backgroundColor={color.transparent}>\n <Header\n headerTx=\"demoScreen.howTo\"\n leftIcon=\"back\"\n onLeftPress={goBack}\n style={HEADER}\n titleStyle={HEADER_TITLE}\n />\n <Text style={TITLE} preset=\"header\" tx=\"demoScreen.title\" />\n <Text style={TAGLINE} tx=\"demoScreen.tagLine\" />\n <BulletItem text=\"Integrated here, Navigation with State, TypeScript, Storybook, Solidarity, and i18n.\" />\n <BulletItem\n text={`To run Storybook, press ${platformCommand} or shake the device to show the developer menu, then select \"Toggle Storybook\"`}\n />\n <BulletItem text=\"Load up Reactotron! You can inspect your app, view the events, interact, and so much more!\" />\n <View>\n <Button\n style={DEMO}\n textStyle={DEMO_TEXT}\n tx=\"demoScreen.reactotron\"\n onPress={demoReactotron}\n />\n <Text style={HINT} tx={`demoScreen.${Platform.OS}ReactotronHint` as const} />\n </View>\n <Button\n style={DEMO}\n textStyle={DEMO_TEXT}\n tx=\"demoScreen.demoList\"\n onPress={() => navigation.navigate(\"demoList\")}\n />\n <Image source={logoIgnite} style={IGNITE} />\n <View style={LOVE_WRAPPER}>\n <Text style={LOVE} text=\"Made with\" />\n <Image source={heart} style={HEART} />\n <Text style={LOVE} text=\"by Infinite Red\" />\n </View>\n </Screen>\n </View>\n )\n})\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\n\n/**\n * Rick and Morty character model.\n */\nexport const CharacterModel = types.model(\"Character\").props({\n id: types.identifierNumber,\n name: types.maybe(types.string),\n status: types.maybe(types.string),\n image: types.maybe(types.string),\n})\n\ntype CharacterType = Instance<typeof CharacterModel>\nexport interface Character extends CharacterType {}\ntype CharacterSnapshotType = SnapshotOut<typeof CharacterModel>\nexport interface CharacterSnapshot extends CharacterSnapshotType {}\nexport const createCharacterDefaultModel = () => types.optional(CharacterModel, {})\n","import { ApiResponse } from \"apisauce\"\nimport { Api } from \"./api\"\nimport { GetCharactersResult } from \"./api.types\"\nimport { getGeneralApiProblem } from \"./api-problem\"\n\nconst API_PAGE_SIZE = 50\n\nexport class CharacterApi {\n private api: Api\n\n constructor(api: Api) {\n this.api = api\n }\n\n async getCharacters(): Promise<GetCharactersResult> {\n try {\n // make the api call\n const response: ApiResponse<any> = await this.api.apisauce.get(\n \"https://raw.githubusercontent.com/infinitered/ignite/master/data/rick-and-morty.json\",\n { amount: API_PAGE_SIZE },\n )\n\n // the typical ways to die when calling an api\n if (!response.ok) {\n const problem = getGeneralApiProblem(response)\n if (problem) return problem\n }\n\n const characters = response.data.results\n\n return { kind: \"ok\", characters }\n } catch (e) {\n __DEV__ && console.tron.log(e.message)\n return { kind: \"bad-data\" }\n }\n }\n}\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\nimport { CharacterModel, CharacterSnapshot } from \"../character/character\"\nimport { CharacterApi } from \"../../services/api/character-api\"\nimport { withEnvironment } from \"../extensions/with-environment\"\n\n/**\n * Example store containing Rick and Morty characters\n */\nexport const CharacterStoreModel = types\n .model(\"CharacterStore\")\n .props({\n characters: types.optional(types.array(CharacterModel), []),\n })\n .extend(withEnvironment)\n .actions((self) => ({\n saveCharacters: (characterSnapshots: CharacterSnapshot[]) => {\n self.characters.replace(characterSnapshots)\n },\n }))\n .actions((self) => ({\n getCharacters: async () => {\n const characterApi = new CharacterApi(self.environment.api)\n const result = await characterApi.getCharacters()\n\n if (result.kind === \"ok\") {\n self.saveCharacters(result.characters)\n } else {\n __DEV__ && console.tron.log(result.kind)\n }\n },\n }))\n\ntype CharacterStoreType = Instance<typeof CharacterStoreModel>\nexport interface CharacterStore extends CharacterStoreType {}\ntype CharacterStoreSnapshotType = SnapshotOut<typeof CharacterStoreModel>\nexport interface CharacterStoreSnapshot extends CharacterStoreSnapshotType {}\nexport const createCharacterStoreDefaultModel = () => types.optional(CharacterStoreModel, {})\n","import { getEnv, IStateTreeNode } from \"mobx-state-tree\"\nimport { Environment } from \"../environment\"\n\n/**\n * Adds a environment property to the node for accessing our\n * Environment in strongly typed.\n */\nexport const withEnvironment = (self: IStateTreeNode) => ({\n views: {\n /**\n * The environment.\n */\n get environment() {\n return getEnv<Environment>(self)\n },\n },\n})\n","import { Instance, SnapshotOut, types } from \"mobx-state-tree\"\nimport { CharacterStoreModel } from \"../character-store/character-store\"\n\n/**\n * A RootStore model.\n */\n// prettier-ignore\nexport const RootStoreModel = types.model(\"RootStore\").props({\n characterStore: types.optional(CharacterStoreModel, {} as any),\n})\n\n/**\n * The RootStore instance.\n */\nexport interface RootStore extends Instance<typeof RootStoreModel> {}\n\n/**\n * The data of a RootStore.\n */\nexport interface RootStoreSnapshot extends SnapshotOut<typeof RootStoreModel> {}\n","import { createContext, useContext } from \"react\"\nimport { RootStore } from \"./root-store\"\n\n/**\n * Create a context we can use to\n * - Provide access to our stores from our root component\n * - Consume stores in our screens (or other components, though it's\n * preferable to just connect screens)\n */\nconst RootStoreContext = createContext<RootStore>({} as RootStore)\n\n/**\n * The provider our root component will use to expose the root store\n */\nexport const RootStoreProvider = RootStoreContext.Provider\n\n/**\n * A hook that screens can use to gain access to our stores, with\n * `const { someStore, someOtherStore } = useStores()`,\n * or less likely: `const rootStore = useStores()`\n */\nexport const useStores = () => useContext(RootStoreContext)\n","import { Api } from \"../services/api\"\n\nlet ReactotronDev\nif (__DEV__) {\n const { Reactotron } = require(\"../services/reactotron\")\n ReactotronDev = Reactotron\n}\n\n/**\n * The environment is a place where services and shared dependencies between\n * models live. They are made available to every model via dependency injection.\n */\nexport class Environment {\n constructor() {\n // create each service\n if (__DEV__) {\n // dev-only services\n this.reactotron = new ReactotronDev()\n }\n this.api = new Api()\n }\n\n async setup() {\n // allow each service to setup\n if (__DEV__) {\n await this.reactotron.setup()\n }\n await this.api.setup()\n }\n\n /**\n * Reactotron is only available in dev.\n */\n reactotron: typeof ReactotronDev\n\n /**\n * Our api.\n */\n api: Api\n}\n","import { onSnapshot } from \"mobx-state-tree\"\nimport { RootStoreModel, RootStore } from \"./root-store\"\nimport { Environment } from \"../environment\"\nimport * as storage from \"../../utils/storage\"\n\n/**\n * The key we'll be saving our state as within async storage.\n */\nconst ROOT_STATE_STORAGE_KEY = \"root\"\n\n/**\n * Setup the environment that all the models will be sharing.\n *\n * The environment includes other functions that will be picked from some\n * of the models that get created later. This is how we loosly couple things\n * like events between models.\n */\nexport async function createEnvironment() {\n const env = new Environment()\n await env.setup()\n return env\n}\n\n/**\n * Setup the root state.\n */\nexport async function setupRootStore() {\n let rootStore: RootStore\n let data: any\n\n // prepare the environment that will be associated with the RootStore.\n const env = await createEnvironment()\n try {\n // load data from storage\n data = (await storage.load(ROOT_STATE_STORAGE_KEY)) || {}\n rootStore = RootStoreModel.create(data, env)\n } catch (e) {\n // if there's any problems loading, then let's at least fallback to an empty state\n // instead of crashing.\n rootStore = RootStoreModel.create({}, env)\n\n // but please inform us what happened\n __DEV__ && console.tron.error(e.message, null)\n }\n\n // reactotron logging\n if (__DEV__) {\n env.reactotron.setRootStore(rootStore, data)\n }\n\n // track changes & save to storage\n onSnapshot(rootStore, (snapshot) => storage.save(ROOT_STATE_STORAGE_KEY, snapshot))\n\n return rootStore\n}\n","import React, { useEffect } from \"react\"\nimport { FlatList, TextStyle, View, ViewStyle, ImageStyle } from \"react-native\"\nimport { useNavigation } from \"@react-navigation/native\"\nimport { observer } from \"mobx-react-lite\"\nimport { Header, Screen, Text, Wallpaper, AutoImage as Image } from \"../../components\"\nimport { color, spacing } from \"../../theme\"\nimport { useStores } from \"../../models\"\n\nconst FULL: ViewStyle = {\n flex: 1,\n}\nconst CONTAINER: ViewStyle = {\n backgroundColor: color.transparent,\n}\nconst HEADER: TextStyle = {\n paddingBottom: spacing[5] - 1,\n paddingHorizontal: spacing[4],\n paddingTop: spacing[3],\n}\nconst HEADER_TITLE: TextStyle = {\n fontSize: 12,\n fontWeight: \"bold\",\n letterSpacing: 1.5,\n lineHeight: 15,\n textAlign: \"center\",\n}\nconst LIST_CONTAINER: ViewStyle = {\n alignItems: \"center\",\n flexDirection: \"row\",\n padding: 10,\n}\nconst IMAGE: ImageStyle = {\n borderRadius: 35,\n height: 65,\n width: 65,\n}\nconst LIST_TEXT: TextStyle = {\n marginLeft: 10,\n}\nconst FLAT_LIST: ViewStyle = {\n paddingHorizontal: spacing[4],\n}\n\nexport const DemoListScreen = observer(function DemoListScreen() {\n const navigation = useNavigation()\n const goBack = () => navigation.goBack()\n\n const { characterStore } = useStores()\n const { characters } = characterStore\n\n useEffect(() => {\n async function fetchData() {\n await characterStore.getCharacters()\n }\n\n fetchData()\n }, [])\n\n return (\n <View testID=\"DemoListScreen\" style={FULL}>\n <Wallpaper />\n <Screen style={CONTAINER} preset=\"fixed\" backgroundColor={color.transparent}>\n <Header\n headerTx=\"demoListScreen.title\"\n leftIcon=\"back\"\n onLeftPress={goBack}\n style={HEADER}\n titleStyle={HEADER_TITLE}\n />\n <FlatList\n contentContainerStyle={FLAT_LIST}\n data={[...characters]}\n keyExtractor={(item) => String(item.id)}\n renderItem={({ item }) => (\n <View style={LIST_CONTAINER}>\n <Image source={{ uri: item.image }} style={IMAGE} />\n <Text style={LIST_TEXT}>\n {item.name} ({item.status})\n </Text>\n </View>\n )}\n />\n </Screen>\n </View>\n )\n})\n","import React, { useEffect, useState } from \"react\"\nimport { observer } from \"mobx-react-lite\"\nimport { ViewStyle } from \"react-native\"\nimport { Screen, Text } from \"../../components\"\n// import { useNavigation } from \"@react-navigation/native\"\n// import { useStores } from \"../../models\"\nimport { color } from \"../../theme\"\n\nimport { Graph } from \"../../components\"\nimport { Tweaks } from \"../../components\"\n\nimport genRandomTree from \"../../data/randomdata\"\n\nimport AsyncStorage from \"@react-native-async-storage/async-storage\"\n\nimport axios from \"axios\";\n\nimport rando from \"../../data/rando.json\"\n\nconst ROOT: ViewStyle = {\n backgroundColor: color.palette.black,\n flex: 1,\n}\n\nexport const GraphScreen = observer(function GraphScreen() {\n // Pull in one of our MST stores\n // const { someStore, anotherStore } = useStores()\n\n // Pull in navigation via hook\n // const navigation = useNavigation()\n\n\n const [physics, setPhysics] = useState({})\n const [graphData, setGraphData] = useState();\n const [nodeIds, setNodeIds] = useState([]);\n // { \"nodes\": [{ \"id\": 1 }, { \"id\": 2 }], \"links\": [{ \"target\": 1, \"source\": 2 }] });\n const physicsInit = {\n charge: -30,\n collision: false,\n linkStrength: 1,\n linkIts: 1,\n collapse: false,\n threedim: false,\n particles: 2,\n linkOpacity: 1,\n linkWidth: 1,\n particleWidth: 1,\n nodeRel: 1,\n }\n\n const getData = async () => {\n try {\n const value: string = await AsyncStorage.getItem(\"@physics\");\n if (value !== null) {\n const valueJson = JSON.parse(value);\n if (Object.keys(valueJson).length === Object.keys(physicsInit).length) {\n return valueJson;\n } else { return physicsInit };\n } else {\n return physicsInit\n }\n } catch (e) {\n console.log(e)\n }\n }\n const storeData = async (value) => {\n try {\n const jsonValue = JSON.stringify(value)\n await AsyncStorage.mergeItem(\"@physics\", jsonValue)\n console.log(\"Writing \" + jsonValue)\n } catch (e) {\n console.log(e)\n }\n }\n\n // hook to save the current configuration of the physics tweaks\n // after it is updated\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n // set timer so the thing doesn't run every single slider tick\n const timer = setTimeout(() => {\n storeData(physics)\n const test = getData()\n console.log(test)\n }, 1000)\n return () => clearTimeout(timer)\n }, [physics]);\n\n //\"ComponentOnMount\"\n // Get previous settings and the data from the org-roam-server\n const sanitizeGraph = (data, nodeIds: string[]) => {\n const cleanLinks = [];\n data.links.forEach((link, i) => {\n for (i=0; i<=nodeIds.length; i++){\n if (link.target === nodeIds[i]) {\n cleanLinks.push(link);\n break;\n };\n };\n });\n console.log(cleanLinks);\n data.links = cleanLinks;\n return data;\n };\n\n const getNodesById = (data) => {\n let temp = [];\n data.nodes.forEach(node => temp.push(node.id));\n setNodeIds(temp);\n return temp;\n };\n\n useEffect(() => {\n getData().then((data) => setPhysics(data));\n axios.get(\"http://localhost:35901/graph\")\n .then((dataa) => {\n let nods = getNodesById(dataa.data);\n setNodeIds(nods);\n console.log(nodeIds);\n let cleanData = sanitizeGraph(dataa.data, nods);\n console.log(cleanData)\n setGraphData(cleanData);\n })\n .catch((e) => {\n console.log(e);\n console.log(\"Couldn't get data.\");\n //setGraphData(rando);\n });\n }, [])\n if (!graphData) { return null }\n else {\n return (\n <Screen style={ROOT} preset=\"scroll\">\n <Tweaks physics={physics} setPhysics={setPhysics} />\n <Graph physics={physics} gData={graphData} nodeIds={nodeIds}/>\n </Screen>\n )\n }\n })\n","/**\n * This is the navigator you will modify to display the logged-in screens of your app.\n * You can use RootNavigator to also display an auth flow or other user flows.\n *\n * You'll likely spend most of your time in this file.\n */\nimport React from \"react\"\nimport { createStackNavigator } from \"@react-navigation/stack\"\nimport { WelcomeScreen, DemoScreen, DemoListScreen, GraphScreen } from \"../screens\"\n\n/**\n * This type allows TypeScript to know what routes are defined in this navigator\n * as well as what properties (if any) they might take when navigating to them.\n *\n * If no params are allowed, pass through `undefined`. Generally speaking, we\n * recommend using your MobX-State-Tree store(s) to keep application state\n * rather than passing state through navigation params.\n *\n * For more information, see this documentation:\n * https://reactnavigation.org/docs/params/\n * https://reactnavigation.org/docs/typescript#type-checking-the-navigator\n */\nexport type PrimaryParamList = {\n welcome: undefined\n demo: undefined\n demoList: undefined\n graph: undefined\n}\n\n// Documentation: https://reactnavigation.org/docs/stack-navigator/\nconst Stack = createStackNavigator<PrimaryParamList>()\n\nexport function MainNavigator() {\n return (\n <Stack.Navigator\n screenOptions={{\n cardStyle: { backgroundColor: \"transparent\" },\n headerShown: false,\n }}\n >\n <Stack.Screen name=\"graph\" component={GraphScreen}/>\n </Stack.Navigator>\n )\n}\n\n/**\n <Stack.Screen name=\"welcome\" component={WelcomeScreen} />\n <Stack.Screen name=\"demo\" component={DemoScreen} />\n <Stack.Screen name=\"demoList\" component={DemoListScreen} />\n * A list of routes from which we're allowed to leave the app when\n * the user presses the back button on Android.\n *\n * Anything not on this list will be a standard `back` action in\n * react-navigation.\n *\n * `canExit` is used in ./app/app.tsx in the `useBackButtonHandler` hook.\n */\nconst exitRoutes = [\"welcome\"]\nexport const canExit = (routeName: string) => exitRoutes.includes(routeName)\n","/**\n * The root navigator is used to switch between major navigation flows of your app.\n * Generally speaking, it will contain an auth flow (registration, login, forgot password)\n * and a \"main\" flow (which is contained in your MainNavigator) which the user\n * will use once logged in.\n */\nimport React from \"react\"\nimport { NavigationContainer, NavigationContainerRef } from \"@react-navigation/native\"\nimport { createStackNavigator } from \"@react-navigation/stack\"\nimport { MainNavigator } from \"./main-navigator\"\nimport { color } from \"../theme\"\n\n/**\n * This type allows TypeScript to know what routes are defined in this navigator\n * as well as what properties (if any) they might take when navigating to them.\n *\n * We recommend using MobX-State-Tree store(s) to handle state rather than navigation params.\n *\n * For more information, see this documentation:\n * https://reactnavigation.org/docs/params/\n * https://reactnavigation.org/docs/typescript#type-checking-the-navigator\n */\nexport type RootParamList = {\n mainStack: undefined\n}\n\nconst Stack = createStackNavigator<RootParamList>()\n\nconst RootStack = () => {\n return (\n <Stack.Navigator\n screenOptions={{\n cardStyle: { backgroundColor: color.palette.deepPurple },\n headerShown: false,\n }}\n >\n <Stack.Screen\n name=\"mainStack\"\n component={MainNavigator}\n options={{\n headerShown: false,\n }}\n />\n </Stack.Navigator>\n )\n}\n\nexport const RootNavigator = React.forwardRef<\n NavigationContainerRef,\n Partial<React.ComponentProps<typeof NavigationContainer>>\n>((props, ref) => {\n return (\n <NavigationContainer {...props} ref={ref}>\n <RootStack />\n </NavigationContainer>\n )\n})\n\nRootNavigator.displayName = \"RootNavigator\"\n","import React, { useState, useEffect, useRef } from \"react\"\nimport { BackHandler } from \"react-native\"\nimport { PartialState, NavigationState, NavigationContainerRef } from \"@react-navigation/native\"\n\nexport const RootNavigation = {\n navigate(name: string) {\n name // eslint-disable-line no-unused-expressions\n },\n goBack() {}, // eslint-disable-line @typescript-eslint/no-empty-function\n resetRoot(state?: PartialState<NavigationState> | NavigationState) {}, // eslint-disable-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function\n getRootState(): NavigationState {\n return {} as any\n },\n}\n\nexport const setRootNavigation = (ref: React.RefObject<NavigationContainerRef>) => {\n for (const method in RootNavigation) {\n RootNavigation[method] = (...args: any) => {\n if (ref.current) {\n return ref.current[method](...args)\n }\n }\n }\n}\n\n/**\n * Gets the current screen from any navigation state.\n */\nexport function getActiveRouteName(state: NavigationState | PartialState<NavigationState>) {\n const route = state.routes[state.index]\n\n // Found the active route -- return the name\n if (!route.state) return route.name\n\n // Recursive call to deal with nested routers\n return getActiveRouteName(route.state)\n}\n\n/**\n * Hook that handles Android back button presses and forwards those on to\n * the navigation or allows exiting the app.\n */\nexport function useBackButtonHandler(\n ref: React.RefObject<NavigationContainerRef>,\n canExit: (routeName: string) => boolean,\n) {\n const canExitRef = useRef(canExit)\n\n useEffect(() => {\n canExitRef.current = canExit\n }, [canExit])\n\n useEffect(() => {\n // We'll fire this when the back button is pressed on Android.\n const onBackPress = () => {\n const navigation = ref.current\n\n if (navigation == null) {\n return false\n }\n\n // grab the current route\n const routeName = getActiveRouteName(navigation.getRootState())\n\n // are we allowed to exit?\n if (canExitRef.current(routeName)) {\n // let the system know we've not handled this event\n return false\n }\n\n // we can't exit, so let's turn this into a back action\n if (navigation.canGoBack()) {\n navigation.goBack()\n\n return true\n }\n\n return false\n }\n\n // Subscribe when we come to life\n BackHandler.addEventListener(\"hardwareBackPress\", onBackPress)\n\n // Unsubscribe when we're done\n return () => BackHandler.removeEventListener(\"hardwareBackPress\", onBackPress)\n }, [ref])\n}\n\n/**\n * Custom hook for persisting navigation state.\n */\nexport function useNavigationPersistence(storage: any, persistenceKey: string) {\n const [initialNavigationState, setInitialNavigationState] = useState()\n const [isRestoringNavigationState, setIsRestoringNavigationState] = useState(true)\n\n const routeNameRef = useRef()\n const onNavigationStateChange = (state) => {\n const previousRouteName = routeNameRef.current\n const currentRouteName = getActiveRouteName(state)\n\n if (previousRouteName !== currentRouteName) {\n // track screens.\n __DEV__ && console.tron.log(currentRouteName)\n }\n\n // Save the current route name for later comparision\n routeNameRef.current = currentRouteName\n\n // Persist state to storage\n storage.save(persistenceKey, state)\n }\n\n const restoreState = async () => {\n try {\n const state = await storage.load(persistenceKey)\n if (state) setInitialNavigationState(state)\n } finally {\n setIsRestoringNavigationState(false)\n }\n }\n\n useEffect(() => {\n if (isRestoringNavigationState) restoreState()\n }, [isRestoringNavigationState])\n\n return { onNavigationStateChange, restoreState, initialNavigationState }\n}\n","import React, { useState, useEffect } from \"react\"\nimport * as QueryString from \"query-string\"\n\ninterface StorybookQueryParams {\n storybook?: boolean\n}\n\nexport const ToggleStorybook = (props) => {\n const [StorybookUIRoot, setStorybookUIRoot] = useState<any>(null)\n const [queryParams, setQueryParams] = useState<StorybookQueryParams>({})\n\n useEffect(() => {\n if (__DEV__) {\n // Load the storybook UI once\n setStorybookUIRoot(() => require(\"./storybook\").StorybookUIRoot)\n }\n }, [])\n\n useEffect(() => {\n if (__DEV__) {\n setQueryParams(QueryString.parse(window.location.search))\n }\n }, [window.location.search])\n\n if (queryParams?.storybook) {\n return StorybookUIRoot ? <StorybookUIRoot /> : null\n } else {\n return props.children\n }\n}\n","/**\n * Welcome to the main entry point of the app. In this file, we'll\n * be kicking off our app.\n *\n * Most of this file is boilerplate and you shouldn't need to modify\n * it very often. But take some time to look through and understand\n * what is going on here.\n *\n * The app navigation resides in ./app/navigators, so head over there\n * if you're interested in adding screens and navigators.\n */\nimport \"./i18n\"\nimport \"./utils/ignore-warnings\"\nimport React, { useState, useEffect, useRef } from \"react\"\nimport { NavigationContainerRef } from \"@react-navigation/native\"\nimport { SafeAreaProvider, initialWindowMetrics } from \"react-native-safe-area-context\"\nimport { initFonts } from \"./theme/fonts\" // expo\nimport * as storage from \"./utils/storage\"\nimport {\n useBackButtonHandler,\n RootNavigator,\n canExit,\n setRootNavigation,\n useNavigationPersistence,\n} from \"./navigators\"\nimport { RootStore, RootStoreProvider, setupRootStore } from \"./models\"\nimport { ToggleStorybook } from \"../storybook/toggle-storybook\"\n\n// This puts screens in a native ViewController or Activity. If you want fully native\n// stack navigation, use `createNativeStackNavigator` in place of `createStackNavigator`:\n// https://github.com/kmagiera/react-native-screens#using-native-stack-navigator\nimport { enableScreens } from \"react-native-screens\"\nenableScreens()\n\nexport const NAVIGATION_PERSISTENCE_KEY = \"NAVIGATION_STATE\"\n\n/**\n * This is the root component of our app.\n */\nfunction App() {\n const navigationRef = useRef<NavigationContainerRef>(null)\n const [rootStore, setRootStore] = useState<RootStore | undefined>(undefined)\n\n setRootNavigation(navigationRef)\n useBackButtonHandler(navigationRef, canExit)\n const { initialNavigationState, onNavigationStateChange } = useNavigationPersistence(\n storage,\n NAVIGATION_PERSISTENCE_KEY,\n )\n\n // Kick off initial async loading actions, like loading fonts and RootStore\n useEffect(() => {\n ;(async () => {\n await initFonts() // expo\n setupRootStore().then(setRootStore)\n })()\n }, [])\n\n // Before we show the app, we have to wait for our state to be ready.\n // In the meantime, don't render anything. This will be the background\n // color set in native by rootView's background color. You can replace\n // with your own loading component if you wish.\n if (!rootStore) return null\n\n // otherwise, we're ready to render the app\n return (\n <ToggleStorybook>\n <RootStoreProvider value={rootStore}>\n <SafeAreaProvider initialMetrics={initialWindowMetrics}>\n <RootNavigator\n ref={navigationRef}\n initialState={initialNavigationState}\n onStateChange={onNavigationStateChange}\n />\n </SafeAreaProvider>\n </RootStoreProvider>\n </ToggleStorybook>\n )\n}\n\nexport default App\n","// import * as Font from \"expo-font\"\n\nexport const initFonts = async () => {\n // Refer to ./assets/fonts/custom-fonts.md for instructions.\n // ...\n // Welcome back! Just uncomment this and replace/append with your font file names!\n // ⬇\n // await Font.loadAsync({\n // Montserrat: require(\"./Montserrat-Regular.ttf\"),\n // \"Montserrat-Regular\": require(\"./Montserrat-Regular.ttf\"),\n // })\n}\n","// This is the first file that ReactNative will run when it starts up.\nimport App from \"./app/app.tsx\"\nimport { registerRootComponent } from \"expo\"\n\nregisterRootComponent(App)\nexport default App\n","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAPCAYAAADtc08vAAAAAXNSR0IArs4c6QAAAQNJREFUKBWdk8EOwUAQhme2InFy9yB1cSTReAIOPIeEEyKObs4knkBS2pNbK57A3cETcKBjtmKzJd0mO5fO9p//63Q6BciJ0D83wn3cyZHV7ZLKtISNPUqeawB8EFEVEV+anElF5sSHj5nYDI4AmpnM0pvpQDcjinHTc+eyyBT4FX/NLc+dfjXTNQXYmiUYAz/uAtGGc35nsSOgwPREXeP5RBj60ZUIatzKnQAqekFRzp5biSlL/lQLbqaMCAc2XYqMSkdx/MzAP42IkgkLLxTYb7XrW1VUkKQAWRNaQhTAFpIB2ED+VlkukNxChjmQ0IoH7EhwXvwBZGEKEThAAcOif+ENKNR3psyHynYAAAAASUVORK5CYII=\"","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAAIZJREFUGBljZACC/w4OMgy/fnUxMDI6gPgM//8fYGBjK2M8cOAJI1TyIlBYCCyJIN4BFekzgXWCJBkZtwMFZMEYxAaJAU1l/G9t/QxopCRIAmQkyACoqY+Bmp4zIUzEzmICOwgk9/v3LJBOsG4gG6wc6FjCjgTbC3QtUMdykJ1gDGIDxUByAK6uPrQ53B7lAAAAAElFTkSuQmCC\"","module.exports = __webpack_public_path__ + \"static/media/bg.27c56310.png\";","module.exports = __webpack_public_path__ + \"static/media/bowser.4ba9aedf.png\";","module.exports = __webpack_public_path__ + \"static/media/logo-ignite.5c0bc1b0.png\";","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAIZJREFUGBljYACC////5wHxIyB+AsRFQNwPxG+A+BIQ+4DUgBTFADE+8Bco6QFSeB2fKqjcASagofxgo/ET7CCFq/CrAcsuAVktAMTX8Fi/EyjHAlYOZMgD8X0gRgfHgAK8KDYCBaSBGNnk3UA+N4oiGAcoIQLEZ4F4HRCzw8Sx0kAFzNgkAGi11d75H7oeAAAAAElFTkSuQmCC\""],"sourceRoot":""}
\ No newline at end of file diff --git a/web-build/static/js/runtime~app.2e9f1821.js b/web-build/static/js/runtime~app.2e9f1821.js new file mode 100644 index 0000000..ab3cf6b --- /dev/null +++ b/web-build/static/js/runtime~app.2e9f1821.js @@ -0,0 +1,2 @@ +!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this.webpackJsonp=this.webpackJsonp||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([]); +//# sourceMappingURL=runtime~app.2e9f1821.js.map
\ No newline at end of file diff --git a/web-build/static/js/runtime~app.2e9f1821.js.map b/web-build/static/js/runtime~app.2e9f1821.js.map new file mode 100644 index 0000000..04e21af --- /dev/null +++ b/web-build/static/js/runtime~app.2e9f1821.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","this","oldJsonpFunction","slice"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,GAKnBhB,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A,GAEtC,OADAL,EAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,EAAoBY,EAAI,SAASgB,EAAQC,GAAY,OAAO/C,OAAOC,UAAUC,eAAeC,KAAK2C,EAAQC,IAGzG7B,EAAoB8B,EAAI,IAExB,IAAIC,EAAaC,KAAmB,aAAIA,KAAmB,cAAK,GAC5DC,EAAmBF,EAAW5C,KAAKuC,KAAKK,GAC5CA,EAAW5C,KAAOf,EAClB2D,EAAaA,EAAWG,QACxB,IAAI,IAAIvD,EAAI,EAAGA,EAAIoD,EAAWlD,OAAQF,IAAKP,EAAqB2D,EAAWpD,IAC3E,IAAIU,EAAsB4C,EAI1BxC,I","file":"static/js/runtime~app.2e9f1821.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = this[\"webpackJsonp\"] = this[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""}
\ No newline at end of file diff --git a/web-build/static/media/bezier.799a5c8c.cjs b/web-build/static/media/bezier.799a5c8c.cjs new file mode 100644 index 0000000..fe90607 --- /dev/null +++ b/web-build/static/media/bezier.799a5c8c.cjs @@ -0,0 +1,1943 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Bezier = void 0; +// math-inlining. +const { + abs, + cos, + sin, + acos, + atan2, + sqrt, + pow +} = Math; // cube root function yielding real roots + +function crt(v) { + return v < 0 ? -pow(-v, 1 / 3) : pow(v, 1 / 3); +} // trig constants + + +const pi = Math.PI, + tau = 2 * pi, + quart = pi / 2, + // float precision significant decimal +epsilon = 0.000001, + // extremas used in bbox calculation and similar algorithms +nMax = Number.MAX_SAFE_INTEGER || 9007199254740991, + nMin = Number.MIN_SAFE_INTEGER || -9007199254740991, + // a zero coordinate, which is surprisingly useful +ZERO = { + x: 0, + y: 0, + z: 0 +}; // Bezier utility functions + +const utils = { + // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x)) + Tvalues: [-0.0640568928626056260850430826247450385909, 0.0640568928626056260850430826247450385909, -0.1911188674736163091586398207570696318404, 0.1911188674736163091586398207570696318404, -0.3150426796961633743867932913198102407864, 0.3150426796961633743867932913198102407864, -0.4337935076260451384870842319133497124524, 0.4337935076260451384870842319133497124524, -0.5454214713888395356583756172183723700107, 0.5454214713888395356583756172183723700107, -0.6480936519369755692524957869107476266696, 0.6480936519369755692524957869107476266696, -0.7401241915785543642438281030999784255232, 0.7401241915785543642438281030999784255232, -0.8200019859739029219539498726697452080761, 0.8200019859739029219539498726697452080761, -0.8864155270044010342131543419821967550873, 0.8864155270044010342131543419821967550873, -0.9382745520027327585236490017087214496548, 0.9382745520027327585236490017087214496548, -0.9747285559713094981983919930081690617411, 0.9747285559713094981983919930081690617411, -0.9951872199970213601799974097007368118745, 0.9951872199970213601799974097007368118745], + // Legendre-Gauss weights with n=24 (w_i values, defined by a function linked to in the Bezier primer article) + Cvalues: [0.1279381953467521569740561652246953718517, 0.1279381953467521569740561652246953718517, 0.1258374563468282961213753825111836887264, 0.1258374563468282961213753825111836887264, 0.121670472927803391204463153476262425607, 0.121670472927803391204463153476262425607, 0.1155056680537256013533444839067835598622, 0.1155056680537256013533444839067835598622, 0.1074442701159656347825773424466062227946, 0.1074442701159656347825773424466062227946, 0.0976186521041138882698806644642471544279, 0.0976186521041138882698806644642471544279, 0.086190161531953275917185202983742667185, 0.086190161531953275917185202983742667185, 0.0733464814110803057340336152531165181193, 0.0733464814110803057340336152531165181193, 0.0592985849154367807463677585001085845412, 0.0592985849154367807463677585001085845412, 0.0442774388174198061686027482113382288593, 0.0442774388174198061686027482113382288593, 0.0285313886289336631813078159518782864491, 0.0285313886289336631813078159518782864491, 0.0123412297999871995468056670700372915759, 0.0123412297999871995468056670700372915759], + arcfn: function (t, derivativeFn) { + const d = derivativeFn(t); + let l = d.x * d.x + d.y * d.y; + + if (typeof d.z !== "undefined") { + l += d.z * d.z; + } + + return sqrt(l); + }, + compute: function (t, points, _3d) { + // shortcuts + if (t === 0) { + points[0].t = 0; + return points[0]; + } + + const order = points.length - 1; + + if (t === 1) { + points[order].t = 1; + return points[order]; + } + + const mt = 1 - t; + let p = points; // constant? + + if (order === 0) { + points[0].t = t; + return points[0]; + } // linear? + + + if (order === 1) { + const ret = { + x: mt * p[0].x + t * p[1].x, + y: mt * p[0].y + t * p[1].y, + t: t + }; + + if (_3d) { + ret.z = mt * p[0].z + t * p[1].z; + } + + return ret; + } // quadratic/cubic curve? + + + if (order < 4) { + let mt2 = mt * mt, + t2 = t * t, + a, + b, + c, + d = 0; + + if (order === 2) { + p = [p[0], p[1], p[2], ZERO]; + a = mt2; + b = mt * t * 2; + c = t2; + } else if (order === 3) { + a = mt2 * mt; + b = mt2 * t * 3; + c = mt * t2 * 3; + d = t * t2; + } + + const ret = { + x: a * p[0].x + b * p[1].x + c * p[2].x + d * p[3].x, + y: a * p[0].y + b * p[1].y + c * p[2].y + d * p[3].y, + t: t + }; + + if (_3d) { + ret.z = a * p[0].z + b * p[1].z + c * p[2].z + d * p[3].z; + } + + return ret; + } // higher order curves: use de Casteljau's computation + + + const dCpts = JSON.parse(JSON.stringify(points)); + + while (dCpts.length > 1) { + for (let i = 0; i < dCpts.length - 1; i++) { + dCpts[i] = { + x: dCpts[i].x + (dCpts[i + 1].x - dCpts[i].x) * t, + y: dCpts[i].y + (dCpts[i + 1].y - dCpts[i].y) * t + }; + + if (typeof dCpts[i].z !== "undefined") { + dCpts[i] = dCpts[i].z + (dCpts[i + 1].z - dCpts[i].z) * t; + } + } + + dCpts.splice(dCpts.length - 1, 1); + } + + dCpts[0].t = t; + return dCpts[0]; + }, + computeWithRatios: function (t, points, ratios, _3d) { + const mt = 1 - t, + r = ratios, + p = points; + let f1 = r[0], + f2 = r[1], + f3 = r[2], + f4 = r[3], + d; // spec for linear + + f1 *= mt; + f2 *= t; + + if (p.length === 2) { + d = f1 + f2; + return { + x: (f1 * p[0].x + f2 * p[1].x) / d, + y: (f1 * p[0].y + f2 * p[1].y) / d, + z: !_3d ? false : (f1 * p[0].z + f2 * p[1].z) / d, + t: t + }; + } // upgrade to quadratic + + + f1 *= mt; + f2 *= 2 * mt; + f3 *= t * t; + + if (p.length === 3) { + d = f1 + f2 + f3; + return { + x: (f1 * p[0].x + f2 * p[1].x + f3 * p[2].x) / d, + y: (f1 * p[0].y + f2 * p[1].y + f3 * p[2].y) / d, + z: !_3d ? false : (f1 * p[0].z + f2 * p[1].z + f3 * p[2].z) / d, + t: t + }; + } // upgrade to cubic + + + f1 *= mt; + f2 *= 1.5 * mt; + f3 *= 3 * mt; + f4 *= t * t * t; + + if (p.length === 4) { + d = f1 + f2 + f3 + f4; + return { + x: (f1 * p[0].x + f2 * p[1].x + f3 * p[2].x + f4 * p[3].x) / d, + y: (f1 * p[0].y + f2 * p[1].y + f3 * p[2].y + f4 * p[3].y) / d, + z: !_3d ? false : (f1 * p[0].z + f2 * p[1].z + f3 * p[2].z + f4 * p[3].z) / d, + t: t + }; + } + }, + derive: function (points, _3d) { + const dpoints = []; + + for (let p = points, d = p.length, c = d - 1; d > 1; d--, c--) { + const list = []; + + for (let j = 0, dpt; j < c; j++) { + dpt = { + x: c * (p[j + 1].x - p[j].x), + y: c * (p[j + 1].y - p[j].y) + }; + + if (_3d) { + dpt.z = c * (p[j + 1].z - p[j].z); + } + + list.push(dpt); + } + + dpoints.push(list); + p = list; + } + + return dpoints; + }, + between: function (v, m, M) { + return m <= v && v <= M || utils.approximately(v, m) || utils.approximately(v, M); + }, + approximately: function (a, b, precision) { + return abs(a - b) <= (precision || epsilon); + }, + length: function (derivativeFn) { + const z = 0.5, + len = utils.Tvalues.length; + let sum = 0; + + for (let i = 0, t; i < len; i++) { + t = z * utils.Tvalues[i] + z; + sum += utils.Cvalues[i] * utils.arcfn(t, derivativeFn); + } + + return z * sum; + }, + map: function (v, ds, de, ts, te) { + const d1 = de - ds, + d2 = te - ts, + v2 = v - ds, + r = v2 / d1; + return ts + d2 * r; + }, + lerp: function (r, v1, v2) { + const ret = { + x: v1.x + r * (v2.x - v1.x), + y: v1.y + r * (v2.y - v1.y) + }; + + if (!!v1.z && !!v2.z) { + ret.z = v1.z + r * (v2.z - v1.z); + } + + return ret; + }, + pointToString: function (p) { + let s = p.x + "/" + p.y; + + if (typeof p.z !== "undefined") { + s += "/" + p.z; + } + + return s; + }, + pointsToString: function (points) { + return "[" + points.map(utils.pointToString).join(", ") + "]"; + }, + copy: function (obj) { + return JSON.parse(JSON.stringify(obj)); + }, + angle: function (o, v1, v2) { + const dx1 = v1.x - o.x, + dy1 = v1.y - o.y, + dx2 = v2.x - o.x, + dy2 = v2.y - o.y, + cross = dx1 * dy2 - dy1 * dx2, + dot = dx1 * dx2 + dy1 * dy2; + return atan2(cross, dot); + }, + // round as string, to avoid rounding errors + round: function (v, d) { + const s = "" + v; + const pos = s.indexOf("."); + return parseFloat(s.substring(0, pos + 1 + d)); + }, + dist: function (p1, p2) { + const dx = p1.x - p2.x, + dy = p1.y - p2.y; + return sqrt(dx * dx + dy * dy); + }, + closest: function (LUT, point) { + let mdist = pow(2, 63), + mpos, + d; + LUT.forEach(function (p, idx) { + d = utils.dist(point, p); + + if (d < mdist) { + mdist = d; + mpos = idx; + } + }); + return { + mdist: mdist, + mpos: mpos + }; + }, + abcratio: function (t, n) { + // see ratio(t) note on http://pomax.github.io/bezierinfo/#abc + if (n !== 2 && n !== 3) { + return false; + } + + if (typeof t === "undefined") { + t = 0.5; + } else if (t === 0 || t === 1) { + return t; + } + + const bottom = pow(t, n) + pow(1 - t, n), + top = bottom - 1; + return abs(top / bottom); + }, + projectionratio: function (t, n) { + // see u(t) note on http://pomax.github.io/bezierinfo/#abc + if (n !== 2 && n !== 3) { + return false; + } + + if (typeof t === "undefined") { + t = 0.5; + } else if (t === 0 || t === 1) { + return t; + } + + const top = pow(1 - t, n), + bottom = pow(t, n) + top; + return top / bottom; + }, + lli8: function (x1, y1, x2, y2, x3, y3, x4, y4) { + const nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4), + ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4), + d = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); + + if (d == 0) { + return false; + } + + return { + x: nx / d, + y: ny / d + }; + }, + lli4: function (p1, p2, p3, p4) { + const x1 = p1.x, + y1 = p1.y, + x2 = p2.x, + y2 = p2.y, + x3 = p3.x, + y3 = p3.y, + x4 = p4.x, + y4 = p4.y; + return utils.lli8(x1, y1, x2, y2, x3, y3, x4, y4); + }, + lli: function (v1, v2) { + return utils.lli4(v1, v1.c, v2, v2.c); + }, + makeline: function (p1, p2) { + const x1 = p1.x, + y1 = p1.y, + x2 = p2.x, + y2 = p2.y, + dx = (x2 - x1) / 3, + dy = (y2 - y1) / 3; + return new Bezier(x1, y1, x1 + dx, y1 + dy, x1 + 2 * dx, y1 + 2 * dy, x2, y2); + }, + findbbox: function (sections) { + let mx = nMax, + my = nMax, + MX = nMin, + MY = nMin; + sections.forEach(function (s) { + const bbox = s.bbox(); + if (mx > bbox.x.min) mx = bbox.x.min; + if (my > bbox.y.min) my = bbox.y.min; + if (MX < bbox.x.max) MX = bbox.x.max; + if (MY < bbox.y.max) MY = bbox.y.max; + }); + return { + x: { + min: mx, + mid: (mx + MX) / 2, + max: MX, + size: MX - mx + }, + y: { + min: my, + mid: (my + MY) / 2, + max: MY, + size: MY - my + } + }; + }, + shapeintersections: function (s1, bbox1, s2, bbox2, curveIntersectionThreshold) { + if (!utils.bboxoverlap(bbox1, bbox2)) return []; + const intersections = []; + const a1 = [s1.startcap, s1.forward, s1.back, s1.endcap]; + const a2 = [s2.startcap, s2.forward, s2.back, s2.endcap]; + a1.forEach(function (l1) { + if (l1.virtual) return; + a2.forEach(function (l2) { + if (l2.virtual) return; + const iss = l1.intersects(l2, curveIntersectionThreshold); + + if (iss.length > 0) { + iss.c1 = l1; + iss.c2 = l2; + iss.s1 = s1; + iss.s2 = s2; + intersections.push(iss); + } + }); + }); + return intersections; + }, + makeshape: function (forward, back, curveIntersectionThreshold) { + const bpl = back.points.length; + const fpl = forward.points.length; + const start = utils.makeline(back.points[bpl - 1], forward.points[0]); + const end = utils.makeline(forward.points[fpl - 1], back.points[0]); + const shape = { + startcap: start, + forward: forward, + back: back, + endcap: end, + bbox: utils.findbbox([start, forward, back, end]) + }; + + shape.intersections = function (s2) { + return utils.shapeintersections(shape, shape.bbox, s2, s2.bbox, curveIntersectionThreshold); + }; + + return shape; + }, + getminmax: function (curve, d, list) { + if (!list) return { + min: 0, + max: 0 + }; + let min = nMax, + max = nMin, + t, + c; + + if (list.indexOf(0) === -1) { + list = [0].concat(list); + } + + if (list.indexOf(1) === -1) { + list.push(1); + } + + for (let i = 0, len = list.length; i < len; i++) { + t = list[i]; + c = curve.get(t); + + if (c[d] < min) { + min = c[d]; + } + + if (c[d] > max) { + max = c[d]; + } + } + + return { + min: min, + mid: (min + max) / 2, + max: max, + size: max - min + }; + }, + align: function (points, line) { + const tx = line.p1.x, + ty = line.p1.y, + a = -atan2(line.p2.y - ty, line.p2.x - tx), + d = function (v) { + return { + x: (v.x - tx) * cos(a) - (v.y - ty) * sin(a), + y: (v.x - tx) * sin(a) + (v.y - ty) * cos(a) + }; + }; + + return points.map(d); + }, + roots: function (points, line) { + line = line || { + p1: { + x: 0, + y: 0 + }, + p2: { + x: 1, + y: 0 + } + }; + const order = points.length - 1; + const aligned = utils.align(points, line); + + const reduce = function (t) { + return 0 <= t && t <= 1; + }; + + if (order === 2) { + const a = aligned[0].y, + b = aligned[1].y, + c = aligned[2].y, + d = a - 2 * b + c; + + if (d !== 0) { + const m1 = -sqrt(b * b - a * c), + m2 = -a + b, + v1 = -(m1 + m2) / d, + v2 = -(-m1 + m2) / d; + return [v1, v2].filter(reduce); + } else if (b !== c && d === 0) { + return [(2 * b - c) / (2 * b - 2 * c)].filter(reduce); + } + + return []; + } // see http://www.trans4mind.com/personal_development/mathematics/polynomials/cubicAlgebra.htm + + + const pa = aligned[0].y, + pb = aligned[1].y, + pc = aligned[2].y, + pd = aligned[3].y; + let d = -pa + 3 * pb - 3 * pc + pd, + a = 3 * pa - 6 * pb + 3 * pc, + b = -3 * pa + 3 * pb, + c = pa; + + if (utils.approximately(d, 0)) { + // this is not a cubic curve. + if (utils.approximately(a, 0)) { + // in fact, this is not a quadratic curve either. + if (utils.approximately(b, 0)) { + // in fact in fact, there are no solutions. + return []; + } // linear solution: + + + return [-c / b].filter(reduce); + } // quadratic solution: + + + const q = sqrt(b * b - 4 * a * c), + a2 = 2 * a; + return [(q - b) / a2, (-b - q) / a2].filter(reduce); + } // at this point, we know we need a cubic solution: + + + a /= d; + b /= d; + c /= d; + const p = (3 * b - a * a) / 3, + p3 = p / 3, + q = (2 * a * a * a - 9 * a * b + 27 * c) / 27, + q2 = q / 2, + discriminant = q2 * q2 + p3 * p3 * p3; + let u1, v1, x1, x2, x3; + + if (discriminant < 0) { + const mp3 = -p / 3, + mp33 = mp3 * mp3 * mp3, + r = sqrt(mp33), + t = -q / (2 * r), + cosphi = t < -1 ? -1 : t > 1 ? 1 : t, + phi = acos(cosphi), + crtr = crt(r), + t1 = 2 * crtr; + x1 = t1 * cos(phi / 3) - a / 3; + x2 = t1 * cos((phi + tau) / 3) - a / 3; + x3 = t1 * cos((phi + 2 * tau) / 3) - a / 3; + return [x1, x2, x3].filter(reduce); + } else if (discriminant === 0) { + u1 = q2 < 0 ? crt(-q2) : -crt(q2); + x1 = 2 * u1 - a / 3; + x2 = -u1 - a / 3; + return [x1, x2].filter(reduce); + } else { + const sd = sqrt(discriminant); + u1 = crt(-q2 + sd); + v1 = crt(q2 + sd); + return [u1 - v1 - a / 3].filter(reduce); + } + }, + droots: function (p) { + // quadratic roots are easy + if (p.length === 3) { + const a = p[0], + b = p[1], + c = p[2], + d = a - 2 * b + c; + + if (d !== 0) { + const m1 = -sqrt(b * b - a * c), + m2 = -a + b, + v1 = -(m1 + m2) / d, + v2 = -(-m1 + m2) / d; + return [v1, v2]; + } else if (b !== c && d === 0) { + return [(2 * b - c) / (2 * (b - c))]; + } + + return []; + } // linear roots are even easier + + + if (p.length === 2) { + const a = p[0], + b = p[1]; + + if (a !== b) { + return [a / (a - b)]; + } + + return []; + } + + return []; + }, + curvature: function (t, d1, d2, _3d, kOnly) { + let num, + dnm, + adk, + dk, + k = 0, + r = 0; // + // We're using the following formula for curvature: + // + // x'y" - y'x" + // k(t) = ------------------ + // (x'² + y'²)^(3/2) + // + // from https://en.wikipedia.org/wiki/Radius_of_curvature#Definition + // + // With it corresponding 3D counterpart: + // + // sqrt( (y'z" - y"z')² + (z'x" - z"x')² + (x'y" - x"y')²) + // k(t) = ------------------------------------------------------- + // (x'² + y'² + z'²)^(3/2) + // + + const d = utils.compute(t, d1); + const dd = utils.compute(t, d2); + const qdsum = d.x * d.x + d.y * d.y; + + if (_3d) { + num = sqrt(pow(d.y * dd.z - dd.y * d.z, 2) + pow(d.z * dd.x - dd.z * d.x, 2) + pow(d.x * dd.y - dd.x * d.y, 2)); + dnm = pow(qdsum + d.z * d.z, 3 / 2); + } else { + num = d.x * dd.y - d.y * dd.x; + dnm = pow(qdsum, 3 / 2); + } + + if (num === 0 || dnm === 0) { + return { + k: 0, + r: 0 + }; + } + + k = num / dnm; + r = dnm / num; // We're also computing the derivative of kappa, because + // there is value in knowing the rate of change for the + // curvature along the curve. And we're just going to + // ballpark it based on an epsilon. + + if (!kOnly) { + // compute k'(t) based on the interval before, and after it, + // to at least try to not introduce forward/backward pass bias. + const pk = utils.curvature(t - 0.001, d1, d2, _3d, true).k; + const nk = utils.curvature(t + 0.001, d1, d2, _3d, true).k; + dk = (nk - k + (k - pk)) / 2; + adk = (abs(nk - k) + abs(k - pk)) / 2; + } + + return { + k: k, + r: r, + dk: dk, + adk: adk + }; + }, + inflections: function (points) { + if (points.length < 4) return []; // FIXME: TODO: add in inflection abstraction for quartic+ curves? + + const p = utils.align(points, { + p1: points[0], + p2: points.slice(-1)[0] + }), + a = p[2].x * p[1].y, + b = p[3].x * p[1].y, + c = p[1].x * p[2].y, + d = p[3].x * p[2].y, + v1 = 18 * (-3 * a + 2 * b + 3 * c - d), + v2 = 18 * (3 * a - b - 3 * c), + v3 = 18 * (c - a); + + if (utils.approximately(v1, 0)) { + if (!utils.approximately(v2, 0)) { + let t = -v3 / v2; + if (0 <= t && t <= 1) return [t]; + } + + return []; + } + + const trm = v2 * v2 - 4 * v1 * v3, + sq = Math.sqrt(trm), + d2 = 2 * v1; + if (utils.approximately(d2, 0)) return []; + return [(sq - v2) / d2, -(v2 + sq) / d2].filter(function (r) { + return 0 <= r && r <= 1; + }); + }, + bboxoverlap: function (b1, b2) { + const dims = ["x", "y"], + len = dims.length; + + for (let i = 0, dim, l, t, d; i < len; i++) { + dim = dims[i]; + l = b1[dim].mid; + t = b2[dim].mid; + d = (b1[dim].size + b2[dim].size) / 2; + if (abs(l - t) >= d) return false; + } + + return true; + }, + expandbox: function (bbox, _bbox) { + if (_bbox.x.min < bbox.x.min) { + bbox.x.min = _bbox.x.min; + } + + if (_bbox.y.min < bbox.y.min) { + bbox.y.min = _bbox.y.min; + } + + if (_bbox.z && _bbox.z.min < bbox.z.min) { + bbox.z.min = _bbox.z.min; + } + + if (_bbox.x.max > bbox.x.max) { + bbox.x.max = _bbox.x.max; + } + + if (_bbox.y.max > bbox.y.max) { + bbox.y.max = _bbox.y.max; + } + + if (_bbox.z && _bbox.z.max > bbox.z.max) { + bbox.z.max = _bbox.z.max; + } + + bbox.x.mid = (bbox.x.min + bbox.x.max) / 2; + bbox.y.mid = (bbox.y.min + bbox.y.max) / 2; + + if (bbox.z) { + bbox.z.mid = (bbox.z.min + bbox.z.max) / 2; + } + + bbox.x.size = bbox.x.max - bbox.x.min; + bbox.y.size = bbox.y.max - bbox.y.min; + + if (bbox.z) { + bbox.z.size = bbox.z.max - bbox.z.min; + } + }, + pairiteration: function (c1, c2, curveIntersectionThreshold) { + const c1b = c1.bbox(), + c2b = c2.bbox(), + r = 100000, + threshold = curveIntersectionThreshold || 0.5; + + if (c1b.x.size + c1b.y.size < threshold && c2b.x.size + c2b.y.size < threshold) { + return [(r * (c1._t1 + c1._t2) / 2 | 0) / r + "/" + (r * (c2._t1 + c2._t2) / 2 | 0) / r]; + } + + let cc1 = c1.split(0.5), + cc2 = c2.split(0.5), + pairs = [{ + left: cc1.left, + right: cc2.left + }, { + left: cc1.left, + right: cc2.right + }, { + left: cc1.right, + right: cc2.right + }, { + left: cc1.right, + right: cc2.left + }]; + pairs = pairs.filter(function (pair) { + return utils.bboxoverlap(pair.left.bbox(), pair.right.bbox()); + }); + let results = []; + if (pairs.length === 0) return results; + pairs.forEach(function (pair) { + results = results.concat(utils.pairiteration(pair.left, pair.right, threshold)); + }); + results = results.filter(function (v, i) { + return results.indexOf(v) === i; + }); + return results; + }, + getccenter: function (p1, p2, p3) { + const dx1 = p2.x - p1.x, + dy1 = p2.y - p1.y, + dx2 = p3.x - p2.x, + dy2 = p3.y - p2.y, + dx1p = dx1 * cos(quart) - dy1 * sin(quart), + dy1p = dx1 * sin(quart) + dy1 * cos(quart), + dx2p = dx2 * cos(quart) - dy2 * sin(quart), + dy2p = dx2 * sin(quart) + dy2 * cos(quart), + // chord midpoints + mx1 = (p1.x + p2.x) / 2, + my1 = (p1.y + p2.y) / 2, + mx2 = (p2.x + p3.x) / 2, + my2 = (p2.y + p3.y) / 2, + // midpoint offsets + mx1n = mx1 + dx1p, + my1n = my1 + dy1p, + mx2n = mx2 + dx2p, + my2n = my2 + dy2p, + // intersection of these lines: + arc = utils.lli8(mx1, my1, mx1n, my1n, mx2, my2, mx2n, my2n), + r = utils.dist(arc, p1); // arc start/end values, over mid point: + + let s = atan2(p1.y - arc.y, p1.x - arc.x), + m = atan2(p2.y - arc.y, p2.x - arc.x), + e = atan2(p3.y - arc.y, p3.x - arc.x), + _; // determine arc direction (cw/ccw correction) + + + if (s < e) { + // if s<m<e, arc(s, e) + // if m<s<e, arc(e, s + tau) + // if s<e<m, arc(e, s + tau) + if (s > m || m > e) { + s += tau; + } + + if (s > e) { + _ = e; + e = s; + s = _; + } + } else { + // if e<m<s, arc(e, s) + // if m<e<s, arc(s, e + tau) + // if e<s<m, arc(s, e + tau) + if (e < m && m < s) { + _ = e; + e = s; + s = _; + } else { + e += tau; + } + } // assign and done. + + + arc.s = s; + arc.e = e; + arc.r = r; + return arc; + }, + numberSort: function (a, b) { + return a - b; + } +}; +/** + * Poly Bezier + * @param {[type]} curves [description] + */ + +class PolyBezier { + constructor(curves) { + this.curves = []; + this._3d = false; + + if (!!curves) { + this.curves = curves; + this._3d = this.curves[0]._3d; + } + } + + valueOf() { + return this.toString(); + } + + toString() { + return "[" + this.curves.map(function (curve) { + return utils.pointsToString(curve.points); + }).join(", ") + "]"; + } + + addCurve(curve) { + this.curves.push(curve); + this._3d = this._3d || curve._3d; + } + + length() { + return this.curves.map(function (v) { + return v.length(); + }).reduce(function (a, b) { + return a + b; + }); + } + + curve(idx) { + return this.curves[idx]; + } + + bbox() { + const c = this.curves; + var bbox = c[0].bbox(); + + for (var i = 1; i < c.length; i++) { + utils.expandbox(bbox, c[i].bbox()); + } + + return bbox; + } + + offset(d) { + const offset = []; + this.curves.forEach(function (v) { + offset.push(...v.offset(d)); + }); + return new PolyBezier(offset); + } + +} +/** + A javascript Bezier curve library by Pomax. + + Based on http://pomax.github.io/bezierinfo + + This code is MIT licensed. +**/ +// math-inlining. + + +const { + abs: abs$1, + min, + max, + cos: cos$1, + sin: sin$1, + acos: acos$1, + sqrt: sqrt$1 +} = Math; +const pi$1 = Math.PI; +/** + * Bezier curve constructor. + * + * ...docs pending... + */ + +class Bezier { + constructor(coords) { + let args = coords && coords.forEach ? coords : Array.from(arguments).slice(); + let coordlen = false; + + if (typeof args[0] === "object") { + coordlen = args.length; + const newargs = []; + args.forEach(function (point) { + ["x", "y", "z"].forEach(function (d) { + if (typeof point[d] !== "undefined") { + newargs.push(point[d]); + } + }); + }); + args = newargs; + } + + let higher = false; + const len = args.length; + + if (coordlen) { + if (coordlen > 4) { + if (arguments.length !== 1) { + throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves"); + } + + higher = true; + } + } else { + if (len !== 6 && len !== 8 && len !== 9 && len !== 12) { + if (arguments.length !== 1) { + throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves"); + } + } + } + + const _3d = this._3d = !higher && (len === 9 || len === 12) || coords && coords[0] && typeof coords[0].z !== "undefined"; + + const points = this.points = []; + + for (let idx = 0, step = _3d ? 3 : 2; idx < len; idx += step) { + var point = { + x: args[idx], + y: args[idx + 1] + }; + + if (_3d) { + point.z = args[idx + 2]; + } + + points.push(point); + } + + const order = this.order = points.length - 1; + const dims = this.dims = ["x", "y"]; + if (_3d) dims.push("z"); + this.dimlen = dims.length; + const aligned = utils.align(points, { + p1: points[0], + p2: points[order] + }); + this._linear = !aligned.some(p => abs$1(p.y) > 0.0001); + this._lut = []; + this._t1 = 0; + this._t2 = 1; + this.update(); + } + + static quadraticFromPoints(p1, p2, p3, t) { + if (typeof t === "undefined") { + t = 0.5; + } // shortcuts, although they're really dumb + + + if (t === 0) { + return new Bezier(p2, p2, p3); + } + + if (t === 1) { + return new Bezier(p1, p2, p2); + } // real fitting. + + + const abc = Bezier.getABC(2, p1, p2, p3, t); + return new Bezier(p1, abc.A, p3); + } + + static cubicFromPoints(S, B, E, t, d1) { + if (typeof t === "undefined") { + t = 0.5; + } + + const abc = Bezier.getABC(3, S, B, E, t); + + if (typeof d1 === "undefined") { + d1 = utils.dist(B, abc.C); + } + + const d2 = d1 * (1 - t) / t; + const selen = utils.dist(S, E), + lx = (E.x - S.x) / selen, + ly = (E.y - S.y) / selen, + bx1 = d1 * lx, + by1 = d1 * ly, + bx2 = d2 * lx, + by2 = d2 * ly; // derivation of new hull coordinates + + const e1 = { + x: B.x - bx1, + y: B.y - by1 + }, + e2 = { + x: B.x + bx2, + y: B.y + by2 + }, + A = abc.A, + v1 = { + x: A.x + (e1.x - A.x) / (1 - t), + y: A.y + (e1.y - A.y) / (1 - t) + }, + v2 = { + x: A.x + (e2.x - A.x) / t, + y: A.y + (e2.y - A.y) / t + }, + nc1 = { + x: S.x + (v1.x - S.x) / t, + y: S.y + (v1.y - S.y) / t + }, + nc2 = { + x: E.x + (v2.x - E.x) / (1 - t), + y: E.y + (v2.y - E.y) / (1 - t) + }; // ...done + + return new Bezier(S, nc1, nc2, E); + } + + static getUtils() { + return utils; + } + + getUtils() { + return Bezier.getUtils(); + } + + static get PolyBezier() { + return PolyBezier; + } + + valueOf() { + return this.toString(); + } + + toString() { + return utils.pointsToString(this.points); + } + + toSVG() { + if (this._3d) return false; + const p = this.points, + x = p[0].x, + y = p[0].y, + s = ["M", x, y, this.order === 2 ? "Q" : "C"]; + + for (let i = 1, last = p.length; i < last; i++) { + s.push(p[i].x); + s.push(p[i].y); + } + + return s.join(" "); + } + + setRatios(ratios) { + if (ratios.length !== this.points.length) { + throw new Error("incorrect number of ratio values"); + } + + this.ratios = ratios; + this._lut = []; // invalidate any precomputed LUT + } + + verify() { + const print = this.coordDigest(); + + if (print !== this._print) { + this._print = print; + this.update(); + } + } + + coordDigest() { + return this.points.map(function (c, pos) { + return "" + pos + c.x + c.y + (c.z ? c.z : 0); + }).join(""); + } + + update() { + // invalidate any precomputed LUT + this._lut = []; + this.dpoints = utils.derive(this.points, this._3d); + this.computedirection(); + } + + computedirection() { + const points = this.points; + const angle = utils.angle(points[0], points[this.order], points[1]); + this.clockwise = angle > 0; + } + + length() { + return utils.length(this.derivative.bind(this)); + } + + static getABC(order = 2, S, B, E, t = 0.5) { + const u = utils.projectionratio(t, order), + um = 1 - u, + C = { + x: u * S.x + um * E.x, + y: u * S.y + um * E.y + }, + s = utils.abcratio(t, order), + A = { + x: B.x + (B.x - C.x) / s, + y: B.y + (B.y - C.y) / s + }; + return { + A, + B, + C, + S, + E + }; + } + + getABC(t, B) { + B = B || this.get(t); + let S = this.points[0]; + let E = this.points[this.order]; + return Bezier.getABC(this.order, S, B, E, t); + } + + getLUT(steps) { + this.verify(); + steps = steps || 100; + + if (this._lut.length === steps) { + return this._lut; + } + + this._lut = []; // We want a range from 0 to 1 inclusive, so + // we decrement and then use <= rather than <: + + steps--; + + for (let i = 0, p, t; i < steps; i++) { + t = i / (steps - 1); + p = this.compute(t); + p.t = t; + + this._lut.push(p); + } + + return this._lut; + } + + on(point, error) { + error = error || 5; + const lut = this.getLUT(), + hits = []; + + for (let i = 0, c, t = 0; i < lut.length; i++) { + c = lut[i]; + + if (utils.dist(c, point) < error) { + hits.push(c); + t += i / lut.length; + } + } + + if (!hits.length) return false; + return t /= hits.length; + } + + project(point) { + // step 1: coarse check + const LUT = this.getLUT(), + l = LUT.length - 1, + closest = utils.closest(LUT, point), + mpos = closest.mpos, + t1 = (mpos - 1) / l, + t2 = (mpos + 1) / l, + step = 0.1 / l; // step 2: fine check + + let mdist = closest.mdist, + t = t1, + ft = t, + p; + mdist += 1; + + for (let d; t < t2 + step; t += step) { + p = this.compute(t); + d = utils.dist(point, p); + + if (d < mdist) { + mdist = d; + ft = t; + } + } + + ft = ft < 0 ? 0 : ft > 1 ? 1 : ft; + p = this.compute(ft); + p.t = ft; + p.d = mdist; + return p; + } + + get(t) { + return this.compute(t); + } + + point(idx) { + return this.points[idx]; + } + + compute(t) { + if (this.ratios) { + return utils.computeWithRatios(t, this.points, this.ratios, this._3d); + } + + return utils.compute(t, this.points, this._3d, this.ratios); + } + + raise() { + const p = this.points, + np = [p[0]], + k = p.length; + + for (let i = 1, pi, pim; i < k; i++) { + pi = p[i]; + pim = p[i - 1]; + np[i] = { + x: (k - i) / k * pi.x + i / k * pim.x, + y: (k - i) / k * pi.y + i / k * pim.y + }; + } + + np[k] = p[k - 1]; + return new Bezier(np); + } + + derivative(t) { + return utils.compute(t, this.dpoints[0]); + } + + dderivative(t) { + return utils.compute(t, this.dpoints[1]); + } + + align() { + let p = this.points; + return new Bezier(utils.align(p, { + p1: p[0], + p2: p[p.length - 1] + })); + } + + curvature(t) { + return utils.curvature(t, this.dpoints[0], this.dpoints[1], this._3d); + } + + inflections() { + return utils.inflections(this.points); + } + + normal(t) { + return this._3d ? this.__normal3(t) : this.__normal2(t); + } + + __normal2(t) { + const d = this.derivative(t); + const q = sqrt$1(d.x * d.x + d.y * d.y); + return { + x: -d.y / q, + y: d.x / q + }; + } + + __normal3(t) { + // see http://stackoverflow.com/questions/25453159 + const r1 = this.derivative(t), + r2 = this.derivative(t + 0.01), + q1 = sqrt$1(r1.x * r1.x + r1.y * r1.y + r1.z * r1.z), + q2 = sqrt$1(r2.x * r2.x + r2.y * r2.y + r2.z * r2.z); + r1.x /= q1; + r1.y /= q1; + r1.z /= q1; + r2.x /= q2; + r2.y /= q2; + r2.z /= q2; // cross product + + const c = { + x: r2.y * r1.z - r2.z * r1.y, + y: r2.z * r1.x - r2.x * r1.z, + z: r2.x * r1.y - r2.y * r1.x + }; + const m = sqrt$1(c.x * c.x + c.y * c.y + c.z * c.z); + c.x /= m; + c.y /= m; + c.z /= m; // rotation matrix + + const R = [c.x * c.x, c.x * c.y - c.z, c.x * c.z + c.y, c.x * c.y + c.z, c.y * c.y, c.y * c.z - c.x, c.x * c.z - c.y, c.y * c.z + c.x, c.z * c.z]; // normal vector: + + const n = { + x: R[0] * r1.x + R[1] * r1.y + R[2] * r1.z, + y: R[3] * r1.x + R[4] * r1.y + R[5] * r1.z, + z: R[6] * r1.x + R[7] * r1.y + R[8] * r1.z + }; + return n; + } + + hull(t) { + let p = this.points, + _p = [], + q = [], + idx = 0; + q[idx++] = p[0]; + q[idx++] = p[1]; + q[idx++] = p[2]; + + if (this.order === 3) { + q[idx++] = p[3]; + } // we lerp between all points at each iteration, until we have 1 point left. + + + while (p.length > 1) { + _p = []; + + for (let i = 0, pt, l = p.length - 1; i < l; i++) { + pt = utils.lerp(t, p[i], p[i + 1]); + q[idx++] = pt; + + _p.push(pt); + } + + p = _p; + } + + return q; + } + + split(t1, t2) { + // shortcuts + if (t1 === 0 && !!t2) { + return this.split(t2).left; + } + + if (t2 === 1) { + return this.split(t1).right; + } // no shortcut: use "de Casteljau" iteration. + + + const q = this.hull(t1); + const result = { + left: this.order === 2 ? new Bezier([q[0], q[3], q[5]]) : new Bezier([q[0], q[4], q[7], q[9]]), + right: this.order === 2 ? new Bezier([q[5], q[4], q[2]]) : new Bezier([q[9], q[8], q[6], q[3]]), + span: q + }; // make sure we bind _t1/_t2 information! + + result.left._t1 = utils.map(0, 0, 1, this._t1, this._t2); + result.left._t2 = utils.map(t1, 0, 1, this._t1, this._t2); + result.right._t1 = utils.map(t1, 0, 1, this._t1, this._t2); + result.right._t2 = utils.map(1, 0, 1, this._t1, this._t2); // if we have no t2, we're done + + if (!t2) { + return result; + } // if we have a t2, split again: + + + t2 = utils.map(t2, t1, 1, 0, 1); + return result.right.split(t2).left; + } + + extrema() { + const result = {}; + let roots = []; + this.dims.forEach(function (dim) { + let mfn = function (v) { + return v[dim]; + }; + + let p = this.dpoints[0].map(mfn); + result[dim] = utils.droots(p); + + if (this.order === 3) { + p = this.dpoints[1].map(mfn); + result[dim] = result[dim].concat(utils.droots(p)); + } + + result[dim] = result[dim].filter(function (t) { + return t >= 0 && t <= 1; + }); + roots = roots.concat(result[dim].sort(utils.numberSort)); + }.bind(this)); + result.values = roots.sort(utils.numberSort).filter(function (v, idx) { + return roots.indexOf(v) === idx; + }); + return result; + } + + bbox() { + const extrema = this.extrema(), + result = {}; + this.dims.forEach(function (d) { + result[d] = utils.getminmax(this, d, extrema[d]); + }.bind(this)); + return result; + } + + overlaps(curve) { + const lbbox = this.bbox(), + tbbox = curve.bbox(); + return utils.bboxoverlap(lbbox, tbbox); + } + + offset(t, d) { + if (typeof d !== "undefined") { + const c = this.get(t), + n = this.normal(t); + const ret = { + c: c, + n: n, + x: c.x + n.x * d, + y: c.y + n.y * d + }; + + if (this._3d) { + ret.z = c.z + n.z * d; + } + + return ret; + } + + if (this._linear) { + const nv = this.normal(0), + coords = this.points.map(function (p) { + const ret = { + x: p.x + t * nv.x, + y: p.y + t * nv.y + }; + + if (p.z && nv.z) { + ret.z = p.z + t * nv.z; + } + + return ret; + }); + return [new Bezier(coords)]; + } + + return this.reduce().map(function (s) { + if (s._linear) { + return s.offset(t)[0]; + } + + return s.scale(t); + }); + } + + simple() { + if (this.order === 3) { + const a1 = utils.angle(this.points[0], this.points[3], this.points[1]); + const a2 = utils.angle(this.points[0], this.points[3], this.points[2]); + if (a1 > 0 && a2 < 0 || a1 < 0 && a2 > 0) return false; + } + + const n1 = this.normal(0); + const n2 = this.normal(1); + let s = n1.x * n2.x + n1.y * n2.y; + + if (this._3d) { + s += n1.z * n2.z; + } + + return abs$1(acos$1(s)) < pi$1 / 3; + } + + reduce() { + // TODO: examine these var types in more detail... + let i, + t1 = 0, + t2 = 0, + step = 0.01, + segment, + pass1 = [], + pass2 = []; // first pass: split on extrema + + let extrema = this.extrema().values; + + if (extrema.indexOf(0) === -1) { + extrema = [0].concat(extrema); + } + + if (extrema.indexOf(1) === -1) { + extrema.push(1); + } + + for (t1 = extrema[0], i = 1; i < extrema.length; i++) { + t2 = extrema[i]; + segment = this.split(t1, t2); + segment._t1 = t1; + segment._t2 = t2; + pass1.push(segment); + t1 = t2; + } // second pass: further reduce these segments to simple segments + + + pass1.forEach(function (p1) { + t1 = 0; + t2 = 0; + + while (t2 <= 1) { + for (t2 = t1 + step; t2 <= 1 + step; t2 += step) { + segment = p1.split(t1, t2); + + if (!segment.simple()) { + t2 -= step; + + if (abs$1(t1 - t2) < step) { + // we can never form a reduction + return []; + } + + segment = p1.split(t1, t2); + segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2); + segment._t2 = utils.map(t2, 0, 1, p1._t1, p1._t2); + pass2.push(segment); + t1 = t2; + break; + } + } + } + + if (t1 < 1) { + segment = p1.split(t1, 1); + segment._t1 = utils.map(t1, 0, 1, p1._t1, p1._t2); + segment._t2 = p1._t2; + pass2.push(segment); + } + }); + return pass2; + } + + scale(d) { + const order = this.order; + let distanceFn = false; + + if (typeof d === "function") { + distanceFn = d; + } + + if (distanceFn && order === 2) { + return this.raise().scale(distanceFn); + } // TODO: add special handling for degenerate (=linear) curves. + + + const clockwise = this.clockwise; + const r1 = distanceFn ? distanceFn(0) : d; + const r2 = distanceFn ? distanceFn(1) : d; + const v = [this.offset(0, 10), this.offset(1, 10)]; + const points = this.points; + const np = []; + const o = utils.lli4(v[0], v[0].c, v[1], v[1].c); + + if (!o) { + throw new Error("cannot scale this curve. Try reducing it first."); + } // move all points by distance 'd' wrt the origin 'o' + // move end points by fixed distance along normal. + + + [0, 1].forEach(function (t) { + const p = np[t * order] = utils.copy(points[t * order]); + p.x += (t ? r2 : r1) * v[t].n.x; + p.y += (t ? r2 : r1) * v[t].n.y; + }); + + if (!distanceFn) { + // move control points to lie on the intersection of the offset + // derivative vector, and the origin-through-control vector + [0, 1].forEach(t => { + if (order === 2 && !!t) return; + const p = np[t * order]; + const d = this.derivative(t); + const p2 = { + x: p.x + d.x, + y: p.y + d.y + }; + np[t + 1] = utils.lli4(p, p2, o, points[t + 1]); + }); + return new Bezier(np); + } // move control points by "however much necessary to + // ensure the correct tangent to endpoint". + + + [0, 1].forEach(function (t) { + if (order === 2 && !!t) return; + var p = points[t + 1]; + var ov = { + x: p.x - o.x, + y: p.y - o.y + }; + var rc = distanceFn ? distanceFn((t + 1) / order) : d; + if (distanceFn && !clockwise) rc = -rc; + var m = sqrt$1(ov.x * ov.x + ov.y * ov.y); + ov.x /= m; + ov.y /= m; + np[t + 1] = { + x: p.x + rc * ov.x, + y: p.y + rc * ov.y + }; + }); + return new Bezier(np); + } + + outline(d1, d2, d3, d4) { + d2 = typeof d2 === "undefined" ? d1 : d2; + const reduced = this.reduce(), + len = reduced.length, + fcurves = []; + let bcurves = [], + p, + alen = 0, + tlen = this.length(); + const graduated = typeof d3 !== "undefined" && typeof d4 !== "undefined"; + + function linearDistanceFunction(s, e, tlen, alen, slen) { + return function (v) { + const f1 = alen / tlen, + f2 = (alen + slen) / tlen, + d = e - s; + return utils.map(v, 0, 1, s + f1 * d, s + f2 * d); + }; + } // form curve oulines + + + reduced.forEach(function (segment) { + const slen = segment.length(); + + if (graduated) { + fcurves.push(segment.scale(linearDistanceFunction(d1, d3, tlen, alen, slen))); + bcurves.push(segment.scale(linearDistanceFunction(-d2, -d4, tlen, alen, slen))); + } else { + fcurves.push(segment.scale(d1)); + bcurves.push(segment.scale(-d2)); + } + + alen += slen; + }); // reverse the "return" outline + + bcurves = bcurves.map(function (s) { + p = s.points; + + if (p[3]) { + s.points = [p[3], p[2], p[1], p[0]]; + } else { + s.points = [p[2], p[1], p[0]]; + } + + return s; + }).reverse(); // form the endcaps as lines + + const fs = fcurves[0].points[0], + fe = fcurves[len - 1].points[fcurves[len - 1].points.length - 1], + bs = bcurves[len - 1].points[bcurves[len - 1].points.length - 1], + be = bcurves[0].points[0], + ls = utils.makeline(bs, fs), + le = utils.makeline(fe, be), + segments = [ls].concat(fcurves).concat([le]).concat(bcurves); + return new PolyBezier(segments); + } + + outlineshapes(d1, d2, curveIntersectionThreshold) { + d2 = d2 || d1; + const outline = this.outline(d1, d2).curves; + const shapes = []; + + for (let i = 1, len = outline.length; i < len / 2; i++) { + const shape = utils.makeshape(outline[i], outline[len - i], curveIntersectionThreshold); + shape.startcap.virtual = i > 1; + shape.endcap.virtual = i < len / 2 - 1; + shapes.push(shape); + } + + return shapes; + } + + intersects(curve, curveIntersectionThreshold) { + if (!curve) return this.selfintersects(curveIntersectionThreshold); + + if (curve.p1 && curve.p2) { + return this.lineIntersects(curve); + } + + if (curve instanceof Bezier) { + curve = curve.reduce(); + } + + return this.curveintersects(this.reduce(), curve, curveIntersectionThreshold); + } + + lineIntersects(line) { + const mx = min(line.p1.x, line.p2.x), + my = min(line.p1.y, line.p2.y), + MX = max(line.p1.x, line.p2.x), + MY = max(line.p1.y, line.p2.y); + return utils.roots(this.points, line).filter(t => { + var p = this.get(t); + return utils.between(p.x, mx, MX) && utils.between(p.y, my, MY); + }); + } + + selfintersects(curveIntersectionThreshold) { + // "simple" curves cannot intersect with their direct + // neighbour, so for each segment X we check whether + // it intersects [0:x-2][x+2:last]. + const reduced = this.reduce(), + len = reduced.length - 2, + results = []; + + for (let i = 0, result, left, right; i < len; i++) { + left = reduced.slice(i, i + 1); + right = reduced.slice(i + 2); + result = this.curveintersects(left, right, curveIntersectionThreshold); + results.push(...result); + } + + return results; + } + + curveintersects(c1, c2, curveIntersectionThreshold) { + const pairs = []; // step 1: pair off any overlapping segments + + c1.forEach(function (l) { + c2.forEach(function (r) { + if (l.overlaps(r)) { + pairs.push({ + left: l, + right: r + }); + } + }); + }); // step 2: for each pairing, run through the convergence algorithm. + + let intersections = []; + pairs.forEach(function (pair) { + const result = utils.pairiteration(pair.left, pair.right, curveIntersectionThreshold); + + if (result.length > 0) { + intersections = intersections.concat(result); + } + }); + return intersections; + } + + arcs(errorThreshold) { + errorThreshold = errorThreshold || 0.5; + return this._iterate(errorThreshold, []); + } + + _error(pc, np1, s, e) { + const q = (e - s) / 4, + c1 = this.get(s + q), + c2 = this.get(e - q), + ref = utils.dist(pc, np1), + d1 = utils.dist(pc, c1), + d2 = utils.dist(pc, c2); + return abs$1(d1 - ref) + abs$1(d2 - ref); + } + + _iterate(errorThreshold, circles) { + let t_s = 0, + t_e = 1, + safety; // we do a binary search to find the "good `t` closest to no-longer-good" + + do { + safety = 0; // step 1: start with the maximum possible arc + + t_e = 1; // points: + + let np1 = this.get(t_s), + np2, + np3, + arc, + prev_arc; // booleans: + + let curr_good = false, + prev_good = false, + done; // numbers: + + let t_m = t_e, + prev_e = 1; // step 2: find the best possible arc + + do { + prev_good = curr_good; + prev_arc = arc; + t_m = (t_s + t_e) / 2; + np2 = this.get(t_m); + np3 = this.get(t_e); + arc = utils.getccenter(np1, np2, np3); //also save the t values + + arc.interval = { + start: t_s, + end: t_e + }; + + let error = this._error(arc, np1, t_s, t_e); + + curr_good = error <= errorThreshold; + done = prev_good && !curr_good; + if (!done) prev_e = t_e; // this arc is fine: we can move 'e' up to see if we can find a wider arc + + if (curr_good) { + // if e is already at max, then we're done for this arc. + if (t_e >= 1) { + // make sure we cap at t=1 + arc.interval.end = prev_e = 1; + prev_arc = arc; // if we capped the arc segment to t=1 we also need to make sure that + // the arc's end angle is correct with respect to the bezier end point. + + if (t_e > 1) { + let d = { + x: arc.x + arc.r * cos$1(arc.e), + y: arc.y + arc.r * sin$1(arc.e) + }; + arc.e += utils.angle({ + x: arc.x, + y: arc.y + }, d, this.get(1)); + } + + break; + } // if not, move it up by half the iteration distance + + + t_e = t_e + (t_e - t_s) / 2; + } else { + // this is a bad arc: we need to move 'e' down to find a good arc + t_e = t_m; + } + } while (!done && safety++ < 100); + + if (safety >= 100) { + break; + } // console.log("L835: [F] arc found", t_s, prev_e, prev_arc.x, prev_arc.y, prev_arc.s, prev_arc.e); + + + prev_arc = prev_arc ? prev_arc : arc; + circles.push(prev_arc); + t_s = prev_e; + } while (t_e < 1); + + return circles; + } + +} + +exports.Bezier = Bezier; diff --git a/web-build/static/media/bg.27c56310.png b/web-build/static/media/bg.27c56310.png Binary files differnew file mode 100644 index 0000000..45b63f3 --- /dev/null +++ b/web-build/static/media/bg.27c56310.png diff --git a/web-build/static/media/bowser.4ba9aedf.png b/web-build/static/media/bowser.4ba9aedf.png Binary files differnew file mode 100644 index 0000000..2b0bdbc --- /dev/null +++ b/web-build/static/media/bowser.4ba9aedf.png diff --git a/web-build/static/media/logo-ignite.5c0bc1b0.png b/web-build/static/media/logo-ignite.5c0bc1b0.png Binary files differnew file mode 100644 index 0000000..36af16d --- /dev/null +++ b/web-build/static/media/logo-ignite.5c0bc1b0.png |